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

(* Specifications: *)
Lemma doGenericServer_preserves_candidateEntries :
forall net gd d h os d' ms e,
nwState net h = (gd, d) ->
doGenericServer h d = (os, d', ms) ->
candidateEntries e (nwState net) ->
candidateEntries e (update name_eq_dec (nwState net) h (gd, d')).
Lemma no_entries_past_current_term_do_generic_server :
raft_net_invariant_do_generic_server no_entries_past_current_term.