l3lab/ntp-mathlib huggingface dataset:
/-- Functional equation for `zetaKernel₂`. -/
theorem zetaKernel₂_one_div {t : ℝ} (ht : 0 ≤ t) :
    zetaKernel₂ (1 / t) = sqrt t * zetaKernel₂ t := by
  rcases ht.eq_or_lt with rfl|h't
  · simp [zetaKernel₂, zetaKernel₁]
  have aux : ∀ {u : ℝ} (_ : 1 < u), zetaKernel₂ (1 / u) = sqrt u * zetaKernel₂ u := by
    intro u hu
    simp_rw [zetaKernel₂, Pi.add_apply]
    rw [indicator_of_mem, indicator_of_not_mem (not_mem_Ioc_of_gt hu), add_zero]
    swap; · exact ⟨one_div_pos.mpr (zero_lt_one.trans hu), (one_div u).symm ▸ inv_le_one hu.le⟩
    rw [zetaKernel₁_eq_jacobiTheta (one_div_pos.mpr <| zero_lt_one.trans hu),
      zetaKernel₁_eq_jacobiTheta (zero_lt_one.trans hu), ← add_div, ← mul_div_assoc, add_sub,
      sub_add_cancel, sqrt_div zero_le_one, sqrt_one, one_div (sqrt _), ofReal_inv, ← one_div,
      one_div_one_div, mul_sub, mul_one]
    congr 2
    let τ : UpperHalfPlane := .mk (u * I) ((mul_I_im u).symm ▸ zero_lt_one.trans hu)
    convert jacobiTheta_S_smul τ using 2
    · rw [UpperHalfPlane.modular_S_smul, UpperHalfPlane.coe_mk, UpperHalfPlane.coe_mk, ← neg_inv,
        mul_inv, inv_I, mul_neg, neg_neg, one_div, ofReal_inv]
    · rw [UpperHalfPlane.coe_mk, mul_comm, mul_assoc, mul_neg, I_mul_I, neg_neg, mul_one,
        sqrt_eq_rpow, ofReal_cpow (zero_lt_one.trans hu).le]
      

Proof state:
case h.e'_3.h.e'_5
t : ℝ
ht : 0 ≤ t
h't : 0 < t
u : ℝ
hu : 1 < u
τ : UpperHalfPlane := UpperHalfPlane.mk (↑u * I) (_ : 0 < (↑u * I).im)
⊢ ↑u ^ ↑(1 / 2) = ↑u ^ (1 / 2)

Next tactic:
push_cast
/-- Functional equation for `zetaKernel₂`. -/
theorem zetaKernel₂_one_div {t : ℝ} (ht : 0 ≤ t) :
    zetaKernel₂ (1 / t) = sqrt t * zetaKernel₂ t := by
  rcases ht.eq_or_lt with rfl|h't
  · simp [zetaKernel₂, zetaKernel₁]
  have aux : ∀ {u : ℝ} (_ : 1 < u), zetaKernel₂ (1 / u) = sqrt u * zetaKernel₂ u := by
    intro u hu
    simp_rw [zetaKernel₂, Pi.add_apply]
    rw [indicator_of_mem, indicator_of_not_mem (not_mem_Ioc_of_gt hu), add_zero]
    swap; · exact ⟨one_div_pos.mpr (zero_lt_one.trans hu), (one_div u).symm ▸ inv_le_one hu.le⟩
    rw [zetaKernel₁_eq_jacobiTheta (one_div_pos.mpr <| zero_lt_one.trans hu),
      zetaKernel₁_eq_jacobiTheta (zero_lt_one.trans hu), ← add_div, ← mul_div_assoc, add_sub,
      sub_add_cancel, sqrt_div zero_le_one, sqrt_one, one_div (sqrt _), ofReal_inv, ← one_div,
      one_div_one_div, mul_sub, mul_one]
    congr 2
    let τ : UpperHalfPlane := .mk (u * I) ((mul_I_im u).symm ▸ zero_lt_one.trans hu)
    convert jacobiTheta_S_smul τ using 2
    · rw [UpperHalfPlane.modular_S_smul, UpperHalfPlane.coe_mk, UpperHalfPlane.coe_mk, ← neg_inv,
        mul_inv, inv_I, mul_neg, neg_neg, one_div, ofReal_inv]
    · rw [UpperHalfPlane.coe_mk, mul_comm, mul_assoc, mul_neg, I_mul_I, neg_neg, mul_one,
        sqrt_eq_rpow, ofReal_cpow (zero_lt_one.trans hu).le]
      push_cast
      

