Proof using.
intros. unfold handleRequestVote, advanceCurrentTerm in *.
repeat break_match; find_inversion; simpl in *; intuition.
Qed.

Lemma handleTimeout_messages:
forall (out : list raft_output)
(st : raft_data) (l : list (name * msg)) h
(mi : logIndex) (mt : term) m st' t n,
handleTimeout h st = (out, st', l) ->
In m l ->
snd m = RequestVote t n mi mt ->
maxIndex (log st') = mi /\ maxTerm (log st') = mt /\ t = currentTerm st'.