src/HOL/Multivariate_Analysis/Integration.thy
changeset 56180 fae7a45d0fef
parent 56166 9a241bc276cd
child 56181 2aa0b19e74f3
equal deleted inserted replaced
56179:6b5c46582260 56180:fae7a45d0fef
 11677       then have "?S \<le> ?S - e"
 11677       then have "?S \<le> ?S - e"
 11678         by (intro cSUP_least[OF D(1)]) auto
 11678         by (intro cSUP_least[OF D(1)]) auto
 11679       then show False
 11679       then show False
 11680         using goal2 by auto
 11680         using goal2 by auto
 11681     qed
 11681     qed
 11682     then guess K .. note * = this[unfolded image_iff not_le]
 11682     then obtain K where *: "\<exists>x\<in>{d. d division_of \<Union>d}. K = (\<Sum>k\<in>x. norm (integral k f))"
 11683     from this(1) guess d .. note this[unfolded mem_Collect_eq]
 11683       "SUPR {d. d division_of \<Union>d} (setsum (\<lambda>k. norm (integral k f))) - e < K"
       
 11684       by (auto simp add: image_iff not_le)
       
 11685     from this(1) obtain d where "d division_of \<Union>d"
       
 11686       and "K = (\<Sum>k\<in>d. norm (integral k f))"
       
 11687       by auto
 11684     note d = this(1) *(2)[unfolded this(2)]
 11688     note d = this(1) *(2)[unfolded this(2)]
 11685     note d'=division_ofD[OF this(1)]
 11689     note d'=division_ofD[OF this(1)]
 11686     have "bounded (\<Union>d)"
 11690     have "bounded (\<Union>d)"
 11687       by (rule elementary_bounded,fact)
 11691       by (rule elementary_bounded,fact)
 11688     from this[unfolded bounded_pos] guess K .. note K=conjunctD2[OF this]
 11692     from this[unfolded bounded_pos] obtain K where
       
 11693        K: "0 < K" "\<forall>x\<in>\<Union>d. norm x \<le> K" by auto
 11689     show ?case
 11694     show ?case
 11690       apply (rule_tac x="K + 1" in exI)
 11695       apply (rule_tac x="K + 1" in exI)
 11691       apply safe
 11696       apply safe
 11692     proof -
 11697     proof -
 11693       fix a b :: 'n
 11698       fix a b :: 'n
 11740       next
 11745       next
 11741         note f = absolutely_integrable_onD[OF f_int[of a b]]
 11746         note f = absolutely_integrable_onD[OF f_int[of a b]]
 11742         note * = this(2)[unfolded has_integral_integral has_integral[of "\<lambda>x. norm (f x)"],rule_format]
 11747         note * = this(2)[unfolded has_integral_integral has_integral[of "\<lambda>x. norm (f x)"],rule_format]
 11743         have "e/2>0"
 11748         have "e/2>0"
 11744           using `e > 0` by auto
 11749           using `e > 0` by auto
 11745         from *[OF this] guess d1 .. note d1=conjunctD2[OF this]
 11750         from * [OF this] obtain d1 where
 11746         from henstock_lemma[OF f(1) `e/2>0`] guess d2 . note d2=this
 11751           d1: "gauge d1" "\<forall>p. p tagged_division_of {a..b} \<and> d1 fine p \<longrightarrow>
 11747         from fine_division_exists[OF gauge_inter[OF d1(1) d2(1)], of a b] guess p .
 11752             norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R norm (f x)) - integral {a..b} (\<lambda>x. norm (f x))) < e / 2"
 11748         note p=this(1) conjunctD2[OF this(2)[unfolded fine_inter]]
 11753           by auto
       
 11754         from henstock_lemma [OF f(1) `e/2>0`] obtain d2 where
       
 11755           d2: "gauge d2" "\<forall>p. p tagged_partial_division_of {a..b} \<and> d2 fine p \<longrightarrow>
       
 11756             (\<Sum>(x, k)\<in>p. norm (content k *\<^sub>R f x - integral k f)) < e / 2"
       
 11757           by blast
       
 11758         obtain p where
       
 11759           p: "p tagged_division_of {a..b}" "d1 fine p" "d2 fine p"
       
 11760           by (rule fine_division_exists [OF gauge_inter [OF d1(1) d2(1)], of a b])
       
 11761             (auto simp add: fine_inter)
 11749         have *: "\<And>sf sf' si di. sf' = sf \<longrightarrow> si \<le> ?S \<longrightarrow> abs (sf - si) < e / 2 \<longrightarrow>
 11762         have *: "\<And>sf sf' si di. sf' = sf \<longrightarrow> si \<le> ?S \<longrightarrow> abs (sf - si) < e / 2 \<longrightarrow>
 11750           abs (sf' - di) < e / 2 \<longrightarrow> di < ?S + e"
 11763           abs (sf' - di) < e / 2 \<longrightarrow> di < ?S + e"
 11751           by arith
 11764           by arith
 11752         show "integral {a..b} (\<lambda>x. if x \<in> UNIV then norm (f x) else 0) < ?S + e"
 11765         show "integral {a..b} (\<lambda>x. if x \<in> UNIV then norm (f x) else 0) < ?S + e"
 11753           apply (subst if_P)
 11766           apply (subst if_P)