ord.thy
author nipkow
Sat, 13 Aug 1994 16:33:53 +0200
changeset 101 5f99df1e26c4
parent 0 7949f97df77a
permissions -rw-r--r--
Added primitive recursive functions (Norbert Voelker's code) to the datatype package.

Ord = HOL +
classes
  ord < term
consts
  "<", "<="     :: "['a::ord, 'a] => bool"              (infixl 50)
  mono		:: "['a::ord => 'b::ord] => bool"       (*monotonicity*)
  min,max	:: "['a::ord,'a] => 'a"

rules

mono_def  "mono(f)  == (!A B. A <= B --> f(A) <= f(B))"
min_def   "min(a,b) == if(a <= b, a, b)"
max_def   "max(a,b) == if(a <= b, b, a)"

end