Re: [sympy] Re: Summing calls to undefined functions

2023-03-24 Thread David Bailey
On 24/03/2023 15:38, Chris Smith wrote: >>> sum(f(i) for i in range(3)) == Sum(f(i), (i,0,2)).doit() == f(0) + f(1) + f(2) True On Friday, March 24, 2023 at 3:31:32 AM UTC-5 da...@dbailey.co.uk wrote: On 24/03/2023 02:25, Chris Smith wrote: > David, please start a new thread (and try I

Re: [sympy] Re: Summing calls to undefined functions

2023-03-24 Thread Chris Smith
>>> sum(f(i) for i in range(3)) == Sum(f(i), (i,0,2)).doit() == f(0) + f(1) + f(2) True On Friday, March 24, 2023 at 3:31:32 AM UTC-5 da...@dbailey.co.uk wrote: > On 24/03/2023 02:25, Chris Smith wrote: > > David, please start a new thread (and try IndexedBase instead of > > Function and use []

Re: [sympy] Re: Summing calls to undefined functions

2023-03-24 Thread David Bailey
On 24/03/2023 02:25, Chris Smith wrote: David, please start a new thread (and try IndexedBase instead of Function and use [] instead of ()). Thanks, I did consider that, but I thought that undefined functions can simply participate in algebraic expressions in exactly the same way as they woul

[sympy] Re: Summing calls to undefined functions

2023-03-23 Thread Chris Smith
David, please start a new thread (and try IndexedBase instead of Function and use [] instead of ()). WRT CHATGPT: talk with it for a while trying to get it to compute the norm of (1/2, 1, 1). When you tell it not to skip steps it can get it right, but it is hard to get it to give you the correc