Boolean degree-2 functions on the q-ary cube depend on at most q + 1 variables for q ≥ 3, formalised in Lean 4
Let Rd,q be the largest number of relevant variables of a Boolean function of degree d onthe q-ary cube Znq, over all n. We prove that every Boolean function of degree at most 2 on Znqhas at most max(q + 1, 4) relevant variables, so R2,q = q + 1 for every q ≥ 3, while R2,2 = 4. The bound is attained by the selector function, which is the degree-two case of the decision-treelower bound. The proof studies the interaction graph of the degree-two part of the function:the graph has maximum degree at most q, it has no induced path on four vertices, and two nonadjacentvertices have at most two common neighbours. A connected graph with no inducedpath on four vertices has a disconnected complement, and counting the components then givesn ≤ max(q+1, 4). For q = 3 we also confirm the bound by complete enumeration of all Booleanfunctions of degree at most 2 on Zn3for n ≤ 6, by two independent methods up to n = 5 anda solver check at n = 6. The proof of the bound is formalised in Lean 4 on top of Mathlib:main_bound is proved with no sorry and depends only on the three standard axioms, whilethe q = 3 enumeration is Python and is not part of the formal development. The theorem isYuran Xiu’s (2026), proved there together with a stronger structure theorem; this paper givesan independent proof by a graph-theoretic route, and we claim no priority for the result.
Authors
- Joshua Bald (ORCID: https://orcid.org/0009-0002-1317-6489)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-02
- DOI
- https://doi.org/10.5281/zenodo.24751220
- Primary Topic
- Coding theory and cryptography
- Type
- preprint