]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/delayed_updating/syntax/prototerm_constructors.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / syntax / prototerm_constructors.ma
index 1d3aeedf531dde6c74f190f1134522efaa2e3f33..fd86ef975a39b862aaf05ac99dc5efd298fb10ed 100644 (file)
@@ -13,6 +13,7 @@
 (**************************************************************************)
 
 include "delayed_updating/syntax/prototerm.ma".
+include "delayed_updating/notation/functions/m_hook_1.ma".
 include "delayed_updating/notation/functions/hash_1.ma".
 include "delayed_updating/notation/functions/phi_2.ma".
 include "delayed_updating/notation/functions/lamda_1.ma".
@@ -26,26 +27,33 @@ definition prototerm_node_0 (l): prototerm ≝
 definition prototerm_node_1 (l): prototerm → prototerm ≝
            λt,p. ∃∃q. q ϵ t & l◗q = p.
 
+definition prototerm_node_1_2 (l1) (l2): prototerm → prototerm ≝
+           λt,p. ∃∃q. q ϵ t & l1◗l2◗q = p.
+
 definition prototerm_node_2 (l1) (l2): prototerm → prototerm → prototerm ≝
            λt1,t2,p.
            ∨∨ ∃∃q. q ϵ t1 & l1◗q = p
             | ∃∃q. q ϵ t2 & l2◗q = p.
 
+interpretation
+  "mark (prototerm)"
+  'MHook t = (prototerm_node_1 label_m t).
+
 interpretation
   "outer variable reference by depth (prototerm)"
-  'Hash n = (prototerm_node_0 (label_node_d n)).
+  'Hash n = (prototerm_node_0 (label_d n)).
 
 interpretation
   "inner variable reference by depth (prototerm)"
-  'Phi n t = (prototerm_node_1 (label_node_d n) t).
+  'Phi n t = (prototerm_node_1_2 (label_d n) label_m t).
 
 interpretation
   "name-free functional abstraction (prototerm)"
-  'Lamda t = (prototerm_node_1 label_edge_L t).
+  'Lamda t = (prototerm_node_1 label_L t).
 
 interpretation
   "application (prototerm)"
-  'At u t = (prototerm_node_2 label_edge_S label_edge_A u t).
+  'At u t = (prototerm_node_2 label_S label_A u t).
 
 (* Basic Inversions *********************************************************)
 
@@ -60,17 +68,25 @@ qed-.
 
 lemma prototerm_in_root_inv_lcons_iref:
       ∀t,p,l,n. l◗p ϵ ▵𝛗n.t →
-      ∧∧ 𝗱n = l & p ϵ ▵t.
-#t #p #l #n * #q
-<list_append_lcons_sn * #r #Hr #H0 destruct
+      ∧∧ 𝗱n = l & p ϵ ▵ɱ.t.
+#t #p #l #n * #q * #r #Hr
+<list_append_lcons_sn #H0 destruct -H0
+/4 width=4 by ex2_intro, ex_intro, conj/
+qed-.
+
+lemma prototerm_in_root_inv_lcons_mark:
+      ∀t,p,l. l◗p ϵ ▵ɱ.t →
+      ∧∧ 𝗺 = l & p ϵ ▵t.
+#t #p #l * #q * #r #Hr
+<list_append_lcons_sn #H0 destruct
 /3 width=2 by ex_intro, conj/
 qed-.
 
 lemma prototerm_in_root_inv_lcons_abst:
       ∀t,p,l. l◗p ϵ ▵𝛌.t →
       ∧∧ 𝗟 = l & p ϵ ▵t.
-#t #p #l * #q
-<list_append_lcons_sn * #r #Hr #H0 destruct
+#t #p #l * #q * #r #Hr
+<list_append_lcons_sn #H0 destruct
 /3 width=2 by ex_intro, conj/
 qed-.
 
@@ -78,7 +94,7 @@ lemma prototerm_in_root_inv_lcons_appl:
       ∀u,t,p,l. l◗p ϵ ▵@u.t →
       ∨∨ ∧∧ 𝗦 = l & p ϵ ▵u
        | ∧∧ 𝗔 = l & p ϵ ▵t.
-#u #t #p #l * #q
-<list_append_lcons_sn * * #r #Hr #H0 destruct
+#u #t #p #l * #q * * #r #Hr
+<list_append_lcons_sn #H0 destruct
 /4 width=2 by ex_intro, or_introl, or_intror, conj/
 qed-.