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
mv_power_series σ 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
power_series R := mv_power_series 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
- mv_power_series σ R = ((σ →₀ ℕ) → R)
Equations
Equations
Equations
Equations
The n
th monomial with coefficient a
as multivariate formal power series.
Equations
- mv_power_series.monomial R n = linear_map.std_basis R (λ (n : σ →₀ ℕ), R) n
The n
th coefficient of a multivariate formal power series.
Equations
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
- mv_power_series.has_one = {one := ⇑(mv_power_series.monomial R 0) 1}
Equations
- mv_power_series.has_mul = {mul := λ (φ ψ : mv_power_series σ R) (n : σ →₀ ℕ), ∑ (p : (σ →₀ ℕ) × (σ →₀ ℕ)) in n.antidiagonal, (⇑(mv_power_series.coeff R p.fst) φ) * ⇑(mv_power_series.coeff R p.snd) ψ}
Equations
- mv_power_series.semiring = {add := add_comm_monoid.add mv_power_series.add_comm_monoid, add_assoc := _, zero := add_comm_monoid.zero mv_power_series.add_comm_monoid, zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul mv_power_series.add_comm_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul mv_power_series.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := monoid_with_zero.npow._default 1 has_mul.mul mv_power_series.one_mul mv_power_series.mul_one, npow_zero' := _, npow_succ' := _}
Equations
- mv_power_series.comm_semiring = {add := semiring.add mv_power_series.semiring, add_assoc := _, zero := semiring.zero mv_power_series.semiring, zero_add := _, add_zero := _, nsmul := semiring.nsmul mv_power_series.semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := semiring.mul mv_power_series.semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := semiring.one mv_power_series.semiring, one_mul := _, mul_one := _, npow := semiring.npow mv_power_series.semiring, npow_zero' := _, npow_succ' := _, mul_comm := _}
Equations
- mv_power_series.ring = {add := semiring.add mv_power_series.semiring, add_assoc := _, zero := semiring.zero mv_power_series.semiring, zero_add := _, add_zero := _, nsmul := semiring.nsmul mv_power_series.semiring, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg mv_power_series.add_comm_group, sub := add_comm_group.sub mv_power_series.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul mv_power_series.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := semiring.mul mv_power_series.semiring, mul_assoc := _, one := semiring.one mv_power_series.semiring, one_mul := _, mul_one := _, npow := semiring.npow mv_power_series.semiring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _}
Equations
- mv_power_series.comm_ring = {add := comm_semiring.add mv_power_series.comm_semiring, add_assoc := _, zero := comm_semiring.zero mv_power_series.comm_semiring, zero_add := _, add_zero := _, nsmul := comm_semiring.nsmul mv_power_series.comm_semiring, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg mv_power_series.add_comm_group, sub := add_comm_group.sub mv_power_series.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul mv_power_series.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := comm_semiring.mul mv_power_series.comm_semiring, mul_assoc := _, one := comm_semiring.one mv_power_series.comm_semiring, one_mul := _, mul_one := _, npow := comm_semiring.npow mv_power_series.comm_semiring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, mul_comm := _}
The constant multivariate formal power series.
Equations
- mv_power_series.C σ R = {to_fun := (mv_power_series.monomial R 0).to_fun, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
The variables of the multivariate formal power series ring.
Equations
- mv_power_series.X s = ⇑(mv_power_series.monomial R (finsupp.single s 1)) 1
The constant coefficient of a formal power series.
Equations
- mv_power_series.constant_coeff σ R = {to_fun := ⇑(mv_power_series.coeff R 0), map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
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
- mv_power_series.map σ f = {to_fun := λ (φ : mv_power_series σ R) (n : σ →₀ ℕ), ⇑f (⇑(mv_power_series.coeff R n) φ), map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
Equations
- mv_power_series.algebra = {to_has_scalar := mul_action.to_has_scalar distrib_mul_action.to_mul_action, to_ring_hom := (mv_power_series.map σ (algebra_map R A)).comp (mv_power_series.C σ R), commutes' := _, smul_def' := _}
Auxiliary definition for the truncation function.
Equations
- mv_power_series.trunc_fun n φ = ∑ (m : σ →₀ ℕ) in finset.Iio n, ⇑(mv_polynomial.monomial m) (⇑(mv_power_series.coeff R m) φ)
The n
th truncation of a multivariate formal power series to a multivariate polynomial
Equations
- mv_power_series.trunc R n = {to_fun := mv_power_series.trunc_fun n, map_zero' := _, map_add' := _}
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 inv_of_unit
.
A multivariate formal power series is invertible if the constant coefficient is invertible.
Equations
- φ.inv_of_unit u = mv_power_series.inv.aux ↑u⁻¹ φ
Multivariate formal power series over a local ring form a local ring.
The map A[[X]] → B[[X]]
induced by a local ring hom A → B
is local
The inverse 1/f
of a multivariable power series f
over a field
Equations
- φ.inv = mv_power_series.inv.aux (⇑(mv_power_series.constant_coeff σ k) φ)⁻¹ φ
Equations
- mv_power_series.has_inv = {inv := mv_power_series.inv _inst_1}
The natural inclusion from multivariate polynomials into multivariate formal power series.
Equations
- mv_polynomial.coe_to_mv_power_series = {coe := λ (φ : mv_polynomial σ R) (n : σ →₀ ℕ), mv_polynomial.coeff n φ}
The coercion from multivariable polynomials to multivariable power series as a ring homomorphism.
Equations
- mv_polynomial.coe_to_mv_power_series.ring_hom = {to_fun := coe coe_to_lift, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
The coercion from multivariable polynomials to multivariable power series as an algebra homomorphism.
Equations
- mv_polynomial.coe_to_mv_power_series.alg_hom A = {to_fun := ((mv_power_series.map σ (algebra_map R A)).comp mv_polynomial.coe_to_mv_power_series.ring_hom).to_fun, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _, commutes' := _}
Equations
Formal power series over the coefficient ring R
.
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
The n
th coefficient of a formal power series.
Equations
- power_series.coeff R n = mv_power_series.coeff R (finsupp.single () n)
The n
th monomial with coefficient a
as formal power series.
Equations
Two formal power series are equal if all their coefficients are equal.
Two formal power series are equal if all their coefficients are equal.
Constructor for formal power series.
The constant coefficient of a formal power series.
Equations
The constant formal power series.
Equations
The variable of the formal power series ring.
Equations
If a formal power series is invertible, then so is its constant coefficient.
Split off the constant coefficient.
Split off the constant coefficient.
The map between formal power series induced by a map on the coefficients.
Equations
The ring homomorphism taking a power series f(X)
to f(aX)
.
Equations
- power_series.rescale a = {to_fun := λ (f : power_series R), power_series.mk (λ (n : ℕ), (a ^ n) * ⇑(power_series.coeff R n) f), map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
The n
th truncation of a formal power series to a polynomial
Equations
- power_series.trunc n φ = ∑ (m : ℕ) in finset.Ico 0 n, ⇑(polynomial.monomial m) (⇑(power_series.coeff R m) φ)
Auxiliary function used for computing inverse of a power series
Equations
A formal power series is invertible if the constant coefficient is invertible.
Equations
- φ.inv_of_unit u = mv_power_series.inv_of_unit φ u
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
The ideal spanned by the variable in the power series ring over an integral domain is a prime ideal.
The variable of the power series ring over an integral domain is prime.
The inverse 1/f of a power series f defined over a field
Equations
Equations
- power_series.has_inv = {inv := power_series.inv _inst_1}
The order of a formal power series φ
is the greatest n : enat
such that X^n
divides φ
. The order is ⊤
if and only if φ = 0
.
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 product of two formal power series is at least the sum of their orders.
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 natural inclusion from polynomials into formal power series.
Equations
- polynomial.coe_to_power_series = {coe := λ (φ : R[X]), power_series.mk (λ (n : ℕ), φ.coeff n)}
The coercion from polynomials to power series as a ring homomorphism.
Equations
- polynomial.coe_to_power_series.ring_hom = {to_fun := coe coe_to_lift, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
The coercion from polynomials to power series as an algebra homomorphism.
Equations
- polynomial.coe_to_power_series.alg_hom A = {to_fun := ((power_series.map (algebra_map R A)).comp polynomial.coe_to_power_series.ring_hom).to_fun, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _, commutes' := _}