1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/multiple/lleq_lleq.ma".
16 include "basic_2/reduction/lpx_lleq.ma".
17 include "basic_2/computation/lsx.ma".
19 (* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************)
21 (* Advanced properties ******************************************************)
23 lemma lsx_lleq_trans: ∀h,o,T,G,L1,l. G ⊢ ⬊*[h, o, T, l] L1 →
24 ∀L2. L1 ≡[T, l] L2 → G ⊢ ⬊*[h, o, T, l] L2.
25 #h #o #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/
31 lemma lsx_lpx_trans: ∀h,o,T,G,L1,l. G ⊢ ⬊*[h, o, T, l] L1 →
32 ∀L2. ⦃G, L1⦄ ⊢ ➡[h, o] L2 → G ⊢ ⬊*[h, o, T, l] L2.
33 #h #o #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/
37 lemma lsx_lreq_conf: ∀h,o,G,L1,T,l. G ⊢ ⬊*[h, o, T, l] L1 →
38 ∀L2. L1 ⩬[l, ∞] L2 → G ⊢ ⬊*[h, o, T, l] L2.
39 #h #o #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/
45 (* Advanced forward lemmas **************************************************)
47 lemma lsx_fwd_bind_dx: ∀h,o,a,I,G,L,V,T,l. G ⊢ ⬊*[h, o, ⓑ{a,I}V.T, l] L →
48 G ⊢ ⬊*[h, o, T, ⫯l] L.ⓑ{I}V.
49 #h #o #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/
59 (* Advanced inversion lemmas ************************************************)
61 lemma lsx_inv_bind: ∀h,o,a,I,G,L,V,T,l. G ⊢ ⬊*[h, o, ⓑ{a, I}V.T, l] L →
62 G ⊢ ⬊*[h, o, V, l] L ∧ G ⊢ ⬊*[h, o, T, ⫯l] L.ⓑ{I}V.
63 /3 width=4 by lsx_fwd_bind_sn, lsx_fwd_bind_dx, conj/ qed-.