X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Frt_computation%2Fcsx.ma;h=13db8d1f3a1c9f74e48deedad6e9d6f73ea2091f;hb=3c7b4071a9ac096b02334c1d47468776b948e2de;hp=0def9956806acaeb92766c53240ae6c147c4b4c7;hpb=e9f96fa56226dfd74de214c89d827de0c5018ac7;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma index 0def99568..13db8d1f3 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma @@ -12,117 +12,91 @@ (* *) (**************************************************************************) -include "basic_2/notation/relations/sn_5.ma". -include "basic_2/reduction/cnx.ma". +include "basic_2/notation/relations/predtystrong_3.ma". +include "static_2/syntax/teqx.ma". +include "basic_2/rt_transition/cpx.ma". -(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) +(* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********) -definition csx: ∀h. sd h → relation3 genv lenv term ≝ - λh,o,G,L. SN … (cpx h o G L) (eq …). +definition csx (G) (L): predicate term ≝ + SN … (cpx G L) teqx. interpretation - "context-sensitive extended strong normalization (term)" - 'SN h o G L T = (csx h o G L T). + "strong normalization for extended context-sensitive parallel rt-transition (term)" + 'PRedTyStrong G L T = (csx G L T). (* Basic eliminators ********************************************************) -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, o] T → R T. -#h #o #G #L #R #H0 #T1 #H elim H -T1 +lemma csx_ind (G) (L) (Q:predicate …): + (∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 → + (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≛ T2 → ⊥) → Q T2) → + Q T1 + ) → + ∀T. ❪G,L❫ ⊢ ⬈*𝐒 T → Q T. +#G #L #Q #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,o,G,L,T1. - (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, o] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, o] T2) → - ⦃G, L⦄ ⊢ ⬊*[h, o] T1. +lemma csx_intro (G) (L): + ∀T1. (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≛ T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 T2) → + ❪G,L❫ ⊢ ⬈*𝐒 T1. /4 width=1 by SN_intro/ qed. -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,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,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/ -] -qed. - -(* Basic_1: was just: sn3_cast *) -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 - elim (eq_false_inv_tpair_sn … H2) -H2 - [ /3 width=3 by csx_cpx_trans/ - | -HLW0 * #H destruct /3 width=1 by/ - ] -|2,3: /3 width=3 by csx_cpx_trans/ -] -qed. - (* Basic forward lemmas *****************************************************) -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 +fact csx_fwd_pair_sn_aux (G) (L): + ∀U. ❪G,L❫ ⊢ ⬈*𝐒 U → + ∀I,V,T. U = ②[I]V.T → ❪G,L❫ ⊢ ⬈*𝐒 V. +#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/ +@(IH (②[I]V2.T)) -IH /2 width=3 by cpx_pair_sn/ -HLV2 #H +elim (teqx_inv_pair … H) -H /2 width=1 by/ qed-. (* Basic_1: was just: sn3_gen_head *) -lemma csx_fwd_pair_sn: ∀h,o,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, o] ②{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, o] V. +lemma csx_fwd_pair_sn (G) (L): + ∀I,V,T. ❪G,L❫ ⊢ ⬈*𝐒 ②[I]V.T → ❪G,L❫ ⊢ ⬈*𝐒 V. /2 width=5 by csx_fwd_pair_sn_aux/ qed-. -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 +fact csx_fwd_bind_dx_aux (G) (L): + ∀U. ❪G,L❫ ⊢ ⬈*𝐒 U → + ∀p,I,V,T. U = ⓑ[p,I]V.T → ❪G,L.ⓑ[I]V❫ ⊢ ⬈*𝐒 T. +#G #L #U #H elim H -H #U0 #_ #IH #p #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/ +@(IH (ⓑ[p, I]V.T2)) -IH /2 width=3 by cpx_bind/ -HLT2 #H +elim (teqx_inv_pair … H) -H /2 width=1 by/ qed-. (* Basic_1: was just: sn3_gen_bind *) -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. +lemma csx_fwd_bind_dx (G) (L): + ∀p,I,V,T. ❪G,L❫ ⊢ ⬈*𝐒 ⓑ[p,I]V.T → ❪G,L.ⓑ[I]V❫ ⊢ ⬈*𝐒 T. /2 width=4 by csx_fwd_bind_dx_aux/ qed-. -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 +fact csx_fwd_flat_dx_aux (G) (L): + ∀U. ❪G,L❫ ⊢ ⬈*𝐒 U → + ∀I,V,T. U = ⓕ[I]V.T → ❪G,L❫ ⊢ ⬈*𝐒 T. +#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/ +@(IH (ⓕ[I]V.T2)) -IH /2 width=3 by cpx_flat/ -HLT2 #H +elim (teqx_inv_pair … H) -H /2 width=1 by/ qed-. (* Basic_1: was just: sn3_gen_flat *) -lemma csx_fwd_flat_dx: ∀h,o,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, o] ⓕ{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, o] T. +lemma csx_fwd_flat_dx (G) (L): + ∀I,V,T. ❪G,L❫ ⊢ ⬈*𝐒 ⓕ[I]V.T → ❪G,L❫ ⊢ ⬈*𝐒 T. /2 width=5 by csx_fwd_flat_dx_aux/ qed-. -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. +lemma csx_fwd_bind (G) (L): + ∀p,I,V,T. ❪G,L❫ ⊢ ⬈*𝐒 ⓑ[p,I]V.T → + ∧∧ ❪G,L❫ ⊢ ⬈*𝐒 V & ❪G,L.ⓑ[I]V❫ ⊢ ⬈*𝐒 T. /3 width=3 by csx_fwd_pair_sn, csx_fwd_bind_dx, conj/ qed-. -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. +lemma csx_fwd_flat (G) (L): + ∀I,V,T. ❪G,L❫ ⊢ ⬈*𝐒 ⓕ[I]V.T → + ∧∧ ❪G,L❫ ⊢ ⬈*𝐒 V & ❪G,L❫ ⊢ ⬈*𝐒 T. /3 width=3 by csx_fwd_pair_sn, csx_fwd_flat_dx, conj/ qed-. (* Basic_1: removed theorems 14: @@ -131,3 +105,7 @@ lemma csx_fwd_flat: ∀h,o,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, o] ⓕ{I}V.T → sn3_appl_cast sn3_appl_beta sn3_appl_lref sn3_appl_abbr sn3_appl_appls sn3_bind sn3_appl_bind sn3_appls_bind *) +(* Basic_2A1: removed theorems 6: + csxa_ind csxa_intro csxa_cpxs_trans csxa_intro_cpx + csx_csxa csxa_csx +*)