One Claude Code session, checked end to end

Two languages, a theorem, and a check for every claim

In one long session, Claude built two programming languages from scratch, with their compilers, a SAT solver, and a machine-checked proof that the Schur number S(4) is 44. Each layer was checked by the one below it, and every claim here can be re-run from the repository with Node 22 and nothing else.

What was built

Lumen

A small typed language, compiled to WebAssembly with a garbage collector.

  • A compiler, and a reference interpreter to compare it with.
  • A second compiler, written in Lumen, that compiles itself to itself.
  • 40 rewrite rules found by search, each proved with SAT.
  • An optimizer tuned in eight measured, gated steps.

A theorem

S(4) = 44: the numbers 1 to 44 split into four groups with no x, y and x + y in one group, and 1 to 45 cannot.

  • A SAT solver written in Lumen refutes 1 to 45 in 255,663 steps.
  • Lumen 2 prints the same refutation, byte for byte, and on four cores proves the theorem in 22 seconds.

Lumen 2

A second language, designed from what the first one taught.

  • Types say what a function can do: print, read, use the clock or randomness, or fail.
  • Array accesses proved safe, each proof a SAT refutation with a certificate.
  • Memory without a garbage collector, by reference counting.
  • A compiler of about 8,600 lines of Lumen 2 that compiles itself, after a port that matched the JavaScript original on 1,086 programs.
  • Users' functions over files, on every core, with step budgets and incremental re-runs.
The split of 1 to 44 that the solver found, which shows S(4) is at least 44. That no split of 1 to 45 exists is the 255,663-step refutation. Checking the split in your browser…

What was checked, and how to re-run it

CI repeats these checks on every push to the repository, both S(4) proofs included. The one exception is the timing against C, which needs a quiet machine.

ClaimChecked byRe-run it
The compilers do what the interpreters doDifferential fuzzing on fresh random programs every run, and bugs planted in the compilers (34 in Lumen, 27 in Lumen 2) that the tests must catchnode fuzz/fuzz.js --count 1000node lumen2/test/fuzz.js --mutants
The compiler compiles itself to itselfThe compiler's build compiles its own source to the same bytesnode lumen2/compiler/bootstrap.js
S(4) = 44The project's own proof checker; a second checker, written in Lumen 2 and proved unable to crash; and drat-trim, a widely used checker nobody here wrotenode lumen2/proofs/prove-schur.js 4 44
Every proof the project writes outdrat-trim checks 21 refutations in CI: S(4) three ways, 7 rewrite rules, 11 refinement certificatesthe drat-trim job in .github/workflows/ci.yml
Lumen 2 runs 1.1 to 3.5 times as long as CSix programs in both languages, outputs compared, best of threenode lumen2/bench/run.js
An incremental re-run prints exactly a full run's outputRandom edits on five transforms; a simulated month of a daily pipeline against a dbt-style merge and cachesnode lumen2/transform/bench/simulate.js

What it shows, and what it doesn't

It shows

  • Sustained engineering over one long session, in which each layer was checked by the one below it, including the mistakes those checks caught, which the story lists.
  • That every claim can be re-run: the commands are in the repository, and CI runs all but the timings on every push.

It doesn't show

  • That earlier models could not have done it. CHALLENGE.md turns the task into a benchmark with a scorer, for anyone who wants to compare.
  • A new result in mathematics: S(4) = 44 has been known since 1965. What is new is that a language built in the session produced the proof.
  • That Lumen 2 is worth adopting. It is slower than C, and its wins come from what its checker proves. In a simulated month of a daily pipeline, its incremental re-runs were right every day, but the computing they saved was worth about a cent.
  • Anything beyond one machine: every timing comes from one 4-core machine and one JavaScript engine.