File: Mathlib/RingTheory/PowerSeries/Basic.lean

full_name: PowerSeries
code: /-- Formal power series over a coefficient type `R` -/
abbrev PowerSeries (R : Type*) 
goal: Type u_1

full_name: PowerSeries._aux_Mathlib_RingTheory_PowerSeries_Basic___unexpand_PowerSeries_1
code: /--
`R⟦X⟧` is notation for `PowerSeries R`,
the semiring of formal power series in one variable over a semiring `R`.
-/
scoped notation:9000 R "⟦X⟧" => PowerSeries R
goal: Lean.PrettyPrinter.Unexpander

full_name: PowerSeries.«_aux_Mathlib_RingTheory_PowerSeries_Basic___macroRules_PowerSeries_term_⟦X⟧_1»
code: /--
`R⟦X⟧` is notation for `PowerSeries R`,
the semiring of formal power series in one variable over a semiring `R`.
-/
scoped notation:9000 R "⟦X⟧" => PowerSeries R
goal: Lean.Macro

full_name: PowerSeries.instInhabited
code: instance [Inhabited R] : Inhabited R⟦X⟧ 
goal: Inhabited (PowerSeries R)

full_name: PowerSeries.instZero
code: instance [Zero R] : Zero R⟦X⟧ 
goal: Zero (PowerSeries R)

full_name: PowerSeries.instAddMonoid
code: instance [AddMonoid R] : AddMonoid R⟦X⟧ 
goal: AddMonoid (PowerSeries R)

full_name: PowerSeries.instAddGroup
code: instance [AddGroup R] : AddGroup R⟦X⟧ 
goal: AddGroup (PowerSeries R)

full_name: PowerSeries.instAddCommMonoid
code: instance [AddCommMonoid R] : AddCommMonoid R⟦X⟧ 
goal: AddCommMonoid (PowerSeries R)

full_name: PowerSeries.instAddCommGroup
code: instance [AddCommGroup R] : AddCommGroup R⟦X⟧ 
goal: AddCommGroup (PowerSeries R)

full_name: PowerSeries.instSemiring
code: instance [Semiring R] : Semiring R⟦X⟧ 
goal: Semiring (PowerSeries R)

full_name: PowerSeries.instCommSemiring
code: instance [CommSemiring R] : CommSemiring R⟦X⟧ 
goal: CommSemiring (PowerSeries R)

full_name: PowerSeries.instRing
code: instance [Ring R] : Ring R⟦X⟧ 
goal: Ring (PowerSeries R)

full_name: PowerSeries.instCommRing
code: instance [CommRing R] : CommRing R⟦X⟧ 
goal: CommRing (PowerSeries R)

full_name: PowerSeries.instNontrivial
code: instance [Nontrivial R] : Nontrivial R⟦X⟧ 
goal: Nontrivial (PowerSeries R)

full_name: PowerSeries.instModule
code: instance {A} [Semiring R] [AddCommMonoid A] [Module R A] : Module R A⟦X⟧ 
goal: Module R (PowerSeries A)

full_name: PowerSeries.instIsScalarTower
code: instance {A S} [Semiring R] [Semiring S] [AddCommMonoid A] [Module R A] [Module S A] [SMul R S]
    [IsScalarTower R S A] : IsScalarTower R S A⟦X⟧ 
goal: IsScalarTower R S (PowerSeries A)

full_name: PowerSeries.instAlgebra
code: instance {A} [Semiring A] [CommSemiring R] [Algebra R A] : Algebra R A⟦X⟧ 
goal: Algebra R (PowerSeries A)

full_name: PowerSeries.coeff
code: /-- The `n`th coefficient of a formal power series. -/
def coeff (n : ℕ) : R⟦X⟧ →ₗ[R] R 
goal: PowerSeries R →ₗ[R] R

full_name: PowerSeries.monomial
code: /-- The `n`th monomial with coefficient `a` as formal power series. -/
def monomial (n : ℕ) : R →ₗ[R] R⟦X⟧ 
goal: R →ₗ[R] PowerSeries R

full_name: PowerSeries.coeff_def
code: theorem coeff_def {s : Unit →₀ ℕ} {n : ℕ} (h : s () = n) : coeff R n = MvPowerSeries.coeff R s 
goal: PowerSeries.coeff R n = MvPowerSeries.coeff R s

full_name: PowerSeries.ext
code: /-- Two formal power series are equal if all their coefficients are equal. -/
@[ext]
theorem ext {φ ψ : R⟦X⟧} (h : ∀ n, coeff R n φ = coeff R n ψ) : φ = ψ 
goal: φ = ψ

