#12737: Add an `unsafe` argument to Expression.simplify_full()
-------------------------------+--------------------------------------------
Reporter: mjo | Owner: mjo
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.0
Component: symbolics | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: #12650 | Stopgaps:
-------------------------------+--------------------------------------------
Comment (by kcrisman):
> > It's not entirely clear to me which simplifications are "safe" and
which are not. Simplifying `x^2/x` to `x` is also not "safe" in the sense
that equality does not hold for `x=0`. In many computer algebra systems,
acceptable simplifications are not "safe" in this respect. By including a
default `unsafe=False` I'm afraid you'll be raising expectations to a
level that Sage does not attain (yet?).
>
> It's completely heuristic: the four I chose nobody seems to have a
problem with.
Only in that we couldn't find Trac tickets about them.
>`simplify_radical`, on the other hand, wreaks havoc on trivial functions
and has been the cause of numerous bug reports and mailing list
discussions.
>
> In `simplify`, after #12650, I say that a safe simplification is one
"for which we are reasonably sure that the input will be considered
equivalent to the output." That's probably the best we can do for now, and
I'm ''reasonably sure'' that most people would consider `x^2/x` equivalent
to `x`.
I'm reasonably sure that no mathematician would consider them equivalent
unless you add "almost everywhere". Simplification ''simplifies'', hence
makes it not actually the same (at least potentially). This shouldn't be
controversial.
> As it stands, I think `full_simplify` ''sounds'' safe so people will
assume that anyway. This fix, while not perfect, at least improves things.
Well, everything ''sounds'' safe unless you put in the word "unsafe".
I'm pretty confused as to the relation of this to #12650. See
[comment:6:ticket:12650 my comments there].
I'm sympathetic to doing something about `radcan`, but simplification is
simplification, not identity.
Doesn't it make more sense to either document fully what can go wrong with
`simplify_full`, or to add a flag `simplify_radicals` or something? I
think that changing behavior in this case is probably the best compromise,
but probably `unsafe` is sending the wrong message. There isn't anything
unsafe about `radcan`, it's just a different point of view than ours -
symbolic expressions versus functions. Spend some time on the Maxima list
:)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12737#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.