diff -r 253c98aa935a -r 409ca22dee4c src/HOL/Analysis/Infinite_Set_Sum.thy --- a/src/HOL/Analysis/Infinite_Set_Sum.thy Thu Oct 07 10:34:48 2021 +0200 +++ b/src/HOL/Analysis/Infinite_Set_Sum.thy Wed Oct 06 14:19:46 2021 +0200 @@ -7,9 +7,12 @@ section \Sums over Infinite Sets\ theory Infinite_Set_Sum - imports Set_Integral + imports Set_Integral Infinite_Sum begin +text \Conflicting notation from \<^theory>\HOL-Analysis.Infinite_Sum\\ +no_notation Infinite_Sum.abs_summable_on (infixr "abs'_summable'_on" 46) + (* TODO Move *) lemma sets_eq_countable: assumes "countable A" "space M = A" "\x. x \ A \ {x} \ sets M" @@ -865,4 +868,518 @@ (auto simp: infsetsum_cmult_left infsetsum_cmult_right) qed +lemma abs_summable_finite_sumsI: + assumes "\F. finite F \ F\S \ sum (\x. norm (f x)) F \ B" + shows "f abs_summable_on S" +proof - + have main: "f abs_summable_on S \ infsetsum (\x. norm (f x)) S \ B" if \B \ 0\ and \S \ {}\ + proof - + define M normf where "M = count_space S" and "normf x = ennreal (norm (f x))" for x + have "sum normf F \ ennreal B" + if "finite F" and "F \ S" and + "\F. finite F \ F \ S \ (\i\F. ennreal (norm (f i))) \ ennreal B" and + "ennreal 0 \ ennreal B" for F + using that unfolding normf_def[symmetric] by simp + hence normf_B: "finite F \ F\S \ sum normf F \ ennreal B" for F + using assms[THEN ennreal_leI] + by auto + have "integral\<^sup>S M g \ B" if "simple_function M g" and "g \ normf" for g + proof - + define gS where "gS = g ` S" + have "finite gS" + using that unfolding gS_def M_def simple_function_count_space by simp + have "gS \ {}" unfolding gS_def using \S \ {}\ by auto + define part where "part r = g -` {r} \ S" for r + have r_finite: "r < \" if "r : gS" for r + using \g \ normf\ that unfolding gS_def le_fun_def normf_def apply auto + using ennreal_less_top neq_top_trans top.not_eq_extremum by blast + define B' where "B' r = (SUP F\{F. finite F \ F\part r}. sum normf F)" for r + have B'fin: "B' r < \" for r + proof - + have "B' r \ (SUP F\{F. finite F \ F\part r}. sum normf F)" + unfolding B'_def + by (metis (mono_tags, lifting) SUP_least SUP_upper) + also have "\ \ B" + using normf_B unfolding part_def + by (metis (no_types, lifting) Int_subset_iff SUP_least mem_Collect_eq) + also have "\ < \" + by simp + finally show ?thesis by simp + qed + have sumB': "sum B' gS \ ennreal B + \" if "\>0" for \ + proof - + define N \N where "N = card gS" and "\N = \ / N" + have "N > 0" + unfolding N_def using \gS\{}\ \finite gS\ + by (simp add: card_gt_0_iff) + from \N_def that have "\N > 0" + by (simp add: ennreal_of_nat_eq_real_of_nat ennreal_zero_less_divide) + have c1: "\y. B' r \ sum normf y + \N \ finite y \ y \ part r" + if "B' r = 0" for r + using that by auto + have c2: "\y. B' r \ sum normf y + \N \ finite y \ y \ part r" if "B' r \ 0" for r + proof- + have "B' r - \N < B' r" + using B'fin \0 < \N\ ennreal_between that by fastforce + have "B' r - \N < Sup (sum normf ` {F. finite F \ F \ part r}) \ + \F. B' r - \N \ sum normf F \ finite F \ F \ part r" + by (metis (no_types, lifting) leD le_cases less_SUP_iff mem_Collect_eq) + hence "B' r - \N < B' r \ \F. B' r - \N \ sum normf F \ finite F \ F \ part r" + by (subst (asm) (2) B'_def) + then obtain F where "B' r - \N \ sum normf F" and "finite F" and "F \ part r" + using \B' r - \N < B' r\ by auto + thus "\F. B' r \ sum normf F + \N \ finite F \ F \ part r" + by (metis add.commute ennreal_minus_le_iff) + qed + have "\x. \y. B' x \ sum normf y + \N \ + finite y \ y \ part x" + using c1 c2 + by blast + hence "\F. \x. B' x \ sum normf (F x) + \N \ finite (F x) \ F x \ part x" + by metis + then obtain F where F: "sum normf (F r) + \N \ B' r" and Ffin: "finite (F r)" and Fpartr: "F r \ part r" for r + using atomize_elim by auto + have w1: "finite gS" + by (simp add: \finite gS\) + have w2: "\i\gS. finite (F i)" + by (simp add: Ffin) + have False + if "\r. F r \ g -` {r} \ F r \ S" + and "i \ gS" and "j \ gS" and "i \ j" and "x \ F i" and "x \ F j" + for i j x + by (metis subsetD that(1) that(4) that(5) that(6) vimage_singleton_eq) + hence w3: "\i\gS. \j\gS. i \ j \ F i \ F j = {}" + using Fpartr[unfolded part_def] by auto + have w4: "sum normf (\ (F ` gS)) + \ = sum normf (\ (F ` gS)) + \" + by simp + have "sum B' gS \ (\r\gS. sum normf (F r) + \N)" + using F by (simp add: sum_mono) + also have "\ = (\r\gS. sum normf (F r)) + (\r\gS. \N)" + by (simp add: sum.distrib) + also have "\ = (\r\gS. sum normf (F r)) + (card gS * \N)" + by auto + also have "\ = (\r\gS. sum normf (F r)) + \" + unfolding \N_def N_def[symmetric] using \N>0\ + by (simp add: ennreal_times_divide mult.commute mult_divide_eq_ennreal) + also have "\ = sum normf (\ (F ` gS)) + \" + using w1 w2 w3 w4 + by (subst sum.UNION_disjoint[symmetric]) + also have "\ \ B + \" + using \finite gS\ normf_B add_right_mono Ffin Fpartr unfolding part_def + by (simp add: \gS \ {}\ cSUP_least) + finally show ?thesis + by auto + qed + hence sumB': "sum B' gS \ B" + using ennreal_le_epsilon ennreal_less_zero_iff by blast + have "\r. \y. r \ gS \ B' r = ennreal y" + using B'fin less_top_ennreal by auto + hence "\B''. \r. r \ gS \ B' r = ennreal (B'' r)" + by (rule_tac choice) + then obtain B'' where B'': "B' r = ennreal (B'' r)" if "r \ gS" for r + by atomize_elim + have cases[case_names zero finite infinite]: "P" if "r=0 \ P" and "finite (part r) \ P" + and "infinite (part r) \ r\0 \ P" for P r + using that by metis + have emeasure_B': "r * emeasure M (part r) \ B' r" if "r : gS" for r + proof (cases rule:cases[of r]) + case zero + thus ?thesis by simp + next + case finite + have s1: "sum g F \ sum normf F" + if "F \ {F. finite F \ F \ part r}" + for F + using \g \ normf\ + by (simp add: le_fun_def sum_mono) + + have "r * of_nat (card (part r)) = r * (\x\part r. 1)" by simp + also have "\ = (\x\part r. r)" + using mult.commute by auto + also have "\ = (\x\part r. g x)" + unfolding part_def by auto + also have "\ \ (SUP F\{F. finite F \ F\part r}. sum g F)" + using finite + by (simp add: Sup_upper) + also have "\ \ B' r" + unfolding B'_def + using s1 SUP_subset_mono by blast + finally have "r * of_nat (card (part r)) \ B' r" by assumption + thus ?thesis + unfolding M_def + using part_def finite by auto + next + case infinite + from r_finite[OF \r : gS\] obtain r' where r': "r = ennreal r'" + using ennreal_cases by auto + with infinite have "r' > 0" + using ennreal_less_zero_iff not_gr_zero by blast + obtain N::nat where N:"N > B / r'" and "real N > 0" apply atomize_elim + using reals_Archimedean2 + by (metis less_trans linorder_neqE_linordered_idom) + obtain F where "finite F" and "card F = N" and "F \ part r" + using infinite(1) infinite_arbitrarily_large by blast + from \F \ part r\ have "F \ S" unfolding part_def by simp + have "B < r * N" + unfolding r' ennreal_of_nat_eq_real_of_nat + using N \0 < r'\ \B \ 0\ r' + by (metis enn2real_ennreal enn2real_less_iff ennreal_less_top ennreal_mult' less_le mult_less_cancel_left_pos nonzero_mult_div_cancel_left times_divide_eq_right) + also have "r * N = (\x\F. r)" + using \card F = N\ by (simp add: mult.commute) + also have "(\x\F. r) = (\x\F. g x)" + using \F \ part r\ part_def sum.cong subsetD by fastforce + also have "(\x\F. g x) \ (\x\F. ennreal (norm (f x)))" + by (metis (mono_tags, lifting) \g \ normf\ \normf \ \x. ennreal (norm (f x))\ le_fun_def + sum_mono) + also have "(\x\F. ennreal (norm (f x))) \ B" + using \F \ S\ \finite F\ \normf \ \x. ennreal (norm (f x))\ normf_B by blast + finally have "B < B" by auto + thus ?thesis by simp + qed + + have "integral\<^sup>S M g = (\r \ gS. r * emeasure M (part r))" + unfolding simple_integral_def gS_def M_def part_def by simp + also have "\ \ (\r \ gS. B' r)" + by (simp add: emeasure_B' sum_mono) + also have "\ \ B" + using sumB' by blast + finally show ?thesis by assumption + qed + hence int_leq_B: "integral\<^sup>N M normf \ B" + unfolding nn_integral_def by (metis (no_types, lifting) SUP_least mem_Collect_eq) + hence "integral\<^sup>N M normf < \" + using le_less_trans by fastforce + hence "integrable M f" + unfolding M_def normf_def by (rule integrableI_bounded[rotated], simp) + hence v1: "f abs_summable_on S" + unfolding abs_summable_on_def M_def by simp + + have "(\x. norm (f x)) abs_summable_on S" + using v1 Infinite_Set_Sum.abs_summable_on_norm_iff[where A = S and f = f] + by auto + moreover have "0 \ norm (f x)" + if "x \ S" for x + by simp + moreover have "(\\<^sup>+ x. ennreal (norm (f x)) \count_space S) \ ennreal B" + using M_def \normf \ \x. ennreal (norm (f x))\ int_leq_B by auto + ultimately have "ennreal (\\<^sub>ax\S. norm (f x)) \ ennreal B" + by (simp add: nn_integral_conv_infsetsum) + hence v2: "(\\<^sub>ax\S. norm (f x)) \ B" + by (subst ennreal_le_iff[symmetric], simp add: assms \B \ 0\) + show ?thesis + using v1 v2 by auto + qed + then show "f abs_summable_on S" + by (metis abs_summable_on_finite assms empty_subsetI finite.emptyI sum_clauses(1)) +qed + + +lemma infsetsum_nonneg_is_SUPREMUM_ennreal: + fixes f :: "'a \ real" + assumes summable: "f abs_summable_on A" + and fnn: "\x. x\A \ f x \ 0" + shows "ennreal (infsetsum f A) = (SUP F\{F. finite F \ F \ A}. (ennreal (sum f F)))" +proof - + have sum_F_A: "sum f F \ infsetsum f A" + if "F \ {F. finite F \ F \ A}" + for F + proof- + from that have "finite F" and "F \ A" by auto + from \finite F\ have "sum f F = infsetsum f F" by auto + also have "\ \ infsetsum f A" + proof (rule infsetsum_mono_neutral_left) + show "f abs_summable_on F" + by (simp add: \finite F\) + show "f abs_summable_on A" + by (simp add: local.summable) + show "f x \ f x" + if "x \ F" + for x :: 'a + by simp + show "F \ A" + by (simp add: \F \ A\) + show "0 \ f x" + if "x \ A - F" + for x :: 'a + using that fnn by auto + qed + finally show ?thesis by assumption + qed + hence geq: "ennreal (infsetsum f A) \ (SUP F\{G. finite G \ G \ A}. (ennreal (sum f F)))" + by (meson SUP_least ennreal_leI) + + define fe where "fe x = ennreal (f x)" for x + + have sum_f_int: "infsetsum f A = \\<^sup>+ x. fe x \(count_space A)" + unfolding infsetsum_def fe_def + proof (rule nn_integral_eq_integral [symmetric]) + show "integrable (count_space A) f" + using abs_summable_on_def local.summable by blast + show "AE x in count_space A. 0 \ f x" + using fnn by auto + qed + also have "\ = (SUP g \ {g. finite (g`A) \ g \ fe}. integral\<^sup>S (count_space A) g)" + unfolding nn_integral_def simple_function_count_space by simp + also have "\ \ (SUP F\{F. finite F \ F \ A}. (ennreal (sum f F)))" + proof (rule Sup_least) + fix x assume "x \ integral\<^sup>S (count_space A) ` {g. finite (g ` A) \ g \ fe}" + then obtain g where xg: "x = integral\<^sup>S (count_space A) g" and fin_gA: "finite (g`A)" + and g_fe: "g \ fe" by auto + define F where "F = {z:A. g z \ 0}" + hence "F \ A" by simp + + have fin: "finite {z:A. g z = t}" if "t \ 0" for t + proof (rule ccontr) + assume inf: "infinite {z:A. g z = t}" + hence tgA: "t \ g ` A" + by (metis (mono_tags, lifting) image_eqI not_finite_existsD) + have "x = (\x \ g ` A. x * emeasure (count_space A) (g -` {x} \ A))" + unfolding xg simple_integral_def space_count_space by simp + also have "\ \ (\x \ {t}. x * emeasure (count_space A) (g -` {x} \ A))" (is "_ \ \") + proof (rule sum_mono2) + show "finite (g ` A)" + by (simp add: fin_gA) + show "{t} \ g ` A" + by (simp add: tgA) + show "0 \ b * emeasure (count_space A) (g -` {b} \ A)" + if "b \ g ` A - {t}" + for b :: ennreal + using that + by simp + qed + also have "\ = t * emeasure (count_space A) (g -` {t} \ A)" + by auto + also have "\ = t * \" + proof (subst emeasure_count_space_infinite) + show "g -` {t} \ A \ A" + by simp + have "{a \ A. g a = t} = {a \ g -` {t}. a \ A}" + by auto + thus "infinite (g -` {t} \ A)" + by (metis (full_types) Int_def inf) + show "t * \ = t * \" + by simp + qed + also have "\ = \" using \t \ 0\ + by (simp add: ennreal_mult_eq_top_iff) + finally have x_inf: "x = \" + using neq_top_trans by auto + have "x = integral\<^sup>S (count_space A) g" by (fact xg) + also have "\ = integral\<^sup>N (count_space A) g" + by (simp add: fin_gA nn_integral_eq_simple_integral) + also have "\ \ integral\<^sup>N (count_space A) fe" + using g_fe + by (simp add: le_funD nn_integral_mono) + also have "\ < \" + by (metis sum_f_int ennreal_less_top infinity_ennreal_def) + finally have x_fin: "x < \" by simp + from x_inf x_fin show False by simp + qed + have F: "F = (\t\g`A-{0}. {z\A. g z = t})" + unfolding F_def by auto + hence "finite F" + unfolding F using fin_gA fin by auto + have "x = integral\<^sup>N (count_space A) g" + unfolding xg + by (simp add: fin_gA nn_integral_eq_simple_integral) + also have "\ = set_nn_integral (count_space UNIV) A g" + by (simp add: nn_integral_restrict_space[symmetric] restrict_count_space) + also have "\ = set_nn_integral (count_space UNIV) F g" + proof - + have "\a. g a * (if a \ {a \ A. g a \ 0} then 1 else 0) = g a * (if a \ A then 1 else 0)" + by auto + hence "(\\<^sup>+ a. g a * (if a \ A then 1 else 0) \count_space UNIV) + = (\\<^sup>+ a. g a * (if a \ {a \ A. g a \ 0} then 1 else 0) \count_space UNIV)" + by presburger + thus ?thesis unfolding F_def indicator_def + using mult.right_neutral mult_zero_right nn_integral_cong + by (simp add: of_bool_def) + qed + also have "\ = integral\<^sup>N (count_space F) g" + by (simp add: nn_integral_restrict_space[symmetric] restrict_count_space) + also have "\ = sum g F" + using \finite F\ by (rule nn_integral_count_space_finite) + also have "sum g F \ sum fe F" + using g_fe unfolding le_fun_def + by (simp add: sum_mono) + also have "\ \ (SUP F \ {G. finite G \ G \ A}. (sum fe F))" + using \finite F\ \F\A\ + by (simp add: SUP_upper) + also have "\ = (SUP F \ {F. finite F \ F \ A}. (ennreal (sum f F)))" + proof (rule SUP_cong [OF refl]) + have "finite x \ x \ A \ (\x\x. ennreal (f x)) = ennreal (sum f x)" + for x + by (metis fnn subsetCE sum_ennreal) + thus "sum fe x = ennreal (sum f x)" + if "x \ {G. finite G \ G \ A}" + for x :: "'a set" + using that unfolding fe_def by auto + qed + finally show "x \ \" by simp + qed + finally have leq: "ennreal (infsetsum f A) \ (SUP F\{F. finite F \ F \ A}. (ennreal (sum f F)))" + by assumption + from leq geq show ?thesis by simp +qed + +lemma infsetsum_nonneg_is_SUPREMUM_ereal: + fixes f :: "'a \ real" + assumes summable: "f abs_summable_on A" + and fnn: "\x. x\A \ f x \ 0" + shows "ereal (infsetsum f A) = (SUP F\{F. finite F \ F \ A}. (ereal (sum f F)))" +proof - + have "ereal (infsetsum f A) = enn2ereal (ennreal (infsetsum f A))" + by (simp add: fnn infsetsum_nonneg) + also have "\ = enn2ereal (SUP F\{F. finite F \ F \ A}. ennreal (sum f F))" + apply (subst infsetsum_nonneg_is_SUPREMUM_ennreal) + using fnn by (auto simp add: local.summable) + also have "\ = (SUP F\{F. finite F \ F \ A}. (ereal (sum f F)))" + proof (simp add: image_def Sup_ennreal.rep_eq) + have "0 \ Sup {y. \x. (\xa. finite xa \ xa \ A \ x = ennreal (sum f xa)) \ + y = enn2ereal x}" + by (metis (mono_tags, lifting) Sup_upper empty_subsetI ennreal_0 finite.emptyI + mem_Collect_eq sum.empty zero_ennreal.rep_eq) + moreover have "Sup {y. \x. (\y. finite y \ y \ A \ x = ennreal (sum f y)) \ + y = enn2ereal x} = Sup {y. \x. finite x \ x \ A \ y = ereal (sum f x)}" + using enn2ereal_ennreal fnn in_mono sum_nonneg Collect_cong + by smt + ultimately show "max 0 (Sup {y. \x. (\xa. finite xa \ xa \ A \ x + = ennreal (sum f xa)) \ y = enn2ereal x}) + = Sup {y. \x. finite x \ x \ A \ y = ereal (sum f x)}" + by linarith + qed + finally show ?thesis + by simp +qed + + +text \The following theorem relates \<^const>\Infinite_Set_Sum.abs_summable_on\ with \<^const>\Infinite_Sum.abs_summable_on\. + Note that while this theorem expresses an equivalence, the notion on the lhs is more general + nonetheless because it applies to a wider range of types. (The rhs requires second-countable + Banach spaces while the lhs is well-defined on arbitrary real vector spaces.)\ + +lemma abs_summable_equivalent: \Infinite_Sum.abs_summable_on f A \ f abs_summable_on A\ +proof (rule iffI) + define n where \n x = norm (f x)\ for x + assume \n summable_on A\ + then have \sum n F \ infsum n A\ if \finite F\ and \F\A\ for F + using that by (auto simp flip: infsum_finite simp: n_def[abs_def] intro!: infsum_mono_neutral) + + then show \f abs_summable_on A\ + by (auto intro!: abs_summable_finite_sumsI simp: n_def) +next + define n where \n x = norm (f x)\ for x + assume \f abs_summable_on A\ + then have \n abs_summable_on A\ + by (simp add: \f abs_summable_on A\ n_def) + then have \sum n F \ infsetsum n A\ if \finite F\ and \F\A\ for F + using that by (auto simp flip: infsetsum_finite simp: n_def[abs_def] intro!: infsetsum_mono_neutral) + then show \n summable_on A\ + apply (rule_tac pos_summable_on) + by (auto simp add: n_def bdd_above_def) +qed + +lemma infsetsum_infsum: + assumes "f abs_summable_on A" + shows "infsetsum f A = infsum f A" +proof - + have conv_sum_norm[simp]: "(\x. norm (f x)) summable_on A" + using abs_summable_equivalent assms by blast + have "norm (infsetsum f A - infsum f A) \ \" if "\>0" for \ + proof - + define \ where "\ = \/2" + with that have [simp]: "\ > 0" by simp + obtain F1 where F1A: "F1 \ A" and finF1: "finite F1" and leq_eps: "infsetsum (\x. norm (f x)) (A-F1) \ \" + proof - + have sum_SUP: "ereal (infsetsum (\x. norm (f x)) A) = (SUP F\{F. finite F \ F \ A}. ereal (sum (\x. norm (f x)) F))" + (is "_ = ?SUP") + apply (rule infsetsum_nonneg_is_SUPREMUM_ereal) + using assms by auto + + have "(SUP F\{F. finite F \ F \ A}. ereal (\x\F. norm (f x))) - ereal \ + < (SUP i\{F. finite F \ F \ A}. ereal (\x\i. norm (f x)))" + using \\>0\ + by (metis diff_strict_left_mono diff_zero ereal_less_eq(3) ereal_minus(1) not_le sum_SUP) + then obtain F where "F\{F. finite F \ F \ A}" and "ereal (sum (\x. norm (f x)) F) > ?SUP - ereal (\)" + by (meson less_SUP_iff) + + hence "sum (\x. norm (f x)) F > infsetsum (\x. norm (f x)) A - (\)" + unfolding sum_SUP[symmetric] by auto + hence "\ > infsetsum (\x. norm (f x)) (A-F)" + proof (subst infsetsum_Diff) + show "(\x. norm (f x)) abs_summable_on A" + if "(\\<^sub>ax\A. norm (f x)) - \ < (\x\F. norm (f x))" + using that + by (simp add: assms) + show "F \ A" + if "(\\<^sub>ax\A. norm (f x)) - \ < (\x\F. norm (f x))" + using that \F \ {F. finite F \ F \ A}\ by blast + show "(\\<^sub>ax\A. norm (f x)) - (\\<^sub>ax\F. norm (f x)) < \" + if "(\\<^sub>ax\A. norm (f x)) - \ < (\x\F. norm (f x))" + using that \F \ {F. finite F \ F \ A}\ by auto + qed + thus ?thesis using that + apply atomize_elim + using \F \ {F. finite F \ F \ A}\ less_imp_le by blast + qed + obtain F2 where F2A: "F2 \ A" and finF2: "finite F2" + and dist: "dist (sum (\x. norm (f x)) F2) (infsum (\x. norm (f x)) A) \ \" + apply atomize_elim + by (metis \0 < \\ conv_sum_norm infsum_finite_approximation) + have leq_eps': "infsum (\x. norm (f x)) (A-F2) \ \" + apply (subst infsum_Diff) + using finF2 F2A dist by (auto simp: dist_norm) + define F where "F = F1 \ F2" + have FA: "F \ A" and finF: "finite F" + unfolding F_def using F1A F2A finF1 finF2 by auto + + have "(\\<^sub>ax\A - (F1 \ F2). norm (f x)) \ (\\<^sub>ax\A - F1. norm (f x))" + apply (rule infsetsum_mono_neutral_left) + using abs_summable_on_subset assms by fastforce+ + hence leq_eps: "infsetsum (\x. norm (f x)) (A-F) \ \" + unfolding F_def + using leq_eps by linarith + have "infsum (\x. norm (f x)) (A - (F1 \ F2)) + \ infsum (\x. norm (f x)) (A - F2)" + apply (rule infsum_mono_neutral) + using finF by (auto simp add: finF2 summable_on_cofin_subset F_def) + hence leq_eps': "infsum (\x. norm (f x)) (A-F) \ \" + unfolding F_def + by (rule order.trans[OF _ leq_eps']) + have "norm (infsetsum f A - infsetsum f F) = norm (infsetsum f (A-F))" + apply (subst infsetsum_Diff [symmetric]) + by (auto simp: FA assms) + also have "\ \ infsetsum (\x. norm (f x)) (A-F)" + using norm_infsetsum_bound by blast + also have "\ \ \" + using leq_eps by simp + finally have diff1: "norm (infsetsum f A - infsetsum f F) \ \" + by assumption + have "norm (infsum f A - infsum f F) = norm (infsum f (A-F))" + apply (subst infsum_Diff [symmetric]) + by (auto simp: assms abs_summable_summable finF FA) + also have "\ \ infsum (\x. norm (f x)) (A-F)" + by (simp add: finF summable_on_cofin_subset norm_infsum_bound) + also have "\ \ \" + using leq_eps' by simp + finally have diff2: "norm (infsum f A - infsum f F) \ \" + by assumption + + have x1: "infsetsum f F = infsum f F" + using finF by simp + have "norm (infsetsum f A - infsum f A) \ norm (infsetsum f A - infsetsum f F) + norm (infsum f A - infsum f F)" + apply (rule_tac norm_diff_triangle_le) + apply auto + by (simp_all add: x1 norm_minus_commute) + also have "\ \ \" + using diff1 diff2 \_def by linarith + finally show ?thesis + by assumption + qed + hence "norm (infsetsum f A - infsum f A) = 0" + by (meson antisym_conv1 dense_ge norm_not_less_zero) + thus ?thesis + by auto +qed + end