]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpcs_csx.ma
465871f60915c5c67dfc7dc35f2dd4eb94cec5db
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_equivalence / cpcs_csx.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_computation/cprre_csx.ma".
16 include "basic_2/rt_computation/cprre_cprre.ma".
17 include "basic_2/rt_equivalence/cpcs_cprs.ma".
18
19 (* CONTEXT-SENSITIVE PARALLEL R-EQUIVALENCE FOR TERMS ***********************)
20
21 (* Properties with strongly normalizing terms for unbound rt-transition *****)
22
23 (* Basic_1: was: cpcs_dec *)
24 lemma csx_cpcs_dec (h) (G) (L):
25       ∀T1. ❪G,L❫ ⊢ ⬈*𝐒[h] T1 → ∀T2. ❪G,L❫ ⊢ ⬈*𝐒[h] T2 →
26       Decidable … (❪G,L❫ ⊢ T1 ⬌*[h] T2).
27 #h #G #L #T1 #HT1 #T2 #HT2
28 elim (cprre_total_csx … HT1) -HT1 #U1 #HTU1
29 elim (cprre_total_csx … HT2) -HT2 #U2 #HTU2
30 elim (eq_term_dec U1 U2) [ #H destruct | #HnU12 ]
31 [ cases HTU1 -HTU1 #HTU1 #_
32   cases HTU2 -HTU2 #HTU2 #_
33   /3 width=3 by cprs_div, or_introl/
34 | @or_intror #H
35   elim (cpcs_inv_cprs … H) -H #T0 #HT10 #HT20
36   lapply (cprre_cprs_conf … HT10 … HTU1) -T1 #H1
37   lapply (cprre_cprs_conf … HT20 … HTU2) -T2 #H2
38   /3 width=6 by cprre_mono/
39 ]
40 qed-.