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_qr_backward_error in the library · Matrix algorithms, Chapter 19 in the catalogue

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.

Size

These figures are counted at commit 52f695a of 2026-11-16. Our paper gives those of an earlier snapshot.

Measure2026-11-16
Production Lean modules5,083
Nonblank lines of production source1,707,982
Lines that begin a theorem or lemma declaration48,379

The declaration count scans all 5,270 Lean files in the repository, including tests and tooling.