src/HOL/Multivariate_Analysis/Extended_Real_Limits.thy
changeset 62049 b0f941e207cf
parent 61973 0c7e865fa7cb
child 62375 670063003ad3
equal deleted inserted replaced
62048:fefd79f6b232 62049:b0f941e207cf
   313   apply (cut_tac A="ball x xa - {x}" and B="{x}" and M=f in INF_union)
   313   apply (cut_tac A="ball x xa - {x}" and B="{x}" and M=f in INF_union)
   314   apply (drule sym)
   314   apply (drule sym)
   315   apply auto
   315   apply auto
   316   apply (metis INF_absorb centre_in_ball)
   316   apply (metis INF_absorb centre_in_ball)
   317   done
   317   done
   318 
       
   319 lemma continuous_on_inverse_ereal: "continuous_on {0::ereal ..} inverse"
       
   320   unfolding continuous_on_def
       
   321 proof clarsimp
       
   322   fix x :: ereal assume "0 \<le> x"
       
   323   moreover have "at 0 within {0 ..} = at_right (0::ereal)"
       
   324     by (auto simp: filter_eq_iff eventually_at_filter le_less)
       
   325   moreover have "0 < x \<Longrightarrow> at x within {0 ..} = at x"
       
   326     using at_within_interior[of x "{0 ..}"] by (simp add: interior_Ici[of "- \<infinity>"])
       
   327   ultimately show "(inverse \<longlongrightarrow> inverse x) (at x within {0..})"
       
   328     by (auto simp: le_less inverse_ereal_tendsto_at_right_0 inverse_ereal_tendsto_pos)
       
   329 qed
       
   330 
       
   331 
       
   332 lemma Liminf_inverse_ereal:
       
   333   assumes nneg: "\<forall>\<^sub>F x in F. f x \<ge> (0 :: ereal)" and "F \<noteq> bot"
       
   334   shows "Liminf F (\<lambda>n. inverse (f n)) = inverse (Limsup F f)"
       
   335 proof -
       
   336   def I \<equiv> "\<lambda>x::ereal. if x \<le> 0 then \<infinity> else inverse x"
       
   337   have "Liminf F (\<lambda>n. I (f n)) = I (Limsup F f)"
       
   338   proof (rule Liminf_compose_continuous_antimono)
       
   339     have "continuous_on ({.. 0} \<union> {0 ..}) I"
       
   340       unfolding I_def by (intro continuous_on_cases) (auto intro: continuous_on_const continuous_on_inverse_ereal)
       
   341     also have "{.. 0} \<union> {0::ereal ..} = UNIV"
       
   342       by auto
       
   343     finally show "continuous_on UNIV I" .
       
   344     show "antimono I"
       
   345       unfolding antimono_def I_def by (auto intro: ereal_inverse_antimono)
       
   346   qed fact
       
   347   also have "Liminf F (\<lambda>n. I (f n)) = Liminf F (\<lambda>n. inverse (f n))"
       
   348   proof (rule Liminf_eq)
       
   349     show "\<forall>\<^sub>F x in F. I (f x) = inverse (f x)"
       
   350       using nneg by eventually_elim (auto simp: I_def)
       
   351   qed
       
   352   also have "0 \<le> Limsup F f"
       
   353     by (intro le_Limsup) fact+
       
   354   then have "I (Limsup F f) = inverse (Limsup F f)"
       
   355     by (auto simp: I_def)
       
   356   finally show ?thesis .
       
   357 qed
       
   358 
   318 
   359 subsection \<open>monoset\<close>
   319 subsection \<open>monoset\<close>
   360 
   320 
   361 definition (in order) mono_set:
   321 definition (in order) mono_set:
   362   "mono_set S \<longleftrightarrow> (\<forall>x y. x \<le> y \<longrightarrow> x \<in> S \<longrightarrow> y \<in> S)"
   322   "mono_set S \<longleftrightarrow> (\<forall>x y. x \<le> y \<longrightarrow> x \<in> S \<longrightarrow> y \<in> S)"