diff -r 3706951a6421 -r 3fa22920bf86 src/HOL/Probability/Lebesgue_Integration.thy --- a/src/HOL/Probability/Lebesgue_Integration.thy Thu May 26 20:49:56 2011 +0200 +++ b/src/HOL/Probability/Lebesgue_Integration.thy Thu May 26 20:51:03 2011 +0200 @@ -9,6 +9,9 @@ imports Measure Borel_Space begin +lemma real_extreal_1[simp]: "real (1::extreal) = 1" + unfolding one_extreal_def by simp + lemma extreal_indicator_pos[simp,intro]: "0 \ (indicator A x ::extreal)" unfolding indicator_def by auto @@ -1604,6 +1607,10 @@ finally show ?thesis . qed +lemma (in measure_space) positive_integral_const_If: + "(\\<^isup>+x. a \M) = (if 0 \ a then a * \ (space M) else 0)" + by (auto intro!: positive_integral_0_iff_AE[THEN iffD2]) + lemma (in measure_space) positive_integral_restricted: assumes A: "A \ sets M" shows "integral\<^isup>P (restricted_space A) f = (\\<^isup>+ x. f x * indicator A x \M)" @@ -1765,6 +1772,15 @@ shows "integrable M (\x. - f x)" "(\x. - f x \M) = - integral\<^isup>L M f" using assms by (auto simp: integrable_def lebesgue_integral_def) +lemma (in measure_space) integral_minus_iff[simp]: + "integrable M (\x. - f x) \ integrable M f" +proof + assume "integrable M (\x. - f x)" + then have "integrable M (\x. - (- f x))" + by (rule integral_minus) + then show "integrable M f" by simp +qed (rule integral_minus) + lemma (in measure_space) integral_of_positive_diff: assumes integrable: "integrable M u" "integrable M v" and f_def: "\x. f x = u x - v x" and pos: "\x. 0 \ u x" "\x. 0 \ v x" @@ -2181,6 +2197,58 @@ using assms unfolding lebesgue_integral_def by (subst (1 2) positive_integral_cong_AE) (auto simp add: extreal_real) +lemma (in finite_measure) lebesgue_integral_const[simp]: + shows "integrable M (\x. a)" + and "(\x. a \M) = a * \' (space M)" +proof - + { fix a :: real assume "0 \ a" + then have "(\\<^isup>+ x. extreal a \M) = extreal a * \ (space M)" + by (subst positive_integral_const) auto + moreover + from `0 \ a` have "(\\<^isup>+ x. extreal (-a) \M) = 0" + by (subst positive_integral_0_iff_AE) auto + ultimately have "integrable M (\x. a)" by (auto simp: integrable_def) } + note * = this + show "integrable M (\x. a)" + proof cases + assume "0 \ a" with * show ?thesis . + next + assume "\ 0 \ a" + then have "0 \ -a" by auto + from *[OF this] show ?thesis by simp + qed + show "(\x. a \M) = a * \' (space M)" + by (simp add: \'_def lebesgue_integral_def positive_integral_const_If) +qed + +lemma (in finite_measure) integral_less_AE: + assumes int: "integrable M X" "integrable M Y" + assumes gt: "AE x. X x < Y x" and neq0: "\ (space M) \ 0" + shows "integral\<^isup>L M X < integral\<^isup>L M Y" +proof - + have "integral\<^isup>L M X \ integral\<^isup>L M Y" + using gt int by (intro integral_mono_AE) auto + moreover + have "integral\<^isup>L M X \ integral\<^isup>L M Y" + proof + from gt have "AE x. Y x - X x \ 0" + by auto + then have \: "\ {x\space M. Y x - X x \ 0} = \ (space M)" + using int + by (intro AE_measure borel_measurable_neq) (auto simp add: integrable_def) + + assume eq: "integral\<^isup>L M X = integral\<^isup>L M Y" + have "integral\<^isup>L M (\x. \Y x - X x\) = integral\<^isup>L M (\x. Y x - X x)" + using gt by (intro integral_cong_AE) auto + also have "\ = 0" + using eq int by simp + finally show False + using \ int neq0 + by (subst (asm) integral_0_iff) auto + qed + ultimately show ?thesis by auto +qed + lemma (in measure_space) integral_dominated_convergence: assumes u: "\i. integrable M (u i)" and bound: "\x j. x\space M \ \u j x\ \ w x" and w: "integrable M w"