src/HOL/Analysis/Borel_Space.thy
changeset 70365 4df0628e8545
parent 70136 f03a01a18c6e
child 70614 6a2c982363e9
equal deleted inserted replaced
70363:6d96ee03b62e 70365:4df0628e8545
   597     by (metis continuous_on_open_invariant)
   597     by (metis continuous_on_open_invariant)
   598   then show "f -` S \<inter> space (restrict_space borel A) \<in> sets (restrict_space borel A)"
   598   then show "f -` S \<inter> space (restrict_space borel A) \<in> sets (restrict_space borel A)"
   599     by (force simp add: sets_restrict_space space_restrict_space)
   599     by (force simp add: sets_restrict_space space_restrict_space)
   600 qed
   600 qed
   601 
   601 
   602 lemma borel_measurable_continuous_on1: "continuous_on UNIV f \<Longrightarrow> f \<in> borel_measurable borel"
   602 lemma borel_measurable_continuous_onI: "continuous_on UNIV f \<Longrightarrow> f \<in> borel_measurable borel"
   603   by (drule borel_measurable_continuous_on_restrict) simp
   603   by (drule borel_measurable_continuous_on_restrict) simp
   604 
   604 
   605 lemma borel_measurable_continuous_on_if:
   605 lemma borel_measurable_continuous_on_if:
   606   "A \<in> sets borel \<Longrightarrow> continuous_on A f \<Longrightarrow> continuous_on (- A) g \<Longrightarrow>
   606   "A \<in> sets borel \<Longrightarrow> continuous_on A f \<Longrightarrow> continuous_on (- A) g \<Longrightarrow>
   607     (\<lambda>x. if x \<in> A then f x else g x) \<in> borel_measurable borel"
   607     (\<lambda>x. if x \<in> A then f x else g x) \<in> borel_measurable borel"
   621 qed auto
   621 qed auto
   622 
   622 
   623 lemma borel_measurable_continuous_on:
   623 lemma borel_measurable_continuous_on:
   624   assumes f: "continuous_on UNIV f" and g: "g \<in> borel_measurable M"
   624   assumes f: "continuous_on UNIV f" and g: "g \<in> borel_measurable M"
   625   shows "(\<lambda>x. f (g x)) \<in> borel_measurable M"
   625   shows "(\<lambda>x. f (g x)) \<in> borel_measurable M"
   626   using measurable_comp[OF g borel_measurable_continuous_on1[OF f]] by (simp add: comp_def)
   626   using measurable_comp[OF g borel_measurable_continuous_onI[OF f]] by (simp add: comp_def)
   627 
   627 
   628 lemma borel_measurable_continuous_on_indicator:
   628 lemma borel_measurable_continuous_on_indicator:
   629   fixes f g :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   629   fixes f g :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   630   shows "A \<in> sets borel \<Longrightarrow> continuous_on A f \<Longrightarrow> (\<lambda>x. indicator A x *\<^sub>R f x) \<in> borel_measurable borel"
   630   shows "A \<in> sets borel \<Longrightarrow> continuous_on A f \<Longrightarrow> (\<lambda>x. indicator A x *\<^sub>R f x) \<in> borel_measurable borel"
   631   by (subst borel_measurable_restrict_space_iff[symmetric])
   631   by (subst borel_measurable_restrict_space_iff[symmetric])
  1330 qed auto
  1330 qed auto
  1331 
  1331 
  1332 subsection "Borel measurable operators"
  1332 subsection "Borel measurable operators"
  1333 
  1333 
  1334 lemma borel_measurable_norm[measurable]: "norm \<in> borel_measurable borel"
  1334 lemma borel_measurable_norm[measurable]: "norm \<in> borel_measurable borel"
  1335   by (intro borel_measurable_continuous_on1 continuous_intros)
  1335   by (intro borel_measurable_continuous_onI continuous_intros)
  1336 
  1336 
  1337 lemma borel_measurable_sgn [measurable]: "(sgn::'a::real_normed_vector \<Rightarrow> 'a) \<in> borel_measurable borel"
  1337 lemma borel_measurable_sgn [measurable]: "(sgn::'a::real_normed_vector \<Rightarrow> 'a) \<in> borel_measurable borel"
  1338   by (rule borel_measurable_continuous_countable_exceptions[where X="{0}"])
  1338   by (rule borel_measurable_continuous_countable_exceptions[where X="{0}"])
  1339      (auto intro!: continuous_on_sgn continuous_on_id)
  1339      (auto intro!: continuous_on_sgn continuous_on_id)
  1340 
  1340 
  1458   "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> (\<lambda>x. log (g x) (f x)) \<in> borel_measurable M"
  1458   "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> (\<lambda>x. log (g x) (f x)) \<in> borel_measurable M"
  1459   unfolding log_def by auto
  1459   unfolding log_def by auto
  1460 
  1460 
  1461 lemma borel_measurable_exp[measurable]:
  1461 lemma borel_measurable_exp[measurable]:
  1462   "(exp::'a::{real_normed_field,banach}\<Rightarrow>'a) \<in> borel_measurable borel"
  1462   "(exp::'a::{real_normed_field,banach}\<Rightarrow>'a) \<in> borel_measurable borel"
  1463   by (intro borel_measurable_continuous_on1 continuous_at_imp_continuous_on ballI isCont_exp)
  1463   by (intro borel_measurable_continuous_onI continuous_at_imp_continuous_on ballI isCont_exp)
  1464 
  1464 
  1465 lemma measurable_real_floor[measurable]:
  1465 lemma measurable_real_floor[measurable]:
  1466   "(floor :: real \<Rightarrow> int) \<in> measurable borel (count_space UNIV)"
  1466   "(floor :: real \<Rightarrow> int) \<in> measurable borel (count_space UNIV)"
  1467 proof -
  1467 proof -
  1468   have "\<And>a x. \<lfloor>x\<rfloor> = a \<longleftrightarrow> (real_of_int a \<le> x \<and> x < real_of_int (a + 1))"
  1468   have "\<And>a x. \<lfloor>x\<rfloor> = a \<longleftrightarrow> (real_of_int a \<le> x \<and> x < real_of_int (a + 1))"
  1477 
  1477 
  1478 lemma borel_measurable_real_floor: "(\<lambda>x::real. real_of_int \<lfloor>x\<rfloor>) \<in> borel_measurable borel"
  1478 lemma borel_measurable_real_floor: "(\<lambda>x::real. real_of_int \<lfloor>x\<rfloor>) \<in> borel_measurable borel"
  1479   by simp
  1479   by simp
  1480 
  1480 
  1481 lemma borel_measurable_root [measurable]: "root n \<in> borel_measurable borel"
  1481 lemma borel_measurable_root [measurable]: "root n \<in> borel_measurable borel"
  1482   by (intro borel_measurable_continuous_on1 continuous_intros)
  1482   by (intro borel_measurable_continuous_onI continuous_intros)
  1483 
  1483 
  1484 lemma borel_measurable_sqrt [measurable]: "sqrt \<in> borel_measurable borel"
  1484 lemma borel_measurable_sqrt [measurable]: "sqrt \<in> borel_measurable borel"
  1485   by (intro borel_measurable_continuous_on1 continuous_intros)
  1485   by (intro borel_measurable_continuous_onI continuous_intros)
  1486 
  1486 
  1487 lemma borel_measurable_power [measurable (raw)]:
  1487 lemma borel_measurable_power [measurable (raw)]:
  1488   fixes f :: "_ \<Rightarrow> 'b::{power,real_normed_algebra}"
  1488   fixes f :: "_ \<Rightarrow> 'b::{power,real_normed_algebra}"
  1489   assumes f: "f \<in> borel_measurable M"
  1489   assumes f: "f \<in> borel_measurable M"
  1490   shows "(\<lambda>x. (f x) ^ n) \<in> borel_measurable M"
  1490   shows "(\<lambda>x. (f x) ^ n) \<in> borel_measurable M"
  1491   by (intro borel_measurable_continuous_on [OF _ f] continuous_intros)
  1491   by (intro borel_measurable_continuous_on [OF _ f] continuous_intros)
  1492 
  1492 
  1493 lemma borel_measurable_Re [measurable]: "Re \<in> borel_measurable borel"
  1493 lemma borel_measurable_Re [measurable]: "Re \<in> borel_measurable borel"
  1494   by (intro borel_measurable_continuous_on1 continuous_intros)
  1494   by (intro borel_measurable_continuous_onI continuous_intros)
  1495 
  1495 
  1496 lemma borel_measurable_Im [measurable]: "Im \<in> borel_measurable borel"
  1496 lemma borel_measurable_Im [measurable]: "Im \<in> borel_measurable borel"
  1497   by (intro borel_measurable_continuous_on1 continuous_intros)
  1497   by (intro borel_measurable_continuous_onI continuous_intros)
  1498 
  1498 
  1499 lemma borel_measurable_of_real [measurable]: "(of_real :: _ \<Rightarrow> (_::real_normed_algebra)) \<in> borel_measurable borel"
  1499 lemma borel_measurable_of_real [measurable]: "(of_real :: _ \<Rightarrow> (_::real_normed_algebra)) \<in> borel_measurable borel"
  1500   by (intro borel_measurable_continuous_on1 continuous_intros)
  1500   by (intro borel_measurable_continuous_onI continuous_intros)
  1501 
  1501 
  1502 lemma borel_measurable_sin [measurable]: "(sin :: _ \<Rightarrow> (_::{real_normed_field,banach})) \<in> borel_measurable borel"
  1502 lemma borel_measurable_sin [measurable]: "(sin :: _ \<Rightarrow> (_::{real_normed_field,banach})) \<in> borel_measurable borel"
  1503   by (intro borel_measurable_continuous_on1 continuous_intros)
  1503   by (intro borel_measurable_continuous_onI continuous_intros)
  1504 
  1504 
  1505 lemma borel_measurable_cos [measurable]: "(cos :: _ \<Rightarrow> (_::{real_normed_field,banach})) \<in> borel_measurable borel"
  1505 lemma borel_measurable_cos [measurable]: "(cos :: _ \<Rightarrow> (_::{real_normed_field,banach})) \<in> borel_measurable borel"
  1506   by (intro borel_measurable_continuous_on1 continuous_intros)
  1506   by (intro borel_measurable_continuous_onI continuous_intros)
  1507 
  1507 
  1508 lemma borel_measurable_arctan [measurable]: "arctan \<in> borel_measurable borel"
  1508 lemma borel_measurable_arctan [measurable]: "arctan \<in> borel_measurable borel"
  1509   by (intro borel_measurable_continuous_on1 continuous_intros)
  1509   by (intro borel_measurable_continuous_onI continuous_intros)
  1510 
  1510 
  1511 lemma\<^marker>\<open>tag important\<close> borel_measurable_complex_iff:
  1511 lemma\<^marker>\<open>tag important\<close> borel_measurable_complex_iff:
  1512   "f \<in> borel_measurable M \<longleftrightarrow>
  1512   "f \<in> borel_measurable M \<longleftrightarrow>
  1513     (\<lambda>x. Re (f x)) \<in> borel_measurable M \<and> (\<lambda>x. Im (f x)) \<in> borel_measurable M"
  1513     (\<lambda>x. Re (f x)) \<in> borel_measurable M \<and> (\<lambda>x. Im (f x)) \<in> borel_measurable M"
  1514   apply auto
  1514   apply auto
  1690 
  1690 
  1691 text \<open> \<^type>\<open>ennreal\<close> is a topological monoid, so no rules for plus are required, also all order
  1691 text \<open> \<^type>\<open>ennreal\<close> is a topological monoid, so no rules for plus are required, also all order
  1692   statements are usually done on type classes. \<close>
  1692   statements are usually done on type classes. \<close>
  1693 
  1693 
  1694 lemma measurable_enn2ereal[measurable]: "enn2ereal \<in> borel \<rightarrow>\<^sub>M borel"
  1694 lemma measurable_enn2ereal[measurable]: "enn2ereal \<in> borel \<rightarrow>\<^sub>M borel"
  1695   by (intro borel_measurable_continuous_on1 continuous_on_enn2ereal)
  1695   by (intro borel_measurable_continuous_onI continuous_on_enn2ereal)
  1696 
  1696 
  1697 lemma measurable_e2ennreal[measurable]: "e2ennreal \<in> borel \<rightarrow>\<^sub>M borel"
  1697 lemma measurable_e2ennreal[measurable]: "e2ennreal \<in> borel \<rightarrow>\<^sub>M borel"
  1698   by (intro borel_measurable_continuous_on1 continuous_on_e2ennreal)
  1698   by (intro borel_measurable_continuous_onI continuous_on_e2ennreal)
  1699 
  1699 
  1700 lemma borel_measurable_enn2real[measurable (raw)]:
  1700 lemma borel_measurable_enn2real[measurable (raw)]:
  1701   "f \<in> M \<rightarrow>\<^sub>M borel \<Longrightarrow> (\<lambda>x. enn2real (f x)) \<in> M \<rightarrow>\<^sub>M borel"
  1701   "f \<in> M \<rightarrow>\<^sub>M borel \<Longrightarrow> (\<lambda>x. enn2real (f x)) \<in> M \<rightarrow>\<^sub>M borel"
  1702   unfolding enn2real_def[abs_def] by measurable
  1702   unfolding enn2real_def[abs_def] by measurable
  1703 
  1703