Ask Your Question
3

simplify_full development

asked 2012-01-31 11:03:17 +0200

H. Arponen gravatar image

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 flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-01-31 11:51:39 +0200

kcrisman gravatar image

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.

edit flag offensive delete link more
1

answered 2012-01-31 17:37:14 +0200

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
    • radical
    • 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. :)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-01-31 11:03:17 +0200

Seen: 2,210 times

Last updated: Jan 31 '12