-- Mathlib/Analysis/Complex/PhragmenLindelof.lean
theorem isBigO_sub_exp_rpow {a : ℝ} {f g : ℂ → E} {l : Filter ℂ}
    (hBf : ∃ c < a, ∃ B, f =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c))
    (hBg : ∃ c < a, ∃ B, g =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)) :
    ∃ c < a, ∃ B, (f - g) =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)

Proof state:
case intro.intro.intro
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
hBg : ∃ c < a, ∃ B, g =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)
this :
  ∀ {c₁ c₂ B₁ B₂ : ℝ},
    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → (fun z => expR (B₁ * ‖z‖ ^ c₁)) =O[cobounded ℂ ⊓ l] fun z => expR (B₂ * ‖z‖ ^ c₂)
cf : ℝ
hcf : cf < a
Bf : ℝ
hOf : f =O[cobounded ℂ ⊓ l] fun z => expR (Bf * ‖z‖ ^ cf)
⊢ ∃ c < a, ∃ B, (f - g) =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)

Tactic:
rcases hBg with ⟨cg, hcg, Bg, hOg⟩

Result:
case intro.intro.intro.intro.intro.intro
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
this :
  ∀ {c₁ c₂ B₁ B₂ : ℝ},
    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → (fun z => expR (B₁ * ‖z‖ ^ c₁)) =O[cobounded ℂ ⊓ l] fun z => expR (B₂ * ‖z‖ ^ c₂)
cf : ℝ
hcf : cf < a
Bf : ℝ
hOf : f =O[cobounded ℂ ⊓ l] fun z => expR (Bf * ‖z‖ ^ cf)
cg : ℝ
hcg : cg < a
Bg : ℝ
hOg : g =O[cobounded ℂ ⊓ l] fun z => expR (Bg * ‖z‖ ^ cg)
⊢ ∃ c < a, ∃ B, (f - g) =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)

Proof state:
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
hBf : ∃ c < a, ∃ B, f =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)
hBg : ∃ c < a, ∃ B, g =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)
c₁✝ c₂✝ B₁✝ B₂✝ : ℝ
hc : c₁✝ ≤ c₂✝
hB₀ : 0 ≤ B₂✝
hB : B₁✝ ≤ B₂✝
⊢ (fun x => ‖expR (B₁✝ * ‖x‖ ^ c₁✝)‖) ≤ᶠ[cobounded ℂ ⊓ l] fun z => expR (B₂✝ * ‖z‖ ^ c₂✝)

Tactic:
filter_upwards [(eventually_cobounded_le_norm 1).filter_mono inf_le_left] with z hz

Result:
case h
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
hBf : ∃ c < a, ∃ B, f =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)
hBg : ∃ c < a, ∃ B, g =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)
c₁✝ c₂✝ B₁✝ B₂✝ : ℝ
hc : c₁✝ ≤ c₂✝
hB₀ : 0 ≤ B₂✝
hB : B₁✝ ≤ B₂✝
z : ℂ
hz : 1 ≤ ‖z‖
⊢ ‖expR (B₁✝ * ‖z‖ ^ c₁✝)‖ ≤ expR (B₂✝ * ‖z‖ ^ c₂✝)

Proof state:
case h
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
hBf : ∃ c < a, ∃ B, f =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)
hBg : ∃ c < a, ∃ B, g =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)
c₁✝ c₂✝ B₁✝ B₂✝ : ℝ
hc : c₁✝ ≤ c₂✝
hB₀ : 0 ≤ B₂✝
hB : B₁✝ ≤ B₂✝
z : ℂ
hz : 1 ≤ ‖z‖
⊢ ‖expR (B₁✝ * ‖z‖ ^ c₁✝)‖ ≤ expR (B₂✝ * ‖z‖ ^ c₂✝)

Tactic:
simp only [Real.norm_eq_abs, Real.abs_exp]

Result:
case h
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
hBf : ∃ c < a, ∃ B, f =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)
hBg : ∃ c < a, ∃ B, g =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)
c₁✝ c₂✝ B₁✝ B₂✝ : ℝ
hc : c₁✝ ≤ c₂✝
hB₀ : 0 ≤ B₂✝
hB : B₁✝ ≤ B₂✝
z : ℂ
hz : 1 ≤ ‖z‖
⊢ expR (B₁✝ * ‖z‖ ^ c₁✝) ≤ expR (B₂✝ * ‖z‖ ^ c₂✝)

Proof state:
case intro.intro.intro.intro.intro.intro.refine_1
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
this :
  ∀ {c₁ c₂ B₁ B₂ : ℝ},
    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → (fun z => expR (B₁ * ‖z‖ ^ c₁)) =O[cobounded ℂ ⊓ l] fun z => expR (B₂ * ‖z‖ ^ c₂)
cf : ℝ
hcf : cf < a
Bf : ℝ
hOf : f =O[cobounded ℂ ⊓ l] fun z => expR (Bf * ‖z‖ ^ cf)
cg : ℝ
hcg : cg < a
Bg : ℝ
hOg : g =O[cobounded ℂ ⊓ l] fun z => expR (Bg * ‖z‖ ^ cg)
⊢ cf ≤ cf ⊔ cg

case intro.intro.intro.intro.intro.intro.refine_2
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
this :
  ∀ {c₁ c₂ B₁ B₂ : ℝ},
    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → (fun z => expR (B₁ * ‖z‖ ^ c₁)) =O[cobounded ℂ ⊓ l] fun z => expR (B₂ * ‖z‖ ^ c₂)
