Proof using.
intros. unfold handleRequestVote, advanceCurrentTerm in *.
repeat break_match; tuple_inversion; do_bool; auto.
Qed.

(* Specifications: *)
Lemma handleRequestVoteReply_type :
forall h st h' t r st',
handleRequestVoteReply h st h' t r = st' ->
(type st' = type st /\ currentTerm st' = currentTerm st) \/
(type st' = Follower /\ currentTerm st' > currentTerm st) \/
(type st = Candidate /\ type st' = Leader /\ currentTerm st' = currentTerm st).