-- 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:
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 < a, ∃ B, (f - g) =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)

Tactic:
have : ∀ {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₂) := fun hc hB₀ hB ↦ .of_norm_eventuallyLE <| by
  filter_upwards [(eventually_cobounded_le_norm 1).filter_mono inf_le_left] with z hz
  simp only [Real.norm_eq_abs, Real.abs_exp]
  gcongr; assumption

Result:
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)
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₂)
⊢ ∃ 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)
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₂)
⊢ ∃ c < a, ∃ B, (f - g) =O[cobounded ℂ ⊓ l] fun z => expR (B * ‖z‖ ^ c)

Tactic:
rcases hBf with ⟨cf, hcf, Bf, hOf⟩

Result:
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)

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)
⊢ (f - g) =O[cobounded ℂ ⊓ l] fun z => expR ((0 ⊔ (Bf ⊔ Bg)) * ‖z‖ ^ (cf ⊔ cg))

Tactic:
refine (hOf.trans <| this ?_ ?_ ?_).sub (hOg.trans <| this ?_ ?_ ?_)

Result:
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)

Proof state:
case h.h.h₂.hx
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‖
⊢ 1 ≤ ‖z‖

Tactic:
assumption

Result:
no goals

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:
gcongr

Result:
case h.h.h₂.hx
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‖
⊢ 1 ≤ ‖z‖