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_5.ma".
16 include "static_2/relocation/lex.ma".
17 include "basic_2/rt_transition/cpr_ext.ma".
19 (* PARALLEL R-TRANSITION FOR FULL LOCAL ENVIRONMENTS ************************)
21 definition lpr (h) (n) (G): relation lenv ≝
22 lex (λL. cpm h G L n).
25 "parallel rt-transition (full local environment)"
26 'PRedSn h n G L1 L2 = (lpr h n G L1 L2).
28 (* Basic properties *********************************************************)
30 lemma lpr_bind (h) (G): ∀K1,K2. ❪G,K1❫ ⊢ ➡[h,0] K2 →
31 ∀I1,I2. ❪G,K1❫ ⊢ I1 ➡[h,0] I2 → ❪G,K1.ⓘ[I1]❫ ⊢ ➡[h,0] K2.ⓘ[I2].
32 /2 width=1 by lex_bind/ qed.
35 lemma lpr_refl (h) (G): reflexive … (lpr h 0 G).
36 /2 width=1 by lex_refl/ qed.
38 (* Advanced properties ******************************************************)
40 lemma lpr_bind_refl_dx (h) (G): ∀K1,K2. ❪G,K1❫ ⊢ ➡[h,0] K2 →
41 ∀I. ❪G,K1.ⓘ[I]❫ ⊢ ➡[h,0] K2.ⓘ[I].
42 /2 width=1 by lex_bind_refl_dx/ qed.
44 lemma lpr_pair (h) (G): ∀K1,K2,V1,V2. ❪G,K1❫ ⊢ ➡[h,0] K2 → ❪G,K1❫ ⊢ V1 ➡[h,0] V2 →
45 ∀I. ❪G,K1.ⓑ[I]V1❫ ⊢ ➡[h,0] K2.ⓑ[I]V2.
46 /2 width=1 by lex_pair/ qed.
48 (* Basic inversion lemmas ***************************************************)
50 (* Basic_2A1: was: lpr_inv_atom1 *)
51 (* Basic_1: includes: wcpr0_gen_sort *)
52 lemma lpr_inv_atom_sn (h) (G): ∀L2. ❪G,⋆❫ ⊢ ➡[h,0] L2 → L2 = ⋆.
53 /2 width=2 by lex_inv_atom_sn/ qed-.
55 lemma lpr_inv_bind_sn (h) (G): ∀I1,L2,K1. ❪G,K1.ⓘ[I1]❫ ⊢ ➡[h,0] L2 →
56 ∃∃I2,K2. ❪G,K1❫ ⊢ ➡[h,0] K2 & ❪G,K1❫ ⊢ I1 ➡[h,0] I2 &
58 /2 width=1 by lex_inv_bind_sn/ qed-.
60 (* Basic_2A1: was: lpr_inv_atom2 *)
61 lemma lpr_inv_atom_dx (h) (G): ∀L1. ❪G,L1❫ ⊢ ➡[h,0] ⋆ → L1 = ⋆.
62 /2 width=2 by lex_inv_atom_dx/ qed-.
64 lemma lpr_inv_bind_dx (h) (G): ∀I2,L1,K2. ❪G,L1❫ ⊢ ➡[h,0] K2.ⓘ[I2] →
65 ∃∃I1,K1. ❪G,K1❫ ⊢ ➡[h,0] K2 & ❪G,K1❫ ⊢ I1 ➡[h,0] I2 &
67 /2 width=1 by lex_inv_bind_dx/ qed-.
69 (* Advanced inversion lemmas ************************************************)
71 lemma lpr_inv_unit_sn (h) (G): ∀I,L2,K1. ❪G,K1.ⓤ[I]❫ ⊢ ➡[h,0] L2 →
72 ∃∃K2. ❪G,K1❫ ⊢ ➡[h,0] K2 & L2 = K2.ⓤ[I].
73 /2 width=1 by lex_inv_unit_sn/ qed-.
75 (* Basic_2A1: was: lpr_inv_pair1 *)
76 (* Basic_1: includes: wcpr0_gen_head *)
77 lemma lpr_inv_pair_sn (h) (G): ∀I,L2,K1,V1. ❪G,K1.ⓑ[I]V1❫ ⊢ ➡[h,0] L2 →
78 ∃∃K2,V2. ❪G,K1❫ ⊢ ➡[h,0] K2 & ❪G,K1❫ ⊢ V1 ➡[h,0] V2 &
80 /2 width=1 by lex_inv_pair_sn/ qed-.
82 lemma lpr_inv_unit_dx (h) (G): ∀I,L1,K2. ❪G,L1❫ ⊢ ➡[h,0] K2.ⓤ[I] →
83 ∃∃K1. ❪G,K1❫ ⊢ ➡[h,0] K2 & L1 = K1.ⓤ[I].
84 /2 width=1 by lex_inv_unit_dx/ qed-.
86 (* Basic_2A1: was: lpr_inv_pair2 *)
87 lemma lpr_inv_pair_dx (h) (G): ∀I,L1,K2,V2. ❪G,L1❫ ⊢ ➡[h,0] K2.ⓑ[I]V2 →
88 ∃∃K1,V1. ❪G,K1❫ ⊢ ➡[h,0] K2 & ❪G,K1❫ ⊢ V1 ➡[h,0] V2 &
90 /2 width=1 by lex_inv_pair_dx/ qed-.
92 lemma lpr_inv_pair (h) (G): ∀I1,I2,L1,L2,V1,V2. ❪G,L1.ⓑ[I1]V1❫ ⊢ ➡[h,0] L2.ⓑ[I2]V2 →
93 ∧∧ ❪G,L1❫ ⊢ ➡[h,0] L2 & ❪G,L1❫ ⊢ V1 ➡[h,0] V2 & I1 = I2.
94 /2 width=1 by lex_inv_pair/ qed-.
96 (* Basic_1: removed theorems 3: wcpr0_getl wcpr0_getl_back