[Lines 162 to 169](https://github.com/sympy/sympy/blob/78f9a8bb8b695faed3ae14b7f02d408e4e3f8913/sympy/core/relational.py#L162-L169) plus [lines 192 and 193](https://github.com/sympy/sympy/blob/78f9a8bb8b695faed3ae14b7f02d408e4e3f8913/sympy/core/relational.py#L192-L193)