Proof using.
move => net failed tr H_st.
have ->: failed = map (@tot_map_name _ _ _ _ orig_multi_params_name_tot_map) failed by rewrite /tot_map_name /= map_id.
rewrite serialize_odnet_tot_map_odnet.
have ->: tr = map (@tot_map_trace _ _ _ _ _ orig_multi_params_name_tot_map) tr.
rewrite /tot_map_trace /= /id /= {H_st}.
elim: tr => //=.
by case => a; case => [i|o] l IH; rewrite -IH.
exact: step_ordered_dynamic_failure_tot_mapped_simulation_star_1.
Qed.
Definition deserialize_packet (p : @packet _ serialized_multi_params) : option (@packet _ orig_multi_params) :=
match deserialize_top deserialize (pBody p) with
| None => None
| Some body =>
Some (@mkPacket _ orig_multi_params (pSrc p) (pDst p) body)
end.
Definition deserialize_net (net: @network _ serialized_multi_params) :  (@network _ orig_multi_params) :=
@mkNetwork _ orig_multi_params (filterMap deserialize_packet (nwPackets net)) net.(nwState).
Definition deserialize_onet (net: @ordered_network _ serialized_multi_params) :  (@ordered_network _ orig_multi_params) :=
@mkONetwork _ orig_multi_params (fun src dst => filterMap (fun m => match deserialize_top deserialize m with Some data => Some data | None => None end) (net.(onwPackets) src dst)) net.(onwState).
Definition deserialize_odnet (net: @ordered_dynamic_network _ serialized_multi_params) :  (@ordered_dynamic_network _ orig_multi_params) :=
@mkODNetwork _ orig_multi_params net.(odnwNodes) (fun src dst => filterMap (fun m => match deserialize_top deserialize m with Some data => Some data | None => None end) (net.(odnwPackets) src dst)) net.(odnwState).

(* Specifications: *)
Lemma deserialize_serialize_net_id : forall net,
deserialize_net (serialize_net net) = net.