author | paulson |
Tue, 01 Oct 1996 15:49:29 +0200 | |
changeset 2048 | bb54fbba0071 |
parent 2006 | 72754e060aa2 |
child 2259 | e6d738f2b9a9 |
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 |
||
6 |
The type class for ordered types (* FIXME improve comment *) |
|
7 |
*) |
|
8 |
||
9 |
Ord = HOL + |
|
10 |
||
11 |
axclass |
|
12 |
ord < term |
|
13 |
||
14 |
consts |
|
2006 | 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 |
|
20 |
defs |
|
21 |
mono_def "mono(f) == (!A B. A <= B --> f(A) <= f(B))" |
|
965 | 22 |
min_def "min a b == (if a <= b then a else b)" |
23 |
max_def "max a b == (if a <= b then b else a)" |
|
923 | 24 |
|
25 |
end |
|
26 |