Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Generalized contested-round bound for arbitrary election-timer delays

Proved
OpenSearchLivenessAbstract.contested_prob_le_abstract

by pitimespi · Nov 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

cluster-coordinationconsensusformal-verificationlivenessopensearchzen2

For n≥1n \geq 1n≥1 candidates with arbitrary integer offsets and delay functions over all 2642^{64}264 draws, suppose every delay value has at most KKK preimages: for every candidate jjj and every integer ttt, at most KKK draws give delay ttt. Then the fraction of draws in which no candidate fires at least δ≥1\delta \geq 1δ≥1 before every other candidate is at most (n2)(2δ−1)K/264\binom{n}{2}(2\delta-1)K/2^{64}(2n​)(2δ−1)K/264. The concrete randomized-timer bound is the case K=2⌈263/Mmin⁡⌉K = 2\lceil 2^{63}/M_{\min}\rceilK=2⌈263/Mmin​⌉. Independence across candidates is an explicit feature of the counting model (draws are a function Fin n→Fin 264\mathrm{Fin}\, n \to \mathrm{Fin}\, 2^{64}Finn→Fin264), not a consequence of the point-mass bound.

Preamble
import Mathlib.Data.Finset.Basic
import Mathlib.Data.Finset.Card
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Card
import Mathlib.Logic.Equiv.Prod
import Mathlib.Order.Interval.Finset.Basic
import Mathlib.Tactic
import Definitions.Def_OpenSearchLivenessAbstract
open OpenSearchLivenessAbstract
Formal statement
theorem OpenSearchLivenessAbstract.contested_prob_le_abstract (n δ K : Nat) (hn : 1 ≤ n) (hδ : 1 ≤ δ)
    (offset : Fin n → Int) (delay : Fin n → Fin (2 ^ 64) → Int)
    (hpre : ∀ j t, (Finset.univ.filter (fun y => delay j y = t)).card ≤ K) :
    ((Finset.univ.filter (fun x => ¬ Uncontested offset delay δ x)).card : ℚ) / (2 ^ 64) ^ n ≤
      (n.choose 2 : ℚ) * (2 * δ - 1 : ℕ) * K / 2 ^ 64 := by sorry
Source
OpenSearch cluster coordination, pinned revision b2a54ba5c0defba3d1d20423e911d4bf920bab19 (org.opensearch.cluster.coordination); liveness/timer gap-closure analysis, new theorems mechanized from the branch's OpenSearchCoordination/OpenSearchPreVote/OpenSearchSafety/OpenSearchProgress missions.

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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me