Section LeaderLogsVotesWithLog.
Context {orig_base_params : BaseParams}.
Context {one_node_params : OneNodeParams orig_base_params}.
Context {raft_params : RaftParams orig_base_params}.
Context {rri : raft_refinement_interface}.
Context {vrmutdi : votesReceived_moreUpToDate_interface}.
Context {rvrmutdi : requestVoteReply_moreUpToDate_interface}.
Proof using.
intros.
break_exists_exists. intuition.
find_apply_hyp_hyp. break_exists_exists. intuition eauto.
Qed.
Proof using.
red. unfold leaderLogs_votesWithLog. intros. simpl in *.
subst. repeat find_higher_order_rewrite.
destruct_update; simpl in *; eauto.
- find_rewrite_lem update_elections_data_appendEntries_leaderLogs.
eapply quorum_preserved; [|eauto].
intros.
find_higher_order_rewrite; destruct_update; simpl in *; eauto.
rewrite votesWithLog_same_append_entries. auto.
- eapply quorum_preserved; [|eauto].
intros.
find_higher_order_rewrite; destruct_update; simpl in *; eauto.
rewrite votesWithLog_same_append_entries. auto.
Qed.
Proof using.
red. unfold leaderLogs_votesWithLog. intros. simpl in *.
subst. repeat find_higher_order_rewrite.
destruct_update; simpl in *; eauto.
- eapply quorum_preserved; [|eauto].
intros.
find_higher_order_rewrite; destruct_update; simpl in *; eauto.
- eapply quorum_preserved; [|eauto].
intros.
find_higher_order_rewrite; destruct_update; simpl in *; eauto.
Qed.
Proof using.
intros.
unfold update_elections_data_requestVote in *.
repeat break_match; simpl in *; intuition.
Qed.

Lemma leaderLogs_votesWithLog_request_vote :
refined_raft_net_invariant_request_vote leaderLogs_votesWithLog.