Proof using lltsi vvci cci vci llvwli.
start. repeat find_higher_order_rewrite. repeat (update_destruct; rewrite_update).
- split; [subst; auto|].
find_copy_eapply_lem_hyp leaderLogs_update_elections_data_RVR; [|eauto].
pose proof H.
eapply leaderLogs_update_elections_data_RVR with (ll0 := ll) in H; [|eauto].
intro_refined_invariant leaderLogs_currentTerm_sanity_candidate_invariant.
intuition.
+ match goal with
| [ h: _ |- _ ] => solve[eapply h; eauto]
end.
+ apply_prop_hyp leaderLogs_currentTerm_sanity_candidate nwState; auto.
find_copy_apply_lem_hyp handleRequestVoteReply_type. intuition; unfold raft_data in *; simpl in *.
* subst. repeat find_rewrite. discriminate.
* find_apply_lem_hyp lt_asym. congruence.
* subst. repeat find_rewrite. find_apply_lem_hyp lt_irrefl. contradiction.
+ apply_prop_hyp leaderLogs_currentTerm_sanity_candidate nwState; auto.
find_copy_apply_lem_hyp handleRequestVoteReply_type. intuition; unfold raft_data in *; simpl in *.
* subst. repeat find_rewrite. discriminate.
* find_apply_lem_hyp lt_asym. congruence.
* subst. repeat find_rewrite. find_apply_lem_hyp lt_irrefl. contradiction.
+ subst. auto.
- exfalso. eapply contradiction_case; eauto.
- exfalso. eapply contradiction_case; eauto.
- eauto.
Qed.

Lemma one_leaderLog_per_term_do_leader :
refined_raft_net_invariant_do_leader one_leaderLog_per_term.