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

Lemma handleAppendEntriesReply_stateMachine:
forall h st (d : raft_data)
(m : list (name * msg)) (t : nat) (es : list entry)
(res : bool) h',
handleAppendEntriesReply h st h' t es res = (d, m) ->
stateMachine d = stateMachine st.