# HG changeset patch # User paulson # Date 1523631507 -3600 # Node ID 557ea2740125b35d5fbcf6cc4ad7419134b789f1 # Parent 75b94eb58c3d85d353d190ccc1e0baab7a91faa0 Probability builds with new definitions diff -r 75b94eb58c3d -r 557ea2740125 src/HOL/Analysis/Set_Integral.thy --- a/src/HOL/Analysis/Set_Integral.thy Thu Apr 12 12:16:34 2018 +0100 +++ b/src/HOL/Analysis/Set_Integral.thy Fri Apr 13 15:58:27 2018 +0100 @@ -67,6 +67,9 @@ by (subst (asm) sets_restrict_space_iff) (auto simp: space_restrict_space) qed +lemma set_lebesgue_integral_zero [simp]: "set_lebesgue_integral M A (\x. 0) = 0" + by (auto simp: set_lebesgue_integral_def) + lemma set_lebesgue_integral_cong: assumes "A \ sets M" and "\x. x \ A \ f x = g x" shows "(LINT x:A|M. f x) = (LINT x:A|M. g x)" diff -r 75b94eb58c3d -r 557ea2740125 src/HOL/Probability/Characteristic_Functions.thy --- a/src/HOL/Probability/Characteristic_Functions.thy Thu Apr 12 12:16:34 2018 +0100 +++ b/src/HOL/Probability/Characteristic_Functions.thy Fri Apr 13 15:58:27 2018 +0100 @@ -274,7 +274,8 @@ have *: "\a b. interval_lebesgue_integrable lborel a b f \ interval_lebesgue_integrable lborel a b g \ \LBINT s=a..b. f s\ \ \LBINT s=a..b. g s\" if f: "\s. 0 \ f s" and g: "\s. f s \ g s" for f g :: "_ \ real" - using order_trans[OF f g] f g unfolding interval_lebesgue_integral_def interval_lebesgue_integrable_def + using order_trans[OF f g] f g + unfolding interval_lebesgue_integral_def interval_lebesgue_integrable_def set_lebesgue_integral_def set_integrable_def by (auto simp: integral_nonneg_AE[OF AE_I2] intro!: integral_mono mult_mono) have "iexp x - (\k \ Suc n. (\ * x)^k / fact k) = diff -r 75b94eb58c3d -r 557ea2740125 src/HOL/Probability/Conditional_Expectation.thy --- a/src/HOL/Probability/Conditional_Expectation.thy Thu Apr 12 12:16:34 2018 +0100 +++ b/src/HOL/Probability/Conditional_Expectation.thy Fri Apr 13 15:58:27 2018 +0100 @@ -739,7 +739,8 @@ proof - have "A \ sets M" by (meson assms(2) subalg subalgebra_def subsetD) have "integrable M (\x. indicator A x * f x)" using integrable_mult_indicator[OF \A \ sets M\ assms(1)] by auto - then show ?thesis using real_cond_exp_intg(2)[where ?f = "indicator A" and ?g = f, symmetric] by auto + then show ?thesis using real_cond_exp_intg(2)[where ?f = "indicator A" and ?g = f, symmetric] + unfolding set_lebesgue_integral_def by auto qed lemma real_cond_exp_int [intro]: @@ -760,14 +761,14 @@ then have [measurable]: "A \ sets F" using sets_restr_to_subalg[OF subalg] by simp then have a [measurable]: "A \ sets M" by (meson subalg subalgebra_def subsetD) have "(\x \ A. g x \ ?MF) = (\x \ A. g x \M)" - by (simp add: integral_subalgebra2 subalg) + unfolding set_lebesgue_integral_def by (simp add: integral_subalgebra2 subalg) also have "... = (\x \ A. f x \M)" using assms(1) by simp - also have "... = (\x. indicator A x * f x \M)" by (simp add: mult.commute) + also have "... = (\x. indicator A x * f x \M)" by (simp add: mult.commute set_lebesgue_integral_def) also have "... = (\x. indicator A x * real_cond_exp M F f x \M)" apply (rule real_cond_exp_intg(2)[symmetric]) using integrable_mult_indicator[OF a assms(2)] by (auto simp add: assms) - also have "... = (\x \ A. real_cond_exp M F f x \M)" by (simp add: mult.commute) + also have "... = (\x \ A. real_cond_exp M F f x \M)" by (simp add: mult.commute set_lebesgue_integral_def) also have "... = (\x \ A. real_cond_exp M F f x \ ?MF)" - by (simp add: integral_subalgebra2 subalg) + by (simp add: integral_subalgebra2 subalg set_lebesgue_integral_def) finally show "(\x \ A. g x \ ?MF) = (\x \ A. real_cond_exp M F f x \ ?MF)" by simp next have "integrable M (real_cond_exp M F f)" by (rule real_cond_exp_int(1)[OF assms(2)]) @@ -791,12 +792,12 @@ then have [measurable]: "(\x. f x * indicator A x) \ borel_measurable F" by measurable have [measurable]: "A \ sets M" using subalg by (meson \A \ sets F\ subalgebra_def subsetD) have "\x\A. (f x * g x) \M = \x. (f x * indicator A x) * g x \M" - by (simp add: mult.commute mult.left_commute) + by (simp add: mult.commute mult.left_commute set_lebesgue_integral_def) also have "... = \x. (f x * indicator A x) * real_cond_exp M F g x \M" apply (rule real_cond_exp_intg(2)[symmetric], auto simp add: assms) using integrable_mult_indicator[OF \A \ sets M\ assms(3)] by (simp add: mult.commute mult.left_commute) also have "... = \x\A. (f x * real_cond_exp M F g x)\M" - by (simp add: mult.commute mult.left_commute) + by (simp add: mult.commute mult.left_commute set_lebesgue_integral_def) finally show "\x\A. (f x * g x) \M = \x\A. (f x * real_cond_exp M F g x)\M" by simp qed (auto simp add: real_cond_exp_intg(1) assms) @@ -817,17 +818,17 @@ using integrable_mult_indicator[OF \A \ sets M\ assms(2)] by auto have "\x\A. (real_cond_exp M F f x + real_cond_exp M F g x)\M = (\x\A. real_cond_exp M F f x \M) + (\x\A. real_cond_exp M F g x \M)" - apply (rule set_integral_add, auto simp add: assms) + apply (rule set_integral_add, auto simp add: assms set_integrable_def) using integrable_mult_indicator[OF \A \ sets M\ real_cond_exp_int(1)[OF assms(1)]] integrable_mult_indicator[OF \A \ sets M\ real_cond_exp_int(1)[OF assms(2)]] by simp_all also have "... = (\x. indicator A x * real_cond_exp M F f x \M) + (\x. indicator A x * real_cond_exp M F g x \M)" - by auto + unfolding set_lebesgue_integral_def by auto also have "... = (\x. indicator A x * f x \M) + (\x. indicator A x * g x \M)" using real_cond_exp_intg(2) assms \A \ sets F\ intAf intAg by auto also have "... = (\x\A. f x \M) + (\x\A. g x \M)" - by auto + unfolding set_lebesgue_integral_def by auto also have "... = \x\A. (f x + g x)\M" - by (rule set_integral_add(2)[symmetric]) (auto simp add: assms \A \ sets M\ intAf intAg) + by (rule set_integral_add(2)[symmetric]) (auto simp add: assms set_integrable_def \A \ sets M\ intAf intAg) finally show "\x\A. (f x + g x)\M = \x\A. (real_cond_exp M F f x + real_cond_exp M F g x)\M" by simp qed (auto simp add: assms) @@ -911,7 +912,7 @@ lemma real_cond_exp_gr_c: assumes [measurable]: "integrable M f" - and "AE x in M. f x > c" + and AE: "AE x in M. f x > c" shows "AE x in M. real_cond_exp M F f x > c" proof - define X where "X = {x \ space M. real_cond_exp M F f x \ c}" @@ -931,24 +932,33 @@ then have [measurable]: "A \ sets F" using subalg sets_restr_to_subalg by blast then have [measurable]: "A \ sets M" using sets_restr_to_subalg subalg subalgebra_def by blast have Ic: "set_integrable M A (\x. c)" + unfolding set_integrable_def using \emeasure (restr_to_subalg M F) A < \\ emeasure_restr_to_subalg subalg by fastforce have If: "set_integrable M A f" + unfolding set_integrable_def by (rule integrable_mult_indicator, auto simp add: \integrable M f\) - have *: "(\x\A. c \M) = (\x\A. f x \M)" - proof (rule antisym) - show "(\x\A. c \M) \ (\x\A. f x \M)" - apply (rule set_integral_mono_AE) using Ic If assms(2) by auto - have "(\x\A. f x \M) = (\x\A. real_cond_exp M F f x \M)" - by (rule real_cond_exp_intA, auto simp add: \integrable M f\) - also have "... \ (\x\A. c \M)" - apply (rule set_integral_mono) - apply (rule integrable_mult_indicator, simp, simp add: real_cond_exp_int(1)[OF \integrable M f\]) - using Ic X_def \A \ X\ by auto - finally show "(\x\A. f x \M) \ (\x\A. c \M)" by simp - qed have "AE x in M. indicator A x * c = indicator A x * f x" - apply (rule integral_ineq_eq_0_then_AE) using Ic If * apply auto - using assms(2) unfolding indicator_def by auto + proof (rule integral_ineq_eq_0_then_AE) + have "(\x\A. c \M) = (\x\A. f x \M)" + proof (rule antisym) + show "(\x\A. c \M) \ (\x\A. f x \M)" + apply (rule set_integral_mono_AE) using Ic If assms(2) by auto + have "(\x\A. f x \M) = (\x\A. real_cond_exp M F f x \M)" + by (rule real_cond_exp_intA, auto simp add: \integrable M f\) + also have "... \ (\x\A. c \M)" + apply (rule set_integral_mono) + unfolding set_integrable_def + apply (rule integrable_mult_indicator, simp, simp add: real_cond_exp_int(1)[OF \integrable M f\]) + using Ic X_def \A \ X\ by (auto simp: set_integrable_def) + finally show "(\x\A. f x \M) \ (\x\A. c \M)" by simp + qed + then have "measure M A * c = LINT x|M. indicat_real A x * f x" + by (auto simp: set_lebesgue_integral_def) + then show "LINT x|M. indicat_real A x * c = LINT x|M. indicat_real A x * f x" + by auto + show "AE x in M. indicat_real A x * c \ indicat_real A x * f x" + using AE unfolding indicator_def by auto + qed (use Ic If in \auto simp: set_integrable_def\) then have "AE x\A in M. c = f x" by auto then have "AE x\A in M. False" using assms(2) by auto have "A \ null_sets M" unfolding ae_filter_def by (meson AE_iff_null_sets \A \ sets M\ \AE x\A in M. False\) @@ -1045,7 +1055,7 @@ by (rule real_cond_exp_intg(2)[symmetric], auto simp add: *) have "(\x\A. (\i\I. f i x)\M) = (\x. (\i\I. indicator A x * f i x)\M)" - by (simp add: sum_distrib_left) + by (simp add: sum_distrib_left set_lebesgue_integral_def) also have "... = (\i\I. (\x. indicator A x * f i x \M))" by (rule Bochner_Integration.integral_sum, simp add: *) also have "... = (\i\I. (\x. indicator A x * real_cond_exp M F (f i) x \M))" @@ -1053,7 +1063,7 @@ also have "... = (\x. (\i\I. indicator A x * real_cond_exp M F (f i) x)\M)" by (rule Bochner_Integration.integral_sum[symmetric], simp add: **) also have "... = (\x\A. (\i\I. real_cond_exp M F (f i) x)\M)" - by (simp add: sum_distrib_left) + by (simp add: sum_distrib_left set_lebesgue_integral_def) finally show "(\x\A. (\i\I. f i x)\M) = (\x\A. (\i\I. real_cond_exp M F (f i) x)\M)" by auto qed (auto simp add: assms real_cond_exp_int(1)[OF assms(1)]) diff -r 75b94eb58c3d -r 557ea2740125 src/HOL/Probability/Distributions.thy --- a/src/HOL/Probability/Distributions.thy Thu Apr 12 12:16:34 2018 +0100 +++ b/src/HOL/Probability/Distributions.thy Fri Apr 13 15:58:27 2018 +0100 @@ -955,12 +955,13 @@ by (rule integral_by_parts') (auto intro!: derivative_eq_intros b simp: diff_Suc of_nat_Suc field_simps split: nat.split) - also have "(\x. indicator {0..b} x *\<^sub>R (- 2 * x * exp (- x\<^sup>2) * x ^ (Suc k)) \lborel) = - (\x. indicator {0..b} x *\<^sub>R (- 2 * (exp (- x\<^sup>2) * x ^ (k + 2))) \lborel)" - by (intro Bochner_Integration.integral_cong) auto + also have "... = exp (- b\<^sup>2) * b ^ (Suc k) - (\x. indicator {0..b} x *\<^sub>R (- 2 * (exp (- x\<^sup>2) * x ^ (k + 2))) \lborel)" + by (auto simp: intro!: Bochner_Integration.integral_cong) + also have "... = exp (- b\<^sup>2) * b ^ (Suc k) + 2 * (\x. indicator {0..b} x *\<^sub>R ?M (k + 2) x \lborel)" + unfolding Bochner_Integration.integral_mult_right_zero [symmetric] + by (simp del: real_scaleR_def) finally have "Suc k * (\x. indicator {0..b} x *\<^sub>R ?M k x \lborel) = - exp (- b\<^sup>2) * b ^ (Suc k) + 2 * (\x. indicator {0..b} x *\<^sub>R ?M (k + 2) x \lborel)" - by (simp del: real_scaleR_def integral_mult_right add: integral_mult_right[symmetric]) + exp (- b\<^sup>2) * b ^ (Suc k) + 2 * (\x. indicator {0..b} x *\<^sub>R ?M (k + 2) x \lborel)" . then show "(k + 1) / 2 * (\x. indicator {..b} x *\<^sub>R (indicator {0..} x *\<^sub>R ?M k x)\lborel) - exp (- b\<^sup>2) * b ^ (k + 1) / 2 = ?f b" by (simp add: field_simps atLeastAtMost_def indicator_inter_arith) qed diff -r 75b94eb58c3d -r 557ea2740125 src/HOL/Probability/Levy.thy --- a/src/HOL/Probability/Levy.thy Thu Apr 12 12:16:34 2018 +0100 +++ b/src/HOL/Probability/Levy.thy Fri Apr 13 15:58:27 2018 +0100 @@ -90,12 +90,12 @@ { fix x have 1: "complex_interval_lebesgue_integrable lborel u v (\t. ?f t x)" for u v :: real using Levy_Inversion_aux2[of "x - b" "x - a"] - apply (simp add: interval_lebesgue_integrable_def del: times_divide_eq_left) + apply (simp add: interval_lebesgue_integrable_def set_integrable_def del: times_divide_eq_left) apply (intro integrableI_bounded_set_indicator[where B="b - a"] conjI impI) apply (auto intro!: AE_I [of _ _ "{0}"] simp: assms) done have "(CLBINT t. ?f' (t, x)) = (CLBINT t=-T..T. ?f t x)" - using \T \ 0\ by (simp add: interval_lebesgue_integral_def) + using \T \ 0\ by (simp add: interval_lebesgue_integral_def set_lebesgue_integral_def) also have "\ = (CLBINT t=-T..(0 :: real). ?f t x) + (CLBINT t=(0 :: real)..T. ?f t x)" (is "_ = _ + ?t") using 1 by (intro interval_integral_sum[symmetric]) (simp add: min_absorb1 max_absorb2 \T \ 0\) @@ -130,7 +130,7 @@ } note main_eq = this have "(CLBINT t=-T..T. ?F t * \ t) = (CLBINT t. (CLINT x | M. ?F t * iexp (t * x) * indicator {-T<..T \ 0\ unfolding \_def char_def interval_lebesgue_integral_def + using \T \ 0\ unfolding \_def char_def interval_lebesgue_integral_def set_lebesgue_integral_def by (auto split: split_indicator intro!: Bochner_Integration.integral_cong) also have "\ = (CLBINT t. (CLINT x | M. ?f' (t, x)))" by (auto intro!: Bochner_Integration.integral_cong simp: field_simps exp_diff exp_minus split: split_indicator) @@ -323,6 +323,7 @@ by (rule Mn.integrable_const_bound [where B = 1], auto) have Mn3: "set_integrable (M n \\<^sub>M lborel) (UNIV \ {- u..u}) (\a. 1 - exp (\ * complex_of_real (snd a * fst a)))" using \0 < u\ + unfolding set_integrable_def by (intro integrableI_bounded_set_indicator [where B="2"]) (auto simp: lborel.emeasure_pair_measure_Times ennreal_mult_less_top not_less top_unique split: split_indicator @@ -331,9 +332,10 @@ (CLBINT t:{-u..u}. (CLINT x | M n. 1 - iexp (t * x)))" unfolding char_def by (rule set_lebesgue_integral_cong, auto simp del: of_real_mult) also have "\ = (CLBINT t. (CLINT x | M n. indicator {-u..u} t *\<^sub>R (1 - iexp (t * x))))" + unfolding set_lebesgue_integral_def by (rule Bochner_Integration.integral_cong) (auto split: split_indicator) also have "\ = (CLINT x | M n. (CLBINT t:{-u..u}. 1 - iexp (t * x)))" - using Mn3 by (subst P.Fubini_integral) (auto simp: indicator_times split_beta') + using Mn3 by (subst P.Fubini_integral) (auto simp: indicator_times split_beta' set_integrable_def set_lebesgue_integral_def) also have "\ = (CLINT x | M n. (if x = 0 then 0 else 2 * (u - sin (u * x) / x)))" using \u > 0\ by (intro Bochner_Integration.integral_cong, auto simp add: * simp del: of_real_mult) also have "\ = (LINT x | M n. (if x = 0 then 0 else 2 * (u - sin (u * x) / x)))" @@ -343,9 +345,12 @@ also have "\ \ (LINT x : {x. abs x \ 2 / u} | M n. u)" proof - have "complex_integrable (M n) (\x. CLBINT t:{-u..u}. 1 - iexp (snd (x, t) * fst (x, t)))" - using Mn3 by (intro P.integrable_fst) (simp add: indicator_times split_beta') + using Mn3 unfolding set_integrable_def set_lebesgue_integral_def + by (intro P.integrable_fst) (simp add: indicator_times split_beta') hence "complex_integrable (M n) (\x. if x = 0 then 0 else 2 * (u - sin (u * x) / x))" - using \u > 0\ by (subst integrable_cong) (auto simp add: * simp del: of_real_mult) + using \u > 0\ + unfolding set_integrable_def + by (subst integrable_cong) (auto simp add: * simp del: of_real_mult) hence **: "integrable (M n) (\x. if x = 0 then 0 else 2 * (u - sin (u * x) / x))" unfolding complex_of_real_integrable_eq . have "2 * sin x \ x" if "2 \ x" for x :: real @@ -355,13 +360,13 @@ moreover have "x < 0 \ x \ sin x" for x :: real using sin_x_le_x[of "-x"] by simp ultimately show ?thesis - using \u > 0\ + using \u > 0\ unfolding set_lebesgue_integral_def by (intro integral_mono [OF _ **]) (auto simp: divide_simps sin_x_le_x mult.commute[of u] mult_neg_pos top_unique less_top[symmetric] split: split_indicator) qed - also (xtrans) have "(LINT x : {x. abs x \ 2 / u} | M n. u) = - u * measure (M n) {x. abs x \ 2 / u}" + also (xtrans) have "(LINT x : {x. abs x \ 2 / u} | M n. u) = u * measure (M n) {x. abs x \ 2 / u}" + unfolding set_lebesgue_integral_def by (simp add: Mn.emeasure_eq_measure) finally show "Re (CLBINT t:{-u..u}. 1 - char (M n) t) \ u * measure (M n) {x. abs x \ 2 / u}" . qed @@ -380,13 +385,16 @@ have 1: "\x. cmod (1 - char M' x) \ 2" by (rule order_trans [OF norm_triangle_ineq4], auto simp add: M'.cmod_char_le_1) then have 2: "\u v. complex_set_integrable lborel {u..v} (\x. 1 - char M' x)" + unfolding set_integrable_def by (intro integrableI_bounded_set_indicator[where B=2]) (auto simp: emeasure_lborel_Icc_eq) - have 3: "\u v. set_integrable lborel {u..v} (\x. cmod (1 - char M' x))" + have 3: "\u v. integrable lborel (\x. indicat_real {u..v} x *\<^sub>R cmod (1 - char M' x))" by (intro borel_integrable_compact[OF compact_Icc] continuous_at_imp_continuous_on continuous_intros ballI M'.isCont_char continuous_intros) have "cmod (CLBINT t:{-d/2..d/2}. 1 - char M' t) \ LBINT t:{-d/2..d/2}. cmod (1 - char M' t)" + unfolding set_lebesgue_integral_def using integral_norm_bound[of _ "\x. indicator {u..v} x *\<^sub>R (1 - char M' x)" for u v] by simp also have 4: "\ \ LBINT t:{-d/2..d/2}. \ / 4" + unfolding set_lebesgue_integral_def apply (rule integral_mono [OF 3]) apply (simp add: emeasure_lborel_Icc_eq) apply (case_tac "x \ {-d/2..d/2}") @@ -397,11 +405,12 @@ using d0 apply auto done also from d0 4 have "\ = d * \ / 4" - by simp + unfolding set_lebesgue_integral_def by simp finally have bound: "cmod (CLBINT t:{-d/2..d/2}. 1 - char M' t) \ d * \ / 4" . have "cmod (1 - char (M n) x) \ 2" for n x by (rule order_trans [OF norm_triangle_ineq4], auto simp add: Mn.cmod_char_le_1) then have "(\n. CLBINT t:{-d/2..d/2}. 1 - char (M n) t) \ (CLBINT t:{-d/2..d/2}. 1 - char M' t)" + unfolding set_lebesgue_integral_def apply (intro integral_dominated_convergence[where w="\x. indicator {-d/2..d/2} x *\<^sub>R 2"]) apply (auto intro!: char_conv tendsto_intros simp: emeasure_lborel_Icc_eq diff -r 75b94eb58c3d -r 557ea2740125 src/HOL/Probability/Probability_Mass_Function.thy --- a/src/HOL/Probability/Probability_Mass_Function.thy Thu Apr 12 12:16:34 2018 +0100 +++ b/src/HOL/Probability/Probability_Mass_Function.thy Fri Apr 13 15:58:27 2018 +0100 @@ -541,7 +541,7 @@ shows "infsetsum (pmf p) A = 1" proof - have "infsetsum (pmf p) A = lebesgue_integral (count_space UNIV) (pmf p)" - using assms unfolding infsetsum_altdef + using assms unfolding infsetsum_altdef set_lebesgue_integral_def by (intro Bochner_Integration.integral_cong) (auto simp: indicator_def set_pmf_eq) also have "\ = 1" by (subst integral_eq_nn_integral) (auto simp: nn_integral_pmf) diff -r 75b94eb58c3d -r 557ea2740125 src/HOL/Probability/Sinc_Integral.thy --- a/src/HOL/Probability/Sinc_Integral.thy Thu Apr 12 12:16:34 2018 +0100 +++ b/src/HOL/Probability/Sinc_Integral.thy Fri Apr 13 15:58:27 2018 +0100 @@ -33,12 +33,12 @@ lemma integrable_I0i_exp_mscale: "0 < (u::real) \ set_integrable lborel {0 <..} (\x. exp (-(x * u)))" using lborel_integrable_real_affine_iff[of u "\x. indicator {0 <..} x *\<^sub>R exp (- x)" 0] has_bochner_integral_I0i_power_exp_m[of 0] - by (simp add: indicator_def zero_less_mult_iff mult_ac integrable.intros) + by (simp add: indicator_def zero_less_mult_iff mult_ac integrable.intros set_integrable_def) lemma LBINT_I0i_exp_mscale: "0 < (u::real) \ LBINT x=0..\. exp (-(x * u)) = 1 / u" using lborel_integral_real_affine[of u "\x. indicator {0<..} x *\<^sub>R exp (- x)" 0] has_bochner_integral_I0i_power_exp_m[of 0] - by (auto simp: indicator_def zero_less_mult_iff interval_lebesgue_integral_0_infty field_simps + by (auto simp: indicator_def zero_less_mult_iff interval_lebesgue_integral_0_infty set_lebesgue_integral_def field_simps dest!: has_bochner_integral_integral_eq) lemma LBINT_I0c_exp_mscale_sin: @@ -83,11 +83,11 @@ show "LBINT x=-\..\. inverse (1 + x^2) = pi" by (subst interval_integral_substitution_nonneg[of "-pi/2" "pi/2" tan "\x. 1 + (tan x)^2"]) (auto intro: derivative_eq_intros 1 2 filterlim_tan_at_right - simp add: ereal_tendsto_simps filterlim_tan_at_left add_nonneg_eq_0_iff) + simp add: ereal_tendsto_simps filterlim_tan_at_left add_nonneg_eq_0_iff set_integrable_def) show "set_integrable lborel (einterval (-\) \) (\x. inverse (1 + x^2))" by (subst interval_integral_substitution_nonneg[of "-pi/2" "pi/2" tan "\x. 1 + (tan x)^2"]) (auto intro: derivative_eq_intros 1 2 filterlim_tan_at_right - simp add: ereal_tendsto_simps filterlim_tan_at_left add_nonneg_eq_0_iff) + simp add: ereal_tendsto_simps filterlim_tan_at_left add_nonneg_eq_0_iff set_integrable_def) qed lemma @@ -103,12 +103,12 @@ show "LBINT x=0..\. 1 / (1 + x^2) = pi / 2" by (subst interval_integral_substitution_nonneg[of "0" "pi/2" tan "\x. 1 + (tan x)^2"]) (auto intro: derivative_eq_intros 1 2 tendsto_eq_intros - simp add: ereal_tendsto_simps filterlim_tan_at_left zero_ereal_def add_nonneg_eq_0_iff) + simp add: ereal_tendsto_simps filterlim_tan_at_left zero_ereal_def add_nonneg_eq_0_iff set_integrable_def) show "interval_lebesgue_integrable lborel 0 \ (\x. 1 / (1 + x^2))" unfolding interval_lebesgue_integrable_def by (subst interval_integral_substitution_nonneg[of "0" "pi/2" tan "\x. 1 + (tan x)^2"]) (auto intro: derivative_eq_intros 1 2 tendsto_eq_intros - simp add: ereal_tendsto_simps filterlim_tan_at_left zero_ereal_def add_nonneg_eq_0_iff) + simp add: ereal_tendsto_simps filterlim_tan_at_left zero_ereal_def add_nonneg_eq_0_iff set_integrable_def) qed section \The sinc function, and the sine integral (Si)\ @@ -212,10 +212,12 @@ have int: "set_integrable lborel {0<..} (\x. exp (- x) * (x + 1) :: real)" unfolding distrib_left using has_bochner_integral_I0i_power_exp_m[of 0] has_bochner_integral_I0i_power_exp_m[of 1] - by (intro set_integral_add) (auto dest!: integrable.intros simp: ac_simps) + by (intro set_integral_add) (auto dest!: integrable.intros simp: ac_simps set_integrable_def) have "((\t::real. LBINT x:{0<..}. ?F x t) \ LBINT x::real:{0<..}. 0) at_top" - proof (rule integral_dominated_convergence_at_top[OF _ _ int], simp_all del: abs_divide split: split_indicator) + unfolding set_lebesgue_integral_def + proof (rule integral_dominated_convergence_at_top[OF _ _ int [unfolded set_integrable_def]], + simp_all del: abs_divide split: split_indicator) have *: "0 < x \ \x * sin t + cos t\ / (1 + x\<^sup>2) \ (x * 1 + 1) / 1" for x t :: real by (intro frac_le abs_triangle_ineq[THEN order_trans] add_mono) (auto simp add: abs_mult simp del: mult_1_right intro!: mult_mono) @@ -241,7 +243,7 @@ qed qed then show "((\t. (LBINT x=0..\. exp (-(x * t)) * (x * sin t + cos t) / (1 + x^2))) \ 0) at_top" - by (simp add: interval_lebesgue_integral_0_infty) + by (simp add: interval_lebesgue_integral_0_infty set_lebesgue_integral_def) qed lemma Si_at_top_integrable: @@ -258,10 +260,10 @@ have "set_integrable lborel {0<..} (\x. (exp (- x) * x) * (sin t/t) + exp (- x) * cos t)" using has_bochner_integral_I0i_power_exp_m[of 0] has_bochner_integral_I0i_power_exp_m[of 1] by (intro set_integral_add set_integrable_mult_left) - (auto dest!: integrable.intros simp: ac_simps) - from lborel_integrable_real_affine[OF this, of t 0] + (auto dest!: integrable.intros simp: ac_simps set_integrable_def) + from lborel_integrable_real_affine[OF this [unfolded set_integrable_def], of t 0] show ?thesis - unfolding interval_lebesgue_integral_0_infty + unfolding interval_lebesgue_integral_0_infty set_integrable_def by (rule Bochner_Integration.integrable_bound) (auto simp: field_simps * split: split_indicator) qed @@ -275,9 +277,10 @@ unfolding Si_def using \0 \ t\ by (intro interval_integral_discrete_difference[where X="{0}"]) (auto simp: LBINT_I0i_exp_mscale) also have "\ = LBINT x. (LBINT u=ereal 0..\. indicator {0 <..< t} x *\<^sub>R sin x * exp (-(u * x)))" - using \0\t\ by (simp add: zero_ereal_def interval_lebesgue_integral_le_eq mult_ac) + using \0\t\ by (simp add: zero_ereal_def interval_lebesgue_integral_le_eq mult_ac set_lebesgue_integral_def) also have "\ = LBINT x. (LBINT u. indicator ({0<..} \ {0 <..< t}) (u, x) *\<^sub>R (sin x * exp (-(u * x))))" - by (subst interval_integral_Ioi) (simp_all add: indicator_times ac_simps) + apply (subst interval_integral_Ioi) + unfolding set_lebesgue_integral_def by(simp_all add: indicator_times ac_simps ) also have "\ = LBINT u. (LBINT x. indicator ({0<..} \ {0 <..< t}) (u, x) *\<^sub>R (sin x * exp (-(u * x))))" proof (intro lborel_pair.Fubini_integral[symmetric] lborel_pair.Fubini_integrable) show "(\(x, y). indicator ({0<..} \ {0<..R (sin x * exp (- (y * x)))) @@ -293,7 +296,7 @@ by (intro Bochner_Integration.integral_cong) (auto split: split_indicator simp: abs_mult) also have "\ = \sin x\ * indicator {0<... exp (- (y * x)))" by (cases "x > 0") - (auto simp: field_simps interval_lebesgue_integral_0_infty split: split_indicator) + (auto simp: field_simps interval_lebesgue_integral_0_infty set_lebesgue_integral_def split: split_indicator) also have "\ = \sin x\ * indicator {0<.. 0") (auto simp add: LBINT_I0i_exp_mscale) also have "\ = indicator {0..t} x *\<^sub>R \sinc x\" @@ -301,7 +304,7 @@ finally show "indicator {0..t} x *\<^sub>R abs (sinc x) = LBINT y. norm (?f (x, y))" by simp qed - moreover have "set_integrable lborel {0 .. t} (\x. abs (sinc x))" + moreover have "integrable lborel (\x. indicat_real {0..t} x *\<^sub>R \sinc x\)" by (auto intro!: borel_integrable_compact continuous_intros simp del: real_scaleR_def) ultimately show "integrable lborel (\x. LBINT y. norm (?f (x, y)))" by (rule integrable_cong_AE_imp[rotated 2]) simp @@ -309,11 +312,11 @@ have "0 < x \ set_integrable lborel {0<..} (\y. sin x * exp (- (y * x)))" for x :: real by (intro set_integrable_mult_right integrable_I0i_exp_mscale) then show "AE x in lborel. integrable lborel (\y. ?f (x, y))" - by (intro AE_I2) (auto simp: indicator_times split: split_indicator) + by (intro AE_I2) (auto simp: indicator_times set_integrable_def split: split_indicator) qed also have "... = LBINT u=0..\. (LBINT x=0..t. exp (-(u * x)) * sin x)" using \0\t\ - by (auto simp: interval_lebesgue_integral_def zero_ereal_def ac_simps + by (auto simp: interval_lebesgue_integral_def set_lebesgue_integral_def zero_ereal_def ac_simps split: split_indicator intro!: Bochner_Integration.integral_cong) also have "\ = LBINT u=0..\. 1 / (1 + u\<^sup>2) - 1 / (1 + u\<^sup>2) * (exp (- (u * t)) * (u * sin t + cos t))" by (auto simp: divide_simps LBINT_I0c_exp_mscale_sin intro!: interval_integral_cong) @@ -369,12 +372,12 @@ hence "LBINT x. indicator {0<..) / x = LBINT x. indicator {0<..} x * sin x / x" using assms \0 < \\ unfolding interval_lebesgue_integral_def einterval_eq zero_ereal_def - by (auto simp: ac_simps) + by (auto simp: ac_simps set_lebesgue_integral_def) } note aux1 = this { assume "0 > \" have [simp]: "integrable lborel (\x. sin (x * \) * indicator {0<..] assms - by (simp add: interval_lebesgue_integrable_def ac_simps) + by (simp add: interval_lebesgue_integrable_def set_integrable_def ac_simps) have "(LBINT t=ereal 0..T. sin (t * -\) / t) = (LBINT t=ereal 0..T. -\ *\<^sub>R sinc (t * -\))" by (rule interval_integral_discrete_difference[of "{0}"]) auto also have "\ = (LBINT t=ereal (0 * -\)..T * -\. sinc t)" @@ -388,10 +391,10 @@ hence "LBINT x. indicator {0<..) / x = - (LBINT x. indicator {0<..<- (T * \)} x * sin x / x)" using assms \0 > \\ unfolding interval_lebesgue_integral_def einterval_eq zero_ereal_def - by (auto simp add: field_simps mult_le_0_iff split: if_split_asm) + by (auto simp add: field_simps mult_le_0_iff set_lebesgue_integral_def split: if_split_asm) } note aux2 = this show ?thesis - using assms unfolding Si_def interval_lebesgue_integral_def sgn_real_def einterval_eq zero_ereal_def + using assms unfolding Si_def interval_lebesgue_integral_def set_lebesgue_integral_def sgn_real_def einterval_eq zero_ereal_def apply auto apply (erule aux1) apply (rule aux2)