English · 简体中文
TheoremOS is a Lean 4 research workbench from WestlakeNLP, Westlake University. Start with a mathematical statement, review its formalization, then let a single agent or a team work on the proof. Each run preserves the source, attempts and Lean diagnostics. The host checks the complete original goal before it records a proof as accepted.
Open the workbench · Browse proof records · Documentation · Contributing · Star on GitHub
Watch the one-minute demo · Self-host the workbench · Request hosted access
Run a proof check on your own machine without a model key or Mathlib. The example needs Linux, Git, Bun (1.4.0 in CI), Node.js 22+, Python 3, util-linux, Bubblewrap with user namespaces enabled, and Elan. See the setup and replay guide for details.
git clone https://github.com/HuggingMath/theorem-os.git
cd theorem-os
bun install --frozen-lockfile
elan toolchain install leanprover/lean4:v4.36.0
bun run math doctor --lean-only
# Choose a new directory outside the checkout.
export THEOREMOS_REPLAY="$PWD/../theorem-os-runs/first-replay"
bun run math example replay --dir "$THEOREMOS_REPLAY"
bun run math inspect --run "$THEOREMOS_REPLAY/result.json"Lean rejects the first candidate on 0 + n = n. The second uses Nat.zero_add and passes both goals. A successful replay reports evaluated_passed and official: false; the candidates are supplied by the example (modelInvoked: false). To have a model write a proof, follow the agent run instructions.
| Task | Start here |
|---|---|
| Submit a problem, inspect diagnostics or resume a run | CLI guide · Web workbench |
| Review a formal statement before proving it | Formalization · Statement fidelity |
| Understand how the solver works | Run lifecycle · Research team · Final acceptance |
| Change a research policy or run a benchmark | M1–M5 interfaces · Examples |
| Make and test a change | Contributing · CI workflow |
| Collection | What was verified |
|---|---|
| Lean-Eval | Ten archived submissions have official passing responses. The index links each response and identifies the system that produced the proof. To check one yourself, reproduce the Dimitrov proof without a model key. |
| IMO 2026 | TheoremOS + GPT-5.6 passed local Lean checks on all 15 goals across six formalized problems. The report gives the proof sources and explains how time was counted. |
| Public proof archive | Browse the OpenAI Math trajectories and their local checks. The in-repository evidence documents individual targets and their provenance. |
These are historical results on fixed statements. Local verification is distinct from an official hosted pass; a collection of successful runs does not measure the current solver's pass rate.
Project-authored code is licensed under AGPL-3.0-only. See NOTICE for third-party software and problem sources, and CITATION.cff to cite the version used.
