Skip to content
HuggingMathPublic

About

An AI collaborative Lean 4 theorem-proving workbench from WestlakeNLP (Westlake University) — handling retrieval, lemma decomposition, and independent Lean verification.

Topics

Resources

Stars

50 stars

Watchers

1 watching

Forks

Latest commit

 

History

140 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English · 简体中文

TheoremOS

TheoremOS

Collaborative Lean 4 mathematical research — formalize statements, explore lemmas, and verify independently.

Developed at WestlakeNLP WestlakeNLP (Natural Language Processing Lab, Westlake University)

⭐ Star · Website · Proof Archive · Workbench & CLI Source · Access Guide · Verify Locally · Cite

GitHub stars WestlakeNLP Lab Research preview v0.1.0-preview.1 Lean 4.33.0 Workbench & CLI: AGPL-3.0-only Site & Archive License


TheoremOS — Working alongside mathematicians: five replaceable research modules and four-step preset Lean verification replay

TheoremOS pairs mathematicians with AI research agents for formal proof construction: researchers define the problem, inspect generated Lean 4 statements, and steer lemma decomposition while the system handles Mathlib retrieval, parallel exploration, and independent Lean 4 kernel verification.

Important

Looking for the open-source code, Web Workbench, CLI, 1-min overview film, or IMO 2026 (6/6) results? This repository hosts the product website (theoremos.top) and 29 archived proof records. 👉 Visit and ⭐ Star our main open-source codebase (AGPL-3.0-only) at HuggingMath/theorem-os — includes the full web workbench, 5-command zero-API-key local replay, swappable M1–M5 agent modules, and 1:07 1080p demo film.

Why TheoremOS?

Frontier Proof Archives Human-in-the-Loop Control Open Code & Local Reproduction
10 official Lean-Eval passes (incl. Unit Conjecture, Hopf–Rinow, Dimitrov, Sunflower bounds, Lorentzian polynomials) & 18 locally verified OpenAI Math records with full research trajectories (provenance). Review formal Lean 4 statements via blind back-translation before spending search budget, test candidate lemma routes early, and reuse verified lemmas across tasks. Reproduce proofs locally with zero API key via the Dimitrov Proof Kit, or run and customize the full M1–M5 workbench & CLI (AGPL-3.0-only) at HuggingMath/theorem-os.
Repository Scope License
HuggingMath/TheoremOS Product site (theoremos.top), 29 archived proof records, Dimitrov proof kit & docs Rights reserved
HuggingMath/theorem-os Open-source web workbench, CLI runner (bun run math), and M1–M5 modules AGPL-3.0-only

Quick Start

What you want to do Where to start What you need
Browse verified proofs & trajectories Proof Archive (EN) · 中文档案 · Case Study Browser only (no account required)
Verify a proof locally Verification Guide · Dimitrov Proof Kit Local Lean / Python / Git (no API key)
Start an online research task Request Access · Workbench · First-Task Guide Allowlisted email & BYOK Responses API key
Run locally or replace M1–M5 policies HuggingMath/theorem-os · Capabilities Local TypeScript / Lean runtime (AGPL-3.0-only)
Reuse an archived lemma Proof Reuse Guide Local Lean 4 workspace
Verify the preset Lean example locally in 3 commands (no Mathlib or API key needed)
git clone https://github.com/HuggingMath/TheoremOS.git && cd TheoremOS
elan toolchain install leanprover/lean4:v4.33.0
lean +leanprover/lean4:v4.33.0 examples/lean-check/Submission.lean

Workbench & Verification Replay

TheoremOS workbench showing problem input, research mode, and budget controls

Step 1 · Problem Input & Mode — Natural language, TeX, or single-file Lean input, collaborative or parallel mode, and budget controls (中文截图).

TheoremOS formalization review showing Lean statement, blind back-translation, and reviewer check Four-step preset Lean verification replay: candidate, Lean feedback, repair, and full acceptance
Step 2 · Statement Review — Compare the Lean 4 statement against blind back-translation before approving search (中文截图). Step 3 · Verification Replay — Four-step loop: candidate → Lean feedback → repair → independent kernel acceptance (中文回放).

Collaborative Proof Workflow

  1. Statement Review — Submit natural language, TeX, or an incomplete Lean file. Formalization generates a type-checked Lean statement alongside a semantic review comparison; the researcher confirms mathematical intent before proof search begins.
  2. Route & Lemma Decomposition — Test whether candidate helper lemmas imply the main theorem before filling in all sub-proofs, then prove lemmas separately and assemble a sorry-free final proof.
  3. Trace Inspection & Lemma Reuse — Inspect recorded proof attempts and compiler diagnostics, steer the plan interactively, and reuse verified lemmas (always re-checked in the target Lean environment).
  4. Open-Source CLI & Policy Experiments — The workbench, CLI, and replaceable M1–M5 modules (construction, feedback, search, context, collaboration) are open source at HuggingMath/theorem-os. For custom Lake toolchains or joint evaluations, see Capabilities & Collaboration (EN) (中文).
View architecture diagram and end-to-end illustrated workflow
Illustrated TheoremOS workflow from problem formalization and Mathlib lookup to independent Lean 4 verification Five replaceable research modules and independent final acceptance loop
End-to-end collaborative proving & local reproduction M1–M5 research loop separated from fixed S3 acceptance (中文图)

Proof Evidence

Collection Records Verification Standard Browse Files
Lean-Eval 10 Official Lean-Eval pass records on frozen submission targets accepted/ · submitted/
OpenAI Math 18 Checked locally with Lean 4 and problem comparators (no official OpenAI confirmation) data/proofs/
In Progress 1 Recorded intermediate draft snapshot in-progress/

