rmt-foundations

Verification

Verification at a glance

How to read this page. Lean has checked every step of the proofs listed here. Each result is exactly its Lean statement: read the statements below to see what is proved. The titles, the words and the notes are the authors’ description, which Lean does not check.

Kernel-checked foundations for random matrix theory (Airy function and kernel, Fredholm series, order-one Tracy-Widom monotonicity, moment-cumulant recursion, resolvent identity, Marchenko-Pastur law, Stieltjes transform and inversion, Herglotz-Borel representation, free-convolution subordination); 16 main results compared. Version 0.2.0 adds Tracy-Widom smoothness and Hermite-Airy limits.

Main results

The actual real Airy function satisfies its second-order ODE

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

For every real $x$, the real Airy function satisfies
\[ \operatorname{Ai}''(x) = x\,\operatorname{Ai}(x). \]
Here $\operatorname{Ai}$ on $\mathbb{R}$ is the real part of the complex Airy function.

In Lean. RMTFoundations.Airy.iteratedDeriv_two_airyAiReal in Challenge/Reference/Airy/Core.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem iteratedDeriv_two_airyAiReal (x : ℝ /- [definition] -/ ) :
    iteratedDeriv 2 airyAiReal x = x * airyAiReal x

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

The genuine shifted Airy kernel operator is trace class

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

For every real $s$, let $A_s$ be the integral operator on $L^2(0,\infty)$ with kernel
$\operatorname{Ai}(x+y+s)$. Then $K_s = A_s \circ A_s$ is trace class, that is, a composition of two
Hilbert--Schmidt operators.

In Lean. RMTFoundations.Airy.isTraceClass_airyKernelShift in Challenge/Reference/Airy/Core.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem isTraceClass_airyKernelShift (s : ℝ /- [definition] -/) :
    IsTraceClass (airyKernelShift s)

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

Factorially bounded coefficients give an entire Fredholm power series

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

Let $c_n \in \mathbb{C}$ and $M \ge 0$ satisfy $|c_n| \le M^n / n!$ for all $n \ge 0$. Then the power series
\[ z \mapsto \sum_{n \ge 0} c_n z^n \]
is analytic on all of $\mathbb{C}$.

In Lean. RMTFoundations.Fredholm.fredholmSeries_entire in Challenge/Reference/Operator/Fredholm.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem fredholmSeries_entire
    (c : ℕ → ℂ /- [definition] -/ )
    (M : ℝ /- [definition] -/ )
    (hM : 0 ≤ M /- [standing] -/ )
    (hc : ∀ n, ‖c n‖ ≤ M ^ n / (n.factorial : ℝ)  /- [standing] -/ )
    : AnalyticOnNhd ℂ (fredholmSeries c) Set.univ

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

The canonical real order-one Airy kernel series is monotone

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

Let $F_1(s)$ be the real part of the Fredholm series, at coupling $-1$, of the kernel
$\operatorname{Ai}(x+y+s)$ on $(0,\infty)$ (formally $\det(I - A_s)$). Then $s \mapsto F_1(s)$ is
nondecreasing on $\mathbb{R}$.

In Lean. RMTFoundations.TWOneMonotone.monotone_TW1R in Challenge/Reference/TracyWidom/OrderOneMonotone.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem monotone_TW1R : Monotone TW1R

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

Analytic moment-cumulant recursion at zero on the interior of the exponential integrability set

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

Let $X$ be a real random variable on a space with a nonzero measure $\mu$, and suppose $0$ lies in the
interior of the set of $t$ for which $e^{tX}$ is $\mu$-integrable. Then for every $n \ge 0$,
\[ \int X^{n+1}\,d\mu = \sum_{j=0}^{n} \binom{n}{j}\, \kappa_{j+1} \int X^{n-j}\,d\mu, \]
where $\kappa_m$ is the $m$-th derivative at $0$ of the cumulant generating function of $X$.

In Lean. RMTFoundations.Cumulants.moment_succ_eq_sum_cumulant_mul_moment in Challenge/Reference/Probability/Cumulants.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem moment_succ_eq_sum_cumulant_mul_moment [NeZero μ /- [standing] -/ ]
    (h : (0 : ℝ) ∈ interior (integrableExpSet X μ)  /- [standing] -/ ) (n : ℕ /- [definition] -/ ) :
    μ[X ^ (n + 1)] = ∑ j ∈ Finset.range (n + 1),
      (n.choose j : ℝ) * cumulant (j + 1) X μ * μ[X ^ (n - j)]

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

