Proof using.
intros. unfold handleRequestVoteReply, advanceCurrentTerm in *.
repeat break_match; subst; simpl in *; auto; congruence.
Qed.

Theorem handleRequestVoteReply_votesReceived :
forall h st t h' r v,
In v (votesReceived (handleRequestVoteReply h st h' t r)) ->
In v (votesReceived st) \/
(r = true /\ v = h' /\ currentTerm (handleRequestVoteReply h st h' t r) = t).