full_name: PowerSeries.ext_iff
code: /-- Two formal power series are equal if all their coefficients are equal. -/
theorem ext_iff {φ ψ : R⟦X⟧} : φ = ψ ↔ ∀ n, coeff R n φ = coeff R n ψ 
goal: φ = ψ ↔ ∀ (n : ℕ), (PowerSeries.coeff R n) φ = (PowerSeries.coeff R n) ψ

full_name: PowerSeries.instSubsingleton
code: instance [Subsingleton R] : Subsingleton R⟦X⟧ 
goal: Subsingleton (PowerSeries R)

full_name: PowerSeries.mk
code: /-- Constructor for formal power series. -/
def mk {R} (f : ℕ → R) : R⟦X⟧ 
goal: PowerSeries R

full_name: PowerSeries.coeff_mk
code: @[simp]
theorem coeff_mk (n : ℕ) (f : ℕ → R) : coeff R n (mk f) = f n 
goal: (PowerSeries.coeff R n) (PowerSeries.mk f) = f n

full_name: PowerSeries.coeff_monomial
code: theorem coeff_monomial (m n : ℕ) (a : R) : coeff R m (monomial R n a) = if m = n then a else 0 
goal: (PowerSeries.coeff R m) ((PowerSeries.monomial R n) a) = if m = n then a else 0

full_name: PowerSeries.monomial_eq_mk
code: theorem monomial_eq_mk (n : ℕ) (a : R) : monomial R n a = mk fun m => if m = n then a else 0 
goal: (PowerSeries.monomial R n) a = PowerSeries.mk fun m => if m = n then a else 0

full_name: PowerSeries.coeff_monomial_same
code: @[simp]
theorem coeff_monomial_same (n : ℕ) (a : R) : coeff R n (monomial R n a) = a 
goal: (PowerSeries.coeff R n) ((PowerSeries.monomial R n) a) = a

full_name: PowerSeries.coeff_comp_monomial
code: @[simp]
theorem coeff_comp_monomial (n : ℕ) : (coeff R n).comp (monomial R n) = LinearMap.id 
goal: PowerSeries.coeff R n ∘ₗ PowerSeries.monomial R n = LinearMap.id

full_name: PowerSeries.constantCoeff
code: /-- The constant coefficient of a formal power series. -/
def constantCoeff : R⟦X⟧ →+* R 
goal: PowerSeries R →+* R

full_name: PowerSeries.C
code: /-- The constant formal power series. -/
def C : R →+* R⟦X⟧ 
goal: R →+* PowerSeries R

full_name: PowerSeries.X
code: /-- The variable of the formal power series ring. -/
def X : R⟦X⟧ 
goal: PowerSeries R

full_name: PowerSeries.commute_X
code: theorem commute_X (φ : R⟦X⟧) : Commute φ X 
goal: Commute φ PowerSeries.X

full_name: PowerSeries.coeff_zero_eq_constantCoeff
code: @[simp]
theorem coeff_zero_eq_constantCoeff : ⇑(coeff R 0) = constantCoeff R 
goal: ⇑(PowerSeries.coeff R 0) = ⇑(PowerSeries.constantCoeff R)

full_name: PowerSeries.coeff_zero_eq_constantCoeff_apply
code: theorem coeff_zero_eq_constantCoeff_apply (φ : R⟦X⟧) : coeff R 0 φ = constantCoeff R φ 
goal: (PowerSeries.coeff R 0) φ = (PowerSeries.constantCoeff R) φ

full_name: PowerSeries.monomial_zero_eq_C
code: @[simp]
theorem monomial_zero_eq_C : ⇑(monomial R 0) = C R 
goal: ⇑(PowerSeries.monomial R 0) = ⇑(PowerSeries.C R)

full_name: PowerSeries.monomial_zero_eq_C_apply
code: theorem monomial_zero_eq_C_apply (a : R) : monomial R 0 a = C R a 
goal: (PowerSeries.monomial R 0) a = (PowerSeries.C R) a

full_name: PowerSeries.coeff_C
code: theorem coeff_C (n : ℕ) (a : R) : coeff R n (C R a : R⟦X⟧) = if n = 0 then a else 0 
goal: (PowerSeries.coeff R n) ((PowerSeries.C R) a) = if n = 0 then a else 0

full_name: PowerSeries.coeff_zero_C
code: @[simp]
theorem coeff_zero_C (a : R) : coeff R 0 (C R a) = a 
goal: (PowerSeries.coeff R 0) ((PowerSeries.C R) a) = a

full_name: PowerSeries.coeff_ne_zero_C
code: theorem coeff_ne_zero_C {a : R} {n : ℕ} (h : n ≠ 0) : coeff R n (C R a) = 0 
goal: (PowerSeries.coeff R n) ((PowerSeries.C R) a) = 0

full_name: PowerSeries.coeff_succ_C
code: @[simp]
theorem coeff_succ_C {a : R} {n : ℕ} : coeff R (n + 1) (C R a) = 0 
goal: (PowerSeries.coeff R (n + 1)) ((PowerSeries.C R) a) = 0

