# mathlibdocumentation

ring_theory.power_series

# 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.

def mv_power_series  :
Type u_1Type u_2Type (max u_1 u_2)

Multivariate formal power series, where σ is the index set of the variables and R is the coefficient ring.

Equations
@[instance]
def mv_power_series.inhabited {σ : Type u_1} {R : Type u_2} [inhabited R] :

Equations
@[instance]
def mv_power_series.has_zero {σ : Type u_1} {R : Type u_2} [has_zero R] :

Equations
@[instance]
def mv_power_series.add_monoid {σ : Type u_1} {R : Type u_2} [add_monoid R] :

Equations
@[instance]
def mv_power_series.add_group {σ : Type u_1} {R : Type u_2} [add_group R] :

Equations
@[instance]
def mv_power_series.add_comm_monoid {σ : Type u_1} {R : Type u_2}  :

Equations
@[instance]
def mv_power_series.add_comm_group {σ : Type u_1} {R : Type u_2}  :

Equations
@[instance]
def mv_power_series.nontrivial {σ : Type u_1} {R : Type u_2} [nontrivial R] :

def mv_power_series.monomial {σ : Type u_1} (R : Type u_2) [add_monoid R] :
→₀ )R →+

The nth monomial with coefficient a as multivariate formal power series.

Equations
def mv_power_series.coeff {σ : Type u_1} (R : Type u_2) [add_monoid R] :
→₀ ) →+ R

The nth coefficient of a multivariate formal power series.

Equations
@[ext]
theorem mv_power_series.ext {σ : Type u_1} {R : Type u_2} [add_monoid R] {φ ψ : R} :
(∀ (n : σ →₀ ), φ = ψ)φ = ψ

Two multivariate formal power series are equal if all their coefficients are equal.

theorem mv_power_series.ext_iff {σ : Type u_1} {R : Type u_2} [add_monoid R] {φ ψ : R} :
φ = ψ ∀ (n : σ →₀ ), φ = ψ

Two multivariate formal power series are equal if and only if all their coefficients are equal.

theorem mv_power_series.coeff_monomial {σ : Type u_1} {R : Type u_2} [add_monoid R] (m n : σ →₀ ) (a : R) :
( a) = ite (m = n) a 0

@[simp]
theorem mv_power_series.coeff_monomial' {σ : Type u_1} {R : Type u_2} [add_monoid R] (n : σ →₀ ) (a : R) :
( a) = a

@[simp]
theorem mv_power_series.coeff_comp_monomial {σ : Type u_1} {R : Type u_2} [add_monoid R] (n : σ →₀ ) :

@[simp]
theorem mv_power_series.coeff_zero {σ : Type u_1} {R : Type u_2} [add_monoid R] (n : σ →₀ ) :
0 = 0

@[instance]
def mv_power_series.has_one {σ : Type u_1} {R : Type u_2} [semiring R] :

Equations
theorem mv_power_series.coeff_one {σ : Type u_1} {R : Type u_2} [semiring R] (n : σ →₀ ) :
1 = ite (n = 0) 1 0

theorem mv_power_series.coeff_zero_one {σ : Type u_1} {R : Type u_2} [semiring R] :
1 = 1

@[instance]
def mv_power_series.has_mul {σ : Type u_1} {R : Type u_2} [semiring R] :

Equations
theorem mv_power_series.coeff_mul {σ : Type u_1} {R : Type u_2} [semiring R] (n : σ →₀ ) (φ ψ : R) :
* ψ) = ∑ (p : →₀ ) × →₀ )) in n.antidiagonal.support, ( p.fst) φ) * p.snd) ψ

theorem mv_power_series.zero_mul {σ : Type u_1} {R : Type u_2} [semiring R] (φ : R) :
0 * φ = 0

theorem mv_power_series.mul_zero {σ : Type u_1} {R : Type u_2} [semiring R] (φ : R) :
φ * 0 = 0

theorem mv_power_series.one_mul {σ : Type u_1} {R : Type u_2} [semiring R] (φ : R) :
1 * φ = φ

theorem mv_power_series.mul_one {σ : Type u_1} {R : Type u_2} [semiring R] (φ : R) :
φ * 1 = φ

theorem mv_power_series.mul_add {σ : Type u_1} {R : Type u_2} [semiring R] (φ₁ φ₂ φ₃ : R) :
φ₁ * (φ₂ + φ₃) = φ₁ * φ₂ + φ₁ * φ₃

