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/unfold/lpqs.ma".
16 include "basic_2/reduction/cpr.ma".
18 (* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
20 definition lpr: relation lenv ≝ lpx_sn cpr.
22 interpretation "parallel reduction (local environment, sn variant)"
23 'PRedSn L1 L2 = (lpr L1 L2).
25 (* Basic inversion lemmas ***************************************************)
27 (* Basic_1: includes: wcpr0_gen_sort *)
28 lemma lpr_inv_atom1: ∀L2. ⋆ ⊢ ➡ L2 → L2 = ⋆.
29 /2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
31 (* Basic_1: includes: wcpr0_gen_head *)
32 lemma lpr_inv_pair1: ∀I,K1,V1,L2. K1. ⓑ{I} V1 ⊢ ➡ L2 →
33 ∃∃K2,V2. K1 ⊢ ➡ K2 & K1 ⊢ V1 ➡ V2 & L2 = K2. ⓑ{I} V2.
34 /2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
36 lemma lpr_inv_atom2: ∀L1. L1 ⊢ ➡ ⋆ → L1 = ⋆.
37 /2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
39 lemma lpr_inv_pair2: ∀I,L1,K2,V2. L1 ⊢ ➡ K2. ⓑ{I} V2 →
40 ∃∃K1,V1. K1 ⊢ ➡ K2 & K1 ⊢ V1 ➡ V2 & L1 = K1. ⓑ{I} V1.
41 /2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
43 (* Basic properties *********************************************************)
46 lemma lpr_refl: ∀L. L ⊢ ➡ L.
47 /2 width=1 by lpx_sn_refl/ qed.
49 lemma lpr_append: ∀K1,K2. K1 ⊢ ➡ K2 → ∀L1,L2. L1 ⊢ ➡ L2 →
50 L1 @@ K1 ⊢ ➡ L2 @@ K2.
51 /3 width=1 by lpx_sn_append, cpr_append/ qed.
53 lemma lpqs_lpr: ∀L1,L2. L1 ⊢ ➤* L2 → L1 ⊢ ➡ L2.
54 #L1 #L2 #H elim H -L1 -L2 // /3 width=1/
57 lemma lpss_lpr: ∀L1,L2. L1 ⊢ ▶* L2 → L1 ⊢ ➡ L2.
60 (* Basic forward lemmas *****************************************************)
62 lemma lpr_fwd_length: ∀L1,L2. L1 ⊢ ➡ L2 → |L1| = |L2|.
63 /2 width=2 by lpx_sn_fwd_length/ qed-.
65 (* Advanced forward lemmas **************************************************)
67 lemma lpr_fwd_append1: ∀K1,L1,L. K1 @@ L1 ⊢ ➡ L →
68 ∃∃K2,L2. K1 ⊢ ➡ K2 & L = K2 @@ L2.
69 /2 width=2 by lpx_sn_fwd_append1/ qed-.
71 lemma lpr_fwd_append2: ∀L,K2,L2. L ⊢ ➡ K2 @@ L2 →
72 ∃∃K1,L1. K1 ⊢ ➡ K2 & L = K1 @@ L1.
73 /2 width=2 by lpx_sn_fwd_append2/ qed-.
75 (* Basic_1: removed theorems 3: wcpr0_getl wcpr0_getl_back