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_5.ma".
16 include "basic_2/reduction/llpr.ma".
18 (* LAZY SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ***********************)
20 definition llprs: genv → relation4 ynat term lenv lenv ≝
21 λG,d. LTC … (llpr G d).
23 interpretation "lazy parallel computation (local environment, sn variant)"
24 'LazyPRedSnStar G L1 L2 T d = (llprs G d T L1 L2).
26 (* Basic eliminators ********************************************************)
28 lemma llprs_ind: ∀G,L1,T,d. ∀R:predicate lenv. R L1 →
29 (∀L,L2. ⦃G, L1⦄ ⊢ ➡*[T, d] L → ⦃G, L⦄ ⊢ ➡[T, d] L2 → R L → R L2) →
30 ∀L2. ⦃G, L1⦄ ⊢ ➡*[T, d] L2 → R L2.
31 #G #L1 #T #d #R #HL1 #IHL1 #L2 #HL12
32 @(TC_star_ind … HL1 IHL1 … HL12) //
35 lemma llprs_ind_dx: ∀G,L2,T,d. ∀R:predicate lenv. R L2 →
36 (∀L1,L. ⦃G, L1⦄ ⊢ ➡[T, d] L → ⦃G, L⦄ ⊢ ➡*[T, d] L2 → R L → R L1) →
37 ∀L1. ⦃G, L1⦄ ⊢ ➡*[T, d] L2 → R L1.
38 #G #L2 #T #d #R #HL2 #IHL2 #L1 #HL12
39 @(TC_star_ind_dx … HL2 IHL2 … HL12) //
42 (* Basic properties *********************************************************)
44 lemma lpr_llprs: ∀G,L1,L2,T,d. ⦃G, L1⦄ ⊢ ➡[T, d] L2 → ⦃G, L1⦄ ⊢ ➡*[T, d] L2.
45 /2 width=1 by inj/ qed.
47 lemma llprs_refl: ∀G,L,T,d. ⦃G, L⦄ ⊢ ➡*[T, d] L.
48 /2 width=1 by lpr_llprs/ qed.
50 lemma llprs_strap1: ∀G,L1,L,L2,T,d. ⦃G, L1⦄ ⊢ ➡*[T, d] L → ⦃G, L⦄ ⊢ ➡[T, d] L2 → ⦃G, L1⦄ ⊢ ➡*[T, d] L2.
51 normalize /2 width=3 by step/ qed-.
53 lemma llprs_strap2: ∀G,L1,L,L2,T,d. ⦃G, L1⦄ ⊢ ➡[T, d] L → ⦃G, L⦄ ⊢ ➡*[T, d] L2 → ⦃G, L1⦄ ⊢ ➡*[T, d] L2.
54 normalize /2 width=3 by TC_strap/ qed-.
56 (* Basic forward lemmas *****************************************************)
58 lemma llprs_fwd_length: ∀G,L1,L2,T,d. ⦃G, L1⦄ ⊢ ➡*[T, d] L2 → |L1| = |L2|.
59 #G #L1 #L2 #T #d #H @(llprs_ind … H) -L2
60 /3 width=6 by llpr_fwd_length, trans_eq/