theorem mv_power_series.add_mul {σ : Type u_1} {R : Type u_2} [semiring R] (φ₁ φ₂ φ₃ : R) :
(φ₁ + φ₂) * φ₃ = φ₁ * φ₃ + φ₂ * φ₃

theorem mv_power_series.mul_assoc {σ : Type u_1} {R : Type u_2} [semiring R] (φ₁ φ₂ φ₃ : R) :
(φ₁ * φ₂) * φ₃ = φ₁ * φ₂ * φ₃

@[instance]
def mv_power_series.semiring {σ : Type u_1} {R : Type u_2} [semiring R] :

Equations
@[instance]
def mv_power_series.comm_semiring {σ : Type u_1} {R : Type u_2}  :

Equations
@[instance]
def mv_power_series.ring {σ : Type u_1} {R : Type u_2} [ring R] :
ring R)

Equations
@[instance]
def mv_power_series.comm_ring {σ : Type u_1} {R : Type u_2} [comm_ring R] :

Equations
theorem mv_power_series.monomial_mul_monomial {σ : Type u_1} {R : Type u_2} [semiring R] (m n : σ →₀ ) (a b : R) :
( a) * b = (m + n)) (a * b)

def mv_power_series.C (σ : Type u_1) (R : Type u_2) [semiring R] :

The constant multivariate formal power series.

Equations
@[simp]
theorem mv_power_series.monomial_zero_eq_C {σ : Type u_1} {R : Type u_2} [semiring R] :

theorem mv_power_series.monomial_zero_eq_C_apply {σ : Type u_1} {R : Type u_2} [semiring R] (a : R) :
a = R) a

theorem mv_power_series.coeff_C {σ : Type u_1} {R : Type u_2} [semiring R] (n : σ →₀ ) (a : R) :
( R) a) = ite (n = 0) a 0

theorem mv_power_series.coeff_zero_C {σ : Type u_1} {R : Type u_2} [semiring R] (a : R) :
( R) a) = a

def mv_power_series.X {σ : Type u_1} {R : Type u_2} [semiring R] :
σ →

The variables of the multivariate formal power series ring.

Equations
theorem mv_power_series.coeff_X {σ : Type u_1} {R : Type u_2} [semiring R] (n : σ →₀ ) (s : σ) :
= ite (n = 1) 1 0

theorem mv_power_series.coeff_index_single_X {σ : Type u_1} {R : Type u_2} [semiring R] (s t : σ) :
1)) = ite (t = s) 1 0

@[simp]
theorem mv_power_series.coeff_index_single_self_X {σ : Type u_1} {R : Type u_2} [semiring R] (s : σ) :
1)) = 1

theorem mv_power_series.coeff_zero_X {σ : Type u_1} {R : Type u_2} [semiring R] (s : σ) :
= 0

theorem mv_power_series.X_def {σ : Type u_1} {R : Type u_2} [semiring R] (s : σ) :
= 1)) 1

theorem mv_power_series.X_pow_eq {σ : Type u_1} {R : Type u_2} [semiring R] (s : σ) (n : ) :
= n)) 1

theorem mv_power_series.coeff_X_pow {σ : Type u_1} {R : Type u_2} [semiring R] (m : σ →₀ ) (s : σ) (n : ) :
^ n) = ite (m = n) 1 0

@[simp]
theorem mv_power_series.coeff_mul_C {σ : Type u_1} {R : Type u_2} [semiring R] (n : σ →₀ ) (φ : R) (a : R) :
* R) a) = ( φ) * a

@[simp]
theorem mv_power_series.coeff_C_mul {σ : Type u_1} {R : Type u_2} [semiring R] (n : σ →₀ ) (φ : R) (a : R) :
(( R) a) * φ) = a * φ

theorem mv_power_series.coeff_zero_mul_X {σ : Type u_1} {R : Type u_2} [semiring R] (φ : R) (s : σ) :
* = 0

def mv_power_series.constant_coeff (σ : Type u_1) (R : Type u_2) [semiring R] :

The constant coefficient of a formal power series.

Equations
@[simp]
theorem mv_power_series.coeff_zero_eq_constant_coeff {σ : Type u_1} {R : Type u_2} [semiring R] :

theorem mv_power_series.coeff_zero_eq_constant_coeff_apply {σ : Type u_1} {R : Type u_2} [semiring R] (φ : R) :
φ =

@[simp]
theorem mv_power_series.constant_coeff_C {σ : Type u_1} {R : Type u_2} [semiring R] (a : R) :
( R) a) = a

@[simp]
theorem mv_power_series.constant_coeff_comp_C {σ : Type u_1} {R : Type u_2} [semiring R] :
R) =

