X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Funfold%2Flstas.ma;h=289992d5f5640fb876df5693db42be4d76efe984;hb=c60524dec7ace912c416a90d6b926bee8553250b;hp=39a972c3f2c326b8160b4471ec81998563ee70e9;hpb=f10cfe417b6b8ec1c7ac85c6ecf5fb1b3fdf37db;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/unfold/lstas.ma b/matita/matita/contribs/lambdadelta/basic_2/unfold/lstas.ma index 39a972c3f..289992d5f 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/unfold/lstas.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/unfold/lstas.ma @@ -21,71 +21,71 @@ include "basic_2/static/sh.ma". (* activate genv *) inductive lstas (h): nat → relation4 genv lenv term term ≝ -| lstas_sort: ∀G,L,l,k. lstas h l G L (⋆k) (⋆((next h)^l k)) -| lstas_ldef: ∀G,L,K,V,W,U,i,l. ⬇[i] L ≡ K.ⓓV → lstas h l G K V W → - ⬆[0, i+1] W ≡ U → lstas h l G L (#i) U +| lstas_sort: ∀G,L,d,k. lstas h d G L (⋆k) (⋆((next h)^d k)) +| lstas_ldef: ∀G,L,K,V,W,U,i,d. ⬇[i] L ≡ K.ⓓV → lstas h d G K V W → + ⬆[0, i+1] W ≡ U → lstas h d G L (#i) U | lstas_zero: ∀G,L,K,W,V,i. ⬇[i] L ≡ K.ⓛW → lstas h 0 G K W V → lstas h 0 G L (#i) (#i) -| lstas_succ: ∀G,L,K,W,V,U,i,l. ⬇[i] L ≡ K.ⓛW → lstas h l G K W V → - ⬆[0, i+1] V ≡ U → lstas h (l+1) G L (#i) U -| lstas_bind: ∀a,I,G,L,V,T,U,l. lstas h l G (L.ⓑ{I}V) T U → - lstas h l G L (ⓑ{a,I}V.T) (ⓑ{a,I}V.U) -| lstas_appl: ∀G,L,V,T,U,l. lstas h l G L T U → lstas h l G L (ⓐV.T) (ⓐV.U) -| lstas_cast: ∀G,L,W,T,U,l. lstas h l G L T U → lstas h l G L (ⓝW.T) U +| lstas_succ: ∀G,L,K,W,V,U,i,d. ⬇[i] L ≡ K.ⓛW → lstas h d G K W V → + ⬆[0, i+1] V ≡ U → lstas h (d+1) G L (#i) U +| lstas_bind: ∀a,I,G,L,V,T,U,d. lstas h d G (L.ⓑ{I}V) T U → + lstas h d G L (ⓑ{a,I}V.T) (ⓑ{a,I}V.U) +| lstas_appl: ∀G,L,V,T,U,d. lstas h d G L T U → lstas h d G L (ⓐV.T) (ⓐV.U) +| lstas_cast: ∀G,L,W,T,U,d. lstas h d G L T U → lstas h d G L (ⓝW.T) U . interpretation "nat-iterated static type assignment (term)" - 'StaticTypeStar h G L l T U = (lstas h l G L T U). + 'StaticTypeStar h G L d T U = (lstas h d G L T U). (* Basic inversion lemmas ***************************************************) -fact lstas_inv_sort1_aux: ∀h,G,L,T,U,l. ⦃G, L⦄ ⊢ T •*[h, l] U → ∀k0. T = ⋆k0 → - U = ⋆((next h)^l k0). -#h #G #L #T #U #l * -G -L -T -U -l -[ #G #L #l #k #k0 #H destruct // -| #G #L #K #V #W #U #i #l #_ #_ #_ #k0 #H destruct +fact lstas_inv_sort1_aux: ∀h,G,L,T,U,d. ⦃G, L⦄ ⊢ T •*[h, d] U → ∀k0. T = ⋆k0 → + U = ⋆((next h)^d k0). +#h #G #L #T #U #d * -G -L -T -U -d +[ #G #L #d #k #k0 #H destruct // +| #G #L #K #V #W #U #i #d #_ #_ #_ #k0 #H destruct | #G #L #K #W #V #i #_ #_ #k0 #H destruct -| #G #L #K #W #V #U #i #l #_ #_ #_ #k0 #H destruct -| #a #I #G #L #V #T #U #l #_ #k0 #H destruct -| #G #L #V #T #U #l #_ #k0 #H destruct -| #G #L #W #T #U #l #_ #k0 #H destruct +| #G #L #K #W #V #U #i #d #_ #_ #_ #k0 #H destruct +| #a #I #G #L #V #T #U #d #_ #k0 #H destruct +| #G #L #V #T #U #d #_ #k0 #H destruct +| #G #L #W #T #U #d #_ #k0 #H destruct qed-. (* Basic_1: was just: sty0_gen_sort *) -lemma lstas_inv_sort1: ∀h,G,L,X,k,l. ⦃G, L⦄ ⊢ ⋆k •*[h, l] X → X = ⋆((next h)^l k). +lemma lstas_inv_sort1: ∀h,G,L,X,k,d. ⦃G, L⦄ ⊢ ⋆k •*[h, d] X → X = ⋆((next h)^d k). /2 width=5 by lstas_inv_sort1_aux/ qed-. -fact lstas_inv_lref1_aux: ∀h,G,L,T,U,l. ⦃G, L⦄ ⊢ T •*[h, l] U → ∀j. T = #j → ∨∨ - (∃∃K,V,W. ⬇[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, l] W & +fact lstas_inv_lref1_aux: ∀h,G,L,T,U,d. ⦃G, L⦄ ⊢ T •*[h, d] U → ∀j. T = #j → ∨∨ + (∃∃K,V,W. ⬇[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, d] W & ⬆[0, j+1] W ≡ U ) | (∃∃K,W,V. ⬇[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V & - U = #j & l = 0 + U = #j & d = 0 ) | - (∃∃K,W,V,l0. ⬇[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, l0] V & - ⬆[0, j+1] V ≡ U & l = l0+1 + (∃∃K,W,V,d0. ⬇[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, d0] V & + ⬆[0, j+1] V ≡ U & d = d0+1 ). -#h #G #L #T #U #l * -G -L -T -U -l -[ #G #L #l #k #j #H destruct -| #G #L #K #V #W #U #i #l #HLK #HVW #HWU #j #H destruct /3 width=6 by or3_intro0, ex3_3_intro/ +#h #G #L #T #U #d * -G -L -T -U -d +[ #G #L #d #k #j #H destruct +| #G #L #K #V #W #U #i #d #HLK #HVW #HWU #j #H destruct /3 width=6 by or3_intro0, ex3_3_intro/ | #G #L #K #W #V #i #HLK #HWV #j #H destruct /3 width=5 by or3_intro1, ex4_3_intro/ -| #G #L #K #W #V #U #i #l #HLK #HWV #HWU #j #H destruct /3 width=8 by or3_intro2, ex4_4_intro/ -| #a #I #G #L #V #T #U #l #_ #j #H destruct -| #G #L #V #T #U #l #_ #j #H destruct -| #G #L #W #T #U #l #_ #j #H destruct +| #G #L #K #W #V #U #i #d #HLK #HWV #HWU #j #H destruct /3 width=8 by or3_intro2, ex4_4_intro/ +| #a #I #G #L #V #T #U #d #_ #j #H destruct +| #G #L #V #T #U #d #_ #j #H destruct +| #G #L #W #T #U #d #_ #j #H destruct ] qed-. -lemma lstas_inv_lref1: ∀h,G,L,X,i,l. ⦃G, L⦄ ⊢ #i •*[h, l] X → ∨∨ - (∃∃K,V,W. ⬇[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, l] W & +lemma lstas_inv_lref1: ∀h,G,L,X,i,d. ⦃G, L⦄ ⊢ #i •*[h, d] X → ∨∨ + (∃∃K,V,W. ⬇[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, d] W & ⬆[0, i+1] W ≡ X ) | (∃∃K,W,V. ⬇[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V & - X = #i & l = 0 + X = #i & d = 0 ) | - (∃∃K,W,V,l0. ⬇[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, l0] V & - ⬆[0, i+1] V ≡ X & l = l0+1 + (∃∃K,W,V,d0. ⬇[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, d0] V & + ⬆[0, i+1] V ≡ X & d = d0+1 ). /2 width=3 by lstas_inv_lref1_aux/ qed-. @@ -98,89 +98,89 @@ lemma lstas_inv_lref1_O: ∀h,G,L,X,i. ⦃G, L⦄ ⊢ #i •*[h, 0] X → X = #i ). #h #G #L #X #i #H elim (lstas_inv_lref1 … H) -H * /3 width=6 by ex3_3_intro, or_introl, or_intror/ -#K #W #V #l #_ #_ #_