def test_to_int_repr():
    (x, y, z) = list(map(Boolean, symbols('x,y,z')))

    def sorted_recursive(arg):
        try:
            return sorted((sorted_recursive(x) for x in arg))
        except TypeError:
            return arg
    assert (sorted_recursive(to_int_repr([(x | y), (z | x)], [x, y, z])) == sorted_recursive([[1, 2], [1, 3]]))
    assert (sorted_recursive(to_int_repr([(x | y), (z | (~ x))], [x, y, z])) == sorted_recursive([[1, 2], [3, (- 1)]]))
def test_to_int_repr():
    (x, y, z) = list(map(Boolean, symbols('x,y,z')))

    def sorted_recursive(arg):
        try:
            return sorted((sorted_recursive(x) for x in arg))
        except TypeError:
            return arg
    assert (sorted_recursive(to_int_repr([(x | y), (z | x)], [x, y, z])) == sorted_recursive([[1, 2], [1, 3]]))
    assert (sorted_recursive(to_int_repr([(x | y), (z | (~ x))], [x, y, z])) == sorted_recursive([[1, 2], [3, (- 1)]]))