Foundations of quantum mechanics · Computer-assisted proof (AI agent, with Lean-verified checkers)
An AI agent's search proves every Kochen–Specker set in three dimensions has at least 25 vectors
arXiv:2611.35799v1 ↗PDF ↗Submitted 26 November 2026
- Question
- The Kochen–Specker theorem rules out noncontextual hidden variables in dimension three and higher through a finite set of vectors that cannot be coloured consistently. In \(\mathbb R^3\) the smallest known set, due to Conway and Kochen, has 31 vectors. Lower bounds come only from exhaustive computer search: 18 in 2011, 22 in 2016 and 24 in 2023–24, the last from two independent searches of about 12,000 cpu-hours each, whose cost grew more than tenfold per order. Is there a Kochen–Specker set with 24 vectors?
- Result
- No. Every Kochen–Specker set in \(\mathbb R^3\) has at least 25 vectors, so the minimum lies in \([25,31]\). The search pipeline was written by a Claude Code agent (Claude Opus 5.5) under a protocol the authors call SkyLadder, in which the agent must add a measured new technique at each order. It reproduces the published candidate counts for orders 17 to 23 exactly, runs \(2.5\times10^4\) times faster than the previous method at order 23, and settles order 24 in about an hour of cpu time on a laptop. Checkers whose soundness is proved in Lean 4 accept certificates covering 2.2 million basis structures across orders 1 to 24.
The paper in detail
A set of vectors in \(\mathbb R^3\) is a Kochen–Specker set if no 010-colouring exists: an assignment of 0 or 1 to each vector such that no two orthogonal vectors are both 1 and every orthogonal basis in the set contains exactly one 1. A noncontextual hidden-variable model would supply such a colouring for the projectors onto these vectors, so one Kochen–Specker set rules such models out. Finding the smallest set is a search for a graph with no colouring that can also be realized by actual vectors, and the realizability test is real algebraic geometry.
The minimum set's orthogonality graph has strong properties: it is squarefree, since two non-parallel vectors in \(\mathbb R^3\) have only one common orthogonal direction; every vertex has degree at least three and lies in a triangle; and the triangles are exactly the orthogonal bases. Earlier searches built candidate graphs vertex by vertex inside a SAT solver and rediscovered the triangle structure many times. The agent's pipeline instead first enumerates basis structures, the 3-uniform hypergraphs of bases, up to isomorphism with nauty's generator, and then solves one small SAT problem per structure for the remaining edges.
Each SAT problem learns three kinds of constraint: colouring clauses, which block every completion that a found colouring still colours; obstruction clauses from a library of subgraphs already proved non-embeddable by computer algebra; and squarefree constraints added only when violated. Symmetries of the basis structure are broken by lex-leader clauses. At order 24 the search closed 1.75 million structures in 3,623 cpu-seconds and never needed computer algebra.
Certification separates trust in the answer from trust in the agent. The statement NoKSUpTo is 35 lines of Lean on top of Mathlib. Lean proves the reduction from vectors to basis structures and the soundness of three checkers: one for completeness of the structure enumeration, one that rebuilds each structure's clauses and runs Lean's verified LRAT checker on the SAT solver's proof, and one for polynomial certificates of non-embeddability. The certified run used no shortcuts and its checks took 46.6 cpu-hours.
The gap between 25 and 31 remains open. The authors also leave open whether SkyLadder transfers to other exhaustive searches, and how the outcome depends on the choice of coding agent and on the meta-prompter's wording.
Transferable methods
Structure-first search over basis hypergraphs
Profiling at order 20 showed that the time went into the SAT solver's propagation, not into the agent's code, so a faster implementation of the same search could not help; the search space had to change. Every candidate graph is a basis structure plus extra edges, and the structure determines most of the constraints. Enumerating structures once, isomorph-free, leaves each SAT call only the non-basis edges to decide.
Write the orthogonality graph as \(G=G_B+X\), where \(G_B\) is the union of its triangles, recorded as a linear 3-uniform hypergraph (two bases share at most one vector), and \(X\) contains the other edges. \(X\) must add no triangle and no 4-cycle, and the completed graph must have minimum degree 3 and no 010-colouring. A colouring with ones on a set \(S\) is an exact transversal of the bases, and it survives a completion unless some edge of \(X\) lies inside \(S\); from order 24 on, these transversal clauses are added up front. Both pruning conditions used during enumeration, a 4-cycle or a non-basis triangle, are hereditary, so rejecting partial structures loses nothing. Editorial check: in the Peres 33-ray set no two vertices share two neighbours, as squarefreeness requires.
How to reuse it
Enumerating the rigid substructure first and solving a small satisfiability problem for the rest could speed up other exhaustive searches with a similar shape, such as minimal state-independent contextuality sets in higher dimensions or minimal orthogonality graphs for Kochen–Specker proofs in \(\mathbb C^3\).
Certificates checked by Lean-verified checkers
A negative answer from an exhaustive search is only as reliable as the search code, and here that code was written by the agent that wanted the answer. Asking the search to emit certificates, and accepting the result only when checkers proved sound in Lean accept them, moves trust from thousands of lines of solver and generator code to a small statement and a few soundness theorems.
The soundness development has 21 Lean files, about 3,200 lines, no sorry, and only the axioms propext, Classical.choice and Quot.sound. Three checkers carry the computation: enumCheckF accepts a witness that the list of structures is complete up to isomorphism; checkSym rebuilds each structure's formula in Lean, checks the witness of every learned clause and symmetry generator, and runs the verified LRAT checker on the solver's refutation; obsCheck accepts Positivstellensatz-style certificates that a graph has no realization by vectors. The theorem noKS_of_certified_extended derives NoKSUpTo 24 from accepted checks. The checks themselves are compiled executions whose logs are assembled outside the kernel, which is the remaining trusted step.
How to reuse it
Proving checkers sound once and letting an untrusted search or an AI agent produce certificates is a general recipe for trustworthy computer-assisted non-existence results, for example for Ramsey-type bounds, minimal unsatisfiable configurations in finite geometry, or bounds on the size of quantum codes found by exhaustive search.
Context & limitations
Why it matters. The bound advances a combinatorial question at the heart of the foundations of quantum mechanics, and the speed-up comes from one reformulation: searching over the triangle structure of candidate orthogonality graphs instead of building graphs vertex by vertex. The certification design matters beyond this problem: the agent may write the search and the certificate generators, but the result depends only on checkers proved sound in Lean, not on the agent's own code.
Limitations. The result is not a single kernel-checked proof term. It trusts compiled execution of the Lean checkers, certificate-file handling and the assembly of per-process logs, besides the Lean kernel, Mathlib and a 35-line specification. A computer-assisted lemma used at order 20 (the two-basis theorem) is not certified, though the certified pipeline does not depend on it. Speed-ups are single timed runs compared with published runs on other hardware, and the novelty of each technique rests on the authors' own literature audit. The meta-prompter that steered the agent was a second Claude instance, and some of its 57 messages set directions; the authors attribute the techniques to the coding agent.