# Genus-five hyperelliptic or trigonal curves with many rational points in
characteristic three

Momonari Kudo and Shushi Harashita Graduate School of Information Science and
Technology, The University of Tokyo.Graduate School of Environment and
Information Sciences, Yokohama National University.

###### Abstract

The number $N_{9}(5)$, the maximal number of $\mathbb{F}_{9}$-rational points
on curves over $\mathbb{F}_{9}$ of genus $5$ is unknown, but it is known that
$32\leq N_{9}(5)\leq 35$. In this paper, we enumerate hyperelliptic curves and
trigonal curves over $\mathbb{F}_{3}$ which have many
$\mathbb{F}_{9}$-rational points (and $\mathbb{F}_{3}$-rational points),
especially the maximal number of $\mathbb{F}_{9}$-rational points of those
curves is $30$. Kudo-Harashita studied the nonhyperelliptic and nontrigonal
case, where they found a new example of curves (over $\mathbb{F}_{3}$) of
genus five which attains $32$ and proved that there is no example attaining
more than $32$, among sextic plane curves with mild singularities. We conclude
from the main results in this paper that we need to search sextic models
(i.e., nonhyperelliptic and nontrigonal) with bad singularities, in order to
find a genus-five curve over $\mathbb{F}_{3}$ with at least $33$
$\mathbb{F}_{9}$-rational points.

000Key words— Algebraic curves, Rational points, Curves of genus five,
Hyperelliptic curves, Trigonal curves
2010 Mathematical Subject Classification:  14G05, 14G15, 14H50, 14Q05, 68W30

##  1 Introduction

Throughout this paper, we use curve to mean a non-singular projective variety
of dimension one. Let $p$ be a rational prime, and let $\mathbb{F}_{q}$ denote
the finite field of $q$ elements, where $q$ is a power of $p$. For a curve $C$
of genus $g$ over $\mathbb{F}_{q}$, we denote by $\\#C(K)$ the number of its
$K$-rational points, where $K$ is a finite extension of $\mathbb{F}_{q}$.
Finding a curve $C$ with $\\#C(\mathbb{F}_{q})$ as large as possible (relative
to $g$) is an interesting problem in its own right, and also such a curve is
useful in applications such as coding theory (e.g., [6]). The most well-known
(upper) bound on $\\#C(\mathbb{F}_{q})$ is the Hasse-Weil bound:

$\\#C(\mathbb{F}_{q})\leq q+1+2g\sqrt{q}.$ (1.1)

For further improvements of (1.1) when $g$ is larger with respect to $q$, see
e.g., [7], [14] and [12].

Following Serre’s paper [14], we denote by $N_{q}(g)$ the maximal number of
$\mathbb{F}_{q}$-rational points on a curve $C$ of genus $g$ over
$\mathbb{F}_{q}$, namely,

$N_{q}(g)=\max\\{\\#C(\mathbb{F}_{q}):\mbox{$C$ is a curve of genus $g$ over
$\mathbb{F}_{q}$}\\},$

and then (1.1) implies $N_{q}(g)\leq q+1+2g\sqrt{q}$. Here is a central
problem in the study of algebraic curves over finite fields: For a given
$(q,g)$, determine (or bound) $N_{q}(g)$, and also find a curve of genus $g$
over $\mathbb{F}_{q}$ attaining $N_{q}(g)$, or its known best possible bound.
Indeed, the database of $N_{q}(g)$ has been developed at [4] since 2009, where
the bound(s) or exact values of $N_{q}(g)$ have been updated by a number of
researchers over the last 10 years.

According to [4], the “smallest” case among the unknown cases at this point is
$(q,g)=(9,5)$. The maximal number of the $\mathbb{F}_{9}$-rational points of
the known $\mathbb{F}_{9}$-rational points on curves of genus $5$ over
$\mathbb{F}_{9}$ is $32$. But the theoretical upper-bound of $N_{9}(5)$ is
$35$ [12], i.e, so far we know $32\leq N_{9}(5)\leq 35$.

The purpose of this paper is to contribute to determine $N_{9}(5)$, with a
complete search on the space of curves of genus $5$ over $\mathbb{F}_{3}$. So
far as is known, there are four concrete examples attaining
$\\#C(\mathbb{F}_{9})=32$: The first example was found by van der Geer - van
der Vlugt [3], and other two examples were known, one was found by Fischer
(cf. [4]) and the other was found by Ramos-Ramos in [13]. In [11], Kudo and
Harashita found a new example with enumeration of generic curves $C$ over
$\mathbb{F}_{3}$ of genus $5$ such that $\\#C(\mathbb{F}_{9})=32$, where
“generic curve” means a non-hyperelliptic and non-trigonal curve of genus $5$
with a sextic model in ${\mathbb{P}}^{2}$ with mild singularities, see [11]
for the precise definition. They also proved that there is no generic curve
over $\mathbb{F}_{3}$ with $\\#C(\mathbb{F}_{9})>32$. This paper investigates
remaining cases: The hyperelliptic and trigonal cases. Here are main theorems:

######  Theorem 1.1.

The maximal number of $\\#H(\mathbb{F}_{9})$ of genus-five hyperelliptic
curves $H$ over $\mathbb{F}_{3}$ is $20$. Moreover, there are exactly $573$
$\mathbb{F}_{9}$-isomorphism classes of genus-five hyperelliptic curves $H$
over $\mathbb{F}_{3}$ with $20$ $\mathbb{F}_{9}$-rational points, and there
are exactly $419$ $\mathbb{F}_{9}$-isogeny classes of Jacobian varieties among
them. (We omit to write their Weil polynomials here.) In Example 4.1.5 (1) of
Subsection 4.1, examples of genus-five hyperelliptic curves $H$ over
$\mathbb{F}_{3}$ with $\\#H(\mathbb{F}_{9})=20$ will be given.

######  Theorem 1.2.

The maximal number of $\\#C(\mathbb{F}_{9})$ of genus-five trigonal curves $C$
over $\mathbb{F}_{3}$ is $30$. Moreover, there are exactly eight
$\mathbb{F}_{9}$-isomorphism classes of genus-five trigonal curves $C$ over
$\mathbb{F}_{3}$ with $30$ $\mathbb{F}_{9}$-rational points, whose Weil
polynomials are

$(t+3)^{4}(t^{6}+8t^{5}+44t^{4}+149t^{3}+396t^{2}+648t+729);$ (1.2)
$(t^{2}+5t+9)(t^{8}+15t^{7}+112t^{6}+549t^{5}+1927t^{4}+4941t^{3}+9072t^{2}+10935t+6561);$
(1.3) $\begin{split}&t^{10}+20t^{9}+196t^{8}+1247t^{7}+5714t^{6}+19667t^{5}\\\
&+51426t^{4}+101007t^{3}+142884t^{2}+131220t+59049;\end{split}$ (1.4)
$(t^{2}+2t+9)(t^{4}+9t^{3}+37t^{2}+81t+81)^{2};$ (1.5)
$\begin{split}&t^{10}+20t^{9}+200t^{8}+1299t^{7}+6030t^{6}+20843t^{5}\\\
&+54270t^{4}+105219t^{3}+145800t^{2}+131220t+59049;\end{split}$ (1.6)
$(t+3)^{2}(t^{2}+5t+9)(t^{6}+9t^{5}+49t^{4}+177t^{3}+441t^{2}+729t+729);$
(1.7) $\begin{split}&t^{10}+20t^{9}+194t^{8}+1210t^{7}+5433t^{6}+18539t^{5}\\\
&+48897t^{4}+98010t^{3}+141426t^{2}+131220t+59049;\end{split}$ (1.8)
$(t^{2}+2t+9)(t^{4}+9t^{3}+37t^{2}+81t+81)^{2}.$ (1.9)

In the proof given in Subsection 4.2, examples of genus-five trigonal curves
$C$ over $\mathbb{F}_{3}$ with $\\#C(\mathbb{F}_{9})=30$ will be given.

We find from these theorems together with [11, Theorem 1] that, in order to
find a genus-five curve over $\mathbb{F}_{3}$ attaining
$\\#C(\mathbb{F}_{9})>32$, there is no other way than searching sextic models
(i.e., nonhyperelliptic and nontrigonal) given in [11] with bad singularities.

To prove Theorem 1.1 (resp. Theorem 1.2), we do a complete search over Magma
[1], [2] on the space of hyperelliptic (resp. trigonal) curves of genus $5$
over $\mathbb{F}_{3}$, with the following two ingredients:

  1. (1)

An explicit formula for the number of rational points of hyperelliptic curves
(resp. genus-five trigonal curves) is given in Subsection 2.2 (resp.
Subsection 2.3).

  2. (2)

To make the search terminate in real time, we also reduce the number of
unknown coefficients in defining equations for our curves. A reduction of
defining equations for hyperelliptic curves (resp. genus-five trigonal curves)
is presented in Subsection 3.1 (resp. Subsection 3.2).

