# HG changeset patch # User hoelzl # Date 1306435796 -7200 # Node ID 3706951a6421cfe9ca22ff8483252dc57d4f25c5 # Parent 40adeda9a8d2c766f558ab8a2a53d43dfed4d9bc composition of convex and measurable function is measurable diff -r 40adeda9a8d2 -r 3706951a6421 src/HOL/Probability/Borel_Space.thy --- a/src/HOL/Probability/Borel_Space.thy Thu May 26 17:59:39 2011 +0200 +++ b/src/HOL/Probability/Borel_Space.thy Thu May 26 20:49:56 2011 +0200 @@ -1034,25 +1034,38 @@ lemma borel_measurable_continuous_on: fixes f :: "'a::topological_space \ 'b::t1_space" - assumes cont: "continuous_on A f" "open A" and f: "f -` {c} \ A \ sets borel" + assumes cont: "continuous_on A f" "open A" shows "(\x. if x \ A then f x else c) \ borel_measurable borel" (is "?f \ _") proof (rule borel.borel_measurableI) fix S :: "'b set" assume "open S" - then have "open {x\A. f x \ S - {c}}" + then have "open {x\A. f x \ S}" by (intro continuous_open_preimage[OF cont]) auto - then have *: "{x\A. f x \ S - {c}} \ sets borel" by auto - show "?f -` S \ space borel \ sets borel" - proof cases - assume "c \ S" - then have "?f -` S = {x\A. f x \ S - {c}} \ (f -` {c} \ A) \ -A" - by auto - with * show "?f -` S \ space borel \ sets borel" - using `open A` f by (auto intro!: borel.Un) - next - assume "c \ S" - then have "?f -` S = {x\A. f x \ S - {c}}" by (auto split: split_if_asm) - with * show "?f -` S \ space borel \ sets borel" by auto + then have *: "{x\A. f x \ S} \ sets borel" by auto + have "?f -` S \ space borel = + {x\A. f x \ S} \ (if c \ S then space borel - A else {})" + by (auto split: split_if_asm) + also have "\ \ sets borel" + using * `open A` by (auto simp del: space_borel intro!: borel.Un) + finally show "?f -` S \ space borel \ sets borel" . +qed + +lemma (in sigma_algebra) convex_measurable: + fixes a b :: real + assumes X: "X \ borel_measurable M" "X ` space M \ { a <..< b}" + assumes q: "convex_on { a <..< b} q" + shows "q \ X \ borel_measurable M" +proof - + have "(\x. if x \ {a <..< b} then q x else 0) \ borel_measurable borel" + proof (rule borel_measurable_continuous_on) + show "open {a<..x. if x \ {a <..< b} then q x else 0) \ X \ borel_measurable M" (is ?qX) + using X by (intro measurable_comp) auto + moreover have "?qX \ q \ X \ borel_measurable M" + using X by (intro measurable_cong) auto + ultimately show ?thesis by simp qed lemma borel_measurable_borel_log: assumes "1 < b" shows "log b \ borel_measurable borel" @@ -1068,17 +1081,6 @@ by (auto intro!: continuous_at_imp_continuous_on DERIV_log DERIV_isCont simp: continuous_isCont[symmetric]) show "open ({0<..}::real set)" by auto - show "log b -` {log b 0} \ {0<..} \ sets borel" - proof cases - assume "log b -` {log b 0} \ {0<..} = {}" - then show ?thesis by simp - next - assume "log b -` {log b 0} \ {0<..} \ {}" - then obtain x where "0 < x" "log b x = log b 0" by auto - with log_inj[OF `1 < b`] have "log b -` {log b 0} \ {0<..} = {x}" - by (auto simp: inj_on_def) - then show ?thesis by simp - qed qed also have "(\x. if x \ {0<..} then log b x else log b 0) = log b" by (simp add: fun_eq_iff not_less log_imp)