Non-integer Powers of Formal Power Series #
This file formalizes non-integer powers of formal power series (FPS) and the generalized Newton binomial formula, following Section 7.12 (sec.gf.nips) of the source.
Main Definitions #
AlgebraicCombinatorics.FPS.fpsPow: The c-th power f^c for f ∈ K⟦X⟧₁ (FPS with constant term 1) and c ∈ K, defined asExp(c * Log f)(Definition def.fps.power-c).
Main Results #
AlgebraicCombinatorics.FPS.fpsPow_add: The rule f^{a+b} = f^a * f^b (Theorem thm.fps.power-c.rules).AlgebraicCombinatorics.FPS.fpsPow_mul: The rule (fg)^a = f^a * g^a (Theorem thm.fps.power-c.rules).AlgebraicCombinatorics.FPS.fpsPow_pow: The rule (f^a)^b = f^{ab} (Theorem thm.fps.power-c.rules).AlgebraicCombinatorics.FPS.generalizedNewtonBinomial: The generalized Newton binomial formula (1+x)^c = ∑_{k ∈ ℕ} C(c,k) x^k (Theorem thm.fps.gen-newton).AlgebraicCombinatorics.FPS.binomialIdentity: The binomial identity ∑_{i=0}^k C(n+i-1,i) C(n,k-2i) = C(n+k-1,k) (Proposition prop.binom.nCk-2i-qedmo.CN).
Implementation Notes #
The definition of f^c uses the Exp and Log maps from Mathlib. Specifically:
- For f ∈ K⟦X⟧₁ (constant term 1), we define f^c := Exp(c * Log f)
- This requires K to be a commutative ℚ-algebra
The generalized Newton binomial formula is proved using the polynomial identity trick: both sides are polynomials in c that agree on ℕ, hence they agree everywhere.
References #
- Source: NonIntegerPowers.tex, Section sec.gf.nips
The Exp and Log Maps #
We use Mathlib's PowerSeries.exp for the exponential series.
For the logarithm, we define it via the standard series log(1+x) = ∑_{n≥1} (-1)^{n-1}/n * x^n.
The logarithm series: log(1+x) = x - x²/2 + x³/3 - x⁴/4 + ...
This is \overline{log} in the source notation.
Label: def.fps.logbar
Equations
- AlgebraicCombinatorics.FPS.logSeries = PowerSeries.mk fun (n : ℕ) => if n = 0 then 0 else (algebraMap ℚ K) ((-1) ^ (n - 1) / ↑n)
Instances For
The constant term of the log series is 0
Helper: coeff k ((c • g)^m) = c^m • coeff k (g^m)
FPS with Constant Term 1 #
We define the set K⟦X⟧₁ of FPS with constant term 1. This is the domain on which non-integer powers are defined.
An FPS has constant term 1. This is the condition for f ∈ K⟦X⟧₁ in the source. Label: def.fps.Exp-Log-maps (b)
Note: This is definitionally equivalent to membership in PowerSeries₁ from ExpLog.lean:
HasConstantTermOne f ↔ f ∈ PowerSeries₁. The Prop form is used here for convenience
in hypotheses, while PowerSeries₁ (a Set) is used in ExpLog.lean for subgroup structures.
Equations
Instances For
HasConstantTermOne f is equivalent to membership in PowerSeries₁.
This bridges the two representations of "constant term equals 1".
Alias for hasConstantTermOne_iff_mem_PowerSeries₁.mp.
Alias for hasConstantTermOne_iff_mem_PowerSeries₁.mpr.
The set of FPS with constant term 1 forms a submonoid under multiplication
1 + x has constant term 1
Any FPS of the form 1 + g where g has constant term 0 has constant term 1
The Log Map for FPS with Constant Term 1 #
For f ∈ K⟦X⟧₁, we define Log(f) by substituting (f-1) into the log series. Since f has constant term 1, f-1 has constant term 0, so the substitution is well-defined.
The Log map: Log(f) = log_series(f-1) = logSeries.subst (f-1) This is well-defined when f has constant term 1. Label: def.fps.Exp-Log-maps
Equations
Instances For
The constant term of Log(f) is 0 when f has constant term 1
The Exp Map for FPS with Constant Term 0 #
For g ∈ K⟦X⟧₀ (constant term 0), we define Exp(g) by substituting g into exp.
The Exp map: Exp(g) = exp(g) = (exp K).subst g This is well-defined when g has constant term 0. Label: def.fps.Exp-Log-maps
Equations
Instances For
Exp(g) has constant term 1 when g has constant term 0
The exponential functional equation: Exp(x + y) = Exp(x) * Exp(y) This is a fundamental property of the exponential series. For power series x, y with constant term 0: exp(x + y) = exp(x) * exp(y) Label: (exp functional equation)
Proof strategy (from the textbook): Both sides satisfy the same differential equation with the same initial condition. Let F(x,y) = exp(x+y) and G(x,y) = exp(x) * exp(y).
- ∂F/∂x = exp(x+y) = F and ∂F/∂y = exp(x+y) = F
- ∂G/∂x = exp(x) * exp(y) = G and ∂G/∂y = exp(x) * exp(y) = G
- F(0,0) = exp(0) = 1 and G(0,0) = exp(0) * exp(0) = 1 By uniqueness of solutions to the ODE, F = G.
Alternative proof (coefficient comparison): Use the Cauchy product formula and the fact that x^n = ∑_{k=0}^n [x^k](exp x) * [x^{n-k}](exp y) * C(n,k) which equals [x^n](exp x * exp y) by the binomial theorem.
Mathlib note: Mathlib's exp_mul_exp_eq_exp_add proves this for the special case
where x = a • X and y = b • X (i.e., rescaling). The general case requires the
derivative characterization or coefficient comparison.
The logarithm product rule: Log(f * g) = Log(f) + Log(g) This is a fundamental property of the logarithm series. For power series f, g with constant term 1: log(f * g) = log(f) + log(g) Label: (log product rule)
Proof strategy (from the textbook): Use the derivative characterization. Let h = log(fg) - log(f) - log(g). Then h' = (fg)'/(fg) - f'/f - g'/g = (f'g + fg')/(fg) - f'/f - g'/g = 0. Since h(0) = 0 and h' = 0, we have h = 0.
Alternative proof: Use the inverse property: if Exp and Log are inverses, then Log(fg) = Log(Exp(Log f) * Exp(Log g)) = Log(Exp(Log f + Log g)) = Log f + Log g.
Dependency: This proof requires either the derivative characterization
or the inverse property Exp_Log_inverse from ExpLog.lean.
Definition of Non-integer Powers (Definition def.fps.power-c) #
For f ∈ K⟦X⟧₁ and c ∈ K, we define f^c := Exp(c * Log(f)).
This definition:
- Does not conflict with integer powers (since Log and Exp are inverses on the appropriate domains)
- Makes the rules of exponents hold
- Yields (1+x)^c = ∑ C(c,k) x^k (generalized Newton binomial formula)
The c-th power of an FPS f with constant term 1. f^c := Exp(c * Log(f)) = exp.subst (c * log_series.subst (f-1)) Label: def.fps.power-c
Equations
Instances For
Notation for non-integer powers (when needed)
Equations
- One or more equations did not get rendered due to their size.
Instances For
f^0 = 1 for any f with constant term 1
f^c has constant term 1 when f has constant term 1
Rules of Exponents (Theorem thm.fps.power-c.rules) #
For any a, b ∈ K and f, g ∈ K⟦X⟧₁:
- f^{a+b} = f^a * f^b
- (fg)^a = f^a * g^a
- (f^a)^b = f^{ab}
Rule of exponents: f^{a+b} = f^a * f^b Label: eq.sec.gf.nips.rules-of-exps (first rule)
Proof: f^{a+b} = Exp((a+b) • Log f) = Exp(a • Log f + b • Log f) [by smul_add] = Exp(a • Log f) * Exp(b • Log f) [by fpsExp_add] = f^a * f^b
Dependency: Requires fpsExp_add.
Rule of exponents: (fg)^a = f^a * g^a Label: eq.sec.gf.nips.rules-of-exps (second rule)
Rule of exponents: (f^a)^b = f^{ab} Label: eq.sec.gf.nips.rules-of-exps (third rule)
Proof strategy: (f^a)^b = Exp(b • Log(f^a)) = Exp(b • Log(Exp(a • Log f))) = Exp(b • (a • Log f)) [by fpsLog_fpsExp: Log(Exp g) = g] = Exp((b * a) • Log f) [by smul_smul] = Exp((a * b) • Log f) [by mul_comm] = f^{ab}
Dependency: Requires the inverse property fpsLog (fpsExp g) = g
for g with constant term 0. This is proved in ExpLog.lean as Log_Exp.
Connection to ExpLog.lean #
We establish the connection between our logSeries/fpsLog/fpsExp definitions
and the logbar/Log/Exp definitions from ExpLog.lean. This allows us to use
the Exp_Log theorem to prove fpsPow_one.
Our logSeries equals PowerSeries.logbar from ExpLog.lean
fpsLog f equals (Log f).val when f has constant term 1
fpsExp g equals (Exp g').val when g has constant term 0
f^1 = f for any f with constant term 1. This follows from the Exp-Log inverse property: Exp(Log(f)) = f. Label: (implicit in def.fps.power-c consistency)
The constant term of f^c is 1 when f has constant term 1.
This is a simp-friendly version of hasConstantTermOne_fpsPow.
Label: def.fps.power-c (property)
f^(-c) = (f^c)⁻¹ for f with constant term 1 (over a field). This extends the rules of exponents to negative powers. Label: def.fps.power-c (negative power property)
f^(a-b) = f^a / f^b for f with constant term 1 (over a field). This extends the rules of exponents to subtraction. Label: def.fps.power-c (subtraction rule)
f^(2*c) = (f^c)^2 for f with constant term 1.
A useful special case of fpsPow_pow.
Label: def.fps.power-c (doubling rule)
Generalized Newton Binomial Formula (Theorem thm.fps.gen-newton) #
For any c ∈ K (where K is a commutative ℚ-algebra): (1+x)^c = ∑_{k ∈ ℕ} C(c,k) x^k
where C(c,k) = c(c-1)(c-2)⋯(c-k+1)/k! is the generalized binomial coefficient.
Note: We need K to be a BinomialRing to use Ring.choose. Since K is a ℚ-algebra, it has a BinomialRing structure.
Key lemmas for the proof #
The proof strategy is:
- Show that
fpsLog (1+X) = logSeries - Show that
fpsPow (1+X) c = fpsExp (c • logSeries) - Show that for natural
n,fpsExp (n • logSeries) = (1+X)^nusing the exp functional equation - Use
binomialSeries_nat:binomialSeries K n = (1+X)^n - Apply the polynomial identity trick: both sides have polynomial coefficients in
cthat agree on all natural numbers, hence they agree everywhere
Helper lemmas for the polynomial identity principle #
The proof of generalizedNewtonBinomial uses the polynomial identity principle:
both Ring.choose c k and coeff k ((1+X)^ᶠ c) are polynomial functions of c
that agree on all natural numbers, hence they are equal.
The following lemmas establish the polynomial structure of Ring.choose c k.
coeffExpPoly k evaluated at c equals coeff k (fpsExp (c • logSeries)). This is the key lemma showing the LHS coefficient is a polynomial function.
Ring.choose c k equals the evaluation of choosePoly.map at c. This is the key lemma showing Ring.choose is a polynomial function.
Key: if two polynomial evaluations agree on all naturals, the polynomials are equal
Pascal identity for Ring.choose: C(c, k+1) = C(c-1, k) + C(c-1, k+1)
Pascal identity for fpsPow coefficients: coeff (k+1) ((1+X)^c) = coeff k ((1+X)^(c-1)) + coeff (k+1) ((1+X)^(c-1))
The generalized Newton binomial formula: (1+x)^c = ∑_{k ∈ ℕ} C(c,k) x^k
This extends the standard Newton binomial formula (Theorem thm.fps.newton-binom) from natural number exponents to arbitrary exponents in a ℚ-algebra.
The proof uses the polynomial identity trick: both sides of the coefficient equality are polynomials in c that agree on ℕ (by the standard Newton formula), hence they agree everywhere.
Proof outline:
For each coefficient k, we need to show coeff k ((1+X)^c) = Ring.choose c k.
Both sides are polynomial functions of
cwith rational coefficients:Ring.choose c k = descPochhammer(c, k) / k!is a polynomial of degreekcoeff k (fpsExp (c • logSeries))is also a polynomial inc(by expanding the exponential series and collecting terms)
For natural
c = n, both sides equalNat.choose n k:Ring.choose n k = Nat.choose n kbyRing.choose_natCastcoeff k ((1+X)^n) = Nat.choose n kby the standard binomial theorem
By the polynomial identity trick: two polynomials (over ℚ) that agree on all natural numbers must be equal. Hence the coefficients agree for all
c ∈ K.
Label: thm.fps.gen-newton
Corollary: coefficient of x^k in (1+x)^c is C(c,k) Label: thm.fps.gen-newton (coefficient form)
Application: The Catalan Number Generating Function #
The equation C = 1 + xC² for the Catalan generating function has solution C = (1 - √(1-4x))/(2x) = (1 - (1-4x)^{1/2})/(2x)
This is now rigorous using our definition of non-integer powers.
The square root of 1-4x as an FPS. √(1-4x) = (1-4x)^{1/2} = (1 + (-4x))^{1/2} Label: eq.sec.gf.exas.2.(1+x)1/2
Equations
Instances For
1-4x has constant term 1, so its square root is well-defined
The coefficient of x^k in √(1-4x) is C(1/2, k) * (-4)^k
Another Application: A Binomial Identity (Proposition prop.binom.nCk-2i-qedmo.CN) #
For n ∈ ℂ and k ∈ ℕ: ∑_{i=0}^k C(n+i-1, i) C(n, k-2i) = C(n+k-1, k)
The proof uses generating functions:
- Define f = ∑_{i ∈ ℕ} C(n+i-1, i) x^{2i} = (1-x²)^{-n}
- Define g = ∑_{j ∈ ℕ} C(n, j) x^j = (1+x)^n
- Then fg = (1-x)^{-n} = ∑_{i ∈ ℕ} C(n+i-1, i) x^i
- Comparing coefficients of x^k gives the identity
The anti-Newton binomial formula: (1+x)^{-n} = ∑_{i ∈ ℕ} (-1)^i C(n+i-1, i) x^i This is a consequence of the generalized Newton formula. Label: prop.fps.anti-newton-binom
Helper Lemmas for the Binomial Identity #
We prove the identity using generating functions:
- Define f = ∑_{i ∈ ℕ} C(n+i-1, i) x^{2i}
- Define g = ∑_{j ∈ ℕ} C(n, j) x^j = (1+x)^n
- Show that fg = (1-x)^{-n} using the factorization (1-x²) = (1-x)(1+x)
- Compare coefficients of x^k
(1-x)^{-n} has coefficient C(n+k-1, k) at position k. This is rescale (-1) applied to (1+x)^{-n}.
The series f = ∑_i C(n+i-1, i) x^{2i} used in the proof
Equations
- AlgebraicCombinatorics.FPS.f_series' n = PowerSeries.mk fun (m : ℕ) => if Even m then Ring.choose (n + ↑(m / 2) - 1) (m / 2) else 0
Instances For
The series g = (1+x)^n = binomialSeries K n
Equations
Instances For
The coefficient of x^k in f * g equals the LHS of the binomial identity
Infrastructure for the Polynomial Identity Principle #
The following lemmas establish the connection between binomialSeries and invOneSubPow, which is needed for proving the coefficient identity using the polynomial identity principle.
The product (invOneSubPow K N).val * rescale (-1) (invOneSubPow K N).val times (1 - X²)^N equals 1. This shows the product is the inverse of (1 - X²)^N.
expand 2 (invOneSubPow K N).val = (1 - X²)^{-N}, i.e., the inverse of (1 - X²)^N. This follows from expand 2 being a ring homomorphism that maps (1 - X) to (1 - X²).
The product (invOneSubPow K N).val * rescale (-1) (invOneSubPow K N).val equals expand 2 (invOneSubPow K N).val.
Both are inverses of (1 - X²)^N:
- The product: by invOneSubPow_mul_rescale_mul_one_sub_sq_pow'
- The expand: by expand_invOneSubPow_eq_inv_one_sub_X_sq
Since the inverse is unique (when it exists), they must be equal.
For natural N ≥ 1, the coefficient of X^{2m} in the product (invOneSubPow K N).val * rescale (-1) (invOneSubPow K N).val is Nat.choose (N+m-1) m. This follows from the product being (1-X²)^{-N}.
The key product identity: f * g = (1-x)^{-n}
This is the algebraic identity (1-x²)^{-n} * (1+x)^n = (1-x)^{-n}. The proof uses the factorization (1-x²) = (1-x)(1+x): (1-x²)^{-n} * (1+x)^n = (1-x)^{-n} * (1+x)^{-n} * (1+x)^n = (1-x)^{-n}
Note: This requires showing that f_series' n represents (1-x²)^{-n}, which follows from the anti-Newton binomial formula with the substitution x → -x².
The binomial identity: ∑_{i=0}^{⌊k/2⌋} C(n+i-1, i) C(n, k-2i) = C(n+k-1, k)
This is proved using generating functions and the generalized Newton formula. Note: The sum is restricted to i ≤ k/2 (equivalently, 2i ≤ k) because when 2i > k, the binomial coefficient C(n, k-2i) should be 0 (as k-2i would be negative). Using ℕ subtraction directly would incorrectly give C(n, 0) = 1 for those terms. Label: prop.binom.nCk-2i-qedmo.CN
Consistency with Integer Powers #
Our definition of f^c agrees with the standard definition when c is a natural number.
For natural number exponents, fpsPow agrees with the standard power. This shows our definition is consistent with integer powers. Label: (consistency claim after def.fps.power-c)
For integer exponents, fpsPow agrees with the standard power (when f is invertible). For negative integers, this requires f to be invertible (which holds when constantCoeff f ≠ 0). Label: (consistency claim after def.fps.power-c)
The Proof Method: Polynomial Identity Trick #
The proof of the generalized Newton formula uses the "polynomial identity trick": If two polynomials (with rational coefficients) agree on all natural numbers, they must be equal as polynomials, and hence agree on all values in any ℚ-algebra.
This is formalized in Mathlib as polynomial equality from infinitely many roots.
The polynomial identity trick: If a polynomial has infinitely many roots, it is zero. This is the key lemma used in the proof of the generalized Newton formula.
Note: This requires CharZero R to ensure that the natural numbers are distinct when
coerced to R. Without this assumption, the theorem is false: for example, in ZMod 2,
the polynomial x(x-1) evaluates to 0 at all natural numbers but is nonzero.
Label: (polynomial identity trick in proof of thm.fps.gen-newton)