Proof using.
intros. unfold handleAppendEntries in *.
repeat break_match; find_inversion; simpl in *; auto; right;
intuition eauto using advanceCurrentTerm_currentTerm; right; congruence.
Qed.

Lemma handleRequestVote_currentTerm_leaderId :
forall h st t c li lt st' m,
handleRequestVote h st t c li lt = (st', m) ->
currentTerm st < currentTerm st' \/
(currentTerm st = currentTerm st' /\ leaderId st' = leaderId st).