system implementation sys.impl
    parameters
        A0: set of indices;
        A1: set of indices;

    subcomponents
        s: single;
        d: single;
        a0: set indexed by A0;
        a1: set indexed by A1;

    connections
        s -> a0[0];
        a1[0] -> d;

        a0[x] -> a0[y] if x < y for x in A0, y in A0;
        a1[x] -> a1[y] if x < y for x in A1, y in A1;

        a0[x] -> a1[y] if x < y for x in A0, y in A1;
        a1[x] -> a0[y] if x < y + 2 for x in A1, y in A0;

    reconfigurations
        exists(x not in A0, next(A0) = add(A0, x));
        exists(x in A0, next(A0) = remove(A0, x));

        exists(x not in A1, next(A1) = add(A1, x));
        exists(x in A1, next(A1) = remove(A1, x));

end sys.impl;
