src/HOL/Library/Product_ord.thy
author wenzelm
Wed, 08 Nov 2006 23:11:13 +0100
changeset 21256 47195501ecf7
parent 19736 d8d0f8f51d69
child 21458 475b321982f7
permissions -rw-r--r--
moved theories Parity, GCD, Binomial to Library;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15737
nipkow
parents:
diff changeset
     1
(*  Title:      HOL/Library/Product_ord.thy
nipkow
parents:
diff changeset
     2
    ID:         $Id$
nipkow
parents:
diff changeset
     3
    Author:     Norbert Voelker
nipkow
parents:
diff changeset
     4
*)
nipkow
parents:
diff changeset
     5
17200
3a4d03d1a31b tuned presentation;
wenzelm
parents: 15737
diff changeset
     6
header {* Order on product types *}
15737
nipkow
parents:
diff changeset
     7
nipkow
parents:
diff changeset
     8
theory Product_ord
nipkow
parents:
diff changeset
     9
imports Main
nipkow
parents:
diff changeset
    10
begin
nipkow
parents:
diff changeset
    11
19736
wenzelm
parents: 17200
diff changeset
    12
instance "*" :: (ord, ord) ord ..
15737
nipkow
parents:
diff changeset
    13
nipkow
parents:
diff changeset
    14
defs (overloaded)
19736
wenzelm
parents: 17200
diff changeset
    15
  prod_le_def: "(x \<le> y) \<equiv> (fst x < fst y) | (fst x = fst y & snd x \<le> snd y)"
15737
nipkow
parents:
diff changeset
    16
  prod_less_def: "(x < y) \<equiv> (fst x < fst y) | (fst x = fst y & snd x < snd y)"
nipkow
parents:
diff changeset
    17
nipkow
parents:
diff changeset
    18
nipkow
parents:
diff changeset
    19
lemmas prod_ord_defs = prod_less_def prod_le_def
nipkow
parents:
diff changeset
    20
19736
wenzelm
parents: 17200
diff changeset
    21
instance * :: (order, order) order
wenzelm
parents: 17200
diff changeset
    22
  by default (auto simp: prod_ord_defs intro: order_less_trans)
15737
nipkow
parents:
diff changeset
    23
19736
wenzelm
parents: 17200
diff changeset
    24
instance * :: (linorder, linorder) linorder
wenzelm
parents: 17200
diff changeset
    25
  by default (auto simp: prod_le_def)
15737
nipkow
parents:
diff changeset
    26
19736
wenzelm
parents: 17200
diff changeset
    27
end