X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Fcomputation%2Fcpxs_tstc.ma;h=87ae419aac2e047c99b8fb8edeeb18a41f1af910;hb=f95f6cb21b86f3dad114b21f687aa5df36088064;hp=e8478aa84f36ad7d3796346cabd45d9bb339e576;hpb=ef49e0e7f5f298c299afdd3cbfdc2404ecb93879;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_tstc.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_tstc.ma index e8478aa84..87ae419aa 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_tstc.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_tstc.ma @@ -24,17 +24,32 @@ lemma cpxs_fwd_cnx: ∀h,g,L,T. ⦃h, L⦄ ⊢ 𝐍[g]⦃T⦄ → ∀U. ⦃h, L >(cpxs_inv_cnx1 … H HT) -L -T // qed-. +lemma cpxs_fwd_sort: ∀h,g,L,U,k. ⦃h, L⦄ ⊢ ⋆k ➡*[g] U → + ⋆k ≃ U ∨ ⦃h, L⦄ ⊢ ⋆(next h k) ➡*[g] U. +#h #g #L #U #k #H +elim (cpxs_inv_sort1 … H) -H #n #l generalize in match k; -k @(nat_ind_plus … n) -n +[ #k #_ #H -l destruct /2 width=1/ +| #n #IHn #k >plus_plus_comm_23 #Hnl #H destruct + lapply (deg_next_SO … Hnl) -Hnl #Hnl + elim (IHn … Hnl) -IHn + [ #H lapply (tstc_inv_atom1 … H) -H #H >H -H /2 width=1/ + | generalize in match Hnl; -Hnl @(nat_ind_plus … n) -n /2 width=1/ + #n #_ /4 width=3/ + | >iter_SO >iter_n_Sm // + ] +] +qed-. + (* Basic_1: was just: pr3_iso_beta *) lemma cpxs_fwd_beta: ∀h,g,a,L,V,W,T,U. ⦃h, L⦄ ⊢ ⓐV.ⓛ{a}W.T ➡*[g] U → - ⓐV.ⓛ{a}W.T ≃ U ∨ - ∃∃T0. ⦃h, L.ⓛW⦄ ⊢ T ➡*[g] T0 & ⦃h, L⦄ ⊢ ⓓ{a}V.T0 ➡*[g] U. + ⓐV.ⓛ{a}W.T ≃ U ∨ ⦃h, L⦄ ⊢ ⓓ{a}ⓝW.V.T ➡*[g] U. #h #g #a #L #V #W #T #U #H elim (cpxs_inv_appl1 … H) -H * [ #V0 #T0 #_ #_ #H destruct /2 width=1/ -| #b #V0 #W0 #T0 #HV0 #HT0 #HU - elim (cpxs_inv_abst1 … HT0) -HT0 #W1 #T1 #_ #HT1 #H destruct -W1 - @or_intror @(ex2_intro … HT1) -W (**) (* explicit constructors *) - @(cpxs_trans … HU) -U /2 width=1/ +| #b #W0 #T0 #HT0 #HU + elim (cpxs_inv_abst1 … HT0) -HT0 #W1 #T1 #HW1 #HT1 #H destruct + lapply (lsubr_cpxs_trans … HT1 (L.ⓓⓝW.V) ?) -HT1 /2 width=1/ #HT1 + @or_intror @(cpxs_trans … HU) -U /3 width=1/ (**) (* explicit constructor *) | #b #V1 #V2 #V0 #T1 #_ #_ #HT1 #_ elim (cpxs_inv_abst1 … HT1) -HT1 #W2 #T2 #_ #_ #H destruct ] @@ -58,15 +73,15 @@ lemma cpxs_fwd_theta: ∀h,g,a,L,V1,V,T,U. ⦃h, L⦄ ⊢ ⓐV1.ⓓ{a}V.T ➡*[g #h #g #a #L #V1 #V #T #U #H #V2 #HV12 elim (cpxs_inv_appl1 … H) -H * [ -HV12 #V0 #T0 #_ #_ #H destruct /2 width=1/ -| #b #V0 #W #T0 #HV10 #HT0 #HU +| #b #W #T0 #HT0 #HU elim (cpxs_inv_abbr1 … HT0) -HT0 * [ #V3 #T3 #_ #_ #H destruct | #X #HT2 #H #H0 destruct elim (lift_inv_bind1 … H) -H #W2 #T2 #HW2 #HT02 #H destruct @or_intror @(cpxs_trans … HU) -U (**) (* explicit constructor *) @(cpxs_trans … (+ⓓV.ⓐV2.ⓛ{b}W2.T2)) [ /3 width=1/ ] -T - @(cpxs_strap2 … (ⓐV1.ⓛ{b}W.T0)) [ /5 width=7/ ] -V -V2 -W2 -T2 - @(cpxs_strap2 … (ⓓ{b}V1.T0)) [ /3 width=1/ ] -W /2 width=1/ + @(cpxs_strap2 … (ⓐV1.ⓛ{b}W.T0)) [2: /2 width=1/ ] + /4 width=7 by cpx_zeta, lift_bind, lift_flat/ (**) (* auto too slow without trace *) ] | #b #V3 #V4 #V0 #T0 #HV13 #HV34 #HT0 #HU @or_intror @(cpxs_trans … HU) -U (**) (* explicit constructor *) @@ -78,14 +93,14 @@ elim (cpxs_inv_appl1 … H) -H * elim (lift_inv_bind1 … H) -H #V5 #T5 #HV05 #HT05 #H destruct lapply (cpxs_lift … HV13 (L.ⓓV0) … HV12 … HV34) -V3 /2 width=1/ #HV24 @(cpxs_trans … (+ⓓV.ⓐV2.ⓓ{b}V5.T5)) [ /3 width=1/ ] -T - @(cpxs_strap2 … (ⓐV1.ⓓ{b}V0.T0)) [ /5 width=7/ ] -V -V5 -T5 + @(cpxs_strap2 … (ⓐV1.ⓓ{b}V0.T0)) [ /4 width=7 by cpx_zeta, lift_bind, lift_flat/ ] -V -V5 -T5 (**) (* auto too slow without trace *) @(cpxs_strap2 … (ⓓ{b}V0.ⓐV2.T0)) [ /3 width=3/ ] -V1 /3 width=1/ ] ] qed-. -lemma cpxs_fwd_tau: ∀h,g,L,W,T,U. ⦃h, L⦄ ⊢ ⓝW.T ➡*[g] U → - ⓝW. T ≃ U ∨ ⦃h, L⦄ ⊢ T ➡*[g] U. +lemma cpxs_fwd_cast: ∀h,g,L,W,T,U. ⦃h, L⦄ ⊢ ⓝW.T ➡*[g] U → + ∨∨ ⓝW. T ≃ U | ⦃h, L⦄ ⊢ T ➡*[g] U | ⦃h, L⦄ ⊢ W ➡*[g] U. #h #g #L #W #T #U #H elim (cpxs_inv_cast1 … H) -H /2 width=1/ * #W0 #T0 #_ #_ #H destruct /2 width=1/