%
% Lagrangian subbundles and codimension 3 subcanonical ...
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                       %%%
%%%  AMS-Latex 1.2                                        %%%
%%%  Latex2e                                              %%%
%%%                                                       %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% version 

\documentclass[11pt]{amsart}
\usepackage{upref,amssymb,eucal}
%\usepackage[notcite,notref]{showkeys}




%% Paul Taylor's diagrams package
\usepackage{diagrams}
\diagramstyle[small,labelstyle=\scriptstyle,midshaft,PS=dvips]
\newarrow{Same}=====
\newarrow{Corresponds}<--->
\newarrow{Dashonto}....{>>}
\newarrow{Dashembed}>...>

\headheight=6pt  %%%%%  to eliminate an overfull \vbox on every page
                 %%%%%  when using 12pt

% \numberwithin{equation}{section}





\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem*{secondthm}{Theorem \ref{second.v}}



\theoremstyle{definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{question}[theorem]{Question}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\newtheorem*{ack}{Acknowledgment}



\setcounter{secnumdepth}{1}

\DeclareMathOperator{\Ext}{Ext}
\DeclareMathOperator{\shExt}{\mathcal E\mathit{xt}}
\DeclareMathOperator{\hExt}{\mathbb Ext}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\shHom}{\mathcal H\mathit{om}}
\DeclareMathOperator{\Syz}{\mathcal S\mathit{yz}}
\DeclareMathOperator{\coker}{coker}
\DeclareMathOperator{\codim}{codim}
\DeclareMathOperator{\im}{im}
\DeclareMathOperator{\Id}{Id}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\rk}{rk}
\DeclareMathOperator{\grade}{grade}
\DeclareMathOperator{\Spec}{Spec}
\DeclareMathOperator{\Proj}{Proj}
\DeclareMathOperator{\depth}{depth}
\DeclareMathOperator{\length}{length}
\DeclareMathOperator{\GG}{\mathbb{G}}
\DeclareMathOperator{\Gr}{Gr}
\DeclareMathOperator{\Pic}{Pic}
\DeclareMathOperator{\Spin}{Spin}
\DeclareMathOperator{\SL}{SL}
\DeclareMathOperator{\SO}{SO}
\DeclareMathOperator{\GL}{GL}
\DeclareMathOperator{\Orth}{O}
\DeclareMathOperator{\pd}{pd}
\DeclareMathOperator{\Span}{Span}
\DeclareMathOperator{\VB}{VB}
\DeclareMathOperator{\der}{D}
\DeclareMathOperator{\Ch}{Ch}
\DeclareMathOperator{\cyl}{cyl}
\DeclareMathOperator{\cocyl}{cocyl}
\DeclareMathOperator{\can}{can}
\DeclareMathOperator{\Pf}{Pf}


