]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpx.ma
update in lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / computation / lsx_lpx.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_2A/multiple/lleq_lleq.ma".
16 include "basic_2A/reduction/lpx_lleq.ma".
17 include "basic_2A/computation/lsx.ma".
18
19 (* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************)
20
21 (* Advanced properties ******************************************************)
22
23 lemma lsx_lleq_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊*[h, g, T, l] L1 →
24                       ∀L2. L1 ≡[T, l] L2 → G ⊢ ⬊*[h, g, T, l] L2.
25 #h #g #T #G #L1 #l #H @(lsx_ind … H) -L1
26 #L1 #_ #IHL1 #L2 #HL12 @lsx_intro
27 #K2 #HLK2 #HnLK2 elim (lleq_lpx_trans … HLK2 … HL12) -HLK2
28 /5 width=4 by lleq_canc_sn, lleq_trans/
29 qed-.
30
31 lemma lsx_lpx_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊*[h, g, T, l] L1 →
32                      ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → G ⊢ ⬊*[h, g, T, l] L2.
33 #h #g #T #G #L1 #l #H @(lsx_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12
34 elim (lleq_dec T L1 L2 l) /3 width=4 by lsx_lleq_trans/
35 qed-.
36
37 lemma lsx_lreq_conf: ∀h,g,G,L1,T,l. G ⊢ ⬊*[h, g, T, l] L1 →
38                     ∀L2. L1 ⩬[l, ∞] L2 → G ⊢ ⬊*[h, g, T, l] L2.
39 #h #g #G #L1 #T #l #H @(lsx_ind … H) -L1
40 #L1 #_ #IHL1 #L2 #HL12 @lsx_intro
41 #L3 #HL23 #HnL23 elim (lreq_lpx_trans_lleq … HL12 … HL23) -HL12 -HL23
42 #L0 #HL03 #HL10 #H elim (H T) -H /4 width=4 by/
43 qed-.
44
45 (* Advanced forward lemmas **************************************************)
46
47 lemma lsx_fwd_bind_dx: ∀h,g,a,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓑ{a,I}V.T, l] L →
48                        G ⊢ ⬊*[h, g, T, ⫯l] L.ⓑ{I}V.
49 #h #g #a #I #G #L #V1 #T #l #H @(lsx_ind … H) -L
50 #L1 #_ #IHL1 @lsx_intro
51 #Y #H #HT elim (lpx_inv_pair1 … H) -H
52 #L2 #V2 #HL12 #_ #H destruct
53 @(lsx_lreq_conf … (L2.ⓑ{I}V1)) /2 width=1 by lreq_succ/
54 @IHL1 // #H @HT -IHL1 -HL12 -HT
55 @(lleq_lreq_trans … (L2.ⓑ{I}V1))
56 /2 width=2 by lleq_fwd_bind_dx, lreq_succ/
57 qed-.
58
59 (* Advanced inversion lemmas ************************************************)
60
61 lemma lsx_inv_bind: ∀h,g,a,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓑ{a, I}V.T, l] L →
62                     G ⊢ ⬊*[h, g, V, l] L ∧ G ⊢ ⬊*[h, g, T, ⫯l] L.ⓑ{I}V.
63 /3 width=4 by lsx_fwd_bind_sn, lsx_fwd_bind_dx, conj/ qed-.