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/btpredproper_8.ma".
16 include "basic_2/reduction/ypr.ma".
18 (* "BIG TREE" PROPER PARALLEL REDUCTION FOR CLOSURES ************************)
20 inductive ysc (h) (g) (G1) (L1) (T1): relation3 genv lenv term ≝
21 | ysc_fsup : ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ → ysc h g G1 L1 T1 G2 L2 T2
22 | ysc_cpr : ∀T2. ⦃G1, L1⦄ ⊢ T1 ➡ T2 → (T1 = T2 → ⊥) → ysc h g G1 L1 T1 G1 L1 T2
23 | ysc_ssta : ∀T2,l. ⦃G1, L1⦄ ⊢ T1 ▪[h, g] l+1 → ⦃G1, L1⦄ ⊢ T1 •[h, g] T2 → ysc h g G1 L1 T1 G1 L1 T2
27 "'big tree' proper parallel reduction (closure)"
28 'BTPRedProper h g G1 L1 T1 G2 L2 T2 = (ysc h g G1 L1 T1 G2 L2 T2).
30 (* Basic properties *********************************************************)
32 lemma ysc_ypr: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ →
33 ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄.
34 #h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
35 /2 width=2 by ypr_fsup, ypr_cpr, ypr_ssta/
38 (* Inversion lemmas on "big tree" parallel reduction for closures ***********)
40 lemma ypr_inv_ysc: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ →
41 ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ ∨
42 ∧∧ G1 = G2 & ⦃G1, L1⦄ ⊢ ➡ L2 & T1 = T2.
43 #h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
44 /3 width=2 by and3_intro, or_introl, or_intror, ysc_fsup, ysc_ssta/
45 #T2 #HT12 elim (term_eq_dec T1 T2) #H destruct
46 /4 width=1 by and3_intro, or_introl, or_intror, ysc_cpr/