Proof using.
unfold raft_net_invariant_init, nextIndex_safety.
intros.
discriminate.
Qed.
Definition nextIndex_preserved st st' :=
(type st' = Leader ->
type st = Leader /\
maxIndex (log st) <= maxIndex (log st') /\
nextIndex st' = nextIndex st).

(* Specifications: *)
Lemma nextIndex_safety_preserved :
forall st st',
(forall h',
type st = Leader ->
Nat.pred (getNextIndex st h') <= maxIndex (log st)) ->
nextIndex_preserved st st' ->
(forall h',
type st' = Leader ->
Nat.pred (getNextIndex st' h') <= maxIndex (log st')).