Algebraic Combinatorics Blueprint

7. Derivatives of FPSs🔗

Our definition of the derivative of an FPS copycats the familiar derivative formula for power series in analysis.

Definition7.1
L∃∀Nused by 0

Let f\in K\left[\left[x\right]\right] be an FPS. Then the derivative f' of f is the FPS defined as follows: write f=\sum_{n\in\mathbb{N}} f_n x^n with coefficients in K, and set f' := \sum_{n>0} n f_n x^{n-1}.

Lean code for Definition7.11 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.coeff_derivative_eq.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) :
      (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  n) ((PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.) fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.
    theorem AlgebraicCombinatorics.FPS.coeff_derivative_eq.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1]
      (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) :
      (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  n)
          ((PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.) fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
          (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.
    **Definition def.fps.deriv**: The n-th coefficient of the derivative of f
    equals (n+1) times the (n+1)-th coefficient of f.
    
    This is `PowerSeries.coeff_derivative` in Mathlib. 
Lemma7.2
L∃∀Nused by 0

Let f\in K\left[\left[x\right]\right] be an FPS. Then f' is the power series with coefficient function n \mapsto (n+1)\cdot f_{n+1}.

Lean code for Lemma7.21 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_eq_mk.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        PowerSeries.mkPowerSeries.mk.{u_2} {R : Type u_2} (f : ℕ → R) : PowerSeries RConstructor for formal power series.  fun n  (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.) fPowerSeries R
    theorem AlgebraicCombinatorics.FPS.derivative_eq_mk.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1]
      (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        PowerSeries.mkPowerSeries.mk.{u_2} {R : Type u_2} (f : ℕ → R) : PowerSeries RConstructor for formal power series.  fun n 
          (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
            (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.) fPowerSeries R
    **Definition def.fps.deriv**: The derivative expressed in terms of `mk`.
    
    For `f = ∑ fₙ xⁿ`, the textbook defines `f' := ∑_{n>0} n · fₙ · x^{n-1}`.
    Reindexing gives `f' = mk (fun m => (m+1) * f_{m+1})`. 
Proof

Immediate from the definition by reindexing n \mapsto n+1.

Lemma7.3
L∃∀Nused by 0

The derivative operation f \mapsto f' agrees with the standard derivative operation on formal power series.

Lean code for Lemma7.31 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_eq_derivativeFun.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. fPowerSeries R.derivativeFunPowerSeries.derivativeFun.{u_1} {R : Type u_1} [CommSemiring R] (f : PowerSeries R) : PowerSeries RThe formal derivative of a power series in one variable.
    This is defined here as a function, but will be packaged as a
    derivation `derivative` on `R⟦X⟧`.
    
    theorem AlgebraicCombinatorics.FPS.derivative_eq_derivativeFun.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1]
      (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        fPowerSeries R.derivativeFunPowerSeries.derivativeFun.{u_1} {R : Type u_1} [CommSemiring R] (f : PowerSeries R) : PowerSeries RThe formal derivative of a power series in one variable.
    This is defined here as a function, but will be packaged as a
    derivation `derivative` on `R⟦X⟧`.
    
    The derivative operation is exactly `derivativeFun` from Mathlib. 
Proof

By definition.

Lemma7.4
L∃∀Nused by 0

Let f\in K\left[\left[x\right]\right] be an FPS. Then for each n\in\mathbb{N}, the n-th coefficient of f' is (n+1)\cdot f_{n+1}.

Lean code for Lemma7.41 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_coeff_formula.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) :
      (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  n) ((PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.) fPowerSeries R
    theorem AlgebraicCombinatorics.FPS.derivative_coeff_formula.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1]
      (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) :
      (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  n)
          ((PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
          (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.) fPowerSeries R
    Alternative characterization: the coefficient of xⁿ in f' is (n+1) · f_{n+1}.
    This is the "shift and multiply" form of the derivative. 
Proof

Follows directly from the definition of the derivative.

Lemma7.5
L∃∀Nused by 0

We have 0' = 0.

Lean code for Lemma7.51 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_zero.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] : (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) 0 =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. 0
    theorem AlgebraicCombinatorics.FPS.derivative_zero.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) 0 =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. 0
    Derivative of zero is zero. 
Proof

All coefficients of 0 are 0, so the derivative is 0.

Lemma7.6
L∃∀Nused by 0

We have 1' = 0.

Lean code for Lemma7.61 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_one.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] : (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) 1 =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. 0
    theorem AlgebraicCombinatorics.FPS.derivative_one.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) 1 =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. 0
    Derivative of 1 is 0. 
Proof

1 is constant, so 1' = 0.

Lemma7.7
L∃∀Nused by 0

For any c\in K, we have (c)' = 0, where c is viewed as a constant FPS.

Lean code for Lemma7.71 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_C.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (cR : RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (PowerSeries.CPowerSeries.C.{u_1} {R : Type u_1} [Semiring R] : R →+* PowerSeries RThe constant formal power series.  cR) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. 0
    theorem AlgebraicCombinatorics.FPS.derivative_C.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1]
      (cR : RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1)
          (PowerSeries.CPowerSeries.C.{u_1} {R : Type u_1} [Semiring R] : R →+* PowerSeries RThe constant formal power series.  cR) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        0
    Derivative of a constant is zero. 
Proof

All coefficients of c beyond the constant term are 0, so the derivative is 0.

Lemma7.8
L∃∀Nused by 0

We have x' = 1.

Lean code for Lemma7.81 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_X.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] : (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) PowerSeries.XPowerSeries.X.{u_1} {R : Type u_1} [Semiring R] : PowerSeries RThe variable of the formal power series ring.  =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. 1
    theorem AlgebraicCombinatorics.FPS.derivative_X.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1)
          PowerSeries.XPowerSeries.X.{u_1} {R : Type u_1} [Semiring R] : PowerSeries RThe variable of the formal power series ring.  =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        1
    Derivative of X is 1. 
Proof

The 0-th coefficient of x' is (0+1)\cdot \left[x^1\right]x = 1, and all higher coefficients are 0.

Lemma7.9
L∃∀Nused by 0

For any n\in\mathbb{N}, we have \left(x^{n+1}\right)' = (n+1)\cdot x^n.

Lean code for Lemma7.91 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_X_pow_succ.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`.PowerSeries.XPowerSeries.X.{u_1} {R : Type u_1} [Semiring R] : PowerSeries RThe variable of the formal power series ring.  ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.)HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. PowerSeries.XPowerSeries.X.{u_1} {R : Type u_1} [Semiring R] : PowerSeries RThe variable of the formal power series ring.  ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. n
    theorem AlgebraicCombinatorics.FPS.derivative_X_pow_succ.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1]
      (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1)
          (HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`.PowerSeries.XPowerSeries.X.{u_1} {R : Type u_1} [Semiring R] : PowerSeries RThe variable of the formal power series ring.  ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.)HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.n +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. 1)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. PowerSeries.XPowerSeries.X.{u_1} {R : Type u_1} [Semiring R] : PowerSeries RThe variable of the formal power series ring.  ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. n
    The derivative of X^(n+1) is (n+1) * X^n. This is a convenient form for induction. 
Proof

Direct coefficient comparison: \left[x^m\right](x^{n+1})' = (m+1)\cdot \left[x^{m+1}\right](x^{n+1}). This is n+1 when m=n and 0 otherwise.

Lemma7.10
L∃∀Nused by 0

For any n\in\mathbb{N} with n>0, we have \left(x^n\right)' = n\cdot x^{n-1}.

