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/reduction/tpr.ma".
17 (* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
19 definition cpr: lenv → term → term → Prop ≝
20 λL,T1,T2. ∃∃T. T1 ⇒ T & L ⊢ T [0, |L|] ≫ T2.
23 "context-sensitive parallel reduction (term)"
24 'PRed L T1 T2 = (cpr L T1 T2).
26 (* Basic properties *********************************************************)
28 lemma cpr_pr: ∀T1,T2. T1 ⇒ T2 → ∀L. L ⊢ T1 ⇒ T2.
31 lemma cpr_tps: ∀L,T1,T2,d,e. L ⊢ T1 [d, e] ≫ T2 → L ⊢ T1 ⇒ T2.
34 lemma cpr_refl: ∀L,T. L ⊢ T ⇒ T.
37 (* NOTE: new property *)
38 lemma cpr_flat: ∀I,L,V1,V2,T1,T2.
39 L ⊢ V1 ⇒ V2 → L ⊢ T1 ⇒ T2 → L ⊢ 𝕗{I} V1. T1 ⇒ 𝕗{I} V2. T2.
40 #I #L #V1 #V2 #T1 #T2 * #V #HV1 #HV2 * /3 width=5/
43 lemma cpr_delta: ∀L,K,V,W,i.
44 ↓[0, i] L ≡ K. 𝕓{Abbr} V → ↑[0, i + 1] V ≡ W → L ⊢ #i ⇒ W.
48 lemma cpr_cast: ∀L,V,T1,T2.
49 L ⊢ T1 ⇒ T2 → L ⊢ 𝕗{Cast} V. T1 ⇒ T2.
53 (* Basic inversion lemmas ***************************************************)