Documentation

AlgebraicCombinatorics.FPS.LaurentSeries

Laurent Power Series #

This file formalizes properties of Laurent polynomials and Laurent power series, following Section \ref{sec.details.gf.laure} of the source material.

Overview #

Laurent polynomials are formal sums ∑_{i ∈ ℤ} aᵢ xⁱ where only finitely many coefficients are nonzero. Laurent power series are formal sums where the sequence of negative-indexed coefficients is essentially finite (i.e., only finitely many negative powers appear).

In Mathlib:

Main Results #

Laurent Polynomials (Theorem thm.fps.laure.laupol-ring) #

Laurent Series (Theorem thm.fps.laure.lauser-ring) #

References #

Section: Laurent Polynomials #

A Laurent polynomial over a commutative ring K is a formal sum ∑_{i ∈ ℤ} aᵢ xⁱ where only finitely many coefficients aᵢ are nonzero.

In Mathlib, LaurentPolynomial R is defined as AddMonoidAlgebra R ℤ, i.e., finitely supported functions ℤ →₀ R. The variable is denoted T to distinguish from polynomials.

Definition: Laurent Polynomials (def.fps.laure.laupol) #

This section formalizes Definition \ref{def.fps.laure.laupol} from the source material.

A Laurent polynomial over K is an essentially finite family (aₙ)_{n∈ℤ}, i.e., a function ℤ → K with finite support. The set K[x^±] of all Laurent polynomials forms a K-submodule of the doubly infinite power series K[[x^±]].

Multiplication is defined by convolution: (a · b)n = ∑{i∈ℤ} aᵢ · b_{n-i}

The indeterminate x is defined as x = (δ_{i,1})_{i∈ℤ}, i.e., the sequence with 1 at position 1 and 0 elsewhere.

In Mathlib, Laurent polynomials are represented as LaurentPolynomial K = AddMonoidAlgebra K ℤ, which is exactly ℤ →₀ K (finitely supported functions from ℤ to K). This matches the definition of essentially finite families.

@[reducible, inline]

Definition of Laurent polynomials (Definition def.fps.laure.laupol)

A Laurent polynomial over K is an essentially finite family (aₙ)_{n∈ℤ}, represented in Mathlib as LaurentPolynomial K = AddMonoidAlgebra K ℤ = ℤ →₀ K.

This definition captures the key property: only finitely many coefficients are nonzero.

