src/HOL/Complete_Lattices.thy
changeset 69546 27dae626822b
parent 69275 9bbd5497befd
child 69593 3dda49e08b9d
equal deleted inserted replaced
69545:4aed40ecfb43 69546:27dae626822b
    59   by simp
    59   by simp
    60 
    60 
    61 lemma INF_cong: "A = B \<Longrightarrow> (\<And>x. x \<in> B \<Longrightarrow> C x = D x) \<Longrightarrow> \<Sqinter>(C ` A) = \<Sqinter>(D ` B)"
    61 lemma INF_cong: "A = B \<Longrightarrow> (\<And>x. x \<in> B \<Longrightarrow> C x = D x) \<Longrightarrow> \<Sqinter>(C ` A) = \<Sqinter>(D ` B)"
    62   by (simp add: image_def)
    62   by (simp add: image_def)
    63 
    63 
    64 lemma INF_cong_strong [cong]:
    64 lemma INF_cong_simp [cong]:
    65   "A = B \<Longrightarrow> (\<And>x. x \<in> B =simp=> C x = D x) \<Longrightarrow> \<Sqinter>(C ` A) = \<Sqinter>(D ` B)"
    65   "A = B \<Longrightarrow> (\<And>x. x \<in> B =simp=> C x = D x) \<Longrightarrow> \<Sqinter>(C ` A) = \<Sqinter>(D ` B)"
    66   unfolding simp_implies_def by (fact INF_cong)
    66   unfolding simp_implies_def by (fact INF_cong)
    67 
    67 
    68 end
    68 end
    69 
    69 
    80 by(fact Inf.INF_id_eq)
    80 by(fact Inf.INF_id_eq)
    81 
    81 
    82 lemma SUP_cong: "A = B \<Longrightarrow> (\<And>x. x \<in> B \<Longrightarrow> C x = D x) \<Longrightarrow> \<Squnion>(C ` A) = \<Squnion>(D ` B)"
    82 lemma SUP_cong: "A = B \<Longrightarrow> (\<And>x. x \<in> B \<Longrightarrow> C x = D x) \<Longrightarrow> \<Squnion>(C ` A) = \<Squnion>(D ` B)"
    83 by (fact Inf.INF_cong)
    83 by (fact Inf.INF_cong)
    84 
    84 
    85 lemma SUP_cong_strong [cong]:
    85 lemma SUP_cong_simp [cong]:
    86   "A = B \<Longrightarrow> (\<And>x. x \<in> B =simp=> C x = D x) \<Longrightarrow> \<Squnion>(C ` A) = \<Squnion>(D ` B)"
    86   "A = B \<Longrightarrow> (\<And>x. x \<in> B =simp=> C x = D x) \<Longrightarrow> \<Squnion>(C ` A) = \<Squnion>(D ` B)"
    87 by (fact Inf.INF_cong_strong)
    87 by (fact Inf.INF_cong_simp)
    88 
    88 
    89 end
    89 end
    90 
    90 
    91 
    91 
    92 subsection \<open>Abstract complete lattices\<close>
    92 subsection \<open>Abstract complete lattices\<close>
   177 
   177 
   178 lemma Inf_insert [simp]: "\<Sqinter>insert a A = a \<sqinter> \<Sqinter>A"
   178 lemma Inf_insert [simp]: "\<Sqinter>insert a A = a \<sqinter> \<Sqinter>A"
   179   by (auto intro: le_infI le_infI1 le_infI2 antisym Inf_greatest Inf_lower)
   179   by (auto intro: le_infI le_infI1 le_infI2 antisym Inf_greatest Inf_lower)
   180 
   180 
   181 lemma INF_insert [simp]: "(\<Sqinter>x\<in>insert a A. f x) = f a \<sqinter> \<Sqinter>(f ` A)"
   181 lemma INF_insert [simp]: "(\<Sqinter>x\<in>insert a A. f x) = f a \<sqinter> \<Sqinter>(f ` A)"
   182   by (simp cong del: INF_cong_strong)
   182   by (simp cong del: INF_cong_simp)
   183 
   183 
   184 lemma Sup_insert [simp]: "\<Squnion>insert a A = a \<squnion> \<Squnion>A"
   184 lemma Sup_insert [simp]: "\<Squnion>insert a A = a \<squnion> \<Squnion>A"
   185   by (auto intro: le_supI le_supI1 le_supI2 antisym Sup_least Sup_upper)
   185   by (auto intro: le_supI le_supI1 le_supI2 antisym Sup_least Sup_upper)
   186 
   186 
   187 lemma SUP_insert [simp]: "(\<Squnion>x\<in>insert a A. f x) = f a \<squnion> \<Squnion>(f ` A)"
   187 lemma SUP_insert [simp]: "(\<Squnion>x\<in>insert a A. f x) = f a \<squnion> \<Squnion>(f ` A)"
   188   by (simp cong del: SUP_cong_strong)
   188   by (simp cong del: SUP_cong_simp)
   189 
   189 
   190 lemma INF_empty [simp]: "(\<Sqinter>x\<in>{}. f x) = \<top>"
   190 lemma INF_empty [simp]: "(\<Sqinter>x\<in>{}. f x) = \<top>"
   191   by (simp cong del: INF_cong_strong)
   191   by (simp cong del: INF_cong_simp)
   192 
   192 
   193 lemma SUP_empty [simp]: "(\<Squnion>x\<in>{}. f x) = \<bottom>"
   193 lemma SUP_empty [simp]: "(\<Squnion>x\<in>{}. f x) = \<bottom>"
   194   by (simp cong del: SUP_cong_strong)
   194   by (simp cong del: SUP_cong_simp)
   195 
   195 
   196 lemma Inf_UNIV [simp]: "\<Sqinter>UNIV = \<bottom>"
   196 lemma Inf_UNIV [simp]: "\<Sqinter>UNIV = \<bottom>"
   197   by (auto intro!: antisym Inf_lower)
   197   by (auto intro!: antisym Inf_lower)
   198 
   198 
   199 lemma Sup_UNIV [simp]: "\<Squnion>UNIV = \<top>"
   199 lemma Sup_UNIV [simp]: "\<Squnion>UNIV = \<top>"
   435 lemma SUP_eq_const: "I \<noteq> {} \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> f i = x) \<Longrightarrow> \<Squnion>(f ` I) = x"
   435 lemma SUP_eq_const: "I \<noteq> {} \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> f i = x) \<Longrightarrow> \<Squnion>(f ` I) = x"
   436   by (auto intro: SUP_eqI)
   436   by (auto intro: SUP_eqI)
   437 
   437 
   438 lemma INF_eq_iff: "I \<noteq> {} \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> f i \<le> c) \<Longrightarrow> \<Sqinter>(f ` I) = c \<longleftrightarrow> (\<forall>i\<in>I. f i = c)"
   438 lemma INF_eq_iff: "I \<noteq> {} \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> f i \<le> c) \<Longrightarrow> \<Sqinter>(f ` I) = c \<longleftrightarrow> (\<forall>i\<in>I. f i = c)"
   439   using INF_eq_const [of I f c] INF_lower [of _ I f]
   439   using INF_eq_const [of I f c] INF_lower [of _ I f]
   440   by (auto intro: antisym cong del: INF_cong_strong)
   440   by (auto intro: antisym cong del: INF_cong_simp)
   441 
   441 
   442 lemma SUP_eq_iff: "I \<noteq> {} \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> c \<le> f i) \<Longrightarrow> \<Squnion>(f ` I) = c \<longleftrightarrow> (\<forall>i\<in>I. f i = c)"
   442 lemma SUP_eq_iff: "I \<noteq> {} \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> c \<le> f i) \<Longrightarrow> \<Squnion>(f ` I) = c \<longleftrightarrow> (\<forall>i\<in>I. f i = c)"
   443   using SUP_eq_const [of I f c] SUP_upper [of _ I f]
   443   using SUP_eq_const [of I f c] SUP_upper [of _ I f]
   444   by (auto intro: antisym cong del: SUP_cong_strong)
   444   by (auto intro: antisym cong del: SUP_cong_simp)
   445 
   445 
   446 end
   446 end
   447 
   447 
   448 context complete_lattice
   448 context complete_lattice
   449 begin
   449 begin