Proof using.
red. unfold allEntries_leader_sublog. intros. simpl in *.
subst. repeat find_higher_order_rewrite.
destruct_update; simpl in *; eauto;
do_in_map; subst;
destruct x; simpl in *;
find_copy_apply_lem_hyp handleRequestVote_type;
find_apply_lem_hyp handleRequestVote_log;
try find_erewrite_lem update_elections_data_requestVote_allEntries; eauto;
intuition; repeat find_rewrite; eauto; try congruence.
Qed.

Lemma handleRequestVoteReply_RVR_spec :
forall h st h' t r st',
handleRequestVoteReply h st h' t r = st' ->
st' = st \/
(type st' = Follower /\
currentTerm st' = t /\
log st' = log st) \/
(currentTerm st' = currentTerm st /\
log st' = log st /\
((type st = Candidate /\ type st' = Leader /\ r = true /\ currentTerm st = t /\
wonElection (dedup name_eq_dec (h' :: votesReceived st)) = true) \/ type st' = type st)).