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/xoa/ex_4_5.ma".
16 include "basic_2/rt_computation/cpms_cpms.ma".
17 include "basic_2/rt_computation/cprs_cpr.ma".
19 (* CONTEXT-SENSITIVE PARALLEL R-COMPUTATION FOR TERMS ***********************)
21 (* Main properties **********************************************************)
23 (* Basic_1: was: pr3_t *)
24 (* Basic_1: includes: pr1_t *)
25 theorem cprs_trans (h) (G) (L): Transitive … (cpms h G L 0).
26 /2 width=3 by cpms_trans/ qed-.
28 (* Basic_1: was: pr3_confluence *)
29 (* Basic_1: includes: pr1_confluence *)
30 theorem cprs_conf (h) (G) (L): confluent2 … (cpms h G L 0) (cpms h G L 0).
31 #h #G #L #T0 #T1 #HT01 #T2 #HT02
32 elim (TC_confluent2 … T0 T1 … T2)
33 [ /3 width=3 by cprs_CTC, ex2_intro/ |5,6: skip
34 | /2 width=1 by cprs_inv_CTC/
35 | /2 width=1 by cprs_inv_CTC/
36 | /2 width=3 by cpr_conf/
40 (* Basic_1: was: pr3_flat *)
41 theorem cprs_flat (h) (G) (L):
42 ∀T1,T2. ❪G,L❫ ⊢ T1 ➡*[h,0] T2 →
43 ∀V1,V2. ❪G,L❫ ⊢ V1 ➡*[h,0] V2 →
44 ∀I. ❪G,L❫ ⊢ ⓕ[I]V1.T1 ➡*[h,0] ⓕ[I]V2.T2.
45 #h #G #L #T1 #T2 #HT12 #V1 #V2 #H @(cprs_ind_dx … H) -V2
46 [ /2 width=3 by cprs_flat_dx/
47 | /3 width=3 by cpr_pair_sn, cprs_step_dx/
51 (* Advanced inversion lemmas ************************************************)
53 (* Basic_1: was pr3_gen_appl *)
54 (* Basic_2A1: was: cprs_inv_appl1 *)
55 lemma cprs_inv_appl_sn (h) (G) (L):
56 ∀V1,T1,X2. ❪G,L❫ ⊢ ⓐV1.T1 ➡*[h,0] X2 →
57 ∨∨ ∃∃V2,T2. ❪G,L❫ ⊢ V1 ➡*[h,0] V2 &
58 ❪G,L❫ ⊢ T1 ➡*[h,0] T2 &
60 | ∃∃p,W,T. ❪G,L❫ ⊢ T1 ➡*[h,0] ⓛ[p]W.T &
61 ❪G,L❫ ⊢ ⓓ[p]ⓝW.V1.T ➡*[h,0] X2
62 | ∃∃p,V0,V2,V,T. ❪G,L❫ ⊢ V1 ➡*[h,0] V0 & ⇧[1] V0 ≘ V2 &
63 ❪G,L❫ ⊢ T1 ➡*[h,0] ⓓ[p]V.T &
64 ❪G,L❫ ⊢ ⓓ[p]V.ⓐV2.T ➡*[h,0] X2.
65 #h #G #L #V1 #T1 #X2 #H elim (cpms_inv_appl_sn … H) -H *
66 [ /3 width=5 by or3_intro0, ex3_2_intro/
67 | #n1 #n2 #p #V2 #T2 #HT12 #HTX2 #H
68 elim (plus_inv_O3 … H) -H #H1 #H2 destruct
69 /3 width=5 by or3_intro1, ex2_3_intro/
70 | #n1 #n2 #p #V2 #W2 #V #T2 #HV12 #HVW2 #HT12 #HTX2 #H
71 elim (plus_inv_O3 … H) -H #H1 #H2 destruct
72 /3 width=9 by or3_intro2, ex4_5_intro/