Proof using cci.
unfold candidateEntriesTerm.
intros.
break_exists_exists.
update_destruct_simplify; auto.
break_and.
unfold raft_data in *. simpl in *.
unfold update_elections_data_requestVoteReply.
match goal with
| |- context [handleRequestVoteReply ?h ?st ?h' ?t ?r] =>
remember (handleRequestVoteReply h st h' t r) as new_state
end; find_copy_apply_lem_hyp handleRequestVoteReply_spec.
repeat (break_match); intuition; repeat find_rewrite; intuition;
simpl; break_if; auto.
- find_apply_lem_hyp cronies_correct_invariant.
unfold cronies_correct in *. intuition.
unfold votes_received_leaders in *.
match goal with
| H :  Leader = _ |- _ =>
symmetry in H
end. find_apply_hyp_hyp.
eapply wonElection_no_dup_in;
eauto using NoDup_dedup, in_dedup_was_in, dedup_In.
- destruct (serverType_eq_dec (type (snd (nwState net x))) Leader); intuition.
find_apply_lem_hyp cronies_correct_invariant; auto.
eapply wonElection_no_dup_in;
eauto using NoDup_dedup, in_dedup_was_in, dedup_In.
Qed.

Lemma prevLog_candidateEntriesTerm_request_vote_reply :
refined_raft_net_invariant_request_vote_reply prevLog_candidateEntriesTerm.