# HG changeset patch # User hoelzl # Date 1306435863 -7200 # Node ID 3fa22920bf86e8faf226bfebbd92fd179454d5ec # Parent 3706951a6421cfe9ca22ff8483252dc57d4f25c5 integral strong monotone; finite subadditivity for measure 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" diff -r 3706951a6421 -r 3fa22920bf86 src/HOL/Probability/Measure.thy --- a/src/HOL/Probability/Measure.thy Thu May 26 20:49:56 2011 +0200 +++ b/src/HOL/Probability/Measure.thy Thu May 26 20:51:03 2011 +0200 @@ -132,6 +132,10 @@ ultimately show "\ a \ \ b" by auto qed +lemma (in measure_space) measure_top: + "A \ sets M \ \ A \ \ (space M)" + using sets_into_space[of A] by (auto intro!: measure_mono) + lemma (in measure_space) measure_compl: assumes s: "s \ sets M" and fin: "\ s \ \" shows "\ (space M - s) = \ (space M) - \ s" @@ -409,6 +413,22 @@ finally show ?thesis . qed +lemma (in measure_space) measure_subadditive_finite: + assumes "finite I" "\i. i\I \ A i \ sets M" + shows "\ (\i\I. A i) \ (\i\I. \ (A i))" +using assms proof induct + case (insert i I) + then have "\ (\i\insert i I. A i) = \ (A i \ (\i\I. A i))" + by simp + also have "\ \ \ (A i) + \ (\i\I. A i)" + using insert by (intro measure_subadditive finite_UN) auto + also have "\ \ \ (A i) + (\i\I. \ (A i))" + using insert by (intro add_mono) auto + also have "\ = (\i\insert i I. \ (A i))" + using insert by auto + finally show ?case . +qed simp + lemma (in measure_space) measure_eq_0: assumes "N \ sets M" and "\ N = 0" and "K \ N" and "K \ sets M" shows "\ K = 0" @@ -724,6 +744,20 @@ and AE_conj_iff[simp]: "(AE x. P x \ Q x) \ (AE x. P x) \ (AE x. Q x)" by auto +lemma (in measure_space) AE_measure: + assumes AE: "AE x. P x" and sets: "{x\space M. P x} \ sets M" + shows "\ {x\space M. P x} = \ (space M)" +proof - + from AE_E[OF AE] guess N . note N = this + with sets have "\ (space M) \ \ ({x\space M. P x} \ N)" + by (intro measure_mono) auto + also have "\ \ \ {x\space M. P x} + \ N" + using sets N by (intro measure_subadditive) auto + also have "\ = \ {x\space M. P x}" using N by simp + finally show "\ {x\space M. P x} = \ (space M)" + using measure_top[OF sets] by auto +qed + lemma (in measure_space) AE_space: "AE x. x \ space M" by (rule AE_I[where N="{}"]) auto @@ -1168,7 +1202,7 @@ lemma (in finite_measure) finite_measure_eq: "A \ sets M \ \ A = extreal (\' A)" by (auto simp: \'_def extreal_real) -lemma (in finite_measure) positive_measure': "0 \ \' A" +lemma (in finite_measure) positive_measure'[simp, intro]: "0 \ \' A" unfolding \'_def by (auto simp: real_of_extreal_pos) lemma (in finite_measure) bounded_measure: "\' A \ \' (space M)" @@ -1251,6 +1285,12 @@ using measure_subadditive[OF m] using m[THEN finite_measure_eq] Un[OF m, THEN finite_measure_eq] by simp +lemma (in finite_measure) finite_measure_subadditive_finite: + assumes "finite I" "\i. i\I \ A i \ sets M" + shows "\' (\i\I. A i) \ (\i\I. \' (A i))" + using measure_subadditive_finite[OF assms] assms + by (simp add: finite_measure_eq finite_UN) + lemma (in finite_measure) finite_measure_countably_subadditive: assumes A: "range A \ sets M" and sum: "summable (\i. \' (A i))" shows "\' (\i. A i) \ (\i. \' (A i))" @@ -1378,6 +1418,23 @@ using A finite_subset[OF A finite_space] by (intro finite_measure_finite_singleton) auto +lemma (in finite_measure_space) finite_measure_subadditive_setsum: + assumes "finite I" + shows "\' (\i\I. A i) \ (\i\I. \' (A i))" +proof cases + assume "(\i\I. A i) \ space M" + then have "\i. i\I \ A i \ sets M" by auto + from finite_measure_subadditive_finite[OF `finite I` this] + show ?thesis by auto +next + assume "\ (\i\I. A i) \ space M" + then have "\' (\i\I. A i) = 0" + by (simp add: \'_def) + also have "0 \ (\i\I. \' (A i))" + by (auto intro!: setsum_nonneg) + finally show ?thesis . +qed + lemma suminf_cmult_indicator: fixes f :: "nat \ extreal" assumes "disjoint_family A" "x \ A i" "\i. 0 \ f i" diff -r 3706951a6421 -r 3fa22920bf86 src/HOL/Probability/Probability_Measure.thy --- a/src/HOL/Probability/Probability_Measure.thy Thu May 26 20:49:56 2011 +0200 +++ b/src/HOL/Probability/Probability_Measure.thy Thu May 26 20:51:03 2011 +0200 @@ -28,8 +28,6 @@ abbreviation (in prob_space) "joint_distribution X Y \ distribution (\x. (X x, Y x))" -declare (in finite_measure) positive_measure'[intro, simp] - lemma (in prob_space) distribution_cong: assumes "\x. x \ space M \ X x = Y x" shows "distribution X = distribution Y"