Theorem: integral_gaussian_complex_Ioi
File: Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean

Proof steps:
state_before: b : ℂ
hb : 0 < b.re
⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2
state_after: b : ℂ
hb : 0 < b.re
full_integral : ∫ (x : ℝ), cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)
⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2
tactic: have full_integral := integral_gaussian_complex hb
state_before: b : ℂ
hb : 0 < b.re
full_integral : ∫ (x : ℝ), cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)
⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2
state_after: b : ℂ
hb : 0 < b.re
full_integral : ∫ (x : ℝ), cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)
this : MeasurableSet (Ioi 0)
⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2
tactic: have : MeasurableSet (Ioi (0 : ℝ)) := measurableSet_Ioi
state_before: b : ℂ
hb : 0 < b.re
full_integral : ∫ (x : ℝ), cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)
this : MeasurableSet (Ioi 0)
⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2
state_after: b : ℂ
hb : 0 < b.re
full_integral :
  ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) ∂volume = (↑π / b) ^ (1 / 2)
this : MeasurableSet (Ioi 0)
⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2
tactic: rw [← integral_add_compl this (integrable_cexp_neg_mul_sq hb), compl_Ioi] at full_integral
state_before: b : ℂ
hb : 0 < b.re
full_integral :
  ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) ∂volume = (↑π / b) ^ (1 / 2)
this : MeasurableSet (Ioi 0)
⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2
state_after: b : ℂ
hb : 0 < b.re
full_integral :
  ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) ∂volume = (↑π / b) ^ (1 / 2)
this : MeasurableSet (Ioi 0)
⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)
tactic: suffices ∫ x : ℝ in Iic 0, cexp (-b * (x : ℂ) ^ 2) = ∫ x : ℝ in Ioi 0, cexp (-b * (x : ℂ) ^ 2) by
    rw [this, ← mul_two] at full_integral
    rwa [eq_div_iff]; exact two_ne_zero
state_before: b : ℂ
hb : 0 < b.re
full_integral :
  ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) ∂volume = (↑π / b) ^ (1 / 2)
this : MeasurableSet (Ioi 0)
⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)
state_after: b : ℂ
hb : 0 < b.re
full_integral :
  ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) ∂volume = (↑π / b) ^ (1 / 2)
this✝ : MeasurableSet (Ioi 0)
this : ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)
⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)
tactic: have : ∀ c : ℝ, ∫ x in (0 : ℝ)..c, cexp (-b * (x : ℂ) ^ 2) =
      ∫ x in -c..0, cexp (-b * (x : ℂ) ^ 2) := by
    intro c
    have := intervalIntegral.integral_comp_sub_left (a := 0) (b := c)
      (fun x => cexp (-b * (x : ℂ) ^ 2)) 0
    simpa [zero_sub, neg_sq, neg_zero] using this
state_before: b : ℂ
hb : 0 < b.re
full_integral :
  ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) ∂volume = (↑π / b) ^ (1 / 2)
this✝ : MeasurableSet (Ioi 0)
this : ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)
⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)
state_after: b : ℂ
hb : 0 < b.re
full_integral :
  ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) ∂volume = (↑π / b) ^ (1 / 2)
this✝ : MeasurableSet (Ioi 0)
this : ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)
t1 :
  Tendsto (fun i => ∫ (x : ℝ) in 0 ..id i, cexp (-b * ↑x ^ 2)) atTop
    (𝓝 (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume))
⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)
tactic: have t1 :=
    intervalIntegral_tendsto_integral_Ioi 0 (integrable_cexp_neg_mul_sq hb).integrableOn tendsto_id
state_before: b : ℂ
hb : 0 < b.re
full_integral :
  ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) ∂volume = (↑π / b) ^ (1 / 2)
this✝ : MeasurableSet (Ioi 0)
this : ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)
t1 :
  Tendsto (fun i => ∫ (x : ℝ) in 0 ..id i, cexp (-b * ↑x ^ 2)) atTop
    (𝓝 (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume))
⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)
state_after: b : ℂ
hb : 0 < b.re
full_integral :
  ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) ∂volume = (↑π / b) ^ (1 / 2)
this✝ : MeasurableSet (Ioi 0)
this : ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)
t1 :
  Tendsto (fun i => ∫ (x : ℝ) in 0 ..id i, cexp (-b * ↑x ^ 2)) atTop
    (𝓝 (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume))
t2 : Tendsto (fun c => ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2)) atTop (𝓝 (∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2)))
⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)
tactic: have t2 :
    Tendsto (fun c : ℝ => ∫ x : ℝ in (0 : ℝ)..c, cexp (-b * (x : ℂ) ^ 2)) atTop
      (𝓝 (∫ x : ℝ in Iic 0, cexp (-b * (x : ℂ) ^ 2))) := by
    simp_rw [this]
    refine intervalIntegral_tendsto_integral_Iic _ ?_ tendsto_neg_atTop_atBot
    apply (integrable_cexp_neg_mul_sq hb).integrableOn
state_before: b : ℂ
hb : 0 < b.re
full_integral :
  ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) ∂volume = (↑π / b) ^ (1 / 2)
this✝ : MeasurableSet (Ioi 0)
this : ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)
t1 :
  Tendsto (fun i => ∫ (x : ℝ) in 0 ..id i, cexp (-b * ↑x ^ 2)) atTop
    (𝓝 (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) ∂volume))
t2 : Tendsto (fun c => ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2)) atTop (𝓝 (∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2)))
⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)
state_after: no goals
tactic: exact tendsto_nhds_unique t2 t1