@[simp]
theorem mv_power_series.constant_coeff_zero {σ : Type u_1} {R : Type u_2} [semiring R] :
= 0

@[simp]
theorem mv_power_series.constant_coeff_one {σ : Type u_1} {R : Type u_2} [semiring R] :
= 1

@[simp]
theorem mv_power_series.constant_coeff_X {σ : Type u_1} {R : Type u_2} [semiring R] (s : σ) :

theorem mv_power_series.is_unit_constant_coeff {σ : Type u_1} {R : Type u_2} [semiring R] (φ : R) :
is_unit φ)

If a multivariate formal power series is invertible, then so is its constant coefficient.

@[instance]
def mv_power_series.semimodule {σ : Type u_1} {R : Type u_2} [semiring R] :
R)

Equations
@[simp]
theorem mv_power_series.coeff_smul {σ : Type u_1} {R : Type u_2} [semiring R] (f : R) (n : σ →₀ ) (a : R) :
(a f) = a * f

theorem mv_power_series.X_inj {σ : Type u_1} {R : Type u_2} [semiring R] [nontrivial R] {s t : σ} :
s = t

@[instance]
def mv_power_series.algebra {σ : Type u_1} {R : Type u_2} [comm_ring R] :
R)

Equations
def mv_power_series.map (σ : Type u_1) {R : Type u_2} {S : Type u_3} [semiring R] [semiring S] :
(R →+* S)

The map between multivariate formal power series induced by a map on the coefficients.

Equations
@[simp]
theorem mv_power_series.map_id {σ : Type u_1} {R : Type u_2} [semiring R] :

theorem mv_power_series.map_comp {σ : Type u_1} {R : Type u_2} {S : Type u_3} {T : Type u_4} [semiring R] [semiring S] [semiring T] (f : R →+* S) (g : S →+* T) :
(g.comp f) = g).comp f)

@[simp]
theorem mv_power_series.coeff_map {σ : Type u_1} {R : Type u_2} {S : Type u_3} [semiring R] [semiring S] (f : R →+* S) (n : σ →₀ ) (φ : R) :
( f) φ) = f ( φ)

@[simp]
theorem mv_power_series.constant_coeff_map {σ : Type u_1} {R : Type u_2} {S : Type u_3} [semiring R] [semiring S] (f : R →+* S) (φ : R) :
( f) φ) = f φ)

def mv_power_series.trunc_fun {σ : Type u_1} {R : Type u_2}  :
→₀ )

Auxiliary definition for the truncation function.

Equations
def mv_power_series.trunc {σ : Type u_1} (R : Type u_2)  :
→₀ ) →+

The nth truncation of a multivariate formal power series to a multivariate polynomial

Equations
theorem mv_power_series.coeff_trunc {σ : Type u_1} {R : Type u_2} (n m : σ →₀ ) (φ : R) :
( φ) = ite (m n) ( φ) 0

@[simp]
theorem mv_power_series.trunc_one {σ : Type u_1} {R : Type u_2} (n : σ →₀ ) :
1 = 1

@[simp]
theorem mv_power_series.trunc_C {σ : Type u_1} {R : Type u_2} (n : σ →₀ ) (a : R) :
( R) a) =

theorem mv_power_series.X_pow_dvd_iff {σ : Type u_1} {R : Type u_2} {s : σ} {n : } {φ : R} :
φ ∀ (m : σ →₀ ), m s < n φ = 0

theorem mv_power_series.X_dvd_iff {σ : Type u_1} {R : Type u_2} {s : σ} {φ : R} :
∀ (m : σ →₀ ), m s = 0 φ = 0

def mv_power_series.inv.aux {σ : Type u_1} {R : Type u_2} [ring R] :
R →

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.

Equations
theorem mv_power_series.coeff_inv_aux {σ : Type u_1} {R : Type u_2} [ring R] (n : σ →₀ ) (a : R) (φ : R) :
= ite (n = 0) a ((-a) * ∑ (x : →₀ ) × →₀ )) in n.antidiagonal.support, ite (x.snd < n) (( x.fst) φ) * x.snd) φ)) 0)

def mv_power_series.inv_of_unit {σ : Type u_1} {R : Type u_2} [ring R] :

A multivariate formal power series is invertible if the constant coefficient is invertible.

