384 where "lebesgue \<equiv> completion lborel" |
384 where "lebesgue \<equiv> completion lborel" |
385 |
385 |
386 abbreviation\<^marker>\<open>tag important\<close> lebesgue_on :: "'a set \<Rightarrow> 'a::euclidean_space measure" |
386 abbreviation\<^marker>\<open>tag important\<close> lebesgue_on :: "'a set \<Rightarrow> 'a::euclidean_space measure" |
387 where "lebesgue_on \<Omega> \<equiv> restrict_space (completion lborel) \<Omega>" |
387 where "lebesgue_on \<Omega> \<equiv> restrict_space (completion lborel) \<Omega>" |
388 |
388 |
|
389 lemma lebesgue_on_mono: |
|
390 assumes major: "AE x in lebesgue_on S. P x" and minor: "\<And>x.\<lbrakk>P x; x \<in> S\<rbrakk> \<Longrightarrow> Q x" |
|
391 shows "AE x in lebesgue_on S. Q x" |
|
392 proof - |
|
393 have "AE a in lebesgue_on S. P a \<longrightarrow> Q a" |
|
394 using minor space_restrict_space by fastforce |
|
395 then show ?thesis |
|
396 using major by auto |
|
397 qed |
|
398 |
389 lemma |
399 lemma |
390 shows sets_lborel[simp, measurable_cong]: "sets lborel = sets borel" |
400 shows sets_lborel[simp, measurable_cong]: "sets lborel = sets borel" |
391 and space_lborel[simp]: "space lborel = space borel" |
401 and space_lborel[simp]: "space lborel = space borel" |
392 and measurable_lborel1[simp]: "measurable M lborel = measurable M borel" |
402 and measurable_lborel1[simp]: "measurable M lborel = measurable M borel" |
393 and measurable_lborel2[simp]: "measurable lborel M = measurable borel M" |
403 and measurable_lborel2[simp]: "measurable lborel M = measurable borel M" |
422 by (simp add: mono_restrict_space subsetI) |
432 by (simp add: mono_restrict_space subsetI) |
423 then show ?thesis |
433 then show ?thesis |
424 by (simp add: borel_measurable_continuous_on_restrict [OF f] borel_measurable_subalgebra |
434 by (simp add: borel_measurable_continuous_on_restrict [OF f] borel_measurable_subalgebra |
425 space_restrict_space) |
435 space_restrict_space) |
426 qed |
436 qed |
|
437 |
|
438 lemma id_borel_measurable_lebesgue [iff]: "id \<in> borel_measurable lebesgue" |
|
439 by (simp add: measurable_completion) |
|
440 |
|
441 lemma id_borel_measurable_lebesgue_on [iff]: "id \<in> borel_measurable (lebesgue_on S)" |
|
442 by (simp add: measurable_completion measurable_restrict_space1) |
427 |
443 |
428 context |
444 context |
429 begin |
445 begin |
430 |
446 |
431 interpretation sigma_finite_measure "interval_measure (\<lambda>x. x)" |
447 interpretation sigma_finite_measure "interval_measure (\<lambda>x. x)" |
614 lemma countable_imp_null_set_lborel: "countable A \<Longrightarrow> A \<in> null_sets lborel" |
630 lemma countable_imp_null_set_lborel: "countable A \<Longrightarrow> A \<in> null_sets lborel" |
615 by (simp add: null_sets_def emeasure_lborel_countable sets.countable) |
631 by (simp add: null_sets_def emeasure_lborel_countable sets.countable) |
616 |
632 |
617 lemma finite_imp_null_set_lborel: "finite A \<Longrightarrow> A \<in> null_sets lborel" |
633 lemma finite_imp_null_set_lborel: "finite A \<Longrightarrow> A \<in> null_sets lborel" |
618 by (intro countable_imp_null_set_lborel countable_finite) |
634 by (intro countable_imp_null_set_lborel countable_finite) |
|
635 |
|
636 lemma insert_null_sets_iff [simp]: "insert a N \<in> null_sets lebesgue \<longleftrightarrow> N \<in> null_sets lebesgue" |
|
637 (is "?lhs = ?rhs") |
|
638 proof |
|
639 assume ?lhs then show ?rhs |
|
640 by (meson completion.complete2 subset_insertI) |
|
641 next |
|
642 assume ?rhs then show ?lhs |
|
643 by (simp add: null_sets.insert_in_sets null_setsI) |
|
644 qed |
|
645 |
|
646 lemma insert_null_sets_lebesgue_on_iff [simp]: |
|
647 assumes "a \<in> S" "S \<in> sets lebesgue" |
|
648 shows "insert a N \<in> null_sets (lebesgue_on S) \<longleftrightarrow> N \<in> null_sets (lebesgue_on S)" |
|
649 by (simp add: assms null_sets_restrict_space) |
619 |
650 |
620 lemma lborel_neq_count_space[simp]: "lborel \<noteq> count_space (A::('a::ordered_euclidean_space) set)" |
651 lemma lborel_neq_count_space[simp]: "lborel \<noteq> count_space (A::('a::ordered_euclidean_space) set)" |
621 proof |
652 proof |
622 assume asm: "lborel = count_space A" |
653 assume asm: "lborel = count_space A" |
623 have "space lborel = UNIV" by simp |
654 have "space lborel = UNIV" by simp |
1416 qed |
1447 qed |
1417 |
1448 |
1418 lemma gdelta_complement: "gdelta(- S) \<longleftrightarrow> fsigma S" |
1449 lemma gdelta_complement: "gdelta(- S) \<longleftrightarrow> fsigma S" |
1419 using fsigma_imp_gdelta gdelta_imp_fsigma by force |
1450 using fsigma_imp_gdelta gdelta_imp_fsigma by force |
1420 |
1451 |
|
1452 lemma lebesgue_set_almost_fsigma: |
|
1453 assumes "S \<in> sets lebesgue" |
|
1454 obtains C T where "fsigma C" "T \<in> null_sets lebesgue" "C \<union> T = S" "disjnt C T" |
|
1455 proof - |
|
1456 { fix n::nat |
|
1457 obtain T where "closed T" "T \<subseteq> S" "S-T \<in> lmeasurable" "emeasure lebesgue (S - T) < ennreal (1 / Suc n)" |
|
1458 using sets_lebesgue_inner_closed [OF assms] |
|
1459 by (metis of_nat_0_less_iff zero_less_Suc zero_less_divide_1_iff) |
|
1460 then have "\<exists>T. closed T \<and> T \<subseteq> S \<and> S - T \<in> lmeasurable \<and> measure lebesgue (S-T) < 1 / Suc n" |
|
1461 by (metis emeasure_eq_measure2 ennreal_leI not_le) |
|
1462 } |
|
1463 then obtain F where F: "\<And>n::nat. closed (F n) \<and> F n \<subseteq> S \<and> S - F n \<in> lmeasurable \<and> measure lebesgue (S - F n) < 1 / Suc n" |
|
1464 by metis |
|
1465 let ?C = "\<Union>(F ` UNIV)" |
|
1466 show thesis |
|
1467 proof |
|
1468 show "fsigma ?C" |
|
1469 using F by (simp add: fsigma.intros) |
|
1470 show "(S - ?C) \<in> null_sets lebesgue" |
|
1471 proof (clarsimp simp add: completion.null_sets_outer_le) |
|
1472 fix e :: "real" |
|
1473 assume "0 < e" |
|
1474 then obtain n where n: "1 / Suc n < e" |
|
1475 using nat_approx_posE by metis |
|
1476 show "\<exists>T \<in> lmeasurable. S - (\<Union>x. F x) \<subseteq> T \<and> measure lebesgue T \<le> e" |
|
1477 proof (intro bexI conjI) |
|
1478 show "measure lebesgue (S - F n) \<le> e" |
|
1479 by (meson F n less_trans not_le order.asym) |
|
1480 qed (use F in auto) |
|
1481 qed |
|
1482 show "?C \<union> (S - ?C) = S" |
|
1483 using F by blast |
|
1484 show "disjnt ?C (S - ?C)" |
|
1485 by (auto simp: disjnt_def) |
|
1486 qed |
|
1487 qed |
|
1488 |
|
1489 lemma lebesgue_set_almost_gdelta: |
|
1490 assumes "S \<in> sets lebesgue" |
|
1491 obtains C T where "gdelta C" "T \<in> null_sets lebesgue" "S \<union> T = C" "disjnt S T" |
|
1492 proof - |
|
1493 have "-S \<in> sets lebesgue" |
|
1494 using assms Compl_in_sets_lebesgue by blast |
|
1495 then obtain C T where C: "fsigma C" "T \<in> null_sets lebesgue" "C \<union> T = -S" "disjnt C T" |
|
1496 using lebesgue_set_almost_fsigma by metis |
|
1497 show thesis |
|
1498 proof |
|
1499 show "gdelta (-C)" |
|
1500 by (simp add: \<open>fsigma C\<close> fsigma_imp_gdelta) |
|
1501 show "S \<union> T = -C" "disjnt S T" |
|
1502 using C by (auto simp: disjnt_def) |
|
1503 qed (use C in auto) |
|
1504 qed |
|
1505 |
1421 end |
1506 end |