4578 unfolding dist_norm |
4578 unfolding dist_norm |
4579 using gm gn p finep |
4579 using gm gn p finep |
4580 by (auto intro!: triangle3) |
4580 by (auto intro!: triangle3) |
4581 qed |
4581 qed |
4582 qed |
4582 qed |
4583 then obtain s where s: "i ----> s" |
4583 then obtain s where s: "i \<longlonglongrightarrow> s" |
4584 using convergent_eq_cauchy[symmetric] by blast |
4584 using convergent_eq_cauchy[symmetric] by blast |
4585 show ?thesis |
4585 show ?thesis |
4586 unfolding integrable_on_def has_integral |
4586 unfolding integrable_on_def has_integral |
4587 proof (rule_tac x=s in exI, clarify) |
4587 proof (rule_tac x=s in exI, clarify) |
4588 fix e::real |
4588 fix e::real |
10199 |
10199 |
10200 lemma has_integral_monotone_convergence_increasing: |
10200 lemma has_integral_monotone_convergence_increasing: |
10201 fixes f :: "nat \<Rightarrow> 'a::euclidean_space \<Rightarrow> real" |
10201 fixes f :: "nat \<Rightarrow> 'a::euclidean_space \<Rightarrow> real" |
10202 assumes f: "\<And>k. (f k has_integral x k) s" |
10202 assumes f: "\<And>k. (f k has_integral x k) s" |
10203 assumes "\<And>k x. x \<in> s \<Longrightarrow> f k x \<le> f (Suc k) x" |
10203 assumes "\<And>k x. x \<in> s \<Longrightarrow> f k x \<le> f (Suc k) x" |
10204 assumes "\<And>x. x \<in> s \<Longrightarrow> (\<lambda>k. f k x) ----> g x" |
10204 assumes "\<And>x. x \<in> s \<Longrightarrow> (\<lambda>k. f k x) \<longlonglongrightarrow> g x" |
10205 assumes "x ----> x'" |
10205 assumes "x \<longlonglongrightarrow> x'" |
10206 shows "(g has_integral x') s" |
10206 shows "(g has_integral x') s" |
10207 proof - |
10207 proof - |
10208 have x_eq: "x = (\<lambda>i. integral s (f i))" |
10208 have x_eq: "x = (\<lambda>i. integral s (f i))" |
10209 by (simp add: integral_unique[OF f]) |
10209 by (simp add: integral_unique[OF f]) |
10210 then have x: "{integral s (f k) |k. True} = range x" |
10210 then have x: "{integral s (f k) |k. True} = range x" |
10211 by auto |
10211 by auto |
10212 |
10212 |
10213 have "g integrable_on s \<and> (\<lambda>k. integral s (f k)) ----> integral s g" |
10213 have "g integrable_on s \<and> (\<lambda>k. integral s (f k)) \<longlonglongrightarrow> integral s g" |
10214 proof (intro monotone_convergence_increasing allI ballI assms) |
10214 proof (intro monotone_convergence_increasing allI ballI assms) |
10215 show "bounded {integral s (f k) |k. True}" |
10215 show "bounded {integral s (f k) |k. True}" |
10216 unfolding x by (rule convergent_imp_bounded) fact |
10216 unfolding x by (rule convergent_imp_bounded) fact |
10217 qed (auto intro: f) |
10217 qed (auto intro: f) |
10218 moreover then have "integral s g = x'" |
10218 moreover then have "integral s g = x'" |
10219 by (intro LIMSEQ_unique[OF _ \<open>x ----> x'\<close>]) (simp add: x_eq) |
10219 by (intro LIMSEQ_unique[OF _ \<open>x \<longlonglongrightarrow> x'\<close>]) (simp add: x_eq) |
10220 ultimately show ?thesis |
10220 ultimately show ?thesis |
10221 by (simp add: has_integral_integral) |
10221 by (simp add: has_integral_integral) |
10222 qed |
10222 qed |
10223 |
10223 |
10224 lemma monotone_convergence_decreasing: |
10224 lemma monotone_convergence_decreasing: |
12085 |
12085 |
12086 have *: "\<And>x y::real. x \<ge> - y \<Longrightarrow> - x \<le> y" by auto |
12086 have *: "\<And>x y::real. x \<ge> - y \<Longrightarrow> - x \<le> y" by auto |
12087 show "Inf {f j x |j. k \<le> j} \<le> Inf {f j x |j. Suc k \<le> j}" |
12087 show "Inf {f j x |j. k \<le> j} \<le> Inf {f j x |j. Suc k \<le> j}" |
12088 by (intro cInf_superset_mono) (auto simp: \<open>x\<in>s\<close>) |
12088 by (intro cInf_superset_mono) (auto simp: \<open>x\<in>s\<close>) |
12089 |
12089 |
12090 show "(\<lambda>k::nat. Inf {f j x |j. k \<le> j}) ----> g x" |
12090 show "(\<lambda>k::nat. Inf {f j x |j. k \<le> j}) \<longlonglongrightarrow> g x" |
12091 proof (rule LIMSEQ_I, goal_cases) |
12091 proof (rule LIMSEQ_I, goal_cases) |
12092 case r: (1 r) |
12092 case r: (1 r) |
12093 then have "0<r/2" |
12093 then have "0<r/2" |
12094 by auto |
12094 by auto |
12095 from assms(4)[THEN bspec, THEN LIMSEQ_D, OF x this] guess N .. note N = this |
12095 from assms(4)[THEN bspec, THEN LIMSEQ_D, OF x this] guess N .. note N = this |
12181 qed |
12181 qed |
12182 |
12182 |
12183 lemma has_integral_dominated_convergence: |
12183 lemma has_integral_dominated_convergence: |
12184 fixes f :: "nat \<Rightarrow> 'n::euclidean_space \<Rightarrow> real" |
12184 fixes f :: "nat \<Rightarrow> 'n::euclidean_space \<Rightarrow> real" |
12185 assumes "\<And>k. (f k has_integral y k) s" "h integrable_on s" |
12185 assumes "\<And>k. (f k has_integral y k) s" "h integrable_on s" |
12186 "\<And>k. \<forall>x\<in>s. norm (f k x) \<le> h x" "\<forall>x\<in>s. (\<lambda>k. f k x) ----> g x" |
12186 "\<And>k. \<forall>x\<in>s. norm (f k x) \<le> h x" "\<forall>x\<in>s. (\<lambda>k. f k x) \<longlonglongrightarrow> g x" |
12187 and x: "y ----> x" |
12187 and x: "y \<longlonglongrightarrow> x" |
12188 shows "(g has_integral x) s" |
12188 shows "(g has_integral x) s" |
12189 proof - |
12189 proof - |
12190 have int_f: "\<And>k. (f k) integrable_on s" |
12190 have int_f: "\<And>k. (f k) integrable_on s" |
12191 using assms by (auto simp: integrable_on_def) |
12191 using assms by (auto simp: integrable_on_def) |
12192 have "(g has_integral (integral s g)) s" |
12192 have "(g has_integral (integral s g)) s" |
12193 by (intro integrable_integral dominated_convergence[OF int_f assms(2)]) fact+ |
12193 by (intro integrable_integral dominated_convergence[OF int_f assms(2)]) fact+ |
12194 moreover have "integral s g = x" |
12194 moreover have "integral s g = x" |
12195 proof (rule LIMSEQ_unique) |
12195 proof (rule LIMSEQ_unique) |
12196 show "(\<lambda>i. integral s (f i)) ----> x" |
12196 show "(\<lambda>i. integral s (f i)) \<longlonglongrightarrow> x" |
12197 using integral_unique[OF assms(1)] x by simp |
12197 using integral_unique[OF assms(1)] x by simp |
12198 show "(\<lambda>i. integral s (f i)) ----> integral s g" |
12198 show "(\<lambda>i. integral s (f i)) \<longlonglongrightarrow> integral s g" |
12199 by (intro dominated_convergence[OF int_f assms(2)]) fact+ |
12199 by (intro dominated_convergence[OF int_f assms(2)]) fact+ |
12200 qed |
12200 qed |
12201 ultimately show ?thesis |
12201 ultimately show ?thesis |
12202 by simp |
12202 by simp |
12203 qed |
12203 qed |