Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

THEOREM 1 — one round of Algorithm A (B) eliminates at least ⅛·|E′| − 1/16 (⅛·|E′|) edges in expectation

Proved
LubyMIS.MonteCarlo.theorem1

by mikedeng1 · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

maximal-independent-setp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1parallel-algorithmsrandomized-algorithms

Let G′=(V′,E′)G' = (V', E')G′=(V′,E′) be the current graph before the kkk-th execution of the body of the while loop of Luby's MIS algorithm, and let n≥1n \ge 1n≥1 be the number of vertices of the input graph, so ∣V′∣≤n|V'| \le n∣V′∣≤n. Write Yk=∣E′∣Y_k = |E'|Yk​=∣E′∣ and Yk+1Y_{k+1}Yk+1​ for the number of edges after that execution, i.e. after removing I′∪N(I′)I' \cup N(I')I′∪N(I′) where I′I'I′ is produced by the select step.

  1. For Algorithm A (independent uniform priorities in {1,…,n4}\{1, \dots, n^4\}{1,…,n4}; I′I'I′ the strict local minima),
E[YkA−Yk+1A]  ≥  18 YkA−116.E\big[Y_k^A - Y_{k+1}^A\big] \;\ge\; \frac18\, Y_k^A - \frac1{16}.E[YkA​−Yk+1A​]≥81​YkA​−161​.
  1. For Algorithm B (independent coins with Pr⁡[coin(i)=1]=1/(2d(i))\Pr[\mathrm{coin}(i) = 1] = 1/(2d(i))Pr[coin(i)=1]=1/(2d(i)), and 111 if d(i)=0d(i) = 0d(i)=0; I′I'I′ the marked vertices whose marked neighbours all have smaller degree),
E[YkB−Yk+1B]  ≥  18 YkB.E\big[Y_k^B - Y_{k+1}^B\big] \;\ge\; \frac18\, Y_k^B.E[YkB​−Yk+1B​]≥81​YkB​.

Each round thus removes a constant fraction of the remaining edges in expectation, which is what makes the expected number of rounds of both algorithms O(log⁡n)O(\log n)O(logn).

Formalization Note The expectation is taken for a fixed current graph G′G'G′, i.e. conditionally on the history of the first k−1k - 1k−1 rounds, as in the paper's proof ("Let G′=(V′,E′)G' = (V', E')G′=(V′,E′) be the graph before the kkkth execution"); the unconditional statement follows by averaging. nnn is a parameter with 1≤n1 \le n1≤n and ∣V′∣≤n|V'| \le n∣V′∣≤n, not ∣V′∣|V'|∣V′∣ itself. Expectations are finite sums over the (n4)∣V′∣(n^4)^{|V'|}(n4)∣V′∣ priority vectors and the 2∣V′∣2^{|V'|}2∣V′∣ coin vectors.

Preamble
import Mathlib
import Definitions.Def_LubyMIS_MonteCarlo_Basic
Formal statement
namespace LubyMIS.MonteCarlo

/-- THEOREM 1 (Luby 1986, §3.4, p. 1040). For the current graph `H = G′` and `n ≥ max(1, |V′|)` the
number of vertices of the input graph, one execution of the loop body eliminates in expectation
(1) at least `⅛ · |E′| − 1/16` edges under Algorithm A, and
(2) at least `⅛ · |E′|` edges under Algorithm B. -/
theorem theorem1 {V : Type*} [Fintype V] [DecidableEq V] (n : ℕ) (hn : 1 ≤ n)
    (hV : Fintype.card V ≤ n) (H : SimpleGraph V) [DecidableRel H.Adj] :
    expA n (fun π => (eliminated H (selectA H π) : ℝ)) ≥
        1 / 8 * (H.edgeFinset.card : ℝ) - 1 / 16 ∧
      expB H (fun c => (eliminated H (selectB H c) : ℝ)) ≥ 1 / 8 * (H.edgeFinset.card : ℝ) := by sorry

end LubyMIS.MonteCarlo
Source
Luby, A Simple Parallel Algorithm for the Maximal Independent Set Problem, SIAM J. Comput. 15(4), 1986, p. 1040, §3.4, THEOREM 1 (1) and (2)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Throughout, VVV is an arbitrary finite type of vertices with decidable equality. nnn is a natural number and HHH is a simple graph on VVV with a decidable adjacency relation. The statement uses five objects from the imported module Definitions.Def_LubyMIS_MonteCarlo_Basic: expA, expB, selectA, selectB and eliminated. Their definitions are not part of the code under audit. This read-back therefore cannot unfold them, and it describes them only by how the statement uses them:

  • expAn(f)\mathrm{expA}_n(f)expAn​(f) is a real number built from nnn and a real-valued function fff of some argument π\piπ, whose type is fixed by that module (it may depend on nnn).
  • expBH(g)\mathrm{expB}_H(g)expBH​(g) is a real number built from the graph HHH and a real-valued function ggg of some argument ccc, whose type is also fixed by that module (it may depend on HHH).
  • selectA(H,π)\mathrm{selectA}(H,\pi)selectA(H,π) and selectB(H,c)\mathrm{selectB}(H,c)selectB(H,c) are objects built from HHH and π\piπ, or from HHH and ccc.
  • eliminated(H,S)\mathrm{eliminated}(H,S)eliminated(H,S) is a quantity built from HHH and such an object SSS, then converted into a real number. It is most likely a natural-number count, but that is not visible here.

The statement's names and its doc comment suggest that these are expectations, random selection rules and an eliminated-edge count. The code shown does not establish any of that.

Hypotheses. Both of the following hold:

  • 1≤n1 \le n1≤n;
  • ∣V∣≤n|V| \le n∣V∣≤n, where ∣V∣|V|∣V∣ is the number of vertices.

Conclusion. Let ∣E(H)∣|E(H)|∣E(H)∣ be the number of edges of HHH. Both inequalities hold together:

expAn(π↦eliminated(H,selectA(H,π)))  ≥  18 ∣E(H)∣−116,\mathrm{expA}_n\Big(\pi \mapsto \mathrm{eliminated}\big(H, \mathrm{selectA}(H,\pi)\big)\Big) \;\ge\; \tfrac{1}{8}\,|E(H)| - \tfrac{1}{16},expAn​(π↦eliminated(H,selectA(H,π)))≥81​∣E(H)∣−161​, expBH(c↦eliminated(H,selectB(H,c)))  ≥  18 ∣E(H)∣.\mathrm{expB}_H\Big(c \mapsto \mathrm{eliminated}\big(H, \mathrm{selectB}(H,c)\big)\Big) \;\ge\; \tfrac{1}{8}\,|E(H)|.expBH​(c↦eliminated(H,selectB(H,c)))≥81​∣E(H)∣.

Both bounds are non-strict (≥\ge≥) and are compared as real numbers. The number nnn appears only in the first inequality, as the parameter of expA\mathrm{expA}expA. The second inequality does not mention nnn at all, so the hypotheses on nnn restrict it only through the requirement that some nnn satisfying them exists; one always does, namely n=max⁡(1,∣V∣)n=\max(1,|V|)n=max(1,∣V∣). The integer nnn must be at least max⁡(1,∣V∣)\max(1,|V|)max(1,∣V∣) but may be arbitrarily larger than ∣V∣|V|∣V∣, and the first inequality is claimed for every such nnn.

Degenerate cases. The hypotheses allow VVV to be empty, since ∣V∣=0≤n|V| = 0 \le n∣V∣=0≤n holds for every n≥1n \ge 1n≥1. They also allow VVV to have one vertex, or HHH to have no edges at all. In every such case ∣E(H)∣=0|E(H)| = 0∣E(H)∣=0, and the statement reduces to:

  • expAn(⋯ )≥−116\mathrm{expA}_n(\cdots) \ge -\tfrac{1}{16}expAn​(⋯)≥−161​;
  • expBH(⋯ )≥0\mathrm{expB}_H(\cdots) \ge 0expBH​(⋯)≥0.

The hypotheses 1≤n1 \le n1≤n and ∣V∣≤n|V| \le n∣V∣≤n can always be satisfied, so the statement is not vacuous. Whether these degenerate cases hold trivially depends on the imported definitions, which are not shown. For example, it depends on what expA\mathrm{expA}expA and expB\mathrm{expB}expB return when their domain is empty, or when a normalisation involves dividing by zero, which Lean evaluates to 000. It also depends on whether eliminated\mathrm{eliminated}eliminated can be negative. None of this can be determined from the code given. The statement contains no subtraction in N\mathbb{N}N: the −116-\tfrac{1}{16}−161​ is taken in R\mathbb{R}R.

Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me