-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
gens_reduced() does not handle "large" ideals #11836
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Author: Jeroen Demeyer |
Dependencies: #11130 |
This comment has been minimized.
This comment has been minimized.
comment:9
I get:
on a copy of John's 4.7.2.alpha2 with #11130 included. And the file integer.pyx was not patched. What happened? |
comment:10
Oops, clicked the wrong link :$ that was HTML, sorry. |
Reviewer: Marco Streng |
comment:11
Ok, now I get (with #11130 and 11836.patch):
even though I do get correct output. Example:
|
comment:12
I don't think I can easily disable that warning (without disabling all warnings from PARI), so I think we just have to live with it. |
comment:13
Replying to @jdemeyer:
Ok. In that case, could you explain the warning in the documentation and add it to the examples? I was very confused by it. Of course it also appears when gens_reduced isn't called directly, so there are a lot of functions where you can choose add it or not. |
comment:14
Looking at the patch right now. Passed all tests, building documentation. Question now that I'm making comments anyway: between lines 1060 and 1061, should/could you add
Also, the use of v[1] in 1073 requires some complicated logic to see that it is really defined. I think it could lead to bugs when other people edit your code later without realising this. (p.s. I'm not setting anything to "needs work" for any of this.) |
comment:15
Replying to @jdemeyer:
Actually, you could try to avoid |
comment:16
Ok, so here's something that really puzzles me:
I get the warning twice, indicating that something isn't cached! In fact, if I do
twice, then I get the following each time:
So you're setting |
comment:17
Replying to @mstreng Wait, why use flag=1 at all in bnfisprincipal? flag=1 is the (only) one that gives the warning. So if you replace flag=1 by flag=0 or flag=2 on line 1067, then that removes the warning. More importantly: flag=2 (as opposed to 0 or 1) makes sure that
|
comment:18
Ok, sorry for the amount of posts. I'm done reading the patch, and it looks good. So let me sum things up: Could you...
|
comment:19
Replying to @mstreng:
What My code uses One thing could be improved: if we know that the class group is trivial, some shortcuts can be made. |
comment:21
Replying to @jdemeyer Hi Jeroen, Thanks for the explanation. I understood all of that, except for I guess that leaves only my other reason for removing flag=1: The warning disappears if you replace flag=1 by 0, 2 or 3. This is because you only get the warning when you ask for a generator, but don't get it and don't demand it (i.e., if you choose flag=1 and the ideal is too big). The warning is confusing and worried me as a user. So I would like to either have it extensively documented in this patch, or removed. And it can be removed simply by never using flag=1, but always 0, 2, or 3. If you simply replace flag=1 by 0, 2 or 3, then that slows your patch down in some cases. However, you could do flag=3 if gens_needed=True, and flag=0 otherwise. In other words, call bnfisprincipal only 1 time during Marco |
comment:22
New patch, hopefully fixing all issues mentioned above. The caching problem was apparently caused by double underscores, so I'm using single underscores now. I am still using |
comment:23
Attachment: 11836.patch.gz Replying to @mstreng:
Could be but I don't feel like delving too much in the details here. |
comment:24
Looks good, but no time to look at it in detail today. Could you send me a diff between the two versions (or simply tell me which parts didn't change)? That may save time. |
comment:25
Replying to @mstreng:
I'm afraid I don't have a copy of the old patch. The only parts which changed w.r.t. the old patch are:
|
comment:26
#11130 needs a review first |
comment:28
ok, so you're saying that only that one patch of #11130 still needs a review? |
comment:31
Fixes all issues that I raised. Looks very good. Doctesting now... |
comment:32
Tests pass, thanks for all the work! |
comment:33
Replying to @mstreng:
And thanks for the reviewing! |
Milestone sage-4.7.3 deleted |
Merged: sage-4.8.alpha1 |
PARI does not compute the reduced generators of the ideal below (even though the class number of
L
is 1, so the ideal is certainly principal):Depends on #11130
CC: @jdemeyer @mstreng @JohnCremona
Component: number fields
Author: Jeroen Demeyer
Reviewer: Marco Streng
Merged: sage-4.8.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/11836
The text was updated successfully, but these errors were encountered: