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

Lemma handleTimeout_same_term_votedFor_preserved :
forall h st out st' ps,
handleTimeout h st = (out, st', ps) ->
currentTerm st' = currentTerm st ->
votedFor st' = votedFor st.