From cfd201c62dd9b854bfb4ada648d3e556b29fac3a Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Tue, 18 Jan 2022 22:46:48 +0100 Subject: [PATCH] update in delayed_updating + commutation of lift and fsubst + preterms renamed as prototerms --- .../notation/relations/predicate_t_hook_1.ma | 19 +++ .../delayed_updating/reduction/dfr.ma | 9 +- .../delayed_updating/reduction/dfr_ifr.ma | 9 +- .../delayed_updating/reduction/ifr.ma | 6 +- .../delayed_updating/substitution/fsubst.ma | 9 +- .../substitution/fsubst_lift.ma | 56 +++++++++ .../delayed_updating/substitution/lift.ma | 44 ++++--- .../delayed_updating/substitution/lift_eq.ma | 18 +-- .../{lift_preterm.ma => lift_prototerm.ma} | 12 +- .../substitution/lift_structure.ma | 116 +++++++++++++++++- .../delayed_updating/syntax/bdd_term.ma | 34 ++--- .../delayed_updating/syntax/path.ma | 1 + .../delayed_updating/syntax/preterm.ma | 38 +++--- .../delayed_updating/syntax/prototerm.ma | 44 +++++++ ...structors.ma => prototerm_constructors.ma} | 34 ++--- ...quivalence.ma => prototerm_equivalence.ma} | 12 +- .../syntax/prototerm_proper.ma | 35 ++++++ 17 files changed, 376 insertions(+), 120 deletions(-) create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/predicate_t_hook_1.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_lift.ma rename matita/matita/contribs/lambdadelta/delayed_updating/substitution/{lift_preterm.ma => lift_prototerm.ma} (79%) create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/syntax/prototerm.ma rename matita/matita/contribs/lambdadelta/delayed_updating/syntax/{preterm_constructors.ma => prototerm_constructors.ma} (73%) rename matita/matita/contribs/lambdadelta/delayed_updating/syntax/{preterm_equivalence.ma => prototerm_equivalence.ma} (81%) create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/syntax/prototerm_proper.ma 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 new file mode 100644 index 000000000..34af172fb --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/predicate_t_hook_1.ma @@ -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( Ƭ term 70 x )" + non associative with precedence 45 + for @{ 'PredicateTHook $x }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma index 3dca53142..ed077ae2c 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma @@ -15,17 +15,18 @@ 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/substitution/fsubst.ma". include "delayed_updating/notation/relations/black_rightarrow_df_4.ma". (* DELAYED FOCUSED REDUCTION ************************************************) -inductive dfr (p) (q) (t): predicate preterm ≝ +inductive dfr (p) (q) (t): predicate prototerm ≝ | dfr_beta (b): - let r ≝ p●𝗔◗b●𝗟◗q◖𝗱(↑❘q❘) in - r ϵ t → ⊓(⊗b) → dfr p q t (t[⋔r←t⋔(p◖𝗦)]) + let r ≝ p●𝗔◗b●𝗟◗q in + r◖𝗱(↑❘q❘) ϵ t → ⊓(⊗b) → dfr p q t (t[⋔r←𝛗(↑❘q❘).t⋔(p◖𝗦)]) . interpretation - "focused balanced reduction with delayed updating (preterm)" + "focused balanced reduction with delayed updating (prototerm)" '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 index 015958b54..9a713d1e5 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma @@ -12,12 +12,13 @@ (* *) (**************************************************************************) -include "delayed_updating/reduction/ifr.ma". include "delayed_updating/reduction/dfr.ma". +include "delayed_updating/reduction/ifr.ma". +include "delayed_updating/substitution/fsubst_lift.ma". (* DELAYED FOCUSED REDUCTION ************************************************) -lemma dfr_lift_bi (f) (p) (q) (t1) (t2): +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 -* #b #Hr #Hb +#f #p #q #t1 #t2 #Ht1 +* -t2 #b #Hr #Hb diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma index 746def177..d087bdbb7 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma @@ -16,17 +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/substitution/fsubst.ma". -include "delayed_updating/substitution/lift_preterm.ma". +include "delayed_updating/substitution/lift_prototerm.ma". include "delayed_updating/notation/relations/black_rightarrow_f_4.ma". (* IMMEDIATE FOCUSED REDUCTION ************************************************) -inductive ifr (p) (q) (t): predicate preterm ≝ +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◖𝗦)]) . interpretation - "focused balanced reduction with immediate updating (preterm)" + "focused balanced reduction with immediate updating (prototerm)" 'BlackRightArrowF t1 p q t2 = (ifr p q t1 t2). diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst.ma index 53f18be31..adbc16c04 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst.ma @@ -12,18 +12,17 @@ (* *) (**************************************************************************) -include "ground/xoa/ex_3_1.ma". -include "delayed_updating/syntax/preterm.ma". +include "delayed_updating/syntax/prototerm.ma". include "delayed_updating/notation/functions/pitchforkleftarrow_3.ma". (* FOCALIZED SUBSTITUTION ***************************************************) -definition fsubst (p) (u): preterm → preterm ≝ +definition fsubst (p) (u): prototerm → prototerm ≝ λt,q. - ∨∨ ∃∃r. r ϵ u & p ϵ ▵t & p●r = q + ∨∨ ∃∃r. r ϵ u & p●r = q | ∧∧ q ϵ t & (∀r. p●r = q → ⊥) . interpretation - "focalized substitution (preterm)" + "focalized substitution (prototerm)" 'PitchforkLeftArrow t p u = (fsubst p u t). diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_lift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_lift.ma new file mode 100644 index 000000000..c9d656028 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_lift.ma @@ -0,0 +1,56 @@ +(**************************************************************************) +(* ___ *) +(* ||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/substitution/lift_prototerm.ma". +include "delayed_updating/substitution/lift_structure.ma". +include "delayed_updating/syntax/preterm.ma". +include "delayed_updating/syntax/prototerm_proper.ma". + +(* FOCALIZED SUBSTITUTION ***************************************************) + +lemma lift_fsubst_sn (f) (t) (u) (p): Ꝕu → p ⧸ϵ t → + (↑[f]t)[⋔(⊗p)←↑[↑[p]f]u] ⊆ ↑[f](t[⋔p←u]). +#f #t #u #p #Hu #Hp #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_lcons_alt >lift_append_rcons_sn @@ -65,19 +65,19 @@ lemma lift_path_append_sn (p) (f) (q): qed. lemma lift_path_lcons (f) (p) (l): - l◗↑[f]p = ↑❨(λp. proj_path (l◗p)), p, f❩. + l◗↑[f]p = ↑❨(λg,p. proj_path g (l◗p)), f, p❩. #f #p #l >lift_lcons_alt