Case 1 occurs at most 16 times in a run of Algorithm D
ProvedLubyMIS.Derandomized.case1_at_most_16Let be a graph on the vertices and a prime with . In every run of Algorithm D, at most executions of the loop body are in Case 1, that is, begin (after the deletion of isolated vertices) with a vertex of degree in the current graph:
Each Case 1 round deletes a vertex together with at least neighbours, that is, at least of the vertices of the original graph.
Formalization Note is the number of vertices of the input graph , not of the current graph. The bound is stated for every finite prefix of the run. Only executions before termination are counted ( for every ): after the first index with the run relation leaves the sequence unconstrained, so a later state could restart the algorithm.
import Mathlib import Definitions.Def_LubyMIS_Derandomized_Basic import Definitions.Def_LubyMIS_Derandomized_AlgorithmD
namespace LubyMIS.Derandomized
/-- Case 1 is rare (Luby 1986, §4.4, p. 1046): in every run of Algorithm D, Case 1 occurs in at most
16 executions of the loop body. Only the executions before termination are counted (`V′` nonempty at
every index up to `k`): after the first index with `V′ = ∅` a run is unconstrained. -/
theorem case1_at_most_16 (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (q : ℕ)
(hq : q.Prime) (hnq : n ≤ q) (hq2 : q ≤ 2 * n) (s : ℕ → Finset (Fin n) × Finset (Fin n))
(hs : IsRun G q s) (K : ℕ) :
((Finset.range K).filter
(fun k => (∀ j ≤ k, (s j).2.Nonempty) ∧ Case1 G (s k))).card ≤ 16 := by sorry
end LubyMIS.Derandomized
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Objects. Let and let be a simple graph on the vertex set . Adjacency in is assumed decidable, which is a computability requirement and adds no mathematical restriction. Let satisfy:
- is prime;
- ;
- .
Let be a sequence of pairs of subsets of . Write , so is the first component and the second. Assume satisfies the predicate . Finally, let be arbitrary.
Two predicates defined elsewhere. and are defined in the imported bundle files. Their definitions are not part of the code shown here, so this read-back cannot unfold them.
- is a condition on the whole sequence , depending on and .
- is a condition on the single pair , depending on .
What the theorem means depends entirely on these two definitions.
Claim. Among the indices , count those that satisfy both of the following:
- for every with (this includes itself);
- holds.
The theorem asserts that this count is at most :
Because is arbitrary, this is equivalent to saying that the set of all such has at most elements. The nonemptiness condition applies only to the second components . The first components are not constrained by the counting condition, except through and .
Degenerate cases.
- : The hypotheses force , but must be prime, so no such exists and the statement is vacuous. Independently of that, is empty, so every is empty and the count would be anyway.
- : The only admissible prime is .
- in general: A prime in always exists (Bertrand's postulate), so the hypotheses on can be satisfied.
- : The index range is empty, and the count is .
- : Condition 1 fails for every , so the count is regardless of .
- Once some is empty: No index is counted, whatever does afterwards.
- Vacuity risk: Whether can be satisfied, or whether can ever hold, cannot be determined from the code shown. If is unsatisfiable, or is never true, the statement holds trivially.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.