[GOAL]
b : ℝ
hb : 0 < b
⊢ (fun x => rexp (-b * x ^ 2)) =o[atTop] fun x => rexp (-x)
[PROOFSTEP]
have A : (fun x : ℝ => -x - -b * x ^ 2) = fun x => x * (b * x + -1) := by ext x; ring
[GOAL]
b : ℝ
hb : 0 < b
⊢ (fun x => -x - -b * x ^ 2) = fun x => x * (b * x + -1)
[PROOFSTEP]
ext x
[GOAL]
case h
b : ℝ
hb : 0 < b
x : ℝ
⊢ -x - -b * x ^ 2 = x * (b * x + -1)
[PROOFSTEP]
ring
[GOAL]
b : ℝ
hb : 0 < b
A : (fun x => -x - -b * x ^ 2) = fun x => x * (b * x + -1)
⊢ (fun x => rexp (-b * x ^ 2)) =o[atTop] fun x => rexp (-x)
[PROOFSTEP]
rw [isLittleO_exp_comp_exp_comp, A]
[GOAL]
b : ℝ
hb : 0 < b
A : (fun x => -x - -b * x ^ 2) = fun x => x * (b * x + -1)
⊢ Tendsto (fun x => x * (b * x + -1)) atTop atTop
[PROOFSTEP]
apply Tendsto.atTop_mul_atTop tendsto_id
[GOAL]
b : ℝ
hb : 0 < b
A : (fun x => -x - -b * x ^ 2) = fun x => x * (b * x + -1)
⊢ Tendsto (fun x => b * x + -1) atTop atTop
[PROOFSTEP]
exact tendsto_atTop_add_const_right atTop (-1 : ℝ) (Tendsto.const_mul_atTop hb tendsto_id)
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
⊢ (fun x => x ^ s * rexp (-b * x ^ 2)) =o[atTop] fun x => rexp (-(1 / 2) * x)
[PROOFSTEP]
apply ((isBigO_refl (fun x : ℝ => x ^ s) atTop).mul_isLittleO (exp_neg_mul_sq_isLittleO_exp_neg hb)).trans
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
⊢ (fun x => x ^ s * rexp (-x)) =o[atTop] fun x => rexp (-(1 / 2) * x)
[PROOFSTEP]
simpa only [mul_comm] using Gamma_integrand_isLittleO s
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioi 0)
[PROOFSTEP]
rw [← Ioc_union_Ioi_eq_Ioi (zero_le_one : (0 : ℝ) ≤ 1), integrableOn_union]
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioc 0 1) ∧
    IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioi 1)
[PROOFSTEP]
constructor
[GOAL]
case left
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioc 0 1)
[PROOFSTEP]
rw [← integrableOn_Icc_iff_integrableOn_Ioc]
[GOAL]
case left
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Icc 0 1)
[PROOFSTEP]
refine' IntegrableOn.mul_continuousOn _ _ isCompact_Icc
[GOAL]
case left.refine'_1
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ IntegrableOn (fun x => x ^ s) (Icc 0 1)
[PROOFSTEP]
refine' (intervalIntegrable_iff_integrable_Icc_of_le zero_le_one).mp _
[GOAL]
case left.refine'_1
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ IntervalIntegrable (fun x => x ^ s) volume 0 1
[PROOFSTEP]
exact intervalIntegral.intervalIntegrable_rpow' hs
[GOAL]
case left.refine'_2
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ ContinuousOn (fun x => rexp (-b * x ^ 2)) (Icc 0 1)
[PROOFSTEP]
exact (continuous_exp.comp (continuous_const.mul (continuous_pow 2))).continuousOn
[GOAL]
case right
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioi 1)
[PROOFSTEP]
have B : (0 : ℝ) < 1 / 2 := by norm_num
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ 0 < 1 / 2
[PROOFSTEP]
norm_num
[GOAL]
case right
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
B : 0 < 1 / 2
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioi 1)
[PROOFSTEP]
apply integrable_of_isBigO_exp_neg B _ (IsLittleO.isBigO (rpow_mul_exp_neg_mul_sq_isLittleO_exp_neg hb _))
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
B : 0 < 1 / 2
⊢ ContinuousOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ici 1)
[PROOFSTEP]
intro x hx
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
B : 0 < 1 / 2
x : ℝ
hx : x ∈ Ici 1
⊢ ContinuousWithinAt (fun x => x ^ s * rexp (-b * x ^ 2)) (Ici 1) x
[PROOFSTEP]
have N : x ≠ 0 := by refine' (zero_lt_one.trans_le _).ne'; exact hx
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
B : 0 < 1 / 2
x : ℝ
hx : x ∈ Ici 1
⊢ x ≠ 0
[PROOFSTEP]
refine' (zero_lt_one.trans_le _).ne'
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
B : 0 < 1 / 2
x : ℝ
hx : x ∈ Ici 1
⊢ 1 ≤ x
[PROOFSTEP]
exact hx
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
B : 0 < 1 / 2
x : ℝ
hx : x ∈ Ici 1
N : x ≠ 0
⊢ ContinuousWithinAt (fun x => x ^ s * rexp (-b * x ^ 2)) (Ici 1) x
[PROOFSTEP]
apply ((continuousAt_rpow_const _ _ (Or.inl N)).mul _).continuousWithinAt
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
B : 0 < 1 / 2
x : ℝ
hx : x ∈ Ici 1
N : x ≠ 0
⊢ ContinuousAt (fun x => rexp (-b * x ^ 2)) x
[PROOFSTEP]
exact (continuous_exp.comp (continuous_const.mul (continuous_pow 2))).continuousAt
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ Integrable fun x => x ^ s * rexp (-b * x ^ 2)
[PROOFSTEP]
rw [← integrableOn_univ, ← @Iio_union_Ici _ _ (0 : ℝ), integrableOn_union, integrableOn_Ici_iff_integrableOn_Ioi]
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Iio 0) ∧ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioi 0)
[PROOFSTEP]
refine' ⟨_, integrableOn_rpow_mul_exp_neg_mul_sq hb hs⟩
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Iio 0)
[PROOFSTEP]
rw [←
  (Measure.measurePreserving_neg (volume : Measure ℝ)).integrableOn_comp_preimage
    (Homeomorph.neg ℝ).toMeasurableEquiv.measurableEmbedding]
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ IntegrableOn ((fun x => x ^ s * rexp (-b * x ^ 2)) ∘ Neg.neg) (Neg.neg ⁻¹' Iio 0)
[PROOFSTEP]
simp only [Function.comp, neg_sq, neg_preimage, preimage_neg_Iio, neg_neg, neg_zero]
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ IntegrableOn (fun x => (-x) ^ s * rexp (-b * x ^ 2)) (Ioi 0)
[PROOFSTEP]
apply Integrable.mono' (integrableOn_rpow_mul_exp_neg_mul_sq hb hs)
[GOAL]
case hf
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ AEStronglyMeasurable (fun x => (-x) ^ s * rexp (-b * x ^ 2)) (Measure.restrict volume (Ioi 0))
[PROOFSTEP]
apply Measurable.aestronglyMeasurable
[GOAL]
case hf.hf
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ Measurable fun x => (-x) ^ s * rexp (-b * x ^ 2)
[PROOFSTEP]
exact (measurable_id'.neg.pow measurable_const).mul ((measurable_id'.pow measurable_const).const_mul (-b)).exp
[GOAL]
case h
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
⊢ ∀ᵐ (a : ℝ) ∂Measure.restrict volume (Ioi 0), ‖(-a) ^ s * rexp (-b * a ^ 2)‖ ≤ a ^ s * rexp (-b * a ^ 2)
[PROOFSTEP]
have : MeasurableSet (Ioi (0 : ℝ)) := measurableSet_Ioi
[GOAL]
case h
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
this : MeasurableSet (Ioi 0)
⊢ ∀ᵐ (a : ℝ) ∂Measure.restrict volume (Ioi 0), ‖(-a) ^ s * rexp (-b * a ^ 2)‖ ≤ a ^ s * rexp (-b * a ^ 2)
[PROOFSTEP]
filter_upwards [ae_restrict_mem this] with x hx
[GOAL]
case h
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
this : MeasurableSet (Ioi 0)
x : ℝ
hx : x ∈ Ioi 0
⊢ ‖(-x) ^ s * rexp (-b * x ^ 2)‖ ≤ x ^ s * rexp (-b * x ^ 2)
[PROOFSTEP]
have h'x : 0 ≤ x := le_of_lt hx
[GOAL]
case h
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
this : MeasurableSet (Ioi 0)
x : ℝ
hx : x ∈ Ioi 0
h'x : 0 ≤ x
⊢ ‖(-x) ^ s * rexp (-b * x ^ 2)‖ ≤ x ^ s * rexp (-b * x ^ 2)
[PROOFSTEP]
rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (exp_pos _).le]
[GOAL]
case h
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
this : MeasurableSet (Ioi 0)
x : ℝ
hx : x ∈ Ioi 0
h'x : 0 ≤ x
⊢ |(-x) ^ s| * rexp (-b * x ^ 2) ≤ x ^ s * rexp (-b * x ^ 2)
[PROOFSTEP]
apply mul_le_mul_of_nonneg_right _ (exp_pos _).le
[GOAL]
b : ℝ
hb : 0 < b
s : ℝ
hs : -1 < s
this : MeasurableSet (Ioi 0)
x : ℝ
hx : x ∈ Ioi 0
h'x : 0 ≤ x
⊢ |(-x) ^ s| ≤ x ^ s
[PROOFSTEP]
simpa [abs_of_nonneg h'x] using abs_rpow_le_abs_rpow (-x) s
[GOAL]
b : ℝ
hb : 0 < b
⊢ Integrable fun x => rexp (-b * x ^ 2)
[PROOFSTEP]
simpa using integrable_rpow_mul_exp_neg_mul_sq hb (by norm_num : (-1 : ℝ) < 0)
[GOAL]
b : ℝ
hb : 0 < b
⊢ -1 < 0
[PROOFSTEP]
norm_num
[GOAL]
b : ℝ
⊢ IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0) ↔ 0 < b
[PROOFSTEP]
refine' ⟨fun h => _, fun h => (integrable_exp_neg_mul_sq h).integrableOn⟩
[GOAL]
b : ℝ
h : IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0)
⊢ 0 < b
[PROOFSTEP]
by_contra' hb
[GOAL]
b : ℝ
h : IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0)
hb : b ≤ 0
⊢ False
[PROOFSTEP]
have : ∫⁻ _ : ℝ in Ioi 0, 1 ≤ ∫⁻ x : ℝ in Ioi 0, ‖exp (-b * x ^ 2)‖₊ :=
  by
  apply lintegral_mono (fun x ↦ _)
  simp only [neg_mul, ENNReal.one_le_coe_iff, ← toNNReal_one, toNNReal_le_iff_le_coe,
    Real.norm_of_nonneg (exp_pos _).le, coe_nnnorm, one_le_exp_iff, Right.nonneg_neg_iff]
  exact fun x ↦ mul_nonpos_of_nonpos_of_nonneg hb (sq_nonneg x)
[GOAL]
b : ℝ
h : IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0)
hb : b ≤ 0
⊢ ∫⁻ (x : ℝ) in Ioi 0, 1 ≤ ∫⁻ (x : ℝ) in Ioi 0, ↑‖rexp (-b * x ^ 2)‖₊
[PROOFSTEP]
apply lintegral_mono (fun x ↦ _)
[GOAL]
b : ℝ
h : IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0)
hb : b ≤ 0
⊢ ∀ (x : ℝ), 1 ≤ ↑‖rexp (-b * x ^ 2)‖₊
[PROOFSTEP]
simp only [neg_mul, ENNReal.one_le_coe_iff, ← toNNReal_one, toNNReal_le_iff_le_coe, Real.norm_of_nonneg (exp_pos _).le,
  coe_nnnorm, one_le_exp_iff, Right.nonneg_neg_iff]
