]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/static/aaa_aaa.ma
update in ground and delayed updating
[helm.git] / matita / matita / contribs / lambdadelta / static_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 "static_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 #B #i #_ #IH #A2 #H
27   elim (aaa_inv_lref … H) -H #I2 #K2 #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-.
39
40 (* Advanced inversion lemmas ************************************************)
41
42 lemma aaa_aaa_inv_appl (G) (L) (V) (T) (B) (X):
43       ∀A. ❨G,L❩ ⊢ ⓐV.T ⁝ A → ❨G,L❩ ⊢ V ⁝ B → ❨G,L❩⊢ T ⁝ X → ②B.A = X.
44 #G #L #V #T #B #X #A #H #H1V #H1T
45 elim (aaa_inv_appl … H) -H #B0 #H2V #H2T
46 lapply (aaa_mono … H2V … H1V) -V #H destruct
47 lapply (aaa_mono … H2T … H1T) -G -L -T //
48 qed-.
49
50 lemma aaa_aaa_inv_cast (G) (L) (U) (T) (B) (A):
51       ∀X. ❨G,L❩ ⊢ ⓝU.T ⁝ X → ❨G,L❩ ⊢ U ⁝ B → ❨G,L❩⊢ T ⁝ A → ∧∧ B = X & A = X.
52 #G #L #U #T #B #A #X #H #H1U #H1T
53 elim (aaa_inv_cast … H) -H #H2U #H2T
54 lapply (aaa_mono … H1U … H2U) -U #HB
55 lapply (aaa_mono … H1T … H2T) -G -L -T #HA
56 /2 width=1 by conj/
57 qed-.