The mathematical foundations of computation: which problems can be solved, by what algorithms, and at what cost in time, space, or communication. Distinguished by its emphasis on rigor and unconditional lower bounds, it spans computational complexity, algorithm design, automata and computability, cryptography, and the analysis of Boolean functions.
Approximation Algorithms for Combinatorial Problems V: The Overlap-Ratio Greedy C2 Is Within 1 + ln k of the Least-Overlap Cover on EC(k)Research Paper
Motivation
David S. Johnson's 1974 paper Approximation Algorithms for Combinatorial Problems (J. Comput. System Sci. 9 (1974) 256–278) was one of the first systematic worst-case analyses of polynomial-time heuristics for NP-complete optimization problems. Its Section 5 proves the harmonic bound ∑j=1k1/j for the greedy algorithm on minimum-cardinality set cover, a result that still underlies the standard lnn approximation guarantee.
Section 6, the subject of this mission, asks what happens when the cost of a cover is its total size rather than its number of sets. This problem, SET COVERING II (EC), is the optimization version of the EXACT COVER recognition problem of Karp's list (Karp 1972): a family has a disjoint subcover exactly when the optimum equals the number of covered points. Johnson shows that the change of measure breaks the cardinality greedy but that a greedy rule based on an overlap ratio recovers essentially the same guarantee. The same accounting (paying for each newly covered point) later became the standard analysis of greedy weighted set cover (Chvátal 1979).
Setting
An input is a finite family F={S1,…,Sp} of finite sets. Its covered set is T=⋃S∈FS. A subcover is a subfamily F′⊆F with ⋃S∈F′S=T, and its measure is
mEC(F′)=S∈F′∑∣S∣.
The optimumF∗ is the least measure of a subcover; since every subcover has measure at least ∣T∣, an optimal subcover is one with the least possible overlapping. The subproblem EC(k) admits only families in which every set has at most k points.
Algorithm C2 keeps a subfamily SUB (initially empty), the unused sets LEFT (initially F) and the uncovered points UNCOV (initially T). While UNCOV is nonempty it chooses S′∈ LEFT minimizing
Ratio(S)=∣S∩UNCOV∣∣S−UNCOV∣,
the number of already-covered points of S per newly covered point, and moves S′ from LEFT to SUB, removing its points from UNCOV. When several sets tie, any of them may be chosen; a subcover is choosable by C2 if some sequence of admissible choices returns it.
The overlap of a chosen set is ∣S′−UNCOV∣ at the moment it is chosen, and the cumulative overlapOV(F1) of a run returning F1 is the sum of these overlaps.
Formalization targets
Goal: Theorem 6 (p. 271)
For all k≥1 and n>0,
R[C2,EC(k)](n)≤1+ln(k)≤j=1∑kj1+21,
and for all sufficiently large n, R[C2,EC(k)](n)≥∑j=1k(1/j). In the size-free form used here, for every k≥1:
every subcover M choosable by C2 on an input of EC(k) satisfies mEC(M)≤(1+lnk)F∗;
1+lnk≤∑j=1k1/j+1/2;
some input of EC(k) with F∗>0 has a choosable subcover with mEC(M)≥(∑j=1k1/j)F∗.
Milestones (proof of Theorem 6, pp. 271–272)
the measure of the output is ∣T∣+OV(F1);
if C2 may choose a set with Ratio(S′)≥y, then (y+1)∣UNCOV∣≤F∗;
with a=F∗/∣T∣ and x=∣T−UNCOV∣/∣T∣, the next chosen set has Ratio(S′)≤a/(1−x)−1;
on EC(k), OV(F1)≤∣T∣(a[ln(k)+1]−1);
the analytic inequality 1+ln(k)≤∑j=1k1/j+1/2;
the lower-bound input (Fig. 1 of the paper with every set of F1 filled out to exactly k points) on which C2 may pay ∑j=1k1/j times the optimum.
Significance
The result. The measure ∑∣S∣ penalizes overlap, and the paper notes (without proof, p. 270) that an algorithm returning an optimal cover for the cardinality measure can be a factor k from optimal for this one. Theorem 6 shows that the ratio rule C2 is within 1+lnk of the least-overlap cover, and the lower bound shows that no analysis of C2 can beat ∑j=1k1/j. The two bounds differ by less than 1/2 for every k. The theorem was an early instance of a logarithmic guarantee for a weighted covering problem, where each set's cost is its size.
Formalizing it. The theorem has been proved since 1974; no machine-checked proof is known to exist. The mission produces a formal model of the EC problem and of C2 as a nondeterministic process, the overlap identity, and the discrete form of the paper's area-under-a-curve estimate. The last is the part the paper argues informally, through a step function and an integral.
Difficulty
The cardinality argument for C1 counts the sets chosen; here the sets have different sizes, so it does not apply. The overlap C2 pays per newly covered point is not bounded by a constant: early choices can be free and late ones cost up to k−1 per point, and the bound on the cumulative overlap must hold against the whole run, for every sequence of tie-breaks.
In a formal proof the integral must be replaced by a sum. Covered points arrive in blocks (one block per chosen set), the charge is constant on a block but the bound depends on the covered fraction at the start of the block, and the sum has to be compared with a logarithm. The terms alna and a/k that the paper drops using 1≤a≤k must be controlled as well, and the relation 1≤a≤k must itself be proved from optimality. The lower bound needs an explicit run of C2 through ties on an input with k⋅k! points, checking at every stage that the intended set is a ratio minimizer.
Formalization scope
Inputs. A family is p : ℕ with S : Fin p → Finset α (0-based, repetitions allowed; a repeated set counts twice in the measure if both copies are chosen, which C2 never does). Subcovers and SUB, LEFT are index sets. F∗ is a minimum over the finite, nonempty set of subcovers (Finset.inf'), never a junk value.
Algorithm. C2 is a step relation on states (SUB, LEFT, UNCOV). The choice at Step 3 is existential over all minimizers, so every result quantifies over every choosable output (the paper's WORST). Ratio(S) is +∞ when S∩UNCOV=∅; the formal rule requires the chosen set to meet UNCOV and compares ratios by cross-multiplication, with no division.
Overlap. The cumulative overlap depends on the run, not on the output alone, so it is carried by an inductive run relation RunOV.
No problem size. The paper's R[A,P](n) maximizes over inputs of size at most n in an unspecified encoding. Upper bounds are stated for every input and every choosable output; the lower bound exhibits one input and one choosable output. Given monotonicity of R in n, these are equivalent to the paper's claims. Ratios are stated multiplicatively, so F∗=0 does not create a vacuous bound.
Numbers. Measures are natural numbers cast to R; ln is Real.log; ∑j=1k1/j is Mathlib's harmonic k.
Ruled out. A deterministic tie-break would prove a weaker upper bound and could not realize the lower-bound run, and a ratio with x/0=0 would make disjoint-from-UNCOV sets the most attractive choice. The formalization uses neither.
The overlap identity and the discrete integral comparison are reusable for any greedy covering analysis that charges cost per newly covered point. Contributions welcome include proofs of the milestones, the invariants of the C2 run relation (SUB and LEFT partition the indices; UNCOV =T−⋃ SUB), and the explicit lower-bound run.
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).
Fast Algorithms for Finding Nearest Common Ancestors II: Nearest Common Ancestors in a Complete Binary Tree by Symmetric-Order ArithmeticResearch Paper
Motivation
The nearest common ancestor (nca) problem asks, for a fixed rooted tree and a sequence of vertex pairs (v,w), for the deepest vertex that is an ancestor of both. It is a basic step in suffix-tree string algorithms and is equivalent to range-minimum queries (Bender, Farach-Colton, 2000). Harel and Tarjan, Fast Algorithms for Finding Nearest Common Ancestors, SIAM J. Comput. 13 (1984) 338–355, gave the first algorithm answering each query on a static tree in constant time on a random-access machine after linear preprocessing.
Their construction reduces the general problem to the case of a complete binary tree, where §3 of the paper shows that nca queries can be answered "by direct calculation" on vertex numbers: multiplication, division, powers of two, the base-two logarithm and bitwise exclusive or. The later simplification of Schieber and Vishkin (1988) is built on the same in-order numbering of a complete binary tree. This mission formalizes that arithmetic core.
Timeline, as reviewed in the paper's §1 (pp. 338–340):
1976: Aho, Hopcroft and Ullman (SIAM J. Comput. 5) give an O(n+mα(m+n,n))-time off-line algorithm on a pointer machine, and for static trees a random-access algorithm with O(nloglogn) preprocessing and O(loglogn) time per query.
1976: van Leeuwen (unpublished report) gives an O(n+mloglogn)-time algorithm for linking roots and static trees that runs on a pointer machine in O(n) space.
1980: Harel (Proc. 21st FOCS) gives a preliminary version of the paper's results.
1984: Harel and Tarjan prove that pointer machines need Ω(loglogn) time per query on static trees (Theorem 1), and give the O(n)-preprocessing, O(1)-query random-access algorithm whose base case is the subject of this mission.
Setting
Fix d≥0 and let T be the complete binary tree of depth d. A vertex is identified with the path from the root to it, a word of at most d left or right turns; the root is the empty word and T has n=2d+1−1 vertices. Following the paper's Appendix (pp. 354–355):
w is an ancestor of v (v a descendant of w) if the word w is a prefix of the word v; every vertex is its own ancestor. v and w are unrelated if neither is an ancestor of the other.
The depth of v is its distance to the root; its heighth(v) is the length of the longest path from a leaf to v, which in T is d−depth(v).
nca(v,w) is the vertex of greatest depth that is an ancestor of both: the longest common prefix.
The vertices of T are numbered from 1 to n in symmetric order (in-order): at every vertex, first the left subtree, then the vertex, then the right subtree. sym(v) is the number of v and sym−1(i) the vertex numbered i. For d=4 (Fig. 1 of the paper) the root is 16, its children 8 and 24, and the leaves 1,3,5,…,31. i⊕j denotes bitwise exclusive or and lg the base-two logarithm.
Two procedures of §3 use only numbers, heights and d:
the nca depth algorithm: return d−h(v) if sym(w)∈[sym(v)−2h(v)+1,sym(v)+2h(v)−1]; else d−h(w) if the same holds with v,w exchanged; else d−⌊lg(sym(v)⊕sym(w))⌋;
the depth algorithm: given v and a depth d2≤depth(v), with h=d−d2, return sym−1(2h+1⌊sym(v)/2h+1⌋+2h).
Formalization targets
Goal: the nca algorithm is correct
The algorithm to compute nca(v,w) (p. 342) runs the nca depth algorithm to obtain d0 and then the depth algorithm on (v,d0). The goal states that it returns the nearest common ancestor: for all vertices v,w of T, with d0 the output of the nca depth algorithm and h=d−d0,
sym(nca(v,w))=2h+1⌊2h+1sym(v)⌋+2h.
Milestones
In the order the paper uses them:
Numbers at height h (p. 341): the vertices of height h are numbered 2h,3⋅2h,5⋅2h,… from left to right.
Lemma 1: h(v) is the largest h with 2h∣sym(v).
Lemma 2: the descendants of v are the vertices numbered in [sym(v)−2h(v)+1,sym(v)+2h(v)−1].
Lemma 3: for a height h≥h(v), the height-h ancestor of v has number 2h+1⌊sym(v)/2h+1⌋+2h.
Lemma 4: for unrelated v,w,
h(nca(v,w))=⌊lg(sym(v)⊕sym(w))⌋.
The nca depth algorithm returns depth(nca(v,w)).
The depth algorithm returns the number of the depth-d2 ancestor of v.
Two supporting statements pin the definitions to the paper: sym is a bijection onto {1,…,2d+1−1}, and the longest common prefix is the deepest common ancestor.
Significance
The constant-time nca computation on complete binary trees is the base case of the whole paper: §§4–5 embed an arbitrary tree into a moderately sized complete binary tree through a compressed tree and a balanced binary tree, and every query ends with the arithmetic of §3. The same idea, that in-order numbers encode ancestry in their low-order bits, underlies the Schieber–Vishkin algorithm. Lemma 1 identifies the height with the 2-adic valuation of the number, and Lemma 4 identifies the nca height with the position of the highest differing bit.
The results are proved in the paper, with the proofs left as "easy to verify". No machine-checked version of this numbering or of these four lemmas is known to exist in Mathlib or on this platform. A formal development supplies proofs of the four lemmas and the two algorithms, and a reusable library connecting in-order ranks of a complete binary tree to binary arithmetic (Nat.log, bitwise xor, 2-adic valuation).
Difficulty
The numbering is defined by a traversal order, while the lemmas speak about divisibility, floor division and exclusive or. The work lies in connecting the rank of a vertex in symmetric order to its closed form (2j+1)⋅2h(v), where j is its left-to-right position. That counting argument sums the sizes of the subtrees that precede v and is where most of the effort goes. Lemma 4 then needs the observation that two unrelated numbers agree in all bits above the height of their nca and differ in the bit at that height. This is a statement about Nat.testBit of the exclusive or, and it fails for related vertices. The algorithm statements add a case analysis whose first two cases overlap when v=w.
Formalization scope
A vertex of the tree of depth d is a List Bool of length at most d (false = left). Ancestry is the prefix relation, nca the longest common prefix, depth the length, and height d−length. None of these structural notions uses the numbering.
sym(v) is the number of vertices whose in-order sort key is lexicographically at most that of v. The key is the path with left ↦0, right ↦2, followed by 1. The numbering is not defined by the closed form or by a recursion on numbers: a definition of that kind would make the height-h numbering and Lemma 1 immediate and move the content of the mission into an uncheckable definition.
⌊lgx⌋ is Nat.log 2 x, which agrees for x≥1. ⊕ is ^^^ on N, and floor division is / on N.
Interval tests a∈[b−c+1,b+c−1] are written additively as b+1≤a+c and a+1≤b+c. The subtractions d−h(v) and d−d2 never truncate for heights and depths of vertices.
Lemma 3 states explicitly that h≤d ("h is a height") and that the ancestor exists. The depth algorithm assumes d2≤depth(v), as printed.
sym−1 is not defined as a function. The goal and the depth algorithm state that a vertex has the computed number if and only if it is the nearest common ancestor (respectively the ancestor at depth d2), which says that sym−1 of that number is that vertex.
The O(1) time bounds are not formalized, since the random-access machine model is out of scope.
Proofs of any milestone are welcome.
Selected references
D. Harel and R. E. Tarjan, Fast Algorithms for Finding Nearest Common Ancestors, SIAM J. Comput. 13(2) (1984), 338–355. https://doi.org/10.1137/0213024
A. V. Aho, J. E. Hopcroft and J. D. Ullman, On Finding Lowest Common Ancestors in Trees, SIAM J. Comput. 5(1) (1976), 115–132. https://doi.org/10.1137/0205011
B. Schieber and U. Vishkin, On Finding Lowest Common Ancestors: Simplification and Parallelization, SIAM J. Comput. 17(6) (1988), 1253–1262. https://doi.org/10.1137/0217079
Fast Algorithms for Finding Nearest Common Ancestors I: A Lower Bound for Pointer MachinesResearch Paper
Motivation
The nearest common ancestor problem asks, for a rooted tree and two of its vertices x and y, for the deepest vertex that is an ancestor of both, written nca(x,y). It appears as a subroutine in string algorithms (suffix trees), in graph algorithms (path queries, dominators) and in the analysis of set-union structures. Aho, Hopcroft and Ullman (On finding lowest common ancestors in trees, SIAM J. Comput. 5, 1976) posed it in several versions, differing in how much the tree changes while the queries are answered.
Harel and Tarjan (Fast Algorithms for Finding Nearest Common Ancestors, SIAM J. Comput. 13, 1984) study how the answer depends on the machine model. On a random-access machine, where addresses can be computed arithmetically, they preprocess a static tree in linear time and then answer each query in constant time. On a pointer machine, where memory can only be traversed by following pointers, their §2 shows that no representation of the tree allows constant-time queries: Ω(loglogn) steps are needed in the worst case. This mission formalizes that lower bound.
Timeline.
1976: Aho, Hopcroft and Ullman give an O(loglogn)-per-query random-access algorithm for static trees.
1976: van Leeuwen (Finding lowest common ancestors in less than logarithmic time, unpublished report, reference [14] of Harel–Tarjan) gives an O(n+mloglogn) algorithm for static trees that runs on a pointer machine.
1984: Harel and Tarjan prove Theorem 1, the matching Ω(loglogn) lower bound for pointer machines, and the O(1)-per-query random-access algorithm.
Setting
A pointer machine stores its data as a collection of nodes. Each node has a fixed number of fields, and a pointer field holds either a node or nil. The machine can follow a pointer from a node it holds, but it cannot compute an address. Following Harel and Tarjan (p. 340), a static tree is represented by a list structure: each tree vertex v is represented by a single node rep(v), distinct vertices by distinct nodes, and the structure may contain further nodes that represent no vertex. Each node has two pointer fields; the paper reduces any fixed number of pointers to two "without loss of generality". To answer a query on x and y, the machine is given pointers to rep(x) and rep(y) and must return a pointer to rep(nca(x,y)).
The node b is accessible from a in j steps or less if it can be reached from a by following at most j pointers. Write accj(a) for the set of such nodes. A run of t steps from input nodes a and b is a sequence n1,…,nt in which each ns is the content of a pointer field of a node among a,b,n1,…,ns−1. A query with answer c is answered in k steps if some run of at most k steps holds c.
The tree is the complete binary treeT of height h, with n=2h leaves. Its vertices are the words w∈{0,1}≤h (the root-to-vertex path, 0 = left), the ancestors of v are its prefixes, the depth of w is ∣w∣ and its height is h−∣w∣. Then nca(x,y) is the longest common prefix of x and y. Logarithms are binary: lg=log2.
Formalization targets
Goal: Theorem 1 in the explicit form of its proof
For every h, every node type, every list structure with two pointers per node and every injective representation rep of the complete binary tree with n=2h leaves: if every nca query on two leaves is answered in k steps, then
k>lglgn−2.
This is the last display of the proof (p. 341), which is what the paper's Ω(loglogn) means. The representation is arbitrary and is quantified before the query bound, so the bound holds for every representation.
Milestones: the claims of the proof
A query answered in k steps reaches only nodes in acck(rep(x))∪acck(rep(y)).
∣accj(a)∣≤2j+1−1 for every node a.
With Ax the set of vertices whose nodes are accessible from rep(x) in k steps or less: for a nonleaf w with children u,v, either w∈Ax for every leaf x below u, or w∈Ay for every leaf y below v.
A vertex of height i≥1 lies in Ax for at least 2i−1 leaves x.
x∈L∑∣Ax∣≥2nlgn,
where L is the set of leaves.
Significance
The result. Theorem 1 shows that van Leeuwen's pointer-machine algorithm for static trees is optimal up to a constant factor, and that the constant-time queries of the paper's §§3–5 depend on address arithmetic. It is an early nontrivial lower bound for pointer machines on a natural problem; the paper compares it with Tarjan's lower bound for disjoint-set union on a pointer machine (J. Comput. System Sci. 18, 1979).
Formalizing it. The theorem is proved in the paper; as far as could be determined no machine-checked version exists, and Mathlib has no pointer-machine model. The mission produces an explicit, reusable definition of pointer-machine runs and accessibility together with a complete proof of the explicit bound. A formal model of this kind is the precondition for stating any other pointer-machine lower bound.
Difficulty
The statement must hold for every representation, including structures with many auxiliary nodes and arbitrary pointers between tree nodes. Arguing about one natural representation, such as parent pointers, where a leaf is far from its ancestors, says nothing about other representations: a structure with shortcut pointers or auxiliary nodes may bring some ancestors close to some leaves, and the bound must survive every such choice. In the formal setting the counting also has to handle overlaps: nodes reachable from several leaves, nodes that represent no vertex, and pointer cycles.
Formalization scope
Model. Nodes form an arbitrary type N, not necessarily finite. ptr : N → Fin 2 → Option N gives the two pointer fields (none = nil), and rep : Vertex h → N is required to be injective. acc ptr j a is defined recursively. Run ptr a b t held is an inductive predicate for runs of t steps, AnsweredIn asks for some run of at most k steps holding the answer, and AnswersLeafQueriesIn ptr rep k requires this for every pair of leaves.
Conventions.
Two pointer fields per node, as the paper's "without loss of generality" reduction allows; the reduction itself is not formalized.
Only queries on two leaves are assumed answerable. This is weaker than all queries, so the theorem is at least as strong as the paper's.
Time is counted as pointer-following steps. Mutation of the structure during a query and non-pointer fields are not modelled: neither lets the machine hold a node it has not reached by following pointers. The clause "the algorithm remembers nothing between queries" is built into the static structure.
Vertex h is {s : List Bool // s.length ≤ h}, nca is the longest common prefix, and a separate theorem identifies it with the Appendix's deepest common ancestor. n=2h counts leaves, not vertices.
lg is Real.logb 2. For h=0 Lean's log20=0 gives the true statement k>−2; for h≥1, lglgn=log2h.
Cardinalities in the milestones are Set.encard in N∪{∞}, so finiteness is part of each claim. Divisions are cleared: h2h≤2∑x∣Ax∣.
Ruling out trivial formalizations. The hypothesis AnswersLeafQueriesIn is satisfiable: the parent-pointer representation answers every leaf query in h steps. If rep were not injective, a constant rep would answer every query in zero steps, so injectivity is kept in the goal. The milestones do not need it and do not assume it.
Infrastructure. The goal needs finite-set counting over the leaves of the complete binary tree and a double count over heights. The run and accessibility definitions are reusable for other pointer-machine arguments. Proofs of the milestones, and of the ℕ form h<2k+2 that the goal reduces to, are welcome.
Selected references
D. Harel, R. E. Tarjan, Fast Algorithms for Finding Nearest Common Ancestors, SIAM J. Comput. 13(2):338–355, 1984. https://doi.org/10.1137/0213024
A. V. Aho, J. E. Hopcroft, J. D. Ullman, On finding lowest common ancestors in trees, SIAM J. Comput. 5(1):115–132, 1976. https://doi.org/10.1137/0205011
R. E. Tarjan, A class of algorithms which require nonlinear time to maintain disjoint sets, J. Comput. System Sci. 18(2):110–127, 1979. https://doi.org/10.1016/0022-0000(79)90042-4
A New Approach to the Maximum-Flow Problem 2: The Nonsaturating-Push Bound for FIFO Push-RelabelResearch Paper
Motivation
The maximum-flow problem asks how much of a commodity can be sent from a source to a sink through a network whose edges carry capacities. It is a basic model of operations research. Transportation, scheduling, bipartite matching and image segmentation reduce to it, and it is the inner step of many combinatorial algorithms.
Goldberg and Tarjan introduced the push–relabel (preflow) method in A New Approach to the Maximum-Flow Problem (J. ACM 35(4), 1988). Ford–Fulkerson-type algorithms augment along whole source–sink paths. The push–relabel method instead moves excess flow across single edges, guided by integer distance labels on the vertices. Whatever order its local operations are applied in, it is correct and performs O(n2m) of them (§3 of the paper). Section 4 shows that one particular order, processing the active vertices first-in, first-out, cuts the dominant term, the number of nonsaturating pushes, to O(n3). The method and its FIFO and highest-label variants are the standard practical maximum-flow codes.
Timeline:
1956: Ford and Fulkerson, augmenting paths and max-flow min-cut.
1970–72: Dinic, and Edmonds and Karp, give polynomial augmenting-path bounds.
1974: Karzanov introduces preflows and obtains O(n3).
1982: Shiloach and Vishkin give a parallel O(n2logn) preflow algorithm with a first-in, first-out flavour.
1988: Goldberg and Tarjan, the generic push–relabel method, the FIFO bound of this mission, and O(nmlog(n2/m)) with dynamic trees.
Setting
A flow network has a finite vertex set V with n=∣V∣, a capacity c(v,w)≥0 on every ordered pair, a source s and a sink t=s. The edges are the pairs with c(v,w)>0, and there are no loops. A preflow is a function f on vertex pairs with f(v,w)≤c(v,w) and f(v,w)=−f(w,v). Its excesse(v)=∑uf(u,v) must be nonnegative at every v=s. The residual capacity is rf(v,w)=c(v,w)−f(v,w). A labelingd assigns each vertex a value in N∪{∞}. A vertex v∈/{s,t} is active if d(v)<∞ and e(v)>0.
The two basic operations (Fig. 1 of the paper) are:
push(v,w), applicable when v is active, rf(v,w)>0 and d(v)=d(w)+1. It sends δ=min(e(v),rf(v,w)) from v to w. The push is saturating if rf(v,w)=0 afterwards and nonsaturating otherwise.
relabel(v), applicable when v is active and d(v)≤d(w) for every residual edge (v,w). It sets d(v)←min{d(w)+1:rf(v,w)>0}.
The algorithm starts by saturating every edge leaving s, with d(s)=n and d(v)=0 for v=s.
In the first-in, first-out algorithm (§4), each vertex v scans a fixed list L(v) of its neighbours through a current edge. The push/relabel(v) operation pushes through the current edge if possible. Otherwise it advances the current edge, or, at the end of the list, returns to the first edge and relabels v. Active vertices wait in a queue Q, initially {v∈V−{s,t}:c(s,v)>0}. The discharge operation removes the front vertex v and repeats push/relabel(v) until e(v)=0 or d(v) increases. Every vertex that becomes active meanwhile is appended to Q, and v is appended too if it is still active. Passes over the queue are defined inductively. Pass 1 consists of the discharges of the initially queued vertices. Pass i+1 consists of the discharges of vertices added during pass i.
Formalization targets
Goal: Corollary 4.4 (p. 931)
For every network, every edge-list order, every initial queue order, and every run of the FIFO algorithm,
#{nonsaturating pushes}≤4n3.
The constant is the printed one.
Milestones
Lemma 4.1 (p. 929): the push/relabel operation relabels only when relabeling is applicable.
Lemma 3.5 (p. 926): from any vertex with positive excess, the source is reachable in the residual graph.
Lemma 3.7 (p. 927): at any time, d(v)≤2n−1 for every vertex.
Lemma 3.8 (p. 927): at most 2n−1 relabelings per vertex and at most (2n−1)(n−2)<2n2 in total.
Lemma 4.3 (p. 930): at most 4n2 passes over the queue.
Significance
Corollary 4.4 is the combinatorial core of Theorem 4.5, which states that the FIFO algorithm runs in O(n3) time. Theorem 4.2 shows that the remaining work of the implementation is O(nm) plus constant time per nonsaturating push. The bound of Corollary 4.4 is therefore what separates the O(n3) FIFO method from the O(n2m) bound of the generic method, which matters on dense networks. The same pass-counting argument is reused for the parallel algorithm of §6 and underlies later analyses of highest-label and wave variants.
The results are proved in the paper. Formalizing them adds an analysis of a push–relabel algorithm, which the platform does not yet have. Its existing network-flow material states max-flow min-cut and Ford–Fulkerson termination in an arc-based model with nonnegative flows (the Introduction to Linear Optimization missions). The mission builds a precise operational model of the FIFO implementation, with edge lists, current edges and a queue carrying pass numbers, and states an explicit operation count for it. A companion mission in this series treats the generic algorithm's correctness and its (2n−1)(n−2)+2nm+4n2m operation bound.
Difficulty
The obvious argument is the potential-function count of §3, over the sum of the labels of active vertices. It yields only 4n2m and does not use the queue discipline at all. The 4n3 bound has to charge nonsaturating pushes to passes over the queue, and then bound the number of passes by the total growth of the labels. Neither step is visible in the generic algorithm, because both depend on the order in which vertices are processed.
Making this rigorous requires invariants of the implementation that the paper uses silently:
a vertex is in the queue exactly when it is active, and at most once;
pass numbers are nondecreasing along the queue;
current edges only move forward between relabelings.
Lemma 4.1 in particular depends on the current-edge scan: an edge passed over earlier stays inadmissible until v is relabeled.
Formalization scope
The Lean development works in namespace GoldbergTarjan.FIFO. Vertices form a type V with [Fintype V] [DecidableEq V], and n is Fintype.card V. Capacities are c : V → V → ℝ with c ≥ 0 and c v v = 0. Flows are antisymmetric real functions on all ordered pairs, not nonnegative arc flows. Excess is computed from the flow. Labels are in ℕ∞, and the empty minimum in relabel is ⊤.
The state of the algorithm consists of the flow, the labels, the current-edge index cur v into the edge list L v, and the queue Q : List (V × ℕ), each entry tagged with its pass number. Push/relabel (Fig. 3) is a total function, and a discharge (Fig. 4) is a relation carrying the number of push/relabel operations it performs. A run consists of the states S 0, …, S K with S 0 the initial state and consecutive states related by one discharge. The printed variant of Fig. 4, which stops as soon as v is relabeled, is the one formalized. Counts are natural numbers over all push/relabel operations of all discharges. The number of passes is the largest pass tag of a discharged entry.
All constants are explicit, exactly as printed:
2n−1 (Lemmas 3.7, 3.8);
(2n−1)(n−2) and 2n2 (Lemma 3.8);
4n2 (Lemma 4.3);
4n3 (Corollary 4.4).
No asymptotic notation is used, and no m≥n−1 assumption is made.
A model without current edges, where relabeling happens whenever no push applies, would make Lemma 4.1 vacuous and change the algorithm. Pass numbers that are not propagated by the "added during pass i" rule would make the pass count arbitrary. Both are ruled out by the definitions. A sorry-free check, outside the proposal, exhibits a three-vertex network with two legal discharges, two passes and no nonsaturating push, so the run hypotheses are satisfiable.
Reusable beyond this mission are the network, preflow, push and relabel definitions and Lemma 3.5, which is about an arbitrary preflow. Contributions welcome: invariants of FIFO runs (preflow, valid labeling, queue = active set, cur within bounds), proofs of the milestones, and the reduction of Corollary 4.4 to Lemma 4.3.
Selected references
A. V. Goldberg, R. E. Tarjan, A New Approach to the Maximum-Flow Problem, Journal of the ACM 35(4):921–940, 1988. https://doi.org/10.1145/48014.61051
A. V. Karzanov, Determining the maximal flow in a network by the method of preflows, Soviet Math. Doklady 15:434–437, 1974.
J. Edmonds, R. M. Karp, Theoretical improvements in algorithmic efficiency for network flow problems, Journal of the ACM 19(2):248–264, 1972. https://doi.org/10.1145/321694.321699
A New Approach to the Maximum-Flow Problem 1: The Generic Push-Relabel Algorithm and Its Operation BoundResearch Paper
Motivation
The maximum-flow problem asks how much of a commodity can be sent from a source to a sink through a network whose edges have capacities. It is a basic model in operations research (transportation, scheduling, bipartite matching) and a standard subroutine in combinatorial optimization.
Classical algorithms, from Ford and Fulkerson (1956) through Edmonds–Karp and Dinic (1970–1972) and Karzanov (1974), increase a feasible flow along augmenting paths or blocking flows. Goldberg and Tarjan, A New Approach to the Maximum-Flow Problem (J. ACM 35(4), 1988, doi:10.1145/48014.61051), replaced this global view by a local one: the push-relabel method maintains a preflow, which may violate conservation at intermediate vertices, and moves excess along edges toward vertices with smaller distance labels. The generic method, with the basic operations applied in any order, is the starting point of the FIFO, highest-label and dynamic-tree implementations analysed later in the same paper, and push-relabel codes remain among the fastest practical maximum-flow solvers.
This mission formalizes §2–§3 of the paper: the generic algorithm is correct, and it stops after a number of basic operations bounded by an explicit polynomial in the numbers of vertices and edges, whatever order of operations is chosen.
Setting
A flow network has a finite vertex set V with n=∣V∣, a sources and a sinkt=s, and a capacityc(v,w)≥0 for every ordered pair of vertices, positive exactly on the edges E={(v,w):c(v,w)>0}; m=∣E∣, and there are no loops, c(v,v)=0.
Flows are real functions on all vertex pairs. A function f satisfies the capacity constraint if f(v,w)≤c(v,w) and antisymmetry if f(v,w)=−f(w,v) for all pairs. The excess of v is e(v)=∑uf(u,v). A flow also has e(v)=0 for v∈/{s,t}; a preflow only e(v)≥0 for v=s. The value of a flow is ∣f∣=∑vf(v,t), and a maximum flow is a flow of maximum value.
The residual capacity is rf(v,w)=c(v,w)−f(v,w); pairs with rf(v,w)>0 are the edges of the residual graphGf. A valid labeling is d:V→N∪{∞} with d(s)=n, d(t)=0 and d(v)≤d(w)+1 on every residual edge. A vertex v is active if v∈/{s,t}, d(v)<∞ and e(v)>0.
The two basic operations (Fig. 1 of the paper) are:
Push(v,w), applicable when v is active, rf(v,w)>0 and d(v)=d(w)+1: send δ=min(e(v),rf(v,w)), i.e. f(v,w)+=δ, f(w,v)−=δ. It is saturating if rf(v,w)=0 afterwards and nonsaturating otherwise.
Relabel(v), applicable when v is active and d(v)≤d(w) for every residual edge (v,w): set d(v)←min{d(w)+1:(v,w)∈Ef} (∞ if there is none).
The generic algorithm (Fig. 2) starts from the preflow that saturates every edge leaving s and is zero elsewhere, with the simple labelingd(s)=n, d(v)=0 otherwise, and applies applicable basic operations in any order while one exists. An execution with K basic operations is a sequence of states (f0,d0),…,(fK,dK) from the initial state, each obtained from the previous one by one applicable operation.
Formalization targets
Goal: Theorems 3.11 and 3.4
Assume the paper's standing assumption m≥n−1. For every execution with K basic operations,
K≤(2n−1)(n−2)+2nm+4n2m,
and if no basic operation applies in the final state, then fK is a maximum flow. The paper states the bound as O(n2m) and proves it as "immediate from Lemmas 3.8, 3.9, and 3.10"; the goal states the sum of those three printed bounds. Since every execution is this short, no order of operations runs forever.
Milestones
In the order the proof uses them: Lemma 2.1 (at an active vertex a push or a relabel applies); Lemma 3.1 (the labeling stays valid); Theorem 3.2 (Ford–Fulkerson: a flow is maximum iff t is unreachable from s in Gf); Lemma 3.3 (under a valid labeling t is unreachable from s); Lemma 3.5 (from any vertex with positive excess, s is reachable); Lemma 3.6 (labels never decrease; a relabeling increases the label); Lemma 3.7 (d(v)≤2n−1 throughout); Theorem 3.4 (termination with finite labels gives a maximum flow); Lemma 3.8 (≤2n−1 relabelings per vertex, ≤(2n−1)(n−2)<2n2 in total); Lemma 3.9 (≤2nm saturating pushes); Lemma 3.10 (≤4n2m nonsaturating pushes, under m≥n−1). A further, non-milestone item states the unnumbered invariant that every fk is a preflow.
Significance
The generic bound shows that push-relabel terminates in a polynomial number of steps without any rule for choosing the next operation; the specific orderings of §4–§5 of the paper (first-in first-out, O(n3); dynamic trees, O(nmlog(n2/m))) refine only the count of nonsaturating pushes, and reuse Lemmas 3.1–3.9 unchanged. The correctness argument, a valid labeling excludes augmenting paths, is the template for the push-relabel minimum-cost flow and assignment algorithms that followed.
These results are proved in the paper and are textbook material. Their machine-checked counterparts are, as far as is known here, not on the Prove2Me platform: the platform's network-flow statements (from Introduction to Linear Optimization, e.g. LinearOptimization.max_flow_min_cut) use a different model, with arc-indexed nonnegative flows and extended-real capacities, and contain nothing about preflows, labels or operation counts. This mission produces a formal account of the antisymmetric-flow model, of Ford–Fulkerson in that model, and of the amortized counting arguments, with the constants the paper prints.
Difficulty
The correctness half is short once the invariants are in place; the difficulty is in the counting. The label bound (Lemma 3.7) is a statement about the whole execution, and it depends on a structural fact about preflows (Lemma 3.5) whose truth rests on antisymmetry and on the nonnegativity of excesses. The obvious first idea for the push counts, bounding pushes per edge or per vertex locally, fails for nonsaturating pushes: flow pushed across a pair can be pushed back later, and nothing local limits how often this happens, so Lemma 3.10 holds only as an amortized statement over the entire execution and depends on both earlier counts. Saturating pushes on a pair can also recur, in both directions, and Lemma 3.9 has to control the interaction between the two directions.
Formally, all of this is reasoning about arbitrary interleavings of operations, with labels in N∪{∞} and real-valued flows.
Formalization scope
Vertices form a finite type with decidable equality; n is its cardinality, s=t, so n≥2 and the natural-number subtractions 2n−1 and n−2 are exact. Capacities are a real function on all pairs, nonnegative, zero on the diagonal; E is its support and m its cardinality.
Flows and preflows are antisymmetric real functions on all pairs (not nonnegative arc flows); the excess is computed from f, never stored. A maximum flow is a flow whose value is at least that of every flow.
Labels live in ℕ∞, with ∞+1=∞; the relabel value is an infimum, which is ∞ on the empty set.
An execution is a sequence of states σ : ℕ → State V with a length K, starting at the Fig. 2 state with the simple labeling (the paper's own assumption for its proofs), each step an applicable push or relabel. "Terminates" means that no basic operation applies, the loop guard of Fig. 2. The three counts are cardinalities of the sets of step indices of each kind.
Explicit constants: 2n−1 per-vertex relabelings, (2n−1)(n−2)<2n2 total relabelings, 2nm saturating pushes, 4n2m nonsaturating pushes, label bound 2n−1, and the total (2n−1)(n−2)+2nm+4n2m. The standing assumption m≥n−1 appears only on Lemma 3.10 and the goal.
A trivializing formalization is ruled out: the step relation fixes the pushed amount δ=min(e(v),rf(v,w)) and the new label exactly as in Fig. 1, termination is the loop guard rather than "the result is a flow", and a sorry-free check exhibits a concrete network s→a→t with a two-step execution (relabel a, then push (a,t)), so the run hypotheses are satisfiable.
Welcome contributions: proofs of the invariants (preflow, valid labeling, label monotonicity), of Ford–Fulkerson for antisymmetric flows (reusable beyond this mission), and of the counting lemmas. The FIFO bound of §4 is the subject of a companion mission.
Selected references
A. V. Goldberg, R. E. Tarjan, A New Approach to the Maximum-Flow Problem, Journal of the ACM 35(4):921–940, 1988. doi:10.1145/48014.61051
L. R. Ford, D. R. Fulkerson, Flows in Networks, Princeton University Press, 1962.
J. Edmonds, R. M. Karp, Theoretical improvements in algorithmic efficiency for network flow problems, Journal of the ACM 19(2):248–264, 1972. doi:10.1145/321694.321699
R. K. Ahuja, T. L. Magnanti, J. B. Orlin, Network Flows: Theory, Algorithms, and Applications, Prentice Hall, 1993.
Competitive Paging Algorithms III: No Randomized Paging Algorithm Is Better than H_k-CompetitiveResearch Paper
Motivation
Paging is the problem of managing a two-level memory: a cache holds k of the n pages a program uses, every request must find its page in the cache, and a request to a page outside the cache (a page fault) forces the algorithm to bring the page in and evict another. An on-line algorithm chooses what to evict without seeing future requests. Sleator and Tarjan (CACM 1985) measured on-line paging algorithms against the optimal off-line algorithm, which knows the whole request sequence, and showed that no deterministic on-line algorithm can be within a factor smaller than k of it.
Randomization changes that picture. Fiat, Karp, Luby, McGeoch, Sleator and Young (J. Algorithms 1991; arXiv:cs/0205038) gave a randomized algorithm, the marking algorithm, whose expected number of faults is within 2Hk of the optimum, where Hk=1+21+⋯+k1≈lnk. This mission formalizes the other half of their paper's picture: no randomized paging algorithm can do better than Hk. The bound says that the logarithmic behaviour is not an artefact of one algorithm but a property of the problem.
Timeline:
1985 — Sleator and Tarjan: deterministic paging algorithms have competitive factor at least k; LRU and FIFO achieve k.
1988 — Karlin, Manasse, Rudolph and Sleator (Algorithmica 3, 1988) introduce the term competitive; Manasse, McGeoch and Sleator (STOC 1988; J. Algorithms 1990) extend it to randomized algorithms and pose the k-server problem, of which paging is the uniform-metric case.
1991 — Fiat et al.: the marking algorithm is 2Hk-competitive, and no randomized algorithm is better than Hk-competitive (Theorem 4 and Corollary 5 of the paper). Raghavan gave an alternative proof of the lower bound through Yao's minimax principle.
1991 — McGeoch and Sleator give an Hk-competitive randomized paging algorithm (Algorithmica 6, 1991), so the lower bound is tight.
Setting
Let M be a set of nvertices with the uniform metric: any two distinct vertices are at distance 1. A configuration of k servers is a map C:{1,…,k}→M; server s sits at C(s), and a vertex is covered when some server sits on it. A request sequenceσ is a finite list of vertices. A deterministic on-line algorithm assigns to every prefix of requests the configuration after serving it, in such a way that the vertex just requested is covered; its cost on σ is the total distance travelled by its servers, which on the uniform metric is the number of server moves. Paging with k cache slots and n pages is exactly this k-server problem on n uniform vertices.
The optimal off-line costOPTC0(σ) is the least cost of any schedule of configurations that starts at C0 and covers each request of σ in turn.
A randomized on-line algorithmA is a probability space (Ω,μ) of coin outcomes together with a deterministic on-line algorithm Aω for each outcome ω. Its expected costCA(σ) is the average of the cost of Aω on σ over ω. The request sequence is fixed in advance and does not depend on the coins (an oblivious adversary). Following the paper, A is c-competitive from the initial configuration C0 if there is a constant a such that
CA(σ)≤c⋅OPTC0(σ)+afor every request sequence σ.
For the lower-bound argument, the probability vectorp=(pi)i∈M after a prefix σ has pi equal to the probability, over ω, that vertex i is not covered by Aω after serving σ. A set S of marked vertices and the number u=n−∣S∣ of unmarked vertices are bookkeeping of the adversary, updated as the marking algorithm would update them.
Formalization targets
Goal: Corollary 5
For 1≤k≤n−1, every randomized on-line algorithm A with k servers on n uniform vertices, every initial configuration C0 and every real c,
c<Hk⟹A is not c-competitive from C0.
Theorem 4 (milestone)
The case k=n−1: no randomized algorithm for the uniform (n−1)-server problem on n vertices is c-competitive with c<Hn−1.
Claims of the proof of Theorem 4 (milestones)
With p the probability vector, S the marked set, P=∑i∈Spi and u=n−∣S∣:
i∑pi=1(servers on distinct vertices),CA(σi)≥CA(σ)+pi,P=0⇒∃i∈/S,pi≥u1,P>ϵ>0⇒j∈Smaxpj≥∣S∣ϵ>0,pj=j′∈/Smaxpj′⇒pj≥u1−P,P≤ϵ⇒ϵ+pj≥ϵ+u1−P≥ϵ+u1−ϵ≥u1.
Significance
The result. Together with the marking algorithm's 2Hk upper bound, the corollary pins the randomized competitive ratio of paging to Θ(logk), an exponential improvement over the deterministic ratio k that no randomized algorithm can push below Hk. For k=n−1 the marking algorithm itself is Hn−1-competitive, so Theorem 4 makes it optimal there. The Hk bound is the benchmark every later randomized paging algorithm is measured against, including the Hk-competitive algorithm of McGeoch and Sleator, and it is the uniform-metric base case of the randomized k-server conjecture.
Formalizing it. The theorem is proved and classical; no machine-checked proof is known to exist. The platform already has the deterministic bound (KServer.uniform_not_competitive_below_k, ratio k) and a formal Yao averaging principle for randomized k-server algorithms (KServer.randomized_yao_averaging), but no randomized paging lower bound. This mission produces the first formal Hk lower bound, stated against the published randomized k-server model, and a formal version of the paper's adversary argument. Either route — the paper's adaptive construction of a nemesis sequence from the probability vector, or Raghavan's distributional argument through Yao's principle — is welcome.
Difficulty
The adversary may not look at the coins, yet it must build one fixed sequence against which the expected cost is high in every phase. Requesting an uncovered vertex is not available, since which vertex is uncovered depends on the coins; requesting the vertex with the largest uncovered probability gives only 1/n per request and loses the harmonic sum. Lifting the per-phase bound to the asymptotic statement also requires handling the additive constant a, the initial configuration of the off-line algorithm, and, for Corollary 5, the reduction from n vertices to k+1 of them for an algorithm that may still place servers on the others.
Formalization scope
The Lean development reuses the published definitions KServer_model (configurations Fin k → M, deterministic on-line algorithms as functions of the request prefix, offlineCost) and KServer_randomized (RandomizedAlgorithm: a probability measure on coin outcomes, a deterministic algorithm per outcome, measurable costs; expCost as a lower Lebesgue integral in [0,∞]; IsCompetitiveFrom C₀ c: every drawn algorithm starts at C0 and there is one constant a, fixed before the sequence, with expCost σ ≤ ENNReal.ofReal (c * offlineCost C₀ σ + a)). The clamp at 0 in ENNReal.ofReal only weakens the property the goal refutes. The vertex set is an abstract type M with an equivalence Fin n ≃ M and the uniform metric as a hypothesis, never the line metric of Fin n. Hk is Mathlib's harmonic k cast to R. The goal quantifies over every algorithm and every initial configuration, with no laziness or distinct-positions assumption, and over every real c<Hk, including c≤0.
A formalization in which competitiveness is vacuous (a model with no algorithms, or a cost that is always infinite), in which the adversary may choose the sequence after seeing the coins, or which fixes c or the additive constant, would be a different statement and is ruled out by the published definitions used here.
The probability vector is the one new definition, uncoveredProb A σ i. Milestones about it assume the uncovered events measurable, the standing convention that pi is a probability; the model itself only guarantees measurable costs. The milestone ∑ipi=1 assumes the n−1 servers occupy distinct vertices, as in the paper; in general ∑ipi≥1. The arithmetic milestones are stated for an arbitrary probability vector on a finite set. Reusable pieces: the probability vector and the cost lemma apply to any randomized k-server algorithm on a uniform metric, and a restriction lemma (from n vertices to k+1) would serve other paging lower bounds.
L. A. McGeoch, D. D. Sleator, A Strongly Competitive Randomized Paging Algorithm, Algorithmica 6:816–825, 1991.
P. Raghavan, Lecture Notes on Randomized Algorithms, IBM Research Report, Yorktown Heights, 1990 (the alternative proof of the lower bound, pp. 118–119).
Competitive Paging Algorithms II: Algorithm EATR Is 3/2-Competitive for Two ServersResearch Paper
Motivation
Paging is the problem of managing a two-level memory: a fast cache holding k pages and a slow memory holding the rest. When a requested page is not in the cache (a page fault), it must be brought in and, if the cache is full, some page must be evicted. An on-line paging algorithm decides which page to evict without knowing future requests. Sleator and Tarjan (CACM 1985) compared on-line algorithms with the optimal off-line algorithm on every request sequence and showed that the best deterministic algorithms (LRU, FIFO) lose a factor of exactly k, and that no deterministic on-line algorithm does better.
Randomization changes this picture. Fiat, Karp, Luby, McGeoch, Sleator and Young (J. Algorithms 1991; arXiv:cs/0205038) showed that the randomized marking algorithm is 2Hk-competitive, where Hk=1+21+⋯+k1, and that no randomized algorithm is better than Hk-competitive. For k<n−1 the marking algorithm does not reach Hk, already for k=2 and n=4. For two servers the same paper gives a different algorithm, EATR ("end after twice requested"), and proves it 3/2-competitive. Since H2=3/2, EATR is strongly competitive for k=2: no randomized algorithm has a smaller competitive factor. This mission formalizes that result.
Timeline:
1985: Sleator and Tarjan, deterministic paging: factor k, and k is optimal.
1988: Karlin, Manasse, Rudolph and Sleator introduce the term competitive (Algorithmica 3:79–119); Manasse, McGeoch and Sleator formulate the k-server problem and extend competitiveness to randomized algorithms (J. Algorithms 1990).
1991: Fiat et al.: the marking algorithm is 2Hk-competitive, the lower bound Hk, and EATR is 3/2-competitive for k=2.
1991: McGeoch and Sleator give an Hk-competitive algorithm for every k (Algorithmica 6, 1991; reference [12] of the paper).
Setting
The uniform 2-server problem has a finite set M of n≥2 vertices, any two distinct vertices at distance 1, and two servers. A request sequenceσ=σ(0),σ(1),… is a list of vertices; each request must be covered by a server when it is served, and the cost is the number of server moves. This is paging with a cache of two pages: vertices are pages and the covered vertices are the cache.
A deterministic algorithm B has a cost CB(σ); a randomized algorithm A has an expected cost CA(σ), averaged over its random choices. A is c-competitive if there is a constant a such that for every request sequence σ and every deterministic algorithm B (on-line or off-line),
CA(σ)≤c⋅CB(σ)+a.
Algorithm EATR. The servers start on the vertices 1 and 2. The algorithm divides σ into phases; the first phase starts at the first request to a vertex other than 1 and 2. Let P be the set of vertices occupied by the servers at the end of the previous phase ({1,2} before the first phase). During a phase, a vertex is clean if it is not in P and has not been requested during this phase; a vertex is stale if it is neither clean nor the most recently requested vertex ℓ. EATR keeps one server on ℓ and the other uniformly at random on the stale set. When a stale vertex r is requested, the servers are placed on ℓ and r and the phase ends; the next phase starts at the next request to a vertex not covered by a server. Requests between phases, and repeated requests to ℓ, move nothing.
For a phase, l denotes the number of clean vertices requested in it. For a deterministic algorithm A, d and d′ denote the numbers of A's servers that do not coincide with any of EATR's servers at the beginning and at the end of the phase. An algorithm is lazy if it moves no server on a request to a covered vertex and exactly one server on a request to an uncovered one.
Formalization targets
Goal: Theorem 3
With OPT(σ) the optimal off-line cost of serving σ from the servers' starting position (1,2), there is a constant c such that for all σ
CEATR(σ)≤23OPT(σ)+c.
The constant c is left free; the factor 3/2 is the paper's and is optimal.
Milestones, in the order of the proof
Laziness (p. 4): every deterministic algorithm is dominated by a lazy one (a published theorem, reused).
Adversary bound for structured phases (p. 5): in a complete EATR phase with l clean requests, a lazy A pays at least l−d+d′.
Stale set before the terminating request (p. 6): it has l+1 elements, each covered with probability 1/(l+1).
Expected cost of a phase to EATR (p. 6): exactly l+l+1l.
Per-phase ratio (p. 6): EATR's expected phase cost is at most 23(CA+d−d′), since ll+l/(l+1)=1+l+11≤23.
Significance
The result. Theorem 3 settles the randomized competitive ratio of paging with two cache slots: combined with the paper's lower bound Hk (Corollary 5, the subject of a companion mission), the optimal factor for k=2 is exactly 3/2, against 2 for every deterministic algorithm. The general case was settled later by McGeoch and Sleator's Hk-competitive partitioning algorithm, which is considerably more complicated.
Formalizing it. The result has been proved since 1991; no machine-checked proof of it is on the platform (a search for EATR, randomized paging and two-server results on 2026-09-26 found only deterministic k-server theorems). The mission produces a formal model of a randomized on-line algorithm as a probability distribution over states evolving with the request sequence, a formal treatment of the phase decomposition and of the telescoping amortization that relates expected on-line cost to the optimal off-line cost, and a first strongly competitive randomized paging result on the platform, alongside the deterministic k-server results already there.
Difficulty
The per-phase computations are short. The main difficulty is the global accounting. The adversary's cost in a phase is bounded only in amortized form, l−d+d′, where d and d′ compare the adversary's servers with EATR's at the phase boundaries; the bound becomes a statement about OPT only after the d and d′ terms telescope across phases. This needs care with the requests that lie outside every phase (before the first phase, between phases, and in an unfinished last phase), during which the adversary may move. A further difficulty is that the off-line optimum ranges over arbitrary schedules, which may move several servers on one request, while the phase bound is proved for lazy on-line algorithms: the reduction from one to the other must be made explicit. Finally, the uniform law of the stale server is an invariant of a Markov chain on states that must be tracked through the whole phase.
Formalization scope
The vertices are an abstract metric space M with an enumeration e:Finn≃M, 2≤n, and the hypothesis that distinct points are at distance 1; the metric of Finn is not used. The starting vertices 1,2 are e(0),e(1). OPT is KServer.offlineCost of the published KServer model: the infimum of total movement over all schedules serving σ from (e(0),e(1)). Comparing with this infimum covers every deterministic B starting from EATR's position; a B starting elsewhere differs by at most 2, which the constant absorbs. The constant is quantified before σ.
EATR is a PMF over states: a deterministic record (the set P, whether a phase is in progress, the last requested vertex, the vertices requested in the phase) and the random position of the second server. Its expected cost is the expected number of server moves, summed over the requests. The paper fixes only that the second server is uniform on the stale set; when a clean request enlarges the stale set, the formalization moves one server by a fixed coupling that keeps the law uniform, and this choice is stated in the definition. A formalization that defines EATR's expected cost by the closed formula of the proof, or that restricts σ to complete phases, would make the goal a different statement; neither is done here. The pre-phase prefix and an unfinished last phase belong to σ and are covered by the constant.
Needed infrastructure: finite probability distributions (Mathlib's PMF), the published KServer model and its laziness theorem, and bookkeeping lemmas on the deterministic phase record. The phase record and the amortization argument are reusable for the marking algorithm of the companion mission. Proofs of any milestone, and alternative decompositions of the goal, are welcome.
D. D. Sleator, R. E. Tarjan, Amortized Efficiency of List Update and Paging Rules, Communications of the ACM 28(2):202–208, 1985. https://doi.org/10.1145/2786.2793
M. S. Manasse, L. A. McGeoch, D. D. Sleator, Competitive Algorithms for Server Problems, Journal of Algorithms 11(2):208–230, 1990. https://doi.org/10.1016/0196-6774(90)90003-W
L. A. McGeoch, D. D. Sleator, A Strongly Competitive Randomized Paging Algorithm, Algorithmica 6:816–825, 1991 (reference [12] of the paper).
A. R. Karlin, M. S. Manasse, L. Rudolph, D. D. Sleator, Competitive Snoopy Caching, Algorithmica 3(1):79–119, 1988 (reference [9] of the paper).
Maximizing Non-Monotone Submodular Functions II: A Nonadaptive Algorithm Achieves 1/3 of the OptimumResearch Paper
Motivation
Maximizing a submodular set function without constraints contains Max Cut, Max Directed Cut, maximum facility location and several graph and hypergraph cut problems as special cases, and it appears in operations research wherever a value exhibits diminishing returns but is not monotone (profit that combines coverage with a cost, for example). These problems are NP-hard, so the question is which fraction of the optimum an efficient algorithm can guarantee when the function is accessible only through a value oracle that returns f(S) for a queried set S.
Feige, Mirrokni and Vondrák (SIAM J. Comput. 40(4), 2011) gave the first constant-factor approximation algorithms for maximizing a general nonnegative submodular function. The simplest of them returns a uniformly random set and achieves 1/4 of the optimum; this mission is about the next one, a nonadaptive algorithm: it decides all of its oracle queries before seeing any answer, then computes a set from the answers. Such an algorithm can be run in one round of parallel queries. The paper shows that this restricted access already beats 1/4 and reaches 1/3.
Timeline. For Max Directed Cut, a random cut achieves 1/4. Feige, Mirrokni and Vondrák (FOCS 2007; journal version 2011) proved 1/4 for a random set and 1/3 nonadaptively for general nonnegative submodular functions, 1/3 and 2/5 by adaptive local search, and that 1/2 requires exponentially many queries. Buchbinder, Feldman, Naor and Schwartz (FOCS 2012, SIAM J. Comput. 2015) later reached the optimal 1/2 with a randomized double-greedy algorithm.
Setting
Let X be a finite ground set with n=∣X∣≥1 elements. A function f:2X→R is submodular (Definition 1.1) if
f(S∪T)+f(S∩T)≤f(S)+f(T)for all S,T⊆X.
Throughout, f is nonnegative, the paper's standing assumption, and OPT=maxS⊆Xf(S).
For p∈[0,1], X(p) denotes the random subset of X containing each element independently with probability p; R=X(1/2) is a uniformly random subset. For a set A⊆X, A(p) is the analogous random subset of A. The averaged marginal value of an element (Definition 2.4) is
ω(x)=E[f(R∪{x})−f(R∖{x})],R=X(1/2).
Algorithm NA (p. 1139):
by random sampling, compute estimates ω~(x) with ∣ω~(x)−ω(x)∣<OPT/n2 for all x, with high probability;
independently, sample R=X(1/2);
with probability 8/9 return R;
with probability 1/9 return A={x∈X:ω~(x)>0}.
Given the estimates, the expected value NA returns is 98E[f(X(1/2))]+91f(A).
Formalization targets
Goal: Theorem 2.6 in the explicit form of its proof
For every nonnegative submodular f and every estimate ω~ with ∣ω~(x)−ω(x)∣<OPT/n2 for all x,
98E[f(X(1/2))]+91f({x:ω~(x)>0})≥(31−9n4)OPT.
The printed theorem says "at least (1/3−o(1))OPT"; the term 4/(9n) is what the proof establishes (p. 1140, last display).
Milestones
Lemma 2.2: E[g(A(p))]≥(1−p)g(∅)+pg(A) for submodular g.
Lemma 2.3: E[f(A(p)∪B(q))]≥(1−p)(1−q)f(∅)+p(1−q)f(A)+(1−p)qf(B)+pqf(A∪B) for independently sampled, possibly overlapping A,B.
For B=X∖A and any C: f(A)+f(B∩C)+f(B∪C)≥f(C).
If ω≤OPT/n2 on B: E[f(R∪(B∩C))]≤E[f(R)]+OPT/(2n).
E[f(R∪(B∩C))]≥41f(B∩C)+41f(C).
If ω≥−OPT/n2 on A and B=X∖A: E[f(R)]≥E[f(R∩(B∪C))]−OPT/(2n).
E[f(R∩(B∪C))]≥41f(C)+41f(B∪C).
Milestones 3–7 are the displayed steps of the proof of Theorem 2.6, stated for arbitrary sets where the page's argument does not use the optimality of C.
Significance
The theorem shows that nonadaptive access, a fixed batch of polynomially many value queries followed by a computation, suffices for a 1/3-approximation of unconstrained nonnegative submodular maximization, strictly better than the 1/4 of any algorithm that must return one of its queried sets (the paper shows 1/4 is optimal in that class, §4.2). The quantity ω generalizes the in-degree/out-degree test for Max Directed Cut to arbitrary submodular functions, and Lemmas 2.2 and 2.3 are general sampling inequalities for submodular functions that the paper reuses for its adaptive smooth local search.
Formalizing it produces machine-checked versions of Lemmas 2.2 and 2.3 as statements about exact finite averages, a reusable expectation operator on product-distributed random subsets, and a checked version of the 1/3 argument with its explicit error term. The result is proved in the paper; to our knowledge none of it has been formalized in a proof assistant.
Difficulty
The two regimes the proof separates, "A is already good" and "one of f(B∩C), f(B∪C) is large", must be tied to the value of a uniformly random set, whereas the elements of A and B are chosen from estimated averages, not from the optimal set C. The natural attempt, comparing f(R) with f(C) element by element, fails because f is not monotone: adding elements of C to R can decrease the value. The accuracy OPT/n2 of the estimates must also be propagated through a sum over up to n elements, which is where the error term 4/(9n) comes from. The sampling lemmas require handling expectations over pairs of independent random subsets of possibly overlapping sets.
Formalization scope
The ground set is a Fintype X with DecidableEq, assumed Nonempty, so n=∣X∣≥1 and the divisions by n and n2 are genuine; sets are Finset X; f is real valued with nonnegativity ∀S,0≤f(S) as an explicit hypothesis. Lemmas 2.2 and 2.3 are stated for real f with no sign condition, as printed.
OPT is Finset.univ.sup' _ f, the true maximum over all subsets.
Every expectation over an independently sampled random set is the exact finite sum F(x)=∑Sf(S)∏i∈Sxi∏i∈/S(1−xi); X(1/2) is x≡1/2. Expectations over two independent samples (Lemma 2.3) are the corresponding iterated sums. Sampling probabilities carry the hypotheses 0≤p,q≤1.
The goal quantifies over every estimate ω~ satisfying the printed accuracy ∣ω~(x)−ω(x)∣<OPT/n2 (strict), with A={x:ω~(x)>0} (strict). The "with high probability" of NA's first step is this hypothesis; the sampling estimate that makes it likely (Lemma 2.5, a Chernoff-bound argument) is not part of the goal. When OPT=0 the hypothesis is unsatisfiable, but then f≡0 and nothing is lost.
The left-hand side is exactly the mixture 98E[f(X(1/2))]+91f(A). A statement with the maximum of the two terms, with exact values ω~=ω, or with the o(1) replaced by an existential constant or a limit, is a different (and weaker or stronger) theorem and does not close this mission.
Printed slip corrected: in the second display on p. 1140, the "=" before −∣A∖C∣OPT/(2n2) should be "≥"; milestone 6 states the inequality.
Welcome contributions: proofs of Lemmas 2.2 and 2.3 (reusable for mission IV of this series), the identity E[f(R∪{x})−f(R)]=21ω(x), and general lemmas about the operator F (splitting a uniform random set along a partition).
Selected references
U. Feige, V. S. Mirrokni, J. Vondrák, Maximizing Non-Monotone Submodular Functions, SIAM J. Comput. 40(4):1133–1153, 2011. https://doi.org/10.1137/090779346
N. Buchbinder, M. Feldman, J. Naor, R. Schwartz, A Tight Linear Time (1/2)-Approximation for Unconstrained Submodular Maximization, SIAM J. Comput. 44(5):1384–1402, 2015. https://doi.org/10.1137/130929205
A Simple Parallel Algorithm for the Maximal Independent Set Problem I: One Round of Monte Carlo Algorithm A or B Removes an Expected Eighth of the EdgesResearch Paper
Motivation
A maximal independent set (MIS) of a graph is a set of vertices, no two adjacent, to which no further vertex can be added. Sequentially an MIS is found greedily in linear time, but the greedy scan is inherently serial. Whether an MIS can be found fast in parallel was a central question of parallel complexity in the early 1980s: an MIS algorithm is a subroutine for maximal matching, vertex colouring with Δ+1 colours, and many other symmetry-breaking tasks.
Karp and Wigderson (STOC 1984; J. ACM 32, 1985) gave the first fast parallel algorithms for MIS: a randomized one and a deterministic one, both with running time O((logn)4), placing MIS in NC4.
Luby (SIAM J. Comput. 15(4), 1986) gave the Monte Carlo algorithms analysed in this mission, together with a derandomization that yields a deterministic EREW P-RAM algorithm with O((logn)2) running time, placing MIS in NC2. Alon, Babai and Itai (J. Algorithms 7, 1986) independently found a Monte Carlo algorithm similar to Algorithm B.
Luby's algorithm is the standard textbook example of a randomized parallel algorithm and remains the basis of distributed MIS algorithms in the LOCAL model. Its analysis rests on one statement, Theorem 1 of the paper, which this mission formalizes.
Setting
All algorithms in the paper run the same loop on a finite simple undirected input graph G=(V,E) with n=∣V∣ vertices. The current graph is G′=(V′,E′), initially G. For W⊆V′ the neighbourhood is N(W)={i∈V′:∃j∈W,(i,j)∈E′}. One execution of the loop body selects a set I′⊆V′ independent in G′, adds it to the output, and replaces G′ by the subgraph induced on V′−(I′∪N(I′)). The loop stops when G′ is empty.
For i∈V′ write adj(i) for its neighbours and d(i)=∣adj(i)∣ for its degree. The two Monte Carlo select steps are:
Algorithm A. Every vertex draws a priority π(i) uniformly from {1,…,n4}, independently. A vertex enters I′ when its priority is strictly smaller than the priority of each of its neighbours.
Algorithm B. Every vertex independently sets coin(i)=1 with probability 1/(2d(i)), or always if d(i)=0. Let X be the set of vertices with coin 1. A vertex of X enters I′ when each of its neighbours in X has strictly smaller degree.
Let Yk be the number of edges of E′ before the k-th execution of the loop body. The number of edges eliminated by that execution is Yk−Yk+1: exactly the edges of G′ with at least one endpoint in I′∪N(I′). For d(i)≥1 the paper uses the weight sum(i)=∑j∈adj(i)1/d(j).
Theorem 1 says that each round removes, in expectation, a constant fraction of the remaining edges. From it the paper derives that the expected number of rounds of either algorithm is O(logn), and hence that MIS has a Monte Carlo algorithm running in O(logn) expected time on a CRCW P-RAM and O((logn)2) on an EREW P-RAM with O(m) processors. Algorithm B and the proof of part (2) are also the basis of the paper's deterministic algorithm: the analysis of Lemma B uses only pairwise independence of the coins. The companion mission (A Simple Parallel Algorithm for the Maximal Independent Set Problem II) formalizes that derandomization and reuses the statements of milestones 2, 5 and 6.
The results are proved in the paper and reproduced in textbooks (e.g. Motwani and Raghavan, Randomized Algorithms), but not formalized: no statement of Theorem 1, Lemma A or Lemma B was found on the platform. A formal proof would make the per-round analysis of a standard parallel randomized algorithm reusable. That includes the degree-weighted counting of milestone 6 and the Bonferroni-type bound of the Technical Lemma, both of which recur in later analyses of distributed symmetry breaking.
Difficulty
The obvious argument tries to show that a fixed vertex enters I′ with good probability. That fails, because a high-degree vertex rarely wins against all its neighbours. The analysis instead bounds the probability that a vertex is removed, i.e. lands in N(I′). This event is a union over neighbours of dependent events, so the first Bonferroni inequality alone does not give a lower bound: the pairwise-intersection terms must be controlled. The union bound can also be very lossy when sum(i) is large, which is why the conclusion involves a minimum with a constant.
A second obstacle is the passage from vertices to edges: vertices of small sum(i) can have high degree while contributing little probability. The per-vertex bounds therefore have to be summed with degree weights and redistributed over edges. For Algorithm A there is an additional complication: priorities from {1,…,n4} can collide, so the argument about a uniformly random order holds only on the event that π is injective. That event appears as the factor 1−1/(2n2).
Formalization scope
Graph. The current graph G′ is a SimpleGraph V on a finite type with decidable adjacency, and V′=V. The degree is SimpleGraph.degree, adj(i) is neighborFinset, and Yk=∣E′∣ is edgeFinset.card.
Conditional form. Theorem 1 is stated for a fixed current graph G′, i.e. conditionally on the first k−1 rounds, as in the paper's proof. The unconditional statement follows by averaging.
Input size.n is a parameter with 1≤n and ∣V′∣≤n. It is not fixed to ∣V′∣, which would cover only the first round.
Select steps. Both endpoints' ALGEDGE runs are applied to every edge, since E′ contains each edge in both orientations. Hence Algorithm A keeps i iff π(i)<π(j) for all neighbours j. Algorithm B keeps i∈X iff d(j)<d(i) for all neighbours j∈X. Algorithm B's I′ starts at X; the page leaves I′ uninitialized in §3.3, and Algorithm D's code (p. 1047) has I′←X.
Laws. Probabilities and expectations are explicit finite sums: uniform over the (n4)∣V∣ priority vectors, and the product law over the 2∣V∣ coin vectors. A coin of an isolated vertex is 1 with probability 1, as on the page.
Milestones. Milestone 5 is stated for an arbitrary finite distribution of I′, which contains both algorithms' laws. Milestone 6 divides out the common factor 81 of the printed chain.
Theorem 1 is false for arbitrary distributions of priorities or coins. A formalization that takes "Pr" as an unconstrained parameter, conditions on the event of interest, or replaces n by ∣V′∣ does not state the paper's theorem.
A complete development needs finite product probability spaces, inclusion–exclusion (Bonferroni) inequalities for finite unions, the symmetry of uniform priorities conditioned on injectivity, and degree-sum identities (SimpleGraph.sum_degrees_eq_twice_card_edges). The Technical Lemma and milestones 5 and 6 are reusable beyond this mission. Proofs of any milestone, and alternative proofs of Lemmas A and B, are welcome.
Selected references
M. Luby, A Simple Parallel Algorithm for the Maximal Independent Set Problem, SIAM J. Comput. 15(4):1036–1053, 1986. https://doi.org/10.1137/0215074
R. M. Karp and A. Wigderson, A Fast Parallel Algorithm for the Maximal Independent Set Problem, J. ACM 32(4):762–773, 1985. https://doi.org/10.1145/4221.4226
N. Alon, L. Babai and A. Itai, A Fast and Simple Randomized Parallel Algorithm for the Maximal Independent Set Problem, J. Algorithms 7(4):567–583, 1986. https://doi.org/10.1016/0196-6774(86)90019-2
Maximizing Non-Monotone Submodular Functions I: A Uniformly Random Set Achieves 1/4 of the Optimum, and 1/2 for Symmetric FunctionsResearch Paper
Motivation
Many combinatorial optimization problems ask for a subset of a finite ground set that maximizes a set function with diminishing returns: Max Cut and Max Directed Cut in graphs, facility location, maximum entropy sampling, and welfare problems in combinatorial auctions all fit this pattern. The common abstraction is the maximization of a submodular function, the discrete analogue of a concave function. Unlike the monotone case, where the objective only grows as elements are added, the non-monotone problem has no constraint at all and is still NP-hard, since Max Cut is a special case.
For Max Cut and Max Directed Cut, the simplest algorithm there is, putting every vertex on a side by an independent fair coin, already cuts half, respectively a quarter, of the optimum in expectation. Feige, Mirrokni and Vondrák (SIAM J. Comput. 40(4), 2011; extended abstract at FOCS 2007) showed that this is not a feature of cut functions: the same random choice achieves the same factors for every nonnegative submodular function, and for every symmetric one. This mission formalizes that result, Theorem 2.1 of the paper, together with the two sampling lemmas on which it rests. The paper's other results (a nonadaptive 1/3-approximation, deterministic and smoothed local search, and query lower bounds) are the subjects of companion missions in the same series.
Setting
Let X be a finite set with n=∣X∣ elements. A set function assigns a real number f(S) to every subset S⊆X. It is submodular if
f(S∪T)+f(S∩T)≤f(S)+f(T)for all S,T⊆X,
equivalently if the marginal value f(B∪{x})−f(B) of an element x does not increase as the set B grows. It is symmetric if f(X∖S)=f(S) for every S⊆X; the cut function of an undirected graph is the standard example. The optimum is
OPT=S⊆Xmaxf(S).
For p∈[0,1], X(p) denotes the random subset of X containing each element independently with probability p; similarly A(p) is the random subset of a fixed A⊆X. The Random Set Algorithm (RS) returns R=X(1/2), a uniformly random subset of X, without querying f. Its expected value is the average of f over all subsets,
E[f(R)]=F(21,…,21)=2n1S⊆X∑f(S),
where F(x)=∑S⊆Xf(S)∏i∈Sxi∏i∈/S(1−xi) is the multilinear extension of f, the expectation of f on a random set that includes element i independently with probability xi.
Formalization targets
Goal: Theorem 2.1
For every nonnegative submodular f:2X→R+,
E[f(X(1/2))]≥41OPT,
and if f is in addition symmetric,
E[f(X(1/2))]≥21OPT.
Both parts form the goal, stated as one theorem. The constants 41 and 21 are exact, not asymptotic, and they are tight: the directed cut of a single arc attains 41, and the cut of a single edge attains 21.
Milestones
Lemma 2.2. For submodular g:2X→R, A⊆X and p∈[0,1],
E[g(A(p))]≥(1−p)g(∅)+pg(A).
Lemma 2.3. For submodular f:2X→R, sets A,B⊆X that need not be disjoint, independent samples A(p), B(q), and p,q∈[0,1],
The display in the proof of Theorem 2.1. For submodular f:2X→R and every S⊆X, with Sˉ=X∖S,
E[f(X(1/2))]≥41f(∅)+41f(S)+41f(Sˉ)+41f(X).
The milestones need no sign on the function; nonnegativity enters only in the goal.
Significance
The result. Theorem 2.1 gives an algorithm that makes no query at all and is still a constant-factor approximation for unconstrained non-monotone submodular maximization. It sets the baseline that every later algorithm for the problem is measured against: the paper's own nonadaptive 31-algorithm and its local search algorithms with factors 31 and 52, followed by later work culminating in the tight 21-approximation of Buchbinder, Feldman, Naor and Schwartz (FOCS 2012). The paper also shows that 41 is optimal among nonadaptive algorithms required to return one of the queried sets, and that 21 is optimal for symmetric functions among all algorithms using polynomially many value queries, so both factors of Theorem 2.1 have a precise place in the complexity landscape. Lemma 2.3, the probabilistic inequality behind it, is reused in the analyses of the nonadaptive algorithm and of smooth local search.
Formalizing it. The result is proved, with a short proof. What this mission adds is a machine-checked version of the random-set guarantee and of the two sampling lemmas, stated for arbitrary finite ground sets and, for the lemmas, for real-valued submodular functions without a sign. To our knowledge none of these statements has a machine-checked proof; Mathlib has no theory of submodular set functions or of their multilinear extension.
Difficulty
The goal itself is a two-line consequence of the third milestone. The work sits in the lemmas and in one change of viewpoint.
Lemma 2.2 is not a pointwise statement: the random set A(p) can be any subset of A, and g can be smaller on it than both g(∅) and g(A). The inequality holds only in expectation, and only because submodularity controls the marginal value of each element uniformly across the sets it can be added to. Lemma 2.3 needs a conditioning argument over two independent samples; the sets A and B may overlap, and on A∩B the union A(p)∪B(q) contains an element with probability 1−(1−p)(1−q), so it is not the product distribution with probability p on A and q on B. Finally, the third milestone requires identifying the uniform random subset X(1/2) with the union of independent half-samples of S and of its complement, as a statement about finite sums.
The obvious attempt at the goal, comparing f(R) with f(S∗) for an optimal S∗ set by set, fails: f is not monotone, so a random set that contains most of S∗ may still have small value, and a random set can pick up elements that hurt.
Formalization scope
The ground set is a Lean type X with [Fintype X] [DecidableEq X]; subsets are Finset X and set functions are f : Finset X → ℝ. Submodularity is the lattice inequality of Definition 1.1, not the decreasing-marginals property. Nonnegativity, the paper's standing assumption f:2X→R+, is the hypothesis ∀ S, 0 ≤ f S; it appears only in the goal. Symmetry is ∀ S, f Sᶜ = f S for all subsets, not only for an optimal one. OPT is Finset.univ.sup' Finset.univ_nonempty f, a maximum over the always nonempty family of all subsets, so it is attained. The ground set may be empty; the goal holds there too and no nonemptiness is assumed.
Expectations are written as exact finite sums, not as integrals. E[f(X(1/2))] is the multilinear extension F f (fun _ => 1/2). E[g(A(p))] is ∑T⊆Ap∣T∣(1−p)∣A∖T∣g(T), and E[f(A(p)∪B(q))] is the double sum over independent samples S⊆A, T⊆B with the product of the two weights. The ranges 0≤p≤1 and 0≤q≤1, implied in the paper by the word "probability", are explicit hypotheses; Lemma 2.2 is false without them.
Trivializing formalizations are excluded: the weights are exactly those of the uniform distribution on all 2n subsets, OPT is the true maximum rather than the value at one fixed set, and f is required to be both nonnegative and submodular.
Reusable infrastructure produced by a complete development: the multilinear extension of a set function and its expression as an expectation, product-weight identities for independent sampling of subsets (including the decomposition of X(1/2) along a set and its complement), and Lemmas 2.2 and 2.3, which the companion missions on the nonadaptive algorithm and on smooth local search also need. Proofs of any milestone are welcome independently.
Selected references
U. Feige, V. S. Mirrokni, J. Vondrák, Maximizing Non-Monotone Submodular Functions, SIAM Journal on Computing 40(4):1133–1153, 2011. https://doi.org/10.1137/090779346
U. Feige, V. S. Mirrokni, J. Vondrák, Maximizing non-monotone submodular functions, Proceedings of the 48th IEEE Symposium on Foundations of Computer Science (FOCS), 2007, pp. 461–471. https://doi.org/10.1109/FOCS.2007.29
N. Buchbinder, M. Feldman, J. Naor, R. Schwartz, A Tight Linear Time (1/2)-Approximation for Unconstrained Submodular Maximization, SIAM Journal on Computing 44(5):1384–1402, 2015 (FOCS 2012). https://doi.org/10.1137/130929205
G. L. Nemhauser, L. A. Wolsey, M. L. Fisher, An analysis of approximations for maximizing submodular set functions — I, Mathematical Programming 14:265–294, 1978. https://doi.org/10.1007/BF01588971
Approximation Techniques for Average Completion Time Scheduling IV: List Scheduling from an Optimal One-Machine Schedule Is a 2-Approximation for In-TreesResearch Paper
Motivation
Minimizing the sum of weighted completion times of jobs on identical parallel machines is one of the basic objectives of machine scheduling: it measures the average time a job spends in the system, weighted by its importance. When the jobs are subject to precedence constraints (a job may start only after certain other jobs have finished), the problem is strongly NP-hard already in very restricted cases, and the question becomes how close to optimal a polynomial-time algorithm can guarantee to be.
Chekuri, Motwani, Natarajan and Stein, Approximation Techniques for Average Completion Time Scheduling (SIAM J. Comput. 31(1), 2001, doi:10.1137/S0097539797327180), develop a general way to turn a good schedule for a single machine into a good schedule for m machines. For arbitrary precedence constraints their conversion (Delay List, §4.1–4.3) loses a factor (1+β)ρ+(1+1/β) over a ρ-approximate one-machine schedule, which is 4 when the one-machine schedule is optimal. In §4.4 they show that for in-tree precedence without release dates, the plain list-scheduling rule of Graham, fed with an optimal one-machine schedule, already achieves ratio 2. In-trees are the precedence structures of assembly processes: every job feeds into at most one later job.
Timeline of the relevant results:
1966–1969: Graham introduces list scheduling on parallel machines and analyzes it for makespan (Graham 1969).
1972: Horn gives a polynomial-time optimal one-machine algorithm for weighted completion time under treelike precedence (Horn 1972).
1977: Adolphson gives O(nlogn) one-machine algorithms for tree and series-parallel precedence (Adolphson 1977, the paper's reference [1]).
2001: Chekuri, Motwani, Natarajan and Stein prove the ratio-2 bound for in-trees on m machines (Theorem 4.17).
Setting
There are n jobs J0,…,Jn−1 and m≥1 identical machines. Job Jj has a processing timepj>0 and a weightwj>0; every job is available at time 0 (there are no release dates).
The precedence constraints form an in-tree (more generally, an in-forest): every job j has at most one immediate successor succ(j), and following successors never returns to the start. Write i≺j if j is reached from i by following successors one or more times.
A feasible scheduleSm on m machines gives each job a start time Sj≥0 and a machine; a job runs without interruption for pj time units; two jobs on the same machine do not overlap; and i≺j implies that j starts no earlier than i completes. The completion time is Cjm=Sj+pj and the value of the schedule is ∑jwjCjm.
The critical-path lengthκj (Definition 4.1 with no release dates) is κj=pj if j has no predecessors and κj=pj+maxi≺jκi otherwise.
A list is an ordering π of the jobs that obeys the precedence constraints. It defines the one-machine scheduleS1 that runs the jobs in list order without idle time; its completion times are Cj1, the total processing time of the jobs up to and including j in the list. An optimal one-machine schedule is a list minimizing C1=∑jwjCj1.
List scheduling (Graham's rule, footnote 3 of the paper) on m machines with list π: whenever a machine is free, start on it the first job of the list that is ready, i.e. whose predecessors have all completed.
Formalization targets
Goal: Theorem 4.17
Let π be an optimal one-machine schedule and G the list schedule on m machines with list π. Then for every feasible m-machine schedule N,
j∑wjCjG≤2j∑wjCjN.
Milestones
Lemma 4.16 (any precedence-respecting list π, with its idle-free one-machine schedule S1): for every job i,
CiG≤κi+mCi1.
Lemma 4.10: COPTm≥COPT1/m, i.e. ∑jwjCj1/m≤∑jwjCjN for an optimal list and every feasible N.
Lemma 4.11: COPTm≥∑iwiκi=COPT∞, i.e. ∑iwiκi≤∑iwiCiN for every feasible N on any number of machines, and the value ∑iwiκi is attained by a feasible schedule on n machines.
Significance
The result. Theorem 4.17 gives a simple, fast algorithm with a guaranteed factor 2 for a strongly NP-hard problem, halving the factor 4 that the general Delay List conversion gives for the same class. The per-job bound of Lemma 4.16 is stronger than the aggregate statement: every single job completes within its critical-path length plus a 1/m share of its one-machine completion time, so the same bound applies to other objectives built from completion times.
Formalizing it. The paper's proof is complete and short, but it argues about events at a time t (jobs that finish exactly at t, jobs that become ready at t, machines freed at t) and runs an induction over jobs ordered by start time with an invariant about idle time. A machine-checked version fixes what "list scheduling" means precisely, pins down the counting argument that uses the in-tree structure, and yields reusable definitions of nonpreemptive parallel-machine schedules, critical paths and list schedules. To the knowledge of this mission, none of these results has a machine-checked proof.
Difficulty
List scheduling may start a job that is late in the list before an earlier one, because the earlier job is not yet ready; so the one-machine order is not preserved and the obvious comparison with S1 fails. Idle machines are the other obstacle: a machine can stay idle while a job waits for its predecessors, and a per-job bound of the form κi+Ci1/m holds only if such idle time can be accounted for by Ji's own chain of predecessors. For general precedence constraints, and for out-trees (every job has at most one immediate predecessor), the paper's accounting breaks down, and the paper states the per-job bound only for in-trees; the in-tree structure is essential to the argument. Events with several jobs finishing at the same instant, and ties in start times, have to be handled without loss.
Formalization scope
Jobs are Fin n, machines Fin m, times real numbers. Processing times and weights are strictly positive. There are no release dates: start times are nonnegative. The paper admits pj=0 only in lower-bound instances elsewhere; the bounds here assume pj>0.
In-trees are encoded by an immediate-successor map succ : Fin n → Option (Fin n) with no cycles; this covers in-forests, the reading of "in-trees" in Theorem 4.17. The precedence relation is its transitive closure.
κ is defined by well-founded recursion on the precedence order, exactly as Definition 4.1 with r≡0.
One-machine schedules are represented by their precedence-respecting order and are idle-free; with no release dates and positive processing times idle time only delays jobs, so optimality among orders is optimality among one-machine schedules. The optimal one-machine schedule is a hypothesis of the goal; the paper's O(nlogn) algorithm for computing it (reference [1]) is not formalized, and the running-time claim of Theorem 4.17 is not stated. A separate item asserts that an optimal order exists.
List scheduling is specified by two properties that determine Graham's rule up to machine labels: no machine is idle while a ready job waits, and among jobs ready at a start time the earlier one in the list starts first. A separate item asserts that such a schedule exists for every precedence-respecting list, so the goal is not vacuous.
Optima are never formed as infima: the approximation ratio is stated against every feasible schedule. A statement of the form "there is an algorithm with ratio 2" would be trivial (an optimal schedule exists) and is ruled out: the goal is about the paper's algorithm.
The equality ∑iwiκi=COPT∞ in Lemma 4.11 is stated as attainment on n machines (as many machines as jobs), which together with the lower bound on every number of machines is the optimum with unboundedly many machines.
Welcome contributions: proofs of the two existence items (Graham's list schedule by event-driven construction; an optimal order over the finite set of linear extensions), of Lemmas 4.10 and 4.11, and of Lemma 4.16. The schedule and list-scheduling definitions are reusable for other parallel-machine results with precedence constraints.
Selected references
C. Chekuri, R. Motwani, B. Natarajan, C. Stein, Approximation Techniques for Average Completion Time Scheduling, SIAM J. Comput. 31(1):146–166, 2001. https://doi.org/10.1137/S0097539797327180
R. L. Graham, Bounds on multiprocessing timing anomalies, SIAM J. Appl. Math. 17(2):416–429, 1969. https://doi.org/10.1137/0117039
W. A. Horn, Single-machine job sequencing with treelike precedence ordering and linear delay penalties, SIAM J. Appl. Math. 23(2):189–202, 1972. https://doi.org/10.1137/0123021
D. L. Adolphson, Single machine job sequencing with precedence constraints, SIAM J. Comput. 6(1):40–54, 1977. https://doi.org/10.1137/0206002
Local Search Heuristics for k-Median and Facility Location Problems I: Single-Swap Local Search for k-Median Has Locality Gap 5Research Paper
Motivation
The k-median problem asks where to open k facilities so that the total distance from a set of clients to their nearest open facility is as small as possible. It is a basic model of facility location in operations research (placing depots, warehouses or servers) and of clustering with representative centres, and it is NP-hard, so the question of interest is how close a polynomial-time method can come to the optimum.
Local search is among the most widely used heuristics for it: start from any k facilities and repeatedly exchange one open facility for a closed one while the cost decreases. Arya, Garg, Khandekar, Meyerson, Munagala and Pandit (SIAM J. Comput. 33(3), 2004) gave the first constant-factor guarantee for this heuristic on metric instances: every local optimum of the single-swap local search costs at most five times any solution with k facilities. This mission formalizes that result.
Timeline of the relevant bounds:
Korupolu, Plaxton and Rajaraman (SODA 1998) analysed a local search for k-median that opens k(1+ϵ) facilities and costs at most 3+5/ϵ times the optimum with k facilities.
Charikar, Guha, Tardos and Shmoys (STOC 1999) gave the first constant-factor approximation for metric k-median, by LP rounding (632).
Jain and Vazirani (J. ACM 2001) and Charikar and Guha (FOCS 1999) improved the constant with primal–dual methods to 6 and 4.
Arya et al. (STOC 2001; SIAM J. Comput. 2004) proved the locality gap 5 for single swaps and 3+2/p for swaps of p facilities at a time, with matching examples.
Setting
A metric instance consists of a finite set C of clients, a finite set F of facilities and a distance d on C∪F that is nonnegative, symmetric and satisfies the triangle inequality. Write cji=d(j,i) for the cost of serving client j by facility i.
For a nonempty set S⊆F of open facilities every client is served by its nearest open facility, and the cost of S is
cost(S)=j∈C∑i∈Smincji.
The k-median problem asks for a set S of at most k facilities of minimum cost.
A swap⟨s,s′⟩ closes a facility s∈S and opens a facility s′∈/S, giving S−s+s′=(S∖{s})∪{s′}. The neighbourhood of S is
B(S)={S−{s}+{s′}∣s∈S,s′∈/S},
and S is locally optimum if cost(S)≤cost(S′) for every S′∈B(S). The local search starts from an arbitrary set of k facilities and applies improving swaps until none exists; swaps preserve the number of facilities, so it stops at a locally optimum set of exactly k facilities. The locality gap is the supremum, over instances, of the ratio between the cost of a worst local optimum and the optimal cost.
The analysis uses the following notation. For a solution A, let σA assign each client to a nearest facility of A, let Aj=cjσA(j) be the service cost of client j, and let NA(a) be the set of clients served by a∈A. For two solutions S and O put Nso=NO(o)∩NS(s). A facility s∈Scaptureso∈O if ∣Nso∣>21∣NO(o)∣; s is bad if it captures some o∈O and good otherwise.
Formalization targets
Goal: Theorem 3.2
For every metric instance, every k, every locally optimum set S of exactly k facilities and every nonempty set O of at most k facilities,
cost(S)≤5⋅cost(O).
The comparison solution O is arbitrary, not an optimum; the statement is the locality gap bound in the form the proof gives.
Milestones, in the order the proof uses them
A facility o is captured by at most one facility of S (remark after Definition 3.1).
Property 3.1: for each o there is a bijection π of NO(o) with π(Nso)∩Nso=∅ whenever s does not capture o.
When ∣S∣=∣O∣ there are ∣O∣ swaps ⟨s,o⟩, one for each o∈O, such that no facility capturing two or more facilities of O is used, every good facility is used at most twice, and a used s captures no o′=o.
Inequality (2): for a locally optimum S and such a swap ⟨s,o⟩,
Theorem 3.2 shows that the simplest exchange heuristic for k-median is a constant-factor approximation on every metric instance, and the paper states that the analysis is tight: its example of §3.5, given for swaps of two facilities, is said to generalize to swaps of p≥1 facilities, where the bound 3+2/p is 5 for p=1. Combined with the standard device of accepting only swaps that improve the cost by a factor 1−ϵ/Q, it yields a polynomial-time 5/(1−ϵ)-approximation (p. 548). The same capture-and-reassignment argument is reused for multi-swap k-median, for uncapacitated and capacitated facility location in the same paper, and in later work on k-means and on local search for clustering; its milestones (the capture graph and the mapping π) are the reusable part.
The result has been proved since 2001 and is textbook material (Williamson and Shmoys, The Design of Approximation Algorithms, 2011, Chapter 9). No machine-checked proof of it is known; Mathlib has no k-median problem and no locality-gap result for any clustering objective. The work remaining is to formalize the known proof.
Difficulty
The obvious argument adds up the inequalities cost(S−s+o)≥cost(S) over a pairing of S with O, rerouting the clients of the closed facility s to the nearest remaining facility. This fails when a single facility of S serves most clients of several facilities of O: closing it leaves those clients with no nearby open facility, and no bound in terms of cost(O) follows. The analysis must choose which swaps to consider so that such facilities are never closed, and must reroute the displaced clients of the facilities it does close to a facility other than the closed one while paying only a constant multiple of their own service costs. Both choices must work for arbitrary ties in the nearest-facility assignments and when S and O share facilities.
Formalization scope
Namespace LocalSearchFL.KMedian. Clients and facilities are types Cl, Fa with Fintype and DecidableEq; the distance is a real-valued function on Cl ⊕ Fa with fields for nonnegativity, symmetry and the triangle inequality, and d(x,x)=0 is not assumed. Solutions are Finset Fa. The cost is defined only for nonempty sets, from a nonemptiness proof, so no value is assigned to the empty solution; the goal takes S nonempty with S.card = k, which is the paper's k≥1. Local optimality quantifies over every swap ⟨s,s′⟩ with s∈S and s′∈/S, exactly the neighbourhood B(S) of Theorem 3.2, and not only over the swaps with s′∈O that the proof uses. The inequality is stated multiplied out, cost(S)≤5⋅cost(O), so it is meaningful when cost(O)=0.
The milestones quantify over nearest-facility assignments σS, σO with arbitrary ties. Capture is stated in integers as ∣NO(o)∣<2∣Nso∣. The bijection π of NO(o) is a permutation of all clients fixing every client outside NO(o); in inequality (2) it is a single permutation preserving every NO(o). Milestones 1–3 are purely combinatorial and are stated for arbitrary assignments, which contains the paper's case.
A formalization in which local optimality ranges over the swaps ⟨s,o⟩, o∈O, only, or in which ∣O∣=∣S∣ or O optimal is assumed, or in which the cost of the empty set is 0, is a different statement and is ruled out.
A complete development needs the finite-sum and Finset.inf' API of Mathlib, permutations (Equiv.Perm) and finite counting. The capture machinery and the mapping π are reusable for the multi-swap and facility location missions of this series. Proofs of individual milestones are welcome independently of the goal.
Selected references
V. Arya, N. Garg, R. Khandekar, A. Meyerson, K. Munagala, V. Pandit, Local Search Heuristics for k-Median and Facility Location Problems, SIAM J. Comput. 33(3):544–562, 2004. https://doi.org/10.1137/S0097539702416402
M. Charikar, S. Guha, É. Tardos, D. B. Shmoys, A Constant-Factor Approximation Algorithm for the k-Median Problem, J. Comput. System Sci. 65(1):129–149, 2002. https://doi.org/10.1006/jcss.2002.1882
K. Jain, V. V. Vazirani, Approximation Algorithms for Metric Facility Location and k-Median Problems Using the Primal-Dual Schema and Lagrangian Relaxation, J. ACM 48(2):274–296, 2001. https://doi.org/10.1145/375827.375845
M. R. Korupolu, C. G. Plaxton, R. Rajaraman, Analysis of a Local Search Heuristic for Facility Location Problems, J. Algorithms 37(1):146–188, 2000. https://doi.org/10.1006/jagm.2000.1100
Foundations of Machine Learning XIV: Finite Markov Decision Processes and Bellman's EquationsTextbook
Motivation
Reinforcement learning formalizes a scenario supervised learning cannot: an agent that
actively interacts with an environment, choosing actions that change both the state it
observes next and the reward it receives, rather than passively receiving an i.i.d. labeled
sample. Every practical treatment of this scenario — from classical dynamic programming to
modern deep reinforcement learning — is built on the Markov decision process (MDP), a model
in which the effect of an action depends only on the current state, not on the full history
that led to it. Two questions define the theory this mission covers: given a fixed way of
acting (a policy), what value does it obtain, and how is that value actually computed rather
than merely characterized as the solution of a fixed-point equation? Mohri, Rostamizadeh and
Talwalkar's chapter 17 answers both for the stationary, infinite-horizon discounted case, and
this mission targets its two central results: that a fixed policy's value is not just
characterized but uniquely determined by a linear system with an explicit closed-form
solution (Theorem 17.10), and that the optimal value function — obtained instead by choosing
the best action at every state — can be computed by an iterative algorithm guaranteed to
converge regardless of where it starts (Theorem 17.11).
Setting
A (finite) Markov decision process consists of a finite set of states S, a finite set of
actions A, a transition kernel P[s′∣s,a] giving the distribution over the next state
s′ after taking action a at state s, and an expected reward E[r(s,a)] for that
transition. A (stationary) policyπ:S→Δ(A) assigns each state a distribution over
actions — possibly, but not necessarily, a point mass on a single action. Fixing π turns the
MDP into an ordinary Markov chain on S: at each step the agent is at some state s, draws
a∼π(s), receives (expected) reward E[r(s,a)], and moves to a state drawn from
P[⋅∣s,a]. For a discount factor γ∈[0,1), the value of π at s is the
expected discounted sum of future rewards starting from s,
Vπ(s)=Eat∼π(st)[t=0∑+∞γtr(st,at)s0=s],
and the state-action value functionQπ(s,a) is the analogous quantity for taking a
at s and then following π. Marginalizing the raw kernel and reward over the mixed action
π(s) gives the induced transition matrix Ps,s′=P[s′∣s,π(s)]=∑aπ(s)(a)P[s′∣s,a] and induced reward vector Rs=E[r(s,π(s))]=∑aπ(s)(a)E[r(s,a)] — the objects that turn π's value into a genuinely linear-algebraic quantity. A
policy π∗ is optimal if Vπ∗(s)≥Vπ(s) for every policy π and every
state s; write V∗ for its value function.
Formalization targets
Theorem 17.10 (goal). For a finite MDP and a fixed policy π, the matrix I−γP
(with P the policy-induced transition matrix) is invertible, and π's value function is the
unique solution of the Bellman equations, given in closed form by
Vπ=(I−γP)−1R.
Proposition 17.9 (milestone). The value function itself satisfies the linear system that
Theorem 17.10 solves:
Theorem 17.7 (milestone). A policy π is optimal if and only if it places probability
only on Qπ-maximizing actions: for every (s,a) with π(s)(a)>0, a∈argmaxa′Qπ(s,a′).
Theorem 17.11 (milestone). The Bellman optimality operator Φ, [Φ(V)](s)=maxa{E[r(s,a)]+γ∑s′P[s′∣s,a]V(s′)}, is a γ-contraction for
∥⋅∥∞; consequently, for any starting vector V0, the value-iteration
sequence Vn+1=Φ(Vn) converges to a fixed point of Φ.
Significance
Theorem 17.10 is what makes policy evaluation on a finite MDP an exact, finite computation
rather than an infinite limit: instead of summing an infinite discounted series or solving an
implicit fixed-point equation numerically, a single ∣S∣×∣S∣ matrix inversion gives the
policy's value at every state simultaneously. It is also the base case every planning algorithm
in the chapter builds on: policy iteration alternates optimizing a policy with exactly this
evaluation step. Theorem 17.11 gives the complementary guarantee for the harder problem of
finding the optimal value function directly, without fixing a policy first: value iteration
converges from any starting point, with a convergence rate (O(log(1/ϵ)) iterations for
ϵ-accuracy) that follows from the same contraction argument. Together, the two results
are the mathematical content behind why dynamic-programming planning for finite MDPs is
tractable at all — the discount factor γ<1, not any structural assumption on rewards or
transitions, is what buys both the uniqueness in Theorem 17.10 and the convergence in Theorem
17.11. Formalizing them requires reproducing this linear-algebraic and metric content precisely,
not just asserting the conclusions: an invertibility claim asserted without the operator-norm
argument, or a convergence claim without the contraction property, would state something true
by fiat rather than the book's actual result. No faithful prior art exists on the platform for
this exact model (see Formalization scope).
Difficulty
The obvious shortcut for Theorem 17.10 is to assert I−γP is invertible without proof —
true, but not what the book does, and not informative about why it holds. The genuine content
is that P, being row-stochastic (every row of P sums to exactly 1, since π(s) and
P[⋅∣s,a] are both proper distributions), has operator norm ∥P∥∞=1
exactly, so ∥γP∥∞=γ<1 strictly; this rules out 1 as an eigenvalue
of γP, which is exactly what invertibility of I−γP requires. The same
γ<1 fact, applied differently, drives Theorem 17.11: showing Φ is γ-Lipschitz
requires bounding Φ(V)(s)−Φ(U)(s) by comparing the maximizing action for V against
the same action's value under U (not U's own maximizer), since the two suprema need not be
attained at the same action — a step easy to state incorrectly as a direct comparison of two
maxima. Both theorems fail if γ=1 is allowed: the discounted setting's central asset, a
strict contraction, disappears exactly at that boundary.
Formalization scope
States and actions are modeled as finite types (Fintype S, Fintype A); the raw kernel and
reward P : S → A → S → ℝ, Er : S → A → ℝ are unconstrained functions, with IsTransitionKernel
asserting the required distribution property explicitly rather than assuming it silently. A
policy is π : S → A → ℝ with IsPolicy π asserting π s is a distribution over A for every
s — deliberately not π : S → A or a PMF-valued function, since Theorem 17.7's own
quantifier ("for any pair (s,a) with π(s)(a) > 0") requires treating π(s) as a genuine
mixture. PolicyValue is defined as the actual infinite discounted expectation (via an explicit
state-occupation-distribution recursion), not as the Bellman fixed point — so that Proposition
17.9 (the value function satisfies the linear system) and Theorem 17.10 (that system has a
unique, invertible-matrix solution) are both non-vacuous claims about the same object, rather
than one being definitionally true of the other. The trivializing formalization this rules out
is asserting IsUnit (1 - γ • P) as a bare hypothesis, or defining V_πas(1-γP)⁻¹R and
calling the resulting identity a theorem; both would erase the mission's actual content.
Two platform modules model related MDPs (BertsekasSSPModel, a stochastic-shortest-path model
with a termination-probability deficit rather than exact row-stochasticity, and
FoundationsRL.RLBasics, a finite-horizon episodic model indexed by layer) — neither
specializes exactly to this chapter's stationary, always-continuing, infinite-horizon discounted
convention, so every definition here is drafted fresh rather than imported. This chunk covers
§17.2–17.4.2 (the MDP model, policy value, Bellman's equations, value and policy iteration);
§17.4.3 (the linear-programming formulation) and §17.5 (stochastic-approximation learning
algorithms — TD(0), Q-learning, SARSA) are out of scope, since they require a
stochastic-approximation convergence substrate this mission does not build.
Selected references
Mohri, M., Rostamizadeh, A., and Talwalkar, A. Foundations of Machine Learning, 2nd ed.,
chapter 17. MIT Press, 2018.
Bellman, R. Dynamic Programming. Princeton University Press, 1957.
Puterman, M. L. Markov Decision Processes: Discrete Stochastic Dynamic Programming. Wiley,
1994.
Foundations of Machine Learning XII: Algorithmic StabilityTextbook
Motivation
Every generalization bound in Chapters 2-11 depends only on the complexity of a fixed
hypothesis set H — Rademacher complexity, VC-dimension, growth function — and holds
regardless of which algorithm within H actually returns the hypothesis. This is both a
strength (broad applicability) and a limitation: it throws away everything specific to how an
algorithm searches H, and can be uninformative when H itself is large or unbounded (e.g. a
regularized objective that implicitly restricts the search without shrinking H as a set).
Chapter 14 introduces a fundamentally different route to a generalization bound — a property of
the algorithm rather than the hypothesis class — first used by Devroye, Rogers and Wagner
for k-nearest-neighbor rules and given its modern general form by Bousquet and Elisseeff
(2002), whose treatment this chapter follows and (for non-differentiable convex losses)
extends.
Setting
A labeled example is z=(x,y)∈X×Y; for a loss function L:Y′×Y→R+
(where Y′ may differ from Y, e.g. Y={−1,+1} but Y′=R for a real-valued
hypothesis), the loss of a hypothesis h at z is Lz(h)=L(h(x),y). Given a learning
algorithm A that maps a sample S of size m to a hypothesis hS∈H, the empirical
error and generalization error are R^S(h)=m1∑iLzi(h) and
R(h)=Ez∼D[Lz(h)]. Uniform β-stability (Definition 14.1) says: for
any two samples S, S′ differing by a single point, the algorithm's returned hypotheses
satisfy ∣Lz(hS)−Lz(hS′)∣≤β for every z — replacing one training point can change
the algorithm's loss on any point by at most β. For the regularized algorithms studied
in §14.3, a kernel-based regularization algorithm minimizes FS(h)=R^S(h)+λ∥h∥K2 over the RKHS H of a positive-definite kernel K, and a loss L is
σ-admissible (Definition 14.3) if ∣L(h′(x),y)−L(h(x),y)∣≤σ∣h′(x)−h(x)∣ for
all hypotheses h,h′ — a Lipschitz-like smoothness condition satisfied by the standard
regression and classification losses.
Formalization targets
Proposition 14.4 (milestone). For a PDS kernel K with K(x,x)≤r2 and a convex,
σ-admissible loss L, the kernel-based regularization algorithm is β-stable with
β≤mλσ2r2.
Corollary 14.5 (milestone). For SVR (the ϵ-insensitive loss Lϵ, bounded
by M), with probability at least 1−δ:
R(hS)≤R^S(hS)+mλr2+(λ2r2+M)2mlog(1/δ).
Theorem 14.2 — the mission's goal. For a loss bounded by M and a β-stable algorithm
A, with probability at least 1−δ over a sample S of size m:
R(hS)≤R^S(hS)+β+(2mβ+M)2mlog(1/δ).
Significance
Theorem 14.2 is the book's demonstration that algorithm-dependent analysis is not merely a
special-case curiosity: it is broad enough to cover an entire family (every kernel-based
regularization algorithm — KRR, SVR, SVMs, and beyond) uniformly, via a single stability
coefficient computation (Proposition 14.4) that is then specialized per algorithm just by
plugging in that loss's admissibility constant σ. Corollary 14.5's SVR bound is the
concrete payoff: a fully explicit, dimension-free generalization guarantee for a widely used
regression algorithm, with every constant (r, λ, m) traceable to the algorithm's own
hyperparameters, no VC-dimension or Rademacher-complexity computation required. Unlike Chapters
3-11, whose bounds are oblivious to howH is searched, algorithmic stability is the first
tool in the book that can, in principle, certify generalization for a hypothesis class too large
or poorly understood for a complexity-based bound to be informative, provided the algorithm
itself is stable. No prior art on the Prove2Me platform is faithful: GET /theorems?q=algorithmic+stability, q=uniform+stability return no hits; q=McDiarmid returns
only bounded_diff_martingale_two_sided (Boucheron-Lugosi-Massart's own two-sided
bounded-differences martingale inequality), which is McDiarmid's inequality's own proof engine
(the background result Theorem 14.2's proof applies), not any result of this chapter — a
different mathematical object entirely, not reused. All eleven items are drafted fresh.
Not formalized here: Corollary 14.6 (KRR bound), Lemma 14.7 (boundedness of kernel-regularization
hypotheses) and Corollary 14.8 (SVM bound). Corollary 14.6 is structurally identical to Corollary
14.5 (a different loss function's admissibility constant plugged into the same Proposition
14.4 + Theorem 14.2 chain) and adds no new formalization content beyond Corollary 14.5, already
drafted; Lemma 14.7 and Corollary 14.8 are omitted together, since 14.8's own statement needs
14.7's bound on ∣hS(x)∣ to compute its explicit M (unlike Corollary 14.5, which is given M
as a hypothesis) — a genuine additional formalization layer (the reproducing-kernel norm bound
∣hS(x)∣≤rB/λ) disproportionate to a single further corollary within this
mission's budget.
Difficulty
The chapter's central technical step is recognizing that β-stability plus the loss bound
M together give exactly the bounded-difference property McDiarmid's inequality needs, applied
to Φ(S)=R(hS)−R^S(hS) as a function of the sample: replacing one point of S changes
R(hS) by at most β (stability applied to the population loss, an expectation over z)
and changes R^S(hS) by at most β+M/m (stability on the m−1 shared points, plus
the full loss bound M/m on the one point that actually changed) — two different, asymmetric
arguments that must be combined correctly to get ∣Φ(S)−Φ(S′)∣≤2β+M/m, not merely
"stability implies boundedness" asserted directly. Proposition 14.4's own proof (not formalized
here beyond its statement) needs a generalized Bregman divergence to handle a possibly
non-differentiable convex loss — an extension of Bousquet-Elisseeff's original argument the book
credits to itself as novel — via the reproducing-kernel property and Cauchy-Schwarz to convert a
divergence bound into a bound on ∥h−h′∥K, then back into a pointwise loss bound.
Formalization scope
IsRKHSOf/IsMinimizer are restated locally in Stability, byte-identical to chunk
06-kernels's own copies (a draft item cannot import another chunk's draft module); H is an
abstract real inner-product space with an evaluation map ev : H → X → ℝ standing for "elements
of H are functions on X", the same device chunk 06's own RKHS formalization uses, since
Mathlib's abstract Hilbert spaces are not themselves spaces of functions. UniformlyStable fixes
the sample size m as part of the algorithm's type (A : (Fin m → X × Y) → (X → Y')), matching
the book's own standing convention of a fixed sample size m throughout the chapter.
Proposition 14.4 is stated pairwise — for any two samples differing by one point and any
minimizers of their respective regularized objectives, the pointwise loss bound holds — rather
than fixing a global choice-function algorithm A, since the book's own proof picks an arbitrary
minimizer of each objective without asserting uniqueness; Corollary 14.5 does fix a choice
function A (one minimizer per sample), since Theorem 14.2's own statement needs a single
algorithm evaluated across the whole product-measure sample space. No numerical constant in any
of the three theorems is altered from the book's own displayed form. A trivializing
formalization this mission avoids: stating Theorem 14.2 only for the strict per-hypothesis loss
bound (∀ h ∈ H, ∀ z, L_z(h) ≤ M) rather than the book's own weaker, algorithm-specific
condition (hbound, ∀ S, ∀ z, L_z(A S) ≤ M) — the weaker hypothesis is kept, exactly matching
the book's explicit statement that "a weaker condition suffices."
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 14.
O. Bousquet, A. Elisseeff, "Stability and generalization," Journal of Machine Learning
Research 2, 2002, 499-526.
M. Kearns, D. Ron, "Algorithmic stability and sanity-check bounds for leave-one-out
cross-validation," Neural Computation 11(6), 1999, 1427-1453.
Foundations of Machine Learning XI: Maximum Entropy Models and DualityTextbook
Motivation
Maximum entropy (Maxent) models are a widely used family of density-estimation algorithms:
given a sample and a set of features, they select the distribution that matches the empirical
feature averages while being otherwise as "agnostic" (close to a prior, usually uniform) as
possible — a principle that, notably, never requires specifying a parametric family of
distributions to search over. This mission formalizes the theorem that explains why this works
in practice: Maxent's primal optimization (over distributions, subject to feature-matching
constraints) is exactly dual to an unconstrained maximum-likelihood problem over a specific,
rich parametric family — the Gibbs distributions — even though the Maxent principle never
mentions that family at all.
Setting
For a sample S=(x1,…,xm) drawn i.i.d. from D over a finite set X, and a feature map
Φ:X→RN with ∥Φ∥∞≤r, the Maxent principle seeks
p∈Δ (the simplex of distributions over X) minimizing the relative entropy D(p∥p0)
to a prior p0, subject to ∥Ex∼p[Φ(x)]−Ex∼D^[Φ(x)]∥∞≤λ
(problem 12.7). Introducing the indicator function IK (0 on K, +∞ elsewhere) turns
this into the unconstrained primal objective F(p)=D~(p∥p0)+IC(Ep[Φ]) (Eq. 12.8),
with C the feature-constraint set. A Gibbs distribution with parameter w∈RN
is pw(x)=p0(x)ew⋅Φ(x)/Z(w), Z(w) the partition function (Eq. 12.9); its
associated dual objective is G(w)=m1∑ilogp0(xi)pw(xi)−λ∥w∥1
(Eq. 12.10) — note −m1∑ilogpw(xi) is exactly the empirical log-loss LS(w), so
maximizing G is minimizing an L1-regularized log-loss over the Gibbs family.
Formalization targets
Theorem 12.2 — the mission's goal (Maxent duality).supw∈RNG(w)=minpF(p).
Furthermore, letting p∗=argminpF(p) and d∗=supwG(w): for any ϵ>0 and any w
with ∣G(w)−d∗∣<ϵ, D(p∗∥pw)≤ϵ.
Theorem 12.3 (Maxent L1-regularization generalization bound, milestone). Fix δ>0.
Let w^ solve the L1-regularized dual (12.12) with
λ=2Rm(H)+rlog(2/δ)/(2m). Then, with probability at least 1−δ,
Theorem 12.2 is one of the most striking dualities in the book: the Maxent principle, phrased
purely in terms of closeness to a prior distribution, turns out to always produce a solution in
the Gibbs family — not because that family was ever specified, but because relative entropy is
the specific measure of closeness whose Fenchel conjugate is the log-partition function. This
explains a whole zoo of models (log-linear models, exponential families, Gaussian and bimodal
Gibbs distributions from quadratic features) as instances of a single duality theorem, and gives
a computationally friendlier route to the (constrained, infinite-if-X-is-large) primal problem
via the (unconstrained, N-dimensional) dual. The theorem's proof is a genuine application of
conditional (Fenchel) strong duality, not an unconditional fact — this is, per the chapter's own
brief, the sharpest trivialization risk in the entire mission series, since "strong duality
always holds for convex problems" is false in general, and a formalization skipping the book's
own qualification condition (λ>0, placing u0 in the interior of the constraint set)
would prove a different, potentially-false statement. No prior art on the platform is faithful:
GET /theorems?q=maximum+entropy returns no hits, and Mathlib's generic Fenchel-conjugate
machinery (Analysis/Convex/Conjugate) does not package the book's own specific qualification
conditions as a single reusable theorem matching Theorem B.39 — reusing it inside a proof
(not the audited statement) remains available to whoever proves this theorem later.
Not formalized here: Theorem 12.4 (a Bregman-divergence generalization of Theorem 12.2) and
Theorem 12.5 (its L2-regularized concrete special case). BRIEF.md itself flags Theorem 12.4
as possibly too heavy and offers Theorem 12.5 as an easier alternative; this mission omits both,
since even Theorem 12.5 requires a second, structurally parallel dual-objective-and-minimizer
formalization (for L2 rather than L1 regularization) — disproportionate to this mission's budget
once Theorem 12.2's own qualification-condition bookkeeping (the heaviest single item in this
mission series) is accounted for. §12.1 (density estimation without features: ML/MAP), §12.7
(coordinate descent), and §12.8-12.9 (Bregman-divergence extensions, L2-regularization in
general) are likewise out of scope, per BRIEF.md's own page-range restriction.
Difficulty
Theorem 12.2's proof is the book's own explicit application of the Fenchel duality theorem
(Theorem B.39, Appendix B) to the specific triple f(p)=D~(p∥p0), g(u)=IC(u),
Ap=∑xp(x)Φ(x) — every qualification condition (A a bounded linear map, u_0\in A(\mathrm{dom}f)\cap\mathrm{cont}(g), needing \lambda>0 to place u_0 in int(C)) must be
checked for this triple, not assumed generically; the conjugate computations themselves
(f^*(q)=\log\sum_xp_0(x)e^{q(x)}$ via Lemma B.37, g^(w)=E_{\hat D}[w\cdot\Phi]+\lambda|w|_1 via the dual-norm identity) are specific algebraic derivations, not immediate from abstract duality alone. The second clause's proof needs a further, non-obvious algebraic identity (G(w)-D(p^|p_0)+D(p^|p_w)expanding, via Hölder's inequality applied to the primal feasibility ofp^, to something \le0) that is not a restatement of the first clause but a separate argument built on top of it. Theorem 12.3's proof structurally mirrors chunk 04's SRM bound (bounding L_D(\hat w)-L_S(\hat w)via Hölder's inequality and the Rademacher-complexity feature-concentration bound of Eq. 12.5, then using\hat w`'s optimality twice), but is applied
to the log-loss of a Gibbs distribution rather than a generic bounded loss.
Formalization scope
MaxEntPrimalObjective uses EReal (the extended reals) so that the book's own +\infty
values (from I_K, \tilde D) are represented exactly, matching the chapter's own explicit use
of an extended-real-valued indicator function rather than a soft penalty — a trivializing
formalization this mission avoids is silently replacing +\infty with a large real sentinel,
which would misstate a convex-analysis object whose entire role in the proof is its infinite
value outside the feasible/simplex set. hlam : 0 < lam is a genuine load-bearing hypothesis in
the goal theorem, matching the book's own use of \lambda>0 to invoke Theorem B.39's
qualification condition — not a free convexity assumption; this is the mission's central
faithfulness guard against the chapter's own named trivialization risk. EmpiricalRademacherComplexity/
RademacherComplexity are restated locally, byte-identical to chunks 05-svm/07-boosting's
own copies (a draft item cannot import another chunk's draft module). p^* in the goal theorem
and \hat w in Theorem 12.3 are both quantified via explicit hypotheses (IsLeast, a
minimizer inequality) rather than assumed to exist unconditionally, matching the book's own "let
p^*=..."/"let \hat w be a solution of..." phrasing without asserting existence or uniqueness
beyond what the book itself asserts. No numerical constant in either theorem is altered from
the book's own displayed form.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 12, §12.1-12.6.
E. T. Jaynes, "Information theory and statistical mechanics," Physical Review 106(4), 1957,
620-630.
S. Della Pietra, V. Della Pietra, J. Lafferty, "Inducing features of random fields," IEEE
Transactions on Pattern Analysis and Machine Intelligence 19(4), 1997, 380-393.
Foundations of Machine Learning X: Regression and Rademacher Complexity BoundsTextbook
Motivation
Every generalization bound presented so far in this series is for classification, where the
error of a prediction is binary (correct or not). Regression asks a different question:
predictions are real-valued, and error is measured by the magnitude of the deviation from
the true label, via a loss function L. Chapter 11 develops generalization theory for bounded
regression, showing that the same two complexity measures used for classification —
Rademacher complexity and a VC-dimension analogue — extend naturally, once the loss function
itself is folded into the machinery via a Lipschitz-contraction argument (Rademacher route) or
a reduction to classification via level-set thresholding (pseudo-dimension route).
Setting
A regression hypothesis h:X→ℝ is scored by a loss L:ℝ×ℝ→ℝ against a joint distribution D
on X×ℝ (the stochastic scenario, since regression labels are rarely exactly reproducible);
R(h) = E_{(x,y)~D}[L(h(x),y)] (Eq. 11.1) and R̂_S(h) = (1/m)∑L(h(x_i),y_i) (Eq. 11.2). For
a finite hypothesis set, Theorem 11.1 gives a Hoeffding/union-bound guarantee directly, the
regression analogue of chunk 02-pac's finite-hypothesis bound. For infinite H, §11.2.2
develops a Rademacher-complexity route: Proposition 11.2 shows that if L is µ-Lipschitz in
its first (predicted-value) argument, the Rademacher complexity of the loss-composed family
G = {(x,y)↦L(h(x),y) : h∈H} is controlled by µ times H's own Rademacher complexity, via
Talagrand's contraction lemma (chunk 05-svm's Lemma 5.7); Theorem 11.3 combines this with
chunk 03's Theorem 3.3 to give the chapter's headline bound. §11.2.3 develops an independent,
purely combinatorial route: pseudo-dimension (Definition 11.5), a real-valued analogue of
VC-dimension defined via threshold-witnessed shattering (Definition 11.4, restated via its own
Eq. 11.3 as the VC-dimension of a thresholded indicator family); Theorem 11.8 gives a
pseudo-dimension generalization bound by reducing regression to a family of classification
problems (one per threshold t), using the tail-integral identity Eq. 11.5.
Formalization targets
Theorem 11.1 (milestone). For L bounded by M and H finite: for any δ>0, with
probability at least 1-δ, for all h∈H: R(h) ≤ R̂_S(h) + M√((log|H|+log(1/δ))/(2m)).
Proposition 11.2 (milestone). For L non-negative, bounded by M, µ-Lipschitz in its
first argument: for any sample S, R̂_S(G) ≤ µR̂_S(H).
Theorem 11.3 — the mission's goal. Under Proposition 11.2's hypotheses on L: for any
δ>0, with probability at least 1-δ, for all h∈H: E[L(h(x),y)] ≤ (1/m)∑L(h(x_i),y_i) + 2µR_m(H) + M√(log(1/δ)/(2m)), and also with 2µR̂_S(H) + 3M√(log(2/δ)/(2m)).
Theorem 11.8 (milestone). For Pdim(G)=d, L non-negative bounded by M: for any
δ>0, with probability at least 1-δ over a sample of size m, for all h∈H: R(h) ≤ R̂_S(h) + M√(2d log(em/d)/m) + M√(log(1/δ)/(2m)).
Significance
Theorem 11.3 is the chapter's own choice of headline result (§11.2's stated goal is to show
"how the Rademacher complexity bounds of theorem 3.3 can be used to derive generalization
bounds for regression"), and its proof genuinely reuses two pieces of prior machinery from
this series — chunk 03's Theorem 3.3 and chunk 05's Talagrand's-lemma-style contraction —
combined via a new observation (Proposition 11.2) specific to loss-composed families, not a
restatement of either. Theorem 11.8 is the chapter's second, structurally independent
technique: its em/d bound parallels chunk 03's Corollary 3.19 (both ultimately reduce to a
VC-dimension-style growth-function argument), but the reduction itself — regression to a
continuum of threshold classification problems, via the Lebesgue-integral tail identity Eq.
(11.5) applied to |R(h)-R̂_S(h)| — is genuinely new content for this book, and pseudo-dimension
has no prior art on the platform or in Mathlib. No prior art exists for this chapter's overall
content either: GET /theorems?q=generalization%20bound%20regression and
GET /theorems?q=pseudo-dimension both return zero hits.
Difficulty
Proposition 11.2's proof needs Talagrand's contraction lemma applied with the Lipschitz
constant taken in the first argument of L only — the predicted value h(x_i), holding the
true label y_i fixed — exactly the pitfall BRIEF.md names: a loss Lipschitz in the wrong
argument, or in both arguments jointly, would not license this step. Theorem 11.8's proof is
the chapter's most involved: it defines, for every h∈H and threshold t≥0, a classifier
c(h,t):(x,y)↦1_{L(h(x),y)>t}, bounds |R(h)-R̂_S(h)| by M·sup_{t∈[0,M]}|R(c(h,t))- R̂_S(c(h,t))| via the tail-integral identity, and then applies a VC-dimension-style
classification bound (Corollary 3.19) to the family of thresholded classifiers — whose
VC-dimension is, by Eq. (11.3), exactly Pdim(G) by construction. A formalization that
conflated pseudo-dimension with ordinary VC-dimension, or reused chunk 03's HasVCDim
definition by relabeling, would misrepresent this chapter's genuinely different (real-valued,
threshold-witnessed) combinatorial notion — precisely the pitfall BRIEF.md flags.
Formalization scope
Y := ℝ throughout (the book's own "Y a measurable subset of ℝ"), a harmless
simplification consistent with every hypothesis, loss and Lipschitz condition in this chapter
being stated for real-valued scores and labels. EmpiricalRademacherComplexity/
RademacherComplexity restate chunk 03-rademacher-vc's Definitions 3.1/3.2 locally, since a
draft item cannot import another chunk's draft module. Shatters/PseudoDim are formalized
via the book's own equivalent reformulation (Eq. 11.3, the thresholded-indicator form), rather
than the sign-function form of Definition 11.4 directly, since the two coincide except at a
measure-zero boundary the book itself does not address; PseudoDim mirrors chunk 03's
HasVCDim Prop-valued pattern (does not cover Pdim(G)=+∞; every consuming theorem takes it
as an explicit hypothesis) but is a structurally distinct definition built on Shatters, never
a relabeling of HasVCDim, per BRIEF.md's pitfall note. Proposition 11.2's and Theorem
11.3's Lipschitz hypothesis (hLlip) is stated with the true label y' universally quantified
outside the two-point comparison y1, y2 (the predicted values), matching "for any fixed
y' ∈ Y, y ↦ L(y,y') is µ-Lipschitz" exactly — Lipschitzness in the first argument only,
per BRIEF.md's pitfall note. RademacherComplexity (Measure.map Prod.fst D) H m gives the
book's R_m(H) (H's Rademacher complexity under the marginal sampling distribution of the
inputs x, i.e. D's first marginal). No numerical constant is altered from the book in any
of the four theorems.
Not formalized: the L_p-loss worked example following Theorem 11.3's proof (an instantiation
of the general theorem for a specific loss family, not a separate numbered theorem); Theorem
11.6 and Theorem 11.7 (worked pseudo-dimension examples for hyperplanes and vector spaces,
background/illustration rather than the chapter's general machinery — drafting only these
examples instead of the general Theorem 11.8 would be this chapter's trivializing
formalization); the two-sided variant of Theorem 11.1 mentioned immediately after its proof
(an unnumbered remark, not a separately displayed/numbered theorem); and all of §11.3 (linear
regression, kernel ridge regression, SVR, Lasso and their online variants), which is
applications-heavy per BRIEF.md's chapter restriction to §11.1-11.2.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 11 (§11.1-11.2).
D. Haussler, "Decision theoretic generalizations of the PAC model for neural net and other
learning applications," Information and Computation 100(1), 1992 (pseudo-dimension's
origin).
D. Pollard, Convergence of Stochastic Processes, Springer, 1984 (the tail-integral
identity Eq. 11.5's classical antecedent).
Foundations of Machine Learning VIII: Multi-Class Classification and the Margin BoundTextbook
Motivation
Every generalization bound in chapters 2-5 is for binary classification. Most real-world
classification problems have more than two classes, and the number of classes can itself be
in the hundreds or thousands (topic classification, speech recognition). Chapter 9 extends the
margin-based generalization theory of chapter 5 (SVMs) to this multi-class, mono-label setting,
using the same Rademacher-complexity machinery as chunk 03-rademacher-vc, but with a new
combinatorial ingredient — bounding the Rademacher complexity of a family built by taking a
pointwise maximum over several hypothesis sets — needed because a multi-class prediction is
itself an argmax over per-class scores.
Setting
A multi-class hypothesis is a scoring function h:X×Y→R with Y={1,…,k}
(mono-label case); the predicted label is argmaxyh(x,y), and the margin
ρh(x,y)=h(x,y)−maxy′=yh(x,y′) (p. 215) is negative exactly when h misclassifies
(x,y). The empirical margin loss R^S,ρ(h) (Eq. 9.5) uses the same margin-loss
function Φρ (Definition 5.5) as chunk 05-svm, restated locally here. Π1(H)={x↦h(x,y):y∈Y,h∈H} (p. 217) projects a multi-class hypothesis set onto ordinary
real-valued functions on X — the object the chapter's Rademacher-complexity bound actually
controls, since H⊆RX×Y has no norm of its own without such a
projection. Lemma 9.1 is a purely combinatorial tool: the empirical Rademacher complexity of a
family built by taking the pointwise max over l hypothesis sets is bounded by the sum of
their individual empirical Rademacher complexities — used to control the argmax structure of a
multi-class prediction. Theorem 9.2 combines this with chunk 03's Rademacher-complexity
generalization machinery (Theorem 3.3) to give the chapter's margin bound. Proposition 9.3 and
Corollary 9.4 specialize this to kernel-based hypotheses, where each class has its own weight
vector in a reproducing kernel Hilbert space and the k weight vectors are jointly constrained
by an Lp-type group norm ∥W∥H,p≤Λ.
Formalization targets
Lemma 9.1 (milestone). For F1,…,Fl hypothesis sets in RX, l≥1, and
G={max{h1,…,hl}:hi∈Fi}: R^S(G)≤∑j=1lR^S(Fj).
Theorem 9.2 — the mission's goal. For H⊆RX×Y, Y={1,…,k},
fix ρ>0. For any δ>0, with probability at least 1−δ, for all h∈H:
R(h)≤R^S,ρ(h)+ρ4kRm(Π1(H))+2mlog(1/δ).
Proposition 9.3 (milestone). For a PDS kernel K with feature map Φ and
K(x,x)≤r2: Rm(Π1(HK,p))≤r2Λ2/m.
Corollary 9.4 (milestone). Under Proposition 9.3's hypotheses, fix ρ>0. For any
δ>0, with probability at least 1−δ, for all h∈HK,p: R(h)≤R^S,ρ(h)+4kr2Λ2/ρ2/m+log(1/δ)/(2m).
Significance
Theorem 9.2 is the multi-class generalization of chunk 05-svm's Theorem 5.8, and its proof is
the chapter's genuine new technique rather than a restatement: it needs a k-way application of
Lemma 9.1 (once for the argmax structure of the margin, once summing over the k possible
labels), which is exactly where the 4k factor comes from. Corollary 9.4 is the direct
theoretical basis for the multi-class SVM algorithm the chapter derives next (§9.3.1): the
displayed dual optimization problem literally minimizes the right-hand side of the corollary's
bound. No prior art exists on the platform: GET /theorems?q=multi-class%20classification
returns zero hits, and chunk 03's Rademacher-complexity machinery (needed by the proof route)
is a draft, not reusable, per the "drafts cannot import drafts" rule.
Difficulty
Lemma 9.1's proof is a genuine two-function argument (max as 21(h1+h2+∣h1−h2∣),
Talagrand's lemma applied to ∣⋅∣) generalized to l functions by induction, not a
one-line consequence of chunk 03's single-hypothesis-set bound. Theorem 9.2's own proof
(PDF pp. 234-236) is the chapter's most involved: it introduces an auxiliary margin function
ρθ,h with a free parameter θ later fixed to 2ρ, splits the resulting
Rademacher complexity into a "diagonal" term (bounded via a further one-hot decomposition
across the k classes, giving the first factor of k) and a "off-diagonal" term bounded via
Lemma 9.1 (giving the second factor, folded into the same 4k constant). A formalization that
stated Theorem 9.2 for H itself rather than Π1(H), or that treated k as an unrelated
free constant rather than the actual number of classes, would misstate the theorem — precisely
the pitfall BRIEF.md names for this chapter. Proposition 9.3's proof is a clean
Cauchy-Schwarz/Jensen argument in the RKHS but needs the Lp-group-norm hypothesis class
HK,p stated with its exact footnote definition (PDF p. 236), not a simplified p=2
special case.
Formalization scope
GeneralizationError, EmpiricalRademacherComplexity and RademacherComplexity are restated
locally in this chunk's MultiClass namespace (the last two identical in content to chunk
03-rademacher-vc's own copies); MarginLossFunction restates chunk 05-svm's Definition 5.5
(the same function, needed here for this chapter's own EmpiricalMarginLoss); IsPDS
restates chunk 06-kernels's PDS-kernel definition. All are duplicated rather than imported
since a draft item cannot import another chunk's draft module, and none of 03, 05, 06 is
listed as reusable in missions/README.md's "Published definitions" table at the time of this
session. GeneralizationError is formalized via the book's own established equivalence "h
misclassifies (x,y) iff ρh(x,y)≤0" (the form Theorem 9.2's own proof displays and
works with), rather than via an explicit argmax classifier construction — checked as
faithful, not a weakening, since it is exactly the quantity the chapter's proof bounds.
MarginFunction's ⨆_{y'≠y} is a real supremum rather than a Finset.sup', avoiding a
nonempty-finset side proof at definition time; every consuming theorem supplies 2 ≤ k
(Y = Fin k) to guard it against trap 5. MaxFamily's index type is Fintype+Nonempty
rather than a Finset-cardinality parameter l, a harmless generalization matching "l ≥ 1
hypothesis sets" via Nonempty. IsPDS's feature map Φ and its defining property
K(x,y) = ⟪Φ(x),Φ(y)⟫ are supplied as hypotheses to the two kernel theorems rather than as a
separate "feature mapping associated to a kernel" definition — the book itself treats this as
a given correspondence, not a construction. No numerical constant is altered: 4k/ρ and
log(1/δ) in Theorem 9.2, r²Λ²/m in Proposition 9.3, and 4k and r²Λ²/ρ²/m in Corollary
9.4 are exactly as displayed.
Not formalized: §9.1's discussion of the multi-label case (Eq. 9.2/9.3, the Hamming-distance
risk) and Eq. 9.4 (empirical Hamming error) — background for a case this chapter's own
generalization-bound section (§9.2) does not cover (the mono-label case only); the multi-class
SVM primal/dual optimization problems (§9.3.1, an algorithm derived from Corollary 9.4, not a
generalization-theoretic theorem); AdaBoost.MH (§9.3.2, a boosting algorithm, analyzed via a
convex-surrogate argument rather than the Rademacher-complexity route this mission formalizes);
and the uniform-over-ρ extension mentioned at the end of the Theorem 9.2 proof (an
unnumbered remark referencing Theorem 5.9's technique from a different chapter, not restated
here). Drafting only the algorithmic consequences (the multi-class SVM's optimization problem)
in place of the generalization bounds themselves would be this chapter's trivializing
formalization.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 9.
V. Koltchinskii, D. Panchenko, "Empirical margin distributions and bounding the generalization
error of combined classifiers," Annals of Statistics 30(1), 2002 (Lemma 9.1's technique).
K. Crammer, Y. Singer, "On the algorithmic implementation of multiclass kernel-based vector
machines," JMLR 2, 2001 (the multi-class SVM algorithm §9.3.1 derives).
Foundations of Machine Learning VII: On-Line Learning and On-Line-to-Batch ConversionTextbook
Motivation
Every guarantee in the preceding chapters assumes a fixed distribution and i.i.d. sampling.
On-line learning drops both assumptions: an algorithm processes one example at a time, in an
adversarial (worst-case) sequence, and is judged by regret against the best fixed comparator
in hindsight rather than by generalization error. This chapter develops the theory for this
setting — mistake bounds and regret bounds for prediction with expert advice, a margin-based
mistake bound for the Perceptron — and then closes a conceptual gap: since on-line algorithms
need no distributional assumption, can their guarantees be converted into ordinary
distributional (batch) generalization guarantees when the data does happen to be i.i.d.? The
on-line-to-batch conversion theorem answers yes, using nothing but an Azuma's-inequality
martingale argument on the sequence of hypotheses the algorithm actually produces.
Setting
At round t, an on-line algorithm receives x_t, predicts ŷ_t, receives the true label
y_t, and incurs loss L(ŷ_t,y_t); its regret R_T (Eq. 8.1) compares its cumulative loss to
the best fixed action's in hindsight. §8.2 develops this for prediction with expert advice: the
Halving algorithm (realizable case), Weighted Majority and its randomized version RWM
(zero-one loss, Theorem 8.4's L_T ≤ log(N)/(1-β) + (2-β)L_T^min, proved by the chapter's
recurring potential-function technique applied to W_t = ∑_i w_{t,i}), and the Exponential
Weighted Average algorithm (convex losses). §8.3.1 analyzes the Perceptron, a linear
classification algorithm whose margin-based mistake bound (Theorem 8.8, separable case; the
non-separable Theorem 8.11, restated here, in terms of an arbitrary comparator v's hinge
losses) depends only on the normalized margin, not the ambient dimension. §8.4 shows that
averaging the hypotheses h_1,…,h_T an on-line algorithm produces while processing an i.i.d.
sample S yields a hypothesis with controlled true risk: Lemma 8.14 bounds the average of
the per-round risks R(h_t) by the average on-line loss via a martingale argument on
V_t = R(h_t) - L(h_t(x_t),y_t), and Theorem 8.15 upgrades this, via the loss's convexity, to
a bound on the risk of the averaged hypothesis (1/T)∑h_t.
Formalization targets
Theorem 8.4 (milestone). Fix β∈[1/2,1). For any T≥1: L_T ≤ log(N)/(1-β) + (2-β)L_T^min; for β=max{1/2,1-√(log(N)/T)}: L_T ≤ L_T^min + 2√(T log N).
Theorem 8.11 (milestone).M ≤ inf_{ρ>0,‖v‖₂≤1}[(r/ρ+√(r²/ρ²+4‖l_ρ‖₁))/2]², where
l_ρ=(l_t)_{t∈I}, l_t=max{0,1-y_t(v·x_t)/ρ}.
Lemma 8.14 (milestone). For any δ>0, with probability at least 1-δ:
(1/T)∑_tR(h_t) ≤ (1/T)∑_tL(h_t(x_t),y_t) + M√(2log(1/δ)/T).
Theorem 8.15 — the mission's goal (first inequality). Under Lemma 8.14's hypotheses, with
L additionally convex in its first argument: for any δ>0, with probability at least
1-δ: R((1/T)∑_th_t) ≤ (1/T)∑_tL(h_t(x_t),y_t) + M√(2log(1/δ)/T).
Significance
Theorem 8.15 is the chapter's conceptual capstone: it is the only bridge in the whole book
between the adversarial on-line-learning framework and the distributional PAC/statistical
framework every other chapter develops, and its proof needs nothing beyond Lemma 8.14 plus
convexity — no new machinery, just the right observation about the loss's structure. Theorem
8.4 is the chapter's cleanest instance of its recurring potential-function proof technique
(reused, with variations, for Theorems 8.3, 8.6 and 8.7), and — checked against the platform's
existing OnlineConvexOpt.Introduction.randomized_weighted_majority_mistake_bound (Hazan
series) — a genuinely different result from what is already on the platform: that lemma
bounds a mistake count with a (1+ε) multiplier, this bounds the RWM algorithm's own
weighted-mixture loss with a 1/(1-β) term and a distinct optimal-β substitution,
confirming BRIEF.md's assessment that the two are close but not interchangeable. Theorem
8.11 is the non-realizable generalization of the separable-case Perceptron bound (Theorem 8.8)
that motivates soft-margin algorithms generally, expressed via an arbitrary comparator's hinge
loss rather than assuming perfect separability. No prior art exists for the chapter's other
content: GET /theorems?q=online%20to%20batch returns zero hits, and GET /theorems?q=perceptron returns only an unrelated neural-network topology result.
Difficulty
Theorem 8.4's proof (mirrored by Theorem 8.3's WM analogue) derives matching upper and lower
bounds on the potential W_t, combines them via a logarithm, and substitutes a specific
optimal β found by differentiating the resulting bound — a genuine two-step optimization
argument, not a direct algebraic identity. Theorem 8.11's proof solves a quadratic inequality
in √M after summing the hinge-loss-defining inequalities over the update set I and
invoking the Cauchy-Schwarz step already used in Theorem 8.8's proof; keeping the inf over
both ρ and v in the statement (not fixing them, per BRIEF.md's pitfall note) is what
makes this a genuine bound rather than a bound for one arbitrary choice. Lemma 8.14's proof is
an application of Azuma's inequality (the book's own Theorem D.7) to the martingale difference
sequence V_t = R(h_t) - L(h_t(x_t),y_t), which requires h_t to be measurable with respect
to the history strictly before round t — the on-line algorithm's hypothesis at round t
must not depend on the pair drawn at that same round, per BRIEF.md's pitfall note. Theorem
8.15's step beyond Lemma 8.14 is the passage from the average of T individual risks to the
risk of the averaged hypothesis, licensed by Jensen's inequality under the loss's convexity in
its first argument — dropping convexity breaks exactly this step, not merely weakening a
constant.
Formalization scope
GeneralizationError restates chunk 11-regression's Eq. (11.1) convention locally (Y := ℝ,
consistent with that chunk's own harmless simplification), needed here since Theorem 8.15
requires averaging hypotheses into a single real-valued function. OnlineHypothesis A S t is
formalized so that its type signature itself enforces history-adaptedness: the on-line
algorithm A : (n:ℕ) → (Fin n → X × ℝ) → (X → ℝ) is a function of the prefix of the sample
seen so far, and OnlineHypothesis A S t applies it only to S's first t pairs — this is
what licenses Azuma's inequality's martingale-difference argument (the conditional-mean-zero
property of V_t), per BRIEF.md's pitfall note. Revision (2026-09-19), correcting an
earlier claim in this section: history-adaptedness does not by itself guard against
GeneralizationError's Bochner integral silently junking to 0 for a non-measurable
hypothesis (a distinct property — whether h_t, as a function of x, is Measurable — from
whether h_t depends on round t's own draw). Moderation found this a live gap in both Lemma
8.14 and Theorem 8.15's drafted statements; both now carry an explicit hAmeas/hLmeas
hypothesis in addition to the history-adapted type signature.
RWM's w_{t,i}, W_t, p_{t,i}, L_t, L_T, L_{T,i}, L_T^min are modeled as their own
recursively-defined algorithm state (mirroring, but never substituting into, chunk
07-boosting's AdaBoost pattern), matching this chapter's own loss-based (not mistake-count)
quantities, per BRIEF.md's pitfall note distinguishing them from AdaBoost's and RWM-mistake
variants. The Perceptron's w_t, update-index set I, and M = |I| are modeled the same way,
using Eq. (8.23)'s equivalent sign-agreement update rule (the book's own reformulation of
Figure 8.6's sgn-based rule). Theorem 8.11's inf_{ρ>0,‖v‖₂≤1} is a genuine nested restricted
infimum (⨅ ρ ∈ Set.Ioi 0, ⨅ v ∈ Metric.closedBall 0 1, …), not a bound instantiated at fixed
ρ, v, per BRIEF.md's explicit pitfall note. No numerical constant is altered from the
book in any of the four theorems.
Not formalized: Theorems 8.1-8.3 (Halving and WM mistake bounds — the chapter's warm-up
results, superseded in content by the more general RWM/EWA theorems that follow), Theorem 8.5
(a matching lower bound, a distinct impossibility result rather than an algorithm's guarantee),
Theorems 8.6-8.7 (Exponential Weighted Average regret bounds — a third algorithm with its own
potential-function proof, out of scope per BRIEF.md's restriction to §8.2's Halving/WM/RWM),
Theorems 8.8-8.10 (the Perceptron's separable-case bound and its leave-one-out-based expected
generalization bounds, both superseded in generality by Theorem 8.11 for this mission's
purposes), Theorem 8.12 (Perceptron's L²-norm hinge-loss bound, the book's own note that it is
implied by, and looser than, Theorem 8.11's L¹-norm bound), the dual/kernel Perceptron (an
equivalent reformulation, not new generalization content), and Theorem 8.15's second displayed
inequality (a regret-form corollary depending on the regret decomposition of the surrounding
discussion, not drafted per BRIEF.md's own recommendation to commit to the first inequality
as the goal). §8.3.2 (Winnow) and §8.5 (the game-theoretic connection) are out of scope per
BRIEF.md's chapter restriction.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 8 (§8.2, §8.3.1, §8.4).
N. Littlestone, M. K. Warmuth, "The weighted majority algorithm," Information and
Computation 108(2), 1994 (WM/RWM's origin).
F. Rosenblatt, "The perceptron: a probabilistic model for information storage and
organization in the brain," Psychological Review 65(6), 1958 (the Perceptron algorithm).
Y. Freund, R. E. Schapire, "Large margin classification using the perceptron algorithm,"
Machine Learning 37(3), 1999 (Theorem 8.11's hinge-loss mistake bound).
Foundations of Machine Learning VI: AdaBoost and Margin TheoryTextbook
Motivation
Weak learning — a base classifier only slightly better than random guessing — is easy to come
by; strong learning, in the PAC sense of Chapter 2, is not. Boosting is the technique that
turns the first into the second: combine many weak classifiers, each trained on a reweighted
version of the sample that emphasizes previously misclassified points, into a single strong
ensemble. AdaBoost, the algorithm this chapter studies, does this with a specific, closed-form
weighting rule, and comes with two distinct theoretical guarantees: its training error
decreases exponentially fast in the number of rounds (Theorem 7.2), and — more surprisingly —
its test error can keep improving even after the training error has already reached zero, an
empirical phenomenon that Chapter 3's VC-dimension bound cannot explain at all (it predicts
overfitting for large numbers of rounds) but that a margin-based analysis, structurally
identical to Chapter 5's SVM theory, does (Theorem 7.7). This mission formalizes both routes.
Setting
AdaBoost (Figure 7.1) takes a labeled sample S=((x1,y1),…,(xm,ym)) with
yi∈{−1,+1} and a base classifier set H⊆{−1,+1}X, and runs for T rounds.
It maintains a distribution Dt over the sample indices, starting uniform (D1(i)=1/m); at
round t it selects a base classifier ht with small Dt-weighted error
εt=Pri∼Dt[ht(xi)=yi], sets αt=21logεt1−εt and Zt=2εt(1−εt), and reweights:
Dt+1(i)=Dt(i)exp(−αtyiht(xi))/Zt. After T rounds it returns
f=∑t=1Tαtht; its normalized version is fˉ=f/∑tαt. Since
εt<1/2 makes αt>0, fˉ is a genuine convex combination of base
classifiers, i.e. a member of the convex hullconv(H)={∑kμkhk:μk≥0,hk∈H,∑kμk≤1} (Eq. 7.12). The chapter reuses Chapter 5's confidence-margin
apparatus (empirical margin loss R^S,ρ, Rademacher complexity R^S/Rm) to
analyze fˉ's generalization.
Formalization targets
Theorem 7.2 (AdaBoost empirical error bound, milestone). The empirical (zero-one) error of
f satisfies R^S(f)≤exp(−2∑t=1T(1/2−εt)2), and, if
γ≤1/2−εt for all t, R^S(f)≤exp(−2γ2T): training error
decays exponentially in T whenever every round beats random guessing by a fixed margin
(the "edge" γ).
Lemma 7.4 (milestone).R^S(conv(H))=R^S(H): the convex hull of a
hypothesis set, though generally much larger, has exactly the same empirical Rademacher
complexity as the set itself.
Corollary 7.5 (Ensemble Rademacher margin bound, milestone). For H a set of real-valued
functions and ρ>0, with probability at least 1−δ, every h∈conv(H)
satisfies R(h)≤R^S,ρ(h)+ρ2Rm(H)+log(1/δ)/(2m) (and the
empirical-complexity analogue with an extra additive 3log(2/δ)/(2m) term) — this
is Theorem 5.8's margin bound applied to conv(H), then rewritten via Lemma 7.4 so its
complexity term is H's own, not the (much larger) convex hull's.
Theorem 7.7 — the mission's goal. Assume εt<1/2 for every t∈[T] (so
αt>0). Then for any ρ>0,
R^S,ρ(fˉ)≤2Tt=1∏Tεt1−ρ(1−εt)1+ρ.
Significance
Theorem 7.7's bound is what makes margin theory a genuine explanation of AdaBoost's empirical
behavior: combined with Corollary 7.5 (applied to fˉ∈conv(H)), it shows that if
AdaBoost's edge stays bounded away from zero, the empirical margin loss at a fixed ρ
decreases exponentially in T while the generalization bound's complexity term does not depend
on T at all — so continuing to boost past zero training error can still shrink the true risk,
by growing the margin on the training points that are already correctly classified. This
resolves the puzzle that opens §7.3.1: AdaBoost's test error is empirically observed to keep
decreasing well after its training error hits zero, which the chapter's own earlier
VC-dimension bound on FT (Eq. 7.9, growing as O(dTlogT)) predicts should
eventually overfit, not improve. No prior art on the Prove2Me platform is faithful:
GET /theorems?q=boosting and q=AdaBoost return no hits; this chunk's Rademacher-complexity
apparatus is restated locally (a draft item cannot import chunk 05-svm's or 03-rademacher-vc's
own draft copies) rather than reused, matching the precedent those chunks' own STATUS.md
records recommend for every later chunk needing the same machinery.
Not formalized here: Theorem 7.6 (the VC-dimension-based ensemble margin bound, a direct
corollary of Corollary 7.5 via chunk 03's VC-dimension apparatus) — restating 03's own
machinery a second time for a single further corollary is disproportionate within this
mission's budget, and the chapter's actual capstone targets the sharper, dimension-free
Rademacher-complexity route (Theorem 7.7) instead. Also out of scope: §7.2.2's coordinate-
descent equivalence, §7.2.3's practical (decision-stump) use, and §7.3.4-7.3.5's margin-
maximization LP and game-theoretic interpretation — discussion sections with no numbered result
feeding the goal's proof.
Difficulty
Theorem 7.2's proof needs the telescoping identity DT+1(i)=e−yif(xi)/(m∏tZt)
(Eq. 7.2), obtained by repeatedly unfolding the recursive weight update — a genuine induction on
t, not a one-line algebraic manipulation — before the elementary inequality 1u≤0≤e−u turns the empirical error into a telescoping product of the Zt's, each of which is
then re-expressed in closed form via a case split on yiht(xi)=±1. Theorem 7.7's proof
reuses the same identity but with an added margin-shift term ρ∥α∥1 inside the
exponential, requiring the same telescoping machinery plus a separate accounting of
eρ∑tαt against the product of [(1−εt)/εt]ρ
factors coming from each αt's own closed form — a proof that shares its main structural
step with Theorem 7.2 but is not a trivial corollary of it. Corollary 7.5's proof is Lemma 7.4
(itself a careful supremum-exchange argument using the dual-norm characterization of ℓ1,
not a routine calculation) composed with Theorem 5.8, applied to the specific set
conv(H) rather than a generic hypothesis class — a formalization that stated the
corollary only for a "sufficiently nice" abstract class, without deriving it from Lemma 7.4's
convex-hull identity, would be proving a different, weaker-provenance statement.
Formalization scope
WeightedError, AdaBoostAlpha, AdaBoostNormalizer, AdaBoostDist, AdaBoostEpsilon,
AdaBoostEnsemble, AdaBoostNormalizedEnsemble, EmpiricalError and ConvHull are new,
capturing AdaBoost as an actual algorithm (a genuine recursion on the round index, closed under
Definitions.Def_FoundationsML_Boosting_AdaBoostDist's own recursive equation) rather than an
unspecified "boosting procedure" — the trivialization trap BRIEF.md names for this chapter.
AdaBoostDist takes the sequence of base classifiers actually selected at each round,
h : ℕ → X → ℝ, as external data rather than deriving it via an argmin over H; this is
checked in SELF_REVIEW.md to drop no content either milestone or the goal theorem's statement
actually needs, since neither invokes h_t's optimality, only the weighted error ε_t it
produces under AdaBoost's own distribution D_t. PhiRho, EmpiricalMarginLoss,
MarginGeneralizationError, EmpiricalRademacherComplexity and RademacherComplexity are
restated locally, byte-identical to chunk 05-svm's own copies of Definitions 5.5, 5.6, 2.1
(specialized), 3.1, 3.2 (a draft item cannot import another chunk's draft module); this
duplication collapses once 05-svm and 03-rademacher-vc are uploaded and listed in
missions/README.md's "Published definitions" table. No numerical constant in any of the four
theorems is altered from the book's own displayed form. A trivializing formalization this
mission avoids: stating Theorem 7.2/7.7 for an arbitrary sequence of error rates
ε1,…,εT satisfying εt<1/2, disconnected from any actual
algorithm — AdaBoostEpsilon instead ties every ε_t to the weighted error AdaBoost's own
recursively defined D_t assigns to its own selected h_t, so the bound is provably about
this algorithm's error trajectory, not an arbitrary one.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 7.
Y. Freund, R. E. Schapire, "A decision-theoretic generalization of on-line learning and an
application to boosting," Journal of Computer and System Sciences 55(1), 1997, 119-139.
R. E. Schapire, Y. Freund, P. Bartlett, W. S. Lee, "Boosting the margin: a new explanation for
the effectiveness of voting methods," The Annals of Statistics 26(5), 1998, 1651-1686.
High-Dimensional Probability VIII: Dudley's Integral InequalityTextbook
Motivation
Many questions in high-dimensional probability reduce to bounding the expected supremum of a
random process (Xt)t∈T — the maximum, over an entire indexed family of random variables,
of how large any one of them can get. When T is finite this is routine (a union bound over
∣T∣ terms suffices), but the interesting cases have T infinite, even uncountable: a supremum
over a continuum of test functions, a norm expressed as a supremum over a sphere, or an empirical
process indexed by a whole class of functions. A naive union bound is unusable here, since ∣T∣
is infinite.
R. M. Dudley's 1967 entropy bound (R. M. Dudley, The sizes of compact subsets of Hilbert space
and continuity of Gaussian processes, Journal of Functional Analysis 1 (1967), 290–330) resolved
this for Gaussian processes, controlling the expected supremum purely in terms of the metric
entropy of T — how many balls of radius ε are needed to cover T, at every scale
ε. The technique behind the proof, chaining, builds a sequence of increasingly
fine finite approximations to T and telescopes the resulting bounds; it is one of the central
tools of the field, reused throughout empirical process theory, statistical learning theory (via
Vapnik-Chervonenkis theory), and non-asymptotic random matrix theory. This mission formalizes the
chapter's generalization of Dudley's bound beyond Gaussian processes, to any process with
sub-gaussian increments, together with the purely combinatorial Sauer-Shelah lemma that the
chapter's applications to statistical learning theory build on.
Setting
Fix a probability space (Ω,F,P). A random process is a family
(Xt)t∈T of real random variables on (Ω,F,P) indexed by an arbitrary set
T, with no independence or measurability-of-the-supremum assumed between different t's. Since
supt∈TXt(ω) need not be measurable in ω for a general index set T, its
expectation is understood — following the book's own convention, set once in Chapter 7 and reused
throughout — through the process's finite-dimensional marginals:
Now fix a metric d on T, making (T,d) a metric space. The covering numberN(T,d,ε), for ε>0, is the smallest cardinality of a finite
ε-net of T: a finite set N⊆T such that every point of T lies within
distance ε of some point of N (or N(T,d,ε):=∞ if no finite
ε-net exists). The quantity logN(T,d,ε) is the metric entropy of T
at scale ε: it measures how large T looks when resolved only down to scale
ε.
A process (Xt)t∈T has sub-gaussian increments with parameter K≥0 if
∥Xt−Xs∥ψ2≤Kd(t,s)for all t,s∈T,
where ∥⋅∥ψ2 is the sub-gaussian (Orlicz) norm of Chapter 2: the smallest u>0 with
Eexp((Xt−Xs)2/u2)≤2. This says the increments of the process are controlled by
the metric d the way a Gaussian process's increments are controlled by its own canonical metric
d(t,s):=∥Xt−Xs∥L2 — but without assuming (Xt)t∈T is Gaussian.
A class of Boolean functions F on a set Ωshatters a subset Λ⊆Ω
if every function g:Λ→{0,1} arises as the restriction to Λ of some f∈F.
The VC (Vapnik-Chervonenkis) dimensionvc(F) is the largest cardinality of a subset
of Ω shattered by F (or ∞ if arbitrarily large finite subsets, or an infinite one,
are shattered) — a purely combinatorial measure of how rich the class F is.
Formalization targets
Goal (Theorem 8.1.3, Dudley's integral inequality)
∃C>0:Et∈TsupXt≤CK∫0∞logN(T,d,ε)dε
for every mean-zero random process (Xt)t∈T on a metric space (T,d) with sub-gaussian
increments parameter K≥0, whenever the integral is finite. C is the book's own unnamed
absolute constant, never depending on T, K, or the process. This is the weakest stable form of
the claim: no numeral is hard-coded for C, and the statement asks only for the shape of the
bound, matching what the book actually proves.
Milestone (Theorem 8.3.16, Sauer-Shelah lemma)
∣F∣≤k=0∑d(kn)≤(den)d,d:=vc(F),
for every class F of Boolean functions on a finite n-point set Ω. This is a purely
combinatorial fact, with no probability involved, but it is the bridge (via the covering-number
bound Theorem 8.3.18, outside this mission's scope) between the chapter's Dudley-inequality engine
and its statistical-learning applications — a bound on how large a finite class of Boolean
functions can be, in terms of a single combinatorial complexity parameter.
Significance
Dudley's inequality is, in the book's own words, "the main result" of the chaining chapter: it
converts a purely geometric quantity — the metric entropy of an index set, computable in many
cases from covering-number estimates already available for balls, ellipsoids, and other convex
bodies — into a probabilistic control on the size of a random process indexed by that set. This
is what lets later chapters (uniform laws of large numbers over function classes, the matrix
deviation inequality, the Dvoretzky-Milman theorem on almost-spherical sections of convex bodies)
bound suprema over infinite, even uncountable, index sets without ever performing a union bound.
The bound is also known to be tight only up to a logarithmic factor in general — Sudakov's
minoration inequality (Chapter 7) gives a matching lower bound for Gaussian processes, and the
book's own Exercise 8.1.12 exhibits a set where the two bounds genuinely diverge — so the constant
C here cannot in general be sharpened away.
The Sauer-Shelah lemma is one of the two founding results of VC theory (together with the
Glivenko-Cantelli-type uniform convergence it feeds into), independently discovered by Vapnik and
Chervonenkis, Sauer, and Shelah in the early 1970s; it underlies the sample-complexity bounds of
statistical learning theory (a hypothesis class with finite VC dimension is PAC-learnable) and,
through Theorem 8.3.18, gives one of the two standard routes (the other being direct combinatorial
counting) to bounding covering numbers of infinite function classes.
Both results are decades old and have long-established, standard proofs; no open mathematical
question is being formalized. What this mission contributes is the machine-checked statement
infrastructure — the goal and the Sauer-Shelah milestone, together with the definitions
(CoveringNumber, ProcessESup, Shatters, VcDim) a faithful Lean rendering of either result
needs — for a solver to close with a proof. No formalization of Dudley's inequality or the
Sauer-Shelah lemma is known to exist on the platform prior to this mission.
Difficulty
The natural first idea for bounding Esupt∈TXt is a single-scale ε-net
argument: replace T by a finite ε-net, bound the maximum over the (finite) net by a
union bound using the sub-gaussian tail, and separately bound the error of replacing T by the
net using the Lipschitz-in-probability control the sub-gaussian-increments hypothesis gives. This
works, but it only ever sees T at one fixed resolution ε, and optimizing over
ε afterward gives a bound with an extra log(1/ε)-type loss that
does not match Dudley's inequality. The actual difficulty is genuinely multi-scale: chaining
builds a whole sequence of nets at dyadic scales ε=2−k simultaneously, connects
each point of T to its nearest net point at every scale to form a "chain" of successive
approximations back to a single fixed basepoint, and telescopes the resulting sum of increments —
turning Xt itself into a sum of differences between successive links of the chain, each
individually well controlled by the sub-gaussian hypothesis at its own scale. Passing from the
resulting discrete sum over dyadic scales (Theorem 8.1.4) to the continuous integral of the goal
is a further, separate technical step.
For the Sauer-Shelah lemma, the natural first idea — bound ∣F∣ directly by counting — has no
obvious purchase on an arbitrary class of Boolean functions. The actual argument goes through
Pajor's lemma, which reduces bounding ∣F∣ to counting the shattered subsets of Ω instead
of the functions in F themselves; only then does the cardinality bound d=vc(F) on
shattered sets become directly usable, via a binomial-sum estimate.
Formalization scope
CoveringNumber T ε is ℕ∞-valued (ℕ∞ = WithTop ℕ), defined as the infimum, over the subtype
of finite ε-nets of the whole type T (an instance of MetricSpace T), of their
cardinality; the infimum of the empty family in this complete lattice is ⊤, reproducing "N:=∞ if no finite net exists" with no case split. ProcessESup is EReal-valued, defined as
the supremum over finite nonempty T0⊆T of the Bochner integral of the finite max —
EReal, not ℝ, because a real-valued supremum would silently return the junk value 0 if the
family of marginal expectations were unbounded above. Shatters and VcDim are direct
transcriptions of Definition 8.3.1, with VcDim valued in ℕ∞ via a supremum of Set.encard
over the (always-nonempty, since ∅ is trivially shattered) subtype of shattered
subsets. The goal's mean-zero hypothesis is stated as Integrable (X t) P ∧ ∫ X t = 0 rather than
the bare equation, since a non-integrable variable's Bochner integral is 0 in Mathlib by
convention regardless of its true mean — a bare-equation hypothesis would let a non-mean-zero,
non-integrable process satisfy the theorem vacuously. Two further hypotheses make explicit what
the book's own displayed statement treats as understood without spelling out: that
N(T,d,ε) is finite for every ε>0 (total boundedness of T), and that the
resulting integrand is integrable on (0,∞) — both hold whenever T is totally bounded,
since the integrand vanishes once ε≥diam(T), so neither hypothesis excludes
any case the book's own proof does not also need. [Nonempty T] excludes the degenerate empty
index set. The absolute constant C is existentially quantified ahead of every type, instance,
and hypothesis it is uniform over, and pinned to no numeral, matching "C is an absolute
constant" — a formalization hard-coding a specific numeral for C would be invalidated by the
next sharper constant in the literature and would not match what the book proves.
A trivializing formalization of the Sauer-Shelah lemma would fix vc(F) at a hard-coded
small value, or drop the second (exponential) inequality in favor of the weaker first one; this
mission's statement keeps both inequalities, with d genuinely computed from VcDim, and handles
the d=0 boundary (where the exponential bound's base involves a division by zero under Lean's
x/0=0 convention) explicitly rather than excluding it, since x^0=1 still recovers the book's
correct bound ∣F∣≤1 there.
This mission covers Theorem 8.1.3 and Theorem 8.3.16 only; Theorem 8.3.18 (covering numbers via VC
dimension) and Theorem 8.2.3 (the uniform law of large numbers, the chapter's direct application
of Dudley's inequality) are left out, not approximated, for lack of the additional empirical-
process measurability machinery — the class of Lipschitz functions of Eq. (8.22), measurability of
the resulting empirical process — that a faithful statement of either would need beyond what this
mission's items already provide. CoveringNumber and ProcessESup are reusable by any later
chapter needing a metric space's covering numbers or a general random process's expected
supremum (this book's own Chapters 7, 9, and 11 all use one or both); Shatters and VcDim are
reusable by any later development of VC theory or statistical learning theory. Solvers'
contributions are welcome on: the chaining argument itself (the mission's hardest open leaf, via
the discrete dyadic form of Theorem 8.1.4), Pajor's lemma underlying Sauer-Shelah, and the
binomial-sum estimate closing its second inequality.
Selected references
R. M. Dudley, The sizes of compact subsets of Hilbert space and continuity of Gaussian
processes, Journal of Functional Analysis 1 (1967), 290–330.
https://doi.org/10.1016/0022-1236(67)90017-1
V. N. Vapnik, A. Ya. Chervonenkis, On the uniform convergence of relative frequencies of events
to their probabilities, Theory of Probability & Its Applications 16 (1971), 264–280.
https://doi.org/10.1137/1116025
R. Vershynin, High-Dimensional Probability: An Introduction with Applications in Data
Science, Cambridge University Press, 2018, Chapter 8. https://doi.org/10.1017/9781108231596
Foundations of Machine Learning V: Kernel Methods and the Representer TheoremTextbook
Motivation
Linear methods like SVMs work only when the classes are linearly separable, but most real
data is not. Chapter 6 shows how to get non-linear decision boundaries for free: replace the
input space's inner product with a kernelK that implicitly computes an inner product in a
(possibly very high- or infinite-dimensional) feature space, without ever explicitly computing
the feature mapping. This works for any positive definite symmetric (PDS) kernel — and the
chapter's central theorem shows that such a kernel always induces a genuine Hilbert space (the
reproducing kernel Hilbert space, RKHS) in which the kernel is literally an inner product. The
chapter's capstone, the representer theorem, then shows that a broad class of optimization
problems over this (possibly infinite-dimensional) Hilbert space always has a solution
expressible as a finite linear combination of kernel evaluations at the training points —
turning an infinite-dimensional problem into a finite, m-dimensional one.
Setting
A kernel K:X×X→R is PDS (Definition 6.3) if for every finite sample
{x1,…,xm}⊆X, the Gram matrix [K(xi,xj)] is symmetric positive
semidefinite. Theorem 6.8 shows every PDS kernel is an inner product K(x,x′)=⟨Φ(x),Φ(x′)⟩ in some Hilbert space H (the RKHS), which further has the
reproducing propertyh(x)=⟨h,K(x,⋅)⟩ for every h∈H — evaluating h
at a point is itself an inner product with the kernel section at that point. Theorem 6.10
shows PDS kernels are closed under sum, product, tensor product, pointwise limit, and
power-series composition, letting complex kernels (Gaussian, and many others) be built from
simple ones (polynomial kernels) without re-verifying positive-semidefiniteness from scratch.
Section 6.3's representer theorem (Theorem 6.11) then considers minimizing, over h∈H, an
objective F(h)=G(∥h∥H)+L(h(x1),…,h(xm)) that depends on h only through its norm
and its values at m fixed points.
Formalization targets
Theorem 6.8 (RKHS existence, milestone). For a PDS kernel K, there exist a Hilbert space
H and Φ:X→H with K(x,x′)=⟨Φ(x),Φ(x′)⟩, and H has the
reproducing property h(x)=⟨h,K(x,⋅)⟩ for all h∈H, x∈X.
Theorem 6.10 (closure properties, milestone). PDS kernels are closed under sum, product,
tensor product, pointwise limit, and power-series composition with non-negative coefficients.
Theorem 6.11 — the mission's goal. For any non-decreasing G:R→R and any
loss L:Rm→R∪{+∞}, argminh∈HG(∥h∥H)+L(h(x1),…,h(xm)) admits a solution h⋆=∑i=1mαiK(xi,⋅); if G
is increasing, every solution has this form.
Significance
Theorem 6.11 is the chapter's payoff and one of the most widely used structural results in
kernel methods: it explains, in one general statement covering SVMs, kernel ridge regression,
Gaussian process MAP estimation and many other algorithms simultaneously, why the dual
(finite, m-coefficient) formulation always suffices — the RKHS's infinite dimensionality
never has to be confronted directly. Theorem 6.8 is the structural fact the whole chapter (and
every later kernelized algorithm in the book, chapters 9-11, 15) depends on: without it, "PDS
kernel" would be a purely combinatorial condition on Gram matrices with no guarantee it
corresponds to any actual inner product. No prior art on the Prove2Me platform is faithful to
any of this chapter's content: GET /theorems?q=Representer theorem and q=reproducing kernel return no faithful match (one unrelated hit concerns a Gaussian-measure reproducing
kernel in a different, probabilistic context, not this chapter's PDS-kernel/RKHS
construction). All six items are drafted fresh.
Difficulty
Theorem 6.8's proof is a genuine construction: define H0 as finite linear combinations of
kernel sections Φ(x)=K(x,⋅), define an inner product on H0 using K itself,
verify it is well-defined (independent of the representation), positive semidefinite (via the
PDS hypothesis), and — via the Cauchy-Schwarz-for-PDS-kernels lemma (Lemma 6.7) — actually
positive definite, then complete H0 to a genuine Hilbert space H in which it is dense,
and finally extend the reproducing property from the dense subspace H0 to all of H by a
continuity argument. This is substantial analysis, not a restatement. Theorem 6.11's proof
uses the orthogonal decomposition H=H1⊕H1⊥ (where H1=span{K(xi,⋅)}) and the reproducing property to show the orthogonal component h⊥ never helps
and, when G is strictly increasing, strictly hurts — a short argument, but one that depends
essentially on Theorem 6.8's reproducing property holding for the specificH constructed,
not just any Hilbert space with the kernel as its inner product.
Formalization scope
IsPDS uses the book's own second SPSD characterization (c^T K c ≥ 0 for every finite sample
and coefficient vector c) rather than the non-negative-eigenvalues characterization, avoiding
spectral theory for a Prop-valued definition; the book states the two are equivalent.
IsRKHSOf and IsMinimizer are formalization scaffolding, not book-numbered definitions:
IsRKHSOf packages Theorem 6.8's own two displayed equations (6.8, 6.9) as a reusable
predicate shared between Theorem 6.8 (its conclusion) and Theorem 6.11 (its "H its
corresponding RKHS" hypothesis), using an explicit evaluation map ev : H → X → ℝ to stand in
for "elements of H are functions on X," since Mathlib's abstract Hilbert spaces are not
themselves spaces of functions; IsMinimizer packages argmin. Both X in Theorem 6.8's
existential and Theorem 6.11's ambient type are plain Type rather than Type*, avoiding
universe-polymorphic quantification over the constructed Hilbert space's own type — a harmless
simplification, since every application in this book instantiates X at a concrete, small
type (typically RN or a finite set). Theorem 6.11's loss codomain ℝ ∪ {+∞} is
WithTop ℝ, not EReal (which would also admit -∞, an unstated generalization the book's
own display does not license, since EReal's ⊤+⊥=⊥ collapse is a genuine faithfulness risk
the book's own L:\mathbb R^m\to\mathbb R\cup\{+\infty\} avoids by construction). WithTop ℝ
on its own does not avoid every collapse, though: an unconstrained L may be the constant
function ⊤ (a legal instance of ℝ∪\{+\infty\}), forcing the objective identically ⊤ and
every point to vacuously minimize it, which would make the theorem's second conjunct false. An
added hypothesis, ∃ h₀, F h₀ ≠ ⊤, makes explicit the book's own implicit assumption that the
objective is finite somewhere — see the Formalization scope note below. Theorem 6.11's two
clauses are otherwise kept exactly as distinct as the book states them: existence needs only
Monotone G (non-decreasing); "any solution has this form" needs StrictMono G (increasing)
as an added hypothesis on the second conjunct only — per this chunk's own BRIEF.md, the crux
of the theorem, and the trap this mission is most careful to avoid collapsing. Theorem 6.10's
five closure clauses are stated as one conjunction (matching the book's single theorem, not
five separate items); the power-series clause keeps the book's own radius-of-convergence
domain restriction and adds an explicit summability hypothesis guarding the ∑' term.
Not formalized: Theorem 6.2 (Mercer's condition) — not needed by the goal's own proof chain
(it is an equivalent characterization of PDS mentioned before the RKHS construction, not a
premise Theorem 6.8's or 6.11's proof invokes) and its own hypotheses (compact X⊂RN, continuous K, an eigenfunction expansion of a compact self-adjoint integral
operator) are real analytic content this mission's budget does not include; Lemma 6.7
(Cauchy-Schwarz for PDS kernels) and Lemma 6.9 (normalized PDS kernels) — supporting lemmas for
Theorem 6.8's proof, not independently numbered results the goal cites; Theorem 6.12/Corollary
6.13 (Rademacher complexity/margin bounds for kernel-based hypotheses) — the chapter's optional
further milestone, connecting to chunks 03/05's machinery, cut for budget; §6.5-6.8
(sequence kernels, weighted transducers, rational kernels, Bochner's theorem, approximate
feature maps) — explicitly out of scope per this chunk's own BRIEF.md, a distinct,
applications-heavy topic.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 6, §6.1-6.4.
B. Schölkopf, R. Herbrich, A. J. Smola, "A generalized representer theorem," COLT 2001,
Lecture Notes in Computer Science 2111, 2001, 416-426.
N. Aronszajn, "Theory of reproducing kernels," Transactions of the American Mathematical
Society 68(3), 1950, 337-404.
Foundations of Machine Learning III: Structural Risk Minimization and Model SelectionTextbook
Motivation
Chapters 2 and 3 bound the estimation error of a hypothesis chosen from a fixed hypothesis
set H, but the choice of H itself is left open: a richer H lowers the approximation
error (how close H comes to the Bayes classifier) at the price of a looser generalization
bound, and a poorer H does the reverse. Chapter 4 is the book's answer to this trade-off. It
first shows that Empirical Risk Minimization (ERM) alone cannot resolve it — ERM ignores the
complexity of H entirely — and then develops Structural Risk Minimization (SRM): decompose a
rich hypothesis set into a nested countable union H=⋃k≥1Hk of increasingly
complex pieces, and let the learning algorithm balance empirical fit against a complexity
penalty for each Hk automatically. The chapter closes by showing how the same balance can be
achieved computationally through convex surrogate losses, whose minimization is tractable where
minimizing the zero-one loss directly is not.
Setting
For a hypothesis h chosen from H, the excess error R(h)−R∗ decomposes into an estimation
term R(h)−infh∈HR(h) and an approximation term infh∈HR(h)−R∗ (Eq. 4.1).
Proposition 4.1 bounds ERM's estimation error by twice the uniform deviation
suph∈H∣R(h)−R^S(h)∣. For a nested family (Hk)k≥1 and h∈H, k(h)
denotes the least index with h∈Hk(h); SRM selects hSSRM by minimizing
Fk(h)=R^S(h)+Rm(Hk)+logk/m jointly over k≥1 and h∈Hk, where
Rm(Hk) is Hk's Rademacher complexity (Definitions 3.1/3.2, restated locally in this
chunk's ModelSelection namespace). Theorem 4.2 is the resulting learning guarantee. Section
4.4 develops a competing model-selection procedure, cross-validation, and Theorem 4.4 directly
compares its guarantee to SRM's on a held-out split of the sample. Section 4.7 turns to
real-valued scoring functions h:X→R with sign convention fh(x)=sign(h(x))
and a convex non-decreasing surrogate Φ of the zero-one loss; the Bayes scoring function
h∗(x)=η(x)−21 (Eq. 4.9) and the Φ-loss LΦ (Eq. 4.10) let Theorem 4.7
bound the true excess error by a power of the surrogate's own excess loss.
Formalization targets
Proposition 4.1 (ERM bound, milestone). For any sample S, Pr[R(hSERM)−infh∈HR(h)>ϵ]≤Pr[suph∈H∣R(h)−R^S(h)∣>ϵ/2].
Theorem 4.2 — the mission's goal. For a nested countable union H=⋃k≥1Hk and
hSSRM minimizing Fk(h) over the whole union, for any δ>0, with probability at
least 1−δ:
Theorem 4.4 (Cross-validation versus SRM, milestone). Splitting a sample of size m into
S1 (size (1−α)m, training) and S2 (size αm, validation), for any δ>0,
with probability at least 1−δ:
Theorem 4.7 (Convex-surrogate excess-error bound, milestone). For Φ convex and
non-decreasing with s≥1,c>0 satisfying ∣h∗(x)∣s≤cs(LΦ(x,0)−LΦ(x,hΦ∗(x)))
for all x: R(h)−R∗≤2c(LΦ(h)−LΦ∗)1/s.
Significance
Theorem 4.2 is the chapter's headline result and the theoretical justification for
regularization-based learning: it shows that a single algorithm, without knowing in advance
which Hk contains a good hypothesis, achieves a guarantee that is — up to the
logk(h)/m penalty — as favorable as if an oracle had revealed the best-in-class
index in advance (Eq. 4.6). It is also the chapter's genuine new content beyond chunk
03-rademacher-vc's single-hypothesis-set bound: the countable union bound (a 1/k²-weighted
union over k≥1 converging to π2/6, hence the log3 appearing in place of log2)
is not a restatement of Theorem 3.3 but a distinct argument, and the goal's inf over the
whole nested family is what makes SRM a model-selection method rather than a bound for one
fixed k. Theorem 4.4 is the chapter's only head-to-head comparison between two competing
model-selection procedures, on two genuinely different samples. Theorem 4.7 is the bridge
between the learning-theoretic guarantees of chapters 2-4 and the actually-implemented convex
optimization problems of chapters 5 (SVM), 6 (kernels) and beyond, all of which minimize a
convex surrogate rather than the zero-one loss directly. No prior art exists on the platform:
GET /theorems?q=structural%20risk%20minimization and GET /theorems?q=model%20selection both
return zero hits.
Difficulty
Theorem 4.2's proof genuinely uses the union bound over a countably infinite family indexed
by k≥1 with weight 1/k2 converging to π2/6<2 (Eq. 4.5) — this is the chapter's
distinct new technique, not an application of chunk 03's finite/VC-dimension machinery to a
single Hk; a formalization that stated the bound only for one fixed k, or dropped the
inf over the whole union in favor of a single best-in-class h∗, would be Theorem 4.2's
named trivializing formalization (BRIEF.md's pitfall note) rather than the theorem itself.
Theorem 4.4 requires keeping two distinct samples (S1, S2, of different, precisely
related sizes) and two distinct hypotheses (hSCV, hS1SRM) apart throughout;
conflating them collapses the comparison to a tautology. Theorem 4.7's difficulty is in its
setup, not its statement: the Bayes scoring function, the Φ-loss, and the pointwise
Φ-minimizer hΦ∗ (which the book allows to take the extended values ±∞ at
the degenerate points η(x)∈{0,1}) all need care to state without silently altering
the theorem's content.
Formalization scope
GeneralizationError, EmpiricalError, EmpiricalRademacherComplexity and
RademacherComplexity are restated locally in this chunk's ModelSelection namespace
(identical in content to chunk 03-rademacher-vc's own copies), since a draft item cannot
import another chunk's draft module. LeastIndex H h (k(h)) is Nat.sInf {k | 1 ≤ k ∧ h ∈ H k}; every theorem using it carries the standing hypothesis that h lies in the relevant union,
guarding against trap 5 (Nat.sInf of an empty set). Theorem 4.2's hSRM and Proposition 4.1's
hERM are hypothesis-supplied functions satisfying the book's optimality property, not
constructed via choice over an unconstrained H; H.Nonempty (Proposition 4.1) and
(⋃ k ≥ 1, Hk k).Nonempty (Theorem 4.2) guard the outer sInf/inf terms against trap 5.
Theorem 4.7's hΦ∗ is formalized as a real-valued function satisfying the pointwise
minimization property for all x; the book's own extended-real convention
(hΦ∗(x)=±∞ exactly where η(x)∈{0,1}) is outside this formalization —
disclosed here and in MODERATION_NOTES.md — since no real number satisfies the minimizing
property at those degenerate points, the theorem as stated applies precisely to the case a
real-valued hΦ∗ can be supplied, which is the book's own generic case. No numerical
constant is altered from the book in any of the four theorems: 2 and log(3/δ) in Theorem
4.2, 2 (twice) and log(4/δ) in Theorem 4.4, and 2c and the exponent 1/s in Theorem 4.7
are exactly as displayed.
Not formalized: the discussion of computing k∗ via binary search (a computational, not a
statistical, result); n-fold and leave-one-out cross-validation (Section 4.5, a practical
variant of Theorem 4.4's two-sample cross-validation without its own numbered generalization
bound); regularization-based algorithms (Section 4.6, the uncountable-union extension of SRM,
which the book itself only sketches without a numbered theorem); Lemma 4.5 and Proposition 4.6
(intermediate results establishing that hΦ∗ induces the same classifier as h∗,
needed for Theorem 4.7's proof but not part of its statement); and the worked examples for
the hinge, exponential and logistic losses (instantiations of Theorem 4.7's s,c, not separate
theorems). Drafting only these worked instantiations in place of Theorem 4.7's general
statement would be a trivializing formalization for this chapter.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 4.
V. Vapnik, Statistical Learning Theory, Wiley-Interscience, 1998 (structural risk
minimization).
T. Zhang, "Statistical behavior and consistency of classification methods based on convex
risk minimization," Annals of Statistics 32(1), 2003 (Theorem 4.7's origin).
The spectral gap of a quantum many-body Hamiltonian is the difference between the energy of its ground state and the energy of its first excited state, in the limit of infinitely many particles. Whether a given microscopic interaction produces a gapped or a gapless system decides much of the macroscopic physics: gapped systems have exponentially decaying correlations and well-defined quantum phases, gapless systems sit at critical points and can display algebraically decaying correlations. Several long-standing questions — the Haldane conjecture for antiferromagnetic spin chains, the existence of gapped topological spin liquids, and the Yang–Mills mass gap — are instances of the question "given the interaction, is the system gapped?".
Cubitt, Pérez-García and Wolf proved that this question, posed for families of two-dimensional translationally invariant nearest-neighbour spin models, admits no algorithmic answer: the spectral gap problem is undecidable (Nature 528, 207–211 (2015); full version: Forum of Mathematics, Pi 10:e14 (2022), also arXiv:1502.04573).
Timeline of the ingredients the proof rests on: Turing's undecidability of the halting problem (1936); Berger's undecidability of the domino problem (1966) and Robinson's aperiodic tile set (Inventiones 12, 177–209 (1971)); Feynman's and Kitaev's circuit-to-Hamiltonian constructions, which turn a computation into a ground state; Gottesman and Irani's translationally invariant one-dimensional Hamiltonians encoding computation (FOCS 2009); and Bitansky–Vadhan-style quantum Turing machine engineering from Bernstein and Vazirani (SIAM J. Comput. 26, 1411–1473 (1997)). The 2015 result was later sharpened to one-dimensional chains by Bausch, Cubitt, Lucia and Pérez-García (PRX 10, 031038 (2020)).
Setting
Fix a local dimension d and, for each side length L, the square lattice Λ(L)={1,…,L}2 with open boundary conditions. Each site carries a copy of Cd, so the state space of the lattice has the standard product basis indexed by assignments of a level in {1,…,d} to each site. A model is specified by three Hermitian matrices: an on-site term h1 of size d×d, and two interactions hrow,hcol of size d2×d2 acting on horizontally and vertically adjacent pairs. The Hamiltonian of the finite lattice is
the same three matrices being used at every edge and every site, which is what translational invariance means here. The quantity max{∥h1∥,∥hrow∥,∥hcol∥} is the local interaction strength.
Write λ0(HΛ(L))≤λ1(HΛ(L))≤⋯ for the eigenvalues and Δ(HΛ(L))=λ1−λ0 for the finite-size gap. The family {HΛ(L)}L is
gapped (Definition 1 of the source) if there are γ>0 and L0 such that for all L>L0 the ground state of HΛ(L) is non-degenerate and Δ(HΛ(L))≥γ;
gapless (Definition 2 of the source) if there is c>0 such that for every ε>0 there is an L0 with: for all L>L0, every point of [λ0,λ0+c] lies within ε of the spectrum of HΛ(L).
These two conditions are not negations of each other; the construction guarantees that every instance falls into one of them. The ground state energy density is Eρ=limL→∞λ0(HΛ(L))/L2.
Formalization targets
Goal — Theorem 3 of the source
For a fixed universal machine and every n, one explicit family of interactions, built from fixed integer-valued matrices A,A′,B,C,D,D′, a diagonal projector Π, a rational β>0 that may be taken arbitrarily small, and an algebraic α(n)≤2β,
with φ=φ(n) the rational whose binary expansion after the point is the binary expansion of n reversed, satisfies: the local interaction strength is at most 1; if the machine halts on input n the family is gapped with gap at least 1; and if it does not halt the family is gapless. Since halting is undecidable, no algorithm decides gappedness, even with the promise that exactly one of the two alternatives holds and even at fixed local dimension d.
Milestones
The milestone list follows the numbering of the full version: Lemma 8 and Theorem 9 (reduction of halting to ground state energy and to arbitrary low-energy properties), Corollary 7 (the same undecidability for unconstrained local dimension, with rational interactions), Proposition 53 and Corollary 54 (the diverging ground state energy and its promise version), and Theorem 5 (undecidability of the ground state energy density).
Significance
The result rules out a general algorithm — and therefore any complete general method — for deciding gappedness from the interaction matrices, however much computing power is available; the property genuinely depends on arbitrarily large system sizes. It also implies, via the standard link between undecidability and independence, that there are concrete finite-dimensional models whose gap is independent of the axioms of any consistent recursively axiomatized formal system (Corollary 4 of the source), and it transfers to other low-energy properties such as the existence of algebraically decaying ground-state correlations.
The theorem is proved; none of it is formalized. This mission produces the machine-checked version. The reusable infrastructure it forces into existence is substantial on its own: a formal model of translationally invariant lattice Hamiltonians and their thermodynamic-limit spectral behaviour, the tiling layer, and computational-history-state Hamiltonians. Each milestone is a self-contained statement that can be attacked without the others.
Difficulty
The obvious approach — encode a halting computation as an energy penalty — gives the ground state energy of a finite lattice, not a property of the limit; this is exactly what Lemma 8 achieves, and it is not enough, because a gap is a statement about the sequence of spectra as L→∞ and is insensitive to any single lattice size. The construction must make the halting information visible at all sufficiently large sizes at once while a fixed finite local dimension carries every instance n. That forces three separate difficulties: an aperiodic (Robinson) tiling to create squares of every size 2n inside one translationally invariant model; a quantum phase-estimation Turing machine whose transition amplitudes encode n in a single phase eiπφ(n), so that the instance index does not inflate the local dimension; and a history-state Hamiltonian whose low-energy spectrum can be controlled well enough that a positive energy density in the halting case turns into a genuine spectral gap, and a vanishing one into a dense spectrum above the ground state.
Formalization scope
The development commits to the following conventions, all of which are visible in the definition items of this mission.
Lattices are finite: sites are pairs of indices in {0,…,L−1}, edges are consecutive pairs within a row or a column (open boundary conditions; the periodic case of Section 6.3 of the source is out of scope).
Operators are complex matrices indexed by product-basis configurations; the interactions are embedded by acting as the given matrix on the two sites of an edge and as the identity elsewhere.
The spectrum is taken as the set of real numbers in the matrix spectrum, and λ0 is its infimum; every statement carries the Hermiticity hypotheses that make this the usual spectrum. Multiplicities are dimensions of eigenspaces, which is how the "identity of spectra as multisets" of Theorem 9 is expressed.
Gapped, gapless and the energy density are properties of the whole family {HΛ(L)}L generated by a fixed triple of matrices, exactly as in Definitions 1 and 2.
Operator norms are ℓ2 operator norms; the local interaction strength is the maximum of the three.
Machines are represented by partial recursive codes: "halts on input n" is definedness of the evaluation, and "has not halted after L steps" is the step-bounded evaluation returning nothing. The explicit local-dimension bounds of Lemma 8 and Theorem 9, which are stated in the source in terms of the number of internal states and the alphabet size of a Turing machine, are replaced by the existence of a finite local dimension.
Degenerate readings are excluded: a zero local dimension satisfies none of the statements, since a non-degenerate ground state requires a one-dimensional eigenspace and the gapless condition requires a non-empty spectrum; and every existential statement fixes the matrices before quantifying over all instances n and all lattice sizes L.
Contributions are welcome at any milestone, and also on the infrastructure the milestones need — Wang tilings and the Robinson tile set, Gottesman–Irani history-state Hamiltonians, and quantum Turing machines in the Bernstein–Vazirani sense — which are needed for Theorem 6 and Lemma 47 of the source and are not yet part of this mission's item list.
Selected references
T. S. Cubitt, D. Pérez-García, M. M. Wolf, Undecidability of the Spectral Gap (full version), Forum of Mathematics, Pi 10:e14, 1–102 (2022). https://doi.org/10.1017/fmp.2021.15 — the version all statements of this mission are formalized against; preprint: https://arxiv.org/abs/1502.04573
T. S. Cubitt, D. Pérez-García, M. M. Wolf, Undecidability of the spectral gap, Nature 528, 207–211 (2015). https://doi.org/10.1038/nature16059
R. M. Robinson, Undecidability and nonperiodicity for tilings of the plane, Inventiones Mathematicae 12, 177–209 (1971). https://doi.org/10.1007/BF01418780
D. Gottesman, S. Irani, The quantum and classical complexity of translationally invariant tiling and Hamiltonian problems, FOCS 2009. https://arxiv.org/abs/0905.2419
J. Bausch, T. S. Cubitt, A. Lucia, D. Pérez-García, Undecidability of the spectral gap in one dimension, Phys. Rev. X 10, 031038 (2020). https://doi.org/10.1103/PhysRevX.10.031038
Algorithmic Game Theory IV: VCG and the Limits of TruthfulnessTextbook
Motivation
Mission III of this series ends at an impossibility: without money, incentive compatibility over three or more alternatives means dictatorship. This mission formalizes the classical escape route — quasilinear utilities and payments — and the exact price of it. Vickrey (1961) discovered that a second-price auction makes truth-telling dominant; Clarke (1971) and Groves (1973) generalized the idea to arbitrary social choice: welfare-maximizing rules can always be made truthful by the right payments. The converse program — which choice rules are implementable at all — runs through Rochet (1987) and Myerson (1981) to Saks–Yu (2005): weak monotonicity characterizes implementability on convex domains, and on single-parameter domains the characterization is complete and elementary — monotone rules with critical-value payments. Chapter 9, §§9.3 and 9.5 of Nisan–Roughgarden–Tardos–Vazirani (eds.), Algorithmic Game Theory (Cambridge, 2007), written by Nisan, is the source text.
Setting
A set A of alternatives and a finite set ι of players. Player i holds a private valuationvi:A→R from a publicly known domain Vi⊆RA; utilities are quasilinear: choosing a and charging pi gives i utility vi(a)−pi. A (direct revelation) mechanism is a social choice function f from valuation profiles to A together with payment functions pi (Definition 9.14). The mechanism is incentive compatible if no unilateral misreport from the domain ever beats the truth (Definition 9.15).
A VCG mechanism (Definition 9.16) has f maximizing social welfare ∑ivi(a) and payments of the Groves form pi=hi(v−i)−∑j=ivj(f(v)); the Clarke pivot rule takes hi(v−i)=maxb∑j=ivj(b). A rule is weakly monotone (Definition 9.28) if a unilateral change of valuation that moves the outcome from a to b satisfies vi′(b)−vi′(a)≥vi(b)−vi(a). A single-parameter domain (Definition 9.33) is given by a win set Wi⊆A per player and bids t∈[t0,t1]: the valuation is t on Wi and 0 elsewhere.
Formalization targets
Goal (capstone) — Theorem 9.36
A normalized mechanism (losers pay 0) on a single-parameter domain is incentive compatible iff the rule is monotone and every winning bid pays the critical value — the threshold below which the bid loses.
Theorem 9.17 — VCG is truthful
Every VCG mechanism is incentive compatible.
Lemma 9.20 — Clarke pivot
With Clarke pivot payments, a welfare-maximizing rule makes no positive transfers, and is individually rational when valuations are nonnegative.
Theorem 9.29 — weak monotonicity
Necessity: incentive compatibility forces WMON, on any domain. Sufficiency: on convex domains, WMON rules admit implementing payments (Saks–Yu).
Significance
These are the working theorems of every later mechanism-design mission: the approximation mechanisms of Chapter 12, the profit-maximization results of Chapter 13, and the sponsored-search analysis of Chapter 28 all argue through Theorem 9.36's monotonicity-plus-critical-value normal form, and VCG is the benchmark they approximate. Formalizing the cluster produces the platform's quasilinear-mechanism vocabulary — domains, truthfulness, Groves payments, weak monotonicity, single-parameter settings — on top of the social-choice layer of Mission III.
The capstone and Theorem 9.17 are textbook results with complete proofs in the source; the Saks–Yu half of Theorem 9.29 is stated but not proved in the book ("quite involved"), so that milestone carries a genuinely hard formalization with a published paper proof. None have prior Lean formalizations.
Difficulty
Theorem 9.17 is a three-line inequality chase once the Groves form is unfolded — a deliberate warm-up. Lemma 9.20 adds the attained maximum over a finite alternative set. The necessity half of 9.29 is a two-application argument; the sufficiency half is the hard point of the mission: the known proofs walk two-cycle inequalities into a path-integral construction of payments on a convex domain, and nothing of the kind exists in Mathlib. For the capstone, the delicate part is the critical value: the book defines it as a supremum that "is undefined" when the player always wins, and the honest formal rendering — a constant payment c that is a least upper bound of the losing bids whenever losing bids exist — makes the case split explicit; the equivalence proof must thread monotonicity, the threshold structure of the winning set, and normalization through both directions.
Formalization scope
Valuations are functions A → ℝ; domains are sets V i : Set (A → ℝ); mechanisms are total functions with every property quantified only over profiles from the domain, so behavior on invalid inputs carries no content. The Groves term hᵢ is a function of the full profile constrained to be invariant under changes of coordinate i — the standard rendering of "depends only on v−i". The Clarke payment uses a Finset.sup' over a finite nonempty A, so no junk supremum arises. In the single-parameter setting the valuation induced by a bid is Set.indicator, bids live in Set.Icc t0 t1 with t0 ≤ t1, and the critical value is characterized by IsLUB guarded by nonemptiness of the losing set — the book's "undefined" caveat made precise without a junk sSup. Weak monotonicity's sufficiency half carries Convex ℝ (V i) and finite A (the Saks–Yu setting); the necessity half deliberately carries no hypotheses beyond incentive compatibility itself.
Selected references
W. Vickrey, Counterspeculation, auctions, and competitive sealed tenders, J. Finance 16 (1961), 8–37. DOI
E. H. Clarke, Multipart pricing of public goods, Public Choice 11 (1971), 17–33. DOI
T. Groves, Incentives in teams, Econometrica 41 (1973), 617–631. DOI
M. Saks, L. Yu, Weak monotonicity suffices for truthfulness on convex domains, Proc. 6th ACM EC (2005), 286–293. DOI
N. Nisan, T. Roughgarden, É. Tardos, V. V. Vazirani (eds.), Algorithmic Game Theory, Cambridge University Press, 2007, Chapter 9, §§9.3, 9.5. DOI