File: Mathlib/RingTheory/PowerSeries/WellKnown.lean

full_name: PowerSeries.invUnitsSub
code: /-- The power series for `1 / (u - x)`. -/
def invUnitsSub (u : Rˣ) : PowerSeries R 
goal: PowerSeries R

full_name: PowerSeries.coeff_invUnitsSub
code: @[simp]
theorem coeff_invUnitsSub (u : Rˣ) (n : ℕ) : coeff R n (invUnitsSub u) = 1 /ₚ u ^ (n + 1) 
goal: (PowerSeries.coeff R n) (PowerSeries.invUnitsSub u) = 1 /ₚ u ^ (n + 1)

full_name: PowerSeries.constantCoeff_invUnitsSub
code: @[simp]
theorem constantCoeff_invUnitsSub (u : Rˣ) : constantCoeff R (invUnitsSub u) = 1 /ₚ u 
goal: (PowerSeries.constantCoeff R) (PowerSeries.invUnitsSub u) = 1 /ₚ u

full_name: PowerSeries.invUnitsSub_mul_X
code: @[simp]
theorem invUnitsSub_mul_X (u : Rˣ) : invUnitsSub u * X = invUnitsSub u * C R u - 1 
goal: PowerSeries.invUnitsSub u * PowerSeries.X = PowerSeries.invUnitsSub u * (PowerSeries.C R) ↑u - 1

full_name: PowerSeries.invUnitsSub_mul_sub
code: @[simp]
theorem invUnitsSub_mul_sub (u : Rˣ) : invUnitsSub u * (C R u - X) = 1 
goal: PowerSeries.invUnitsSub u * ((PowerSeries.C R) ↑u - PowerSeries.X) = 1

full_name: PowerSeries.map_invUnitsSub
code: theorem map_invUnitsSub (f : R →+* S) (u : Rˣ) :
    map f (invUnitsSub u) = invUnitsSub (Units.map (f : R →* S) u) 
goal: (PowerSeries.map f) (PowerSeries.invUnitsSub u) = PowerSeries.invUnitsSub ((Units.map ↑f) u)

full_name: PowerSeries.mk_one_mul_one_sub_eq_one
code: /--
(1 + X + X^2 + ...) * (1 - X) = 1.

Note that the power series `1 + X + X^2 + ...` is written as `mk 1` where `1` is the constant
function so that `mk 1` is the power series with all coefficients equal to one.
-/
theorem mk_one_mul_one_sub_eq_one : (mk 1 : S⟦X⟧) * (1 - X) = 1 
goal: PowerSeries.mk 1 * (1 - PowerSeries.X) = 1

full_name: PowerSeries.mk_one_pow_eq_mk_choose_add
code: /--
Note that `mk 1` is the constant function `1` so the power series `1 + X + X^2 + ...`. This theorem
states that for any `d : ℕ`, `(1 + X + X^2 + ... : S⟦X⟧) ^ (d + 1)` is equal to the power series
`mk fun n => Nat.choose (d + n) d : S⟦X⟧`.
-/
theorem mk_one_pow_eq_mk_choose_add :
    (mk 1 : S⟦X⟧) ^ (d + 1) = (mk fun n => Nat.choose (d + n) d : S⟦X⟧) 
goal: PowerSeries.mk 1 ^ (d + 1) = PowerSeries.mk fun n => ↑((d + n).choose d)

full_name: PowerSeries.invOneSubPow
code: /--
The power series `mk fun n => Nat.choose (d + n) d`, whose multiplicative inverse is
`(1 - X) ^ (d + 1)`.
-/
noncomputable def invOneSubPow : S⟦X⟧ˣ 
goal: (PowerSeries S)ˣ

full_name: PowerSeries.invOneSubPow_val_eq_mk_choose_add
code: theorem invOneSubPow_val_eq_mk_choose_add :
    (invOneSubPow d).val = (mk fun n => Nat.choose (d + n) d : S⟦X⟧) 
goal: ↑(PowerSeries.invOneSubPow d) = PowerSeries.mk fun n => ↑((d + n).choose d)

full_name: PowerSeries.invOneSubPow_val_zero_eq_invUnitSub_one
code: theorem invOneSubPow_val_zero_eq_invUnitSub_one :
    (invOneSubPow 0).val = invUnitsSub (1 : Sˣ) 
goal: ↑(PowerSeries.invOneSubPow 0) = PowerSeries.invUnitsSub 1

full_name: PowerSeries.invOneSubPow_eq_inv_one_sub_pow
code: /--
The theorem `PowerSeries.mk_one_mul_one_sub_eq_one` implies that `1 - X` is a unit in `S⟦X⟧`
whose inverse is the power series `1 + X + X^2 + ...`. This theorem states that for any `d : ℕ`,
`PowerSeries.invOneSubPow d` is equal to `(1 - X)⁻¹ ^ (d + 1)`.
-/
theorem invOneSubPow_eq_inv_one_sub_pow :
    invOneSubPow d = (Units.mkOfMulEqOne (1 - X) (mk 1 : S⟦X⟧)
    <| Eq.trans (mul_comm _ _) mk_one_mul_one_sub_eq_one)⁻¹ ^ (d + 1) 
