diff -r 6969d0ffc576 -r 7ff71bdcf731 src/HOL/Analysis/Infinite_Products.thy --- a/src/HOL/Analysis/Infinite_Products.thy Tue Dec 20 22:24:36 2022 +0000 +++ b/src/HOL/Analysis/Infinite_Products.thy Wed Dec 21 12:30:48 2022 +0000 @@ -710,6 +710,24 @@ using assms convergent_prod_offset_0 [OF assms] by (simp add: prod_defs lim_def) (metis (no_types) assms(1) convergent_prod_to_zero_iff) +lemma prodinf_eq_lim': + fixes f :: "nat \ 'a :: {idom,topological_semigroup_mult,t2_space}" + assumes "convergent_prod f" "\i. f i \ 0" + shows "prodinf f = lim (\n. \in. \k\n. f k) \ a" "a \ 0" + shows"(\k. f k) = a" + by (metis LIMSEQ_prod_0 LIMSEQ_unique assms convergent_prod_iff_nz_lim limI prodinf_eq_lim) + +lemma prodinf_eq_prod_lim': + fixes a:: "'a :: {topological_semigroup_mult,t2_space,idom}" + assumes "(\n. \k a" "a \ 0" + shows"(\k. f k) = a" + using LIMSEQ_lessThan_iff_atMost assms prodinf_eq_prod_lim by blast + lemma has_prod_one[simp, intro]: "(\n. 1) has_prod 1" unfolding prod_defs by auto @@ -875,6 +893,34 @@ shows "(\r. if r = i then f r else 1) has_prod f i" using has_prod_If_finite[of "\r. r = i"] by simp +text \The ge1 assumption can probably be weakened, at the expense of extra work\ +lemma uniform_limit_prodinf: + fixes f:: "nat \ real \ real" + assumes "uniformly_convergent_on X (\n x. \kx k . x \ X \ f k x \ 1" + shows "uniform_limit X (\n x. \kx. \k. f k x) sequentially" +proof - + have ul: "uniform_limit X (\n x. \kx. lim (\n. \kk. f k x) = lim (\n. \k X" for x + proof (intro prodinf_eq_lim') + have tends: "(\n. \k lim (\n. \kk 1" for n + using ge1 by (simp add: prod_ge_1 that) + ultimately have "lim (\n. \k 1" + by (meson LIMSEQ_le_const) + then have "raw_has_prod (\k. f k x) 0 (lim (\n. \kk. f k x)" + unfolding convergent_prod_def by blast + show "\k. f k x \ 0" + by (smt (verit) ge1 that) + qed + ultimately show ?thesis + by (metis (mono_tags, lifting) uniform_limit_cong') +qed + context fixes f :: "nat \ 'a :: real_normed_field" begin @@ -944,29 +990,15 @@ subsection\<^marker>\tag unimportant\ \Infinite products on ordered topological monoids\ -lemma LIMSEQ_prod_0: - fixes f :: "nat \ 'a::{semidom,topological_space}" - assumes "f i = 0" - shows "(\n. prod f {..n}) \ 0" -proof (subst tendsto_cong) - show "\\<^sub>F n in sequentially. prod f {..n} = 0" - proof - show "prod f {..n} = 0" if "n \ i" for n - using that assms by auto - qed -qed auto - -lemma LIMSEQ_prod_nonneg: - fixes f :: "nat \ 'a::{linordered_semidom,linorder_topology}" - assumes 0: "\n. 0 \ f n" and a: "(\n. prod f {..n}) \ a" - shows "a \ 0" - by (simp add: "0" prod_nonneg LIMSEQ_le_const [OF a]) - - context fixes f :: "nat \ 'a::{linordered_semidom,linorder_topology}" begin +lemma has_prod_nonzero: + assumes "f has_prod a" "a \ 0" + shows "f k \ 0" + using assms by (auto simp: has_prod_def raw_has_prod_def LIMSEQ_prod_0 LIMSEQ_unique) + lemma has_prod_le: assumes f: "f has_prod a" and g: "g has_prod b" and le: "\n. 0 \ f n \ f n \ g n" shows "a \ b" @@ -1024,9 +1056,9 @@ lemma prodinf_le_const: fixes f :: "nat \ real" - assumes "convergent_prod f" "\n. prod f {.. x" + assumes "convergent_prod f" "\n. n \ N \ prod f {.. x" shows "prodinf f \ x" - by (metis lessThan_Suc_atMost assms convergent_prod_LIMSEQ LIMSEQ_le_const2) + by (metis lessThan_Suc_atMost assms convergent_prod_LIMSEQ LIMSEQ_le_const2 atMost_iff lessThan_iff less_le) lemma prodinf_eq_one_iff [simp]: fixes f :: "nat \ real"