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.
Missions
🏆Completed
Captain: wurtle
Subset Sum is NP-completeResearch Paper
Prove that subset sum is NP-complete by reducing the existing 3-SAT language, to it. Given a list of positive integers and a nonnegative target, decide whether some selection of entries sums exactly to the target. Integers are encoded in binary.
References:
Richard M. Karp. Reducibility Among Combinatorial Problems. Complexity of Computer Computations, 85–103, 1972. Binary encoding convention, p. 89; Main Theorem, problem 18, pp. 94–95; original Exact Cover reduction, p. 100.
24 thms4 active usersReviewed
Captain: wurtle
CLIQUE is NP-CompleteResearch Paper
Prove that CLIQUE is NP-complete by reducing the existing 3-SAT language, KSat.KSAT 3, to it. An instance consists of a finite simple undirected graph and an input threshold; it asks whether the graph contains a clique of at least that size.
(https://prove2.me/theorems/d82e8682-c490-4742-a5e5-dd3a0b870b90). The construction specializes Karp’s SAT-to-CLIQUE reduction to 3-SAT.
References:
Richard M. Karp. Reducibility Among Combinatorial Problems. Complexity of Computer Computations, 85–103, 1972. Main Theorem, problem 3, p. 94; SAT-to-CLIQUE reduction, p. 97.
78 thms4 active usersReviewed
🏆Completed
Captain: wurtle
k-SAT is NP-HardResearch Paper
Prove that k-SAT is NP-complete for every fixed k≥3, with at most k literal occurrences per clause.
Competitive Randomized Algorithms for Nonuniform Problems IV: The Optimal Randomized Two-Server Ratio 1652/1069 on the 3-4-5 TriangleResearch Paper
Motivation
The k-server problem is a basic model of on-line decision making. k mobile servers move in a metric space, requests for points arrive one at a time, and each request has to be covered by a server before the next one arrives. The cost is the total distance the servers move. The problem includes paging, caching and disk-head scheduling as special cases (Manasse, McGeoch, Sleator 1990). An on-line algorithm is judged by its competitive factor: how much its cost can exceed that of an off-line algorithm that knows the whole request sequence in advance.
For randomized algorithms against an oblivious adversary (one that fixes the whole request sequence before the algorithm flips any coins), the best-understood case is paging, which is the k-server problem on a uniform metric space. There the optimal factor is the harmonic number Hk=∑i=1k1/i. Fiat et al. proved the lower bound (1991) and McGeoch and Sleator the matching upper bound (1991). Karlin, Manasse, McGeoch and Owicki (Algorithmica 11, 1994, §5) asked whether Hk-competitive algorithms also exist when the metric space is not uniform. They answered no, already for two servers on three points: on certain triangles the optimal randomized factor is strictly larger than H2=3/2. This mission formalizes their Theorem 13, which gives the exact optimal factor on the triangle with edge lengths 3, 4 and 5.
Timeline:
1990: Manasse, McGeoch and Sleator introduce the k-server problem; k is the deterministic optimum for k=2.
1991: Fiat, Karp, Luby, McGeoch, Sleator and Young prove the Hk lower bound for randomized paging. McGeoch and Sleator give an Hk-competitive paging algorithm.
1994: Karlin, Manasse, McGeoch and Owicki determine the optimal randomized two-server factors on the isosceles triangles 1-d-d (Theorem 12) and on the 3-4-5 triangle (Theorem 13, the ratio 1652/1069). Both exceed 3/2.
Setting
Let M be a metric space with exactly three points a,b,c, where d(a,b)=3, d(a,c)=5 and d(b,c)=4. A configurationC gives the positions of two labelled servers in M. A request sequenceσ is a finite list of points of M.
A deterministic on-line algorithm assigns to each prefix of a request sequence a configuration, in which the last request is covered. Its configuration after a prefix therefore cannot depend on later requests. Its initial configuration is the one it assigns to the empty prefix, and its cost CA(σ) on σ is the total distance its servers move while serving σ request by request.
The optimal off-line costCopt(σ) from an initial configuration C0 is the infimum, over all schedules that start at C0 and cover each request of σ in turn, of the total distance moved.
A randomized on-line algorithmA is a probability distribution over deterministic on-line algorithms, all starting at C0. The cost on each fixed σ is required to be measurable in the random choice, and ECA(σ) is the expected cost. A is ρ-competitive against an oblivious adversary if there is a constant a such that for every request sequence σ,
ECA(σ)≤ρ⋅Copt(σ)+a.
These are the definitions of p. 543 of the paper. They are the platform's published KServer_model and KServer_randomized, which this mission reuses unchanged: KServer.RandomizedAlgorithm 2 M and A.IsCompetitiveFrom C₀ ρ.
Formalization targets
Goal: Theorem 13
For every initial configuration C0 of the two servers,
(∀A,∀ρ,A is ρ-competitive from C0⇒ρ≥10691652)∧(∃A,A is 10691652-competitive from C0).
The first claim is quantified over all randomized algorithms, so it also covers deterministic ones (point masses). The second claim asks for one algorithm. Together they say that 1652/1069≈1.545 is the exact optimal randomized factor on this triangle.
Milestones
The phase LP lower bound (p. 568). Twelve linear constraints in nine probabilities π1,…,π9, three potentials Φab,Φac,Φbc and a ratio α, one constraint for each possible phase of the request sequence, of the form
A’s cost≤α⋅(opt’s cost)+Φinitial−Φfinal.
Every real solution has α≥1652/1069.
2. The LP attainment (p. 568). The paper's printed probabilities lie in [0,1], and with suitable potentials they satisfy all twelve constraints at α=1652/1069.
3. Theorem 13, first claim: the lower bound for every randomized algorithm.
4. Theorem 13, second claim: a 1652/1069-competitive randomized algorithm exists.
Significance
The result. Theorem 13 shows that the Hk behaviour of randomized paging does not carry over to general metric spaces. Two servers on a three-point space already force a factor above 3/2. The value is exact, which makes this triangle a test case for any general theory of randomized k-server algorithms on small metric spaces. With Theorem 12 (the isosceles triangles, a companion mission of this series), it is one of the few non-uniform metric spaces with a known optimal randomized factor.
Formalizing it. The result has been proved since 1994. To our knowledge there is no machine-checked proof. The paper derives both bounds from two framework theorems for phase-based algorithms: Theorem 3 (an LP lower bound for phase-based algorithms bounds every algorithm) and Theorem 2 (a lazy phase-based algorithm with LP bound α is α-competitive). The phase tables themselves (which phases can occur and what they cost) are stated without detailed proof. A formal proof has to supply both framework arguments for this space and verify the phase tables, as well as the finite linear algebra of milestones 1 and 2. The milestones isolate the exact-arithmetic core so that it can be closed independently of the probabilistic part.
Difficulty
The two LP milestones are finite exact-arithmetic facts. The hard part is linking them to Theorem 13.
For the lower bound, an algorithm need not be phase-based at all. Its probabilities may depend on the whole history, not only on the current phase, and it may leave the configuration of the off-line optimum at the end of a phase. The obvious attempt is to fix one hard request sequence and compare costs, but that cannot work: randomization defeats any single sequence. The reduction from arbitrary algorithms to phase-based ones (the paper's Theorem 3) is the substantive step.
For the upper bound, the printed probabilities describe the algorithm's marginal position after each prefix of a phase. They have to be realized as a single probability distribution over deterministic on-line algorithms that is lazy (it moves only to serve a request) and whose expected cost per phase equals the table's entry. On top of this, the LP accounting has to be turned into a bound on arbitrary request sequences, including partial phases and a start away from the optimum's configuration.
Formalization scope
Model. The platform definitions KServer_model and KServer_randomized are used unchanged. Servers are labelled (Config 2 M = Fin 2 → M). A deterministic algorithm is a function of the request prefix, which makes it on-line by construction. A randomized algorithm is a mixed strategy with a probability measure and a measurability field, and its expected cost is the lower Lebesgue integral of the nonnegative cost. The off-line optimum is a real infimum over schedules from C0; the set is nonempty and bounded below by 0. Competitiveness allows any real additive constant.
The triangle is given by hypotheses on an arbitrary metric space: every point equals a, b or c, and d(a,b)=3, d(a,c)=5, d(b,c)=4. These hypotheses are satisfiable (3+4≥5) and force three distinct points.
Initial configuration. Both claims are stated for every initial configuration C0, including both servers on one point. The paper does not fix the start; the additive constant absorbs it.
LP milestones. The thirteen LP variables are free reals, with no box 0≤πi≤1, exactly as the paper permits. This makes milestone 1 stronger than the boxed version; the minimum is the same either way. The twelve constraints are written out one per hypothesis, in the table's order, with the potential difference Φinitial−Φfinal on the right. In milestone 2 the potentials are existentially quantified, since the paper names none.
Not stated. The paper's Theorems 2 and 3 (the phase framework) and the phase tables are not separate milestones. Milestone 1 feeds the first claim through Theorem 3, and milestone 2 feeds the second claim through Theorem 2. Contributions formalizing phase-based algorithms, laziness and the LP-bound reduction for finite metric spaces would be reusable for Theorem 12 and Theorem 14 of the same paper.
Ruled out. The lower bound is not restricted to deterministic or to phase-based algorithms, and it is not stated as "one sequence defeats every algorithm". The constant is exactly 1652/1069, not an approximation, and the attainment claim is not weakened to "for some initial configuration".
Selected references
A. R. Karlin, M. S. Manasse, L. A. McGeoch, S. Owicki, Competitive Randomized Algorithms for Nonuniform Problems, Algorithmica 11 (1994) 542–571. https://doi.org/10.1007/BF01189993
A. Fiat, R. M. Karp, M. Luby, L. A. McGeoch, D. D. Sleator, N. E. Young, Competitive Paging Algorithms, Journal of Algorithms 12 (1991) 685–699. https://doi.org/10.1016/0196-6774(91)90041-V
L. A. McGeoch, D. D. Sleator, A Strongly Competitive Randomized Paging Algorithm, Algorithmica 6 (1991) 816–825. https://doi.org/10.1007/BF01759073
Competitive Randomized Algorithms for Nonuniform Problems I: Optimal Competitiveness of Randomized Block Snoopy CachingResearch Paper
Motivation
In a shared-memory multiprocessor, each processor keeps copies of memory blocks in its own cache, and all caches listen ("snoop") on a common bus. Every bus cycle spent keeping these copies consistent is a cycle not available for useful work, so the protocol that decides when a block is shared by several caches and when it is private to one cache directly controls bus traffic. The decision has to be made on-line, without knowing which processor will touch the block next.
Karlin, Manasse, Rudolph and Sleator (Algorithmica 1988) introduced competitive analysis for this problem and gave a deterministic algorithm with competitive ratio 2, which is optimal among deterministic algorithms. Karlin, Manasse, McGeoch and Owicki (Algorithmica 1994) showed that randomization helps: against an oblivious adversary the optimal ratio for block snoopy caching is ep/(ep−1), where p is the cost of transferring a block. The same paper develops a general method for "nonuniform" problems, in which some state transitions are much more expensive than others, and the snoopy-caching result is its first application.
Setting
Fix n processors and one memory block B holding p−1 variables; transferring B over the bus costs p bus cycles. The block is in one of n+1states: shared between all caches, or private to the cache of processor i.
A request is a read Ri or a write Wi by processor i. Moving from a private state to any other state costs p; moving from the shared state is free. A read Ri costs 0 if B is shared or private to i and +∞ otherwise. A write Wi costs 0 if B is private to i, 1 if B is shared (one bus cycle broadcasts the new value), and +∞ otherwise.
Before request j the system is in state sj−1. A read is a look-ahead-one request: the algorithm may change state at the moment of the request, after seeing it. A write is a look-ahead-zero request: it is served in whatever state the system is in. After either kind, the algorithm may move again. The cost of a request is the cost of the move to the serving state, plus the task cost there, plus the cost of the move afterwards. Every write is preceded by a read to the same block, so in an admissible sequence each write Wi directly follows Ri or Wi.
The off-line optimumCopt(s0,σ) is the least total cost of serving σ from the initial state s0 with full knowledge of σ. A randomized on-line algorithmA is a probability distribution over deterministic on-line algorithms; its expected cost on σ is ECA(σ). A is c-competitive against an oblivious adversary from s0 if there is a constant a with
ECA(σ)≤c⋅Copt(s0,σ)+a
for every admissible σ. Put
ep=(1+p1)p.
Formalization targets
Goal: Theorem 4
For n≥2, p≥1 and every initial state s0:
(∀A∀c:A is c-competitive from s0⇒c≥ep−1ep)∧∃A:A is ep−1ep-competitive from s0.
The two conjuncts are milestones of their own: the lower bound (Theorem 4, first claim) and attainment (Theorem 4, second claim).
The phase linear program (§3.2, pp. 552–554)
For p≥1, real π1,…,πp+1 with πp+1=1, and real α with
πk+1p+i=1∑k(1−πi)≤αk(k=0,…,p),
one has α≥ep/(ep−1). Conversely, at α=ep/(ep−1) the choice πk=(α−1)(((p+1)/p)k−1−1) satisfies πp+1=1, 0≤π1≤⋯≤πp+1, and makes every constraint an equality.
Significance
The theorem settles the randomized competitive ratio of block snoopy caching exactly: 2 at p=1, 9/5 at p=2, decreasing to e/(e−1)≈1.582 as p→∞, against the deterministic optimum 2. The same ratio e/(e−1) is the randomized optimum for the continuous ski-rental and spin-block problems treated later in the paper, and the snoopy-caching case is its discrete counterpart with ratio ep/(ep−1). The phase-LP method used here recurs in the paper's two-server results.
The result is proved in the paper; to our knowledge it has no machine-checked proof. This mission produces a formal model of the snoopy-caching task system with look-ahead-zero requests, of randomized algorithms against an oblivious adversary with infinite task costs allowed, and of the off-line optimum, together with the exact optimal ratio. The platform's fractional ski-rental result (PrimalDualOnline.SkiRental.fractional_competitive) proves an eB/(eB−1) bound for a different model: one deterministic fractional algorithm, with no lower bound over randomized algorithms. It is related work, not a special case.
Difficulty
The linear program is elementary. The gap is between the LP and the algorithms. The paper's lower bound reduces arbitrary randomized algorithms to phase-based ones, whose state distribution at the end of each phase agrees with the optimal algorithm's known state, and whose behaviour inside a phase depends only on the number of writes so far. This reduction (Theorems 1 and 3 of the paper, pp. 545–549) is where the argument is not routine. An algorithm may keep the block private to a processor that is not the active one, may randomize over histories rather than over phase lengths, and the off-line optimum is not a sum of per-phase costs at the ends of the sequence. The obvious approach, bounding a single adversarial phase, does not suffice, because an algorithm may pay more in one phase and recover it in the next; the additive constant a and the infinite horizon have to be handled. For attainment, the mixture of threshold algorithms must be written as a genuine distribution over on-line algorithms, with the initial phase from a private state absorbed into the additive constant.
Formalization scope
Everything lives in the namespace NonuniformCompetitive.Snoopy. States are Option (Fin n) (none = shared). Costs are in ℝ≥0∞; +∞ is a genuine outcome, so an algorithm that ever pays +∞ with positive probability on an admissible sequence is not competitive. A deterministic on-line algorithm is a pair of functions of the request prefix (the state at the moment of the last request, and the state after it), with the look-ahead-zero rule as a field. Moves "immediately before" a request are made without knowledge of it and are recorded as moves after the previous request. A randomized algorithm is a probability space with a measurable cost on every sequence, and its expected cost is a lower Lebesgue integral. The off-line optimum is an infimum in ℝ≥0∞ over schedules starting in s0; it is finite on admissible sequences.
Conventions added to the printed statement, all from the paper's setting: (i) n≥2, since with one processor the block can stay private for free; (ii) one block, since the proof of Theorem 4 splits a multi-block system into independent blocks (p. 551); (iii) admissibility in the form "each write of i directly follows a read or write of i", the reading of "every write is preceded by a read to the same block" that the proof uses; without it every algorithm is defeated by a write from a processor whose block copy was invalidated; (iv) p∈N, p≥1; (v) both claims from every initial state, with an additive constant depending on n, p, s0.
The lower bound is over all randomized algorithms, not over phase-based or deterministic ones; a statement restricted to phase-based algorithms, or the LP alone in place of the goal, would not be Theorem 4. The LP variables are free, as in the paper.
Welcome contributions: a formal version of the phase reduction (Theorems 1 and 3 of the paper) for this task system, which is reusable for the paper's other nonuniform problems; the threshold algorithms and their mixture; and a proof that the off-line optimum decomposes by write runs up to a bounded error.
Selected references
A. R. Karlin, M. S. Manasse, L. A. McGeoch, S. Owicki, Competitive Randomized Algorithms for Nonuniform Problems, Algorithmica 11 (1994), 542–571. https://doi.org/10.1007/BF01189993
A. R. Karlin, M. S. Manasse, L. Rudolph, D. D. Sleator, Competitive Snoopy Caching, Algorithmica 3 (1988), 79–119. https://doi.org/10.1007/BF01762111
A. Borodin, R. El-Yaniv, Online Computation and Competitive Analysis, Cambridge University Press, 1998.
Three Partition Refinement Algorithms 2: Refining by the Smaller HalfResearch Paper
Motivation
Many equivalence problems on finite structures reduce to computing the coarsest partition of a finite set that is compatible with a relation. Deciding whether two states of a finite labelled transition system are bisimilar, testing congruence of finite-state processes in Milner's calculus of communicating systems (CCS), and minimizing a deterministic finite automaton are all instances. Kanellakis and Smolka studied the relational version in connection with CCS equivalence and gave an O(mn)-time algorithm, conjecturing that O(mlogn) was possible. Paige and Tarjan's 1987 paper answers that conjecture with an algorithm that has since become the standard method for bisimulation minimization in model checkers and process-algebra tools.
Timeline:
1971 — Hopcroft gives an O(nlogn) algorithm for minimizing deterministic finite automata, i.e. for the coarsest partition stable with respect to one or more functions, using the rule "process the smaller half".
1983/1990 — Kanellakis and Smolka give an O(mn)-time, O(m+n)-space algorithm for the relational problem, and O(c2nlogn) when every element has at most c successors; they conjecture an O(mlogn) algorithm.
1987 — Paige and Tarjan combine Hopcroft's smaller-half strategy with refinement by unions of blocks and obtain O(mlogn) time and O(m+n) space for the relational problem.
Setting
Let U be a finite set with n=∣U∣ elements and let E⊆U×U be a binary relation on U; write xEy for (x,y)∈E and m=∣E∣. For S⊆U the preimage of S is
E−1(S)={x∈U∣∃y∈S,xEy}.
A partition of U is a family of nonempty, pairwise disjoint subsets of U, its blocks, whose union is U. A partition R is a refinement of a partition P if every block of R lies inside a block of P.
A set B⊆U is stable with respect to S⊆U if B⊆E−1(S) or B∩E−1(S)=∅: either every element of B has an E-successor in S, or none does. A partition is stable with respect to S if all its blocks are, and a partition is stable if it is stable with respect to each of its own blocks.
Given E and an initial partition P, the coarsest stable refinement of P is a stable partition Q refining P such that every stable partition refining P is a refinement of Q. The relational coarsest partition problem asks for it.
The algorithms refine by the operation split(S,Q), which replaces each block B of Q that meets both E−1(S) and its complement by the two blocks B∩E−1(S) and B−E−1(S). The set S is a splitter of Q if split(S,Q)=Q.
The naïve algorithm starts from Q=P and, while possible, picks a splitter S of Q that is a union of blocks of Q and replaces Q by split(S,Q).
The improved algorithm also maintains a partition X, initially {U}, of which Q is a refinement. While Q=X, it picks a block S∈X that is not a block of Q and a block B∈Q with B⊆S and ∣B∣≤∣S∣/2, replaces S in X by B and S−B, and replaces Q by split(S−B,split(B,Q)).
The improved algorithm is analysed under the standing assumption ∣E({x})∣≥1 for all x∈U: every element has at least one successor. (The paper reduces the general case to this one by a preprocessing step.)
Formalization targets
Goal: the improved algorithm
For every run (Q0,X0)=(P,{U}),…,(QK,XK) of the improved algorithm with refining blocks B0,…,BK−1:
at every stage Qj and Xj are partitions, Qj refines Xj, and Qj is stable with respect to every block of Xj;
if QK=XK, then QK is the coarsest stable refinement of P;
if QK=XK, another step applies;
K≤n−1;
every x∈U satisfies
#{j<K∣x∈Bj}≤log2n+1.
Items 1–4 are the correctness of the improved algorithm, which the paper deduces from that of the naïve one. Item 5 is the counting fact on which the O(mlogn) bound rests.
Milestones
§3, p. 978: S is a splitter of Q if and only if Q is unstable with respect to S.
Properties (1)–(3), p. 978: stability is inherited under refinement and under union; split is monotone in its second argument.
§3, p. 979: a stable partition is stable with respect to every union of its blocks.
Lemma 2, p. 979: every stable refinement of P refines each partition produced by the naïve algorithm.
Theorem 2, p. 979: the naïve algorithm stops after at most n−1 steps at the unique coarsest stable refinement.
Property (4), p. 978: split is commutative, and split(S,split(Q,P)) is the coarsest refinement of P stable with respect to both S and Q.
Lemma 3, p. 980: the three-way split of a block D into D11, D12 and D2, including D12=D1∩(E−1(B)−E−1(S−B)).
Significance
The coarsest stable refinement of the partition of states by their labels is the bisimilarity relation of a finite transition system, so the goal certifies, for any sequence of choices, the correctness of the refinement loop at the core of bisimulation minimization. The halving count is the combinatorial half of the O(mlogn) bound: once the implementation charges O(∣B∣+∑y∈B∣E−1({y})∣) per refining block B, the count bounds the total work.
The results are proved in the paper, some by one-line arguments and the elementary properties (1)–(4) not at all ("stated without proof"). No machine-checked proof of the Paige–Tarjan algorithm's correctness or of its halving count is known to be available in Lean or Mathlib. The mission produces a checked account of the invariant, the final correctness and the counting argument for every run, not only for a particular implementation.
Difficulty
The correctness of the improved algorithm is not a special case of the naïve one read off directly. An improved step refines by B and by S−B, and S−B is a union of blocks of Q only because Q refines X. The invariant that Q is stable with respect to every block of X is what makes Q=X a stopping condition, and it holds initially only under the standing assumption. The naive idea of reusing Hopcroft's argument fails: for relations, stability with respect to S and B does not imply stability with respect to S−B, which is why both refinements are performed. For the halving count, the refining blocks that contain a fixed element must be shown to be nested across steps, which requires tracking how blocks of X are replaced.
Formalization scope
U is a Fintype with decidable equality, E a decidable relation U → U → Prop. Partitions are Finset (Finset U) with an explicit predicate IsPartition (nonempty, pairwise disjoint blocks covering U); blocks are required to be nonempty, which the paper leaves implicit.
"Coarsest" means: every stable partition refining P refines it. The paper's "every other stable partition" is read this way, since a stable partition that does not refine P need not refine the answer.
Algorithms are step relations; a run is a finite sequence of states indexed by Fin (K + 1), with the choices Sj,Bj recorded. Every statement holds for every run, so no choice rule is fixed.
Added hypotheses: U nonempty (so {U} is a partition and "at most n−1 steps" is meaningful); the standing assumption ∀x∃y,xEy for the goal only. Lemma 2 is stated for every stable refinement of P, which is what its proof gives and what Theorem 2 uses; it implies the printed form.
Explicit forms: ∣B∣≤∣S∣/2 is 2 * B.card ≤ S.card, K≤n−1 is K + 1 ≤ n, log2 is Real.logb 2 of n cast to R. The termination bound for the improved algorithm is not printed in the paper and is derived as in the proof of Theorem 2. Running times (O(mn), O(mlogn)) and the data structures of the implementation are out of scope.
A trivializing reading is ruled out: the goal quantifies over all runs from (P,{U}) with every side condition of the step (in particular S∈/Q and the half-size condition), and the conclusion is a full correctness statement, not the existence of some stable partition; the discrete partition is stable but is not the answer in general.
Reusable beyond this mission: preimage, stability, split and its algebra (properties (1)–(4)), which apply to Hopcroft's algorithm and to bisimulation minimization in general. Contributions proving the elementary properties first, then Lemma 2 and Theorem 2, are the natural attack order.
Selected references
R. Paige, R. E. Tarjan, Three Partition Refinement Algorithms, SIAM Journal on Computing 16(6):973–989, 1987. https://doi.org/10.1137/0216062
P. C. Kanellakis, S. A. Smolka, CCS expressions, finite state processes, and three problems of equivalence, Information and Computation 86(1):43–68, 1990. https://doi.org/10.1016/0890-5401(90)90025-D
J. E. Hopcroft, An n log n algorithm for minimizing states in a finite automaton, in Theory of Machines and Computations, Academic Press, 1971, pp. 189–196. https://doi.org/10.1016/B978-0-12-417750-5.50022-1
A. V. Aho, J. E. Hopcroft, J. D. Ullman, The Design and Analysis of Computer Algorithms, Addison-Wesley, 1974.
Competitive Paging Algorithms I: The Marking Algorithm Is 2H_k-CompetitiveResearch Paper
Motivation
Paging is the problem of managing a two-level memory: a fast cache holds k pages out of an address space of n pages, requests to pages arrive one at a time, and a request to a page outside the cache (a page fault) forces the algorithm to bring that page in and, when the cache is full, to evict another. The cost is the number of faults. An on-line algorithm decides which page to evict without knowing future requests. The comparison of paging policies with the optimal off-line policy is where competitive analysis began.
Sleator and Tarjan showed that LRU and FIFO are within a factor k of the off-line optimum and that no deterministic on-line algorithm does better than k (Sleator–Tarjan 1985). Randomization changes the picture: Fiat, Karp, Luby, McGeoch, Sleator and Young introduced the marking algorithm and proved that its expected cost is within a factor 2Hk of the optimum, where Hk=1+21+⋯+k1≈lnk (arXiv:cs/0205038).
Timeline.
1985: Sleator and Tarjan: LRU and FIFO are k-competitive; no deterministic algorithm beats k.
1988: Karlin, Manasse, Rudolph and Sleator coin "competitive" and analyse flush-when-full (Algorithmica 3).
1990: Manasse, McGeoch and Sleator introduce the k-server problem and define competitiveness for randomized algorithms (J. Algorithms 11).
1991: Fiat et al.: the marking algorithm is 2Hk-competitive, and Hn−1-competitive when k=n−1; no randomized paging algorithm beats Hk.
1991: McGeoch and Sleator give an Hk-competitive randomized paging algorithm (Algorithmica 6).
2000: Achlioptas, Chrobak and Noga determine the exact competitive ratio of the marking algorithm, 2Hk−1 (Theoret. Comput. Sci. 234).
Setting
The paper works in the uniform k-server problem, which is isomorphic to paging. There is a set M of n vertices, enumerated e(0),…,e(n−1), and moving a server between two distinct vertices costs 1. There are k servers, 1≤k≤n. A request is a vertex, and after each request some server must be on it. Cached pages are covered vertices; a fault is a server move.
The marking algorithm starts with its servers on e(0),…,e(k−1) and keeps a set of marked vertices, initially the covered ones. On a request to r:
Marking.r is marked; the moment k+1 vertices are marked, all marks except the one on r are erased.
Serving. If r is covered, nothing moves. Otherwise a server is chosen uniformly at random among the covered unmarked vertices and moved to r.
The marks are updated before the server is chosen. For a finite request sequence σ, CM(σ) is the algorithm's expected number of server moves. OPT(σ) is the least number of moves with which k servers, starting from the same configuration C0 and knowing σ in advance, can serve σ.
A randomized algorithm is c-competitive if there is a constant a such that CM(σ)≤c⋅CB(σ)+a for every request sequence σ and every algorithm B.
The marks divide σ into phases. A new phase begins at the request that would make k+1 vertices marked. A vertex is clean in a phase if it was not requested in the previous phase and not yet in this one, and stale if it was requested in the previous phase but not yet in this one.
Formalization targets
Goal: Theorem 1
∃a∈R∀σ:CM(σ)≤2Hk⋅OPT(σ)+a.
The constant a may depend on n, k and the enumeration, never on σ.
Milestones (proof of Theorem 1, pp. 4–5)
Without loss of generality the adversary is lazy: no move on a covered request, exactly one move otherwise (reference item, already proved on the platform).
At the start of every phase the marked vertices are exactly the covered ones, and the first request of a phase is unmarked.
In a phase with l clean requests, a lazy adversary pays CA≥l−d, where d counts its servers off the marking algorithm's servers at the start of the phase.
It also pays CA≥d′, where d′ counts its servers off the final marked set at the end of the phase.
Hence CA≥max(l−d,d′)≥21(l−d+d′).
A request to a stale vertex is a fault with probability c/s (c clean vertices requested so far, s stale vertices left).
The marking algorithm's expected cost in a phase is at most l(Hk−Hl+1)≤lHk.
Companions
Theorem 2: for k=n−1, CM(σ)≤Hn−1⋅OPT(σ)+a.
Tightness remark (pp. 5–6): for k=2, n=4 there is no a with CM(σ)≤H2⋅OPT(σ)+a for all σ.
Significance
The result. Theorem 1 was the first proof that randomization beats the deterministic barrier k for paging, bringing the ratio down to O(logk). Together with the paper's lower bound Hk for every randomized algorithm, it determines the randomized competitive ratio of paging up to a factor 2. Its phase and clean/stale accounting is reused throughout the analysis of randomized caching.
Formalizing it. The theorem is proved (1991). As far as is known it has no machine-checked proof. Formalizing it requires a probabilistic model of a randomized on-line algorithm, an off-line optimum, and a phase decomposition with an exchangeability argument, and these are the first such objects in this library. Theorem 2 and the k=2, n=4 example use the same definitions and also check that the formal algorithm is the paper's. The sharp ratio 2Hk−1 is a natural follow-up.
Difficulty
The comparison is between a random process and a deterministic adversary, and each side has its own obstacle.
On the algorithm's side, the configuration inside a phase is random, and the fault probability of a stale request depends on the whole history of the phase. The claim that the c uncovered stale vertices form a uniformly random subset of the s stale ones is an exchangeability property of the process, and must be established from the step-by-step uniform choice. The worst-case ordering of the requests within a phase then has to be justified as a bound, not assumed.
On the adversary's side, the per-phase bound max(l−d,d′) does not sum directly. The d and d′ terms telescope across phases only because the configuration of the marking algorithm at each phase boundary is deterministic. The first phase, which begins after an initial run of requests to e(0),…,e(k−1), and the last, incomplete phase have to be absorbed into the additive constant.
Formalization scope
The vertex set is an abstract metric space M with e:Finn≃M and dist(x,y)=1 for x=y. The natural metric ∣i−j∣ on Finn is deliberately not used. The configurations and the off-line optimum OPT are the published KServer definitions (KServer.Config, KServer.offlineCost), with OPT taken from the marking algorithm's initial configuration. An off-line algorithm starting elsewhere changes the cost by at most k, which is absorbed into a.
The marking algorithm is a Markov chain on pairs (covered set, marked set). Each step is a PMF, with the eviction drawn by PMF.uniformOfFinset from the covered unmarked vertices. The expected cost is the sum over requests of the probability that the request is not covered, which is exact because the algorithm moves exactly one server per fault. Harmonic numbers are Mathlib's harmonic, cast to R. Phases, clean counts and lazy off-line schedules are defined once, in the mission's definition file, and all milestones use them.
A trivializing formalization is ruled out as follows. The additive constant is quantified before σ, so a per-sequence constant cannot be used. The comparison is with the optimum over all off-line schedules, not a particular one. The random choice is among the covered unmarked vertices, with marks updated first. The hypothesis 1≤k≤n excludes the degenerate case k=0, where H0=0.
Proofs of individual milestones are welcome. The laziness reduction for off-line schedules, the exchangeability lemma for the uniform eviction process, and the harmonic-sum identity ∑j=l+1kl/j=l(Hk−Hl) are reusable beyond this mission.
Selected references
A. Fiat, R. M. Karp, M. Luby, L. A. McGeoch, D. D. Sleator, N. E. Young, Competitive Paging Algorithms, J. Algorithms 12(4):685–699, 1991; arXiv:cs/0205038v1. https://arxiv.org/abs/cs/0205038
D. D. Sleator, R. E. Tarjan, Amortized Efficiency of List Update and Paging Rules, Comm. ACM 28(2):202–208, 1985. https://doi.org/10.1145/2786.2793
A. R. Karlin, M. S. Manasse, L. Rudolph, D. D. Sleator, Competitive Snoopy Caching, Algorithmica 3:79–119, 1988. https://doi.org/10.1007/BF01762111
An Analysis of Several Heuristics for the Traveling Salesman Problem I: Nearest Neighbor Tours Can Be Far from OptimalResearch Paper
Motivation
The traveling salesman problem with the triangle inequality asks for a shortest closed tour through n points whose distances form a metric. It is NP-hard, so in practice tours are built by fast construction heuristics, and the natural question is how far such a tour can be from optimal in the worst case. Rosenkrantz, Stearns and Lewis (SIAM J. Comput. 6(3), 1977) gave the first systematic worst-case analysis of the standard heuristics. Their results are reproduced in textbooks on approximation algorithms and combinatorial optimization, and they are the reference point against which later guarantees (Christofides' 3/2 algorithm, the double-tree 2-approximation) are compared.
The simplest heuristic studied is the nearest neighbor algorithm (Bellmore and Nemhauser, 1968; the "next best method" of Gavett, 1965): from the current node, always move to the closest node not yet visited, and return to the start at the end. The paper shows that this greedy rule is never worse than logarithmic (Theorem 1) and that the logarithm cannot be removed (Theorem 2). This mission is about Theorem 2, the lower bound.
Setting
A traveling salesman graph on n nodes is a complete graph with a distance d(a,b)∈R that is symmetric, d(a,b)=d(b,a), nonnegative, d(a,b)≥0, and satisfies the triangle inequalityd(a,c)≤d(a,b)+d(b,c). A tour lists the nodes in a visiting order τ(0),…,τ(n−1) and returns to τ(0); its length is the sum of the n distances along it. OPTIMAL is the least length of a tour.
The nearest neighbor algorithm starts at an arbitrary node τ(0); having reached τ(k), it moves to a node τ(k+1) that minimizes d(τ(k),⋅) over the nodes not yet visited, breaking ties arbitrarily; after the last node it returns to τ(0). The length of the resulting tour is written NEARNEIBER. Because the start node and the ties are free, one instance has in general several nearest-neighbor tours. A lower bound needs only one of them; an upper bound must hold for all.
The instances of the proof are built from a recursive family of weighted graphs. With li=61(4⋅2i−(−1)i+3) (so l1,l2,l3,l4=2,3,6,11), the graph F1 is a triangle with unit weights, and Fi+1 consists of two copies of Fi joined through one new node by two edges of length 1 and two edges of length li. Each Fi has 2i+1−1 nodes and a path Pi from its start node to its middle node through every node, of length Li with L1=2, Li+1=2Li+2li. The graph Gi adds two closing edges to Fi, and Gˉi is the complete graph on the same nodes whose distance is the shortest-path distance of Gi.
Formalization targets
Goal: Theorem 2 (p. 566)
For each m>3 there is a traveling salesman graph with n=2m−1 nodes and a nearest-neighbor tour on it such that
OPTIMALNEARNEIBER>31lg(n+1)+94.
The statement is existential in both the instance and the run of the algorithm, exactly as in the paper.
Milestones, in the order the proof uses them
(2.12): the difference equation Li+1=2Li+2li, L1=2, has the solution Li=91(6i2i+8⋅2i+(−1)i−9).
Gˉi is a traveling salesman graph: the shortest-path distance of Gi is symmetric, nonnegative and satisfies the triangle inequality.
(2.13)–(2.17): the shortest-path distances in Fi+1 between the seven named nodes A,…,G of Fig. 1, e.g. AG=li+2−2.
Property a): every edge of Gi is a shortest path between its endpoints.
Property b): the nearest neighbor algorithm started at the start node of Gˉi can follow Pi and return along the edge of length li−1.
The optimal tour: OPTIMAL(Gˉi)=2i+1−1.
The exact ratio: the tour along Pi has length Li+li−1, so its ratio is (Li+li−1)/n.
The inequality: (Li+li−1)/n>31lg(n+1)+94 for i≥3.
The instance for m is Gˉm−1.
Significance
Theorem 1 of the same paper shows NEARNEIBER/OPTIMAL≤21⌈lgn⌉+21 for every nearest-neighbor tour on every traveling salesman graph. Theorem 2 shows that this bound has the right order: no constant-factor guarantee holds for the nearest neighbor rule, and the gap between the two constants (31 against 21) is all that remains. This separates the nearest neighbor rule from the insertion rules analysed later in the same paper, of which nearest and cheapest insertion are within a factor 2 of optimal. It is the standard example of a natural greedy heuristic whose approximation ratio grows with n.
The upper bound, Theorem 1, is already on Prove2Me with a machine-checked proof (SupplyChainTheory.nearest_neighbor_bound); its statement notes that the lower-bound instances are not formalized there. This mission supplies them: an explicit recursive family of metric instances, the shortest-path computations that certify it, and the arithmetic of its ratio. The result is proved in the paper; to our knowledge it has not been formalized in any proof assistant. The construction (a recursively defined weighted graph with a closed-form shortest-path table) is also a reusable pattern for other worst-case lower bounds of greedy heuristics.
Difficulty
The arithmetic ((2.12) and the final inequality) is routine. The content is in properties a) and b). A shortest-path distance is an infimum over all walks, and property a) asks that no detour through the recursive structure is shorter than the direct edge, at every level of the recursion. The paper handles this by an induction on (2.13)–(2.17) that tracks only seven nodes per level, and argues that distances inside a copy of Fi are not shortened by embedding it into Fi+1. Property b) then needs that at each step of Pi the chosen node is at least as close as every unvisited node, including nodes in the other copy and nodes reached through the start or right nodes; ties occur, and the claim is only that some resolution of them follows Pi. Checking small cases by computer does not give either property for all i.
Formalization scope
Nodes of an instance are Fin n, a tour is a permutation of Fin n, the tour length is the sum over consecutive pairs including the closing edge, and OPTIMAL is a minimum over the finite set of permutations. The model is the paper's: symmetric, nonnegative distances with the triangle inequality. The distance structure also carries d(a,a)=0, a normalization not in the paper; the diagonal never enters a tour length. A nearest-neighbor tour is a permutation in which each step goes to a node at least as close as every unvisited node, from an arbitrary start with arbitrary ties.
Ratios are multiplied out: the goal is (31log2(n+1)+94)⋅OPTIMAL<NEARNEIBER together with OPTIMAL>0, the paper's standing assumption (1.1). lg(n+1) is Real.logb 2 of n+1, as printed. Because of the strict inequality and the conjunct OPTIMAL>0, the all-zero distance does not satisfy the goal, so the statement cannot be met by a degenerate instance.
In the construction the nodes of Fi, Gi, Gˉi are numbered 0,…,2i+1−2 from left to right (start node 0, middle node 2i−1, right node 2i+1−2); in Fi+1 the left copy comes first, then the new node, then the right copy. Graphs are edge lists with real weights and li is defined in R exactly as in (2.11). The shortest-path distance is the infimum of walk weights over an inductive walk predicate; it would be 0 for two nodes with no connecting walk, a case that does not arise because every Gi and Fi is connected. Li is defined by its difference equation; its identification with the length of the tour along Pi is milestone 7. All construction statements assume i≥1.
A complete development needs a small library for shortest-path distances of finite weighted edge lists (symmetry, triangle inequality, attainment, behaviour under relabelling and under gluing two graphs at a few nodes); this part is reusable beyond the mission. Contributions welcome: proofs of any milestone, and such general shortest-path lemmas as separate theorems. Theorem 1 is not part of this mission.
Selected references
D. J. Rosenkrantz, R. E. Stearns, P. M. Lewis II, An Analysis of Several Heuristics for the Traveling Salesman Problem, SIAM J. Comput. 6(3):563–581, 1977. https://doi.org/10.1137/0206041
M. Bellmore, G. L. Nemhauser, The Traveling Salesman Problem: A Survey, Operations Research 16(3):538–558, 1968. https://doi.org/10.1287/opre.16.3.538
J. W. Gavett, Three Heuristic Rules for Sequencing Jobs to a Single Production Facility, Management Science 11(8):B166–B176, 1965. https://doi.org/10.1287/mnsc.11.8.B166
N. Christofides, Worst-Case Analysis of a New Heuristic for the Travelling Salesman Problem, Report 388, Graduate School of Industrial Administration, Carnegie Mellon University, 1976.
Worst-Case Performance Bounds for Simple One-Dimensional Packing Algorithms 4: First-Fit Decreasing Uses at Most 71/60 L* + 5 Bins When No Item Exceeds 1/2Research Paper
Motivation
Bin packing asks how to place a list of items with sizes in (0,1] into as few unit-capacity bins as possible. It models the cutting of stock material, the packing of files onto tracks of a disc and the assignment of jobs to machines with a common deadline. Deciding the optimum is NP-hard, so in practice simple rules are used, and the question is how far they can stray from the optimum in the worst case.
Johnson, Demers, Ullman, Garey and Graham (SIAM J. Comput. 3(4), 1974) gave the first sharp worst-case bounds for the four classical rules. For First-Fit Decreasing (FFD), the rule that sorts the items into nonincreasing order and then places each into the first bin with room, they announced the bound FFD(L)≤911L∗+4, whose full proof in Johnson's thesis exceeds 75 pages. To show the method, Section 4 of the paper proves a simpler bound in detail: when no item exceeds 1/2, FFD uses at most 6071L∗+5 bins. That result is the subject of this mission.
Timeline:
1973: D. S. Johnson's MIT thesis, Near-optimal bin packing algorithms, contains the complete proofs of the 11/9 and 71/60 bounds.
1974: Johnson, Demers, Ullman, Garey and Graham publish the 71/60 bound for lists in (0,1/2] (Theorem 4.1) with a proof that is complete except for parts of two lemmas, and show by example that 71/60 cannot be lowered.
1985: B. S. Baker gives a shorter proof of the 11/9 bound for FFD (J. Algorithms 6, 1985).
2007: G. Dósa determines the tight additive constant 6/9 in the 11/9 bound (ESCAPE 2007, LNCS 4614).
Setting
A list is a finite sequence L=(a1,…,an) of real numbers in (0,1]; values may repeat. A bin has capacity 1; its level is the sum of the numbers in it. The optimum L∗ is the least number of bins into which the elements of L can be placed with no bin level exceeding 1.
First-Fit places a1,a2,… in order into bins B1,B2,…, each initially at level 0: ai goes into the bin of least index whose level β satisfies β≤1−ai. First-Fit Decreasing first arranges L into nonincreasing order and then runs First-Fit. FFD(L) is the number of bins it uses.
The proof uses a weightW on finite sets of elements. For an integer k≥1, x is a k-piece if x∈(k+11,k1], and a k-bin is a bin whose largest element is a k-piece. Set w1(x)=⌊1/x⌋−1. A pair (x,y)obeys relation k if x is a k-piece and kx+y≤1; then w2(x,y)=w1(x)+kk−1w1(y), and otherwise w2(x,y)=w1(x)+w1(y). For a partition π of X into one- and two-element sets, with each pair ordered (earlier, later) in the nonincreasing order,
BASIC is the set of elements of L that are k-pieces lying in a k-bin of the FFD packing of L, for some k; SURPLUS is the rest of L.
Formalization targets
Goal: Theorem 4.1
for every list L⊆(0,21]:FFD(L)≤6071L∗+5.
The constants are those printed in the paper. The multiplicative constant 71/60 is best possible.
Milestones
Lemma 3.3 (FFD part): if FFD(L)>rL∗+d with r,d≥1, the list L′ of the elements of L exceeding (r−1)/r also has FFD(L′)>rL′∗+d.
Claim 4.2.1: for N≥4 and L⊆(N1,21], ∑x∈BASICw1(x)≥FFD(L)−∑j=2N−1jj−1.
Claim 4.2.2: for N≥4, L⊆(N1,21] and every partition π of L into one- and two-element sets, w12(π)≥w1(BASIC)−∑j=3N−1j1.
Lemma 4.2: for N≥4 and L⊆(N1,21], W(L)≥FFD(L)−N+2.
Subadditivity: W(X1∪⋯∪Xk)≤∑iW(Xi).
Lemma 4.3: if X⊆(71,21] and ∑x∈Xx≤1, then W(X)≤6071.
A companion item states the Remark after Theorem 4.1: for every N≥1 there is a list with all elements below 1/3, L∗=60N and FFD(L)=71N.
Significance
Theorem 4.1 shows the weighting-function method in its simplest nontrivial form: a weight whose total is within a constant of the algorithm's bin count, and which no feasible bin can exceed by more than the target ratio. The same method, with more elaborate weights, gives the 11/9 bound for FFD, and it is the model for later worst-case analyses of packing heuristics. The Remark shows that 71/60 is exact for items in (0,1/2], and the Corollary on p. 322 extends the analysis to the asymptotic ratio RFFDα when items are bounded by α∈(8/29,1/2].
The source proof is partial. The billing argument behind Claim 4.2.2 is given only when two auxiliary conditions (G1) and (G2) hold ("The more intricate argument here omitted", p. 321), and Lemma 4.3 is checked in four of about seventy-four cases ("leaving the remaining 70-odd, more or less routine, cases to the ambitious reader", p. 321). Complete details are in Johnson's thesis. The theorem itself is established. A formalization therefore gives the first complete, checked proof in a single place. The finite case analysis of Lemma 4.3 is well suited to machine checking. No machine-checked proof of any FFD bound is known to exist.
Difficulty
The obvious weight w1 alone fails. Claim 4.2.1 shows that w1(BASIC) covers the FFD bins, but many sets X of elements with sum at most 1 have w1(X)>71/60, for example two 2-pieces, a 5-piece and a 6-piece. The pair discounts of w2 repair Lemma 4.3, but they must then be paid for in Lemma 4.2, for every partition. That is Claim 4.2.2: a charge from each discounted pair to distinct SURPLUS elements that are no larger. The charge is straightforward only when no member of a pair obeying relation k lies in a bin of type k′<k. In general a pair's larger element may already have been charged by a smaller relation, and the paper omits the argument that handles this. Lemma 4.3 is elementary but has many cases, each determined by the piece types in X and the relations they obey.
Formalization scope
A list is L : List ℝ with IsList L (0<a≤1 for each element) in every statement. L∗ is optBins L, the least b such that some map from positions to Fin b has every bin sum at most 1. The First-Fit run keeps the nonempty bins as a List (List ℝ), and opens a new bin at the end exactly when no existing bin fits, which is the paper's "least j". The fit test is β+a≤1. FFD is First-Fit on sortDesc L, the mergeSort into nonincreasing order; ties do not affect the bin count. Indices are 0-based.
W(X) sorts X into nonincreasing order and minimises w12 over the involutions of its positions: fixed points are singletons, and a pair i<σ(i) is oriented (larger, smaller). The minimum is over a finite nonempty set, so it is attained. BASIC is a set of positions of sortDesc L, and each position's bin is its bin in the final FFD packing. In w2, k=⌊1/x⌋ is the piece type of the first element. Sums ∑j=2N−1 are over Finset.Icc 2 (N - 1) with N≥4.
The goal's range is (0,1/2]. The restriction to (1/7,1/2] belongs only to the proof, through Lemma 3.3. Stating the goal for (1/7,1/2], weakening 71/60 or 5, or making W an unattained infimum would each change the theorem. Only the FFD half of Lemma 3.3 is stated. Claim 4.2.1 is stated with Lemma 4.2's standing hypothesis N≥4. The Remark's printed range 0<ε≤5/87 is a misprint: its FFD packing needs ε<1/174, and the companion item states only the existence claim.
Infrastructure needed: a usable API for the First-Fit run (the invariants of the fold, bin levels, the order of bins), a lemma that FFD bins receive items in nonincreasing order, and a decision procedure for Lemma 4.3's case analysis over piece types. The model file and the weight file are reusable for the 11/9 bound (mission 3 of this series) and for the bounded-α corollaries. Contributions of proofs of Lemma 4.3 by computer-checked case enumeration, and of the missing general case of Claim 4.2.2, are especially welcome.
Selected references
D. S. Johnson, A. Demers, J. D. Ullman, M. R. Garey, R. L. Graham, Worst-Case Performance Bounds for Simple One-Dimensional Packing Algorithms, SIAM J. Comput. 3(4):299–325, 1974. https://doi.org/10.1137/0203025
D. S. Johnson, Near-Optimal Bin Packing Algorithms, Ph.D. thesis, Massachusetts Institute of Technology, 1973 (reference [8] of the paper).
B. S. Baker, A new proof for the first-fit decreasing bin-packing algorithm, J. Algorithms 6, 1985.
G. Dósa, The tight bound of first fit decreasing bin-packing algorithm is FFD(I) ≤ 11/9 OPT(I) + 6/9, ESCAPE 2007, Lecture Notes in Computer Science 4614, 2007.
Worst-Case Performance Bounds for Simple One-Dimensional Packing Algorithms 2: First-Fit and Best-Fit with Bounded Item SizesResearch Paper
Motivation
Bin packing asks for the fewest unit-capacity bins that hold a given list of item sizes. It models cutting stock, memory allocation, file placement and the loading of trucks, and it is NP-hard, so in practice lists are packed by simple rules that look at one item at a time. The two most widely used rules are First-Fit and Best-Fit, and the question that Johnson, Demers, Ullman, Garey and Graham answered in 1974 is how far from optimal they can be in the worst case.
Their headline answer is that both rules use at most about 1017 times the optimal number of bins, and that 1017 is asymptotically attained. The lists that force this ratio use items larger than 21. When all items are known to be small, which is typical of memory and storage applications, the guarantee is much better, and this mission is about that refinement: the paper's Theorem 2.3 and its corollary, which determine the asymptotic worst-case ratio of First-Fit and Best-Fit exactly as a function of the largest allowed item size α≤21.
Timeline. Ullman (1971) introduced the worst-case analysis of First-Fit with a 1017L∗+3 bound. Garey, Graham and Ullman (1972) and Johnson's thesis (MIT, 1973) extended it to Best-Fit and to the decreasing variants. The 1974 SIAM paper collects these results; Theorem 2.3 there is the parametric bound for items of size at most α. The additive constants in the unrestricted 1017 bound were sharpened over the following four decades, culminating in Dósa and Sgall's proof (2013) that FF(L)≤⌊1017L∗⌋.
Setting
A list is a finite sequence L=(a1,…,an) of real numbers in (0,1]. Its optimumL∗ is the least number of bins into which the elements of L can be placed so that no bin contains numbers whose sum exceeds 1. The level of a bin is the sum of the numbers in it. For a real α>0, write L⊆(0,α] when every element of L is at most α.
First-Fit (FF) considers bins B1,B2,…, all initially empty, and places a1,a2,…,an in that order: ai goes into the bin Bj of least index whose level β satisfies β≤1−ai. Best-Fit (BF) is the same except that, among the bins with β≤1−ai, it chooses one of largest level β (least index among ties). FF(L) and BF(L) denote the numbers of nonempty bins at the end.
Throughout, 0<α≤21 and m=⌊α−1⌋, an integer with m≥2 and m+11<α≤m1.
Formalization targets
Goal: the asymptotic ratio (Corollary of Theorem 2.3, p. 308)
k→∞limRFFα(k)=k→∞limRBFα(k)=1+⌊α−1⌋1.
The goal is stated as a limit, which is the stable form of the result: it is unaffected by any improvement of the additive constants below.
Theorem 2.3(i): the lower bound (p. 307)
For each k≥1 there is a list L⊆(0,α] with L∗=k and FF(L)≥mm+1L∗−m1; likewise for BF.
Two steps of the First-Fit upper bound (p. 308)
If no element of L exceeds m1, then in the First-Fit packing every bin except possibly the last contains at least m elements, and all but at most two bins have level at least m+1m.
Theorem 2.3(ii): the upper bounds (p. 307)
For every list L⊆(0,α],
FF(L)≤mm+1L∗+2,BF(L)≤mm+1L∗+2.
Significance
The theorem gives an exact, parametric description of how the worst case of the two greedy rules improves as items shrink: the asymptotic ratio is 23 when items are at most 21, 34 when at most 31, and tends to 1 as the maximum item size tends to 0. Combined with the 1017 bound for unrestricted lists, it shows that the bad behaviour of First-Fit is caused entirely by items larger than 21. Such parametric bounds are the standard way bin-packing heuristics are compared in the literature on online and semi-online packing, and the construction in part (i) is a reusable template for lower-bound lists.
The paper proves the First-Fit upper bound and the lower bound (the verification of the lower-bound construction is left to the reader). The Best-Fit upper bound is stated but not proved: the paper says only that "a similar, but slightly more complicated, argument can be used". A formal proof of the goal therefore requires supplying that argument. None of these results is known to have a machine-checked proof; Mathlib contains no bin-packing development.
Difficulty
For First-Fit the upper bound is a counting argument, but it rests on a property of the run, not of the final packing: an item that went into a later bin did not fit into an earlier bin at the moment it was placed. Turning that into a statement about the final levels requires an invariant maintained through the whole sequence of placements.
The Best-Fit upper bound is harder because that property fails: Best-Fit may put a small item into a fuller, later bin while an earlier, lighter bin still has room, so a light early bin and a light later bin can coexist longer than under First-Fit. The paper gives no argument for this case.
The lower bound requires computing the exact behaviour of both algorithms on a specific interleaved list with item sizes perturbed by powers of m, and computing L∗ exactly for that list, which needs a matching lower bound on the optimum.
Formalization scope
A list is L : List ℝ with the hypothesis IsList L (every element in (0,1]); L⊆(0,α] is the additional hypothesis ∀ a ∈ L, a ≤ α. L∗ is optBins L, a sInf in ℕ over numbers of bins admitting a feasible assignment; the hypothesis IsList makes the set nonempty. The runs ffPack L and bfPack L are folds over the list that keep the nonempty bins in the order they were opened, each with its contents; an item that fits nowhere opens a new bin at the end, which is the paper's "least j" over infinitely many empty bins. Comparisons are exact (classical decidability on ℝ), and FF(L), BF(L) are the lengths of the final bin lists. m is Nat.floor α⁻¹, cast before any division.
The ratios RFFα(k), RBFα(k) are suprema taken in ℝ≥0∞: an unbounded family would give +∞, never a default value, and at k=0 the only admissible list is empty and the value is 0. The goal is a Tendsto … atTop (𝓝 (1 + (⌊α⁻¹⌋₊)⁻¹)) statement in ℝ≥0∞. A real-valued sSup would have returned 0 on an unbounded family and made a false bound look provable; that encoding is ruled out. The upper bounds keep the additive constant 2 and the lower bound the subtractive m1 exactly as printed.
The two proof steps are stated under the proof's own hypothesis "no element exceeding 1/m", which is weaker than L⊆(0,α].
A complete development needs invariants of the First-Fit and Best-Fit folds, a lower bound L∗≥∑iai, and exact evaluation of both runs on the construction of part (i). Lemmas about the fold encoding of First-Fit and Best-Fit and about L∗ are reusable in the companion missions on the 1017, 911 and 6071 bounds of the same paper. Contributions on the Best-Fit upper bound are especially welcome, since the source gives no proof.
Selected references
D. S. Johnson, A. Demers, J. D. Ullman, M. R. Garey, R. L. Graham, Worst-Case Performance Bounds for Simple One-Dimensional Packing Algorithms, SIAM Journal on Computing 3(4):299–325, 1974. https://doi.org/10.1137/0203025
J. D. Ullman, The Performance of a Memory Allocation Algorithm, Technical Report 100, Princeton University, 1971.
M. R. Garey, R. L. Graham, J. D. Ullman, Worst-Case Analysis of Memory Allocation Algorithms, Proc. 4th ACM Symposium on Theory of Computing, 143–150, 1972. https://doi.org/10.1145/800152.804907
D. S. Johnson, Near-Optimal Bin Packing Algorithms, PhD thesis, Massachusetts Institute of Technology, 1973. http://hdl.handle.net/1721.1/57819
Worst-Case Performance Bounds for Simple One-Dimensional Packing Algorithms 1: First-Fit and Best-Fit Have Asymptotic Worst-Case Ratio 17/10Research Paper
Motivation
Bin packing asks for the fewest unit-capacity bins that hold a given list of item sizes. It is one of the first problems studied through the worst-case analysis of approximation algorithms, and it models storage allocation, paging and file placement on tracks, as well as cutting-stock problems in operations research. Deciding the optimum exactly is NP-hard, so the practical question is how badly simple rules can do. The two simplest on-line rules, First-Fit and Best-Fit, are still the baseline against which every later bin-packing heuristic is measured.
Timeline:
1972. Garey, Graham and Ullman announce that First-Fit uses at most about 1.7 times the optimal number of bins (Proc. 4th ACM STOC, 1972); Johnson's thesis (MIT, 1973) develops the analysis.
1974. Johnson, Demers, Ullman, Garey and Graham prove FF(L)≤1.7L∗+2 and BF(L)≤1.7L∗+2 for every list, and give lists with FF(L)=BF(L)>1.7L∗−8 for every optimum L∗=k, so the asymptotic worst-case ratio of both rules is exactly 1017 (SIAM J. Comput. 3(4)). This paper is the source of the mission.
1976–2014. The additive constant is lowered: Garey, Graham, Johnson and Yao (1976) show FF(L)≤⌈1.7L∗⌉, and Dósa and Sgall prove the tight bound FF(L)≤⌊1.7L∗⌋ (STACS 2013) and the same bound for Best-Fit (ICALP 2014).
Setting
A list is a finite sequence L=(a1,a2,…,an) of real numbers in (0,1]; values may repeat. A bin has capacity 1, and its level is the sum of the numbers in it. The optimumL∗ is the minimum number of bins into which the elements of L can be placed so that no bin contains numbers whose sum exceeds 1.
Both rules place a1,…,an in this order into bins B1,B2,…, each initially at level 0, and never move an element once placed.
First-Fit (FF) places ai into the bin Bj of least index whose level β satisfies β≤1−ai.
Best-Fit (BF) places ai into a bin whose level β satisfies β≤1−ai and is as large as possible, taking the least index among ties.
FF(L) and BF(L) are the numbers of nonempty bins at the end. The worst-case ratio at optimum k is
The analysis also uses a weighting functionW:[0,1]→[0,1], piecewise linear with W(α)=56α on [0,61], 59α−101 on (61,31], 56α+101 on (31,21] and 1 on (21,1], and the coarseness of a bin of a completed packing: the largest 1−level(B′) over the bins B′ of smaller index, and 0 for the first bin.
Formalization targets
Goal: the asymptotic ratio (Corollary of Section 2, p. 306)
k→∞limRFF(k)=1.7andk→∞limRBF(k)=1.7.
The goal fixes only the asymptotic ratio and leaves the additive constants free, so it is the statement that survives the later improvements of the constants.
Milestones, in the order the proof uses them
Claim 2.2.1 (p. 304): a bin with total size at most 1 has ∑iW(bi)≤1017.
Claim 2.2.2 (p. 305): in an FF or BF packing, every element placed into a bin before the bin was more than half full exceeds the bin's coarseness.
Claim 2.2.3 (p. 305): a bin of coarseness α<21 whose level exceeds 1−α has weight at least 1.
Claim 2.2.4 (p. 306): a bin of coarseness α<21 with weight 1−β, β>0, either holds a single element at most 21 or has level at most 1−α−95β.
Theorem 2.2 (p. 304): FF(L)≤1.7L∗+2 and BF(L)≤1.7L∗+2 for every list.
Theorem 2.1 (p. 301): for every k≥1 there is a list with L∗=k and FF(L)=BF(L)>1.7L∗−8.
A companion item, not a milestone, records the explicit list of Fig. 3 (p. 307) with L∗=10 and FF(L)=BF(L)=17.
Significance
The result fixes the worst-case behaviour of the two simplest bin-packing heuristics: neither ever uses more than about 70% more bins than an optimal packing, and both can be forced to. The weighting-function technique introduced for this bound became the standard method for analysing bin-packing heuristics, including First-Fit Decreasing, Harmonic-type algorithms and on-line lower bounds, and the constant 1017 is the reference point for later on-line algorithms.
The theorem is proved, and its constants have since been sharpened. No machine-checked proof of any of these results is known. This mission produces a Lean model of on-line bin packing (the optimum, the First-Fit and Best-Fit runs with their placement history, and the worst-case ratio) that the other missions of this paper and later bin-packing formalizations can reuse. It also produces formal proofs of the weighting-function bounds, of the 1.7L∗+2 upper bound and of the lower-bound construction.
Difficulty
The first idea, charging each bin its level, gives only FF(L)≤2L∗+1: at most one bin is at most half full. The ratio 1017 comes from bins that are more than half full but far from full, and a bound on the total size of the elements cannot see them. No property of the final packing alone suffices: the bins that are far from full can only be controlled through the order in which the rule opened and filled them, so the argument depends on the dynamics of the run. On the lower-bound side, the natural periodic list (sizes near 61,31,21, p. 301) gives only the ratio 35; reaching 1017 needs a list on which both rules waste space in every medium bin, for every k, while L∗ is still known exactly.
Formalization scope
A list is L : List ℝ with the hypothesis IsList L (every element in (0,1]), and every statement assumes it. L∗ is optBins L, the least b : ℕ for which some assignment Fin L.length → Fin b has every bin sum at most 1. A run is a fold over the list that keeps only the nonempty bins, in index order, each with its contents in placement order. A new bin is opened at the end exactly when no nonempty bin fits, which is the paper's "least j" over infinitely many initially empty bins, since elements are positive. The fit test is the non-strict β+ai≤1, and Best-Fit breaks ties by least index. The placement history (the bin chosen for each element and that bin's level just before) is read off the run on the prefix of the list. Indices are 0-based. Coarseness is computed in the completed packing. W is a function ℝ → ℝ and is only ever applied to elements of (0,1]. RFF(k) and RBF(k) are suprema in the extended nonnegative reals [0,∞], and the limit is taken there.
A real-valued supremum would be 0 on an empty or unbounded family, and the limit statement would then say nothing about the algorithms. The extended-real supremum rules this trivialization out. Every claim is stated for the concrete First-Fit run and the concrete Best-Fit run, not for an abstract rule with the properties used in the proof.
Claim 2.2.4 is printed with alternative (i) "m=1 and b1<21", which is false: First-Fit on (0.6,0.5) gives a counterexample. The mission states it with b1≤21, which is what the paper's proof establishes and what the main proof uses. The milestone text keeps the printed version.
The model definitions are reusable for any on-line bin-packing rule, since the run is parameterized by the choice rule. Contributions welcome: proofs of the milestones, general lemmas about the runs (levels stay at most 1, at most one bin is at most half full, the history determines the final packing), and the computation of L∗ for the explicit lists of Theorem 2.1 and Fig. 3.
Selected references
D. S. Johnson, A. Demers, J. D. Ullman, M. R. Garey, R. L. Graham, Worst-Case Performance Bounds for Simple One-Dimensional Packing Algorithms, SIAM Journal on Computing 3(4):299–325, 1974. https://doi.org/10.1137/0203025
M. R. Garey, R. L. Graham, J. D. Ullman, Worst-case analysis of memory allocation algorithms, Proc. 4th ACM STOC, 1972.
D. S. Johnson, Near-Optimal Bin Packing Algorithms, PhD thesis, MIT, 1973.
M. R. Garey, R. L. Graham, D. S. Johnson, A. C. Yao, Resource constrained scheduling as generalized bin packing, J. Combinatorial Theory Ser. A 21, 1976.
Approximation Techniques for Average Completion Time Scheduling I: Best-α on One Machine with Release DatesResearch Paper
Motivation
Minimizing the average completion time of jobs that arrive over time is one of the basic objectives of machine scheduling: it measures how long, on average, a job waits in the system. On a single machine with release dates and no preemption (written 1∣rj∣∑Cj), the problem is strongly NP-hard, so research has focused on approximation algorithms whose guarantees are stated against every feasible schedule.
The standard route runs through the preemptive relaxation. When jobs may be interrupted and resumed, the shortest-remaining-processing-time rule (SRPT) produces an optimal schedule, and its value is a lower bound for every nonpreemptive schedule. The question is how to turn that preemptive schedule into a nonpreemptive one without losing too much.
Timeline:
1995, Phillips, Stein and Wein (WADS 1995, pp. 86–97): order the jobs by their SRPT completion times and schedule them nonpreemptively in that order. This gives a 2-approximation. Later 2-approximations are by Hoogeveen and Vestjens (IPCO 1996), Stougie (1995), and Goemans (SODA 1997). Hoogeveen and Vestjens also showed that deterministic on-line algorithms cannot beat 2.
2001, Chekuri, Motwani, Natarajan and Stein (SIAM J. Comput. 31(1)): order by α-points instead of completion times, choose α at random, and take the best α off-line. This gives the e/(e−1)≈1.58 bound for Best-α that is the goal of this mission, and an optimal randomized on-line algorithm.
1999, Afrati et al. (FOCS 1999): a polynomial-time approximation scheme for 1∣rj∣∑wjCj. This settled the approximability of the problem, but the resulting algorithms are far from simple.
Setting
An instance has n jobs J0,…,Jn−1. Job Jj has a processing timepj>0, a release daterj≥0, and, where the objective is weighted, a weight wj>0. There is one machine.
A nonpreemptive schedule assigns each job a start time Sj≥rj such that the intervals [Sj,Sj+pj) are pairwise disjoint. Its completion times are Cj=Sj+pj.
A preemptive scheduleP specifies, for each time t, which job runs at t, if any. Job Jj runs only at times t≥max(0,rj), receives exactly pj units of processing in total, and finishes by some finite time. Its completion timeCjP is the first time by which all of Jj has been processed. For α∈(0,1], its α-pointCjP(α) is the first time by which αpj units have been processed.
For a job Ji, Ti denotes the idle time of P before CiP. xij denotes the fraction of Jj processed before CiP. The paper writes SiP(β) for the set of jobs with xij=β, and also for their total processing time.
One-machine list scheduling in a given order runs the jobs nonpreemptively in that order. Each job starts at the later of its release date and the completion of the previous job in the list. An α-schedule is list scheduling in nondecreasing order of the α-points CjP(α). Cjα denotes the completion times of an α-schedule.
Random-α draws α from a distribution on (0,1] and outputs the α-schedule. Best-α outputs the α-schedule of smallest total completion time minα∑jCjα.
Formalization targets
Goal: Corollary 2.7
Let P be optimal among preemptive schedules for ∑jCj. Then there is α∈(0,1] such that every α-schedule derived from P satisfies
j∑Cjα≤e−1ej∑Cjfor every feasible nonpreemptive schedule (Cj)j.
Since Best-α returns a schedule no worse than this α-schedule, Best-α is an e/(e−1)-approximation.
Milestones
The calculus behind the constant. For f(α)=eα/(e−1) and every β∈(0,1],
Lemma 2.5: if α has density f on (0,1], then E[Ciα]≤(1+δ)CiP with δ=max0<β≤1∫0ββ1+α−βf(α)dα.
Theorem 2.6, for the weighted objective with P optimal among preemptive schedules: the expected approximation ratio of Random-α is at most 2 for uniform α, at most 1.8 for α=1 w.p. 3/5 and α=1/2 w.p. 2/5, and at most e/(e−1) for the density eα/(e−1).
Companion statements, not milestones:
the upper bound of Theorem 2.1, ∑jCjα≤(1+1/α)∑jCjP;
the existence of an optimal preemptive schedule.
Significance
The e/(e−1) bound shows that conversion from the preemptive relaxation can beat the factor 2 of the natural ordering. It does so by exploiting that no single instance is bad for many values of α at once. The α-point technique was also used with LP relaxations, for example by Goemans (SODA 1997) and by Schulz and Skutella. The randomized version is an optimal randomized on-line algorithm for 1∣rj∣∑Cj. Lemma 2.3 is a statement about any preemptive schedule, so it applies wherever a good preemptive or fractional schedule is available.
All results of the mission are proved in the paper, except that the proof of Theorem 2.6, part 2 is omitted there. No machine-checked proof of them is known. A complete development would give a verified model of preemptive one-machine schedules, α-points and list scheduling, together with the averaging argument over α. These are reusable for the later results of the same paper and for the α-point literature.
Difficulty
The obvious argument bounds each job's α-schedule completion time directly against its preemptive completion time. That argument loses a factor 1+1/α (Theorem 2.1), which is at least 2 for every fixed α. The improvement needs Lemma 2.3. There the charge to each job depends on how much of it was done by CiP relative to α, and the idle time Ti is not inflated at all. Proving Lemma 2.3 requires reasoning about a preemptive schedule as a measure on time, and about how moving pieces of jobs changes completion times. A proof that treats the preemptive schedule as a finite list of pieces must first show that nothing is lost by this discretization.
The averaging step needs the expectation over α to be an honest integral. The map α↦Ciα must be shown integrable, which requires a fixed rule for ties between equal α-points.
Formalization scope
Model. Jobs are Fin n, time is real, pj>0 and rj≥0. The paper admits pj=0 only in its tightness instances.
A preemptive schedule is a function σ:R→Option (Fin n) (none = idle). Each job's run set is measurable, lies in [max(0,rj),∞), is bounded above, and has Lebesgue measure pj.
Completion times and α-points are infima of nonempty sets that are bounded below.
Ti is the measure of the idle set in [0,CiP).
The paper's sums over β are sums over jobs, weighted by the fraction xij.
List scheduling is strict: jobs never overtake the list order, and the machine is free from time 0.
Lemma 2.3, Theorem 2.1, Theorem 2.6.2 and the goal hold for every tie-break among equal α-points.
The expectations (Lemma 2.5, Theorem 2.6.1 and 2.6.3) use the tie-break by job index. They assert integrability as part of the conclusion.
Optimality. "Approximation ratio c" is stated as an inequality against every feasible nonpreemptive schedule, never against an infimum.
The optimality of P among preemptive schedules is the paper's standing assumption for its upper bounds (p. 151). It appears as a hypothesis of Theorem 2.6 and of the goal.
The lemmas hold for arbitrary P and do not carry it.
An existence statement shows the hypothesis can be met.
Lemma 2.5's δ is replaced by any upper bound of the integrals over β∈(0,1]. This is equivalent, and it avoids assuming that the maximum is attained.
Not stated:
the running time O(n2) of Best-α and the optimality of SRPT;
the tightness parts of Theorem 2.1 and Corollary 2.4, and the lower bounds of Theorem 2.9, which use zero-length jobs;
the on-line Theorem 2.8, which needs a model of on-line algorithms.
Trivializing formalization ruled out. Dropping the optimality of P from the goal would turn it into a statement about arbitrary preemptive schedules, which is Lemma 2.5, not Corollary 2.7. Comparing against ∑jCjP instead of every nonpreemptive schedule would likewise remove the content of the corollary.
Contributions are welcome at every level. The calculus milestone and Lemma 2.2 are good first targets.
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
C. Phillips, C. Stein, J. Wein, Scheduling jobs that arrive over time, Proc. 4th Workshop on Algorithms and Data Structures (WADS), 1995, pp. 86–97 (reference [25] of the paper; no link verified).
J. A. Hoogeveen, A. P. A. Vestjens, Optimal on-line algorithms for single-machine scheduling, Proc. 5th IPCO, 1996, pp. 404–414 (reference [21]; no link verified).
M. X. Goemans, Improved approximation algorithms for scheduling with release dates, Proc. 8th ACM-SIAM SODA, 1997, pp. 591–598 (reference [12]; no link verified).
F. Afrati et al., Approximation schemes for minimizing average weighted completion time with release dates, Proc. 40th FOCS, 1999 (reference [2]; no link verified).
Local Search Heuristics for k-Median and Facility Location Problems III: Add-Drop-Swap Local Search for Uncapacitated Facility Location Has Locality Gap 3Research Paper
Motivation
The uncapacitated facility location (UFL) problem is one of the basic models of location theory and operations research: a firm chooses which warehouses, plants or servers to open, paying a fixed cost for each open site and a service cost for every client according to its distance to the nearest open site. It is also a standard test case for approximation algorithms.
Local search is the simplest of these and the one most used in practice: start from any set of open facilities and repeatedly add, drop or exchange one facility while this lowers the cost. The question is how bad a solution can be when no such move helps. Arya, Garg, Khandekar, Meyerson, Munagala and Pandit (SIAM J. Comput. 33(3), 2004) answered it for UFL with an exact constant.
Timeline. Korupolu, Plaxton and Rajaraman (SODA 1998, J. Algorithms 2000) analysed local search with add, drop and swap moves and proved a locality gap of at most 5; their analysis contains the service cost bound restated here as Lemma 4.1. Charikar and Guha (FOCS 1999) proved a locality gap of 3 for a different local search, in which one facility is added and any number are dropped. Arya et al. (STOC 2001; journal version 2004) proved that the add/drop/swap neighbourhood itself has locality gap at most 3, and gave an instance showing that 3 cannot be improved (§4.3).
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. The cost of serving client j by facility i is cji=d(j,i); the distance cii′ between two facilities is also available. Each facility i∈F has an opening costfi≥0.
A solution is a nonempty set S⊆F of open facilities. Every client is served by its nearest open facility, so
The neighbourhood of S is the set of solutions reachable by adding one facility, dropping one facility, or swapping one open facility for another:
B(S)={S+{s′}}∪{S−{s}∣s∈S}∪{S−{s}+{s′}∣s∈S}.
S is locally optimum if cost(S)≤cost(S′) for every S′∈B(S). The locality gap is the supremum, over all instances, of the ratio between the cost of a worst local optimum and the cost of a global optimum.
The proofs use the following notation, which appears in the milestones but not in the goal. Fix a second solution O and nearest-facility assignments σS:C→S, σO:C→O; write Sj=cjσS(j), Oj=cjσO(j), NS(s)=σS−1(s), NO(o)=σO−1(o) and Nso=NO(o)∩NS(s). A facility s∈Scaptureso∈O if ∣Nso∣>21∣NO(o)∣; s is good if it captures no facility of O and bad otherwise. The proof of the facility cost bound uses a permutation π of the clients that maps each NO(o) onto itself, moves every client of a non-capturing block Nso out of that block (Property 3.1), and fixes every client of a capturing block that it would map into the same block.
Formalization targets
Goal: Theorem 4.3
cost(S)≤3⋅cost(O)for every locally optimum S and every solution O.
This is the locality gap bound of Theorem 4.3 (p. 557) in its strongest printed form: O is any solution, not only an optimal one.
Milestones
Lemma 4.1 (service cost), p. 554: costs(S)≤costf(O)+costs(O).
The refined mapping π of the proof of Lemma 4.2, p. 555: such a permutation exists for any two assignments.
Inequality (5), p. 555: the drop move for a good facility s,
Inequality (6), pp. 555–556: the swap of a bad facility s with the facility o it captures that is nearest to it.
Inequality (8), p. 556: for a bad facility s capturing the set P⊆O, the analogue of (5) with ∑o′∈Pfo′−fs in place of −fs.
Lemma 4.2 (facility cost), p. 555: costf(S)≤costf(O)+2⋅costs(O).
A companion item, not a milestone, states the bound in the proof of Theorem 4.4 with α=2: a local optimum of the instance with facility costs 2fi costs at most (1+2)cost(O) in the original instance.
Significance
The result. Theorem 4.3 shows that the simplest local search for metric UFL is within a factor 3 of optimal at every local optimum, with no LP and no rounding, and the tight example of §4.3 shows the analysis cannot be improved for this neighbourhood. Because Lemmas 4.1 and 4.2 hold against every solution O, scaling the facility costs before running local search trades the two bounds against each other and gives the 1+2+ϵ guarantee of Theorem 4.4. The same capture-and-reassign technique is used for k-median (§3) and capacitated facility location (§5).
Formalizing it. The theorem is proved on paper; no machine-checked proof of it or of any locality gap bound for facility location is known to this mission. A formal development would check the reassignment arguments, which are stated case by case in the paper, and would produce reusable Lean infrastructure for metric facility location instances, nearest-facility costs and neighbourhood-based local optimality.
Difficulty
The service cost bound is routine; the facility cost bound is where the work lies. The natural first idea, closing a facility s∈S and sending each of its clients to the facility of S nearest to that client's optimal facility, fails when s serves most of the clients of some o∈O: the nearest facility of S to o may be s itself, so the client has nowhere to go. The proof separates good facilities, which can be dropped, from bad ones, which must be swapped with a captured facility, and pays for the clients that cannot be moved through the distance between s and its nearest captured facility. The combinatorial core is the construction of a permutation within each NO(o) that avoids every non-capturing block and has fixed points only where they are unavoidable.
Formalization scope
Clients and facilities are finite types Cl and Fa. The distance is a real-valued function on Cl ⊕ Fa that is nonnegative, symmetric and satisfies the triangle inequality; d(x,x)=0 is not assumed, since the paper neither states nor uses it. Opening costs are a function f : Fa → ℝ with 0 ≤ f i, and demands are unit, as in the paper.
Solutions are nonempty Finsets. The service cost is ∑jmini∈Scji (Finset.inf') and is defined only for nonempty sets, so no junk value for ∅ enters. Accordingly the drop move is considered only when a facility remains open; with at least one client, ∅ cannot serve anyone and is not a solution. Local optimality is required for all moves of B(S): every added facility, every dropped facility and every swap, not only the moves used in the proof. The goal is stated as the multiplied-out inequality cost(S)≤3cost(O) for every nonempty O, never as a ratio, since cost(O) may be 0.
In the milestones, the nearest-facility assignments σS, σO are arbitrary among the nearest ones (ties broken arbitrarily), and the family of bijections π:NO(o)→NO(o) is a single permutation of the clients with σO∘π=σO. Inequality (5) assumes at least one client, which the paper assumes implicitly: with no clients and S={s} it would read −fs≥0. The goal and Lemma 4.2 need no such assumption.
A statement that assumes local optimality only for the moves the proof uses, that fixes O to be a global optimum defined by hypotheses, or that allows the empty set a zero service cost would be a different theorem; none of these is used.
Needed infrastructure: sums over nearest-facility assignments and their fibers NO(o), the permutation π, and bookkeeping of the three kinds of moves. The instance, cost and local optimality definitions are reusable for other local search analyses of metric location problems. Proofs of any milestone are welcome, as are alternative proofs 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. 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
M. Charikar, S. Guha, Improved Combinatorial Algorithms for the Facility Location and k-Median Problems, FOCS 1999, 378–388. https://doi.org/10.1109/SFFCS.1999.814609
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 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 IV: Support Vector Machines and the Margin BoundTextbook
Motivation
Support vector machines were, for two decades, the workhorse of applied classification, and
the reason offered for their success was always geometric: SVMs maximize the margin between
the two classes. Chapter 3's VC-dimension bound cannot explain why this should help — for
linear hypotheses in RN its bound depends on N+1 and is uninformative whenever the
feature dimension is large relative to the sample size, exactly the regime (kernel-induced or
high-dimensional features) where SVMs are most often used. Chapter 5 answers the question this
leaves open: a generalization bound for a real-valued hypothesis, stated in terms of its
margin on the training sample, that does not depend on the ambient dimension at all. This is
also the template every later chapter's margin bound specializes (multi-class classification,
ranking, and, indirectly, boosting all reuse the same Rademacher-complexity-of-a-Lipschitz-loss
argument developed here).
Setting
A hypothesis here is a real-valued function h:X→R, not (as in Chapters 2-3) a
function into {−1,+1}: for a labeled point (x,y) with y∈{−1,+1}, the sign of h(x)
gives the prediction and ∣h(x)∣ is read as the classifier's confidence. The confidence
margin of h at (x,y) is yh(x); it is positive exactly when h classifies x
correctly. For ρ>0, the ρ-margin lossΦρ:R→R
(Definition 5.5) is
Φρ(x)=min(1,max(0,1−ρx)),
equal to 1 when x≤0 (misclassified), 0 when x≥ρ (classified with confidence at
least ρ), and interpolating linearly in between; it is 1/ρ-Lipschitz. The
empirical margin loss on a sample S=(x1,…,xm) with labels y1,…,ym
(Definition 5.6) is R^S,ρ(h)=m1∑i=1mΦρ(yih(xi)) — the
fraction of training points misclassified or classified with confidence below ρ, a
strictly stronger requirement than plain misclassification. The (population) generalization
error is R(h)=Pr(x,y)∼D[yh(x)≤0]. Rademacher complexity, R^S(H) and
Rm(H) (Definitions 3.1-3.2, restated here since chunk 03-rademacher-vc's own copies are
still drafts), measure how well a real-valued hypothesis class H correlates with random sign
noise on a sample, and are the vehicle through which the margin bound's complexity term is
expressed.
Formalization targets
Lemma 5.7 (Talagrand's lemma, milestone). For l-Lipschitz Φ1,…,Φm:R→R and any hypothesis set H of real-valued functions,
m1Eσ[h∈Hsupi=1∑mσi(Φi∘h)(xi)]≤lR^S(H).
Theorem 5.10 (Rademacher complexity of bounded-norm linear hypotheses, milestone). For
S⊆{x:∥x∥≤r} and H={x↦w⋅x:∥w∥≤Λ},
R^S(H)≤r2Λ2/m.
Corollary 5.11 (margin bound for linear hypotheses, milestone). For the same H and
X⊆{x:∥x∥≤r}, fixing ρ>0, with probability at least 1−δ,
R(h)≤R^S,ρ(h)+2mr2Λ2/ρ2+2mlog(1/δ)for all h∈H.
Theorem 5.8 — the mission's goal. For any set H of real-valued functions and ρ>0,
with probability at least 1−δ, both
Theorem 5.8 is genuinely dimension-free: unlike Chapter 3's VC-dimension bound (5.36 in the
book, restated from Corollary 3.19), it holds regardless of the ambient feature dimension N,
depending instead only on the hypothesis class's Rademacher complexity and the chosen margin
ρ. Specialized to bounded-norm linear hypotheses (Corollary 5.11), this gives the
theoretical justification most often cited for SVMs and every other margin-maximization
algorithm: whenever the training data admits a large geometric margin, the empirical margin
loss at that margin is small (often zero, in the separable case) and the bound is tight
regardless of N. Every later chapter's own margin bound (multi-class in Chapter 9, ranking in
Chapter 10) is a direct structural descendant of Theorem 5.8's proof technique. No prior art on
the Prove2Me platform is faithful: GET /theorems?q=support+vector+machine and q=margin+bound
return no hits on this book's model (the two q=margin+bound hits found, both from the Aether
Catalog, state a different comparison — a VC-type bound is eventually worse than a fixed
Rademacher-type bound as a function of dimension — not Theorem 5.8 itself); q=Talagrand and
q=contraction+principle return several hits (Ledoux/Talagrand convex-distance concentration,
Rudin's Banach-space contraction-mapping theorem, a generic Rademacher-sign contraction lemma
for quadratic sums) but every one states either a different mathematical object (metric-space
fixed points, Talagrand's concentration inequality on product spaces) or a different idiom
(squared vs. linear coordinate sums) from Lemma 5.7's function-composition contraction — none
reused. All nine items are drafted fresh.
Not formalized here: Theorem 5.4 (the SVM sparsity/leave-one-out bound). It is listed as a
candidate milestone in BRIEF.md, but its statement and proof depend on the primal/dual SVM
optimization problem itself (the Lagrangian, KKT conditions, and the resulting definition of a
"support vector" as a training point with nonzero dual coefficient) — a materially different,
non-margin-based proof technique (leave-one-out stability of the trained hypothesis, via Lemma
5.3) that shares no definitions with the margin-bound family this mission's goal and other
milestones are built on. Formalizing it faithfully would require standing up the SVM primal/dual
formalism (Lagrangian, complementary slackness, the "support vector" predicate itself) from
scratch, which is disproportionate to a single additional milestone within this mission's
budget; per the captain brief's guidance to leave out, rather than approximate, a statement that
cannot be made faithful in the time available, it is omitted.
Difficulty
The proof of Theorem 5.8 needs the empirical margin loss's zero-one-loss upper bound
(1u≤0≤Φρ(u)) applied before invoking Theorem 3.3's Rademacher
generalization bound on the composed class H~~={Φρ∘f:f∈H~},
H~={(x,y)↦yh(x):h∈H} — reversing this order (bounding R(h) by a
Rademacher complexity computed on the zero-one loss directly) does not work, because the
zero-one loss is not Lipschitz. Talagrand's lemma is exactly what lets the 1/ρ-Lipschitz
surrogate Φρ be pulled outside the Rademacher complexity, at the cost of a factor
1/ρ and no worse; its own proof is an induction removing one Rademacher variable at a time,
using a two-point supremum argument (fixing ϵ>0, choosing near-optimal h1,h2) that
does not simplify to anything less than genuine care with suprema of non-smooth objects — a
formalization attempting to replace this with a naive linearity-of-expectation argument would be
proving a false or vacuous statement, since sup does not commute with linear combinations.
Theorem 5.10's bound needs the Cauchy-Schwarz and Jensen inequalities used in the particular
order the book uses them (Cauchy-Schwarz on the empirical sup, then Jensen on the expectation of
a norm, then the independence of the σis) — the bound R^S(H)≤rΛ/m
does not follow from either inequality alone.
Formalization scope
EmpiricalRademacherComplexity/RademacherComplexity are restated locally in SVM,
byte-identical to chunk 03-rademacher-vc's own copies (a draft item cannot import another
chunk's draft module); this duplication collapses once 03-rademacher-vc is uploaded and listed
in missions/README.md's "Published definitions" table. MarginGeneralizationError is a new,
real-valued-hypothesis specialization of Definition 2.1 (R(h) = P[y h(x) ≤ 0]), distinct from
every earlier chunk's {-1,+1}-valued GeneralizationError, since no earlier chunk's own copy
matches this chapter's real-valued convention. PhiRho/EmpiricalMarginLoss are new. The goal
theorem (margin_bound_binary_classification) states H's own Rademacher complexity computed
on the marginal X-distribution (D.map Prod.fst), matching the book's final displayed form —
the proof's intermediate step (the lifted class H~={(x,y)↦yh(x)} having the
same Rademacher complexity as H itself, since y∈{−1,+1}) is not separately drafted, only
the theorem's statement. Theorem 5.10/Corollary 5.11 generalize the book's ambient
RN to an arbitrary real inner-product space X ([NormedAddCommGroup X] [InnerProductSpace ℝ X]), a harmless generalization since the book's proof (Cauchy-Schwarz,
Jensen, orthogonality of Rademacher signs) uses only the inner-product structure, never finite
dimension; [BorelSpace X] is added to Corollary 5.11's statement to make the measurable
structure under which MarginGeneralizationError is well-posed explicit, since every
x ↦ ⟨w, x⟩ is automatically Borel-measurable — not a substantive restriction, the book never
discusses measurability of linear functionals. 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 5.8 only for a Finset/finite H (which would make it a
disguised instance of Chapter 2's finite-hypothesis bound rather than the chapter's genuinely
new, complexity-based argument) — H : Set (X → ℝ) is left fully general, exactly as the book
states it.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 5.
C. Cortes, V. Vapnik, "Support-vector networks," Machine Learning 20(3), 1995, 273-297.
M. Talagrand, "Sharper bounds for Gaussian and empirical processes," The Annals of
Probability 22(1), 1994, 28-76.
P. Bartlett, S. Mendelson, "Rademacher and Gaussian complexities: risk bounds and structural
results," Journal of Machine Learning Research 3, 2002, 463-482.
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).
Foundations of Machine Learning I: The PAC Learning FrameworkTextbook
Motivation
How many labeled examples does a learning algorithm need to see before its output
generalizes well to unseen data? Chapter 2 of Foundations of Machine Learning answers this
question for the simplest nontrivial setting — a finite hypothesis set — and in doing so
introduces the book's central object, the Probably Approximately Correct (PAC) learning
framework: a distribution-free, high-probability guarantee relating a learner's sample size to
the accuracy and confidence of its output. Every later chapter's generalization bound (VC-based,
Rademacher-based, margin-based) is a variant of the same "probability of a bad event is small"
argument this chapter proves in its most elementary form, so getting the chapter's core
definitions and its two bracketing theorems (consistent and inconsistent finite-H) right is
the foundation the rest of the book's guarantees build on.
Setting
A learner sees a sample S=(x1,…,xm) drawn i.i.d. from a fixed but unknown distribution
D on an instance space X, labeled by an unknown target concept c drawn from a concept
class C; a hypothesis h from a fixed hypothesis set H is judged by its generalization
error R(h)=Prx∼D[h(x)=c(x)] (Definition 2.1) against its empirical error
R^S(h)=m1∑i1h(xi)=c(xi) (Definition 2.2) on the observed
sample. A concept class is PAC-learnable (Definition 2.3) if some algorithm, given a
polynomially-bounded number of samples, returns a hypothesis whose generalization error is at
most ϵ with probability at least 1−δ, for every accuracy ϵ and
confidence δ and every distribution D — the "distribution-free" and "for all target
concepts" character of the definition is what makes it a genuine worst-case learning guarantee
rather than an average-case one tailored to a particular data-generating process.
Formalization targets
Theorem 2.5 (consistent case, milestone). If H is finite and algorithm A always returns
a hypothesis consistent with the target concept on the training sample (R^S(hS)=0),
then PrS∼Dm[R(hS)≤ϵ]≥1−δ whenever
m≥ϵ1(log∣H∣+logδ1).
Corollary 2.11 (single-hypothesis Hoeffding bound, milestone). For a fixed hypothesis
h:X→{0,1} and any δ>0, with probability at least 1−δ,
R(h)≤R^S(h)+log(2/δ)/(2m).
Theorem 2.13 (inconsistent case, goal). For a finite hypothesis set H and any δ>0,
with probability at least 1−δ, simultaneously for everyh∈H,
R(h)≤R^S(h)+2mlog∣H∣+log(2/δ).
Significance
Theorem 2.13 is the chapter's capstone because it removes Theorem 2.5's consistency
requirement — the typical case in practice, where no hypothesis in H perfectly fits the
training data — while paying only an additive log∣H∣ price inside the square root, via a
union bound over H applied to Corollary 2.11's per-hypothesis concentration bound. It is also
the template every later generalization bound in the book refines: Chapter 3 replaces log∣H∣
with the growth function / VC-dimension to handle infinite hypothesis sets, and Chapter 3's
Rademacher-complexity bound is the direct machine-independent generalization of the same
argument. No prior art on the Prove2Me platform is faithful to this chapter's PAC-learning
content (GET /theorems?q=PAC-learnable returns no hits), so all six items are drafted fresh.
Difficulty
Theorem 2.13's own proof is a short combination of two ideas already present in the chapter
(Corollary 2.11's Hoeffding bound plus a union bound over ∣H∣ hypotheses), but each
ingredient carries its own faithfulness burden. Corollary 2.11 needs the sample S and the
target hypothesis h kept in the right relationship — h fixed, S random — for the bound to
be Hoeffding's inequality and not a vacuous statement about a random hypothesis. Theorem 2.13
needs the ∀h∈H quantifier placed inside the probability event (a single sample S
must work for every h at once), not outside it (which would only assert each h's bound holds
with high probability for a sample chosen depending on h) — the difference between a uniform
convergence bound and ∣H∣ separate, weaker statements. Definition 2.3's "polynomial function
poly(⋅,⋅,⋅,⋅)" is a genuine formalization judgment call, addressed
below.
Formalization scope
GeneralizationError/EmpiricalError are typed generally over X,Y (matching Definition
2.1/2.2's own general statement, "h:X→Y"), since Theorem 2.5 itself is stated for general
Y, not just Y=Bool; Corollary 2.11 and Theorem 2.13 specialize to
h:X→Bool, matching their own explicit "h:X→{0,1}" (Corollary 2.11) and the
surrounding inconsistent-case section's restriction to binary classification. The i.i.d. sample
S∼Dm is modeled as the identity random variable on the product-measure space
(Finm→X,Measure.pi(λ_.D)) in both Corollary 2.11 and
Theorem 2.13, matching the book's own S∼Dm notation exactly. IsPACLearnable
(Definition 2.3) makes "polynomial function" precise as a function bounded above by
K⋅(a+b+n+s+1)k for some constants K>0, k∈N, uniform in its (nonnegative)
arguments — the standard reading of "polynomial in its arguments" in the absence of a
ready-made multivariate polynomial-growth predicate in Mathlib; dropping this constraint
entirely (stating only "there is some threshold function") would silently weaken Definition
2.3 to a strictly easier notion of learnability, since virtually any finite or well-behaved
concept class admits some (possibly super-polynomial) sample-complexity threshold — this is
exactly the distinction Example 2.7 (the universal concept class) uses to demonstrate a class
that is not PAC-learnable despite admitting a consistent hypothesis set. No numerical
constant in Theorem 2.5, Corollary 2.11 or Theorem 2.13 is altered from the book's own; no
upper bound on δ is added anywhere the book itself leaves it unrestricted (the theorems
remain true, if vacuous, for δ>1). Not formalized: the "efficiently PAC-learnable"
running-time clause of Definition 2.3 (a second, independent polynomial-time condition on A
not needed by either milestone or the goal); Corollary 2.10 (the raw two-sided Hoeffding
statement Corollary 2.11 is immediately derived from by solving for ϵ, making it
redundant with Corollary 2.11 as a formalization target); the axis-aligned-rectangles worked
example (Example 2.4–2.9), which illustrates the framework rather than proving a new general
result, and the trivializing formalization this chapter invites — reusing Mathlib's rectangle
machinery to encode only the specific two-dimensional geometric argument rather than the
general finite-H theorems — is exactly what this mission avoids by drafting Theorems 2.5 and
2.13 in their general, hypothesis-set-agnostic form.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 2.
W. Hoeffding, "Probability inequalities for sums of bounded random variables," Journal of
the American Statistical Association 58(301), 1963, 13-30.
Primal-Dual Online Algorithms II: Finite LP Duality and Complementary SlacknessTextbook
Motivation
Almost every competitive online algorithm built by the primal-dual method rests on the same two facts about a pair of linear programs. The first is weak duality: any feasible solution of the dual is a lower bound on any feasible solution of the primal. The second is complementary slackness: if a feasible primal-dual pair satisfies a local, per-coordinate tightness condition, the pair is optimal — and if it satisfies that condition only up to factors α and β, the primal is within αβ of optimal.
The second fact in its approximate form is the engine of the whole method. An online algorithm cannot compute an optimum; what it can do is maintain a primal solution and a dual solution side by side so that each new request preserves an approximate tightness invariant. The approximate complementary slackness theorem then converts that local invariant into a global competitive ratio, with no reference to the optimum at all. Chapter 2 of Buchbinder's thesis states it as the background result on which the rest of the work is built.
Setting
Fix finite index types I (primal variables) and J (primal constraints), a matrix A:I×J→R, a cost vector c:I→R and a right-hand side b:J→R. The covering primal and packing dual are
Note the index convention: Aij carries the primal-variable index first, so the primal constraint indexed by j sums over i and the dual constraint indexed by i sums over j.
Given α,β≥1, the pair (x,y) satisfies approximate complementary slackness when
primal side: for every i with xi>0, ci/α≤∑jAijyj≤ci;
dual side: for every j with yj>0, bj≤∑iAijxi≤βbj.
Formalization targets
Goal — approximate complementary slackness
For a primal-feasible x, a dual-feasible y, and α,β≥1 satisfying the two conditions above,
i∑cixi≤αβj∑bjyj.
Taking α=β=1 recovers exact complementary slackness and hence optimality of both members of the pair. The goal is stated with the source's hypotheses, including the two-sided bounds, rather than the weakest hypotheses that make the inequality go through; a separate item records the minimal-hypothesis strengthening.
Weak duality
j∑bjyj≤i∑cixifor every feasible x and y,
with no nonnegativity assumption on A, b or c beyond feasibility itself.
Strong duality — imported, not reproved
Strong duality is not proved in this mission. The platform already carries LinearOptimization.lp_strong_duality, proved in this exact environment, for linear programs in Bertsimas–Tsitsiklis general form over Fin-indexed data. This mission's contribution is an adapter: from a primal optimum of (P), produce a dual optimum of (D) of equal value, for Fin-indexed instances. Reference items point at the imported theorem, its dual construction, and the dual-of-dual identity.
The biconditional — a dual optimum exists if and only if a primal optimum does — is deliberately left open. Weak duality does not derive the existence of a primal optimum from the existence of a dual one; the reverse implication needs strong duality applied to the dual program together with the dual-of-dual identity, and that reduction is not yet compiled. It is offered as a parallel target rather than claimed as established.
Significance
This mission is the foundation of the series. Every later mission — set cover, ski rental, and the online covering and packing problems that follow — states its approximation or competitiveness result as an instance of approximate complementary slackness. Formalizing it once, over arbitrary finite index types, is what makes the later missions short.
It also fills a real gap. Mathlib currently has no linear-programming duality: four separate attempts were closed unmerged. Approximate (α,β) complementary slackness appears not to be formalized in any public library, so the goal theorem is, as far as we can determine, first of its kind.
Difficulty
The goal is a summation argument, not a deep theorem: the work is in handling the per-coordinate case split on xi>0 versus xi=0 and in interchanging a double sum. Three mechanical milestones isolate exactly those steps. The strong-duality adapter is the hard item, because it must reconcile two different presentations of the same program — index types, matrix orientation, and bundling all differ between our definitions and the imported theorem's.
Formalization scope
Definitions cover §2.1 of the source. Four distinct notions of "the program has a finite optimum" are separated on purpose — attained optimum, nonempty feasible set, bounded objective, and the conjunction — because the source's informal word "bounded" conflates them. The definitions are stated over arbitrary finite index types; the strong-duality items are stated only for Fin, because that is the only index type for which the imported dependency path exists.
Dimitris Bertsimas and John N. Tsitsiklis, Introduction to Linear Optimization, Athena Scientific, 1997 — the general form used by the imported strong-duality theorem.
Quantum circuits built from Clifford gates alone are classically simulable in polynomial time. Universality is recovered by adding copies of a magic state, and the fastest known classical simulators of such circuits work by writing the magic-state input as a short linear combination of stabilizer states. The length of the shortest such combination -- the stabilizer rank -- is therefore the exponent governing classical simulation of quantum computation in this model, and lower bounds on it are among the very few unconditional obstructions to classical simulation available at all.
A timeline of what is established for the standard magic state ∣H⟩:
2016. Bravyi, Smith and Smolin exhibit a decomposition giving χ(∣H⊗6⟩)≤7, hence χ(∣H⊗n⟩)≤7n/6≤20.468n, and prove a lower bound of order n.
2020. Huang, Newman and Szegedy show that hardness assumptions stronger than P=NP, such as the exponential time hypothesis, imply χ(∣H⊗n⟩)=2Ω(n) (arXiv link).
2022. Peleg, Shpilka and Volk improve the unconditional lower bound to Ω(n) and give the first non-trivial bound for the approximate rank (arXiv:2106.03214).
2024. A quadratic lower bound is obtained for the approximate stabilizer rank (arXiv:2305.10277).
Between the linear unconditional lower bound and the 20.468n upper bound lies the open problem this mission targets.
Setting
Index the computational basis of an n-qubit system by bit strings x∈{0,1}n, so a state is a vector ψ∈C2n with coordinates ψ(x).
The Pauli operators are XaZb for a,b∈{0,1}n, acting by XaZb∣x⟩=(−1)b⋅x∣x⊕a⟩, where b⋅x counts the coordinates on which both are 1 and ⊕ is bitwise addition; the Pauli group is the set of 4⋅4n operators icXaZb. A unitary U is a Clifford unitary when UPU† lies in the Pauli group for every Pauli group element P, and a stabilizer state is a vector U∣0⋯0⟩ for some Clifford U. There are 2n∏k=1n(2k+1) of them up to phase -- six for a single qubit.
The stabilizer rankχ(ψ) is the least r admitting coefficients c1,…,cr∈C and stabilizer states φ1,…,φr with ψ=∑j≤rcjφj.
The magic state is ∣H⟩=cos(π/8)∣0⟩+sin(π/8)∣1⟩, and ∣H⊗n⟩ its n-fold tensor power, with coordinates cos(π/8)n−∣x∣sin(π/8)∣x∣ where ∣x∣ is the Hamming weight of x.
Target
The goal is a super-polynomial lower bound: for every exponent d and constant C there exists n with
χ(∣H⊗n⟩)>Cnd,
equivalently, χ(∣H⊗n⟩) is not O(nd) for any fixed d.
Stronger statements are expected but are deliberately not the goal. An exponential bound χ=2Ω(n) is believed and follows from hardness assumptions, but a goal naming a specific growth rate would be superseded by the next improvement; super-polynomiality is the weakest statement that settles the question of principle.
Significance
The result itself. A super-polynomial lower bound would unconditionally rule out efficient classical simulation of Clifford-plus-magic-state circuits by stabilizer decomposition, currently the leading such technique. The converse direction shows how much is at stake: a polynomial upper bound on χ(∣H⊗n⟩) would imply BPP=BQP, and via postselection P=NP. There is also a purely classical payoff -- improving the known bound even to super-linear would produce a Boolean function computable in polynomial time requiring a super-linear number of summands in any decomposition into exponentials of quadratic forms over F2, resolving a separate open question.
Formalizing it. The goal is open, so no known proof is being transcribed. What the mission produces is a machine-checked statement of the problem together with formalizations of the established bounds, none of which has a machine-checked proof anywhere. It also produces the first Pauli/Clifford/stabilizer layer in Lean: no existing Lean library contains the n-qubit Pauli group, the Clifford group, or stabilizer states, and that layer is reusable for stabilizer error correction, magic monotones, and Clifford simulation generally.
Difficulty
Counting settles the problem for random states: the stabilizer states are too few for short combinations to cover a generic state, so almost every state has exponential stabilizer rank. This says nothing about ∣H⊗n⟩, which is a single explicit, highly structured vector, and the entire difficulty is that lower bounds must be proved for that specific state rather than for a typical one. Every newcomer proposes the counting argument; it does not apply.
The known techniques reduce the question to statements about decompositions of explicit Boolean functions into quadratic-form exponentials, and the barrier is quantitative: the available arguments lose a factor that caps them at linear bounds. The source of the current record documents explicitly why its method cannot pass super-linear, and the fact that going beyond linear would resolve an independent open problem in Boolean function complexity indicates the obstruction is not merely technical.
Formalization scope
State vectors are functions {0,1}n→C and are not required to be normalised; normalisation does not affect the rank, and stabilizer states are unit vectors automatically as Clifford images of ∣0⋯0⟩. The Pauli group is given by the explicit parametrisation icXaZb rather than an abstract presentation, and the Clifford group is characterised as its unitary normaliser, equivalent to the usual generated-by-H,S,CNOT description. Because eiθU normalises the Pauli group whenever U does, the stabilizer states are closed under global phase; this is harmless, as the coefficients are arbitrary complex numbers.
One trivialising reading must be excluded. The rank is defined as an infimum over a set of natural numbers, and Lean gives the empty infimum the value 0; if no decomposition existed the rank would be 0 for every state and the goal would be false rather than merely unproved. The milestone χ(ψ)≤2n is what certifies the set is nonempty, making the rank a genuine minimum, and it should be proved first. Separately, the goal quantifies C over all reals including negative values, for which the inequality is trivially satisfiable; the content lies in large positive C.
A complete development needs, beyond the published definitions, the correspondence between stabilizer states and affine subspaces carrying quadratic phase functions, on which all known lower-bound arguments rest. Contributions of any milestone are welcome, as are function-level reformulations of the rank and the equivalent characterisation of stabilizer states via maximal abelian Pauli subgroups.
Selected references
S. Peleg, A. Shpilka, B. L. Volk, Lower Bounds on Stabilizer Rank, Quantum 6 (2022) 652; arXiv:2106.03214.
S. Bravyi, G. Smith, J. Smolin, Trading Classical and Quantum Computational Resources, Phys. Rev. X 6 (2016) 021043; arXiv:1506.01396.
C. Huang, M. Newman, M. Szegedy, Explicit Lower Bounds on Strong Quantum Simulation, IEEE Trans. Inf. Theory 66(9) (2020) 5585--5600.
Quadratic Lower Bounds on the Approximate Stabilizer Rank: A Probabilistic Approach, STOC 2024; arXiv:2305.10277.
Algorithmic Game Theory I: Existence of Nash EquilibriumTextbook
Motivation
The strategic-form game is the basic object of noncooperative game theory, and the Nash equilibrium — a profile of randomized strategies from which no player benefits by deviating unilaterally — is its central solution concept. Nash proved in 1951 that every game with finitely many players and finite strategy sets has such an equilibrium (Nash, Non-cooperative games, Ann. Math. 54 (1951)); this single existence theorem is the reason the concept organizes the rest of the field, from the computational complexity of finding equilibria to the price of anarchy. The theorem is stated as Theorem 1.8 of Nisan–Roughgarden–Tardos–Vazirani (eds.), Algorithmic Game Theory (Cambridge, 2007), the source text of this mission series, whose first chapter (Tardos–Vazirani) also treats the two special cases that admit direct algorithmic proofs: two-person zero-sum games, where equilibria are exactly the optimal solutions of a dual pair of linear programs (von Neumann 1928; Theorem 1.11), and a simple linear market, where equilibrium prices are computed by an ascending tight-set algorithm (Theorem 1.17).
A timeline of the existence theorem: von Neumann (1928) proved the minimax theorem for two-person zero-sum games; Nash (1950, 1951) extended existence to arbitrary finite games, first via Kakutani's fixed-point theorem and then via Brouwer's. All known proofs of the general theorem pass through a fixed-point principle, and this is not an artifact: computing a Nash equilibrium is PPAD-complete (Daskalakis–Goldberg–Papadimitriou 2009; Chen–Deng–Teng 2009), and PPAD is precisely the complexity class of the fixed-point arguments.
Setting
A finite strategic-form game consists of a finite set ι of players, for each player i a finite nonempty set Si of pure strategies, and for each player a payoff functionui:∏jSj→R; all players are utility maximizers. A mixed strategy for player i is a probability distribution on Si, represented as a weight function σi:Si→R with σi≥0 and ∑sσi(s)=1 (a lottery). Players randomize independently, so a mixed profileσ=(σi)i induces the product distribution on pure strategy vectors, and player i's expected payoff is
Ui(σ)=s∈∏jSj∑(j∏σj(sj))ui(s).
A mixed profile σ is a (mixed) Nash equilibrium if for every player i and every lottery τ on Si, replacing σi by τ does not increase Ui.
A two-person zero-sum game is given by a matrix A∈Rm×n: the row player picks a row distribution p, the column player a column distribution q, and the column player pays the row player pTAq in expectation.
The market of §1.8.1 of the source has finitely many divisible goods, good a in sa units, and finitely many buyers, buyer j bringing budget mj>0 and interested in a nonempty set of goods; utilities are linear 0/1, so a buyer wants any goods from her interest set and none other. Market-clearing prices are positive prices under which each buyer can spend her whole budget on cheapest goods in her interest set while every good sells out exactly.
Formalization targets
Goal (capstone) — Theorem 1.8
Every finite strategic-form game has a mixed Nash equilibrium.
Stated for an arbitrary finite family of finite nonempty strategy types; no bound on the number of players, no genericity assumptions.
Mathlib currently has no form of Brouwer's theorem; every known proof of Theorem 1.8 needs it (or an equivalent), so it enters the mission as an explicit milestone rather than an assumed library fact.
Theorem 1.11 — zero-sum games
∃p∗,q∗:∀p,pTAq∗≤p∗TAq∗,∀q,p∗TAq∗≤p∗TAq,and(p∗,q∗) is a mixed Nash equilibrium
of the explicit two-player game with payoffs Axy to the row player and −Axy to the column player. The source states the result as: optimal solutions of a dual pair of LPs form a Nash equilibrium of the zero-sum game; the first two conjuncts are the saddle point that LP optimality amounts to, and the third states the Nash-equilibrium clause against the mission's own game vocabulary, so "zero-sum" is formal (the two payoffs sum to zero) rather than implicit in the shape of the statement.
Theorem 1.17 (existence form)
The 0/1-utilities linear market admits market-clearing prices and allocations.
The source proves this by an ascending-price algorithm and also bounds its running time; the complexity half has no formal counterpart in this mission.
Significance
The capstone is the foundation of the whole mission series: correlated equilibria, price-of-anarchy bounds, and mechanism-design characterizations in later missions all quantify over or compare against Nash equilibria, and the series inherits its game vocabulary (IsLottery, IsMixedProfile, expectedPayoff, IsMixedNash) from this mission.
Formalizing it produces the first Brouwer fixed-point theorem in this environment — a well-known gap in mathlib with reuse value far beyond game theory (every degree-theoretic and equilibrium-existence argument needs it). The zero-sum milestone yields the minimax theorem, reusable for the learning-dynamics mission that follows. All results here are classical and proved on paper; the work requested is machine-checked proof, not new mathematics.
Difficulty
The central difficulty is Brouwer. The standard routes are (i) Sperner's lemma plus a limit argument, which needs a formal theory of simplicial subdivisions that does not exist in mathlib; (ii) algebraic topology (no retraction of the ball onto the sphere), for which mathlib has singular homology but not yet the homology of spheres in usable form; (iii) analytic proofs (Milnor–Rogers). None is short; the milestone is deliberately stated for a general nonempty compact convex set in a finite-dimensional normed space so that any route serves, and so the lemma lands in reusable generality.
Given Brouwer, Theorem 1.8 still requires Nash's gain-function construction on the product of simplices and the verification that fixed points are equilibria — bookkeeping-heavy but standard. Theorem 1.11 does not need Brouwer: mathlib's Sion minimax theorem (Mathlib.Topology.Sion) applies to the bilinear payoff on the product of standard simplices, or one can argue by LP duality directly. Theorem 1.17 needs the tight-set/max-flow argument of Lemmas 1.15–1.16 or any direct construction of the equilibrium.
Formalization scope
Games are presented concretely: players form a finite index type, strategies a finite type per player, payoffs are functions into R; mixed strategies are weight functions with a IsLottery predicate, not measure-theoretic distributions. Deviations in the equilibrium definition range over all lotteries (not only pure strategies): the pure-deviation reduction is a lemma a solver may prove, not part of the definition. Strategy sets are assumed nonempty in the capstone; the player set need not be. In the zero-sum milestone both dimensions are positive (Fin (m+1), Fin (n+1)), payoffs flow from the column player to the row player, stdSimplex plays the role of the mixed-strategy space, and the Nash-equilibrium conjunct is stated for the Boolean-indexed two-player game built by matrixGameStrat/zeroSumPayoff/matrixGameProfile from the definitions bundle. In the market milestone all supplies and budgets are positive, every buyer's interest set is nonempty, and every good has an interested buyer, matching the standing assumptions of §1.8.1; allocations are recorded as money spent, so the clearing condition is ∑jxja=pasa with no division anywhere.
Trivializing readings are ruled out: the empty simplex has no lotteries, so nonemptiness hypotheses appear exactly where their absence would make an existence claim false (Brouwer on the empty set, games with an empty strategy set, zero-dimensional matrix games).
Selected references
J. F. Nash, Non-cooperative games, Annals of Mathematics 54 (1951), 286–295. DOI
J. von Neumann, Zur Theorie der Gesellschaftsspiele, Mathematische Annalen 100 (1928), 295–320. DOI
N. Nisan, T. Roughgarden, É. Tardos, V. V. Vazirani (eds.), Algorithmic Game Theory, Cambridge University Press, 2007, Chapter 1. DOI
C. Daskalakis, P. W. Goldberg, C. H. Papadimitriou, The complexity of computing a Nash equilibrium, SIAM J. Computing 39 (2009), 195–259. DOI