author | nipkow |
Fri, 17 Jan 1997 18:32:24 +0100 | |
changeset 2523 | 0ccea141409b |
parent 2259 | e6d738f2b9a9 |
child 2608 | 450c9b682a92 |
permissions | -rw-r--r-- |
923 | 1 |
(* Title: HOL/Ord.thy |
2 |
ID: $Id$ |
|
3 |
Author: Tobias Nipkow, Cambridge University Computer Laboratory |
|
4 |
Copyright 1993 University of Cambridge |
|
5 |
||
2259 | 6 |
Type class for order signatures. |
923 | 7 |
*) |
8 |
||
9 |
Ord = HOL + |
|
10 |
||
11 |
axclass |
|
12 |
ord < term |
|
13 |
||
14 |
consts |
|
2259 | 15 |
"op <" :: ['a::ord, 'a] => bool ("(_/ < _)" [50, 51] 50) |
16 |
"op <=" :: ['a::ord, 'a] => bool ("(_/ <= _)" [50, 51] 50) |
|
1370
7361ac9b024d
removed quotes from types in consts and syntax sections
clasohm
parents:
965
diff
changeset
|
17 |
mono :: ['a::ord => 'b::ord] => bool (*monotonicity*) |
7361ac9b024d
removed quotes from types in consts and syntax sections
clasohm
parents:
965
diff
changeset
|
18 |
min, max :: ['a::ord, 'a] => 'a |
923 | 19 |
|
2259 | 20 |
syntax |
21 |
"op <" :: ['a::ord, 'a] => bool ("op <") |
|
22 |
"op <=" :: ['a::ord, 'a] => bool ("op <=") |
|
23 |
||
24 |
syntax (symbols) |
|
25 |
"op <=" :: ['a::ord, 'a] => bool ("(_/ \\<le> _)" [50, 51] 50) |
|
26 |
"op <=" :: ['a::ord, 'a] => bool ("op \\<le>") |
|
27 |
||
923 | 28 |
defs |
29 |
mono_def "mono(f) == (!A B. A <= B --> f(A) <= f(B))" |
|
965 | 30 |
min_def "min a b == (if a <= b then a else b)" |
31 |
max_def "max a b == (if a <= b then b else a)" |
|
923 | 32 |
|
33 |
end |