\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input divisor.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{License}
<<license>>=
--Copyright The Numerical Algorithms Group Limited 1991.
@
<<*>>=
<<license>>

)cl all
P0 := UP(x, FRAC INT)
P1 := UP(y, FRAC P0)
-- curve given by y^2 = x^8 + 1 (genus = 3)
R := RADFF(FRAC INT, P0, P1, 1 + x^8, 2)
genus()$R
fd := FDIV(FRAC INT, P0, P1, R)
-- let P be the place (x = 0, y = 1),
--     Q be the place (x = 0, y = -1),
-- and d be the divisor P - Q
d1 := divisor(0, 1)$fd
d2 := divisor(0, -1)$fd
d  := d1 - d2
d  := reduce d
-- it turns out that d has order 4:
generator d
generator reduce(2 * d)
generator reduce(3 * d)
generator reduce(4 * d)
-- let's verify the RiemannRoch theorem:
lSpaceBasis d1
lSpaceBasis(2 * d1)
lSpaceBasis(3 * d1)
lSpaceBasis(4 * d1)
lSpaceBasis(5 * d1)
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}
