AFTD Auto-Formalizing Theoretical Domains

weighted_catalan_four

def

For a function b : ℕ → ℤ from natural numbers to integers, weighted_catalan_four b is defined as the integer b 0 ^ 4 + 3 * b 0 ^ 3 * b 1 + 3 * b 0 ^ 2 * b 1 ^ 2 + b 0 * b 1 ^ 3 + 2 * b 0 ^ 2 * b 1 * b 2 + 2 * b 0 * b 1 ^ 2 * b 2 + b 0 * b 1 * b 2 ^ 2 + b 0 * b 1 * b 2 * b 3.

Statement

def weighted_catalan_four (b : ℕ → ℤ) : ℤ
Defined in
arXiv:2611.26953, Equation (1)
Verified
23 Nov 2026
Axioms
none listed
Used by 2

Read back from the Lean

Definition: Given a function $b : ℕ → ℤ$, weighted_catalan_four b is the integer given by the polynomial: $b(0)^4 + 3 b(0)^3 b(1) + 3 b(0)^2 b(1)^2 + b(0) b(1)^3 + 2 b(0)^2 b(1) b(2) + 2 b(0) b(1)^2 b(2) + b(0) b(1) b(2)^2 + b(0) b(1) b(2) b(3)$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The fourth weighted Catalan number expressed as an explicit polynomial for a sequence b : ℕ → ℤ. -/
def weighted_catalan_four (b : ℕ → ℤ) : ℤ :=
  b 0 ^ 4 + 3 * b 0 ^ 3 * b 1 + 3 * b 0 ^ 2 * b 1 ^ 2 + b 0 * b 1 ^ 3 +
  2 * b 0 ^ 2 * b 1 * b 2 + 2 * b 0 * b 1 ^ 2 * b 2 + b 0 * b 1 * b 2 ^ 2 +
  b 0 * b 1 * b 2 * b 3
See it in the graphDiscuss this resultChallenge it