File: Mathlib/RingTheory/PowerSeries/Inverse.lean

full_name: PowerSeries.inv.aux
code: /-- Auxiliary function used for computing inverse of a power series -/
protected def inv.aux : R → R⟦X⟧ → R⟦X⟧ 
goal: R → PowerSeries R → PowerSeries R

full_name: PowerSeries.coeff_inv_aux
code: theorem coeff_inv_aux (n : ℕ) (a : R) (φ : R⟦X⟧) :
    coeff R n (inv.aux a φ) =
      if n = 0 then a
      else
        -a *
          ∑ x ∈ antidiagonal n,
            if x.2 < n then coeff R x.1 φ * coeff R x.2 (inv.aux a φ) else 0 
goal: (PowerSeries.coeff R n) (PowerSeries.inv.aux a φ) =
  if n = 0 then a
  else
    -a *
      ∑ x ∈ Finset.antidiagonal n,
        if x.2 < n then (PowerSeries.coeff R x.1) φ * (PowerSeries.coeff R x.2) (PowerSeries.inv.aux a φ) else 0

full_name: PowerSeries.invOfUnit
code: /-- A formal power series is invertible if the constant coefficient is invertible. -/
def invOfUnit (φ : R⟦X⟧) (u : Rˣ) : R⟦X⟧ 
goal: PowerSeries R

full_name: PowerSeries.coeff_invOfUnit
code: theorem coeff_invOfUnit (n : ℕ) (φ : R⟦X⟧) (u : Rˣ) :
    coeff R n (invOfUnit φ u) =
      if n = 0 then ↑u⁻¹
      else
        -↑u⁻¹ *
          ∑ x ∈ antidiagonal n,
            if x.2 < n then coeff R x.1 φ * coeff R x.2 (invOfUnit φ u) else 0 
goal: (PowerSeries.coeff R n) (φ.invOfUnit u) =
  if n = 0 then ↑u⁻¹
  else
    -↑u⁻¹ *
      ∑ x ∈ Finset.antidiagonal n,
        if x.2 < n then (PowerSeries.coeff R x.1) φ * (PowerSeries.coeff R x.2) (φ.invOfUnit u) else 0

full_name: PowerSeries.constantCoeff_invOfUnit
code: @[simp]
theorem constantCoeff_invOfUnit (φ : R⟦X⟧) (u : Rˣ) :
    constantCoeff R (invOfUnit φ u) = ↑u⁻¹ 
goal: (PowerSeries.constantCoeff R) (φ.invOfUnit u) = ↑u⁻¹

full_name: PowerSeries.mul_invOfUnit
code: @[simp]
theorem mul_invOfUnit (φ : R⟦X⟧) (u : Rˣ) (h : constantCoeff R φ = u) :
    φ * invOfUnit φ u = 1 
goal: φ * φ.invOfUnit u = 1

full_name: PowerSeries.invOfUnit_mul
code: @[simp]
theorem invOfUnit_mul (φ : R⟦X⟧) (u : Rˣ) (h : constantCoeff R φ = u) :
    invOfUnit φ u * φ = 1 
goal: φ.invOfUnit u * φ = 1

full_name: PowerSeries.isUnit_iff_constantCoeff
code: theorem isUnit_iff_constantCoeff {φ : R⟦X⟧} :
    IsUnit φ ↔ IsUnit (constantCoeff R φ) 
goal: IsUnit φ ↔ IsUnit ((PowerSeries.constantCoeff R) φ)

full_name: PowerSeries.sub_const_eq_shift_mul_X
code: /-- Two ways of removing the constant coefficient of a power series are the same. -/
theorem sub_const_eq_shift_mul_X (φ : R⟦X⟧) :
    φ - C R (constantCoeff R φ) = (mk fun p ↦ coeff R (p + 1) φ) * X 
goal: φ - (PowerSeries.C R) ((PowerSeries.constantCoeff R) φ) =
  (PowerSeries.mk fun p => (PowerSeries.coeff R (p + 1)) φ) * PowerSeries.X

full_name: PowerSeries.sub_const_eq_X_mul_shift
code: theorem sub_const_eq_X_mul_shift (φ : R⟦X⟧) :
    φ - C R (constantCoeff R φ) = X * mk fun p ↦ coeff R (p + 1) φ 
