]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc_2A1/cpr/sta_ltpss.etc
update in binaries for λδ
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc_2A1 / cpr / sta_ltpss.etc
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/unfold/tpss_tpss.ma".
16 include "basic_2/unfold/ltpss_tpss.ma".
17 include "basic_2/static/sta_lift.ma".
18
19 (* STATIC TYPE ASSIGNMENT ON TERMS ******************************************)
20
21 (* Properties about parallel unfold *****************************************)
22
23 lemma sta_ltpss_tpss_conf: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 • U1 →
24                            ∀L2,d,e. L1 ▶* [d, e] L2 →
25                            ∀T2. L2 ⊢ T1 ▶* [d, e] T2 →
26                            ∃∃U2. ⦃h, L2⦄ ⊢ T2 • U2 & L2 ⊢ U1 ▶* [d, e] U2.
27 #h #L1 #T1 #U #H elim H -L1 -T1 -U
28 [ #L1 #k1 #L2 #d #e #_ #T2 #H
29   >(tpss_inv_sort1 … H) -H /2 width=3/
30 | #L1 #K1 #V1 #W1 #U1 #i #HLK1 #HVW1 #HWU1 #IHVW1 #L2 #d #e #HL12 #T2 #H
31   elim (tpss_inv_lref1 … H) -H [ | -HVW1 ]
32   [ #H destruct
33     elim (lt_or_ge i d) #Hdi [ -HVW1 | ]
34     [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
35       elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
36       elim (IHVW1 … HK12 … HV12) -IHVW1 -HK12 -HV12 #W2 #HVW2 #HW12
37       lapply (ldrop_fwd_ldrop2 … HLK2) #H
38       elim (lift_total W2 0 (i+1)) #U2 #HWU2
39       lapply (tpss_lift_ge … HW12 … H … HWU1 … HWU2) // -HW12 -H -HWU1
40       >minus_plus <plus_minus_m_m // -Hdi /3 width=6/
41     | elim (lt_or_ge i (d + e)) #Hide [ -HVW1 | -Hdi -IHVW1 ]
42       [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
43         elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
44         elim (IHVW1 … HK12 … HV12) -IHVW1 -HK12 -HV12 #W2 #HVW2 #HW12
45         lapply (ldrop_fwd_ldrop2 … HLK2) #H
46         elim (lift_total W2 0 (i+1)) #U2 #HWU2
47         lapply (tpss_lift_ge … HW12 … H … HWU1 … HWU2) // -HW12 -H -HWU1 >minus_plus #H
48         lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /3 width=6/
49       | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=6/
50       ]
51     ]
52   | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
53     elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
54     elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ #K0 #V0 #HK12 #HV12 #H destruct
55     lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 #H destruct
56     lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
57     lapply (tpss_trans_eq … HV12 HVW2) -V2 #HV1W2
58     elim (IHVW1 … HK12 … HV1W2) -IHVW1 -HK12 -HV1W2 #V2 #HWV2 #HW1V2
59     elim (lift_total V2 0 (i+1)) #U2 #HVU2
60     lapply (sta_lift … HWV2 … HLK2 … HWT2 … HVU2) -HWV2 -HWT2 #HTU2
61     lapply (tpss_lift_ge … HW1V2 … HLK2 … HWU1 … HVU2) // -HW1V2 -HLK2 -HWU1 -HVU2 >minus_plus #H
62     lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /2 width=3/
63   ]
64 | #L1 #K1 #W1 #V1 #U1 #i #HLK1 #HWV1 #HWU1 #IHWV1 #L2 #d #e #HL12 #T2 #H
65   elim (tpss_inv_lref1 … H) -H [ | -HWV1 -HWU1 -IHWV1 ]
66   [ #H destruct
67     elim (lt_or_ge i d) #Hdi [ -HWV1 ]
68     [ elim (ltpss_ldrop_conf_le … HL12 … HLK1 ?) -L1 /2 width=2/ #X #H #HLK2
69       elim (ltpss_inv_tpss11 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
70       elim (IHWV1 … HK12 … HW12) -IHWV1 -HK12 #V2 #HWV2 #_
71       lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
72       elim (lift_total W2 0 (i+1)) #U2 #HWU2
73       lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) // -HW12 -HLK -HWU1
74       >minus_plus <plus_minus_m_m // -Hdi /3 width=6/
75     | elim (lt_or_ge i (d + e)) #Hide [ -HWV1 | -IHWV1 -Hdi ]
76       [ elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HLK2
77         elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ #K2 #W2 #HK12 #HW12 #H destruct
78         elim (IHWV1 … HK12 … HW12) -IHWV1 -HK12 #V2 #HWV2 #_
79         lapply (ldrop_fwd_ldrop2 … HLK2) #HLK
80         elim (lift_total W2 0 (i+1)) #U2 #HWU2
81         lapply (tpss_lift_ge … HW12 … HLK … HWU1 … HWU2) // -HW12 -HLK -HWU1 >minus_plus #H
82         lapply (tpss_weak … H d e ? ?) [1,2: normalize [ >commutative_plus <plus_minus_m_m // | /2 width=1/ ]] -Hdi -Hide /3 width=6/
83       | lapply (ltpss_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /3 width=6/
84       ]
85     ]
86   | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #_ #_
87     elim (ltpss_ldrop_conf_be … HL12 … HLK1 ? ?) -L1 // /2 width=2/ #X #H #HL2K0
88     elim (ltpss_inv_tpss21 … H ?) -H /2 width=1/ -Hdi -Hide #K0 #V0 #_ #_ #H destruct
89     lapply (ldrop_mono … HL2K0 … HLK2) -HL2K0 -HLK2 #H destruct
90   ]
91 | #I #L1 #V1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL12 #X #H
92   elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
93   elim (IHTU1 … HT12) -IHTU1 -HT12 /2 width=1/ -HL12 /3 width=5/
94 | #L1 #V1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL12 #X #H
95   elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
96   elim (IHTU1 … HT12) -IHTU1 -HT12 // -HL12 /3 width=5/
97 | #L1 #W1 #T1 #U1 #_ #IHTU1 #L2 #d #e #HL12 #X #H
98   elim (tpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
99   elim (IHTU1 … HT12) -IHTU1 -HT12 // -HL12 /3 width=3/
100 ]
101 qed.
102
103 lemma sta_ltpss_tps_conf: ∀h,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 • U1 →
104                           ∀L2,d,e. L1 ▶* [d, e] L2 →
105                           ∀T2. L2 ⊢ T1 ▶ [d, e] T2 →
106                           ∃∃U2. ⦃h, L2⦄ ⊢ T2 • U2 & L2 ⊢ U1 ▶* [d, e] U2.
107 /3 width=5/ qed.
108
109 lemma sta_ltpss_conf: ∀h,L1,T,U1. ⦃h, L1⦄ ⊢ T • U1 →
110                       ∀L2,d,e. L1 ▶* [d, e] L2 →
111                       ∃∃U2. ⦃h, L2⦄ ⊢ T • U2 & L2 ⊢ U1 ▶* [d, e] U2.
112 /2 width=5/ qed.
113
114 lemma sta_tpss_conf: ∀h,L,T1,U1. ⦃h, L⦄ ⊢ T1 • U1 →
115                      ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 →
116                      ∃∃U2. ⦃h, L⦄ ⊢ T2 • U2 & L ⊢ U1 ▶* [d, e] U2.
117 /2 width=5/ qed.
118
119 lemma sta_tps_conf: ∀h,L,T1,U1. ⦃h, L⦄ ⊢ T1 • U1 →
120                     ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 →
121                     ∃∃U2. ⦃h, L⦄ ⊢ T2 • U2 & L ⊢ U1 ▶* [d, e] U2.
122 /2 width=5/ qed.