# HG changeset patch # User hoelzl # Date 1349863955 -7200 # Node ID f3471f09bb86d0dcd08b198d02ed830249d5af6e # Parent a6678da5692c2600946a43b69ad8196a219f743d add induction for real Borel measurable functions diff -r a6678da5692c -r f3471f09bb86 src/HOL/Probability/Lebesgue_Measure.thy --- a/src/HOL/Probability/Lebesgue_Measure.thy Wed Oct 10 12:12:34 2012 +0200 +++ b/src/HOL/Probability/Lebesgue_Measure.thy Wed Oct 10 12:12:35 2012 +0200 @@ -695,6 +695,69 @@ qed qed +lemma borel_measurable_real_induct[consumes 2, case_names cong set mult add seq, induct set: borel_measurable]: + fixes u :: "'a \ real" + assumes u: "u \ borel_measurable M" "\x. 0 \ u x" + assumes cong: "\f g. f \ borel_measurable M \ g \ borel_measurable M \ (\x. x \ space M \ f x = g x) \ P g \ P f" + assumes set: "\A. A \ sets M \ P (indicator A)" + assumes mult: "\u c. 0 \ c \ u \ borel_measurable M \ (\x. 0 \ u x) \ P u \ P (\x. c * u x)" + assumes add: "\u v. u \ borel_measurable M \ (\x. 0 \ u x) \ P u \ v \ borel_measurable M \ (\x. 0 \ v x) \ P v \ P (\x. v x + u x)" + assumes seq: "\U u. (\i. U i \ borel_measurable M) \ (\i x. 0 \ U i x) \ (\x. (\i. U i x) ----> u x) \ (\i. P (U i)) \ incseq U \ P u" + shows "P u" +proof - + have "(\x. ereal (u x)) \ borel_measurable M" + using u by auto + then obtain U where U: "\i. simple_function M (U i)" "incseq U" "\i. \ \ range (U i)" and + "\x. (SUP i. U i x) = max 0 (ereal (u x))" and nn: "\i x. 0 \ U i x" + using borel_measurable_implies_simple_function_sequence'[of u M] by auto + then have u_eq: "\x. ereal (u x) = (SUP i. U i x)" + using u by (auto simp: max_def) + + have [simp]: "\i x. U i x \ \" using U by (auto simp: image_def eq_commute) + + { fix i x have [simp]: "U i x \ -\" using nn[of i x] by auto } + note this[simp] + + show "P u" + proof (rule seq) + show "\i. (\x. real (U i x)) \ borel_measurable M" + using U by (auto intro: borel_measurable_simple_function) + show "\i x. 0 \ real (U i x)" + using nn by (auto simp: real_of_ereal_pos) + show "incseq (\i x. real (U i x))" + using U(2) by (auto simp: incseq_def image_iff le_fun_def intro!: real_of_ereal_positive_mono nn) + then show "\x. (\i. real (U i x)) ----> u x" + by (intro SUP_eq_LIMSEQ[THEN iffD1]) + (auto simp: incseq_mono incseq_def le_fun_def u_eq ereal_real + intro!: arg_cong2[where f=SUPR] ext) + show "\i. P (\x. real (U i x))" + proof (rule cong) + fix x i assume x: "x \ space M" + have [simp]: "\A x. real (indicator A x :: ereal) = indicator A x" + by (auto simp: indicator_def one_ereal_def) + { fix y assume "y \ U i ` space M" + then have "0 \ y" "y \ \" using nn by auto + then have "\y * indicator (U i -` {y} \ space M) x\ \ \" + by (auto simp: indicator_def) } + then show "real (U i x) = (\y \ U i ` space M. real y * indicator (U i -` {y} \ space M) x)" + unfolding simple_function_indicator_representation[OF U(1) x] + by (subst setsum_real_of_ereal[symmetric]) auto + next + fix i + have "finite (U i ` space M)" "\x. x \ U i ` space M \ 0 \ x""\x. x \ U i ` space M \ x \ \" + using U(1) nn by (auto simp: simple_function_def) + then show "P (\x. \y \ U i ` space M. real y * indicator (U i -` {y} \ space M) x)" + proof induct + case empty then show ?case + using set[of "{}"] by (simp add: indicator_def[abs_def]) + qed (auto intro!: add mult set simple_functionD U setsum_nonneg borel_measurable_setsum mult_nonneg_nonneg real_of_ereal_pos) + qed (auto intro: borel_measurable_simple_function U simple_functionD intro!: borel_measurable_setsum borel_measurable_times) + qed +qed + +lemma ereal_indicator: "ereal (indicator A x) = indicator A x" + by (auto simp: indicator_def one_ereal_def) + lemma positive_integral_has_integral: fixes f :: "'a::ordered_euclidean_space \ ereal" assumes f: "f \ borel_measurable lebesgue" "range f \ {0..<\}" "integral\<^isup>P lebesgue f \ \"