Theorem: HurwitzKernelBounds.isBigO_atTop_F_nat_zero_sub
File: Mathlib/NumberTheory/ModularForms/JacobiTheta/Bounds.lean

tactic: split_ifs with h
state_before: a : ℝ
ha : 0 ≤ a
⊢ ∃ p, 0 < p ∧ (fun t => F_nat 0 a t - if a = 0 then 1 else 0) =O[atTop] fun t => rexp (-p * t)
state_after: case pos
a : ℝ
ha : 0 ≤ a
h : a = 0
⊢ ∃ p, 0 < p ∧ (fun t => F_nat 0 a t - 1) =O[atTop] fun t => rexp (-p * t)

case neg
a : ℝ
ha : 0 ≤ a
h : ¬a = 0
⊢ ∃ p, 0 < p ∧ (fun t => F_nat 0 a t - 0) =O[atTop] fun t => rexp (-p * t)

tactic: rw [h]
state_before: case pos
a : ℝ
ha : 0 ≤ a
h : a = 0
⊢ ∃ p, 0 < p ∧ (fun t => F_nat 0 a t - 1) =O[atTop] fun t => rexp (-p * t)
state_after: case pos
a : ℝ
ha : 0 ≤ a
h : a = 0
⊢ ∃ p, 0 < p ∧ (fun t => F_nat 0 0 t - 1) =O[atTop] fun t => rexp (-p * t)

tactic: have : (fun t ↦ F_nat 0 0 t - 1) =O[atTop] fun t ↦ rexp (-π * t) / (1 - rexp (-π * t)) := by
  apply Eventually.isBigO
  filter_upwards [eventually_gt_atTop 0] with t ht
  exact F_nat_zero_zero_sub_le ht
state_before: case pos
a : ℝ
ha : 0 ≤ a
h : a = 0
⊢ ∃ p, 0 < p ∧ (fun t => F_nat 0 0 t - 1) =O[atTop] fun t => rexp (-p * t)
state_after: case pos
a : ℝ
ha : 0 ≤ a
h : a = 0
this : (fun t => F_nat 0 0 t - 1) =O[atTop] fun t => rexp (-π * t) / (1 - rexp (-π * t))
⊢ ∃ p, 0 < p ∧ (fun t => F_nat 0 0 t - 1) =O[atTop] fun t => rexp (-p * t)

tactic: refine ⟨_, pi_pos, this.trans ?_⟩
state_before: case pos
a : ℝ
ha : 0 ≤ a
h : a = 0
this : (fun t => F_nat 0 0 t - 1) =O[atTop] fun t => rexp (-π * t) / (1 - rexp (-π * t))
⊢ ∃ p, 0 < p ∧ (fun t => F_nat 0 0 t - 1) =O[atTop] fun t => rexp (-p * t)
state_after: case pos
a : ℝ
ha : 0 ≤ a
h : a = 0
this : (fun t => F_nat 0 0 t - 1) =O[atTop] fun t => rexp (-π * t) / (1 - rexp (-π * t))
⊢ (fun t => rexp (-π * t) / (1 - rexp (-π * t))) =O[atTop] fun t => rexp (-π * t)

tactic: simpa using (isBigO_refl (fun t ↦ rexp (-π * t)) _).mul isBigO_one_aux
state_before: case pos
a : ℝ
ha : 0 ≤ a
h : a = 0
this : (fun t => F_nat 0 0 t - 1) =O[atTop] fun t => rexp (-π * t) / (1 - rexp (-π * t))
⊢ (fun t => rexp (-π * t) / (1 - rexp (-π * t))) =O[atTop] fun t => rexp (-π * t)
state_after: no goals

tactic: apply Eventually.isBigO
state_before: a : ℝ
ha : 0 ≤ a
h : a = 0
⊢ (fun t => F_nat 0 0 t - 1) =O[atTop] fun t => rexp (-π * t) / (1 - rexp (-π * t))
state_after: case hfg
a : ℝ
ha : 0 ≤ a
h : a = 0
⊢ ∀ᶠ (x : ℝ) in atTop, ‖F_nat 0 0 x - 1‖ ≤ rexp (-π * x) / (1 - rexp (-π * x))

tactic: filter_upwards [eventually_gt_atTop 0] with t ht
state_before: case hfg
a : ℝ
ha : 0 ≤ a
h : a = 0
⊢ ∀ᶠ (x : ℝ) in atTop, ‖F_nat 0 0 x - 1‖ ≤ rexp (-π * x) / (1 - rexp (-π * x))
state_after: case h
a : ℝ
ha : 0 ≤ a
h : a = 0
t : ℝ
ht : 0 < t
⊢ ‖F_nat 0 0 t - 1‖ ≤ rexp (-π * t) / (1 - rexp (-π * t))