The ingredients (1) and (2) for hyperelliptic curves are applicable for
arbitrary genus $g\geq 1$ and arbitrary characteristic $\neq 2$. For genus-
five trigonal curves, (1) holds for arbitrary fields (characteristic not
necessarily equal to $3$), whereas (2) works for every finite extension of
$\mathbb{F}_{3}$. Although the main theorems are argued for small finite
fields ($\mathbb{F}_{3}$ and $\mathbb{F}_{9}$) of characteristic $3$, these
ingredients might also derive fruitful applications for further study on
algebraic curves over (other) fields.

The organization of this paper is as follows. Section 2 collects some results
on counting rational points on a curve of genus $5$ with the classification of
curves of genus $5$. In Section 3 we give a reduction of hyperelliptic curves
and a reduction of quintic models of trigonal curves (in characteristic $3$).
Section 4 is devoted to proving the main theorems (Theorems 1.1 and 1.2).

### Acknowledgments

This work was supported by JSPS Grant-in-Aid for Young Scientists 20K14301 and
JSPS Grant-in-Aid for Scientific Research (C) 21K03159.

##  2 Preliminaries

In this section, we collect some results on counting rational points on a
curve of genus $5$ with the classification of curves of genus $5$.

###  2.1 Curves of genus 5

There are three kinds of curves of genus $5$; hyperelliptic, trigonal and the
other case. The main reference is [5, Chap. IV, Ex. 5.5].

A hyperelliptic curve of genus $g$ over $K$ of characteristic $\neq 2$ is
realized as the desingularization of the projective closure of

$y^{2}=f(x)$

for an $f(x)\in K[x]$ of degree $2g+2$. Even if ${\rm deg}f=2g+1$, we have a
hyperelliptic curve of genus $g$, but such a curve has an extra condition: the
ramified points of the hyperelliptic fibration $C\to{\mathbb{P}}^{1}$ contains
a $K$-rational point.

A trigonal curve $C$ is a curve admitting a morphism
$\pi:C\to{\mathbb{P}}^{1}$ of degree $3$. If the genus of $C$ is $5$, then the
morphism $\pi$ is unique and the linear system
$\omega_{C}\otimes{\mathcal{L}}^{-1}$ defines a morphism
$\rho:C\to{\mathbb{P}}^{2}$, where $\omega_{C}$ is the canonical sheaf and
${\mathcal{L}}=\pi^{*}O_{{\mathbb{P}}^{1}}(1)$. The image of $\rho$ turns out
to be a quintic in ${\mathbb{P}}^{2}$ with single singular point, which is a
$K$-rational point and is a node or a cusp. Thus, any trigonal curve of genus
$5$ is realized as the desingularization of such a quintic in
$\mathbb{P}^{2}$, see [10, Subsection 2.1] for more details.

Finally it is known that any nonhyperelliptic and nontrigonal curve $C$ of
genus $5$ is realized as a complete intersection of three quadrics in
${\mathbb{P}}^{3}$ [5, Chap. IV, Ex. 5.5]. But we need so many indeterminates
to parametrize three quadrics. To overcome the difficulty, in [11] the authors
introduced a sextic model of $\mathbb{P}^{2}$ constructed from $C$ and two
distinct points on $C$, which enables us to parametrize these curves very
efficiently.

###  2.2 Rational points on hyperelliptic curves

The result in this subsection holds for arbitrary genus $g\geq 1$ and
arbitrary characteristic $\neq 2$. We do not require that the genus of $C$ is
of genus $5$.

Consider a hyperelliptic curve $C$. Note that $C$ is the desingularization of
the projective closure of an affine model

$C^{\text{aff}}:\quad cy^{2}=f(x)$

with a monic $f(x)\in K[x]$ of degree $2g+2$ and $c\in K^{\times}$. We are
concerned with the number of rational points on $C$.

######  Lemma 2.2.1.

We have

$\\#C(K)=\begin{cases}\\#C^{\text{\rm aff}}(K)+2&\text{if
}c\in(K^{\times})^{2},\\\ \\#C^{\text{\rm aff}}(K)&\text{if
}c\not\in(K^{\times})^{2}.\end{cases}$

###### Proof.

The projective closure of $C^{\text{aff}}$ is

$cy^{2}z^{2g}=z^{2g+2}f(x/z)=\sum_{i=0}^{2g+2}a_{i}x^{i}z^{2g+2-i}$

with $a_{2g+2}=1$. The desingularization of this around the infinity $(0,1,0)$
is given as follows. Consider the variables $X:=x/y$ and $Z:=z/y$. The
desingularization around $(X,Z)=(0,0)$ of

$cZ^{2g}=\sum_{i=0}^{2g+2}a_{i}X^{i}Z^{2g+2-i}$

is given by the equations

$u^{g}=vw,\quad cw^{2}=\sum_{i=0}^{2g+2}a_{i}u^{2g+2-i}$

with new varibles $u,v,w$. Here the desingularization morphism is given by
$X=v$ and $Z=vu$, whose inverse outside the origin is given by $u=Z/X$, $v=X$
and $w=Z^{g}/X^{g+1}$ . The points on the desingularization over $(X,Z)=(0,0)$
are $(u,v,w)=(0,0,\pm\sqrt{1/c})$. Thus we have the lemma. $\Box$

###  2.3 Rational points on trigonal curves of genus $5$

Let $C$ be a trigonal curve of genus $5$ over $K$. Then $C$ is the
desingularization of a quintic in $\mathbb{P}^{2}$ of the form

$F=q(x,y)z^{3}+\varphi(x,y,z)$

with $q(x,y)$ is a quadratic form in $x,y$ over $K$ and $\varphi(x,y,z)\in
K[x,y,z]$ is of degree 3 and of $z$-degree $\leq 2$. By the classification of
quadratic forms, $q(x,y)$ is isomorphic to $xy$, $x^{2}-\varepsilon y^{2}$
with $\varepsilon\not\in(K^{\times})^{2}$ or $x^{2}$. The singular point in
each case is called a split node, a non-split node and a cusp over $K$.
Looking at the desingularization of the singular point, we have

######  Lemma 2.3.1.

Let $L$ be a finite field containing $K$. Then

$\\#C(L)=\begin{cases}\\#V(F)(L)+1&\text{if the singular point is a split node
over }L,\\\ \\#V(F)(L)-1&\text{if the singular point is a non-split node over
}L,\\\ \\#V(F)(L)&\text{if the singular point is a cusp over }L.\end{cases}$

##  3 Reduction of defining equations

This section gives reductions of defining equations for hyperelliptic curves
and genus-$5$ trigonal curves. The reductions provided in this section can
reduce the dimension of our search space as much as possible.

###  3.1 Reduction for hyperelliptic curves

The result in this subsection holds for arbitrary genus $g\geq 1$ and
arbitrary characteristic $\neq 2$. Let $K$ be a perfect field of odd
characteristic $p>2$. In the below lemma (Lemma 3.1.1), we give a reduction of
a defining equation for a hyperelliptic curve over $K$. Note that the case (1)
was already proved in [9, Lemma 2], and the proof below is the same as that of
[9, Lemma 2]. By a slight modification of the proof of [9, Lemma 2], we also
prove a similar argument for the case (2):

######  Lemma 3.1.1.

Let $\epsilon\in K^{\times}\smallsetminus(K^{\times})^{2}$. Any hyperelliptic
curve $H$ of genus $g$ over $K$ is the desingularization of the homogenization
of the following affine model:

  1. (1)

If $p$ and $2g+2$ are coprime,

$cy^{2}=x^{2g+2}+bx^{2g}+a_{2g-1}x^{2g-1}+\cdots+a_{1}x+a_{0}$ (3.1)

with $b\in\\{0,1,\epsilon\\}$, $c\in\\{1,\epsilon\\}$ and $a_{i}\in K$ for
$0\leq i\leq 2g-1$.

  2. (2)

If $p$ divides $2g+2$,

$cy^{2}=x^{2g+2}+b_{1}x^{2g+1}+b_{2}x^{2g}+a_{2g-1}x^{2g-1}+\cdots+a_{1}x+a_{0}$
(3.2)

with $(b_{1},b_{2})\in\\{(1,0),(0,0),(0,1),(0,\epsilon)\\}$,
$c\in\\{1,\epsilon\\}$ and $a_{i}\in K$ for $0\leq i\leq 2g-1$.

###### Proof.

