A round counts exactly its cluster-manager-eligible senders
ProvedOpenSearchPreVote.votes_memFor every pre-voting round r and node id x: x is among the ids of r.votes iff some recorded entry p ∈ r.preVotesReceived has p.1.id = x and p.1.isClusterManagerNode = true. The votes of a round are the ids of its recorded senders that have the cluster-manager role.
import Definitions.Def_OpenSearchPreVote open OpenSearchCoordination OpenSearchPreVote
theorem OpenSearchPreVote.votes_mem {V : Type} (r : PreVotingRound V) (x : NodeId) :
x ∈ r.votes.nodes ↔ ∃ p ∈ r.preVotesReceived, p.1.id = x ∧ p.1.isClusterManagerNode = true := 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.votes_mem
Notions used
Discovery nodes. A discovery node is a pair: a node id and a Boolean ("cluster-manager-eligible").
Pre-voting rounds. A round has five fields:
- a cluster state;
- a local node;
- a list of pairs ;
- two Booleans, and .
Vote collections and . A vote collection is a list of node ids. prepends to when is true and is not already in ; otherwise it leaves unchanged. is computed as follows:
- start from the empty collection;
- fold over the senders of , from the last entry to the first (
foldr); - the responses play no part.
1. Declaration
Binders. There are no hypotheses.
- : an implicit type;
- : a pre-voting round over , completely arbitrary (not assumed reachable);
- : a node id.
Conclusion.
The vote collection of the round contains the id exactly when some received entry has a sender with id that is cluster-manager-eligible.
2. What is not constrained
- The round. is arbitrary. The list may contain repeated senders, or two senders with the same id and different flags (for example and , which give the vote through the second). The round may be closed or started.
- Order and multiplicity. The statement is about membership only. It says nothing about the order or multiplicity of . By construction the list has no duplicates, but the theorem does not state it.
- The responses. The responses do not occur. Their terms and versions do not affect which ids count.
- Vacuity. There are no hypotheses, so nothing can be vacuous.
3. Plain-language summary
The ids counted as votes by a pre-voting round are exactly the ids of the cluster-manager-eligible senders that appear in its list of received pre-votes. Ineligible senders and the contents of the responses contribute nothing.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.