The default maximum timeout: three candidates, every bound at 10 s, and a 100 ms margin
ProvedOpenSearchElectionTimer.default_examplecontestedBound 3 100 10000 < 6 / 100 and contestedBound 3 100 10000 ^ 5 < 1 / 1000000.
With every bound at OpenSearch's default cluster.election.max_timeout of 10 seconds (Mmin = 10000 milliseconds; with the default initial timeout and back-off time of 100 ms, every attempt from attempt 99 on, counting from 0, has reached it), three competing candidates and a margin of δ = 100 milliseconds, contested_prob_le bounds the probability of a contested round by contestedBound 3 100 10000 = 597 · 922337203685478 / 2^63 ≈ 0.0597, below 6%, and all_contested_prob_le bounds the probability that five consecutive rounds are contested by its fifth power, about 7.6 · 10^-7, below one in a million. The theorem itself is arithmetic on these literals. The margin of 100 ms is an illustrative choice: nothing in the model shows that it suffices for a pre-voting round and an election to complete. For earlier attempts, whose bounds are smaller, the bound is weaker: for three candidates and a 100 ms margin it is at least 1, saying nothing, whenever the smallest competing bound is at most 597 ms. The theorem itself is arithmetic on these literals. The margin of 100 ms is an illustrative choice: nothing in the model shows that it suffices for a pre-voting round and an election to complete. For earlier attempts, whose bounds are smaller, the bound is weaker: for three candidates and a 100 ms margin it is at least 1, saying nothing, whenever the smallest competing bound is at most 597 ms.
import Definitions.Def_OpenSearchElectionTimer open OpenSearchPreVote OpenSearchElectionTimer
theorem OpenSearchElectionTimer.default_example :
contestedBound 3 100 10000 < 6 / 100 ∧ contestedBound 3 100 10000 ^ 5 < 1 / 1000000 := by sorryRead-back
What the Lean code literally says, in plain math · claude-opus-5-5 (independent sub-agent, blind: Lean code + auditor instructions only)
Read-back: OpenSearchElectionTimer.default_example
Notions used
contestedBound.
with truncated natural subtraction and natural floor division, cast to . For this is .
Related theorems. Under hypotheses, contested_prob_le shows this number bounds the probability that one round of timers is contested with margin , when every bound is at least . all_contested_prob_le shows that its -th power bounds the probability that causally chosen rounds are all contested. The present theorem does not invoke either of them.
1. Declaration
theorem OpenSearchElectionTimer.default_example :
contestedBound 3 100 10000 < 6 / 100 ∧ contestedBound 3 100 10000 ^ 5 < 1 / 1000000
Binders and hypotheses: none.
Conclusion (in ). Because contestedBound returns , the numerals 6 / 100 and 1 / 1000000 are rational divisions, not natural-number divisions (which would give ). The theorem asserts
Unfolded:
Here , since . The fifth power is . I checked both conjuncts with exact rational arithmetic: the margins are and .
2. What is not constrained
- Pure arithmetic. The statement is about specific numbers. It involves no draws, no probability, no offsets, no bounds and no scheduler.
- The parameters are literals.
- : candidates.
- : the margin.
- : the minimum bound.
- : the number of rounds, if read through
all_contested_prob_lewith .
- No link to the default settings in Lean. coincides with
SchedulerSettings.default.maxTimeout, but the statement does not mentionSchedulerSettings.defaultormaxDelay. With the default settings, reaches only from attempt index (the 100th attempt). Applyingcontested_prob_lewith requires every bound in the round to be at least . For earlier attempts the same and give weaker or trivial bounds: , and , which is vacuous as a probability bound. The value is at least exactly when . - is not justified by any Lean term. Nothing shows that a 100 ms margin lets an uncontested candidate's pre-voting round and election finish before the others start.
- The name overstates the content. "default_example" suggests the default configuration. The Lean statement only establishes the two numerical inequalities.
- No hypotheses, so nothing is vacuous. The statement is a closed numerical claim and, by my computation, true.
3. Plain-language summary
For 3 candidates, a margin of 100 and a minimum bound of 10000, the per-round contested bound is about , below . Its fifth power is about , below one in a million. Only when combined with contested_prob_le and all_contested_prob_le (not by this theorem itself) do these numbers bound the chance of a contested round, or of five consecutive contested rounds, and only for rounds in which every candidate's bound is at least 10000.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.