How to simplify formula in place (eg by sympy)

proitheus <[email protected]> Tue, 1 Oct 2024 01:35:09 +0800 (GMT+08:00)
Newsgroups gmane.editors.texmacs.user
Message-ID <[email protected]>
*The Jolly Writer* says:

Some (CAS) systems can also be used in alternative ways, e.g. in order to *evaluate a selected expression inside a formula*

So I wonder if I can simplify a formula in a normal math environment using some CAS.

Eg

In a display equation, select (a+b)(a-b), do some magick, and the selection turns to (a^2-b^2)