]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/nta/nta_sta.etc
small improvements and corrections ...
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / nta / nta_sta.etc
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/static/sta.ma".
16 include "basic_2/equivalence/cpcs_cpcs.ma".
17 include "basic_2/dynamic/nta.ma".
18
19 (* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
20
21 (* Properties on static type assignment *************************************)
22
23 lemma nta_fwd_sta: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U →
24                    ∃∃U0. ⦃h, L⦄ ⊢ T • U0 & L ⊢ U0 ⬌* U.
25 #h #L #T #U #H elim H -L -T -U
26 [ /2 width=3/
27 | #L #K #V #W1 #V1 #i #HLK #_ #HWV1 * #W0 #HVW0 #HW01
28   elim (lift_total W0 0 (i+1)) #V0 #HWV0
29   lapply (ldrop_fwd_ldrop2 … HLK) #HLK0
30   lapply (cpcs_lift … HLK0 … HWV0 … HWV1 HW01) -HLK0 -HWV1 -HW01 /3 width=6/
31 | #L #K #W #V1 #W1 #i #HLK #HWV1 #HW1 * /3 width=6/
32 | #I #L #V #W #T #U #_ #_ * #W0 #_ #_ * /3 width=3/
33 | #L #V #W #T #U #_ #_ * #W0 #_ #HW0 * #X #H #HX
34   elim (sta_inv_bind1 … H) -H #U0 #HTU0 #H destruct
35   @(ex2_1_intro … (ⓐV.ⓛW.U0)) /2 width=1/ /3 width=1/
36 | #L #V #W #T #U #_ #_ * #U0 #HTU0 #HU0 #_ -W
37   @(ex2_1_intro … (ⓐV.U0)) /2 width=1/
38 | #L #T #U #HTU * #U0 #HTU0 #HU0 /3 width=3/
39 | #L #T #U1 #U2 #V2 #_ #HU12 #_ * #U0 #HTU0 #HU01 #_
40   lapply (cpcs_trans … HU01 … HU12) -U1 /2 width=3/
41 ]
42 qed-.