Lean code for Lemma7.101 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_X_pow_of_pos.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] {n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    } (hn0 < n : 0 <LT.lt.{u} {α : Type u} [self : LT α] : α → α → PropThe less-than relation: `x < y` 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `<` in identifiers is `lt`. n) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`.PowerSeries.XPowerSeries.X.{u_1} {R : Type u_1} [Semiring R] : PowerSeries RThe variable of the formal power series ring.  ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. n)HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        n HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. PowerSeries.XPowerSeries.X.{u_1} {R : Type u_1} [Semiring R] : PowerSeries RThe variable of the formal power series ring.  ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).n -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). 1)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).
    theorem AlgebraicCombinatorics.FPS.derivative_X_pow_of_pos.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] {n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    }
      (hn0 < n : 0 <LT.lt.{u} {α : Type u} [self : LT α] : α → α → PropThe less-than relation: `x < y` 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `<` in identifiers is `lt`. n) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1)
          (HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`.PowerSeries.XPowerSeries.X.{u_1} {R : Type u_1} [Semiring R] : PowerSeries RThe variable of the formal power series ring.  ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. n)HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        n HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. PowerSeries.XPowerSeries.X.{u_1} {R : Type u_1} [Semiring R] : PowerSeries RThe variable of the formal power series ring.  ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).n -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). 1)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).
    Derivative of X^n for n > 0. 
Proof

Write n = m+1 and apply the previous lemma.

Lemma7.11
L∃∀Nused by 0

Let p be a polynomial. Then the derivative of p viewed as a power series equals the polynomial derivative of p viewed as a power series.

Lean code for Lemma7.111 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_coe_polynomial.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (pPolynomial R : PolynomialPolynomial.{u_1} (R : Type u_1) [Semiring R] : Type u_1`Polynomial R` is the type of univariate polynomials over `R`,
    denoted as `R[X]` within the `Polynomial` namespace.
    
    Polynomials should be seen as (semi-)rings with the additional constructor `X`.
    The embedding from `R` is called `C`.  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) pPolynomial R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. (Polynomial.derivativePolynomial.derivative.{u} {R : Type u} [Semiring R] : Polynomial R →ₗ[R] Polynomial R`derivative p` is the formal derivative of the polynomial `p`  pPolynomial R)
    theorem AlgebraicCombinatorics.FPS.derivative_coe_polynomial.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1]
      (pPolynomial R : PolynomialPolynomial.{u_1} (R : Type u_1) [Semiring R] : Type u_1`Polynomial R` is the type of univariate polynomials over `R`,
    denoted as `R[X]` within the `Polynomial` namespace.
    
    Polynomials should be seen as (semi-)rings with the additional constructor `X`.
    The embedding from `R` is called `C`.  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) pPolynomial R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (Polynomial.derivativePolynomial.derivative.{u} {R : Type u} [Semiring R] : Polynomial R →ₗ[R] Polynomial R`derivative p` is the formal derivative of the polynomial `p`  pPolynomial R)
    The derivative of a polynomial viewed as a power series equals
    the polynomial derivative viewed as a power series. 
Proof

Both derivatives are defined by the same coefficient formula.

The derivative satisfies the expected rules:

(a) \left(f+g\right)' = f' + g' for any FPSs f,g.

(b) If (f_i)_{i\in I} is a summable family of FPSs, then (f_i')_{i\in I} is summable as well, and \left(\sum_{i\in I} f_i\right)' = \sum_{i\in I} f_i'.

(c) \left(cf\right)' = cf' for any c\in K and FPS f.

(d) \left(fg\right)' = f'g + fg' for any FPSs f,g. This is the Leibniz rule.

(e) If g is invertible, then \left(\dfrac{f}{g}\right)' = \dfrac{f'g-fg'}{g^2}. This is the quotient rule.

(f) \left(g^n\right)' = ng'g^{n-1} for any FPS g and any n\in\mathbb{N}; for n=0, the right-hand side is understood as 0.

(g) We have \left(f\circ g\right)' = \left(f'\circ g\right)\cdot g' if f is a polynomial or if \left[x^0\right]g=0. This is the chain rule.

(h) If K is a \mathbb{Q}-algebra and two FPSs f,g satisfy f' = g', then f-g is constant.