full_name: PowerSeries.C_injective
code: theorem C_injective : Function.Injective (C R) 
goal: Function.Injective ⇑(PowerSeries.C R)

full_name: PowerSeries.subsingleton_iff
code: protected theorem subsingleton_iff : Subsingleton R⟦X⟧ ↔ Subsingleton R 
goal: Subsingleton (PowerSeries R) ↔ Subsingleton R

full_name: PowerSeries.X_eq
code: theorem X_eq : (X : R⟦X⟧) = monomial R 1 1 
goal: PowerSeries.X = (PowerSeries.monomial R 1) 1

full_name: PowerSeries.coeff_X
code: theorem coeff_X (n : ℕ) : coeff R n (X : R⟦X⟧) = if n = 1 then 1 else 0 
goal: (PowerSeries.coeff R n) PowerSeries.X = if n = 1 then 1 else 0

full_name: PowerSeries.coeff_zero_X
code: @[simp]
theorem coeff_zero_X : coeff R 0 (X : R⟦X⟧) = 0 
goal: (PowerSeries.coeff R 0) PowerSeries.X = 0

full_name: PowerSeries.coeff_one_X
code: @[simp]
theorem coeff_one_X : coeff R 1 (X : R⟦X⟧) = 1 
goal: (PowerSeries.coeff R 1) PowerSeries.X = 1

full_name: PowerSeries.X_ne_zero
code: @[simp]
theorem X_ne_zero [Nontrivial R] : (X : R⟦X⟧) ≠ 0 
goal: PowerSeries.X ≠ 0

full_name: PowerSeries.X_pow_eq
code: theorem X_pow_eq (n : ℕ) : (X : R⟦X⟧) ^ n = monomial R n 1 
goal: PowerSeries.X ^ n = (PowerSeries.monomial R n) 1

full_name: PowerSeries.coeff_X_pow
code: theorem coeff_X_pow (m n : ℕ) : coeff R m ((X : R⟦X⟧) ^ n) = if m = n then 1 else 0 
goal: (PowerSeries.coeff R m) (PowerSeries.X ^ n) = if m = n then 1 else 0

full_name: PowerSeries.coeff_X_pow_self
code: @[simp]
theorem coeff_X_pow_self (n : ℕ) : coeff R n ((X : R⟦X⟧) ^ n) = 1 
goal: (PowerSeries.coeff R n) (PowerSeries.X ^ n) = 1

full_name: PowerSeries.coeff_one
code: @[simp]
theorem coeff_one (n : ℕ) : coeff R n (1 : R⟦X⟧) = if n = 0 then 1 else 0 
goal: (PowerSeries.coeff R n) 1 = if n = 0 then 1 else 0

full_name: PowerSeries.coeff_zero_one
code: theorem coeff_zero_one : coeff R 0 (1 : R⟦X⟧) = 1 
goal: (PowerSeries.coeff R 0) 1 = 1

full_name: PowerSeries.coeff_mul
code: theorem coeff_mul (n : ℕ) (φ ψ : R⟦X⟧) :
    coeff R n (φ * ψ) = ∑ p ∈ antidiagonal n, coeff R p.1 φ * coeff R p.2 ψ 
goal: (PowerSeries.coeff R n) (φ * ψ) = ∑ p ∈ Finset.antidiagonal n, (PowerSeries.coeff R p.1) φ * (PowerSeries.coeff R p.2) ψ

full_name: PowerSeries.coeff_mul_C
code: @[simp]
theorem coeff_mul_C (n : ℕ) (φ : R⟦X⟧) (a : R) : coeff R n (φ * C R a) = coeff R n φ * a 
goal: (PowerSeries.coeff R n) (φ * (PowerSeries.C R) a) = (PowerSeries.coeff R n) φ * a

full_name: PowerSeries.coeff_C_mul
code: @[simp]
theorem coeff_C_mul (n : ℕ) (φ : R⟦X⟧) (a : R) : coeff R n (C R a * φ) = a * coeff R n φ 
goal: (PowerSeries.coeff R n) ((PowerSeries.C R) a * φ) = a * (PowerSeries.coeff R n) φ

full_name: PowerSeries.coeff_smul
code: @[simp]
theorem coeff_smul {S : Type*} [Semiring S] [Module R S] (n : ℕ) (φ : PowerSeries S) (a : R) :
    coeff S n (a • φ) = a • coeff S n φ 
goal: (PowerSeries.coeff S n) (a • φ) = a • (PowerSeries.coeff S n) φ

full_name: PowerSeries.constantCoeff_smul
code: @[simp]
theorem constantCoeff_smul {S : Type*} [Semiring S] [Module R S] (φ : PowerSeries S) (a : R) :
    constantCoeff S (a • φ) = a • constantCoeff S φ 
