Section LeadersHaveLeaderLogs.
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}.
Proof using.
intros.
unfold handleRequestVoteReply, advanceCurrentTerm in *.
repeat break_match; try find_inversion; subst; simpl in *; intuition.
Qed.
Ltac start :=
red; unfold leaders_have_leaderLogs; intros;
subst; simpl in *; find_higher_order_rewrite;
update_destruct; subst; rewrite_update; eauto; simpl in *.
Proof using.
start.
find_apply_lem_hyp handleAppendEntries_type. intuition; try congruence.
rewrite update_elections_data_appendEntries_leaderLogs.
repeat find_rewrite. eauto.
Qed.
Proof using.
start.
find_apply_lem_hyp handleAppendEntriesReply_type. intuition; try congruence.
repeat find_rewrite. eauto.
Qed.

Lemma leaders_have_leaderLogs_requestVote :
refined_raft_net_invariant_request_vote leaders_have_leaderLogs.