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 α
as
mv_power_series σ α := (σ →₀ ℕ) → α.
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 α := mv_power_series unit α.
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 α
is the coefficient ring.
Equations
- mv_power_series σ α = ((σ →₀ ℕ) → α)
Equations
- mv_power_series.inhabited = {default := λ (_x : σ →₀ ℕ), inhabited.default α}
Equations
Equations
Equations
Equations
Equations
The n
th monomial with coefficient a
as multivariate formal power series.
The n
th coefficient of a multivariate formal power series.
Equations
- mv_power_series.coeff α n = {to_fun := λ (φ : mv_power_series σ α), φ n, map_zero' := _, map_add' := _}
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 α 0) 1}
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 := _, add_comm := _, mul := has_mul.mul mv_power_series.has_mul, mul_assoc := _, one := 1, one_mul := _, mul_one := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _}
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 := _, add_comm := _, mul := semiring.mul mv_power_series.semiring, mul_assoc := _, one := semiring.one mv_power_series.semiring, one_mul := _, mul_one := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _, 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 := _, neg := add_comm_group.neg mv_power_series.add_comm_group, 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 := _, 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 := _, neg := add_comm_group.neg mv_power_series.add_comm_group, 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 := _, left_distrib := _, right_distrib := _, mul_comm := _}
The constant multivariate formal power series.
Equations
- mv_power_series.C σ α = {to_fun := (mv_power_series.monomial α 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 α (finsupp.single s 1)) 1
The constant coefficient of a formal power series.
Equations
- mv_power_series.constant_coeff σ α = {to_fun := ⇑(mv_power_series.coeff α 0), map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
If a multivariate formal power series is invertible, then so is its constant coefficient.
Equations
- mv_power_series.semimodule = {to_distrib_mul_action := {to_mul_action := {to_has_scalar := {smul := λ (a : α) (φ : mv_power_series σ α), ⇑(mv_power_series.C σ α) a * φ}, one_smul := _, mul_smul := _}, smul_add := _, smul_zero := _}, add_smul := _, zero_smul := _}
Equations
- mv_power_series.algebra = {to_has_scalar := mul_action.to_has_scalar distrib_mul_action.to_mul_action, to_ring_hom := {to_fun := (mv_power_series.C σ α).to_fun, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}, commutes' := _, smul_def' := _}
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 σ α) (n : σ →₀ ℕ), ⇑f (⇑(mv_power_series.coeff α n) φ), map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
Auxiliary definition for the truncation function.
Equations
- mv_power_series.trunc_fun n φ = {support := finset.filter (λ (m : σ →₀ ℕ), ⇑(mv_power_series.coeff α m) φ ≠ 0) (finset.image prod.fst n.antidiagonal.support), to_fun := λ (m : σ →₀ ℕ), ite (m ≤ n) (⇑(mv_power_series.coeff α m) φ) 0, mem_support_to_fun := _}
The n
th truncation of a multivariate formal power series to a multivariate polynomial
Equations
- mv_power_series.trunc α 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.
Equations
The map A[[X]] → B[[X]]
induced by a local ring hom A → B
is local
Equations
- _ = _
Equations
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 σ α) φ)⁻¹ φ
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 σ α) (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' := _}
Formal power series over the coefficient ring α
.
Equations
Equations
Equations
Equations
Equations
Equations
Equations
The n
th coefficient of a formal power series.
Equations
- power_series.coeff α n = mv_power_series.coeff α (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.
The map between formal power series induced by a map on the coefficients.
Equations
The n
th truncation of a formal power series to a polynomial
Equations
- power_series.trunc n φ = {support := finset.filter (λ (m : ℕ), ⇑(power_series.coeff α m) φ ≠ 0) (finset.image prod.fst (finset.nat.antidiagonal n)), to_fun := λ (m : ℕ), ite (m ≤ n) (⇑(power_series.coeff α m) φ) 0, mem_support_to_fun := _}
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
Equations
- power_series.integral_domain = {add := comm_ring.add power_series.comm_ring, add_assoc := _, zero := comm_ring.zero power_series.comm_ring, zero_add := _, add_zero := _, neg := comm_ring.neg power_series.comm_ring, add_left_neg := _, add_comm := _, mul := comm_ring.mul power_series.comm_ring, mul_assoc := _, one := comm_ring.one power_series.comm_ring, one_mul := _, mul_one := _, left_distrib := _, right_distrib := _, mul_comm := _, exists_pair_ne := _, eq_zero_or_eq_zero_of_mul_eq_zero := _}
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.
Equations
- _ = _
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 smallest n : enat
such that X^n
divides φ
. The order is ⊤
if and only if φ = 0
.
Equations
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 the 0
power series is infinite.
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
.
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
- polynomial.coe_to_power_series = {coe := λ (φ : polynomial α), 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' := _}