Proof using.
unfold doLeader.
intros.
repeat break_match; repeat find_inversion; simpl in *; intuition.
do_in_map.
unfold replicaMessage in *. simpl in *. subst. simpl in *.
find_inversion.
eauto using findGtIndex_in.
Qed.

Lemma candidate_entries_do_leader :
refined_raft_net_invariant_do_leader CandidateEntries.