wip

This is_zero triggers the assumption system which leads to problems:

File "c:\Users\leslie\sympy\sympy\stats\__init__.py", line 35, in sympy.stats.__
init__
Failed example:
    simplify(P(Z>1)) # Probability of Z being greater than 1
Exception raised:
    Traceback (most recent call last):
      File "c:\Python26\lib\doctest.py", line 1253, in __run
        compileflags, 1) in test.globs
      File "<doctest sympy.stats.__init__[7]>", line 1, in <module>
        simplify(P(Z>1)) # Probability of Z being greater than 1
      File "c:\Users\leslie\sympy\sympy\stats\rv.py", line 615, in probability
        return result.doit()
      File "c:\Users\leslie\sympy\sympy\integrals\integrals.py", line 472, in do
it
        ret = try_meijerg(function, xab)
      File "c:\Users\leslie\sympy\sympy\integrals\integrals.py", line 449, in tr
y_meijerg
        res = meijerint_definite(function, x, a, b)
      File "c:\Users\leslie\sympy\sympy\integrals\meijerint.py", line 1776, in m
eijerint_definite
        *Heaviside(x + split - a), x)
      File "c:\Users\leslie\sympy\sympy\integrals\meijerint.py", line 1852, in _
meijerint_definite_2
        res = _meijerint_definite_3(g, x)
      File "c:\Users\leslie\sympy\sympy\integrals\meijerint.py", line 1864, in _
meijerint_definite_3
        res = _meijerint_definite_4(f, x)
      File "c:\Users\leslie\sympy\sympy\integrals\meijerint.py", line 1944, in _
meijerint_definite_4
        return _my_unpolarify(hyperexpand(res)), cond
      File "c:\Users\leslie\sympy\sympy\simplify\hyperexpand.py", line 2482, in
hyperexpand
        return f.replace(hyper, do_replace).replace(meijerg, do_meijer)
      File "c:\Users\leslie\sympy\sympy\core\basic.py", line 1379, in replace
        rv = bottom_up(self, rec_replace, atoms=True)
      File "c:\Users\leslie\sympy\sympy\simplify\simplify.py", line 4054, in bot
tom_up
        for a in rv.args])
      File "c:\Users\leslie\sympy\sympy\simplify\simplify.py", line 4057, in bot
tom_up
        rv = F(rv)
      File "c:\Users\leslie\sympy\sympy\core\basic.py", line 1367, in rec_replac
e
        new = _value(expr, result)
      File "c:\Users\leslie\sympy\sympy\core\basic.py", line 1311, in <lambda>
        _value = lambda expr, result: value(*expr.args)
      File "c:\Users\leslie\sympy\sympy\simplify\hyperexpand.py", line 2479, in
do_meijer
        allow_hyper, rewrite=rewrite)
      File "c:\Users\leslie\sympy\sympy\simplify\hyperexpand.py", line 2367, in
_meijergexpand
        slater1, cond1 = do_slater(func.an, func.bm, func.ap, func.bq, z, z0)
      File "c:\Users\leslie\sympy\sympy\simplify\hyperexpand.py", line 2303, in
do_slater
        t, premult, bh, rewrite=None)
      File "c:\Users\leslie\sympy\sympy\simplify\hyperexpand.py", line 2068, in
_hyperexpand
        return powdenest(r, polar=True).replace(hyper, hyperexpand_special)
      File "c:\Users\leslie\sympy\sympy\simplify\simplify.py", line 2432, in pow
denest
        eq, rep = polarify(eq)
      File "c:\Users\leslie\sympy\sympy\simplify\simplify.py", line 2161, in pol
arify
        eq = _polarify(sympify(eq), lift)
      File "c:\Users\leslie\sympy\sympy\simplify\simplify.py", line 2096, in _po
larify
        return polar_lift(eq)
      File "c:\Users\leslie\sympy\sympy\core\cache.py", line 100, in wrapper
        r = func(*args, **kw_args)
      File "c:\Users\leslie\sympy\sympy\core\function.py", line 369, in __new__
        result = super(Function, cls).__new__(cls, *args, **options)
      File "c:\Users\leslie\sympy\sympy\core\cache.py", line 100, in wrapper
        r = func(*args, **kw_args)
      File "c:\Users\leslie\sympy\sympy\core\function.py", line 199, in __new__
        evaluated = cls.eval(*args)
      File "c:\Users\leslie\sympy\sympy\functions\elementary\complexes.py", line
 639, in eval
        ar = argument(arg)
      File "c:\Users\leslie\sympy\sympy\core\cache.py", line 100, in wrapper
        r = func(*args, **kw_args)
      File "c:\Users\leslie\sympy\sympy\core\function.py", line 369, in __new__
        result = super(Function, cls).__new__(cls, *args, **options)
      File "c:\Users\leslie\sympy\sympy\core\cache.py", line 100, in wrapper
        r = func(*args, **kw_args)
      File "c:\Users\leslie\sympy\sympy\core\function.py", line 199, in __new__
        evaluated = cls.eval(*args)
      File "c:\Users\leslie\sympy\sympy\functions\elementary\complexes.py", line
 481, in eval
        x, y = re(arg), im(arg)
      File "c:\Users\leslie\sympy\sympy\core\cache.py", line 100, in wrapper
        r = func(*args, **kw_args)
      File "c:\Users\leslie\sympy\sympy\core\function.py", line 369, in __new__
        result = super(Function, cls).__new__(cls, *args, **options)
      File "c:\Users\leslie\sympy\sympy\core\cache.py", line 100, in wrapper
        r = func(*args, **kw_args)
      File "c:\Users\leslie\sympy\sympy\core\function.py", line 199, in __new__
        evaluated = cls.eval(*args)
      File "c:\Users\leslie\sympy\sympy\functions\elementary\complexes.py", line
 52, in eval
        elif arg.is_zero:
      File "c:\Users\leslie\sympy\sympy\core\assumptions.py", line 144, in getit

        return _ask(fact, self)
      File "c:\Users\leslie\sympy\sympy\core\assumptions.py", line 187, in _ask
        a = evaluate(obj)
      File "c:\Users\leslie\sympy\sympy\core\mul.py", line 1075, in _eval_is_zer
