Fixpoint MapCanonicalize (m:Map A) : Map A :=
    match m with
    | M2 m0 m1 => makeM2 A (MapCanonicalize m0) (MapCanonicalize m1)
    | _ => m
    end.

Lemma MapCollect_canon : forall f:ad -> A -> Map B, (forall (a:ad) (y:A), mapcanon B (f a y)) -> forall m:Map A, mapcanon B (MapCollect A B f m).