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 notation "hvbox( L ⊢ break ⦃ term 46 L1, break term 46 T1 ⦄ ➡ break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
16 non associative with precedence 45
17 for @{ 'FocalizedPRed $L $L1 $T1 $L2 $T2 }.
19 include "basic_2/reducibility/cpr.ma".
20 include "basic_2/reducibility/fpr.ma".
22 (* CONTEXT-SENSITIVE PARALLEL REDUCTION ON CLOSURES *************************)
24 definition cfpr: lenv → bi_relation lenv term ≝
25 λL,L1,T1,L2,T2. |L1| = |L2| ∧ L ⊢ L1 @@ T1 ➡ L2 @@ T2.
28 "context-sensitive parallel reduction (closure)"
29 'FocalizedPRed L L1 T1 L2 T2 = (cfpr L L1 T1 L2 T2).
31 (* Basic properties *********************************************************)
33 lemma cfpr_refl: ∀L. bi_reflexive … (cfpr L).
36 lemma fpr_cfpr: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⋆ ⊢ ⦃L1, T1⦄ ➡ ⦃L2, T2⦄.
37 #L1 #L2 #T1 #T2 * /3 width=1/
40 (* Basic inversion lemmas ***************************************************)
42 lemma cfpr_inv_atom1: ∀L,L2,T1,T2. L ⊢ ⦃⋆, T1⦄ ➡ ⦃L2, T2⦄ → L ⊢ T1 ➡ T2 ∧ L2 = ⋆.
43 #L #L2 #T1 #T2 * #H >(length_inv_zero_sn … H) /2 width=1/
46 (* Advanced inversion lemmas ************************************************)
48 lemma fpr_inv_pair1_sn: ∀I,K1,L2,V1,T1,T2. ⦃⋆.ⓑ{I}V1@@K1, T1⦄ ➡ ⦃L2, T2⦄ →
50 ⋆.ⓑ{I}V2 ⊢ ⦃K1, T1⦄ ➡ ⦃K2, T2⦄ &
52 #I1 #K1 #L2 #V1 #T1 #T2 * >append_length #H
53 elim (length_inv_pos_sn_append … H) -H #I2 #K2 #V2 #HK12 #H destruct
54 >shift_append_assoc >shift_append_assoc normalize in ⊢ (%→?); #H
55 elim (tpr_inv_bind1 … H) -H *
56 [ #V0 #T #T0 #HV10 #HT1 #HT0 #H destruct /5 width=5/
57 | #T0 #_ #_ #H destruct