goal: φ - (PowerSeries.C R) ((PowerSeries.constantCoeff R) φ) =
  PowerSeries.X * PowerSeries.mk fun p => (PowerSeries.coeff R (p + 1)) φ

full_name: PowerSeries.inv
code: /-- The inverse 1/f of a power series f defined over a field -/
protected def inv : k⟦X⟧ → k⟦X⟧ 
goal: PowerSeries k → PowerSeries k

full_name: PowerSeries.instInv
code: instance : Inv k⟦X⟧ 
goal: Inv (PowerSeries k)

full_name: PowerSeries.inv_eq_inv_aux
code: theorem inv_eq_inv_aux (φ : k⟦X⟧) : φ⁻¹ = inv.aux (constantCoeff k φ)⁻¹ φ 
goal: φ⁻¹ = PowerSeries.inv.aux ((PowerSeries.constantCoeff k) φ)⁻¹ φ

full_name: PowerSeries.coeff_inv
code: theorem coeff_inv (n) (φ : k⟦X⟧) :
    coeff k n φ⁻¹ =
      if n = 0 then (constantCoeff k φ)⁻¹
      else
        -(constantCoeff k φ)⁻¹ *
          ∑ x ∈ antidiagonal n,
            if x.2 < n then coeff k x.1 φ * coeff k x.2 φ⁻¹ else 0 
goal: (PowerSeries.coeff k n) φ⁻¹ =
  if n = 0 then ((PowerSeries.constantCoeff k) φ)⁻¹
  else
    -((PowerSeries.constantCoeff k) φ)⁻¹ *
      ∑ x ∈ Finset.antidiagonal n, if x.2 < n then (PowerSeries.coeff k x.1) φ * (PowerSeries.coeff k x.2) φ⁻¹ else 0

full_name: PowerSeries.constantCoeff_inv
code: @[simp]
theorem constantCoeff_inv (φ : k⟦X⟧) : constantCoeff k φ⁻¹ = (constantCoeff k φ)⁻¹ 
goal: (PowerSeries.constantCoeff k) φ⁻¹ = ((PowerSeries.constantCoeff k) φ)⁻¹

full_name: PowerSeries.inv_eq_zero
code: theorem inv_eq_zero {φ : k⟦X⟧} : φ⁻¹ = 0 ↔ constantCoeff k φ = 0 
goal: φ⁻¹ = 0 ↔ (PowerSeries.constantCoeff k) φ = 0

full_name: PowerSeries.zero_inv
code: theorem zero_inv : (0 : k⟦X⟧)⁻¹ = 0 
goal: 0⁻¹ = 0

full_name: PowerSeries.invOfUnit_eq
code: theorem invOfUnit_eq (φ : k⟦X⟧) (h : constantCoeff k φ ≠ 0) :
    invOfUnit φ (Units.mk0 _ h) = φ⁻¹ 
goal: φ.invOfUnit (Units.mk0 ((PowerSeries.constantCoeff k) φ) h) = φ⁻¹

full_name: PowerSeries.invOfUnit_eq'
code: @[simp]
theorem invOfUnit_eq' (φ : k⟦X⟧) (u : Units k) (h : constantCoeff k φ = u) :
    invOfUnit φ u = φ⁻¹ 
goal: φ.invOfUnit u = φ⁻¹

full_name: PowerSeries.mul_inv_cancel
code: @[simp]
protected theorem mul_inv_cancel (φ : k⟦X⟧) (h : constantCoeff k φ ≠ 0) : φ * φ⁻¹ = 1 
goal: φ * φ⁻¹ = 1

full_name: PowerSeries.inv_mul_cancel
code: @[simp]
protected theorem inv_mul_cancel (φ : k⟦X⟧) (h : constantCoeff k φ ≠ 0) : φ⁻¹ * φ = 1 
goal: φ⁻¹ * φ = 1

full_name: PowerSeries.eq_mul_inv_iff_mul_eq
code: theorem eq_mul_inv_iff_mul_eq {φ₁ φ₂ φ₃ : k⟦X⟧} (h : constantCoeff k φ₃ ≠ 0) :
    φ₁ = φ₂ * φ₃⁻¹ ↔ φ₁ * φ₃ = φ₂ 
goal: φ₁ = φ₂ * φ₃⁻¹ ↔ φ₁ * φ₃ = φ₂

full_name: PowerSeries.eq_inv_iff_mul_eq_one
code: theorem eq_inv_iff_mul_eq_one {φ ψ : k⟦X⟧} (h : constantCoeff k ψ ≠ 0) :
    φ = ψ⁻¹ ↔ φ * ψ = 1 
