src/HOL/Library/Product_Order.thy
changeset 69260 0a9688695a1b
parent 67829 2a6ef5ba4822
child 69313 b021008c5397
equal deleted inserted replaced
69259:438e1a11445f 69260:0a9688695a1b
   159 subsection \<open>Complete lattice operations\<close>
   159 subsection \<open>Complete lattice operations\<close>
   160 
   160 
   161 instantiation prod :: (Inf, Inf) Inf
   161 instantiation prod :: (Inf, Inf) Inf
   162 begin
   162 begin
   163 
   163 
   164 definition "Inf A = (INF x:A. fst x, INF x:A. snd x)"
   164 definition "Inf A = (INF x\<in>A. fst x, INF x\<in>A. snd x)"
   165 
   165 
   166 instance ..
   166 instance ..
   167 
   167 
   168 end
   168 end
   169 
   169 
   170 instantiation prod :: (Sup, Sup) Sup
   170 instantiation prod :: (Sup, Sup) Sup
   171 begin
   171 begin
   172 
   172 
   173 definition "Sup A = (SUP x:A. fst x, SUP x:A. snd x)"
   173 definition "Sup A = (SUP x\<in>A. fst x, SUP x\<in>A. snd x)"
   174 
   174 
   175 instance ..
   175 instance ..
   176 
   176 
   177 end
   177 end
   178 
   178 
   183 
   183 
   184 instance prod :: (complete_lattice, complete_lattice) complete_lattice
   184 instance prod :: (complete_lattice, complete_lattice) complete_lattice
   185   by standard (simp_all add: less_eq_prod_def Inf_prod_def Sup_prod_def
   185   by standard (simp_all add: less_eq_prod_def Inf_prod_def Sup_prod_def
   186     INF_lower SUP_upper le_INF_iff SUP_le_iff bot_prod_def top_prod_def)
   186     INF_lower SUP_upper le_INF_iff SUP_le_iff bot_prod_def top_prod_def)
   187 
   187 
   188 lemma fst_Sup: "fst (Sup A) = (SUP x:A. fst x)"
   188 lemma fst_Sup: "fst (Sup A) = (SUP x\<in>A. fst x)"
   189   unfolding Sup_prod_def by simp
   189   unfolding Sup_prod_def by simp
   190 
   190 
   191 lemma snd_Sup: "snd (Sup A) = (SUP x:A. snd x)"
   191 lemma snd_Sup: "snd (Sup A) = (SUP x\<in>A. snd x)"
   192   unfolding Sup_prod_def by simp
   192   unfolding Sup_prod_def by simp
   193 
   193 
   194 lemma fst_Inf: "fst (Inf A) = (INF x:A. fst x)"
   194 lemma fst_Inf: "fst (Inf A) = (INF x\<in>A. fst x)"
   195   unfolding Inf_prod_def by simp
   195   unfolding Inf_prod_def by simp
   196 
   196 
   197 lemma snd_Inf: "snd (Inf A) = (INF x:A. snd x)"
   197 lemma snd_Inf: "snd (Inf A) = (INF x\<in>A. snd x)"
   198   unfolding Inf_prod_def by simp
   198   unfolding Inf_prod_def by simp
   199 
   199 
   200 lemma fst_SUP: "fst (SUP x:A. f x) = (SUP x:A. fst (f x))"
   200 lemma fst_SUP: "fst (SUP x\<in>A. f x) = (SUP x\<in>A. fst (f x))"
   201   using fst_Sup [of "f ` A", symmetric] by (simp add: comp_def)
   201   using fst_Sup [of "f ` A", symmetric] by (simp add: comp_def)
   202 
   202 
   203 lemma snd_SUP: "snd (SUP x:A. f x) = (SUP x:A. snd (f x))"
   203 lemma snd_SUP: "snd (SUP x\<in>A. f x) = (SUP x\<in>A. snd (f x))"
   204   using snd_Sup [of "f ` A", symmetric] by (simp add: comp_def)
   204   using snd_Sup [of "f ` A", symmetric] by (simp add: comp_def)
   205 
   205 
   206 lemma fst_INF: "fst (INF x:A. f x) = (INF x:A. fst (f x))"
   206 lemma fst_INF: "fst (INF x\<in>A. f x) = (INF x\<in>A. fst (f x))"
   207   using fst_Inf [of "f ` A", symmetric] by (simp add: comp_def)
   207   using fst_Inf [of "f ` A", symmetric] by (simp add: comp_def)
   208 
   208 
   209 lemma snd_INF: "snd (INF x:A. f x) = (INF x:A. snd (f x))"
   209 lemma snd_INF: "snd (INF x\<in>A. f x) = (INF x\<in>A. snd (f x))"
   210   using snd_Inf [of "f ` A", symmetric] by (simp add: comp_def)
   210   using snd_Inf [of "f ` A", symmetric] by (simp add: comp_def)
   211 
   211 
   212 lemma SUP_Pair: "(SUP x:A. (f x, g x)) = (SUP x:A. f x, SUP x:A. g x)"
   212 lemma SUP_Pair: "(SUP x\<in>A. (f x, g x)) = (SUP x\<in>A. f x, SUP x\<in>A. g x)"
   213   unfolding Sup_prod_def by (simp add: comp_def)
   213   unfolding Sup_prod_def by (simp add: comp_def)
   214 
   214 
   215 lemma INF_Pair: "(INF x:A. (f x, g x)) = (INF x:A. f x, INF x:A. g x)"
   215 lemma INF_Pair: "(INF x\<in>A. (f x, g x)) = (INF x\<in>A. f x, INF x\<in>A. g x)"
   216   unfolding Inf_prod_def by (simp add: comp_def)
   216   unfolding Inf_prod_def by (simp add: comp_def)
   217 
   217 
   218 
   218 
   219 text \<open>Alternative formulations for set infima and suprema over the product
   219 text \<open>Alternative formulations for set infima and suprema over the product
   220 of two complete lattices:\<close>
   220 of two complete lattices:\<close>