LeanCert's benchmarks with interval

LeanCert is a Lean library for certified numerics: interval evaluation, Taylor models, root finding, integration, and tactics on top of them. It is the closest thing to FloatLib's interval tactic in Lean, so I wanted to see the two side by side on LeanCert's own material: its seven benchmark suites, its two script benchmarks, and the statements its examples and tests prove.

Three things to keep in mind, stated here once. The bounds of the suite goals are the enclosures LeanCert's own evaluators report, so those goals sit exactly at LeanCert's edge by construction. LeanCert ran on a port to Lean v4.36.0 that I made (three edits and one added file, all its tactic tests green), not on the toolchain it is released for. And the machine was shared and at times saturated: both tools were timed side by side, but single times carry that noise, and the time of one goal can be off by a factor of two between runs.

Result

Horizontal bars in 9 groups of three, one group per suite, on an axis from 0 to 100 percent: FloatLib interval, LeanCert kernel-checked and LeanCert with its compiled checker. Evaluation: 40, 32 and 32 of 40. NumericalRefinement: 2, 2 and 2 of 2. DomainAwareAD: 8, 8 and 8 of 8. bench-showcase: 3, 3 and 3 of 3. bench-trust point: 10, 10 and 10 of 10. bench-trust subdiv: 80, 80 and 80 of 80. bench-trust optimization: 1, 1 and 1 of 1. bench-trust finsum: 0, 2 and 3 of 3. examples and tests: 197, 203 and 210 of 210.

Figure 2. Share of each suite's inequality goals that FloatLib's interval and LeanCert's own tactic prove with one call; the number at the end of a bar is the count of goals. The first eight rows are LeanCert's benchmark suites and script benchmarks, stated as goals; the last row holds the inequalities, with six combinations of comparisons, that LeanCert's examples and tests prove with one tactic call. Goals of other shapes (integrals, root existence and uniqueness, exact identities, list constructions, derivatives) are not in the figure, because interval does not address them. Measured on FloatLib and LeanCert 44b323a ported to Lean 4.36.0 and Mathlib v4.36.0, on 2026-11-21 on an Intel Xeon Platinum 8275CL (96 threads, shared with other jobs).

LeanCert's seven suites have 119 cases. They time compiled evaluators and checkers, and none of the cases is a theorem statement, so each case was first stated as a goal (112 goals). Every goal was given to LeanCert's own tactic and to interval, one call each, with the same lean binary on the same machine.

Two panels with three rising step curves each on a logarithmic time axis from 0.004 to 300 seconds. In panel (a) the FloatLib curve ends at 144 of 147 goals, the kernel-checked LeanCert curve at 138 and the compiled-checker LeanCert curve at 139; in panel (b) they end at 197, 203 and 210 of 210 goals. The FloatLib curve rises furthest to the left in both panels.

Figure 1. Goals proved against time per goal, by FloatLib's interval and by LeanCert's own tactic on the same statements, each with one call. A curve counts the goals proved within the time on the horizontal axis; the time is that of the whole theorem command inside Lean (elaboration, the tactic and the kernel check), the median of two repetitions for a run under 20 s and one repetition otherwise, with both tools running side by side. Panel (a) holds the inequality goals of LeanCert's seven benchmark suites and of its two script benchmarks, panel (b) the inequalities, with six combinations of comparisons, that LeanCert's examples and tests prove with one tactic call. The time axis is logarithmic, a curve further left is faster and one that ends higher proves more. Measured on FloatLib and LeanCert 44b323a ported to Lean 4.36.0 and Mathlib v4.36.0, on 2026-11-21 on an Intel Xeon Platinum 8275CL (96 threads, shared with other jobs), at most 7 Lean processes at once.

In the tables, n (a, b, c) means n goals proved: a in a plain file with default options, b only with raised Lean limits, c only with the larger tactic options. Times are per goal, medians over the goals both tools prove. The ratio is LeanCert's time divided by interval's, per goal, then the median.

Table 1. The seven suites: inequality goals

Suite Cases Goals Inequality goals interval LeanCert, kernel-checked LeanCert, compiled checker Both Median time interval Median time LeanCert Median ratio
Evaluation 69 40 40 40 (26, 14, 0) 32 (14, 18, 0) 32 (20, 12, 0) 32 349 ms 6.3 s 8.4
Integration 12 26 0
Krawczyk 6 6 0
DomainAwareAD 6 17 8 8 (8, 0, 0) 8 (8, 0, 0) 8 (8, 0, 0) 8 553 ms 3.1 s 8.3
AlgebraicBezout 3 3 0
DyadicSubdivision 18 18 0
NumericalRefinement 5 2 2 2 (1, 0, 1) 2 (2, 0, 0) 2 (2, 0, 0) 2 38 ms 1.2 s 29.4
all 119 112 50 50 (35, 14, 1) 42 (24, 18, 0) 42 (30, 12, 0) 42 254 ms 4.9 s 8.6

Table 2. The seven suites: goals outside interval

