A new family of rational surfaces in $\PZ^4$
Hans-Christian Graf v. Bothmer
We describe a new method of constructing rational surfaces with given invariants in $\PP^4$ and present a family of degree $11$ rational surfaces of sectional genus $11$ with $2$ six-secants that we found with this method.
ratsurf-arXiv.tex
\documentclass[a4paper,11pt]{amsart}

%\input ../../preambel-eng.tex

%%%%%%%%%%%%%%%%%%%%
%\usepackage[english]{babel}
%\usepackage{german}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{amsbsy}
\usepackage{amsopn}
\usepackage{amsthm}
%\usepackage{amsintx}
\usepackage{amscd}
\usepackage{amsxtra}
\usepackage{amsfonts}
%\usepackage{upref}
%\usepackage{pictexwd}
%\usepackage{xy}
%\usepackage{m-pictex}

%%% gepatchtes m-pictex wird nicht mehr eingebunden

\usepackage{ifthen}
\usepackage{xspace}
\usepackage{fancyheadings}
\usepackage{layout}
\usepackage{hyperref}
\newcommand{\meinehomepage}{\href{http://btm8x5.mat.uni-bayreuth.de/~bothmer/}
                     {http://btm8x5.mat.uni-bayreuth.de/$\tilde{\,\,}$bothmer}
                           }
\newcommand{\preprintserver}[2]{\href{http://xxx.lanl.gov/abs/math/#2}{#1/#2}}
\newcommand{\plainref}[1]{\href{#1}{#1}}

\input xy
\xyoption{matrix}
\xyoption{arrow}
\xyoption{curve}
\newdir{ (}{{}*!/-5pt/@^{(}}
\newcommand{\xycenter}[1]{\begin{center}
                          \mbox{\xymatrix{#1}}
                          \end{center}
                         }

\newboolean{xlabels}
\newcommand{\xlabel}[1]{
                        \label{#1}
                        \ifthenelse{\boolean{xlabels}}
                                   {\marginpar{#1}}
                                   {}
                       }

% Pagedimensions

%\hoffset=-2truecm
%\voffset=-.3truecm
%\textheight = 23truecm
%\textwidth = 15.5truecm
%\topmargin = 0mm
%\oddsidemargin = 2truecm
%\headsep = 1.0truecm
%\pagestyle{fancyplain}

% Stil- und Macrodefinitionen

\sloppy
\unitlength 1cm                 % Masseinheit fuer Zeichnungen, Graphen, etc.
%\bibstyle{plain}
%\bibliographystyle{plain}
\setlength{\parindent}{0pt}
\setlength{\parskip}{5pt plus 2pt}

\newcommand{\CZ}{\mathbb{C}}
\newcommand{\RZ}{\mathbb{R}}
\newcommand{\QZ}{\mathbb{Q}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\NZ}{\mathbb{N}}
\newcommand{\PZ}{\mathbb{P}}
\newcommand{\pz}{\mathbb{P}}
\newcommand{\GZ}{\mathbb{G}}
\newcommand{\FZ}{\mathbb{F}}
\newcommand{\AZ}{\mathbb{A}}
\newcommand{\SZ}{\mathbb{S}}
\newcommand{\TZ}{\mathbb{T}}
\newcommand{\HZ}{\mathbb{H}}
\newcommand{\KZ}{\mathbb{K}}
\newcommand{\Pone}{{\mathbb{P}^1}}
\newcommand{\Ptwo}{{\mathbb{P}^2}}
\newcommand{\Pthree}{{\mathbb{P}^3}}
\newcommand{\Pfour}{{\mathbb{P}^4}}
\newcommand{\Pfive}{{\mathbb{P}^5}}
\newcommand{\Pei}{\mbox{$\mathbb{P}^i$}}
\newcommand{\Pn}{\mbox{$\mathbb{P}^n$}}
\newcommand{\Poneone}{\Pone \times \Pone}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\GG}{\mathbb{G}}
\newcommand{\FF}{\mathbb{F}}
%\newcommand{\AA}{\mathbb{A}}
%\newcommand{\SS}{\mathbb{S}}
\newcommand{\TT}{\mathbb{T}}
\newcommand{\HH}{\mathbb{H}}
\newcommand{\KK}{\mathbb{K}}

\newcommand{\scriptL}{\mbox{${\mathcal L}$}}
\newcommand{\scriptO}{\mbox{${\mathcal O}$}}
\newcommand{\sA}{{\mathcal A}}
\newcommand{\sB}{{\mathcal B}}
\newcommand{\sC}{{\mathcal C}}
\newcommand{\sD}{{\mathcal D}}
\newcommand{\sE}{{\mathcal E}}
\newcommand{\sF}{{\mathcal F}}
\newcommand{\sG}{{\mathcal G}}
\newcommand{\sH}{{\mathcal H}}
\newcommand{\sI}{{\mathcal I}}
\newcommand{\sJ}{{\mathcal J}}
\newcommand{\sK}{{\mathcal K}}
\newcommand{\sL}{{\mathcal L}}
\newcommand{\sM}{{\mathcal M}}
\newcommand{\sN}{{\mathcal N}}
\newcommand{\sO}{{\mathcal O}}
\newcommand{\sP}{{\mathcal P}}
\newcommand{\sQ}{{\mathcal Q}}
\newcommand{\sR}{{\mathcal R}}
\newcommand{\sS}{{\mathcal S}}
\newcommand{\sT}{{\mathcal T}}
\newcommand{\sU}{{\mathcal U}}
\newcommand{\sV}{{\mathcal V}}
\newcommand{\sW}{{\mathcal W}}
\newcommand{\sX}{{\mathcal X}}
\newcommand{\sY}{{\mathcal Y}}
\newcommand{\sZ}{{\mathcal Z}}
\newcommand{\sDiv}{{\mathcal Div}}
\newcommand{\sPic}{{\mathcal Pic}}
\newcommand{\sTor}{{\mathcal Tor}}
\newcommand{\sHom}{{\mathcal Hom}}
\newcommand{\sExt}{{\mathcal Ext}}

\newcommand{\PE}{{\PZ(\sE)}}
\newcommand{\sOPE}{\sO_\PE}

\newcommand{\und}{\quad \quad \text{und} \quad \quad}
\newcommand{\from}{\leftarrow}
\newcommand{\suchthat}{\, | \,}

\newcommand{\name}[1]{{\it #1}\index{#1}}

\newcommand{\N}{\mbox{N($X$)}\ }
\newcommand{\NE}{\mbox{NE($X$)}\ }
\newcommand{\NEC}{\mbox{$\overline{NE(X)}$}\ }

\newboolean{probleme}
%\newcommand{\problem}[1]{\marginpar{#1}}
\newcommand{\problem}[1]
           {\ifthenelse{\boolean{probleme}}
                       {{\bf(PROBLEM: #1)\bf}}
                       {}
           }
\newboolean{zukuenftiges}
%\newcommand{\problem}[1]{\marginpar{#1}}
\newcommand{\zukunft}[1]
           {\ifthenelse{\boolean{zukuenftiges}}
                       {{\bf(AUSBAUM\"OGLICHKEIT: #1)\bf}}
                       {}
           }
\newboolean{extras}
\newcommand{\extra}[1]
           {\ifthenelse{\boolean{extras}}
                       {{\bf EXTRA #1 EXTRA\bf}}
                       {}
           }

\newboolean{ignore}
\newcommand{\ignore}[1]
           {\ifthenelse{\boolean{ignore}}
                       {{\bf IGNORE #1 IGNORE\bf}}
                       {}
           }
%\newcommand{\noproof}{\begin{proof} \problem{not yet} \\*[2cm] \end{proof}}

\newcommand{\zB}{z.\,B.\@\xspace}
\newcommand{\dash}{d.\,h.\@\xspace}
\newcommand{\Dash}{D.\,h.\@\xspace}
\newcommand{\ie}{i.\,e.\@\xspace}
\newcommand{\pg}{p.\@\xspace}
\newcommand{\pp}{pp.\@\xspace}
\newcommand{\bzw}{bzw.\@\xspace}

%\renewenvironment{proof}{{\sc Beweis.}}{${}_{\qedsymbol}$\newline}

\newcommand{\noproof}{\begin{proof} \problem{Beweis fehlt} \end{proof}}

\DeclareMathOperator{\codim}{codim}
\DeclareMathOperator{\coker}{coker}
\DeclareMathOperator{\diff}{diff}
\DeclareMathOperator{\Aut}{Aut}
\DeclareMathOperator{\Gal}{Gal}
\DeclareMathOperator{\Alb}{Alb}
\DeclareMathOperator{\Fix}{Fix}
\DeclareMathOperator{\Ker}{Ker}
\DeclareMathOperator{\Img}{Im}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\discrep}{discrep}
\DeclareMathOperator{\Pic}{Pic}
\DeclareMathOperator{\Jac}{Jac}
\DeclareMathOperator{\Div}{Div}
\DeclareMathOperator{\Hilb}{Hilb}
\DeclareMathOperator{\Sing}{Sing}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\Ext}{Ext}
\DeclareMathOperator{\Tor}{Tor}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\reg}{reg}
\DeclareMathOperator{\genus}{genus}
\DeclareMathOperator{\proj}{proj}
\DeclareMathOperator{\scroll}{Scroll}
\DeclareMathOperator{\pd}{pd}                 % projektive Dimension
\DeclareMathOperator{\depth}{depth}
\DeclareMathOperator{\CMreg}{reg}
%\DeclareMathOperator{\deg}{deg}              % (gibt es schon)
\DeclareMathOperator{\cliff}{cliff}
\DeclareMathOperator{\Syz}{Syz}
\DeclareMathOperator{\Gensyz}{Gensyz}
\DeclareMathOperator{\Sec}{Sec}
\DeclareMathOperator{\spec}{spec}
\DeclareMathOperator{\Span}{span}
\DeclareMathOperator{\Fl}{Fl}                 % Flaggenvariet"at
\DeclareMathOperator{\Id}{Id}
\DeclareMathOperator{\id}{id}
\DeclareMathOperator{\GL}{GL}
\DeclareMathOperator{\gl}{gl}
%\DeclareMathOperator{\LieSL}{sl}
\DeclareMathOperator{\Lie}{Lie}
\DeclareMathOperator{\Flag}{Flag}
\DeclareMathOperator{\spin}{spin}
\DeclareMathOperator{\Spin}{Spin}
\DeclareMathOperator{\SO}{SO}
\DeclareMathOperator{\Gr}{Gr}                 % Grassmansche
\DeclareMathOperator{\pfaff}{pfaff}               
\DeclareMathOperator{\Sym}{Sym}               
\DeclareMathOperator{\cone}{cone}               
\DeclareMathOperator{\ext}{ext}               
%\DeclareMathOperator{\id}{id}
\DeclareMathOperator{\ev}{ev}
\DeclareMathOperator{\projdim}{projdim}
\DeclareMathOperator{\supp}{supp}
\DeclareMathOperator{\spann}{span}
\DeclareMathOperator{\ch}{ch}
%\DeclareMathOperator{\Bin}{Bin}
\DeclareMathOperator{\map}{map}
               


% Young diagrams
%
% Example:
%\[
%\setlength{\arraycolsep}{-0pt}
%\begin{array}{rcc}
%\ybox{1} & \ybox{2} & \blackbox  \\[-1pt]
%\ybox{2} \\[-1pt]
%\ybox{3} \\[-1pt]
%\end{array}
%\]

\newcommand{\youngbox}[2]{\mspace{-0.7mu}\framebox[#1]{\rule{0mm}{1.5ex}$#2$}}
\newcommand{\nobox}{\mspace{-0.7mu}\framebox[5mm]{\rule{0mm}{1.5ex}}}
\newcommand{\xyoungbox}[1]{\mspace{-0.7mu}\framebox{\rule{0mm}{1.5ex}$#1$}}
\newcommand{\blackbox}{\mspace{-0.7mu}\rule[-3.4pt]{5mm}{13.9pt}}
\newcommand{\ybox}[1]{\youngbox{5mm}{#1}}

  
  



% The Theorem environments
% abgeschrieben aus:
% Philip S. Hirschhorn: Getting up and running with AMS-Latex

%\swapnumbers
\theoremstyle{plain}
\begingroup
%\theorembodyfont{\sl}
\newtheorem{bigthm}{Theorem}
\newtheorem{thm}{Theorem}%[subsection]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{lemdefn}[thm]{Lemma and Definition}
\newtheorem{propdefn}[thm]{Proposition and Definition}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{satz}[thm]{Satz}
\newtheorem{verm}[thm]{Vermutung}
\newtheorem{question}[thm]{Question}
\numberwithin{thm}{subsection} 
\endgroup

\renewcommand{\thebigthm}{\Alph{bigthm}}

\newtheorem*{thm*}{Theorem}
\newtheorem*{conj*}{Conjecture}
\newtheorem*{verm*}{Vermutung}


\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition}
\newtheorem{rem}[thm]{Remark}
\newtheorem{example}[thm]{Example}
\newtheorem{exercise}[thm]{Exercise}
\newtheorem{notation}[thm]{Notation}
\newtheorem{terminology}[thm]{Terminology}
\newtheorem{idea}[thm]{Idea}
\newtheorem{property}[thm]{Property}
\newtheorem{vor}[thm]{Vorraussetzung}
\newtheorem{bsp}[thm]{Beispiel}
\newtheorem{bem}[thm]{Bemerkung}
\newtheorem{fig}[thm]{Figure}
\newtheorem{aufgabe}[thm]{Aufgabe}
\newtheorem{script}[thm]{Script}
\numberwithin{equation}{section} 


%
%\renewcommand{\thesection}{\arabic{section}}
%\newcommand{\mysection}[1]{\newpage\vspace*{\bigskipamount}
%                           \section{#1}}
% 
\newcommand{\nosubsections}{\renewcommand{\thethm}{\thesection.\arabic{thm}}
                            \setcounter{thm}{0}
                           } 
\newcommand{\yessubsections}{\renewcommand{\thethm}{\thesubsection.\arabic{thm}}
                            \setcounter{thm}{0}
                            } 
\newcommand{\aufgaben}{\renewcommand{\thethm}{\arabic{thm}}
                            \setcounter{thm}{0}
                            } 
% Kapitel Nummeriereung I,II,II,IV
%\renewcommand{\thechapter}{\Roman{chapter}}
%
% Kopfzeile ohne das Wort ``Kapitel', normale Schrift
%\renewcommand{\chaptermark}[1]{\markboth{\thechapter \, #1}{}}
% Kopfzeile Section ohne Punkt, normale Schrift
%\renewcommand{\sectionmark}[1]{\markright{\thesection \, #1}}
% Kopfzeile wie Hartshorne
%\lhead[\fancyplain{}{\leftmark}]{}
%\rhead[]{\fancyplain{}{\rightmark}}
%\chead{}
%\lfoot[\fancyplain{\thepage}{\thepage}]{}
%\rfoot[]{\fancyplain{\thepage}{\thepage}}
%\cfoot{}
% Keine linie
%\headrulewidth = 0pt

\newcommand{\cref}[3]{(\ref{#1}, #2 \ref{#3})}

% Glossareintrag
\newcommand{\ingloss}[2]{\glossary{#1!#2}}

%\sloppy
%\bibstyle{plain}
%\bibliographystyle{plain}
%\bibliography{/home/bothmer/projekte/bib}

%\author{Hans-Christian Graf v. Bothmer}
\date{\today}
%\email{bothmer@btm8x5.mat.uni-bayreuth.de}
%\address{Hans-Christian Graf v. Bothmer\\ Mathematisches Institut der Universit\"at
%Bayreuth\\ 95440 Bayreuth\\ Germany }


%%%%%%%%%%%%%%%%%%%%

%\usepackage{epsfig}
\usepackage{amssymb,amsmath}
\usepackage{verbatim}
\usepackage{graphicx}
\setboolean{probleme}{true}
%\setboolean{probleme}{false}
%\include{amstex}

% this is to keep robots from extracting the email address
\newcommand{\secemail}{
\setlength{\unitlength}{1pt}
bothmer
\begin{picture}(0,1)
\put(0,0){m}
\put(-5,0){@}
\end{picture}
ath.uni-hannover.de}

%\usepackage{pdfsync}

\begin{document}

\title{A new family of rational surfaces in $\PZ^4$}

\address{Institiut f\"ur Mathematik\\
          Universit\"at Hannover\\
          Welfengarten 1\\
          D-30167 Hannnover
         }

\email{\secemail}

\urladdr{\href{http://www-ifm.math.uni-hannover.de/~bothmer}{http://www-ifm.math.uni-hannover.de/\textasciitilde bothmer}}

\thanks{Supported by the Schwerpunktprogramm ``Global Methods in Complex
        Geometry'' of the Deutsche Forschungs Gemeinschaft.}

\author[v. Bothmer]{Hans-Christian Graf v. Bothmer}
\author[Erdenberger]{Cord Erdenberger}
\author[Ludwig]{Katharina Ludwig}

\begin{abstract}
We describe a new method of constructing rational surfaces with given invariants in $\PP^4$ 
and present a family of degree $11$ rational surfaces of sectional genus $11$ with 
$2$ six-secants that we found with this method.
\end{abstract}

\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\nosubsections

In 1989 Ellingsrud and Peskine showed that the degree of non-general type surfaces in $\PZ^4$
is bounded \cite{EllingsrudPeskine}. Since then their degree bound has been sharpened by various
authors, most recently by Decker and Schreyer \cite{DeckerSchreyer} to $52$. On the other hand
one has tried to construct and classify non-general type surfaces in $\PZ^4$. \cite{DES} lists the $51$ %%@
families of such surfaces known at that time of which $18$ are rational. Since then \cite{smallFields} %%@
has found $4$ more families, $3$ of them parameterizing rational surfaces. Five more families of
non-rational, non-general type surfaces were found by \cite{Aure}, \cite{AboDegree8} and %%@
\cite{AboDegree12}. Recently Abo announced the existence of a family of degree $12$ rational surfaces %%@
in $\PZ^4$. Non-general type surfaces are classified up to degree $10$ (see \cite{DeckerSchreyer} for %%@
an overview and references), the largest known degree of a non-general type surface in $\PZ^4$ is $15$. %%@
Rational surfaces are only known up to degree $12$.

In this paper we describe a new method for finding rational surfaces in $\PZ^4$ and present a new %%@
family of rational degree $11$ surfaces in $\PZ^4$ which we found with this method.

Our method is partly based on an idea of Schreyer \cite{smallFields} who explicitly constructed %%@
surfaces in $\PZ^4$ over small fields using computer algebra programs and provided a method of lifting %%@
these
surfaces to characteristic $0$. There he used the observation that modules with special syzygies are
much more common over small fields than over characteristic $0$ to find those modules by a random %%@
search. Here we use a random search over $\FZ_2$ to find linear systems with special configurations of %%@
basepoints on $\PZ^2$.

We construct one of our new surfaces over $\FZ_2$ in Section \ref{surface}. In Section \ref{lift} we %%@
prove that this surface lies in a family that is also defined in characteristic zero. Finally we  %%@
explain our search-algorithm in Section \ref{search}.

Part of our calculations were done at the Gauss Laboratory at the University of G\"ottingen. We would like to thank Yuri Tschinkel for giving us this opportunity.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{The surface} \label{surface}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\nosubsections

\newcommand{\FFtwo}{{\FZ_2}}
\renewcommand{\FF}[1]{\FZ_{2^{#1}}}

Let us first fix some notation. We work over the fields $\FFtwo$, $\FF{14}$ and $\FF{5}$ which we
realize as
\[
    \FF{14} = \FFtwo[t]/(t^{14}+t^{13}+t^{11}+t^{10}+t^{8}+t^{6}+t^{4}+{t}+1)
\]
and $\FF{5} = \FFtwo[t]/(t^{5}+t^{3}+t^{2}+{t}+1)$.

Over these fields we consider the points
\begin{align*}
    P &= (0 : 0 : 1) \in \PZ^2(\FFtwo)\\
    Q &= (t^{11898}, t^{137}, 1) \in \PZ^2(\FF{14})\\
    R &= (t^6 : t^{15} : 1) \in \PZ^2(\FF{5}).
\end{align*}


\begin{lem} \label{l-orbits}
The orbits of $Q$ and $R$ under the Frobenius-endomorphism are of degree $14$ and $5$
respectively. We denote the corresponding points by $Q_1,\dots,Q_{14}$ and $R_1,\dots,R_5$.
\end{lem}

\begin{proof}
The orbits of $Q$ and $R$ are defined by the kernels of
\[
	\FFtwo[x,y,z] \to \FF{14}[x,y,z]/I_Q
\]
and
\[
	\FFtwo[x,y,z] \to \FF{5}[x,y,z]/I_R
\]
where $I_Q$ and $I_R$ are the ideals of $Q$ and $R$ respectively. Using
Script \ref{script} one can calculate these kernels and check that the degrees of their vanishing sets
are $14$ and $5$.
\end{proof}

\begin{prop} \label{p-rank5}
Let $L$ be the class of a line in $\PZ^2$. Then
\[
       |9L-3P-2Q_1-\dots-2Q_{14}-R_1-\dots-R_5| = \PZ^4
\]
and this linear system has only the assigned base points.
\end{prop}

\begin{proof}
Using Script \ref{script} we intersect the ideal of $3P$, the ideal of the orbit of $2Q$ and
the ideal of the orbit of $R$. We check that the intersection contains exactly $5$ independent $9$-tics whose baselocus is of degree $1\cdot 6 + 14 \cdot 3 + 5 \cdot 1 = 53$.
\end{proof}

\begin{prop} \label{p-smooth}
Let $S$ be the blowup of $\PZ^2$ in $P, Q_1,\dots,Q_{14}, R_1, \dots, R_{5}$ and $E_1,\dots,E_{20}$ be %%@
the corresponding exceptional divisors. Then the
linear system
\[
    \left| 9L - 3E_1 - \sum_{i=2}^{15} 2E_i - \sum_{i=16}^{20} E_i\right|
\]
is very ample and embeds $S \subset \PZ^4$ as a smooth surface of degree $11$ and sectional
genus $11$.
\end{prop}

\begin{proof}
In Script \ref{script} we define a morphism
\[
	\FFtwo[x_0,\dots,x_4] \to \FFtwo[x,y,z]
\]
using the $5$ independent $9$-tics found. The kernel of this map is the ideal of $S \subset \PP^4$.
We then calculate that $S$ has degree $11$, and sectional genus $11$ and finally check smoothness by the Jacobi criterion.
\end{proof}

\begin{prop} \label{p-secants}
$S \subset \PZ^4$ has two $6$-secants. In particular $S$ can not lie in one of the
known families.
\end{prop}

\begin{proof}
Every $6$-secant of $S$ must be contained in all quintics that contain $S$. The final lines of Script \ref{script}
calculate that the vanishing locus $(I_S)_{\le 5}$ contains $S$ and two lines, which turn out to
be $6$-secants. The known families of rational surfaces of degree $11$ and sectional genus $11$
have $0$, $1$ or infinitely many $6$-secants \cite{DES}. 
\end{proof}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Lifting to characteristic zero} \label{lift}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\nosubsections

\newcommand{\Fp}{{\FZ_p}}

In this section we denote schemes defined over $\spec \ZZ$ with a subscript $\ZZ$ and their fibers over
points of $\spec \ZZ$ with subscripts $\Fp$ or $\QZ$.

\begin{prop}[Schreyer \cite{smallFields}] \label{lifting}
Consider a smooth projective variety $X_\ZZ \subset \PZ^N_\ZZ$ over $\spec \ZZ$, a map
\[
    \phi \colon \sF \to \sG
\]
between vector bundles of rank $f$ and $g$ on $X_\ZZ$, the determinantal
subvariety $Y_\ZZ \subset X_\ZZ$ where $\phi$ has rank $k$, and a $\FZ_p$-rational point $y \in Y_\Fp$.

If the tangent space $T_{Y_\Fp,y}$
of $Y_\Fp$ in $y$ is a linear subspace of codimension $(f-k)(g-k)$ in $T_{X_\Fp,y}$ then $y$ lies on an %%@
irreducible component $Z_\ZZ$ of $Y_\ZZ$ that has nonempty fibers over an open subscheme of $\spec %%@
\ZZ$.
\end{prop}

\begin{proof}
Since $Y_\Fp$ is determinantal, the codimension of $Y_\Fp$ in $X_\Fp$ is at most $c = (f-k)(g-k)$. The %%@
condition on the tangent space ensures that $Y_\Fp$ is smooth of this codimension in $y$, or %%@
equivalently $Y_\Fp$ is of dimension $d=\dim X_\Fp-c$ in $y$. Let now $Z_\ZZ$ be a component of $Y_\ZZ$ %%@
that contains $y$. Since $Y_\ZZ$ is determinantal in $X_\ZZ$ each component of $Y_\ZZ$ has also at most %%@
codimension $c$ \cite[Ex 10.9, p. 246]{Ei95}.
Since $\dim X_\ZZ = \dim X_\Fp + 1$ the dimension of $Z_\ZZ$ is at
least $d+1$. $Z_\Fp$ contains $y$ and is therefore of dimension at most $d$. Hence $Z_\ZZ$ can
not be contained in the fiber $Y_\Fp$ and has nonempty fibers over an open subscheme of $\spec \ZZ$.
\end{proof}


\newcommand{\PtwoZZ}{{\PZ^2_\ZZ}}
\newcommand{\sOPtwoZZ}{{\sO_\PtwoZZ}}

On $\PtwoZZ$ we have the map
\[
    \tau_k \colon H^0(\sOPtwoZZ(a)) \to \sOPtwoZZ(a) \oplus
                                3 \sOPtwoZZ(a-1) \oplus
                                \dots \oplus
                                { k+2 \choose 2} \sOPtwoZZ(a-k)
\]
that associates to each polynomial of degree $a$ the coefficients of its taylor expansion up to degree %%@
$k$.

\begin{lem}
If $a > k$ then the image of $\tau_k$ is a vector bundle $\sF_k$ of rank ${k+2 \choose 2}$ over $\spec %%@
\ZZ$.
\end{lem}

\begin{proof}
In each point we consider an affine $2$-dimensional neighborhood where we can choose the
${k+2 \choose 2}$ coefficients of the affine taylor expansion independently. This shows that
the image has at least this rank everywhere. That this is also the maximal rank follows from the Euler %%@
relation.
\end{proof}

\begin{rem}
Notice that the morphism $H^0(\sOPtwoZZ(a)) \to { k+2 \choose 2} \sOPtwoZZ(a-k)$ is not
surjective in characteristics that divide $a$. One really has to consider the whole taylor expansion.
\end{rem}

Set now $X_\ZZ = \Hilb_{1,\ZZ} \times \Hilb_{14,\ZZ} \times \Hilb_{5,\ZZ}$ where $\Hilb_{k,\ZZ}$ %%@
denotes the Hilbert scheme of $k$ points in $\PP^2_\ZZ$ over $\spec \ZZ$, and let
\[
    Y_\ZZ = \{ (p,q,r) \suchthat h^0(9L - 3p - 2q - 1r) \ge 5\} \subset X_\ZZ
\]
be the subset where the linear system of ninetics with triplepoint in $p$, doublepoints in $q$ and
single basepoints in $r$ is at least of projective dimension $4$.

\begin{prop}
There exist vector bundles $\sF$ and $\sG$ of ranks $55$ and $53$ respectively on $X_\ZZ$ and a %%@
morphism
\[
    \phi  \colon \sF \otimes \sO_{X_\ZZ} \to \sG
\]
such that the determinantal locus where $\phi$ has rank $50$ is supported on $Y_\ZZ$.
\end{prop}

\begin{proof}
On the cartesian product
\xycenter{
     \Hilb_{d,\ZZ} \times \PtwoZZ \ar[r]^-{\pi_2} \ar[d]^-{\pi_1} & \PtwoZZ \\
      \Hilb_{d,\ZZ}
            }
we have the morphisms
\[
    \pi_2^*\tau_k \colon H^0(\sOPtwoZZ(9))\otimes \sO_{\Hilb_{d,\ZZ} \times \PtwoZZ} \to \pi_2^* \sF_k.
\]
Let now $P_d \subset  \Hilb_{d,\ZZ} \times \PtwoZZ$ be the universal set of points. Then
$P_d$ is a flat family of degree $d$ over $\Hilb_{d,\ZZ}$ and
\[
    \sG_{k} := (\pi_1)_* ((\pi_2^*\sF_k)|_{P_d})
\]
is a vector bundle of rank $d{ k+2 \choose 2}$ over $\Hilb_{d,\ZZ}$. On
\[
      X_\ZZ = \Hilb_{1,\ZZ} \times \Hilb_{14,\ZZ} \times \Hilb_{5,\ZZ}
\]
the induced map
\[
    \phi \colon H^0(\sOPtwoZZ(9))\otimes \sO_{X_\ZZ} \xrightarrow{\tau_2\oplus\tau_1\oplus\tau_0}
                         \sigma_1^* \sG_{2} \oplus \sigma_{14} ^* \sG_{1}
                         \oplus \sigma_{5}^* \sG_{0}
\]
has the desired properties, where $\sigma_d$ denotes the projection to $\Hilb_{d,\ZZ}$.
\end{proof}

\begin{thm}
There exists a family of smooth rational surfaces in $\PZ^4_\CC$ with $d=11$, $\pi = 11$, $K^2 = -11$
and two $6$-secants.
\end{thm}

\begin{proof}
By determining the infinitesimal deformations of our $20$ points $P,Q_1,\dots,Q_{14},R_1, \dots ,R_5$
in $\PZ^2_\FFtwo$ we can check with a Macaulay calculation that
\[
    y := (P,\{Q_1,\dots,Q_{14}\},\{R_1,\dots,R_5\}) \in Y_\FFtwo \subset X_\FFtwo
\]
satisfies the conditions of Proposition \ref{lifting}. A script performing these calculations can be obtained 
from our webpage \cite{ratsurfweb}. We therefore have a component $Z_\ZZ$ of $Y_\ZZ$
that contains our configuration of basepoints. Since the conditions
\begin{enumerate}
\item the points of $p$, $q$ and $r$ are distinct
\item $h^0(9L-3p-2q-1r)=5$
\item the linear system $|9L-3p-2q-1r|$ has no further basepoints
\item the image of the corresponding rational map $\phi \colon \Ptwo \to \PZ^4$ is a smooth surface $S$
\item $S$ has two $6$-secants
\end{enumerate}
are all open on $Z_\ZZ$ and $y$ is a point on this component that satisfies all conditions, they must %%@
hold on a nonempty open subset of $Z_\ZZ$. Since  $Z_\ZZ$ is irreducible and has nonzero fibers over %%@
the generic point, we obtain smooth surfaces in characteristic zero. The invariants can be calculated %%@
from the multiplicities of the baselocus using the following proposition.
\end{proof}

\begin{prop} \label{p-formulae1}
Let $S = \PZ^2_\CC(p_1,\dots,p_l)$ be the blowup of $\PZ^2_\CC$ in $l$ distinct points. We denote by %%@
$E_1,\dots,E_l$ the corresponding exceptional divisors and by $L$ the pullback of a general line in %%@
$\PP^2_\CC$ to $S$. If
$
    | aL - \sum_{i=1}^l b_i E_i |
$
is a very ample linear system of dimension $4$ for suitable $a$ and $b_i$, then $S \subset \PZ^4_\CC$ %%@
is a rational surface of degree
\[
    d = a^2 - \sum_{i=1}^l b_i^2
\]
and sectional genus
\[
    \pi = { a-1 \choose 2} - \sum_{i=1}^l { b_i \choose 2}.
\]
The self-intersection of the canonical divisor of $S$ is $K^2 = 9-l$.
\end{prop}

\begin{proof}
Set $H = aL - \sum_{i=1}^l b_i E_i$. Then
\[
    d = H^2 = (aL - \sum_{i=1}^l b_i E_i)^2 = a^2 - \sum_{i=1}^l b_i^2
\]
since $L^2=1$, $L\cdot E_i=0$ and $E_i \cdot E_j = -\delta_{ij}$.
The canonical divisor of $S$ is $K = -3L+\sum_{i=1}^l E_i$, so $K^2=9-l$. The sectional genus
of $S$ can be calculated by adjunction:
\begin{align*}
    \pi &= \frac{1}{2}H(K+H) + 1 %\\
         %&= \frac{1}{2}(aL - \sum_{i=1}^l b_i E_i) ((a-3)L - \sum_{i=1}^l (b_i-1) E_i) + 1\\
         %&= \frac{1}{2}a(a-3)+1-\frac{1}{2}\sum_{i=1}^lb_i(b_i-1) \\
         %&
         = { a-1 \choose 2} - \sum_{i=1}^l { b_i \choose 2}.
\end{align*}
\end{proof}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{The search} \label{search}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\nosubsections

In this section we will describe our search-algorithm. We first need to find suitable linear systems %%@
for given invariants. For that we make the following observation which is a direct consequence of %%@
Proposition \ref{p-formulae1}:

\begin{cor}
In the situation of Proposition \ref{p-formulae1} we set $\beta_j = \#\{i \suchthat b_i=j\}$. The %%@
invariants
of $S$ are then linear forms in the $\beta_j$'s:
\begin{align*}
    d     &= a^2 - \sum_j \beta_j j^2\\
    \pi   &=  { a-1 \choose 2} - \sum_{j}\beta_j { j\choose 2}\\
    K^2 &= 9 - \sum_j \beta_j.
\end{align*}
\end{cor}

For given $d$, $\pi$, $K^2$ and $a$  the linear system above has only finitely many integer solutions.
One can find these solutions by integer programming. We have used an algorithm from \cite[Chapter %%@
8]{CLOusingAG}.

\begin{example}
For $d=11$, $\pi=11$, $K^2=-11$ and $a=9$ the only solution is $\beta_3=1$, $\beta_2=14$ and %%@
$\beta_1=5$.
\end{example}

For a given set of $\beta_j$'s we have chosen random points in $\PZ^2$ over $\FF{\beta_j}$, checked
if their orbit under the Frobenius endomorphism had degree $\beta_j$; checked whether the corresponding %%@
linear system
$
    | aL - \sum_{i=1}^l b_i E_i |
$
was $4$-dimensional; calculated the image of the corresponding map to $\PZ^4$ and checked whether
this image was a smooth rational surface. The script we used is available on our web page \cite{ratsurfweb}.

\begin{figure}[b]
\begin{center}
\begin{tabular}{|l|r|r|r|r|r|r|r|}
\hline
Example & $d$ & $\pi$ & speciality & trials & surfaces & rate & log rate \\ \hline
B1.7 & 5 & 2 & 0 & 1000 & 871 & 87,1\% & -0,2\\ \hline
B1.8 & 6 & 3 & 0 & 1000 & 311 & 31,1\% & -1,7\\ \hline
B1.9 & 7 & 4 & 0 & 1000 & 188 & 18,8\% & -2,4\\ \hline
B1.10 & 8 & 5 & 0 & 1000 & 312 & 31,2\% & -1,7\\ \hline
B1.11 & 8 & 6 & 1 & 10000 & 184 & 1,84\% & -5,8\\ \hline
B1.12 & 9 & 6 & 0 & 10000 & 2173 & 21,73\% & -2,2\\ \hline
B1.13 & 9 & 7 & 1 & 100000 & 446 & 0,446\% & -7,8\\ \hline
B1.14 & 10 & 8 & 1 & 1000000 & 0 & 0,0000\% & $-\infty$\\ \hline
B1.15 & 10 & 9 & 2 & 1000000 & 42 & 0,0042\% & -14,5\\ \hline
B1.16 & 10 & 9 & 2 & 1000000 & 267 & 0,0267\% & -11,9\\ \hline
B1.17 & 11 & 11 & 3 & 10000000 & 0 & 0,00000\% & $-\infty$\\ \hline
B1.18 & 11 & 11 & 3 & 10000000 & 5 & 0,00005\% & -20,9\\ \hline
B1.19 & 11 & 11 & 3 & 10000000 & 0 & 0,00000\% & $-\infty$\\ \hline
%B1.18'' & 11 & 11 & 3 & 10000000 & 5 & 0,00005\% & -20,9\\ \hline
New & 11 & 11 & 3 & 2000000 & 21 & 0,00105\% & -16,5\\ \hline
\end{tabular}
\caption{Results of random searches using our script. The numbering of the examples
is as in \cite{DES}.} \xlabel{f-results}
\end{center}
\end{figure}

\begin{figure}
\includegraphics[width=12.5cm, trim=0 0 0 0cm]
                              {trials}
\caption{The difficulty of finding a surface grows exponentially with the speciality.}
\xlabel{f-trials}                              
\end{figure}

For comparison we also tried to reconstruct the rational surfaces of \cite{DES} using the
basepoint multiplicities provided there. Our results are collected in Figure \ref{f-results} and Figure \ref{f-trials}. Notice that the number of trials needed to find an example grows exponentially with the speciality as expected. From this we expect that surfaces of speciality $4$ can be found in approximately $500$ Million trials. Using our program this would take about $500$ weeks on a $2$ GHz machine.


\begin{rem}
Notice that our approach can only find linear systems where the points in each group of constant %%@
multiplicity are in uniform position.
\end{rem}

\begin{rem}
Another way of constructing random groups of points is via syzygies and the Theorem of Hilbert-Birch.
We have also tried this, but found the above approach more effective.
\end{rem}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Appendix}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\nosubsections

Here we provide a script for the computer algebra program Macaulay 2 \cite{M2} that does the calculations needed in Section \ref{surface}. The script
can also be obtained from our webpage \cite{ratsurfweb}.

%for the proofs of Lemma \ref{l-orbits}, Propositions \ref{p-rank5}, Proposition \ref{p-smooth} and %%Proposition \ref{p-secants}:
\begin{script} \quad \xlabel{script}

\begin{small}
\begin{verbatim}
-- construct a surface over F_2 using frobenius orbits

-- define coordinate ring of P^2 over F_2
F2 = GF(2)
S2  = F2[x,y,z]

-- define coordinate ring of P^2 over F_2^14 and F_2^5
St  = F2[x,y,z,t]
use St; I14 = ideal(t^14+t^13+t^11+t^10+t^8+t^6+t^4+t+1); S14 = St/I14
use St; I5 = ideal(t^5+t^3+t^2+t+1); S5 = St/I5

-- the points
use S2; P = matrix{{0_S2, 0_S2, 1_S2}}
use S14;Q = matrix{{t^11898, t^137, 1_S14}}
use S5; R = matrix{{t^6, t^15, 1_S5}}

-- their ideals
IP = ideal ((vars S2)*syz P)
IQ = ideal ((vars S14)_{0..2}*syz Q)
IR = ideal ((vars S5)_{0..2}*syz R)

-- their orbits
f14 = map(S14/IQ,S2); Qorbit = ker f14
degree Qorbit   -- degree = 14

f5 = map(S5/IR,S2); Rorbit = ker f5
degree Rorbit   -- degree = 5

-- ideal of 3P
P3 = IP^3;

-- orbit of 2Q
f14square = map(S14/IQ^2,S2); Q2orbit = ker f14square;

-- ideal of 3P + 2Qorbit + 1Rorbit
I = intersect(P3,Q2orbit,Rorbit);

-- extract 9-tics
H = super basis(9,I)
rank source H   -- affine dimension = 5

-- count basepoints (with multiplicities)
degree ideal H   -- degree = 53

-- construct map to P^4
T = F2[x0,x1,x2,x3,x4]
fH = map(S2,T,H);

-- calculate the ideal of the image
Isurface = ker fH; 

-- check invariants
betti res coker gens Isurface
codim Isurface    -- codim = 2
degree Isurface   -- degree = 11
genera Isurface   -- genera = {0,11,10}

-- check smoothness
J = jacobian Isurface;
mJ = minors(2,J) + Isurface;
codim mJ  -- codim = 5

-- count 6-secants
-- ideal of 1 quartic and 5 quintics
Iquintics = ideal (mingens Isurface)_{0..5}; 

-- calculate the extra components where these vanish
secants = Iquintics : Isurface;
codim secants  -- codim = 3
degree secants  -- degree = 2
secantlist = decompose secants  -- two components

-- check number of intersections
degree (Isurface+secantlist#0)  -- degree = 6
codim (Isurface+secantlist#0)  -- codim = 4
degree (Isurface+secantlist#1)  -- degree = 6
codim (Isurface+secantlist#1)  -- codim = 4
\end{verbatim}
\end{small}
\end{script}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\bibliographystyle{alpha}
%\bibliography{../../bib}

\newcommand{\etalchar}[1]{$^{#1}$}
\def\cprime{$'$}
\begin{thebibliography}{ADH{\etalchar{+}}97}

\bibitem[ADH{\etalchar{+}}97]{Aure}
A.~Aure, W.~Decker, K.~Hulek, S.~Popescu, and K.~Ranestad.
\newblock Syzygies of abelian and bielliptic surfaces in {$\PZ^4$}.
\newblock {\em Int. J. Math.}, 8(7):849--919, 1997.

\bibitem[ADS98]{AboDegree8}
Hirotachi Abo, Wolfram Decker, and Nobuo Sasakura.
\newblock An elliptic conic bundle in {$\bold P\sp 4$} arising from a stable
  rank-{$3$} vector bundle.
\newblock {\em Math. Z.}, 229(4):725--741, 1998.

\bibitem[AR02]{AboDegree12}
Hirotachi Abo and Kristian Ranestad.
\newblock Irregular elliptic surfaces of degree $12$ in the projective
  fourspace.
\newblock \preprintserver{math.AG}{0210317}, 2002.

\bibitem[CLO98]{CLOusingAG}
David Cox, John Little, and Donal O'Shea.
\newblock {\em Using algebraic geometry}, volume 185 of {\em Graduate Texts in
  Mathematics}.
\newblock Springer-Verlag, New York, 1998.

\bibitem[DES93]{DES}
Wolfram Decker, Lawrence Ein, and Frank-Olaf Schreyer.
\newblock Construction of surfaces in {${\bf P}\sb 4$}.
\newblock {\em J. Algebraic Geom.}, 2(2):185--237, 1993.

\bibitem[DS00]{DeckerSchreyer}
Wolfram Decker and Frank-Olaf Schreyer.
\newblock Non-general type surfaces in {${\bf P}\sp 4$}: some remarks on bounds
  and constructions.
\newblock {\em J. Symbolic Comput.}, 29(4-5):545--582, 2000.
\newblock Symbolic computation in algebra, analysis, and geometry (Berkeley,
  CA, 1998).

\bibitem[Eis95]{Ei95}
D.~Eisenbud.
\newblock {\em Commutative Algebra with a View Toward Algebraic Geometry}.
\newblock Graduate Texts in Mathematics 150. Springer, 1995.

\bibitem[EP89]{EllingsrudPeskine}
Geir Ellingsrud and Christian Peskine.
\newblock Sur les surfaces lisses de {${\bf P}\sb 4$}.
\newblock {\em Invent. Math.}, 95(1):1--11, 1989.

\bibitem[GS]{M2}
Daniel~R. Grayson and Michael~E. Stillman.
\newblock Macaulay 2, a software system for research in algebraic geometry.
\newblock Available at
  \href{http://www.math.uiuc.edu/Macaulay2}{http://www.math.uiuc.edu/Macaulay2%
}.

\bibitem[Sch96]{smallFields}
Frank-Olaf Schreyer.
\newblock Small fields in constructive algebraic geometry.
\newblock In {\em Moduli of vector bundles (Sanda, 1994; Kyoto, 1994)}, volume
  179 of {\em Lecture Notes in Pure and Appl. Math.}, pages 221--228. Dekker,
  New York, 1996.

\bibitem[vBEL]{ratsurfweb}
H.C.~Graf v.~Bothmer, C.~Erdenberger, and K.~Ludwig.
\newblock Macaulay 2 scripts for finding rational surfaces in $\pz^4$.
\newblock Available at
  \href{http://www-ifm.math.uni-hannover.de/~bothmer/surface}{http://www-ifm.m%
ath.uni-hannover.de/\~{}bothmer/surface}. See also the LaTeX-file of this
  article at \href{http://arXiv.org}{http://arXiv.org}.

\end{thebibliography}


\end{document}

-- For this article we have used the following Macaulay 2 scripts:

-- lift_to_c.m2
-- 
-- Authors:
-- Hans-Christian Graf v. Bothmer 
-- Cord Erdenberger
-- Katharina Ludwig
--
-- Universitaet Hannover 
-- Institut fuer Mathematik (C) 
-- 30167 Hannover
-- Germany
--
-- 21.04.2004
--
-- http://www-ifm.math.uni-hannover.de/~bothmer/surface
--
-- Script to check whether the surface constructed
-- in our article math.AG/???????? lifts to
-- characteristic zero.

-- For this we calculate the tangentspace to Y \subset X in
-- the point (P,Q,R) as needed in the proof of Theorem 3.5.

-- This is done as follows:
-- Let H be the 5x1 matrix containing the 5 sections
-- (polynomials of degree 9). Let (P,Q,R)+e(P',Q',R') 
-- be an infinitesimal deformation of (P,Q,R).
--
-- (P',Q',R') is a tangent vector to Y if one can find
-- a 5x1 matrix G of degree 9 polynomials satisfying
-- the following conditions:
--
-- (i) condition on simple points r \in R:
--     (H+eG)(r+er') = eG(r) + e(grad H)(r)r' = 0
--
-- (ii) condition on double points q \in Q:
--     (Hx+eGx)(q+eq') = eGx(q) + e(grad Hx)(q)q' = 0
--     (Hy+eGy)(q+eq') = eGy(q) + e(grad Hy)(q)q' = 0
--     (Hz+eGz)(q+eq') = eGz(q) + e(grad Hz)(q)q' = 0
--
-- (iii) condition on the triple point p \in P:
--     (Hx+eGx)(p+ep') = eGx(p) + e(grad Hx)(p)p' = 0
--     (Hy+eGy)(p+ep') = eGy(p) + e(grad Hy)(p)p' = 0
--     (Hz+eGz)(p+ep') = eGz(p) + e(grad Hz)(p)p' = 0
--     (Hxx+eGxx)(p+ep') = eGxx(p) + e(grad Hxx)(p)p' = 0
--     (Hxy+eGxy)(p+ep') = eGxy(p) + e(grad Hxy)(p)p' = 0
--     (Hxz+eGxz)(p+ep') = eGxz(p) + e(grad Hxz)(p)p' = 0
--     (Hyy+eGyy)(p+ep') = eGyy(p) + e(grad Hyy)(p)p' = 0
--     (Hyz+eGyz)(p+ep') = eGyz(p) + e(grad Hyz)(p)p' = 0
--     (Hzz+eGzz)(p+ep') = eGzz(p) + e(grad Hzz)(p)p' = 0
--
-- where Hx,Hy,Hz,Gx,Gy,Gz are the first derivatives
-- of H and G resp. Hxx..Gzz are the divided second
-- derivatives.
-- 
-- This leads to a system of 5x5x1 + 5x14x3 + 5x1x9 = 280
-- linear equations in 5x55+3x20=335 variables (there
-- are 55 monomials of degree 9 and 3 directions
-- for each of the 20 points).
-- 
-- Let M be the matrix corresponding to the 5x55 variables
-- and N the matrix corresponding to the remaining 3x20
-- variables. The number of conditions on the 3x20 variables
-- is then rank(M,N)-rank(M).
--
-- Notice that M has rank 5x50=250 since we have
-- 5 sections vanishing on 3P+2Q+R. Since the expected
-- codimension of Y in X is 15 we are done if 
-- rank(M,N) = 265.

-------------------------------------------------------
-- some auxiliary functions
-------------------------------------------------------

-- make a vector over F_2 from an element in F_2^n
toVector = (aa,n) -> (
     use ring aa;
     substitute(contract(matrix apply(n,i->{t^i}),aa),{t => 0_F2})
     )

-- make a matrix from a list of vectors
concat = (L) -> fold((a,b)->a|b,L)

-- stack matrices on top of each other
makestack = (L) -> fold((a,b)->a||b,L)

-- make a matrix from multiplication with an element in F_2^n
toMatrix = (aa,n) -> (
     use ring aa;
     concat apply(n,i->toVector(aa*t^i,n))
     )

-------------------------------------------------------
-- construction of the 5 sections
-------------------------------------------------------

-- define coordinate ring of P^2 over F2
F2 = GF(2)
S2  = F2[x,y,z]

-- define coordinate ring of P^2 over F_2^14 and F_2^5
St  = F2[x,y,z,t]
use St; I14 = ideal(t^14+t^13+t^11+t^10+t^8+t^6+t^4+t+1); S14 = St/I14
use St; I5 = ideal(t^5+t^3+t^2+t+1); S5 = St/I5

-- the points
use S2; P = matrix{{0_S2, 0_S2, 1_S2}}
use S14;Q = matrix{{t^11898, t^137, 1_S14}}
use S5; R = matrix{{t^6, t^15, 1_S5}}

-- their ideals
IP = ideal ((vars S2)*syz P)
IQ = ideal ((vars S14)_{0..2}*syz Q)
IR = ideal ((vars S5)_{0..2}*syz R)

-- their orbits
f14 = map(S14/IQ,S2); Qorbit = ker f14
degree Qorbit   -- degree = 14

f5 = map(S5/IR,S2); Rorbit = ker f5
degree Rorbit   -- degree = 5

-- ideal of 3P
P3 = IP^3;

-- orbit of 2Q
f14square = map(S14/IQ^2,S2); Q2orbit = ker f14square;

-- ideal of 3P + 2Qorbit + 1Rorbit
I = intersect(P3,Q2orbit,Rorbit);

-- extract 9-tics
H = super basis(9,I)
rank source H   -- affine dimension = 5
degree ideal H   -- degree = 53

-------------------------------------------------------
-- calculating the derivatives
-------------------------------------------------------
 
-- the fields
F2t = F2[t]
f2t = map(F2t,St)
F14 = F2t/f2t(I14)
F5 = F2t/f2t(I5)

-- maps to F_2
f14 = map(F2,F14)
f5 = map(F2,F5)

-- maps from coordinate rings of IP^2 to F_2^n
fS14 = map(F14,S14)
fS5 = map(F5,S5)
fS2 = map(F2,S2)

-- linear system and derivatives over QQ
SQQ = QQ[x,y,z]
fQQ = map(SQQ,S2)
HQQ = fQQ(H)
dHQQ = jacobian HQQ
ddHQQ = diff(matrix{{1/2*x^2},{x*y},{x*z},{1/2*y^2},{y*z},{1/2*z^2}},HQQ)

-- linear system and derivatives over F_2
fSQQ2 = map(S2,SQQ)
H2 = fSQQ2(HQQ)
dH2 = fSQQ2(dHQQ)
ddH2 = fSQQ2(ddHQQ)

-- linear system and derivatives over F_2^14
fS214 = map(S14,S2)
H14 = fS214(H2)
dH14 = fS214(dH2)
ddH14 = fS214(ddH2)

-- linear system and derivatives over F_2^5
fS25 = map(S5,S2)
H5 = fS25(H2)
dH5 = fS25(dH2)
ddH5 = fS25(ddH2)

-------------------------------------------------------
-- condition (ii)
-------------------------------------------------------

-------------------------------------------------------
-- constructing M
-------------------------------------------------------

-- substitute points
use F2;  fp2 = map(F2,S2,fS2(P))
use F14; fp14 = map(F14,S14,fS14(Q)|matrix{{t}})
use F5;  fp5  = map(F5 ,S5 ,fS5 (R)|matrix{{t}})

-- test if all points are double basepoints of H
fp14(H14)||fp14(dH14)||fp14(ddH14)
-- first 4 lines are zero	    

-- look at deformations of 9-tics
use S14
G = gens (ideal (x,y,z))^9
Gx = diff(matrix{{x}},G)
Gy = diff(matrix{{y}},G)
Gz = diff(matrix{{z}},G)

-- test whether the Euler relation holds
syz transpose (G||Gx||Gy||Gz)

-- evaluate the deformations at the double points
G14 = fp14(G);
Gx14 = fp14(Gx);
Gy14 = fp14(Gy);
Gz14 = fp14(Gz);

-- lift to F_2
M14 = concat apply(rank source G,i -> 
     toVector(G14_i_0,14)
     )
Mx14 =  concat apply(rank source G,i -> 
     toVector(Gx14_i_0,14)
     )
My14 =  concat apply(rank source G,i -> 
     toVector(Gy14_i_0,14)
     )
Mz14 =  concat apply(rank source G,i -> 
     toVector(Gz14_i_0,14)
     )

-- test if the ranks are OK
rank M14      -- 14
rank Mx14     -- 14
rank My14     -- 14
rank Mz14     -- 14
rank (M14||Mx14||My14||Mz14)
-- 42

-------------------------------------------------------
-- constructing N
-------------------------------------------------------

-- evaluate gradients at the double point
-- and calculate the corresponding multiplication matrices
use S14
N14 = apply(rank source dH14, r -> (
	  dH14r = dH14_{r};
	  Jr = fp14(diff(matrix{{x,y,z}},dH14r));
	  makestack apply(3,i-> concat apply(3,j -> toMatrix(Jr_i_j,14)))
	  ));

-------------------------------------------------------
-- condition (iii)
-------------------------------------------------------

-------------------------------------------------------
-- constructing M
-------------------------------------------------------

-- calculate derived derivatives
use SQQ
G = gens (ideal (x,y,z))^9
dG = fSQQ2(jacobian G)
ddGQQ = diff(matrix{{1/2*x^2},{x*y},{x*z},{1/2*y^2},{y*z},{1/2*z^2}},G)
ddG = fSQQ2(ddGQQ)

-- evaluate deformations in triplepoint
Mtriple = fp2(dG||ddG)
-- all lines are zero

rank (Mtriple)
-- 6

-------------------------------------------------------
-- constructing N
-------------------------------------------------------

-- evaluate gradients at the first point
-- and calculate the corresponding multiplication matrices
-- first derivatives
use S2
Ntriple3 = apply(rank source dH2, r -> (
	  dH2r = dH2_{r};
	  fp2(diff(matrix{{x,y,z}},dH2r))
	  ));

-- second derivatives
Ntriple6 = apply(rank source ddH2, r -> (
	  ddH2r = ddH2_{r};
	  fp2(diff(matrix{{x,y,z}},ddH2r))
	  ));

-------------------------------------------------------
-- condition (i)
-------------------------------------------------------

-------------------------------------------------------
-- constructing M
-------------------------------------------------------

-- test if all simple points are basepoints of H
fp5(H5)||fp5(dH5)||fp5(ddH5)
-- first line is zero	    

-- look at deformations of 9-tics
use S5
G = gens (ideal (x,y,z))^9
Gx = diff(matrix{{x}},G)
Gy = diff(matrix{{y}},G)
Gz = diff(matrix{{z}},G)

-- test whether the Euler relation holds
syz transpose (G||Gx||Gy||Gz)

-- evaluate the deformations at the simple points
G5 = fp5(G);

-- lift to F_2
M5 = concat apply(rank source G,i -> 
     toVector(G5_i_0,5)
     )

-- test if the ranks are OK
rank M5
-- 5

-------------------------------------------------------
-- constructing N
-------------------------------------------------------

-- evaluate gradients at the simple points
-- and calculate the corresponding multiplication matrices
use S5
N5 = apply(rank source H5, r -> (
	  H5r = H5_{r};
	  Jr = fp5(diff(matrix{{x,y,z}},H5r));
	  concat apply(3,j -> toMatrix(Jr_j_0,5))
	  ));

-------------------------------------------------------
-- putting it all together
-------------------------------------------------------

Nall = makestack apply(rank source H2, r -> (
	  N5#r++N14#r++(Ntriple3#r||Ntriple6#r)
	  ));

Mone = M5||Mx14||My14||Mz14||Mtriple;
Mall = Mone++Mone++Mone++Mone++Mone;

rank Mone
-- 50
rank Mall
-- 250
rank (Mall|Nall)
-- 265


-- findlin.m2
-- 
-- Authors:
-- Hans-Christian Graf v. Bothmer 
-- Cord Erdenberger
-- Katharina Ludwig
--
-- Universitaet Hannover 
-- Institut fuer Mathematik (C) 
-- 30167 Hannover
-- Germany
--
-- 23.03.2004
--
-- http://www-ifm.math.uni-hannover.de/~bothmer/surface

-- Algorithm to find possible linear systems on P^2 for
-- given invariants 
--
-- d = degree of resulting surface S in P^4
-- p = sectional genus of S
-- K = self-intersection of a canonical divisor on S
-- a = degree of divisors on P^2
--
-- The linear systems we are looking consist of plane curves
-- of degree  a  with 
-- b_1 simple points, b_2 double points, ..., b_j j-uple points, ... 
--
-- For this we have to solve the following system of linear 
-- equations
--
-- 1*b_1 + ... +       j^2*b_j + ... = a^2 - d
-- 0*b_1 + ... + j*(j-1)/2*b_j + ... = (a-1)*(a-2)/2 - p
-- 1*b_1 + ... +         1*b_j + ... = 9 - K
--
-- with b_j non-negative integers.
--
-- To make this system finite, we set b_j=0 for j>9. This means
-- that our program does not find solutions which involve 10-fold or
-- higher points.
--
-- We use the integer programing algorithm of 
--     [CLO] Cox, Little, O'Shea "Using algebraic Geometry", Chapter 8
-- simplified to our situation (no inequalities, no optimisation)
--
-- The program returns a list of linear systems in the form
-- {(a,{(b_j_1,j_1),(b_j_2,j_2),...,(b_j_k,j_k)}),...}  
-- e.g.
-- linSysList(10,11,11,-11) returns
-- {(10, {(1, 5), (15, 2), (4, 1)}), 
--  (10, {(2, 4), (13, 2), (5, 1)}), 
--  (10, {(1, 4), (3, 3), (10, 2), (6, 1)}), 
--  (10, {(6, 3), (7, 2), (7, 1)})}
-- The first entry means that a very ample linear system of five 
-- plane 10-tics with 1 5-fold point 15 double-points and 4 simple points
-- will embed a blowup of P^2 as a rational surface of degree 11
-- sectional genus 11 and K^2=-11 in P^4.


-----------------------------------------------------------------------------------------------------------------------------
-- main program
-----------------------------------------------------------------------------------------------------------------------------
 
-- coordinate ring of  A^3 x A^9 with elimination order,
-- that eliminates the first 3 variables
R = QQ[z_1,z_2,z_3,w_9,w_8,w_7,w_6,w_5,w_4,w_3,w_2,w_1, MonomialOrder => Eliminate 3, MonomialSize => 16]

-- ideal of the graph of the function \varphi of
-- Proposition 1.6 in [CLO]
I = ideal(w_1 -z_1^1  *z_2^0 *z_3^1,
          w_2 -z_1^4  *z_2^1 *z_3^1,
          w_3 -z_1^9  *z_2^3 *z_3^1,
          w_4 -z_1^16 *z_2^6 *z_3^1,
          w_5 -z_1^25 *z_2^10*z_3^1,
          w_6 -z_1^36 *z_2^15*z_3^1,
          w_7 -z_1^49 *z_2^21*z_3^1,
          w_8 -z_1^64 *z_2^28*z_3^1,
          w_9 -z_1^81 *z_2^36*z_3^1);

-- coordinate ring of the graph of the function \varphi of
-- Proposition 1.6 in [CLO]
RI = R/I

-- coordinate ring of A^9
S  = QQ[w_1..w_9,MonomialSize => 16] 

-- the canonical map from R to S
fS = map(S,R)

-- eliminate the z_i's by hand
L  = apply((entries gens gb(I))#0, 
            g -> if (fS(leadTerm(g)) != 0_S) then fS(g) else 0_S);


-- the coordinate ring of the projection of the graph to A^9
SI   = S /(ideal L)
fSI  = map(SI,RI)
fSSI = map(S,SI)

-- calculate the right hand side of the above linear equations  
exponenten = (a,d,p,K) -> {(a^2 - d),(floor((a - 1)*(a - 2) / 2) - p),(9 - K)}

-- make a monomial for the right hand side
monomial   = (a,d,p,K) -> (e := exponenten(a,d,p,K);
			   z_1^(e_0)*z_2^(e_1)*z_3^(e_2)
			   )

-- use groebner bases to find a minimal feasible integer solution
expMin     = (a,d,p,K) -> (exponents((fSSI(fSI(monomial(a,d,p,K))))))#0

-- All relations in the ideal L are binomial. Make a list of
-- the pairs of exponents in the form
-- { exponents of lead term, exponents of other term }
Pairs = apply((entries gens gb(ideal L))#0,
              g -> ((exponents leadTerm g)#0,(exponents(g-leadTerm(g)))#0));

-- recursively find all feasible solutions starting from a
-- minimal one. For this we replace the exponents of the non leading
-- term by the leading one whenever possible. For this we use the
-- list of pairs.
unreduce = (expNow,li) -> (
     if ((sum apply(li,l -> if (l == expNow) then 1 else 0)) == 0) then (
	  L := append(li,expNow);
	  for i from 0 to #Pairs-1 do (
	       if min(expNow - Pairs#i#1) >= 0 then ( 
		    L = unreduce(expNow-Pairs#i#1+Pairs#i#0,L);
		    );
	       );
	  L
	  )
     else
     (	
	  li
	  )
     )		       

-- change list of solutions to list of pairs in
-- the form (number of points, exponent)
toPairs = (L) -> (
     	  outli := {};
     	  for i from 0 to #L-1 do (
	       if L#(#L-1-i) != 0 then (
		    outli = append(outli,(L#(#L-1-i),#L-i));
		    );
	       );
	  outli
	  )
     
-- find linear systems with given invariants
linSysList = (a,d,p,K) -> apply(unreduce(expMin(a,d,p,K),{}),l->(a,toPairs(l)))

linSysList( 9,11,11,-11)
linSysList(10,11,11,-11)
linSysList(11,11,11,-11)
linSysList(12,11,11,-11)
linSysList(13,11,11,-11)
linSysList(13,12,12,- 7)
linSysList(14,12,12,- 7)
linSysList(15,12,12,- 7)
linSysList(16,12,12,- 7)
linSysList(17,12,12,- 7)

-----------------------------------------------------------------------------------------------------------------------------
-- save linear systems in Macaulay-files
-----------------------------------------------------------------------------------------------------------------------------

-- save linear systems in a list in a Macaulay file 
savelinSys = (a,d,p,K) -> (
     filename := "A"|a|"D"|d|"P"|p;
     file := filename|".m2";
     f := file << "-- " << filename << endl;
     f << "B = " << linSysList(a,d,p,K) << ";" << endl << close;
     )

savelinSys( 9,11,11,-11); -- save in file  A9D11P11.m2
savelinSys(10,11,11,-11); -- save in file A10D11P11.m2
savelinSys(11,11,11,-11); -- save in file A11D11P11.m2
savelinSys(12,11,11,-11); -- save in file A12D11P11.m2
savelinSys(13,11,11,-11); -- save in file A13D11P11.m2
savelinSys(13,12,12,- 7); -- save in file A13D12P12.m2
savelinSys(14,12,12,- 7); -- save in file A14D12P12.m2
savelinSys(15,12,12,- 7); -- save in file A15D12P12.m2
savelinSys(16,12,12,- 7); -- save in file A16D12P12.m2
savelinSys(17,12,12,- 7); -- save in file A17D12P12.m2


-- search.m2
--
-- Authors:
-- Hans-Christian Graf v. Bothmer 
-- Cord Erdenberger
-- Katharina Ludwig
--
-- Universitaet Hannover 
-- Institut fuer Mathematik (C) 
-- 30167 Hannover
-- Germany
--
-- 27.04.2004
--
-- http://www-ifm.math.uni-hannover.de/~bothmer/surface
----
-- this Macaulay script contains a function searchSurface which
-- searches randomly for smooth rational surfaces in P^4 over F_2
-- corresponding to a certain linear system.
-- Additionally it contains a function autoSearchSurface which
-- can be used to perform this search using shell scripts.
----

-- define coordinate ring of P^2 over F_2
F  = GF(2);
St = F[x,y,z,t];

-- a list of length 17 with 0th entry GF(2) 
-- and i-th entry quotient of ring GF(2)[x,y,z,t] by
-- an ideal of an irreducible polynomial of degree i
-- thus giving us the coordinate ring of P^2 
-- over F_2^i.
ringList = {F,
            F[x,y,z],
	    St/ideal(t^2+t+1),
	    St/ideal(t^3+t^2+1),
            St/ideal(t^4+t+1),
	    St/ideal(t^5+t^3+t^2+t+1),
	    St/ideal(t^6+t^5+t^4+t+1),
	    St/ideal(t^7+t^4+t^3+t^2+1),
	    St/ideal(t^8+t^7+t^6+t^5+t^2+t+1),
	    St/ideal(t^9+t^7+t^4+t^2+1),
	    St/ideal(t^10+t^6+t^5+t^3+t^2+t+1),
	    St/ideal(t^11+t^10+t^9+t^8+t^7+t^4+1),
	    St/ideal(t^12+t^10+t^6+t^5+t^4+t^2+1),
	    St/ideal(t^13+t^12+t^10+t^6+t^3+t^2+1),
	    St/ideal(t^14+t^13+t^11+t^10+t^8+t^6+t^4+t+1),
	    St/ideal(t^15+t^14+t^11+t^10+t^7+t^6+t^4+t^3+1),
	    St/ideal(t^16+t^13+t^12+t^11+t^10+t^9+t^6+t^2+1)}

-- list of points in P^2 over F_2
pointList = {(0_(ringList#1),0_(ringList#1),1_(ringList#1)),
             (0_(ringList#1),1_(ringList#1),0_(ringList#1)),
             (0_(ringList#1),1_(ringList#1),1_(ringList#1)),
             (1_(ringList#1),0_(ringList#1),0_(ringList#1)),
             (1_(ringList#1),0_(ringList#1),1_(ringList#1)),
             (1_(ringList#1),1_(ringList#1),0_(ringList#1)),
             (1_(ringList#1),1_(ringList#1),1_(ringList#1))};

----
-- creates num random surfaces corresponding to a certain
-- linear system and checks whether they can be embedded as a
-- smooth rational surface in P^4 over F_2 of expected degree
----
-- parameters:
---- num       : integer - number of surfaces to be created
---- linSys    : a list of the form {degree, basepoints},
----             where basepoints is a list of the form 
----             {(number of points, multiplicity),...}
----             - the linear system used to create surfaces from
---- file      : file - a file where the results and statistics
----                    are saved in
---- shortfile : file - a short version of file
----   
-- output
---- returns nothing, but prints certain results on screen
---- and saves results in file.
----
----   while running the progress is indicated every 53 surfaces
----
----   if a smooth rational surface in P^4 of expected degree is
----   found, it is printed on the screen at runtime
----
----   at the end a statistic is given as a MutableList
----   containing the following entries:
----
----     {nothing, n_0}     : n_0 linear systems have dimension 
----                          different from 5
----     {rank OK, n_1}     : n_1 linear systems have dimension 5,
----                          but has a base divisor
----     {codim OK, n_2}    : n_2 linear systems have dimension 5, only
----	      	   	      base points, but too many of them
----     {degree OK, n_3}   : n_3 linear systems have dimension 5 and the
----	      	   	      expected base locus, but the Hilbert 
----	      	   	      polynomial of the embedded surface
----          	   	      in IP^4 has the wrong constant term
----     {genera OK, n_4}   : n_4 linear systems map a blowup of IP^2
---- 	       	    	      to a surface with expected constant term
----	      	   	      of the Hilbert polynomial
---- 	       	    	      in IP^4, but this surface is singular
----     {smooth OK, n_5}   : n_5 linear systems map a blowup of IP^2
----	      	   	      to a smooth surface in IP^4, but the
---- 	       	    	      surface has the wrong degree
----     {expectedDeg, n_6} : n_6 linear systems map a blowup of IP^2
----	      	   	      to a smooth surface of expected degree
----                   	      in IP^4
----
-- note that the random function of Macaulay is initialized with
-- a certain seed which is read from the file tempseed.txt which can
-- contain an arbitrary string.
---- 
searchSurface = (num,linSys,file,shortfile) -> (
     -- local functions ---------------------------------------------------------------------------------------------------------------------------------
     ---- gets ideal I; returns whether V(I) is a smooth surface in P^4
     isSmooth := (I) -> (
     	  J := jacobian(I);
     	  S := minors(2,J)+I;
     	  b = codim S > 4;
	  J = null; S = null;
	  collectGarbage();
	  b
	  );
     ---- print used memory 
     space := () -> (print("used " | substring(toString(engineMemory()),0,38)));
     ---- save to file
     save := (string,outfile) -> (
	  filecontents = try(get outfile) else "";
	  f = outfile << filecontents;
	  f << string << endl;
	  f << flush << close;
	  f = null; filecontents = null;
	  collectGarbage();
	  );
     -- initialization -----------------------------------------------------------------------------------------------------------------------------------
     -- read seed from file tempseed.txt and set this seed
     seedstring = get"tempseed.txt";  -- this file can contain any string
     seed = fold((i,j) -> 101*i + j, 0, ascii seedstring);
     setRandomSeed(seed); 
     F := ringList#0; 
     S := ringList#1;
     T := F[x0,x1,x2,x3,x4];
     li := linSys#1;
     theDegree := sum apply(li,l -> (l#0*(l#1*(l#1+1)/2)));
     expectedDegree := linSys#0^2 - sum apply(li,l -> (l#0*l#1*l#1));
     R := null; P := null; IP := null; f := null; I := null; expList := null; exp1 := null, exp2 := null; n := null; bool := null; J := null;
     output = new MutableList from {{"nothing",0},{"rank OK",0},{"codim OK",0},{"degree OK",0},{"genera OK",0},{"smooth",0},{"expectedDeg",0}};
     save("Examples found by searchSurface, number = "|toString(num)|", linear system = "|toString(linSys)|" and seed = "|seed,file);
     -- loop ---------------------------------------------------------------------------------------------------------------------------------------------
     -- for the following construction of linear systems see our article
     for j from 1 to num do (
	  if (mod(j,53) == 0) then (
	       print(j);
	       space();
	       );
	  -- get random ideal corresponding to li, make expList the list of exponents
	  I = ideal(1_S);
	  expList = {};
	  out = (0,"nothing");
	  for i from 0 to #li-1 do (
               n = li#i#0;
	       R = ringList#n;
	       use R;
	       -- treat case of 1 point differently
	       if (n == 1) then (
		    exp1 = -1;
		    exp2 = random 7;
		    P = matrix{{pointList#(exp2)}}; 
		    IP = ideal((vars R)*syz P);
		    P = null;
		    J = IP^(li#i#1);
		    IP = null;
		    ) 
	       else (
     	       	    bool = true;
		    while bool do (
			 exp1 = random(2^n-1);
			 exp2 = random(2^n-1);
			 P = matrix{{t^exp1,t^exp2,1_R}};
			 IP = ideal((vars R)_{0..2}*syz P);
			 P = null;
			 bool = (degree ker map(R/IP,S) != n);     
			 if (not bool) then (
			      J = ker(map(R/(IP^(li#i#1)),S));
			      IP = null; 
			      ) 
			 else (
			      IP = null; 
			      )
			 );
		    R = null; bool = null; n = null;
		    );
	       expList = append(expList,(exp1,exp2));
	       exp1 = null; exp2 = null;
	       I = intersect(I,J);  -- the ideal of assigned base points
	       J = null;
	       collectGarbage();
	       );
	  -- test the surface corresponding to I as explained above
	  H = super basis(linSys#0,I);  -- the linear system
	  I = null;
	  collectGarbage();
	  -- check dimension of linear system
	  if (rank source H == 5) then (
	       out = (1,"rank OK");
	       J := ideal H;
	       -- check codimension of base locus
	       if (codim J == 2) then (
		    out = (2,"codim OK");
		    -- check degree of base locus
		    if (degree J == theDegree) then (
			 J = null;
			 out = (3,"degree OK");
			 -- map surface to IP^4
			 f = map(S,T,H);
			 H = null;
			 idealSurface = ker f;
			 f = null;
			 gen = genera idealSurface;
			 -- check constant term of hilbert polynomial
			 if (gen#0 == 0) then (
			      out = (4,"genera OK");
			      -- check smoothness
			      if (isSmooth(idealSurface)) then (
				   out = (5,"smooth");
				   degSurface = degree idealSurface;
				   -- check degree of surface
				   if (degSurface == expectedDegree) then(
					out = (6,"expectedDeg");
				   	save(toString((gen, degSurface , betti res coker gens idealSurface, expList)),file);
				   	save(",,,,,,,,\""|toString(expList)|"\"",shortfile);
				   	)	 
			      	   )	    
			      )
			 )
		    )
	       );
	  output#(out#0) = {out#1,(output#(out#0)#1)+1};
	  out = null;
	  H = null; J = null; f = null; idealSurface = null; gen = null; expList = null;
	  collectGarbage();
	  );
     save(toString(peek output),file);
     save("'"|seed|","|output#0#1|","|output#1#1|","|output#2#1|","|output#3#1|","|output#4#1|","|output#5#1|","|output#6#1,shortfile);
     print(peek output);
     )


----
-- calls searchSurface with a linear system
-- from a Macaulay file
----
-- parameters:
---- num        : integer - number of surfaces to be created
---- linSysFile : Macaulay filename - in the file a list called B
----                                  has to be defined containing
----                                  linear systems in the format
----                                  required for linSys in the 
----                                  function searchSurface
---- pos        : integer - the position of the desired linear
----                        system in the list B given by
----                        the Macaulay file given by linSysFile
----   
-- output
---- same as for searchSurface,
---- the results are saved in the following two files
----   "Example_"|linSysFile.m2|"#"|pos|".txt" and
----   "Example_"|linSysFile.m2|"#"|pos|"�-short.txt"
----
autoSearchSurface = (num,linSysFile,pos) -> (
     file := toString(linSysFile);
     load(file|".m2"); -- load the file containing the linear system
     if (pos >= #B) then (
	  print("Example does not exist!");
	  )
     else ( -- call searchSurface
	  searchSurface(num,B#pos,"Example_"|file|"#"|toString(pos)|".txt","Example_"|file|"#"|toString(pos)|"-short.txt");
	  )
     )


math0404492.extracted_bib
\begin{thebibliography}{ADH{\etalchar{+}}97}

\bibitem[ADH{\etalchar{+}}97]{Aure}
A.~Aure, W.~Decker, K.~Hulek, S.~Popescu, and K.~Ranestad.
\newblock Syzygies of abelian and bielliptic surfaces in {$\PZ^4$}.
\newblock {\em Int. J. Math.}, 8(7):849--919, 1997.

\bibitem[ADS98]{AboDegree8}
Hirotachi Abo, Wolfram Decker, and Nobuo Sasakura.
\newblock An elliptic conic bundle in {$\bold P\sp 4$} arising from a stable
  rank-{$3$} vector bundle.
\newblock {\em Math. Z.}, 229(4):725--741, 1998.

\bibitem[AR02]{AboDegree12}
Hirotachi Abo and Kristian Ranestad.
\newblock Irregular elliptic surfaces of degree $12$ in the projective
  fourspace.
\newblock \preprintserver{math.AG}{0210317}, 2002.

\bibitem[CLO98]{CLOusingAG}
David Cox, John Little, and Donal O'Shea.
\newblock {\em Using algebraic geometry}, volume 185 of {\em Graduate Texts in
  Mathematics}.
\newblock Springer-Verlag, New York, 1998.

\bibitem[DES93]{DES}
Wolfram Decker, Lawrence Ein, and Frank-Olaf Schreyer.
\newblock Construction of surfaces in {${\bf P}\sb 4$}.
\newblock {\em J. Algebraic Geom.}, 2(2):185--237, 1993.

\bibitem[DS00]{DeckerSchreyer}
Wolfram Decker and Frank-Olaf Schreyer.
\newblock Non-general type surfaces in {${\bf P}\sp 4$}: some remarks on bounds
  and constructions.
\newblock {\em J. Symbolic Comput.}, 29(4-5):545--582, 2000.
\newblock Symbolic computation in algebra, analysis, and geometry (Berkeley,
  CA, 1998).

\bibitem[Eis95]{Ei95}
D.~Eisenbud.
\newblock {\em Commutative Algebra with a View Toward Algebraic Geometry}.
\newblock Graduate Texts in Mathematics 150. Springer, 1995.

\bibitem[EP89]{EllingsrudPeskine}
Geir Ellingsrud and Christian Peskine.
\newblock Sur les surfaces lisses de {${\bf P}\sb 4$}.
\newblock {\em Invent. Math.}, 95(1):1--11, 1989.

\bibitem[GS]{M2}
Daniel~R. Grayson and Michael~E. Stillman.
\newblock Macaulay 2, a software system for research in algebraic geometry.
\newblock Available at
  \href{http://www.math.uiuc.edu/Macaulay2}{http://www.math.uiuc.edu/Macaulay2%
}.

\bibitem[Sch96]{smallFields}
Frank-Olaf Schreyer.
\newblock Small fields in constructive algebraic geometry.
\newblock In {\em Moduli of vector bundles (Sanda, 1994; Kyoto, 1994)}, volume
  179 of {\em Lecture Notes in Pure and Appl. Math.}, pages 221--228. Dekker,
  New York, 1996.

\bibitem[vBEL]{ratsurfweb}
H.C.~Graf v.~Bothmer, C.~Erdenberger, and K.~Ludwig.
\newblock Macaulay 2 scripts for finding rational surfaces in $\pz^4$.
\newblock Available at
  \href{http://www-ifm.math.uni-hannover.de/~bothmer/surface}{http://www-ifm.m%
ath.uni-hannover.de/\~{}bothmer/surface}. See also the LaTeX-file of this
  article at \href{http://arXiv.org}{http://arXiv.org}.

\end{thebibliography}