# Real hyperelliptic curve

In mathematics, there are two types of hyperelliptic curves, a class of algebraic curves: real hyperelliptic curves and imaginary hyperelliptic curves which differ by the number of points at infinity. Hyperelliptic curves exist for every genus $g\geq 1$. The general formula of Hyperelliptic curve over a finite field $K$ is given by $C:y^{2}+h(x)y=f(x)\in K[x,y]$ where $h(x),f(x)\in K$ satisfy certain conditions. In this page, we describe more about real hyperelliptic curves, these are curves having two points at infinity while imaginary hyperelliptic curves have one point at infinity.

## Definition

A real hyperelliptic curve of genus g over K is defined by an equation of the form $C:y^{2}+h(x)y=f(x)$ where $h(x)\in K$ has degree not larger than g+1 while $f(x)\in K$ must have degree 2g+1 or 2g+2. This curve is a non singular curve where no point $(x,y)$ in the algebraic closure of $K$ satisfies the curve equation $y^{2}+h(x)y=f(x)$ and both partial derivative equations: $2y+h(x)=0$ and $h'(x)y=f'(x)$. The set of (finite) $K$–rational points on C is given by $C(K)=\left\{(a,b)\in K^{2}\mid b^{2}+h(a)b=f(a)\right\}\cup S$ where $S$ is the set of points at infinity. For real hyperelliptic curves, there are two points at infinity, $\infty _{1}$ and $\infty _{2}$. For any point $P(a,b)\in C(K)$, the opposite point of $P$ is given by ${\overline {P}}=(a,-b-h)$; it is the other point with x-coordinate a that also lies on the curve.

## Example

Let $C:y^{2}=f(x)$ where $f(x)=x^{6}+3x^{5}-5x^{4}-15x^{3}+4x^{2}+12x=x(x-1)(x-2)(x+1)(x+2)(x+3)$ over $R$. Since $\deg f(x)=2g+2$ and $f(x)$ has degree 6, thus $C$ is a curve of genus g = 2.
The homogeneous version of the curve equation is given by $Y^{2}Z^{4}=X^{6}+3X^{5}Z-5X^{4}Z^{2}-15X^{3}Z^{3}+4X^{2}Z^{4}+12XZ^{5}.$ It has a single point at infinity given by (0:1:0) but this point is singular. The blowup of $C$ has 2 different points at infinity, which we denote $\infty _{1}$ and $\infty _{2}$. Hence this curve is an example of a real hyperelliptic curve.
In general, every curve given by an equation where f has even degree has two points at infinity and is a real hyperelliptic curve while those where f has odd degree have only a single point in the blowup over (0:1:0) and are thus imaginary hyperelliptic curves. In both cases this assumes that the affine part of the curve is non-singular (see the conditions on the derivatives above)

## Arithmetic in a real hyperelliptic curve

In real hyperelliptic curve, addition is no longer defined on points as in elliptic curves but on divisors and the Jacobian. Let $C$ be a hyperelliptic curve of genus g over a finite field K. A divisor $D$ on $C$ is a formal finite sum of points $P$ on $C$. We write $D=\sum _{P\in C}{n_{P}P}$ where $n_{P}\in \mathbb {Z}$ and $n_{p}=0$ for almost all $P$.
The degree of D=∑$_{P∈C}$n$_P$P{\textstyle D=\sum _{P\in C}{n_{P}P}} is defined by $\deg(D)=\sum _{P\in C}{n_{P}}.$ $D$ is said to be defined over $K$ if D$^σ$=∑$_{P∈C}$n$_P$P$^σ$=D{\textstyle D^{\sigma }=\sum _{P\in C}n_{P}P^{\sigma }=D} for all automorphisms σ of ${\overline {K}}$ over $K$. The set $Div(K)$ of divisors of $C$ defined over $K$ forms an additive abelian group under the addition rule $\sum a_{P}P+\sum b_{P}P=\sum {(a_{P}+b_{P})P}.$
The set $Div^{0}(K)$ of all degree zero divisors of $C$ defined over $K$ is a subgroup of $Div(K)$.
We take an example:
Let $D_{1}=6P_{1}+4P_{2}$ and $D_{2}=1P_{1}+5P_{2}$. If we add them then $D_{1}+D_{2}=7P_{1}+9P_{2}$. The degree of $D_{1}$ is $\deg(D_{1})=6+4=10$ and the degree of $D_{2}$ is $\deg(D_{2})=1+5=6$. Then, $\deg(D_{1}+D_{2})=\deg(D_{1})+\deg(D_{2})=16.$
For polynomials $G\in K[C]$, the divisor of $G$ is defined by $\mathrm {div} (G)=\sum _{P\in C}{\mathrm {ord} }_{P}(G)P.$ If the function $G$ has a pole at a point $P$ then $-{\mathrm {ord} }_{P}(G)$ is the order of vanishing of $G$ at $P$. Assume $G,H$ are polynomials in $K[C]$; the divisor of the rational function $F=G/H$ is called a principal divisor and is defined by $\mathrm {div} (F)=\mathrm {div} (G)-\mathrm {div} (H)$. We denote the group of principal divisors by $P(K)$, i.e., $P(K)=\{\mathrm {div} (F)\mid F\in K(C)\}$. The Jacobian of $C$ over $K$ is defined by $J=Div^{0}/P$. The factor group $J$ is also called the divisor class group of $C$. The elements which are defined over $K$ form the group $J(K)$. We denote by ${\overline {D}}\in J(K)$ the class of $D$ in $Div^{0}(K)/P(K)$.
There are two canonical ways of representing divisor classes for real hyperelliptic curves $C$ which have two points infinity $S=\{\infty _{1},\infty _{2}\}$. The first one is to represent a degree zero divisor by ${\bar {D}}$ such that D=∑$_{i=1}$$^r$P$_i$−r∞$_2${\textstyle D=\sum _{i=1}^{r}P_{i}-r\infty _{2}}, where $P_{i}\in C({\bar {\mathbb {F} }}_{q})$,$P_{i}\not =\infty _{2}$, and $P_{i}\not ={\bar {P_{j}}}$ if $i\neq j$ The representative $D$ of ${\bar {D}}$ is then called semi reduced. If $D$ satisfies the additional condition $r\leq g$ then the representative $D$ is called reduced. Notice that $P_{i}=\infty _{1}$ is allowed for some i. It follows that every degree 0 divisor class contain a unique representative ${\bar {D}}$ with $D=D_{x}-\deg(D_{x})\infty _{2}+v_{1}(D)(\infty _{1}-\infty _{2}),$ where $D_{x}$ is divisor that is coprime with both $\infty _{1}$ and $\infty _{2}$, and $0\leq \deg(D_{x})+v_{1}(D)\leq g$.
The other representation is balanced at infinity. Let $D_{\infty }=\infty _{1}+\infty _{2}$, note that this divisor is $K$-rational even if the points $\infty _{1}$ and $\infty _{2}$ are not independently so. Write the representative of the class ${\bar {D}}$ as $D=D_{1}+D_{\infty }$, where $D_{1}$ is called the affine part and does not contain $\infty _{1}$ and $\infty _{2}$, and let $d=\deg(D_{1})$. If $d$ is even then $D_{\infty }={\frac {d}{2}}(\infty _{1}+\infty _{2}).$
If $d$ is odd then $D_{\infty }={\frac {d+1}{2}}\infty _{1}+{\frac {d-1}{2}}\infty _{2}.$ For example, let the affine parts of two divisors be given by
    $D_{1}=6P_{1}+4P_{2}$ and $D_{2}=1P_{1}+5P_{2}$
