{"push_id":690319997,"size":298,"distinct_size":298,"ref":"refs/heads/master","head":"1ee9b293c26d494d9cfd717d849cdaeb725ad604","before":"fcbb4834ee781019fc5197bde9e479b1d31772ef","commits":[{"sha":"d3d93b0f333183aec17cb4ceb6715007d186b2b8","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Merge branch 'satisfiable_expr' into newassump","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/d3d93b0f333183aec17cb4ceb6715007d186b2b8"},{"sha":"b88ce66450fa1b5146276178d5d878ae5c509afb","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Basic prototype of new ask using only satisfiable()\n\nThis is a basic prototype of a new ask, currently accessible as\nsympy.assumptions.newask.newask(), that uses satisfiable() entirely to\ndetermine the truth or falsehood of the given proposition under the given\nassumptions.  See https://code.google.com/p/sympy/issues/detail?id=3929 for\nmore details on the idea.\n\nAs a first prototype, this is still in a very proof-of-concept stage. In\nparticular:\n\n- I don't reuse any of the existing ask logic or machinery.  As such, almost\neverything that works currently with ask() won't work with newask().\n\n- I have so far only implemented the fact positive implies real.  Unless a\ngiven proposition can be deduced from this fact, or is a tautology or a\ncontradiction, newask will return None.\n\n- I have in no way attempted to make a nice API for this.  In fact, the\ncurrent API is rather terrible:  it's just a chain of if statements.\n\nBut the basic idea is there, namely, that ask() should extract all relevant\nfacts based on the predicates present in the proposition and the assumptions,\nand then use satisfiable() to determine satisfiable(And(proposition,\nassumptions, relevant_facts)) and satisfiable(And(~proposition, assumptions,\nrelevant_facts)).  If one is True and the other False, then we know that\nproposition is True (or False); if both are True, we return None, and if both\nare False, we conclude that the assumptions and the relevant_facts give a\ncontradiction.\n\nAt this point, I would like some input on how to structure this API so that it\nbecomes scalable, extensible, and readable.","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/b88ce66450fa1b5146276178d5d878ae5c509afb"},{"sha":"c991e58cb94ae2221630498c23ebc542734b8956","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Always compute the fixed-point of relevant facts\n\nThis is required because some relevant facts may in turn generate new relevant\nfacts, which didn't appear before. This happens as soon as you start to add\nnon-trivial facts, like Equivalent(Q.zero(x*y), Q.zero(x) | Q.zero(y)),\nbecause they add new predicates to the system.","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/c991e58cb94ae2221630498c23ebc542734b8956"},{"sha":"bf5b7a6252516b1ffa770fc57ab98432b5273b71","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Add relevant facts for Q.zero. Also, always add relevant facts\n\nWe always add relevant facts because they might be needed. For instance,\nif we only added the fact Equivalent(Q.zero(x*y), ~Q.nonzero(x*y)) when both\npredicates appeared in the system, we would never be able to compute\nnewask(Q.zero(x) | Q.zero(y), Q.nonzero(x*y)), because it requires going from\ntwo steps, first, adding the fact Equivalent(Q.nonzero(x*y), ~Q.zero(x*y)),\nand second, adding the fact Equivalent(Q.zero(x*y), Q.zero(x) |\nQ.zero(y)). This second fact can only be added after the first is added,\nbecause only at that point do we have Q.zero(x*y). Without this, we would have\nto add many redundant facts (like Equivalent(Q.nonzero(x*y), ~Q.zero(x) &\n~Q.zero(y))).\n\nOn the other hand, we now avoid adding completely redundant implications.\n\nThe Q.zero fact, aside from the obvious implications on the already existing\nQ.positive and Q.real, and the new Q.nonzero, includes one nontrivial fact,\nnamely Q.zero(Mul) is equivalent to\nOr([Q.zero(arg) for arg in Mul.args]). This fact, while easy to add, allows\nfor very powerful new assumptions, all of which don't work with ask(), but\nmore importantly, are either very difficult or impossible to add to ask()\nbecause the way the current handler system works, it is not so easy to add\nhandler to make things like ask(Or(x, y)) give True when neither ask(x) nor\nask(y) would give True (as is the case for ask(Q.zero(x) | Q.zero(y),\nQ.zero(x*y))).\n\nFor instance:\n\n>>> from sympy.assumptions.newask import newask\n>>> newask(Q.zero(x) | Q.zero(y), Q.zero(x*y))\nTrue\n>>> newask(Implies(Q.zero(x), Q.zero(x*y)))\nTrue\n>>> newask(Q.zero(x) | Q.zero(y), Q.nonzero(x*y))\nFalse\n>>> ask(Q.zero(x) | Q.zero(y), Q.zero(x*y))\n>>> ask(Implies(Q.zero(x), Q.zero(x*y)))\n>>> ask(Q.zero(x) | Q.zero(y), Q.nonzero(x*y))\n>>>\n\nNotice how the use of satisfiable() lets us ask essentially equivalent things\nin different ways, and still get the right answer, even though we only told\nthe system about the fact in one way.","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/bf5b7a6252516b1ffa770fc57ab98432b5273b71"},{"sha":"83dc0283f4b31da76cf6ea1dcb102b11c6dc2a91","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Rearrange tests so that test_zero is only things that don't work with ask()\n\nAnd add one test that I forgot (that does work with ask(), since it's so\nsimple).","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/83dc0283f4b31da76cf6ea1dcb102b11c6dc2a91"},{"sha":"eb0c9c8d93af76cc3db3457149a0d046e3869ac5","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Add another test, which is the actual one that started this whole thing","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/eb0c9c8d93af76cc3db3457149a0d046e3869ac5"},{"sha":"7d3b1cc2fe2d8900d5e6b9890476f896ae1a7cbd","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Extract the get_relevant_facts fixed point finder, fix it to be correct\n\nPreviously it wasn't really finding the fixed point. Now it does the right\nthing.","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/7d3b1cc2fe2d8900d5e6b9890476f896ae1a7cbd"},{"sha":"38556d09817bcf11f2b6004805b00219bc0460d5","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Simplify some logic","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/38556d09817bcf11f2b6004805b00219bc0460d5"},{"sha":"5fadd26cffbb728bd3624ddad3d8f9028f590395","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Add fact x and y positive implies x + y nonzero to newask\n\nAlso add a test that uses several levels of forward chaining.","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/5fadd26cffbb728bd3624ddad3d8f9028f590395"},{"sha":"0f23f1ff903003c2dd0782b97c7e939fc77ef645","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Add facts about when a power is zero to newask\n\nThis gives the simplest example yet of something that doesn't work with ask()\n(simplest in the sense that there are no logical operators involved)\n\n>>> from sympy.assumptions.newask import *\n>>> ask(Q.zero(x), Q.zero(x**2))\n>>> newask(Q.zero(x), Q.zero(x**2))\nTrue\n\nThis one probably could be made to work with the ask() handlers system, but it\nwould require digging through the expressions to find the x**2, and it would\nbe messy.","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/0f23f1ff903003c2dd0782b97c7e939fc77ef645"},{"sha":"e8c98f1a70a12588a49248a4789eb9ca94dbcbfd","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Merge branch 'rcall-Basic' into newassump","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/e8c98f1a70a12588a49248a4789eb9ca94dbcbfd"},{"sha":"a9ca1e368c4580eb69e911b412ae1998e864a747","author":{"email":"25bf21f79a16dfce44c401d023ce25dcf1907fde@gmail.com","name":"Matthew Rocklin"},"message":"sift keys by predicate","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/a9ca1e368c4580eb69e911b412ae1998e864a747"},{"sha":"0d934e81bc388d32c4338dee075466b7e8e41760","author":{"email":"25bf21f79a16dfce44c401d023ce25dcf1907fde@gmail.com","name":"Matthew Rocklin"},"message":"generalize \"zero Mul of args must contain zero\"","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/0d934e81bc388d32c4338dee075466b7e8e41760"},{"sha":"4ad98540d1115b1699fd0c45e74e749f8075a345","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Use known_facts_cnf in newask()\n\nThis slows it down a bit, because the SAT problem it solves is much larger\n(and it also takes longer to generate the relevant facts).\n\nThis also changes a test, because in the new assumptions, Q.nonzero means\nQ.real and ~Q.zero, not just ~Q.zero.","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/4ad98540d1115b1699fd0c45e74e749f8075a345"},{"sha":"c1a71ff5f5a777bb9ea28b6109334067f186eb5a","author":{"email":"25bf21f79a16dfce44c401d023ce25dcf1907fde@gmail.com","name":"Matthew Rocklin"},"message":"add Q.infinity(Add(args)) <==> any(map(Q.infinity, args))","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/c1a71ff5f5a777bb9ea28b6109334067f186eb5a"},{"sha":"6a7f6a0112f0f15069cd855f3c413e8211385e2b","author":{"email":"25bf21f79a16dfce44c401d023ce25dcf1907fde@gmail.com","name":"Matthew Rocklin"},"message":"Merge branch 'newassump' of github.com:asmeurer/sympy into newassump\n\nConflicts:\n\tsympy/assumptions/newask.py","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/6a7f6a0112f0f15069cd855f3c413e8211385e2b"},{"sha":"0e47411acd1e3fc5386059f965ef810578a5a870","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Merge pull request #51 from mrocklin/newassump\n\nNewassump","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/0e47411acd1e3fc5386059f965ef810578a5a870"},{"sha":"fae40188088e1aeaf413e312d69e9c7fe9d2d243","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Further generalize some of the newask facts, add one about Q.invertible(MatMul)","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/fae40188088e1aeaf413e312d69e9c7fe9d2d243"},{"sha":"6287f17d6240f485ac0c58baa45072b0b03985cc","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Merge branch 'zero_is_even' into newassump","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/6287f17d6240f485ac0c58baa45072b0b03985cc"},{"sha":"6a2d1db539c5fbe3305767c0fb5c856e45d41e9d","author":{"email":"31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","name":"Aaron Meurer"},"message":"Add a start to a handler system for newask\n\nI haven't integrated it into newask yet.","distinct":true,"url":"https://api.github.com/repos/mcdaniel67/sympy/commits/6a2d1db539c5fbe3305767c0fb5c856e45d41e9d"}]}