Proof using.
unfold raft_net_invariant_request_vote_reply, nextIndex_safety.
simpl.
intros.
repeat find_higher_order_rewrite.
update_destruct_simplify.
- find_copy_apply_lem_hyp handleRequestVoteReply_matchIndex.
unfold getNextIndex in *.
erewrite handleRequestVoteReply_log in * by eauto.
intuition; repeat find_rewrite.
+ auto.
+ unfold assoc_default. simpl.
auto using NPeano.Nat.le_le_pred.
- auto.
Qed.

Lemma doLeader_nextIndex_preserved :
forall st h os st' ms,
doLeader st h = (os, st', ms) ->
nextIndex_preserved st st'.