Equations
theorem mv_power_series.coeff_inv_of_unit {σ : Type u_1} {R : Type u_2} [ring R] (n : σ →₀ ) (φ : R) (u : units R) :
(φ.inv_of_unit u) = ite (n = 0) u⁻¹ ((-u⁻¹) * ∑ (x : →₀ ) × →₀ )) in n.antidiagonal.support, ite (x.snd < n) (( x.fst) φ) * x.snd) (φ.inv_of_unit u)) 0)

@[simp]
theorem mv_power_series.constant_coeff_inv_of_unit {σ : Type u_1} {R : Type u_2} [ring R] (φ : R) (u : units R) :

theorem mv_power_series.mul_inv_of_unit {σ : Type u_1} {R : Type u_2} [ring R] (φ : R) (u : units R) :
= uφ * φ.inv_of_unit u = 1

@[instance]
def mv_power_series.is_local_ring {σ : Type u_1} {R : Type u_2} [comm_ring R] [local_ring R] :

Multivariate formal power series over a local ring form a local ring.

@[instance]
def mv_power_series.map.is_local_ring_hom {σ : Type u_1} {R : Type u_2} {S : Type u_3} [comm_ring R] [comm_ring S] (f : R →+* S)  :

The map A[[X]] → B[[X]] induced by a local ring hom A → B is local

@[instance]
def mv_power_series.local_ring {σ : Type u_1} {R : Type u_2} [comm_ring R] [local_ring R] :

def mv_power_series.inv {σ : Type u_1} {k : Type u_3} [field k] :

The inverse 1/f of a multivariable power series f over a field

Equations
@[instance]
def mv_power_series.has_inv {σ : Type u_1} {k : Type u_3} [field k] :

Equations
theorem mv_power_series.coeff_inv {σ : Type u_1} {k : Type u_3} [field k] (n : σ →₀ ) (φ : k) :
φ⁻¹ = ite (n = 0) φ)⁻¹ ((- φ)⁻¹) * ∑ (x : →₀ ) × →₀ )) in n.antidiagonal.support, ite (x.snd < n) (( x.fst) φ) * x.snd) φ⁻¹) 0)

@[simp]
theorem mv_power_series.constant_coeff_inv {σ : Type u_1} {k : Type u_3} [field k] (φ : k) :
= φ)⁻¹

theorem mv_power_series.inv_eq_zero {σ : Type u_1} {k : Type u_3} [field k] {φ : k} :
φ⁻¹ = 0 = 0

@[simp]
theorem mv_power_series.inv_of_unit_eq {σ : Type u_1} {k : Type u_3} [field k] (φ : k) (h : 0) :

@[simp]
theorem mv_power_series.inv_of_unit_eq' {σ : Type u_1} {k : Type u_3} [field k] (φ : k) (u : units k) :
= uφ.inv_of_unit u = φ⁻¹

@[simp]
theorem mv_power_series.mul_inv {σ : Type u_1} {k : Type u_3} [field k] (φ : k) :
0φ * φ⁻¹ = 1

@[simp]
theorem mv_power_series.inv_mul {σ : Type u_1} {k : Type u_3} [field k] (φ : k) :
0φ⁻¹ * φ = 1

theorem mv_power_series.eq_mul_inv_iff_mul_eq {σ : Type u_1} {k : Type u_3} [field k] {φ₁ φ₂ φ₃ : k} :
φ₃ 0(φ₁ = φ₂ * φ₃⁻¹ φ₁ * φ₃ = φ₂)

theorem mv_power_series.eq_inv_iff_mul_eq_one {σ : Type u_1} {k : Type u_3} [field k] {φ ψ : k} :
0= ψ⁻¹ φ * ψ = 1)

theorem mv_power_series.inv_eq_iff_mul_eq_one {σ : Type u_1} {k : Type u_3} [field k] {φ ψ : k} :
0⁻¹ = φ φ * ψ = 1)

@[instance]
def mv_polynomial.coe_to_mv_power_series {σ : Type u_1} {R : Type u_2}  :
has_coe R) R)

The natural inclusion from multivariate polynomials into multivariate formal power series.

Equations
@[simp]
theorem mv_polynomial.coeff_coe {σ : Type u_1} {R : Type u_2} (φ : R) (n : σ →₀ ) :
φ =

@[simp]
theorem mv_polynomial.coe_monomial {σ : Type u_1} {R : Type u_2} (n : σ →₀ ) (a : R) :
= a

@[simp]
theorem mv_polynomial.coe_zero {σ : Type u_1} {R : Type u_2}  :
0 = 0

@[simp]
theorem mv_polynomial.coe_one {σ : Type u_1} {R : Type u_2}  :
1 = 1