A hyperelliptic curve $H$ over $K$ is realized as $y^{2}=f(x)$ for a
polynomial $f(x)$ of degree $2g+2$ over $K$. This can be expressed as
$cy^{2}=h_{0}(x)$ for $c\in K^{\times}$ and for a monic polynomial $h_{0}(x)$
of degree $2g+2$ over $K$. Considering the transformation
$(x,y)\mapsto(x,\alpha y)$ for some $\alpha\in K^{\times}$, one may assume
$c=1$ or $\epsilon$. We write
$h_{0}(x)=x^{2g+2}+a_{2g+1}x^{2g+1}+\cdots+a_{0}$ with $a_{i}\in K$ for $0\leq
i\leq 2g+1$. Considering $x\to x+\beta$, we can transform $h_{0}(x)$ to a
polynomial

$\displaystyle h_{1}(x)$ $\displaystyle=$
$\displaystyle\sum_{j=0}^{2g+2}\binom{2g+2}{j}\beta^{j}x^{2g+2-j}+\sum_{i=0}^{2g+1}a_{i}\sum_{j=0}^{i}\binom{i}{j}\beta^{j}x^{i-j}$
$\displaystyle=$ $\displaystyle
x^{2g+2}+\left(\binom{2g+2}{1}\beta+a_{2g+1}\right)x^{2g+1}+\left(\binom{2g+2}{2}{\beta}^{2}+a_{2g+1}\binom{2g+1}{1}\beta+a_{2g}\right)x^{2g}$
$\displaystyle+\;(\mbox{lower terms in $x$}).$

The transformation $(x,y)\mapsto(\gamma x,\gamma^{g+1}y)$ for some $\gamma\in
K^{\times}$ and the multiplication by $\gamma^{-(2g+2)}$ to the whole of
$cy^{2}=h_{1}(x)$, we may assume $H$ is defined by an equation of the form

$\begin{split}cy^{2}&=x^{2g+2}+\left(\binom{2g+2}{1}\beta+a_{2g+1}\right)\gamma^{-1}x^{2g+1}\\\
&\quad+\left(\binom{2g+2}{2}{\beta}^{2}+a_{2g+1}\binom{2g+1}{1}\beta+a_{2g}\right)\gamma^{-2}x^{2g}+\;(\mbox{lower
terms in $x$}).\end{split}$ (3.3)

(1) Assume that $p$ and $2g+2$ are coprime. In this case, we may assume that
the $x^{2g+1}$-coefficient in (3.3) is zero, by putting
$\beta:=-a_{2g+1}/(2g+2)$. For each value of $\beta$, there exists an element
$\gamma\in K^{\times}$ such that the $x^{2g}$-coefficient in (3.3) becomes
either of $0$, $1$ and $\epsilon$.

(2) Assume that $p$ divides $2g+2$. Since $\binom{2g+2}{1}\equiv 0\bmod{p}$
and $\binom{2g+2}{2}\equiv 0\bmod{p}$, we have

$cy^{2}=x^{2g+2}+a_{2g+1}\gamma^{-1}x^{2g+1}+\left(a_{2g+1}\beta+a_{2g}\right)\gamma^{-2}x^{2g}+(\mbox{lower
terms in $x$}).$ (3.4)

If $a_{2g+1}\neq 0$, we may assume that the coefficient of $x^{2g+1}$ (resp.
$x^{2g}$) in (3.4) is $1$ (resp. $0$), by putting $\gamma:=a_{2g+1}$ and
$\beta=-a_{2g}/a_{2g+1}$. Otherwise we may assume that the
$x^{2g}$-coefficient in (3.4) is either of $0$, $1$ and $\epsilon$. $\Box$

###  3.2 Reduction for trigonal curves of genus five in characteristic three

Let $K$ be a finite field of characteristic $p=3$. Throughout this section,
let $q$ be the cardinality of $K$, $\zeta$ a primitive element of
$K^{\times}$, and $\epsilon$ an element of
$K^{\times}\smallsetminus(K^{\times})^{2}$. As quintic models of trigonal
curves of genus $5$ over $K$, we have the following three types (cf. [10,
Subsection 2.1]):

  1. (Split node case) $C^{\prime}=V(F)$ for some $F=xyz^{3}+f$;

  2. (Non-split node case) $C^{\prime}=V(F)$ for some $F=(x^{2}-\epsilon y^{2})z^{3}+f$;

  3. (Cusp case) $C^{\prime}=V(F)$ for some $F=x^{2}z^{3}+f$,

where $f$ is the sum of monomial terms which can not be divided by $z^{3}$.
Note that in the cusp case, the $y^{3}z^{2}$-coefficient of $f$ has to be non-
zero.

In the following, we shall give reduced forms of $F$ in each of the above
three cases. In [10, Section 3] we considered similar reductions but those do
not work for $p=3$.

######  Proposition 3.2.1 (Split node case).

Any genus-five trigonal curve over $K$ of split node type has a quintic model
in $\mathbb{P}^{2}$ of the form

$\begin{split}&xyz^{3}+(a_{1}x^{3}+a_{2}x^{2}y+a_{3}xy^{2}+a_{4}y^{3})z^{2}+(a_{5}x^{4}+a_{6}x^{3}y+a_{7}x^{2}y^{2}+a_{8}xy^{3}+a_{9}y^{4})z\\\
&\quad+a_{10}x^{5}+a_{11}x^{4}y+a_{12}x^{3}y^{2}+a_{13}x^{2}y^{3}+a_{14}xy^{4}+a_{15}y^{5}\end{split}$
(3.5)

for $a_{i}\in K$, where either of the following (1) – (5) hold.

  1. (1)

$a_{1}=1$, $a_{2}\in\\{0,1\\}$ and $a_{5}=a_{6}=0$;

  2. (2)

$a_{1}=0$, $a_{2}=1$, $a_{3}\in\\{0,1\\}$ and $a_{6}=a_{7}=0$;

  3. (3)

$a_{1}=a_{2}=0$, $a_{3}=1$, $a_{4}\in\\{0,1\\}$ and $a_{7}=a_{8}=0$;

  4. (4)

$a_{1}=a_{2}=a_{3}=0$, $a_{4}=1$ and $a_{8}=a_{9}=0$;

  5. (5)

$a_{1}=a_{2}=a_{3}=a_{4}=0$, $a_{6}\in\\{0,1,\zeta\\}$ and
$a_{7}\in\\{0,1\\}$.

###### Proof.

Note that (3.5) is the general form of the quintic in the split node case.
Considering $z\to z+\alpha x+\beta y$, we can transform the quintic (3.5) to a
quintic of the form:

$\begin{split}F&=xyz^{3}+(a_{1}x^{3}+a_{2}x^{2}y+a_{3}xy^{2}+a_{4}y^{3})z^{2}+f_{1}z+f_{0},\end{split}$
(3.6)

where

$\begin{split}f_{1}&=(2\alpha a_{1}+a_{5})x^{4}+(2\beta a_{1}+2\alpha
a_{2}+a_{6})x^{3}y+(2\beta a_{2}+2\alpha a_{3}+a_{7})x^{2}y^{2}\\\
&\quad+(2\beta a_{3}+2\alpha a_{4}+a_{8})xy^{3}+(2\beta
a_{4}+a_{9})y^{4}\end{split}$ (3.7)

and $f_{0}$ is a quintic form in $x$ and $y$.

(1) ($a_{1}\neq 0$) Putting $\alpha:=-a_{5}/(2a_{1})$ and $\beta:=-(2\alpha
a_{2}+a_{6})/(2a_{1})$, we may assume $a_{5}=a_{6}=0$ in (3.5). Considering
$(x,y)\to(\gamma x,\delta y)$ and the multiplication by $(\gamma\delta)^{-1}$,
the coefficients $a_{1}$ and $a_{2}$ are transformed into
$\gamma^{2}\delta^{-1}a_{1}$ and $\gamma a_{2}$ respectively. Putting
$\gamma:=a_{2}^{-1}$ (resp. $\gamma:=1$) if $a_{2}\neq 0$ (resp. $a_{2}=0$)
and $\delta:=\gamma^{2}a_{1}$, we may assume that the coefficients of
$x^{3}z^{2}$ and $x^{2}yz^{2}$ are $1$ and $0,1$ respectively.

(2) ($a_{1}=0$ and $a_{2}\neq 0$) Putting $\alpha:=-a_{6}/(2a_{2})$ and
$\beta:=-(2\alpha a_{3}+a_{7})/(2a_{2})$, we may assume $a_{6}=a_{7}=0$ in
(3.5). Considering $(x,y)\to(\gamma x,\delta y)$ and the multiplication by
$(\gamma\delta)^{-1}$, the coefficients $a_{2}$ and $a_{3}$ are transformed
into $\gamma a_{2}$ and $\delta a_{3}$ respectively. Putting
$\gamma:=a_{2}^{-1}$ and $\delta:=a_{3}^{-1}$ (resp. $\delta:=1$) if
$a_{3}\neq 0$ (resp. $a_{3}=0$), we may assume that the coefficients of
$x^{2}yz^{2}$ and $xy^{2}z^{2}$ are $1$ and $0,1$ respectively.

