src/HOL/Library/Product_ord.thy
author wenzelm
Sat May 27 17:42:02 2006 +0200 (2006-05-27)
changeset 19736 d8d0f8f51d69
parent 17200 3a4d03d1a31b
child 21458 475b321982f7
permissions -rw-r--r--
tuned;
     1 (*  Title:      HOL/Library/Product_ord.thy
     2     ID:         $Id$
     3     Author:     Norbert Voelker
     4 *)
     5 
     6 header {* Order on product types *}
     7 
     8 theory Product_ord
     9 imports Main
    10 begin
    11 
    12 instance "*" :: (ord, ord) ord ..
    13 
    14 defs (overloaded)
    15   prod_le_def: "(x \<le> y) \<equiv> (fst x < fst y) | (fst x = fst y & snd x \<le> snd y)"
    16   prod_less_def: "(x < y) \<equiv> (fst x < fst y) | (fst x = fst y & snd x < snd y)"
    17 
    18 
    19 lemmas prod_ord_defs = prod_less_def prod_le_def
    20 
    21 instance * :: (order, order) order
    22   by default (auto simp: prod_ord_defs intro: order_less_trans)
    23 
    24 instance * :: (linorder, linorder) linorder
    25   by default (auto simp: prod_le_def)
    26 
    27 end