Proof using.
unfold doGenericServer.
intros.
repeat break_match; repeat find_inversion;
use_applyEntries_spec; subst; simpl in *;
auto.
Qed.

(* Specifications: *)
Lemma doGenericServer_spec :
forall h d os d' ms,
doGenericServer h d = (os, d', ms) ->
(log d' = log d /\ currentTerm d' = currentTerm d /\
(forall m, In m ms -> ~ is_append_entries (snd m))).
Lemma doLeader_type :
forall st h os st' ms,
doLeader st h = (os, st', ms) ->
type st' = type st /\ currentTerm st' = currentTerm st /\ log st' = log st.
Lemma doLeader_currentTerm :
forall st h os st' ms,
doLeader st h = (os, st', ms) ->
currentTerm st' = currentTerm st.
Lemma doLeader_type :
forall st h os st' ms,
doLeader st h = (os, st', ms) ->
type st' = type st /\ currentTerm st' = currentTerm st.