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/notation/relations/predsn_4.ma".
16 include "basic_2/reduction/lpr.ma".
17 include "basic_2/reduction/cpx.ma".
19 (* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
21 definition lpx: ∀h. sd h → relation lenv ≝ λh,g. lpx_sn (cpx h g).
23 interpretation "extended parallel reduction (local environment, sn variant)"
24 'PRedSn h g L1 L2 = (lpx h g L1 L2).
26 (* Basic inversion lemmas ***************************************************)
28 lemma lpx_inv_atom1: ∀h,g,L2. ⦃h, ⋆⦄ ⊢ ➡[g] L2 → L2 = ⋆.
29 /2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
31 lemma lpx_inv_pair1: ∀h,g,I,K1,V1,L2. ⦃h, K1.ⓑ{I}V1⦄ ⊢ ➡[g] L2 →
32 ∃∃K2,V2. ⦃h, K1⦄ ⊢ ➡[g] K2 & ⦃h, K1⦄ ⊢ V1 ➡[g] V2 &
34 /2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
36 lemma lpx_inv_atom2: ∀h,g,L1. ⦃h, L1⦄ ⊢ ➡[g] ⋆ → L1 = ⋆.
37 /2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
39 lemma lpx_inv_pair2: ∀h,g,I,L1,K2,V2. ⦃h, L1⦄ ⊢ ➡[g] K2.ⓑ{I}V2 →
40 ∃∃K1,V1. ⦃h, K1⦄ ⊢ ➡[g] K2 & ⦃h, K1⦄ ⊢ V1 ➡[g] V2 &
42 /2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
44 (* Basic properties *********************************************************)
46 lemma lpx_refl: ∀h,g,L. ⦃h, L⦄ ⊢ ➡[g] L.
47 /2 width=1 by lpx_sn_refl/ qed.
49 lemma lpx_pair: ∀h,g,I,K1,K2,V1,V2. ⦃h, K1⦄ ⊢ ➡[g] K2 → ⦃h, K1⦄ ⊢ V1 ➡[g] V2 →
50 ⦃h, K1.ⓑ{I}V1⦄ ⊢ ➡[g] K2.ⓑ{I}V2.
53 lemma lpx_append: ∀h,g,K1,K2. ⦃h, K1⦄ ⊢ ➡[g] K2 → ∀L1,L2. ⦃h, L1⦄ ⊢ ➡[g] L2 →
54 ⦃h, L1 @@ K1⦄ ⊢ ➡[g] L2 @@ K2.
55 /3 width=1 by lpx_sn_append, cpx_append/ qed.
57 lemma lpr_lpx: ∀h,g,L1,L2. L1 ⊢ ➡ L2 → ⦃h, L1⦄ ⊢ ➡[g] L2.
58 #h #g #L1 #L2 #H elim H -L1 -L2 // /3 width=1/
61 (* Basic forward lemmas *****************************************************)
63 lemma lpx_fwd_length: ∀h,g,L1,L2. ⦃h, L1⦄ ⊢ ➡[g] L2 → |L1| = |L2|.
64 /2 width=2 by lpx_sn_fwd_length/ qed-.
66 (* Advanced forward lemmas **************************************************)
68 lemma lpx_fwd_append1: ∀h,g,K1,L1,L. ⦃h, K1 @@ L1⦄ ⊢ ➡[g] L →
69 ∃∃K2,L2. ⦃h, K1⦄ ⊢ ➡[g] K2 & L = K2 @@ L2.
70 /2 width=2 by lpx_sn_fwd_append1/ qed-.
72 lemma lpx_fwd_append2: ∀h,g,L,K2,L2. ⦃h, L⦄ ⊢ ➡[g] K2 @@ L2 →
73 ∃∃K1,L1. ⦃h, K1⦄ ⊢ ➡[g] K2 & L = K1 @@ L1.
74 /2 width=2 by lpx_sn_fwd_append2/ qed-.