The delay bound backs off linearly from the initial timeout to the maximum timeout
ProvedOpenSearchPreVote.maxDelay_scheduleFor valid scheduler settings s:
maxDelay s 0 = s.initialTimeout;maxDelay s k ≤ maxDelay s k'wheneverk ≤ k';- for every
kwithmaxDelay s k < s.maxTimeout,maxDelay s (k + 1)ismaxDelay s k + s.backoffTimeors.maxTimeout; maxDelay s k = s.maxTimeoutfor everyk ≥ s.maxTimeout(the numbermaxTimeoutused as an attempt count: sincebackoffTime ≥ 1, the bound has reached the maximum by then).
import Definitions.Def_OpenSearchPreVote open OpenSearchCoordination OpenSearchPreVote
theorem OpenSearchPreVote.maxDelay_schedule (s : SchedulerSettings) (hs : s.Valid) :
maxDelay s 0 = s.initialTimeout ∧ (∀ k k', k ≤ k' → maxDelay s k ≤ maxDelay s k') ∧
(∀ k, maxDelay s k < s.maxTimeout → maxDelay s (k + 1) = maxDelay s k + s.backoffTime ∨
maxDelay s (k + 1) = s.maxTimeout) ∧
∀ k, s.maxTimeout ≤ k → maxDelay s k = s.maxTimeout := 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: OpenSearchPreVote.maxDelay_schedule
Notions used
Scheduler settings. A settings value is four natural numbers: , , and (milliseconds, per the docstring). is the conjunction:
- ;
- ;
- ;
- ;
- .
Delay bound. , in natural-number arithmetic.
1. Declaration
Binders and hypothesis.
- : scheduler settings;
- : .
Conclusion. Four conjuncts:
- .
- : the bound is monotone in the attempt index.
- . While below the cap, the next bound is one back-off step larger or equals the cap.
- . For every attempt index at least , the bound equals the cap.
2. What is not constrained
-
Conjunct 4 is loose. It compares an attempt index with the millisecond value . It is true because gives .
- The real saturation point is earlier: the first with , that is, .
- With the defaults (, , ) the bound first reaches at , which I checked by evaluation. Conjunct 4 asserts saturation only from .
- Conjuncts 2 and 4 together do imply for every .
-
Conjunct 3 is a disjunction. It does not say which alternative holds. Read alone, it would allow a jump straight to even when one back-off step would stay below the cap. The exact value, , comes from the definition and is not stated. When , both alternatives hold.
-
Which parts of matter. As far as I can see:
- conjunct 1 needs only ;
- conjunct 4 needs only ;
- conjuncts 2 and 3 hold for all settings.
The numeric bounds of and the field play no role.
-
What is not stated. Nothing is said about the actual (random) delays, only about their bound .
-
Vacuity. None. is satisfiable, for example by the defaults .
3. Plain-language summary
For valid scheduler settings, the per-attempt delay bound starts at the initial timeout and never decreases. While it is below the maximum timeout, each attempt raises it by exactly the back-off time or brings it to the maximum. It equals the maximum timeout for every attempt index at least as large as the maximum timeout's numeric value, which is a loose saturation bound compared with where the cap is actually reached.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.