goal: PowerSeries.invOneSubPow d = (Units.mkOfMulEqOne (1 - PowerSeries.X) (PowerSeries.mk 1) ⋯)⁻¹ ^ (d + 1)

full_name: PowerSeries.invOneSubPow_inv_eq_one_sub_pow
code: theorem invOneSubPow_inv_eq_one_sub_pow :
    (invOneSubPow d).inv = (1 - X : S⟦X⟧) ^ (d + 1) 
goal: (PowerSeries.invOneSubPow d).inv = (1 - PowerSeries.X) ^ (d + 1)

full_name: PowerSeries.exp
code: /-- Power series for the exponential function at zero. -/
def exp : PowerSeries A 
goal: PowerSeries A

full_name: PowerSeries.sin
code: /-- Power series for the sine function at zero. -/
def sin : PowerSeries A 
goal: PowerSeries A

full_name: PowerSeries.cos
code: /-- Power series for the cosine function at zero. -/
def cos : PowerSeries A 
goal: PowerSeries A

full_name: PowerSeries.coeff_exp
code: @[simp]
theorem coeff_exp : coeff A n (exp A) = algebraMap ℚ A (1 / n !) 
goal: (PowerSeries.coeff A n) (PowerSeries.exp A) = (algebraMap ℚ A) (1 / ↑n.factorial)

full_name: PowerSeries.constantCoeff_exp
code: @[simp]
theorem constantCoeff_exp : constantCoeff A (exp A) = 1 
goal: (PowerSeries.constantCoeff A) (PowerSeries.exp A) = 1

full_name: PowerSeries.map_exp
code: @[simp]
theorem map_exp : map (f : A →+* A') (exp A) = exp A' 
goal: (PowerSeries.map f) (PowerSeries.exp A) = PowerSeries.exp A'

full_name: PowerSeries.map_sin
code: @[simp]
theorem map_sin : map f (sin A) = sin A' 
goal: (PowerSeries.map f) (PowerSeries.sin A) = PowerSeries.sin A'

full_name: PowerSeries.map_cos
code: @[simp]
theorem map_cos : map f (cos A) = cos A' 
goal: (PowerSeries.map f) (PowerSeries.cos A) = PowerSeries.cos A'

full_name: PowerSeries.exp_mul_exp_eq_exp_add
code: /-- Shows that $e^{aX} * e^{bX} = e^{(a + b)X}$ -/
theorem exp_mul_exp_eq_exp_add [Algebra ℚ A] (a b : A) :
    rescale a (exp A) * rescale b (exp A) = rescale (a + b) (exp A) 
goal: (PowerSeries.rescale a) (PowerSeries.exp A) * (PowerSeries.rescale b) (PowerSeries.exp A) =
  (PowerSeries.rescale (a + b)) (PowerSeries.exp A)

full_name: PowerSeries.exp_mul_exp_neg_eq_one
code: /-- Shows that $e^{x} * e^{-x} = 1$ -/
theorem exp_mul_exp_neg_eq_one [Algebra ℚ A] : exp A * evalNegHom (exp A) = 1 
goal: PowerSeries.exp A * PowerSeries.evalNegHom (PowerSeries.exp A) = 1

full_name: PowerSeries.exp_pow_eq_rescale_exp
code: /-- Shows that $(e^{X})^k = e^{kX}$. -/
theorem exp_pow_eq_rescale_exp [Algebra ℚ A] (k : ℕ) : exp A ^ k = rescale (k : A) (exp A) 
goal: PowerSeries.exp A ^ k = (PowerSeries.rescale ↑k) (PowerSeries.exp A)

full_name: PowerSeries.exp_pow_sum
code: /-- Shows that
$\sum_{k = 0}^{n - 1} (e^{X})^k = \sum_{p = 0}^{\infty} \sum_{k = 0}^{n - 1} \frac{k^p}{p!}X^p$. -/
theorem exp_pow_sum [Algebra ℚ A] (n : ℕ) :
    ((Finset.range n).sum fun k => exp A ^ k) =
      PowerSeries.mk fun p => (Finset.range n).sum
        fun k => (k ^ p : A) * algebraMap ℚ A p.factorial⁻¹ 
goal: ∑ k ∈ Finset.range n, PowerSeries.exp A ^ k =
  PowerSeries.mk fun p => ∑ k ∈ Finset.range n, ↑k ^ p * (algebraMap ℚ A) (↑p.factorial)⁻¹