goal: (PowerSeries.constantCoeff S) (a • φ) = a • (PowerSeries.constantCoeff S) φ

full_name: PowerSeries.smul_eq_C_mul
code: theorem smul_eq_C_mul (f : R⟦X⟧) (a : R) : a • f = C R a * f 
goal: a • f = (PowerSeries.C R) a * f

full_name: PowerSeries.coeff_succ_mul_X
code: @[simp]
theorem coeff_succ_mul_X (n : ℕ) (φ : R⟦X⟧) : coeff R (n + 1) (φ * X) = coeff R n φ 
goal: (PowerSeries.coeff R (n + 1)) (φ * PowerSeries.X) = (PowerSeries.coeff R n) φ

full_name: PowerSeries.coeff_succ_X_mul
code: @[simp]
theorem coeff_succ_X_mul (n : ℕ) (φ : R⟦X⟧) : coeff R (n + 1) (X * φ) = coeff R n φ 
goal: (PowerSeries.coeff R (n + 1)) (PowerSeries.X * φ) = (PowerSeries.coeff R n) φ

full_name: PowerSeries.constantCoeff_C
code: @[simp]
theorem constantCoeff_C (a : R) : constantCoeff R (C R a) = a 
goal: (PowerSeries.constantCoeff R) ((PowerSeries.C R) a) = a

full_name: PowerSeries.constantCoeff_comp_C
code: @[simp]
theorem constantCoeff_comp_C : (constantCoeff R).comp (C R) = RingHom.id R 
goal: (PowerSeries.constantCoeff R).comp (PowerSeries.C R) = RingHom.id R

full_name: PowerSeries.constantCoeff_zero
code: theorem constantCoeff_zero : constantCoeff R 0 = 0 
goal: (PowerSeries.constantCoeff R) 0 = 0

full_name: PowerSeries.constantCoeff_one
code: theorem constantCoeff_one : constantCoeff R 1 = 1 
goal: (PowerSeries.constantCoeff R) 1 = 1

full_name: PowerSeries.constantCoeff_X
code: @[simp]
theorem constantCoeff_X : constantCoeff R X = 0 
goal: (PowerSeries.constantCoeff R) PowerSeries.X = 0

full_name: PowerSeries.constantCoeff_mk
code: @[simp]
theorem constantCoeff_mk {f : ℕ → R} : constantCoeff R (mk f) = f 0 
goal: (PowerSeries.constantCoeff R) (PowerSeries.mk f) = f 0

full_name: PowerSeries.coeff_zero_mul_X
code: theorem coeff_zero_mul_X (φ : R⟦X⟧) : coeff R 0 (φ * X) = 0 
goal: (PowerSeries.coeff R 0) (φ * PowerSeries.X) = 0

full_name: PowerSeries.coeff_zero_X_mul
code: theorem coeff_zero_X_mul (φ : R⟦X⟧) : coeff R 0 (X * φ) = 0 
goal: (PowerSeries.coeff R 0) (PowerSeries.X * φ) = 0

full_name: PowerSeries.constantCoeff_surj
code: theorem constantCoeff_surj : Function.Surjective (constantCoeff R) 
goal: Function.Surjective ⇑(PowerSeries.constantCoeff R)

full_name: PowerSeries.coeff_C_mul_X_pow
code: theorem coeff_C_mul_X_pow (x : R) (k n : ℕ) :
    coeff R n (C R x * X ^ k : R⟦X⟧) = if n = k then x else 0 
goal: (PowerSeries.coeff R n) ((PowerSeries.C R) x * PowerSeries.X ^ k) = if n = k then x else 0

full_name: PowerSeries.coeff_mul_X_pow
code: @[simp]
theorem coeff_mul_X_pow (p : R⟦X⟧) (n d : ℕ) :
    coeff R (d + n) (p * X ^ n) = coeff R d p 
goal: (PowerSeries.coeff R (d + n)) (p * PowerSeries.X ^ n) = (PowerSeries.coeff R d) p

full_name: PowerSeries.coeff_X_pow_mul
code: @[simp]
theorem coeff_X_pow_mul (p : R⟦X⟧) (n d : ℕ) :
    coeff R (d + n) (X ^ n * p) = coeff R d p 
goal: (PowerSeries.coeff R (d + n)) (PowerSeries.X ^ n * p) = (PowerSeries.coeff R d) p

full_name: PowerSeries.coeff_mul_X_pow'
code: theorem coeff_mul_X_pow' (p : R⟦X⟧) (n d : ℕ) :
    coeff R d (p * X ^ n) = ite (n ≤ d) (coeff R (d - n) p) 0 
goal: (PowerSeries.coeff R d) (p * PowerSeries.X ^ n) = if n ≤ d then (PowerSeries.coeff R (d - n)) p else 0

