Applied Combinatorics V: Linear Recurrence Equations and the Advancement OperatorTextbook
Motivation
Linear recurrences with constant coefficients are among the first tools of enumerative combinatorics and the analysis of algorithms: the Fibonacci numbers, the number of binary strings avoiding a pattern, the running time of a divide-and-conquer loop and the number of tilings of a strip all satisfy relations of the form c0an+k+c1an+k−1+⋯+ckan=0. Chapter 9 of Keller and Trotter's Applied Combinatorics (appliedcombinatorics.org) treats such relations as linear equations in an operator, the advancement operator, in direct analogy with linear differential equations with constant coefficients. The chapter's Principal Theorem says that the solution set of such an equation is a vector space whose dimension equals the order of the recurrence; everything else in the chapter (general solutions for distinct and repeated roots, and the reduction of nonhomogeneous equations to homogeneous ones) is organised around it.
This mission formalizes that theorem, in the book's model of functions on all of Z, together with the numbered lemmas of Section 9.5 on which its outline rests.
Setting
Let V be the real vector space of all functions f:Z→R, with pointwise addition and scalar multiplication. The advancement operatorA:V→V is
Af(n)=f(n+1)(n∈Z),
a linear operator with Apf(n)=f(n+p) for p≥0. For a nonnegative integer k and real constants c0,c1,…,ck, the advancement operator polynomial is
p(A)=c0Ak+c1Ak−1+c2Ak−2+⋯+ck,
so that p(A)f(n)=c0f(n+k)+c1f(n+k−1)+⋯+ckf(n). The solution space of the homogeneous equation p(A)f=0 is
W={f∈V:p(A)f=0},
the kernel of p(A), a linear subspace of V. In Lean, A is AppliedComb.Recurrence.advance : Module.End ℝ (ℤ → ℝ), p(A) is opPoly k c for a coefficient vector c : Fin (k + 1) → ℝ with c i multiplying Ak−i, and W is solutionSpace k c := LinearMap.ker (opPoly k c). A factor A−r is advance - r • 1.
Formalization targets
Goal: Theorem 9.18 (the Principal Theorem)
For a positive integer k and real constants c0,…,ck with c0=0 and ck=0,
dimR{f:Z→R:(c0Ak+c1Ak−1+⋯+ck)f=0}=k.
Milestones
Lemma 9.19. If r=0 and (A−r)f=0, then f(n)=f(0)rn for every n∈Z.
Lemma 9.20. If c0,ck=0, g∈V is arbitrary and p(A)f0=g, then every solution of p(A)f=g is f=f0+f1 with f1∈W.
Theorem 9.21. If r1,…,rk are distinct nonzero reals, every solution of (A−r1)(A−r2)⋯(A−rk)f=0 has the form
f(n)=c1r1n+c2r2n+⋯+ckrkn(n∈Z).
Lemma 9.22. If k≥1 and r=0, then (A−r)kf=0 holds exactly when
f(n)=c1rn+c2nrn+c3n2rn+⋯+cknk−1rn(n∈Z)
for some real constants c1,…,ck.
Significance
The result itself. Theorem 9.18 is what justifies the standard recipe for solving a recurrence: once k linearly independent solutions are found, every solution is a linear combination of them, and k initial values pin down a unique solution. Theorems 9.21 and 9.22 name those k solutions when the characteristic polynomial splits over R, and Lemma 9.20 reduces nonhomogeneous recurrences, the ones arising from counting problems with a forcing term, to one particular solution plus the homogeneous space.
Formalizing it. The book states Theorem 9.18 without a full proof ("we won't prove the full result") and leaves Lemma 9.22 as an exercise, so a formalization supplies arguments the source omits. Mathlib's LinearRecurrence develops the N-indexed, monic version (LinearRecurrence.solSpace_rank); the bi-infinite, two-sided setting of the book, in which the constant term ck must be nonzero, is not in Mathlib or on the platform as of this mission.
Difficulty
The subspace part of Theorem 9.18 is immediate; the content is the dimension count, in both directions. On Z a solution must extend to negative indices as well as positive ones, so an argument that works for sequences indexed by N does not transfer: there the constant term plays no role and the dimension is k whatever the constant term, while on Z a vanishing ck changes the answer. The outline in the book proceeds through factorisations of p(A), which over R need not exist (complex roots), so the goal cannot be obtained by combining Theorems 9.21 and 9.22 alone. Lemma 9.22 requires showing that the functions njrn solve (A−r)kf=0 and that they exhaust its solutions, for n ranging over all integers.
Formalization scope
Functions are Z→R (the real space V of Section 9.5, p. 199), not N→R and not Z→C. Powers rn with n negative are integer powers (zpow), always of a nonzero base.
Dimension in the goal is Module.rank ℝ (solutionSpace k c) = k, a cardinal equality, so it also asserts finite-dimensionality.
The coefficient vector is c : Fin (k + 1) → ℝ; c 0 is the leading coefficient c0 and c (Fin.last k) the constant term ck.
Theorem 9.21 asserts one inclusion, as on the page ("every solution has the form"); Lemma 9.22 asserts both ("the general solution"), as an iff.
Lemma 9.22 carries the hypothesis r=0, the standing assumption of Section 9.5.2 (p. 200), which the lemma's own sentence does not repeat.
No O(·), "≈" or unspecified threshold occurs in these statements, so no explicit constant is instantiated.
Ruling out the trivial reading:W is defined as the kernel of the operator polynomial p(A), never as the span of k chosen functions, so the goal is not a statement about the rank of a spanning family.
Needed infrastructure: linear operators on the function space ℤ → ℝ, powers and products in Module.End, Module.rank/Module.finrank, and finite sums; Mathlib's LinearRecurrence may be adapted for the forward half. The definitions advance, opPoly and solutionSpace are reusable for any later mission on recurrences or on generating functions for bi-infinite sequences. Contributions of the milestone lemmas, of a proof of the goal that avoids factorisation over C, and of a complex-valued variant are welcome.
Selected references
Mitchel T. Keller and William T. Trotter, Applied Combinatorics, 2017 Edition, Chapter 9 (Recurrence Equations), CC BY-SA 4.0. appliedcombinatorics.org
Mathlib, Mathlib/Algebra/LinearRecurrence.lean (ℕ-indexed linear recurrences, LinearRecurrence.solSpace_rank). Mathlib docs
Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics, 2nd ed., Addison-Wesley, 1994, Section 7.3 (solving recurrences). ISBN 978-0-201-55802-9.
Randomized Algorithms for Estimating the Trace of an Implicit Symmetric Positive Semi-Definite Matrix IV: Sample Bound for Hutchinson's Trace EstimatorResearch Paper
Motivation
Many computations need the trace of a matrix A that is never formed explicitly and can only be applied to vectors: the trace of a matrix function such as trace(A−1) or logdetA=trace(logA) in statistics and lattice QCD, the Frobenius norm ∥B∥F2=trace(BTB) of an operator, or the number of triangles of a graph. The standard tool is Monte-Carlo estimation, introduced by M. F. Hutchinson (Hutchinson 1989): average M quadratic forms ziTAzi over random sign vectors zi. Each sample costs one matrix–vector product, uses one random bit per entry, and needs only additions and subtractions.
Before Avron and Toledo (2011), only the variance of such estimators had been analysed. A small variance does not say how many samples guarantee a given relative error with a given probability. Avron and Toledo gave the first bounds of this kind for several estimators. This mission covers the bound for Hutchinson's estimator, their Theorem 7.1.
Setting
A Rademacher random variable takes the values +1 and −1, each with probability 1/2. Let A∈Rn×n be symmetric positive semi-definite. Draw M≥1 independent random vectors z1,…,zM∈Rn whose Mn entries are independent Rademacher variables. Hutchinson's trace estimator is
HM=M1i=1∑MziTAzi.
A single sample zTAz is an unbiased estimator of trace(A) (Lemma 2.1 of the paper, due to Hutchinson). For symmetric A its variance is 2(∥A∥F2−∑iAii2), twice the squared Frobenius mass of A off the diagonal.
Given ϵ>0 and δ∈(0,1), a random estimator T is an (ϵ,δ)-approximator of trace(A) if
Pr(∣T−trace(A)∣≤ϵtrace(A))≥1−δ.
The rankrank(A) is the number of nonzero eigenvalues λj of A, counted with multiplicity.
Formalization targets
Goal: Theorem 7.1, sample bound for HM
For every symmetric positive semi-definite A, every 0<ϵ≤1/2 and every 0<δ<1,
M≥6ϵ−2ln(δ2rank(A))⟹HM is an (ϵ,δ)-approximator of trace(A).
The bound depends on A only through its rank. It does not depend on the dimension n, on the condition number, or on how the trace is spread over the diagonal.
Milestones
Lemma 7.2 (Achlioptas 2001, Lemma 5). For a unit vector α∈Rn and S=M1∑i=1M(αTzi)2, for every ϵ>0,
Pr(∣S−1∣≥ϵ)≤2exp(−2M(2ϵ2−3ϵ3)).
Per-direction bound (proof of Theorem 7.1, p. 8:11). Let r≥1 and 0<ϵ≤1/2. If M≥6ϵ−2ln(2r/δ), then Pr(∣S−1∣≥ϵ)≤δ/r.
From directions to the trace (proof of Theorem 7.1, p. 8:11). Write A=UΛUT and yi=UTzi. If ∣M1∑iyij2−1∣≤ϵ for every j with λj=0, then ∣HM−trace(A)∣≤ϵtrace(A). This step is deterministic.
Lemma 2.1 (Hutchinson). E(zTAz)=trace(A), and for symmetric A, Var(zTAz)=2(∥A∥F2−∑iAii2).
Significance
Theorem 7.1 gives a practitioner an explicit number of matrix–vector products after which Hutchinson's method is guaranteed to reach relative accuracy ϵ with confidence 1−δ. No bound was available before, although the method had been in wide use for two decades. The bound exceeds the one the same paper proves for Gaussian test vectors (20ϵ−2ln(2/δ)) by a ln(rank(A)) factor. The authors conjecture that this factor is not needed. Later work removed it: Roosta-Khorasani and Ascher (2015) proved a rank-free bound for the Rademacher case, and Cortinovis and Kressner (2022) extended sample bounds to indefinite matrices. Sample bounds of this type underlie variance-reduced estimators such as Hutch++ (Meyer et al. 2021).
The theorem is proved in the literature. To the platform's knowledge it has no machine-checked proof. Formalizing it produces a checked Rademacher concentration inequality for averages of squared linear forms (Achlioptas' lemma, which is also a core lemma of database-friendly Johnson–Lindenstrauss projections), and a checked spectral reduction from a quadratic-form estimator to its eigen-directions. Neither is currently in Mathlib.
Difficulty
The estimator is not an average of independent copies of a bounded variable with a small range: a single sample zTAz can deviate from trace(A) by an amount comparable to ∥A∥Fn. Chebyshev's inequality with the variance of Lemma 2.1 only gives a polynomial dependence on 1/δ. Hoeffding's inequality applied to zTAz directly gives a dependence on n and on the size of the entries of A. Unlike the Gaussian case, the estimator cannot be written as a weighted sum of independent chi-squared variables, because rotating a Rademacher vector does not give another Rademacher vector. The central difficulty is Lemma 7.2: a tail bound for (αTz)2 that holds uniformly over every unit direction α, including directions in which αTz is far from Gaussian (for α=e1 it is a constant).
Formalization scope
Matrices are Matrix (Fin n) (Fin n) ℝ, and positive semi-definiteness is Matrix.PosSemidef. The Rademacher law is 21(δ1+δ−1) on ℝ. The sample space is Fin M → Fin n → ℝ with the product of Mn copies of this law (hutchinsonSampleMeasure), so the law of the estimator is constructed, not assumed. HM(ω)=(M:R)−1∑iωi⋅(Aωi). Probabilities are Measure.real, and the (ϵ,δ)-approximator is Definition 4.1 verbatim. rank(A) is Matrix.rank. In Lemma 7.2 the i.i.d. copies Qi are the functions (α⋅zi)2 on this product space.
Corrections of printed statements, each recorded in the item's Formalization Note:
Theorem 7.1 is printed without a range on ϵ. Its proof needs 2M(2ϵ2−3ϵ3)≥6Mϵ2, which holds exactly when ϵ≤1/2. Without a range the printed statement is false: take A=n111T, n=104, ϵ=10 and δ=10−4. The condition admits M=1, while Pr(H1>11)≈9⋅10−4>δ. The goal and milestone 2 are therefore stated for 0<ϵ≤1/2.
Lemma 2.1 is printed for an arbitrary n×n matrix. The variance formula fails for non-symmetric A: for A=(0010) the variance is 1, not 2. Symmetry is assumed for the variance part only.
Proof of Theorem 7.1. The proof writes Λ=UAUT together with yi=UTzi. These fit together only for A=UΛUT, which is the convention of milestone 3.
For A=0 the threshold involves ln0. Lean's Real.log 0 = 0 turns the condition into M≥0, which agrees with the paper's reading ln0=−∞. The conclusion then holds because HM=trace(A)=0, so no extra hypothesis is added. A formalization that took the law of the samples as a hypothesis could make that hypothesis unsatisfiable and the theorem vacuous; the constructed product space rules this out.
A complete development needs:
the product Rademacher measure and moment generating functions of Rademacher sums;
a Chernoff bound for averages of i.i.d. bounded variables on a product space;
the spectral theorem for real symmetric matrices, with rank equal to the number of nonzero eigenvalues;
a finite union bound.
The Rademacher concentration results are reusable beyond this mission. Proofs of any milestone are welcome, as are alternative proofs of Lemma 7.2.
Selected references
H. Avron and S. Toledo, Randomized algorithms for estimating the trace of an implicit symmetric positive semi-definite matrix, Journal of the ACM 58(2), Article 8, 2011. https://doi.org/10.1145/1944345.1944349
M. F. Hutchinson, A stochastic estimator of the trace of the influence matrix for Laplacian smoothing splines, Communications in Statistics – Simulation and Computation 18(3), 1059–1076, 1989. https://doi.org/10.1080/03610918908812806
F. Roosta-Khorasani and U. Ascher, Improved bounds on sample size for implicit matrix trace estimators, Foundations of Computational Mathematics 15, 1187–1212, 2015. https://doi.org/10.1007/s10208-014-9220-1
A. Cortinovis and D. Kressner, On randomized trace estimates for indefinite matrices with an application to determinants, Foundations of Computational Mathematics 22, 875–903, 2022. https://doi.org/10.1007/s10208-021-09525-9
Randomized Algorithms for Estimating the Trace of an Implicit Symmetric Positive Semi-Definite Matrix II: Exact Rank of a Projection Matrix from the Gaussian Trace EstimatorResearch Paper
Motivation
Many matrices in scientific computing are available only implicitly: one can multiply a vector by A, for instance by solving a linear system or applying a matrix function, but the entries of A are never formed. Quantities such as the trace must then be estimated from a small number of matrix–vector products. Randomized trace estimators do exactly this: draw random vectors z, compute the quadratic forms zTAz, and average.
Avron and Toledo (J. ACM 58(2), 2011) gave the first sample bounds of the form "M samples suffice for relative error ϵ with probability 1−δ" for the standard estimators. Among their results is a case in which the estimate is not merely approximate but exact: when A is a projection matrix, its trace equals its rank, an integer, and rounding a Gaussian trace estimate recovers that integer with high probability. Computing the rank of a projection arises, for example, when charge densities are computed in electronic structure calculations without diagonalization (Bekas, Kokiopoulou and Saad 2007).
Setting
Let n≥1 and A∈Rn×n. A projection matrix here is an orthogonal projection: A is symmetric and A2=A. Equivalently, A is symmetric and every eigenvalue of A is 0 or 1; its rank rank(A) is the number of eigenvalues equal to 1.
Fix a number of samples M≥1. Let z1,…,zM∈Rn be random vectors whose Mn entries are independent standard normal random variables. The Gaussian trace estimator (Definition 3.1 of the paper) is
GM=M1i=1∑MziTAzi.
Its expectation is trace(A). For x∈R, round(x) denotes the nearest integer to x. For k≥1, a random variable X has the χ2 distribution with k degrees of freedom, X∼χ2(k), if it has the law of g12+⋯+gk2 for independent standard normal g1,…,gk.
Formalization targets
Goal: Lemma 5.3 (p. 8:9)
For a projection matrix A, a failure probability δ>0, and every integer M≥1 with M≥24rank(A)ln(2/δ),
Pr(round(GM)=rank(A))≤δ.
The number of samples depends on the rank and on δ only; there is no accuracy parameter, and none on n.
Milestones, in the order the proof uses them
Law of MGM.MGM∼χ2(Mrank(A)).
χ2 tail bound (cited by the paper from Li, Hastie and Church 2007). For X∼χ2(k), k≥1 and 0<ϵ≤21,
Pr(∣X−k∣≥ϵk)≤2exp(−kϵ2/6).
Tail of GM. For rank(A)≥1 and 0<ϵ≤21,
Pr(∣GM−rank(A)∣≥rank(A)ϵ)≤2exp(−Mrank(A)ϵ2/6).
Eq. (2). If moreover M≥6rank(A)−1ϵ−2ln(2/δ), then Pr(∣GM−rank(A)∣≥rank(A)ϵ)≤δ.
Trace of a projection.trace(A)=rank(A).
Significance
The lemma turns a randomized estimator into an exact algorithm with a controlled failure probability: the rank of an implicitly given projection is obtained from O(rank(A)log(1/δ)) matrix–vector products, independently of the dimension n. It is also an instance where the paper's general relative-error bound for the Gaussian estimator (Theorem 5.2, whose sample count grows like ϵ−2) is improved by exploiting the spectrum of A: an absolute error below 21 is a relative error ϵ=1/(2rank(A)), for which the general bound would require a number of samples quadratic in the rank, whereas Lemma 5.3 needs only a linear number.
The result is proved in the paper. The mission produces a machine-checked version of it, together with two pieces of reusable substrate: the exact χ2 law of a Gaussian quadratic form in an orthogonal projection, and a two-sided χ2 tail bound with explicit constant 1/6 on the range 0<ϵ≤1/2. To the best of available knowledge, none of these statements is formalized in Mathlib; a platform mission on the Johnson–Lindenstrauss lemma states a χ2 concentration bound with a different exponent, (ϵ2−ϵ3)/4, on the open range 0<ϵ<1/2, which does not cover the value ϵ=1/2 needed here when rank(A)=1.
Difficulty
The deterministic part is short; the probabilistic part is not. The step "y=Uz has independent standard normal entries because U is orthogonal" is the rotation invariance of the standard Gaussian measure on Rn, and it must be combined with the independence of the M samples to identify the law of a sum of Mrank(A) squares; this is a statement about product measures and pushforwards, not about moments. The χ2 tail bound is quoted by the paper without proof. Its constant 1/6 is not the constant of the usual textbook χ2 estimates, and the bound is false outside a restricted range of ϵ (see below), so a generic sub-exponential concentration inequality with unspecified constants does not deliver it. Finally, the rounding step requires matching Mathlib's round with the event ∣GM−rank(A)∣<21.
Formalization scope
All declarations live in the namespace TraceEstimation.ProjectionRank. Matrices are Matrix (Fin n) (Fin n) ℝ. The sample space of GM is Fin M → Fin n → ℝ with the product measure Measure.pi (fun _ => Measure.pi (fun _ => gaussianReal 0 1)), so the law of the estimator is constructed, not assumed. Probabilities are Measure.real of events. "Projection matrix" is A.IsHermitian ∧ A * A = A (orthogonal projection); a non-symmetric idempotent also has eigenvalues 0 and 1, but the paper's proof diagonalizes A by a unitary matrix, which requires symmetry. round is Mathlib's round : ℝ → ℤ; the rank is Matrix.rank. The χ2 distribution is not defined: its role is played by the pushforward of a product of standard normals under g↦∑lgl2.
Corrections of the printed text, both in the χ2 tail bound (milestone 2):
The paper prints Pr(∣X−k∣≤ϵk)≤2exp(−kϵ2/6). The inner ≤ is a misprint for ≥; the next display applies the bound with ≥.
The paper gives no range for ϵ. The bound fails for ϵ=1 and large k, since Pr(X≥2k) decays like e−k(1−ln2)/2, slower than e−k/6. The mission states it for 0<ϵ≤1/2, and milestones 3 and 4 inherit that range; the proof uses only ϵ=1/(2rank(A))≤1/2.
The goal keeps the paper's hypotheses: δ>0 with no upper bound, and rank(A)=0 allowed (both are true cases). A statement about the event ∣GM−rank(A)∣<21, or Eq. (2) alone, is not the goal; the goal is about round(GM). The sample measure is a probability measure, so the bound ≤δ is not vacuous.
Contributions welcome beyond the milestones: rotation invariance of the standard Gaussian vector under orthogonal matrices, the moment generating function of χ2(k), and the spectral fact trace(A)=rank(A) for idempotents, each reusable well outside this mission.
Selected references
H. Avron and S. Toledo, Randomized algorithms for estimating the trace of an implicit symmetric positive semi-definite matrix, Journal of the ACM 58(2), Article 8, 2011. https://doi.org/10.1145/1944345.1944349
P. Li, T. Hastie and K. Church, Nonlinear estimators and tail bounds for dimension reduction in l1 using Cauchy random projections, in Learning Theory (COLT 2007), Lecture Notes in Computer Science 4539, Springer, 514–529, 2007 (the version the paper cites); journal version in Journal of Machine Learning Research 8, 2497–2532, 2007, https://jmlr.org/papers/v8/li07b.html
C. Bekas, E. Kokiopoulou and Y. Saad, An estimator for the diagonal of a matrix, Applied Numerical Mathematics 57(11–12), 1214–1229, 2007. https://doi.org/10.1016/j.apnum.2007.01.003
M. F. Hutchinson, A stochastic estimator of the trace of the influence matrix for Laplacian smoothing splines, Communications in Statistics – Simulation and Computation 19(2), 433–450, 1990. https://doi.org/10.1080/03610919008812866
On Controllability of Delayed Boolean Control Networks: Trajectory Controllability Avoiding Forbidden Trajectories Iff the Reduced Transition-Count Matrix Is IrreducibleResearch Paper
Motivation
Boolean networks model gene regulatory networks by giving each gene an on/off value and updating all values synchronously by logical rules (Kauffman, 1969). Adding external Boolean inputs gives Boolean control networks (BCNs), in which a designer (a drug, an intervention) chooses the inputs over time. The basic control-theoretic question is controllability: can the inputs drive the network from any configuration to any other? Cheng and Qi (Automatica 2009) answered it for BCNs using the semi-tensor product of matrices, which rewrites a BCN as a linear recursion on canonical basis vectors.
Biological regulation is not instantaneous: transcription and translation introduce delays, so the next value of a gene can depend on several past values. Lu, Zhong, Ho, Tang and Cao (SIAM J. Control Optim. 2016) study delayed BCNs, in which the update reads the last μ states, and give criteria for two kinds of controllability, including the case where some configurations are dangerous and must be avoided (in biology, states corresponding to disease). The mission formalizes their criteria.
Setting
Write D={0,1}. A state is x=(x1,…,xn)∈Dn and an input value is u∈Dm. Fix μ≥1. The delayed BCN (2.2) is
xi(t+1)=fi(u(t),x(t−μ+1),…,x(t)),i=1,…,n,
with arbitrary Boolean functions fi:Dm+μn→D, collected into one map F with x(t+1)=F(u(t),X(t)). A trajectory is the window X(t)=(x(t−μ+1),…,x(t)) of the last μ states; its last entry is the current state. One step maps X(t) under the input u(t) to X(t+1)=(x(t−μ+2),…,x(t+1)). A control sequence of length k is U=(u(0),…,u(k−1)), with inputs chosen freely; y(i)=X(i) denotes the trajectory after i steps from an initial trajectory y(0).
The transition-count matrixQ has rows and columns indexed by trajectories:
Qb,a is the number of input values u taking trajectory a to trajectory b in one step.
For a set Ct of forbidden trajectories, QCt is Q with the rows and columns of Ct replaced by zeros, and QCt is Q with those rows and columns deleted.
The notions of controllability are:
Trajectory controllable (Definition 3.1): from every initial trajectory, every trajectory Xd equals X(k) for some k≥1 and some control sequence.
Trajectory controllable under Ct (Definition 3.11): for all trajectories a,b∈/Ct there are k≥0 and a control sequence steering y(0)=a to y(k)=b with y(i)∈/Ct for i=0,…,k.
State controllable (Definition 4.1): from every initial trajectory, every state equals x(k) for some k>0 and some control sequence.
A real square matrix A of size N≥2 is reducible (Definition 3.7) if a simultaneous permutation of rows and columns brings it to block upper-triangular form (A110A12A22) with square diagonal blocks; it is irreducible otherwise, so every 1×1 matrix is irreducible.
N1(k;ya,yb,Ct) counts the control sequences of length k steering ya to yb while avoiding Ct; N2(k;a,bs) counts those steering the initial trajectory a to x(k)=bs; Ξμp is the set of trajectories with current state p.
Formalization targets
Goal: Theorem 3.12
the delayed BCN is trajectory controllable under Ct⟺QCtis irreducible,
for every μ≥1, n, m, every update map and every forbidden set Ct. It is the most general criterion of the paper.
Milestones
Proposition 3.5: for k>0, N1(k;ya,yb,Ct)=ybT(QCt)kya.
Theorem 5.1: the same count while avoiding forbidden states Cs, with Q zeroed on the trajectories containing a state of Cs.
Corollary 5.3: trajectory controllability implies state controllability.
A supporting item, Lemma 3.9 (corrected form), relates Definition 3.7 to positivity of entries of powers for nonnegative matrices of size at least 2.
Significance
The criteria replace a question about control sequences of unbounded length by a finite test on one nonnegative integer matrix of size 2μn. The counting identities give more than a yes/no answer: they enumerate the control sequences achieving a transfer, which is what a designer choosing among interventions needs, and they handle forbidden states by passing to forbidden trajectories.
The results are proved in the paper; none of them has a machine-checked proof. Formalizing them yields a reusable Lean model of delayed (and, for μ=1, ordinary) Boolean control networks defined directly through their dynamics, together with a checked bridge from dynamic reachability to the combinatorics of nonnegative matrices. A formal version also pins down points the printed text leaves loose: Lemma 3.9 as printed is false (it characterizes primitive, not irreducible, matrices), and the two different matrices QCt (zeroed) and QCt (deleted) must not be confused.
Difficulty
The central step is the passage between three objects: reachability under the dynamics, positivity of entries of powers of Q, and the block-triangular definition of irreducibility. The counting identity for powers of Q is a statement about sequences of inputs, not about paths in a graph, so the bijection between control sequences and weighted walks has to be established with the avoidance constraint carried at every intermediate time, including the endpoints. The equivalence between Definition 3.7 and strong connectivity is the classical graph-theoretic characterization, but it has edge cases the obvious argument misses: a 1×1 zero matrix is irreducible by Definition 3.7 yet has no positive power, which is exactly why Definition 3.11 allows k=0 while Definition 3.1 does not. A proof that routes through "some power of QCt is entrywise positive", following the printed Lemma 3.9, proves a false intermediate statement.
Formalization scope
Conventions committed to in Lean:
A state is Fin n → Bool (true is the paper's 1); a trajectory is Fin μ → State n with index 0 the oldest state and index μ−1 the current state; μ≥1 is a standing assumption (NeZero μ); n,m≥0 are arbitrary and no assumption is placed on the update functions.
Matrices are indexed by trajectories rather than by the paper's index j of δ2μnj. The paper's Q=L⋉12m is obtained by the simultaneous relabelling of Lemma 2.6, and every statement (entries of powers, sums over sets of trajectories, Definition 3.7) is invariant under it. QCt is indexed by the subtype of allowed trajectories.
Irreducibility is Definition 3.7 applied to the matrix with entries cast to R; it is not Mathlib's Matrix.IsIrreducible, which differs on 1×1 matrices.
Pinned readings: Definition 3.1 and Definition 4.1 use k≥1; Definition 3.11 uses k≥0; Proposition 3.5, Theorem 4.3 and Theorem 5.1 are stated for k>0 (Proposition 3.5 is false at k=0 when ya=yb∈Ct); Remark 3 holds for all k≥0. "Avoiding Cs" in Theorem 5.1 means that no state x(i), i=1−μ,…,k, lies in Cs, which is the theorem's own middle term N1(k;a,b,ΞCs). Ξμp is defined semantically by eq. (4.3), since the printed index range in (4.4) is a misprint. Lemma 3.9 is included in corrected form with N≥2.
Controllability is defined through the dynamics and control sequences, never as positivity of entries of powers of Q; a formalization that defines reachability by (Qk)b,a>0 would reduce Theorems 3.10 and 3.12 to library facts and is ruled out.
Needed infrastructure: the correspondence between control sequences and products of entries of Q (the core of Proposition 3.5), and the equivalence of Definition 3.7 with strong connectivity of the support graph for nonnegative matrices (Mathlib's Matrix.IsIrreducible, Matrix.isIrreducible_iff_exists_pow_pos and Matrix.pow_apply_pos_iff_nonempty_path cover much of the second part for sizes at least 2). Both are reusable beyond this mission, for ordinary BCNs, probabilistic BCNs and finite automata. Contributions of either piece, or of the semi-tensor-product bridge identifying Q with L⋉12m, are welcome.
Selected references
J. Lu, J. Zhong, D. W. C. Ho, Y. Tang, J. Cao, On Controllability of Delayed Boolean Control Networks, SIAM J. Control Optim. 54(2):475–494, 2016. https://doi.org/10.1137/140991820
A. Berman, R. J. Plemmons, Nonnegative Matrices in the Mathematical Sciences, SIAM Classics in Applied Mathematics 9, 1994. https://doi.org/10.1137/1.9781611971262
Approximating Clique-Width and Branch-Width: Well-Linked Sets Certify Clique-WidthResearch Paper
Motivation
Clique-width is a graph parameter introduced by Courcelle and Olariu (Discrete Appl. Math. 101 (2000)) that measures how far a graph is from being built by a few labelled operations. Every problem expressible in monadic second-order logic with quantification over vertices and vertex sets (MSO1) can be solved in linear time on graphs given together with a decomposition of bounded clique-width (Courcelle, Makowsky and Rotics, Theory Comput. Syst. 33 (2000)). Bounded clique-width is more general than bounded tree-width: complete graphs have unbounded tree-width but clique-width 2.
For fixed k there was, before this paper, no polynomial-time algorithm that either decides that a graph has clique-width at least k+1 or outputs a decomposition of clique-width bounded by a function of k; the best known algorithm, by Johansson (2001), gave width 2klogn. Oum and Seymour (J. Combin. Theory Ser. B 96 (2006)) closed this gap with approximation 23k+2−1, through rank-width and a factor-3 approximation for the branch-width of symmetric submodular functions.
2000: Courcelle and Olariu define clique-width; Courcelle, Makowsky and Rotics solve MSO1 problems on graphs given with a k-expression.
2001: Johansson gives a 2klogn approximation.
2006: Oum and Seymour define rank-width, prove rwd(G)≤cwd(G)≤2rwd(G)+1−1, and give an O(n9logn) algorithm that outputs a (23k+2−1)-expression or certifies clique-width above k.
Setting
All graphs are finite and simple. For a finite set V, a function f:2V→Z is submodular if f(X)+f(Y)≥f(X∩Y)+f(X∪Y) and symmetric if f(X)=f(V∖X).
A branch-decomposition of f is a pair (T,L) where T is a tree with at least two vertices and all degrees at most 3, and L is a bijection from V onto the leaves of T. Removing an edge e of T splits the leaves in two; the width of e is f of the set of elements of V on one side. The width of (T,L) is the largest edge width, and the branch-widthbw(f) is the least width of a branch-decomposition, with bw(f)=f(∅) when ∣V∣≤1.
A set W⊆V is well-linked with respect to f if for every partition (X,Y) of W and every Z with X⊆Z⊆V∖Y, f(Z)≥min(∣X∣,∣Y∣).
Let A(G) be the adjacency matrix of G over GF(2). For disjoint X,Y⊆V(G), cutrkG∗(X,Y) is the rank of the submatrix of A(G) with rows X and columns Y, and the cut-rank function is cutrkG(X)=cutrkG∗(X,V(G)∖X). The rank-widthrwd(G) is bw(cutrkG).
A k-expression is a term built from constants ⋅i (a vertex with label i∈{1,…,k}), the operators ηi,j (i=j; add all edges between labels i and j), ρi→j (relabel i into j) and disjoint union ⊕. Its value is the labelled graph it produces; G has clique-widthcwd(G)≤k if some k-expression has value isomorphic to G.
An interpolation of f is a function f∗ on disjoint pairs (X,Y) that agrees with f on (X,V∖X), is monotone, submodular in the sense f∗(A,B)+f∗(C,D)≥f∗(A∩C,B∪D)+f∗(A∪C,B∩D), and has f∗(∅,∅)=f(∅).
Formalization targets
Goal: Theorem 1.1, certificate form
For a graph G with at least one vertex and an integer k≥1:
∃W,∣W∣=3k+1,W well-linked for cutrkG⟹cwd(G)≥k+1,∄W,∣W∣=3k+1,W well-linked for cutrkG⟹cwd(G)≤23k+2−1.
The same explicit condition decides which side of the approximation holds; this is what the paper's algorithm certifies.
Milestones
Proposition 4.1: properties of an interpolation, including that X↦f∗(X,B)−f(∅) is a matroid rank function on V∖B when f({v})−f(∅)≤1.
Proposition 4.2: fmin(X,Y)=minX⊆Z⊆V∖Yf(Z) is an interpolation.
Theorem 5.1: a well-linked set of size k forces bw(f)≥k/3 (for k=1).
Theorem 5.2: no well-linked set of size k implies bw(f)≤k, when f({v})≤1.
Corollary 6.2: submodularity of cutrkG∗ and cutrkG.
Section 6 claim: cutrkG is symmetric submodular and cutrkG∗ interpolates it.
Proposition 6.3: rwd(G)≤cwd(G)≤2rwd(G)+1−1.
Significance
The dichotomy turns clique-width, for which no exact polynomial algorithm is known even for fixed k, into a parameter that can be approximated with an explicit witness in each direction. Downstream, every algorithm for graphs of bounded clique-width that needs a k-expression as input becomes applicable to graphs given without one, at the cost of an exponential blow-up of the width.
The result is proved in the literature; this mission formalizes it. To our knowledge none of the objects involved — branch-width of set functions, rank-width, cut-rank, k-expressions, clique-width — has been formalized in Mathlib, and the submodularity of submatrix rank (Proposition 6.1) is absent from Mathlib's Matrix.rank API. The formal development would give reusable definitions of branch-decompositions of arbitrary integer set functions, of cut-rank, and of clique-width, and a machine-checked link between the combinatorial and the linear-algebraic width parameters.
Difficulty
The upper bound in Theorem 5.2 is the core. The natural approach, growing a branch-decomposition one leaf split at a time while keeping the width at most k, gets stuck at a leaf carrying a set B with f(B)=k: a split of B into two parts of f-value below k has to be found, and it must be found from the failure of well-linkedness of a set that is not obviously related to B. The paper's device is the interpolation f∗, which attaches a matroid to B whose base has exactly f(B) elements. Formalizing this requires handling partial branch-decompositions, their extensions, and a maximality argument over trees, none of which exists in Mathlib.
Proposition 6.3's upper bound is a second, independent difficulty: a rank-decomposition must be converted into a k-expression by an induction over a rooted binary tree, with a relabelling argument bounding the number of labels by the number of distinct nonzero rows of a GF(2) matrix of rank k. Its lower bound needs the tree structure of a k-expression to be read as a branch-decomposition.
Formalization scope
The ground set is a Fintype V with DecidableEq V; subsets are Finset V; set functions are Finset V → ℤ, as in the paper. A branch-decomposition is a tree T : SimpleGraph (Fin n) with n≥2, all neighbour sets of size at most 3, and an injective map L from V onto the vertices of degree 1; the side of an edge uw is found by reachability from u after deleting uw. Branch-width, rank-width and clique-width are never computed as minima: "bw(f)≤k" is the predicate "∣V∣≤1 and f(∅)≤k, or a branch-decomposition of width at most k exists", lower bounds say that every branch-decomposition has a wide edge, and "cwd(G)≤k" is "G has a k-expression". Labels {1,…,k} are Fin k. The value of a k-expression has as vertex type the occurrences of constants (a nested sum type), and ηi,j requires i=j. Cut-rank uses Matrix.rank over ZMod 2 of submatrices of SimpleGraph.adjMatrix. An interpolation is a function on all pairs of subsets whose axioms are imposed on disjoint pairs only.
Running time is not formalized. The paper's Theorem 1.1 asserts an O(n9logn) algorithm; there is no cost model on the page, and the goal states the certificate the algorithm returns instead. Without the running time, "cwd(G)≥k+1 or cwd(G)≤23k+2−1" holds for every graph, so that reading is ruled out as a formalization of the goal; so are well-linkedness with respect to anything other than cutrkG, widths defined by an unguarded infimum (which is 0 on an empty family), k-expressions whose value is not the graph up to isomorphism or whose η may join equal labels, and Theorem 5.1 stated for k=1.
Correction of Theorem 5.1. As printed, Theorem 5.1 fails for k=1: a singleton is always well-linked, but the edgeless graph on two vertices has cut-rank identically 0 and branch-width 0<1/3. The milestone carries the hypothesis k=1; the goal uses the theorem only at size 3k+1≥4.
The graph with no vertex is excluded from the goal and from the upper bound of Proposition 6.3, since it has no k-expression for any k. Contributions welcome: proofs of the milestones, lemmas on branch-decompositions (suppressing degree-2 vertices, extending partial decompositions), and submatrix-rank submodularity, which is reusable beyond this mission.
B. Courcelle, J. A. Makowsky and U. Rotics, Linear time solvable optimization problems on graphs of bounded clique-width, Theory Comput. Syst. 33 (2000) 125–150. https://doi.org/10.1007/s002249910009
Sparse Approximate Solutions to Linear Systems 2: An Exact Cover by 3-Sets Exists iff Its Incidence System Has a 1/2-Approximate Solution with at Most m/3 NonzerosResearch Paper
Motivation
Many problems in signal processing, statistics and function interpolation ask for a solution of a linear system Ax≈b that uses as few columns of A as possible: a sparse approximate solution. Natarajan's 1995 paper Sparse Approximate Solutions to Linear Systems (SIAM J. Comput. 24(2):227–234) was motivated by radial basis interpolation, where each column corresponds to a basis function and fewer columns mean a cheaper interpolant. The paper does two things. It proves that finding the sparsest approximate solution is computationally hard (§2, Theorem 1), and it analyses a greedy column-selection algorithm whose number of chosen columns is within a factor, depending on the conditioning of A, of the optimum (§3, Theorem 2; a separate mission of this series).
The hardness theorem is the reason the second half of the paper exists: once exact minimization is ruled out, one settles for approximation guarantees. It is cited throughout the compressed-sensing literature as the canonical statement that ℓ0-minimization under an ℓ2 error constraint is NP-hard, and is the starting point for the later theory of when convex relaxations recover sparse solutions.
The argument follows the classical reduction from Exact Cover by 3-sets (X3C) to minimum-weight solutions of linear systems in Garey and Johnson (1979), pp. 221 and 246, adapted to an approximate right-hand side.
Setting
Sparse approximate solution (SAS). Given a matrix A∈Rm×n, a vector b∈Rm and a tolerance ε>0, find a vector x∈Rn with ∥Ax−b∥2≤ε whose number of nonzero entries, written ∥x∥0=∣{j:xj=0}∣, is as small as possible. Here ∥⋅∥2 is the Euclidean norm.
Exact Cover by 3-sets (X3C). An instance is a ground set S={s1,…,sm} and a list C=c1,…,cn of subsets of S, each with exactly three elements. An exact cover is a sub-collection C^={cj:j∈J}, J⊆{1,…,n}, such that every element of S occurs in exactly one set of C^.
The transformation. From an X3C instance build the SAS instance with
the incidence matrixA∈Rm×n: Aij=1 if si∈cj and Aij=0 otherwise, so column j is the characteristic vector of cj;
the all-ones vector b=(1,1,…,1)∈Rm;
the tolerance ε=21.
In Lean, S is Fin m, the collection is C : Fin n → Finset (Fin m) with hC : ∀ j, (C j).card = 3, an exact cover is an index set J with IsExactCover C J, the matrix is incidence C, the vector b is onesVec m, Ax is Matrix.toEuclideanLin (incidence C) x, and ∥x∥0 is nnz x.
Formalization targets
Goal: correctness of the reduction
For every X3C instance (S,C) as above,
(∃J,{cj}j∈J is an exact cover of S)⟺(∃x∈Rn,∥Ax−b∥2≤21and3∥x∥0≤m).
This is the sentence the proof of Theorem 1 (p. 228) establishes: "the constructed instance of SAS has a solution with m/3 or fewer entries if and only if the given instance of X3C has a solution."
Milestones
Forward direction. If {cj}j∈J is an exact cover, the indicator vector x=1J satisfies Ax=b and 3∥x∥0=m.
Entry bounds. For every x with ∥Ax−b∥2≤21, each entry of Ax lies in [21,23].
Lower bound on sparsity. For every such x, m≤3∥x∥0.
Exact cover from a sparse solution. If moreover 3∥x∥0≤m, the sets cj with xj=0 form an exact cover.
Significance
The result. The equivalence shows that deciding whether a sparse approximate solution with a prescribed number of nonzeros exists is at least as hard as X3C, which is NP-complete. Consequently no polynomial-time algorithm computes the optimum of SAS unless P = NP, and approximation algorithms such as the greedy method of §3 are the natural object of study. The same instance shows hardness persists for 0/1 matrices, a right-hand side of all ones and a constant tolerance, so the difficulty does not come from ill-conditioned data or from vanishing precision.
Formalizing it. The reduction is proved in the paper; this mission produces a machine-checked proof of its correctness, the combinatorial core of every NP-hardness claim for ℓ0-constrained least squares. No prior machine-checked version is known to exist, on the platform or elsewhere. The complexity-theoretic wrapper is out of scope (see below).
Difficulty
The forward direction is a direct computation. The converse contains the only real step, which the paper passes over with "it is clear". From ∥Ax−b∥2≤21 one gets only that every entry of Ax is in [21,23]; the entries of x themselves are arbitrary reals, possibly negative or not equal to 1, so x need not be an indicator vector and Ax=b need not hold. The exact-cover property must therefore be extracted from support sizes alone: every element is covered by some column in the support, the support has at most m/3 columns of three elements each, and a counting argument forces the chosen sets to be pairwise disjoint. Reading off a cover from the values of x (for instance, taking the j with xj=1) does not work.
Formalization scope
Vectors live in EuclideanSpace ℝ (Fin m) and EuclideanSpace ℝ (Fin n), so ‖·‖ is the paper's ∥⋅∥2. Using the sup norm of Fin m → ℝ would give a different statement.
The tolerance is exactly ε=21, as printed.
The collection is indexed, C : Fin n → Finset (Fin m): repeated sets are allowed and are distinct indices; an exact cover is a set of indices, and on the SAS side one nonzero entry is counted per index, so both sides treat duplicates consistently.
"m/3 or fewer" is written 3∥x∥0≤m, never with natural-number division. With this form the equivalence holds for every m (both sides are false when 3∤m), which absorbs the paper's "without loss of generality m is a multiple of 3"; no divisibility hypothesis is assumed. For m=0 both sides are true.
The hypothesis that every set has exactly three elements is essential for the converse (with m=9, O={s3,…,s9}, c1={s1}∪O, c2={s2}∪O, c3=O, the vector x=(1,1,−1) solves Ax=b with 3∥x∥0=m, yet C has no exact cover since c1 and c2 must both be chosen) and is kept as hC.
Not formalized: the infinite-precision RAM machine model, polynomial-time many-one reductions, polynomial-time computability of the transformation (evident: an m×n 0/1 matrix), and the NP-completeness of X3C (cited by the paper from Garey–Johnson). The goal is therefore the correctness of the transformation, not a statement titled "SAS is NP-hard". A statement that only records the forward direction, or that fixes x to be a 0/1 vector on the SAS side, would trivialize the converse and is not the target.
Tools a solver will need are in Mathlib: coordinate bounds for the Euclidean norm (PiLp.norm_apply_le), Finset.card_biUnion_le, and Finset.card_biUnion for disjoint unions. Contributions of a reusable exact-cover API, or of a polynomial-time reduction framework that could later wrap this equivalence into an NP-hardness theorem, are welcome.
M. R. Garey and D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W. H. Freeman, 1979 (X3C: problem [SP2], p. 221; minimum weight solution to linear equations: [MP5], p. 246).
Robust Solutions to Least-Squares Problems with Uncertain Data IV: A Semidefinite Upper Bound on the Linear-Fractional Worst-Case Residual, Exact for Full PerturbationsResearch Paper
Motivation
Least-squares fitting is a standard tool in estimation, identification and data analysis, and its data A, b are rarely known exactly. El Ghaoui and Lebret (SIAM J. Matrix Anal. Appl. 18(4), 1997) proposed to choose x to minimize the worst-case residual over a set of admissible data perturbations. Earlier missions of this series treat unstructured perturbations of [Ab] and perturbations affine in a parameter vector. §5 of the paper covers a more general model, taken from robust identification (Doyle et al.): the perturbed data depend on an uncertain matrix Δ through a linear-fractional transformation. This form covers rational dependence of the data on uncertain parameters, max-norm bounds on independent parameters, and data matrices with some columns known exactly (pp. 1046–1047).
In this generality, deciding whether the worst-case residual is finite is NP-complete, and computing it is NP-hard even when the dependence is affine (§5.3, Lemma 5.1). Theorem 5.2 gives the tractable replacement: a semidefinite program whose value bounds the worst-case residual from above, and equals it when the perturbation is unstructured. The main tool is a structured form of the S-procedure. Robust control uses the same tool, with the scalings S and G below, to bound the real structured singular value (Fan, Tits and Doyle, 1991).
Setting
Vectors carry the Euclidean norm ∥v∥. For a matrix X, ∥X∥ is its largest singular value (operator norm between Euclidean spaces). Let D be a linear subspace of RN×N (the perturbation structure), and fix A∈Rn×m, b∈Rn, L∈Rn×N, RA∈RN×m, Rb∈RN, D∈RN×N. For Δ∈D with det(I−DΔ)=0 the perturbed data are
A(Δ)=A+LΔ(I−DΔ)−1RA,b(Δ)=b+LΔ(I−DΔ)−1Rb.
With the normalization ρ=1 (the paper's, with no loss of generality), the worst-case residual of x∈Rm is
rD(A,b,x)=Δ∈D,∥Δ∥≤1max∥A(Δ)x−b(Δ)∥
if det(I−DΔ)=0 for every such Δ, and +∞ otherwise (35). The commutant scalings are S={S=ST:SΔ=ΔS∀Δ∈D} and G={G=−GT:GΔ=ΔG∀Δ∈D} (37). The SDP constraint is
Part (a) says the value of the SDP inf{λ:(λ,S,G) feasible} (40) is an upper bound on rD. Part (b) says this upper bound is exact for full perturbations, including the case rD=∞, where (40) is infeasible.
Milestones
Lemma 2.2, both directions: the full-block S-procedure. det(I−T4Δ)=0 and T(Δ)⪰0 for all ∥Δ∥≤1 if and only if ∥T4∥<1 and a one-scalar LMI (10) holds (the "only if" under T2=0 or T3=0).
Lemma 2.3: sufficiency of the scaled LMI for a structured D, and its strict necessity for D=RN×N.
§5.4, p. 1047: λ>rD(A,b,x) if and only if a linear-fractional matrix function of Δ is positive definite on the structured unit ball.
§5.4, (38)–(39): the certificate (a) in the paper's own words.
Significance
The worst-case residual under linear-fractional uncertainty cannot be computed efficiently unless P = NP. Theorem 5.2 gives an SDP-computable upper bound with an explicit certificate (S,G). Since x enters (38) linearly, the same constraint can also be optimized over x (Theorem 5.3, not part of this mission). For D=RN×N the bound is exact, which covers the model [A(Δ)b(Δ)]=[Ab]+LΔ[RARb] and, as a special case, the unstructured problem of §3.
The results are proved in the paper (the proof of Theorem 5.2 is only indicated, through Appendix C). No machine-checked version of these statements, of Lemma 2.2 or of the structured S-procedure with commutant scalings is known. The formalization also fixes the statements. As printed, Lemma 2.2's "only if", Lemma 2.3 and the upper bound of Theorem 5.2 are each false in a boundary or structural case (see Formalization scope). The corrected forms stated here are the ones the paper's proofs support.
Difficulty
Part (a) reduces to robust positivity of a linear-fractional matrix function, and the difficulty is the inverse (I−DΔ)−1. The certificate is one LMI in which Δ does not appear, while the conclusion is about a rational function of Δ over a whole structured ball. The certificate also has to guarantee that I−DΔ is invertible everywhere on that ball, and not only that the residual is small where it is defined. Evaluating F at a single point does not show this. Part (b) needs a lossless S-procedure in its strict form. The standard (non-strict) S-lemma gives only ⪰, and the gap between strict and non-strict inequalities is exactly where the printed statements fail. The degenerate case T2=0 is not covered by the S-lemma's regularity condition and has to be handled separately.
Formalization scope
Dimensions are Fin n, Fin m, Fin N; D is a Submodule ℝ (Matrix (Fin N) (Fin N) ℝ), with D=RN×N as ⊤. The Euclidean norm is written out, because ‖·‖ on Fin n → ℝ is the sup norm. ∥Δ∥ is the operator norm of Matrix.toEuclideanLin Δ, the largest singular value.
λ>rD(A,b,x) is the predicate ResidualBelow: every Δ∈D with ∥Δ∥≤1 has det(I−DΔ)=0 and residual <λ. It is false for every λ when rD=∞. No real-valued supremum is used, so the ∞ branch of (35) cannot turn into a default 0. Matrix inverses are Mathlib's Matrix.inv, and every use carries the determinant condition.
ρ=1 throughout, as in the paper; general ρ follows by scaling Δ.
Corrections of the printed statements. (i) (40) must require S≻0. Without it, N=n=m=1, D=2, L=1, A=b=RA=Rb=0, x=0, S=−1, G=0 satisfy (38) for every λ>1/3, while rD=∞. (ii) G must make GΔ skew-symmetric for every Δ∈D, which is the identity pTGq=0 used in the proof of Lemma 2.3. For D=span{I,J}, J=[0−110], the printed bound certifies λ=3/2 for an instance with worst-case residual 2. The added condition holds automatically when every element of D is symmetric (e.g. the diagonal structures (36)) and when G=0 (e.g. D=RN×N). (iii) Lemma 2.2's "only if" is stated under T2=0 or T3=0. (iv) Lemma 2.3's necessity is stated in strict form, and its sufficiency concludes T(Δ)≻0.
Not stated: "If Θ>0 at the optimum, the upper bound is also exact". The infimum over the strict LMI (38) is not attained, and the paper does not say which limit is meant. Theorem 5.3, Lemma 2.4 and Lemma 5.1 are also not stated.
Trivializing encodings ruled out: the goal is not a statement about the value of an infimum (which a junk value could satisfy), and the added hypotheses are satisfiable (for instance S=sI, G=0 for full D, which part (b) produces).
Infrastructure needed: the Schur complement for block matrices (in Mathlib), a lossless S-lemma for two homogeneous quadratic forms in strict and non-strict form (the platform has ConvexOptimization.s_procedure, in a different sign convention), square roots of positive definite matrices that commute with D, and compactness of the structured unit ball. The S-procedure lemmas are reusable in robust control and trust-region analysis. Proofs of the milestones in any order are welcome.
Selected references
L. El Ghaoui and H. Lebret, Robust solutions to least-squares problems with uncertain data, SIAM J. Matrix Anal. Appl. 18(4):1035–1064, 1997. https://doi.org/10.1137/S0895479896298130
S. Boyd, L. El Ghaoui, E. Feron and V. Balakrishnan, Linear Matrix Inequalities in System and Control Theory, SIAM, 1994. https://doi.org/10.1137/1.9781611970777
M. K. H. Fan, A. L. Tits and J. C. Doyle, Robustness in the presence of mixed parametric uncertainty and unmodeled dynamics, IEEE Trans. Automat. Control 36(1):25–38, 1991. https://doi.org/10.1109/9.62265
Robust Solutions to Least-Squares Problems with Uncertain Data III: Structured Robust Least Squares Is Solved Exactly by a Semidefinite ProgramResearch Paper
Motivation
Least squares fits a model Ax≈b as if the data (A,b) were exact. In practice they are measured, rounded or estimated, and the least-squares solution can be very sensitive to such errors. El Ghaoui and Lebret (SIAM J. Matrix Anal. Appl. 18(4), 1997) proposed to treat the errors as deterministic, unknown but bounded, and to choose x minimizing the worst-case residual over all admissible data. For unstructured perturbations of [Ab] bounded in Frobenius norm this leads to a second-order cone program (missions I and II of this series).
In many applications the perturbations have a known structure: a Toeplitz matrix stays Toeplitz, a parameter enters several entries at once, or only some entries are uncertain. An unstructured bound then over-estimates the worst case. The paper's §4 treats perturbations that are affine in a parameter vector δ bounded in Euclidean norm, and shows that the resulting structured robust least-squares (SRLS) problem is still solved exactly, now by a semidefinite program (SDP). This model of uncertainty (an ellipsoid of affinely parametrized data) is the one later adopted as the basic uncertainty set of robust optimization; see Ben-Tal and Nemirovski, Math. Oper. Res. 23(4), 1998.
Setting
Vectors carry the Euclidean norm∥v∥=vTv. Given matrices A0,A1,…,Ap∈Rn×m and vectors b0,b1,…,bp∈Rn, define for every δ∈Rp
A(δ)=A0+i=1∑pδiAi,b(δ)=b0+i=1∑pδibi.
For ρ≥0 and x∈Rm the structured worst-case residual is
rS(A,b,ρ,x)=∥δ∥≤ρmax∥A(δ)x−b(δ)∥,
and x is an SRLS solution if it minimizes rS(A,b,ρ,⋅) over Rm. The paper takes ρ=1 throughout §4 and writes rS(A,b,x).
For fixed x let M(x)=[A1x−b1⋯Apx−bp]∈Rn×p and
F=M(x)TM(x),g=M(x)T(A0x−b0),h=∥A0x−b0∥2.
Since A(δ)x−b(δ)=(A0x−b0)+M(x)δ, the squared residual at δ is the quadratic function h+2gTδ+δTFδ. Finally, for scalars λ,τ,
The goal states that (a) for all x and λ, some τ makes (λ,τ,x) feasible if and only if rS(A,b,x)2≤λ; and (b) (λ,τ,x) is optimal for (32) if and only if x is an SRLS solution, λ=rS(A,b,x)2, and (λ,τ,x) is feasible. This is the precise content of the paper's "the SRLS can be solved by computing an optimal solution of (32)".
Milestones
Lemma 2.1 (S-procedure), in two items: the multiplier condition is sufficient for every p; for p=1 it is also necessary when F1(ζ0)>0 for some ζ0.
Eq. (29): for λ≥0, that quadratic form is ≤λ on the unit ball if and only if F(λ,τ)⪰0 for some τ.
Theorem 4.1, first assertion: rS(A,b,x)2=min{λ:∃τ,F(λ,τ)⪰0}, the minimum attained.
§4.2, Schur-complement step: the matrix of (32) is positive semidefinite if and only if F(λ,τ) is.
Significance
The result shows that a min–max problem over a nonconvex worst case (the inner problem maximizes a convex quadratic over a ball) is equivalent to a single convex SDP whose size is linear in n, m and p, and hence solvable in polynomial time by interior-point methods. It covers as special cases the unstructured problem of §3, least squares with uncertainty in selected entries, and Toeplitz or otherwise patterned perturbations. The exactness contrasts with the next section of the paper, where the linear-fractional and ℓ∞-bounded versions are in general only bounded from above, or shown NP-hard.
The result is proved in the paper; to the best of current knowledge it has not been formalized. The platform already has the one-constraint S-procedure (ConvexOptimization.s_procedure, proved, in a different sign and block convention); this mission adds the robust least-squares objects, the reduction to the S-procedure, the Schur-complement step, and the optimal-solution correspondence of Theorem 4.2. The worst-case residual and SDP (32) definitions are reusable by later robust-regression missions.
Difficulty
The obvious approach is to compute the inner maximum directly. The function δ↦h+2gTδ+δTFδ is convex, so its maximum over the unit ball is attained on the boundary, but it is not given by any closed-form expression in general, and maximizing a convex function is not a convex problem. Exactness therefore rests on the lossless S-procedure for one quadratic constraint, a nonconvex duality statement that fails for two or more constraints; the sufficient direction alone only yields an upper bound.
A second point is passing from "for fixed x" (Theorem 4.1) to "optimal over x" (Theorem 4.2): F(λ,τ) is quadratic in x, and only the Schur-complement lift (32) is jointly affine in (λ,τ,x). The correspondence of optimal solutions must then be checked in both directions, including that the optimal λ is the squared residual and not the residual.
Formalization scope
Data are A0 : Matrix (Fin n) (Fin m) ℝ, A : Fin p → Matrix (Fin n) (Fin m) ℝ, b0 : Fin n → ℝ, b : Fin p → Fin n → ℝ; A i is the paper's Ai+1 (0-based index). Vectors live in Fin k → ℝ with the Euclidean norm written out as ∑ivi2, never Mathlib's sup norm.
The maximum defining rS is sSup of the set of attained residuals over the closed ball; for ρ≥0 this set is nonempty and bounded, so sSup is the true maximum. The theorems use ρ=1, as the paper does; the paper derives general ρ by scaling and that is not stated here.
Block matrices are Matrix.fromBlocks in the printed order (scalar block first: Unit ⊕ Fin p; for (32), (Unit ⊕ Fin p) ⊕ Fin n). "⪰0" is Mathlib's PosSemidef, which includes symmetry; all matrices here are symmetric by construction.
p≥1 is assumed in (29), Theorem 4.1 and Theorem 4.2, although the paper does not state it: for p=0 the block τI is empty, τ is unconstrained, every λ is feasible and both SDPs lose their meaning. Eq. (28), Lemma 2.1 and the Schur-complement step hold for every p and are stated without it.
Optimality in (32) is stated as feasibility plus λ≤λ′ for every feasible (λ′,τ′,x′). A formalization that only proves existence of some feasible τ, or only an inequality between the optimal values, is weaker than Theorem 4.2 and does not close the goal.
Theorem 4.1's second and third assertions (the one-dimensional reformulation (30)–(31) and the worst-case perturbation) are not included: they use the notion "(F,g)-controllable", which the paper does not define.
Useful infrastructure: Mathlib's Schur-complement lemmas (Matrix.PosSemidef.fromBlocks₂₂ and relatives in LinearAlgebra.Matrix.SchurComplement); the platform's ConvexOptimization.s_procedure and ConvexOptimization.single_constraint_quadratic_strong_duality with their definitions ConvexOptimization_quadraticForms, included as reference items. A bridge lemma between the platform's block convention and this mission's is a welcome contribution, as is a general-ρ version.
Selected references
L. El Ghaoui and H. Lebret, Robust Solutions to Least-Squares Problems with Uncertain Data, SIAM J. Matrix Anal. Appl. 18(4):1035–1064, 1997. https://doi.org/10.1137/S0895479896298130
S. Boyd, L. El Ghaoui, E. Feron and V. Balakrishnan, Linear Matrix Inequalities in System and Control Theory, SIAM, 1994 (the S-procedure, p. 24). https://doi.org/10.1137/1.9781611970777
Robust Solutions to Least-Squares Problems with Uncertain Data I: The Worst-Case Residual and Its Unique MinimizerResearch Paper
Motivation
The least-squares (LS) problem minx∥Ax−b∥ assumes that the data A∈Rn×m, b∈Rn are exact. In applications they rarely are: they come from measurements, from linearizations, or from models with neglected dynamics. A classical response is sensitivity analysis or regularization (Tikhonov), where a weight trades the size of the solution against the fit, and the choice of that weight is left to the user. El Ghaoui and Lebret (SIAM J. Matrix Anal. Appl. 18(4), 1997) take a deterministic view instead: the true data lie in a known ball around (A,b), and the solution should minimize the residual it can be forced to have in the worst case over that ball. The paper shows that this robust least-squares (RLS) problem is solvable exactly, in the unstructured case by a second-order cone program (SOCP). The same worst-case idea, applied to regression, underlies the later equivalence between robustness and regularization (Xu, Caramanis and Mannor, 2009) and is a standard entry point to robust optimization (Ben-Tal, El Ghaoui and Nemirovski, Robust Optimization, 2009).
This mission formalizes the first main result of the paper, Theorem 3.1: the worst-case residual has a closed form, its minimizer is unique, and minimizing it is an SOCP.
Setting
Vectors carry the Euclidean norm∥v∥=(∑ivi2)1/2. For a matrix X, ∥X∥F=(∑i,jXij2)1/2 is the Frobenius norm and ∥X∥ the largest singular value, i.e. the smallest c≥0 with ∥Xv∥≤c∥v∥ for all v.
Fix A∈Rn×m and b∈Rn. A perturbation is a pair ΔA∈Rn×m, Δb∈Rn, collected in the augmented matrix Δ=[ΔAΔb]∈Rn×(m+1). For a bound ρ≥0 and x∈Rm, the worst-case residual is (paper, eq. (1))
r(A,b,ρ,x)=∥[ΔAΔb]∥F≤ρmax∥(A+ΔA)x−(b+Δb)∥,
and x is an RLS solution if it minimizes r(A,b,ρ,⋅). The bound constrains the augmented matrix jointly, not ΔA and Δb separately. The paper normalizes ρ=1 and writes r(A,b,x)=r(A,b,1,x). Finally, [x;1]∈Rm+1 denotes x stacked over 1. In the Lean development these are RobustLS.Unstructured.eucNorm, frobNorm, specNorm, augment, stackOne, worstCaseResidual A b ρ x, its largest-singular-value variant worstCaseResidualSpec, and the SOCP constraint predicate SocpFeasible A b x λ τ.
Formalization targets
Goal: Theorem 3.1 (p. 1040)
For n≥1, every A, b:
r(A,b,x)=∥Ax−b∥+∥x∥2+1for all x∈Rm,
the problem minx∈Rmr(A,b,x) has exactly one solution xRLS, and it is the SOCP
minimize λsubject to∥Ax−b∥≤λ−τ,∥[x;1]∥≤τ,(15)
in the sense that r(A,b,x) is the least λ for which some τ makes (x,λ,τ) feasible.
Milestones
Eq. (16). Every perturbation with ∥[ΔAΔb]∥F≤1 has residual at most ∥Ax−b∥+∥x∥2+1.
The worst-case perturbation. For a unit vector u aligned with Ax−b (arbitrary if Ax=b), the rank-one matrix Δ=u[xT−1]/∥x∥2+1 has ∥Δ∥F=∥Δ∥=1 and attains the bound.
Spectral norm. The worst case over the larger ball ∥[ΔAΔb]∥≤1 is the same value.
Strict convexity.x↦r(A,b,x) is strictly convex on Rm.
The SOCP (15). For every x, r(A,b,x) is the optimal λ of (15) with x fixed, and x is an RLS solution exactly when it is the x-part of an optimal solution of (15).
Significance
The closed form replaces a maximization over a matrix ball of dimension n(m+1) by two Euclidean norms. It shows that the RLS objective is the LS residual plus a penalty ∥x∥2+1 that does not depend on A or b, which is the starting point for the paper's Theorem 3.2 (the RLS solution is a Tikhonov-regularized LS solution with a data-dependent weight) and its analysis of continuity and conditioning. The SOCP formulation places the problem in the class solved by interior-point methods, at a cost the paper compares with one singular value decomposition of A. The spectral-norm statement says the worst case does not depend on which of the two standard matrix norms bounds the perturbation.
The result is proved in the paper; the proof is short. To the best of the planning survey (September 2026), no machine-checked proof exists, and Prove2Me has no statement about worst-case residuals or robust least squares. The mission produces a verified closed form that later missions of this series (Tikhonov form of the solution, structured and linear-fractional perturbations) and any formalization of robust regression can import.
Difficulty
The upper bound alone does not give the theorem: the statement is an equality, and the equality needs an explicit maximizer. The paper's printed maximizer is wrong by a sign: with [xT1] in place of [xT−1] the perturbation does not attain the bound (for A=0, x=0, b=e1 it gives residual 0 instead of 2), so a transcription of the printed proof fails. Two further points are silent in the paper. The operator norm of a rank-one matrix has to be computed from the definition of the largest singular value. Uniqueness of the minimizer needs existence first, which follows from growth of r at infinity and is not stated. Working with the sSup definition of the worst case requires showing the set of residuals is bounded, which is milestone 1.
Formalization scope
Dimensions are Fin n, Fin m; A is Matrix (Fin n) (Fin m) ℝ, b and x are functions Fin n → ℝ, Fin m → ℝ. The augmented matrix [ΔAΔb] is indexed by Fin m ⊕ Unit, and so is [x;1].
Vector norms are the Euclidean norm written as ∑ivi2 (eucNorm), never Mathlib's ‖·‖ on Fin n → ℝ, which is the sup norm. The Frobenius norm and the largest singular value are explicit definitions (frobNorm, specNorm); specNorm is the infimum of admissible operator constants.
The maximum in (1) is sSup of the set of attained residuals. For ρ≥0 the set is nonempty and bounded, so this is the true maximum; milestones 1 and 2 state the bound and the attaining perturbation directly, so no statement relies on the value of sSup on an unbounded set.
The paper's normalization ρ=1 is kept; general ρ>0 follows from the scaling ϕ(A,b,ρ)=ρϕ(A/ρ,b/ρ,1) the paper records on p. 1039 and is not a target.
The goal assumes n≥1. For n=0 the only perturbation is the empty matrix, the worst case is 0, and the closed form fails; the paper's setting (Ax≃b with data b∈Rn) has n≥1. Milestones 3–5 carry the same hypothesis.
Milestone 2 states the corrected perturbation [xT−1]; the printed [xT1] is false.
A trivializing formalization — an upper bound in place of the equality, a worst case over ΔA and Δb bounded separately, or uniqueness among critical points only — is ruled out: the goal is the equality for the jointly bounded augmented matrix and ∃! of a global minimizer over all of Rm.
Contributions welcome: lemmas on Frobenius and operator norms of rank-one matrices, the inequality ∥Mz∥≤∥M∥F∥z∥ in this explicit setting, and strict convexity of x↦∥x∥2+1; these are reusable beyond the mission.
Selected references
L. El Ghaoui and H. Lebret, Robust Solutions to Least-Squares Problems with Uncertain Data, SIAM Journal on Matrix Analysis and Applications 18(4):1035–1064, 1997. https://doi.org/10.1137/S0895479896298130
H. Xu, C. Caramanis and S. Mannor, Robust Regression and Lasso, Journal of Machine Learning Research 10:1485–1510, 2009 (IEEE Trans. Inf. Theory 56(7), 2010). https://jmlr.org/papers/v10/xu09b.html
M. S. Lobo, L. Vandenberghe, S. Boyd and H. Lebret, Applications of Second-Order Cone Programming, Linear Algebra and its Applications 284:193–228, 1998. https://doi.org/10.1016/S0024-3795(98)10032-0
Randomized Algorithms for Estimating the Trace of an Implicit Symmetric Positive Semi-Definite Matrix I: Sample Bound for the Gaussian Trace EstimatorResearch Paper
Motivation
Many computations in scientific computing, statistics and machine learning need the trace of a matrix A that is never formed explicitly: A may be f(B) for a large sparse B, an inverse B−1, or a product of operators, and the only access to it is the ability to compute products Az for chosen vectors z. Examples are log-determinant estimation in Gaussian process regression, counting triangles in graphs through trace(B3), computing charge densities in electronic structure calculations, and generalized cross-validation in regularized regression. For such matrices the n diagonal entries are not available, and computing them one at a time costs n matrix–vector products.
Randomized trace estimators replace this by a small number M of products: draw random vectors z1,…,zM from a fixed distribution with E(ziTAzi)=trace(A) and average the quadratic forms. Hutchinson (1989) introduced the estimator with Rademacher vectors and computed its variance; Silver and Röder (1997) used Gaussian vectors. Before Avron and Toledo (2011), the analyses of these estimators were variance computations, which do not say how many samples guarantee a given relative accuracy with a given probability. Avron and Toledo gave the first such sample bounds for several estimators, stated in terms of an (ϵ,δ) guarantee; this mission formalizes their bound for the Gaussian estimator. Later work (Roosta-Khorasani and Ascher 2015; Cortinovis and Kressner 2022) sharpened these bounds and extended them to indefinite matrices.
Setting
Let A∈Rn×n be symmetric positive semi-definite, and write τ=trace(A). Fix a number of samples M≥1. Let z1,…,zM∈Rn be random vectors whose Mn entries are independent standard normal random variables. The Gaussian trace estimator (Definition 3.1) is
GM=M1i=1∑MziTAzi.
Each term ziTAzi has expectation trace(A), so GM is unbiased. A randomized trace estimator T is an (ϵ,δ)-approximator of trace(A) (Definition 4.1) if
Pr(∣T−trace(A)∣≤ϵtrace(A))≥1−δ,
that is, if its relative error is at most ϵ except on an event of probability at most δ.
The analysis uses the eigenvalues λ1,…,λn≥0 of A, listed with multiplicity, and the polynomial h(t)=∑s=2n(−2)sts∑∣S∣=s∏i∈Sλi, where S ranges over subsets of {1,…,n}; it satisfies ∏i(1−2λit)=1−2τt+h(t).
Formalization targets
Goal: Theorem 5.2 (corrected)
For every symmetric positive semi-definite A, every 0<ϵ≤1/10, every 0<δ<1 and every natural number M with
M≥20ϵ−2ln(2/δ),
the estimator GM is an (ϵ,δ)-approximator of trace(A). The sample count depends on neither n nor A.
Milestones
Lemma 5.1. For symmetric A, E(G1)=trace(A) and Var(G1)=2∥A∥F2.
Eq. (1). For symmetric A and every t with 2λit<1 for all i, the moment generating function of Z=MGM is
mZ(t)=i=1∏n(1−2λit)−M/2=(1−2τt+h(t))−M/2.
Elementary symmetric sums (p. 8:8). For non-negative x1,…,xn and 1≤i≤n, ∑∣S∣=i∏j∈Sxj≤(∑jxj)i; hence ∣h(t)∣≤∑j=2n(2τt)j for t≥0 when all λi≥0.
Upper tail (pp. 8:8–8:9). If τ>0, M≥1 and 0<ϵ≤0.1, then
Pr(GM≥τ(1+ϵ))≤exp(−Mϵ2/20).
Both tails (p. 8:9). If τ>0, 0<ϵ≤0.1 and M≥20ϵ−2ln(2/δ), then Pr(GM≥τ(1+ϵ))≤δ/2 and Pr(GM≤τ(1−ϵ))≤δ/2.
Significance
The theorem gives a number of matrix–vector products, O(ϵ−2ln(1/δ)), that suffices for a relative-error guarantee on the trace of any positive semi-definite matrix, independent of its dimension and spectrum. It is the reference row of the paper's Table I, against which the Hutchinson, normalized Rayleigh-quotient and unit-vector estimators are compared, and it is the form in which trace estimation enters the analysis of randomized algorithms for log-determinants, spectral densities and matrix functions.
The result is proved in the paper; to our knowledge it has not been formalized in any proof assistant. The mission produces a machine-checked version with the constant 20 and the range of ϵ made explicit, and with the misprints of the printed argument resolved (see Formalization scope). It also produces reusable pieces: the moment generating function of a Gaussian quadratic form, and the bound on elementary symmetric sums by powers of the power sum. Sharper constants, the removal of the restriction ϵ≤0.1, or a direct formalization of the lower tail through a χ2 tail bound are welcome as further theorems.
Difficulty
Unbiasedness and the variance formula do not give the result: Chebyshev's inequality with Var(GM)=2∥A∥F2/M≤2τ2/M yields M≥2ϵ−2δ−1, with a polynomial rather than logarithmic dependence on 1/δ. A logarithmic bound needs exponential moments of GM, and the exponential moment of zTAz is finite only for t below 1/(2λmax); the argument has to choose t inside that range uniformly in the spectrum, using only λmax≤τ. The second obstacle is distributional: zTAz is not a sum of independent terms in the coordinates of z, and reducing it to a weighted sum of independent χ2 variables requires the rotation invariance of the standard Gaussian vector. The paper proves only the upper tail with an explicit constant and states that the lower tail follows "using the same technique"; that step has to be supplied.
Formalization scope
Matrices are Matrix (Fin n) (Fin n) ℝ; "symmetric positive semi-definite" is A.PosSemidef, "symmetric" is A.IsHermitian, and eigenvalues are Matrix.IsHermitian.eigenvalues. The sample space is Fin M → Fin n → ℝ with the product measure of Mn copies of gaussianReal 0 1, so the law of the samples is constructed, not assumed; GM(ω)=(M:R)−1∑iωi⋅(Aωi). Probabilities are Measure.real; the moment generating function is Mathlib's mgf; the variance is Mathlib's variance, and Lemma 5.1 asserts square integrability so that neither the integral nor the variance takes its default value. The sample count is a natural number M≥1; ϵ and δ are real.
Corrections of the printed text, each recorded in the item's Formalization Note:
Theorem 5.2 is printed without a range for ϵ and is false without one (for rank-one A, ϵ=100, δ=e−400 the threshold allows M=1, while Pr(χ12>101)≈e−50>δ). The proof gives its key bound "for ϵ≤0.1"; the goal is stated for 0<ϵ≤1/10.
Eq. (1) is printed for ∣λit∣≤21, which admits 1−2λit=0, where the moment generating function is infinite. It is stated for 2λit<1. The page's sum over subsets of "the set Λ of eigenvalues" is taken over index sets, so repeated eigenvalues count with multiplicity.
The last paragraph of the proof prints Pr(GM≤τ(1+ϵ))≤δ/2 for the upper tail and Pr(∣GM−τ∣≤τ(1+ϵ))≤δ for the conclusion; the intended statements are Pr(GM≥τ(1+ϵ))≤δ/2 and Pr(∣GM−τ∣>ϵτ)≤δ. Milestone 5 states the upper and lower tail bounds.
Lemma 5.1 is followed by the remark that it "also applies when A is non-symmetric"; this is false for the variance and is not formalized. Definition 3.1 says "positive-definite"; the estimator is defined for every matrix and each theorem carries its own hypothesis.
The one-sided tail milestones assume trace(A)>0; for A=0 their events are certain, while the goal holds trivially.
A formalization that makes the goal trivial is ruled out: the estimator's law is the explicit product Gaussian measure rather than a hypothesis, M ranges over all natural numbers above the threshold, and the approximator predicate is evaluated on the genuine event ∣GM−trace(A)∣≤ϵtrace(A).
A complete development needs rotation invariance of the standard Gaussian on Rn (Mathlib's stdGaussian_map), the moment generating function of a squared standard normal, independence of products of Gaussian vectors, and a Chernoff bound from the moment generating function. The Gaussian quadratic-form results (milestones 1 and 2) are reusable for the other Gaussian estimators of the paper, such as the rank estimator of Lemma 5.3. Proofs of any milestone, alternative proofs of the lower tail, and helper lemmas on χ2 moment generating functions are welcome.
Selected references
H. Avron and S. Toledo, Randomized algorithms for estimating the trace of an implicit symmetric positive semi-definite matrix, Journal of the ACM 58(2), Article 8, 2011. https://doi.org/10.1145/1944345.1944349
M. F. Hutchinson, A stochastic estimator of the trace of the influence matrix for Laplacian smoothing splines, Communications in Statistics – Simulation and Computation 18(3), 1059–1076, 1989. https://doi.org/10.1080/03610918908812806
R. N. Silver and H. Röder, Calculation of densities of states and spectral functions by Chebyshev recursion and maximum entropy, Physical Review E 56(4), 4822–4829, 1997. https://doi.org/10.1103/PhysRevE.56.4822
F. Roosta-Khorasani and U. Ascher, Improved bounds on sample size for implicit matrix trace estimators, Foundations of Computational Mathematics 15, 1187–1212, 2015. https://doi.org/10.1007/s10208-014-9220-1
A. Cortinovis and D. Kressner, On randomized trace estimates for indefinite matrices with an application to determinants, Foundations of Computational Mathematics 22, 875–903, 2022. https://doi.org/10.1007/s10208-021-09525-9
Simultaneous Analysis of Lasso and Dantzig Selector I: Sparse Eigenvalue and Correlation Conditions Imply the Restricted Eigenvalue ConditionResearch Paper
Motivation
In high-dimensional linear regression one observes y=Xβ∗+w∈Rn with a design matrix X∈Rn×M whose number of columns M may far exceed the sample size n. The two standard estimators of a sparse β∗, the Lasso (Tibshirani, 1996) and the Dantzig selector (Candès and Tao, 2007), both come with error bounds of order slogM/n for an s-sparse β∗, but only under a condition on X: since X has a non-trivial kernel when M>n, some form of restricted invertibility is unavoidable.
Bickel, Ritov and Tsybakov (arXiv:0801.1095, Ann. Statist. 2009) introduced the restricted eigenvalue (RE) condition, which asks for invertibility of X only on a cone of approximately sparse vectors. It is weaker than the conditions used before it and has since become the default assumption in the sparse-estimation literature. Section 4 of the paper relates RE to the earlier conditions:
2005–2007: Candès and Tao (arXiv:math/0506081) analyse the Dantzig selector under a uniform uncertainty principle involving restricted eigenvalues and restricted correlations of X; the condition ϕmin(2s)>θs,2s is Assumption 1 below with c0=1.
2006–2009: Meinshausen and Yu (arXiv:math/0605584) analyse the Lasso under a lower bound on sparse eigenvalues of order slogn.
2006: Donoho, Elad and Temlyakov (doi:10.1109/TIT.2005.860430) use mutual coherence for sparse recovery; 2007: Bunea, Tsybakov and Wegkamp (doi:10.1214/07-EJS008) use coherence-type conditions for the Lasso.
2009: Bickel, Ritov and Tsybakov show (Lemma 4.1 and Section 4) that each of these conditions implies RE.
This mission formalizes those implications.
Setting
Fix integers n≥1 and M≥2 and a matrix X∈Rn×M with columns x1,…,xM. The Gram matrix is Ψn=XTX/n. For δ∈RM and J⊆{1,…,M}, δJ is the vector equal to δ on J and 0 off J; ∣⋅∣1, ∣⋅∣2 are the ℓ1 and Euclidean norms; M(δ) is the number of non-zero coordinates of δ; J0c is the complement of J0.
The cone condition for J0 and c0>0 is
∣δJ0c∣1≤c0∣δJ0∣1.(4.1)
Assumption RE(s,c0) holds with constant κ>0 if ∣Xδ∣2≥κn∣δJ0∣2 for every J0 with ∣J0∣≤s and every δ=0 satisfying (4.1). For m≥s, let J1 be a set of m indices outside J0 carrying the m largest ∣δj∣, and J01=J0∪J1; Assumption RE(s,m,c0) replaces ∣δJ0∣2 by ∣δJ01∣2.
The restricted eigenvalues are ϕmin(u) and ϕmax(u), the minimum and maximum of xTΨnx/∣x∣22 over x with 1≤M(x)≤u. The restricted correlationsθm1,m2 are the maximum of c1TXI1TXI2c2/(n∣c1∣2∣c2∣2) over disjoint index sets I1,I2 with ∣Ii∣≤mi and non-zero ci∈RIi. Two constants are attached to them:
P01 is the orthogonal projector in Rn onto the span of the columns xj, j∈J01.
Formalization targets
Goal: Lemma 4.1 (ii)
For integers 1≤s≤M/2, m≥s, s+m≤M and c0>0, if Assumption 2mϕmin(s+m)>c02sϕmax(m) holds, then κ2(s,m,c0)>0, RE(s,c0) and RE(s,m,c0) hold with constant κ2(s,m,c0), and for every J0 with ∣J0∣≤s and every δ satisfying (4.1)
n1∣P01Xδ∣2≥κ2(s,m,c0)∣δJ01∣2.
Assumption 2 involves no correlations, only extreme eigenvalues of small principal submatrices of Ψn.
Lemma 4.1 (i)
For 1≤s≤M/2 and c0>0, Assumption 1ϕmin(2s)>c0θs,2s implies the same conclusions with m=s and constant κ1(s,c0).
(Assumptions 3, 4, 5) implies RE(s,c0), with the constants κ2=ϕmin(s)−2c0θs,1s, ϕmin(s)−2c0θ1,1s and 1−(1+2c0)θ1,1s respectively.
The milestones are the steps of the proof in Appendix A — the projection inequality (A.1), the block bound (A.2), the shelling bound (A.3), the Candès–Tao correlation bound used for part (i) — followed by part (i) and the three coherence-type implications.
Significance
RE(s,c0) with c0=3 and c0=1 is the hypothesis of the paper's prediction and ℓ1 bounds for the Lasso and the Dantzig selector (Theorems 5.1, 6.1, 7.1, 7.2), and RE(s,m,c0) is the hypothesis of its ℓp bounds. Assumptions 1–5 are stated through quantities that are standard in compressed sensing and random matrix theory, so known bounds for ϕmin, ϕmax and θ of random designs transfer, through this mission's theorems, to every result stated under RE. Lemma 4.1 also shows that RE is weaker than the Candès–Tao condition used for the Dantzig selector.
The results are proved in the paper; parts of Lemma 4.1's proof (the correlation bound for part (i)) are cited from Candès and Tao without proof. None of these results is formalized: the platform has pairwise-incoherence and restricted-nullspace statements from Wainwright's textbook (a different conclusion and normalization) and restricted isometry definitions, but neither restricted eigenvalues ϕmin(u),ϕmax(u), restricted correlations θm1,m2, nor the RE condition in this form.
Difficulty
The naive attempt to bound ∣Xδ∣2 from below splits δ=δJ0+δJ0c and applies an eigenvalue bound to each part. This fails: δJ0c can have up to M−s non-zero coordinates, and no condition on s- or 2s-sparse submatrices controls ∣XδJ0c∣2 directly. The cone condition bounds only the ℓ1 norm of δJ0c, while eigenvalue conditions speak about ℓ2 norms of sparse vectors; bridging the two with the right constant s/m, and keeping track of how the leading block J01 interacts with the rest through the projector P01, is where the work lies. For part (i), the interaction between disjoint sparse blocks has to be controlled by θs,2s rather than by ϕmax.
Formalization scope
Representation.X is Matrix (Fin n) (Fin M) ℝ; vectors are Fin M → ℝ and Fin n → ℝ; ∣Xδ∣2=(∑i(Xδ)i2)1/2. The projector P01 is Mathlib's orthogonal projection on EuclideanSpace ℝ (Fin n) onto the span of the columns indexed by J01.
RE through a witness.RE X s c0 κ asserts the RE inequality with constant κ for all admissible J0 and δ. The paper's κ(s,c0) is the largest such κ (the minimum is attained), so "RE holds with κ(s,c0)≥κ2" is exactly "κ2>0 is a witness". This avoids a real infimum over an empty set when J0=∅.
Ties. Every admissible choice of J1 (the m largest ∣δj∣ outside J0) is quantified over.
Restricted eigenvalues and correlations are sInf/sSup over nonempty bounded sets (a basis vector for ϕ; two disjoint singletons for θ, since M≥2), so they equal the paper's attained min/max. u, s, m are natural numbers; s≤M/2 is written 2s≤M.
Corrections of the printed statement. (1) Lemma 4.1 says the RE assumptions "hold with κ(s,c0)=κ(s,m,c0)=κ2(s,m,c0)" (and likewise with κ1); the proof gives only the lower bound, and the lower bound is what is stated. (2) The paper calls P01 "the projector in RM"; it acts on Rn. (3) The Section 4 claims "Assumption 3/4/5 implies RE(s,c0)" are stated with the explicit constant produced by the displayed argument, a labelled strengthening. (4) The Candès–Tao bound is stated with the hypotheses the proof uses: the blocks are disjoint, of sizes at most s and 2s, and ϕmin(2s)>0.
Ruling out trivializations. RE quantifies over allJ0 with ∣J0∣≤s and all non-zero δ in the cone, and bounds the full ∣Xδ∣2, not ∣XδJ0∣2; no hypothesis restricts X beyond the stated assumptions. The hypotheses are satisfiable: for n=M=4, X=2I (so Ψn=I), s=1, m=2, c0=1, Assumption 2 reads 2>1.
Infrastructure. A sparse-vector library (restriction, support, sorting coordinates into blocks) and facts about orthogonal projections onto column spans are needed; both are reusable for the other missions of this series and for compressed-sensing results. Proofs of any milestone, and alternative arguments, are welcome.
Selected references
P. J. Bickel, Y. Ritov, A. B. Tsybakov, Simultaneous analysis of Lasso and Dantzig selector, Ann. Statist. 37(4), 1705–1732, 2009. arXiv:0801.1095v3. https://arxiv.org/abs/0801.1095
E. Candès, T. Tao, The Dantzig selector: statistical estimation when p is much larger than n, Ann. Statist. 35(6), 2313–2351, 2007. https://arxiv.org/abs/math/0506081
N. Meinshausen, B. Yu, Lasso-type recovery of sparse representations for high-dimensional data, Ann. Statist. 37(1), 246–270, 2009. https://arxiv.org/abs/math/0605584
F. Bunea, A. B. Tsybakov, M. H. Wegkamp, Sparsity oracle inequalities for the Lasso, Electron. J. Statist. 1, 169–194, 2007. https://doi.org/10.1214/07-EJS008
D. L. Donoho, M. Elad, V. N. Temlyakov, Stable recovery of sparse overcomplete representations in the presence of noise, IEEE Trans. Inform. Theory 52(1), 6–18, 2006. https://doi.org/10.1109/TIT.2005.860430
Updating Quasi-Newton Matrices with Limited Storage: The Limited-Storage BFGS Method Reaches the Minimizer of a Strictly Convex Quadratic in at Most n StepsResearch Paper
Motivation
Quasi-Newton methods minimize a smooth function f on Rn by moving along dk=−Hkgk, where gk is the gradient and Hk is an approximation of the inverse Hessian built from observed gradient differences. The BFGS update is the most widely used way of building Hk, but it stores a dense n×n matrix, which is prohibitive for large n.
Nocedal's 1980 paper (Math. Comp. 35, 773–782) proposed keeping only the last m correction pairs and rebuilding the matrix from a simple initial matrix H0 at every step. The resulting method, called SQN in the paper, is now known as L-BFGS, and it is the default large-scale unconstrained optimizer in many numerical libraries and in machine learning. The paper's main theoretical claim is that this truncation does not destroy the finite termination of BFGS on quadratics.
Timeline:
1970: Broyden, Fletcher, Goldfarb and Shanno introduce the BFGS update (references [1] and [5] of the paper).
1977: Nazareth relates BFGS to conjugate gradients (Argonne Tech. Memo 282, reference [7]); his form of preconditioned conjugate gradients is the one the paper uses.
1977–1978: Shanno studies the memoryless BFGS update, the case m=1 (reference [11]; journal version Math. Oper. Res. 3, 1978).
1980: Nocedal defines the special BFGS matrices and the SQN method and states that on quadratics with exact line searches SQN is identical to preconditioned conjugate gradients, hence has quadratic termination.
1989: Liu and Nocedal (Math. Programming 45) study the method, now called L-BFGS, for large-scale problems.
1998: Kolda, O'Leary and Nazareth (SIAM J. Optim. 8) treat limited-memory and update-skipping BFGS variants with exact line searches on quadratics.
Setting
Let A be a symmetric positive definite n×n matrix and b∈Rn, and let f(x)=21xTAx+bTx, a strictly convex quadratic with gradient g(x)=Ax+b and unique minimizer x∗=−A−1b.
Exact line search. Along a direction d=0 from x, the step α=−g(x)Td/dTAd minimizes f(x+αd).
BFGS update. For a pair (s,y) with ρ=1/yTs and v=I−ρysT, the BFGS update of H is
Hˉ=vTHv+ρssT.
Special BFGS matrices. Fix H0 symmetric positive definite and a number m≥1 of stored corrections. Given pairs (sj,yj), the special matrix HK is H0 updated by the pairs j=K−min(K,m),…,K−1, oldest first (the paper's (4)–(5)). Only the m most recent pairs enter, and the matrix is rebuilt from H0.
with αi the exact step and Hi+1 the special matrix built from the last min(i+1,m) pairs.
PCG with fixed preconditioner H0.d0=−H0g0, xi+1=xi+αidi, di+1=−H0gi+1+βi+1di with βi+1=yiTH0gi+1/yiTdi.
Formalization targets
Goal: quadratic termination of SQN
For every n, every symmetric positive definite A and H0, every b, x0 and every m≥1,
∃k≤n:Axk+b=0,
where xk are the SQN iterates. The statement fixes no constant beyond the dimension bound n.
Milestones
Property (a): the special matrices are positive definite whenever yiTsi>0 for all i.
Eq. (7): along conjugate steps, viyi=0 and viyj=yj for i>j.
Eq. (6): along conjugate steps, Hkyj=sj for the m most recent j (when k>m).
Eq. (10): the special matrix equals m sum-form BFGS corrections applied to H0.
Eq. (15): the PCG directions satisfy diTyj=0 for i=j.
Eq. (16): giTH0gj=0 for i=j and giTdj=0 for j<i.
The PCG with fixed preconditioner H0 reaches the minimizer in at most n steps.
SQN and this PCG produce identical iterates and directions at every step.
Significance
The result shows that storing only m correction pairs costs nothing on quadratics: for any m≥1, SQN terminates in at most n steps, like full BFGS and conjugate gradients. It explains why L-BFGS with small m is competitive, and it is the model case for later analyses of limited-memory methods (their linear convergence on uniformly convex functions, and their relation to Krylov methods). Property (b) is the reason one expects efficiency to grow with m: the matrix satisfies the secant equation on the m most recent directions.
The claims are classical and generally accepted, but the paper argues them in a few lines ("it is straightforward to show"), deferring the PCG facts (15)–(16) to a reference. No machine-checked proof of the termination of BFGS, L-BFGS or preconditioned conjugate gradients is known to this mission. A formalization would provide a verified model of L-BFGS on quadratics and a reusable development of conjugate-direction methods with a preconditioner.
Difficulty
The obvious route, "SQN is BFGS and BFGS terminates", fails: SQN discards old corrections, so the classical BFGS argument (hereditary secant conditions on all past directions) does not apply once more than m steps have been taken. The paper asserts the identity of SQN with preconditioned conjugate gradients in one sentence ("using a similar argument as for the SCG"), and the PCG relations it relies on are quoted from a technical report. The other difficulty is bookkeeping: the window of stored pairs shifts, the matrix is a nested product, and the runs must remain meaningful after the minimizer is reached.
Formalization scope
Vectors are Fin n → ℝ, matrices Matrix (Fin n) (Fin n) ℝ, xTy is dotProduct, and syT is Matrix.vecMulVec. Symmetric positive definiteness is Matrix.PosDef. Indices are 0-based, as in the paper. The exact line search is the closed-form step −gTd/dTAd. The iterations have no stopping rule: once the gradient vanishes the direction and step are zero and the iterate stays at the minimizer (Lean's 0/0=0). Past that point the zero pair stored by SQN leaves the BFGS step unchanged. The hypotheses are exactly the paper's: A≻0, H0≻0, m≥1 and exact line searches. H0 need not be diagonal.
Two misprints are corrected and flagged in the items: the denominator of β in (13) is yi−1Tdi−1 (as in (12) and p. 778), and the second relation of (16) is stated for j<i (as used on p. 778), since it fails for i<j.
Ruled out: SQN is defined through its own matrices (4)–(5), rebuilt from H0 and the last m pairs. It is not defined through the PCG recurrence, not by one BFGS update of the previous matrix, and not with a stop rule that returns −A−1b. The standing assumption ykTsk>0 is not a hypothesis of any statement about a run (it fails after termination and would make the goal vacuous). With m=0 SQN is steepest descent and the goal is false, so m≥1 is required.
Needed infrastructure: algebra of rank-one updates and of Matrix.PosDef under congruence, conjugate-direction lemmas for quadratics, and the fact that n+1 mutually H0-orthogonal vectors in Rn include a zero vector. The PCG results (milestones 5–7) are reusable beyond this mission. Proofs of any milestone, or of the goal directly, are welcome.
D. F. Shanno, Conjugate gradient methods with inexact searches, Mathematics of Operations Research 3(3), 1978, 244–256. https://doi.org/10.1287/moor.3.3.244
L. Nazareth, A Relationship Between the BFGS and Conjugate Gradient Algorithms, ANL-AMD Tech. Memo 282 (rev.), Argonne National Laboratory, 1977 (reference [7] of Nocedal 1980; no online copy located).
T. G. Kolda, D. P. O'Leary, L. Nazareth, BFGS with update skipping and varying memory, SIAM Journal on Optimization 8(4), 1998, 1060–1083. https://doi.org/10.1137/S1052623496306450
D. C. Liu, J. Nocedal, On the limited memory BFGS method for large scale optimization, Mathematical Programming 45, 1989, 503–528. https://doi.org/10.1007/BF01589116
Methods of Conjugate Gradients for Solving Linear Systems II: Each Conjugate Gradient Step Shortens the Error VectorResearch Paper
Motivation
The conjugate gradient method (cg-method) of Hestenes and Stiefel is the standard iterative solver for linear systems Ax=k with a symmetric positive definite matrix A. It is used for the large sparse systems of finite-element and finite-difference discretizations, as the inner solver of Newton-type and interior-point methods in optimization, and as the prototype of the Krylov subspace methods. Its original 1952 paper (Hestenes and Stiefel, J. Res. NBS 49(6), 1952) already presented it as two things at once: a direct method that reaches the exact solution in at most n steps, and a method of successive approximations whose intermediate estimates are useful in their own right.
The second view needs a guarantee that the intermediate estimates actually approach the solution. The method is built to decrease the A-weighted error f(x)=(h−x,A(h−x)), and the residual ∣k−Axi∣ need not decrease (Section 18 of the paper, p. 432, notes that it can increase at every step). Theorem 6:3 of the paper supplies the guarantee in the plain Euclidean length: the distance ∣h−xi∣ from the estimate to the solution decreases strictly at every step, by an exactly computable amount. This mission formalizes that theorem together with the relations from Sections 5 and 6 of the paper on which its proof rests.
Timeline:
1952: Hestenes and Stiefel introduce the method and prove, in one paper, finite termination (Theorems 4:2 and 5:2), the monotone decrease of the error function f (Theorem 6:1), and the monotone decrease of the Euclidean error (Theorem 6:3). The later literature on cg as an iterative method for large sparse systems takes these properties as its starting point.
Setting
Let A be a real n×n matrix that is symmetric and positive definite, let k∈Rn, and let h be the solution of Ah=k. Write (x,y)=x1y1+⋯+xnyn and ∣x∣2=(x,x). From an arbitrary starting point x0, the cg-method (5:1) computes estimates xi, residualsri and direction vectorspi by
The error vector of xi is yi=h−xi. The error function (4:5) is f(x)=(h−x,A(h−x)), which is nonnegative and vanishes only at x=h. The Rayleigh quotient (4:12) of a vector z=0 is μ(z)=(z,Az)/∣z∣2. The Lean development names these cgIter A k x₀ i (with fields .x, .r, .p), cgAlpha for ai, errorFun A h x and rayleigh A z.
Formalization targets
Goal: Theorem 6:3
For every step that the method performs, that is, every i with ri=0,
The paper writes the step from xi−1 to xi; the Lean statement shifts the index by one. The goal holds for every dimension n, every symmetric positive definite A, every k and every x0.
Milestones
Theorems 4:2 and 5:2: some m≤n has xm=h.
Theorem 5:3, (5:6a): (pi,pj)=∣rj∣2∣pi∣2/∣ri∣2 for i≤j.
The theorem is what makes an early stop of the cg-method safe in the norm a user usually cares about. Every intermediate estimate is closer to the solution, in Euclidean distance, than the previous one, and the identity (6:5) states by how much. It also separates the cg-method from methods that minimize the residual: the A-norm error, the Euclidean error and the residual behave differently, and only the first two are monotone along cg.
The results are proved in the 1952 paper. They have not been formalized: the Prove2Me library has no statement of the conjugate gradient recursion (5:1), and Mathlib has none either. What this mission adds is a machine-checked version of the paper's Section 6 argument for the recursion exactly as printed, including the case analysis at termination that the paper leaves implicit, and a reusable Lean definition of the cg iteration with its basic identities.
Difficulty
The obvious argument does not reach the conclusion. The method decreases f(x)=(y,Ay) at every step, but a decrease in this A-weighted norm does not imply a decrease in the Euclidean norm: for a single step along an arbitrary direction, even the best step for f can lengthen the Euclidean error. So the theorem cannot be proved one step at a time from the local minimization property. It depends on how the current direction relates to all the later directions of the same run, and those relations in turn rest on the mutual orthogonality of the residuals and the conjugacy of the directions, which are established by an induction over the whole run.
A second difficulty is bookkeeping at the end of the run. The recursion divides by ∣ri∣2 and by (pi,Api), which vanish after termination. Every milestone has to hold, or be guarded, past that point, and the goal needs the hypothesis ri=0 exactly because the strict inequality fails once xi=h.
Formalization scope
Vectors are Fin n → ℝ, the scalar product is dotProduct (⬝ᵥ), Ax is Matrix.mulVec (*ᵥ), and the standing assumption is A.PosDef, which in Mathlib includes symmetry. The solution h is a variable with the hypothesis A *ᵥ h = k. Indices are 0-based. The cg recursion is the definition cgIter, which computes (5:1b)–(5:1f) literally and in order; it has no stopping rule, and Lean's convention t/0=0 makes it stay at h with ri=pi=0 once rm=0. Lengths appear squared, as (y,y). The milestones are stated for every index without a termination guard, because both sides of each identity vanish after termination; only the goal carries ri=0.
Two formalizations would trivialize the goal and are ruled out. The goal does not assume termination (xm=h) or any bound on i: it quantifies over every cg run and every step that takes place. And it is about the Euclidean length ∣h−xi∣, not the error function f (that is Theorem 6:1, a different and weaker statement) and not the residual.
A complete development needs Theorem 5:1 (orthogonality of residuals, conjugacy of directions) for the literal recursion, the identities (5:2) and (5:3c), and the positivity of (p,Ap) for p=0. These are reusable for any further work on the cg-method, including the sister mission on finite termination. Proofs of any milestone, and alternative proofs of Theorem 6:3 through the Krylov-subspace characterization, are welcome.
Methods of Conjugate Gradients for Solving Linear Systems I: Finite Termination of the Conjugate Gradient MethodResearch Paper
Motivation
Solving a linear system Ax=k with a large symmetric positive definite matrix A is a basic task of scientific computing: it arises from discretized elliptic equations, least-squares problems and the Newton steps of optimization methods. In 1952 Magnus Hestenes and Eduard Stiefel published the conjugate gradient method (cg-method) (J. Res. Natl. Bur. Stand. 49 (1952) 409–436). The method uses A only through matrix–vector products and stores a few vectors. The paper's abstract states its central property in one sentence: "The solution is given in n steps."
The paper obtains this property from a more general scheme, the method of conjugate directions (cd-method), which also contains Gaussian elimination as a special case. Its argument has two parts. Every cd-method with nonzero directions reaches the solution within n steps (Theorem 4:2). The cg-method is a cd-method (Theorem 5:2), which follows from the orthogonality and conjugacy relations of Theorem 5:1. This mission formalizes that chain.
Setting
Vectors are real n-tuples, with scalar product (x,y)=x1y1+⋯+xnyn and squared length ∣x∣2=(x,x). The matrix A is real, n×n, symmetric and positive definite, which is the paper's standing assumption (p. 410). The solutionh satisfies Ah=k. The residual of an estimate x is r=k−Ax. Two vectors x,y are conjugate when (x,Ay)=0.
The cg-method (eq. (3:1), p. 411) starts from an arbitrary estimate x0 and sets p0=r0=k−Ax0. Given xi, ri, pi, it computes
In Lean the iterates are cgIter A k x₀ i, a structure with fields x, r, p. The step length is cgA.
The cd-method (Section 4, p. 412) chooses an arbitrary first direction p0 and then sets xi+1=xi+aipi with ai=(pi,ri)/(pi,Api) and ri=k−Axi. Each new direction pi+1 may be any vector conjugate to p0,…,pi. Because the directions are free, a cd-run is a property of sequences: IsCDRun A k x r p.
Formalization targets
Goal: finite termination of the cg-method
For every n, every symmetric positive definite A, every k and h with Ah=k, and every initial estimate x0,
∃m≤n:xm=h,
where xm is the m-th cg iterate. This is the statement of the abstract and of Section 3 (p. 410): "one will reach an estimate xm (m≤n) at which rm=0. This estimate is the desired solution h."
Milestones
Theorem 4:1 (p. 412). For every cd-run, the directions are mutually conjugate (4:3a). The residual ri is orthogonal to p0,…,pi−1 (4:3b). The products (pi,rj) are the same for all j≤i (4:3c). Hence ai=(pi,r0)/(pi,Api) (4:4).
Theorem 4:2 (p. 412). Every cd-run whose directions p0,…,pn−1 are nonzero has xm=h for some m≤n.
Theorem 5:1 (p. 414), in four items. For the cg-method:
(5:3a) (ri,rj)=0 for i=j;
(5:3b) (pi,Apj)=0 for i=j;
(5:3c) (pi,rj)=0 for i<j and (pi,rj)=∣ri∣2 for i≥j;
(5:3d) (ri,Api)=(pi,Api), and (ri,Apj)=0 for i=j,j+1.
Theorem 5:2, first sentence (p. 415). The cg-method is a cd-method: its iterates satisfy IsCDRun.
Significance
Finite termination is the property that distinguishes the conjugate gradient method from stationary iterations such as Jacobi or Gauss–Seidel. It explains why the method can be used as a direct solver in exact arithmetic. It is the starting point for the later theory of Krylov subspace methods. The relations of Theorem 5:1 are the checks the paper recommends for monitoring a computation (eq. (3:3)). They are also the input to the paper's further results on the monotone decrease of the error (Section 6) and on the connection with orthogonal polynomials (Sections 14–18).
The result has been proved since 1952 and appears in every numerical linear algebra textbook. As far as a search of the Prove2Me catalog shows (September 2026), it has no machine-checked proof there. The only conjugate gradient material on the platform is a Hilbert-space convergence result for a different recurrence. This mission adds a faithful formal version of the original recursion (3:1) and of the cd-method. It also adds the complete termination argument, organized as in the paper. The definitions and the Theorem 5:1 relations are reusable by any later formalization of Krylov methods, including the second mission of this series on the decrease of the error ∣h−xi∣.
Difficulty
The obvious argument says that the residuals are mutually orthogonal, so at most n of them are nonzero. That argument is only as good as the orthogonality, and Theorem 5:1 must be established by a simultaneous induction over four families of relations. The recursion defines ri+1 by an update, not as k−Axi+1, so even ri=k−Axi needs a proof. Orthogonality of ri+1 to the earlier residuals needs the conjugacy of the earlier directions, and conjugacy of pi+1 needs the orthogonality of the earlier residuals. Neither family can be proved first.
A second obstacle is the passage from orthogonality to termination. A cd-run with a zero direction stalls, so Theorem 4:2 needs the directions p0,…,pn−1 to be nonzero. The cg directions become zero exactly when the solution is reached, so applying Theorem 4:2 to cg needs a case split at the first vanishing residual.
Formalization scope
Vectors are Fin n → ℝ, the scalar product is dotProduct (⬝ᵥ), and Ax is Matrix.mulVec (*ᵥ). The hypothesis on A is Mathlib's Matrix.PosDef, which includes symmetry. The solution enters only through the hypothesis A *ᵥ h = k. Indices are 0-based, as in the paper.
The cg iteration is total and has no stopping test. Once rm=0, Lean's convention x/0=0 gives pm=0 and am=0. From then on the iteration stays at xm, with zero residuals and directions. For this reason the relations of Theorem 5:1 are stated for all indices without guards: after termination they hold trivially.
Two formulations would make the goal trivial, and neither is used. One is a stopping test or step that refers to h or to A−1k. The other replaces (3:1b), (3:1d) or (3:1e) by the equivalent formulas (3:2a), (3:2b) or ri+1=k−Axi+1, which would move Theorem 5:5 and part of Theorem 5:2 into the definition. The iteration is (3:1) literally.
The cd-method's implicit hypothesis, that the directions p0,…,pn−1 are nonzero, is an explicit binder of Theorem 4:2. Without it the statement fails (take p0=0). The hypothesis is satisfiable: the cg run with nonzero residuals is one example.
A complete development needs the standard facts that mutually conjugate nonzero vectors are linearly independent and that n independent vectors span Rn. It also needs the induction behind Theorem 5:1. Contributions welcome beyond the milestones include the converse half of Theorem 5:2, the relation (5:2) expressing pk through r0,…,rk, and Theorem 4:5 (the cd-method computes A−1).
Selected references
M. R. Hestenes and E. Stiefel, Methods of Conjugate Gradients for Solving Linear Systems, Journal of Research of the National Bureau of Standards 49(6), 409–436, 1952. https://doi.org/10.6028/jres.049.044
L. Fox, H. D. Huskey and J. H. Wilkinson, Notes on the solution of algebraic linear simultaneous equations, Quarterly Journal of Mechanics and Applied Mathematics 1(1), 149–173, 1948 (the cd-method from a different point of view; cited in the paper's Section 4 footnote). https://doi.org/10.1093/qjmam/1.1.149
G. H. Golub and C. F. Van Loan, Matrix Computations, 4th ed., Johns Hopkins University Press, 2013, §11.3 (textbook account of the method).
Modeling, Measuring and Managing Risk XI: The Mean-Variance Efficient Portfolio in Closed FormTextbook
Why mean-variance portfolios
An investor who splits a budget across M risky assets faces a trade-off between expected return and risk. Markowitz proposed measuring risk by the variance of the portfolio return and selecting, for each required expected return, the portfolio of least variance (Markowitz 1952). Tobin added a risk-free asset (Tobin 1958), and Sharpe, Lintner and Mossin turned the resulting one-fund structure into the capital asset pricing model (CAPM), whose beta equation is still the standard first model of expected returns in finance (Sharpe 1964).
This mission formalizes the closed-form part of that theory as presented in §4.2.3 of Pflug and Römisch, Modeling, Measuring and Managing Risk (World Scientific 2007, doi:10.1142/6478), pp. 189–195: the explicit efficient portfolio without a risk-free asset (Proposition 4.8), the solution with a risk-free asset (Proposition 4.9), and the CAPM equation with its variance bound (Proposition 4.10).
Setting
Let (Ω,F,P) be a probability space and ξ=(ξ(1),…,ξ(M)) a random vector of returns, each coordinate with a finite second moment. Returns are profits: larger is better. The vector of expected returns is r=Eξ and the covariance matrix is the M×M matrix C with Cij=Cov(ξ(i),ξ(j)); it is symmetric and positive semidefinite. A portfolio is a weight vector x∈RM (negative weights, i.e. short positions, are allowed) with return Yx=∑mxmξ(m), so that E(Yx)=r⊤x and Var(Yx)=x⊤Cx. Write 1 for the all-ones vector.
The CAPM problem without a risk-free asset fixes a required return μ and asks for
minimize x⊤Cxsubject tor⊤x=μ,1⊤x=1.(4.20)
With a risk-free asset of constant return r0, a portfolio is a pair (x0,x~), where x0 is the holding of the risk-free asset and x~ the holdings of the risky assets ξ~, with mean r~ and covariance C~. Its return is Yx=x0r0+x~⊤ξ~, and the problem is
A portfolio is efficient if it solves the respective problem for some μ. The market portfoliox+ holds nothing in the risk-free asset and C~−1(r~−r01)/1⊤C~−1(r~−r01) in the risky ones; Y+ is its return, μ+=E(Y+) and σ+2=Var(Y+).
Formalization targets
Goal: Proposition 4.8, the efficient portfolio in closed form
Assume C is invertible and r is not a multiple of 1. With
a=r⊤C−1r,b=r⊤C−11,c=1⊤C−11,d=ac−b2,(4.22)
the unique solution of (4.20) is
x∗(μ)=μ[dcC−1r−dbC−11]+[daC−11−dbC−1r],(4.21)
any two efficient portfolios for different returns span all efficient portfolios by affine combinations (the Two Fund Theorem in this model), and
E(Yμ)=μ,Var(Yμ)=dμ2c−2μb+a.
The efficient frontier is therefore a parabola in the (variance, mean) plane.
Milestones and further results
Propositions 4.10 (i) and (ii) are milestones; Proposition 4.9 is a further item of the mission on which they stand.
Proposition 4.9. If C~ is invertible and r~=r01, then with q=(r~−r01)⊤C~−1(r~−r01) the unique solution of (4.23) is
and, when 1⊤C~−1(r~−r01)=0, every efficient portfolio is an affine combination of (1,0,…,0) and x+.
2. Proposition 4.10 (i), the CAPM equation (4.25). For every portfolio with x0+1⊤x~=1,
with equality if and only if the portfolio is efficient, and, as printed, if and only if Corr(Yx,Y+)=1.
Significance
Proposition 4.8 is the explicit description of the mean-variance efficient set: the efficient portfolios form a line in weight space, and the minimal variance is a quadratic function of the required return. Proposition 4.9 shows that a risk-free asset turns this line into one through the risk-free portfolio (the one-fund, or separation, property), and Proposition 4.10 derives from it the CAPM relation between a portfolio's expected excess return and its beta, together with the capital-market-line bound. These are the statements on which the later sections of the chapter, and most textbook treatments of portfolio theory, build: risk-return diagrams, the market portfolio, beta as a risk measure.
The results are classical and their proofs are elementary, but they are not in Mathlib, and no Prove2Me item states them; the closest platform item is the multi-period mean-variance mutual fund theorem of Bäuerle and Rieder (MDPFinance.MeanVariance.mutual_fund_theorem), a different, dynamic statement. A formalization makes the hypotheses explicit that the printed proofs leave implicit (invertibility and nondegeneracy conditions, the budget constraint behind "any portfolio") and checks the printed equality conditions, one of which is false as stated.
Difficulty
The Lagrange conditions of the printed proof are necessary conditions only. Turning them into the statement requires showing that the stationary point is the global minimizer and the only one, which uses positive definiteness of C; the hypothesis gives only invertibility, and positive definiteness has to come from C being a covariance matrix. Dividing by d needs d>0, which is not among the hypotheses and must be derived from "r is not a multiple of 1" together with the structure of C. The variance identities require computing variances and covariances of linear combinations of square-integrable random variables. In Proposition 4.10 (ii) the equality case is where the printed statement goes wrong: a portfolio short in the market portfolio attains equality with correlation −1.
Formalization scope
All statements live in the namespace RiskFunctionals.Frontier. Assets are indexed by Fin M; vectors are Fin M → ℝ, matrices Matrix (Fin M) (Fin M) ℝ, and C−1 is Mathlib's matrix inverse. The mean vector and covariance matrix are computed from a random vector with MemLp 2 coordinates on a probability space using Mathlib's covariance and variance, so "C invertible" is the printed hypothesis and positive definiteness is a consequence, not an assumption. "The solution" is stated as existence and uniqueness of a global minimizer on the feasible set (IsSolution420, IsSolution423). The divisions by q, by 1⊤C~−1(r~−r01) and by d are guarded by the printed or implicit nondegeneracy hypotheses; a statement in which d=0 or q=0 were allowed would make the closed forms the zero vector, so these guards are part of the statement rather than conveniences. The correlation is used only where the portfolio variance is positive, since it is undefined otherwise.
Beyond the paper. One variant item is posed beside the faithful statements: capm_variance_bound_corrected (corrected, finding F4) replaces the equality condition Corr(Yx,Y+)=1 of Proposition 4.10 (ii) by ∣Corr(Yx,Y+)∣=1; with one risky asset of mean 2 and variance 1, r0=1 and x=(2,−1), equality holds while the correlation is −1. The faithful Proposition 4.10 (ii) is therefore expected to be disproved.
A complete development needs the variance and covariance of finite linear combinations of L2 random variables, positive semidefiniteness of covariance matrices, and the minimization of a positive definite quadratic form under linear equality constraints. These are reusable well beyond this mission; proofs of them as separate lemmas are welcome.
Selected references
G. Ch. Pflug and W. Römisch, Modeling, Measuring and Managing Risk, World Scientific, 2007, §4.2.3, pp. 189–195. https://doi.org/10.1142/6478
R. C. Merton, An Analytic Derivation of the Efficient Portfolio Frontier, Journal of Financial and Quantitative Analysis 7(4), 1851–1872, 1972. https://doi.org/10.2307/2329621
Geometric Deep Learning V: A Degree-r Polynomial Filter Σ αₖΔᵏX of a Graph Laplacian Is Localised in r-Hop NeighbourhoodsTextbook
Motivation
Graph neural networks and geometric learning on meshes rely on operators that combine the features of a node with those of its neighbours. The graph Laplacian is the oldest such operator: it is the discrete analogue of the Laplace–Beltrami operator of a surface, and its eigenvectors play the role of a Fourier basis on a graph. Early spectral graph networks (Bruna et al., 2013) learned filters directly in that eigenbasis. Such filters are expensive, since they need an eigendecomposition, and they do not transfer between graphs. Defferrard, Bresson and Vandergheynst (2016) replaced them with polynomial filtersp^(Δ)X=∑k=0rαkΔkX. These are computed with r sparse matrix products, and their output at a node depends only on a bounded neighbourhood of that node.
This mission formalizes Section 4.6 of the book Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges by Bronstein, Bruna, Cohen and Veličković (arXiv:2104.13478v2). The section introduces the weighted Laplacian (24) and the spectral and polynomial filters built on it, and states that a polynomial filter of degree r is localised in the r-hop neighbourhood. The section closes with the view of meshes as operators Q, which leads to remeshing invariance and to the result of Wang et al. (2019a) that remeshing-invariant functions depend only on the spectrum. The book numbers no theorems, lemmas or definitions, so every item of this mission is cited by section, equation number and printed page.
Setting
There are n nodes {1,…,n}. A weight matrixW=(wuv)∈Rn×n assigns a weight to each ordered pair of nodes. The neighbourhood of u is Nu={v:wuv=0}. Node features form a matrix X∈Rn×d whose row xu is the d-dimensional feature vector of node u.
The degree of u is du=∑vwuv, and the degree matrix is D=diag(d1,…,dn). The Laplacian is
Δ=D−W,(ΔX)u=v∈Nu∑wuv(xu−xv).(24)
The graph is undirected when W=W⊤; then Δ is symmetric and has an orthonormal eigenbasis Φ=(φ1,…,φn) with Δ=ΦΛΦ⊤ and Λ=diag(λ1,…,λn). The Fourier coefficients of X are X^=Φ⊤X.
Given a degree r and real coefficients α0,…,αr, the polynomial filter is
p^(Δ)X=k=0∑rαkΔkX,p^(λ)=k=0∑rαkλk.
Hops are measured in a simple graph G on the nodes that carries the weights: wuv=0 with u=v implies that u and v are adjacent. A node v is within r hops of u if some walk in G from u to v has length at most r.
A permutation σ of the nodes acts by its permutation matrix P, with (PX)u=xσ−1(u) and W↦PWP⊤. A function f of n×n matrices Q is remeshing invariant if f(CQC⊤)=f(Q) for every orthogonal C∈O(n). A matrix-valued F is remeshing equivariant if CF(Q)=F(CQC⊤).
Formalization targets
Goal: locality of polynomial filters (p. 65)
If X and X′ agree at every node within r hops of u, then
(k=0∑rαkΔkX)u=(k=0∑rαkΔkX′)u
for every choice of α0,…,αr. This is the book's sentence "since the Laplacian is local, a polynomial filter of degree r is localised in r-hop neighbourhood". The statement fixes no coefficients and no graph family.
Milestones
(24), p. 62.(ΔX)u=∑v∈Nuwuv(xu−xv)=duxu−∑v∈Nuwuvxv. The matrix D−W is the local difference operator.
p. 62.F(X)=ΔX is permutation equivariant: Δ(PWP⊤)(PX)=PΔ(W)X.
Side-note, p. 64. If W=W⊤, then Δ is symmetric and Δ=ΦΛΦ⊤ with Φ orthogonal.
p. 64. If Δ=ΦΛΦ⊤, then ∑kαkΔkX=Φdiag(p^(λ1),…,p^(λn))X^.
Companions (p. 67)
The result of Wang et al. (2019a): if Q=VΛV⊤ with V orthogonal, then f(Q)=f(Λ) for a remeshing-invariant f, and F(Q)=VF(Λ) for a remeshing-equivariant F.
A remeshing-invariant f takes equal values on symmetric matrices with the same characteristic polynomial.
Permutation matrices satisfy P⊤P=I, so remeshing invariance implies permutation invariance and equivariance.
Significance
The result. Locality is what separates polynomial filters from general spectral filters. A spectral filter Φp^(Λ)Φ⊤ with an arbitrary transfer function p^ is a dense matrix: every output depends on every input. A degree-r polynomial filter has support inside the r-hop neighbourhood, so it costs r sparse matrix products and has a receptive field controlled by r. Milestone 4 shows that the same object is also a spectral filter, with transfer function p^. A polynomial filter is therefore both a spectral filter and a message-passing operation. The book's discussion of rational filters on the same page, which have exponential decay but no local support, uses this contrast. The remeshing companions give the reason spectral constructions are used across different meshes: a remeshing-invariant function of the operator sees only the spectrum.
The formalization. The mathematics is classical, and the mission is about formalizing it. Mathlib has the unweighted combinatorial Laplacian SimpleGraph.lapMatrix and the spectral theorem for Hermitian matrices. The platform has a proved theorem counting walks with powers of an unweighted adjacency matrix. Neither gives the support of powers of a weighted Laplacian, whose nonzero diagonal is not covered by walk counts of a fixed length. None of the statements here is formalized on the platform. The mission produces a reusable support lemma for matrix polynomials of a graph-supported matrix, and a link between spectral and polynomial filters in the matrix language used by graph neural networks.
Difficulty
A first attempt identifies (Δk)uv with a count of walks of length exactly k, as for the adjacency matrix. That identification fails here. Δ has the diagonal entries du, so (Δk)uv sums over walks that may pause at a node, and it can be nonzero for v at any distance up to k. The claim is therefore "within at most k hops", and the induction has to track walks of length at most k through a matrix with nonzero diagonal. Two encodings make the claim easy and wrong. Mathlib's SimpleGraph.dist is 0 for unreachable pairs, so "dist(u,v)≤r" would place every unreachable node inside the neighbourhood. A filter defined through the eigendecomposition is not visibly local, so the locality statement has to be about ∑kαkΔk itself. For the companions, the difficulty is the spectral theorem and the fact that two symmetric matrices with the same characteristic polynomial are orthogonally similar, which requires matching eigenvalue lists up to a permutation.
Formalization scope
Matrices are Matrix (Fin n) (Fin n) ℝ, and features are Matrix (Fin n) (Fin d) ℝ, with rows as nodes. The Laplacian is the published definition SpectralSparsify.Sampling.lapMat (degree matrix minus weight matrix), referenced rather than redefined and used under the local name lap. It imposes no condition on W. A diagonal weight wuu cancels in D−W. Symmetry W=W⊤ is assumed only where the book needs it: the side-note on p. 64. The polynomial filter is the explicit sum ∑k=0rαkΔk with coefficients indexed by {0,…,r}. "Within r hops" is the existence of a walk of length at most r in a simple graph G that contains the support of W. The goal is stated for every such G and for non-symmetric W. Both are generalisations of the book's undirected setting, where G is the graph of W. Permutation matrices act by moving row σ−1(u) to row u. Remeshing invariance quantifies over all of Mathlib's orthogonalGroup. "The same spectrum" is equality of characteristic polynomials of symmetric matrices.
A trivializing formalization is ruled out: the filter is not defined through an eigendecomposition, "localised" is not defined as "is a polynomial in Δ", and the hop condition is not stated through the junk-valued SimpleGraph.dist.
A complete development needs the support of products of graph-supported matrices, the spectral theorem in orthogonal form (Mathlib's Matrix.IsHermitian.eigenvectorUnitary), and orthogonal similarity of symmetric matrices with equal characteristic polynomials. The support lemma is reusable for any message-passing operator that is a polynomial in a local matrix. Contributions of these lemmas, and alternative proofs (for example through Polynomial.aeval), are welcome.
Selected references
M. M. Bronstein, J. Bruna, T. Cohen, P. Veličković, Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges, arXiv preprint, 2021, §4.6, pp. 62–67. https://arxiv.org/abs/2104.13478
M. Defferrard, X. Bresson, P. Vandergheynst, Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering, NeurIPS, 2016. https://arxiv.org/abs/1606.09375
J. Bruna, W. Zaremba, A. Szlam, Y. LeCun, Spectral Networks and Locally Connected Networks on Graphs, ICLR, 2014. https://arxiv.org/abs/1312.6203
R. Levie, F. Monti, X. Bresson, M. M. Bronstein, CayleyNets: Graph Convolutional Neural Networks with Complex Rational Spectral Filters, IEEE Trans. Signal Processing, 2018. https://arxiv.org/abs/1705.07664
Y. Wang, V. Kim, M. Bronstein, J. Solomon, Learning Geometric Operators on Meshes, ICLR Workshops, 2019 (the book's "Wang et al. 2019a"; no arXiv version is listed in the book's bibliography, PDF p. 157 of https://arxiv.org/abs/2104.13478v2).
Geometric Deep Learning II: Every Linear Permutation-Equivariant Map on ℝⁿ Is a Linear Combination of the Identity and the Averaging Map (1/n)𝟙𝟙ᵀTextbook
Motivation
Many learning problems take an unordered collection as input: the points of a point cloud, the particles of a physical system, the atoms of a molecule, the nodes of a graph. Storing such data in memory fixes an order of the elements, but the order carries no information, and a model whose output changes when the rows of its input are shuffled is answering a different question from the one posed. Bronstein, Bruna, Cohen and Veličković, Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges (arXiv:2104.13478v2, 2021), §4.1, make this the first instance of their blueprint: the domain is a set (or a graph) of n nodes, and the symmetry group is the symmetric group Σn of all reorderings.
Two architectures used in practice follow this pattern. Deep Sets (Zaheer et al., NeurIPS 2017) and PointNets (Qi et al., CVPR 2017) process sets; message-passing graph neural networks process graphs. The design question in both cases is which layers respect the symmetry. For linear layers the question has a complete answer, and the answer determines the layer used by Deep Sets. For graphs, Maron, Ben-Hamu, Shamir and Lipman (2018) counted the linear layers acting on adjacency matrices.
Setting
A set of n nodes V={1,…,n} carries node featuresxu∈Rd, stacked as the rows of a matrix X∈Rn×d. A graph adds an adjacency matrixA∈Rn×n, eq. (8), whose nonzero entries are the edges.
A permutation σ∈Σn acts through its permutation matrixP by reordering rows: row u of PX is row σ−1(u) of X. On adjacency matrices it acts by A↦PAP⊤, reordering rows and columns together.
A function f is permutation invariant if f(PX)=f(X) for every permutation matrix P, and a matrix-valued function F is permutation equivariant if F(PX)=PF(X). On graphs the book's definitions (9) and (10) are
f(PX,PAP⊤)=f(X,A)(9),F(PX,PAP⊤)=PF(X,A)(10),
for any permutation matrix P.
The section's constructions are the sum readoutf(X)=ϕ(∑u∈Vψ(xu)) (6); the shared node-wise linear mapFΘ(X)=XΘ (7); the neighbourhoodNu={v:(u,v)∈E or (v,u)∈E} (11) and the multiset of neighbourhood featuresXNu={{xv:v∈Nu}} (12); and the local layer whose u-th row is ϕ(xu,XNu) (13). For one feature channel the two linear generators are the identity F1x=x and the averageF2x=n111⊤x, every entry of which is the mean n1∑uxu.
The book numbers no theorems, lemmas or definitions; every item of this mission is cited by section, equation number and printed page.
Formalization targets
Goal: linear equivariant maps on one channel
For n≥1 and a linear map F:Rn→Rn,
(∀P,∀x:FPx=PFx)⟺∃α,β∈R∀x:Fx=αx+βn111⊤x.
This is the book's sentence on p. 33: any linear equivariant "can be written as a linear combination of two generators, the identity … and the average". Both directions are stated; the content is the "only if" direction.
Milestones
The sum readout (6) is permutation invariant (p. 32).
The node-wise linear map (7) is permutation equivariant, with rows hu=Θ⊤xu (p. 33).
The local layer (13) satisfies (10) whenever ϕ is invariant to the order of the neighbourhood (p. 34).
Invariant and equivariant functions give identical outputs on isomorphic graphs (p. 35).
On the complete graph A=11⊤, the aggregate ⨁v∈Vψ(xv) is the same at every node (§5.4, p. 81).
Stronger statements
Several channels (corrected). A linear F:Rn×d→Rn×d′ is permutation equivariant iff F(X)=XΘ1+n111⊤XΘ2.
Adjacency matrices (Maron et al., corrected). For n≥4, the linear maps L:Rn×n→Rn×n with L(PAP⊤)=PL(A)P⊤ form a space of dimension 15=B4.
Significance
The result. The goal classifies the linear layers of a set network. Any equivariant linear layer on scalar node features mixes each node's own value with the mean of all values, and nothing else; with several channels the two scalars become two weight matrices, which is exactly the Deep Sets layer. Read the other way, the theorem says that the commutant of the permutation representation of Σn on Rn is two-dimensional (for n≥2), the algebraic fact behind the decomposition Rn=span(1)⊕1⊥ into two irreducible pieces. The Maron et al. count does the same for layers acting on adjacency matrices and fixes the size of the parameter space of invariant graph networks. The milestones give the elementary invariance and equivariance facts on which the graph-network chapter rests, including the constant aggregate on a complete graph.
Formalizing it. All results here are classical and proved on paper. None is formalized on Prove2Me, and Mathlib has no statement about the commutant of the permutation representation or about equivariant layers on sets. The mission produces a vocabulary of permutation actions on feature and adjacency matrices, and the invariance and equivariance definitions (9)–(10), that later missions of this series (the WL comparison, the E(3)-equivariant layer) also use. Two of the book's printed claims need correction to be true, and the formal statements record the corrected versions.
Difficulty
The milestones are short reindexing arguments; the work is in choosing encodings that keep them faithful. The goal's "if" direction is a one-line computation. The "only if" direction is where an argument is needed: equivariance under all of Σn must force the matrix of F to have one value on the diagonal and one value off it. Equivariance under a smaller group does not suffice: commuting with the cyclic shift alone gives all circulant matrices, an n-dimensional space, so the argument must use permutations beyond the shifts. The channel version adds a tensor-product layer to the same argument. The Maron et al. count is a dimension statement, so it needs both a spanning family and its independence, and the count is sensitive to n: for n<4 the dimension is strictly smaller than 15, so any argument must use n≥4 somewhere.
Formalization scope
Node features are Matrix (Fin n) (Fin d) ℝ (rows are nodes); a single channel is Fin n → ℝ. A permutation is σ : Equiv.Perm (Fin n), acting by X.submatrix σ.symm id (row u of PX is row σ−1(u)) and on adjacency matrices by A.submatrix σ.symm σ.symm; this one convention is used in every statement. Adjacency matrices are real; the edge set is the set of nonzero entries, which for the book's 0/1 matrix (8) is its edge set and also admits weighted graphs. The function ϕ of (13) and the aggregator ⨁ of §5.4 take a Multiset, so their invariance to the order of the neighbours holds by construction. The average n111⊤ is written with (n:R)−1, and the goal and channel version assume 0<n. Equivariance quantifies over every permutation of Σn, never a generating subset. The complete-graph item states the identical-aggregate clause of §5.4. The page's later claim of equal expressive power across inputs is false: with n=2, ψ(x)=x, ⨁=∑, and ϕ(x,s)=s, changing x2 changes h1 while x1 stays fixed, which no node-only map can reproduce.
A trivializing formalization is ruled out: "equivariant" is the commutation property itself, never defined as "of the form αI+βn111⊤".
Two printed claims are corrected. On p. 33 the two-generator form is stated for matrices X with d channels; it is false for d>1 (the map X↦XΘ of (7) is a counterexample), so the goal is single-channel and the multi-channel statement uses weight matrices. On p. 34 the fifteen generators are said to be independent of n; the dimension is 1, 8 and 14 for n=1,2,3, so that item assumes n≥4, and it is stated for adjacency-to-adjacency maps as the side-note on p. 33 specifies.
The development needs Mathlib's Equiv.Perm, Matrix.submatrix, Finset sums and reindexing (Equiv.sum_comp), Multiset.map, and Module.finrank. Proofs of the commutant statements, of the multi-channel version and of the dimension count are welcome; the permutation-action and invariance lemmas proved along the way are reusable by any later development on graph networks.
Selected references
M. M. Bronstein, J. Bruna, T. Cohen, P. Veličković, Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges, arXiv preprint, 2021. https://arxiv.org/abs/2104.13478v2
M. Zaheer, S. Kottur, S. Ravanbakhsh, B. Póczos, R. Salakhutdinov, A. Smola, Deep Sets, NeurIPS, 2017. https://arxiv.org/abs/1703.06114
H. Maron, H. Ben-Hamu, N. Shamir, Y. Lipman, Invariant and Equivariant Graph Networks, ICLR, 2019. https://arxiv.org/abs/1812.09902
C. R. Qi, H. Su, K. Mo, L. J. Guibas, PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation, CVPR, 2017. https://arxiv.org/abs/1612.00593
The Nature of Statistical Learning Theory V: The VC Dimension of Δ-Margin Separating HyperplanesTextbook
Motivation
A separating hyperplane in Rn is a classifier of VC dimension n+1, so a bound on its generalization error that goes through the VC dimension degrades with the dimension of the space. Support vector machines construct hyperplanes in feature spaces of enormous dimension and still generalize. Chapter 5 of V. N. Vapnik, The Nature of Statistical Learning Theory (2nd ed., Springer 2000, doi:10.1007/978-1-4757-3264-1) explains this by a different capacity measure. When a hyperplane is required to separate the data with a marginΔ, and the data lie in a ball of radius R, the VC dimension is bounded by roughly R2/Δ2, independently of n.
Timeline. The optimal (maximal margin) hyperplane goes back to Vapnik and Chervonenkis (1965, 1974). Its use with kernels, in place of an explicit feature space, is due to Boser, Guyon and Vapnik (COLT 1992), and the soft-margin support vector machine to Cortes and Vapnik (Machine Learning 20 (1995)). The margin bound appears as Theorem 5.1 of the book, which prints no proofs (Preface, p. xi). In Burges's tutorial (Data Min. Knowl. Disc. 2 (1998)) the bound for "gap tolerant classifiers" carries a ceiling, min(⌈D2/M2⌉,d)+1.
Setting
Vectors live in Rn with the Euclidean inner product (w⋅x). A Δ-margin separating hyperplane is a hyperplane (w∗⋅x)−b=0 with ∣w∗∣=1 and b∈R. It classifies x as y=1 if (w∗⋅x)−b≥Δ and as y=−1 if (w∗⋅x)−b≤−Δ; vectors in the strip ∣(w∗⋅x)−b∣<Δ get no label (§5.4.2, p. 132). Vectors x1,…,xh are shattered by these hyperplanes if each of the 2h labelings y1,…,yh∈{1,−1} is realized by one hyperplane that classifies everyxi with label yi. The VC dimension on a set X is the largest h for which some x1,…,xh∈X are shattered, or ∞. In Lean these are MarginClassifies, MarginShatters and marginVCDim in NatureSLT.Margin.
For training data (x1,y1),…,(xℓ,yℓ) with yi∈{+1,−1}, a hyperplane (w⋅x)−b=0 is in canonical form if yi[(w⋅xi)−b]≥1 for all i (5.8). The optimal hyperplane(w0,b0) satisfies (5.8) and minimizes Φ(w)=∥w∥2 over w and b (5.9). Its support vectors are the xi with equality in (5.8). The dual functional is W(α)=∑iαi−21∑i,jαiαjyiyj(xi⋅xj) (5.17). In Lean: IsCanonicalSeparating, IsOptimalHyperplane, supportVectors and dualW.
Formalization targets
Goal: Theorem 5.1 (pp. 132–133)
If every x∈X lies in a sphere (closed ball) of radius R>0 and Δ>0, then
h≤min([Δ2R2],n)+1,
with [⋅] the integer part. As printed this is false (see Beyond the paper), and a disproof of the goal is a legitimate outcome of the mission.
Milestones
§5.4.1, (5.8)–(5.9): the canonical hyperplane minimizing ∥w∥2 separates the data without error with maximal distance from the closest vector. Conversely, a maximal-margin hyperplane, rescaled to canonical form, minimizes ∥w∥2.
§5.4.2: the optimal hyperplane, normalized to ∣w∗∣=1, is a Δ-margin separating hyperplane with Δ=1/∣w0∣.
(5.13)–(5.16): a hyperplane satisfying (5.11) is optimal if and only if there are αi0≥0 with ∑iαi0yi=0, w0=∑iyiαi0xi (a sum over support vectors only), and αi0{[(xi⋅w0)−b0]yi−1}=0.
Display after (5.19): for a solution α0 of the dual problem, ∣w0∣2=2W(α0)=∑support vectorsαi0αj0(xi⋅xj)yiyj.
Theorem 5.3 (Mercer): a symmetric K∈L2 has an expansion K(u,v)=∑kakψk(u)ψk(v) with ak>0 if and only if ∬K(u,v)g(u)g(v)dudv>0 for all g=0 in L2.
Significance
Theorem 5.1 is the reason the book gives for the generalization of the optimal hyperplane in high-dimensional feature spaces (§5.6.1). With the bound (3.24) it drives the Corollary on p. 133 and the choice of Δ in structural risk minimization. Milestones 1–4 are the convex-optimization facts on which the construction of the support vector machine rests: margin maximization as a quadratic program, its Kühn–Tucker characterization and the dual problem. Milestone 5 is the condition under which a kernel can replace the feature-space inner product.
On the platform, UnderstandingML.hard_svm_max_margin (the analogue of milestone 1 with the convention +b) and UnderstandingML.support_vectors (the bias-free Hard-SVM) are proved. UnderstandingML.kernel_iff_posSemidef characterizes kernels by positive semidefinite Gram matrices, and HighDimStat.Rkhs.thm12_20_mercer_v2 (open) is the eigen-expansion of a continuous kernel on a compact space. There is no margin-dependent VC dimension bound; the BartlettNN.Margin.* results bound fat-shattering dimensions of real-valued classes. The mission adds the book's bias-carrying statements, the first formal Δ-margin VC bound, and machine-checked settlements of the misprinted statements.
Difficulty
The dimension part of the bound, h≤n+1, is the classical VC dimension of affine half-spaces; the content is the radius part. A solver has to control how far apart the two classes of an arbitrary dichotomy of h points in a ball can be pushed by a unit-normal hyperplane with a free bias. The bias does not cancel for unbalanced dichotomies, and this is exactly where the printed integer part and the correct bound part ways. The Kühn–Tucker milestone requires optimality conditions for a convex quadratic program with linear inequality constraints. The Mercer milestone requires the spectral theory of Hilbert–Schmidt integral operators on L2 of a set of positive Lebesgue measure. Neither is packaged in Mathlib in this form.
Formalization scope
Vectors are EuclideanSpace ℝ (Fin n); training data are indexed by Fin ℓ; labels are real numbers with yi∈{+1,−1} as a hypothesis, and both classes present, the setting of §5.5. In the shattering definition, labels are booleans. "Sphere of radius R" is a closed ball about an arbitrary center; R>0 and Δ>0 are hypotheses. The VC dimension takes values in N∪{∞}, so an unbounded family is ∞, never a junk value. Shattering requires every point to be classified with its margin: a definition that let points fall into the strip would make the bound trivial, and is ruled out. Optimality is a predicate on a given pair (w0,b0); no item asserts that an optimum exists. The typo "Δ=1/∣w∗∣" of §5.4.2 is read as 1/∣w0∣. The Mercer items take U⊆Rd (d≥1) measurable of positive Lebesgue measure, with ψk orthonormal in L2(U) and the expansion converging in L2(U×U).
Not drafted: the Corollary on p. 133 and Theorem 5.2 (p. 139). Both are probabilistic, and their hypotheses (what the VC dimension of a set of partial classifiers means inside (3.24), the training-set size in the leave-one-out argument) are not pinned down on the page.
Beyond the paper. Two [Corrected] variants are posed beside the faithful items. (1) Theorem 5.1 with the ceiling ⌈R2/Δ2⌉: the vertices of an equilateral triangle inscribed in the unit circle of R2 are shattered with Δ=3/4, while min([16/9],2)+1=2, a counterexample to the printed bound that has been checked in Lean. (2) Mercer's theorem with ≥0 in the condition and the coefficients: a kernel ∑k2−kψk(u)ψk(v) over the incomplete system 2sin(2πku) on [0,1] has positive coefficients, yet ∬Kgg=0 for g≡1.
Contributions welcome: a convex-quadratic-programming KKT library for finitely many linear constraints; integral operators with L2 kernels and their spectral expansion; disproofs of the faithful Theorem 5.1 and Theorem 5.3.
V. N. Vapnik, Statistical Learning Theory, Wiley, 1998. ISBN 978-0-471-03003-4.
B. E. Boser, I. M. Guyon, V. N. Vapnik, A training algorithm for optimal margin classifiers, COLT 1992. doi:10.1145/130385.130401
C. Cortes, V. Vapnik, Support-vector networks, Machine Learning 20, 1995. doi:10.1007/BF00994018
C. J. C. Burges, A tutorial on support vector machines for pattern recognition, Data Mining and Knowledge Discovery 2, 1998. doi:10.1023/A:1009715923555
J. Mercer, Functions of positive and negative type, and their connection with the theory of integral equations, Phil. Trans. R. Soc. A 209, 1909. doi:10.1098/rsta.1909.0016
Introduction to Matrix Analytic Methods in Stochastic Modeling XI: First Passage Times by Reduction and BisectionTextbook
Motivation
In a quasi-birth-and-death process (QBD) a queue length or buffer content (the level) moves up or down by at most one per step while an auxiliary Markov environment (the phase) modulates the rates. When buffers are bounded the level lives in {0,1,…,M}, and a basic performance question is how long it takes, on average, for an initially empty buffer to fill: the expected first passage time from the bottom level to the top level. Overflow and loss analyses of finite-buffer queues in telecommunication and manufacturing models ask exactly this quantity, and higher moments follow from the same linear systems.
Chapter 11 of Latouche and Ramaswami's Introduction to Matrix Analytic Methods in Stochastic Modeling (SIAM 1999) gives two exact algorithms for it: a linear level reduction, adding one level at a time (Gaver, Jacobs and Latouche, Advances in Applied Probability, 1984), and a reduction by bisection that doubles the number of levels at each step (Latouche and Ramaswami, Stochastic Models, 1995), reaching M levels in about log2M steps. This mission formalizes the probabilistic identities on which both algorithms rest.
Setting
Fix M≥2 and a finite set of mphases. The states are pairs (n,i) with level 0≤n≤M and phase i; the level ℓ(n) is {(n,i)}i. A finite QBD is the discrete-time Markov chain (Xk) with block-tridiagonal transition matrix (10.2): from level n it moves up one level with the m×m probability matrix A0, down one level with A2, and stays in its level with P00 at level 0, PMM at level M and A1 in between. The matrix is stochastic and the chain is irreducible.
Let τ(k)=inf{j>0:Xj∈ℓ(k)}. For levels n=k:
tn→k is the vector of expected first passage times E[τ(k)∣X0=(n,i)];
Γn→k is the matrix of first passage probabilities P[Xτ(k)=(k,j)∣X0=(n,i)];
with tn→n=0 and Γn→n=I. For 1≤i≤n≤M−1 let θ(n)=min(τ(0),τ(n+1)) be the first exit time from the block ℓ(1)∪⋯∪ℓ(n), and let
si(n) be the vector of expected exit times E[θ(n)∣X0=(i,p)];
Gi(n) and Γi(n) be the matrices of probabilities, starting from ℓ(i), that the exit is into ℓ(0), respectively ℓ(n+1), and in a given arrival phase.
All of these are taboo quantities of the chain: probabilities of sets of trajectories and expected values of hitting times.
Formalization targets
Goal: Lemma 11.3.1
For M≥2, the matrix I−Γ0→1G1(M−1) is nonsingular and
t0→M=(I−Γ0→1G1(M−1))−1{t0→1+Γ0→1s1(M−1)}.
Milestones
Lemma 11.2.1. For 0≤n<k≤M: tn→k=tn→n+1+Γn→n+1tn+1→k and Γn→k=Γn→n+1Γn+1→k.
Lemma 11.2.2. With C0=P00 and Cn=A1+A2Γn−1→n: Γn→n+1=(I−Cn)−1A0 for 0≤n≤M−1, t0→1=(I−C0)−11, and tn→n+1=(I−Cn)−11+(I−Cn)−1A2tn−1→n for 1≤n≤M−1.
Lemma 11.3.2. For n,ν≥1 with n+ν≤M−1, 1≤i≤n, 1≤j≤ν: Gi(n+ν)=Gi(n)+Γi(n)G1(ν)Gn(n+ν), Gn+j(n+ν)=Gj(ν)Gn(n+ν), Γi(n+ν)=Γi(n)Γn+1(n+ν), Γn+j(n+ν)=Γj(ν)+Gj(ν)Γn(n)Γn+1(n+ν), Gn(n+ν)=(I−Γn(n)G1(ν))−1Gn(n) and Γn+1(n+ν)=(I−G1(ν)Γn(n))−1Γ1(ν).
Lemma 11.3.3. In the same range: si(n+ν)=si(n)+Γi(n)s1(ν)+Γi(n)G1(ν)sn(n+ν), sn(n+ν)=(I−Γn(n)G1(ν))−1{sn(n)+Γn(n)s1(ν)} and sn+j(n+ν)=sj(ν)+Gj(ν)sn(n+ν).
The goal is the identity the bisection algorithm ends with. Milestones 3 and 4 are its doubling step, and milestones 1 and 2 give the linear algorithm.
Significance
Lemmas 11.2.1–11.2.2 justify the Linear Level Reduction Algorithm (Figure 11.1 of the book), which is block LU factorization of I−T for the transient part T of the chain. Lemmas 11.3.1–11.3.3 justify the Reduction by Bisection algorithm (Figure 11.2): it computes t0→M with O(logM) products of m×m matrices instead of O(M), using the fact that the levels 1,…,M−1 form a homogeneous block. The same decompositions, applied to the matrices G and Γ, underlie the doubling and cyclic-reduction methods for infinite QBDs.
These results are proved in the book, partly in condensed form: Lemma 11.3.3 is left to the reader, and of the six relations of Lemma 11.3.2 only (11.13)–(11.15) and (11.17) are argued explicitly, the others "in a similar manner". No machine-checked version of any of them exists. The Prove2Me platform has finite and countable Markov chains (MarkovMixing) and scalar hitting-time results (MarkovMixing.gamblers_ruin), but no block-structured first passage theory. This mission supplies the strong-Markov decompositions at hitting times of level sets, in matrix form, together with the nonsingularity arguments that make the formulas well defined.
Difficulty
Every identity is a first-passage decomposition: condition on where the chain first enters a level, or first leaves a block of levels. Three points stop the obvious argument from being routine. First, the quantities are infinite sums over trajectories, and splitting a trajectory at a hitting time must be done as an exact bijection of taboo paths, with expected times given as tail sums. Second, the bisection lemmas compare exit probabilities of different blocks of levels. Gj(ν) is defined for the levels 1,…,ν, but the relations use it for the shifted levels n+1,…,n+ν. The shift is legitimate only because the transition matrix is homogeneous on the levels 1,…,M−1, and the identification has to be proved. Third, each inverse requires a spectral argument: the series ∑ν(Γ0→1G1(M−1))ν converges because irreducibility forbids returning to ℓ(0) forever without visiting ℓ(M). Turning this into nonsingularity of a real matrix needs a bound on the spectral radius of a substochastic matrix, not a mere appeal to probability. Finiteness of every expectation likewise rests on irreducibility of the finite chain.
Formalization scope
States are pairs in N×ι with ι a finite type. The transition matrix is (10.2) for the levels 0,…,M and 0 elsewhere. The standing assumptions (nonnegative blocks, stochastic rows, M≥1, irreducibility on the levels 0,…,M) form one predicate. Probabilities and expectations are defined as sums over finite taboo trajectories of products of one-step probabilities, valued in [0,∞]. Expectations are tail sums ∑t≥0P[τ>t]. The quantities Gi(n),Γi(n),si(n) are defined, as in the book, for the chain itself, and the theorems use them only in the book's range n+ν≤M−1. Identities without an inverse are stated in [0,∞]. Identities with an inverse are stated between real matrices: each matrix inverted is proved nonsingular, and each expectation that is read as a real number is proved finite, both as part of the conclusion.
None of tn→k, Γn→k, Gi(n), Γi(n), si(n) may be defined as the solution of the chapter's equations. Doing so would make every target true by definition, so they are defined only as hitting quantities of the chain. Lemma 11.2.2 prints Cn=A1+A2(I−Cn−1−1)A0=A1+A2Γn−1→n, and the two printed expressions differ. The faithful statement uses the second one, A1+A2Γn−1→n.
Beyond the paper. One variant is posed, level_by_level_corrected (kind: corrected). It states Lemma 11.2.2 with Cn=A1+A2(I−Cn−1)−1A0, the recursion (10.3) the proof cites. Evidence: with one phase, P00=2/3 and A0=A1=A2=1/3, the printed first expression gives C1=5/18, whereas A1+A2Γ0→1=2/3.
A complete development needs the following. Strong-Markov path splitting for path-sum hitting quantities is reusable for any countable chain. So are the convergence of ∑Mν and the nonsingularity of I−M for substochastic matrices that cannot keep mass forever. Contributions of either as standalone lemmas are welcome.
Selected references
G. Latouche and V. Ramaswami, Introduction to Matrix Analytic Methods in Stochastic Modeling, ASA-SIAM Series on Statistics and Applied Probability, SIAM, 1999, Chapters 10–11. https://doi.org/10.1137/1.9780898719734
D. P. Gaver, P. A. Jacobs and G. Latouche, Finite birth-and-death models in randomly changing environments, Advances in Applied Probability 16 (1984), 715–731 (reference [26] of the book).
G. Latouche and V. Ramaswami, Expected passage times in homogeneous quasi-birth-and-death processes, Communications in Statistics. Stochastic Models 11 (1995), 103–122 (reference [54] of the book).
Introduction to Matrix Analytic Methods in Stochastic Modeling X: Linear Level Reduction for Finite QBDsTextbook
Motivation
In a queue with a finite buffer, a multi-server system with a capacity limit, or a communication link with a bounded number of packets in transit, the number of customers is a level that takes only finitely many values, and the rest of the state (service phase, arrival phase, environment) is a phase. The resulting Markov chain is a finite quasi-birth-and-death process (finite QBD): it moves by at most one level per step, and its transition probabilities do not depend on the level except at the two boundaries. Finite QBDs model M/PH/1/K and PH/M/1/K queues, finite-buffer multiplexers and loss systems, and computing their stationary distribution is the routine numerical task behind blocking probabilities and buffer-dimensioning.
Chapter 10 of Latouche and Ramaswami, Introduction to Matrix Analytic Methods in Stochastic Modeling (SIAM 1999), gives the standard exact method, linear level reduction, adapted from Gaver, Jacobs and Latouche (Advances in Applied Probability, 1984): remove the levels one at a time, solve the chain watched on the last remaining level, and rebuild the stationary vector level by level. The chapter shows that every matrix the algorithm computes has a probabilistic meaning, which is what makes the algorithm a probabilistic form of block Gaussian elimination rather than an algebraic trick. This mission is the tenth of a series formalizing the book.
Setting
Fix M≥1 and a finite nonempty set ι of phases. The state space is the set of pairs (n,j) with level 0≤n≤M and phase j∈ι; the levelℓ(n) is the set of states with first coordinate n, and Si=⋃i≤n≤Mℓ(n). Five real ι×ι matrices P00,A0,A1,A2,PMM define the block tridiagonal transition matrix
P=P00A2A0A1⋱A0⋱A2⋱A1A2A0PMM,
so A0 moves up one level, A2 down one level, and A1 (or P00, PMM at the boundaries) stays. P is assumed stochastic (nonnegative, rows summing to one) and irreducible (every state reaches every state). Its stationary vectorπ is the row vector with π≥0, π1=1, πP=π, partitioned into blocks π=(π0,…,πM).
For a set A of states, the probability, starting from x, that the first visit to A after time 0 is a visit to y is the sum, over all finite trajectories from x to y whose intermediate states avoid A, of the products of one-step transition probabilities. The process restricted on A has these first-return probabilities as its transition matrix.
Two families of matrices are defined by recursion. Upwards:
For an irreducible finite QBD, I−U(i) is invertible for 1≤i≤M, and
π0=π0U(0),πi=πi−1R(i)(1≤i≤M);
these equations determine π up to a multiplicative constant. Moreover, for 1≤i≤M, U(i) is the matrix of probabilities of returning from ℓ(i) to ℓ(i) before a visit to ℓ(i−1), and (I−U(i))−1A2 is the matrix of first passage probabilities from ℓ(i) to ℓ(i−1).
Milestones
Lemma 10.1.1. The process restricted on Si has the transition matrix of the same block form with Ci in the corner; I−Ci is invertible for i≤M−1; Ci is the matrix of returns from ℓ(i) to ℓ(i) before reaching ℓ(i+1); (I−Ci)−1A0 is the first passage matrix from ℓ(i) to ℓ(i+1).
Theorem 10.1.2.π is the unique real solution of πM=πMCM, πi=πi+1A2(I−Ci)−1 (0≤i≤M−1), ∑iπi1=1.
Theorem 10.4.1. If A2=c⋅r has rank one with r1=1, then πi=π0Ri (1≤i≤M−1), πM=π0RM−1RM, π0(I−P00−A01⋅r)=0, with R=A0(I−A1−A01⋅r)−1, RM=A0(I−PMM)−1; and symmetrically when A0 has rank one.
Significance
The goal is the finite counterpart of the matrix-geometric property πn=πn−1R, R=A0(I−U)−1 of the infinite QBD (Theorem 6.2.1 of the book): with a finite upper boundary the matrices U(i) depend on the level, and the stationary vector is a product of level-dependent factors. Together with Lemma 10.1.1 and Theorem 10.1.2 it justifies the two block-elimination algorithms of the chapter (bottom-up and top-down), whose cost is linear in the number of levels, and Theorem 10.4.1 reduces the whole computation to one m×m system for the M/PH/1/K and PH/M/1/K queues.
The results are classical and proved in the book, except that Theorem 10.1.3's proof is omitted as "a repetition of the argument" for Theorem 10.1.2. None of them is formalized. The mission produces a formal account of finite block tridiagonal chains, taboo first-entrance probabilities as trajectory sums, and the link between restricted (censored) chains and block Gaussian elimination, all reusable by the later chapters on first passage times and level-dependent QBDs.
Difficulty
The algebra of block elimination is routine once the inverses exist; the content is that they exist and that the recursively defined matrices are the probabilities claimed. The obvious approach, verifying πP=π by substituting the recursions, proves neither: it presupposes invertibility of I−Ci and I−U(i), which holds only because the corresponding taboo matrices are strictly substochastic in an irreducible chain, and it says nothing about first passage probabilities. Identifying the recursion with the probabilities requires decomposing trajectories at their visits to a level, inductively in the number of removed levels, and passing to the limit in infinite sums of trajectory weights. Uniqueness of the solution, and the rank-one reduction of Theorem 10.4.1, then rest on the first passage matrices being stochastic.
Formalization scope
The state space is Fin (M + 1) × ι with ι a nonempty Fintype, levels counted from 0; the transition matrix is the explicit block tridiagonal qbdMatrix, and every theorem assumes M≥1, stochasticity and irreducibility. Row vectors act on the left (vecMul). The first-visit probabilities are sums over t of firstEntryStep, a finite sum of products of one-step probabilities over trajectories with t intermediate states avoiding the taboo set, and every statement asserts the convergence of that series (HasSum) to the stated matrix entry. Ci, U(i) and R(i) are defined by the book's recursions with Mathlib's matrix inverse, which is 0 on a singular matrix; every theorem therefore concludes the invertibility of each matrix it inverts, and none assumes it. Defining Ci or U(i) as the first-passage probabilities and the theorem as their recursion, or assuming the inverses exist, would trivialize the mission; both are excluded by this design. The probabilistic meanings in Lemma 10.1.1 and Theorem 10.1.3 are part of the conclusions. "Determined by" and "given by" are formalized as uniqueness of the solution (up to a constant for Theorem 10.1.3, which states no normalization).
The basic Markov chain notions restate the public platform definition mm_countable. Results stated in the chapter but not included: Lemma 10.3.1 and Theorem 10.3.2 (they need the rate matrices R, R^ of the infinite QBD and its level reversal) and the folding method of §10.2 (unnumbered). Contributions of general lemmas on censored finite chains and on substochastic taboo matrices are welcome.
Selected references
G. Latouche and V. Ramaswami, Introduction to Matrix Analytic Methods in Stochastic Modeling, ASA-SIAM Series on Statistics and Applied Probability, SIAM, 1999. https://doi.org/10.1137/1.9780898719734
D. P. Gaver, P. A. Jacobs and G. Latouche, Finite birth-and-death models in randomly changing environments, Advances in Applied Probability 16 (1984), 715–731.
M. F. Neuts, Matrix-Geometric Solutions in Stochastic Models: An Algorithmic Approach, Johns Hopkins University Press, 1981.
W. J. Stewart, Introduction to the Numerical Solution of Markov Chains, Princeton University Press, 1994.
Introduction to Matrix Analytic Methods in Stochastic Modeling II: The Renewal Function of a PH Renewal ProcessTextbook
Motivation
Renewal processes model ordered sequences of events on [0,∞): arrivals to a queue, service completions, equipment failures. Their defining feature is that successive intervals between events are independent and identically distributed. Two quantities answer most practical questions about such a process: the renewal functionR(x), the expected number of renewals in [0,x], and the renewal densityr(x)=R′(x). For a general interval distribution neither has a closed form; R solves a renewal integral equation.
When the intervals have a phase-type (PH) distribution, the time to absorption of a finite Markov process, both quantities become explicit matrix expressions. This is the starting point of Chapter 3 of Latouche and Ramaswami's Introduction to Matrix Analytic Methods in Stochastic Modeling (SIAM 1999). PH renewal processes are the arrival streams of most matrix-analytic queueing models, and the closed form of R(x) is the template for the corresponding formula for Markovian arrival processes (Section 3.6 of the book; Neuts 1979, Lucantoni 1991).
Setting
A PH representation(τ,T) on n phases consists of a nonnegative row vector τ and an n×n matrix T with Tii<0, Tij≥0 for i=j, and nonnegative exit vectort=−T1, where 1 is the all-ones column vector. It describes a Markov process on {0,1,…,n} that starts in phase i with probability τi, moves among the phases 1,…,n at the rates Tij, and is absorbed into state 0 at rate ti. Throughout, T is nonsingular and there is no atom at 0: τ1=1.
The PH renewal process restarts the Markov process instantaneously after each absorption, in a phase drawn from τ; the absorption epochs are the renewals. Ignoring the instantaneous visits to 0, the phase J(x) at time x is a Markov process with generator
D=T+t⋅τ,
where t⋅τ is the outer product. The representation is irreducible if every phase has a path of positive rates to the absorbing state and can be reached from a phase i with τi>0.
Let N(x) be the number of renewals in (0,x]. The pair (N(x),J(x)) is a Markov process whose generator has T in its diagonal blocks and t⋅τ just above them. Write
Pij(k,x)=P[N(x)=k,J(x)=j∣N(0)=0,J(0)=i].
The renewal function of the process started with a renewal at time 0 is R(x)=1+∑k≥0kτP(k,x)1. The remaining objects are the stationary vector π=(τT−11)−1τT−1 of the phase process, the matrix Π=1⋅π, and the mean interrenewal time M=τ(−T)−11.
Formalization targets
Goal: the renewal function (Theorem 3.1.4)
For an irreducible representation and every x≥0, the matrix D−Π is nonsingular, the series defining R(x) converges, and
R(x)=1+xM−1+τ(exp(Dx)−I)(D−Π)−1t.
Milestones
Lemma 3.1.1.D is irreducible whenever (τ,T) is.
Lemma 3.1.3.D−Π is nonsingular; π is the unique probability solution of πD=0, π1=1; and π(D−Π)−1=−π.
Theorem 3.2.1.P′(0,x)=TP(0,x), P′(k,x)=TP(k,x)+t⋅τP(k−1,x) for k≥1, with P(0,0)=I and P(k,0)=0 for k≥1, and ∑k≥0zkP(k,x)=exp{(T+zt⋅τ)x}.
Lemma 3.2.3. With c=maxi∣Tii∣, P=c−1T+I and p=c−1t, P(ν,x)=∑m≥νe−cxm!(cx)mKmν for matrices Km,ν given by an explicit recursion.
Theorem 3.1.2. For an initial phase distribution β, the expected number of renewals in (0,x] is differentiable at every x>0, with derivative βexp(Dx)t.
Significance
The result itself. Theorem 3.1.4 gives the renewal function of a PH renewal process in closed form from the representation alone. It separates the linear term x/M, the content of the elementary renewal theorem, from a correction τ(exp(Dx)−I)(D−Π)−1t that converges as x→∞ to −τ(D−Π)−1t. The matrix (D−Π)−1 is the deviation matrix of the phase process, and the same argument, with t replaced by the vector of batch rates, gives the expected count of a Markovian arrival process (Theorem 3.6.1). Theorem 3.2.1 and Lemma 3.2.3 are the two standard ways to compute the distribution of the number of renewals: by solving a linear system of differential equations, and by uniformization.
Formalizing it. These results are proved in the book, and in the earlier literature it cites, by hand. The platform has no continuous-time Markov chain layer and no phase-type objects. The mission builds the PH renewal process from a generator and the matrix exponential, and states the counting probabilities as transition probabilities of the process (N(x),J(x)). The definitions are reusable by every later mission on PH-driven queues.
Difficulty
The obvious route to the goal is to integrate the renewal density: R(x)=1+∫0xτexp(Du)tdu. That route is unavailable here for two reasons. First, the density is itself a theorem (Theorem 3.1.2): it must be derived from the counting probabilities P(k,x), which requires exchanging a derivative with an infinite sum over k and controlling the tail of the number of renewals. Second, D is singular (D1=0), so ∫0xexp(Du)du cannot be written as D−1(exp(Dx)−I). The book's argument replaces D−1 by (D−Π)−1, which needs both the nonsingularity of D−Π (Lemma 3.1.3, which rests on the irreducibility of D, Lemma 3.1.1) and the identity π(D−Π)−1=−π. A formal proof also has to relate the countable-state process (N(x),J(x)) to finite matrix exponentials, which the next section fixes by construction.
Formalization scope
Phases form an arbitrary finite type; row vectors act on the left, column vectors on the right; all quantities are real. The matrix exponential is Mathlib's NormedSpace.exp. The standing assumptions of the chapter (Tii<0, Tij≥0, t≥0, τ≥0, τ1=1, T nonsingular, irreducibility) are hypotheses of every theorem. The counting probabilities are encoded through the generator of (N(x),J(x)) restricted to the levels 0,…,k. Since the number of renewals never decreases, the restriction is the generator of the process killed on leaving level k, and P(k,x) is an entry block of its matrix exponential. Where the book inverts a matrix it proves nonsingular, nonsingularity is part of the conclusion. The renewal function is a series, and its convergence is asserted rather than assumed.
The renewal function is defined as an expected number of renewals, not as 1+∫0xτexp(Du)tdu. That definition would make the renewal density true by construction and reduce the goal to matrix calculus.
Infrastructure that a complete development needs, and that is reusable: the matrix exponential of block upper-triangular matrices, termwise differentiation of matrix power series, uniformization of a finite generator, and the deviation matrix of an irreducible finite generator. Contributions of any of these as separate lemmas are welcome.
Selected references
G. Latouche and V. Ramaswami, Introduction to Matrix Analytic Methods in Stochastic Modeling, ASA-SIAM Series on Statistics and Applied Probability, SIAM, 1999, Chapter 3. https://doi.org/10.1137/1.9780898719734
M. F. Neuts, A versatile Markovian point process, Journal of Applied Probability 16(4), 764–779, 1979. https://doi.org/10.2307/3213143
D. M. Lucantoni, New results on the single server queue with a batch Markovian arrival process, Stochastic Models 7(1), 1–46, 1991. https://doi.org/10.1080/15326349108807174
Introduction to Matrix Analytic Methods in Stochastic Modeling I: PH Distributions and the Absorption CriterionTextbook
Motivation
Phase-type (PH) distributions are the distributions of absorption times of finite Markov chains. Introduced by Neuts in the 1970s (the book follows his framework, Latouche–Ramaswami, §2.3), they are the standard way to put non-exponential service times, interarrival times and lifetimes into a model while keeping it Markovian: a PH random variable is a walk through finitely many exponential (or geometric) "phases", so a queue or reliability model with PH ingredients is again a Markov chain, now on a state space of levels times phases. Every quasi-birth-and-death process in the matrix analytic literature has PH or Markovian-arrival inputs, and the matrices T, −T−1 and exp(Tx) studied here reappear in every later chapter of Latouche and Ramaswami's book (SIAM 1999).
This mission formalizes Chapter 2 of that book: the definition of continuous and discrete PH distributions, the formulas for their distribution functions, the criterion for absorption in finite time, and the closure of the discrete family under sums, mixtures and minima.
Setting
Fix a finite set of phases and adjoin an absorbing state 0. A PH representation is a pair (τ,T) of a row vector τ and a square matrix T indexed by the phases, with
Tii<0,Tij≥0(i=j),t:=−T1≥0,τ≥0,τ0:=1−τ1≥0,
where 1 is the all-ones column vector. The Markov process J on {0}∪{phases} with initial distribution (τ0,τ) and generator
Q=[0t0T]
has transition function P(x)=exp(Qx), Pab(x)=P[J(x)=b∣J(0)=a]. The time X until absorption into 0 has the PH distribution PH(τ,T), with distribution function F(x)=P[J(x)=0]=∑a(τ0,τ)aPa0(x). Absorption with probability 1 from phase i means Pi0(x)→1 as x→∞; the distribution is nondefective if F(x)→1. The expected total time in phase j starting from phase i is Eij=∫0∞Pij(x)dx∈[0,∞].
The discrete analogue PHd(τ,T) uses a substochastic T≥0 with t:=1−T1≥0, the transition matrix P=[1t0T], and the absorption time X with P[X≤k]=∑a(τ0,τ)a(Pk)a0.
Formalization targets
Goal: the absorption criterion (Theorem 2.4.3)
For every PH representation (τ,T),
(∀i:x→∞limPi0(x)=1)⟺T is nonsingular,
and if T is nonsingular then every expected sojourn time is finite and
Eij=(−T−1)ijfor all phases i,j.
Milestones
Theorem 2.4.1.F(x)=1−τexp(Tx)1 for x≥0, and F′(x)=τexp(Tx)t for x>0.
Theorem 2.4.2. Every nondefective PH distribution has a representation from every phase of which absorption occurs with probability 1.
Eq. (2.11). For a nonsingular PH rate matrix T, ∫0∞exp(Tx)dx=−T−1.
Theorem 2.5.3. For PHd(τ,T): P[X=0]=τ0, P[X=k]=τTk−1t for k≥1, P[X≤k]=1−τTk1.
Theorem 2.6.1. The sum of independent PHd(τ,T) and PHd(β,S) variables is PHd([τ,τ0β],[T0t⋅βS]).
Theorem 2.6.2. The mixture θF+(1−θ)G of two discrete PH distribution functions is PHd([θτ,(1−θ)β],diag(T,S)).
Theorem 2.6.4. The minimum of independent PHd(τ,T) and PHd(β,S) variables is PHd(τ⊗β,T⊗S).
Theorem 2.6.5. Every probability distribution on N with finite support is discrete PH.
Significance
The result itself. Theorem 2.4.3 converts a probabilistic property of the absorbing process (absorption in finite time from every phase) into an algebraic one (nonsingularity of T), and gives the matrix −T−1 its meaning as the matrix of expected sojourn times. Every formula after it in the book assumes it: the Laplace–Stieltjes transform τ0+τ(sI−T)−1t, the moments k!τ(−T−1)k1, the mean drift of PH renewal processes in Chapter 3, and the rate and first-passage matrices of the QBD chapters, which are built from PH-structured blocks. The closure theorems are the reason PH distributions are a modelling class at all: sums, mixtures and minima of PH variables stay inside the class, and finitely supported distributions are in it, so it is dense in the distributions on N.
Formalizing it. All results are classical and proved in the book; none is formalized. Mathlib has the matrix exponential, Kronecker and block matrices, but no phase-type distributions, no generator-to-transition-function interface for absorbing chains, and no expected sojourn times. This mission builds that layer and states the chapter's results on it. It is the substrate for the remaining fourteen missions of the series.
Difficulty
The equivalence in Theorem 2.4.3 connects an asymptotic property of exp(Qx) with the determinant of its transient block. Neither direction is a finite computation: the forward direction must extract finiteness of all sojourn times from the hypothesis that absorption happens almost surely and then identify the sojourn-time matrix as an inverse of T; the reverse direction must show that a nonsingular T with the sign pattern (2.4) forces exp(Tx)→0 and the integrability of exp(Tx) on (0,∞), a statement about all x that no finite expansion of the exponential series settles. A purely algebraic shortcut through eigenvalues ("T is stable") needs the spectral facts about semistable matrices that the book only sketches in Remark 2.4.5. Theorem 2.4.1 already requires the block form of exp(Qx) for the lower block-triangular Q, and the closure theorems require tracking powers of block and Kronecker-structured transition matrices.
Formalization scope
Phases form an arbitrary finite type ι; the absorbing state is none in Option ι. Vectors are functions ι → ℝ, row vectors act on the left. On a finite state space the law of the continuous-time process is its transition function, defined as Mathlib's NormedSpace.exp (x • Q); the discrete chain's k-step probabilities are the matrix power Pk. The distribution functions F and P[X≤k] are defined from these transition probabilities, not by the closed formulas of Theorems 2.4.1 and 2.5.3, so those theorems carry content. Absorption with probability 1 is the limit Pi0(x)→1; the expected sojourn time is a lower Lebesgue integral in [0,∞], so an infinite expected time is never replaced by a junk real 0, and the goal asserts finiteness explicitly. Nonsingularity is IsUnit T.det; it is a hypothesis only where the book assumes it (the "moreover" part of Theorem 2.4.3 and Eq. (2.11)) and a conclusion in the equivalence. The closure theorems are stated through the laws: a convolution of probability mass functions for independent sums, a product of survival functions for independent minima, a convex combination of distribution functions for mixtures; each also asserts that the constructed pair is a valid discrete PH representation. The trivializing formalization, defining F by 1−τexp(Tx)1 or defining absorption by nonsingularity of T, is ruled out by these definitions.
Beyond the paper. No variant items are posed. Theorem 2.6.3 (the PH representation of ∑kpkF∗k) is not in this mission; a planning finding records that its printed representation fails when F has an atom at 0.
Needed infrastructure: the block structure of exp(Qx) and of Pk; nonnegativity and row sums of exp(Qx) for a generator; limits and integrals of matrix exponentials; block-matrix and Kronecker power identities. Most of it is reusable for the PH renewal processes and QBDs of the later missions. Contributions of general lemmas about matrix exponentials of Metzler matrices are welcome.
Selected references
G. Latouche and V. Ramaswami, Introduction to Matrix Analytic Methods in Stochastic Modeling, ASA-SIAM Series on Statistics and Applied Probability, SIAM, 1999. https://doi.org/10.1137/1.9780898719734
A Theory of Statistical Inference for Ensuring the Robustness of Scientific Results: Closed-Form Tethered Hacking Interval for the Least Squares Average Treatment EffectResearch Paper
Why this question arises
Scientific conclusions based on a fitted model can move when an analyst changes the model while keeping its fit to the observed data nearly as good. Coker, Rudin, and King call the resulting range of conclusions a tethered hacking interval. The range measures the sensitivity of a reported statistic to the choice among models under a fixed loss tolerance. Their 2021 paper develops this idea for several inference tasks, including treatment effects in least-squares regression. In that setting, a reader can ask how far the estimated treatment coefficient could move among all models whose residual sum of squares stays below a chosen threshold.
The motivation is concrete: two analysts can use the same observations and the same linear model class, yet choose different coefficient vectors that fit acceptably. A single least-squares coefficient reports the best-fitting vector, but it does not show the range admitted by a specified relaxation of the fit criterion. The interval makes that range explicit. Its endpoints depend on the data and the tolerance rather than on a distributional approximation for an estimator.
Data and model
There are n observations and p confounder covariates. The confounder designX∈Rn×p has row xiT, the outcome vector is Y=(yi)i=1n, and wi∈{0,1} indicates whether observation i received treatment. The full design is X~=[X,w]. A coefficient pair (β,β0)∈Rp×R predicts xiTβ+β0wi. Its quadratic loss is
L(β,β0)=i=1∑n(yi−xiTβ−β0wi)2.
For a fixed tolerance θ, problems (14) and (15) maximize and minimize β0 over all coefficient pairs with L(β,β0)≤θ. The two extrema are the endpoints of the tethered hacking interval for the treatment coefficient. The paper gives β0 an average causal treatment-effect interpretation under overlap, SUTVA, and conditional ignorability. Those assumptions concern the interpretation of the coefficient; the algebraic optimization result itself uses only the finite data and the quadratic loss.
Several least-squares quantities describe the endpoints. Write βLS∗=(XTX)−1XTY for regression on confounders alone, γLS∗=(XTX)−1XTw for regression of the treatment indicator on confounders, and β~LS∗=(X~TX~)−1X~TY for regression on the full design. Let β~0,LS∗ be its treatment coordinate and Vtt the corresponding diagonal entry of (X~TX~)−1. In this mission, SSE=∥Y−X~β~LS∗∥2, the minimum loss for the constrained problems.
Formalization targets
The goal is the complete solution-set statement of Theorem 1, p. 11. When the full design has linearly independent columns and θ≥SSE, the unique maximizer and minimizer are, respectively,
The intermediate targets are both halves of Theorem 4, pp. 13–14, which gives the maximizer and minimizer of any nonzero linear prediction x(new)Tβ on a least-squares loss sublevel set, followed by the separate maximization and minimization formulas (16) and (17) of Theorem 1. Theorem 4 uses Υ=(XTX)−1x(new) and μ~=θ−SSE/∥XΥ∥; the two solutions are βLS∗±μ~Υ. Here X denotes the entire design of the general regression, so its SSE is the residual loss of that design.
What the result supplies
The theorem gives both endpoint values and the full coefficient vectors that attain them. It shows how the tolerance θ controls the distance of an endpoint from the full least-squares estimate: the half-width is Vttθ−SSE. That quantity allows the interval to be compared with a conventional confidence interval after a choice of θ, as the paper does in Theorem 2. The closed form also avoids treating the two constrained optimization problems as unrelated numerical searches.
The paper proves the result in its online appendix, which is absent from the PDF held for this mission. The Lean statements here are draft targets with sorry; no machine-checked proof of them is claimed. A complete formalization would add a reusable finite least-squares design, an exact characterization of linear objectives on its quadratic sublevel sets, and the treatment-column specialization. Theorem 2's calibration, Theorem 3's distributional analysis, and the support-vector-machine result are outside this mission's target.
Where the proof is difficult
The optimizer must be shown to exist, to be the stated vector, and to be the only solution, including when θ=SSE and the feasible set contracts to one point. A bound on the optimal objective value alone does not identify the remaining coefficients. Specializing the general regression formula to the treatment column also requires the coefficient block of the full least-squares solution to agree with the confounder-only expressions in (16) and (17). Keeping track of that block and the treatment coordinate is the main algebraic complication. The paper's printed definition of SSE in Theorem 1 uses the regression on X alone; that value cannot measure the slack in the full-design constraint and gives incorrect endpoints.
Formalization scope
Vectors are finite functions into R, designs are Mathlib matrices, and the norm in Theorem 4 is the square root of a finite sum of squares. The treatment indicator is Boolean and is converted to 0 or 1; no intercept is inserted unless it is a column of X. The treatment coordinate is the distinguished last column of X~. The goal describes each entire set of feasible maximizers or minimizers as a singleton, including its confounder coefficients.
The statements explicitly require invertibility of the relevant Gram matrix and θ≥SSE. Theorem 4 also requires a nonzero prediction vector. These conditions make the inverse, square root, and quotient formulas meaningful and keep the characterization nonvacuous. The corrected full-design SSE in Theorem 1 is a deliberate change to the printed formula: with X=(1,1)T, treatment indicator (1,0)T, Y=(1,0)T and θ=1, the true maximum of β0 in (14) is 1+2, which the full-design SSE (0) reproduces, while the printed regression-on-X SSE (1/2) gives 2. The regression on X~ is an instance of the same generic least-squares design used for Theorem 4, so β~LS∗ and SSE are that design's least-squares coefficients and residual sum of squares. Theorem 4 prints both signs without saying which solves which problem; the formalization assigns β+∗ to the maximization, which is the correct pairing since x(new)TΥ>0.
A statement asserting only that β0,max∗ is the optimal value of (14), for instance as the greatest element of the set of feasible treatment coefficients, would not be this mission's goal: the goal states that the solution set of each problem is exactly the given coefficient pair, so it carries the confounder vectors βmax∗,βmin∗, existence and uniqueness. Contributions to the finite least-squares infrastructure and to either optimizer characterization support the mission.
Selected references
B. Coker, C. Rudin, and G. King, A Theory of Statistical Inference for Ensuring the Robustness of Scientific Results, Management Science, Articles in Advance, 2021. DOI: 10.1287/mnsc.2020.3818.
Controlling Epidemic Spread: Reducing Economic Losses with Targeted Closures: The Effective Reproduction Rate Is Below One if and only if a Linear Matrix Inequality in the Activity Levels HoldsResearch Paper
Why targeted closures matter
A city can reduce contacts by limiting activity in selected neighborhoods. Such a policy affects more than the residents of the closed neighborhood: people travel across neighborhood boundaries, meet there, and carry infection back to their home neighborhoods. A citywide closure ignores these differences in movement and economic cost. Birge, Candogan, and Feng model these links and ask how to curb infection while preserving activity where it is most valuable. Their 2020 working paper gives separate optimization formulations for a large infection regime and a small infection regime; this mission concerns the latter. The paper later uses movement and economic data for New York City, while the theorem here is independent of those data. Birge, Candogan, and Feng, BFI Working Paper 2020-57.
The spatial epidemic model
There are n neighborhoods. Neighborhood i has population Ni>0, and its residents spend a fraction τij≥0 of their time in neighborhood j. The row sum ∑jτij is at most one; remaining time is spent in isolation. An activity levelxj∈[0,1] controls contact at destination j. This makes the number of infectious contacts depend on where residents of every neighborhood meet, not only where they live.
Each neighborhood has susceptible, exposed, clinically infected, subclinically infected, and recovered populations. The effective contact rate is β, the progression rate from exposed to infected is κ, the clinical fraction is ρ, the relative infectiousness of subclinical cases is α, the removal rate is γ, and the natural birth and death rate is μ. The model uses β,κ,γ,μ>0 and 0≤ρ,α≤1. At the disease-free equilibrium, the exposed and infected populations vanish and the susceptible population in neighborhood i equals Ni.
The paper separates the infected-coordinate dynamics into a vector F of new infections and a vector V of other transfers. In the coordinate order exposed, clinical, subclinical, their Jacobians at the disease-free equilibrium are F(x) and V, each a 3n×3n real matrix. Define λ1(A) as the greatest modulus of a complex eigenvalue of A. The effective reproduction rate in condition (6) is Re=λ1(F(x)V−1). This is a property of the full infected-coordinate system. Model and condition (6), pp. 7–13.
Formalization targets
The intermediate targets identify the displayed inverse of V, the smaller matrix sharing the nonzero eigenvalues of F(x)V−1, and its diagonal similarity to a symmetric matrix. They connect condition (6) with a bound on the spectral radius of the reduced matrix. Each target is taken from the proof of Lemma 2.1 in the working paper.
The goal is the paper's Lemma 2.1. Let T=(τij), X=diag(xi), N=diag(Ni), and Λ=diag((∑lNlτlk)−1). With A≺B meaning that B−A is positive definite, the target is
Re<1⟺TXΛTT≺N−1(ρ+α(1−ρ))βκ(μ+κ)(μ+γ).
The strict inequality is the stability condition stated in the paper. The semidefinite program labelled (P2) uses a non-strict inequality to close its feasible region; that optimization problem is outside this mission. Lemma 2.1 and (P2), pp. 13–14.
What the result provides
The left side of Lemma 2.1 is a spectral test on a 3n×3n next generation matrix. The right side is a linear matrix inequality in the activity variables because X is diagonal and depends linearly on x. It therefore supplies the mathematical constraint used by the paper's small infection optimization problem. The theorem states equivalence for the paper's spatial epidemic model; it does not assert that the optimization problem has a solution or that a chosen activity vector minimizes economic loss. Birge, Candogan, and Feng, pp. 13–14.
The working paper proves the lemma in ordinary mathematics. The formalization task is to give its matrices and hypotheses precise Lean definitions, then prove the spectral and positive definiteness statements. The definition of the reproduction rate and the intermediate matrix identities can also support later formal statements about related compartmental models. No machine-checked proof of these draft items is claimed here.
Where the difficulty lies
The matrix F(x)V−1 is generally nonsymmetric and has three blocks of infected coordinates. A direct comparison between its entries and a symmetric positive definite matrix does not express the theorem. The paper first relates its nonzero eigenvalues to those of an n×n matrix, then uses a diagonal similarity to obtain a symmetric matrix. The final equivalence relies on the activity and mobility bounds that make this symmetric matrix positive semidefinite. A matrix statement that starts directly from the reduced symmetric form would omit the spectral reduction at the heart of the lemma.
Formalization scope
Lean uses Fin n for neighborhoods and Fin 3 × Fin n for infected coordinates, in exposed, clinical, subclinical order. All model matrices are real; λ1 takes the spectral radius after mapping a matrix to complex entries, so complex eigenvalues are included. The inverse in Re is Mathlib's matrix inverse, and A≺B is represented by positive definiteness of B−A. The only numerical instance in the sanity file has one neighborhood, but the theorem quantifies over arbitrary finite n.
The standing assumptions include positive populations and rates, nonnegative travel fractions with row sums at most one, clinical and subclinical fractions in [0,1], and activity levels in [0,1]. The formalization also requires ρ+α(1−ρ)>0: the paper divides by this quantity without stating the exclusion of ρ=α=0. If no one visits destination k, its mixing denominator is zero. Under the standing assumptions that entire column of T vanishes, so Lean's value 1/0=0 has no effect on the theorem. These conventions are part of the model, not optional proof shortcuts.
The proposal includes the full F(x) and V, their displayed inverse, the paper's reduced matrix, the diagonal similarity, and the Loewner form. Contributions may develop spectral identities for block matrices, diagonal similarity, and positive definite matrix bounds. The large infection linear program, the stability theorem cited from earlier epidemic literature, and the New York City numerical application are beyond this target.
Selected references
John R. Birge, Ozan Candogan, and Yiding Feng, Controlling Epidemic Spread: Reducing Economic Losses with Targeted Closures, Becker Friedman Institute Working Paper No. 2020-57, May 18, 2020 (preliminary), especially §2.1, §2.3, and Lemma 2.1. Working paper PDF.
John R. Birge, Ozan Candogan, and Yiding Feng, Controlling Epidemic Spread: Reducing Economic Losses with Targeted Closures, Management Science 68(5), 2022, pp. 3175–3195. DOI. This mission's statements and page numbers follow the 2020 working paper.
Market Efficient Portfolios in a Systemic Economy: f-Efficient Bank Holdings Exist, Attain Mean Squared Deviation (bᵀv)²/(1ᵀG⁻¹1), and Are Unique if and only if There Are Exactly Two BanksResearch Paper
Motivation
When banks are hit by losses they sell assets to restore their leverage targets, and these fire sales depress prices for every other holder of the same assets. The resulting deviation of market capitalization from its fundamental value is a systemic externality: it depends not on any single bank's portfolio but on how the stock of each asset is distributed across banks. Awiszus, Capponi and Weber (arXiv:2003.10121, Operations Research 2022) ask which distribution of a fixed stock of assets among banks with fixed budgets minimizes this externality, as measured by the expected squared deviation of market capitalization from fundamentals. The question matters to macroprudential regulators, who can influence portfolio overlap among banks, and it connects to the literature on overlapping portfolios and price-mediated contagion (Greenwood, Landier and Thesmar, 2015; Capponi and Larsson, 2015).
The paper's answer is explicit: the optimal mean squared deviation has a closed form, the optimum is computed by a two-step "aggregate first, then allocate" procedure, and the optimal allocation is unique exactly when there are two banks.
Setting
There are K assets and N banks. A holding matrixQ∈RK×N records in entry Qki the holding of asset k by bank i, so column i is bank i's portfolio. Initial prices are normalized to 1.
The vector q∈RK gives the total initial holdings of each asset in the banking sector, and b∈RN gives the banks' budgets. The feasible holding matrices are
D(q,b)={Q∈RK×N∣Q1N=q,1K⊤Q=b⊤}.
Price shocks Z1,…,ZK have means μ∈RK and are uncorrelated with variances σk2, σk>0 (Assumption 2). Their second-moment matrix is
G=μμ⊤+Diag(σ2).
The systemic significance vector v∈RN (the paper's (3.1)) summarizes each bank's leverage targeting, liquidation strategy and the assets' illiquidity. To first order, the deviation of market capitalization from fundamentals is (Qv)⊤Z, and its second moment is the mean squared deviation
MSD(Q)=(Qv)⊤G(Qv).
A holding matrix Q∗∈D(q,b) is f-efficient (Definition 1) if it minimizes MSD over D(q,b).
Assumption 3: vi=vj for some i,j, and b⊤v=0.
The aggregate problem (4.3) minimizes y⊤Gy over Dy={y∈RK∣1K⊤y=b⊤v}. With z=G−11K, put y∗=1K⊤zb⊤vz.
Formalization targets
Goal: Theorem 4.1
Let N,K≥2. Then
∃Q∗f-efficient withMSD(Q∗)=1K⊤G−11K(b⊤v)2,
the f-efficient holding matrix is unique if and only if N=2, and in that case it equals
QN=2=v2−v11(v2q−y∗y∗−v1q)∈RK×2.
Milestones
G is positive definite, G−1 has the Sherman–Morrison form, and 1K⊤G−11K=0 (proof of Lemma 4.1).
Lemma 4.1: y∗ is the unique solution of the aggregate problem (4.3).
Proposition 4.2: for N≥2, K≥1 there is Q∗∈D(q,b) with Q∗v=y∗.
Proposition 4.1: Q∗∈D(q,b) is f-efficient if and only if Q∗v solves (4.3).
Remark EC.1.1: Q∗ is f-efficient if and only if Fvec(Q∗)=(b,q,y∗) for the (2K+N)×KN matrix F of (EC.1.12).
The value computation MSD(Q∗)=(y∗)⊤Gy∗=(b⊤v)2/1K⊤G−11K (proof of Theorem 4.1 a).
rank(F)=2K+N−2 and null(F)=(N−2)(K−1) (proof of Theorem 4.1 b).
Significance
The result itself. Theorem 4.1 gives the smallest achievable mean squared deviation of market capitalization from fundamentals for a given asset supply, budget profile and systemic significance profile, as an explicit function of the shock moments. It is the benchmark against which the paper measures the inefficiency of observed and diversified holdings (Section 4.2 shows that full diversification is f-efficient only in a degenerate case) and drives the comparative statics of Section 5. Part b) says that with three or more banks efficiency leaves an affine family of optimal allocations of dimension (N−2)(K−1), so a regulator has residual freedom to pursue other objectives at no cost in market efficiency.
Formalizing it. The result is proved in the paper; no machine-checked version is known. The formal development delivers the theorem together with a reusable treatment of minimizing a positive definite quadratic form over a hyperplane, the existence part of the transportation-type linear system Q1N=q, 1K⊤Q=b⊤, Qv=y, and an exact rank computation for the structured matrix F. The uniqueness characterization in part b) depends on that rank computation, which the paper carries out by Gaussian elimination on block matrices.
Difficulty
The minimization over D(q,b) is a KN-dimensional quadratic program whose objective is degenerate: it depends on Q only through the K-vector Qv. Strict convexity therefore cannot give uniqueness, since the objective is constant along every direction in which Qv and the constraints do not change, and the obvious argument for part b) fails. Existence is not automatic either: D(q,b) is unbounded, and one must show that every point of the hyperplane Dy is attained as Qv by a feasible Q, which fails when v is constant. The uniqueness statement is a dimension count: it needs the exact rank of the (2K+N)×KN constraint matrix F, whose rows carry exactly two linear dependencies under Assumption 3, so that the solution set has dimension (N−2)(K−1), which is positive as soon as N≥3 and K≥2.
Formalization scope
Assets are Fin K, banks are Fin N, all quantities are real; holding matrices are Matrix (Fin K) (Fin N) ℝ. The paper's banks 1 and 2 are the indices 0 and 1.
G−1 is Mathlib's Matrix.inv, which returns 0 on singular matrices. Every statement that mentions G−1, z or y∗ assumes σk>0 for all k (Assumption 2), and every statement that divides by 1K⊤z assumes K≥1.
The systemic significance v is a free parameter in RN subject to Assumption 3, not derived from the primitives by (3.1). Every result of Section 4 holds for each such v, and v does not depend on Q.
Added hypothesis: ∑kqk=∑ibi appears on the statements that need D(q,b)=∅ (Proposition 4.2 and Theorem 4.1). The paper derives it from feasibility on p. 11; without it part a) is false.
Statements that use only the first half of Assumption 3 (v not constant) assume only that half. The goal carries Assumption 3 in full.
f-efficiency is an argmin. It is the minimization over D(q,b) of Definition 1, and MSD is the quadratic form (Qv)⊤G(Qv). Defining f-efficiency as Qv=y∗, or defining MSD through y∗, would remove the optimization from the goal and is ruled out.
vec(Q) is indexed by pairs (asset, bank) instead of stacked columns, and null(F) is the Module.finrank of the kernel of x↦Fx.
QN=2 is defined for v∈R2; the goal transports it along N=2 with Fin.cast.
The development needs the Sherman–Morrison identity for a diagonal-plus-rank-one matrix, the minimizer of a positive definite quadratic form under one linear constraint, explicit constructions in D(q,b), and a rank computation. Contributions of reusable lemmas for these, and of proofs of the milestones in any order, are welcome.
Selected references
K. Awiszus, A. Capponi, S. Weber, Market Efficient Portfolios in a Systemic Economy, Operations Research 70(2), 2022. Preprint arXiv:2003.10121v3. https://arxiv.org/abs/2003.10121
A. Capponi, M. Larsson, Price Contagion through Balance Sheet Linkages, Review of Asset Pricing Studies 5(2), 2015. https://doi.org/10.1093/rapstu/rav006
D. S. Bernstein, Matrix Mathematics, Princeton University Press, 2005.