Proof using.
unfold handleAppendEntries.
intros.
repeat break_match; find_inversion; intro; break_exists; discriminate.
Qed.

(* Specifications: *)
Lemma handleMessage_sends_log :
forall client id i net p d' ms m es e,
In p (nwPackets net) ->
handleMessage (pSrc p) (pDst p) (pBody p) (nwState net (pDst p)) = (d', ms) ->
correct_entry client id i e ->
In m ms ->
mEntries (snd m) = Some es ->
In e es ->
In e (log (nwState net (pDst p))).
Lemma leaderLogs_entries_match_append_entries :
refined_raft_net_invariant_append_entries leaderLogs_entries_match.