[GOAL]
b : ℝ
h : IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0)
hb : b ≤ 0
⊢ ∀ (x : ℝ), b * x ^ 2 ≤ 0
[PROOFSTEP]
exact fun x ↦ mul_nonpos_of_nonpos_of_nonneg hb (sq_nonneg x)
[GOAL]
b : ℝ
h : IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0)
hb : b ≤ 0
this : ∫⁻ (x : ℝ) in Ioi 0, 1 ≤ ∫⁻ (x : ℝ) in Ioi 0, ↑‖rexp (-b * x ^ 2)‖₊
⊢ False
[PROOFSTEP]
simpa using this.trans_lt h.2
[GOAL]
b : ℝ
hb : 0 < b
⊢ Integrable fun x => x * rexp (-b * x ^ 2)
[PROOFSTEP]
simpa using integrable_rpow_mul_exp_neg_mul_sq hb (by norm_num : (-1 : ℝ) < 1)
[GOAL]
b : ℝ
hb : 0 < b
⊢ -1 < 1
[PROOFSTEP]
norm_num
[GOAL]
b : ℂ
x : ℝ
⊢ ‖cexp (-b * ↑x ^ 2)‖ = rexp (-b.re * x ^ 2)
[PROOFSTEP]
rw [Complex.norm_eq_abs, Complex.abs_exp, ← ofReal_pow, mul_comm (-b) _, ofReal_mul_re, neg_re, mul_comm]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ Integrable fun x => cexp (-b * ↑x ^ 2)
[PROOFSTEP]
refine' ⟨(Complex.continuous_exp.comp (continuous_const.mul (continuous_ofReal.pow 2))).aestronglyMeasurable, _⟩
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ HasFiniteIntegral fun x => cexp (-b * ↑x ^ 2)
[PROOFSTEP]
rw [← hasFiniteIntegral_norm_iff]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ HasFiniteIntegral fun a => ‖cexp (-b * ↑a ^ 2)‖
[PROOFSTEP]
simp_rw [norm_cexp_neg_mul_sq]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ HasFiniteIntegral fun a => rexp (-b.re * a ^ 2)
[PROOFSTEP]
exact (integrable_exp_neg_mul_sq hb).2
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ Integrable fun x => ↑x * cexp (-b * ↑x ^ 2)
[PROOFSTEP]
refine' ⟨(continuous_ofReal.mul (Complex.continuous_exp.comp _)).aestronglyMeasurable, _⟩
[GOAL]
case refine'_1
b : ℂ
hb : 0 < b.re
⊢ Continuous fun x => -b * ↑x ^ 2
[PROOFSTEP]
exact continuous_const.mul (continuous_ofReal.pow 2)
[GOAL]
case refine'_2
b : ℂ
hb : 0 < b.re
⊢ HasFiniteIntegral fun x => ↑x * cexp (-b * ↑x ^ 2)
[PROOFSTEP]
have := (integrable_mul_exp_neg_mul_sq hb).hasFiniteIntegral
[GOAL]
case refine'_2
b : ℂ
hb : 0 < b.re
this : HasFiniteIntegral fun x => x * rexp (-b.re * x ^ 2)
⊢ HasFiniteIntegral fun x => ↑x * cexp (-b * ↑x ^ 2)
[PROOFSTEP]
rw [← hasFiniteIntegral_norm_iff] at this ⊢
[GOAL]
case refine'_2
b : ℂ
hb : 0 < b.re
this : HasFiniteIntegral fun a => ‖a * rexp (-b.re * a ^ 2)‖
⊢ HasFiniteIntegral fun a => ‖↑a * cexp (-b * ↑a ^ 2)‖
[PROOFSTEP]
convert this
[GOAL]
case h.e'_5.h
b : ℂ
hb : 0 < b.re
this : HasFiniteIntegral fun a => ‖a * rexp (-b.re * a ^ 2)‖
x✝ : ℝ
⊢ ‖↑x✝ * cexp (-b * ↑x✝ ^ 2)‖ = ‖x✝ * rexp (-b.re * x✝ ^ 2)‖
[PROOFSTEP]
rw [norm_mul, norm_mul, norm_cexp_neg_mul_sq b, Complex.norm_eq_abs, abs_ofReal, Real.norm_eq_abs,
  norm_of_nonneg (exp_pos _).le]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ ∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2) = (2 * b)⁻¹
[PROOFSTEP]
have hb' : b ≠ 0 := by contrapose! hb; rw [hb, zero_re]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ b ≠ 0
[PROOFSTEP]
contrapose! hb
[GOAL]
b : ℂ
hb : b = 0
⊢ b.re ≤ 0
[PROOFSTEP]
rw [hb, zero_re]
[GOAL]
b : ℂ
hb : 0 < b.re
hb' : b ≠ 0
⊢ ∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2) = (2 * b)⁻¹
[PROOFSTEP]
have A : ∀ x : ℂ, HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x :=
  by
  intro x
  convert ((hasDerivAt_pow 2 x).const_mul (-b)).cexp.const_mul (-(2 * b)⁻¹) using 1
  field_simp [hb']
  ring
[GOAL]
b : ℂ
hb : 0 < b.re
hb' : b ≠ 0
⊢ ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x
[PROOFSTEP]
intro x
[GOAL]
b : ℂ
hb : 0 < b.re
hb' : b ≠ 0
x : ℂ
⊢ HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x
[PROOFSTEP]
convert ((hasDerivAt_pow 2 x).const_mul (-b)).cexp.const_mul (-(2 * b)⁻¹) using 1
[GOAL]
case h.e'_7
b : ℂ
hb : 0 < b.re
hb' : b ≠ 0
x : ℂ
⊢ x * cexp (-b * x ^ 2) = -(2 * b)⁻¹ * (cexp (-b * x ^ 2) * (-b * (↑2 * x ^ (2 - 1))))
[PROOFSTEP]
field_simp [hb']
[GOAL]
case h.e'_7
b : ℂ
hb : 0 < b.re
hb' : b ≠ 0
x : ℂ
⊢ x * cexp (-(b * x ^ 2)) * (2 * b) = cexp (-(b * x ^ 2)) * (b * (2 * x))
[PROOFSTEP]
ring
[GOAL]
b : ℂ
hb : 0 < b.re
hb' : b ≠ 0
A : ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x
⊢ ∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2) = (2 * b)⁻¹
[PROOFSTEP]
have B : Tendsto (fun y : ℝ ↦ -(2 * b)⁻¹ * cexp (-b * (y : ℂ) ^ 2)) atTop (𝓝 (-(2 * b)⁻¹ * 0)) :=
  by
  refine' Tendsto.const_mul _ (tendsto_zero_iff_norm_tendsto_zero.mpr _)
  simp_rw [norm_cexp_neg_mul_sq b]
  exact tendsto_exp_atBot.comp (Tendsto.neg_const_mul_atTop (neg_lt_zero.2 hb) (tendsto_pow_atTop two_ne_zero))
[GOAL]
b : ℂ
hb : 0 < b.re
hb' : b ≠ 0
A : ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x
⊢ Tendsto (fun y => -(2 * b)⁻¹ * cexp (-b * ↑y ^ 2)) atTop (𝓝 (-(2 * b)⁻¹ * 0))
[PROOFSTEP]
refine' Tendsto.const_mul _ (tendsto_zero_iff_norm_tendsto_zero.mpr _)
[GOAL]
b : ℂ
hb : 0 < b.re
hb' : b ≠ 0
A : ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x
⊢ Tendsto (fun e => ‖cexp (-b * ↑e ^ 2)‖) atTop (𝓝 0)
[PROOFSTEP]
simp_rw [norm_cexp_neg_mul_sq b]
[GOAL]
b : ℂ
hb : 0 < b.re
hb' : b ≠ 0
A : ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x
⊢ Tendsto (fun e => rexp (-b.re * e ^ 2)) atTop (𝓝 0)
[PROOFSTEP]
exact tendsto_exp_atBot.comp (Tendsto.neg_const_mul_atTop (neg_lt_zero.2 hb) (tendsto_pow_atTop two_ne_zero))
[GOAL]
b : ℂ
hb : 0 < b.re
hb' : b ≠ 0
A : ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x
B : Tendsto (fun y => -(2 * b)⁻¹ * cexp (-b * ↑y ^ 2)) atTop (𝓝 (-(2 * b)⁻¹ * 0))
⊢ ∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2) = (2 * b)⁻¹
[PROOFSTEP]
convert
  integral_Ioi_of_hasDerivAt_of_tendsto' (fun x _ => (A ↑x).comp_ofReal)
    (integrable_mul_cexp_neg_mul_sq hb).integrableOn B using
  1
[GOAL]
case h.e'_3
b : ℂ
hb : 0 < b.re
hb' : b ≠ 0
A : ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x
B : Tendsto (fun y => -(2 * b)⁻¹ * cexp (-b * ↑y ^ 2)) atTop (𝓝 (-(2 * b)⁻¹ * 0))
⊢ (2 * b)⁻¹ = -(2 * b)⁻¹ * 0 - -(2 * b)⁻¹ * cexp (-b * ↑0 ^ 2)
[PROOFSTEP]
simp only [mul_zero, ofReal_zero, zero_pow', Ne.def, bit0_eq_zero, Nat.one_ne_zero, not_false_iff, Complex.exp_zero,
  mul_one, sub_neg_eq_add, zero_add]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ (∫ (x : ℝ), cexp (-b * ↑x ^ 2)) ^ 2 = ↑π / b
[PROOFSTEP]
calc
  (∫ x : ℝ, cexp (-b * (x : ℂ) ^ 2)) ^ 2 = ∫ p : ℝ × ℝ, cexp (-b * (p.1 : ℂ) ^ 2) * cexp (-b * (p.2 : ℂ) ^ 2) := by
    rw [pow_two, ← integral_prod_mul]; rfl
  _ = ∫ p : ℝ × ℝ, cexp (-b * ((p.1 : ℂ) ^ 2 + (p.2 : ℂ) ^ 2)) :=
    by
    congr
    ext1 p
    rw [← Complex.exp_add, mul_add]
  _ = ∫ p in polarCoord.target, p.1 • cexp (-b * ((p.1 * Complex.cos p.2) ^ 2 + (p.1 * Complex.sin p.2) ^ 2)) :=
    by
    rw [← integral_comp_polarCoord_symm]
    simp only [polarCoord_symm_apply, ofReal_mul, ofReal_cos, ofReal_sin]
  _ = (∫ r in Ioi (0 : ℝ), r * cexp (-b * (r : ℂ) ^ 2)) * ∫ θ in Ioo (-π) π, 1 :=
    by
    rw [← set_integral_prod_mul]
    congr with p : 1
    rw [mul_one]
    congr
    conv_rhs => rw [← one_mul ((p.1 : ℂ) ^ 2), ← sin_sq_add_cos_sq (p.2 : ℂ)]
    ring
  _ = ↑π / b := by
    have : 0 ≤ π + π := by linarith [Real.pi_pos]
    simp only [integral_const, Measure.restrict_apply', measurableSet_Ioo, univ_inter, volume_Ioo, sub_neg_eq_add,
      ENNReal.toReal_ofReal, this]
    rw [← two_mul, real_smul, mul_one, ofReal_mul, ofReal_ofNat, integral_mul_cexp_neg_mul_sq hb]
    field_simp [(by contrapose! hb; rw [hb, zero_re] : b ≠ 0)]
    ring
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ (∫ (x : ℝ), cexp (-b * ↑x ^ 2)) ^ 2 = ∫ (p : ℝ × ℝ), cexp (-b * ↑p.fst ^ 2) * cexp (-b * ↑p.snd ^ 2)
[PROOFSTEP]
rw [pow_two, ← integral_prod_mul]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ ∫ (z : ℝ × ℝ), cexp (-b * ↑z.fst ^ 2) * cexp (-b * ↑z.snd ^ 2) ∂Measure.prod volume volume =
    ∫ (p : ℝ × ℝ), cexp (-b * ↑p.fst ^ 2) * cexp (-b * ↑p.snd ^ 2)