@[simp]
theorem mv_polynomial.coe_add {σ : Type u_1} {R : Type u_2} (φ ψ : R) :
+ ψ) = φ + ψ

@[simp]
theorem mv_polynomial.coe_mul {σ : Type u_1} {R : Type u_2} (φ ψ : R) :
φ * ψ = (φ) * ψ

@[simp]
theorem mv_polynomial.coe_C {σ : Type u_1} {R : Type u_2} (a : R) :
= R) a

@[simp]
theorem mv_polynomial.coe_X {σ : Type u_1} {R : Type u_2} (s : σ) :

def mv_polynomial.coe_to_mv_power_series.ring_hom {σ : Type u_1} {R : Type u_2}  :

The coercion from multivariable polynomials to multivariable power series as a ring homomorphism.

Equations
def power_series  :
Type u_1Type u_1

Formal power series over the coefficient ring R.

Equations
@[instance]
def power_series.inhabited {R : Type u_1} [inhabited R] :

Equations
@[instance]

Equations
@[instance]

Equations
@[instance]
def power_series.add_comm_monoid {R : Type u_1}  :

Equations
@[instance]
def power_series.add_comm_group {R : Type u_1}  :

Equations
@[instance]
def power_series.semiring {R : Type u_1} [semiring R] :

Equations
@[instance]
def power_series.comm_semiring {R : Type u_1}  :

Equations
@[instance]
def power_series.ring {R : Type u_1} [ring R] :

Equations
@[instance]
def power_series.comm_ring {R : Type u_1} [comm_ring R] :

Equations
@[instance]
def power_series.nontrivial {R : Type u_1} [nontrivial R] :

@[instance]
def power_series.semimodule {R : Type u_1} [semiring R] :

Equations
@[instance]
def power_series.algebra {R : Type u_1} [comm_ring R] :

Equations
def power_series.coeff (R : Type u_1) [add_monoid R] :

The nth coefficient of a formal power series.

Equations
def power_series.monomial (R : Type u_1) [add_monoid R] :

The nth monomial with coefficient a as formal power series.

Equations
theorem power_series.coeff_def {R : Type u_1} [add_monoid R] {s : unit →₀ } {n : } :
s () = n

@[ext]
theorem power_series.ext {R : Type u_1} [add_monoid R] {φ ψ : power_series R} :
(∀ (n : ), n) φ = n) ψ)φ = ψ

Two formal power series are equal if all their coefficients are equal.

theorem power_series.ext_iff {R : Type u_1} [add_monoid R] {φ ψ : power_series R} :
φ = ψ ∀ (n : ), n) φ = n) ψ

Two formal power series are equal if all their coefficients are equal.

def power_series.mk {R : Type u_1} :
( → R)

Constructor for formal power series.

Equations
@[simp]
theorem power_series.coeff_mk {R : Type u_1} [add_monoid R] (n : ) (f : → R) :
n) = f n

theorem power_series.coeff_monomial {R : Type u_1} [add_monoid R] (m n : ) (a : R) :
m) ( a) = ite (m = n) a 0

theorem power_series.monomial_eq_mk {R : Type u_1} [add_monoid R] (n : ) (a : R) :
a = power_series.mk (λ (m : ), ite (m = n) a 0)

@[simp]
theorem power_series.coeff_monomial' {R : Type u_1} [add_monoid R] (n : ) (a : R) :
n) ( a) = a

@[simp]
theorem power_series.coeff_comp_monomial {R : Type u_1} [add_monoid R] (n : ) :
n).comp =

def power_series.constant_coeff (R : Type u_1) [semiring R] :

The constant coefficient of a formal power series.

Equations
def power_series.C (R : Type u_1) [semiring R] :

The constant formal power series.

Equations
def power_series.X {R : Type u_1} [semiring R] :

The variable of the formal power series ring.

Equations
@[simp]
theorem power_series.coeff_zero_eq_constant_coeff {R : Type u_1} [semiring R] :

theorem power_series.coeff_zero_eq_constant_coeff_apply {R : Type u_1} [semiring R] (φ : power_series R) :
0) φ =

@[simp]
theorem power_series.monomial_zero_eq_C {R : Type u_1} [semiring R] :

theorem power_series.monomial_zero_eq_C_apply {R : Type u_1} [semiring R] (a : R) :
a = a

theorem power_series.coeff_C {R : Type u_1} [semiring R] (n : ) (a : R) :
n) ( a) = ite (n = 0) a 0

theorem power_series.coeff_zero_C {R : Type u_1} [semiring R] (a : R) :
0) ( a) = a