then the balanced divisors are
    $D_{1}=6P_{1}+4P_{2}-5D_{\infty _{1}}-5D_{\infty _{2}}$ and $D_{2}=1P_{1}+5P_{2}-3D_{\infty _{1}}-3D_{\infty _{2}}$

## Transformation from real hyperelliptic curve to imaginary hyperelliptic curve

Let $C$ be a real quadratic curve over a field $K$. If there exists a ramified prime divisor of degree 1 in $K$ then we are able to perform a birational transformation to an imaginary quadratic curve. A (finite or infinite) point is said to be ramified if it is equal to its own opposite. It means that $P=(a,b)={\overline {P}}=(a,-b-h(a))$, i.e. that $h(a)+2b=0$. If $P$ is ramified then $D=P-\infty _{1}$ is a ramified prime divisor.
The real hyperelliptic curve $C:y^{2}+h(x)y=f(x)$ of genus $g$ with a ramified $K$-rational finite point $P=(a,b)$ is birationally equivalent to an imaginary model $C':y'^{2}+{\bar {h}}(x')y'={\bar {f}}(x')$ of genus $g$, i.e. $\deg({\bar {f}})=2g+1$ and the function fields are equal $K(C)=K(C')$. Here:
| $x'={\frac {1}{x-a}}$ and $y'={\frac {y+b}{(x-a)^{g+1}}}$ | (i) |
In our example $C:y^{2}=f(x)$ where $f(x)=x^{6}+3x^{5}-5x^{4}-15x^{3}+4x^{2}+12x$, h(x) is equal to 0. For any point $P=(a,b)$, $h(a)$ is equal to 0 and so the requirement for P to be ramified becomes $b=0$. Substituting $h(a)$ and $b$, we obtain $f(a)=0$, where $f(a)=a(a-1)(a-2)(a+1)(a+2)(a+3)$, i.e., $a\in \{0,1,2,-1,-2,-3\}$.
From (i), we obtain x=(ax$^′$+1)/x$^′$ {\textstyle x={\frac {ax'+1}{x'}}} and y=y$^′$/(x$^{′g+1}$) {\textstyle y={\frac {y'}{x'^{g+1}}}}. For g = 2, we have y=y$^′$/x$^{′3}$ {\textstyle y={\frac {y'}{x'^{3}}}}.
For example, let $a=1$ then x=(x$^′$+1)/x$^′$ {\textstyle x={\frac {x'+1}{x'}}} and y=y$^′$/x$^{′3}$ {\textstyle y={\frac {y'}{x'^{3}}}}, we obtain $\left({\frac {y'}{x'^{3}}}\right)^{2}={\frac {x'+1}{x'}}\left({\frac {x'+1}{x'}}+1\right)\left({\frac {x'+1}{x'}}+2\right)\left({\frac {x'+1}{x'}}+3\right)\left({\frac {x'+1}{x'}}-1\right)\left({\frac {x'+1}{x'}}-2\right).$
To remove the denominators this expression is multiplied by $x^{6}$, then: $y'^{2}=(x'+1)(2x'+1)(3x'+1)(4x'+1)(1)(1-x')$ giving the curve $C':y'^{2}={\bar {f}}(x')$ where ${\bar {f}}(x')=(x'+1)(2x'+1)(3x'+1)(4x'+1)(1)(1-x')=-24x'^{5}-26x'^{4}+15x'^{3}+25x'^{2}+9x'+1.$
$C'$ is an imaginary quadratic curve since ${\bar {f}}(x')$ has degree $2g+1$.