Proof using.
intros.
unfold logs_sorted_nw. intros. simpl in *. find_apply_hyp_hyp.
intuition.
- unfold logs_sorted_nw in *. eauto.
- subst. exfalso. match goal with H : _ |- _ => apply H end.
repeat eexists; eauto.
Qed.

(* Specifications: *)
Theorem packets_gt_prevIndex_only_new_packets_matter :
forall net ps' l st',
packets_gt_prevIndex net ->
(forall p, In p ps' -> In p (nwPackets net) \/ In p l) ->
packets_gt_prevIndex (mkNetwork l st') ->
packets_gt_prevIndex (mkNetwork ps' st').