Proof using rvmimti.
red. unfold votedFor_moreUpToDate. intros. simpl in *.
find_copy_apply_lem_hyp handleRequestVote_log_term_type.
subst. repeat find_higher_order_rewrite.
destruct_update_hyp; simpl in *; eauto;
intuition; try congruence; repeat find_rewrite; eauto.
- find_eapply_lem_hyp update_elections_data_request_vote_votedFor; eauto.
intuition; repeat find_rewrite.
+ eapply_prop_hyp RaftState.votedFor RaftState.votedFor; eauto.
break_exists_exists; intuition.
eauto using update_elections_data_request_vote_votesWithLog_old.
+ simpl. eauto using moreUpToDate_refl.
- find_eapply_lem_hyp update_elections_data_request_vote_votedFor; eauto.
intuition; repeat find_rewrite.
+ eapply_prop_hyp RaftState.votedFor RaftState.votedFor; eauto.
break_exists_exists; intuition.
eauto using update_elections_data_request_vote_votesWithLog_old.
+ find_apply_lem_hyp requestVote_maxIndex_maxTerm_invariant.
subst.
eapply_prop_hyp requestVote_maxIndex_maxTerm pBody. conclude_using eauto.
all:eauto.
intuition; subst.
eexists; intuition; eauto.
- find_eapply_lem_hyp update_elections_data_request_vote_votedFor; eauto.
intuition; repeat find_rewrite.
+ eapply_prop_hyp RaftState.votedFor RaftState.votedFor; eauto.
break_exists_exists; intuition.
eauto using update_elections_data_request_vote_votesWithLog_old.
+ find_apply_lem_hyp requestVote_maxIndex_maxTerm_invariant.
subst.
eapply_prop_hyp requestVote_maxIndex_maxTerm pBody. conclude_using eauto.
all:eauto.
intuition; subst.
eexists; intuition; eauto.
Qed.

(* Specifications: *)
Lemma votedFor_moreUpToDate_request_vote_reply :
refined_raft_net_invariant_request_vote_reply votedFor_moreUpToDate.