src/HOL/Library/Product_ord.thy
changeset 25502 9200b36280c0
parent 22845 5f9138bcb3d7
child 25571 c9e39eafc7a0
     1.1 --- a/src/HOL/Library/Product_ord.thy	Thu Nov 29 07:55:46 2007 +0100
     1.2 +++ b/src/HOL/Library/Product_ord.thy	Thu Nov 29 17:08:26 2007 +0100
     1.3 @@ -10,30 +10,28 @@
     1.4  begin
     1.5  
     1.6  instance "*" :: (ord, ord) ord
     1.7 -  prod_le_def: "(x \<le> y) \<equiv> (fst x < fst y) \<or> (fst x = fst y \<and> snd x \<le> snd y)"
     1.8 -  prod_less_def: "(x < y) \<equiv> (fst x < fst y) \<or> (fst x = fst y \<and> snd x < snd y)" ..
     1.9 -
    1.10 -lemmas prod_ord_defs [code func del] = prod_less_def prod_le_def
    1.11 +  prod_le_def [code func del]: "x \<le> y \<longleftrightarrow> fst x < fst y \<or> fst x = fst y \<and> snd x \<le> snd y"
    1.12 +  prod_less_def [code func del]: "x < y \<longleftrightarrow> fst x < fst y \<or> fst x = fst y \<and> snd x < snd y" ..
    1.13  
    1.14  lemma [code func]:
    1.15    "(x1\<Colon>'a\<Colon>{ord, eq}, y1) \<le> (x2, y2) \<longleftrightarrow> x1 < x2 \<or> x1 = x2 \<and> y1 \<le> y2"
    1.16    "(x1\<Colon>'a\<Colon>{ord, eq}, y1) < (x2, y2) \<longleftrightarrow> x1 < x2 \<or> x1 = x2 \<and> y1 < y2"
    1.17 -  unfolding prod_ord_defs by simp_all
    1.18 +  unfolding prod_le_def prod_less_def by simp_all
    1.19  
    1.20  lemma [code]:
    1.21    "(x1, y1) \<le> (x2, y2) \<longleftrightarrow> x1 < x2 \<or> x1 = x2 \<and> y1 \<le> y2"
    1.22    "(x1, y1) < (x2, y2) \<longleftrightarrow> x1 < x2 \<or> x1 = x2 \<and> y1 < y2"
    1.23 -  unfolding prod_ord_defs by simp_all
    1.24 +  unfolding prod_le_def prod_less_def by simp_all
    1.25  
    1.26  instance * :: (order, order) order
    1.27 -  by default (auto simp: prod_ord_defs intro: order_less_trans)
    1.28 +  by default (auto simp: prod_le_def prod_less_def intro: order_less_trans)
    1.29  
    1.30  instance * :: (linorder, linorder) linorder
    1.31    by default (auto simp: prod_le_def)
    1.32  
    1.33  instance * :: (linorder, linorder) distrib_lattice
    1.34 -  inf_prod_def: "inf \<equiv> min"
    1.35 -  sup_prod_def: "sup \<equiv> max"
    1.36 +  inf_prod_def: "(inf \<Colon> 'a \<times> 'b \<Rightarrow> _ \<Rightarrow> _) = min"
    1.37 +  sup_prod_def: "(sup \<Colon> 'a \<times> 'b \<Rightarrow> _ \<Rightarrow> _) = max"
    1.38    by intro_classes
    1.39      (auto simp add: inf_prod_def sup_prod_def min_max.sup_inf_distrib1)
    1.40