Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Formalized on 26 Nov 2026]

Title:Largest cap set in F38\mathbb{F}_3^8

Source:Record races · doi.org/10.1038/s41586-023-06924-6
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

Find a set A⊆F38A \subseteq \mathbb{F}_3^8 with no three distinct points on a line (equivalently, no distinct x,y,z∈Ax, y, z \in A with x+y+z=0x + y + z = 0) that is as large as possible. The best known cap has 512 points (FunSearch, Romera-Paredes et al., Nature (2024)); upper bound 771 (computer-assisted, unrefereed). Stated with Mathlib's ThreeAPFree; the equivalence with "no three collinear points" is proved in the challenge's tests.

Subjects:Combinatorics (math.CO)
Tags:challenge, cap set, additive combinatorics
Cite as:NS.09243 [math.CO] · NS.09243v1 for this version
Declaration:CapSetF3Dim8.correct
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100; accepted critique: up to 100
Statement hash:60e01bd43937b61f9b83376734fbe7df260d2c25381688c7a895af67d477e6fe
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · nosorry record challenges (formalized with AI agents, refereed)

Formal statement

theorem correct : ThreeAPFree ((answerCap : Finset (Fin 8 → ZMod 3)) : Set (Fin 8 → ZMod 3))
Show the full Challenge.lean (50 lines) — definitions included
import Mathlib

/-!
# Large cap sets in `𝔽₃^8` (record challenge, maximize)

A *cap set* in the affine space `𝔽₃ⁿ` is a set of points no three of which are collinear.
In `𝔽₃ⁿ` a line has exactly three points `x, x + d, x + 2d` (`d ≠ 0`), and three distinct points
`x, y, z` are collinear iff `x + y + z = 0`. So a cap set is exactly a set with no non-trivial
3-term arithmetic progression, i.e. Mathlib's `ThreeAPFree` (`a + c = b + b → a = b`).
The equivalence of `ThreeAPFree` with "no three distinct collinear points" (Mathlib's
`Collinear` over the field `ZMod 3`), with "no pairwise distinct `x, y, z` with `x + y + z = 0`"
and with "contains no line `{x, x + d, x + 2 • d}`" is proved in `Tests.lean`
(`threeAPFree_iff_no_collinear`, `threeAPFree_iff_no_distinct_sum_zero`,
`threeAPFree_iff_no_line`).

Task: give a cap set in `𝔽₃^8` that is as large as possible. The score is its cardinality.

The space `𝔽₃^8` is modelled as `Fin 8 → ZMod 3` (the same type as `𝔽₃ 8` in
`FormalConjecturesForMathlib.Data.ZMod.Fp`).

*References:*
- Record (512 points): B. Romera-Paredes, M. Barekatain, A. Novikov, M. Balog, M. P. Kumar,
  E. Dupont, F. J. R. Ruiz, J. S. Ellenberg, P. Wang, O. Fawzi, P. Kohli and A. Fawzi,
  *Mathematical discoveries from program search with large language models*, Nature 625 (2024),
  468–475, doi:10.1038/s41586-023-06924-6 (found by FunSearch; the previous best, 496, is from
  Y. Edel, *Extensions of generalized product caps*, Des. Codes Cryptogr. 31 (2004), 5–14).
- Upper bound `771` (computer-assisted, unrefereed): N. D. Versluis, *On the cap set problem:
  upper bounds on maximal cardinalities of caps in dimensions seven to ten*, Bachelor thesis,
  TU Delft, 2017. The exact maximum is known only for `n ≤ 6` (`112` for `n = 6`:
  A. Potechin, *Maximal caps in AG(6,3)*, Des. Codes Cryptogr. 46 (2008), 243–259).
- Mathlib: `ThreeAPFree`, `Mathlib/Combinatorics/Additive/AP/Three/Defs.lean`.
-/

namespace CapSetF3Dim8

/-- The solver's construction: a finite set of points of `𝔽₃^8` (`Fin 8 → ZMod 3`).
This definition is the hole to fill. -/
def answerCap : Finset (Fin 8 → ZMod 3) := sorry

/-- `answerCap` is a cap set: no three distinct points of it lie on a line, stated with Mathlib's
`ThreeAPFree` (for all `a b c ∈ answerCap`, `a + c = b + b → a = b`). -/
theorem correct : ThreeAPFree ((answerCap : Finset (Fin 8 → ZMod 3)) : Set (Fin 8 → ZMod 3)) :=
  sorry

/-- The score: replace the hole by a natural-number literal `N` and prove `N ≤ |answerCap|`.
Higher is better (best known: 512). -/
theorem metric_bound : (sorry : ℕ) ≤ answerCap.card := sorry

end CapSetF3Dim8

To prove it: keep every definition of Challenge.lean unchanged and prove CapSetF3Dim8.correct with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_correct : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry desk capset-f3-8      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch capset-f3-8
nosorry submit capset-f3-8 nosorry/capset-f3-8/Solution.lean --wait

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.