Lean code for Theorem7.129 theorems
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_add.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.fPowerSeries R +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. gPowerSeries R)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) gPowerSeries R
    theorem AlgebraicCombinatorics.FPS.derivative_add.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1]
      (fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.fPowerSeries R +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. gPowerSeries R)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) gPowerSeries R
    **Theorem thm.fps.deriv.rules (a)**: Derivative is additive. 
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_sum.{u_1, u_2} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] {ιType u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } (sFinset ι : FinsetFinset.{u_4} (α : Type u_4) : Type u_4`Finset α` is the type of finite sets of elements of `α`. It is implemented
    as a multiset (a list up to permutation) which has no duplicate elements.  ιType u_2)
      (fι → PowerSeries R : ιType u_2  PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (∑ iι  sFinset ι, fι → PowerSeries R iι) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
         iι  sFinset ι, (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (fι → PowerSeries R iι)
    theorem AlgebraicCombinatorics.FPS.derivative_sum.{u_1,
        u_2}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1]
      {ιType u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } (sFinset ι : FinsetFinset.{u_4} (α : Type u_4) : Type u_4`Finset α` is the type of finite sets of elements of `α`. It is implemented
    as a multiset (a list up to permutation) which has no duplicate elements.  ιType u_2)
      (fι → PowerSeries R : ιType u_2  PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1)
          (∑ iι  sFinset ι, fι → PowerSeries R iι) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
         iι  sFinset ι,
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (fι → PowerSeries R iι)
    **Theorem thm.fps.deriv.rules (b)** (finite version):
    Derivative commutes with finite sums. 
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_summableFPSSum.{u_2, u_3}
      {R'Type u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  R'Type u_2] {ιType u_3 : Type u_3A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } (fι → PowerSeries R' : ιType u_3  PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  R'Type u_2)
      (hfAlgebraicCombinatorics.FPS.SummableFPS f : AlgebraicCombinatorics.FPS.SummableFPSAlgebraicCombinatorics.FPS.SummableFPS.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R) :
      PropA family of FPS is summable if for each coefficient index n,
    all but finitely many family members have that coefficient equal to zero.
    (Definition def.fps.summable)  fι → PowerSeries R') :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  R'Type u_2)
          (AlgebraicCombinatorics.FPS.summableFPSSumAlgebraicCombinatorics.FPS.summableFPSSum.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R)
      (_hf : AlgebraicCombinatorics.FPS.SummableFPS f) : PowerSeries RThe sum of a summable family of FPS.
    (Definition def.fps.summable, eq. eq.def.fps.summable.sum)
    
    For a summable family (fᵢ)_{i ∈ I}, the sum ∑_{i ∈ I} fᵢ is the FPS whose
    n-th coefficient is ∑_{i ∈ I} [x^n] fᵢ (an essentially finite sum).  fι → PowerSeries R' hfAlgebraicCombinatorics.FPS.SummableFPS f) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        AlgebraicCombinatorics.FPS.summableFPSSumAlgebraicCombinatorics.FPS.summableFPSSum.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R)
      (_hf : AlgebraicCombinatorics.FPS.SummableFPS f) : PowerSeries RThe sum of a summable family of FPS.
    (Definition def.fps.summable, eq. eq.def.fps.summable.sum)
    
    For a summable family (fᵢ)_{i ∈ I}, the sum ∑_{i ∈ I} fᵢ is the FPS whose
    n-th coefficient is ∑_{i ∈ I} [x^n] fᵢ (an essentially finite sum). 
          (fun iι  (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  R'Type u_2) (fι → PowerSeries R' iι)) 
    theorem AlgebraicCombinatorics.FPS.derivative_summableFPSSum.{u_2,
        u_3}
      {R'Type u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  R'Type u_2]
      {ιType u_3 : Type u_3A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } (fι → PowerSeries R' : ιType u_3  PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  R'Type u_2)
      (hfAlgebraicCombinatorics.FPS.SummableFPS f :
        AlgebraicCombinatorics.FPS.SummableFPSAlgebraicCombinatorics.FPS.SummableFPS.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R) :
      PropA family of FPS is summable if for each coefficient index n,
    all but finitely many family members have that coefficient equal to zero.
    (Definition def.fps.summable) 
          fι → PowerSeries R') :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  R'Type u_2)
          (AlgebraicCombinatorics.FPS.summableFPSSumAlgebraicCombinatorics.FPS.summableFPSSum.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R)
      (_hf : AlgebraicCombinatorics.FPS.SummableFPS f) : PowerSeries RThe sum of a summable family of FPS.
    (Definition def.fps.summable, eq. eq.def.fps.summable.sum)
    
    For a summable family (fᵢ)_{i ∈ I}, the sum ∑_{i ∈ I} fᵢ is the FPS whose
    n-th coefficient is ∑_{i ∈ I} [x^n] fᵢ (an essentially finite sum). 
            fι → PowerSeries R' hfAlgebraicCombinatorics.FPS.SummableFPS f) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        AlgebraicCombinatorics.FPS.summableFPSSumAlgebraicCombinatorics.FPS.summableFPSSum.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R)
      (_hf : AlgebraicCombinatorics.FPS.SummableFPS f) : PowerSeries RThe sum of a summable family of FPS.
    (Definition def.fps.summable, eq. eq.def.fps.summable.sum)
    
    For a summable family (fᵢ)_{i ∈ I}, the sum ∑_{i ∈ I} fᵢ is the FPS whose
    n-th coefficient is ∑_{i ∈ I} [x^n] fᵢ (an essentially finite sum). 
          (fun iι 
            (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  R'Type u_2) (fι → PowerSeries R' iι))
          
    **Theorem thm.fps.deriv.rules (b)** (infinite version):
    Derivative commutes with infinite summable sums.
    
    If (fᵢ)_{i ∈ I} is a summable family of FPSs, then (fᵢ')_{i ∈ I} is summable
    and (∑ fᵢ)' = ∑ fᵢ'. 
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_smul.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (cR : RType u_1) (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`.cR HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. fPowerSeries R)HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. cR HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R
    theorem AlgebraicCombinatorics.FPS.derivative_smul.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (cR : RType u_1)
      (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`.cR HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. fPowerSeries R)HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        cR HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R
    **Theorem thm.fps.deriv.rules (c)**: Derivative commutes with scalar multiplication. 
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_mul.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries R)HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries R +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) gPowerSeries R
    theorem AlgebraicCombinatorics.FPS.derivative_mul.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1]
      (fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries R)HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries R +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.
          fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) gPowerSeries R
    **Theorem thm.fps.deriv.rules (d)**: Leibniz rule for power series. 
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_div.{u_3} {KType u_3 : Type u_3A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [FieldField.{u} (K : Type u) : Type uA `Field` is a `CommRing` with multiplicative inverses for nonzero elements.
    
    An instance of `Field K` includes maps `ratCast : ℚ → K` and `qsmul : ℚ → K → K`.
    Those two fields are needed to implement the `DivisionRing K → Algebra ℚ K` instance since we need
    to control the specific definitions for some special cases of `K` (in particular `K = ℚ` itself).
    See also note [forgetful inheritance].
    
    If the field has positive characteristic `p`, our division by zero convention forces
    `ratCast (1 / p) = 1 / 0 = 0`.  KType u_3]
      (fPowerSeries K gPowerSeries K : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  KType u_3) (hgPowerSeries.constantCoeff g ≠ 0 : PowerSeries.constantCoeffPowerSeries.constantCoeff.{u_1} {R : Type u_1} [Semiring R] : PowerSeries R →+* RThe constant coefficient of a formal power series.  gPowerSeries K Ne.{u} {α : Sort u} (a b : α) : Prop`a ≠ b`, or `Ne a b` is defined as `¬ (a = b)` or `a = b → False`,
    and asserts that `a` and `b` are not equal.
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `≠` in identifiers is `ne`. 0) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  KType u_3) (HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.fPowerSeries K *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries K⁻¹Inv.inv.{u} {α : Type u} [self : Inv α] : α → α`a⁻¹` computes the inverse of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `⁻¹` in identifiers is `inv`.)HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).(PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  KType u_3) fPowerSeries K *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries K -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).
            fPowerSeries K *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  KType u_3) gPowerSeries K)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
          gPowerSeries K⁻¹Inv.inv.{u} {α : Type u} [self : Inv α] : α → α`a⁻¹` computes the inverse of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `⁻¹` in identifiers is `inv`. ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. 2
    theorem AlgebraicCombinatorics.FPS.derivative_div.{u_3}
      {KType u_3 : Type u_3A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [FieldField.{u} (K : Type u) : Type uA `Field` is a `CommRing` with multiplicative inverses for nonzero elements.
    
    An instance of `Field K` includes maps `ratCast : ℚ → K` and `qsmul : ℚ → K → K`.
    Those two fields are needed to implement the `DivisionRing K → Algebra ℚ K` instance since we need
    to control the specific definitions for some special cases of `K` (in particular `K = ℚ` itself).
    See also note [forgetful inheritance].
    
    If the field has positive characteristic `p`, our division by zero convention forces
    `ratCast (1 / p) = 1 / 0 = 0`.  KType u_3]
      (fPowerSeries K gPowerSeries K : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  KType u_3)
      (hgPowerSeries.constantCoeff g ≠ 0 : PowerSeries.constantCoeffPowerSeries.constantCoeff.{u_1} {R : Type u_1} [Semiring R] : PowerSeries R →+* RThe constant coefficient of a formal power series.  gPowerSeries K Ne.{u} {α : Sort u} (a b : α) : Prop`a ≠ b`, or `Ne a b` is defined as `¬ (a = b)` or `a = b → False`,
    and asserts that `a` and `b` are not equal.
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `≠` in identifiers is `ne`. 0) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  KType u_3) (HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.fPowerSeries K *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries K⁻¹Inv.inv.{u} {α : Type u} [self : Inv α] : α → α`a⁻¹` computes the inverse of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `⁻¹` in identifiers is `inv`.)HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).(PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  KType u_3) fPowerSeries K *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries K -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).
            fPowerSeries K *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
              (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  KType u_3) gPowerSeries K)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
          gPowerSeries K⁻¹Inv.inv.{u} {α : Type u} [self : Inv α] : α → α`a⁻¹` computes the inverse of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `⁻¹` in identifiers is `inv`. ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. 2
    **Theorem thm.fps.deriv.rules (e)**: Quotient rule for power series.
    
    Note: In Mathlib, this is stated as `(f⁻¹)' = -f⁻¹² · f'`.
    The full quotient rule follows from combining this with Leibniz. 
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_pow'.{u_4} {AType u_4 : Type u_4A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  AType u_4] (gPowerSeries A : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  AType u_4) (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) (HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`.gPowerSeries A ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. n)HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        n *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries A ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).n -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). 1)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) gPowerSeries A
    theorem AlgebraicCombinatorics.FPS.derivative_pow'.{u_4}
      {AType u_4 : Type u_4A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  AType u_4]
      (gPowerSeries A : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  AType u_4) (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) (HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`.gPowerSeries A ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. n)HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        n *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries A ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).n -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). 1)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) gPowerSeries A
    **Theorem thm.fps.deriv.rules (f)**: Power rule for power series. 
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_comp.{u_4} {AType u_4 : Type u_4A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  AType u_4] (fPowerSeries A gPowerSeries A : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  AType u_4) (hgPowerSeries.HasSubst g : PowerSeries.HasSubstPowerSeries.HasSubst.{u_3, u_4} {τ : Type u_3} {S : Type u_4} [CommRing S] (a : MvPowerSeries τ S) : Prop(Possibly multivariate) power series which can be substituted in a `PowerSeries`.  gPowerSeries A) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) (PowerSeries.substPowerSeries.subst.{u_2, u_3, u_4} {R : Type u_2} [CommRing R] {τ : Type u_3} {S : Type u_4} [CommRing S] [Algebra R S]
      (a : MvPowerSeries τ S) (f : PowerSeries R) : MvPowerSeries τ SSubstitution of power series into a power series.  gPowerSeries A fPowerSeries A) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        PowerSeries.substPowerSeries.subst.{u_2, u_3, u_4} {R : Type u_2} [CommRing R] {τ : Type u_3} {S : Type u_4} [CommRing S] [Algebra R S]
      (a : MvPowerSeries τ S) (f : PowerSeries R) : MvPowerSeries τ SSubstitution of power series into a power series.  gPowerSeries A ((PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) fPowerSeries A) *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) gPowerSeries A
    theorem AlgebraicCombinatorics.FPS.derivative_comp.{u_4}
      {AType u_4 : Type u_4A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  AType u_4]
      (fPowerSeries A gPowerSeries A : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  AType u_4)
      (hgPowerSeries.HasSubst g : PowerSeries.HasSubstPowerSeries.HasSubst.{u_3, u_4} {τ : Type u_3} {S : Type u_4} [CommRing S] (a : MvPowerSeries τ S) : Prop(Possibly multivariate) power series which can be substituted in a `PowerSeries`.  gPowerSeries A) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4)
          (PowerSeries.substPowerSeries.subst.{u_2, u_3, u_4} {R : Type u_2} [CommRing R] {τ : Type u_3} {S : Type u_4} [CommRing S] [Algebra R S]
      (a : MvPowerSeries τ S) (f : PowerSeries R) : MvPowerSeries τ SSubstitution of power series into a power series.  gPowerSeries A fPowerSeries A) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        PowerSeries.substPowerSeries.subst.{u_2, u_3, u_4} {R : Type u_2} [CommRing R] {τ : Type u_3} {S : Type u_4} [CommRing S] [Algebra R S]
      (a : MvPowerSeries τ S) (f : PowerSeries R) : MvPowerSeries τ SSubstitution of power series into a power series.  gPowerSeries A
            ((PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) fPowerSeries A) *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) gPowerSeries A
    **Theorem thm.fps.deriv.rules (g)**: Chain rule for power series.
    
    This holds when `g` has nilpotent constant coefficient (in particular when `[x⁰]g = 0`). 
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_eq_imp_diff_const.{u_5}
      {RType u_5 : Type u_5A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  RType u_5] [IsAddTorsionFreeIsAddTorsionFree.{u_2} (M : Type u_2) [AddMonoid M] : PropAn additive monoid is torsion-free if scalar multiplication by every non-zero element `n : ℕ` is
    injective.  RType u_5] {fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_5}
      (h(PowerSeries.derivative R) f = (PowerSeries.derivative R) g : (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_5) fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_5) gPowerSeries R)
      (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) : n Ne.{u} {α : Sort u} (a b : α) : Prop`a ≠ b`, or `Ne a b` is defined as `¬ (a = b)` or `a = b → False`,
    and asserts that `a` and `b` are not equal.
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `≠` in identifiers is `ne`. 0  (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  n) (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).fPowerSeries R -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). gPowerSeries R)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. 0
    theorem AlgebraicCombinatorics.FPS.derivative_eq_imp_diff_const.{u_5}
      {RType u_5 : Type u_5A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  RType u_5]
      [IsAddTorsionFreeIsAddTorsionFree.{u_2} (M : Type u_2) [AddMonoid M] : PropAn additive monoid is torsion-free if scalar multiplication by every non-zero element `n : ℕ` is
    injective.  RType u_5]
      {fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_5}
      (h(PowerSeries.derivative R) f = (PowerSeries.derivative R) g :
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_5) fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_5) gPowerSeries R)
      (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) :
      n Ne.{u} {α : Sort u} (a b : α) : Prop`a ≠ b`, or `Ne a b` is defined as `¬ (a = b)` or `a = b → False`,
    and asserts that `a` and `b` are not equal.
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `≠` in identifiers is `ne`. 0 
        (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  n) (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).fPowerSeries R -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). gPowerSeries R)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. 0
    **Theorem thm.fps.deriv.rules (h)**: Two power series with equal derivatives
    differ by a constant.
    
    Note: Mathlib states this as: if `f' = g'` and `f₀ = g₀`, then `f = g`.
    We state the equivalent: if `f' = g'`, then `f - g` has zero derivative,
    hence is constant (all higher coefficients are zero). 
Proof

This combines parts (a) through (h), proved individually below.

Lean code for Lemma7.131 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_add.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.fPowerSeries R +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. gPowerSeries R)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) gPowerSeries R
    theorem AlgebraicCombinatorics.FPS.derivative_add.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1]
      (fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.fPowerSeries R +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. gPowerSeries R)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) gPowerSeries R
    **Theorem thm.fps.deriv.rules (a)**: Derivative is additive. 
Proof

This is part of the cited exercise on differentiating formal power series.

Lean code for Lemma7.141 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_neg.{u_2} {RType u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  RType u_2] (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_2) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_2) (Neg.neg.{u} {α : Type u} [self : Neg α] : α → α`-a` computes the negative or opposite of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `neg` (when used as a unary operator).-Neg.neg.{u} {α : Type u} [self : Neg α] : α → α`-a` computes the negative or opposite of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `neg` (when used as a unary operator).fPowerSeries R)Neg.neg.{u} {α : Type u} [self : Neg α] : α → α`-a` computes the negative or opposite of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `neg` (when used as a unary operator). =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. -Neg.neg.{u} {α : Type u} [self : Neg α] : α → α`-a` computes the negative or opposite of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `neg` (when used as a unary operator).(PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_2) fPowerSeries R
    theorem AlgebraicCombinatorics.FPS.derivative_neg.{u_2}
      {RType u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  RType u_2]
      (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_2) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_2) (Neg.neg.{u} {α : Type u} [self : Neg α] : α → α`-a` computes the negative or opposite of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `neg` (when used as a unary operator).-Neg.neg.{u} {α : Type u} [self : Neg α] : α → α`-a` computes the negative or opposite of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `neg` (when used as a unary operator).fPowerSeries R)Neg.neg.{u} {α : Type u} [self : Neg α] : α → α`-a` computes the negative or opposite of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `neg` (when used as a unary operator). =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        -Neg.neg.{u} {α : Type u} [self : Neg α] : α → α`-a` computes the negative or opposite of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `neg` (when used as a unary operator).(PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_2) fPowerSeries R
    Derivative of negation: `(-f)' = -f'`. 
Proof

The derivative is an additive map, so it preserves negation.

Lean code for Lemma7.151 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_sub.{u_2} {RType u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  RType u_2] (fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_2) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_2) (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).fPowerSeries R -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). gPowerSeries R)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_2) fPowerSeries R -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_2) gPowerSeries R
    theorem AlgebraicCombinatorics.FPS.derivative_sub.{u_2}
      {RType u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  RType u_2]
      (fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_2) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_2) (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).fPowerSeries R -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). gPowerSeries R)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_2) fPowerSeries R -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_2) gPowerSeries R
    Derivative of subtraction: `(f - g)' = f' - g'`. 
Proof

The derivative is an additive map, so it preserves subtraction.

Let I be a finite index set and (f_i)_{i\in I} a family of FPSs. Then \left(\sum_{i\in I} f_i\right)' = \sum_{i\in I} f_i'.

Lean code for Lemma7.161 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_sum.{u_1, u_2} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] {ιType u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } (sFinset ι : FinsetFinset.{u_4} (α : Type u_4) : Type u_4`Finset α` is the type of finite sets of elements of `α`. It is implemented
    as a multiset (a list up to permutation) which has no duplicate elements.  ιType u_2)
      (fι → PowerSeries R : ιType u_2  PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (∑ iι  sFinset ι, fι → PowerSeries R iι) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
         iι  sFinset ι, (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (fι → PowerSeries R iι)
    theorem AlgebraicCombinatorics.FPS.derivative_sum.{u_1,
        u_2}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1]
      {ιType u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } (sFinset ι : FinsetFinset.{u_4} (α : Type u_4) : Type u_4`Finset α` is the type of finite sets of elements of `α`. It is implemented
    as a multiset (a list up to permutation) which has no duplicate elements.  ιType u_2)
      (fι → PowerSeries R : ιType u_2  PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1)
          (∑ iι  sFinset ι, fι → PowerSeries R iι) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
         iι  sFinset ι,
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (fι → PowerSeries R iι)
    **Theorem thm.fps.deriv.rules (b)** (finite version):
    Derivative commutes with finite sums. 
Proof

Follows from additivity by induction on |I|.

If (f_i)_{i\in I} is a summable family of FPSs, then (f_i')_{i\in I} is also summable.

Lean code for Lemma7.171 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.summableFPS_derivative.{u_2, u_3}
      {R'Type u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  R'Type u_2] {ιType u_3 : Type u_3A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } (fι → PowerSeries R' : ιType u_3  PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  R'Type u_2)
      (hfAlgebraicCombinatorics.FPS.SummableFPS f : AlgebraicCombinatorics.FPS.SummableFPSAlgebraicCombinatorics.FPS.SummableFPS.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R) :
      PropA family of FPS is summable if for each coefficient index n,
    all but finitely many family members have that coefficient equal to zero.
    (Definition def.fps.summable)  fι → PowerSeries R') :
      AlgebraicCombinatorics.FPS.SummableFPSAlgebraicCombinatorics.FPS.SummableFPS.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R) :
      PropA family of FPS is summable if for each coefficient index n,
    all but finitely many family members have that coefficient equal to zero.
    (Definition def.fps.summable)  fun iι 
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  R'Type u_2) (fι → PowerSeries R' iι)
    theorem AlgebraicCombinatorics.FPS.summableFPS_derivative.{u_2,
        u_3}
      {R'Type u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  R'Type u_2]
      {ιType u_3 : Type u_3A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } (fι → PowerSeries R' : ιType u_3  PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  R'Type u_2)
      (hfAlgebraicCombinatorics.FPS.SummableFPS f :
        AlgebraicCombinatorics.FPS.SummableFPSAlgebraicCombinatorics.FPS.SummableFPS.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R) :
      PropA family of FPS is summable if for each coefficient index n,
    all but finitely many family members have that coefficient equal to zero.
    (Definition def.fps.summable) 
          fι → PowerSeries R') :
      AlgebraicCombinatorics.FPS.SummableFPSAlgebraicCombinatorics.FPS.SummableFPS.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R) :
      PropA family of FPS is summable if for each coefficient index n,
    all but finitely many family members have that coefficient equal to zero.
    (Definition def.fps.summable) 
        fun iι 
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  R'Type u_2) (fι → PowerSeries R' iι)
    If (fᵢ) is a summable family, then (fᵢ') is also summable. 
Proof

For each coefficient index n, the set of i with \left[x^n\right]f_i' \neq 0 is a subset of the set of i with \left[x^{n+1}\right]f_i \neq 0, which is finite by summability of (f_i).

If (f_i)_{i\in I} is a summable family of FPSs, then the family (f_i')_{i\in I} is summable as well, and \left(\sum_{i\in I} f_i\right)' = \sum_{i\in I} f_i'.

Lean code for Lemma7.181 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_summableFPSSum.{u_2, u_3}
      {R'Type u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  R'Type u_2] {ιType u_3 : Type u_3A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } (fι → PowerSeries R' : ιType u_3  PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  R'Type u_2)
      (hfAlgebraicCombinatorics.FPS.SummableFPS f : AlgebraicCombinatorics.FPS.SummableFPSAlgebraicCombinatorics.FPS.SummableFPS.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R) :
      PropA family of FPS is summable if for each coefficient index n,
    all but finitely many family members have that coefficient equal to zero.
    (Definition def.fps.summable)  fι → PowerSeries R') :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  R'Type u_2)
          (AlgebraicCombinatorics.FPS.summableFPSSumAlgebraicCombinatorics.FPS.summableFPSSum.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R)
      (_hf : AlgebraicCombinatorics.FPS.SummableFPS f) : PowerSeries RThe sum of a summable family of FPS.
    (Definition def.fps.summable, eq. eq.def.fps.summable.sum)
    
    For a summable family (fᵢ)_{i ∈ I}, the sum ∑_{i ∈ I} fᵢ is the FPS whose
    n-th coefficient is ∑_{i ∈ I} [x^n] fᵢ (an essentially finite sum).  fι → PowerSeries R' hfAlgebraicCombinatorics.FPS.SummableFPS f) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        AlgebraicCombinatorics.FPS.summableFPSSumAlgebraicCombinatorics.FPS.summableFPSSum.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R)
      (_hf : AlgebraicCombinatorics.FPS.SummableFPS f) : PowerSeries RThe sum of a summable family of FPS.
    (Definition def.fps.summable, eq. eq.def.fps.summable.sum)
    
    For a summable family (fᵢ)_{i ∈ I}, the sum ∑_{i ∈ I} fᵢ is the FPS whose
    n-th coefficient is ∑_{i ∈ I} [x^n] fᵢ (an essentially finite sum). 
          (fun iι  (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  R'Type u_2) (fι → PowerSeries R' iι)) 
    theorem AlgebraicCombinatorics.FPS.derivative_summableFPSSum.{u_2,
        u_3}
      {R'Type u_2 : Type u_2A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  R'Type u_2]
      {ιType u_3 : Type u_3A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } (fι → PowerSeries R' : ιType u_3  PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  R'Type u_2)
      (hfAlgebraicCombinatorics.FPS.SummableFPS f :
        AlgebraicCombinatorics.FPS.SummableFPSAlgebraicCombinatorics.FPS.SummableFPS.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R) :
      PropA family of FPS is summable if for each coefficient index n,
    all but finitely many family members have that coefficient equal to zero.
    (Definition def.fps.summable) 
          fι → PowerSeries R') :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  R'Type u_2)
          (AlgebraicCombinatorics.FPS.summableFPSSumAlgebraicCombinatorics.FPS.summableFPSSum.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R)
      (_hf : AlgebraicCombinatorics.FPS.SummableFPS f) : PowerSeries RThe sum of a summable family of FPS.
    (Definition def.fps.summable, eq. eq.def.fps.summable.sum)
    
    For a summable family (fᵢ)_{i ∈ I}, the sum ∑_{i ∈ I} fᵢ is the FPS whose
    n-th coefficient is ∑_{i ∈ I} [x^n] fᵢ (an essentially finite sum). 
            fι → PowerSeries R' hfAlgebraicCombinatorics.FPS.SummableFPS f) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        AlgebraicCombinatorics.FPS.summableFPSSumAlgebraicCombinatorics.FPS.summableFPSSum.{u_1, u_2} {R : Type u_1} [CommRing R] {ι : Type u_2} (f : ι → PowerSeries R)
      (_hf : AlgebraicCombinatorics.FPS.SummableFPS f) : PowerSeries RThe sum of a summable family of FPS.
    (Definition def.fps.summable, eq. eq.def.fps.summable.sum)
    
    For a summable family (fᵢ)_{i ∈ I}, the sum ∑_{i ∈ I} fᵢ is the FPS whose
    n-th coefficient is ∑_{i ∈ I} [x^n] fᵢ (an essentially finite sum). 
          (fun iι 
            (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  R'Type u_2) (fι → PowerSeries R' iι))
          
    **Theorem thm.fps.deriv.rules (b)** (infinite version):
    Derivative commutes with infinite summable sums.
    
    If (fᵢ)_{i ∈ I} is a summable family of FPSs, then (fᵢ')_{i ∈ I} is summable
    and (∑ fᵢ)' = ∑ fᵢ'. 
Proof

This is the natural generalization of part (a) to potentially infinite sums. For each n, \left[x^n\right]\left(\sum_{i\in I}f_i\right)' equals \left(\sum_{i\in I}\left[x^{n+1}\right]f_i\right) \cdot (n+1), which is the same as \sum_{i\in I} \left[x^{n+1}\right]f_i \cdot (n+1) = \sum_{i\in I} \left[x^n\right] f_i^{\prime}. The interchange of summation and multiplication by n+1 is justified because the sum has finite support.

Lean code for Lemma7.191 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_smul.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (cR : RType u_1) (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`.cR HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. fPowerSeries R)HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. cR HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R
    theorem AlgebraicCombinatorics.FPS.derivative_smul.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (cR : RType u_1)
      (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`.cR HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. fPowerSeries R)HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        cR HSMul.hSMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSMul α β γ] : α → β → γ`a • b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent, but it is intended to be used for left actions. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `•` in identifiers is `smul`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R
    **Theorem thm.fps.deriv.rules (c)**: Derivative commutes with scalar multiplication. 
Proof

This is another standard exercise on formal power series differentiation.

We have \left(C(c)\cdot f\right)' = C(c)\cdot f' for any c\in K and FPS f, where C(c) denotes the constant power series with value c.

Lean code for Lemma7.201 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_C_mul.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (cR : RType u_1) (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.PowerSeries.CPowerSeries.C.{u_1} {R : Type u_1} [Semiring R] : R →+* PowerSeries RThe constant formal power series.  cR *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. fPowerSeries R)HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        PowerSeries.CPowerSeries.C.{u_1} {R : Type u_1} [Semiring R] : R →+* PowerSeries RThe constant formal power series.  cR *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R
    theorem AlgebraicCombinatorics.FPS.derivative_C_mul.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (cR : RType u_1)
      (fPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1)
          (HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.PowerSeries.CPowerSeries.C.{u_1} {R : Type u_1} [Semiring R] : R →+* PowerSeries RThe constant formal power series.  cR *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. fPowerSeries R)HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        PowerSeries.CPowerSeries.C.{u_1} {R : Type u_1} [Semiring R] : R →+* PowerSeries RThe constant formal power series.  cR *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R
    Variant with `C c * f` instead of `c • f`. 
Proof

This follows from the scalar-multiplication rule, since C(c)\cdot f = c\cdot f in the power series ring.

Lean code for Lemma7.211 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_mul.{u_1} {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1] (fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries R)HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries R +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`. fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) gPowerSeries R
    theorem AlgebraicCombinatorics.FPS.derivative_mul.{u_1}
      {RType u_1 : Type u_1A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommSemiringCommSemiring.{u} (R : Type u) : Type uA commutative semiring is a semiring with commutative multiplication.  RType u_1]
      (fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_1) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) (HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries R)HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries R +HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `+` in identifiers is `add`.
          fPowerSeries R *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_1) gPowerSeries R
    **Theorem thm.fps.deriv.rules (d)**: Leibniz rule for power series. 
