src/HOLCF/Product_Cpo.thy
changeset 31076 99fe356cbbc2
parent 31041 85b4843d9939
child 31112 4dcda8ca5d59
     1.1 --- a/src/HOLCF/Product_Cpo.thy	Fri May 08 19:28:11 2009 +0100
     1.2 +++ b/src/HOLCF/Product_Cpo.thy	Fri May 08 16:19:51 2009 -0700
     1.3 @@ -12,11 +12,11 @@
     1.4  
     1.5  subsection {* Type @{typ unit} is a pcpo *}
     1.6  
     1.7 -instantiation unit :: sq_ord
     1.8 +instantiation unit :: below
     1.9  begin
    1.10  
    1.11  definition
    1.12 -  less_unit_def [simp]: "x \<sqsubseteq> (y::unit) \<equiv> True"
    1.13 +  below_unit_def [simp]: "x \<sqsubseteq> (y::unit) \<longleftrightarrow> True"
    1.14  
    1.15  instance ..
    1.16  end
    1.17 @@ -32,11 +32,11 @@
    1.18  
    1.19  subsection {* Product type is a partial order *}
    1.20  
    1.21 -instantiation "*" :: (sq_ord, sq_ord) sq_ord
    1.22 +instantiation "*" :: (below, below) below
    1.23  begin
    1.24  
    1.25  definition
    1.26 -  less_cprod_def: "(op \<sqsubseteq>) \<equiv> \<lambda>p1 p2. (fst p1 \<sqsubseteq> fst p2 \<and> snd p1 \<sqsubseteq> snd p2)"
    1.27 +  below_prod_def: "(op \<sqsubseteq>) \<equiv> \<lambda>p1 p2. (fst p1 \<sqsubseteq> fst p2 \<and> snd p1 \<sqsubseteq> snd p2)"
    1.28  
    1.29  instance ..
    1.30  end
    1.31 @@ -45,26 +45,26 @@
    1.32  proof
    1.33    fix x :: "'a \<times> 'b"
    1.34    show "x \<sqsubseteq> x"
    1.35 -    unfolding less_cprod_def by simp
    1.36 +    unfolding below_prod_def by simp
    1.37  next
    1.38    fix x y :: "'a \<times> 'b"
    1.39    assume "x \<sqsubseteq> y" "y \<sqsubseteq> x" thus "x = y"
    1.40 -    unfolding less_cprod_def Pair_fst_snd_eq
    1.41 -    by (fast intro: antisym_less)
    1.42 +    unfolding below_prod_def Pair_fst_snd_eq
    1.43 +    by (fast intro: below_antisym)
    1.44  next
    1.45    fix x y z :: "'a \<times> 'b"
    1.46    assume "x \<sqsubseteq> y" "y \<sqsubseteq> z" thus "x \<sqsubseteq> z"
    1.47 -    unfolding less_cprod_def
    1.48 -    by (fast intro: trans_less)
    1.49 +    unfolding below_prod_def
    1.50 +    by (fast intro: below_trans)
    1.51  qed
    1.52  
    1.53  subsection {* Monotonicity of @{text "(_,_)"}, @{term fst}, @{term snd} *}
    1.54  
    1.55 -lemma prod_lessI: "\<lbrakk>fst p \<sqsubseteq> fst q; snd p \<sqsubseteq> snd q\<rbrakk> \<Longrightarrow> p \<sqsubseteq> q"
    1.56 -unfolding less_cprod_def by simp
    1.57 +lemma prod_belowI: "\<lbrakk>fst p \<sqsubseteq> fst q; snd p \<sqsubseteq> snd q\<rbrakk> \<Longrightarrow> p \<sqsubseteq> q"
    1.58 +unfolding below_prod_def by simp
    1.59  
    1.60 -lemma Pair_less_iff [simp]: "(a, b) \<sqsubseteq> (c, d) \<longleftrightarrow> a \<sqsubseteq> c \<and> b \<sqsubseteq> d"
    1.61 -unfolding less_cprod_def by simp
    1.62 +lemma Pair_below_iff [simp]: "(a, b) \<sqsubseteq> (c, d) \<longleftrightarrow> a \<sqsubseteq> c \<and> b \<sqsubseteq> d"
    1.63 +unfolding below_prod_def by simp
    1.64  
    1.65  text {* Pair @{text "(_,_)"}  is monotone in both arguments *}
    1.66  
    1.67 @@ -81,20 +81,20 @@
    1.68  text {* @{term fst} and @{term snd} are monotone *}
    1.69  
    1.70  lemma monofun_fst: "monofun fst"
    1.71 -by (simp add: monofun_def less_cprod_def)
    1.72 +by (simp add: monofun_def below_prod_def)
    1.73  
    1.74  lemma monofun_snd: "monofun snd"
    1.75 -by (simp add: monofun_def less_cprod_def)
    1.76 +by (simp add: monofun_def below_prod_def)
    1.77  
    1.78  subsection {* Product type is a cpo *}
    1.79  
    1.80  lemma is_lub_Pair:
    1.81    "\<lbrakk>range X <<| x; range Y <<| y\<rbrakk> \<Longrightarrow> range (\<lambda>i. (X i, Y i)) <<| (x, y)"
    1.82  apply (rule is_lubI [OF ub_rangeI])
    1.83 -apply (simp add: less_cprod_def is_ub_lub)
    1.84 +apply (simp add: below_prod_def is_ub_lub)
    1.85  apply (frule ub2ub_monofun [OF monofun_fst])
    1.86  apply (drule ub2ub_monofun [OF monofun_snd])
    1.87 -apply (simp add: less_cprod_def is_lub_lub)
    1.88 +apply (simp add: below_prod_def is_lub_lub)
    1.89  done
    1.90  
    1.91  lemma lub_cprod:
    1.92 @@ -134,14 +134,14 @@
    1.93  proof
    1.94    fix x y :: "'a \<times> 'b"
    1.95    show "x \<sqsubseteq> y \<longleftrightarrow> x = y"
    1.96 -    unfolding less_cprod_def Pair_fst_snd_eq
    1.97 +    unfolding below_prod_def Pair_fst_snd_eq
    1.98      by simp
    1.99  qed
   1.100  
   1.101  subsection {* Product type is pointed *}
   1.102  
   1.103  lemma minimal_cprod: "(\<bottom>, \<bottom>) \<sqsubseteq> p"
   1.104 -by (simp add: less_cprod_def)
   1.105 +by (simp add: below_prod_def)
   1.106  
   1.107  instance "*" :: (pcpo, pcpo) pcpo
   1.108  by intro_classes (fast intro: minimal_cprod)
   1.109 @@ -257,20 +257,20 @@
   1.110  
   1.111  subsection {* Compactness and chain-finiteness *}
   1.112  
   1.113 -lemma fst_less_iff: "fst (x::'a \<times> 'b) \<sqsubseteq> y \<longleftrightarrow> x \<sqsubseteq> (y, snd x)"
   1.114 -unfolding less_cprod_def by simp
   1.115 +lemma fst_below_iff: "fst (x::'a \<times> 'b) \<sqsubseteq> y \<longleftrightarrow> x \<sqsubseteq> (y, snd x)"
   1.116 +unfolding below_prod_def by simp
   1.117  
   1.118 -lemma snd_less_iff: "snd (x::'a \<times> 'b) \<sqsubseteq> y = x \<sqsubseteq> (fst x, y)"
   1.119 -unfolding less_cprod_def by simp
   1.120 +lemma snd_below_iff: "snd (x::'a \<times> 'b) \<sqsubseteq> y \<longleftrightarrow> x \<sqsubseteq> (fst x, y)"
   1.121 +unfolding below_prod_def by simp
   1.122  
   1.123  lemma compact_fst: "compact x \<Longrightarrow> compact (fst x)"
   1.124 -by (rule compactI, simp add: fst_less_iff)
   1.125 +by (rule compactI, simp add: fst_below_iff)
   1.126  
   1.127  lemma compact_snd: "compact x \<Longrightarrow> compact (snd x)"
   1.128 -by (rule compactI, simp add: snd_less_iff)
   1.129 +by (rule compactI, simp add: snd_below_iff)
   1.130  
   1.131  lemma compact_Pair: "\<lbrakk>compact x; compact y\<rbrakk> \<Longrightarrow> compact (x, y)"
   1.132 -by (rule compactI, simp add: less_cprod_def)
   1.133 +by (rule compactI, simp add: below_prod_def)
   1.134  
   1.135  lemma compact_Pair_iff [simp]: "compact (x, y) \<longleftrightarrow> compact x \<and> compact y"
   1.136  apply (safe intro!: compact_Pair)