X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Fstatic%2Flsubr.ma;h=352626ccd8f4d7051afad29b3a8117b6a357e7ad;hb=fed8c1a61273b0eb4a719fda70e2b5dd31933c8a;hp=111da17511225ed78d90f289af41e88278639910;hpb=43282d3750af8831c8100c60d75c56fdfb7ff3c9;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lsubr.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lsubr.ma index 111da1751..352626ccd 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lsubr.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/static/lsubr.ma @@ -13,9 +13,9 @@ (**************************************************************************) include "basic_2/notation/relations/lrsubeqc_2.ma". -include "basic_2/substitution/drop.ma". +include "basic_2/syntax/lenv.ma". -(* RESTRICTED LOCAL ENVIRONMENT REFINEMENT **********************************) +(* RESTRICTED REFINEMENT FOR LOCAL ENVIRONMENTS *****************************) inductive lsubr: relation lenv ≝ | lsubr_atom: ∀L. lsubr L (⋆) @@ -24,7 +24,7 @@ inductive lsubr: relation lenv ≝ . interpretation - "local environment refinement (restricted)" + "restricted refinement (local environment)" 'LRSubEqC L1 L2 = (lsubr L1 L2). (* Basic properties *********************************************************) @@ -58,50 +58,46 @@ lemma lsubr_inv_abst1: ∀K1,L2,W. K1.ⓛW ⫃ L2 → L2 = ⋆ ∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓛW. /2 width=3 by lsubr_inv_abst1_aux/ qed-. -fact lsubr_inv_abbr2_aux: ∀L1,L2. L1 ⫃ L2 → ∀K2,W. L2 = K2.ⓓW → - ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓓW. +fact lsubr_inv_pair2_aux: ∀L1,L2. L1 ⫃ L2 → ∀I,K2,W. L2 = K2.ⓑ{I}W → + (∃∃K1. K1 ⫃ K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V & I = Abst. #L1 #L2 * -L1 -L2 -[ #L #K2 #W #H destruct -| #I #L1 #L2 #V #HL12 #K2 #W #H destruct /2 width=3 by ex2_intro/ -| #L1 #L2 #V1 #V2 #_ #K2 #W #H destruct +[ #L #J #K2 #W #H destruct +| #I #L1 #L2 #V #HL12 #J #K2 #W #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #V1 #V2 #HL12 #J #K2 #W #H destruct /3 width=4 by ex3_2_intro, or_intror/ ] qed-. -lemma lsubr_inv_abbr2: ∀L1,K2,W. L1 ⫃ K2.ⓓW → - ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓓW. -/2 width=3 by lsubr_inv_abbr2_aux/ qed-. +lemma lsubr_inv_pair2: ∀I,L1,K2,W. L1 ⫃ K2.ⓑ{I}W → + (∃∃K1. K1 ⫃ K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V1. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V1 & I = Abst. +/2 width=3 by lsubr_inv_pair2_aux/ qed-. -(* Basic forward lemmas *****************************************************) +(* Advanced inversion lemmas ************************************************) -lemma lsubr_fwd_length: ∀L1,L2. L1 ⫃ L2 → |L2| ≤ |L1|. -#L1 #L2 #H elim H -L1 -L2 /2 width=1 by monotonic_le_plus_l/ +lemma lsubr_inv_abbr2: ∀L1,K2,V. L1 ⫃ K2.ⓓV → + ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓓV. +#L1 #K2 #V #H elim (lsubr_inv_pair2 … H) -H * +[ #K1 #HK12 #H destruct /2 width=3 by ex2_intro/ +| #K1 #V1 #_ #_ #H destruct +] qed-. -lemma lsubr_fwd_drop2_pair: ∀L1,L2. L1 ⫃ L2 → - ∀I,K2,W,s,i. ⬇[s, 0, i] L2 ≡ K2.ⓑ{I}W → - (∃∃K1. K1 ⫃ K2 & ⬇[s, 0, i] L1 ≡ K1.ⓑ{I}W) ∨ - ∃∃K1,V. K1 ⫃ K2 & ⬇[s, 0, i] L1 ≡ K1.ⓓⓝW.V & I = Abst. -#L1 #L2 #H elim H -L1 -L2 -[ #L #I #K2 #W #s #i #H - elim (drop_inv_atom1 … H) -H #H destruct -| #J #L1 #L2 #V #HL12 #IHL12 #I #K2 #W #s #i #H - elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ] - [ /3 width=3 by drop_pair, ex2_intro, or_introl/ - | elim (IHL12 … HLK2) -IHL12 -HLK2 * - /4 width=4 by drop_drop_lt, ex3_2_intro, ex2_intro, or_introl, or_intror/ - ] -| #L1 #L2 #V1 #V2 #HL12 #IHL12 #I #K2 #W #s #i #H - elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ] - [ /3 width=4 by drop_pair, ex3_2_intro, or_intror/ - | elim (IHL12 … HLK2) -IHL12 -HLK2 * - /4 width=4 by drop_drop_lt, ex3_2_intro, ex2_intro, or_introl, or_intror/ - ] +lemma lsubr_inv_abst2: ∀L1,K2,W. L1 ⫃ K2.ⓛW → + (∃∃K1. K1 ⫃ K2 & L1 = K1.ⓛW) ∨ + ∃∃K1,V. K1 ⫃ K2 & L1 = K1.ⓓⓝW.V. +#L1 #K2 #W #H elim (lsubr_inv_pair2 … H) -H * +[ #K1 #HK12 #H destruct /3 width=3 by ex2_intro, or_introl/ +| #K1 #V1 #HK12 #H #_ destruct /3 width=4 by ex2_2_intro, or_intror/ ] qed-. -lemma lsubr_fwd_drop2_abbr: ∀L1,L2. L1 ⫃ L2 → - ∀K2,V,s,i. ⬇[s, 0, i] L2 ≡ K2.ⓓV → - ∃∃K1. K1 ⫃ K2 & ⬇[s, 0, i] L1 ≡ K1.ⓓV. -#L1 #L2 #HL12 #K2 #V #s #i #HLK2 elim (lsubr_fwd_drop2_pair … HL12 … HLK2) -L2 // * -#K1 #W #_ #_ #H destruct +(* Basic forward lemmas *****************************************************) + +lemma lsubr_fwd_pair2: ∀I2,L1,K2,V2. L1 ⫃ K2.ⓑ{I2}V2 → + ∃∃I1,K1,V1. K1 ⫃ K2 & L1 = K1.ⓑ{I1}V1. +#I2 #L1 #K2 #V2 #H elim (lsubr_inv_pair2 … H) -H * +[ #K1 #HK12 #H destruct /3 width=5 by ex2_3_intro/ +| #K1 #V1 #HK12 #H1 #H2 destruct /3 width=5 by ex2_3_intro/ +] qed-.