Proof using.
red. unfold CandidateEntries.
intros. subst.
intuition; simpl in *.
- unfold candidateEntries_host_invariant in *.
intros.
eapply candidateEntries_ext; eauto.
repeat find_higher_order_rewrite.
find_rewrite_lem update_fun_comm. simpl in *.
update_destruct; subst; rewrite_update; simpl in *;
try find_erewrite_lem handleRequestVote_same_log;
eapply handleRequestVote_preserves_candidateEntries; eauto.
- unfold candidateEntries_nw_invariant in *.
intros. simpl in *.
eapply candidateEntries_ext; eauto.
find_apply_hyp_hyp. intuition.
+ eauto using handleRequestVote_preserves_candidateEntries.
+ subst. simpl in *.
find_apply_lem_hyp handleRequestVote_only_sends_RVR.
subst. break_exists. discriminate.
Qed.

Lemma candidate_entries_request_vote_reply :
refined_raft_net_invariant_request_vote_reply CandidateEntries.