X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Frt_transition%2Fcpm.ma;h=8e60c4f2ea8186eda7c9f1fae34e68a68a8bfafa;hp=f9a51d5b6a9220f1f729f5784c2d940eb625f18d;hb=25c634037771dff0138e5e8e3d4378183ff49b86;hpb=bd53c4e895203eb049e75434f638f26b5a161a2b diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm.ma index f9a51d5b6..8e60c4f2e 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm.ma @@ -16,6 +16,9 @@ include "ground_2/xoa/ex_4_1.ma". include "ground_2/xoa/ex_4_3.ma". include "ground_2/xoa/ex_5_6.ma". include "ground_2/xoa/ex_6_7.ma". +include "ground_2/steps/rtc_max_shift.ma". +include "ground_2/steps/rtc_isrt_plus.ma". +include "ground_2/steps/rtc_isrt_max_shift.ma". include "basic_2/notation/relations/pred_6.ma". include "basic_2/notation/relations/pred_5.ma". include "basic_2/rt_transition/cpg.ma". @@ -40,19 +43,19 @@ lemma cpm_ess: ∀h,G,L,s. ❪G,L❫ ⊢ ⋆s ➡[1,h] ⋆(⫯[h]s). /2 width=3 by cpg_ess, ex2_intro/ qed. lemma cpm_delta: ∀n,h,G,K,V1,V2,W2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 → - ⇧*[1] V2 ≘ W2 → ❪G,K.ⓓV1❫ ⊢ #0 ➡[n,h] W2. + ⇧[1] V2 ≘ W2 → ❪G,K.ⓓV1❫ ⊢ #0 ➡[n,h] W2. #n #h #G #K #V1 #V2 #W2 * /3 width=5 by cpg_delta, ex2_intro/ qed. lemma cpm_ell: ∀n,h,G,K,V1,V2,W2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 → - ⇧*[1] V2 ≘ W2 → ❪G,K.ⓛV1❫ ⊢ #0 ➡[↑n,h] W2. + ⇧[1] V2 ≘ W2 → ❪G,K.ⓛV1❫ ⊢ #0 ➡[↑n,h] W2. #n #h #G #K #V1 #V2 #W2 * /3 width=5 by cpg_ell, ex2_intro, isrt_succ/ qed. lemma cpm_lref: ∀n,h,I,G,K,T,U,i. ❪G,K❫ ⊢ #i ➡[n,h] T → - ⇧*[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #↑i ➡[n,h] U. + ⇧[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #↑i ➡[n,h] U. #n #h #I #G #K #T #U #i * /3 width=5 by cpg_lref, ex2_intro/ qed. @@ -81,7 +84,7 @@ qed. (* Basic_2A1: includes: cpr_zeta *) lemma cpm_zeta (n) (h) (G) (L): - ∀T1,T. ⇧*[1] T ≘ T1 → ∀T2. ❪G,L❫ ⊢ T ➡[n,h] T2 → + ∀T1,T. ⇧[1] T ≘ T1 → ∀T2. ❪G,L❫ ⊢ T ➡[n,h] T2 → ∀V. ❪G,L❫ ⊢ +ⓓV.T1 ➡[n,h] T2. #n #h #G #L #T1 #T #HT1 #T2 * /3 width=5 by cpg_zeta, isrt_plus_O2, ex2_intro/ @@ -108,7 +111,7 @@ qed. (* Basic_2A1: includes: cpr_theta *) lemma cpm_theta: ∀n,h,p,G,L,V1,V,V2,W1,W2,T1,T2. - ❪G,L❫ ⊢ V1 ➡[h] V → ⇧*[1] V ≘ V2 → ❪G,L❫ ⊢ W1 ➡[h] W2 → + ❪G,L❫ ⊢ V1 ➡[h] V → ⇧[1] V ≘ V2 → ❪G,L❫ ⊢ W1 ➡[h] W2 → ❪G,L.ⓓW1❫ ⊢ T1 ➡[n,h] T2 → ❪G,L❫ ⊢ ⓐV1.ⓓ[p]W1.T1 ➡[n,h] ⓓ[p]W2.ⓐV2.T2. #n #h #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 * #riV #rhV #HV1 #HV2 * #riW #rhW #HW12 * @@ -136,11 +139,11 @@ qed. lemma cpm_inv_atom1: ∀n,h,J,G,L,T2. ❪G,L❫ ⊢ ⓪[J] ➡[n,h] T2 → ∨∨ T2 = ⓪[J] ∧ n = 0 | ∃∃s. T2 = ⋆(⫯[h]s) & J = Sort s & n = 1 - | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 & ⇧*[1] V2 ≘ T2 & + | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 & ⇧[1] V2 ≘ T2 & L = K.ⓓV1 & J = LRef 0 - | ∃∃m,K,V1,V2. ❪G,K❫ ⊢ V1 ➡[m,h] V2 & ⇧*[1] V2 ≘ T2 & + | ∃∃m,K,V1,V2. ❪G,K❫ ⊢ V1 ➡[m,h] V2 & ⇧[1] V2 ≘ T2 & L = K.ⓛV1 & J = LRef 0 & n = ↑m - | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ➡[n,h] T & ⇧*[1] T ≘ T2 & + | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ➡[n,h] T & ⇧[1] T ≘ T2 & L = K.ⓘ[I] & J = LRef (↑i). #n #h #J #G #L #T2 * #c #Hc #H elim (cpg_inv_atom1 … H) -H * [ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or5_intro0, conj/ @@ -165,9 +168,9 @@ qed-. lemma cpm_inv_zero1: ∀n,h,G,L,T2. ❪G,L❫ ⊢ #0 ➡[n,h] T2 → ∨∨ T2 = #0 ∧ n = 0 - | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 & ⇧*[1] V2 ≘ T2 & + | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 & ⇧[1] V2 ≘ T2 & L = K.ⓓV1 - | ∃∃m,K,V1,V2. ❪G,K❫ ⊢ V1 ➡[m,h] V2 & ⇧*[1] V2 ≘ T2 & + | ∃∃m,K,V1,V2. ❪G,K❫ ⊢ V1 ➡[m,h] V2 & ⇧[1] V2 ≘ T2 & L = K.ⓛV1 & n = ↑m. #n #h #G #L #T2 * #c #Hc #H elim (cpg_inv_zero1 … H) -H * [ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or3_intro0, conj/ @@ -191,7 +194,7 @@ qed. lemma cpm_inv_lref1: ∀n,h,G,L,T2,i. ❪G,L❫ ⊢ #↑i ➡[n,h] T2 → ∨∨ T2 = #(↑i) ∧ n = 0 - | ∃∃I,K,T. ❪G,K❫ ⊢ #i ➡[n,h] T & ⇧*[1] T ≘ T2 & L = K.ⓘ[I]. + | ∃∃I,K,T. ❪G,K❫ ⊢ #i ➡[n,h] T & ⇧[1] T ≘ T2 & L = K.ⓘ[I]. #n #h #G #L #T2 #i * #c #Hc #H elim (cpg_inv_lref1 … H) -H * [ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or_introl, conj/ | #I #K #V2 #HV2 #HVT2 #H destruct @@ -223,7 +226,7 @@ qed-. lemma cpm_inv_bind1: ∀n,h,p,I,G,L,V1,T1,U2. ❪G,L❫ ⊢ ⓑ[p,I]V1.T1 ➡[n,h] U2 → ∨∨ ∃∃V2,T2. ❪G,L❫ ⊢ V1 ➡[h] V2 & ❪G,L.ⓑ[I]V1❫ ⊢ T1 ➡[n,h] T2 & U2 = ⓑ[p,I]V2.T2 - | ∃∃T. ⇧*[1] T ≘ T1 & ❪G,L❫ ⊢ T ➡[n,h] U2 & + | ∃∃T. ⇧[1] T ≘ T1 & ❪G,L❫ ⊢ T ➡[n,h] U2 & p = true & I = Abbr. #n #h #p #I #G #L #V1 #T1 #U2 * #c #Hc #H elim (cpg_inv_bind1 … H) -H * [ #cV #cT #V2 #T2 #HV12 #HT12 #H1 #H2 destruct @@ -240,7 +243,7 @@ qed-. lemma cpm_inv_abbr1: ∀n,h,p,G,L,V1,T1,U2. ❪G,L❫ ⊢ ⓓ[p]V1.T1 ➡[n,h] U2 → ∨∨ ∃∃V2,T2. ❪G,L❫ ⊢ V1 ➡[h] V2 & ❪G,L.ⓓV1❫ ⊢ T1 ➡[n,h] T2 & U2 = ⓓ[p]V2.T2 - | ∃∃T. ⇧*[1] T ≘ T1 & ❪G,L❫ ⊢ T ➡[n,h] U2 & p = true. + | ∃∃T. ⇧[1] T ≘ T1 & ❪G,L❫ ⊢ T ➡[n,h] U2 & p = true. #n #h #p #G #L #V1 #T1 #U2 #H elim (cpm_inv_bind1 … H) -H [ /3 width=1 by or_introl/ @@ -275,7 +278,7 @@ lemma cpm_inv_appl1: ∀n,h,G,L,V1,U1,U2. ❪G,L❫ ⊢ ⓐ V1.U1 ➡[n,h] U2 | ∃∃p,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V2 & ❪G,L❫ ⊢ W1 ➡[h] W2 & ❪G,L.ⓛW1❫ ⊢ T1 ➡[n,h] T2 & U1 = ⓛ[p]W1.T1 & U2 = ⓓ[p]ⓝW2.V2.T2 - | ∃∃p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V & ⇧*[1] V ≘ V2 & + | ∃∃p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V & ⇧[1] V ≘ V2 & ❪G,L❫ ⊢ W1 ➡[h] W2 & ❪G,L.ⓓW1❫ ⊢ T1 ➡[n,h] T2 & U1 = ⓓ[p]W1.T1 & U2 = ⓓ[p]W2.ⓐV2.T2. #n #h #G #L #V1 #U1 #U2 * #c #Hc #H elim (cpg_inv_appl1 … H) -H * @@ -335,18 +338,18 @@ lemma cpm_ind (h): ∀Q:relation5 nat genv lenv term term. (∀I,G,L. Q 0 G L (⓪[I]) (⓪[I])) → (∀G,L,s. Q 1 G L (⋆s) (⋆(⫯[h]s))) → (∀n,G,K,V1,V2,W2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 → Q n G K V1 V2 → - ⇧*[1] V2 ≘ W2 → Q n G (K.ⓓV1) (#0) W2 + ⇧[1] V2 ≘ W2 → Q n G (K.ⓓV1) (#0) W2 ) → (∀n,G,K,V1,V2,W2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 → Q n G K V1 V2 → - ⇧*[1] V2 ≘ W2 → Q (↑n) G (K.ⓛV1) (#0) W2 + ⇧[1] V2 ≘ W2 → Q (↑n) G (K.ⓛV1) (#0) W2 ) → (∀n,I,G,K,T,U,i. ❪G,K❫ ⊢ #i ➡[n,h] T → Q n G K (#i) T → - ⇧*[1] T ≘ U → Q n G (K.ⓘ[I]) (#↑i) (U) + ⇧[1] T ≘ U → Q n G (K.ⓘ[I]) (#↑i) (U) ) → (∀n,p,I,G,L,V1,V2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V2 → ❪G,L.ⓑ[I]V1❫ ⊢ T1 ➡[n,h] T2 → Q 0 G L V1 V2 → Q n G (L.ⓑ[I]V1) T1 T2 → Q n G L (ⓑ[p,I]V1.T1) (ⓑ[p,I]V2.T2) ) → (∀n,G,L,V1,V2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V2 → ❪G,L❫ ⊢ T1 ➡[n,h] T2 → Q 0 G L V1 V2 → Q n G L T1 T2 → Q n G L (ⓐV1.T1) (ⓐV2.T2) ) → (∀n,G,L,V1,V2,T1,T2. ❪G,L❫ ⊢ V1 ➡[n,h] V2 → ❪G,L❫ ⊢ T1 ➡[n,h] T2 → Q n G L V1 V2 → Q n G L T1 T2 → Q n G L (ⓝV1.T1) (ⓝV2.T2) - ) → (∀n,G,L,V,T1,T,T2. ⇧*[1] T ≘ T1 → ❪G,L❫ ⊢ T ➡[n,h] T2 → + ) → (∀n,G,L,V,T1,T,T2. ⇧[1] T ≘ T1 → ❪G,L❫ ⊢ T ➡[n,h] T2 → Q n G L T T2 → Q n G L (+ⓓV.T1) T2 ) → (∀n,G,L,V,T1,T2. ❪G,L❫ ⊢ T1 ➡[n,h] T2 → Q n G L T1 T2 → Q n G L (ⓝV.T1) T2 @@ -357,7 +360,7 @@ lemma cpm_ind (h): ∀Q:relation5 nat genv lenv term term. Q n G L (ⓐV1.ⓛ[p]W1.T1) (ⓓ[p]ⓝW2.V2.T2) ) → (∀n,p,G,L,V1,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V → ❪G,L❫ ⊢ W1 ➡[h] W2 → ❪G,L.ⓓW1❫ ⊢ T1 ➡[n,h] T2 → Q 0 G L V1 V → Q 0 G L W1 W2 → Q n G (L.ⓓW1) T1 T2 → - ⇧*[1] V ≘ V2 → Q n G L (ⓐV1.ⓓ[p]W1.T1) (ⓓ[p]W2.ⓐV2.T2) + ⇧[1] V ≘ V2 → Q n G L (ⓐV1.ⓓ[p]W1.T1) (ⓓ[p]W2.ⓐV2.T2) ) → ∀n,G,L,T1,T2. ❪G,L❫ ⊢ T1 ➡[n,h] T2 → Q n G L T1 T2. #h #Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #IH8 #IH9 #IH10 #IH11 #IH12 #IH13 #n #G #L #T1 #T2