[PROOFSTEP]
rfl
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ ∫ (p : ℝ × ℝ), cexp (-b * ↑p.fst ^ 2) * cexp (-b * ↑p.snd ^ 2) = ∫ (p : ℝ × ℝ), cexp (-b * (↑p.fst ^ 2 + ↑p.snd ^ 2))
[PROOFSTEP]
congr
[GOAL]
case e_f
b : ℂ
hb : 0 < b.re
⊢ (fun p => cexp (-b * ↑p.fst ^ 2) * cexp (-b * ↑p.snd ^ 2)) = fun p => cexp (-b * (↑p.fst ^ 2 + ↑p.snd ^ 2))
[PROOFSTEP]
ext1 p
[GOAL]
case e_f.h
b : ℂ
hb : 0 < b.re
p : ℝ × ℝ
⊢ cexp (-b * ↑p.fst ^ 2) * cexp (-b * ↑p.snd ^ 2) = cexp (-b * (↑p.fst ^ 2 + ↑p.snd ^ 2))
[PROOFSTEP]
rw [← Complex.exp_add, mul_add]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ ∫ (p : ℝ × ℝ), cexp (-b * (↑p.fst ^ 2 + ↑p.snd ^ 2)) =
    ∫ (p : ℝ × ℝ) in polarCoord.target,
      p.fst • cexp (-b * ((↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2))
[PROOFSTEP]
rw [← integral_comp_polarCoord_symm]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ ∫ (p : ℝ × ℝ) in polarCoord.target,
      p.fst •
        cexp
          (-b * (↑(↑(LocalHomeomorph.symm polarCoord) p).fst ^ 2 + ↑(↑(LocalHomeomorph.symm polarCoord) p).snd ^ 2)) =
    ∫ (p : ℝ × ℝ) in polarCoord.target,
      p.fst • cexp (-b * ((↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2))
[PROOFSTEP]
simp only [polarCoord_symm_apply, ofReal_mul, ofReal_cos, ofReal_sin]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ ∫ (p : ℝ × ℝ) in polarCoord.target,
      p.fst • cexp (-b * ((↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2)) =
    (∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2)) * ∫ (θ : ℝ) in Ioo (-π) π, 1
[PROOFSTEP]
rw [← set_integral_prod_mul]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ ∫ (p : ℝ × ℝ) in polarCoord.target,
      p.fst • cexp (-b * ((↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2)) =
    ∫ (z : ℝ × ℝ) in Ioi 0 ×ˢ Ioo (-π) π, ↑z.fst * cexp (-b * ↑z.fst ^ 2) * 1 ∂Measure.prod volume volume
[PROOFSTEP]
congr with p : 1
[GOAL]
case e_f.h
b : ℂ
hb : 0 < b.re
p : ℝ × ℝ
⊢ p.fst • cexp (-b * ((↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2)) =
    ↑p.fst * cexp (-b * ↑p.fst ^ 2) * 1
[PROOFSTEP]
rw [mul_one]
[GOAL]
case e_f.h
b : ℂ
hb : 0 < b.re
p : ℝ × ℝ
⊢ p.fst • cexp (-b * ((↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2)) =
    ↑p.fst * cexp (-b * ↑p.fst ^ 2)
[PROOFSTEP]
congr
[GOAL]
case e_f.h.e_a.e_z.e_a
b : ℂ
hb : 0 < b.re
p : ℝ × ℝ
⊢ (↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2 = ↑p.fst ^ 2
[PROOFSTEP]
conv_rhs => rw [← one_mul ((p.1 : ℂ) ^ 2), ← sin_sq_add_cos_sq (p.2 : ℂ)]
[GOAL]
b : ℂ
hb : 0 < b.re
p : ℝ × ℝ
| ↑p.fst ^ 2
[PROOFSTEP]
rw [← one_mul ((p.1 : ℂ) ^ 2), ← sin_sq_add_cos_sq (p.2 : ℂ)]
[GOAL]
b : ℂ
hb : 0 < b.re
p : ℝ × ℝ
| ↑p.fst ^ 2
[PROOFSTEP]
rw [← one_mul ((p.1 : ℂ) ^ 2), ← sin_sq_add_cos_sq (p.2 : ℂ)]
[GOAL]
b : ℂ
hb : 0 < b.re
p : ℝ × ℝ
| ↑p.fst ^ 2
[PROOFSTEP]
rw [← one_mul ((p.1 : ℂ) ^ 2), ← sin_sq_add_cos_sq (p.2 : ℂ)]
[GOAL]
case e_f.h.e_a.e_z.e_a
b : ℂ
hb : 0 < b.re
p : ℝ × ℝ
⊢ (↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2 =
    (Complex.sin ↑p.snd ^ 2 + Complex.cos ↑p.snd ^ 2) * ↑p.fst ^ 2
[PROOFSTEP]
ring
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ (∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2)) * ∫ (θ : ℝ) in Ioo (-π) π, 1 = ↑π / b
[PROOFSTEP]
have : 0 ≤ π + π := by linarith [Real.pi_pos]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ 0 ≤ π + π
[PROOFSTEP]
linarith [Real.pi_pos]
[GOAL]
b : ℂ
hb : 0 < b.re
this : 0 ≤ π + π
⊢ (∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2)) * ∫ (θ : ℝ) in Ioo (-π) π, 1 = ↑π / b
[PROOFSTEP]
simp only [integral_const, Measure.restrict_apply', measurableSet_Ioo, univ_inter, volume_Ioo, sub_neg_eq_add,
  ENNReal.toReal_ofReal, this]
[GOAL]
b : ℂ
hb : 0 < b.re
this : 0 ≤ π + π
⊢ (∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2)) * (π + π) • 1 = ↑π / b
[PROOFSTEP]
rw [← two_mul, real_smul, mul_one, ofReal_mul, ofReal_ofNat, integral_mul_cexp_neg_mul_sq hb]
[GOAL]
b : ℂ
hb : 0 < b.re
this : 0 ≤ π + π
⊢ (2 * b)⁻¹ * (2 * ↑π) = ↑π / b
[PROOFSTEP]
field_simp [(by contrapose! hb; rw [hb, zero_re] : b ≠ 0)]
[GOAL]
b : ℂ
hb : 0 < b.re
this : 0 ≤ π + π
⊢ b ≠ 0
[PROOFSTEP]
contrapose! hb
[GOAL]
b : ℂ
this : 0 ≤ π + π
hb : b = 0
⊢ b.re ≤ 0
[PROOFSTEP]
rw [hb, zero_re]
[GOAL]
b : ℂ
hb : 0 < b.re
this : 0 ≤ π + π
⊢ 2 * ↑π * b = ↑π * (2 * b)
[PROOFSTEP]
ring
[GOAL]
b : ℝ
⊢ ∫ (x : ℝ), rexp (-b * x ^ 2) = sqrt (π / b)
[PROOFSTEP]
rcases le_or_lt b 0 with (hb | hb)
[GOAL]
case inl
b : ℝ
hb : b ≤ 0
⊢ ∫ (x : ℝ), rexp (-b * x ^ 2) = sqrt (π / b)
[PROOFSTEP]
rw [integral_undef, sqrt_eq_zero_of_nonpos]
[GOAL]
case inl
b : ℝ
hb : b ≤ 0
⊢ π / b ≤ 0
[PROOFSTEP]
exact div_nonpos_of_nonneg_of_nonpos pi_pos.le hb
[GOAL]
case inl
b : ℝ
hb : b ≤ 0
⊢ ¬Integrable fun x => rexp (-b * x ^ 2)
[PROOFSTEP]
simpa only [not_lt, integrable_exp_neg_mul_sq_iff] using hb
[GOAL]
case inr
b : ℝ
hb : 0 < b
⊢ ∫ (x : ℝ), rexp (-b * x ^ 2) = sqrt (π / b)
[PROOFSTEP]
refine' (sq_eq_sq _ (sqrt_nonneg _)).1 _
[GOAL]
case inr.refine'_1
b : ℝ
hb : 0 < b
⊢ 0 ≤ ∫ (x : ℝ), rexp (-b * x ^ 2)
[PROOFSTEP]
exact integral_nonneg fun x => (exp_pos _).le
[GOAL]
case inr.refine'_2
b : ℝ
hb : 0 < b
⊢ (∫ (x : ℝ), rexp (-b * x ^ 2)) ^ 2 = sqrt (π / b) ^ 2
[PROOFSTEP]
rw [← ofReal_inj, ofReal_pow, ← coe_algebraMap, IsROrC.algebraMap_eq_ofReal, ← integral_ofReal,
  sq_sqrt (div_pos pi_pos hb).le, ← IsROrC.algebraMap_eq_ofReal, coe_algebraMap, ofReal_div]
[GOAL]
case inr.refine'_2
b : ℝ
hb : 0 < b
⊢ (∫ (a : ℝ), ↑(rexp (-b * a ^ 2))) ^ 2 = ↑π / ↑b
[PROOFSTEP]
convert integral_gaussian_sq_complex (by rwa [ofReal_re] : 0 < (b : ℂ).re) with _ x
[GOAL]
b : ℝ
hb : 0 < b
⊢ 0 < (↑b).re
[PROOFSTEP]
rwa [ofReal_re]
[GOAL]
case h.e'_2.h.e'_5.h.e'_7.h
b : ℝ
hb : 0 < b
x : ℝ
⊢ ↑(rexp (-b * x ^ 2)) = cexp (-↑b * ↑x ^ 2)
[PROOFSTEP]
rw [ofReal_exp, ofReal_mul, ofReal_pow, ofReal_neg]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ ContinuousAt (fun c => ∫ (x : ℝ), cexp (-c * ↑x ^ 2)) b
[PROOFSTEP]
let f : ℂ → ℝ → ℂ := fun (c : ℂ) (x : ℝ) => cexp (-c * (x : ℂ) ^ 2)
[GOAL]
b : ℂ
hb : 0 < b.re
f : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)
⊢ ContinuousAt (fun c => ∫ (x : ℝ), cexp (-c * ↑x ^ 2)) b
[PROOFSTEP]
obtain ⟨d, hd, hd'⟩ := exists_between hb
[GOAL]
case intro.intro
b : ℂ
hb : 0 < b.re
f : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)
d : ℝ
hd : 0 < d
hd' : d < b.re
⊢ ContinuousAt (fun c => ∫ (x : ℝ), cexp (-c * ↑x ^ 2)) b
[PROOFSTEP]
have f_meas : ∀ c : ℂ, AEStronglyMeasurable (f c) volume := fun c =>
  by
  apply Continuous.aestronglyMeasurable
  exact Complex.continuous_exp.comp (continuous_const.mul (continuous_ofReal.pow 2))
[GOAL]
b : ℂ
hb : 0 < b.re
f : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)
d : ℝ
hd : 0 < d
hd' : d < b.re
c : ℂ
⊢ AEStronglyMeasurable (f c) volume
[PROOFSTEP]
apply Continuous.aestronglyMeasurable
[GOAL]
case hf
b : ℂ
hb : 0 < b.re
f : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)
d : ℝ
hd : 0 < d
hd' : d < b.re
c : ℂ
⊢ Continuous (f c)
[PROOFSTEP]
exact Complex.continuous_exp.comp (continuous_const.mul (continuous_ofReal.pow 2))
[GOAL]
case intro.intro
b : ℂ
hb : 0 < b.re
f : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)
d : ℝ
hd : 0 < d
hd' : d < b.re
f_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume
⊢ ContinuousAt (fun c => ∫ (x : ℝ), cexp (-c * ↑x ^ 2)) b
[PROOFSTEP]
have f_cts : ∀ x : ℝ, ContinuousAt (fun c => f c x) b := fun x =>
  (Complex.continuous_exp.comp (continuous_id'.neg.mul continuous_const)).continuousAt
[GOAL]
case intro.intro
b : ℂ
hb : 0 < b.re
f : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)
d : ℝ
hd : 0 < d
hd' : d < b.re
f_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume
f_cts : ∀ (x : ℝ), ContinuousAt (fun c => f c x) b
⊢ ContinuousAt (fun c => ∫ (x : ℝ), cexp (-c * ↑x ^ 2)) b
[PROOFSTEP]
have f_le_bd : ∀ᶠ c : ℂ in 𝓝 b, ∀ᵐ x : ℝ, ‖f c x‖ ≤ exp (-d * x ^ 2) :=
  by
  refine' eventually_of_mem ((continuous_re.isOpen_preimage _ isOpen_Ioi).mem_nhds hd') _
  refine' fun c hc => ae_of_all _ fun x => _
  rw [norm_cexp_neg_mul_sq, exp_le_exp]
  exact mul_le_mul_of_nonneg_right (neg_le_neg (le_of_lt hc)) (sq_nonneg _)
[GOAL]
b : ℂ
hb : 0 < b.re
f : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)
d : ℝ
hd : 0 < d
hd' : d < b.re
f_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume
f_cts : ∀ (x : ℝ), ContinuousAt (fun c => f c x) b
⊢ ∀ᶠ (c : ℂ) in 𝓝 b, ∀ᵐ (x : ℝ), ‖f c x‖ ≤ rexp (-d * x ^ 2)
[PROOFSTEP]
refine' eventually_of_mem ((continuous_re.isOpen_preimage _ isOpen_Ioi).mem_nhds hd') _
[GOAL]
b : ℂ
hb : 0 < b.re
f : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)
d : ℝ
hd : 0 < d
hd' : d < b.re
f_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume
f_cts : ∀ (x : ℝ), ContinuousAt (fun c => f c x) b
⊢ ∀ (x : ℂ), x ∈ re ⁻¹' Ioi d → ∀ᵐ (x_1 : ℝ), ‖f x x_1‖ ≤ rexp (-d * x_1 ^ 2)
[PROOFSTEP]
refine' fun c hc => ae_of_all _ fun x => _
[GOAL]
b : ℂ
hb : 0 < b.re
f : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)
d : ℝ
hd : 0 < d
hd' : d < b.re
f_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume
f_cts : ∀ (x : ℝ), ContinuousAt (fun c => f c x) b
c : ℂ
hc : c ∈ re ⁻¹' Ioi d
x : ℝ
⊢ ‖f c x‖ ≤ rexp (-d * x ^ 2)
[PROOFSTEP]
rw [norm_cexp_neg_mul_sq, exp_le_exp]
[GOAL]
b : ℂ
hb : 0 < b.re
f : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)
d : ℝ
hd : 0 < d
hd' : d < b.re
f_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume
f_cts : ∀ (x : ℝ), ContinuousAt (fun c => f c x) b
c : ℂ
hc : c ∈ re ⁻¹' Ioi d
x : ℝ
⊢ -c.re * x ^ 2 ≤ -d * x ^ 2
[PROOFSTEP]
exact mul_le_mul_of_nonneg_right (neg_le_neg (le_of_lt hc)) (sq_nonneg _)
[GOAL]
case intro.intro
b : ℂ
hb : 0 < b.re
f : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)
d : ℝ
hd : 0 < d
hd' : d < b.re
f_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume
f_cts : ∀ (x : ℝ), ContinuousAt (fun c => f c x) b
f_le_bd : ∀ᶠ (c : ℂ) in 𝓝 b, ∀ᵐ (x : ℝ), ‖f c x‖ ≤ rexp (-d * x ^ 2)
⊢ ContinuousAt (fun c => ∫ (x : ℝ), cexp (-c * ↑x ^ 2)) b
[PROOFSTEP]
exact continuousAt_of_dominated (eventually_of_forall f_meas) f_le_bd (integrable_exp_neg_mul_sq hd) (ae_of_all _ f_cts)
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ ∫ (x : ℝ), cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)
[PROOFSTEP]
have nv : ∀ {b : ℂ}, 0 < re b → b ≠ 0 := by intro b hb; contrapose! hb; rw [hb]; simp
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ ∀ {b : ℂ}, 0 < b.re → b ≠ 0
[PROOFSTEP]
intro b hb
[GOAL]
b✝ : ℂ
hb✝ : 0 < b✝.re
b : ℂ
hb : 0 < b.re
⊢ b ≠ 0
[PROOFSTEP]
contrapose! hb
[GOAL]
b✝ : ℂ
hb✝ : 0 < b✝.re
b : ℂ
hb : b = 0
⊢ b.re ≤ 0
[PROOFSTEP]
rw [hb]
[GOAL]
b✝ : ℂ
hb✝ : 0 < b✝.re
b : ℂ
hb : b = 0
⊢ 0.re ≤ 0
[PROOFSTEP]
simp
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
⊢ ∫ (x : ℝ), cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)
[PROOFSTEP]
apply
  (convex_halfspace_re_gt 0).isPreconnected.eq_of_sq_eq ?_ ?_ (fun c hc => ?_) (fun {c} hc => ?_)
    (by simp : 0 < re (1 : ℂ)) ?_ hb
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
⊢ 0 < 1.re
[PROOFSTEP]
simp
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
⊢ ContinuousOn (fun {b} => ∫ (x : ℝ), cexp (-b * ↑x ^ 2)) {c | 0 < c.re}
[PROOFSTEP]
exact ContinuousAt.continuousOn continuousAt_gaussian_integral
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
⊢ ContinuousOn (fun {b} => (↑π / b) ^ (1 / 2)) {c | 0 < c.re}
[PROOFSTEP]
refine'
  ContinuousAt.continuousOn fun b hb =>
    (continuousAt_cpow_const (Or.inl _)).comp (continuousAt_const.div continuousAt_id (nv hb))
