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

Theorem handleAppendEntriesReply_log_term_type :
forall h st n t es r st' ps,
handleAppendEntriesReply h st n t es r = (st', ps) ->
(log st' = log st /\ currentTerm st' = currentTerm st /\ type st' = type st) \/
type st' = Follower.