Organizations: School of Mathematical Sciences, Center for Statistical Science, Peking University · Department of Statistics and Data Science, National University of Singapore · Department of Statistics and Data Science, School of Management, Fudan University · Department of Computer Science/Statistics, The University of British Columbia
Theoretical results in statistics and machine learning rest on long, technically delicate proofs, and fluent arguments generated by large language models are not necessarily correct. Automated formalization makes such arguments mechanically checkable, and automated proving goes further by discovering machine-checked proofs for statements whose proofs are incomplete or missing altogether. Both require reconstructing assumptions from source materials, accessing specialized mathematical infrastructure and managing long proof developments. We present Statopia, an ecosystem that jointly develops Statopia Prover, an independent agent specialized for formalizing and proving results in statistics and machine learning, and Statlib, a Lean~4 library built with the prover and organized for automated use. The prover controls its own execution without relying on external coding agents. It is built for formal proof discovery and checking existing proofs. A natural-language proof, when available, guides its search but is not required: from a statement alone, the prover develops the argument itself and constructs a Lean proof. Its workflow integrates source preparation, statement review, library supported planning and proof construction. Dynamic proof dependency graphs and task groups support parallel, resumable proof development. Statlib's shared definitions and theorem interfaces are organized for retrieval and composition by agents, and its coverage of statistics keeps expanding. Verified results and usage feedback from the prover inform reviewed library updates, so that proof development drives this expansion. A cross-platform application provides an interactive workspace for uploading source files and running tasks locally or in the cloud.
Figures & tables
Figure 1: Prover and library co-design in the Statopia ecosystem. Statlib provides structured statistical knowledge that supports efficient retrieval and reuse during proof construction, while actual proving produces verified results and usage signals that guide subsequent library development.
Name
Full-pipeline automation
Independent proving runtime
Built-in domain library
Proof-driven library evolution
Domain- specific modeling
Graphical task workspace
Statopia Prover + Statlib 1
✓
✓
✓
✓
✓
✓
Stat-Lean 2
✓
–
✓
✓
✓
–
KAPPA 3
✓
–
–
–
✓
–
CausalSmith + Causalean 4
✓
–
✓
✓
✓
–
ProofLoom + SOptLib 5
✓
–
✓
✓
✓
–
AI4SLT / FoML / StatsMLlib 6
–
–
✓
–
✓
–
Table 1: Reported capabilities of Lean proving systems and domain libraries, grouped by project family. Marks are the column-wise union across the cited family members, not a claim that all capabilities coexist in one release. The domain-library column requires a project’s own built-in or companion domain library; support for connecting external libraries alone does not qualify.
Figure 2: System overview of Statopia. Users submit sources, with or without proofs, to a workspace, which organizes formalization work into task groups, tasks and proof DAGs. Statopia Prover prepares each task, develops its proof and accepts results only after the final verification checks. Statlib supplies checked declarations for reuse and receives verified results only through reviewed promotion (dashed). Lean runs on a local or cloud host, and language models are accessed through replaceable APIs.
Figure 3: Layered architecture of Statlib and its prover-facing search surface. Mathlib provides the general mathematical foundations. The statistical vocabulary supports operational and bridge lemmas, which combine into reusable theorem families and domain modules. Declaration data and curated aliases make these components retrievable by Statopia Prover. Retrieved declarations are checked before they are used in proof planning and construction, and final proof acceptance still depends on Lean elaboration, the build and the integrity checks.
Proof procedure
Problems
Lean lines
Mean min.
Mean USD
USD/line
Single file
41
5,192
32.81
0.22
0.00174
Dynamic DAG
42
32,510
89.80
0.90
0.00117
Combined
83
37,702
61.65
0.57
0.00125
Table 2: Statistics benchmark results.
Task
Time (min.)
Lean lines
USD
USD/line
Reference Time (min.)
Problem 1
37.63
720
0.88
0.00122
24
Problem 2
264.93
4,410
12.90
0.00293
360
Problem 3
292.68
7,680
10.89
0.00142
869
Problem 4
36.03
549
0.41
0.00074
39
Problem 5
23.61
402
0.28
0.00069
65
Problem 6
50.54
1,214
0.81
0.00067
139
Table 3: Results of Statopia Prover on six guided IMO 2026 tasks. For reference, the AxiomProver times are taken from AxiomMath’s public repository ( AxiomMath, 2026 ) . The two evaluations follow different protocols, so the timing columns are not a controlled comparison of efficiency.
Repeated deep regression ( Yan et al., 2025 ) , Thm. 2.1.
44
8,774
4/4
2
Table 4: Statistical paper developments. Files and lines count the complete Lean package of each case, tasks are given as verified over total, and external citations count the cited results that each package retains as citation inputs instead of proving them (Section 3.2 ).
Figure 4: The archived main-task DAG for Gaussian approximation. Its nine verified nodes comprise the main target, six local helpers and two task interfaces (purple dashed borders). B and T connect to the supporting tasks in Figure 5 . Arrows point from prerequisites to consumers.
Figure 5: The Gaussian task group: six verified tasks (green) and three retained citation inputs (white). Each green box represents a task with its own proof DAG. The Bentkus and Slepian tasks are reused by multiple consumers; B and T supply the interfaces in Figure 4 . Dashed arrows mark uses of citation inputs, which were kept unproved under the default setting (Section 3.2 ).
Figure 6: Statlib contributions to the final CCK comparison proof. Cyan boxes group the 21 reused named Statlib theorems, with the number of distinct theorems in parentheses; green boxes summarize their roles in the paper-specific proof. Arrows show the main mathematical uses and do not form a complete dependency graph of tasks or nodes. The interval bound is obtained from Statlib’s Nazarov theorem, and the Stein identity remains an explicit citation input.
Library component
Public definitions and results
Purpose of the interface
Statlib files
Network vocabulary
Affine layers, network realization, network classes and parameter counts
State approximation problems using shared objects and architecture budgets.
Vocabulary/NeuralNetwork
Network algebra
Linear-combination constructions, affine precomposition and depth padding
Combine or adapt networks with explicit realization and size guarantees.
Selected tent-weight, partition and weighted approximation bounds
Combine local error estimates into an approximation bound on the domain.
Approximation/NeuralNetworkAlgebra
Statistical interfaces
Bounds transferring a candidate’s pointwise or integrated squared error to network-class approximation error
Use a concrete network construction to bound the approximation term in a statistical analysis.
Approximation/NeuralNetwork
Table 5: Reusable definitions and results that the neural network approximation development exposes in Statlib. The last column gives the main Statlib source files for each component, relative to Statlib/Nonparametric/ and without the .lean extension.
Department of Biostatistics & Bioinformatics, Duke University · Department of Mathematical Sciences, Carnegie Mellon University · Department of Biostatistics, Harvard T.H. Chan School of Public Health