Proof using.
intros. unfold handleAppendEntriesReply, advanceCurrentTerm in *.
repeat break_match; tuple_inversion; do_bool; simpl; auto; omega.
Qed.

Lemma handleAppendEntries_currentTerm :
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'.