Proof using.
intros. unfold no_entries_past_current_term in *. intuition.
- unfold no_entries_past_current_term_host in *.
intros. simpl in *. find_higher_order_rewrite.
break_if; eauto. subst.
repeat find_rewrite. eapply le_trans; [|eauto].
eauto.
- unfold no_entries_past_current_term_nw.
intros. simpl in *.
find_apply_hyp_hyp. intuition.
+ intros.
match goal with
| _ : In ?p _ |- _ =>
assert (In p (nwPackets net)) by (find_rewrite; in_crush)
end.
eapply_prop no_entries_past_current_term_nw; eauto.
+ exfalso. subst. repeat find_rewrite.
forwards; intuition.
repeat eexists; eauto.
Qed.

Lemma no_entries_past_current_term_unaffected_0 :
forall net st' ps' xs p ys d,
nwPackets net = xs ++ p :: ys ->
no_entries_past_current_term net ->
(forall h : Net.name, st' h = update name_eq_dec (nwState net) (pDst p) d h) ->
(forall p' : packet,
In p' ps' ->
In p' (xs ++ ys)) ->
currentTerm (nwState net (pDst p)) <= currentTerm d ->
log d = log (nwState net (pDst p)) ->
no_entries_past_current_term {| nwPackets := ps'; nwState := st' |}.