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/reduction/lpr.ma".
16 include "basic_2/reduction/cpx.ma".
18 (* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
20 definition lpx: ∀h. sd h → relation lenv ≝ λh,g. lpx_sn (cpx h g).
22 interpretation "extended parallel reduction (local environment, sn variant)"
23 'PRedSn h g L1 L2 = (lpx h g L1 L2).
25 (* Basic inversion lemmas ***************************************************)
27 lemma lpx_inv_atom1: ∀h,g,L2. ⦃h, ⋆⦄ ⊢ ➡[g] L2 → L2 = ⋆.
28 /2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
30 lemma lpx_inv_pair1: ∀h,g,I,K1,V1,L2. ⦃h, K1.ⓑ{I}V1⦄ ⊢ ➡[g] L2 →
31 ∃∃K2,V2. ⦃h, K1⦄ ⊢ ➡[g] K2 & ⦃h, K1⦄ ⊢ V1 ➡[g] V2 &
33 /2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
35 lemma lpx_inv_atom2: ∀h,g,L1. ⦃h, L1⦄ ⊢ ➡[g] ⋆ → L1 = ⋆.
36 /2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
38 lemma lpx_inv_pair2: ∀h,g,I,L1,K2,V2. ⦃h, L1⦄ ⊢ ➡[g] K2.ⓑ{I}V2 →
39 ∃∃K1,V1. ⦃h, K1⦄ ⊢ ➡[g] K2 & ⦃h, K1⦄ ⊢ V1 ➡[g] V2 &
41 /2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
43 (* Basic properties *********************************************************)
45 lemma lpx_refl: ∀h,g,L. ⦃h, L⦄ ⊢ ➡[g] L.
46 /2 width=1 by lpx_sn_refl/ qed.
48 lemma lpx_pair: ∀h,g,I,K1,K2,V1,V2. ⦃h, K1⦄ ⊢ ➡[g] K2 → ⦃h, K1⦄ ⊢ V1 ➡[g] V2 →
49 ⦃h, K1.ⓑ{I}V1⦄ ⊢ ➡[g] K2.ⓑ{I}V2.
52 lemma lpx_append: ∀h,g,K1,K2. ⦃h, K1⦄ ⊢ ➡[g] K2 → ∀L1,L2. ⦃h, L1⦄ ⊢ ➡[g] L2 →
53 ⦃h, L1 @@ K1⦄ ⊢ ➡[g] L2 @@ K2.
54 /3 width=1 by lpx_sn_append, cpx_append/ qed.
56 lamma lpr_lpx: ∀h,g,L1,L2. L1 ⊢ ➡ L2 → ⦃h, L1⦄ ⊢ ➡[g] L2.
57 #h #g #L1 #L2 #H elim H -L1 -L2 // /3 width=1/
60 (* Basic forward lemmas *****************************************************)
62 lemma lpx_fwd_length: ∀h,g,L1,L2. ⦃h, L1⦄ ⊢ ➡[g] L2 → |L1| = |L2|.
63 /2 width=2 by lpx_sn_fwd_length/ qed-.
65 (* Advanced forward lemmas **************************************************)
67 lemma lpx_fwd_append1: ∀h,g,K1,L1,L. ⦃h, K1 @@ L1⦄ ⊢ ➡[g] L →
68 ∃∃K2,L2. ⦃h, K1⦄ ⊢ ➡[g] K2 & L = K2 @@ L2.
69 /2 width=2 by lpx_sn_fwd_append1/ qed-.
71 lemma lpx_fwd_append2: ∀h,g,L,K2,L2. ⦃h, L⦄ ⊢ ➡[g] K2 @@ L2 →
72 ∃∃K1,L1. ⦃h, K1⦄ ⊢ ➡[g] K2 & L = K1 @@ L1.
73 /2 width=2 by lpx_sn_fwd_append2/ qed-.