sets.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:zippy 作者: securesystemslab 项目源码 文件源码
def log(expr, assumptions):
        if ask(Q.real(expr.args[0]), assumptions):
            if ask(Q.positive(expr.args[0]), assumptions):
               return False
            return
        # XXX it should be enough to do
        # return ask(Q.nonpositive(expr.args[0]), assumptions)
        # but ask(Q.nonpositive(exp(x)), Q.imaginary(x)) -> None;
        # it should return True since exp(x) will be either 0 or complex
        if expr.args[0].func == C.exp:
            if expr.args[0].args[0] in [I, -I]:
                return True
        im = ask(Q.imaginary(expr.args[0]), assumptions)
        if im is False:
            return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号