Proof using.
unfold update_elections_data_timeout, handleTimeout, tryToBecomeLeader.
intros.
repeat break_match; simpl in *; intuition; repeat tuple_inversion;
intuition (auto; congruence).
Qed.

(* Specifications: *)
Lemma votes_update_elections_data_timeout :
forall h st out st' ps t' h',
handleTimeout h (snd st) = (out, st', ps) ->
In (t', h') (votes (update_elections_data_timeout h st)) ->
In (t', h') (votes (fst st)) \/ t' = currentTerm st'.