]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/reduction/fpbc.ma
c560a1ab07c6383342d863db47dab2bc1036d9af
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / reduction / fpbc.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "basic_2/notation/relations/btpredproper_8.ma".
16 include "basic_2/reduction/fpb.ma".
17
18 (* "BIG TREE" PROPER PARALLEL REDUCTION FOR CLOSURES ************************)
19
20 inductive fpbc (h) (g) (G1) (L1) (T1): relation3 genv lenv term ≝
21 | fpbc_fqu: ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ → fpbc h g G1 L1 T1 G2 L2 T2
22 | fpbc_cpx: ∀T2. ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → fpbc h g G1 L1 T1 G1 L1 T2
23 .
24
25 interpretation
26    "'big tree' proper parallel reduction (closure)"
27    'BTPRedProper h g G1 L1 T1 G2 L2 T2 = (fpbc h g G1 L1 T1 G2 L2 T2).
28
29 (* Basic properties *********************************************************)
30
31 lemma cpr_fpbc: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → (T1 = T2 → ⊥) →
32                 ⦃G, L, T1⦄ ≻[h, g] ⦃G, L, T2⦄.
33 /3 width=1 by fpbc_cpx, cpr_cpx/ qed.
34
35 lemma fpb_fpbc_or_fpn: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ →
36                        ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ ∨
37                        ⦃G1, L1, T1⦄ ⊢ ➡[h,g] ⦃G2, L2, T2⦄.
38 #h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
39 /3 width=1 by and3_intro, or_intror/
40 [ #G2 #L2 #T2 #H elim (fquq_inv_gen … H) -H [| * ]
41   /3 width=1 by fpbc_fqu, and3_intro, or_introl, or_intror/
42 | #T2 #HT12 elim (term_eq_dec T1 T2) #H destruct
43   /4 width=1 by and3_intro, or_introl, or_intror, fpbc_cpx/
44 ]
45 qed-.
46
47 lemma fpb_fpbc: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ →
48                 (⦃G1, L1, T1⦄ ⋕ ⦃G2, L2, T2⦄ → ⊥) →
49                 ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄.
50 #h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #H0 elim (fpb_fpbc_or_fpn … H) -H //
51 #H elim H0 -H0 /2 width=3 by fpn_fwd_bteq/
52 qed.
53
54 (* Basic forward lemmas *****************************************************)
55
56 lemma fpbc_fwd_fpb: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ →
57                     ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄.
58 #h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
59 /3 width=1 by fpb_fquq, fpb_cpx, fqu_fquq/
60 qed-.
61
62 lemma fpbc_fwd_bteq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ →
63                      ⦃G1, L1, T1⦄ ⋕ ⦃G2, L2, T2⦄ → ⊥.
64 #h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 /2 width=8 by fqu_fwd_bteq/
65 #T2 #_ #HT12 * /2 width=1 by/
66 qed-.