Proof using rmri rlmli.
unfold lifted_entries_gt_0.
intros.
pose proof msg_lift_prop _ entries_gt_0_invariant _ ltac:(eauto).
unfold entries_gt_0 in *.
match goal with
| [ H : _ |- _ ] => eapply H; eauto
end.
rewrite msg_deghost_spec.
eauto.
Qed.

(* Specifications: *)
Lemma lifted_maxIndex_sanity_append_entries :
forall xs (p : ghost_log_packet) 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 ->
lifted_maxIndex_sanity net ->
state_machine_safety (deghost (mgv_deghost net)) ->
msg_refined_raft_intermediate_reachable net ->
nwPackets net = xs ++ p :: ys ->
(forall h, st' h = update name_eq_dec (nwState net) (pDst p) (gd, d) h) ->
(forall (p' : ghost_log_packet), In p' ps' -> In p' (xs ++ ys) \/
mgv_deghost_packet p' = mkPacket (params := raft_refined_multi_params)
(pDst p) (pSrc p) m) ->
lifted_maxIndex_sanity (mkNetwork ps' st').