src/HOL/Library/Extended_Nonnegative_Real.thy
changeset 69861 62e47f06d22c
parent 69661 a03a63b81f44
child 70271 f7630118814c
equal deleted inserted replaced
69860:b58a575d211e 69861:62e47f06d22c
   107 
   107 
   108 lemma sup_continuous_SUP[order_continuous_intros]:
   108 lemma sup_continuous_SUP[order_continuous_intros]:
   109   fixes M :: "_ \<Rightarrow> _ \<Rightarrow> 'a::complete_lattice"
   109   fixes M :: "_ \<Rightarrow> _ \<Rightarrow> 'a::complete_lattice"
   110   assumes M: "\<And>i. i \<in> I \<Longrightarrow> sup_continuous (M i)"
   110   assumes M: "\<And>i. i \<in> I \<Longrightarrow> sup_continuous (M i)"
   111   shows  "sup_continuous (SUP i\<in>I. M i)"
   111   shows  "sup_continuous (SUP i\<in>I. M i)"
   112   unfolding sup_continuous_def by (auto simp add: sup_continuousD[OF M] intro: SUP_commute)
   112   unfolding sup_continuous_def by (auto simp add: sup_continuousD [OF M] image_comp intro: SUP_commute)
   113 
   113 
   114 lemma sup_continuous_apply_SUP[order_continuous_intros]:
   114 lemma sup_continuous_apply_SUP[order_continuous_intros]:
   115   fixes M :: "_ \<Rightarrow> _ \<Rightarrow> 'a::complete_lattice"
   115   fixes M :: "_ \<Rightarrow> _ \<Rightarrow> 'a::complete_lattice"
   116   shows "(\<And>i. i \<in> I \<Longrightarrow> sup_continuous (M i)) \<Longrightarrow> sup_continuous (\<lambda>x. SUP i\<in>I. M i x)"
   116   shows "(\<And>i. i \<in> I \<Longrightarrow> sup_continuous (M i)) \<Longrightarrow> sup_continuous (\<lambda>x. SUP i\<in>I. M i x)"
   117   unfolding SUP_apply[symmetric] by (rule sup_continuous_SUP)
   117   unfolding SUP_apply[symmetric] by (rule sup_continuous_SUP)
  1408 lemma INF_ennreal_add_const:
  1408 lemma INF_ennreal_add_const:
  1409   fixes f g :: "nat \<Rightarrow> ennreal"
  1409   fixes f g :: "nat \<Rightarrow> ennreal"
  1410   shows "(INF i. f i + c) = (INF i. f i) + c"
  1410   shows "(INF i. f i + c) = (INF i. f i) + c"
  1411   using continuous_at_Inf_mono[of "\<lambda>x. x + c" "f`UNIV"]
  1411   using continuous_at_Inf_mono[of "\<lambda>x. x + c" "f`UNIV"]
  1412   using continuous_add[of "at_right (Inf (range f))", of "\<lambda>x. x" "\<lambda>x. c"]
  1412   using continuous_add[of "at_right (Inf (range f))", of "\<lambda>x. x" "\<lambda>x. c"]
  1413   by (auto simp: mono_def)
  1413   by (auto simp: mono_def image_comp)
  1414 
  1414 
  1415 lemma INF_ennreal_const_add:
  1415 lemma INF_ennreal_const_add:
  1416   fixes f g :: "nat \<Rightarrow> ennreal"
  1416   fixes f g :: "nat \<Rightarrow> ennreal"
  1417   shows "(INF i. c + f i) = c + (INF i. f i)"
  1417   shows "(INF i. c + f i) = c + (INF i. f i)"
  1418   using INF_ennreal_add_const[of f c] by (simp add: ac_simps)
  1418   using INF_ennreal_add_const[of f c] by (simp add: ac_simps)
  1607     by (rule mono_SUP[OF sup_continuous_mono[OF f]])
  1607     by (rule mono_SUP[OF sup_continuous_mono[OF f]])
  1608   from ennreal_Sup_countable_SUP[of "g`I"] \<open>I \<noteq> {}\<close>
  1608   from ennreal_Sup_countable_SUP[of "g`I"] \<open>I \<noteq> {}\<close>
  1609   obtain M :: "nat \<Rightarrow> ennreal" where "incseq M" and M: "range M \<subseteq> g ` I" and eq: "(SUP i \<in> I. g i) = (SUP i. M i)"
  1609   obtain M :: "nat \<Rightarrow> ennreal" where "incseq M" and M: "range M \<subseteq> g ` I" and eq: "(SUP i \<in> I. g i) = (SUP i. M i)"
  1610     by auto
  1610     by auto
  1611   have "f (SUP i \<in> I. g i) = (SUP i \<in> range M. f i)"
  1611   have "f (SUP i \<in> I. g i) = (SUP i \<in> range M. f i)"
  1612     unfolding eq sup_continuousD[OF f \<open>mono M\<close>] by simp
  1612     unfolding eq sup_continuousD[OF f \<open>mono M\<close>] by (simp add: image_comp)
  1613   also have "\<dots> \<le> (SUP i \<in> I. f (g i))"
  1613   also have "\<dots> \<le> (SUP i \<in> I. f (g i))"
  1614     by (insert M, drule SUP_subset_mono) auto
  1614     by (insert M, drule SUP_subset_mono) (auto simp add: image_comp)
  1615   finally show "f (SUP i \<in> I. g i) \<le> (SUP i \<in> I. f (g i))" .
  1615   finally show "f (SUP i \<in> I. g i) \<le> (SUP i \<in> I. f (g i))" .
  1616 qed
  1616 qed
  1617 
  1617 
  1618 lemma ennreal_suminf_SUP_eq:
  1618 lemma ennreal_suminf_SUP_eq:
  1619   fixes f :: "nat \<Rightarrow> nat \<Rightarrow> ennreal"
  1619   fixes f :: "nat \<Rightarrow> nat \<Rightarrow> ennreal"