Proof

This is Exercise 5 (c) in 19s-mt3s and Proposition 0.2 (c) in logexp.

If f,g\in K\left[\left[x\right]\right] are two FPSs such that g is invertible, then \left(\dfrac{f}{g}\right)' = \dfrac{f'g-fg'}{g^2}. This is the quotient rule.

Lean code for Lemma7.221 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_div.{u_3} {KType u_3 : Type u_3A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [FieldField.{u} (K : Type u) : Type uA `Field` is a `CommRing` with multiplicative inverses for nonzero elements.
    
    An instance of `Field K` includes maps `ratCast : ℚ → K` and `qsmul : ℚ → K → K`.
    Those two fields are needed to implement the `DivisionRing K → Algebra ℚ K` instance since we need
    to control the specific definitions for some special cases of `K` (in particular `K = ℚ` itself).
    See also note [forgetful inheritance].
    
    If the field has positive characteristic `p`, our division by zero convention forces
    `ratCast (1 / p) = 1 / 0 = 0`.  KType u_3]
      (fPowerSeries K gPowerSeries K : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  KType u_3) (hgPowerSeries.constantCoeff g ≠ 0 : PowerSeries.constantCoeffPowerSeries.constantCoeff.{u_1} {R : Type u_1} [Semiring R] : PowerSeries R →+* RThe constant coefficient of a formal power series.  gPowerSeries K Ne.{u} {α : Sort u} (a b : α) : Prop`a ≠ b`, or `Ne a b` is defined as `¬ (a = b)` or `a = b → False`,
    and asserts that `a` and `b` are not equal.
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `≠` in identifiers is `ne`. 0) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  KType u_3) (HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.fPowerSeries K *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries K⁻¹Inv.inv.{u} {α : Type u} [self : Inv α] : α → α`a⁻¹` computes the inverse of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `⁻¹` in identifiers is `inv`.)HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).(PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  KType u_3) fPowerSeries K *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries K -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).
            fPowerSeries K *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  KType u_3) gPowerSeries K)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
          gPowerSeries K⁻¹Inv.inv.{u} {α : Type u} [self : Inv α] : α → α`a⁻¹` computes the inverse of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `⁻¹` in identifiers is `inv`. ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. 2
    theorem AlgebraicCombinatorics.FPS.derivative_div.{u_3}
      {KType u_3 : Type u_3A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [FieldField.{u} (K : Type u) : Type uA `Field` is a `CommRing` with multiplicative inverses for nonzero elements.
    
    An instance of `Field K` includes maps `ratCast : ℚ → K` and `qsmul : ℚ → K → K`.
    Those two fields are needed to implement the `DivisionRing K → Algebra ℚ K` instance since we need
    to control the specific definitions for some special cases of `K` (in particular `K = ℚ` itself).
    See also note [forgetful inheritance].
    
    If the field has positive characteristic `p`, our division by zero convention forces
    `ratCast (1 / p) = 1 / 0 = 0`.  KType u_3]
      (fPowerSeries K gPowerSeries K : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  KType u_3)
      (hgPowerSeries.constantCoeff g ≠ 0 : PowerSeries.constantCoeffPowerSeries.constantCoeff.{u_1} {R : Type u_1} [Semiring R] : PowerSeries R →+* RThe constant coefficient of a formal power series.  gPowerSeries K Ne.{u} {α : Sort u} (a b : α) : Prop`a ≠ b`, or `Ne a b` is defined as `¬ (a = b)` or `a = b → False`,
    and asserts that `a` and `b` are not equal.
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `≠` in identifiers is `ne`. 0) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  KType u_3) (HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.fPowerSeries K *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries K⁻¹Inv.inv.{u} {α : Type u} [self : Inv α] : α → α`a⁻¹` computes the inverse of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `⁻¹` in identifiers is `inv`.)HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).(PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  KType u_3) fPowerSeries K *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries K -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).
            fPowerSeries K *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
              (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  KType u_3) gPowerSeries K)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
          gPowerSeries K⁻¹Inv.inv.{u} {α : Type u} [self : Inv α] : α → α`a⁻¹` computes the inverse of `a`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `⁻¹` in identifiers is `inv`. ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. 2
    **Theorem thm.fps.deriv.rules (e)**: Quotient rule for power series.
    
    Note: In Mathlib, this is stated as `(f⁻¹)' = -f⁻¹² · f'`.
    The full quotient rule follows from combining this with Leibniz. 
