Proof using.
unfold raft_net_invariant_do_leader, nextIndex_safety.
simpl.
intros.
repeat find_higher_order_rewrite.
update_destruct_simplify.
- eauto using nextIndex_safety_preserved, doLeader_nextIndex_preserved.
- auto.
Qed.

(* Specifications: *)
Lemma doGenericServer_nextIndex_preserved :
forall h st os st' ms,
doGenericServer h st = (os, st', ms) ->
nextIndex_preserved st st'.