]> matita.cs.unibo.it Git - helm.git/commitdiff
update in delayed_updating
authorFerruccio Guidi <fguidi@maelstrom.helm.cs.unibo.it>
Sun, 30 Jan 2022 17:51:41 +0000 (18:51 +0100)
committerFerruccio Guidi <fguidi@maelstrom.helm.cs.unibo.it>
Sun, 30 Jan 2022 17:51:41 +0000 (18:51 +0100)
+ additions to lift
+ bugs fixed in ifr

matita/matita/contribs/lambdadelta/delayed_updating/notes.txt [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_constructors.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_eq.ma
matita/matita/contribs/lambdadelta/ground/relocation/tr_pn_eq.ma

diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notes.txt b/matita/matita/contribs/lambdadelta/delayed_updating/notes.txt
new file mode 100644 (file)
index 0000000..d70abbe
--- /dev/null
@@ -0,0 +1,3 @@
+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
index b188a7730dc1b10ae5fd10b664390d98bb3963ad..1371c3a31ddeda6c9d1b9b47768c1732110f1e6a 100644 (file)
@@ -26,7 +26,7 @@ include "ground/xoa/and_4.ma".
 definition ifr (p) (q): relation2 prototerm prototerm ≝
            λt1,t2. ∃∃b,n.
            let r ≝ p●𝗔◗b●𝗟◗q in
-           â\88§â\88§ â\8a\97b Ïµ ð\9d\90\81 & â\88\80f. â\9d\98ð\9d\97\9fâ\97\97\9d\98 = (â\86\91[q]⫯f)@❨n❩ & r◖𝗱n ϵ t1 &
+           â\88§â\88§ â\8a\97b Ïµ ð\9d\90\81 & â\88\80f. â\86\91â\9d\98\9d\98 = (â\86\91[q]f)@❨n❩ & r◖𝗱n ϵ t1 &
               t1[⋔r←↑[𝐮❨❘b●𝗟◗q❘❩](t1⋔(p◖𝗦))] ⇔ t2
 .
 
index 0202dc9264c50cf0cc99216fbe0eafe7d9d01edf..6825b13aa3109a7765f5fcb12efe9b0594a5856b 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
+include "ground/relocation/tr_compose_compose.ma".
+include "ground/relocation/tr_compose_pn.ma".
 include "delayed_updating/substitution/lift_eq.ma".
 
-axiom lift_path_after (p) (f1) (f2):
+lemma lift_path_after (p) (f1) (f2):
       ↑[f2]↑[f1]p = ↑[f2∘f1]p.
-(*
-#p @(path_ind_lift … p) -p // [ #n | #n #l #p | #p ] #IH #f1 #f2
-[ <lift_path_d_empty_sn <lift_path_d_empty_sn
-| <lift_path_d_lcons_sn <lift_path_d_lcons_sn
+#p @(path_ind_lift … p) -p // [ #n #l #p | #p ] #IH #f1 #f2
+[ <lift_path_d_lcons_sn <lift_path_d_lcons_sn
+  >(lift_path_eq_repl … (tr_compose_assoc …)) //
 | <lift_path_L_sn <lift_path_L_sn <lift_path_L_sn
-*)
+  >tr_compose_push_bi //
+]
+qed.
+
 include "delayed_updating/substitution/lift_prototerm.ma".
 
 axiom lift_term_after (t) (f1) (f2):
@@ -32,7 +36,7 @@ include "delayed_updating/syntax/prototerm_constructors.ma".
 (* LIFT FOR PROTOTERM *******************************************************)
 
 lemma lift_iref_after_sn (f) (t) (n:pnat):
-      ↑[f∘𝐮❨n❩]t ⊆ ↑[f](𝛗n.t).
+      (↑[f∘𝐮❨n❩]t) ⊆ ↑[f](𝛗n.t).
 #f #t #n #p * #q #Hq #H0 destruct
 @(ex2_intro … (𝗱n◗𝗺◗q))
 /2 width=1 by in_comp_iref/
index 0273a3eb88560a961ced247647283b95fa33cb85..9e23b2cb9a5620d08bab1658735ea0cc32344dd6 100644 (file)
 (**************************************************************************)
 
 include "delayed_updating/substitution/lift.ma".
-include "ground/notation/relations/ringeq_3.ma".
+include "ground/relocation/tr_compose_eq.ma".
+include "ground/relocation/tr_pn_eq.ma".
 
 (* LIFT FOR PATH ***********************************************************)
 
 definition lift_exteq (A): relation2 (lift_continuation A) (lift_continuation A) ≝
-           λk1,k2. ∀f,p. k1 f p = k2 f p.
+           λk1,k2. ∀f1,f2,p. f1 ≗ f2 → k1 f1 p = k2 f2 p.
 
 interpretation
   "extensional equivalence (lift continuation)"
@@ -26,41 +27,57 @@ interpretation
 
 (* Constructions with lift_exteq ********************************************)
 
-lemma lift_eq_repl_sn (A) (p) (k1) (k2) (f):
-      k1 ≗{A} k2 → ↑❨k1, f, p❩ = ↑❨k2, f, p❩.
-#A #p @(path_ind_lift … p) -p [| #n | #n #l0 #q ]
-[ #k1 #k2 #f #Hk <lift_empty <lift_empty //
-|*: #IH #k1 #k2 #f #Hk /2 width=1 by/
+lemma lift_eq_repl (A) (p) (k1) (k2):
+      k1 ≗{A} k2 → stream_eq_repl … (λf1,f2. ↑❨k1, f1, p❩ = ↑❨k2, f2, p❩).
+#A #p @(path_ind_lift … p) -p [| #n #IH | #n #l0 #q #IH |*: #q #IH ]
+#k1 #k2 #f1 #f2 #Hk #Hf
+[ <lift_empty <lift_empty /2 width=1 by/
+| <lift_d_empty_sn <lift_d_empty_sn <(tr_pap_eq_repl … Hf)
+  /3 width=1 by tr_compose_eq_repl, stream_eq_refl/
+| <lift_d_lcons_sn <lift_d_lcons_sn
+  /3 width=1 by tr_compose_eq_repl, stream_eq_refl/
+| /2 width=1 by/
+| /3 width=1 by tr_push_eq_repl/
+| /3 width=1 by/
+| /3 width=1 by/
 ]
 qed-.
 
 (* Advanced constructions ***************************************************)
 
-lemma lift_lcons_alt (A) (k) (f) (p) (l):
+lemma lift_lcons_alt (A) (k) (f) (p) (l): k ≗ k →
       ↑❨λg,p2. k g (l◗p2), f, p❩ = ↑{A}❨λg,p2. k g ((l◗𝐞)●p2), f, p❩.
-#A #k #f #p #l
-@lift_eq_repl_sn #p2 #g // (**) (* auto fails with typechecker failure *)
+#A #k #f #p #l #Hk
+@lift_eq_repl // #g1 #g2 #p2 #Hg @Hk -Hk // (**) (* auto fail *)
 qed.
 
-lemma lift_append_rcons_sn (A) (k) (f) (p1) (p) (l):
+lemma lift_append_rcons_sn (A) (k) (f) (p1) (p) (l): k ≗ k →
       ↑❨λg,p2. k g (p1●l◗p2), f, p❩ = ↑{A}❨λg,p2. k g (p1◖l●p2), f, p❩.
-#A #k #f #p1 #p #l
-@lift_eq_repl_sn #p2 #g
-<list_append_rcons_sn //
+#A #k #f #p1 #p #l #Hk
+@lift_eq_repl // #g1 #g2 #p2 #Hg
+<list_append_rcons_sn @Hk -Hk // (**) (* auto fail *)
 qed.
 
 (* Advanced constructions with proj_path ************************************)
 
+lemma proj_path_proper:
+      proj_path ≗ proj_path.
+// qed.
+
+lemma lift_path_eq_repl (p):
+      stream_eq_repl … (λf1,f2. ↑[f1]p = ↑[f2]p).
+/2 width=1 by lift_eq_repl/ qed.
+
 lemma lift_path_append_sn (p) (f) (q):
       q●↑[f]p = ↑❨(λg,p. proj_path g (q●p)), f, p❩.
 #p @(path_ind_lift … p) -p // [ #n #l #p |*: #p ] #IH #f #q
 [ <lift_d_lcons_sn <lift_d_lcons_sn <IH -IH //
 | <lift_m_sn <lift_m_sn //
-| <lift_L_sn <lift_L_sn >lift_lcons_alt >lift_append_rcons_sn
+| <lift_L_sn <lift_L_sn >lift_lcons_alt // >lift_append_rcons_sn //
   <IH <IH -IH <list_append_rcons_sn //
-| <lift_A_sn <lift_A_sn >lift_lcons_alt >lift_append_rcons_sn
+| <lift_A_sn <lift_A_sn >lift_lcons_alt >lift_append_rcons_sn //
   <IH <IH -IH <list_append_rcons_sn //
-| <lift_S_sn <lift_S_sn >lift_lcons_alt >lift_append_rcons_sn
+| <lift_S_sn <lift_S_sn >lift_lcons_alt >lift_append_rcons_sn //
   <IH <IH -IH <list_append_rcons_sn //
 ]
 qed.
index 278be5e27bde54f9860dabc72e932b5887d61ed6..cf2411fd1172f8394d1811f45241dc0fe8566e69 100644 (file)
@@ -19,7 +19,7 @@ include "ground/relocation/tr_pn.ma".
 
 (* Constructions with stream_eq *********************************************)
 
-lemma tr_push_eq_bi:
+lemma tr_push_eq_repl:
       stream_eq_repl … (λf1,f2. ⫯f1 ≗ ⫯f2).
 /2 width=1 by stream_eq_cons/ qed.