Proof

Apply the product rule to \dfrac{f}{g}\cdot g = f. This gives f' = \left(\dfrac{f}{g}\right)'\cdot g + \dfrac{f}{g}\cdot g'. Solving for \left(\dfrac{f}{g}\right)' yields the stated formula.

If g\in K\left[\left[x\right]\right] is an FPS, then \left(g^n\right)' = ng'g^{n-1} for any n\in\mathbb{N}, where the expression on the right is understood as 0 if n=0.

Lean code for Lemma7.231 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_pow'.{u_4} {AType u_4 : Type u_4A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  AType u_4] (gPowerSeries A : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  AType u_4) (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) (HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`.gPowerSeries A ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. n)HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        n *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries A ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).n -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). 1)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) gPowerSeries A
    theorem AlgebraicCombinatorics.FPS.derivative_pow'.{u_4}
      {AType u_4 : Type u_4A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  AType u_4]
      (gPowerSeries A : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  AType u_4) (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) (HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`.gPowerSeries A ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. n)HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        n *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`. gPowerSeries A ^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `^` in identifiers is `pow`. (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).n -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). 1)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) gPowerSeries A
    **Theorem thm.fps.deriv.rules (f)**: Power rule for power series. 
Proof

Induct on n, using the Leibniz rule in the induction step and the fact that 1' = 0 in the base case.

