]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2A/static/sh.ma
update in lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / static / sh.ma
diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/sh.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/sh.ma
new file mode 100644 (file)
index 0000000..490c9f9
--- /dev/null
@@ -0,0 +1,44 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "ground_2A/lib/arith.ma".
+
+(* SORT HIERARCHY ***********************************************************)
+
+(* sort hierarchy specification *)
+record sh: Type[0] ≝ {
+   next   : nat → nat;     (* next sort in the hierarchy *)
+   next_lt: ∀k. k < next k (* strict monotonicity condition *)
+}.
+
+definition sh_N: sh ≝ mk_sh S ….
+// defined.
+
+(* Basic properties *********************************************************)
+
+lemma nexts_le: ∀h,k,d. k ≤ (next h)^d k.
+#h #k #d elim d -d // normalize #d #IHd
+lapply (next_lt h ((next h)^d k)) #H
+lapply (le_to_lt_to_lt … IHd H) -IHd -H /2 width=2 by lt_to_le/
+qed.
+
+lemma nexts_lt: ∀h,k,d. k < (next h)^(d+1) k.
+#h #k #d >iter_SO
+lapply (nexts_le h k d) #H
+@(le_to_lt_to_lt … H) //
+qed.
+
+axiom nexts_dec: ∀h,k1,k2. Decidable (∃d. (next h)^d k1 = k2).
+
+axiom nexts_inj: ∀h,k,d1,d2. (next h)^d1 k = (next h)^d2 k → d1 = d2.