# HG changeset patch # User paulson # Date 1742851443 0 # Node ID 1eb12389c49995f016f29dfc181ee0551a119090 # Parent 3ae491533076134d3dcc8c431b14b2cf0420708e New material by Manuel Eberl diff -r 3ae491533076 -r 1eb12389c499 src/HOL/Analysis/Complex_Transcendental.thy --- a/src/HOL/Analysis/Complex_Transcendental.thy Mon Mar 24 14:29:52 2025 +0100 +++ b/src/HOL/Analysis/Complex_Transcendental.thy Mon Mar 24 21:24:03 2025 +0000 @@ -2605,10 +2605,21 @@ thus ?thesis by simp qed -lemma continuous_powr_complex: - assumes "f (netlimit F) \ \\<^sub>\\<^sub>0" "continuous F f" "continuous F g" +lemma continuous_powr_complex [continuous_intros]: + assumes "continuous F f" "continuous F g" + assumes "Re (f (netlimit F)) \ 0 \ Im (f (netlimit F)) \ 0" + assumes "f (netlimit F) = 0 \ Re (g (netlimit F)) > 0" shows "continuous F (\z. f z powr g z :: complex)" - using assms unfolding continuous_def by (intro tendsto_powr_complex) simp_all + using assms + unfolding continuous_def + by (intro tendsto_powr_complex') + (auto simp: complex_nonpos_Reals_iff complex_eq_iff) + +lemma continuous_powr_real [continuous_intros]: + assumes "continuous F f" "continuous F g" + assumes "f (netlimit F) = 0 \ g (netlimit F) > 0 \ (\\<^sub>F z in F. 0 \ f z)" + shows "continuous F (\z. f z powr g z :: real)" + using assms unfolding continuous_def by (intro tendsto_intros) auto lemma isCont_powr_complex [continuous_intros]: assumes "f z \ \\<^sub>\\<^sub>0" "isCont f z" "isCont g z" @@ -2637,6 +2648,43 @@ qed qed +lemma analytic_on_powr [analytic_intros]: + assumes "f analytic_on X" "g analytic_on X" "\x. x \ X \ f x \ \\<^sub>\\<^sub>0" + shows "(\x. f x powr g x) analytic_on X" +proof - + from assms(1) obtain X1 where X1: "open X1" "X \ X1" "f analytic_on X1" + unfolding analytic_on_holomorphic by blast + from assms(2) obtain X2 where X2: "open X2" "X \ X2" "g analytic_on X2" + unfolding analytic_on_holomorphic by blast + have X: "open (X2 \ (X1 \ f -` (-\\<^sub>\\<^sub>0)))" + by (rule open_Int[OF _ continuous_open_preimage]) + (use X1 X2 in \auto intro!: holomorphic_on_imp_continuous_on analytic_imp_holomorphic\) + have X': "X \ X2 \ (X1 \ f -` (-\\<^sub>\\<^sub>0))" + using assms(3) X1(2) X2(2) by blast + note [holomorphic_intros] = + analytic_imp_holomorphic[OF analytic_on_subset[OF X1(3)]] + analytic_imp_holomorphic[OF analytic_on_subset[OF X2(3)]] + have "(\x. exp (ln (f x) * g x)) holomorphic_on (X2 \ (X1 \ f -` (-\\<^sub>\\<^sub>0)))" + by (intro holomorphic_intros) auto + also have "?this \ (\x. f x powr g x) holomorphic_on (X2 \ (X1 \ f -` (-\\<^sub>\\<^sub>0)))" + by (intro holomorphic_cong) (auto simp: powr_def mult.commute) + finally show ?thesis + using X X' unfolding analytic_on_holomorphic by blast +qed + +lemma holomorphic_on_powr [holomorphic_intros]: + assumes "f holomorphic_on X" "g holomorphic_on X" "\x. x \ X \ f x \ \\<^sub>\\<^sub>0" + shows "(\x. f x powr g x) holomorphic_on X" +proof - + have [simp]: "f x \ 0" if "x \ X" for x + using assms(3)[OF that] by auto + have "(\x. exp (ln (f x) * g x)) holomorphic_on X" + by (auto intro!: holomorphic_intros assms(1,2)) (use assms(3) in auto) + also have "?this \ ?thesis" + by (intro holomorphic_cong) (use assms(3) in \auto simp: powr_def mult_ac\) + finally show ?thesis . +qed + subsection\<^marker>\tag unimportant\\Some Limits involving Logarithms\ lemma lim_Ln_over_power: diff -r 3ae491533076 -r 1eb12389c499 src/HOL/Analysis/FPS_Convergence.thy --- a/src/HOL/Analysis/FPS_Convergence.thy Mon Mar 24 14:29:52 2025 +0100 +++ b/src/HOL/Analysis/FPS_Convergence.thy Mon Mar 24 21:24:03 2025 +0000 @@ -1057,4 +1057,34 @@ by (intro that[of ?s']) (auto simp: has_fps_expansion_def zero_ereal_def) qed +lemma has_fps_expansionI: + fixes f :: "'a :: {banach, real_normed_div_algebra} \ 'a" + assumes "eventually (\u. (\n. fps_nth F n * u ^ n) sums f u) (nhds 0)" + shows "f has_fps_expansion F" +proof - + from assms obtain X where X: "open X" "0 \ X" "\u. u \ X \ (\n. fps_nth F n * u ^ n) sums f u" + unfolding eventually_nhds by blast + obtain r where r: "r > 0" "cball 0 r \ X" + using X(1,2) open_contains_cball by blast + have "0 < norm (of_real r :: 'a)" + using r(1) by simp + also have "fps_conv_radius F \ norm (of_real r :: 'a)" + unfolding fps_conv_radius_def + proof (rule conv_radius_geI) + have "of_real r \ X" + using r by auto + from X(3)[OF this] show "summable (\n. fps_nth F n * of_real r ^ n)" + by (simp add: sums_iff) + qed + finally have "fps_conv_radius F > 0" + by (simp_all add: zero_ereal_def) + moreover have "(\\<^sub>F z in nhds 0. eval_fps F z = f z)" + using assms by eventually_elim (auto simp: sums_iff eval_fps_def) + ultimately show ?thesis + unfolding has_fps_expansion_def .. +qed + +lemma fps_mult_numeral_left [simp]: "fps_nth (numeral c * f) n = numeral c * fps_nth f n" + by (simp add: fps_numeral_fps_const) + end \ No newline at end of file diff -r 3ae491533076 -r 1eb12389c499 src/HOL/Complex_Analysis/Laurent_Convergence.thy --- a/src/HOL/Complex_Analysis/Laurent_Convergence.thy Mon Mar 24 14:29:52 2025 +0100 +++ b/src/HOL/Complex_Analysis/Laurent_Convergence.thy Mon Mar 24 21:24:03 2025 +0000 @@ -385,6 +385,43 @@ using Suc by simp qed auto +lemma eval_fls_eq: + assumes "N \ fls_subdegree F" "fls_subdegree F \ 0 \ z \ 0" + assumes "(\n. fls_nth F (int n + N) * z powi (int n + N)) sums S" + shows "eval_fls F z = S" +proof (cases "z = 0") + case [simp]: True + have "(\n. fls_nth F (int n + N) * z powi (int n + N)) = + (\n. if n \ (if N \ 0 then {nat (-N)} else {}) then fls_nth F (int n + N) else 0)" + by (auto simp: fun_eq_iff split: if_splits) + also have "\ sums (\n\(if N \ 0 then {nat (-N)} else {}). fls_nth F (int n + N))" + by (rule sums_If_finite_set) auto + also have "\ = fls_nth F 0" + using assms by auto + also have "\ = eval_fls F z" + using assms by (auto simp: eval_fls_def eval_fps_at_0 power_int_0_left_if) + finally show ?thesis + using assms by (simp add: sums_iff) +next + case [simp]: False + define N' where "N' = fls_subdegree F" + define d where "d = nat (N' - N)" + + have "(\n. fls_nth F (int n + N) * z powi (int n + N)) sums S" + by fact + also have "?this \ (\n. fls_nth F (int (n+d) + N) * z powi (int (n+d) + N)) sums S" + by (rule sums_zero_iff_shift [symmetric]) (use assms in \auto simp: d_def N'_def\) + also have "(\n. int (n+d) + N) = (\n. int n + N')" + using assms by (auto simp: N'_def d_def) + finally have "(\n. fls_nth F (int n + N') * z powi (int n + N')) sums S" . + hence "(\n. z powi (-N') * (fls_nth F (int n + N') * z powi (int n + N'))) sums (z powi (-N') * S)" + by (intro sums_mult) + hence "(\n. fls_nth F (int n + N') * z ^ n) sums (z powi (-N') * S)" + by (simp add: power_int_add power_int_minus field_simps) + thus ?thesis + by (simp add: eval_fls_def eval_fps_def sums_iff power_int_minus N'_def) +qed + lemma norm_summable_fls: "norm z < fls_conv_radius f \ summable (\n. norm (fls_nth f n * z ^ n))" using norm_summable_fps[of z "fls_regpart f"] by (simp add: fls_conv_radius_def) diff -r 3ae491533076 -r 1eb12389c499 src/HOL/Computational_Algebra/Formal_Power_Series.thy --- a/src/HOL/Computational_Algebra/Formal_Power_Series.thy Mon Mar 24 14:29:52 2025 +0100 +++ b/src/HOL/Computational_Algebra/Formal_Power_Series.thy Mon Mar 24 21:24:03 2025 +0000 @@ -5166,6 +5166,18 @@ "fps_compose f (-fps_X :: 'a :: comm_ring_1 fps) = Abs_fps (\n. (-1)^n * f $ n)" using fps_compose_linear[of f "-1"] by (simp only: fps_const_neg [symmetric] fps_const_1_eq_1) simp +lemma fps_nth_compose_linear [simp]: + fixes f :: "'a :: comm_ring_1 fps" + shows "fps_nth (fps_compose f (fps_const c * fps_X)) n = c ^ n * fps_nth f n" +proof - + have "fps_nth (fps_compose f (fps_const c * fps_X)) n = + (\i\{n}. fps_nth f i * fps_nth ((fps_const c * fps_X) ^ i) n)" + unfolding fps_compose_nth + by (intro sum.mono_neutral_cong_right) (auto simp: power_mult_distrib) + also have "\ = c ^ n * fps_nth f n" + by (simp add: power_mult_distrib) + finally show ?thesis . +qed subsection \Elementary series\ diff -r 3ae491533076 -r 1eb12389c499 src/HOL/Filter.thy --- a/src/HOL/Filter.thy Mon Mar 24 14:29:52 2025 +0100 +++ b/src/HOL/Filter.thy Mon Mar 24 21:24:03 2025 +0000 @@ -966,6 +966,8 @@ definition finite_subsets_at_top where "finite_subsets_at_top A = (\ X\{X. finite X \ X \ A}. principal {Y. finite Y \ X \ Y \ Y \ A})" +abbreviation "finite_sets_at_top \ finite_subsets_at_top UNIV" + lemma eventually_finite_subsets_at_top: "eventually P (finite_subsets_at_top A) \ (\X. finite X \ X \ A \ (\Y. finite Y \ X \ Y \ Y \ A \ P Y))" diff -r 3ae491533076 -r 1eb12389c499 src/HOL/Limits.thy --- a/src/HOL/Limits.thy Mon Mar 24 14:29:52 2025 +0100 +++ b/src/HOL/Limits.thy Mon Mar 24 21:24:03 2025 +0000 @@ -1266,9 +1266,9 @@ lemma continuous_on_power_int [continuous_intros]: fixes f :: "'a::topological_space \ 'b::real_normed_div_algebra" - assumes "continuous_on s f" and "\x\s. f x \ 0" + assumes "continuous_on s f" and "n \ 0 \ (\x\s. f x \ 0)" shows "continuous_on s (\x. power_int (f x) n)" - using assms unfolding continuous_on_def by (blast intro: tendsto_power_int) + using assms by (cases "n \ 0") (auto simp: power_int_def intro!: continuous_intros) lemma tendsto_power_int' [tendsto_intros]: fixes a :: "'a::real_normed_div_algebra" diff -r 3ae491533076 -r 1eb12389c499 src/HOL/Topological_Spaces.thy --- a/src/HOL/Topological_Spaces.thy Mon Mar 24 14:29:52 2025 +0100 +++ b/src/HOL/Topological_Spaces.thy Mon Mar 24 21:24:03 2025 +0000 @@ -359,6 +359,35 @@ by (fastforce intro: exI[of _ y] lt_ex) qed +lemma filterlim_atLeastAtMost_at_bot_at_top: + fixes f g :: "'a \ 'b :: linorder_topology" + assumes "filterlim f at_bot F" "filterlim g at_top F" + assumes [simp]: "\a b. finite {a..b::'b}" + shows "filterlim (\x. {f x..g x}) finite_sets_at_top F" + unfolding filterlim_finite_subsets_at_top +proof safe + fix X :: "'b set" + assume X: "finite X" + from X obtain lb where lb: "\x. x \ X \ lb \ x" + by (metis finite_has_minimal2 nle_le) + from X obtain ub where ub: "\x. x \ X \ x \ ub" + by (metis all_not_in_conv finite_has_maximal nle_le) + have "eventually (\x. f x \ lb) F" "eventually (\x. g x \ ub) F" + using assms by (simp_all add: filterlim_at_bot filterlim_at_top) + thus "eventually (\x. finite {f x..g x} \ X \ {f x..g x} \ {f x..g x} \ UNIV) F" + proof eventually_elim + case (elim x) + have "X \ {f x..g x}" + proof + fix y assume "y \ X" + thus "y \ {f x..g x}" + using lb[of y] ub[of y] elim by auto + qed + thus ?case + by auto + qed +qed + subsection \Setup some topologies\