On Feb 8, 2008 2:21 AM, Simon King <[EMAIL PROTECTED]> wrote: > > Dear John, > > On 8 Feb., 10:40, "John Cremona" <[EMAIL PROTECTED]> wrote: > > In this > > system, "==" is used to create equations, not to test equality. > > That's nasty! > > My personal opinion is: When i say "==" in Sage then i expect a > consistent behaviour, hence, a test for equality. Certainly the __eq__ > method can do whatever the programmer wants, but it would be good > style to make it consistent with the rest of Sage. > > Working in Sage, i do believe that Sage's conventions should overrule > the conventions of any sub-system. Hence, if i want "==" to be > interpreted in the Maxima-way, i would express that wish explicitly, > say, by > maxima('x==x') > > However, i do understand that this would hardly be possible to change > now.
Simon, Understandably, things like this are confusing. As John said, the problem is that Sage is trying to cater to different audiences. A more casual user such as a calculus student will want an easy way to define symbolic equations, and using the various boolean testing operators with symbolic expressions seems like the natural thing to do. Although in some sense it is true that the Sage symbolics package provides a thin layer over maxima, it is still meant to provide a general interface for symbolic computation, abstracted *from* maxima. So the notation x^2 == 2 has little to do with maxima, and more with the architecture that we chose for general purpose symbolics. It is unlikely users at the research level will want to use these symbolic expressions at all in their code, since they favor optimized and specialized code that only works for their application. In some sense I am glad that the behavior is quite different since that way there is less mystery as to what package is being used. So when you create a polynomial ring, for example, you are entereting in a much more structured realm than the Sage symbolics package, and should expect rather different and more specialized behavior. I hope that explains some of our reasoning on this somewhat confusing behavior... -Bobby -- Bobby Moretti [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---