equal
deleted
inserted
replaced
77 by simp |
77 by simp |
78 |
78 |
79 lemma content_pos_le [iff]: "0 \<le> content X" |
79 lemma content_pos_le [iff]: "0 \<le> content X" |
80 by simp |
80 by simp |
81 |
81 |
82 corollary content_nonneg [simp]: "~ content (cbox a b) < 0" |
82 corollary content_nonneg [simp]: "\<not> content (cbox a b) < 0" |
83 using not_le by blast |
83 using not_le by blast |
84 |
84 |
85 lemma content_pos_lt: "\<forall>i\<in>Basis. a\<bullet>i < b\<bullet>i \<Longrightarrow> 0 < content (cbox a b)" |
85 lemma content_pos_lt: "\<forall>i\<in>Basis. a\<bullet>i < b\<bullet>i \<Longrightarrow> 0 < content (cbox a b)" |
86 by (auto simp: less_imp_le inner_diff box_eq_empty intro!: prod_pos) |
86 by (auto simp: less_imp_le inner_diff box_eq_empty intro!: prod_pos) |
87 |
87 |
285 using assms has_integral_alt[of f y i] by auto |
285 using assms has_integral_alt[of f y i] by auto |
286 |
286 |
287 definition integrable_on (infixr "integrable'_on" 46) |
287 definition integrable_on (infixr "integrable'_on" 46) |
288 where "f integrable_on i \<longleftrightarrow> (\<exists>y. (f has_integral y) i)" |
288 where "f integrable_on i \<longleftrightarrow> (\<exists>y. (f has_integral y) i)" |
289 |
289 |
290 definition "integral i f = (SOME y. (f has_integral y) i \<or> ~ f integrable_on i \<and> y=0)" |
290 definition "integral i f = (SOME y. (f has_integral y) i \<or> \<not> f integrable_on i \<and> y=0)" |
291 |
291 |
292 lemma integrable_integral[intro]: "f integrable_on i \<Longrightarrow> (f has_integral (integral i f)) i" |
292 lemma integrable_integral[intro]: "f integrable_on i \<Longrightarrow> (f has_integral (integral i f)) i" |
293 unfolding integrable_on_def integral_def by (metis (mono_tags, lifting) someI_ex) |
293 unfolding integrable_on_def integral_def by (metis (mono_tags, lifting) someI_ex) |
294 |
294 |
295 lemma not_integrable_integral: "~ f integrable_on i \<Longrightarrow> integral i f = 0" |
295 lemma not_integrable_integral: "\<not> f integrable_on i \<Longrightarrow> integral i f = 0" |
296 unfolding integrable_on_def integral_def by blast |
296 unfolding integrable_on_def integral_def by blast |
297 |
297 |
298 lemma has_integral_integrable[dest]: "(f has_integral i) s \<Longrightarrow> f integrable_on s" |
298 lemma has_integral_integrable[dest]: "(f has_integral i) s \<Longrightarrow> f integrable_on s" |
299 unfolding integrable_on_def by auto |
299 unfolding integrable_on_def by auto |
300 |
300 |
354 by (rule some_equality) (auto intro: has_integral_unique) |
354 by (rule some_equality) (auto intro: has_integral_unique) |
355 |
355 |
356 lemma has_integral_iff: "(f has_integral i) S \<longleftrightarrow> (f integrable_on S \<and> integral S f = i)" |
356 lemma has_integral_iff: "(f has_integral i) S \<longleftrightarrow> (f integrable_on S \<and> integral S f = i)" |
357 by blast |
357 by blast |
358 |
358 |
359 lemma eq_integralD: "integral k f = y \<Longrightarrow> (f has_integral y) k \<or> ~ f integrable_on k \<and> y=0" |
359 lemma eq_integralD: "integral k f = y \<Longrightarrow> (f has_integral y) k \<or> \<not> f integrable_on k \<and> y=0" |
360 unfolding integral_def integrable_on_def |
360 unfolding integral_def integrable_on_def |
361 apply (erule subst) |
361 apply (erule subst) |
362 apply (rule someI_ex) |
362 apply (rule someI_ex) |
363 by blast |
363 by blast |
364 |
364 |
496 shows "integral S (\<lambda>x. f x * c) = integral S f * c" |
496 shows "integral S (\<lambda>x. f x * c) = integral S f * c" |
497 proof (cases "f integrable_on S \<or> c = 0") |
497 proof (cases "f integrable_on S \<or> c = 0") |
498 case True then show ?thesis |
498 case True then show ?thesis |
499 by (force intro: has_integral_mult_left) |
499 by (force intro: has_integral_mult_left) |
500 next |
500 next |
501 case False then have "~ (\<lambda>x. f x * c) integrable_on S" |
501 case False then have "\<not> (\<lambda>x. f x * c) integrable_on S" |
502 using has_integral_mult_left [of "(\<lambda>x. f x * c)" _ S "inverse c"] |
502 using has_integral_mult_left [of "(\<lambda>x. f x * c)" _ S "inverse c"] |
503 by (auto simp add: mult.assoc) |
503 by (auto simp add: mult.assoc) |
504 with False show ?thesis by (simp add: not_integrable_integral) |
504 with False show ?thesis by (simp add: not_integrable_integral) |
505 qed |
505 qed |
506 |
506 |
613 lemma integral_cmul [simp]: "integral S (\<lambda>x. c *\<^sub>R f x) = c *\<^sub>R integral S f" |
613 lemma integral_cmul [simp]: "integral S (\<lambda>x. c *\<^sub>R f x) = c *\<^sub>R integral S f" |
614 proof (cases "f integrable_on S \<or> c = 0") |
614 proof (cases "f integrable_on S \<or> c = 0") |
615 case True with has_integral_cmul integrable_integral show ?thesis |
615 case True with has_integral_cmul integrable_integral show ?thesis |
616 by fastforce |
616 by fastforce |
617 next |
617 next |
618 case False then have "~ (\<lambda>x. c *\<^sub>R f x) integrable_on S" |
618 case False then have "\<not> (\<lambda>x. c *\<^sub>R f x) integrable_on S" |
619 using has_integral_cmul [of "(\<lambda>x. c *\<^sub>R f x)" _ S "inverse c"] by auto |
619 using has_integral_cmul [of "(\<lambda>x. c *\<^sub>R f x)" _ S "inverse c"] by auto |
620 with False show ?thesis by (simp add: not_integrable_integral) |
620 with False show ?thesis by (simp add: not_integrable_integral) |
621 qed |
621 qed |
622 |
622 |
623 lemma integral_mult: |
623 lemma integral_mult: |
628 lemma integral_neg [simp]: "integral S (\<lambda>x. - f x) = - integral S f" |
628 lemma integral_neg [simp]: "integral S (\<lambda>x. - f x) = - integral S f" |
629 proof (cases "f integrable_on S") |
629 proof (cases "f integrable_on S") |
630 case True then show ?thesis |
630 case True then show ?thesis |
631 by (simp add: has_integral_neg integrable_integral integral_unique) |
631 by (simp add: has_integral_neg integrable_integral integral_unique) |
632 next |
632 next |
633 case False then have "~ (\<lambda>x. - f x) integrable_on S" |
633 case False then have "\<not> (\<lambda>x. - f x) integrable_on S" |
634 using has_integral_neg [of "(\<lambda>x. - f x)" _ S ] by auto |
634 using has_integral_neg [of "(\<lambda>x. - f x)" _ S ] by auto |
635 with False show ?thesis by (simp add: not_integrable_integral) |
635 with False show ?thesis by (simp add: not_integrable_integral) |
636 qed |
636 qed |
637 |
637 |
638 lemma integral_diff: "f integrable_on S \<Longrightarrow> g integrable_on S \<Longrightarrow> |
638 lemma integral_diff: "f integrable_on S \<Longrightarrow> g integrable_on S \<Longrightarrow> |