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