Invariants

Over an algebraically closed field k of characteristic p with p != 2, the isomorphism class of a genus g hyperelliptic curve y2=f(x) with f ∈k[x] corresponds to the orbit of the binary form z2g + 2 f(x/z) under the classical action of GL2(k). Working out generators for the algebra Rg(C) was a popular pastime of nineteenth-century mathematicians.

For g=2, Igusa [Igu60] managed to give a "universal set of invariants", which works in every characteristic, including 2. These can be called by the function IgusaInvariants(). There are also other sets of invariants (IgusaClebschInvariants(), ClebschInvariants()) and absolute invariants (G2Invariants()), which are used for historical or practical reasons.

For g=3, Shioda [Shi67] found invariants in characteristic 0. The reductions of the Shioda generators for R3(C) are still generators for R3(k) when the characteristic of k is greater than 7. For more information, we refer to [LRS21].

Contents

Igusa Invariants

The Clebsch, Igusa--Clebsch and Igusa invariants may be computed for curves of genus 2.

The Magma package implementing the functions was written by Everett W. Howe (however@alumni.caltech.edu) with some advice from Michael Stoll and is based on some gp routines written by Fernando Rodriguez--Villegas as part of the Computational Number Theory project funded by a TARP grant. The gp routines may be found at http://www.ma.utexas.edu/users/villegas/cnt/inv.gp.

In addition, a package of functions written by Reynald Lercier and Christophe Ritzenthaler, and Jeroen Sijsling [LRS21] has been added. It contains, amongst other things, functionality for working with a different set of absolute (as opposed to weighted projective) invariants referred to as Cardona---Quer---Nart---Pujola invariants. These work in characteristic 2 as well as other characteristics, although the definitions are different in the two cases.

Rodriguez--Villegas's routines are based on a paper of Mestre [Mes91]. The first part of Mestre's paper summarizes work of Clebsch and Igusa, and is based on the classical theory of invariants. This package contains functions to compute three types of invariants of quintic and sextic polynomials f (or, perhaps more accurately, of binary sextic forms):

The Clebsch invariants A, B, C, D of f, as defined on p. 317 of Mestre;

The Igusa--Clebsch invariants A', B', C', D' of f, as defined on p. 319 of Mestre; and

The Igusa invariants (or Igusa J-invariants, or J-invariants) J2, J4, J6, J8, J10 of f, as defined on p. 324 of Mestre.

The corresponding functions are ClebschInvariants, IgusaClebschInvariants, and JInvariants, respectively. For convenience, we use IgusaInvariants as a synonym for JInvariants.

Igusa invariants may be defined for a curve of genus 2 over any field and for polynomials of degree at most 6 over fields of characteristic not equal to 2. The Igusa invariants of the curve y2 + hy = f are equal to the Igusa invariants of the polynomial h2 + 4 * f except in characteristic 2, where the latter are not defined. In practice, the functions below will not calculate the Igusa invariants of a polynomial unless 2 is a unit in the coefficient ring. However, Igusa invariants of curves are available for all coefficient rings. (But see below.)

Igusa invariants are given by a sequence [ J2, J4, J6, J8, J10 ] of five elements of the coefficient ring of the polynomials defining the curve. This sequence should be thought of as living in weighted projective space, with weights 2, 4, 6, 8, and 10.

