From 86a84e4116a8d388cb540bae6c60700f84a8f9f8 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Wed, 10 Sep 2014 12:56:11 +0000 Subject: [PATCH] commit completed! the new iterated static type assignment is up! --- .../lambdadelta/basic_2/computation/cpxs.ma | 11 +++ .../basic_2/computation/cpxs_lift.ma | 34 +++++---- .../basic_2/computation/fpbg_lift.ma | 2 +- .../basic_2/computation/fpbs_lift.ma | 4 +- .../basic_2/computation/fpbu_lift.ma | 8 +- .../lambdadelta/basic_2/computation/scpds.ma | 16 +--- .../basic_2/computation/scpds_scpds.ma | 9 ++- .../basic_2/dynamic/lsubsv_lstas.ma | 75 ++++++++++--------- .../basic_2/dynamic/lsubsv_scpds.ma | 2 + .../lambdadelta/basic_2/dynamic/lsubsv_snv.ma | 5 +- .../lambdadelta/basic_2/dynamic/shnv.ma | 11 ++- .../lambdadelta/basic_2/dynamic/shnv_aaa.ma | 27 ------- .../lambdadelta/basic_2/dynamic/snv.ma | 6 +- .../lambdadelta/basic_2/dynamic/snv_aaa.ma | 15 ++-- .../lambdadelta/basic_2/dynamic/snv_da_lpr.ma | 2 +- .../lambdadelta/basic_2/dynamic/snv_lift.ma | 4 +- .../lambdadelta/basic_2/dynamic/snv_lpr.ma | 4 +- .../lambdadelta/basic_2/dynamic/snv_lstas.ma | 18 ++--- .../basic_2/dynamic/snv_lstas_lpr.ma | 34 ++++----- .../lambdadelta/basic_2/dynamic/snv_scpes.ma | 18 ++--- .../lambdadelta/basic_2/equivalence/scpes.ma | 4 - .../basic_2/equivalence/scpes_cpcs.ma | 6 +- .../basic_2/equivalence/scpes_scpes.ma | 15 +++- .../lambdadelta/basic_2/reduction/cpr.ma | 1 - .../lambdadelta/basic_2/reduction/cpx_lift.ma | 2 +- .../lambdadelta/basic_2/web/basic_2.ldw.xml | 4 + .../lambdadelta/basic_2/web/basic_2_src.tbl | 10 +-- 27 files changed, 172 insertions(+), 175 deletions(-) delete mode 100644 matita/matita/contribs/lambdadelta/basic_2/dynamic/shnv_aaa.ma diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs.ma index 8027a98db..588208177 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs.ma @@ -64,6 +64,17 @@ lemma cprs_cpxs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ #h #g #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,l1. deg h g k l1 → + ∀l2. l2 ≤ l1 → ⦃G, L⦄ ⊢ ⋆k ➡*[h, g] ⋆((next h)^l2 k). +#h #g #G #L #k #l1 #Hkl1 #l2 @(nat_ind_plus … l2) -l2 /2 width=1 by cpx_cpxs/ +#l2 #IHl2 #Hl21 >iter_SO +@(cpxs_strap1 … (⋆(iter l2 ℕ (next h) k))) +[ /3 width=3 by lt_to_le/ +| @(cpx_st … (l1-l2-1)) (plus_minus_m_m (l2-l1) 1 ?) -[ /4 width=5 by cpxs_strap1, sta_cpx, lt_to_le/ -| /2 width=1 by monotonic_le_minus_r/ -] -qed. - lemma cpxs_delta: ∀h,g,I,G,L,K,V,V2,i. ⇩[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ➡*[h, g] V2 → ∀W2. ⇧[0, i+1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡*[h, g] W2. @@ -42,6 +30,24 @@ lemma cpxs_delta: ∀h,g,I,G,L,K,V,V2,i. ] qed. +lemma lstas_cpxs: ∀h,g,G,L,T1,T2,l2. ⦃G, L⦄ ⊢ T1 •*[h, l2] T2 → + ∀l1. ⦃G, L⦄ ⊢ T1 ▪[h, g] l1 → l2 ≤ l1 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +#h #g #G #L #T1 #T2 #l2 #H elim H -G -L -T1 -T2 -l2 // +[ /3 width=3 by cpxs_sort, da_inv_sort/ +| #G #L #K #V1 #V2 #W2 #i #l2 #HLK #_ #HVW2 #IHV12 #l1 #H #Hl21 + elim (da_inv_lref … H) -H * #K0 #V0 [| #l0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct /3 width=7 by cpxs_delta/ +| #G #L #K #V1 #V2 #W2 #i #l2 #HLK #_ #HVW2 #IHV12 #l1 #H #Hl21 + elim (da_inv_lref … H) -H * #K0 #V0 [| #l0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct + #HV1 #H destruct lapply (le_plus_to_le_r … Hl21) -Hl21 + /3 width=7 by cpxs_delta/ +| /4 width=3 by cpxs_bind_dx, da_inv_bind/ +| /4 width=3 by cpxs_flat_dx, da_inv_flat/ +| /4 width=3 by cpxs_eps, da_inv_flat/ +] +qed. + (* Advanced inversion lemmas ************************************************) lemma cpxs_inv_lref1: ∀h,g,G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡*[h, g] T2 → @@ -90,7 +96,7 @@ qed-. lemma fquq_lstas_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → ∀U2,l1. ⦃G2, L2⦄ ⊢ T2 •*[h, l1] U2 → - ∀l2. ⦃G2, L2⦄ ⊢ T2 ▪ [h, g] l2 → l1 ≤ l2 → + ∀l2. ⦃G2, L2⦄ ⊢ T2 ▪[h, g] l2 → l1 ≤ l2 → ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄. /3 width=5 by fquq_cpxs_trans, lstas_cpxs/ qed-. @@ -113,6 +119,6 @@ qed-. lemma fqus_lstas_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → ∀U2,l1. ⦃G2, L2⦄ ⊢ T2 •*[h, l1] U2 → - ∀l2. ⦃G2, L2⦄ ⊢ T2 ▪ [h, g] l2 → l1 ≤ l2 → + ∀l2. ⦃G2, L2⦄ ⊢ T2 ▪[h, g] l2 → l1 ≤ l2 → ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄. /3 width=6 by fqus_cpxs_trans, lstas_cpxs/ 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 6b5b5719b..454eaa167 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_lift.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbg_lift.ma @@ -24,5 +24,5 @@ lemma lstas_fpbg: ∀h,g,G,L,T1,T2,l2. ⦃G, L⦄ ⊢ T1 •*[h, l2] T2 → (T1 /5 width=5 by fpbc_fpbg, fpbu_fpbc, lstas_fpbu/ qed. lemma sta_fpbg: ∀h,g,G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l+1 → - ⦃G, L⦄ ⊢ T1 •[h] T2 → ⦃G, L, T1⦄ >≡[h, g] ⦃G, L, T2⦄. + ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → ⦃G, L, T1⦄ >≡[h, g] ⦃G, L, T2⦄. /4 width=2 by fpbc_fpbg, fpbu_fpbc, sta_fpbu/ 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 93f6bf7c8..15baaa136 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_lift.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbs_lift.ma @@ -25,13 +25,13 @@ lemma lstas_fpbs: ∀h,g,G,L,T1,T2,l2. ⦃G, L⦄ ⊢ T1 •*[h, l2] T2 → /3 width=5 by cpxs_fpbs, lstas_cpxs/ qed. lemma sta_fpbs: ∀h,g,G,L,T,U,l. - ⦃G, L⦄ ⊢ T ▪[h, g] l+1 → ⦃G, L⦄ ⊢ T •[h] U → + ⦃G, L⦄ ⊢ T ▪[h, g] l+1 → ⦃G, L⦄ ⊢ T •*[h, 1] U → ⦃G, L, T⦄ ≥[h, g] ⦃G, L, U⦄. /4 width=2 by fpb_fpbs, sta_fpb/ qed. (* Note: this is used in the closure proof *) lemma cpr_lpr_sta_fpbs: ∀h,g,G,L1,L2,T1,T2,U2,l2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ⦃G, L1⦄ ⊢ ➡ L2 → - ⦃G, L2⦄ ⊢ T2 ▪[h, g] l2+1 → ⦃G, L2⦄ ⊢ T2 •[h] U2 → + ⦃G, L2⦄ ⊢ T2 ▪[h, g] l2+1 → ⦃G, L2⦄ ⊢ T2 •*[h, 1] U2 → ⦃G, L1, T1⦄ ≥[h, g] ⦃G, L2, U2⦄. /4 width=5 by fpbs_strap1, cpr_lpr_fpbs, sta_cpx, fpb_cpx/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbu_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbu_lift.ma index a76af75e4..5d3c40f92 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/fpbu_lift.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/fpbu_lift.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/sta_sta.ma". +include "basic_2/unfold/lstas_da.ma". include "basic_2/computation/cpxs_lift.ma". include "basic_2/computation/fpbu.ma". @@ -25,8 +25,8 @@ lemma lstas_fpbu: ∀h,g,G,L,T1,T2,l2. ⦃G, L⦄ ⊢ T1 •*[h, l2] T2 → (T1 /4 width=5 by fpbu_cpxs, lstas_cpxs/ qed. lemma sta_fpbu: ∀h,g,G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l+1 → - ⦃G, L⦄ ⊢ T1 •[h] T2 → ⦃G, L, T1⦄ ≻[h, g] ⦃G, L, T2⦄. + ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → ⦃G, L, T1⦄ ≻[h, g] ⦃G, L, T2⦄. #h #g #G #L #T1 #T2 #l #HT1 #HT12 elim (eq_term_dec T1 T2) -/3 width=5 by sta_lstas, lstas_fpbu/ #H destruct -elim (sta_inv_refl_pos … HT1 … HT12) +/3 width=5 by lstas_fpbu/ #H destruct +elim (lstas_inv_refl_pos h G L T2 0) // qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/scpds.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/scpds.ma index 29a942fec..87fe99592 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/scpds.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/scpds.ma @@ -14,7 +14,6 @@ include "basic_2/notation/relations/dpredstar_7.ma". include "basic_2/static/da.ma". -include "basic_2/unfold/lstas.ma". include "basic_2/computation/cprs.ma". (* STRATIFIED DECOMPOSED PARALLEL COMPUTATION ON TERMS **********************) @@ -28,21 +27,14 @@ interpretation "stratified decomposed parallel computation (term)" (* Basic properties *********************************************************) -lemma sta_cprs_scpds: ∀h,g,G,L,T1,T,T2,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l+1 → ⦃G, L⦄ ⊢ T1 •[h] T → +lemma sta_cprs_scpds: ∀h,g,G,L,T1,T,T2,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l+1 → ⦃G, L⦄ ⊢ T1 •*[h, 1] T → ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 1] T2. -/3 width=6 by sta_lstas, ex4_2_intro/ qed. +/2 width=6 by ex4_2_intro/ qed. lemma lstas_scpds: ∀h,g,G,L,T1,T2,l1. ⦃G, L⦄ ⊢ T1 ▪[h, g] l1 → ∀l2. l2 ≤ l1 → ⦃G, L⦄ ⊢ T1 •*[h, l2] T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, l2] T2. /2 width=6 by ex4_2_intro/ qed. -lemma cprs_scpds: ∀h,g,G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l → ⦃G, L⦄ ⊢ T1 ➡* T2 → - ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 0] T2. -/2 width=6 by lstar_O, ex4_2_intro/ qed. - -lemma scpds_refl: ∀h,g,G,L,T,l. ⦃G, L⦄ ⊢ T ▪[h, g] l → ⦃G, L⦄ ⊢ T •*➡*[h, g, 0] T. -/2 width=2 by cprs_scpds/ qed. - lemma scpds_strap1: ∀h,g,G,L,T1,T,T2,l. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, l] T → ⦃G, L⦄ ⊢ T ➡ T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, l] T2. #h #g #G #L #T1 #T #T2 #l * /3 width=8 by cprs_strap1, ex4_2_intro/ @@ -52,7 +44,5 @@ qed. lemma scpds_fwd_cprs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 0] T2 → ⦃G, L⦄ ⊢ T1 ➡* T2. -#h #g #G #L #T1 #T2 * -#T #l #_ #_ #H lapply (lstas_inv_O … H) -l -H -#H destruct // +#h #g #G #L #T1 #T2 * /3 width=3 by cprs_strap2, lstas_cpr/ qed-. 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 1acbf9398..f64cdf9cf 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_scpds.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/scpds_scpds.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/unfold/lstas_lstas.ma". +include "basic_2/unfold/lstas_da.ma". include "basic_2/computation/lprs_cprs.ma". include "basic_2/computation/cpxs_cpxs.ma". include "basic_2/computation/scpds.ma". @@ -22,13 +22,14 @@ include "basic_2/computation/scpds.ma". (* Advanced properties ******************************************************) lemma scpds_strap2: ∀h,g,G,L,T1,T,T2,l1,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l1+1 → - ⦃G, L⦄ ⊢ T1 •[h] T → ⦃G, L⦄ ⊢ T •*➡*[h, g, l] T2 → + ⦃G, L⦄ ⊢ T1 •*[h, 1] T → ⦃G, L⦄ ⊢ T •*➡*[h, g, l] T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, l+1] T2. #h #g #G #L #T1 #T #T2 #l1 #l #Hl1 #HT1 * #T0 #l0 #Hl0 #HTl0 #HT0 #HT02 -lapply (da_sta_conf … HT1 … Hl1) commutative_plus +/3 width=6 by le_S_S, ex4_2_intro/ qed. lemma scpds_cprs_trans: ∀h,g,G,L,T1,T,T2,l. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_lstas.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_lstas.ma index 5600eeaba..979eebb8f 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_lstas.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_lstas.ma @@ -12,10 +12,8 @@ (* *) (**************************************************************************) -include "basic_2/static/lsubd_da.ma". -include "basic_2/unfold/lstas_alt.ma". include "basic_2/equivalence/scpes_cpcs.ma". -include "basic_2/dynamic/lsubsv_lsubd.ma". +include "basic_2/dynamic/lsubsv.ma". (* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) @@ -25,44 +23,56 @@ lemma lsubsv_lstas_trans: ∀h,g,G,L2,T,U2,l2. ⦃G, L2⦄ ⊢ T •*[h, l2] U2 ∀l1. l2 ≤ l1 → ⦃G, L2⦄ ⊢ T ▪[h, g] l1 → ∀L1. G ⊢ L1 ⫃¡[h, g] L2 → ∃∃U1. ⦃G, L1⦄ ⊢ T •*[h, l2] U1 & ⦃G, L1⦄ ⊢ U1 ⬌* U2. -#h #g #G #L2 #T #U #l2 #H @(lstas_ind_alt … H) -G -L2 -T -U -l2 -[1,2: /2 width=3 by ex2_intro/ -| #G #L2 #K2 #X #Y #U #i #l2 #HLK2 #_ #HYU #IHXY #l1 #Hl21 #Hl1 #L1 #HL12 +#h #g #G #L2 #T #U #l2 #H elim H -G -L2 -T -U -l2 +[ /2 width=3 by ex2_intro/ +| #G #L2 #K2 #V #W #U #i #l2 #HLK2 #_ #HWU #IHVW #l1 #Hl21 #Hl1 #L1 #HL12 elim (da_inv_lref … Hl1) -Hl1 * #K0 #V0 [| #l0 ] #HK0 #HV0 lapply (drop_mono … HK0 … HLK2) -HK0 #H destruct - elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1 - elim (lsubsv_inv_pair2 … H) -H * #K1 [ | -HYU -IHXY -HLK1 ] + elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #Y #H #HLK1 + elim (lsubsv_inv_pair2 … H) -H * #K1 [ | -HWU -IHVW -HLK1 ] [ #HK12 #H destruct - elim (IHXY … Hl21 HV0 … HK12) -K2 -l1 #T #HXT #HTY + elim (IHVW … Hl21 HV0 … HK12) -K2 -l1 #T #HVT #HTW lapply (drop_fwd_drop2 … HLK1) #H elim (lift_total T 0 (i+1)) /3 width=12 by lstas_ldef, cpcs_lift, ex2_intro/ - | #V #l0 #_ #_ #_ #_ #_ #H destruct + | #V0 #l0 #_ #_ #_ #_ #_ #H destruct ] -| #G #L2 #K2 #X #Y #Y0 #U #i #l2 #HLK2 #HXY0 #_ #HYU #IHXY #l1 #Hl21 #Hl1 #L1 #HL12 +| #G #L2 #K2 #V #W #i #HLK2 #_ #IHVW #l1 #_ #Hl1 #L1 #HL12 + elim (da_inv_lref … Hl1) -Hl1 * #K0 #V0 [| #l0 ] #HK0 #HV0 [| #H1 ] + lapply (drop_mono … HK0 … HLK2) -HK0 #H2 destruct + elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #Y #H #HLK1 + elim (lsubsv_inv_pair2 … H) -H * #K1 + [ #HK12 #H destruct + elim (IHVW … HV0 … HK12) -K2 /3 width=5 by lstas_zero, ex2_intro/ + | #V1 #l1 #_ #_ #HV1 #HV #HK12 #_ #H destruct + lapply (da_mono … HV0 … HV) -HV #H destruct + elim (da_lstas … HV1 0) -HV1 #W1 #HVW1 #_ + elim (lift_total W1 0 (i+1)) #U1 #HWU1 + elim (IHVW … HV0 … HK12) -K2 // #X #HVX #_ -W + @(ex2_intro … U1) /3 width=6 by lstas_cast, lstas_ldef/ (**) (* full auto too slow *) + @cpcs_cprs_sn @(cprs_delta … HLK1 … HWU1) + /4 width=2 by cprs_strap1, cpr_cprs, lstas_cpr, cpr_eps/ + ] +| #G #L2 #K2 #V #W #U #i #l2 #HLK2 #_ #HWU #IHVW #l1 #Hl21 #Hl1 #L1 #HL12 elim (da_inv_lref … Hl1) -Hl1 * #K0 #V0 [| #l0 ] #HK0 #HV0 [| #H1 ] lapply (drop_mono … HK0 … HLK2) -HK0 #H2 destruct lapply (le_plus_to_le_r … Hl21) -Hl21 #Hl21 - elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1 + elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #Y #H #HLK1 elim (lsubsv_inv_pair2 … H) -H * #K1 [ #HK12 #H destruct - lapply (lsubsv_fwd_lsubd … HK12) #H - lapply (lsubd_da_trans … HV0 … H) -H #H - elim (da_inv_sta … H) -H - elim (IHXY … Hl21 HV0 … HK12) -K2 -Hl21 #Y1 + elim (IHVW … Hl21 HV0 … HK12) -K2 -Hl21 #X lapply (drop_fwd_drop2 … HLK1) - elim (lift_total Y1 0 (i+1)) - /3 width=12 by lstas_ldec, cpcs_lift, ex2_intro/ - | #V #l1 #HXV #_ #HV #HX #HK12 #_ #H destruct - lapply (da_mono … HV0 … HX) -HX #H destruct - elim (shnv_inv_cast … HXV) -HXV #_ #_ #H - lapply (H … Hl21) -H #HXV - elim (IHXY … Hl21 HV0 … HK12) -K2 -Hl21 #Y0 #HXY0 #HY0 - elim (da_inv_sta … HV) -HV #W #HVW - elim (lstas_total … HVW (l2+1)) -W #W #HVW - lapply (scpes_inv_lstas_eq … HXV … HXY0 … HVW) -HXV -HXY0 #HY0W - lapply (cpcs_canc_sn … HY0W … HY0) -Y0 #HYW - elim (lift_total W 0 (i+1)) + elim (lift_total X 0 (i+1)) + /3 width=12 by lstas_succ, cpcs_lift, ex2_intro/ + | #V1 #l1 #H0 #_ #HV1 #HV #HK12 #_ #H destruct + lapply (da_mono … HV0 … HV) -HV #H destruct + elim (shnv_inv_cast … H0) -H0 #_ #_ #H + lapply (H … Hl21) -H #HVV1 + elim (IHVW … Hl21 HV0 … HK12) -K2 -Hl21 #X #HVX #HXW + elim (da_lstas … HV1 (l2+1)) -HV1 #X1 #HVX1 #_ + lapply (scpes_inv_lstas_eq … HVV1 … HVX … HVX1) -HVV1 -HVX #HXX1 + lapply (cpcs_canc_sn … HXX1 … HXW) -X + elim (lift_total X1 0 (i+1)) lapply (drop_fwd_drop2 … HLK1) /4 width=12 by cpcs_lift, lstas_cast, lstas_ldef, ex2_intro/ ] @@ -81,11 +91,8 @@ lemma lsubsv_lstas_trans: ∀h,g,G,L2,T,U2,l2. ⦃G, L2⦄ ⊢ T •*[h, l2] U2 ] qed-. -lemma lsubsv_sta_trans: ∀h,g,G,L2,T,U2. ⦃G, L2⦄ ⊢ T •[h] U2 → +lemma lsubsv_sta_trans: ∀h,g,G,L2,T,U2. ⦃G, L2⦄ ⊢ T •*[h, 1] U2 → ∀l. ⦃G, L2⦄ ⊢ T ▪[h, g] l+1 → ∀L1. G ⊢ L1 ⫃¡[h, g] L2 → - ∃∃U1. ⦃G, L1⦄ ⊢ T •[h] U1 & ⦃G, L1⦄ ⊢ U1 ⬌* U2. -#h #g #G #L2 #T #U2 #H #l #HTl #L1 #HL12 -elim (lsubsv_lstas_trans … U2 1 … HTl … HL12) -/3 width=3 by lstas_inv_SO, sta_lstas, ex2_intro/ -qed-. + ∃∃U1. ⦃G, L1⦄ ⊢ T •*[h, 1] U1 & ⦃G, L1⦄ ⊢ U1 ⬌* U2. +/2 width=7 by lsubsv_lstas_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_scpds.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_scpds.ma index 3edc47f41..3e9772958 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_scpds.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_scpds.ma @@ -12,6 +12,8 @@ (* *) (**************************************************************************) +include "basic_2/static/lsubd_da.ma". +include "basic_2/dynamic/lsubsv_lsubd.ma". include "basic_2/dynamic/lsubsv_lstas.ma". (* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_snv.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_snv.ma index a3f39fbf7..9dbb862c7 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_snv.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_snv.ma @@ -37,7 +37,8 @@ lemma lsubsv_snv_trans: ∀h,g,G,L2,T. ⦃G, L2⦄ ⊢ T ¡[h, g] → elim (cprs_conf … HWV0 … HW0) -W0 /4 width=10 by snv_appl, scpds_cprs_trans, cprs_bind/ | #G #L2 #U #T #U0 #_ #_ #HU0 #HTU0 #IHU #IHT #L1 #HL12 - elim (lsubsv_scpds_trans … HTU0 … HL12) -HTU0 - /4 width=5 by lsubsv_cprs_trans, snv_cast, cprs_trans/ + elim (lsubsv_scpds_trans … HTU0 … HL12) -HTU0 #X0 #HTX0 #H1 + elim (lsubsv_scpds_trans … HU0 … HL12) -HU0 #X #HUX #H2 + elim (cprs_conf … H1 … H2) -U0 /3 width=5 by snv_cast, scpds_cprs_trans/ ] qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/shnv.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/shnv.ma index 1cca09856..24bbe1e15 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/shnv.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/shnv.ma @@ -43,6 +43,13 @@ lemma shnv_inv_cast: ∀h,g,G,L,U,T,l1. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g, l1] → lemma shnv_inv_snv: ∀h,g,G,L,T,l. ⦃G, L⦄ ⊢ T ¡[h, g, l] → ⦃G, L⦄ ⊢ T ¡[h, g]. #h #g #G #L #T #l * -T -#U #T #HU #HT #HUT elim (HUT 0) -HUT -/3 width=3 by snv_cast, scpds_fwd_cprs/ +#U #T #HU #HT #HUT elim (HUT 0) -HUT /2 width=3 by snv_cast/ qed-. + +(* Basic properties *********************************************************) + +lemma snv_shnv_cast: ∀h,g,G,L,U,T. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g] → ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g, 0]. +#h #g #G #L #U #T #H elim (snv_inv_cast … H) -H +#U0 #HU #HT #HU0 #HTU0 @shnv_cast // -HU -HT +#l #H <(le_n_O_to_eq … H) -l /2 width=3 by scpds_div/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/shnv_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/shnv_aaa.ma deleted file mode 100644 index d928f6287..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/shnv_aaa.ma +++ /dev/null @@ -1,27 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -include "basic_2/dynamic/snv_aaa.ma". -include "basic_2/dynamic/shnv.ma". - -(* STRATIFIED HIGHER NATIVE VALIDITY FOR TERMS ******************************) - -(* Advanced properties ******************************************************) - -lemma snv_shnv_cast: ∀h,g,G,L,U,T. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g] → ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g, 0]. -#h #g #G #L #U #T #H elim (snv_inv_cast … H) -H -#U0 #HU #HT #HU0 #HTU0 @shnv_cast // -HT -#l #H <(le_n_O_to_eq … H) -l -elim (snv_fwd_da … HU) -HU /3 width=3 by cprs_scpds, scpds_div/ -qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv.ma index d58e5ac2a..a5be16b57 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv.ma @@ -25,7 +25,7 @@ inductive snv (h) (g): relation3 genv lenv term ≝ | snv_appl: ∀a,G,L,V,W0,T,U0,l. snv h g G L V → snv h g G L T → ⦃G, L⦄ ⊢ V •*➡*[h, g, 1] W0 → ⦃G, L⦄ ⊢ T •*➡*[h, g, l] ⓛ{a}W0.U0 → snv h g G L (ⓐV.T) | snv_cast: ∀G,L,U,T,U0. snv h g G L U → snv h g G L T → - ⦃G, L⦄ ⊢ U ➡* U0 → ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0 → snv h g G L (ⓝU.T) + ⦃G, L⦄ ⊢ U •*➡*[h, g, 0] U0 → ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0 → snv h g G L (ⓝU.T) . interpretation "stratified native validity (term)" @@ -95,7 +95,7 @@ lemma snv_inv_appl: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ⓐV.T ¡[h, g] → fact snv_inv_cast_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀U,T. X = ⓝU.T → ∃∃U0. ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] & - ⦃G, L⦄ ⊢ U ➡* U0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0. + ⦃G, L⦄ ⊢ U •*➡*[h, g, 0] U0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0. #h #g #G #L #X * -G -L -X [ #G #L #k #X1 #X2 #H destruct | #I #G #L #K #V #i #_ #_ #X1 #X2 #H destruct @@ -107,5 +107,5 @@ qed-. lemma snv_inv_cast: ∀h,g,G,L,U,T. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g] → ∃∃U0. ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] & - ⦃G, L⦄ ⊢ U ➡* U0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0. + ⦃G, L⦄ ⊢ U •*➡*[h, g, 0] U0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0. /2 width=3 by snv_inv_cast_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_aaa.ma index 299070776..d947c016f 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_aaa.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_aaa.ma @@ -13,7 +13,6 @@ (**************************************************************************) include "basic_2/static/da_aaa.ma". -include "basic_2/unfold/lstas_lift.ma". include "basic_2/computation/csx_aaa.ma". include "basic_2/computation/scpds_aaa.ma". include "basic_2/dynamic/snv.ma". @@ -33,7 +32,7 @@ lemma snv_fwd_aaa: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → ∃A. ⦃G, L⦄ elim (aaa_inv_abst … H) -H #B0 #A #H1 #HU #H2 destruct lapply (aaa_mono … H1 … HW0) -W0 #H destruct /3 width=4 by aaa_appl, ex_intro/ | #G #L #U #T #U0 #_ #_ #HU0 #HTU0 * #B #HU * #A #HT - lapply (cprs_aaa_conf … HU … HU0) -HU0 #HU0 + lapply (scpds_aaa_conf … HU … HU0) -HU0 #HU0 lapply (scpds_aaa_conf … HT … HTU0) -HTU0 #H lapply (aaa_mono … H … HU0) -U0 #H destruct /3 width=3 by aaa_cast, ex_intro/ ] @@ -49,12 +48,8 @@ lemma snv_fwd_da: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → ∃l. ⦃G, L⦄ #h #g #G #L #T #H elim (snv_fwd_aaa … H) -H /2 width=2 by aaa_da/ qed-. -lemma snv_fwd_sta: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → ∃U. ⦃G, L⦄ ⊢ T •[h] U. -#h #g #G #L #T #H elim (snv_fwd_aaa … H) -H /2 width=2 by aaa_sta/ -qed-. - -lemma snv_lstas_fwd_correct: ∀h,g,G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ¡[h, g] → ⦃G, L⦄ ⊢ T1 •* [h, l] T2 → - ∃U2. ⦃G, L⦄ ⊢ T2 •[h] U2. -#h #g #G #L #T1 #T2 #l #HT1 #HT12 -elim (snv_fwd_sta … HT1) -HT1 /2 width=5 by lstas_fwd_correct/ +lemma snv_fwd_lstas: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → + ∀l. ∃U. ⦃G, L⦄ ⊢ T •*[h, l] U. +#h #g #G #L #T #H #l elim (snv_fwd_aaa … H) -H +#A #HT elim (aaa_lstas h … HT l) -HT /2 width=2 by ex_intro/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_da_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_da_lpr.ma index dac9cd153..7f38d6474 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_da_lpr.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_da_lpr.ma @@ -69,7 +69,7 @@ fact da_cpr_lpr_aux: ∀h,g,G0,L0,T0. elim (scpds_inv_abst1 … HTU1) -HTU1 #W3 #U3 #HW3 #_ #H destruct -U3 -l1 elim (snv_fwd_da … HV1) #l1 #Hl1 elim (snv_fwd_da … HW) #l0 #Hl0 - lapply (scpds_div … W … 0 … HVW1) /2 width=2 by cprs_scpds/ -W3 #H + lapply (cprs_scpds_div … HW3 … Hl0 … 1 HVW1) -W3 #H elim (da_scpes_aux … IH3 IH2 IH1 … Hl0 … Hl1 … H) -IH3 -IH2 -H /2 width=1 by fqup_fpbg/ #_ #H1 (plus_minus_m_m l1 1) in Hl1; // -H1 #Hl1 lapply (IH1 … HV1 … Hl1 … HV12 … HL12) -HV1 -Hl1 -HV12 [ /2 by fqup_fpbg/ ] diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lift.ma index b0f1f88f4..0d604c128 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lift.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lift.ma @@ -45,7 +45,7 @@ lemma snv_lift: ∀h,g,G,K,T. ⦃G, K⦄ ⊢ T ¡[h, g] → ∀L,s,d,e. ⇩[s, d | #G #K #V #T #U0 #_ #_ #HVU0 #HTU0 #IHV #IHT #L #s #d #e #HLK #X #H elim (lift_inv_flat1 … H) -H #W #U #HVW #HTU #H destruct elim (lift_total U0 d e) - /3 width=12 by snv_cast, cprs_lift, scpds_lift/ + /3 width=12 by snv_cast, scpds_lift/ ] qed. @@ -73,7 +73,7 @@ lemma snv_inv_lift: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ U ¡[h, g] → ∀K,s,d,e. ⇩[ /3 width=6 by snv_appl/ | #G #L #W #U #U1 #_ #_ #HWU1 #HU1 #IHW #IHU #K #s #d #e #HLK #X #H elim (lift_inv_flat2 … H) -H #V #T #HVW #HTU #H destruct - elim (cprs_inv_lift1 … HWU1 … HLK … HVW) -HWU1 #U0 #HU01 #HVU0 + elim (scpds_inv_lift1 … HWU1 … HLK … HVW) -HWU1 #U0 #HU01 #HVU0 elim (scpds_inv_lift1 … HU1 … HLK … HTU) -HU1 #X #HX #HTU0 lapply (lift_inj … HX … HU01) -HX #H destruct /3 width=5 by snv_cast/ diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lpr.ma index 9eefdba8e..f6ea17c6c 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lpr.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lpr.ma @@ -68,7 +68,7 @@ fact snv_cpr_lpr_aux: ∀h,g,G0,L0,T0. elim (scpds_inv_abst1 … HTU1) -HTU1 #W30 #T30 #HW130 #_ #H destruct -T30 -l0 elim (snv_fwd_da … HV1) #l #HV1l elim (snv_fwd_da … HW10) #l0 #HW10l - lapply (scpds_div … W10 … 0 … HVW1) /2 width=2 by cprs_scpds/ -W30 #HVW10 + lapply (cprs_scpds_div … HW130 … HW10l … 1 HVW1) -W30 #HVW10 elim (da_scpes_aux … IH4 IH1 IH2 … HW10l … HV1l … HVW10) /2 width=1 by fqup_fpbg/ #_ #Hl (plus_minus_m_m l 1) in HV1l; // -Hl #HV1l lapply (scpes_cpr_lpr_aux … IH2 IH3 … HVW10 … HW120 … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HVW10 #HVW20 @@ -107,7 +107,7 @@ fact snv_cpr_lpr_aux: ∀h,g,G0,L0,T0. elim (cpr_inv_cast1 … H2) -H2 [ * #W2 #T2 #HW12 #HT12 #H destruct elim (snv_fwd_da … HW1) #l #HW1l - lapply (scpds_div … W1 … 0 … HTU1) /2 width=2 by cprs_scpds/ -U1 -l #HWT1 + lapply (scpds_div … HWU1 … HTU1) -U1 -l #HWT1 lapply (scpes_cpr_lpr_aux … IH2 IH3 … HWT1 … HW12 … HT12 … HL12) /2 width=1 by fqup_fpbg/ lapply (IH1 … HW12 … HL12) /2 width=1 by fqup_fpbg/ lapply (IH1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ -L1 diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lstas.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lstas.ma index 45c861402..3d4d1f35a 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lstas.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lstas.ma @@ -28,16 +28,15 @@ fact snv_lstas_aux: ∀h,g,G0,L0,T0. #h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G1 #L1 * * [|||| * ] [ #k #HG0 #HL0 #HT0 #_ #l1 #l2 #Hl21 #Hl1 #X #H2 destruct -IH4 -IH3 -IH2 -IH1 >(lstas_inv_sort1 … H2) -X // -| #i #HG0 #HL0 #HT0 #H1 #l1 #l2 @(nat_ind_plus … l2) -l2 [ #_ | #l2 #_ #Hl21 ] #Hl1 #X #H2 destruct -IH4 -IH3 -IH2 - [ lapply (lstas_inv_O … H2) -H2 #H destruct // ] +| #i #HG0 #HL0 #HT0 #H1 #l1 #l2 #Hl21 #Hl1 #T #H2 destruct -IH4 -IH3 -IH2 elim (snv_inv_lref … H1) -H1 #I0 #K0 #X0 #HLK0 #HX0 - elim (da_inv_lref … Hl1) -Hl1 * #K1 [ #V1 | #W1 #l ] #HLK1 [ #Hl1 | #Hl #H ] + elim (da_inv_lref … Hl1) -Hl1 * #K1 [ #V1 | #W1 #l0 ] #HLK1 [ #Hl1 | #Hl0 #H ] lapply (drop_mono … HLK0 … HLK1) -HLK0 #H0 destruct - elim (lstas_inv_lref1 … H2) -H2 * #K0 #Y0 #X0 [2,4: #Y1 ] #HLK0 [1,2: #HY01 ] #HYX0 #HX0 - lapply (drop_mono … HLK0 … HLK1) -HLK0 #H destruct - [ lapply (le_plus_to_le_r … Hl21) -Hl21 #Hl21 ] + elim (lstas_inv_lref1 … H2) -H2 * #K #Y #X [3,6: #l ] #HLK #HYX [1,2: #HXT #H0 |3,5: #HXT |4,6: #H1 #H2 ] + lapply (drop_mono … HLK … HLK1) -HLK #H destruct + [ lapply (le_plus_to_le_r … Hl21) -Hl21 #Hl21 |3: -Hl21 ] lapply (fqup_lref … G1 … HLK1) #H - lapply (drop_fwd_drop2 … HLK1) -HLK1 /4 width=8 by fqup_fpbg, snv_lift/ + lapply (drop_fwd_drop2 … HLK1) /4 width=8 by snv_lift, snv_lref, fqup_fpbg/ | #p #HG0 #HL0 #HT0 #H1 #l1 #l2 #Hl21 #Hl1 #X #H2 destruct -IH4 -IH3 -IH2 -IH1 elim (snv_inv_gref … H1) | #a #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #l1 #l2 #Hl21 #Hl1 #X #H2 destruct -IH4 -IH3 -IH2 @@ -51,9 +50,8 @@ fact snv_lstas_aux: ∀h,g,G0,L0,T0. lapply (IH1 … HT1 … Hl1 … HT10) /2 width=1 by fqup_fpbg/ #HT0 lapply (lstas_scpds_aux … IH1 IH4 IH3 IH2 … Hl1 … HT10 … HTU1) -IH4 -IH3 -IH2 -IH1 /2 width=1 by fqup_fpbg/ -T1 -l1 #H elim (scpes_inv_abst2 … H) -H /3 width=6 by snv_appl, scpds_cprs_trans/ -| #U1 #T1 #HG0 #HL0 #HT0 #H1 #l1 #l2 @(nat_ind_plus … l2) -l2 [ #_ | #l2 #_ #Hl21 ] #Hl1 #X #H2 destruct -IH4 -IH3 -IH2 - [ lapply (lstas_inv_O … H2) -H2 #H destruct // ] - elim (snv_inv_cast … H1) -H1 +| #U1 #T1 #HG0 #HL0 #HT0 #H1 #l1 #l2 #Hl21 #Hl1 #X #H2 destruct -IH4 -IH3 -IH2 + elim (snv_inv_cast … H1) -H1 lapply (da_inv_flat … Hl1) -Hl1 lapply (lstas_inv_cast1 … H2) -H2 /3 width=8 by fqup_fpbg/ ] diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lstas_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lstas_lpr.ma index 388cf2ba4..71d0aa836 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lstas_lpr.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lstas_lpr.ma @@ -30,32 +30,33 @@ fact lstas_cpr_lpr_aux: ∀h,g,G0,L0,T0. [ #k #_ #_ #_ #_ #l1 #l2 #_ #_ #X2 #H2 #X3 #H3 #L2 #_ -IH4 -IH3 -IH2 -IH1 >(lstas_inv_sort1 … H2) -X2 >(cpr_inv_sort1 … H3) -X3 /2 width=3 by ex2_intro/ -| #i #HG0 #HL0 #HT0 #H1 #l1 #l2 @(nat_ind_plus … l2) -l2 [ #_ | #l2 #_ #Hl21 ] #Hl1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3 - [ lapply (lstas_inv_O … H2) -H2 #H destruct -IH1 -H1 -l1 /4 width=5 by lpr_cpcs_conf, cpr_cpcs_dx, ex2_intro/ ] +| #i #HG0 #HL0 #HT0 #H1 #l1 #l2 #Hl21 #Hl1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3 elim (snv_inv_lref … H1) -H1 #I0 #K0 #X0 #HK0 #HX0 - elim (da_inv_lref … Hl1) -Hl1 * #K1 [ #V1 | #W1 #l0 ] #HLK1 [ #HVl1 | #HWl1 #H destruct ] + elim (da_inv_lref … Hl1) -Hl1 * #K1 [ #V1 | #W1 #l ] #HLK1 [ #HVl1 | #HWl1 #H destruct ] lapply (drop_mono … HK0 … HLK1) -HK0 #H destruct - elim (lstas_inv_lref1 … H2) -H2 * #K0 #V0 #W0 [2,4: #X0 ] #HK0 [1,2: #_ -X0 ] #HVW0 #HX2 + elim (lstas_inv_lref1 … H2) -H2 * #K0 #V0 #X0 [3,6: #l0 ] #HK0 #HVX0 [1,2: #HX02 #H |3,5: #HX02 |4,6: #H1 #H2 ] destruct lapply (drop_mono … HK0 … HLK1) -HK0 #H destruct - [ lapply (le_plus_to_le_r … Hl21) -Hl21 #Hl21 ] + [ lapply (le_plus_to_le_r … Hl21) -Hl21 #Hl21 |3: -Hl21 ] lapply (fqup_lref … G1 … HLK1) #HKV1 elim (lpr_drop_conf … HLK1 … HL12) -HL12 #X #H #HLK2 - elim (lpr_inv_pair1 … H) -H #K2 [ #W2 | #V2 ] #HK12 [ #HW12 | #HV12 ] #H destruct + elim (lpr_inv_pair1 … H) -H #K2 [ #W2 | #W2 | #V2 ] #HK12 [ #HW12 | #HW12 | #HV12 ] #H destruct lapply (drop_fwd_drop2 … HLK2) #H2 elim (cpr_inv_lref1 … H3) -H3 - [1,3: #H destruct -HLK1 - |2,4: * #K0 #V0 #X0 #H #HVX0 #HX0 - lapply (drop_mono … H … HLK1) -H -HLK1 #H destruct + [1,3,5: #H destruct -HLK1 + |2,4,6: * #K #V #X #H #HVX #HX3 + lapply (drop_mono … H … HLK1) -H -HLK1 #H destruct ] [ lapply (IH2 … HWl1 … HW12 … HK12) /2 width=1 by fqup_fpbg/ -IH2 #H - elim (da_inv_sta … H) -H - elim (IH1 … HWl1 … HVW0 … HW12 … HK12) -IH1 -HVW0 /2 width=1 by fqup_fpbg/ #V2 #HWV2 #HV2 + elim (da_lstas … H l0) -H + elim (IH1 … HWl1 … HVX0 … HW12 … HK12) -IH1 -HVX0 /2 width=1 by fqup_fpbg/ #V2 #HWV2 #HV2 elim (lift_total V2 0 (i+1)) - /3 width=12 by cpcs_lift, lstas_ldec, ex2_intro/ - | elim (IH1 … HVl1 … HVW0 … HV12 … HK12) -IH1 -HVl1 -HVW0 -HV12 -HK12 -IH2 /2 width=1 by fqup_fpbg/ #W2 #HVW2 #HW02 + /3 width=12 by cpcs_lift, lstas_succ, ex2_intro/ + | elim (IH1 … HWl1 … HVX0 … HW12 … HK12) -IH1 -HVX0 + /3 width=5 by fqup_fpbg, lstas_zero, ex2_intro/ + | elim (IH1 … HVl1 … HVX0 … HV12 … HK12) -IH1 -HVl1 -HVX0 -HV12 -HK12 -IH2 /2 width=1 by fqup_fpbg/ #W2 #HVW2 #HW02 elim (lift_total W2 0 (i+1)) /4 width=12 by cpcs_lift, lstas_ldef, ex2_intro/ - | elim (IH1 … HVl1 … HVW0 … HVX0 … HK12) -IH1 -HVl1 -HVW0 -HVX0 -HK12 -IH2 -V2 /2 width=1 by fqup_fpbg/ -l1 #W2 #HXW2 #HW02 + | elim (IH1 … HVl1 … HVX0 … HVX … HK12) -IH1 -HVl1 -HVX0 -HVX -HK12 -IH2 -V2 /2 width=1 by fqup_fpbg/ -l1 #W2 #HXW2 #HW02 elim (lift_total W2 0 (i+1)) /3 width=12 by cpcs_lift, lstas_lift, ex2_intro/ ] @@ -88,7 +89,7 @@ fact lstas_cpr_lpr_aux: ∀h,g,G0,L0,T0. elim (lstas_inv_bind1 … HT1U) -HT1U #U #HT2U #H destruct elim (scpds_inv_abst1 … HTU1) -HTU1 #W0 #U0 #HW20 #_ #H destruct -U0 -l0 elim (snv_fwd_da … HW2) #l0 #HW2l - lapply (scpds_div … W2 … 0 … HVW1) /2 width=3 by cprs_scpds/ -W0 #H21 + lapply (cprs_scpds_div … HW20 … HW2l … HVW1) -W0 #H21 elim (snv_fwd_da … HV1) #l #HV1l elim (da_scpes_aux … IH4 IH3 IH2 … HW2l … HV1l … H21) /2 width=1 by fqup_fpbg/ #_ #H (plus_minus_m_m l 1) in HV1l; // -H #HV1l @@ -123,8 +124,7 @@ fact lstas_cpr_lpr_aux: ∀h,g,G0,L0,T0. lapply (cpcs_cpr_strap1 … HU02 (ⓓ{b}W2.ⓐV2.U2) ?) /4 width=3 by lstas_appl, lstas_bind, cpr_theta, ex2_intro/ ] -| #W1 #T1 #HG0 #HL0 #HT0 #H1 #l1 #l2 @(nat_ind_plus … l2) -l2 [ #_ | #l2 #_ #Hl21 ] #Hl1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3 -IH2 - [ lapply (lstas_inv_O … H2) -H2 #H destruct -IH1 -H1 -l1 /4 width=5 by lpr_cpcs_conf, cpr_cpcs_dx, ex2_intro/ ] +| #W1 #T1 #HG0 #HL0 #HT0 #H1 #l1 #l2 #Hl21 #Hl1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3 -IH2 elim (snv_inv_cast … H1) -H1 #U1 #_ #HT1 #_ #_ -U1 lapply (da_inv_flat … Hl1) -Hl1 #Hl1 lapply (lstas_inv_cast1 … H2) -H2 #HTU1 diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_scpes.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_scpes.ma index 5ee696600..2c3a1d35c 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_scpes.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_scpes.ma @@ -160,10 +160,12 @@ lapply (lstas_da_conf … HTX … HTl) #HXl lapply (da_cprs_lpr_aux … IH3 IH2 … HXl … HXT2 L ?) [1,2,3: /3 width=8 by fpbg_fpbs_trans, lstas_fpbs/ ] #HTl2 elim (le_or_ge l1 l2) #Hl12 >(eq_minus_O … Hl12) -[ /5 width=3 by scpds_refl, lstas_conf_le, monotonic_le_minus_l, ex4_2_intro, ex2_intro/ -| lapply (lstas_conf_le … HTX … HT1) // #HXT1 -HT1 +[ elim (da_lstas … HTl2 0) #X2 #HTX2 #_ -IH4 -IH3 -IH2 -IH1 -H0 -HT -HTl -HXl + /5 width=6 by lstas_scpds, scpds_div, cprs_strap1, lstas_cpr, lstas_conf_le, monotonic_le_minus_l, ex4_2_intro/ +| elim (da_lstas … HTl1 0) #X1 #HTX1 #_ + lapply (lstas_conf_le … HTX … HT1) // #HXT1 -HT1 elim (lstas_cprs_lpr_aux … IH3 IH2 IH1 … HXl … HXT1 … HXT2 L) -IH3 -IH2 -IH1 -HXl -HXT1 -HXT2 - /3 width=8 by cpcs_scpes, fpbg_fpbs_trans, lstas_fpbs, monotonic_le_minus_l/ + /4 width=8 by cpcs_scpes, cpcs_cpr_conf, fpbg_fpbs_trans, lstas_fpbs, lstas_cpr, monotonic_le_minus_l/ ] qed-. @@ -177,11 +179,9 @@ fact scpes_le_aux: ∀h,g,G0,L0,T0. ∀l11. ⦃G, L⦄ ⊢ T1 ▪[h, g] l11 → ∀l12. ⦃G, L⦄ ⊢ T2 ▪[h, g] l12 → ∀l21,l22,l. l21 + l ≤ l11 → l22 + l ≤ l12 → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, l21, l22] T2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, l21+l, l22+l] T2. -#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G #L #T1 #H01 #HT1 #T2 #H02 #HT2 #l11 #Hl11 #Hl12 #Hl12 #l21 #l22 #l #H1 #H2 * #T0 #HT10 #HT20 -elim (da_inv_sta … Hl11) #X1 #HTX1 -elim (lstas_total … HTX1 (l21+l)) -X1 #X1 #HTX1 -elim (da_inv_sta … Hl12) #X2 #HTX2 -elim (lstas_total … HTX2 (l22+l)) -X2 #X2 #HTX2 +#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G #L #T1 #H01 #HT1 #T2 #H02 #HT2 #l11 #Hl11 #Hl12 #Hl12 #l21 #l22 #l #H1 #H2 * #T0 #HT10 #HT20 +elim (da_lstas … Hl11 (l21+l)) #X1 #HTX1 #_ +elim (da_lstas … Hl12 (l22+l)) #X2 #HTX2 #_ lapply (lstas_scpds_aux … IH4 IH3 IH2 IH1 … Hl11 … HTX1 … HT10) -HT10 [1,2,3: // | >eq_minus_O [2: // ] Stage "A": "Weakening the Applicability Condition" + + Interated static type assignment defined (more elegantly) + as a primitive notion. + Preservation of stratified native validity for context-sensitive computation on terms. 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 b14263c1d..7c16cd346 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 @@ -51,7 +51,7 @@ table { } ] [ { "stratified native validity" * } { - [ "shnv ( ⦃?,?⦄ ⊢ ? ¡[?,?,?] )" "shnv_aaa" * ] + [ "shnv ( ⦃?,?⦄ ⊢ ? ¡[?,?,?] )" * ] [ "snv ( ⦃?,?⦄ ⊢ ? ¡[?,?] )" "snv_lift" + "snv_aaa" + "snv_da_lpr" + "snv_lstas" + "snv_lstas_lpr" + "snv_lpr" + "snv_scpes" + "snv_preserve" * ] } ] @@ -178,7 +178,7 @@ table { } ] [ { "iterated static type assignment" * } { - [ "lstas ( ⦃?,?⦄ ⊢ ? •*[?,?] ? )" "lstas_alt ( ⦃?,?⦄ ⊢ ? ••*[?,?] ? )" "lstas_lift" + "lstas_aaa" + "lstas_da" + "lstas_lstas" * ] + [ "lstas ( ⦃?,?⦄ ⊢ ? •*[?,?] ? )" "lstas_lift" + "lstas_llpx_sn.ma" + "lstas_aaa" + "lstas_da" + "lstas_lstas" * ] } ] } @@ -190,11 +190,7 @@ table { } ] [ { "degree assignment" * } { - [ "da ( ⦃?,?⦄ ⊢ ? ▪[?,?] ? )" "da_lift" + "da_aaa" + "da_sta" + "da_da" * ] - } - ] - [ { "static type assignment" * } { - [ "sta ( ⦃?,?⦄ ⊢ ? •[?] ? )" "sta_lift" + "sta_lpx_sn" + "sta_aaa" + "sta_sta" * ] + [ "da ( ⦃?,?⦄ ⊢ ? ▪[?,?] ? )" "da_lift" + "da_aaa" + "da_da" * ] } ] [ { "parameters" * } { -- 2.39.2