562 by (rule bounded_linear.summable [OF bounded_linear_divide]) |
562 by (rule bounded_linear.summable [OF bounded_linear_divide]) |
563 |
563 |
564 lemma suminf_divide: "summable f \<Longrightarrow> suminf (\<lambda>n. f n / c) = suminf f / c" |
564 lemma suminf_divide: "summable f \<Longrightarrow> suminf (\<lambda>n. f n / c) = suminf f / c" |
565 by (rule bounded_linear.suminf [OF bounded_linear_divide, symmetric]) |
565 by (rule bounded_linear.suminf [OF bounded_linear_divide, symmetric]) |
566 |
566 |
|
567 lemma summable_inverse_divide: "summable (inverse \<circ> f) \<Longrightarrow> summable (\<lambda>n. c / f n)" |
|
568 by (auto dest: summable_mult [of _ c] simp: field_simps) |
|
569 |
567 lemma sums_mult_D: "(\<lambda>n. c * f n) sums a \<Longrightarrow> c \<noteq> 0 \<Longrightarrow> f sums (a/c)" |
570 lemma sums_mult_D: "(\<lambda>n. c * f n) sums a \<Longrightarrow> c \<noteq> 0 \<Longrightarrow> f sums (a/c)" |
568 using sums_mult_iff by fastforce |
571 using sums_mult_iff by fastforce |
569 |
572 |
570 lemma summable_mult_D: "summable (\<lambda>n. c * f n) \<Longrightarrow> c \<noteq> 0 \<Longrightarrow> summable f" |
573 lemma summable_mult_D: "summable (\<lambda>n. c * f n) \<Longrightarrow> c \<noteq> 0 \<Longrightarrow> summable f" |
571 by (auto dest: summable_divide) |
574 by (auto dest: summable_divide) |
655 |
658 |
656 subsection \<open>Infinite summability on Banach spaces\<close> |
659 subsection \<open>Infinite summability on Banach spaces\<close> |
657 |
660 |
658 text \<open>Cauchy-type criterion for convergence of series (c.f. Harrison).\<close> |
661 text \<open>Cauchy-type criterion for convergence of series (c.f. Harrison).\<close> |
659 |
662 |
660 lemma summable_Cauchy: "summable f \<longleftrightarrow> (\<forall>e>0. \<exists>N. \<forall>m\<ge>N. \<forall>n. norm (sum f {m..<n}) < e)" |
663 lemma summable_Cauchy: "summable f \<longleftrightarrow> (\<forall>e>0. \<exists>N. \<forall>m\<ge>N. \<forall>n. norm (sum f {m..<n}) < e)" (is "_ = ?rhs") |
661 for f :: "nat \<Rightarrow> 'a::banach" |
664 for f :: "nat \<Rightarrow> 'a::banach" |
662 apply (simp only: summable_iff_convergent Cauchy_convergent_iff [symmetric] Cauchy_iff) |
665 proof |
663 apply safe |
666 assume f: "summable f" |
664 apply (drule spec) |
667 show ?rhs |
665 apply (drule (1) mp) |
668 proof clarify |
666 apply (erule exE) |
669 fix e :: real |
667 apply (rule_tac x="M" in exI) |
670 assume "0 < e" |
668 apply clarify |
671 then obtain M where M: "\<And>m n. \<lbrakk>m\<ge>M; n\<ge>M\<rbrakk> \<Longrightarrow> norm (sum f {..<m} - sum f {..<n}) < e" |
669 apply (rule_tac x="m" and y="n" in linorder_le_cases) |
672 using f by (force simp add: summable_iff_convergent Cauchy_convergent_iff [symmetric] Cauchy_iff) |
670 apply (frule (1) order_trans) |
673 have "norm (sum f {m..<n}) < e" if "m \<ge> M" for m n |
671 apply (drule_tac x="n" in spec) |
674 proof (cases m n rule: linorder_class.le_cases) |
672 apply (drule (1) mp) |
675 assume "m \<le> n" |
673 apply (drule_tac x="m" in spec) |
676 then show ?thesis |
674 apply (drule (1) mp) |
677 by (metis (mono_tags, hide_lams) M atLeast0LessThan order_trans sum_diff_nat_ivl that zero_le) |
675 apply (simp_all add: sum_diff [symmetric]) |
678 next |
676 apply (drule spec) |
679 assume "n \<le> m" |
677 apply (drule (1) mp) |
680 then show ?thesis |
678 apply (erule exE) |
681 by (simp add: \<open>0 < e\<close>) |
679 apply (rule_tac x="N" in exI) |
682 qed |
680 apply clarify |
683 then show "\<exists>N. \<forall>m\<ge>N. \<forall>n. norm (sum f {m..<n}) < e" |
681 apply (rule_tac x="m" and y="n" in linorder_le_cases) |
684 by blast |
682 apply (subst norm_minus_commute) |
685 qed |
683 apply (simp_all add: sum_diff [symmetric]) |
686 next |
684 done |
687 assume r: ?rhs |
|
688 then show "summable f" |
|
689 unfolding summable_iff_convergent Cauchy_convergent_iff [symmetric] Cauchy_iff |
|
690 proof clarify |
|
691 fix e :: real |
|
692 assume "0 < e" |
|
693 with r obtain N where N: "\<And>m n. m \<ge> N \<Longrightarrow> norm (sum f {m..<n}) < e" |
|
694 by blast |
|
695 have "norm (sum f {..<m} - sum f {..<n}) < e" if "m\<ge>N" "n\<ge>N" for m n |
|
696 proof (cases m n rule: linorder_class.le_cases) |
|
697 assume "m \<le> n" |
|
698 then show ?thesis |
|
699 by (metis Groups_Big.sum_diff N finite_lessThan lessThan_minus_lessThan lessThan_subset_iff norm_minus_commute \<open>m\<ge>N\<close>) |
|
700 next |
|
701 assume "n \<le> m" |
|
702 then show ?thesis |
|
703 by (metis Groups_Big.sum_diff N finite_lessThan lessThan_minus_lessThan lessThan_subset_iff \<open>n\<ge>N\<close>) |
|
704 qed |
|
705 then show "\<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. norm (sum f {..<m} - sum f {..<n}) < e" |
|
706 by blast |
|
707 qed |
|
708 qed |
685 |
709 |
686 context |
710 context |
687 fixes f :: "nat \<Rightarrow> 'a::banach" |
711 fixes f :: "nat \<Rightarrow> 'a::banach" |
688 begin |
712 begin |
689 |
713 |
706 lemma summable_norm: "summable (\<lambda>n. norm (f n)) \<Longrightarrow> norm (suminf f) \<le> (\<Sum>n. norm (f n))" |
730 lemma summable_norm: "summable (\<lambda>n. norm (f n)) \<Longrightarrow> norm (suminf f) \<le> (\<Sum>n. norm (f n))" |
707 by (auto intro: LIMSEQ_le tendsto_norm summable_norm_cancel summable_LIMSEQ norm_sum) |
731 by (auto intro: LIMSEQ_le tendsto_norm summable_norm_cancel summable_LIMSEQ norm_sum) |
708 |
732 |
709 text \<open>Comparison tests.\<close> |
733 text \<open>Comparison tests.\<close> |
710 |
734 |
711 lemma summable_comparison_test: "\<exists>N. \<forall>n\<ge>N. norm (f n) \<le> g n \<Longrightarrow> summable g \<Longrightarrow> summable f" |
735 lemma summable_comparison_test: |
712 apply (simp add: summable_Cauchy) |
736 assumes fg: "\<exists>N. \<forall>n\<ge>N. norm (f n) \<le> g n" and g: "summable g" |
713 apply safe |
737 shows "summable f" |
714 apply (drule_tac x="e" in spec) |
738 proof - |
715 apply safe |
739 obtain N where N: "\<And>n. n\<ge>N \<Longrightarrow> norm (f n) \<le> g n" |
716 apply (rule_tac x = "N + Na" in exI) |
740 using assms by blast |
717 apply safe |
741 show ?thesis |
718 apply (rotate_tac 2) |
742 proof (clarsimp simp add: summable_Cauchy) |
719 apply (drule_tac x = m in spec) |
743 fix e :: real |
720 apply auto |
744 assume "0 < e" |
721 apply (rotate_tac 2) |
745 then obtain Ng where Ng: "\<And>m n. m \<ge> Ng \<Longrightarrow> norm (sum g {m..<n}) < e" |
722 apply (drule_tac x = n in spec) |
746 using g by (fastforce simp: summable_Cauchy) |
723 apply (rule_tac y = "\<Sum>k=m..<n. norm (f k)" in order_le_less_trans) |
747 with N have "norm (sum f {m..<n}) < e" if "m\<ge>max N Ng" for m n |
724 apply (rule norm_sum) |
748 proof - |
725 apply (rule_tac y = "sum g {m..<n}" in order_le_less_trans) |
749 have "norm (sum f {m..<n}) \<le> sum g {m..<n}" |
726 apply (auto intro: sum_mono simp add: abs_less_iff) |
750 using N that by (force intro: sum_norm_le) |
727 done |
751 also have "... \<le> norm (sum g {m..<n})" |
|
752 by simp |
|
753 also have "... < e" |
|
754 using Ng that by auto |
|
755 finally show ?thesis . |
|
756 qed |
|
757 then show "\<exists>N. \<forall>m\<ge>N. \<forall>n. norm (sum f {m..<n}) < e" |
|
758 by blast |
|
759 qed |
|
760 qed |
728 |
761 |
729 lemma summable_comparison_test_ev: |
762 lemma summable_comparison_test_ev: |
730 "eventually (\<lambda>n. norm (f n) \<le> g n) sequentially \<Longrightarrow> summable g \<Longrightarrow> summable f" |
763 "eventually (\<lambda>n. norm (f n) \<le> g n) sequentially \<Longrightarrow> summable g \<Longrightarrow> summable f" |
731 by (rule summable_comparison_test) (auto simp: eventually_at_top_linorder) |
764 by (rule summable_comparison_test) (auto simp: eventually_at_top_linorder) |
732 |
765 |