1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "static_2/syntax/sh.ma".
17 (* SORT DEGREE **************************************************************)
19 (* sort degree specification *)
20 record sd: Type[0] ≝ {
21 (* degree of the sort *)
25 (* sort degree postulates *)
26 record sd_props (h) (o): Prop ≝ {
27 (* functional relation axioms *)
28 deg_total: ∀s. ∃d. deg o s d;
29 deg_mono : ∀s,d1,d2. deg o s d1 → deg o s d2 → d1 = d2;
30 (* compatibility condition *)
31 deg_next : ∀s,d. deg o s d → deg o (⫯[h]s) (↓d)
34 (* Notable specifications ***************************************************)
36 definition deg_O: relation nat ≝ λs,d. d = 0.
38 definition sd_O: sd ≝ mk_sd deg_O.
40 lemma sd_O_props (h): sd_props h sd_O ≝ mk_sd_props ….
41 /2 width=2 by le_n_O_to_eq, le_n, ex_intro/ qed.
43 (* Basic inversion lemmas ***************************************************)
45 lemma deg_inv_pred (h) (o): sd_props h o →
46 ∀s,d. deg o (⫯[h]s) (↑d) → deg o s (↑↑d).
48 elim (deg_total … Ho s) #d0 #H0
49 lapply (deg_next … Ho … H0) #H2
50 lapply (deg_mono … Ho … H1 H2) -H1 -H2 #H >H >S_pred
51 /2 width=2 by ltn_to_ltO/
54 lemma deg_inv_prec (h) (o): sd_props h o →
55 ∀s,n,d. deg o ((next h)^n s) (↑d) → deg o s (↑(d+n)).
56 #h #o #H0 #s #n elim n -n normalize /3 width=3 by deg_inv_pred/
59 (* Basic properties *********************************************************)
61 lemma deg_iter (h) (o): sd_props h o →
62 ∀s,d,n. deg o s d → deg o ((next h)^n s) (d-n).
63 #h #o #Ho #s #d #n elim n -n normalize /3 width=1 by deg_next/
66 lemma deg_next_SO (h) (o): sd_props h o →
67 ∀s,d. deg o s (↑d) → deg o (next h s) d.
68 /2 width=1 by deg_next/ qed-.