full_name: PowerSeries.coeff_X_pow_mul'
code: theorem coeff_X_pow_mul' (p : R⟦X⟧) (n d : ℕ) :
    coeff R d (X ^ n * p) = ite (n ≤ d) (coeff R (d - n) p) 0 
goal: (PowerSeries.coeff R d) (PowerSeries.X ^ n * p) = if n ≤ d then (PowerSeries.coeff R (d - n)) p else 0

full_name: PowerSeries.isUnit_constantCoeff
code: /-- If a formal power series is invertible, then so is its constant coefficient. -/
theorem isUnit_constantCoeff (φ : R⟦X⟧) (h : IsUnit φ) : IsUnit (constantCoeff R φ) 
goal: IsUnit ((PowerSeries.constantCoeff R) φ)

full_name: PowerSeries.eq_shift_mul_X_add_const
code: /-- Split off the constant coefficient. -/
theorem eq_shift_mul_X_add_const (φ : R⟦X⟧) :
    φ = (mk fun p => coeff R (p + 1) φ) * X + C R (constantCoeff R φ) 
goal: φ =
  (PowerSeries.mk fun p => (PowerSeries.coeff R (p + 1)) φ) * PowerSeries.X +
    (PowerSeries.C R) ((PowerSeries.constantCoeff R) φ)

full_name: PowerSeries.eq_X_mul_shift_add_const
code: /-- Split off the constant coefficient. -/
theorem eq_X_mul_shift_add_const (φ : R⟦X⟧) :
    φ = (X * mk fun p => coeff R (p + 1) φ) + C R (constantCoeff R φ) 
goal: φ =
  (PowerSeries.X * PowerSeries.mk fun p => (PowerSeries.coeff R (p + 1)) φ) +
    (PowerSeries.C R) ((PowerSeries.constantCoeff R) φ)

full_name: PowerSeries.map
code: /-- The map between formal power series induced by a map on the coefficients. -/
def map : R⟦X⟧ →+* S⟦X⟧ 
goal: PowerSeries R →+* PowerSeries S

full_name: PowerSeries.map_id
code: @[simp]
theorem map_id : (map (RingHom.id R) : R⟦X⟧ → R⟦X⟧) = id 
goal: ⇑(PowerSeries.map (RingHom.id R)) = id

full_name: PowerSeries.map_comp
code: theorem map_comp : map (g.comp f) = (map g).comp (map f) 
goal: PowerSeries.map (g.comp f) = (PowerSeries.map g).comp (PowerSeries.map f)

full_name: PowerSeries.coeff_map
code: @[simp]
theorem coeff_map (n : ℕ) (φ : R⟦X⟧) : coeff S n (map f φ) = f (coeff R n φ) 
goal: (PowerSeries.coeff S n) ((PowerSeries.map f) φ) = f ((PowerSeries.coeff R n) φ)

full_name: PowerSeries.map_C
code: @[simp]
theorem map_C (r : R) : map f (C _ r) = C _ (f r) 
goal: (PowerSeries.map f) ((PowerSeries.C R) r) = (PowerSeries.C S) (f r)

full_name: PowerSeries.map_X
code: @[simp]
theorem map_X : map f X = X 
goal: (PowerSeries.map f) PowerSeries.X = PowerSeries.X

full_name: PowerSeries.X_pow_dvd_iff
code: theorem X_pow_dvd_iff {n : ℕ} {φ : R⟦X⟧} :
    (X : R⟦X⟧) ^ n ∣ φ ↔ ∀ m, m < n → coeff R m φ = 0 
goal: PowerSeries.X ^ n ∣ φ ↔ ∀ m < n, (PowerSeries.coeff R m) φ = 0

full_name: PowerSeries.X_dvd_iff
code: theorem X_dvd_iff {φ : R⟦X⟧} : (X : R⟦X⟧) ∣ φ ↔ constantCoeff R φ = 0 
goal: PowerSeries.X ∣ φ ↔ (PowerSeries.constantCoeff R) φ = 0

full_name: PowerSeries.rescale
code: /-- The ring homomorphism taking a power series `f(X)` to `f(aX)`. -/
noncomputable def rescale (a : R) : R⟦X⟧ →+* R⟦X⟧ 
goal: PowerSeries R →+* PowerSeries R

full_name: PowerSeries.coeff_rescale
code: @[simp]
theorem coeff_rescale (f : R⟦X⟧) (a : R) (n : ℕ) :
    coeff R n (rescale a f) = a ^ n * coeff R n f 
goal: (PowerSeries.coeff R n) ((PowerSeries.rescale a) f) = a ^ n * (PowerSeries.coeff R n) f

full_name: PowerSeries.rescale_zero
code: @[simp]
theorem rescale_zero : rescale 0 = (C R).comp (constantCoeff R) 
goal: PowerSeries.rescale 0 = (PowerSeries.C R).comp (PowerSeries.constantCoeff R)

