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/lazypredsnstar_7.ma".
16 include "basic_2/reduction/llpx.ma".
17 include "basic_2/computation/llprs.ma".
19 (* LAZY SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS **************)
21 definition llpxs: ∀h. sd h → genv → relation4 ynat term lenv lenv ≝
22 λh,g,G,d. LTC … (llpx h g G d).
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).
27 (* Basic eliminators ********************************************************)
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) //
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) //
43 (* Basic properties *********************************************************)
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.
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.
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.
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.
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.
60 (* Basic forward lemmas *****************************************************)
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/
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/
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/
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/
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/