From 5275f55f5ec528edbb223834f3ec2cf1d3ce9b84 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Fri, 8 Apr 2016 20:49:11 +0000 Subject: [PATCH] - commit of the "s_computation" component ... - additions in ground_2/relocation - milestonee added in basic_2 - minor corrections --- .../lambdadelta/basic_2/computation/cpre.ma | 4 +- .../lambdadelta/basic_2/computation/cprs.ma | 4 +- .../basic_2/computation/cprs_cprs.ma | 6 +- .../lambdadelta/basic_2/computation/cpxe.ma | 10 +- .../lambdadelta/basic_2/computation/cpxs.ma | 140 +++++++++--------- .../basic_2/computation/cpxs_aaa.ma | 6 +- .../basic_2/computation/cpxs_cpxs.ma | 120 +++++++-------- .../basic_2/computation/cpxs_lift.ma | 60 ++++---- .../basic_2/computation/cpxs_lleq.ma | 16 +- .../basic_2/computation/cpxs_lreq.ma | 2 +- .../basic_2/computation/cpxs_tsts.ma | 42 +++--- .../basic_2/computation/cpxs_tsts_vector.ma | 62 ++++---- .../lambdadelta/basic_2/computation/csx.ma | 74 ++++----- .../basic_2/computation/csx_aaa.ma | 30 ++-- .../basic_2/computation/csx_alt.ma | 70 ++++----- .../basic_2/computation/csx_fpbs.ma | 12 +- .../basic_2/computation/csx_lift.ma | 62 ++++---- .../basic_2/computation/csx_lleq.ma | 10 +- .../basic_2/computation/csx_lpx.ma | 44 +++--- .../basic_2/computation/csx_lpxs.ma | 6 +- .../basic_2/computation/csx_tsts_vector.ma | 60 ++++---- .../basic_2/computation/csx_vector.ma | 14 +- .../lambdadelta/basic_2/computation/fpbg.ma | 18 +-- .../basic_2/computation/fpbg_fleq.ma | 36 ++--- .../basic_2/computation/fpbg_fpbg.ma | 2 +- .../basic_2/computation/fpbg_fpbs.ma | 46 +++--- .../basic_2/computation/fpbg_lift.ma | 4 +- .../lambdadelta/basic_2/computation/fpbs.ma | 128 ++++++++-------- .../basic_2/computation/fpbs_aaa.ma | 4 +- .../basic_2/computation/fpbs_alt.ma | 38 ++--- .../basic_2/computation/fpbs_fpb.ma | 12 +- .../basic_2/computation/fpbs_fpbs.ma | 2 +- .../basic_2/computation/fpbs_lift.ma | 16 +- .../lambdadelta/basic_2/computation/fsb.ma | 22 +-- .../basic_2/computation/fsb_aaa.ma | 32 ++-- .../basic_2/computation/fsb_alt.ma | 46 +++--- .../basic_2/computation/fsb_csx.ma | 24 +-- .../lambdadelta/basic_2/computation/gcp.ma | 4 +- .../basic_2/computation/gcp_aaa.ma | 18 +-- .../lambdadelta/basic_2/computation/gcp_cr.ma | 74 ++++----- .../lambdadelta/basic_2/computation/lcosx.ma | 42 +++--- .../basic_2/computation/lcosx_cpx.ma | 13 +- .../basic_2/computation/lprs_cprs.ma | 10 +- .../lambdadelta/basic_2/computation/lpxs.ma | 38 ++--- .../basic_2/computation/lpxs_aaa.ma | 6 +- .../basic_2/computation/lpxs_cpxs.ma | 94 ++++++------ .../basic_2/computation/lpxs_drop.ma | 6 +- .../basic_2/computation/lpxs_lleq.ma | 70 ++++----- .../basic_2/computation/lpxs_lpxs.ma | 2 +- .../basic_2/computation/lsubc_drop.ma | 26 ++-- .../basic_2/computation/lsubc_drops.ma | 2 +- .../lambdadelta/basic_2/computation/lsx.ma | 72 ++++----- .../basic_2/computation/lsx_alt.ma | 74 ++++----- .../basic_2/computation/lsx_csx.ma | 18 +-- .../basic_2/computation/lsx_drop.ma | 54 +++---- .../basic_2/computation/lsx_lpx.ma | 28 ++-- .../basic_2/computation/lsx_lpxs.ma | 28 ++-- .../lambdadelta/basic_2/computation/scpds.ma | 24 +-- .../basic_2/computation/scpds_aaa.ma | 4 +- .../basic_2/computation/scpds_lift.ma | 10 +- .../basic_2/computation/scpds_scpds.ma | 50 +++---- .../basic_2/etc_new/drops/drops.etc | 24 --- .../lambdadelta/basic_2/relocation/drops.ma | 20 +++ .../lambdadelta/basic_2/relocation/lifts.ma | 6 +- .../{computation => s_computation}/fqup.ma | 37 +---- .../basic_2/s_computation/fqup_drops.ma | 46 ++++++ .../fqup_fqup.ma | 2 +- .../basic_2/s_computation/fqup_weight.ma | 42 ++++++ .../{computation => s_computation}/fqus.ma | 30 +--- .../basic_2/s_computation/fqus_drops.ma | 26 ++++ .../fqus_fqup.ma} | 42 ++++-- .../fqus_fqus.ma | 2 +- .../basic_2/s_computation/fqus_weight.ma | 25 ++++ .../basic_2/{relocation => static}/frees.ma | 0 .../{relocation => static}/frees_frees.ma | 0 .../{relocation => static}/frees_lreq.ma | 0 .../{relocation => static}/frees_weight.ma | 0 .../basic_2/{relocation => static}/freq.ma | 0 .../{relocation => static}/freq_freq.ma | 0 .../lambdadelta/basic_2/web/basic_2.ldw.xml | 6 + .../lambdadelta/basic_2/web/basic_2_src.tbl | 10 +- .../ground_2/relocation/rtmap_after.ma | 18 +++ .../lambdadelta/ground_2/web/ground_2.ldw.xml | 1 + 83 files changed, 1250 insertions(+), 1138 deletions(-) rename matita/matita/contribs/lambdadelta/basic_2/{computation => s_computation}/fqup.ma (69%) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_drops.ma rename matita/matita/contribs/lambdadelta/basic_2/{computation => s_computation}/fqup_fqup.ma (96%) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_weight.ma rename matita/matita/contribs/lambdadelta/basic_2/{computation => s_computation}/fqus.ma (67%) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_drops.ma rename matita/matita/contribs/lambdadelta/basic_2/{computation/fqus_alt.ma => s_computation/fqus_fqup.ma} (61%) rename matita/matita/contribs/lambdadelta/basic_2/{computation => s_computation}/fqus_fqus.ma (96%) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_weight.ma rename matita/matita/contribs/lambdadelta/basic_2/{relocation => static}/frees.ma (100%) rename matita/matita/contribs/lambdadelta/basic_2/{relocation => static}/frees_frees.ma (100%) rename matita/matita/contribs/lambdadelta/basic_2/{relocation => static}/frees_lreq.ma (100%) rename matita/matita/contribs/lambdadelta/basic_2/{relocation => static}/frees_weight.ma (100%) rename matita/matita/contribs/lambdadelta/basic_2/{relocation => static}/freq.ma (100%) rename matita/matita/contribs/lambdadelta/basic_2/{relocation => static}/freq_freq.ma (100%) diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cpre.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cpre.ma index 65a6146a7..d94fb6fba 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/cpre.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cpre.ma @@ -27,8 +27,8 @@ interpretation "evaluation for context-sensitive parallel reduction (term)" (* Basic properties *********************************************************) (* Basic_1: was just: nf2_sn3 *) -lemma csx_cpre: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → ∃T2. ⦃G, L⦄ ⊢ T1 ➡* 𝐍⦃T2⦄. -#h #g #G #L #T1 #H @(csx_ind … H) -T1 +lemma csx_cpre: ∀h,o,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, o] T1 → ∃T2. ⦃G, L⦄ ⊢ T1 ➡* 𝐍⦃T2⦄. +#h #o #G #L #T1 #H @(csx_ind … H) -T1 #T1 #_ #IHT1 elim (cnr_dec G L T1) /3 width=3 by ex_intro, conj/ * #T #H1T1 #H2T1 elim (IHT1 … H2T1) -IHT1 -H2T1 /2 width=2 by cpr_cpx/ #T2 * /4 width=3 by cprs_strap2, ex_intro, conj/ diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs.ma index 6881d9c92..638bcde72 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs.ma @@ -113,8 +113,8 @@ qed. (* Basic inversion lemmas ***************************************************) (* Basic_1: was: pr3_gen_sort *) -lemma cprs_inv_sort1: ∀G,L,U2,k. ⦃G, L⦄ ⊢ ⋆k ➡* U2 → U2 = ⋆k. -#G #L #U2 #k #H @(cprs_ind … H) -U2 // +lemma cprs_inv_sort1: ∀G,L,U2,s. ⦃G, L⦄ ⊢ ⋆s ➡* U2 → U2 = ⋆s. +#G #L #U2 #s #H @(cprs_ind … H) -U2 // #U2 #U #_ #HU2 #IHU2 destruct >(cpr_inv_sort1 … HU2) -HU2 // qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_cprs.ma index e86df253e..a6d78f115 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_cprs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_cprs.ma @@ -104,7 +104,7 @@ qed-. (* Basic_1: was just: pr3_pr2_pr2_t *) (* Basic_1: includes: pr3_pr0_pr2_t *) -lemma lpr_cpr_trans: ∀G. s_r_transitive … (cpr G) (λ_. lpr G). +lemma lpr_cpr_trans: ∀G. c_r_transitive … (cpr G) (λ_. lpr G). #G #L2 #T1 #T2 #HT12 elim HT12 -G -L2 -T1 -T2 [ /2 width=3 by/ | #G #L2 #K2 #V0 #V2 #W2 #i #HLK2 #_ #HVW2 #IHV02 #L1 #HL12 @@ -124,8 +124,8 @@ lemma cpr_bind2: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡ V2 → ∀I,T1,T2. ⦃G, L. (* Advanced properties ******************************************************) (* Basic_1: was only: pr3_pr2_pr3_t pr3_wcpr0_t *) -lemma lpr_cprs_trans: ∀G. s_rs_transitive … (cpr G) (λ_. lpr G). -#G @s_r_trans_LTC1 /2 width=3 by lpr_cpr_trans/ (**) (* full auto fails *) +lemma lpr_cprs_trans: ∀G. c_rs_transitive … (cpr G) (λ_. lpr G). +#G @c_r_trans_LTC1 /2 width=3 by lpr_cpr_trans/ (**) (* full auto fails *) qed-. (* Basic_1: was: pr3_strip *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cpxe.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cpxe.ma index 6d1ffd2b8..00fd04247 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/cpxe.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cpxe.ma @@ -19,16 +19,16 @@ include "basic_2/computation/csx.ma". (* EVALUATION FOR CONTEXT-SENSITIVE EXTENDED PARALLEL REDUCTION ON TERMS ****) definition cpxe: ∀h. sd h → relation4 genv lenv term term ≝ - λh,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 ∧ ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T2⦄. + λh,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 ∧ ⦃G, L⦄ ⊢ ➡[h, o] 𝐍⦃T2⦄. interpretation "evaluation for context-sensitive extended parallel reduction (term)" - 'PRedEval h g G L T1 T2 = (cpxe h g G L T1 T2). + 'PRedEval h o G L T1 T2 = (cpxe h o G L T1 T2). (* Basic properties *********************************************************) -lemma csx_cpxe: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → ∃T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] 𝐍⦃T2⦄. -#h #g #G #L #T1 #H @(csx_ind … H) -T1 -#T1 #_ #IHT1 elim (cnx_dec h g G L T1) /3 width=3 by ex_intro, conj/ +lemma csx_cpxe: ∀h,o,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, o] T1 → ∃T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] 𝐍⦃T2⦄. +#h #o #G #L #T1 #H @(csx_ind … H) -T1 +#T1 #_ #IHT1 elim (cnx_dec h o G L T1) /3 width=3 by ex_intro, conj/ * #T #H1T1 #H2T1 elim (IHT1 … H1T1 H2T1) -IHT1 -H2T1 #T2 * /4 width=3 by cpxs_strap2, ex_intro, conj/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs.ma index 75c56d8a4..734529a9e 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs.ma @@ -19,127 +19,127 @@ include "basic_2/computation/cprs.ma". (* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) definition cpxs: ∀h. sd h → relation4 genv lenv term term ≝ - λh,g,G. LTC … (cpx h g G). + λh,o,G. LTC … (cpx h o G). interpretation "extended context-sensitive parallel computation (term)" - 'PRedStar h g G L T1 T2 = (cpxs h g G L T1 T2). + 'PRedStar h o G L T1 T2 = (cpxs h o G L T1 T2). (* Basic eliminators ********************************************************) -lemma cpxs_ind: ∀h,g,G,L,T1. ∀R:predicate term. R T1 → - (∀T,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T → ⦃G, L⦄ ⊢ T ➡[h, g] T2 → R T → R T2) → - ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → R T2. -#h #g #L #G #T1 #R #HT1 #IHT1 #T2 #HT12 +lemma cpxs_ind: ∀h,o,G,L,T1. ∀R:predicate term. R T1 → + (∀T,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T → ⦃G, L⦄ ⊢ T ➡[h, o] T2 → R T → R T2) → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 → R T2. +#h #o #L #G #T1 #R #HT1 #IHT1 #T2 #HT12 @(TC_star_ind … HT1 IHT1 … HT12) // qed-. -lemma cpxs_ind_dx: ∀h,g,G,L,T2. ∀R:predicate term. R T2 → - (∀T1,T. ⦃G, L⦄ ⊢ T1 ➡[h, g] T → ⦃G, L⦄ ⊢ T ➡*[h, g] T2 → R T → R T1) → - ∀T1. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → R T1. -#h #g #G #L #T2 #R #HT2 #IHT2 #T1 #HT12 +lemma cpxs_ind_dx: ∀h,o,G,L,T2. ∀R:predicate term. R T2 → + (∀T1,T. ⦃G, L⦄ ⊢ T1 ➡[h, o] T → ⦃G, L⦄ ⊢ T ➡*[h, o] T2 → R T → R T1) → + ∀T1. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 → R T1. +#h #o #G #L #T2 #R #HT2 #IHT2 #T1 #HT12 @(TC_star_ind_dx … HT2 IHT2 … HT12) // qed-. (* Basic properties *********************************************************) -lemma cpxs_refl: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ➡*[h, g] T. +lemma cpxs_refl: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ T ➡*[h, o] T. /2 width=1 by inj/ qed. -lemma cpx_cpxs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +lemma cpx_cpxs: ∀h,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, o] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2. /2 width=1 by inj/ qed. -lemma cpxs_strap1: ∀h,g,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T → - ∀T2. ⦃G, L⦄ ⊢ T ➡[h, g] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +lemma cpxs_strap1: ∀h,o,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T → + ∀T2. ⦃G, L⦄ ⊢ T ➡[h, o] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2. normalize /2 width=3 by step/ qed. -lemma cpxs_strap2: ∀h,g,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡[h, g] T → - ∀T2. ⦃G, L⦄ ⊢ T ➡*[h, g] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +lemma cpxs_strap2: ∀h,o,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡[h, o] T → + ∀T2. ⦃G, L⦄ ⊢ T ➡*[h, o] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2. normalize /2 width=3 by TC_strap/ qed. -lemma lsubr_cpxs_trans: ∀h,g,G. lsub_trans … (cpxs h g G) lsubr. +lemma lsubr_cpxs_trans: ∀h,o,G. lsub_trans … (cpxs h o G) lsubr. /3 width=5 by lsubr_cpx_trans, LTC_lsub_trans/ qed-. -lemma cprs_cpxs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. -#h #g #G #L #T1 #T2 #H @(cprs_ind … H) -T2 /3 width=3 by cpxs_strap1, cpr_cpx/ +lemma cprs_cpxs: ∀h,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2. +#h #o #G #L #T1 #T2 #H @(cprs_ind … H) -T2 /3 width=3 by cpxs_strap1, cpr_cpx/ qed. -lemma cpxs_sort: ∀h,g,G,L,k,d1. deg h g k d1 → - ∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ ⋆k ➡*[h, g] ⋆((next h)^d2 k). -#h #g #G #L #k #d1 #Hkd1 #d2 @(nat_ind_plus … d2) -d2 /2 width=1 by cpx_cpxs/ +lemma cpxs_sort: ∀h,o,G,L,s,d1. deg h o s d1 → + ∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ ⋆s ➡*[h, o] ⋆((next h)^d2 s). +#h #o #G #L #s #d1 #Hkd1 #d2 @(nat_ind_plus … d2) -d2 /2 width=1 by cpx_cpxs/ #d2 #IHd2 #Hd21 >iter_SO -@(cpxs_strap1 … (⋆(iter d2 ℕ (next h) k))) +@(cpxs_strap1 … (⋆(iter d2 ℕ (next h) s))) [ /3 width=3 by lt_to_le/ -| @(cpx_st … (d1-d2-1)) (cpxs_inv_cnx1 … H HT) -G -L -T // qed-. -lemma cpxs_fwd_sort: ∀h,g,G,L,U,k. ⦃G, L⦄ ⊢ ⋆k ➡*[h, g] U → - ⋆k ≂ U ∨ ⦃G, L⦄ ⊢ ⋆(next h k) ➡*[h, g] U. -#h #g #G #L #U #k #H -elim (cpxs_inv_sort1 … H) -H #n #d generalize in match k; -k @(nat_ind_plus … n) -n -[ #k #_ #H -d destruct /2 width=1 by or_introl/ -| #n #IHn #k >plus_plus_comm_23 #Hnd #H destruct +lemma cpxs_fwd_sort: ∀h,o,G,L,U,s. ⦃G, L⦄ ⊢ ⋆s ➡*[h, o] U → + ⋆s ≂ U ∨ ⦃G, L⦄ ⊢ ⋆(next h s) ➡*[h, o] U. +#h #o #G #L #U #s #H +elim (cpxs_inv_sort1 … H) -H #n #d generalize in match s; -s @(nat_ind_plus … n) -n +[ #s #_ #H -d destruct /2 width=1 by or_introl/ +| #n #IHn #s >plus_plus_comm_23 #Hnd #H destruct lapply (deg_next_SO … Hnd) -Hnd #Hnd elim (IHn … Hnd) -IHn [ #H lapply (tsts_inv_atom1 … H) -H #H >H -H /2 width=1 by or_intror/ @@ -41,9 +41,9 @@ elim (cpxs_inv_sort1 … H) -H #n #d generalize in match k; -k @(nat_ind_plus qed-. (* Basic_1: was just: pr3_iso_beta *) -lemma cpxs_fwd_beta: ∀h,g,a,G,L,V,W,T,U. ⦃G, L⦄ ⊢ ⓐV.ⓛ{a}W.T ➡*[h, g] U → - ⓐV.ⓛ{a}W.T ≂ U ∨ ⦃G, L⦄ ⊢ ⓓ{a}ⓝW.V.T ➡*[h, g] U. -#h #g #a #G #L #V #W #T #U #H +lemma cpxs_fwd_beta: ∀h,o,a,G,L,V,W,T,U. ⦃G, L⦄ ⊢ ⓐV.ⓛ{a}W.T ➡*[h, o] U → + ⓐV.ⓛ{a}W.T ≂ U ∨ ⦃G, L⦄ ⊢ ⓓ{a}ⓝW.V.T ➡*[h, o] U. +#h #o #a #G #L #V #W #T #U #H elim (cpxs_inv_appl1 … H) -H * [ #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ | #b #W0 #T0 #HT0 #HU @@ -56,21 +56,21 @@ elim (cpxs_inv_appl1 … H) -H * qed-. (* Note: probably this is an inversion lemma *) -lemma cpxs_fwd_delta: ∀h,g,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 → +lemma cpxs_fwd_delta: ∀h,o,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 → ∀V2. ⬆[0, i + 1] V1 ≡ V2 → - ∀U. ⦃G, L⦄ ⊢ #i ➡*[h, g] U → - #i ≂ U ∨ ⦃G, L⦄ ⊢ V2 ➡*[h, g] U. -#h #g #I #G #L #K #V1 #i #HLK #V2 #HV12 #U #H + ∀U. ⦃G, L⦄ ⊢ #i ➡*[h, o] U → + #i ≂ U ∨ ⦃G, L⦄ ⊢ V2 ➡*[h, o] U. +#h #o #I #G #L #K #V1 #i #HLK #V2 #HV12 #U #H elim (cpxs_inv_lref1 … H) -H /2 width=1 by or_introl/ * #I0 #K0 #V0 #U0 #HLK0 #HVU0 #HU0 lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct /4 width=10 by cpxs_lift, drop_fwd_drop2, or_intror/ qed-. -lemma cpxs_fwd_theta: ∀h,g,a,G,L,V1,V,T,U. ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}V.T ➡*[h, g] U → +lemma cpxs_fwd_theta: ∀h,o,a,G,L,V1,V,T,U. ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}V.T ➡*[h, o] U → ∀V2. ⬆[0, 1] V1 ≡ V2 → ⓐV1.ⓓ{a}V.T ≂ U ∨ - ⦃G, L⦄ ⊢ ⓓ{a}V.ⓐV2.T ➡*[h, g] U. -#h #g #a #G #L #V1 #V #T #U #H #V2 #HV12 + ⦃G, L⦄ ⊢ ⓓ{a}V.ⓐV2.T ➡*[h, o] U. +#h #o #a #G #L #V1 #V #T #U #H #V2 #HV12 elim (cpxs_inv_appl1 … H) -H * [ -HV12 #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ | #b #W #T0 #HT0 #HU @@ -99,9 +99,9 @@ elim (cpxs_inv_appl1 … H) -H * ] qed-. -lemma cpxs_fwd_cast: ∀h,g,G,L,W,T,U. ⦃G, L⦄ ⊢ ⓝW.T ➡*[h, g] U → - ∨∨ ⓝW. T ≂ U | ⦃G, L⦄ ⊢ T ➡*[h, g] U | ⦃G, L⦄ ⊢ W ➡*[h, g] U. -#h #g #G #L #W #T #U #H +lemma cpxs_fwd_cast: ∀h,o,G,L,W,T,U. ⦃G, L⦄ ⊢ ⓝW.T ➡*[h, o] U → + ∨∨ ⓝW. T ≂ U | ⦃G, L⦄ ⊢ T ➡*[h, o] U | ⦃G, L⦄ ⊢ W ➡*[h, o] U. +#h #o #G #L #W #T #U #H elim (cpxs_inv_cast1 … H) -H /2 width=1 by or3_intro1, or3_intro2/ * #W0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or3_intro0/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_tsts_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_tsts_vector.ma index c26d55921..e82935af4 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_tsts_vector.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_tsts_vector.ma @@ -21,9 +21,9 @@ include "basic_2/computation/cpxs_tsts.ma". (* Vector form of forward lemmas involving same top term structure **********) (* Basic_1: was just: nf2_iso_appls_lref *) -lemma cpxs_fwd_cnx_vector: ∀h,g,G,L,T. 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → - ∀Vs,U. ⦃G, L⦄ ⊢ ⒶVs.T ➡*[h, g] U → ⒶVs.T ≂ U. -#h #g #G #L #T #H1T #H2T #Vs elim Vs -Vs [ @(cpxs_fwd_cnx … H2T) ] (**) (* /2 width=3 by cpxs_fwd_cnx/ does not work *) +lemma cpxs_fwd_cnx_vector: ∀h,o,G,L,T. 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, o] 𝐍⦃T⦄ → + ∀Vs,U. ⦃G, L⦄ ⊢ ⒶVs.T ➡*[h, o] U → ⒶVs.T ≂ U. +#h #o #G #L #T #H1T #H2T #Vs elim Vs -Vs [ @(cpxs_fwd_cnx … H2T) ] (**) (* /2 width=3 by cpxs_fwd_cnx/ does not work *) #V #Vs #IHVs #U #H elim (cpxs_inv_appl1 … H) -H * [ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair/ @@ -36,9 +36,9 @@ elim (cpxs_inv_appl1 … H) -H * ] qed-. -lemma cpxs_fwd_sort_vector: ∀h,g,G,L,k,Vs,U. ⦃G, L⦄ ⊢ ⒶVs.⋆k ➡*[h, g] U → - ⒶVs.⋆k ≂ U ∨ ⦃G, L⦄ ⊢ ⒶVs.⋆(next h k) ➡*[h, g] U. -#h #g #G #L #k #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_sort/ +lemma cpxs_fwd_sort_vector: ∀h,o,G,L,s,Vs,U. ⦃G, L⦄ ⊢ ⒶVs.⋆s ➡*[h, o] U → + ⒶVs.⋆s ≂ U ∨ ⦃G, L⦄ ⊢ ⒶVs.⋆(next h s) ➡*[h, o] U. +#h #o #G #L #s #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_sort/ #V #Vs #IHVs #U #H elim (cpxs_inv_appl1 … H) -H * [ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ @@ -61,9 +61,9 @@ qed-. (* Basic_1: was just: pr3_iso_appls_beta *) -lemma cpxs_fwd_beta_vector: ∀h,g,a,G,L,Vs,V,W,T,U. ⦃G, L⦄ ⊢ ⒶVs.ⓐV.ⓛ{a}W.T ➡*[h, g] U → - ⒶVs. ⓐV. ⓛ{a}W. T ≂ U ∨ ⦃G, L⦄ ⊢ ⒶVs.ⓓ{a}ⓝW.V.T ➡*[h, g] U. -#h #g #a #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_beta/ +lemma cpxs_fwd_beta_vector: ∀h,o,a,G,L,Vs,V,W,T,U. ⦃G, L⦄ ⊢ ⒶVs.ⓐV.ⓛ{a}W.T ➡*[h, o] U → + ⒶVs. ⓐV. ⓛ{a}W. T ≂ U ∨ ⦃G, L⦄ ⊢ ⒶVs.ⓓ{a}ⓝW.V.T ➡*[h, o] U. +#h #o #a #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_beta/ #V0 #Vs #IHVs #V #W #T #U #H elim (cpxs_inv_appl1 … H) -H * [ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ @@ -84,11 +84,11 @@ elim (cpxs_inv_appl1 … H) -H * ] qed-. -lemma cpxs_fwd_delta_vector: ∀h,g,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 → +lemma cpxs_fwd_delta_vector: ∀h,o,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 → ∀V2. ⬆[0, i + 1] V1 ≡ V2 → - ∀Vs,U. ⦃G, L⦄ ⊢ ⒶVs.#i ➡*[h, g] U → - ⒶVs.#i ≂ U ∨ ⦃G, L⦄ ⊢ ⒶVs.V2 ➡*[h, g] U. -#h #g #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs /2 width=5 by cpxs_fwd_delta/ + ∀Vs,U. ⦃G, L⦄ ⊢ ⒶVs.#i ➡*[h, o] U → + ⒶVs.#i ≂ U ∨ ⦃G, L⦄ ⊢ ⒶVs.V2 ➡*[h, o] U. +#h #o #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs /2 width=5 by cpxs_fwd_delta/ #V #Vs #IHVs #U #H -K -V1 elim (cpxs_inv_appl1 … H) -H * [ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ @@ -110,38 +110,38 @@ elim (cpxs_inv_appl1 … H) -H * qed-. (* Basic_1: was just: pr3_iso_appls_abbr *) -lemma cpxs_fwd_theta_vector: ∀h,g,G,L,V1s,V2s. ⬆[0, 1] V1s ≡ V2s → - ∀a,V,T,U. ⦃G, L⦄ ⊢ ⒶV1s.ⓓ{a}V.T ➡*[h, g] U → - ⒶV1s. ⓓ{a}V. T ≂ U ∨ ⦃G, L⦄ ⊢ ⓓ{a}V.ⒶV2s.T ➡*[h, g] U. -#h #g #G #L #V1s #V2s * -V1s -V2s /3 width=1 by or_intror/ -#V1s #V2s #V1a #V2a #HV12a #HV12s #a +lemma cpxs_fwd_theta_vector: ∀h,o,G,L,V1c,V2c. ⬆[0, 1] V1c ≡ V2c → + ∀a,V,T,U. ⦃G, L⦄ ⊢ ⒶV1c.ⓓ{a}V.T ➡*[h, o] U → + ⒶV1c. ⓓ{a}V. T ≂ U ∨ ⦃G, L⦄ ⊢ ⓓ{a}V.ⒶV2c.T ➡*[h, o] U. +#h #o #G #L #V1c #V2c * -V1c -V2c /3 width=1 by or_intror/ +#V1c #V2c #V1a #V2a #HV12a #HV12c #a generalize in match HV12a; -HV12a generalize in match V2a; -V2a generalize in match V1a; -V1a -elim HV12s -V1s -V2s /2 width=1 by cpxs_fwd_theta/ -#V1s #V2s #V1b #V2b #HV12b #_ #IHV12s #V1a #V2a #HV12a #V #T #U #H +elim HV12c -V1c -V2c /2 width=1 by cpxs_fwd_theta/ +#V1c #V2c #V1b #V2b #HV12b #_ #IHV12c #V1a #V2a #HV12a #V #T #U #H elim (cpxs_inv_appl1 … H) -H * -[ -IHV12s -HV12a -HV12b #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ +[ -IHV12c -HV12a -HV12b #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ | #b #W0 #T0 #HT0 #HU - elim (IHV12s … HV12b … HT0) -IHV12s -HT0 #HT0 + elim (IHV12c … HV12b … HT0) -IHV12c -HT0 #HT0 [ -HV12a -HV12b -HU elim (tsts_inv_pair1 … HT0) #V1 #T1 #H destruct - | @or_intror -V1s (**) (* explicit constructor *) + | @or_intror -V1c (**) (* explicit constructor *) @(cpxs_trans … HU) -U elim (cpxs_inv_abbr1 … HT0) -HT0 * [ -HV12a -HV12b #V1 #T1 #_ #_ #H destruct | -V1b #X #HT1 #H #H0 destruct elim (lift_inv_bind1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct - @(cpxs_trans … (+ⓓV.ⓐV2a.ⓛ{b}W1.T1)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T -V2b -V2s + @(cpxs_trans … (+ⓓV.ⓐV2a.ⓛ{b}W1.T1)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T -V2b -V2c @(cpxs_strap2 … (ⓐV1a.ⓛ{b}W0.T0)) /4 width=7 by cpxs_beta_dx, cpx_zeta, lift_bind, lift_flat/ ] ] | #b #V0a #Va #V0 #T0 #HV10a #HV0a #HT0 #HU - elim (IHV12s … HV12b … HT0) -HV12b -IHV12s -HT0 #HT0 + elim (IHV12c … HV12b … HT0) -HV12b -IHV12c -HT0 #HT0 [ -HV12a -HV10a -HV0a -HU elim (tsts_inv_pair1 … HT0) #V1 #T1 #H destruct - | @or_intror -V1s -V1b (**) (* explicit constructor *) + | @or_intror -V1c -V1b (**) (* explicit constructor *) @(cpxs_trans … HU) -U elim (cpxs_inv_abbr1 … HT0) -HT0 * [ #V1 #T1 #HV1 #HT1 #H destruct @@ -150,7 +150,7 @@ elim (cpxs_inv_appl1 … H) -H * | #X #HT1 #H #H0 destruct elim (lift_inv_bind1 … H) -H #V1 #T1 #HW01 #HT01 #H destruct lapply (cpxs_lift … HV10a (L.ⓓV0) (Ⓕ) … HV12a … HV0a) -V0a [ /2 width=1 by drop_drop/ ] #HV2a - @(cpxs_trans … (+ⓓV.ⓐV2a.ⓓ{b}V1.T1)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T -V2b -V2s + @(cpxs_trans … (+ⓓV.ⓐV2a.ⓓ{b}V1.T1)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T -V2b -V2c @(cpxs_strap2 … (ⓐV1a.ⓓ{b}V0.T0)) [ /4 width=7 by cpx_zeta, lift_bind, lift_flat/ ] -V -V1 -T1 @(cpxs_strap2 … (ⓓ{b}V0.ⓐV2a.T0)) /3 width=3 by cpxs_pair_sn, cpxs_bind_dx, cpr_cpx, cpr_theta/ ] @@ -159,11 +159,11 @@ elim (cpxs_inv_appl1 … H) -H * qed-. (* Basic_1: was just: pr3_iso_appls_cast *) -lemma cpxs_fwd_cast_vector: ∀h,g,G,L,Vs,W,T,U. ⦃G, L⦄ ⊢ ⒶVs.ⓝW.T ➡*[h, g] U → +lemma cpxs_fwd_cast_vector: ∀h,o,G,L,Vs,W,T,U. ⦃G, L⦄ ⊢ ⒶVs.ⓝW.T ➡*[h, o] U → ∨∨ ⒶVs. ⓝW. T ≂ U - | ⦃G, L⦄ ⊢ ⒶVs.T ➡*[h, g] U - | ⦃G, L⦄ ⊢ ⒶVs.W ➡*[h, g] U. -#h #g #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_cast/ + | ⦃G, L⦄ ⊢ ⒶVs.T ➡*[h, o] U + | ⦃G, L⦄ ⊢ ⒶVs.W ➡*[h, o] U. +#h #o #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_cast/ #V #Vs #IHVs #W #T #U #H elim (cpxs_inv_appl1 … H) -H * [ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or3_intro0/ diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csx.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csx.ma index 9b83b6084..0def99568 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/csx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/csx.ma @@ -18,46 +18,46 @@ include "basic_2/reduction/cnx.ma". (* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) definition csx: ∀h. sd h → relation3 genv lenv term ≝ - λh,g,G,L. SN … (cpx h g G L) (eq …). + λh,o,G,L. SN … (cpx h o G L) (eq …). interpretation "context-sensitive extended strong normalization (term)" - 'SN h g G L T = (csx h g G L T). + 'SN h o G L T = (csx h o G L T). (* Basic eliminators ********************************************************) -lemma csx_ind: ∀h,g,G,L. ∀R:predicate term. - (∀T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → - (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → R T2) → +lemma csx_ind: ∀h,o,G,L. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ ⬊*[h, o] T1 → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, o] T2 → (T1 = T2 → ⊥) → R T2) → R T1 ) → - ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R T. -#h #g #G #L #R #H0 #T1 #H elim H -T1 + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, o] T → R T. +#h #o #G #L #R #H0 #T1 #H elim H -T1 /5 width=1 by SN_intro/ qed-. (* Basic properties *********************************************************) (* Basic_1: was just: sn3_pr2_intro *) -lemma csx_intro: ∀h,g,G,L,T1. - (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, g] T2) → - ⦃G, L⦄ ⊢ ⬊*[h, g] T1. +lemma csx_intro: ∀h,o,G,L,T1. + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, o] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, o] T2) → + ⦃G, L⦄ ⊢ ⬊*[h, o] T1. /4 width=1 by SN_intro/ qed. -lemma csx_cpx_trans: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → - ∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → ⦃G, L⦄ ⊢ ⬊*[h, g] T2. -#h #g #G #L #T1 #H @(csx_ind … H) -T1 #T1 #HT1 #IHT1 #T2 #HLT12 +lemma csx_cpx_trans: ∀h,o,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, o] T1 → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, o] T2 → ⦃G, L⦄ ⊢ ⬊*[h, o] T2. +#h #o #G #L #T1 #H @(csx_ind … H) -T1 #T1 #HT1 #IHT1 #T2 #HLT12 elim (eq_term_dec T1 T2) #HT12 destruct /3 width=4 by/ qed-. (* Basic_1: was just: sn3_nf2 *) -lemma cnx_csx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +lemma cnx_csx: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ➡[h, o] 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ⬊*[h, o] T. /2 width=1 by NF_to_SN/ qed. -lemma csx_sort: ∀h,g,G,L,k. ⦃G, L⦄ ⊢ ⬊*[h, g] ⋆k. -#h #g #G #L #k elim (deg_total h g k) -#d generalize in match k; -k @(nat_ind_plus … d) -d /3 width=6 by cnx_csx, cnx_sort/ -#d #IHd #k #Hkd lapply (deg_next_SO … Hkd) -Hkd +lemma csx_sort: ∀h,o,G,L,s. ⦃G, L⦄ ⊢ ⬊*[h, o] ⋆s. +#h #o #G #L #s elim (deg_total h o s) +#d generalize in match s; -s @(nat_ind_plus … d) -d /3 width=6 by cnx_csx, cnx_sort/ +#d #IHd #s #Hkd lapply (deg_next_SO … Hkd) -Hkd #Hkd @csx_intro #X #H #HX elim (cpx_inv_sort1 … H) -H [ #H destruct elim HX // | -HX * #d0 #_ #H destruct -d0 /2 width=1 by/ @@ -65,9 +65,9 @@ lemma csx_sort: ∀h,g,G,L,k. ⦃G, L⦄ ⊢ ⬊*[h, g] ⋆k. qed. (* Basic_1: was just: sn3_cast *) -lemma csx_cast: ∀h,g,G,L,W. ⦃G, L⦄ ⊢ ⬊*[h, g] W → - ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓝW.T. -#h #g #G #L #W #HW @(csx_ind … HW) -W #W #HW #IHW #T #HT @(csx_ind … HT) -T #T #HT #IHT +lemma csx_cast: ∀h,o,G,L,W. ⦃G, L⦄ ⊢ ⬊*[h, o] W → + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, o] T → ⦃G, L⦄ ⊢ ⬊*[h, o] ⓝW.T. +#h #o #G #L #W #HW @(csx_ind … HW) -W #W #HW #IHW #T #HT @(csx_ind … HT) -T #T #HT #IHT @csx_intro #X #H1 #H2 elim (cpx_inv_cast1 … H1) -H1 [ * #W0 #T0 #HLW0 #HLT0 #H destruct @@ -81,48 +81,48 @@ qed. (* Basic forward lemmas *****************************************************) -fact csx_fwd_pair_sn_aux: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, g] U → - ∀I,V,T. U = ②{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] V. -#h #g #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct +fact csx_fwd_pair_sn_aux: ∀h,o,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, o] U → + ∀I,V,T. U = ②{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, o] V. +#h #o #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct @csx_intro #V2 #HLV2 #HV2 @(IH (②{I}V2.T)) -IH /2 width=3 by cpx_pair_sn/ -HLV2 #H destruct /2 width=1 by/ qed-. (* Basic_1: was just: sn3_gen_head *) -lemma csx_fwd_pair_sn: ∀h,g,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ②{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] V. +lemma csx_fwd_pair_sn: ∀h,o,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, o] ②{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, o] V. /2 width=5 by csx_fwd_pair_sn_aux/ qed-. -fact csx_fwd_bind_dx_aux: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, g] U → - ∀a,I,V,T. U = ⓑ{a,I}V.T → ⦃G, L.ⓑ{I}V⦄ ⊢ ⬊*[h, g] T. -#h #g #G #L #U #H elim H -H #U0 #_ #IH #a #I #V #T #H destruct +fact csx_fwd_bind_dx_aux: ∀h,o,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, o] U → + ∀a,I,V,T. U = ⓑ{a,I}V.T → ⦃G, L.ⓑ{I}V⦄ ⊢ ⬊*[h, o] T. +#h #o #G #L #U #H elim H -H #U0 #_ #IH #a #I #V #T #H destruct @csx_intro #T2 #HLT2 #HT2 @(IH (ⓑ{a,I}V.T2)) -IH /2 width=3 by cpx_bind/ -HLT2 #H destruct /2 width=1 by/ qed-. (* Basic_1: was just: sn3_gen_bind *) -lemma csx_fwd_bind_dx: ∀h,g,a,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓑ{a,I}V.T → ⦃G, L.ⓑ{I}V⦄ ⊢ ⬊*[h, g] T. +lemma csx_fwd_bind_dx: ∀h,o,a,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, o] ⓑ{a,I}V.T → ⦃G, L.ⓑ{I}V⦄ ⊢ ⬊*[h, o] T. /2 width=4 by csx_fwd_bind_dx_aux/ qed-. -fact csx_fwd_flat_dx_aux: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, g] U → - ∀I,V,T. U = ⓕ{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] T. -#h #g #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct +fact csx_fwd_flat_dx_aux: ∀h,o,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, o] U → + ∀I,V,T. U = ⓕ{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, o] T. +#h #o #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct @csx_intro #T2 #HLT2 #HT2 @(IH (ⓕ{I}V.T2)) -IH /2 width=3 by cpx_flat/ -HLT2 #H destruct /2 width=1 by/ qed-. (* Basic_1: was just: sn3_gen_flat *) -lemma csx_fwd_flat_dx: ∀h,g,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓕ{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +lemma csx_fwd_flat_dx: ∀h,o,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, o] ⓕ{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, o] T. /2 width=5 by csx_fwd_flat_dx_aux/ qed-. -lemma csx_fwd_bind: ∀h,g,a,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓑ{a,I}V.T → - ⦃G, L⦄ ⊢ ⬊*[h, g] V ∧ ⦃G, L.ⓑ{I}V⦄ ⊢ ⬊*[h, g] T. +lemma csx_fwd_bind: ∀h,o,a,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, o] ⓑ{a,I}V.T → + ⦃G, L⦄ ⊢ ⬊*[h, o] V ∧ ⦃G, L.ⓑ{I}V⦄ ⊢ ⬊*[h, o] T. /3 width=3 by csx_fwd_pair_sn, csx_fwd_bind_dx, conj/ qed-. -lemma csx_fwd_flat: ∀h,g,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓕ{I}V.T → - ⦃G, L⦄ ⊢ ⬊*[h, g] V ∧ ⦃G, L⦄ ⊢ ⬊*[h, g] T. +lemma csx_fwd_flat: ∀h,o,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, o] ⓕ{I}V.T → + ⦃G, L⦄ ⊢ ⬊*[h, o] V ∧ ⦃G, L⦄ ⊢ ⬊*[h, o] T. /3 width=3 by csx_fwd_pair_sn, csx_fwd_flat_dx, conj/ qed-. (* Basic_1: removed theorems 14: diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_aaa.ma index 6d8aa3ed9..a9d3e4cae 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_aaa.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_aaa.ma @@ -20,39 +20,39 @@ include "basic_2/computation/csx_tsts_vector.ma". (* Main properties on atomic arity assignment *******************************) -theorem aaa_csx: ∀h,g,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦃G, L⦄ ⊢ ⬊*[h, g] T. -#h #g #G #L #T #A #H -@(gcr_aaa … (csx_gcp h g) (csx_gcr h g) … H) +theorem aaa_csx: ∀h,o,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦃G, L⦄ ⊢ ⬊*[h, o] T. +#h #o #G #L #T #A #H +@(gcr_aaa … (csx_gcp h o) (csx_gcr h o) … H) qed. (* Advanced eliminators *****************************************************) -fact aaa_ind_csx_aux: ∀h,g,G,L,A. ∀R:predicate term. +fact aaa_ind_csx_aux: ∀h,o,G,L,A. ∀R:predicate term. (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A → - (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, o] T2 → (T1 = T2 → ⊥) → R T2) → R T1 ) → - ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ T ⁝ A → R T. -#h #g #G #L #A #R #IH #T #H @(csx_ind … H) -T /4 width=5 by cpx_aaa_conf/ + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, o] T → ⦃G, L⦄ ⊢ T ⁝ A → R T. +#h #o #G #L #A #R #IH #T #H @(csx_ind … H) -T /4 width=5 by cpx_aaa_conf/ qed-. -lemma aaa_ind_csx: ∀h,g,G,L,A. ∀R:predicate term. +lemma aaa_ind_csx: ∀h,o,G,L,A. ∀R:predicate term. (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A → - (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, o] T2 → (T1 = T2 → ⊥) → R T2) → R T1 ) → ∀T. ⦃G, L⦄ ⊢ T ⁝ A → R T. /5 width=9 by aaa_ind_csx_aux, aaa_csx/ qed-. -fact aaa_ind_csx_alt_aux: ∀h,g,G,L,A. ∀R:predicate term. +fact aaa_ind_csx_alt_aux: ∀h,o,G,L,A. ∀R:predicate term. (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A → - (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 → (T1 = T2 → ⊥) → R T2) → R T1 ) → - ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ T ⁝ A → R T. -#h #g #G #L #A #R #IH #T #H @(csx_ind_alt … H) -T /4 width=5 by cpxs_aaa_conf/ + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, o] T → ⦃G, L⦄ ⊢ T ⁝ A → R T. +#h #o #G #L #A #R #IH #T #H @(csx_ind_alt … H) -T /4 width=5 by cpxs_aaa_conf/ qed-. -lemma aaa_ind_csx_alt: ∀h,g,G,L,A. ∀R:predicate term. +lemma aaa_ind_csx_alt: ∀h,o,G,L,A. ∀R:predicate term. (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A → - (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 → (T1 = T2 → ⊥) → R T2) → R T1 ) → ∀T. ⦃G, L⦄ ⊢ T ⁝ A → R T. /5 width=9 by aaa_ind_csx_alt_aux, aaa_csx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_alt.ma index a6f46c787..0b9b29799 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_alt.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_alt.ma @@ -20,44 +20,44 @@ include "basic_2/computation/csx.ma". (* alternative definition of csx *) definition csxa: ∀h. sd h → relation3 genv lenv term ≝ - λh,g,G,L. SN … (cpxs h g G L) (eq …). + λh,o,G,L. SN … (cpxs h o G L) (eq …). interpretation "context-sensitive extended strong normalization (term) alternative" - 'SNAlt h g G L T = (csxa h g G L T). + 'SNAlt h o G L T = (csxa h o G L T). (* Basic eliminators ********************************************************) -lemma csxa_ind: ∀h,g,G,L. ∀R:predicate term. - (∀T1. ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1 → - (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 +lemma csxa_ind: ∀h,o,G,L. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ ⬊⬊*[h, o] T1 → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 → (T1 = T2 → ⊥) → R T2) → R T1 ) → - ∀T. ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T → R T. -#h #g #G #L #R #H0 #T1 #H elim H -T1 /5 width=1 by SN_intro/ + ∀T. ⦃G, L⦄ ⊢ ⬊⬊*[h, o] T → R T. +#h #o #G #L #R #H0 #T1 #H elim H -T1 /5 width=1 by SN_intro/ qed-. (* Basic properties *********************************************************) -lemma csx_intro_cpxs: ∀h,g,G,L,T1. - (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, g] T2) → - ⦃G, L⦄ ⊢ ⬊*[h, g] T1. +lemma csx_intro_cpxs: ∀h,o,G,L,T1. + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, o] T2) → + ⦃G, L⦄ ⊢ ⬊*[h, o] T1. /4 width=1 by cpx_cpxs, csx_intro/ qed. (* Basic_1: was just: sn3_intro *) -lemma csxa_intro: ∀h,g,G,L,T1. - (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T2) → - ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1. +lemma csxa_intro: ∀h,o,G,L,T1. + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊⬊*[h, o] T2) → + ⦃G, L⦄ ⊢ ⬊⬊*[h, o] T1. /4 width=1 by SN_intro/ qed. -fact csxa_intro_aux: ∀h,g,G,L,T1. ( - ∀T,T2. ⦃G, L⦄ ⊢ T ➡*[h, g] T2 → T1 = T → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T2 - ) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1. +fact csxa_intro_aux: ∀h,o,G,L,T1. ( + ∀T,T2. ⦃G, L⦄ ⊢ T ➡*[h, o] T2 → T1 = T → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊⬊*[h, o] T2 + ) → ⦃G, L⦄ ⊢ ⬊⬊*[h, o] T1. /4 width=3 by csxa_intro/ qed-. (* Basic_1: was just: sn3_pr3_trans (old version) *) -lemma csxa_cpxs_trans: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1 → - ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T2. -#h #g #G #L #T1 #H elim H -T1 #T1 #HT1 #IHT1 #T2 #HLT12 +lemma csxa_cpxs_trans: ∀h,o,G,L,T1. ⦃G, L⦄ ⊢ ⬊⬊*[h, o] T1 → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 → ⦃G, L⦄ ⊢ ⬊⬊*[h, o] T2. +#h #o #G #L #T1 #H elim H -T1 #T1 #HT1 #IHT1 #T2 #HLT12 @csxa_intro #T #HLT2 #HT2 elim (eq_term_dec T1 T2) #HT12 [ -IHT1 -HLT12 destruct /3 width=1 by/ @@ -65,10 +65,10 @@ elim (eq_term_dec T1 T2) #HT12 qed. (* Basic_1: was just: sn3_pr2_intro (old version) *) -lemma csxa_intro_cpx: ∀h,g,G,L,T1. ( - ∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T2 - ) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1. -#h #g #G #L #T1 #H +lemma csxa_intro_cpx: ∀h,o,G,L,T1. ( + ∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, o] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊⬊*[h, o] T2 + ) → ⦃G, L⦄ ⊢ ⬊⬊*[h, o] T1. +#h #o #G #L #T1 #H @csxa_intro_aux #T #T2 #H @(cpxs_ind_dx … H) -T [ -H #H destruct #H elim H // @@ -82,26 +82,26 @@ qed. (* Main properties **********************************************************) -theorem csx_csxa: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T. -#h #g #G #L #T #H @(csx_ind … H) -T /4 width=1 by csxa_intro_cpx/ +theorem csx_csxa: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, o] T → ⦃G, L⦄ ⊢ ⬊⬊*[h, o] T. +#h #o #G #L #T #H @(csx_ind … H) -T /4 width=1 by csxa_intro_cpx/ qed. -theorem csxa_csx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊*[h, g] T. -#h #g #G #L #T #H @(csxa_ind … H) -T /4 width=1 by cpx_cpxs, csx_intro/ +theorem csxa_csx: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ⬊⬊*[h, o] T → ⦃G, L⦄ ⊢ ⬊*[h, o] T. +#h #o #G #L #T #H @(csxa_ind … H) -T /4 width=1 by cpx_cpxs, csx_intro/ qed. (* Basic_1: was just: sn3_pr3_trans *) -lemma csx_cpxs_trans: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → - ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ ⬊*[h, g] T2. -#h #g #G #L #T1 #HT1 #T2 #H @(cpxs_ind … H) -T2 /2 width=3 by csx_cpx_trans/ +lemma csx_cpxs_trans: ∀h,o,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, o] T1 → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 → ⦃G, L⦄ ⊢ ⬊*[h, o] T2. +#h #o #G #L #T1 #HT1 #T2 #H @(cpxs_ind … H) -T2 /2 width=3 by csx_cpx_trans/ qed-. (* Main eliminators *********************************************************) -lemma csx_ind_alt: ∀h,g,G,L. ∀R:predicate term. - (∀T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → - (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 +lemma csx_ind_alt: ∀h,o,G,L. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ ⬊*[h, o] T1 → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 → (T1 = T2 → ⊥) → R T2) → R T1 ) → - ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R T. -#h #g #G #L #R #H0 #T1 #H @(csxa_ind … (csx_csxa … H)) -T1 /4 width=1 by csxa_csx/ + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, o] T → R T. +#h #o #G #L #R #H0 #T1 #H @(csxa_ind … (csx_csxa … H)) -T1 /4 width=1 by csxa_csx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_fpbs.ma index 6b7fcd333..c756c4ab8 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_fpbs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_fpbs.ma @@ -20,14 +20,14 @@ include "basic_2/computation/csx_lpx.ma". (* Advanced properties ******************************************************) -lemma csx_fpb_conf: ∀h,g,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → - ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. -#h #g #G1 #L1 #T1 #HT1 #G2 #L2 #T2 * +lemma csx_fpb_conf: ∀h,o,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, o] T1 → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≽[h, o] ⦃G2, L2, T2⦄ → ⦃G2, L2⦄ ⊢ ⬊*[h, o] T2. +#h #o #G1 #L1 #T1 #HT1 #G2 #L2 #T2 * /2 width=5 by csx_cpx_trans, csx_fquq_conf, csx_lpx_conf, csx_lleq_conf/ qed-. -lemma csx_fpbs_conf: ∀h,g,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → - ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. -#h #g #G1 #L1 #T1 #HT1 #G2 #L2 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 +lemma csx_fpbs_conf: ∀h,o,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, o] T1 → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ⦃G2, L2⦄ ⊢ ⬊*[h, o] T2. +#h #o #G1 #L1 #T1 #HT1 #G2 #L2 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 /2 width=5 by csx_fpb_conf/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lift.ma index fabd9b1b9..354b59a21 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lift.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lift.ma @@ -21,9 +21,9 @@ include "basic_2/computation/csx.ma". (* Relocation properties ****************************************************) (* Basic_1: was just: sn3_lift *) -lemma csx_lift: ∀h,g,G,L2,L1,T1,s,l,m. ⦃G, L1⦄ ⊢ ⬊*[h, g] T1 → - ∀T2. ⬇[s, l, m] L2 ≡ L1 → ⬆[l, m] T1 ≡ T2 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T2. -#h #g #G #L2 #L1 #T1 #s #l #m #H elim H -T1 #T1 #_ #IHT1 #T2 #HL21 #HT12 +lemma csx_lift: ∀h,o,G,L2,L1,T1,c,l,k. ⦃G, L1⦄ ⊢ ⬊*[h, o] T1 → + ∀T2. ⬇[c, l, k] L2 ≡ L1 → ⬆[l, k] T1 ≡ T2 → ⦃G, L2⦄ ⊢ ⬊*[h, o] T2. +#h #o #G #L2 #L1 #T1 #c #l #k #H elim H -T1 #T1 #_ #IHT1 #T2 #HL21 #HT12 @csx_intro #T #HLT2 #HT2 elim (cpx_inv_lift1 … HLT2 … HL21 … HT12) -HLT2 #T0 #HT0 #HLT10 @(IHT1 … HLT10) // -L1 -L2 #H destruct @@ -31,11 +31,11 @@ elim (cpx_inv_lift1 … HLT2 … HL21 … HT12) -HLT2 #T0 #HT0 #HLT10 qed. (* Basic_1: was just: sn3_gen_lift *) -lemma csx_inv_lift: ∀h,g,G,L2,L1,T1,s,l,m. ⦃G, L1⦄ ⊢ ⬊*[h, g] T1 → - ∀T2. ⬇[s, l, m] L1 ≡ L2 → ⬆[l, m] T2 ≡ T1 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T2. -#h #g #G #L2 #L1 #T1 #s #l #m #H elim H -T1 #T1 #_ #IHT1 #T2 #HL12 #HT21 +lemma csx_inv_lift: ∀h,o,G,L2,L1,T1,c,l,k. ⦃G, L1⦄ ⊢ ⬊*[h, o] T1 → + ∀T2. ⬇[c, l, k] L1 ≡ L2 → ⬆[l, k] T2 ≡ T1 → ⦃G, L2⦄ ⊢ ⬊*[h, o] T2. +#h #o #G #L2 #L1 #T1 #c #l #k #H elim H -T1 #T1 #_ #IHT1 #T2 #HL12 #HT21 @csx_intro #T #HLT2 #HT2 -elim (lift_total T l m) #T0 #HT0 +elim (lift_total T l k) #T0 #HT0 lapply (cpx_lift … HLT2 … HL12 … HT21 … HT0) -HLT2 #HLT10 @(IHT1 … HLT10) // -L1 -L2 #H destruct >(lift_inj … HT0 … HT21) in HT2; -T1 /2 width=1 by/ @@ -44,9 +44,9 @@ qed. (* Advanced inversion lemmas ************************************************) (* Basic_1: was: sn3_gen_def *) -lemma csx_inv_lref_bind: ∀h,g,I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → - ⦃G, L⦄ ⊢ ⬊*[h, g] #i → ⦃G, K⦄ ⊢ ⬊*[h, g] V. -#h #g #I #G #L #K #V #i #HLK #Hi +lemma csx_inv_lref_bind: ∀h,o,I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → + ⦃G, L⦄ ⊢ ⬊*[h, o] #i → ⦃G, K⦄ ⊢ ⬊*[h, o] V. +#h #o #I #G #L #K #V #i #HLK #Hi elim (lift_total V 0 (i+1)) /4 width=9 by csx_inv_lift, csx_cpx_trans, cpx_delta, drop_fwd_drop2/ qed-. @@ -54,8 +54,8 @@ qed-. (* Advanced properties ******************************************************) (* Basic_1: was just: sn3_abbr *) -lemma csx_lref_bind: ∀h,g,I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ ⬊*[h, g] V → ⦃G, L⦄ ⊢ ⬊*[h, g] #i. -#h #g #I #G #L #K #V #i #HLK #HV +lemma csx_lref_bind: ∀h,o,I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ ⬊*[h, o] V → ⦃G, L⦄ ⊢ ⬊*[h, o] #i. +#h #o #I #G #L #K #V #i #HLK #HV @csx_intro #X #H #Hi elim (cpx_inv_lref1 … H) -H [ #H destruct elim Hi // @@ -65,10 +65,10 @@ elim (cpx_inv_lref1 … H) -H ] qed. -lemma csx_appl_simple: ∀h,g,G,L,V. ⦃G, L⦄ ⊢ ⬊*[h, g] V → ∀T1. - (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.T2) → - 𝐒⦃T1⦄ → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.T1. -#h #g #G #L #V #H @(csx_ind … H) -V #V #_ #IHV #T1 #IHT1 #HT1 +lemma csx_appl_simple: ∀h,o,G,L,V. ⦃G, L⦄ ⊢ ⬊*[h, o] V → ∀T1. + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, o] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, o] ⓐV.T2) → + 𝐒⦃T1⦄ → ⦃G, L⦄ ⊢ ⬊*[h, o] ⓐV.T1. +#h #o #G #L #V #H @(csx_ind … H) -V #V #_ #IHV #T1 #IHT1 #HT1 @csx_intro #X #H1 #H2 elim (cpx_inv_appl1_simple … H1) // -H1 #V0 #T0 #HLV0 #HLT10 #H destruct @@ -79,29 +79,29 @@ elim (eq_false_inv_tpair_dx … H2) -H2 ] qed. -lemma csx_fqu_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → - ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +lemma csx_fqu_conf: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ⬊*[h, o] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, o] T2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 /2 width=8 by csx_inv_lref_bind, csx_inv_lift, csx_fwd_flat_dx, csx_fwd_bind_dx, csx_fwd_pair_sn/ qed-. -lemma csx_fquq_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → - ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H12 #H elim (fquq_inv_gen … H12) -H12 +lemma csx_fquq_conf: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ⬊*[h, o] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, o] T2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H12 #H elim (fquq_inv_gen … H12) -H12 [ /2 width=5 by csx_fqu_conf/ | * #HG #HL #HT destruct // ] qed-. -lemma csx_fqup_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → - ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +lemma csx_fqup_conf: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ⬊*[h, o] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, o] T2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 /3 width=5 by csx_fqu_conf/ qed-. -lemma csx_fqus_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → - ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H12 #H elim (fqus_inv_gen … H12) -H12 +lemma csx_fqus_conf: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ⬊*[h, o] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, o] T2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H12 #H elim (fqus_inv_gen … H12) -H12 [ /2 width=5 by csx_fqup_conf/ | * #HG #HL #HT destruct // ] @@ -109,10 +109,10 @@ qed-. (* Main properties **********************************************************) -theorem csx_gcp: ∀h,g. gcp (cpx h g) (eq …) (csx h g). -#h #g @mk_gcp +theorem csx_gcp: ∀h,o. gcp (cpx h o) (eq …) (csx h o). +#h #o @mk_gcp [ normalize /3 width=13 by cnx_lift/ -| #G #L elim (deg_total h g 0) /3 width=8 by cnx_sort_iter, ex_intro/ +| #G #L elim (deg_total h o 0) /3 width=8 by cnx_sort_iter, ex_intro/ | /2 width=8 by csx_lift/ | /2 width=3 by csx_fwd_flat_dx/ ] diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lleq.ma index 765861e3b..71009c473 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lleq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lleq.ma @@ -19,12 +19,12 @@ include "basic_2/computation/csx.ma". (* Properties on lazy equivalence for local environments ********************) -lemma csx_lleq_conf: ∀h,g,G,L1,T. ⦃G, L1⦄ ⊢ ⬊*[h, g] T → - ∀L2. L1 ≡[T, 0] L2 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T. -#h #g #G #L1 #T #H @(csx_ind … H) -T +lemma csx_lleq_conf: ∀h,o,G,L1,T. ⦃G, L1⦄ ⊢ ⬊*[h, o] T → + ∀L2. L1 ≡[T, 0] L2 → ⦃G, L2⦄ ⊢ ⬊*[h, o] T. +#h #o #G #L1 #T #H @(csx_ind … H) -T /4 width=6 by csx_intro, cpx_lleq_conf_dx, lleq_cpx_trans/ qed-. -lemma csx_lleq_trans: ∀h,g,G,L1,L2,T. - L1 ≡[T, 0] L2 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T → ⦃G, L1⦄ ⊢ ⬊*[h, g] T. +lemma csx_lleq_trans: ∀h,o,G,L1,L2,T. + L1 ≡[T, 0] L2 → ⦃G, L2⦄ ⊢ ⬊*[h, o] T → ⦃G, L1⦄ ⊢ ⬊*[h, o] T. /3 width=3 by csx_lleq_conf, lleq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lpx.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lpx.ma index b87a08bb4..dd01e6a24 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lpx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lpx.ma @@ -21,15 +21,15 @@ include "basic_2/computation/csx_lift.ma". (* Advanced properties ******************************************************) -lemma csx_lpx_conf: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → - ∀T. ⦃G, L1⦄ ⊢ ⬊*[h, g] T → ⦃G, L2⦄ ⊢ ⬊*[h, g] T. -#h #g #G #L1 #L2 #HL12 #T #H @(csx_ind_alt … H) -T +lemma csx_lpx_conf: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, o] L2 → + ∀T. ⦃G, L1⦄ ⊢ ⬊*[h, o] T → ⦃G, L2⦄ ⊢ ⬊*[h, o] T. +#h #o #G #L1 #L2 #HL12 #T #H @(csx_ind_alt … H) -T /4 width=3 by csx_intro, lpx_cpx_trans/ qed-. -lemma csx_abst: ∀h,g,a,G,L,W. ⦃G, L⦄ ⊢ ⬊*[h, g] W → - ∀T. ⦃G, L.ⓛW⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓛ{a}W.T. -#h #g #a #G #L #W #HW @(csx_ind … HW) -W #W #_ #IHW #T #HT @(csx_ind … HT) -T #T #HT #IHT +lemma csx_abst: ∀h,o,a,G,L,W. ⦃G, L⦄ ⊢ ⬊*[h, o] W → + ∀T. ⦃G, L.ⓛW⦄ ⊢ ⬊*[h, o] T → ⦃G, L⦄ ⊢ ⬊*[h, o] ⓛ{a}W.T. +#h #o #a #G #L #W #HW @(csx_ind … HW) -W #W #_ #IHW #T #HT @(csx_ind … HT) -T #T #HT #IHT @csx_intro #X #H1 #H2 elim (cpx_inv_abst1 … H1) -H1 #W0 #T0 #HLW0 #HLT0 #H destruct @@ -40,9 +40,9 @@ elim (eq_false_inv_tpair_sn … H2) -H2 ] qed. -lemma csx_abbr: ∀h,g,a,G,L,V. ⦃G, L⦄ ⊢ ⬊*[h, g] V → - ∀T. ⦃G, L.ⓓV⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}V. T. -#h #g #a #G #L #V #HV elim HV -V #V #_ #IHV #T #HT @(csx_ind_alt … HT) -T #T #HT #IHT +lemma csx_abbr: ∀h,o,a,G,L,V. ⦃G, L⦄ ⊢ ⬊*[h, o] V → + ∀T. ⦃G, L.ⓓV⦄ ⊢ ⬊*[h, o] T → ⦃G, L⦄ ⊢ ⬊*[h, o] ⓓ{a}V. T. +#h #o #a #G #L #V #HV elim HV -V #V #_ #IHV #T #HT @(csx_ind_alt … HT) -T #T #HT #IHT @csx_intro #X #H1 #H2 elim (cpx_inv_abbr1 … H1) -H1 * [ #V1 #T1 #HLV1 #HLT1 #H destruct @@ -55,9 +55,9 @@ elim (cpx_inv_abbr1 … H1) -H1 * ] qed. -fact csx_appl_beta_aux: ∀h,g,a,G,L,U1. ⦃G, L⦄ ⊢ ⬊*[h, g] U1 → - ∀V,W,T1. U1 = ⓓ{a}ⓝW.V.T1 → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.ⓛ{a}W.T1. -#h #g #a #G #L #X #H @(csx_ind … H) -X +fact csx_appl_beta_aux: ∀h,o,a,G,L,U1. ⦃G, L⦄ ⊢ ⬊*[h, o] U1 → + ∀V,W,T1. U1 = ⓓ{a}ⓝW.V.T1 → ⦃G, L⦄ ⊢ ⬊*[h, o] ⓐV.ⓛ{a}W.T1. +#h #o #a #G #L #X #H @(csx_ind … H) -X #X #HT1 #IHT1 #V #W #T1 #H1 destruct @csx_intro #X #H1 #H2 elim (cpx_inv_appl1 … H1) -H1 * @@ -73,12 +73,12 @@ elim (cpx_inv_appl1 … H1) -H1 * qed-. (* Basic_1: was just: sn3_beta *) -lemma csx_appl_beta: ∀h,g,a,G,L,V,W,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}ⓝW.V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.ⓛ{a}W.T. +lemma csx_appl_beta: ∀h,o,a,G,L,V,W,T. ⦃G, L⦄ ⊢ ⬊*[h, o] ⓓ{a}ⓝW.V.T → ⦃G, L⦄ ⊢ ⬊*[h, o] ⓐV.ⓛ{a}W.T. /2 width=3 by csx_appl_beta_aux/ qed. -fact csx_appl_theta_aux: ∀h,g,a,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, g] U → ∀V1,V2. ⬆[0, 1] V1 ≡ V2 → - ∀V,T. U = ⓓ{a}V.ⓐV2.T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV1.ⓓ{a}V.T. -#h #g #a #G #L #X #H @(csx_ind_alt … H) -X #X #HVT #IHVT #V1 #V2 #HV12 #V #T #H destruct +fact csx_appl_theta_aux: ∀h,o,a,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, o] U → ∀V1,V2. ⬆[0, 1] V1 ≡ V2 → + ∀V,T. U = ⓓ{a}V.ⓐV2.T → ⦃G, L⦄ ⊢ ⬊*[h, o] ⓐV1.ⓓ{a}V.T. +#h #o #a #G #L #X #H @(csx_ind_alt … H) -X #X #HVT #IHVT #V1 #V2 #HV12 #V #T #H destruct lapply (csx_fwd_pair_sn … HVT) #HV lapply (csx_fwd_bind_dx … HVT) -HVT #HVT @csx_intro #X #HL #H @@ -113,15 +113,15 @@ elim (cpx_inv_appl1 … HL) -HL * ] qed-. -lemma csx_appl_theta: ∀h,g,a,V1,V2. ⬆[0, 1] V1 ≡ V2 → - ∀G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}V.ⓐV2.T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV1.ⓓ{a}V.T. +lemma csx_appl_theta: ∀h,o,a,V1,V2. ⬆[0, 1] V1 ≡ V2 → + ∀G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, o] ⓓ{a}V.ⓐV2.T → ⦃G, L⦄ ⊢ ⬊*[h, o] ⓐV1.ⓓ{a}V.T. /2 width=5 by csx_appl_theta_aux/ qed. (* Basic_1: was just: sn3_appl_appl *) -lemma csx_appl_simple_tsts: ∀h,g,G,L,V. ⦃G, L⦄ ⊢ ⬊*[h, g] V → ∀T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → - (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 ≂ T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.T2) → - 𝐒⦃T1⦄ → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.T1. -#h #g #G #L #V #H @(csx_ind … H) -V #V #_ #IHV #T1 #H @(csx_ind … H) -T1 #T1 #H1T1 #IHT1 #H2T1 #H3T1 +lemma csx_appl_simple_tsts: ∀h,o,G,L,V. ⦃G, L⦄ ⊢ ⬊*[h, o] V → ∀T1. ⦃G, L⦄ ⊢ ⬊*[h, o] T1 → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 → (T1 ≂ T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, o] ⓐV.T2) → + 𝐒⦃T1⦄ → ⦃G, L⦄ ⊢ ⬊*[h, o] ⓐV.T1. +#h #o #G #L #V #H @(csx_ind … H) -V #V #_ #IHV #T1 #H @(csx_ind … H) -T1 #T1 #H1T1 #IHT1 #H2T1 #H3T1 @csx_intro #X #HL #H elim (cpx_inv_appl1_simple … HL) -HL // #V0 #T0 #HLV0 #HLT10 #H0 destruct diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lpxs.ma index d49b6e7ae..9d06a4142 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_lpxs.ma @@ -19,7 +19,7 @@ include "basic_2/computation/lpxs.ma". (* Properties on sn extended parallel computation for local environments ****) -lemma csx_lpxs_conf: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → - ∀T. ⦃G, L1⦄ ⊢ ⬊*[h, g] T → ⦃G, L2⦄ ⊢ ⬊*[h, g] T. -#h #g #G #L1 #L2 #H @(lpxs_ind … H) -L2 /3 by lpxs_strap1, csx_lpx_conf/ +lemma csx_lpxs_conf: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → + ∀T. ⦃G, L1⦄ ⊢ ⬊*[h, o] T → ⦃G, L2⦄ ⊢ ⬊*[h, o] T. +#h #o #G #L1 #L2 #H @(lpxs_ind … H) -L2 /3 by lpxs_strap1, csx_lpx_conf/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_tsts_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_tsts_vector.ma index d420563d7..8e3aa6e3f 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_tsts_vector.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_tsts_vector.ma @@ -22,9 +22,9 @@ include "basic_2/computation/csx_vector.ma". (* Advanced properties ******************************************************) (* Basic_1: was just: sn3_appls_lref *) -lemma csx_applv_cnx: ∀h,g,G,L,T. 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → - ∀Vs. ⦃G, L⦄ ⊢ ⬊*[h, g] Vs → ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.T. -#h #g #G #L #T #H1T #H2T #Vs elim Vs -Vs [ #_ @(cnx_csx … H2T) ] (**) (* /2 width=1/ does not work *) +lemma csx_applv_cnx: ∀h,o,G,L,T. 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, o] 𝐍⦃T⦄ → + ∀Vs. ⦃G, L⦄ ⊢ ⬊*[h, o] Vs → ⦃G, L⦄ ⊢ ⬊*[h, o] ⒶVs.T. +#h #o #G #L #T #H1T #H2T #Vs elim Vs -Vs [ #_ @(cnx_csx … H2T) ] (**) (* /2 width=1/ does not work *) #V #Vs #IHV #H elim (csxv_inv_cons … H) -H #HV #HVs @csx_appl_simple_tsts /2 width=1 by applv_simple/ -IHV -HV -HVs @@ -33,10 +33,10 @@ lapply (cpxs_fwd_cnx_vector … H) -H // -H1T -H2T #H elim (H0) -H0 // qed. -lemma csx_applv_sort: ∀h,g,G,L,k,Vs. ⦃G, L⦄ ⊢ ⬊*[h, g] Vs → ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.⋆k. -#h #g #G #L #k elim (deg_total h g k) -#d generalize in match k; -k @(nat_ind_plus … d) -d [ /3 width=6 by csx_applv_cnx, cnx_sort, simple_atom/ ] -#d #IHd #k #Hkd lapply (deg_next_SO … Hkd) -Hkd +lemma csx_applv_sort: ∀h,o,G,L,s,Vs. ⦃G, L⦄ ⊢ ⬊*[h, o] Vs → ⦃G, L⦄ ⊢ ⬊*[h, o] ⒶVs.⋆s. +#h #o #G #L #s elim (deg_total h o s) +#d generalize in match s; -s @(nat_ind_plus … d) -d [ /3 width=6 by csx_applv_cnx, cnx_sort, simple_atom/ ] +#d #IHd #s #Hkd lapply (deg_next_SO … Hkd) -Hkd #Hkd #Vs elim Vs -Vs /2 width=1 by/ #V #Vs #IHVs #HVVs elim (csxv_inv_cons … HVVs) #HV #HVs @@ -44,14 +44,14 @@ elim (csxv_inv_cons … HVVs) #HV #HVs #X #H #H0 elim (cpxs_fwd_sort_vector … H) -H #H [ elim H0 -H0 // -| -H0 @(csx_cpxs_trans … (Ⓐ(V@Vs).⋆(next h k))) /2 width=1 by cpxs_flat_dx/ +| -H0 @(csx_cpxs_trans … (Ⓐ(V@Vs).⋆(next h s))) /2 width=1 by cpxs_flat_dx/ ] qed. (* Basic_1: was just: sn3_appls_beta *) -lemma csx_applv_beta: ∀h,g,a,G,L,Vs,V,W,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.ⓓ{a}ⓝW.V.T → - ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs. ⓐV.ⓛ{a}W.T. -#h #g #a #G #L #Vs elim Vs -Vs /2 width=1 by csx_appl_beta/ +lemma csx_applv_beta: ∀h,o,a,G,L,Vs,V,W,T. ⦃G, L⦄ ⊢ ⬊*[h, o] ⒶVs.ⓓ{a}ⓝW.V.T → + ⦃G, L⦄ ⊢ ⬊*[h, o] ⒶVs. ⓐV.ⓛ{a}W.T. +#h #o #a #G #L #Vs elim Vs -Vs /2 width=1 by csx_appl_beta/ #V0 #Vs #IHV #V #W #T #H1T lapply (csx_fwd_pair_sn … H1T) #HV0 lapply (csx_fwd_flat_dx … H1T) #H2T @@ -63,10 +63,10 @@ elim (cpxs_fwd_beta_vector … H) -H #H ] qed. -lemma csx_applv_delta: ∀h,g,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 → +lemma csx_applv_delta: ∀h,o,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 → ∀V2. ⬆[0, i + 1] V1 ≡ V2 → - ∀Vs. ⦃G, L⦄ ⊢ ⬊*[h, g] (ⒶVs.V2) → ⦃G, L⦄ ⊢ ⬊*[h, g] (ⒶVs.#i). -#h #g #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs + ∀Vs. ⦃G, L⦄ ⊢ ⬊*[h, o] (ⒶVs.V2) → ⦃G, L⦄ ⊢ ⬊*[h, o] (ⒶVs.#i). +#h #o #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs [ /4 width=12 by csx_inv_lift, csx_lref_bind, drop_fwd_drop2/ | #V #Vs #IHV #H1T lapply (csx_fwd_pair_sn … H1T) #HV @@ -81,28 +81,28 @@ lemma csx_applv_delta: ∀h,g,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 → qed. (* Basic_1: was just: sn3_appls_abbr *) -lemma csx_applv_theta: ∀h,g,a,G,L,V1s,V2s. ⬆[0, 1] V1s ≡ V2s → - ∀V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}V.ⒶV2s.T → - ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶV1s.ⓓ{a}V.T. -#h #g #a #G #L #V1s #V2s * -V1s -V2s /2 width=1 by/ -#V1s #V2s #V1 #V2 #HV12 #H +lemma csx_applv_theta: ∀h,o,a,G,L,V1c,V2c. ⬆[0, 1] V1c ≡ V2c → + ∀V,T. ⦃G, L⦄ ⊢ ⬊*[h, o] ⓓ{a}V.ⒶV2c.T → + ⦃G, L⦄ ⊢ ⬊*[h, o] ⒶV1c.ⓓ{a}V.T. +#h #o #a #G #L #V1c #V2c * -V1c -V2c /2 width=1 by/ +#V1c #V2c #V1 #V2 #HV12 #H generalize in match HV12; -HV12 generalize in match V2; -V2 generalize in match V1; -V1 -elim H -V1s -V2s /2 width=3 by csx_appl_theta/ -#V1s #V2s #V1 #V2 #HV12 #HV12s #IHV12s #W1 #W2 #HW12 #V #T #H +elim H -V1c -V2c /2 width=3 by csx_appl_theta/ +#V1c #V2c #V1 #V2 #HV12 #HV12c #IHV12c #W1 #W2 #HW12 #V #T #H lapply (csx_appl_theta … HW12 … H) -H -HW12 #H lapply (csx_fwd_pair_sn … H) #HW1 lapply (csx_fwd_flat_dx … H) #H1 -@csx_appl_simple_tsts /2 width=3 by simple_flat/ -IHV12s -HW1 -H1 #X #H1 #H2 -elim (cpxs_fwd_theta_vector … (V2@V2s) … H1) -H1 /2 width=1 by liftv_cons/ -HV12s -HV12 +@csx_appl_simple_tsts /2 width=3 by simple_flat/ -IHV12c -HW1 -H1 #X #H1 #H2 +elim (cpxs_fwd_theta_vector … (V2@V2c) … H1) -H1 /2 width=1 by liftv_cons/ -HV12c -HV12 [ -H #H elim H2 -H2 // | -H2 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/ ] qed. (* Basic_1: was just: sn3_appls_cast *) -lemma csx_applv_cast: ∀h,g,G,L,Vs,W,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.W → ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.T → - ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.ⓝW.T. -#h #g #G #L #Vs elim Vs -Vs /2 width=1 by csx_cast/ +lemma csx_applv_cast: ∀h,o,G,L,Vs,W,T. ⦃G, L⦄ ⊢ ⬊*[h, o] ⒶVs.W → ⦃G, L⦄ ⊢ ⬊*[h, o] ⒶVs.T → + ⦃G, L⦄ ⊢ ⬊*[h, o] ⒶVs.ⓝW.T. +#h #o #G #L #Vs elim Vs -Vs /2 width=1 by csx_cast/ #V #Vs #IHV #W #T #H1W #H1T lapply (csx_fwd_pair_sn … H1W) #HV lapply (csx_fwd_flat_dx … H1W) #H2W @@ -116,13 +116,13 @@ elim (cpxs_fwd_cast_vector … H) -H #H ] qed. -theorem csx_gcr: ∀h,g. gcr (cpx h g) (eq …) (csx h g) (csx h g). -#h #g @mk_gcr // +theorem csx_gcr: ∀h,o. gcr (cpx h o) (eq …) (csx h o) (csx h o). +#h #o @mk_gcr // [ /3 width=1 by csx_applv_cnx/ |2,3,6: /2 width=1 by csx_applv_beta, csx_applv_sort, csx_applv_cast/ | /2 width=7 by csx_applv_delta/ -| #G #L #V1s #V2s #HV12s #a #V #T #H #HV - @(csx_applv_theta … HV12s) -HV12s +| #G #L #V1c #V2c #HV12c #a #V #T #H #HV + @(csx_applv_theta … HV12c) -HV12c @csx_abbr // ] qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_vector.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_vector.ma index 5b4d465cb..95269945f 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/csx_vector.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/csx_vector.ma @@ -18,23 +18,23 @@ include "basic_2/computation/csx.ma". (* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERM VECTORS *************) definition csxv: ∀h. sd h → relation3 genv lenv (list term) ≝ - λh,g,G,L. all … (csx h g G L). + λh,o,G,L. all … (csx h o G L). interpretation "context-sensitive strong normalization (term vector)" - 'SN h g G L Ts = (csxv h g G L Ts). + 'SN h o G L Ts = (csxv h o G L Ts). (* Basic inversion lemmas ***************************************************) -lemma csxv_inv_cons: ∀h,g,G,L,T,Ts. ⦃G, L⦄ ⊢ ⬊*[h, g] T @ Ts → - ⦃G, L⦄ ⊢ ⬊*[h, g] T ∧ ⦃G, L⦄ ⊢ ⬊*[h, g] Ts. +lemma csxv_inv_cons: ∀h,o,G,L,T,Ts. ⦃G, L⦄ ⊢ ⬊*[h, o] T @ Ts → + ⦃G, L⦄ ⊢ ⬊*[h, o] T ∧ ⦃G, L⦄ ⊢ ⬊*[h, o] Ts. normalize // qed-. (* Basic forward lemmas *****************************************************) -lemma csx_fwd_applv: ∀h,g,G,L,T,Vs. ⦃G, L⦄ ⊢ ⬊*[h, g] Ⓐ Vs.T → - ⦃G, L⦄ ⊢ ⬊*[h, g] Vs ∧ ⦃G, L⦄ ⊢ ⬊*[h, g] T. -#h #g #G #L #T #Vs elim Vs -Vs /2 width=1 by conj/ +lemma csx_fwd_applv: ∀h,o,G,L,T,Vs. ⦃G, L⦄ ⊢ ⬊*[h, o] Ⓐ Vs.T → + ⦃G, L⦄ ⊢ ⬊*[h, o] Vs ∧ ⦃G, L⦄ ⊢ ⬊*[h, o] T. +#h #o #G #L #T #Vs elim Vs -Vs /2 width=1 by conj/ #V #Vs #IHVs #HVs lapply (csx_fwd_pair_sn … HVs) #HV lapply (csx_fwd_flat_dx … HVs) -HVs #HVs diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg.ma index 5c8a6bd20..c1e2b94c1 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg.ma @@ -19,21 +19,21 @@ include "basic_2/computation/fpbs.ma". (* "QRST" PROPER PARALLEL COMPUTATION FOR CLOSURES **************************) definition fpbg: ∀h. sd h → tri_relation genv lenv term ≝ - λh,g,G1,L1,T1,G2,L2,T2. - ∃∃G,L,T. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G, L, T⦄ & ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄. + λh,o,G1,L1,T1,G2,L2,T2. + ∃∃G,L,T. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G, L, T⦄ & ⦃G, L, T⦄ ≥[h, o] ⦃G2, L2, T2⦄. interpretation "'qrst' proper parallel computation (closure)" - 'LazyBTPRedStarProper h g G1 L1 T1 G2 L2 T2 = (fpbg h g G1 L1 T1 G2 L2 T2). + 'LazyBTPRedStarProper h o G1 L1 T1 G2 L2 T2 = (fpbg h o G1 L1 T1 G2 L2 T2). (* Basic properties *********************************************************) -lemma fpb_fpbg: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +lemma fpb_fpbg: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄. /2 width=5 by ex2_3_intro/ qed. -lemma fpbg_fpbq_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. - ⦃G1, L1, T1⦄ >≡[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≽[h, g] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 * +lemma fpbg_fpbq_trans: ∀h,o,G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ >≡[h, o] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≽[h, o] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 * /3 width=9 by fpbs_strap1, ex2_3_intro/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_fleq.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_fleq.ma index 71ed202d7..ed03b2549 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_fleq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_fleq.ma @@ -20,34 +20,34 @@ include "basic_2/computation/fpbg.ma". (* Properties on lazy equivalence for closures ******************************) -lemma fpbg_fleq_trans: ∀h,g,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G, L, T⦄ → - ∀G2,L2,T2. ⦃G, L, T⦄ ≡[0] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +lemma fpbg_fleq_trans: ∀h,o,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ >≡[h, o] ⦃G, L, T⦄ → + ∀G2,L2,T2. ⦃G, L, T⦄ ≡[0] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄. /3 width=5 by fpbg_fpbq_trans, fleq_fpbq/ qed-. -lemma fleq_fpbg_trans: ∀h,g,G,G2,L,L2,T,T2. ⦃G, L, T⦄ >≡[h, g] ⦃G2, L2, T2⦄ → - ∀G1,L1,T1. ⦃G1, L1, T1⦄ ≡[0] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. -#h #g #G #G2 #L #L2 #T #T2 * #G0 #L0 #T0 #H0 #H02 #G1 #L1 #T1 #H1 +lemma fleq_fpbg_trans: ∀h,o,G,G2,L,L2,T,T2. ⦃G, L, T⦄ >≡[h, o] ⦃G2, L2, T2⦄ → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ ≡[0] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄. +#h #o #G #G2 #L #L2 #T #T2 * #G0 #L0 #T0 #H0 #H02 #G1 #L1 #T1 #H1 elim (fleq_fpb_trans … H1 … H0) -G -L -T /4 width=9 by fpbs_strap2, fleq_fpbq, ex2_3_intro/ qed-. (* alternative definition of fpbs *******************************************) -lemma fleq_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. - ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 * /2 width=1 by lleq_fpbs/ +lemma fleq_fpbs: ∀h,o,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 * /2 width=1 by lleq_fpbs/ qed. -lemma fpbg_fwd_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. - ⦃G1, L1, T1⦄ >≡[h,g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 * +lemma fpbg_fwd_fpbs: ∀h,o,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ >≡[h,o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 * /3 width=5 by fpbs_strap2, fpb_fpbq/ qed-. -lemma fpbs_fpbg: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → +lemma fpbs_fpbg: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ ∨ - ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 + ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 [ /2 width=1 by or_introl/ | #G #G2 #L #L2 #T #T2 #_ #H2 * #H1 @(fpbq_ind_alt … H2) -H2 #H2 [ /3 width=5 by fleq_trans, or_introl/ @@ -61,10 +61,10 @@ qed-. (* Advanced properties of "qrst" parallel computation on closures ***********) -lemma fpbs_fpb_trans: ∀h,g,F1,F2,K1,K2,T1,T2. ⦃F1, K1, T1⦄ ≥[h, g] ⦃F2, K2, T2⦄ → - ∀G2,L2,U2. ⦃F2, K2, T2⦄ ≻[h, g] ⦃G2, L2, U2⦄ → - ∃∃G1,L1,U1. ⦃F1, K1, T1⦄ ≻[h, g] ⦃G1, L1, U1⦄ & ⦃G1, L1, U1⦄ ≥[h, g] ⦃G2, L2, U2⦄. -#h #g #F1 #F2 #K1 #K2 #T1 #T2 #H elim (fpbs_fpbg … H) -H +lemma fpbs_fpb_trans: ∀h,o,F1,F2,K1,K2,T1,T2. ⦃F1, K1, T1⦄ ≥[h, o] ⦃F2, K2, T2⦄ → + ∀G2,L2,U2. ⦃F2, K2, T2⦄ ≻[h, o] ⦃G2, L2, U2⦄ → + ∃∃G1,L1,U1. ⦃F1, K1, T1⦄ ≻[h, o] ⦃G1, L1, U1⦄ & ⦃G1, L1, U1⦄ ≥[h, o] ⦃G2, L2, U2⦄. +#h #o #F1 #F2 #K1 #K2 #T1 #T2 #H elim (fpbs_fpbg … H) -H [ #H12 #G2 #L2 #U2 #H2 elim (fleq_fpb_trans … H12 … H2) -F2 -K2 -T2 /3 width=5 by fleq_fpbs, ex2_3_intro/ | * #H1 #H2 #H3 #H4 #H5 #H6 #H7 #H8 #H9 diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_fpbg.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_fpbg.ma index bbbcc2487..28748f278 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_fpbg.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_fpbg.ma @@ -18,5 +18,5 @@ include "basic_2/computation/fpbg_fpbs.ma". (* Main properties **********************************************************) -theorem fpbg_trans: ∀h,g. tri_transitive … (fpbg h g). +theorem fpbg_trans: ∀h,o. tri_transitive … (fpbg h o). /3 width=5 by fpbg_fpbs_trans, fpbg_fwd_fpbs/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_fpbs.ma index e39f3a5a3..df666294c 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_fpbs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_fpbs.ma @@ -20,49 +20,49 @@ include "basic_2/computation/fpbg_fleq.ma". (* Properties on "qrst" parallel reduction on closures **********************) -lemma fpb_fpbg_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. - ⦃G1, L1, T1⦄ ≻[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ >≡[h, g] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +lemma fpb_fpbg_trans: ∀h,o,G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ ≻[h, o] ⦃G, L, T⦄ → ⦃G, L, T⦄ >≡[h, o] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄. /3 width=5 by fpbg_fwd_fpbs, ex2_3_intro/ qed-. -lemma fpbq_fpbg_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. - ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ >≡[h, g] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 @(fpbq_ind_alt … H1) -H1 +lemma fpbq_fpbg_trans: ∀h,o,G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ ≽[h, o] ⦃G, L, T⦄ → ⦃G, L, T⦄ >≡[h, o] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 @(fpbq_ind_alt … H1) -H1 /2 width=5 by fleq_fpbg_trans, fpb_fpbg_trans/ qed-. (* Properties on "qrst" parallel compuutation on closures *******************) -lemma fpbs_fpbg_trans: ∀h,g,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → - ∀G2,L2,T2. ⦃G, L, T⦄ >≡[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G #L1 #L #T1 #T #H @(fpbs_ind … H) -G -L -T /3 width=5 by fpbq_fpbg_trans/ +lemma fpbs_fpbg_trans: ∀h,o,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ → + ∀G2,L2,T2. ⦃G, L, T⦄ >≡[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G #L1 #L #T1 #T #H @(fpbs_ind … H) -G -L -T /3 width=5 by fpbq_fpbg_trans/ qed-. (* Note: this is used in the closure proof *) -lemma fpbg_fpbs_trans: ∀h,g,G,G2,L,L2,T,T2. ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → - ∀G1,L1,T1. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. -#h #g #G #G2 #L #L2 #T #T2 #H @(fpbs_ind_dx … H) -G -L -T /3 width=5 by fpbg_fpbq_trans/ +lemma fpbg_fpbs_trans: ∀h,o,G,G2,L,L2,T,T2. ⦃G, L, T⦄ ≥[h, o] ⦃G2, L2, T2⦄ → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ >≡[h, o] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄. +#h #o #G #G2 #L #L2 #T #T2 #H @(fpbs_ind_dx … H) -G -L -T /3 width=5 by fpbg_fpbq_trans/ qed-. (* Note: this is used in the closure proof *) -lemma fqup_fpbg: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqup_inv_step_sn … H) -H +lemma fqup_fpbg: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqup_inv_step_sn … H) -H /3 width=5 by fqus_fpbs, fpb_fqu, ex2_3_intro/ qed. -lemma cpxs_fpbg: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → - (T1 = T2 → ⊥) → ⦃G, L, T1⦄ >≡[h, g] ⦃G, L, T2⦄. -#h #g #G #L #T1 #T2 #H #H0 elim (cpxs_neq_inv_step_sn … H … H0) -H -H0 +lemma cpxs_fpbg: ∀h,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 → + (T1 = T2 → ⊥) → ⦃G, L, T1⦄ >≡[h, o] ⦃G, L, T2⦄. +#h #o #G #L #T1 #T2 #H #H0 elim (cpxs_neq_inv_step_sn … H … H0) -H -H0 /4 width=5 by cpxs_fpbs, fpb_cpx, ex2_3_intro/ qed. -lemma lstas_fpbg: ∀h,g,G,L,T1,T2,d2. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → (T1 = T2 → ⊥) → - ∀d1. d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → ⦃G, L, T1⦄ >≡[h, g] ⦃G, L, T2⦄. +lemma lstas_fpbg: ∀h,o,G,L,T1,T2,d2. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → (T1 = T2 → ⊥) → + ∀d1. d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ▪[h, o] d1 → ⦃G, L, T1⦄ >≡[h, o] ⦃G, L, T2⦄. /3 width=5 by lstas_cpxs, cpxs_fpbg/ qed. -lemma lpxs_fpbg: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → - (L1 ≡[T, 0] L2 → ⊥) → ⦃G, L1, T⦄ >≡[h, g] ⦃G, L2, T⦄. -#h #g #G #L1 #L2 #T #H #H0 elim (lpxs_nlleq_inv_step_sn … H … H0) -H -H0 +lemma lpxs_fpbg: ∀h,o,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → + (L1 ≡[T, 0] L2 → ⊥) → ⦃G, L1, T⦄ >≡[h, o] ⦃G, L2, T⦄. +#h #o #G #L1 #L2 #T #H #H0 elim (lpxs_nlleq_inv_step_sn … H … H0) -H -H0 /4 width=5 by fpb_lpx, lpxs_lleq_fpbs, ex2_3_intro/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_lift.ma index d34676e48..a0f4edbb8 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_lift.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_lift.ma @@ -19,6 +19,6 @@ include "basic_2/computation/fpbg.ma". (* Advanced properties ******************************************************) -lemma sta_fpbg: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 ▪[h, g] d+1 → - ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → ⦃G, L, T1⦄ >≡[h, g] ⦃G, L, T2⦄. +lemma sta_fpbg: ∀h,o,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 ▪[h, o] d+1 → + ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → ⦃G, L, T1⦄ >≡[h, o] ⦃G, L, T2⦄. /4 width=2 by fpb_fpbg, sta_fpb/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs.ma index 79670f2a2..125efb684 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs.ma @@ -21,141 +21,141 @@ include "basic_2/computation/lpxs.ma". (* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************) definition fpbs: ∀h. sd h → tri_relation genv lenv term ≝ - λh,g. tri_TC … (fpbq h g). + λh,o. tri_TC … (fpbq h o). interpretation "'qrst' parallel computation (closure)" - 'BTPRedStar h g G1 L1 T1 G2 L2 T2 = (fpbs h g G1 L1 T1 G2 L2 T2). + 'BTPRedStar h o G1 L1 T1 G2 L2 T2 = (fpbs h o G1 L1 T1 G2 L2 T2). (* Basic eliminators ********************************************************) -lemma fpbs_ind: ∀h,g,G1,L1,T1. ∀R:relation3 genv lenv term. R G1 L1 T1 → - (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≽[h, g] ⦃G2, L2, T2⦄ → R G L T → R G2 L2 T2) → - ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2. +lemma fpbs_ind: ∀h,o,G1,L1,T1. ∀R:relation3 genv lenv term. R G1 L1 T1 → + (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≽[h, o] ⦃G2, L2, T2⦄ → R G L T → R G2 L2 T2) → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → R G2 L2 T2. /3 width=8 by tri_TC_star_ind/ qed-. -lemma fpbs_ind_dx: ∀h,g,G2,L2,T2. ∀R:relation3 genv lenv term. R G2 L2 T2 → - (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → R G L T → R G1 L1 T1) → - ∀G1,L1,T1. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → R G1 L1 T1. +lemma fpbs_ind_dx: ∀h,o,G2,L2,T2. ∀R:relation3 genv lenv term. R G2 L2 T2 → + (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≽[h, o] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≥[h, o] ⦃G2, L2, T2⦄ → R G L T → R G1 L1 T1) → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → R G1 L1 T1. /3 width=8 by tri_TC_star_ind_dx/ qed-. (* Basic properties *********************************************************) -lemma fpbs_refl: ∀h,g. tri_reflexive … (fpbs h g). +lemma fpbs_refl: ∀h,o. tri_reflexive … (fpbs h o). /2 width=1 by tri_inj/ qed. -lemma fpbq_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +lemma fpbq_fpbs: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, o] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. /2 width=1 by tri_inj/ qed. -lemma fpbs_strap1: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → - ⦃G, L, T⦄ ≽[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +lemma fpbs_strap1: ∀h,o,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ≽[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. /2 width=5 by tri_step/ qed-. -lemma fpbs_strap2: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ → - ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +lemma fpbs_strap2: ∀h,o,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≽[h, o] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. /2 width=5 by tri_TC_strap/ qed-. -lemma fqup_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +lemma fqup_fpbs: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 /4 width=5 by fqu_fquq, fpbq_fquq, tri_step/ qed. -lemma fqus_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 +lemma fqus_fpbs: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 /3 width=5 by fpbq_fquq, tri_step/ qed. -lemma cpxs_fpbs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L, T1⦄ ≥[h, g] ⦃G, L, T2⦄. -#h #g #G #L #T1 #T2 #H @(cpxs_ind … H) -T2 +lemma cpxs_fpbs: ∀h,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2 → ⦃G, L, T1⦄ ≥[h, o] ⦃G, L, T2⦄. +#h #o #G #L #T1 #T2 #H @(cpxs_ind … H) -T2 /3 width=5 by fpbq_cpx, fpbs_strap1/ qed. -lemma lpxs_fpbs: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄. -#h #g #G #L1 #L2 #T #H @(lpxs_ind … H) -L2 +lemma lpxs_fpbs: ∀h,o,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → ⦃G, L1, T⦄ ≥[h, o] ⦃G, L2, T⦄. +#h #o #G #L1 #L2 #T #H @(lpxs_ind … H) -L2 /3 width=5 by fpbq_lpx, fpbs_strap1/ qed. -lemma lleq_fpbs: ∀h,g,G,L1,L2,T. L1 ≡[T, 0] L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄. +lemma lleq_fpbs: ∀h,o,G,L1,L2,T. L1 ≡[T, 0] L2 → ⦃G, L1, T⦄ ≥[h, o] ⦃G, L2, T⦄. /3 width=1 by fpbq_fpbs, fpbq_lleq/ qed. -lemma cprs_fpbs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L, T1⦄ ≥[h, g] ⦃G, L, T2⦄. +lemma cprs_fpbs: ∀h,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L, T1⦄ ≥[h, o] ⦃G, L, T2⦄. /3 width=1 by cprs_cpxs, cpxs_fpbs/ qed. -lemma lprs_fpbs: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄. +lemma lprs_fpbs: ∀h,o,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1, T⦄ ≥[h, o] ⦃G, L2, T⦄. /3 width=1 by lprs_lpxs, lpxs_fpbs/ qed. -lemma fpbs_fqus_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → - ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H @(fqus_ind … H) -G2 -L2 -T2 +lemma fpbs_fqus_trans: ∀h,o,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H @(fqus_ind … H) -G2 -L2 -T2 /3 width=5 by fpbs_strap1, fpbq_fquq/ qed-. -lemma fpbs_fqup_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → - ⦃G, L, T⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +lemma fpbs_fqup_trans: ∀h,o,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. /3 width=5 by fpbs_fqus_trans, fqup_fqus/ qed-. -lemma fpbs_cpxs_trans: ∀h,g,G1,G,L1,L,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → - ⦃G, L⦄ ⊢ T ➡*[h, g] T2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T2⦄. -#h #g #G1 #G #L1 #L #T1 #T #T2 #H1 #H @(cpxs_ind … H) -T2 +lemma fpbs_cpxs_trans: ∀h,o,G1,G,L1,L,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ → + ⦃G, L⦄ ⊢ T ➡*[h, o] T2 → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T2⦄. +#h #o #G1 #G #L1 #L #T1 #T #T2 #H1 #H @(cpxs_ind … H) -T2 /3 width=5 by fpbs_strap1, fpbq_cpx/ qed-. -lemma fpbs_lpxs_trans: ∀h,g,G1,G,L1,L,L2,T1,T. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → - ⦃G, L⦄ ⊢ ➡*[h, g] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L2, T⦄. -#h #g #G1 #G #L1 #L #L2 #T1 #T #H1 #H @(lpxs_ind … H) -L2 +lemma fpbs_lpxs_trans: ∀h,o,G1,G,L1,L,L2,T1,T. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ → + ⦃G, L⦄ ⊢ ➡*[h, o] L2 → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L2, T⦄. +#h #o #G1 #G #L1 #L #L2 #T1 #T #H1 #H @(lpxs_ind … H) -L2 /3 width=5 by fpbs_strap1, fpbq_lpx/ qed-. -lemma fpbs_lleq_trans: ∀h,g,G1,G,L1,L,L2,T1,T. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → - L ≡[T, 0] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L2, T⦄. +lemma fpbs_lleq_trans: ∀h,o,G1,G,L1,L,L2,T1,T. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L, T⦄ → + L ≡[T, 0] L2 → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G, L2, T⦄. /3 width=5 by fpbs_strap1, fpbq_lleq/ qed-. -lemma fqus_fpbs_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H @(fqus_ind_dx … H) -G1 -L1 -T1 +lemma fqus_fpbs_trans: ∀h,o,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G, L, T⦄ ≥[h, o] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H @(fqus_ind_dx … H) -G1 -L1 -T1 /3 width=5 by fpbs_strap2, fpbq_fquq/ qed-. -lemma cpxs_fpbs_trans: ∀h,g,G1,G2,L1,L2,T1,T,T2. ⦃G1, L1, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → - ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G2 #L1 #L2 #T1 #T #T2 #H1 #H @(cpxs_ind_dx … H) -T1 +lemma cpxs_fpbs_trans: ∀h,o,G1,G2,L1,L2,T1,T,T2. ⦃G1, L1, T⦄ ≥[h, o] ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ T1 ➡*[h, o] T → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G2 #L1 #L2 #T1 #T #T2 #H1 #H @(cpxs_ind_dx … H) -T1 /3 width=5 by fpbs_strap2, fpbq_cpx/ qed-. -lemma lpxs_fpbs_trans: ∀h,g,G1,G2,L1,L,L2,T1,T2. ⦃G1, L, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → - ⦃G1, L1⦄ ⊢ ➡*[h, g] L → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G2 #L1 #L #L2 #T1 #T2 #H1 #H @(lpxs_ind_dx … H) -L1 +lemma lpxs_fpbs_trans: ∀h,o,G1,G2,L1,L,L2,T1,T2. ⦃G1, L, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ➡*[h, o] L → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G2 #L1 #L #L2 #T1 #T2 #H1 #H @(lpxs_ind_dx … H) -L1 /3 width=5 by fpbs_strap2, fpbq_lpx/ qed-. -lemma lleq_fpbs_trans: ∀h,g,G1,G2,L1,L,L2,T1,T2. ⦃G1, L, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → - L1 ≡[T1, 0] L → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +lemma lleq_fpbs_trans: ∀h,o,G1,G2,L1,L,L2,T1,T2. ⦃G1, L, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → + L1 ≡[T1, 0] L → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. /3 width=5 by fpbs_strap2, fpbq_lleq/ qed-. -lemma cpxs_fqus_fpbs: ∀h,g,G1,G2,L1,L2,T1,T,T2. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → - ⦃G1, L1, T⦄ ⊐* ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +lemma cpxs_fqus_fpbs: ∀h,o,G1,G2,L1,L2,T1,T,T2. ⦃G1, L1⦄ ⊢ T1 ➡*[h, o] T → + ⦃G1, L1, T⦄ ⊐* ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. /3 width=5 by fpbs_fqus_trans, cpxs_fpbs/ qed. -lemma cpxs_fqup_fpbs: ∀h,g,G1,G2,L1,L2,T1,T,T2. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → - ⦃G1, L1, T⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +lemma cpxs_fqup_fpbs: ∀h,o,G1,G2,L1,L2,T1,T,T2. ⦃G1, L1⦄ ⊢ T1 ➡*[h, o] T → + ⦃G1, L1, T⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. /3 width=5 by fpbs_fqup_trans, cpxs_fpbs/ qed. -lemma fqus_lpxs_fpbs: ∀h,g,G1,G2,L1,L,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L, T2⦄ → - ⦃G2, L⦄ ⊢ ➡*[h, g] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +lemma fqus_lpxs_fpbs: ∀h,o,G1,G2,L1,L,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L, T2⦄ → + ⦃G2, L⦄ ⊢ ➡*[h, o] L2 → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. /3 width=3 by fpbs_lpxs_trans, fqus_fpbs/ qed. -lemma cpxs_fqus_lpxs_fpbs: ∀h,g,G1,G2,L1,L,L2,T1,T,T2. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → - ⦃G1, L1, T⦄ ⊐* ⦃G2, L, T2⦄ → ⦃G2, L⦄ ⊢ ➡*[h, g] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +lemma cpxs_fqus_lpxs_fpbs: ∀h,o,G1,G2,L1,L,L2,T1,T,T2. ⦃G1, L1⦄ ⊢ T1 ➡*[h, o] T → + ⦃G1, L1, T⦄ ⊐* ⦃G2, L, T2⦄ → ⦃G2, L⦄ ⊢ ➡*[h, o] L2 → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. /3 width=5 by cpxs_fqus_fpbs, fpbs_lpxs_trans/ qed. -lemma lpxs_lleq_fpbs: ∀h,g,G,L1,L,L2,T. ⦃G, L1⦄ ⊢ ➡*[h, g] L → - L ≡[T, 0] L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄. +lemma lpxs_lleq_fpbs: ∀h,o,G,L1,L,L2,T. ⦃G, L1⦄ ⊢ ➡*[h, o] L → + L ≡[T, 0] L2 → ⦃G, L1, T⦄ ≥[h, o] ⦃G, L2, T⦄. /3 width=3 by lpxs_fpbs_trans, lleq_fpbs/ qed. (* Note: this is used in the closure proof *) -lemma cpr_lpr_fpbs: ∀h,g,G,L1,L2,T1,T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ⦃G, L1⦄ ⊢ ➡ L2 → - ⦃G, L1, T1⦄ ≥[h, g] ⦃G, L2, T2⦄. +lemma cpr_lpr_fpbs: ∀h,o,G,L1,L2,T1,T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ⦃G, L1⦄ ⊢ ➡ L2 → + ⦃G, L1, T1⦄ ≥[h, o] ⦃G, L2, T2⦄. /4 width=5 by fpbs_strap1, fpbq_fpbs, lpr_fpbq, cpr_fpbq/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_aaa.ma index 372b571b6..5432caf82 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_aaa.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_aaa.ma @@ -19,9 +19,9 @@ include "basic_2/computation/fpbs.ma". (* Properties on atomic arity assignment for terms **************************) -lemma fpbs_aaa_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → +lemma fpbs_aaa_conf: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 /2 width=2 by ex_intro/ +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 /2 width=2 by ex_intro/ #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #A #HA elim (IH1 … HA) -IH1 -A /2 width=8 by fpbq_aaa_conf/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_alt.ma index cc6ae1362..2f6753934 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_alt.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_alt.ma @@ -22,19 +22,19 @@ include "basic_2/computation/fpbs.ma". (* Note: alternative definition of fpbs *) definition fpbsa: ∀h. sd h → tri_relation genv lenv term ≝ - λh,g,G1,L1,T1,G2,L2,T2. - ∃∃L0,L,T. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T & + λh,o,G1,L1,T1,G2,L2,T2. + ∃∃L0,L,T. ⦃G1, L1⦄ ⊢ T1 ➡*[h, o] T & ⦃G1, L1, T⦄ ⊐* ⦃G2, L0, T2⦄ & - ⦃G2, L0⦄ ⊢ ➡*[h, g] L & L ≡[T2, 0] L2. + ⦃G2, L0⦄ ⊢ ➡*[h, o] L & L ≡[T2, 0] L2. interpretation "'big tree' parallel computation (closure) alternative" - 'BTPRedStarAlt h g G1 L1 T1 G2 L2 T2 = (fpbsa h g G1 L1 T1 G2 L2 T2). + 'BTPRedStarAlt h o G1 L1 T1 G2 L2 T2 = (fpbsa h o G1 L1 T1 G2 L2 T2). (* Basic properties *********************************************************) -lemma fpb_fpbsa_trans: ∀h,g,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ → - ∀G2,L2,T2. ⦃G, L, T⦄ ≥≥[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥≥[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G #L1 #L #T1 #T * -G -L -T [ #G #L #T #HG1 | #T #HT1 | #L #HL1 | #L #HL1 ] +lemma fpb_fpbsa_trans: ∀h,o,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≽[h, o] ⦃G, L, T⦄ → + ∀G2,L2,T2. ⦃G, L, T⦄ ≥≥[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥≥[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G #L1 #L #T1 #T * -G -L -T [ #G #L #T #HG1 | #T #HT1 | #L #HL1 | #L #HL1 ] #G2 #L2 #T2 * #L00 #L0 #T0 #HT0 #HG2 #HL00 #HL02 [ elim (fquq_cpxs_trans … HT0 … HG1) -T /3 width=7 by fqus_strap2, ex4_3_intro/ @@ -52,31 +52,31 @@ qed-. (* Main properties **********************************************************) -theorem fpbs_fpbsa: ∀h,g,G1,G2,L1,L2,T1,T2. - ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥≥[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind_dx … H) -G1 -L1 -T1 +theorem fpbs_fpbsa: ∀h,o,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥≥[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind_dx … H) -G1 -L1 -T1 /2 width=7 by fpb_fpbsa_trans, ex4_3_intro/ qed. (* Main inversion lemmas ****************************************************) -theorem fpbsa_inv_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. - ⦃G1, L1, T1⦄ ≥≥[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 * +theorem fpbsa_inv_fpbs: ∀h,o,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≥≥[h, o] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 * /3 width=5 by cpxs_fqus_lpxs_fpbs, fpbs_strap1, fpbq_lleq/ qed-. (* Advanced properties ******************************************************) -lemma fpbs_intro_alt: ∀h,g,G1,G2,L1,L0,L,L2,T1,T,T2. - ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → ⦃G1, L1, T⦄ ⊐* ⦃G2, L0, T2⦄ → - ⦃G2, L0⦄ ⊢ ➡*[h, g] L → L ≡[T2, 0] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ . +lemma fpbs_intro_alt: ∀h,o,G1,G2,L1,L0,L,L2,T1,T,T2. + ⦃G1, L1⦄ ⊢ T1 ➡*[h, o] T → ⦃G1, L1, T⦄ ⊐* ⦃G2, L0, T2⦄ → + ⦃G2, L0⦄ ⊢ ➡*[h, o] L → L ≡[T2, 0] L2 → ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ . /3 width=7 by fpbsa_inv_fpbs, ex4_3_intro/ qed. (* Advanced inversion lemmas *************************************************) -lemma fpbs_inv_alt: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → - ∃∃L0,L,T. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T & +lemma fpbs_inv_alt: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → + ∃∃L0,L,T. ⦃G1, L1⦄ ⊢ T1 ➡*[h, o] T & ⦃G1, L1, T⦄ ⊐* ⦃G2, L0, T2⦄ & - ⦃G2, L0⦄ ⊢ ➡*[h, g] L & L ≡[T2, 0] L2. + ⦃G2, L0⦄ ⊢ ➡*[h, o] L & L ≡[T2, 0] L2. /2 width=1 by fpbs_fpbsa/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_fpb.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_fpb.ma index 00d015628..b9c657735 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_fpb.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_fpb.ma @@ -19,10 +19,10 @@ include "basic_2/computation/fpbs_alt.ma". (* Properties on extended context-sensitive parallel computation for terms **) -lemma fpbs_cpx_trans_neq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → - ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h, g] U2 → (T2 = U2 → ⊥) → - ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, g] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ≥[h, g] ⦃G2, L2, U2⦄. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 #HnTU2 elim (fpbs_inv_alt … H) -H +lemma fpbs_cpx_trans_neq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h, o] U2 → (T2 = U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, o] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ≥[h, o] ⦃G2, L2, U2⦄. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 #HnTU2 elim (fpbs_inv_alt … H) -H #L00 #L0 #T0 #HT10 #H10 #HL00 #HL02 lapply (lleq_cpx_trans … HTU2 … HL02) -HTU2 #HTU2 lapply (cpx_lleq_conf_sn … HTU2 … HL02) -HL02 #HL02 lapply (lpxs_cpx_trans … HTU2 … HL00) -HTU2 @@ -36,6 +36,6 @@ qed-. (* Properties on "rst" proper parallel reduction on closures ****************) -lemma fpb_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +lemma fpb_fpbs: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄. /3 width=1 by fpbq_fpbs, fpb_fpbq/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_fpbs.ma index 68b07b4d3..d3d14d184 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_fpbs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_fpbs.ma @@ -18,5 +18,5 @@ include "basic_2/computation/fpbs.ma". (* Main properties **********************************************************) -theorem fpbs_trans: ∀h,g. tri_transitive … (fpbs h g). +theorem fpbs_trans: ∀h,o. tri_transitive … (fpbs h o). /2 width=5 by tri_TC_transitive/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_lift.ma index a1edecf0c..69f1a77fa 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_lift.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_lift.ma @@ -19,18 +19,18 @@ include "basic_2/computation/fpbs.ma". (* Advanced properties ******************************************************) -lemma lstas_fpbs: ∀h,g,G,L,T1,T2,d2. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → - ∀d1. d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → ⦃G, L, T1⦄ ≥[h, g] ⦃G, L, T2⦄. +lemma lstas_fpbs: ∀h,o,G,L,T1,T2,d2. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → + ∀d1. d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ▪[h, o] d1 → ⦃G, L, T1⦄ ≥[h, o] ⦃G, L, T2⦄. /3 width=5 by cpxs_fpbs, lstas_cpxs/ qed. -lemma sta_fpbs: ∀h,g,G,L,T,U,d. - ⦃G, L⦄ ⊢ T ▪[h, g] d+1 → ⦃G, L⦄ ⊢ T •*[h, 1] U → - ⦃G, L, T⦄ ≥[h, g] ⦃G, L, U⦄. +lemma sta_fpbs: ∀h,o,G,L,T,U,d. + ⦃G, L⦄ ⊢ T ▪[h, o] d+1 → ⦃G, L⦄ ⊢ T •*[h, 1] U → + ⦃G, L, T⦄ ≥[h, o] ⦃G, L, U⦄. /2 width=5 by lstas_fpbs/ qed. (* Note: this is used in the closure proof *) -lemma cpr_lpr_sta_fpbs: ∀h,g,G,L1,L2,T1,T2,U2,d2. +lemma cpr_lpr_sta_fpbs: ∀h,o,G,L1,L2,T1,T2,U2,d2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ⦃G, L1⦄ ⊢ ➡ L2 → - ⦃G, L2⦄ ⊢ T2 ▪[h, g] d2+1 → ⦃G, L2⦄ ⊢ T2 •*[h, 1] U2 → - ⦃G, L1, T1⦄ ≥[h, g] ⦃G, L2, U2⦄. + ⦃G, L2⦄ ⊢ T2 ▪[h, o] d2+1 → ⦃G, L2⦄ ⊢ T2 •*[h, 1] U2 → + ⦃G, L1, T1⦄ ≥[h, o] ⦃G, L2, U2⦄. /4 width=5 by fpbs_strap1, cpr_lpr_fpbs, sta_cpx, fpbq_cpx/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fsb.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fsb.ma index c87433c2d..c27ffaba5 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fsb.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fsb.ma @@ -18,30 +18,30 @@ include "basic_2/computation/csx.ma". (* "QRST" STRONGLY NORMALIZING CLOSURES *************************************) -inductive fsb (h) (g): relation3 genv lenv term ≝ +inductive fsb (h) (o): relation3 genv lenv term ≝ | fsb_intro: ∀G1,L1,T1. ( - ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → fsb h g G2 L2 T2 - ) → fsb h g G1 L1 T1 + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ → fsb h o G2 L2 T2 + ) → fsb h o G1 L1 T1 . interpretation "'qrst' strong normalization (closure)" - 'BTSN h g G L T = (fsb h g G L T). + 'BTSN h o G L T = (fsb h o G L T). (* Basic eliminators ********************************************************) -lemma fsb_ind_alt: ∀h,g. ∀R: relation3 …. ( - ∀G1,L1,T1. ⦥[h,g] ⦃G1, L1, T1⦄ → ( - ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2 +lemma fsb_ind_alt: ∀h,o. ∀R: relation3 …. ( + ∀G1,L1,T1. ⦥[h,o] ⦃G1, L1, T1⦄ → ( + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ → R G2 L2 T2 ) → R G1 L1 T1 ) → - ∀G,L,T. ⦥[h, g] ⦃G, L, T⦄ → R G L T. -#h #g #R #IH #G #L #T #H elim H -G -L -T + ∀G,L,T. ⦥[h, o] ⦃G, L, T⦄ → R G L T. +#h #o #R #IH #G #L #T #H elim H -G -L -T /4 width=1 by fsb_intro/ qed-. (* Basic inversion lemmas ***************************************************) -lemma fsb_inv_csx: ∀h,g,G,L,T. ⦥[h, g] ⦃G, L, T⦄ → ⦃G, L⦄ ⊢ ⬊*[h, g] T. -#h #g #G #L #T #H elim H -G -L -T /5 width=1 by csx_intro, fpb_cpx/ +lemma fsb_inv_csx: ∀h,o,G,L,T. ⦥[h, o] ⦃G, L, T⦄ → ⦃G, L⦄ ⊢ ⬊*[h, o] T. +#h #o #G #L #T #H elim H -G -L -T /5 width=1 by csx_intro, fpb_cpx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fsb_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fsb_aaa.ma index 5a8d5d240..05bb29c01 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fsb_aaa.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fsb_aaa.ma @@ -21,50 +21,50 @@ include "basic_2/computation/fsb_csx.ma". (* Main properties **********************************************************) (* Note: this is the "big tree" theorem ("RST" version) *) -theorem aaa_fsb: ∀h,g,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦥[h, g] ⦃G, L, T⦄. +theorem aaa_fsb: ∀h,o,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦥[h, o] ⦃G, L, T⦄. /3 width=2 by aaa_csx, csx_fsb/ qed. (* Note: this is the "big tree" theorem ("QRST" version) *) -theorem aaa_fsba: ∀h,g,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦥⦥[h, g] ⦃G, L, T⦄. +theorem aaa_fsba: ∀h,o,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦥⦥[h, o] ⦃G, L, T⦄. /3 width=2 by fsb_fsba, aaa_fsb/ qed. (* Advanced eliminators on atomica arity assignment for terms ***************) -fact aaa_ind_fpb_aux: ∀h,g. ∀R:relation3 genv lenv term. +fact aaa_ind_fpb_aux: ∀h,o. ∀R:relation3 genv lenv term. (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → - (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ → R G2 L2 T2) → R G1 L1 T1 ) → - ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ∀A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. -#h #g #R #IH #G #L #T #H @(csx_ind_fpb … H) -G -L -T + ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, o] T → ∀A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. +#h #o #R #IH #G #L #T #H @(csx_ind_fpb … H) -G -L -T #G1 #L1 #T1 #H1 #IH1 #A1 #HTA1 @IH -IH // -#G2 #L2 #T2 #H12 elim (fpbs_aaa_conf h g … G2 … L2 … T2 … HTA1) -A1 +#G2 #L2 #T2 #H12 elim (fpbs_aaa_conf h o … G2 … L2 … T2 … HTA1) -A1 /2 width=2 by fpb_fpbs/ qed-. -lemma aaa_ind_fpb: ∀h,g. ∀R:relation3 genv lenv term. +lemma aaa_ind_fpb: ∀h,o. ∀R:relation3 genv lenv term. (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → - (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ → R G2 L2 T2) → R G1 L1 T1 ) → ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. /4 width=4 by aaa_ind_fpb_aux, aaa_csx/ qed-. -fact aaa_ind_fpbg_aux: ∀h,g. ∀R:relation3 genv lenv term. +fact aaa_ind_fpbg_aux: ∀h,o. ∀R:relation3 genv lenv term. (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → - (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄ → R G2 L2 T2) → R G1 L1 T1 ) → - ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ∀A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. -#h #g #R #IH #G #L #T #H @(csx_ind_fpbg … H) -G -L -T + ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, o] T → ∀A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. +#h #o #R #IH #G #L #T #H @(csx_ind_fpbg … H) -G -L -T #G1 #L1 #T1 #H1 #IH1 #A1 #HTA1 @IH -IH // -#G2 #L2 #T2 #H12 elim (fpbs_aaa_conf h g … G2 … L2 … T2 … HTA1) -A1 +#G2 #L2 #T2 #H12 elim (fpbs_aaa_conf h o … G2 … L2 … T2 … HTA1) -A1 /2 width=2 by fpbg_fwd_fpbs/ qed-. -lemma aaa_ind_fpbg: ∀h,g. ∀R:relation3 genv lenv term. +lemma aaa_ind_fpbg: ∀h,o. ∀R:relation3 genv lenv term. (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → - (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄ → R G2 L2 T2) → R G1 L1 T1 ) → ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fsb_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fsb_alt.ma index c132dae87..80c7a6449 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fsb_alt.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fsb_alt.ma @@ -19,64 +19,64 @@ include "basic_2/computation/fsb.ma". (* "QRST" STRONGLY NORMALIZING CLOSURES *************************************) (* Note: alternative definition of fsb *) -inductive fsba (h) (g): relation3 genv lenv term ≝ +inductive fsba (h) (o): relation3 genv lenv term ≝ | fsba_intro: ∀G1,L1,T1. ( - ∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → fsba h g G2 L2 T2 - ) → fsba h g G1 L1 T1. + ∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄ → fsba h o G2 L2 T2 + ) → fsba h o G1 L1 T1. interpretation "'big tree' strong normalization (closure) alternative" - 'BTSNAlt h g G L T = (fsba h g G L T). + 'BTSNAlt h o G L T = (fsba h o G L T). (* Basic eliminators ********************************************************) -lemma fsba_ind_alt: ∀h,g. ∀R: relation3 …. ( - ∀G1,L1,T1. ⦥⦥[h,g] ⦃G1, L1, T1⦄ → ( - ∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2 +lemma fsba_ind_alt: ∀h,o. ∀R: relation3 …. ( + ∀G1,L1,T1. ⦥⦥[h,o] ⦃G1, L1, T1⦄ → ( + ∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄ → R G2 L2 T2 ) → R G1 L1 T1 ) → - ∀G,L,T. ⦥⦥[h, g] ⦃G, L, T⦄ → R G L T. -#h #g #R #IH #G #L #T #H elim H -G -L -T + ∀G,L,T. ⦥⦥[h, o] ⦃G, L, T⦄ → R G L T. +#h #o #R #IH #G #L #T #H elim H -G -L -T /4 width=1 by fsba_intro/ qed-. (* Basic properties *********************************************************) -lemma fsba_fpbs_trans: ∀h,g,G1,L1,T1. ⦥⦥[h, g] ⦃G1, L1, T1⦄ → - ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦥⦥[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #L1 #T1 #H @(fsba_ind_alt … H) -G1 -L1 -T1 +lemma fsba_fpbs_trans: ∀h,o,G1,L1,T1. ⦥⦥[h, o] ⦃G1, L1, T1⦄ → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ⦥⦥[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #L1 #T1 #H @(fsba_ind_alt … H) -G1 -L1 -T1 /4 width=5 by fsba_intro, fpbs_fpbg_trans/ qed-. (* Main properties **********************************************************) -theorem fsb_fsba: ∀h,g,G,L,T. ⦥[h, g] ⦃G, L, T⦄ → ⦥⦥[h, g] ⦃G, L, T⦄. -#h #g #G #L #T #H @(fsb_ind_alt … H) -G -L -T +theorem fsb_fsba: ∀h,o,G,L,T. ⦥[h, o] ⦃G, L, T⦄ → ⦥⦥[h, o] ⦃G, L, T⦄. +#h #o #G #L #T #H @(fsb_ind_alt … H) -G -L -T #G1 #L1 #T1 #_ #IH @fsba_intro #G2 #L2 #T2 * /3 width=5 by fsba_fpbs_trans/ qed. (* Main inversion lemmas ****************************************************) -theorem fsba_inv_fsb: ∀h,g,G,L,T. ⦥⦥[h, g] ⦃G, L, T⦄ → ⦥[h, g] ⦃G, L, T⦄. -#h #g #G #L #T #H @(fsba_ind_alt … H) -G -L -T +theorem fsba_inv_fsb: ∀h,o,G,L,T. ⦥⦥[h, o] ⦃G, L, T⦄ → ⦥[h, o] ⦃G, L, T⦄. +#h #o #G #L #T #H @(fsba_ind_alt … H) -G -L -T /4 width=1 by fsb_intro, fpb_fpbg/ qed-. (* Advanced properties ******************************************************) -lemma fsb_fpbs_trans: ∀h,g,G1,L1,T1. ⦥[h, g] ⦃G1, L1, T1⦄ → - ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦥[h, g] ⦃G2, L2, T2⦄. +lemma fsb_fpbs_trans: ∀h,o,G1,L1,T1. ⦥[h, o] ⦃G1, L1, T1⦄ → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ⦥[h, o] ⦃G2, L2, T2⦄. /4 width=5 by fsba_inv_fsb, fsb_fsba, fsba_fpbs_trans/ qed-. (* Advanced eliminators *****************************************************) -lemma fsb_ind_fpbg: ∀h,g. ∀R:relation3 genv lenv term. - (∀G1,L1,T1. ⦥[h, g] ⦃G1, L1, T1⦄ → - (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → +lemma fsb_ind_fpbg: ∀h,o. ∀R:relation3 genv lenv term. + (∀G1,L1,T1. ⦥[h, o] ⦃G1, L1, T1⦄ → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄ → R G2 L2 T2) → R G1 L1 T1 ) → - ∀G1,L1,T1. ⦥[h, g] ⦃G1, L1, T1⦄ → R G1 L1 T1. -#h #g #R #IH #G1 #L1 #T1 #H @(fsba_ind_alt h g … G1 L1 T1) + ∀G1,L1,T1. ⦥[h, o] ⦃G1, L1, T1⦄ → R G1 L1 T1. +#h #o #R #IH #G1 #L1 #T1 #H @(fsba_ind_alt h o … G1 L1 T1) /3 width=1 by fsba_inv_fsb, fsb_fsba/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fsb_csx.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fsb_csx.ma index 403226304..e86c302b8 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fsb_csx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fsb_csx.ma @@ -22,9 +22,9 @@ include "basic_2/computation/fsb_alt.ma". (* Advanced propreties on context-sensitive extended normalizing terms ******) -lemma csx_fsb_fpbs: ∀h,g,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → - ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦥[h, g] ⦃G2, L2, T2⦄. -#h #g #G1 #L1 #T1 #H @(csx_ind … H) -T1 +lemma csx_fsb_fpbs: ∀h,o,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, o] T1 → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, o] ⦃G2, L2, T2⦄ → ⦥[h, o] ⦃G2, L2, T2⦄. +#h #o #G1 #L1 #T1 #H @(csx_ind … H) -T1 #T1 #HT1 #IHc #G2 #L2 #T2 @(fqup_wf_ind … G2 L2 T2) -G2 -L2 -T2 #G0 #L0 #T0 #IHu #H10 lapply (csx_fpbs_conf … H10) // -HT1 #HT0 generalize in match IHu; -IHu generalize in match H10; -H10 @@ -48,23 +48,23 @@ lemma csx_fsb_fpbs: ∀h,g,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → ] qed. -lemma csx_fsb: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦥[h, g] ⦃G, L, T⦄. +lemma csx_fsb: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, o] T → ⦥[h, o] ⦃G, L, T⦄. /2 width=5 by csx_fsb_fpbs/ qed. (* Advanced eliminators *****************************************************) -lemma csx_ind_fpb: ∀h,g. ∀R:relation3 genv lenv term. - (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → - (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → +lemma csx_ind_fpb: ∀h,o. ∀R:relation3 genv lenv term. + (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, o] T1 → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, o] ⦃G2, L2, T2⦄ → R G2 L2 T2) → R G1 L1 T1 ) → - ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R G L T. + ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, o] T → R G L T. /4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_alt/ qed-. -lemma csx_ind_fpbg: ∀h,g. ∀R:relation3 genv lenv term. - (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → - (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → +lemma csx_ind_fpbg: ∀h,o. ∀R:relation3 genv lenv term. + (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, o] T1 → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, o] ⦃G2, L2, T2⦄ → R G2 L2 T2) → R G1 L1 T1 ) → - ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R G L T. + ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, o] T → R G L T. /4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_fpbg/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/gcp.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/gcp.ma index 4266d9275..61e9182cd 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/gcp.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/gcp.ma @@ -26,12 +26,12 @@ definition CP0 ≝ λRR:relation4 genv lenv term term. λRS:relation term. ∀G. d_liftable1 (nf RR RS G) (Ⓕ). definition CP1 ≝ λRR:relation4 genv lenv term term. λRS:relation term. - ∀G,L. ∃k. NF … (RR G L) RS (⋆k). + ∀G,L. ∃s. NF … (RR G L) RS (⋆s). definition CP2 ≝ λRP:candidate. ∀G. d_liftable1 (RP G) (Ⓕ). definition CP3 ≝ λRP:candidate. - ∀G,L,T,k. RP G L (ⓐ⋆k.T) → RP G L T. + ∀G,L,T,s. RP G L (ⓐ⋆s.T) → RP G L T. (* requirements for generic computation properties *) record gcp (RR:relation4 genv lenv term term) (RS:relation term) (RP:candidate) : Prop ≝ diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/gcp_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/gcp_aaa.ma index 3428478ea..37dbb569e 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/gcp_aaa.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/gcp_aaa.ma @@ -29,10 +29,10 @@ theorem acr_aaa_csubc_lifts: ∀RR,RS,RP. ∀T0. ⬆*[cs] T ≡ T0 → ∀L2. G ⊢ L2 ⫃[RP] L0 → ⦃G, L2, T0⦄ ϵ[RP] 〚A〛. #RR #RS #RP #H1RP #H2RP #G #L1 #T #A #H elim H -G -L1 -T -A -[ #G #L #k #L0 #cs #HL0 #X #H #L2 #HL20 +[ #G #L #s #L0 #cs #HL0 #X #H #L2 #HL20 >(lifts_inv_sort1 … H) -H lapply (acr_gcr … H1RP H2RP (⓪)) #HAtom - lapply (s4 … HAtom G L2 (◊)) /2 width=1 by/ + lapply (c4 … HAtom G L2 (◊)) /2 width=1 by/ | #I #G #L1 #K1 #V1 #B #i #HLK1 #HKV1B #IHB #L0 #cs #HL01 #X #H #L2 #HL20 lapply (acr_gcr … H1RP H2RP B) #HB elim (lifts_inv_lref1 … H) -H #i1 #Hi1 #H destruct @@ -45,7 +45,7 @@ theorem acr_aaa_csubc_lifts: ∀RR,RS,RP. [ #K2 #HK20 #H destruct elim (lift_total V0 0 (i0 +1)) #V #HV0 elim (lifts_lift_trans … Hi0 … Hcs0 … HV10 … HV0) -HV10 #V2 #HV12 #HV2 - lapply (s5 … HB ? G ? ? (◊) … HV0 HLK2) /3 width=7 by drops_cons, lifts_cons/ (* Note: uses IHB HL20 V2 HV0 *) + lapply (c5 … HB ? G ? ? (◊) … HV0 HLK2) /3 width=7 by drops_cons, lifts_cons/ (* Note: uses IHB HL20 V2 HV0 *) | -HLK1 -IHB -HL01 -HL20 -HK1b -Hi0 -Hcs0 #K2 #V2 #A2 #HKV2A #H1KV0A #H2KV0A #_ #H1 #H2 destruct lapply (drop_fwd_drop2 … HLK2) #HLK2b @@ -53,15 +53,15 @@ theorem acr_aaa_csubc_lifts: ∀RR,RS,RP. lapply (aaa_mono … H2KV0A … HKV0B) #H destruct -H2KV0A -HKV0B elim (lift_total V0 0 (i0 +1)) #V3 #HV03 elim (lift_total V2 0 (i0 +1)) #V #HV2 - lapply (s5 … HB ? G ? ? (◊) … (ⓝV3.V) … HLK2) /2 width=1 by lift_flat/ - lapply (s7 … HB G L2 (◊)) /3 width=7 by gcr_lift/ + lapply (c5 … HB ? G ? ? (◊) … (ⓝV3.V) … HLK2) /2 width=1 by lift_flat/ + lapply (c7 … HB G L2 (◊)) /3 width=7 by gcr_lift/ ] | #a #G #L #V #T #B #A #_ #_ #IHB #IHA #L0 #cs #HL0 #X #H #L2 #HL20 elim (lifts_inv_bind1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct lapply (acr_gcr … H1RP H2RP A) #HA lapply (acr_gcr … H1RP H2RP B) #HB - lapply (s1 … HB) -HB #HB - lapply (s6 … HA G L2 (◊) (◊)) /4 width=5 by lsubc_pair, drops_skip, liftv_nil/ + lapply (c1 … HB) -HB #HB + lapply (c6 … HA G L2 (◊) (◊)) /4 width=5 by lsubc_pair, drops_skip, liftv_nil/ | #a #G #L #W #T #B #A #HLWB #_ #IHB #IHA #L0 #cs #HL0 #X #H #L2 #HL02 elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct @(acr_abst … H1RP H2RP) /2 width=5 by/ @@ -76,7 +76,7 @@ theorem acr_aaa_csubc_lifts: ∀RR,RS,RP. | #G #L #V #T #A #_ #_ #IH1A #IH2A #L0 #cs #HL0 #X #H #L2 #HL20 elim (lifts_inv_flat1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct lapply (acr_gcr … H1RP H2RP A) #HA - lapply (s7 … HA G L2 (◊)) /3 width=5 by/ + lapply (c7 … HA G L2 (◊)) /3 width=5 by/ ] qed. @@ -89,5 +89,5 @@ lemma gcr_aaa: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → RP G L T. #RR #RS #RP #H1RP #H2RP #G #L #T #A #HT lapply (acr_gcr … H1RP H2RP A) #HA -@(s1 … HA) /2 width=4 by acr_aaa/ +@(c1 … HA) /2 width=4 by acr_aaa/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/gcp_cr.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/gcp_cr.ma index b60a87aef..dee244aac 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/gcp_cr.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/gcp_cr.ma @@ -36,28 +36,28 @@ definition S3 ≝ λC:candidate. C G L (ⒶVs.ⓓ{a}ⓝW.V.T) → C G L (ⒶVs.ⓐV.ⓛ{a}W.T). definition S4 ≝ λRP,C:candidate. - ∀G,L,Vs. all … (RP G L) Vs → ∀k. C G L (ⒶVs.⋆k). + ∀G,L,Vs. all … (RP G L) Vs → ∀s. C G L (ⒶVs.⋆s). definition S5 ≝ λC:candidate. ∀I,G,L,K,Vs,V1,V2,i. C G L (ⒶVs.V2) → ⬆[0, i+1] V1 ≡ V2 → ⬇[i] L ≡ K.ⓑ{I}V1 → C G L (ⒶVs.#i). definition S6 ≝ λRP,C:candidate. - ∀G,L,V1s,V2s. ⬆[0, 1] V1s ≡ V2s → - ∀a,V,T. C G (L.ⓓV) (ⒶV2s.T) → RP G L V → C G L (ⒶV1s.ⓓ{a}V.T). + ∀G,L,V1c,V2c. ⬆[0, 1] V1c ≡ V2c → + ∀a,V,T. C G (L.ⓓV) (ⒶV2c.T) → RP G L V → C G L (ⒶV1c.ⓓ{a}V.T). definition S7 ≝ λC:candidate. ∀G,L,Vs,T,W. C G L (ⒶVs.T) → C G L (ⒶVs.W) → C G L (ⒶVs.ⓝW.T). (* requirements for the generic reducibility candidate *) record gcr (RR:relation4 genv lenv term term) (RS:relation term) (RP,C:candidate) : Prop ≝ -{ s1: S1 RP C; - s2: S2 RR RS RP C; - s3: S3 C; - s4: S4 RP C; - s5: S5 C; - s6: S6 RP C; - s7: S7 C +{ c1: S1 RP C; + c2: S2 RR RS RP C; + c3: S3 C; + c4: S4 RP C; + c5: S5 C; + c6: S6 RP C; + c7: S7 C }. (* the functional construction for candidates *) @@ -97,28 +97,28 @@ lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → #RR #RS #RP #H1RP #H2RP #A elim A -A // #B #A #IHB #IHA @mk_gcr [ #G #L #T #H - elim (cp1 … H1RP G L) #k #HK - lapply (H L (⋆k) T (◊) ? ? ?) -H // - [ lapply (s2 … IHB G L (◊) … HK) // - | /3 width=6 by s1, cp3/ + elim (cp1 … H1RP G L) #s #HK + lapply (H L (⋆s) T (◊) ? ? ?) -H // + [ lapply (c2 … IHB G L (◊) … HK) // + | /3 width=6 by c1, cp3/ ] | #G #L #Vs #HVs #T #H1T #H2T #L0 #V0 #X #cs #HL0 #H #HB - elim (lifts_inv_applv1 … H) -H #V0s #T0 #HV0s #HT0 #H destruct - lapply (s1 … IHB … HB) #HV0 - @(s2 … IHA … (V0 @ V0s)) + elim (lifts_inv_applv1 … H) -H #V0c #T0 #HV0c #HT0 #H destruct + lapply (c1 … IHB … HB) #HV0 + @(c2 … IHA … (V0 @ V0c)) /3 width=14 by gcp2_lifts_all, gcp2_lifts, gcp0_lifts, lifts_simple_dx, conj/ | #a #G #L #Vs #U #T #W #HA #L0 #V0 #X #cs #HL0 #H #HB - elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct + elim (lifts_inv_applv1 … H) -H #V0c #Y #HV0c #HY #H destruct elim (lifts_inv_flat1 … HY) -HY #U0 #X #HU0 #HX #H destruct elim (lifts_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT0 #H destruct - @(s3 … IHA … (V0 @ V0s)) /5 width=6 by lifts_applv, lifts_flat, lifts_bind/ -| #G #L #Vs #HVs #k #L0 #V0 #X #cs #HL0 #H #HB - elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct + @(c3 … IHA … (V0 @ V0c)) /5 width=6 by lifts_applv, lifts_flat, lifts_bind/ +| #G #L #Vs #HVs #s #L0 #V0 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0c #Y #HV0c #HY #H destruct >(lifts_inv_sort1 … HY) -Y - lapply (s1 … IHB … HB) #HV0 - @(s4 … IHA … (V0 @ V0s)) /3 width=7 by gcp2_lifts_all, conj/ + lapply (c1 … IHB … HB) #HV0 + @(c4 … IHA … (V0 @ V0c)) /3 width=7 by gcp2_lifts_all, conj/ | #I #G #L #K #Vs #V1 #V2 #i #HA #HV12 #HLK #L0 #V0 #X #cs #HL0 #H #HB - elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct + elim (lifts_inv_applv1 … H) -H #V0c #Y #HV0c #HY #H destruct elim (lifts_inv_lref1 … HY) -HY #i0 #Hi0 #H destruct elim (drops_drop_trans … HL0 … HLK) #X #cs0 #i1 #HL02 #H #Hi1 #Hcs0 >(at_mono … Hi1 … Hi0) in HL02; -i1 #HL02 @@ -126,23 +126,23 @@ lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → elim (lift_total W1 0 (i0 + 1)) #W2 #HW12 elim (lifts_lift_trans … Hcs0 … HVW1 … HW12) // -Hcs0 -Hi0 #V3 #HV13 #HVW2 >(lift_mono … HV13 … HV12) in HVW2; -V3 #HVW2 - @(s5 … IHA … (V0 @ V0s) … HW12 HL02) /3 width=5 by lifts_applv/ -| #G #L #V1s #V2s #HV12s #a #V #T #HA #HV #L0 #V10 #X #cs #HL0 #H #HB - elim (lifts_inv_applv1 … H) -H #V10s #Y #HV10s #HY #H destruct + @(c5 … IHA … (V0 @ V0c) … HW12 HL02) /3 width=5 by lifts_applv/ +| #G #L #V1c #V2c #HV12c #a #V #T #HA #HV #L0 #V10 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V10c #Y #HV10c #HY #H destruct elim (lifts_inv_bind1 … HY) -HY #V0 #T0 #HV0 #HT0 #H destruct elim (lift_total V10 0 1) #V20 #HV120 - elim (liftv_total 0 1 V10s) #V20s #HV120s - @(s6 … IHA … (V10 @ V10s) (V20 @ V20s)) /3 width=7 by gcp2_lifts, liftv_cons/ + elim (liftv_total 0 1 V10c) #V20c #HV120c + @(c6 … IHA … (V10 @ V10c) (V20 @ V20c)) /3 width=7 by gcp2_lifts, liftv_cons/ @(HA … (cs + 1)) /2 width=2 by drops_skip/ [ @lifts_applv // - elim (liftsv_liftv_trans_le … HV10s … HV120s) -V10s #V10s #HV10s #HV120s - >(liftv_mono … HV12s … HV10s) -V1s // + elim (liftsv_liftv_trans_le … HV10c … HV120c) -V10c #V10c #HV10c #HV120c + >(liftv_mono … HV12c … HV10c) -V1c // | @(gcr_lift … H1RP … HB … HV120) /2 width=2 by drop_drop/ ] | #G #L #Vs #T #W #HA #HW #L0 #V0 #X #cs #HL0 #H #HB - elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct + elim (lifts_inv_applv1 … H) -H #V0c #Y #HV0c #HY #H destruct elim (lifts_inv_flat1 … HY) -HY #W0 #T0 #HW0 #HT0 #H destruct - @(s7 … IHA … (V0 @ V0s)) /3 width=5 by lifts_applv/ + @(c7 … IHA … (V0 @ V0c)) /3 width=5 by lifts_applv/ ] qed. @@ -157,11 +157,11 @@ lapply (acr_gcr … H1RP H2RP A) #HCA lapply (acr_gcr … H1RP H2RP B) #HCB elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct lapply (gcr_lifts … H1RP … HL0 … HW0 HW) -HW #HW0 -lapply (s3 … HCA … a G L0 (◊)) #H @H -H -lapply (s6 … HCA G L0 (◊) (◊) ?) // #H @H -H +lapply (c3 … HCA … a G L0 (◊)) #H @H -H +lapply (c6 … HCA G L0 (◊) (◊) ?) // #H @H -H [ @(HA … HL0) // -| lapply (s1 … HCB) -HCB #HCB - lapply (s7 … H2RP G L0 (◊)) /3 width=1 by/ +| lapply (c1 … HCB) -HCB #HCB + lapply (c7 … H2RP G L0 (◊)) /3 width=1 by/ ] qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lcosx.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lcosx.ma index b19af4067..8f29e1aaf 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lcosx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lcosx.ma @@ -17,27 +17,27 @@ include "basic_2/computation/lsx.ma". (* SN EXTENDED STRONGLY CONORMALIZING LOCAL ENVIRONMENTS ********************) -inductive lcosx (h) (g) (G): relation2 ynat lenv ≝ -| lcosx_sort: ∀l. lcosx h g G l (⋆) -| lcosx_skip: ∀I,L,T. lcosx h g G 0 L → lcosx h g G 0 (L.ⓑ{I}T) -| lcosx_pair: ∀I,L,T,l. G ⊢ ⬊*[h, g, T, l] L → - lcosx h g G l L → lcosx h g G (⫯l) (L.ⓑ{I}T) +inductive lcosx (h) (o) (G): relation2 ynat lenv ≝ +| lcosx_sort: ∀l. lcosx h o G l (⋆) +| lcosx_skip: ∀I,L,T. lcosx h o G 0 L → lcosx h o G 0 (L.ⓑ{I}T) +| lcosx_pair: ∀I,L,T,l. G ⊢ ⬊*[h, o, T, l] L → + lcosx h o G l L → lcosx h o G (⫯l) (L.ⓑ{I}T) . interpretation "sn extended strong conormalization (local environment)" - 'CoSN h g l G L = (lcosx h g G l L). + 'CoSN h o l G L = (lcosx h o G l L). (* Basic properties *********************************************************) -lemma lcosx_O: ∀h,g,G,L. G ⊢ ~⬊*[h, g, 0] L. -#h #g #G #L elim L /2 width=1 by lcosx_skip/ +lemma lcosx_O: ∀h,o,G,L. G ⊢ ~⬊*[h, o, 0] L. +#h #o #G #L elim L /2 width=1 by lcosx_skip/ qed. -lemma lcosx_drop_trans_lt: ∀h,g,G,L,l. G ⊢ ~⬊*[h, g, l] L → +lemma lcosx_drop_trans_lt: ∀h,o,G,L,l. G ⊢ ~⬊*[h, o, l] L → ∀I,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → i < l → - G ⊢ ~⬊*[h, g, ⫰(l-i)] K ∧ G ⊢ ⬊*[h, g, V, ⫰(l-i)] K. -#h #g #G #L #l #H elim H -L -l + G ⊢ ~⬊*[h, o, ⫰(l-i)] K ∧ G ⊢ ⬊*[h, o, V, ⫰(l-i)] K. +#h #o #G #L #l #H elim H -L -l [ #l #J #K #V #i #H elim (drop_inv_atom1 … H) -H #H destruct | #I #L #T #_ #_ #J #K #V #i #_ #H elim (ylt_yle_false … H) -H // | #I #L #T #l #HT #HL #IHL #J #K #V #i #H #Hil @@ -52,25 +52,25 @@ qed-. (* Basic inversion lemmas ***************************************************) -fact lcosx_inv_succ_aux: ∀h,g,G,L,x. G ⊢ ~⬊*[h, g, x] L → ∀l. x = ⫯l → +fact lcosx_inv_succ_aux: ∀h,o,G,L,x. G ⊢ ~⬊*[h, o, x] L → ∀l. x = ⫯l → L = ⋆ ∨ - ∃∃I,K,V. L = K.ⓑ{I}V & G ⊢ ~⬊*[h, g, l] K & - G ⊢ ⬊*[h, g, V, l] K. -#h #g #G #L #l * -L -l /2 width=1 by or_introl/ + ∃∃I,K,V. L = K.ⓑ{I}V & G ⊢ ~⬊*[h, o, l] K & + G ⊢ ⬊*[h, o, V, l] K. +#h #o #G #L #l * -L -l /2 width=1 by or_introl/ [ #I #L #T #_ #x #H elim (ysucc_inv_O_sn … H) | #I #L #T #l #HT #HL #x #H <(ysucc_inv_inj … H) -x /3 width=6 by ex3_3_intro, or_intror/ ] qed-. -lemma lcosx_inv_succ: ∀h,g,G,L,l. G ⊢ ~⬊*[h, g, ⫯l] L → L = ⋆ ∨ - ∃∃I,K,V. L = K.ⓑ{I}V & G ⊢ ~⬊*[h, g, l] K & - G ⊢ ⬊*[h, g, V, l] K. +lemma lcosx_inv_succ: ∀h,o,G,L,l. G ⊢ ~⬊*[h, o, ⫯l] L → L = ⋆ ∨ + ∃∃I,K,V. L = K.ⓑ{I}V & G ⊢ ~⬊*[h, o, l] K & + G ⊢ ⬊*[h, o, V, l] K. /2 width=3 by lcosx_inv_succ_aux/ qed-. -lemma lcosx_inv_pair: ∀h,g,I,G,L,T,l. G ⊢ ~⬊*[h, g, ⫯l] L.ⓑ{I}T → - G ⊢ ~⬊*[h, g, l] L ∧ G ⊢ ⬊*[h, g, T, l] L. -#h #g #I #G #L #T #l #H elim (lcosx_inv_succ … H) -H +lemma lcosx_inv_pair: ∀h,o,I,G,L,T,l. G ⊢ ~⬊*[h, o, ⫯l] L.ⓑ{I}T → + G ⊢ ~⬊*[h, o, l] L ∧ G ⊢ ⬊*[h, o, T, l] L. +#h #o #I #G #L #T #l #H elim (lcosx_inv_succ … H) -H [ #H destruct | * #Z #Y #X #H destruct /2 width=1 by conj/ ] diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lcosx_cpx.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lcosx_cpx.ma index eaa8649d4..756b8a7a1 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lcosx_cpx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lcosx_cpx.ma @@ -12,7 +12,6 @@ (* *) (**************************************************************************) -include "ground_2/ynat/ynat_max.ma". include "basic_2/computation/lsx_drop.ma". include "basic_2/computation/lsx_lpx.ma". include "basic_2/computation/lsx_lpxs.ma". @@ -22,10 +21,10 @@ include "basic_2/computation/lcosx.ma". (* Properties on extended context-sensitive parallel reduction for term *****) -lemma lsx_cpx_trans_lcosx: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → - ∀l. G ⊢ ~⬊*[h, g, l] L → - G ⊢ ⬊*[h, g, T1, l] L → G ⊢ ⬊*[h, g, T2, l] L. -#h #g #G #L #T1 #T2 #H elim H -G -L -T1 -T2 // +lemma lsx_cpx_trans_lcosx: ∀h,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, o] T2 → + ∀l. G ⊢ ~⬊*[h, o, l] L → + G ⊢ ⬊*[h, o, T1, l] L → G ⊢ ⬊*[h, o, T2, l] L. +#h #o #G #L #T1 #T2 #H elim H -G -L -T1 -T2 // [ #I #G #L #K #V1 #V2 #W2 #i #HLK #_ #HVW2 #IHV12 #l #HL #H elim (ylt_split i l) #Hli [ -H | -HL ] [ <(ymax_pre_sn l (⫯i)) /2 width=1 by ylt_fwd_le_succ1/ @@ -63,6 +62,6 @@ lemma lsx_cpx_trans_lcosx: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → ] qed-. -lemma lsx_cpx_trans_O: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → - G ⊢ ⬊*[h, g, T1, 0] L → G ⊢ ⬊*[h, g, T2, 0] L. +lemma lsx_cpx_trans_O: ∀h,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, o] T2 → + G ⊢ ⬊*[h, o, T1, 0] L → G ⊢ ⬊*[h, o, T2, 0] L. /2 width=3 by lsx_cpx_trans_lcosx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lprs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lprs_cprs.ma index 05138eb57..ff82ee0a5 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lprs_cprs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lprs_cprs.ma @@ -48,14 +48,14 @@ lemma lprs_ind_alt: ∀G. ∀R:relation lenv. (* Properties on context-sensitive parallel computation for terms ***********) -lemma lprs_cpr_trans: ∀G. s_r_transitive … (cpr G) (λ_. lprs G). -/3 width=5 by s_r_trans_LTC2, lpr_cprs_trans/ qed-. +lemma lprs_cpr_trans: ∀G. c_r_transitive … (cpr G) (λ_. lprs G). +/3 width=5 by c_r_trans_LTC2, lpr_cprs_trans/ qed-. (* Basic_1: was just: pr3_pr3_pr3_t *) (* Note: alternative proof /3 width=5 by s_r_trans_LTC1, lprs_cpr_trans/ *) -lemma lprs_cprs_trans: ∀G. s_rs_transitive … (cpr G) (λ_. lprs G). -#G @s_r_to_s_rs_trans @s_r_trans_LTC2 -@s_rs_trans_TC1 /2 width=3 by lpr_cprs_trans/ (**) (* full auto too slow *) +lemma lprs_cprs_trans: ∀G. c_rs_transitive … (cpr G) (λ_. lprs G). +#G @c_r_to_c_rs_trans @c_r_trans_LTC2 +@c_rs_trans_TC1 /2 width=3 by lpr_cprs_trans/ (**) (* full auto too slow *) qed-. lemma lprs_cprs_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡* T1 → diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs.ma index ee557e438..b6c91c8b1 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs.ma @@ -19,56 +19,56 @@ include "basic_2/computation/lprs.ma". (* SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *******************) definition lpxs: ∀h. sd h → relation3 genv lenv lenv ≝ - λh,g,G. TC … (lpx h g G). + λh,o,G. TC … (lpx h o G). interpretation "extended parallel computation (local environment, sn variant)" - 'PRedSnStar h g G L1 L2 = (lpxs h g G L1 L2). + 'PRedSnStar h o G L1 L2 = (lpxs h o G L1 L2). (* Basic eliminators ********************************************************) -lemma lpxs_ind: ∀h,g,G,L1. ∀R:predicate lenv. R L1 → - (∀L,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L → ⦃G, L⦄ ⊢ ➡[h, g] L2 → R L → R L2) → - ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → R L2. -#h #g #G #L1 #R #HL1 #IHL1 #L2 #HL12 +lemma lpxs_ind: ∀h,o,G,L1. ∀R:predicate lenv. R L1 → + (∀L,L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L → ⦃G, L⦄ ⊢ ➡[h, o] L2 → R L → R L2) → + ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → R L2. +#h #o #G #L1 #R #HL1 #IHL1 #L2 #HL12 @(TC_star_ind … HL1 IHL1 … HL12) // qed-. -lemma lpxs_ind_dx: ∀h,g,G,L2. ∀R:predicate lenv. R L2 → - (∀L1,L. ⦃G, L1⦄ ⊢ ➡[h, g] L → ⦃G, L⦄ ⊢ ➡*[h, g] L2 → R L → R L1) → - ∀L1. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → R L1. -#h #g #G #L2 #R #HL2 #IHL2 #L1 #HL12 +lemma lpxs_ind_dx: ∀h,o,G,L2. ∀R:predicate lenv. R L2 → + (∀L1,L. ⦃G, L1⦄ ⊢ ➡[h, o] L → ⦃G, L⦄ ⊢ ➡*[h, o] L2 → R L → R L1) → + ∀L1. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → R L1. +#h #o #G #L2 #R #HL2 #IHL2 #L1 #HL12 @(TC_star_ind_dx … HL2 IHL2 … HL12) // qed-. (* Basic properties *********************************************************) -lemma lprs_lpxs: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2. +lemma lprs_lpxs: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1⦄ ⊢ ➡*[h, o] L2. /3 width=3 by lpr_lpx, monotonic_TC/ qed. -lemma lpx_lpxs: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2. +lemma lpx_lpxs: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, o] L2 → ⦃G, L1⦄ ⊢ ➡*[h, o] L2. /2 width=1 by inj/ qed. -lemma lpxs_refl: ∀h,g,G,L. ⦃G, L⦄ ⊢ ➡*[h, g] L. +lemma lpxs_refl: ∀h,o,G,L. ⦃G, L⦄ ⊢ ➡*[h, o] L. /2 width=1 by lprs_lpxs/ qed. -lemma lpxs_strap1: ∀h,g,G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L → ⦃G, L⦄ ⊢ ➡[h, g] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2. +lemma lpxs_strap1: ∀h,o,G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L → ⦃G, L⦄ ⊢ ➡[h, o] L2 → ⦃G, L1⦄ ⊢ ➡*[h, o] L2. /2 width=3 by step/ qed. -lemma lpxs_strap2: ∀h,g,G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L → ⦃G, L⦄ ⊢ ➡*[h, g] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2. +lemma lpxs_strap2: ∀h,o,G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡[h, o] L → ⦃G, L⦄ ⊢ ➡*[h, o] L2 → ⦃G, L1⦄ ⊢ ➡*[h, o] L2. /2 width=3 by TC_strap/ qed. -lemma lpxs_pair_refl: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ∀I,V. ⦃G, L1.ⓑ{I}V⦄ ⊢ ➡*[h, g] L2.ⓑ{I}V. +lemma lpxs_pair_refl: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → ∀I,V. ⦃G, L1.ⓑ{I}V⦄ ⊢ ➡*[h, o] L2.ⓑ{I}V. /2 width=1 by TC_lpx_sn_pair_refl/ qed. (* Basic inversion lemmas ***************************************************) -lemma lpxs_inv_atom1: ∀h,g,G,L2. ⦃G, ⋆⦄ ⊢ ➡*[h, g] L2 → L2 = ⋆. +lemma lpxs_inv_atom1: ∀h,o,G,L2. ⦃G, ⋆⦄ ⊢ ➡*[h, o] L2 → L2 = ⋆. /2 width=2 by TC_lpx_sn_inv_atom1/ qed-. -lemma lpxs_inv_atom2: ∀h,g,G,L1. ⦃G, L1⦄ ⊢ ➡*[h, g] ⋆ → L1 = ⋆. +lemma lpxs_inv_atom2: ∀h,o,G,L1. ⦃G, L1⦄ ⊢ ➡*[h, o] ⋆ → L1 = ⋆. /2 width=2 by TC_lpx_sn_inv_atom2/ qed-. (* Basic forward lemmas *****************************************************) -lemma lpxs_fwd_length: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → |L1| = |L2|. +lemma lpxs_fwd_length: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → |L1| = |L2|. /2 width=2 by TC_lpx_sn_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_aaa.ma index d335f57da..0dfdd95e2 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_aaa.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_aaa.ma @@ -19,9 +19,9 @@ include "basic_2/computation/lpxs.ma". (* Properties about atomic arity assignment on terms ************************) -lemma lpxs_aaa_conf: ∀h,g,G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → - ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ⦃G, L2⦄ ⊢ T ⁝ A. -#h #g #G #L1 #T #A #HT #L2 #HL12 +lemma lpxs_aaa_conf: ∀h,o,G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → + ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → ⦃G, L2⦄ ⊢ T ⁝ A. +#h #o #G #L1 #T #A #HT #L2 #HL12 @(TC_Conf3 … (λL,A. ⦃G, L⦄ ⊢ T ⁝ A) … HT ? HL12) /2 width=5 by lpx_aaa_conf/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_cpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_cpxs.ma index c1928ff10..41316888e 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_cpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_cpxs.ma @@ -19,66 +19,66 @@ include "basic_2/computation/lpxs.ma". (* Advanced properties ******************************************************) -lemma lpxs_pair: ∀h,g,I,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → - ∀V1,V2. ⦃G, L1⦄ ⊢ V1 ➡*[h, g] V2 → - ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡*[h, g] L2.ⓑ{I}V2. +lemma lpxs_pair: ∀h,o,I,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → + ∀V1,V2. ⦃G, L1⦄ ⊢ V1 ➡*[h, o] V2 → + ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡*[h, o] L2.ⓑ{I}V2. /2 width=1 by TC_lpx_sn_pair/ qed. (* Advanced inversion lemmas ************************************************) -lemma lpxs_inv_pair1: ∀h,g,I,G,K1,L2,V1. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡*[h, g] L2 → - ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡*[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡*[h, g] V2 & L2 = K2.ⓑ{I}V2. +lemma lpxs_inv_pair1: ∀h,o,I,G,K1,L2,V1. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡*[h, o] L2 → + ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡*[h, o] K2 & ⦃G, K1⦄ ⊢ V1 ➡*[h, o] V2 & L2 = K2.ⓑ{I}V2. /3 width=3 by TC_lpx_sn_inv_pair1, lpx_cpxs_trans/ qed-. -lemma lpxs_inv_pair2: ∀h,g,I,G,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡*[h, g] K2.ⓑ{I}V2 → - ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡*[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡*[h, g] V2 & L1 = K1.ⓑ{I}V1. +lemma lpxs_inv_pair2: ∀h,o,I,G,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡*[h, o] K2.ⓑ{I}V2 → + ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡*[h, o] K2 & ⦃G, K1⦄ ⊢ V1 ➡*[h, o] V2 & L1 = K1.ⓑ{I}V1. /3 width=3 by TC_lpx_sn_inv_pair2, lpx_cpxs_trans/ qed-. (* Advanced eliminators *****************************************************) -lemma lpxs_ind_alt: ∀h,g,G. ∀R:relation lenv. +lemma lpxs_ind_alt: ∀h,o,G. ∀R:relation lenv. R (⋆) (⋆) → ( ∀I,K1,K2,V1,V2. - ⦃G, K1⦄ ⊢ ➡*[h, g] K2 → ⦃G, K1⦄ ⊢ V1 ➡*[h, g] V2 → + ⦃G, K1⦄ ⊢ ➡*[h, o] K2 → ⦃G, K1⦄ ⊢ V1 ➡*[h, o] V2 → R K1 K2 → R (K1.ⓑ{I}V1) (K2.ⓑ{I}V2) ) → - ∀L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → R L1 L2. + ∀L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → R L1 L2. /3 width=4 by TC_lpx_sn_ind, lpx_cpxs_trans/ qed-. (* Properties on context-sensitive extended parallel computation for terms **) -lemma lpxs_cpx_trans: ∀h,g,G. s_r_transitive … (cpx h g G) (λ_.lpxs h g G). -/3 width=5 by s_r_trans_LTC2, lpx_cpxs_trans/ qed-. +lemma lpxs_cpx_trans: ∀h,o,G. c_r_transitive … (cpx h o G) (λ_.lpxs h o G). +/3 width=5 by c_r_trans_LTC2, lpx_cpxs_trans/ qed-. (* Note: alternative proof: /3 width=5 by s_r_trans_TC1, lpxs_cpx_trans/ *) -lemma lpxs_cpxs_trans: ∀h,g,G. s_rs_transitive … (cpx h g G) (λ_.lpxs h g G). -#h #g #G @s_r_to_s_rs_trans @s_r_trans_LTC2 -@s_rs_trans_TC1 /2 width=3 by lpx_cpxs_trans/ (**) (* full auto too slow *) +lemma lpxs_cpxs_trans: ∀h,o,G. c_rs_transitive … (cpx h o G) (λ_.lpxs h o G). +#h #o #G @c_r_to_c_rs_trans @c_r_trans_LTC2 +@c_rs_trans_TC1 /2 width=3 by lpx_cpxs_trans/ (**) (* full auto too slow *) qed-. -lemma cpxs_bind2: ∀h,g,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 → - ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡*[h, g] T2 → - ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡*[h, g] ⓑ{a,I}V2.T2. +lemma cpxs_bind2: ∀h,o,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡*[h, o] V2 → + ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡*[h, o] T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡*[h, o] ⓑ{a,I}V2.T2. /4 width=5 by lpxs_cpxs_trans, lpxs_pair, cpxs_bind/ qed. (* Inversion lemmas on context-sensitive ext parallel computation for terms *) -lemma cpxs_inv_abst1: ∀h,g,a,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓛ{a}V1.T1 ➡*[h, g] U2 → - ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 ➡*[h, g] T2 & +lemma cpxs_inv_abst1: ∀h,o,a,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓛ{a}V1.T1 ➡*[h, o] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h, o] V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 ➡*[h, o] T2 & U2 = ⓛ{a}V2.T2. -#h #g #a #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 /2 width=5 by ex3_2_intro/ +#h #o #a #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 /2 width=5 by ex3_2_intro/ #U0 #U2 #_ #HU02 * #V0 #T0 #HV10 #HT10 #H destruct elim (cpx_inv_abst1 … HU02) -HU02 #V2 #T2 #HV02 #HT02 #H destruct lapply (lpxs_cpx_trans … HT02 (L.ⓛV1) ?) /3 width=5 by lpxs_pair, cpxs_trans, cpxs_strap1, ex3_2_intro/ qed-. -lemma cpxs_inv_abbr1: ∀h,g,a,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓓ{a}V1.T1 ➡*[h, g] U2 → ( - ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ➡*[h, g] T2 & +lemma cpxs_inv_abbr1: ∀h,o,a,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓓ{a}V1.T1 ➡*[h, o] U2 → ( + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h, o] V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ➡*[h, o] T2 & U2 = ⓓ{a}V2.T2 ) ∨ - ∃∃T2. ⦃G, L.ⓓV1⦄ ⊢ T1 ➡*[h, g] T2 & ⬆[0, 1] U2 ≡ T2 & a = true. -#h #g #a #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 /3 width=5 by ex3_2_intro, or_introl/ + ∃∃T2. ⦃G, L.ⓓV1⦄ ⊢ T1 ➡*[h, o] T2 & ⬆[0, 1] U2 ≡ T2 & a = true. +#h #o #a #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 /3 width=5 by ex3_2_intro, or_introl/ #U0 #U2 #_ #HU02 * * [ #V0 #T0 #HV10 #HT10 #H destruct elim (cpx_inv_abbr1 … HU02) -HU02 * @@ -97,16 +97,16 @@ qed-. (* More advanced properties *************************************************) -lemma lpxs_pair2: ∀h,g,I,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → - ∀V1,V2. ⦃G, L2⦄ ⊢ V1 ➡*[h, g] V2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡*[h, g] L2.ⓑ{I}V2. +lemma lpxs_pair2: ∀h,o,I,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → + ∀V1,V2. ⦃G, L2⦄ ⊢ V1 ➡*[h, o] V2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡*[h, o] L2.ⓑ{I}V2. /3 width=3 by lpxs_pair, lpxs_cpxs_trans/ qed. (* Properties on supclosure *************************************************) -lemma lpx_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → - ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → - ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +lemma lpx_fqup_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, o] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, o] T & ⦃G1, K1, T⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, o] L2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 [ #G2 #L2 #T2 #H12 #K1 #HKL1 elim (lpx_fqu_trans … H12 … HKL1) -L1 /3 width=5 by cpx_cpxs, fqu_fqup, ex3_2_intro/ | #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #K1 #HLK1 elim (IH1 … HLK1) -L1 @@ -116,20 +116,20 @@ lemma lpx_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, ] qed-. -lemma lpx_fqus_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → - ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → - ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 [ /2 width=5 by ex3_2_intro/ ] +lemma lpx_fqus_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, o] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, o] T & ⦃G1, K1, T⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, o] L2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 [ /2 width=5 by ex3_2_intro/ ] #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #K1 #HLK1 elim (IH1 … HLK1) -L1 #L0 #T0 #HT10 #HT0 #HL0 elim (lpx_fquq_trans … H2 … HL0) -L #L #T3 #HT3 #HT32 #HL2 elim (fqus_cpx_trans … HT0 … HT3) -T /3 width=7 by cpxs_strap1, fqus_strap1, ex3_2_intro/ qed-. -lemma lpxs_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → - ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → - ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #HT12 #K1 #H @(lpxs_ind_dx … H) -K1 +lemma lpxs_fquq_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, o] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, o] T & ⦃G1, K1, T⦄ ⊐⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, o] L2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #HT12 #K1 #H @(lpxs_ind_dx … H) -K1 [ /2 width=5 by ex3_2_intro/ | #K1 #K #HK1 #_ * #L #T #HT1 #HT2 #HL2 -HT12 lapply (lpx_cpxs_trans … HT1 … HK1) -HT1 @@ -138,10 +138,10 @@ lemma lpxs_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, ] qed-. -lemma lpxs_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → - ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → - ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #HT12 #K1 #H @(lpxs_ind_dx … H) -K1 +lemma lpxs_fqup_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, o] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, o] T & ⦃G1, K1, T⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, o] L2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #HT12 #K1 #H @(lpxs_ind_dx … H) -K1 [ /2 width=5 by ex3_2_intro/ | #K1 #K #HK1 #_ * #L #T #HT1 #HT2 #HL2 -HT12 lapply (lpx_cpxs_trans … HT1 … HK1) -HT1 @@ -150,10 +150,10 @@ lemma lpxs_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2 ] qed-. -lemma lpxs_fqus_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → - ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → - ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 /2 width=5 by ex3_2_intro/ +lemma lpxs_fqus_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, o] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, o] T & ⦃G1, K1, T⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, o] L2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 /2 width=5 by ex3_2_intro/ #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #K1 #HLK1 elim (IH1 … HLK1) -L1 #L0 #T0 #HT10 #HT0 #HL0 elim (lpxs_fquq_trans … H2 … HL0) -L #L #T3 #HT3 #HT32 #HL2 elim (fqus_cpxs_trans … HT3 … HT0) -T diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_drop.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_drop.ma index dba41c9dd..c75d754f9 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_drop.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_drop.ma @@ -19,11 +19,11 @@ include "basic_2/computation/lpxs.ma". (* Properties on local environment slicing ***********************************) -lemma lpxs_drop_conf: ∀h,g,G. dropable_sn (lpxs h g G). +lemma lpxs_drop_conf: ∀h,o,G. dropable_sn (lpxs h o G). /3 width=3 by dropable_sn_TC, lpx_drop_conf/ qed-. -lemma drop_lpxs_trans: ∀h,g,G. dedropable_sn (lpxs h g G). +lemma drop_lpxs_trans: ∀h,o,G. dedropable_sn (lpxs h o G). /3 width=3 by dedropable_sn_TC, drop_lpx_trans/ qed-. -lemma lpxs_drop_trans_O1: ∀h,g,G. dropable_dx (lpxs h g G). +lemma lpxs_drop_trans_O1: ∀h,o,G. dropable_dx (lpxs h o G). /3 width=3 by dropable_dx_TC, lpx_drop_trans_O1/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_lleq.ma index 6f6045dab..159c84f81 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_lleq.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_lleq.ma @@ -22,18 +22,18 @@ include "basic_2/computation/lpxs_cpxs.ma". (* Properties on lazy equivalence for local environments ********************) -lemma lleq_lpxs_trans: ∀h,g,G,L2,K2. ⦃G, L2⦄ ⊢ ➡*[h, g] K2 → +lemma lleq_lpxs_trans: ∀h,o,G,L2,K2. ⦃G, L2⦄ ⊢ ➡*[h, o] K2 → ∀L1,T,l. L1 ≡[T, l] L2 → - ∃∃K1. ⦃G, L1⦄ ⊢ ➡*[h, g] K1 & K1 ≡[T, l] K2. -#h #g #G #L2 #K2 #H @(lpxs_ind … H) -K2 /2 width=3 by ex2_intro/ + ∃∃K1. ⦃G, L1⦄ ⊢ ➡*[h, o] K1 & K1 ≡[T, l] K2. +#h #o #G #L2 #K2 #H @(lpxs_ind … H) -K2 /2 width=3 by ex2_intro/ #K #K2 #_ #HK2 #IH #L1 #T #l #HT elim (IH … HT) -L2 #L #HL1 #HT elim (lleq_lpx_trans … HK2 … HT) -K /3 width=3 by lpxs_strap1, ex2_intro/ qed-. -lemma lpxs_nlleq_inv_step_sn: ∀h,g,G,L1,L2,T,l. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → - ∃∃L,L0. ⦃G, L1⦄ ⊢ ➡[h, g] L & L1 ≡[T, l] L → ⊥ & ⦃G, L⦄ ⊢ ➡*[h, g] L0 & L0 ≡[T, l] L2. -#h #g #G #L1 #L2 #T #l #H @(lpxs_ind_dx … H) -L1 +lemma lpxs_nlleq_inv_step_sn: ∀h,o,G,L1,L2,T,l. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → (L1 ≡[T, l] L2 → ⊥) → + ∃∃L,L0. ⦃G, L1⦄ ⊢ ➡[h, o] L & L1 ≡[T, l] L → ⊥ & ⦃G, L⦄ ⊢ ➡*[h, o] L0 & L0 ≡[T, l] L2. +#h #o #G #L1 #L2 #T #l #H @(lpxs_ind_dx … H) -L1 [ #H elim H -H // | #L1 #L #H1 #H2 #IH2 #H12 elim (lleq_dec T L1 L l) #H [ -H1 -H2 elim IH2 -IH2 /3 width=3 by lleq_trans/ -H12 @@ -47,10 +47,10 @@ lemma lpxs_nlleq_inv_step_sn: ∀h,g,G,L1,L2,T,l. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 ] qed-. -lemma lpxs_lleq_fqu_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → - ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → K1 ≡[T1, 0] L1 → - ∃∃K2. ⦃G1, K1, T1⦄ ⊐ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2 & K2 ≡[T2, 0] L2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +lemma lpxs_lleq_fqu_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, o] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, o] L2 & K2 ≡[T2, 0] L2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 [ #I #G1 #L1 #V1 #X #H1 #H2 elim (lpxs_inv_pair2 … H1) -H1 #K0 #V0 #H1KL1 #_ #H destruct elim (lleq_inv_lref_ge_dx … H2 ? I L1 V1) -H2 // @@ -64,22 +64,22 @@ lemma lpxs_lleq_fqu_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, /3 width=4 by lpxs_pair, fqu_bind_dx, ex3_intro/ | #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H elim (lleq_inv_flat … H) -H /2 width=4 by fqu_flat_dx, ex3_intro/ -| #G1 #L1 #L #T1 #U1 #m #HL1 #HTU1 #K1 #H1KL1 #H2KL1 - elim (drop_O1_le (Ⓕ) (m+1) K1) +| #G1 #L1 #L #T1 #U1 #k #HL1 #HTU1 #K1 #H1KL1 #H2KL1 + elim (drop_O1_le (Ⓕ) (k+1) K1) [ #K #HK1 lapply (lleq_inv_lift_le … H2KL1 … HK1 HL1 … HTU1 ?) -H2KL1 // #H2KL elim (lpxs_drop_trans_O1 … H1KL1 … HL1) -L1 #K0 #HK10 #H1KL lapply (drop_mono … HK10 … HK1) -HK10 #H destruct /3 width=4 by fqu_drop, ex3_intro/ - | lapply (drop_fwd_length_le2 … HL1) -L -T1 -g + | lapply (drop_fwd_length_le2 … HL1) -L -T1 -o lapply (lleq_fwd_length … H2KL1) // ] ] qed-. -lemma lpxs_lleq_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → - ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → K1 ≡[T1, 0] L1 → - ∃∃K2. ⦃G1, K1, T1⦄ ⊐⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2 & K2 ≡[T2, 0] L2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1 +lemma lpxs_lleq_fquq_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, o] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, o] L2 & K2 ≡[T2, 0] L2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1 elim (fquq_inv_gen … H) -H [ #H elim (lpxs_lleq_fqu_trans … H … H1KL1 H2KL1) -L1 /3 width=4 by fqu_fquq, ex3_intro/ @@ -87,10 +87,10 @@ elim (fquq_inv_gen … H) -H ] qed-. -lemma lpxs_lleq_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → - ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → K1 ≡[T1, 0] L1 → - ∃∃K2. ⦃G1, K1, T1⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2 & K2 ≡[T2, 0] L2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +lemma lpxs_lleq_fqup_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, o] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, o] L2 & K2 ≡[T2, 0] L2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 [ #G2 #L2 #T2 #H #K1 #H1KL1 #H2KL1 elim (lpxs_lleq_fqu_trans … H … H1KL1 H2KL1) -L1 /3 width=4 by fqu_fqup, ex3_intro/ | #G #G2 #L #L2 #T #T2 #_ #HT2 #IHT1 #K1 #H1KL1 #H2KL1 elim (IHT1 … H2KL1) // -L1 @@ -99,10 +99,10 @@ lemma lpxs_lleq_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G ] qed-. -lemma lpxs_lleq_fqus_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → - ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → K1 ≡[T1, 0] L1 → - ∃∃K2. ⦃G1, K1, T1⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2 & K2 ≡[T2, 0] L2. -#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1 +lemma lpxs_lleq_fqus_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, o] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, o] L2 & K2 ≡[T2, 0] L2. +#h #o #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1 elim (fqus_inv_gen … H) -H [ #H elim (lpxs_lleq_fqup_trans … H … H1KL1 H2KL1) -L1 /3 width=4 by fqup_fqus, ex3_intro/ @@ -110,22 +110,22 @@ elim (fqus_inv_gen … H) -H ] qed-. -fact lreq_lpxs_trans_lleq_aux: ∀h,g,G,L1,L0,l,m. L1 ⩬[l, m] L0 → m = ∞ → - ∀L2. ⦃G, L0⦄ ⊢ ➡*[h, g] L2 → - ∃∃L. L ⩬[l, m] L2 & ⦃G, L1⦄ ⊢ ➡*[h, g] L & +fact lreq_lpxs_trans_lleq_aux: ∀h,o,G,L1,L0,l,k. L1 ⩬[l, k] L0 → k = ∞ → + ∀L2. ⦃G, L0⦄ ⊢ ➡*[h, o] L2 → + ∃∃L. L ⩬[l, k] L2 & ⦃G, L1⦄ ⊢ ➡*[h, o] L & (∀T. L0 ≡[T, l] L2 ↔ L1 ≡[T, l] L). -#h #g #G #L1 #L0 #l #m #H elim H -L1 -L0 -l -m -[ #l #m #_ #L2 #H >(lpxs_inv_atom1 … H) -H +#h #o #G #L1 #L0 #l #k #H elim H -L1 -L0 -l -k +[ #l #k #_ #L2 #H >(lpxs_inv_atom1 … H) -H /3 width=5 by ex3_intro, conj/ | #I1 #I0 #L1 #L0 #V1 #V0 #_ #_ #Hm destruct -| #I #L1 #L0 #V1 #m #HL10 #IHL10 #Hm #Y #H +| #I #L1 #L0 #V1 #k #HL10 #IHL10 #Hm #Y #H elim (lpxs_inv_pair1 … H) -H #L2 #V2 #HL02 #HV02 #H destruct lapply (ysucc_inv_Y_dx … Hm) -Hm #Hm elim (IHL10 … HL02) // -IHL10 -HL02 #L #HL2 #HL1 #IH @(ex3_intro … (L.ⓑ{I}V2)) /3 width=3 by lpxs_pair, lreq_cpxs_trans, lreq_pair/ #T elim (IH T) #HL0dx #HL0sn @conj #H @(lleq_lreq_repl … H) -H /3 width=1 by lreq_sym, lreq_pair_O_Y/ -| #I1 #I0 #L1 #L0 #V1 #V0 #l #m #HL10 #IHL10 #Hm #Y #H +| #I1 #I0 #L1 #L0 #V1 #V0 #l #k #HL10 #IHL10 #Hm #Y #H elim (lpxs_inv_pair1 … H) -H #L2 #V2 #HL02 #HV02 #H destruct elim (IHL10 … HL02) // -IHL10 -HL02 #L #HL2 #HL1 #IH @(ex3_intro … (L.ⓑ{I1}V1)) /3 width=1 by lpxs_pair, lreq_succ/ @@ -134,8 +134,8 @@ fact lreq_lpxs_trans_lleq_aux: ∀h,g,G,L1,L0,l,m. L1 ⩬[l, m] L0 → m = ∞ ] qed-. -lemma lreq_lpxs_trans_lleq: ∀h,g,G,L1,L0,l. L1 ⩬[l, ∞] L0 → - ∀L2. ⦃G, L0⦄ ⊢ ➡*[h, g] L2 → - ∃∃L. L ⩬[l, ∞] L2 & ⦃G, L1⦄ ⊢ ➡*[h, g] L & +lemma lreq_lpxs_trans_lleq: ∀h,o,G,L1,L0,l. L1 ⩬[l, ∞] L0 → + ∀L2. ⦃G, L0⦄ ⊢ ➡*[h, o] L2 → + ∃∃L. L ⩬[l, ∞] L2 & ⦃G, L1⦄ ⊢ ➡*[h, o] L & (∀T. L0 ≡[T, l] L2 ↔ L1 ≡[T, l] L). /2 width=1 by lreq_lpxs_trans_lleq_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_lpxs.ma index 1d287d368..2e0c14570 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_lpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lpxs_lpxs.ma @@ -18,5 +18,5 @@ include "basic_2/computation/lpxs.ma". (* Main properties **********************************************************) -theorem lpxs_trans: ∀h,g,G. Transitive … (lpxs h g G). +theorem lpxs_trans: ∀h,o,G. Transitive … (lpxs h o G). /2 width=3 by trans_TC/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_drop.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_drop.ma index 64b236cb0..678604fdd 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_drop.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_drop.ma @@ -21,19 +21,19 @@ include "basic_2/computation/lsubc.ma". (* Basic_1: was: csubc_drop_conf_O *) (* Note: the constant 0 can not be generalized *) -lemma lsubc_drop_O1_trans: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀K2,s,m. ⬇[s, 0, m] L2 ≡ K2 → - ∃∃K1. ⬇[s, 0, m] L1 ≡ K1 & G ⊢ K1 ⫃[RP] K2. +lemma lsubc_drop_O1_trans: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀K2,c,k. ⬇[c, 0, k] L2 ≡ K2 → + ∃∃K1. ⬇[c, 0, k] L1 ≡ K1 & G ⊢ K1 ⫃[RP] K2. #RP #G #L1 #L2 #H elim H -L1 -L2 -[ #X #s #m #H elim (drop_inv_atom1 … H) -H /4 width=3 by drop_atom, ex2_intro/ -| #I #L1 #L2 #V #_ #IHL12 #X #s #m #H +[ #X #c #k #H elim (drop_inv_atom1 … H) -H /4 width=3 by drop_atom, ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #X #c #k #H elim (drop_inv_O1_pair1 … H) -H * #Hm #H destruct - [ elim (IHL12 L2 s 0) -IHL12 // #X #H <(drop_inv_O2 … H) -H + [ elim (IHL12 L2 c 0) -IHL12 // #X #H <(drop_inv_O2 … H) -H /3 width=3 by lsubc_pair, drop_pair, ex2_intro/ | elim (IHL12 … H) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ ] -| #L1 #L2 #V #W #A #HV #H1W #H2W #_ #IHL12 #X #s #m #H +| #L1 #L2 #V #W #A #HV #H1W #H2W #_ #IHL12 #X #c #k #H elim (drop_inv_O1_pair1 … H) -H * #Hm #H destruct - [ elim (IHL12 L2 s 0) -IHL12 // #X #H <(drop_inv_O2 … H) -H + [ elim (IHL12 L2 c 0) -IHL12 // #X #H <(drop_inv_O2 … H) -H /3 width=8 by lsubc_beta, drop_pair, ex2_intro/ | elim (IHL12 … H) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ ] @@ -42,10 +42,10 @@ qed-. (* Basic_1: was: csubc_drop_conf_rev *) lemma drop_lsubc_trans: ∀RR,RS,RP. gcp RR RS RP → - ∀G,L1,K1,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 → - ∃∃L2. G ⊢ L1 ⫃[RP] L2 & ⬇[Ⓕ, l, m] L2 ≡ K2. -#RR #RS #RP #Hgcp #G #L1 #K1 #l #m #H elim H -L1 -K1 -l -m -[ #l #m #Hm #X #H elim (lsubc_inv_atom1 … H) -H + ∀G,L1,K1,l,k. ⬇[Ⓕ, l, k] L1 ≡ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 → + ∃∃L2. G ⊢ L1 ⫃[RP] L2 & ⬇[Ⓕ, l, k] L2 ≡ K2. +#RR #RS #RP #Hgcp #G #L1 #K1 #l #k #H elim H -L1 -K1 -l -k +[ #l #k #Hm #X #H elim (lsubc_inv_atom1 … H) -H >Hm /2 width=3 by ex2_intro/ | #L1 #I #V1 #X #H elim (lsubc_inv_pair1 … H) -H * @@ -53,9 +53,9 @@ lemma drop_lsubc_trans: ∀RR,RS,RP. gcp RR RS RP → | #K1 #V #W1 #A #HV1 #H1W1 #H2W1 #HLK1 #H1 #H2 #H3 destruct /3 width=4 by lsubc_beta, drop_pair, ex2_intro/ ] -| #I #L1 #K1 #V1 #m #_ #IHLK1 #K2 #HK12 +| #I #L1 #K1 #V1 #k #_ #IHLK1 #K2 #HK12 elim (IHLK1 … HK12) -K1 /3 width=5 by lsubc_pair, drop_drop, ex2_intro/ -| #I #L1 #K1 #V1 #V2 #l #m #HLK1 #HV21 #IHLK1 #X #H +| #I #L1 #K1 #V1 #V2 #l #k #HLK1 #HV21 #IHLK1 #X #H elim (lsubc_inv_pair1 … H) -H * [ #K2 #HK12 #H destruct elim (IHLK1 … HK12) -K1 /3 width=5 by lsubc_pair, drop_skip, ex2_intro/ diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_drops.ma index df89d984f..8fa9adfef 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lsubc_drops.ma @@ -24,7 +24,7 @@ lemma drops_lsubc_trans: ∀RR,RS,RP. gcp RR RS RP → ∃∃L2. G ⊢ L1 ⫃[RP] L2 & ⬇*[Ⓕ, cs] L2 ≡ K2. #RR #RS #RP #Hgcp #G #L1 #K1 #cs #H elim H -L1 -K1 -cs [ /2 width=3 by drops_nil, ex2_intro/ -| #L1 #L #K1 #cs #l #m #_ #HLK1 #IHL #K2 #HK12 +| #L1 #L #K1 #cs #l #k #_ #HLK1 #IHL #K2 #HK12 elim (drop_lsubc_trans … Hgcp … HLK1 … HK12) -Hgcp -K1 #K #HLK #HK2 elim (IHL … HLK) -IHL -HLK /3 width=5 by drops_cons, ex2_intro/ ] diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx.ma index 1cc24d432..7bb8aec4a 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx.ma @@ -19,91 +19,91 @@ include "basic_2/reduction/lpx.ma". (* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) definition lsx: ∀h. sd h → relation4 ynat term genv lenv ≝ - λh,g,l,T,G. SN … (lpx h g G) (lleq l T). + λh,o,l,T,G. SN … (lpx h o G) (lleq l T). interpretation "extended strong normalization (local environment)" - 'SN h g l T G L = (lsx h g T l G L). + 'SN h o l T G L = (lsx h o T l G L). (* Basic eliminators ********************************************************) -lemma lsx_ind: ∀h,g,G,T,l. ∀R:predicate lenv. - (∀L1. G ⊢ ⬊*[h, g, T, l] L1 → - (∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → R L2) → +lemma lsx_ind: ∀h,o,G,T,l. ∀R:predicate lenv. + (∀L1. G ⊢ ⬊*[h, o, T, l] L1 → + (∀L2. ⦃G, L1⦄ ⊢ ➡[h, o] L2 → (L1 ≡[T, l] L2 → ⊥) → R L2) → R L1 ) → - ∀L. G ⊢ ⬊*[h, g, T, l] L → R L. -#h #g #G #T #l #R #H0 #L1 #H elim H -L1 + ∀L. G ⊢ ⬊*[h, o, T, l] L → R L. +#h #o #G #T #l #R #H0 #L1 #H elim H -L1 /5 width=1 by lleq_sym, SN_intro/ qed-. (* Basic properties *********************************************************) -lemma lsx_intro: ∀h,g,G,L1,T,l. - (∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊*[h, g, T, l] L2) → - G ⊢ ⬊*[h, g, T, l] L1. +lemma lsx_intro: ∀h,o,G,L1,T,l. + (∀L2. ⦃G, L1⦄ ⊢ ➡[h, o] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊*[h, o, T, l] L2) → + G ⊢ ⬊*[h, o, T, l] L1. /5 width=1 by lleq_sym, SN_intro/ qed. -lemma lsx_atom: ∀h,g,G,T,l. G ⊢ ⬊*[h, g, T, l] ⋆. -#h #g #G #T #l @lsx_intro +lemma lsx_atom: ∀h,o,G,T,l. G ⊢ ⬊*[h, o, T, l] ⋆. +#h #o #G #T #l @lsx_intro #X #H #HT lapply (lpx_inv_atom1 … H) -H #H destruct elim HT -HT // qed. -lemma lsx_sort: ∀h,g,G,L,l,k. G ⊢ ⬊*[h, g, ⋆k, l] L. -#h #g #G #L1 #l #k @lsx_intro +lemma lsx_sort: ∀h,o,G,L,l,s. G ⊢ ⬊*[h, o, ⋆s, l] L. +#h #o #G #L1 #l #s @lsx_intro #L2 #HL12 #H elim H -H /3 width=4 by lpx_fwd_length, lleq_sort/ qed. -lemma lsx_gref: ∀h,g,G,L,l,p. G ⊢ ⬊*[h, g, §p, l] L. -#h #g #G #L1 #l #p @lsx_intro +lemma lsx_gref: ∀h,o,G,L,l,p. G ⊢ ⬊*[h, o, §p, l] L. +#h #o #G #L1 #l #p @lsx_intro #L2 #HL12 #H elim H -H /3 width=4 by lpx_fwd_length, lleq_gref/ qed. -lemma lsx_ge_up: ∀h,g,G,L,T,U,lt,l,m. lt ≤ yinj l + yinj m → - ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, U, lt] L → G ⊢ ⬊*[h, g, U, l] L. -#h #g #G #L #T #U #lt #l #m #Hltlm #HTU #H @(lsx_ind … H) -L +lemma lsx_ge_up: ∀h,o,G,L,T,U,lt,l,k. lt ≤ yinj l + yinj k → + ⬆[l, k] T ≡ U → G ⊢ ⬊*[h, o, U, lt] L → G ⊢ ⬊*[h, o, U, l] L. +#h #o #G #L #T #U #lt #l #k #Hltlm #HTU #H @(lsx_ind … H) -L /5 width=7 by lsx_intro, lleq_ge_up/ qed-. -lemma lsx_ge: ∀h,g,G,L,T,l1,l2. l1 ≤ l2 → - G ⊢ ⬊*[h, g, T, l1] L → G ⊢ ⬊*[h, g, T, l2] L. -#h #g #G #L #T #l1 #l2 #Hl12 #H @(lsx_ind … H) -L +lemma lsx_ge: ∀h,o,G,L,T,l1,l2. l1 ≤ l2 → + G ⊢ ⬊*[h, o, T, l1] L → G ⊢ ⬊*[h, o, T, l2] L. +#h #o #G #L #T #l1 #l2 #Hl12 #H @(lsx_ind … H) -L /5 width=7 by lsx_intro, lleq_ge/ qed-. (* Basic forward lemmas *****************************************************) -lemma lsx_fwd_bind_sn: ∀h,g,a,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓑ{a,I}V.T, l] L → - G ⊢ ⬊*[h, g, V, l] L. -#h #g #a #I #G #L #V #T #l #H @(lsx_ind … H) -L +lemma lsx_fwd_bind_sn: ∀h,o,a,I,G,L,V,T,l. G ⊢ ⬊*[h, o, ⓑ{a,I}V.T, l] L → + G ⊢ ⬊*[h, o, V, l] L. +#h #o #a #I #G #L #V #T #l #H @(lsx_ind … H) -L #L1 #_ #IHL1 @lsx_intro #L2 #HL12 #HV @IHL1 /3 width=4 by lleq_fwd_bind_sn/ qed-. -lemma lsx_fwd_flat_sn: ∀h,g,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L → - G ⊢ ⬊*[h, g, V, l] L. -#h #g #I #G #L #V #T #l #H @(lsx_ind … H) -L +lemma lsx_fwd_flat_sn: ∀h,o,I,G,L,V,T,l. G ⊢ ⬊*[h, o, ⓕ{I}V.T, l] L → + G ⊢ ⬊*[h, o, V, l] L. +#h #o #I #G #L #V #T #l #H @(lsx_ind … H) -L #L1 #_ #IHL1 @lsx_intro #L2 #HL12 #HV @IHL1 /3 width=3 by lleq_fwd_flat_sn/ qed-. -lemma lsx_fwd_flat_dx: ∀h,g,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L → - G ⊢ ⬊*[h, g, T, l] L. -#h #g #I #G #L #V #T #l #H @(lsx_ind … H) -L +lemma lsx_fwd_flat_dx: ∀h,o,I,G,L,V,T,l. G ⊢ ⬊*[h, o, ⓕ{I}V.T, l] L → + G ⊢ ⬊*[h, o, T, l] L. +#h #o #I #G #L #V #T #l #H @(lsx_ind … H) -L #L1 #_ #IHL1 @lsx_intro #L2 #HL12 #HV @IHL1 /3 width=3 by lleq_fwd_flat_dx/ qed-. -lemma lsx_fwd_pair_sn: ∀h,g,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ②{I}V.T, l] L → - G ⊢ ⬊*[h, g, V, l] L. -#h #g * /2 width=4 by lsx_fwd_bind_sn, lsx_fwd_flat_sn/ +lemma lsx_fwd_pair_sn: ∀h,o,I,G,L,V,T,l. G ⊢ ⬊*[h, o, ②{I}V.T, l] L → + G ⊢ ⬊*[h, o, V, l] L. +#h #o * /2 width=4 by lsx_fwd_bind_sn, lsx_fwd_flat_sn/ qed-. (* Basic inversion lemmas ***************************************************) -lemma lsx_inv_flat: ∀h,g,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L → - G ⊢ ⬊*[h, g, V, l] L ∧ G ⊢ ⬊*[h, g, T, l] L. +lemma lsx_inv_flat: ∀h,o,I,G,L,V,T,l. G ⊢ ⬊*[h, o, ⓕ{I}V.T, l] L → + G ⊢ ⬊*[h, o, V, l] L ∧ G ⊢ ⬊*[h, o, T, l] L. /3 width=3 by lsx_fwd_flat_sn, lsx_fwd_flat_dx, conj/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_alt.ma index 05637c0e7..07f3d94b2 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_alt.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_alt.ma @@ -20,54 +20,54 @@ include "basic_2/computation/lsx.ma". (* alternative definition of lsx *) definition lsxa: ∀h. sd h → relation4 ynat term genv lenv ≝ - λh,g,l,T,G. SN … (lpxs h g G) (lleq l T). + λh,o,l,T,G. SN … (lpxs h o G) (lleq l T). interpretation "extended strong normalization (local environment) alternative" - 'SNAlt h g l T G L = (lsxa h g T l G L). + 'SNAlt h o l T G L = (lsxa h o T l G L). (* Basic eliminators ********************************************************) -lemma lsxa_ind: ∀h,g,G,T,l. ∀R:predicate lenv. - (∀L1. G ⊢ ⬊⬊*[h, g, T, l] L1 → - (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → R L2) → +lemma lsxa_ind: ∀h,o,G,T,l. ∀R:predicate lenv. + (∀L1. G ⊢ ⬊⬊*[h, o, T, l] L1 → + (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → (L1 ≡[T, l] L2 → ⊥) → R L2) → R L1 ) → - ∀L. G ⊢ ⬊⬊*[h, g, T, l] L → R L. -#h #g #G #T #l #R #H0 #L1 #H elim H -L1 + ∀L. G ⊢ ⬊⬊*[h, o, T, l] L → R L. +#h #o #G #T #l #R #H0 #L1 #H elim H -L1 /5 width=1 by lleq_sym, SN_intro/ qed-. (* Basic properties *********************************************************) -lemma lsxa_intro: ∀h,g,G,L1,T,l. - (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊⬊*[h, g, T, l] L2) → - G ⊢ ⬊⬊*[h, g, T, l] L1. +lemma lsxa_intro: ∀h,o,G,L1,T,l. + (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊⬊*[h, o, T, l] L2) → + G ⊢ ⬊⬊*[h, o, T, l] L1. /5 width=1 by lleq_sym, SN_intro/ qed. -fact lsxa_intro_aux: ∀h,g,G,L1,T,l. - (∀L,L2. ⦃G, L⦄ ⊢ ➡*[h, g] L2 → L1 ≡[T, l] L → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊⬊*[h, g, T, l] L2) → - G ⊢ ⬊⬊*[h, g, T, l] L1. +fact lsxa_intro_aux: ∀h,o,G,L1,T,l. + (∀L,L2. ⦃G, L⦄ ⊢ ➡*[h, o] L2 → L1 ≡[T, l] L → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊⬊*[h, o, T, l] L2) → + G ⊢ ⬊⬊*[h, o, T, l] L1. /4 width=3 by lsxa_intro/ qed-. -lemma lsxa_lleq_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊⬊*[h, g, T, l] L1 → - ∀L2. L1 ≡[T, l] L2 → G ⊢ ⬊⬊*[h, g, T, l] L2. -#h #g #T #G #L1 #l #H @(lsxa_ind … H) -L1 +lemma lsxa_lleq_trans: ∀h,o,T,G,L1,l. G ⊢ ⬊⬊*[h, o, T, l] L1 → + ∀L2. L1 ≡[T, l] L2 → G ⊢ ⬊⬊*[h, o, T, l] L2. +#h #o #T #G #L1 #l #H @(lsxa_ind … H) -L1 #L1 #_ #IHL1 #L2 #HL12 @lsxa_intro #K2 #HLK2 #HnLK2 elim (lleq_lpxs_trans … HLK2 … HL12) -HLK2 /5 width=4 by lleq_canc_sn, lleq_trans/ qed-. -lemma lsxa_lpxs_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊⬊*[h, g, T, l] L1 → - ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → G ⊢ ⬊⬊*[h, g, T, l] L2. -#h #g #T #G #L1 #l #H @(lsxa_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12 +lemma lsxa_lpxs_trans: ∀h,o,T,G,L1,l. G ⊢ ⬊⬊*[h, o, T, l] L1 → + ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → G ⊢ ⬊⬊*[h, o, T, l] L2. +#h #o #T #G #L1 #l #H @(lsxa_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12 elim (lleq_dec T L1 L2 l) /3 width=4 by lsxa_lleq_trans/ qed-. -lemma lsxa_intro_lpx: ∀h,g,G,L1,T,l. - (∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊⬊*[h, g, T, l] L2) → - G ⊢ ⬊⬊*[h, g, T, l] L1. -#h #g #G #L1 #T #l #IH @lsxa_intro_aux +lemma lsxa_intro_lpx: ∀h,o,G,L1,T,l. + (∀L2. ⦃G, L1⦄ ⊢ ➡[h, o] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊⬊*[h, o, T, l] L2) → + G ⊢ ⬊⬊*[h, o, T, l] L1. +#h #o #G #L1 #T #l #IH @lsxa_intro_aux #L #L2 #H @(lpxs_ind_dx … H) -L [ #H destruct #H elim H // | #L0 #L elim (lleq_dec T L1 L l) /3 width=1 by/ @@ -79,37 +79,37 @@ qed-. (* Main properties **********************************************************) -theorem lsx_lsxa: ∀h,g,G,L,T,l. G ⊢ ⬊*[h, g, T, l] L → G ⊢ ⬊⬊*[h, g, T, l] L. -#h #g #G #L #T #l #H @(lsx_ind … H) -L +theorem lsx_lsxa: ∀h,o,G,L,T,l. G ⊢ ⬊*[h, o, T, l] L → G ⊢ ⬊⬊*[h, o, T, l] L. +#h #o #G #L #T #l #H @(lsx_ind … H) -L /4 width=1 by lsxa_intro_lpx/ qed. (* Main inversion lemmas ****************************************************) -theorem lsxa_inv_lsx: ∀h,g,G,L,T,l. G ⊢ ⬊⬊*[h, g, T, l] L → G ⊢ ⬊*[h, g, T, l] L. -#h #g #G #L #T #l #H @(lsxa_ind … H) -L +theorem lsxa_inv_lsx: ∀h,o,G,L,T,l. G ⊢ ⬊⬊*[h, o, T, l] L → G ⊢ ⬊*[h, o, T, l] L. +#h #o #G #L #T #l #H @(lsxa_ind … H) -L /4 width=1 by lsx_intro, lpx_lpxs/ qed-. (* Advanced properties ******************************************************) -lemma lsx_intro_alt: ∀h,g,G,L1,T,l. - (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊*[h, g, T, l] L2) → - G ⊢ ⬊*[h, g, T, l] L1. +lemma lsx_intro_alt: ∀h,o,G,L1,T,l. + (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊*[h, o, T, l] L2) → + G ⊢ ⬊*[h, o, T, l] L1. /6 width=1 by lsxa_inv_lsx, lsx_lsxa, lsxa_intro/ qed. -lemma lsx_lpxs_trans: ∀h,g,G,L1,T,l. G ⊢ ⬊*[h, g, T, l] L1 → - ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → G ⊢ ⬊*[h, g, T, l] L2. +lemma lsx_lpxs_trans: ∀h,o,G,L1,T,l. G ⊢ ⬊*[h, o, T, l] L1 → + ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → G ⊢ ⬊*[h, o, T, l] L2. /4 width=3 by lsxa_inv_lsx, lsx_lsxa, lsxa_lpxs_trans/ qed-. (* Advanced eliminators *****************************************************) -lemma lsx_ind_alt: ∀h,g,G,T,l. ∀R:predicate lenv. - (∀L1. G ⊢ ⬊*[h, g, T, l] L1 → - (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → R L2) → +lemma lsx_ind_alt: ∀h,o,G,T,l. ∀R:predicate lenv. + (∀L1. G ⊢ ⬊*[h, o, T, l] L1 → + (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → (L1 ≡[T, l] L2 → ⊥) → R L2) → R L1 ) → - ∀L. G ⊢ ⬊*[h, g, T, l] L → R L. -#h #g #G #T #l #R #IH #L #H @(lsxa_ind h g G T l … L) + ∀L. G ⊢ ⬊*[h, o, T, l] L → R L. +#h #o #G #T #l #R #IH #L #H @(lsxa_ind h o G T l … L) /4 width=1 by lsxa_inv_lsx, lsx_lsxa/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_csx.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_csx.ma index 67f754b7b..fa00a907d 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_csx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_csx.ma @@ -19,10 +19,10 @@ include "basic_2/computation/lcosx_cpx.ma". (* Advanced properties ******************************************************) -lemma lsx_lref_be_lpxs: ∀h,g,I,G,K1,V,i,l. l ≤ yinj i → ⦃G, K1⦄ ⊢ ⬊*[h, g] V → - ∀K2. G ⊢ ⬊*[h, g, V, 0] K2 → ⦃G, K1⦄ ⊢ ➡*[h, g] K2 → - ∀L2. ⬇[i] L2 ≡ K2.ⓑ{I}V → G ⊢ ⬊*[h, g, #i, l] L2. -#h #g #I #G #K1 #V #i #l #Hli #H @(csx_ind_alt … H) -V +lemma lsx_lref_be_lpxs: ∀h,o,I,G,K1,V,i,l. l ≤ yinj i → ⦃G, K1⦄ ⊢ ⬊*[h, o] V → + ∀K2. G ⊢ ⬊*[h, o, V, 0] K2 → ⦃G, K1⦄ ⊢ ➡*[h, o] K2 → + ∀L2. ⬇[i] L2 ≡ K2.ⓑ{I}V → G ⊢ ⬊*[h, o, #i, l] L2. +#h #o #I #G #K1 #V #i #l #Hli #H @(csx_ind_alt … H) -V #V0 #_ #IHV0 #K2 #H @(lsx_ind … H) -K2 #K0 #HK0 #IHK0 #HK10 #L0 #HLK0 @lsx_intro #L2 #HL02 #HnL02 elim (lpx_drop_conf … HLK0 … HL02) -HL02 @@ -35,15 +35,15 @@ elim (eq_term_dec V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnL02 -HLK0 ] qed. -lemma lsx_lref_be: ∀h,g,I,G,K,V,i,l. l ≤ yinj i → ⦃G, K⦄ ⊢ ⬊*[h, g] V → - G ⊢ ⬊*[h, g, V, 0] K → - ∀L. ⬇[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, g, #i, l] L. +lemma lsx_lref_be: ∀h,o,I,G,K,V,i,l. l ≤ yinj i → ⦃G, K⦄ ⊢ ⬊*[h, o] V → + G ⊢ ⬊*[h, o, V, 0] K → + ∀L. ⬇[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, o, #i, l] L. /2 width=8 by lsx_lref_be_lpxs/ qed. (* Main properties **********************************************************) -theorem csx_lsx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ∀l. G ⊢ ⬊*[h, g, T, l] L. -#h #g #G #L #T @(fqup_wf_ind_eq … G L T) -G -L -T +theorem csx_lsx: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, o] T → ∀l. G ⊢ ⬊*[h, o, T, l] L. +#h #o #G #L #T @(fqup_wf_ind_eq … G L T) -G -L -T #Z #Y #X #IH #G #L * * // [ #i #HG #HL #HT #H #l destruct elim (lt_or_ge i (|L|)) /2 width=1 by lsx_lref_free/ diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_drop.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_drop.ma index f1a4c7b64..c70d6fbc5 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_drop.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_drop.ma @@ -20,23 +20,23 @@ include "basic_2/computation/lsx.ma". (* Advanced properties ******************************************************) -lemma lsx_lref_free: ∀h,g,G,L,l,i. |L| ≤ i → G ⊢ ⬊*[h, g, #i, l] L. -#h #g #G #L1 #l #i #HL1 @lsx_intro +lemma lsx_lref_free: ∀h,o,G,L,l,i. |L| ≤ i → G ⊢ ⬊*[h, o, #i, l] L. +#h #o #G #L1 #l #i #HL1 @lsx_intro #L2 #HL12 #H elim H -H /4 width=6 by lpx_fwd_length, lleq_free, le_repl_sn_conf_aux/ qed. -lemma lsx_lref_skip: ∀h,g,G,L,l,i. yinj i < l → G ⊢ ⬊*[h, g, #i, l] L. -#h #g #G #L1 #l #i #HL1 @lsx_intro +lemma lsx_lref_skip: ∀h,o,G,L,l,i. yinj i < l → G ⊢ ⬊*[h, o, #i, l] L. +#h #o #G #L1 #l #i #HL1 @lsx_intro #L2 #HL12 #H elim H -H /3 width=4 by lpx_fwd_length, lleq_skip/ qed. (* Advanced forward lemmas **************************************************) -lemma lsx_fwd_lref_be: ∀h,g,I,G,L,l,i. l ≤ yinj i → G ⊢ ⬊*[h, g, #i, l] L → - ∀K,V. ⬇[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, g, V, 0] K. -#h #g #I #G #L #l #i #Hli #H @(lsx_ind … H) -L +lemma lsx_fwd_lref_be: ∀h,o,I,G,L,l,i. l ≤ yinj i → G ⊢ ⬊*[h, o, #i, l] L → + ∀K,V. ⬇[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, o, V, 0] K. +#h #o #I #G #L #l #i #Hli #H @(lsx_ind … H) -L #L1 #_ #IHL1 #K1 #V #HLK1 @lsx_intro #K2 #HK12 #HnK12 lapply (drop_fwd_drop2 … HLK1) #H2LK1 elim (drop_lpx_trans … H2LK1 … HK12) -H2LK1 -HK12 @@ -48,19 +48,19 @@ qed-. (* Properties on relocation *************************************************) -lemma lsx_lift_le: ∀h,g,G,K,T,U,lt,l,m. lt ≤ yinj l → - ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, T, lt] K → - ∀L. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, U, lt] L. -#h #g #G #K #T #U #lt #l #m #Hltl #HTU #H @(lsx_ind … H) -K +lemma lsx_lift_le: ∀h,o,G,K,T,U,lt,l,k. lt ≤ yinj l → + ⬆[l, k] T ≡ U → G ⊢ ⬊*[h, o, T, lt] K → + ∀L. ⬇[Ⓕ, l, k] L ≡ K → G ⊢ ⬊*[h, o, U, lt] L. +#h #o #G #K #T #U #lt #l #k #Hltl #HTU #H @(lsx_ind … H) -K #K1 #_ #IHK1 #L1 #HLK1 @lsx_intro #L2 #HL12 #HnU elim (lpx_drop_conf … HLK1 … HL12) -HL12 /4 width=10 by lleq_lift_le/ qed-. -lemma lsx_lift_ge: ∀h,g,G,K,T,U,lt,l,m. yinj l ≤ lt → - ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, T, lt] K → - ∀L. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, U, lt + m] L. -#h #g #G #K #T #U #lt #l #m #Hllt #HTU #H @(lsx_ind … H) -K +lemma lsx_lift_ge: ∀h,o,G,K,T,U,lt,l,k. yinj l ≤ lt → + ⬆[l, k] T ≡ U → G ⊢ ⬊*[h, o, T, lt] K → + ∀L. ⬇[Ⓕ, l, k] L ≡ K → G ⊢ ⬊*[h, o, U, lt + k] L. +#h #o #G #K #T #U #lt #l #k #Hllt #HTU #H @(lsx_ind … H) -K #K1 #_ #IHK1 #L1 #HLK1 @lsx_intro #L2 #HL12 #HnU elim (lpx_drop_conf … HLK1 … HL12) -HL12 /4 width=9 by lleq_lift_ge/ @@ -68,28 +68,28 @@ qed-. (* Inversion lemmas on relocation *******************************************) -lemma lsx_inv_lift_le: ∀h,g,G,L,T,U,lt,l,m. lt ≤ yinj l → - ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, U, lt] L → - ∀K. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, T, lt] K. -#h #g #G #L #T #U #lt #l #m #Hltl #HTU #H @(lsx_ind … H) -L +lemma lsx_inv_lift_le: ∀h,o,G,L,T,U,lt,l,k. lt ≤ yinj l → + ⬆[l, k] T ≡ U → G ⊢ ⬊*[h, o, U, lt] L → + ∀K. ⬇[Ⓕ, l, k] L ≡ K → G ⊢ ⬊*[h, o, T, lt] K. +#h #o #G #L #T #U #lt #l #k #Hltl #HTU #H @(lsx_ind … H) -L #L1 #_ #IHL1 #K1 #HLK1 @lsx_intro #K2 #HK12 #HnT elim (drop_lpx_trans … HLK1 … HK12) -HK12 /4 width=10 by lleq_inv_lift_le/ qed-. -lemma lsx_inv_lift_be: ∀h,g,G,L,T,U,lt,l,m. yinj l ≤ lt → lt ≤ l + m → - ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, U, lt] L → - ∀K. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, T, l] K. -#h #g #G #L #T #U #lt #l #m #Hllt #Hltlm #HTU #H @(lsx_ind … H) -L +lemma lsx_inv_lift_be: ∀h,o,G,L,T,U,lt,l,k. yinj l ≤ lt → lt ≤ l + k → + ⬆[l, k] T ≡ U → G ⊢ ⬊*[h, o, U, lt] L → + ∀K. ⬇[Ⓕ, l, k] L ≡ K → G ⊢ ⬊*[h, o, T, l] K. +#h #o #G #L #T #U #lt #l #k #Hllt #Hltlm #HTU #H @(lsx_ind … H) -L #L1 #_ #IHL1 #K1 #HLK1 @lsx_intro #K2 #HK12 #HnT elim (drop_lpx_trans … HLK1 … HK12) -HK12 /4 width=11 by lleq_inv_lift_be/ qed-. -lemma lsx_inv_lift_ge: ∀h,g,G,L,T,U,lt,l,m. yinj l + yinj m ≤ lt → - ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, U, lt] L → - ∀K. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, T, lt-m] K. -#h #g #G #L #T #U #lt #l #m #Hlmlt #HTU #H @(lsx_ind … H) -L +lemma lsx_inv_lift_ge: ∀h,o,G,L,T,U,lt,l,k. yinj l + yinj k ≤ lt → + ⬆[l, k] T ≡ U → G ⊢ ⬊*[h, o, U, lt] L → + ∀K. ⬇[Ⓕ, l, k] L ≡ K → G ⊢ ⬊*[h, o, T, lt-k] K. +#h #o #G #L #T #U #lt #l #k #Hlmlt #HTU #H @(lsx_ind … H) -L #L1 #_ #IHL1 #K1 #HLK1 @lsx_intro #K2 #HK12 #HnT elim (drop_lpx_trans … HLK1 … HK12) -HK12 /4 width=9 by lleq_inv_lift_ge/ diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_lpx.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_lpx.ma index 05fc77f90..81dc6e73d 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_lpx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_lpx.ma @@ -20,23 +20,23 @@ include "basic_2/computation/lsx.ma". (* Advanced properties ******************************************************) -lemma lsx_lleq_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊*[h, g, T, l] L1 → - ∀L2. L1 ≡[T, l] L2 → G ⊢ ⬊*[h, g, T, l] L2. -#h #g #T #G #L1 #l #H @(lsx_ind … H) -L1 +lemma lsx_lleq_trans: ∀h,o,T,G,L1,l. G ⊢ ⬊*[h, o, T, l] L1 → + ∀L2. L1 ≡[T, l] L2 → G ⊢ ⬊*[h, o, T, l] L2. +#h #o #T #G #L1 #l #H @(lsx_ind … H) -L1 #L1 #_ #IHL1 #L2 #HL12 @lsx_intro #K2 #HLK2 #HnLK2 elim (lleq_lpx_trans … HLK2 … HL12) -HLK2 /5 width=4 by lleq_canc_sn, lleq_trans/ qed-. -lemma lsx_lpx_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊*[h, g, T, l] L1 → - ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → G ⊢ ⬊*[h, g, T, l] L2. -#h #g #T #G #L1 #l #H @(lsx_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12 +lemma lsx_lpx_trans: ∀h,o,T,G,L1,l. G ⊢ ⬊*[h, o, T, l] L1 → + ∀L2. ⦃G, L1⦄ ⊢ ➡[h, o] L2 → G ⊢ ⬊*[h, o, T, l] L2. +#h #o #T #G #L1 #l #H @(lsx_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12 elim (lleq_dec T L1 L2 l) /3 width=4 by lsx_lleq_trans/ qed-. -lemma lsx_lreq_conf: ∀h,g,G,L1,T,l. G ⊢ ⬊*[h, g, T, l] L1 → - ∀L2. L1 ⩬[l, ∞] L2 → G ⊢ ⬊*[h, g, T, l] L2. -#h #g #G #L1 #T #l #H @(lsx_ind … H) -L1 +lemma lsx_lreq_conf: ∀h,o,G,L1,T,l. G ⊢ ⬊*[h, o, T, l] L1 → + ∀L2. L1 ⩬[l, ∞] L2 → G ⊢ ⬊*[h, o, T, l] L2. +#h #o #G #L1 #T #l #H @(lsx_ind … H) -L1 #L1 #_ #IHL1 #L2 #HL12 @lsx_intro #L3 #HL23 #HnL23 elim (lreq_lpx_trans_lleq … HL12 … HL23) -HL12 -HL23 #L0 #HL03 #HL10 #H elim (H T) -H /4 width=4 by/ @@ -44,9 +44,9 @@ qed-. (* Advanced forward lemmas **************************************************) -lemma lsx_fwd_bind_dx: ∀h,g,a,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓑ{a,I}V.T, l] L → - G ⊢ ⬊*[h, g, T, ⫯l] L.ⓑ{I}V. -#h #g #a #I #G #L #V1 #T #l #H @(lsx_ind … H) -L +lemma lsx_fwd_bind_dx: ∀h,o,a,I,G,L,V,T,l. G ⊢ ⬊*[h, o, ⓑ{a,I}V.T, l] L → + G ⊢ ⬊*[h, o, T, ⫯l] L.ⓑ{I}V. +#h #o #a #I #G #L #V1 #T #l #H @(lsx_ind … H) -L #L1 #_ #IHL1 @lsx_intro #Y #H #HT elim (lpx_inv_pair1 … H) -H #L2 #V2 #HL12 #_ #H destruct @@ -58,6 +58,6 @@ qed-. (* Advanced inversion lemmas ************************************************) -lemma lsx_inv_bind: ∀h,g,a,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓑ{a, I}V.T, l] L → - G ⊢ ⬊*[h, g, V, l] L ∧ G ⊢ ⬊*[h, g, T, ⫯l] L.ⓑ{I}V. +lemma lsx_inv_bind: ∀h,o,a,I,G,L,V,T,l. G ⊢ ⬊*[h, o, ⓑ{a, I}V.T, l] L → + G ⊢ ⬊*[h, o, V, l] L ∧ G ⊢ ⬊*[h, o, T, ⫯l] L.ⓑ{I}V. /3 width=4 by lsx_fwd_bind_sn, lsx_fwd_bind_dx, conj/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_lpxs.ma index d84202bbc..2e6da2ed4 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_lpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_lpxs.ma @@ -19,11 +19,11 @@ include "basic_2/computation/lsx_alt.ma". (* Advanced properties ******************************************************) -fact lsx_bind_lpxs_aux: ∀h,g,a,I,G,L1,V,l. G ⊢ ⬊*[h, g, V, l] L1 → - ∀Y,T. G ⊢ ⬊*[h, g, T, ⫯l] Y → - ∀L2. Y = L2.ⓑ{I}V → ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → - G ⊢ ⬊*[h, g, ⓑ{a,I}V.T, l] L2. -#h #g #a #I #G #L1 #V #l #H @(lsx_ind_alt … H) -L1 +fact lsx_bind_lpxs_aux: ∀h,o,a,I,G,L1,V,l. G ⊢ ⬊*[h, o, V, l] L1 → + ∀Y,T. G ⊢ ⬊*[h, o, T, ⫯l] Y → + ∀L2. Y = L2.ⓑ{I}V → ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → + G ⊢ ⬊*[h, o, ⓑ{a,I}V.T, l] L2. +#h #o #a #I #G #L1 #V #l #H @(lsx_ind_alt … H) -L1 #L1 #HL1 #IHL1 #Y #T #H @(lsx_ind_alt … H) -Y #Y #HY #IHY #L2 #H #HL12 destruct @lsx_intro_alt #L0 #HL20 lapply (lpxs_trans … HL12 … HL20) @@ -36,15 +36,15 @@ fact lsx_bind_lpxs_aux: ∀h,g,a,I,G,L1,V,l. G ⊢ ⬊*[h, g, V, l] L1 → ] qed-. -lemma lsx_bind: ∀h,g,a,I,G,L,V,l. G ⊢ ⬊*[h, g, V, l] L → - ∀T. G ⊢ ⬊*[h, g, T, ⫯l] L.ⓑ{I}V → - G ⊢ ⬊*[h, g, ⓑ{a,I}V.T, l] L. +lemma lsx_bind: ∀h,o,a,I,G,L,V,l. G ⊢ ⬊*[h, o, V, l] L → + ∀T. G ⊢ ⬊*[h, o, T, ⫯l] L.ⓑ{I}V → + G ⊢ ⬊*[h, o, ⓑ{a,I}V.T, l] L. /2 width=3 by lsx_bind_lpxs_aux/ qed. -lemma lsx_flat_lpxs: ∀h,g,I,G,L1,V,l. G ⊢ ⬊*[h, g, V, l] L1 → - ∀L2,T. G ⊢ ⬊*[h, g, T, l] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → - G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L2. -#h #g #I #G #L1 #V #l #H @(lsx_ind_alt … H) -L1 +lemma lsx_flat_lpxs: ∀h,o,I,G,L1,V,l. G ⊢ ⬊*[h, o, V, l] L1 → + ∀L2,T. G ⊢ ⬊*[h, o, T, l] L2 → ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → + G ⊢ ⬊*[h, o, ⓕ{I}V.T, l] L2. +#h #o #I #G #L1 #V #l #H @(lsx_ind_alt … H) -L1 #L1 #HL1 #IHL1 #L2 #T #H @(lsx_ind_alt … H) -L2 #L2 #HL2 #IHL2 #HL12 @lsx_intro_alt #L0 #HL20 lapply (lpxs_trans … HL12 … HL20) @@ -57,6 +57,6 @@ lemma lsx_flat_lpxs: ∀h,g,I,G,L1,V,l. G ⊢ ⬊*[h, g, V, l] L1 → ] qed-. -lemma lsx_flat: ∀h,g,I,G,L,V,l. G ⊢ ⬊*[h, g, V, l] L → - ∀T. G ⊢ ⬊*[h, g, T, l] L → G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L. +lemma lsx_flat: ∀h,o,I,G,L,V,l. G ⊢ ⬊*[h, o, V, l] L → + ∀T. G ⊢ ⬊*[h, o, T, l] L → G ⊢ ⬊*[h, o, ⓕ{I}V.T, l] L. /2 width=3 by lsx_flat_lpxs/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/scpds.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/scpds.ma index abc22cc37..1f189c15e 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/scpds.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/scpds.ma @@ -19,30 +19,30 @@ include "basic_2/computation/cprs.ma". (* STRATIFIED DECOMPOSED PARALLEL COMPUTATION ON TERMS **********************) definition scpds: ∀h. sd h → nat → relation4 genv lenv term term ≝ - λh,g,d2,G,L,T1,T2. - ∃∃T,d1. d2 ≤ d1 & ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 & ⦃G, L⦄ ⊢ T1 •*[h, d2] T & ⦃G, L⦄ ⊢ T ➡* T2. + λh,o,d2,G,L,T1,T2. + ∃∃T,d1. d2 ≤ d1 & ⦃G, L⦄ ⊢ T1 ▪[h, o] d1 & ⦃G, L⦄ ⊢ T1 •*[h, d2] T & ⦃G, L⦄ ⊢ T ➡* T2. interpretation "stratified decomposed parallel computation (term)" - 'DPRedStar h g d G L T1 T2 = (scpds h g d G L T1 T2). + 'DPRedStar h o d G L T1 T2 = (scpds h o d G L T1 T2). (* Basic properties *********************************************************) -lemma sta_cprs_scpds: ∀h,g,G,L,T1,T,T2,d. ⦃G, L⦄ ⊢ T1 ▪[h, g] d+1 → ⦃G, L⦄ ⊢ T1 •*[h, 1] T → - ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 1] T2. +lemma sta_cprs_scpds: ∀h,o,G,L,T1,T,T2,d. ⦃G, L⦄ ⊢ T1 ▪[h, o] d+1 → ⦃G, L⦄ ⊢ T1 •*[h, 1] T → + ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, o, 1] T2. /2 width=6 by ex4_2_intro/ qed. -lemma lstas_scpds: ∀h,g,G,L,T1,T2,d1. ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → - ∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d2] T2. +lemma lstas_scpds: ∀h,o,G,L,T1,T2,d1. ⦃G, L⦄ ⊢ T1 ▪[h, o] d1 → + ∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, o, d2] T2. /2 width=6 by ex4_2_intro/ qed. -lemma scpds_strap1: ∀h,g,G,L,T1,T,T2,d. - ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T → ⦃G, L⦄ ⊢ T ➡ T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T2. -#h #g #G #L #T1 #T #T2 #d * /3 width=8 by cprs_strap1, ex4_2_intro/ +lemma scpds_strap1: ∀h,o,G,L,T1,T,T2,d. + ⦃G, L⦄ ⊢ T1 •*➡*[h, o, d] T → ⦃G, L⦄ ⊢ T ➡ T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, o, d] T2. +#h #o #G #L #T1 #T #T2 #d * /3 width=8 by cprs_strap1, ex4_2_intro/ qed. (* Basic forward lemmas *****************************************************) -lemma scpds_fwd_cprs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 0] T2 → +lemma scpds_fwd_cprs: ∀h,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 •*➡*[h, o, 0] T2 → ⦃G, L⦄ ⊢ T1 ➡* T2. -#h #g #G #L #T1 #T2 * /3 width=3 by cprs_strap2, lstas_cpr/ +#h #o #G #L #T1 #T2 * /3 width=3 by cprs_strap2, lstas_cpr/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_aaa.ma index f14723fdc..eef78441b 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_aaa.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_aaa.ma @@ -20,6 +20,6 @@ include "basic_2/computation/scpds.ma". (* Properties on atomic arity assignment for terms **************************) -lemma scpds_aaa_conf: ∀h,g,G,L,d. Conf3 … (aaa G L) (scpds h g d G L). -#h #g #G #L #d #A #T #HT #U * /3 width=6 by lstas_aaa_conf, cprs_aaa_conf/ +lemma scpds_aaa_conf: ∀h,o,G,L,d. Conf3 … (aaa G L) (scpds h o d G L). +#h #o #G #L #d #A #T #HT #U * /3 width=6 by lstas_aaa_conf, cprs_aaa_conf/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_lift.ma index ee212e99c..f63fd3ad6 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_lift.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_lift.ma @@ -21,14 +21,14 @@ include "basic_2/computation/scpds.ma". (* Relocation properties ****************************************************) -lemma scpds_lift: ∀h,g,G,d. d_liftable (scpds h g d G). -#h #g #G #d2 #K #T1 #T2 * #T #d1 #Hd21 #Hd1 #HT1 #HT2 #L #s #l #m -elim (lift_total T l m) +lemma scpds_lift: ∀h,o,G,d. d_liftable (scpds h o d G). +#h #o #G #d2 #K #T1 #T2 * #T #d1 #Hd21 #Hd1 #HT1 #HT2 #L #c #l #k +elim (lift_total T l k) /3 width=15 by cprs_lift, da_lift, lstas_lift, ex4_2_intro/ qed. -lemma scpds_inv_lift1: ∀h,g,G,d. d_deliftable_sn (scpds h g d G). -#h #g #G #d2 #L #U1 #U2 * #U #d1 #Hd21 #Hd1 #HU1 #HU2 #K #s #l #m #HLK #T1 #HTU1 +lemma scpds_inv_lift1: ∀h,o,G,d. d_deliftable_sn (scpds h o d G). +#h #o #G #d2 #L #U1 #U2 * #U #d1 #Hd21 #Hd1 #HU1 #HU2 #K #c #l #k #HLK #T1 #HTU1 lapply (da_inv_lift … Hd1 … HLK … HTU1) -Hd1 #Hd1 elim (lstas_inv_lift1 … HU1 … HLK … HTU1) -U1 #T #HTU #HT1 elim (cprs_inv_lift1 … HU2 … HLK … HTU) -U -L diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_scpds.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_scpds.ma index e9afcf4ef..6c5de0687 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_scpds.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_scpds.ma @@ -21,26 +21,26 @@ include "basic_2/computation/scpds.ma". (* Advanced properties ******************************************************) -lemma scpds_strap2: ∀h,g,G,L,T1,T,T2,d1,d. ⦃G, L⦄ ⊢ T1 ▪[h, g] d1+1 → - ⦃G, L⦄ ⊢ T1 •*[h, 1] T → ⦃G, L⦄ ⊢ T •*➡*[h, g, d] T2 → - ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d+1] T2. -#h #g #G #L #T1 #T #T2 #d1 #d #Hd1 #HT1 * +lemma scpds_strap2: ∀h,o,G,L,T1,T,T2,d1,d. ⦃G, L⦄ ⊢ T1 ▪[h, o] d1+1 → + ⦃G, L⦄ ⊢ T1 •*[h, 1] T → ⦃G, L⦄ ⊢ T •*➡*[h, o, d] T2 → + ⦃G, L⦄ ⊢ T1 •*➡*[h, o, d+1] T2. +#h #o #G #L #T1 #T #T2 #d1 #d #Hd1 #HT1 * #T0 #d0 #Hd0 #HTd0 #HT0 #HT02 -lapply (lstas_da_conf … HT1 … Hd1) commutative_plus /3 width=6 by le_S_S, ex4_2_intro/ qed. -lemma scpds_cprs_trans: ∀h,g,G,L,T1,T,T2,d. - ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T → ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T2. -#h #g #G #L #T1 #T #T2 #d * /3 width=8 by cprs_trans, ex4_2_intro/ +lemma scpds_cprs_trans: ∀h,o,G,L,T1,T,T2,d. + ⦃G, L⦄ ⊢ T1 •*➡*[h, o, d] T → ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, o, d] T2. +#h #o #G #L #T1 #T #T2 #d * /3 width=8 by cprs_trans, ex4_2_intro/ qed-. -lemma lstas_scpds_trans: ∀h,g,G,L,T1,T,T2,d1,d2,d. - d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → - ⦃G, L⦄ ⊢ T1 •*[h, d2] T → ⦃G, L⦄ ⊢ T •*➡*[h, g, d] T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d2+d] T2. -#h #g #G #L #T1 #T #T2 #d1 #d2 #d #Hd21 #HTd1 #HT1 * #T0 #d0 #Hd0 #HTd0 #HT0 #HT02 +lemma lstas_scpds_trans: ∀h,o,G,L,T1,T,T2,d1,d2,d. + d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ▪[h, o] d1 → + ⦃G, L⦄ ⊢ T1 •*[h, d2] T → ⦃G, L⦄ ⊢ T •*➡*[h, o, d] T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, o, d2+d] T2. +#h #o #G #L #T1 #T #T2 #d1 #d2 #d #Hd21 #HTd1 #HT1 * #T0 #d0 #Hd0 #HTd0 #HT0 #HT02 lapply (lstas_da_conf … HT1 … HTd1) #HTd12 lapply (da_mono … HTd12 … HTd0) -HTd12 -HTd0 #H destruct lapply (le_minus_to_plus_r … Hd21 Hd0) -Hd21 -Hd0 @@ -49,19 +49,19 @@ qed-. (* Advanced inversion lemmas ************************************************) -lemma scpds_inv_abst1: ∀h,g,a,G,L,V1,T1,U2,d. ⦃G, L⦄ ⊢ ⓛ{a}V1.T1 •*➡*[h, g, d] U2 → - ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡* V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 •*➡*[h, g, d] T2 & +lemma scpds_inv_abst1: ∀h,o,a,G,L,V1,T1,U2,d. ⦃G, L⦄ ⊢ ⓛ{a}V1.T1 •*➡*[h, o, d] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡* V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 •*➡*[h, o, d] T2 & U2 = ⓛ{a}V2.T2. -#h #g #a #G #L #V1 #T1 #U2 #d2 * #X #d1 #Hd21 #Hd1 #H1 #H2 +#h #o #a #G #L #V1 #T1 #U2 #d2 * #X #d1 #Hd21 #Hd1 #H1 #H2 lapply (da_inv_bind … Hd1) -Hd1 #Hd1 elim (lstas_inv_bind1 … H1) -H1 #U #HTU1 #H destruct elim (cprs_inv_abst1 … H2) -H2 #V2 #T2 #HV12 #HUT2 #H destruct /3 width=6 by ex4_2_intro, ex3_2_intro/ qed-. -lemma scpds_inv_abbr_abst: ∀h,g,a1,a2,G,L,V1,W2,T1,T2,d. ⦃G, L⦄ ⊢ ⓓ{a1}V1.T1 •*➡*[h, g, d] ⓛ{a2}W2.T2 → - ∃∃T. ⦃G, L.ⓓV1⦄ ⊢ T1 •*➡*[h, g, d] T & ⬆[0, 1] ⓛ{a2}W2.T2 ≡ T & a1 = true. -#h #g #a1 #a2 #G #L #V1 #W2 #T1 #T2 #d2 * #X #d1 #Hd21 #Hd1 #H1 #H2 +lemma scpds_inv_abbr_abst: ∀h,o,a1,a2,G,L,V1,W2,T1,T2,d. ⦃G, L⦄ ⊢ ⓓ{a1}V1.T1 •*➡*[h, o, d] ⓛ{a2}W2.T2 → + ∃∃T. ⦃G, L.ⓓV1⦄ ⊢ T1 •*➡*[h, o, d] T & ⬆[0, 1] ⓛ{a2}W2.T2 ≡ T & a1 = true. +#h #o #a1 #a2 #G #L #V1 #W2 #T1 #T2 #d2 * #X #d1 #Hd21 #Hd1 #H1 #H2 lapply (da_inv_bind … Hd1) -Hd1 #Hd1 elim (lstas_inv_bind1 … H1) -H1 #U1 #HTU1 #H destruct elim (cprs_inv_abbr1 … H2) -H2 * @@ -70,24 +70,24 @@ elim (cprs_inv_abbr1 … H2) -H2 * ] qed-. -lemma scpds_inv_lstas_eq: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T2 → +lemma scpds_inv_lstas_eq: ∀h,o,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*➡*[h, o, d] T2 → ∀T. ⦃G, L⦄ ⊢ T1 •*[h, d] T → ⦃G, L⦄ ⊢ T ➡* T2. -#h #g #G #L #T1 #T2 #d2 * +#h #o #G #L #T1 #T2 #d2 * #T0 #d1 #_ #_ #HT10 #HT02 #T #HT1 lapply (lstas_mono … HT10 … HT1) #H destruct // qed-. (* Advanced forward lemmas **************************************************) -lemma scpds_fwd_cpxs: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. -#h #g #G #L #T1 #T2 #d * /3 width=5 by cpxs_trans, lstas_cpxs, cprs_cpxs/ +lemma scpds_fwd_cpxs: ∀h,o,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*➡*[h, o, d] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, o] T2. +#h #o #G #L #T1 #T2 #d * /3 width=5 by cpxs_trans, lstas_cpxs, cprs_cpxs/ qed-. (* Main properties **********************************************************) -theorem scpds_conf_eq: ∀h,g,G,L,T0,T1,d. ⦃G, L⦄ ⊢ T0 •*➡*[h, g, d] T1 → - ∀T2. ⦃G, L⦄ ⊢ T0 •*➡*[h, g, d] T2 → +theorem scpds_conf_eq: ∀h,o,G,L,T0,T1,d. ⦃G, L⦄ ⊢ T0 •*➡*[h, o, d] T1 → + ∀T2. ⦃G, L⦄ ⊢ T0 •*➡*[h, o, d] T2 → ∃∃T. ⦃G, L⦄ ⊢ T1 ➡* T & ⦃G, L⦄ ⊢ T2 ➡* T. -#h #g #G #L #T0 #T1 #d0 * #U1 #d1 #_ #_ #H1 #HUT1 #T2 * #U2 #d2 #_ #_ #H2 #HUT2 -d1 -d2 +#h #o #G #L #T0 #T1 #d0 * #U1 #d1 #_ #_ #H1 #HUT1 #T2 * #U2 #d2 #_ #_ #H2 #HUT2 -d1 -d2 lapply (lstas_mono … H1 … H2) #H destruct -h -d0 /2 width=3 by cprs_conf/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc_new/drops/drops.etc b/matita/matita/contribs/lambdadelta/basic_2/etc_new/drops/drops.etc index 86ca4c76a..6c07f6f34 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/etc_new/drops/drops.etc +++ b/matita/matita/contribs/lambdadelta/basic_2/etc_new/drops/drops.etc @@ -1,27 +1,3 @@ -lemma drop_split: ∀L1,L2,l,m2,s. ⬇[s, l, m2] L1 ≡ L2 → ∀m1. m1 ≤ m2 → - ∃∃L. ⬇[s, l, m2 - m1] L1 ≡ L & ⬇[s, l, m1] L ≡ L2. -#L1 #L2 #l #m2 #s #H elim H -L1 -L2 -l -m2 -[ #l #m2 #Hs #m1 #Hm12 @(ex2_intro … (⋆)) - @drop_atom #H lapply (Hs H) -s #H destruct /2 width=1 by le_n_O_to_eq/ -| #I #L1 #V #m1 #Hm1 lapply (le_n_O_to_eq … Hm1) -Hm1 - #H destruct /2 width=3 by ex2_intro/ -| #I #L1 #L2 #V #m2 #HL12 #IHL12 #m1 @(nat_ind_plus … m1) -m1 - [ /3 width=3 by drop_drop, ex2_intro/ - | -HL12 #m1 #_ #Hm12 lapply (le_plus_to_le_r … Hm12) -Hm12 - #Hm12 elim (IHL12 … Hm12) -IHL12 >minus_plus_plus_l - #L #HL1 #HL2 elim (lt_or_ge (|L1|) (m2-m1)) #H0 - [ elim (drop_inv_O1_gt … HL1 H0) -HL1 #H1 #H2 destruct - elim (drop_inv_atom1 … HL2) -HL2 #H #_ destruct - @(ex2_intro … (⋆)) [ @drop_O1_ge normalize // ] - @drop_atom #H destruct - | elim (drop_O1_pair … HL1 H0 I V) -HL1 -H0 /3 width=5 by drop_drop, ex2_intro/ - ] - ] -| #I #L1 #L2 #V1 #V2 #l #m2 #_ #HV21 #IHL12 #m1 #Hm12 elim (IHL12 … Hm12) -IHL12 - #L #HL1 #HL2 elim (lift_split … HV21 l m1) -HV21 /3 width=5 by drop_skip, ex2_intro/ -] -qed-. - lemma drop_inv_refl: ∀L,l,m. ⬇[Ⓕ, l, m] L ≡ L → m = 0. /2 width=5 by drop_inv_length_eq/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/drops.ma index 2e21e55ef..fd47afae2 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/relocation/drops.ma @@ -238,6 +238,16 @@ lemma drops_inv_skip2: ∀I,X,K2,V2,c,f. ⬇*[c, ↑f] X ≡ K2.ⓑ{I}V2 → (* Inversion lemmas with test for uniformity ********************************) +lemma drops_inv_isuni: ∀L1,L2,f. ⬇*[Ⓣ, f] L1 ≡ L2 → 𝐔⦃f⦄ → + (𝐈⦃f⦄ ∧ L2 = L1) ∨ + ∃∃I,K,V,g. ⬇*[Ⓣ, g] K ≡ L2 & L1 = K.ⓑ{I}V & f = ⫯g. +#L1 #L2 #f * -L1 -L2 -f +[ /4 width=1 by or_introl, conj/ +| /4 width=7 by ex3_4_intro, or_intror/ +| /7 width=6 by drops_fwd_isid, lifts_fwd_isid, isuni_inv_push, isid_push, or_introl, conj, eq_f3, sym_eq/ +] +qed-. + (* Basic_2A1: was: drop_inv_O1_pair1 *) lemma drops_inv_pair1_isuni: ∀I,K,L2,V,c,f. 𝐔⦃f⦄ → ⬇*[c, f] K.ⓑ{I}V ≡ L2 → (𝐈⦃f⦄ ∧ L2 = K.ⓑ{I}V) ∨ @@ -271,6 +281,16 @@ lemma drops_inv_pair2_isuni_next: ∀I,K,V,c,f,L1. 𝐔⦃f⦄ → ⬇*[c, ⫯f] ] qed-. +(* Inversion lemmas with uniform relocations ********************************) + +lemma drops_inv_succ: ∀L1,L2,l. ⬇*[⫯l] L1 ≡ L2 → + ∃∃I,K,V. ⬇*[l] K ≡ L2 & L1 = K.ⓑ{I}V. +#L1 #L2 #l #H elim (drops_inv_isuni … H) -H // * +[ #H elim (isid_inv_next … H) -H // +| /2 width=5 by ex2_3_intro/ +] +qed-. + (* Basic_2A1: removed theorems 12: drops_inv_nil drops_inv_cons d1_liftable_liftables drop_refl_atom_O2 drop_inv_pair1 diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts.ma index a72f58604..97db4d98e 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/relocation/lifts.ma @@ -1,3 +1,4 @@ + (**************************************************************************) (* ___ *) (* ||M|| *) @@ -295,8 +296,9 @@ elim (IHV1 f) -IHV1 #V2 #HV12 ] qed-. -lemma lift_SO: ∀i. ⬆*[1] #i ≡ #(⫯i). -/2 width=1 by lifts_lref/ qed. +lemma lift_lref_uni: ∀l,i. ⬆*[l] #i ≡ #(l+i). +#l elim l -l /2 width=1 by lifts_lref/ +qed. (* Basic_1: includes: lift_free (right to left) *) (* Basic_2A1: includes: lift_split *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup.ma similarity index 69% rename from matita/matita/contribs/lambdadelta/basic_2/computation/fqup.ma rename to matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup.ma index 3ac1a812d..808164b69 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fqup.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "basic_2/notation/relations/suptermplus_6.ma". -include "basic_2/substitution/fqu.ma". +include "basic_2/s_transition/fqu.ma". (* PLUS-ITERATED SUPCLOSURE *************************************************) @@ -37,17 +37,6 @@ lemma fqup_strap2: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. /2 width=5 by tri_TC_strap/ qed. -lemma fqup_drop: ∀G1,G2,L1,K1,K2,T1,T2,U1,k. ⬇[k] L1 ≡ K1 → ⬆[0, k] T1 ≡ U1 → - ⦃G1, K1, T1⦄ ⊐+ ⦃G2, K2, T2⦄ → ⦃G1, L1, U1⦄ ⊐+ ⦃G2, K2, T2⦄. -#G1 #G2 #L1 #K1 #K2 #T1 #T2 #U1 #k #HLK1 #HTU1 #HT12 elim (eq_or_gt … k) #H destruct -[ >(drop_inv_O2 … HLK1) -L1 <(lift_inv_O2 … HTU1) -U1 // -| /3 width=5 by fqup_strap2, fqu_drop_lt/ -] -qed-. - -lemma fqup_lref: ∀I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, L, #i⦄ ⊐+ ⦃G, K, V⦄. -/3 width=6 by fqu_lref_O, fqu_fqup, lift_lref_ge, fqup_drop/ qed. - lemma fqup_pair_sn: ∀I,G,L,V,T. ⦃G, L, ②{I}V.T⦄ ⊐+ ⦃G, L, V⦄. /2 width=1 by fqu_pair_sn, fqu_fqup/ qed. @@ -84,26 +73,4 @@ lemma fqup_ind_dx: ∀G2,L2,T2. ∀R:relation3 …. @(tri_TC_ind_dx … IH1 IH2 G1 L1 T1 H) qed-. -(* Basic forward lemmas *****************************************************) - -lemma fqup_fwd_fw: ∀G1,G2,L1,L2,T1,T2. - ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} < ♯{G1, L1, T1}. -#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 -/3 width=3 by fqu_fwd_fw, transitive_lt/ -qed-. - -(* Advanced eliminators *****************************************************) - -lemma fqup_wf_ind: ∀R:relation3 …. ( - ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → R G2 L2 T2) → - R G1 L1 T1 - ) → ∀G1,L1,T1. R G1 L1 T1. -#R #HR @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct /4 width=1 by fqup_fwd_fw/ -qed-. - -lemma fqup_wf_ind_eq: ∀R:relation3 …. ( - ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → R G2 L2 T2) → - ∀G2,L2,T2. G1 = G2 → L1 = L2 → T1 = T2 → R G2 L2 T2 - ) → ∀G1,L1,T1. R G1 L1 T1. -#R #HR @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct /4 width=7 by fqup_fwd_fw/ -qed-. +(* Basic_2A1: removed theorems 1: fqup_drop *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_drops.ma new file mode 100644 index 000000000..c706f6b8d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_drops.ma @@ -0,0 +1,46 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "basic_2/relocation/drops.ma". +include "basic_2/s_computation/fqup.ma". + +(* PLUS-ITERATED SUPCLOSURE *************************************************) + +(* Properties with generic slicing for local environments *******************) + +lemma fqup_drops_succ: ∀G,K,T,l,L,U. ⬇*[⫯l] L ≡ K → ⬆*[⫯l] T ≡ U → + ⦃G, L, U⦄ ⊐+ ⦃G, K, T⦄. +#G #K #T #l elim l -l +[ #L #U #HLK #HTU elim (drops_inv_succ … HLK) -HLK + #I #Y #V #HY #H destruct <(drops_fwd_isid … HY) -K + /3 width=1 by fqu_fqup, fqu_drop/ +| #l #IH #L #U #HLK #HTU elim (drops_inv_succ … HLK) -HLK + #I #Y #V #HY #H destruct + elim (lifts_split_trans … HTU … (𝐔❴⫯l❵) (𝐔❴1❵)) -HTU + /4 width=5 by fqup_strap2, fqu_drop/ +] +qed. + +lemma fqup_drops_strap1: ∀G1,G2,L1,K1,K2,T1,T2,U1,l. ⬇*[l] L1 ≡ K1 → ⬆*[l] T1 ≡ U1 → + ⦃G1, K1, T1⦄ ⊐ ⦃G2, K2, T2⦄ → ⦃G1, L1, U1⦄ ⊐+ ⦃G2, K2, T2⦄. +#G1 #G2 #L1 #K1 #K2 #T1 #T2 #U1 * +[ #HLK1 #HTU1 #HT12 + >(drops_fwd_isid … HLK1) -L1 // + <(lifts_fwd_isid … HTU1) -U1 /2 width=1 by fqu_fqup/ +| /3 width=5 by fqup_strap1, fqup_drops_succ/ +] +qed-. + +lemma fqup_lref: ∀I,G,L,K,V,i. ⬇*[i] L ≡ K.ⓑ{I}V → ⦃G, L, #i⦄ ⊐+ ⦃G, K, V⦄. +/2 width=6 by fqup_drops_strap1/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fqup_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_fqup.ma similarity index 96% rename from matita/matita/contribs/lambdadelta/basic_2/computation/fqup_fqup.ma rename to matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_fqup.ma index 48420a7cf..4524e8a77 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fqup_fqup.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_fqup.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/multiple/fqup.ma". +include "basic_2/s_computation/fqup.ma". (* PLUS-ITERATED SUPCLOSURE *************************************************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_weight.ma new file mode 100644 index 000000000..ec05d1e98 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqup_weight.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "basic_2/s_transition/fqu_weight.ma". +include "basic_2/s_computation/fqup.ma". + +(* PLUS-ITERATED SUPCLOSURE *************************************************) + +(* Forward lemmas with weight for closures **********************************) + +lemma fqup_fwd_fw: ∀G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} < ♯{G1, L1, T1}. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/3 width=3 by fqu_fwd_fw, transitive_lt/ +qed-. + +(* Advanced eliminators *****************************************************) + +lemma fqup_wf_ind: ∀R:relation3 …. ( + ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → ∀G1,L1,T1. R G1 L1 T1. +#R #HR @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct /4 width=1 by fqup_fwd_fw/ +qed-. + +lemma fqup_wf_ind_eq: ∀R:relation3 …. ( + ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → R G2 L2 T2) → + ∀G2,L2,T2. G1 = G2 → L1 = L2 → T1 = T2 → R G2 L2 T2 + ) → ∀G1,L1,T1. R G1 L1 T1. +#R #HR @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct /4 width=7 by fqup_fwd_fw/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus.ma similarity index 67% rename from matita/matita/contribs/lambdadelta/basic_2/computation/fqus.ma rename to matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus.ma index 0a2061220..851ac5108 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fqus.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus.ma @@ -13,8 +13,7 @@ (**************************************************************************) include "basic_2/notation/relations/suptermstar_6.ma". -include "basic_2/substitution/fquq.ma". -include "basic_2/multiple/fqup.ma". +include "basic_2/s_transition/fquq.ma". (* STAR-ITERATED SUPCLOSURE *************************************************) @@ -55,29 +54,4 @@ lemma fqus_strap2: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G, L, ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄. /2 width=5 by tri_TC_strap/ qed-. -lemma fqus_drop: ∀G1,G2,K1,K2,T1,T2. ⦃G1, K1, T1⦄ ⊐* ⦃G2, K2, T2⦄ → - ∀L1,U1,k. ⬇[k] L1 ≡ K1 → ⬆[0, k] T1 ≡ U1 → - ⦃G1, L1, U1⦄ ⊐* ⦃G2, K2, T2⦄. -#G1 #G2 #K1 #K2 #T1 #T2 #H @(fqus_ind … H) -G2 -K2 -T2 -/3 width=5 by fqus_strap1, fquq_fqus, fquq_drop/ -qed-. - -lemma fqup_fqus: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄. -#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 -/3 width=5 by fqus_strap1, fquq_fqus, fqu_fquq/ -qed. - -(* Basic forward lemmas *****************************************************) - -lemma fqus_fwd_fw: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} ≤ ♯{G1, L1, T1}. -#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -L2 -T2 -/3 width=3 by fquq_fwd_fw, transitive_le/ -qed-. - -(* Basic inversion lemmas ***************************************************) - -lemma fqup_inv_step_sn: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → - ∃∃G,L,T. ⦃G1, L1, T1⦄ ⊐ ⦃G, L, T⦄ & ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄. -#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1 /2 width=5 by ex2_3_intro/ -#G1 #G #L1 #L #T1 #T #H1 #_ * /4 width=9 by fqus_strap2, fqu_fquq, ex2_3_intro/ -qed-. +(* Basic_2A1: removed theorems 1: fqus_drop *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_drops.ma new file mode 100644 index 000000000..8850c1f54 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_drops.ma @@ -0,0 +1,26 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "basic_2/s_computation/fqup_drops.ma". +include "basic_2/s_computation/fqus_fqup.ma". + +(* STAR-ITERATED SUPCLOSURE *************************************************) + +(* Properties with generic slicing for local environments *******************) + +lemma fqus_drops: ∀G,L,K,T,U,l. ⬇*[l] L ≡ K → ⬆*[l] T ≡ U → + ⦃G, L, U⦄ ⊐* ⦃G, K, T⦄. +#G #L #K #T #U * /3 width=3 by fqup_drops_succ, fqup_fqus/ +#HLK #HTU <(lifts_fwd_isid … HTU) -U // <(drops_fwd_isid … HLK) -K // +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fqus_alt.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_fqup.ma similarity index 61% rename from matita/matita/contribs/lambdadelta/basic_2/computation/fqus_alt.ma rename to matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_fqup.ma index c9ec457b6..6c120326e 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fqus_alt.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_fqup.ma @@ -12,21 +12,27 @@ (* *) (**************************************************************************) -include "basic_2/substitution/fquq_alt.ma". -include "basic_2/multiple/fqus.ma". +include "basic_2/s_computation/fqup.ma". +include "basic_2/s_computation/fqus.ma". (* STAR-ITERATED SUPCLOSURE *************************************************) -(* Advanced inversion lemmas ************************************************) +(* Alternative definition with plus-iterated supclosure *********************) -lemma fqus_inv_gen: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → - ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ ∨ (∧∧ G1 = G2 & L1 = L2 & T1 = T2). +lemma fqup_fqus: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/3 width=5 by fqus_strap1, fquq_fqus, fqu_fquq/ +qed. + +(* Basic_2A1: was: fqus_inv_gen *) +lemma fqus_inv_fqup: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ ∨ (∧∧ G1 = G2 & L1 = L2 & T1 = T2). #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 // -#G #G2 #L #L2 #T #T2 #_ #H2 * elim (fquq_inv_gen … H2) -H2 -[ /3 width=5 by fqup_strap1, or_introl/ -| * #HG #HL #HT destruct /2 width=1 by or_introl/ -| #H2 * #HG #HL #HT destruct /3 width=1 by fqu_fqup, or_introl/ -| * #H1G #H1L #H1T * #H2G #H2L #H2T destruct /2 width=1 by or_intror/ +#G #G2 #L #L2 #T #T2 #_ * +[ #H2 * /3 width=5 by fqup_strap1, or_introl/ + * /3 width=1 by fqu_fqup, or_introl/ +| * #HG #HL #HT destruct * /2 width=1 by or_introl/ + * /2 width=1 by or_intror/ ] qed-. @@ -34,17 +40,17 @@ qed-. lemma fqus_strap1_fqu: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. -#G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_gen … H1) -H1 +#G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_fqup … H1) -H1 [ /2 width=5 by fqup_strap1/ -| * #HG #HL #HT destruct /2 width=1 by fqu_fqup/ +| * /2 width=1 by fqu_fqup/ ] qed-. lemma fqus_strap2_fqu: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. -#G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_gen … H2) -H2 +#G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_fqup … H2) -H2 [ /2 width=5 by fqup_strap2/ -| * #HG #HL #HT destruct /2 width=1 by fqu_fqup/ +| * /2 width=1 by fqu_fqup/ ] qed-. @@ -59,3 +65,11 @@ lemma fqup_fqus_trans: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G, L #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 @(fqup_ind_dx … H1) -H1 -G1 -L1 -T1 /3 width=5 by fqus_strap2_fqu, fqup_strap2/ qed-. + +(* Advanced inversion lemmas for plus-iterated supclosure *******************) + +lemma fqup_inv_step_sn: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∃∃G,L,T. ⦃G1, L1, T1⦄ ⊐ ⦃G, L, T⦄ & ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1 /2 width=5 by ex2_3_intro/ +#G1 #G #L1 #L #T1 #T #H1 #_ * /4 width=9 by fqus_strap2, fqu_fquq, ex2_3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fqus_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_fqus.ma similarity index 96% rename from matita/matita/contribs/lambdadelta/basic_2/computation/fqus_fqus.ma rename to matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_fqus.ma index ef9902931..26da77526 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fqus_fqus.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_fqus.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/multiple/fqus.ma". +include "basic_2/s_computation/fqus.ma". (* STAR-ITERATED SUPCLOSURE *************************************************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_weight.ma new file mode 100644 index 000000000..5a29848cc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/s_computation/fqus_weight.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "basic_2/s_transition/fquq_weight.ma". +include "basic_2/s_computation/fqus.ma". + +(* STAR-ITERATED SUPCLOSURE *************************************************) + +(* Forward lemmas with weight for closures **********************************) + +lemma fqus_fwd_fw: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} ≤ ♯{G1, L1, T1}. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -L2 -T2 +/3 width=3 by fquq_fwd_fw, transitive_le/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/frees.ma b/matita/matita/contribs/lambdadelta/basic_2/static/frees.ma similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/relocation/frees.ma rename to matita/matita/contribs/lambdadelta/basic_2/static/frees.ma diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/frees_frees.ma b/matita/matita/contribs/lambdadelta/basic_2/static/frees_frees.ma similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/relocation/frees_frees.ma rename to matita/matita/contribs/lambdadelta/basic_2/static/frees_frees.ma diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/frees_lreq.ma b/matita/matita/contribs/lambdadelta/basic_2/static/frees_lreq.ma similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/relocation/frees_lreq.ma rename to matita/matita/contribs/lambdadelta/basic_2/static/frees_lreq.ma diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/frees_weight.ma b/matita/matita/contribs/lambdadelta/basic_2/static/frees_weight.ma similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/relocation/frees_weight.ma rename to matita/matita/contribs/lambdadelta/basic_2/static/frees_weight.ma diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/freq.ma b/matita/matita/contribs/lambdadelta/basic_2/static/freq.ma similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/relocation/freq.ma rename to matita/matita/contribs/lambdadelta/basic_2/static/freq.ma diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/freq_freq.ma b/matita/matita/contribs/lambdadelta/basic_2/static/freq_freq.ma similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/relocation/freq_freq.ma rename to matita/matita/contribs/lambdadelta/basic_2/static/freq_freq.ma diff --git a/matita/matita/contribs/lambdadelta/basic_2/web/basic_2.ldw.xml b/matita/matita/contribs/lambdadelta/basic_2/web/basic_2.ldw.xml index 35da29879..a50dd0d88 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/web/basic_2.ldw.xml +++ b/matita/matita/contribs/lambdadelta/basic_2/web/basic_2.ldw.xml @@ -3,6 +3,7 @@ @@ -32,6 +33,11 @@ Stage "A2": "Extending the Applicability Condition" + + + Relocation with reference transforming maps (rtmap). + + λδ version 2A2 is started. diff --git a/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl b/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl index 0d288fdc2..73a5a3977 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl +++ b/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl @@ -216,8 +216,9 @@ table { ] class "grass" [ { "s-computation" * } { - [ { "" * } { - [ * ] + [ { "iterated structural successor for closures" * } { + [ "fqus ( ⦃?,?,?⦄ ⊐* ⦃?,?,?⦄ )" "fqus_weight" + "fqus_drops" + "fqus_fqup" + "fqus_fqus" * ] + [ "fqup ( ⦃?,?,?⦄ ⊐+ ⦃?,?,?⦄ )" "fqup_weight" + "fqup_drops" + "fqup_fqup" * ] } ] } @@ -304,11 +305,6 @@ class "italic" { 1 } [ "cpys ( ⦃?,?⦄ ⊢ ? ▶*[?,?] ? )" "cpys_alt ( ⦃?,?⦄ ⊢ ? ▶▶*[?,?] ? )" "cpys_lift" + "cpys_cpys" * ] } ] - [ { "iterated structural successor for closures" * } { - [ "fqus ( ⦃?,?,?⦄ ⊐* ⦃?,?,?⦄ )" "fqus_alt" + "fqus_fqus" * ] - [ "fqup ( ⦃?,?,?⦄ ⊐+ ⦃?,?,?⦄ )" "fqup_fqup" * ] - } - ] [ { "pointwise union for local environments" * } { [ "llor ( ? ⋓[?,?] ? ≡ ? )" "llor_alt" + "llor_drop" * ] } diff --git a/matita/matita/contribs/lambdadelta/ground_2/relocation/rtmap_after.ma b/matita/matita/contribs/lambdadelta/ground_2/relocation/rtmap_after.ma index 222bc07f7..09bab5e10 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/relocation/rtmap_after.ma +++ b/matita/matita/contribs/lambdadelta/ground_2/relocation/rtmap_after.ma @@ -320,6 +320,24 @@ lemma after_isid_isuni: ∀f1,f2. 𝐈⦃f2⦄ → 𝐔⦃f1⦄ → f1 ⊚ ⫯f2 /5 width=7 by isid_after_dx, after_eq_repl_back_2, after_next, after_push, eq_push_inv_isid/ qed. +lemma after_uni_next2: ∀f2. 𝐔⦃f2⦄ → ∀f1,f. ⫯f2 ⊚ f1 ≡ f → f2 ⊚ ⫯f1 ≡ f. +#f2 #H elim H -f2 +[ #f2 #Hf2 #f1 #f #Hf + elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H0 destruct + /4 width=7 by after_isid_inv_sn, isid_after_sn, after_eq_repl_back_0, eq_next/ +| #f2 #_ #g2 #H2 #IH #f1 #f #Hf + elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H0 destruct + /3 width=5 by after_next/ +] +qed. + +(* Properties on uni ********************************************************) + +lemma after_uni: ∀n1,n2. 𝐔❴n1❵ ⊚ 𝐔❴n2❵ ≡ 𝐔❴n1+n2❵. +@nat_elim2 +/4 width=5 by after_uni_next2, isid_after_sn, isid_after_dx, after_next/ +qed. + (* Forward lemmas on at *****************************************************) lemma after_at_fwd: ∀i,i1,f. @⦃i1, f⦄ ≡ i → ∀f2,f1. f2 ⊚ f1 ≡ f → diff --git a/matita/matita/contribs/lambdadelta/ground_2/web/ground_2.ldw.xml b/matita/matita/contribs/lambdadelta/ground_2/web/ground_2.ldw.xml index 2dbdd3444..5b071cd95 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/web/ground_2.ldw.xml +++ b/matita/matita/contribs/lambdadelta/ground_2/web/ground_2.ldw.xml @@ -3,6 +3,7 @@ -- 2.39.2