%% %CopyrightBegin%
%%
%% SPDX-License-Identifier: Apache-2.0
%%
%% Copyright Ericsson AB 2021-2025. All Rights Reserved.
%%
%% %CopyrightEnd%

[;1m  relation_to_family(BinRel)[0m

  Returns family [;;4mFamily[0m such that the index set is equal to the
  domain of the binary relation [;;4mBinRel[0m, and [;;4mFamily[0m[i] is the
  image of the set of i under [;;4mBinRel[0m.

[;1mExamples[0m

    1> R = sofs:relation([{b,1},{c,2},{c,3}]).
    2> F = sofs:relation_to_family(R).
    3> sofs:to_external(F).
    [{b,[1]},{c,[2,3]}]
