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 "lambda/terms/sequential_computation.ma".
17 (* ABSTRACT LABELED SEQUENTIAL COMPUTATION (MULTISTEP) **********************)
19 definition l_sreds: ∀S. (S→relation term) → list S → relation term ≝
22 lemma sreds_l_sreds: ∀S,R. (∀M,N. M ↦ N → ∃a. R a M N) →
23 ∀M,N. M ↦* N → ∃l. l_sreds S R l M N.
24 #S #R #HR #M #N #H elim H -N
25 [ #N #N0 #_ #HN0 * #l #HMN
26 elim (HR … HN0) -HR -HN0 /3 width=5/
31 lemma l_sreds_inv_sreds: ∀S,R. (∀a,M,N. R a M N → M ↦ N) →
32 ∀l,M,N. l_sreds S R l M N → M ↦* N.
33 #S #R #HR #l #M #N #H elim H -N // /3 by star_compl/
36 (* Note: "|s|" should be unparetesized *)
37 lemma l_sreds_fwd_mult: ∀S,R. (∀a,M,N. R a M N → M ↦ N) →
38 ∀l,M1,M2. l_sreds S R l M1 M2 →
39 ♯{M2} ≤ ♯{M1} ^ (2 ^ (|l|)).
40 #S #R #HR #l #M1 #M2 #H @(lstar_ind_l … l M1 H) -l -M1 normalize //
41 #a #l #M1 #M #HM1 #_ #IHM2
42 lapply (HR … HM1) -HR -a #HM1
43 lapply (sred_fwd_mult … HM1) #HM1
44 @(transitive_le … IHM2) -M2
45 /3 width=1 by le_exp1, lt_O_exp, lt_to_le/ (**) (* auto: slow without trace *)