Given two FPSs f,g\in K\left[\left[x\right]\right], we have \left(f\circ g\right)' = \left(f'\circ g\right)\cdot g' if f is a polynomial or if \left[x^0\right]g = 0. This is the chain rule.

Lean code for Lemma7.241 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_comp.{u_4} {AType u_4 : Type u_4A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. }
      [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  AType u_4] (fPowerSeries A gPowerSeries A : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  AType u_4) (hgPowerSeries.HasSubst g : PowerSeries.HasSubstPowerSeries.HasSubst.{u_3, u_4} {τ : Type u_3} {S : Type u_4} [CommRing S] (a : MvPowerSeries τ S) : Prop(Possibly multivariate) power series which can be substituted in a `PowerSeries`.  gPowerSeries A) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) (PowerSeries.substPowerSeries.subst.{u_2, u_3, u_4} {R : Type u_2} [CommRing R] {τ : Type u_3} {S : Type u_4} [CommRing S] [Algebra R S]
      (a : MvPowerSeries τ S) (f : PowerSeries R) : MvPowerSeries τ SSubstitution of power series into a power series.  gPowerSeries A fPowerSeries A) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        PowerSeries.substPowerSeries.subst.{u_2, u_3, u_4} {R : Type u_2} [CommRing R] {τ : Type u_3} {S : Type u_4} [CommRing S] [Algebra R S]
      (a : MvPowerSeries τ S) (f : PowerSeries R) : MvPowerSeries τ SSubstitution of power series into a power series.  gPowerSeries A ((PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) fPowerSeries A) *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) gPowerSeries A
    theorem AlgebraicCombinatorics.FPS.derivative_comp.{u_4}
      {AType u_4 : Type u_4A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  AType u_4]
      (fPowerSeries A gPowerSeries A : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  AType u_4)
      (hgPowerSeries.HasSubst g : PowerSeries.HasSubstPowerSeries.HasSubst.{u_3, u_4} {τ : Type u_3} {S : Type u_4} [CommRing S] (a : MvPowerSeries τ S) : Prop(Possibly multivariate) power series which can be substituted in a `PowerSeries`.  gPowerSeries A) :
      (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4)
          (PowerSeries.substPowerSeries.subst.{u_2, u_3, u_4} {R : Type u_2} [CommRing R] {τ : Type u_3} {S : Type u_4} [CommRing S] [Algebra R S]
      (a : MvPowerSeries τ S) (f : PowerSeries R) : MvPowerSeries τ SSubstitution of power series into a power series.  gPowerSeries A fPowerSeries A) =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
        PowerSeries.substPowerSeries.subst.{u_2, u_3, u_4} {R : Type u_2} [CommRing R] {τ : Type u_3} {S : Type u_4} [CommRing S] [Algebra R S]
      (a : MvPowerSeries τ S) (f : PowerSeries R) : MvPowerSeries τ SSubstitution of power series into a power series.  gPowerSeries A
            ((PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) fPowerSeries A) *HMul.hMul.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HMul α β γ] : α → β → γ`a * b` computes the product of `a` and `b`.
    The meaning of this notation is type-dependent. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `*` in identifiers is `mul`.
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  AType u_4) gPowerSeries A
    **Theorem thm.fps.deriv.rules (g)**: Chain rule for power series.
    
    This holds when `g` has nilpotent constant coefficient (in particular when `[x⁰]g = 0`). 
