]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs.ma
update in lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / computation / lpxs.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_2A/notation/relations/predsnstar_5.ma".
16 include "basic_2A/reduction/lpx.ma".
17 include "basic_2A/computation/lprs.ma".
18
19 (* SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *******************)
20
21 definition lpxs: ∀h. sd h → relation3 genv lenv lenv ≝
22                  λh,g,G. TC … (lpx h g G).
23
24 interpretation "extended parallel computation (local environment, sn variant)"
25    'PRedSnStar h g G L1 L2 = (lpxs h g G L1 L2).
26
27 (* Basic eliminators ********************************************************)
28
29 lemma lpxs_ind: ∀h,g,G,L1. ∀R:predicate lenv. R L1 →
30                 (∀L,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L → ⦃G, L⦄ ⊢ ➡[h, g] L2 → R L → R L2) →
31                 ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → R L2.
32 #h #g #G #L1 #R #HL1 #IHL1 #L2 #HL12
33 @(TC_star_ind … HL1 IHL1 … HL12) //
34 qed-.
35
36 lemma lpxs_ind_dx: ∀h,g,G,L2. ∀R:predicate lenv. R L2 →
37                    (∀L1,L. ⦃G, L1⦄ ⊢ ➡[h, g] L → ⦃G, L⦄ ⊢ ➡*[h, g] L2 → R L → R L1) →
38                    ∀L1. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → R L1.
39 #h #g #G #L2 #R #HL2 #IHL2 #L1 #HL12
40 @(TC_star_ind_dx … HL2 IHL2 … HL12) //
41 qed-.
42
43 (* Basic properties *********************************************************)
44
45 lemma lprs_lpxs: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2.
46 /3 width=3 by lpr_lpx, monotonic_TC/ qed.
47
48 lemma lpx_lpxs: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2.
49 /2 width=1 by inj/ qed.
50
51 lemma lpxs_refl: ∀h,g,G,L. ⦃G, L⦄ ⊢ ➡*[h, g] L.
52 /2 width=1 by lprs_lpxs/ qed.
53
54 lemma lpxs_strap1: ∀h,g,G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L → ⦃G, L⦄ ⊢ ➡[h, g] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2.
55 /2 width=3 by step/ qed.
56
57 lemma lpxs_strap2: ∀h,g,G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L → ⦃G, L⦄ ⊢ ➡*[h, g] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2.
58 /2 width=3 by TC_strap/ qed.
59
60 lemma lpxs_pair_refl: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ∀I,V. ⦃G, L1.ⓑ{I}V⦄ ⊢ ➡*[h, g] L2.ⓑ{I}V.
61 /2 width=1 by TC_lpx_sn_pair_refl/ qed.
62
63 (* Basic inversion lemmas ***************************************************)
64
65 lemma lpxs_inv_atom1: ∀h,g,G,L2. ⦃G, ⋆⦄ ⊢ ➡*[h, g] L2 → L2 = ⋆.
66 /2 width=2 by TC_lpx_sn_inv_atom1/ qed-.
67
68 lemma lpxs_inv_atom2: ∀h,g,G,L1. ⦃G, L1⦄ ⊢ ➡*[h, g] ⋆ → L1 = ⋆.
69 /2 width=2 by TC_lpx_sn_inv_atom2/ qed-.
70
71 (* Basic forward lemmas *****************************************************)
72
73 lemma lpxs_fwd_length: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → |L1| = |L2|.
74 /2 width=2 by TC_lpx_sn_fwd_length/ qed-.