First resolvent identity for two invertible shifts of an arbitrary finite complex matrix

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

Let $H$ be a square complex matrix and $z_1, z_2 \in \mathbb{C}$ such that $H - z_1 I$ and $H - z_2 I$
are invertible. Then
\[ (H - z_1 I)^{-1} - (H - z_2 I)^{-1} = (z_1 - z_2)\,(H - z_1 I)^{-1}(H - z_2 I)^{-1}. \]

In Lean. RMTFoundations.Resolvent.resolvent_identity in Challenge/Reference/Matrix/Resolvent.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem resolvent_identity (H : Matrix n n ℂ /- [definition] -/ ) (z₁ z₂ : ℂ /- [definition] -/ )
    (h₁ : IsUnit (H - z₁ • (1 : Matrix n n ℂ)).det /- [standing] -/ )
    (h₂ : IsUnit (H - z₂ • (1 : Matrix n n ℂ)).det /- [standing] -/ ) :
    (H - z₁ • (1 : Matrix n n ℂ))⁻¹ - (H - z₂ • (1 : Matrix n n ℂ))⁻¹
      = (z₁ - z₂) • ((H - z₁ • (1 : Matrix n n ℂ))⁻¹ * (H - z₂ • (1 : Matrix n n ℂ))⁻¹)

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

Signed real-parameter complex-valued Taylor integral remainder

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

Let $F : \mathbb{R} \to \mathbb{C}$ be $K+1$ times continuously differentiable. Then for every real $h$,
of either sign,
\[ F(h) - \sum_{j=0}^{K} \frac{h^j}{j!}\, F^{(j)}(0) = \int_0^h \frac{(h-t)^K}{K!}\, F^{(K+1)}(t)\,dt. \]

In Lean. RMTFoundations.Taylor.remainder_eq_interval_integral in Challenge/Reference/Analysis/Taylor.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem remainder_eq_interval_integral (F : ℝ → ℂ /- [definition] -/ ) (K : ℕ /- [definition] -/ )
    (hF : ContDiff ℝ (K+1 : ℕ) F /- [standing] -/ ) (h : ℝ /- [standing] -/ ) :
    remainder F K h = ∫ t in (0:ℝ)..h,
      ((h-t)^K / (K.factorial : ℝ)) • iteratedDeriv (K+1) F t

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

Scalar binomial repeated-edge walk-count majorant; does not count walks itself

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

For natural numbers $k, v, s$ with $v \ge 1$ and $k + 2 = 2v + s$,
\[ \binom{k}{2v-2}\, v^{2s}\, 2^{2v-2} \le 2^k\, k^{3s}. \]
This is the scalar inequality used to bound walk counts; it does not itself count walks.

In Lean. RMTFoundations.WalkMajorant.walk_count_majorant in Challenge/Reference/Combinatorics/WalkMajorant.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem walk_count_majorant (k v s : ℕ /- [definition] -/ ) (hv : 1 ≤ v /- [standing] -/ ) (hk : k + 2 = 2 * v + s /- [standing] -/ ) :
    (k.choose (2 * v - 2) : ℝ) * (v : ℝ) ^ (2 * s) * 2 ^ (2 * v - 2)
      ≤ 2 ^ k * (k : ℝ) ^ (3 * s)

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

Any two Airy ODE solutions with identical first-order initial data agree

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

Suppose $(f, f')$ and $(g, g')$ both solve the Airy equation on $\mathbb{R}$: $f$ has derivative $f'$
and $f'$ has derivative $x f(x)$ at every $x$, and likewise for $g$ and $g'$. If $f(t_0) = g(t_0)$ and
$f'(t_0) = g'(t_0)$ at some point $t_0$, then $f = g$.

In Lean. RMTFoundations.Airy.airySolution_unique in Challenge/Reference/Airy/ODE.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem airySolution_unique (hf : IsAirySolution f f' /- [standing] -/ ) (hg : IsAirySolution g g' /- [standing] -/ ) {t₀ : ℝ /- [definition] -/ }
    (h0 : f t₀ = g t₀ /- [standing] -/ ) (h1 : f' t₀ = g' t₀ /- [standing] -/ ) : f = g

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

The finite-measure Stieltjes transform is analytic on the upper half-plane

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

For every finite measure $\mu$ on $\mathbb{R}$, the Stieltjes transform
\[ S_\mu(z) = \int \frac{d\mu(x)}{x - z} \]
is analytic on the upper half-plane $\{ z : \operatorname{Im} z > 0 \}$.

