Theorem 2 — R[B1, MS(k)](n) ≤ (k + 1)/k for all k ≥ 1, with equality for all sufficiently large n
ProvedJohnsonApprox.MaxSatGreedy.greedy_maxsat_ratioJohnson (1974), Theorem 2: "For all and , , with equality for all sufficiently large ."
Here is MAXIMUM SATISFIABILITY restricted to sets of clauses each with at least distinct literals, is the largest number of clauses of satisfiable by one truth assignment, and B1 is the greedy algorithm that repeatedly makes true a literal occurring in the most remaining clauses. In size-free form the theorem says: for every integer ,
- for every input of and every set of clauses choosable by B1 on ,
- there are an input of and a set choosable by B1 on with and
The first part is the upper bound; the second shows that the ratio is attained, so it is the exact worst-case ratio of B1 on for every .
Formalization Note The paper's is a maximum of the ratio over inputs of size at most , where the size is "the number of symbols required to describe in some standard notation" and is not pinned down. Since is the minimum over choosable outputs and is a nondecreasing maximum over finitely many inputs, " for all " is equivalent to part 1, and "equality for all sufficiently large " (given part 1) is equivalent to part 2. Ratios are written multiplicatively in so that no division by zero arises; in part 2 excludes the degenerate empty input. Choosability ranges over every tie-break of Step 3.
import Mathlib import Definitions.Def_JohnsonApprox_Shared_Problem import Definitions.Def_JohnsonApprox_MaxSatGreedy_B1
namespace JohnsonApprox.MaxSatGreedy
theorem greedy_maxsat_ratio (k : ℕ) (hk : 1 ≤ k) :
(∀ (S : Finset Shared.Clause), Shared.InMS k S → ∀ X : Finset Shared.Clause, Choosable S X →
k * Shared.opt S ≤ (k + 1) * X.card) ∧
(∃ (S : Finset Shared.Clause), Shared.InMS k S ∧ ∃ X : Finset Shared.Clause, Choosable S X ∧
0 < X.card ∧ k * Shared.opt S = (k + 1) * X.card) := by sorry
end JohnsonApprox.MaxSatGreedy
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Fix a natural number with . The statement uses four objects from imported definition files whose code is not shown here, so this read-back can only name them, not unfold them:
- (
Shared.Clause), a type whose elements are called clauses; - (
Shared.InMS k S), a property of a pair: a natural number and a finite set of clauses; - (
Shared.opt S), a quantity assigned to each finite set of clauses. Its number type is not visible. If it is , all the arithmetic below is in the natural numbers. Otherwise and are cast into that type. - (
Choosable S X, from the namespaceJohnsonApprox.MaxSatGreedy), a relation between two finite sets and of clauses.
What these mean (for example, whether bounds clause sizes, whether is a maximum count of satisfiable clauses, and whether forces ) is fixed entirely by those definitions. Nothing in the statement itself says it. Below, is the number of elements of the finite set .
The theorem claims that both of the following hold.
(1) Upper bound. For every finite set of clauses with , and every finite set of clauses with ,
Written as a ratio, this says . The inequality is non-strict. ranges over all finite sets of clauses: it is tied to only through , not by any subset condition written in the statement.
(2) Tightness. There exist a finite set of clauses with and a finite set of clauses such that:
- holds;
- ;
- the bound in (1) is an exact equality:
Part (2) is claimed separately for each , and and may depend on . Part (2) does not say is the only set with , and it does not say the equality holds for every such .
Degenerate cases:
- is excluded by the hypothesis , so the statement says nothing about it.
- Divisibility in (2). Since and , the equality in (2) forces , so is nonzero. If takes values in , the equality also forces to divide . Because and share no common factor, this means divides , so and .
- Empty sets. Whether or can occur in (1) depends on whether and hold, which the hidden definitions decide. If some with has , then (1) forces , so must be in , or in an ordered type.
- Vacuous cases. If or is never satisfied, (1) is vacuously true. Part (2), however, requires at least one witness pair, so the statement as a whole rules out that possibility for every .
- Default values. The statement itself contains no division, no subtraction in , and no suprema, integrals or other operations that return a default value. Any such behaviour could only come from inside the definition of or the other hidden definitions, which are not shown here.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.