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 "pointer_sequence.ma".
16 include "labelled_sequential_reduction.ma".
18 (* LABELLED SEQUENTIAL COMPUTATION (MULTISTEP) ******************************)
20 definition lsreds: pseq → relation term ≝ lstar … lsred.
22 interpretation "labelled sequential computation"
23 'SeqRedStar M s N = (lsreds s M N).
25 notation "hvbox( M break ⇀* [ term 46 s ] break term 46 N )"
26 non associative with precedence 45
27 for @{ 'SeqRedStar $M $s $N }.
29 lemma lsreds_step_rc: ∀p,M1,M2. M1 ⇀[p] M2 → M1 ⇀*[p::◊] M2.
33 lemma lsreds_inv_nil: ∀s,M1,M2. M1 ⇀*[s] M2 → ◊ = s → M1 = M2.
34 /2 width=5 by lstar_inv_nil/
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/
42 lemma lsreds_inv_step_rc: ∀p,M1,M2. M1 ⇀*[p::◊] M2 → M1 ⇀[p] M2.
43 /2 width=1 by lstar_inv_step/
46 lemma lsreds_inv_pos: ∀s,M1,M2. M1 ⇀*[s] M2 → 0 < |s| →
47 ∃∃p,r,M. p::r = s & M1 ⇀[p] M & M ⇀*[r] M2.
48 /2 width=1 by lstar_inv_pos/
51 lemma lsred_compatible_rc: ho_compatible_rc lsreds.
55 lemma lsred_compatible_sn: ho_compatible_sn lsreds.
59 lemma lsred_compatible_dx: ho_compatible_dx lsreds.
63 lemma lsreds_lift: ∀s. liftable (lsreds s).
67 lemma lsreds_inv_lift: ∀s. deliftable_sn (lsreds s).
68 /3 width=3 by lstar_deliftable_sn, lsred_inv_lift/
71 lemma lsreds_dsubst: ∀s. dsubstable_dx (lsreds s).
75 theorem lsreds_mono: ∀s. singlevalued … (lsreds s).
76 /3 width=7 by lstar_singlevalued, lsred_mono/
79 theorem lsreds_trans: ltransitive … lsreds.
80 /2 width=3 by lstar_ltransitive/
83 (* Note: "|s|" should be unparetesized *)
84 lemma lsreds_fwd_mult: ∀s,M1,M2. M1 ⇀*[s] M2 → #{M2} ≤ #{M1} ^ (2 ^ (|s|)).
85 #s #M1 #M2 #H @(lstar_ind_l ????????? H) -s -M1 normalize //
86 #p #s #M1 #M #HM1 #_ #IHM2
87 lapply (lsred_fwd_mult … HM1) -p #HM1
88 @(transitive_le … IHM2) -M2
89 /3 width=1 by le_exp1, lt_O_exp, lt_to_le/ (**) (* auto: slow without trace *)