src/HOL/Analysis/Improper_Integral.thy
changeset 66497 18a6478a574c
parent 66408 46cfd348c373
child 66552 507a42c0a0ff
equal deleted inserted replaced
66496:001d4a9986a2 66497:18a6478a574c
   656         by (rule \<open>gauge \<gamma>\<close>)
   656         by (rule \<open>gauge \<gamma>\<close>)
   657       show "(\<Sum>(x,K) \<in> S. norm (content K *\<^sub>R h x - integral K h)) < \<epsilon>/2"
   657       show "(\<Sum>(x,K) \<in> S. norm (content K *\<^sub>R h x - integral K h)) < \<epsilon>/2"
   658            if "S tagged_partial_division_of cbox a b" "\<gamma> fine S" "h \<in> F" for S h
   658            if "S tagged_partial_division_of cbox a b" "\<gamma> fine S" "h \<in> F" for S h
   659       proof -
   659       proof -
   660         have "(\<Sum>(x,K) \<in> S. norm (content K *\<^sub>R h x - integral K h)) \<le> 2 * real DIM('b) * (\<epsilon>/(5 * Suc DIM('b)))"
   660         have "(\<Sum>(x,K) \<in> S. norm (content K *\<^sub>R h x - integral K h)) \<le> 2 * real DIM('b) * (\<epsilon>/(5 * Suc DIM('b)))"
   661         proof (rule henstock_lemma_part2 [of h a b])
   661         proof (rule Henstock_lemma_part2 [of h a b])
   662           show "h integrable_on cbox a b"
   662           show "h integrable_on cbox a b"
   663             using that F equiintegrable_on_def by metis
   663             using that F equiintegrable_on_def by metis
   664           show "gauge \<gamma>"
   664           show "gauge \<gamma>"
   665             by (rule \<open>gauge \<gamma>\<close>)
   665             by (rule \<open>gauge \<gamma>\<close>)
   666         qed (use that \<open>\<epsilon> > 0\<close> \<gamma> in auto)
   666         qed (use that \<open>\<epsilon> > 0\<close> \<gamma> in auto)
   776           finally show ?thesis .
   776           finally show ?thesis .
   777         qed
   777         qed
   778       qed
   778       qed
   779       also have "... = (\<Sum>K\<in>snd ` S. \<epsilon>/4 * (b \<bullet> i - a \<bullet> i) / content (cbox a b) * content K
   779       also have "... = (\<Sum>K\<in>snd ` S. \<epsilon>/4 * (b \<bullet> i - a \<bullet> i) / content (cbox a b) * content K
   780                                      / (interval_upperbound K \<bullet> i - interval_lowerbound K \<bullet> i))"
   780                                      / (interval_upperbound K \<bullet> i - interval_lowerbound K \<bullet> i))"
   781         apply (rule sum.over_tagged_division_lemma [OF tagged_partial_division_of_union_self [OF S]])
   781         apply (rule sum.over_tagged_division_lemma [OF tagged_partial_division_of_Union_self [OF S]])
   782         apply (simp add: box_eq_empty(1) content_eq_0)
   782         apply (simp add: box_eq_empty(1) content_eq_0)
   783         done
   783         done
   784       also have "... = \<epsilon>/2 * ((b \<bullet> i - a \<bullet> i) / (2 * content (cbox a b)) * (\<Sum>K\<in>snd ` S. content K / (interval_upperbound K \<bullet> i - interval_lowerbound K \<bullet> i)))"
   784       also have "... = \<epsilon>/2 * ((b \<bullet> i - a \<bullet> i) / (2 * content (cbox a b)) * (\<Sum>K\<in>snd ` S. content K / (interval_upperbound K \<bullet> i - interval_lowerbound K \<bullet> i)))"
   785         by (simp add: sum_distrib_left mult.assoc)
   785         by (simp add: sum_distrib_left mult.assoc)
   786       also have "... \<le> (\<epsilon>/2) * 1"
   786       also have "... \<le> (\<epsilon>/2) * 1"
   787       proof (rule mult_left_mono)
   787       proof (rule mult_left_mono)
   788         have "(b \<bullet> i - a \<bullet> i) * (\<Sum>K\<in>snd ` S. content K / (interval_upperbound K \<bullet> i - interval_lowerbound K \<bullet> i))
   788         have "(b \<bullet> i - a \<bullet> i) * (\<Sum>K\<in>snd ` S. content K / (interval_upperbound K \<bullet> i - interval_lowerbound K \<bullet> i))
   789               \<le> 2 * content (cbox a b)"
   789               \<le> 2 * content (cbox a b)"
   790         proof (rule sum_content_area_over_thin_division)
   790         proof (rule sum_content_area_over_thin_division)
   791           show "snd ` S division_of \<Union>(snd ` S)"
   791           show "snd ` S division_of \<Union>(snd ` S)"
   792             by (auto intro: S tagged_partial_division_of_union_self division_of_tagged_division)
   792             by (auto intro: S tagged_partial_division_of_Union_self division_of_tagged_division)
   793           show "UNION S snd \<subseteq> cbox a b"
   793           show "UNION S snd \<subseteq> cbox a b"
   794             using S by force
   794             using S by force
   795           show "a \<bullet> i \<le> c \<bullet> i" "c \<bullet> i \<le> b \<bullet> i"
   795           show "a \<bullet> i \<le> c \<bullet> i" "c \<bullet> i \<le> b \<bullet> i"
   796             using mem_box(2) that by blast+
   796             using mem_box(2) that by blast+
   797         qed (use that in auto)
   797         qed (use that in auto)
   859       qed
   859       qed
   860       have h_less3: "(\<Sum>(x,K) \<in> T. norm (?CI K h x)) < \<epsilon>/3"
   860       have h_less3: "(\<Sum>(x,K) \<in> T. norm (?CI K h x)) < \<epsilon>/3"
   861         if "T tagged_partial_division_of cbox a b" "\<gamma>1 fine T" "h \<in> F" for T h
   861         if "T tagged_partial_division_of cbox a b" "\<gamma>1 fine T" "h \<in> F" for T h
   862       proof -
   862       proof -
   863         have "(\<Sum>(x,K) \<in> T. norm (?CI K h x)) \<le> 2 * real DIM('b) * (\<epsilon>/(7 * Suc DIM('b)))"
   863         have "(\<Sum>(x,K) \<in> T. norm (?CI K h x)) \<le> 2 * real DIM('b) * (\<epsilon>/(7 * Suc DIM('b)))"
   864         proof (rule henstock_lemma_part2 [of h a b])
   864         proof (rule Henstock_lemma_part2 [of h a b])
   865           show "h integrable_on cbox a b"
   865           show "h integrable_on cbox a b"
   866             using that F equiintegrable_on_def by metis
   866             using that F equiintegrable_on_def by metis
   867           show "gauge \<gamma>1"
   867           show "gauge \<gamma>1"
   868             by (rule \<open>gauge \<gamma>1\<close>)
   868             by (rule \<open>gauge \<gamma>1\<close>)
   869         qed (use that \<open>\<epsilon> > 0\<close> \<gamma>1 in auto)
   869         qed (use that \<open>\<epsilon> > 0\<close> \<gamma>1 in auto)
   983                   have False if "K \<noteq> L"
   983                   have False if "K \<noteq> L"
   984                   proof -
   984                   proof -
   985                     obtain u v where uv: "L = cbox u v"
   985                     obtain u v where uv: "L = cbox u v"
   986                       using T'_tagged \<open>(x, L) \<in> A\<close> \<open>A \<subseteq> T''\<close> \<open>T'' \<subseteq> T'\<close> by blast
   986                       using T'_tagged \<open>(x, L) \<in> A\<close> \<open>A \<subseteq> T''\<close> \<open>T'' \<subseteq> T'\<close> by blast
   987                     have "A tagged_division_of UNION A snd"
   987                     have "A tagged_division_of UNION A snd"
   988                       using A_tagged tagged_partial_division_of_union_self by auto
   988                       using A_tagged tagged_partial_division_of_Union_self by auto
   989                     then have "interior (K \<inter> {x. x \<bullet> i \<le> c}) = {}"
   989                     then have "interior (K \<inter> {x. x \<bullet> i \<le> c}) = {}"
   990                       apply (rule tagged_division_split_left_inj [OF _ \<open>(x,K) \<in> A\<close> \<open>(x,L) \<in> A\<close>])
   990                       apply (rule tagged_division_split_left_inj [OF _ \<open>(x,K) \<in> A\<close> \<open>(x,L) \<in> A\<close>])
   991                       using that eq \<open>i \<in> Basis\<close> by auto
   991                       using that eq \<open>i \<in> Basis\<close> by auto
   992                     then show False
   992                     then show False
   993                       using interval_split [OF \<open>i \<in> Basis\<close>] int_ne0 content_eq_0_interior eq uv by fastforce
   993                       using interval_split [OF \<open>i \<in> Basis\<close>] int_ne0 content_eq_0_interior eq uv by fastforce
  1012                   have False if "K \<noteq> L"
  1012                   have False if "K \<noteq> L"
  1013                   proof -
  1013                   proof -
  1014                     obtain u v where uv: "L = cbox u v"
  1014                     obtain u v where uv: "L = cbox u v"
  1015                       using T'_tagged \<open>(x, L) \<in> B\<close> \<open>B \<subseteq> T''\<close> \<open>T'' \<subseteq> T'\<close> by blast
  1015                       using T'_tagged \<open>(x, L) \<in> B\<close> \<open>B \<subseteq> T''\<close> \<open>T'' \<subseteq> T'\<close> by blast
  1016                     have "B tagged_division_of UNION B snd"
  1016                     have "B tagged_division_of UNION B snd"
  1017                       using B_tagged tagged_partial_division_of_union_self by auto
  1017                       using B_tagged tagged_partial_division_of_Union_self by auto
  1018                     then have "interior (K \<inter> {x. c \<le> x \<bullet> i}) = {}"
  1018                     then have "interior (K \<inter> {x. c \<le> x \<bullet> i}) = {}"
  1019                       apply (rule tagged_division_split_right_inj [OF _ \<open>(x,K) \<in> B\<close> \<open>(x,L) \<in> B\<close>])
  1019                       apply (rule tagged_division_split_right_inj [OF _ \<open>(x,K) \<in> B\<close> \<open>(x,L) \<in> B\<close>])
  1020                       using that eq \<open>i \<in> Basis\<close> by auto
  1020                       using that eq \<open>i \<in> Basis\<close> by auto
  1021                     then show False
  1021                     then show False
  1022                       using interval_split [OF \<open>i \<in> Basis\<close>] int_ne0
  1022                       using interval_split [OF \<open>i \<in> Basis\<close>] int_ne0