[GOAL]
b✝ : ℂ
hb✝ : 0 < b✝.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
b : ℂ
hb : b ∈ {c | 0 < c.re}
⊢ 0 < (↑π / b).re
[PROOFSTEP]
rw [div_re, ofReal_im, ofReal_re, zero_mul, zero_div, add_zero]
[GOAL]
b✝ : ℂ
hb✝ : 0 < b✝.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
b : ℂ
hb : b ∈ {c | 0 < c.re}
⊢ 0 < π * b.re / ↑normSq b
[PROOFSTEP]
exact div_pos (mul_pos pi_pos hb) (normSq_pos.mpr (nv hb))
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
⊢ ∫ (x : ℝ), cexp (-1 * ↑x ^ 2) = (↑π / 1) ^ (1 / 2)
[PROOFSTEP]
have : ∀ x : ℝ, cexp (-(1 : ℂ) * (x : ℂ) ^ 2) = exp (-(1 : ℝ) * x ^ 2) :=
  by
  intro x
  simp only [ofReal_exp, neg_mul, one_mul, ofReal_neg, ofReal_pow]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
⊢ ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
[PROOFSTEP]
intro x
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
x : ℝ
⊢ cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
[PROOFSTEP]
simp only [ofReal_exp, neg_mul, one_mul, ofReal_neg, ofReal_pow]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
⊢ ∫ (x : ℝ), cexp (-1 * ↑x ^ 2) = (↑π / 1) ^ (1 / 2)
[PROOFSTEP]
simp_rw [this, ← coe_algebraMap, IsROrC.algebraMap_eq_ofReal, integral_ofReal, ← IsROrC.algebraMap_eq_ofReal,
  coe_algebraMap]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
⊢ ↑(∫ (a : ℝ), rexp (-1 * a ^ 2)) = (↑π / 1) ^ (1 / 2)
[PROOFSTEP]
conv_rhs =>
  congr
  ·rw [← ofReal_one, ← ofReal_div]
  ·rw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
| (↑π / 1) ^ (1 / 2)
[PROOFSTEP]
  congr
  ·rw [← ofReal_one, ← ofReal_div]
  ·rw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
| (↑π / 1) ^ (1 / 2)
[PROOFSTEP]
  congr
  ·rw [← ofReal_one, ← ofReal_div]
  ·rw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
| (↑π / 1) ^ (1 / 2)
[PROOFSTEP]
congr
[GOAL]
case a
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
| ↑π / 1
case a
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
| 1 / 2
[PROOFSTEP]
·rw [← ofReal_one, ← ofReal_div]
[GOAL]
case a
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
| ↑π / 1
[PROOFSTEP]
rw [← ofReal_one, ← ofReal_div]
[GOAL]
case a
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
| ↑π / 1
[PROOFSTEP]
rw [← ofReal_one, ← ofReal_div]
[GOAL]
case a
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
| ↑π / 1
[PROOFSTEP]
rw [← ofReal_one, ← ofReal_div]
[GOAL]
case a
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
| 1 / 2
[PROOFSTEP]
·rw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]
[GOAL]
case a
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
| 1 / 2
[PROOFSTEP]
rw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]
[GOAL]
case a
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
| 1 / 2
[PROOFSTEP]
rw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]
[GOAL]
case a
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
| 1 / 2
[PROOFSTEP]
rw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
⊢ ↑(∫ (a : ℝ), rexp (-1 * a ^ 2)) = ↑(π / 1) ^ ↑(1 / 2)
[PROOFSTEP]
rw [← ofReal_cpow, ofReal_inj]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
⊢ ∫ (a : ℝ), rexp (-1 * a ^ 2) = (π / 1) ^ (1 / 2)
case hx
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
⊢ 0 ≤ π / 1
[PROOFSTEP]
convert integral_gaussian (1 : ℝ) using 1
[GOAL]
case h.e'_3
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
⊢ (π / 1) ^ (1 / 2) = sqrt (π / 1)
[PROOFSTEP]
rw [sqrt_eq_rpow]
[GOAL]
case hx
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
⊢ 0 ≤ π / 1
[PROOFSTEP]
rw [div_one]
[GOAL]
case hx
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
this : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))
⊢ 0 ≤ π
[PROOFSTEP]
exact pi_pos.le
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
c : ℂ
hc : c ∈ {c | 0 < c.re}
⊢ ((fun {b} => ∫ (x : ℝ), cexp (-b * ↑x ^ 2)) ^ 2) c = ((fun {b} => (↑π / b) ^ (1 / 2)) ^ 2) c
[PROOFSTEP]
dsimp only [Pi.pow_apply]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
c : ℂ
hc : c ∈ {c | 0 < c.re}
⊢ (∫ (x : ℝ), cexp (-c * ↑x ^ 2)) ^ 2 = ((↑π / c) ^ (1 / 2)) ^ 2
[PROOFSTEP]
rw [integral_gaussian_sq_complex hc, sq]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
c : ℂ
hc : c ∈ {c | 0 < c.re}
⊢ ↑π / c = (↑π / c) ^ (1 / 2) * (↑π / c) ^ (1 / 2)
[PROOFSTEP]
conv_lhs => rw [← cpow_one (↑π / c)]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
c : ℂ
hc : c ∈ {c | 0 < c.re}
| ↑π / c
[PROOFSTEP]
rw [← cpow_one (↑π / c)]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
c : ℂ
hc : c ∈ {c | 0 < c.re}
| ↑π / c
[PROOFSTEP]
rw [← cpow_one (↑π / c)]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
c : ℂ
hc : c ∈ {c | 0 < c.re}
| ↑π / c
[PROOFSTEP]
rw [← cpow_one (↑π / c)]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
c : ℂ
hc : c ∈ {c | 0 < c.re}
⊢ (↑π / c) ^ 1 = (↑π / c) ^ (1 / 2) * (↑π / c) ^ (1 / 2)
[PROOFSTEP]
rw [← cpow_add _ _ (div_ne_zero (ofReal_ne_zero.mpr pi_ne_zero) (nv hc))]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
c : ℂ
hc : c ∈ {c | 0 < c.re}
⊢ (↑π / c) ^ 1 = (↑π / c) ^ (1 / 2 + 1 / 2)
[PROOFSTEP]
norm_num
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
c : ℂ
hc : c ∈ {c | 0 < c.re}
⊢ (↑π / c) ^ (1 / 2) ≠ 0
[PROOFSTEP]
rw [Ne.def, cpow_eq_zero_iff, not_and_or]
[GOAL]
b : ℂ
hb : 0 < b.re
nv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0
c : ℂ
hc : c ∈ {c | 0 < c.re}
⊢ ¬↑π / c = 0 ∨ ¬1 / 2 ≠ 0
[PROOFSTEP]
exact Or.inl (div_ne_zero (ofReal_ne_zero.mpr pi_ne_zero) (nv hc))
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2
[PROOFSTEP]
have full_integral := integral_gaussian_complex hb
[GOAL]
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
[PROOFSTEP]
have : MeasurableSet (Ioi (0 : ℝ)) := measurableSet_Ioi
[GOAL]
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
[PROOFSTEP]
rw [← integral_add_compl this (integrable_cexp_neg_mul_sq hb), compl_Ioi] at full_integral
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)
this : MeasurableSet (Ioi 0)
⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2
[PROOFSTEP]
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
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)
this✝ : MeasurableSet (Ioi 0)
this : ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)
⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2
[PROOFSTEP]
rw [this, ← mul_two] at full_integral
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) * 2 = (↑π / b) ^ (1 / 2)
this✝ : MeasurableSet (Ioi 0)
this : ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)
⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2
[PROOFSTEP]
rwa [eq_div_iff]
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) * 2 = (↑π / b) ^ (1 / 2)
this✝ : MeasurableSet (Ioi 0)
this : ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)
⊢ 2 ≠ 0
[PROOFSTEP]
exact two_ne_zero
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)
this : MeasurableSet (Ioi 0)
⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)
[PROOFSTEP]
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
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)
this : MeasurableSet (Ioi 0)
⊢ ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)
[PROOFSTEP]
intro c
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)
this : MeasurableSet (Ioi 0)
c : ℝ
⊢ ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)
[PROOFSTEP]
have := intervalIntegral.integral_comp_sub_left (a := 0) (b := c) (fun x => cexp (-b * (x : ℂ) ^ 2)) 0
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)
this✝ : MeasurableSet (Ioi 0)
c : ℝ
this : ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑(0 - x) ^ 2) = ∫ (x : ℝ) in 0 - c..0 - 0, cexp (-b * ↑x ^ 2)
⊢ ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)
[PROOFSTEP]
simpa [zero_sub, neg_sq, neg_zero] using this
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / 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)
[PROOFSTEP]
have t1 := intervalIntegral_tendsto_integral_Ioi 0 (integrable_cexp_neg_mul_sq hb).integrableOn tendsto_id
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / 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)))
⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)
[PROOFSTEP]
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
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / 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)))
⊢ Tendsto (fun c => ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2)) atTop (𝓝 (∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2)))
[PROOFSTEP]
simp_rw [this]
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / 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)))
⊢ Tendsto (fun c => ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)) atTop (𝓝 (∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2)))
[PROOFSTEP]
refine' intervalIntegral_tendsto_integral_Iic _ _ tendsto_neg_atTop_atBot
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / 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)))
⊢ IntegrableOn (fun x => cexp (-b * ↑x ^ 2)) (Iic 0)
[PROOFSTEP]
apply (integrable_cexp_neg_mul_sq hb).integrableOn
[GOAL]
b : ℂ
hb : 0 < b.re
full_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / 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)))
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)
[PROOFSTEP]
exact tendsto_nhds_unique t2 t1
[GOAL]
b : ℝ
⊢ ∫ (x : ℝ) in Ioi 0, rexp (-b * x ^ 2) = sqrt (π / b) / 2
[PROOFSTEP]
rcases le_or_lt b 0 with (hb | hb)
[GOAL]
case inl
b : ℝ
hb : b ≤ 0
⊢ ∫ (x : ℝ) in Ioi 0, rexp (-b * x ^ 2) = sqrt (π / b) / 2
[PROOFSTEP]
rw [integral_undef, sqrt_eq_zero_of_nonpos, zero_div]
[GOAL]
case inl
b : ℝ
hb : b ≤ 0
⊢ π / b ≤ 0
case inl b : ℝ hb : b ≤ 0 ⊢ ¬Integrable fun x => rexp (-b * x ^ 2)
[PROOFSTEP]
exact div_nonpos_of_nonneg_of_nonpos pi_pos.le hb
[GOAL]
case inl
b : ℝ
hb : b ≤ 0
⊢ ¬Integrable fun x => rexp (-b * x ^ 2)
[PROOFSTEP]
rwa [← IntegrableOn, integrableOn_Ioi_exp_neg_mul_sq_iff, not_lt]
[GOAL]
case inr
b : ℝ
hb : 0 < b
⊢ ∫ (x : ℝ) in Ioi 0, rexp (-b * x ^ 2) = sqrt (π / b) / 2
[PROOFSTEP]
rw [← IsROrC.ofReal_inj (K := ℂ), ← integral_ofReal, ← IsROrC.algebraMap_eq_ofReal, coe_algebraMap]
[GOAL]
case inr
b : ℝ
hb : 0 < b
⊢ ∫ (a : ℝ) in Ioi 0, ↑(rexp (-b * a ^ 2)) = ↑(sqrt (π / b) / 2)
[PROOFSTEP]
convert integral_gaussian_complex_Ioi (by rwa [ofReal_re] : 0 < (b : ℂ).re)
[GOAL]
b : ℝ
hb : 0 < b
⊢ 0 < (↑b).re
[PROOFSTEP]
rwa [ofReal_re]
[GOAL]
case h.e'_2.h.e'_7.h
b : ℝ
hb : 0 < b
x✝ : ℝ
⊢ ↑(rexp (-b * x✝ ^ 2)) = cexp (-↑b * ↑x✝ ^ 2)
[PROOFSTEP]
simp
[GOAL]
case h.e'_3
b : ℝ
hb : 0 < b
⊢ ↑(sqrt (π / b) / 2) = (↑π / ↑b) ^ (1 / 2) / 2
[PROOFSTEP]
rw [sqrt_eq_rpow, ← ofReal_div, ofReal_div, ofReal_cpow]
[GOAL]
case h.e'_3
b : ℝ
hb : 0 < b
⊢ ↑(π / b) ^ ↑(1 / 2) / ↑2 = ↑(π / b) ^ (1 / 2) / 2
case h.e'_3.hx b : ℝ hb : 0 < b ⊢ 0 ≤ π / b
[PROOFSTEP]
norm_num
[GOAL]
case h.e'_3.hx
b : ℝ
hb : 0 < b
⊢ 0 ≤ π / b
[PROOFSTEP]
exact (div_pos pi_pos hb).le
[GOAL]
⊢ Gamma (1 / 2) = sqrt π
[PROOFSTEP]
rw [Gamma_eq_integral one_half_pos, ← integral_comp_rpow_Ioi_of_pos zero_lt_two]
[GOAL]
⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = sqrt π
[PROOFSTEP]
convert congr_arg (fun x : ℝ => 2 * x) (integral_gaussian_Ioi 1) using 1
[GOAL]
case h.e'_2
⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) =
    2 * ∫ (x : ℝ) in Ioi 0, rexp (-1 * x ^ 2)