goal: φ = ψ⁻¹ ↔ φ * ψ = 1

full_name: PowerSeries.inv_eq_iff_mul_eq_one
code: theorem inv_eq_iff_mul_eq_one {φ ψ : k⟦X⟧} (h : constantCoeff k ψ ≠ 0) :
    ψ⁻¹ = φ ↔ φ * ψ = 1 
goal: ψ⁻¹ = φ ↔ φ * ψ = 1

full_name: PowerSeries.mul_inv_rev
code: protected theorem mul_inv_rev (φ ψ : k⟦X⟧) : (φ * ψ)⁻¹ = ψ⁻¹ * φ⁻¹ 
goal: (φ * ψ)⁻¹ = ψ⁻¹ * φ⁻¹

full_name: PowerSeries.instInvOneClass
code: instance : InvOneClass k⟦X⟧ 
goal: InvOneClass (PowerSeries k)

full_name: PowerSeries.C_inv
code: @[simp]
theorem C_inv (r : k) : (C k r)⁻¹ = C k r⁻¹ 
goal: ((PowerSeries.C k) r)⁻¹ = (PowerSeries.C k) r⁻¹

full_name: PowerSeries.X_inv
code: @[simp]
theorem X_inv : (X : k⟦X⟧)⁻¹ = 0 
goal: PowerSeries.X⁻¹ = 0

full_name: PowerSeries.smul_inv
code: theorem smul_inv (r : k) (φ : k⟦X⟧) : (r • φ)⁻¹ = r⁻¹ • φ⁻¹ 
goal: (r • φ)⁻¹ = r⁻¹ • φ⁻¹

full_name: PowerSeries.firstUnitCoeff
code: /-- `firstUnitCoeff` is the non-zero coefficient whose index is `f.order`, seen as a unit of the
  field. It is obtained using `divided_by_X_pow_order`, defined in `PowerSeries.Order`-/
def firstUnitCoeff {f : k⟦X⟧} (hf : f ≠ 0) : kˣ 
goal: kˣ

full_name: PowerSeries.Inv_divided_by_X_pow_order
code: /-- `Inv_divided_by_X_pow_order` is the inverse of the element obtained by diving a non-zero power
series by the largest power of `X` dividing it. Useful to create a term of type `Units`, done in
`Unit_divided_by_X_pow_order` -/
def Inv_divided_by_X_pow_order {f : k⟦X⟧} (hf : f ≠ 0) : k⟦X⟧ 
goal: PowerSeries k

full_name: PowerSeries.Inv_divided_by_X_pow_order_rightInv
code: @[simp]
theorem Inv_divided_by_X_pow_order_rightInv {f : k⟦X⟧} (hf : f ≠ 0) :
    divided_by_X_pow_order hf * Inv_divided_by_X_pow_order hf = 1 
goal: PowerSeries.divided_by_X_pow_order hf * PowerSeries.Inv_divided_by_X_pow_order hf = 1

full_name: PowerSeries.Inv_divided_by_X_pow_order_leftInv
code: @[simp]
theorem Inv_divided_by_X_pow_order_leftInv {f : k⟦X⟧} (hf : f ≠ 0) :
    (Inv_divided_by_X_pow_order hf) * (divided_by_X_pow_order hf) = 1 
goal: PowerSeries.Inv_divided_by_X_pow_order hf * PowerSeries.divided_by_X_pow_order hf = 1

full_name: PowerSeries.Unit_of_divided_by_X_pow_order
code: /-- `Unit_of_divided_by_X_pow_order` is the unit power series obtained by dividing a non-zero
power series by the largest power of `X` that divides it. -/
def Unit_of_divided_by_X_pow_order (f : k⟦X⟧) : k⟦X⟧ˣ 
goal: (PowerSeries k)ˣ

full_name: PowerSeries.isUnit_divided_by_X_pow_order
code: theorem isUnit_divided_by_X_pow_order {f : k⟦X⟧} (hf : f ≠ 0) :
    IsUnit (divided_by_X_pow_order hf) 
goal: IsUnit (PowerSeries.divided_by_X_pow_order hf)

full_name: PowerSeries.Unit_of_divided_by_X_pow_order_nonzero
code: theorem Unit_of_divided_by_X_pow_order_nonzero {f : k⟦X⟧} (hf : f ≠ 0) :
    ↑(Unit_of_divided_by_X_pow_order f) = divided_by_X_pow_order hf 
