author | paulson <lp15@cam.ac.uk> |
Thu, 17 Apr 2025 22:57:26 +0100 | |
changeset 82522 | 62afd98e3f3e |
parent 82353 | e3a0128f4905 |
child 82529 | ff4b062aae57 |
permissions | -rw-r--r-- |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
1 |
(*File: HOL/Analysis/Infinite_Product.thy |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
2 |
Author: Manuel Eberl & LC Paulson |
66277 | 3 |
|
4 |
Basic results about convergence and absolute convergence of infinite products |
|
5 |
and their connection to summability. |
|
6 |
*) |
|
7 |
section \<open>Infinite Products\<close> |
|
8 |
theory Infinite_Products |
|
68585 | 9 |
imports Topology_Euclidean_Space Complex_Transcendental |
66277 | 10 |
begin |
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
11 |
|
70136 | 12 |
subsection\<^marker>\<open>tag unimportant\<close> \<open>Preliminaries\<close> |
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
13 |
|
66277 | 14 |
lemma sum_le_prod: |
15 |
fixes f :: "'a \<Rightarrow> 'b :: linordered_semidom" |
|
16 |
assumes "\<And>x. x \<in> A \<Longrightarrow> f x \<ge> 0" |
|
17 |
shows "sum f A \<le> (\<Prod>x\<in>A. 1 + f x)" |
|
18 |
using assms |
|
19 |
proof (induction A rule: infinite_finite_induct) |
|
20 |
case (insert x A) |
|
21 |
from insert.hyps have "sum f A + f x * (\<Prod>x\<in>A. 1) \<le> (\<Prod>x\<in>A. 1 + f x) + f x * (\<Prod>x\<in>A. 1 + f x)" |
|
22 |
by (intro add_mono insert mult_left_mono prod_mono) (auto intro: insert.prems) |
|
23 |
with insert.hyps show ?case by (simp add: algebra_simps) |
|
24 |
qed simp_all |
|
25 |
||
26 |
lemma prod_le_exp_sum: |
|
27 |
fixes f :: "'a \<Rightarrow> real" |
|
28 |
assumes "\<And>x. x \<in> A \<Longrightarrow> f x \<ge> 0" |
|
29 |
shows "prod (\<lambda>x. 1 + f x) A \<le> exp (sum f A)" |
|
30 |
using assms |
|
31 |
proof (induction A rule: infinite_finite_induct) |
|
32 |
case (insert x A) |
|
33 |
have "(1 + f x) * (\<Prod>x\<in>A. 1 + f x) \<le> exp (f x) * exp (sum f A)" |
|
34 |
using insert.prems by (intro mult_mono insert prod_nonneg exp_ge_add_one_self) auto |
|
35 |
with insert.hyps show ?case by (simp add: algebra_simps exp_add) |
|
36 |
qed simp_all |
|
37 |
||
38 |
lemma lim_ln_1_plus_x_over_x_at_0: "(\<lambda>x::real. ln (1 + x) / x) \<midarrow>0\<rightarrow> 1" |
|
39 |
proof (rule lhopital) |
|
40 |
show "(\<lambda>x::real. ln (1 + x)) \<midarrow>0\<rightarrow> 0" |
|
41 |
by (rule tendsto_eq_intros refl | simp)+ |
|
42 |
have "eventually (\<lambda>x::real. x \<in> {-1/2<..<1/2}) (nhds 0)" |
|
43 |
by (rule eventually_nhds_in_open) auto |
|
44 |
hence *: "eventually (\<lambda>x::real. x \<in> {-1/2<..<1/2}) (at 0)" |
|
45 |
by (rule filter_leD [rotated]) (simp_all add: at_within_def) |
|
46 |
show "eventually (\<lambda>x::real. ((\<lambda>x. ln (1 + x)) has_field_derivative inverse (1 + x)) (at x)) (at 0)" |
|
47 |
using * by eventually_elim (auto intro!: derivative_eq_intros simp: field_simps) |
|
48 |
show "eventually (\<lambda>x::real. ((\<lambda>x. x) has_field_derivative 1) (at x)) (at 0)" |
|
49 |
using * by eventually_elim (auto intro!: derivative_eq_intros simp: field_simps) |
|
50 |
show "\<forall>\<^sub>F x in at 0. x \<noteq> 0" by (auto simp: at_within_def eventually_inf_principal) |
|
51 |
show "(\<lambda>x::real. inverse (1 + x) / 1) \<midarrow>0\<rightarrow> 1" |
|
52 |
by (rule tendsto_eq_intros refl | simp)+ |
|
53 |
qed auto |
|
54 |
||
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
55 |
subsection\<open>Definitions and basic properties\<close> |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
56 |
|
70136 | 57 |
definition\<^marker>\<open>tag important\<close> raw_has_prod :: "[nat \<Rightarrow> 'a::{t2_space, comm_semiring_1}, nat, 'a] \<Rightarrow> bool" |
68361 | 58 |
where "raw_has_prod f M p \<equiv> (\<lambda>n. \<Prod>i\<le>n. f (i+M)) \<longlonglongrightarrow> p \<and> p \<noteq> 0" |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
59 |
|
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
60 |
text\<open>The nonzero and zero cases, as in \emph{Complex Analysis} by Joseph Bak and Donald J.Newman, page 241\<close> |
70136 | 61 |
text\<^marker>\<open>tag important\<close> \<open>%whitespace\<close> |
62 |
definition\<^marker>\<open>tag important\<close> |
|
80914
d97fdabd9e2b
standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents:
80521
diff
changeset
|
63 |
has_prod :: "(nat \<Rightarrow> 'a::{t2_space, comm_semiring_1}) \<Rightarrow> 'a \<Rightarrow> bool" (infixr \<open>has'_prod\<close> 80) |
68361 | 64 |
where "f has_prod p \<equiv> raw_has_prod f 0 p \<or> (\<exists>i q. p = 0 \<and> f i = 0 \<and> raw_has_prod f (Suc i) q)" |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
65 |
|
70136 | 66 |
definition\<^marker>\<open>tag important\<close> convergent_prod :: "(nat \<Rightarrow> 'a :: {t2_space,comm_semiring_1}) \<Rightarrow> bool" where |
68361 | 67 |
"convergent_prod f \<equiv> \<exists>M p. raw_has_prod f M p" |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
68 |
|
70136 | 69 |
definition\<^marker>\<open>tag important\<close> prodinf :: "(nat \<Rightarrow> 'a::{t2_space, comm_semiring_1}) \<Rightarrow> 'a" |
80914
d97fdabd9e2b
standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents:
80521
diff
changeset
|
70 |
(binder \<open>\<Prod>\<close> 10) |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
71 |
where "prodinf f = (THE p. f has_prod p)" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
72 |
|
68361 | 73 |
lemmas prod_defs = raw_has_prod_def has_prod_def convergent_prod_def prodinf_def |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
74 |
|
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
75 |
lemma has_prod_subst[trans]: "f = g \<Longrightarrow> g has_prod z \<Longrightarrow> f has_prod z" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
76 |
by simp |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
77 |
|
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
78 |
lemma has_prod_cong: "(\<And>n. f n = g n) \<Longrightarrow> f has_prod c \<longleftrightarrow> g has_prod c" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
79 |
by presburger |
66277 | 80 |
|
68361 | 81 |
lemma raw_has_prod_nonzero [simp]: "\<not> raw_has_prod f M 0" |
82 |
by (simp add: raw_has_prod_def) |
|
68071 | 83 |
|
68361 | 84 |
lemma raw_has_prod_eq_0: |
85 |
fixes f :: "nat \<Rightarrow> 'a::{semidom,t2_space}" |
|
86 |
assumes p: "raw_has_prod f m p" and i: "f i = 0" "i \<ge> m" |
|
68136 | 87 |
shows "p = 0" |
88 |
proof - |
|
89 |
have eq0: "(\<Prod>k\<le>n. f (k+m)) = 0" if "i - m \<le> n" for n |
|
68361 | 90 |
proof - |
91 |
have "\<exists>k\<le>n. f (k + m) = 0" |
|
92 |
using i that by auto |
|
93 |
then show ?thesis |
|
94 |
by auto |
|
95 |
qed |
|
68136 | 96 |
have "(\<lambda>n. \<Prod>i\<le>n. f (i + m)) \<longlonglongrightarrow> 0" |
97 |
by (rule LIMSEQ_offset [where k = "i-m"]) (simp add: eq0) |
|
98 |
with p show ?thesis |
|
68361 | 99 |
unfolding raw_has_prod_def |
68136 | 100 |
using LIMSEQ_unique by blast |
101 |
qed |
|
102 |
||
68452
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
103 |
lemma raw_has_prod_Suc: |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
104 |
"raw_has_prod f (Suc M) a \<longleftrightarrow> raw_has_prod (\<lambda>n. f (Suc n)) M a" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
105 |
unfolding raw_has_prod_def by auto |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
106 |
|
68361 | 107 |
lemma has_prod_0_iff: "f has_prod 0 \<longleftrightarrow> (\<exists>i. f i = 0 \<and> (\<exists>p. raw_has_prod f (Suc i) p))" |
68071 | 108 |
by (simp add: has_prod_def) |
68136 | 109 |
|
110 |
lemma has_prod_unique2: |
|
68361 | 111 |
fixes f :: "nat \<Rightarrow> 'a::{semidom,t2_space}" |
68136 | 112 |
assumes "f has_prod a" "f has_prod b" shows "a = b" |
113 |
using assms |
|
68361 | 114 |
by (auto simp: has_prod_def raw_has_prod_eq_0) (meson raw_has_prod_def sequentially_bot tendsto_unique) |
68136 | 115 |
|
116 |
lemma has_prod_unique: |
|
68361 | 117 |
fixes f :: "nat \<Rightarrow> 'a :: {semidom,t2_space}" |
68136 | 118 |
shows "f has_prod s \<Longrightarrow> s = prodinf f" |
119 |
by (simp add: has_prod_unique2 prodinf_def the_equality) |
|
68071 | 120 |
|
76722
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
121 |
lemma has_prod_eq_0_iff: |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
122 |
fixes f :: "nat \<Rightarrow> 'a :: {semidom, comm_semiring_1, t2_space}" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
123 |
assumes "f has_prod P" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
124 |
shows "P = 0 \<longleftrightarrow> 0 \<in> range f" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
125 |
proof |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
126 |
assume "0 \<in> range f" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
127 |
then obtain N where N: "f N = 0" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
128 |
by auto |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
129 |
have "eventually (\<lambda>n. n > N) at_top" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
130 |
by (rule eventually_gt_at_top) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
131 |
hence "eventually (\<lambda>n. (\<Prod>k<n. f k) = 0) at_top" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
132 |
by eventually_elim (use N in auto) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
133 |
hence "(\<lambda>n. \<Prod>k<n. f k) \<longlonglongrightarrow> 0" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
134 |
by (simp add: tendsto_eventually) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
135 |
moreover have "(\<lambda>n. \<Prod>k<n. f k) \<longlonglongrightarrow> P" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
136 |
using assms by (metis N calculation prod_defs(2) raw_has_prod_eq_0 zero_le) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
137 |
ultimately show "P = 0" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
138 |
using tendsto_unique by force |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
139 |
qed (use assms in \<open>auto simp: has_prod_def\<close>) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
140 |
|
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
141 |
lemma has_prod_0D: |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
142 |
fixes f :: "nat \<Rightarrow> 'a :: {semidom, comm_semiring_1, t2_space}" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
143 |
shows "f has_prod 0 \<Longrightarrow> 0 \<in> range f" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
144 |
using has_prod_eq_0_iff[of f 0] by auto |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
145 |
|
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
146 |
lemma has_prod_zeroI: |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
147 |
fixes f :: "nat \<Rightarrow> 'a :: {semidom, comm_semiring_1, t2_space}" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
148 |
assumes "f has_prod P" "f n = 0" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
149 |
shows "P = 0" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
150 |
using assms by (auto simp: has_prod_eq_0_iff) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
151 |
|
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
152 |
lemma raw_has_prod_in_Reals: |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
153 |
assumes "raw_has_prod (complex_of_real \<circ> z) M p" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
154 |
shows "p \<in> \<real>" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
155 |
using assms by (auto simp: raw_has_prod_def real_lim_sequentially) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
156 |
|
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
157 |
lemma raw_has_prod_of_real_iff: "raw_has_prod (complex_of_real \<circ> z) M (of_real p) \<longleftrightarrow> raw_has_prod z M p" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
158 |
by (auto simp: raw_has_prod_def tendsto_of_real_iff simp flip: of_real_prod) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
159 |
|
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
160 |
lemma convergent_prod_of_real_iff: "convergent_prod (complex_of_real \<circ> z) \<longleftrightarrow> convergent_prod z" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
161 |
by (smt (verit, best) Reals_cases convergent_prod_def raw_has_prod_in_Reals raw_has_prod_of_real_iff) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
162 |
|
66277 | 163 |
lemma convergent_prod_altdef: |
164 |
fixes f :: "nat \<Rightarrow> 'a :: {t2_space,comm_semiring_1}" |
|
165 |
shows "convergent_prod f \<longleftrightarrow> (\<exists>M L. (\<forall>n\<ge>M. f n \<noteq> 0) \<and> (\<lambda>n. \<Prod>i\<le>n. f (i+M)) \<longlonglongrightarrow> L \<and> L \<noteq> 0)" |
|
166 |
proof |
|
167 |
assume "convergent_prod f" |
|
168 |
then obtain M L where *: "(\<lambda>n. \<Prod>i\<le>n. f (i+M)) \<longlonglongrightarrow> L" "L \<noteq> 0" |
|
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
169 |
by (auto simp: prod_defs) |
66277 | 170 |
have "f i \<noteq> 0" if "i \<ge> M" for i |
171 |
proof |
|
172 |
assume "f i = 0" |
|
173 |
have **: "eventually (\<lambda>n. (\<Prod>i\<le>n. f (i+M)) = 0) sequentially" |
|
174 |
using eventually_ge_at_top[of "i - M"] |
|
175 |
proof eventually_elim |
|
176 |
case (elim n) |
|
177 |
with \<open>f i = 0\<close> and \<open>i \<ge> M\<close> show ?case |
|
178 |
by (auto intro!: bexI[of _ "i - M"] prod_zero) |
|
179 |
qed |
|
180 |
have "(\<lambda>n. (\<Prod>i\<le>n. f (i+M))) \<longlonglongrightarrow> 0" |
|
181 |
unfolding filterlim_iff |
|
182 |
by (auto dest!: eventually_nhds_x_imp_x intro!: eventually_mono[OF **]) |
|
183 |
from tendsto_unique[OF _ this *(1)] and *(2) |
|
184 |
show False by simp |
|
185 |
qed |
|
186 |
with * show "(\<exists>M L. (\<forall>n\<ge>M. f n \<noteq> 0) \<and> (\<lambda>n. \<Prod>i\<le>n. f (i+M)) \<longlonglongrightarrow> L \<and> L \<noteq> 0)" |
|
187 |
by blast |
|
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
188 |
qed (auto simp: prod_defs) |
66277 | 189 |
|
75711 | 190 |
lemma raw_has_prod_norm: |
191 |
fixes a :: "'a ::real_normed_field" |
|
192 |
assumes "raw_has_prod f M a" |
|
193 |
shows "raw_has_prod (\<lambda>n. norm (f n)) M (norm a)" |
|
194 |
using assms by (auto simp: raw_has_prod_def prod_norm tendsto_norm) |
|
195 |
||
196 |
lemma has_prod_norm: |
|
197 |
fixes a :: "'a ::real_normed_field" |
|
198 |
assumes f: "f has_prod a" |
|
199 |
shows "(\<lambda>n. norm (f n)) has_prod (norm a)" |
|
200 |
using f [unfolded has_prod_def] |
|
201 |
proof (elim disjE exE conjE) |
|
202 |
assume f0: "raw_has_prod f 0 a" |
|
203 |
then show "(\<lambda>n. norm (f n)) has_prod norm a" |
|
204 |
using has_prod_def raw_has_prod_norm by blast |
|
205 |
next |
|
206 |
fix i p |
|
207 |
assume "a = 0" and "f i = 0" and p: "raw_has_prod f (Suc i) p" |
|
208 |
then have "Ex (raw_has_prod (\<lambda>n. norm (f n)) (Suc i))" |
|
209 |
using raw_has_prod_norm by blast |
|
210 |
then show ?thesis |
|
211 |
by (metis \<open>a = 0\<close> \<open>f i = 0\<close> has_prod_0_iff norm_zero) |
|
212 |
qed |
|
213 |
||
82353
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
214 |
lemma raw_has_prod_imp_nonzero: |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
215 |
assumes "raw_has_prod f N P" "n \<ge> N" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
216 |
shows "f n \<noteq> 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
217 |
proof |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
218 |
assume "f n = 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
219 |
from assms(1) have lim: "(\<lambda>m. (\<Prod>k\<le>m. f (k + N))) \<longlonglongrightarrow> P" and "P \<noteq> 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
220 |
unfolding raw_has_prod_def by blast+ |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
221 |
have "eventually (\<lambda>m. m \<ge> n - N) at_top" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
222 |
by (rule eventually_ge_at_top) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
223 |
hence "eventually (\<lambda>m. (\<Prod>k\<le>m. f (k + N)) = 0) at_top" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
224 |
proof eventually_elim |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
225 |
case (elim m) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
226 |
have "f ((n - N) + N) = 0" "n - N \<in> {..m}" "finite {..m}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
227 |
using \<open>n \<ge> N\<close> \<open>f n = 0\<close> elim by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
228 |
thus "(\<Prod>k\<le>m. f (k + N)) = 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
229 |
using prod_zero[of "{..m}" "\<lambda>k. f (k + N)"] by blast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
230 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
231 |
with lim have "P = 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
232 |
by (simp add: LIMSEQ_const_iff tendsto_cong) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
233 |
thus False |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
234 |
using \<open>P \<noteq> 0\<close> by contradiction |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
235 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
236 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
237 |
lemma has_prod_imp_tendsto: |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
238 |
fixes f :: "nat \<Rightarrow> 'a :: {semidom, t2_space}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
239 |
assumes "f has_prod P" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
240 |
shows "(\<lambda>n. \<Prod>k\<le>n. f k) \<longlonglongrightarrow> P" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
241 |
proof (cases "P = 0") |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
242 |
case False |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
243 |
with assms show ?thesis |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
244 |
by (auto simp: has_prod_def raw_has_prod_def) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
245 |
next |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
246 |
case True |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
247 |
with assms obtain N P' where "f N = 0" "raw_has_prod f (Suc N) P'" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
248 |
by (auto simp: has_prod_def) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
249 |
thus ?thesis |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
250 |
using LIMSEQ_prod_0 True \<open>f N = 0\<close> by blast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
251 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
252 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
253 |
lemma has_prod_imp_tendsto': |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
254 |
fixes f :: "nat \<Rightarrow> 'a :: {semidom, t2_space}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
255 |
assumes "f has_prod P" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
256 |
shows "(\<lambda>n. \<Prod>k<n. f k) \<longlonglongrightarrow> P" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
257 |
using has_prod_imp_tendsto[OF assms] LIMSEQ_lessThan_iff_atMost by blast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
258 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
259 |
lemma has_prod_nonneg: |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
260 |
assumes "f has_prod P" "\<And>n. f n \<ge> (0::real)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
261 |
shows "P \<ge> 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
262 |
proof (rule tendsto_le) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
263 |
show "((\<lambda>n. \<Prod>i\<le>n. f i)) \<longlonglongrightarrow> P" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
264 |
using assms(1) by (rule has_prod_imp_tendsto) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
265 |
show "(\<lambda>n. 0::real) \<longlonglongrightarrow> 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
266 |
by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
267 |
qed (use assms in \<open>auto intro!: always_eventually prod_nonneg\<close>) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
268 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
269 |
lemma has_prod_pos: |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
270 |
assumes "f has_prod P" "\<And>n. f n > (0::real)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
271 |
shows "P > 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
272 |
proof - |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
273 |
have "P \<ge> 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
274 |
by (rule has_prod_nonneg[OF assms(1)]) (auto intro!: less_imp_le assms(2)) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
275 |
moreover have "f n \<noteq> 0" for n |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
276 |
using assms(2)[of n] by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
277 |
hence "P \<noteq> 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
278 |
using has_prod_0_iff[of f] assms by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
279 |
ultimately show ?thesis |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
280 |
by linarith |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
281 |
qed |
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
282 |
|
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
283 |
subsection\<open>Absolutely convergent products\<close> |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
284 |
|
70136 | 285 |
definition\<^marker>\<open>tag important\<close> abs_convergent_prod :: "(nat \<Rightarrow> _) \<Rightarrow> bool" where |
66277 | 286 |
"abs_convergent_prod f \<longleftrightarrow> convergent_prod (\<lambda>i. 1 + norm (f i - 1))" |
287 |
||
288 |
lemma abs_convergent_prodI: |
|
289 |
assumes "convergent (\<lambda>n. \<Prod>i\<le>n. 1 + norm (f i - 1))" |
|
290 |
shows "abs_convergent_prod f" |
|
291 |
proof - |
|
292 |
from assms obtain L where L: "(\<lambda>n. \<Prod>i\<le>n. 1 + norm (f i - 1)) \<longlonglongrightarrow> L" |
|
293 |
by (auto simp: convergent_def) |
|
294 |
have "L \<ge> 1" |
|
295 |
proof (rule tendsto_le) |
|
296 |
show "eventually (\<lambda>n. (\<Prod>i\<le>n. 1 + norm (f i - 1)) \<ge> 1) sequentially" |
|
297 |
proof (intro always_eventually allI) |
|
298 |
fix n |
|
299 |
have "(\<Prod>i\<le>n. 1 + norm (f i - 1)) \<ge> (\<Prod>i\<le>n. 1)" |
|
300 |
by (intro prod_mono) auto |
|
301 |
thus "(\<Prod>i\<le>n. 1 + norm (f i - 1)) \<ge> 1" by simp |
|
302 |
qed |
|
303 |
qed (use L in simp_all) |
|
304 |
hence "L \<noteq> 0" by auto |
|
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
305 |
with L show ?thesis unfolding abs_convergent_prod_def prod_defs |
66277 | 306 |
by (intro exI[of _ "0::nat"] exI[of _ L]) auto |
307 |
qed |
|
308 |
||
309 |
lemma |
|
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
310 |
fixes f :: "nat \<Rightarrow> 'a :: {topological_semigroup_mult,t2_space,idom}" |
66277 | 311 |
assumes "convergent_prod f" |
73005
83b114a6545f
A few more simprules for iff-reasoning
paulson <lp15@cam.ac.uk>
parents:
73004
diff
changeset
|
312 |
shows convergent_prod_imp_convergent: "convergent (\<lambda>n. \<Prod>i\<le>n. f i)" |
83b114a6545f
A few more simprules for iff-reasoning
paulson <lp15@cam.ac.uk>
parents:
73004
diff
changeset
|
313 |
and convergent_prod_to_zero_iff [simp]: "(\<lambda>n. \<Prod>i\<le>n. f i) \<longlonglongrightarrow> 0 \<longleftrightarrow> (\<exists>i. f i = 0)" |
66277 | 314 |
proof - |
315 |
from assms obtain M L |
|
316 |
where M: "\<And>n. n \<ge> M \<Longrightarrow> f n \<noteq> 0" and "(\<lambda>n. \<Prod>i\<le>n. f (i + M)) \<longlonglongrightarrow> L" and "L \<noteq> 0" |
|
317 |
by (auto simp: convergent_prod_altdef) |
|
318 |
note this(2) |
|
319 |
also have "(\<lambda>n. \<Prod>i\<le>n. f (i + M)) = (\<lambda>n. \<Prod>i=M..M+n. f i)" |
|
320 |
by (intro ext prod.reindex_bij_witness[of _ "\<lambda>n. n - M" "\<lambda>n. n + M"]) auto |
|
321 |
finally have "(\<lambda>n. (\<Prod>i<M. f i) * (\<Prod>i=M..M+n. f i)) \<longlonglongrightarrow> (\<Prod>i<M. f i) * L" |
|
322 |
by (intro tendsto_mult tendsto_const) |
|
323 |
also have "(\<lambda>n. (\<Prod>i<M. f i) * (\<Prod>i=M..M+n. f i)) = (\<lambda>n. (\<Prod>i\<in>{..<M}\<union>{M..M+n}. f i))" |
|
324 |
by (subst prod.union_disjoint) auto |
|
325 |
also have "(\<lambda>n. {..<M} \<union> {M..M+n}) = (\<lambda>n. {..n+M})" by auto |
|
326 |
finally have lim: "(\<lambda>n. prod f {..n}) \<longlonglongrightarrow> prod f {..<M} * L" |
|
327 |
by (rule LIMSEQ_offset) |
|
328 |
thus "convergent (\<lambda>n. \<Prod>i\<le>n. f i)" |
|
329 |
by (auto simp: convergent_def) |
|
330 |
||
331 |
show "(\<lambda>n. \<Prod>i\<le>n. f i) \<longlonglongrightarrow> 0 \<longleftrightarrow> (\<exists>i. f i = 0)" |
|
332 |
proof |
|
333 |
assume "\<exists>i. f i = 0" |
|
334 |
then obtain i where "f i = 0" by auto |
|
335 |
moreover with M have "i < M" by (cases "i < M") auto |
|
336 |
ultimately have "(\<Prod>i<M. f i) = 0" by auto |
|
337 |
with lim show "(\<lambda>n. \<Prod>i\<le>n. f i) \<longlonglongrightarrow> 0" by simp |
|
338 |
next |
|
339 |
assume "(\<lambda>n. \<Prod>i\<le>n. f i) \<longlonglongrightarrow> 0" |
|
340 |
from tendsto_unique[OF _ this lim] and \<open>L \<noteq> 0\<close> |
|
341 |
show "\<exists>i. f i = 0" by auto |
|
342 |
qed |
|
343 |
qed |
|
344 |
||
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
345 |
lemma convergent_prod_iff_nz_lim: |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
346 |
fixes f :: "nat \<Rightarrow> 'a :: {topological_semigroup_mult,t2_space,idom}" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
347 |
assumes "\<And>i. f i \<noteq> 0" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
348 |
shows "convergent_prod f \<longleftrightarrow> (\<exists>L. (\<lambda>n. \<Prod>i\<le>n. f i) \<longlonglongrightarrow> L \<and> L \<noteq> 0)" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
349 |
(is "?lhs \<longleftrightarrow> ?rhs") |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
350 |
proof |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
351 |
assume ?lhs then show ?rhs |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
352 |
using assms convergentD convergent_prod_imp_convergent convergent_prod_to_zero_iff by blast |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
353 |
next |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
354 |
assume ?rhs then show ?lhs |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
355 |
unfolding prod_defs |
68138 | 356 |
by (rule_tac x=0 in exI) auto |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
357 |
qed |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
358 |
|
70136 | 359 |
lemma\<^marker>\<open>tag important\<close> convergent_prod_iff_convergent: |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
360 |
fixes f :: "nat \<Rightarrow> 'a :: {topological_semigroup_mult,t2_space,idom}" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
361 |
assumes "\<And>i. f i \<noteq> 0" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
362 |
shows "convergent_prod f \<longleftrightarrow> convergent (\<lambda>n. \<Prod>i\<le>n. f i) \<and> lim (\<lambda>n. \<Prod>i\<le>n. f i) \<noteq> 0" |
68138 | 363 |
by (force simp: convergent_prod_iff_nz_lim assms convergent_def limI) |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
364 |
|
68527
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
365 |
lemma bounded_imp_convergent_prod: |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
366 |
fixes a :: "nat \<Rightarrow> real" |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
367 |
assumes 1: "\<And>n. a n \<ge> 1" and bounded: "\<And>n. (\<Prod>i\<le>n. a i) \<le> B" |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
368 |
shows "convergent_prod a" |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
369 |
proof - |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
370 |
have "bdd_above (range(\<lambda>n. \<Prod>i\<le>n. a i))" |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
371 |
by (meson bdd_aboveI2 bounded) |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
372 |
moreover have "incseq (\<lambda>n. \<Prod>i\<le>n. a i)" |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
373 |
unfolding mono_def by (metis 1 prod_mono2 atMost_subset_iff dual_order.trans finite_atMost zero_le_one) |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
374 |
ultimately obtain p where p: "(\<lambda>n. \<Prod>i\<le>n. a i) \<longlonglongrightarrow> p" |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
375 |
using LIMSEQ_incseq_SUP by blast |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
376 |
then have "p \<noteq> 0" |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
377 |
by (metis "1" not_one_le_zero prod_ge_1 LIMSEQ_le_const) |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
378 |
with 1 p show ?thesis |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
379 |
by (metis convergent_prod_iff_nz_lim not_one_le_zero) |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
380 |
qed |
2f4e2aab190a
Generalising and renaming some basic results
paulson <lp15@cam.ac.uk>
parents:
68517
diff
changeset
|
381 |
|
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
382 |
|
66277 | 383 |
lemma abs_convergent_prod_altdef: |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
384 |
fixes f :: "nat \<Rightarrow> 'a :: {one,real_normed_vector}" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
385 |
shows "abs_convergent_prod f \<longleftrightarrow> convergent (\<lambda>n. \<Prod>i\<le>n. 1 + norm (f i - 1))" |
66277 | 386 |
proof |
387 |
assume "abs_convergent_prod f" |
|
388 |
thus "convergent (\<lambda>n. \<Prod>i\<le>n. 1 + norm (f i - 1))" |
|
389 |
by (auto simp: abs_convergent_prod_def intro!: convergent_prod_imp_convergent) |
|
390 |
qed (auto intro: abs_convergent_prodI) |
|
391 |
||
69529 | 392 |
lemma Weierstrass_prod_ineq: |
66277 | 393 |
fixes f :: "'a \<Rightarrow> real" |
394 |
assumes "\<And>x. x \<in> A \<Longrightarrow> f x \<in> {0..1}" |
|
395 |
shows "1 - sum f A \<le> (\<Prod>x\<in>A. 1 - f x)" |
|
396 |
using assms |
|
397 |
proof (induction A rule: infinite_finite_induct) |
|
398 |
case (insert x A) |
|
399 |
from insert.hyps and insert.prems |
|
400 |
have "1 - sum f A + f x * (\<Prod>x\<in>A. 1 - f x) \<le> (\<Prod>x\<in>A. 1 - f x) + f x * (\<Prod>x\<in>A. 1)" |
|
401 |
by (intro insert.IH add_mono mult_left_mono prod_mono) auto |
|
402 |
with insert.hyps show ?case by (simp add: algebra_simps) |
|
403 |
qed simp_all |
|
404 |
||
405 |
lemma norm_prod_minus1_le_prod_minus1: |
|
406 |
fixes f :: "nat \<Rightarrow> 'a :: {real_normed_div_algebra,comm_ring_1}" |
|
407 |
shows "norm (prod (\<lambda>n. 1 + f n) A - 1) \<le> prod (\<lambda>n. 1 + norm (f n)) A - 1" |
|
408 |
proof (induction A rule: infinite_finite_induct) |
|
409 |
case (insert x A) |
|
410 |
from insert.hyps have |
|
411 |
"norm ((\<Prod>n\<in>insert x A. 1 + f n) - 1) = |
|
412 |
norm ((\<Prod>n\<in>A. 1 + f n) - 1 + f x * (\<Prod>n\<in>A. 1 + f n))" |
|
413 |
by (simp add: algebra_simps) |
|
414 |
also have "\<dots> \<le> norm ((\<Prod>n\<in>A. 1 + f n) - 1) + norm (f x * (\<Prod>n\<in>A. 1 + f n))" |
|
415 |
by (rule norm_triangle_ineq) |
|
416 |
also have "norm (f x * (\<Prod>n\<in>A. 1 + f n)) = norm (f x) * (\<Prod>x\<in>A. norm (1 + f x))" |
|
417 |
by (simp add: prod_norm norm_mult) |
|
418 |
also have "(\<Prod>x\<in>A. norm (1 + f x)) \<le> (\<Prod>x\<in>A. norm (1::'a) + norm (f x))" |
|
419 |
by (intro prod_mono norm_triangle_ineq ballI conjI) auto |
|
420 |
also have "norm (1::'a) = 1" by simp |
|
421 |
also note insert.IH |
|
422 |
also have "(\<Prod>n\<in>A. 1 + norm (f n)) - 1 + norm (f x) * (\<Prod>x\<in>A. 1 + norm (f x)) = |
|
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
423 |
(\<Prod>n\<in>insert x A. 1 + norm (f n)) - 1" |
66277 | 424 |
using insert.hyps by (simp add: algebra_simps) |
425 |
finally show ?case by - (simp_all add: mult_left_mono) |
|
426 |
qed simp_all |
|
427 |
||
428 |
lemma convergent_prod_imp_ev_nonzero: |
|
429 |
fixes f :: "nat \<Rightarrow> 'a :: {t2_space,comm_semiring_1}" |
|
430 |
assumes "convergent_prod f" |
|
431 |
shows "eventually (\<lambda>n. f n \<noteq> 0) sequentially" |
|
432 |
using assms by (auto simp: eventually_at_top_linorder convergent_prod_altdef) |
|
433 |
||
434 |
lemma convergent_prod_imp_LIMSEQ: |
|
435 |
fixes f :: "nat \<Rightarrow> 'a :: {real_normed_field}" |
|
436 |
assumes "convergent_prod f" |
|
437 |
shows "f \<longlonglongrightarrow> 1" |
|
438 |
proof - |
|
439 |
from assms obtain M L where L: "(\<lambda>n. \<Prod>i\<le>n. f (i+M)) \<longlonglongrightarrow> L" "\<And>n. n \<ge> M \<Longrightarrow> f n \<noteq> 0" "L \<noteq> 0" |
|
440 |
by (auto simp: convergent_prod_altdef) |
|
441 |
hence L': "(\<lambda>n. \<Prod>i\<le>Suc n. f (i+M)) \<longlonglongrightarrow> L" by (subst filterlim_sequentially_Suc) |
|
442 |
have "(\<lambda>n. (\<Prod>i\<le>Suc n. f (i+M)) / (\<Prod>i\<le>n. f (i+M))) \<longlonglongrightarrow> L / L" |
|
443 |
using L L' by (intro tendsto_divide) simp_all |
|
444 |
also from L have "L / L = 1" by simp |
|
445 |
also have "(\<lambda>n. (\<Prod>i\<le>Suc n. f (i+M)) / (\<Prod>i\<le>n. f (i+M))) = (\<lambda>n. f (n + Suc M))" |
|
446 |
using assms L by (auto simp: fun_eq_iff atMost_Suc) |
|
447 |
finally show ?thesis by (rule LIMSEQ_offset) |
|
448 |
qed |
|
449 |
||
450 |
lemma abs_convergent_prod_imp_summable: |
|
451 |
fixes f :: "nat \<Rightarrow> 'a :: real_normed_div_algebra" |
|
452 |
assumes "abs_convergent_prod f" |
|
453 |
shows "summable (\<lambda>i. norm (f i - 1))" |
|
454 |
proof - |
|
455 |
from assms have "convergent (\<lambda>n. \<Prod>i\<le>n. 1 + norm (f i - 1))" |
|
456 |
unfolding abs_convergent_prod_def by (rule convergent_prod_imp_convergent) |
|
457 |
then obtain L where L: "(\<lambda>n. \<Prod>i\<le>n. 1 + norm (f i - 1)) \<longlonglongrightarrow> L" |
|
458 |
unfolding convergent_def by blast |
|
459 |
have "convergent (\<lambda>n. \<Sum>i\<le>n. norm (f i - 1))" |
|
460 |
proof (rule Bseq_monoseq_convergent) |
|
461 |
have "eventually (\<lambda>n. (\<Prod>i\<le>n. 1 + norm (f i - 1)) < L + 1) sequentially" |
|
462 |
using L(1) by (rule order_tendstoD) simp_all |
|
463 |
hence "\<forall>\<^sub>F x in sequentially. norm (\<Sum>i\<le>x. norm (f i - 1)) \<le> L + 1" |
|
464 |
proof eventually_elim |
|
465 |
case (elim n) |
|
466 |
have "norm (\<Sum>i\<le>n. norm (f i - 1)) = (\<Sum>i\<le>n. norm (f i - 1))" |
|
467 |
unfolding real_norm_def by (intro abs_of_nonneg sum_nonneg) simp_all |
|
468 |
also have "\<dots> \<le> (\<Prod>i\<le>n. 1 + norm (f i - 1))" by (rule sum_le_prod) auto |
|
469 |
also have "\<dots> < L + 1" by (rule elim) |
|
470 |
finally show ?case by simp |
|
471 |
qed |
|
472 |
thus "Bseq (\<lambda>n. \<Sum>i\<le>n. norm (f i - 1))" by (rule BfunI) |
|
473 |
next |
|
474 |
show "monoseq (\<lambda>n. \<Sum>i\<le>n. norm (f i - 1))" |
|
475 |
by (rule mono_SucI1) auto |
|
476 |
qed |
|
477 |
thus "summable (\<lambda>i. norm (f i - 1))" by (simp add: summable_iff_convergent') |
|
478 |
qed |
|
479 |
||
480 |
lemma summable_imp_abs_convergent_prod: |
|
481 |
fixes f :: "nat \<Rightarrow> 'a :: real_normed_div_algebra" |
|
482 |
assumes "summable (\<lambda>i. norm (f i - 1))" |
|
483 |
shows "abs_convergent_prod f" |
|
484 |
proof (intro abs_convergent_prodI Bseq_monoseq_convergent) |
|
485 |
show "monoseq (\<lambda>n. \<Prod>i\<le>n. 1 + norm (f i - 1))" |
|
486 |
by (intro mono_SucI1) |
|
487 |
(auto simp: atMost_Suc algebra_simps intro!: mult_nonneg_nonneg prod_nonneg) |
|
488 |
next |
|
489 |
show "Bseq (\<lambda>n. \<Prod>i\<le>n. 1 + norm (f i - 1))" |
|
490 |
proof (rule Bseq_eventually_mono) |
|
491 |
show "eventually (\<lambda>n. norm (\<Prod>i\<le>n. 1 + norm (f i - 1)) \<le> |
|
492 |
norm (exp (\<Sum>i\<le>n. norm (f i - 1)))) sequentially" |
|
493 |
by (intro always_eventually allI) (auto simp: abs_prod exp_sum intro!: prod_mono) |
|
494 |
next |
|
495 |
from assms have "(\<lambda>n. \<Sum>i\<le>n. norm (f i - 1)) \<longlonglongrightarrow> (\<Sum>i. norm (f i - 1))" |
|
496 |
using sums_def_le by blast |
|
497 |
hence "(\<lambda>n. exp (\<Sum>i\<le>n. norm (f i - 1))) \<longlonglongrightarrow> exp (\<Sum>i. norm (f i - 1))" |
|
498 |
by (rule tendsto_exp) |
|
499 |
hence "convergent (\<lambda>n. exp (\<Sum>i\<le>n. norm (f i - 1)))" |
|
500 |
by (rule convergentI) |
|
501 |
thus "Bseq (\<lambda>n. exp (\<Sum>i\<le>n. norm (f i - 1)))" |
|
502 |
by (rule convergent_imp_Bseq) |
|
503 |
qed |
|
504 |
qed |
|
505 |
||
68651 | 506 |
theorem abs_convergent_prod_conv_summable: |
66277 | 507 |
fixes f :: "nat \<Rightarrow> 'a :: real_normed_div_algebra" |
508 |
shows "abs_convergent_prod f \<longleftrightarrow> summable (\<lambda>i. norm (f i - 1))" |
|
509 |
by (blast intro: abs_convergent_prod_imp_summable summable_imp_abs_convergent_prod) |
|
510 |
||
511 |
lemma abs_convergent_prod_imp_LIMSEQ: |
|
512 |
fixes f :: "nat \<Rightarrow> 'a :: {comm_ring_1,real_normed_div_algebra}" |
|
513 |
assumes "abs_convergent_prod f" |
|
514 |
shows "f \<longlonglongrightarrow> 1" |
|
515 |
proof - |
|
516 |
from assms have "summable (\<lambda>n. norm (f n - 1))" |
|
517 |
by (rule abs_convergent_prod_imp_summable) |
|
518 |
from summable_LIMSEQ_zero[OF this] have "(\<lambda>n. f n - 1) \<longlonglongrightarrow> 0" |
|
519 |
by (simp add: tendsto_norm_zero_iff) |
|
520 |
from tendsto_add[OF this tendsto_const[of 1]] show ?thesis by simp |
|
521 |
qed |
|
522 |
||
523 |
lemma abs_convergent_prod_imp_ev_nonzero: |
|
524 |
fixes f :: "nat \<Rightarrow> 'a :: {comm_ring_1,real_normed_div_algebra}" |
|
525 |
assumes "abs_convergent_prod f" |
|
526 |
shows "eventually (\<lambda>n. f n \<noteq> 0) sequentially" |
|
527 |
proof - |
|
528 |
from assms have "f \<longlonglongrightarrow> 1" |
|
529 |
by (rule abs_convergent_prod_imp_LIMSEQ) |
|
530 |
hence "eventually (\<lambda>n. dist (f n) 1 < 1) at_top" |
|
531 |
by (auto simp: tendsto_iff) |
|
532 |
thus ?thesis by eventually_elim auto |
|
533 |
qed |
|
534 |
||
70136 | 535 |
subsection\<^marker>\<open>tag unimportant\<close> \<open>Ignoring initial segments\<close> |
68651 | 536 |
|
66277 | 537 |
lemma convergent_prod_offset: |
538 |
assumes "convergent_prod (\<lambda>n. f (n + m))" |
|
539 |
shows "convergent_prod f" |
|
540 |
proof - |
|
541 |
from assms obtain M L where "(\<lambda>n. \<Prod>k\<le>n. f (k + (M + m))) \<longlonglongrightarrow> L" "L \<noteq> 0" |
|
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
542 |
by (auto simp: prod_defs add.assoc) |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
543 |
thus "convergent_prod f" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
544 |
unfolding prod_defs by blast |
66277 | 545 |
qed |
546 |
||
547 |
lemma abs_convergent_prod_offset: |
|
548 |
assumes "abs_convergent_prod (\<lambda>n. f (n + m))" |
|
549 |
shows "abs_convergent_prod f" |
|
550 |
using assms unfolding abs_convergent_prod_def by (rule convergent_prod_offset) |
|
551 |
||
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
552 |
|
68361 | 553 |
lemma raw_has_prod_ignore_initial_segment: |
554 |
fixes f :: "nat \<Rightarrow> 'a :: real_normed_field" |
|
555 |
assumes "raw_has_prod f M p" "N \<ge> M" |
|
556 |
obtains q where "raw_has_prod f N q" |
|
66277 | 557 |
proof - |
68361 | 558 |
have p: "(\<lambda>n. \<Prod>k\<le>n. f (k + M)) \<longlonglongrightarrow> p" and "p \<noteq> 0" |
559 |
using assms by (auto simp: raw_has_prod_def) |
|
560 |
then have nz: "\<And>n. n \<ge> M \<Longrightarrow> f n \<noteq> 0" |
|
561 |
using assms by (auto simp: raw_has_prod_eq_0) |
|
562 |
define C where "C = (\<Prod>k<N-M. f (k + M))" |
|
66277 | 563 |
from nz have [simp]: "C \<noteq> 0" |
564 |
by (auto simp: C_def) |
|
565 |
||
68361 | 566 |
from p have "(\<lambda>i. \<Prod>k\<le>i + (N-M). f (k + M)) \<longlonglongrightarrow> p" |
66277 | 567 |
by (rule LIMSEQ_ignore_initial_segment) |
68361 | 568 |
also have "(\<lambda>i. \<Prod>k\<le>i + (N-M). f (k + M)) = (\<lambda>n. C * (\<Prod>k\<le>n. f (k + N)))" |
66277 | 569 |
proof (rule ext, goal_cases) |
570 |
case (1 n) |
|
68361 | 571 |
have "{..n+(N-M)} = {..<(N-M)} \<union> {(N-M)..n+(N-M)}" by auto |
572 |
also have "(\<Prod>k\<in>\<dots>. f (k + M)) = C * (\<Prod>k=(N-M)..n+(N-M). f (k + M))" |
|
66277 | 573 |
unfolding C_def by (rule prod.union_disjoint) auto |
68361 | 574 |
also have "(\<Prod>k=(N-M)..n+(N-M). f (k + M)) = (\<Prod>k\<le>n. f (k + (N-M) + M))" |
575 |
by (intro ext prod.reindex_bij_witness[of _ "\<lambda>k. k + (N-M)" "\<lambda>k. k - (N-M)"]) auto |
|
576 |
finally show ?case |
|
577 |
using \<open>N \<ge> M\<close> by (simp add: add_ac) |
|
66277 | 578 |
qed |
68361 | 579 |
finally have "(\<lambda>n. C * (\<Prod>k\<le>n. f (k + N)) / C) \<longlonglongrightarrow> p / C" |
66277 | 580 |
by (intro tendsto_divide tendsto_const) auto |
68361 | 581 |
hence "(\<lambda>n. \<Prod>k\<le>n. f (k + N)) \<longlonglongrightarrow> p / C" by simp |
582 |
moreover from \<open>p \<noteq> 0\<close> have "p / C \<noteq> 0" by simp |
|
583 |
ultimately show ?thesis |
|
584 |
using raw_has_prod_def that by blast |
|
66277 | 585 |
qed |
586 |
||
70136 | 587 |
corollary\<^marker>\<open>tag unimportant\<close> convergent_prod_ignore_initial_segment: |
68361 | 588 |
fixes f :: "nat \<Rightarrow> 'a :: real_normed_field" |
589 |
assumes "convergent_prod f" |
|
590 |
shows "convergent_prod (\<lambda>n. f (n + m))" |
|
591 |
using assms |
|
592 |
unfolding convergent_prod_def |
|
593 |
apply clarify |
|
594 |
apply (erule_tac N="M+m" in raw_has_prod_ignore_initial_segment) |
|
595 |
apply (auto simp add: raw_has_prod_def add_ac) |
|
596 |
done |
|
597 |
||
70136 | 598 |
corollary\<^marker>\<open>tag unimportant\<close> convergent_prod_ignore_nonzero_segment: |
68136 | 599 |
fixes f :: "nat \<Rightarrow> 'a :: real_normed_field" |
600 |
assumes f: "convergent_prod f" and nz: "\<And>i. i \<ge> M \<Longrightarrow> f i \<noteq> 0" |
|
68361 | 601 |
shows "\<exists>p. raw_has_prod f M p" |
68136 | 602 |
using convergent_prod_ignore_initial_segment [OF f] |
603 |
by (metis convergent_LIMSEQ_iff convergent_prod_iff_convergent le_add_same_cancel2 nz prod_defs(1) zero_order(1)) |
|
604 |
||
70136 | 605 |
corollary\<^marker>\<open>tag unimportant\<close> abs_convergent_prod_ignore_initial_segment: |
66277 | 606 |
assumes "abs_convergent_prod f" |
607 |
shows "abs_convergent_prod (\<lambda>n. f (n + m))" |
|
608 |
using assms unfolding abs_convergent_prod_def |
|
609 |
by (rule convergent_prod_ignore_initial_segment) |
|
610 |
||
68651 | 611 |
subsection\<open>More elementary properties\<close> |
612 |
||
613 |
theorem abs_convergent_prod_imp_convergent_prod: |
|
66277 | 614 |
fixes f :: "nat \<Rightarrow> 'a :: {real_normed_div_algebra,complete_space,comm_ring_1}" |
615 |
assumes "abs_convergent_prod f" |
|
616 |
shows "convergent_prod f" |
|
617 |
proof - |
|
618 |
from assms have "eventually (\<lambda>n. f n \<noteq> 0) sequentially" |
|
619 |
by (rule abs_convergent_prod_imp_ev_nonzero) |
|
620 |
then obtain N where N: "f n \<noteq> 0" if "n \<ge> N" for n |
|
621 |
by (auto simp: eventually_at_top_linorder) |
|
622 |
let ?P = "\<lambda>n. \<Prod>i\<le>n. f (i + N)" and ?Q = "\<lambda>n. \<Prod>i\<le>n. 1 + norm (f (i + N) - 1)" |
|
623 |
||
624 |
have "Cauchy ?P" |
|
625 |
proof (rule CauchyI', goal_cases) |
|
626 |
case (1 \<epsilon>) |
|
627 |
from assms have "abs_convergent_prod (\<lambda>n. f (n + N))" |
|
628 |
by (rule abs_convergent_prod_ignore_initial_segment) |
|
629 |
hence "Cauchy ?Q" |
|
630 |
unfolding abs_convergent_prod_def |
|
631 |
by (intro convergent_Cauchy convergent_prod_imp_convergent) |
|
632 |
from CauchyD[OF this 1] obtain M where M: "norm (?Q m - ?Q n) < \<epsilon>" if "m \<ge> M" "n \<ge> M" for m n |
|
633 |
by blast |
|
634 |
show ?case |
|
635 |
proof (rule exI[of _ M], safe, goal_cases) |
|
636 |
case (1 m n) |
|
637 |
have "dist (?P m) (?P n) = norm (?P n - ?P m)" |
|
638 |
by (simp add: dist_norm norm_minus_commute) |
|
639 |
also from 1 have "{..n} = {..m} \<union> {m<..n}" by auto |
|
640 |
hence "norm (?P n - ?P m) = norm (?P m * (\<Prod>k\<in>{m<..n}. f (k + N)) - ?P m)" |
|
641 |
by (subst prod.union_disjoint [symmetric]) (auto simp: algebra_simps) |
|
642 |
also have "\<dots> = norm (?P m * ((\<Prod>k\<in>{m<..n}. f (k + N)) - 1))" |
|
643 |
by (simp add: algebra_simps) |
|
644 |
also have "\<dots> = (\<Prod>k\<le>m. norm (f (k + N))) * norm ((\<Prod>k\<in>{m<..n}. f (k + N)) - 1)" |
|
645 |
by (simp add: norm_mult prod_norm) |
|
646 |
also have "\<dots> \<le> ?Q m * ((\<Prod>k\<in>{m<..n}. 1 + norm (f (k + N) - 1)) - 1)" |
|
647 |
using norm_prod_minus1_le_prod_minus1[of "\<lambda>k. f (k + N) - 1" "{m<..n}"] |
|
648 |
norm_triangle_ineq[of 1 "f k - 1" for k] |
|
649 |
by (intro mult_mono prod_mono ballI conjI norm_prod_minus1_le_prod_minus1 prod_nonneg) auto |
|
650 |
also have "\<dots> = ?Q m * (\<Prod>k\<in>{m<..n}. 1 + norm (f (k + N) - 1)) - ?Q m" |
|
651 |
by (simp add: algebra_simps) |
|
652 |
also have "?Q m * (\<Prod>k\<in>{m<..n}. 1 + norm (f (k + N) - 1)) = |
|
653 |
(\<Prod>k\<in>{..m}\<union>{m<..n}. 1 + norm (f (k + N) - 1))" |
|
654 |
by (rule prod.union_disjoint [symmetric]) auto |
|
655 |
also from 1 have "{..m}\<union>{m<..n} = {..n}" by auto |
|
656 |
also have "?Q n - ?Q m \<le> norm (?Q n - ?Q m)" by simp |
|
657 |
also from 1 have "\<dots> < \<epsilon>" by (intro M) auto |
|
658 |
finally show ?case . |
|
659 |
qed |
|
660 |
qed |
|
661 |
hence conv: "convergent ?P" by (rule Cauchy_convergent) |
|
662 |
then obtain L where L: "?P \<longlonglongrightarrow> L" |
|
663 |
by (auto simp: convergent_def) |
|
664 |
||
665 |
have "L \<noteq> 0" |
|
666 |
proof |
|
667 |
assume [simp]: "L = 0" |
|
668 |
from tendsto_norm[OF L] have limit: "(\<lambda>n. \<Prod>k\<le>n. norm (f (k + N))) \<longlonglongrightarrow> 0" |
|
669 |
by (simp add: prod_norm) |
|
670 |
||
671 |
from assms have "(\<lambda>n. f (n + N)) \<longlonglongrightarrow> 1" |
|
672 |
by (intro abs_convergent_prod_imp_LIMSEQ abs_convergent_prod_ignore_initial_segment) |
|
673 |
hence "eventually (\<lambda>n. norm (f (n + N) - 1) < 1) sequentially" |
|
674 |
by (auto simp: tendsto_iff dist_norm) |
|
675 |
then obtain M0 where M0: "norm (f (n + N) - 1) < 1" if "n \<ge> M0" for n |
|
676 |
by (auto simp: eventually_at_top_linorder) |
|
677 |
||
678 |
{ |
|
679 |
fix M assume M: "M \<ge> M0" |
|
680 |
with M0 have M: "norm (f (n + N) - 1) < 1" if "n \<ge> M" for n using that by simp |
|
681 |
||
682 |
have "(\<lambda>n. \<Prod>k\<le>n. 1 - norm (f (k+M+N) - 1)) \<longlonglongrightarrow> 0" |
|
683 |
proof (rule tendsto_sandwich) |
|
684 |
show "eventually (\<lambda>n. (\<Prod>k\<le>n. 1 - norm (f (k+M+N) - 1)) \<ge> 0) sequentially" |
|
685 |
using M by (intro always_eventually prod_nonneg allI ballI) (auto intro: less_imp_le) |
|
686 |
have "norm (1::'a) - norm (f (i + M + N) - 1) \<le> norm (f (i + M + N))" for i |
|
687 |
using norm_triangle_ineq3[of "f (i + M + N)" 1] by simp |
|
688 |
thus "eventually (\<lambda>n. (\<Prod>k\<le>n. 1 - norm (f (k+M+N) - 1)) \<le> (\<Prod>k\<le>n. norm (f (k+M+N)))) at_top" |
|
689 |
using M by (intro always_eventually allI prod_mono ballI conjI) (auto intro: less_imp_le) |
|
690 |
||
691 |
define C where "C = (\<Prod>k<M. norm (f (k + N)))" |
|
692 |
from N have [simp]: "C \<noteq> 0" by (auto simp: C_def) |
|
693 |
from L have "(\<lambda>n. norm (\<Prod>k\<le>n+M. f (k + N))) \<longlonglongrightarrow> 0" |
|
694 |
by (intro LIMSEQ_ignore_initial_segment) (simp add: tendsto_norm_zero_iff) |
|
695 |
also have "(\<lambda>n. norm (\<Prod>k\<le>n+M. f (k + N))) = (\<lambda>n. C * (\<Prod>k\<le>n. norm (f (k + M + N))))" |
|
696 |
proof (rule ext, goal_cases) |
|
697 |
case (1 n) |
|
698 |
have "{..n+M} = {..<M} \<union> {M..n+M}" by auto |
|
699 |
also have "norm (\<Prod>k\<in>\<dots>. f (k + N)) = C * norm (\<Prod>k=M..n+M. f (k + N))" |
|
700 |
unfolding C_def by (subst prod.union_disjoint) (auto simp: norm_mult prod_norm) |
|
701 |
also have "(\<Prod>k=M..n+M. f (k + N)) = (\<Prod>k\<le>n. f (k + N + M))" |
|
702 |
by (intro prod.reindex_bij_witness[of _ "\<lambda>i. i + M" "\<lambda>i. i - M"]) auto |
|
703 |
finally show ?case by (simp add: add_ac prod_norm) |
|
704 |
qed |
|
705 |
finally have "(\<lambda>n. C * (\<Prod>k\<le>n. norm (f (k + M + N))) / C) \<longlonglongrightarrow> 0 / C" |
|
706 |
by (intro tendsto_divide tendsto_const) auto |
|
707 |
thus "(\<lambda>n. \<Prod>k\<le>n. norm (f (k + M + N))) \<longlonglongrightarrow> 0" by simp |
|
708 |
qed simp_all |
|
709 |
||
710 |
have "1 - (\<Sum>i. norm (f (i + M + N) - 1)) \<le> 0" |
|
711 |
proof (rule tendsto_le) |
|
712 |
show "eventually (\<lambda>n. 1 - (\<Sum>k\<le>n. norm (f (k+M+N) - 1)) \<le> |
|
713 |
(\<Prod>k\<le>n. 1 - norm (f (k+M+N) - 1))) at_top" |
|
69529 | 714 |
using M by (intro always_eventually allI Weierstrass_prod_ineq) (auto intro: less_imp_le) |
66277 | 715 |
show "(\<lambda>n. \<Prod>k\<le>n. 1 - norm (f (k+M+N) - 1)) \<longlonglongrightarrow> 0" by fact |
716 |
show "(\<lambda>n. 1 - (\<Sum>k\<le>n. norm (f (k + M + N) - 1))) |
|
717 |
\<longlonglongrightarrow> 1 - (\<Sum>i. norm (f (i + M + N) - 1))" |
|
718 |
by (intro tendsto_intros summable_LIMSEQ' summable_ignore_initial_segment |
|
719 |
abs_convergent_prod_imp_summable assms) |
|
720 |
qed simp_all |
|
721 |
hence "(\<Sum>i. norm (f (i + M + N) - 1)) \<ge> 1" by simp |
|
722 |
also have "\<dots> + (\<Sum>i<M. norm (f (i + N) - 1)) = (\<Sum>i. norm (f (i + N) - 1))" |
|
723 |
by (intro suminf_split_initial_segment [symmetric] summable_ignore_initial_segment |
|
724 |
abs_convergent_prod_imp_summable assms) |
|
725 |
finally have "1 + (\<Sum>i<M. norm (f (i + N) - 1)) \<le> (\<Sum>i. norm (f (i + N) - 1))" by simp |
|
726 |
} note * = this |
|
727 |
||
728 |
have "1 + (\<Sum>i. norm (f (i + N) - 1)) \<le> (\<Sum>i. norm (f (i + N) - 1))" |
|
729 |
proof (rule tendsto_le) |
|
730 |
show "(\<lambda>M. 1 + (\<Sum>i<M. norm (f (i + N) - 1))) \<longlonglongrightarrow> 1 + (\<Sum>i. norm (f (i + N) - 1))" |
|
731 |
by (intro tendsto_intros summable_LIMSEQ summable_ignore_initial_segment |
|
732 |
abs_convergent_prod_imp_summable assms) |
|
733 |
show "eventually (\<lambda>M. 1 + (\<Sum>i<M. norm (f (i + N) - 1)) \<le> (\<Sum>i. norm (f (i + N) - 1))) at_top" |
|
734 |
using eventually_ge_at_top[of M0] by eventually_elim (use * in auto) |
|
735 |
qed simp_all |
|
736 |
thus False by simp |
|
737 |
qed |
|
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
738 |
with L show ?thesis by (auto simp: prod_defs) |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
739 |
qed |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
740 |
|
68361 | 741 |
lemma raw_has_prod_cases: |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
742 |
fixes f :: "nat \<Rightarrow> 'a :: {idom,topological_semigroup_mult,t2_space}" |
68361 | 743 |
assumes "raw_has_prod f M p" |
744 |
obtains i where "i<M" "f i = 0" | p where "raw_has_prod f 0 p" |
|
68136 | 745 |
proof - |
746 |
have "(\<lambda>n. \<Prod>i\<le>n. f (i + M)) \<longlonglongrightarrow> p" "p \<noteq> 0" |
|
68361 | 747 |
using assms unfolding raw_has_prod_def by blast+ |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
748 |
then have "(\<lambda>n. prod f {..<M} * (\<Prod>i\<le>n. f (i + M))) \<longlonglongrightarrow> prod f {..<M} * p" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
749 |
by (metis tendsto_mult_left) |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
750 |
moreover have "prod f {..<M} * (\<Prod>i\<le>n. f (i + M)) = prod f {..n+M}" for n |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
751 |
proof - |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
752 |
have "{..n+M} = {..<M} \<union> {M..n+M}" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
753 |
by auto |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
754 |
then have "prod f {..n+M} = prod f {..<M} * prod f {M..n+M}" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
755 |
by simp (subst prod.union_disjoint; force) |
68138 | 756 |
also have "\<dots> = prod f {..<M} * (\<Prod>i\<le>n. f (i + M))" |
70113
c8deb8ba6d05
Fixing the main Homology theory; also moving a lot of sum/prod lemmas into their generic context
paulson <lp15@cam.ac.uk>
parents:
69565
diff
changeset
|
757 |
by (metis (mono_tags, lifting) add.left_neutral atMost_atLeast0 prod.shift_bounds_cl_nat_ivl) |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
758 |
finally show ?thesis by metis |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
759 |
qed |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
760 |
ultimately have "(\<lambda>n. prod f {..n}) \<longlonglongrightarrow> prod f {..<M} * p" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
761 |
by (auto intro: LIMSEQ_offset [where k=M]) |
68361 | 762 |
then have "raw_has_prod f 0 (prod f {..<M} * p)" if "\<forall>i<M. f i \<noteq> 0" |
763 |
using \<open>p \<noteq> 0\<close> assms that by (auto simp: raw_has_prod_def) |
|
68136 | 764 |
then show thesis |
765 |
using that by blast |
|
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
766 |
qed |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
767 |
|
68136 | 768 |
corollary convergent_prod_offset_0: |
769 |
fixes f :: "nat \<Rightarrow> 'a :: {idom,topological_semigroup_mult,t2_space}" |
|
770 |
assumes "convergent_prod f" "\<And>i. f i \<noteq> 0" |
|
68361 | 771 |
shows "\<exists>p. raw_has_prod f 0 p" |
772 |
using assms convergent_prod_def raw_has_prod_cases by blast |
|
68136 | 773 |
|
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
774 |
lemma prodinf_eq_lim: |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
775 |
fixes f :: "nat \<Rightarrow> 'a :: {idom,topological_semigroup_mult,t2_space}" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
776 |
assumes "convergent_prod f" "\<And>i. f i \<noteq> 0" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
777 |
shows "prodinf f = lim (\<lambda>n. \<Prod>i\<le>n. f i)" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
778 |
using assms convergent_prod_offset_0 [OF assms] |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
779 |
by (simp add: prod_defs lim_def) (metis (no_types) assms(1) convergent_prod_to_zero_iff) |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
780 |
|
76724
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
781 |
lemma prodinf_eq_lim': |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
782 |
fixes f :: "nat \<Rightarrow> 'a :: {idom,topological_semigroup_mult,t2_space}" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
783 |
assumes "convergent_prod f" "\<And>i. f i \<noteq> 0" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
784 |
shows "prodinf f = lim (\<lambda>n. \<Prod>i<n. f i)" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
785 |
by (metis assms prodinf_eq_lim LIMSEQ_lessThan_iff_atMost convergent_prod_iff_nz_lim limI) |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
786 |
|
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
787 |
lemma prodinf_eq_prod_lim: |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
788 |
fixes a:: "'a :: {topological_semigroup_mult,t2_space,idom}" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
789 |
assumes "(\<lambda>n. \<Prod>k\<le>n. f k) \<longlonglongrightarrow> a" "a \<noteq> 0" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
790 |
shows"(\<Prod>k. f k) = a" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
791 |
by (metis LIMSEQ_prod_0 LIMSEQ_unique assms convergent_prod_iff_nz_lim limI prodinf_eq_lim) |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
792 |
|
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
793 |
lemma prodinf_eq_prod_lim': |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
794 |
fixes a:: "'a :: {topological_semigroup_mult,t2_space,idom}" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
795 |
assumes "(\<lambda>n. \<Prod>k<n. f k) \<longlonglongrightarrow> a" "a \<noteq> 0" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
796 |
shows"(\<Prod>k. f k) = a" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
797 |
using LIMSEQ_lessThan_iff_atMost assms prodinf_eq_prod_lim by blast |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
798 |
|
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
799 |
lemma has_prod_one[simp, intro]: "(\<lambda>n. 1) has_prod 1" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
800 |
unfolding prod_defs by auto |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
801 |
|
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
802 |
lemma convergent_prod_one[simp, intro]: "convergent_prod (\<lambda>n. 1)" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
803 |
unfolding prod_defs by auto |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
804 |
|
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
805 |
lemma prodinf_cong: "(\<And>n. f n = g n) \<Longrightarrow> prodinf f = prodinf g" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
806 |
by presburger |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
807 |
|
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
808 |
lemma convergent_prod_cong: |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
809 |
fixes f g :: "nat \<Rightarrow> 'a::{field,topological_semigroup_mult,t2_space}" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
810 |
assumes ev: "eventually (\<lambda>x. f x = g x) sequentially" and f: "\<And>i. f i \<noteq> 0" and g: "\<And>i. g i \<noteq> 0" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
811 |
shows "convergent_prod f = convergent_prod g" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
812 |
proof - |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
813 |
from assms obtain N where N: "\<forall>n\<ge>N. f n = g n" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
814 |
by (auto simp: eventually_at_top_linorder) |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
815 |
define C where "C = (\<Prod>k<N. f k / g k)" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
816 |
with g have "C \<noteq> 0" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
817 |
by (simp add: f) |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
818 |
have *: "eventually (\<lambda>n. prod f {..n} = C * prod g {..n}) sequentially" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
819 |
using eventually_ge_at_top[of N] |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
820 |
proof eventually_elim |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
821 |
case (elim n) |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
822 |
then have "{..n} = {..<N} \<union> {N..n}" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
823 |
by auto |
68138 | 824 |
also have "prod f \<dots> = prod f {..<N} * prod f {N..n}" |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
825 |
by (intro prod.union_disjoint) auto |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
826 |
also from N have "prod f {N..n} = prod g {N..n}" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
827 |
by (intro prod.cong) simp_all |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
828 |
also have "prod f {..<N} * prod g {N..n} = C * (prod g {..<N} * prod g {N..n})" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
829 |
unfolding C_def by (simp add: g prod_dividef) |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
830 |
also have "prod g {..<N} * prod g {N..n} = prod g ({..<N} \<union> {N..n})" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
831 |
by (intro prod.union_disjoint [symmetric]) auto |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
832 |
also from elim have "{..<N} \<union> {N..n} = {..n}" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
833 |
by auto |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
834 |
finally show "prod f {..n} = C * prod g {..n}" . |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
835 |
qed |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
836 |
then have cong: "convergent (\<lambda>n. prod f {..n}) = convergent (\<lambda>n. C * prod g {..n})" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
837 |
by (rule convergent_cong) |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
838 |
show ?thesis |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
839 |
proof |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
840 |
assume cf: "convergent_prod f" |
73466 | 841 |
with f have "\<not> (\<lambda>n. prod f {..n}) \<longlonglongrightarrow> 0" |
842 |
by simp |
|
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
843 |
then have "\<not> (\<lambda>n. prod g {..n}) \<longlonglongrightarrow> 0" |
73466 | 844 |
using * \<open>C \<noteq> 0\<close> filterlim_cong by fastforce |
68064
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
845 |
then show "convergent_prod g" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
846 |
by (metis convergent_mult_const_iff \<open>C \<noteq> 0\<close> cong cf convergent_LIMSEQ_iff convergent_prod_iff_convergent convergent_prod_imp_convergent g) |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
847 |
next |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
848 |
assume cg: "convergent_prod g" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
849 |
have "\<exists>a. C * a \<noteq> 0 \<and> (\<lambda>n. prod g {..n}) \<longlonglongrightarrow> a" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
850 |
by (metis (no_types) \<open>C \<noteq> 0\<close> cg convergent_prod_iff_nz_lim divide_eq_0_iff g nonzero_mult_div_cancel_right) |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
851 |
then show "convergent_prod f" |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
852 |
using "*" tendsto_mult_left filterlim_cong |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
853 |
by (fastforce simp add: convergent_prod_iff_nz_lim f) |
b249fab48c76
type class generalisations; some work on infinite products
paulson <lp15@cam.ac.uk>
parents:
66277
diff
changeset
|
854 |
qed |
66277 | 855 |
qed |
856 |
||
68071 | 857 |
lemma has_prod_finite: |
68361 | 858 |
fixes f :: "nat \<Rightarrow> 'a::{semidom,t2_space}" |
68071 | 859 |
assumes [simp]: "finite N" |
860 |
and f: "\<And>n. n \<notin> N \<Longrightarrow> f n = 1" |
|
861 |
shows "f has_prod (\<Prod>n\<in>N. f n)" |
|
862 |
proof - |
|
863 |
have eq: "prod f {..n + Suc (Max N)} = prod f N" for n |
|
864 |
proof (rule prod.mono_neutral_right) |
|
865 |
show "N \<subseteq> {..n + Suc (Max N)}" |
|
68138 | 866 |
by (auto simp: le_Suc_eq trans_le_add2) |
68071 | 867 |
show "\<forall>i\<in>{..n + Suc (Max N)} - N. f i = 1" |
868 |
using f by blast |
|
869 |
qed auto |
|
870 |
show ?thesis |
|
871 |
proof (cases "\<forall>n\<in>N. f n \<noteq> 0") |
|
872 |
case True |
|
873 |
then have "prod f N \<noteq> 0" |
|
874 |
by simp |
|
875 |
moreover have "(\<lambda>n. prod f {..n}) \<longlonglongrightarrow> prod f N" |
|
876 |
by (rule LIMSEQ_offset[of _ "Suc (Max N)"]) (simp add: eq atLeast0LessThan del: add_Suc_right) |
|
877 |
ultimately show ?thesis |
|
68361 | 878 |
by (simp add: raw_has_prod_def has_prod_def) |
68071 | 879 |
next |
880 |
case False |
|
881 |
then obtain k where "k \<in> N" "f k = 0" |
|
882 |
by auto |
|
883 |
let ?Z = "{n \<in> N. f n = 0}" |
|
884 |
have maxge: "Max ?Z \<ge> n" if "f n = 0" for n |
|
885 |
using Max_ge [of ?Z] \<open>finite N\<close> \<open>f n = 0\<close> |
|
886 |
by (metis (mono_tags) Collect_mem_eq f finite_Collect_conjI mem_Collect_eq zero_neq_one) |
|
887 |
let ?q = "prod f {Suc (Max ?Z)..Max N}" |
|
888 |
have [simp]: "?q \<noteq> 0" |
|
889 |
using maxge Suc_n_not_le_n le_trans by force |
|
68076 | 890 |
have eq: "(\<Prod>i\<le>n + Max N. f (Suc (i + Max ?Z))) = ?q" for n |
891 |
proof - |
|
892 |
have "(\<Prod>i\<le>n + Max N. f (Suc (i + Max ?Z))) = prod f {Suc (Max ?Z)..n + Max N + Suc (Max ?Z)}" |
|
893 |
proof (rule prod.reindex_cong [where l = "\<lambda>i. i + Suc (Max ?Z)", THEN sym]) |
|
894 |
show "{Suc (Max ?Z)..n + Max N + Suc (Max ?Z)} = (\<lambda>i. i + Suc (Max ?Z)) ` {..n + Max N}" |
|
895 |
using le_Suc_ex by fastforce |
|
896 |
qed (auto simp: inj_on_def) |
|
68138 | 897 |
also have "\<dots> = ?q" |
68076 | 898 |
by (rule prod.mono_neutral_right) |
899 |
(use Max.coboundedI [OF \<open>finite N\<close>] f in \<open>force+\<close>) |
|
900 |
finally show ?thesis . |
|
901 |
qed |
|
68361 | 902 |
have q: "raw_has_prod f (Suc (Max ?Z)) ?q" |
903 |
proof (simp add: raw_has_prod_def) |
|
68076 | 904 |
show "(\<lambda>n. \<Prod>i\<le>n. f (Suc (i + Max ?Z))) \<longlonglongrightarrow> ?q" |
905 |
by (rule LIMSEQ_offset[of _ "(Max N)"]) (simp add: eq) |
|
906 |
qed |
|
68071 | 907 |
show ?thesis |
908 |
unfolding has_prod_def |
|
909 |
proof (intro disjI2 exI conjI) |
|
910 |
show "prod f N = 0" |
|
911 |
using \<open>f k = 0\<close> \<open>k \<in> N\<close> \<open>finite N\<close> prod_zero by blast |
|
912 |
show "f (Max ?Z) = 0" |
|
913 |
using Max_in [of ?Z] \<open>finite N\<close> \<open>f k = 0\<close> \<open>k \<in> N\<close> by auto |
|
914 |
qed (use q in auto) |
|
915 |
qed |
|
916 |
qed |
|
917 |
||
70136 | 918 |
corollary\<^marker>\<open>tag unimportant\<close> has_prod_0: |
68361 | 919 |
fixes f :: "nat \<Rightarrow> 'a::{semidom,t2_space}" |
68071 | 920 |
assumes "\<And>n. f n = 1" |
921 |
shows "f has_prod 1" |
|
922 |
by (simp add: assms has_prod_cong) |
|
923 |
||
68361 | 924 |
lemma prodinf_zero[simp]: "prodinf (\<lambda>n. 1::'a::real_normed_field) = 1" |
925 |
using has_prod_unique by force |
|
926 |
||
68071 | 927 |
lemma convergent_prod_finite: |
928 |
fixes f :: "nat \<Rightarrow> 'a::{idom,t2_space}" |
|
929 |
assumes "finite N" "\<And>n. n \<notin> N \<Longrightarrow> f n = 1" |
|
930 |
shows "convergent_prod f" |
|
931 |
proof - |
|
68361 | 932 |
have "\<exists>n p. raw_has_prod f n p" |
68071 | 933 |
using assms has_prod_def has_prod_finite by blast |
934 |
then show ?thesis |
|
935 |
by (simp add: convergent_prod_def) |
|
936 |
qed |
|
937 |
||
68127 | 938 |
lemma has_prod_If_finite_set: |
939 |
fixes f :: "nat \<Rightarrow> 'a::{idom,t2_space}" |
|
940 |
shows "finite A \<Longrightarrow> (\<lambda>r. if r \<in> A then f r else 1) has_prod (\<Prod>r\<in>A. f r)" |
|
941 |
using has_prod_finite[of A "(\<lambda>r. if r \<in> A then f r else 1)"] |
|
942 |
by simp |
|
943 |
||
944 |
lemma has_prod_If_finite: |
|
945 |
fixes f :: "nat \<Rightarrow> 'a::{idom,t2_space}" |
|
946 |
shows "finite {r. P r} \<Longrightarrow> (\<lambda>r. if P r then f r else 1) has_prod (\<Prod>r | P r. f r)" |
|
947 |
using has_prod_If_finite_set[of "{r. P r}"] by simp |
|
948 |
||
949 |
lemma convergent_prod_If_finite_set[simp, intro]: |
|
950 |
fixes f :: "nat \<Rightarrow> 'a::{idom,t2_space}" |
|
951 |
shows "finite A \<Longrightarrow> convergent_prod (\<lambda>r. if r \<in> A then f r else 1)" |
|
952 |
by (simp add: convergent_prod_finite) |
|
953 |
||
954 |
lemma convergent_prod_If_finite[simp, intro]: |
|
955 |
fixes f :: "nat \<Rightarrow> 'a::{idom,t2_space}" |
|
956 |
shows "finite {r. P r} \<Longrightarrow> convergent_prod (\<lambda>r. if P r then f r else 1)" |
|
957 |
using convergent_prod_def has_prod_If_finite has_prod_def by fastforce |
|
958 |
||
959 |
lemma has_prod_single: |
|
960 |
fixes f :: "nat \<Rightarrow> 'a::{idom,t2_space}" |
|
961 |
shows "(\<lambda>r. if r = i then f r else 1) has_prod f i" |
|
962 |
using has_prod_If_finite[of "\<lambda>r. r = i"] by simp |
|
963 |
||
76724
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
964 |
text \<open>The ge1 assumption can probably be weakened, at the expense of extra work\<close> |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
965 |
lemma uniform_limit_prodinf: |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
966 |
fixes f:: "nat \<Rightarrow> real \<Rightarrow> real" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
967 |
assumes "uniformly_convergent_on X (\<lambda>n x. \<Prod>k<n. f k x)" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
968 |
and ge1: "\<And>x k . x \<in> X \<Longrightarrow> f k x \<ge> 1" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
969 |
shows "uniform_limit X (\<lambda>n x. \<Prod>k<n. f k x) (\<lambda>x. \<Prod>k. f k x) sequentially" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
970 |
proof - |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
971 |
have ul: "uniform_limit X (\<lambda>n x. \<Prod>k<n. f k x) (\<lambda>x. lim (\<lambda>n. \<Prod>k<n. f k x)) sequentially" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
972 |
using assms uniformly_convergent_uniform_limit_iff by blast |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
973 |
moreover have "(\<Prod>k. f k x) = lim (\<lambda>n. \<Prod>k<n. f k x)" if "x \<in> X" for x |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
974 |
proof (intro prodinf_eq_lim') |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
975 |
have tends: "(\<lambda>n. \<Prod>k<n. f k x) \<longlonglongrightarrow> lim (\<lambda>n. \<Prod>k<n. f k x)" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
976 |
using tendsto_uniform_limitI [OF ul] that by metis |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
977 |
moreover have "(\<Prod>k<n. f k x) \<ge> 1" for n |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
978 |
using ge1 by (simp add: prod_ge_1 that) |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
979 |
ultimately have "lim (\<lambda>n. \<Prod>k<n. f k x) \<ge> 1" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
980 |
by (meson LIMSEQ_le_const) |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
981 |
then have "raw_has_prod (\<lambda>k. f k x) 0 (lim (\<lambda>n. \<Prod>k<n. f k x))" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
982 |
using LIMSEQ_lessThan_iff_atMost tends by (auto simp: raw_has_prod_def) |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
983 |
then show "convergent_prod (\<lambda>k. f k x)" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
984 |
unfolding convergent_prod_def by blast |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
985 |
show "\<And>k. f k x \<noteq> 0" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
986 |
by (smt (verit) ge1 that) |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
987 |
qed |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
988 |
ultimately show ?thesis |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
989 |
by (metis (mono_tags, lifting) uniform_limit_cong') |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
990 |
qed |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
991 |
|
68136 | 992 |
context |
993 |
fixes f :: "nat \<Rightarrow> 'a :: real_normed_field" |
|
994 |
begin |
|
995 |
||
996 |
lemma convergent_prod_imp_has_prod: |
|
997 |
assumes "convergent_prod f" |
|
998 |
shows "\<exists>p. f has_prod p" |
|
999 |
proof - |
|
68361 | 1000 |
obtain M p where p: "raw_has_prod f M p" |
68136 | 1001 |
using assms convergent_prod_def by blast |
1002 |
then have "p \<noteq> 0" |
|
68361 | 1003 |
using raw_has_prod_nonzero by blast |
68136 | 1004 |
with p have fnz: "f i \<noteq> 0" if "i \<ge> M" for i |
68361 | 1005 |
using raw_has_prod_eq_0 that by blast |
68136 | 1006 |
define C where "C = (\<Prod>n<M. f n)" |
1007 |
show ?thesis |
|
1008 |
proof (cases "\<forall>n\<le>M. f n \<noteq> 0") |
|
1009 |
case True |
|
1010 |
then have "C \<noteq> 0" |
|
1011 |
by (simp add: C_def) |
|
1012 |
then show ?thesis |
|
1013 |
by (meson True assms convergent_prod_offset_0 fnz has_prod_def nat_le_linear) |
|
1014 |
next |
|
1015 |
case False |
|
1016 |
let ?N = "GREATEST n. f n = 0" |
|
1017 |
have 0: "f ?N = 0" |
|
1018 |
using fnz False |
|
1019 |
by (metis (mono_tags, lifting) GreatestI_ex_nat nat_le_linear) |
|
1020 |
have "f i \<noteq> 0" if "i > ?N" for i |
|
1021 |
by (metis (mono_tags, lifting) Greatest_le_nat fnz leD linear that) |
|
68361 | 1022 |
then have "\<exists>p. raw_has_prod f (Suc ?N) p" |
68136 | 1023 |
using assms by (auto simp: intro!: convergent_prod_ignore_nonzero_segment) |
1024 |
then show ?thesis |
|
1025 |
unfolding has_prod_def using 0 by blast |
|
1026 |
qed |
|
1027 |
qed |
|
1028 |
||
1029 |
lemma convergent_prod_has_prod [intro]: |
|
1030 |
shows "convergent_prod f \<Longrightarrow> f has_prod (prodinf f)" |
|
1031 |
unfolding prodinf_def |
|
1032 |
by (metis convergent_prod_imp_has_prod has_prod_unique theI') |
|
1033 |
||
1034 |
lemma convergent_prod_LIMSEQ: |
|
1035 |
shows "convergent_prod f \<Longrightarrow> (\<lambda>n. \<Prod>i\<le>n. f i) \<longlonglongrightarrow> prodinf f" |
|
1036 |
by (metis convergent_LIMSEQ_iff convergent_prod_has_prod convergent_prod_imp_convergent |
|
68361 | 1037 |
convergent_prod_to_zero_iff raw_has_prod_eq_0 has_prod_def prodinf_eq_lim zero_le) |
68136 | 1038 |
|
68651 | 1039 |
theorem has_prod_iff: "f has_prod x \<longleftrightarrow> convergent_prod f \<and> prodinf f = x" |
68136 | 1040 |
proof |
1041 |
assume "f has_prod x" |
|
1042 |
then show "convergent_prod f \<and> prodinf f = x" |
|
1043 |
apply safe |
|
1044 |
using convergent_prod_def has_prod_def apply blast |
|
1045 |
using has_prod_unique by blast |
|
1046 |
qed auto |
|
1047 |
||
1048 |
lemma convergent_prod_has_prod_iff: "convergent_prod f \<longleftrightarrow> f has_prod prodinf f" |
|
1049 |
by (auto simp: has_prod_iff convergent_prod_has_prod) |
|
1050 |
||
1051 |
lemma prodinf_finite: |
|
1052 |
assumes N: "finite N" |
|
1053 |
and f: "\<And>n. n \<notin> N \<Longrightarrow> f n = 1" |
|
1054 |
shows "prodinf f = (\<Prod>n\<in>N. f n)" |
|
1055 |
using has_prod_finite[OF assms, THEN has_prod_unique] by simp |
|
68127 | 1056 |
|
82353
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1057 |
lemma convergent_prod_tendsto_imp_has_prod: |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1058 |
assumes "convergent_prod f" "(\<lambda>n. (\<Prod>i\<le>n. f i)) \<longlonglongrightarrow> P" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1059 |
shows "f has_prod P" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1060 |
using assms by (metis convergent_prod_imp_has_prod has_prod_imp_tendsto limI) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1061 |
|
66277 | 1062 |
end |
68136 | 1063 |
|
70136 | 1064 |
subsection\<^marker>\<open>tag unimportant\<close> \<open>Infinite products on ordered topological monoids\<close> |
68361 | 1065 |
|
1066 |
context |
|
1067 |
fixes f :: "nat \<Rightarrow> 'a::{linordered_semidom,linorder_topology}" |
|
1068 |
begin |
|
1069 |
||
76724
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
1070 |
lemma has_prod_nonzero: |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
1071 |
assumes "f has_prod a" "a \<noteq> 0" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
1072 |
shows "f k \<noteq> 0" |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
1073 |
using assms by (auto simp: has_prod_def raw_has_prod_def LIMSEQ_prod_0 LIMSEQ_unique) |
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
1074 |
|
68361 | 1075 |
lemma has_prod_le: |
1076 |
assumes f: "f has_prod a" and g: "g has_prod b" and le: "\<And>n. 0 \<le> f n \<and> f n \<le> g n" |
|
1077 |
shows "a \<le> b" |
|
1078 |
proof (cases "a=0 \<or> b=0") |
|
1079 |
case True |
|
1080 |
then show ?thesis |
|
1081 |
proof |
|
1082 |
assume [simp]: "a=0" |
|
1083 |
have "b \<ge> 0" |
|
1084 |
proof (rule LIMSEQ_prod_nonneg) |
|
1085 |
show "(\<lambda>n. prod g {..n}) \<longlonglongrightarrow> b" |
|
1086 |
using g by (auto simp: has_prod_def raw_has_prod_def LIMSEQ_prod_0) |
|
1087 |
qed (use le order_trans in auto) |
|
1088 |
then show ?thesis |
|
1089 |
by auto |
|
1090 |
next |
|
1091 |
assume [simp]: "b=0" |
|
1092 |
then obtain i where "g i = 0" |
|
1093 |
using g by (auto simp: prod_defs) |
|
1094 |
then have "f i = 0" |
|
1095 |
using antisym le by force |
|
1096 |
then have "a=0" |
|
1097 |
using f by (auto simp: prod_defs LIMSEQ_prod_0 LIMSEQ_unique) |
|
1098 |
then show ?thesis |
|
1099 |
by auto |
|
1100 |
qed |
|
1101 |
next |
|
1102 |
case False |
|
1103 |
then show ?thesis |
|
1104 |
using assms |
|
1105 |
unfolding has_prod_def raw_has_prod_def |
|
1106 |
by (force simp: LIMSEQ_prod_0 intro!: LIMSEQ_le prod_mono) |
|
1107 |
qed |
|
1108 |
||
1109 |
lemma prodinf_le: |
|
1110 |
assumes f: "f has_prod a" and g: "g has_prod b" and le: "\<And>n. 0 \<le> f n \<and> f n \<le> g n" |
|
1111 |
shows "prodinf f \<le> prodinf g" |
|
1112 |
using has_prod_le [OF assms] has_prod_unique f g by blast |
|
1113 |
||
68136 | 1114 |
end |
68361 | 1115 |
|
1116 |
||
1117 |
lemma prod_le_prodinf: |
|
1118 |
fixes f :: "nat \<Rightarrow> 'a::{linordered_idom,linorder_topology}" |
|
1119 |
assumes "f has_prod a" "\<And>i. 0 \<le> f i" "\<And>i. i\<ge>n \<Longrightarrow> 1 \<le> f i" |
|
1120 |
shows "prod f {..<n} \<le> prodinf f" |
|
1121 |
by(rule has_prod_le[OF has_prod_If_finite_set]) (use assms has_prod_unique in auto) |
|
1122 |
||
1123 |
lemma prodinf_nonneg: |
|
1124 |
fixes f :: "nat \<Rightarrow> 'a::{linordered_idom,linorder_topology}" |
|
1125 |
assumes "f has_prod a" "\<And>i. 1 \<le> f i" |
|
1126 |
shows "1 \<le> prodinf f" |
|
1127 |
using prod_le_prodinf[of f a 0] assms |
|
1128 |
by (metis order_trans prod_ge_1 zero_le_one) |
|
1129 |
||
1130 |
lemma prodinf_le_const: |
|
1131 |
fixes f :: "nat \<Rightarrow> real" |
|
76724
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
1132 |
assumes "convergent_prod f" "\<And>n. n \<ge> N \<Longrightarrow> prod f {..<n} \<le> x" |
68361 | 1133 |
shows "prodinf f \<le> x" |
76724
7ff71bdcf731
Additional new material about infinite products, etc.
paulson <lp15@cam.ac.uk>
parents:
76722
diff
changeset
|
1134 |
by (metis lessThan_Suc_atMost assms convergent_prod_LIMSEQ LIMSEQ_le_const2 atMost_iff lessThan_iff less_le) |
68361 | 1135 |
|
73005
83b114a6545f
A few more simprules for iff-reasoning
paulson <lp15@cam.ac.uk>
parents:
73004
diff
changeset
|
1136 |
lemma prodinf_eq_one_iff [simp]: |
68361 | 1137 |
fixes f :: "nat \<Rightarrow> real" |
1138 |
assumes f: "convergent_prod f" and ge1: "\<And>n. 1 \<le> f n" |
|
1139 |
shows "prodinf f = 1 \<longleftrightarrow> (\<forall>n. f n = 1)" |
|
1140 |
proof |
|
1141 |
assume "prodinf f = 1" |
|
1142 |
then have "(\<lambda>n. \<Prod>i<n. f i) \<longlonglongrightarrow> 1" |
|
1143 |
using convergent_prod_LIMSEQ[of f] assms by (simp add: LIMSEQ_lessThan_iff_atMost) |
|
1144 |
then have "\<And>i. (\<Prod>n\<in>{i}. f n) \<le> 1" |
|
1145 |
proof (rule LIMSEQ_le_const) |
|
1146 |
have "1 \<le> prod f n" for n |
|
1147 |
by (simp add: ge1 prod_ge_1) |
|
1148 |
have "prod f {..<n} = 1" for n |
|
1149 |
by (metis \<open>\<And>n. 1 \<le> prod f n\<close> \<open>prodinf f = 1\<close> antisym f convergent_prod_has_prod ge1 order_trans prod_le_prodinf zero_le_one) |
|
1150 |
then have "(\<Prod>n\<in>{i}. f n) \<le> prod f {..<n}" if "n \<ge> Suc i" for i n |
|
70113
c8deb8ba6d05
Fixing the main Homology theory; also moving a lot of sum/prod lemmas into their generic context
paulson <lp15@cam.ac.uk>
parents:
69565
diff
changeset
|
1151 |
by (metis mult.left_neutral order_refl prod.cong prod.neutral_const prod.lessThan_Suc) |
68361 | 1152 |
then show "\<exists>N. \<forall>n\<ge>N. (\<Prod>n\<in>{i}. f n) \<le> prod f {..<n}" for i |
1153 |
by blast |
|
1154 |
qed |
|
1155 |
with ge1 show "\<forall>n. f n = 1" |
|
1156 |
by (auto intro!: antisym) |
|
1157 |
qed (metis prodinf_zero fun_eq_iff) |
|
1158 |
||
1159 |
lemma prodinf_pos_iff: |
|
1160 |
fixes f :: "nat \<Rightarrow> real" |
|
1161 |
assumes "convergent_prod f" "\<And>n. 1 \<le> f n" |
|
1162 |
shows "1 < prodinf f \<longleftrightarrow> (\<exists>i. 1 < f i)" |
|
1163 |
using prod_le_prodinf[of f 1] prodinf_eq_one_iff |
|
1164 |
by (metis convergent_prod_has_prod assms less_le prodinf_nonneg) |
|
1165 |
||
1166 |
lemma less_1_prodinf2: |
|
1167 |
fixes f :: "nat \<Rightarrow> real" |
|
1168 |
assumes "convergent_prod f" "\<And>n. 1 \<le> f n" "1 < f i" |
|
1169 |
shows "1 < prodinf f" |
|
1170 |
proof - |
|
1171 |
have "1 < (\<Prod>n<Suc i. f n)" |
|
1172 |
using assms by (intro less_1_prod2[where i=i]) auto |
|
1173 |
also have "\<dots> \<le> prodinf f" |
|
1174 |
by (intro prod_le_prodinf) (use assms order_trans zero_le_one in \<open>blast+\<close>) |
|
1175 |
finally show ?thesis . |
|
1176 |
qed |
|
1177 |
||
1178 |
lemma less_1_prodinf: |
|
1179 |
fixes f :: "nat \<Rightarrow> real" |
|
1180 |
shows "\<lbrakk>convergent_prod f; \<And>n. 1 < f n\<rbrakk> \<Longrightarrow> 1 < prodinf f" |
|
1181 |
by (intro less_1_prodinf2[where i=1]) (auto intro: less_imp_le) |
|
1182 |
||
1183 |
lemma prodinf_nonzero: |
|
1184 |
fixes f :: "nat \<Rightarrow> 'a :: {idom,topological_semigroup_mult,t2_space}" |
|
1185 |
assumes "convergent_prod f" "\<And>i. f i \<noteq> 0" |
|
1186 |
shows "prodinf f \<noteq> 0" |
|
1187 |
by (metis assms convergent_prod_offset_0 has_prod_unique raw_has_prod_def has_prod_def) |
|
1188 |
||
1189 |
lemma less_0_prodinf: |
|
1190 |
fixes f :: "nat \<Rightarrow> real" |
|
1191 |
assumes f: "convergent_prod f" and 0: "\<And>i. f i > 0" |
|
1192 |
shows "0 < prodinf f" |
|
1193 |
proof - |
|
1194 |
have "prodinf f \<noteq> 0" |
|
1195 |
by (metis assms less_irrefl prodinf_nonzero) |
|
1196 |
moreover have "0 < (\<Prod>n<i. f n)" for i |
|
1197 |
by (simp add: 0 prod_pos) |
|
1198 |
then have "prodinf f \<ge> 0" |
|
1199 |
using convergent_prod_LIMSEQ [OF f] LIMSEQ_prod_nonneg 0 less_le by blast |
|
1200 |
ultimately show ?thesis |
|
1201 |
by auto |
|
1202 |
qed |
|
1203 |
||
1204 |
lemma prod_less_prodinf2: |
|
1205 |
fixes f :: "nat \<Rightarrow> real" |
|
1206 |
assumes f: "convergent_prod f" and 1: "\<And>m. m\<ge>n \<Longrightarrow> 1 \<le> f m" and 0: "\<And>m. 0 < f m" and i: "n \<le> i" "1 < f i" |
|
1207 |
shows "prod f {..<n} < prodinf f" |
|
1208 |
proof - |
|
1209 |
have "prod f {..<n} \<le> prod f {..<i}" |
|
1210 |
by (rule prod_mono2) (use assms less_le in auto) |
|
1211 |
then have "prod f {..<n} < f i * prod f {..<i}" |
|
1212 |
using mult_less_le_imp_less[of 1 "f i" "prod f {..<n}" "prod f {..<i}"] assms |
|
1213 |
by (simp add: prod_pos) |
|
1214 |
moreover have "prod f {..<Suc i} \<le> prodinf f" |
|
1215 |
using prod_le_prodinf[of f _ "Suc i"] |
|
1216 |
by (meson "0" "1" Suc_leD convergent_prod_has_prod f \<open>n \<le> i\<close> le_trans less_eq_real_def) |
|
1217 |
ultimately show ?thesis |
|
70113
c8deb8ba6d05
Fixing the main Homology theory; also moving a lot of sum/prod lemmas into their generic context
paulson <lp15@cam.ac.uk>
parents:
69565
diff
changeset
|
1218 |
by (metis le_less_trans mult.commute not_le prod.lessThan_Suc) |
68361 | 1219 |
qed |
1220 |
||
1221 |
lemma prod_less_prodinf: |
|
1222 |
fixes f :: "nat \<Rightarrow> real" |
|
1223 |
assumes f: "convergent_prod f" and 1: "\<And>m. m\<ge>n \<Longrightarrow> 1 < f m" and 0: "\<And>m. 0 < f m" |
|
1224 |
shows "prod f {..<n} < prodinf f" |
|
1225 |
by (meson "0" "1" f le_less prod_less_prodinf2) |
|
1226 |
||
1227 |
lemma raw_has_prodI_bounded: |
|
1228 |
fixes f :: "nat \<Rightarrow> real" |
|
1229 |
assumes pos: "\<And>n. 1 \<le> f n" |
|
1230 |
and le: "\<And>n. (\<Prod>i<n. f i) \<le> x" |
|
1231 |
shows "\<exists>p. raw_has_prod f 0 p" |
|
1232 |
unfolding raw_has_prod_def add_0_right |
|
1233 |
proof (rule exI LIMSEQ_incseq_SUP conjI)+ |
|
1234 |
show "bdd_above (range (\<lambda>n. prod f {..n}))" |
|
1235 |
by (metis bdd_aboveI2 le lessThan_Suc_atMost) |
|
1236 |
then have "(SUP i. prod f {..i}) > 0" |
|
1237 |
by (metis UNIV_I cSUP_upper less_le_trans pos prod_pos zero_less_one) |
|
1238 |
then show "(SUP i. prod f {..i}) \<noteq> 0" |
|
1239 |
by auto |
|
1240 |
show "incseq (\<lambda>n. prod f {..n})" |
|
1241 |
using pos order_trans [OF zero_le_one] by (auto simp: mono_def intro!: prod_mono2) |
|
1242 |
qed |
|
1243 |
||
1244 |
lemma convergent_prodI_nonneg_bounded: |
|
1245 |
fixes f :: "nat \<Rightarrow> real" |
|
1246 |
assumes "\<And>n. 1 \<le> f n" "\<And>n. (\<Prod>i<n. f i) \<le> x" |
|
1247 |
shows "convergent_prod f" |
|
1248 |
using convergent_prod_def raw_has_prodI_bounded [OF assms] by blast |
|
1249 |
||
1250 |
||
70136 | 1251 |
subsection\<^marker>\<open>tag unimportant\<close> \<open>Infinite products on topological spaces\<close> |
68361 | 1252 |
|
1253 |
context |
|
1254 |
fixes f g :: "nat \<Rightarrow> 'a::{t2_space,topological_semigroup_mult,idom}" |
|
1255 |
begin |
|
1256 |
||
1257 |
lemma raw_has_prod_mult: "\<lbrakk>raw_has_prod f M a; raw_has_prod g M b\<rbrakk> \<Longrightarrow> raw_has_prod (\<lambda>n. f n * g n) M (a * b)" |
|
1258 |
by (force simp add: prod.distrib tendsto_mult raw_has_prod_def) |
|
1259 |
||
1260 |
lemma has_prod_mult_nz: "\<lbrakk>f has_prod a; g has_prod b; a \<noteq> 0; b \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>n. f n * g n) has_prod (a * b)" |
|
1261 |
by (simp add: raw_has_prod_mult has_prod_def) |
|
1262 |
||
1263 |
end |
|
1264 |
||
1265 |
||
1266 |
context |
|
1267 |
fixes f g :: "nat \<Rightarrow> 'a::real_normed_field" |
|
1268 |
begin |
|
1269 |
||
1270 |
lemma has_prod_mult: |
|
1271 |
assumes f: "f has_prod a" and g: "g has_prod b" |
|
1272 |
shows "(\<lambda>n. f n * g n) has_prod (a * b)" |
|
1273 |
using f [unfolded has_prod_def] |
|
1274 |
proof (elim disjE exE conjE) |
|
1275 |
assume f0: "raw_has_prod f 0 a" |
|
1276 |
show ?thesis |
|
1277 |
using g [unfolded has_prod_def] |
|
1278 |
proof (elim disjE exE conjE) |
|
1279 |
assume g0: "raw_has_prod g 0 b" |
|
1280 |
with f0 show ?thesis |
|
1281 |
by (force simp add: has_prod_def prod.distrib tendsto_mult raw_has_prod_def) |
|
1282 |
next |
|
1283 |
fix j q |
|
1284 |
assume "b = 0" and "g j = 0" and q: "raw_has_prod g (Suc j) q" |
|
1285 |
obtain p where p: "raw_has_prod f (Suc j) p" |
|
1286 |
using f0 raw_has_prod_ignore_initial_segment by blast |
|
1287 |
then have "Ex (raw_has_prod (\<lambda>n. f n * g n) (Suc j))" |
|
1288 |
using q raw_has_prod_mult by blast |
|
1289 |
then show ?thesis |
|
1290 |
using \<open>b = 0\<close> \<open>g j = 0\<close> has_prod_0_iff by fastforce |
|
1291 |
qed |
|
1292 |
next |
|
1293 |
fix i p |
|
1294 |
assume "a = 0" and "f i = 0" and p: "raw_has_prod f (Suc i) p" |
|
1295 |
show ?thesis |
|
1296 |
using g [unfolded has_prod_def] |
|
1297 |
proof (elim disjE exE conjE) |
|
1298 |
assume g0: "raw_has_prod g 0 b" |
|
1299 |
obtain q where q: "raw_has_prod g (Suc i) q" |
|
1300 |
using g0 raw_has_prod_ignore_initial_segment by blast |
|
1301 |
then have "Ex (raw_has_prod (\<lambda>n. f n * g n) (Suc i))" |
|
1302 |
using raw_has_prod_mult p by blast |
|
1303 |
then show ?thesis |
|
1304 |
using \<open>a = 0\<close> \<open>f i = 0\<close> has_prod_0_iff by fastforce |
|
1305 |
next |
|
1306 |
fix j q |
|
1307 |
assume "b = 0" and "g j = 0" and q: "raw_has_prod g (Suc j) q" |
|
1308 |
obtain p' where p': "raw_has_prod f (Suc (max i j)) p'" |
|
1309 |
by (metis raw_has_prod_ignore_initial_segment max_Suc_Suc max_def p) |
|
1310 |
moreover |
|
1311 |
obtain q' where q': "raw_has_prod g (Suc (max i j)) q'" |
|
1312 |
by (metis raw_has_prod_ignore_initial_segment max.cobounded2 max_Suc_Suc q) |
|
1313 |
ultimately show ?thesis |
|
1314 |
using \<open>b = 0\<close> by (simp add: has_prod_def) (metis \<open>f i = 0\<close> \<open>g j = 0\<close> raw_has_prod_mult max_def) |
|
1315 |
qed |
|
1316 |
qed |
|
1317 |
||
1318 |
lemma convergent_prod_mult: |
|
1319 |
assumes f: "convergent_prod f" and g: "convergent_prod g" |
|
1320 |
shows "convergent_prod (\<lambda>n. f n * g n)" |
|
1321 |
unfolding convergent_prod_def |
|
1322 |
proof - |
|
1323 |
obtain M p N q where p: "raw_has_prod f M p" and q: "raw_has_prod g N q" |
|
1324 |
using convergent_prod_def f g by blast+ |
|
1325 |
then obtain p' q' where p': "raw_has_prod f (max M N) p'" and q': "raw_has_prod g (max M N) q'" |
|
1326 |
by (meson raw_has_prod_ignore_initial_segment max.cobounded1 max.cobounded2) |
|
1327 |
then show "\<exists>M p. raw_has_prod (\<lambda>n. f n * g n) M p" |
|
1328 |
using raw_has_prod_mult by blast |
|
1329 |
qed |
|
1330 |
||
1331 |
lemma prodinf_mult: "convergent_prod f \<Longrightarrow> convergent_prod g \<Longrightarrow> prodinf f * prodinf g = (\<Prod>n. f n * g n)" |
|
1332 |
by (intro has_prod_unique has_prod_mult convergent_prod_has_prod) |
|
1333 |
||
1334 |
end |
|
1335 |
||
1336 |
context |
|
1337 |
fixes f :: "'i \<Rightarrow> nat \<Rightarrow> 'a::real_normed_field" |
|
1338 |
and I :: "'i set" |
|
1339 |
begin |
|
1340 |
||
1341 |
lemma has_prod_prod: "(\<And>i. i \<in> I \<Longrightarrow> (f i) has_prod (x i)) \<Longrightarrow> (\<lambda>n. \<Prod>i\<in>I. f i n) has_prod (\<Prod>i\<in>I. x i)" |
|
1342 |
by (induct I rule: infinite_finite_induct) (auto intro!: has_prod_mult) |
|
1343 |
||
1344 |
lemma prodinf_prod: "(\<And>i. i \<in> I \<Longrightarrow> convergent_prod (f i)) \<Longrightarrow> (\<Prod>n. \<Prod>i\<in>I. f i n) = (\<Prod>i\<in>I. \<Prod>n. f i n)" |
|
1345 |
using has_prod_unique[OF has_prod_prod, OF convergent_prod_has_prod] by simp |
|
1346 |
||
1347 |
lemma convergent_prod_prod: "(\<And>i. i \<in> I \<Longrightarrow> convergent_prod (f i)) \<Longrightarrow> convergent_prod (\<lambda>n. \<Prod>i\<in>I. f i n)" |
|
1348 |
using convergent_prod_has_prod_iff has_prod_prod prodinf_prod by force |
|
1349 |
||
1350 |
end |
|
1351 |
||
70136 | 1352 |
subsection\<^marker>\<open>tag unimportant\<close> \<open>Infinite summability on real normed fields\<close> |
68361 | 1353 |
|
1354 |
context |
|
1355 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_field" |
|
1356 |
begin |
|
1357 |
||
1358 |
lemma raw_has_prod_Suc_iff: "raw_has_prod f M (a * f M) \<longleftrightarrow> raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> 0" |
|
1359 |
proof - |
|
1360 |
have "raw_has_prod f M (a * f M) \<longleftrightarrow> (\<lambda>i. \<Prod>j\<le>Suc i. f (j+M)) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> 0" |
|
71827 | 1361 |
by (subst filterlim_sequentially_Suc) (simp add: raw_has_prod_def) |
68361 | 1362 |
also have "\<dots> \<longleftrightarrow> (\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> 0" |
70113
c8deb8ba6d05
Fixing the main Homology theory; also moving a lot of sum/prod lemmas into their generic context
paulson <lp15@cam.ac.uk>
parents:
69565
diff
changeset
|
1363 |
by (simp add: ac_simps atMost_Suc_eq_insert_0 image_Suc_atMost prod.atLeast1_atMost_eq lessThan_Suc_atMost |
c8deb8ba6d05
Fixing the main Homology theory; also moving a lot of sum/prod lemmas into their generic context
paulson <lp15@cam.ac.uk>
parents:
69565
diff
changeset
|
1364 |
del: prod.cl_ivl_Suc) |
68361 | 1365 |
also have "\<dots> \<longleftrightarrow> raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> 0" |
1366 |
proof safe |
|
1367 |
assume tends: "(\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M" and 0: "a * f M \<noteq> 0" |
|
1368 |
with tendsto_divide[OF tends tendsto_const, of "f M"] |
|
1369 |
show "raw_has_prod (\<lambda>n. f (Suc n)) M a" |
|
1370 |
by (simp add: raw_has_prod_def) |
|
1371 |
qed (auto intro: tendsto_mult_right simp: raw_has_prod_def) |
|
1372 |
finally show ?thesis . |
|
1373 |
qed |
|
1374 |
||
1375 |
lemma has_prod_Suc_iff: |
|
1376 |
assumes "f 0 \<noteq> 0" shows "(\<lambda>n. f (Suc n)) has_prod a \<longleftrightarrow> f has_prod (a * f 0)" |
|
1377 |
proof (cases "a = 0") |
|
1378 |
case True |
|
1379 |
then show ?thesis |
|
1380 |
proof (simp add: has_prod_def, safe) |
|
1381 |
fix i x |
|
1382 |
assume "f (Suc i) = 0" and "raw_has_prod (\<lambda>n. f (Suc n)) (Suc i) x" |
|
1383 |
then obtain y where "raw_has_prod f (Suc (Suc i)) y" |
|
1384 |
by (metis (no_types) raw_has_prod_eq_0 Suc_n_not_le_n raw_has_prod_Suc_iff raw_has_prod_ignore_initial_segment raw_has_prod_nonzero linear) |
|
1385 |
then show "\<exists>i. f i = 0 \<and> Ex (raw_has_prod f (Suc i))" |
|
1386 |
using \<open>f (Suc i) = 0\<close> by blast |
|
1387 |
next |
|
1388 |
fix i x |
|
1389 |
assume "f i = 0" and x: "raw_has_prod f (Suc i) x" |
|
1390 |
then obtain j where j: "i = Suc j" |
|
1391 |
by (metis assms not0_implies_Suc) |
|
1392 |
moreover have "\<exists> y. raw_has_prod (\<lambda>n. f (Suc n)) i y" |
|
1393 |
using x by (auto simp: raw_has_prod_def) |
|
1394 |
then show "\<exists>i. f (Suc i) = 0 \<and> Ex (raw_has_prod (\<lambda>n. f (Suc n)) (Suc i))" |
|
1395 |
using \<open>f i = 0\<close> j by blast |
|
1396 |
qed |
|
1397 |
next |
|
1398 |
case False |
|
1399 |
then show ?thesis |
|
1400 |
by (auto simp: has_prod_def raw_has_prod_Suc_iff assms) |
|
1401 |
qed |
|
1402 |
||
73005
83b114a6545f
A few more simprules for iff-reasoning
paulson <lp15@cam.ac.uk>
parents:
73004
diff
changeset
|
1403 |
lemma convergent_prod_Suc_iff [simp]: |
68452
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1404 |
shows "convergent_prod (\<lambda>n. f (Suc n)) = convergent_prod f" |
68361 | 1405 |
proof |
1406 |
assume "convergent_prod f" |
|
68452
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1407 |
then obtain M L where M_nz:"\<forall>n\<ge>M. f n \<noteq> 0" and |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1408 |
M_L:"(\<lambda>n. \<Prod>i\<le>n. f (i + M)) \<longlonglongrightarrow> L" and "L \<noteq> 0" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1409 |
unfolding convergent_prod_altdef by auto |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1410 |
have "(\<lambda>n. \<Prod>i\<le>n. f (Suc (i + M))) \<longlonglongrightarrow> L / f M" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1411 |
proof - |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1412 |
have "(\<lambda>n. \<Prod>i\<in>{0..Suc n}. f (i + M)) \<longlonglongrightarrow> L" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1413 |
using M_L |
71827 | 1414 |
apply (subst (asm) filterlim_sequentially_Suc[symmetric]) |
68452
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1415 |
using atLeast0AtMost by auto |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1416 |
then have "(\<lambda>n. f M * (\<Prod>i\<in>{0..n}. f (Suc (i + M)))) \<longlonglongrightarrow> L" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1417 |
apply (subst (asm) prod.atLeast0_atMost_Suc_shift) |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1418 |
by simp |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1419 |
then have "(\<lambda>n. (\<Prod>i\<in>{0..n}. f (Suc (i + M)))) \<longlonglongrightarrow> L/f M" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1420 |
apply (drule_tac tendsto_divide) |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1421 |
using M_nz[rule_format,of M,simplified] by auto |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1422 |
then show ?thesis unfolding atLeast0AtMost . |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1423 |
qed |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1424 |
then show "convergent_prod (\<lambda>n. f (Suc n))" unfolding convergent_prod_altdef |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1425 |
apply (rule_tac exI[where x=M]) |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1426 |
apply (rule_tac exI[where x="L/f M"]) |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1427 |
using M_nz \<open>L\<noteq>0\<close> by auto |
68361 | 1428 |
next |
1429 |
assume "convergent_prod (\<lambda>n. f (Suc n))" |
|
68452
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1430 |
then obtain M where "\<exists>L. (\<forall>n\<ge>M. f (Suc n) \<noteq> 0) \<and> (\<lambda>n. \<Prod>i\<le>n. f (Suc (i + M))) \<longlonglongrightarrow> L \<and> L \<noteq> 0" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1431 |
unfolding convergent_prod_altdef by auto |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1432 |
then show "convergent_prod f" unfolding convergent_prod_altdef |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1433 |
apply (rule_tac exI[where x="Suc M"]) |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1434 |
using Suc_le_D by auto |
68361 | 1435 |
qed |
1436 |
||
1437 |
lemma raw_has_prod_inverse: |
|
1438 |
assumes "raw_has_prod f M a" shows "raw_has_prod (\<lambda>n. inverse (f n)) M (inverse a)" |
|
1439 |
using assms unfolding raw_has_prod_def by (auto dest: tendsto_inverse simp: prod_inversef [symmetric]) |
|
1440 |
||
1441 |
lemma has_prod_inverse: |
|
1442 |
assumes "f has_prod a" shows "(\<lambda>n. inverse (f n)) has_prod (inverse a)" |
|
1443 |
using assms raw_has_prod_inverse unfolding has_prod_def by auto |
|
1444 |
||
1445 |
lemma convergent_prod_inverse: |
|
1446 |
assumes "convergent_prod f" |
|
1447 |
shows "convergent_prod (\<lambda>n. inverse (f n))" |
|
1448 |
using assms unfolding convergent_prod_def by (blast intro: raw_has_prod_inverse elim: ) |
|
1449 |
||
1450 |
end |
|
1451 |
||
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1452 |
context |
68361 | 1453 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_field" |
1454 |
begin |
|
1455 |
||
1456 |
lemma raw_has_prod_Suc_iff': "raw_has_prod f M a \<longleftrightarrow> raw_has_prod (\<lambda>n. f (Suc n)) M (a / f M) \<and> f M \<noteq> 0" |
|
1457 |
by (metis raw_has_prod_eq_0 add.commute add.left_neutral raw_has_prod_Suc_iff raw_has_prod_nonzero le_add1 nonzero_mult_div_cancel_right times_divide_eq_left) |
|
1458 |
||
1459 |
lemma has_prod_divide: "f has_prod a \<Longrightarrow> g has_prod b \<Longrightarrow> (\<lambda>n. f n / g n) has_prod (a / b)" |
|
1460 |
unfolding divide_inverse by (intro has_prod_inverse has_prod_mult) |
|
1461 |
||
1462 |
lemma convergent_prod_divide: |
|
1463 |
assumes f: "convergent_prod f" and g: "convergent_prod g" |
|
1464 |
shows "convergent_prod (\<lambda>n. f n / g n)" |
|
1465 |
using f g has_prod_divide has_prod_iff by blast |
|
1466 |
||
1467 |
lemma prodinf_divide: "convergent_prod f \<Longrightarrow> convergent_prod g \<Longrightarrow> prodinf f / prodinf g = (\<Prod>n. f n / g n)" |
|
1468 |
by (intro has_prod_unique has_prod_divide convergent_prod_has_prod) |
|
1469 |
||
1470 |
lemma prodinf_inverse: "convergent_prod f \<Longrightarrow> (\<Prod>n. inverse (f n)) = inverse (\<Prod>n. f n)" |
|
1471 |
by (intro has_prod_unique [symmetric] has_prod_inverse convergent_prod_has_prod) |
|
1472 |
||
68452
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1473 |
lemma has_prod_Suc_imp: |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1474 |
assumes "(\<lambda>n. f (Suc n)) has_prod a" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1475 |
shows "f has_prod (a * f 0)" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1476 |
proof - |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1477 |
have "f has_prod (a * f 0)" when "raw_has_prod (\<lambda>n. f (Suc n)) 0 a" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1478 |
apply (cases "f 0=0") |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1479 |
using that unfolding has_prod_def raw_has_prod_Suc |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1480 |
by (auto simp add: raw_has_prod_Suc_iff) |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1481 |
moreover have "f has_prod (a * f 0)" when |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1482 |
"(\<exists>i q. a = 0 \<and> f (Suc i) = 0 \<and> raw_has_prod (\<lambda>n. f (Suc n)) (Suc i) q)" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1483 |
proof - |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1484 |
from that |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1485 |
obtain i q where "a = 0" "f (Suc i) = 0" "raw_has_prod (\<lambda>n. f (Suc n)) (Suc i) q" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1486 |
by auto |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1487 |
then show ?thesis unfolding has_prod_def |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1488 |
by (auto intro!:exI[where x="Suc i"] simp:raw_has_prod_Suc) |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1489 |
qed |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1490 |
ultimately show "f has_prod (a * f 0)" using assms unfolding has_prod_def by auto |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1491 |
qed |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1492 |
|
68361 | 1493 |
lemma has_prod_iff_shift: |
1494 |
assumes "\<And>i. i < n \<Longrightarrow> f i \<noteq> 0" |
|
1495 |
shows "(\<lambda>i. f (i + n)) has_prod a \<longleftrightarrow> f has_prod (a * (\<Prod>i<n. f i))" |
|
1496 |
using assms |
|
1497 |
proof (induct n arbitrary: a) |
|
1498 |
case 0 |
|
1499 |
then show ?case by simp |
|
1500 |
next |
|
1501 |
case (Suc n) |
|
1502 |
then have "(\<lambda>i. f (Suc i + n)) has_prod a \<longleftrightarrow> (\<lambda>i. f (i + n)) has_prod (a * f n)" |
|
1503 |
by (subst has_prod_Suc_iff) auto |
|
1504 |
with Suc show ?case |
|
1505 |
by (simp add: ac_simps) |
|
1506 |
qed |
|
1507 |
||
70136 | 1508 |
corollary\<^marker>\<open>tag unimportant\<close> has_prod_iff_shift': |
68361 | 1509 |
assumes "\<And>i. i < n \<Longrightarrow> f i \<noteq> 0" |
1510 |
shows "(\<lambda>i. f (i + n)) has_prod (a / (\<Prod>i<n. f i)) \<longleftrightarrow> f has_prod a" |
|
1511 |
by (simp add: assms has_prod_iff_shift) |
|
1512 |
||
1513 |
lemma has_prod_one_iff_shift: |
|
1514 |
assumes "\<And>i. i < n \<Longrightarrow> f i = 1" |
|
1515 |
shows "(\<lambda>i. f (i+n)) has_prod a \<longleftrightarrow> (\<lambda>i. f i) has_prod a" |
|
1516 |
by (simp add: assms has_prod_iff_shift) |
|
1517 |
||
73004 | 1518 |
lemma convergent_prod_iff_shift [simp]: |
68361 | 1519 |
shows "convergent_prod (\<lambda>i. f (i + n)) \<longleftrightarrow> convergent_prod f" |
1520 |
apply safe |
|
1521 |
using convergent_prod_offset apply blast |
|
1522 |
using convergent_prod_ignore_initial_segment convergent_prod_def by blast |
|
1523 |
||
1524 |
lemma has_prod_split_initial_segment: |
|
1525 |
assumes "f has_prod a" "\<And>i. i < n \<Longrightarrow> f i \<noteq> 0" |
|
1526 |
shows "(\<lambda>i. f (i + n)) has_prod (a / (\<Prod>i<n. f i))" |
|
1527 |
using assms has_prod_iff_shift' by blast |
|
1528 |
||
1529 |
lemma prodinf_divide_initial_segment: |
|
1530 |
assumes "convergent_prod f" "\<And>i. i < n \<Longrightarrow> f i \<noteq> 0" |
|
1531 |
shows "(\<Prod>i. f (i + n)) = (\<Prod>i. f i) / (\<Prod>i<n. f i)" |
|
1532 |
by (rule has_prod_unique[symmetric]) (auto simp: assms has_prod_iff_shift) |
|
1533 |
||
1534 |
lemma prodinf_split_initial_segment: |
|
1535 |
assumes "convergent_prod f" "\<And>i. i < n \<Longrightarrow> f i \<noteq> 0" |
|
1536 |
shows "prodinf f = (\<Prod>i. f (i + n)) * (\<Prod>i<n. f i)" |
|
1537 |
by (auto simp add: assms prodinf_divide_initial_segment) |
|
1538 |
||
1539 |
lemma prodinf_split_head: |
|
1540 |
assumes "convergent_prod f" "f 0 \<noteq> 0" |
|
1541 |
shows "(\<Prod>n. f (Suc n)) = prodinf f / f 0" |
|
1542 |
using prodinf_split_initial_segment[of 1] assms by simp |
|
1543 |
||
76722
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1544 |
lemma has_prod_ignore_initial_segment': |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1545 |
assumes "convergent_prod f" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1546 |
shows "f has_prod ((\<Prod>k<n. f k) * (\<Prod>k. f (k + n)))" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1547 |
proof (cases "\<exists>k<n. f k = 0") |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1548 |
case True |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1549 |
hence [simp]: "(\<Prod>k<n. f k) = 0" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1550 |
by (meson finite_lessThan lessThan_iff prod_zero) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1551 |
thus ?thesis using True assms |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1552 |
by (metis convergent_prod_has_prod_iff has_prod_zeroI mult_not_zero) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1553 |
next |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1554 |
case False |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1555 |
hence "(\<lambda>i. f (i + n)) has_prod (prodinf f / prod f {..<n})" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1556 |
using assms by (intro has_prod_split_initial_segment) (auto simp: convergent_prod_has_prod_iff) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1557 |
hence "prodinf f = prod f {..<n} * (\<Prod>k. f (k + n))" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1558 |
using False by (simp add: has_prod_iff divide_simps mult_ac) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1559 |
thus ?thesis |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1560 |
using assms by (simp add: convergent_prod_has_prod_iff) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1561 |
qed |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1562 |
|
68361 | 1563 |
end |
1564 |
||
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1565 |
context |
68361 | 1566 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_field" |
1567 |
begin |
|
1568 |
||
73005
83b114a6545f
A few more simprules for iff-reasoning
paulson <lp15@cam.ac.uk>
parents:
73004
diff
changeset
|
1569 |
lemma convergent_prod_inverse_iff [simp]: "convergent_prod (\<lambda>n. inverse (f n)) \<longleftrightarrow> convergent_prod f" |
68361 | 1570 |
by (auto dest: convergent_prod_inverse) |
1571 |
||
73005
83b114a6545f
A few more simprules for iff-reasoning
paulson <lp15@cam.ac.uk>
parents:
73004
diff
changeset
|
1572 |
lemma convergent_prod_const_iff [simp]: |
68361 | 1573 |
fixes c :: "'a :: {real_normed_field}" |
1574 |
shows "convergent_prod (\<lambda>_. c) \<longleftrightarrow> c = 1" |
|
1575 |
proof |
|
1576 |
assume "convergent_prod (\<lambda>_. c)" |
|
1577 |
then show "c = 1" |
|
1578 |
using convergent_prod_imp_LIMSEQ LIMSEQ_unique by blast |
|
1579 |
next |
|
1580 |
assume "c = 1" |
|
1581 |
then show "convergent_prod (\<lambda>_. c)" |
|
1582 |
by auto |
|
1583 |
qed |
|
1584 |
||
1585 |
lemma has_prod_power: "f has_prod a \<Longrightarrow> (\<lambda>i. f i ^ n) has_prod (a ^ n)" |
|
1586 |
by (induction n) (auto simp: has_prod_mult) |
|
1587 |
||
1588 |
lemma convergent_prod_power: "convergent_prod f \<Longrightarrow> convergent_prod (\<lambda>i. f i ^ n)" |
|
1589 |
by (induction n) (auto simp: convergent_prod_mult) |
|
1590 |
||
1591 |
lemma prodinf_power: "convergent_prod f \<Longrightarrow> prodinf (\<lambda>i. f i ^ n) = prodinf f ^ n" |
|
1592 |
by (metis has_prod_unique convergent_prod_imp_has_prod has_prod_power) |
|
1593 |
||
1594 |
end |
|
1595 |
||
82353
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1596 |
lemma prod_ge_prodinf: |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1597 |
fixes f :: "nat \<Rightarrow> 'a::{linordered_idom,linorder_topology}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1598 |
assumes "f has_prod a" "\<And>i. 0 \<le> f i" "\<And>i. i \<ge> n \<Longrightarrow> f i \<le> 1" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1599 |
shows "prod f {..<n} \<ge> prodinf f" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1600 |
proof (rule has_prod_le; (intro conjI)?) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1601 |
show "f has_prod prodinf f" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1602 |
using assms(1) has_prod_unique by blast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1603 |
show "(\<lambda>r. if r \<in> {..<n} then f r else 1) has_prod prod f {..<n}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1604 |
by (rule has_prod_If_finite_set) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1605 |
next |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1606 |
fix i |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1607 |
show "f i \<ge> 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1608 |
by (rule assms) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1609 |
show "f i \<le> (if i \<in> {..<n} then f i else 1)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1610 |
using assms(3)[of i] by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1611 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1612 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1613 |
lemma has_prod_less: |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1614 |
fixes F G :: real |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1615 |
assumes less: "f m < g m" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1616 |
assumes f: "f has_prod F" and g: "g has_prod G" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1617 |
assumes pos: "\<And>n. 0 < f n" and le: "\<And>n. f n \<le> g n" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1618 |
shows "F < G" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1619 |
proof - |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1620 |
define F' G' where "F' = (\<Prod>n<Suc m. f n)" and "G' = (\<Prod>n<Suc m. g n)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1621 |
have [simp]: "f n \<noteq> 0" "g n \<noteq> 0" for n |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1622 |
using pos[of n] le[of n] by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1623 |
have [simp]: "F' \<noteq> 0" "G' \<noteq> 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1624 |
by (auto simp: F'_def G'_def) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1625 |
have f': "(\<lambda>n. f (n + Suc m)) has_prod (F / F')" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1626 |
unfolding F'_def using f |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1627 |
by (intro has_prod_split_initial_segment) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1628 |
have g': "(\<lambda>n. g (n + Suc m)) has_prod (G / G')" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1629 |
unfolding G'_def using g |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1630 |
by (intro has_prod_split_initial_segment) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1631 |
have "F' * (F / F') < G' * (F / F')" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1632 |
proof (rule mult_strict_right_mono) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1633 |
show "F' < G'" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1634 |
unfolding F'_def G'_def |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1635 |
by (rule prod_mono_strict[of m]) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1636 |
(auto intro: le less_imp_le[OF pos] less_le_trans[OF pos le] less) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1637 |
show "F / F' > 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1638 |
using f' by (rule has_prod_pos) (use pos in auto) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1639 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1640 |
also have "\<dots> \<le> G' * (G / G')" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1641 |
proof (rule mult_left_mono) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1642 |
show "F / F' \<le> G / G'" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1643 |
using f' g' by (rule has_prod_le) (auto intro: less_imp_le[OF pos] le) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1644 |
show "G' \<ge> 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1645 |
unfolding G'_def by (intro prod_nonneg order.trans[OF less_imp_le[OF pos] le]) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1646 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1647 |
finally show ?thesis |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1648 |
by simp |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1649 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
1650 |
|
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1651 |
|
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1652 |
subsection\<open>Exponentials and logarithms\<close> |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1653 |
|
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1654 |
context |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1655 |
fixes f :: "nat \<Rightarrow> 'a::{real_normed_field,banach}" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1656 |
begin |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1657 |
|
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1658 |
lemma sums_imp_has_prod_exp: |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1659 |
assumes "f sums s" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1660 |
shows "raw_has_prod (\<lambda>i. exp (f i)) 0 (exp s)" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1661 |
using assms continuous_on_exp [of UNIV "\<lambda>x::'a. x"] |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1662 |
using continuous_on_tendsto_compose [of UNIV exp "(\<lambda>n. sum f {..n})" s] |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1663 |
by (simp add: prod_defs sums_def_le exp_sum) |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1664 |
|
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1665 |
lemma convergent_prod_exp: |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1666 |
assumes "summable f" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1667 |
shows "convergent_prod (\<lambda>i. exp (f i))" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1668 |
using sums_imp_has_prod_exp assms unfolding summable_def convergent_prod_def by blast |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1669 |
|
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1670 |
lemma prodinf_exp: |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1671 |
assumes "summable f" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1672 |
shows "prodinf (\<lambda>i. exp (f i)) = exp (suminf f)" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1673 |
proof - |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1674 |
have "f sums suminf f" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1675 |
using assms by blast |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1676 |
then have "(\<lambda>i. exp (f i)) has_prod exp (suminf f)" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1677 |
by (simp add: has_prod_def sums_imp_has_prod_exp) |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1678 |
then show ?thesis |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1679 |
by (rule has_prod_unique [symmetric]) |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1680 |
qed |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1681 |
|
68361 | 1682 |
end |
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1683 |
|
68651 | 1684 |
theorem convergent_prod_iff_summable_real: |
68585 | 1685 |
fixes a :: "nat \<Rightarrow> real" |
1686 |
assumes "\<And>n. a n > 0" |
|
1687 |
shows "convergent_prod (\<lambda>k. 1 + a k) \<longleftrightarrow> summable a" (is "?lhs = ?rhs") |
|
1688 |
proof |
|
1689 |
assume ?lhs |
|
1690 |
then obtain p where "raw_has_prod (\<lambda>k. 1 + a k) 0 p" |
|
1691 |
by (metis assms add_less_same_cancel2 convergent_prod_offset_0 not_one_less_zero) |
|
1692 |
then have to_p: "(\<lambda>n. \<Prod>k\<le>n. 1 + a k) \<longlonglongrightarrow> p" |
|
1693 |
by (auto simp: raw_has_prod_def) |
|
1694 |
moreover have le: "(\<Sum>k\<le>n. a k) \<le> (\<Prod>k\<le>n. 1 + a k)" for n |
|
1695 |
by (rule sum_le_prod) (use assms less_le in force) |
|
1696 |
have "(\<Prod>k\<le>n. 1 + a k) \<le> p" for n |
|
1697 |
proof (rule incseq_le [OF _ to_p]) |
|
1698 |
show "incseq (\<lambda>n. \<Prod>k\<le>n. 1 + a k)" |
|
1699 |
using assms by (auto simp: mono_def order.strict_implies_order intro!: prod_mono2) |
|
1700 |
qed |
|
1701 |
with le have "(\<Sum>k\<le>n. a k) \<le> p" for n |
|
1702 |
by (metis order_trans) |
|
1703 |
with assms bounded_imp_summable show ?rhs |
|
1704 |
by (metis not_less order.asym) |
|
1705 |
next |
|
1706 |
assume R: ?rhs |
|
1707 |
have "(\<Prod>k\<le>n. 1 + a k) \<le> exp (suminf a)" for n |
|
1708 |
proof - |
|
1709 |
have "(\<Prod>k\<le>n. 1 + a k) \<le> exp (\<Sum>k\<le>n. a k)" for n |
|
1710 |
by (rule prod_le_exp_sum) (use assms less_le in force) |
|
1711 |
moreover have "exp (\<Sum>k\<le>n. a k) \<le> exp (suminf a)" for n |
|
1712 |
unfolding exp_le_cancel_iff |
|
1713 |
by (meson sum_le_suminf R assms finite_atMost less_eq_real_def) |
|
1714 |
ultimately show ?thesis |
|
1715 |
by (meson order_trans) |
|
1716 |
qed |
|
1717 |
then obtain L where L: "(\<lambda>n. \<Prod>k\<le>n. 1 + a k) \<longlonglongrightarrow> L" |
|
1718 |
by (metis assms bounded_imp_convergent_prod convergent_prod_iff_nz_lim le_add_same_cancel1 le_add_same_cancel2 less_le not_le zero_le_one) |
|
1719 |
moreover have "L \<noteq> 0" |
|
1720 |
proof |
|
1721 |
assume "L = 0" |
|
1722 |
with L have "(\<lambda>n. \<Prod>k\<le>n. 1 + a k) \<longlonglongrightarrow> 0" |
|
1723 |
by simp |
|
1724 |
moreover have "(\<Prod>k\<le>n. 1 + a k) > 1" for n |
|
1725 |
by (simp add: assms less_1_prod) |
|
1726 |
ultimately show False |
|
1727 |
by (meson Lim_bounded2 not_one_le_zero less_imp_le) |
|
1728 |
qed |
|
1729 |
ultimately show ?lhs |
|
1730 |
using assms convergent_prod_iff_nz_lim |
|
1731 |
by (metis add_less_same_cancel1 less_le not_le zero_less_one) |
|
1732 |
qed |
|
1733 |
||
68452
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1734 |
lemma exp_suminf_prodinf_real: |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1735 |
fixes f :: "nat \<Rightarrow> real" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1736 |
assumes ge0:"\<And>n. f n \<ge> 0" and ac: "abs_convergent_prod (\<lambda>n. exp (f n))" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1737 |
shows "prodinf (\<lambda>i. exp (f i)) = exp (suminf f)" |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1738 |
proof - |
68517 | 1739 |
have "summable f" |
68452
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1740 |
using ac unfolding abs_convergent_prod_conv_summable |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1741 |
proof (elim summable_comparison_test') |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1742 |
fix n |
68517 | 1743 |
have "\<bar>f n\<bar> = f n" |
1744 |
by (simp add: ge0) |
|
1745 |
also have "\<dots> \<le> exp (f n) - 1" |
|
1746 |
by (metis diff_diff_add exp_ge_add_one_self ge_iff_diff_ge_0) |
|
1747 |
finally show "norm (f n) \<le> norm (exp (f n) - 1)" |
|
1748 |
by simp |
|
68452
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1749 |
qed |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1750 |
then show ?thesis |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1751 |
by (simp add: prodinf_exp) |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1752 |
qed |
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
paulson <lp15@cam.ac.uk>
parents:
68426
diff
changeset
|
1753 |
|
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1754 |
lemma has_prod_imp_sums_ln_real: |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1755 |
fixes f :: "nat \<Rightarrow> real" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1756 |
assumes "raw_has_prod f 0 p" and 0: "\<And>x. f x > 0" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1757 |
shows "(\<lambda>i. ln (f i)) sums (ln p)" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1758 |
proof - |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1759 |
have "p > 0" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1760 |
using assms unfolding prod_defs by (metis LIMSEQ_prod_nonneg less_eq_real_def) |
80521
5c691b178e08
Totalisation of ln and therefore log and powr
paulson <lp15@cam.ac.uk>
parents:
76724
diff
changeset
|
1761 |
moreover have "\<And>x. f x \<noteq> 0" |
5c691b178e08
Totalisation of ln and therefore log and powr
paulson <lp15@cam.ac.uk>
parents:
76724
diff
changeset
|
1762 |
by (smt (verit, best) "0") |
5c691b178e08
Totalisation of ln and therefore log and powr
paulson <lp15@cam.ac.uk>
parents:
76724
diff
changeset
|
1763 |
ultimately show ?thesis |
5c691b178e08
Totalisation of ln and therefore log and powr
paulson <lp15@cam.ac.uk>
parents:
76724
diff
changeset
|
1764 |
using assms continuous_on_ln [of "{0<..}" "\<lambda>x. x"] |
5c691b178e08
Totalisation of ln and therefore log and powr
paulson <lp15@cam.ac.uk>
parents:
76724
diff
changeset
|
1765 |
using continuous_on_tendsto_compose [of "{0<..}" ln "(\<lambda>n. prod f {..n})" p] |
5c691b178e08
Totalisation of ln and therefore log and powr
paulson <lp15@cam.ac.uk>
parents:
76724
diff
changeset
|
1766 |
by (auto simp: prod_defs sums_def_le ln_prod order_tendstoD) |
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1767 |
qed |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1768 |
|
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1769 |
lemma summable_ln_real: |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1770 |
fixes f :: "nat \<Rightarrow> real" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1771 |
assumes f: "convergent_prod f" and 0: "\<And>x. f x > 0" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1772 |
shows "summable (\<lambda>i. ln (f i))" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1773 |
proof - |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1774 |
obtain M p where "raw_has_prod f M p" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1775 |
using f convergent_prod_def by blast |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1776 |
then consider i where "i<M" "f i = 0" | p where "raw_has_prod f 0 p" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1777 |
using raw_has_prod_cases by blast |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1778 |
then show ?thesis |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1779 |
proof cases |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1780 |
case 1 |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1781 |
with 0 show ?thesis |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1782 |
by (metis less_irrefl) |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1783 |
next |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1784 |
case 2 |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1785 |
then show ?thesis |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1786 |
using "0" has_prod_imp_sums_ln_real summable_def by blast |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1787 |
qed |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1788 |
qed |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1789 |
|
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1790 |
lemma suminf_ln_real: |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1791 |
fixes f :: "nat \<Rightarrow> real" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1792 |
assumes f: "convergent_prod f" and 0: "\<And>x. f x > 0" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1793 |
shows "suminf (\<lambda>i. ln (f i)) = ln (prodinf f)" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1794 |
proof - |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1795 |
have "f has_prod prodinf f" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1796 |
by (simp add: f has_prod_iff) |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1797 |
then have "raw_has_prod f 0 (prodinf f)" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1798 |
by (metis "0" has_prod_def less_irrefl) |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1799 |
then have "(\<lambda>i. ln (f i)) sums ln (prodinf f)" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1800 |
using "0" has_prod_imp_sums_ln_real by blast |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1801 |
then show ?thesis |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1802 |
by (rule sums_unique [symmetric]) |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1803 |
qed |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1804 |
|
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1805 |
lemma prodinf_exp_real: |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1806 |
fixes f :: "nat \<Rightarrow> real" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1807 |
assumes f: "convergent_prod f" and 0: "\<And>x. f x > 0" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1808 |
shows "prodinf f = exp (suminf (\<lambda>i. ln (f i)))" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1809 |
by (simp add: "0" f less_0_prodinf suminf_ln_real) |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1810 |
|
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
1811 |
|
68651 | 1812 |
theorem Ln_prodinf_complex: |
68585 | 1813 |
fixes z :: "nat \<Rightarrow> complex" |
1814 |
assumes z: "\<And>j. z j \<noteq> 0" and \<xi>: "\<xi> \<noteq> 0" |
|
1815 |
shows "((\<lambda>n. \<Prod>j\<le>n. z j) \<longlonglongrightarrow> \<xi>) \<longleftrightarrow> (\<exists>k. (\<lambda>n. (\<Sum>j\<le>n. Ln (z j))) \<longlonglongrightarrow> Ln \<xi> + of_int k * (of_real(2*pi) * \<i>))" (is "?lhs = ?rhs") |
|
1816 |
proof |
|
1817 |
assume L: ?lhs |
|
1818 |
have pnz: "(\<Prod>j\<le>n. z j) \<noteq> 0" for n |
|
1819 |
using z by auto |
|
1820 |
define \<Theta> where "\<Theta> \<equiv> Arg \<xi> + 2*pi" |
|
1821 |
then have "\<Theta> > pi" |
|
1822 |
using Arg_def mpi_less_Im_Ln by fastforce |
|
1823 |
have \<xi>_eq: "\<xi> = cmod \<xi> * exp (\<i> * \<Theta>)" |
|
1824 |
using Arg_def Arg_eq \<xi> unfolding \<Theta>_def by (simp add: algebra_simps exp_add) |
|
1825 |
define \<theta> where "\<theta> \<equiv> \<lambda>n. THE t. is_Arg (\<Prod>j\<le>n. z j) t \<and> t \<in> {\<Theta>-pi<..\<Theta>+pi}" |
|
1826 |
have uniq: "\<exists>!s. is_Arg (\<Prod>j\<le>n. z j) s \<and> s \<in> {\<Theta>-pi<..\<Theta>+pi}" for n |
|
1827 |
using Argument_exists_unique [OF pnz] by metis |
|
1828 |
have \<theta>: "is_Arg (\<Prod>j\<le>n. z j) (\<theta> n)" and \<theta>_interval: "\<theta> n \<in> {\<Theta>-pi<..\<Theta>+pi}" for n |
|
1829 |
unfolding \<theta>_def |
|
1830 |
using theI' [OF uniq] by metis+ |
|
1831 |
have \<theta>_pos: "\<And>j. \<theta> j > 0" |
|
1832 |
using \<theta>_interval \<open>\<Theta> > pi\<close> by simp (meson diff_gt_0_iff_gt less_trans) |
|
1833 |
have "(\<Prod>j\<le>n. z j) = cmod (\<Prod>j\<le>n. z j) * exp (\<i> * \<theta> n)" for n |
|
1834 |
using \<theta> by (auto simp: is_Arg_def) |
|
1835 |
then have eq: "(\<lambda>n. \<Prod>j\<le>n. z j) = (\<lambda>n. cmod (\<Prod>j\<le>n. z j) * exp (\<i> * \<theta> n))" |
|
1836 |
by simp |
|
1837 |
then have "(\<lambda>n. (cmod (\<Prod>j\<le>n. z j)) * exp (\<i> * (\<theta> n))) \<longlonglongrightarrow> \<xi>" |
|
1838 |
using L by force |
|
1839 |
then obtain k where k: "(\<lambda>j. \<theta> j - of_int (k j) * (2 * pi)) \<longlonglongrightarrow> \<Theta>" |
|
1840 |
using L by (subst (asm) \<xi>_eq) (auto simp add: eq z \<xi> polar_convergence) |
|
1841 |
moreover have "\<forall>\<^sub>F n in sequentially. k n = 0" |
|
1842 |
proof - |
|
1843 |
have *: "kj = 0" if "dist (vj - real_of_int kj * 2) V < 1" "vj \<in> {V - 1<..V + 1}" for kj vj V |
|
1844 |
using that by (auto simp: dist_norm) |
|
1845 |
have "\<forall>\<^sub>F j in sequentially. dist (\<theta> j - of_int (k j) * (2 * pi)) \<Theta> < pi" |
|
1846 |
using tendstoD [OF k] pi_gt_zero by blast |
|
1847 |
then show ?thesis |
|
1848 |
proof (rule eventually_mono) |
|
1849 |
fix j |
|
1850 |
assume d: "dist (\<theta> j - real_of_int (k j) * (2 * pi)) \<Theta> < pi" |
|
1851 |
show "k j = 0" |
|
1852 |
by (rule * [of "\<theta> j/pi" _ "\<Theta>/pi"]) |
|
1853 |
(use \<theta>_interval [of j] d in \<open>simp_all add: divide_simps dist_norm\<close>) |
|
1854 |
qed |
|
1855 |
qed |
|
1856 |
ultimately have \<theta>to\<Theta>: "\<theta> \<longlonglongrightarrow> \<Theta>" |
|
1857 |
apply (simp only: tendsto_def) |
|
1858 |
apply (erule all_forward imp_forward asm_rl)+ |
|
1859 |
apply (drule (1) eventually_conj) |
|
1860 |
apply (auto elim: eventually_mono) |
|
1861 |
done |
|
1862 |
then have to0: "(\<lambda>n. \<bar>\<theta> (Suc n) - \<theta> n\<bar>) \<longlonglongrightarrow> 0" |
|
1863 |
by (metis (full_types) diff_self filterlim_sequentially_Suc tendsto_diff tendsto_rabs_zero) |
|
1864 |
have "\<exists>k. Im (\<Sum>j\<le>n. Ln (z j)) - of_int k * (2*pi) = \<theta> n" for n |
|
1865 |
proof (rule is_Arg_exp_diff_2pi) |
|
1866 |
show "is_Arg (exp (\<Sum>j\<le>n. Ln (z j))) (\<theta> n)" |
|
1867 |
using pnz \<theta> by (simp add: is_Arg_def exp_sum prod_norm) |
|
1868 |
qed |
|
1869 |
then have "\<exists>k. (\<Sum>j\<le>n. Im (Ln (z j))) = \<theta> n + of_int k * (2*pi)" for n |
|
1870 |
by (simp add: algebra_simps) |
|
1871 |
then obtain k where k: "\<And>n. (\<Sum>j\<le>n. Im (Ln (z j))) = \<theta> n + of_int (k n) * (2*pi)" |
|
1872 |
by metis |
|
1873 |
obtain K where "\<forall>\<^sub>F n in sequentially. k n = K" |
|
1874 |
proof - |
|
1875 |
have k_le: "(2*pi) * \<bar>k (Suc n) - k n\<bar> \<le> \<bar>\<theta> (Suc n) - \<theta> n\<bar> + \<bar>Im (Ln (z (Suc n)))\<bar>" for n |
|
1876 |
proof - |
|
1877 |
have "(\<Sum>j\<le>Suc n. Im (Ln (z j))) - (\<Sum>j\<le>n. Im (Ln (z j))) = Im (Ln (z (Suc n)))" |
|
1878 |
by simp |
|
1879 |
then show ?thesis |
|
1880 |
using k [of "Suc n"] k [of n] by (auto simp: abs_if algebra_simps) |
|
1881 |
qed |
|
1882 |
have "z \<longlonglongrightarrow> 1" |
|
1883 |
using L \<xi> convergent_prod_iff_nz_lim z by (blast intro: convergent_prod_imp_LIMSEQ) |
|
1884 |
with z have "(\<lambda>n. Ln (z n)) \<longlonglongrightarrow> Ln 1" |
|
1885 |
using isCont_tendsto_compose [OF continuous_at_Ln] nonpos_Reals_one_I by blast |
|
1886 |
then have "(\<lambda>n. Ln (z n)) \<longlonglongrightarrow> 0" |
|
1887 |
by simp |
|
1888 |
then have "(\<lambda>n. \<bar>Im (Ln (z (Suc n)))\<bar>) \<longlonglongrightarrow> 0" |
|
1889 |
by (metis LIMSEQ_unique \<open>z \<longlonglongrightarrow> 1\<close> continuous_at_Ln filterlim_sequentially_Suc isCont_tendsto_compose nonpos_Reals_one_I tendsto_Im tendsto_rabs_zero_iff zero_complex.simps(2)) |
|
1890 |
then have "\<forall>\<^sub>F n in sequentially. \<bar>Im (Ln (z (Suc n)))\<bar> < 1" |
|
1891 |
by (simp add: order_tendsto_iff) |
|
1892 |
moreover have "\<forall>\<^sub>F n in sequentially. \<bar>\<theta> (Suc n) - \<theta> n\<bar> < 1" |
|
1893 |
using to0 by (simp add: order_tendsto_iff) |
|
1894 |
ultimately have "\<forall>\<^sub>F n in sequentially. (2*pi) * \<bar>k (Suc n) - k n\<bar> < 1 + 1" |
|
1895 |
proof (rule eventually_elim2) |
|
1896 |
fix n |
|
1897 |
assume "\<bar>Im (Ln (z (Suc n)))\<bar> < 1" and "\<bar>\<theta> (Suc n) - \<theta> n\<bar> < 1" |
|
1898 |
with k_le [of n] show "2 * pi * real_of_int \<bar>k (Suc n) - k n\<bar> < 1 + 1" |
|
1899 |
by linarith |
|
1900 |
qed |
|
1901 |
then have "\<forall>\<^sub>F n in sequentially. real_of_int\<bar>k (Suc n) - k n\<bar> < 1" |
|
1902 |
proof (rule eventually_mono) |
|
1903 |
fix n :: "nat" |
|
1904 |
assume "2 * pi * \<bar>k (Suc n) - k n\<bar> < 1 + 1" |
|
1905 |
then have "\<bar>k (Suc n) - k n\<bar> < 2 / (2*pi)" |
|
1906 |
by (simp add: field_simps) |
|
1907 |
also have "... < 1" |
|
1908 |
using pi_ge_two by auto |
|
1909 |
finally show "real_of_int \<bar>k (Suc n) - k n\<bar> < 1" . |
|
1910 |
qed |
|
1911 |
then obtain N where N: "\<And>n. n\<ge>N \<Longrightarrow> \<bar>k (Suc n) - k n\<bar> = 0" |
|
1912 |
using eventually_sequentially less_irrefl of_int_abs by fastforce |
|
1913 |
have "k (N+i) = k N" for i |
|
1914 |
proof (induction i) |
|
1915 |
case (Suc i) |
|
1916 |
with N [of "N+i"] show ?case |
|
1917 |
by auto |
|
1918 |
qed simp |
|
1919 |
then have "\<And>n. n\<ge>N \<Longrightarrow> k n = k N" |
|
1920 |
using le_Suc_ex by auto |
|
1921 |
then show ?thesis |
|
1922 |
by (force simp add: eventually_sequentially intro: that) |
|
1923 |
qed |
|
1924 |
with \<theta>to\<Theta> have "(\<lambda>n. (\<Sum>j\<le>n. Im (Ln (z j)))) \<longlonglongrightarrow> \<Theta> + of_int K * (2*pi)" |
|
70365
4df0628e8545
a few new lemmas and a bit of tidying
paulson <lp15@cam.ac.uk>
parents:
70136
diff
changeset
|
1925 |
by (simp add: k tendsto_add tendsto_mult tendsto_eventually) |
68585 | 1926 |
moreover have "(\<lambda>n. (\<Sum>k\<le>n. Re (Ln (z k)))) \<longlonglongrightarrow> Re (Ln \<xi>)" |
1927 |
using assms continuous_imp_tendsto [OF isCont_ln tendsto_norm [OF L]] |
|
1928 |
by (simp add: o_def flip: prod_norm ln_prod) |
|
1929 |
ultimately show ?rhs |
|
1930 |
by (rule_tac x="K+1" in exI) (auto simp: tendsto_complex_iff \<Theta>_def Arg_def assms algebra_simps) |
|
1931 |
next |
|
1932 |
assume ?rhs |
|
1933 |
then obtain r where r: "(\<lambda>n. (\<Sum>k\<le>n. Ln (z k))) \<longlonglongrightarrow> Ln \<xi> + of_int r * (of_real(2*pi) * \<i>)" .. |
|
1934 |
have "(\<lambda>n. exp (\<Sum>k\<le>n. Ln (z k))) \<longlonglongrightarrow> \<xi>" |
|
1935 |
using assms continuous_imp_tendsto [OF isCont_exp r] exp_integer_2pi [of r] |
|
1936 |
by (simp add: o_def exp_add algebra_simps) |
|
1937 |
moreover have "exp (\<Sum>k\<le>n. Ln (z k)) = (\<Prod>k\<le>n. z k)" for n |
|
1938 |
by (simp add: exp_sum add_eq_0_iff assms) |
|
1939 |
ultimately show ?lhs |
|
1940 |
by auto |
|
1941 |
qed |
|
1942 |
||
1943 |
text\<open>Prop 17.2 of Bak and Newman, Complex Analysis, p.242\<close> |
|
1944 |
proposition convergent_prod_iff_summable_complex: |
|
1945 |
fixes z :: "nat \<Rightarrow> complex" |
|
1946 |
assumes "\<And>k. z k \<noteq> 0" |
|
1947 |
shows "convergent_prod (\<lambda>k. z k) \<longleftrightarrow> summable (\<lambda>k. Ln (z k))" (is "?lhs = ?rhs") |
|
1948 |
proof |
|
1949 |
assume ?lhs |
|
1950 |
then obtain p where p: "(\<lambda>n. \<Prod>k\<le>n. z k) \<longlonglongrightarrow> p" and "p \<noteq> 0" |
|
1951 |
using convergent_prod_LIMSEQ prodinf_nonzero add_eq_0_iff assms by fastforce |
|
1952 |
then show ?rhs |
|
1953 |
using Ln_prodinf_complex assms |
|
1954 |
by (auto simp: prodinf_nonzero summable_def sums_def_le) |
|
1955 |
next |
|
1956 |
assume R: ?rhs |
|
1957 |
have "(\<Prod>k\<le>n. z k) = exp (\<Sum>k\<le>n. Ln (z k))" for n |
|
1958 |
by (simp add: exp_sum add_eq_0_iff assms) |
|
1959 |
then have "(\<lambda>n. \<Prod>k\<le>n. z k) \<longlonglongrightarrow> exp (suminf (\<lambda>k. Ln (z k)))" |
|
1960 |
using continuous_imp_tendsto [OF isCont_exp summable_LIMSEQ' [OF R]] by (simp add: o_def) |
|
1961 |
then show ?lhs |
|
1962 |
by (subst convergent_prod_iff_convergent) (auto simp: convergent_def tendsto_Lim assms add_eq_0_iff) |
|
1963 |
qed |
|
1964 |
||
68586
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
1965 |
text\<open>Prop 17.3 of Bak and Newman, Complex Analysis\<close> |
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
1966 |
proposition summable_imp_convergent_prod_complex: |
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
1967 |
fixes z :: "nat \<Rightarrow> complex" |
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
1968 |
assumes z: "summable (\<lambda>k. norm (z k))" and non0: "\<And>k. z k \<noteq> -1" |
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
1969 |
shows "convergent_prod (\<lambda>k. 1 + z k)" |
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
1970 |
proof - |
76722
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1971 |
obtain N where "\<And>k. k\<ge>N \<Longrightarrow> norm (z k) < 1/2" |
68586
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
1972 |
using summable_LIMSEQ_zero [OF z] |
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
1973 |
by (metis diff_zero dist_norm half_gt_zero_iff less_numeral_extra(1) lim_sequentially tendsto_norm_zero_iff) |
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
1974 |
then have "summable (\<lambda>k. Ln (1 + z k))" |
76722
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1975 |
by (metis norm_Ln_le summable_comparison_test summable_mult z) |
68586
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
1976 |
with non0 show ?thesis |
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
1977 |
by (simp add: add_eq_0_iff convergent_prod_iff_summable_complex) |
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
1978 |
qed |
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
1979 |
|
76722
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1980 |
corollary summable_imp_convergent_prod_real: |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1981 |
fixes z :: "nat \<Rightarrow> real" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1982 |
assumes z: "summable (\<lambda>k. \<bar>z k\<bar>)" and non0: "\<And>k. z k \<noteq> -1" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1983 |
shows "convergent_prod (\<lambda>k. 1 + z k)" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1984 |
proof - |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1985 |
have "\<And>k. (complex_of_real \<circ> z) k \<noteq> - 1" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1986 |
by (metis non0 o_apply of_real_1 of_real_eq_iff of_real_minus) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1987 |
with z |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1988 |
have "convergent_prod (\<lambda>k. 1 + (complex_of_real \<circ> z) k)" |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1989 |
by (auto intro: summable_imp_convergent_prod_complex) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1990 |
then show ?thesis |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1991 |
using convergent_prod_of_real_iff [of "\<lambda>k. 1 + z k"] by (simp add: o_def) |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1992 |
qed |
b1d57dd345e1
First round of moving material from the number theory development
paulson <lp15@cam.ac.uk>
parents:
75711
diff
changeset
|
1993 |
|
68616 | 1994 |
lemma summable_Ln_complex: |
1995 |
fixes z :: "nat \<Rightarrow> complex" |
|
1996 |
assumes "convergent_prod z" "\<And>k. z k \<noteq> 0" |
|
1997 |
shows "summable (\<lambda>k. Ln (z k))" |
|
1998 |
using convergent_prod_def assms convergent_prod_iff_summable_complex by blast |
|
1999 |
||
68586
006da53a8ac1
infinite products: the final piece
paulson <lp15@cam.ac.uk>
parents:
68585
diff
changeset
|
2000 |
|
70136 | 2001 |
subsection\<^marker>\<open>tag unimportant\<close> \<open>Embeddings from the reals into some complete real normed field\<close> |
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2002 |
|
68426 | 2003 |
lemma tendsto_eq_of_real_lim: |
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2004 |
assumes "(\<lambda>n. of_real (f n) :: 'a::{complete_space,real_normed_field}) \<longlonglongrightarrow> q" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2005 |
shows "q = of_real (lim f)" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2006 |
proof - |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2007 |
have "convergent (\<lambda>n. of_real (f n) :: 'a)" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2008 |
using assms convergent_def by blast |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2009 |
then have "convergent f" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2010 |
unfolding convergent_def |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2011 |
by (simp add: convergent_eq_Cauchy Cauchy_def) |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2012 |
then show ?thesis |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2013 |
by (metis LIMSEQ_unique assms convergentD sequentially_bot tendsto_Lim tendsto_of_real) |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2014 |
qed |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2015 |
|
68426 | 2016 |
lemma tendsto_eq_of_real: |
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2017 |
assumes "(\<lambda>n. of_real (f n) :: 'a::{complete_space,real_normed_field}) \<longlonglongrightarrow> q" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2018 |
obtains r where "q = of_real r" |
68426 | 2019 |
using tendsto_eq_of_real_lim assms by blast |
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2020 |
|
73005
83b114a6545f
A few more simprules for iff-reasoning
paulson <lp15@cam.ac.uk>
parents:
73004
diff
changeset
|
2021 |
lemma has_prod_of_real_iff [simp]: |
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2022 |
"(\<lambda>n. of_real (f n) :: 'a::{complete_space,real_normed_field}) has_prod of_real c \<longleftrightarrow> f has_prod c" |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2023 |
(is "?lhs = ?rhs") |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2024 |
proof |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2025 |
assume ?lhs |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2026 |
then show ?rhs |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2027 |
apply (auto simp: prod_defs LIMSEQ_prod_0 tendsto_of_real_iff simp flip: of_real_prod) |
68426 | 2028 |
using tendsto_eq_of_real |
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2029 |
by (metis of_real_0 tendsto_of_real_iff) |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2030 |
next |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2031 |
assume ?rhs |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2032 |
with tendsto_of_real_iff show ?lhs |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2033 |
by (fastforce simp: prod_defs simp flip: of_real_prod) |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2034 |
qed |
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2035 |
|
82353
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2036 |
subsection \<open>Convergence criteria: especially uniform convergence of infinite products\<close> |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2037 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2038 |
text \<open> |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2039 |
Cauchy's criterion for the convergence of infinite products, adapted to proving |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2040 |
uniform convergence: let $f_k(x)$ be a sequence of functions such that |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2041 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2042 |
\<^enum> $f_k(x)$ has uniformly bounded partial products, i.e.\ there exists a constant \<open>C\<close> |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2043 |
such that $\prod_{k=0}^m f_k(x) \leq C$ for all $m$ and $x\in A$. |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2044 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2045 |
\<^enum> For any $\varepsilon > 0$ there exists a number $M \in \mathbb{N}$ such that, for any |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2046 |
$m, n \geq M$ and all $x\in A$ we have $|(\prod_{k=m}^n f_k(x)) - 1| < \varepsilon$ |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2047 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2048 |
Then $\prod_{k=0}^n f_k(x)$ converges to $\prod_{k=0}^\infty f_k(x)$ uniformly for all |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2049 |
$x \in A$. |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2050 |
\<close> |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2051 |
lemma uniformly_convergent_prod_Cauchy: |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2052 |
fixes f :: "nat \<Rightarrow> 'a :: topological_space \<Rightarrow> 'b :: {real_normed_div_algebra, comm_ring_1, banach}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2053 |
assumes C: "\<And>x m. x \<in> A \<Longrightarrow> norm (\<Prod>k<m. f k x) \<le> C" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2054 |
assumes "\<And>e. e > 0 \<Longrightarrow> \<exists>M. \<forall>x\<in>A. \<forall>m\<ge>M. \<forall>n\<ge>m. dist (\<Prod>k=m..n. f k x) 1 < e" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2055 |
shows "uniformly_convergent_on A (\<lambda>N x. \<Prod>n<N. f n x)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2056 |
proof (rule Cauchy_uniformly_convergent, rule uniformly_Cauchy_onI') |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2057 |
fix \<epsilon> :: real assume \<epsilon>: "\<epsilon> > 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2058 |
define C' where "C' = max C 1" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2059 |
have C': "C' > 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2060 |
by (auto simp: C'_def) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2061 |
define \<delta> where "\<delta> = Min {2 / 3 * \<epsilon> / C', 1 / 2}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2062 |
from \<epsilon> have "\<delta> > 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2063 |
using \<open>C' > 0\<close> by (auto simp: \<delta>_def) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2064 |
obtain M where M: "\<And>x m n. x \<in> A \<Longrightarrow> m \<ge> M \<Longrightarrow> n \<ge> m \<Longrightarrow> dist (\<Prod>k=m..n. f k x) 1 < \<delta>" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2065 |
using \<open>\<delta> > 0\<close> assms by fast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2066 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2067 |
show "\<exists>M. \<forall>x\<in>A. \<forall>m\<ge>M. \<forall>n>m. dist (\<Prod>k<m. f k x) (\<Prod>k<n. f k x) < \<epsilon>" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2068 |
proof (rule exI, intro ballI allI impI) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2069 |
fix x m n |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2070 |
assume x: "x \<in> A" and mn: "M + 1 \<le> m" "m < n" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2071 |
show "dist (\<Prod>k<m. f k x) (\<Prod>k<n. f k x) < \<epsilon>" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2072 |
proof (cases "\<exists>k<m. f k x = 0") |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2073 |
case True |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2074 |
hence "(\<Prod>k<m. f k x) = 0" and "(\<Prod>k<n. f k x) = 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2075 |
using mn x by (auto intro!: prod_zero) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2076 |
thus ?thesis |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2077 |
using \<epsilon> by simp |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2078 |
next |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2079 |
case False |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2080 |
have *: "{..<n} = {..<m} \<union> {m..n-1}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2081 |
using mn by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2082 |
have "dist (\<Prod>k<m. f k x) (\<Prod>k<n. f k x) = norm ((\<Prod>k<m. f k x) * ((\<Prod>k=m..n-1. f k x) - 1))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2083 |
unfolding * by (subst prod.union_disjoint) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2084 |
(use mn in \<open>auto simp: dist_norm algebra_simps norm_minus_commute\<close>) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2085 |
also have "\<dots> = (\<Prod>k<m. norm (f k x)) * dist (\<Prod>k=m..n-1. f k x) 1" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2086 |
by (simp add: norm_mult dist_norm prod_norm) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2087 |
also have "\<dots> < (\<Prod>k<m. norm (f k x)) * (2 / 3 * \<epsilon> / C')" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2088 |
proof (rule mult_strict_left_mono) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2089 |
show "dist (\<Prod>k = m..n - 1. f k x) 1 < 2 / 3 * \<epsilon> / C'" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2090 |
using M[of x m "n-1"] x mn unfolding \<delta>_def by fastforce |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2091 |
qed (use False in \<open>auto intro!: prod_pos\<close>) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2092 |
also have "(\<Prod>k<m. norm (f k x)) = (\<Prod>k<M. norm (f k x)) * norm (\<Prod>k=M..<m. (f k x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2093 |
proof - |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2094 |
have *: "{..<m} = {..<M} \<union> {M..<m}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2095 |
using mn by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2096 |
show ?thesis |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2097 |
unfolding * using mn by (subst prod.union_disjoint) (auto simp: prod_norm) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2098 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2099 |
also have "norm (\<Prod>k=M..<m. (f k x)) \<le> 3 / 2" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2100 |
proof - |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2101 |
have "dist (\<Prod>k=M..m-1. f k x) 1 < \<delta>" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2102 |
using M[of x M "m-1"] x mn \<open>\<delta> > 0\<close> by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2103 |
also have "\<dots> \<le> 1 / 2" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2104 |
by (simp add: \<delta>_def) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2105 |
also have "{M..m-1} = {M..<m}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2106 |
using mn by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2107 |
finally have "norm (\<Prod>k=M..<m. f k x) \<le> norm (1 :: 'b) + 1 / 2" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2108 |
by norm |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2109 |
thus ?thesis |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2110 |
by simp |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2111 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2112 |
hence "(\<Prod>k<M. norm (f k x)) * norm (\<Prod>k = M..<m. f k x) * (2 / 3 * \<epsilon> / C') \<le> |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2113 |
(\<Prod>k<M. norm (f k x)) * (3 / 2) * (2 / 3 * \<epsilon> / C')" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2114 |
using \<epsilon> C' by (intro mult_left_mono mult_right_mono prod_nonneg) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2115 |
also have "\<dots> \<le> C' * (3 / 2) * (2 / 3 * \<epsilon> / C')" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2116 |
proof (intro mult_right_mono) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2117 |
have "(\<Prod>k<M. norm (f k x)) \<le> C" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2118 |
using C[of x M] x by (simp add: prod_norm) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2119 |
also have "\<dots> \<le> C'" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2120 |
by (simp add: C'_def) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2121 |
finally show "(\<Prod>k<M. norm (f k x)) \<le> C'" . |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2122 |
qed (use \<epsilon> C' in auto) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2123 |
finally show "dist (\<Prod>k<m. f k x) (\<Prod>k<n. f k x) < \<epsilon>" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2124 |
using \<open>C' > 0\<close> by (simp add: field_simps) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2125 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2126 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2127 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2128 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2129 |
text \<open> |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2130 |
By instantiating the set $A$ in this result with a singleton set, we obtain the ``normal'' |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2131 |
Cauchy criterion for infinite products: |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2132 |
\<close> |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2133 |
lemma convergent_prod_Cauchy_sufficient: |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2134 |
fixes f :: "nat \<Rightarrow> 'b :: {real_normed_div_algebra, comm_ring_1, banach}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2135 |
assumes "\<And>e. e > 0 \<Longrightarrow> \<exists>M. \<forall>m n. M \<le> m \<longrightarrow> m \<le> n \<longrightarrow> dist (\<Prod>k=m..n. f k) 1 < e" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2136 |
shows "convergent_prod f" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2137 |
proof - |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2138 |
obtain M where M: "\<And>m n. m \<ge> M \<Longrightarrow> n \<ge> m \<Longrightarrow> dist (prod f {m..n}) 1 < 1 / 2" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2139 |
using assms(1)[of "1 / 2"] by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2140 |
have nz: "f m \<noteq> 0" if "m \<ge> M" for m |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2141 |
using M[of m m] that by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2142 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2143 |
have M': "dist (prod (\<lambda>k. f (k + M)) {m..<n}) 1 < 1 / 2" for m n |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2144 |
proof (cases "m < n") |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2145 |
case True |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2146 |
have "dist (prod f {m+M..n-1+M}) 1 < 1 / 2" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2147 |
by (rule M) (use True in auto) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2148 |
also have "prod f {m+M..n-1+M} = prod (\<lambda>k. f (k + M)) {m..<n}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2149 |
by (rule prod.reindex_bij_witness[of _ "\<lambda>k. k + M" "\<lambda>k. k - M"]) (use True in auto) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2150 |
finally show ?thesis . |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2151 |
qed auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2152 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2153 |
have "uniformly_convergent_on {0::'b} (\<lambda>N x. \<Prod>n<N. f (n + M))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2154 |
proof (rule uniformly_convergent_prod_Cauchy) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2155 |
fix m :: nat |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2156 |
have "norm (\<Prod>k=0..<m. f (k + M)) < norm (1 :: 'b) + 1 / 2" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2157 |
using M'[of 0 m] by norm |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2158 |
thus "norm (\<Prod>k<m. f (k + M)) \<le> 3 / 2" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2159 |
by (simp add: atLeast0LessThan) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2160 |
next |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2161 |
fix e :: real assume e: "e > 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2162 |
obtain M' where M': "\<And>m n. M' \<le> m \<longrightarrow> m \<le> n \<longrightarrow> dist (\<Prod>k=m..n. f k) 1 < e" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2163 |
using assms e by blast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2164 |
show "\<exists>M'. \<forall>x\<in>{0}. \<forall>m\<ge>M'. \<forall>n\<ge>m. dist (\<Prod>k=m..n. f (k + M)) 1 < e" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2165 |
proof (rule exI[of _ M'], intro ballI impI allI) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2166 |
fix m n :: nat assume "M' \<le> m" "m \<le> n" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2167 |
thus "dist (\<Prod>k=m..n. f (k + M)) 1 < e" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2168 |
using M' by (metis add.commute add_left_mono prod.shift_bounds_cl_nat_ivl trans_le_add1) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2169 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2170 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2171 |
hence "convergent (\<lambda>N. \<Prod>n<N. f (n + M))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2172 |
by (rule uniformly_convergent_imp_convergent[of _ _ 0]) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2173 |
then obtain L where L: "(\<lambda>N. \<Prod>n<N. f (n + M)) \<longlonglongrightarrow> L" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2174 |
unfolding convergent_def by blast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2175 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2176 |
show ?thesis |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2177 |
unfolding convergent_prod_altdef |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2178 |
proof (rule exI[of _ M], rule exI[of _ L], intro conjI) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2179 |
show "\<forall>n\<ge>M. f n \<noteq> 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2180 |
using nz by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2181 |
next |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2182 |
show "(\<lambda>n. \<Prod>i\<le>n. f (i + M)) \<longlonglongrightarrow> L" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2183 |
using LIMSEQ_Suc[OF L] by (subst (asm) lessThan_Suc_atMost) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2184 |
next |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2185 |
have "norm L \<ge> 1 / 2" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2186 |
proof (rule tendsto_lowerbound) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2187 |
show "(\<lambda>n. norm (\<Prod>i<n. f (i + M))) \<longlonglongrightarrow> norm L" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2188 |
by (intro tendsto_intros L) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2189 |
show "\<forall>\<^sub>F n in sequentially. 1 / 2 \<le> norm (\<Prod>i<n. f (i + M))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2190 |
proof (intro always_eventually allI) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2191 |
fix m :: nat |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2192 |
have "norm (\<Prod>k=0..<m. f (k + M)) \<ge> norm (1 :: 'b) - 1 / 2" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2193 |
using M'[of 0 m] by norm |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2194 |
thus "norm (\<Prod>k<m. f (k + M)) \<ge> 1 / 2" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2195 |
by (simp add: atLeast0LessThan) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2196 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2197 |
qed auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2198 |
thus "L \<noteq> 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2199 |
by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2200 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2201 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2202 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2203 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2204 |
text \<open> |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2205 |
We now prove that the Cauchy criterion for pointwise convergence is both necessary |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2206 |
and sufficient. |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2207 |
\<close> |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2208 |
lemma convergent_prod_Cauchy_necessary: |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2209 |
fixes f :: "nat \<Rightarrow> 'b :: {real_normed_field, banach}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2210 |
assumes "convergent_prod f" "e > 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2211 |
shows "\<exists>M. \<forall>m n. M \<le> m \<longrightarrow> m \<le> n \<longrightarrow> dist (\<Prod>k=m..n. f k) 1 < e" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2212 |
proof - |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2213 |
have *: "\<exists>M. \<forall>m n. M \<le> m \<longrightarrow> m \<le> n \<longrightarrow> dist (\<Prod>k=m..n. f k) 1 < e" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2214 |
if f: "convergent_prod f" "0 \<notin> range f" and e: "e > 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2215 |
for f :: "nat \<Rightarrow> 'b" and e :: real |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2216 |
proof - |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2217 |
have *: "(\<lambda>n. norm (\<Prod>k<n. f k)) \<longlonglongrightarrow> norm (\<Prod>k. f k)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2218 |
using has_prod_imp_tendsto' f(1) by (intro tendsto_norm) blast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2219 |
from f(1,2) have [simp]: "(\<Prod>k. f k) \<noteq> 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2220 |
using prodinf_nonzero by fastforce |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2221 |
obtain M' where M': "norm (\<Prod>k<m. f k) > norm (\<Prod>k. f k) / 2" if "m \<ge> M'" for m |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2222 |
using order_tendstoD(1)[OF *, of "norm (\<Prod>k. f k) / 2"] |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2223 |
by (auto simp: eventually_at_top_linorder) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2224 |
define M where "M = Min (insert (norm (\<Prod>k. f k) / 2) ((\<lambda>m. norm (\<Prod>k<m. f k)) ` {..<M'}))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2225 |
have "M > 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2226 |
unfolding M_def using f(2) by (subst Min_gr_iff) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2227 |
have norm_ge: "norm (\<Prod>k<m. f k) \<ge> M" for m |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2228 |
proof (cases "m \<ge> M'") |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2229 |
case True |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2230 |
have "M \<le> norm (\<Prod>k. f k) / 2" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2231 |
unfolding M_def by (intro Min.coboundedI) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2232 |
also from True have "norm (\<Prod>k<m. f k) > norm (\<Prod>k. f k) / 2" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2233 |
by (intro M') |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2234 |
finally show ?thesis by linarith |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2235 |
next |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2236 |
case False |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2237 |
thus ?thesis |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2238 |
unfolding M_def |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2239 |
by (intro Min.coboundedI) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2240 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2241 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2242 |
have "convergent (\<lambda>n. \<Prod>k<n. f k)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2243 |
using f(1) convergent_def has_prod_imp_tendsto' by blast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2244 |
hence "Cauchy (\<lambda>n. \<Prod>k<n. f k)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2245 |
by (rule convergent_Cauchy) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2246 |
moreover have "e * M > 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2247 |
using e \<open>M > 0\<close> by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2248 |
ultimately obtain N where N: "dist (\<Prod>k<m. f k) (\<Prod>k<n. f k) < e * M" if "m \<ge> N" "n \<ge> N" for m n |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2249 |
unfolding Cauchy_def by fast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2250 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2251 |
show "\<exists>M. \<forall>m n. M \<le> m \<longrightarrow> m \<le> n \<longrightarrow> dist (prod f {m..n}) 1 < e" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2252 |
proof (rule exI[of _ N], intro allI impI, goal_cases) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2253 |
case (1 m n) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2254 |
have "dist (\<Prod>k<m. f k) (\<Prod>k<Suc n. f k) < e * M" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2255 |
by (rule N) (use 1 in auto) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2256 |
also have "dist (\<Prod>k<m. f k) (\<Prod>k<Suc n. f k) = norm ((\<Prod>k<Suc n. f k) - (\<Prod>k<m. f k))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2257 |
by (simp add: dist_norm norm_minus_commute) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2258 |
also have "(\<Prod>k<Suc n. f k) = (\<Prod>k\<in>{..<m}\<union>{m..n}. f k)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2259 |
using 1 by (intro prod.cong) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2260 |
also have "\<dots> = (\<Prod>k\<in>{..<m}. f k) * (\<Prod>k\<in>{m..n}. f k)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2261 |
by (subst prod.union_disjoint) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2262 |
also have "\<dots> - (\<Prod>k<m. f k) = (\<Prod>k<m. f k) * ((\<Prod>k\<in>{m..n}. f k) - 1)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2263 |
by (simp add: algebra_simps) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2264 |
finally have "norm (prod f {m..n} - 1) < e * M / norm (prod f {..<m})" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2265 |
using f(2) by (auto simp add: norm_mult divide_simps mult_ac) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2266 |
also have "\<dots> \<le> e * M / M" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2267 |
using e \<open>M > 0\<close> f(2) by (intro divide_left_mono norm_ge mult_pos_pos) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2268 |
also have "\<dots> = e" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2269 |
using \<open>M > 0\<close> by simp |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2270 |
finally show ?case |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2271 |
by (simp add: dist_norm) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2272 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2273 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2274 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2275 |
obtain M where M: "f m \<noteq> 0" if "m \<ge> M" for m |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2276 |
using convergent_prod_imp_ev_nonzero[OF assms(1)] |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2277 |
by (auto simp: eventually_at_top_linorder) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2278 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2279 |
have "\<exists>M'. \<forall>m n. M' \<le> m \<longrightarrow> m \<le> n \<longrightarrow> dist (\<Prod>k=m..n. f (k + M)) 1 < e" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2280 |
by (rule *) (use assms M in auto) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2281 |
then obtain M' where M': "dist (\<Prod>k=m..n. f (k + M)) 1 < e" if "M' \<le> m" "m \<le> n" for m n |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2282 |
by blast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2283 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2284 |
show "\<exists>M. \<forall>m n. M \<le> m \<longrightarrow> m \<le> n \<longrightarrow> dist (prod f {m..n}) 1 < e" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2285 |
proof (rule exI[of _ "M + M'"], safe, goal_cases) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2286 |
case (1 m n) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2287 |
have "dist (\<Prod>k=m-M..n-M. f (k + M)) 1 < e" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2288 |
by (rule M') (use 1 in auto) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2289 |
also have "(\<Prod>k=m-M..n-M. f (k + M)) = (\<Prod>k=m..n. f k)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2290 |
using 1 by (intro prod.reindex_bij_witness[of _ "\<lambda>k. k - M" "\<lambda>k. k + M"]) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2291 |
finally show ?case . |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2292 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2293 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2294 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2295 |
lemma convergent_prod_Cauchy_iff: |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2296 |
fixes f :: "nat \<Rightarrow> 'b :: {real_normed_field, banach}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2297 |
shows "convergent_prod f \<longleftrightarrow> (\<forall>e>0. \<exists>M. \<forall>m n. M \<le> m \<longrightarrow> m \<le> n \<longrightarrow> dist (\<Prod>k=m..n. f k) 1 < e)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2298 |
using convergent_prod_Cauchy_necessary[of f] convergent_prod_Cauchy_sufficient[of f] |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2299 |
by blast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2300 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2301 |
lemma uniformly_convergent_on_prod: |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2302 |
fixes f :: "nat \<Rightarrow> 'a :: topological_space \<Rightarrow> 'b :: {real_normed_div_algebra, comm_ring_1, banach}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2303 |
assumes cont: "\<And>n. continuous_on A (f n)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2304 |
assumes A: "compact A" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2305 |
assumes conv_sum: "uniformly_convergent_on A (\<lambda>N x. \<Sum>n<N. norm (f n x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2306 |
shows "uniformly_convergent_on A (\<lambda>N x. \<Prod>n<N. 1 + f n x)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2307 |
proof - |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2308 |
have lim: "uniform_limit A (\<lambda>n x. \<Sum>k<n. norm (f k x)) (\<lambda>x. \<Sum>k. norm (f k x)) sequentially" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2309 |
by (rule uniform_limit_suminf) fact |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2310 |
have cont': "\<forall>\<^sub>F n in sequentially. continuous_on A (\<lambda>x. \<Sum>k<n. norm (f k x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2311 |
using cont by (auto intro!: continuous_intros always_eventually cont) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2312 |
have "continuous_on A (\<lambda>x. \<Sum>k. norm (f k x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2313 |
by (rule uniform_limit_theorem[OF cont' lim]) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2314 |
hence "compact ((\<lambda>x. \<Sum>k. norm (f k x)) ` A)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2315 |
by (intro compact_continuous_image A) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2316 |
hence "bounded ((\<lambda>x. \<Sum>k. norm (f k x)) ` A)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2317 |
by (rule compact_imp_bounded) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2318 |
then obtain C where C: "norm (\<Sum>k. norm (f k x)) \<le> C" if "x \<in> A" for x |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2319 |
unfolding bounded_iff by blast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2320 |
show ?thesis |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2321 |
proof (rule uniformly_convergent_prod_Cauchy) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2322 |
fix x :: 'a and m :: nat |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2323 |
assume x: "x \<in> A" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2324 |
have "norm (\<Prod>k<m. 1 + f k x) = (\<Prod>k<m. norm (1 + f k x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2325 |
by (simp add: prod_norm) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2326 |
also have "\<dots> \<le> (\<Prod>k<m. norm (1 :: 'b) + norm (f k x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2327 |
by (intro prod_mono) norm |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2328 |
also have "\<dots> = (\<Prod>k<m. 1 + norm (f k x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2329 |
by simp |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2330 |
also have "\<dots> \<le> exp (\<Sum>k<m. norm (f k x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2331 |
by (rule prod_le_exp_sum) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2332 |
also have "(\<Sum>k<m. norm (f k x)) \<le> (\<Sum>k. norm (f k x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2333 |
proof (rule sum_le_suminf) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2334 |
have "(\<lambda>n. \<Sum>k<n. norm (f k x)) \<longlonglongrightarrow> (\<Sum>k. norm (f k x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2335 |
by (rule tendsto_uniform_limitI[OF lim]) fact |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2336 |
thus "summable (\<lambda>k. norm (f k x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2337 |
using sums_def sums_iff by blast |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2338 |
qed auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2339 |
also have "exp (\<Sum>k. norm (f k x)) \<le> exp (norm (\<Sum>k. norm (f k x)))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2340 |
by simp |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2341 |
also have "norm (\<Sum>k. norm (f k x)) \<le> C" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2342 |
by (rule C) fact |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2343 |
finally show "norm (\<Prod>k<m. 1 + f k x) \<le> exp C" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2344 |
by - simp_all |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2345 |
next |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2346 |
fix \<epsilon> :: real assume \<epsilon>: "\<epsilon> > 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2347 |
have "uniformly_Cauchy_on A (\<lambda>N x. \<Sum>n<N. norm (f n x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2348 |
by (rule uniformly_convergent_Cauchy) fact |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2349 |
moreover have "ln (1 + \<epsilon>) > 0" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2350 |
using \<epsilon> by simp |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2351 |
ultimately obtain M where M: "\<And>m n x. x \<in> A \<Longrightarrow> M \<le> m \<Longrightarrow> M \<le> n \<Longrightarrow> |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2352 |
dist (\<Sum>k<m. norm (f k x)) (\<Sum>k<n. norm (f k x)) < ln (1 + \<epsilon>)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2353 |
using \<epsilon> unfolding uniformly_Cauchy_on_def by metis |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2354 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2355 |
show "\<exists>M. \<forall>x\<in>A. \<forall>m\<ge>M. \<forall>n\<ge>m. dist (\<Prod>k = m..n. 1 + f k x) 1 < \<epsilon>" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2356 |
proof (rule exI, intro ballI allI impI) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2357 |
fix x m n |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2358 |
assume x: "x \<in> A" and mn: "M \<le> m" "m \<le> n" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2359 |
have "dist (\<Sum>k<m. norm (f k x)) (\<Sum>k<Suc n. norm (f k x)) < ln (1 + \<epsilon>)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2360 |
by (rule M) (use x mn in auto) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2361 |
also have "dist (\<Sum>k<m. norm (f k x)) (\<Sum>k<Suc n. norm (f k x)) = |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2362 |
\<bar>\<Sum>k\<in>{..<Suc n}-{..<m}. norm (f k x)\<bar>" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2363 |
using mn by (subst sum_diff) (auto simp: dist_norm) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2364 |
also have "{..<Suc n}-{..<m} = {m..n}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2365 |
using mn by auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2366 |
also have "\<bar>\<Sum>k=m..n. norm (f k x)\<bar> = (\<Sum>k=m..n. norm (f k x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2367 |
by (intro abs_of_nonneg sum_nonneg) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2368 |
finally have *: "(\<Sum>k=m..n. norm (f k x)) < ln (1 + \<epsilon>)" . |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2369 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2370 |
have "dist (\<Prod>k=m..n. 1 + f k x) 1 = norm ((\<Prod>k=m..n. 1 + f k x) - 1)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2371 |
by (simp add: dist_norm) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2372 |
also have "norm ((\<Prod>k=m..n. 1 + f k x) - 1) \<le> (\<Prod>n=m..n. 1 + norm (f n x)) - 1" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2373 |
by (rule norm_prod_minus1_le_prod_minus1) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2374 |
also have "(\<Prod>n=m..n. 1 + norm (f n x)) \<le> exp (\<Sum>k=m..n. norm (f k x))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2375 |
by (rule prod_le_exp_sum) auto |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2376 |
also note * |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2377 |
finally show "dist (\<Prod>k = m..n. 1 + f k x) 1 < \<epsilon>" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2378 |
using \<epsilon> by - simp_all |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2379 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2380 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2381 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2382 |
|
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2383 |
lemma uniformly_convergent_on_prod': |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2384 |
fixes f :: "nat \<Rightarrow> 'a :: topological_space \<Rightarrow> 'b :: {real_normed_div_algebra, comm_ring_1, banach}" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2385 |
assumes cont: "\<And>n. continuous_on A (f n)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2386 |
assumes A: "compact A" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2387 |
assumes conv_sum: "uniformly_convergent_on A (\<lambda>N x. \<Sum>n<N. norm (f n x - 1))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2388 |
shows "uniformly_convergent_on A (\<lambda>N x. \<Prod>n<N. f n x)" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2389 |
proof - |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2390 |
have "uniformly_convergent_on A (\<lambda>N x. \<Prod>n<N. 1 + (f n x - 1))" |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2391 |
by (rule uniformly_convergent_on_prod) (use assms in \<open>auto intro!: continuous_intros\<close>) |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2392 |
thus ?thesis |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2393 |
by simp |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2394 |
qed |
e3a0128f4905
Manuel's material on infinite products
paulson <lp15@cam.ac.uk>
parents:
80914
diff
changeset
|
2395 |
|
68424
02e5a44ffe7d
the last of the infinite product proofs
paulson <lp15@cam.ac.uk>
parents:
68361
diff
changeset
|
2396 |
end |