{"action":"created","issue":{"url":"https://api.github.com/repos/sympy/sympy/issues/8373","labels_url":"https://api.github.com/repos/sympy/sympy/issues/8373/labels{/name}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/8373/comments","events_url":"https://api.github.com/repos/sympy/sympy/issues/8373/events","html_url":"https://github.com/sympy/sympy/issues/8373","id":47566166,"number":8373,"title":"Or(x < 1, x >= 1) does not simplify","user":{"login":"pelegm","id":3422626,"avatar_url":"https://avatars.githubusercontent.com/u/3422626?v=3","gravatar_id":"","url":"https://api.github.com/users/pelegm","html_url":"https://github.com/pelegm","followers_url":"https://api.github.com/users/pelegm/followers","following_url":"https://api.github.com/users/pelegm/following{/other_user}","gists_url":"https://api.github.com/users/pelegm/gists{/gist_id}","starred_url":"https://api.github.com/users/pelegm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pelegm/subscriptions","organizations_url":"https://api.github.com/users/pelegm/orgs","repos_url":"https://api.github.com/users/pelegm/repos","events_url":"https://api.github.com/users/pelegm/events{/privacy}","received_events_url":"https://api.github.com/users/pelegm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sympy/sympy/labels/Logic","name":"Logic","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-11-03T06:30:09Z","updated_at":"2015-01-11T19:34:59Z","closed_at":"2014-11-18T20:22:01Z","body":"Consider the following:\r\n```python\r\nIn [6]: x = Symbol('x', real=True)\r\n\r\nIn [7]: simplify(Or(x<1, x>= 1))\r\nOut[7]: Or(x < 1, x >= 1)\r\n```\r\nI'd expect the result to be `True` or somehow else to designate \"all `x`\".\r\n\r\nEven if I force the symbol to be a positive integer, this does not simplify:\r\n```python\r\nIn [3]: r = Symbol('r', integer=True, positive=True)\r\n\r\nIn [4]: Or(r<1, r>= 1)\r\nOut[4]: Or(r < 1, r >= 1)\r\n\r\nIn [5]: simplify(Or(r<1, r>= 1))\r\nOut[5]: Or(r < 1, r >= 1)\r\n```\r\nwhich is a bit odd. All of this causes over-complicated outputs sometimes. For example, trying to sum the PMF of a negative binomial distribution with `p=1/2`, I get\r\n```python\r\nIn [3]: k = Symbol('k', integer=True, nonnegative=True)\r\n\r\nIn [4]: r = Symbol('r', integer=True, positive=True)\r\n\r\nIn [5]: Sum(binomial(k+r-1,k)*(S.Half)**r*S.Half**k, (k, 0, oo)).doit()\r\nOut[5]: Piecewise((1, Or(r < 1, r >= 1)), (Sum(2**(-k)*2**(-r)*binomial(k + r - 1, k), (k, 0, oo)), True))\r\n```"},"comment":{"url":"https://api.github.com/repos/sympy/sympy/issues/comments/69507604","html_url":"https://github.com/sympy/sympy/issues/8373#issuecomment-69507604","issue_url":"https://api.github.com/repos/sympy/sympy/issues/8373","id":69507604,"user":{"login":"pelegm","id":3422626,"avatar_url":"https://avatars.githubusercontent.com/u/3422626?v=3","gravatar_id":"","url":"https://api.github.com/users/pelegm","html_url":"https://github.com/pelegm","followers_url":"https://api.github.com/users/pelegm/followers","following_url":"https://api.github.com/users/pelegm/following{/other_user}","gists_url":"https://api.github.com/users/pelegm/gists{/gist_id}","starred_url":"https://api.github.com/users/pelegm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pelegm/subscriptions","organizations_url":"https://api.github.com/users/pelegm/orgs","repos_url":"https://api.github.com/users/pelegm/repos","events_url":"https://api.github.com/users/pelegm/events{/privacy}","received_events_url":"https://api.github.com/users/pelegm/received_events","type":"User","site_admin":false},"created_at":"2015-01-11T19:34:59Z","updated_at":"2015-01-11T19:34:59Z","body":"@smichr, `Or(x < 1, x >= 1)` now simplifies to `True`, that's good. However, `Or(x <= 1, x >= 1)` does not simplify at all, nor does `Or(x < 1, x > -1)`. Should that become a new bug report?"}}