As the title suggests, I want in an expression to to some substitutions. For example in the expression $\mathcal{L}^+_0+\mathcal{L}^-_0+\mathcal{L}^+_0+\mathcal{L}^-_0+\mathcal{L}_1$ I want to substitute $\mathcal{L}^+_0+\mathcal{L}^-_0\rightarrow A$ and $\mathcal{L}^+_0+\mathcal{L}^-_0+\mathcal{L}_1\rightarrow B$. Obviously I cannot solve for $\mathcal{L}_0^i$ and then substitute, because then it will substitute every $\mathcal{L}_0^i$.
I think that it can be solved with some short of pattern matching but my skills stop there.
Any ideas?
a + b == c, instead of applyinga + b -> c, usea -> b - c. But I can't find it. – Michael E2 Mar 15 '19 at 21:54