844 then have "\<And>a. {w \<in> space M. a \<le> f w + g w} \<in> sets M" |
844 then have "\<And>a. {w \<in> space M. a \<le> f w + g w} \<in> sets M" |
845 by (simp add: 1) |
845 by (simp add: 1) |
846 then show ?thesis |
846 then show ?thesis |
847 by (simp add: borel_measurable_iff_ge) |
847 by (simp add: borel_measurable_iff_ge) |
848 qed |
848 qed |
|
849 |
|
850 lemma (in sigma_algebra) borel_measurable_setsum[simp, intro]: |
|
851 fixes f :: "'c \<Rightarrow> 'a \<Rightarrow> real" |
|
852 assumes "\<And>i. i \<in> S \<Longrightarrow> f i \<in> borel_measurable M" |
|
853 shows "(\<lambda>x. \<Sum>i\<in>S. f i x) \<in> borel_measurable M" |
|
854 proof cases |
|
855 assume "finite S" |
|
856 thus ?thesis using assms by induct auto |
|
857 qed simp |
849 |
858 |
850 lemma (in sigma_algebra) borel_measurable_square: |
859 lemma (in sigma_algebra) borel_measurable_square: |
851 fixes f :: "'a \<Rightarrow> real" |
860 fixes f :: "'a \<Rightarrow> real" |
852 assumes f: "f \<in> borel_measurable M" |
861 assumes f: "f \<in> borel_measurable M" |
853 shows "(\<lambda>x. (f x)^2) \<in> borel_measurable M" |
862 shows "(\<lambda>x. (f x)^2) \<in> borel_measurable M" |
928 show ?thesis |
937 show ?thesis |
929 apply (simp add: times_eq_sum_squares diff_minus) |
938 apply (simp add: times_eq_sum_squares diff_minus) |
930 using 1 2 by simp |
939 using 1 2 by simp |
931 qed |
940 qed |
932 |
941 |
|
942 lemma (in sigma_algebra) borel_measurable_setprod[simp, intro]: |
|
943 fixes f :: "'c \<Rightarrow> 'a \<Rightarrow> real" |
|
944 assumes "\<And>i. i \<in> S \<Longrightarrow> f i \<in> borel_measurable M" |
|
945 shows "(\<lambda>x. \<Prod>i\<in>S. f i x) \<in> borel_measurable M" |
|
946 proof cases |
|
947 assume "finite S" |
|
948 thus ?thesis using assms by induct auto |
|
949 qed simp |
|
950 |
933 lemma (in sigma_algebra) borel_measurable_diff[simp, intro]: |
951 lemma (in sigma_algebra) borel_measurable_diff[simp, intro]: |
934 fixes f :: "'a \<Rightarrow> real" |
952 fixes f :: "'a \<Rightarrow> real" |
935 assumes f: "f \<in> borel_measurable M" |
953 assumes f: "f \<in> borel_measurable M" |
936 assumes g: "g \<in> borel_measurable M" |
954 assumes g: "g \<in> borel_measurable M" |
937 shows "(\<lambda>x. f x - g x) \<in> borel_measurable M" |
955 shows "(\<lambda>x. f x - g x) \<in> borel_measurable M" |
938 unfolding diff_minus using assms by fast |
956 unfolding diff_minus using assms by fast |
939 |
|
940 lemma (in sigma_algebra) borel_measurable_setsum[simp, intro]: |
|
941 fixes f :: "'c \<Rightarrow> 'a \<Rightarrow> real" |
|
942 assumes "\<And>i. i \<in> S \<Longrightarrow> f i \<in> borel_measurable M" |
|
943 shows "(\<lambda>x. \<Sum>i\<in>S. f i x) \<in> borel_measurable M" |
|
944 proof cases |
|
945 assume "finite S" |
|
946 thus ?thesis using assms by induct auto |
|
947 qed simp |
|
948 |
957 |
949 lemma (in sigma_algebra) borel_measurable_inverse[simp, intro]: |
958 lemma (in sigma_algebra) borel_measurable_inverse[simp, intro]: |
950 fixes f :: "'a \<Rightarrow> real" |
959 fixes f :: "'a \<Rightarrow> real" |
951 assumes "f \<in> borel_measurable M" |
960 assumes "f \<in> borel_measurable M" |
952 shows "(\<lambda>x. inverse (f x)) \<in> borel_measurable M" |
961 shows "(\<lambda>x. inverse (f x)) \<in> borel_measurable M" |
1004 shows "(\<lambda>x. \<bar>f x :: real\<bar>) \<in> borel_measurable M" |
1013 shows "(\<lambda>x. \<bar>f x :: real\<bar>) \<in> borel_measurable M" |
1005 proof - |
1014 proof - |
1006 have *: "\<And>x. \<bar>f x\<bar> = max 0 (f x) + max 0 (- f x)" by (simp add: max_def) |
1015 have *: "\<And>x. \<bar>f x\<bar> = max 0 (f x) + max 0 (- f x)" by (simp add: max_def) |
1007 show ?thesis unfolding * using assms by auto |
1016 show ?thesis unfolding * using assms by auto |
1008 qed |
1017 qed |
|
1018 |
|
1019 lemma borel_measurable_nth[simp, intro]: |
|
1020 "(\<lambda>x::real^'n. x $ i) \<in> borel_measurable borel" |
|
1021 using borel_measurable_euclidean_component |
|
1022 unfolding nth_conv_component by auto |
1009 |
1023 |
1010 section "Borel space over the real line with infinity" |
1024 section "Borel space over the real line with infinity" |
1011 |
1025 |
1012 lemma borel_Real_measurable: |
1026 lemma borel_Real_measurable: |
1013 "A \<in> sets borel \<Longrightarrow> Real -` A \<in> sets borel" |
1027 "A \<in> sets borel \<Longrightarrow> Real -` A \<in> sets borel" |