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

(* Specifications: *)
Lemma nextIndex_safety_do_generic_server :
raft_net_invariant_do_generic_server nextIndex_safety.