src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy
changeset 65204 d23eded35a33
parent 64272 f76b6dda2e56
child 65587 16a8991ab398
equal deleted inserted replaced
65203:314246c6eeaa 65204:d23eded35a33
  2541        (auto split: split_indicator)
  2541        (auto split: split_indicator)
  2542   then show ?thesis
  2542   then show ?thesis
  2543     by simp
  2543     by simp
  2544 qed
  2544 qed
  2545 
  2545 
       
  2546 lemma has_integral_0_closure_imp_0:
       
  2547   fixes f :: "'a::euclidean_space \<Rightarrow> real"
       
  2548   assumes f: "continuous_on (closure S) f"
       
  2549     and nonneg_interior: "\<And>x. x \<in> S \<Longrightarrow> 0 \<le> f x"
       
  2550     and pos: "0 < emeasure lborel S"
       
  2551     and finite: "emeasure lborel S < \<infinity>"
       
  2552     and regular: "emeasure lborel (closure S) = emeasure lborel S"
       
  2553     and opn: "open S"
       
  2554   assumes int: "(f has_integral 0) (closure S)"
       
  2555   assumes x: "x \<in> closure S"
       
  2556   shows "f x = 0"
       
  2557 proof -
       
  2558   have zero: "emeasure lborel (frontier S) = 0"
       
  2559     using finite closure_subset regular
       
  2560     unfolding frontier_def
       
  2561     by (subst emeasure_Diff) (auto simp: frontier_def interior_open \<open>open S\<close> )
       
  2562   have nonneg: "0 \<le> f x" if "x \<in> closure S" for x
       
  2563     using continuous_ge_on_closure[OF f that nonneg_interior] by simp
       
  2564   have "0 = integral (closure S) f"
       
  2565     by (blast intro: int sym)
       
  2566   also
       
  2567   note intl = has_integral_integrable[OF int]
       
  2568   have af: "f absolutely_integrable_on (closure S)"
       
  2569     using nonneg
       
  2570     by (intro absolutely_integrable_onI intl integrable_eq[OF _ intl]) simp
       
  2571   then have "integral (closure S) f = set_lebesgue_integral lebesgue (closure S) f"
       
  2572     by (intro set_lebesgue_integral_eq_integral(2)[symmetric])
       
  2573   also have "\<dots> = 0 \<longleftrightarrow> (AE x in lebesgue. indicator (closure S) x *\<^sub>R f x = 0)"
       
  2574     by (rule integral_nonneg_eq_0_iff_AE[OF af]) (use nonneg in \<open>auto simp: indicator_def\<close>)
       
  2575   also have "\<dots> \<longleftrightarrow> (AE x in lebesgue. x \<in> {x. x \<in> closure S \<longrightarrow> f x = 0})"
       
  2576     by (auto simp: indicator_def)
       
  2577   finally have "(AE x in lebesgue. x \<in> {x. x \<in> closure S \<longrightarrow> f x = 0})" by simp
       
  2578   moreover have "(AE x in lebesgue. x \<in> - frontier S)"
       
  2579     using zero
       
  2580     by (auto simp: eventually_ae_filter null_sets_def intro!: exI[where x="frontier S"])
       
  2581   ultimately have ae: "AE x \<in> S in lebesgue. x \<in> {x \<in> closure S. f x = 0}" (is ?th)
       
  2582     by eventually_elim (use closure_subset in \<open>auto simp: \<close>)
       
  2583   have "closed {0::real}" by simp
       
  2584   with continuous_on_closed_vimage[OF closed_closure, of S f] f
       
  2585   have "closed (f -` {0} \<inter> closure S)" by blast
       
  2586   then have "closed {x \<in> closure S. f x = 0}" by (auto simp: vimage_def Int_def conj_commute)
       
  2587   with \<open>open S\<close> have "x \<in> {x \<in> closure S. f x = 0}" if "x \<in> S" for x using ae that
       
  2588     by (rule mem_closed_if_AE_lebesgue_open)
       
  2589   then have "f x = 0" if "x \<in> S" for x using that by auto
       
  2590   from continuous_constant_on_closure[OF f this \<open>x \<in> closure S\<close>]
       
  2591   show "f x = 0" .
       
  2592 qed
       
  2593 
       
  2594 lemma has_integral_0_cbox_imp_0:
       
  2595   fixes f :: "'a::euclidean_space \<Rightarrow> real"
       
  2596   assumes f: "continuous_on (cbox a b) f"
       
  2597     and nonneg_interior: "\<And>x. x \<in> box a b \<Longrightarrow> 0 \<le> f x"
       
  2598   assumes int: "(f has_integral 0) (cbox a b)"
       
  2599   assumes ne: "box a b \<noteq> {}"
       
  2600   assumes x: "x \<in> cbox a b"
       
  2601   shows "f x = 0"
       
  2602 proof -
       
  2603   have "0 < emeasure lborel (box a b)"
       
  2604     using ne x unfolding emeasure_lborel_box_eq
       
  2605     by (force intro!: prod_pos simp: mem_box algebra_simps)
       
  2606   then show ?thesis using assms
       
  2607     by (intro has_integral_0_closure_imp_0[of "box a b" f x])
       
  2608       (auto simp: emeasure_lborel_box_eq emeasure_lborel_cbox_eq algebra_simps mem_box)
       
  2609 qed
       
  2610 
  2546 end
  2611 end