]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/dynamic/shnv.ma
- some renaming and minor updates
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / dynamic / shnv.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/notation/relations/nativevalid_6.ma".
16 include "basic_2/equivalence/scpes.ma".
17 include "basic_2/dynamic/snv.ma".
18
19 (* STRATIFIED HIGHER NATIVE VALIDITY FOR TERMS ******************************)
20
21 inductive shnv (h) (g) (l1) (G) (L): predicate term ≝
22 | shnv_cast: ∀U,T. ⦃G, L⦄ ⊢ U ¡[h, g] → ⦃G, L⦄ ⊢ T ¡[h, g] →
23              (∀l2. l2 ≤ l1 → ⦃G, L⦄ ⊢ U •*⬌*[h, g, l2, l2+1] T) →
24              shnv h g l1 G L (ⓝU.T)
25 .
26
27 interpretation "stratified higher native validity (term)"
28    'NativeValid h g l G L T = (shnv h g l G L T).
29
30 (* Basic inversion lemmas ***************************************************)
31
32 fact shnv_inv_cast_aux: ∀h,g,G,L,X,l1. ⦃G, L⦄ ⊢ X ¡[h, g, l1] → ∀U,T. X = ⓝU.T →
33                         ∧∧ ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g]
34                          & (∀l2. l2 ≤ l1 → ⦃G, L⦄ ⊢ U •*⬌*[h, g, l2, l2+1] T).
35 #h #g #G #L #X #l1 * -X
36 #U #T #HU #HT #HUT #U1 #T1 #H destruct /3 width=1 by and3_intro/
37 qed-.
38
39 lemma shnv_inv_cast: ∀h,g,G,L,U,T,l1. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g, l1] →
40                      ∧∧ ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g]
41                       & (∀l2. l2 ≤ l1 → ⦃G, L⦄ ⊢ U •*⬌*[h, g, l2, l2+1] T).
42 /2 width=3 by shnv_inv_cast_aux/ qed-.
43
44 lemma shnv_inv_snv: ∀h,g,G,L,T,l. ⦃G, L⦄ ⊢ T ¡[h, g, l] → ⦃G, L⦄ ⊢ T ¡[h, g].
45 #h #g #G #L #T #l * -T
46 #U #T #HU #HT #HUT elim (HUT 0) -HUT
47 /3 width=3 by snv_cast, scpds_fwd_cprs/
48 qed-.