]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/static/sh.ma
update in lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / static / sh.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 "ground_2A/lib/arith.ma".
16
17 (* SORT HIERARCHY ***********************************************************)
18
19 (* sort hierarchy specification *)
20 record sh: Type[0] ≝ {
21    next   : nat → nat;     (* next sort in the hierarchy *)
22    next_lt: ∀k. k < next k (* strict monotonicity condition *)
23 }.
24
25 definition sh_N: sh ≝ mk_sh S ….
26 // defined.
27
28 (* Basic properties *********************************************************)
29
30 lemma nexts_le: ∀h,k,d. k ≤ (next h)^d k.
31 #h #k #d elim d -d // normalize #d #IHd
32 lapply (next_lt h ((next h)^d k)) #H
33 lapply (le_to_lt_to_lt … IHd H) -IHd -H /2 width=2 by lt_to_le/
34 qed.
35
36 lemma nexts_lt: ∀h,k,d. k < (next h)^(d+1) k.
37 #h #k #d >iter_SO
38 lapply (nexts_le h k d) #H
39 @(le_to_lt_to_lt … H) //
40 qed.
41
42 axiom nexts_dec: ∀h,k1,k2. Decidable (∃d. (next h)^d k1 = k2).
43
44 axiom nexts_inj: ∀h,k,d1,d2. (next h)^d1 k = (next h)^d2 k → d1 = d2.