theorem power_series.X_eq {R : Type u_1} [semiring R] :

theorem power_series.coeff_X {R : Type u_1} [semiring R] (n : ) :
= ite (n = 1) 1 0

theorem power_series.coeff_zero_X {R : Type u_1} [semiring R] :

@[simp]
theorem power_series.coeff_one_X {R : Type u_1} [semiring R] :

theorem power_series.X_pow_eq {R : Type u_1} [semiring R] (n : ) :
= 1

theorem power_series.coeff_X_pow {R : Type u_1} [semiring R] (m n : ) :
m) = ite (m = n) 1 0

@[simp]
theorem power_series.coeff_X_pow_self {R : Type u_1} [semiring R] (n : ) :
n) = 1

@[simp]
theorem power_series.coeff_one {R : Type u_1} [semiring R] (n : ) :
n) 1 = ite (n = 0) 1 0

theorem power_series.coeff_zero_one {R : Type u_1} [semiring R] :
0) 1 = 1

theorem power_series.coeff_mul {R : Type u_1} [semiring R] (n : ) (φ ψ : power_series R) :
n) * ψ) = ∑ (p : × ) in , ( p.fst) φ) * p.snd) ψ

@[simp]
theorem power_series.coeff_mul_C {R : Type u_1} [semiring R] (n : ) (φ : power_series R) (a : R) :
n) * a) = ( n) φ) * a

@[simp]
theorem power_series.coeff_C_mul {R : Type u_1} [semiring R] (n : ) (φ : power_series R) (a : R) :
n) (( a) * φ) = a * n) φ

@[simp]
theorem power_series.coeff_smul {R : Type u_1} [semiring R] (n : ) (φ : power_series R) (a : R) :
n) (a φ) = a * n) φ

@[simp]
theorem power_series.coeff_succ_mul_X {R : Type u_1} [semiring R] (n : ) (φ : power_series R) :
(n + 1)) = n) φ

@[simp]
theorem power_series.constant_coeff_C {R : Type u_1} [semiring R] (a : R) :
( a) = a

@[simp]
theorem power_series.constant_coeff_comp_C {R : Type u_1} [semiring R] :

@[simp]
theorem power_series.constant_coeff_zero {R : Type u_1} [semiring R] :

@[simp]
theorem power_series.constant_coeff_one {R : Type u_1} [semiring R] :

@[simp]
theorem power_series.constant_coeff_X {R : Type u_1} [semiring R] :

theorem power_series.coeff_zero_mul_X {R : Type u_1} [semiring R] (φ : power_series R) :
0) = 0

theorem power_series.is_unit_constant_coeff {R : Type u_1} [semiring R] (φ : power_series R) :

If a formal power series is invertible, then so is its constant coefficient.

def power_series.map {R : Type u_1} [semiring R] {S : Type u_2} [semiring S] :
(R →+* S)

The map between formal power series induced by a map on the coefficients.

Equations
@[simp]
theorem power_series.map_id {R : Type u_1} [semiring R] :

theorem power_series.map_comp {R : Type u_1} [semiring R] {S : Type u_2} {T : Type u_3} [semiring S] [semiring T] (f : R →+* S) (g : S →+* T) :

@[simp]
theorem power_series.coeff_map {R : Type u_1} [semiring R] {S : Type u_2} [semiring S] (f : R →+* S) (n : ) (φ : power_series R) :
n) ( φ) = f ( n) φ)

theorem power_series.X_pow_dvd_iff {R : Type u_1} {n : } {φ : power_series R} :
φ ∀ (m : ), m < n m) φ = 0

theorem power_series.X_dvd_iff {R : Type u_1} {φ : power_series R} :

def power_series.trunc {R : Type u_1}  :

The nth truncation of a formal power series to a polynomial

Equations
theorem power_series.coeff_trunc {R : Type u_1} (m n : ) (φ : power_series R) :
φ).coeff m = ite (m n) ( m) φ) 0

@[simp]
theorem power_series.trunc_zero {R : Type u_1} (n : ) :
= 0

@[simp]
theorem power_series.trunc_one {R : Type u_1} (n : ) :
= 1

@[simp]
theorem power_series.trunc_C {R : Type u_1} (n : ) (a : R) :
( a) =

@[simp]
theorem power_series.trunc_add {R : Type u_1} (n : ) (φ ψ : power_series R) :
+ ψ) =

def power_series.inv.aux {R : Type u_1} [ring R] :
R →

Auxiliary function used for computing inverse of a power series