cf : ℝ
hcf : cf < a
Bf : ℝ
hOf : f =O[cobounded ℂ ⊓ l] fun z => expR (Bf * ‖z‖ ^ cf)
cg : ℝ
hcg : cg < a
Bg : ℝ
hOg : g =O[cobounded ℂ ⊓ l] fun z => expR (Bg * ‖z‖ ^ cg)
⊢ 0 ≤ 0 ⊔ (Bf ⊔ Bg)

case intro.intro.intro.intro.intro.intro.refine_3
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
this :
  ∀ {c₁ c₂ B₁ B₂ : ℝ},
    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → (fun z => expR (B₁ * ‖z‖ ^ c₁)) =O[cobounded ℂ ⊓ l] fun z => expR (B₂ * ‖z‖ ^ c₂)
cf : ℝ
hcf : cf < a
Bf : ℝ
hOf : f =O[cobounded ℂ ⊓ l] fun z => expR (Bf * ‖z‖ ^ cf)
cg : ℝ
hcg : cg < a
Bg : ℝ
hOg : g =O[cobounded ℂ ⊓ l] fun z => expR (Bg * ‖z‖ ^ cg)
⊢ Bf ≤ 0 ⊔ (Bf ⊔ Bg)

case intro.intro.intro.intro.intro.intro.refine_4
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
this :
  ∀ {c₁ c₂ B₁ B₂ : ℝ},
    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → (fun z => expR (B₁ * ‖z‖ ^ c₁)) =O[cobounded ℂ ⊓ l] fun z => expR (B₂ * ‖z‖ ^ c₂)
cf : ℝ
hcf : cf < a
Bf : ℝ
hOf : f =O[cobounded ℂ ⊓ l] fun z => expR (Bf * ‖z‖ ^ cf)
cg : ℝ
hcg : cg < a
Bg : ℝ
hOg : g =O[cobounded ℂ ⊓ l] fun z => expR (Bg * ‖z‖ ^ cg)
⊢ cg ≤ cf ⊔ cg

case intro.intro.intro.intro.intro.intro.refine_5
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
this :
  ∀ {c₁ c₂ B₁ B₂ : ℝ},
    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → (fun z => expR (B₁ * ‖z‖ ^ c₁)) =O[cobounded ℂ ⊓ l] fun z => expR (B₂ * ‖z‖ ^ c₂)
cf : ℝ
hcf : cf < a
Bf : ℝ
hOf : f =O[cobounded ℂ ⊓ l] fun z => expR (Bf * ‖z‖ ^ cf)
cg : ℝ
hcg : cg < a
Bg : ℝ
hOg : g =O[cobounded ℂ ⊓ l] fun z => expR (Bg * ‖z‖ ^ cg)
⊢ 0 ≤ 0 ⊔ (Bf ⊔ Bg)

case intro.intro.intro.intro.intro.intro.refine_6
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
this :
  ∀ {c₁ c₂ B₁ B₂ : ℝ},
    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → (fun z => expR (B₁ * ‖z‖ ^ c₁)) =O[cobounded ℂ ⊓ l] fun z => expR (B₂ * ‖z‖ ^ c₂)
cf : ℝ
hcf : cf < a
Bf : ℝ
hOf : f =O[cobounded ℂ ⊓ l] fun z => expR (Bf * ‖z‖ ^ cf)
cg : ℝ
hcg : cg < a
Bg : ℝ
hOg : g =O[cobounded ℂ ⊓ l] fun z => expR (Bg * ‖z‖ ^ cg)
⊢ Bg ≤ 0 ⊔ (Bf ⊔ Bg)

Tactic:
exacts [le_max_left _ _, le_max_left _ _, (le_max_left _ _).trans (le_max_right _ _),
  le_max_right _ _, le_max_left _ _, (le_max_right _ _).trans (le_max_right _ _)]

Result:
no goals

Proof state:
case intro.intro.intro.intro.intro.intro
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
this :
  ∀ {c₁ c₂ B₁ B₂ : ℝ},
    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → (fun z => expR (B₁ * ‖z‖ ^ c₁)) =O[cobounded ℂ ⊓ l] fun z => expR (B₂ * ‖z‖ ^ c₂)
cf : ℝ
hcf : cf < a
Bf : ℝ
hOf : f =O[cobounded ℂ ⊓ l] fun z => expR (Bf * ‖z‖ ^ cf)
cg : ℝ
hcg : cg < a
Bg : ℝ
hOg : g =O[cobounded ℂ ⊓ l] fun z => expR (Bg * ‖z‖ ^ cg)
⊢ ∃ c < a, ∃ B, (f - g) =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)

Tactic:
refine ⟨max cf cg, max_lt hcf hcg, max 0 (max Bf Bg), ?_⟩

Result:
case intro.intro.intro.intro.intro.intro
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℝ
f g : ℂ → E
l : Filter ℂ
this :
  ∀ {c₁ c₂ B₁ B₂ : ℝ},
    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → (fun z => expR (B₁ * ‖z‖ ^ c₁)) =O[cobounded ℂ ⊓ l] fun z => expR (B₂ * ‖z‖ ^ c₂)
cf : ℝ
hcf : cf < a
Bf : ℝ
hOf : f =O[cobounded ℂ ⊓ l] fun z => expR (Bf * ‖z‖ ^ cf)
cg : ℝ
hcg : cg < a
Bg : ℝ
hOg : g =O[cobounded ℂ ⊓ l] fun z => expR (Bg * ‖z‖ ^ cg)
⊢ (f - g) =O[cobounded ℂ ⊓ l] fun z => expR ((0 ⊔ (Bf ⊔ Bg)) * ‖z‖ ^ (cf ⊔ cg))