Proof state:
case h.e'_3.h.e'_5
t : ℝ
ht : 0 ≤ t
h't : 0 < t
u : ℝ
hu : 1 < u
τ : UpperHalfPlane := UpperHalfPlane.mk (↑u * I) (_ : 0 < (↑u * I).im)
⊢ ↑u ^ (1 / 2) = ↑u ^ (1 / 2)

Next tactic:
rfl
/-- Functional equation for `zetaKernel₂`. -/
theorem zetaKernel₂_one_div {t : ℝ} (ht : 0 ≤ t) :
    zetaKernel₂ (1 / t) = sqrt t * zetaKernel₂ t := by
  rcases ht.eq_or_lt with rfl|h't
  · simp [zetaKernel₂, zetaKernel₁]
  have aux : ∀ {u : ℝ} (_ : 1 < u), zetaKernel₂ (1 / u) = sqrt u * zetaKernel₂ u := by
    intro u hu
    simp_rw [zetaKernel₂, Pi.add_apply]
    rw [indicator_of_mem, indicator_of_not_mem (not_mem_Ioc_of_gt hu), add_zero]
    swap; · exact ⟨one_div_pos.mpr (zero_lt_one.trans hu), (one_div u).symm ▸ inv_le_one hu.le⟩
    rw [zetaKernel₁_eq_jacobiTheta (one_div_pos.mpr <| zero_lt_one.trans hu),
      zetaKernel₁_eq_jacobiTheta (zero_lt_one.trans hu), ← add_div, ← mul_div_assoc, add_sub,
      sub_add_cancel, sqrt_div zero_le_one, sqrt_one, one_div (sqrt _), ofReal_inv, ← one_div,
      one_div_one_div, mul_sub, mul_one]
    congr 2
    let τ : UpperHalfPlane := .mk (u * I) ((mul_I_im u).symm ▸ zero_lt_one.trans hu)
    convert jacobiTheta_S_smul τ using 2
    · rw [UpperHalfPlane.modular_S_smul, UpperHalfPlane.coe_mk, UpperHalfPlane.coe_mk, ← neg_inv,
        mul_inv, inv_I, mul_neg, neg_neg, one_div, ofReal_inv]
    · rw [UpperHalfPlane.coe_mk, mul_comm, mul_assoc, mul_neg, I_mul_I, neg_neg, mul_one,
        sqrt_eq_rpow, ofReal_cpow (zero_lt_one.trans hu).le]
      push_cast
      rfl
  

Proof state:
case inr
t : ℝ
ht : 0 ≤ t
h't : 0 < t
aux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u
⊢ zetaKernel₂ (1 / t) = ↑(sqrt t) * zetaKernel₂ t

Next tactic:
rcases lt_trichotomy 1 t with (h | h | h)
/-- Functional equation for `zetaKernel₂`. -/
theorem zetaKernel₂_one_div {t : ℝ} (ht : 0 ≤ t) :
    zetaKernel₂ (1 / t) = sqrt t * zetaKernel₂ t := by
  rcases ht.eq_or_lt with rfl|h't
  · simp [zetaKernel₂, zetaKernel₁]
  have aux : ∀ {u : ℝ} (_ : 1 < u), zetaKernel₂ (1 / u) = sqrt u * zetaKernel₂ u := by
    intro u hu
    simp_rw [zetaKernel₂, Pi.add_apply]
    rw [indicator_of_mem, indicator_of_not_mem (not_mem_Ioc_of_gt hu), add_zero]
    swap; · exact ⟨one_div_pos.mpr (zero_lt_one.trans hu), (one_div u).symm ▸ inv_le_one hu.le⟩
    rw [zetaKernel₁_eq_jacobiTheta (one_div_pos.mpr <| zero_lt_one.trans hu),
      zetaKernel₁_eq_jacobiTheta (zero_lt_one.trans hu), ← add_div, ← mul_div_assoc, add_sub,
      sub_add_cancel, sqrt_div zero_le_one, sqrt_one, one_div (sqrt _), ofReal_inv, ← one_div,
      one_div_one_div, mul_sub, mul_one]
    congr 2
    let τ : UpperHalfPlane := .mk (u * I) ((mul_I_im u).symm ▸ zero_lt_one.trans hu)
    convert jacobiTheta_S_smul τ using 2
    · rw [UpperHalfPlane.modular_S_smul, UpperHalfPlane.coe_mk, UpperHalfPlane.coe_mk, ← neg_inv,
        mul_inv, inv_I, mul_neg, neg_neg, one_div, ofReal_inv]
    · rw [UpperHalfPlane.coe_mk, mul_comm, mul_assoc, mul_neg, I_mul_I, neg_neg, mul_one,
        sqrt_eq_rpow, ofReal_cpow (zero_lt_one.trans hu).le]
      push_cast
      rfl
  rcases lt_trichotomy 1 t with (h | h | h)
  · 

