# HG changeset patch # User hoelzl # Date 1353064202 -3600 # Node ID 7c9c5b1b6cd71ef487b32df1659cbfb30f813b83 # Parent 94d7dfa9f40436ff8e47019de3ad1cb7c3392360 more measurability rules diff -r 94d7dfa9f404 -r 7c9c5b1b6cd7 src/HOL/Probability/Borel_Space.thy --- a/src/HOL/Probability/Borel_Space.thy Fri Nov 16 11:34:34 2012 +0100 +++ b/src/HOL/Probability/Borel_Space.thy Fri Nov 16 12:10:02 2012 +0100 @@ -84,8 +84,13 @@ unfolding indicator_def [abs_def] using A by (auto intro!: measurable_If_set) -lemma borel_measurable_indicator'[measurable]: - "{x\space M. x \ A} \ sets M \ indicator A \ borel_measurable M" +lemma borel_measurable_count_space[measurable (raw)]: + "f \ borel_measurable (count_space S)" + unfolding measurable_def by auto + +lemma borel_measurable_indicator'[measurable (raw)]: + assumes [measurable]: "{x\space M. f x \ A x} \ sets M" + shows "(\x. indicator (A x) (f x)) \ borel_measurable M" unfolding indicator_def[abs_def] by (auto intro!: measurable_If) diff -r 94d7dfa9f404 -r 7c9c5b1b6cd7 src/HOL/Probability/Sigma_Algebra.thy --- a/src/HOL/Probability/Sigma_Algebra.thy Fri Nov 16 11:34:34 2012 +0100 +++ b/src/HOL/Probability/Sigma_Algebra.thy Fri Nov 16 12:10:02 2012 +0100 @@ -1616,7 +1616,7 @@ fun cert f = map (Option.map (f (Proof_Context.theory_of ctxt))) fun inst t (ts, Ts) = Drule.instantiate' (cert ctyp_of Ts) (cert cterm_of ts) t val cps = cnt_prefixes ctxt f |> map (inst @{thm measurable_compose_countable}) - in if null cps then no_tac else debug_tac ctxt (K ("split countable fun")) (resolve_tac cps i) end + in if null cps then no_tac else debug_tac ctxt (K "split countable fun") (resolve_tac cps i) end handle TERM _ => no_tac) 1) fun measurable_tac' ctxt ss facts = let @@ -1764,7 +1764,7 @@ "pred M (\x. Q x) \ pred M (\x. P x) \ pred M (\x. Q x = P x)" "pred M (\x. f x \ UNIV)" "pred M (\x. f x \ {})" - "pred M (\x. P' (f x)) \ pred M (\x. f x \ {x. P' x})" + "pred M (\x. P' (f x) x) \ pred M (\x. f x \ {y. P' y x})" "pred M (\x. f x \ (B x)) \ pred M (\x. f x \ - (B x))" "pred M (\x. f x \ (A x)) \ pred M (\x. f x \ (B x)) \ pred M (\x. f x \ (A x) - (B x))" "pred M (\x. f x \ (A x)) \ pred M (\x. f x \ (B x)) \ pred M (\x. f x \ (A x) \ (B x))" @@ -1815,10 +1815,23 @@ qed lemma [measurable (raw generic)]: - assumes f: "f \ measurable M N" and c: "{c} \ sets N" + assumes f: "f \ measurable M N" and c: "c \ space N \ {c} \ sets N" shows pred_eq_const1: "pred M (\x. f x = c)" and pred_eq_const2: "pred M (\x. c = f x)" - using measurable_sets[OF f c] by (auto simp: Int_def conj_commute eq_commute pred_def) +proof - + show "pred M (\x. f x = c)" + proof cases + assume "c \ space N" + with measurable_sets[OF f c] show ?thesis + by (auto simp: Int_def conj_commute pred_def) + next + assume "c \ space N" + with f[THEN measurable_space] have "{x \ space M. f x = c} = {}" by auto + then show ?thesis by (auto simp: pred_def cong: conj_cong) + qed + then show "pred M (\x. c = f x)" + by (simp add: eq_commute) +qed lemma pred_le_const[measurable (raw generic)]: assumes f: "f \ measurable M N" and c: "{.. c} \ sets N" shows "pred M (\x. f x \ c)" @@ -1872,6 +1885,21 @@ "\i\I. A i \ sets (N i) \ i\I \ f \ measurable M (N i) \ pred M (\x. f x \ A i)" using pred_sets2[OF sets_Ball, of _ _ _ f] by auto +lemma measurable_finite[measurable (raw)]: + fixes S :: "'a \ nat set" + assumes [measurable]: "\i. {x\space M. i \ S x} \ sets M" + shows "pred M (\x. finite (S x))" + unfolding finite_nat_set_iff_bounded by (simp add: Ball_def) + +lemma measurable_Least[measurable]: + assumes [measurable]: "(\i::nat. (\x. P i x) \ measurable M (count_space UNIV))"q + shows "(\x. LEAST i. P i x) \ measurable M (count_space UNIV)" + unfolding measurable_def by (safe intro!: sets_Least) simp_all + +lemma measurable_count_space_insert[measurable (raw)]: + "s \ S \ A \ sets (count_space S) \ insert s A \ sets (count_space S)" + by simp + hide_const (open) pred subsection {* Extend measure *}