-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
Remove genus2reduction #15808
Comments
This comment has been minimized.
This comment has been minimized.
Branch: u/jdemeyer/ticket/15808 |
Commit: |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Author: Jeroen Demeyer |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits: |
comment:10
There is an |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Changed branch from u/jdemeyer/ticket/15808 to public/ticket/15808 |
comment:13
Do you have a reference for the following manipulations? if minimal_equation.degree() == 5:
minimal_disc *= minimal_equation[5]**2
# Multiply with suitable power of 2 of the form 2^(2*(d-1) - 12)
b = 2 * (minimal_equation.degree() - 1)
k = QQ((12 - minimal_disc.valuation(2), b)).ceil()
minimal_disc >>= 12 - b*k
minimal_disc = ZZ(minimal_disc) Is the power of 2 in fact important, given that this is supposed to output the minimal discriminant away from 2? |
comment:14
Replying to @pjbruin:
They are based on looking at the PARI source code. But I must admit that I don't understand everything 100% clearly. The line
is based on
The factor
and the multiplication by
which multiplies the whole polynomial by a power of 4.
I have no idea. I tried to reproduce as best as possible the output of the old |
comment:15
I'm not absolutely sure either, but from the last bit of PARI code you quoted, the following change seems to stay closer to the original: diff --git a/src/sage/interfaces/genus2reduction.py b/src/sage/interfaces/genus2reduction.py
index 73d41d6..01c4019 100644
--- a/src/sage/interfaces/genus2reduction.py
+++ b/src/sage/interfaces/genus2reduction.py
@@ -514,9 +514,9 @@ class Genus2reduction(SageObject):
minimal_disc = QQ(res[2].poldisc()).abs()
if minimal_equation.degree() == 5:
minimal_disc *= minimal_equation[5]**2
- # Multiply with suitable power of 2 of the form 2^(2*(d-1) - 12)
+ # Multiply with suitable power of 2 of the form 2^(2*d - 12)
b = 2 * (minimal_equation.degree() - 1)
- k = QQ((12 - minimal_disc.valuation(2), b)).ceil()
+ k = min(a.valuation(2) for a in Q**2 + 4*P) & ~1
minimal_disc >>= 12 - b*k
minimal_disc = ZZ(minimal_disc)
This does not affect any doctests in |
comment:16
Actually my version above is certainly wrong, because it is not invariant under scaling of the variables in the original equation. However, your formula seems to mean that the 2-adic valuation of the minimal discriminant is bounded on the set of all genus 2 curves, which I can hardly believe, since it isn't even true for elliptic curves. |
comment:17
We can also decide to give up trying to imitate the original program perfectly and allow the power of 2 to be different. I am attaching a patch that does this. I also think you used an incorrect criterion to decide when the 2-part of the conductor was not computed. For example, one of the current doctests has the line
Note that the "away from 2" part should only be there if the returned conductor is odd. According to the PARI documentation, we should check if 2 appears to the power -1 in the factorisation (fake at 2 in this case) of the conductor. This is fixed by the last part of the patch. |
comment:18
Attachment: discriminant.patch.gz What you say (and your patch) makes sense. |
comment:19
Replying to @pjbruin:
After thinking about this some more, perhaps my code is correct but it depends on the interpretation of "Minimal Discriminant (away from 2)". If you interpret it as "smallest positive integer which occurs as discriminant of a model of the given curve over Z[1/2]", then my code might be correct. |
Changed branch from public/ticket/15808 to u/jdemeyer/ticket/15808 |
New commits:
|
Reviewer: Peter Bruin |
comment:22
Replying to @jdemeyer:
Possibly, but I would be surprised if this definition coincides with the one used by the original |
Changed branch from u/jdemeyer/ticket/15808 to |
genus2reduction has been ported to the PARI library and is available as the PARI function
genus2red()
. We should remove the package and use the new PARI function instead.Depends on #15767
Component: packages: standard
Author: Jeroen Demeyer
Branch/Commit:
f35c944
Reviewer: Peter Bruin
Issue created by migration from https://trac.sagemath.org/ticket/15808
The text was updated successfully, but these errors were encountered: