Formal power series #
This file defines (multivariate) formal power series and develops the basic properties of these objects.
A formal power series is to a polynomial like an infinite sum is to a finite sum.
We provide the natural inclusion from polynomials to formal power series.
Generalities #
The file starts with setting up the (semi)ring structure on multivariate power series.
trunc n φ
truncates a formal power series to the polynomial
that has the same coefficients as φ
, for all m < n
, and 0
otherwise.
If the constant coefficient of a formal power series is invertible, then this formal power series is invertible.
Formal power series over a local ring form a local ring.
Formal power series in one variable #
We prove that if the ring of coefficients is an integral domain, then formal power series in one variable form an integral domain.
The order
of a formal power series φ
is the multiplicity of the variable X
in φ
.
If the coefficients form an integral domain, then order
is a valuation
(order_mul
, le_order_add
).
Implementation notes #
In this file we define multivariate formal power series with
variables indexed by σ
and coefficients in R
as
MvPowerSeries σ R := (σ →₀ ℕ) → R
.
Unfortunately there is not yet enough API to show that they are the completion
of the ring of multivariate polynomials. However, we provide most of the infrastructure
that is needed to do this. Once I-adic completion (topological or algebraic) is available
it should not be hard to fill in the details.
Formal power series in one variable are defined as
PowerSeries R := MvPowerSeries Unit R
.
This allows us to port a lot of proofs and properties
from the multivariate case to the single variable case.
However, it means that formal power series are indexed by Unit →₀ ℕ
,
which is of course canonically isomorphic to ℕ
.
We then build some glue to treat formal power series as if they are indexed by ℕ
.
Occasionally this leads to proofs that are uglier than expected.
Multivariate formal power series, where σ
is the index set of the variables
and R
is the coefficient ring.
Equations
- MvPowerSeries σ R = ((σ →₀ ℕ) → R)
Instances For
Equations
- MvPowerSeries.instZeroMvPowerSeries = Pi.instZero
Equations
- MvPowerSeries.instAddMonoidMvPowerSeries = Pi.addMonoid
Equations
- MvPowerSeries.instAddGroupMvPowerSeries = Pi.addGroup
Equations
- MvPowerSeries.instAddCommMonoidMvPowerSeries = Pi.addCommMonoid
Equations
- MvPowerSeries.instAddCommGroupMvPowerSeries = Pi.addCommGroup
Equations
- (_ : Nontrivial (MvPowerSeries σ R)) = (_ : Nontrivial ((σ →₀ ℕ) → R))
Equations
- (_ : IsScalarTower R S (MvPowerSeries σ A)) = (_ : IsScalarTower R S ((σ →₀ ℕ) → A))
The n
th monomial with coefficient a
as multivariate formal power series.
Equations
- MvPowerSeries.monomial R n = LinearMap.stdBasis R (fun (x : σ →₀ ℕ) => R) n
Instances For
The n
th coefficient of a multivariate formal power series.
Equations
Instances For
Two multivariate formal power series are equal if all their coefficients are equal.
Two multivariate formal power series are equal if and only if all their coefficients are equal.
Equations
- MvPowerSeries.instOneMvPowerSeries = { one := (MvPowerSeries.monomial R 0) 1 }
Equations
- MvPowerSeries.instAddMonoidWithOneMvPowerSeries = let src := let_fun this := inferInstance; this; AddMonoidWithOne.mk
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- MvPowerSeries.instCommSemiringMvPowerSeries = let src := let_fun this := inferInstance; this; CommSemiring.mk (_ : ∀ (φ ψ : MvPowerSeries σ R), φ * ψ = ψ * φ)
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
The constant multivariate formal power series.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The variables of the multivariate formal power series ring.
Equations
- MvPowerSeries.X s = (MvPowerSeries.monomial R (Finsupp.single s 1)) 1
Instances For
The constant coefficient of a formal power series.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If a multivariate formal power series is invertible, then so is its constant coefficient.
The map between multivariate formal power series induced by a map on the coefficients.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- (_ : Nontrivial (Subalgebra R (MvPowerSeries σ R))) = (_ : Nontrivial (Subalgebra R (MvPowerSeries σ R)))
Auxiliary definition for the truncation function.
Equations
- MvPowerSeries.truncFun n φ = Finset.sum (Finset.Iio n) fun (m : σ →₀ ℕ) => (MvPolynomial.monomial m) ((MvPowerSeries.coeff R m) φ)
Instances For
The n
th truncation of a multivariate formal power series to a multivariate polynomial
Equations
- One or more equations did not get rendered due to their size.
Instances For
Auxiliary definition that unifies
the totalised inverse formal power series (_)⁻¹
and
the inverse formal power series that depends on
an inverse of the constant coefficient invOfUnit
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A multivariate formal power series is invertible if the constant coefficient is invertible.
Equations
- MvPowerSeries.invOfUnit φ u = MvPowerSeries.inv.aux (↑u⁻¹) φ
Instances For
Multivariate formal power series over a local ring form a local ring.
Equations
- (_ : LocalRing (MvPowerSeries σ R)) = (_ : LocalRing (MvPowerSeries σ R))
The map A[[X]] → B[[X]]
induced by a local ring hom A → B
is local
Equations
- (_ : IsLocalRingHom (MvPowerSeries.map σ f)) = (_ : IsLocalRingHom (MvPowerSeries.map σ f))
The inverse 1/f
of a multivariable power series f
over a field
Equations
- MvPowerSeries.inv φ = MvPowerSeries.inv.aux ((MvPowerSeries.constantCoeff σ k) φ)⁻¹ φ
Instances For
Equations
- MvPowerSeries.instInvMvPowerSeries = { inv := MvPowerSeries.inv }
Equations
- MvPowerSeries.instInvOneClassMvPowerSeries = let src := inferInstanceAs (One (MvPowerSeries σ k)); let src_1 := inferInstanceAs (Inv (MvPowerSeries σ k)); InvOneClass.mk (_ : 1⁻¹ = 1)
The natural inclusion from multivariate polynomials into multivariate formal power series.
Equations
- ↑φ n = MvPolynomial.coeff n φ
Instances For
The natural inclusion from multivariate polynomials into multivariate formal power series.
Equations
- MvPolynomial.coeToMvPowerSeries = { coe := MvPolynomial.toMvPowerSeries }
The coercion from multivariable polynomials to multivariable power series as a ring homomorphism.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The coercion from multivariable polynomials to multivariable power series as an algebra homomorphism.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- MvPowerSeries.algebraMvPolynomial = RingHom.toAlgebra ↑(MvPolynomial.coeToMvPowerSeries.algHom A)
Equations
- MvPowerSeries.algebraMvPowerSeries = RingHom.toAlgebra (MvPowerSeries.map σ (algebraMap R A))
Formal power series over the coefficient ring R
.
Equations
Instances For
R⟦X⟧
is notation for PowerSeries R
,
the semiring of formal power series in one variable over a semiring R
.
Equations
- PowerSeries.«term_⟦X⟧» = Lean.ParserDescr.trailingNode `PowerSeries.term_⟦X⟧ 9000 0 (Lean.ParserDescr.symbol "⟦X⟧")
Instances For
Equations
- (_ : Nontrivial (PowerSeries R)) = (_ : Nontrivial (PowerSeries R))
Equations
- (_ : IsScalarTower R S (PowerSeries A)) = (_ : IsScalarTower R S ((Unit →₀ ℕ) → A))
The n
th coefficient of a formal power series.
Equations
- PowerSeries.coeff R n = MvPowerSeries.coeff R (Finsupp.single () n)
Instances For
The n
th monomial with coefficient a
as formal power series.
Equations
Instances For
Two formal power series are equal if all their coefficients are equal.
Two formal power series are equal if all their coefficients are equal.
The constant coefficient of a formal power series.
Equations
Instances For
The constant formal power series.
Equations
Instances For
The variable of the formal power series ring.
Equations
- PowerSeries.X = MvPowerSeries.X ()
Instances For
If a formal power series is invertible, then so is its constant coefficient.
Split off the constant coefficient.
Split off the constant coefficient.
The ring homomorphism taking a power series f(X)
to f(aX)
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The n
th truncation of a formal power series to a polynomial
Equations
- PowerSeries.trunc n φ = Finset.sum (Finset.Ico 0 n) fun (m : ℕ) => (Polynomial.monomial m) ((PowerSeries.coeff R m) φ)
Instances For
Auxiliary function used for computing inverse of a power series
Equations
- PowerSeries.inv.aux = MvPowerSeries.inv.aux
Instances For
A formal power series is invertible if the constant coefficient is invertible.
Equations
Instances For
Two ways of removing the constant coefficient of a power series are the same.
The ring homomorphism taking a power series f(X)
to f(-X)
.
Equations
- PowerSeries.evalNegHom = PowerSeries.rescale (-1)
Instances For
Equations
- (_ : NoZeroDivisors (PowerSeries R)) = (_ : NoZeroDivisors (PowerSeries R))
Equations
- (_ : IsDomain (PowerSeries R)) = (_ : IsDomain (PowerSeries R))
The ideal spanned by the variable in the power series ring over an integral domain is a prime ideal.
Equations
- (_ : IsLocalRingHom (PowerSeries.map f)) = (_ : IsLocalRingHom (MvPowerSeries.map Unit f))
Equations
- (_ : LocalRing (PowerSeries R)) = (_ : LocalRing (PowerSeries R))
Equations
- (_ : Nontrivial (Subalgebra R (PowerSeries R))) = (_ : Nontrivial (Subalgebra R (PowerSeries R)))
The inverse 1/f of a power series f defined over a field
Equations
- PowerSeries.inv = MvPowerSeries.inv
Instances For
Equations
- PowerSeries.instInvPowerSeries = { inv := PowerSeries.inv }
Equations
- PowerSeries.instInvOneClassPowerSeries = let src := inferInstanceAs (InvOneClass (MvPowerSeries Unit k)); InvOneClass.mk (_ : 1⁻¹ = 1)
The order of a formal power series φ
is the greatest n : PartENat
such that X^n
divides φ
. The order is ⊤
if and only if φ = 0
.
Equations
- PowerSeries.order φ = if h : φ = 0 then ⊤ else ↑(Nat.find (_ : ∃ (n : ℕ), (PowerSeries.coeff R n) φ ≠ 0))
Instances For
The order of the 0
power series is infinite.
If the order of a formal power series is finite, then the coefficient indexed by the order is nonzero.
If the n
th coefficient of a formal power series is nonzero,
then the order of the power series is less than or equal to n
.
The n
th coefficient of a formal power series is 0
if n
is strictly
smaller than the order of the power series.
The 0
power series is the unique power series with infinite order.
The order of a formal power series is at least n
if
the i
th coefficient is 0
for all i < n
.
The order of a formal power series is at least n
if
the i
th coefficient is 0
for all i < n
.
The order of a formal power series is exactly n
if the n
th coefficient is nonzero,
and the i
th coefficient is 0
for all i < n
.
The order of a formal power series is exactly n
if the n
th coefficient is nonzero,
and the i
th coefficient is 0
for all i < n
.
The order of the sum of two formal power series is at least the minimum of their orders.
The order of the sum of two formal power series is the minimum of their orders if their orders differ.
The order of the product of two formal power series is at least the sum of their orders.
The order of the monomial a*X^n
is infinite if a = 0
and n
otherwise.
The order of the monomial a*X^n
is n
if a ≠ 0
.
If n
is strictly smaller than the order of ψ
, then the n
th coefficient of its product
with any other power series is 0
.
The order of the formal power series 1
is 0
.
The order of the formal power series X
is 1
.
The order of the formal power series X^n
is n
.
The order of the product of two formal power series over an integral domain is the sum of their orders.
The natural inclusion from polynomials into formal power series.
Equations
- ↑φ = PowerSeries.mk fun (n : ℕ) => Polynomial.coeff φ n
Instances For
The natural inclusion from polynomials into formal power series.
Equations
- Polynomial.coeToPowerSeries = { coe := Polynomial.ToPowerSeries }
The coercion from polynomials to power series as a ring homomorphism.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The coercion from polynomials to power series as an algebra homomorphism.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- PowerSeries.algebraPolynomial = RingHom.toAlgebra ↑(Polynomial.coeToPowerSeries.algHom A)
Equations
- PowerSeries.algebraPowerSeries = RingHom.toAlgebra (PowerSeries.map (algebraMap R A))
Equations
- PowerSeries.algebraPolynomial' = RingHom.toAlgebra (RingHom.comp Polynomial.coeToPowerSeries.ringHom (algebraMap R (Polynomial A)))
The function coeff n : R⟦X⟧ → R
is continuous. I.e. coeff n f
depends only on a sufficiently
long truncation of the power series f
.
The n
-th coefficient of f*g
may be calculated
from the truncations of f
and g
.