VSCL
VSCL, the Verified Scientific Computing Library, is a public Lean library of numerical analysis, built on Mathlib. AI agents write its statements and proofs, other agents review the statements against their sources, and Lean checks every proof.
- Catalogue: 478 reviewed items of its sources, by topic and source, each with a Lean statement.
- Case study: statements from a survey of RandNLA, with their proofs where published, and what the proofs depend on in the library.
- Repository: the library, with how to build it and how to use it in a project, under the MIT License except where a file carries an Apache-2.0 notice.
- How to contribute and cite: whom to write to, and the library's citation.
An example
Higham's Theorem 19.4 bounds the backward error of Householder QR factorization. In the library's form, for a matrix with at least as many rows as columns, the computed triangular factor and an exactly orthogonal matrix are the factors of a nearby matrix. The norm of each column of the difference between the nearby matrix and the original is at most the norm of the same column of the original, times a constant that depends on the dimensions and on the unit roundoff.
theorem householder_qr_backward_error
(fp : FPModel) (m n : Nat) (A : Fin m -> Fin n -> Real)
(hn : 0 < n) (hnm : n <= m)
(hvalid : gammaValid fp (n * householderConstructApplyGammaIndex m)) :
HouseholderQRBackwardError m n A
(fl_householderQRPanel_Q fp m n A)
(fl_householderQRPanel_R fp m n A)
(gamma_tilde fp m n)householder_
In this statement fp is an abstract model of floating-point arithmetic with unit roundoff u. The library's rounding-error results are stated for such a model, not for one IEEE-754 implementation.
What it draws on
The library draws on five books and one article. It covers rounding-error and perturbation analysis, matrix algorithms, finite-volume methods, probability, and optimization.
- Higham, Accuracy and Stability of Numerical Algorithms. Selected material from all twenty-eight chapters.
- LeVeque, Finite Volume Methods for Hyperbolic Problems. Selected material from Chapters 1 to 4.
- Vershynin, High-Dimensional Probability. Selected material from Chapters 1 to 4.
- Eymard, Gallouët and Herbin, Finite Volume Methods, January 2019 manuscript. Finite-volume foundations from Chapter 1.
- Nocedal and Wright, Numerical Optimization, second edition. Optimization foundations from Chapter 1.
- Drineas and Mahoney, RandNLA: Randomized Numerical Linear Algebra (2016), an article. A RandNLA case study on sampling, sketching and subspace embeddings, least squares, and low-rank approximation.
Size
These figures are counted at commit 52f695a of 2026-11-16. Our paper gives those of an earlier snapshot.
| Measure | 2026-11-16 |
|---|---|
| Production Lean modules | 5,083 |
| Nonblank lines of production source | 1,707,982 |
| Lines that begin a theorem or lemma declaration | 48,379 |
The declaration count scans all 5,270 Lean files in the repository, including tests and tooling.