solve(True) or solve(False) raises a valueError