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 "delayed_updating/syntax/path.ma".
16 include "ground/arith/nat_plus.ma".
17 include "ground/notation/functions/verticalbars_1.ma".
19 (* DEPTH FOR PATH ***********************************************************)
21 rec definition depth (p) on p: nat ā
26 [ label_d _ ā depth q
28 | label_L ā ā(depth q)
36 'VerticalBars p = (depth p).
38 (* Basic constructions ******************************************************)
40 lemma depth_empty: š = āšā.
43 lemma depth_d_sn (q) (n): āqā = āš±nāqā.
46 lemma depth_m_sn (q): āqā = āšŗāqā.
49 lemma depth_L_sn (q): āāqā = āšāqā.
52 lemma depth_A_sn (q): āqā = āšāqā.
55 lemma depth_S_sn (q): āqā = āš¦āqā.
58 (* Main constructions *******************************************************)
60 theorem depth_append (p1) (p2):
61 āp2ā+āp1ā = āp1āp2ā.
63 * [ #n ] #p1 #IH #p2 <list_append_lcons_sn
64 [ <depth_d_sn <depth_d_sn //
65 | <depth_m_sn <depth_m_sn //
66 | <depth_L_sn <depth_L_sn //
67 | <depth_A_sn <depth_A_sn //
68 | <depth_S_sn <depth_S_sn //
72 (* Constructions with list_rcons ********************************************)
74 lemma depth_d_dx (p) (n):
75 āpā = āpāš±nā.
79 āpā = āpāšŗā.
83 āāpā = āpāšā.
87 āpā = āpāšā.
91 āpā = āpāš¦ā.