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/notation/relations/predevalstar_6.ma".
16 include "basic_2/rt_transition/cnh.ma".
17 include "basic_2/rt_computation/cpms.ma".
19 (* HEAD T-UNBOUND EVALUATION FOR T-BOUND RT-TRANSITION ON TERMS *************)
21 definition cpmhe (h) (n) (G) (L): relation2 term term ≝
22 λT1,T2. ∧∧ ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 & ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃T2⦄.
24 interpretation "t-unbound evaluation for t-bound context-sensitive parallel rt-transition (term)"
25 'PRedEvalStar h n G L T1 T2 = (cpmhe h n G L T1 T2).
27 definition R_cpmhe (h) (G) (L) (T): predicate nat ≝
28 λn. ∃U. ⦃G,L⦄ ⊢ T ➡*[h,n] 𝐍*⦃U⦄.
30 (* Basic properties *********************************************************)
32 lemma cpmhe_intro (h) (n) (G) (L):
33 ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G,L⦄ ⊢ ⥲[h] 𝐍⦃T2⦄ → ⦃G,L⦄ ⊢ T1 ➡*[h,n] 𝐍*⦃T2⦄.
34 /2 width=1 by conj/ qed.
36 (* Advanced properties ******************************************************)
38 lemma cpmhe_sort (h) (n) (G) (L) (T):
39 ∀s. ⦃G,L⦄ ⊢ T ➡*[n,h] ⋆s → ⦃G,L⦄ ⊢ T ➡*[h,n] 𝐍*⦃⋆s⦄.
40 /3 width=5 by cnh_sort, cpmhe_intro/ qed.
42 lemma cpmhe_ctop (h) (n) (G) (T):
43 ∀i. ⦃G,⋆⦄ ⊢ T ➡*[n,h] #i → ⦃G,⋆⦄ ⊢ T ➡*[h,n] 𝐍*⦃#i⦄.
44 /3 width=5 by cnh_ctop, cpmhe_intro/ qed.
46 lemma cpmhe_zero (h) (n) (G) (L) (T):
47 ∀I. ⦃G,L.ⓤ{I}⦄ ⊢ T ➡*[n,h] #0 → ⦃G,L.ⓤ{I}⦄ ⊢ T ➡*[h,n] 𝐍*⦃#0⦄.
48 /3 width=6 by cnh_zero, cpmhe_intro/ qed.
50 lemma cpmhe_gref (h) (n) (G) (L) (T):
51 ∀l. ⦃G,L⦄ ⊢ T ➡*[n,h] §l → ⦃G,L⦄ ⊢ T ➡*[h,n] 𝐍*⦃§l⦄.
52 /3 width=5 by cnh_gref, cpmhe_intro/ qed.
54 lemma cpmhe_abst (h) (n) (p) (G) (L) (T):
55 ∀W,U. ⦃G,L⦄ ⊢ T ➡*[n,h] ⓛ{p}W.U → ⦃G,L⦄ ⊢ T ➡*[h,n] 𝐍*⦃ⓛ{p}W.U⦄.
56 /3 width=5 by cnh_abst, cpmhe_intro/ qed.
58 lemma cpmhe_abbr_neg (h) (n) (G) (L) (T):
59 ∀V,U. ⦃G,L⦄ ⊢ T ➡*[n,h] -ⓓV.U → ⦃G,L⦄ ⊢ T ➡*[h,n] 𝐍*⦃-ⓓV.U⦄.
60 /3 width=5 by cnh_abbr_neg, cpmhe_intro/ qed.
62 (* Basic forward lemmas *****************************************************)
64 lemma cpmhe_fwd_cpms (h) (n) (G) (L):
65 ∀T1,T2. ⦃G,L⦄ ⊢ T1 ➡*[h,n] 𝐍*⦃T2⦄ → ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2.
66 #h #n #G #L #T1 #T2 * #HT12 #_ //