Proof using.
case => ps nwS.
rewrite /deserialize_net /serialize_net /=.
set ps' := filterMap _ _.
have H_p: ps' = ps.
rewrite /ps'.
clear.
rewrite /deserialize_packet.
elim: ps => [|p ps IH] //=.
rewrite serialize_deserialize_top_id IH.
by case: p.
by rewrite H_p.
Qed.

Lemma deserialize_serialize_onet_id : forall net,
deserialize_onet (serialize_onet net) = net.