Yeah, that was my thought, too.  If we make an object, similar to a ring, 
representative of a function space, then if you call a function on an 
indeterminant member of this space, you get back a function; a member of the 
space.

Example:

sage: F.<x> = FunctionSpace(domain = RR, range = RR)
sage: f = sin(x)
sage: g = cos(x)
sage: f+g
sin(x) + cos(x)
sage: f(g)
sin(cos(x))
sage: (f+g)(0)
1
sage: (f(g)).diff(x)
cos(cos(x))*(-sin(x))

    --tom

On Wed, 6 Dec 2006, alex clemesha wrote:

> I guess what I'm suggesting is completely implement "
> sage.functions.functions.* "
> so one can define "functions" transparently with 'def' and 'lambda' that a
> user
> can do calculus with.
>
> -Alex
>
> On 12/6/06, David Harvey <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> On Dec 6, 2006, at 12:39 PM, Robert Bradshaw wrote:
>>
>>> The main difficulty with def/lamdba is how would one do calculus with
>>> one of these functions?
>>
>> Yeah, like if def f(x): ... and def g(x): ... then how do I write f + g?
>>
>> David
>>
>>
>>>
>>
>
>
> >



--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
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