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


On Mon, Aug 25, 2008 at 10:28 PM, Tim Lahey <[EMAIL PROTECTED]> wrote:

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.

What is "the list of foo"?  Is n just the length of a list?  Do you
want to do something like this?

sage: y = [var('y%s'%i) for i in range(10)]
sage: y
[y0, y1, y2, y3, y4, y5, y6, y7, y8, y9]
sage: expr.subs(foo(x) == y[3])
y3^2 + y3 - 1

Basically, there will be a list of foo_i(x). It looks like the above
will work because you can get the length of the list. Then, you just
need to make a list of substitutions of foo_i(x) == y[i].

I think I can make it work. I might get around to trying it tomorrow.

Thanks,

Tim.

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

Reply via email to