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