Repository: sympy/sympy

Issue:
S.Reals == Interval(-oo, oo) should return True
As of now:
```python
In [3]: S.Reals == Interval(-oo, oo)
Out[3]: False
```

The reason is:
```python
In [4]: type(S.Reals)
Out[4]: sympy.sets.fancysets.Reals

In [5]: type(Interval(-oo, oo))
Out[5]: sympy.sets.sets.Interval
```
Note: S.Reals derives from Interval Class constructor.

Discussion:

Patch:
diff --git a/sympy/sets/fancysets.py b/sympy/sets/fancysets.py
index 4bc2da4297..14bac1ab51 100644
--- a/sympy/sets/fancysets.py
+++ b/sympy/sets/fancysets.py
@@ -177,6 +177,13 @@ class Reals(with_metaclass(Singleton, Interval)):
     def __new__(cls):
         return Interval.__new__(cls, -S.Infinity, S.Infinity)
 
+    def __eq__(self, other):
+        if other == Interval(-S.Infinity, S.Infinity):
+            return True
+
+    def __hash__(self):
+        return hash(Interval(-S.Infinity, S.Infinity))
+
 
 class ImageSet(Set):
     """


Test patch:
diff --git a/sympy/sets/tests/test_fancysets.py b/sympy/sets/tests/test_fancysets.py
index 5d79caa871..3b5db24334 100644
--- a/sympy/sets/tests/test_fancysets.py
+++ b/sympy/sets/tests/test_fancysets.py
@@ -185,6 +185,7 @@ def test_Reals():
     assert -sqrt(2) in S.Reals
     assert (2, 5) not in S.Reals
     assert sqrt(-1) not in S.Reals
+    assert S.Reals == Interval(-oo, oo)
 
 
 def test_Complex():