My hard-earned lesson is that representation and manipulation should not be commingled. Traditional mathematical notation is too irregular and idiosyncratic to be safely handled by a symbolic mathematics system. That’s part of the reason why a trained eye can almost always spot the output of a CAS because though correct it almost always expresses stuff in vaguely ’mechanistic’ and/or longwinded ways.
Mentioned elsewhere: I built an (incomplete) implementation of the Risch algorithm for symbolic integration and slapped a MathML-parsing front end on it, and frequently ran into ambiguous cases where the ”abstract syntax” of the purported integral wasn’t what any sane human mathematician would think it could be, yet these errors were self-consistent (limits on double- and higher integrals being circumstances that constantly vexed me).
No, don’t suggest or try doing both of these things in the same place. Keep them separate. It’s just basic software architecture.
Mentioned elsewhere: I built an (incomplete) implementation of the Risch algorithm for symbolic integration and slapped a MathML-parsing front end on it, and frequently ran into ambiguous cases where the ”abstract syntax” of the purported integral wasn’t what any sane human mathematician would think it could be, yet these errors were self-consistent (limits on double- and higher integrals being circumstances that constantly vexed me).
No, don’t suggest or try doing both of these things in the same place. Keep them separate. It’s just basic software architecture.