Proof using.
intros.
unfold handleAppendEntries in *.
repeat break_match; find_inversion; simpl in *; intuition; repeat find_rewrite_lem advanceCurrentTerm_log; intuition.
simpl in *. do_in_app. intuition.
eauto using removeAfterIndex_in.
Qed.

Lemma log_matching_hosts_ignores_packets :
forall net net',
log_matching_hosts net ->
(forall h, log (nwState net h) = log (nwState net' h)) ->
log_matching_hosts net'.