]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc_2A1/cpys2/cpx_cpys2.etc
update in binaries for λδ
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc_2A1 / cpys2 / cpx_cpys2.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/cpys_alt.ma".
16 include "basic_2/reduction/cpx.ma".
17
18 (* CONTEXT-SENSITIVE EXTENDED PARALLEL REDUCTION FOR TERMS ******************)
19
20 (* Properties on context-sensitive extended multiple substitution for terms *)
21
22 lemma cpys_cpx: ∀h,g,G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶*[d, e] T2 → ⦃G, L⦄ ⊢ T1 ➡[h, g] T2.
23 #h #g #G #L #T1 #T2 #d #e #H @(cpys_ind_alt … H) -G -L -T1 -T2 -d -e
24 /2 width=7 by cpx_delta, cpx_bind, cpx_flat/
25 qed.
26
27 lemma cpy_cpx: ∀h,g,G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ⦃G, L⦄ ⊢ T1 ➡[h, g] T2.
28 /3 width=3 by cpy_cpys, cpys_cpx/ qed.
29
30 lemma cpx_cpy_trans: ∀h,g,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡[h, g] T →
31                      ∀T2,d,e. ⦃G, L⦄ ⊢ T ▶[d, e] T2 → ⦃G, L⦄ ⊢ T1 ➡[h, g] T2.
32 #h #g #G #L #T1 #T #H elim H -G -L -T1 -T
33 [ #I #G #L #X #d #e #H elim (cpy_inv_atom1 … H) //
34   * /2 width=3 by cpy_cpx/
35 | #G #L #k #l #Hkl #X #d #e #H >(cpy_inv_sort1 … H) -X /2 width=2 by cpx_sort/
36 | #I #G #L #K #V1 #V #W #i #HLK #_ #HVW #IHV1 #X #d #e #H
37   lapply (ldrop_fwd_drop2 … HLK) #H0
38   lapply (cpy_weak … H 0 (∞) ? ?) -H // #H
39   elim (cpy_inv_lift1_be … H … H0 … HVW) -H -H0 -HVW
40   /3 width=7 by cpx_delta/
41 | #a #I #G #L #V1 #V #T1 #T #_ #_ #IHV1 #IHT1 #X #d #e #H elim (cpy_inv_bind1 … H) -H
42   #V2 #T2 #HV2 #HT2 #H destruct
43   /5 width=7 by cpx_bind, lsuby_cpy_trans, lsuby_succ/
44 | #I #G #L #V1 #V #T1 #T #_ #_ #IHV1 #IHT1 #X #d #e #H elim (cpy_inv_flat1 … H) -H
45   #V2 #T2 #HV2 #HT2 #H destruct /3 width=3 by cpx_flat/
46 | #G #L #V1 #U1 #U #T #_ #HTU #IHU1 #T2 #d #e #HT2
47   lapply (cpy_weak … HT2 0 (∞) ? ?) -HT2 // #HT2
48   elim (lift_total T2 0 1) #U2 #HTU2
49   lapply (cpy_lift_be … HT2 (L.ⓓV1) … (Ⓕ) … HTU … HTU2 ? ?) -T
50   /3 width=3 by cpx_zeta, ldrop_drop/
51 | /3 width=3 by cpx_tau/
52 | /3 width=3 by cpx_ti/
53 | #a #G #L #V1 #V #W1 #W #T1 #T #_ #_ #_ #IHV1 #IHW1 #IHT1 #X #d #e #HX
54   elim (cpy_inv_bind1 … HX) -HX #Y #T2 #HY #HT2 #H destruct
55   elim (cpy_inv_flat1 … HY) -HY #W2 #V2 #HW2 #HV2 #H destruct
56   /5 width=7 by cpx_beta, lsuby_cpy_trans, lsuby_succ/
57 | #a #G #L #V1 #V #U #W1 #W #T1 #T #_ #HVU #_ #_ #IHV1 #IHW1 #IHT1 #X #d #e #HX
58   elim (cpy_inv_bind1 … HX) -HX #W2 #Y #HW2 #HY #H destruct
59   elim (cpy_inv_flat1 … HY) -HY #U2 #T2 #HU2 #HT2 #H destruct
60   lapply (cpy_weak … HU2 0 (∞) ? ?) -HU2 // #HU2
61   elim (cpy_inv_lift1_be … HU2 L … HVU) -U
62   /5 width=7 by cpx_theta, lsuby_cpy_trans, lsuby_succ, ldrop_drop/
63 ]
64 qed-.
65
66 lemma cpx_cpys_trans: ∀h,g,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡[h, g] T →
67                       ∀T2,d,e. ⦃G, L⦄ ⊢ T ▶*[d, e] T2 → ⦃G, L⦄ ⊢ T1 ➡[h, g] T2.
68 #h #g #G #L #T1 #T #HT1 #T2 #d #e #H @(cpys_ind … H) -T2
69 /2 width=5 by cpx_cpy_trans/
70 qed-.