Ltac workhorse :=
    try match goal with
        | [ |- mkNetwork _ _ = mkNetwork _ _ ] => f_equal
      end;
    try match goal with
        | [ |- (fun _ => _) = (fun _ => _) ] => apply functional_extensionality; intros
      end;
      repeat break_match;
      repeat match goal with
               | [ H : (_, _) = (_, _) |- _ ] => invc H
             end;
      repeat (simpl in *; subst);
      repeat rewrite map_app;
      repeat rewrite map_map.Notation mgv_deghost := (@mgv_deghost _ _ ghost_log_params).

Lemma map_subset : forall A B (f : A -> B) l l', (forall x, In x (map f l') -> In x (map f l)) -> exists l'', map f l' = map f l'' /\ (forall x, In x l'' -> In x l).