Proof using ollpti lhllsi lsi aelli rri.
intros.
find_copy_eapply_lem_hyp append_entries_leaderLogs_invariant; eauto.
break_exists. break_and.
subst es.
find_apply_lem_hyp in_app_or. destruct H4.
- find_copy_apply_hyp_hyp.
eapply lifted_leader_sublog_nw; eauto; [subst; auto|auto with datatypes].
- find_eapply_lem_hyp leaders_have_leaderLogs_strong_invariant; auto.
break_exists.  break_and.
pose proof one_leaderLog_per_term_invariant _ ltac:(eauto) h x (currentTerm (snd (nwState net h))) x3 x0.
concludes.
subst_max.
concludes.
break_and. subst.
find_rewrite. eauto using Prefix_In with *.
Qed.

Lemma match_index_all_entries_append_entries :
refined_raft_net_invariant_append_entries' match_index_all_entries_inv.