# HG changeset patch # User Angeliki KoutsoukouArgyraki # Date 1541096373 0 # Node ID 21ee588bac7d0fc37c49e351fd851eb94c7974e0 # Parent c6b15fc78f7813a82622b2f5d29cb7327d9580e2 tagged a theory for the Analysis manual diff -r c6b15fc78f78 -r 21ee588bac7d src/HOL/Analysis/Extended_Real_Limits.thy --- a/src/HOL/Analysis/Extended_Real_Limits.thy Thu Nov 01 14:36:19 2018 +0100 +++ b/src/HOL/Analysis/Extended_Real_Limits.thy Thu Nov 01 18:19:33 2018 +0000 @@ -5,7 +5,8 @@ Author: Bogdan Grechuk, University of Edinburgh *) -section \Limits on the Extended real number line\ +section%important \Limits on the Extended real number line\ (* TO FIX: perhaps put all Nonstandard Analysis related +topics together? *) theory Extended_Real_Limits imports @@ -15,23 +16,23 @@ "HOL-Library.Indicator_Function" begin -lemma compact_UNIV: +lemma%important compact_UNIV: "compact (UNIV :: 'a::{complete_linorder,linorder_topology,second_countable_topology} set)" - using compact_complete_linorder + using%unimportant compact_complete_linorder by (auto simp: seq_compact_eq_compact[symmetric] seq_compact_def) -lemma compact_eq_closed: +lemma%important compact_eq_closed: fixes S :: "'a::{complete_linorder,linorder_topology,second_countable_topology} set" shows "compact S \ closed S" - using closed_Int_compact[of S, OF _ compact_UNIV] compact_imp_closed + using%unimportant closed_Int_compact[of S, OF _ compact_UNIV] compact_imp_closed by auto -lemma closed_contains_Sup_cl: +lemma%important closed_contains_Sup_cl: fixes S :: "'a::{complete_linorder,linorder_topology,second_countable_topology} set" assumes "closed S" and "S \ {}" shows "Sup S \ S" -proof - +proof%unimportant - from compact_eq_closed[of S] compact_attains_sup[of S] assms obtain s where S: "s \ S" "\t\S. t \ s" by auto @@ -41,12 +42,12 @@ by simp qed -lemma closed_contains_Inf_cl: +lemma%important closed_contains_Inf_cl: fixes S :: "'a::{complete_linorder,linorder_topology,second_countable_topology} set" assumes "closed S" and "S \ {}" shows "Inf S \ S" -proof - +proof%unimportant - from compact_eq_closed[of S] compact_attains_inf[of S] assms obtain s where S: "s \ S" "\t\S. s \ t" by auto @@ -65,8 +66,8 @@ qed (simp add: open_enat_def) qed -instance ereal :: second_countable_topology -proof (standard, intro exI conjI) +instance%important ereal :: second_countable_topology +proof%unimportant (standard, intro exI conjI) let ?B = "(\r\\. {{..< r}, {r <..}} :: ereal set set)" show "countable ?B" by (auto intro: countable_rat) @@ -97,8 +98,8 @@ text \This is a copy from \ereal :: second_countable_topology\. Maybe find a common super class of topological spaces where the rational numbers are densely embedded ?\ -instance ennreal :: second_countable_topology -proof (standard, intro exI conjI) +instance%important ennreal :: second_countable_topology +proof%unimportant (standard, intro exI conjI) let ?B = "(\r\\. {{..< r}, {r <..}} :: ennreal set set)" show "countable ?B" by (auto intro: countable_rat) @@ -127,13 +128,13 @@ qed qed -lemma ereal_open_closed_aux: +lemma%important ereal_open_closed_aux: fixes S :: "ereal set" assumes "open S" and "closed S" and S: "(-\) \ S" shows "S = {}" -proof (rule ccontr) +proof%unimportant (rule ccontr) assume "\ ?thesis" then have *: "Inf S \ S" @@ -171,10 +172,10 @@ by auto qed -lemma ereal_open_closed: +lemma%important ereal_open_closed: fixes S :: "ereal set" shows "open S \ closed S \ S = {} \ S = UNIV" -proof - +proof%unimportant - { assume lhs: "open S \ closed S" { @@ -195,10 +196,10 @@ by auto qed -lemma ereal_open_atLeast: +lemma%important ereal_open_atLeast: fixes x :: ereal shows "open {x..} \ x = -\" -proof +proof%unimportant assume "x = -\" then have "{x..} = UNIV" by auto @@ -214,12 +215,12 @@ by (simp add: bot_ereal_def atLeast_eq_UNIV_iff) qed -lemma mono_closed_real: +lemma%important mono_closed_real: fixes S :: "real set" assumes mono: "\y z. y \ S \ y \ z \ z \ S" and "closed S" shows "S = {} \ S = UNIV \ (\a. S = {a..})" -proof - +proof%unimportant - { assume "S \ {}" { assume ex: "\B. \x\S. B \ x" @@ -260,12 +261,12 @@ by blast qed -lemma mono_closed_ereal: +lemma%important mono_closed_ereal: fixes S :: "real set" assumes mono: "\y z. y \ S \ y \ z \ z \ S" and "closed S" shows "\a. S = {x. a \ ereal x}" -proof - +proof%unimportant - { assume "S = {}" then have ?thesis @@ -295,11 +296,11 @@ using mono_closed_real[of S] assms by auto qed -lemma Liminf_within: +lemma%important Liminf_within: fixes f :: "'a::metric_space \ 'b::complete_lattice" shows "Liminf (at x within S) f = (SUP e:{0<..}. INF y:(S \ ball x e - {x}). f y)" unfolding Liminf_def eventually_at -proof (rule SUP_eq, simp_all add: Ball_def Bex_def, safe) +proof%unimportant (rule SUP_eq, simp_all add: Ball_def Bex_def, safe) fix P d assume "0 < d" and "\y. y \ S \ y \ x \ dist y x < d \ P y" then have "S \ ball x d - {x} \ {x. P x}" @@ -315,11 +316,11 @@ (auto intro!: INF_mono exI[of _ d] simp: dist_commute) qed -lemma Limsup_within: +lemma%important Limsup_within: fixes f :: "'a::metric_space \ 'b::complete_lattice" shows "Limsup (at x within S) f = (INF e:{0<..}. SUP y:(S \ ball x e - {x}). f y)" unfolding Limsup_def eventually_at -proof (rule INF_eq, simp_all add: Ball_def Bex_def, safe) +proof%unimportant (rule INF_eq, simp_all add: Ball_def Bex_def, safe) fix P d assume "0 < d" and "\y. y \ S \ y \ x \ dist y x < d \ P y" then have "S \ ball x d - {x} \ {x. P x}" @@ -359,7 +360,7 @@ done -subsection \Extended-Real.thy\ +subsection%important \Extended-Real.thy\ (*FIX title *) lemma sum_constant_ereal: fixes a::ereal @@ -379,10 +380,10 @@ ultimately show ?thesis by (metis (mono_tags, lifting) eventually_mono) qed -lemma ereal_Inf_cmult: +lemma%important ereal_Inf_cmult: assumes "c>(0::real)" shows "Inf {ereal c * x |x. P x} = ereal c * Inf {x. P x}" -proof - +proof%unimportant - have "(\x::ereal. c * x) (Inf {x::ereal. P x}) = Inf ((\x::ereal. c * x)`{x::ereal. P x})" apply (rule mono_bij_Inf) apply (simp add: assms ereal_mult_left_mono less_imp_le mono_def) @@ -393,7 +394,7 @@ qed -subsubsection \Continuity of addition\ +subsubsection%important \Continuity of addition\ text \The next few lemmas remove an unnecessary assumption in \verb+tendsto_add_ereal+, culminating in \verb+tendsto_add_ereal_general+ which essentially says that the addition @@ -401,12 +402,12 @@ It is much more convenient in many situations, see for instance the proof of \verb+tendsto_sum_ereal+ below.\ -lemma tendsto_add_ereal_PInf: +lemma%important tendsto_add_ereal_PInf: fixes y :: ereal assumes y: "y \ -\" assumes f: "(f \ \) F" and g: "(g \ y) F" shows "((\x. f x + g x) \ \) F" -proof - +proof%unimportant - have "\C. eventually (\x. g x > ereal C) F" proof (cases y) case (real r) @@ -439,12 +440,12 @@ that $-(x+y)$ is in general different from $(-x) + (-y)$ in ereal creates difficulties, so it is more efficient to copy the previous proof.\ -lemma tendsto_add_ereal_MInf: +lemma%important tendsto_add_ereal_MInf: fixes y :: ereal assumes y: "y \ \" assumes f: "(f \ -\) F" and g: "(g \ y) F" shows "((\x. f x + g x) \ -\) F" -proof - +proof%unimportant - have "\C. eventually (\x. g x < ereal C) F" proof (cases y) case (real r) @@ -472,12 +473,12 @@ then show ?thesis by (simp add: tendsto_MInfty) qed -lemma tendsto_add_ereal_general1: +lemma%important tendsto_add_ereal_general1: fixes x y :: ereal assumes y: "\y\ \ \" assumes f: "(f \ x) F" and g: "(g \ y) F" shows "((\x. f x + g x) \ x + y) F" -proof (cases x) +proof%unimportant (cases x) case (real r) have a: "\x\ \ \" by (simp add: real) show ?thesis by (rule tendsto_add_ereal[OF a, OF y, OF f, OF g]) @@ -490,12 +491,12 @@ by (metis abs_ereal.simps(3) ereal_MInfty_eq_plus) qed -lemma tendsto_add_ereal_general2: +lemma%important tendsto_add_ereal_general2: fixes x y :: ereal assumes x: "\x\ \ \" and f: "(f \ x) F" and g: "(g \ y) F" shows "((\x. f x + g x) \ x + y) F" -proof - +proof%unimportant - have "((\x. g x + f x) \ x + y) F" using tendsto_add_ereal_general1[OF x, OF g, OF f] add.commute[of "y", of "x"] by simp moreover have "\x. g x + f x = f x + g x" using add.commute by auto @@ -505,12 +506,12 @@ text \The next lemma says that the addition is continuous on ereal, except at the pairs $(-\infty, \infty)$ and $(\infty, -\infty)$.\ -lemma tendsto_add_ereal_general [tendsto_intros]: +lemma%important tendsto_add_ereal_general [tendsto_intros]: fixes x y :: ereal assumes "\((x=\ \ y=-\) \ (x=-\ \ y=\))" and f: "(f \ x) F" and g: "(g \ y) F" shows "((\x. f x + g x) \ x + y) F" -proof (cases x) +proof%unimportant (cases x) case (real r) show ?thesis apply (rule tendsto_add_ereal_general2) using real assms by auto @@ -524,16 +525,16 @@ then show ?thesis using tendsto_add_ereal_MInf MInf f g by (metis ereal_MInfty_eq_plus) qed -subsubsection \Continuity of multiplication\ +subsubsection%important \Continuity of multiplication\ text \In the same way as for addition, we prove that the multiplication is continuous on ereal times ereal, except at $(\infty, 0)$ and $(-\infty, 0)$ and $(0, \infty)$ and $(0, -\infty)$, starting with specific situations.\ -lemma tendsto_mult_real_ereal: +lemma%important tendsto_mult_real_ereal: assumes "(u \ ereal l) F" "(v \ ereal m) F" shows "((\n. u n * v n) \ ereal l * ereal m) F" -proof - +proof%unimportant - have ureal: "eventually (\n. u n = ereal(real_of_ereal(u n))) F" by (rule real_lim_then_eventually_real[OF assms(1)]) then have "((\n. ereal(real_of_ereal(u n))) \ ereal l) F" using assms by auto then have limu: "((\n. real_of_ereal(u n)) \ l) F" by auto @@ -553,11 +554,11 @@ then show ?thesis using * filterlim_cong by fastforce qed -lemma tendsto_mult_ereal_PInf: +lemma%important tendsto_mult_ereal_PInf: fixes f g::"_ \ ereal" assumes "(f \ l) F" "l>0" "(g \ \) F" shows "((\x. f x * g x) \ \) F" -proof - +proof%unimportant - obtain a::real where "0 < ereal a" "a < l" using assms(2) using ereal_dense2 by blast have *: "eventually (\x. f x > a) F" using \a < l\ assms(1) by (simp add: order_tendsto_iff) { @@ -581,11 +582,11 @@ then show ?thesis by (auto simp add: tendsto_PInfty) qed -lemma tendsto_mult_ereal_pos: +lemma%important tendsto_mult_ereal_pos: fixes f g::"_ \ ereal" assumes "(f \ l) F" "(g \ m) F" "l>0" "m>0" shows "((\x. f x * g x) \ l * m) F" -proof (cases) +proof%unimportant (cases) assume *: "l = \ \ m = \" then show ?thesis proof (cases) @@ -620,11 +621,11 @@ shows "sgn(l) * sgn(l) = 1" apply (cases l) using assms by (auto simp add: one_ereal_def sgn_if) -lemma tendsto_mult_ereal [tendsto_intros]: +lemma%important tendsto_mult_ereal [tendsto_intros]: fixes f g::"_ \ ereal" assumes "(f \ l) F" "(g \ m) F" "\((l=0 \ abs(m) = \) \ (m=0 \ abs(l) = \))" shows "((\x. f x * g x) \ l * m) F" -proof (cases) +proof%unimportant (cases) assume "l=0 \ m=0" then have "abs(l) \ \" "abs(m) \ \" using assms(3) by auto then obtain lr mr where "l = ereal lr" "m = ereal mr" by auto @@ -661,13 +662,13 @@ by (cases "c = 0", auto simp add: assms tendsto_mult_ereal) -subsubsection \Continuity of division\ +subsubsection%important \Continuity of division\ -lemma tendsto_inverse_ereal_PInf: +lemma%important tendsto_inverse_ereal_PInf: fixes u::"_ \ ereal" assumes "(u \ \) F" shows "((\x. 1/ u x) \ 0) F" -proof - +proof%unimportant - { fix e::real assume "e>0" have "1/e < \" by auto @@ -704,11 +705,11 @@ shows "(u \ l) F \ l \ 0 \ ((\x. 1/ u x) \ 1/l) F" using tendsto_inverse unfolding inverse_eq_divide . -lemma tendsto_inverse_ereal [tendsto_intros]: +lemma%important tendsto_inverse_ereal [tendsto_intros]: fixes u::"_ \ ereal" assumes "(u \ l) F" "l \ 0" shows "((\x. 1/ u x) \ 1/l) F" -proof (cases l) +proof%unimportant (cases l) case (real r) then have "r \ 0" using assms(2) by auto then have "1/l = ereal(1/r)" using real by (simp add: one_ereal_def) @@ -749,11 +750,11 @@ then show ?thesis unfolding v_def using Lim_transform_eventually[OF *] \ 1/l = 0 \ by auto qed -lemma tendsto_divide_ereal [tendsto_intros]: +lemma%important tendsto_divide_ereal [tendsto_intros]: fixes f g::"_ \ ereal" assumes "(f \ l) F" "(g \ m) F" "m \ 0" "\(abs(l) = \ \ abs(m) = \)" shows "((\x. f x / g x) \ l / m) F" -proof - +proof%unimportant - define h where "h = (\x. 1/ g x)" have *: "(h \ 1/m) F" unfolding h_def using assms(2) assms(3) tendsto_inverse_ereal by auto have "((\x. f x * h x) \ l * (1/m)) F" @@ -764,15 +765,15 @@ qed -subsubsection \Further limits\ +subsubsection%important \Further limits\ text \The assumptions of @{thm tendsto_diff_ereal} are too strong, we weaken them here.\ -lemma tendsto_diff_ereal_general [tendsto_intros]: +lemma%important tendsto_diff_ereal_general [tendsto_intros]: fixes u v::"'a \ ereal" assumes "(u \ l) F" "(v \ m) F" "\((l = \ \ m = \) \ (l = -\ \ m = -\))" shows "((\n. u n - v n) \ l - m) F" -proof - +proof%unimportant - have "((\n. u n + (-v n)) \ l + (-m)) F" apply (intro tendsto_intros assms) using assms by (auto simp add: ereal_uminus_eq_reorder) then show ?thesis by (simp add: minus_ereal_def) @@ -782,11 +783,11 @@ "(\ n::nat. real n) \ \" by (simp add: filterlim_real_sequentially tendsto_PInfty_eq_at_top) -lemma tendsto_at_top_pseudo_inverse [tendsto_intros]: +lemma%important tendsto_at_top_pseudo_inverse [tendsto_intros]: fixes u::"nat \ nat" assumes "LIM n sequentially. u n :> at_top" shows "LIM n sequentially. Inf {N. u N \ n} :> at_top" -proof - +proof%unimportant - { fix C::nat define M where "M = Max {u n| n. n \ C}+1" @@ -813,11 +814,11 @@ then show ?thesis using filterlim_at_top by auto qed -lemma pseudo_inverse_finite_set: +lemma%important pseudo_inverse_finite_set: fixes u::"nat \ nat" assumes "LIM n sequentially. u n :> at_top" shows "finite {N. u N \ n}" -proof - +proof%unimportant - fix n have "eventually (\N. u N \ n+1) sequentially" using assms by (simp add: filterlim_at_top) @@ -862,11 +863,11 @@ then show ?thesis by auto qed -lemma ereal_truncation_real_top [tendsto_intros]: +lemma%important ereal_truncation_real_top [tendsto_intros]: fixes x::ereal assumes "x \ - \" shows "(\n::nat. real_of_ereal(min x n)) \ x" -proof (cases x) +proof%unimportant (cases x) case (real r) then obtain K::nat where "K>0" "K > abs(r)" using reals_Archimedean2 gr0I by auto then have "min x n = x" if "n \ K" for n apply (subst real, subst real, auto) using that eq_iff by fastforce @@ -880,10 +881,10 @@ then show ?thesis using id_nat_ereal_tendsto_PInf PInf by auto qed (simp add: assms) -lemma ereal_truncation_bottom [tendsto_intros]: +lemma%important ereal_truncation_bottom [tendsto_intros]: fixes x::ereal shows "(\n::nat. max x (- real n)) \ x" -proof (cases x) +proof%unimportant (cases x) case (real r) then obtain K::nat where "K>0" "K > abs(r)" using reals_Archimedean2 gr0I by auto then have "max x (-real n) = x" if "n \ K" for n apply (subst real, subst real, auto) using that eq_iff by fastforce @@ -901,11 +902,11 @@ then show ?thesis by auto qed -lemma ereal_truncation_real_bottom [tendsto_intros]: +lemma%important ereal_truncation_real_bottom [tendsto_intros]: fixes x::ereal assumes "x \ \" shows "(\n::nat. real_of_ereal(max x (- real n))) \ x" -proof (cases x) +proof%unimportant (cases x) case (real r) then obtain K::nat where "K>0" "K > abs(r)" using reals_Archimedean2 gr0I by auto then have "max x (-real n) = x" if "n \ K" for n apply (subst real, subst real, auto) using that eq_iff by fastforce @@ -933,9 +934,9 @@ qed(simp) -lemma continuous_ereal_abs: +lemma%important continuous_ereal_abs: "continuous_on (UNIV::ereal set) abs" -proof - +proof%unimportant - have "continuous_on ({..0} \ {(0::ereal)..}) abs" apply (rule continuous_on_closed_Un, auto) apply (rule iffD1[OF continuous_on_cong, of "{..0}" _ "\x. -x"]) @@ -960,7 +961,7 @@ by (subst uminus_ereal.simps(1)[symmetric], intro tendsto_intros) -subsection \Extended-Nonnegative-Real.thy\ +subsection%important \Extended-Nonnegative-Real.thy\ (*FIX title *) lemma tendsto_diff_ennreal_general [tendsto_intros]: fixes u v::"'a \ ennreal" @@ -972,11 +973,11 @@ then show ?thesis by auto qed -lemma tendsto_mult_ennreal [tendsto_intros]: +lemma%important tendsto_mult_ennreal [tendsto_intros]: fixes l m::ennreal assumes "(u \ l) F" "(v \ m) F" "\((l = 0 \ m = \) \ (l = \ \ m = 0))" shows "((\n. u n * v n) \ l * m) F" -proof - +proof%unimportant - have "((\n. e2ennreal(enn2ereal (u n) * enn2ereal (v n))) \ e2ennreal(enn2ereal l * enn2ereal m)) F" apply (intro tendsto_intros) using assms apply auto using enn2ereal_inject zero_ennreal.rep_eq by fastforce+ @@ -989,9 +990,9 @@ qed -subsection \monoset\ +subsection%important \monoset\ -definition (in order) mono_set: +definition%important (in order) mono_set: "mono_set S \ (\x y. x \ y \ x \ S \ y \ S)" lemma (in order) mono_greaterThan [intro, simp]: "mono_set {B<..}" unfolding mono_set by auto @@ -999,11 +1000,11 @@ lemma (in order) mono_UNIV [intro, simp]: "mono_set UNIV" unfolding mono_set by auto lemma (in order) mono_empty [intro, simp]: "mono_set {}" unfolding mono_set by auto -lemma (in complete_linorder) mono_set_iff: +lemma%important (in complete_linorder) mono_set_iff: fixes S :: "'a set" defines "a \ Inf S" shows "mono_set S \ S = {a <..} \ S = {a..}" (is "_ = ?c") -proof +proof%unimportant assume "mono_set S" then have mono: "\x y. x \ y \ x \ S \ y \ S" by (auto simp: mono_set) @@ -1045,12 +1046,12 @@ by (metis Inf_UNIV atLeast_eq_UNIV_iff closed_ereal_atLeast ereal_open_closed mono_empty mono_set_iff open_ereal_greaterThan) -lemma ereal_Liminf_Sup_monoset: +lemma%important ereal_Liminf_Sup_monoset: fixes f :: "'a \ ereal" shows "Liminf net f = Sup {l. \S. open S \ mono_set S \ l \ S \ eventually (\x. f x \ S) net}" (is "_ = Sup ?A") -proof (safe intro!: Liminf_eqI complete_lattice_class.Sup_upper complete_lattice_class.Sup_least) +proof%unimportant (safe intro!: Liminf_eqI complete_lattice_class.Sup_upper complete_lattice_class.Sup_least) fix P assume P: "eventually P net" fix S @@ -1084,12 +1085,12 @@ qed qed -lemma ereal_Limsup_Inf_monoset: +lemma%important ereal_Limsup_Inf_monoset: fixes f :: "'a \ ereal" shows "Limsup net f = Inf {l. \S. open S \ mono_set (uminus ` S) \ l \ S \ eventually (\x. f x \ S) net}" (is "_ = Inf ?A") -proof (safe intro!: Limsup_eqI complete_lattice_class.Inf_lower complete_lattice_class.Inf_greatest) +proof%unimportant (safe intro!: Limsup_eqI complete_lattice_class.Inf_lower complete_lattice_class.Inf_greatest) fix P assume P: "eventually P net" fix S @@ -1123,11 +1124,11 @@ qed qed -lemma liminf_bounded_open: +lemma%important liminf_bounded_open: fixes x :: "nat \ ereal" shows "x0 \ liminf x \ (\S. open S \ mono_set S \ x0 \ S \ (\N. \n\N. x n \ S))" (is "_ \ ?P x0") -proof +proof%unimportant assume "?P x0" then show "x0 \ liminf x" unfolding ereal_Liminf_Sup_monoset eventually_sequentially @@ -1161,11 +1162,11 @@ by auto qed -lemma limsup_finite_then_bounded: +lemma%important limsup_finite_then_bounded: fixes u::"nat \ real" assumes "limsup u < \" shows "\C. \n. u n \ C" -proof - +proof%unimportant - obtain C where C: "limsup u < C" "C < \" using assms ereal_dense2 by blast then have "C = ereal(real_of_ereal C)" using ereal_real by force have "eventually (\n. u n < C) sequentially" using C(1) unfolding Limsup_def @@ -1275,11 +1276,11 @@ then show ?case using Suc.IH by simp qed (auto) -lemma Limsup_obtain: +lemma%important Limsup_obtain: fixes u::"_ \ 'a :: complete_linorder" assumes "Limsup F u > c" shows "\i. u i > c" -proof - +proof%unimportant - have "(INF P:{P. eventually P F}. SUP x:{x. P x}. u x) > c" using assms by (simp add: Limsup_def) then show ?thesis by (metis eventually_True mem_Collect_eq less_INF_D less_SUP_iff) qed @@ -1287,10 +1288,10 @@ text \The next lemma is extremely useful, as it often makes it possible to reduce statements about limsups to statements about limits.\ -lemma limsup_subseq_lim: +lemma%important limsup_subseq_lim: fixes u::"nat \ 'a :: {complete_linorder, linorder_topology}" shows "\r::nat\nat. strict_mono r \ (u o r) \ limsup u" -proof (cases) +proof%unimportant (cases) assume "\n. \p>n. \m\p. u m \ u p" then have "\r. \n. (\m\r n. u m \ u (r n)) \ r n < r (Suc n)" by (intro dependent_nat_choice) (auto simp: conj_commute) @@ -1380,10 +1381,10 @@ then show ?thesis using \strict_mono r\ by auto qed -lemma liminf_subseq_lim: +lemma%important liminf_subseq_lim: fixes u::"nat \ 'a :: {complete_linorder, linorder_topology}" shows "\r::nat\nat. strict_mono r \ (u o r) \ liminf u" -proof (cases) +proof%unimportant (cases) assume "\n. \p>n. \m\p. u m \ u p" then have "\r. \n. (\m\r n. u m \ u (r n)) \ r n < r (Suc n)" by (intro dependent_nat_choice) (auto simp: conj_commute) @@ -1478,10 +1479,10 @@ subsequences thanks to \verb+limsup_subseq_lim+. The statement for limits follows for instance from \verb+tendsto_add_ereal_general+.\ -lemma ereal_limsup_add_mono: +lemma%important ereal_limsup_add_mono: fixes u v::"nat \ ereal" shows "limsup (\n. u n + v n) \ limsup u + limsup v" -proof (cases) +proof%unimportant (cases) assume "(limsup u = \) \ (limsup v = \)" then have "limsup u + limsup v = \" by simp then show ?thesis by auto @@ -1524,11 +1525,11 @@ This explains why there are more assumptions in the next lemma dealing with liminfs that in the previous one about limsups.\ -lemma ereal_liminf_add_mono: +lemma%important ereal_liminf_add_mono: fixes u v::"nat \ ereal" assumes "\((liminf u = \ \ liminf v = -\) \ (liminf u = -\ \ liminf v = \))" shows "liminf (\n. u n + v n) \ liminf u + liminf v" -proof (cases) +proof%unimportant (cases) assume "(liminf u = -\) \ (liminf v = -\)" then have *: "liminf u + liminf v = -\" using assms by auto show ?thesis by (simp add: *) @@ -1567,11 +1568,11 @@ then show ?thesis unfolding w_def by simp qed -lemma ereal_limsup_lim_add: +lemma%important ereal_limsup_lim_add: fixes u v::"nat \ ereal" assumes "u \ a" "abs(a) \ \" shows "limsup (\n. u n + v n) = a + limsup v" -proof - +proof%unimportant - have "limsup u = a" using assms(1) using tendsto_iff_Liminf_eq_Limsup trivial_limit_at_top_linorder by blast have "(\n. -u n) \ -a" using assms(1) by auto then have "limsup (\n. -u n) = -a" using tendsto_iff_Liminf_eq_Limsup trivial_limit_at_top_linorder by blast @@ -1598,11 +1599,11 @@ then show ?thesis using up by simp qed -lemma ereal_limsup_lim_mult: +lemma%important ereal_limsup_lim_mult: fixes u v::"nat \ ereal" assumes "u \ a" "a>0" "a \ \" shows "limsup (\n. u n * v n) = a * limsup v" -proof - +proof%unimportant - define w where "w = (\n. u n * v n)" obtain r where r: "strict_mono r" "(v o r) \ limsup v" using limsup_subseq_lim by auto have "(u o r) \ a" using assms(1) LIMSEQ_subseq_LIMSEQ r by auto @@ -1628,11 +1629,11 @@ then show ?thesis using I unfolding w_def by auto qed -lemma ereal_liminf_lim_mult: +lemma%important ereal_liminf_lim_mult: fixes u v::"nat \ ereal" assumes "u \ a" "a>0" "a \ \" shows "liminf (\n. u n * v n) = a * liminf v" -proof - +proof%unimportant - define w where "w = (\n. u n * v n)" obtain r where r: "strict_mono r" "(v o r) \ liminf v" using liminf_subseq_lim by auto have "(u o r) \ a" using assms(1) LIMSEQ_subseq_LIMSEQ r by auto @@ -1658,11 +1659,11 @@ then show ?thesis using I unfolding w_def by auto qed -lemma ereal_liminf_lim_add: +lemma%important ereal_liminf_lim_add: fixes u v::"nat \ ereal" assumes "u \ a" "abs(a) \ \" shows "liminf (\n. u n + v n) = a + liminf v" -proof - +proof%unimportant - have "liminf u = a" using assms(1) tendsto_iff_Liminf_eq_Limsup trivial_limit_at_top_linorder by blast then have *: "abs(liminf u) \ \" using assms(2) by auto have "(\n. -u n) \ -a" using assms(1) by auto @@ -1691,10 +1692,10 @@ then show ?thesis using up by simp qed -lemma ereal_liminf_limsup_add: +lemma%important ereal_liminf_limsup_add: fixes u v::"nat \ ereal" shows "liminf (\n. u n + v n) \ liminf u + limsup v" -proof (cases) +proof%unimportant (cases) assume "limsup v = \ \ liminf u = \" then show ?thesis by auto next @@ -1743,12 +1744,12 @@ done -lemma liminf_minus_ennreal: +lemma%important liminf_minus_ennreal: fixes u v::"nat \ ennreal" shows "(\n. v n \ u n) \ liminf (\n. u n - v n) \ limsup u - limsup v" unfolding liminf_SUP_INF limsup_INF_SUP including ennreal.lifting -proof (transfer, clarsimp) +proof%unimportant (transfer, clarsimp) fix v u :: "nat \ ereal" assume *: "\x. 0 \ v x" "\x. 0 \ u x" "\n. v n \ u n" moreover have "0 \ limsup u - limsup v" using * by (intro ereal_diff_positive Limsup_mono always_eventually) simp @@ -1761,7 +1762,7 @@ by (auto simp: * ereal_diff_positive max.absorb2 liminf_SUP_INF[symmetric] limsup_INF_SUP[symmetric] ereal_liminf_limsup_minus) qed -subsection "Relate extended reals and the indicator function" +subsection%unimportant "Relate extended reals and the indicator function" lemma ereal_indicator_le_0: "(indicator S x::ereal) \ 0 \ x \ S" by (auto split: split_indicator simp: one_ereal_def)