On Wed, Sep 12, 2007 at 05:19:57PM -0700, William Stein wrote:
> 
> 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.
I specifically called it K, because I didn't want to say reals or complex.
Can I claim K is the ring of symbolic expressions? I still like to think
of sin as a function from symbols to symbols, since that's how I'm resolving
the expression (sin+cos)(1).
> 
> > 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.
sorry. Most of the rest of the questions I have were derived from
Robert's proposal:

sage: x, y = var('x y')
sage: f(x) = x^2 + 1
sage: f + sin
x^2 + 1 + sin(x)
sage: y + sin
y + sin(y)

I understand that x is a symbolic variable, but I am confused that a command
like x(5) makes sense. Again my way of resolving it was to think of x as
a function from ring of symbolic expressions to ring of symbolic expressions.
> 
> > 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.
Here's what sage does right now:

sage: sin(x)(5)
 sin(5)

I think this is fine, but again, this was why I asked that question.
However, on the way home I concluded that they are not equal, but when 
simplified they are equal. 

<snip>
> 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.

Ok, these examples are all consistent in some ways. What should sage 
return for (y+sin)(5)? If I read Robert's proposal correctly, it should
return 5+sin(5), however I think that's wrong. If we follow that then we
don't necessarily have f(5)+g(5)=(f+g)(5), and I think it can be a source
of much confusion.

Soroosh

--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---

Reply via email to