Repository: sympy/sympy

Issue:
bug in is_subset(Reals)
```python
In [1]: print( (1/n).is_real )
None

In [2]: imageset(Lambda(n, 1/n), Integers).is_subset(Reals)
Out[2]: True
```
`Out[2]` should also be `None`.

Discussion:

Patch:
diff --git a/doc/src/modules/physics/control/lti.rst b/doc/src/modules/physics/control/lti.rst
index 4d683a4ffa..cc9ae87bcd 100644
--- a/doc/src/modules/physics/control/lti.rst
+++ b/doc/src/modules/physics/control/lti.rst
@@ -5,16 +5,5 @@ Control API
 lti
 ===
 
-.. module:: sympy.physics.control.lti
-
-.. autoclass:: TransferFunction
-   :members:
-
-.. autoclass:: Series
-   :members:
-
-.. autoclass:: Parallel
-   :members:
-
-.. autoclass:: Feedback
+.. automodule:: sympy.physics.control.lti
    :members:
diff --git a/sympy/sets/handlers/intersection.py b/sympy/sets/handlers/intersection.py
index 650efe0531..c54dc8f72a 100644
--- a/sympy/sets/handlers/intersection.py
+++ b/sympy/sets/handlers/intersection.py
@@ -1,5 +1,5 @@
 from sympy import (S, Dummy, Lambda, symbols, Interval, Intersection, Set,
-                   EmptySet, FiniteSet, Union, ComplexRegion)
+                   EmptySet, FiniteSet, Union, ComplexRegion, Mul)
 from sympy.multipledispatch import dispatch
 from sympy.sets.conditionset import ConditionSet
 from sympy.sets.fancysets import (Integers, Naturals, Reals, Range,
@@ -277,9 +277,9 @@ def intersection_sets(self, other): # noqa:F811
                 return FiniteSet(*(fn.subs(n, s[0]) for s in solns))
 
     if other == S.Reals:
-        from sympy.solvers.solveset import solveset_real
         from sympy.core.function import expand_complex
-
+        from sympy.solvers.solvers import denoms, solve_linear
+        from sympy.core.relational import Eq
         f = self.lamda.expr
         n = self.lamda.variables[0]
 
@@ -293,7 +293,7 @@ def intersection_sets(self, other): # noqa:F811
         im = im.subs(n_, n)
         ifree = im.free_symbols
         lam = Lambda(n, re)
-        if not im:
+        if im.is_zero:
             # allow re-evaluation
             # of self in this case to make
             # the result canonical
@@ -304,7 +304,21 @@ def intersection_sets(self, other): # noqa:F811
             return None
         else:
             # univarite imaginary part in same variable
-            base_set = base_set.intersect(solveset_real(im, n))
+            x, xis = zip(*[solve_linear(i, 0) for i in Mul.make_args(im) if n in i.free_symbols])
+            if x and all(i == n for i in x):
+                base_set -= FiniteSet(xis)
+            else:
+                base_set -= ConditionSet(n, Eq(im, 0), S.Integers)
+        # exclude values that make denominators 0
+        for i in denoms(f):
+            if i.has(n):
+                sol = list(zip(*[solve_linear(i, 0) for i in Mul.make_args(im) if n in i.free_symbols]))
+                if sol != []:
+                    x, xis = sol
+                    if x and all(i == n for i in x):
+                        base_set -= FiniteSet(xis)
+                else:
+                    base_set -= ConditionSet(n, Eq(i, 0), S.Integers)
         return imageset(lam, base_set)
 
     elif isinstance(other, Interval):


Test patch:
diff --git a/sympy/sets/tests/test_fancysets.py b/sympy/sets/tests/test_fancysets.py
index 38fc5ff8e4..098020ca4e 100644
--- a/sympy/sets/tests/test_fancysets.py
+++ b/sympy/sets/tests/test_fancysets.py
@@ -1,7 +1,8 @@
+
 from sympy.core.expr import unchanged
 from sympy.sets.fancysets import (ImageSet, Range, normalize_theta_set,
                                   ComplexRegion)
-from sympy.sets.sets import (FiniteSet, Interval, imageset, Union,
+from sympy.sets.sets import (Complement, FiniteSet, Interval, Union, imageset,
                              Intersection, ProductSet, Contains)
 from sympy.simplify.simplify import simplify
 from sympy import (S, Symbol, Lambda, symbols, cos, sin, pi, oo, Basic,
@@ -656,9 +657,7 @@ def test_infinitely_indexed_set_2():
 def test_imageset_intersect_real():
     from sympy import I
     from sympy.abc import n
-    assert imageset(Lambda(n, n + (n - 1)*(n + 1)*I), S.Integers).intersect(S.Reals) == \
-            FiniteSet(-1, 1)
-
+    assert imageset(Lambda(n, n + (n - 1)*(n + 1)*I), S.Integers).intersect(S.Reals) == Complement(S.Integers, FiniteSet((-1, 1)))
     s = ImageSet(
         Lambda(n, -I*(I*(2*pi*n - pi/4) + log(Abs(sqrt(-I))))),
         S.Integers)
diff --git a/sympy/sets/tests/test_sets.py b/sympy/sets/tests/test_sets.py
index 666eecf304..5d664de631 100644
--- a/sympy/sets/tests/test_sets.py
+++ b/sympy/sets/tests/test_sets.py
@@ -724,7 +724,8 @@ def test_is_subset():
     assert Range(3).is_subset(FiniteSet(0, 1, n)) is None
     assert Range(n, n + 2).is_subset(FiniteSet(n, n + 1)) is True
     assert Range(5).is_subset(Interval(0, 4, right_open=True)) is False
-
+    #issue 19513
+    assert imageset(Lambda(n, 1/n), S.Integers).is_subset(S.Reals) is None
 
 def test_is_proper_subset():
     assert Interval(0, 1).is_proper_subset(Interval(0, 2)) is True