# HG changeset patch # User wenzelm # Date 1358371093 -3600 # Node ID cc03437a1f8035ce18d30022759f3a1eb145ef12 # Parent 3b6417e9f73e225a49e86e6c41b1903a7faf8275 tuned proofs; diff -r 3b6417e9f73e -r cc03437a1f80 src/HOL/Multivariate_Analysis/Integration.thy --- a/src/HOL/Multivariate_Analysis/Integration.thy Wed Jan 16 21:50:39 2013 +0100 +++ b/src/HOL/Multivariate_Analysis/Integration.thy Wed Jan 16 22:18:13 2013 +0100 @@ -5868,165 +5868,378 @@ defer apply(rule insert(3)[OF False]) using insert(5) by auto qed qed auto + subsection {* Dominated convergence. *} -lemma dominated_convergence: fixes f::"nat \ 'n::ordered_euclidean_space \ real" +lemma dominated_convergence: + fixes f :: "nat \ 'n::ordered_euclidean_space \ real" assumes "\k. (f k) integrable_on s" "h integrable_on s" - "\k. \x \ s. norm(f k x) \ (h x)" - "\x \ s. ((\k. f k x) ---> g x) sequentially" - shows "g integrable_on s" "((\k. integral s (f k)) ---> integral s g) sequentially" -proof- have "\m. (\x. Inf {f j x |j. m \ j}) integrable_on s \ + "\k. \x \ s. norm(f k x) \ (h x)" + "\x \ s. ((\k. f k x) ---> g x) sequentially" + shows "g integrable_on s" + "((\k. integral s (f k)) ---> integral s g) sequentially" +proof - + have "\m. (\x. Inf {f j x |j. m \ j}) integrable_on s \ ((\k. integral s (\x. Inf {f j x |j. j \ {m..m + k}})) ---> integral s (\x. Inf {f j x |j. m \ j}))sequentially" - proof(rule monotone_convergence_decreasing,safe) fix m::nat + proof (rule monotone_convergence_decreasing, safe) + fix m :: nat show "bounded {integral s (\x. Inf {f j x |j. j \ {m..m + k}}) |k. True}" - unfolding bounded_iff apply(rule_tac x="integral s h" in exI) - proof safe fix k::nat + unfolding bounded_iff + apply (rule_tac x="integral s h" in exI) + proof safe + fix k :: nat show "norm (integral s (\x. Inf {f j x |j. j \ {m..m + k}})) \ integral s h" - apply(rule integral_norm_bound_integral) unfolding simple_image - apply(rule absolutely_integrable_onD) apply(rule absolutely_integrable_inf_real) - prefer 5 unfolding real_norm_def apply(rule) apply(rule Inf_abs_ge) - prefer 5 apply rule apply(rule_tac g=h in absolutely_integrable_integrable_bound_real) - using assms unfolding real_norm_def by auto - qed fix k::nat show "(\x. Inf {f j x |j. j \ {m..m + k}}) integrable_on s" - unfolding simple_image apply(rule absolutely_integrable_onD) - apply(rule absolutely_integrable_inf_real) prefer 3 - using absolutely_integrable_integrable_bound_real[OF assms(3,1,2)] by auto - fix x assume x:"x\s" show "Inf {f j x |j. j \ {m..m + Suc k}} - \ Inf {f j x |j. j \ {m..m + k}}" apply(rule Inf_ge) unfolding setge_def - defer apply rule apply(subst Inf_finite_le_iff) prefer 3 - apply(rule_tac x=xa in bexI) by auto - let ?S = "{f j x| j. m \ j}" def i \ "Inf ?S" + apply (rule integral_norm_bound_integral) + unfolding simple_image + apply (rule absolutely_integrable_onD) + apply (rule absolutely_integrable_inf_real) + prefer 5 + unfolding real_norm_def + apply rule + apply (rule Inf_abs_ge) + prefer 5 + apply rule + apply (rule_tac g = h in absolutely_integrable_integrable_bound_real) + using assms + unfolding real_norm_def + apply auto + done + qed + fix k :: nat + show "(\x. Inf {f j x |j. j \ {m..m + k}}) integrable_on s" + unfolding simple_image + apply (rule absolutely_integrable_onD) + apply (rule absolutely_integrable_inf_real) + prefer 3 + using absolutely_integrable_integrable_bound_real[OF assms(3,1,2)] + apply auto + done + fix x + assume x: "x \ s" + show "Inf {f j x |j. j \ {m..m + Suc k}} \ Inf {f j x |j. j \ {m..m + k}}" + apply (rule Inf_ge) + unfolding setge_def + defer + apply rule + apply (subst Inf_finite_le_iff) + prefer 3 + apply (rule_tac x=xa in bexI) + apply auto + done + let ?S = "{f j x| j. m \ j}" + def i \ "Inf ?S" show "((\k. Inf {f j x |j. j \ {m..m + k}}) ---> i) sequentially" - proof (rule LIMSEQ_I) case goal1 note r=this have i:"isGlb UNIV ?S i" unfolding i_def apply(rule Inf) - defer apply(rule_tac x="- h x - 1" in exI) unfolding setge_def - proof safe case goal1 thus ?case using assms(3)[rule_format,OF x, of j] by auto + proof (rule LIMSEQ_I) + case goal1 + note r = this + have i: "isGlb UNIV ?S i" + unfolding i_def + apply (rule Inf) + defer + apply (rule_tac x="- h x - 1" in exI) + unfolding setge_def + proof safe + case goal1 + thus ?case using assms(3)[rule_format,OF x, of j] by auto qed auto have "\y\?S. \ y \ i + r" - proof(rule ccontr) case goal1 hence "i \ i + r" apply- - apply(rule isGlb_le_isLb[OF i]) apply(rule isLbI) unfolding setge_def by fastforce+ + proof(rule ccontr) + case goal1 + hence "i \ i + r" + apply - + apply (rule isGlb_le_isLb[OF i]) + apply (rule isLbI) + unfolding setge_def + apply fastforce+ + done thus False using r by auto - qed then guess y .. note y=this[unfolded not_le] + qed + then guess y .. note y=this[unfolded not_le] from this(1)[unfolded mem_Collect_eq] guess N .. note N=conjunctD2[OF this] - show ?case apply(rule_tac x=N in exI) - proof safe case goal1 + show ?case + apply (rule_tac x=N in exI) + proof safe + case goal1 have *:"\y ix. y < i + r \ i \ ix \ ix \ y \ abs(ix - i) < r" by arith - show ?case unfolding real_norm_def apply(rule *[rule_format,OF y(2)]) - unfolding i_def apply(rule real_le_inf_subset) prefer 3 - apply(rule,rule isGlbD1[OF i]) prefer 3 apply(subst Inf_finite_le_iff) - prefer 3 apply(rule_tac x=y in bexI) using N goal1 by auto - qed qed qed note dec1 = conjunctD2[OF this] + show ?case + unfolding real_norm_def + apply (rule *[rule_format,OF y(2)]) + unfolding i_def + apply (rule real_le_inf_subset) + prefer 3 + apply (rule,rule isGlbD1[OF i]) + prefer 3 + apply (subst Inf_finite_le_iff) + prefer 3 + apply (rule_tac x=y in bexI) + using N goal1 + apply auto + done + qed + qed + qed + note dec1 = conjunctD2[OF this] have "\m. (\x. Sup {f j x |j. m \ j}) integrable_on s \ ((\k. integral s (\x. Sup {f j x |j. j \ {m..m + k}})) ---> integral s (\x. Sup {f j x |j. m \ j})) sequentially" - proof(rule monotone_convergence_increasing,safe) fix m::nat + proof (rule monotone_convergence_increasing,safe) + fix m :: nat show "bounded {integral s (\x. Sup {f j x |j. j \ {m..m + k}}) |k. True}" - unfolding bounded_iff apply(rule_tac x="integral s h" in exI) - proof safe fix k::nat + unfolding bounded_iff + apply (rule_tac x="integral s h" in exI) + proof safe + fix k :: nat show "norm (integral s (\x. Sup {f j x |j. j \ {m..m + k}})) \ integral s h" - apply(rule integral_norm_bound_integral) unfolding simple_image - apply(rule absolutely_integrable_onD) apply(rule absolutely_integrable_sup_real) - prefer 5 unfolding real_norm_def apply(rule) apply(rule Sup_abs_le) - prefer 5 apply rule apply(rule_tac g=h in absolutely_integrable_integrable_bound_real) - using assms unfolding real_norm_def by auto - qed fix k::nat show "(\x. Sup {f j x |j. j \ {m..m + k}}) integrable_on s" - unfolding simple_image apply(rule absolutely_integrable_onD) - apply(rule absolutely_integrable_sup_real) prefer 3 - using absolutely_integrable_integrable_bound_real[OF assms(3,1,2)] by auto - fix x assume x:"x\s" show "Sup {f j x |j. j \ {m..m + Suc k}} - \ Sup {f j x |j. j \ {m..m + k}}" apply(rule Sup_le) unfolding setle_def - defer apply rule apply(subst Sup_finite_ge_iff) prefer 3 apply(rule_tac x=y in bexI) by auto - let ?S = "{f j x| j. m \ j}" def i \ "Sup ?S" + apply (rule integral_norm_bound_integral) unfolding simple_image + apply (rule absolutely_integrable_onD) + apply(rule absolutely_integrable_sup_real) + prefer 5 unfolding real_norm_def + apply rule + apply (rule Sup_abs_le) + prefer 5 + apply rule + apply (rule_tac g=h in absolutely_integrable_integrable_bound_real) + using assms + unfolding real_norm_def + apply auto + done + qed + fix k :: nat + show "(\x. Sup {f j x |j. j \ {m..m + k}}) integrable_on s" + unfolding simple_image + apply (rule absolutely_integrable_onD) + apply (rule absolutely_integrable_sup_real) + prefer 3 + using absolutely_integrable_integrable_bound_real[OF assms(3,1,2)] + apply auto + done + fix x + assume x: "x\s" + show "Sup {f j x |j. j \ {m..m + Suc k}} \ Sup {f j x |j. j \ {m..m + k}}" + apply (rule Sup_le) + unfolding setle_def + defer + apply rule + apply (subst Sup_finite_ge_iff) + prefer 3 + apply (rule_tac x=y in bexI) + apply auto + done + let ?S = "{f j x| j. m \ j}" + def i \ "Sup ?S" show "((\k. Sup {f j x |j. j \ {m..m + k}}) ---> i) sequentially" - proof (rule LIMSEQ_I) case goal1 note r=this have i:"isLub UNIV ?S i" unfolding i_def apply(rule Sup) - defer apply(rule_tac x="h x" in exI) unfolding setle_def - proof safe case goal1 thus ?case using assms(3)[rule_format,OF x, of j] by auto + proof (rule LIMSEQ_I) + case goal1 note r=this + have i: "isLub UNIV ?S i" + unfolding i_def + apply (rule Sup) + defer + apply (rule_tac x="h x" in exI) + unfolding setle_def + proof safe + case goal1 + thus ?case using assms(3)[rule_format,OF x, of j] by auto qed auto have "\y\?S. \ y \ i - r" - proof(rule ccontr) case goal1 hence "i \ i - r" apply- - apply(rule isLub_le_isUb[OF i]) apply(rule isUbI) unfolding setle_def by fastforce+ + proof (rule ccontr) + case goal1 + hence "i \ i - r" + apply - + apply (rule isLub_le_isUb[OF i]) + apply (rule isUbI) + unfolding setle_def + apply fastforce+ + done thus False using r by auto - qed then guess y .. note y=this[unfolded not_le] + qed + then guess y .. note y=this[unfolded not_le] from this(1)[unfolded mem_Collect_eq] guess N .. note N=conjunctD2[OF this] - show ?case apply(rule_tac x=N in exI) - proof safe case goal1 - have *:"\y ix. i - r < y \ ix \ i \ y \ ix \ abs(ix - i) < r" by arith - show ?case unfolding real_norm_def apply(rule *[rule_format,OF y(2)]) - unfolding i_def apply(rule real_ge_sup_subset) prefer 3 - apply(rule,rule isLubD1[OF i]) prefer 3 apply(subst Sup_finite_ge_iff) - prefer 3 apply(rule_tac x=y in bexI) using N goal1 by auto - qed qed qed note inc1 = conjunctD2[OF this] - - have "g integrable_on s \ ((\k. integral s (\x. Inf {f j x |j. k \ j})) ---> integral s g) sequentially" - apply(rule monotone_convergence_increasing,safe) apply fact - proof- show "bounded {integral s (\x. Inf {f j x |j. k \ j}) |k. True}" + show ?case + apply (rule_tac x=N in exI) + proof safe + case goal1 + have *: "\y ix. i - r < y \ ix \ i \ y \ ix \ abs(ix - i) < r" + by arith + show ?case + unfolding real_norm_def + apply (rule *[rule_format,OF y(2)]) + unfolding i_def + apply (rule real_ge_sup_subset) + prefer 3 + apply (rule, rule isLubD1[OF i]) + prefer 3 + apply (subst Sup_finite_ge_iff) + prefer 3 + apply (rule_tac x = y in bexI) + using N goal1 + apply auto + done + qed + qed + qed + note inc1 = conjunctD2[OF this] + + have "g integrable_on s \ + ((\k. integral s (\x. Inf {f j x |j. k \ j})) ---> integral s g) sequentially" + apply (rule monotone_convergence_increasing,safe) + apply fact + proof - + show "bounded {integral s (\x. Inf {f j x |j. k \ j}) |k. True}" unfolding bounded_iff apply(rule_tac x="integral s h" in exI) - proof safe fix k::nat + proof safe + fix k :: nat show "norm (integral s (\x. Inf {f j x |j. k \ j})) \ integral s h" - apply(rule integral_norm_bound_integral) apply fact+ - unfolding real_norm_def apply(rule) apply(rule Inf_abs_ge) using assms(3) by auto - qed fix k::nat and x assume x:"x\s" - - have *:"\x y::real. x \ - y \ - x \ y" by auto - show "Inf {f j x |j. k \ j} \ Inf {f j x |j. Suc k \ j}" apply- - apply(rule real_le_inf_subset) prefer 3 unfolding setge_def - apply(rule_tac x="- h x" in exI) apply safe apply(rule *) - using assms(3)[rule_format,OF x] unfolding real_norm_def abs_le_iff by auto + apply (rule integral_norm_bound_integral) + apply fact+ + unfolding real_norm_def + apply rule + apply (rule Inf_abs_ge) + using assms(3) + apply auto + done + qed + fix k :: nat and x + assume x: "x \ s" + + have *: "\x y::real. x \ - y \ - x \ y" by auto + show "Inf {f j x |j. k \ j} \ Inf {f j x |j. Suc k \ j}" + apply - + apply (rule real_le_inf_subset) + prefer 3 + unfolding setge_def + apply (rule_tac x="- h x" in exI) + apply safe + apply (rule *) + using assms(3)[rule_format,OF x] + unfolding real_norm_def abs_le_iff + apply auto + done show "((\k. Inf {f j x |j. k \ j}) ---> g x) sequentially" - proof (rule LIMSEQ_I) case goal1 hence "0 + ((\k. integral s (\x. Sup {f j x |j. k \ j})) ---> integral s g) sequentially" + apply (rule monotone_convergence_decreasing,safe) + apply fact + proof - + show "bounded {integral s (\x. Sup {f j x |j. k \ j}) |k. True}" + unfolding bounded_iff + apply (rule_tac x="integral s h" in exI) + proof safe + fix k :: nat + show "norm (integral s (\x. Sup {f j x |j. k \ j})) \ integral s h" + apply (rule integral_norm_bound_integral) + apply fact+ + unfolding real_norm_def + apply rule + apply (rule Sup_abs_le) + using assms(3) + apply auto + done + qed + fix k :: nat and x + assume x: "x \ s" + + show "Sup {f j x |j. k \ j} \ Sup {f j x |j. Suc k \ j}" + apply - + apply (rule real_ge_sup_subset) + prefer 3 + unfolding setle_def + apply (rule_tac x="h x" in exI) + apply safe + using assms(3)[rule_format,OF x] + unfolding real_norm_def abs_le_iff + apply auto + done + show "((\k. Sup {f j x |j. k \ j}) ---> g x) sequentially" + proof (rule LIMSEQ_I) + case goal1 + hence "0 ((\k. integral s (\x. Sup {f j x |j. k \ j})) ---> integral s g) sequentially" - apply(rule monotone_convergence_decreasing,safe) apply fact - proof- show "bounded {integral s (\x. Sup {f j x |j. k \ j}) |k. True}" - unfolding bounded_iff apply(rule_tac x="integral s h" in exI) - proof safe fix k::nat - show "norm (integral s (\x. Sup {f j x |j. k \ j})) \ integral s h" - apply(rule integral_norm_bound_integral) apply fact+ - unfolding real_norm_def apply(rule) apply(rule Sup_abs_le) using assms(3) by auto - qed fix k::nat and x assume x:"x\s" - - show "Sup {f j x |j. k \ j} \ Sup {f j x |j. Suc k \ j}" apply- - apply(rule real_ge_sup_subset) prefer 3 unfolding setle_def - apply(rule_tac x="h x" in exI) apply safe - using assms(3)[rule_format,OF x] unfolding real_norm_def abs_le_iff by auto - show "((\k. Sup {f j x |j. k \ j}) ---> g x) sequentially" - proof (rule LIMSEQ_I) case goal1 hence "0k. integral s (f k)) ---> integral s g) sequentially" - proof (rule LIMSEQ_I) case goal1 + proof (rule LIMSEQ_I) + case goal1 from LIMSEQ_D [OF inc2(2) goal1] guess N1 .. note N1=this[unfolded real_norm_def] from LIMSEQ_D [OF dec2(2) goal1] guess N2 .. note N2=this[unfolded real_norm_def] - show ?case apply(rule_tac x="N1+N2" in exI,safe) - proof- fix n assume n:"n \ N1 + N2" - have *:"\i0 i i1 g. \i0 - g\ < r \ \i1 - g\ < r \ i0 \ i \ i \ i1 \ \i - g\ < r" by arith - show "norm (integral s (f n) - integral s g) < r" unfolding real_norm_def - apply(rule *[rule_format,OF N1[rule_format] N2[rule_format], of n n]) - proof- show "integral s (\x. Inf {f j x |j. n \ j}) \ integral s (f n)" - proof(rule integral_le[OF dec1(1) assms(1)],safe) - fix x assume x:"x \ s" have *:"\x y::real. x \ - y \ - x \ y" by auto - show "Inf {f j x |j. n \ j} \ f n x" apply(rule Inf_lower[where z="- h x"]) defer - apply(rule *) using assms(3)[rule_format,OF x] unfolding real_norm_def abs_le_iff by auto - qed show "integral s (f n) \ integral s (\x. Sup {f j x |j. n \ j})" - proof(rule integral_le[OF assms(1) inc1(1)],safe) - fix x assume x:"x \ s" - show "f n x \ Sup {f j x |j. n \ j}" apply(rule Sup_upper[where z="h x"]) defer - using assms(3)[rule_format,OF x] unfolding real_norm_def abs_le_iff by auto - qed qed(insert n,auto) qed qed qed + show ?case + apply (rule_tac x="N1+N2" in exI, safe) + proof - + fix n + assume n: "n \ N1 + N2" + have *: "\i0 i i1 g. \i0 - g\ < r \ \i1 - g\ < r \ i0 \ i \ i \ i1 \ \i - g\ < r" + by arith + show "norm (integral s (f n) - integral s g) < r" + unfolding real_norm_def + apply (rule *[rule_format,OF N1[rule_format] N2[rule_format], of n n]) + proof - + show "integral s (\x. Inf {f j x |j. n \ j}) \ integral s (f n)" + proof (rule integral_le[OF dec1(1) assms(1)], safe) + fix x + assume x: "x \ s" + have *: "\x y::real. x \ - y \ - x \ y" by auto + show "Inf {f j x |j. n \ j} \ f n x" + apply (rule Inf_lower[where z="- h x"]) + defer + apply (rule *) + using assms(3)[rule_format,OF x] + unfolding real_norm_def abs_le_iff + apply auto + done + qed + show "integral s (f n) \ integral s (\x. Sup {f j x |j. n \ j})" + proof (rule integral_le[OF assms(1) inc1(1)], safe) + fix x + assume x: "x \ s" + show "f n x \ Sup {f j x |j. n \ j}" + apply (rule Sup_upper[where z="h x"]) + defer + using assms(3)[rule_format,OF x] + unfolding real_norm_def abs_le_iff + apply auto + done + qed + qed (insert n, auto) + qed + qed +qed end