Repository: sympy/sympy

Issue:
What should be the definition of infinite?
Consider the following code,
```python
>>> from sympy import symbols
>>> x = symbols('x', real=True, finite=False)
>>> x.is_infinite  # None
>>>
```
Isn't `real and not finite => infinite`?

Discussion:

Patch:
diff --git a/sympy/core/assumptions.py b/sympy/core/assumptions.py
index 5223964683..3043e95310 100644
--- a/sympy/core/assumptions.py
+++ b/sympy/core/assumptions.py
@@ -176,6 +176,7 @@
     'even           ==  integer & !odd',
 
     'real           ==  negative | zero | positive',
+    'complex        ->  infinite | finite',
     'transcendental ==  complex & !algebraic & finite',
 
     'negative       ==  nonpositive & nonzero',


Test patch:
diff --git a/sympy/core/tests/test_assumptions.py b/sympy/core/tests/test_assumptions.py
index 43fc5a879e..6e7e36957d 100644
--- a/sympy/core/tests/test_assumptions.py
+++ b/sympy/core/tests/test_assumptions.py
@@ -1087,3 +1087,12 @@ def test_issue_16313():
     assert (l*x).is_real is False
     assert (l*x*x).is_real is None  # since x*x can be a real number
     assert (-x).is_positive is False
+
+def test_issue_16579():
+    # complex -> finite | infinite
+    # with work on PR 16603 it may be changed in future to complex -> finite
+    x = Symbol('x', complex=True, finite=False)
+    y = Symbol('x', real=True, infinite=False)
+
+    assert x.is_infinite
+    assert y.is_finite