# Calculate reduction of Jacobian of hyperelliptic curve

Suppose I have a hyperelliptic curve of genus $2$ over $\mathbb Q$. I want to get information about its Jacobian reduction at prime $p$ (especially, in case $p=2$). Also I'm interesting in the group of connected components of the Neron model of the Jacobian.

Is it possible to get such information using some computer algebra system (like Magma, Sage and etc)? I know that there is Sage (and Pari) function genus2reduction (Liu algorithms implementation) that is able to give information about almost all reductions. But it doesn't give enough information about reduction at $p=2$.

So I want to focus on case $p=2$ and I'm looking for other solution.

UPD Gave link at genus2reduction and pointed that it is implementation of Liu algorithms. Added after Victor Miller answer.

UPD2 Thanks to Michael Stoll. There is an answer for almost all cases. But for some curves his solution still doesn't work. So I'm still looking for something else. For example it is impossible to get information about reduction at $p=2$ for such curves like $y^2 = 16*x^6 + 32*x^5 + 16*x^4 + 32*x^3 + 96*x^2 + 64*x + 16$.

-

The relevant information can be obtained from a regular model of the curve over ${\mathbb Z}_p$. Such a model can be computed by repeatedly blowing up points or components of the special fiber that are singular on the arithmetic surface one obtains from the original curve. More or less detailed examples of this can be found in various places, for example here or here. The component group can be obtained from the intersection matrix of the resulting special fiber.

There is an implementation of regular models in Magma by Steve Donnelly that can do this computations in many (but not yet all) cases. See the function "RegularModel" and the documentation here.

-
Thanks a lot for your answer! It is almost the solution! But you are right there are exceptions in RegularModel function. For example in some cases it fails with error: Can't blow up fibre (failed to find an affine transformation to a line). So if you know some other way to deal with group of components it wold be great! – Maxim Jun 14 '14 at 6:52
I've updated the question and added examples that produce such error. Please look at them. – Maxim Jun 14 '14 at 10:13
My version of Magma (V2.20-5) computes regular models at 2 for the examples you mention. If you don't have the latest version of Magma and you think you've found a bug, it's usually a good idea to first try the online-calculator. – jsm Jun 14 '14 at 10:57
By the way, if your curve is hyperelliptic, then you can first call pMinimalWeierstrassModel to make sure that RegularModel starts with an equation that is minimal at 2. This won't affect the information you're interested in, but makes it much less likely that Magma can't compute a regular model. – jsm Jun 14 '14 at 13:24
Magma doesn't compute the Neron model, only its group of components. You're right ComponentGroup only gives you the geometric component group. But Magma can also compute equations for the components using the intrinsic Components (which does not show up in the handbook). Then you can use the results of this paper by Bosch and Liu to find the $\mathbb{F}_p$-rational points of the component group using the $\mathrm{Gal}(\overline{\mathbb{F}_p}/\mathbb{F}_p)$-action on the components (Magma won't do it for you, though). – jsm Jul 16 '14 at 9:47

There is a discussion of exactly this here: https://groups.google.com/forum/#!topic/sage-nt/uBIWZtX1Yas .

Thanks for answer! Implementation of Liu algorithms in Sage is genus2reduction function that I mentioned above. It works great at any $p \ne 2$. And it cannot give an answer at $p=2$. Citation from google group discussion: This still leaves p=2 completely out of the picture, however. So, I still need an answer... – Maxim Jun 13 '14 at 7:37