]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubsv_snv.ma
lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / dynamic / lsubsv_snv.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/computation/cpds_cpds.ma".
16 include "basic_2/dynamic/lsubsv_cpds.ma".
17 include "basic_2/dynamic/lsubsv_cpcs.ma".
18
19 (* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
20
21 (* Properties concerning stratified native validity *************************)
22
23 fact snv_lsubsv_aux: ∀h,g,L0,T0.
24                      (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_cpr_lpr h g L1 T1) →
25                      (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_cpr_lpr h g L1 T1) →
26                      (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_ssta h g L1 T1) →
27                      (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_lsubsv h g L1 T1) →
28                      ∀L1,T1. L0 = L1 → T0 = T1 → IH_snv_lsubsv h g L1 T1.
29 #h #g #L0 #T0 #IH4 #IH3 #IH2 #IH1 #L2 * * [||||*] //
30 [ #i #HL0 #HT0 #H #L1 #HL12 destruct -IH4 -IH3 -IH2
31   elim (snv_inv_lref … H) -H #I2 #K2 #W2 #HLK2 #HW2
32   elim (lsubsv_ldrop_O1_trans … HL12 … HLK2) -HL12 #X #H #HLK1
33   elim (lsubsv_inv_pair2 … H) -H * #K1
34   [ #HK12 #H destruct
35     /5 width=8 by snv_lref, fsupp_ygt, fsupp_lref/ (**) (* auto too slow without trace *)
36   | #V #W1 #V2 #l #HV #_ #_ #_ #_ #_ #H destruct /2 width=5/
37   ]
38 | #p #HL0 #HT0 #H #L1 #HL12 destruct -IH4 -IH3 -IH2 -IH1
39   elim (snv_inv_gref … H)
40 | #a #I #V #T #HL0 #HT0 #H #L1 #HL12 destruct -IH4 -IH3 -IH2
41   elim (snv_inv_bind … H) -H /4 width=4/
42 | #V #T #HL0 #HT0 #H #L1 #HL12 destruct
43   elim (snv_inv_appl … H) -H #a #W #W0 #U #l #HV #HT #HVW #HW0 #HTU
44   lapply (lsubsv_cprs_trans … HL12 … HW0) -HW0 #HW0
45   elim (lsubsv_ssta_trans … HVW … HL12) -HVW #W1 #HVW1 #HW1
46   lapply (cpcs_cprs_strap1 … HW1 … HW0) -W #HW10
47   elim (lsubsv_cpds_aux … IH4 IH3 IH2 IH1 … HL12 … HTU) -IH4 -IH3 -IH2 -HTU // /2 width=1/ #X #HTU #H
48   elim (cprs_inv_abst1 … H) -H #W #U2 #HW0 #HU2 #H destruct
49   lapply (cpcs_cprs_strap1 … HW10 … HW0) -W0 #H
50   elim (cpcs_inv_cprs … H) -H #W0 #HW10 #HW0
51   lapply (cpds_cprs_trans … (ⓛ{a}W0.U2) HTU ?) [ /2 width=1/ ] -HTU -HW0
52   /4 width=8 by snv_appl, fsupp_ygt/ (**) (* auto too slow without trace *)
53 | #W #T #HL0 #HT0 #H #L1 #HL12 destruct -IH4 -IH3 -IH2
54   elim (snv_inv_cast … H) -H #U #l #HW #HT #HTU #HUW
55   lapply (lsubsv_cpcs_trans … HL12 … HUW) -HUW #HUW
56   elim (lsubsv_ssta_trans … HTU … HL12) -HTU #U0 #HTU0 #HU0
57   lapply (cpcs_trans … HU0 … HUW) -U /4 width=4 by snv_cast, fsupp_ygt/ (**) (* auto too slow without trace *)
58 ]
59 qed-.