]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc_2A1/sta/sta_aaa.etc
update in binaries for λδ
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc_2A1 / sta / sta_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/static/sta.ma".
16 include "basic_2/static/aaa_lift.ma".
17
18 (* STATIC TYPE ASSIGNMENT FOR TERMS *****************************************)
19
20 (* Properties on atomic arity assignment for terms **************************)
21
22 lemma aaa_sta: ∀h,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∃U. ⦃G, L⦄ ⊢ T •[h] U.
23 #h #G #L #T #A #H elim H -G -L -T -A
24 [ /2 width=2 by sta_sort, ex_intro/
25 | * #G #L #K [ #V | #W ] #B #i #HLK #_ * [ #W | #V ] #HVW
26   elim (lift_total W 0 (i+1)) /3 width=7 by sta_ldef, sta_ldec, ex_intro/
27 | #a #G #L #V #T #B #A #_ #_ #_ * /3 width=2 by sta_bind, ex_intro/
28 | #a #G #L #V #T #B #A #_ #_ #_ * /3 width=2 by sta_bind, ex_intro/
29 | #G #L #V #T #B #A #_ #_ #_ * /3 width=2 by sta_appl, ex_intro/
30 | #G #L #W #T #A #_ #_ #_ * /3 width=2 by sta_cast, ex_intro/
31 ]
32 qed-.
33
34 lemma sta_aaa_conf: ∀h,G,L. Conf3 … (aaa G L) (sta h G L).
35 #h #G #L #T #A #H elim H -G -L -T -A
36 [ #G #L #k #U #H
37   lapply (sta_inv_sort1 … H) -H #H destruct //
38 | #I #G #L #K #V #B #i #HLK #HV #IHV #U #H
39   elim (sta_inv_lref1 … H) -H * #K0 #V0 #W0 #HLK0 #HVW0 #HU
40   lapply (drop_mono … HLK0 … HLK) -HLK0 #H0 destruct
41   lapply (drop_fwd_drop2 … HLK) -HLK #HLK
42   @(aaa_lift … HLK … HU) -HU -L /2 width=2 by/
43 | #a #G #L #V #T #B #A #HV #_ #_ #IHT #X #H
44   elim (sta_inv_bind1 … H) -H #U #HTU #H destruct /3 width=2 by aaa_abbr/
45 | #a #G #L #V #T #B #A #HV #_ #_ #IHT #X #H
46   elim (sta_inv_bind1 … H) -H #U #HTU #H destruct /3 width=2 by aaa_abst/
47 | #G #L #V #T #B #A #HV #_ #_ #IHT #X #H
48   elim (sta_inv_appl1 … H) -H #U #HTU #H destruct /3 width=3 by aaa_appl/
49 | #G #L #V #T #A #_ #_ #IHV #IHT #X #H
50   lapply (sta_inv_cast1 … H) -H /2 width=2 by/
51 ]
52 qed-.