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

Lemma handleRequestVoteReply_leader :
forall h st src t v st',
handleRequestVoteReply h st src t v = st' ->
type st' = Leader ->
(st' = st \/
(type st = Candidate /\
wonElection (dedup name_eq_dec (votesReceived st')) = true /\
currentTerm st' = currentTerm st)).