]> matita.cs.unibo.it Git - helm.git/commitdiff
update in delayed-updating
authorFerruccio Guidi <fguidi@maelstrom.helm.cs.unibo.it>
Thu, 3 Feb 2022 13:11:58 +0000 (14:11 +0100)
committerFerruccio Guidi <fguidi@maelstrom.helm.cs.unibo.it>
Thu, 3 Feb 2022 13:11:58 +0000 (14:11 +0100)
+ relationship between updating an grafted terms clarified
+ progress with dfr-lift_bi

matita/matita/contribs/lambdadelta/delayed_updating/notes.txt
matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_eq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_preterm_eq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_prototerm_eq.ma
matita/matita/contribs/lambdadelta/delayed_updating/syntax/preterm.ma
matita/matita/contribs/lambdadelta/delayed_updating/syntax/prototerm.ma
matita/matita/contribs/lambdadelta/ground/lib/list_append.ma

index d70abbe43d82e43071a06d02922002a614dc8c4b..568783719e225924875e36807a5efc84977a676f 100644 (file)
@@ -1,3 +1,8 @@
 1) (⫯f)@(1) = 1
 2) f@❨d-n❩ = k → n <= d → (f∘𝐮❨n❩)@❨d❩ = k
 3) f@❨d-1❩ = k-1 → 1 < d → 1 < k → (⫯f)@❨d❩ = k
+
+
+lemma pr_pat_after_uni_tls (i2) (i1):
+      ∀f2. @❨i1, f2❩ ≘ i2 →
+      ∀f. 𝐮❨i2❩ ⊚ ⫰*[i2] f2 ≘ f → f2 ⊚ 𝐮❨i1❩ ≘ f.
index 9a376bed0e223b86f80c4284aecd5ba9a80f02c2..fc47782e774379c6f0420af22b7c9b62665898b0 100644 (file)
@@ -15,6 +15,8 @@
 include "delayed_updating/reduction/dfr.ma".
 include "delayed_updating/reduction/ifr.ma".
 include "delayed_updating/substitution/fsubst_lift.ma".
+include "delayed_updating/substitution/fsubst_eq.ma".
+include "delayed_updating/substitution/lift_constructors.ma". 
 include "delayed_updating/substitution/lift_structure_depth.ma".
 include "delayed_updating/syntax/prototerm_proper_constructors.ma".
 include "delayed_updating/syntax/path_structure_depth.ma".