(3) ($a_{1}=a_{2}=0$ and $a_{3}\neq 0$) Putting $\alpha:=-a_{7}/(2a_{3})$ and
$\beta:=-(2\alpha a_{4}+a_{8})/(2a_{3})$, we may assume $a_{7}=a_{8}=0$ in
(3.5). Considering $(x,y)\to(\gamma x,\delta y)$ and the multiplication by
$(\gamma\delta)^{-1}$, the coefficients $a_{3}$ and $a_{4}$ are transformed
into $\delta a_{3}$ and $\gamma^{-1}\delta^{2}a_{4}$ respectively. Putting
$\delta:=a_{3}^{-1}$ and $\gamma:=\delta^{2}a_{4}$ (resp. $\gamma:=1$) if
$a_{4}\neq 0$ (resp. $a_{4}=0$), we may assume that the coefficients of
$xy^{2}z^{2}$ and $y^{3}z^{2}$ are $1$ and $0,1$ respectively.

(4) ($a_{1}=a_{2}=a_{3}=0$ and $a_{4}\neq 0$) Putting
$\alpha:=-a_{8}/(2a_{4})$ and $\beta:=-a_{9}/(2a_{4})$, we may assume
$a_{8}=a_{9}=0$ in (3.5). Considering $(x,y)\to(\gamma x,\delta y)$ and the
multiplication by $(\gamma\delta)^{-1}$, the coefficient $a_{4}$ is
transformed into $\gamma^{-1}\delta^{2}a_{4}$. Putting $\gamma:=a_{4}$ and
$\delta:=1$, we may assume that the coefficient of $y^{3}z^{2}$ is $1$.

(5) ($a_{1}=a_{2}=a_{3}=a_{4}=0$) Considering $(x,y)\to(\gamma x,\delta y)$
and the multiplication by $(\gamma\delta)^{-1}$, the coefficients $a_{6}$ and
$a_{7}$ are transformed into $\gamma^{2}a_{6}$ and $\gamma\delta a_{7}$
respectively. If $a_{6}=0$, put $\gamma:=1$ and $\delta:=a_{7}^{-1}$ if
$a_{7}\neq 0$. If $a_{6}\neq 0$, write $a_{6}=\zeta^{2i+j}$ for
$i\in\\{0,\ldots,(q-3)/2\\}$ and $j\in\\{0,1\\}$, and put $\gamma:=\zeta^{-i}$
and $\delta:=(\gamma a_{7})^{-1}$ if $a_{7}\neq 0$. $\Box$

######  Proposition 3.2.2 (Non-split node case).

Any genus-five trigonal curve over $K$ of non-split node type has a quintic
model in $\mathbb{P}^{2}$ of the form

  1. (1)

for $a_{i}\in K$,

$\begin{split}F&=(x^{2}-\epsilon y^{2})z^{3}+\left\\{a_{1}x(x^{2}-\epsilon
y^{2})+a_{2}x^{3}+y^{3}\right\\}z^{2}+(a_{3}x^{4}+a_{4}x^{3}y+a_{5}x^{2}y^{2})z\\\
&\quad+a_{6}x^{5}+a_{7}x^{4}y+a_{8}x^{3}y^{2}+a_{9}x^{2}y^{3}+a_{10}xy^{4}+a_{11}y^{5}.\end{split}$
(3.8)

  2. (2)

for $a_{i}\in K$,

$\begin{split}F&=(x^{2}-\epsilon y^{2})z^{3}+\left\\{x(x^{2}-\epsilon
y^{2})+a_{1}x^{3}\right\\}z^{2}+(a_{2}x^{4}+a_{3}x^{3}y+a_{4}y^{4})z\\\
&\quad+a_{5}x^{5}+a_{6}x^{4}y+a_{7}x^{3}y^{2}+a_{8}x^{2}y^{3}+a_{9}xy^{4}+a_{10}y^{5}.\end{split}$
(3.9)

  3. (3)

for $a_{i}\in K$,

$\begin{split}F&=(x^{2}-\epsilon
y^{2})z^{3}+x^{3}z^{2}+(a_{1}x^{2}y^{2}+a_{2}xy^{3}+a_{3}y^{4})z\\\
&\quad+a_{4}x^{5}+a_{5}x^{4}y+a_{6}x^{3}y^{2}+a_{7}x^{2}y^{3}+a_{8}xy^{4}+a_{9}y^{5}.\end{split}$
(3.10)

  4. (4)

for $a_{i}\in K$,

$\begin{split}F&=(x^{2}-\epsilon
y^{2})z^{3}+(a_{1}x^{4}+a_{2}x^{3}y+a_{3}x^{2}y^{2}+a_{4}xy^{3}+a_{5}y^{4})z\\\
&\quad+a_{6}x^{5}+a_{7}x^{4}y+a_{8}x^{3}y^{2}+a_{9}x^{2}y^{3}+a_{10}xy^{4}+a_{11}y^{5},\end{split}$
(3.11)

where $(a_{6},\ldots,a_{11})$ is either of
$(0,\ldots,0,1,a_{i+1},\ldots,a_{11})$ for $i=6,\ldots,11$.

###### Proof.

Let $V$ be the $K$-vector space consisting of cubic forms in $x,y$ over $K$.
As seen in [8, Lemma 4.1.1], the representation $V$ of $\tilde{\rm C}$ defined
by $\gamma x=rx+\epsilon sy$ and $\gamma y=sx+ry$ for

$\gamma=\begin{pmatrix}r&\epsilon s\\\ s&r\end{pmatrix}\in\tilde{\rm C}$

is decomposed as $V_{1}\oplus V_{2}$, where $V_{1}=\langle x(x^{2}-\epsilon
y^{2}),y(x^{2}-\epsilon y^{2})\rangle$ and $V_{2}=\langle x(x^{2}+3\epsilon
y^{2}),y(3x^{2}+\epsilon y^{2})\rangle=\langle x^{3},y^{3}\rangle$. We write

$\begin{split}F&=(x^{2}-\epsilon y^{2})z^{3}+\left\\{c_{1}x(x^{2}-\epsilon
y^{2})+c_{2}y(x^{2}-\epsilon y^{2})+b_{1}x^{3}+b_{2}y^{3}\right\\}z^{2}\\\
&\quad+(a_{1}x^{4}+a_{2}x^{3}y+a_{3}x^{2}y^{2}+a_{4}xy^{3}+a_{5}y^{4})z\\\
&\quad+a_{6}x^{5}+a_{7}x^{4}y+a_{8}x^{3}y^{2}+a_{9}x^{2}y^{3}+a_{10}xy^{4}+a_{11}y^{5}.\end{split}$
(3.12)

An element $\gamma=\begin{pmatrix}r&\epsilon s\\\ s&r\end{pmatrix}$ of
$\tilde{\rm C}$ sends $c_{1}x(x^{2}-\epsilon y^{2})+c_{2}y(x^{2}-\epsilon
y^{2})$ to

$(r^{2}-\epsilon s^{2})((c_{1}r+c_{2}s)x(x^{2}-\epsilon y^{2})+(c_{1}\epsilon
s+c_{2}r)y(x^{2}-\epsilon y^{2})).$

As there exists an $(r,s)\in K^{2}\setminus\\{(0,0)\\}$ so that $c_{1}\epsilon
s+c_{2}r=0$, we may assume that $c_{2}=0$:

$\begin{split}F&=(x^{2}-\epsilon y^{2})z^{3}+\left\\{c_{1}x(x^{2}-\epsilon
y^{2})+b_{1}x^{3}+b_{2}y^{3}\right\\}z^{2}\\\
&\quad+(a_{1}x^{4}+a_{2}x^{3}y+a_{3}x^{2}y^{2}+a_{4}xy^{3}+a_{5}y^{4})z\\\
&\quad+a_{6}x^{5}+a_{7}x^{4}y+a_{8}x^{3}y^{2}+a_{9}x^{2}y^{3}+a_{10}xy^{4}+a_{11}y^{5}.\end{split}$
(3.13)

(1) Assume $b_{2}\neq 0$. We take the coordinate-change
$(x,y,z)\mapsto(x,y,b_{2}z)$ and multiply $F$ by $b_{2}^{-3}$; then we may
assume $b_{2}=1$. Considering the transformation sending $z$ to
$z-(a_{4}/2+c_{1}\epsilon a_{5}/4)x-(a_{5}/2)y$, we may eliminate the terms of
$xy^{3}$ and $y^{4}$ from $F$, i.e., we may assume $(a_{4},a_{5})=(0,0)$:

$\begin{split}F&=(x^{2}-\epsilon y^{2})z^{3}+\left\\{c_{1}x(x^{2}-\epsilon
y^{2})+b_{1}x^{3}+y^{3}\right\\}z^{2}+(a_{1}x^{4}+a_{2}x^{3}y+a_{3}x^{2}y^{2})z\\\
&\quad+a_{6}x^{5}+a_{7}x^{4}y+a_{8}x^{3}y^{2}+a_{9}x^{2}y^{3}+a_{10}xy^{4}+a_{11}y^{5}.\end{split}$
(3.14)

