]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/etc/llneq/lpxs_llneq.etc
milestone update in ground_2 and basic_2A
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / etc / llneq / lpxs_llneq.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/substitution/llneq_alt.ma".
16 include "basic_2/computation/lpxs_ldrop.ma".
17 include "basic_2/computation/lpxs_cpxs.ma".
18
19 (* SN EXTENDED PARALLEL COMPUTATION FOR LOCAL ENVIRONMENTS ******************)
20
21 (* Forward lemmas on negated lazy equivalence for local environments ********)
22
23 lemma lpxs_llneq_fwd_cpxs: ∀h,g,G,L1,L2,T,d. L1 ⧣⧣[T, d] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2 →
24                            ∃∃T1,T2. ⦃G, L1⦄ ⊢ T ▶*[d, ∞] T1 & ⦃G, L2⦄ ⊢ T ▶*[d, ∞] T2 &
25                                     ⦃G, L1⦄ ⊢ T1 ➡*[h, g] T2 & (T1 = T2 → ⊥).
26 #h #g #G #L1 #L2 #T #d #H elim H -L1 -L2 -T -d
27 [ #I1 #I2 #L1 #L2 #K1 #K2 #V1 #V2 #d #i #Hdi #HLK1 #HLK2 #_ #HnV12 #HL12
28   elim (lpxs_ldrop_conf … HLK1 … HL12) -HL12 #Y #H #HY
29   elim (lpxs_inv_pair1 … H) -H #Z #X #_ #HV12 #H destruct
30   lapply (ldrop_mono … HY … HLK2) -HY #H destruct
31   lapply (ldrop_fwd_drop2 … HLK1) #H2LK1
32   elim (lift_total V1 0 (i+1)) #T1 #HVT1
33   elim (lift_total V2 0 (i+1)) #T2 #HVT2
34   @(ex4_2_intro … T1 T2) /3 width=10 by cpxs_lift, cpys_subst, lift_inj/ (**) (* explicit constructor *)
35 | #I1 #I2 #L1 #L2 #K1 #K2 #V #d #i #Hdi #HLK1 #HLK2 #_ #IHK12 #HL12
36   elim (lpxs_ldrop_conf … HLK1 … HL12) -HL12 #Y #H #HY
37   elim (lpxs_inv_pair1 … H) -H #Z #X #HK12 #_ #H destruct
38   lapply (ldrop_mono … HY … HLK2) -HY #H destruct
39   elim (IHK12 HK12) -IHK12 -HK12 #V1 #V2 #HV1 #HV2 #HV12 #HnV12
40   lapply (ldrop_fwd_drop2 … HLK1) #H2LK1
41   elim (lift_total V1 0 (i+1)) #T1 #HVT1
42   elim (lift_total V2 0 (i+1)) #T2 #HVT2
43   @(ex4_2_intro … T1 T2) /3 width=10 by cpxs_lift, cpys_subst_Y2, lift_inj/ (**) (* explicit constructor *)
44 | #a #I #L1 #L2 #V #T #d #_ #IHV #HL12 elim (IHV HL12) -IHV -HL12
45   #V1 #V2 #HV1 #HV2 #HV12 #HnV12
46   @(ex4_2_intro … (ⓑ{a,I}V1.T) (ⓑ{a,I}V2.T)) /2 width=1 by cpys_bind, cpxs_pair_sn/
47   #H destruct /2 width=1 by/
48 | #a #I #L1 #L2 #V #T #d #_ #IHT #HL12 elim (IHT ?) /2 width=1 by lpxs_pair_refl/ -IHT -HL12
49   #T1 #T2 #HT1 #HT2 #HT12 #HnT12
50   @(ex4_2_intro … (ⓑ{a,I}V.T1) (ⓑ{a,I}V.T2)) /2 width=1 by cpys_bind, cpxs_bind_dx/
51   #H destruct /2 width=1 by/
52 | #I #L1 #L2 #V #T #d #_ #IHV #HL12 elim (IHV HL12) -IHV -HL12
53   #V1 #V2 #HV1 #HV2 #HV12 #HnV12
54   @(ex4_2_intro … (ⓕ{I}V1.T) (ⓕ{I}V2.T)) /2 width=1 by cpys_flat, cpxs_pair_sn/
55   #H destruct /2 width=1 by/
56 | #I #L1 #L2 #V #T #d #_ #IHT #HL12 elim (IHT HL12) -IHT -HL12
57   #T1 #T2 #HT1 #HT2 #HT12 #HnT12
58   @(ex4_2_intro … (ⓕ{I}V.T1) (ⓕ{I}V.T2)) /2 width=1 by cpys_flat, cpxs_flat_dx/
59   #H destruct /2 width=1 by/
60 ]
61 qed-.
62
63 lemma lpxs_nlleq_fwd_cpxs: ∀h,g,G,L1,L2,T,d. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 →
64                            (L1 ⋕[T, d] L2 → ⊥) →
65                            ∃∃T1,T2. ⦃G, L1⦄ ⊢ T ▶*[d, ∞] T1 & ⦃G, L2⦄ ⊢ T ▶*[d, ∞] T2 &
66                                     ⦃G, L1⦄ ⊢ T1 ➡*[h, g] T2 & (T1 = T2 → ⊥).
67 /5 width=4 by lpxs_llneq_fwd_cpxs, lpxs_fwd_length, llneq_llneqa, conj/ qed-.