[PROOFSTEP]
rw [← integral_mul_left]
[GOAL]
case h.e'_2
⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) =
    ∫ (a : ℝ) in Ioi 0, 2 * rexp (-1 * a ^ 2)
[PROOFSTEP]
refine' set_integral_congr measurableSet_Ioi fun x hx => _
[GOAL]
case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
⊢ (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = 2 * rexp (-1 * x ^ 2)
[PROOFSTEP]
dsimp only
[GOAL]
case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
⊢ (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = 2 * rexp (-1 * x ^ 2)
[PROOFSTEP]
have : (x ^ (2 : ℝ)) ^ (1 / (2 : ℝ) - 1) = x⁻¹ :=
  by
  rw [← rpow_mul (le_of_lt hx)]
  norm_num
  rw [rpow_neg (le_of_lt hx), rpow_one]
[GOAL]
x : ℝ
hx : x ∈ Ioi 0
⊢ (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
[PROOFSTEP]
rw [← rpow_mul (le_of_lt hx)]
[GOAL]
x : ℝ
hx : x ∈ Ioi 0
⊢ x ^ (2 * (1 / 2 - 1)) = x⁻¹
[PROOFSTEP]
norm_num
[GOAL]
x : ℝ
hx : x ∈ Ioi 0
⊢ x ^ (-1) = x⁻¹
[PROOFSTEP]
rw [rpow_neg (le_of_lt hx), rpow_one]
[GOAL]
case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
this : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
⊢ (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = 2 * rexp (-1 * x ^ 2)
[PROOFSTEP]
rw [smul_eq_mul, this]
[GOAL]
case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
this : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
⊢ 2 * x ^ (2 - 1) * (rexp (-x ^ 2) * x⁻¹) = 2 * rexp (-1 * x ^ 2)
[PROOFSTEP]
field_simp [(ne_of_lt (show 0 < x from hx)).symm]
[GOAL]
case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
this : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
⊢ 2 * x ^ (2 - 1) * rexp (-x ^ 2) = 2 * rexp (-x ^ 2) * x
[PROOFSTEP]
norm_num
[GOAL]
case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
this : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
⊢ 2 * x * rexp (-x ^ 2) = 2 * rexp (-x ^ 2) * x
[PROOFSTEP]
ring
[GOAL]
case h.e'_3
⊢ sqrt π = 2 * (sqrt (π / 1) / 2)
[PROOFSTEP]
rw [div_one, ← mul_div_assoc, mul_comm, mul_div_cancel _ (two_ne_zero' ℝ)]
[GOAL]
⊢ Gamma (1 / 2) = ↑π ^ (1 / 2)
[PROOFSTEP]
convert congr_arg ((↑) : ℝ → ℂ) Real.Gamma_one_half_eq
[GOAL]
case h.e'_2
⊢ Gamma (1 / 2) = ↑(Real.Gamma (1 / 2))
[PROOFSTEP]
simpa only [one_div, ofReal_inv, ofReal_ofNat] using Gamma_ofReal (1 / 2)
[GOAL]
case h.e'_3
⊢ ↑π ^ (1 / 2) = ↑(sqrt π)
[PROOFSTEP]
rw [sqrt_eq_rpow, ofReal_cpow pi_pos.le, ofReal_div, ofReal_ofNat, ofReal_one]
[GOAL]
b✝ b : ℂ
c T : ℝ
⊢ ‖cexp (-b * (↑T + ↑c * I) ^ 2)‖ = rexp (-(b.re * T ^ 2 - ↑2 * b.im * c * T - b.re * c ^ 2))
[PROOFSTEP]
rw [Complex.norm_eq_abs, Complex.abs_exp, neg_mul, neg_re, ← re_add_im b]
[GOAL]
b✝ b : ℂ
c T : ℝ
⊢ rexp (-((↑b.re + ↑b.im * I) * (↑T + ↑c * I) ^ 2).re) =
    rexp (-((↑b.re + ↑b.im * I).re * T ^ 2 - ↑2 * (↑b.re + ↑b.im * I).im * c * T - (↑b.re + ↑b.im * I).re * c ^ 2))
[PROOFSTEP]
simp only [sq, re_add_im, mul_re, mul_im, add_re, add_im, ofReal_re, ofReal_im, I_re, I_im]
[GOAL]
b✝ b : ℂ
c T : ℝ
⊢ rexp
      (-(b.re * ((T + (c * 0 - 0 * 1)) * (T + (c * 0 - 0 * 1)) - (0 + (c * 1 + 0 * 0)) * (0 + (c * 1 + 0 * 0))) -
          b.im * ((T + (c * 0 - 0 * 1)) * (0 + (c * 1 + 0 * 0)) + (0 + (c * 1 + 0 * 0)) * (T + (c * 0 - 0 * 1))))) =
    rexp (-(b.re * (T * T) - ↑2 * b.im * c * T - b.re * (c * c)))
[PROOFSTEP]
ring_nf
[GOAL]
b : ℂ
hb : b.re ≠ 0
c T : ℝ
⊢ ‖cexp (-b * (↑T + ↑c * I) ^ 2)‖ = rexp (-(b.re * (T - b.im * c / b.re) ^ 2 - c ^ 2 * (b.im ^ 2 / b.re + b.re)))
[PROOFSTEP]
have :
  b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2 =
    b.re * (T - b.im * c / b.re) ^ 2 - c ^ 2 * (b.im ^ 2 / b.re + b.re) :=
  by field_simp; ring
[GOAL]
b : ℂ
hb : b.re ≠ 0
c T : ℝ
⊢ b.re * T ^ 2 - ↑2 * b.im * c * T - b.re * c ^ 2 = b.re * (T - b.im * c / b.re) ^ 2 - c ^ 2 * (b.im ^ 2 / b.re + b.re)
[PROOFSTEP]
field_simp
[GOAL]
b : ℂ
hb : b.re ≠ 0
c T : ℝ
⊢ (b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2) * (b.re ^ 2 * b.re) =
    b.re * (T * b.re - b.im * c) ^ 2 * b.re - b.re ^ 2 * (c ^ 2 * (b.im ^ 2 + b.re * b.re))
[PROOFSTEP]
ring
[GOAL]
b : ℂ
hb : b.re ≠ 0
c T : ℝ
this :
  b.re * T ^ 2 - ↑2 * b.im * c * T - b.re * c ^ 2 = b.re * (T - b.im * c / b.re) ^ 2 - c ^ 2 * (b.im ^ 2 / b.re + b.re)
⊢ ‖cexp (-b * (↑T + ↑c * I) ^ 2)‖ = rexp (-(b.re * (T - b.im * c / b.re) ^ 2 - c ^ 2 * (b.im ^ 2 / b.re + b.re)))
[PROOFSTEP]
rw [norm_cexp_neg_mul_sq_add_mul_I, this]
[GOAL]
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
⊢ ‖verticalIntegral b c T‖ ≤ 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
have vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (T + y * I) ^ 2)‖ ≤ exp (-(b.re * T ^ 2 - (2 : ℝ) * |b.im| * |c| * T - b.re * c ^ 2)) :=
  by
  intro T hT c y hy
  rw [norm_cexp_neg_mul_sq_add_mul_I b, exp_le_exp, neg_le_neg_iff]
  refine' sub_le_sub (sub_le_sub (le_refl _) (mul_le_mul_of_nonneg_right _ hT)) _
  · (conv_lhs => rw [mul_assoc]); (conv_rhs => rw [mul_assoc])
    refine' mul_le_mul_of_nonneg_left ((le_abs_self _).trans _) zero_le_two
    rw [abs_mul]
    exact mul_le_mul_of_nonneg_left hy (abs_nonneg _)
  · refine' mul_le_mul_of_nonneg_left _ hb.le
    rwa [sq_le_sq]
      -- now main proof
[GOAL]
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
⊢ ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
intro T hT c y hy
[GOAL]
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
⊢ ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
rw [norm_cexp_neg_mul_sq_add_mul_I b, exp_le_exp, neg_le_neg_iff]
[GOAL]
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
⊢ b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2 ≤ b.re * T ^ 2 - ↑2 * b.im * y * T - b.re * y ^ 2
[PROOFSTEP]
refine' sub_le_sub (sub_le_sub (le_refl _) (mul_le_mul_of_nonneg_right _ hT)) _
[GOAL]
case refine'_1
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
⊢ ↑2 * b.im * y ≤ 2 * |b.im| * |c|
[PROOFSTEP]
conv_lhs => rw [mul_assoc]
[GOAL]
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
| ↑2 * b.im * y
[PROOFSTEP]
rw [mul_assoc]
[GOAL]
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
| ↑2 * b.im * y
[PROOFSTEP]
rw [mul_assoc]
[GOAL]
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
| ↑2 * b.im * y
[PROOFSTEP]
rw [mul_assoc]
[GOAL]
case refine'_1
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
⊢ ↑2 * (b.im * y) ≤ 2 * |b.im| * |c|
[PROOFSTEP]
conv_rhs => rw [mul_assoc]
[GOAL]
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
| 2 * |b.im| * |c|
[PROOFSTEP]
rw [mul_assoc]
[GOAL]
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
| 2 * |b.im| * |c|
[PROOFSTEP]
rw [mul_assoc]
[GOAL]
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
| 2 * |b.im| * |c|
[PROOFSTEP]
rw [mul_assoc]
[GOAL]
case refine'_1
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
⊢ ↑2 * (b.im * y) ≤ 2 * (|b.im| * |c|)
[PROOFSTEP]
refine' mul_le_mul_of_nonneg_left ((le_abs_self _).trans _) zero_le_two
[GOAL]
case refine'_1
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
⊢ |b.im * y| ≤ |b.im| * |c|
[PROOFSTEP]
rw [abs_mul]
[GOAL]
case refine'_1
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
⊢ |b.im| * |y| ≤ |b.im| * |c|
[PROOFSTEP]
exact mul_le_mul_of_nonneg_left hy (abs_nonneg _)
[GOAL]
case refine'_2
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
⊢ b.re * y ^ 2 ≤ b.re * c ^ 2
[PROOFSTEP]
refine' mul_le_mul_of_nonneg_left _ hb.le
[GOAL]
case refine'_2
b : ℂ
hb : 0 < b.re
c✝ T✝ : ℝ
hT✝ : 0 ≤ T✝
T : ℝ
hT : 0 ≤ T
c y : ℝ
hy : |y| ≤ |c|
⊢ y ^ 2 ≤ c ^ 2
[PROOFSTEP]
rwa [sq_le_sq]
  -- now main proof
[GOAL]
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
⊢ ‖verticalIntegral b c T‖ ≤ 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
refine' (intervalIntegral.norm_integral_le_of_norm_le_const _).trans _
[GOAL]
case refine'_1
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
⊢ ℝ
case refine'_2
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
⊢ ∀ (x : ℝ), x ∈ Ι 0 c → ‖I * (cexp (-b * (↑T + ↑x * I) ^ 2) - cexp (-b * (↑T - ↑x * I) ^ 2))‖ ≤ ?refine'_1
case refine'_3
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
⊢ ?refine'_1 * |c - 0| ≤ 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
pick_goal 3
[GOAL]
case refine'_3
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
⊢ ?refine'_1 * |c - 0| ≤ 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
rw [sub_zero]
[GOAL]
case refine'_3
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
⊢ ?refine'_1 * |c| ≤ 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
case refine'_1
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
⊢ ℝ
[PROOFSTEP]
conv_lhs => simp only [mul_comm _ |c|]
[GOAL]
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
| ?refine'_1 * |c|
[PROOFSTEP]
simp only [mul_comm _ |c|]
[GOAL]
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
| ?refine'_1 * |c|
[PROOFSTEP]
simp only [mul_comm _ |c|]
[GOAL]
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
| ?refine'_1 * |c|
[PROOFSTEP]
simp only [mul_comm _ |c|]
[GOAL]
case refine'_3
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
⊢ |c| * ?refine'_1 ≤ 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
case refine'_1
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
⊢ ℝ
[PROOFSTEP]
conv_rhs =>
  conv =>
    congr
    rw [mul_comm]
  rw [mul_assoc]
[GOAL]
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
| 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
  conv =>
    congr
    rw [mul_comm]
  rw [mul_assoc]
[GOAL]
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
| 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
  conv =>
    congr
    rw [mul_comm]
  rw [mul_assoc]
[GOAL]
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
| 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
conv =>
  congr
  rw [mul_comm]
[GOAL]
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
| 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
  congr
  rw [mul_comm]
[GOAL]
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
| 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
congr
[GOAL]
case a
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
| 2 * |c|
case a
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
| rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
rw [mul_comm]
[GOAL]
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
| |c| * 2 * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
rw [mul_assoc]
[GOAL]
case refine'_2
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
⊢ ∀ (x : ℝ),
    x ∈ Ι 0 c →
      ‖I * (cexp (-b * (↑T + ↑x * I) ^ 2) - cexp (-b * (↑T - ↑x * I) ^ 2))‖ ≤
        2 * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
intro y hy
[GOAL]
case refine'_2
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
y : ℝ
hy : y ∈ Ι 0 c
⊢ ‖I * (cexp (-b * (↑T + ↑y * I) ^ 2) - cexp (-b * (↑T - ↑y * I) ^ 2))‖ ≤
    2 * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
have absy : |y| ≤ |c| := by
  rcases le_or_lt 0 c with (h | h)
  · rw [uIoc_of_le h] at hy
    rw [abs_of_nonneg h, abs_of_pos hy.1]
    exact hy.2
  · rw [uIoc_of_lt h] at hy
    rw [abs_of_neg h, abs_of_nonpos hy.2, neg_le_neg_iff]
    exact hy.1.le
[GOAL]
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
y : ℝ
hy : y ∈ Ι 0 c
⊢ |y| ≤ |c|
[PROOFSTEP]
rcases le_or_lt 0 c with (h | h)
[GOAL]
case inl
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
y : ℝ
hy : y ∈ Ι 0 c
h : 0 ≤ c
⊢ |y| ≤ |c|
[PROOFSTEP]
rw [uIoc_of_le h] at hy
[GOAL]
case inl
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
y : ℝ
hy : y ∈ Ioc 0 c
h : 0 ≤ c
⊢ |y| ≤ |c|
[PROOFSTEP]
rw [abs_of_nonneg h, abs_of_pos hy.1]
[GOAL]
case inl
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
y : ℝ
hy : y ∈ Ioc 0 c
h : 0 ≤ c
⊢ y ≤ c
[PROOFSTEP]
exact hy.2
[GOAL]
case inr
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
y : ℝ
hy : y ∈ Ι 0 c
h : c < 0
⊢ |y| ≤ |c|
[PROOFSTEP]
rw [uIoc_of_lt h] at hy
[GOAL]
case inr
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
y : ℝ
hy : y ∈ Ioc c 0
h : c < 0
⊢ |y| ≤ |c|
[PROOFSTEP]
rw [abs_of_neg h, abs_of_nonpos hy.2, neg_le_neg_iff]
[GOAL]
case inr
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
y : ℝ
hy : y ∈ Ioc c 0
h : c < 0
⊢ c ≤ y
[PROOFSTEP]
exact hy.1.le
[GOAL]
case refine'_2
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
y : ℝ
hy : y ∈ Ι 0 c
absy : |y| ≤ |c|
⊢ ‖I * (cexp (-b * (↑T + ↑y * I) ^ 2) - cexp (-b * (↑T - ↑y * I) ^ 2))‖ ≤
    2 * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
rw [norm_mul, Complex.norm_eq_abs, abs_I, one_mul, two_mul]
[GOAL]
case refine'_2
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
y : ℝ
hy : y ∈ Ι 0 c
absy : |y| ≤ |c|
⊢ ‖cexp (-b * (↑T + ↑y * I) ^ 2) - cexp (-b * (↑T - ↑y * I) ^ 2)‖ ≤
    rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2)) +
      rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
refine' (norm_sub_le _ _).trans (add_le_add (vert_norm_bound hT absy) _)
[GOAL]
case refine'_2
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
y : ℝ
hy : y ∈ Ι 0 c
absy : |y| ≤ |c|
⊢ ‖cexp (-b * (↑T - ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
rw [← abs_neg y] at absy
[GOAL]
case refine'_2
b : ℂ
hb : 0 < b.re
c T : ℝ
hT : 0 ≤ T
vert_norm_bound :
  ∀ {T : ℝ},
    0 ≤ T →
      ∀ {c y : ℝ},
        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
y : ℝ
hy : y ∈ Ι 0 c
absy : |(-y)| ≤ |c|
⊢ ‖cexp (-b * (↑T - ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
[PROOFSTEP]
simpa only [neg_mul, ofReal_neg] using vert_norm_bound hT absy
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ Tendsto (verticalIntegral b c) atTop (𝓝 0)
[PROOFSTEP]
rw [tendsto_zero_iff_norm_tendsto_zero]
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ Tendsto (fun e => ‖verticalIntegral b c e‖) atTop (𝓝 0)
[PROOFSTEP]
refine'
  tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds _ (eventually_of_forall fun _ => norm_nonneg _)
    ((eventually_ge_atTop (0 : ℝ)).mp (eventually_of_forall fun T hT => verticalIntegral_norm_le hb c hT))
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ Tendsto (fun T => 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))) atTop (𝓝 0)
[PROOFSTEP]
rw [(by ring : 0 = 2 * |c| * 0)]
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ 0 = 2 * |c| * 0
[PROOFSTEP]
ring
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ Tendsto (fun T => 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))) atTop (𝓝 (2 * |c| * 0))
[PROOFSTEP]
refine' (tendsto_exp_atBot.comp (tendsto_neg_atTop_atBot.comp _)).const_mul _
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ Tendsto (fun T => b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2) atTop atTop
[PROOFSTEP]
apply tendsto_atTop_add_const_right
[GOAL]
case hf
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ Tendsto (fun x => b.re * x ^ 2 - 2 * |b.im| * |c| * x) atTop atTop
[PROOFSTEP]
simp_rw [sq, ← mul_assoc, ← sub_mul]
[GOAL]
case hf
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ Tendsto (fun x => (b.re * x - 2 * |b.im| * |c|) * x) atTop atTop
[PROOFSTEP]
refine' Tendsto.atTop_mul_atTop (tendsto_atTop_add_const_right _ _ _) tendsto_id
[GOAL]
case hf
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ Tendsto (fun x => b.re * x) atTop atTop
[PROOFSTEP]
exact (tendsto_const_mul_atTop_of_pos hb).mpr tendsto_id
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ Integrable fun x => cexp (-b * (↑x + ↑c * I) ^ 2)
[PROOFSTEP]
refine'
  ⟨(Complex.continuous_exp.comp
        (continuous_const.mul ((continuous_ofReal.add continuous_const).pow 2))).aestronglyMeasurable,
    _⟩
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ HasFiniteIntegral fun x => cexp (-b * (↑x + ↑c * I) ^ 2)
[PROOFSTEP]
rw [← hasFiniteIntegral_norm_iff]
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ HasFiniteIntegral fun a => ‖cexp (-b * (↑a + ↑c * I) ^ 2)‖
[PROOFSTEP]
simp_rw [norm_cexp_neg_mul_sq_add_mul_I' hb.ne', neg_sub _ (c ^ 2 * _), sub_eq_add_neg _ (b.re * _), Real.exp_add]
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ HasFiniteIntegral fun a => rexp (c ^ 2 * (b.im ^ 2 / b.re + b.re)) * rexp (-(b.re * (a - b.im * c / b.re) ^ 2))
[PROOFSTEP]
suffices Integrable fun x : ℝ => exp (-(b.re * x ^ 2)) by
  exact (Integrable.comp_sub_right this (b.im * c / b.re)).hasFiniteIntegral.const_mul _
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
this : Integrable fun x => rexp (-(b.re * x ^ 2))
⊢ HasFiniteIntegral fun a => rexp (c ^ 2 * (b.im ^ 2 / b.re + b.re)) * rexp (-(b.re * (a - b.im * c / b.re) ^ 2))
[PROOFSTEP]
exact (Integrable.comp_sub_right this (b.im * c / b.re)).hasFiniteIntegral.const_mul _
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ Integrable fun x => rexp (-(b.re * x ^ 2))
[PROOFSTEP]
simp_rw [← neg_mul]
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ Integrable fun x => rexp (-b.re * x ^ 2)
[PROOFSTEP]
apply integrable_exp_neg_mul_sq hb
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ ∫ (x : ℝ), cexp (-b * (↑x + ↑c * I) ^ 2) = (↑π / b) ^ (1 / 2)
[PROOFSTEP]
refine'
  tendsto_nhds_unique
    (intervalIntegral_tendsto_integral (integrable_cexp_neg_mul_sq_add_real_mul_I hb c) tendsto_neg_atTop_atBot
      tendsto_id)
    _
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
⊢ Tendsto (fun i => ∫ (x : ℝ) in -i..id i, cexp (-b * (↑x + ↑c * I) ^ 2)) atTop (𝓝 ((↑π / b) ^ (1 / 2)))
[PROOFSTEP]
set I₁ := fun T => ∫ x : ℝ in -T..T, cexp (-b * (x + c * I) ^ 2) with HI₁
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
⊢ Tendsto (fun i => ∫ (x : ℝ) in -i..id i, cexp (-b * (↑x + ↑c * I) ^ 2)) atTop (𝓝 ((↑π / b) ^ (1 / 2)))
[PROOFSTEP]
let I₂ := fun T : ℝ => ∫ x : ℝ in -T..T, cexp (-b * (x : ℂ) ^ 2)
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
⊢ Tendsto (fun i => ∫ (x : ℝ) in -i..id i, cexp (-b * (↑x + ↑c * I) ^ 2)) atTop (𝓝 ((↑π / b) ^ (1 / 2)))
[PROOFSTEP]
let I₄ := fun T : ℝ => ∫ y : ℝ in (0 : ℝ)..c, cexp (-b * (T + y * I) ^ 2)
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
⊢ Tendsto (fun i => ∫ (x : ℝ) in -i..id i, cexp (-b * (↑x + ↑c * I) ^ 2)) atTop (𝓝 ((↑π / b) ^ (1 / 2)))
[PROOFSTEP]
let I₅ := fun T : ℝ => ∫ y : ℝ in (0 : ℝ)..c, cexp (-b * (-T + y * I) ^ 2)
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
⊢ Tendsto (fun i => ∫ (x : ℝ) in -i..id i, cexp (-b * (↑x + ↑c * I) ^ 2)) atTop (𝓝 ((↑π / b) ^ (1 / 2)))
[PROOFSTEP]
have C : ∀ T : ℝ, I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0 :=
  by
  intro T
  have :=
    integral_boundary_rect_eq_zero_of_differentiableOn (fun z => cexp (-b * z ^ 2)) (-T) (T + c * I)
      (by
        refine' Differentiable.differentiableOn (Differentiable.const_mul _ _).cexp
        exact differentiable_pow 2)
  simpa only [neg_im, ofReal_im, neg_zero, ofReal_zero, zero_mul, add_zero, neg_re, ofReal_re, add_re, mul_re, I_re,
    mul_zero, I_im, tsub_zero, add_im, mul_im, mul_one, zero_add, Algebra.id.smul_eq_mul, ofReal_neg] using this
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
⊢ ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0
[PROOFSTEP]
intro T
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
⊢ I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0
[PROOFSTEP]
have :=
  integral_boundary_rect_eq_zero_of_differentiableOn (fun z => cexp (-b * z ^ 2)) (-T) (T + c * I)
    (by
      refine' Differentiable.differentiableOn (Differentiable.const_mul _ _).cexp
      exact differentiable_pow 2)
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
⊢ DifferentiableOn ℂ (fun z => cexp (-b * z ^ 2)) (uIcc (-↑T).re (↑T + ↑c * I).re ×ℂ uIcc (-↑T).im (↑T + ↑c * I).im)
[PROOFSTEP]
refine' Differentiable.differentiableOn (Differentiable.const_mul _ _).cexp
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
⊢ Differentiable ℂ fun z => z ^ 2
[PROOFSTEP]
exact differentiable_pow 2
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
this :
  (((∫ (x : ℝ) in (-↑T).re..(↑T + ↑c * I).re, (fun z => cexp (-b * z ^ 2)) (↑x + ↑(-↑T).im * I)) -
          ∫ (x : ℝ) in (-↑T).re..(↑T + ↑c * I).re, (fun z => cexp (-b * z ^ 2)) (↑x + ↑(↑T + ↑c * I).im * I)) +
        I • ∫ (y : ℝ) in (-↑T).im..(↑T + ↑c * I).im, (fun z => cexp (-b * z ^ 2)) (↑(↑T + ↑c * I).re + ↑y * I)) -
      I • ∫ (y : ℝ) in (-↑T).im..(↑T + ↑c * I).im, (fun z => cexp (-b * z ^ 2)) (↑(-↑T).re + ↑y * I) =
    0
⊢ I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0
[PROOFSTEP]
simpa only [neg_im, ofReal_im, neg_zero, ofReal_zero, zero_mul, add_zero, neg_re, ofReal_re, add_re, mul_re, I_re,
  mul_zero, I_im, tsub_zero, add_im, mul_im, mul_one, zero_add, Algebra.id.smul_eq_mul, ofReal_neg] using this
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
C : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0
⊢ Tendsto (fun i => ∫ (x : ℝ) in -i..id i, cexp (-b * (↑x + ↑c * I) ^ 2)) atTop (𝓝 ((↑π / b) ^ (1 / 2)))
[PROOFSTEP]
simp_rw [id.def, ← HI₁]
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
C : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0
⊢ Tendsto I₁ atTop (𝓝 ((↑π / b) ^ (1 / 2)))
[PROOFSTEP]
have : I₁ = fun T : ℝ => I₂ T + verticalIntegral b c T :=
  by
  ext1 T
  specialize C T
  rw [sub_eq_zero] at C
  unfold verticalIntegral
  rw [integral_const_mul, intervalIntegral.integral_sub]
  · simp_rw [(fun a b => by rw [sq]; ring_nf : ∀ a b : ℂ, (a - b * I) ^ 2 = (-a + b * I) ^ 2)]
    change I₁ T = I₂ T + I * (I₄ T - I₅ T)
    rw [mul_sub, ← C]
    abel
  all_goals apply Continuous.intervalIntegrable; continuity
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
C : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0
⊢ I₁ = fun T => I₂ T + verticalIntegral b c T
[PROOFSTEP]
ext1 T
[GOAL]
case h
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
C : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0
T : ℝ
⊢ I₁ T = I₂ T + verticalIntegral b c T
[PROOFSTEP]
specialize C T
[GOAL]
case h
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0
⊢ I₁ T = I₂ T + verticalIntegral b c T
[PROOFSTEP]
rw [sub_eq_zero] at C
[GOAL]
case h
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
⊢ I₁ T = I₂ T + verticalIntegral b c T
[PROOFSTEP]
unfold verticalIntegral
[GOAL]
case h
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
⊢ I₁ T = I₂ T + ∫ (y : ℝ) in 0 ..c, I * (cexp (-b * (↑T + ↑y * I) ^ 2) - cexp (-b * (↑T - ↑y * I) ^ 2))
[PROOFSTEP]
rw [integral_const_mul, intervalIntegral.integral_sub]
[GOAL]
case h
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
⊢ I₁ T =
    I₂ T + I * ((∫ (x : ℝ) in 0 ..c, cexp (-b * (↑T + ↑x * I) ^ 2)) - ∫ (x : ℝ) in 0 ..c, cexp (-b * (↑T - ↑x * I) ^ 2))
[PROOFSTEP]
simp_rw [(fun a b => by rw [sq]; ring_nf : ∀ a b : ℂ, (a - b * I) ^ 2 = (-a + b * I) ^ 2)]
[GOAL]
b✝ : ℂ
hb : 0 < b✝.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b✝ * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b✝ * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b✝ * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b✝ * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b✝ * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
a b : ℂ
⊢ (a - b * I) ^ 2 = (-a + b * I) ^ 2
[PROOFSTEP]
rw [sq]
[GOAL]
b✝ : ℂ
hb : 0 < b✝.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b✝ * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b✝ * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b✝ * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b✝ * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b✝ * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
a b : ℂ
⊢ (a - b * I) * (a - b * I) = (-a + b * I) ^ 2
[PROOFSTEP]
ring_nf
[GOAL]
case h
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
⊢ ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2) =
    (∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)) +
      I * ((∫ (x : ℝ) in 0 ..c, cexp (-b * (↑T + ↑x * I) ^ 2)) - ∫ (x : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑x * I) ^ 2))