Equations
theorem power_series.coeff_inv_aux {R : Type u_1} [ring R] (n : ) (a : R) (φ : power_series R) :
n) φ) = ite (n = 0) a ((-a) * ∑ (x : × ) in , ite (x.snd < n) (( x.fst) φ) * x.snd) φ)) 0)

def power_series.inv_of_unit {R : Type u_1} [ring R] :

A formal power series is invertible if the constant coefficient is invertible.

Equations
theorem power_series.coeff_inv_of_unit {R : Type u_1} [ring R] (n : ) (φ : power_series R) (u : units R) :
n) (φ.inv_of_unit u) = ite (n = 0) u⁻¹ ((-u⁻¹) * ∑ (x : × ) in , ite (x.snd < n) (( x.fst) φ) * x.snd) (φ.inv_of_unit u)) 0)

@[simp]
theorem power_series.constant_coeff_inv_of_unit {R : Type u_1} [ring R] (φ : power_series R) (u : units R) :

theorem power_series.mul_inv_of_unit {R : Type u_1} [ring R] (φ : power_series R) (u : units R) :
φ * φ.inv_of_unit u = 1

theorem power_series.eq_zero_or_eq_zero_of_mul_eq_zero {R : Type u_1} (φ ψ : power_series R) :
φ * ψ = 0φ = 0 ψ = 0

@[instance]
def power_series.integral_domain {R : Type u_1}  :

Equations
theorem power_series.span_X_is_prime {R : Type u_1}  :

The ideal spanned by the variable in the power series ring over an integral domain is a prime ideal.

theorem power_series.X_prime {R : Type u_1}  :

The variable of the power series ring over an integral domain is prime.

@[instance]
def power_series.map.is_local_ring_hom {R : Type u_1} {S : Type u_2} [comm_ring R] [comm_ring S] (f : R →+* S)  :

@[instance]
def power_series.local_ring {R : Type u_1} [comm_ring R] [local_ring R] :

def power_series.inv {k : Type u_2} [field k] :

The inverse 1/f of a power series f defined over a field

Equations
@[instance]
def power_series.has_inv {k : Type u_2} [field k] :

Equations
theorem power_series.inv_eq_inv_aux {k : Type u_2} [field k] (φ : power_series k) :

theorem power_series.coeff_inv {k : Type u_2} [field k] (n : ) (φ : power_series k) :
n) φ⁻¹ = ite (n = 0) φ)⁻¹ ((- φ)⁻¹) * ∑ (x : × ) in , ite (x.snd < n) (( x.fst) φ) * x.snd) φ⁻¹) 0)

@[simp]
theorem power_series.constant_coeff_inv {k : Type u_2} [field k] (φ : power_series k) :

theorem power_series.inv_eq_zero {k : Type u_2} [field k] {φ : power_series k} :
φ⁻¹ = 0

@[simp]
theorem power_series.inv_of_unit_eq {k : Type u_2} [field k] (φ : power_series k) (h : 0) :

@[simp]
theorem power_series.inv_of_unit_eq' {k : Type u_2} [field k] (φ : power_series k) (u : units k) :
φ.inv_of_unit u = φ⁻¹

@[simp]
theorem power_series.mul_inv {k : Type u_2} [field k] (φ : power_series k) :
φ * φ⁻¹ = 1

@[simp]
theorem power_series.inv_mul {k : Type u_2} [field k] (φ : power_series k) :
φ⁻¹ * φ = 1

theorem power_series.eq_mul_inv_iff_mul_eq {k : Type u_2} [field k] {φ₁ φ₂ φ₃ : power_series k} :
0(φ₁ = φ₂ * φ₃⁻¹ φ₁ * φ₃ = φ₂)

theorem power_series.eq_inv_iff_mul_eq_one {k : Type u_2} [field k] {φ ψ : power_series k} :
= ψ⁻¹ φ * ψ = 1)

theorem power_series.inv_eq_iff_mul_eq_one {k : Type u_2} [field k] {φ ψ : power_series k} :
⁻¹ = φ φ * ψ = 1)

def power_series.order {R : Type u_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
theorem power_series.order_finite_of_coeff_ne_zero {R : Type u_1} (φ : power_series R) :
(∃ (n : ), n) φ 0) → φ.order.dom

theorem power_series.coeff_order {R : Type u_1} (φ : power_series R) (h : φ.order.dom) :
(φ.order.get h)) φ 0

If the order of a formal power series is finite, then the coefficient indexed by the order is nonzero.