@@ -36,6 +38,8 @@ lemma dfr_lift_bi (f) (p) (q) (t1) (t2): t1 ϵ 𝐓 →
   @(subset_eq_trans … Ht2) -t2
   @(subset_eq_trans … (lift_fsubst …))
   [ <structure_append <structure_A_sn <structure_append <structure_L_sn
+    @fsubst_eq_repl [ // ]
+    @(subset_eq_trans … (lift_iref …))
   | //
   | /2 width=2 by ex_intro/
   | //
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_eq.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_eq.ma
new file mode 100644 (file)
index 0000000..a6681b5
--- /dev/null
@@ -0,0 +1,33 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "delayed_updating/substitution/fsubst.ma".
+include "delayed_updating/syntax/prototerm_equivalence.ma".
+
+(* Constructions with subset_equivalence ************************************)
+
+lemma subset_inclusion_fsubst_bi (t1) (t2) (u1) (u2) (p):
+      t1 ⊆ t2 → u1 ⊆ u2 → t1[⋔p←u1] ⊆ t2[⋔p←u2].
+#t1 #t2 #u1 #u2 #p #Ht #Hu #q * *
+[ #r #Hr #H0 destruct
+  /4 width=3 by ex2_intro, or_introl/
+| /4 width=2 by or_intror, conj/
+]
+qed.
+
+lemma fsubst_eq_repl (t1) (t2) (u1) (u2) (p):
+      t1 ⇔ t2 → u1 ⇔ u2 → t1[⋔p←u1] ⇔ t2[⋔p←u2].
+#t1 #t2 #u1 #u2 #p * #H1t #H2t * #H1u #H2u
+/3 width=5 by conj, subset_inclusion_fsubst_bi/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_preterm_eq.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_preterm_eq.ma
new file mode 100644 (file)
index 0000000..91facd7
--- /dev/null
@@ -0,0 +1,48 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground/lib/subset_equivalence.ma".
+include "delayed_updating/syntax/preterm.ma".
+include "delayed_updating/substitution/lift_structure.ma".
+include "delayed_updating/substitution/lift_prototerm.ma".
+
+(* LIFT FOR PRETERM *********************************************************)
+
+(* Constructions with subset_equivalence ************************************)
+
+lemma lift_grafted_S_sn (f) (t) (p):
+      ↑[↑[p]f](t⋔(p◖𝗦)) ⊆ (↑[f]t)⋔((⊗p)◖𝗦).
+#f #t #p #q * #r #Hr #H0 destruct
+@(ex2_intro … Hr) -Hr
+<list_append_rcons_sn <list_append_rcons_sn
+<lift_append_proper_dx //
+qed-.
+
+lemma lift_grafted_S_dx (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
+      (↑[f]t)⋔((⊗p)◖𝗦) ⊆ ↑[↑[p]f](t⋔(p◖𝗦)).
+#f #t #p #Hp #Ht #q * #r #Hr
+<list_append_rcons_sn #H0
+elim (lift_inv_append_proper_dx … (sym_eq … H0)) -H0 //
+#p0 #q0 #Hp0 #Hq0 #H0 destruct
+<(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
+elim (lift_path_inv_S_sn … (sym_eq … Hq0)) -Hq0
+#r1 #r2 #Hr1 #Hr2 #H0 destruct
+lapply (preterm_in_root_append_inv_structure_empty_dx … p0 … Ht Hr1)
+[ /2 width=2 by ex_intro/ ] -Hr1 #Hr1 destruct
+/2 width=1 by in_comp_lift_bi/
+qed-.
+
+lemma lift_grafted_S (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
+      ↑[↑[p]f](t⋔(p◖𝗦)) ⇔ (↑[f]t)⋔((⊗p)◖𝗦).
+/3 width=1 by lift_grafted_S_sn, conj, lift_grafted_S_dx/ qed.
index 44ec5a36610d38f35e0893af7ec9c4d69311aeb8..24a3dbc602cb8c2062bf7bce37b812f0b3f62c0e 100644 (file)
@@ -37,4 +37,4 @@ lemma lift_term_after (f1) (f2) (t):
 | @subset_inclusion_ext_f1_compose
 | @subset_equivalence_ext_f1_exteq /2 width=5/
 ]
-qed. 
+qed.
index b7b90a4cf8f40e455866f8dd4c281c4252fbe935..4d428e5ba8ae48488fa3702ef2cf7055718a0cc6 100644 (file)
@@ -27,3 +27,15 @@ definition structure_injective: predicate prototerm ≝
 interpretation
   "preterm (prototerm)"
   'ClassT = (structure_injective).
+
+(* Basic inversions *********************************************************)
+
+lemma preterm_in_root_append_inv_structure_empty_dx (t) (p) (r):
+      p●r ϵ ▵t → t ϵ 𝐓 →  𝐞 = ⊗r → 𝐞 = r.
+#t #p #r #Hpr #Ht #Hr
+lapply (Ht p ?? Hpr ?)
+[ <structure_append //
+| /2 width=2 by prototerm_in_root_append_des_sn/
+| /2 width=3 by eq_inv_list_append_dx_sn_refl/
+]
+qed-.
index 79452e39e54edf049a54d95984f5da8765eb1c4a..30a2770e279bceb6c3baa14bcd51e0dcc570a789 100644 (file)
@@ -42,3 +42,11 @@ lemma prototerm_in_comp_root (p) (t):
       p ϵ t → p ϵ ▵t.
 /2 width=2 by ex_intro/
 qed.
+
+(* Basic destructions *******************************************************)
+
+lemma prototerm_in_root_append_des_sn (t) (p) (q):
+      p●q ϵ ▵t → p ϵ ▵t.
+#t #p #q * #r #Hr
+/2 width=2 by ex_intro/
+qed-.
index 31644956669dea1ade08a8e62593873695736452..042497aac144f4549933ebc96f4afc615c50218b 100644 (file)
@@ -68,6 +68,15 @@ lemma eq_inv_list_empty_append (A):
 ]
 qed-.
 
+(* Advanced inversions ******************************************************)
+
+lemma eq_inv_list_append_dx_sn_refl (A) (l1) (l2):
+      l1 = l1⨁{A}l2 → ⓔ = l2.
+#A #l1 elim l1 -l1 [ // ]
+#a1 #l1 #IH #l2 <list_append_lcons_sn #H0 destruct -H0
+/2 width=1 by/
+qed-.
+
 (* Advanced eliminations ****************************************************)
 
 lemma list_ind_append_dx (A) (Q:predicate …):