Note

The archive catalog contains 29 records in total. Some OpenAI Math entries check a supporting result or conditional statement, and the evaluation notes (EN) (中文) describe an earlier snapshot of selected runs rather than a system-wide pass rate or cost.

Lean-Eval: 10 Officially Accepted Proofs

View all 10 proofs officially accepted by Lean-Eval
Proof Package Area Official Result
Unit conjecture: a nontrivial group-ring unit Algebra #1246 · pass
Rademacher type and Enflo type coincide Functional analysis #2115 · pass
Equiangular lines with a fixed angle Discrete geometry #2135 · pass
Fractional expectation thresholds Probabilistic combinatorics #2141 · pass
Dimitrov's lower bound for algebraic integers Algebraic number theory #2143 · pass
Hopf–Rinow theorem Riemannian geometry #2143 · pass
Improved bounds for the sunflower lemma Combinatorics #2144 · pass
Lorentzian polynomials Algebraic combinatorics #2144 · pass
The optimal paper Möbius band Geometry #2144 · pass
Algebraic integers: an upper bound for λ_SSS Algebraic number theory #2144 · pass

Model and provenance metadata are recorded in accepted.json and submitted.json. The final four proofs were accepted together in submission #2144, with source files stored under submitted/.

OpenAI Math: 18 Locally Verified Records

View statements, Lean proofs, verification reports, and research trajectories for all 18 records
Problem Record Area Statement & Proof Verification & Process
Supercritical three-state reconstruction on regular and Poisson trees Probability Statement · Proof Local pass · Process
Face correspondence under triangle expansion Combinatorial optimization Statement · Proof Local pass · Process
Endpoint non-integrability for the Koebe map and its inverse Complex analysis Statement · Proof Local pass · Process
Support results on numerical ranges and finite-dimensional compressions Functional analysis Statement · Proof Local pass · Process
Almost-sure spectrum of the planar Anderson operator Random operators Statement · Proof Local pass · Process
Finiteness of the Ising-perceptron variational value Probability and statistical physics Statement · Proof Local pass · Process
Totient companion: the no-seed zero case Number theory Statement · Proof Local pass · Process
Compactness of normalized Cartier chart retractions Algebraic geometry and topology Statement · Proof Local pass · Process
A colored-graph criterion for finite congruence lattices Universal algebra and lattice theory Statement · Proof Local pass · Process
Existence of the honeycomb free-energy limit Probability and statistical physics Statement · Proof Local pass · Process
A seven-coloring of the Euclidean plane Discrete geometry Statement · Proof Local pass · Process
A legal 35-move winning strategy for Snaky Combinatorial games Statement · Proof Local pass · Process
Snaky certificate verification Combinatorial games Statement · Proof Local pass · Process
Hadamard cube-fiber cancellation Linear algebra Statement · Proof Local pass · Process
A three-dimensional complete normal local complex algebra Commutative algebra Statement · Proof Local pass · Process
A finite counterexample to Truffet's procedure Tropical optimization Statement · Proof Local pass · Process
Supercritical reconstruction for three-state tree channels Probability Statement · Proof Local pass · Process
Marked trace values across all surface seams (support result) Algebraic geometry Statement · Proof Local pass · Process

Repository Structure

Path Contents
accepted/ · submitted/ Lean-Eval proof packages and official submission provenance
data/proofs/ OpenAI Math problem statements, proof files, local checks, and saved trajectories
in-progress/ Earlier drafts, some with unclosed sorry placeholders
proof-kits/ · examples/ Standalone Dimitrov benchmark verification kit and short Lean reuse examples
docs/ · CHANGELOG.md Access, verification, reuse, capability, evaluation, and release documentation

About WestlakeNLP

WestlakeNLP · Westlake University TheoremOS is developed at WestlakeNLP, the Natural Language Processing Lab at Westlake University (founded in 2018 and led by Prof. Yue Zhang). The lab pursues fundamental and applied research in natural language processing, language-model reasoning, and AI for Science.

Website: westlakenlp.com · X (Twitter): @NlpWestlake · Contact: liuzhenhao@westlake.edu.cn

License & Citation

LICENSE reserves rights to project-authored public site and documentation materials in this repository, while HuggingMath/theorem-os is licensed under AGPL-3.0-only. Archived proofs and third-party materials retain their original terms — see Public materials, reuse, and citation. Please cite TheoremOS via CITATION.cff alongside the original problem/proof authors.

Cite TheoremOS (BibTeX)
@software{liu2026theoremos,
  author  = {Liu, Zhenhao},
  title   = {TheoremOS},
  version = {0.1.0-preview.1},
  year    = {2026},
  month   = nov,
  note    = {WestlakeNLP, Westlake University},
  url     = {https://theoremos.top/}
}

Support & Community

  • ⭐ Star both repositories — Bookmark HuggingMath/TheoremOS for verified proof archives and verification kits, and HuggingMath/theorem-os (AGPL-3.0-only) for the open-source workbench, CLI, and solver updates.
  • 💬 Contribute & report checks — Open an issue to share local verification reports, reusable Lean lemmas, or feature requests.
  • 🤝 Follow & collaborate — Follow @NlpWestlake for research releases from WestlakeNLP, or reach out at liuzhenhao@westlake.edu.cn for multi-file Lake projects and joint evaluations.

⭐ Star TheoremOS · ⭐ Star theorem-os · Open an Issue · Request Access / Collaborate

About

An AI collaborative Lean 4 theorem-proving workbench from WestlakeNLP (Westlake University) — handling retrieval, lemma decomposition, and independent Lean verification.

Topics

Resources

Stars

50 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages