src/HOL/Library/Extended_Real.thy
changeset 60720 8c99fa3b7c44
parent 60679 ade12ef2773c
child 60762 bf0c76ccee8d
equal deleted inserted replaced
60719:b6713e04889e 60720:8c99fa3b7c44
  1695 instance ereal :: linear_continuum
  1695 instance ereal :: linear_continuum
  1696 proof
  1696 proof
  1697   show "\<exists>a b::ereal. a \<noteq> b"
  1697   show "\<exists>a b::ereal. a \<noteq> b"
  1698     using zero_neq_one by blast
  1698     using zero_neq_one by blast
  1699 qed
  1699 qed
       
  1700 
  1700 subsubsection "Topological space"
  1701 subsubsection "Topological space"
  1701 
  1702 
  1702 instantiation ereal :: linear_continuum_topology
  1703 instantiation ereal :: linear_continuum_topology
  1703 begin
  1704 begin
  1704 
  1705 
  1708 instance
  1709 instance
  1709   by standard (simp add: open_ereal_generated)
  1710   by standard (simp add: open_ereal_generated)
  1710 
  1711 
  1711 end
  1712 end
  1712 
  1713 
       
  1714 lemma continuous_on_compose': 
       
  1715   "continuous_on s f \<Longrightarrow> continuous_on t g \<Longrightarrow> f`s \<subseteq> t \<Longrightarrow> continuous_on s (\<lambda>x. g (f x))"
       
  1716   using continuous_on_compose[of s f g] continuous_on_subset[of t g "f`s"] by auto
       
  1717 
       
  1718 lemma continuous_on_ereal[continuous_intros]:
       
  1719   assumes f: "continuous_on s f" shows "continuous_on s (\<lambda>x. ereal (f x))"
       
  1720   by (rule continuous_on_compose'[OF f continuous_onI_mono[of ereal UNIV]]) auto
       
  1721 
  1713 lemma tendsto_ereal[tendsto_intros, simp, intro]: "(f ---> x) F \<Longrightarrow> ((\<lambda>x. ereal (f x)) ---> ereal x) F"
  1722 lemma tendsto_ereal[tendsto_intros, simp, intro]: "(f ---> x) F \<Longrightarrow> ((\<lambda>x. ereal (f x)) ---> ereal x) F"
  1714   apply (rule tendsto_compose[where g=ereal])
  1723   using isCont_tendsto_compose[of x ereal f F] continuous_on_ereal[of UNIV "\<lambda>x. x"]
  1715   apply (auto intro!: order_tendstoI simp: eventually_at_topological)
  1724   by (simp add: continuous_on_eq_continuous_at)
  1716   apply (rule_tac x="case a of MInfty \<Rightarrow> UNIV | ereal x \<Rightarrow> {x <..} | PInfty \<Rightarrow> {}" in exI)
       
  1717   apply (auto split: ereal.split) []
       
  1718   apply (rule_tac x="case a of MInfty \<Rightarrow> {} | ereal x \<Rightarrow> {..< x} | PInfty \<Rightarrow> UNIV" in exI)
       
  1719   apply (auto split: ereal.split) []
       
  1720   done
       
  1721 
  1725 
  1722 lemma tendsto_uminus_ereal[tendsto_intros, simp, intro]: "(f ---> x) F \<Longrightarrow> ((\<lambda>x. - f x::ereal) ---> - x) F"
  1726 lemma tendsto_uminus_ereal[tendsto_intros, simp, intro]: "(f ---> x) F \<Longrightarrow> ((\<lambda>x. - f x::ereal) ---> - x) F"
  1723   apply (rule tendsto_compose[where g=uminus])
  1727   apply (rule tendsto_compose[where g=uminus])
  1724   apply (auto intro!: order_tendstoI simp: eventually_at_topological)
  1728   apply (auto intro!: order_tendstoI simp: eventually_at_topological)
  1725   apply (rule_tac x="{..< -a}" in exI)
  1729   apply (rule_tac x="{..< -a}" in exI)
  1805   apply (auto split: ereal.split simp: ereal_less_minus_iff c) []
  1809   apply (auto split: ereal.split simp: ereal_less_minus_iff c) []
  1806   done
  1810   done
  1807 
  1811 
  1808 lemma continuous_at_ereal[continuous_intros]: "continuous F f \<Longrightarrow> continuous F (\<lambda>x. ereal (f x))"
  1812 lemma continuous_at_ereal[continuous_intros]: "continuous F f \<Longrightarrow> continuous F (\<lambda>x. ereal (f x))"
  1809   unfolding continuous_def by auto
  1813   unfolding continuous_def by auto
  1810 
       
  1811 lemma continuous_on_ereal[continuous_intros]: "continuous_on s f \<Longrightarrow> continuous_on s (\<lambda>x. ereal (f x))"
       
  1812   unfolding continuous_on_def by auto
       
  1813 
  1814 
  1814 lemma ereal_Sup:
  1815 lemma ereal_Sup:
  1815   assumes *: "\<bar>SUP a:A. ereal a\<bar> \<noteq> \<infinity>"
  1816   assumes *: "\<bar>SUP a:A. ereal a\<bar> \<noteq> \<infinity>"
  1816   shows "ereal (Sup A) = (SUP a:A. ereal a)"
  1817   shows "ereal (Sup A) = (SUP a:A. ereal a)"
  1817 proof (rule continuous_at_Sup_mono)
  1818 proof (rule continuous_at_Sup_mono)