From ad6182251b8192ee7d25c53156afbce35e3715b6 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Tue, 24 May 2022 00:39:34 +0200 Subject: [PATCH] update in delayed_updating + crux of the main proof completed + notation for path_reverse fixed --- .../notation/functions/nec_r_1.ma | 2 +- .../delayed_updating/reduction/dfr.ma | 15 +- .../delayed_updating/reduction/dfr_ifr.ma | 144 ++++++------------ .../delayed_updating/reduction/ifr.ma | 15 +- .../substitution/fsubst_eq.ma | 6 +- .../syntax/path_depth_reverse.ma | 32 ++++ .../syntax/path_head_structure.ma | 37 +++++ .../delayed_updating/syntax/path_labels.ma | 8 + .../delayed_updating/syntax/path_reverse.ma | 9 ++ .../syntax/path_structure_reverse.ma | 29 ++++ .../unwind/unwind2_path_eq.ma | 1 - .../unwind/unwind2_path_lift.ma | 1 - .../unwind/unwind2_path_structure.ma | 3 - .../unwind/unwind2_rmap_eq.ma | 9 ++ .../unwind/unwind2_rmap_head.ma | 73 +++++++-- 15 files changed, 247 insertions(+), 137 deletions(-) create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_depth_reverse.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head_structure.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_structure_reverse.ma diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/nec_r_1.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/nec_r_1.ma index ec39b28d9..79df117c7 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/nec_r_1.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/nec_r_1.ma @@ -15,5 +15,5 @@ (* NOTATION FOR DELAYED UPDATING ********************************************) notation "hvbox( p ᴿ )" - non associative with precedence 70 + non associative with precedence 71 for @{ 'NEcR $p }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma index b7f900b6c..7ae112491 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma @@ -12,24 +12,21 @@ (* *) (**************************************************************************) -include "delayed_updating/unwind1/unwind.ma". include "delayed_updating/substitution/fsubst.ma". include "delayed_updating/syntax/prototerm_constructors.ma". include "delayed_updating/syntax/prototerm_equivalence.ma". -include "delayed_updating/syntax/path_structure.ma". -include "delayed_updating/syntax/path_balanced.ma". +include "delayed_updating/syntax/path_head.ma". include "delayed_updating/syntax/path_depth.ma". +include "delayed_updating/syntax/path_reverse.ma". include "delayed_updating/notation/relations/black_rightarrow_df_4.ma". -include "ground/xoa/ex_1_2.ma". -include "ground/xoa/and_4.ma". (* DELAYED FOCUSED REDUCTION ************************************************) definition dfr (p) (q): relation2 prototerm prototerm ≝ - λt1,t2. ∃∃b,n. - let r ≝ p●𝗔◗b●𝗟◗q in - ∧∧ (⊗b ϵ 𝐁 ∧ 𝟎 = ♭b) & ↑♭q = (▼[r]𝐢)@⧣❨n❩ & r◖𝗱n ϵ t1 & - t1[⋔r←𝛗(n+♭b).(t1⋔(p◖𝗦))] ⇔ t2 + λt1,t2. ∃n:pnat. + let r ≝ p●𝗔◗𝗟◗q in + ∧∧ (𝗟◗q)ᴿ = ↳[n](rᴿ) & r◖𝗱n ϵ t1 & + t1[⋔r←𝛗n.(t1⋔(p◖𝗦))] ⇔ t2 . interpretation 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 29c44898d..b4ccad9d3 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma @@ -15,119 +15,63 @@ include "delayed_updating/reduction/dfr.ma". include "delayed_updating/reduction/ifr.ma". -include "delayed_updating/unwind1/unwind_fsubst.ma". -include "delayed_updating/unwind1/unwind_constructors.ma". -include "delayed_updating/unwind1/unwind_preterm_eq.ma". -include "delayed_updating/unwind1/unwind_structure_depth.ma". -include "delayed_updating/unwind1/unwind_depth.ma". +include "delayed_updating/unwind/unwind2_constructors.ma". +include "delayed_updating/unwind/unwind2_preterm_fsubst.ma". +include "delayed_updating/unwind/unwind2_preterm_eq.ma". +include "delayed_updating/unwind/unwind2_prototerm_lift.ma". +include "delayed_updating/unwind/unwind2_rmap_head.ma". include "delayed_updating/substitution/fsubst_eq.ma". include "delayed_updating/substitution/lift_prototerm_eq.ma". + include "delayed_updating/syntax/prototerm_proper_constructors.ma". +include "delayed_updating/syntax/path_head_structure.ma". include "delayed_updating/syntax/path_structure_depth.ma". -include "ground/relocation/tr_uni_compose.ma". -include "ground/relocation/tr_pap_pushs.ma". +include "delayed_updating/syntax/path_structure_reverse.ma". +include "delayed_updating/syntax/path_depth_reverse.ma". (* DELAYED FOCUSED REDUCTION ************************************************) -(* COMMENT -axiom pippo (b) (q) (n): - ↑❘q❘ = (↑[q]𝐢)@⧣❨n❩ → - ↑❘q❘+❘b❘= (↑[b●𝗟◗q]𝐢)@⧣❨n+❘b❘❩. - -lemma unwind_rmap_tls_eq_id (p) (n): - ❘p❘ = ↑[p]𝐢@⧣❨n❩ → - (𝐢) ≗ ⇂*[n]↑[p]𝐢. -#p @(list_ind_rcons … p) -p -[ #n list_append_rcons_sn nsucc_unfold >depth_reverse >depth_L_dx >reverse_lcons + >structure_L_sn >structure_reverse + list_append_rcons_sn in H1n; Hn + @(subset_eq_trans … (unwind2_term_fsubst …)) + [ @fsubst_eq_repl [ // | // ] + @(subset_eq_trans … (unwind2_term_iref …)) @(subset_eq_canc_sn … (lift_term_eq_repl_dx …)) - [ @unwind_grafted_S /2 width=2 by ex_intro/ | skip ] - tr_id_unfold #Hn - lapply (pippo … b … Hn) -Hn #Hn - @tr_compose_eq_repl - [ list_append_rcons_sn in H1n; nrplus_inj_dx in ⊢ (???%); nrplus_inj_dx +/2 width=1 by tr_tls_compose_uni_dx/ +qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_head.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_head.ma index 6b159e8c5..b7fc5664c 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_head.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_head.ma @@ -13,55 +13,63 @@ (**************************************************************************) include "delayed_updating/unwind/unwind2_rmap_labels.ma". +include "delayed_updating/unwind/unwind2_rmap_eq.ma". include "delayed_updating/unwind/xap.ma". include "delayed_updating/syntax/path_head_depth.ma". +include "ground/lib/stream_eq_eq.ma". include "ground/arith/nat_le_plus.ma". (* UNWIND MAP FOR PATH ******************************************************) (* Constructions with path_head *********************************************) -lemma unwind2_rmap_head_xap_closed (f) (p) (n) (k): - (∃q. p = (↳[n]p)●q) → k ≤ n → +lemma unwind2_rmap_head_xap_le_closed (f) (p) (q) (n) (k): + p = (↳[n]p)●q → k ≤ n → (▶[f]p)@❨k❩ = (▶[f]↳[n]p)@❨k❩. #f #p elim p -p -[ #n #k * #q #Hq #Hk +[ #q #n #k #Hq #Hk elim (eq_inv_list_empty_append … Hq) -Hq * #_ // -| #l #p #IH #n @(nat_ind_succ … n) -n +| #l #p #IH #q #n @(nat_ind_succ … n) -n [ #k #_ #Hk <(nle_inv_zero_dx … Hk) -k -IH tr_xap_ninj >Hn in ⊢ (??%?); +>(unwind2_rmap_head_append_xap_closed … Hn) -Hn // +qed. + +lemma tls_unwind2_rmap_plus_closed (f) (p) (q) (n) (k): + p = (↳[n]p)●q → + ⇂*[k]▶[f]q ≗ ⇂*[n+k]▶[f]p. +#f #p elim p -p +[ #q #n #k #Hq + elim (eq_inv_list_empty_append … Hq) -Hq #Hn #H0 destruct + nrplus_inj_dx >nrplus_inj_sn >nrplus_inj_sn