
  -spec partition_family(SetFun, Set) -> Family
                            when
                                Family :: family(),
                                SetFun :: set_fun(),
                                Set :: a_set().

  Returns family Family where the indexed set is a partition
  of Set such that two elements are considered equal if the
  results of applying SetFun are the same value i. This i is the
  index that Family maps onto the equivalence class.

    1> S = sofs:relation([{a,a,a,a},{a,a,b,b},{a,b,b,b}]),
    SetFun = {external, fun({A,_,C,_}) -> {A,C} end},
    F = sofs:partition_family(SetFun, S),
    sofs:to_external(F).
    [{{a,a},[{a,a,a,a}]},{{a,b},[{a,a,b,b},{a,b,b,b}]}]
