Proof using name_map_bijective.
move => f from to ms l.
rewrite -map_msg_update2.
by rewrite collate_tot_map_eq.
Qed.
Definition tot_map_trace (e : @name _ multi_fst * (@input base_fst + (@output base_fst))) :=
match e with
| (n, inl i) => (tot_map_name n, inl (tot_map_input i))
| (n, inr o) => (tot_map_name n, inr (tot_map_output o))
end.

(* Specifications: *)
Lemma map_tot_map_trace_eq :
forall out to,
map tot_map_trace (map2fst to (map inr out)) =
map2fst (tot_map_name to) (map inr (map tot_map_output out)).