Repository: sympy/sympy

Issue:
factorial(n) >= 1 is not True for a nonnegative integer n
When `n` is a nonnegative integer, `factorial(n)` is a positive integer, but `factorial(n)>=1` does not simplify to `True`.

Discussion:

Patch:
diff --git a/sympy/core/exprtools.py b/sympy/core/exprtools.py
index 7e786424f3..654b7f3bf4 100644
--- a/sympy/core/exprtools.py
+++ b/sympy/core/exprtools.py
@@ -72,7 +72,7 @@ def _monotonic_sign(self):
         rv = _monotonic_sign(-self)
         return rv if rv is None else -rv
 
-    if self.is_Symbol:
+    if not self.is_Add and self.as_numer_denom()[1].is_number:
         s = self
         if s.is_prime:
             if s.is_odd:


Test patch:
diff --git a/sympy/core/tests/test_assumptions.py b/sympy/core/tests/test_assumptions.py
index 52b473d90a..4e29f4e8ca 100644
--- a/sympy/core/tests/test_assumptions.py
+++ b/sympy/core/tests/test_assumptions.py
@@ -1,4 +1,4 @@
-from sympy import I, sqrt, log, exp, sin, asin
+from sympy import I, sqrt, log, exp, sin, asin, factorial
 from sympy.core import Symbol, S, Rational, Integer, Dummy, Wild, Pow
 from sympy.core.facts import InconsistentAssumptions
 from sympy import simplify
@@ -900,3 +900,8 @@ def test_issues_8632_8633_8638_8675_8992():
     assert ((p + 2)**3 - S.Half).is_positive
     n = Dummy(negative=True)
     assert (n - 3).is_nonpositive
+
+def test_issue_9115():
+    n = Dummy('n', integer=True, nonnegative=True)
+    assert (factorial(n) >= 1) == True
+    assert (factorial(n) < 1) == False