]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda/labelled_sequential_computation.ma
- lambda: first half of the standardization theorem is proved!
[helm.git] / matita / matita / contribs / lambda / labelled_sequential_computation.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 "pointer_sequence.ma".
16 include "labelled_sequential_reduction.ma".
17
18 (* LABELLED SEQUENTIAL COMPUTATION (MULTISTEP) ******************************)
19
20 definition lsreds: pseq → relation term ≝ lstar … lsred.
21
22 interpretation "labelled sequential computation"
23    'SeqRedStar M s N = (lsreds s M N).
24
25 notation "hvbox( M break ⇀* [ term 46 s ] break term 46 N )"
26    non associative with precedence 45
27    for @{ 'SeqRedStar $M $s $N }.
28
29 lemma lsreds_step_rc: ∀p,M1,M2. M1 ⇀[p] M2 → M1 ⇀*[p::◊] M2.
30 /2 width=1/
31 qed.
32
33 lemma lsreds_inv_nil: ∀s,M1,M2. M1 ⇀*[s] M2 → ◊ = s → M1 = M2.
34 /2 width=5 by lstar_inv_nil/
35 qed-.
36
37 lemma lsreds_inv_cons: ∀s,M1,M2. M1 ⇀*[s] M2 → ∀q,r. q::r = s →
38                        ∃∃M. M1 ⇀[q] M & M ⇀*[r] M2.
39 /2 width=3 by lstar_inv_cons/
40 qed-.
41
42 lemma lsreds_inv_step_rc: ∀p,M1,M2. M1 ⇀*[p::◊] M2 → M1 ⇀[p] M2.
43 /2 width=1 by lstar_inv_step/
44 qed-.
45
46 lemma lsred_compatible_rc: ho_compatible_rc lsreds.
47 /3 width=1/
48 qed.
49
50 lemma lsred_compatible_sn: ho_compatible_sn lsreds.
51 /3 width=1/
52 qed.
53
54 lemma lsred_compatible_dx: ho_compatible_dx lsreds.
55 /3 width=1/
56 qed.
57
58 lemma lsreds_lift: ∀s. liftable (lsreds s).
59 /2 width=1/
60 qed.
61
62 lemma lsreds_inv_lift: ∀s. deliftable_sn (lsreds s).
63 /3 width=3 by lstar_deliftable_sn, lsred_inv_lift/
64 qed-.
65
66 lemma lsreds_dsubst: ∀s. dsubstable_dx (lsreds s).
67 /2 width=1/
68 qed.
69
70 theorem lsreds_mono: ∀s. singlevalued … (lsreds s).
71 /3 width=7 by lstar_singlevalued, lsred_mono/
72 qed-.
73
74 theorem lsreds_trans: ltransitive … lsreds.
75 /2 width=3 by lstar_ltransitive/
76 qed-.
77
78 (* Note: "|s|" should be unparetesized *)
79 lemma lsreds_fwd_mult: ∀s,M1,M2. M1 ⇀*[s] M2 → #{M2} ≤ #{M1} ^ (2 ^ (|s|)).
80 #s #M1 #M2 #H @(lstar_ind_l ????????? H) -s -M1 normalize //
81 #p #s #M1 #M #HM1 #_ #IHM2
82 lapply (lsred_fwd_mult … HM1) -p #HM1
83 @(transitive_le … IHM2) -M2
84 /3 width=1 by le_exp1, lt_O_exp, lt_to_le/ (**) (* auto: slow without trace *)
85 qed-.