Hi,

On Wed, Aug 26, 2009 at 2:10 PM, Robert
Bradshaw<[email protected]> wrote:
>>
>> I agree.  Personally, I would prefer to wait until we have
>> a proper coersion model from tuple/list to SR.
>
> I don't think coercion is the way to go about it...

May be.

What would be your suggestion to handle this?


Basically, what we need is some construct that would allow
tuple to become arguments of any symbolic functions of new
symbolics, "integrate" being one of them. So for example,
we should be able to call
---------
sage:  f(x,y,z) = function('f', x, y, z)
sage: f(x, (a,b), (c,d,e))
f(x, (a,b), (c,d,e))
----------

An easy way of doing this would be to use a dummy function
like
---------
sage:  symbolic_tuple = function('symbolic_tuple')
---------

(A) Tuple to SR:
------
a   = (x,y,z)
b = symbolic_tuple(*a)
------
*b*  is just an symbolic expression that can be manipulated
as usual.

(B) SR to tuple
------
b = symbolic_tuple(x,y,z)
a = b.operands()
------
*a* is now regular python tuple

I would be happy to hear any comments on this before
I start coding.


> what does x + (2,"yo") mean?

Personally, I would want (leave it as is)
------
sage: x + (2, "yo")
x + (2, "yo")
-------


Cheers,
Golam

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to