Formal coefficient residues and unit-series kernels
DefinitionAnalyticCombinatorics_Ch1_Lagrange_Residueanalytic-combinatoricsformal-power-serieslagrange-inversionlean4
Over a commutative ring , for and , define the shifted coefficient and the derivative numerator , where . Subtraction in the index is natural subtraction, so and both select the constant coefficient. For a unit of , write for its underlying series and for the series underlying . Define . This encodes coefficient operations on formal power series; it does not introduce a Laurent-series carrier or an analytic contour integral.
Definition code
import Mathlib
set_option autoImplicit true
set_option relaxedAutoImplicit false
set_option maxSynthPendingDepth 3
/-!
# Formal residues for the Lagrange inversion proof
This file uses the lightweight Laurent representation `X^{-N} * F`, with
`F : R⟦X⟧`. The residue is the coefficient of `X^{N-1}` in `F`.
-/
noncomputable section
namespace AnalyticCombinatorics.Ch1.Lagrange.Residue
open PowerSeries
variable {R : Type*} [CommRing R]
/-- Residue of the lightweight Laurent series represented by `X^{-N} * F`. -/
def resShift (N : ℕ) (F : R⟦X⟧) : R :=
coeff (N - 1) F
/-- Numerator of the derivative of `X^{-N} * F`, represented with denominator `X^{N+1}`. -/
def shiftDerivNumer (N : ℕ) (F : R⟦X⟧) : R⟦X⟧ :=
X * d⁄dX R F - C (N : R) * F
def unitSeries (U : R⟦X⟧ˣ) : R⟦X⟧ :=
(U : R⟦X⟧)
def unitInvSeries (U : R⟦X⟧ˣ) : R⟦X⟧ :=
(U⁻¹ : R⟦X⟧ˣ)
/-- The power-series numerator of `(X * U)^{-m} * (X * U)'`. -/
def unitKernel (U : R⟦X⟧ˣ) (m : ℕ) : R⟦X⟧ :=
(unitInvSeries U ^ m) * (unitSeries U + X * d⁄dX R (unitSeries U))
end AnalyticCombinatorics.Ch1.Lagrange.Residue
Source