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 "basic_2/reducibility/ltpr.ma".
16 include "basic_2/computation/tprs.ma".
18 (* CONTEXT-FREE PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ******************)
20 definition ltprs: relation lenv ≝ TC … ltpr.
23 "context-free parallel computation (environment)"
24 'PRedStar L1 L2 = (ltprs L1 L2).
26 (* Basic eliminators ********************************************************)
28 lemma ltprs_ind: ∀L1. ∀R:predicate lenv. R L1 →
29 (∀L,L2. L1 ➡* L → L ➡ L2 → R L → R L2) →
31 #L1 #R #HL1 #IHL1 #L2 #HL12
32 @(TC_star_ind … HL1 IHL1 … HL12) //
35 lemma ltprs_ind_dx: ∀L2. ∀R:predicate lenv. R L2 →
36 (∀L1,L. L1 ➡ L → L ➡* L2 → R L → R L1) →
38 #L2 #R #HL2 #IHL2 #L1 #HL12
39 @(TC_star_ind_dx … HL2 IHL2 … HL12) //
42 (* Basic properties *********************************************************)
44 lemma ltprs_refl: reflexive … ltprs.
47 lemma ltpr_ltprs: ∀L1,L2. L1 ➡ L2 → L1 ➡* L2.
50 lemma ltprs_strap1: ∀L1,L,L2. L1 ➡* L → L ➡ L2 → L1 ➡* L2.
53 lemma ltprs_strap2: ∀L1,L,L2. L1 ➡ L → L ➡* L2 → L1 ➡* L2.
56 (* Basic inversion lemmas ***************************************************)
58 lemma ltprs_inv_atom1: ∀L2. ⋆ ➡* L2 → L2 = ⋆.
59 #L2 #H @(ltprs_ind … H) -L2 //
60 #L #L2 #_ #HL2 #IHL1 destruct
61 >(ltpr_inv_atom1 … HL2) -L2 //
64 lemma ltprs_inv_pair1: ∀I,K1,L2,V1. K1. ⓑ{I} V1 ➡* L2 →
65 ∃∃K2,V2. K1 ➡* K2 & V1 ➡* V2 & L2 = K2. ⓑ{I} V2.
66 #I #K1 #L2 #V1 #H @(ltprs_ind … H) -L2 /2 width=5/
67 #L #L2 #_ #HL2 * #K #V #HK1 #HV1 #H destruct
68 elim (ltpr_inv_pair1 … HL2) -HL2 #K2 #V2 #HK2 #HV2 #H destruct /3 width=5/
71 lemma ltprs_inv_atom2: ∀L1. L1 ➡* ⋆ → L1 = ⋆.
72 #L1 #H @(ltprs_ind_dx … H) -L1 //
73 #L1 #L #HL1 #_ #IHL2 destruct
74 >(ltpr_inv_atom2 … HL1) -L1 //
77 lemma ltprs_inv_pair2: ∀I,L1,K2,V2. L1 ➡* K2. ⓑ{I} V2 →
78 ∃∃K1,V1. K1 ➡* K2 & V1 ➡* V2 & L1 = K1. ⓑ{I} V1.
79 #I #L1 #K2 #V2 #H @(ltprs_ind_dx … H) -L1 /2 width=5/
80 #L1 #L #HL1 #_ * #K #V #HK2 #HV2 #H destruct
81 elim (ltpr_inv_pair2 … HL1) -HL1 #K1 #V1 #HK1 #HV1 #H destruct /3 width=5/
84 (* Basic forward lemmas *****************************************************)
86 lemma ltprs_fwd_length: ∀L1,L2. L1 ➡* L2 → |L1| = |L2|.
87 #L1 #L2 #H @(ltprs_ind … H) -L2 //
89 >IHL1 -L1 >(ltpr_fwd_length … HL2) -HL2 //