full_name: PowerSeries.rescale_zero_apply
code: theorem rescale_zero_apply : rescale 0 X = C R (constantCoeff R X) 
goal: (PowerSeries.rescale 0) PowerSeries.X = (PowerSeries.C R) ((PowerSeries.constantCoeff R) PowerSeries.X)

full_name: PowerSeries.rescale_one
code: @[simp]
theorem rescale_one : rescale 1 = RingHom.id R⟦X⟧ 
goal: PowerSeries.rescale 1 = RingHom.id (PowerSeries R)

full_name: PowerSeries.rescale_mk
code: theorem rescale_mk (f : ℕ → R) (a : R) : rescale a (mk f) = mk fun n : ℕ => a ^ n * f n 
goal: (PowerSeries.rescale a) (PowerSeries.mk f) = PowerSeries.mk fun n => a ^ n * f n

full_name: PowerSeries.rescale_rescale
code: theorem rescale_rescale (f : R⟦X⟧) (a b : R) :
    rescale b (rescale a f) = rescale (a * b) f 
goal: (PowerSeries.rescale b) ((PowerSeries.rescale a) f) = (PowerSeries.rescale (a * b)) f

full_name: PowerSeries.rescale_mul
code: theorem rescale_mul (a b : R) : rescale (a * b) = (rescale b).comp (rescale a) 
goal: PowerSeries.rescale (a * b) = (PowerSeries.rescale b).comp (PowerSeries.rescale a)

full_name: PowerSeries.coeff_prod
code: /-- Coefficients of a product of power series -/
theorem coeff_prod (f : ι → PowerSeries R) (d : ℕ) (s : Finset ι) :
    coeff R d (∏ j ∈ s, f j) = ∑ l ∈ finsuppAntidiag s d, ∏ i ∈ s, coeff R (l i) (f i) 
goal: (PowerSeries.coeff R d) (∏ j ∈ s, f j) = ∑ l ∈ s.finsuppAntidiag d, ∏ i ∈ s, (PowerSeries.coeff R (l i)) (f i)

full_name: PowerSeries.coeff_pow
code: /-- The `n`-th coefficient of the `k`-th power of a power series. -/
lemma coeff_pow (k n : ℕ) (φ : R⟦X⟧) :
    coeff R n (φ ^ k) = ∑ l ∈ finsuppAntidiag (range k) n, ∏ i ∈ range k, coeff R (l i) φ 
goal: (PowerSeries.coeff R n) (φ ^ k) =
  ∑ l ∈ (Finset.range k).finsuppAntidiag n, ∏ i ∈ Finset.range k, (PowerSeries.coeff R (l i)) φ

full_name: PowerSeries.coeff_one_mul
code: /-- First coefficient of the product of two power series. -/
lemma coeff_one_mul (φ ψ : R⟦X⟧) : coeff R 1 (φ * ψ) =
    coeff R 1 φ * constantCoeff R ψ + coeff R 1 ψ * constantCoeff R φ 
goal: (PowerSeries.coeff R 1) (φ * ψ) =
  (PowerSeries.coeff R 1) φ * (PowerSeries.constantCoeff R) ψ +
    (PowerSeries.coeff R 1) ψ * (PowerSeries.constantCoeff R) φ

full_name: PowerSeries.coeff_one_pow
code: /-- First coefficient of the `n`-th power of a power series. -/
lemma coeff_one_pow (n : ℕ) (φ : R⟦X⟧) :
    coeff R 1 (φ ^ n) = n * coeff R 1 φ * (constantCoeff R φ) ^ (n - 1) 
goal: (PowerSeries.coeff R 1) (φ ^ n) = ↑n * (PowerSeries.coeff R 1) φ * (PowerSeries.constantCoeff R) φ ^ (n - 1)

full_name: PowerSeries.not_isField
code: theorem not_isField : ¬IsField A⟦X⟧ 
goal: ¬IsField (PowerSeries A)

full_name: PowerSeries.rescale_X
code: @[simp]
theorem rescale_X (a : A) : rescale a X = C A a * X 
goal: (PowerSeries.rescale a) PowerSeries.X = (PowerSeries.C A) a * PowerSeries.X

full_name: PowerSeries.rescale_neg_one_X
code: theorem rescale_neg_one_X : rescale (-1 : A) X = -X 
goal: (PowerSeries.rescale (-1)) PowerSeries.X = -PowerSeries.X

full_name: PowerSeries.evalNegHom
code: /-- The ring homomorphism taking a power series `f(X)` to `f(-X)`. -/
noncomputable def evalNegHom : A⟦X⟧ →+* A⟦X⟧ 
goal: PowerSeries A →+* PowerSeries A

