]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_dx.ma
trace added in a failing invocation of auto :-(
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / dynamic / snv_ltpss_dx.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/dxprs_ltpss_dx.ma".
16 include "basic_2/equivalence/cpcs_ltpss_dx.ma".
17 include "basic_2/dynamic/snv_lift.ma".
18
19 (* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
20
21 (* Properties about dx parallel unfold **************************************)
22
23 lemma snv_ltpss_dx_tpss_conf: ∀h,g,L1,T1. ⦃h, L1⦄ ⊩ T1 :[g] →
24                               ∀L2,d,e. L1 ▶* [d, e] L2 →
25                               ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → ⦃h, L2⦄ ⊩ T2 :[g].
26 #h #g #L1 #T1 #H elim H -L1 -T1
27 [ #L1 #k #L2 #d #e #_ #X #H
28    >(tpss_inv_sort1 … H) -X //
29 | #I #L1 #K1 #V1 #i #HLK1 #HV1 #IHV1 #L2 #d #e #HL12 #X #H
30   elim (tpss_inv_lref1 … H) -H
31   [ #H destruct
32     elim (lt_or_ge i d) #Hdi [ | elim (lt_or_ge i (d + e)) #Hide ]
33     [ elim (ltpss_dx_ldrop_conf_le … HL12 … HLK1 …) -L1 /2 width=2/ #X #H #HLK2
34       elim (ltpss_dx_inv_tpss11 … H …) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
35       lapply (IHV1 … HK12 … HV12) -IHV1 -HK12 -HV12 /2 width=5/
36     | elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 …) -L1 // /2 width=2/ #X #H #HLK2
37       elim (ltpss_dx_inv_tpss21 … H …) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
38       lapply (IHV1 … HK12 … HV12) -IHV1 -HK12 -HV12 /2 width=5/
39     | lapply (ltpss_dx_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /2 width=5/
40     ]
41   | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
42     elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 …) -L1 // /2 width=2/ #X #H1 #H2
43     elim (ltpss_dx_inv_tpss21 … H1 …) -H1 /2 width=1/ #K0 #V0 #HK12 #HV12 #H destruct
44     lapply (ldrop_mono … H2 … HLK2) -H2 #H destruct
45     lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
46     lapply (tpss_trans_eq … HV12 HVW2) -V2 #HV1W2
47     lapply (IHV1 … HK12 … HV1W2) -IHV1 -HK12 -HV1W2 /2 width=7/
48   ]
49 | #a #I #L1 #V1 #T1 #_ #_ #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
50   elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
51   lapply (IHV1 … HL12 … HV12) -IHV1 #HV2
52   lapply (IHT1 … HT12) -IHT1 -HT12 /2 width=1/
53 | #a #L1 #V1 #W1 #W0 #T1 #U1 #l #_ #_ #HVW1 #HW10 #HTU1 #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
54   elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
55   lapply (IHV1 … HL12 … HV12) -IHV1 #HV2
56   lapply (IHT1 … HT12) -IHT1 /2 width=1/ #HT2
57   elim (ssta_ltpss_dx_tpss_conf … HVW1 … HL12 … HV12) -V1 #W2 #HVW2 #HW12
58   elim (dxprs_ltpss_dx_tpss_conf … HTU1 … HL12 … HT12) -T1 #X #HTU2 #H
59   elim (tpss_inv_bind1 … H) -H #W #U2 #HW0 #_ #H -U1 destruct
60   elim (cprs_ltpss_dx_tpss2_conf … HW10 … HL12 … HW12 … HW0) -L1 -W1 -W0 #W0 #HW20 #HW0
61   lapply (dxprs_strap1 … (ⓛ{a}W0.U2) HTU2 ?) -HTU2 /3 width=3/ -HW0 /2 width=8/
62 | #L1 #W1 #T1 #U1 #l #_ #_ #HTU1 #HUW1 #IHW1 #IHT1 #L2 #d #e #HL12 #X #H
63   elim (tpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
64   lapply (IHW1 … HL12 … HW12) -IHW1 #HW2
65   lapply (IHT1 … HL12 … HT12) -IHT1 #HT2
66   elim (ssta_ltpss_dx_tpss_conf … HTU1 … HL12 … HT12) -T1 #U2 #HTU2 #HU12
67   lapply (cpcs_ltpss_dx_tpss2_conf … HL12 … HUW1 … HU12 … HW12) -L1 -W1 -U1 /2 width=4/
68 ]
69 qed-.
70
71 lemma snv_ltpss_dx_conf: ∀h,g,L1,T. ⦃h, L1⦄ ⊩ T :[g] →
72                          ∀L2,d,e. L1 ▶* [d, e] L2 → ⦃h, L2⦄ ⊩ T :[g].
73 #h #g #L1 #T #HT #L2 #d #e #HL12
74 @(snv_ltpss_dx_tpss_conf … HT … HL12) //
75 qed-.
76
77 lemma snv_tpss_conf: ∀h,g,L,T1. ⦃h, L⦄ ⊩ T1 :[g] →
78                      ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 → ⦃h, L⦄ ⊩ T2 :[g].
79 #h #g #L #T1 #HT1 #T2 #d #e #HT12
80 @(snv_ltpss_dx_tpss_conf … HT1 … HT12) //
81 qed-.
82
83 lemma snv_tps_conf: ∀h,g,L,T1. ⦃h, L⦄ ⊩ T1 :[g] →
84                     ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 → ⦃h, L⦄ ⊩ T2 :[g].
85 #h #g #L #T1 #HT1 #T2 #d #e #HT12
86 @(snv_tpss_conf … HT1 T2) /2 width=3/
87 qed-.