Proof using.
induction l; intros; simpl in *.
- invcs H. intuition.
- break_match.
invcs H. intuition.
+ subst. simpl.
apply processPackets_num_monotonic in Heqp0. intuition.
+ specialize (IHl n0 l0). apply IHl; auto.
Qed.
Unset Regular Subst Tactic.

Lemma processPackets_nums_unique :
forall n l n' l' p p',
processPackets n l = (n', l') ->
In p l' ->
In p' l' ->
p <> p' ->
(tmNum (snd p)) <> (tmNum (snd p')).