src/HOL/Analysis/Henstock_Kurzweil_Integration.thy
changeset 77221 0cdb384bf56a
parent 77179 6d2ca97a8f46
child 77491 9d431c939a7f
equal deleted inserted replaced
77200:8f2e6186408f 77221:0cdb384bf56a
   103 lemma content_subset: "cbox a b \<subseteq> cbox c d \<Longrightarrow> content (cbox a b) \<le> content (cbox c d)"
   103 lemma content_subset: "cbox a b \<subseteq> cbox c d \<Longrightarrow> content (cbox a b) \<le> content (cbox c d)"
   104   unfolding measure_def
   104   unfolding measure_def
   105   by (intro enn2real_mono emeasure_mono) (auto simp: emeasure_lborel_cbox_eq)
   105   by (intro enn2real_mono emeasure_mono) (auto simp: emeasure_lborel_cbox_eq)
   106 
   106 
   107 lemma content_lt_nz: "0 < content (cbox a b) \<longleftrightarrow> content (cbox a b) \<noteq> 0"
   107 lemma content_lt_nz: "0 < content (cbox a b) \<longleftrightarrow> content (cbox a b) \<noteq> 0"
   108   unfolding content_pos_lt_eq content_eq_0 unfolding not_ex not_le by fastforce
   108   by (fact zero_less_measure_iff)
   109 
   109 
   110 lemma content_Pair: "content (cbox (a,c) (b,d)) = content (cbox a b) * content (cbox c d)"
   110 lemma content_Pair: "content (cbox (a,c) (b,d)) = content (cbox a b) * content (cbox c d)"
   111   unfolding measure_lborel_cbox_eq Basis_prod_def
   111   unfolding measure_lborel_cbox_eq Basis_prod_def
   112   apply (subst prod.union_disjoint)
   112   apply (subst prod.union_disjoint)
   113   apply (auto simp: bex_Un ball_Un)
   113   apply (auto simp: bex_Un ball_Un)
   532 lemma has_integral_mult_left:
   532 lemma has_integral_mult_left:
   533   fixes c :: "_ :: real_normed_algebra"
   533   fixes c :: "_ :: real_normed_algebra"
   534   shows "(f has_integral y) S \<Longrightarrow> ((\<lambda>x. f x * c) has_integral (y * c)) S"
   534   shows "(f has_integral y) S \<Longrightarrow> ((\<lambda>x. f x * c) has_integral (y * c)) S"
   535   using has_integral_linear[OF _ bounded_linear_mult_left] by (simp add: comp_def)
   535   using has_integral_linear[OF _ bounded_linear_mult_left] by (simp add: comp_def)
   536 
   536 
       
   537 lemma integrable_on_mult_left:
       
   538   fixes c :: "'a :: real_normed_algebra"
       
   539   assumes "f integrable_on A"
       
   540   shows   "(\<lambda>x. f x * c) integrable_on A"
       
   541   using assms has_integral_mult_left by blast
       
   542 
   537 lemma has_integral_divide:
   543 lemma has_integral_divide:
   538   fixes c :: "_ :: real_normed_div_algebra"
   544   fixes c :: "_ :: real_normed_div_algebra"
   539   shows "(f has_integral y) S \<Longrightarrow> ((\<lambda>x. f x / c) has_integral (y / c)) S"
   545   shows "(f has_integral y) S \<Longrightarrow> ((\<lambda>x. f x / c) has_integral (y / c)) S"
   540   unfolding divide_inverse by (simp add: has_integral_mult_left)
   546   unfolding divide_inverse by (simp add: has_integral_mult_left)
       
   547 
       
   548 lemma integrable_on_divide:
       
   549   fixes c :: "'a :: real_normed_div_algebra"
       
   550   assumes "f integrable_on A"
       
   551   shows   "(\<lambda>x. f x / c) integrable_on A"
       
   552   using assms has_integral_divide by blast
   541 
   553 
   542 text\<open>The case analysis eliminates the condition \<^term>\<open>f integrable_on S\<close> at the cost
   554 text\<open>The case analysis eliminates the condition \<^term>\<open>f integrable_on S\<close> at the cost
   543      of the type class constraint \<open>division_ring\<close>\<close>
   555      of the type class constraint \<open>division_ring\<close>\<close>
   544 corollary integral_mult_left [simp]:
   556 corollary integral_mult_left [simp]:
   545   fixes c:: "'a::{real_normed_algebra,division_ring}"
   557   fixes c:: "'a::{real_normed_algebra,division_ring}"
   565 using integral_mult_left [of S f "inverse z"]
   577 using integral_mult_left [of S f "inverse z"]
   566   by (simp add: divide_inverse_commute)
   578   by (simp add: divide_inverse_commute)
   567 
   579 
   568 lemma has_integral_mult_right:
   580 lemma has_integral_mult_right:
   569   fixes c :: "'a :: real_normed_algebra"
   581   fixes c :: "'a :: real_normed_algebra"
   570   shows "(f has_integral y) i \<Longrightarrow> ((\<lambda>x. c * f x) has_integral (c * y)) i"
   582   shows "(f has_integral y) A \<Longrightarrow> ((\<lambda>x. c * f x) has_integral (c * y)) A"
   571   using has_integral_linear[OF _ bounded_linear_mult_right] by (simp add: comp_def)
   583   using has_integral_linear[OF _ bounded_linear_mult_right] by (simp add: comp_def)
       
   584 
       
   585 lemma integrable_on_mult_right:
       
   586   fixes c :: "'a :: real_normed_algebra"
       
   587   assumes "f integrable_on A"
       
   588   shows   "(\<lambda>x. c * f x) integrable_on A"
       
   589   using assms has_integral_mult_right by blast
       
   590 
       
   591 lemma integrable_on_mult_right_iff [simp]:
       
   592   fixes c :: "'a :: real_normed_field"
       
   593   assumes "c \<noteq> 0"
       
   594   shows   "(\<lambda>x. c * f x) integrable_on A \<longleftrightarrow> f integrable_on A"
       
   595     using integrable_on_mult_right[of f A c]
       
   596           integrable_on_mult_right[of "\<lambda>x. c * f x" A "inverse c"] assms
       
   597     by (auto simp: field_simps)
       
   598 
       
   599 lemma integrable_on_mult_left_iff [simp]:
       
   600   fixes c :: "'a :: real_normed_field"
       
   601   assumes "c \<noteq> 0"
       
   602   shows   "(\<lambda>x. f x * c) integrable_on A \<longleftrightarrow> f integrable_on A"
       
   603   using integrable_on_mult_right_iff[OF assms, of f A] by (simp add: mult.commute)
       
   604 
       
   605 lemma integrable_on_div_iff [simp]:
       
   606   fixes c :: "'a :: real_normed_field"
       
   607   assumes "c \<noteq> 0"
       
   608   shows   "(\<lambda>x. f x / c) integrable_on A \<longleftrightarrow> f integrable_on A"
       
   609   using integrable_on_mult_right_iff[of "inverse c" f A] assms by (simp add: field_simps)
   572 
   610 
   573 lemma has_integral_cmul: "(f has_integral k) S \<Longrightarrow> ((\<lambda>x. c *\<^sub>R f x) has_integral (c *\<^sub>R k)) S"
   611 lemma has_integral_cmul: "(f has_integral k) S \<Longrightarrow> ((\<lambda>x. c *\<^sub>R f x) has_integral (c *\<^sub>R k)) S"
   574   unfolding o_def[symmetric]
   612   unfolding o_def[symmetric]
   575   by (metis has_integral_linear bounded_linear_scaleR_right)
   613   by (metis has_integral_linear bounded_linear_scaleR_right)
   576 
   614 
   577 lemma has_integral_cmult_real:
   615 lemma has_integral_cmult_real:
   578   fixes c :: real
   616   fixes c :: real
   579   assumes "c \<noteq> 0 \<Longrightarrow> (f has_integral x) A"
   617   assumes "c \<noteq> 0 \<Longrightarrow> (f has_integral x) A"
   580   shows "((\<lambda>x. c * f x) has_integral c * x) A"
   618   shows "((\<lambda>x. c * f x) has_integral c * x) A"
   581 proof (cases "c = 0")
   619   by (metis assms has_integral_is_0 has_integral_mult_right lambda_zero)
   582   case True
       
   583   then show ?thesis by simp
       
   584 next
       
   585   case False
       
   586   from has_integral_cmul[OF assms[OF this], of c] show ?thesis
       
   587     unfolding real_scaleR_def .
       
   588 qed
       
   589 
   620 
   590 lemma has_integral_neg: "(f has_integral k) S \<Longrightarrow> ((\<lambda>x. -(f x)) has_integral -k) S"
   621 lemma has_integral_neg: "(f has_integral k) S \<Longrightarrow> ((\<lambda>x. -(f x)) has_integral -k) S"
   591   by (drule_tac c="-1" in has_integral_cmul) auto
   622   by (drule_tac c="-1" in has_integral_cmul) auto
   592 
   623 
   593 lemma has_integral_neg_iff: "((\<lambda>x. - f x) has_integral k) S \<longleftrightarrow> (f has_integral - k) S"
   624 lemma has_integral_neg_iff: "((\<lambda>x. - f x) has_integral k) S \<longleftrightarrow> (f has_integral - k) S"
  5026 lemma integral_open_interval:
  5057 lemma integral_open_interval:
  5027   fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: banach"
  5058   fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: banach"
  5028   shows "integral(box a b) f = integral(cbox a b) f"
  5059   shows "integral(box a b) f = integral(cbox a b) f"
  5029   by (metis has_integral_integrable_integral has_integral_open_interval not_integrable_integral)
  5060   by (metis has_integral_integrable_integral has_integral_open_interval not_integrable_integral)
  5030 
  5061 
       
  5062 lemma integrable_on_open_interval_real:
       
  5063   fixes f :: "real \<Rightarrow> 'b :: banach"
       
  5064   shows "f integrable_on {a<..<b} \<longleftrightarrow> f integrable_on {a..b}"
       
  5065   using integrable_on_open_interval[of f a b] by simp
       
  5066 
       
  5067 lemma integral_open_interval_real:
       
  5068   "integral {a..b} (f :: real \<Rightarrow> 'a :: banach) = integral {a<..<(b::real)} f"
       
  5069   using integral_open_interval[of a b f] by simp
       
  5070 
  5031 lemma has_integral_Icc_iff_Ioo:
  5071 lemma has_integral_Icc_iff_Ioo:
  5032   fixes f :: "real \<Rightarrow> 'a :: banach"
  5072   fixes f :: "real \<Rightarrow> 'a :: banach"
  5033   shows "(f has_integral I) {a..b} \<longleftrightarrow> (f has_integral I) {a<..<b}"
  5073   shows "(f has_integral I) {a..b} \<longleftrightarrow> (f has_integral I) {a<..<b}"
  5034 proof (rule has_integral_spike_set_eq)
  5074 proof (rule has_integral_spike_set_eq)
  5035   show "negligible {x \<in> {a..b} - {a<..<b}. f x \<noteq> 0}"
  5075   show "negligible {x \<in> {a..b} - {a<..<b}. f x \<noteq> 0}"