]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ssta.ma
trace added in a failing invocation of auto :-(
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / dynamic / snv_ssta.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/dynamic/snv.ma".
16
17 (* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
18
19 (* Properties on stratified static type assignment for terms ****************)
20
21 lemma snv_ssta: ∀h,g,L,T. ⦃h, L⦄ ⊩ T :[g] → ∃∃U,l. ⦃h, L⦄ ⊢ T •[g, l] U.
22 #h #g #L #T #H elim H -L -T
23 [ #L #k elim (deg_total h g k) /3 width=3/
24 | * #L #K #V #i #HLK #_ * #W #l0 #HVW
25   [ elim (lift_total W 0 (i+1)) /3 width=8/
26   | elim (lift_total V 0 (i+1)) /3 width=8/
27   ]
28 | #a #I #L #V #T #_ #_ #_ * /3 width=3/
29 | #a #L #V #W #W1 #T0 #T1 #l #_ #_ #_ #_ #_ #_ * /3 width=3/
30 | #L #W #T #U #l #_ #_ #HTU #_ #_ #_ /3 width=3/ (**) (* auto fails without the last #_ *) 
31 ]
32 qed-.
33
34 fact snv_ssta_conf_aux: ∀h,g,L,T. (
35                            ∀L0,T0. ⦃h, L0⦄ ⊩ T0 :[g] →
36                            ∀U0,l. ⦃h, L0⦄ ⊢ T0 •[g, l + 1] U0 →
37                            ♯{L0, T0} < ♯{L, T} → ⦃h, L0⦄ ⊩ U0 :[g]
38                         ) →
39                         ∀L0,T0. ⦃h, L0⦄ ⊩ T0 :[g] →
40                         ∀U0,l. ⦃h, L0⦄ ⊢ T0 •[g, l + 1] U0 →
41                         L0 = L → T0 = T → ⦃h, L0⦄ ⊩ U0 :[g].
42 #h #g #L #T #IH1 #L0 #T0 * -L0 -T0
43 [
44 |
45 |
46 | #a #L0 #V #W #W0 #T0 #V0 #l0 #HV #HT0 #HVW #HW0 #HTV0 #X #l #H #H1 #H2 destruct
47   elim (ssta_inv_appl1 … H) -H #U0 #HTU0 #H destruct
48   lapply (IH1 … HT0 … HTU0 ?) // #HU0
49   @(snv_appl … HV HU0 HVW HW0) -HV -HU0 -HVW -HW0
50 | #L0 #W #T0 #W0 #l0 #_ #HT0 #_ #_ #U0 #l #H #H1 #H2 destruct -W0
51   lapply (ssta_inv_cast1 … H) -H /2 width=5/