Proof using lphogli glci rlmli rmri.
intros.
find_copy_eapply_lem_hyp ghost_log_correct_invariant; eauto;
repeat conclude_using eauto.
find_apply_lem_hyp handleAppendEntries_log.
intuition; subst; auto.
- repeat find_rewrite.
rewrite sorted_findGtIndex_0; auto;
[|eapply ghost_log_sorted; eauto].
intros.
eapply ghost_log_contiguous; eauto.
- right.
repeat find_rewrite.
break_exists. intuition.
subst.
replace (eIndex x0) with (eIndex x).
eapply thing; eauto; repeat find_rewrite; auto using findGtIndex_Prefix;
try solve [eapply ghost_log_sorted; eauto];
try solve [eapply ghost_log_contiguous; eauto];
try solve [eapply lifted_entries_sorted_invariant; eauto];
try solve [eapply lifted_entries_contiguous_nw_invariant; eauto].
Qed.
Hint Resolve entries_match_refl.
Hint Resolve entries_match_sym.

Lemma ghost_log_entries_match_append_entries :
msg_refined_raft_net_invariant_append_entries' ghost_log_entries_match.