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.

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)).