On Mon, Aug 25, 2008 at 10:48 PM, Tim Lahey <[EMAIL PROTECTED]> wrote:
>
> 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.

Do complain if you can't.   Also, let meknow if you have trouble installing
pynac -- it's very new (1 day old!) so installation might not "just work" yet
on all Sage-supported platforms.

 -- William

--~--~---------~--~----~------------~-------~--~----~
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://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to