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/static/aaa_lift.ma".
18 (* STATIC TYPE ASSIGNMENT FOR TERMS *****************************************)
20 (* Properties on atomic arity assignment for terms **************************)
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/
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
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/