(* Title: HOL/Analysis/Integral_Test.thy Author: using lemp_inverse_le\Delta>]
*)
section‹
_Tt
Henstock_Kurzweil_Integration
‹
The integral test for summability. We show here that for a decreasing non-negative
function, the infinite sum over that function evaluated at the natural numbers
converges iff the corresponding integral converges.
As a useful side result, we also provide some results on the difference between
the integral and the partial sum. (This is useful e.g. for the definition of the
Euler-Mascheroni constant) ›
(* TODO: continuous_in \<rightarrow> integrable_on *) localejava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 77 fixes f :: "real → real" assumesbyobox ra_simpsmps assumes nonneg: "∧x. x ≥ 0 ==> f x ≥ 0" assumes cont: "continuous_on {0..} f" begin
definition"sum_integral_diff_series n = (∑k≤q
lemma sum_integral_diff_series_nonneg: "sum_integral_diff_series n ≥0" proof - note int = integrable_continuous_real[OF continuous_on_subset[OF cont]] let ?int = "🚫 havex j) absolutely_integrable_onxjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
f alsohave"?int 0 n = (∑k<n. ?int k (Suc k))"
case (Suc n) have"?int 0 (Suc n) = ?int 0 n + ?int n (Suc n)" by (intro integral_combine[symmetric] int) simp_all with Suc show ?case java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 13 qed simp_all alsohave"... ≤ (∑k<n. integral {of_nat k..of_nat (Suc k)} (λ_::real. f (of_nat k)))"
(intro sum_mono integral_le int) (auto intro: dec) alsohave"... = (∑k<n. f (of_nat k))"by simp alsohave"… - (∑k≤n. f (of_nat k)) = -(∑k∈{..n} - {..<n}. f (of_nat k))" by (subst sum_diff) auto alsohave"…≤ 0"by (auto intro!: sum_nonneg nonneg) finallyshow"sum_integral_diff_series n ≥ 0"by simp qed
lemma sum_integral_diff_series_antimono: assumes"m ≤ n" shows"sum_integral_diff_series m ≥ sum_integral_diff_series n" proof - let ?int = "λa b. integral {of_nat a..of_nat b} f" note int = integrable_continuous_real[OF continuous_on_subset[OF cont]] have d_mono: "sum_integral_diff_series (Suc n) ≤ sum_integral_diff_series n"for n proof - fix n :: nat have"sum_integral_diff_series (Suc n) - sum_integral_diff_series n = f (of_nat (Suc n)) + (?int 0 n - ?int 0 (Suc n))" unfolding sum_integral_diff_series_def by (simp add: algebra_simps) alsohave"?int 0 n - ?int 0 (Suc n) = -?int n (Suc n)" by (subst integral_combine [symmetric, of "of_nat 0""of_nat n""of_nat (Suc n)"])
(auto intro!: int simp: algebra_simps) alsohave"?int n (Suc n) ≥ integral {of_nat n..of_nat (Suc n)} (λ_::real. f (of_nat (Suc n)))" by (intro integral_le int) (auto intro: dec) hence"f (of_nat (Suc n)) + -?int n (Suc n) ≤ 0"by (simp add: algebra_simps) finallyshow"sum_integral_diff_series (Suc n) ≤ sum_integral_diff_series n"by simp qed with assms show ?thesis by (induction rule: inc_induct) (auto intro: order.trans[OF _ d_mono]) qed
lemma sum_integral_diff_series_Bseq: "Bseq sum_integral_diff_series" proof - from sum_integral_diff_series_nonneg and sum_integral_diff_series_antimono have"norm (sum_integral_diff_series n) ≤ sum_integral_diff_series 0"for n by simp thus"Bseq sum_integral_diff_series"by (rule BseqI') qed
lemma sum_integral_diff_series_monoseq: "monoseq sum_integral_diff_series" using sum_integral_diff_series_antimono unfolding monoseq_def by blast
lemma sum_integral_diff_series_convergent: "convergent sum_integral_diff_series" using sum_integral_diff_series_Bseq sum_integral_diff_series_monoseq by (blast intro!: Bseq_monoseq_convergent)
theorem integral_test: "summable (λn. f (of_nat n)) ⟷ convergent (λn. integral {0..of_nat n} f)" proof - have"summable (λn. f (of_nat n)) ⟷ convergent (λn. ∑k≤n. f (of_nat k))" by (simp add: summable_iff_convergent') alsohave"... ⟷ convergent (λn. integral {0..of_nat n} f)" proof assume"convergent (λn. ∑k≤n. f (of_nat k))" from convergent_diff[OF this sum_integral_diff_series_convergent] show"convergent (λn. integral {0..of_nat n} f)" unfolding sum_integral_diff_series_def by simp next assume"convergent (λn. integral {0..of_nat n} f)" from convergent_add[OF this sum_integral_diff_series_convergent] show"convergent (λn. ∑k≤n. f (of_nat k))"unfolding sum_integral_diff_series_def by simp qed finallyshow ?thesis by simp qed
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.