]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/aaa_aaa.ma
basic_2: stronger supclosure allows better inversion lemmas
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / aaa_aaa.ma
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.ma".
16
17 (* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
18
19 (* Main inversion lemmas ****************************************************)
20
21 theorem aaa_mono: ∀G,L,T,A1. ⦃G, L⦄ ⊢ T ⁝ A1 → ∀A2. ⦃G, L⦄ ⊢ T ⁝ A2 → A1 = A2.
22 #G #L #T #A1 #H elim H -G -L -T -A1
23 [ #G #L #s #A2 #H >(aaa_inv_sort … H) -H //
24 | #I1 #G #L #V1 #B #_ #IH #A2 #H
25   elim (aaa_inv_zero … H) -H #I2 #K2 #V2 #H #HA2 destruct /2 width=1 by/
26 | #I1 #G #L #V1 #B #i #_ #IH #A2 #H
27   elim (aaa_inv_lref … H) -H #I2 #K2 #V2 #H #HA2 destruct /2 width=1 by/
28 | #p #G #L #V #T #B1 #A1 #_ #_ #_ #IH #A2 #H
29   elim (aaa_inv_abbr … H) -H /2 width=1 by/
30 | #p #G #L #V1 #T1 #B1 #A1 #_ #_ #IHB1 #IHA1 #X #H
31   elim (aaa_inv_abst … H) -H #B2 #A2 #HB2 #HA2 #H destruct /3 width=1 by eq_f2/
32 | #G #L #V1 #T1 #B1 #A1 #_ #_ #_ #IHA1 #A2 #H
33   elim (aaa_inv_appl … H) -H #B2 #_ #HA2
34   lapply (IHA1 … HA2) -L #H destruct //
35 | #G #L #V #T #A1 #_ #_ #_ #IHA1 #A2 #H
36   elim (aaa_inv_cast … H) -H /2 width=1 by/
37 ]
38 qed-.