Proof using.
intros. unfold handleRequestVote, advanceCurrentTerm in *.
repeat (break_match; try find_inversion; simpl in *; auto);
do_bool; auto.
Qed.

Lemma handleRequestVoteReply_currentTerm_leaderId :
forall h st h' t r st',
handleRequestVoteReply h st h' t r = st' ->
currentTerm st < currentTerm st' \/
currentTerm st' = currentTerm st /\
leaderId st' = leaderId st.