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

Lemma handleAppendEntries_nextIndex_preserved :
forall h st t n pli plt es ci st' ps,
handleAppendEntries h st t n pli plt es ci = (st', ps) ->
nextIndex_preserved st st'.