Proof using.
unfold doLeader, advanceCommitIndex in *.
intros.
repeat break_match; find_inversion; simpl in *; congruence.
Qed.

Lemma doLeader_term_votedFor :
forall st h os st' ms,
doLeader st h = (os, st', ms) ->
currentTerm st' = currentTerm st /\
votedFor st' = votedFor st.