14 |
14 |
15 lemma sums_def2: |
15 lemma sums_def2: |
16 "f sums x \<longleftrightarrow> (\<lambda>n. (\<Sum>i\<le>n. f i)) ----> x" |
16 "f sums x \<longleftrightarrow> (\<lambda>n. (\<Sum>i\<le>n. f i)) ----> x" |
17 unfolding sums_def |
17 unfolding sums_def |
18 apply (subst LIMSEQ_Suc_iff[symmetric]) |
18 apply (subst LIMSEQ_Suc_iff[symmetric]) |
19 unfolding atLeastLessThanSuc_atLeastAtMost atLeast0AtMost .. |
19 unfolding lessThan_Suc_atMost .. |
20 |
20 |
21 subsection "Relate extended reals and the indicator function" |
21 subsection "Relate extended reals and the indicator function" |
22 |
22 |
23 lemma ereal_indicator: "ereal (indicator A x) = indicator A x" |
23 lemma ereal_indicator: "ereal (indicator A x) = indicator A x" |
24 by (auto simp: indicator_def one_ereal_def) |
24 by (auto simp: indicator_def one_ereal_def) |
302 fix A :: "nat \<Rightarrow> 'a set" assume A: "range A \<subseteq> M" "incseq A" "(\<Union>i. A i) \<in> M" |
302 fix A :: "nat \<Rightarrow> 'a set" assume A: "range A \<subseteq> M" "incseq A" "(\<Union>i. A i) \<in> M" |
303 then have dA: "range (disjointed A) \<subseteq> M" by (auto simp: range_disjointed_sets) |
303 then have dA: "range (disjointed A) \<subseteq> M" by (auto simp: range_disjointed_sets) |
304 with count_sum[THEN spec, of "disjointed A"] A(3) |
304 with count_sum[THEN spec, of "disjointed A"] A(3) |
305 have f_UN: "(\<Sum>i. f (disjointed A i)) = f (\<Union>i. A i)" |
305 have f_UN: "(\<Sum>i. f (disjointed A i)) = f (\<Union>i. A i)" |
306 by (auto simp: UN_disjointed_eq disjoint_family_disjointed) |
306 by (auto simp: UN_disjointed_eq disjoint_family_disjointed) |
307 moreover have "(\<lambda>n. (\<Sum>i=0..<n. f (disjointed A i))) ----> (\<Sum>i. f (disjointed A i))" |
307 moreover have "(\<lambda>n. (\<Sum>i<n. f (disjointed A i))) ----> (\<Sum>i. f (disjointed A i))" |
308 using f(1)[unfolded positive_def] dA |
308 using f(1)[unfolded positive_def] dA |
309 by (auto intro!: summable_sumr_LIMSEQ_suminf summable_ereal_pos) |
309 by (auto intro!: summable_LIMSEQ summable_ereal_pos) |
310 from LIMSEQ_Suc[OF this] |
310 from LIMSEQ_Suc[OF this] |
311 have "(\<lambda>n. (\<Sum>i\<le>n. f (disjointed A i))) ----> (\<Sum>i. f (disjointed A i))" |
311 have "(\<lambda>n. (\<Sum>i\<le>n. f (disjointed A i))) ----> (\<Sum>i. f (disjointed A i))" |
312 unfolding atLeastLessThanSuc_atLeastAtMost atLeast0AtMost . |
312 unfolding lessThan_Suc_atMost . |
313 moreover have "\<And>n. (\<Sum>i\<le>n. f (disjointed A i)) = f (A n)" |
313 moreover have "\<And>n. (\<Sum>i\<le>n. f (disjointed A i)) = f (A n)" |
314 using disjointed_additive[OF f A(1,2)] . |
314 using disjointed_additive[OF f A(1,2)] . |
315 ultimately show "(\<lambda>i. f (A i)) ----> f (\<Union>i. A i)" by simp |
315 ultimately show "(\<lambda>i. f (A i)) ----> f (\<Union>i. A i)" by simp |
316 next |
316 next |
317 assume cont: "\<forall>A. range A \<subseteq> M \<longrightarrow> incseq A \<longrightarrow> (\<Union>i. A i) \<in> M \<longrightarrow> (\<lambda>i. f (A i)) ----> f (\<Union>i. A i)" |
317 assume cont: "\<forall>A. range A \<subseteq> M \<longrightarrow> incseq A \<longrightarrow> (\<Union>i. A i) \<in> M \<longrightarrow> (\<lambda>i. f (A i)) ----> f (\<Union>i. A i)" |