src/HOL/Library/Extended_Real.thy
changeset 60762 bf0c76ccee8d
parent 60720 8c99fa3b7c44
child 60771 8558e4a37b48
equal deleted inserted replaced
60761:a443b08281e2 60762:bf0c76ccee8d
  1818 proof (rule continuous_at_Sup_mono)
  1818 proof (rule continuous_at_Sup_mono)
  1819   obtain r where r: "ereal r = (SUP a:A. ereal a)" "A \<noteq> {}"
  1819   obtain r where r: "ereal r = (SUP a:A. ereal a)" "A \<noteq> {}"
  1820     using * by (force simp: bot_ereal_def)
  1820     using * by (force simp: bot_ereal_def)
  1821   then show "bdd_above A" "A \<noteq> {}"
  1821   then show "bdd_above A" "A \<noteq> {}"
  1822     by (auto intro!: SUP_upper bdd_aboveI[of _ r] simp add: ereal_less_eq(3)[symmetric] simp del: ereal_less_eq)
  1822     by (auto intro!: SUP_upper bdd_aboveI[of _ r] simp add: ereal_less_eq(3)[symmetric] simp del: ereal_less_eq)
  1823 qed (auto simp: mono_def continuous_at_within continuous_at_ereal)
  1823 qed (auto simp: mono_def continuous_at_imp_continuous_at_within continuous_at_ereal)
  1824 
  1824 
  1825 lemma ereal_SUP: "\<bar>SUP a:A. ereal (f a)\<bar> \<noteq> \<infinity> \<Longrightarrow> ereal (SUP a:A. f a) = (SUP a:A. ereal (f a))"
  1825 lemma ereal_SUP: "\<bar>SUP a:A. ereal (f a)\<bar> \<noteq> \<infinity> \<Longrightarrow> ereal (SUP a:A. f a) = (SUP a:A. ereal (f a))"
  1826   using ereal_Sup[of "f`A"] by auto
  1826   using ereal_Sup[of "f`A"] by auto
  1827 
  1827 
  1828 lemma ereal_Inf:
  1828 lemma ereal_Inf:
  1831 proof (rule continuous_at_Inf_mono)
  1831 proof (rule continuous_at_Inf_mono)
  1832   obtain r where r: "ereal r = (INF a:A. ereal a)" "A \<noteq> {}"
  1832   obtain r where r: "ereal r = (INF a:A. ereal a)" "A \<noteq> {}"
  1833     using * by (force simp: top_ereal_def)
  1833     using * by (force simp: top_ereal_def)
  1834   then show "bdd_below A" "A \<noteq> {}"
  1834   then show "bdd_below A" "A \<noteq> {}"
  1835     by (auto intro!: INF_lower bdd_belowI[of _ r] simp add: ereal_less_eq(3)[symmetric] simp del: ereal_less_eq)
  1835     by (auto intro!: INF_lower bdd_belowI[of _ r] simp add: ereal_less_eq(3)[symmetric] simp del: ereal_less_eq)
  1836 qed (auto simp: mono_def continuous_at_within continuous_at_ereal)
  1836 qed (auto simp: mono_def continuous_at_imp_continuous_at_within continuous_at_ereal)
  1837 
  1837 
  1838 lemma ereal_INF: "\<bar>INF a:A. ereal (f a)\<bar> \<noteq> \<infinity> \<Longrightarrow> ereal (INF a:A. f a) = (INF a:A. ereal (f a))"
  1838 lemma ereal_INF: "\<bar>INF a:A. ereal (f a)\<bar> \<noteq> \<infinity> \<Longrightarrow> ereal (INF a:A. f a) = (INF a:A. ereal (f a))"
  1839   using ereal_Inf[of "f`A"] by auto
  1839   using ereal_Inf[of "f`A"] by auto
  1840 
  1840 
  1841 lemma ereal_Sup_uminus_image_eq: "Sup (uminus ` S::ereal set) = - Inf S"
  1841 lemma ereal_Sup_uminus_image_eq: "Sup (uminus ` S::ereal set) = - Inf S"
  1945     by (cases c) (auto simp: \<open>I \<noteq> {}\<close>)
  1945     by (cases c) (auto simp: \<open>I \<noteq> {}\<close>)
  1946 next
  1946 next
  1947   assume "(SUP i:I. f i) \<noteq> - \<infinity>" then show ?thesis
  1947   assume "(SUP i:I. f i) \<noteq> - \<infinity>" then show ?thesis
  1948     unfolding Sup_image_eq[symmetric]
  1948     unfolding Sup_image_eq[symmetric]
  1949     by (subst continuous_at_Sup_mono[where f="\<lambda>x. x + c"])
  1949     by (subst continuous_at_Sup_mono[where f="\<lambda>x. x + c"])
  1950        (auto simp: continuous_at_within continuous_at mono_def ereal_add_mono \<open>I \<noteq> {}\<close> \<open>c \<noteq> -\<infinity>\<close>)
  1950        (auto simp: continuous_at_imp_continuous_at_within continuous_at mono_def ereal_add_mono \<open>I \<noteq> {}\<close> \<open>c \<noteq> -\<infinity>\<close>)
  1951 qed
  1951 qed
  1952 
  1952 
  1953 lemma SUP_ereal_add_right:
  1953 lemma SUP_ereal_add_right:
  1954   fixes c :: ereal
  1954   fixes c :: ereal
  1955   shows "I \<noteq> {} \<Longrightarrow> c \<noteq> -\<infinity> \<Longrightarrow> (SUP i:I. c + f i) = c + (SUP i:I. f i)"
  1955   shows "I \<noteq> {} \<Longrightarrow> c \<noteq> -\<infinity> \<Longrightarrow> (SUP i:I. c + f i) = c + (SUP i:I. f i)"
  2068     by simp
  2068     by simp
  2069 next
  2069 next
  2070   assume "(SUP i:I. f i) \<noteq> 0" then show ?thesis
  2070   assume "(SUP i:I. f i) \<noteq> 0" then show ?thesis
  2071     unfolding SUP_def
  2071     unfolding SUP_def
  2072     by (subst continuous_at_Sup_mono[where f="\<lambda>x. c * x"])
  2072     by (subst continuous_at_Sup_mono[where f="\<lambda>x. c * x"])
  2073        (auto simp: mono_def continuous_at continuous_at_within \<open>I \<noteq> {}\<close>
  2073        (auto simp: mono_def continuous_at continuous_at_imp_continuous_at_within \<open>I \<noteq> {}\<close>
  2074              intro!: ereal_mult_left_mono c)
  2074              intro!: ereal_mult_left_mono c)
  2075 qed
  2075 qed
  2076 
  2076 
  2077 lemma countable_approach: 
  2077 lemma countable_approach: 
  2078   fixes x :: ereal
  2078   fixes x :: ereal