# simplify_full development

Hi! Could someone elaborate on the status of the simplification routines in SAGE? I've noticed that the simplify_full can't exactly be said to compete with e.g. mathematica's corresponding FullSimplify...

I don't know if the simplify functions operate as replacement rules or such, but if they do, I might be able to contribute in the development (I'm not much of a programmer though).

So could someone please explain about how simplify_full and other simplification functions work, and how I and others can participate? This post could work as an info for all who want to take part!

edit retag close merge delete

Sort by » oldest newest most voted

Simplification in Sage is pretty much exclusively a not-so-sophisticated use of Maxima routines. I do not know how they do things - I don't think it's as pattern-matching as I've heard Mathematica is.

Here is an example (and one that sometimes causes trouble, because of course simplification simplifies and so things may not be 100% identical (like $x^2/x\neq x$).

sage: x.simplify_exp??
<snip>
from sage.calculus.calculus import maxima
maxima.eval('domain: real$') res = self.parent()(self._maxima_().radcan()) maxima.eval('domain: complex$')
return res


There are a lot of tickets related to this here, so please feel free to contribute! Or even help make Maxima's simplification routines more robust; they should be written in a combination of Lisp and Maxima's own language.

more

There is a really old wiki page to coordinate development of symbolics functionality:

http://wiki.sagemath.org/symbolics

It hasn't been used much, since most work in this area concentrated on wrapping more functionality from maxima instead of implementing it in Sage.

That page lists a few items under simplification:

• Basic simplification routines
• trig
• rational
• binomial/factorial?

The link to the maxima documentation should point here.

From these, only

• simplify_trig() which calls maxima functions trigexpand() and trigsimp()
• simplify_factorial() which calls maxima functions factcomb() and minfactorial()

are based on rewriting. It would be great to find out what maxima does and implement that in Sage.

AFAICT, rational simplify is just eliminating gcd's from the numerator and denominator of a rational function. This should be equivalent to the normal() function in pynac, which is wrapped in ticket #12068.

Finding normal forms of expressions involving radicals is a nice problem. With all the mathematics functionality in the Sage library, we should be able to do much better than maxima here. I'd be interested to see what FriCAS does for this.

I'd be happy to help anyone in implementing these in Sage. If there is any missing infrastructure missing in symbolics, I could also spend some time to fix that. :)

more