X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Frt_computation%2Fcpxs_tsts.ma;h=65c32bf7f9982d47d295bc87382bec46d807b2c7;hb=18d7afd216aee6c815eac30982d8ad4fa4521070;hp=64f1facd20f1661a5f5cad00905a39bdc1f2d59c;hpb=1de84a809c842fbc8a4e0d92b9bc61763c0e6fae;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_tsts.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_tsts.ma index 64f1facd2..65c32bf7f 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_tsts.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_tsts.ma @@ -12,21 +12,18 @@ (* *) (**************************************************************************) -include "basic_2/syntax/tsts.ma". +include "basic_2/syntax/tsts_tdeq.ma". +include "basic_2/rt_computation/cpxs_lsubr.ma". +include "basic_2/rt_computation/cpxs_cnx.ma". include "basic_2/rt_computation/lfpxs_cpxs.ma". (* UNCOUNTED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS ************) (* Forward lemmas with same top term structure ******************************) -(* -lemma cpxs_fwd_cnx: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃T⦄ → ∀U. ⦃G, L⦄ ⊢ T ⬈*[h, o] U → T ≂ U. -#h #o #G #L #T #HT #U #H ->(cpxs_inv_cnx1 … H HT) -G -L -T // -qed-. -*) -lemma cpxs_fwd_sort: ∀h,G,L,U,s. ⦃G, L⦄ ⊢ ⋆s ⬈*[h] U → - ⋆s ≂ U ∨ ⦃G, L⦄ ⊢ ⋆(next h s) ⬈*[h] U. -#h #G #L #U #s #H elim (cpxs_inv_sort1 … H) -H * + +lemma cpxs_fwd_sort: ∀h,o,G,L,U,s. ⦃G, L⦄ ⊢ ⋆s ⬈*[h] U → + ⋆s ⩳[h, o] U ∨ ⦃G, L⦄ ⊢ ⋆(next h s) ⬈*[h] U. +#h #o #G #L #U #s #H elim (cpxs_inv_sort1 … H) -H * [ #H destruct /2 width=1 by or_introl/ | #n #H destruct @or_intror >iter_S <(iter_n_Sm … (next h)) // (**) @@ -34,9 +31,9 @@ lemma cpxs_fwd_sort: ∀h,G,L,U,s. ⦃G, L⦄ ⊢ ⋆s ⬈*[h] U → qed-. (* Basic_1: was just: pr3_iso_beta *) -lemma cpxs_fwd_beta: ∀h,p,G,L,V,W,T,U. ⦃G, L⦄ ⊢ ⓐV.ⓛ{p}W.T ⬈*[h] U → - ⓐV.ⓛ{p}W.T ≂ U ∨ ⦃G, L⦄ ⊢ ⓓ{p}ⓝW.V.T ⬈*[h] U. -#h #p #G #L #V #W #T #U #H elim (cpxs_inv_appl1 … H) -H * +lemma cpxs_fwd_beta: ∀h,o,p,G,L,V,W,T,U. ⦃G, L⦄ ⊢ ⓐV.ⓛ{p}W.T ⬈*[h] U → + ⓐV.ⓛ{p}W.T ⩳[h, o] U ∨ ⦃G, L⦄ ⊢ ⓓ{p}ⓝW.V.T ⬈*[h] U. +#h #o #p #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 elim (cpxs_inv_abst1 … HT0) -HT0 #W1 #T1 #HW1 #HT1 #H destruct @@ -48,52 +45,59 @@ lemma cpxs_fwd_beta: ∀h,p,G,L,V,W,T,U. ⦃G, L⦄ ⊢ ⓐV.ⓛ{p}W.T ⬈*[h] U qed-. (* Note: probably this is an inversion lemma *) -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, o] U → - #i ≂ U ∨ ⦃G, L⦄ ⊢ V2 ⬈*[h, o] U. +(* Basic_2A1: was: cpxs_fwd_delta *) +lemma cpxs_fwd_delta_drops: ∀h,o,I,G,L,K,V1,i. ⬇*[i] L ≡ K.ⓑ{I}V1 → + ∀V2. ⬆*[⫯i] V1 ≡ V2 → + ∀U. ⦃G, L⦄ ⊢ #i ⬈*[h] U → + #i ⩳[h, o] U ∨ ⦃G, L⦄ ⊢ V2 ⬈*[h] 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/ +elim (cpxs_inv_lref1_drops … 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/ +lapply (drops_mono … HLK0 … HLK) -HLK0 #H destruct +elim (cpxs_lifts … HVU0 (Ⓣ) … L … HV12) -HVU0 -HV12 /2 width=3 by drops_isuni_fwd_drop2/ #X #H +<(lifts_mono … HU0 … H) -U0 -X /2 width=1 by or_intror/ qed-. -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, o] U. -#h #o #a #G #L #V1 #V #T #U #H #V2 #HV12 +lemma cpxs_fwd_theta: ∀h,o,p,G,L,V1,V,T,U. ⦃G, L⦄ ⊢ ⓐV1.ⓓ{p}V.T ⬈*[h] U → + ∀V2. ⬆*[1] V1 ≡ V2 → ⓐV1.ⓓ{p}V.T ⩳[h, o] U ∨ + ⦃G, L⦄ ⊢ ⓓ{p}V.ⓐV2.T ⬈*[h] U. +#h #o #p #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 +| #q #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 + elim (lifts_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 by cpxs_flat_dx, cpxs_bind_dx/ ] -T - @(cpxs_strap2 … (ⓐV1.ⓛ{b}W.T0)) [2: /2 width=1 by cpxs_beta_dx/ ] - /4 width=7 by cpx_zeta, lift_bind, lift_flat/ + @(cpxs_trans … (+ⓓV.ⓐV2.ⓛ{q}W2.T2)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T + @(cpxs_strap2 … (ⓐV1.ⓛ{q}W.T0)) [2: /2 width=1 by cpxs_beta_dx/ ] + /4 width=7 by cpx_zeta, lifts_bind, lifts_flat/ ] -| #b #V3 #V4 #V0 #T0 #HV13 #HV34 #HT0 #HU +| #q #V3 #V4 #V0 #T0 #HV13 #HV34 #HT0 #HU @or_intror @(cpxs_trans … HU) -U (**) (* explicit constructor *) elim (cpxs_inv_abbr1 … HT0) -HT0 * [ #V5 #T5 #HV5 #HT5 #H destruct - lapply (cpxs_lift … HV13 (L.ⓓV) … HV12 … HV34) -V1 -V3 - /3 width=2 by cpxs_flat, cpxs_bind, drop_drop/ + elim (cpxs_lifts … HV13 (Ⓣ) … (L.ⓓV) … HV12) -V1 /3 width=1 by drops_refl, drops_drop/ #X #H + <(lifts_mono … HV34 … H) -V3 -X /3 width=1 by cpxs_flat, cpxs_bind/ | #X #HT1 #H #H0 destruct - elim (lift_inv_bind1 … H) -H #V5 #T5 #HV05 #HT05 #H destruct - lapply (cpxs_lift … HV13 (L.ⓓV0) … HV12 … HV34) -V3 /2 width=2 by drop_drop/ #HV24 - @(cpxs_trans … (+ⓓV.ⓐV2.ⓓ{b}V5.T5)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T - @(cpxs_strap2 … (ⓐV1.ⓓ{b}V0.T0)) [ /4 width=7 by cpx_zeta, lift_bind, lift_flat/ ] -V -V5 -T5 - @(cpxs_strap2 … (ⓓ{b}V0.ⓐV2.T0)) /3 width=3 by cpxs_pair_sn, cpxs_bind_dx, cpr_cpx, cpr_theta/ + elim (lifts_inv_bind1 … H) -H #V5 #T5 #HV05 #HT05 #H destruct + elim (cpxs_lifts … HV13 (Ⓣ) … (L.ⓓV0) … HV12) -HV13 /3 width=1 by drops_refl, drops_drop/ #X #H + <(lifts_mono … HV34 … H) -V3 -X #HV24 + @(cpxs_trans … (+ⓓV.ⓐV2.ⓓ{q}V5.T5)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T + @(cpxs_strap2 … (ⓐV1.ⓓ{q}V0.T0)) [ /4 width=7 by cpx_zeta, lifts_bind, lifts_flat/ ] -V -V5 -T5 + @(cpxs_strap2 … (ⓓ{q}V0.ⓐV2.T0)) /3 width=3 by cpxs_pair_sn, cpxs_bind_dx, cpx_theta/ ] ] qed-. -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. +lemma cpxs_fwd_cast: ∀h,o,G,L,W,T,U. ⦃G, L⦄ ⊢ ⓝW.T ⬈*[h] U → + ∨∨ ⓝW. T ⩳[h, o] U | ⦃G, L⦄ ⊢ T ⬈*[h] U | ⦃G, L⦄ ⊢ W ⬈*[h] 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-. + +lemma cpxs_fwd_cnx: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃T⦄ → + ∀U. ⦃G, L⦄ ⊢ T ⬈*[h] U → T ⩳[h, o] U. +/3 width=4 by cpxs_inv_cnx1, tdeq_tsts/ qed-.