def imply(*args): return Node.build(TypeNode.IMP, *args)
def iff(*args): return Node.build(TypeNode.IFF, *args)
def xor(*args): return Node.build(TypeNode.XOR, *args) if len(args) > 1 else args[0]
def dist(*args): return Node.build(TypeNode.DIST, *args)
def max(*args): return Node.build(TypeNode.MAX, *args) if len(args) > 0 and any(isinstance(a, (Node, Variable)) for a in args) else maxPython(*args)
def abs(*args): if len(args) == 1 and isinstance(args[0], Node) and args[0].type == TypeNode.SUB: return Node.build(TypeNode.DIST, *args[0].sons) return Node.build(TypeNode.ABS, *args) if len(args) == 1 and isinstance(args[0], (Node, Variable)) else absPython(*args)