]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc_2A1/nta/nta_aaa.etc
milestone uupdate in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc_2A1 / nta / nta_aaa.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/computation/csn_aaa.ma".
16 include "basic_2/equivalence/lcpcs_aaa.ma".
17 include "basic_2/dynamic/nta.ma".
18
19 (* NATIVE TYPE ASSIGNMENT ON TERMS ******************************************)
20
21 (* Forward lemmas on atomic arity assignment for terms **********************)
22
23 lemma nta_fwd_aaa: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → ∃∃A. L ⊢ T ⁝ A & L ⊢ U ⁝ A.
24 #h #L #T #U #H elim H -L -T -U
25 [ /2 width=3/
26 | #L #K #V #W #U #i #HLK #_ #HWU * #B #HV #HW
27   lapply (ldrop_fwd_ldrop2 … HLK) /3 width=9/
28 | #L #K #W #V #U #i #HLK #_ #HWU * #B #HW #_ -V
29   lapply (ldrop_fwd_ldrop2 … HLK) /3 width=9/
30 | * #L #V #W #T #U #_ #_ * #B #HV #HW * #A #HT #HU
31   [ /3 width=3/ | /3 width=5/ ]
32 | #L #V #W #T #U #_ #_ * #B #HV #HW * #X #H1 #H2
33   elim (aaa_inv_abst … H1) -H1 #B1 #A1 #HW1 #HT #H destruct
34   elim (aaa_inv_abst … H2) -H2 #B2 #A #_ #HU #H destruct
35   lapply (aaa_mono … HW1 … HW) -HW1 #H destruct /4 width=5/
36 | #L #V #W #T #U #_ #_ * #X #HT #HUX * #A #H #_ -W
37   elim (aaa_inv_appl … H) -H #B #HV #HUA
38   lapply (aaa_mono … HUA … HUX) -HUX #H destruct /3 width=5/
39 | #L #T #U #_ * #A #HT #HU /3 width=3/
40 | #L #T #U1 #U2 #V2 #_ #HU12 #_ * #X #HT #HU1 * #A #HU2 #_
41   lapply (aaa_cpcs_mono … HU12 … HU1 … HU2) -U1 #H destruct /2 width=3/
42 ]
43 qed-.
44
45 (* Note: this is the stong normalization property *)
46 (* Basic_1: was only: ty3_sn3 *)
47 theorem nta_fwd_csn: ∀h,L,T,U. ⦃h, L⦄ ⊢ T : U → L ⊢ ⬇* T ∧ L ⊢ ⬇* U.
48 #h #L #T #U #H elim (nta_fwd_aaa … H) -H /3 width=2/
49 qed-.