On 9/12/07, Soroosh Yazdani <[EMAIL PROTECTED]> wrote: > Hmm, there seems to be many assumptions that I would like it be clarified. > Specifically where do all these objects live in. > For example, sin is a function from K->K. > same as cos.
What is K? sin is symbolic so the input is anything symbolic. It's formal. > If that's the case, then sin+cos makes perfect sense. > Can we make the same assumtion for x? Is it safe to assume x is also > a function from K->K? x is a symbolic variable. It also has a call method. Actually, i don't know what you mean by x in the questions above. > Can we assume sin(x)=sin? No, and they aren't equal. That doesn't make sense. One is an unevaluated function, and the other is evaluated at the point x. The data types are totally different. > BTW, I don't think this is a good idea: > >> sage: x, y=vars('x y') > >> sage: y + sin > >> y + sin(y) > >> sage: x + sin > >> x + sin(x) That's definitely not how SAGE works now, and now how it should work. This is what currently happens: sage: x,y = var('x y') sage: y + sin sin + y sage: x + sin sin + x sage: (x + sin)(5) # this is bad -- it's the trac ticket robert opened sin + 5 # should be sin(5) + 5. > If I understand the logic of everything, y is an element of functions > from K^2 -> K, while sin is a function from K->K. No, that's not right. There is absolutely no mathematical difference between x and y at all. They are both formal indeterminates. Thanks for your questions and comments. > Soroosh > > On Wed, Sep 12, 2007 at 02:29:26PM -0700, Robert Bradshaw wrote: > > On Sep 12, 2007, at 2:24 PM, William Stein wrote: > > > > > On 9/12/07, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > > >>>> BTW, I think this is a bug: > > >>>> > > >>>> sage: f = x+y > > >>>> sage: f > > >>>> y + x > > >>>> sage: f(4) > > >>>> y + 4 > > >>>> > > >>> > > >>> That's not a bug, that's *exactly* how we designed things > > >>> to work. Calling when the inputs are explicit is done with > > >>> the variables in dictionary order. > > >> > > >> I'll take that back, I didn't know dictionary order was explicitly > > >> used, and I'm OK with that as there is no ambiguity. Is there any > > >> reason f(2,3) does not work? > > >> > > > > > > I can't think of any, so *that* must be a bug. Could you open > > > a trac ticket for it? > > > > > > William > > > > Done. http://www.sagemath.org:9002/sage_trac/ticket/645 > > > > > > > > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@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-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---