Only votes of cluster-manager-eligible nodes are counted
ProvedOpenSearchCoordination.addVote_eligibleFor every vote collection v, node n and node id x: x is among the ids of (v.addVote n).1 iff x is among the ids of v, or x = n.id and n.isClusterManagerNode = true.
addVote adds exactly the id of a node with the cluster-manager role and nothing else; the vote of a node without the role, or a vote already present, leaves the set of voters unchanged.
import Definitions.Def_OpenSearchCoordination
theorem OpenSearchCoordination.addVote_eligible (v : VoteCollection) (n : DiscoveryNode) (x : NodeId) :
x ∈ (v.addVote n).1.nodes ↔ x ∈ v.nodes ∨ (x = n.id ∧ n.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: OpenSearchCoordination.addVote_eligible
Notions used
Nodes. A node (DiscoveryNode) has an id and a Boolean flag , read as "eligible to vote".
Vote collections. A vote collection is a list of natural numbers. returns a pair:
- if and , it returns ;
- otherwise it returns .
The first component is the new collection. The second says whether the vote was added.
1. Declaration
Binders.
- : a vote collection;
- : a node;
- : a natural number (
NodeId).
Hypotheses. None.
Conclusion.
After adding 's vote, the ids in the collection are exactly the previous ids, plus when is eligible.
2. What is not constrained
- The statement is about membership only.
- It says nothing about the second component (the "added" Boolean).
- It says nothing about order or multiplicity in the new list. For example, it does not state that a vote from an already-present id leaves the list unchanged, although by definition it does.
- is arbitrary. It may already contain duplicates, or ids of ineligible nodes; the statement still holds.
- There are no hypotheses, so nothing can make the statement vacuous.
3. Plain-language summary
Adding a vote from node adds 's id to the set of voters if and only if is cluster-manager-eligible. Votes from ineligible nodes are ignored, and no existing voter is removed.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.