Proof using lsi.
unfold raft_net_invariant_do_leader, prevLog_leader_sublog.
intros. simpl in *.
repeat find_higher_order_rewrite.
find_apply_hyp_hyp. break_or_hyp.
- break_if; eauto.
find_copy_apply_lem_hyp doLeader_type. break_and.
find_copy_apply_lem_hyp doLeader_log.
repeat find_rewrite. eauto.
- find_apply_lem_hyp in_map_iff. break_exists. break_and. subst.
simpl in *.
find_copy_eapply_lem_hyp doLeader_messages; eauto.
intuition.
+ omega.
+ break_exists. break_and. subst.
exists x0. find_apply_lem_hyp findAtIndex_elim. intuition.
break_if.
* congruence.
* pose proof (leader_sublog_invariant_invariant _ ltac:(eauto)).
unfold leader_sublog_invariant, leader_sublog_host_invariant in *. break_and.
eauto.
Qed.

(* Specifications: *)
Lemma prevLog_leader_sublog_do_generic_server :
raft_net_invariant_do_generic_server prevLog_leader_sublog.