]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/computation/lcosx_cpxs.ma
- main proposition on lsx finally proved!
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / computation / lcosx_cpxs.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/computation/lsx_ldrop.ma".
16 include "basic_2/computation/lsx_lpxs.ma".
17 include "basic_2/computation/lcosx.ma".
18
19 (* SN EXTENDED STRONGLY CONORMALIZING LOCAL ENVIRONMENTS ********************)
20
21 (* Properties on extended context-sensitive parallel computation for term ***)
22
23 lemma lsx_cpx_trans_lcosx: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 →
24                            ∀d. G ⊢ ⧤⬊*[h, g, d] L →
25                            G ⊢ ⋕⬊*[h, g, T1, d] L → G ⊢ ⋕⬊*[h, g, T2, d] L.
26 #h #g #G #L #T1 #T2 #H elim H -G -L -T1 -T2 //
27 [ #I #G #L #K #V1 #V2 #W2 #i #HLK #_ #HVW2 #IHV12 #d #HL #H
28   elim (ylt_split i d) #Hdi [ -H | -HL ]
29   [ <(ymax_pre_sn d (⫯i)) /2 width=1 by ylt_fwd_le_succ/
30     elim (lcosx_ldrop_trans_lt … HL … HLK) // -HL -Hdi
31     lapply (ldrop_fwd_drop2 … HLK) -HLK /3 width=7 by lsx_lift_ge/
32   | lapply (lsx_fwd_lref_be … H … HLK) // -H -Hdi
33     lapply (ldrop_fwd_drop2 … HLK) -HLK
34     /4 width=10 by lsx_ge, lsx_lift_le/
35   ]
36 | #a #I #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #d #HL #H
37   elim (lsx_inv_bind … H) -H #HV1 #HT1
38   @lsx_bind /2 width=2 by/ (**) (* explicit constructor *)
39   @(lsx_leqy_conf … (L.ⓑ{I}V1)) /3 width=1 by lcosx_pair, lsuby_succ/
40 | #I #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #d #HL #H
41   elim (lsx_inv_flat … H) -H /3 width=1 by lsx_flat/
42 | #G #L #V #U1 #U2 #T2 #_ #HTU2 #IHU12 #d #HL #H
43   elim (lsx_inv_bind … H) -H
44   /4 width=9 by lcosx_pair, lsx_inv_lift_ge, ldrop_drop/
45 | #G #L #V #T1 #T2 #_ #IHT12 #d #HL #H
46   elim (lsx_inv_flat … H) -H /2 width=1 by/
47 | #G #L #V1 #V2 #T #_ #IHV12 #d #HL #H
48   elim (lsx_inv_flat … H) -H /2 width=1 by/
49 | #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #d #HL #H
50   elim (lsx_inv_flat … H) -H #HV1 #H
51   elim (lsx_inv_bind … H) -H #HW1 #HT1
52   @lsx_bind /3 width=1 by lsx_flat/ (**) (* explicit constructor *)
53   @(lsx_leqy_conf … (L.ⓛW1)) /3 width=1 by lcosx_pair, lsuby_succ/
54 | #a #G #L #V1 #V2 #U2 #W1 #W2 #T1 #T2 #_ #HVU2 #_ #_ #IHV12 #IHW12 #IHT12 #d #HL #H
55   elim (lsx_inv_flat … H) -H #HV1 #H
56   elim (lsx_inv_bind … H) -H #HW1 #HT1
57   @lsx_bind /2 width=1 by/ (**) (* explicit constructor *)
58   @lsx_flat [ /3 width=7 by lsx_lift_ge, ldrop_drop/ ]
59   @(lsx_leqy_conf … (L.ⓓW1)) /3 width=1 by lcosx_pair, lsuby_succ/
60 ]
61 qed-.
62
63 lemma lsx_cpx_trans_O: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 →
64                        G ⊢ ⋕⬊*[h, g, T1, 0] L → G ⊢ ⋕⬊*[h, g, T2, 0] L.
65 /2 width=3 by lsx_cpx_trans_lcosx/ qed-.
66
67 lemma lsx_cpxs_trans_O: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 →
68                         G ⊢ ⋕⬊*[h, g, T1, 0] L → G ⊢ ⋕⬊*[h, g, T2, 0] L.
69 #h #g #G #L #T1 #T2 #H @(cpxs_ind … H) -T2
70 /3 width=3 by lsx_cpx_trans_O, cpxs_strap1/
71 qed-.