]> matita.cs.unibo.it Git - helm.git/commitdiff
update in delayed_updating
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Thu, 20 Jan 2022 19:48:22 +0000 (20:48 +0100)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Thu, 20 Jan 2022 19:48:22 +0000 (20:48 +0100)
+ a premise removed from lift_fsubst_sn
+ dfr and ifr restated to take equiprovability into account
+ notatation update for preterms

matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_t_0.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/predicate_t_hook_1.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma
matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma
matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_lift.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_prototerm.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_structure.ma
matita/matita/contribs/lambdadelta/delayed_updating/syntax/preterm.ma

diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_t_0.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_t_0.ma
new file mode 100644 (file)
index 0000000..182544b
--- /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( ๐“ )"
+  non associative with precedence 70
+  for @{ 'ClassT }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/predicate_t_hook_1.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/predicate_t_hook_1.ma
deleted file mode 100644 (file)
index 34af172..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( ฦฌ term 70 x )"
-  non associative with precedence 45
-  for @{ 'PredicateTHook $x }.
index ed077ae2cc772df22b7227dab1750ace5c243afd..5b5036593713ac1c84f09b2b7b6649f3aebd834a 100644 (file)
@@ -16,15 +16,17 @@ include "delayed_updating/syntax/path_depth.ma".
 include "delayed_updating/syntax/path_structure.ma".
 include "delayed_updating/syntax/path_balanced.ma".
 include "delayed_updating/syntax/prototerm_constructors.ma".
+include "delayed_updating/syntax/prototerm_equivalence.ma".
 include "delayed_updating/substitution/fsubst.ma".
 include "delayed_updating/notation/relations/black_rightarrow_df_4.ma".
 
 (* DELAYED FOCUSED REDUCTION ************************************************)
 
-inductive dfr (p) (q) (t): predicate prototerm โ‰
-| dfr_beta (b):
-  let r โ‰ pโ—๐—”โ——bโ—๐—Ÿโ——q in
-  rโ—–๐—ฑ(โ†‘โ˜qโ˜) ฯต t โ†’ โŠ“(โŠ—b) โ†’ dfr p q t (t[โ‹”rโ†๐›—(โ†‘โ˜qโ˜).tโ‹”(pโ—–๐—ฆ)])
+definition dfr (p) (q): relation2 prototerm prototerm โ‰
+           ฮปt1,t2. โˆƒb.
+           let r โ‰ pโ—๐—”โ——bโ—๐—Ÿโ——q in
+           โˆงโˆง โŠ“(โŠ—b) & rโ—–๐—ฑ(โ†‘โ˜qโ˜) ฯต t1 &
+              t2 โ‡” t1[โ‹”rโ†๐›—(โ†‘โ˜qโ˜).t1โ‹”(pโ—–๐—ฆ)]
 .
 
 interpretation
index 9a713d1e550c477a26fe535146c414c8a7232c2c..5d6c3cfefaf59bf5db8ea16fa83c8c821095b3e4 100644 (file)
@@ -18,7 +18,15 @@ include "delayed_updating/substitution/fsubst_lift.ma".
 
 (* DELAYED FOCUSED REDUCTION ************************************************)
 
-lemma dfr_lift_bi (f) (p) (q) (t1) (t2): ฦฌt1 โ†’
+lemma dfr_lift_bi (f) (p) (q) (t1) (t2): t1 ฯต ๐“ โ†’
       t1 โžก๐๐Ÿ[p,q] t2 โ†’ โ†‘[f]t1 โžก๐Ÿ[โŠ—p,โŠ—q] โ†‘[f]t2.
-#f #p #q #t1 #t2 #Ht1
-* -t2 #b #Hr #Hb
+#f #p #q #t1 #t2 #H0t1
+* #b * #Hb #Ht1 #Ht2
+@(ex_intro โ€ฆ (โŠ—b)) @and3_intro
+[ //
+| lapply (in_comp_lift_bi f โ€ฆ Ht1) -Ht1 #Ht1 
+
+
+
+
+
index d087bdbb736fd4aea41de56ae86ef8e249a5f1cd..582f6ed5761ff450a54d34d6b113c5c07e9aaaa1 100644 (file)
@@ -21,10 +21,11 @@ include "delayed_updating/notation/relations/black_rightarrow_f_4.ma".
 
 (* IMMEDIATE FOCUSED REDUCTION ************************************************)
 
-inductive ifr (p) (q) (t): predicate prototerm โ‰
-| ifr_beta (b):
-  let r โ‰ pโ—๐—”โ——bโ—๐—Ÿโ——q in
-  rโ—–๐—ฑ(โ†‘โ˜qโ˜) ฯต t โ†’ โŠ“(โŠ—b) โ†’ ifr p q t (t[โ‹”rโ†โ†‘[๐ฎโจโ†‘โ˜qโ˜โฉ]tโ‹”(pโ—–๐—ฆ)])
+definition ifr (p) (q): relation2 prototerm prototerm โ‰
+           ฮปt1,t2. โˆƒb.
+           let r โ‰ pโ—๐—”โ——bโ—๐—Ÿโ——q in
+           โˆงโˆง โŠ“(โŠ—b) & rโ—–๐—ฑ(โ†‘โ˜qโ˜) ฯต t1 &
+              t2 โ‡” t1[โ‹”rโ†โ†‘[๐ฎโจโ†‘โ˜qโ˜โฉ]t1โ‹”(pโ—–๐—ฆ)]
 .
 
 interpretation
index c9d6560286a32f854e2577852c8a4b6e261e9811..08ff3ebb3af1d19d8a5e47511a1aead4143fec2e 100644 (file)
@@ -20,20 +20,23 @@ include "delayed_updating/syntax/prototerm_proper.ma".
 
 (* FOCALIZED SUBSTITUTION ***************************************************)
 
-lemma lift_fsubst_sn (f) (t) (u) (p): ๊”u โ†’ p โงธฯต t โ†’
+lemma lift_fsubst_sn (f) (t) (u) (p): ๊”u โ†’
       (โ†‘[f]t)[โ‹”(โŠ—p)โ†โ†‘[โ†‘[p]f]u] โŠ† โ†‘[f](t[โ‹”pโ†u]).
-#f #t #u #p #Hu #Hp #ql * *
+#f #t #u #p #Hu #ql * *
 [ #rl * #r #Hr #H1 #H2 destruct
   >lift_append_proper_dx
   /4 width=1 by subset_in_ext_f1_dx, or_introl/
 | * #q #Hq #H1 #H0
-  @(ex2_intro โ€ฆ H1) @or_intror @conj //
-  #r #H2 destruct
-  @H0 -H0 [| <lift_append_proper_dx /2 width=1 by/ ]
+  @(ex2_intro โ€ฆ H1) @or_intror @conj // *
+  [ <list_append_empty_dx #H2 destruct
+    elim (lift_root f q) #r #_ #Hr /2 width=2 by/
+  | #l #r #H2 destruct
+    @H0 -H0 [| <lift_append_proper_dx /2 width=3 by ppc_lcons/ ]
+  ]
 ]
 qed-.
 
-lemma lift_fsubst_dx (f) (t) (u) (p): ๊”u โ†’ p ฯต โ–ตt โ†’ structure_injective t โ†’
+lemma lift_fsubst_dx (f) (t) (u) (p): ๊”u โ†’ p ฯต โ–ตt โ†’ t ฯต ๐“ โ†’
       โ†‘[f](t[โ‹”pโ†u]) โŠ† (โ†‘[f]t)[โ‹”(โŠ—p)โ†โ†‘[โ†‘[p]f]u].
 #f #t #u #p #Hu #H1p #H2p #ql * #q * *
 [ #r #Hu #H1 #H2 destruct
@@ -51,6 +54,6 @@ lemma lift_fsubst_dx (f) (t) (u) (p): ๊”u โ†’ p ฯต โ–ตt โ†’ structure_injective
 ]
 qed-.
 
-lemma lift_fsubst (f) (t) (u) (p): ๊”u โ†’ p โงธฯต t โ†’ p ฯต โ–ตt โ†’ structure_injective t โ†’
+lemma lift_fsubst (f) (t) (u) (p): ๊”u โ†’ p ฯต โ–ตt โ†’ t ฯต ๐“ โ†’
       (โ†‘[f]t)[โ‹”(โŠ—p)โ†โ†‘[โ†‘[p]f]u] โ‡” โ†‘[f](t[โ‹”pโ†u]).
 /4 width=3 by lift_fsubst_sn, conj, lift_fsubst_dx/ qed.
index 708e8a82cbb9f09aa0d82d42644399cea8d43939..9193260452841583ff83da63e3f76f9c72a68ff5 100644 (file)
@@ -21,3 +21,9 @@ include "ground/lib/subset_ext_equivalence.ma".
 interpretation
   "lift (prototerm)"
   'UpArrow f t = (subset_ext_f1 ? ? (lift_gen ? proj_path f) t).
+
+(* Basic constructions ******************************************************)
+
+lemma in_comp_lift_bi (f) (p) (t):
+      p ฯต t โ†’ โ†‘[f]p ฯต โ†‘[f]t.
+/2 width=1 by subset_in_ext_f1_dx/ qed.
index 5cc0f1f48dd2769fdda4bf6a55442f76ab1bef89..4db66c0648f69ee5e9b1f6082df56c699d65a0f8 100644 (file)
@@ -75,11 +75,19 @@ lemma lift_S_dx (p) (f):
 #p #f <lift_append_proper_dx //
 qed.
 
+lemma lift_root (f) (p):
+      โˆƒโˆƒr. ๐ž = โŠ—r & โŠ—pโ—r = โ†‘[f]p.
+#f #p @(list_ind_rcons โ€ฆ p) -p
+[ /2 width=3 by ex2_intro/
+| #p * [ #n ] /2 width=3 by ex2_intro/
+]
+qed-.
+
 (* Advanced inversions with proj_path ***************************************)
 
 lemma lift_path_inv_d_sn (k) (q) (p) (f):
       (๐—ฑkโ——q) = โ†‘[f]p โ†’
-      โˆƒโˆƒr,h. ๐ž = โŠ—r & (โ†‘[r]f)@โจhโฉ = k & ๐ž  = q & rโ—–๐—ฑh = p.
+      โˆƒโˆƒr,h. ๐ž = โŠ—r & (โ†‘[r]f)@โจhโฉ = k & ๐ž = q & rโ—–๐—ฑh = p.
 #k #q #p @(path_ind_lift โ€ฆ p) -p
 [| #n | #n #l #p |*: #p ] [|*: #IH ] #f
 [ <lift_path_empty #H destruct
index 9da0aa838e6f1a9b018063deb566c83d615aa80f..b7b90a4cf8f40e455866f8dd4c281c4252fbe935 100644 (file)
 
 include "delayed_updating/syntax/prototerm.ma".
 include "delayed_updating/syntax/path_structure.ma".
-include "delayed_updating/notation/relations/predicate_t_hook_1.ma".
+include "delayed_updating/notation/functions/class_t_0.ma".
 
 (* PRETERM ******************************************************************)
 
+(* Note: a preterm is a prototerm satislying the condition below *)
 (* Note: different root paths have different structure *)
 definition structure_injective: predicate prototerm โ‰
            ฮปt. โˆ€p1,p2. p1 ฯต โ–ตt โ†’ p2 ฯต โ–ตt โ†’ โŠ—p1 = โŠ—p2 โ†’ p1 = p2
 .
 
-(* Note: a preterm is a prototerm satislying the conditions above *)
-record is_preterm (t): Prop โ‰
-{
-  is_pt_injective: structure_injective t
-}.
-
 interpretation
-  "preterm condition (prototerm)"
-  'PredicateTHook t = (is_preterm t).
+  "preterm (prototerm)"
+  'ClassT = (structure_injective).