-- Mathlib/Analysis/Meromorphic/Order.lean
theorem order_smul {f : 𝕜 → 𝕜} {g : 𝕜 → E} {x : 𝕜}
    (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
    (hf.smul hg).order = hf.order + hg.order

Proof state:
case coe.coe
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → 𝕜
g : 𝕜 → E
x : 𝕜
hf : MeromorphicAt f x
hg : MeromorphicAt g x
m : ℤ
h₂f : hf.order = ↑m
n : ℤ
h₂g : hg.order = ↑n
⊢ ∃ g_1, AnalyticAt 𝕜 g_1 x ∧ g_1 x ≠ 0 ∧ ∀ᶠ (z : 𝕜) in 𝓝[≠] x, (f • g) z = (z - x) ^ (m + n) • g_1 z

Tactic:
obtain ⟨F, h₁F, h₂F, h₃F⟩ := (hf.order_eq_int_iff _).1 h₂f

Result:
case coe.coe.intro.intro.intro
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → 𝕜
g : 𝕜 → E
x : 𝕜
hf : MeromorphicAt f x
hg : MeromorphicAt g x
m : ℤ
h₂f : hf.order = ↑m
n : ℤ
h₂g : hg.order = ↑n
F : 𝕜 → 𝕜
h₁F : AnalyticAt 𝕜 F x
h₂F : F x ≠ 0
h₃F : ∀ᶠ (z : 𝕜) in 𝓝[≠] x, f z = (z - x) ^ m • F z
⊢ ∃ g_1, AnalyticAt 𝕜 g_1 x ∧ g_1 x ≠ 0 ∧ ∀ᶠ (z : 𝕜) in 𝓝[≠] x, (f • g) z = (z - x) ^ (m + n) • g_1 z

Proof state:
case h
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → 𝕜
g : 𝕜 → E
x : 𝕜
hf : MeromorphicAt f x
hg : MeromorphicAt g x
m : ℤ
h₂f : hf.order = ↑m
n : ℤ
h₂g : hg.order = ↑n
F : 𝕜 → 𝕜
h₁F : AnalyticAt 𝕜 F x
h₂F : F x ≠ 0
h₃F : ∀ᶠ (z : 𝕜) in 𝓝[≠] x, f z = (z - x) ^ m • F z
G : 𝕜 → E
h₁G : AnalyticAt 𝕜 G x
h₂G : G x ≠ 0
h₃G : ∀ᶠ (z : 𝕜) in 𝓝[≠] x, g z = (z - x) ^ n • G z
a : 𝕜
ha : a ∈ {x}ᶜ
hfa : f a = (a - x) ^ m • F a
hga : g a = (a - x) ^ n • G a
⊢ (f • g) a = (a - x) ^ (m + n) • (F • G) a

Tactic:
simp [hfa, hga, smul_comm (F a), zpow_add₀ (sub_ne_zero.mpr ha), mul_smul]

Result:
no goals

Proof state:
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → 𝕜
g : 𝕜 → E
x : 𝕜
hf : MeromorphicAt f x
hg : MeromorphicAt g x
h₂f : ∀ᶠ (z : 𝕜) in 𝓝[≠] x, f z = 0
z : 𝕜
hz : f z = 0
⊢ (f • g) z = 0

Tactic:
simp [hz]

Result:
no goals

Proof state:
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → 𝕜
g : 𝕜 → E
x : 𝕜
hf : MeromorphicAt f x
hg : MeromorphicAt g x
⊢ ⋯.order = hf.order + hg.order

Tactic:
cases h₂f : hf.order with
| top =>
  simp only [top_add, order_eq_top_iff] at h₂f ⊢
  filter_upwards [h₂f] with z hz using by simp [hz]
| coe m =>
  cases h₂g : hg.order with
  | top =>
    simp only [add_top, order_eq_top_iff] at h₂g ⊢
    filter_upwards [h₂g] with z hz using by simp [hz]
  | coe n => rw [← WithTop.coe_add, order_eq_int_iff]
    obtain ⟨F, h₁F, h₂F, h₃F⟩ := (hf.order_eq_int_iff _).1 h₂f
    obtain ⟨G, h₁G, h₂G, h₃G⟩ := (hg.order_eq_int_iff _).1 h₂g
    use F • G, h₁F.smul h₁G, by simp [h₂F, h₂G]
    filter_upwards [self_mem_nhdsWithin, h₃F, h₃G] with a ha hfa hga
    simp [hfa, hga, smul_comm (F a), zpow_add₀ (sub_ne_zero.mpr ha), mul_smul]

Result:
no goals

Proof state:
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → 𝕜
g : 𝕜 → E
x : 𝕜
hf : MeromorphicAt f x
hg : MeromorphicAt g x
m : ℤ
h₂f : hf.order = ↑m
h₂g : ∀ᶠ (z : 𝕜) in 𝓝[≠] x, g z = 0
z : 𝕜
hz : g z = 0
⊢ (f • g) z = 0

Tactic:
simp [hz]

Result:
no goals