]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_ssta.ma
f6ef16c40b028d2f445bacd96d46cb24692e3aed
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / dynamic / lsubsv_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/equivalence/cpcs_cpcs.ma".
16 include "basic_2/dynamic/lsubsv_ldrop.ma".
17
18 (* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
19
20 (* Properties on stratified native type assignment **************************)
21
22 lemma lsubsv_ssta_trans: ∀h,g,L2,T,U2,l. ⦃h, L2⦄ ⊢ T •[g,l] U2 →
23                          ∀L1. h ⊢ L1 ⊩:⊑[g] L2 →
24                          ∃∃U1. L1 ⊢ U2 ⬌* U1 & ⦃h, L1⦄ ⊢ T •[g,l] U1.
25 #h #g #L2 #T #U2 #l #H elim H -L2 -T -U2 -l
26 [ #L2 #k #l #Hkl #L1 #_ /3 width=3/
27 | #L2 #K2 #V2 #W2 #U2 #i #l #HLK2 #_ #HWU2 #IHVW2 #L1 #HL12
28   elim (lsubsv_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
29   elim (lsubsv_inv_pair2 … H) -H *
30   [ #K1 #HK12 #H destruct
31     elim (IHVW2 … HK12) -K2 #W1 #HW21 #H
32     elim (lift_total W1 0 (i+1)) #U1 #HWU1
33     lapply (ldrop_fwd_ldrop2 … HLK1) /3 width=9/
34   | #K1 #V1 #W1 #l0 #_ #_ #_ #_ #_ #_ #H destruct
35   ]
36 | #L2 #K2 #W2 #V2 #U2 #i #l #HLK2 #_ #HWU2 #IHWV2 #L1 #HL12
37   elim (lsubsv_ldrop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
38   elim (lsubsv_inv_pair2 … H) -H *
39   [ #K1 #HK12 #H destruct
40     elim (IHWV2 … HK12) -K2 #V1 #_ #H -V2 /3 width=6/
41   | #K1 #W1 #V1 #l0 #HV1 #HVW1 #HW21 #HW2 #HK12 #H #_ destruct
42     elim (IHWV2 … HK12) -K2 #V #_ #H
43     elim (lift_total W1 0 (i+1)) #U1 #HWU1
44     lapply (ldrop_fwd_ldrop2 … HLK1) #HLK
45     @(ex2_intro … U1)
46     [ @(cpcs_lift … HLK … HWU2 … HWU1 HW21)
47     | @(ssta_ldef … HLK1 … HWU1) 
48   (*  
49     /3 width=9/
50   *)