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
enumerate_totallyreal_fields_prim does not return polynomial as elements of a polynomial ring #15552
Comments
Replying to @ppurka:
[...] It's not that lengthy, but rather simpler is to relace the line
by
Yes, this should certainly be changed. And it would also be better if the integer returned was a Sage |
This comment has been minimized.
This comment has been minimized.
comment:2
Replying to @sagetrac-fwclarke:
Indeed. This is also a problem with all the other |
comment:3
Adding some patches to fix this. I introduce a new keyword that can be |
Branch: u/ppurka/ticket/15552 |
comment:6
The patches do not deal with the trivial
which causes an error when There are many other problems with these functions:
but
In Sage, unlike PARI, the names of variable/generators should not matter.) But I suppose these are for a different ticket. New commits:
|
Commit: |
Reviewer: Francis Clarke |
comment:7
Number theory is not my area at all. I just fixed what I could! I will have to ask a friend or colleague to understand the output. If you have a ready explanation for the variables/output, please go ahead and add them to the documentation. These functions themselves are very old and poorly documented, as you have noticed. |
comment:8
Replying to @ppurka:
I see that with I would suggest making just the minimal changes required to allow Sage output and to cover the trivial cases and leaving it to someone who understands the algorithm (which I don't) to do the rewrite needed to modernise the functions. |
comment:9
Ok. I will do this next week, when my colleague will be back. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:11
This is still not completely ready for review -- need to verify that the outputs are fine. But you can look into the changes if you want. I am actually not confident that the functions give the output corresponding to the documentation! The statements that we get with Here is a sample run after my patches.
|
comment:13
Final fix is the output for |
comment:16
All looks good. |
Author: Punarbasu Purkayastha |
comment:18
Documentation does not build
|
comment:19
That's strange. I don't have the latest dev version on my laptop. Will take me a day to fix this. |
comment:21
This should be fixed now. |
Changed branch from u/ppurka/ticket/15552 to |
The function
enumerate_totallyreal_fields_prim
is supposed to return, according to its description,Let us look at an output:
We notice from here that the polynomial does not actually belong to the polynomial ring of
QQ
. In fact, there is no nice way to directly get the polynomial, as in an element ofPolynomialRing(QQ)
fromE[0][1]
, which can be then used to construct the number field.The only way to do this is this lengthy and tedious procedure:
The output of the function itself should give back elements of the polynomial ring, instead of giving us elements which are simply output of pari.
Additionally,
Integer
ring instead of being just a pythonint
.enumerate_totallyreal_fields_all
andenumerate_totallyreal_fields_rel
should get the same fix.Component: algebra
Author: Punarbasu Purkayastha
Branch/Commit:
7e86783
Reviewer: Francis Clarke
Issue created by migration from https://trac.sagemath.org/ticket/15552
The text was updated successfully, but these errors were encountered: