Multiple zeta values, stuffle and shuffle products
DefinitionGT_multizetaThis file defines multiple zeta values and the two products that relate them.
For a word of positive integers with ,
The definition is by an iterated sum: an auxiliary function computes the tail sum over for a bound , and the outer sum ranges over . A word is admissible when all its letters are at least and its first letter (if any) is at least ; exactly then does the series converge.
The stuffle (quasi-shuffle) product is defined recursively on words of positive integers by
and the shuffle product recursively on binary words in the letters by
Both products are recorded as multisets of words, which is exactly the multiplicity information needed for the corresponding relations among multiple zeta values. The passage between the two alphabets is the standard encoding and its inverse, which cuts a binary word into blocks ending in ; the zeta value of a binary word is the zeta value of the word of block lengths.
Formalization Note. Multiple zeta values are real numbers defined through Mathlib's tsum, which returns for a non-summable family; for non-admissible words the definition therefore returns a junk value, and every statement about these numbers carries an admissibility hypothesis. Binary words use false for the letter and true for the letter . A binary word that does not end in has its trailing zeros discarded by the decoding map.
import Mathlib
/-!
# Multiple zeta values, the stuffle product and the shuffle product
Willwacher, *The Grothendieck-Teichmüller Group* (ETH lecture notes, 27 Feb 2014),
Section 6.1, p. 53.
-/
namespace GrothendieckTeichmuller
noncomputable section
/-- Auxiliary tail sum: `mzvTail [n₂, …, n_k] m` is the sum of `∏ⱼ jⱼ^{-nⱼ}` over
`m > j₂ > ⋯ > j_k ≥ 1`. -/
def mzvTail : List ℕ → ℕ → ℝ
| [], _ => 1
| k :: ns, m => ∑' j : ℕ, if 1 ≤ j ∧ j < m then ((j : ℝ) ^ k)⁻¹ * mzvTail ns j else 0
/-- The multiple zeta value
`ζ(n₁, …, n_k) = ∑_{j₁ > j₂ > ⋯ > j_k ≥ 1} 1 / (j₁^{n₁} ⋯ j_k^{n_k})`,
with `ζ() = 1` for the empty word. For non-admissible words the defining series diverges and
this definition returns the junk value `0` coming from Mathlib's convention for `tsum`. -/
def mzv : List ℕ → ℝ
| [] => 1
| k :: ns => ∑' j : ℕ, if 1 ≤ j then ((j : ℝ) ^ k)⁻¹ * mzvTail ns j else 0
/-- A word `n₁ ⋯ n_k` of positive integers is admissible if it is empty or `n₁ ≥ 2`; all its
letters are required to be at least `1`. Exactly for admissible words the series defining
`ζ(n₁, …, n_k)` converges. -/
def IsAdmissible (u : List ℕ) : Prop :=
(∀ k ∈ u, 1 ≤ k) ∧ ∀ k ∈ u.head?, 2 ≤ k
/-- The stuffle (quasi-shuffle) product of two words of positive integers, as a multiset of
words:
`n w ⧢ n' w' = n (w ⧢ n' w') + n' (n w ⧢ w') + (n + n') (w ⧢ w')`. -/
def stuffle : List ℕ → List ℕ → Multiset (List ℕ)
| [], w => {w}
| w, [] => {w}
| a :: v, b :: w =>
(stuffle v (b :: w)).map (fun z => a :: z) +
(stuffle (a :: v) w).map (fun z => b :: z) +
(stuffle v w).map (fun z => (a + b) :: z)
termination_by v w => v.length + w.length
/-- The shuffle product of two binary words (letters `false = 0`, `true = 1`), as a multiset of
words: `α w ∗ α' w' = α (w ∗ α' w') + α' (α w ∗ w')`. -/
def shuffleBin : List Bool → List Bool → Multiset (List Bool)
| [], w => {w}
| w, [] => {w}
| a :: v, b :: w =>
(shuffleBin v (b :: w)).map (fun z => a :: z) +
(shuffleBin (a :: v) w).map (fun z => b :: z)
termination_by v w => v.length + w.length
/-- The binary encoding of a word of positive integers:
`n₁ ⋯ n_k ↦ 0^{n₁-1} 1 ⋯ 0^{n_k-1} 1`. -/
def compToBin : List ℕ → List Bool
| [] => []
| k :: ns => List.replicate (k - 1) false ++ true :: compToBin ns
/-- The inverse encoding: a binary word is cut into blocks each ending with `1`, and each block
`0^{m-1} 1` contributes the letter `m`. Trailing `0`s (i.e. words not ending in `1`) are
discarded. -/
def binToComp : List Bool → List ℕ
| [] => []
| true :: w => 1 :: binToComp w
| false :: w =>
match binToComp w with
| [] => []
| k :: ns => (k + 1) :: ns
/-- The multiple zeta value attached to a binary word, `ζ(0^{n₁-1} 1 ⋯ 0^{n_k-1} 1)
= ζ(n₁, …, n_k)`. -/
def mzvBin (w : List Bool) : ℝ := mzv (binToComp w)
end
end GrothendieckTeichmuller
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic)
Disclosure — non-blind read-back. This read-back was written by the same agent that drafted the Lean statements in this proposal, at the explicit instruction of the proposal owner. It is not independent, blind testimony: its author already knew what the code was intended to say, so it cannot be relied on to expose an unfaithful formalization the way a blind auditor's read-back could. Please weigh it accordingly, and treat it as a reading aid rather than as an audit.
All the objects below are definitions; the bundle asserts nothing.
Iterated sums. For a list of natural numbers and a natural number , a function is defined by recursion on the list: , and
the sum being an unconditional infinite sum of real numbers in Mathlib's sense, which evaluates to when the family is not summable. Here means the inverse of the real number , so the term with would be , excluded by the condition .
Then of a list is defined by and
Unwinding, for a list this is the sum of over strictly decreasing tuples , whenever that family is summable, and otherwise; note the value is the junk value in the divergent cases, and that no convergence hypothesis is built into the definition.
Admissibility. A list of natural numbers is called admissible when both: every letter of is ; and every element of the (optional) head of is - that is, if is non-empty then its first letter is , while the empty list is admissible.
Stuffle. A function taking two lists of natural numbers to a multiset of lists is defined by: ; ; and
where means prepending the letter to every word of the multiset and is multiset union with multiplicities. Recursion terminates on the sum of the lengths.
Shuffle. Similarly for lists of booleans: , , and
Encodings. The map from lists of natural numbers to binary words sends to and to followed by the encoding of ; here is truncated subtraction, so a letter contributes the single letter . The map back sends to , sends to followed by the decoding of , and sends to the decoding of with its first letter increased by - and to the empty list if the decoding of is empty, which is how trailing letters are discarded.
Finally, the zeta value of a binary word is defined as of its decoding.
Confirmed by the mission captain (proposal self-audit).