Proof using.
red. split;
red; intros; simpl in *; intuition.
Qed.

(* Specifications: *)
Lemma handleAppendEntries_ghost_log:
forall (p : packet) (net : network) (d : raft_data)
(m : msg) (t : term) (n : name) (pli : logIndex)
(plt : term) (es : list entry) (ci : logIndex)
(h : Net.name),
msg_refined_raft_intermediate_reachable net ->
entries_match (log (snd (nwState net h))) (fst (pBody p)) ->
handleAppendEntries h (snd (nwState net h)) t n pli plt es ci = (d, m) ->
snd (pBody p) = AppendEntries t n pli plt es ci ->
In p (nwPackets net) -> log d = log (snd (nwState net h)) \/ log d = fst (pBody p).