1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "pointer_list.ma".
17 (* POINTER TREE *************************************************************)
19 (* Policy: pointer tree metavariables: P, Q *)
20 (* Note: this is a binary tree on pointer sequences *)
21 inductive ptrt: Type[0] ≝
23 | tcons: ptrl → ptrt → ptrt → ptrt
26 let rec length (P:ptrt) on P ≝ match P with
28 | tcons s Q1 Q2 ⇒ length Q2 + length Q1 + |s|
31 interpretation "pointer tree length" 'card P = (length P).