Proof using rmri rlmli.
intros.
pose proof msg_lift_prop _ entries_sorted_nw_invariant.
find_copy_apply_hyp_hyp.
unfold entries_sorted_nw, lifted_entries_sorted_nw' in *.
intros.
find_apply_lem_hyp in_mgv_ghost_packet.
eapply_prop_hyp In In; eauto.
Qed.

Lemma commit_invariant_append_entries :
forall xs p ys (net : ghost_log_network) st' ps' gd d m t n pli plt es ci,
handleAppendEntries (pDst p) (snd (nwState net (pDst p))) t n pli plt es ci = (d, m) ->
gd = update_elections_data_appendEntries (pDst p) (nwState net (pDst p)) t n pli plt es ci ->
snd (pBody p) = AppendEntries t n pli plt es ci ->
commit_invariant net ->
msg_refined_raft_intermediate_reachable net ->
lifted_maxIndex_sanity net ->
nwPackets net = xs ++ p :: ys ->
(forall h, st' h = update name_eq_dec (nwState net) (pDst p) (gd, d) h) ->
(forall p', In p' ps' ->
In p' (xs ++ ys) \/ p' = mkPacket (pDst p) (pSrc p)
(write_ghost_log (pDst p) (gd, d), m)) ->
commit_invariant (mkNetwork ps' st').