Proof using.
unfold raft_net_invariant_append_entries_reply.
intros.
do_state_same_packet_subset; eauto.
- find_apply_lem_hyp handleAppendEntriesReply_same_log.
auto.
- exfalso. do_in_map.
find_eapply_lem_hyp handleAppendEntriesReply_doesn't_send_AE; eauto.
subst; simpl in *. find_rewrite.
match goal with
| H : ~ _ |- _ => apply H
end. repeat eexists; eauto.
Qed.

Lemma handleAppendEntries_log_matching_beginning_of_time_entries_match :
forall net p t n plt es ci h,
log_matching_hosts net ->
log_matching_nw net ->
logs_sorted_nw net ->
uniqueIndices_host_invariant net ->
In p (nwPackets net) ->
pBody p = AppendEntries t n 0 plt es ci ->
pDst p <> h ->
entries_match es (log (nwState net h)).