]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc_2A1/cpr/ltpss_dx_tpss.etc
update in binaries for λδ
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc_2A1 / cpr / ltpss_dx_tpss.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/ltpss_dx_tps.ma".
16
17 (* DX PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
18
19 (* Properties concerning partial unfold on terms ****************************)
20
21 lemma ltpss_dx_tpss_conf_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
22                              ∀L1,d1,e1. L0 ▶* [d1, e1] L1 → d1 + e1 ≤ d2 →
23                              L1 ⊢ T2 ▶* [d2, e2] U2.
24 #L0 #T2 #U2 #d2 #e2 #H #L1 #d1 #e1 #HL01 #Hde1d2 @(tpss_ind … H) -U2 //
25 #U #U2 #_ #HU2 #IHU
26 lapply (ltpss_dx_tps_conf_ge … HU2 … HL01 ?) -L0 // -Hde1d2 /2 width=3/
27 qed.
28
29 (* Basic_1: was: subst1_subst1_back *)
30 lemma ltpss_dx_tps_conf: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
31                          ∀L1,d1,e1. L0 ▶* [d1, e1] L1 →
32                          ∃∃T. L1 ⊢ T2 ▶ [d2, e2] T &
33                               L1 ⊢ U2 ▶* [d1, e1] T.
34 #L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
35 [ /2 width=3/
36 | #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL01
37   elim (lt_or_ge i2 d1) #Hi2d1
38   [ elim (ltpss_dx_ldrop_conf_le … HL01 … HLK0 ?) -L0 /2 width=2/ #X #H #HLK1
39     elim (ltpss_dx_inv_tpss11 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
40     lapply (ldrop_fwd_ldrop2 … HLK1) #H
41     elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
42     lapply (tpss_lift_ge … HV01 … H HVW0 … HVW1) -V0 -H // >minus_plus <plus_minus_m_m // /3 width=4/
43   | elim (lt_or_ge i2 (d1 + e1)) #Hde1i2
44     [ elim (ltpss_dx_ldrop_conf_be … HL01 … HLK0 ? ?) -L0 // /2 width=2/ #X #H #HLK1
45       elim (ltpss_dx_inv_tpss21 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
46       lapply (ldrop_fwd_ldrop2 … HLK1) #H
47       elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
48       lapply (tpss_lift_ge … HV01 … H HVW0 … HVW1) -V0 -H // normalize #HW01
49       lapply (tpss_weak … HW01 d1 e1 ? ?) [2: /2 width=1/ |3: /3 width=4/ ] >minus_plus >commutative_plus /2 width=1/
50     | lapply (ltpss_dx_ldrop_conf_ge … HL01 … HLK0 ?) -L0 // /3 width=4/
51     ]
52   ]
53 | #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01
54   elim (IHVW2 … HL01) -IHVW2 #V #HV2 #HVW2
55   elim (IHTU2 (L1. ⓑ{I} V) (d1 + 1) e1 ?) -IHTU2 /2 width=1/ -HL01 /3 width=5/
56 | #L0 #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL01
57   elim (IHVW2 … HL01) -IHVW2
58   elim (IHTU2 … HL01) -IHTU2 -HL01 /3 width=5/
59 ]
60 qed.
61
62 lemma ltpss_dx_tpss_trans_ge: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶* [d2, e2] U2 →
63                               ∀L1,d1,e1. L1 ▶* [d1, e1] L0 → d1 + e1 ≤ d2 →
64                               L1 ⊢ T2 ▶* [d2, e2] U2.
65 #L0 #T2 #U2 #d2 #e2 #H #L1 #d1 #e1 #HL01 #Hde1d2 @(tpss_ind … H) -U2 //
66 #U #U2 #_ #HU2 #IHU
67 lapply (ltpss_dx_tps_trans_ge … HU2 … HL01 ?) -L0 // -Hde1d2 /2 width=3/
68 qed.
69
70 (* Basic_1: was: subst1_subst1 *)
71 lemma ltpss_dx_tps_trans: ∀L0,T2,U2,d2,e2. L0 ⊢ T2 ▶ [d2, e2] U2 →
72                           ∀L1,d1,e1. L1 ▶* [d1, e1] L0 →
73                           ∃∃T. L1 ⊢ T2 ▶ [d2, e2] T &
74                                L0 ⊢ T ▶* [d1, e1] U2.
75 #L0 #T2 #U2 #d2 #e2 #H elim H -L0 -T2 -U2 -d2 -e2
76 [ /2 width=3/
77 | #L0 #K0 #V0 #W0 #i2 #d2 #e2 #Hdi2 #Hide2 #HLK0 #HVW0 #L1 #d1 #e1 #HL10
78   elim (lt_or_ge i2 d1) #Hi2d1
79   [ elim (ltpss_dx_ldrop_trans_le … HL10 … HLK0 ?) -HL10 /2 width=2/ #X #H #HLK1
80     elim (ltpss_dx_inv_tpss12 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
81     lapply (ldrop_fwd_ldrop2 … HLK0) -HLK0 #H
82     elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
83     lapply (tpss_lift_ge … HV01 … H HVW1 … HVW0) -V0 -H // >minus_plus <plus_minus_m_m /2 width=1/ /3 width=4/
84   | elim (lt_or_ge i2 (d1 + e1)) #Hde1i2
85     [ elim (ltpss_dx_ldrop_trans_be … HL10 … HLK0 ? ?) -HL10 // /2 width=2/ #X #H #HLK1
86       elim (ltpss_dx_inv_tpss22 … H ?) -H /2 width=1/ #K1 #V1 #_ #HV01 #H destruct
87       lapply (ldrop_fwd_ldrop2 … HLK0) -HLK0 #H
88       elim (lift_total V1 0 (i2 + 1)) #W1 #HVW1
89       lapply (tpss_lift_ge … HV01 … H HVW1 … HVW0) -V0 -H // normalize #HW01
90       lapply (tpss_weak … HW01 d1 e1 ? ?) [2: /3 width=1/ |3: /3 width=4/ ] >minus_plus >commutative_plus /2 width=1/
91     | lapply (ltpss_dx_ldrop_trans_ge … HL10 … HLK0 ?) -HL10 -HLK0 // /3 width=4/
92     ]
93   ]
94 | #L0 #a #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10
95   elim (IHVW2 … HL10) -IHVW2 #V #HV2 #HVW2
96   elim (IHTU2 (L1. ⓑ{I} V) (d1 + 1) e1 ?) -IHTU2 /2 width=1/ -HL10 /3 width=5/
97 | #L0 #I #V2 #W2 #T2 #U2 #d2 #e2 #_ #_ #IHVW2 #IHTU2 #L1 #d1 #e1 #HL10
98   elim (IHVW2 … HL10) -IHVW2
99   elim (IHTU2 … HL10) -IHTU2 -HL10 /3 width=5/
100 ]
101 qed.