]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpmre.ma
update in ground_2, static_2, basic_2, apps_2, alpha_1
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / dynamic / cnv_cpmre.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/cprs_cnr.ma".
16 include "basic_2/rt_computation/cprre.ma".
17 include "basic_2/dynamic/cnv_preserve.ma".
18
19 (* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************)
20
21 (* Properties with t-bound evaluation on terms ******************************)
22
23 lemma cnv_cpmre_trans (h) (a) (n) (G) (L):
24       ∀T1. ❪G,L❫ ⊢ T1 ![h,a] →
25       ∀T2. ❪G,L❫ ⊢ T1 ➡*[h,n] 𝐍❪T2❫ → ❪G,L❫ ⊢ T2 ![h,a].
26 #h #a #n #G #L #T1 #HT1 #T2 * #HT12 #_
27 /2 width=4 by cnv_cpms_trans/
28 qed-.
29
30 lemma cnv_cpmre_cpms_conf (h) (a) (n) (G) (L):
31       ∀T. ❪G,L❫ ⊢ T ![h,a] → ∀T1. ❪G,L❫ ⊢ T ➡*[n,h] T1 →
32       ∀T2. ❪G,L❫ ⊢ T ➡*[h,n] 𝐍❪T2❫ → ❪G,L❫ ⊢ T1 ➡*[h] 𝐍❪T2❫.
33 #h #a #n #G #L #T0 #HT0 #T1 #HT01 #T2 * #HT02 #HT2
34 elim (cnv_cpms_conf … HT0 … HT01 … HT02) -T0 <minus_n_n #T0 #HT10 #HT20
35 lapply (cprs_inv_cnr_sn … HT20 HT2) -HT20 #H destruct
36 /2 width=1 by cpmre_intro/
37 qed-.
38
39 (* Main properties with evaluation for t-bound rt-transition on terms *****)
40
41 theorem cnv_cpmre_mono (h) (a) (n) (G) (L):
42         ∀T. ❪G,L❫ ⊢ T ![h,a] → ∀T1. ❪G,L❫ ⊢ T ➡*[h,n] 𝐍❪T1❫ →
43         ∀T2. ❪G,L❫ ⊢ T ➡*[h,n] 𝐍❪T2❫ → T1 = T2.
44 #h #a #n #G #L #T0 #HT0 #T1 * #HT01 #HT1 #T2 * #HT02 #HT2
45 elim (cnv_cpms_conf … HT0 … HT01 … HT02) -T0 <minus_n_n #T0 #HT10 #HT20
46 /3 width=7 by cprs_inv_cnr_sn, canc_dx_eq/
47 qed-.