]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/computation/llpxs.ma
commit of the "computation" component with lazy pointwise extensions
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / computation / llpxs.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/lazypredsnstar_7.ma".
16 include "basic_2/reduction/llpx.ma".
17 include "basic_2/computation/llprs.ma".
18
19 (* LAZY SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS **************)
20
21 definition llpxs: ∀h. sd h → genv → relation4 ynat term lenv lenv ≝
22                   λh,g,G,d. LTC … (llpx h g G d).
23
24 interpretation "lazy extended parallel computation (local environment, sn variant)"
25    'LazyPRedSnStar G L1 L2 h g T d = (llpxs h g G d T L1 L2).
26
27 (* Basic eliminators ********************************************************)
28
29 lemma llpxs_ind: ∀h,g,G,L1,T,d. ∀R:predicate lenv. R L1 →
30                  (∀L,L2. ⦃G, L1⦄ ⊢ ➡*[h, g, T, d] L → ⦃G, L⦄ ⊢ ➡[h, g, T, d] L2 → R L → R L2) →
31                  ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g, T, d] L2 → R L2.
32 #h #g #G #L1 #T #d #R #HL1 #IHL1 #L2 #HL12
33 @(TC_star_ind … HL1 IHL1 … HL12) //
34 qed-.
35
36 lemma llpxs_ind_dx: ∀h,g,G,L2,T,d. ∀R:predicate lenv. R L2 →
37                     (∀L1,L. ⦃G, L1⦄ ⊢ ➡[h, g, T, d] L → ⦃G, L⦄ ⊢ ➡*[h, g, T, d] L2 → R L → R L1) →
38                     ∀L1. ⦃G, L1⦄ ⊢ ➡*[h, g, T, d] L2 → R L1.
39 #h #g #G #L2 #T #d #R #HL2 #IHL2 #L1 #HL12
40 @(TC_star_ind_dx … HL2 IHL2 … HL12) //
41 qed-.
42
43 (* Basic properties *********************************************************)
44
45 lemma llprs_llpxs: ∀h,g,G,L1,L2,T,d. ⦃G, L1⦄ ⊢ ➡*[T, d] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g, T, d] L2.
46 normalize /3 width=3 by llpr_llpx, monotonic_TC/ qed.
47
48 lemma llpx_llpxs: ∀h,g,G,L1,L2,T,d. ⦃G, L1⦄ ⊢ ➡[h, g, T, d] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g, T, d] L2.
49 normalize /2 width=1 by inj/ qed.
50
51 lemma llpxs_refl: ∀h,g,G,L,T,d. ⦃G, L⦄ ⊢ ➡*[h, g, T, d] L.
52 /2 width=1 by llpx_llpxs/ qed.
53
54 lemma llpxs_strap1: ∀h,g,G,L1,L,L2,T,d. ⦃G, L1⦄ ⊢ ➡*[h, g, T, d] L → ⦃G, L⦄ ⊢ ➡[h, g, T, d] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g, T, d] L2.
55 normalize /2 width=3 by step/ qed.
56
57 lemma llpxs_strap2: ∀h,g,G,L1,L,L2,T,d. ⦃G, L1⦄ ⊢ ➡[h, g, T, d] L → ⦃G, L⦄ ⊢ ➡*[h, g, T, d] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g, T, d] L2.
58 normalize /2 width=3 by TC_strap/ qed.
59
60 (* Basic forward lemmas *****************************************************)
61
62 lemma llpxs_fwd_length: ∀h,g,G,L1,L2,T,d. ⦃G, L1⦄ ⊢ ➡*[h, g, T, d] L2 → |L1| = |L2|.
63 #h #g #G #L1 #L2 #T #d #H @(llpxs_ind … H) -L2
64 /3 width=8 by llpx_fwd_length, trans_eq/
65 qed-.
66
67 (* Note: this might be moved *)
68 lemma llpxs_fwd_bind_sn: ∀h,g,a,I,G,L1,L2,V,T,d. ⦃G, L1⦄ ⊢ ➡*[h, g, ⓑ{a,I}V.T, d] L2 →
69                          ⦃G, L1⦄ ⊢ ➡*[h, g, V, d] L2.
70 #h #g #a #I #G #L1 #L2 #V #T #d #H @(llpxs_ind … H) -L2
71 /3 width=6 by llpx_fwd_bind_sn, llpxs_strap1/
72 qed-.
73
74 (* Note: this might be moved *)
75 lemma llpxs_fwd_bind_dx: ∀h,g,a,I,G,L1,L2,V,T,d. ⦃G, L1⦄ ⊢ ➡*[h, g, ⓑ{a,I}V.T, d] L2 →
76                          ⦃G, L1.ⓑ{I}V⦄ ⊢ ➡*[h, g, T, ⫯d] L2.ⓑ{I}V.
77 #h #g #a #I #G #L1 #L2 #V #T #d #H @(llpxs_ind … H) -L2
78 /3 width=6 by llpx_fwd_bind_dx, llpxs_strap1/
79 qed-.
80
81 (* Note: this might be moved *)
82 lemma llpxs_fwd_flat_sn: ∀h,g,I,G,L1,L2,V,T,d. ⦃G, L1⦄ ⊢ ➡*[h, g, ⓕ{I}V.T, d] L2 →
83                          ⦃G, L1⦄ ⊢ ➡*[h, g, V, d] L2.
84 #h #g #I #G #L1 #L2 #V #T #d #H @(llpxs_ind … H) -L2
85 /3 width=6 by llpx_fwd_flat_sn, llpxs_strap1/
86 qed-.
87
88 (* Note: this might be moved *)
89 lemma llpxs_fwd_flat_dx: ∀h,g,I,G,L1,L2,V,T,d. ⦃G, L1⦄ ⊢ ➡*[h, g, ⓕ{I}V.T, d] L2 →
90                          ⦃G, L1⦄ ⊢ ➡*[h, g, T, d] L2.
91 #h #g #I #G #L1 #L2 #V #T #d #H @(llpxs_ind … H) -L2
92 /3 width=6 by llpx_fwd_flat_dx, llpxs_strap1/
93 qed-.