Proof

Write f = \sum_{n\in\mathbb{N}} f_n x^n. Then f[g] = \sum_{n\in\mathbb{N}} f_n g^n, so differentiating termwise gives \left(f[g]\right)' = \sum_{n>0} f_n \left(g^n\right)'. By the power rule this becomes \sum_{n>0} f_n n g' g^{n-1}.

On the other hand, f' = \sum_{n>0} n f_n x^{n-1}, so substituting g into f' gives f'[g] = \sum_{n>0} n f_n g^{n-1}. Multiplying by g' yields the same sum as above, hence \left(f\circ g\right)' = \left(f'\circ g\right)\cdot g'.

If K is a \mathbb{Q}-algebra, and if two FPSs f,g\in K\left[\left[x\right]\right] satisfy f' = g', then f-g is constant.

Lean code for Lemma7.251 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.derivative_eq_imp_diff_const.{u_5}
      {RType u_5 : Type u_5A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  RType u_5] [IsAddTorsionFreeIsAddTorsionFree.{u_2} (M : Type u_2) [AddMonoid M] : PropAn additive monoid is torsion-free if scalar multiplication by every non-zero element `n : ℕ` is
    injective.  RType u_5] {fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_5}
      (h(PowerSeries.derivative R) f = (PowerSeries.derivative R) g : (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_5) fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_5) gPowerSeries R)
      (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) : n Ne.{u} {α : Sort u} (a b : α) : Prop`a ≠ b`, or `Ne a b` is defined as `¬ (a = b)` or `a = b → False`,
    and asserts that `a` and `b` are not equal.
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `≠` in identifiers is `ne`. 0  (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  n) (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).fPowerSeries R -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). gPowerSeries R)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. 0
    theorem AlgebraicCombinatorics.FPS.derivative_eq_imp_diff_const.{u_5}
      {RType u_5 : Type u_5A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  RType u_5]
      [IsAddTorsionFreeIsAddTorsionFree.{u_2} (M : Type u_2) [AddMonoid M] : PropAn additive monoid is torsion-free if scalar multiplication by every non-zero element `n : ℕ` is
    injective.  RType u_5]
      {fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_5}
      (h(PowerSeries.derivative R) f = (PowerSeries.derivative R) g :
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_5) fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_5) gPowerSeries R)
      (n : Nat : TypeThe natural numbers, starting at zero.
    
    This type is special-cased by both the kernel and the compiler, and overridden with an efficient
    implementation. Both use a fast arbitrary-precision arithmetic library (usually
    [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
    ) :
      n Ne.{u} {α : Sort u} (a b : α) : Prop`a ≠ b`, or `Ne a b` is defined as `¬ (a = b)` or `a = b → False`,
    and asserts that `a` and `b` are not equal.
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `≠` in identifiers is `ne`. 0 
        (PowerSeries.coeffPowerSeries.coeff.{u_1} {R : Type u_1} [Semiring R] (n : ℕ) : PowerSeries R →ₗ[R] RThe `n`th coefficient of a formal power series.  n) (HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator).fPowerSeries R -HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). gPowerSeries R)HSub.hSub.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HSub α β γ] : α → β → γ`a - b` computes the difference of `a` and `b`.
    The meaning of this notation is type-dependent.
    * For natural numbers, this operator saturates at 0: `a - b = 0` when `a ≤ b`. 
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `-` in identifiers is `sub` (when used as a binary operator). =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. 0
    **Theorem thm.fps.deriv.rules (h)**: Two power series with equal derivatives
    differ by a constant.
    
    Note: Mathlib states this as: if `f' = g'` and `f₀ = g₀`, then `f = g`.
    We state the equivalent: if `f' = g'`, then `f - g` has zero derivative,
    hence is constant (all higher coefficients are zero). 
