Proof using.
intros. unfold handleRequestVote in *.
repeat break_match; tuple_inversion; do_bool;
simpl; auto using advanceCurrentTerm_currentTerm.
Qed.

Theorem handleAppendEntries_currentTerm_leaderId :
forall h st t n pli plt es ci st' ps,
handleAppendEntries h st t n pli plt es ci = (st', ps) ->
currentTerm st < currentTerm st' \/
(currentTerm st <= currentTerm st' /\ (leaderId st' = leaderId st \/ leaderId st' <> None)).