\newcommand{\OG}[1]{\GG_o(#1,2#1)}
\newcommand{\rest}[1]{{\mid}_{#1}}
\newcommand{\sm}[1]{\left(\begin{smallmatrix}#1\end{smallmatrix}\right)}
\newcommand{\cpx}{{\centerdot}}
\newcommand{\hyp}{{\text{hyp}}}
\newcommand{\mult}{{\text{mult}}}
\newcommand{\bd}{{\text b}}
\newcommand{\cofib}{\rightarrowtail}
\newcommand{\fib}{\twoheadrightarrow}
\newcommand{\red}{{\text{\rm red}}}
\newcommand{\linsys}[1]{\lvert #1 \rvert}
\newcommand{\cond}[1]{\ref{cond.#1}}

\renewcommand\O{{\mathcal O}}
\renewcommand\P{{\mathbb P}}


\begin{document}
%\def\fix#1{{\bf (( #1 ))}}

\title[Lagrangian Subbundles and Subcanonical Subschemes]
{Lagrangian Subbundles and Codimension $3$ Subcanonical Subschemes}
%
%\date{6 May 1999}
%
\author{David Eisenbud} 
%
\address{Department of Mathematics\\ University of California,
Berkeley\\ Berkeley CA 94720}
%
\email{de@msri.org}
\urladdr{http://www.msri.org/people/staff/de/}


\author{Sorin Popescu}
%
\address{Department of Mathematics\\ Columbia  University\\
New York, NY 10027}
%
\email{psorin@math.columbia.edu} 
%
\urladdr{http://www.math.columbia.edu/\~{}psorin/}
%
\thanks{Partial support for the authors during the preparation of
this work was provided by the NSF. The authors are also
grateful to MSRI Berkeley and the University of Nice Sophia-Antipolis
for their hospitality.}


\author{Charles Walter}
%
\address{Laboratoire J.-A.\ Dieudonn\'e (UMR 6621 du CNRS)\\
Universit\'e de Nice -- Sophia Antipolis\\ 06108 Nice Cedex 02\\
France}
%
\email{walter@math.unice.fr}
\urladdr{http://math1.unice.fr/\~{}walter/}


% \keywords{}
% \subjclass{Primary}



\begin{abstract}
  We show that a subcanonical subscheme $Z\subset X$ of codimension
  $3$ satisfying a mild cohomological condition can be realized as the
  locus along which two Lagrangian subbundles of a twisted orthogonal
  bundle meet degenerately (and vice versa).  The extra condition
  always holds when $X$ is a projective space (and considerably more
  generally; all we need is the vanishing of a certain class in a
  cohomology group of a line bundle).  In the local case our structure
  theorems reduce to that of Buchsbaum-Eisenbud \cite{BE} and say that
  $Z$ is Pfaffian.  An important technical point is that pairs of
  Lagrangian subbundles can be transformed into locally alternating
  maps of vector bundles, allowing us to define natural scheme structures
  on Lagrangian degeneracy loci.
 
  In the last section of the paper we prove codimension one symmetric
  and skew-symmetric analogues of our structure theorems.
\end{abstract}

\maketitle

% \section{Introduction}
\label{introduction}

Smooth subvarieties of small codimension $Z \subset X=\mathbb P^N$
have been extensively studied in recent years, especially in relation
to Hartshorne's conjecture that a smooth subvariety of sufficiently
small codimension in $\mathbb P^N$ is necessarily a complete
intersection.  Although the conjecture remains open, smooth
subvarieties of small codimension in $\mathbb P^N$ are known to be
{\em subcanonical} by the Barth-Larsen-Lefschetz theorem; that is,
they are Gorenstein and the canonical line bundle $\omega_Z$ is the
restriction of a line bundle on the ambient variety $X$.

In this paper we study subcanonical subschemes of codimension $3$ in a
noetherian scheme $X$.

There are well known theorems describing the local structure of
Gorenstein subschemes of a [regular] noetherian scheme in codimensions
$\leq 3$.  In codimensions $1$ and $2$ all Gorenstein subschemes are
local complete intersections.  These results have been globalized: any
$Z \subset X$ of codimension $1$ is the zero locus of a section of a
line bundle; while a subcanonical $Z \subset X$ of codimension $2$ is
the zero locus of a section of a rank $2$ vector bundle if a certain
obstruction in cohomology vanishes (see \S \ref{converse.theorem}
below).  In both cases $\mathcal O_Z$ has a symmetric resolution by
locally free $\mathcal O_X$-modules.

In codimension $3$ both the local and the global cases become more
complicated.  Locally, a Gorenstein subscheme of codimension $3$ need
not be a local complete intersection.  Rather, Buchsbaum and Eisenbud
\cite{BE} showed that such a subscheme is cut out locally by the
submaximal Pfaffians of an alternating matrix appearing in a minimal
free resolution.  Okonek \cite{Okonek} asked whether this local result
could be generalized to show that codimension $3$ subcanonical schemes
are cut out by the Pfaffians of an alternating map of vector bundles.
Walter \cite{Walter} gave a positive answer to Okonek's question in
$\mathbb P^n$ under a mild additional hypothesis, but left open the
question of whether this hypothesis is always satisfied.

In our next paper \cite{EPW2} we will show that {\em not every
subcanonical subscheme of codimension $3$ in $\mathbb P^n$ is
Pfaffian,\/} settling Okonek's question negatively.  But in the
present paper we show that a different way of looking at the Pfaffian
construction does generalize, and gives the desired structure theorem
for all subcanonical subschemes of codimension $3$. (The question as
to which subschemes are Pfaffian can be answered in the derived Witt
group of Balmer \cite{Balmer}; see Walter \cite{Walter2}.)

The terminology we will use in our structure theorems is as follows.
A closed subscheme $Z \subset X$ of a noetherian scheme will be said
to be {\em subcanonical of codimension $d$} if it satisfies two
conditions: 
%
\begin{enumerate}
\renewcommand\theenumi{\Alph{enumi}}
\renewcommand\labelenumi{\theenumi)}
\setlength{\itemsep}{0.6ex plus 0.6ex minus 0ex}
%
\item \label{cond.1} The subscheme $Z$ is {\em relatively
Cohen-Macaulay of codimension $d$} in $X$, i.e.\ $\shExt^i_{\mathcal
O_X} (\mathcal O_Z, \mathcal O_X) = 0$ for all $i \neq d$, and
%
\item \label{cond.2} There exists a line bundle $L$ on $X$ such that
the relative canonical sheaf $\omega_{Z/X}:= \shExt^d_{\mathcal
O_X}(\mathcal O_Z,\O_X)$ is isomorphic to the restriction of $L^{-1}$
to $Z$.
\end{enumerate}
%
Unfortunately, these conditions are not enough for our structure
theorem in codimension $3$ nor for the Serre correspondence in
codimension $2$.  For condition \cond2 asserts the existence of an
isomorphism
%
\begin{equation}
\label{eta}
\eta : \mathcal O_Z \xrightarrow{\sim} \omega_{Z/X}(L) =
\shExt^d_{\mathcal O_X}(\mathcal O_Z,L)
\end{equation}
%
which one can think of as an $\eta \in H^0(\shExt^d_{\mathcal O_X}
(\mathcal O_Z,L))= \Ext^d_{\mathcal O_X} (\mathcal O_Z,L)$.  In the
Yoneda Ext, this $\eta$ defines a class of ``resolutions of $\mathcal
O_Z$ by coherent sheaves''
\[
0 \to L \to \mathcal F_{d-1} \to \dotsb \to \mathcal F_1 \to \mathcal
F_0 \to \mathcal O_Z \to 0.
\]
In our structural theorem we would like to have $\mathcal F_0, \dots,
\mathcal F_{d-1}$ locally free.  We would also like to have $\mathcal
F_0 = \mathcal O_X$, which means that we would like $\eta \in
\Ext^d_{\mathcal O_X}(\mathcal O_Z,L)$ to lift to
$\Ext^{d-1}_{\mathcal O_X}(\mathcal I_Z,L)$.  We will therefore look
at what we call {\em strongly subcanonical subschemes} which satisfy
conditions \cond1-\cond2 plus two additional conditions:
%
\begin{enumerate}
\renewcommand\theenumi{\Alph{enumi}}
\renewcommand\labelenumi{\theenumi)}
\setlength{\itemsep}{0.6ex plus 0.6ex minus 0ex}
\addtocounter{enumi}{2}
\item \label{cond.3} The $\mathcal O_X$-module $\mathcal O_Z$ is of
  finite local projective dimension (necessarily equal to the
  codimension $d$), and
%
\item \label{cond.4} The isomorphism class $\eta \in \Ext^d_{\mathcal
O_X} (\mathcal O_Z,L)$ of \eqref{eta} goes to zero under the map
%
\begin{equation}
\label{ext.and.coho}
\Ext^d_{\mathcal O_X}(\mathcal O_Z,L) \to \Ext^d_{\mathcal
O_X}(\mathcal O_X,L) = H^d(X,L)
\end{equation}
%
induced by the surjection $\mathcal O_X \to \mathcal O_Z$. 
\end{enumerate}
%

The Serre construction says that a subscheme of codimension $2$ is the
zero locus of a rank $2$ vector bundle if and only if it is strongly
subcanonical (see Griffiths-Harris \cite{GH} Proposition 1.33,
Vogelaar \cite{Vo} Theorem 2.1, or B\u anic\u a-Putinar \cite{BP} \S
2.1 for references stating variants of condition \cond4 explicitly).

Condition \cond3 holds automatically if the ambient scheme $X$ is
regular.  Condition \cond4 holds automatically if $H^d(X,L) = 0$.
This is the case if $X = \mathbb P^n$ with $n \geq d+1$, or if $X$ is
an affine scheme.  In addition, if the ambient scheme $X$ is a
Gorenstein variety over a field $k$, then condition \cond4 can be put
into a dual form which looks more natural.  For in that case $Z
\subset X$ is subcanonical (of dimension $r$) if and only if it is
Cohen-Macaulay and there exists a line bundle $M$ on $X$ such that
$\omega_Z \cong M \rest Z$, and condition \cond4 holds if and only if
the following composite map vanishes
%
\begin{equation}
\label{cond.dual}
H^r(X,M) \xrightarrow{\text{\rm rest}} H^r(Z,M \rest Z) \xrightarrow
[\cong] {\eta} H^r(Z,\omega_Z) \xrightarrow{\tr} k.
\end{equation}



Our main results give a construction for strongly subcanonical
subschemes of codimension $3$ as a degeneracy locus associated to the
following situation.  Let $\mathcal V$ be a vector bundle on $X$ of
even rank $2n$ equipped with a nonsingular quadratic form $q$ with
values in a line bundle $L$.  Let $\mathcal E$ and $\mathcal F$ be a
pair of Lagrangian subbundles of $(\mathcal V,q)$ (i.e.\ totally
isotropic subbundles of rank $n$).  It is then well known that $\dim [
\mathcal E(x) \cap \mathcal F(x) ]$ is locally constant modulo $2$.

Now suppose that $m$ is an integer such that $\dim [ \mathcal E(x)
\cap \mathcal F(x) ] \equiv m \pmod 2$ for all $x \in X$.  Then there
is a degeneracy locus which as a set is given by
\[
Z_m(\mathcal E,\mathcal F)_\red := \left \{ x\in X \mid \dim_{k(x)}
  [\mathcal E(x) \cap \mathcal F(x)] \geq m \right \}.
\]
In \S\ref{sect.degen} we will define a natural scheme structure on
this set in roughly the following manner.  Using the data $\mathcal E,
\mathcal F \subset (\mathcal V,q)$ one defines a composite map
\[
\lambda:\quad \mathcal E\rightarrow \mathcal V\cong \mathcal V^*(L)
\rightarrow \mathcal F^*(L)
\]
such that $\ker(\lambda (x)) = \mathcal E(x) \cap \mathcal F(x)$ for
all $x \in X$.  The map $\lambda$ is not alternating in the classical
sense, but (perhaps after modifying $\lambda$ slightly as in
\eqref{eq.even.rank}), it is possible to find local bases in which the
matrix of $\lambda$ is alternating (Proposition
\ref{p.locally.alternating}).  Although these alternating matrices do
not glue together, they are sufficiently compatible that we can define
$Z_m(\mathcal E,\mathcal F)$ as the locus defined by their Pfaffians
of order $\rk(\mathcal E)-m+2$.  This scheme structure is natural in
the sense that in a suitably generic setting it is reduced, and it is
stable under base change.

For our first main result (Theorem \ref{second.v}) we show that if
$\dim_{k(x)} [\mathcal E(x) \cap \mathcal F(x)]$ is odd for all $x \in
X$, and if $Z_3(\mathcal E, \mathcal F)$ is of grade $3$, the expected
value, then $Z=Z_3(\mathcal E, \mathcal F)$ is strongly subcanonical,
i.e.\ it satisfies conditions \cond1-\cond4 above.  Moreover, we give
explicit locally free resolutions for $\mathcal O_Z$ (see especially
Theorem \ref{first.v}).

Conversely, we show (Theorem \ref{converse}) that any strongly
subcanonical subscheme $Z$ in a quasi-projective scheme $X$ can be
obtained as a locus $Z_3(\mathcal E, \mathcal F)$ as above.  We show
that the bundle $\mathcal V$ can even be taken to be hyperbolic---that
is, $\mathcal V=\mathcal F \oplus \mathcal F^*(L)$ for some bundle
$\mathcal F$.

One way to look at these results is as follows.  The existence of the
symmetric isomorphism
%
\[
\eta : \mathcal
O_Z \xrightarrow{\sim} \shExt^3_{\mathcal O_X}(\mathcal O_Z,L)
\]
% 
means that there should be a symmetric isomorphism in the derived category
from the locally free resolution 
%
\begin{equation}
\label{first.resol}
0 \to L \xrightarrow{\,q\,} \mathcal E \xrightarrow{\,\psi\,} \mathcal
G \xrightarrow{\,p\,} \mathcal O_X \to \mathcal O_Z \to 0.
\end{equation}
%
of $\mathcal O_Z$ into its twisted shifted dual.  In general,
morphisms in the derived category are complicated objects involving
homotopy classes of maps and a calculus of fractions.  Nevertheless,
in Theorem \ref{first.v} we show that there exist suitable locally
free resolutions of $\mathcal O_Z$---which depend on the choice of
$\eta$---for which the symmetric isomorphism in the derived category
is induced by a symmetric honest-to-goodness chain map which is a
quasi-isomorphism and therefore becomes an isomorphism in the derived
category.  Okonek's Pfaffian subschemes correspond to situations where
this quasi-isomorphism is an isomorphism.

The philosophy that (skew)-symmetric sheaves should have locally free
resolutions that are (skew)-symmetric up to quasi-isomorphism is also
pursued in our paper \cite{EPW3} and in Walter \cite{Walter2}.  The
former deals primarily with methods for constructing explicit locally
free resolutions for (skew)-symmetric sheaves on $\mathbb P^n$.  The
latter studies the obstructions (in Balmer's derived Witt groups
\cite{Balmer}) for the existence of a genuinely (skew)-symmetric
resolution.

The results of this paper give a full characterization of codimension
$3$ subcanonical subschemes.  In \cite{EPW2} we will use this
machinery to construct various geometric natural examples of
subcanonical subschemes of codimension $3$ which are not Pfaffian.

Porteous-type formulas for the fundamental classes of degeneracy loci
for skew-symmetric maps $\phi : \mathcal E \to \mathcal E^*(L)$ were
found by Harris-Tu \cite{HarrisTu}, J\'ozefiak-Lascoux-Pragacz
\cite{JLP}, and Pragacz \cite{Pragacz}.  Harris asked for similar
formulas for degeneracy loci related to pairs of Lagrangian
subbundles, and they were provided by Fulton \cite{FultonHirz}
\cite{FultonJDG} and Pragacz-Ratajski \cite{PR} (see Fulton-Pragacz
\cite{FP} for more details).  (A natural scheme structure on these
degeneracy loci and their generalizations with isotropic flag
conditions can be defined in a manner similar to \eqref{scheme.str}.)

Fulton and Pragacz (\cite{FP} \S 9.4) also ask whether one can find
``natural'' resolutions for the structural sheaves of these kinds of
symmetric and skew-symmetric degeneracy loci.  From such a resolution
one can read off formulas in $K_0(X)$.  Theorem \ref{second.v}
provides an explicit answer in one simple case.

\subsection{Structure of the paper}
In Sections \ref{sect.lagr} and \ref{sect.degen} we review basic facts
about Lagrangian subbundles of orthogonal bundles and define the
scheme structure on the degeneracy loci $Z_m(\mathcal E,\mathcal F)$.
In Section \ref{Subcanonical} we review the notion of (strongly)
subcanonical subschemes and prove one of our main results Theorem
\ref{second.v}.  In Section \ref{lagrange} we discuss the split case
of this construction (Theorem \ref{first.v}) which also turns out to
be a more practical method for constructing codimension $3$
subcanonical subschemes.  The computation of local equations for these
degeneracy loci is discussed in Section \ref{local.eq}.

In Section \ref{converse.theorem} we prove our other main result, a
converse to Theorem \ref{second.v}, describing the structure of
strongly subcanonical schemes.  Sections \ref{sect.points} and
\ref{examples} discuss at length various examples of codimension $3$
subcanonical subschemes, particularly the case of points in $\mathbb
P^3$.  Additional and more interesting examples can be found in our
paper \cite{EPW2}.

Finally, in Section \ref{codimension.one} we prove codimension one
symmetric and skew-symmetric analogues of all previous results.  In
particular we state Casnati-Catanese's structural result (\cite{CC}
Remark 2.2) with the correct parity condition, and give an example of
a self-linked threefold of degree $18$ in $\mathbb P^5$ which does not
have a symmetric resolution because the parity condition fails.


\subsection{Acknowledgements}

We are grateful for many useful discussions to Igor Dolgachev,  
Bill Fulton, Joe Harris, and Andr\'e Hirschowitz.

The second and third authors would like to thank the Mathematical
Sciences Research Institute in Berkeley for its support while part of
this paper was being written.  The first and second authors also thank
the University of Nice -- Sophia Antipolis for its hospitality.  

Many of the diagrams were set using the {\tt diagrams.tex}
package of Paul Taylor.






\section{Quadratic forms on vector bundles}
\label{sect.lagr}

In this section we recall the basic definitions of twisted orthogonal
bundles and of Lagrangian subbundles.  The definitions and results can
be found in many standard references such as Fulton-Pragacz \cite{FP}
Chap.\ 6, Knus \cite{Knus}, and Mukai \cite{Mukai} \S 1.


\subsection{Quadratic forms}

Suppose that $V$ is a finite-dimensional vector space over a field
$k$.  (We impose no restrictions on $k$; it need not be algebraically
closed nor of characteristic $\neq 2$.)  A quadratic form on $V$ is a
homogeneous quadratic polynomial in the linear forms on $V$, i.e.\ a
member $q \in S^2(V^*)$.  The symmetric bilinear form $b: V\times V
\to k$ associated to $q$ is given by the formula
%
\begin{equation}
\label{ass.bilin.form}
b(x,y) := q(x+y) - q(x) - q(y).
\end{equation}
%
The quadratic form $q$ is {\em nondegenerate} if $b$ is a perfect
pairing.  

Now suppose that $\mathcal V$ is a locally free sheaf of constant
finite rank over a scheme $X$.  A quadratic form on $\mathcal V$ with
values in a line bundle $L$ is a global section $q$ of $S^2(\mathcal
V^*) \otimes L$.  Such a quadratic form is {\em nonsingular} if the
induced symmetric bilinear form is a perfect pairing.  Equivalently a
quadratic form $q$ on $\mathcal V$ is nonsingular if for each point $x
\in X$ the induced quadratic form $q(x)$ on the fiber vector space
$\mathcal V(x)$ is nondegenerate.  A {\em twisted orthogonal bundle}
on $X$ is a vector bundle $\mathcal V$ equipped with a nonsingular
quadratic form $q$ with values in some line bundle $L$.



\subsection{Lagrangian subbundles} 

If $V$ is a vector space of even dimension $2n$ equipped with a
nondegenerate quadratic form, then a {\em Lagrangian subspace} $E
\subset (V,q)$ is a subspace of $V$ of dimension $n$ such that $q
\rest{E} \equiv 0$.  If the characteristic is $\neq 2$, then $E
\subset (V,q)$ is Lagrangian if and only if $E = E^\perp:= \{ x\in V
\mid b(x,y)=0 \text{ for all $y \in E$} \}$.  But in characteristic
$2$ this condition is necessary but not sufficient for $q$ to vanish
on $E$, i.e.\ for $E$ to be Lagrangian.

Similarly, a {\em Lagrangian subbundle} $\mathcal E \subset (\mathcal
V,q)$ of a twisted orthogonal bundle of even rank $2n$ is a subbundle
(with locally free quotient sheaf) of rank $n$ such that $q
\rest{\mathcal E} \equiv 0$.  


The following result is well known (cf.\ Bourbaki \cite{Bourbaki} \S 6
ex.\ 18(d), Mumford \cite{Mumford}, Mukai \cite{Mukai} Proposition
1.6).

\begin{proposition}
\label{constant.parity}
If $\mathcal E$ and $\mathcal F$ are Lagrangian subbundles of a
twisted orthogonal bundle over a scheme $X$, then the function on $X$
given by $x \mapsto \dim_{k(x)} \bigl[ \mathcal E(x) \cap \mathcal
F(x) \bigr]$ is locally constant modulo $2$.
\end{proposition}


% If $\dim_{k(x)} \bigl[ \mathcal E(x) \cap \mathcal F(x) \bigr]
% \equiv \rk (\mathcal E) \pmod 2$ for all $x \in X$, then we will say
% that $\mathcal E$, $\mathcal F$ form a {\em same-families} pair of
% Lagrangian subbundles of $(\mathcal V,q)$.  If $\dim_{k(x)} \bigl[
% \mathcal E(x) \cap \mathcal F(x) \bigr] \not\equiv \rk(\mathcal E)
% \pmod 2$ for all $x$, then they form an {\em opposite-families} pair
% of Lagrangian subbundles.




\subsection{Hyperbolic bundles}

If a Lagrangian subbundle $\mathcal E \subset (\mathcal V,q)$ has a
Lagrangian complement $\mathcal F$, then the symmetric bilinear form
induces a natural isomorphism $\mathcal F \cong \mathcal E^*(L)$, and
$(\mathcal V,q)$ is isometric to the vector bundle $\mathcal E \oplus
\mathcal E^*(L)$ endowed with the {\em hyperbolic quadratic form} $q(e
\oplus \alpha) := \alpha(e)$ with values in $L$.  (This $q$ is
bilinear on $\mathcal E \times \mathcal E^*(L)$ but quadratic on
$\mathcal E \oplus \mathcal E^*(L)$.)  The associated hyperbolic
symmetric bilinear form has matrix $\sm{0&I\\I&0}$.

The following result is well known and can be found for instance in
\cite{Knus} Remark I.5.5.4.  It applies only to affine schemes.

\begin{lemma}
\label{affine.lagr.subspace}
Suppose that $X$ is an \textbf{affine} scheme and that $\mathcal E
\subset (\mathcal V,q)$ is a Lagrangian subbundle of a twisted
orthogonal bundle on $X$ with values in a line bundle $L$.  Then there
exists an isomorphism $\mathcal V \cong \mathcal E \oplus \mathcal
E^*(L)$ which is the identity on $\mathcal E$ and which identifies $q$
with the hyperbolic quadratic form on $\mathcal E \oplus \mathcal
E^*(L)$.  
\end{lemma}

The following result describing some of the Lagrangian subbundles of a
hyperbolic orthogonal bundle is also well known (see for instance
\cite{Mukai} Proposition 1.3).  Note that it has the effect of
transforming an alternating map into a pair of Lagrangian subbundles.

\begin{lemma}
\label{graph.alt}
Suppose that $\zeta : \mathcal E \to \mathcal E^*(L)$ is an
alternating map, and let $\Gamma_\zeta : \mathcal E \hookrightarrow
\mathcal E \oplus \mathcal E^*(L)$ be its graph.
%
Then $\Gamma_\zeta(\mathcal E)$ is a Lagrangian subbundle
of the hyperbolic twisted orthogonal bundle $\mathcal E \oplus
\mathcal E^*(L)$ complementary to the summand $\mathcal E^*(L)$.
%
Moreover, all Lagrangian subbundles of $\mathcal E \oplus \mathcal
E^*(L)$ complementary to $\mathcal E^*(L)$ may be obtained in this
way. 
\end{lemma}








\section{Locally alternating maps and their degeneracy loci}
\label{sect.degen}

In this section we reverse Lemma \ref{graph.alt} locally by showing
how to convert a pair of ``same-family'' Lagrangian subbundles of an
orthogonal bundle into an alternating map of vector bundles.  This
allows to define degeneracy loci associated to pairs of Lagrangian
subbundles of a twisted orthogonal bundle in a way which generalizes
the degeneracy loci for alternating maps of vector bundles $\phi :
\mathcal E \to \mathcal E^*(L)$.


\subsection{From Lagrangian subbundles to locally alternating maps}
Suppose that $f: \mathcal E \hookrightarrow (\mathcal V,q)$ and $g :
\mathcal F \hookrightarrow (\mathcal V,q)$ are Lagrangian subbndles of
a twisted orthogonal bundle.  Consider the composite map
%
\begin{equation}
\label{lambda}
\lambda:\quad \mathcal E\xrightarrow{\,f\,} \mathcal V
\xrightarrow{\beta} \mathcal V^*(L) \xrightarrow{g^*}
\mathcal F^*(L) 
\end{equation}
%
where $\beta: \mathcal V \xrightarrow{\cong} \mathcal V^*(L)$ is the
isomorphism induced by the quadratic form $q$.  In the situation of
Lemma \ref{graph.alt}, $\lambda$ is the alternating map $\zeta :
\mathcal E \to \mathcal E^*(L)$.


In general $\lambda$ is not alternating and may have even or odd rank.
However, its rank is locally constant modulo $2$ because the kernel of
$\lambda(x) : \mathcal E(x) \to \mathcal F^*(L)(x)$ is $\mathcal E(x)
\cap \mathcal F(x)$, allowing us to apply Proposition
\ref{constant.parity}.  We may assume that the rank is always even
since otherwise we may replace the Lagrangian subbundles $\mathcal E$,
$\mathcal F$ of $\mathcal V$ by the Lagrangian subbundles $\mathcal
E_1 := \mathcal E \oplus \mathcal O_X$ and $\mathcal F_1 := \mathcal F
\oplus L$ of the orthogonal bundle $\mathcal V_1 := \mathcal V \oplus
\mathcal O_X \oplus L$.  This has the effect of replacing $\lambda$ by
%
\begin{equation}
\label{eq.even.rank}
\lambda_1: \mathcal E_1 = \mathcal E \oplus \mathcal O_X
\xrightarrow{\sm{\lambda & 0 \\ 0 & 1}} \mathcal F^*(L) \oplus
\mathcal O_X = \mathcal F_1^*(L),
\end{equation}
%
This makes all the ranks even but does not change the kernel or
cokernel of $\lambda$.  Notice also that $\mathcal E_1(x) \cap
\mathcal F_1(x) = \mathcal E(x) \cap \mathcal F(x)$ for all $x \in X$.

The following proposition is the main result of this section.  It
shows that when the rank of $\lambda$ is even, then $\lambda$ is
locally alternating in suitable bases.

\begin{proposition}
\label{p.locally.alternating}
Let $\mathcal E, \mathcal F \subset (\mathcal V,q)$ be Lagrangian
subbundles of a twisted orthogonal bundle.  Suppose that the rank of
the map $\lambda : \mathcal E \to \mathcal F^*(L)$ of \eqref{lambda}
is always even, or equivalently that $\dim_{k(x)} \bigl[ \mathcal E(x)
\cap \mathcal F(x) \bigr] \equiv \rk(\mathcal E) \pmod 2$ for all $x
\in X$.

\textup{(a)} Any $x \in X$ has a neighborhood $U$ over which $\mathcal
E \rest U$ and $\mathcal F \rest U$ have a common Lagrangian
complement $\mathcal M$.  

\textup{(b)} The symmetric bilinear form provides natural isomorphisms
$\gamma_1 : \mathcal M \xrightarrow{\sim} \mathcal E^*(L) \rest U$ and
$\gamma_2 : \mathcal M \xrightarrow{\sim} \mathcal F^*(L) \rest U$
such that the composite $\mu_{\mathcal M} = \gamma_2^{-1} \circ
\lambda \circ \gamma_1^*$ in the commutative diagram
\eqref{mu.diagram} is alternating.
%
\begin{diagram}[LaTeXeqno,w=2.5em]
\label{mu.diagram}
\mathcal E \rest U & & \rTo ^\lambda & & \mathcal F^*(L) \rest U \\
%
& \rdTo >f & & \ruTo <{g^*} & \\
%
\dTo >\cong <{\gamma_1^*}& & \mathcal V\rest U \cong \mathcal V^*(L)
\rest U & & \uTo <\cong >{\gamma_2} \\
%
& \ldTo _{\delta^*} & & \luTo _{\delta} & \\
%
\mathcal M^*(L) & & \rDashto ^{\mu_\mathcal M} & & \mathcal M
\end{diagram}

\textup{(c)} If $\mathcal N \subset \mathcal V \rest U$ is another
common Lagrangian complement to $\mathcal E \rest U$ and $\mathcal F
\rest U$, then there is an isomorphism $\epsilon : \mathcal M
\xrightarrow{\sim} \mathcal N$ such that the $\mu_{\mathcal N} =
\epsilon \circ \mu_{\mathcal M} \circ \epsilon^*$.
\end{proposition}



\begin{proof}
  Since $\dim_{k(x)} \bigl[ \mathcal E(x) \cap \mathcal F(x) \bigr]
  \equiv \rk(\mathcal E) \pmod 2$ for any $x\in X$, the Lagrangian
  subspaces $\mathcal E(x), \mathcal F(x) \subset \mathcal V(x)$ have
  a common Lagrangian complement $M$ by Lemma \ref{three.lagr} below.
  Over some neighborhood $U$ of $x$, this $M$ lifts to a Lagrangian
  subbundle $\mathcal M \subset \mathcal V \rest U$ which is a common
  complement of $\mathcal E \rest U$ and of $\mathcal F \rest U$.
  This gives (a).  Part (b) follows from a short but straightforward
  computation using Lemma \ref{graph.alt}, while part (c) follows from
  the structure of diagram \eqref{mu.diagram}.
\end{proof}

Proposition \ref{p.locally.alternating} has a natural analogue
converting pairs of Lagrangian subbundles of a twisted symplectic
bundle into a locally symmetric map of vector bundles.  We leave the
exact formulation to the reader.

The existence of common Lagrangian complements, even over small
fields, follows from the following elementary but obscure lemma.


\begin{lemma}
\label{three.lagr}
Suppose that $q$ is a nondegenerate quadratic form on an
even-dimensional vector space $V$, and that $U, U' \subset (V,q)$ are
two Lagrangian subspaces such that $\dim (U \cap U') \equiv \dim (U)
\pmod 2$.  Then there exists a Lagrangian subspace $L \subset (V,q)$
complementary to $U$ and to $U'$.
\end{lemma}

\begin{proof}
Let $K = U \cap U'$.  Then $U = U^\perp \subset K^\perp$, and
similarly $U' \subset K^\perp$.  On dimensional grounds, we must
indeed have $U + U' = K^\perp$.  As a result $U/K$ and $U'/K$ are
complementary Lagrangian subspaces of $K^\perp/K$.  Moreover, by
hypothesis they are even-dimensional.

Let $f_1,\dots,f_{2m}$ be a system of vectors in $U$ mapping onto a
basis of $U/K$.  Since $U/K$ and $U'/K$ are complementary Lagrangian
subspaces of $K^\perp/K$, the symmetric bilinear form $b$ associated
to $q$ induces a perfect pairing between them.  So there exists a
system of vectors $g_1, \dots, g_{2m}$ in $U'$ such that $b(f_i,g_j) =
\delta_{ij}$ for all $i,j$.  

Let $N$ be the subspace spanned by the $f_i$ and $g_j$.  Then $q
\rest{N}$ is nondegenerate, so there is an orthogonal direct sum
decomposition $V = N \oplus N^\perp$ such that $q\rest{N}$ and
$q\rest{N^\perp}$ are both nondegenerate.  Moreover, $K \subset
(N^\perp, q \rest{N^\perp})$ is a Lagrangian subspace, for which there
exists a complementary Lagrangian subspace $P$ by our previous
remarks.  Let $p_1, \dots, p_r$ be a basis of $P$.  One may now check
that
\[
f_1+g_2, f_2-g_1, f_3+g_4, f_4-g_3, \dots, f_{2m-1}+g_{2m},
f_{2m}-g_{2m-1}, p_1, \dots, p_r
\]
form a basis for a Lagrangian subspace $L \subset (V,q)$ complementary
to both $U$ and $U'$. 
\end{proof}

It is amusing to note that Lemma \ref{three.lagr} is optimal in the
following sense.  Suppose that $k = \mathbb Z/2\mathbb Z$, that $V =
k^4$, and that $q = x_1 x_3 + x_2 x_4$.  Let $U$, $U'$ and $U''$ be
the Lagrangian subspaces given by $x_1 = x_2 = 0$, by $x_3 = x_4 = 0$,
and by $x_1 + x_3 = x_2 + x_4 = 0$, respectively.  Each subspace is of
dimension $2$, and each pair of subspaces has intersection of
dimension $0$.  But there is no Lagrangian subspace of $V$ which is
complementary to $U$, to $U'$ and to $U''$.






\subsection{Degeneracy Loci} 


Let $\mathcal E$ be a vector bundle of odd (resp.\ even)
rank, $L$ a line bundle, and $\zeta: \mathcal E \to \mathcal E^*(L)$ an
alternating map.  If $m$ is an odd (resp.\ even) integer, then the
degeneracy locus
%
\begin{equation}
\label{alt.degen}
Z_m (\zeta) := \{ x \in X \mid \rk (\zeta(x)) \leq \rk(\mathcal E) -
m \}
\end{equation}
%
has expected codimension  $m(m-1)/2$.  The natural scheme structure
on $Z_m (\zeta)$ is defined locally by the ideal $\Pf_{\rk(\mathcal
E)-m}(\zeta)$ generated by the $(\rk(\mathcal E)-m)$-Pfaffians
of the alternating map $\zeta$.  These loci have been studied notably
in Harris-Tu \cite{HarrisTu}, and from a different point of view in
Okonek \cite{Okonek} and Walter \cite{Walter}.

Harris has remarked (see \cite{FP}, p.\ 70) that
$Z_m(\zeta)$ is a special case of a Lagrangian degeneracy locus
defined set-theoretically as follows.
Let $\mathcal E, \mathcal F \subset (\mathcal V,q)$ be Lagrangian
subbundles of a twisted orthogonal bundle, and let
%
\begin{equation}
\label{lagr.degen}
Z_{m}(\mathcal E,\mathcal F) := \{ x\in X \mid \dim_{k(x)}[\mathcal
E(x)\cap \mathcal F(x)]\geq m \}. 
\end{equation}
%
The natural fundamental classes of these loci are discussed in 
Fulton-Pragacz \cite{FP} Chap.\ 6, where they are given as polynomials
in the Chern classes of $\mathcal E$, $\mathcal F$, and $L$.


We now define a natural scheme structure on these Lagrangian
degeneracy loci.  By \eqref{eq.even.rank} we may assume that
$\dim_{k(x)}[\mathcal E(x)\cap \mathcal F(x)] \equiv \rk(\mathcal E)
\pmod 2$ for all $x \in X$.  Then by Proposition
\ref{p.locally.alternating} any $x \in X$ has a neighborhood $U$ over
which $\mathcal E \rest{U}$ and $\mathcal F \rest U$ have a common
Lagrangian complement $\mathcal M$ where the map $\lambda \rest U$ may
be identified with an alternating map $\mu_{\mathcal M} : \mathcal
M^*(L) \to \mathcal M$.  We define the scheme structure on
$Z_{m}(\mathcal E,\mathcal F)$ by
%
\begin{equation}
\label{scheme.str}
\mathcal I_{Z_{m} (\mathcal E, \mathcal F)} \rest U :=
\Pf_{\rk(\mathcal E)-m}(\mu_{\mathcal M}).
\end{equation}
%
This scheme structure is well-defined because the ideal of Pfaffians
is independent of the choice of a local Lagrangian complement by
Proposition \ref{p.locally.alternating}(c).  Since $Z_m(\mathcal E,
\mathcal F)$ is locally a degeneracy locus of an alternating map, its
expected codimension is $m(m -1)/2$.

Given an alternating map, we get identical scheme structures:

\begin{lemma} If $\zeta : \mathcal E \to \mathcal E^*(L)$ is
  alternating, and $m \equiv \rk(\mathcal E) \pmod 2$, then the
  degeneracy loci $Z_m(\zeta)$ and $Z_m(\mathcal E,
  \Gamma_\zeta(\mathcal E))$ given in \eqref{alt.degen} and
  \eqref{lagr.degen} coincide.
\end{lemma}

Our interest in this paper is in the locus $Z :=
Z_3(\mathcal E, \mathcal F)$ of expected codimension $3$.




\section{Subcanonical subschemes}
\label{Subcanonical}

In this section we recall what we mean by a subcanonical subscheme.  We
then prove one of the main results of the paper.

In the simplest version of the definition, a smooth projective
subvariety $Y \subset \mathbb P^N$ is {\em subcanonical} if its
canonical divisor class was a multiple of the hyperplane divisor
class, i.e.\ if $K_Y = \ell H$ in the Picard group of $Y$.  More
generally, a smooth closed subvariety of a smooth variety $Y \subset
X$ is subcanonical if there exists a line bundle $L$ on $X$ such that
$K_Y = L \rest Y$.

In the introduction we gave a more complicated definition for a
(strongly) subcanonical subscheme of a general scheme which reduces to
the above one for smooth varieties.  Basically, a closed subscheme $Z
\subset X$ is {\em subcanonical} of codimension $3$ if it is
relatively Cohen-Macaulay of codimension $3$ and there exists a line
bundle $L$ on $X$ and an isomorphism $\eta: \mathcal O_Z
\xrightarrow{\sim} \omega_{Z/X}(L)$ making $\omega_{Z/X}$ the
restriction of a line bundle on $X$.  The subscheme $Z \subset X$ is
{\em strongly subcanonical} if in addition $\mathcal O_Z$ is of finite
local projective dimension over $\mathcal O_X$, and if $\eta \in
\Ext^3_{\mathcal O_X}(\mathcal O_Z,L)$ lifts to $\Ext^2_{\mathcal
  O_X}(\mathcal I_Z,L)$.  These are conditions \cond1--\cond4 of the
introduction.


One of the two main results of this paper is the following theorem.

\begin{theorem}
\label{second.v}
Suppose that $(\mathcal V,q)$ is a twisted orthogonal bundle over a
locally noetherian scheme $X$ with values in a line bundle $L$.
Suppose that $\mathcal E, \mathcal F \subset (\mathcal V,q)$ are
Lagrangian subbundles such that $\dim_{k(x)} \bigl[ \mathcal E(x) \cap
\mathcal F(x) \bigr]$ is odd for all $x \in X$.  Write $L_{\mathcal
E,\mathcal F,\mathcal V} := \det(\mathcal E) \otimes \det(\mathcal F)
\otimes \det(\mathcal V)^{-1}$. Suppose that the submaximal minors of
the composite map $\lambda : \mathcal E \hookrightarrow \mathcal V
\cong \mathcal V^*(L) \twoheadrightarrow \mathcal F^*(L)$ generate an
ideal sheaf $\mathcal I$ of grade $3$ \textup(the expected
value\textup).

Then the ideal sheaf of the closed subscheme \textup(cf.\ 
\eqref{scheme.str}\textup)
%
\[
Z ={Z_{3}(\mathcal E,\mathcal F)}= 
\{ x \in X \mid \dim_{k(x)} \left[ \mathcal E(x) \cap \mathcal
F(x) \right] \geq 3 \},
\]
%
has grade $3$ and satisfies $\mathcal I_Z^2 = \mathcal I$.  The sheaf
$\mathcal O_Z$ has locally free resolutions
%
\begin{subequations}
\begin{gather}
\label{res.1}
0 \to L_{\mathcal E,\mathcal F,\mathcal V} \to \mathcal E(M)
\xrightarrow{\,\lambda\,} \mathcal F^*(L\otimes M) \to \mathcal O_X
\to \mathcal O_Z \to 0, \\
\label{res.2}
0 \to L_{\mathcal E,\mathcal F,\mathcal V} \to \mathcal F(M)
\xrightarrow{-\lambda^*} \mathcal E^*(L\otimes M) \to \mathcal O_X \to
\mathcal O_Z \to 0.
\end{gather}
\end{subequations}
%
with $M$ a line bundle such that $M^{\otimes 2} \cong L_{\mathcal
  E,\mathcal F,\mathcal V} \otimes L^{-1}$.  Moreover, the natural
isomorphism between \eqref{res.2} and the dual of \eqref{res.1}
defines an isomorphism
%
\[
\eta: \mathcal O_Z \xrightarrow{\cong} \shExt_{\mathcal O_X}^3
(\mathcal O_Z, L_{\mathcal E,\mathcal F,\mathcal V}) =: \omega_{Z/X}
(L_{\mathcal E,\mathcal F,\mathcal V}),
\]
%
with respect to which $Z$ is \textup(strongly\textup) subcanonical of
codimension $3$ in $X$, i.e.\  satisfies conditions \cond1-\cond4 of
the introduction.
\end{theorem}

\begin{corollary}
If, in the situation of the theorem, $X$ is locally Gorenstein, then
so is $Z$, and $\omega_Z \cong \omega_X(L_{\mathcal E,\mathcal
F,\mathcal V}^{-1}) \rest Z$.
\end{corollary}


The statement of the theorem remains true even if $X$ is not
noetherian provided one defines grade as in Eagon-Northcott \cite{EN}
and Northcott \cite{Northcott}.  The only difference in the proofs is
that one uses the non-noetherian generalizations of the
Buchsbaum-Eisenbud structure theorems found in these references.


\begin{proof}[Proof of Theorem \ref{second.v}]
Let $N = \mathcal E \cap \mathcal F$ be the kernel of the natural map
\[
0 \to N \xrightarrow{\sm{i\\j}} \mathcal E \oplus \mathcal F
\xrightarrow{\sm{f & -g}} \mathcal V.
\]
If $\beta: \mathcal V \xrightarrow{\sim} \mathcal V^*(L)$ is the
isomorphism induced by the quadratic form $q$, and $\lambda := g^*
\beta f$, then we get a commutative diagram
%
\begin{diagram}[h=1.5em,LaTeXeqno]
\label{pair}
&& \mathcal E &&\rTo ^\lambda && \mathcal F^*(L) \\
& \ruInto^i && \rdInto^f && \ruOnto^{g^*\beta} && \rdTo^{j^*} \\
N && && \mathcal V &&&& N^{-1} \otimes L. \\
& \rdInto_j && \ruInto^g && \rdOnto^{f^*\beta} && \ruTo_{i^*} \\
&& \mathcal F && \rTo_{\lambda^*} && \mathcal E^*(L)
\end{diagram}
%
Since the diagonals are short exact sequences, the kernels of
$\lambda$ and of $\lambda^*$ are both equal to $N$.  In addition,
$f i = g j$.


We claim that $N$ is a line bundle, and that the complexes
%
\begin{subequations}
\begin{gather}
\label{N}
0 \to N \xrightarrow{\,i\,} \mathcal E \xrightarrow{\,\lambda\,}
\mathcal F^*(L) \xrightarrow{j^*} N^{-1}\otimes L \\
\label{N2}
0 \to N \xrightarrow{\,j\,} \mathcal F \xrightarrow{-\lambda^*}
\mathcal E^*(L) \xrightarrow{i^*} N^{-1}\otimes L 
\end{gather}
\end{subequations}
%
are exact and are locally free resolutions of $\mathcal
O_Z(N^{-1}\otimes L)$ for the subscheme $Z =Z_{3}(\mathcal E,\mathcal
F)\subset X$ of grade $3$, with $\mathcal I_Z^2 = \mathcal I$.  We
will prove these claims locally by making $\lambda$ locally
alternating and applying the Buchsbaum-Eisenbud structure theorem
\cite{BE}.

Now the rank of the vector bundles $\mathcal E$ and $\mathcal F$ may
be even or odd.  If the rank is even, we may use \eqref{eq.even.rank}
to replace $\lambda$ by 
\[
\mathcal E \oplus \mathcal O_X \xrightarrow{\sm{\lambda & 0 \\ 0 & 1}}
\mathcal F^*(L) \oplus \mathcal O_X
\]
without changing the kernel and cokernel of $\lambda$.  Thus we may
assume that $\mathcal E$ and $\mathcal F$ are of odd rank.

By hypothesis, $\dim_{k(x)} \bigl[ \mathcal E(x) \cap \mathcal F(x)
\bigr]$ is also odd for all $x \in X$.  Therefore we may apply
Proposition \ref{p.locally.alternating} to see that our complexes
\eqref{N} and \eqref{N2} are locally isomorphic to complexes
%
\begin{equation}
\label{BE.cpx}
0 \to N \rest U \xrightarrow{\,p\,} \mathcal M^*(L)
\xrightarrow{\mu_{\mathcal M}} \mathcal M \xrightarrow{p^*} (N^{-1}
\otimes L) \rest U
\end{equation}
%
with $\mu_{\mathcal M}$ alternating with kernel $p = \delta^* f i =
\delta^* g j$ in the notation of diagrams \eqref{mu.diagram} and
\eqref{pair}.  Now $\mathcal E$ and $\mathcal M$ are of odd rank,
$\mu_M$ is alternating, and the ideal $\mathcal I$ generated by its
submaximal minors is of grade $3$.  So the Buchsbaum-Eisenbud
structure theorem \cite{BE} applies.  Therefore the kernel $N \rest
U$ is a line bundle, the map $p$ is given by the submaximal Pfaffians
of $\mu_{\mathcal M}$, and the complex \eqref{BE.cpx} is exact and is
a resolution of $\mathcal O_Z(N^{-1}\otimes L) \rest U$.  We can also
identify the ideal sheaf $\mathcal I$ generated by the submaximal
minors of $\lambda$ with $\mathcal I_Z^2$.  This works because on $U$
the sheaf $\mathcal I_Z \rest U$ is generated by the submaximal
Pfaffians $p_1, \dots , p_n$ of the alternating map $\mu_M$ of
\eqref{mu.diagram}, while $\mathcal I \rest U$ is generated by the
submaximal minors.  Since the $(i,j)$-th submaximal minor is $\pm p_i
p_j$ (\cite{BE} Appendix), we do indeed get $\mathcal I_Z^2 \rest U =
\mathcal I \rest U$.  This verifies our claims.

Now we set $M := N \otimes L^{-1}$ and twist.  We get two dual
resolutions
%
\begin{subequations}
\begin{align}
\label{normal.res}
0 \to M^{\otimes 2} \otimes L \to \mathcal E(M) &
\xrightarrow{\,\lambda\,} \mathcal F^*(L\otimes M) \to \mathcal O_X
\to \mathcal O_Z \to 0, \\ 
\label{normal.res2}
0 \to M^{\otimes 2} \otimes L \to \mathcal F(M) &
\xrightarrow{-\lambda^*} \mathcal E^*(L\otimes M) \to \mathcal O_X \to
\mathcal O_Z \to 0.
\end{align}
\end{subequations}
%
The alternating product of the determinant line bundles in each
resolution is trivial, and therefore $M^{\otimes 2} \otimes L \cong
L_{\mathcal E,\mathcal F,\mathcal V}$.

Let us now verify that $Z \subset X$ satisfies conditions
\cond1--\cond4 of the introduction.  The duality between the two
resolutions of $\mathcal O_Z$ shows that $Z \subset X$ is relatively
Cohen-Macaulay of codimension $3$.  The duality also induces an
isomorphism $\eta : \mathcal O_Z \xrightarrow{\sim} \shExt^3_{\mathcal
  O_X} (\mathcal O_Z, L_{\mathcal E,\mathcal F,\mathcal V})$, making
$Z \subset X$ subcanonical.  Clearly $\mathcal O_Z$ is of finite local
projective dimension.  Moreover, $\eta$ is the Yoneda extension class
of \eqref{normal.res} and is thus the image of the class in
$\Ext^2_{\mathcal O_X}(\mathcal I_Z,M^{\otimes 2} \otimes L)$ of
\[
0 \to M^{\otimes 2} \otimes L \to \mathcal E(M) \to \mathcal
F^*(L\otimes M) \to \mathcal I_Z \to 0.
\]
So $Z \subset X$ is strongly subcanonical with respect to $\eta$.
\end{proof}




\section{The split case of Theorem \ref{second.v}}
\label{lagrange}


In this section we analyze a special case of Theorem \ref{second.v}
for which we actually have a slightly more structured result.  This
version includes many examples of interest, and we will use it in
\cite{EPW2} to construct non-Pfaffian subcanonical subschemes of
codimension $3$ in $\mathbb P^n$.

\begin{theorem}
\label{first.v}
Let $\mathcal F$ be a vector bundle of rank $n$ and $L$ a line bundle
on a locally noetherian scheme $X$.  Let $\mathcal F \oplus \mathcal
F^*(L)$ be the hyperbolic twisted orthogonal bundle.  Suppose that
%
\begin{equation}
\label{inclusion}
\mathcal E \rInto^{\sm{\psi \\ \phi}} \mathcal F \oplus \mathcal
F^*(L)
\end{equation}
%
is a Lagrangian subbundle such that $\dim_{k(x)} \left[ \mathcal E(x)
\cap \mathcal F^*(L)(x) \right]$ is odd for all $x \in X$.  Let
$L_{\mathcal E,\mathcal F} := \det(\mathcal E) \otimes \det(\mathcal
F)^{-1}$.

If the sheaf of ideals $\mathcal I$ generated by the submaximal minors
of $\psi$ is of grade $3$ \textup(the expected value\textup), then
ideal sheaf of the closed subscheme 
\[
Z ={Z_{3}(\mathcal E,\mathcal F^*(L))}= 
\{ x \in X \mid \dim_{k(x)} \left[ \mathcal E(x) \cap \mathcal
F^*(L)(x) \right] \geq 3 \},
\]
has grade $3$ and satisfies $\mathcal I_Z^2 = \mathcal I$.  There is a
commutative diagram with exact rows
%
\begin{small}
\begin{diagram}[LaTeXeqno]
\label{dual.diag}
%
0 & \rTo & L_{\mathcal E,\mathcal F} & \rTo & \mathcal E(M) & \rTo
^\psi & \mathcal F(M)& \rTo & \mathcal O_X & \rOnto & \mathcal O_Z \\
%
&& \dSame && \dTo <\phi && \dTo >{\phi^*} && \dSame && \dTo >\eta
<\cong \\
% 
0 & \rTo & L_{\mathcal E,\mathcal F} & \rTo & \mathcal F^*(L\otimes M)
& \rTo ^{-\psi^*} & \mathcal E^*(L\otimes M)& \rTo & \mathcal O_X &
\rOnto & \shExt^3_{\mathcal O_X} (\mathcal O_Z, L_{\mathcal E,\mathcal
G})
%
\end{diagram}%
\end{small}%
%
with $M$ a line bundle on $X$ such that $M^{\otimes 2} \cong L^{-1}
\otimes L_{\mathcal E,\mathcal F}$ and with $\phi^* \psi$ alternating.
Moreover, $\omega_{Z/X} \cong L^{-1}_{\mathcal E,\mathcal F} \rest Z$,
and $Z$ is strongly subcanonical of codimension $3$ in $X$ with
respect to $\eta$.
\end{theorem}


\begin{corollary}
If, in the situation of the theorem, $X$ is locally Gorenstein, then
so is $Z$, and $\omega_Z \cong \omega_X(L_{\mathcal E,\mathcal
F}^{-1}) \rest Z$.
\end{corollary}

\begin{proof}[Proof of Theorem \ref{first.v}]
  The only things we need to show which do not already follow from
  Theorem \ref{second.v} are that \eqref{dual.diag} commutes and that
  $\phi^*\psi$ is alternating.  But $\mathcal E$ is a Lagrangian
  subbundle, so any local section $e \in \Gamma(U,\mathcal E)$
  satisfies
%
\begin{equation}
\label{isotropic}
0 = q(\psi(e)\oplus\phi(e)) = \langle \psi(e),\phi(e) \rangle =
\langle \phi^*\psi(e),e \rangle.
\end{equation}
%
Thus $\phi^*\psi$ is alternating, and the central part of diagram
\eqref{dual.diag} commutes.  The rest is easy and left to the reader.
\end{proof}

\subsection{Pfaffian subschemes}
Okonek's Pfaffian subschemes \cite{Okonek} are the special case of the
construction of Theorem \ref{first.v} with $\mathcal E = \mathcal
F^*(L)$ and $\phi = 1$.  For if
\[
\mathcal E \rInto^{\sm{\psi \\ 1}} \mathcal E^*(L) \oplus \mathcal E
\]
is a Lagrangian subbundle, then $\psi$ is alternating by Lemma
\ref{graph.alt} or by \eqref{isotropic}.  So in this case the two
resolutions of \eqref{dual.diag} reduce to
\[
0 \to L \otimes M^{\otimes 2} \to \mathcal E(M) \xrightarrow{\psi}
\mathcal E^*(L \otimes M) \to \mathcal O_X \to \mathcal O_Z \to 0,
\]
with $\psi$ alternating.  Thus $Z \subset X$ is one of Okonek's
Pfaffian subschemes.




\subsection{From non-split to split bundles}
When the orthogonal bundle $(\mathcal V,q)$ of Theorem \ref{second.v}
does not split as $\mathcal F \oplus \mathcal F^*(L)$, we cannot fill
in the diagram \eqref{dual.diag} with direct arrows
%
\begin{diagram}[LaTeXeqno]
\label{dash}
0 & \rTo & L_{\mathcal E,\mathcal F,\mathcal V} & \rTo ^i & \mathcal
E(M) & \rTo ^\lambda & \mathcal F^*(L\otimes M) & \rTo ^{j^*} &
\mathcal O_X & \rTo & 0\\ 
&& \dSame && \dDashto && \dDashto && \dSame \\ 
0 & \rTo & L_{\mathcal E,\mathcal F,\mathcal V} & \rTo ^j & \mathcal
F(M) & \rTo ^{-\lambda^*} & \mathcal E^*(L\otimes M) & \rTo ^{i^*} &
\mathcal O_X & \rTo & 0.
\end{diagram}
%
Nevertheless, by modifying the orthogonal bundle and its Lagrangian
subbundles, we can usually realize the same degeneracy locus as a
Lagrangian degeneracy locus of a split orthogonal bundle.  

We know two strategies to accomplish this under different hypotheses.
One is to apply the converse structure theorem (Theorem
\ref{converse}).  The other strategy works whenever the quadratic form
$q \in \Gamma(X,(S^2 \mathcal V^*)(L))$ is the image of an $\alpha \in
\Gamma(X,(\mathcal V^* \otimes \mathcal V^*)(L))$, (for instance if $2
\in \Gamma(X,\mathcal O_X)^\times$), then $(\mathcal V,q) \perp
(\mathcal V,-q)$ is hyperbolic because of the inverse isometries
%
\begin{diagram}
(\mathcal V,q) \perp (\mathcal V,-q) & \pile{\rTo ^{\sm{1&1\\ \alpha &
-\alpha^*}} \\ \lTo _{\sm{\beta^{-1}\alpha^* & \beta^{-1} \\ \beta^{-1}\alpha & -\beta^{-1} }}} &
\mathcal V \oplus \mathcal V^*(L)
\end{diagram}
%
with $\beta := \alpha+\alpha^*$ the nonsingular symmetric bilinear
form associated to $q$.

The composite map $\mathcal E \oplus \mathcal F \hookrightarrow
(\mathcal V,q)\perp(\mathcal V,-q) \cong \mathcal V \oplus \mathcal
V^*(L)$, or more explicitly
\[
\mathcal E \oplus \mathcal F \xrightarrow{\sm{f&g\\ \alpha f &
-\alpha^* g}} \mathcal V \oplus \mathcal V^*(L)
\]
embeds $\mathcal E \oplus \mathcal F$ as a Lagrangian subbundle of the
hyperbolic bundle $\mathcal V \oplus \mathcal V^*(L)$.  We may then
fill in the diagram \eqref{dash} with a sequence of quasi-isomorphisms
going in both directions:
%
\begin{diagram}
0 & \rTo & L_{\mathcal E,\mathcal F,\mathcal V} & \rTo & \mathcal E(M)
& \rTo ^{g^*\beta f} & \mathcal F^*(L\otimes M) & \rOnto & \mathcal O_X \\ 
&& \dSame && \uOnto <{\sm{1&0}} && \uOnto >{g^*\beta} && \dSame \\
0 & \rTo & L_{\mathcal E,\mathcal F,\mathcal V} & \rTo & (\mathcal E
\oplus \mathcal F)(M) & \rTo ^{\sm{f&g}} & \mathcal V(M) & \rOnto &
\mathcal O_X \\ 
&& \dSame && \dTo <{\sm{\alpha f & -\alpha^* g}} && \dTo >{\sm{f^*\alpha^* \\ -g^*
\alpha^*}} && \dSame \\
0 & \rTo & L_{\mathcal E,\mathcal F,\mathcal V} & \rTo & \mathcal
V^*(L\otimes M) & \rTo _{\sm{-f^*\\-g^*}} & (\mathcal E^*\oplus
\mathcal F^*)(L\otimes M) & \rOnto & \mathcal O_X \\ 
&& \dSame && \uInto <{\beta g} && \uInto >{\sm{1\\0}} && \dSame \\
0 & \rTo & L_{\mathcal E,\mathcal F,\mathcal V} & \rTo & \mathcal F(M)
& \rTo _{-f^*\beta g} & \mathcal E^*(L\otimes M) & \rOnto & \mathcal O_X 
\end{diagram}
%


Another way of looking at this is to say: let $\mathcal P_\cpx$ and
$\mathcal Q_\cpx$ denote the first two lines of the last diagram.  If
one has $\mathcal V \cong \mathcal F \oplus \mathcal F^*(L)$ as in
Theorem \ref{first.v}, then the chain map of that theorem is induced
by a twisted shifted nonsingular quadratic form on the chain complex
$\mathcal P_\cpx$ given by a chain map $D_2(\mathcal P_\cpx) \to
L_{\mathcal E,\mathcal F,\mathcal V}[3]$.  In general, no such chain
map exists, but if we can lift $q$ to $\alpha$ as above, then there is a
pair of chain maps
%
\begin{equation}
\label{frac.quad}
D_2(\mathcal P_\cpx) \xleftarrow{\,\sim} D_2(\mathcal Q_\cpx) \to
L_{\mathcal E,\mathcal F,\mathcal V}[3]
\end{equation}
%
with the first arrow a quasi-isomorphism.  This means that in Theorem
\ref{second.v}, we are also dealing with a sort of twisted shifted
nonsingular quadratic form on $\mathcal P_\cpx$, but only in the
derived category.












\section{Local equations for the degeneracy locus}
\label{local.eq}

Let $Z \subset X$ be a subcanonical subscheme of codimension $3$ which
is the degeneracy locus as in diagram \eqref{dual.diag}.  We give two
strategies for computing equations which define this degeneracy locus
locally.  The first is based on the idea of using a common Lagrangian
complement to skew-symmetrize $\lambda$ as in Proposition
\ref{p.locally.alternating} and in the proof of Theorem
\ref{second.v}.  The second is based on finding standard local forms
for a pair of Lagrangian submodules.


\subsection{Strategy 1: Alternating homotopies}
We start with a pair of Lagrangian subbundles $\mathcal E$ and
$\mathcal F^*(L)$ of a twisted orthogonal bundle.  As in the proof of
Theorem \ref{second.v}, we may reduce to the case where the rank of
$\mathcal E$ and $\mathcal F$ are odd using \eqref{eq.even.rank}.
Also since we are working locally, we may assume that the orthogonal
bundle splits as $\mathcal F \oplus \mathcal F^*(L)$ because of Lemma
\ref{affine.lagr.subspace}.  Then locally $\mathcal E$ and $\mathcal
F^*(L)$ have a common Lagrangian complement $\mathcal M$ according to
Proposition \ref{p.locally.alternating}(a).  This $\mathcal M$ is
necessarily the graph of an alternating map $h : \mathcal F \to
\mathcal F^*(L)$ by Lemma \ref{graph.alt}.  We use this $h$ as an
alternating local homotopy to transform the commutative diagram on the
left below into the one on the right
%
\begin{equation}
\begin{diagram}[inline]
\label{center}
\mathcal E & \rTo ^\psi & \mathcal F \\
\dTo <\phi & \ldDotsto <h & \dTo >{\phi^*} \\
\mathcal F^*(L) & \rTo _{-\psi^*} & \mathcal E^*(L)
\end{diagram}
\qquad \quad
\begin{diagram}[inline]
\mathcal E & \rTo ^{\psi} & \mathcal F  \\
\dTo <{\phi - h \psi} && \dTo >{\phi^* + \psi^*h}  \\
\mathcal F^*(L)  & \rTo _{-\psi^*} & \mathcal E^*(L)
\end{diagram}
\end{equation}
%
Then $\phi -h \psi$ is an isomorphism because it is the projection of
$\mathcal E$ onto $\mathcal F^*(L)$ along their common complement
$\mathcal M$.  The dual map $\phi^* + \psi^*h$ is also an isomorphism.
Thus diagram \eqref{dual.diag}, with a symmetric quasi-isomorphism
between the resolutions of $\mathcal O_Z$, can be modified locally by
an alternating homotopy to get a diagram (valid locally) with a
symmetric isomorphism from the resolution into its dual
%
\begin{small}
\begin{diagram}
%
0 & \rTo & L_{\mathcal E,\mathcal F} & \rTo & \mathcal E(M) & \rTo
^\psi & \mathcal F(M)& \rTo & \mathcal O_X & \rOnto & \mathcal O_Z \\
%
&& \dSame && \dTo <{\phi-h\psi} && \dTo >{\phi^*+\psi^*h} && \dSame &&
\dTo >\eta
<\cong \\
% 
0 & \rTo & L_{\mathcal E,\mathcal F} & \rTo & \mathcal F^*(L\otimes M)
& \rTo ^{-\psi^*} & \mathcal E^*(L\otimes M)& \rTo & \mathcal O_X &
\rOnto & \shExt^3_{\mathcal O_X} (\mathcal O_Z, L_{\mathcal E,\mathcal
G})
%
\end{diagram}%
\end{small}%
%
Thus locally $\mathcal O_Z$ has a symmetric resolution
\[
0 \to L_{\mathcal E,\mathcal F} \to \mathcal E(M) \xrightarrow{\mu}
\mathcal E^*(L\otimes M) \to \mathcal O_X \to \mathcal O_Z \to 0
\]
where $\mu = \phi^*\psi+\psi^*h\psi$ is alternating (and is
essentially the map $\mu_{\mathcal M}$ of \eqref{mu.diagram} and
Proposition \ref{p.locally.alternating}).  The submaximal Pfaffians of
$\mu$ give local equations for the degeneracy locus $Z$.

The choice of a another common Lagrangian complement $\mathcal M$
gives a different alternating homotopy $h$, and vice-versa.




\subsection{Strategy 2: Standard local forms}
Suppose that $R$ is a commutative local ring with maximal ideal
$\mathfrak m$ and residue field $k := R/\mathfrak m$.  Let $F$ be a
free $R$-module of finite rank, and equip $F \oplus F^*$ with the
hyperbolic quadratic form.  Suppose that $E \subset F \oplus F^*$ is a
Lagrangian submodule, i.e.\ a totally isotropic direct summand of rank
equal to that of $F$.  Let $\psi : E \to F$ and $\phi: E \to F^*$ be
the two components of the inclusion.

\begin{lemma}
\label{form.for.matrix}
In the above situation, there exist bases of $E$ and $F$ and a dual
basis of $F^*$ in which the matrices of $\psi$ and $\phi$ are of the
form
%
\begin{align*}
\psi & = \begin{pmatrix} \beta & 0 \\ 0 & I \end{pmatrix} &
\phi & = \begin{pmatrix} I & 0 \\ 0 & \gamma \end{pmatrix}
\end{align*}
%
with the blocks in the two matrices of the same size, and with $\beta$ and
$\gamma$ alternating.
\end{lemma}

\begin{proof}
We begin by choosing bases for $E$ and $F$ and the dual basis of
$F^*$, so that we can treat $\psi$ and $\phi$ as matrices.  Since
$E$ is a direct summand of $F \oplus F^*$, the columns of the total
matrix $\sm{\psi \\ \phi}$ are linearly independent even modulo
$\mathfrak m$.  Moreover, by \eqref{isotropic} above $\phi^*\psi$ is
an alternating matrix because $E \subset F \oplus F^*$ is a totally
isotropic submodule.

We now begin a series of row and column operations on $\psi$ and
$\phi$ which will put them into the required form.  The column
operations (resp.\ row operations) correspond to changes of basis of
$E$ (resp.\ of $F$ and $F^*$) and to the action of invertible matrices
$P$ (resp.\ $Q$) on $\psi$ and $\phi$ via $\psi \rightsquigarrow
Q^{-1}\psi P$ and $\phi \rightsquigarrow Q^* \phi P$.

Choose a maximal invertible minor of $\phi$.  After row and column
operations, we can assume that the corresponding submatrix is an
identity block lying in the upper left corner of $\phi$ and that the
blocks below and to the right of it are $0$.  Thus we can assume that
%
\begin{align*}
\phi & = \begin{pmatrix} I & 0 \\ 0 & \delta \end{pmatrix} &
\psi & = \begin{pmatrix} \psi_{11} & \psi_{12} \\ \psi_{21} &
\psi_{22} \end{pmatrix}
\end{align*}
%
where the blocks of the two matrices are of the same size, the
on-diagonal blocks are square, and the coefficients of $\delta$ lie in
$\mathfrak m$.  Since 
\[
\phi^* \psi = \begin{pmatrix} \psi_{11} & \psi_{12} \\ \delta^*
\psi_{21} & \delta^* \psi_{22} \end{pmatrix}
\]
is alternating, we see that all the coefficients of $\psi_{12}$ also
lie in $\mathfrak m$.  Hence all the coefficients in the last block of
columns of $\sm{\psi \\ \phi}$ lie in $\mathfrak m$ except those in
$\psi_{22}$.  Since these columns must be linearly independent modulo
$\mathfrak m$, it follows that $\psi_{22}$ must be invertible.
Applying a new set of column operations to $\phi$ and $\psi$, we may
assume that $\psi = \sm{\psi_{11} & \epsilon \\ \psi_{21} & I}$ and
that $\phi = \sm{I & 0 \\ 0 & \gamma}$.  Moreover, $\phi^* \psi$
remains alternating, which actually means that $\psi_{11}$ and
$\gamma$ are alternating, and $\epsilon = -\psi_{21}^* \gamma$.  A
final set of row and column operations using the matrices $Q = \sm{I &
\psi_{21}^* \gamma \\ 0 & I}$ and $P = \sm{I & 0 \\ -\psi_{21} & I}$
puts $\psi$ and $\phi$ into the form required by the lemma.
\end{proof}


\begin{corollary}
  Let $R$ be a commutative local ring with residue field $k$, let $F$
  be a free $R$-module of odd rank, and let $E \subset F \oplus F^*$
  be a Lagrangian submodule such that $\dim_k \left[ (E\otimes k) \cap
    (F \otimes k) \right]$ is odd.  Let $\psi: E \to F$ and $\phi: E
  \to F$ be the two components of the inclusion.

\textup{(a)} The determinant of $\phi$ is of the form $\det \phi =
af^2$ with $a$ invertible.

\textup{(b)} If $\det(\phi)$ is not a zero-divisor, and if $\psi$
degenerates along an ideal $I$ of height and grade $3$ \textup(as
expected\textup), then this ideal is the conductor $I =
\Pf(\phi^*\psi) : f$ where $\Pf(\phi^*\psi)$ is the ideal generated by
the submaximal Pfaffians of $\phi^* \psi$, and where $f$ is as in part
\textup{(a)}.

\end{corollary}

\begin{proof}
(a) We put the matrices of $\phi$ and of $\psi$ in the special form of
Lemma \ref{form.for.matrix}, and we set $f := \Pf(\gamma)$.  The
determinant of the matrix of $\phi$ is then $f^2$.  Consequently the
determinant of the matrix of $\phi$ with respect to any bases of $E$
and $F$ is of the form $af^2$, with $a$ an invertible element of $R$
coming from the determinants of the change-of-basis matrices.

(b) Using the special forms for $\phi$ and $\psi$ given in Lemma
\ref{form.for.matrix}, we find that $I$ is generated by the submaximal
Pfaffians $p_1, \dots, p_{2s+1}$ of $\beta$, while the ideal
$\Pf(\phi^*\psi)$ is generated by $fp_1, \dots , fp_{2s+1}$.  Since we
suppose $\det(\phi)$ and therefore $f$ are not zero-divisors, this
gives (b).
\end{proof}







\section{The converse structure theorem}
\label{converse.theorem}

In this section we prove a structure theorem for strongly subcanonical
subschemes of codimension $3$ which is a converse to Theorems
\ref{second.v} and \ref{first.v}.  These {\em strongly subcanonical}
subschemes $Z \subset X$ satisfy conditions \cond1--\cond4 which were
explained in the introduction, namely, $\mathcal O_Z$ is a
Cohen-Macaulay $\mathcal O_X$-module of grade and local projective
dimension $3$, and there is a line bundle $L$ on $X$ and an
isomorphism
\[
\eta : \mathcal O_Z \xrightarrow{\sim} \omega_{Z/X}(L) =
\shExt^3_{\mathcal O_X} (\mathcal O_Z,L)
\]
such that $\eta \in \Ext^3_{\mathcal O_X}(\mathcal O_Z,L)$
lifts to $\Ext^2_{\mathcal O_X}(\mathcal I_Z,L)$.  The obstruction to
this lifting lives in $H^3(X,L)$ because of the long exact sequence
%
\begin{equation}
\label{ext.ex.seq}
\dotsb \to \Ext^2_{\mathcal O_X} (\mathcal I_Z,L) \to \Ext^3_{\mathcal
O_Z} (\mathcal O_Z,L) \to H^3(X,L) \to \dotsb.
\end{equation}
%
This lifting condition holds automatically if $H^3(X,L) = 0$ for
instance if $X$ is a projective space.  The analogous lifting
condition is also necessary for the codimension $2$ Serre construction
(see e.g.\ B\u anic\u a-Putinar \cite{BP} \S 2.1).  

We show that such a $Z$ can be obtained as a Lagrangian degeneracy
locus as in Theorem \ref{first.v} if the ambient scheme is
quasi-projective over a noetherian ring.



\begin{theorem}
\label{converse}
Let $A$ be a noetherian ring, and $X \subset \mathbb P^N_A$ a locally
closed subscheme.  Suppose that $Z\subset X$ is a strongly
subcanonical subscheme \textup(as just described\textup).  Then $Z$
has symmetrically quasi-isomorphic locally free resolutions
%
\begin{diagram}[LaTeXeqno]
\label{converse.diag}
%
0 & \rTo & L & \rTo & \mathcal E & \rTo ^\psi & \mathcal G & \rTo &
\mathcal O_X & \rTo & \mathcal O_Z & \rTo & 0 \\
%
&& \dSame && \dTo <\phi && \dTo >{\phi^*} && \dSame && \dTo >\eta
<\cong \\
% 
0 & \rTo & L & \rTo & \mathcal G^*(L) & \rTo ^{-\psi^*} & \mathcal
E^*(L)& \rTo & \mathcal O_X & \rTo & \shExt^3_{\mathcal O_X} (\mathcal
O_Z, L) & \rTo & 0
%
\end{diagram}
%\end{footnotesize}
%
with $\phi^*\psi : \mathcal E \to \mathcal E^*(L)$ an alternating
map.  
\end{theorem}







We will need the following two lemmas in the proof of the theorem.

\begin{lemma}
\label{quasiproj}
Let $A$ be a noetherian ring, let $X \subset \mathbb P^N_A$ be a
locally closed subscheme, let $\mathcal F,\mathcal G$ be coherent
sheaves on $X$, let $\mathcal M$ be a vector bundle on $X$, and let $p
> 0$. 

\textup{(a)} If $\xi \in \Ext^p_{\mathcal O_X}(\mathcal F,\mathcal
G)$, then there exists a vector bundle $\mathcal E$ on $X$ and a
surjection $f: \mathcal E \twoheadrightarrow \mathcal F$ such that the
pullback class $f^*\xi \in \Ext^p_{\mathcal O_X}(\mathcal E,\mathcal
G)$ vanishes.

\textup{(b)} If $\zeta \in \Ext^p_{\mathcal O_X}(\Lambda^2 \mathcal M,
\mathcal G)$, then there exists a surjection of vector bundles
$\mathcal P \twoheadrightarrow \mathcal M$ such that the pullback of
$\zeta$ to $\Ext^p_{\mathcal O_X}(\Lambda^2 \mathcal P, \mathcal G)$
vanishes.
\end{lemma}

\begin{proof}
(a) Extending $\mathcal F$ to a coherent sheaf on the closure
$\overline X \subset \mathbb P^N_A$ and then applying Serre's Theorem
A, we see that there exists a surjection of the form $g: \mathcal
O_X(-n)^{r} \twoheadrightarrow \mathcal F$.  Pulling back gives us a
class $g^*\xi \in H^p(X,\mathcal G(n))^r$.

Let $R$ be the homogeneous coordinate ring of $\overline X$, and let
$I \subset R$ be the homogeneous ideal of strictly positive degree
elements vanishing on the closed subset $\overline X \setminus X$.
Extend $\mathcal G$ to a coherent sheaf on $\overline X$, and let $G$
be a finitely generated graded $R$-module whose associated sheaf is
this extension of $\mathcal G$.  Then $H^p_*(X, \mathcal G)^r \cong
H^{p+1}_I(G)^r$.  Consequently, $g^*\xi$, as a member of a local
cohomology module, is annihilated by some power $I^m$ of $I$.  A
finite set of homogeneous generators of $I^m$ gives surjections
$\bigoplus_i R(-a_i) \twoheadrightarrow I^m$ and $\bigoplus_i \mathcal
O_X(-a_i) \twoheadrightarrow \mathcal O_X$, such that the pullback of
$g^*\xi$ along the induced map $\bigoplus_i \mathcal O_X(-a_i-n)^r
\twoheadrightarrow \mathcal O_X(-n)^r$ vanishes.

(b) For the same reasons as in part (a), $\zeta$ is killed by some
power of $I$.  For convenience we assume that the same $I^m$ as in
part (a) kills $\zeta$.  Let $\bigoplus_i \mathcal O_X(-a_i)
\twoheadrightarrow \mathcal O_X$ be the surjection used in part (a).
Then the surjection $\bigoplus_i \mathcal M(-a_i) \twoheadrightarrow
\mathcal M$ kills $\zeta$ because the exterior square factors as
$\Lambda^2 \bigl( \bigoplus_i \mathcal M(-a_i) \bigr)
\twoheadrightarrow \bigoplus_{i\leq j} (\Lambda^2\mathcal M)
(-a_i-a_j) \twoheadrightarrow \Lambda^2 \mathcal M$.
\end{proof}



\begin{lemma}[Serre; \cite{OSS} Lemma 5.1.2]
\label{Serre}
Let $A$ be a noetherian local ring and $M$ a finitely generated
$A$-module of projective dimension at most $1$.  Suppose that $\zeta
\in \Ext^1_A(M,A)$ corresponds to the extension
\(
0 \to A \to N \to M \to 0.
\)
Then $N$ is a free $A$-module if and only if $\zeta$ generates the
$A$-module $\Ext^1_A(M,A)$.
\end{lemma}



\begin{proof}[Proof of Theorem \ref{converse}]
By hypothesis, $\eta$ lifts to a class in $\Ext^2_{\mathcal
O_X}(\mathcal I_Z,L)$.  By Lemma \ref{quasiproj}(a) there exists a
vector bundle $\mathcal M$ and a surjection and kernel
$
0 \to \mathcal K \to \mathcal M \to \mathcal I_Z \to 0
$
such that $\eta$ lifts further to a class $\zeta \in \Ext^1_{\mathcal
O_X}(\mathcal K,L)$.  This defines an extension $0 \to L \to \mathcal
E \to \mathcal K \to 0$.  Attaching these extensions gives an acyclic
complex
%
\begin{equation}
\label{long}
0 \to L \to \mathcal E \to \mathcal M \to \mathcal O_X \to \mathcal
O_Z \to 0.
\end{equation}
%


We claim that $\mathcal E$ is locally free.  Our reasoning is as
follows.  Since the local projective dimension of $\mathcal O_Z$ is at
most $3$, the local projective dimension of $\mathcal K$ is at most
$1$.  By Lemma \ref{Serre}, $\mathcal E$ will be locally free if
$\zeta$ generates the sheaf $\shExt^1_{\mathcal O_X} (\mathcal K,L)$.
Moreover the sheaves $\mathcal O_Z$, $\shExt^3_{\mathcal O_X}
(\mathcal O_Z,L))$, and $\shExt^1_{\mathcal O_X} (\mathcal K,L)$ are
all isomorphic, and their respective global sections $1$, $\eta$, and
$\zeta$ correspond under these isomorphisms.   
%
\begin{diagram}
\zeta \in \Ext^1_{\mathcal O_X} (\mathcal K, L) & \rTo & H^0
(\shExt^1_{\mathcal O_X} (\mathcal K,L)) \\
%
\dTo && \dTo >\cong \\
%
\eta \in \Ext^3_{\mathcal O_X} (\mathcal O_Z, L) & \rTo ^\cong & H^0
(\shExt^3_{\mathcal O_X} (\mathcal O_Z,L)) & \lTo ^\cong &
H^0(\mathcal O_Z) \ni 1
\end{diagram}
%
Since $1$ generates $\mathcal O_Z$, the section $\zeta$ generates
$\shExt^1_{\mathcal O_X} (\mathcal K,L)$.  Thus $\mathcal E$ is
locally free.




The complex
%
\begin{equation}
\label{A.cpx}
\mathcal A_\cpx : \qquad 0 \to L \to \mathcal E \to \mathcal M \to
\mathcal O_X \to 0
\end{equation}
%
is now a locally free resolution of $\mathcal O_Z$.  As in
Buchsbaum-Eisenbud \cite{BE} and Walter \cite{Walter}, we try to make
this into a commutative associative differential graded algebra
resolution of $\mathcal O_Z$ by constructing a map $D_2(\mathcal
A_\cpx) \to \mathcal A_\cpx$ from the divided square covering the
identity in degree $0$:
%
\begin{diagram}[LaTeXeqno]
\label{dashes}
\dotsb & \rTo & \mathcal M(L) \oplus D_2\mathcal E & \rTo & L \oplus
(\mathcal E \otimes \mathcal M) & \rTo & \mathcal E \oplus
\Lambda^2\mathcal M & \rTo & \mathcal M & \rTo & \mathcal O_X \\
&& \dDotsto && \dDotsto && \dDotsto && \dSame && \dSame \\
\dotsb & \rTo & 0 & \rTo & L & \rTo & \mathcal E & \rTo & \mathcal M &
\rTo & \mathcal O_X
\end{diagram}
%
Now $\Lambda^2\mathcal M$ maps into the kernel $\mathcal K$ of
$\mathcal M \to \mathcal O_X$.  Hence the first problem in filling in
the dotted arrows above is to carry out a lifting
%
\begin{diagram}[PS]
&&&&&& \Lambda^2 \mathcal M \\
&&&&& \ldDotsto & \dTo \\
0 & \rTo & L & \rTo & \mathcal E & \rTo & \mathcal K & \rTo & 0
\end{diagram}
The obstruction to carrying out the lifting is a class $\zeta \in
\Ext^1_{\mathcal O_X}(\Lambda^2 \mathcal M, L)$.  There is no reason
for this class to vanish.  So the liftings sought in \eqref{dashes}
need not exist.  But there is a way around this.

By Lemma \ref{quasiproj}(b) there is a surjection from another vector
bundle $\mathcal G \twoheadrightarrow \mathcal M$ such that the
pullback of $\zeta$ to $\Ext^1_{\mathcal O_X}(\Lambda^2 \mathcal G,L)$
vanishes.  We now redo the construction of the complex and get
commutative diagrams with exact rows and columns
\[
\begin{diagram}[size=1.5em]
&&&& \mathcal R & \rSame & \mathcal R \\
%
&&&& \dInto && \dInto \\
%
0 & \rTo & L & \rTo & \mathcal F & \rTo & \mathcal K' & \rTo & 0 \\
%
&& \dSame && \dOnto & \square & \dOnto \\
%
0 & \rTo & L & \rTo & \mathcal E & \rTo & \mathcal K & \rTo & 0
\end{diagram}
%
\qquad \qquad
%
\begin{diagram}[size=1.5em]
&& \mathcal R & \rSame & \mathcal R \\
%
&& \dInto && \dInto \\
%
0 & \rTo & \mathcal K' & \rTo & \mathcal G & \rTo & \mathcal I_Z &
\rTo & 0 \\
%
&& \dOnto && \dOnto && \dSame \\
%
0 & \rTo & \mathcal K & \rTo & \mathcal M & \rTo & \mathcal I_Z & \rTo
& 0 
\end{diagram}
\]
%
This allows us to construct a new complex
\[
\mathcal B_\cpx : \qquad 0 \to L \to \mathcal F \xrightarrow{\psi}
\mathcal G \to \mathcal O_X \to 0.
\]
One sees easily that $\mathcal R$ and therefore $\mathcal F$ are also
vector bundles.  But this time, the composite map $\Lambda^2 \mathcal
G \to \mathcal K' \to \mathcal K$, lifts to $\mathcal E$ since the
obstruction is the class in $\Ext^1_{\mathcal O_X}(\Lambda^2 \mathcal
G,L)$ which we got to vanish using Lemma \ref{quasiproj}(b).  Since
the square marked with the $\square$ is cartesian, we get a lifting
$\Lambda^2 \mathcal G \to \mathcal F$.  The other liftings 
%
\begin{diagram}[LaTeXeqno]
\label{B.alg}
\dotsb & \rTo & \mathcal G(L) \oplus D_2\mathcal F & \rTo & L \oplus
(\mathcal F \otimes \mathcal G) & \rTo & \mathcal F \oplus
\Lambda^2\mathcal G & \rTo & \mathcal G & \rTo & \mathcal O_X \\
&& \dDotsto && \dDotsto && \dDotsto && \dSame && \dSame \\
\dotsb & \rTo & 0 & \rTo & L & \rTo & \mathcal F & \rTo & \mathcal G &
\rTo & \mathcal O_X
\end{diagram}
%
now occur automatically.  We therefore get a chain map $D_2 \mathcal
B_\cpx \to \mathcal B_\cpx$ which makes $\mathcal B_\cpx$ into a
commutative associative differential graded algebra with divided
powers.

We now claim that having this differential graded algebra structure
gives us all the properties we want and puts us into the situation of
Theorem \ref{first.v}.  Indeed, as in Buchsbaum-Eisenbud \cite{BE},
the multiplication gives pairings $\mathcal B_i \otimes \mathcal
B_{3-i} \to \mathcal B_3 = L$, and therefore maps $\mathcal B_i \to
\mathcal B_{3-i}^*(L)$.  These maps are compatible with the
differential, and as a result, the following diagram commutes:
%
\begin{diagram}
0 & \rTo & L & \rTo & \mathcal F & \rTo^\psi & \mathcal G & \rTo &
\mathcal O_X & \rTo & \mathcal O_Z & \rTo & 0 \\
&& \dSame && \dTo <\phi && \dTo >{\phi^*} && \dSame && \dTo >\eta
<\simeq \\
0 & \rTo & L & \rTo & \mathcal G^*(L) & \rTo_{-\psi^*} & \mathcal
F^*(L) & \rTo & \mathcal O_X & \rTo & \shExt^3_{\mathcal O_X}(\mathcal
O_Z,L) & \rTo & 0
\end{diagram}
% 
The top row is exact by construction, and the bottom row is exact
because it is the dual of the top row which is a resolution of a sheaf
of grade $3$.  Since $\eta$ is an isomorphism, one sees that
\[
0 \to \mathcal F \xrightarrow{\sm{\psi \\ \phi}} \mathcal G \oplus
\mathcal G^*(L) \xrightarrow{\sm{\phi^* & \psi^*}} \mathcal F^*(L) \to
0
\]
is exact.  Thus $\mathcal F$ embeds in $\mathcal G \oplus \mathcal
G^*(L)$ as a subbundle which is totally isotropic for the hyperbolic
symmetric bilinear form on $\mathcal G \oplus \mathcal G^*(L)$.  The
subbundle $\mathcal F$ is even totally isotropic for the hyperbolic
quadratic form, since the restriction of this form to local sections
of $\mathcal F$ is the function $e \mapsto \langle \phi(e), \psi(e)
\rangle$, and this function vanishes because the composite map from
diagram \eqref{B.alg}
%
\begin{diagram}
D_2 \mathcal F & \rTo & \mathcal F \otimes \mathcal G & \rTo & L \\
f \otimes f & \rMapsto & f \otimes \psi(f) & \rMapsto & \langle
\phi(f), \psi(f) \rangle 
\end{diagram}
%
factors through $0$ and hence vanishes identically.  Thus $\mathcal F$
is a Lagrangian subbundle of $\mathcal G \oplus \mathcal G^*(L)$.  We
have thus constructed all the structure of Theorem \ref{first.v} and
completed the proof of the theorem.
\end{proof} 









\section{Points in $\mathbb P^3$}
\label{sect.points}

In this and the following section we discuss several classes of
examples which satisfy some or all of the conditions \cond1-\cond4 in
the introduction and thus where Theorem \ref{converse} may apply.
More geometric applications and examples can be found in our paper
\cite{EPW2}.

Okonek \cite{Okonek}, p.\ 429, has shown that any reduced set of
points in $\mathbb P^3$ is Pfaffian.  By carefully analyzing the
conditions of Theorem \ref{converse}, we will describe Pfaffian
resolutions of locally Gorenstein zero-dimensional subschemes in
$\mathbb P^3$ (see Remark \ref{classify}).

For a locally Gorenstein zero-dimensional subscheme $Z \subset \mathbb
P^3_k$ over a field $k$, there are many isomorphisms $\eta: \mathcal
O_Z \xrightarrow{\sim} \omega_Z(t)$.  Which triples
$(Z,\omega_{\mathbb P^3}(t),\eta)$ satisfy all the conditions of
Theorem \ref{converse}, and which do not?  In particular (and this is
the only condition which causes trouble), when does the image of
$\eta$ in $H^3(\mathbb P^3, \omega_{\mathbb P^3}(t))$ vanish?

We will use the following notation.  Let $I \subset R :=
k[x_0,x_1,x_2,x_3]$ be the homogeneous ideal of $Z$, let $A := R/I$ be
its homogeneous coordinate ring, and let $\omega_A :=
\Ext^3_R(A,R(-4))$ be its canonical module.  Note that $\eta \in
H^0_*(\omega_Z) \supset \omega_A$.  Also if $M$ is a graded $R$-module,
then let $M'$ be its dual as a graded $k$-vector space, endowed with
the natural dual $R$-module structure.

\begin{proposition}
\label{points}
Let $Z \subset \mathbb P^3$ be a locally Gorenstein subscheme of
dimension zero, and $\eta : \mathcal O_Z \xrightarrow{\sim}
\omega_Z(t)$ an isomorphism.  Then the triple $(Z,\omega_{\mathbb
  P^3}(t),\eta)$ is subcanonical and satisfies conditions
\cond1-\cond3, and it satisfies condition \cond4 if and only if $\eta
\in \omega_A$.
\end{proposition}



\begin{proof}
  The map $\eta: \mathcal O_Z \to \omega_Z(t)$ may be identified with
  an element of $\Ext^3_{\mathcal O_{\mathbb P^3}} (\mathcal O_Z,
  \omega_{\mathbb P^3}(t)) \cong H^0(\mathcal O_Z(-t))'$.  Because of
  the long exact sequence \eqref{ext.ex.seq} the subscheme $Z\subset
  \mathbb P^3$ satisfies condition \cond4 for $\eta$ if and only if
  $\eta$ is in the image of $\Ext^2_{\mathcal O_{\mathbb P^3}}
  (\mathcal I_Z, \omega_{\mathbb P^3}(t)) \cong H^1(\mathcal
  I_Z(-t))'$.
  
  Local duality and Serre duality give identifications
\[
\omega_A := \Ext^3_R(A,R(-4)) \cong H^1_{\mathfrak m}(A)' \cong
H^1_*(\mathcal I_Z)'
\]
and $H^0_*(\omega_Z) \cong H^0_*(\mathcal O_Z)'$ which are compatible
with the inclusions.  So $\eta$ satisfies condition \cond4 in the
introduction if and only if $\eta \in \omega_A$.
\end{proof}


\begin{theorem}
\label{pfaff.points}
Let $Z \subset \mathbb P^3$ be a locally Gorenstein subscheme of
dimension $0$, and let $\eta \in H^0(\omega_Z(t))$.  Suppose that
\textup{(a)} $\eta$ generates the sheaf $\omega_Z$, \textup{(b)} $\eta
\in \omega_A$, and \textup{(c)} if $t=-2\ell$ is even, then the
following nondegenerate symmetric bilinear form on $H^0(\mathcal
O_Z(\ell))$ is metabolic \textup(i.e.\ contains a Lagrangian
subspace\textup{):}
%
\begin{equation}
\label{bilinear}
H^0(\mathcal O_Z(\ell)) \times H^0(\mathcal O_Z(\ell)) \to
H^0(\mathcal O_Z(2\ell)) \xrightarrow{\,\eta\,} H^0(\omega_Z)
\xrightarrow{\tr} k.
\end{equation}
%
Then there exists a locally free resolution
%
\begin{equation}
\label{pfaff.resol}
0 \to \mathcal O_{\mathbb P^3}(t-4) \to \mathcal F^*(t-4)
\xrightarrow{\,\psi\,} \mathcal F \to \mathcal O_{\mathbb P^3} \to
\mathcal O_Z \to 0
\end{equation}
%
with $\psi$ alternating and $\mathcal I_Z$ generated by the submaximal
Pfaffians of $\psi$ and such that the Yoneda extension class of
\eqref{pfaff.resol} is $\eta \in \Ext^3_{\mathcal O_{\mathbb P^3}}
(\mathcal O_Z, \mathcal O_{\mathbb P^3}(t-4)) \cong H^0(\omega_Z(t))$.

Conversely, if there exists a locally free resolution of $\mathcal
O_Z$ as in \eqref{pfaff.resol} with $\psi$ alternating, then its
Yoneda extension class $\eta$ satisfies conditions \textup{(a), (b)}
and \textup{(c)} above.
\end{theorem}


In order for the symmetric bilinear form \eqref{bilinear} to be
metabolic, it is necessary for $\deg(Z)$ to be even.  If the base
field $k$ is closed under square roots, this is also sufficient.

In any case, the conditions of the theorem always hold if $t$ is large
and odd and $\eta$ is general.  This proves the following result,
which was proven for reduced sets of points by Okonek \cite{Okonek},
p.\ 429. 

\begin{corollary}
A zero-dimensional subscheme of $\mathbb P^3$ is Pfaffian if and only
if it is locally Gorenstein.
\end{corollary}




\begin{proof}[Proof of Theorem \ref{pfaff.points}]
We show how to start the proof off.  But we will stop when we reach
the point where it becomes identical to the proof of the main result
of \cite{Walter}.

Suppose that $Z,t,\eta$ satisfy conditions (a), (b), and (c) of the
theorem.  Condition (a) implies that the map $\eta: \mathcal O_Z \to
\omega_Z(t)$ is an isomorphism.  So $\eta$ and Serre duality induce a
symmetric perfect pairing 
%
\begin{equation}
\label{sym.pairing}
H^0_*(\mathcal O_Z) \times H^0_*(\mathcal O_Z) \xrightarrow{\mult}
H^0_*(\mathcal O_Z) \xrightarrow{\,\eta\,} H^0_*(\omega_Z(t))
\xrightarrow{\tr} k(t)
\end{equation}
%
which pairs $H^0(\mathcal O_Z(n))$ with $H^0(\mathcal O_Z(-n-t))$ for
all $n$.

Condition (c) implies that $H^0_*(\mathcal O_Z)$ contains a Lagrangian
submodule $M$ for this symmetric perfect pairing.  Indeed if $t$ is
odd, one can pick $M := \bigoplus_{n > -t/2} H^0(\mathcal O_Z(n))$.
If $t$ is even, then there exists a Lagrangian subspace $W \subset
H^0(\mathcal O_Z(-t/2))$, and one can pick $M := W \oplus \bigoplus_{n
> -t/2} H^0(\mathcal O_Z(n))$.

The two submodules $A \subset H^0_*(\mathcal
O_Z)$ and $\omega_A \subset H^0_*(\omega_Z)$ are orthogonal
complements of each other under the Serre duality pairing; see for
example \cite{EP}.  Hence
condition (b), that $\eta \in \omega_A$, implies that $\eta A \subset
\omega_A$ and therefore that $A = \omega_A^\perp \subset (\eta
A)^\perp$.  Now the orthogonal complement of $\eta A \subset
H^0_*(\omega_Z)$ under the Serre duality pairing corresponds to the
orthogonal complement of $A \subset H^0_*(\mathcal O_Z)$ under our
pairing \eqref{sym.pairing}.  So condition (b) implies that $A \subset
A^\perp$.  In other words $A \subset H^0_*(\mathcal O_Z)$ is
sub-Lagrangian.

It now follows that there exists a Lagrangian submodule $L$ such that
$0 \subset A \subset L = L^\perp \subset A^\perp \subset
H^0_*(\mathcal O_Z)$.  For instance, pick $L := A + (M \cap A^\perp)$
(cf.\ Knus \cite{Knus} Lemma I.6.1.2).

One easily checks that $A_n = (A^\perp)_n = H^0(\mathcal O_Z(n))$ for
$n \gg 0$, and that $A_n = (A^\perp)_n = 0$ for $n \ll 0$.
Consequently $A^\perp/A$ is of finite length.  It has an induced
nondegenerate symmetric bilinear form, and it has a Lagrangian
submodule $L/A$.

We now claim that we can construct a locally free resolution 
\[
0 \to \mathcal O_{\mathbb P^3}(t-4) \xrightarrow{\,\alpha\,} \mathcal
F^*(t-4) \xrightarrow{\,\psi\,} \mathcal F \xrightarrow{\,\beta\,}
\mathcal O_{\mathbb P^3} \to \mathcal O_Z \to 0
\]
with $\psi$ alternating and such that $H^1_*(\mathcal F) \cong L/A$,
and $H^2_*(\mathcal F) = 0$.  Moreover, $\beta$ induces a surjection
$H^0_*(\mathcal F) \twoheadrightarrow H^0_*(\mathcal I_Z)$.  Different
pieces of the resolution contribute different pieces of the cohomology
module $H^0_*(\mathcal O_Z)$.  The submodule $A$ is contributed by
$\coker H^0_*(\beta)$; the piece $L/A$ by $H^1_*(\mathcal F)$; the
piece $A^\perp/L$ by $H^2_*(\mathcal F^*(t-4))$; and the piece
$H^0_*(\mathcal O_Z)/A^\perp$ is contributed by $\ker H^3_*(\alpha)$.

The construction of this resolution and the verification of its
properties can be done using the Horrocks correspondence by the same
method as in Walter \cite{Walter}.  It is quite long and we omit the
details.
\end{proof}

\begin{remark}
\label{classify}
The graded module $A^\perp / A$ above can be thought of as the
``intermediate cohomology'' or {\em deficiency module} of
$(Z,t,\eta)$.  To emphasize the dependence of this module on $\eta$,
one could write it as $(\eta A)^\perp/A$, where $(\eta A)^\perp
\subset H^0_*(\mathcal O_Z)$ means the orthogonal complement of $\eta
A \subset H^0_*(\omega_Z)$ with respect to the Serre duality pairing.
Now $(\eta A)^\perp /A$ is dual to $(\omega_A/\eta A)$, and it is also
self-dual with a shift.  Consequently if $\eta \in \omega_A$ is of
degree $t$, then the corresponding deficiency module is
\[
(\eta A)^\perp / A \cong (\omega_A/\eta A)' \cong (\omega_A/\eta
A)(t).
\]

In Theorem \ref{pfaff.points} we split the deficiency module in half,
and put a Lagrangian subhalf in $\mathcal F$ and the quotient half in
$\mathcal F^*(t-4)$.  The Pfaffian resolutions of $\mathcal O_Z$ are
thus classified up to symmetric homotopy equivalence by pairs $(\eta,
L/A)$ with $\eta \in \omega_A$ generating the sheaf $\omega_Z$, and
with $L/A \subset (\eta A)^\perp /A$ a Lagrangian submodule.
\end{remark}

An alternative strategy for dealing with this deficiency module is to
construct a diagram of the form of \eqref{dual.diag} in Theorem
\ref{first.v} (we write $\mathcal O := \mathcal O_{\mathbb
P^3}$ to try to stay inside the margins):
%
\begin{diagram}[LaTeXeqno]
\label{sublagr.dual}
0 & \rTo & \mathcal O(t-4) & \rTo & \mathcal G & \rTo ^\psi &
\bigoplus \mathcal O(-a_i) & \rTo & \mathcal O & \rOnto & \mathcal
O_Z \\
%
&& \dSame && \dTo <\phi && \dTo >{\phi^*} && \dSame && \dTo >\eta
<\cong \\
%
0 & \rTo & \mathcal O(t-4) & \rTo & \bigoplus \mathcal O(a_i+t-4) &
\rTo _{-\psi^*} & \mathcal G^*(t-4) & \rTo & \mathcal O & \rOnto &
\omega_Z(t)
\end{diagram}
%
with $\bigoplus \mathcal O(-a_i)$ corresponding to a minimal set of
generators of the homogeneous ideal of $Z$, with $H^2_*(\mathcal G)
\cong (\eta A)^\perp / A$, the deficiency module, and with
$H^1_*(\mathcal G) = 0$.


We now give examples both of Pfaffian resolutions as in
\eqref{pfaff.resol} which split the deficiency module, and of
resolutions as in \eqref{sublagr.dual} in the form of Theorem
\ref{first.v} which gather the deficiency module up in one piece.

\subsubsection*{Example 1: one point}

Consider a single rational point $Q$.  Its geometry is very
simple, but we can make its algebra surprisingly complex.

The canonical module of $Q$ is $\omega_A \cong \bigoplus _{n\geq 1}
H^0(\omega_Q(n))$.  If we pick a nonzero $\eta$ of degree $1$, then it
generates $\omega_A$, and its deficiency module vanishes.  The
constructions described above both lead unsurprisingly to the Koszul
resolution
\[
0 \to \mathcal O_{\mathbb P^3}(-3) \to \mathcal O_{\mathbb
P^3}(-2)^{\oplus 3} \to \mathcal O_{\mathbb P^3}(-1)^{\oplus 3} \to
\mathcal O_{\mathbb P^3} \to \mathcal O_Q \to 0.
\]

However, if we let $\eta \in \omega_A$ be a nonzero element of degree
$2$, then the deficiency module is $k$ concentrated in degree $-1$,
and the construction \eqref{sublagr.dual} yields a diagram
%
\begin{diagram}
0 & \rTo & \mathcal O_{\mathbb P^3}(-2) & \rTo & \Omega^2_{\mathbb
P^3}(1) & \rTo & \mathcal O_{\mathbb P^3}(-1)^{\oplus 3} & \rTo &
\mathcal O_{\mathbb P^3} & \rOnto & \mathcal O_Q \\
&& \dSame && \dTo && \dTo && \dSame && \dTo >\eta <\cong \\
0 & \rTo & \mathcal O_{\mathbb P^3}(-2) & \rTo & \mathcal O_{\mathbb
P^3}(-1)^{\oplus 3} & \rTo & \Omega_{\mathbb P^3}(1) & \rTo & \mathcal
O_{\mathbb P^3} & \rOnto & \omega_Q(2).
\end{diagram}
%

More generally, if we let $\eta \in \omega_A$ be a nonzero element of
degree $t$, then the deficiency module is $\bigoplus_{n=-(t-1)}^{-1}
H^0(\mathcal O_Q(n))$, and the construction \eqref{sublagr.dual}
yields
%
\begin{diagram}
0 & \rTo & \mathcal O_{\mathbb P^3}(t-4) & \rTo & \mathcal F_t^*(t-4)
& \rTo & \mathcal O_{\mathbb P^3}(-1)^{\oplus 3} & \rTo & \mathcal
O_{\mathbb P^3} & \rOnto & \mathcal O_Q \\
%
&& \dSame && \dTo && \dTo && \dSame && \dSame \\ 
%
0 & \rTo & \mathcal O_{\mathbb P^3}(t-4) & \rTo & \mathcal O_{\mathbb
P^3}(t-3)^{\oplus 3} & \rTo & \mathcal F_t & \rTo & \mathcal
O_{\mathbb P^3} & \rOnto & \mathcal O_Q
\end{diagram}
%
with $\mathcal F_t$ a rank $3$ locally free sheaf which is the
sheafification of the kernel of the presentation of the deficiency
module:
\[
0 \to \mathcal F_t \to \mathcal O_{\mathbb P^3} \oplus \mathcal
O_{\mathbb P^3}(t-2)^{\oplus 3} \to \mathcal O_{\mathbb P^3}(t-1) \to
0.
\]

If one lets $\eta \in \omega_A$ be a nonzero element of degree $3$,
then applying the methods of Theorem \ref{pfaff.points} yields a
resolution which one recognizes as the Koszul complex associated to
the zero locus of a section of the rank $3$ bundle $\mathcal
T_{\mathbb P^3}(-1)$:
\[
0 \to \mathcal O_{\mathbb P^3}(-1) \to \Omega^2_{\mathbb P^3}(2) \to
\Omega_{\mathbb P^3}(1) \to \mathcal O_{\mathbb P^3} \to \mathcal O_Q
\to 0.
\]


\subsubsection*{Example 2: three points}

If $Z$ is the union of three noncollinear rational points, then the
module $\omega_A$ has two generators of degree $0$, and $Z$ is not
arithmetically Gorenstein.  If we pick a general $\eta \in \omega_A$
of degree $0$, then the deficiency module is $k$, concentrated in
degree $0$, and the construction \eqref{sublagr.dual} yields a diagram
(in which we again write $\mathcal O := \mathcal O_{\mathbb P^3}$ in
order to simplify the notation):
%
\begin{small}
\begin{diagram}
0 & \rTo & \mathcal O(-4) & \rTo & \mathcal O(-3) \oplus
\Omega^2_{\mathbb P^3} & \rTo & \mathcal O(-2)^{\oplus 3} \oplus
\mathcal O(-1) & \rTo & \mathcal O & \rOnto & \mathcal O_Z \\
&& \dSame && \dTo && \dTo && \dSame && \dSame \\
0 & \rTo & \mathcal O(-4) & \rTo & \mathcal O(-3) \oplus \mathcal
O(-2)^{\oplus 3} & \rTo & \Omega_{\mathbb P^3} \oplus \mathcal O(-1) &
\rTo & \mathcal O & \rOnto & \mathcal O_Z
\end{diagram}
\end{small}
%

If we pick a general $\eta \in \omega_A$ of degree $1$, then the
deficiency module $(\omega_A/\eta A)(1)$ is of length $4$,
concentrated in degrees $0$ and $-1$, and the methods of Theorem
\ref{pfaff.points} yield a symmetric resolution (with alternating
middle map $\psi$):
\[
0 \to \mathcal O(-3) \to \mathcal \Omega^2_{\mathbb P^3}(1)^{\oplus 2}
\oplus \mathcal O(-2) \xrightarrow{\,\psi\,} \Omega_{\mathbb P^3}^{\oplus
2} \oplus \mathcal O(-1) \to \mathcal O \to \mathcal O_Z \to 0.
\]







\section{Some weakly subcanonical subschemes}
\label{examples}

In this section we give some examples of weakly subcanonical
subschemes.  These are examples of subschemes $Z \subset X$ which
satisfy conditions \cond1-\cond2 of the introduction but fail one or
both of conditions \cond3-\cond4.  Thus the Serre construction (in
codimension $2$) and our Theorem \ref{converse} (in codimension $3$)
fail for these subschemes.


\subsection{A weakly subcanonical curve}

We construct a subcanonical curve $C \subset \mathbb P^1 \times
\mathbb P^n$ for $n \geq 2$ which fails the lifting condition \cond4
of the introduction.


Let $C$ be a nonsingular projective curve of genus $2$ over an
algebraically closed field $k$, let $P$ be one of its Weierstrass
points, and let $D$ be a divisor of degree $4$ on $C$.  A
base-point-free pencil in the linear system of divisors $\linsys D$
defines a map $f : C \to \mathbb P^1$, and a base-point-free net in
$\linsys {D+P}$ defines a map $g : C \to \mathbb P^2$.  Composing $g$
with a linear embedding $\mathbb P^2 \hookrightarrow \mathbb P^n$
gives a map $h : C \to \mathbb P^n$.  Let $i := (f,h): C \to \mathbb
P^1 \times \mathbb P^n$.  If the linear systems are chosen
sufficiently generally, then $i$ is an embedding.


The restriction to $C$ of a line bundle $\mathcal O_{\mathbb P^1
\times \mathbb P^n} (a,b)$ is $\mathcal O_C((a+b)D+bP)$.  So the
canonical bundle $\omega_C \cong \mathcal O_C(2P)$ is the restriction
of $\mathcal O_{\mathbb P^1 \times \mathbb P^n} (-2,2)$.  If the class
of $D-4P$ in $\Pic^0(C)$ is not torsion, then $\mathcal O_{\mathbb P^1
\times \mathbb P^n} (-2,2)$ is the only line bundle on $\mathbb P^1
\times \mathbb P^n$ whose restriction is $\omega_C$.  Hence the
subcanonical curve $C \subset \mathbb P^1 \times \mathbb P^n$ will
definitely fail such structural theorems as the Serre construction or
Theorem \ref{converse} if the lifting condition \cond4 of the
introduction fails for the isomorphism $\eta : \omega_C \cong \mathcal
O_{\mathbb P^1 \times \mathbb P^n} (-2,2) \rest C$.

By \eqref{cond.dual} this failure is equivalent to the nonvanishing of
the composite map
%
\begin{equation}
\label{dual.lifting}
H^1(\mathbb P^1 \times \mathbb P^n, \mathcal O(-2,2))
\xrightarrow{\text{\rm rest}} H^1(C,\mathcal O(-2,2) \rest C)
\xrightarrow[\cong]{\eta} H^1(C,\omega_C) \xrightarrow[\cong]{\tr} k.
\end{equation}
%
Now the image of $g : C \to \mathbb P^2$ is a singular quintic plane
curve.  If we resolve the singularities, then $g$ factors as an
embedding followed by the blowdown $C \hookrightarrow \widetilde
{\mathbb P}^2 \to \mathbb P^2$.  The composite map of
\eqref{dual.lifting} now factors through the diagram
%
\begin{footnotesize}
\begin{diagram}
H^1(\mathbb P^1 \times \mathbb P^n, \mathcal O(-2,2)) & \rOnto
^{\qquad} & H^1(\mathbb P^1 \times \mathbb P^2, \mathcal O(-2,2)) &
\lTo ^ \cong & H^1(\mathbb P^1 \times \widetilde{\mathbb P}^2,
\mathcal O(-2,2)) \cong k^6 \\
% 
&& \dTo <\alpha && \dTo >\beta  \\
%
&& k \cong H^1(C, \omega_C) & \lTo ^\gamma & H^1(\mathbb P^1 \times C,
\mathcal O(-2,2(D+P))) \cong k^9
\end{diagram}
\end{footnotesize}%
%
The lifting condition \cond4 fails if and only if $\alpha$ is
surjective, hence if and only if $\im(\beta) \not\subset
\ker(\gamma)$.

Now $\gamma$ is part of the long exact sequence of cohomology for
\[
0 \to \mathcal O_{\mathbb P^1 \times C}(-3,D+2P) \to \mathcal
O_{\mathbb P^1 \times C}(-2,2D+2P) \to \omega_C \to 0.
\]
So $\gamma$ is surjective, and $\ker(\gamma) \subset k^9$ is a
hyperplane.  

The map $g : C \to \mathbb P^2$ is defined using a three-dimensional
subspace $U_3 \subset V_4 := H^0(C,\mathcal O_C(D+P))$.  The complete
linear system embeds $C \hookrightarrow \mathbb P^3$ as a curve of
degree $5$ and genus $2$ contained in a unique quadric surface $Q$.
Then $\beta$ is the natural map from $S^2 U_3 \cong k^6$ to $S^2 V_4 /
\langle Q \rangle \cong k^9$.  Now we have a range of choices for the
subspace $U_3 \subset V_4$ which vary in a Zariski open subset of
$\mathbb P^3 = \mathbb P(V_4^*)$.  Hence we have a family of possible
subspaces $S^2 U_3 \subset S^2 V_4$ whose different members are not
all contained in any fixed hyperplane of $S^2 V_4$.  So if we choose a
general $U_3 \subset V_4$, then $S^2 U_3 = \im(\beta)$ is not
contained in the hyperplane $\ker(\gamma) \subset S^2 V_4 / \langle Q
\rangle$.  In that case, $C \subset \mathbb P^1 \times \mathbb P^n$ is
a subcanonical curve which fails the lifting condition \cond4.



\subsection{Singular points}

Examples can easily be given of subcanonical subschemes $Z \subset X$
which are not covered by our construction because the finite
projective dimension condition \cond3 of the introduction breaks down.
This may happen at the same time that the lifting condition \cond4
breaks down, or it may happen independently.  If \cond4 holds but
\cond3 breaks down, $\mathcal O_Z$ will still have resolutions fitting
into diagrams such as \eqref{dual.diag} of Theorem \ref{first.v},
except that $\mathcal E$ or $\mathcal F$ will not be locally free.

For instance if $X \subset \mathbb P^4$ is a singular hypersurface of
degree $d$, and $P \in X$ is a singular point, then $P$ is indeed
subcanonical, but condition \cond3 fails because $\mathcal O_P$ is of
infinite local projective dimension over $\mathcal O_X$.  There exist
isomorphisms $\eta : \mathcal O_P \cong \shExt^3_{\mathcal
  O_{X}}(\mathcal O_P,\mathcal O_{X}(\ell))$ for all $\ell \in \mathbb
Z$, but these satisfy condition \cond4 if and only if $\ell \geq d-4$.

Similarly, if $D$ is a line in $\mathbb P^5$, and $Y \subset \mathbb
P^5$ a hypersurface containing $D$ which is singular in at least one
point of $D$, then condition \cond3 fails for $D \subset Y$, but all
the other conditions hold (since $H^3(Y, \omega_{Y}(2)) = 0$).  So
although $D \subset Y$ may be obtained as a degeneracy locus of a pair
of Lagrangian subsheaves of a twisted orthogonal bundle on $Y$, at
least one of the Lagrangian subsheaves is not locally free.




\subsection{A nonseparated example}

We now give an example where there is no real choice about the $\eta$
(because $H^0(\omega_Z) = k$ and there are no twists), where
conditions \cond1-\cond2 hold, but where condition \cond4 fails.  The
real reason for the failure in this example is that we are doing
something silly on a nonseparated scheme.  But the interesting thing
is that the cohomological obstruction \cond4 is able to detect our
misbehavior.

Let $X$ be the nonseparated scheme consisting of two copies $\mathbb
A^3$ glued together along $\mathbb A^3 - \{0\}$.  In other words, $X$
is $\mathbb A^3$ with the origin doubled up.  Let $P' \in X$ be one of
the two origins.  It is a subcanonical subscheme of $X$ of codimension
$3$ of finite local projective dimension, i.e.\ it satisfies
conditions \cond1-\cond2 of the introduction.  We claim that it does
not satisfy condition \cond4.

The problem is to compute the map
%
\begin{equation}
\label{ext3}
\Ext^3_{\mathcal O_X}(\mathcal O_{P'},\mathcal O_X) \to
\Ext^3_{\mathcal O_X}(\mathcal O_X,\mathcal O_X) = H^3(X,\mathcal
O_X).
\end{equation}
%
We will use the following notation: $U',U'' \subset X$ are the two
copies of $\mathbb A^3$; for $\alpha=1,2,3$ let $U_\alpha \subset X$
be the open locus where $x_\alpha \neq 0$; and let $U_{\alpha\beta} :=
U_\alpha \cap U_\beta$, and $U_{123} := U_1 \cap U_2 \cap U_3$.  For
any inclusion of an affine open subscheme $U \subset X$, we denote by
$i_! \mathcal O_U$ the extension by zero of $\mathcal O_U$ to all of
$X$.  We will use the same letter $i_!$ whatever the $U$.

Then $\mathcal O_X$ and $\mathcal O_{P'}$ have resolutions of the form
%
\begin{diagram}
0 & \rTo & i_! \mathcal O_{U_{123}} & \rTo & \bigoplus_{\alpha <
\beta} i_! \mathcal O_{U_{\alpha\beta}} & \rTo & \bigoplus_\alpha i_!
\mathcal O_{U_\alpha} & \rTo & i_! \mathcal O_{U'} \oplus i_! \mathcal
O_{U''} & \rOnto & \mathcal O_X \\ 
&& \dTo && \dTo && \dTo && \dTo && \dTo \\ 
0 & \rTo & i_! \mathcal O_{U'} & \rTo & i_! \mathcal O_{U'}^{\oplus
3}& \rTo & i_!  \mathcal O_{U'}^{\oplus 3} & \rTo & i_!  \mathcal
O_{U'} & \rOnto & \mathcal O_{P'}
\end{diagram}
%
The horizontal maps in the first row are more or less taken from a \v
Cech resolution, while those from the second row are from a Koszul
resolution.  The vertical maps are, from left to right,
%
\begin{align*}
& \begin{pmatrix} \frac 1 {x_1 x_2 x_3} \end{pmatrix}, 
&& \begin{pmatrix} \frac 1 {x_1 x_2} & 0 & 0 \\ 0 & \frac 1 {x_1 x_3}
& 0 \\ 0 & 0 & \frac 1 {x_2 x_3} \end{pmatrix},
&& \begin{pmatrix} \frac 1 {x_1} & 0 & 0 \\ 0 & \frac 1 {x_2} & 0 \\ 0
& 0 & \frac 1 {x_3} \end{pmatrix},
&& \begin{pmatrix} 1 & 0 \end{pmatrix}.
\end{align*}
%
If we apply $\Hom_{\mathcal O_X}({-},\mathcal O_X)$ to the
resolutions, we get complexes which compute the $\Ext^p_{\mathcal
O_X}(\mathcal O_{P'},\mathcal O_X)$ and the $H^p(X,\mathcal O_X)$.
(This is because $\mathcal O_X$ is quasi-coherent, and the $i_!
\mathcal O_U$ are extensions by zero of locally free sheaves on affine
open subschemes.)  Writing $R := k[x_1,x_2,x_3]$, these complexes are
%
\begin{diagram}
0 & \rTo & R & \rTo & R^{\oplus 3} & \rTo & R^{\oplus 3} & \rTo & R &
\rTo & 0 \\
&& \dTo && \dTo && \dTo && \dTo \\
0 & \rTo & R \oplus R & \rTo & \bigoplus_{\alpha} R[x_\alpha^{-1}] &
\rTo & \bigoplus_{\alpha < \beta} R[x_\alpha ^{-1}x_\beta^{-1}] & \rTo
& R[x_1^{-1} x_2^{-1} x_3^{-1}] & \rTo & 0
\end{diagram}
%
with Koszul and \v Cech horizontal arrows.  The vertical arrows are as
before, but transposed and in the reverse order.  

The map \eqref{ext3} which we wish to compute may now be identified as
$k \hookrightarrow H^3_{\mathfrak m}(R)$.  This map sends a nonzero
$\eta$ to a nonzero multiple of socle element $x_1^{-1} x_2^{-1}
x_3^{-1}$ of $H^3_{\mathfrak m}(R)$.  So $P' \subset X$ fails
condition 3) of the introduction.

However, even if condition \cond4 of the introduction had held, we
could not have gone any farther.  For reasons of depth, any map from a
locally free sheaf $\mathcal E$ on $X$ to $\mathcal O_X$ is determined
by what happens outside the two origins.  So the images of a map
$\mathcal E \to \mathcal O_X$ at the two origins must be identical.
As a result, there can be no surjection from a vector bundle $\mathcal
E$ on $X$ onto $\mathcal I_{P'}$.





\section{Codimension one sheaves}
\label{codimension.one}

In this section we consider the analogues of the results in the
previous sections for (skew)-symmetric sheaves of codimension $1$.  We
include necessary and sufficient conditions for such sheaves on
$\mathbb P^N$ to have locally free resolutions which are genuinely
(skew)-symmetric, similar to those in Walter \cite{Walter}.  We also
prove that any such sheaf on a quasi-projective variety has a
resolution which is (skew)-symmetric up to quasi-isomorphism, in
analogy with Theorem \ref{converse}.  We finish the section with
several examples.



In this section we will suppose that the characteristic is
not $2$, although all the theorems have variants which are valid
in characteristic $2$.

\subsection{Symmetric sheaves of codimension 1}

Suppose $\mathcal F$ is a coherent sheaf on a scheme $X$ which is of
finite local projective dimension and perfect of codimension $1$.
This means that locally $\mathcal F$ has free resolutions $0 \to
\mathcal L_1 \to \mathcal L_0 \to \mathcal F \to 0$ such that the dual
complex $0 \to \mathcal L_0^* \to \mathcal L_1^* \to
\shExt^1_{\mathcal O_X}(\mathcal F,\mathcal O_X) \to 0$ is also exact.
The operation
\[
\mathcal F \rightsquigarrow \mathcal F^\vee := \shExt^1_{\mathcal O_X}
(\mathcal F, \mathcal O_X)
\]
provides a duality on the category of such sheaves.  A {\em symmetric
sheaf of codimension $1$} is a pair $(\mathcal F, \alpha)$ where
$\mathcal F$ is a sheaf as above, and $\alpha : \mathcal F \to
\mathcal F^\vee(L)$ is an isomorphism which is symmetric in the sense
that $\alpha = \alpha^\vee$.  (Here $L$ is some line bundle on $X$.)
{\em Skew-symmetric sheaves of codimension $1$} on $X$ are defined
similarly.



\subsection{Symmetric resolutions in codimension $1$}

Resolutions of codimension $1$ symmetric sheaves on $\mathbb P^3$ have
been studied fairly extensively in by Barth \cite{Barth}, Catanese
\cite{Catanese2} \cite{Catanese}, and Casnati-Catanese \cite{CC} in
the context of surfaces with even sets of nodes and by Kleiman-Ulrich
\cite{KU} in the context of self-linked curves.  The next theorem,
conjectured by Barth and Catanese, was proven by Casnati-Catanese for
symmetric sheaves on $\mathbb P^3$ (\cite{CC} Theorem 0.3).  They also
remarked (\cite{CC} Remark 2.2) that essentially the same proof works
for codimension $1$ symmetric sheaves on any $\mathbb P^n$, which is
true as long as one remembers to include in one's statement a parity
condition analogous to that in Walter \cite{Walter} Theorem 0.1.  For
a case where the parity condition fails, see Example \ref{threefold}
below.


\begin{theorem}[\cite{CC} with correction]
\label{CCatanese}
Let $k$ be an algebraically closed field of characteristic different
from $2$.  Suppose that $(\mathcal F,\alpha)$ is a symmetric sheaf of
codimension $1$ on $\mathbb P^{n}_k$, with $\alpha : \mathcal F
\xrightarrow{\sim} \mathcal F^\vee(\ell-n-1)$.  Then $\mathcal F$ has
a symmetric resolution, i.e.\ a locally free resolution of the form
\[
0 \to \mathcal G \xrightarrow{\,f\,} \mathcal G^*(\ell-n-1) \to
\mathcal F \to 0
\]
with $f$ symmetric, if and only if the following parity condition
holds\textup{:} if $n\equiv 1 \pmod{4}$ and $\ell$ is even, then $\chi
(\mathcal F (-\ell/2))$ is also even.
\end{theorem}

A higher-codimension generalization of this theorem is proven in
our paper \cite{EPW3}.

As the parity condition indicates, symmetric sheaves do not always
possess symmetric resolutions.  The following structure theorem,
analogous to Theorem \ref{converse}, shows that they do still have
locally free resolutions which are symmetric up to quasi-isomorphism.



\begin{theorem}
\label{quasisym}
Let $A$ be a noetherian ring, and $X \subset \mathbb P^N_A$ a locally
closed subscheme.  Suppose that $(\mathcal F,\alpha)$ is a symmetric
sheaf of codimension $1$ on $X$, with $\alpha : \mathcal F
\xrightarrow{\sim} \mathcal F^\vee(L)$ for some line bundle $L$.  Then
$\mathcal F$ has symmetrically quasi-isomorphic locally free
resolutions
%
\begin{diagram}[LaTeXeqno]
\label{quasisym.diag}
%
0 & \rTo & \mathcal G  & \rTo ^\psi & \mathcal H & \rTo & \mathcal F
& \rTo & 0 \\ 
%
&& \dTo <\phi && \dTo >{\phi^*} && \dTo >\alpha
<\cong \\
% 
0 & \rTo & \mathcal H^*(L) & \rTo ^{\psi^*} & \mathcal
G^*(L)& \rTo & \mathcal F^\vee(L) & \rTo & 0
%
\end{diagram}
%\end{footnotesize}
%
with $\phi^*\psi : \mathcal G \to \mathcal G^*(L)$ a symmetric
map.  
\end{theorem}

\begin{proof}
Because $\mathcal F$ is locally Cohen-Macaulay of codimension $1$, it
has a locally free resolution $0 \to \mathcal P_1 \to \mathcal P_0 \to
\mathcal F \to 0$.  The symmetric isomorphism $\alpha$ corresponds to
a morphism in the derived category
%
\begin{diagram}
S^2(\mathcal P_\cpx) :  & \qquad & 
0 & \rTo & \Lambda^2 \mathcal P_1 & \rTo & \mathcal P_1 \otimes
\mathcal P_0 & \rTo & S^2 \mathcal P_0 & \rTo & 0 \\
%
\dDotsto >\alpha && && \dDotsto && \dDotsto && \dDotsto  \\
%
L[1]: && 0 & \rTo & 0 & \rTo & L & \rTo & 0 & \rTo & 0 
\end{diagram}
%
This $\alpha$ is a member of the hyperext $\hExt^1_{\mathcal O_X}
(S^2(\mathcal P_\cpx), L)$, which in turn is the abutment of the
hyperext spectral sequence
\[
E_1^{pq} = \Ext^q_{\mathcal O_X}((S^2(\mathcal P_\cpx))_{p} , L)
\Longrightarrow \hExt^{p+q}_{\mathcal O_X} (S^2(\mathcal P_\cpx), L).
\]
The differentials $d_1$ define complexes (indexed by $p=0,1,2$)
\[
0 \to \Ext^q_{\mathcal O_X}(S^2 \mathcal P_0,L) \xrightarrow{d_1}
\Ext^q_{\mathcal O_X} (\mathcal P_1 \otimes
\mathcal P_0,L) \xrightarrow{d_1} \Ext^q_{\mathcal O_X}(\Lambda^2
\mathcal P_1,L) \to 0
\]
whose cohomology groups are the $E_2^{pq}$.  In particular, $E_2^{10}$
is the space of homotopy classes of chain maps $S^2(\mathcal P_\cpx)
\to L[1]$.  Hence $\alpha$ will be the class of an honest chain map if
and only if it comes from $E_2^{10}$.  However, according to the
$5$-term exact sequence
\[
0 \to E_2^{10} \to \hExt^1_{\mathcal O_X} (S^2(\mathcal P_\cpx), L)
\to E_2^{01} \to \dotsb,
\]
the obstruction lies in $E_2^{01} \subset \Ext^1_{\mathcal O_X} (S^2
\mathcal P_0, L)$.  As in the proof of Theorem \ref{converse}, this
obstruction may be nonzero, but it can be killed by pulling back along
a suitable epimorphism $\mathcal H \twoheadrightarrow \mathcal P_0$
(cf.\ Lemma \ref{quasiproj}).  The proof may now be completed with
arguments taken from the proof of Theorem \ref{converse}.
\end{proof}

The diagram \eqref{quasisym.diag} has a geometric interpretation in
terms of a pair of Lagrangian subbundles of a twisted symplectic
bundle, in analogy with the construction of Theorem \ref{first.v}.

\begin{theorem}
\label{third.v}
Let $\mathcal G$ be a vector bundle and $L$ a line bundle on a locally
noetherian scheme $X$.  Let $\mathcal G \oplus \mathcal G^*(L)$ be the
hyperbolic twisted symplectic bundle and that
%
\begin{equation}
\label{third.eqn}
\mathcal E \rInto^{\sm{\psi \\ \phi}} \mathcal G \oplus \mathcal
G^*(L)
\end{equation}
%
is a Lagrangian subbundle.  
%
If the determinant of $\psi$ is nowhere a zero-divisor on $X$, then
$\psi$ is injective, and $\mathcal F := \coker(\psi)$ is a codimension
$1$ symmetric sheaf with locally free resolutions fitting into a
commutative diagram with exact rows
%
%\begin{footnotesize}
\begin{diagram}[LaTeXeqno]
\label{third.diag}
%
0 & \rTo & \mathcal E & \rTo ^\psi & \mathcal G & \rTo & \mathcal F &
\rTo & 0 \\
%
&& \dTo <\phi && \dTo >{\phi^*} && \dTo >\alpha <\cong \\
% 
0 & \rTo & \mathcal G^*(L) & \rTo ^{\psi^*} & \mathcal E^*(L)& \rTo &
\mathcal F^\vee(L) & \rTo & 0
%
\end{diagram}%
%\end{footnotesize}%
\end{theorem}

We now use this theorem to construct an example of a symmetric
codimension $1$ sheaf on $\mathbb P^5$ for which the parity condition
of Theorem \ref{CCatanese} fails.   The construction is similar to the
main examples of \cite{EPW2}.




\begin{example}
\label{threefold}
% 
Let $V = H^0(\mathcal O_{\mathbb P^5}(1))^*$.  The exterior product
defines a symplectic form on the $20$-dimensional vector space
$\Lambda^3 V$, which makes the trivial bundle $\Lambda^3 V \otimes
\mathcal O_{\mathbb P^5}$ into a symplectic bundle.  If $W, W^*\subset
\Lambda^3 V$ are general Lagrangian subspaces, then we may identify
the symplectic vector space $\Lambda^3 V$ with hyperbolic symplectic
vector space $W\oplus W^*$.  Moreover, one may see that
$\Omega^3_{\mathbb P^5}(3)$ is a Lagrangian subbundle of $\Lambda^3 V
\otimes \mathcal O_{\mathbb P^5}$ (cf.\ \cite{EPW2}, \S 5).
The construction of Theorem \ref{third.v} then produces a symmetric
codimension $1$ sheaf $\mathcal F$ on $\mathbb P^5$ with resolutions
%
\begin{diagram}[LaTeXeqno]
\label{example.diag}
%
0 & \rTo & \Omega^3_{\mathbb P^5}(3) & \rTo^\psi 
& W \otimes \mathcal O_{\mathbb P^5} & 
\rTo & \mathcal F & \rTo & 0 \\
%
&& \dTo <\phi && \dTo >{\phi^*} && \dTo >\alpha <\cong \\
% 
0 & \rTo & W^*\otimes \mathcal O_{\mathbb P^5} & 
\rTo ^{\psi^*} &\Omega^2_{\mathbb P^5}(3) & \rTo &
\mathcal F^\vee & \rTo & 0.
%
\end{diagram}%
%
The sheaf $\mathcal F$ fails the parity condition of Theorem
\ref{CCatanese} because $\ell=6$ and $\chi(\mathcal F(-3))=1$.

The geometry of the sheaf $\mathcal F$ is best explained using the
degeneracy loci of the Lagrangian subbundles $\Omega^3_{\mathbb
P^5}(3)$ and $W^* \otimes \mathcal O_{\mathbb P^5}$ of $\Lambda^3 V
\otimes \mathcal O_{\mathbb P^5}$:
\[
D_i := \{ x \in \mathbb P^5 \mid \dim \left[ \Omega^3_{\mathbb
P^5}(3)(x) \cap W^* \right] \geq i \}.
\]
The sheaf $\mathcal F$ is supported on the sextic fourfold $D_1$.  If
$W^*$ is general, then $D_1$ is smooth (cf.\ \cite{EPW2}, Theorem 2.1
and the discussion following it)  except
along the surface $D_2$ where it has $A_1$ singularities with local
equations $x_1^2 + x_2^2 + x_3^2 = 0$.  The surface $D_2$ is of degree
$40$ according to the formulas of Fulton-Pragacz \cite{FP} (6.7).

Now choose a general $9$-dimensional subspace $U$ of the
$10$-dimensional space $W^*$.  Then the composite map $U \otimes
\mathcal O_{\mathbb P^5} \hookrightarrow \Lambda^3 V \otimes \mathcal
O_{\mathbb P^5} \twoheadrightarrow \Omega_{\mathbb P^5}^2 (3)$
degenerates in codimension $2$ along a threefold $Y$ of degree $18$.
Since
\[
Y = \{ x \in \mathbb P^5 \mid \dim \left[ \Omega^3_{\mathbb P^5}(3)(x)
\cap U \right] \geq 1 \},
\]
we have $D_2 \subset Y \subset D_1$.  Moreover, $\mathcal F \cong
\mathcal I_{Y/D_1}(6)$.  In addition, $Y$ is self-linked by the complete
intersection of $D_1$ and of another sextic hypersurface corresponding
to another Lagrangian subspace of $\Lambda^3 V$ containing $U$.
\end{example}

\subsection{Skew-symmetric sheaves of codimension one}

Analogues of Theorems \ref{CCatanese}, \ref{quasisym}, and
\ref{third.v} hold for skew-symmetric sheaves of codimension $1$.  The
only significant change is in the parity condition of Theorem
\ref{CCatanese}, which in the skew-symmetric case has the form: ``if
$n\equiv 3 \pmod{4}$ and $\ell$ is even, then $\chi (\mathcal F
(-\ell/2))$ is also even.''  We leave the exact formulation of these
results to the reader.

If $S \subset \mathbb P^3$ is a smooth surface of degree $d$, then its
cotangent bundle $\Omega_S$ is a skew-symmetric sheaf of codimension
$1$ on $\mathbb P^3$ with twist $\ell = 0$.  Since $\chi(\Omega_S) =
-h^{11}(S)
% = -\frac{d(2d^2-6d+7)}3 
\equiv d \pmod 2$, this skew-symmetric sheaf fails the parity
condition when $d$ is odd.


\begin{thebibliography}{99}
\bibitem{Balmer} P.\ Balmer, {\em Derived Witt Groups of a Scheme},
J.\ Pure Appl.\ Algebra, to appear.  See {\tt
http://www.math.uiuc.edu/K-theory/}.

\bibitem{BP} C.\ B\u anic\u a, M.\ Putinar, {\em On complex vector
bundles on rational threefolds}, Math.\ Proc.\ Cambridge Philos.\
Soc.\ {\bf 97} (1985), no.\ 2, 279--288.

\bibitem{Barth} W.\ Barth, {\em Counting singularities of quadratic
forms on vector bundles}, in: Vector bundles and differential
equations (Proc.\ Conf., Nice, 1979), pp.\ 1--19, Progr.\ Math.\ {\bf
7}, Birkh\"auser, 1980.

\bibitem{Bourbaki} N.\ Bourbaki, {\em Formes sesquilin\'eaires et
formes quadratiques}, \'El\'ements de math\'e\-ma\-tiques, Livre
\rm{II}, Alg\`ebre, Chap.\ 9, Hermann, 1959.

\bibitem{BE} D.\ Buchsbaum and D.\ Eisenbud, {\em Algebra Structures
    for Finite Free Resolutions, and Some Structure Theorems for
    Ideals of Codimension $3$}, Amer.\ J.\ Math.\ {\bf 99} (1977),
  447--485.  

\bibitem{CC} G.\ Casnati, F.\ Catanese, {\em Even sets of nodes are
bundle symmetric}, J.\ Differential Geom.\ {\bf 47} (1997), no.\ 2,
237--256.  Corrigendum: J.\ Differential Geom.\ {\bf 50} (1999), no.\
2, 415.


\bibitem{Catanese2} F.\ Catanese, {\em Babbage's conjecture, contact
of surfaces, symmetric determinantal varieties and applications},
Invent.\ Math.\ {\bf 63} (1981), no.\ 3, 433--465.

\bibitem{Catanese} \bysame, {\em Homological algebra and algebraic
surfaces}, in: Algebraic geometry---Santa Cruz 1995, pp.\ 3--56,
Proc.\ Sympos.\ Pure Math.\ {\bf 62}, Part 1, Amer.\ Math.\ Soc.,
1997.

\bibitem{EN} J.\ A.\ Eagon, D.\ G.\ Northcott, {\em On the
Buchsbaum-Eisenbud theory of finite free resolutions}, Collection of
articles dedicated to Helmut Hasse on his seventy-fifth birthday, J.\
Reine Angew.\ Math.\ {\bf 262/263} (1973), 205--219.

\bibitem{EP} D.\ Eisenbud, S.\ Popescu, {\em 
Gale duality and free resolutions of ideals of points},
Invent.\ Math.\ {\bf 136} (1999), no.\ 2, 419--449.

\bibitem{EPW2} D.\ Eisenbud, S.\ Popescu, and C.\ Walter, {\em
    Enriques Surfaces and other Non-Pfaffian Subcanonical Subschemes
    of Codimension $3$}, preprint {\tt math.AG/******}.

\bibitem{EPW3} \bysame, \bysame{} and \bysame, {\em Symmetric locally
free resolutions of coherent sheaves}, in preparation.

\bibitem{FultonHirz} W.\ Fulton, {\em Schubert varieties in flag
bundles for the classical groups}, in: Proceedings of the Hirzebruch
65 Conference on Algebraic Geometry (Ramat Gan, 1993), pp.\ 241--262,
Israel Math.\ Conf.\ Proc.\ {\bf 9}, Bar-Ilan Univ., 1996.


\bibitem{FultonJDG} \bysame, {\em Determinantal formulas for
orthogonal and symplectic degeneracy loci}, J.\ Differential
Geom. {\bf 43} (1996), no.\ 2, 276--290.


\bibitem{FP} \bysame{} and P.\ Pragacz, {\em Schubert Varieties and
Degeneracy Loci}, Springer Lect.\ Notes Math.\ {\bf 1689} (1998).


\bibitem{GH} P.\ Griffiths and J.\ Harris, {\em Residues and
    zero-cycles on algebraic varieties}, Ann.\ of Math.\ (2) {\bf 108}
  (1978), no.\ 3, 461--505.

\bibitem{Grassi} M.~Grassi, {\em Koszul modules and Gorenstein algebras},  
J.\ Algebra {\bf 180} (1996), no.\ 3, 918--953. 

\bibitem{HarrisTu} J.\ Harris and L.\ Tu, {\em On symmetric and
skew-symmetric determinantal varieties}, Topology {\bf 23} (1984),
no.\ 1, 71--84.


\bibitem{Hartshorne} R.\ Hartshorne, {\em Stable vector bundles of rank 
$2$ on $\mathbb P^3$}, Math.\ Ann.\ {\bf 238} (1978), no. 3, 229--280.

\bibitem{JLP} T.\ Jozefiak, A.\ Lascoux, and P.\ Pragacz, {\em Classes
of determinantal varieties associated with symmetric and
skew-symmetric matrices}, Math.\ USSR, Izv.\ {\bf 18} (1982),
575--586.

\bibitem{KU} S.\ Kleiman, B.\ Ulrich, {\em Gorenstein algebras, 
symmetric matrices, self-linked ideals, and symbolic powers},
Trans.\ Amer.\ Math.\ Soc.\ {\bf 349} (1997), no. 12, 4973--5000. 

\bibitem{Knus} M-A.\ Knus,  {\em Quadratic and Hermitian forms over rings.} 
With a foreword by Bertuccioni. 
Grundlehren der Mathematischen Wissenschaften, {\bf 294} 
Springer-Verlag, Berlin, 1991.

\bibitem{Mukai} S.\ Mukai, {\em Curves and symmetric spaces.\ I.} 
Amer.\ J.\ Math.\ {\bf 117} (1995), no.\ 6, 1627--1644. 

\bibitem{Mumford} D.\ Mumford, {\em Theta Characteristics of an
Algebraic Curve}, Ann\ scient.\ Ec.\ Norm.\ Sup.\ (4) {\bf 4} (1971),
181--192. 

\bibitem{Northcott} D.\ G.\ Northcott,  {\em Finite free resolutions}, 
Cambridge Tracts in Mathematics, No.\ {\bf 71}, Cambridge University Press,
Cambridge-New York-Melbourne, 1976. 


\bibitem{Okonek} C.\ Okonek, {\em Notes on varieties of codimension $3$ in 
$\mathbb P^N$}, Manuscripta Math.\ {\bf 84} (1994), no.\
3-4, 421--442.

\bibitem{OSS} \bysame, M.\ Schneider, and H.\ Spindler, {\em Vector
Bundles on Complex Projective Spaces}, Progress in Math.\ {\bf 3},
Birkh\"auser, 1980.

\bibitem{Pfister} A.\ Pfister, {\em Quadratic forms with applications
to algebraic geometry and topology}, London Mathematical Society
Lecture Note Series, {\bf 217}, Cambridge University Press, Cambridge,
1995.

\bibitem{Pragacz} P.\ Pragacz, {\em Cycles of isotropic subspaces and
formulas for symmetric degeneracy loci}, Topics in algebra, Part 2
(Warsaw, 1988), 189--199, Banach Center Publ., {\bf 26}, Part 2, PWN,
Warsaw, 1990.

\bibitem{PR} \bysame{} and J.\ Ratajski, {\em Formulas for Lagrangian
and orthogonal degeneracy loci; $\tilde Q$-polynomial approach},
Compositio Math.\ {\bf 107} (1997), no.\ 1, 11--87.

% \bibitem{Pressley} A.\ Pressley and G.\ Segal, {\em Loop Groups},
%  Oxford Univ.\ Press, 1986.

\bibitem{Vo} J.\ Vogelaar, {\em Constructing vector bundles from
codimension-two subvarieties}, Thesis Leiden, 1978. 

\bibitem{Walter} C.\ Walter, {\em Pfaffian Subschemes}, J.\ Alg.\
Geometry {\bf 5} (1996), 671--704.

\bibitem{Walter2} \bysame, {\em Complexes which are Symmetric up to
Quasi-Isomorphism}, in preparation.

\end{thebibliography}


\end{document}


