]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_depth.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / syntax / path_depth.ma
index e76c4943b704ce2729085a27fe150c8decb87448..a769327f65b218f655530102b435ca614b60eb22 100644 (file)
@@ -13,8 +13,8 @@
 (**************************************************************************)
 
 include "delayed_updating/syntax/path.ma".
-include "ground/arith/nat_succ.ma".
-include "ground/notation/functions/verticalbars_1.ma".
+include "delayed_updating/notation/functions/flat_1.ma".
+include "ground/arith/nat_plus.ma".
 
 (* DEPTH FOR PATH ***********************************************************)
 
@@ -23,30 +23,75 @@ match p with
 [ list_empty     ⇒ 𝟎
 | list_lcons l q ⇒
   match l with
-  [ label_node_d _ ⇒ depth q
-  | label_edge_L   ⇒ ↑(depth q)
-  | label_edge_A   ⇒ depth q
-  | label_edge_S   ⇒ depth q
+  [ label_d k ⇒ depth q
+  | label_m   ⇒ depth q
+  | label_L   ⇒ ↑(depth q)
+  | label_A   ⇒ depth q
+  | label_S   ⇒ depth q
   ]
 ].
 
 interpretation
   "depth (path)"
-  'VerticalBars p = (depth p).
+  'Flat p = (depth p).
 
 (* Basic constructions ******************************************************)
 
-lemma depth_empty: ð\9d\9f\8e = â\9d\98ð\9d\90\9eâ\9d\98.
+lemma depth_empty: ð\9d\9f\8e = â\99­ð\9d\90\9e.
 // qed.
 
-lemma depth_d (q) (n): ❘q❘ = ❘𝗱❨n❩◗q❘.
+lemma depth_d_dx (p) (k):
+      ♭p = ♭(p◖𝗱k).
 // qed.
 
-lemma depth_L (q): ↑❘q❘ = ❘𝗟◗q❘.
+lemma depth_m_dx (p):
+      ♭p = ♭(p◖𝗺).
 // qed.
 
-lemma depth_A (q): ❘q❘ = ❘𝗔◗q❘.
+lemma depth_L_dx (p):
+      ↑♭p = ♭(p◖𝗟).
 // qed.
 
-lemma depth_S (q): ❘q❘ = ❘𝗦◗q❘.
+lemma depth_A_dx (p):
+      ♭p = ♭(p◖𝗔).
+// qed.
+
+lemma depth_S_dx (p):
+      ♭p = ♭(p◖𝗦).
+// qed.
+
+(* Main constructions *******************************************************)
+
+theorem depth_append (p) (q):
+        (♭p)+(♭q) = ♭(p●q).
+#p #q elim q -q //
+* [ #k ] #q #IH <list_append_lcons_sn
+[ <depth_d_dx <depth_d_dx //
+| <depth_m_dx <depth_m_dx //
+| <depth_L_dx <depth_L_dx //
+| <depth_A_dx <depth_A_dx //
+| <depth_S_dx <depth_S_dx //
+]
+qed.
+
+(* Constructions with path_lcons ********************************************)
+
+lemma depth_d_sn (p) (k):
+      ♭p = ♭(𝗱k◗p).
+// qed.
+
+lemma depth_m_sn (p):
+      ♭p = ♭(𝗺◗p).
+// qed.
+
+lemma depth_L_sn (p):
+      ↑♭p = ♭(𝗟◗p).
+// qed.
+
+lemma depth_A_sn (p):
+      ♭p = ♭(𝗔◗p).
+// qed.
+
+lemma depth_S_sn (p):
+      ♭p = ♭(𝗦◗p).
 // qed.