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/predsnstar_5.ma".
16 include "static_2/relocation/lex.ma".
17 include "basic_2/rt_computation/cprs_ext.ma".
19 (* PARALLEL R-COMPUTATION FOR FULL LOCAL ENVIRONMENTS ***********************)
21 definition lprs (h) (n) (G): relation lenv ≝
22 lex (λL.cpms h G L n).
25 "parallel r-computation on all entries (local environment)"
26 'PRedSnStar h n G L1 L2 = (lprs h n G L1 L2).
28 (* Basic properties *********************************************************)
30 (* Basic_2A1: uses: lprs_pair_refl *)
31 lemma lprs_bind_refl_dx (h) (G): ∀L1,L2. ❨G,L1❩ ⊢ ➡*[h,0] L2 →
32 ∀I. ❨G,L1.ⓘ[I]❩ ⊢ ➡*[h,0] L2.ⓘ[I].
33 /2 width=1 by lex_bind_refl_dx/ qed.
35 lemma lprs_pair (h) (G): ∀L1,L2. ❨G,L1❩ ⊢ ➡*[h,0] L2 →
36 ∀V1,V2. ❨G,L1❩ ⊢ V1 ➡*[h,0] V2 →
37 ∀I. ❨G,L1.ⓑ[I]V1❩ ⊢ ➡*[h,0] L2.ⓑ[I]V2.
38 /2 width=1 by lex_pair/ qed.
40 lemma lprs_refl (h) (G): ∀L. ❨G,L❩ ⊢ ➡*[h,0] L.
41 /2 width=1 by lex_refl/ qed.
43 (* Basic inversion lemmas ***************************************************)
45 (* Basic_2A1: uses: lprs_inv_atom1 *)
46 lemma lprs_inv_atom_sn (h) (G): ∀L2. ❨G,⋆❩ ⊢ ➡*[h,0] L2 → L2 = ⋆.
47 /2 width=2 by lex_inv_atom_sn/ qed-.
49 (* Basic_2A1: was: lprs_inv_pair1 *)
50 lemma lprs_inv_pair_sn (h) (G):
51 ∀I,K1,L2,V1. ❨G,K1.ⓑ[I]V1❩ ⊢ ➡*[h,0] L2 →
52 ∃∃K2,V2. ❨G,K1❩ ⊢ ➡*[h,0] K2 & ❨G,K1❩ ⊢ V1 ➡*[h,0] V2 & L2 = K2.ⓑ[I]V2.
53 /2 width=1 by lex_inv_pair_sn/ qed-.
55 (* Basic_2A1: uses: lprs_inv_atom2 *)
56 lemma lprs_inv_atom_dx (h) (G): ∀L1. ❨G,L1❩ ⊢ ➡*[h,0] ⋆ → L1 = ⋆.
57 /2 width=2 by lex_inv_atom_dx/ qed-.
59 (* Basic_2A1: was: lprs_inv_pair2 *)
60 lemma lprs_inv_pair_dx (h) (G):
61 ∀I,L1,K2,V2. ❨G,L1❩ ⊢ ➡*[h,0] K2.ⓑ[I]V2 →
62 ∃∃K1,V1. ❨G,K1❩ ⊢ ➡*[h,0] K2 & ❨G,K1❩ ⊢ V1 ➡*[h,0] V2 & L1 = K1.ⓑ[I]V1.
63 /2 width=1 by lex_inv_pair_dx/ qed-.
65 (* Basic eliminators ********************************************************)
67 (* Basic_2A1: was: lprs_ind_alt *)
68 lemma lprs_ind (h) (G): ∀Q:relation lenv.
72 Q K1 K2 → Q (K1.ⓘ[I]) (K2.ⓘ[I])
75 ❨G,K1❩ ⊢ ➡*[h,0] K2 → ❨G,K1❩ ⊢ V1 ➡*[h,0] V2 →
76 Q K1 K2 → Q (K1.ⓑ[I]V1) (K2.ⓑ[I]V2)
78 ∀L1,L2. ❨G,L1❩ ⊢ ➡*[h,0] L2 → Q L1 L2.
79 /3 width=4 by lex_ind/ qed-.