]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_teqx.ma
update in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / cpxs_teqx.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "basic_2/rt_transition/rpx_reqx.ma".
16 include "basic_2/rt_computation/cpxs.ma".
17
18 (* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************)
19
20 (* Properties with sort-irrelevant equivalence for terms ********************)
21
22 lemma teqx_cpxs_trans (G) (L) (T):
23       ∀T1. T1 ≛ T → ∀T2. ❪G,L❫ ⊢ T ⬈* T2 → ❪G,L❫ ⊢ T1 ⬈* T2.
24 #G #L #T #T1 #HT1 #T2 #HT2 @(cpxs_ind … HT2) -T2
25 [ /3 width=1 by teqx_cpx, cpx_cpxs/
26 | /2 width=3 by cpxs_strap1/
27 ]
28 qed-.
29
30 (* Note: this requires teqx to be symmetric *)
31 (* Nasic_2A1: uses: cpxs_neq_inv_step_sn *)
32 lemma cpxs_tneqx_fwd_step_sn (G) (L):
33       ∀T1,T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≛ T2 → ⊥) →
34       ∃∃T. ❪G,L❫ ⊢ T1 ⬈ T & T1 ≛ T → ⊥ & ❪G,L❫ ⊢ T ⬈* T2.
35 #G #L #T1 #T2 #H @(cpxs_ind_dx … H) -T1
36 [ #H elim H -H //
37 | #T1 #T0 #HT10 #HT02 #IH #HnT12
38   elim (teqx_dec T1 T0) [ -HT10 -HT02 #HT10 | -IH #HnT10 ]
39   [ elim IH -IH /3 width=3 by teqx_trans/ -HnT12
40     #T #HT0 #HnT0 #HT2
41     lapply (teqx_cpx_trans … HT10 … HT0) -HT0 #HT1
42     /4 width=4 by teqx_canc_sn, ex3_intro/
43   | /3 width=4 by ex3_intro/
44   ]
45 ]
46 qed-.