Proof using plceti cci vci rri.
unfold raft_net_invariant_request_vote_reply, prevLog_leader_sublog.
intros. simpl in *.
repeat find_higher_order_rewrite.
find_apply_hyp_hyp.
find_eapply_lem_hyp app_cons_in_rest; [|solve[eauto]].
find_rewrite. break_if; eauto.
find_copy_apply_lem_hyp handleRequestVoteReply_type.
find_copy_apply_lem_hyp handleRequestVoteReply_log.
intuition; repeat find_rewrite.
- eauto.
- discriminate.
- exfalso.
find_apply_lem_hyp handleRequestVoteReply_type_term_won.
intuition; try congruence.
eapply prevLog_candidateEntriesTerm_lowered with (p := p0) ; eauto.
+ congruence.
+ congruence.
Qed.

(* Specifications: *)
Lemma prevLog_leader_sublog_do_leader :
raft_net_invariant_do_leader prevLog_leader_sublog.