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/reducibility/tpr.ma".
17 (* CONTEXT-FREE PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ********************)
19 inductive ltpr: relation lenv ≝
20 | ltpr_stom: ltpr (⋆) (⋆)
21 | ltpr_pair: ∀K1,K2,I,V1,V2.
22 ltpr K1 K2 → V1 ➡ V2 → ltpr (K1. 𝕓{I} V1) (K2. 𝕓{I} V2) (*𝕓*)
26 "context-free parallel reduction (environment)"
27 'PRed L1 L2 = (ltpr L1 L2).
29 (* Basic properties *********************************************************)
31 lemma ltpr_refl: ∀L:lenv. L ➡ L.
32 #L elim L -L // /2 width=1/
35 (* Basic inversion lemmas ***************************************************)
37 fact ltpr_inv_atom1_aux: ∀L1,L2. L1 ➡ L2 → L1 = ⋆ → L2 = ⋆.
40 | #K1 #K2 #I #V1 #V2 #_ #_ #H destruct
44 (* Basic_1: was: wcpr0_gen_sort *)
45 lemma ltpr_inv_atom1: ∀L2. ⋆ ➡ L2 → L2 = ⋆.
48 fact ltpr_inv_pair1_aux: ∀L1,L2. L1 ➡ L2 → ∀K1,I,V1. L1 = K1. 𝕓{I} V1 →
49 ∃∃K2,V2. K1 ➡ K2 & V1 ➡ V2 & L2 = K2. 𝕓{I} V2.
51 [ #K1 #I #V1 #H destruct
52 | #K1 #K2 #I #V1 #V2 #HK12 #HV12 #L #J #W #H destruct /2 width=5/
56 (* Basic_1: was: wcpr0_gen_head *)
57 lemma ltpr_inv_pair1: ∀K1,I,V1,L2. K1. 𝕓{I} V1 ➡ L2 →
58 ∃∃K2,V2. K1 ➡ K2 & V1 ➡ V2 & L2 = K2. 𝕓{I} V2.
61 fact ltpr_inv_atom2_aux: ∀L1,L2. L1 ➡ L2 → L2 = ⋆ → L1 = ⋆.
64 | #K1 #K2 #I #V1 #V2 #_ #_ #H destruct
68 lemma ltpr_inv_atom2: ∀L1. L1 ➡ ⋆ → L1 = ⋆.
71 fact ltpr_inv_pair2_aux: ∀L1,L2. L1 ➡ L2 → ∀K2,I,V2. L2 = K2. 𝕓{I} V2 →
72 ∃∃K1,V1. K1 ➡ K2 & V1 ➡ V2 & L1 = K1. 𝕓{I} V1.
74 [ #K2 #I #V2 #H destruct
75 | #K1 #K2 #I #V1 #V2 #HK12 #HV12 #K #J #W #H destruct /2 width=5/
79 lemma ltpr_inv_pair2: ∀L1,K2,I,V2. L1 ➡ K2. 𝕓{I} V2 →
80 ∃∃K1,V1. K1 ➡ K2 & V1 ➡ V2 & L1 = K1. 𝕓{I} V1.
83 (* Basic forward lemmas *****************************************************)
85 lemma ltpr_fwd_length: ∀L1,L2. L1 ➡ L2 → |L1| = |L2|.
86 #L1 #L2 #H elim H -L1 -L2 normalize //
89 (* Basic_1: removed theorems 2: wcpr0_getl wcpr0_getl_back *)