o
        if a.is_zero:
      File "c:\Users\leslie\sympy\sympy\core\assumptions.py", line 144, in getit

        return _ask(fact, self)
      File "c:\Users\leslie\sympy\sympy\core\assumptions.py", line 197, in _ask
        _ask(pk, obj)
      File "c:\Users\leslie\sympy\sympy\core\assumptions.py", line 197, in _ask
        _ask(pk, obj)
      File "c:\Users\leslie\sympy\sympy\core\assumptions.py", line 187, in _ask
        a = evaluate(obj)
      File "c:\Users\leslie\sympy\sympy\core\expr.py", line 634, in _eval_is_pos
itive
        r, i = self.as_real_imag()
      File "c:\Users\leslie\sympy\sympy\functions\special\error_functions.py", l
ine 207, in as_real_imag
        re = S.Half*(self.func(x + x*sqrt(sq)) + self.func(x - x*sqrt(sq)))
      File "c:\Users\leslie\sympy\sympy\functions\elementary\miscellaneous.py",
line 112, in sqrt
        return C.Pow(arg, S.Half)
      File "c:\Users\leslie\sympy\sympy\core\cache.py", line 100, in wrapper
        r = func(*args, **kw_args)
      File "c:\Users\leslie\sympy\sympy\core\power.py", line 189, in __new__
        obj = b._eval_power(e)
      File "c:\Users\leslie\sympy\sympy\core\mul.py", line 595, in _eval_power
        return p._eval_expand_power_base()
      File "c:\Users\leslie\sympy\sympy\core\power.py", line 581, in _eval_expan
d_power_base
        rv *= Mul(*[self.func(b, e, evaluate=False) for b in cargs])
      File "c:\Users\leslie\sympy\sympy\core\cache.py", line 100, in wrapper
        r = func(*args, **kw_args)
      File "c:\Users\leslie\sympy\sympy\core\operations.py", line 42, in __new__

        c_part, nc_part, order_symbols = cls.flatten(args)
      File "c:\Users\leslie\sympy\sympy\core\mul.py", line 415, in flatten
        c_part.append(Pow(b, e))
      File "c:\Users\leslie\sympy\sympy\core\cache.py", line 100, in wrapper
        r = func(*args, **kw_args)
      File "c:\Users\leslie\sympy\sympy\core\power.py", line 189, in __new__
        obj = b._eval_power(e)
      File "c:\Users\leslie\sympy\sympy\core\power.py", line 221, in _eval_power

        smallarg = (abs(e) - abs(S.Pi/log(b))).is_negative
      File "c:\Users\leslie\sympy\sympy\core\assumptions.py", line 144, in getit

        return _ask(fact, self)
      File "c:\Users\leslie\sympy\sympy\core\assumptions.py", line 187, in _ask
        a = evaluate(obj)
      File "c:\Users\leslie\sympy\sympy\core\add.py", line 539, in _eval_is_nega
tive
        return super(Add, self)._eval_is_negative()
      File "c:\Users\leslie\sympy\sympy\core\expr.py", line 650, in _eval_is_neg
ative
        r = r.evalf(2, literal=True)
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 1299, in evalf
        if test.is_zero or test.is_number and not test.has(C.AppliedUndef):
      File "c:\Users\leslie\sympy\sympy\core\assumptions.py", line 144, in getit

        return _ask(fact, self)
      File "c:\Users\leslie\sympy\sympy\core\assumptions.py", line 197, in _ask
        _ask(pk, obj)
      File "c:\Users\leslie\sympy\sympy\core\assumptions.py", line 187, in _ask
        a = evaluate(obj)
      File "c:\Users\leslie\sympy\sympy\core\add.py", line 488, in _eval_is_posi
tive
        return super(Add, self)._eval_is_positive()
      File "c:\Users\leslie\sympy\sympy\core\expr.py", line 639, in _eval_is_pos
itive
        r = r.evalf(2, literal=True)
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 1302, in evalf
        rv = self.evalf(n, subs, maxn, chop, strict, quad, verbose)
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 1327, in evalf
        result = evalf(self, prec + 4, options)
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 1198, in evalf
        r = rf(x, prec, options)
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 459, in evalf_add
        terms = [evalf(arg, prec + 10, options) for arg in v.args]
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 1198, in evalf
        r = rf(x, prec, options)
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 500, in evalf_mul
        arg = evalf(arg, prec, options)
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 1198, in evalf
        r = rf(x, prec, options)
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 229, in evalf_abs
        return get_abs(expr.args[0], prec, options)
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 203, in get_abs
        re, im, re_acc, im_acc = evalf(expr, prec + 2, options)
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 1198, in evalf
        r = rf(x, prec, options)
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 617, in evalf_pow
        re, im, re_acc, im_acc = evalf(base, prec + 5, options)
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 1198, in evalf
        r = rf(x, prec, options)
      File "c:\Users\leslie\sympy\sympy\core\evalf.py", line 779, in evalf_log
        imaginary_term = (mpf_cmp(xre, fzero) < 0)
      File "c:\Users\leslie\sympy\sympy\mpmath\libmp\libmpf.py", line 555, in mp
f_cmp
        ssign, sman, sexp, sbc = s
    TypeError: 'NoneType' object is not iterable