Proof state:
case inr.inl
t : ℝ
ht : 0 ≤ t
h't : 0 < t
aux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u
h : 1 < t
⊢ zetaKernel₂ (1 / t) = ↑(sqrt t) * zetaKernel₂ t

Next tactic:
exact aux h
/-- Functional equation for `zetaKernel₂`. -/
theorem zetaKernel₂_one_div {t : ℝ} (ht : 0 ≤ t) :
    zetaKernel₂ (1 / t) = sqrt t * zetaKernel₂ t := by
  rcases ht.eq_or_lt with rfl|h't
  · simp [zetaKernel₂, zetaKernel₁]
  have aux : ∀ {u : ℝ} (_ : 1 < u), zetaKernel₂ (1 / u) = sqrt u * zetaKernel₂ u := by
    intro u hu
    simp_rw [zetaKernel₂, Pi.add_apply]
    rw [indicator_of_mem, indicator_of_not_mem (not_mem_Ioc_of_gt hu), add_zero]
    swap; · exact ⟨one_div_pos.mpr (zero_lt_one.trans hu), (one_div u).symm ▸ inv_le_one hu.le⟩
    rw [zetaKernel₁_eq_jacobiTheta (one_div_pos.mpr <| zero_lt_one.trans hu),
      zetaKernel₁_eq_jacobiTheta (zero_lt_one.trans hu), ← add_div, ← mul_div_assoc, add_sub,
      sub_add_cancel, sqrt_div zero_le_one, sqrt_one, one_div (sqrt _), ofReal_inv, ← one_div,
      one_div_one_div, mul_sub, mul_one]
    congr 2
    let τ : UpperHalfPlane := .mk (u * I) ((mul_I_im u).symm ▸ zero_lt_one.trans hu)
    convert jacobiTheta_S_smul τ using 2
    · rw [UpperHalfPlane.modular_S_smul, UpperHalfPlane.coe_mk, UpperHalfPlane.coe_mk, ← neg_inv,
        mul_inv, inv_I, mul_neg, neg_neg, one_div, ofReal_inv]
    · rw [UpperHalfPlane.coe_mk, mul_comm, mul_assoc, mul_neg, I_mul_I, neg_neg, mul_one,
        sqrt_eq_rpow, ofReal_cpow (zero_lt_one.trans hu).le]
      push_cast
      rfl
  rcases lt_trichotomy 1 t with (h | h | h)
  · exact aux h
  · 

Proof state:
case inr.inr.inl
t : ℝ
ht : 0 ≤ t
h't : 0 < t
aux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u
h : 1 = t
⊢ zetaKernel₂ (1 / t) = ↑(sqrt t) * zetaKernel₂ t

Next tactic:
simp only [← h, div_self, Ne.def, one_ne_zero, not_false_iff, sqrt_one, ofReal_one, one_mul]
/-- Functional equation for `zetaKernel₂`. -/
theorem zetaKernel₂_one_div {t : ℝ} (ht : 0 ≤ t) :
    zetaKernel₂ (1 / t) = sqrt t * zetaKernel₂ t := by
  rcases ht.eq_or_lt with rfl|h't
  · simp [zetaKernel₂, zetaKernel₁]
  have aux : ∀ {u : ℝ} (_ : 1 < u), zetaKernel₂ (1 / u) = sqrt u * zetaKernel₂ u := by
    intro u hu
    simp_rw [zetaKernel₂, Pi.add_apply]
    rw [indicator_of_mem, indicator_of_not_mem (not_mem_Ioc_of_gt hu), add_zero]
    swap; · exact ⟨one_div_pos.mpr (zero_lt_one.trans hu), (one_div u).symm ▸ inv_le_one hu.le⟩
    rw [zetaKernel₁_eq_jacobiTheta (one_div_pos.mpr <| zero_lt_one.trans hu),
      zetaKernel₁_eq_jacobiTheta (zero_lt_one.trans hu), ← add_div, ← mul_div_assoc, add_sub,
      sub_add_cancel, sqrt_div zero_le_one, sqrt_one, one_div (sqrt _), ofReal_inv, ← one_div,
      one_div_one_div, mul_sub, mul_one]
    congr 2
    let τ : UpperHalfPlane := .mk (u * I) ((mul_I_im u).symm ▸ zero_lt_one.trans hu)
    convert jacobiTheta_S_smul τ using 2
    · rw [UpperHalfPlane.modular_S_smul, UpperHalfPlane.coe_mk, UpperHalfPlane.coe_mk, ← neg_inv,
        mul_inv, inv_I, mul_neg, neg_neg, one_div, ofReal_inv]
    · rw [UpperHalfPlane.coe_mk, mul_comm, mul_assoc, mul_neg, I_mul_I, neg_neg, mul_one,
        sqrt_eq_rpow, ofReal_cpow (zero_lt_one.trans hu).le]
      push_cast
      rfl
  rcases lt_trichotomy 1 t with (h | h | h)
  · exact aux h
  · simp only [← h, div_self, Ne.def, one_ne_zero, not_false_iff, sqrt_one, ofReal_one, one_mul]
  · 

