]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/lsubss_ssta.ma
- lambda_delta: programmed renaming to lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / lsubss_ssta.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "basic_2/static/ssta_lift.ma".
16 include "basic_2/static/ssta_ssta.ma".
17 include "basic_2/static/lsubss_ldrop.ma".
18
19 (* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED STATIC TYPE ASSIGNMENT *******)
20
21 (* Properties concerning stratified native type assignment ******************)
22
23 lemma lsubss_ssta_trans: ∀h,g,L2,T,U,l. ⦃h, L2⦄ ⊢ T •[g,l] U →
24                          ∀L1. h ⊢ L1 •⊑[g] L2 → ⦃h, L1⦄ ⊢ T •[g,l] U.
25 #h #g #L2 #T #U #l #H elim H -L2 -T -U -l
26 [ /2 width=1/
27 | #L2 #K2 #V2 #W2 #U2 #i #l #HLK2 #_ #HWU2 #IHVW2 #L1 #HL12
28   elim (lsubss_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
29   elim (lsubss_inv_pair2 … H) -H * #K1 [ | -HWU2 -IHVW2 -HLK1 ]
30   [ #HK12 #H destruct /3 width=6/
31   | #V1 #l0 #_ #_ #_ #_ #H destruct
32   ]
33 | #L2 #K2 #W2 #V2 #U2 #i #l #HLK2 #HWV2 #HWU2 #IHWV2 #L1 #HL12
34   elim (lsubss_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
35   elim (lsubss_inv_pair2 … H) -H * #K1 [ -HWV2 | -IHWV2 ]
36   [ #HK12 #H destruct /3 width=6/
37   | #V1 #l0 #H1 #H2 #_ #H #_ destruct
38     elim (ssta_fwd_correct … H2) -H2 #V #H
39     elim (ssta_mono … HWV2 … H) -HWV2 -H /2 width=6/
40   ]
41 | /4 width=1/
42 | /3 width=1/
43 | /3 width=1/
44 ]
45 qed.
46
47 lemma lsubss_ssta_conf: ∀h,g,L1,T,U,l. ⦃h, L1⦄ ⊢ T •[g,l] U →
48                         ∀L2. h ⊢ L1 •⊑[g] L2 → ⦃h, L2⦄ ⊢ T •[g,l] U.
49 #h #g #L1 #T #U #l #H elim H -L1 -T -U -l
50 [ /2 width=1/
51 | #L1 #K1 #V1 #W1 #U1 #i #l #HLK1 #HVW1 #HWU1 #IHVW1 #L2 #HL12
52   elim (lsubss_ldrop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2
53   elim (lsubss_inv_pair1 … H) -H * #K2 [ -HVW1 | -IHVW1 ]
54   [ #HK12 #H destruct /3 width=6/
55   | #V2 #l0 #H1 #H2 #_ #H #_ destruct
56     elim (ssta_mono … HVW1 … H1) -HVW1 -H1 #H1 #H2 destruct
57     elim (ssta_fwd_correct … H2) -H2 /2 width=6/
58   ]
59 | #L1 #K1 #W1 #V1 #U1 #i #l #HLK1 #_ #HWU1 #IHWV1 #L2 #HL12
60   elim (lsubss_ldrop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2
61   elim (lsubss_inv_pair1 … H) -H * #K2 [ | -HWU1 -IHWV1 -HLK2 ]
62   [ #HK12 #H destruct /3 width=6/
63   | #V2 #l0 #_ #_ #_ #_ #H destruct
64   ]
65 | /4 width=1/
66 | /3 width=1/
67 | /3 width=1/
68 ]
69 qed.