]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/computation/lsx_csx.ma
edde1749562df89ebfbb7c82d2184d477bce23e1
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / computation / lsx_csx.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/reduction/cpx_cpys.ma".
16 include "basic_2/computation/lpxs_llneq.ma".
17 include "basic_2/computation/csx_alt.ma".
18 include "basic_2/computation/lsx_lpxs.ma".
19
20 (* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************)
21
22 (* Advanced properties ******************************************************)
23
24 lemma lpxs_cpys_csx_lsx: ∀h,g,G,L1,U. ⦃G, L1⦄ ⊢ ⬊*[h, g] U →
25                          ∀T.  ⦃G, L1⦄ ⊢ T ▶*[0, ∞] U →
26                          G ⊢ ⋕⬊*[h, g, T] L1.
27 #h #g #G #L1 #U #H @(csx_ind_alt … H) -U
28 #U #_ #IHU #T #HTU @lsx_intro
29 #L2 #HL02 #HnT elim (lpxs_nlleq_fwd_cpxs … HL02 HnT) -HnT
30 #U0 #U2 #H0 #H2 #HU02 #HnU02 elim (cpys_conf_eq … HTU … H0)
31 #X #HUX #H0X elim (eq_term_dec U X) #HnUX destruct
32 [ -HUX 
33 | -HnU02 @(lsx_lpxs_trans … HL02) @(IHU … HnUX)
34   [ /3 width=3 by cpys_cpx, cpx_cpxs/
35   | /2 width=3 by cpys_trans_eq/
36   ]
37
38
39 lemma lpxs_cpys_csx_lsx: ∀h,g,G,L1,U. ⦃G, L1⦄ ⊢ ⬊*[h, g] U →
40                          ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ∀T.  ⦃G, L2⦄ ⊢ T ▶*[0, ∞] U →
41                          G ⊢ ⋕⬊*[h, g, T] L2.
42 #h #g #G #L1 #U #H @(csx_ind_alt … H) -U
43 #U #_ #IHU #L0 #HL10 #T #HTU @lsx_intro
44 #L2 #HL02 #HnT elim (lpxs_nlleq_fwd_cpxs … HL02 HnT) -HnT
45 #U0 #U2 #H0 #H2 #HU02 #HnU02 elim (cpys_conf_eq … HTU … H0)
46 #X #HUX #H0X elim (eq_term_dec U X) #HnUX destruct
47 [ -HUX
48 | -HnU02 @(IHU … HnUX)
49
50
51 -HnT /4 width=9 by lpxs_trans, lpxs_cpxs_trans, cpx_cpye_fwd_lpxs/
52 ]
53                          
54
55
56
57
58
59
60 include "basic_2/reduction/cpx_cpys.ma".
61 include "basic_2/computation/lpxs_cpye.ma".
62 include "basic_2/computation/csx_alt.ma".
63 include "basic_2/computation/lsx_lpxs.ma".
64
65 (* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************)
66
67 (* Advanced properties ******************************************************)
68
69 axiom lpxs_cpye_csx_lsx: ∀h,g,G,L1,U. ⦃G, L1⦄ ⊢ ⬊*[h, g] U →
70                          ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ∀T.  ⦃G, L2⦄ ⊢ T ▶*[0, ∞] 𝐍⦃U⦄ →
71                          G ⊢ ⋕⬊*[h, g, T] L2.
72 (*
73 #h #g #G #L1 #U #H @(csx_ind_alt … H) -U
74 #U0 #_ #IHU0 #L0 #HL10 #T #H0 @lsx_intro
75 #L2 #HL02 #HnT elim (cpye_total G L2 T 0 (∞))
76 #U2 #H2 elim (eq_term_dec U0 U2) #H destruct
77 [ -IHU0
78 | -HnT /4 width=9 by lpxs_trans, lpxs_cpxs_trans, cpx_cpye_fwd_lpxs/
79 ]
80 *)
81 (* Main properties **********************************************************)
82
83 lemma csx_lsx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → G ⊢ ⋕⬊*[h, g, T] L.
84 #h #g #G #L #T #HT elim (cpye_total G L T 0 (∞))
85 #U #HTU elim HTU
86 /4 width=5 by lpxs_cpye_csx_lsx, csx_cpx_trans, cpys_cpx/
87 qed.