On Aug 26, 2008, at 1:14 AM, William Stein wrote:

Sounds good.  Unfortunately I don't understand precisely what
you're asking for.  Do you want to do this?

sage: x = var('x', ns=1)
sage: from sage.symbolic.function import function
sage: foo = function('foo',1)
sage: expr = foo(x)^2 + foo(x)-1
sage: expr
foo(x) + foo(x)^2 - 1
sage: y = var('y')
sage: expr.subs(foo(x)==y)
y^2 + y - 1

This *already* works in the new pynac symbolics.  I just typed it in.

Of course, I'm skipping the "programatically" part...


It's the "programatically" part that makes it a bit more difficult.
so imagine doing this with foo1 through foon and y1 through yn. So,
I need to create y1 through yn as needed. I'm not sure how to do
that since n is only known when the list of foo is read.

Cheers,

Tim.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to