Proof using.
unfold update_elections_data_timeout.
intros.
repeat break_match; subst; simpl in *; auto.
unfold handleTimeout, tryToBecomeLeader in *.
repeat break_match; try congruence; repeat find_inversion; simpl in *;
unfold raft_data in *;
congruence.
Qed.

Lemma handleTimeout_only_sends_RequestVotes :
forall h d out d' l p,
handleTimeout h d = (out, d', l) ->
In p l ->
exists t h' maxi maxt,
snd p = RequestVote t h' maxi maxt.