diff -r e10ef4f9c848 -r 1b9388e6eb75 src/HOL/Analysis/Uniform_Limit.thy --- a/src/HOL/Analysis/Uniform_Limit.thy Sun Sep 24 15:55:42 2023 +0200 +++ b/src/HOL/Analysis/Uniform_Limit.thy Mon Sep 25 17:06:05 2023 +0100 @@ -56,12 +56,28 @@ unfolding uniform_limit_iff eventually_at by (fastforce dest: spec[where x = "e / 2" for e]) +lemma uniform_limit_compose: + assumes ul: "uniform_limit X g l F" + and cont: "uniformly_continuous_on U f" + and g: "\\<^sub>F n in F. g n ` X \ U" and l: "l ` X \ U" + shows "uniform_limit X (\a b. f (g a b)) (f \ l) F" +proof (rule uniform_limitI) + fix \::real + assume "0 < \" + then obtain \ where "\ > 0" and \: "\u v. \u\U; v\U; dist u v < \\ \ dist (f u) (f v) < \" + by (metis cont uniformly_continuous_on_def) + show "\\<^sub>F n in F. \x\X. dist (f (g n x)) ((f \ l) x) < \" + using uniform_limitD [OF ul \\>0\] g unfolding o_def + by eventually_elim (use \ l in blast) +qed + lemma metric_uniform_limit_imp_uniform_limit: assumes f: "uniform_limit S f a F" assumes le: "eventually (\x. \y\S. dist (g x y) (b y) \ dist (f x y) (a y)) F" shows "uniform_limit S g b F" proof (rule uniform_limitI) - fix e :: real assume "0 < e" + fix e :: real + assume "0 < e" from uniform_limitD[OF f this] le show "\\<^sub>F x in F. \y\S. dist (g x y) (b y) < e" by eventually_elim force