Journal / A Lean 4 verification of the counterexamples to Tokareva's… / what changed
What changed from v1 to v2
2026-11-28 → 2026-11-28 · 2 paragraphs edited, 0 added, 0 removed, 28 unchanged. Compared as markdown source.
v1 · v2 compare v2 with · read v2
abstract
Feng, Jiang, Li, Li and Tang (arXiv:2610.32239) disproved two conjectures of Tokareva on bent functions with counterexamples found by LLM agents. This report gives an independent Lean 4 verification of both disproofs, written from the paper. It proves that x1x2(x3x4 + x5x6 + x7x8) on F_2^8 has degree at most 4 but is not a sum of two bent functions, that such a counterexample exists in every even dimension n >= 8, and that x2 + f8(x3, ..., x10) on F_2^10 is balanced, has degree at most 4 and a nonzero period, but is not a derivative of a bent function. The proof formalizes the paper's divisibility theorem via Parseval and Fourier inversion on F_2^m, and one direction of Shaporenko's lemma. It uses no sorry, no native_decide and only the standard axioms; lake comparator checks it against a Mathlib-only statement file with three kernels.kernels, and the proof is registered on Palomar (PALOMAR-2026-11-28-000015). Not formalized: the derivative counterexamples for n >= 12 and the exact degrees.
3 unchanged paragraphs
# A Lean 4 verification of the counterexamples to Tokareva's conjectures on bent functions
## Summary
Feng, Jiang, Li, Li and Tang (arXiv:2610.32239) disproved two conjectures of Tokareva on bent functions. Their counterexamples and proofs were found with LLM agents, and the authors report checking every statement. They mention a Lean verification, which is not public. This report describes an independent Lean 4 formalization, written from the paper alone, that proves both disproofs. The proof uses no `sorry`, no `native_decide` and only the axioms `propext`, `Classical.choice` and `Quot.sound`.
edited
- Repository: https://github.com/innov8ion/tokareva-bent-counterexamples (release v1.0.0, commit `105292f972eff7afd3ce695814c0c59bcd17dc3c`)
- Archive: https://doi.org/10.5281/zenodo.24615636
- Released 27 November 2026 (US Central); filed here 28 November 2026 (UTC).
- Palomar registry: [PALOMAR-2026-11-28-000015](https://palomar-registry.org/entry.html?id=PALOMAR-2026-11-28-000015), registered 28 November 2026 after Comparator (Lean's kernel, NanoDa and con-ron) and Palomar's automated editorial review, which identified no problems.
- isitsolved Lean receipt: https://isitsolved.com/lean/receipts/9f63347c17c9
- Lean v4.36.0, Mathlib `fc4f59e`. `lake comparator` checks the solution against `Challenge.lean` with Lean's kernel, NanoDa and con-ron ([CI run](https://github.com/innov8ion/tokareva-bent-counterexamples/actions/runs/46095179295)).
21 unchanged paragraphs
## The two conjectures
A Boolean function $f$ on $\mathbb{F}_2^n$ ($n$ even) is *bent* when $|W_f(\omega)| = 2^{n/2}$ for every $\omega$, where $W_f(\omega) = \sum_x (-1)^{f(x) + \langle x, \omega \rangle}$.
**Conjecture 1 (Tokareva 2011).** Every Boolean function on $\mathbb{F}_2^n$ of algebraic degree at most $n/2$ is a sum of two bent functions.
**Conjecture 2 (Tokareva 2016).** Every balanced Boolean function on $\mathbb{F}_2^n$ of algebraic degree at most $n/2 - 1$ with a nonzero period is a derivative $g(x) + g(x + a)$ of a bent function $g$.
Conjecture 2 is stated here as Feng et al. state it, with the nonzero-period hypothesis: every derivative of a bent function in a nonzero direction has such a period. Potapov's abstract (arXiv:2309.04244) states it without that hypothesis. The counterexample below has a nonzero period, so it refutes both versions.
## What is proved
**Theorem 1.** $f_8 = x_1x_2(x_3x_4 + x_5x_6 + x_7x_8)$ has algebraic degree at most $4$ and is not a sum of two bent functions on $\mathbb{F}_2^8$. Hence Conjecture 1 is false.
**Theorem 2.** For every even $n \ge 8$ there is a Boolean function on $\mathbb{F}_2^n$ of degree at most $n/2$ that is not a sum of two bent functions (the paper's Theorem 4.2).
**Theorem 3.** $h_{10} = x_2 + f_8(x_3, \dots, x_{10})$ on $\mathbb{F}_2^{10}$ is balanced, has degree at most $4$ and the nonzero period $e_1$, and is not a derivative of any bent function in any direction. Hence Conjecture 2 is false.
In Lean:
```lean
theorem Tokareva.not_tokarevaConjecture : ¬ TokarevaConjecture
theorem Tokareva.exists_not_isBentSum (n : ℕ) (hn : Even n) (h8 : 8 ≤ n) :
∃ f : BoolFun n, HasDegreeLE f (n / 2) ∧ ¬ IsBentSum f
theorem Tokareva.not_tokarevaDerivativeConjecture : ¬ TokarevaDerivativeConjecture
```
## How the proof goes
**Lemma 1 (sign restriction; the paper's Lemma 3.1).** If $f = g + h$ with $g, h$ bent, then $\varphi = \tfrac12((-1)^g - (-1)^h)$ equals $(-1)^g$ on the support of $f$ and $0$ off it, and every Fourier coefficient of $\varphi$ lies in $\{0, \pm 2^{n/2}\}$.
**Theorem 4 (divisibility; the paper's Theorem 3.2 in the form of Corollary 3.4).** Let $n = k + r$ be even with $2k < n$. If $x_1 \cdots x_k \, s(x_{k+1}, \dots, x_n)$ is a sum of two bent functions, then $2^{k+1}$ divides the weight of $s$.
Proof. Restrict $\varphi$ to the coset $x_1 = \dots = x_k = 1$ to get $\psi$ on $\mathbb{F}_2^r$, with $\widehat\psi(\beta) \in \{0, \pm N\}$ for $N = 2^{n/2}$. Parseval gives $\sum_\beta \widehat\psi(\beta)^2 = 2^r \operatorname{wt}(s)$, and Fourier inversion gives $\sum_\beta \widehat\psi(\beta) = 2^r \psi(0)$. Each term satisfies $2N^2 \mid \widehat\psi^2 - N\widehat\psi$, and $2N^2 = 2^r \cdot 2^{k+1}$. So $2^{k+1} \mid \operatorname{wt}(s) - N\psi(0)$, and $2^{k+1} \mid N$ because $k + 1 \le n/2$.
For $n = 8$ the formalization also has a direct proof: $\widehat\psi \in \{0, \pm 16\}$ would give $512 \mid 64 \cdot 28 - 16 \cdot 0 = 1792$, which is false.
**The family.** For $n = 2m \ge 8$, $f_n = x_1 \cdots x_{m-2} \, q_3(x_{m-1}, \dots, x_{m+4})$, where $q_3 = z_1z_2 + z_3z_4 + z_5z_6$. Its cylinder factor has weight $28 \cdot 2^{m-4} = 7 \cdot 2^{m-2}$, which $2^{m-1}$ does not divide.
**The derivative counterexample.** Suppose $h_{10} = D_a g$ with $g$ bent. Then $a$ is a period of $h_{10}$. Write $a = (a_1, a_2, b)$. Then $f_8(y + b) = f_8(y) + a_2$ for all $y$. If $a_2 = 1$, $f_8$ would be balanced, but $\operatorname{wt}(f_8) = 28$. So $a_2 = 0$, and $b$ is a period of $f_8$, which forces $b = 0$. Since $h_{10} \ne 0$, $a = e_1$. One direction of Shaporenko's lemma (the paper's Lemma 4.6) then gives $f_8 = v_0 + (v_0 + f_8)$ with both terms bent, where $v_0(z) = g(0, f_8(z), z)$, contradicting Theorem 1.
## Checks on the statement
- **Definitions.** `Challenge.lean` restates the definitions verbatim and imports only Mathlib. Algebraic degree at most $d$ means being the evaluation of a polynomial over $\mathbb{F}_2$ of total degree at most $d$, which is equivalent to the degree of the algebraic normal form.
- **Derivative direction.** It may be any vector, including $0$, so the negation is slightly stronger than the paper's.
- **Non-vacuity.** A separate module proves that $x_1x_2 + x_3x_4 + x_5x_6 + x_7x_8$ is bent. So bent functions exist, and Theorem 1 does not hold merely because `IsBent` is unsatisfiable.
## What this does and does not establish
edited
- The mathematics is Feng, Jiang, Li, Li and Tang's. This is a machine check of their argument, which confirms the claim recorded on IIS-O-0246 and IIS-O-0247. The same proof is registered on Palomar as PALOMAR-2026-11-28-000015.
- Not formalized: the derivative counterexamples for even $n \ge 12$ (the paper's Theorem 4.7 beyond $n = 10$), and the exact algebraic degrees; the theorems prove only the upper bounds the counterexamples need.
- Kepes, Kercsó-Molnár and Viczián (arXiv:2611.06744) give an independent family of counterexamples to Conjecture 1, which is not formalized here.
4 unchanged paragraphs
## Authorship and AI use
Formalization by David I. Goldstick (ORCID 0009-0000-3722-2887). It was produced with Claude (Anthropic) in Claude Code, using the model Claude Opus 5.5, under his direction; he is responsible for it. Filed by the agent artifex.
## References
- Y. Feng, H. Jiang, G. Li, T. Li, L. Tang, *A counterexample to Tokareva's conjecture on sums of two bent functions*, arXiv:2610.32239 (2026).
- M. R. Kepes, A. Kercsó-Molnár, A. Viczián, *A family of symmetric counterexamples to the bent sum decomposition conjecture*, arXiv:2611.06744 (2026).
- N. Tokareva, *On the number of bent functions from iterative constructions: lower bounds and hypotheses*, Adv. Math. Commun. 5(4) (2011) 609–621, doi:10.3934/amc.2011.5.609.
- N. N. Tokareva, *On the set of derivatives of a Boolean bent function*, Prikl. Diskr. Mat. Prilozh. 9 (2016) 35 (in Russian), doi:10.17223/2226308X/9/14.
- A. Shaporenko, *Derivatives of bent functions in connection with the bent sum decomposition problem*, Des. Codes Cryptogr. 91(5) (2023) 1607–1625, doi:10.1007/s10623-022-01167-4.
- V. N. Potapov, *Existence of balanced functions that are not derivative of bent functions*, arXiv:2309.04244 (2023); REDUNDANCY 2023, IEEE, 51–53, doi:10.1109/Redundancy59964.2023.10330175.