theorem power_series.order_le {R : Type u_1} (φ : power_series R) (n : ) :
n) φ 0φ.order n

If the nth coefficient of a formal power series is nonzero, then the order of the power series is less than or equal to n.

theorem power_series.coeff_of_lt_order {R : Type u_1} (φ : power_series R) (n : ) :
n < φ.order n) φ = 0

The nth coefficient of a formal power series is 0 if n is strictly smaller than the order of the power series.

theorem power_series.order_eq_top {R : Type u_1} {φ : power_series R} :
φ.order = φ = 0

The 0 power series is the unique power series with infinite order.

@[simp]
theorem power_series.order_zero {R : Type u_1}  :

The order of the 0 power series is infinite.

theorem power_series.nat_le_order {R : Type u_1} (φ : power_series R) (n : ) :
(∀ (i : ), i < n i) φ = 0)n φ.order

The order of a formal power series is at least n if the ith coefficient is 0 for all i < n.

theorem power_series.le_order {R : Type u_1} (φ : power_series R) (n : enat) :
(∀ (i : ), i < n i) φ = 0)n φ.order

The order of a formal power series is at least n if the ith coefficient is 0 for all i < n.

theorem power_series.order_eq_nat {R : Type u_1} {φ : power_series R} {n : } :
φ.order = n n) φ 0 ∀ (i : ), i < n i) φ = 0

The order of a formal power series is exactly n if the nth coefficient is nonzero, and the ith coefficient is 0 for all i < n.

theorem power_series.order_eq {R : Type u_1} {φ : power_series R} {n : enat} :
φ.order = n (∀ (i : ), i = n i) φ 0) ∀ (i : ), i < n i) φ = 0

The order of a formal power series is exactly n if the nth coefficient is nonzero, and the ith coefficient is 0 for all i < n.

theorem power_series.le_order_add {R : Type u_1} (φ ψ : power_series R) :
min φ.order ψ.order + ψ).order

The order of the sum of two formal power series is at least the minimum of their orders.

theorem power_series.order_add_of_order_eq {R : Type u_1} (φ ψ : power_series R) :
φ.order ψ.order+ ψ).order = φ.order ψ.order

The order of the sum of two formal power series is the minimum of their orders if their orders differ.

theorem power_series.order_mul_ge {R : Type u_1} (φ ψ : power_series R) :
φ.order + ψ.order * ψ).order

The order of the product of two formal power series is at least the sum of their orders.

theorem power_series.order_monomial {R : Type u_1} (n : ) (a : R) :
( a).order = ite (a = 0) n

The order of the monomial a*X^n is infinite if a = 0 and n otherwise.

theorem power_series.order_monomial_of_ne_zero {R : Type u_1} (n : ) (a : R) :
a 0( a).order = n

The order of the monomial a*X^n is n if a ≠ 0.

@[simp]
theorem power_series.order_one {R : Type u_1} [nontrivial R] :
1.order = 0

The order of the formal power series 1 is 0.

@[simp]
theorem power_series.order_X {R : Type u_1} [nontrivial R] :

The order of the formal power series X is 1.

@[simp]
theorem power_series.order_X_pow {R : Type u_1} [nontrivial R] (n : ) :

The order of the formal power series X^n is n.

theorem power_series.order_mul {R : Type u_1} (φ ψ : power_series R) :
* ψ).order = φ.order + ψ.order

The order of the product of two formal power series over an integral domain is the sum of their orders.

@[instance]
def polynomial.coe_to_power_series {R : Type u_2}  :

The natural inclusion from polynomials into formal power series.

Equations
@[simp]
theorem polynomial.coeff_coe {R : Type u_2} (φ : polynomial R) (n : ) :
n) φ = φ.coeff n

@[simp]
theorem polynomial.coe_monomial {R : Type u_2} (n : ) (a : R) :
( a) = a

@[simp]
theorem polynomial.coe_zero {R : Type u_2}  :
0 = 0

@[simp]
theorem polynomial.coe_one {R : Type u_2}  :
1 = 1

@[simp]
theorem polynomial.coe_add {R : Type u_2} (φ ψ : polynomial R) :
+ ψ) = φ + ψ

@[simp]
theorem polynomial.coe_mul {R : Type u_2} (φ ψ : polynomial R) :
φ * ψ = (φ) * ψ

@[simp]
theorem polynomial.coe_C {R : Type u_2} (a : R) :

@[simp]
theorem polynomial.coe_X {R : Type u_2}  :

The coercion from polynomials to power series as a ring homomorphism.

Equations