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

tactic: obtain ⟨a, ha, rfl⟩ := a.eq_coe_Ico
state_before: a : UnitAddCircle
⊢ ∃ p, 0 < p ∧ F_int 1 a =O[atTop] fun t => rexp (-p * t)
state_after: case intro.intro
a : ℝ
ha : a ∈ Ico 0 1
⊢ ∃ p, 0 < p ∧ F_int 1 ↑a =O[atTop] fun t => rexp (-p * t)

tactic: obtain ⟨p, hp, hp'⟩ := isBigO_atTop_F_nat_one ha.1
state_before: case intro.intro
a : ℝ
ha : a ∈ Ico 0 1
⊢ ∃ p, 0 < p ∧ F_int 1 ↑a =O[atTop] fun t => rexp (-p * t)
state_after: case intro.intro.intro.intro
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
⊢ ∃ p, 0 < p ∧ F_int 1 ↑a =O[atTop] fun t => rexp (-p * t)

tactic: obtain ⟨q, hq, hq'⟩ := isBigO_atTop_F_nat_one (sub_nonneg.mpr ha.2.le)
state_before: case intro.intro.intro.intro
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
⊢ ∃ p, 0 < p ∧ F_int 1 ↑a =O[atTop] fun t => rexp (-p * t)
state_after: case intro.intro.intro.intro.intro.intro
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
q : ℝ
hq : 0 < q
hq' : F_nat 1 (1 - a) =O[atTop] fun t => rexp (-q * t)
⊢ ∃ p, 0 < p ∧ F_int 1 ↑a =O[atTop] fun t => rexp (-p * t)

tactic: refine ⟨_, lt_min hp hq, ?_⟩
state_before: case intro.intro.intro.intro.intro.intro
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
q : ℝ
hq : 0 < q
hq' : F_nat 1 (1 - a) =O[atTop] fun t => rexp (-q * t)
⊢ ∃ p, 0 < p ∧ F_int 1 ↑a =O[atTop] fun t => rexp (-p * t)
state_after: case intro.intro.intro.intro.intro.intro
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
q : ℝ
hq : 0 < q
hq' : F_nat 1 (1 - a) =O[atTop] fun t => rexp (-q * t)
⊢ F_int 1 ↑a =O[atTop] fun t => rexp (-min p q * t)

tactic: have : F_int 1 a =ᶠ[atTop] fun t ↦ F_nat 1 a t + F_nat 1 (1 - a) t := by
  filter_upwards [eventually_gt_atTop 0] with t ht
  exact F_int_eq_of_mem_Icc 1 (Ico_subset_Icc_self ha) ht
state_before: case intro.intro.intro.intro.intro.intro
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
q : ℝ
hq : 0 < q
hq' : F_nat 1 (1 - a) =O[atTop] fun t => rexp (-q * t)
⊢ F_int 1 ↑a =O[atTop] fun t => rexp (-min p q * t)
state_after: case intro.intro.intro.intro.intro.intro
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
q : ℝ
hq : 0 < q
hq' : F_nat 1 (1 - a) =O[atTop] fun t => rexp (-q * t)
this : F_int 1 ↑a =ᶠ[atTop] fun t => F_nat 1 a t + F_nat 1 (1 - a) t
⊢ F_int 1 ↑a =O[atTop] fun t => rexp (-min p q * t)

tactic: refine this.isBigO.trans ((hp'.trans ?_).add (hq'.trans ?_)) <;>
apply isBigO_exp_neg_mul_of_le
state_before: case intro.intro.intro.intro.intro.intro
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
q : ℝ
hq : 0 < q
hq' : F_nat 1 (1 - a) =O[atTop] fun t => rexp (-q * t)
this : F_int 1 ↑a =ᶠ[atTop] fun t => F_nat 1 a t + F_nat 1 (1 - a) t
⊢ F_int 1 ↑a =O[atTop] fun t => rexp (-min p q * t)
state_after: case intro.intro.intro.intro.intro.intro.refine_1.hcd
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
q : ℝ
hq : 0 < q
hq' : F_nat 1 (1 - a) =O[atTop] fun t => rexp (-q * t)
this : F_int 1 ↑a =ᶠ[atTop] fun t => F_nat 1 a t + F_nat 1 (1 - a) t
⊢ min p q ≤ p

case intro.intro.intro.intro.intro.intro.refine_2.hcd
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
q : ℝ
hq : 0 < q
hq' : F_nat 1 (1 - a) =O[atTop] fun t => rexp (-q * t)
this : F_int 1 ↑a =ᶠ[atTop] fun t => F_nat 1 a t + F_nat 1 (1 - a) t
⊢ min p q ≤ q

tactic: exacts [min_le_left .., min_le_right ..]
state_before: case intro.intro.intro.intro.intro.intro.refine_1.hcd
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
q : ℝ
hq : 0 < q
hq' : F_nat 1 (1 - a) =O[atTop] fun t => rexp (-q * t)
this : F_int 1 ↑a =ᶠ[atTop] fun t => F_nat 1 a t + F_nat 1 (1 - a) t
⊢ min p q ≤ p

case intro.intro.intro.intro.intro.intro.refine_2.hcd
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
q : ℝ
hq : 0 < q
hq' : F_nat 1 (1 - a) =O[atTop] fun t => rexp (-q * t)
this : F_int 1 ↑a =ᶠ[atTop] fun t => F_nat 1 a t + F_nat 1 (1 - a) t
⊢ min p q ≤ q
state_after: no goals

tactic: filter_upwards [eventually_gt_atTop 0] with t ht
state_before: a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
q : ℝ
hq : 0 < q
hq' : F_nat 1 (1 - a) =O[atTop] fun t => rexp (-q * t)
⊢ F_int 1 ↑a =ᶠ[atTop] fun t => F_nat 1 a t + F_nat 1 (1 - a) t
state_after: case h
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
q : ℝ
hq : 0 < q
hq' : F_nat 1 (1 - a) =O[atTop] fun t => rexp (-q * t)
t : ℝ
ht : 0 < t
⊢ F_int 1 (↑a) t = F_nat 1 a t + F_nat 1 (1 - a) t

tactic: exact F_int_eq_of_mem_Icc 1 (Ico_subset_Icc_self ha) ht
state_before: case h
a : ℝ
ha : a ∈ Ico 0 1
p : ℝ
hp : 0 < p
hp' : F_nat 1 a =O[atTop] fun t => rexp (-p * t)
q : ℝ
hq : 0 < q
hq' : F_nat 1 (1 - a) =O[atTop] fun t => rexp (-q * t)
t : ℝ
ht : 0 < t
⊢ F_int 1 (↑a) t = F_nat 1 a t + F_nat 1 (1 - a) t
state_after: no goals