Proof using.
induction l; intros.
- simpl in *. find_inversion. constructor.
- simpl in *. break_match. find_inversion.
specialize (IHl n0 l0). concludes.
constructor; auto.
intro.
eapply processPackets_correct in H; eauto.
simpl in *. omega.
Qed.

Lemma processPackets_preserves_messages :
forall n l,
map (fun p => (fst p, tmMsg (snd p))) (snd (processPackets n l)) = l.