Status: Valid
Owner: ----
CC: [email protected]
Labels: Type-Defect Priority-Medium Simplify Polynomial WrongResult
New issue 3237 by [email protected]: cancel() should use ratsimpmodprime
when necessary
http://code.google.com/p/sympy/issues/detail?id=3237
Now that we have rational simplification modulo a prime ideal, we should
apply it with cancel(). For example:
In [87]: cancel((p**2 + 1)/(I*p - 1))
Out[87]:
2
p + 1
───────
ⅈ⋅p - 1
In [88]: ratsimpmodprime((p**2 + 1)/(i*p - 1), [i**2 + 1])
Out[88]:
-(i - p)
────────
i
Note that we have to have to apply a dummy for I. In reality, we should
make ratsimpmodprime work with the Polys directly.
Tom, am I missing any problems with this plan?
By the way, the only reason we get the wrong result with cancel() is that
we allow I to be a generator in the polys, even though many of the
algorithms require that the generators be algebraically independent.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.