diff -r 0b5efc6de385 -r b1d57dd345e1 src/HOL/Analysis/Uniform_Limit.thy --- a/src/HOL/Analysis/Uniform_Limit.thy Mon Dec 19 14:09:37 2022 +0100 +++ b/src/HOL/Analysis/Uniform_Limit.thy Tue Dec 20 17:59:44 2022 +0000 @@ -198,6 +198,19 @@ unfolding uniformly_convergent_on_def assms(2) [symmetric] by (intro iff_exI uniform_limit_cong eventually_mono [OF assms(1)]) auto +lemma uniformly_convergent_on_compose: + assumes "uniformly_convergent_on A f" + assumes "filterlim g sequentially sequentially" + shows "uniformly_convergent_on A (\n. f (g n))" +proof - + from assms(1) obtain f' where "uniform_limit A f f' sequentially" + by (auto simp: uniformly_convergent_on_def) + hence "uniform_limit A (\n. f (g n)) f' sequentially" + by (rule filterlim_compose) fact + thus ?thesis + by (auto simp: uniformly_convergent_on_def) +qed + lemma uniformly_convergent_uniform_limit_iff: "uniformly_convergent_on X f \ uniform_limit X f (\x. lim (\n. f n x)) sequentially" proof @@ -308,6 +321,46 @@ ultimately show ?thesis by auto qed +lemma uniformly_convergent_on_sum_E: + fixes \::real and f :: "nat \ 'a \ 'b::{complete_space,real_normed_vector}" + assumes uconv: "uniformly_convergent_on K (\n z. \k>0" + obtains N where "\m n z. \N \ m; m \ n; z\K\ \ norm(\k=m.." +proof - + obtain N where N: "\m n z. \N \ m; N \ n; z\K\ \ dist (\kk" + using uconv \\>0\ unfolding uniformly_Cauchy_on_def uniformly_convergent_eq_Cauchy by meson + show thesis + proof + fix m n z + assume "N \ m" "m \ n" "z \ K" + moreover have "(\k = m..kkm \ n\) + ultimately show "norm(\k = m.." + using N by (simp add: dist_norm) + qed +qed + +lemma uniformly_convergent_on_sum_iff: + fixes f :: "nat \ 'a \ 'b::{complete_space,real_normed_vector}" + shows "uniformly_convergent_on K (\n z. \k (\\>0. \N. \m n z. N\m \ m\n \ z\K \ norm (\k=m..)" (is "?lhs=?rhs") +proof + assume R: ?rhs + show ?lhs + unfolding uniformly_Cauchy_on_def uniformly_convergent_eq_Cauchy + proof (intro strip) + fix \::real + assume "\>0" + then obtain N where "\m n z. \N \ m; m \ n; z\K\ \ norm(\k = m.." + using R by blast + then have "\x\K. \m\N. \n\m. norm ((\kk" + by (metis atLeast0LessThan le0 sum_diff_nat_ivl norm_minus_commute) + then have "\x\K. \m\N. \n\N. norm ((\kk" + by (metis linorder_le_cases norm_minus_commute) + then show "\M. \x\K. \m\M. \n\M. dist (\kk" + by (metis dist_norm) + qed +qed (metis uniformly_convergent_on_sum_E) + text \TODO: remove explicit formulations @{thm uniformly_convergent_eq_cauchy uniformly_cauchy_imp_uniformly_convergent}?!\ @@ -316,6 +369,102 @@ unfolding uniformly_convergent_on_def convergent_def by (auto dest: tendsto_uniform_limitI) +subsection \Comparison Test\ + +lemma uniformly_summable_comparison_test: + fixes f :: "nat \ 'a \ 'b :: banach" + assumes "uniformly_convergent_on A (\N x. \nn x. x \ A \ norm (f n x) \ g n x" + shows "uniformly_convergent_on A (\N x. \nN x. \n 0" + obtain M where M: "\x m n. x \ A \ m \ M \ n \ M \ dist (\kkM. \x\A. \m\M. \n>m. dist (\kk A" "m \ M" "m < n" + have nonneg: "g k x \ 0" for k + by (rule order.trans[OF _ assms(2)]) (use xmn in auto) + have "dist (\kkk\{..k\{m.. (\k\{m.. \ (\k\{m.. = \\k\{m.." + by (subst abs_of_nonneg) (auto simp: nonneg intro!: sum_nonneg) + also have "{m..\k\\. g k x\ = dist (\kk < e" + by (rule M) (use xmn in auto) + finally show "dist (\kk 'b :: metric_space" + assumes lim: "uniform_limit A g g' F" + assumes cont: "uniformly_continuous_on B f" + assumes ev: "eventually (\x. \y\A. g x y \ B) F" and "closed B" + shows "uniform_limit A (\x y. f (g x y)) (\y. f (g' y)) F" +proof (cases "F = bot") + case [simp]: False + show ?thesis + unfolding uniform_limit_iff + proof safe + fix e :: real assume e: "e > 0" + + have g'_in_B: "g' y \ B" if "y \ A" for y + proof (rule Lim_in_closed_set) + show "eventually (\x. g x y \ B) F" + using ev by eventually_elim (use that in auto) + show "((\x. g x y) \ g' y) F" + using lim that by (metis tendsto_uniform_limitI) + qed (use \closed B\ in auto) + + obtain d where d: "d > 0" "\x y. x \ B \ y \ B \ dist x y < d \ dist (f x) (f y) < e" + using e cont unfolding uniformly_continuous_on_def by metis + from lim have "eventually (\x. \y\A. dist (g x y) (g' y) < d) F" + unfolding uniform_limit_iff using \d > 0\ by meson + thus "eventually (\x. \y\A. dist (f (g x y)) (f (g' y)) < e) F" + using assms(3) + proof eventually_elim + case (elim x) + show "\y\A. dist (f (g x y)) (f (g' y)) < e" + proof safe + fix y assume y: "y \ A" + show "dist (f (g x y)) (f (g' y)) < e" + proof (rule d) + show "dist (g x y) (g' y) < d" + using elim y by blast + qed (use y elim g'_in_B in auto) + qed + qed + qed +qed (auto simp: filterlim_def) + +lemma uniformly_convergent_on_compose_uniformly_continuous_on: + fixes f :: "'a :: metric_space \ 'b :: metric_space" + assumes lim: "uniformly_convergent_on A g" + assumes cont: "uniformly_continuous_on B f" + assumes ev: "eventually (\x. \y\A. g x y \ B) sequentially" and "closed B" + shows "uniformly_convergent_on A (\x y. f (g x y))" +proof - + from lim obtain g' where g': "uniform_limit A g g' sequentially" + by (auto simp: uniformly_convergent_on_def) + thus ?thesis + using uniform_limit_compose_uniformly_continuous_on[OF g' cont ev \closed B\] + by (auto simp: uniformly_convergent_on_def) +qed subsection \Weierstrass M-Test\