(2) Assume $b_{2}=0$ and $c_{1}\neq 0$. We take the coordinate-change
$(x,y,z)\mapsto(x,y,c_{1}z)$ and multiply $F$ by $c_{1}^{-3}$; then we may
assume $c_{1}=1$. Considering the transformation sending $z$ to
$z-(a_{3}/(-2\epsilon))x-(a_{4}/(-2\epsilon))y$, we may eliminate the terms of
$x^{2}y^{2}$ and $xy^{3}$ from $F$, i.e., we may assume $(a_{3},a_{4})=(0,0)$:

$\begin{split}F&=(x^{2}-\epsilon y^{2})z^{3}+\left\\{x(x^{2}-\epsilon
y^{2})+b_{1}x^{3}\right\\}z^{2}+(a_{1}x^{4}+a_{2}x^{3}y+a_{5}y^{4})z\\\
&\quad+a_{6}x^{5}+a_{7}x^{4}y+a_{8}x^{3}y^{2}+a_{9}x^{2}y^{3}+a_{10}xy^{4}+a_{11}y^{5}.\end{split}$
(3.15)

(3) Assume $b_{2}=0$ and $c_{1}=0$ and $b_{1}\neq 0$. Similarly $F$ is reduced
to

$\begin{split}F&=(x^{2}-\epsilon
y^{2})z^{3}+x^{3}z^{2}+(a_{3}x^{2}y^{2}+a_{4}xy^{3}+a_{5}y^{4})z\\\
&\quad+a_{6}x^{5}+a_{7}x^{4}y+a_{8}x^{3}y^{2}+a_{9}x^{2}y^{3}+a_{10}xy^{4}+a_{11}y^{5}.\end{split}$
(3.16)

$\Box$

######  Proposition 3.2.3 (Cusp case).

Any genus-five trigonal curve over $K$ of cusp type has a quintic model in
$\mathbb{P}^{2}$ of the form

$\begin{split}F&=x^{2}z^{3}+(b_{1}x^{3}+b_{2}x^{2}y+a_{1}xy^{2}+a_{2}y^{3})z^{2}+(a_{3}x^{4}+a_{4}x^{3}y+a_{5}x^{2}y^{2})z\\\
&\quad+a_{6}x^{5}+a_{7}x^{4}y+a_{8}x^{3}y^{2}+a_{9}x^{2}y^{3}+a_{10}xy^{4}+a_{11}y^{5}\end{split}$
(3.17)

for $a_{i}\in K$ with $a_{2}\neq 0$, where $b_{1},b_{2}\in\\{0,1\\}$.

###### Proof.

Recall from the paragraph at the beginning of this section that any trigonal
curve of genus $5$ over $K$ of cusp type has a quintic model in
$\mathbb{P}^{2}$ of the form

$\begin{split}F_{0}&=x^{2}z^{3}+(a_{1}x^{3}+a_{2}x^{2}y+a_{3}xy^{2}+a_{4}y^{3})z^{2}+(a_{5}x^{4}+a_{6}x^{3}y+a_{7}x^{2}y^{2}+a_{8}xy^{3}+a_{9}y^{4})z\\\
&\quad+a_{10}x^{5}+a_{11}x^{4}y+a_{12}x^{3}y^{2}+a_{13}x^{2}y^{3}+a_{14}xy^{4}+a_{15}y^{5},\end{split}$
(3.18)

where $a_{i}\in K$ with $a_{4}\neq 0$. Considering $z\to z+\alpha x+\beta y$,
we can transform the quintic (3.18) to a quintic of the form:

$\begin{split}F&=x^{2}z^{3}+(a_{1}x^{3}+a_{2}x^{2}y+a_{3}xy^{2}+a_{4}y^{3})z^{2}+f_{1}z+f_{0},\end{split}$
(3.19)

where $f_{1}$ is the same as in (3.7), and where $f_{0}$ is a quintic form in
$x$ and $y$. Putting $\beta:=-a_{9}/(2a_{4})$ and $\alpha:=-(2\beta
a_{3}+a_{8})/(2a_{4})$, we may assume $a_{8}=a_{9}=0$ in (3.18). Considering
$(x,y)\to(\gamma x,\delta y)$ and the multiplication by $\gamma^{-2}$, the
coefficients $a_{1}$ and $a_{2}$ are transformed into $\gamma a_{1}$ and
$\delta a_{2}$ respectively. Thus, we may assume that the coefficients of
$x^{3}z^{2}$ and $x^{2}yz^{2}$ are $0$ or $1$. $\Box$

##  4 Main results and their proofs

In this section, we prove the main theorems (Theorems 1.1 and 1.2) with the
help of computer calculations, which were done over the computer algebra
system Magma V2.26-10 [1], [2] on a computer with macOS Monterey 12.0.1, at
2.6 GHz CPU 6 Core (Intel Core i7) and 16GB memory. The source codes and the
log files are summarized at [15].

###  4.1 Hyperelliptic case

#### Proof of Theorem 1.1.

It follows from Lemma 3.1.1 that any hyperelliptic curve $H$ of genus $5$ over
$\mathbb{F}_{3}$ is given by the desingularization of the homogenization of
(3.2) with $g=5$ and $\epsilon:=2\in\mathbb{F}_{3}$. In order to determine the
maximal number of $\mathbb{F}_{9}$-rational points of $H$, we conducted an
exhaustive search on all possible unknown coefficients in (3.2) over Magma.
More precisely, we implemented the following procedure (dividing into two
steps), and executed it for $q=9$:

######  Procedure 4.1.1.

Putting $N:=0$, $\mathcal{H}:=\emptyset$ and
$\mathrm{Isom}(\mathcal{H}):=\emptyset$, proceed with the following steps:

Step 1.

For each of possible $(c,b_{1},b_{2},a_{0},\ldots,a_{9})$:

  1. (1)

Check whether the right hand side of (3.2) (we denote it by $f(x)$ here) is
square free or not, by computing $\mathrm{gcd}(f,f^{\prime})$.

  2. (2)

If $\mathrm{gcd}(f,f^{\prime})=1$, i.e., $f(x)$ is square free, compute the
number $\\#H(\mathbb{F}_{q})$ of $\mathbb{F}_{q}$-rational points of $H$
defined by (3.2), with a formula given in Lemma 2.2.1.

  3. (3)

If $\\#H(\mathbb{F}_{q})>N$, put $N:=\\#H(\mathbb{F}_{q})$ and
$\mathcal{H}:=\\{H\\}$. If $\\#H(\mathbb{F}_{q})=N$, put
$\mathcal{H}:=\mathcal{H}\cup\\{H\\}$.

Write $\mathcal{H}:=\\{H_{1},\ldots,H_{s}\\}$ with $s:=\\#\mathcal{H}$.

Step 2.

For $i$ from $1$ to $s$ by $1$:

  * •

Test whether $H_{i}$ is isomorphic to $H_{j}$ over $\mathbb{F}_{q}$ for some
$j<i$. If $H_{i}$ is not isomorphic to $H_{j}$ for any $j<i$, then put
$\mathrm{Isom}(\mathcal{H}):=\mathrm{Isom}(\mathcal{H})\cup\\{H_{i}\\}$.

Output $N$ and $\mathrm{Isom}(\mathcal{H})$.

The source codes for Steps 1 and 2 and their log files are available at [15],
for example, the code for Step 1 is named hyper_g5q9_step1.txt. Note that Step
2 was done with the output of Step 1. For Step 1 (2), we used Magma’s built-in
function Variety to compute $\\#H^{\text{\rm aff}}(\mathbb{F}_{q})$.
Isomorphism testing in Step 2 was done with an algorithm provided in [9] (see
Remark 4.1.3 below for a brief review). It took about only 50 seconds (resp.
30.6 hours) to execute the code for Step 1 (resp. Step 2).

The output of Step 1 (log_hyper_g5q9_step1.txt) shows that the resulting $N$
is equal to $20$, i.e., the maximal number of $\mathbb{F}_{9}$-rational points
of hyperelliptic curves defined by (3.2) is $20$, and that the resulting
$\mathcal{H}$ consists of $12048$ elements. It follows from the output of Step
2 (log_hyper_g5q9_step2.txt) that $\\#\mathrm{Isom}(\mathcal{H})=573$, namely
the collected $12048$ hyperelliptic curves are divided into $573$
$\mathbb{F}_{9}$-isomorphism classes. We also computed the Weil polynomials of
the $573$ curves by a method described in Remark 4.1.4 below. (At [15], the
source code for computing the Weil polynomials and its log file are named
hyper_g5q9_WeilPoly.txt and log_hyper_g5q9_WeilPoly.txt respectively at [15],
and the time it took to execute the code is about 830 seconds.) $\Box$

