Proof using.
unfold deghost.
simpl. intuition.
apply in_map_iff.
eexists; eauto.
Qed.

(* Specifications: *)
Theorem no_append_entries_to_self'_invariant :
forall net,
refined_raft_intermediate_reachable net ->
no_append_entries_to_self' net.
Lemma in_mgv_ghost_packet :
forall (net : ghost_log_network) p,
In p (nwPackets net) ->
In (mgv_deghost_packet p) (nwPackets (mgv_deghost net)).
Lemma logs_sorted_aerts :
forall net,
logs_sorted (deghost net) ->
append_entries_request_term_sanity net.
Lemma lifted_taifol_nw :
forall net,
refined_raft_intermediate_reachable net ->
forall p t leaderId prevLogIndex prevLogTerm entries leaderCommit,
In p (nwPackets net) ->
pBody p = AppendEntries t leaderId prevLogIndex prevLogTerm entries leaderCommit ->
terms_and_indices_from_one entries.
Lemma pDst_deghost_packet :
forall p : packet (params := raft_refined_multi_params),
pDst (deghost_packet p) = pDst p.