> >> 2) We start them with different options, which is why maxima("d2") > >> just returns d2, but sage.calculus.calculus.maxima("d2") returns the > >> factorial business that started this thread. Do we want to have some > >> of the options used to start sage.calculus.calculus.maxima also used > >> in sage.interfaces.maxima? > > >> I also want to point out something that other people may have > >> realized, but has confused me before: if you're trying to do a > >> symbolic simplification, and maxima asks you a question, if you do > >> maxima("assume(x>0)") and try again, it will fail -- because it's > >> getting sent to the wrong maxima session: > > >> sage: sqrt(x^2) > >> sqrt(x^2) > >> sage: sqrt(x^2).simplify() > >> sqrt(x^2) > >> sage: maxima.assume("x>0") > >> [x>0] > >> sage: sqrt(x^2).simplify() > >> sqrt(x^2) > >> sage: sage.calculus.calculus.maxima.assume("x>0") > >> [x>0] > >> sage: sqrt(x^2).simplify() > >> x > > >> Do other people find this confusing? > > > Eventually (if not already) assumptions and the like will need to be > > recorded and used at a higher level than the maxima interpreter process, so > > I don't think we could always count on the above working. > > They are already recorded at a higher level -- this has been the case > since 2007. > > sage: sqrt(x^2) > sqrt(x^2) > sage: assume(x>0) > sage: sqrt(x^2) > sqrt(x^2) > > Hey wait, WTF?! This is really bad. I don't know what went wrong. > Evidently there is a new bug. >
No, this is (somewhere) documented behavior - we don't use the assumption unless we use Maxima, which is via simplify() sage: sqrt(x^2) sqrt(x^2) sage: assume(x>0) sage: sqrt(x^2) sqrt(x^2) sage: _.simplify() x At any rate, that is what assumptions currently do. But it's not a new bug, at any rate, as far as I know. - kcrisman > Anyway, regarding the above, Maxima should *never* need to be > explicitly invoked or mentioned for using Sage symbolics. Doing so is > very bad, since it would make is so symbolic user code depends > explicitly on Maxima. That's not good, since someday Sage's symbolics > likely won't use Maxima for any symbolic functionality.
-- 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