]> matita.cs.unibo.it Git - helm.git/commitdiff
update in delayed_updating
authorFerruccio Guidi <fguidi@maelstrom.helm.cs.unibo.it>
Tue, 4 Jan 2022 12:09:51 +0000 (13:09 +0100)
committerFerruccio Guidi <fguidi@maelstrom.helm.cs.unibo.it>
Tue, 4 Jan 2022 12:09:51 +0000 (13:09 +0100)
+ immediate reduction defined
+ some lemmas with lift simplified

matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_4.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_df_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_f_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma
matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_eq.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_preterm.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_structure.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/preterm_dephi.ma [deleted file]

diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_4.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_4.ma
deleted file mode 100644 (file)
index f27fa0b..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||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                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-(* NOTATION FOR DELAYED UPDATING ********************************************)
-
-notation "hvbox( t1 โžก'd''f'[ break term 46 p, break term 46 q ] break term 46 t2 )"
-   non associative with precedence 45
-   for @{ 'BlackRightArrow $t1 $p $q $t2 }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_df_4.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_df_4.ma
new file mode 100644 (file)
index 0000000..ca059fc
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR DELAYED UPDATING ********************************************)
+
+notation "hvbox( t1 โžก๐๐Ÿ[ break term 46 p, break term 46 q ] break term 46 t2 )"
+   non associative with precedence 45
+   for @{ 'BlackRightArrowDF $t1 $p $q $t2 }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_f_4.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_f_4.ma
new file mode 100644 (file)
index 0000000..c69d6c7
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* NOTATION FOR DELAYED UPDATING ********************************************)
+
+notation "hvbox( t1 โžก๐Ÿ[ break term 46 p, break term 46 q ] break term 46 t2 )"
+   non associative with precedence 45
+   for @{ 'BlackRightArrowF $t1 $p $q $t2 }.
index a99d8ca0633e96180ddcb3cf2220c6d18d6ba880..8c84de0f240f66c3e61aed0d5fa2a35d81eeaf88 100644 (file)
@@ -15,9 +15,9 @@
 include "delayed_updating/syntax/path_structure.ma".
 include "delayed_updating/syntax/path_balanced.ma".
 include "delayed_updating/substitution/fsubst.ma".
-include "delayed_updating/notation/relations/black_rightarrow_4.ma".
+include "delayed_updating/notation/relations/black_rightarrow_df_4.ma".
 
-(* DELAYED FOCALIZED REDUCTION **********************************************)
+(* DELAYED FOCUSED REDUCTION ************************************************)
 
 inductive dfr (p) (q) (t): predicate preterm โ‰
 | dfr_beta (b) (n):
@@ -26,5 +26,5 @@ inductive dfr (p) (q) (t): predicate preterm โ‰
 .
 
 interpretation
-  "delayed focalized reduction (preterm)"
-  'BlackRightArrow t1 p q t2 = (dfr p q t1 t2).
+  "focused balanced reduction with delayed updating (preterm)"
+  'BlackRightArrowDF t1 p q t2 = (dfr p q t1 t2).
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma
new file mode 100644 (file)
index 0000000..bd62d8e
--- /dev/null
@@ -0,0 +1,23 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/reduction/ifr.ma".
+include "delayed_updating/reduction/dfr.ma".
+
+(* DELAYED FOCUSED REDUCTION ************************************************)
+
+lemma dfr_lift_bi (f) (p) (q) (t1) (t2):
+      t1 โžก๐๐Ÿ[p,q] t2 โ†’ โ†‘[f]t1 โžก๐Ÿ[โŠ—p,โŠ—q] โ†‘[f]t2.
+#f #p #q #t1 #t2
+* #b #n #Hr #Hb
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma
new file mode 100644 (file)
index 0000000..5385327
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/syntax/path_structure.ma".
+include "delayed_updating/syntax/path_balanced.ma".
+include "delayed_updating/substitution/fsubst.ma".
+include "delayed_updating/substitution/lift_preterm.ma".
+include "delayed_updating/notation/relations/black_rightarrow_f_4.ma".
+
+(* IMMEDIATE FOCUSED REDUCTION ************************************************)
+
+inductive ifr (p) (q) (t): predicate preterm โ‰
+| ifr_beta (b) (n):
+  let r โ‰ pโ—๐—”โ——bโ—๐—Ÿโ——q in
+  rโ—–๐—ฑโจnโฉ ฯต t โ†’ โŠ“โŠ—b โ†’ ifr p q t (t[โ‹”rโ†โ†‘[๐ฎโจnโฉ]tโ‹”(pโ—–๐—ฆ)])
+.
+
+interpretation
+  "focused balanced reduction with immediate updating (preterm)"
+  'BlackRightArrowF t1 p q t2 = (ifr p q t1 t2).
index a396beb46df884ea68ea7e59845d8356500f1af1..5db8fa945bed188af60940375e5d8a43e4573831 100644 (file)
@@ -81,3 +81,50 @@ lemma lift_A_sn (A) (k) (p) (f):
 lemma lift_S_sn (A) (k) (p) (f):
       โ†‘โจ(ฮปp. k (๐—ฆโ——p)), p, fโฉ = โ†‘{A}โจk, ๐—ฆโ——p, fโฉ.
 // qed.
+
+(* Basic constructions with proj_path ***************************************)
+
+lemma lift_path_d_empty_sn (f) (n):
+      ๐—ฑโจf@โจnโฉโฉโ——๐ž = โ†‘[f](๐—ฑโจnโฉโ——๐ž).
+// qed.
+
+lemma lift_path_d_lcons_sn (f) (p) (l) (n):
+      โ†‘[fโˆ˜๐ฎโจninj nโฉ](lโ——p) = โ†‘[f](๐—ฑโจnโฉโ——lโ——p).
+// qed.
+
+(* Basic constructions with proj_rmap ***************************************)
+
+lemma lift_rmap_d_empty_sn (f) (n):
+      f = โ†‘[๐—ฑโจnโฉโ——๐ž]f.
+// qed.
+
+lemma lift_rmap_d_lcons_sn (f) (p) (l) (n):
+      โ†‘[lโ——p](fโˆ˜๐ฎโจninj nโฉ) = โ†‘[๐—ฑโจnโฉโ——lโ——p]f.
+// qed.
+
+lemma lift_rmap_L_sn (f) (p):
+      โ†‘[p](โซฏf) = โ†‘[๐—Ÿโ——p]f.
+// qed.
+
+lemma lift_rmap_A_sn (f) (p):
+      โ†‘[p]f = โ†‘[๐—”โ——p]f.
+// qed.
+
+lemma lift_rmap_S_sn (f) (p):
+      โ†‘[p]f = โ†‘[๐—ฆโ——p]f.
+// qed.
+
+(* Advanced eliminations with path ******************************************)
+
+lemma path_ind_lift (Q:predicate โ€ฆ):
+      Q ๐ž โ†’
+      (โˆ€n. Q ๐ž โ†’ Q (๐—ฑโจnโฉโ——๐ž)) โ†’
+      (โˆ€n,l,p. Q (lโ——p) โ†’ Q (๐—ฑโจnโฉโ——lโ——p)) โ†’
+      (โˆ€p. Q p โ†’ Q (๐—Ÿโ——p)) โ†’
+      (โˆ€p. Q p โ†’ Q (๐—”โ——p)) โ†’
+      (โˆ€p. Q p โ†’ Q (๐—ฆโ——p)) โ†’
+      โˆ€p. Q p.
+#Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #p
+elim p -p [| * [ #n * ] ]
+/2 width=1 by/
+qed-.
index c0d7dcbf5387fe01018c316c242d53e22afb3369..ae3ffbdc6fbdef2165f3b937411c2d429e0c96ef 100644 (file)
@@ -28,9 +28,9 @@ interpretation
 
 lemma lift_eq_repl_sn (A) (p) (k1) (k2) (f):
       k1 โ‰—{A} k2 โ†’ โ†‘โจk1, p, fโฉ = โ†‘โจk2, p, fโฉ.
-#A #p elim p -p
+#A #p @(path_ind_lift โ€ฆ p) -p [| #n | #n #l0 #q ]
 [ #k1 #k2 #f #Hk <lift_empty <lift_empty //
-| * [ #n * [| #l0 ]] [|*: #q ] #IH #k1 #k2 #f #Hk /2 width=1 by/
+|*: #IH #k1 #k2 #f #Hk /2 width=1 by/
 ]
 qed-.
 
@@ -49,28 +49,35 @@ lemma lift_append_rcons_sn (A) (k) (f) (p1) (p) (l):
 <list_append_rcons_sn //
 qed.
 
-(* Basic constructions with proj_path ***************************************)
+(* Advanced constructions with proj_path ************************************)
 
-lemma lift_append_sn (p) (f) (q):
+lemma lift_path_append_sn (p) (f) (q):
       qโ—โ†‘[f]p = โ†‘โจ(ฮปp. proj_path (qโ—p)), p, fโฉ.
-#p elim p -p
-[ //
-| * [ #n * [| #l ]] [|*: #p ] #IH #f #q
-  [ <lift_d_empty_sn <lift_d_empty_sn >lift_lcons_alt >lift_append_rcons_sn
-    <IH <IH -IH <list_append_rcons_sn //
-  | <lift_d_lcons_sn <lift_d_lcons_sn <IH -IH //
-  | <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
-    <IH <IH -IH <list_append_rcons_sn //
-  | <lift_S_sn <lift_S_sn >lift_lcons_alt >lift_append_rcons_sn
-    <IH <IH -IH <list_append_rcons_sn //
-  ]
+#p @(path_ind_lift โ€ฆ p) -p // [ #n #l #p |*: #p ] #IH #f #q
+[ <lift_d_lcons_sn <lift_d_lcons_sn <IH -IH //
+| <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
+  <IH <IH -IH <list_append_rcons_sn //
+| <lift_S_sn <lift_S_sn >lift_lcons_alt >lift_append_rcons_sn
+  <IH <IH -IH <list_append_rcons_sn //
 ]
 qed.
 
-lemma lift_lcons (f) (p) (l):
+lemma lift_path_lcons (f) (p) (l):
       lโ——โ†‘[f]p = โ†‘โจ(ฮปp. proj_path (lโ——p)), p, fโฉ.
 #f #p #l
->lift_lcons_alt <lift_append_sn //
+>lift_lcons_alt <lift_path_append_sn //
 qed.
+
+lemma lift_path_L_sn (f) (p):
+      ๐—Ÿโ——โ†‘[โซฏf]p = โ†‘[f](๐—Ÿโ——p).
+// qed.
+
+lemma lift_path_A_sn (f) (p):
+      ๐—”โ——โ†‘[f]p = โ†‘[f](๐—”โ——p).
+// qed.
+
+lemma lift_path_S_sn (f) (p):
+      ๐—ฆโ——โ†‘[f]p = โ†‘[f](๐—ฆโ——p).
+// qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_preterm.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_preterm.ma
new file mode 100644 (file)
index 0000000..f2c7841
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/syntax/preterm.ma".
+include "delayed_updating/substitution/lift.ma".
+
+(* LIFT FOR PRETERM ***********************************************************)
+
+definition lift_preterm (f) (t): preterm โ‰
+           ฮปp. โˆƒโˆƒr. r ฯต t & p = โ†‘[f]r.
+
+interpretation
+  "lift (preterm)"
+  'UpArrow f t = (lift_preterm f t).
index 50b35e6547b781421dbc8a40f0c4a59d740fcd7e..903026e4dfd7167948257aa023b5274cf44a8ec3 100644 (file)
@@ -21,78 +21,39 @@ include "delayed_updating/substitution/lift_eq.ma".
 
 lemma lift_d_empty_dx (n) (p) (f):
       (โŠ—p)โ—–๐—ฑโจ(โ†‘[pโ—–๐—ฑโจnโฉ]f)@โจnโฉโฉ = โ†‘[f](pโ—–๐—ฑโจnโฉ).
-#n #p elim p -p
-[| * [ #m * [| #l ]] [|*: #p ] #IH ] #f
-[ //
-| <list_cons_shift <list_cons_comm <list_cons_comm //
-| <lift_d_lcons_sn <lift_d_lcons_sn //
-| <lift_L_sn <lift_L_sn <lift_lcons <IH //
-| <lift_A_sn <lift_A_sn <lift_lcons <IH //
-| <lift_S_sn <lift_S_sn <lift_lcons <IH //
+#n #p @(path_ind_lift โ€ฆ p) -p // [ #m #l #p |*: #p ] #IH #f
+[ <lift_rmap_d_lcons_sn <lift_path_d_lcons_sn //
+| <lift_rmap_L_sn <lift_path_L_sn <IH //
+| <lift_rmap_A_sn <lift_path_A_sn <IH //
+| <lift_rmap_S_sn <lift_path_S_sn <IH //
 ]
 qed.
 
 lemma lift_L_dx (p) (f):
       (โŠ—p)โ—–๐—Ÿ = โ†‘[f](pโ—–๐—Ÿ).
-#p elim p -p
-[| * [ #m * [| #l ]] [|*: #p ] #IH ] #f
-[ //
-| //
-| <lift_d_lcons_sn //
-| <lift_L_sn <lift_lcons //
-| <lift_A_sn <lift_lcons //
-| <lift_S_sn <lift_lcons //
-]
+#p @(path_ind_lift โ€ฆ p) -p // #m #l #p #IH #f
+<lift_path_d_lcons_sn //
 qed.
 
 lemma lift_A_dx (p) (f):
       (โŠ—p)โ—–๐—” = โ†‘[f](pโ—–๐—”).
-#p elim p -p
-[| * [ #m * [| #l ]] [|*: #p ] #IH ] #f
-[ //
-| //
-| <lift_d_lcons_sn //
-| <lift_L_sn <lift_lcons //
-| <lift_A_sn <lift_lcons //
-| <lift_S_sn <lift_lcons //
-]
+#p @(path_ind_lift โ€ฆ p) -p // #m #l #p #IH #f
+<lift_path_d_lcons_sn //
 qed.
 
 lemma lift_S_dx (p) (f):
       (โŠ—p)โ—–๐—ฆ = โ†‘[f](pโ—–๐—ฆ).
-#p elim p -p
-[| * [ #m * [| #l ]] [|*: #p ] #IH ] #f
-[ //
-| //
-| <lift_d_lcons_sn //
-| <lift_L_sn <lift_lcons //
-| <lift_A_sn <lift_lcons //
-| <lift_S_sn <lift_lcons //
-]
+#p @(path_ind_lift โ€ฆ p) -p // #m #l #p #IH #f
+<lift_path_d_lcons_sn //
 qed.
 
 lemma structure_lift (p) (f):
       โŠ—p = โŠ—โ†‘[f]p.
-#p elim p -p
-[| * [ #m * [| #l ]] [|*: #p ] #IH ] #f
-[ //
-| //
-| //
-| <lift_L_sn <lift_lcons //
-| <lift_A_sn <lift_lcons //
-| <lift_S_sn <lift_lcons //
-]
+#p @(path_ind_lift โ€ฆ p) -p // #p #IH #f
+<lift_path_L_sn //
 qed.
 
 lemma lift_structure (p) (f):
       โŠ—p = โ†‘[f]โŠ—p.
-#p elim p -p
-[| * [ #m * [| #l ]] [|*: #p ] #IH ] #f
-[ //
-| //
-| //
-| <structure_L_sn <lift_L_sn <lift_lcons //
-| <structure_A_sn <lift_A_sn <lift_lcons //
-| <structure_S_sn <lift_S_sn <lift_lcons //
-]
+#p @(path_ind_lift โ€ฆ p) -p //
 qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/preterm_dephi.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/preterm_dephi.ma
deleted file mode 100644 (file)
index 60c5a4a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||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/syntax/path_dephi.ma".
-include "delayed_updating/syntax/preterm_constructors.ma".
-
-(* DEPHI FOR PRETERM ********************************************************)
-
-definition preterm_dephi (f) (t): preterm โ‰
-           ฮปp. โˆƒโˆƒq. q ฯต t & p = path_dephi f q.