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/dynamic/cnv_aaa.ma".
16 include "basic_2/dynamic/nta.ma".
18 (* NATIVE TYPE ASSIGNMENT FOR TERMS *****************************************)
20 (* Forward lemmas with atomic arity assignment for terms ********************)
22 (* Note: this means that no type is a universe *)
23 lemma nta_fwd_aaa (a) (h) (G) (L):
24 ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] U → ∃∃A. ⦃G,L⦄ ⊢ T ⁝ A & ⦃G,L⦄ ⊢ U ⁝ A.
26 elim (cnv_fwd_aaa … H) -H #A #H
27 elim (aaa_inv_cast … H) -H #HU #HT
28 /2 width=3 by ex2_intro/
31 (* Advanced inversion lemmas ************************************************)
33 (* Basic_1: uses: ty3_predicative *)
34 lemma nta_abst_predicative (a) (h) (p) (G) (L):
35 ∀W,T. ⦃G,L⦄ ⊢ ⓛ{p}W.T :[a,h] W → ⊥.
36 #a #h #p #G #L #W #T #H
37 elim (nta_fwd_aaa … H) -a -h #X #H #H1W
38 elim (aaa_inv_abst … H) -p #B #A #H2W #_ #H destruct -T
39 lapply (aaa_mono … H1W … H2W) -G -L -W #H
40 elim (discr_apair_xy_x … H)
43 (* Basic_2A1: uses: ty3_repellent *)
44 theorem nta_abst_repellent (a) (h) (p) (G) (K):
45 ∀W,T,U1. ⦃G,K⦄ ⊢ ⓛ{p}W.T :[a,h] U1 →
46 ∀U2. ⦃G,K.ⓛW⦄ ⊢ T :[a,h] U2 → ⬆*[1] U1 ≘ U2 → ⊥.
47 #a #h #p #G #K #W #T #U1 #H1 #U2 #H2 #HU12
48 elim (nta_fwd_aaa … H2) -H2 #A2 #H2T #H2U2
49 elim (nta_fwd_aaa … H1) -H1 #X1 #H1 #HU1
50 elim (aaa_inv_abst … H1) -a -h -p #B #A1 #_ #H1T #H destruct
51 lapply (aaa_mono … H1T … H2T) -T #H destruct
52 lapply (aaa_inv_lifts … H2U2 (Ⓣ) … K … HU12)
53 [ /3 width=1 by drops_refl, drops_drop/ ] -W -U2 #H2U1
54 lapply (aaa_mono … HU1 … H2U1) -G -K -U1 #H
55 elim (discr_apair_xy_y … H)