From 513c4a61f11ce03888a8a0f9d8e513de6e3a7c8b Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Sun, 13 Nov 2022 23:34:18 +0100 Subject: [PATCH] update in delayed_updating MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit + example of unprotected balanced β-reduction started + some corrections and additions --- .../etc/prototerm_constructors.etc | 43 +++++++ .../delayed_updating/reduction/dbfr_ibfr.ma | 2 +- .../delayed_updating/reduction/dbfr_lift.ma | 2 +- .../reduction/dbfr_unprotected.ma | 42 +++++++ .../delayed_updating/reduction/ibfr.ma | 9 ++ .../reduction/ibfr_constructors.ma | 79 +++++++++++++ .../substitution/fsubst_constructors.ma | 105 ++++++++++++++++++ .../substitution/fsubst_eq.ma | 9 ++ ...tors.ma => lift_prototerm_constructors.ma} | 36 +++++- .../delayed_updating/syntax/prototerm.ma | 8 +- .../syntax/prototerm_constructors.ma | 90 ++++++++------- .../syntax/prototerm_constructors_eq.ma | 39 +++++++ .../delayed_updating/syntax/prototerm_eq.ma | 7 ++ ...s.ma => unwind2_prototerm_constructors.ma} | 4 +- .../unwind/unwind2_rmap_unprotected.ma | 18 +-- 15 files changed, 437 insertions(+), 56 deletions(-) create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/etc/prototerm_constructors.etc create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_unprotected.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr_constructors.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_constructors.ma rename matita/matita/contribs/lambdadelta/delayed_updating/substitution/{lift_constructors.ma => lift_prototerm_constructors.ma} (67%) rename matita/matita/contribs/lambdadelta/delayed_updating/unwind/{unwind2_constructors.ma => unwind2_prototerm_constructors.ma} (95%) diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/prototerm_constructors.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/prototerm_constructors.etc new file mode 100644 index 000000000..a3e29bd4e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/etc/prototerm_constructors.etc @@ -0,0 +1,43 @@ +(* COMMENT +lemma prototerm_in_root_inv_lcons_oref: + ∀p,l,n. l◗p ϵ ▵#n → + ∧∧ 𝗱n = l & 𝐞 = p. +#p #l #n * #q +list_cons_shift @(subset_eq_canc_sn … (grafted_abst_hd … )) // +] +qed. + +lemma ibfr_appl_hd (v) (t1) (t2) (r): + t1 ➡𝐢𝐛𝐟[r] t2 → @v.t1 ➡𝐢𝐛𝐟[𝗔◗r] @v.t2. +#v #t1 #t2 #r * +#p #b #q #m #n #Hr #Hb #Hm #Hn #Ht1 #Ht2 destruct +@(ex6_5_intro … (𝗔◗p) … Hb Hm Hn) -Hb -Hm -Hn +[ -Ht2 // +| -Ht2 /2 width=1 by in_comp_appl_hd/ +| @(subset_eq_trans … (appl_eq_repl … Ht2)) -Ht1 -Ht2 [|*: // ] + @(subset_eq_canc_sn … (fsubst_appl_hd …)) @appl_eq_repl [ // ] + @fsubst_eq_repl // @lift_term_eq_repl_dx + >list_cons_shift @(subset_eq_canc_sn … (grafted_appl_hd … )) // +] +qed. + +lemma ibfr_appl_sd (v1) (v2) (t) (r): + v1 ➡𝐢𝐛𝐟[r] v2 → @v1.t ➡𝐢𝐛𝐟[𝗦◗r] @v2.t. +#v1 #v2 #t #r * +#p #b #q #m #n #Hr #Hb #Hm #Hn #Hv1 #Hv2 destruct +@(ex6_5_intro … (𝗦◗p) … Hb Hm Hn) -Hb -Hm -Hn +[ -Hv2 // +| -Hv2 /2 width=1 by in_comp_appl_sd/ +| @(subset_eq_trans ????? (appl_eq_repl …)) [3: @Hv2 |2,4: // |5: skip ] + @(subset_eq_canc_sn … (fsubst_appl_sd …)) @appl_eq_repl [| // ] + @fsubst_eq_repl // @lift_term_eq_repl_dx + >list_cons_shift @(subset_eq_canc_sn … (grafted_appl_sd … )) // +] +qed. + +lemma ibfr_beta_0 (v) (t) (q) (n): + q ϵ 𝐂❨Ⓕ,n❩ → q◖𝗱↑n ϵ t → + @v.𝛌.t ➡𝐢𝐛𝐟[𝗔◗𝗟◗q] @v.𝛌.(t[⋔q←🠡[𝐮❨↑n❩]v]). +#v #t #q #n #Hn #Ht +@(ex6_5_intro … (𝐞) (𝐞) q (𝟎) … Hn) -Hn // +[ /3 width=1 by in_comp_appl_hd, in_comp_abst_hd/ +| @(subset_eq_canc_sn … (fsubst_appl_hd …)) @appl_eq_repl [ // ] + @(subset_eq_canc_sn … (fsubst_abst_hd …)) @abst_eq_repl + @fsubst_eq_repl // list_cons_comm @(subset_eq_canc_sn … (grafted_appl_sd … )) + @(subset_eq_canc_sn … (grafted_empty_dx … )) // +] +qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_constructors.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_constructors.ma new file mode 100644 index 000000000..7d69778c0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_constructors.ma @@ -0,0 +1,105 @@ +(**************************************************************************) +(* ___ *) +(* ||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_constructors.ma". +include "ground/lib/subset_equivalence.ma". + +(* FOCALIZED SUBSTITUTION ***************************************************) + +(* Constructions with constructors for prototerm ****************************) + +lemma fsubst_abst_hd (t) (u) (p): + 𝛌.(t[⋔p←u]) ⇔ (𝛌.t)[⋔𝗟◗p←u]. +#t #u #p @conj #r +[ #Hr + elim (in_comp_inv_abst … Hr) -Hr #s #H0 * * + [ #q #Hq #H1 destruct + /3 width=3 by ex2_intro, or_introl/ + | #H1s #H2s destruct + @or_intror @conj + [ /2 width=1 by in_comp_abst_hd/ ] + #s0 nsucc_pnpred