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 CLOSURES ******************************)
19 definition fpr: bi_relation lenv term ≝
20 λL1,T1,L2,T2. |L1| = |L2| ∧ L1 @@ T1 ➡ L2 @@ T2.
23 "context-free parallel reduction (closure)"
24 'FocalizedPRed L1 T1 L2 T2 = (fpr L1 T1 L2 T2).
26 (* Basic properties *********************************************************)
28 lemma fpr_refl: bi_reflexive … fpr.
31 lemma fpr_shift: ∀I1,I2,L1,L2,V1,V2,T1,T2.
32 ⦃L1, -ⓑ{I1}V1.T1⦄ ➡ ⦃L2, -ⓑ{I2}V2.T2⦄ →
33 ⦃L1.ⓑ{I1}V1, T1⦄ ➡ ⦃L2.ⓑ{I2}V2, T2⦄.
34 #I1 #I2 #L1 #L2 #V1 #V2 #T1 #T2 * #HL12 #HT12
35 @conj // normalize // (**) (* explicit constructor *)
38 (* Basic inversion lemmas ***************************************************)
40 lemma fpr_inv_atom1: ∀L2,T1,T2. ⦃⋆, T1⦄ ➡ ⦃L2, T2⦄ → T1 ➡ T2 ∧ L2 = ⋆.
42 lapply (length_inv_zero_sn … H) -H #H destruct /2 width=1/
45 lemma fpr_inv_atom3: ∀L1,T1,T2. ⦃L1,T1⦄ ➡ ⦃⋆,T2⦄ → T1 ➡ T2 ∧ L1 = ⋆.
47 lapply (length_inv_zero_dx … H) -H #H destruct /2 width=1/
50 (* Basic forward lemmas *****************************************************)
52 lemma fpr_fwd_pair1: ∀I1,K1,L2,V1,T1,T2. ⦃K1.ⓑ{I1}V1, T1⦄ ➡ ⦃L2, T2⦄ →
53 ∃∃I2,K2,V2. ⦃K1, -ⓑ{I1}V1.T1⦄ ➡ ⦃K2, -ⓑ{I2}V2.T2⦄ &
55 #I1 #K1 #L2 #V1 #T1 #T2 * #H
56 elim (length_inv_pos_sn … H) -H #I2 #K2 #V2 #HK12 #H destruct /3 width=5/
59 lemma fpr_fwd_pair3: ∀I2,L1,K2,V2,T1,T2. ⦃L1, T1⦄ ➡ ⦃K2.ⓑ{I2}V2, T2⦄ →
60 ∃∃I1,K1,V1. ⦃K1, -ⓑ{I1}V1.T1⦄ ➡ ⦃K2, -ⓑ{I2}V2.T2⦄ &
62 #I2 #L1 #K2 #V2 #T1 #T2 * #H
63 elim (length_inv_pos_dx … H) -H #I1 #K1 #V1 #HK12 #H destruct /3 width=5/