]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_cpys.ma
commit completed: now we support two versions of slicing for local
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / computation / cpxs_cpys.ma
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_cpys.ma".
16 include "basic_2/reduction/cpx_cpys.ma".
17 include "basic_2/computation/cpxs_cpxs.ma".
18
19 (* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
20
21 (* Main properties **********************************************************)
22
23 axiom cpys_split_down: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶*×[d, e] T2 →
24                        ∀i. d ≤ i → i ≤ d + e →
25                        ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*×[i, d+e-i] T & ⦃G, L⦄ ⊢ T ▶*×[d, i-d] T2.
26
27 lemma cpys_tpxs_trans: ∀h,g,G,L,T1,T,d,e. ⦃G, L⦄ ⊢ T1 ▶*×[d, e] T →
28                        ∀T2. ⦃G, ⋆⦄ ⊢ T ➡*[h, g] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2.
29 #h #g #G #L #T1 #T #d #e #HT1 #T2 #H @(cpxs_ind … H) -T2
30 /3 width=5 by cpxs_strap1, cpys_cpx, lsubr_cpx_trans, cpx_cpxs/
31 qed-.
32
33 axiom cpx_fwd_cpys_tpxs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 →
34                          ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*×[0, ∞] T & ⦃G, ⋆⦄ ⊢ T ➡*[h, g] T2.
35 (*
36 #h #g #G #L #T1 #T2 #H elim H -G -L -T1 -T2
37 [ /2 width=3 by ex2_intro/
38 | /4 width=3 by cpx_cpxs, cpx_sort, ex2_intro/
39 | #I #G #L #K #V1 #V2 #W2 #i #HLK #_ #HVW2 * #V #HV1 #HV2
40   elim (lift_total V 0 (i+1)) #W #HVW
41   lapply (cpxs_lift … HV2 (⋆) (Ⓣ) … HVW … HVW2)
42   [ @ldrop_atom #H destruct | /3 width=7 by cpys_subst_Y2, ex2_intro/ ]
43 | #a #I #G #L #V1 #V2 #T1 #T2 #_ #_ * #V #HV1 #HV2 * #T #HT1 #HT2
44   elim (cpys_split_down … HT1 1) -HT1 // #T0 #HT10 #HT0 
45 (*  
46   @(ex2_intro … (ⓑ{a,I}V.T0))
47   [ @cpys_bind // 
48   | @(cpxs_bind … HV2) -HV2
49   
50   /2 width=5 by cpys_tpxs_trans/
51   ]
52 *)*)