[PROOFSTEP]
change I₁ T = I₂ T + I * (I₄ T - I₅ T)
[GOAL]
case h
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
⊢ I₁ T = I₂ T + I * (I₄ T - I₅ T)
[PROOFSTEP]
rw [mul_sub, ← C]
[GOAL]
case h
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
⊢ I₁ T = I₂ T + (I * I₄ T - (I₂ T - I₁ T + I * I₄ T))
[PROOFSTEP]
abel
[GOAL]
case h
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
⊢ I₁ T = I₂ T + (I * I₄ T - (I₂ T - I₁ T + I * I₄ T))
[PROOFSTEP]
abel
[GOAL]
case h.hf
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
⊢ IntervalIntegrable (fun x => cexp (-b * (↑T + ↑x * I) ^ 2)) volume 0 c
case h.hg
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
⊢ IntervalIntegrable (fun x => cexp (-b * (↑T - ↑x * I) ^ 2)) volume 0 c
[PROOFSTEP]
all_goals apply Continuous.intervalIntegrable; continuity
[GOAL]
case h.hf
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
⊢ IntervalIntegrable (fun x => cexp (-b * (↑T + ↑x * I) ^ 2)) volume 0 c
[PROOFSTEP]
apply Continuous.intervalIntegrable
[GOAL]
case h.hf.hu
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
⊢ Continuous fun x => cexp (-b * (↑T + ↑x * I) ^ 2)
[PROOFSTEP]
continuity
[GOAL]
case h.hg
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
⊢ IntervalIntegrable (fun x => cexp (-b * (↑T - ↑x * I) ^ 2)) volume 0 c
[PROOFSTEP]
apply Continuous.intervalIntegrable
[GOAL]
case h.hg.hu
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
T : ℝ
C : I₂ T - I₁ T + I * I₄ T = I * I₅ T
⊢ Continuous fun x => cexp (-b * (↑T - ↑x * I) ^ 2)
[PROOFSTEP]
continuity
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
C : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0
this : I₁ = fun T => I₂ T + verticalIntegral b c T
⊢ Tendsto I₁ atTop (𝓝 ((↑π / b) ^ (1 / 2)))
[PROOFSTEP]
rw [this, ← add_zero ((π / b : ℂ) ^ (1 / 2 : ℂ)), ← integral_gaussian_complex hb]
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
C : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0
this : I₁ = fun T => I₂ T + verticalIntegral b c T
⊢ Tendsto (fun T => I₂ T + verticalIntegral b c T) atTop (𝓝 ((∫ (x : ℝ), cexp (-b * ↑x ^ 2)) + 0))
[PROOFSTEP]
refine' Tendsto.add _ (tendsto_verticalIntegral hb c)
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℝ
I₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
HI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)
I₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)
I₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)
I₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)
C : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0
this : I₁ = fun T => I₂ T + verticalIntegral b c T
⊢ Tendsto (fun T => I₂ T) atTop (𝓝 (∫ (x : ℝ), cexp (-b * ↑x ^ 2)))
[PROOFSTEP]
exact intervalIntegral_tendsto_integral (integrable_cexp_neg_mul_sq hb) tendsto_neg_atTop_atBot tendsto_id
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℂ
⊢ ∫ (x : ℝ), cexp (-b * (↑x + c) ^ 2) = (↑π / b) ^ (1 / 2)
[PROOFSTEP]
rw [← re_add_im c]
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℂ
⊢ ∫ (x : ℝ), cexp (-b * (↑x + (↑c.re + ↑c.im * I)) ^ 2) = (↑π / b) ^ (1 / 2)
[PROOFSTEP]
simp_rw [← add_assoc, ← ofReal_add]
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℂ
⊢ ∫ (x : ℝ), cexp (-b * (↑(x + c.re) + ↑c.im * I) ^ 2) = (↑π / b) ^ (1 / 2)
[PROOFSTEP]
rw [integral_add_right_eq_self fun x : ℝ => cexp (-b * (↑x + ↑c.im * I) ^ 2)]
[GOAL]
b : ℂ
hb : 0 < b.re
c : ℂ
⊢ ∫ (x : ℝ), cexp (-b * (↑x + ↑c.im * I) ^ 2) = (↑π / b) ^ (1 / 2)
[PROOFSTEP]
apply integral_cexp_neg_mul_sq_add_real_mul_I hb
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℂ
⊢ ∫ (x : ℝ), cexp (I * t * ↑x) * cexp (-b * ↑x ^ 2) = cexp (-t ^ 2 / (4 * b)) * (↑π / b) ^ (1 / 2)
[PROOFSTEP]
have : b ≠ 0 := by contrapose! hb; rw [hb, zero_re]
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℂ
⊢ b ≠ 0
[PROOFSTEP]
contrapose! hb
[GOAL]
b t : ℂ
hb : b = 0
⊢ b.re ≤ 0
[PROOFSTEP]
rw [hb, zero_re]
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℂ
this : b ≠ 0
⊢ ∫ (x : ℝ), cexp (I * t * ↑x) * cexp (-b * ↑x ^ 2) = cexp (-t ^ 2 / (4 * b)) * (↑π / b) ^ (1 / 2)
[PROOFSTEP]
simp_rw [← Complex.exp_add]
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℂ
this : b ≠ 0
⊢ ∫ (x : ℝ), cexp (I * t * ↑x + -b * ↑x ^ 2) = cexp (-t ^ 2 / (4 * b)) * (↑π / b) ^ (1 / 2)
[PROOFSTEP]
have : ∀ x : ℂ, I * t * x + -b * x ^ 2 = -t ^ 2 / ((4 : ℂ) * b) + -b * (x + -I * t / 2 / b) ^ 2 :=
  by
  intro x
  ring_nf
  rw [I_sq]
  field_simp; ring
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℂ
this : b ≠ 0
⊢ ∀ (x : ℂ), I * t * x + -b * x ^ 2 = -t ^ 2 / (4 * b) + -b * (x + -I * t / 2 / b) ^ 2
[PROOFSTEP]
intro x
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℂ
this : b ≠ 0
x : ℂ
⊢ I * t * x + -b * x ^ 2 = -t ^ 2 / (4 * b) + -b * (x + -I * t / 2 / b) ^ 2
[PROOFSTEP]
ring_nf
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℂ
this : b ≠ 0
x : ℂ
⊢ I * t * x - x ^ 2 * b =
    I * t * x * b * b⁻¹ + I ^ 2 * t ^ 2 * b * b⁻¹ ^ 2 * ↑(Int.negOfNat 1) * (↑(Int.ofNat 1) / ↑4) +
      (t ^ 2 * b⁻¹ * ↑(Int.negOfNat 1) * (↑(Int.ofNat 1) / ↑4) - x ^ 2 * b)
