-
-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove simplify_radical() from simplify_full() #12737
Comments
Add the flag and update doctests. |
comment:1
Attachment: sage-trac_12737.patch.gz |
comment:2
It's not entirely clear to me which simplifications are "safe" and which are not. Simplifying |
comment:3
Replying to @nbruin:
It's completely heuristic: the four I chose nobody seems to have a problem with. In As it stands, I think |
comment:4
Only in that we couldn't find Trac tickets about them.
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.
Well, everything sounds safe unless you put in the word "unsafe". I'm pretty confused as to the relation of this to #12650. See my comments there. I'm sympathetic to doing something about Doesn't it make more sense to either document fully what can go wrong with |
comment:5
Replying to @kcrisman:
Before our discussion on another one of these tickets, I had assumed it was not controversial that simplification had to return an equivalent expression. So it is at least a little controversial.
All expressions in sage are callable like functions, so if you have both radicals and a variable in an expression, Either way, |
comment:6
There is not consensus that this is even a good idea, so I'll leave it alone until we can discuss it further. |
This comment has been minimized.
This comment has been minimized.
Changed dependencies from #12650 to none |
comment:7
This should be a more straight-forward proposal. I just removed One of the doctest fixes is duplicated in #12780; the doctest is wrong (missing assumptions) but we're masking that fact at the moment. |
Author: Michael Orlitzky |
unsafe
argument to Expression.simplify_full()
Same patch with the functional.py doctest factored out |
comment:8
Attachment: sage-trac_12737-remove_radcan.patch.gz I moved the common doctest to #12845 and removed it from this patch. |
Dependencies: #12845 |
comment:9
Lest it seem weird that I'm adding to the list in the description, let it be known that I haven't necessarily changed my mind here, but fairness dictates that I point this additional example out! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Changed dependencies from #12845 to none |
Reviewer: Karl-Dieter Crisman |
comment:22
I'm at the moment unsure how to fix this. I guess the first example that fails could just be removed since it can be numerically evaluated. But I think the second example should remain in the tutorial and should be fixed. At the moment I don't have the time to look into it. I won't be around till mid August. @kcrisman Ich habe es vor allem als Vereinfachung bezeichnet, da es die notwendige Umformung ist, welche man für das Lösen von Exponentialgleichungen benötigt. Aus diesem Grund halte ich es auch für wichtig, dass man erwähnt, wie man eine solche Umformung machen kann. Man könnte es aber natürlich umbennen. Ich würde es als "Zerlegung durch Benutzen der Logarithmengesetze" oder ähnlich nennen. Natürlich wäre es schon, wenn man simplify_radical nicht separat aufführen muss, um die Sache einfach zu halten. Wenn es aber aus simplify_full fliegt, müsste man es wohl erwähnen. |
comment:23
Eigentlich genügt das!
Tja... Michael, I'll try to keep this on the front burner for finding a good fix - navigium has a good phrase we can use, and I don't really see any other way to fix this, since it does happen to be very convenient that we can use radcan in some cases to do log expansion. |
comment:24
It is regrettable that there's no other way to get log simplification of things like It'd be nice to have something that worked for constants at least, but avoided e.g. #12322. |
Changed reviewer from Karl-Dieter Crisman to Karl-Dieter Crisman, Beni Keller |
This comment has been minimized.
This comment has been minimized.
comment:25
I'd appreciate a quick review from navigium as to whether my German syntax is 100% correct, but this should take care of it, and conforms to what he suggested as a solution. Patchbot, apply sage-trac_12737-rebased.patch and trac_12737-de.patch |
Attachment: trac_12737-de.patch.gz |
comment:26
Patchbot, apply sage-trac_12737-rebased.patch and trac_12737-de.patch |
comment:27
I think that's a great way to solve my document. Now the readers even get something extra because they are taught how to apply log rules both ways. Thanks @kcrisman for solving it. |
comment:28
Great. Now someone (other than me) just needs to check that it passes tests and they can set it to positive review. |
comment:29
|
Merged: sage-5.12.beta0 |
This comment has been minimized.
This comment has been minimized.
comment:32
Updates: Removed
I posted updates on the ask.sagemath questions just now. #11934 needs review. #12322 needs to be reworded since we didn't use the "unsafe" parameter in |
* develop: (101 commits) Updated Sage version to 6.1.beta2 fix latex fix documentation minor typography Trac 13101: mark doctest as "long time" trac 13101 better doctest Trac 13101: Fix bug in enumerate_totallyreal_fields_all sagemath#9706: review patch. trac 9706: Propose new class structure Symbolic Chebyshev polynomials: reviewer patch trac 9706: Collective patch. Bugfixes, extensions, optimizations, documentation, doctests for chebyshev_T, chebyshev_U and base class for ortho polys Fixing Whitespace errors Use bash as SHELL for build/Makefile allow numpy arrays in list_plot, line, points Trac sagemath#12322: Add a doctest for the correct behavior introduced in trac sagemath#12737. Trac sagemath#14186 coerce_binop errors with keyword arguments trac sagemath#15553: Broken links in the doc of graph/ and numerical/ Improve handling of make targets sage, csage, extcode, scripts Reorded all.py to match original (so fewer changes). Fixed minor typo in cobminat/crystals/letters.pyx. ...
There are a number of tickets open due to the use of
simplify_radical()
insimplify_full()
.Removing it would fix at least,
And maybe more. Here are some related tickets.
simplify_radical
specifically.abs(a+b)^2 == (a+b)^2
is now fixed by Be more careful about setting the Maxima 'domain' #12780simplify_real
method to symbolic expressions #14630 are tangentially relatedApply attachment: sage-trac_12737-rebased.patch and attachment: trac_12737-de.patch
CC: @jvkersch @sagetrac-navigium
Component: symbolics
Author: Michael Orlitzky
Reviewer: Karl-Dieter Crisman, Beni Keller
Merged: sage-5.12.beta0
Issue created by migration from https://trac.sagemath.org/ticket/12737
The text was updated successfully, but these errors were encountered: