Proof using.
intros. unfold handleAppendEntries, advanceCurrentTerm in *.
repeat break_match; find_inversion; do_bool; auto.
Qed.

Lemma tryToBecomeLeader_currentTerm :
forall h st out st' l,
tryToBecomeLeader h st = (out, st', l) ->
currentTerm st <= currentTerm st'.