[PROOFSTEP]
rw [I_sq]
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℂ
this : b ≠ 0
x : ℂ
⊢ I * t * x - x ^ 2 * b =
    I * t * x * b * b⁻¹ + -1 * t ^ 2 * b * b⁻¹ ^ 2 * ↑(Int.negOfNat 1) * (↑(Int.ofNat 1) / ↑4) +
      (t ^ 2 * b⁻¹ * ↑(Int.negOfNat 1) * (↑(Int.ofNat 1) / ↑4) - x ^ 2 * b)
[PROOFSTEP]
field_simp
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℂ
this : b ≠ 0
x : ℂ
⊢ (I * t * x - x ^ 2 * b) * (b ^ 2 * 4 * (b * 4)) =
    (I * t * x * (b ^ 2 * 4) + t ^ 2 * b) * (b * 4) + (-t ^ 2 - b * 4 * (x ^ 2 * b)) * (b ^ 2 * 4)
[PROOFSTEP]
ring
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℂ
this✝ : b ≠ 0
this : ∀ (x : ℂ), I * t * x + -b * x ^ 2 = -t ^ 2 / (4 * b) + -b * (x + -I * t / 2 / b) ^ 2
⊢ ∫ (x : ℝ), cexp (I * t * ↑x + -b * ↑x ^ 2) = cexp (-t ^ 2 / (4 * b)) * (↑π / b) ^ (1 / 2)
[PROOFSTEP]
simp_rw [this, Complex.exp_add, integral_mul_left, integral_cexp_neg_mul_sq_add_const hb]
[GOAL]
b : ℂ
hb : 0 < b.re
⊢ (𝓕 fun x => cexp (-↑π * b * ↑x ^ 2)) = fun t => 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)
[PROOFSTEP]
ext1 t
[GOAL]
case h
b : ℂ
hb : 0 < b.re
t : ℝ
⊢ 𝓕 (fun x => cexp (-↑π * b * ↑x ^ 2)) t = 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)
[PROOFSTEP]
simp_rw [fourierIntegral_eq_integral_exp_smul, smul_eq_mul]
[GOAL]
case h
b : ℂ
hb : 0 < b.re
t : ℝ
⊢ ∫ (v : ℝ), cexp (↑(-2 * π * v * t) * I) * cexp (-↑π * b * ↑v ^ 2) = 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)
[PROOFSTEP]
have h1 : 0 < re (π * b) := by rw [ofReal_mul_re]; exact mul_pos pi_pos hb
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℝ
⊢ 0 < (↑π * b).re
[PROOFSTEP]
rw [ofReal_mul_re]
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℝ
⊢ 0 < π * b.re
[PROOFSTEP]
exact mul_pos pi_pos hb
[GOAL]
case h
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
⊢ ∫ (v : ℝ), cexp (↑(-2 * π * v * t) * I) * cexp (-↑π * b * ↑v ^ 2) = 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)
[PROOFSTEP]
have h2 : b ≠ 0 := by contrapose! hb; rw [hb, zero_re]
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
⊢ b ≠ 0
[PROOFSTEP]
contrapose! hb
[GOAL]
b : ℂ
t : ℝ
h1 : 0 < (↑π * b).re
hb : b = 0
⊢ b.re ≤ 0
[PROOFSTEP]
rw [hb, zero_re]
[GOAL]
case h
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
⊢ ∫ (v : ℝ), cexp (↑(-2 * π * v * t) * I) * cexp (-↑π * b * ↑v ^ 2) = 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)
[PROOFSTEP]
convert _root_.fourier_transform_gaussian h1 (-2 * π * t) using 1
[GOAL]
case h.e'_2
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
⊢ ∫ (v : ℝ), cexp (↑(-2 * π * v * t) * I) * cexp (-↑π * b * ↑v ^ 2) =
    ∫ (x : ℝ), cexp (I * (-2 * ↑π * ↑t) * ↑x) * cexp (-(↑π * b) * ↑x ^ 2)