In Lean. RMTFoundations.Stieltjes.analyticOn_stieltjes in Challenge/Reference/Stieltjes/HalfPlane.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem analyticOn_stieltjes (μ : Measure ℝ /- [definition] -/ ) [IsFiniteMeasure μ /- [standing] -/ ] :
    AnalyticOn ℂ (stieltjes μ) {w : ℂ | 0 < w.im}

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

For aspect ratio 0 < y < 1, the explicitly constructed MP measure is a probability law

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

For $0 < y < 1$, the Marchenko--Pastur measure $\mu_y$ constructed in the library is a probability
measure.

In Lean. RMTFoundations.MarchenkoPastur.mpMeasure_prob in Challenge/Reference/Measure/MarchenkoPastur.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem mpMeasure_prob (y : ℝ 
     /- [definition] -/ ) (hy : 0 < y 
     /- [standing] -/ ) (hlt : y < 1 
     /- [standing] -/ ) : IsProbabilityMeasure (mpMeasure y)

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

The MP law equals volume weighted by its explicit density for 0 < y < 1

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

For $0 < y < 1$, the Marchenko--Pastur measure $\mu_y$ has the density
\[ \frac{\sqrt{(b - x)(x - a)}}{2\pi y x} \quad \text{on } [a, b], \qquad 0 \text{ elsewhere}, \]
with respect to Lebesgue measure, where $a = (1 - \sqrt{y})^2$ and $b = (1 + \sqrt{y})^2$.

In Lean. RMTFoundations.MarchenkoPastur.mpMeasure_density in Challenge/Reference/Measure/MarchenkoPastur.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem mpMeasure_density (y : ℝ 
     /- [definition] -/ ) (hy : 0 < y 
     /- [standing] -/ ) (hlt : y < 1 
     /- [standing] -/ ) : mpMeasure y = volume.withDensity (fun x => ENNReal.ofReal (mpDensity y x))

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

The genuine MP Stieltjes transform solves its covariance quadratic in the upper half-plane

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

For $0 < y < 1$ and $\operatorname{Im} z > 0$, the Stieltjes transform $m(z) = S_{\mu_y}(z)$ of the
Marchenko--Pastur measure satisfies
\[ y z\, m(z)^2 + (z + y - 1)\, m(z) + 1 = 0. \]

In Lean. RMTFoundations.MarchenkoPastur.mpMeasure_transform_quadratic in Challenge/Reference/Measure/MarchenkoPastur.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem mpMeasure_transform_quadratic (y : ℝ 
     /- [definition] -/ ) (hy : 0 < y 
     /- [standing] -/ ) (hlt : y < 1 
     /- [standing] -/ ) (z : ℂ 
     /- [definition] -/ ) (hz : 0 < z.im 
     /- [standing] -/ ) : (y : ℂ)*z*(stieltjes (mpMeasure y) z)^2+
      (z+y-1)*stieltjes (mpMeasure y) z+1 = 0

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

Analytic subordination for compactly supported probability measures with explicit support hypotheses

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

Let $\mu_1, \mu_2$ be probability measures on $\mathbb{R}$ supported in $[-R, R]$ for some $R > 0$, and
$\operatorname{Im} z > 0$. The library's subordination functions $\omega_1, \omega_2$ satisfy
$\operatorname{Im} \omega_j(z) \ge \operatorname{Im} z$ for $j = 1, 2$ and
\[ -\frac{1}{S_{\mu_1}(\omega_1(z))} = -\frac{1}{S_{\mu_2}(\omega_2(z))} = \omega_1(z) + \omega_2(z) - z. \]

In Lean. RMTFoundations.FreeConvolution.subordination in Challenge/Reference/Measure/FreeConvolution.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem subordination (h1 : SupportedIn μ1 R /- [standing] -/ ) (h2 : SupportedIn μ2 R /- [standing] -/ ) (hR : 0 < R /- [standing] -/ ) {z : ℂ /- [definition] -/ }
    (hz : 0 < z.im /- [standing] -/ ) :
    z.im ≤ (omega1 μ1 μ2 z).im ∧ z.im ≤ (omega2 μ1 μ2 z).im
      ∧ -(stieltjes μ1 (omega1 μ1 μ2 z))⁻¹ = omega1 μ1 μ2 z + omega2 μ1 μ2 z - z
      ∧ -(stieltjes μ2 (omega2 μ1 μ2 z))⁻¹ = omega1 μ1 μ2 z + omega2 μ1 μ2 z - z

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

