328 |
328 |
329 lemma measurable_count_space_insert[measurable (raw)]: |
329 lemma measurable_count_space_insert[measurable (raw)]: |
330 "s \<in> S \<Longrightarrow> A \<in> sets (count_space S) \<Longrightarrow> insert s A \<in> sets (count_space S)" |
330 "s \<in> S \<Longrightarrow> A \<in> sets (count_space S) \<Longrightarrow> insert s A \<in> sets (count_space S)" |
331 by simp |
331 by simp |
332 |
332 |
|
333 lemma measurable_card[measurable]: |
|
334 fixes S :: "'a \<Rightarrow> nat set" |
|
335 assumes [measurable]: "\<And>i. {x\<in>space M. i \<in> S x} \<in> sets M" |
|
336 shows "(\<lambda>x. card (S x)) \<in> measurable M (count_space UNIV)" |
|
337 unfolding measurable_count_space_eq2_countable |
|
338 proof safe |
|
339 fix n show "(\<lambda>x. card (S x)) -` {n} \<inter> space M \<in> sets M" |
|
340 proof (cases n) |
|
341 case 0 |
|
342 then have "(\<lambda>x. card (S x)) -` {n} \<inter> space M = {x\<in>space M. infinite (S x) \<or> (\<forall>i. i \<notin> S x)}" |
|
343 by auto |
|
344 also have "\<dots> \<in> sets M" |
|
345 by measurable |
|
346 finally show ?thesis . |
|
347 next |
|
348 case (Suc i) |
|
349 then have "(\<lambda>x. card (S x)) -` {n} \<inter> space M = |
|
350 (\<Union>F\<in>{A\<in>{A. finite A}. card A = n}. {x\<in>space M. (\<forall>i. i \<in> S x \<longleftrightarrow> i \<in> F)})" |
|
351 unfolding set_eq_iff[symmetric] Collect_bex_eq[symmetric] by (auto intro: card_ge_0_finite) |
|
352 also have "\<dots> \<in> sets M" |
|
353 by (intro sets.countable_UN' countable_Collect countable_Collect_finite) auto |
|
354 finally show ?thesis . |
|
355 qed |
|
356 qed rule |
|
357 |
333 subsection {* Measurability for (co)inductive predicates *} |
358 subsection {* Measurability for (co)inductive predicates *} |
334 |
359 |
335 lemma measurable_lfp: |
360 lemma measurable_lfp: |
336 assumes "Order_Continuity.continuous F" |
361 assumes "Order_Continuity.continuous F" |
337 assumes *: "\<And>A. pred M A \<Longrightarrow> pred M (F A)" |
362 assumes *: "\<And>A. pred M A \<Longrightarrow> pred M (F A)" |