We also computed the number of $\mathbb{F}_{3}$-rational points of each
hyperelliptic curve of genus $5$ over $\mathbb{F}_{3}$, and obtain the
following:

######  Proposition 4.1.2.

The maximal number of $\\#H(\mathbb{F}_{3})$ of genus-five hyperelliptic
curves $H$ over $\mathbb{F}_{3}$ is $8$. Moreover, there are exactly $820$
$\mathbb{F}_{3}$-isomorphism classes of genus-five hyperelliptic curves $H$
over $\mathbb{F}_{3}$ with $8$ $\mathbb{F}_{3}$-rational points. In Example
4.1.5 (2) below, examples of genus-five hyperelliptic curves $H$ over
$\mathbb{F}_{3}$ with $\\#H(\mathbb{F}_{3})=8$ will be given.

###### Proof.

Similarly to the proof of Theorem 1.1, we executed Procedure 4.1.1 for $q:=3$
over Magma. All the source codes and the log files for this proof are
available at [15], and it took about only 15 seconds (resp. 4.2 hours) to
execute the code for Step 1 (resp. Step 2). The output of Step 1 shows that
$N=8$ and $\\#\mathcal{H}=8293$, namely, the maximal value of
$\\#H(\mathbb{F}_{3})$ is $8$, and there are $8293$ coefficient sequences
$(c,b_{1},b_{2},a_{0},\ldots,a_{9})$ such that $H$ defined by (3.2) satisfies
$\\#H(\mathbb{F}_{3})=8$. From the output of Step 2, we have
$\\#\mathrm{Isom}(\mathcal{H})=820$, as desired. $\Box$

######  Remark 4.1.3.

In the proofs of Theorem 1.1 and Proposition 4.1.2, we used an algorithm given
in [9, Section 3.3], which tests whether two hyperelliptic curves are
isomorphic or not over any field $k$ containing the defining finite field $K$.
Here we review the algorithms briefly: Let $H_{1}:c_{1}y^{2}=f_{1}(x)$ and
$H_{2}:c_{2}y^{2}=f_{2}(x)$ be hyperelliptic curves of genus $g$ with
$c_{1},c_{2}\in K^{\times}$ and square-free polynomials $f_{1}$ and $f_{2}$ in
$K[x]$ of degree $2g+2$. For each $1\leq i\leq 2$, let $F_{i}$ denote the
homogenization of $c_{i}^{-1}f_{i}$ with respect to an extra variable $z$.
Then we have that $H_{1}\cong H_{2}$ over $k$ if and only if there exist
$h\in\mathrm{GL}_{2}(k)$ and $\lambda\in k^{\times}$ such that $h\cdot
F_{1}=\lambda^{2}F_{2}$, see [9, Lemma 1]. Regarding entries of $h$ and
$\lambda$ as variables, we reduce the (non-)existence of such $h$ and
$\lambda$ into that of a solution over $k$ of a multivariate system. The
existence of a solution is equivalent to that for any monomial order, the
(reduced) Gröbner basis of the ideal defining the system includes $1$ as an
element. Thus, we can decide whether two hyperelliptic curves $H_{1}$ and
$H_{2}$ given as above are isomorphic or not over $k$, by computing the
reduced Gröbner basis for a monomial order.

######  Remark 4.1.4.

As stated at the end of the proof of Theorem 1.1, we computed the Weil
polynomial of each of the $2295$ curves. A computational method which we adopt
is as follows: Let $C$ be a nonsingular curve of genus $g$ over
$\mathbb{F}_{q}$. The Weil polynomial of $C$, say
$W(t)=\prod_{i=0}^{2g}(t-\alpha_{i})=\sum_{i=0}^{2g}a_{i}t^{t}$, is determined
by the numbers $\\#C(\mathbb{F}_{q^{e}})$ for $e=1,2,\ldots,g$. Indeed, the
values $a_{0},a_{1},\ldots,a_{g}$ with
$a_{k}=(-1)^{k}\sum_{i_{1}<t_{2}<\ldots<i_{k}}\alpha_{i_{1}}\alpha_{i_{2}}\cdots\alpha_{i_{k}}$
are determined by Newton’s identities and
$\sum_{i=0}^{2g}\alpha_{i}^{e}=1+q^{e}-\\#C(\mathbb{F}_{q^{e}})$ for
$e=1,2,\ldots,g$. The remaining values $a_{g+1},\cdots,a_{2g}$ are determined
by the formula $a_{2g-i}=q^{g-i}a_{i}$, which follows from the functional
equation of the congruent zeta function. Our computation of Weil polynomials
just used this method.

######  Example 4.1.5.

  1. (1)

The genus-five hyperelliptic curves over $\mathbb{F}_{3}$ defined by

$\displaystyle y^{2}$ $\displaystyle=$ $\displaystyle
x^{12}+x^{11}+2x^{7}+x^{5}+2x+1,$ $\displaystyle y^{2}$ $\displaystyle=$
$\displaystyle x^{12}+x^{11}+2x^{4}+2x^{3}+2$

have $20$ $\mathbb{F}_{9}$-rational points, and their Weil polynomials are

$\displaystyle(t+3)^{2}(t^{2}+9)^{2}(t^{2}+2t+9)^{2},$ $\displaystyle
t^{10}+10t^{9}+51t^{8}+212t^{7}+837t^{6}+2810t^{5}+7533t^{4}+17172t^{3}+37179t^{2}+65610t+59049,$

respectively.

  2. (2)

The genus-five hyperelliptic curves over $\mathbb{F}_{3}$ defined by

$\displaystyle y^{2}$ $\displaystyle=$ $\displaystyle
x^{12}+x^{11}+2x^{2}+2x+1,$ $\displaystyle y^{2}$ $\displaystyle=$
$\displaystyle x^{12}+x^{11}+x^{3}+2x^{2}+x+1$

have $8$ $\mathbb{F}_{3}$-rational points.

###  4.2 Trigonal case

#### Proof of Theorem 1.2.

Recall from Subsection 3.2 that there are three types of quintic models $V(F)$
of trigonal curves of genus $5$ over $\mathbb{F}_{3}$, with explicit forms of
$F$ as follows: (Split node case): (3.5) in Proposition 3.2.1, (Non-Split node
case): (3.8) – (3.11) in Proposition 3.2.2, and (Cusp case): (3.17) in
Proposition 3.2.3. For each form ((3.5), (3.8) – (3.11), or (3.17)) of $F$, we
conducted an exhaustive search on all possible unknown coefficients over
Magma, similarly to the case of hyperelliptic curves (cf. Step 1 of Procedure
4.1.1 in the proof of Theorem 1.1 given in Subsection 4.1). For the
computation of the number of rational points, we used a formula given in Lemma
2.3.1. The source code and its log file are available at [15], and they are
named trigonal_g5q9_step1.txt and log_trigonal_g5q9_step1.txt respectively. It
took about 2.5 hours to execute the code.

We found from the output (log_trigonal_g5q9_step1.txt) that the maximal number
of $\mathbb{F}_{9}$-rational points of the normalization $C$ of such a quintic
$V(F)$ is $30$. In the following, we list quintic forms $F$ such that
$\\#C(\mathbb{F}_{9})=30$:

  * •

The quintic forms $F$ in split node case (of the form (3.5)) such that the
normalization of $V(F)\subset\mathbb{P}^{2}$ has $30$
$\mathbb{F}_{9}$-rational points are the following:

$\displaystyle F_{1}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+xy^{2}+y^{3})z^{2}+xy^{3}z+x^{5}+x^{3}y^{2}+x^{2}y^{3}+y^{5};$
$\displaystyle F_{2}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+2xy^{2}+y^{3})z^{2}+(2x^{2}y^{2}+2xy^{3})z+x^{5}+2x^{4}y+x^{2}y^{3}+2xy^{4}+y^{5};$
$\displaystyle F_{3}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+xy^{2}+2y^{3})z^{2}+(x^{2}y^{2}+xy^{3}+2y^{4})z+x^{5}+x^{3}y^{2}+2x^{2}y^{3}+2xy^{4}+y^{5};$
$\displaystyle F_{4}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+xy^{2}+y^{3})z^{2}+xy^{3}z+x^{5}+x^{3}y^{2}+2x^{2}y^{3}+2y^{5};$
$\displaystyle F_{5}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+xy^{2}+y^{3})z^{2}+(2x^{2}y^{2}+xy^{3}+y^{4})z+x^{5}+x^{3}y^{2}+x^{2}y^{3}+2xy^{4}+2y^{5};$
$\displaystyle F_{6}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+2xy^{2}z^{2}+2y^{3})z^{2}+(x^{2}y^{2}+2xy^{3})z+x^{5}+x^{4}y+2x^{2}y^{3}+2xy^{4}+2y^{5};$
$\displaystyle F_{7}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+y^{3})z^{2}+(2x^{2}y^{2}+2xy^{3})z+x^{5}+2x^{4}y+2x^{2}y^{3}+y^{5};$
$\displaystyle F_{8}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2y^{3})z^{2}+(2x^{2}y^{2}+2y^{4})z+x^{5}+x^{4}y+xy^{4}+y^{5};$
$\displaystyle F_{9}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+y^{3})z^{2}+(2x^{2}y^{2}+2y^{4})z+2x^{5}+x^{3}y^{2}+2x^{2}y^{3}+xy^{4}+2y^{5};$
$\displaystyle F_{10}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+2x^{2}y^{2}z+x^{5}+x^{4}y+2xy^{4}+2y^{5}.$

  * •

