src/HOL/Library/Product_ord.thy
author paulson
Tue Jun 28 15:27:45 2005 +0200 (2005-06-28)
changeset 16587 b34c8aa657a5
parent 15737 c7e522520910
child 17200 3a4d03d1a31b
permissions -rw-r--r--
Constant "If" is now local
     1 (*  Title:      HOL/Library/Product_ord.thy
     2     ID:         $Id$
     3     Author:     Norbert Voelker
     4 *)
     5 
     6 header {* Instantiation of order classes for 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   apply (intro_classes, unfold prod_ord_defs)
    23   by (auto intro: order_less_trans)
    24 
    25 instance "*":: (linorder,linorder)linorder
    26   by (intro_classes, unfold prod_le_def, auto)
    27 
    28 end