Right now, we have a problem with simplification. There are a couple of
open tickets about it, and an Ask Sage thread, but it's easier to give
an example (thanks to logix on IRC for the minimal test case):
sage: f = sqrt(x^2 + 2*x + 1)
sage: f.full_simplify()
x + 1
I think the user should have to try *really* hard to ask us for this
simplification.
Right now, simplify() just sends an expression to maxima and back. Full
simplify does every simplification, including simplify_radical() which
is to blame for the error above.
There are a couple of ways we could improve the situation, some
combination of the following.
simplify
--------
1. We could leave simplify alone. We don't have to change anything, but
if we also make full_simplify() safe, everyone will just use
full_simplify instead of simplify and have to type five extra characters
every time.
2. We can replace the existing simplify with,
simplify_factorial ->
simplify_trig ->
simplify_rational ->
simplify_log
which seem to be safe in practice. I like this, because it does actually
try to simplify the expression but you can have some faith in the
result. Only two trivial tests are affected by this change.
full_simplify
-------------
1. We can leave it alone. The worst choice in my opinion. If you can't
trust the results, it's useless.
2. We can deprecate full_simplify and rename it unsafe_simplify. It
still exists, but it's obvious that it's unsafe to use. This is made
better if we improve simplify() because then unsafe_simplify will only
be needed in extreme cases.
3. We can add an option e.g. unsafe=True to full_simplify allowing it to
do simplify_radical(). Some people won't know it's there, but we don't
have to deprecate anything in that case. This makes simplify() pretty
much useless though.
Thoughts? Did I overlook anything?
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org