# HG changeset patch # User paulson # Date 1677756894 0 # Node ID df1150ec6cd770e94ae05a9e74e4bb8597631e0c # Parent 5b3139a6b0de674135326ceb6ebcffa1122f5560# Parent da41823d09a7aba054d6bcd5fc7e6730dde47f00 merged diff -r 5b3139a6b0de -r df1150ec6cd7 NEWS --- a/NEWS Wed Mar 01 21:05:09 2023 +0000 +++ b/NEWS Thu Mar 02 11:34:54 2023 +0000 @@ -231,6 +231,13 @@ totalp_on_multpDM totalp_on_multpHO +* HOL-Algebra: new theories SimpleGroups (simple groups) + and SndIsomorphismGrp (second isomorphism theorem for groups), + by Jakob von Raumer + +* HOL-Analysis and HOL-Complex_Analysis: much new material, due to + Manuel Eberl and Wenda Li. + * Mirabelle: - Added session to output directory structure. Minor INCOMPATIBILITY. diff -r 5b3139a6b0de -r df1150ec6cd7 src/HOL/Analysis/Further_Topology.thy --- a/src/HOL/Analysis/Further_Topology.thy Wed Mar 01 21:05:09 2023 +0000 +++ b/src/HOL/Analysis/Further_Topology.thy Thu Mar 02 11:34:54 2023 +0000 @@ -3333,7 +3333,7 @@ then have "z \ 0" by auto have "(w/z)^n = 1" by (metis False divide_self_if eq power_divide power_one) - then obtain j where j: "w / z = exp (2 * of_real pi * \ * j / n)" and "j < n" + then obtain j::nat where j: "w / z = exp (2 * of_real pi * \ * j / n)" and "j < n" using Suc_leI assms \2 \ n\ complex_roots_unity [THEN eqset_imp_iff, of n "w/z"] by force have "cmod (w/z - 1) < 2 * sin (pi / real n)" diff -r 5b3139a6b0de -r df1150ec6cd7 src/HOL/Analysis/Uniform_Limit.thy --- a/src/HOL/Analysis/Uniform_Limit.thy Wed Mar 01 21:05:09 2023 +0000 +++ b/src/HOL/Analysis/Uniform_Limit.thy Thu Mar 02 11:34:54 2023 +0000 @@ -6,7 +6,7 @@ section \Uniform Limit and Uniform Convergence\ theory Uniform_Limit -imports Connected Summation_Tests +imports Connected Summation_Tests Infinite_Sum begin @@ -560,12 +560,67 @@ shows "uniformly_convergent_on A (\n x. \i l = m \ uniform_limit X f m F" - by simp + +lemma Weierstrass_m_test_general: + fixes f :: "'a \ 'b \ 'c :: banach" + fixes M :: "'a \ real" + assumes norm_le: "\x y. x \ X \ y \ Y \ norm (f x y) \ M x" + assumes summable: "M summable_on X" + shows "uniform_limit Y (\X y. \x\X. f x y) (\y. \\<^sub>\x\X. f x y) (finite_subsets_at_top X)" +proof (rule uniform_limitI) + fix \ :: real + assume "\ > 0" + define S where "S = (\y. \\<^sub>\x\X. f x y)" + have S: "((\x. f x y) has_sum S y) X" if y: "y \ Y" for y + unfolding S_def + proof (rule has_sum_infsum) + have "(\x. norm (f x y)) summable_on X" + by (rule abs_summable_on_comparison_test'[OF summable norm_le]) (use y in auto) + thus "(\x. f x y) summable_on X" + by (metis abs_summable_summable) + qed + + define T where "T = (\\<^sub>\x\X. M x)" + have T: "(M has_sum T) X" + unfolding T_def by (simp add: local.summable) + have M_summable: "M summable_on X'" if "X' \ X" for X' + using local.summable summable_on_subset_banach that by blast + + have f_summable: "(\x. f x y) summable_on X'" if "X' \ X" "y \ Y" for X' y + using S summable_on_def summable_on_subset_banach that by blast + have "eventually (\X'. dist (\x\X'. M x) T < \) (finite_subsets_at_top X)" + using T \\ > 0\ unfolding T_def has_sum_def tendsto_iff by blast + moreover have "eventually (\X'. finite X' \ X' \ X) (finite_subsets_at_top X)" + by (simp add: eventually_finite_subsets_at_top_weakI) + ultimately show "\\<^sub>F X' in finite_subsets_at_top X. \y\Y. dist (\x\X'. f x y) (\\<^sub>\x\X. f x y) < \" + proof eventually_elim + case X': (elim X') + show "\y\Y. dist (\x\X'. f x y) (\\<^sub>\x\X. f x y) < \" + proof + fix y assume y: "y \ Y" + have 1: "((\x. f x y) has_sum (S y - (\x\X'. f x y))) (X - X')" + using X' y by (intro has_sum_Diff S has_sum_finite[of X'] f_summable) auto + have 2: "(M has_sum (T - (\x\X'. M x))) (X - X')" + using X' y by (intro has_sum_Diff T has_sum_finite[of X'] M_summable) auto + have "dist (\x\X'. f x y) (\\<^sub>\x\X. f x y) = norm (S y - (\x\X'. f x y))" + by (simp add: dist_norm norm_minus_commute S_def) + also have "norm (S y - (\x\X'. f x y)) \ (\\<^sub>\x\X-X'. M x)" + using 2 y by (intro norm_infsum_le[OF 1 _ norm_le]) (auto simp: infsumI) + also have "\ = T - (\x\X'. M x)" + using 2 by (auto simp: infsumI) + also have "\ < \" + using X' by (simp add: dist_norm) + finally show "dist (\x\X'. f x y) (\\<^sub>\x\X. f x y) < \" . + qed + qed +qed subsection\<^marker>\tag unimportant\ \Structural introduction rules\ +lemma uniform_limit_eq_rhs: "uniform_limit X f l F \ l = m \ uniform_limit X f m F" + by simp + named_theorems uniform_limit_intros "introduction rules for uniform_limit" setup \ Global_Theory.add_thms_dynamic (\<^binding>\uniform_limit_eq_intros\, diff -r 5b3139a6b0de -r df1150ec6cd7 src/HOL/Probability/Probability_Mass_Function.thy --- a/src/HOL/Probability/Probability_Mass_Function.thy Wed Mar 01 21:05:09 2023 +0000 +++ b/src/HOL/Probability/Probability_Mass_Function.thy Thu Mar 02 11:34:54 2023 +0000 @@ -12,6 +12,9 @@ "HOL-Library.Multiset" begin +text \Conflicting notation from \<^theory>\HOL-Analysis.Infinite_Sum\\ +no_notation Infinite_Sum.abs_summable_on (infixr "abs'_summable'_on" 46) + lemma AE_emeasure_singleton: assumes x: "emeasure M {x} \ 0" and ae: "AE x in M. P x" shows "P x" proof - diff -r 5b3139a6b0de -r df1150ec6cd7 src/HOL/Probability/Product_PMF.thy --- a/src/HOL/Probability/Product_PMF.thy Wed Mar 01 21:05:09 2023 +0000 +++ b/src/HOL/Probability/Product_PMF.thy Thu Mar 02 11:34:54 2023 +0000 @@ -7,6 +7,9 @@ imports Probability_Mass_Function Independent_Family begin +text \Conflicting notation from \<^theory>\HOL-Analysis.Infinite_Sum\\ +no_notation Infinite_Sum.abs_summable_on (infixr "abs'_summable'_on" 46) + subsection \Preliminaries\ lemma pmf_expectation_eq_infsetsum: "measure_pmf.expectation p f = infsetsum (\x. pmf p x * f x) UNIV" diff -r 5b3139a6b0de -r df1150ec6cd7 src/HOL/Probability/SPMF.thy --- a/src/HOL/Probability/SPMF.thy Wed Mar 01 21:05:09 2023 +0000 +++ b/src/HOL/Probability/SPMF.thy Thu Mar 02 11:34:54 2023 +0000 @@ -2338,20 +2338,23 @@ lemma scale_scale_spmf: "scale_spmf r (scale_spmf r' p) = scale_spmf (r * max 0 (min (inverse (weight_spmf p)) r')) p" (is "?lhs = ?rhs") -proof(rule spmf_eqI) - fix i - have "max 0 (min (1 / weight_spmf p) r') * - max 0 (min (1 / min 1 (weight_spmf p * max 0 r')) r) = - max 0 (min (1 / weight_spmf p) (r * max 0 (min (1 / weight_spmf p) r')))" - proof(cases "weight_spmf p > 0") - case False - thus ?thesis by(simp add: not_less weight_spmf_le_0) - next - case True - thus ?thesis by(simp add: field_simps max_def min.absorb_iff2[symmetric])(auto simp add: min_def field_simps zero_le_mult_iff) +proof(cases "weight_spmf p > 0") + case False + thus ?thesis + by (simp add: weight_spmf_eq_0 zero_less_measure_iff) +next + case True + show ?thesis + proof(rule spmf_eqI) + fix i + have "max 0 (min (1 / weight_spmf p) r') * max 0 (min (1 / min 1 (weight_spmf p * max 0 r')) r) = + max 0 (min (1 / weight_spmf p) (r * max 0 (min (1 / weight_spmf p) r')))" + using True + by(simp add: field_simps max_def min.absorb_iff2[symmetric])(auto simp add: min_def field_simps zero_le_mult_iff) + then show "spmf ?lhs i = spmf ?rhs i" + apply (subst spmf_scale_spmf)+ (*FOR SOME REASON we now get linarith_split_limit exceeded if simp is used*) + by (metis (no_types, opaque_lifting) inverse_eq_divide mult.commute mult.left_commute weight_scale_spmf) qed - then show "spmf ?lhs i = spmf ?rhs i" - by(simp add: spmf_scale_spmf field_simps weight_scale_spmf) qed lemma scale_scale_spmf' [simp]: