src/HOL/AxClasses/Lattice/Order.thy
author paulson
Thu, 18 Jan 1996 10:38:29 +0100
changeset 1444 23ceb1dc9755
parent 1440 de6f18da81bb
child 1573 6d66b59f94a9
permissions -rw-r--r--
trivial updates
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     1
(*  Title:      Order.thy
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     2
    ID:         $Id$
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     3
    Author:     Markus Wenzel, TU Muenchen
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     4
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     5
Basic theory of orders (quasi orders, partial orders, linear orders)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     6
and limits (inf, sup, min, max).
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     7
*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     8
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     9
Order = HOL + Set +
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    10
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    11
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    12
(** class definitions **)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    13
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    14
(* syntax for orders *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    15
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    16
axclass
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    17
  le < term
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    18
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    19
consts
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    20
  "[="          :: "['a::le, 'a] => bool"             (infixl 50)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    21
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    22
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    23
(* quasi orders *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    24
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    25
axclass
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    26
  quasi_order < le
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    27
  le_refl       "x [= x"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    28
  le_trans      "x [= y & y [= z --> x [= z"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    29
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    30
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    31
(* partial orders *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    32
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    33
axclass
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    34
  order < quasi_order
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    35
  le_antisym    "x [= y & y [= x --> x = y"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    36
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    37
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    38
(* linear orders *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    39
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    40
axclass
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    41
  lin_order < order
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    42
  le_lin        "x [= y | y [= x"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    43
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    44
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    45
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    46
(** limits **)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    47
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    48
(* infima and suprema (on orders) *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    49
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    50
consts
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    51
  (*binary*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    52
  is_inf        :: "['a::order, 'a, 'a] => bool"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    53
  is_sup        :: "['a::order, 'a, 'a] => bool"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    54
  (*general*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    55
  is_Inf        :: "['a::order set, 'a] => bool"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    56
  is_Sup        :: "['a::order set, 'a] => bool"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    57
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    58
defs
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    59
  is_inf_def    "is_inf x y inf ==
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    60
                   inf [= x & inf [= y &
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    61
                   (ALL lb. lb [= x & lb [= y --> lb [= inf)"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    62
  is_sup_def    "is_sup x y sup ==
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    63
                   x [= sup & y [= sup &
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    64
                   (ALL ub. x [= ub & y [= ub --> sup [= ub)"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    65
  is_Inf_def    "is_Inf A inf ==
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    66
                   (ALL x:A. inf [= x) &
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    67
                   (ALL lb. (ALL x:A. lb [= x) --> lb [= inf)"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    68
  is_Sup_def    "is_Sup A sup ==
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    69
                   (ALL x:A. x [= sup) &
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    70
                   (ALL ub. (ALL x:A. x [= ub) --> sup [= ub)"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    71
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    72
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    73
(* binary minima and maxima (on lin_orders) *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    74
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    75
consts
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    76
  minimum      :: "['a::lin_order, 'a] => 'a"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    77
  maximum      :: "['a::lin_order, 'a] => 'a"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    78
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    79
defs
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    80
  minimum_def  "minimum x y == (if x [= y then x else y)"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    81
  maximum_def  "maximum x y == (if x [= y then y else x)"
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    82
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    83
end