Proof

Let n\ge 1. Comparing coefficients at index n-1 in the equality f' = g' yields n\cdot \left[x^n\right]f = n\cdot \left[x^n\right]g. Since K is a \mathbb{Q}-algebra, we can divide by the positive integer n and conclude \left[x^n\right]f = \left[x^n\right]g. Thus every positive-degree coefficient of f-g vanishes, so f-g is constant.

The assumption that K is a \mathbb{Q}-algebra is essential, because it allows division by positive integers.

If K is a \mathbb{Q}-algebra, and if two FPSs f,g\in K\left[\left[x\right]\right] satisfy f' = g' and \left[x^0\right]f = \left[x^0\right]g, then f = g.

Lean code for Lemma7.261 theorem
  • complete
    theorem AlgebraicCombinatorics.FPS.eq_of_derivative_eq_of_constantCoeff_eq.{u_5}
      {RType u_5 : Type u_5A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  RType u_5] [IsAddTorsionFreeIsAddTorsionFree.{u_2} (M : Type u_2) [AddMonoid M] : PropAn additive monoid is torsion-free if scalar multiplication by every non-zero element `n : ℕ` is
    injective.  RType u_5] {fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_5}
      (hD(PowerSeries.derivative R) f = (PowerSeries.derivative R) g : (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_5) fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_5) gPowerSeries R)
      (hcPowerSeries.constantCoeff f = PowerSeries.constantCoeff g : PowerSeries.constantCoeffPowerSeries.constantCoeff.{u_1} {R : Type u_1} [Semiring R] : PowerSeries R →+* RThe constant coefficient of a formal power series.  fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. PowerSeries.constantCoeffPowerSeries.constantCoeff.{u_1} {R : Type u_1} [Semiring R] : PowerSeries R →+* RThe constant coefficient of a formal power series.  gPowerSeries R) :
      fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. gPowerSeries R
    theorem AlgebraicCombinatorics.FPS.eq_of_derivative_eq_of_constantCoeff_eq.{u_5}
      {RType u_5 : Type u_5A type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`. } [CommRingCommRing.{u} (α : Type u) : Type uA commutative ring is a ring with commutative multiplication.  RType u_5]
      [IsAddTorsionFreeIsAddTorsionFree.{u_2} (M : Type u_2) [AddMonoid M] : PropAn additive monoid is torsion-free if scalar multiplication by every non-zero element `n : ℕ` is
    injective.  RType u_5]
      {fPowerSeries R gPowerSeries R : PowerSeriesPowerSeries.{u_1} (R : Type u_1) : Type u_1Formal power series over a coefficient type `R`  RType u_5}
      (hD(PowerSeries.derivative R) f = (PowerSeries.derivative R) g :
        (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_5) fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
          (PowerSeries.derivativePowerSeries.derivative.{u_1} (R : Type u_1) [CommSemiring R] : Derivation R (PowerSeries R) (PowerSeries R)The formal derivative of a formal power series  RType u_5) gPowerSeries R)
      (hcPowerSeries.constantCoeff f = PowerSeries.constantCoeff g :
        PowerSeries.constantCoeffPowerSeries.constantCoeff.{u_1} {R : Type u_1} [Semiring R] : PowerSeries R →+* RThe constant coefficient of a formal power series.  fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`.
          PowerSeries.constantCoeffPowerSeries.constantCoeff.{u_1} {R : Type u_1} [Semiring R] : PowerSeries R →+* RThe constant coefficient of a formal power series.  gPowerSeries R) :
      fPowerSeries R =Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`.
    We use `a = b` as notation for `Eq a b`.
    A fundamental property of equality is that it is an equivalence relation.
    ```
    variable (α : Type) (a b c d : α)
    variable (hab : a = b) (hcb : c = b) (hcd : c = d)
    
    example : a = d :=
      Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
    ```
    Equality is much more than an equivalence relation, however. It has the important property that every assertion
    respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
    That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
    Example:
    ```
    example (α : Type) (a b : α) (p : α → Prop)
            (h1 : a = b) (h2 : p a) : p b :=
      Eq.subst h1 h2
    
    example (α : Type) (a b : α) (p : α → Prop)
        (h1 : a = b) (h2 : p a) : p b :=
      h1 ▸ h2
    ```
    The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
    For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
    
    
    Conventions for notations in identifiers:
    
     * The recommended spelling of `=` in identifiers is `eq`. gPowerSeries R
    Equivalent formulation: if two power series have equal derivatives and equal
    constant terms, they are equal. This is `PowerSeries.derivative.ext` in Mathlib. 
Proof

By the previous lemma, f-g is constant. Since \left[x^0\right](f-g) = \left[x^0\right]f - \left[x^0\right]g = 0, this constant must be 0. Hence f-g=0, so f=g.