Re: [sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread William Stein
On Thu, Jan 14, 2010 at 10:43 PM, andrejv andrej.vodopi...@gmail.com wrote: On Jan 15, 6:14 am, Craig Citro craigci...@gmail.com wrote: Yeah, this is wacky. I can tell you why it's happening, though someone who's ever used Maxima before should really think about the right fix. Here's the

Re: [sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread Minh Nguyen
Hi Andrej, On Fri, Jan 15, 2010 at 5:43 PM, andrejv andrej.vodopi...@gmail.com wrote: SNIP d2 is defined in the testsuite for the Zeilberger algorithm. It is not necessary to load the tests, in share/contrib/Zeilberger/ zeilberger.mac remove the last line which loads them. Thank you very

[sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread andrejv
On Jan 15, 9:37 am, William Stein wst...@gmail.com wrote: On Thu, Jan 14, 2010 at 10:43 PM, andrejv andrej.vodopi...@gmail.com wrote: On Jan 15, 6:14 am, Craig Citro craigci...@gmail.com wrote: Yeah, this is wacky. I can tell you why it's happening, though someone who's ever used Maxima

[sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread kcrisman
Maybe someone who knows Maxima better could point us in the right direction? d2 is defined in the testsuite for the Zeilberger algorithm. It is not necessary to load the tests, in share/contrib/Zeilberger/ zeilberger.mac remove the last line which loads them. Andrej Wow, that's

Re: [sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread Craig Citro
This could all be avoided if before changing a variable to maxima we prepended it with _sage_var_ (say), and stripped those off when moving from maxima back to Sage.  This is worth considering... I think we'll have to do something along these lines. Basically, right now, any time that one

Re: [sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread Robert Bradshaw
On Jan 15, 2010, at 9:58 AM, Craig Citro wrote: As to Craig's point, yes you can make another Maxima session, but in general all internal Maxima use either uses _maxima_(), which calls the calculus copy, or directly uses the calculus copy of Maxima. For instance for assumptions we really want

Re: [sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread Craig Citro
I think we do. Maxima sessions can have so much state that it's nice to keep them separate to ensure consistency of the calculus modules. Also, that means you won't be accidently clobbering your calculus variables, functions, etc. I think I agree in principle, but maybe not in practice. For

Re: [sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread William Stein
On Fri, Jan 15, 2010 at 10:16 AM, Robert Bradshaw rober...@math.washington.edu wrote: On Jan 15, 2010, at 9:58 AM, Craig Citro wrote: As to Craig's point, yes you can make another Maxima session, but in general all internal Maxima use either uses _maxima_(), which calls the calculus copy, or

Re: [sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread William Stein
On Fri, Jan 15, 2010 at 11:07 AM, Craig Citro craigci...@gmail.com wrote: I think we do. Maxima sessions can have so much state that it's nice to keep them separate to ensure consistency of the calculus modules. Also, that means you won't be accidently clobbering your calculus variables,

[sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread Robert Dodier
On Jan 14, 11:43 pm, andrejv andrej.vodopi...@gmail.com wrote: d2 is defined in the testsuite for the Zeilberger algorithm. It is not necessary to load the tests, in share/contrib/Zeilberger/ zeilberger.mac remove the last line which loads them. As a superficial correction, I threw a bit of

Re: [sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread Craig Citro
 (2) making the assume() command available at top-level point to sage.calculus.calculus.maxima.assume *would* make it so that the user could easily compute the integral that's frustrating them. Again, (2) *was* the case since the beginning, and if it isn't now, it is because somebody

[sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread Nils Bruin
On Jan 15, 7:00 am, kcrisman kcris...@gmail.com wrote: Maybe Nils has a comment on whether library use of Maxima would make it easier to work around this problem?  I know he's hoping to do something with this at the Bug Days. If we use maxima via a library interface and communicate

[sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread kcrisman
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

Re: [sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread Robert Bradshaw
On Jan 15, 2010, at 11:14 AM, William Stein wrote: On Fri, Jan 15, 2010 at 10:16 AM, Robert Bradshaw rober...@math.washington.edu wrote: On Jan 15, 2010, at 9:58 AM, Craig Citro wrote: As to Craig's point, yes you can make another Maxima session, but in general all internal Maxima use

[sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread kcrisman
Again, (2) *was* the case since the beginning, and if it isn't now, it is because somebody screwed stuff up and introduced a *huge* bug into Sage recently. We have done a few things in assumptions in the last few months, so that is possible. However, in this case none of the doctests caught

[sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread Robert Dodier
On Jan 15, 1:37 am, William Stein wst...@gmail.com wrote: This could all be avoided if before changing a variable to maxima we prepended it with _sage_var_ (say), and stripped those off when moving from maxima back to Sage. This is worth considering... Well, I think there is a neater way to

Re: [sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-15 Thread Craig Citro
Well, I think there is a neater way to go about it, which is to exploit the Lisp package (i.e. namespace) machinery. In summary, one can define groups of symbols at run time. To quote the Zen of Python: Namespaces are one honking great idea -- let's do more of those! -cc -- To post to this

[sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-14 Thread Jason Bandlow
Nick Alexander wrote: sage: y = expand(K.det()); y a*d*e*h - a*d*f*g - b*c*e*h + b*c*f*g sage: simplify(y) -a*d*f*g + a*d*h*e + b*c*f*g - b*c*h*e To me, these look like the same expressions, just one has variables sorted differently (h e?) and different term orders. What is the issue? I

[sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-14 Thread kcrisman
On Jan 15, 12:14 am, Craig Citro craigci...@gmail.com wrote: Yeah, this is wacky. I can tell you why it's happening, though someone who's ever used Maxima before should really think about the right fix. Here's the issue: in sage.calculus.calculus, there's an instance of Maxima that gets

[sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-14 Thread rjf
It seems clear that in Maxima, something you directly or indirectly loaded, set those names to values. Maybe because d1, d2, , were used for the labels automatically generated for display lines. You can find all such values by maxima(values). RJF -- To post to this group, send an email

[sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-14 Thread andrejv
On Jan 15, 6:14 am, Craig Citro craigci...@gmail.com wrote: Yeah, this is wacky. I can tell you why it's happening, though someone who's ever used Maxima before should really think about the right fix. Here's the issue: in sage.calculus.calculus, there's an instance of Maxima that gets

Re: [sage-devel] Re: weirdness in simplifying a symbolic expression

2010-01-14 Thread Craig Citro
Actually, I think it is, even though I agree it shouldn't be. For example: [boxen ~] $ sage -- | Sage Version 4.3, Release Date: 2009-12-24 | | Type notebook() for the GUI, and license() for information.