1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/reducibility/ltpr_ldrop.ma".
17 (* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
19 (* Properties concerning parallel substitution on terms *********************)
21 lemma ltpr_tps_trans: ∀L2,T1,T2,d,e. L2 ⊢ T1 ▶ [d, e] T2 → ∀L1. L1 ➡ L2 →
22 ∃∃T. L1 ⊢ T1 ▶ [d, e] T & T ➡ T2.
23 #L2 #T1 #T2 #d #e #H elim H -L2 -T1 -T2 -d -e
25 | #L2 #K2 #V2 #W2 #i #d #e #Hdi #Hide #HLK2 #HVW2 #L1 #HL12
26 elim (ltpr_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
27 elim (ltpr_inv_pair2 … H) -H #K1 #V1 #HK12 #HV12 #H destruct -K2
28 elim (lift_total V1 0 (i+1)) #W1 #HVW1
29 lapply (tpr_lift … HV12 … HVW1 … HVW2) -V2 /3 width=4/
30 | #L2 #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L1 #HL12
31 elim (IHV12 … HL12) -IHV12 #V #HV1 #HV2
32 elim (IHT12 (L1.ⓑ{I}V) ?) /2 width=1/ -L2 /3 width=5/
33 | #L2 #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L1 #HL12
34 elim (IHV12 … HL12) -IHV12
35 elim (IHT12 … HL12) -L2 /3 width=5/
39 lemma ltpr_tps_conf: ∀L1,T1,T2,d,e. L1 ⊢ T1 ▶ [d, e] T2 → ∀L2. L1 ➡ L2 →
40 ∃∃T. L2 ⊢ T1 ▶ [d, e] T & T2 ➡ T.
41 #L1 #T1 #T2 #d #e #H elim H -L1 -T1 -T2 -d -e
43 | #L1 #K1 #V1 #W1 #i #d #e #Hdi #Hide #HLK1 #HVW1 #L2 #HL12
44 elim (ltpr_ldrop_conf … HLK1 … HL12) -L1 #X #HLK2 #H
45 elim (ltpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct -K1
46 elim (lift_total V2 0 (i+1)) #W2 #HVW2
47 lapply (tpr_lift … HV12 … HVW1 … HVW2) -V1 /3 width=4/
48 | #L1 #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L2 #HL12
49 elim (IHV12 … HL12) -IHV12 #V #HV1 #HV2
50 elim (IHT12 (L2.ⓑ{I}V) ?) /2 width=1/ -L1 /3 width=5/
51 | #L1 #I #V1 #V2 #T1 #T2 #d #e #_ #_ #IHV12 #IHT12 #L2 #HL12
52 elim (IHV12 … HL12) -IHV12
53 elim (IHT12 … HL12) -L1 /3 width=5/