A Lean 4 verification of the counterexamples to Tokareva's conjectures on bent functions
PDF built from iis-2611-00224.tex sha256 2fd98104eaba… by the site's TeX builder, 2026-11-28 13:59 UTC.
Version 2 of 2, filed 2026-11-28. What changed since v1 →
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 F28 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 F210 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 F2m, 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, and the proof is registered on Palomar (PALOMAR-2026-11-28-000015). Not formalized: the derivative counterexamples for n ≥ 12 and the exact degrees.
A bent function is a Boolean function that is as far as possible from every linear one, which makes it useful in cryptography. Tokareva guessed that every low-degree function splits into two bent functions, and that every suitable function is the difference of a bent function and a shifted copy of itself. A recent paper found counterexamples to both guesses with the help of AI; this report checks those counterexamples with a computer proof that a machine verifies line by line.
5 numbered results: 5 that name no Lean theorem, so we cannot tell which the receipt covers.
- Theorem 1no Lean name given
- Theorem 2no Lean name given
- Theorem 3no Lean name given
- Lemma 1sign restriction; the paper's Lemma 3.1no Lean name given
- Theorem 4divisibility; the paper's Theorem 3.2 in the form of Corollary 3.4no Lean name given
Lean marks come from matching the Lean names the paper gives for each result against the receipt. That a Lean statement says what the paper claims is checked by a reviewer, not a machine.
- acceptedbrbrk97 on v2 (this version), 2026-11-30
Accept. I read the report and the Lean definitions in `Tokareva/Defs.lean` at commit 105292f, the commit of the site receipt 9f63347c17c9 (ACCEPTED, t…
Accept. I read the report and the Lean definitions in
Tokareva/Defs.leanat commit 105292f, the commit of the site receipt 9f63347c17c9 (ACCEPTED, the three listed theorems). I re-derived the mathematics by hand and checked every numerical ingredient with my own code.The statements are faithful.
- The definitions are as in the conjectures:
walsh,IsBent(|W| = 2^(n/2)),HasDegreeLE(the evaluation of an MvPolynomial of total degree ≤ d),IsBentSum,IsBalanced,IsPeriodandIsBentDerivative. - In
IsBentDerivativethe direction a may be 0, so the negation is slightly stronger than needed. f8is x₁x₂(x₃x₄ + x₅x₆ + x₇x₈).
The proof is correct. I re-derived it.
- Lemma 1. If f = g + h with g, h bent, then φ = ½((−1)^g − (−1)^h) is (−1)^g on supp f and 0 off it, and φ̂ ∈ {0, ±2^(n/2)}.
- Theorem 4. Since supp f lies in the coset x₁ = ⋯ = x_k = 1, φ̂(α, β) = ±ψ̂(β), so ψ̂ ∈ {0, ±N}. Then ψ̂² − Nψ̂ ≡ 0 (mod 2N²), with Parseval Σψ̂² = 2^r wt(s) and inversion Σψ̂ = 2^r ψ(0). Since 2N² = 2^r·2^(k+1) and k + 1 ≤ n/2, this gives 2^(k+1) | wt(s).
- The family. k = m − 2, and wt(s) = 7·2^(m−2) is not divisible by 2^(m−1).
- The derivative counterexample.
- A direction a must be a period of h₁₀. The case a₂ = 1 would make f₈ balanced, and f₈ has no nonzero period, so a = e₁.
- If D_{e₁}g = h₁₀, summing over x₁ gives W_g(0, a₂, β) = 2·W_{v₀+a₂f₈}(β) with v₀(y) = g(0, f₈(y), y).
- So g bent forces v₀ and v₀ + f₈ to be bent on F₂⁸. This contradicts Theorem 1.
My computation (
tokareva_bent.py, numpy, fast Walsh transform, Möbius transform for the ANF).- f₈. It has weight 28, ANF degree 4 and only the period 0. q₃ is bent of weight 28, and 8 ∤ 28.
- Non-vacuity. x₁x₂ + ⋯ + x₇x₈ is bent on F₂⁸.
- The family. For n = 8, …, 16, f_n has ANF degree n/2. Its cylinder factor has weight 7·2^(m−2), which 2^(m−1) does not divide.
- h₁₀. It is balanced (weight 512), has ANF degree 4 = 10/2 − 1, and its periods are exactly {0, e₁}.
- The Shaporenko identity. It holds exactly for 20 random g with D_{e₁}g = h₁₀.
- Lemma 1. It holds for 50 random pairs of bent functions on F₂⁸ (Maiorana–McFarland with random affine maps).
Not checked.
- The Lean build, beyond the site receipt. I did not open the proof files other than the definitions, and not the comparator CI or the Palomar entry.
- The Feng et al. and Kepes et al. papers themselves.
- The n ≥ 12 derivative counterexamples, which the report does not claim.
- The definitions are as in the conjectures:
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.
- Repository: github.com/innov8ion/tokareva-bent-counterexamples (release v1.0.0, commit
105292f972eff7afd3ce695814c0c59bcd17dc3c) - Archive: 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, 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: isitsolved.com/lean/receipts/9f63347c17c9
- Lean v4.36.0, Mathlib
fc4f59e.lake comparatorchecks the solution againstChallenge.leanwith Lean's kernel, NanoDa and con-ron (CI run).
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. no Lean name given \(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. no Lean name given 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. no Lean name given \(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:
theorem Tokareva.not_tokarevaConjecture : ¬ TokarevaConjecturetheorem Tokareva.exists_not_isBentSum (n : ℕ) (hn : Even n) (h8 : 8 ≤ n) :∃ f : BoolFun n, HasDegreeLE f (n / 2) ∧ ¬ IsBentSum ftheorem Tokareva.not_tokarevaDerivativeConjecture : ¬ TokarevaDerivativeConjecture
How the proof goes
Lemma 1 (sign restriction; the paper's Lemma 3.1). no Lean name given 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). no Lean name given 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.leanrestates 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
IsBentis unsatisfiable.
What this does and does not establish
- 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.
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.
PDFs do not display inside pages on phones. Open the PDF.
The Lean proof builds and checks
Built from the attached project on our node, with no network, then checked:
- Lean v4.36.0 · Mathlib fc4f59e
- 3/3 theorems found
- no sorry
- standard axioms only
- no native_decide
- built in 67 s
- 81 declarations
A bent function is a Boolean function that is as far as possible from every linear one, which makes it useful in cryptography. Tokareva guessed that every low-degree function splits into two bent functions, and that every suitable function is the difference of a bent function and a shifted copy of itself.
Tokarevanot_tokarevaConjecture1 line
¬TokarevaConjectureexists_not_isBentSum1 line
∀ (n : ℕ), Even n → 8 ≤ n → ∃ f, HasDegreeLE f (n / 2) ∧ ¬IsBentSum fnot_tokarevaDerivativeConjecture1 line
¬TokarevaDerivativeConjectureTokareva.TokarevaConjecturePropTokareva/Defs.lean:57
/-- **Tokareva's conjecture.** For even `n`, every Boolean function on `𝔽₂ⁿ` of algebraic degree atmost `n/2` is a sum of two bent functions. -/def TokarevaConjecture : Prop :=∀ n : ℕ, Even n → ∀ f : BoolFun n, HasDegreeLE f (n / 2) → IsBentSum f
Tokareva.HasDegreeLEPropTokareva/Defs.lean:48
/-- `f` has algebraic degree at most `d`: it is the evaluation of a polynomial over `𝔽₂` in thevariables `x₀, …, xₙ₋₁` of total degree at most `d`. -/def HasDegreeLE {n : ℕ} (f : BoolFun n) (d : ℕ) : Prop :=∃ p : MvPolynomial (Fin n) (ZMod 2), p.totalDegree ≤ d ∧ ∀ x, MvPolynomial.eval x p = f x
Tokareva.IsBentSumPropTokareva/Defs.lean:52
/-- `f` is the sum of two bent functions. -/def IsBentSum {n : ℕ} (f : BoolFun n) : Prop :=∃ g h : BoolFun n, IsBent g ∧ IsBent h ∧ f = g + h
Tokareva.TokarevaDerivativeConjecturePropTokareva/Defs.lean:74
/-- **Tokareva's derivative conjecture.** For even `n`, every balanced Boolean function on `𝔽₂ⁿ`of algebraic degree at most `n/2 - 1` with a nonzero period is a derivative of a bent function. -/def TokarevaDerivativeConjecture : Prop :=∀ n : ℕ, Even n → ∀ f : BoolFun n, IsBalanced f → HasDegreeLE f (n / 2 - 1) →(∃ a, a ≠ 0 ∧ IsPeriod f a) → IsBentDerivative f
Not checked by a machine: that these statements say what the paper claims. That part is a reviewer's.
Files
content-addressed: the hash is the address| iis-2611-00224.pdf | 312 kB | sha256 8a2cd2face3b0712… .ots |
References
- Feng, Jiang, Li, Li, Tang: A counterexample to Tokareva's conjecture on sums of two bent functions (arXiv:2610.32239)
- Kepes, Kercsó-Molnár, Viczián: A family of symmetric counterexamples to the bent sum decomposition conjecture (arXiv:2611.06744)
- Potapov: Existence of balanced functions that are not derivative of bent functions (arXiv:2309.04244)
- Shaporenko: Derivatives of bent functions in connection with the bent sum decomposition problem (Des. Codes Cryptogr. 2023)
- Lean 4 formalization: innov8ion/tokareva-bent-counterexamples (GitHub)
- Lean 4 formalization, archived release v1.0.0 (Zenodo, doi:10.5281/zenodo.24615636)
- Palomar registry entry PALOMAR-2026-11-28-000015 (Lean-verified, registered 2026-11-28)