src/HOL/Ord.thy
author nipkow
Tue Apr 08 10:48:42 1997 +0200 (1997-04-08)
changeset 2919 953a47dc0519
parent 2624 ab311b6e5e29
child 3143 d60e49b86c6a
permissions -rw-r--r--
Dep. on Provers/nat_transitive
clasohm@923
     1
(*  Title:      HOL/Ord.thy
clasohm@923
     2
    ID:         $Id$
clasohm@923
     3
    Author:     Tobias Nipkow, Cambridge University Computer Laboratory
clasohm@923
     4
    Copyright   1993  University of Cambridge
clasohm@923
     5
wenzelm@2624
     6
Type classes for order signatures and orders.
clasohm@923
     7
*)
clasohm@923
     8
clasohm@923
     9
Ord = HOL +
clasohm@923
    10
clasohm@923
    11
axclass
clasohm@923
    12
  ord < term
clasohm@923
    13
clasohm@923
    14
consts
wenzelm@2259
    15
  "op <"        :: ['a::ord, 'a] => bool             ("(_/ < _)"  [50, 51] 50)
wenzelm@2259
    16
  "op <="       :: ['a::ord, 'a] => bool             ("(_/ <= _)" [50, 51] 50)
clasohm@1370
    17
  mono          :: ['a::ord => 'b::ord] => bool       (*monotonicity*)
clasohm@1370
    18
  min, max      :: ['a::ord, 'a] => 'a
clasohm@923
    19
nipkow@2608
    20
  Least         :: ('a::ord=>bool) => 'a             (binder "LEAST " 10)
nipkow@2608
    21
wenzelm@2259
    22
syntax
wenzelm@2259
    23
  "op <"        :: ['a::ord, 'a] => bool             ("op <")
wenzelm@2259
    24
  "op <="       :: ['a::ord, 'a] => bool             ("op <=")
wenzelm@2259
    25
wenzelm@2259
    26
syntax (symbols)
wenzelm@2259
    27
  "op <="       :: ['a::ord, 'a] => bool             ("(_/ \\<le> _)"  [50, 51] 50)
wenzelm@2259
    28
  "op <="       :: ['a::ord, 'a] => bool             ("op \\<le>")
wenzelm@2259
    29
clasohm@923
    30
defs
clasohm@923
    31
  mono_def      "mono(f) == (!A B. A <= B --> f(A) <= f(B))"
clasohm@965
    32
  min_def       "min a b == (if a <= b then a else b)"
clasohm@965
    33
  max_def       "max a b == (if a <= b then b else a)"
nipkow@2608
    34
  Least_def     "Least P == @x. P(x) & (ALL y. y<x --> ~P(y))"
nipkow@2608
    35
nipkow@2608
    36
nipkow@2608
    37
axclass order < ord
nipkow@2608
    38
  order_refl    "x <= x"
nipkow@2608
    39
  order_trans   "[| x <= y; y <= z |] ==> x <= z"
nipkow@2608
    40
  order_antisym "[| x <= y; y <= x |] ==> x = y"
nipkow@2608
    41
  order_less_le "x < y = (x <= y & x ~= y)"
clasohm@923
    42
clasohm@923
    43
end