Proof using rri.
unfold state_machine_safety, state_machine_safety_nw.
intuition.
match goal with
| [ H : _ |- _ ] => eapply H with (p := deghost_packet p)
end.
- auto using in_ghost_packet.
- rewrite pBody_deghost_packet. eauto.
- rewrite deghost_spec. eauto.
- auto.
Qed.

Lemma msg_lifted_sms_nw :
forall (net : ghost_log_network) h p t leaderId prevLogIndex prevLogTerm entries leaderCommit e,
state_machine_safety (deghost (mgv_deghost net)) ->
In p (nwPackets net) ->
snd (pBody p) = AppendEntries t leaderId prevLogIndex prevLogTerm
entries leaderCommit ->
t >= currentTerm (snd (nwState net h)) ->
commit_recorded (deghost (mgv_deghost net)) h e ->
(prevLogIndex > eIndex e \/
(prevLogIndex = eIndex e /\ prevLogTerm = eTerm e) \/
eIndex e > maxIndex entries \/
In e entries).