full_name: PowerSeries.evalNegHom_X
code: @[simp]
theorem evalNegHom_X : evalNegHom (X : A⟦X⟧) = -X 
goal: PowerSeries.evalNegHom PowerSeries.X = -PowerSeries.X

full_name: PowerSeries.eq_zero_or_eq_zero_of_mul_eq_zero
code: theorem eq_zero_or_eq_zero_of_mul_eq_zero [NoZeroDivisors R] (φ ψ : R⟦X⟧) (h : φ * ψ = 0) :
    φ = 0 ∨ ψ = 0 
goal: φ = 0 ∨ ψ = 0

full_name: PowerSeries.instNoZeroDivisors
code: instance [NoZeroDivisors R] : NoZeroDivisors R⟦X⟧ 
goal: NoZeroDivisors (PowerSeries R)

full_name: PowerSeries.instIsDomain
code: instance [IsDomain R] : IsDomain R⟦X⟧ 
goal: IsDomain (PowerSeries R)

full_name: PowerSeries.span_X_isPrime
code: /-- The ideal spanned by the variable in the power series ring
 over an integral domain is a prime ideal. -/
theorem span_X_isPrime : (Ideal.span ({X} : Set R⟦X⟧)).IsPrime 
goal: (Ideal.span {PowerSeries.X}).IsPrime

full_name: PowerSeries.X_prime
code: /-- The variable of the power series ring over an integral domain is prime. -/
theorem X_prime : Prime (X : R⟦X⟧) 
goal: Prime PowerSeries.X

full_name: PowerSeries.X_irreducible
code: /-- The variable of the power series ring over an integral domain is irreducible. -/
theorem X_irreducible : Irreducible (X : R⟦X⟧) 
goal: Irreducible PowerSeries.X

full_name: PowerSeries.rescale_injective
code: theorem rescale_injective {a : R} (ha : a ≠ 0) : Function.Injective (rescale a) 
goal: Function.Injective ⇑(PowerSeries.rescale a)

full_name: PowerSeries.C_eq_algebraMap
code: theorem C_eq_algebraMap {r : R} : C R r = (algebraMap R R⟦X⟧) r 
goal: (PowerSeries.C R) r = (algebraMap R (PowerSeries R)) r

full_name: PowerSeries.algebraMap_apply
code: theorem algebraMap_apply {r : R} : algebraMap R A⟦X⟧ r = C A (algebraMap R A r) 
goal: (algebraMap R (PowerSeries A)) r = (PowerSeries.C A) ((algebraMap R A) r)

full_name: PowerSeries.instNontrivialSubalgebra
code: instance [Nontrivial R] : Nontrivial (Subalgebra R R⟦X⟧) 
goal: Nontrivial (Subalgebra R (PowerSeries R))

full_name: Polynomial.ToPowerSeries
code: /-- The natural inclusion from polynomials into formal power series. -/
@[coe]
def ToPowerSeries : R[X] → (PowerSeries R) 
goal: Polynomial R → PowerSeries R

full_name: Polynomial.coeToPowerSeries
code: /-- The natural inclusion from polynomials into formal power series. -/
instance coeToPowerSeries : Coe R[X] (PowerSeries R) 
goal: Coe (Polynomial R) (PowerSeries R)

full_name: Polynomial.coe_def
code: theorem coe_def : (φ : PowerSeries R) = PowerSeries.mk (coeff φ) 
goal: ↑φ = PowerSeries.mk φ.coeff

full_name: Polynomial.coeff_coe
code: @[simp, norm_cast]
theorem coeff_coe (n) : PowerSeries.coeff R n φ = coeff φ n 
goal: (PowerSeries.coeff R n) ↑φ = φ.coeff n

full_name: Polynomial.coe_monomial
code: @[simp, norm_cast]
theorem coe_monomial (n : ℕ) (a : R) :
    (monomial n a : PowerSeries R) = PowerSeries.monomial R n a 
goal: ↑((Polynomial.monomial n) a) = (PowerSeries.monomial R n) a

full_name: Polynomial.coe_zero
code: @[simp, norm_cast]
theorem coe_zero : ((0 : R[X]) : PowerSeries R) = 0 
goal: ↑0 = 0

full_name: Polynomial.coe_one
code: @[simp, norm_cast]
theorem coe_one : ((1 : R[X]) : PowerSeries R) = 1 
goal: ↑1 = 1

full_name: Polynomial.coe_add
code: @[simp, norm_cast]
theorem coe_add : ((φ + ψ : R[X]) : PowerSeries R) = φ + ψ 
goal: ↑(φ + ψ) = ↑φ + ↑ψ

full_name: Polynomial.coe_mul
code: @[simp, norm_cast]
theorem coe_mul : ((φ * ψ : R[X]) : PowerSeries R) = φ * ψ 
goal: ↑(φ * ψ) = ↑φ * ↑ψ

