-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Make minimal polynomial of I irreducible #14382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Currently, the minimal polynomial of I is hard-coded `x**2 + 1` over all domains. This PR returns `x - I` over domains that contain I. Current master: >>> minimal_polynomial(I, x, domain=QQ.algebraic_field(I)) x**2 + 1 This PR: >>> minimal_polynomial(I, x, domain=QQ.algebraic_field(I)) x - I
| # minimal polynomial of I | ||
| assert minimal_polynomial(I, x, domain=QQ.algebraic_field(I)) == x - I | ||
| K = QQ.algebraic_field(I*(sqrt(2) + 1)) | ||
| assert minimal_polynomial(I, x, domain=K) == x - I |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of these tests result in x - I. Is the other possibility, the minimal polynomial being x**2 + 1 , tested anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't think it was necessary but maybe it could be included. Perhaps this would suffice?
>>> minimal_polynomial(I, x, domain=QQ)
x**2 + 1
Or this?
>>> minimal_polynomial(I, x, domain='QQ(y)')
x**2 + 1
|
I suspect, there are plenty of such hardcoded surprises... More systematic workaround may be using |
|
That is disappointing. There is a whole range of private methods like |
|
As a variant, you could "sanitize" output of minpoly helpers: factorize one over specified |
Is that a blocker for this PR or should we let that be a new issue? |
|
No, I think those other cases could be taken care of elsewhere. They are concerned with algebraic values of transcendental functions, and it seems that they are currently not considered in number field computations. |
|
That's a damn simple problem, with a clear solution, explained above. Why just not fix it? |
Well, why not. (Maybe not all simple problems should be handed over to beginners...) |
|
I will open a new issue. Feel free to edit it if I have misrepresented the issue. As the change here is minimal I will commit this. |
Currently, the minimal polynomial of I is hard-coded
x**2 + 1over all domains. This PR returns
x - Iover domains thatcontain I.
Current master:
>>> minimal_polynomial(I, x, domain=QQ.algebraic_field(I))
x**2 + 1
This PR:
>>> minimal_polynomial(I, x, domain=QQ.algebraic_field(I))
x - I