The quintic forms $F$ in non-split node case (of the form (3.8) – (3.11)) such
that the normalization of $V(F)\subset\mathbb{P}^{2}$ has $30$
$\mathbb{F}_{9}$-rational points are the following:

$\displaystyle F_{11}$ $\displaystyle=$ $\displaystyle(x^{2}-\epsilon
y^{2})z^{3}+(x(x^{2}-\epsilon
y^{2})+x^{3}+y^{3})z^{2}+x^{2}y^{2}z+2x^{5}+2x^{4}y+x^{3}y^{2}+y^{5};$
$\displaystyle F_{12}$ $\displaystyle=$ $\displaystyle(x^{2}-\epsilon
y^{2})z^{3}+(2x(x^{2}-\epsilon
y^{2})+2x^{3}+y^{3})z^{2}x^{2}y^{2}z+x^{5}+2x^{4}y+2x^{3}y^{2}+y^{5};$
$\displaystyle F_{13}$ $\displaystyle=$ $\displaystyle(x^{2}-\epsilon
y^{2})z^{3}+(2x(x^{2}-\epsilon
y^{2})+x^{3}+y^{3})z^{2}+(x^{4}+x^{3}y)z+x^{5}+2x^{2}y^{3}+y^{5};$
$\displaystyle F_{14}$ $\displaystyle=$ $\displaystyle(x^{2}-\epsilon
y^{2})z^{3}+(x(x^{2}-\epsilon
y^{2})+2x^{3}+y^{3})z^{2}+(x^{4}+2x^{3}y)z+2x^{5}+2x^{2}y^{3}+y^{5};$
$\displaystyle F_{15}$ $\displaystyle=$ $\displaystyle(x^{2}-\epsilon
y^{2})z^{3}+(x(x^{2}-\epsilon
y^{2})+y^{3})z^{2}+(2x^{3}y+2x^{2}y^{2})z+x^{5}+x^{4}y+x^{3}y^{2}+2x^{2}y^{3}+y^{5};$
$\displaystyle F_{16}$ $\displaystyle=$ $\displaystyle(x^{2}-\epsilon
y^{2})z^{3}+(2x(x^{2}-\epsilon
y^{2})+y^{3})z^{2}+(x^{3}y+2x^{2}y^{2})z+2x^{5}+x^{4}y+2x^{3}y^{2}+2x^{2}y^{3}+y^{5};$
$\displaystyle F_{17}$ $\displaystyle=$ $\displaystyle(x^{2}-\epsilon
y^{2})z^{3}+(x(x^{2}-\epsilon y^{2})+2x^{3})z^{2}+(x^{4}+y^{4})z+x^{5},$

where
$\epsilon=2\in\mathbb{F}_{3}^{\times}\smallsetminus(\mathbb{F}_{3}^{\times})^{2}$.

  * •

The quintic forms $F$ in cusp case (of the form (3.17)) such that the
normalization of $V(F)\subset\mathbb{P}^{2}$ has $30$
$\mathbb{F}_{9}$-rational points are the following:

$\displaystyle F_{18}$ $\displaystyle=$ $\displaystyle
x^{2}z^{3}+(x^{2}y+y^{3})z^{2}+(x^{4}+2x^{2}y^{2})z+x^{4}y+y^{5};$
$\displaystyle F_{19}$ $\displaystyle=$ $\displaystyle
x^{2}z^{3}+(x^{2}y+2y^{3})z^{2}+(2x^{4}+2x^{2}y^{2})+2x^{4}y+2y^{5};$
$\displaystyle F_{20}$ $\displaystyle=$ $\displaystyle
x^{2}z^{3}+(x^{2}y+2y^{3})z^{2}+(x^{4}+x^{3}y+2x^{2}y^{2})z+x^{5}+2x^{3}y^{2}+2x^{2}y^{3}+xy^{4}+2y^{5};$
$\displaystyle F_{21}$ $\displaystyle=$ $\displaystyle
x^{2}z^{3}+(x^{2}y+2y^{3})z^{2}+(x^{4}+2x^{3}y+2x^{2}y^{2})z+2x^{5}+x^{3}y^{2}+2x^{2}y^{3}+2xy^{4}+2y^{5};$
$\displaystyle F_{22}$ $\displaystyle=$ $\displaystyle
x^{2}z^{3}+(x^{3}+x^{2}y+y^{3})z^{2}+(2x^{3}y+2x^{2}y^{2})z+x^{5}+2x^{3}y^{2}+x^{2}y^{3}+xy^{4}+y^{5}.$

For the above $22$ curves, we classify their $\mathbb{F}_{9}$-isomorphism
classes, by an algorithm provided in [10] (see Remark 4.2.2 (2) below for a
brief review). We implemented and executed a procedure similar to Step 2 of
Procedure 4.1.1. The text files log_trigonal_g5q9_step2.txt and
log_trigonal_g5q9_step2.txt are the source code of the procedure and its log
file respectively, and it took within a second to execute the code. As a
result, there are eight $\mathbb{F}_{9}$-isomorphism classes among them:
(1) $F_{1}$, $F_{4}$ and $F_{9}$ with Weil polynomial (1.2); (2) $F_{2}$,
$F_{6}$ and $F_{8}$ with Weil polynomial (1.3); (3) $F_{3}$, $F_{5}$ and
$F_{7}$ with Weil polynomial (1.4); (4) $F_{10}$ and $F_{17}$ with Weil
polynomial (1.5); (5) $F_{11}$ and $F_{12}$ with Weil polynomial (1.6); (6)
$F_{13}$ and $F_{14}$ with Weil polynomial (1.7); (7) $F_{15}$ and $F_{16}$
with Weil polynomial (1.8); (8) $F_{18}$, $F_{19}$, $F_{20}$, $F_{21}$ and
$F_{22}$ with Weil polynomial (1.9),

where we computed the Weil polynomials of the $8$ curves by a method described
in Remark 4.1.4. (At [15], the source code for computing the Weil polynomials
and its log file are named trigonal_g5q9_WeilPoly.txt and
log_trigonal_g5q9_WeilPoly.txt respectively at [15], and the time it took to
execute the code is about 40 seconds.)

$\Box$

We also computed the number of $\mathbb{F}_{3}$-rational points of each
trigonal curve of genus $5$ over $\mathbb{F}_{3}$, and obtain the following:

######  Proposition 4.2.1.

The maximal number of $\\#C(\mathbb{F}_{3})$ of genus-five trigonal curves $C$
over $\mathbb{F}_{3}$ is $12$. Moreover, there are exactly $9$
$\mathbb{F}_{3}$-isomorphism classes of genus-five trigonal curves $C$ over
$\mathbb{F}_{3}$ with $12$ $\mathbb{F}_{3}$-rational points.

###### Proof.

Similarly to the proof of Theorem 1.2, we enumerate quintic models $V(F)$
maximizing $\\#C(\mathbb{F}_{3})$. For this, we conducted an exhaustive search
on all possible unknown coefficients over Magma, for each form ((3.5), (3.8) –
(3.11), or (3.17)) of $F$. The source code for collecting $F$ and its log file
are available at [15], and they are named trigonal_g5q3_step1.txt and
log_trigonal_g5q3_step1.txt. It took about 13 hours to execute the code.

We found from the output (log_trigonal_g5q3_step1.txt) that the maximal value
of $\\#C(\mathbb{F}_{3})$ is $12$. In the following, we list quintic forms $F$
such that $\\#C(\mathbb{F}_{3})=12$:

  * •

The quintic forms $F$ in split node case (of the form (3.5)) such that the
normalization of $V(F)\subset\mathbb{P}^{2}$ has $12$
$\mathbb{F}_{3}$-rational points are the following:

