Proof using.
unfold replicaMessage.
intros.
repeat break_match; repeat tuple_inversion; repeat find_rewrite;
erewrite getNextIndex_ext in * by eauto; congruence.
Qed.

Lemma prevLog_candidateEntriesTerm_do_leader :
refined_raft_net_invariant_do_leader prevLog_candidateEntriesTerm.