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/rt_transition/rpx_reqg.ma".
16 include "basic_2/rt_computation/cpxs.ma".
18 (* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************)
20 (* Properties with generic equivalence for terms ****************************)
22 lemma teqg_cpxs_trans (S) (G) (L) (T):
23 reflexive … S → symmetric … S →
24 ∀T1. T1 ≛[S] T → ∀T2. ❪G,L❫ ⊢ T ⬈* T2 → ❪G,L❫ ⊢ T1 ⬈* T2.
25 #S #H1S #H2S #G #L #T #T1 #HT1 #T2 #HT2 @(cpxs_ind … HT2) -T2
26 [ /3 width=4 by teqg_cpx, cpx_cpxs/
27 | /2 width=3 by cpxs_strap1/
31 (* Note: this requires teqg to be symmetric *)
32 (* Nasic_2A1: uses: cpxs_neq_inv_step_sn *)
33 lemma cpxs_tneqg_fwd_step_sn (S) (G) (L):
34 reflexive … S → symmetric … S → Transitive … S →
35 (∀s1,s2. Decidable (S s1 s2)) →
36 ∀T1,T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≛[S] T2 → ⊥) →
37 ∃∃T. ❪G,L❫ ⊢ T1 ⬈ T & T1 ≛[S] T → ⊥ & ❪G,L❫ ⊢ T ⬈* T2.
38 #S #G #L #H1S #H2S #H3S #H4S #T1 #T2 #H @(cpxs_ind_dx … H) -T1
39 [ #H elim H -H /2 width=1 by teqg_refl/
40 | #T1 #T0 #HT10 #HT02 #IH #HnT12
41 elim (teqg_dec S … T1 T0) // [ -HT10 -HT02 #HT10 | -IH #HnT10 ]
42 [ elim IH -IH /3 width=3 by teqg_trans/ -HnT12
44 lapply (teqg_cpx_trans … HT10 … HT0) // -HT0 #HT1
45 /4 width=4 by teqg_canc_sn, ex3_intro/
46 | /3 width=4 by ex3_intro/