Proof using rvrmutdi vrmutdi.
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;
rewrite update_elections_data_request_vote_reply_votesWithLog;
auto].
find_eapply_lem_hyp leaderLogs_update_elections_data_RVR; eauto.
intuition;
[eapply quorum_preserved; [|eauto];
intros;
find_higher_order_rewrite; destruct_update; simpl in *; eauto;
rewrite update_elections_data_request_vote_reply_votesWithLog;
auto|].
subst.
match goal with
| |- context [handleRequestVoteReply ?h ?st ?h' ?t ?r] =>
remember (handleRequestVoteReply h st h' t r) as new_state
end.
find_eapply_lem_hyp handleRequestVoteReply_spec'.
intuition.
conclude_using
ltac:(repeat find_rewrite; congruence).
concludes.
intuition.
repeat find_rewrite.
find_apply_lem_hyp wonElection_dedup_spec.
break_exists_exists. intuition.
find_apply_hyp_hyp.
simpl in *. intuition.
- subst.
find_eapply_lem_hyp requestVoteReply_moreUpToDate_invariant; eauto.
repeat find_rewrite.
repeat conclude_using eauto.
break_exists_exists. intuition.
find_higher_order_rewrite.
simpl in *.
destruct_update; subst; simpl in *; eauto.
repeat find_rewrite.
rewrite update_elections_data_request_vote_reply_votesWithLog. auto.
- find_eapply_lem_hyp votesReceived_moreUpToDate_invariant; eauto.
break_exists_exists. intuition.
find_higher_order_rewrite.
destruct_update; simpl in *; eauto.
rewrite update_elections_data_request_vote_reply_votesWithLog. auto.
Qed.

Lemma update_elections_data_timeout_votesWithLog_old :
forall h st t h' l,
In (t, h', l) (votesWithLog (fst st)) ->
In (t, h', l) (votesWithLog (update_elections_data_timeout h st)).