$\displaystyle F_{1}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+(2x^{2}y^{2}+2xy^{3}+y^{4})z+2x^{5}+x^{3}y^{2};$
$\displaystyle F_{2}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+(x^{2}y^{2}+2xy^{3}+2y^{4})z+2x^{5}+2x^{4}y+x^{3}y^{2}+x^{2}y^{3}$
$\displaystyle F_{3}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+(2x^{2}y^{2}+2xy^{3}+y^{4})z+2x^{5}+x^{4}y+x^{3}y^{2}+2x^{2}y^{3};$
$\displaystyle F_{4}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+(x^{2}y^{2}+2xy^{3}+2y^{4})z+2x^{5}+x^{4}y+x^{3}y^{2}+2x^{2}y^{3};$
$\displaystyle F_{5}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+(x^{2}y^{2}+2xy^{3}+2y^{4})z+2x^{5}+xy^{4};$
$\displaystyle F_{6}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+(2x^{2}y^{2}+2xy^{3}+y^{4})z+2x^{5}+2x^{4}y+x^{2}y^{3}+xy^{4};$
$\displaystyle F_{7}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+(x^{2}y^{2}+2xy^{3}+2y^{4})z+2x^{5}+2x^{4}y+x^{2}y^{3}+xy^{4};$
$\displaystyle F_{8}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+(2x^{2}y^{2}+2xy^{3}+y^{4})z+2x^{5}+x^{4}y+2x^{2}y^{3}+xy^{4};$
$\displaystyle F_{9}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+(2x^{2}y^{2}+2xy^{3}+y^{4})z+2x^{5}+2x^{3}y^{2}+2xy^{4};$
$\displaystyle F_{10}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+(x^{2}y^{2}+2xy^{3}+2y^{4})z+2x^{5}+2x^{4}y+2x^{3}y^{2}+x^{2}y^{3}+2xy^{4};$
$\displaystyle F_{11}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+2xy^{3}z+2x^{5}+x^{3}y^{2}+2x^{2}y^{3}+y^{5};$
$\displaystyle F_{12}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+2xy^{3}z+2x^{5}+2x^{4}y+xy^{4}+y^{5};$
$\displaystyle F_{13}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+2xy^{3}z+2x^{5}+x^{4}y+x^{2}y^{3}+xy^{4}+y^{5};$
$\displaystyle F_{14}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+2xy^{3}z+2x^{5}+2x^{2}y^{3}+xy^{4}+y^{5};$
$\displaystyle F_{15}$ $\displaystyle=$ $\displaystyle
xyz^{3}+(x^{3}+x^{2}y+2xy^{2}+2y^{3})z^{2}+2xy^{3}z+2x^{5}+x^{4}y+2x^{3}y^{2}+x^{2}y^{3}+2xy^{4}+y^{5}.$

  * •

In non-split node case, there are no $F$ that achieves
$\\#C(\mathbb{F}_{3})=12$.

  * •

The quintic forms $F$ in cusp case (of the form (3.17)) such that the
normalization of $V(F)\subset\mathbb{P}^{2}$ has $12$
$\mathbb{F}_{3}$-rational points are the following:

$\displaystyle F_{16}$ $\displaystyle=$ $\displaystyle
x^{2}z^{3}+(x^{2}y+2y^{3})z^{2}+2x^{4}z+2x^{2}y^{3}+y^{5};$ $\displaystyle
F_{17}$ $\displaystyle=$ $\displaystyle
x^{2}z^{3}+(x^{2}y+2y^{3})z^{2}+2x^{4}z+2x^{4}y+2x^{3}y^{2}+xy^{4}+y^{5};$
$\displaystyle F_{18}$ $\displaystyle=$ $\displaystyle
x^{2}z^{3}+(x^{2}y+2y^{3})z^{2}+2x^{4}z+2x^{4}y+x^{3}y^{2}+2xy^{4}+y^{5}.$

Similarly to the proof of Theorem 1.2, we compute complete representatives of
the $\mathbb{F}_{3}$-isomorphism classes of the above $18$ curves, by a
procedure similar to Step 2 of Procedure 4.1.1. The source code for the
procedure and its log file are available at [15], and they are named
log_trigonal_g5q3_step2.txt and log_trigonal_g5q3_step2.txt respectively. The
time it took to execute the code is about 0.3 seconds. As a result, there are
nine $\mathbb{F}_{3}$-isomorphism classes:
$(1)$ $F_{1}$ and $F_{8}$; $(2)$ $F_{2}$ and $F_{13}$; $(3)$ $F_{3}$; $(4)$
$F_{4}$ and $F_{15}$; $(5)$ $F_{5}$ and $F_{11}$; $(6)$ $F_{6}$ and $F_{9}$;
$(7)$ $F_{7}$ and $F_{14}$; $(8)$ $F_{10}$ and $F_{12}$; $(9)$ $F_{16}$,
$F_{17}$ and $F_{18}$.

$\Box$

######  Remark 4.2.2.

In the proofs of Theorem 1.2 and Proposition 4.2.1, we used an algorithm given
in [10, Section 5.1], which tests whether two trigonal curves of genus $5$ are
isomorphic or not over any field $k$ containing the defining finite field $K$.
Here we review the algorithms briefly: Let $C_{1}$ and $C_{2}$ be trigonal
curves of genus $5$ over $K$, and let $V(F_{1})$ and $V(F_{2})$ be the
associate quintics in $\mathbb{P}^{2}$. Then we have that $C_{1}\cong C_{2}$
over $k$ is equivalent to $V(F_{1})\cong V(F_{2})$ over $k$, i.e., there exist
$M\in\mathrm{GL}_{3}(k)$ and $\lambda\in k^{\times}$ such that $M\cdot
F_{1}=\lambda F_{2}$, see [10, Lemma 2.1.2]. Regarding entries of $M$ and
$\lambda$ as variables, we reduce the (non-)existence of such $M$ and
$\lambda$ into that of a solution over $k$ of a multivariate system. Similarly
to the hyperelliptic case desribed in Remark 4.1.3, the (non-)existence of
such a solution is determined by computing a Gröbner basis, see [10, Section
5.1] for more details.

## References

  * [1] Bosma, W., Cannon, J. and Playoust, C.: The Magma algebra system. I. The user language, Journal of Symbolic Computation 24, 235–265 (1997)
  * [2] Cannon, J., et al.: Magma A Computer Algebra System, School of Mathematics and Statistics, University of Sydney, 2016. http://magma.maths.usyd.edu.au/magma/
  * [3] van der Geer, G. and van der Vlugt, M.: Tables of curves with many points, Math. Comp. 69 (2000), no. 230, 797–810.
  * [4] van der Geer, et al.: Tables of Curves with Many Points, 2009, http://www.manypoints.org, Retrieved at 13th February, 2021.
  * [5] Hartshorne, R.: Algebraic Geometry, GTM 52, Springer-Verlag (1977)
  * [6] Hurt, N. E.: Many Rational Points: Coding Theory and Algebraic Geometry, Kluwer Academic Publishers, Dordrecht (2003).
  * [7] Ihara, Y.: Some remarks on the number of rational points of algebraic curves over finite fields, J. Fac. Sci. Tokyo 28 (1981), 721–724.
  * [8] Kudo, M. and Harashita, S.: Superspecial curves of genus $4$ in small characteristic, Finite Fields and Their Applications 45, 131–169 (2017)
  * [9] Kudo, M. and Harashita, S.: Superspecial Hyperelliptic Curves of Genus $4$ over Small Finite Fields, In: L. Budaghyan, F. Rodriguez-Henriquez (eds), Arithmetic of Finite Fields, WAIFI 2018, Lecture Notes in Computer Science, Vol. 11321, pp. 58–73, Springer, Cham, 2018, (DOI) 10.1007/978-3-030-05153-2_3.
  * [10] Kudo, M. and Harashita, S.: Superspecial trigonal curves of genus $5$. Experimental Mathematics, Published online: 16 Apr 2020. (DOI) 10.1080/10586458.2020.1723745 (preprint ver: arXiv:1804.11277 [math.AG]).
  * [11] Kudo, M. and Harashita, S.: Parametrizing generic curves of genus five and its application to finding curves with many rational points. arXiv:2102.07270.
  * [12] Lauter, K. E.: Geometric methods for improving the upper bounds on the number of rational points on algebraic curves over finite fields, Journal of Algebraic Geometry 10 (2001), no. 1, 19–36.
  * [13] Andrade Ramos, C. and Garzón Ramos, A.: Polynomials with a restricted range and curves with many points. Rev. Acad. Colomb. Cienc. 34 (131): 229–239, 2010.
  * [14] Serre, J.-P: Rational points on curves over finite fields, Lectures given at Harvard University 1985. Notes by Fernando Q. Gouvéa.
  * [15] Computation programs and log files for the paper “Genus-five hyperelliptic or trigonal curves with many rational points in characteristic three”, available on the web page:
https://sites.google.com/view/m-kudo-official-
website/english/code/genus5-many-points

000 E-mail address of the first author<EMAIL_ADDRESS>
E-mail address of the second author<EMAIL_ADDRESS>