]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/ssta/ssta_aaa.etc
- extended multiple substitutions now uses bounds in ynat (ie. they
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / ssta / ssta_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/aaa_lift.ma".
16 include "basic_2/static/ssta.ma".
17
18 (* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
19
20 (* Properties on atomic arity assignment for terms **************************)
21
22 lemma ssta_aaa: ∀h,g,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀U,l. ⦃G, L⦄ ⊢ T •[h, g] ⦃l, U⦄ → ⦃G, L⦄ ⊢ U ⁝ A.
23 #h #g #G #L #T #A #H elim H -G -L -T -A
24 [ #G #L #k #U #l #H
25   elim (ssta_inv_sort1 … H) -H #_ #H destruct //
26 | #I #G #L #K #V #B #i #HLK #HV #IHV #U #l #H
27   elim (ssta_inv_lref1 … H) -H * #K0 #V0 #W0 [2: #l0 ] #HLK0 #HVW0 #HU [ #H ]
28   lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H0 destruct
29   lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
30   @(aaa_lift … HLK … HU) -HU -L // -HV /2 width=2/
31 | #a #G #L #V #T #B #A #HV #_ #_ #IHT #X #l #H
32   elim (ssta_inv_bind1 … H) -H #U #HTU #H destruct /3 width=2/
33 | #a #G #L #V #T #B #A #HV #_ #_ #IHT #X #l #H
34   elim (ssta_inv_bind1 … H) -H #U #HTU #H destruct /3 width=2/
35 | #G #L #V #T #B #A #HV #_ #_ #IHT #X #l #H
36   elim (ssta_inv_appl1 … H) -H #U #HTU #H destruct /3 width=3/
37 | #G #L #V #T #A #_ #_ #IHV #IHT #X #l #H
38   lapply (ssta_inv_cast1 … H) -H /2 width=2/
39 ]
40 qed.