Equations
Instances For

    Laurent polynomials are essentially finite families: they have finite support.

    The coefficient function of a Laurent polynomial.

    Equations
    Instances For
      theorem AlgebraicCombinatorics.FPS.Laurent.laurentPoly_mul_coeff {K : Type u_1} [CommRing K] (a b : LaurentPoly K) (n : ) :
      (a * b) n = ia.support, a i * b (n - i)

      Multiplication of Laurent polynomials is convolution. (Part of Definition def.fps.laure.laupol)

      The product (a · b)n = ∑{i∈ℤ} aᵢ · b_{n-i}.

      In Mathlib, this is the standard multiplication on AddMonoidAlgebra K ℤ.

      The indeterminate x in Laurent polynomials. (Part of Definition def.fps.laure.laupol)

      The element x = (δ_{i,1})_{i∈ℤ} is the sequence with 1 at position 1 and 0 elsewhere. In Mathlib notation, this is T 1.

      Equations
      Instances For
        @[simp]

        The indeterminate x has coefficient 1 at position 1 and 0 elsewhere.

        @[simp]

        The unity element in Laurent polynomials. (Part of Theorem thm.fps.laure.laupol-ring)

        The unity is 1 = (δ_{i,0})_{i∈ℤ}, i.e., the sequence with 1 at position 0 and 0 elsewhere.

        Laurent polynomials form a K-module. (Part of Definition def.fps.laure.laupol)

        The set K[x^±] is a K-submodule of K[[x^±]]. In Mathlib, this is captured by the Module instance on LaurentPolynomial.

        Equations
        Instances For
          theorem AlgebraicCombinatorics.FPS.Laurent.laurentPoly_smul_coeff {K : Type u_1} [CommRing K] (c : K) (p : LaurentPoly K) (n : ) :
          (c p) n = c * p n

          Scalar multiplication on Laurent polynomials acts coefficientwise. (Part of Definition def.fps.laure.laupol)

          theorem AlgebraicCombinatorics.FPS.Laurent.laurentPoly_add_coeff {K : Type u_1} [CommRing K] (p q : LaurentPoly K) (n : ) :
          (p + q) n = p n + q n

          Addition on Laurent polynomials is coefficientwise. (Part of Definition def.fps.laure.laupol)

          The zero Laurent polynomial has all coefficients zero.

          The support of a Laurent polynomial is finite. (Key property from Definition def.fps.laure.laupol)

          This is the essential finiteness condition: only finitely many coefficients are nonzero.

          The support of a Laurent polynomial is exactly the Finsupp support.

          Construction of Laurent polynomials from finite data.

          Any finitely supported function ℤ → K gives a Laurent polynomial.

          Equations
          Instances For

            The coefficients of a Laurent polynomial constructed from a finsupp are the same.

            Single term Laurent polynomial.

            The Laurent polynomial with a single term a · x^k is represented as Finsupp.single k a.

            Equations
            Instances For

              The coefficient of a single-term Laurent polynomial.

              A single-term Laurent polynomial equals C(a) * T(k).

              theorem AlgebraicCombinatorics.FPS.Laurent.laurentPoly_iff_essentiallyFinite {K : Type u_1} [CommRing K] (f : K) :
              (∃ (p : LaurentPoly K), ∀ (n : ), p n = f n) {n : | f n 0}.Finite

              Laurent polynomials are the essentially finite families.

              This theorem explicitly states that Laurent polynomials (as ℤ →₀ K) are exactly the essentially finite families (aₙ)_{n∈ℤ}, formalizing Definition def.fps.laure.laupol.

              Laurent polynomials form a commutative K-algebra. (Theorem thm.fps.laure.laupol-ring, label: thm.fps.laure.laupol-ring)

              This is the key structural result: K[T;T⁻¹] is a commutative ring with T invertible.

              Equations
              Instances For

                The variable T in Laurent polynomials is a unit (invertible). (Part of Theorem thm.fps.laure.laupol-ring)

                The inverse of T is T⁻¹ = T(-1). (Part of Theorem thm.fps.laure.laupol-ring)

                T(-1) * T = 1. (Part of Theorem thm.fps.laure.laupol-ring)

                Section: Multiplication by T shifts coefficients #

                This section proves the analogue of Lemma lem.fps.xa for Laurent polynomials: multiplication by T shifts coefficients by 1.

                Multiplication by T shifts coefficients down by 1. (Lemma lem.fps.laure.xa, label: lem.fps.laure.xa)

                If a = (aₙ)_{n∈ℤ} is a Laurent polynomial, then T · a = (aₙ₋₁)_{n∈ℤ}. In other words, the coefficient at position n in T * a equals the coefficient at position n - 1 in a.

                Multiplication by T⁻¹ shifts coefficients up by 1. (Lemma lem.fps.laure.xa, label: lem.fps.laure.xa)

                If a = (aₙ)_{n∈ℤ} is a Laurent polynomial, then T⁻¹ · a = (aₙ₊₁)_{n∈ℤ}. In other words, the coefficient at position n in T(-1) * a equals the coefficient at position n + 1 in a.

                Multiplication on the right by T also shifts coefficients.

                Multiplication on the right by T⁻¹ also shifts coefficients.

                Section: Powers of T #

                This section proves that Tᵏ = (δᵢ,ₖ)_{i∈ℤ} for all k ∈ ℤ, the analogue of Proposition prop.fps.xk for Laurent polynomials.

                The k-th power of T is the unit sequence at k. (Proposition prop.fps.laure.xk, label: prop.fps.laure.xk)

                For each k ∈ ℤ, the Laurent polynomial T(k) has coefficient 1 at position k and 0 everywhere else.

                T(k) is the Kronecker delta at k, restated.

                The product T(m) * T(n) = T(m + n) follows from the group structure.

                For natural number powers, (T 1)^n = T n. (Part of Proposition prop.fps.laure.xk)

                The k-th power of x equals T(k) for all integers k. (Proposition prop.fps.laure.xk, label: prop.fps.laure.xk)

                This is the key result showing that x^k = (δᵢ,ₖ)_{i∈ℤ} for all k ∈ ℤ. Since T 1 represents x and T k represents the Kronecker delta at k, this theorem shows that integer powers of x give the expected sequences.

                For natural number powers, this follows from T_pow. For negative powers, we use the fact that T 1 is a unit with inverse T (-1).

                theorem AlgebraicCombinatorics.FPS.Laurent.T_one_zpow_coeff {K : Type u_1} [CommRing K] (k i : ) :
                ↑(.unit ^ k) i = if i = k then 1 else 0

                Corollary: The coefficient of x^k at position i is δᵢ,ₖ. (Proposition prop.fps.laure.xk, restated in terms of coefficients)

                Section: Representation as sums #

                Every Laurent polynomial can be written as a finite sum ∑ aᵢ Tⁱ.

                Every Laurent polynomial is a sum of monomials.

                Any Laurent polynomial a can be written as ∑_{i ∈ support(a)} aᵢ · Tⁱ.

                Alternative form: every Laurent polynomial is a sum over its support.

                Section: Laurent Series #

                Laurent series are formal power series with finitely many negative exponents. In Mathlib, they are implemented as HahnSeries ℤ R, which are functions ℤ → R with well-founded support.

                The key result (Theorem thm.fps.laure.lauser-ring) is that Laurent series form a commutative K-algebra, and in particular that the product of two Laurent series is again a Laurent series.

                Laurent series form a commutative K-algebra. (Theorem thm.fps.laure.lauser-ring, label: thm.fps.laure.lauser-ring)

                This is the key structural result for Laurent series.

                Equations
                Instances For

                  The variable X in Laurent series (as single 1 1) is a unit.

                  A summable family of single Hahn series indexed by the support of a given Laurent series. This is used to express a Laurent series as an infinite sum of monomials.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    Every Laurent series is a sum of monomials. (Proposition prop.fps.laure.a=sumaixi, label: prop.fps.laure.a=sumaixi)

                    Any Laurent series a can be written as ∑_{i ∈ ℤ} aᵢ · xⁱ where the sum is taken over the support of a. This is the infinite sum version of eq_sum_T for Laurent polynomials.

                    In Mathlib notation, we express this using SummableFamily.hsum, which represents a formal infinite sum of Hahn series.

                    The coefficient version of laurentSeries_eq_hsum_single: the n-th coefficient of a Laurent series equals the finsum of the n-th coefficients of the single monomials.

                    Section: Closure of Laurent Series under Multiplication #

                    The main technical content of Theorem thm.fps.laure.lauser-ring is showing that the product of two Laurent series is again a Laurent series. This requires showing that if (a_{-1}, a_{-2}, ...) and (b_{-1}, b_{-2}, ...) are essentially finite, then so is the corresponding sequence for the product.

                    The order of a nonzero Laurent series is the smallest index with nonzero coefficient.

                    Equations
                    Instances For

                      If f and g are nonzero Laurent series with orders p and q respectively, then f * g has order at least p + q.

                      This is the key lemma showing closure under multiplication. (Part of proof of Theorem thm.fps.laure.lauser-ring)

                      theorem AlgebraicCombinatorics.FPS.Laurent.coeff_mul_eq_zero_of_lt_order {K : Type u_1} [CommRing K] (f g : LaurentSeries K) (n : ) (hn : n < HahnSeries.order f + HahnSeries.order g) (hf : f 0) (hg : g 0) :
                      (f * g).coeff n = 0

                      The product of two Laurent series has coefficients zero below the sum of their orders.

                      This formalizes the key step in the proof: if aᵢ = 0 for i < p and bⱼ = 0 for j < q, then cₙ = 0 for n < p + q. (Part of proof of Theorem thm.fps.laure.lauser-ring)

                      Section: Embedding of Power Series into Laurent Series #

                      Power series embed into Laurent series via the natural map that sends ∑_{n≥0} aₙ xⁿ to the same series viewed as a Laurent series with zero coefficients for negative indices.

                      Power series embed into Laurent series. (Implicit in the source material)

                      Equations
                      Instances For

                        Coefficients are preserved for non-negative indices.

                        Section: Embedding of Laurent Polynomials into Laurent Series #

                        Laurent polynomials embed into Laurent series.

                        A Laurent polynomial can be viewed as a Laurent series.

                        This is the inclusion K[T;T⁻¹] → K⸨X⸩.

                        Equations
                        Instances For

                          The embedding preserves coefficients.

                          Section: Binary Representation Uniqueness #

                          This section proves that every natural number has a unique binary representation, which is Theorem thm.fps.laure.binary-rep-uniq in the source material.

                          A binary representation of n ∈ ℕ is an essentially finite sequence (bᵢ)_{i ∈ ℕ} with bᵢ ∈ {0, 1} such that n = ∑_{i ∈ ℕ} bᵢ · 2^i.

                          In Mathlib, this is captured by the equivalence Finset.equivBitIndices : ℕ ≃ Finset, where a finset s ⊆ ℕ represents the binary sequence with bᵢ = 1 iff i ∈ s.

                          Binary Representation Definition.

                          A binary representation of n is a finset s ⊆ ℕ such that n = ∑_{i ∈ s} 2^i. This is equivalent to specifying which bits are 1 in the binary expansion.

                          The essentially finite sequence (bᵢ)_{i ∈ ℕ} from the textbook corresponds to bᵢ = 1 if i ∈ s, and bᵢ = 0 otherwise.

                          Equations
                          Instances For

                            Every natural number has a binary representation. (Existence part of Theorem thm.fps.laure.binary-rep-uniq)

                            The binary representation is unique. (Uniqueness part of Theorem thm.fps.laure.binary-rep-uniq)

                            Unique Binary Representation Theorem. (Theorem thm.fps.laure.binary-rep-uniq, label: thm.fps.laure.binary-rep-uniq)

                            Each natural number n has a unique binary representation. More precisely, there exists a unique finset s ⊆ ℕ such that n = ∑_{i ∈ s} 2^i.

                            This is a fundamental result that motivates the study of Laurent series: when trying to prove the analogous result for balanced ternary representations (where coefficients can be -1, 0, or 1), we need to work with negative powers of the base, which leads naturally to Laurent series.

                            The canonical binary representation of n is n.bitIndices.toFinset.

                            Equations
                            Instances For

                              The canonical binary representation satisfies the defining property.

                              The canonical binary representation is the unique one.

                              Bijection between ℕ and Finset ℕ via binary representation.

                              This equivalence maps n to its binary representation (as a finset of indices where the binary digit is 1), and conversely maps a finset s to ∑_{i ∈ s} 2^i.

                              This is the formalization of the bijection implicit in Theorem thm.fps.laure.binary-rep-uniq.

                              Equations
                              Instances For

                                The equivalence sends n to its canonical binary representation.

                                The inverse of the equivalence computes the sum ∑_{i ∈ s} 2^i.

                                Round-trip: converting to binary representation and back gives the original number.

                                Round-trip: converting from binary representation and back gives the original finset.

                                Section: Balanced Ternary Representation Uniqueness #

                                This section proves Theorem thm.fps.laure.balanced-tern-rep-uniq: Every integer has a unique balanced ternary representation.

                                A balanced ternary representation of an integer n is an essentially finite sequence (b_i)_{i∈ℕ} with b_i ∈ {-1, 0, 1} such that n = ∑_{i∈ℕ} b_i · 3^i.

                                The proof uses Laurent polynomials and the key identity: ∏_{i=0}^{k} (1 + x^{3^i} + x^{-3^i}) = ∑_{|n| ≤ M_k} x^n where M_k = 3^0 + 3^1 + ... + 3^k = (3^{k+1} - 1) / 2.

                                Comparing coefficients shows that each integer in [-M_k, M_k] has exactly one k-bounded balanced ternary representation. Taking k → ∞ gives the full result.

                                The set of balanced ternary digits {-1, 0, 1}.

                                Equations
                                Instances For

                                  Balanced Ternary Representation Definition. (Definition def.fps.laure.balanced-tern, label: def.fps.laure.balanced-tern)

                                  A balanced ternary representation of an integer n is a finitely supported function f : ℕ → ℤ with values in {-1, 0, 1} such that n = ∑_i f(i) · 3^i.

                                  Unlike binary representations (where digits are 0 or 1), balanced ternary allows digits to be -1, 0, or 1. This enables direct representation of negative integers without a separate sign.

                                  Instances For

                                    The value of a finitely supported balanced ternary representation.

                                    Equations
                                    Instances For

                                      A k-bounded balanced ternary representation is a function f : Fin (k+1) → {-1, 0, 1}.

                                      These are representations where f(i) = 0 for all i > k.

                                      Equations
                                      Instances For

                                        The value of a k-bounded balanced ternary representation.

                                        Equations
                                        Instances For

                                          The number of k-bounded balanced ternary representations is 3^{k+1}.

                                          The maximum absolute value representable with k+1 balanced ternary digits: M_k = 3^0 + 3^1 + ... + 3^k = (3^{k+1} - 1) / 2

                                          Equations
                                          Instances For

                                            Key identity: 2 * M_k + 1 = 3^{k+1}.

                                            The set of integers from -M to M.

                                            Equations
                                            Instances For

                                              The cardinality of Icc (-M) M is 2M + 1.

                                              Cardinality of Icc_symm (maxBT k) equals 3^{k+1}.

                                              theorem AlgebraicCombinatorics.FPS.Laurent.sum_pow_three_Fin_eq_range (k : ) :
                                              i : Fin (k + 1), 3 ^ i = iFinset.range (k + 1), 3 ^ i

                                              Helper for the bounds: sum of 3^i over Fin (k+1) equals sum over range (k+1).

                                              The value of any k-bounded representation is in [-M_k, M_k].

                                              kBoundedBTValue is injective on kBoundedBTReps.

                                              Each integer in [-M_k, M_k] has a unique k-bounded balanced ternary representation.

                                              This is the finite version of the balanced ternary uniqueness theorem.

                                              The proof uses a cardinality argument:

                                              (Part of Theorem thm.fps.laure.balanced-tern-rep-uniq)

                                              Helper to convert a k-bounded representation to a Finsupp.

                                              Equations
                                              Instances For
                                                theorem AlgebraicCombinatorics.FPS.Laurent.kBoundedToFinsupp_apply (k : ) (f : Fin (k + 1)) (i : ) (hi : i < k + 1) :
                                                (kBoundedToFinsupp k f) i = f i, hi

                                                The sum over kBoundedToFinsupp equals kBoundedBTValue.

                                                Every integer has a balanced ternary representation. (Existence part of Theorem thm.fps.laure.balanced-tern-rep-uniq)

                                                For any integer n, we can find k large enough that |n| ≤ M_k, then use the k-bounded existence result.

                                                Key lemma: 2 * ∑_{i<k} 3^i < 3^k.

                                                theorem AlgebraicCombinatorics.FPS.Laurent.sum_eq_sum_support' (f : →₀ ) (s : Finset ) (hs : f.support s) :
                                                is, f i * 3 ^ i = if.support, f i * 3 ^ i

                                                The sum over a superset equals the sum over the support (for finitely supported functions).

                                                If a, b ∈ {-1, 0, 1} and a ≠ b, then |a - b| ≥ 1.

                                                If a, b ∈ {-1, 0, 1}, then |a - b| ≤ 2.

                                                theorem AlgebraicCombinatorics.FPS.Laurent.btDigits_sum_unique (f g : →₀ ) (hf : ∀ (i : ), f i btDigits) (hg : ∀ (i : ), g i btDigits) (hsum : if.support, f i * 3 ^ i = ig.support, g i * 3 ^ i) :
                                                f = g

                                                Two finitely supported functions with values in btDigits and the same weighted sum are equal.

                                                The balanced ternary representation is unique. (Uniqueness part of Theorem thm.fps.laure.balanced-tern-rep-uniq)

                                                If two balanced ternary representations have the same value, they must be equal.

                                                Unique Balanced Ternary Representation Theorem. (Theorem thm.fps.laure.balanced-tern-rep-uniq, label: thm.fps.laure.balanced-tern-rep-uniq)

                                                Each integer n has a unique balanced ternary representation. More precisely, there exists a unique finitely supported function f : ℕ → ℤ with values in {-1, 0, 1} such that n = ∑_{i ∈ support(f)} f(i) · 3^i.

                                                This theorem generalizes the binary representation uniqueness to allow negative digits, which enables representing negative integers directly (without a separate sign).

                                                The proof uses Laurent polynomials and the key identity: ∏_{i=0}^{k} (1 + x^{3^i} + x^{-3^i}) = ∑_{|n| ≤ M_k} x^n where M_k = 3^0 + 3^1 + ... + 3^k = (3^{k+1} - 1) / 2.

                                                Comparing coefficients shows that each integer in [-M_k, M_k] has exactly one k-bounded balanced ternary representation. Taking k → ∞ gives the full result.

                                                Historical note: Balanced ternary representations were used in the Soviet Setun computer (1960s/70s). The uniqueness theorem goes back to Fibonacci.

                                                Section: Equivalence with Alternative Balanced Ternary Representation #

                                                This section establishes the equivalence between the BalancedTernaryRep structure defined in this file (using ℕ →₀ ℤ with btDigits constraint) and the AlgebraicCombinatorics.BalancedTernaryRepresentation structure defined in LaurentSeries.lean (using an inductive BalancedTernaryDigit type).

                                                Both representations capture the same mathematical concept: balanced ternary representations of integers. The equivalence theorems below show that:

                                                1. Any BalancedTernaryRepresentation can be converted to a BalancedTernaryRep
                                                2. Any BalancedTernaryRep can be converted to a BalancedTernaryRepresentation
                                                3. These conversions are inverses of each other (up to the digit representation)

                                                This provides a bridge between the two equivalent formulations.

                                                Convert an integer in btDigits to a BalancedTernaryDigit.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For

                                                  Convert a BTRep (inductive style from LaurentSeries.lean) to a BalancedTernaryRep (Finsupp style).

                                                  Equations
                                                  Instances For

                                                    Convert a BalancedTernaryRep (Finsupp style) to a BTRep (inductive style from LaurentSeries.lean).

                                                    Equations
                                                    Instances For

                                                      Round-trip equivalence: Converting from the inductive representation to Finsupp and back gives the same digits (as BalancedTernaryDigit values).

                                                      Round-trip equivalence: Converting from Finsupp representation to inductive and back gives the same digits (as integer values in the Finsupp).

                                                      The two balanced ternary representations are semantically equivalent: they both represent the same integer.

                                                      Type equivalence between the two balanced ternary representations. This shows the types BalancedTernaryRep n and AlgebraicCombinatorics.BalancedTernaryRepresentation n are equivalent (bijective correspondence).

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For