Proof state:
case inr.inr.inr
t : ℝ
ht : 0 ≤ t
h't : 0 < t
aux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u
h : t < 1
⊢ zetaKernel₂ (1 / t) = ↑(sqrt t) * zetaKernel₂ t

Next tactic:
have := aux (show 1 < 1 / t by rwa [lt_one_div (zero_lt_one' ℝ) h't, div_one])
/-- Functional equation for `zetaKernel₂`. -/
theorem zetaKernel₂_one_div {t : ℝ} (ht : 0 ≤ t) :
    zetaKernel₂ (1 / t) = sqrt t * zetaKernel₂ t := by
  rcases ht.eq_or_lt with rfl|h't
  · simp [zetaKernel₂, zetaKernel₁]
  have aux : ∀ {u : ℝ} (_ : 1 < u), zetaKernel₂ (1 / u) = sqrt u * zetaKernel₂ u := by
    intro u hu
    simp_rw [zetaKernel₂, Pi.add_apply]
    rw [indicator_of_mem, indicator_of_not_mem (not_mem_Ioc_of_gt hu), add_zero]
    swap; · exact ⟨one_div_pos.mpr (zero_lt_one.trans hu), (one_div u).symm ▸ inv_le_one hu.le⟩
    rw [zetaKernel₁_eq_jacobiTheta (one_div_pos.mpr <| zero_lt_one.trans hu),
      zetaKernel₁_eq_jacobiTheta (zero_lt_one.trans hu), ← add_div, ← mul_div_assoc, add_sub,
      sub_add_cancel, sqrt_div zero_le_one, sqrt_one, one_div (sqrt _), ofReal_inv, ← one_div,
      one_div_one_div, mul_sub, mul_one]
    congr 2
    let τ : UpperHalfPlane := .mk (u * I) ((mul_I_im u).symm ▸ zero_lt_one.trans hu)
    convert jacobiTheta_S_smul τ using 2
    · rw [UpperHalfPlane.modular_S_smul, UpperHalfPlane.coe_mk, UpperHalfPlane.coe_mk, ← neg_inv,
        mul_inv, inv_I, mul_neg, neg_neg, one_div, ofReal_inv]
    · rw [UpperHalfPlane.coe_mk, mul_comm, mul_assoc, mul_neg, I_mul_I, neg_neg, mul_one,
        sqrt_eq_rpow, ofReal_cpow (zero_lt_one.trans hu).le]
      push_cast
      rfl
  rcases lt_trichotomy 1 t with (h | h | h)
  · exact aux h
  · simp only [← h, div_self, Ne.def, one_ne_zero, not_false_iff, sqrt_one, ofReal_one, one_mul]
  · have := aux (show 1 < 1 / t by 

Proof state:
t : ℝ
ht : 0 ≤ t
h't : 0 < t
aux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u
h : t < 1
⊢ 1 < 1 / t

Next tactic:
rwa [lt_one_div (zero_lt_one' ℝ) h't, div_one]
/-- Functional equation for `zetaKernel₂`. -/
theorem zetaKernel₂_one_div {t : ℝ} (ht : 0 ≤ t) :
    zetaKernel₂ (1 / t) = sqrt t * zetaKernel₂ t := by
  rcases ht.eq_or_lt with rfl|h't
  · simp [zetaKernel₂, zetaKernel₁]
  have aux : ∀ {u : ℝ} (_ : 1 < u), zetaKernel₂ (1 / u) = sqrt u * zetaKernel₂ u := by
    intro u hu
    simp_rw [zetaKernel₂, Pi.add_apply]
    rw [indicator_of_mem, indicator_of_not_mem (not_mem_Ioc_of_gt hu), add_zero]
    swap; · exact ⟨one_div_pos.mpr (zero_lt_one.trans hu), (one_div u).symm ▸ inv_le_one hu.le⟩
    rw [zetaKernel₁_eq_jacobiTheta (one_div_pos.mpr <| zero_lt_one.trans hu),
      zetaKernel₁_eq_jacobiTheta (zero_lt_one.trans hu), ← add_div, ← mul_div_assoc, add_sub,
      sub_add_cancel, sqrt_div zero_le_one, sqrt_one, one_div (sqrt _), ofReal_inv, ← one_div,
      one_div_one_div, mul_sub, mul_one]
    congr 2
    let τ : UpperHalfPlane := .mk (u * I) ((mul_I_im u).symm ▸ zero_lt_one.trans hu)
    convert jacobiTheta_S_smul τ using 2
    · rw [UpperHalfPlane.modular_S_smul, UpperHalfPlane.coe_mk, UpperHalfPlane.coe_mk, ← neg_inv,
        mul_inv, inv_I, mul_neg, neg_neg, one_div, ofReal_inv]
    · rw [UpperHalfPlane.coe_mk, mul_comm, mul_assoc, mul_neg, I_mul_I, neg_neg, mul_one,
        sqrt_eq_rpow, ofReal_cpow (zero_lt_one.trans hu).le]
      push_cast
      rfl
  rcases lt_trichotomy 1 t with (h | h | h)
  · exact aux h
  · simp only [← h, div_self, Ne.def, one_ne_zero, not_false_iff, sqrt_one, ofReal_one, one_mul]
  · have := aux (show 1 < 1 / t by rwa [lt_one_div (zero_lt_one' ℝ) h't, div_one])
    

Proof state:
case inr.inr.inr
t : ℝ
ht : 0 ≤ t
h't : 0 < t
aux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u
h : t < 1
this : zetaKernel₂ (1 / (1 / t)) = ↑(sqrt (1 / t)) * zetaKernel₂ (1 / t)
⊢ zetaKernel₂ (1 / t) = ↑(sqrt t) * zetaKernel₂ t

Next tactic:
rw [one_div_one_div] at this
/-- Functional equation for `zetaKernel₂`. -/
theorem zetaKernel₂_one_div {t : ℝ} (ht : 0 ≤ t) :
    zetaKernel₂ (1 / t) = sqrt t * zetaKernel₂ t := by
  rcases ht.eq_or_lt with rfl|h't
  · simp [zetaKernel₂, zetaKernel₁]
  have aux : ∀ {u : ℝ} (_ : 1 < u), zetaKernel₂ (1 / u) = sqrt u * zetaKernel₂ u := by
    intro u hu
    simp_rw [zetaKernel₂, Pi.add_apply]
    rw [indicator_of_mem, indicator_of_not_mem (not_mem_Ioc_of_gt hu), add_zero]
    swap; · exact ⟨one_div_pos.mpr (zero_lt_one.trans hu), (one_div u).symm ▸ inv_le_one hu.le⟩
    rw [zetaKernel₁_eq_jacobiTheta (one_div_pos.mpr <| zero_lt_one.trans hu),
      zetaKernel₁_eq_jacobiTheta (zero_lt_one.trans hu), ← add_div, ← mul_div_assoc, add_sub,
      sub_add_cancel, sqrt_div zero_le_one, sqrt_one, one_div (sqrt _), ofReal_inv, ← one_div,
      one_div_one_div, mul_sub, mul_one]
    congr 2
    let τ : UpperHalfPlane := .mk (u * I) ((mul_I_im u).symm ▸ zero_lt_one.trans hu)
    convert jacobiTheta_S_smul τ using 2
    · rw [UpperHalfPlane.modular_S_smul, UpperHalfPlane.coe_mk, UpperHalfPlane.coe_mk, ← neg_inv,
        mul_inv, inv_I, mul_neg, neg_neg, one_div, ofReal_inv]
    · rw [UpperHalfPlane.coe_mk, mul_comm, mul_assoc, mul_neg, I_mul_I, neg_neg, mul_one,
        sqrt_eq_rpow, ofReal_cpow (zero_lt_one.trans hu).le]
      push_cast
      rfl
  rcases lt_trichotomy 1 t with (h | h | h)
  · exact aux h
  · simp only [← h, div_self, Ne.def, one_ne_zero, not_false_iff, sqrt_one, ofReal_one, one_mul]
  · have := aux (show 1 < 1 / t by rwa [lt_one_div (zero_lt_one' ℝ) h't, div_one])
    rw [one_div_one_div] at this
    

Proof state:
case inr.inr.inr
t : ℝ
ht : 0 ≤ t
h't : 0 < t
aux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u
h : t < 1
this : zetaKernel₂ t = ↑(sqrt (1 / t)) * zetaKernel₂ (1 / t)
⊢ zetaKernel₂ (1 / t) = ↑(sqrt t) * zetaKernel₂ t

Next tactic:
rw [this, ← mul_assoc, ← ofReal_mul, ← sqrt_mul ht, mul_one_div_cancel h't.ne', sqrt_one,
      ofReal_one, one_mul]
/-- Bound for `zetaKernel₁` for large `t`. -/
theorem isBigO_atTop_zetaKernel₁ : IsBigO atTop zetaKernel₁ fun t => exp (-π * t) := by
  

Proof state:
⊢ zetaKernel₁ =O[atTop] fun t => rexp (-π * t)

Next tactic:
have h := isBigO_at_im_infty_jacobiTheta_sub_one.const_mul_left (1 / 2)
/-- Bound for `zetaKernel₁` for large `t`. -/
theorem isBigO_atTop_zetaKernel₁ : IsBigO atTop zetaKernel₁ fun t => exp (-π * t) := by
  have h := isBigO_at_im_infty_jacobiTheta_sub_one.const_mul_left (1 / 2)
  

Proof state:
h : (fun x => 1 / 2 * (jacobiTheta x - 1)) =O[comap im atTop] fun τ => rexp (-π * τ.im)
⊢ zetaKernel₁ =O[atTop] fun t => rexp (-π * t)

Next tactic:
simp_rw [mul_comm (1 / 2 : ℂ) _, mul_one_div] at h
/-- Bound for `zetaKernel₁` for large `t`. -/
theorem isBigO_atTop_zetaKernel₁ : IsBigO atTop zetaKernel₁ fun t => exp (-π * t) := by
  have h := isBigO_at_im_infty_jacobiTheta_sub_one.const_mul_left (1 / 2)
  simp_rw [mul_comm (1 / 2 : ℂ) _, mul_one_div] at h
  

Proof state:
h : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)
⊢ zetaKernel₁ =O[atTop] fun t => rexp (-π * t)

Next tactic:
have h' : Tendsto (fun t : ℝ => ↑t * I) atTop (comap im atTop) := by
    rw [tendsto_comap_iff]
    convert tendsto_id
    ext1 t
    rw [Function.comp_apply, mul_I_im, ofReal_re, id.def]
/-- Bound for `zetaKernel₁` for large `t`. -/
theorem isBigO_atTop_zetaKernel₁ : IsBigO atTop zetaKernel₁ fun t => exp (-π * t) := by
  have h := isBigO_at_im_infty_jacobiTheta_sub_one.const_mul_left (1 / 2)
  simp_rw [mul_comm (1 / 2 : ℂ) _, mul_one_div] at h
  have h' : Tendsto (fun t : ℝ => ↑t * I) atTop (comap im atTop) := by
    

Proof state:
h : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)
⊢ Tendsto (fun t => ↑t * I) atTop (comap im atTop)

Next tactic:
rw [tendsto_comap_iff]
/-- Bound for `zetaKernel₁` for large `t`. -/
theorem isBigO_atTop_zetaKernel₁ : IsBigO atTop zetaKernel₁ fun t => exp (-π * t) := by
  have h := isBigO_at_im_infty_jacobiTheta_sub_one.const_mul_left (1 / 2)
  simp_rw [mul_comm (1 / 2 : ℂ) _, mul_one_div] at h
  have h' : Tendsto (fun t : ℝ => ↑t * I) atTop (comap im atTop) := by
    rw [tendsto_comap_iff]
    

Proof state:
h : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)
⊢ Tendsto (im ∘ fun t => ↑t * I) atTop atTop

Next tactic:
convert tendsto_id
/-- Bound for `zetaKernel₁` for large `t`. -/
theorem isBigO_atTop_zetaKernel₁ : IsBigO atTop zetaKernel₁ fun t => exp (-π * t) := by
  have h := isBigO_at_im_infty_jacobiTheta_sub_one.const_mul_left (1 / 2)
  simp_rw [mul_comm (1 / 2 : ℂ) _, mul_one_div] at h
  have h' : Tendsto (fun t : ℝ => ↑t * I) atTop (comap im atTop) := by
    rw [tendsto_comap_iff]
    convert tendsto_id
    

Proof state:
case h.e'_3
h : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)
⊢ (im ∘ fun t => ↑t * I) = id

Next tactic:
ext1 t
/-- Bound for `zetaKernel₁` for large `t`. -/
theorem isBigO_atTop_zetaKernel₁ : IsBigO atTop zetaKernel₁ fun t => exp (-π * t) := by
  have h := isBigO_at_im_infty_jacobiTheta_sub_one.const_mul_left (1 / 2)
  simp_rw [mul_comm (1 / 2 : ℂ) _, mul_one_div] at h
  have h' : Tendsto (fun t : ℝ => ↑t * I) atTop (comap im atTop) := by
    rw [tendsto_comap_iff]
    convert tendsto_id
    ext1 t
    

Proof state:
case h.e'_3.h
h : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)
t : ℝ
⊢ (im ∘ fun t => ↑t * I) t = id t