Suite Goals outside interval Shape LeanCert, kernel-checked LeanCert, compiled checker What interval says
Integration 14 integral 0 0 an atom has no bound (14)
Integration 12 checker flag 5 12 not stated: LeanCert's own vocabulary (12)
Krawczyk 6 root 4 4 not stated: LeanCert's own vocabulary (4); not an inequality (2)
DomainAwareAD 9 derivative 0 0 an atom has no bound (9)
AlgebraicBezout 3 identity 3 3 not stated: LeanCert's own vocabulary (3)
DyadicSubdivision 18 list construction 18 18 not stated: LeanCert's own vocabulary (18)

Table 3. LeanCert's script benchmarks

Suite Cases Goals Inequality goals interval LeanCert, kernel-checked LeanCert, compiled checker Both Median time interval Median time LeanCert Median ratio
bench-showcase 5 5 3 3 (3, 0, 0) 3 (3, 0, 0) 3 (3, 0, 0) 3 57 ms 638 ms 8.3
bench-trust point 10 10 10 10 (10, 0, 0) 10 (10, 0, 0) 10 (10, 0, 0) 10 61 ms 596 ms 9.8
bench-trust subdiv 80 80 80 80 (80, 0, 0) 80 (80, 0, 0) 80 (80, 0, 0) 80 66 ms 749 ms 11.6
bench-trust optimization 1 1 1 1 (1, 0, 0) 1 (1, 0, 0) 1 (1, 0, 0) 1 56 ms 313 ms 5.6
bench-trust finsum 3 3 3 0 (0, 0, 0) 2 (1, 1, 0) 3 (3, 0, 0) 0
all 99 99 97 94 (94, 0, 0) 96 (95, 1, 0) 97 (97, 0, 0) 94 66 ms 728 ms 11.4

Table 4. Statements of LeanCert's examples and tests, by shape

Shape Statements interval LeanCert, kernel-checked LeanCert as written
inequality 204 192 (191, 0, 1) 197 (194, 3, 0) 204 (202, 2, 0)
existence 49 5 (5, 0, 0) 49 (49, 0, 0) 49 (49, 0, 0)
inequality in ℕ with a ceiling 21 0 (0, 0, 0) 21 (21, 0, 0) 21 (21, 0, 0)
integral 10 0 (0, 0, 0) 10 (10, 0, 0) 10 (10, 0, 0)
conjunction 4 3 (3, 0, 0) 4 (4, 0, 0) 4 (4, 0, 0)
bound for all large n 2 0 (0, 0, 0) 2 (2, 0, 0) 2 (2, 0, 0)
disequality 2 2 (2, 0, 0) 2 (2, 0, 0) 2 (2, 0, 0)

Goals one proves and the other does not

How a case became a goal, and how a goal was run

The rules were fixed before any tactic ran, and they are the same for every case (scripts/gen_goals.py).

One Lean process per goal, tool and configuration (scripts/run_goals.py):

The port of LeanCert

LeanCert pins Lean v4.35.0 and Mathlib v4.35.0. To run both tools with the same lean binary I ported it to Lean v4.36.0 and Mathlib v4.36.0 (scripts/leancert-lean-4.36.diff): two one-line source edits, one new file with its import, and the version pins. The new file is the one that matters for a fair comparison. Mathlib v4.36.0 defines real arithmetic as private definitions that a package outside the module system can unfold, and LeanCert's metaprograms were written against opaque arithmetic. The file marks ten definitions irreducible again, so LeanCert behaves as written, and all of its tactic tests build on the port. Three analysis modules that nothing here needs were not ported, and the compiled benchmark executable was not built: LeanCert's harness was run with the interpreter, only to read off the enclosure each case computes.

What was run

FloatLib main at fc2fad1f
LeanCert https://github.com/alerad/leancert at 44b323a0d6af00211d5013f6e021432db032087c (2026-10-28, Apache-2.0), ported as above
Lean and Mathlib leanprover/lean4:v4.36.0, the same lean binary for both tools, and Mathlib v4.36.0
Date and machine 2026-11-21, an Intel Xeon Platinum 8275CL (2 sockets, 96 hardware threads, 1.1 TB), Amazon Linux 2023, shared with other jobs. Idle CPU between 0 % and 62 % (median 38 %) during the runs, at most seven Lean processes at once

What failed and why. interval, inequality goals not proved: no proof in 300 s (7), an atom has no bound (4), a partial function rejected the box (4), not an inequality (1). LeanCert kernel-checked, inequality goals not proved: no proof in 300 s (6), proved only with a compiler axiom (6), no LeanCert strategy proved it (2), maximum recursion depth (2).

Not measured here: LeanCert's compiled harness timings, and LeanCert on its own toolchain. LeanCert publishes wall times for its bench-trust files on an Apple M1 Max with Lean v4.32.2: about 0.1 s per interval_decide lemma on the kernel route.

From Lean: every verdict and every time per goal (IO.monoNanosNow around the theorem command). LeanCert's enclosures, which are the bounds of the goals, come from LeanCert's own harness. From scripts: the goal statements, the process wall times and the timeouts, the medians, counts and ratios, and the figures.

Files

Run it again

lake build                                                  # in the week's directory: FloatLib
bash leancert/scripts/fetch.sh                              # LeanCert at its commit, ported to Lean v4.36.0
bash leancert/scripts/lcbuild.sh LeanCert.Tactic LeanCert.Benchmark.Main
python3 leancert/scripts/run_goals.py --help                # goals, runs and repetitions
python3 leancert/scripts/summarize.py && python3 leancert/scripts/plot.py