-- Mathlib/Analysis/Analytic/IsolatedZeros.lean
theorem eq_pow_order_mul_iterate_dslope (hp : HasFPowerSeriesAt f p z₀) :
    ∀ᶠ z in 𝓝 z₀, f z = (z - z₀) ^ p.order • (swap dslope z₀)^[p.order] f z

Proof state:
case h.e'_3.h.e'_6
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
z₀ : 𝕜
hp : HasFPowerSeriesAt f p z₀
hq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f z)
x : 𝕜
hx2 : HasSum (fun n => (x - z₀) ^ n • p.coeff n) (f x)
this : ∀ k < p.order, p.coeff k = 0
s : E
hs1 : (x - z₀) ^ p.order • s = f x
hs2 : HasSum (fun m => (x - z₀) ^ m • p.coeff (m + p.order)) s
hx1 : HasSum (fun n => (x - z₀) ^ n • p.coeff (n + p.order)) ((swap dslope z₀)^[p.order] f x)
⊢ (swap dslope z₀)^[p.order] f x = s

Tactic:
exact hx1.unique hs2

Result:
no goals

Proof state:
case h
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
z₀ : 𝕜
hp : HasFPowerSeriesAt f p z₀
hq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f z)
x : 𝕜
hx1 : HasSum (fun n => (x - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f x)
hx2 : HasSum (fun n => (x - z₀) ^ n • p.coeff n) (f x)
⊢ f x = (x - z₀) ^ p.order • (swap dslope z₀)^[p.order] f x

Tactic:
have : ∀ k < p.order, p.coeff k = 0 := fun k hk => by
  simpa [coeff_eq_zero] using apply_eq_zero_of_lt_order hk

Result:
case h
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
z₀ : 𝕜
hp : HasFPowerSeriesAt f p z₀
hq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f z)
x : 𝕜
hx1 : HasSum (fun n => (x - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f x)
hx2 : HasSum (fun n => (x - z₀) ^ n • p.coeff n) (f x)
this : ∀ k < p.order, p.coeff k = 0
⊢ f x = (x - z₀) ^ p.order • (swap dslope z₀)^[p.order] f x

Proof state:
case h
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
z₀ : 𝕜
hp : HasFPowerSeriesAt f p z₀
hq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f z)
x : 𝕜
hx1 : HasSum (fun n => (x - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f x)
hx2 : HasSum (fun n => (x - z₀) ^ n • p.coeff n) (f x)
this : ∀ k < p.order, p.coeff k = 0
⊢ f x = (x - z₀) ^ p.order • (swap dslope z₀)^[p.order] f x

Tactic:
obtain ⟨s, hs1, hs2⟩ := HasSum.exists_hasSum_smul_of_apply_eq_zero hx2 this

Result:
case h.intro.intro
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
z₀ : 𝕜
hp : HasFPowerSeriesAt f p z₀
hq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f z)
x : 𝕜
hx1 : HasSum (fun n => (x - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f x)
hx2 : HasSum (fun n => (x - z₀) ^ n • p.coeff n) (f x)
this : ∀ k < p.order, p.coeff k = 0
s : E
hs1 : (x - z₀) ^ p.order • s = f x
hs2 : HasSum (fun m => (x - z₀) ^ m • p.coeff (m + p.order)) s
⊢ f x = (x - z₀) ^ p.order • (swap dslope z₀)^[p.order] f x

Proof state:
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
z₀ : 𝕜
hp : HasFPowerSeriesAt f p z₀
hq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f z)
x : 𝕜
hx1 : HasSum (fun n => (x - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f x)
hx2 : HasSum (fun n => (x - z₀) ^ n • p.coeff n) (f x)
k : ℕ
hk : k < p.order
⊢ p.coeff k = 0

Tactic:
simpa [coeff_eq_zero] using apply_eq_zero_of_lt_order hk

Result:
no goals

Proof state:
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
z₀ : 𝕜
hp : HasFPowerSeriesAt f p z₀
hq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f z)
⊢ ∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = (z - z₀) ^ p.order • (swap dslope z₀)^[p.order] f z

Tactic:
filter_upwards [hq, hasFPowerSeriesAt_iff'.mp hp] with x hx1 hx2

Result:
case h
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
z₀ : 𝕜
hp : HasFPowerSeriesAt f p z₀
hq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f z)
x : 𝕜
hx1 : HasSum (fun n => (x - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f x)
hx2 : HasSum (fun n => (x - z₀) ^ n • p.coeff n) (f x)
⊢ f x = (x - z₀) ^ p.order • (swap dslope z₀)^[p.order] f x

Proof state:
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
z₀ : 𝕜
hp : HasFPowerSeriesAt f p z₀
⊢ ∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = (z - z₀) ^ p.order • (swap dslope z₀)^[p.order] f z

Tactic:
have hq := hasFPowerSeriesAt_iff'.mp (has_fpower_series_iterate_dslope_fslope p.order hp)

Result:
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
z₀ : 𝕜
hp : HasFPowerSeriesAt f p z₀
hq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f z)
⊢ ∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = (z - z₀) ^ p.order • (swap dslope z₀)^[p.order] f z

Proof state:
case h.e'_3.h.e'_6
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
z₀ : 𝕜
hp : HasFPowerSeriesAt f p z₀
hq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f z)
x : 𝕜
hx1 : HasSum (fun n => (x - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f x)
hx2 : HasSum (fun n => (x - z₀) ^ n • p.coeff n) (f x)
this : ∀ k < p.order, p.coeff k = 0
s : E
hs1 : (x - z₀) ^ p.order • s = f x
hs2 : HasSum (fun m => (x - z₀) ^ m • p.coeff (m + p.order)) s
⊢ (swap dslope z₀)^[p.order] f x = s

Tactic:
simp only [coeff_iterate_fslope] at hx1

Result:
case h.e'_3.h.e'_6
𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
z₀ : 𝕜
hp : HasFPowerSeriesAt f p z₀
hq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • (fslope^[p.order] p).coeff n) ((swap dslope z₀)^[p.order] f z)
x : 𝕜
hx2 : HasSum (fun n => (x - z₀) ^ n • p.coeff n) (f x)
this : ∀ k < p.order, p.coeff k = 0
s : E
hs1 : (x - z₀) ^ p.order • s = f x
hs2 : HasSum (fun m => (x - z₀) ^ m • p.coeff (m + p.order)) s
hx1 : HasSum (fun n => (x - z₀) ^ n • p.coeff (n + p.order)) ((swap dslope z₀)^[p.order] f x)
⊢ (swap dslope z₀)^[p.order] f x = s