Next tactic:
rw [Function.comp_apply, mul_I_im, ofReal_re, id.def]
/-- Bound for `zetaKernel₁` for large `t`. -/
theorem isBigO_atTop_zetaKernel₁ : IsBigO atTop zetaKernel₁ fun t => exp (-π * t) := by
  have h := isBigO_at_im_infty_jacobiTheta_sub_one.const_mul_left (1 / 2)
  simp_rw [mul_comm (1 / 2 : ℂ) _, mul_one_div] at h
  have h' : Tendsto (fun t : ℝ => ↑t * I) atTop (comap im atTop) := by
    rw [tendsto_comap_iff]
    convert tendsto_id
    ext1 t
    rw [Function.comp_apply, mul_I_im, ofReal_re, id.def]
  

Proof state:
h : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)
h' : Tendsto (fun t => ↑t * I) atTop (comap im atTop)
⊢ zetaKernel₁ =O[atTop] fun t => rexp (-π * t)

Next tactic:
convert ((h.norm_left.comp_tendsto h').congr' (eventually_of_mem (Ioi_mem_atTop 0) fun t ht => _)
        (eventually_of_mem (Ioi_mem_atTop 0) fun t _ => _)).of_norm_left (E' := ℂ)
/-- Bound for `zetaKernel₁` for large `t`. -/
theorem isBigO_atTop_zetaKernel₁ : IsBigO atTop zetaKernel₁ fun t => exp (-π * t) := by
  have h := isBigO_at_im_infty_jacobiTheta_sub_one.const_mul_left (1 / 2)
  simp_rw [mul_comm (1 / 2 : ℂ) _, mul_one_div] at h
  have h' : Tendsto (fun t : ℝ => ↑t * I) atTop (comap im atTop) := by
    rw [tendsto_comap_iff]
    convert tendsto_id
    ext1 t
    rw [Function.comp_apply, mul_I_im, ofReal_re, id.def]
  convert ((h.norm_left.comp_tendsto h').congr' (eventually_of_mem (Ioi_mem_atTop 0) fun t ht => _)
        (eventually_of_mem (Ioi_mem_atTop 0) fun t _ => _)).of_norm_left (E' := ℂ)
  · 

Proof state:
case convert_1
h : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)
h' : Tendsto (fun t => ↑t * I) atTop (comap im atTop)
t : ℝ
ht : t ∈ Ioi 0
⊢ ((fun x => ‖(jacobiTheta x - 1) / 2‖) ∘ fun t => ↑t * I) t = ‖zetaKernel₁ t‖

Next tactic:
rw [Function.comp_apply, ← zetaKernel₁_eq_jacobiTheta ht]
/-- Bound for `zetaKernel₁` for large `t`. -/
theorem isBigO_atTop_zetaKernel₁ : IsBigO atTop zetaKernel₁ fun t => exp (-π * t) := by
  have h := isBigO_at_im_infty_jacobiTheta_sub_one.const_mul_left (1 / 2)
  simp_rw [mul_comm (1 / 2 : ℂ) _, mul_one_div] at h
  have h' : Tendsto (fun t : ℝ => ↑t * I) atTop (comap im atTop) := by
    rw [tendsto_comap_iff]
    convert tendsto_id
    ext1 t
    rw [Function.comp_apply, mul_I_im, ofReal_re, id.def]
  convert ((h.norm_left.comp_tendsto h').congr' (eventually_of_mem (Ioi_mem_atTop 0) fun t ht => _)
        (eventually_of_mem (Ioi_mem_atTop 0) fun t _ => _)).of_norm_left (E' := ℂ)
  · rw [Function.comp_apply, ← zetaKernel₁_eq_jacobiTheta ht]
  · 

Proof state:
case convert_2
h : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)
h' : Tendsto (fun t => ↑t * I) atTop (comap im atTop)
t : ℝ
x✝ : t ∈ Ioi 0
⊢ ((fun τ => rexp (-π * τ.im)) ∘ fun t => ↑t * I) t = rexp (-π * t)

Next tactic:
rw [Function.comp_apply, mul_I_im, ofReal_re]
/-- Bound for `zetaKernel₂` for large `t`. -/
theorem isBigO_atTop_zetaKernel₂ : IsBigO atTop zetaKernel₂ fun t => exp (-π * t) := by
  

Proof state:
⊢ zetaKernel₂ =O[atTop] fun t => rexp (-π * t)

Next tactic:
refine'
    (eventuallyEq_of_mem (Ioi_mem_atTop (1 : ℝ)) fun t ht => _).trans_isBigO
      isBigO_atTop_zetaKernel₁
/-- Bound for `zetaKernel₂` for large `t`. -/
theorem isBigO_atTop_zetaKernel₂ : IsBigO atTop zetaKernel₂ fun t => exp (-π * t) := by
  refine'
    (eventuallyEq_of_mem (Ioi_mem_atTop (1 : ℝ)) fun t ht => _).trans_isBigO
      isBigO_atTop_zetaKernel₁
  

Proof state:
t : ℝ
ht : t ∈ Ioi 1
⊢ zetaKernel₂ t = zetaKernel₁ t

Next tactic:
rw [zetaKernel₂, Pi.add_apply, indicator_of_not_mem (not_mem_Ioc_of_gt (Set.mem_Iio.mp ht)),
    add_zero]
/-- Precise but awkward-to-use bound for `zetaKernel₂` for `t → 0`. -/
theorem isBigO_zero_zetaKernel₂ : IsBigO (𝓝[>] 0) zetaKernel₂ fun t => exp (-π / t) / sqrt t := by
  

Proof state:
⊢ zetaKernel₂ =O[𝓝[>] 0] fun t => rexp (-π / t) / sqrt t

Next tactic:
have h1 := isBigO_atTop_zetaKernel₂.comp_tendsto tendsto_inv_zero_atTop
/-- Precise but awkward-to-use bound for `zetaKernel₂` for `t → 0`. -/
theorem isBigO_zero_zetaKernel₂ : IsBigO (𝓝[>] 0) zetaKernel₂ fun t => exp (-π / t) / sqrt t := by
  have h1 := isBigO_atTop_zetaKernel₂.comp_tendsto tendsto_inv_zero_atTop
  

Proof state:
h1 : (zetaKernel₂ ∘ fun x => x⁻¹) =O[𝓝[>] 0] ((fun t => rexp (-π * t)) ∘ fun x => x⁻¹)
⊢ zetaKernel₂ =O[𝓝[>] 0] fun t => rexp (-π / t) / sqrt t

Next tactic:
simp_rw [← one_div] at h1
/-- Precise but awkward-to-use bound for `zetaKernel₂` for `t → 0`. -/
theorem isBigO_zero_zetaKernel₂ : IsBigO (𝓝[>] 0) zetaKernel₂ fun t => exp (-π / t) / sqrt t := by
  have h1 := isBigO_atTop_zetaKernel₂.comp_tendsto tendsto_inv_zero_atTop
  simp_rw [← one_div] at h1
  

Proof state:
h1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[>] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)
⊢ zetaKernel₂ =O[𝓝[>] 0] fun t => rexp (-π / t) / sqrt t

Next tactic:
have h2 : zetaKernel₂ ∘ Div.div 1 =ᶠ[𝓝[>] 0] fun t => sqrt t * zetaKernel₂ t :=
    eventually_of_mem self_mem_nhdsWithin fun t ht => by
      dsimp only; rw [← zetaKernel₂_one_div (le_of_lt ht)]; rfl
/-- Precise but awkward-to-use bound for `zetaKernel₂` for `t → 0`. -/
theorem isBigO_zero_zetaKernel₂ : IsBigO (𝓝[>] 0) zetaKernel₂ fun t => exp (-π / t) / sqrt t := by
  have h1 := isBigO_atTop_zetaKernel₂.comp_tendsto tendsto_inv_zero_atTop
  simp_rw [← one_div] at h1
  have h2 : zetaKernel₂ ∘ Div.div 1 =ᶠ[𝓝[>] 0] fun t => sqrt t * zetaKernel₂ t :=
    eventually_of_mem self_mem_nhdsWithin fun t ht => by
      

Proof state:
h1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[>] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)
t : ℝ
ht : t ∈ Ioi 0
⊢ (zetaKernel₂ ∘ Div.div 1) t = (fun t => ↑(sqrt t) * zetaKernel₂ t) t

Next tactic:
dsimp only