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

(* Specifications: *)
Lemma tryToBecomeLeader_currentTerm :
forall h st out st' l,
tryToBecomeLeader h st = (out, st', l) ->
currentTerm st <= currentTerm st'.
Lemma handleAppendEntriesReply_type :
forall h st h' t es r st' ms,
handleAppendEntriesReply h st h' t es r = (st', ms) ->
(type st' = type st /\ currentTerm st' = currentTerm st) \/
type st' = Follower.