[PROOFSTEP]
congr 1 with x : 1
[GOAL]
case h.e'_2.e_f.h
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
x : ℝ
⊢ cexp (↑(-2 * π * x * t) * I) * cexp (-↑π * b * ↑x ^ 2) = cexp (I * (-2 * ↑π * ↑t) * ↑x) * cexp (-(↑π * b) * ↑x ^ 2)
[PROOFSTEP]
congr 2
[GOAL]
case h.e'_2.e_f.h.e_a.e_z
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
x : ℝ
⊢ ↑(-2 * π * x * t) * I = I * (-2 * ↑π * ↑t) * ↑x
case h.e'_2.e_f.h.e_a.e_z
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
x : ℝ
⊢ -↑π * b * ↑x ^ 2 = -(↑π * b) * ↑x ^ 2
[PROOFSTEP]
any_goals push_cast ; ring
[GOAL]
case h.e'_2.e_f.h.e_a.e_z
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
x : ℝ
⊢ ↑(-2 * π * x * t) * I = I * (-2 * ↑π * ↑t) * ↑x
[PROOFSTEP]
push_cast
[GOAL]
case h.e'_2.e_f.h.e_a.e_z
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
x : ℝ
⊢ -2 * ↑π * ↑x * ↑t * I = I * (-2 * ↑π * ↑t) * ↑x
[PROOFSTEP]
ring
[GOAL]
case h.e'_2.e_f.h.e_a.e_z
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
x : ℝ
⊢ -↑π * b * ↑x ^ 2 = -(↑π * b) * ↑x ^ 2
[PROOFSTEP]
push_cast
[GOAL]
case h.e'_2.e_f.h.e_a.e_z
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
x : ℝ
⊢ -↑π * b * ↑x ^ 2 = -(↑π * b) * ↑x ^ 2
[PROOFSTEP]
ring
[GOAL]
case h.e'_3
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
⊢ 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2) = cexp (-(-2 * ↑π * ↑t) ^ 2 / (4 * (↑π * b))) * (↑π / (↑π * b)) ^ (1 / 2)
[PROOFSTEP]
conv_lhs => rw [mul_comm]
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
| 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)
[PROOFSTEP]
rw [mul_comm]
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
| 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)
[PROOFSTEP]
rw [mul_comm]
[GOAL]
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
| 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)
[PROOFSTEP]
rw [mul_comm]
[GOAL]
case h.e'_3
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
⊢ cexp (-↑π / b * ↑t ^ 2) * (1 / b ^ (1 / 2)) = cexp (-(-2 * ↑π * ↑t) ^ 2 / (4 * (↑π * b))) * (↑π / (↑π * b)) ^ (1 / 2)
[PROOFSTEP]
congr 2
[GOAL]
case h.e'_3.e_a.e_z
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
⊢ -↑π / b * ↑t ^ 2 = -(-2 * ↑π * ↑t) ^ 2 / (4 * (↑π * b))
[PROOFSTEP]
field_simp [ofReal_ne_zero.mpr pi_ne_zero]
[GOAL]
case h.e'_3.e_a.e_z
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
⊢ ↑π * ↑t ^ 2 * (4 * (↑π * b)) = (2 * ↑π * ↑t) ^ 2 * b
[PROOFSTEP]
ring
[GOAL]
case h.e'_3.e_a
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
⊢ 1 / b ^ (1 / 2) = (↑π / (↑π * b)) ^ (1 / 2)
[PROOFSTEP]
rw [← div_div, div_self (ofReal_ne_zero.mpr pi_ne_zero), one_div, one_div b, inv_cpow]
[GOAL]
case h.e'_3.e_a.hx
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
⊢ arg b ≠ π
[PROOFSTEP]
rw [Ne.def, arg_eq_pi_iff, not_and_or, not_lt]
[GOAL]
case h.e'_3.e_a.hx
b : ℂ
hb : 0 < b.re
t : ℝ
h1 : 0 < (↑π * b).re
h2 : b ≠ 0
⊢ 0 ≤ b.re ∨ ¬b.im = 0
[PROOFSTEP]
exact Or.inl hb.le
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
ha : 0 < a
s : ℝ
⊢ Tendsto (fun x => |x| ^ s * rexp (-a * x ^ 2)) (cocompact ℝ) (𝓝 0)
[PROOFSTEP]
conv in rexp _ => rw [← sq_abs]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
ha : 0 < a
s x : ℝ
| rexp (-a * x ^ 2)
[PROOFSTEP]
rw [← sq_abs]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
ha : 0 < a
s x : ℝ
| rexp (-a * x ^ 2)
[PROOFSTEP]
rw [← sq_abs]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
ha : 0 < a
s x : ℝ
| rexp (-a * x ^ 2)
[PROOFSTEP]
rw [← sq_abs]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
ha : 0 < a
s : ℝ
⊢ Tendsto (fun x => |x| ^ s * rexp (-a * |x| ^ 2)) (cocompact ℝ) (𝓝 0)
[PROOFSTEP]
erw [cocompact_eq, ← comap_abs_atTop,
  @tendsto_comap'_iff _ _ _ (fun y => y ^ s * rexp (-a * y ^ 2)) _ _ _
    (mem_atTop_sets.mpr ⟨0, fun b hb => ⟨b, abs_of_nonneg hb⟩⟩)]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
ha : 0 < a
s : ℝ
⊢ Tendsto (fun y => y ^ s * rexp (-a * y ^ 2)) atTop (𝓝 0)
[PROOFSTEP]
exact
  (rpow_mul_exp_neg_mul_sq_isLittleO_exp_neg ha s).tendsto_zero_of_tendsto
    (tendsto_exp_atBot.comp <| tendsto_id.neg_const_mul_atTop (neg_lt_zero.mpr one_half_pos))
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
s : ℝ
⊢ (fun x => cexp (-a * ↑x ^ 2)) =o[cocompact ℝ] fun x => |x| ^ s
[PROOFSTEP]
rw [← isLittleO_norm_left]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
s : ℝ
⊢ (fun x => ‖cexp (-a * ↑x ^ 2)‖) =o[cocompact ℝ] fun x => |x| ^ s
[PROOFSTEP]
simp_rw [norm_cexp_neg_mul_sq]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
s : ℝ
⊢ (fun x => rexp (-a.re * x ^ 2)) =o[cocompact ℝ] fun x => |x| ^ s
[PROOFSTEP]
apply isLittleO_of_tendsto'
[GOAL]
case hgf
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
s : ℝ
⊢ ∀ᶠ (x : ℝ) in cocompact ℝ, |x| ^ s = 0 → rexp (-a.re * x ^ 2) = 0
[PROOFSTEP]
refine' Eventually.filter_mono cocompact_le_cofinite _
[GOAL]
case hgf
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
s : ℝ
⊢ ∀ᶠ (x : ℝ) in cofinite, |x| ^ s = 0 → rexp (-a.re * x ^ 2) = 0
[PROOFSTEP]
refine' (eventually_cofinite_ne 0).mp (eventually_of_forall fun x hx h => _)
[GOAL]
case hgf
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
s x : ℝ
hx : x ≠ 0
h : |x| ^ s = 0
⊢ rexp (-a.re * x ^ 2) = 0
[PROOFSTEP]
exact ((rpow_pos_of_pos (abs_pos.mpr hx) _).ne' h).elim
[GOAL]
case a
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
s : ℝ
⊢ Tendsto (fun x => rexp (-a.re * x ^ 2) / |x| ^ s) (cocompact ℝ) (𝓝 0)
[PROOFSTEP]
refine'
  Tendsto.congr' (Eventually.filter_mono cocompact_le_cofinite _)
    (tendsto_zero_iff_norm_tendsto_zero.mp <| tendsto_rpow_abs_mul_exp_neg_mul_sq_cocompact ha (-s))
[GOAL]
case a
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
s : ℝ
⊢ ∀ᶠ (x : ℝ) in cofinite, ‖|x| ^ (-s) * rexp (-a.re * x ^ 2)‖ = (fun x => rexp (-a.re * x ^ 2) / |x| ^ s) x
[PROOFSTEP]
refine' (eventually_cofinite_ne 0).mp (eventually_of_forall fun x _ => _)
[GOAL]
case a
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
s x : ℝ
x✝ : x ≠ 0
⊢ ‖|x| ^ (-s) * rexp (-a.re * x ^ 2)‖ = (fun x => rexp (-a.re * x ^ 2) / |x| ^ s) x
[PROOFSTEP]
dsimp only
[GOAL]
case a
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
s x : ℝ
x✝ : x ≠ 0
⊢ ‖|x| ^ (-s) * rexp (-a.re * x ^ 2)‖ = rexp (-a.re * x ^ 2) / |x| ^ s
[PROOFSTEP]
rw [norm_mul, norm_of_nonneg (rpow_nonneg_of_nonneg (abs_nonneg _) _), mul_comm, rpow_neg (abs_nonneg x),
  div_eq_mul_inv, norm_of_nonneg (exp_pos _).le]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
⊢ ∑' (n : ℤ), cexp (-↑π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π / a * ↑n ^ 2)
[PROOFSTEP]
let f := fun x : ℝ => cexp (-π * a * (x : ℂ) ^ 2)
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
⊢ ∑' (n : ℤ), cexp (-↑π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π / a * ↑n ^ 2)
[PROOFSTEP]
have h1 : 0 < (↑π * a).re := by
  rw [ofReal_mul_re]
  exact mul_pos pi_pos ha
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
⊢ 0 < (↑π * a).re
[PROOFSTEP]
rw [ofReal_mul_re]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
⊢ 0 < π * a.re
[PROOFSTEP]
exact mul_pos pi_pos ha
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
⊢ ∑' (n : ℤ), cexp (-↑π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π / a * ↑n ^ 2)
[PROOFSTEP]
have h2 : 0 < (↑π / a).re := by
  rw [div_eq_mul_inv, ofReal_mul_re, inv_re]
  refine' mul_pos pi_pos (div_pos ha <| normSq_pos.mpr _)
  contrapose! ha
  rw [ha, zero_re]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
⊢ 0 < (↑π / a).re
[PROOFSTEP]
rw [div_eq_mul_inv, ofReal_mul_re, inv_re]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
⊢ 0 < π * (a.re / ↑normSq a)
[PROOFSTEP]
refine' mul_pos pi_pos (div_pos ha <| normSq_pos.mpr _)
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
⊢ a ≠ 0
[PROOFSTEP]
contrapose! ha
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
ha : a = 0
⊢ a.re ≤ 0
[PROOFSTEP]
rw [ha, zero_re]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
h2 : 0 < (↑π / a).re
⊢ ∑' (n : ℤ), cexp (-↑π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π / a * ↑n ^ 2)
[PROOFSTEP]
have f_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2 : ℝ) :=
  by
  convert (isLittleO_exp_neg_mul_sq_cocompact h1 (-2)).isBigO using 2
  dsimp only
  congr 1
  ring
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
h2 : 0 < (↑π / a).re
⊢ f =O[cocompact ℝ] fun x => |x| ^ (-2)
[PROOFSTEP]
convert (isLittleO_exp_neg_mul_sq_cocompact h1 (-2)).isBigO using 2
[GOAL]
case h.e'_7.h
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
h2 : 0 < (↑π / a).re
x✝ : ℝ
⊢ f x✝ = cexp (-(↑π * a) * ↑x✝ ^ 2)
[PROOFSTEP]
dsimp only
[GOAL]
case h.e'_7.h
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
h2 : 0 < (↑π / a).re
x✝ : ℝ
⊢ cexp (-↑π * a * ↑x✝ ^ 2) = cexp (-(↑π * a) * ↑x✝ ^ 2)
[PROOFSTEP]
congr 1
[GOAL]
case h.e'_7.h.e_z
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
h2 : 0 < (↑π / a).re
x✝ : ℝ
⊢ -↑π * a * ↑x✝ ^ 2 = -(↑π * a) * ↑x✝ ^ 2
[PROOFSTEP]
ring
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
h2 : 0 < (↑π / a).re
f_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2)
⊢ ∑' (n : ℤ), cexp (-↑π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π / a * ↑n ^ 2)
[PROOFSTEP]
have Ff_bd : 𝓕 f =O[cocompact ℝ] fun x => |x| ^ (-2 : ℝ) :=
  by
  rw [fourier_transform_gaussian_pi ha]
  convert (isLittleO_exp_neg_mul_sq_cocompact h2 (-2)).isBigO.const_mul_left ((1 : ℂ) / a ^ (1 / 2 : ℂ)) using 2
  congr 1
  ring_nf
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
h2 : 0 < (↑π / a).re
f_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2)
⊢ 𝓕 f =O[cocompact ℝ] fun x => |x| ^ (-2)
[PROOFSTEP]
rw [fourier_transform_gaussian_pi ha]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
h2 : 0 < (↑π / a).re
f_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2)
⊢ (fun t => 1 / a ^ (1 / 2) * cexp (-↑π / a * ↑t ^ 2)) =O[cocompact ℝ] fun x => |x| ^ (-2)
[PROOFSTEP]
convert (isLittleO_exp_neg_mul_sq_cocompact h2 (-2)).isBigO.const_mul_left ((1 : ℂ) / a ^ (1 / 2 : ℂ)) using 2
[GOAL]
case h.e'_7.h
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
h2 : 0 < (↑π / a).re
f_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2)
x✝ : ℝ
⊢ 1 / a ^ (1 / 2) * cexp (-↑π / a * ↑x✝ ^ 2) = 1 / a ^ (1 / 2) * cexp (-(↑π / a) * ↑x✝ ^ 2)
[PROOFSTEP]
congr 1
[GOAL]
case h.e'_7.h.e_a
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
h2 : 0 < (↑π / a).re
f_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2)
x✝ : ℝ
⊢ cexp (-↑π / a * ↑x✝ ^ 2) = cexp (-(↑π / a) * ↑x✝ ^ 2)
[PROOFSTEP]
ring_nf
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : 0 < a.re
f : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)
h1 : 0 < (↑π * a).re
h2 : 0 < (↑π / a).re
f_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2)
Ff_bd : 𝓕 f =O[cocompact ℝ] fun x => |x| ^ (-2)
⊢ ∑' (n : ℤ), cexp (-↑π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π / a * ↑n ^ 2)
[PROOFSTEP]
simpa only [fourier_transform_gaussian_pi ha, tsum_mul_left, Function.comp] using
  Real.tsum_eq_tsum_fourierIntegral_of_rpow_decay
    (Complex.continuous_exp.comp (continuous_const.mul (continuous_ofReal.pow 2)) : Continuous f) one_lt_two f_bd Ff_bd
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
ha : 0 < a
⊢ ∑' (n : ℤ), rexp (-π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), rexp (-π / a * ↑n ^ 2)
[PROOFSTEP]
simpa only [← ofReal_inj, ofReal_mul, ofReal_tsum, ofReal_exp, ofReal_div, ofReal_pow, ofReal_int_cast, ofReal_neg,
  ofReal_cpow ha.le, ofReal_ofNat, ofReal_one] using
  Complex.tsum_exp_neg_mul_int_sq (by rwa [ofReal_re] : 0 < (a : ℂ).re)
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
ha : 0 < a
⊢ 0 < (↑a).re
[PROOFSTEP]
rwa [ofReal_re]