]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/computation/fpbs.ma
- big-tree reduction is now based on extended reduction
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / computation / fpbs.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/btpredstar_8.ma".
16 include "basic_2/substitution/fsupp.ma".
17 include "basic_2/reduction/fpb.ma".
18 include "basic_2/computation/cpxs.ma".
19 include "basic_2/computation/lpxs.ma".
20
21 (* "BIG TREE" PARALLEL COMPUTATION FOR CLOSURES *****************************)
22
23 definition fpbs: ∀h. sd h → tri_relation genv lenv term ≝
24                  λh,g. tri_TC … (fpb h g).
25
26 interpretation "'big tree' parallel computation (closure)"
27    'BTPRedStar h g G1 L1 T1 G2 L2 T2 = (fpbs h g G1 L1 T1 G2 L2 T2).
28
29 (* Basic eliminators ********************************************************)
30
31 lemma fpbs_ind: ∀h,g,G1,L1,T1. ∀R:relation3 genv lenv term. R G1 L1 T1 →
32                 (∀L,G2,G,L2,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≽[h, g] ⦃G2, L2, T2⦄ → R G L T → R G2 L2 T2) →
33                 ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2.
34 /3 width=8 by tri_TC_star_ind/ qed-.
35
36 lemma fpbs_ind_dx: ∀h,g,G2,L2,T2. ∀R:relation3 genv lenv term. R G2 L2 T2 →
37                    (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → R G L T → R G1 L1 T1) →
38                    ∀G1,L1,T1. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → R G1 L1 T1.
39 /3 width=8 by tri_TC_star_ind_dx/ qed-.
40
41 (* Basic properties *********************************************************)
42
43 lemma fpbs_refl: ∀h,g. tri_reflexive … (fpbs h g).
44 /2 width=1 by tri_inj/ qed.
45
46 lemma fpb_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ →
47                 ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄.
48 /2 width=1 by tri_inj/ qed.
49
50 lemma fpbs_strap1: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ →
51                    ⦃G, L, T⦄ ≽[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄.
52 /2 width=5 by tri_step/ qed-.
53
54 lemma fpbs_strap2: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ →
55                    ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄.
56 /2 width=5 by tri_TC_strap/ qed-.
57
58 (* Note: this is a general property of bi_TC *)
59 lemma fsupp_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃+ ⦃G2, L2, T2⦄ →
60                   ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄.
61 #h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fsupp_ind … L2 T2 H) -G2 -L2 -T2
62 /3 width=5 by fpb_fsup, tri_step, fpb_fpbs/
63 qed.
64
65 lemma cpxs_fpbs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L, T1⦄ ≥[h, g] ⦃G, L, T2⦄.
66 #h #g #G #L #T1 #T2 #H @(cpxs_ind … H) -T2 
67 /3 width=5 by fpb_cpx, fpbs_strap1/
68 qed.
69
70 lemma lpxs_fpbs: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄.
71 #h #g #G #L1 #L2 #T #H @(lpxs_ind … H) -L2
72 /3 width=5 by fpb_lpx, fpbs_strap1/
73 qed.
74
75 lemma cprs_fpbs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L, T1⦄ ≥[h, g] ⦃G, L, T2⦄.
76 /3 width=1 by cprs_cpxs, cpxs_fpbs/ qed.
77
78 lemma lprs_fpbs: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄.
79 /3 width=1 by lprs_lpxs, lpxs_fpbs/ qed.
80
81 lemma cpr_lpr_fpbs: ∀h,g,G,L1,L2,T1,T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ⦃G, L1⦄ ⊢ ➡ L2 →
82                     ⦃G, L1, T1⦄ ≥[h, g] ⦃G, L2, T2⦄.
83 /4 width=5 by fpbs_strap1, lpr_fpb, cpr_fpb/ qed.