]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/computation/cpds.ma
- basic_2: reaxiomatized snv with improved cpds and cpes simplifies preservation
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / computation / cpds.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/dpredstar_7.ma".
16 include "basic_2/static/da.ma".
17 include "basic_2/unfold/lstas.ma".
18 include "basic_2/computation/cprs.ma".
19
20 (* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************)
21
22 definition cpds: ∀h. sd h → nat → relation4 genv lenv term term ≝
23                  λh,g,l2,G,L,T1,T2.
24                  ∃∃T,l1. l2 ≤ l1 & ⦃G, L⦄ ⊢ T1 ▪[h, g] l1 & ⦃G, L⦄ ⊢ T1 •*[h, l2] T & ⦃G, L⦄ ⊢ T ➡* T2.
25
26 interpretation "decomposed extended parallel computation (term)"
27    'DPRedStar h g l G L T1 T2 = (cpds h g l G L T1 T2).
28
29 (* Basic properties *********************************************************)
30
31 lemma sta_cprs_cpds: ∀h,g,G,L,T1,T,T2,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l+1 → ⦃G, L⦄ ⊢ T1 •[h] T →
32                      ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 1] T2.
33 /3 width=6 by sta_lstas, ex4_2_intro/ qed.
34
35 lemma lstas_cpds: ∀h,g,G,L,T1,T2,l1. ⦃G, L⦄ ⊢ T1 ▪[h, g] l1 →
36                   ∀l2. l2 ≤ l1 → ⦃G, L⦄ ⊢ T1 •*[h, l2] T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, l2] T2.
37 /2 width=6 by ex4_2_intro/ qed.
38
39 lemma cprs_cpds: ∀h,g,G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l → ⦃G, L⦄ ⊢ T1 ➡* T2 →
40                  ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 0] T2.
41 /2 width=6 by lstar_O, ex4_2_intro/ qed.
42
43 lemma cpds_refl: ∀h,g,G,L,T,l. ⦃G, L⦄ ⊢ T ▪[h, g] l → ⦃G, L⦄ ⊢ T •*➡*[h, g, 0] T.
44 /2 width=2 by cprs_cpds/ qed.
45
46 lemma cpds_strap1: ∀h,g,G,L,T1,T,T2,l.
47                    ⦃G, L⦄ ⊢ T1 •*➡*[h, g, l] T → ⦃G, L⦄ ⊢ T ➡ T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, l] T2.
48 #h #g #G #L #T1 #T #T2 #l * /3 width=8 by cprs_strap1, ex4_2_intro/
49 qed.
50
51 (* Basic forward lemmas *****************************************************)
52
53 lemma cpds_fwd_cprs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 0] T2 →
54                      ⦃G, L⦄ ⊢ T1 ➡* T2.
55 #h #g #G #L #T1 #T2 *
56 #T #l #_ #_ #H lapply (lstas_inv_O … H) -l -H
57 #H destruct //
58 qed-.