Your code kind of defeats the whole purpose of using SymPy. You are
creating one single Symbol that represents your entire expression.
Symbol is supposed to represent variables, and expressions should be
made with the various expression classes, like sympy.And, sympy.Or,
sympy.Implies, and sympy.Equivalent, or the equivalent logical
operators like & and |. If you have a single symbol named "x⟷y" then
you can't do anything with it, but if you have Equivalent(Symbol('x'),
Symbol('y')) then you can perform logical operations on it. See
https://docs.sympy.org/latest/modules/logic.html
As a general rule of thumb, if you find yourself doing mathematical
operations using string manipulation, that means you are using SymPy
wrong. SymPy is designed to do mathematical operations directly, and
doesn't work by operating on strings.
Aaron Meurer