def types_equal(a, b):
    a = a.get_repr()
    b = b.get_repr()
    if (a == b):
        return True
    if (isinstance(a, TypeTuple) and isinstance(b, TypeTuple)):
        if (len(a.args) != len(b.args)):
            return False
        return all(map(types_equal, zip(a.args, b.args)))
    elif (isinstance(a, TypeArrow) and isinstance(b, TypeArrow)):
        return (types_equal(a.left, b.left) and types_equal(a.right, b.right))
    return False
def types_equal(a, b):
    a = a.get_repr()
    b = b.get_repr()
    if (a == b):
        return True
    if (isinstance(a, TypeTuple) and isinstance(b, TypeTuple)):
        if (len(a.args) != len(b.args)):
            return False
        return all(map(types_equal, zip(a.args, b.args)))
    elif (isinstance(a, TypeArrow) and isinstance(b, TypeArrow)):
        return (types_equal(a.left, b.left) and types_equal(a.right, b.right))
    return False