tactic: exact F_nat_zero_zero_sub_le ht
state_before: case h
a : ℝ
ha : 0 ≤ a
h : a = 0
t : ℝ
ht : 0 < t
⊢ ‖F_nat 0 0 t - 1‖ ≤ rexp (-π * t) / (1 - rexp (-π * t))
state_after: no goals

tactic: simp_rw [sub_zero]
state_before: case neg
a : ℝ
ha : 0 ≤ a
h : ¬a = 0
⊢ ∃ p, 0 < p ∧ (fun t => F_nat 0 a t - 0) =O[atTop] fun t => rexp (-p * t)
state_after: case neg
a : ℝ
ha : 0 ≤ a
h : ¬a = 0
⊢ ∃ p, 0 < p ∧ (fun t => F_nat 0 a t) =O[atTop] fun t => rexp (-p * t)

tactic: have : (fun t ↦ F_nat 0 a t) =O[atTop] fun t ↦ rexp (-π * a ^ 2 * t) / (1 - rexp (-π * t)) := by
  apply Eventually.isBigO
  filter_upwards [eventually_gt_atTop 0] with t ht
  exact F_nat_zero_le ha ht
state_before: case neg
a : ℝ
ha : 0 ≤ a
h : ¬a = 0
⊢ ∃ p, 0 < p ∧ (fun t => F_nat 0 a t) =O[atTop] fun t => rexp (-p * t)
state_after: case neg
a : ℝ
ha : 0 ≤ a
h : ¬a = 0
this : (fun t => F_nat 0 a t) =O[atTop] fun t => rexp (-π * a ^ 2 * t) / (1 - rexp (-π * t))
⊢ ∃ p, 0 < p ∧ (fun t => F_nat 0 a t) =O[atTop] fun t => rexp (-p * t)

tactic: refine ⟨π * a ^ 2, mul_pos pi_pos (sq_pos_of_ne_zero h), this.trans ?_⟩
state_before: case neg
a : ℝ
ha : 0 ≤ a
h : ¬a = 0
this : (fun t => F_nat 0 a t) =O[atTop] fun t => rexp (-π * a ^ 2 * t) / (1 - rexp (-π * t))
⊢ ∃ p, 0 < p ∧ (fun t => F_nat 0 a t) =O[atTop] fun t => rexp (-p * t)
state_after: case neg
a : ℝ
ha : 0 ≤ a
h : ¬a = 0
this : (fun t => F_nat 0 a t) =O[atTop] fun t => rexp (-π * a ^ 2 * t) / (1 - rexp (-π * t))
⊢ (fun t => rexp (-π * a ^ 2 * t) / (1 - rexp (-π * t))) =O[atTop] fun t => rexp (-(π * a ^ 2) * t)

tactic: simpa only [neg_mul π (a ^ 2), mul_one] using (isBigO_refl _ _).mul isBigO_one_aux
state_before: case neg
a : ℝ
ha : 0 ≤ a
h : ¬a = 0
this : (fun t => F_nat 0 a t) =O[atTop] fun t => rexp (-π * a ^ 2 * t) / (1 - rexp (-π * t))
⊢ (fun t => rexp (-π * a ^ 2 * t) / (1 - rexp (-π * t))) =O[atTop] fun t => rexp (-(π * a ^ 2) * t)
state_after: no goals

tactic: apply Eventually.isBigO
state_before: a : ℝ
ha : 0 ≤ a
h : ¬a = 0
⊢ (fun t => F_nat 0 a t) =O[atTop] fun t => rexp (-π * a ^ 2 * t) / (1 - rexp (-π * t))
state_after: case hfg
a : ℝ
ha : 0 ≤ a
h : ¬a = 0
⊢ ∀ᶠ (x : ℝ) in atTop, ‖F_nat 0 a x‖ ≤ rexp (-π * a ^ 2 * x) / (1 - rexp (-π * x))

tactic: filter_upwards [eventually_gt_atTop 0] with t ht
state_before: case hfg
a : ℝ
ha : 0 ≤ a
h : ¬a = 0
⊢ ∀ᶠ (x : ℝ) in atTop, ‖F_nat 0 a x‖ ≤ rexp (-π * a ^ 2 * x) / (1 - rexp (-π * x))
state_after: case h
a : ℝ
ha : 0 ≤ a
h : ¬a = 0
t : ℝ
ht : 0 < t
⊢ ‖F_nat 0 a t‖ ≤ rexp (-π * a ^ 2 * t) / (1 - rexp (-π * t))

tactic: exact F_nat_zero_le ha ht
state_before: case h
a : ℝ
ha : 0 ≤ a
h : ¬a = 0
t : ℝ
ht : 0 < t
⊢ ‖F_nat 0 a t‖ ≤ rexp (-π * a ^ 2 * t) / (1 - rexp (-π * t))
state_after: no goals