1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/static/sta.ma".
16 include "basic_2/equivalence/cpcs_cpcs.ma".
17 include "basic_2/dynamic/nta.ma".
19 (* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
21 (* Properties on static type assignment *************************************)
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
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/