Finite Herglotz-Borel representation under upper-half-plane holomorphy, positivity and an inverse-height bound

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

Let $F$ be holomorphic on the upper half-plane, with $\operatorname{Im} F(z) \ge 0$ and
$|F(z)| \le M / \operatorname{Im} z$ there. Then there is a finite measure $\mu$ on $\mathbb{R}$ of total
mass at most $M$ such that $F(z) = S_\mu(z)$ for every $z$ in the upper half-plane.

In Lean. RMTFoundations.HerglotzBorelProof.herglotzBorel in Challenge/Reference/Measure/HerglotzBorel.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem herglotzBorel : RMTFoundations.AnalyticHalfPlane.HerglotzBorel

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

The interval Stieltjes inversion limit includes the exact half-endpoint atom terms

Verified. Lean accepts the proof, and lean-pkg’s record shows every check of this result passed (the build, and the statement comparison).

In words.

For a finite measure $\nu$ on $\mathbb{R}$ and real $a < b$,
\[ \lim_{\eta \downarrow 0} \int_a^b \operatorname{Im} S_\nu(x + i\eta)\,dx
   = \pi \Big( \nu\big((a,b)\big) + \tfrac12\, \nu(\{a\}) + \tfrac12\, \nu(\{b\}) \Big). \]

In Lean. RMTFoundations.StieltjesInversion.tendsto_interval_im in Challenge/Reference/Measure/StieltjesInversion.lean: the statement the proof was checked against (the proof is in a separate file, and a second checker confirmed it proves exactly this).

theorem tendsto_interval_im (ν : Measure ℝ /- [definition] -/ ) [IsFiniteMeasure ν /- [standing] -/ ] (a b : ℝ /- [definition] -/ ) (hab : a < b /- [standing] -/ ) :
    Tendsto (fun η : ℝ => ∫ x in a..b, (stieltjes ν ((x : ℂ) + (η : ℂ) * Complex.I)).im)
      (𝓝[>] 0) (𝓝 (π * (ν.real (Ioo a b) + ν.real {a} / 2 + ν.real {b} / 2)))

Axioms. At most Classical.choice, Quot.sound, propext (what the build check records for the whole package).

Every result with each of its claims, in one table: Coverage.

What the checks establish

The full account of what each check covers and what it takes on trust is lean-pkg’s trust model.

How this was checked

Receipts

Receipt Check Commit Date Job SHA-256
.lean-receipts/8edff84bb8b0-5581013.json build 8edff84bb8b0 2026-10-17 — 56c95df82c4d5fb39d84a8a1c1b1cc526049a8733f872c94bf1b1330d236f066
.lean-receipts/8edff84bb8b0-comparator.json statement comparison 8edff84bb8b0 2026-10-17 — 901709b417ac6c2edf00000a88645ec90b3d7377075f95f02fb94be7b83ea459
.lean-receipts/8edff84bb8b0-slurm-5582463.json build 8edff84bb8b0 2026-10-17 slurm-5582463 4a582767900357f534b12f851e0a3fcbb38432ada76eb2f1b8a19c65efd28036
.lean-receipts/df8d037ff7db-comparator.json (used here) statement comparison df8d037ff7db 2026-10-21 — d434eaaa24572bbc1ec0f762fa30313c2d84697c0e7d22766094c9b01122f209
.lean-receipts/df8d037ff7db-slurm-5588758.json (used here) build df8d037ff7db 2026-10-20 slurm-5588758 fee03ee58ec07b574e9b30e4af136576f1681909fa45c1ae6924c955570ae2e8

(used here): the receipt the lean-pkg registry holds for this package, which the lines above read. SHA-256 is of the file as committed.

Reproduce

git clone https://github.com/chenle02/rmt-foundations-lean
cd rmt-foundations-lean
git checkout df8d037ff7db61ec172188bf20d85e7078199c70   # the commit the build check binds
lake exe cache get
lake build

Expected: #print axioms on any declaration above reports a subset of {Classical.choice, Quot.sound, propext} (the union the build check records); sorryAx never appears.

Citation

Le Chen. rmt-foundations: random-matrix and analytic foundations in Lean. Version 0.2.0. doi:10.5281/zenodo.23539485.

See CITATION.cff.

License

Released under Apache-2.0; see LICENSE.

Acknowledgments

Developed and verified with lean-pkg (doi:10.5281/zenodo.23272098). This work was completed in part with resources provided by the Auburn University Easley Cluster.