Proof using.
intros.
unfold handleRequestVoteReply, advanceCurrentTerm in *; repeat break_match;
subst; do_bool; intuition.
Qed.

(* Specifications: *)
Lemma handleAppendEntries_same_term_votedFor_preserved :
forall h st t n pli plt es ci st' ps,
handleAppendEntries h st t n pli plt es ci = (st', ps) ->
currentTerm st' = currentTerm st ->
votedFor st' = votedFor st.