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/grammar/lenv_px_bi.ma".
16 include "basic_2/reducibility/fpr_cpr.ma".
17 include "basic_2/reducibility/lfpr_fpr.ma".
19 (* FOCALIZED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS **********************)
21 (* alternative definition *)
22 definition lfpra: relation lenv ≝ lpx_bi fpr.
25 "focalized parallel reduction (environment) alternative"
26 'FocalizedPRedAlt L1 L2 = (lfpra L1 L2).
28 (* Basic properties *********************************************************)
30 lemma lfpra_refl: reflexive … lfpra.
33 lemma fpr_lfpra: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⦃L1⦄ ➡➡ ⦃L2⦄.
36 elim (fpr_inv_atom1 … H) -H #_ #H destruct //
37 | #L1 #I #V1 #IH #L2 #T1 #T2 #H
38 elim (fpr_inv_pair1 … H) -H #L #V #HV1 #HL1 #H destruct /3 width=3/
42 (* Basic inversion lemmas ***************************************************)
44 lemma lfpra_inv_atom1: ∀L2. ⦃⋆⦄ ➡➡ ⦃L2⦄ → L2 = ⋆.
45 /2 width=2 by lpx_bi_inv_atom1/ qed-.
47 lemma lfpra_inv_pair1: ∀K1,I,V1,L2. ⦃K1. ⓑ{I} V1⦄ ➡➡ ⦃L2⦄ →
48 ∃∃K2,V2. ⦃K1⦄ ➡➡ ⦃K2⦄ & ⦃K1, V1⦄ ➡ ⦃K2, V2⦄ &
50 /2 width=1 by lpx_bi_inv_pair1/ qed-.
52 lemma lfpra_inv_atom2: ∀L1. ⦃L1⦄ ➡➡ ⦃⋆⦄ → L1 = ⋆.
53 /2 width=2 by lpx_bi_inv_atom2/ qed-.
55 lemma lfpra_inv_pair2: ∀L1,K2,I,V2. ⦃L1⦄ ➡➡ ⦃K2. ⓑ{I} V2⦄ →
56 ∃∃K1,V1. ⦃K1⦄ ➡➡ ⦃K2⦄ & ⦃K1, V1⦄ ➡ ⦃K2, V2⦄ &
58 /2 width=1 by lpx_bi_inv_pair2/ qed-.
60 lemma lfpra_inv_fpr: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → ∀T.⦃L1, T⦄ ➡ ⦃L2, T⦄.
61 #L1 #L2 * -L1 -L2 // /3 width=1/
64 (* Basic forward lemmas *****************************************************)
66 lemma lfpra_fwd_length: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → |L1| = |L2|.
67 /2 width=2 by lpx_bi_fwd_length/ qed-.
69 (* Main properties **********************************************************)
71 theorem lfpr_lfpra: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ⦃L1⦄ ➡➡ ⦃L2⦄.
73 lapply (lfpr_inv_fpr … H (⋆0)) -H /2 width=3/
76 theorem lfpra_lfpr: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → ⦃L1⦄ ➡ ⦃L2⦄.
78 lapply (lfpra_inv_fpr … H (⋆0)) -H /2 width=3/