From: Ferruccio Guidi Date: Sun, 4 Sep 2022 19:30:07 +0000 (+0200) Subject: update in delayd_updating X-Git-Tag: make_still_working~38 X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=commitdiff_plain;h=829e3a8af3229c4e625245f7265dd67939da98c4 update in delayd_updating + introduction of path_closed complete --- diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/unwind2_rmap_head.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/unwind2_rmap_head.etc new file mode 100644 index 000000000..416c6e792 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/unwind2_rmap_head.etc @@ -0,0 +1,134 @@ +(**************************************************************************) +(* ___ *) +(* ||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/unwind/unwind2_rmap_labels.ma". +include "delayed_updating/unwind/unwind2_rmap_eq.ma". +include "delayed_updating/syntax/path_head_depth.ma". +include "ground/relocation/xap.ma". +include "ground/lib/stream_eq_eq.ma". +include "ground/arith/nat_le_plus.ma". + +(* TAILED UNWIND FOR RELOCATION MAP *****************************************) + +(* Constructions with path_head *********************************************) + +lemma unwind2_rmap_head_xap_le_closed (f) (p) (q) (n) (m): + q = ↳[n]q → m ≤ n → + ▶[f](p●q)@❨m❩ = ▶[f]↳[n](p●q)@❨m❩. +#f #p #q elim q -q +[ #n #m #Hq + <(eq_inv_path_empty_head … Hq) -n #Hm + <(nle_inv_zero_dx … Hm) -m // +| #l #q #IH #n @(nat_ind_succ … n) -n + [ #m #_ #Hm <(nle_inv_zero_dx … Hm) -m -IH // + | #n #_ #m cases l [ #k ] + [ IH -IH tr_xap_ninj >(path_head_refl_append_sn p … Hh) in ⊢ (??%?); +>(unwind2_rmap_head_xap_closed … Hh) -Hh +nrplus_inj_dx >nrplus_inj_sn >nrplus_inj_sn structure_L_sn - >H1k in ⊢ (??%?); >path_head_structure_depth unwind2_rmap_A_dx - /2 width=1 by tls_unwind2_rmap_closed/ + [ lift_path_L_sn - <(lift_path_head_closed … H1k) in ⊢ (??%?); -H1k // -| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -H1k + /2 width=1 by lift_path_rmap_closed_L/ +| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -Hn list_append_rcons_sn in H1k; #H1k >lift_rmap_A_dx - /2 width=1 by tls_lift_rmap_closed/ + /2 width=1 by tls_succ_lift_rmap_append_L_closed_dx/ (* Note: crux of the proof ends *) ] qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma index b36038141..92512b342 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma @@ -15,19 +15,18 @@ include "delayed_updating/substitution/fsubst.ma". include "delayed_updating/substitution/lift_prototerm.ma". include "delayed_updating/syntax/prototerm_eq.ma". -include "delayed_updating/syntax/path_head.ma". +include "delayed_updating/syntax/path_closed.ma". include "delayed_updating/notation/relations/black_rightarrow_if_3.ma". include "ground/relocation/tr_uni.ma". include "ground/xoa/ex_4_3.ma". (* IMMEDIATE FOCUSED REDUCTION ************************************************) -(**) (* explicit ninj because we cannot declare the expectd type of k *) definition ifr (r): relation2 prototerm prototerm ≝ λt1,t2. - ∃∃p,q,k. p●𝗔◗𝗟◗q = r & - (𝗟◗q) = ↳[ninj k](𝗟◗q) & r◖𝗱k ϵ t1 & - t1[⋔r←↑[𝐮❨ninj k❩](t1⋔(p◖𝗦))] ⇔ t2 + ∃∃p,q,n. p●𝗔◗𝗟◗q = r & + q ϵ 𝐂❨n❩ & r◖𝗱↑n ϵ t1 & + t1[⋔r←↑[𝐮❨↑n❩](t1⋔(p◖𝗦))] ⇔ t2 . interpretation diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma index 7c4d11d73..1d8f5855a 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma @@ -17,8 +17,8 @@ include "delayed_updating/reduction/ifr.ma". include "delayed_updating/substitution/fsubst_lift.ma". include "delayed_updating/substitution/fsubst_eq.ma". include "delayed_updating/substitution/lift_prototerm_after.ma". -include "delayed_updating/substitution/lift_path_head.ma". -include "delayed_updating/substitution/lift_rmap_head.ma". +include "delayed_updating/substitution/lift_path_closed.ma". +include "delayed_updating/substitution/lift_rmap_closed.ma". include "ground/relocation/tr_uni_compose.ma". include "ground/relocation/tr_compose_eq.ma". @@ -30,13 +30,12 @@ include "ground/relocation/tr_compose_eq.ma". theorem ifr_lift_bi (f) (t1) (t2) (r): t1 ➡𝐢𝐟[r] t2 → ↑[f]t1 ➡𝐢𝐟[↑[f]r] ↑[f]t2. #f #t1 #t2 #r -* #p #q #k #Hr #H1k #Ht1 #Ht2 destruct -@(ex4_3_intro … (↑[f]p) (↑[↑[p◖𝗔◖𝗟]f]q) ((↑[p●𝗔◗𝗟◗q]f)@⧣❨k❩)) -[ -H1k -Ht1 -Ht2 // +* #p #q #n #Hr #Hn #Ht1 #Ht2 destruct +@(ex4_3_intro … (↑[f]p) (↑[↑[p◖𝗔◖𝗟]f]q) ((↑[p●𝗔◗𝗟◗q]f)@§❨n❩)) +[ -Hn -Ht1 -Ht2 // | -Ht1 -Ht2 - lift_path_L_sn - <(lift_path_head_closed … H1k) in ⊢ (??%?); -H1k // -| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -H1k + /2 width=1 by lift_path_rmap_closed_L/ +| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -Hn list_append_rcons_sn in H1k; #H1k >lift_rmap_A_dx - /2 width=1 by tls_lift_rmap_closed/ + @(stream_eq_trans … (tr_compose_uni_dx_pap …)) nsucc_unfold + /2 width=1 by tls_succ_lift_rmap_append_L_closed_dx/ (* Note: crux of the proof ends *) ] qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_unwind.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_unwind.ma index e8cc51826..077ff798e 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_unwind.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_unwind.ma @@ -17,12 +17,12 @@ include "delayed_updating/reduction/ifr.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/unwind/unwind2_rmap_closed.ma". include "delayed_updating/substitution/fsubst_eq.ma". include "delayed_updating/substitution/lift_prototerm_eq.ma". -include "delayed_updating/syntax/path_head_structure.ma". +include "delayed_updating/syntax/path_closed_structure.ma". include "delayed_updating/syntax/path_structure_depth.ma". (* IMMEDIATE FOCUSED REDUCTION **********************************************) @@ -33,17 +33,14 @@ lemma ifr_unwind_bi (f) (t1) (t2) (r): t1 ϵ 𝐓 → r ϵ 𝐈 → t1 ➡𝐢𝐟[r] t2 → ▼[f]t1 ➡𝐢𝐟[⊗r] ▼[f]t2. #f #t1 #t2 #r #H1t1 #H2r -* #p #q #k #Hr #H1k #Ht1 #Ht2 destruct -@(ex4_3_intro … (⊗p) (⊗q) (↑♭q)) -[ -H1t1 -H2r -H1k -Ht1 -Ht2 // +* #p #q #n #Hr #Hn #Ht1 #Ht2 destruct +@(ex4_3_intro … (⊗p) (⊗q) (♭q)) +[ -H1t1 -H2r -Hn -Ht1 -Ht2 // | -H1t1 -H2r -Ht1 -Ht2 - >structure_L_sn - >H1k in ⊢ (??%?); >path_head_structure_depth unwind2_rmap_A_dx - /2 width=1 by tls_unwind2_rmap_closed/ + [ tr_pap_succ_nap // qed. lemma lift_term_iref_uni (t) (n) (k): (𝛕(k+n).t) ⇔ ↑[𝐮❨n❩](𝛕k.t). #t #n #k -@(subset_eq_trans … (lift_term_iref …)) +@(subset_eq_trans … (lift_term_iref_pap …)) nsucc_pnpred lift_rmap_L_dx #Hq1 +elim (pcc_inv_L_sn … Hq1 Hq0) -Hq1 #H0 #_ +H0 -H0 nrplus_inj_dx >nrplus_inj_sn >nsucc_unfold // +| 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 deleted file mode 100644 index 416c6e792..000000000 --- a/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_head.ma +++ /dev/null @@ -1,134 +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/unwind/unwind2_rmap_labels.ma". -include "delayed_updating/unwind/unwind2_rmap_eq.ma". -include "delayed_updating/syntax/path_head_depth.ma". -include "ground/relocation/xap.ma". -include "ground/lib/stream_eq_eq.ma". -include "ground/arith/nat_le_plus.ma". - -(* TAILED UNWIND FOR RELOCATION MAP *****************************************) - -(* Constructions with path_head *********************************************) - -lemma unwind2_rmap_head_xap_le_closed (f) (p) (q) (n) (m): - q = ↳[n]q → m ≤ n → - ▶[f](p●q)@❨m❩ = ▶[f]↳[n](p●q)@❨m❩. -#f #p #q elim q -q -[ #n #m #Hq - <(eq_inv_path_empty_head … Hq) -n #Hm - <(nle_inv_zero_dx … Hm) -m // -| #l #q #IH #n @(nat_ind_succ … n) -n - [ #m #_ #Hm <(nle_inv_zero_dx … Hm) -m -IH // - | #n #_ #m cases l [ #k ] - [ IH -IH tr_xap_ninj >(path_head_refl_append_sn p … Hh) in ⊢ (??%?); ->(unwind2_rmap_head_xap_closed … Hh) -Hh -nrplus_inj_dx >nrplus_inj_sn >nrplus_inj_sn