On August 17, OpenBMB released MathForm, an open-source framework that automatically converts natural-language mathematics into formally verified Lean 4 proofs. The package includes a data pipeline, a verified dataset called FormalVerse, and an 8B model trained to do the conversion, and its key trick is combining knowledge retrieval from the Mathlib library with compiler feedback that checks and refines each generated proof.
What MathForm Does
Formal verification is the gold standard for mathematical correctness: a proof checked by a computer cannot hide a gap. The bottleneck has always been that writing formal proofs in a language like Lean 4 is slow, specialized work that few mathematicians can do. MathForm attacks the bottleneck directly: it takes mathematical statements written in natural language, retrieves relevant definitions and existing formalizations from Mathlib, the standard Lean mathematical library, and generates the formal Lean 4 statement. Then it uses compiler diagnostics and semantic-consistency feedback to refine the output until it compiles and makes sense.
The framework is the latest project from OpenBMB, the open-source model and tooling group at Tsinghua’s Institute for AI (the team behind MiniCPM and the BMTrain ecosystem). The release includes four pieces: the code for the data construction and evaluation pipeline, the FormalVerse dataset on Hugging Face, the MathForm-8B model, and the paper on arXiv.
The Three Pieces
FormalVerse is the dataset, a collection of verified Lean 4 formalizations covering diverse mathematical domains and sources, built by the pipeline that retrieves, generates, compiles, and refines. The verification step is what makes it valuable: every entry in the dataset has been checked by the Lean compiler, so it is not just scraped text with a format claim, it is machine-verified mathematics.
MathForm-8B is the model, trained in two stages: supervised fine-tuning on the pipeline’s output, followed by reinforcement learning that uses Lean compilation success and semantic-consistency feedback as the reward signal. The RL stage is the interesting part: instead of a generic reward model, the training signal is whether the generated formal proof actually compiles and matches the intended meaning, which is a much stronger objective than imitation.
The third piece is the evaluation story. The benchmarks are FormalMATH-Lite, ProverBench, CombiBench, and the FATE family, and the reported result is that MathForm-8B achieves the strongest overall performance among specialized autoformalizers despite its smaller size, beating larger general models on the macro-average Pass@8 across the benchmark suite.
Why Autoformalization Matters
Autoformalization is a bridge problem: if a model can reliably translate mathematical prose into verified formal statements, then every downstream formal-math capability gets easier. Theorem proving can start from verified statements instead of scraped ones. Proof assistants become usable by mathematicians who do not want to learn Lean. And the enormous backlog of unformalized mathematical literature becomes accessible to automated verification, which is the direction research institutions and libraries have been pushing toward for years.
The verification-guided design is the part worth copying. Generation alone produces plausible-looking formal code that does not compile; retrieval plus compiler feedback turns that into working proofs. The pattern, retrieve context, generate, check against a verifier, refine, is the same shape used in code generation, and it is the reason the 8B model outperforms larger models on the benchmarks: the loop does the heavy lifting, not the parameter count.
The Honest Caveats
The benchmarks are a specific slice, and Pass@8 on formalization benchmarks does not translate directly to usable formal proofs in production mathematics. The dataset’s domain coverage is broad but not complete, and hard areas of mathematics, the ones where formalization is most valuable, are exactly where retrieval from Mathlib is least likely to find existing patterns. The 8B model is small by design, which is a strength for deployment and a limit for the hardest reasoning. And autoformalization of the full mathematical literature remains far away; this is a strong framework and dataset, not a solved problem.
How the Pipeline Works
The framework runs in four stages. First, retrieval: before generation, MathForm pulls relevant definitions and existing formalizations from Mathlib, so the model generates against context rather than from scratch. Second, generation: the model produces a Lean 4 statement and proof attempt for the input mathematics. Third, verification: a Lean compiler checks whether the output compiles, and a semantic-consistency check verifies that the formal statement matches the original mathematical meaning, not just that it is syntactically valid. Fourth, refinement: failures feed back into the generator with the compiler diagnostics, and the loop repeats until the proof passes or the budget is exhausted. The same loop powers the RL training signal, which is why the model learns to prefer outputs that survive verification, and why the pipeline is reproducible by anyone who clones the repository.
Who Should Care
Mathematicians who have wanted to use Lean but found the learning curve too steep get the most direct benefit: MathForm lowers the entry cost of formalization. Proof-assistant developers should study the retrieval-plus-verification loop as a pattern for their own tooling. AI researchers working on theorem proving get a new benchmark and dataset to build on. And anyone following the trend of AI in mathematics should note that OpenBMB has now shipped the pieces, model, data, and pipeline, needed for the autoformalization layer of the stack, which is the same direction our OpenAI Astra math proofs coverage has tracked on the frontier-lab side.
Can it be used for automated theorem proving? Yes, with a caveat: MathForm handles the formalization layer, turning natural-language statements into verified Lean 4, which is the input that theorem provers need. The proving itself is a separate task, but a verified formalization removes the biggest data-quality barrier for prover research, which is why the dataset is as important as the model.
The Bottom Line
MathForm is the most complete open release in autoformalization to date: a verified dataset, an 8B model, a reproducible pipeline, and strong benchmark results, all under an open license. The design insight, verification feedback as the training signal, is why a small model can beat bigger ones, and the release gives the field a standard dataset and baseline to build on. Formal mathematics is a niche with enormous leverage, and MathForm is a meaningful step toward making verified proofs the default rather than the specialty.