[sympy] RoofOf Modular Exponentiation

2014-11-26 Thread Chris Swierczewski
Hello, Has work has been done on modular reduction of `RootOf` objects? (If not, I would like to begin implementing this functionality!) What I mean is this: import sympy from sympy.abc import x f = x**3 + 2*x + 1 a = sympy.RootOf(f,0) b = a**3 Since $f(a) = 0$ by definition it would be nice

Re: [sympy] RoofOf Modular Exponentiation

2014-11-26 Thread Ondřej Čertík
On Wed, Nov 26, 2014 at 11:31 AM, Chris Swierczewski cswie...@gmail.com wrote: Hello, Has work has been done on modular reduction of `RootOf` objects? (If not, I would like to begin implementing this functionality!) What I mean is this: import sympy from sympy.abc import x f = x**3 + 2*x +

Re: [sympy] RoofOf Modular Exponentiation

2014-11-26 Thread Chris Swierczewski
Hello, Thanks for the quick response! This is what I get: ... So looks like it hasn't been implemented yet. Right on. I'll start poking around, then. Good question. First, I would implement RootOf.mypow(n) and see if you can figure out how to get the answer you want. That's the hard part.

Re: [sympy] RoofOf Modular Exponentiation

2014-11-26 Thread Ondřej Čertík
Hi Chris, On Wed, Nov 26, 2014 at 11:56 AM, Chris Swierczewski cswie...@gmail.com wrote: Hello, Thanks for the quick response! This is what I get: ... So looks like it hasn't been implemented yet. Right on. I'll start poking around, then. Good question. First, I would implement

Re: [sympy] RoofOf Modular Exponentiation

2014-11-26 Thread Aaron Meurer
There's a decent chance this algorithm is already implemented and just not integrated into the RootOf object, so I would search around the polys code first. Aaron Meurer On Wed, Nov 26, 2014 at 12:17 PM, Ondřej Čertík ondrej.cer...@gmail.com wrote: Hi Chris, On Wed, Nov 26, 2014 at 11:56 AM,

Re: [sympy] RoofOf Modular Exponentiation

2014-11-26 Thread Chris Swierczewski
Hello Aaron, There's a decent chance this algorithm is already implemented and just not integrated into the RootOf object, so I would search around the polys code first. Thanks for the tip. I've been getting to know the `rem()` and `reduce()` functions a little more. From what I've seen so