]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_cpms.ma
milestone uupdate in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / dynamic / nta_cpms.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_cprs.ma".
16 include "basic_2/rt_computation/lprs_cpms.ma".
17 include "basic_2/dynamic/nta.ma".
18
19 (* NATIVE TYPE ASSIGNMENT FOR TERMS *****************************************)
20
21 (* Properties with rt_computation for terms *********************************)
22
23 (* Basic_2A1: was by definition nta_appl ntaa_appl *)
24 lemma nta_beta (a) (h) (p) (G) (K):
25       ∀V,W. ⦃G,K⦄ ⊢ V :[a,h] W →
26       ∀T,U. ⦃G,K.ⓛW⦄ ⊢ T :[a,h] U → ⦃G,K⦄ ⊢ ⓐV.ⓛ{p}W.T :[a,h] ⓐV.ⓛ{p}W.U.
27 #a #h #p #G #K #V #W #H1 #T #U #H2
28 elim (cnv_inv_cast … H1) -H1 #X1 #HW #HV #HWX1 #HVX1
29 elim (cnv_inv_cast … H2) -H2 #X2 #HU #HT #HUX2 #HTX2
30 /4 width=7 by cnv_bind, cnv_appl, cnv_cast, cpms_appl_dx, cpms_bind_dx/
31 qed.
32
33 (* Basic_1: was by definition: ty3_appl *)
34 (* Basic_2A1: was nta_appl_old *)
35 lemma nta_appl (a) (h) (p) (G) (L):
36       ∀V,W. ⦃G,L⦄ ⊢ V :[a,h] W →
37       ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] ⓛ{p}W.U → ⦃G,L⦄ ⊢ ⓐV.T :[a,h] ⓐV.ⓛ{p}W.U.
38 #a #h #p #G #L #V #W #H1 #T #U #H2
39 elim (cnv_inv_cast … H1) -H1 #X1 #HW #HV #HWX1 #HVX1
40 elim (cnv_inv_cast … H2) -H2 #X2 #HU #HT #HUX2 #HTX2
41 elim (cpms_inv_abst_sn … HUX2) #W0 #U0 #HW0 #HU0 #H destruct
42 elim (cprs_conf … HWX1 … HW0) -HW0 #X0 #HX10 #HWX0
43 @(cnv_cast … (ⓐV.ⓛ{p}W0.U0)) (**) (* full auto too slow *)
44 [ /3 width=7 by cnv_appl, cpms_bind/
45 | /4 width=11 by cnv_appl, cpms_cprs_trans, cpms_bind/
46 | /2 width=1 by cpms_appl_dx/
47 | /2 width=1 by cpms_appl_dx/
48 ]
49 qed.