goal: ↑f.Unit_of_divided_by_X_pow_order = PowerSeries.divided_by_X_pow_order hf

full_name: PowerSeries.Unit_of_divided_by_X_pow_order_zero
code: @[simp]
theorem Unit_of_divided_by_X_pow_order_zero : Unit_of_divided_by_X_pow_order (0 : k⟦X⟧) = 1 
goal: PowerSeries.Unit_of_divided_by_X_pow_order 0 = 1

full_name: PowerSeries.eq_divided_by_X_pow_order_Iff_Unit
code: theorem eq_divided_by_X_pow_order_Iff_Unit {f : k⟦X⟧} (hf : f ≠ 0) :
    f = divided_by_X_pow_order hf ↔ IsUnit f 
goal: f = PowerSeries.divided_by_X_pow_order hf ↔ IsUnit f

full_name: PowerSeries.map.isLocalRingHom
code: instance map.isLocalRingHom : IsLocalRingHom (map f) 
goal: IsLocalRingHom (PowerSeries.map f)

full_name: PowerSeries.instLocalRing
code: instance : LocalRing R⟦X⟧ 
goal: LocalRing (PowerSeries R)

full_name: PowerSeries.hasUnitMulPowIrreducibleFactorization
code: theorem hasUnitMulPowIrreducibleFactorization :
    HasUnitMulPowIrreducibleFactorization k⟦X⟧ 
goal: DiscreteValuationRing.HasUnitMulPowIrreducibleFactorization (PowerSeries k)

full_name: PowerSeries.instUniqueFactorizationMonoid
code: instance : UniqueFactorizationMonoid k⟦X⟧ 
goal: UniqueFactorizationMonoid (PowerSeries k)

full_name: PowerSeries.instDiscreteValuationRing
code: instance : DiscreteValuationRing k⟦X⟧ 
goal: DiscreteValuationRing (PowerSeries k)

full_name: PowerSeries.isNoetherianRing
code: instance isNoetherianRing : IsNoetherianRing k⟦X⟧ 
goal: IsNoetherianRing (PowerSeries k)

full_name: PowerSeries.maximalIdeal_eq_span_X
code: /-- The maximal ideal of `k⟦X⟧` is generated by `X`. -/
theorem maximalIdeal_eq_span_X : LocalRing.maximalIdeal (k⟦X⟧) = Ideal.span {X} 
goal: LocalRing.maximalIdeal (PowerSeries k) = Ideal.span {PowerSeries.X}

full_name: PowerSeries.instNormalizationMonoid
code: instance : NormalizationMonoid k⟦X⟧ 
goal: NormalizationMonoid (PowerSeries k)

full_name: PowerSeries.normUnit_X
code: theorem normUnit_X : normUnit (X : k⟦X⟧) = 1 
goal: normUnit PowerSeries.X = 1

full_name: PowerSeries.X_eq_normalizeX
code: theorem X_eq_normalizeX : (X : k⟦X⟧) = normalize X 
goal: PowerSeries.X = normalize PowerSeries.X

full_name: PowerSeries.normalized_count_X_eq_of_coe
code: theorem normalized_count_X_eq_of_coe {P : k[X]} (hP : P ≠ 0) :
    Multiset.count PowerSeries.X (normalizedFactors (P : k⟦X⟧)) =
      Multiset.count Polynomial.X (normalizedFactors P) 
goal: Multiset.count PowerSeries.X (UniqueFactorizationMonoid.normalizedFactors ↑P) =
  Multiset.count Polynomial.X (UniqueFactorizationMonoid.normalizedFactors P)

full_name: PowerSeries.ker_coeff_eq_max_ideal
code: theorem ker_coeff_eq_max_ideal : RingHom.ker (constantCoeff k) = maximalIdeal _ 
goal: RingHom.ker (PowerSeries.constantCoeff k) = LocalRing.maximalIdeal (PowerSeries k)

full_name: PowerSeries.residueFieldOfPowerSeries
code: /-- The ring isomorphism between the residue field of the ring of power series valued in a field `K`
and `K` itself. -/
def residueFieldOfPowerSeries : ResidueField k⟦X⟧ ≃+* k 
goal: LocalRing.ResidueField (PowerSeries k) ≃+* k