src/HOL/Probability/Sinc_Integral.thy
changeset 68613 2fae3e01a2ec
parent 67977 557ea2740125
child 70365 4df0628e8545
equal deleted inserted replaced
68612:ffc3fd6c7498 68613:2fae3e01a2ec
    78 proof -
    78 proof -
    79   have 1: "- (pi / 2) < x \<Longrightarrow> x * 2 < pi \<Longrightarrow> (tan has_real_derivative 1 + (tan x)\<^sup>2) (at x)" for x
    79   have 1: "- (pi / 2) < x \<Longrightarrow> x * 2 < pi \<Longrightarrow> (tan has_real_derivative 1 + (tan x)\<^sup>2) (at x)" for x
    80     using cos_gt_zero_pi[of x] by (subst tan_sec) (auto intro!: DERIV_tan simp: power_inverse)
    80     using cos_gt_zero_pi[of x] by (subst tan_sec) (auto intro!: DERIV_tan simp: power_inverse)
    81   have 2: "- (pi / 2) < x \<Longrightarrow> x * 2 < pi \<Longrightarrow> isCont (\<lambda>x. 1 + (tan x)\<^sup>2) x" for x
    81   have 2: "- (pi / 2) < x \<Longrightarrow> x * 2 < pi \<Longrightarrow> isCont (\<lambda>x. 1 + (tan x)\<^sup>2) x" for x
    82     using cos_gt_zero_pi[of x] by auto
    82     using cos_gt_zero_pi[of x] by auto
       
    83   have 3: "\<lbrakk>- (pi / 2) < x; x * 2 < pi\<rbrakk>  \<Longrightarrow> isCont (\<lambda>x. inverse (1 + x\<^sup>2)) (tan x)" for x
       
    84     by (rule continuous_intros | simp add: add_nonneg_eq_0_iff)+
    83   show "LBINT x=-\<infinity>..\<infinity>. inverse (1 + x^2) = pi"
    85   show "LBINT x=-\<infinity>..\<infinity>. inverse (1 + x^2) = pi"
    84     by (subst interval_integral_substitution_nonneg[of "-pi/2" "pi/2" tan "\<lambda>x. 1 + (tan x)^2"])
    86     by (subst interval_integral_substitution_nonneg[of "-pi/2" "pi/2" tan "\<lambda>x. 1 + (tan x)^2"])
    85        (auto intro: derivative_eq_intros 1 2 filterlim_tan_at_right
    87        (auto intro: derivative_eq_intros 1 2 3 filterlim_tan_at_right
    86              simp add: ereal_tendsto_simps filterlim_tan_at_left add_nonneg_eq_0_iff set_integrable_def)
    88              simp add: ereal_tendsto_simps filterlim_tan_at_left add_nonneg_eq_0_iff set_integrable_def)
    87   show "set_integrable lborel (einterval (-\<infinity>) \<infinity>) (\<lambda>x. inverse (1 + x^2))"
    89   show "set_integrable lborel (einterval (-\<infinity>) \<infinity>) (\<lambda>x. inverse (1 + x^2))"
    88     by (subst interval_integral_substitution_nonneg[of "-pi/2" "pi/2" tan "\<lambda>x. 1 + (tan x)^2"])
    90     by (subst interval_integral_substitution_nonneg[of "-pi/2" "pi/2" tan "\<lambda>x. 1 + (tan x)^2"])
    89        (auto intro: derivative_eq_intros 1 2 filterlim_tan_at_right
    91        (auto intro: derivative_eq_intros 1 2 3 filterlim_tan_at_right
    90              simp add: ereal_tendsto_simps filterlim_tan_at_left add_nonneg_eq_0_iff set_integrable_def)
    92              simp add: ereal_tendsto_simps filterlim_tan_at_left add_nonneg_eq_0_iff set_integrable_def)
    91 qed
    93 qed
    92 
    94 
    93 lemma
    95 lemma
    94   shows integrable_I0i_1_div_plus_square:
    96   shows integrable_I0i_1_div_plus_square:
   393       using assms \<open>0 > \<theta>\<close> unfolding interval_lebesgue_integral_def einterval_eq zero_ereal_def
   395       using assms \<open>0 > \<theta>\<close> unfolding interval_lebesgue_integral_def einterval_eq zero_ereal_def
   394         by (auto simp add: field_simps mult_le_0_iff set_lebesgue_integral_def split: if_split_asm)
   396         by (auto simp add: field_simps mult_le_0_iff set_lebesgue_integral_def split: if_split_asm)
   395   } note aux2 = this
   397   } note aux2 = this
   396   show ?thesis
   398   show ?thesis
   397     using assms unfolding Si_def interval_lebesgue_integral_def set_lebesgue_integral_def sgn_real_def einterval_eq zero_ereal_def
   399     using assms unfolding Si_def interval_lebesgue_integral_def set_lebesgue_integral_def sgn_real_def einterval_eq zero_ereal_def
   398     apply auto
   400     by (auto simp: aux1 aux2)
   399     apply (erule aux1)
       
   400     apply (rule aux2)
       
   401     apply auto
       
   402     done
       
   403 qed
   401 qed
   404 
   402 
   405 end
   403 end