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

(* Specifications: *)
Lemma update_elections_data_timeout_cronies :
forall h d out d' l t,
handleTimeout h (snd d) = (out, d', l) ->
cronies (update_elections_data_timeout h d) t = cronies (fst d) t \/
(t = currentTerm d' /\
cronies (update_elections_data_timeout h d) t = votesReceived d').