It should be noted that many of the people who work with genus 2 curves over the complex numbers prefer not to work with the real Igusa invariants, but rather work with some related numbers, [ I2, I4, I6, I10 ] (or [ A', B', C', D' ] in Mestre's terminology), that we call the Igusa--Clebsch invariants, of the curve. Once again, these live in weighted projective space. The Igusa--Clebsch invariants of a polynomial are defined in terms of certain nice symmetric polynomials in its roots, and, in characteristic zero, the J-invariants may be obtained from the I-invariants by some simple homogeneous transformations. In fact, many of the genus-2-curves-over-the-complex-numbers people refer to the elements i1 := I25/I10, i2 := I23 * I4/I10 and i3 := I22 * I6/I10 as the "invariants" of the curve. The problem with the Igusa--Clebsch invariants is that they do not work in characteristic 2 and it was for this reason that Igusa defined his J-invariants.

The coefficient ring of the polynomial f must be an algebra over a field of characteristic not equal to 2 or 3.

The Cardona---Quer---Nart---Pujola invariants are three absolute invariants g1, g2, g3 which can be derived from the J-invariants and which provide an affine classification of all genus two curves over a basefield k up to isomorphism over bar(k). That is, there is a 1-1 correspondence between bar(k)-isomorphism classes of such curves and triples (g1, g2, g3) in k3. There are also functions to construct a curve with given invariants and to find all twists of such a curve (ie representatives of the k-isomorphism classes in the given bar(k)-isomorphism class), which will be described in later sections.

The invariants are different in the characteristic 2 and odd (or 0) characteristic cases. Details about the former case may be found in [CNP05]. See [CQ05] for the latter case. In the odd characteristic case, the formulae for [g1, g2, g3] in terms of the J-invariants are as follows:

[((J25)/(J10)), ((J23J4)/(J10)), ((J22J6)/(J10))] J2 ≠0

[0, ((J45)/(J210)), ((J4J6)/(J10))] J2 = 0, J4 ≠0

[0, 0, ((J65)/(J210))] J2 = J4 = 0

In the characteristic 2 case, the field k must be perfect. Formulae for the invariants (labelled ji rather than gi) may be found on p. 191 of [CNP05].

ClebschInvariants(C) : CrvHyp -> SeqEnum
Given a hyperelliptic curve C having genus 2, compute the Clebsch invariants A, B, C and D as described on p. 317 of [Mes91]. The base field of C may not have characteristic 2, 3 or 5. The invariants are found using Überschiebungen.
ClebschInvariants(f) : RngUPolElt -> SeqEnum
Given a polynomial f of degree at most 6, compute the Clebsch invariants A, B, C and D as described on p. 317 of [Mes91]. The coefficient ring of the polynomial f must be an algebra over a field of characteristic not equal to 2, 3 or 5. The invariants are found using Überschiebungen.
IgusaClebschInvariants(C: parameters) : CrvHyp -> SeqEnum
    Quick: BoolElt                      Default: false
Given a curve C of genus 2 defined over a field, the Igusa--Clebsch invariants A', B', C' and D' as described on p. 319 of [Mes91] are found. These will be all be zero in characteristic 2. If Quick is true, the base field of C may not have characteristic 2, 3 or 5 and a faster method using Überschiebungen is employed; otherwise, universal formulae are used.
IgusaClebschInvariants(f, h) : RngUPolElt, RngUPolElt -> SeqEnum
Given a polynomial h having degree at most 3 and a polynomial f having degree at most 6, the Igusa--Clebsch invariants A', B', C' and D' of the curve y2 + hy - f = 0 are found. These will be all be zero in characteristic 2.
IgusaClebschInvariants(f: parameters) : RngUPolElt -> SeqEnum
    Quick: BoolElt                      Default: false
Given a polynomial f having degree at most 6 and defined over a ring in which 2 is a unit, the Igusa--Clebsch invariants A', B', C' and D' of the polynomial f are found. These will be all be zero in characteristic 2. If Quick is true, the coefficient ring of f may not have characteristic 2, 3 or 5 and a faster method using Überschiebungen is employed; otherwise, universal formulae are used.
IgusaInvariants(C: parameters): CrvHyp -> SeqEnum, SeqEnum
JInvariants(C: parameters): CrvHyp -> SeqEnum
    Quick: BoolElt                      Default: false
    extend: BoolElt                     Default: false
    normalize: BoolElt                  Default: false
Given a curve C of genus 2 defined over a field, the function returns the Igusa invariants (or J-invariants) J2, J4, J6, J8, J10 as described on p. 324 of [Mes91]. If Quick is true, the base field of C must not have characteristic 2, 3 or 5 and a faster method using Überschiebungen is employed; otherwise, universal formulae are used.

The parameter normalize can give a normal form of the list of invariants, allowing easy comparisons.

Note that the Igusa invariants do not contain the invariant I15 which is one of the generator of the ring of binary sextic invariants but which is not useful to characterize genus 2 curves. However it may be useful to have it in the reconstruction process over the rationals. It can be stored using the parameter extend.

IgusaInvariants(f, h: parameters): RngUPolElt, RngUPolElt -> SeqEnum, SeqEnum
JInvariants(f, h: parameters): RngUPolElt, RngUPolElt -> SeqEnum, SeqEnum
    Quick: BoolElt                      Default: false
    extend: BoolElt                     Default: false
    normalize: BoolElt                  Default: false
Given a polynomial h having degree at most 3 and a polynomial f having degree at most 6, this function returns the Igusa invariants (or J-invariants) J2, J4, J6, J8, J10 of the curve y2 + hy = f. The coefficient ring R of the polynomials h and f must either (a) have characteristic 2, or (b) be a ring in which Magma can apply the operator ExactQuotient(n,2). For example, R may be an arbitrary field, the ring of rational integers, a polynomial ring over a field or over the integers and so forth. However, R may not be a p-adic ring, for instance. If the desired coefficient ring does not meet either condition (a) or condition (b), then ScaledIgusaInvariants should be used and its invariants then scaled by the appropriate powers of 1/2.

The parameter normalize can give a normal form of the list of invariants, allowing easy comparisons.

Note that the Igusa invariants do not contain the invariant I15 which is one of the generator of the ring of binary sextic invariants but which is not useful to characterize genus 2 curves. However it may be useful to have it in the reconstruction process over the rationals. It can be stored using the parameter extend.

IgusaInvariants(f: parameters) : RngUPolElt -> SeqEnum
IgusaInvariants(f: parameters) : RngMPolElt -> SeqEnum
JInvariants(f: parameters) : RngUPolElt -> SeqEnum
    Quick: BoolElt                      Default: false
    extend: BoolElt                     Default: false
    normalize: BoolElt                  Default: false
Given a polynomial f having degree at most 6 which is defined over a ring in which 2 is a unit, return the Igusa invariants (or J-invariants) J2, J4, J6, J8, J10 of f. If Quick is true, the coefficient ring of f may not have characteristic 2, 3 or 5 and a faster method using Überschiebungen is employed; otherwise, universal formulae are used.

The parameter normalize can give a normal form of the list of invariants, allowing easy comparison.

Note that the Igusa invariants do not contain the invariant I15 which is one of the generator of the ring of binary sextic invariants but which is not useful to characterize genus 2 curves. However it may be useful to have it in reconstruction process over the rational. It can be stored using the parameter extend.

IgusaAlgebraicRelations(JI) : SeqEnum -> SeqEnum
Return generators of the ideal of relations between the Igusa invariants.
IgusaInvariantsEqual(JI1, JI2) : SeqEnum, SeqEnum -> BoolElt
Check whether Igusa Invariants JI1 and JI2 of two genus 2 hyperelliptic curves or of two binary forms of degree 8 are equivalent.
DiscriminantFromIgusaInvariants(JI) : SeqEnum -> Any
Compute the discriminant of a genus 2 hyperelliptic curve from the given Igusa Invariants.
ScaledIgusaInvariants(f, h): RngUPolElt, RngUPolElt -> SeqEnum
Given a polynomial h having degree at most 3 and a polynomial f having degree at most 6, return the Igusa J-invariants of the curve y2 + hy = f, scaled by [16, 162, 163, 164, 165].
ScaledIgusaInvariants(f): RngUPolElt -> SeqEnum
Given a polynomial f having degree at most 6 which is defined over a ring not of characteristic 2, return the Igusa J-invariants of f, scaled by [16, 162, 163, 164, 165].
AbsoluteInvariants(C) : CrvHyp -> SeqEnum
Given a curve C of genus 2 defined over a field, the function computes the ten absolute invariants of C as described on p. 325 of [Mes91].
ClebschToIgusaClebsch(Q) : SeqEnum -> SeqEnum
Convert Clebsch invariants in the sequence Q to Igusa--Clebsch invariants.
IgusaClebschToIgusa(S) : SeqEnum -> SeqEnum
Convert Igusa--Clebsch invariants in the sequence S to Clebsch invariants.
G2Invariants(C) : CrvHyp -> SeqEnum
Compute and return the sequence of three Cardona---Quer---Nart---Pujola invariants (see the introduction above) for C of genus 2.
G2ToIgusaInvariants(GI) : SeqEnum -> SeqEnum
Convert the sequence of Cardona---Quer---Nart---Pujola invariants (see the introduction above) to a corresponding sequence of Igusa J-invariants.
IgusaToG2Invariants(JI) : SeqEnum -> SeqEnum
Convert the sequence of Igusa J-invariants to Cardona---Quer---Nart---Pujola invariants (see the introduction above).

Shioda Invariants

The Shioda invariants may be computed for curves of genus 3 in characteristic 0 or characteristic ≥11. There are 9 of these, the first 6 being algebraically independent and the last 3 being algebraic over the field generated by the other 6. The discriminant is not one of these invariants. For more details, see [LR12] or [Shi67]. These invariants have weights and naturally give a point in a weighted projective space. There are also intrinsics for computing the six Maeda invariants of the curve ([Mae90]). In characteristic 2, 3 and 7, a set of separating invariants is known [Bas15]. They are sufficient to characterize the geometric isomorphism classes of hyperelliptic curves of genus 3.

ShiodaInvariants(C) : CrvHyp -> SeqEnum, SeqEnum
ShiodaInvariants(f) : RngUPolElt -> SeqEnum, SeqEnum
ShiodaInvariants(f) : RngMPolElt -> SeqEnum, SeqEnum
ShiodaInvariants(fh) : SeqEnum -> SeqEnum, SeqEnum
    normalize: BoolElt                  Default: false
    PrimaryOnly: BoolElt                Default: false
    IntegralNormalization: BoolElt      Default: false
    degmin: RngIntElt                   Default: 1
    degmax: RngIntElt                   Default: ∞
Returns a sequence containing the 9 Shioda invariants of a genus 3 hyperelliptic curve C along with a sequence containing the weight of the corresponding invariant (always 2, 3, 4, 5, 6, 7, 8, 9, 10) when the base field of C is of characteristic 0 or ≥11. There are also versions that takes a single polynomial f of degree less than or equal to 8 as argument (corresponding to the curve y2=f(x)) or a sequence of two polynomials fh (corresponding to the curve y2 + h(x)y=f(x)). In these cases if the degree of f (resp f - h2/4) is less than 7, or if the discriminant is zero, the invariants will be invariants of the corresponding binary octic but no longer of a genus 3 hyperelliptic curve. Such sequences of invariants are referred to as singular.

The sequence of invariants can be considered as giving a point in a dimension 8 weighted projective space with the above weights. If the parameter normalize is set to true, the sequence is scaled to give a new sequence representing the same point in a normalized form. This means that two isomorphic curves will not necessarily give the same sequence of invariants, but they will always give the same sequence of normalized invariants.

When the characteristic of the field is 2, 3 or 7 a set of separating invariants is returned. They are sufficient to characterize isomorphism classes of hyperelliptic curves of genus 3. In characteristic 5, a minimal list of invariants that generates the largest subring of invariants that has been found so far is returned.

The lists of invariants can be normalized with the parameter normalize. It is also possible to use the parameter IntegralNormalization to obtain the all of these invariants as polynomials over the integers. The flag PrimaryOnly can be used to return a homogeneous system of parameters, which is proven in all characteristics (even 5). Finally, the parameters degmin, degmax are useful for obtaining only those invariants within some range.

ShiodaInvariantsEqual(V1,V2) : SeqEnum, SeqEnum -> BoolElt
Returns whether two sequences of Shioda invariants V1 and V2 represent the same point in the natural weighted projective space. This is equivalent to asking whether their normalized versions (see previous intrinsic) are the same, which means that they represent the same isomorphism class of curves (if they are non-singular).
DiscriminantFromShiodaInvariants(JI) : SeqEnum -> RngElt
Returns the corresponding discriminant from a sequence of Shioda invariants JI. The discriminant (of a binary octic) is just a polynomial in its 9 Shioda invariants. Note that is scaled if the invariants are scaled, so that the value is different for example, if applied to the results of calling ShiodaInvariants with normalize set to true or false. The significant thing though is whether this is non-zero or not. The value is zero if and only if JI are singular invariants (associated to a polynomial with multiple roots or of degree ≤6).
ShiodaAlgebraicInvariants(FJI) : SeqEnum -> SeqEnum
    ratsolve: BoolElt                   Default: true
As mentioned in the introduction, the first 6 Shioda invariants are algebraically independent forms on the genus 3 hyperelliptic moduli space and the remaining 3 are algebraic over them.

This intrinsic takes a sequence FJI of 6 elements of a field k that must be of characteristic 0 or ≥11. If these are considered to be the first 6 Shioda invariants (of a possibly singular set), this intrinsic returns a sequence containing all possible sequences of the full 9 invariants over k that have those of FJI as the first 6, if the parameter ratsolve is true (the default). If ratsolve is false, the sequence returned instead contains the 6 polynomials in 3 variables over k, which defines a dimension 0, degree 5 system whose solutions are the possible last 3 invariants.

Example CrvHyp_shioda-inv-ex (H134E46)

> k := GF(37);
> P<t> := PolynomialRing(k);
> C := HyperellipticCurve(t^8+33*t^7+27*t^6+29*t^5+4*t^4+
>         18*t^3+20*t^2+27*t+36);
> ShiodaInvariants(C);
[ 33, 16, 30, 31, 8, 18, 0, 30, 31 ]
[ 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
> ShiodaAlgebraicInvariants([k|33,16,30,31,8,18]);
[
    [ 33, 16, 30, 31, 8, 18, 0, 30, 31 ],
    [ 33, 16, 30, 31, 8, 18, 14, 10, 25 ]
]
> ShiodaAlgebraicInvariants([k|33,16,30,31,8,18] : ratsolve := false);
[
    $.1^5 + 21*$.1^4 + 12*$.1^3 + 3*$.1^2 + 23*$.1,
    $.1^2 + 6*$.1 + 33*$.2 + 23*$.3 + 36,
    $.1*$.2 + 34*$.1 + 36*$.2 + 32*$.3,
    $.1*$.3 + 17*$.1 + 14*$.2^2 + 23*$.2 + 17*$.3 + 21,
    27*$.1 + $.2*$.3 + 36*$.2 + 27*$.3 + 2,
    8*$.1 + 27*$.2^2 + 2*$.2 + $.3^2 + 19*$.3 + 27
]
MaedaInvariants(C) : CrvHyp -> SeqEnum
MaedaInvariants(f) : RngUPolElt-> SeqEnum
Returns the six Maeda field invariants (I2, I3, I4, I4p, I8, I9) of a genus 3 hyperelliptic curve C. Again, the base field of C must be of characteristic 0 or ≥11. For this intrinsic, the model of C must also be in simplified y2=f(x) form. There is also a version with argument f, a univariate polynomial of degree less than or equal to 8, which returns the Maeda invariants of the binary octic given by homogenizing f (to degree 8). This is the same as asking for the invariants of y2=f(x) when f has degree 7 or 8.

Creation from Invariants

The problem is to construct a curve of genus 2 from a given set of Igusa--Clebsch invariants defined over the same field as the field of moduli (simply the smallest field in which the invariants lie). Mestre [Mes91] shows that this is not always possible, even in theory. But over a finite field or the rationals he gives a method for deciding whether it is possible and if it is, for finding such a curve. Mestre's algorithm was implemented by P. Gaudry. Mestre's algorithm does not work when the curve has a split Jacobian. Cardona and Quer [CQ05] showed that in this case one can always find a curve defined over the field of moduli and gave equations for such a curve. This works over any field of characteristic not 2, 3 or 5.

In any characteristic, the code package [LRS21] produces a genus 2 curve from a given set of Cardona---Quer---Nart---Pujola invariants (see Subsection Igusa Invariants). They use the work of Cardona and Quer cited in the previous paragraph in the odd characteristic case, with some extra work for characteristics 3 and 5. In characteristic 2, they use the models from [CNP05].

Lercier, Ritzenthaler, and Sijsling [LRS21] have also contributed a package for genus 3 hyperelliptic curves that produces a curve from a given set of Shioda invariants (see Subsection Shioda Invariants). This works in characteristic not 5.

Over a field of characteristic zero, the equation of the curve returned by these methods can involve huge coefficients. For curves over the rationals, a minimization procedure can be applied. It uses the function MinRedBinaryForm but before that optimize the reconstruction process by choosing a "nice" conic. Strangely, the procedure is more obvious in genus 3. For genus 2, it may involve the invariant I15. If this one is provided, it may speed up the computation.

HyperellipticCurveFromIgusaClebsch(S) : SeqEnum -> CrvHyp
    Reduce: BoolElt                     Default: false
This attempts to build a curve of genus 2 with the given Igusa-Clebsch invariants (see Subsection Igusa Invariants) by Mestre's algorithm (and Cardona's in case of non-hyperelliptic involutions) defined over the field F in which the invariants lie. Currently this field must be the rationals, a number field, or a finite field of characteristic greater than 5. If there exists no such curve defined over F, then either a curve over some quadratic extension is returned (when F is the rationals), or an error results (when F is a number field).

When the base field is the rationals, the parameter Reduce invokes Wamelen's reduction algorithm, and is equivalent to a call to ReducedModel with the algorithm specified as "Wamelen".

HyperellipticCurveFromIgusaInvariants(S) : SeqEnum -> CrvHyp, GrpPerm
HyperellipticCurveFromG2Invariants(S) : SeqEnum -> CrvHyp, GrpPerm
    RationalModel: BoolElt              Default: false
    minimize: BoolElt                   Default: false
From a given sequence of Igusa or Cardona---Quer---Nart---Pujola invariants (as described in Subsection Igusa Invariants) over a finite field or the rationals, return a genus 2 curve with these absolute invariants. This works in all characteristics as noted in the introduction to the section. The geometric automorphism group is also returned as a finitely-presented group.
HyperellipticCurveFromShiodaInvariants(JI) : SeqEnum -> CrvHyp, GrpPerm
HyperellipticPolynomialFromShiodaInvariants(JI) : SeqEnum -> SeqEnum, GrpPerm
    RationalModel: BoolElt              Default: false
    minimize: BoolElt                   Default: false
Given a sequence of 9 Shioda invariants JI over the rationals or a finite field k of characteristic different from 5, the first intrinsic returns a genus 3 hyperelliptic curve over k with these invariants. The abstract geometric automorphism group is also returned as a permutation group. This will cause an error if JI are singular Shioda invariants.

The second intrinsic also works for singular invariants. It returns a list of one polynomial f of degree ≤8 with the given invariants. If JI are non-singular, y2=f(x) is a genus 3 curve with invariants JI.

If the field of definition is the rationals and when there is no obstruction, a rational model can be obtained using RationalModel. Moreover a minimization of the size of the coefficients of the curve can be obtained with the flag minimize.

For more details, see [LR12], [Bas15], [KLL+18].

Example CrvHyp_CurveFromInvts (H134E47)

A typical run would look like:
> SetVerbose("Igusa",1);
> IgCl := [ Rationals() |
>   -549600, 8357701824, -1392544870972992, -3126674637319431000064 ];
> time C := HyperellipticCurveFromIgusaClebsch(IgCl);
Found conic point:
(-64822283782462146583672682837123736006679080996161747198790\
94839597076141357421875/1363791104410093031413327266775768846\
086857295667582286386963073756856153402049457884003686477312,\
10188009335968531191794821132584413878133549529657888880045011\
3779781952464580535888671875/107297694738676628355433722672369\
86876862256732919126043768293539723478848063808819839532581156\
5610468983296)
Time: 0.990
> time C := ReducedModel(C : Al := "Wamelen");
Time: 161.680
> HyperellipticPolynomials(C);
-23*x^6 + 52*x^5 - 55*x^4 + 40*x^3 - 161*x^2 + 92*x - 409
0

An example in characteristic 2 from Cardona---Quer---Nart---Pujola invariants:

> k<t> := GF(16);
> g2_invs := [t^3,t^2,t];
> HyperellipticCurveFromG2Invariants(g2_invs);
Hyperelliptic Curve defined by y^2 + (x^2 + x)*y =
   t*x^5 + t*x^3 + t*x^2 + t*x over GF(2^4)
Finitely presented group on 3 generators
Relations
    $.2^2 = Id($)
    $.1^-3 = Id($)
    ($.1^-1 * $.2)^2 = Id($)
    $.3^2 = Id($)
    $.1 * $.3 = $.3 * $.1
    $.2 * $.3 = $.3 * $.2
> _,auts := $1;
> #auts; // auts = D_12
12

A genus 3 example using Shioda invariants

> k := GF(37);
> FJI := [k| 30, 29, 13, 13, 16, 9];
> ShiodaAlgebraicInvariants(FJI);
[
    [ 30, 29, 13, 13, 16, 9, 14, 35, 0 ],
    [ 30, 29, 13, 13, 16, 9, 36, 32, 22 ],
    [ 30, 29, 13, 13, 16, 9, 36, 32, 23 ]
]
> JI := ($1)[1];
> HyperellipticCurveFromShiodaInvariants(JI);
Hyperelliptic Curve defined by y^2 = 19*x^8 + 13*x^7 + 29*x^6 +
		3*x^5 + 16*x^4 + 19*x^3 + x^2 + 27*x + 12
over GF(37)
Symmetric group acting on a set of cardinality 2
Order = 2

A last example over the rationals.

> P<x> := PolynomialRing(Rationals());
> f := x^8 + x^3 + 1;
> f2 := P ! (Evaluate(f, (x+1001)/(3*x+5))*(3*x+5)^8);
> f2;
6805*x^8 + 827242*x^7 + 765112882*x^6 + 306007035874*x^5 + 72331829214220*x^4 +
    56287364680951806*x^3 + 28168431872398529278*x^2 + 8056168289692716824758*x
    + 1008028056073190412776751
> I := ShiodaInvariants(f2);
> HyperellipticCurveFromShiodaInvariants(I);
Hyperelliptic Curve defined by y^2 = x^8 + x^3 + 1 over Rational Field
Symmetric group acting on a set of cardinality 2
Order = 2
V2.28, 13 July 2023