def METHOD_NAME(self):
    ivs = [intvar(1,9,name=n) for n in "xyz"]
    cons = [AllDifferent(ivs) == 0]
    self.assertEqual(str(decompose_in_tree(cons)), "[not([and([(x) != (y), (x) != (z), (y) != (z)])])]")
    cons = [0 == AllDifferent(ivs)]
    self.assertEqual(str(decompose_in_tree(cons)), "[not([and([(x) != (y), (x) != (z), (y) != (z)])])]")
    cons = [AllDifferent(ivs) == AllEqual(ivs[:-1])]
    self.assertEqual(str(decompose_in_tree(cons)), "[(and([(x) != (y), (x) != (z), (y) != (z)])) == ((x) == (y))]")
    cons = [min(ivs) == max(ivs)]
    self.assertEqual(str(decompose_in_tree(cons, supported={"min"})),
                     "[or([(x) >= (min(x,y,z)), (y) >= (min(x,y,z)), (z) >= (min(x,y,z))]), (x) <= (min(x,y,z)), (y) <= (min(x,y,z)), (z) <= (min(x,y,z))]")
    self.assertEqual(str(decompose_in_tree(cons, supported={"max"})),
                     "[or([(x) <= (max(x,y,z)), (y) <= (max(x,y,z)), (z) <= (max(x,y,z))]), (x) >= (max(x,y,z)), (y) >= (max(x,y,z)), (z) >= (max(x,y,z))]")
    # numerical in non-comparison context
    cons = [AllEqual([min(ivs[:-1]),ivs[-1]])]
    self.assertEqual(str(decompose_in_tree(cons, supported={"allequal"})),
                     "[allequal(IV0,z), ((x) <= (IV0)) or ((y) <= (IV0)), (x) >= (IV0), (y) >= (IV0)]")
    self.assertEqual(str(decompose_in_tree(cons, supported={"min"})),
                     "[(min(x,y)) == (z)]")