full_name: Polynomial.coe_C
code: @[simp, norm_cast]
theorem coe_C (a : R) : ((C a : R[X]) : PowerSeries R) = PowerSeries.C R a 
goal: ↑(Polynomial.C a) = (PowerSeries.C R) a

full_name: Polynomial.coe_X
code: @[simp, norm_cast]
theorem coe_X : ((X : R[X]) : PowerSeries R) = PowerSeries.X 
goal: ↑Polynomial.X = PowerSeries.X

full_name: Polynomial.constantCoeff_coe
code: @[simp]
theorem constantCoeff_coe : PowerSeries.constantCoeff R φ = φ.coeff 0 
goal: (PowerSeries.constantCoeff R) ↑φ = φ.coeff 0

full_name: Polynomial.coe_injective
code: theorem coe_injective : Function.Injective (Coe.coe : R[X] → PowerSeries R) 
goal: Function.Injective Coe.coe

full_name: Polynomial.coe_inj
code: @[simp, norm_cast]
theorem coe_inj : (φ : PowerSeries R) = ψ ↔ φ = ψ 
goal: ↑φ = ↑ψ ↔ φ = ψ

full_name: Polynomial.coe_eq_zero_iff
code: @[simp]
theorem coe_eq_zero_iff : (φ : PowerSeries R) = 0 ↔ φ = 0 
goal: ↑φ = 0 ↔ φ = 0

full_name: Polynomial.coe_eq_one_iff
code: @[simp]
theorem coe_eq_one_iff : (φ : PowerSeries R) = 1 ↔ φ = 1 
goal: ↑φ = 1 ↔ φ = 1

full_name: Polynomial.coeToPowerSeries.ringHom
code: /-- The coercion from polynomials to power series
as a ring homomorphism.
-/
def coeToPowerSeries.ringHom : R[X] →+* PowerSeries R 
goal: Polynomial R →+* PowerSeries R

full_name: Polynomial.coeToPowerSeries.ringHom_apply
code: @[simp]
theorem coeToPowerSeries.ringHom_apply : coeToPowerSeries.ringHom φ = φ 
goal: Polynomial.coeToPowerSeries.ringHom φ = ↑φ

full_name: Polynomial.coe_pow
code: @[simp, norm_cast]
theorem coe_pow (n : ℕ) : ((φ ^ n : R[X]) : PowerSeries R) = (φ : PowerSeries R) ^ n 
goal: ↑(φ ^ n) = ↑φ ^ n

full_name: Polynomial.eval₂_C_X_eq_coe
code: theorem eval₂_C_X_eq_coe : φ.eval₂ (PowerSeries.C R) PowerSeries.X = ↑φ 
goal: Polynomial.eval₂ (PowerSeries.C R) PowerSeries.X φ = ↑φ

full_name: Polynomial.coeToPowerSeries.algHom
code: /-- The coercion from polynomials to power series
as an algebra homomorphism.
-/
def coeToPowerSeries.algHom : R[X] →ₐ[R] PowerSeries A 
goal: Polynomial R →ₐ[R] PowerSeries A

full_name: Polynomial.coeToPowerSeries.algHom_apply
code: @[simp]
theorem coeToPowerSeries.algHom_apply :
    coeToPowerSeries.algHom A φ = PowerSeries.map (algebraMap R A) ↑φ 
goal: (Polynomial.coeToPowerSeries.algHom A) φ = (PowerSeries.map (algebraMap R A)) ↑φ

full_name: PowerSeries.algebraPolynomial
code: instance algebraPolynomial : Algebra R[X] A⟦X⟧ 
goal: Algebra (Polynomial R) (PowerSeries A)

full_name: PowerSeries.algebraPowerSeries
code: instance algebraPowerSeries : Algebra R⟦X⟧ A⟦X⟧ 
goal: Algebra (PowerSeries R) (PowerSeries A)

full_name: PowerSeries.algebraPolynomial'
code: instance (priority := 100) algebraPolynomial' {A : Type*} [CommSemiring A] [Algebra R A[X]] :
    Algebra R A⟦X⟧ 
goal: Algebra R (PowerSeries A)

full_name: PowerSeries.algebraMap_apply'
code: theorem algebraMap_apply' (p : R[X]) : algebraMap R[X] A⟦X⟧ p = map (algebraMap R A) p 
goal: (algebraMap (Polynomial R) (PowerSeries A)) p = (PowerSeries.map (algebraMap R A)) ↑p

full_name: PowerSeries.algebraMap_apply''
code: theorem algebraMap_apply'' :
    algebraMap R⟦X⟧ A⟦X⟧ f = map (algebraMap R A) f 
goal: (algebraMap (PowerSeries R) (PowerSeries A)) f = (PowerSeries.map (algebraMap R A)) f