AFTD Auto-Formalizing Theoretical Domains

topCoefficient

def

For an implicit natural number n and a Boolean-valued function f : (Fin n → Bool) → Bool, topCoefficient f is the integer defined by the sum over all x : Fin n → Bool of: if f x is true then ∏ i : Fin n, (if x i then (1 : ℤ) else -1), else 0.

Statement

def topCoefficient {n : ℕ} (f : (Fin n → Bool) → Bool) : ℤ
Defined in
arXiv:2610.19174, Section 2.3 eq (3) and Listing A.13
Verified
21 Oct 2026
Axioms
none listed
Used by 5
  • explicitApproximant_mem_degreeSpaceFor any Boolean function f : (Fin n → Bool) → Bool on n > 0 variables, the explicit approximant P_f belongs to degreeSpace (K := ℝ) (Fin…
  • explicitApproximant_torusDistanceFor any Boolean function f : (Fin n → Bool) → Bool on n > 0 variables and any x : Fin n → Bool, torusDistance (explicitApproximant f x -…
  • explicitApproximantFor a Boolean function f : (Fin n → Bool) → Bool and input x : Fin n → Bool, explicitApproximant f x is (if f x then 1 else 0)/2 -…
  • ndeg_le_nFor any natural number n and any Boolean function f : (Fin n → Bool) → Bool, the non-deterministic degree of f is at most n.
  • explicitApproximant_permFor any Boolean function f : (Fin n → Bool) → Bool on n variables, any permutation e : Equiv.Perm (Fin n), if f (x ∘ e) = f x for all x…

Read back from the Lean

Given a natural number n and a Boolean function f : (Fin n → Bool) → Bool, topCoefficient f is defined to be the integer given by the sum over all functions x : Fin n → Bool of: if f x is true, the product over all i : Fin n of (1 if x i is true, and -1 otherwise); and 0 otherwise.

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 full-cube multilinear coefficient c_f of a Boolean function f. -/
def topCoefficient {n : ℕ} (f : (Fin n → Bool) → Bool) : ℤ := ∑ x : Fin n → Bool, (if f x then (∏ i : Fin n, (if x i then (1 : ℤ) else -1)) else 0)
See it in the graphDiscuss this resultChallenge it