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 "ground_2/lib/ltc.ma".
16 include "basic_2/notation/relations/predstar_6.ma".
17 include "basic_2/notation/relations/predstar_5.ma".
18 include "basic_2/rt_transition/cpm.ma".
20 (* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
22 (* Basic_2A1: uses: scpds *)
23 definition cpms (h) (G) (L): relation3 nat term term ≝
24 ltc … plus … (cpm h G L).
27 "t-bound context-sensitive parallel rt-computarion (term)"
28 'PRedStar n h G L T1 T2 = (cpms h G L n T1 T2).
31 "context-sensitive parallel r-computation (term)"
32 'PRedStar h G L T1 T2 = (cpms h G L O T1 T2).
34 (* Basic eliminators ********************************************************)
36 lemma cpms_ind_sn (h) (G) (L) (T2) (Q:relation2 …):
38 (∀n1,n2,T1,T. ⦃G, L⦄ ⊢ T1 ➡[n1, h] T → ⦃G, L⦄ ⊢ T ➡*[n2, h] T2 → Q n2 T → Q (n1+n2) T1) →
39 ∀n,T1. ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2 → Q n T1.
40 #h #G #L #T2 #R @ltc_ind_sn_refl //
43 lemma cpms_ind_dx (h) (G) (L) (T1) (Q:relation2 …):
45 (∀n1,n2,T,T2. ⦃G, L⦄ ⊢ T1 ➡*[n1, h] T → Q n1 T → ⦃G, L⦄ ⊢ T ➡[n2, h] T2 → Q (n1+n2) T2) →
46 ∀n,T2. ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2 → Q n T2.
47 #h #G #L #T1 #R @ltc_ind_dx_refl //
50 (* Basic properties *********************************************************)
52 (* Basic_1: includes: pr1_pr0 *)
53 (* Basic_1: uses: pr3_pr2 *)
54 (* Basic_2A1: includes: cpr_cprs *)
55 lemma cpm_cpms (h) (G) (L): ∀n,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[n, h] T2 → ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2.
56 /2 width=1 by ltc_rc/ qed.
58 lemma cpms_step_sn (h) (G) (L): ∀n1,T1,T. ⦃G, L⦄ ⊢ T1 ➡[n1, h] T →
59 ∀n2,T2. ⦃G, L⦄ ⊢ T ➡*[n2, h] T2 → ⦃G, L⦄ ⊢ T1 ➡*[n1+n2, h] T2.
60 /2 width=3 by ltc_sn/ qed-.
62 lemma cpms_step_dx (h) (G) (L): ∀n1,T1,T. ⦃G, L⦄ ⊢ T1 ➡*[n1, h] T →
63 ∀n2,T2. ⦃G, L⦄ ⊢ T ➡[n2, h] T2 → ⦃G, L⦄ ⊢ T1 ➡*[n1+n2, h] T2.
64 /2 width=3 by ltc_dx/ qed-.
66 (* Basic_2A1: uses: cprs_bind_dx *)
67 lemma cpms_bind_dx (n) (h) (G) (L):
68 ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 →
69 ∀I,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡*[n, h] T2 →
70 ∀p. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ➡*[n, h] ⓑ{p,I}V2.T2.
71 #n #h #G #L #V1 #V2 #HV12 #I #T1 #T2 #H #a @(cpms_ind_sn … H) -T1
72 /3 width=3 by cpms_step_sn, cpm_cpms, cpm_bind/ qed.
74 (* Basic properties with r-transition ***************************************)
76 (* Basic_1: was: pr3_refl *)
77 lemma cprs_refl: ∀h,G,L. reflexive … (cpms h G L 0).
78 /2 width=1 by cpm_cpms/ qed.
80 (* Basic_2A1: removed theorems 4:
81 sta_cprs_scpds lstas_scpds scpds_strap1 scpds_fwd_cprs