src/HOL/Multivariate_Analysis/Integration.thy
changeset 60762 bf0c76ccee8d
parent 60621 bfb14ff43491
child 60800 7d04351c795a
equal deleted inserted replaced
60761:a443b08281e2 60762:bf0c76ccee8d
   574 qed
   574 qed
   575 
   575 
   576 lemma content_empty [simp]: "content {} = 0"
   576 lemma content_empty [simp]: "content {} = 0"
   577   unfolding content_def by auto
   577   unfolding content_def by auto
   578 
   578 
       
   579 lemma content_real_if [simp]: "content {a..b} = (if a \<le> b then b - a else 0)"
       
   580   by (simp add: content_real)
       
   581 
   579 lemma content_subset:
   582 lemma content_subset:
   580   assumes "cbox a b \<subseteq> cbox c d"
   583   assumes "cbox a b \<subseteq> cbox c d"
   581   shows "content (cbox a b) \<le> content (cbox c d)"
   584   shows "content (cbox a b) \<le> content (cbox c d)"
   582 proof (cases "cbox a b = {}")
   585 proof (cases "cbox a b = {}")
   583   case True
   586   case True
  2465 corollary integral_mult_left:
  2468 corollary integral_mult_left:
  2466   fixes c:: "'a::real_normed_algebra"
  2469   fixes c:: "'a::real_normed_algebra"
  2467   shows "f integrable_on s \<Longrightarrow> integral s (\<lambda>x. f x * c) = integral s f * c"
  2470   shows "f integrable_on s \<Longrightarrow> integral s (\<lambda>x. f x * c) = integral s f * c"
  2468   by (blast intro:  has_integral_mult_left)
  2471   by (blast intro:  has_integral_mult_left)
  2469 
  2472 
       
  2473 lemma has_integral_mult_right:
       
  2474   fixes c :: "'a :: real_normed_algebra"
       
  2475   shows "(f has_integral y) i \<Longrightarrow> ((\<lambda>x. c * f x) has_integral (c * y)) i"
       
  2476   using has_integral_linear[OF _ bounded_linear_mult_right] by (simp add: comp_def)
       
  2477     
  2470 lemma has_integral_cmul: "(f has_integral k) s \<Longrightarrow> ((\<lambda>x. c *\<^sub>R f x) has_integral (c *\<^sub>R k)) s"
  2478 lemma has_integral_cmul: "(f has_integral k) s \<Longrightarrow> ((\<lambda>x. c *\<^sub>R f x) has_integral (c *\<^sub>R k)) s"
  2471   unfolding o_def[symmetric]
  2479   unfolding o_def[symmetric]
  2472   by (metis has_integral_linear bounded_linear_scaleR_right)
  2480   by (metis has_integral_linear bounded_linear_scaleR_right)
  2473 
  2481 
  2474 lemma has_integral_cmult_real:
  2482 lemma has_integral_cmult_real:
  2778 qed
  2786 qed
  2779 
  2787 
  2780 lemma integrable_on_refl[intro]: "f integrable_on cbox a a"
  2788 lemma integrable_on_refl[intro]: "f integrable_on cbox a a"
  2781   unfolding integrable_on_def by auto
  2789   unfolding integrable_on_def by auto
  2782 
  2790 
  2783 lemma integral_refl: "integral (cbox a a) f = 0"
  2791 lemma integral_refl [simp]: "integral (cbox a a) f = 0"
  2784   by (rule integral_unique) auto
  2792   by (rule integral_unique) auto
       
  2793 
       
  2794 lemma integral_singleton [simp]: "integral {a} f = 0"
       
  2795   by auto
  2785 
  2796 
  2786 
  2797 
  2787 subsection \<open>Cauchy-type criterion for integrability.\<close>
  2798 subsection \<open>Cauchy-type criterion for integrability.\<close>
  2788 
  2799 
  2789 (* XXXXXXX *)
  2800 (* XXXXXXX *)
  5392   apply (subst insert_is_Un)
  5403   apply (subst insert_is_Un)
  5393   unfolding negligible_union_eq
  5404   unfolding negligible_union_eq
  5394   apply auto
  5405   apply auto
  5395   done
  5406   done
  5396 
  5407 
  5397 lemma negligible_empty[intro]: "negligible {}"
  5408 lemma negligible_empty[iff]: "negligible {}"
  5398   by auto
  5409   by auto
  5399 
  5410 
  5400 lemma negligible_finite[intro]:
  5411 lemma negligible_finite[intro]:
  5401   assumes "finite s"
  5412   assumes "finite s"
  5402   shows "negligible s"
  5413   shows "negligible s"
  5686 
  5697 
  5687 lemma operative_1_lt:
  5698 lemma operative_1_lt:
  5688   assumes "monoidal opp"
  5699   assumes "monoidal opp"
  5689   shows "operative opp f \<longleftrightarrow> ((\<forall>a b. b \<le> a \<longrightarrow> f {a .. b::real} = neutral opp) \<and>
  5700   shows "operative opp f \<longleftrightarrow> ((\<forall>a b. b \<le> a \<longrightarrow> f {a .. b::real} = neutral opp) \<and>
  5690     (\<forall>a b c. a < c \<and> c < b \<longrightarrow> opp (f {a .. c}) (f {c .. b}) = f {a .. b}))"
  5701     (\<forall>a b c. a < c \<and> c < b \<longrightarrow> opp (f {a .. c}) (f {c .. b}) = f {a .. b}))"
  5691   apply (simp add: operative_def content_real_eq_0)
  5702   apply (simp add: operative_def content_real_eq_0 del: content_real_if)
  5692 proof safe
  5703 proof safe
  5693   fix a b c :: real
  5704   fix a b c :: real
  5694   assume as:
  5705   assume as:
  5695     "\<forall>a b c. f {a..b} = opp (f ({a..b} \<inter> {x. x \<le> c})) (f ({a..b} \<inter> Collect (op \<le> c)))"
  5706     "\<forall>a b c. f {a..b} = opp (f ({a..b} \<inter> {x. x \<le> c})) (f ({a..b} \<inter> Collect (op \<le> c)))"
  5696     "a < c"
  5707     "a < c"
  6465         have *: "y - x = norm (y - x)"
  6476         have *: "y - x = norm (y - x)"
  6466           using False by auto
  6477           using False by auto
  6467         show "((\<lambda>xa. f x) has_integral (y - x) *\<^sub>R f x) {x .. y}"
  6478         show "((\<lambda>xa. f x) has_integral (y - x) *\<^sub>R f x) {x .. y}"
  6468           apply (subst *)
  6479           apply (subst *)
  6469           unfolding **
  6480           unfolding **
  6470           by auto
  6481           by blast
  6471         show "\<forall>xa\<in>{x .. y}. norm (f xa - f x) \<le> e"
  6482         show "\<forall>xa\<in>{x .. y}. norm (f xa - f x) \<le> e"
  6472           apply safe
  6483           apply safe
  6473           apply (rule less_imp_le)
  6484           apply (rule less_imp_le)
  6474           apply (rule d(2)[unfolded dist_norm])
  6485           apply (rule d(2)[unfolded dist_norm])
  6475           using assms(2)
  6486           using assms(2)
  6521         have *: "x - y = norm (y - x)"
  6532         have *: "x - y = norm (y - x)"
  6522           using True by auto
  6533           using True by auto
  6523         show "((\<lambda>xa. f x) has_integral (x - y) *\<^sub>R f x) {y .. x}"
  6534         show "((\<lambda>xa. f x) has_integral (x - y) *\<^sub>R f x) {y .. x}"
  6524           apply (subst *)
  6535           apply (subst *)
  6525           unfolding **
  6536           unfolding **
  6526           apply auto
  6537           apply blast
  6527           done
  6538           done
  6528         show "\<forall>xa\<in>{y .. x}. norm (f xa - f x) \<le> e"
  6539         show "\<forall>xa\<in>{y .. x}. norm (f xa - f x) \<le> e"
  6529           apply safe
  6540           apply safe
  6530           apply (rule less_imp_le)
  6541           apply (rule less_imp_le)
  6531           apply (rule d(2)[unfolded dist_norm])
  6542           apply (rule d(2)[unfolded dist_norm])
 12131       apply (force simp add: interval_split [symmetric] intro!: n2 [rule_format])
 12142       apply (force simp add: interval_split [symmetric] intro!: n2 [rule_format])
 12132       done
 12143       done
 12133   qed
 12144   qed
 12134 qed
 12145 qed
 12135 
 12146 
 12136 lemma dense_eq0_I:
       
 12137   fixes x::"'a::{dense_linorder,ordered_ab_group_add_abs}"
       
 12138   shows "(\<And>e. 0 < e \<Longrightarrow> \<bar>x\<bar> \<le> e) ==> x = 0"
       
 12139 by (metis dense not_less zero_less_abs_iff)
       
 12140 
       
 12141 lemma integral_Pair_const:
 12147 lemma integral_Pair_const:
 12142     "integral (cbox (a,c) (b,d)) (\<lambda>x. k) =
 12148     "integral (cbox (a,c) (b,d)) (\<lambda>x. k) =
 12143      integral (cbox a b) (\<lambda>x. integral (cbox c d) (\<lambda>y. k))"
 12149      integral (cbox a b) (\<lambda>x. integral (cbox c d) (\<lambda>y. k))"
 12144   by (simp add: content_Pair)
 12150   by (simp add: content_Pair)
 12145 
 12151