
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%
%  Rigid Dualizing Complexes on Schemes
%
%  Amnon Yekutieli and James J. Zhang
% 
%  written in AMSLaTex
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  journal typesetter: 
%   * command \linebreak used
%   * please respect fonts and styles! 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ** class etc for final **
\documentclass[10pt]{amsart}
\usepackage{amscd}
\usepackage{amssymb}
\usepackage[all]{xy}
\usepackage{times}
\date{7 April 2005}
\title{Rigid Dualizing Complexes on Schemes}
% ** end class etc for final **

%% ** class etc for draft **
%\documentclass[10pt,draft,oneside]{amsart}
%\usepackage{amscd}
%\usepackage{amssymb}
%\usepackage[all]{xy}
%\usepackage{times}
%\newcommand{\vers}{\textup{comm-rigid.
%6 April 2005, version 4, draft 20}}
%\title[\vers]{Rigid Dualizing Complexes on Schemes}
%\dedicatory{\vers}
%% ** end class etc for draft **


% ** top matter **
\author{Amnon Yekutieli and James J. Zhang }
\address{A. Yekutieli: Department of  Mathematics 
Ben Gurion University, 
Be'er Sheva 84105, 
Israel}
\email{amyekut@math.bgu.ac.il}
\address{J.J. Zhang: Department of Mathematics, Box 354350,
University of Washington, Seattle, Washington 98195, USA}
\email{zhang@math.washington.edu}
%\subjclass{}
\thanks{{\em Mathematics Subject Classification} 2000.
Primary: 14F05; Secondary: 14B25, 14F10, 13D07, 18G10, 16E45.}
%primary:
% 14F05 Vector bundles, sheaves, related constructions
%[See also 14H60, 14J60, 18F20, 32Lxx, 46M20]
%secondary:
%14B25 Local structure of morphisms: �etale, flat, etc.
%14F10 Differentials and other special sheaves
%  [See also 13Nxx, 32C38]
%13D07 Homological functors on modules (Tor, Ext, etc.)
%18G10 Resolutions; derived functors [See also 13D02,
%  16E05, 18E25]
%16E45 Differential graded algebras and applications
%
\keywords{schemes, derived categories,
dualizing complexes, rigid complexes.}
\thanks{This research was supported by the US-Israel Binational
Science Foundation. The second author was partially supported by 
the US National Science Foundation.}


%  ** new environments **
\newtheorem{thm}[equation]{Theorem}
\newtheorem{cor}[equation]{Corollary}
\newtheorem{prop}[equation]{Proposition}
\newtheorem{lem}[equation]{Lemma}
\theoremstyle{definition}
\newtheorem{dfn}[equation]{Definition}
\newtheorem{rem}[equation]{Remark}
\newtheorem{exa}[equation]{Example}
\newtheorem{dig}[equation]{Digression}
\newtheorem{exer}[equation]{Exercise}
\newtheorem{que}[equation]{Question}
\newtheorem{hyp}[equation]{Hypothesis}
\newtheorem{conv}[equation]{Convention}
\newtheorem{caution}[equation]{Caution}
\numberwithin{equation}{section}


%  ** new commands **
\newcommand{\iso}{\xrightarrow{\simeq}}
\newcommand{\inj}{\hookrightarrow}
\newcommand{\surj}{\twoheadrightarrow}
\newcommand{\xar}{\xrightarrow}
\newcommand{\opn}{\operatorname}
\newcommand{\opnt}[1]{\mathrm{#1}} % less space
\newcommand{\cat}[1]{\operatorname{\mathsf{#1}}}
\newcommand{\bdot}{\bsym{\cdot}}
\newcommand{\ul}{\underline}
%\renewcommand{\bar}{\overline}
\newcommand{\blnk}[1]{\mbox{\hspace{#1}}}
\newcommand{\rmitem}[1]{\item[\text{\textup{(#1)}}]}
\newcommand{\mfrak}[1]{\mathfrak{#1}}
\newcommand{\mcal}[1]{\mathcal{#1}}
\newcommand{\msf}[1]{\mathsf{#1}}
\newcommand{\mbf}[1]{\mathbf{#1}}
\newcommand{\mrm}[1]{\mathrm{#1}}
\newcommand{\mbb}[1]{\mathbb{#1}}
\newcommand{\gfrac}[2]{\genfrac{[}{]}{0pt}{}{#1}{#2}}
\newcommand{\smgfrac}[2]{{\textstyle 
\genfrac{[}{]}{0pt}{}{#1}{#2}}}
\newcommand{\tup}[1]{\textup{#1}}
\newcommand{\bsym}[1]{\boldsymbol{#1}}
\newcommand{\boplus}{\bigoplus\nolimits}
\newcommand{\wtil}[1]{\widetilde{#1}}
\newcommand{\til}[1]{\tilde{#1}}
\newcommand{\what}[1]{\widehat{#1}}
\newcommand{\bra}[1]{\langle #1 \rangle}
\renewcommand{\k}{\Bbbk}
%\newcommand{\K}{\mathbb{K}}
\newcommand{\K}{\mbb{K} \hspace{0.05em}}
\renewcommand{\d}{\mathrm{d}}
\newcommand{\bwedge}{\bigwedge\nolimits}
\newcommand{\smfrac}[2]{{\textstyle \frac{#1}{#2}}}
% next lines define "comment"
\newcommand{\cmnt}[1] %{}
{\mbox{} \newline 
\marginpar{\quad $\clubsuit$ \quad $\clubsuit$} 
\textsf{[#1]} \newline}



% ** document **
\begin{document}

\begin{abstract}
In this paper we present a new approach to Grothendieck duality on 
schemes. Our approach is based on the idea of rigid dualizing 
complexes, which was introduced by Van den Bergh in the context 
of noncommutative algebraic geometry. We obtain most of the 
important features of Grothendieck duality, 
yet manage to avoid lengthy and difficult compatibility 
verifications. Our results apply to finite type schemes over a 
regular noetherian finite dimensional base ring, 
and hence are suitable for arithmetic geometry. 
\end{abstract}

\maketitle

%% ** section 0 **
\setcounter{section}{-1}
\section{Introduction}

Grothendieck duality for schemes was introduced in the book 
``Residues and Duality'' \cite{RD} by R. Hartshorne. This duality 
theory has applications in various areas of algebraic geometry, 
including moduli spaces, resolution of singularities, arithmetic 
geometry, enumerative geometry and more. 

In the forty years since the publication of \cite{RD} a number of 
related papers appeared in the literature. Some of these papers 
provided elaborations on, or more explicit versions of Grothendieck 
duality (e.g.\ \cite{Kl}, \cite{Li}, \cite{HK}, \cite{Ye2}, 
\cite{Ye3}, \cite{Sa}). Other papers contained alternative 
approaches (e.g.\ \cite[Appendix]{RD}, \cite{Ve} and \cite{Ne}). 
The recent book \cite{Co} is a complement to \cite{RD} that 
fills gaps in the proofs, and also contains the first proof of 
the Base Change Theorem. A noncommutative version of Grothendieck 
duality was developed in \cite{Ye1}, which has applications in 
algebra (e.g.\ \cite{EG}) and even in mathematical physics (e.g.\ 
\cite{KKO}). Other papers sought to extend the scope of 
Grothendieck duality to formal schemes (e.g.\ \cite{AJL} and 
\cite{LNS}) or to differential graded algebras (see \cite{FIJ}).

In this paper we present a new approach to Grothendieck duality 
on schemes, including Conrad's results on base change. 
The key idea in our approach is the use of {\em rigid dualizing 
complexes}. This notion was introduced by Van den Bergh 
\cite{VdB} in the context of noncommutative algebraic geometry, 
and was developed further in our papers \cite{YZ1, YZ2, YZ3}. 

The background material we need is standard algebraic geometry
(from \cite{EGA}), the theory of derived categories
(from \cite{RD} or \cite{KS}), and its generalization to 
differential graded algebras (which is discussed in Section 1). 
We also need a few isolated 
results on dualizing complexes from \cite{RD}. 
Apart from that our treatment is self-contained. 

Let us explain what are rigid dualizing complexes and how they
are used in our paper. Fix for the rest of the introduction a 
finite dimensional, regular, noetherian, commutative base ring 
$\K$. Let $A$ be an essentially finite type commutative 
$\K$-algebra. The bounded derived category of $A$-modules is 
denoted by $\msf{D}^{\mrm{b}}(\cat{Mod} A)$.
Given a complex 
$M \in \msf{D}^{\mrm{b}}(\cat{Mod} A)$
we define its {\em square}
$\opn{Sq}_{A / \K} M \in \msf{D}^{\mrm{b}}(\cat{Mod} A)$.
If $A$ is flat over $\K$ the squaring operation is very easy to 
define:
\[ \opn{Sq}_{A / \K} M :=
\opn{RHom}_{A \otimes_{\K} A}(A, M \otimes^{\mrm{L}}_{\K} M) . \]
But in general the definition is more complicated, and requires 
differential graded algebras (see Section \ref{sec2}). 
Given a morphism 
$\phi : M \to N$ in 
$\msf{D}^{\mrm{b}}(\cat{Mod} A)$
there is an induced morphism 
$\opn{Sq}_{A / \K}(\phi): \opn{Sq}_{A / \K} M \to
\opn{Sq}_{A / \K} N$. 
For any $a \in  A$ one has
$\opn{Sq}_{A / \K}(a \phi) = a^2 \opn{Sq}_{A / \K}(\phi)$;
hence the name ``squaring''.

A {\em rigidifying isomorphism} for $M$ is an isomorphism
$\rho : M \iso \opn{Sq}_{A / \K} M$
in \linebreak $\msf{D}^{\mrm{b}}(\cat{Mod} A)$.
The pair $(M, \rho)$ 
is called a {\em rigid complex over $A$ relative to $\K$}. 
Suppose $(M, \rho_M)$ and $(N, \rho_N)$ are two rigid complexes. 
A {\em rigid morphism} 
$\phi : (M, \rho_M) \to (N, \rho_N)$ is 
a morphism $\phi : M \to N$ in $\msf{D}^{\mrm{b}}(\cat{Mod} A)$
such that 
$\rho_N \circ \phi = \opn{Sq}_{A / \K}(\phi) \circ \rho_M$.
Observe that if $(M, \rho_M)$ is a rigid complex such that
$\opn{RHom}_{A}(M, M) = A$, and 
$\phi : (M, \rho_M) \to (M, \rho_M)$ is a rigid isomorphism, then 
$\phi$ is multiplication by some invertible element $a \in A$ 
satisfying $a = a^2$; and therefore $a = 1$. We conclude that 
{\em the identity is the only rigid automorphism of 
$(M, \rho_M)$.}

Let $B$ be another essentially finite type commutative 
$\K$-algebra, and let $f^* : A \to B$ be a homomorphism. First 
assume $f^*$ is finite, and let
$f^{\flat} M := \opn{RHom}_{A}(B, M) \in 
\msf{D}^{+}(\cat{Mod} B)$.
If $f^{\flat} M$ has bounded cohomology
then we there is an induced rigidifying isomorphism
$f^{\flat}(\rho_M) : f^{\flat} M \iso 
\opn{Sq}_{B / \K} f^{\flat} M$ (see Theorem \ref{thm2.2}).
We write
$f^{\flat}(M, \rho_M) := (f^{\flat} M, f^{\flat}(\rho_M))$.
Next assume $f^*$ is either smooth of relative dimension $n$ or a 
localization, and let
$f^{\sharp} M := \Omega^n_{B / A}[n] \otimes_A M \in 
\msf{D}^{\mrm{b}}(\cat{Mod} B)$.
Then there is an induced rigidifying isomorphism
$f^{\sharp}(\rho_M) : f^{\sharp} M \iso 
\opn{Sq}_{B / \K} f^{\sharp} M$
(see Theorem \ref{thm2.4}), and thus a new rigid complex
$f^{\sharp}(M, \rho_M) := (f^{\sharp} M, f^{\sharp}(\rho_M))$.

Now let's consider dualizing complexes. Recall that a complex 
$R \in \msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} A)$ is dualizing if 
it has finite injective dimension, and if the canonical morphism 
$A \to \opn{RHom}_{A}(R, R)$ is an isomorphism.
A {\em rigid dualizing complex over $A$ relative to $\K$} is a 
rigid complex $(R, \rho)$ such that $R$ is dualizing. 

Here is the first main result of our paper.

\begin{thm} \label{thm0.1}
Let $\K$ be a regular finite dimensional noetherian ring, and
let $A$ be an essentially finite type $\K$-algebra.
\begin{enumerate}
\item The algebra $A$ has a rigid dualizing complex 
$(R_A, \rho_A)$, which is unique up to a unique rigid isomorphism.
%
\item Given a finite homomorphism $f^* : A \to B$, there is a 
unique rigid isomorphism
$f^{\flat}(R_A, \rho_A) \iso (R_B, \rho_B)$.
%
\item Given a homomorphism $f^* : A \to B$ which is either 
smooth or a localization, there is a unique rigid isomorphism
$f^{\sharp}(R_A, \rho_A) \iso (R_B, \rho_B)$.
\end{enumerate}
\end{thm}

This theorem is a combination of Theorems \ref{thm2.3}, \ref{thm4.12} 
and \ref{thm2.10} in the body of the paper. Theorem \ref{thm0.1}
pretty much covers Grothendieck duality for affine 
schemes. For instance, it it gives rise to a trace morphism
$\opn{Tr}_f : R_B \to R_A$ for a finite homomorphism 
$f^* : A \to B$, which is functorial and nondegenerate 
(see Proposition \ref{prop4.4}). 

Let $f^* : A \to B$ be a smooth homomorphism of $\K$-algebras,
and let $i^* : B \to \bar{B}$ be a finite homomorphism. 
Assume $g^* := i^* \circ f^*$ is finite and flat. 
Since $\opn{Sq}_{A / A} A = A$ we get the tautological rigid complex 
$(A, \rho_{\mrm{tau}})$. 
As explained above, there are two rigid complexes
$g^{\flat} (A, \rho_{\mrm{tau}})$ and
$i^{\flat} f^{\sharp} (A, \rho_{\mrm{tau}})$
over $\bar{B}$ relative to $A$. By Theorem \ref{thm0.1} there 
exist isomorphisms 
$R_B \cong f^{\sharp} A$, 
$R_{\bar{B}} \cong i^{\flat} R_B$ and
$R_{\bar{B}} \cong g^{\flat} A$. Composing them we obtain an 
isomorphism 
$\zeta : g^{\flat} A \iso i^{\flat} f^{\sharp} A$
called the {\em residue isomorphism}. 

\begin{thm} \label{thm0.3}
The residue isomorphism $\zeta$ is the unique rigid isomorphism 
$g^{\flat} (A, \rho_{\mrm{tau}}) \iso 
i^{\flat} f^{\sharp} (A, \rho_{\mrm{tau}})$
relative to $A$.
\end{thm}

This theorem is restated as Theorem \ref{thm2.11}. It  
implies, among other things, that the residue isomorphism of 
independent of the base ring $\K$.

The passage to schemes requires gluing dualizing complexes. We 
achieve this using the concept of {\em stack of 
subcategories of $\msf{D}^{\mrm{b}}(\cat{Mod} \mcal{O}_X)$};
see Definition \ref{dfn4.4}. 
On a finite type $\K$-scheme $X$ there is a dimension function that 
is intimately related to rigid dualizing complexes; we denote it by 
$\opn{dim}_{\K}$ (see Definition \ref{dfn6.2}). 
Following \cite{RD} we say that a complex
$\mcal{M} \in \msf{D}^{\mrm{b}}(\cat{Mod} \mcal{O}_X)$
is a {\em Cohen-Macaulay complex} if the local cohomologies 
$\mrm{H}^i_x \mcal{M}$ vanish whenever $i \neq -\opn{dim}_{\K}(x)$.
Let us denote by 
$\msf{D}^{\mrm{b}}_{\mrm{qc}}(\cat{Mod} \mcal{O}_X)_{\mrm{CM}}$
the subcategory of Cohen-Macaulay complexes with quasi-coherent 
cohomologies.

\begin{thm} \label{thm0.2}
Let $\K$ be a regular finite dimensional noetherian ring, and
let $X$ be a finite type $\K$-scheme. The assignment 
$U \mapsto 
\msf{D}^{\mrm{b}}_{\mrm{qc}}(\cat{Mod} \mcal{O}_U)_{\mrm{CM}}$,
for open sets $U \subset X$, 
is a stack of subcategories of $\msf{D}(\cat{Mod} \mcal{O}_X)$.
\end{thm}

This means that Cohen-Macaulay complexes can be glued. 
The theorem is repeated as Theorem \ref{thm6.1} in the body of the 
paper. In an earlier version of our paper, which was entitled 
``Rigid Dualizing Complexes and Perverse Sheaves on Schemes'',
a similar result was proved using the rigid perverse t-structure
on $\msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)$.
The perverse sheaf approach is indispensable for noncommutative 
algebraic geometry (cf.\ \cite{YZ4}). However, we later realized 
that for commutative schemes it is possible, and easier, 
to prove the required result using Cousin complexes. 

A {\em rigid structure} on a  complex 
$\mcal{M} \in \msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)$
is a collection $\bsym{\rho} = \{ \rho_U \}$, where for every 
affine open set $U \subset X$, $\rho_U$ is a rigidifying 
isomorphism for the complex
$M_U := \mrm{R} \Gamma(U, \mcal{M})$
over the algebra $A_U := \Gamma(U, \mcal{O}_{X})$ relative to $\K$.
The condition is that for an 
inclusion $f : V \to U$ of affine open sets, the localization 
isomorphism
$f^{\sharp}(M_U, \rho_U) \to (M_V, \rho_V)$
should be rigid. A {\em rigid dualizing complex on $X$} is a pair
$(\mcal{R}_X, \bsym{\rho}_X)$, where $\mcal{R}_X$ is a dualizing 
complex and $\bsym{\rho}_X$ is a rigid structure on it.

Suppose $f : X \to Y$ is a morphism between finite type 
$\K$-schemes. If $f$ is finite then there is a functor
$f^{\flat} : \msf{D}(\cat{Mod} \mcal{O}_Y) \to 
\msf{D}(\cat{Mod} \mcal{O}_X)$
defined by
\[ f^{\flat} \mcal{N} := \mcal{O}_X 
\otimes_{f^{-1} f_* \mcal{O}_X} f^{-1} 
\mrm{R} \mcal{H}om_{\mcal{O}_Y}(f_* \mcal{O}_X, \mcal{N}) . \]
On the other hand if $f$ is smooth we have a functor
$f^{\sharp} : \msf{D}(\cat{Mod} \mcal{O}_Y) \to 
\msf{D}(\cat{Mod} \mcal{O}_X)$
defined as follows. Let $X_1, \ldots, X_r$ be the connected 
components of $X$, with inclusions $g_i : X_i \to X$. Let $n_i$ be 
the rank of $\Omega^1_{X_i / Y}$. Then 
\[ f^{\sharp} \mcal{N} :=
\big( \boplus_i \, g_{i *} \, \Omega^{n_i}_{X_i / Y}[n_i] \big)
\otimes_{\mcal{O}_X} f^* \mcal{N}. \]

The combination of Theorems \ref{thm0.1} and \ref{thm0.2} implies, 
without much effort, the next result (which is
repeated as Theorems \ref{thm5.2} and \ref{thm5.3}).

\begin{thm} \label{thm0.4}
Let $\K$ be a regular finite dimensional noetherian ring.
\begin{enumerate}
\item Let $X$ be a finite type $\K$-scheme.
The scheme $X$ has a rigid dualizing complex 
$(\mcal{R}_X, \bsym{\rho}_X)$, 
which is unique up to a unique rigid isomorphism.
%
\item Given a finite morphism $f : X \to Y$, 
the complex $f^{\flat} \mcal{R}_Y$ 
is a dualizing complex on $X$, and it has an 
induced rigid structure $f^{\flat}(\bsym{\rho}_Y)$. 
Hence there is a unique rigid isomorphism 
$\mcal{R}_X \cong f^{\flat} \mcal{R}_Y$
in $\msf{D}(\cat{Mod} \mcal{O}_X)$.
%
\item Given a smooth morphism $f : X \to Y$, 
the complex $f^{\sharp} \mcal{R}_Y$ 
is a dualizing complex on $X$, and it has an 
induced rigid structure $f^{\sharp}(\bsym{\rho}_Y)$. 
Hence there is a unique rigid isomorphism 
$\mcal{R}_X \cong f^{\sharp} \mcal{R}_Y$
in $\msf{D}(\cat{Mod} \mcal{O}_X)$.
\end{enumerate}
\end{thm}

We can now define the  {\em rigid auto-duality functor} 
$\mrm{D}_X := \mrm{R} \mcal{H}om_{\mcal{O}_X}(-, \mcal{R}_X)$. 
For a morphism $f : X \to Y$ we define a functor
\[ f^! : \msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_Y) \to
\msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)  \]
as follows. If $X = Y$ and $f = \bsym{1}_X$ (the identity 
automorphism) then
$f^! := \bsym{1}_{\msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)}$
(the identity functor). Otherwise we define
$f^! := \mrm{D}_X \, \mrm{L} f^* \, \mrm{D}_Y$.
Let $\cat{FTSch} / \K$ be the category of finite type schemes 
over $\K$, and let $\cat{Cat}$ denote the category of all 
categories.

\begin{cor} \label{cor0.1} 
The assignment $f \mapsto f^!$ is the $1$-component of a 
contravariant $2$-functor $\cat{FTSch} / \K \to \cat{Cat}$,
whose $0$-component is 
$X \mapsto \msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)$.
\end{cor} 

For details on $2$-functors see \cite[Section I.1.5]{Ha}. 
Some authors use the term ``pseudofunctor''.

A {\em rigid residue complex} on $X$ is a rigid dualizing complex 
$(\mcal{K}_X, \bsym{\rho}_X)$, such that for every $p$ there is an 
isomorphism of sheaves
$\mcal{K}_X^p \cong \boplus_{\opn{dim}_{\K}(x) = -p}
\mcal{J}(x)$. 
Here $\mcal{J}(x)$ denotes an injective hull of the residue 
field $\bsym{k}(x)$, considered as a quasi-coherent sheaf, 
constant on $\overline{ \{ x \}}$.
It is quite easy to prove that a rigid residue complex exists: 
apply the Cousin functor $\opn{E}$ to the rigid dualizing complex 
$\mcal{R}_X$ (see Section \ref{sec6}). 
The complex $\mcal{K}_X := \mrm{E} \mcal{R}_X$
is isomorphic to $\mcal{R}_X$ in 
$\msf{D}(\cat{Mod} \mcal{O}_X)$, and hence it inherits a rigid 
structure $\bsym{\rho}_X$. This rigid residue complex is unique up 
to a unique isomorphism of complexes; see Proposition 
\ref{prop8.1}. Notice that the rigid auto-duality functor becomes
$\mrm{D}_X = \mcal{H}om_{\mcal{O}_X}(-, \mcal{K}_X)$.

For a point $x$ with $\opn{dim}_{\K}(x) = -p$ let
$\mcal{K}_X(x) := \mrm{H}^p_x \mcal{K}_X$. Due to the structure of 
the complex $\mcal{K}_X$ we see that
$\mcal{K}_X(x) \cong \mcal{J}(x)$ and
$\mcal{K}_X^p = \boplus_{\opn{dim}_{\K}(x) = -p}
\mcal{K}_X(x)$. 
Now $\mcal{K}_X(x)$ only depends on the local ring
$\mcal{O}_{X, x}$. This fact, plus the traces for finite algebra 
homomorphisms, allow us to define a trace map
$\opn{Tr}_f : f_* \mcal{K}_X \to \mcal{K}_Y$
for any morphism of schemes $f : X \to Y$. 
This trace is only a map of graded $\mcal{O}_Y$-modules, 
but it is functorial, i.e.\ 
$\opn{Tr}_{g \circ f} = \opn{Tr}_g \circ \opn{Tr}_f$
for composable morphisms (see Definition \ref{dfn6.1} and
Proposition \ref{prop8.2}). 

\begin{thm} \label{thm0.5}
Let $f : X \to Y$ be a proper morphism between finite 
type $\K$-schemes. Then
$\opn{Tr}_f : f_* \mcal{K}_X \to \mcal{K}_Y$ 
is a homomorphism of complexes.
\end{thm}

The theorem is restated as Theorem \ref{thm8.3} in the body of 
the paper. The proof goes like this: as in \cite{RD}, 
we reduce to the case 
$Y = \opn{Spec} K$ with $K$ a field, and $X = \mbf{P}^1_K$. 
We then use explicit calculations (involving the residue 
isomorphism and using Theorem \ref{thm0.3}) to do this case. 

Due to Theorem \ref{thm0.5} we get a trace map
$\opn{Tr}_{f} : \mrm{R} f_* f^! \to \bsym{1}$,
which is a transformation of functors from 
$\msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_Y)$
to itself. It is not hard to deduce that this trace is 
nondegenerate (this is Theorem \ref{thm8.4} in the body of the 
paper):

\begin{thm} \label{thm0.6}
Let $f : X \to Y$ be a proper morphism of finite type
$\K$-schemes, let
$\mcal{M} \in \msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)$
and let
$\mcal{N} \in \msf{D}^{\mrm{b}}_{\mrm{c}}
(\cat{Mod} \mcal{O}_Y)$.
Then the morphism
\[ \mrm{R} f_* \mrm{R} \mcal{H}om_{\mcal{O}_X}
(\mcal{M}, f^! \mcal{N}) \to
\mrm{R} \mcal{H}om_{\mcal{O}_Y}
(\mrm{R} f_* \mcal{M}, \mcal{N}) \]
in $\msf{D}(\cat{Mod} \mcal{O}_Y)$
induced by 
$\opn{Tr}_f : \mrm{R} f_* f^! \mcal{N} \to \mcal{N}$ 
is an isomorphism.
\end{thm}

Our last results deal with the {\em relative dualizing sheaf}. 
Suppose $f : X \to Y$ is flat of relative dimension $n$ (i.e.\ the 
fibers of $f$ are equidimensional of dimension $n$). We then 
define
$\bsym{\omega}_{X / Y} := \mrm{H}^{-n} f^! \mcal{O}_Y$.
This is a coherent sheaf on $X$ with nice properties.
For instance, if $U \subset X$ is an open set such that 
$f|_U$ is smooth, then, due to Theorem \ref{thm0.4}(3), we have
$\bsym{\omega}_{X / Y}|_U = \Omega^n_{U / Y}$. 
In case $f$ is a Cohen-Macaulay morphism of relative dimension $n$
(i.e.\ flat with Cohen-Macaulay fibers) then 
$f^! \mcal{O}_Y = \bsym{\omega}_{X / Y}[n]$ (see Proposition
\ref{prop9.4}).
We can sometimes characterize the relative dualizing sheaf
explicitly: if $f$ is generically smooth and both $X$ and $Y$ are 
integral schemes, then $\bsym{\omega}_{X / Y}$ is a subsheaf of 
the constant quasi-coherent sheaf 
$\Omega^n_{\bsym{k}(X) / \bsym{k}(Y)}$. Moreover, under some 
separability assumptions (e.g.\ $\opn{char} \bsym{k}(Y) = 0$)
we can describe the subsheaf 
$\bsym{\omega}_{X / Y} \subset 
\Omega^n_{\bsym{k}(X) / \bsym{k}(Y)}$
explicitly in terms of traces (see Theorem \ref{thm9.1}).

Finally we have this main result, which is our version of Conrad's 
work \cite{Co}.

\begin{thm} 
Suppose
\[ \UseTips
\xymatrix @=4ex {
X'
\ar[d]_{f'} \ar[r]^{h}
& X 
\ar[d]_{f} \\
Y'
\ar[r]^{g} 
& Y } \]
is a cartesian diagram in 
$\cat{FTSch} / \K$, with $f$ a Cohen-Macaulay morphism of relative 
dimension $n$, and $g$ any morphism. 
\begin{enumerate}
\item There is a homomorphism $\mcal{O}_{X}$-modules
\[ \theta_{f, g} : \bsym{\omega}_{X / Y} \to
h_* \bsym{\omega}_{X' / Y'} , \]
such that the induced $\mcal{O}_{X'}$-linear homomorphism 
$h^*(\theta_{f, g}) : h^* \bsym{\omega}_{X / Y} \to
\bsym{\omega}_{X' / Y'}$
is an isomorphism. The homomorphism $\theta_{f, g}$ has a local 
characterization in terms of rigidity. 
%
\item
Assume the morphism $f$ is proper. Then
\[ g^* \circ \opn{Tr}_f = 
g_*(\opn{Tr}_{f'}) \circ \mrm{R}^n f_*(\theta_{f,g})
: \mrm{R}^n f_* \bsym{\omega}_{X / Y} \to 
g_* \mcal{O}_{Y'} . \] 
\end{enumerate}
\end{thm}

This theorem, with full details, appears as Theorems 
\ref{thm9.2} and \ref{thm9.3} in the body of the paper. In case 
$f$ is smooth of relative dimension $n$, 
the homomorphism $\theta_{f,g}$ is the usual base change 
homomorphism  
$\Omega^n_{X / Y} \to h_* \Omega^n_{X' / Y'}$;
see Corollary \ref{cor9.2}.

To end the introduction let us mention a potential further 
implementation of our methods: Grothendieck duality for algebraic 
stacks (in the sense of \cite{LMB}). Let $\mfrak{X}$ be a 
Deligne-Mumford stack, with \'etale presentation
$P : X \to \mfrak{X}$ by a finite type $\K$-scheme $X$. 
Since our methods are local, 
and rigid dualizing complexes have an extremely controlled 
variance with respect to \'etale morphisms (see Theorem 
\ref{thm0.1}(3)), it is conceivable that one could glue the rigid 
dualizing complex $\mcal{R}_X$ to a dualizing complex 
$\mcal{R}_{\mfrak{X}}$ on $\mfrak{X}$. 

\medskip \noindent
\textbf{Acknowledgments.}
The authors wish to thank Bernhard Keller for his generous help 
with differential graded algebras. We also wish to thank 
Luchezar Avramov, Brian Conrad, Joseph Lipman, Amnon Neeman,
Paramathanath Sastry and Michel Van den Bergh 
for useful discussions and valuable suggestions.

\tableofcontents 



%\newpage
%% ** section 1 **
\section{Differential Graded Algebras}
\label{sec1}

This section contains some technical material about differential 
graded algebras and their derived categories. The results 
are needed for treating rigid dualizing complexes 
when the base ring $\K$ is 
not a field. There is some overlap here with the papers \cite{FIJ},
\cite{Ke} and \cite{Be}. 
We recommend skipping this section, as well as Section 2, when first 
reading the paper; the reader will just have to assume that $\K$ 
is a field, and replace $\otimes^{\mrm{L}}_{\K}$ with 
$\otimes_{\K}$ everywhere. 

Let $\K$ be a commutative ring. 
A graded $\K$-algebra $A = \boplus_{i \in \mbb{Z}} A^i$
is said to be {\em super-commutative} if 
$a b = (-1)^{ij} b a$ for all $a \in A^i$ and $b \in A^j$,
and if $a^2 = 0$ whenever $i$ is odd. 
(Some authors call such a graded algebra strictly commutative.)
$A$ is said to be {\em non-positive} if $A^i = 0$ for all 
$i > 0$. Throughout the paper all graded algebras are assumed to be 
non-positive, super-commutative, associative, unital $\K$-algebras 
by default, and all algebra homomorphisms are over $\K$. 

By {\em differential graded algebra} (or DG algebra) 
over $\K$ we mean a graded $\K$-algebra 
$A = \bigoplus_{i \leq 0} A^i$,
together with a $\K$-linear derivation 
$\mrm{d} : A \to A$ of degree $1$ satisfying 
$\mrm{d} \circ \mrm{d} = 0$. Note that the graded Leibniz rule 
holds: 
\[ \mrm{d}(a b) = \mrm{d}(a) b + (-1)^i a \mrm{d}(b) \]
for $a \in A^i$ and $b \in A^j$. 

A DG algebra homomorphism $f : A \to B$ is a degree $0$
homomorphism of graded $\K$-algebras
that commutes with $\mrm{d}$. It is a 
quasi-isomorphism if $\mrm{H}(f)$ is an isomorphism (of graded 
algebras). 

A differential graded (DG) $A$-module is a graded
(left) $A$-module $M = \boplus_{i \in \mbb{Z}} M^i$,
endowed with a degree $1$ $\K$-linear 
homomorphism $\mrm{d} : M \to M$ satisfying
$\mrm{d}(a m) = \mrm{d}(a) m + (-1)^i a \mrm{d}(m)$
for $a \in A^i$ and $m \in M^j$. Note that we can make $M$ into a 
right DG $A$-module by the rule 
$m a := (-1)^{i j} a m$ for $a \in A^i$ and $m \in M^j$. 
The category of DG $A$-modules is denoted by $\cat{DGMod} A$. 
It is an abelian category whose morphisms are degree $0$ 
$A$-linear homomorphisms commuting with the differentials.

There is a forgetful functor from DG algebras to graded algebras (it 
forgets the differential), and we denote it by
$A \mapsto \opn{und} A$. 
Likewise for $M \in \cat{DGMod} A$ we have
$\opn{und} M \in \cat{GrMod} (\opn{und} A)$, the category of graded 
$\opn{und} A$ -modules. A DG $\K$-module is just a complex of 
$\K$-modules. 

Given a graded algebra $A$ and two graded $A$-modules $M$ and $N$ 
let us write
\[ \opn{Hom}_{\K}(M, N)^i := \prod_{j \in \mbb{Z}}
\opn{Hom}_{\K}(M^j, N^{j+i}) , \]
the set of homogeneous $\K$-linear homomorphisms of degree $i$
from $M$ to $N$, and let
\[ \begin{aligned}
& \opn{Hom}_{A}(M, N)^i := \\
& \quad \{ \phi \in \opn{Hom}_{\K}(M, N)^i \mid
\phi(a m) = (-1)^{i j} a \phi(m) \text{ for all } 
a \in A^j \text{ and } m \in M \} .
\end{aligned} \]
Then 
\begin{equation} \label{eqn1.2}
\opn{Hom}_{A}(M, N) := \boplus_{i \in \mbb{Z}} 
\opn{Hom}_{A}(M, N)^i
\end{equation}
is a graded $A$-module, by the formula 
$(a \phi)(m) := a \phi(m) = (-1)^{i j} \phi(a m)$
for $a \in A^j$ and $\phi \in \opn{Hom}_{A}(M, N)^i$.
Cf. \cite[Chapter VI]{ML}. The set $\opn{Hom}_{A}(M, N)$ is related 
to the set of $A$-linear homomorphisms $M \to N$ 
as follows. Let's denote by $\opn{ungr}$ 
the functor forgetting the grading. Then the map
\[ \Phi : \opn{Hom}_{A}(M, N) \to 
\opn{Hom}_{\opn{ungr} A}(\opn{ungr} M, \opn{ungr}N) , \]
defined by
$\Phi(\phi)(m) := (-1)^{ij} \phi(m)$
for $\phi \in \opn{Hom}_{A}(M, N)^i$ and $m \in M^j$, is 
$\opn{ungr} A$ -linear, and $\Phi$ is bijective if $M$ 
is a finitely generated $A$-module.

For a DG algebra $A$ and two DG $A$-modules $M, N$ there is a 
differential $\mrm{d}$ on \linebreak
$\opn{Hom}_{\opn{und} A}(\opn{und} M, \opn{und} N)$, with formula
$\mrm{d}(\phi) := 
\mrm{d} \circ \phi + (-1)^{i + 1} \phi \circ \mrm{d}$
for $\phi$ of degree $i$. 
The resulting DG $A$-module is denoted by 
$\opn{Hom}_{A}(M, N)$. 
Note that $\opn{Hom}_{\cat{DGMod} A}(M, N)$
coincides with the set of $0$-cocycles of 
$\opn{Hom}_{A}(M, N)$. 
Two homomorphisms 
$\phi_0, \phi_1 \in \opn{Hom}_{\cat{DGMod} A}(M, N)$
are  said to be {\em homotopic} if 
$\phi_0 - \phi_1 = \mrm{d}(\psi)$
for some $\psi \in$ \linebreak $\opn{Hom}_{A}(M, N)^{-1}$. The DG 
modules 
$M$ and $N$ are called {\em homotopy equivalent} if
there are homomorphisms 
$\phi : M \to N$ and $\psi : N \to M$ in $\cat{DGMod} A$ such that 
$\psi \circ \phi$ and $\phi \circ \psi$ are homotopic to the 
respective identity homomorphisms.

Suppose $A$ and $B$ are two DG $\K$-algebras. Then 
$A \otimes_{\K} B$ is also a DG $\K$-algebra; the sign rule says 
that
$(a_1 \otimes b_1) \cdot (a_2 \otimes b_2) := 
(-1)^{i j} a_1 a_2 \otimes b_1 b_2$
for $b_1 \in B^j$ and $a_2 \in A^i$. 
The differential is of course
$\mrm{d}(a \otimes b) := \mrm{d}(a) \otimes b 
+ (-1)^i a \otimes \mrm{d}(b)$
for $a \in A^i$. If $M \in \cat{DGMod} A$ and $N \in \cat{DGMod} B$
then $M \otimes_{\K} N \in \cat{DGMod} A \otimes_{\K} B$. 
If $N \in \cat{DGMod} A$ then $M \otimes_A N$, which is a quotient 
of $M \otimes_{\K} N$, is a DG $A$-module. 

Let $A$ be a DG algebra.
Since $A$ is non-negative one has $\mrm{d}(A^0) = 0$; and 
therefore the differential $\mrm{d} : M^i \to M^{i+1}$ 
of any DG $A$-module $M$
is $A^0$-linear. This easily implies that the truncated objects
\begin{equation}
\begin{aligned}
\tau^{\geq i} M & := \big( \cdots 0 \to 
\opn{Coker}(M^{i-1} \to M^i) \to M^{i+1} \to \cdots \big) \\
& \text{and} \\
\tau^{\leq i} M & := \big( \cdots \to M^{i-1} \to
\opn{Ker}(M^{i} \to M^{i+1}) \to 0 \to \cdots \big) \\
\end{aligned}
\end{equation}
are DG $A$-modules. 

There is a derived category obtained from $\cat{DGMod} A$
by inverting the quasi-iso\-mor\-phisms, which we denote by
$\til{\msf{D}}(\cat{DGMod} A)$.
See \cite{Ke} for details. Note that
in case $A$ is a usual algebra (i.e.\ it is concentrated in degree 
$0$) then 
$\cat{DGMod} A = \msf{C}(\cat{Mod} A)$,
the abelian category of complexes of $A$-modules, and 
$\til{\msf{D}}(\cat{DGMod} A) = \msf{D}(\cat{Mod} A)$,
the usual derived category of $A$-modules. 

In order to derive functors one has 
several useful devices. A DG $A$-module $P$ is called 
{\em K-projective} if for any acyclic DG $A$-module $N$ the 
DG module $\opn{Hom}_{A}(P, N)$ is acyclic.
(This name is due to Spaltenstein \cite{Sp}. Keller \cite{Ke} uses
the term ``property (P)'' to indicate K-projective DG modules,
and in \cite{AFH} the authors use ``homotopically projective''.
See also \cite{Hi}.)
Similarly one defines {\em K-injective} and {\em K-flat}
DG modules: $I$ is K-injective, and $F$ is K-flat, if 
$\opn{Hom}_{A}(N, I)$ and $F \otimes_A N$ are acyclic for 
all acyclic $N$. 
It is easy to see that any K-projective DG module is also K-flat.
Every two objects $M, N \in \cat{DGMod} A$
admit quasi-isomorphisms $P \to M$, $N \to I$ and $F \to M$,
with $P$ K-projective, $I$ K-injective and $F$ K-flat.
Then one defines
\[ \mrm{RHom}_{A}(M, N) := \mrm{Hom}_{A}(P, N) \cong
\mrm{Hom}_{A}(M, I) \in \til{\msf{D}}(\cat{DGMod} A) \]
and
\[ M \otimes^{\mrm{L}}_{A} N := F \otimes_{A} N \in
\til{\msf{D}}(\cat{DGMod} A) . \]

When $A$ is a usual algebra, any bounded above complex of projective 
(resp.\ flat) modules is K-projective (resp.\ K-flat). And any
bounded below complex of injective $A$-modules is K-injective. 
A single $A$-module $M$ is projective (resp.\ injective, 
resp.\ flat) iff it is K-projective (resp.\ K-injective, 
resp.\ K-flat) as DG $A$-module.

The following useful result is partly contained in 
\cite{Hi}, \cite{Ke} and \cite{KM}. 

\begin{prop} \label{prop1.1}
Let $A \to B$ be a quasi-isomorphism of DG algebras.
\begin{enumerate}
\item Given $M \in \til{\msf{D}}(\cat{DGMod} A)$ and 
$N \in \til{\msf{D}}(\cat{DGMod} B)$, the canonical morphisms 
$M \to B \otimes^{\mrm{L}}_{A} M$ and 
$B \otimes^{\mrm{L}}_{A} N \to N$ are both isomorphisms.
Hence the ``restriction of scalars'' functor
$\til{\msf{D}}(\cat{DGMod} B) \to \til{\msf{D}}(\cat{DGMod} A)$
is an equivalence.
%
\item Let $M, N \in \til{\msf{D}}(\cat{DGMod} B)$. Then there are
functorial isomorphisms 
$M \otimes^{\mrm{L}}_{B} N \cong M \otimes^{\mrm{L}}_{A} N$
and
$\mrm{RHom}_{B}(M, N) \cong \mrm{RHom}_{A}(M, N)$
in $\til{\msf{D}}(\cat{DGMod} A)$.
\end{enumerate}
\end{prop}

\begin{proof}
(1) Choose K-projective resolutions $P \to M$ and $Q \to N$
over $A$. Then $M \to B \otimes^{\mrm{L}}_{A} M$ 
becomes $P \cong A \otimes_A P \to B \otimes_A P$,
which is evidently a quasi-isomorphism. On the other hand
$B \otimes^{\mrm{L}}_{A} N \to N$ becomes
$B \otimes_A Q \to Q$; which is a quasi-isomorphism because so is 
$A \otimes_A Q \to B \otimes_A Q$.

\medskip \noindent
(2) Choose K-projective resolutions $P \to M$ and $Q \to N$
over $A$. We note that $B \otimes_A P$ and $B \otimes_A Q$ are
K-projective over $B$, and 
$B \otimes_A P \to M$, $B \otimes_A Q \to N$ are 
quasi-isomorphisms. Therefore we get isomorphisms in 
$\til{\msf{D}}(\cat{DGMod} A)$:
\[ M \otimes^{\mrm{L}}_{B} N = 
(B \otimes_A P) \otimes_B (B \otimes_A Q) \cong 
(B \otimes_A P) \otimes_A Q \cong P \otimes_A Q = 
M \otimes^{\mrm{L}}_{A} N . \]
The same resolutions give
\[ \mrm{RHom}_{B}(M, N) = \mrm{Hom}_{B}(B \otimes_A P, N) \cong
\mrm{Hom}_{A}(P, N) = \mrm{RHom}_{A}(M, N) . \]
\end{proof}

There is a structural characterization of K-projective DG
modules, which we shall review (since we shall elaborate on 
it later). This characterization works in steps. First one defines 
{\em semi-free} DG $A$-modules. A DG $A$-module $Q$ is called 
semi-free if there is a subset
$X \subset Q$ consisting of (nonzero) homogeneous elements, and an 
exhaustive non-negative increasing filtration 
$\{ F_{i} X \}_{i \in \mbb{Z}}$
of $X$ by subsets (i.e.\ $F_{-1} X = \emptyset$ and
$X = \bigcup F_i X$), such that
$\opn{und} Q$ is a free graded $\opn{und} A$ -module
with basis $X$, and for every $i$ one has
$\mrm{d}(F_i X) \subset \sum_{x \in F_{i - 1} X} A x$.
The set $X$ is called a {\em semi-basis} of $Q$. 
Note that $X$ is partitioned into
$X = \coprod_{i \in \mbb{Z}} X_i$,
where $X_i := X \cap Q^i$. 
We call such a set a {\em graded set}. 
Now a DG $A$-module $P$ is K-projective iff it is homotopy 
equivalent to a direct summand (in $\cat{DGMod} A$) of some 
semi-free DG module $Q$. 
See \cite{AFH} or \cite{Ke} for more details and for proofs. 

A {\em free \tup{(}super-commutative, non-positive\tup{)} 
graded $\K$-algebra} is a graded algebra of the following form. 
One starts with a graded set of variables 
$X = \coprod_{i \leq 0} X_{i}$; 
the elements of $X_i$ are the variables of 
degree $i$. Let 
$X_{\mrm{ev}} := \coprod_{i\ \text{even}} X_i$
and
$X_{\mrm{odd}} := \coprod_{i\ \text{odd}} X_i$.
Consider the free associative $\K$-algebra $\K \bra{X}$
on this set of variables. 
Let $I$ be the two-sided ideal of $\K \bra{X}$
generated by all elements of the form
$x y - (-1)^{i j} y x$ or
$z^2$, where
$x \in X_i$, $y \in X_j$, $z \in X_k$,
and $k$ is odd. The free super-commutative
graded $\K$-algebra on $X$ is the quotient
$\K[X] := \K \bra{X} / I$.
It is useful to note that
\[ \K[X] \cong \K[X_{\mrm{ev}}] \otimes_{\K} \K[X_{\mrm{odd}}] , \]
and that $\K[X_{\mrm{ev}}]$
is a commutative polynomial algebra, whereas
$\K[X_{\mrm{odd}}]$ is an exterior algebra.

\begin{dfn} \label{dfn1.2}
Suppose $A \to B$ is a homomorphism of DG $\K$-algebras. 
$B$ is called a {\em semi-free} (super-commutative, non-positive)
{\em DG algebra relative to A} 
if there is a graded set $X = \coprod_{i \leq 0} X_i$, and 
an isomorphism of graded $\opn{und} A$ -algebras
\[ (\opn{und} A) \otimes_{\K} \K[X] \cong \opn{und} B . \]
\end{dfn}

Observe that the DG algebra $B$ in the definition above, 
when regarded as a DG $A$-module, is semi-free with 
semi-basis consisting of the monomials in elements of $X$. Hence 
$B$ is also K-projective and K-flat as DG $A$-module. 

\begin{dfn}
Suppose $A$ and $B$ are DG $\K$-algebras and $f: A \to B$ 
is a homomorphism of DG algebras. 
A {\em semi-free \tup{(}resp.\ K-projective, resp.\ K-flat\tup{)} 
DG algebra resolution of $B$ relative to A} is the data 
$A \xar{\til{f}} \til{B} \xar{g} B$,
where $\til{B}$ is a  DG 
$\K$-algebra, $\til{f}$ and $g$ are DG algebra homomorphisms, 
and the following conditions are satisfied:
\begin{enumerate}
\rmitem{i} $g \circ \til{f} = f$.
\rmitem{ii} $g$ is a quasi-isomorphism.
\rmitem{iii} $\til{f}$ makes $\til{B}$
into a semi-free DG algebra relative to $A$
\tup{(}resp.\ a K-projective DG $A$-module, 
resp.\ a K-flat DG $A$-module\tup{)}.
\end{enumerate}
We also say that $A \xar{\til{f}} \til{B} \xar{g} B$
is a {\em  semi-free \tup{(}resp.\ K-projective, resp.\ 
K-flat\tup{)}  DG algebra resolution} of $A \xar{f} B$. 
\[ \UseTips \xymatrix @C=5ex @R=2.5ex {
& \til{B}
\ar@{-->}[dr]^{g}
\\
A 
\ar@{-->}[ur]^{\til{f}} 
\ar[rr]^{f} 
& & B 
} \]
\end{dfn}

\begin{prop} \label{prop1.2}
Let $A$ and $B$ be  DG $\K$-algebras, 
and let $f: A \to B$ be a DG algebra homomorphism. 
\begin{enumerate}
\item There exists a semi-free DG algebra resolution
$A \xar{\til{f}} \til{B} \xar{g} B$
of $A \xar{f} B$.
%
\item Moreover, if $\mrm{H} A$ is a noetherian algebra and 
$\mrm{H} B$ is a finitely generated $\mrm{H} A$ -algebra, 
then we can choose the semi-free DG algebra $\til{B}$ 
in part \tup{(1)} such that 
$\opn{und} \til{B} \cong (\opn{und} A) \otimes_{\K} \K[X]$,
where the graded set $X = \coprod_{i \leq 0} X_i$
has finite graded components $X_{i}$. 
%
\item If $\mrm{H} A$ is a noetherian algebra, $B$ is a usual 
algebra, and $B = \mrm{H}^0 B$ is a finitely generated 
$\mrm{H}^0 A$ -module, 
then there exists a K-projective DG algebra resolution
$A \to \til{B} \to B$ of $A \to B$,
such that 
$\opn{und} \til{B} \cong \boplus_{i = -\infty}^{0} 
\opn{und} A [-i]^{\mu_i}$ as graded $\opn{und} A$ -modules,
and the multiplicities $\mu_i$ are finite. 
\end{enumerate}
\end{prop}

\begin{proof}
(1) We shall construct $\til{B}$ as the union of an increasing 
sequence of DG algebras
$F_0 \til{B} \subset F_1 \til{B} \subset \cdots$, 
which will be defined recursively. 
At the same time we shall construct an increasing sequence 
of DG algebra homomorphisms
$A \to F_i \til{B} \xar{g_i} B$,
and an increasing sequence of graded sets 
$F_i X \subset F_i \til{B}$. The homomorphism $g$ will be the 
union of the $g_i$, and the graded set $X = \coprod_{j \leq 0} X_j$
will be the union of the sets $F_i X$.
For every $i$ the following conditions will hold:
\begin{enumerate}
\rmitem{i} $\mrm{H}(g_i) : \mrm{H}(F_i \til{B}) \to \mrm{H} B$
is surjective in degrees $\geq -i$.
\rmitem{ii} $\mrm{H}(g_i) : \mrm{H}(F_i \til{B}) \to \mrm{H} B$
is bijective in degrees $\geq -i + 1$.
\rmitem{iii} $F_i \til{B} = A[F_i X]$, 
$\mrm{d}(F_i X) \subset F_{i-1} \til{B}$ and
$\opn{und} F_i \til{B} \cong (\opn{und} A) \otimes_{\K}
\K[F_i X]$.
\end{enumerate}

We start by choosing a set of elements of $B^0$ that 
generate $\mrm{H}^0 B$ as $\mrm{H}^0 A$ -algebra. 
This gives us a set $X_0$ of elements of degree $0$ with a function 
$g_0 : X_0 \to B^0$. Consider the DG algebra
$\K[X_0]$ with zero differential; and define
$F_0 \til{B} := A \otimes_{\K} \K[X_0]$. 
Also define $F_0 X := X_0$. 
We get a DG algebra homomorphism
$g_0 : F_0 \til{B} \to B$, and conditions (i)-(iii) hold for 
$i = 0$.

Now assume $i \geq 0$, and that for every $j \leq i$
we have DG algebra homomorphisms
$g_j : F_j \til{B} \to B$ and graded sets $F_j X$ 
satisfying conditions (i)-(iii). 
We will construct $F_{i+1} \til{B}$ etc.

Choose a set $Y_{i + 1}'$ of elements (of degree $-i - 1$)
and a function $g_{i+1} : Y_{i+1}' \to B^{-i - 1}$ such that
$\{ g_{i+1}(y) \mid y \in Y_{i+1}' \}$
is a set of cocycles that generates
$\mrm{H}^{-i - 1} B$ as $\mrm{H}^0 A$-module. For 
$y \in Y_{i+1}'$ define $\mrm{d}(y) := 0$. 

Next let
\[ J_{i+1} := \{ b \in (F_i \til{B})^{-i} \mid
\mrm{d}(b) = 0 \text{ and } 
\mrm{H}^{-i}(g_i)(b) = 0 \} . \]
Choose a set $Y_{i + 1}''$ of elements (of degree $-i-1$)
and a function 
$\mrm{d} : Y_{i+1}'' \to J_{i+1}$ such that
$\{ \mrm{d}(y) \mid y \in Y_{i+1}'' \}$
is a set of elements whose images in $\mrm{H}^{-i} F_i \til{B}$
generate
$\opn{Ker} \bigl( \mrm{H}^{-i}(g_i) : 
\mrm{H}^{-i} F_i \til{B} \to \mrm{H}^{-i} B \bigr)$
as $\mrm{H}^0 A$-module. Let $y \in Y_{i+1}''$. By definition 
$g_i(\mrm{d}(y)) = \mrm{d}(b)$
for some $b \in B^{-i}$; and we define $g_{i+1}(y) := b$.  

Let $Y_{i+1} := Y_{i+1}' \sqcup Y_{i+1}''$
and $F_{i+1} X := F_i X \sqcup Y_{i+1}$. 
Define the DG algebra $F_{i+1} \til{B}$ to be
\[ F_{i+1} \til{B} := F_{i} \til{B} 
\otimes_{\K} \K[Y_{i+1}] \]
with differential $\mrm{d}$ extending the differential of 
$F_{i} \til{B}$ and the function
$\mrm{d} : Y_{i+1} \to F_{i} \til{B}$
defined above.

\medskip \noindent
(2) This is because at each step in (1) the sets $Y_i$ can be chosen 
to be finite.

\medskip \noindent
(3) Choose elements $b_1, \ldots, b_m \in B$ that generate it as 
$A^0$-algebra. Since each $b_i$ is integral over $A^0$, there is 
some monic polynomial 
$p_i(y) \in A^0[y]$ such that $p_i(b_i) = 0$. Let 
$y_1, \ldots, y_m$ be distinct variables of degree $0$. Define
$Y_0 := \{ y_1, \ldots, y_m \}$ and
$B^{\dag} := A^0[Y_0] / \big( p_1(y_1), \ldots, p_m(y_m) \big)$.
This is an $A^0$-algebra, which is a free module 
of finite rank. Let $g_0 : B^{\dag} \to B$ be the 
surjective $A^0$-algebra homomorphism $y_i \mapsto b_i$. Define
$F_0 \til{B} := A \otimes_{A^0} B^{\dag}$ and
$F_0 X := \emptyset$. Then conditions (i)-(ii) hold for $i = 0$, 
as well as condition (iii') below.
\begin{enumerate}
\rmitem{iii'} $F_i \til{B} = A[Y_0 \cup F_i X]$, 
$\mrm{d}(F_i X) \subset F_{i-1} \til{B}$ and
\[ \opn{und} F_i \til{B} \cong (\opn{und} A) \otimes_{A^0}
A^0[F_i X] \otimes_{A^0} B^{\dag} . \] 
\end{enumerate}

For $i \geq 1$ the proof proceeds as in part (i), but always using 
condition (iii') instead of (iii).
\end{proof}

\begin{prop} \label{prop1.3}
Suppose we are given three  
DG $\K$-algebras  $\til{A}, \til{B}, \til{B}'$;
a $\K$-algebra $B$; and five DG algebra homomorphisms
$f, \til{f}, \til{f}', g, g'$ such that the first
diagram below is commutative. Assume that $g'$ is a 
quasi-isomorphism, and $\til{B}$ is semi-free DG algebra 
relative to $\til{A}$. Then there exists a DG algebra 
homomorphism $h : \til{B} \to \til{B}'$
such that the second diagram below is commutative. 
\[ \begin{array}{cc}
\UseTips \xymatrix @C=5ex @R=2.5ex {
& \til{B}
\ar[dr]^{g}
\\
\til{A}
\ar[ur]^{\til{f}} 
\ar[dr]_{\til{f}'} 
\ar[rr]^{f} 
& & B \\
& \til{B}' 
\ar[ur]_{g'} }
\qquad \quad 
& 
%
% second diagram
%
\UseTips \xymatrix @C=5ex @R=2.5ex {
& \til{B}
\ar[dr]^{g}
\ar@{-->}[dd]^{h}
\\
\til{A}
\ar[ur]^{\til{f}} 
\ar[dr]_{\til{f}'} 
& & B \\
& \til{B}'
\ar[ur]_{g'} } 
\end{array}
\] 
\end{prop}

\begin{proof}
By definition there is a graded set 
$X = \coprod_{i \leq 0} X_{i}$ such that 
$\opn{und} \til{B} \cong$  
$(\opn{und} \til{A}) \otimes_{\K} \K[X]$.
Let's define $F_i X := \bigcup_{j \geq -i} X_j$ and
$F_i \til{B} := \til{A}[F_i X] \subset \til{B}$. 
We shall define a compatible sequence of DG algebra homomorphisms 
$h_i : F_i \til{B} \to \til{B}'$,
whose union will be called $h$. 

For $i = 0$ we note that 
$g' : \til{B}'^0 \to B$ is surjective. Hence there is a function
$h_0 : X_0 \to \til{B}'^0$
such that $g'(h_0(x)) = g(x)$ for every $x \in X_0$. Since
$F_0 \til{B} \cong \til{A} \otimes_{\K} \K[X_{0}]$ 
and 
$\mrm{d}(h_0(X_0)) = 0$ we can extend the function 
$h_0$ uniquely to a DG algebra homomorphism
$h_0 : F_0 \til{B} \to \til{B}$
such that $h_0 \circ \til{f} = \til{f}'$. 

Now assume that $i \geq 0$ and 
$h_i : F_i \til{B} \to \til{B}'$
has been defined. Let $Y_{i+1} := F_{i+1} X - F_i X$. This is a 
set of degree $-i-1$ elements. Take any $y \in Y_{i+1}$. Then
$\mrm{d}(y) \in (F_i \til{B})^{-i}$, and we let
$b := h_i(\mrm{d}(y)) \in \til{B}'^{-i}$.
Because 
$\mrm{H} \til{B} \cong \mrm{H} \til{B}' = B$
there exists an element
$c \in  \til{B}'^{-i-1}$
such that $\mrm{d}(c) = b$. We now define
$h_{i+1}(y) := c$. 
The function $h_{i+1} : Y_{i+1} \to \til{B}'^{-i-1}$
extends to a unique DG algebra homomorphism
$h_{i+1} : F_{i+1} \til{B} \to \til{B}'$
such that $h_{i+1}|_{F_{i} \til{B}} = h_{i}$. 
\end{proof}

 From here to the end of this section we assume $\K$ is noetherian.

A homomorphism $A \to A'$ between two $\K$-algebras 
is called a {\em localization} if it induces an isomorphism
$S^{-1} A \iso A'$ for some multiplicatively closed subset
$S \subset A$. We then say that $A'$ is a localization of $A$. 
A $\K$-algebra $A$ is called {\em essentially of finite type} if 
$A$ is a localization of some finitely generated $\K$-algebra.
Such an algebra $A$ is noetherian. If $B$ is an essentially 
finite type $A$-algebra then it is an essentially finite type 
$\K$-algebra.

\begin{prop} \label{prop1.4}
Let $A$ be an essentially finite type $\K$-algebra. 
Then there is a DG algebra quasi-isomorphism $\til{A} \to A$ such 
that $\til{A}^0$ is an essentially finite type $\K$-algebra, 
and each $\til{A}^i$ is a finitely 
generated $\til{A}^0$-module and a flat $\K$-module. In particular 
$\til{A}$ is a K-flat DG $\K$-module. 
\end{prop}

\begin{proof}
Pick a finitely generated $\K$-algebra $A_{\mrm{f}}$ such that 
$S^{-1} A_{\mrm{f}} \cong A$ for some multiplicatively closed 
subset $S \subset A_{\mrm{f}}$. According to Proposition 
\ref{prop1.2}(2) we can find a semi-free DG algebra resolution
$\til{A}_{\mrm{f}} \to A_{\mrm{f}}$ where $\til{A}_{\mrm{f}}$ has 
finitely many algebra generators in each degree. Let
$\til{S} \subset \til{A}_{\mrm{f}}^0$ be the pre-image of $S$
under the surjection $\til{A}_{\mrm{f}}^0 \to A_{\mrm{f}}$. 
Now define
$\til{A} := (\til{S}^{-1} \til{A}_{\mrm{f}}^0)
\otimes_{\til{A}_{\mrm{f}}^0} \til{A}_{\mrm{f}}$. 
\end{proof}

\begin{cor} \label{cor1.1}
Let $A$ be an essentially finite type 
$\K$-algebra, and let $\til{A} \to A$ be any K-flat DG algebra 
resolution relative to $\K$. Then 
$\mrm{H}^0(\til{A} \otimes_{\K} \til{A})$
is an essentially finite type $\K$-algebra, and each 
$\mrm{H}^i(\til{A} \otimes_{\K} \til{A})$
is a finitely generated 
$\mrm{H}^0(\til{A} \otimes_{\K} \til{A})$-module.
\end{cor}

\begin{proof}
Using Proposition \ref{prop1.3}, and passing via a semi-free 
DG algebra resolution, we can replace the given 
resolution $\til{A} \to A$ by another one satisfying the 
finiteness conditions in Proposition \ref{prop1.4}. Now the 
assertion is clear. 
\end{proof}

Let $M$ be a graded module. The {\em amplitude} 
$\opn{amp} M$ is defined as follows. Given $d \in \mbb{N}$ we say 
that $\opn{amp} M \leq d$ if there exists some 
$i_0 \in \mbb{Z}$ such that
$\{ i \mid M^i \neq 0 \} \subset \{ i_0, \ldots, i_0 + d \}$.
Then we let
$\opn{amp} M := \inf \{ d \in \mbb{N} \mid \opn{amp} M \leq d
\} \in \mbb{N} \cup \{ \infty \}$. 
Thus $M$ is bounded if and only if $\opn{amp} M < \infty$.
Now let $A$ be a DG algebra with $\mrm{H} A$ bounded, and let $M$ 
be a DG $A$-module. For any $d \in \mbb{N}$ we say 
that $\opn{flat{.}dim}_A M \leq d$ if given any 
$N \in \cat{DGMod} A$ the inequality
$\opn{amp} \mrm{H} (M \otimes^{\mrm{L}}_{A} N) \leq
\opn{amp} \mrm{H} N + d$
holds. The {\em flat dimension} of $M$ is defined to be
$\opn{flat{.}dim}_A M := \inf \{ d \in \mbb{N} \mid 
\opn{flat{.}dim}_A M \leq d \}$. 
Observe that $M$ has finite flat dimension if and only if the 
functor $M \otimes^{\mrm{L}}_{A} -$ is way out on both sides, in 
the sense of \cite[Section I.7]{RD}.
Similarly one can define the projective dimension 
$\opn{proj{.}dim}_A M$ of a DG 
$A$-module $M$, by considering the amplitude of 
$\mrm{H}\, \mrm{RHom}_{A}(M, N)$. 
For a usual algebra $A$ and a single
module $M$ the dimensions defined above
coincide with the usual ones.

\begin{prop} \label{prop2.4}
Let $A$ and $B$ be DG $\K$-algebras,  
$L \in \cat{DGMod} A$, $M \in$  
$\cat{DGMod} A \otimes_{\K} B$ and
$N \in \cat{DGMod} B$. 
There exists a functorial morphism
\[ \psi : 
\mrm{RHom}_{A}(L, M) \otimes^{\mrm{L}}_{B} N \to
\mrm{RHom}_{A}(L, M \otimes^{\mrm{L}}_{B} N) \]
in $\til{\msf{D}}(\cat{DGMod} A \otimes_{\K} B)$.
If conditions \tup{(i)}, \tup{(ii)}, and \tup{(iii)}
below hold, then the morphism $\psi$ is an isomorphism.
\begin{enumerate}
\rmitem{i} $\mrm{H}^0 A$ is noetherian, $\mrm{H} L$ is 
bounded above, and each of the $\mrm{H}^0 A$ -modules 
$\mrm{H}^i A$ and $\mrm{H}^i L$ are finitely generated.
\rmitem{ii} $\mrm{H} M$ and $\mrm{H} N$ 
are bounded. 
\rmitem{iii} Either \tup{(a)}, \tup{(b)} or \tup{(c)} is satisfied:
\begin{enumerate}
\rmitem{a} $\mrm{H}^i A = 0$ for all $i \neq 0$, and 
$L$ has finite projective dimension over $A$. 
\rmitem{b} $\mrm{H}^i B = 0$ for all $i \neq 0$, and 
$N$ has finite flat dimension over $B$. 
\rmitem{c} $\mrm{H}^i B = 0$ for all $i \neq 0$, 
$\mrm{H}^0 B$ is noetherian, $\mrm{H} N$ is bounded, each
$\mrm{H}^i N$ is a finitely generated module over $\mrm{H}^0 B$,
the canonical morphism 
$B \to \mrm{RHom}_{B}(N, N)$ is an isomorphism, 
both $M$ and $\mrm{RHom}_{A}(L, M)$ have finite flat dimension over 
$B$, and 
$\mrm{H} \opn{RHom}_A(L, M \otimes^{\mrm{L}}_{B} N)$ is bounded.
 \end{enumerate}
\end{enumerate}
\end{prop}

\begin{proof}
The proof is in five steps. 

\medskip \noindent
Step 1. To define $\psi$ we may choose a K-projective resolution 
$P \to L$ over $A$, and a K-flat resolution $Q \to N$ over $B$. 
There an obvious homomorphism of DG $A \otimes_{\K} B$
-modules
\[ \psi_{P, Q} : 
\mrm{Hom}_{A}(P, M) \otimes_{B} Q \to
\mrm{Hom}_{A}(P, M \otimes_{B} Q) . \]
In the derived category this represents $\psi$. 

\medskip \noindent Step 2.
To prove that $\psi$ is an isomorphism (or equivalently that
$\psi_{P, Q}$ is a quasi-iso\-morphism)
we may forget the 
$A \otimes_{\K} B$ -module structures, and consider $\psi$ as a 
morphism in $\msf{D}(\cat{Mod} \K)$. 
Now by Proposition \ref{prop1.1}(2) we can replace $A$ and $B$ by 
quasi-isomorphic DG $\K$-algebras. Thus we may assume both $A$ and 
$B$ are semi-free as DG $\K$-modules. 

\medskip \noindent Step 3.
Let's suppose that condition (iii.a) holds. So 
$A \to \mrm{H}^0 A$ is a quasi-isomorphism. Since $B$ is K-flat 
over $\K$ it follows that 
$A \otimes_{\K} B \to \mrm{H}^0 A \otimes_{\K} B$
is also a quasi-isomorphism. By Proposition \ref{prop1.1}
we can assume that 
$L \in \cat{DGMod} \mrm{H}^0 A$ and
$M \in \cat{DGMod} (\mrm{H}^0 A \otimes_{\K} B)$,
and that $L$ has finite projective dimension over 
$\mrm{H}^0 A$. So we may replace $A$ with $\mrm{H}^0 A$, and thus
assume that $A$ is a noetherian algebra.

Now choose a resolution 
$P \to L$, where $P$ is a bounded complex of finitely generated 
projective $A$-modules. 
Take any K-flat resolution $Q \to N$ over $B$. 
Then the homomorphism $\psi_{P, Q}$ is actually bijective.

\medskip \noindent Step 4.
Let's assume condition (iii.b) holds. As in step 3
we can suppose that $B = B^0$. 
Choose a bounded resolution $Q \to N$ by flat $B$-modules.
By replacing $M$ with the truncation 
$\tau^{\geq j_0} \tau^{\leq j_1} M$ for some $j_0 \ll 0$ and 
$j_1 \gg 0$ we may assume $M$ is bounded.
According to \cite[Theorem 9.2.7]{AFH} we can find a semi-free 
resolution $P \to L$ over $A$ such that
$\opn{und} P \cong \boplus_{i = -\infty}^{i_1}
\opn{und} A[-i]^{\mu_i}$
with all the multiplicities $\mu_i$ finite. 
Because the $\mu_i$ are finite and both $M$ and $Q$ are bounded 
the homomorphism $\psi_{P, Q}$ is bijective.

\medskip \noindent Step 5.
Finally we consider condition (iii.c). We can assume that $B = B^0$ 
is noetherian. Since 
$N \in \msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} B)$
and
$\mrm{RHom}_{B}(N, N) \cong B$ 
we see that the support of $N$ is $\opn{Spec} B$. By Lemma 
\ref{lem9.5} below we conclude that $N$ generates 
$\msf{D}^{\mrm{b}}(\cat{Mod} B)$. Let
\[ \psi' : \mrm{RHom}_{B} \big( N, 
\mrm{RHom}_{A}(L, M) \otimes^{\mrm{L}}_{B} N \big) \to
\mrm{RHom}_{B} \big( N,
\mrm{RHom}_{A}(L, M \otimes^{\mrm{L}}_{B} N) \big) \]
be the morphism obtained from $\psi$ by applying the functor
$\mrm{RHom}_{B}(N, -)$. Since $\psi$ is a morphism in
$\msf{D}^{\mrm{b}}(\cat{Mod} B)$, 
in order to prove it is an isomorphism 
it suffices to prove that $\psi'$ is an isomorphism. 

The complex $\mrm{RHom}_{A}(L, M)$ has finite flat dimension over 
$B$, so using the proposition with condition (iii.b), which we 
already proved, we have
\[ \begin{aligned}
\mrm{RHom}_{B} \big( N, 
\mrm{RHom}_{A}(L, M) \otimes^{\mrm{L}}_{B} N \big) & \cong
\mrm{RHom}_{B}(N, N) \otimes^{\mrm{L}}_{B} 
\mrm{RHom}_{A}(L, M) \\
& \cong \mrm{RHom}_{A}(L, M) . 
\end{aligned} \]
On the other hand the complex $M$ has finite flat dimension over 
$B$, so using the proposition with condition (iii.b) once more
(for the isomorphism marked $\diamond$), we have
\[ \begin{aligned}
& \mrm{RHom}_{B} \big( N, 
\mrm{RHom}_{A}(L, M \otimes^{\mrm{L}}_{B} N) \big) \cong
\mrm{RHom}_{A} \big( L, 
\mrm{RHom}_{B}(N, M \otimes^{\mrm{L}}_{B} N) \big) \\
& \quad \cong^{\diamond}
\mrm{RHom}_{A} \big( L, M \otimes^{\mrm{L}}_{B}
\mrm{RHom}_{B}(N, N) \big) 
\cong \mrm{RHom}_{A}(L, M) . 
\end{aligned} \]
Tracking the effect of these isomorphism on $\psi'$ we see that it 
gets transformed into the identity automorphism of 
$\mrm{RHom}_{A}(L, M)$.
\end{proof}

Let $B$ be a noetherian ring. Recall that given a complex 
$N \in \msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} B)$
its support is defined to be
$\bigcup_i \opn{Supp} \mrm{H}^i N \subset \opn{Spec} B$. 
The complex $N$ is said to generate 
$\msf{D}^{\mrm{b}}(\cat{Mod} B)$ if
for any nonzero object $M \in \msf{D}^{\mrm{b}}(\cat{Mod} B)$
one has
$\mrm{RHom}_{B}(N, M) \neq 0$.

\begin{lem} \label{lem9.5}
Suppose $B$ is a noetherian ring and  
$N \in \msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} B)$ 
is a complex whose support is $\opn{Spec} B$. Then $N$ 
generates $\msf{D}^{\mrm{b}}(\cat{Mod} B)$.
\end{lem}

\begin{proof}
Suppose $M$ is a nonzero object in 
$\msf{D}^{\mrm{b}}(\cat{Mod} B)$. We have to prove that \linebreak
$\mrm{RHom}_{B}(N, M) \neq 0$.
Let 
$i_0 := \opn{min} \{ i \in \mbb{Z} \mid \mrm{H}^i M \neq 0 \}$,
and choose a nonzero finitely generated submodule
$M' \subset \mrm{H}^{i_0} M$.
Let $\mfrak{p}$ be a minimal prime ideal in the support of 
$M'$; so that $M'_{\mfrak{p}} := A_{\mfrak{p}} \otimes_B M'$ 
is a nonzero finite length module 
over the local ring $B_{\mfrak{p}}$. Now 
$N_{\mfrak{p}}$ is a nonzero object of
$\msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} B_{\mfrak{p}})$.
Let 
$j_1 := \opn{max} \{ j \in \mbb{Z} \mid \mrm{H}^j 
N_{\mfrak{p}} \neq 0 \}$. 
Since $\mrm{H}^{j_1} N_{\mfrak{p}}$ is a nonzero finitely generated 
$A_{\mfrak{p}}$-module, there exists a nonzero homomorphism
$\phi : \mrm{H}^{j_1} N_{\mfrak{p}} \to M'_{\mfrak{p}}$.
This $\phi$ can be interpreted as a nonzero element of
$\opn{Ext}_{B_{\mfrak{p}}}^{i_0 - j_1}(N_{\mfrak{p}},
M_{\mfrak{p}})$,
which, by Proposition \ref{prop2.4} with its condition (iii.b), is 
isomorphic to 
$B_{\mfrak{p}} \otimes_B \opn{Ext}_{B}^{i_0 - j_1}(N, M)$. 
\end{proof}

\begin{rem}
Proposition \ref{prop2.4} can be extended by replacing conditions 
(iii.a) and (iii.b) respectively with: 
(iii.a') $\mrm{H} A$ is a bounded essentially finite type 
$\K$-algebra, and $L$ has finite projective dimension over $A$;
and (iii.b') $\mrm{H} B$ is a bounded essentially finite type 
$\K$-algebra, $\mrm{H} N$ is a finitely generated $\mrm{H} B$ 
-module, and $N$ has finite flat dimension over $A$. 
The trick for (iii.a') is to localize on $\opn{Spec} \mrm{H}^0 A$
and to look at minimal semi-free resolutions of $L$. 
This trick also shows that 
$\opn{flat{.}dim}_A L = \opn{proj{.}dim}_A L$.
Details will appear elsewhere.
\end{rem}





%\newpage
%% ** section 2 **
\section{The Squaring Operation}
\label{sec2}

In this section we introduce a key technical notion used in the
definition of rigidity, namely the squaring operation. This 
operation is easy to define when the base ring $\K$ is a field 
(see Corollary \ref{cor2.8}), but when $\K$ is just a 
commutative ring (as we assume in this section) there are
complications. We solve the problem using DG algebras.

Recall that for a DG algebra $A$ the derived category of DG 
modules is denoted by $\til{\msf{D}}(\cat{DGMod} A)$. If $A$ is a 
usual algebra then 
$\til{\msf{D}}(\cat{DGMod} A) = \msf{D}(\cat{Mod} A)$.

Let $M \in \msf{D}(\cat{Mod} \K)$. As explained earlier the derived 
tensor product 
$M \otimes^{\mrm{L}}_{\K} M \in \msf{D}(\cat{Mod} \K)$
is defined to be
$M \otimes^{\mrm{L}}_{\K} M := \til{M} \otimes_{\K} \til{M}$,
where $\til{M} \to M$ is any K-flat resolution of $M$.
If $M \in \cat{DGMod} A$ for some DG $\K$-algebra $A$, then we 
would like to be able to make
$M \otimes^{\mrm{L}}_{\K} M$ into an object of 
$\til{\msf{D}}(\cat{DGMod} A \otimes_{\K} A)$. 
But this is not always possible, at least not in any obvious way,
due to torsion. 
(For instance take $\K := \mbb{Z}$ and $M = A := \mbb{Z} / (2)$). 
Fortunately there is a way to get around this problem.

\begin{lem} 
Let $\til{A} \to A$ be a quasi-isomorphism of DG $\K$-algebras,
and assume $\til{A}$ is K-flat as DG $\K$-module. 
Then the \tup{(}non-additive\tup{)} functor
$\til{\msf{D}}(\cat{DGMod} A) \to \msf{D}(\cat{Mod} \K)$,
$M \mapsto M \otimes^{\mrm{L}}_{\K} M$,
factors canonically through 
$\til{\msf{D}}(\cat{DGMod} \til{A} \otimes_{\K} \til{A})$. 
\end{lem}

\begin{proof}
Choose any quasi-isomorphism $\til{M} \to M$ in 
$\cat{DGMod} \til{A}$ with $\til{M}$ K-flat over $\K$. This is 
possible since any K-flat DG $\til{A}$-module is 
K-flat over $\K$. We get
$M \otimes^{\mrm{L}}_{\K} M = \til{M} \otimes_{\K} \til{M}
\in \til{\msf{D}}(\cat{DGMod} \til{A} \otimes_{\K} \til{A})$. 
\end{proof}

\begin{thm} \label{thm1.1}
Let $A$ be a $\K$-algebra and let $M$ be a DG $A$-module. 
Choose a K-flat DG algebra resolution 
$\K \to \til{A} \to A$ of $\K \to A$. 
Then the object 
\[ \opn{Sq}_{A / \K} M :=
\mrm{RHom}_{\til{A} \otimes_{\K} \til{A}}(A, 
M \otimes^{\mrm{L}}_{\K} M)
\in \msf{D}(\cat{Mod} A) , \]
where the $A$-module structure is via the action on the first 
argument of $\opn{RHom}$, is independent of this choice. 
\end{thm}

\begin{proof}
The idea for the proof was communicated to us by Bernhard Keller.
Choose some semi-free DG algebra 
resolution $\K \to \til{A}' \to A$ of $\K \to A$. 
We will show that there is a canonical isomorphism
\[ \mrm{RHom}_{\til{A} \otimes_{\K} \til{A}}
(A, M \otimes^{\mrm{L}}_{\K} M)
\iso 
\mrm{RHom}_{\til{A}' \otimes_{\K} \til{A}'}
(A, M \otimes^{\mrm{L}}_{\K} M) \]
in $\msf{D}(\cat{Mod} A)$. 

Let us choose a K-projective resolution $\til{M} \to M$ over
$\til{A}$, and a K-injective resolution
$\til{M} \otimes_{\K} \til{M} \to \til{I}$
over $\til{A} \otimes_{\K} \til{A}$. So
\[ \mrm{RHom}_{\til{A} \otimes_{\K} \til{A}}(A, 
M \otimes^{\mrm{L}}_{\K} M) =
\mrm{Hom}_{\til{A} \otimes_{\K} \til{A}}
(A, \til{I}) . \]
Likewise let's choose resolutions 
$\til{M}' \to M$ and 
$\til{M}' \otimes_{\K} \til{M}' \to \til{I}'$
over $\til{A}'$ and $\til{A}' \otimes_{\K} \til{A}'$ 
respectively. 

By Proposition \ref{prop1.3} there is a DG algebra 
quasi-isomorphism $f_0 : \til{A}' \to \til{A}$ that's 
compatible with the quasi-isomorphisms to $A$. 
By the categorical properties of $K$-projective resolutions there
is an $\til{A}'$-linear quasi-isomorphism
$\phi_0 : \til{M}' \to \til{M}$, that's compatible  up
to homotopy with the quasi-isomorphisms to $M$. We obtain an 
$\til{A}' \otimes_{\K} \til{A}'$ -linear quasi-isomorphism 
$\phi_0 \otimes \phi_0 : \til{M}' \otimes_{\K} \til{M}'
\to \til{M} \otimes_{\K} \til{M}$. 
Next by the categorical properties of $K$-injective resolutions 
there is an $\til{A}' \otimes_{\K} \til{A}'$ -linear
quasi-isomorphism 
$\psi_0 : \til{I} \to \til{I}'$ 
that's compatible up to homotopy with the quasi-isomorphisms from 
$\til{M}' \otimes_{\K} \til{M}'$. 
We thus get an $A$-linear homomorphism
\[ \chi_0 : \opn{Hom}_{\til{A} \otimes_{\K} \til{A}} (A, \til{I}) 
\to \opn{Hom}_{\til{A}' \otimes_{\K} \til{A}'}
(A, \til{I}') . \]
Proposition \ref{prop1.1} shows that $\chi_0$ is in fact an 
isomorphism in $\msf{D}(\cat{Mod} A)$. 

Now suppose $f_1 : \til{A}' \to \til{A}$,
$\phi_1 : \til{M}' \to \til{M}$ and
$\psi_1 : \til{I} \to \til{I}'$ 
are other choices of quasi-isomorphisms of the same respective 
types as $f_0$, $\phi_0$ and $\psi_0$. Then we get an induced 
isomorphism
\[ \chi_1 : \opn{Hom}_{\til{A} \otimes_{\K} \til{A}} (A, \til{I}) 
\to \opn{Hom}_{\til{A}' \otimes_{\K} \til{A}'}
(A, \til{I}') \]
in $\msf{D}(\cat{Mod} A)$. We shall prove that
$\chi_1 = \chi_0$. 

Here we have to introduce an auxiliary DG $\K$-module 
$\mrm{C}(\til{M})$, the cylinder module. As graded module one has
$\mrm{C}(\til{M}) := 
\left[ \begin{smallmatrix} \til{M} & \til{M}[-1] \\ 
0 & \til{M} \end{smallmatrix} \right]$, 
a triangular matrix module, and the differential is
$\mrm{d}(\left[ \begin{smallmatrix} m_0 & n \\ 0 & m_1 
\end{smallmatrix} \right] ) :=
\left[ \begin{smallmatrix} 
\mrm{d}(m_0) & \ m_0 - m_1 -\mrm{d}(n) \\ 
0 & \mrm{d}(m_1) \end{smallmatrix} \right]$
for $m_0, m_1, n \in \til{M}$.
There are DG module quasi-isomorphisms
$\epsilon : \til{M} \to \mrm{C}(\til{M})$
and
$\eta_0, \eta_1 : \mrm{C}(\til{M}) \to \til{M}$,
with formulas
$\epsilon(m) := 
\left[ \begin{smallmatrix} m & 0 \\ 0 & m \end{smallmatrix} \right]$
and 
$\eta_i (\left[ \begin{smallmatrix} m_0 & n \\ 0 & m_1 
\end{smallmatrix} 
\right]) := m_i$. 
The cylinder module $\mrm{C}(\til{M})$ is a DG module over
$\til{A}$ by the formula
$a \cdot \left[ \begin{smallmatrix} m_0 & n \\ 0 & m_1 
\end{smallmatrix} \right] :=
\left[ \begin{smallmatrix} a m_0 & a n \\ 0 & a m_1 
\end{smallmatrix} \right]$.

There is a quasi-isomorphism of DG $\til{A}$-modules
$\mrm{C}(\til{M}) \to 
\left[ \begin{smallmatrix} \til{M} & M[-1] \\ 0 & \til{M} 
\end{smallmatrix} \right]$
which is the identity on the diagonal elements, and the given 
quasi-isomorphism $\til{M} \to M$ in the corner.
The two $\til{A}'$-linear quasi-isomorphisms $\phi_0$ and $\phi_1$ 
fit into an $\til{A}'$-linear quasi-morphism
$\til{M}' 
\xar{ \left[ \begin{smallmatrix} \phi_0 & 0 \\ 0 & \phi_1 
\end{smallmatrix} \right] } 
\left[ \begin{smallmatrix} \til{M} & M[-1] \\ 
0 & \til{M} \end{smallmatrix} \right]$.
Since $\til{M}'$ is K-projective over $\til{A}'$ we can lift 
$\left[ \begin{smallmatrix} \phi_0 & 0 \\ 0 & \phi_1 
\end{smallmatrix} \right]$
to a quasi-isomorphism
$\phi : \til{M}' \to \mrm{C}(\til{M})$
such that $\eta_i \circ \phi = \phi_i$ up to homotopy.

Let's choose a K-injective resolution 
$\mrm{C}(\til{M}) \otimes_{\K} \mrm{C}(\til{M}) \to \til{K}$ 
over $\til{A} \otimes_{\K} \til{A}$. 
Then for $i = 0, 1$ we have a diagram
\[ \UseTips \xymatrix @C=5ex @R=4ex {
\til{I}' 
& \til{K}
\ar[l]_{\psi}
&  \til{I} 
\ar[l]_{\beta_i} \\
\til{M}' \otimes_{\K} \til{M}'
\ar[u]
\ar[r]^(0.42){\phi \otimes \phi}
& \mrm{C}(\til{M}) \otimes_{\K} \mrm{C}(\til{M})
\ar[u]
\ar[r]^(0.6){\eta_i \otimes \eta_i}
& \til{M} \otimes_{\K} \til{M}
\ar[u] } \]
that's commutative up to homotopy. Here $\psi$ and $\beta_i$ are
some DG module homomorphisms, which 
exist due to the K-injectivity of $\til{I}'$ and 
$\til{K}$ respectively. Because 
$\phi_i \otimes \phi_i = (\eta_i \otimes \eta_i) \circ
(\phi \otimes \phi)$ up to homotopy,
and $\til{I}'$ is K-injective, it follows that the 
$\til{A}' \otimes_{\K} \til{A}'$ -linear DG module 
quasi-isomorphisms $\psi \circ \beta_i$ and $\psi_i$
are homotopic. Therefore in order to prove that 
$\chi_0 = \chi_1$ it suffices to prove that the two isomorphisms
in $\msf{D}(\cat{Mod} A)$
\[ \theta_0, \theta_1 : 
\opn{Hom}_{\til{A} \otimes_{\K} \til{A}}
(A, \til{I}) \to
\opn{Hom}_{\til{A} \otimes_{\K} \til{A}} 
(A, \til{K}) , \]
that are induced by $\beta_0, \beta_1$ respectively, are equal.
 
For $i = 0, 1$ consider the diagram
\[ \UseTips \xymatrix @C=5ex @R=4ex {
\til{I} 
& \til{K}
\ar[l]_{\gamma}
&  \til{I} 
\ar[l]_{\beta_i} \\
\til{M} \otimes_{\K} \til{M}
\ar[u]
\ar[r]^(0.42){\epsilon \otimes \epsilon}
& \mrm{C}(\til{M}) \otimes_{\K} \mrm{C}(\til{M})
\ar[u]
\ar[r]^(0.6){\eta_i \otimes \eta_i}
& \til{M} \otimes_{\K} \til{M}
\ar[u] } \] 
where $\gamma$ is some $\til{A} \otimes_{\K} \til{A}$ -linear
DG module homomorphism, chosen so as to make the left square 
commute up to homotopy. As before, since 
$(\eta_i \otimes \eta_i) \circ (\epsilon \otimes \epsilon)
= \bsym{1}_{\til{M} \otimes_{\K} \til{M}}$
it follows that 
$\gamma \circ \beta_i$ and $\bsym{1}_{\til{I}}$ 
are homotopic. Hence both $\theta_0$ and $\theta_1$ 
are inverses of the isomorphism
\[ \opn{Hom}_{\til{A} \otimes_{\K} \til{A}}
(A, \til{K}) \iso 
\opn{Hom}_{\til{A} \otimes_{\K} 
\til{A}}(A, \til{I}) \]
in $\msf{D}(\cat{Mod} A)$ induced by $\gamma$, so
$\theta_0 = \theta_1$.
\end{proof}

\begin{thm} \label{thm1.2}
Let $A$ and $B$ be $\K$-algebras, and let
$M \in \msf{D}(\cat{Mod} A)$ and $N \in \msf{D}(\cat{Mod} B)$. 
Suppose $f : A \to B$ is an algebra homomorphism and 
$\phi : N \to M$ is a morphism in $\msf{D}(\cat{Mod} A)$.
Then there is an induced morphism
\[ \opn{Sq}_{f / \K}(\phi) : \opn{Sq}_{B / \K} N \to
\opn{Sq}_{A / \K} M \]
in $\msf{D}(\cat{Mod} B)$. This construction is functorial; 
namely if $C$ is another $\K$-algebra, 
$P \in \msf{D}(\cat{Mod} C)$, 
$g : B \to C$ is an algebra homomorphism and 
$\psi : P \to N$ is a morphism in $\msf{D}(\cat{Mod} B)$, then
\[ \opn{Sq}_{g \circ f / \K}(\phi \circ \psi) =
\opn{Sq}_{f / \K}(\phi) \circ \opn{Sq}_{g / \K}(\psi) . \]
Also for the identity morphisms
$\opn{Sq}_{\bsym{1}_A / \K}(\bsym{1}_M) = 
\bsym{1}_{\opn{Sq}_{A / \K} M}$.
\end{thm}

\begin{proof}
Let's choose a  semi-free DG algebra 
resolution $\K \to \til{A} \to A$ of $\K \to A$, and a 
 semi-free DG algebra 
resolution $\til{A} \xar{\til{f}} \til{B} \to B$ of 
$\til{A} \to B$. Note that $\til{B}$ is also semi-free relative 
to $\K$, so it may be used to calculate $\opn{Sq}_{B / \K} N$.
Next let's choose DG module resolutions
$\til{M} \to M$, $\til{N} \to N$, 
$\til{M} \otimes_{\K} \til{M} \to \til{I}$
and
$\til{N} \otimes_{\K} \til{N} \to \til{J}$
by K-projective or K-injective DG modules over the appropriate DG 
algebras, as was done in the proof of Theorem \ref{thm1.1}.
Since $\til{N}$ is a K-projective DG $\til{A}$-module we get an 
actual DG module homomorphism 
$\til{\phi} : \til{N} \to \til{M}$
representing $\phi$. Therefore there is an 
$\til{A} \otimes_{\K} \til{A}$ -linear DG module homomorphism
$\til{\phi} \otimes \til{\phi} : 
\til{N} \otimes_{\K} \til{N} \to \til{M} \otimes_{\K} 
\til{M}$.
Because $\til{I}$ is K-injective we obtain a DG module 
homomorphism $\psi : \til{J} \to \til{I}$
lifting 
$\til{N} \otimes_{\K} \til{N} 
\xar{\til{\phi} \otimes \til{\phi}}
\til{M} \otimes_{\K} \til{M} \to \til{I}$.
Applying $\mrm{Hom}(A, -)$ we then have a homomorphism 
\[ \opn{Sq}_{f / \K}(\phi) : 
\mrm{Hom}_{\til{B} \otimes_{\K} 
\til{B}}(B, \til{J}) \to
\mrm{Hom}_{\til{A} \otimes_{\K} 
\til{A}}(A, \til{I}) \]
in $\cat{DGMod} A$. 

Given $g : B \to C$ and $\psi : P \to N$ it is now clear how to 
define $\opn{Sq}_{g / \K}(\psi)$ such that 
$\opn{Sq}_{g \circ f / \K}(\phi \circ \psi) =
\opn{Sq}_{f / \K}(\phi) \circ \opn{Sq}_{g / \K}(\psi)$,
for these particular choices.

It remains to prove that after passing to 
$\msf{D}(\cat{Mod} A)$
the morphism $\opn{Sq}_{f / \K}(\phi)$ becomes 
independent of choices. 
The independence on choices of K-projective and K-injective 
resolutions, and on the DG module homomorphisms 
$\til{\phi}$ and $\psi$, is standard. 
Now suppose we choose another  
semi-free DG algebra resolution $\K \to \til{A}' \to A$ of 
$\K \to A$, and a  semi-free 
DG algebra resolution $\til{A}' \xar{\til{f}'} \til{B}' \to B$ of 
$\til{A}' \to B$. 
After choosing DG module resolutions 
$\til{M}' \to M$, $\til{N}' \to N$, 
$\til{M}' \otimes_{\K} \til{M}' \to \til{I}'$
and
$\til{N}' \otimes_{\K} \til{N}' \to \til{J}'$
by K-projective or K-injective DG modules over the appropriate DG 
algebras, we obtain a homomorphism
\[ \opn{Sq}'_{f / \K}(\phi) : 
\mrm{Hom}_{\til{B}' \otimes_{\K} \til{B}'}
(B, \til{J}') \to
\mrm{Hom}_{\til{A}' \otimes_{\K} \til{A}'}
(A, \til{I}') \]
in $\cat{DGMod} A$. 

Applying Proposition \ref{prop1.3} twice we can find 
DG algebra homomorphisms $g_0$ and $h_0$ such that the 
diagram of DG algebra homomorphisms
\begin{equation} \label{eqn1.1}
\begin{array}{c}
\UseTips \xymatrix @C=5ex @R=3.5ex {
\til{A}'
\ar[r]^{g_0}
\ar[d]_{\til{f}'}
& \til{A}
\ar[d]_{\til{f}}
\ar[r] 
& A 
\ar[d]_{f} \\
\til{B}'
\ar[r]^{h_0}
& \til{B}
\ar[r] 
& B . } 
\end{array}
\end{equation}
is commutative. 
As in the proof of Theorem \ref{thm1.1} we pick 
quasi-isomorphisms 
$\psi_{M, 0} : \til{I} \to \til{I}'$ and
$\psi_{N, 0} : \til{J} \to \til{J}'$ over 
$\til{A}' \otimes_{\K} \til{A}'$ and
$\til{B}' \otimes_{\K} \til{B}'$ respectively. 
Then we get a commutative up to homotopy diagram 
\[ \UseTips \xymatrix @C=6ex @R=4.5ex {
\mrm{Hom}_{\til{A} \otimes_{\K} \til{A}}
(A, \til{I}) 
\ar[r]^(0.47){\chi_{M, 0}} 
& \mrm{Hom}_{\til{A}' \otimes_{\K} \til{A}'}
(A, \til{I}') \\
%
\mrm{Hom}_{\til{B} \otimes_{\K} \til{B}}
(B, \til{J}) 
\ar[u]^{\opn{Sq}_{f / \K}(\phi)}
\ar[r]^(0.47){\chi_{N, 0}} 
& \mrm{Hom}_{\til{B}' \otimes_{\K} \til{B}'}
(B, \til{J}') 
\ar[u]_{\opn{Sq}'_{f / \K}(\phi)}
} \] 
in $\cat{DGMod} A$, where the horizontal arrows are 
quasi-isomorphisms. If we were to choose another pair of DG 
algebra quasi-isomorphisms $g_1 : \til{A}' \to \til{A}$ and
$h_1 : \til{B}' \to \til{B}$ 
so as to make diagram \ref{eqn1.1} commutative, then according to
Theorem \ref{thm1.1} there would be equalities
$\chi_{M, 0} = \chi_{M, 1}$ and
$\chi_{N, 0} = \chi_{N, 1}$
of isomorphisms in $\msf{D}(\cat{Mod} A)$. Therefore 
$\opn{Sq}'_{f / \K}(\phi) = \opn{Sq}_{f / \K}(\phi)$
as morphisms in $\msf{D}(\cat{Mod} A)$.
\end{proof}

For the identity homomorphism $\bsym{1}_A : A \to A$
we write 
$\opn{Sq}_{A / \K}(\phi) := \opn{Sq}_{\bsym{1}_A / \K}(\phi)$.

\begin{dfn} \label{dfn2.8}
The (nonlinear) functor
$\opn{Sq}_{A / \K} : \msf{D}(\cat{Mod} A) \to
\msf{D}(\cat{Mod} A)$
from Theorems \ref{thm1.1} and \ref{thm1.2}
is called the {\em squaring operation} over $A$ relative to $\K$.
\end{dfn}

The next result explains the name ``squaring''. 

\begin{cor}
In the situation of Theorem \tup{\ref{thm1.2}} let $b \in B$. Then 
\[ \opn{Sq}_{f / \K}(b \phi) = b^2 \opn{Sq}_{f / \K}(\phi) . \]
\end{cor}

\begin{proof}
It suffices to consider $f = \bsym{1}_B : B \to B$ and
$\phi = \bsym{1}_N : N \to N$. Choose any lifting of $b$ to 
$\til{b} \in \til{B}^0$. Then multiplication by
$\til{b} \otimes \til{b}$ on $\til{J}$ has the same effect on
$\mrm{Hom}_{\til{B} \otimes_{\K} \til{B}}
(B, \til{J})$,
up to homotopy, as multiplication by $b^2$ on $B$.
\end{proof}

\begin{cor} \label{cor2.8} 
Suppose $A$ is a flat $\K$-algebra, and $M$ is a bounded above 
complex of $A$-modules that are flat as $\K$-modules. Then there 
is a functorial isomorphism
\[ \opn{Sq}_{A / \K} M \cong \mrm{RHom}_{A \otimes_{\K} A}
(A, M \otimes_{\K} M) . \]
\end{cor}

\begin{proof}
This is because $A$ and $M$ are K-flat DG $\K$-modules.
\end{proof}

\begin{rem}
One might be tempted to use the notation
$\mrm{RHom}_{A \otimes^{\mrm{L}}_{\K} A}
(A, M \otimes_{\K}^{\mrm{L}} M)$
instead of $\opn{Sq}_{A / \K} M$. Indeed, we think it is possible 
to make sense of the 
``DG algebra'' $A \otimes^{\mrm{L}}_{\K} A$,
as an object of a suitable Quillen localization of the category of 
DG $\K$-algebras. Cf.\ \cite{Hi}, and also \cite{Qu}, where an 
analogous construction was made using simplicial algebras rather 
than DG algebras.  Then one should show that the 
triangulated category 
``$\til{\msf{D}}(\cat{DGMod} A \otimes^{\mrm{L}}_{\K} A)$''
is well-defined, etc. See also \cite[Appendix V]{Dr}.
\end{rem}






%\newpage
%% ** section 3 **
\section{Rigid Complexes} 
\label{sec3}

In this section all rings are are by default commutative and
noetherian. We shall use notation such as $f^* : A \to B$ for a ring
homomorphism; so that $f : \opn{Spec} B \to \opn{Spec} A$ is the 
corresponding morphism of schemes. This will make our notation for 
various functors more uniform.
For instance restriction of scalars becomes 
$f_* : \cat{Mod} B \to \cat{Mod} A$, 
and extension of scalars (i.e.\ $M \mapsto B \otimes_A M$)
becomes
$f^* : \cat{Mod} A \to \cat{Mod} B$.
See also Definitions \ref{dfn3.1} and \ref{dfn2.6}.
Given another algebra 
homomorphism $g^* : B \to C$ we shall sometimes write 
$(f \circ g)^* := g^* \circ f^*$. 

Let us begin with a bit of commutative algebra. 
Recall that an $A$-algebra $B$ is called 
formally smooth (resp.\ formally
\'etale) if it has the lifting property (resp.\ the unique lifting 
property) for infinitesimal extensions. The $A$-algebra $B$ is called 
smooth (resp.\ \'etale) if it is finitely generated and
formally smooth (resp.\ formally \'etale). If $B$ is smooth over 
$A$ then it is flat, and $\Omega^1_{B / A}$ is a finitely generated
projective $B$-module. See 
\cite[Section $0{}_{\mrm{IV}}$.19.3]{EGA} 
and 
\cite[Section IV.17.3]{EGA} for details. 

\begin{dfn} \label{dfn3.3}
Let $A$ and $B$ be noetherian rings. A ring homomorphism 
$f^* : A \to B$ is called {\em essentially smooth} 
(resp.\ {\em essentially \'etale}) if it is of essentially finite 
type and formally smooth (resp.\ formally \'etale). 
In this case $B$ is called an essentially smooth
(resp.\ essentially \'etale) $A$-algebra.
\end{dfn}

Observe that smooth homomorphisms and localizations are 
essentially smooth.

\begin{prop} \label{prop3.2}
Let $f^* : A \to B$ be an essentially smooth homomorphism.
\begin{enumerate}
\item There is an open covering
$\opn{Spec} B = \bigcup_i \opn{Spec} B_i$ such that for every $i$ 
the homomorphism $A \to B_i$ is the composition of a smooth
homomorphism $A \to B_i^{\mrm{sm}}$ and a localization
$B_i^{\mrm{sm}} \to B_i$. 
%
\item $f^*$ is flat, and $\Omega^1_{B / A}$ is a 
finitely generated projective $B$-module.
%
\item $f^*$ is essentially \'etale if and only if 
$\Omega^1_{B / A} = 0$.
%
\item Let $g^* : B \to C$ be another essentially smooth 
homomorphism. Then 
$g^* \circ f^* : A \to C$ is also essentially smooth.
\end{enumerate}
\end{prop}

\begin{proof}
(1) Choose a finitely generated $A$-subalgebra 
$B^{\mrm{f}} \subset B$ such that $B$ is a localization of 
$B^{\mrm{f}}$. We can identify $U := \opn{Spec} B$ with a subset of 
$U^{\mrm{f}} := \opn{Spec} B^{\mrm{f}}$. Take a point $x \in U$, 
and let $y := f(x) \in \opn{Spec} A$. Then the local ring 
$\mcal{O}_{U^{\mrm{f}}, x} = \mcal{O}_{U, x} = B_x$ 
is a formally smooth $A_y$-algebra. According to 
\cite[Chapitre IV Th\'eor\`eme 17.5.1]{EGA}
there is an open neighborhood $W$ of $x$ in $U^{\mrm{f}}$ 
which is smooth over $\opn{Spec} A$. Choose 
an element $b \in B^{\mrm{f}}$ such 
that the localization $B^{\mrm{f}}_b = B^{\mrm{f}}[b^{-1}]$ 
satisfies
$x \in \opn{Spec} B^{\mrm{f}}_b \subset W$. 
Then $B^{\mrm{f}}_b$ is a smooth $A$-algebra,
$B_b$ is a localization of $B^{\mrm{f}}_b$,
$\opn{Spec} B_b$ is open in $\opn{Spec} B$, and
$x \in \opn{Spec} B_b$.
Finally let $i$ be an index corresponding to the point $x$, and
define $B_i^{\mrm{sm}} := B^{\mrm{f}}_b$ and $B_i := B_b$.

\medskip \noindent 
(2) follows from (1). 

\medskip \noindent
(3)  See \cite[Chapitre $\mrm{0}_{\mrm{IV}}$ 
Proposition 20.7.4]{EGA}.

\medskip \noindent
(4) Both conditions in Definition \ref{dfn3.3} are transitive.  
\end{proof}

\begin{dfn}
Let $f^* : A \to B$ be an essentially smooth homomorphism.
If  \linebreak $\opn{rank}_B \Omega^1_{B / A} = n$ 
then $f^*$ is called an
{\em essentially smooth homomorphism of relative dimension $n$}, 
and $B$ is called an {\em essentially smooth $A$-algebra 
of relative dimension $n$}.
\end{dfn}

By Proposition \ref{prop3.2}(3), 
an essentially \'etale homomorphism is the same as an 
essentially smooth homomorphism of relative dimension $0$.

\begin{prop} \label{prop3.4}
Suppose $f^* : A \to B$ and $g^* : B \to C$ are essentially 
smooth homomorphism of relative dimensions $m$ and $n$ 
respectively. Then $g^* \circ f^* : A \to C$ is an essentially 
smooth homomorphism of relative dimension $m + n$, and there is a 
canonical isomorphism of $C$-modules
$\Omega^{m+n}_{C / A} \cong \Omega^m_{B / A} \otimes_B
\Omega^n_{C / B}$.
\end{prop}

\begin{proof}
By \cite[Chapitre $\mrm{0}_{\mrm{IV}}$ Th\'eor\`eme 20.5.7]{EGA}
the sequence
\[ 0 \to C \otimes_B \Omega^1_{B / A} \to
\Omega^1_{C / A} \to \Omega^1_{C / B} \to 0 \]
is split-exact.
\end{proof}

\begin{prop} \label{prop3.3}
Let $f^* : A \to B$ be an essentially smooth homomorphism of 
relative dimension $m$. 
\begin{enumerate}
\item The $B \otimes_A B$ -module $B$ has finite projective 
dimension. 
%
\item There is a canonical isomorphism
\[ \opn{Ext}^i_{B \otimes_A B}(B, \Omega^{2m}_{(B \otimes_A B)
/ A}) \cong 
\begin{cases}
\Omega^m_{B / A} & \tup{if } i = m \\
0 & \tup{otherwise}.
\end{cases}\]
%
\item Suppose $g^* : B \to C$ is an essentially smooth homomorphism 
of relative dimension $n$. Let's write
$\opn{E}(A, B) := 
\opn{Ext}^m_{B \otimes_A B}(B, \Omega^{2m}_{(B \otimes_A B)
/ A})$
etc. Then the diagram
\[ \UseTips \xymatrix @C=5ex @R=4ex {
\Omega^m_{B / A} \otimes_B \Omega^n_{C / B} 
\ar[r]^(0.6){\cong}
\ar[d]^{\cong}
& \Omega^{m+n}_{C / A} 
\ar[d]^{\cong} \\
\opn{E}(A, B) \otimes_B \opn{E}(B, C)
\ar[r]^(0.66){\cong}
& \opn{E}(A, C) } \]
in which the vertical arrows are from part \tup{(2)}, and the 
horizontal arrows come from Proposition \tup{\ref{prop3.4}}, is 
commutative.
\end{enumerate}
\end{prop}

\begin{proof}
First assume that $B \otimes_A B \to B$ is a complete intersection,
i.e.\ the ideal $\opn{Ker}(B \otimes_A B \to B)$
is generated by a regular sequence 
$\bsym{b} = (b_1, \ldots, b_m)$. 
This implies that $B$ has projective dimension $m$ over
$B \otimes_A B$, and that the $\opn{Ext}$'s in part (2) vanish for 
$i \neq m$. Define
$\d \bsym{b} := \d b_1 \wedge \cdots \wedge \d b_m \in 
\Omega^m_{(B \otimes_A B)/ A}$.
Then the map
$\Omega^m_{B / A} \to \opn{E}(A, B)$,
$\beta \mapsto \gfrac{\d \bsym{b} \wedge \beta}{\bsym{b}}$,
is bijective. Here 
$\gfrac{\d \bsym{b} \wedge \beta}{\bsym{b}}$ is the generalized 
fraction, cf.\ Definition \ref{dfn5.6}.
According to \cite[Proposition III.7.2]{RD} this bijection 
is independent of the regular sequence $\bsym{b}$. 

Now suppose $f^* : A \to B$ is an essentially smooth homomorphism of 
relative dimension $m$. Combining Proposition \ref{prop3.2}(1)
and \cite[Chapitre IV Proposition 17.12.4]{EGA} we see that there 
is an open covering $\opn{Spec} B = \bigcup_i \opn{Spec} B_i$,
such that for every $i$ the homomorphism 
$B_i \otimes_A B_i \to B_i$ is a complete intersection.
Using the previous paragraph we deduce parts (1) and (2). 
For part (3) we utilize a similar open covering of $\opn{Spec} C$.
\end{proof}

 From now on in this section $\K$ is a fixed noetherian base ring.
As references for the results on derived categories needed here we 
recommend \cite{RD} or \cite{KS}. 

Let $A$ be a $\K$-algebra. In Section \ref{sec2} 
we constructed a functor
$\opn{Sq}_{A / \K} : \msf{D}(\cat{Mod} A) \to 
\msf{D}(\cat{Mod} A)$,
the squaring operation. When $\K$ is a field one has the easy 
formula   
\[ \opn{Sq}_{A / \K} M = \mrm{RHom}_{A \otimes_{\K} A}
(A, M \otimes_{\K} M)  \]
(see Corollary \ref{cor2.8}).
The squaring is functorial for algebra homomorphisms too. 
Given a homomorphism of algebras $f^* : A \to B$, 
complexes $M \in \msf{D}(\cat{Mod} A)$ and
$N \in \msf{D}(\cat{Mod} B)$, and a morphism
$\phi : N \to M$ in $\msf{D}(\cat{Mod} A)$, there is an induced 
morphism
$\opn{Sq}_{f^* / \K}(\phi) : \opn{Sq}_{B / \K} N \to 
\opn{Sq}_{A / \K} M$
in $\msf{D}(\cat{Mod} A)$. Again when $\K$ is a field the formula 
for $\opn{Sq}_{f^* / \K}$ is obvious; complications arise only 
when the base ring $\K$ is not a field. 

\begin{dfn} \label{dfn2.4}
Let $A$ be a $\K$-algebra and let $M \in \msf{D}(\cat{Mod} A)$. 
Assume $M$ has finite flat dimension over $\K$. A
{\em rigidifying isomorphism} for $M$ relative to $\K$ 
is an isomorphism
\[ \rho : M \to \opn{Sq}_{A / \K} M \]
in $\msf{D}(\cat{Mod} A)$. The pair 
$(M, \rho)$ is called a 
{\em rigid complex over $A$ relative to $\K$}. 
\end{dfn}

\begin{exa}
Take $A = M := \K$. Since $\opn{Sq}_{\K / \K} \K = \K$ it follows 
that $\K$ has a tautological rigidifying isomorphism 
$\rho_{\mrm{tau}} : \K \iso \opn{Sq}_{\K / \K} \K$. 
We call $(\K, \rho_{\mrm{tau}})$ the 
{\em tautological rigid complex over $\K$ relative to $\K$}. 
\end{exa}

\begin{dfn} \label{dfn2.5}
Let $f^* : A \to B$ be a homomorphism between $\K$-algebras, and 
let $(M, \rho_M)$ and $(N, \rho_N)$ be rigid complexes over $A$ 
and $B$ respectively, both relative to $\K$. 
A morphism $\phi : N \to  M$ in 
$\msf{D}(\cat{Mod} A)$ is called a {\em rigid trace-like
morphism relative to $\K$} if the diagram 
\[ \UseTips \xymatrix @C=5ex @R=4ex {
N 
\ar[r]^(0.4){\rho_N}
\ar[d]_{\phi}
& \opn{Sq}_{B / \K} N
\ar[d]^{\opn{Sq}_{f^* / \K}(\phi)} \\
M 
\ar[r]^(0.4){\rho_M}
& \opn{Sq}_{A / \K} M
} \]
of morphisms in $\msf{D}(\cat{Mod} A)$ is commutative. 
If $A = B$ (and $f^*$ is the identity)
then we say $\phi : N \to M$ is a {\em rigid morphism over $A$
relative to $\K$}.
\end{dfn}

It is easy to see that the composition of two rigid 
trace-like morphisms relative to $\K$ is a rigid trace-like morphism 
relative to $\K$. In particular, for 
a fixed $\K$-algebra $A$ the rigid 
complexes over $A$ relative to $\K$ form a category, which we 
denote by 
$\msf{D}(\cat{Mod} A)_{\mrm{rig} / \K}$.

\begin{thm} \label{thm2.5}
Let $\K$ be a noetherian ring,
let $A$ and $B$ be essentially finite type $\K$-algebras,
and let $A \to B$ be a $\K$-algebra homomorphism. Let
$(L, \rho_L) \in \msf{D}(\cat{Mod} A)_{\mrm{rig} / \K}$
and 
$(M, \rho_M) \in \msf{D}(\cat{Mod} B)_{\mrm{rig} / A}$.
Assume either of the conditions \tup{(i)}, \tup{(ii)} 
or  \tup{(iii)} holds.
\begin{enumerate}
\rmitem{i} $A \to B$ is essentially smooth.
\rmitem{ii} $L$ has finite flat dimension over $A$.
\rmitem{iii} The $A$-modules $\mrm{H}^i L$ are finitely generated, 
the canonical morphism $A \to \linebreak \mrm{RHom}_{A}(L, L)$ is an 
isomorphism, and 
$\mrm{H} \opn{Sq}_{B / \K} (L \otimes^{\mrm{L}}_{A} M)$
is bounded.
\end{enumerate}
Then:
\begin{enumerate}
\item The complex 
$L \otimes^{\mrm{L}}_{A} M \in \msf{D}(\cat{Mod} B)$ 
has finite flat dimension over $\K$, and an induced 
rigidifying isomorphism 
\[ \rho_L \otimes \rho_M : L \otimes^{\mrm{L}}_{A} M \iso
\opn{Sq}_{B / \K} (L \otimes^{\mrm{L}}_{A} M) . \] 
%
\item Let $\phi : (L, \rho_{L}) \to (L', \rho_{L'})$
be a morphism in $\msf{D}(\cat{Mod} A)_{\mrm{rig} / \K}$,
and let $\psi : (M, \rho_{M}) \to (M', \rho_{M'})$
be a morphism in 
$\msf{D}(\cat{Mod} B)_{\mrm{rig} / A}$. 
Under conditions \tup{(ii)} or \tup{(iii)} assume $L'$ and $M'$ 
also have the corresponding properties. Then the morphism
\[ \phi \otimes \psi : L \otimes^{\mrm{L}}_{A} M \to
L' \otimes^{\mrm{L}}_{A} M' \]
in $\msf{D}(\cat{Mod} B)$
is rigid relative to $\K$. 
\end{enumerate}
\end{thm}

\begin{proof}
(1) Since $L$ has finite flat dimension over $\K$ and $M$ has 
finite flat dimension over $A$ (cf.\ Definition \ref{dfn2.4}), 
it follows that $L \otimes^{\mrm{L}}_{A} M$ has 
finite flat dimension over $\K$.

Choose K-flat DG algebra resolutions 
$\K \to \til{A} \to A$ and $\til{A} \to \til{B} \to B$
of $\K \to A$ and $\til{A} \to B$ respectively. (If $\K$ is a 
field and $A \to B$ is flat one may just take $\til{A} := A$ 
and $\til{B} := B$.)
There is a sequence of isomorphisms in 
$\msf{D}(\cat{Mod} B)$:
\[ \begin{aligned}
& \opn{Sq}_{B / \K} (L \otimes^{\mrm{L}}_{A} M) 
 = \mrm{RHom}_{\til{B} \otimes_{\K} \til{B}}
\bigl( B, (L \otimes^{\mrm{L}}_{A} M) \otimes^{\mrm{L}}_{\K}
(L \otimes^{\mrm{L}}_{A} M)  \bigr) \\
%
& \quad \cong \mrm{RHom}_{\til{B} 
\otimes_{\til{A}} \til{B}}
\Bigl( B, \mrm{RHom}_{\til{B} \otimes_{\K} \til{B}}
\bigl( \til{B} \otimes_{\til{A}} \til{B}, 
(L \otimes^{\mrm{L}}_{A} M) \otimes^{\mrm{L}}_{\K}
(L \otimes^{\mrm{L}}_{A} M)  \bigr) \Bigr) \\
%
& \quad \cong \mrm{RHom}_{\til{B} 
\otimes_{\til{A}} \til{B}}
\Bigl( B, \mrm{RHom}_{\til{A} \otimes_{\K} \til{A}}
\bigl( \til{A}, 
(L \otimes^{\mrm{L}}_{A} M) \otimes^{\mrm{L}}_{\K}
(L \otimes^{\mrm{L}}_{A} M) \bigr) \Bigr) .
\end{aligned} \]
These isomorphisms come from the Hom-tensor adjunction for the DG 
algebra homomorphisms 
$\til{B} \otimes_{\K} \til{B} \to 
\til{B} \otimes_{\til{A}} \til{B} \to B$, 
plus the fact that 
\[ \til{A} \otimes_{\til{A} \otimes_{\K} \til{A}}
(\til{B} \otimes_{\K} \til{B}) \cong
\til{B} \otimes_{\til{A}} \til{B} . \]

Now using tensor product identities we get an isomorphism
\[ (L \otimes^{\mrm{L}}_{A} M) \otimes^{\mrm{L}}_{\K}
(L \otimes^{\mrm{L}}_{A} M) \cong
M \otimes^{\mrm{L}}_{\til{A}} (L \otimes^{\mrm{L}}_{\K} L)
\otimes^{\mrm{L}}_{\til{A}} M  \]
in $\til{\msf{D}}(\cat{DGMod} \til{B} \otimes_{\K} \til{B})$.
There are functorial morphisms
\begin{equation} \label{eqn3.3}
\begin{aligned}
& M \otimes^{\mrm{L}}_{\til{A}} 
\mrm{RHom}_{\til{A} \otimes_{\K} \til{A}} ( A, 
L \otimes^{\mrm{L}}_{\K} L) \otimes^{\mrm{L}}_{\til{A}} M \\
& \qquad \to \mrm{RHom}_{\til{A} \otimes_{\K} \til{A}} \big( A, 
M \otimes^{\mrm{L}}_{\til{A}} (L \otimes^{\mrm{L}}_{\K} L) \big) 
\otimes^{\mrm{L}}_{\til{A}} M \\
& \qquad \to \mrm{RHom}_{\til{A} \otimes_{\K} \til{A}} \big( A, 
M \otimes^{\mrm{L}}_{\til{A}} (L \otimes^{\mrm{L}}_{\K} L)
\otimes^{\mrm{L}}_{\til{A}} M \big)  
\end{aligned} 
\end{equation} 
in $\til{\msf{D}}(\cat{DGMod} \til{B} \otimes_{\K} \til{B})$, 
which we claim are isomorphisms. To prove this we can forget the 
$\til{B} \otimes_{\K} \til{B}$ -module structure, and consider
(\ref{eqn3.3}) as morphisms in $\msf{D}(\cat{Mod} \K)$. 
According to Corollary \ref{cor1.1} the algebra 
$\mrm{H}^0(\til{A} \otimes_{\K} \til{A}) \cong 
A \otimes_{\K} A$ is noetherian, and each 
$\mrm{H}^i(\til{A} \otimes_{\K} \til{A})$ is a finitely generated 
module over it. Since $M$ has finite flat dimension over 
$\til{A}$, and both $\mrm{H}(L \otimes^{\mrm{L}}_{\K} L)$
and 
$\mrm{H}(M \otimes^{\mrm{L}}_{\til{A}} L \otimes^{\mrm{L}}_{\K} L)$
are bounded, we can use Proposition \ref{prop2.4}, with its 
condition (iii.b). 

At this point we have a functorial isomorphism
\[ \opn{Sq}_{B / \K} (L \otimes^{\mrm{L}}_{A} M) \cong
\mrm{RHom}_{\til{B} \otimes_{\til{A}} \til{B}}
\bigl( B, (M \otimes^{\mrm{L}}_{A} M) \otimes^{\mrm{L}}_{A} 
\opn{Sq}_{A / \K} L \big) \]
in $\msf{D}(\cat{Mod} B)$. 
The DG module $M \otimes^{\mrm{L}}_{A} M$ has bounded cohomology, 
and so does $\opn{Sq}_{A / \K} L$, since the latter is isomorphic 
to $L$. If $A \to B$ is essentially smooth then 
$\til{B} \otimes_{\til{A}} \til{B} \to B \otimes_{A} B$ is a 
quasi-isomorphism, and moreover $B$ has finite projective 
dimension over $B \otimes_{A} B$. Thus under either condition (i), 
(ii) or (iii) of the theorem we may apply Proposition \ref{prop2.4}, 
with its conditions (iii.a), (iii.b) or (iii.c) respectively, 
to get an isomorphism
\[ \begin{aligned}
& \mrm{RHom}_{\til{B} \otimes_{\til{A}} \til{B}}
\bigl( B, (M \otimes^{\mrm{L}}_{A} M) \otimes^{\mrm{L}}_{A} 
\opn{Sq}_{A / \K} L \big) \\
& \qquad \cong
\mrm{RHom}_{\til{B} \otimes_{\til{A}} \til{B}}
( B, M \otimes^{\mrm{L}}_{A} M) \otimes^{\mrm{L}}_{A} 
\opn{Sq}_{A / \K} L  .
\end{aligned} \] 
Thus we have obtained an isomorphism 
\begin{equation} \label{eqn3.4}
\opn{Sq}_{B / \K} (L \otimes^{\mrm{L}}_{A} M) \cong
(\opn{Sq}_{A / \K} L) \otimes^{\mrm{L}}_{A} 
(\opn{Sq}_{B / A} M) 
\end{equation}
in $\msf{D}(\cat{Mod} B)$. The rigidifying isomorphism we want is 
$\rho_L \otimes \rho_M$.

\medskip \noindent
(2) This is because the isomorphism (\ref{eqn3.4}) is functorial 
in $L$ and $M$.
\end{proof}

Henceforth in the situation of the theorem we shall write
\begin{equation}
(L, \rho_{L}) \otimes^{\mrm{L}}_{A} (M, \rho_{M}) :=
(L \otimes^{\mrm{L}}_{A} M, \rho_L \otimes \rho_M) 
\in \msf{D}(\cat{Mod} B)_{\mrm{rig} / \K} .
\end{equation}

\begin{dfn} \label{dfn3.1}
Let $f^* : A \to B$ be a finite homomorphism between two 
essentially finite type $\K$-algebras. Define a functor
$f^{\flat} : \msf{D}(\cat{Mod} A) \to \msf{D}(\cat{Mod} B)$
by $f^{\flat} M := \mrm{RHom}_{A}(B, M)$. 
Let 
$\opn{Tr}^{\flat}_{f; M} : f^{\flat} M \to M$
be the morphism ``evaluation at $1$''.
This becomes a morphism of functors 
$\opn{Tr}^{\flat}_{f} : f_*\, f^{\flat} 
\to \bsym{1}_{\msf{D}(\cat{Mod} A)}$.
\end{dfn}

\begin{thm} \label{thm2.2}
Let $\K$ be a noetherian ring,
let $A$ and $B$ be essentially finite type $\K$-algebras,
and let $f^* : A \to B$ be a finite algebra homomorphism.
Suppose we are given a rigid complex 
$(M, \rho) \in \msf{D}(\cat{Mod} A)_{\mrm{rig} / \K}$,
such that $f^{\flat} M$ has finite flat dimension over $\K$. 
\begin{enumerate}
\item The complex $f^{\flat} M \in \msf{D}(\cat{Mod} B)$ 
has an induced rigidifying isomorphism 
\[ f^{\flat}(\rho) : 
f^{\flat} M \iso \opn{Sq}_{B / \K} f^{\flat} M . \]
The rigid complex
$f^{\flat} (M, \rho) := 
\bigl( f^{\flat} M, f^{\flat}(\rho) \bigr)$
depends functorially on $(M, \rho)$.
%
\item The morphism 
$\opn{Tr}^{\flat}_{f; M} : f^{\flat} M \to M$
is a rigid trace-like morphism relative to $\K$.
%
\item Suppose $g^* : B \to C$ is another finite homomorphism. 
Assume that  $(f \circ g)^{\flat} M$ 
has finite flat dimension over $\K$. 
Then under the standard isomorphism 
$g^{\flat} f^{\flat} M \cong (f \circ g)^{\flat} M$
one has 
$g^{\flat} f^{\flat} (\rho) = (f \circ g)^{\flat} (\rho)$.
\item 
Let $(A, \rho_{\mrm{tau}})$ be the tautological rigid complex. 
Assume that $B$ has finite projective dimension over $A$. 
Then under the standard isomorphism 
$f^{\flat} M \cong M \otimes^{\mrm{L}}_{A} f^{\flat} A$
one has 
$f^{\flat} (\rho) = \rho \otimes f^{\flat} (\rho_{\mrm{tau}})$.
\end{enumerate}
\end{thm}

For the proof we will need a lemma.
The catch in this lemma is that the complex $P$ of flat 
$\K$-module is bounded {\em below}, not above. 

\begin{lem} \label{lem2.4} 
Let $P$ and $N$ be bounded below complexes of $\K$-modules. Assume 
that each $P^i$ is a flat $\K$-module, and that $N$ has finite 
flat dimension over $\K$. Then the canonical morphism 
$P \otimes^{\mrm{L}}_{\K} N \to P \otimes_{\K} N$
in $\msf{D}(\cat{Mod} \K)$ is an isomorphism. 
\end{lem}

\begin{proof}
Choose a bounded flat resolution $Q \to N$ over $\K$.
We have to show that 
$P \otimes_{\K} Q \to P \otimes_{\K} N$
is a quasi-isomorphism. 
Let $L$ be the cone of $Q \to N$.
It is enough to show that the complex $P \otimes_{\K} L$
is acyclic. We note that $L$ is a bounded below acyclic 
complex and $P$ is a bounded below complex of flat modules. 
To prove that $\mrm{H}^i (P \otimes_{\K} L) = 0$ for any given $i$ 
we might as well replace $P$ with a truncation 
$P' := ( \cdots \to P^{j_1 - 1} \to P^{j_1} \to 0 \to \cdots)$
for $j_1 \gg i$. Now $P'$ is K-flat, so 
$P' \otimes_{\K} L$ is acyclic.
\end{proof}

\begin{proof}[Proof of the theorem]
(1) Let's pick a semi-free DG algebra resolution 
$\K \to \til{A} \to A$ of $\K \to A$. Next let's pick a 
K-projective DG algebra resolution $\til{A} \to \til{B} \to B$ of
$\til{A} \to B$, such that 
$\opn{und} \til{B} \cong \boplus_{i = -\infty}^0 
\opn{und} \til{A}[-i]^{\mu_i}$
with finite multiplicities $\mu_i$; see Proposition 
\ref{prop1.2}(3). Choose a bounded above semi-free resolution 
$P' \to M$ over $\til{A}$. Since $M$ has finite flat dimension over 
$\K$ it follows that for $i \ll 0$ the truncated DG $\til{A}$-module 
$P := \tau^{\geq i} P'$ is a bounded complex of flat $\K$-modules, 
and also $P \cong M$ in $\til{\msf{D}}(\cat{DGMod} \til{A})$. 

We have an isomorphism
$\mrm{Hom}_{\til{A}}(\til{B}, P) \cong \mrm{RHom}_{A}(B, M)$
in $\til{\msf{D}}(\cat{DGMod} \til{B})$,
and an isomorphism
\[ \opn{Hom}_{\til{A} \otimes_{\K} \til{A}}
(\til{B} \otimes_{\K} \til{B}, P \otimes_{\K} P) \cong
\opn{RHom}_{\til{A} \otimes_{\K} \til{A}}
(\til{B} \otimes_{\K} \til{B}, M \otimes^{\mrm{L}}_{\K} M)  \]
in $\til{\msf{D}}(\cat{DGMod} \til{B} \otimes_{\K} \til{B})$.
Because the multiplicities $\mu_i$ are finite and $P$ is bounded, 
the obvious DG module homomorphism
\[ \mrm{Hom}_{\til{A}}(\til{B}, P) \otimes_{\K}
\mrm{Hom}_{\til{A}}(\til{B}, P) \to
\opn{Hom}_{\til{A} \otimes_{\K} \til{A}}
(\til{B} \otimes_{\K} \til{B}, P \otimes_{\K} P) \]
is bijective. Now $\mrm{Hom}_{\til{A}}(\til{B}, P)$ is a bounded 
below complex of flat $\K$-modules, which also has finite flat 
dimension over $\K$. Therefore by Lemma \ref{lem2.4} we obtain
\[ \mrm{Hom}_{\til{A}}(\til{B}, P) \otimes_{\K}
\mrm{Hom}_{\til{A}}(\til{B}, P) \cong 
\mrm{RHom}_{A}(B, M) \otimes^{\mrm{L}}_{\K} \mrm{RHom}_{A}(B, M) 
\]
in $\til{\msf{D}}(\cat{DGMod} \til{B} \otimes_{\K} \til{B})$.
We conclude that there is a functorial isomorphism 
\begin{equation} \label{eqn3.2} 
\mrm{RHom}_{A}(B, M) \otimes^{\mrm{L}}_{\K} \mrm{RHom}_{A}(B, M)
\cong \opn{RHom}_{\til{A} \otimes_{\K} \til{A}}
(\til{B} \otimes_{\K} \til{B}, M \otimes^{\mrm{L}}_{\K} M) 
\end{equation}
in $\til{\msf{D}}(\cat{DGMod} \til{B} \otimes_{\K} \til{B})$.
(If $\K$ is a field we may disregard 
the previous sentences, and just take $\til{A} := A$ and 
$\til{B} := B$.) We thus have a sequence of isomorphisms in 
$\msf{D}(\cat{Mod} B)$:
\begin{equation} \label{eqn2.1}
\begin{aligned}
\opn{Sq}_{B / \K} f^{\flat} M 
& = \mrm{RHom}_{\til{B} \otimes_{\K} \til{B}}
\bigl( B, \mrm{RHom}_A(B, M) \otimes^{\mrm{L}}_{\K} 
\mrm{RHom}_A(B, M) \bigr) \\
%
& \cong^{\diamondsuit} \mrm{RHom}_{\til{B} \otimes_{\K} \til{B}}
\bigl( B, \mrm{RHom}_{\til{A} \otimes_{\K} \til{A}}
(\til{B} \otimes_{\K} \til{B}, 
M \otimes^{\mrm{L}}_{\K} M) \bigr) \\
%
& \cong^{\ddag} \mrm{RHom}_{\til{A} \otimes_{\K} \til{A}}
( B, M \otimes^{\mrm{L}}_{\K} M) ) \\
%
& \cong^{\ddag} \mrm{RHom}_{A} \bigl( B, 
\mrm{RHom}_{\til{A} \otimes_{\K} \til{A}}
( A, M \otimes^{\mrm{L}}_{\K} M) \bigr)
= f^{\flat} \opn{Sq}_{A / \K} M ,
\end{aligned}
\end{equation}
where the isomorphism marked $\diamondsuit$ is by (\ref{eqn3.2}), 
and the isomorphisms $\ddag$ come from the Hom-tensor
adjunction formula. The rigidifying isomorphism we want is 
$f^{\flat} M \xar{f^{\flat}(\rho)} f^{\flat} \opn{Sq}_{B / \K} M
\cong \opn{Sq}_{A / \K} f^{\flat} M$.

\medskip \noindent (2)
Going over the sequence of isomorphisms (\ref{eqn2.1}) we see that 
the diagram 
\begin{equation} \label{eqn2.5}
\UseTips \xymatrix @C=5ex @R=4ex {
f^{\flat} M
\ar[r]^(0.4){f^{\flat}(\rho)}
\ar[d]_{\opn{Tr}^{\flat}_{f; M}}
& \opn{Sq}_{B / \K} f^{\flat} M
\ar[d]^{\opn{Sq}_{f^* / \K}(\opn{Tr}^{\flat}_{f; M})} \\
M 
\ar[r]^(0.4){\rho}
& \opn{Sq}_{A / \K} M } 
\end{equation}
is commutative. This says that $\opn{Tr}^{\flat}_{f; M}$ 
is a rigid morphism.

\medskip \noindent (3)
This is because the rigidifying isomorphism 
$f^{\flat}(\rho)$  
in part (1) depends only on standard identities and on the given 
rigidifying isomorphism $\rho$. 

\medskip \noindent (4)
According to Proposition \ref{prop2.4},
under its condition (iii.a), we have a canonical isomorphism 
$M \otimes^{\mrm{L}}_{A} f^{\flat} A \cong  f^{\flat} M$.
Combine this with the isomorphisms (\ref{eqn2.1}).
\end{proof}

Suppose $M \in \msf{D}(\cat{Mod} A)$ and 
$N \in \msf{D}(\cat{Mod} B)$. A morphism $\tau : N \to M$ in 
$\msf{D}(\cat{Mod} A)$ is called {\em nondegenerate} if the 
induced morphism $N \to \mrm{RHom}_{A}(B, M)$ in 
$\msf{D}(\cat{Mod} B)$ is an isomorphism.

\begin{cor} \label{cor2.3}
Let $f^* : A \to B$ be a finite homomorphism between 
two essentially finite type $\K$-algebras, and let 
$(M, \rho) \in \msf{D}(\cat{Mod} A)_{\mrm{rig} / \K}$.
Assume that $\mrm{H} M$ is a finitely generated $A$-module,
$f^{\flat} M$ has finite flat dimension over $\K$, and   
$\opn{Hom}_{\msf{D}(\cat{Mod} A)}(f^{\flat} M, M)$
is a free $B$-module with basis $\opn{Tr}^{\flat}_{f; M}$. 
Then $\opn{Tr}^{\flat}_{f; M}$ 
is the unique nondegenerate rigid trace-like morphism
$f^{\flat} M \to M$ relative to $\K$.
\end{cor}

\begin{proof}
By Theorem \ref{thm2.2}, 
$\opn{Tr}^{\flat}_{f; M} : f^{\flat} M \to M$
is a rigid morphism. Suppose $\tau : f^{\flat} M \to M$
is some other nondegenerate rigid trace-like morphism. Then 
$\tau = u \opn{Tr}^{\flat}_{f; M}$ for some $u \in B^{\times}$, 
so we get isomorphisms
\[ u \opn{Tr}^{\flat}_{f; M} = \tau =
\opn{Sq}_{f^* / \K}(\tau) 
= \opn{Sq}_{f^* / \K}(u \opn{Tr}^{\flat}_{f; M}) = 
u^2 \opn{Sq}_{f^* / \K}(\opn{Tr}^{\flat}_{f; M}) = 
u^2 \opn{Tr}^{\flat}_{f; M} . \]
Therefore $u = 1$. 
\end{proof}

We shall need the following easy fact. 

\begin{lem} \label{lem3.1}
Suppose $B = \prod_{i = 1}^m B_i$, i.e.\ 
$\opn{Spec} B = \coprod_{i = 1}^m \opn{Spec} B_i$.
Then the functor $N \mapsto \prod_i (B_i \otimes_B N)$
is an equivalence 
$\msf{D}(\cat{Mod} B) \to 
\prod_{i} \msf{D}(\cat{Mod} B_i)$. 
\end{lem}

\begin{dfn} \label{dfn2.6}
Suppose $f^* : A \to B$ is an essentially smooth homomorphism of 
$\K$-algebras. Let
$\opn{Spec} B = \coprod_{i} \opn{Spec} B_i$
be the (finite) decomposition of $\opn{Spec} B$ into connected 
components. For each $i$ the $B_i$-module $\Omega^1_{B_i / A}$
is projective of constant rank, say $n_i$. Given 
$M \in \msf{D}(\cat{Mod} A)$ define
\[ f^{\sharp} M := \prod\nolimits_i 
(\Omega^{n_i}_{B_i / A}[n_i] \otimes_{A} M) . \]
This is a functor
$f^{\sharp} : \msf{D}(\cat{Mod} A) \to \msf{D}(\cat{Mod} B)$. 
\end{dfn}

Note that if $f^* : A \to B$ 
is essentially \'etale then one simply has
$f^{\sharp} M = B \otimes_A M$. 

\begin{thm} \label{thm2.4}
Let $\K$ be a noetherian ring,
let $A$ and $B$ be essentially finite type $\K$-algebras,
and let $f^* : A \to B$ be an essentially smooth algebra 
homomorphism. 
Let $(L, \rho) \in \msf{D}(\cat{Mod} A)_{\mrm{rig} / \K}$. 
\begin{enumerate}
\item The complex $f^{\sharp} L$ has an induced rigidifying 
isomorphism 
\[ f^{\sharp}(\rho) : f^{\sharp} L \iso \opn{Sq}_{B / \K} 
f^{\sharp} L . \]
We get a functor
$f^{\sharp} : \msf{D}(\cat{Mod} A)_{\mrm{rig} / \K} \to
\msf{D}(\cat{Mod} B)_{\mrm{rig} / \K}$. 
%
\item Let $(A, \rho_{\mrm{tau}})$ be the tautological rigid 
complex. Then under the standard isomorphism 
$f^{\sharp} L \cong L \otimes^{\mrm{L}}_{A} f^{\sharp} A$
one has 
$f^{\sharp}(\rho) = \rho \otimes f^{\sharp}(\rho_{\mrm{tau}})$.
%
\item Let $g^* : B \to C$ be either a smooth homomorphism
or a localization homomorphism.
Then under the isomorphism 
$(f \circ g)^{\sharp} L \cong g^{\sharp} f^{\sharp} L$
of Proposition \tup{\ref{prop3.4}} one has 
$(f \circ g)^{\sharp}(\rho) = g^{\sharp}  f^{\sharp} L(\rho)$.
\end{enumerate}
\end{thm}

\begin{proof}
In view of Lemma \ref{lem3.1} we might as well assume
$\Omega^1_{B / A}$ has constant rank $m$. Using the canonical 
isomorphism
$\Omega^{2m}_{(B \otimes_A B) / A} \cong
\Omega^{m}_{B / A} \otimes_A \Omega^{m}_{B / A}$
we can interpret Proposition \ref{prop3.3}(2) as a 
canonical rigidifying isomorphism for the complex 
$\Omega^{m}_{B / A}[m]$ relative to $A$, which we 
denote by $\rho_{\Omega}$. Thus we obtain an object
\[ (\Omega^{m}_{B / A}[m], \rho_{\Omega}) \in
\msf{D}(\cat{Mod} B)_{\mrm{rig} / A} . \]
Now using Theorem \ref{thm2.5} we can define the rigidifying 
isomorphism
$f^{\sharp}(\rho) := \rho \otimes \rho_{\Omega}$. 
The assertion in part (2) is clear. 

For part (3) one may assume $\opn{rank}_C \Omega^1_{C / B} = n$.
Then the claim follows from Proposition \ref{prop3.3}(3). 
\end{proof}

\begin{dfn}
Let $f^* : A \to A'$ be an essentially \'etale homomorphism 
between essentially finite type $\K$-algebras. For 
$M \in \msf{D}(\cat{Mod} A)$ let
$\mrm{q}^{\sharp}_{f; M} : M \to f^{\sharp} M$
be the morphism $m \mapsto 1 \otimes m$. 
This is a functorial morphism
$\mrm{q}^{\sharp}_{f} : \bsym{1}_{\msf{D}(\cat{Mod} A)} \to
f_*\, f^{\sharp}$.
\end{dfn}

In the situation of the definition above, given 
$M' \in \msf{D}(\cat{Mod} A')$, there is a canonical bijection
\[ \opn{Hom}_{\msf{D}(\cat{Mod} A)}(M, M') 
\cong \opn{Hom}_{\msf{D}(\cat{Mod} A')}(f^{\sharp} M, M') \]
coming from Hom-tensor adjunction. In particular, for 
$M' := f^{\sharp} M$, the morphism $\mrm{q}^{\sharp}_{f; M}$
corresponds to the identity $\bsym{1}_{M'}$.

\begin{dfn} \label{dfn2.3}
Let $f^* : A \to A'$ be an essentially \'etale homomorphism
between essentially finite type $\K$-algebras, let
$(M, \rho) \in \msf{D}(\cat{Mod} A)_{\mrm{rig} / \K}$
and let
$(M', \rho') \in \linebreak 
\msf{D}(\cat{Mod} A')_{\mrm{rig} / \K}$.
A {\em rigid localization morphism} is a 
morphism $\phi : M \to M'$ in \linebreak
$\msf{D}(\cat{Mod} A)$,
such that the corresponding morphism
$\phi' : f^{\sharp} M \to M'$ in $\msf{D}(\cat{Mod} A)'$
is a rigid isomorphism relative to $\K$. 
\end{dfn}

\begin{prop} \label{prop2.1}  
Let $f^* : A \to A'$ be an essentially \'etale homomorphism, and
let $(M, \rho) \in \msf{D}(\cat{Mod} A)_{\mrm{rig} / \K}$. 
Define 
$(M', \rho') := f^{\sharp}(M, \rho)$.
Then:
\begin{enumerate}
\item The morphism $\mrm{q}^{\sharp}_{f; M} : M \to M'$ 
is a rigid localization morphism.
\item Moreover, if 
$M \in \msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} A)$
and $\mrm{RHom}_{A}(M, M) = A$, then 
$\mrm{q}^{\sharp}_{f; M}$ is the unique rigid localization morphism 
$M \to M'$.
\end{enumerate}
\end{prop}

\begin{proof}
(1) Since the corresponding morphism $M' \to M'$
is the identity automorphism of $M'$, it is certainly rigid. 

\medskip \noindent
(2) Here we have
$\opn{Hom}_{\msf{D}(\cat{Mod} A')}(M', M') = A'$.  
The uniqueness of $\mrm{q}^{\sharp}_{f; M}$ is proved 
like in Corollary \ref{cor2.3}.
\end{proof}

\begin{thm} \label{thm2.8}
Let $\K$ be a noetherian ring, let 
$A$ be an essentially finite type $\K$-algebra, let
$g^* : A \to A'$ be an essentially smooth homomorphism, 
and let $f^* : A \to B$ be a finite homomorphism. Define
$B' := A' \otimes_A B$; so we get a cartesian diagram of algebra 
homomorphisms
\[ \UseTips
\xymatrix @=4ex {
A
\ar[r]^{f^*} 
\ar[d]_{g^*} 
& B 
\ar[d]^{h^*} \\
A'
\ar[r]^{{f'}^*} 
& B' } \]
in which ${f'}^*$ is finite and $h^*$ is essentially smooth.
Let $(M, \rho) \in$ \linebreak 
$\msf{D}(\cat{Mod} A)_{\mrm{rig} / \K}$. 
Assume $f^{\flat} M$ has finite flat dimension over $\K$, and
$\mrm{H}(A \otimes^{\mrm{L}}_{\K} A)$ is bounded. Then
there is a functorial isomorphism 
\[ h^{\sharp} f^{\flat} (M, \rho) \cong
{f'}^{\flat} g^{\sharp} (M, \rho) \]
in $\msf{D}(\cat{Mod} B')_{\mrm{rig} / \K}$.
\end{thm}

\begin{proof}
Suppose $\opn{rank}_B \Omega^1_{A' / A} = n$. Using the
base change isomorphism for differential forms, namely
$\Omega^n_{B' / B} \cong B \otimes_A \Omega^n_{A' / A}$,
we obtain isomorphisms
\[ \begin{aligned}
h^{\sharp} f^{\flat} M 
& = \Omega^n_{B' / B}[n] \otimes_B \mrm{RHom}_{A}(B, M) \\
& \cong  \Omega^n_{A' / A}[n] \otimes_A \mrm{RHom}_{A}(B, M) 
\cong \mrm{RHom}_{A}(B, \Omega^n_{A' / A}[n] \otimes_A M) \\
& \cong \mrm{RHom}_{A'}(B', \Omega^n_{A' / A}[n] \otimes_A M) 
= {f'}^{\flat} g^{\sharp} M .
\end{aligned} \]
Now regarding the rigidifying isomorphisms, use 
Proposition \ref{prop2.4}, with condition (iii.b), to insert 
$\Omega^n_{A' / A}[n]$ into the sequence of isomorphisms 
(\ref{eqn2.1}) at various positions.
\end{proof}

\begin{cor} \label{cor2.7}
In the situation of Theorem \tup{\ref{thm2.8}} 
assume $g^*$ is essentially \'etale. Define $N := f^{\flat} M$,
$M' := g^{\sharp} M$ and 
$N' := h^{\sharp} f^{\flat} M \cong 
f'^{\flat} g^{\sharp} M$, 
with their induced rigidifying isomorphisms.
Then 
\[ \mrm{q}^{\sharp}_{g; M} \circ \opn{Tr}^{\flat}_{f; M} =
\opn{Tr}^{\flat}_{f'; M'} \circ \, \mrm{q}^{\sharp}_{h; N}
\in \opn{Hom}_{\msf{D}(\cat{Mod} A)}(N, M') . \]
\end{cor}

\begin{proof}
This is because 
$\opn{Tr}^{\flat}_{f'; M'} : N' \to M'$
is gotten from 
$\opn{Tr}^{\flat}_{f; M} : N \to M$
by applying $A' \otimes_A -$. 
\end{proof}

Suppose $f^* : \K \to A$ is a flat ring homomorphism, and 
$g^* : \K \to \K'$ is another ring homomorphism.
We do not impose any finiteness conditions on $f^*$ or $g^*$.
Define $A' := \K' \otimes_{\K} A$. 
Let $M \in \msf{D}(\cat{Mod} A)$ and 
$M' \in \msf{D}(\cat{Mod} A')$.
Then
$\opn{Sq}_{A / \K} M = \mrm{RHom}_{A \otimes_{\K} A}
(A, M \otimes^{\mrm{L}}_{\K} M)$,
and
\[ \opn{Sq}_{A' / \K'} M' = \mrm{RHom}_{A' \otimes_{\K'} A'}
(A', M' \otimes^{\mrm{L}}_{\K'} M') \cong 
\mrm{RHom}_{A \otimes_{\K} A}
(A, M' \otimes^{\mrm{L}}_{\K'} M') . \]
If $\phi : M \to M'$ is a morphism in $\msf{D}(\cat{Mod} A)$,
we obtain an induced morphism 
$\opn{Sq}_{A / \K} M \to \opn{Sq}_{A' / \K'} M'$
in $\msf{D}(\cat{Mod} A)$, which we denote by
$\opn{Sq}_{f,g}(\phi)$.

\begin{dfn} \label{dfn3.2}
With $A, \K'$ and $A'$ as above, let 
$(M, \rho) \in \msf{D}(\cat{Mod} A)_{\mrm{rig} / \K}$
and
$(M', \rho') \in \msf{D}(\cat{Mod} A')_{\mrm{rig} / \K'}$.
A morphism $\phi : M \to M'$ in $\msf{D}(\cat{Mod} A)$ is called a 
{\em rigid base change morphism relative to $\K$} if 
\[ \rho' \circ \phi = \opn{Sq}_{f,g}(\phi) \circ \rho . \]
\end{dfn}

\begin{prop} \label{prop3.1}
In the situation of Definition \tup{\ref{dfn3.2}},
assume that the canonical morphism 
$A' \to \mrm{RHom}_{A'}(M', M')$
is an isomorphism, and also $M' \cong A' \otimes^{\mrm{L}}_A M$. 
Then there is a unique rigid base change morphism 
$\phi : (M, \rho) \to (M', \rho')$.
\end{prop}

\begin{proof}
Take any morphism $\til{\phi} : M \to M'$ which induces an 
isomorphism $A' \otimes^{\mrm{L}}_A M \to M'$. 
Then 
$\rho' \circ \til{\phi} = u \opn{Sq}_{f,g}(\til{\phi}) 
\circ \rho$
for a unique invertible element $u \in A'$. Define
$\phi := u^{-1} \til{\phi}$.
\end{proof}









%\newpage
%% ** section 4  ** 
\section{Rigid Dualizing Complexes over $\K$-Algebras}
\label{sec4}

In this section we assume that $\K$ is
a regular noetherian ring of finite Krull dimension. 
All algebras are by default essentially finite type $\K$-algebras,
and all algebra homomorphisms are over $\K$.

Let us recall the definition of dualizing complex over a 
$\K$-algebra $A$ from \cite{RD}. The derived category of 
bounded complexes with finitely generated
cohomology modules is denoted by 
$\msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} A)$.
A complex $R \in \msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} A)$
is called a {\em dualizing complex} if it has finite injective 
dimension, and the canonical morphism
$A \to \mrm{RHom}_{A}(R, R)$
in $\msf{D}(\cat{Mod} A)$ is an isomorphism.
It follows that the functor
$\mrm{RHom}_{A}(-, R)$
is an auto-duality of 
$\msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} A)$.
Note since the ground ring $\K$ has 
finite global dimension, the complex $R$ has finite flat 
dimension over it. 

Following Van den Bergh \cite{VdB} we make the following 
definition.

\begin{dfn} \label{dfn2.1}
Let $A$ be a $\K$-algebra and let
$R$ be a dualizing complex over $A$. Suppose $R$ has a 
rigidifying isomorphism $\rho : R \iso \opn{Sq}_{A / \K} R$. 
Then the pair $(R, \rho)$ is 
called a {\em rigid dualizing complex over $A$ relative to $\K$}. 
\end{dfn}

By default all rigid dualizing complexes are relative to the 
ground ring $\K$. 

\begin{exa} \label{exa2.0}
Take the $\K$-algebra $A := \K$. 
The complex $R := \K$ is a dualizing complex 
over $\K$, since this ring is regular. Let
$\rho_{\mrm{tau}} : \K \iso \opn{Sq}_{\K / \K} \K$ 
be the tautological rigidifying isomorphism. Then 
$(\K, \rho_{\mrm{tau}})$ is a 
rigid dualizing complex over $\K$ relative to $\K$.
\end{exa}

In \cite{VdB} it was proved that when $\K$ is a field,
a rigid dualizing complex $R$ is unique up to isomorphism. 
And in \cite{YZ1} we proved that the pair $(R, \rho)$ is in fact 
unique up to a unique rigid isomorphism (again, only when $\K$ is 
a field). These results are true in our setup too:

\begin{thm} \label{thm2.3}
Let $\K$ be a regular finite dimensional noetherian ring,
let $A$ be an essentially finite type $\K$-algebra, and let 
$(R, \rho)$ be a rigid dualizing complex over $A$ 
relative to $\K$. Then $(R, \rho)$ is unique up to a 
unique rigid isomorphism.
\end{thm}

\begin{proof}
In view of Lemma \ref{lem3.1} and Theorem \ref{thm2.4}
we may assume that $\opn{Spec} A$ is connected. 
Suppose $(R', \rho')$ is another rigid dualizing complex over $A$. 
Then there is an isomorphism 
$R' \cong R \otimes_A L[n]$ for some invertible $A$-module $L$ and 
some integer $n$. Indeed 
$L[n] \cong \opn{RHom}_{A}(R, R')$. 
See \cite[Section V.3]{RD} or \cite{VdB}.

Choose a K-flat DG algebra 
resolution $\K \to \til{A} \to A$ of $\K \to A$.
(If $\K$ is a field just take $\til{A} := A$.) So
\[ \begin{aligned}
& \opn{Sq}_{A / \K} R' \cong \opn{Sq}_{A / \K} (R_A \otimes_A L[n]) 
\\
& \quad = \mrm{RHom}_{\til{A} \otimes_{\K} \til{A}}
\bigl( A, (R_A \otimes_A L[n]) \otimes^{\mrm{L}}_{\K} 
(R_A \otimes_A L[n]) \bigr) \\
& \quad \cong^{\dag} \mrm{RHom}_{\til{A} \otimes_{\K} \til{A}}
( A, R_A \otimes^{\mrm{L}}_{\K} R_A )
\otimes^{\mrm{L}}_{A} L[n] \otimes^{\mrm{L}}_{A} L[n] \\
& \quad = (\opn{Sq}_{A / \K} R_A) 
\otimes^{\mrm{L}}_{A} L[n] \otimes^{\mrm{L}}_{A} L[n] 
\cong^{\diamondsuit} R_A \otimes_A L[n] \otimes_A L[n] . 
\end{aligned} \]
The isomorphism marked $\dag$ exists by Proposition \ref{prop2.4}
(with its condition (iii.b)),
and the isomorphism marked $\diamondsuit$ comes from 
$\rho : \opn{Sq}_{A / \K} R_A \iso R_A$. 
On the other and we have
$\rho' : R' \iso \opn{Sq}_{A / \K} R'$, which gives an isomorphism
\[ R_A \otimes_A L[n] \cong R_A \otimes_A L[n] \otimes_A L[n] . \]
Since $R_A$ is a dualizing complex it follows that $L \cong A$ and 
$n = 0$. Thus we get an isomorphism $\phi_0 : R_A \iso R'$. 

The isomorphism $\phi_0$ might not be rigid, but there is some 
isomorphism $\phi_1$ making the diagram
\[ \UseTips \xymatrix @C=11ex @R=4ex {
R_A
\ar[r]^(0.4){\phi_1}
\ar[d]_{\rho_A}
&  R'
\ar[d]^{\rho'} \\
\opn{Sq}_{A / \K} R_A
\ar[r]^(0.5){\opn{Sq}_{\bsym{1}_A / \K}(\phi_0)}
& \opn{Sq}_{A / \K} R' } \]
commutative. Since 
$\mrm{Hom}_{\msf{D}(\cat{Mod} A)}(R_A, R')$
is a free $A$-module with basis $\phi_0$,
it follows that $\phi_1 = u \phi_0$ for some $u \in A^{\times}$. 
Then the isomorphism $\phi := u^{-1} \phi_0$ 
is the unique rigid isomorphism $R_A \iso R'$.
\end{proof}

In view of this result we are allowed to talk about {\em the} 
rigid dualizing complex over $A$ (if it exists).

The functors $f^{\flat}$ and $f^{\sharp}$ associated to an algebra 
homomorphism $f^* : A \to B$ were introduced in Definitions 
\ref{dfn3.1} and \ref{dfn2.6} respectively.

\begin{prop} \label{prop4.1} 
Let $f^* : A \to B$ be a finite homomorphism of $\K$-algebras.
Assume a rigid dualizing 
complex $(R_A, \rho_A)$ over $A$ exists. Define
$R_B := f^{\flat}R_A \in \msf{D}(\cat{Mod} B)$
and $\rho_B := f^{\flat}(\rho_A)$. Then
$(R_B, \rho_B)$ is a rigid dualizing complex over $B$.
\end{prop}

\begin{proof}
The fact that $R_B$ is a dualizing complex over $B$ is an easy 
calculation; see \cite[Proposition V.2.4]{RD}. Since $R_B$ has 
bounded cohomology and $\K$ has finite global dimension it follows 
that $R_B$ has finite flat dimension over $\K$. So Theorem 
\ref{thm2.2}(1) can be applied.
\end{proof}

\begin{prop} \label{prop4.2} 
Let $A$ be a $\K$-algebra, and 
assume $A$ has a rigid dualizing complex $(R_A, \rho_A)$.
Let $f^* : A \to B$ be an essentially smooth homomorphism. 
Define $R_B := f^{\sharp} R_A$
and $\rho_B := f^{\sharp}(\rho_A)$.
Then $(R_B, \rho_B)$ is a rigid dualizing complex over $B$.
\end{prop}

\begin{proof}
A calculation, using Proposition \ref{prop3.2}(1),
shows that $R_B$ is a dualizing complex over $B$. 
The only tricky part is to show that $R_B$ has finite injective 
dimension; see \cite[Theorem V.8.3]{RD}. Theorem \ref{thm2.4}(1)
tells us $(R_B, \rho_B)$ is a rigid  complex over $B$ relative to 
$\K$.
\end{proof}

\begin{thm} \label{thm4.12} 
Let $\K$ be a regular finite dimensional noetherian ring,
and let $A$ be an essentially finite type $\K$-algebra.
Then $A$ has a rigid dualizing complex $(R_A, \rho_A)$
relative to $\K$.
\end{thm}

\begin{proof}
We can find algebras and homomorphisms
$\K \xar{f^*} C \xar{g^*} B \xar{h^*} A$,
where $C = \K[t_1, \ldots, t_n]$ is a polynomial algebra,
$g^*$ is surjective and $h^*$ is a localization. 
By Example \ref{exa2.0}, $(\K, \rho_{\mrm{tau}})$ 
is a rigid dualizing complex over $\K$. 
By Propositions \ref{prop4.2} and \ref{prop4.1} the complex
$h^{\sharp} g^{\flat} f^{\sharp} \K = A \otimes_B
\opn{RHom}_{C}(B, \Omega^n_{C / \K}[n])$ 
is a rigid dualizing complex over $A$, with rigidifying 
isomorphism
$h^{\sharp} g^{\flat} f^{\sharp} (\rho_{\mrm{tau}})$.
\end{proof}

\begin{dfn} \label{dfn2.2}
Let $A$ and $B$ be $\K$-algebras,
with rigid dualizing complexes $(R_A, \rho_A)$ and $(R_B, \rho_B)$ 
respectively. Let $f^* : A \to B$ be a finite homomorphism and let
$\phi : R_B \to R_A$ be a morphism in 
$\msf{D}(\cat{Mod} A)$.
We say $\phi$ is a {\em rigid trace} if it satisfies  
the following two conditions:
\begin{enumerate}
\rmitem{i} $\phi$ is nondegenerate, i.e.\ 
the morphism $R_B \to \opn{RHom}_A(B, R_A)$ 
in $\msf{D}(\cat{Mod} B)$ induced by $\phi$  
is an isomorphism.
\rmitem{ii} $\phi$ is a rigid trace-like morphism, 
in the sense of Definition 
\tup{\ref{dfn2.5}}.
\end{enumerate}
\end{dfn}

\begin{prop} \label{prop4.4}
Let $f^* : A \to B$ be a finite homomorphism between $\K$-algebras. 
There is a unique rigid trace 
$\opn{Tr}_{f} = \opn{Tr}_{B / A}: R_B \to R_A$.
\end{prop}

\begin{proof}
By Corollary \ref{cor2.3} the morphism 
$\opn{Tr}^{\flat}_{f; R_A} : f^{\flat} R_A \to R_A$,
namely ``evaluation at $1$'', is the unique nondegenerate rigid
trace-like morphism between these two objects.
And by Proposition \ref{prop4.1} and Theorem 
\ref{thm2.3} there exist a unique rigid isomorphism 
$R_B \cong f^{\flat} R_A$. 
\end{proof}

Here is an immediate consequence of the uniqueness:

\begin{cor}[Transitivity] \label{cor4.1}
Let $A \to B \to C$ be finite homomorphisms of $\K$-algebras. Then
$\opn{Tr}_{C / A} = \opn{Tr}_{B / A} \circ \opn{Tr}_{C / B}.$
\end{cor}

The notion of rigid localization morphism was introduced in 
Definition \ref{dfn2.3}.

\begin{prop} \label{prop4.3} 
Let $A$ and $A'$ be $\K$-algebras, with rigid dualizing complexes
$(R_A, \rho_A)$ and $(R_{A'}, \rho_{A'})$ respectively. 
Suppose $f^* : A \to A'$ is an essentially \'etale homomorphism.
Then there is exactly one rigid localization morphism 
$\mrm{q}_{f} = \mrm{q}_{A' / A} : R_A \to R_{A'}$.
\end{prop}

\begin{proof}
By Proposition \ref{prop4.2} we have a rigid dualizing complex
$f^{\sharp} R_A$ over $A'$, and by Proposition \ref{dfn2.3}
there is a unique rigid localization morphism 
$\mrm{q}^{\sharp}_{f; R_A} : R_A \to f^{\sharp} R_A$.
According to Theorem \ref{thm2.3} there is a unique rigid 
isomorphism $f^{\sharp} R_A \cong R_{A'}$.
\end{proof}

\begin{dfn}
Given a $\K$-algebra $A$, with rigid dualizing complex $R_A$, 
define the {\em rigid auto-duality functor} to be
$\mrm{D}_A := \mrm{RHom}_{A}(-, R_A)$. 
\end{dfn}

Note that $\mrm{D}_A$ is a duality of 
$\msf{D}_{\mrm{f}}(\cat{Mod} A)$, and it exchanges the 
subcategories
$\msf{D}^{+}_{\mrm{f}}(\cat{Mod} A)$
and
$\msf{D}^{-}_{\mrm{f}}(\cat{Mod} A)$.
Given a homomorphism $f^* : A \to B$ the functor
$\mrm{L} f^* = B \otimes^{\mrm{L}}_{A} -$ sends 
$\msf{D}^{-}_{\mrm{f}}(\cat{Mod} A)$ into
$\msf{D}^{-}_{\mrm{f}}(\cat{Mod} B)$.
This permits the next definition. 

\begin{dfn} \label{dfn4.5}
Let $f^* : A \to B$ be a homomorphism between two $\K$-algebras. 
We define the {\em twisted inverse image} functor 
$f^! : \msf{D}^+_{\mrm{f}}(\cat{Mod} A) \to 
\msf{D}^+_{\mrm{f}}(\cat{Mod} B)$
as follows. If $A = B$ and $f = \bsym{1}_A$ (the identity 
automorphism) then we let
$f^! := \bsym{1}_{\msf{D}^+_{\mrm{f}}(\cat{Mod} A)}$
(the identity functor). Otherwise we define 
$f^! := \mrm{D}_B \, \mrm{L} f^* \, \mrm{D}_A$.
\end{dfn}

Let 
$\psi^{\mrm{tau}}_f : 
f^! R_A = \mrm{D}_B \, \mrm{L} f^* \, \mrm{D}_A \, R_A \iso R_B$
be the isomorphism in $\msf{D}(\cat{Mod} B)$ determined by the 
standard isomorphisms 
$A \cong \mrm{D}_A R_A$,
$B \cong B \otimes^{\mrm{L}}_{A} A$ and 
$R_B \cong \mrm{D}_B B$.

\begin{thm} \label{thm2.10}
Let $\K$ be a finite dimensional regular noetherian ring.
\begin{enumerate}
\item Given two homomorphisms $A \xar{f^*} B \xar{g^*} C$
between essentially finite type $\K$-algebras, 
there is an isomorphism 
\[ \phi_{f, g} : (f \circ g)^! \iso g^! \, f^! \]
of functors 
$\msf{D}^{+}_{\mrm{f}}(\cat{Mod} A) 
\to \msf{D}^{+}_{\mrm{f}}(\cat{Mod} C)$. 
%
\item For three homomorphisms
$A \xar{f^*} B \xar{g^*} C \xar{h^*} D$, the 
isomorphisms $\phi_{-,-}$ satisfy the compatibility condition 
\[ \phi_{g, h} \circ \phi_{f, g \circ h}  
 = \phi_{f, g} \circ \phi_{f \circ g, h} 
 : (f \circ g \circ h)^! \iso h^! g^! f^! . \]
%
\item For a finite homomorphism
$f^* : A \to B$ there is an isomorphism 
$\psi_f^{\flat} : f^{\flat} \iso f^!$ of functors 
$\msf{D}^{+}_{\mrm{f}}(\cat{Mod} A) 
\to \msf{D}^{+}_{\mrm{f}}(\cat{Mod} B)$.
%
\item For an essentially smooth
 homomorphism $f^* : A \to B$ there is an isomorphism 
$\psi_f^{\sharp} : f^{\sharp} \iso f^!$
of functors 
$\msf{D}^{+}_{\mrm{f}}(\cat{Mod} A) 
\to \msf{D}^{+}_{\mrm{f}}(\cat{Mod} B)$.
%
\item In the situation of \tup{(1)} there is equality
\[ \psi^{\mrm{tau}}_{f \circ g} = 
\psi^{\mrm{tau}}_g \circ \psi^{\mrm{tau}}_f \circ \phi_{f, g; R_A} :
(f \circ g)^! R_A \to R_C . \]
In the situations of \tup{(3)} and \tup{(4)} the isomorphisms
$\psi^{\mrm{tau}}_f \circ \psi_{f; R_A}^{\flat} : 
f^{\flat} R_A \iso R_B$
and
$\psi^{\mrm{tau}}_f \circ \psi_{f; R_A}^{\sharp} : 
f^{\sharp} R_A \iso R_B$
respectively are rigid relative to $\K$.
\end{enumerate}
\end{thm}

In stating the theorem we were a bit sloppy with notation; for 
instance in part (5) we wrote 
``$\psi^{\mrm{tau}}_g \circ \psi^{\mrm{tau}}_f$'', whereas the 
correct expression is 
``$\psi^{\mrm{tau}}_g \circ g^!(\psi^{\mrm{tau}}_f)$''. This was 
done for the sake of legibility, and we presume the reader can 
fill in the omissions. 

\begin{proof}
(1) The adjunction isomorphism 
$\bsym{1}_{\msf{D}^+_{\mrm{f}}(\cat{Mod} B)} \iso
\mrm{D}_B \mrm{D}_B$, 
together with the obvious isomorphism
$C \iso C \otimes^{\mrm{L}}_{B} B$, 
give rise to functorial isomorphisms
\[ \begin{aligned}
& (f \circ g)^! M = 
\mrm{D}_C (C \otimes^{\mrm{L}}_{A} \mrm{D}_A M) 
\cong \mrm{D}_C (C \otimes^{\mrm{L}}_{B} B 
\otimes^{\mrm{L}}_{A} \mrm{D}_A M) \\
& \qquad 
\cong \mrm{D}_C \big( C \otimes^{\mrm{L}}_{B} \mrm{D}_B \mrm{D}_B
(B \otimes^{\mrm{L}}_{A} \mrm{D}_A M) \big) = 
g^! f^! M 
\end{aligned} \]
for $M \in \msf{D}^+_{\mrm{f}}(\cat{Mod} A)$. The composed 
isomorphism $(f \circ g)^! M \iso g^! f^! M$ is called  
$\phi_{f, g; M}$.

\medskip \noindent
(2) By definition 
\[ (f \circ g \circ h)^! M = 
\mrm{D}_D (D \otimes^{\mrm{L}}_{A} \mrm{D}_A M)  \]
and
\[ h^! g^! f^! M = 
\mrm{D}_D \Big( D \otimes^{\mrm{L}}_{C} \mrm{D}_C \mrm{D}_C
\big( C \otimes^{\mrm{L}}_{B} \mrm{D}_B \mrm{D}_B
(B \otimes^{\mrm{L}}_{A} \mrm{D}_A M) \big) \Big) . \] 
The two isomorphism 
$\phi_{g, h} \circ \phi_{f, g \circ h}$ and 
$\phi_{f, g} \circ \phi_{f \circ g, h}$
differ only by the order in which the adjunction isomorphisms
$\bsym{1}_{\msf{D}^+_{\mrm{f}}(\cat{Mod} B)} \cong
\mrm{D}_B \mrm{D}_B$
and
$\bsym{1}_{\msf{D}^+_{\mrm{f}}(\cat{Mod} C)} \cong
\mrm{D}_C \mrm{D}_C$ 
are applied, and correspondingly an isomorphism
$C \cong C \otimes^{\mrm{L}}_{B} B$ is replaced by
$D \cong D \otimes^{\mrm{L}}_{B} B$.
Due to standard identities the net effect is that 
$\phi_{g, h} \circ \phi_{f, g \circ h} =
\phi_{f, g} \circ \phi_{f \circ g, h}$.

\medskip \noindent
(3) Let $\chi : f^{\flat} R_A \iso R_B$ be the unique 
rigid isomorphism (see Proposition \ref{prop4.1} and Theorem 
\ref{thm2.3}). Since 
$f^{\flat} R_A = \mrm{RHom}_{A}(B, R_A) = \mrm{D}_A B$,
we may view $\chi$ as an isomorphism 
$\chi : \mrm{D}_A B \iso R_B$ in 
$\msf{D}^{+}_{\mrm{f}}(\cat{Mod} B)$.
Applying $\mrm{D}_A$ to it we obtain 
$\mrm{D}_A(\chi) : \mrm{D}_A R_B \iso \mrm{D}_A \mrm{D}_A B 
\cong B$.
Now for any $M \in \msf{D}^{+}_{\mrm{f}}(\cat{Mod} A)$
we have 
\[ f^! M = \mrm{D}_B (B \otimes^{\mrm{L}}_{A} \mrm{D}_A M) =
\mrm{RHom}_{B}(B \otimes^{\mrm{L}}_{A} \mrm{D}_A M, R_B) \cong
\mrm{RHom}_{A}(\mrm{D}_A M, R_B) . \]
Next, using $\mrm{D}_A(\chi)$ and
$\mrm{D}_A \mrm{D}_A M \cong M$, we arrive at isomorphisms
\[ \mrm{RHom}_{A}(\mrm{D}_A M, R_B) \cong
\mrm{RHom}_{A}(\mrm{D}_A R_B, \mrm{D}_A \mrm{D}_A M) \cong
\mrm{RHom}_{A}(B, M) = f^{\flat} M . \]
The composed isomorphism $f^{\flat} M \iso f^! M$ is 
$\psi_{f; M}^{\flat}$. 

\medskip \noindent
(4) By Proposition \ref{prop4.2} and Theorem \ref{thm2.3} there is 
a unique rigid isomorphism 
$\chi : f^{\sharp} R_A \iso R_B$. We may assume that 
$\Omega^1_{B / A}$ has constant rank $n$, so that
$f^{\sharp} M = \Omega^n_{B / A}[n] \otimes_A M$ for any
$M \in \msf{D}^{+}_{\mrm{f}}(\cat{Mod} A)$. 
In particular we have an isomorphism
$\chi : \Omega^n_{B / A}[n] \otimes_A R_A \iso R_B$.
Using $\chi$, Proposition \ref{prop2.4} and the adjunction
isomorphism $M \cong \mrm{D}_A \mrm{D}_A M$, we obtain
\[ f^! M \cong \mrm{RHom}_{A}(\mrm{D}_A M, R_B) \cong
\Omega^n_{B / A}[n] \otimes_A \mrm{RHom}_{A}(\mrm{D}_A M, R_A) 
\cong f^{\sharp} M . \]
The composed isomorphism $f^{\sharp} M \iso f^! M$
is called $\psi_{f; M}^{\sharp}$.

\medskip \noindent
(5) These assertions are immediate consequences of the 
construction of $\phi_{f,g}$, $\psi_{f}^{\flat}$ and
$\psi_{g}^{\sharp}$.
\end{proof}

The notion of $2$-functor between categories is explained in 
\cite[Section 5.15]{Ha}. Let $\cat{EFTAlg} / \K$ be
the category of essentially finite type $\K$-algebras, and let
$\cat{Cat}$ be the category of all categories. Due to part (2) of 
the theorem we have:

\begin{cor}
The isomorphisms $\phi_{-, -}$ in part \tup{(1)} of the theorem make 
$f^* \mapsto f^!$ the $1$-component of a $2$-functor 
$\cat{EFTAlg} / \K \to \cat{Cat}$, whose $0$-component is 
$A \mapsto \msf{D}^{+}_{\mrm{f}}(\cat{Mod} A)$. 
\end{cor}

The last result in this section explains the dependence of the 
twisted inverse image $2$-functor
$f \mapsto f^!$ on the base ring $\K$. Assume $\K'$ 
is an essentially finite type $\K$-algebra that's regular (but 
maybe not smooth over $\K$). Just like for $\K$, any essentially 
finite type $\K'$-algebra $A$ has a rigid 
dualizing complex relative to $\K'$, which we denote by
$(R'_A, \rho'_A)$. For any homomorphism $f^* : A \to B$
there is a corresponding functor 
${f^!}' : \msf{D}^{+}_{\mrm{f}}(\cat{Mod} A) \to
\msf{D}^{+}_{\mrm{f}}(\cat{Mod} B)$,
constructed using $R'_A$ and $R'_B$. 
Let $(R_{\K'}, \rho_{\K'})$ 
be the rigid dualizing complex of $\K'$ relative to $\K$. 

\begin{prop} \label{prop4.5}
Let $A$ be an essentially finite type $\K'$-algebra. Then 
$R_{\K'} \otimes^{\mrm{L}}_{\K'} R'_A$
is a dualizing complex over $A$, and it has an induced 
is a rigidifying isomorphism relative to $\K$. Hence 
there is a unique isomorphism 
$R_{\K'} \otimes^{\mrm{L}}_{\K'} R'_A \cong R_A$
in $\msf{D}(\cat{Mod} A)_{\mrm{rig} / \K}$.
\end{prop}

\begin{proof}
We might as well assume $\opn{Spec} \K'$ is connected.
Since $\K'$ is regular, one has
$R_{\K'} \cong L[n]$
for some invertible $\K'$-module $L$ and some integer $n$.
Therefore $R_{\K'} \otimes^{\mrm{L}}_{\K'} R'_A$ is a dualizing 
complex over $A$. According to Theorem \ref{thm2.5} the complex
$R_{\K'} \otimes^{\mrm{L}}_{\K'} R'_A$ has an induced rigidifying 
isomorphism $\rho_{\K'} \otimes \rho'_A$. Now use Theorem 
\ref{thm2.3}.
\end{proof}

\begin{exa}
Take $\K := \mbb{Z}$ and $\K' := \mbb{F}_p = \mbb{Z} / (p)$
for some prime number $p$. Then 
$R_{\K'} = \K'[-1]$, and for any $A \in \cat{EFTAlg} / \K'$
we have $R'_A \cong R_A[1]$.
\end{exa}

\begin{rem}
The assumption that the base ring $\K$ has finite global dimension 
seems superfluous. It is needed for technical reasons 
(bounded complexes have finite flat dimension), yet we don't 
know how to remove it. However, it seems necessary for $\K$ to be 
Gorenstein -- see next example. Also finiteness is important, as 
Example \ref{exa5.2} shows.
\end{rem}

\begin{exa} \label{exa5.1}
Consider a field $\k$,
and let $\K = A := \k[t_1, t_2]/(t_1^2, t_2^2, t_1 t_2)$. 
Then $A$ does  not have a rigid dualizing complex relative to $\K$. 
The reason is that any dualizing complex over the artinian
local ring $A$ 
must be $R \cong A^*[n]$ for some integer $n$, where 
$A^* := \opn{Hom}_{\k}(A, \k)$. Now
$\opn{Sq}_{A / \K} R \cong R \otimes^{\mrm{L}}_{\K} R$, which has 
infinitely many nonzero cohomology modules. So there can be no 
isomorphism $R \cong \opn{Sq}_{A / \K} R$.
\end{exa}

\begin{exa} \label{exa5.2}
Take any field $\K$, and let $A := \K(t_1, t_2, \ldots)$,
the field of rational functions in countably many variables. So 
$A$ is a noetherian $\K$ algebra, but it is not of essentially 
finite type. Clearly $A$ has a dualizing complex (e.g.\ 
$R := A$), but as shown in \cite[Example 3.13]{YZ1}, there does not 
exist a rigid dualizing complex over $A$ relative to $\K$. 
\end{exa}

\begin{rem}
The paper \cite{SdS} by de Salas uses an idea similar to Van den 
Bergh's rigidity to define residues on local rings. However the 
results there are pretty limited. Lipman (unpublished notes) has 
an approach to duality using the fundamental class of the 
diagonal, which is close in spirit to the idea of rigidity; cf.\ 
Remark \ref{rem7.1}.
\end{rem}





%\newpage
%% ** section 5 **
\section{The Residue Symbol}
\label{sec5}

In this section we apply our methods to the residue symbol of 
\cite[Section III.9]{RD}. Throughout $\K$ is a finite dimensional 
regular noetherian ring. All rings are commutative 
essentially finite type $\K$-algebras, and all homomorphisms are 
over $\K$.

\begin{dfn} \label{dfn5.5}
Suppose $f^* : A \to B$ is an essentially smooth homomorphism of 
relative dimension $n$,
$i^* : B \to \bar{B}$ is a finite homomorphism, and the 
composition
$g^* := i^* \circ f^* : A \to \bar{B}$
is finite and flat. Let
$M \in \msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} A)$.
According to Theorem \ref{thm2.10} there are isomorphisms
$\psi^{\flat}_i \circ \psi^{\sharp}_f : 
i^{\flat} f^{\sharp} M \iso i^! f^! M$,
$\psi^{\flat}_g : g^{\flat} M \iso g^! M$
and
$\phi_{f, i} : g^{!} M \iso i^! f^! M$
in $\msf{D}(\cat{Mod} \bar{B})$. 
The isomorphism
\[ \zeta_M :=  (\psi^{\flat}_i \circ \psi^{\sharp}_f)^{-1}
\circ \phi_{f, i} \circ \psi^{\flat}_g
: g^{\flat} M \iso i^{\flat}  f^{\sharp} M  \]
in $\msf{D}(\cat{Mod} \bar{B})$ is 
called the {\em residue isomorphism}.
\end{dfn}

If $M$ is a single $A$-module then we have
$g^{\flat} M \cong \mrm{H}^0 g^{\flat} M$,
and there are $\bar{B}$-linear isomorphisms
\[ \mrm{H}^0(\zeta_M) : \opn{Hom}_A(\bar{B}, M) =
\mrm{H}^0 g^{\flat} M \iso
\mrm{H}^0 i^{\flat} f^{\sharp} M =
\opn{Ext}^n_{B}(\bar{B}, \Omega^n_{B / A} \otimes_A M) . \]

Recall that $A$ has the tautological rigidifying isomorphism
$\rho_{\mrm{tau}}$, so we have an object
$(A, \rho_{\mrm{tau}}) \in \msf{D}(\cat{Mod} A)_{\mrm{rig} / A}$.
By Theorems \ref{thm2.2} and \ref{thm2.4} we get rigid complexes
$g^{\flat} (A, \rho_{\mrm{tau}})$
and
$i^{\flat} f^{\sharp} (A, \rho_{\mrm{tau}})$
in $\msf{D}(\cat{Mod} \bar{B})_{\mrm{rig} / A}$.

\begin{thm} \label{thm2.11}
In the situation of Definition \tup{\ref{dfn5.5}}, 
the residue isomorphism $\zeta_A$ is the unique 
rigid isomorphism 
$g^{\flat} (A, \rho_{\mrm{tau}}) \iso i^{\flat} f^{\sharp} 
(A, \rho_{\mrm{tau}})$
over $\bar{B}$ relative to $A$.
\end{thm}

The proof is after this lemma.

\begin{lem} \label{lem5.6}
In the setup of the theorem, 
for any $M \in \msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} A)$
the diagram
\begin{equation} \label{eqn5.5}
\UseTips \xymatrix @C=4ex @R=4ex {
g^{\flat} M
\ar[r]^(0.4){\cong}
\ar[d]_{\zeta_M}
& M \otimes^{\mrm{L}}_{A} g^{\flat} A
\ar[d]^{\bsym{1}_M \otimes \zeta_A} \\
i^{\flat} f^{\sharp} M
\ar[r]^(0.4){\cong}
& M \otimes^{\mrm{L}}_{A} i^{\flat} f^{\sharp} A }
\end{equation}
with horizontal arrows coming from Theorems 
\tup{\ref{thm2.2}(4)} and \tup{\ref{thm2.4}(2)}, is commutative.
\end{lem}

\begin{proof}
Going over the proof of Theorem \ref{thm2.10} we see that there are 
similar commutative diagrams with pairs of vertical arrows
$(\psi^{\flat}_{g; M}, \bsym{1}_M \otimes \psi^{\flat}_{g; A})$,
$(\psi^{\sharp}_{f; M}, \bsym{1}_M \otimes \psi^{\sharp}_{f; A})$,
$(\psi^{\flat}_{i; f^{\sharp} M}, 
\bsym{1}_{f^{\sharp} M} \otimes \psi^{\flat}_{i; f^{\sharp} A})$
and
$(\phi_{f, i; M}, \bsym{1}_{M} \otimes \phi_{f, i; A})$.
\end{proof}

\begin{proof}[Proof of Theorem \tup{\ref{thm2.11}}]
Since 
$\opn{Hom}_{\msf{D}(\cat{Mod} \bar{B})}(g^{\flat} A, 
i^{\flat} f^{\sharp} A)$
is a free $\bar{B}$-module with basis $\zeta_A$, 
it follows that 
$u \zeta_A : g^{\flat} A \to i^{\flat} f^{\sharp} A$ 
is a rigid isomorphism for a unique 
$u \in \bar{B}^{\times}$. We will show that $u = 1$. 

Since $g^{\flat} \cong \opn{Hom}_{A}(\bar{B}, -)$
there are isomorphisms
$R_A \otimes^{\mrm{L}}_{A} g^{\flat} A \cong 
g^{\flat} R_A \cong R_{\bar{B}}$. 
We also know that 
$i^{\flat} f^{\sharp} A \cong i^! f^! A \cong
g^! A \cong g^{\flat} A$,
implying that 
$R_A \otimes^{\mrm{L}}_{A} i^{\flat} f^{\sharp}  A \cong 
R_{\bar{B}}$. 
Because 
$R_{\bar{B}} \cong \opn{Sq}_{\bar{B} / \K} R_{\bar{B}}$
we see that Theorem \ref{thm2.5}(2) applies, with its condition 
(iii). Thus we obtain a rigid isomorphism 
\[ \bsym{1}_{R_A} \otimes u \zeta_A : 
R_A \otimes^{\mrm{L}}_{A} g^{\flat} A \iso
R_A \otimes^{\mrm{L}}_{A} i^{\flat} f^{\sharp} A \]
over $\bar{B}$ relative to $\K$. Now the commutativity of the 
diagram (\ref{eqn5.5}), with $M := R_A$, says that 
$\zeta_{R_A} = \bsym{1}_{R_A} \otimes \zeta_A$. 
Therefore 
$u \zeta_{R_A} = \bsym{1}_{R_A} \otimes u \zeta_A$, 
implying that 
$u \zeta_{R_A} : g^{\flat} R_A \iso i^{\flat} f^{\sharp} R_A$
is a rigid isomorphism relative to $\K$.
However, by Theorem \ref{thm2.10}, the isomorphism $\zeta_{R_A}$ 
is itself rigid relative to $\K$. 
The uniqueness in Theorem \ref{thm2.3} implies that $u = 1$. 
\end{proof}

\begin{dfn} \label{dfn5.4}
The {\em residue map} 
\[ \opn{Res}_{B / A} : \opn{Ext}^n_{B}(\bar{B}, \Omega^n_{B / A})
\to A \]
is defined to be 
$\opn{Res}_{B / A} := \opn{Tr}^{\flat}_{g; A} \circ \,
\zeta_A^{-1}$,
where $\zeta_A : g^{\flat} A \iso i^{\flat}  f^{\sharp} A$ 
is the residue isomorphism, and 
$\opn{Tr}^{\flat}_{g; A} : g^{\flat} A \to A$
is ``evaluation at $1$''.
\end{dfn}

Consider the object
\[ \opn{Ext}^n_{B}(\bar{B}, \Omega^n_{B / A}) 
= i^{\flat} f^{\sharp} A \in 
\msf{D}(\cat{Mod} \bar{B})_{\mrm{rig} / A} . \]
The rigidifying isomorphism is
$i^{\flat} f^{\sharp} (\rho_{\mrm{tau}})$.
In this notation, Theorem \ref{thm2.11} says that
$\zeta_A :  g^{\flat} A \iso 
\opn{Ext}^n_{B}(\bar{B}, \Omega^n_{B / A})$
is a rigid isomorphism relative to $A$.
Using Corollary \ref{cor2.3} we obtain:

\begin{cor} \label{cor3.1}
The residue map $\opn{Res}_{B / A}$ 
is the unique nondegenerate rigid 
trace-like morphism 
$\opn{Ext}^n_{B}(\bar{B}, \Omega^n_{B / A})  \to A$
relative to $A$.
\end{cor}

The corollary shows that (as would be expected) the residue map 
is independent of the base ring $\K$ and of the twisted inverse 
image functor $f \mapsto f^!$ associated to it. Indeed, the only
data needed to characterize $\opn{Res}_{B / A}$ is 
the two ring homomorphisms $A \to B \to \bar{B}$.

We shall now look at a special case: 
$f^* : A \to B$ is a smooth homomorphism of relative 
dimension $n$, and $\bsym{b} = (b_1, \ldots, b_n)$ 
is a sequence of elements in $B$ such that the algebra
$\bar{B} := B / (\bsym{b})$ is finite over $A$. It follows that 
$\bsym{b}$ is a regular sequence, and $\bar{B}$ is flat over $A$;
cf.\ \cite[Chapitre IV, Section 11]{EGA}.
Let $i^* : B \to \bar{B}$ and 
$g^* : A \to \bar{B}$ be the corresponding homomorphisms. 



Let $\mbf{K}(B, \bsym{b})$ be the Koszul complex 
associated to the sequence $\bsym{b}$. Recall that for any $i$
the Koszul complex $\mbf{K}(B, b_i)$ is the free graded $B$-module
$B e_i \oplus B$, with $\opn{deg}(e_i) := -1$ and differential
$\mrm{d}(e_i) := b_i$. The total Koszul complex is 
$\mbf{K}(B, \bsym{b}) :=
\mbf{K}(B, b_1) \otimes_B \cdots \otimes_B \mbf{K}(B, b_n)$.
Since $\bsym{b}$ is a regular sequence we get a quasi-isomorphism 
$\mbf{K}(B, \bsym{b}) \to \bar{B}$, which 
is a free resolution over $B$, and  
\[ \opn{Ext}^n_{B}(\bar{B}, \Omega^n_{B / A})
= \mrm{H}^0 \opn{Hom}_{B}
\bigl( \mbf{K}(B, \bsym{b}), \Omega^n_{B / A}[n] \bigr) . \]

\begin{dfn} \label{dfn5.6}
Given a differential form
$\beta \in \Omega^n_{B / A}$, the {\em generalized fraction}
\[ \gfrac{\beta}{\bsym{b}} \in 
\opn{Ext}^n_{B}(\bar{B}, \Omega^n_{B / A}) \]
is the cohomology class of the homomorphism
$\mbf{K}(B, \bsym{b})^{-n} \to \Omega^n_{B / A}$,
$e_{1} \wedge \cdots \wedge e_{n} \mapsto \beta$.
\end{dfn}

Combining the Definitions \ref{dfn5.6} and \ref{dfn5.4} we obtain
the {\em residue symbol}
$\opn{Res}_{B / A} \gfrac{\beta}{\bsym{b}} \in A$.
In view of Proposition \ref{prop7.2} (see also Remark 
\ref{rem7.1}) this definition 
of the residue symbol coincides (perhaps up to sign) 
with the one in \cite[Section III.9]{RD}. 

For the remainder of this section we will write 
$\rho_A$ for the tautological rigidifying isomorphism 
$\rho_{\mrm{tau}}$ of $A$ relative to itself, and likewise for 
other rings. 

Let's define
$E := \opn{Ext}^n_B(\bar{B}, \Omega^n_{B / A})$.
This $\bar{B}$-module has a rigidifying isomorphism
$\rho_E := i^{\flat} f^{\sharp} (\rho_{A}) :
E \iso \opn{Sq}_{\bar{B} / A} E$
relative to $A$. 
Since $A \to \bar{B}$ is flat we have
\[ \opn{Sq}_{\bar{B} / A} E = \opn{Hom}_{\bar{B} \otimes_A
\bar{B}}(\bar{B}, E \otimes_A E) , \]
which is a $\bar{B} \otimes_A \bar{B}$ -submodule of 
$E \otimes_A E$. We are going to find an explicit formula for the 
homomorphism $\rho_E : E \to E \otimes_A E$
in a special case (see Proposition \ref{prop5.5}).

In Lemma \ref{lem5.7} and Proposition \ref{prop5.8} 
below we will look at the following setup. The 
$\K$-algebras $A, B, \bar{B}$ are as before; $\K'$ is another 
regular noetherian ring of finite Krull dimension; $\K \to \K'$
is a ring homomorphism (without any finiteness assumptions); 
$A', B'$ and $\bar{B}'$ are essentially finite type $\K'$-algebras; 
and there is a commutative diagram of ring homomorphisms
\[ \UseTips  \xymatrix @=4ex {
\K \ar[r] \ar[d]
& A \ar[r]^{f^*} \ar[d]_{h^*} 
& B \ar[r]^{i^*} \ar[d] & \bar{B} \ar[d] \\
\K' \ar[r] 
& A' \ar[r]^{{f'}^*}  
& B' \ar[r]^{{i'}^*}  & \bar{B}' .
} \] 
We assume that 
$B' \cong B \otimes_A A'$ and $\bar{B}' \cong \bar{B} \otimes_A A'$.
Let $E' := \opn{Ext}^n_{B'}(\bar{B}', \Omega^n_{B' / A'})$.
There is an induced isomorphism
$E' \cong E \otimes_A A'$ (cf.\ Proposition \ref{prop2.4} 
with condition (iii.a)), 
and we denote by $\eta : E \to E'$ the corresponding 
$\bar{B}$-linear homomorphism. Let $\rho_{A'}$ be the tautological 
rigidifying isomorphism of $A'$ relative to itself, and let
$\rho_{E'} := {i'}^{\flat} {f'}^{\sharp}(\rho_{A'})$ 
be the rigidifying isomorphism of $E'$ over $\bar{B}'$ 
relative to $A'$. 

\begin{lem} \label{lem5.7}
\[ (\eta \otimes \eta) \circ \rho_E = \rho_{E'} \circ \eta 
: E \to E' \otimes_{A'} E' , \]
i.e.\ $\eta$ is a rigid base change morphism relative to $A$.
\end{lem}

\begin{proof}
 From the proof of Theorem \ref{thm2.4} we see that the canonical 
morphism
\[ \eta_0 : f^{\sharp} A = \Omega^n_{B / A}[n] \to 
\Omega^n_{B' / A'}[n] = {f'}^{\sharp} A' \]
satisfies
\[ (\eta_0 \otimes \eta_0) \circ f^{\sharp}(\rho_{A}) = 
f^{\sharp}(\rho_{A'}) \circ \eta_0 . \]
So $\eta_0$ is rigid base change morphism relative to $A$.
Similarly, the proof of Theorem \ref{thm2.2} shows that 
the canonical morphism 
\[ \eta_1 : i^{\flat} B = \opn{Ext}^n_{B}(\bar{B}, B)[-n] \to 
\opn{Ext}^n_{B'}(\bar{B}', B')[-n] = {i'}^{\flat} B' \]
satisfies 
\[ (\eta_1 \otimes \eta_1) \circ i^{\flat}(\rho_{B}) = 
{i'}^{\flat}(\rho_{B'}) \circ \eta_1 . \]
This says that $\eta_1$ is a 
rigid base change morphism relative to $B$.
Combine this with Theorem \ref{thm2.2}(4).
\end{proof}

\begin{prop} \label{prop5.8}  
In the situation described above one has
\[ h^* \circ \opn{Res}_{B / A} =
\opn{Res}_{B' / A'} \circ \, \eta : E \to A' . \]
\end{prop}

\begin{proof}
Since $\opn{Hom}_A(E, A')$ is a free $\bar{B}'$-module of rank 
$1$, we see that 
$\opn{Res}' \circ \, \eta = u h^* \circ \opn{Res}$
for a unique invertible element $u \in \bar{B}'$. Here
$\opn{Res} := \opn{Res}_{B / A}$ and
$\opn{Res}' := \opn{Res}_{B' / A'}$. So the rear square in the 
diagram below commutes up to a factor of $u$.
Because $\opn{Res}$ and $\opn{Res}'$ 
are rigid morphisms, the 
two horizontal rectangles are commutative. By Lemma \ref{lem5.7} 
the left-facing vertical rectangle is commutative, and trivially 
the right-facing vertical rectangle is commutative. Finally the 
front square commutes up to a factor of $u^2$. We conclude that 
$u = 1$.
\[ \UseTips  \xymatrix @=9ex {
E \ar[r]^{\opn{Res}} \ar[d]_{\eta} 
\ar[drrr]^(0.7){\rho_E}
& A \ar[d]|(0.33)\hole^(0.6){h^*}
\ar[drrr]*+++{\hole}^{=}
\\
E' \ar[r]^{\opn{Res}'} \ar[drrr]^(0.5){\rho_{E'}}
& A' \ar[drrr]*+++{\hole}|(0.62)\hole^(0.3){=}
& & \opn{Sq}_{\bar{B} / A} E 
\ar[r]_{\hspace{3.5ex} \opn{Res} \otimes \opn{Res}}
\ar[d]^(0.4){\eta \otimes \eta}
& A \ar[d]^{h^*} \\
& & & \opn{Sq}_{\bar{B}' / A'} E'
\ar[r]_{\hspace{3ex} \opn{Res}' \otimes \opn{Res}'}
& A'
} \]
\end{proof}

\begin{lem} \label{lem5.9}
Assume $\K = A = \mbb{Z}$; $B = \mbb{Z}[t]$, the polynomial 
algebra in one variable;  and $b = t^{m+1}$ for some $m \geq 0$. Then
\[ \rho_E (\gfrac{\d t}{t^{m+1}}) = 
\epsilon \, \sum_{j = 0}^m \bigl( \gfrac{t^j \, \d t}{t^{m+1}}
\otimes \gfrac{t^{m - j} \, \d t}{t^{m+1}} \bigr) \]
for some $\epsilon \in \{ 1, -1 \}$.
\end{lem}

\begin{proof}
The $A$-module $E$ is free of rank $m + 1$ with basis 
$\gfrac{\d t}{t^{m+1}}, \ldots, 
\gfrac{t^m \, \d t}{t^{m+1}}$. 
Therefore
\begin{equation} \label{eqn5.6}
\rho_E (\gfrac{\d t}{t^{m+1}}) =
\sum_{j, k = 0}^m a_{j, k} \bigl( \gfrac{t^j \, \d t}{t^{m+1}}
\otimes \gfrac{t^{k} \, \d t}{t^{m+1}} \bigr)
\in E \otimes_A E 
\end{equation}
for some $a_{j, k} \in A$.

Define $A_{\mbb{Q}} := \mbb{Q}$, 
$B_{\mbb{Q}} := \mbb{Q}[t]$, 
$\bar{B}_{\mbb{Q}} := \mbb{Q}[t] / (t^{m + 1})$
and 
$E_{\mbb{Q}} := \opn{Ext}^1_{B_{\mbb{Q}}}
(\bar{B}_{\mbb{Q}}, \Omega^1_{B_{\mbb{Q}} / A_{\mbb{Q}}})$.
So $E_{\mbb{Q}} \cong E \otimes_A A_{\mbb{Q}}$, 
and by Lemma \ref{lem5.7} 
the rigidifying isomorphism $\rho_{E_{\mbb{Q}}}$ also 
satisfies equation (\ref{eqn5.6}).
Take any $\lambda \in \mbb{Q} - \{ 0, 1, -1 \}$, and consider the 
automorphism $h^* : B_{\mbb{Q}} \to B_{\mbb{Q}}$,
$t \mapsto \lambda t$. Let $\eta : E \to E$ be the corresponding 
homomorphism. Again by Lemma \ref{lem5.7} we see that 
\[ (\rho_E \circ \eta) (\gfrac{\d t}{t^{m+1}}) =
\sum_{j, k = 0}^m a_{j, k}\, 
\bigl( \eta(\gfrac{t^j \, \d t}{t^{m+1}})
\otimes \eta(\gfrac{t^{k} \, \d t}{t^{m+1}}) \bigr) . \]
Since
$\eta(\gfrac{t^{j} \, \d t}{t^{m+1}}) = 
\lambda^{j - m} \gfrac{t^{j} \, \d t}{t^{m+1}}$,
we conclude that 
$a_{j, k} = 0$ unless $j + k = m$. 

Let $\bar{t}$ denote the class of $t$ in $\bar{B}$. So 
$1 \otimes \bar{t} - \bar{t} \otimes 1 \in
\opn{Ker}(\bar{B} \otimes_A \bar{B} \to \bar{B})$,
and therefore 
\[ (1 \otimes \bar{t} - \bar{t} \otimes 1) \cdot 
\rho_E (\gfrac{\d t}{t^{m+1}}) = 0 . \]
Now 
$\bar{t} \gfrac{t^j \, \d t}{t^{m+1}} = 
\gfrac{t^{j+1} \, \d t}{t^{m+1}}$.
We conclude that 
$a_{0, m} = a_{1, m-1} = \cdots = a_{m, 0}$, 
which we denote by $\epsilon$. 
Since
\[ \sum_{j = 0}^m \bigl( \gfrac{t^j \, \d t}{t^{m+1}}
\otimes \gfrac{t^{m - j} \, \d t}{t^{m+1}} \bigr) \in 
\opn{Hom}_{\bar{B} \otimes_A \bar{B}}(\bar{B}, E \otimes_A E)
= \opn{Sq}_{\bar{B}/A} E , \]
yet 
$\rho_E (\gfrac{\d t}{t^{m+1}})$
is part of a basis of the $A$-module $\opn{Sq}_{\bar{B}/A} E$,
it follows that $\epsilon$ must be invertible. Thus
$\epsilon \in \{ 1, -1 \}$.
\end{proof}

\begin{prop} \label{prop5.5}
Let $A$ be any essentially finite type $\K$-algebra, 
$B := A[t]$ and $\bar{B} := B / (t^{m+1})$. Then
\[ \opn{Res}_{B / A} \gfrac{t^j \, \d t}{t^{m+1}} = 
\begin{cases}
\epsilon & \textup{if } j = m \\
0 & \textup{otherwise} .
\end{cases}
\]
Here $\epsilon \in \{ 1, -1 \}$ is some universal constant.
\end{prop}

\begin{proof}
According to Proposition \ref{prop5.8}  
we can assume that $\K = A = \mbb{Z}$. 
Let $\epsilon$ be the number occurring in Lemma \ref{lem5.9}.
Define an $A$-linear homomorphism
$\phi : E \to A$ by
$\phi( \gfrac{t^j \, \d t}{t^{m+1}} ) := \epsilon$
if $j = m$, and $0$ otherwise. We have to prove that 
$\phi = \opn{Res}_{B / A}$. 
In view of Corollary \ref{cor3.1} it suffices to show that $\phi$
is a rigid morphism relative to $A$.

Thus we have to verify that
\[ (\phi \otimes \phi) \circ \rho_E = \rho_A \circ \phi :
E \to A . \]
By Lemma \ref{lem5.9}, for any $j \in \{ 0, \ldots, m \}$ we 
have 
\[ \rho_E(\gfrac{t^j \, \d t}{t^{m+1}}) = 
t^j \rho_E(\gfrac{\d t}{t^{m+1}}) = 
\epsilon \sum_{k = 0}^m 
\bigl( \gfrac{t^{j + k} \, \d t}{t^{m+1}} \otimes
\gfrac{t^{m - k} \, \d t}{t^{m+1}} \bigr) . \]
Thus
\[ ((\phi \otimes \phi) \circ \rho_E)
(\gfrac{t^j \, \d t}{t^{m+1}}) = 
\epsilon \cdot \phi(\gfrac{t^j \, \d t}{t^{m+1}}) \cdot
\phi(\gfrac{t^m \, \d t}{t^{m+1}}) = 
\begin{cases}
\epsilon^3 & \text{if } j = m \\
0 & \text{otherwise} .
\end{cases}
\]
On the other hand $\rho_A$ is the identity, and 
\[ \phi(\gfrac{t^j \, \d t}{t^{m+1}})  = 
\begin{cases}
\epsilon & \text{if } j = m \\
0 & \text{otherwise} .
\end{cases}
\]
But $\epsilon^3 = \epsilon$.
\end{proof}

\begin{rem}
The actual value of $\epsilon$ is not so easy to determine. Since we 
will not need it, we did not do the calculation. 
\end{rem}






%\newpage
%% ** section 6 **
\section{Gluing Rigid Dualizing Complexes on Schemes}
\label{sec6}

In the beginning of this section $X$ is some finite 
dimensional noetherian scheme. A {\em dimension function} on $X$ 
is a function $\opn{dim} : X \to \mbb{Z}$ such that 
$\opn{dim}(y) = \opn{dim}(x) - 1$
whenever $y$ is an immediate specialization of $x$. Thus
$- \opn{dim}$ is a codimension function, in the sense of 
\cite[Section V.7]{RD}.
Note that any closed subset $Z \subset X$ has a dimension, namely
$\opn{dim} Z := \opn{sup} \{ \opn{dim}(x) \mid x \in Z \}$.

Let $\opn{dim}$ be a dimension function on $X$. This 
determines a Cousin functor 
$\mrm{E} : \linebreak \msf{D}^+(\cat{Mod} \mcal{O}_X) \to
\msf{C}(\cat{Mod} \mcal{O}_X)$, 
the latter being the category of complexes of 
$\mcal{O}_X$-modules. Let us recall the construction of the Cousin 
functor from \cite[Chapter IV]{RD}. 
Given an $\mcal{O}_X$-module $\mcal{M}$, denote by 
$F_i \mcal{M}$ the subsheaf of sections whose support
has dimension $\leq i$. 
Now let $\mcal{M} \in \msf{D}^{+}(\cat{Mod} \mcal{O}_X)$,
and choose a bounded below injective resolution
$\mcal{M} \to \mcal{J}$. Let $\{ E_r^{p,q} \}$ be the spectral 
sequence associated to the filtered complex 
$\{ F_i \mcal{J} \}$. The Cousin complex 
$\mrm{E} \mcal{M}$ is the row $q = 0$ in the 
page $r=1$ of this spectral sequence. According to 
\cite[Section IV.2]{RD}, for any $p$ one has
$(\mrm{E} \mcal{M})^p \cong \boplus_{\opn{dim}(x) = -p}
\mrm{H}^p_{x} \mcal{M}$,
where we view $\mrm{H}^p_{x} \mcal{M}$ as a constant sheaf 
supported on the closed set $\overline{\{ x \}}$.
If 
$\mcal{M} \in \msf{D}^{\mrm{b}}_{\mrm{qc}}(\cat{Mod} \mcal{O}_X)$
then each $\mrm{H}^p_{x} \mcal{M}$ is quasi-coherent, so
$\mrm{E} \mcal{M} \in \msf{C}^{+}(\cat{QCoh} \mcal{O}_X)$

\begin{dfn}
A complex 
$\mcal{M} \in \msf{D}^{\mrm{b}}(\cat{Mod} \mcal{O}_X)$
is called a {\em Cohen-Macaulay complex} (relative to the dimension
function $\opn{dim}$)  if 
$\mrm{H}^i_{x} \mcal{M} = 0$ for all $x$ and 
$i \neq \opn{dim}(x)$.
\end{dfn}

According to \cite[Proposition IV.2.6]{RD} or 
\cite[Theorem 2.11]{YZ2}, $\mcal{M}$ is a 
Cohen-Macau\-lay complex if and only 
if $\mcal{M} \cong \mrm{E} \mcal{M}$ in 
$\msf{D}(\cat{Mod} \mcal{O}_X)$.
Let us denote by 
$\msf{D}^{\mrm{b}}_{\mrm{qc}}(\cat{Mod} \mcal{O}_X)_{\mrm{CM}}$
the full subcategory of 
$\msf{D}^{\mrm{b}}_{\mrm{qc}}(\cat{Mod} \mcal{O}_X)$
consisting of Cohen-Macaulay complexes.

Recall that a quasi-coherent $\mcal{O}_{X}$-module $\mcal{J}$ is 
injective as object of the category \linebreak
$\cat{QCoh} \mcal{O}_{X}$
iff it is injective in the bigger category 
$\cat{Mod} \mcal{O}_{X}$. Moreover, for such an injective 
quasi-coherent module there is an isomorphism
$\mcal{J} \cong \boplus_{x \in X} \mcal{J}(x)^{(\mu_x)}$,
where $\mcal{J}(x)$ denotes an injective hull of the residue field 
$\bsym{k}(x)$, considered as a quasi-coherent sheaf; $\mu_x$ is a 
cardinal number; and $\mcal{J}(x)^{(\mu_x)}$ denotes the direct 
sum of $\mu_x$ copies of $\mcal{J}(x)$.
See \cite[Section II.7]{RD}.

A bounded below complex $\mcal{J}$ of injective quasi-coherent
$\mcal{O}_{X}$-modules is called a {\em minimal injective
quasi-coherent complex} if for any $q$ the module of cocycles
$\opn{Ker}(\mcal{J}^q \to \mcal{J}^{q+1})$ is an essential 
submodule of $\mcal{J}^q$ in the category 
$\cat{QCoh} \mcal{O}_{X}$. Given a complex
$\mcal{N} \in \msf{D}^{+}_{\mrm{qc}}(\cat{Mod} \mcal{O}_X)$,
a {\em minimal injective quasi-coherent resolution} 
of $\mcal{N}$ is a quasi-isomorphism 
$\mcal{N} \to \mcal{J}$, with $\mcal{J}$ a  minimal injective
quasi-coherent complex.

\begin{lem} \label{lem6.4}
Let 
$\mcal{N} \in \msf{D}^{+}_{\mrm{qc}}(\cat{Mod} \mcal{O}_X)$.
\begin{enumerate}
\item There exists a minimal injective quasi-coherent resolution
$\mcal{N} \to \mcal{J}$. Moreover $\mcal{J}$ is unique up to 
isomorphism.
\item For any $q \in \mbb{Z}$ and any $x \in X$ let $\mu_{x,q}$ 
be the multiplicity of $\mcal{J}(x)$ in $\mcal{J}^q$. Then
\[ \mu_{x,q} = \opn{rank}_{\bsym{k}(x)}
\opn{Ext}^q_{\mcal{O}_{X,x}}(\bsym{k}(x), \mcal{N}_x), \]
where $\mcal{N}_x$ is the stalk at $x$.
\item If $\mcal{N}$ is a Cohen-Macaulay complex then
$\mu_{x,q} = 0$ whenever $q < - \opn{dim}(x)$.
\end{enumerate}
\end{lem}

\begin{proof}
(1) By \cite[Corollary II.7.19]{RD} we may assume that
$\mcal{N} \in \msf{D}^{+}(\cat{QCoh} \mcal{O}_X)$.
Now we may apply \cite[Lemma 4.2]{Ye1}.

\medskip \noindent
(2) The complex $\mcal{J}_x$ is a minimal injective resolution of
$\mcal{N}_x$ over the local ring $\mcal{O}_{X,x}$. Now use 
\cite[Lemma 4.12(2)]{YZ2}. 

\medskip \noindent
(3) Note that
\[ \opn{Ext}^q_{\mcal{O}_{X,x}}(\bsym{k}(x), \mcal{N}_x) \cong
\opn{Ext}^q_{\mcal{O}_{X,x}}(\bsym{k}(x), 
\mrm{R} \Gamma_x \mcal{N}) . \]
The Cohen-Macaulay assumption says that the cohomology of
$\mrm{R} \Gamma_x \mcal{N}$ is concentrated in degree 
$-\opn{dim}(x)$.
\end{proof}

\begin{lem} \label{lem6.2}
Suppose 
$\mcal{M}, \mcal{N} \in 
\msf{D}^{\mrm{b}}_{\mrm{qc}}(\cat{Mod} \mcal{O}_X)_{\mrm{CM}}$.
Then the assignment 
\[ U \mapsto \mrm{Hom}_{\msf{D}(\cat{Mod} \mcal{O}_U)}
(\mcal{M}|_U, \mcal{N}|_U) \]
is a sheaf on $X$.
\end{lem}

\begin{proof}
As explained above there is an isomorphism 
$\phi : \mcal{M} \iso \mrm{E} \mcal{M}$ in 
$\msf{D}(\cat{Mod} \mcal{O}_X)$.
Choose a minimal injective quasi-coherent resolution
$\psi : \mcal{N} \to \mcal{J}$. 
By Lemma \ref{lem6.4}(3) the multiplicities of the complex 
$\mcal{J}$ satisfy 
$\mu_{x, q} = 0$ for all $q < -\opn{dim}(x)$.

For an open set $U \subset X$ consider the canonical 
homomorphism
\[ \lambda_U : \mrm{Hom}_{\msf{C}(\cat{Mod} \mcal{O}_U)}
(\mrm{E} \mcal{M}|_U, \mcal{J}|_U) \to
\mrm{Hom}_{\msf{D}(\cat{Mod} \mcal{O}_U)}
(\mrm{E} \mcal{M}|_U, \mcal{J}|_U) . \]
Since $\mcal{J}|_U$ is a bounded below complex of injective 
$\mcal{O}_U$-modules it follows that $\lambda_U$ is surjective. 
On the other hand, any local section of $(\mrm{E} \mcal{M})^q$
has support in dimension $\leq -q$, but there are no
nonzero local sections of $\mcal{J}^{q-1}$ with support in 
dimension $\leq -q$. It follows that
$\mrm{Hom}_{\msf{C}(\cat{Mod} \mcal{O}_U)}
(\mrm{E} \mcal{M}|_U, \mcal{J}|_U)^{-1} = 0$,
and so $\lambda_U$ is also injective. 

Now the isomorphisms
$\phi|_U : \mcal{M}|_U \iso \mrm{E} \mcal{M}|_U$ 
and
$\psi|_U : \mcal{N}|_U \iso \mcal{J}|_U$ 
in $\msf{D}(\cat{Mod} \mcal{O}_U)$
give rise to a bijection
\[ \mrm{Hom}_{\msf{D}(\cat{Mod} \mcal{O}_U)}
(\mcal{M}|_U, \mcal{N}|_U) \to
\mrm{Hom}_{\msf{D}(\cat{Mod} \mcal{O}_U)}
(\mrm{E} \mcal{M}|_U, \mcal{J}|_U) . \]
We conclude that the presheaves 
$U \mapsto \mrm{Hom}_{\msf{D}(\cat{Mod} \mcal{O}_U)}
(\mcal{M}|_U, \mcal{N}|_U)$
and
$U \mapsto$ \linebreak $\mrm{Hom}_{\msf{C}(\cat{Mod} \mcal{O}_U)}
(\mrm{E} \mcal{M}|_U, \mcal{J}|_U)$
are isomorphic. But the latter is a sheaf.
\end{proof}

A stack on $X$ is a ``sheaf of categories.'' The general definition 
(cf.\ \cite{LMB}) is quite forbidding; 
but we shall only need the following special instance
(cf.\ \cite[Section X.10]{KS}). 

\begin{dfn} \label{dfn4.4}
Suppose that for every open set $U \subset X$ 
we are given a full subcategory 
$\cat{C}(U) \subset \msf{D}(\cat{Mod} \mcal{O}_U)$.
The collection of categories 
$\cat{C} = \{ \cat{C}(U) \}$ is called a {\em stack of 
subcategories of $\msf{D}(\cat{Mod} \mcal{O}_X)$} 
if the following axioms hold.
\begin{enumerate}
\rmitem{a} Let $V \subset U$ be open sets in $X$ and 
$\mcal{M} \in \cat{C}(U)$. Then 
$\mcal{M}|_V \in \cat{C}(V)$. 
\rmitem{b} Descent for objects: 
given an open covering $U = \bigcup V_{i}$, objects
$\mcal{M}_{i} \in \cat{C}(V_{i})$ and isomorphisms
$\phi_{i, j} : \mcal{M}_{i}|_{V_{i} \cap V_{j}} \iso
\mcal{M}_{j}|_{V_{i} \cap V_{j}}$
satisfying the cocycle condition
$\phi_{i, k} = \phi_{j, k} \circ \phi_{i, j}$
on triple intersections, there exists an object 
$\mcal{M} \in \cat{C}(U)$ and isomorphisms
$\phi_{i}: \mcal{M}|_{V_{i}} \iso \mcal{M}_{i}$
such that 
$\phi_{i, j}\circ \phi_{i} = \phi_{j}$.
\rmitem{c} Descent for morphisms: 
given two objects $\mcal{M}, \mcal{N} \in \cat{C}(U)$,
an open covering $U = \bigcup V_{i}$ and morphisms 
$\psi_i : \mcal{M}|_{V_i} \to \mcal{N}|_{V_i}$
such that 
$\psi_i|_{V_{i} \cap V_{j}} = \psi_j|_{V_{i} \cap V_{j}}$,
there is a unique morphism $\psi : \mcal{M} \to \mcal{N}$
such that $\psi|_{V_i} = \psi_i$.
\end{enumerate}
\end{dfn}

\begin{thm} \label{thm6.1}
Let $X$ be a finite dimensional noetherian scheme with dimension
function $\opn{dim}$. The assignment 
$U \mapsto \msf{D}^{\mrm{b}}_{\mrm{qc}}
(\cat{Mod} \mcal{O}_U)_{\mrm{CM}}$
is a stack of subcategories of $\msf{D}(\cat{Mod} \mcal{O}_X)$.
\end{thm}

\begin{proof}
Axiom (a) is clear, since the Cohen-Macaulay property is local.
Axiom (c) is Lemma \ref{lem6.2}. Let us prove axiom (b).  
Since $X$ is noetherian, and in view of axiom (c), we may assume 
$I = \{ 1, \ldots, n \}$. Let us define
$W_i := \bigcup_{j = 1}^i V_j$. By induction on $i$ we will 
construct a complex
$\mcal{N}_i \in 
\msf{D}^{\mrm{b}}_{\mrm{qc}}(\cat{Mod} \mcal{O}_{W_i})_{\mrm{CM}}$
with isomorphisms
$\psi_{i, j} : \mcal{N}_i |_{V_j} \iso \mcal{M}_j$
for all $j \leq i$ that are compatible with the $\phi_{j, k}$. 
Then $\mcal{M} := \mcal{N}_n$ will be the desired global object on 
$V = W_n$. 

So assume $i < n$ and $\mcal{N}_i$ has already been defined. 
For any $j \leq i$ we have an isomorphism
\[ \phi_{j, i+1} \circ \psi_{i, j} : 
\mcal{N}_i|_{V_j \cap V_{i+1}} \iso 
\mcal{M}_j|_{V_j \cap V_{i+1}} \iso 
\mcal{M}_{i+1}|_{V_j \cap V_{i+1}} , \]
and these satisfy the cocycle condition. According to axiom (c)
there is an isomorphism
\[ \psi_{i, i+1} : 
\mcal{N}_i|_{W_i \cap V_{i+1}} \iso 
\mcal{M}_{i+1}|_{W_i \cap V_{i+1}} \] 
in 
$\msf{D}(\cat{Mod} \mcal{O}_{W_i \cap V_{i+1}})$.
Denote by $f_{i+1} : W_i \to W_{i+1}$,
$g_{i+1} : V_{i+1} \to W_{i+1}$ and
$h_{i+1} : W_i \cap V_{i+1} \to W_{i+1}$ the inclusions. Define
$\mcal{N}_{i+1} \in 
\msf{D}^{\mrm{b}}(\cat{Mod} \mcal{O}_{W_{i+1}})$
to be the cone of the morphism
\[ h_{(i+1) !}(\mcal{N}_{i}|_{W_i \cap V_{i+1}})
\xar{(\gamma, \psi_{i, i+1})} 
f_{(i+1) !} \mcal{N}_{i} \oplus g_{(i+1) !} \mcal{M}_{i+1} \] 
where $h_{(i+1) !}$ etc.\ are extension by zero, and 
$\gamma$ is the canonical morphism. We obtain a 
distinguished triangle
\[ h_{(i+1) !}(\mcal{N}_{i}|_{W_i \cap V_{i+1}}) \to
f_{(i+1) !} \mcal{N}_{i} \oplus g_{(i+1) !} \mcal{M}_{i+1} 
\to \mcal{N}_{i+1} \to
h_{(i+1) !}(\mcal{N}_{i}|_{W_i \cap V_{i+1}})[1] \]
in $\msf{D}(\cat{Mod} \mcal{O}_{W_{i+1}})$.
Upon restriction to $W_i$ we get an isomorphism
$\mcal{N}_{i} \cong \mcal{N}_{i+1}|_{W_i}$; and upon restriction 
to $V_{i+1}$ we get an isomorphism
$\mcal{N}_{i+1}|_{V_{i+1}} \iso \mcal{M}_{i+1}$ which we call 
$\psi_{i+1, i+1}$. From these isomorphisms it follows that
$\mcal{N}_{i+1} \in 
\msf{D}^{\mrm{b}}_{\mrm{qc}}
(\cat{Mod} \mcal{O}_{W_{i+1}})_{\mrm{CM}}$.
\end{proof}

\begin{rem}
Assume $X$ is a finite type scheme over a field $\K$, and consider 
the dimension function $\opn{dim}_{\K}$ (see Definition 
\ref{dfn6.2} below). Let 
$\msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)_{\mrm{CM}}$
be the category of Cohen-Macaulay complexes with coherent 
cohomology sheaves. In \cite{YZ4} we show that 
$\msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)_{\mrm{CM}}$
is the heart of the rigid perverse t-structure on
$\msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)$.
Moreover, 
$\msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)_{\mrm{CM}}$
is the image of $\cat{Coh} \mcal{O}_X$ under the rigid 
auto-duality functor $\mrm{D}_X$. Therefore 
$\msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)_{\mrm{CM}}$
is an artinian abelian category. We do not know of a similar 
statement for the bigger category 
$\msf{D}^{\mrm{b}}_{\mrm{qc}}(\cat{Mod} \mcal{O}_X)_{\mrm{CM}}$.
\end{rem}

 From here on in this section $\K$ is a finite dimensional
noetherian regular ring. All rings are by 
default essentially finite type $\K$-algebras, all schemes are by 
default finite type $\K$-schemes, and all morphisms are over $\K$.

For a scheme $X$ we write $\cat{Aff} X$ for the set of affine open 
sets in it. 

\begin{dfn}
Let $X$ be a scheme and 
$\mcal{M} \in \msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)$. 
For $U \in \cat{Aff} X$ we write $A_U := \Gamma(U, \mcal{O}_X)$
and $M_U := \mrm{R} \Gamma(U, \mcal{M})$. 
Assume that for every $U \in \cat{Aff} X$ we are given 
a rigidifying isomorphism 
$\rho_U : M_U \iso \opn{Sq}_{A_U / \K} M_U$
in $\msf{D}(\cat{Mod} A_U)$.
Moreover, assume that for every pair of affine open sets 
$V \subset U$ the localization morphism 
$\mrm{q}_{V / U} : M_U \to M_V$ in
$\msf{D}(\cat{Mod} A_U)$
is a rigid localization morphism \tup{(}cf.\ Definition 
\ref{dfn2.3}\tup{)}. Then we call
$\bsym{\rho} = \{ \rho_U \}_{U \in \cat{Aff} X}$
a {\em rigid structure on $\mcal{M}$ relative to $\K$}, and the 
pair $(\mcal{M}, \bsym{\rho})$ is called a {\em rigid complex of
$\mcal{O}_X$-modules relative to $\K$}.
\end{dfn}

\begin{dfn}
Suppose $(\mcal{M}, \bsym{\rho}_{\mcal{M}})$ and 
$(\mcal{N}, \bsym{\rho}_{\mcal{N}})$
are rigid complexes of $\mcal{O}_X$-modules relative to $\K$. A 
{\em rigid morphism} from $(\mcal{M}, \bsym{\rho}_{\mcal{M}})$ to 
$(\mcal{N}, \bsym{\rho}_{\mcal{N}})$ is a morphism 
$\phi : \mcal{M} \to \mcal{N}$ in $\msf{D}(\cat{Mod} \mcal{O}_X)$,
such that for every affine open set $U \subset X$ the morphism
$\mrm{R} \Gamma(U, \phi) : M_U \to N_U$
in $\msf{D}(\cat{Mod} A_U)$ is a rigid morphism relative to $\K$,
in the sense of Definition \ref{dfn2.5}.
\end{dfn}

We denote the category of rigid complexes by
$\msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)_{\mrm{rig} / \K}$.

\begin{dfn} \label{dfn5.3}
A {\em rigid dualizing complex on $X$ relative to $\K$}
is a rigid complex $(\mcal{R}, \bsym{\rho})$
such that $\mcal{R}$ is a dualizing complex.
\end{dfn}

For a field $K$ any dualizing complex is of the form $K[n]$ 
for some integer $n$. 

\begin{dfn} \label{dfn6.2}
\begin{enumerate}
\item Suppose $K$ is an essentially finite type $\K$-algebra that's
a field, and let $R_K$ be its rigid dualizing complex.
Let $n$ be the integer such that $R_K \cong K[n]$, and
define $\opn{dim}_{\K}(K) := n$.
\item Let $X$ be a finite type $\K$-scheme,  $x \in X$ a point and 
$\bsym{k}(x)$ the residue field of $x$. 
We define 
$\opn{dim}_{\K}(x) := \opn{dim}_{\K}(\bsym{k}(x))$.
\end{enumerate}
\end{dfn}

\begin{lem} \label{lem6.3}
The function 
$\opn{dim}_{\K} : X \to \mbb{Z}$ is a dimension function.
\end{lem}

\begin{proof}
Choose an affine open neighborhood 
$U = \opn{Spec} A$ of $x$ in $X$. Denote by $\mcal{R}$ the 
sheafification of the rigid dualizing complex $R_A$ to $U$, and let 
$\mcal{R}_x$ be its stalk at $x$.  
According to \cite[Proposition V.3.4]{RD} there is an integer 
$n$ such that 
\[ \opn{Ext}^i_{\mcal{O}_{X,x}}(\bsym{k}(x), \mcal{R}_x) \cong
\begin{cases}
\bsym{k}(x) & \text{ if } i = -n \\
0 & \text{ otherwise}.
\end{cases} \]
Since 
$\mrm{RHom}_{\mcal{O}_{X,x}}(\bsym{k}(x), \mcal{R}_x)$
is a rigid dualizing complex over $\bsym{k}(x)$ we
see that $n = \opn{dim}_{\K}(x)$. 
By \cite[Proposition V.7.1]{RD} we see that 
$\opn{dim}_{\K}(y) = \opn{dim}_{\K}(x) - 1$
for an immediate specialization. 
\end{proof}

\begin{exa}
If $\K$ is equidimensional of dimension $d$ (i.e.\ every maximal 
ideal has height $d$) then 
$\opn{dim}_{\K}(x) = \opn{dim} \overline{\{ x \}} - d$. 
Thus in the case of a field $\K$ one has 
$\opn{dim}_{\K}(x) = \opn{dim} \overline{\{x\}}$. On the other hand, 
for $\K = \mbb{Z}$ and $X = \opn{Spec} \mbb{Z}$,
a closed point $x = (p)$ has $\opn{dim}_{\K}(x) = - 1$.
\end{exa}

\begin{thm} \label{thm5.2}
Let $\K$ be a finite dimensional regular noetherian ring,
and let $X$ be a finite type $\K$-scheme. Then $X$ has a rigid 
dualizing complex $(\mcal{R}_X, \bsym{\rho}_X)$,
which is unique up to a unique rigid isomorphism.
\end{thm}

\begin{proof}
Let $U = \opn{Spec} A$ be an affine open set in $X$. By Theorem 
\ref{thm2.3} the $\K$-algebra $A$ has a rigid
dualizing complex $(R_A, \rho_A)$. 
If $U' = \opn{Spec} A' \subset U$ is a smaller 
affine open set, then by Proposition \ref{prop4.3} 
there is a unique rigid localization morphism
$\mrm{q}_{A' / A} : (R_A, \rho_A) \to (R_{A'}, \rho_{A'})$.
In this way we get an isomorphism 
$\phi_{A' / A} : A' \otimes_{A} R_A \iso R_{A'}$ 
in $\msf{D}(\cat{Mod} A')$. Given another affine open set 
$U'' = \opn{Spec} A'' \subset U'$ the localization 
morphisms satisfy
$\mrm{q}_{A'' / A} = \mrm{q}_{A'' / A'} \circ 
\mrm{q}_{A' / A}$,
and hence 
$\phi_{A'' / A} = \phi_{A'' / A'} \circ \phi_{A' / A}$.

Now let's pass to sheaves. For an affine open set
$U = \opn{Spec} A \subset X$ let $\mcal{R}_U$
be the sheafification of $R_A$ to $U$, which is a dualizing 
complex on $U$. Given an affine open set $U' \subset U$ there 
is an isomorphism 
$\phi_{U' / U} : \mcal{R}_U|_{U'} \iso \mcal{R}_{U'}$
in $\msf{D}(\cat{Mod} \mcal{O}_{U'})$.
For a third affine open set $U'' \subset U'$
these isomorphisms satisfy the condition
$\phi_{U'' / U} = \phi_{U'' / U'} \circ \phi_{U' / U}$.

By \cite[Proposition V.7.3]{RD} each of the complexes 
$\mcal{R}_U$ is Cohen-Macaulay with respect to $\opn{dim}_{\K}$. 
Given two affine open sets $U_1, U_2 \subset X$, and 
any affine open set $W \subset U_1 \cap U_2$, 
we get isomorphisms 
$\phi_{W / U_i} : \mcal{R}_{U_i}|_W \iso \mcal{R}_W$. 
According to Theorem \ref{thm6.1} the Cohen-Macaulay complexes 
form a stack on $X$. By axiom (c) of Definition \ref{dfn4.4}
the isomorphisms 
$\phi_{W / U_2}^{-1} \circ \phi_{W / U_1}: 
\mcal{R}_{U_1}|_{W} \iso \mcal{R}_{U_2}|_{W}$ 
can be patched to an isomorphism
$\phi_{U_1, U_2} : \mcal{R}_{U_1}|_{U_1 \cap U_2} \iso 
\mcal{R}_{U_2}|_{U_1 \cap U_2}$;
and these isomorphisms satisfy the cocycle condition on triple 
intersections. By axiom (b) there
is a complex 
$\mcal{R}_X \in
\msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)_{\mrm{CM}}$
with isomorphisms
$\mcal{R}_X|_{U} \cong \mcal{R}_U$ for any affine open set $U$. 
The complex $\mcal{R}_X$ is dualizing, and by construction it
comes equipped with a rigid structure $\bsym{\rho}_X$.

Regarding uniqueness: this is immediate from the uniqueness 
of the rigid dualizing complexes $R_A$ over the $\K$-algebras 
$A$, and by the uniqueness of the 
rigid localization morphisms $\mrm{q}_{A' / A}$. 
\end{proof}

The {\em rigid auto-duality functor} of $X$ is 
\[ \mrm{D}_X := \mrm{R} \mcal{H}om_{\mcal{O}_X}(-, \mcal{R}_X) . 
\]
Let $\cat{FTSch} / \K$ be the category of finite type schemes 
over $\K$. 

\begin{dfn}
For a morphism $f : X \to Y$ in $\cat{FTSch} / \K$ we 
define a functor
\[ f^! : \msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_Y) \to
\msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)  \]
as follows. If $X = Y$ and $f = \bsym{1}_X$ (the identity 
automorphism) then
$f^! := \bsym{1}_{\msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)}$
(the identity functor). Otherwise we define
$f^! := \mrm{D}_X \, \mrm{L} f^* \, \mrm{D}_Y$.
\end{dfn}

Note that since $\mrm{D}_Y \mcal{O}_Y = \mcal{R}_Y$, 
$\mrm{L} f^* \mcal{O}_Y = \mcal{O}_X$ and
$\mrm{D}_X \mcal{O}_Y = \mcal{R}_X$, 
one has $f^! \mcal{R}_Y = \mcal{R}_X$. 
In Section \ref{sec4} we were more pedantic, so we introduced 
the tautological isomorphism 
$\psi_f^{\mrm{tau}} : f^! \mcal{R}_Y \iso \mcal{R}_X$,
using standard identities; see Definition \ref{dfn4.5}.

\begin{cor} \label{cor6.1} 
Let $f : X \to Y$ and $g : Y \to Z$ be morphisms in
$\cat{FTSch} / \K$. Then there is an isomorphism of functors
$\phi_{g, f} : (g \circ f)^! \iso f^! g^!$.
Given another morphism $h : Z \to W$ in $\cat{FTSch} / \K$ the 
compatibility relation
\[ \phi_{h, g} \circ \phi_{h \circ g, f} = 
\phi_{g, f} \circ \phi_{h, g \circ f}: 
(h \circ g \circ f)^! \iso f^! g^! h^! \]
holds. Thus $f \mapsto f^!$ is the $1$-component of a 
contravariant $2$-functor $\cat{FTSch} / \K \to \cat{Cat}$,
whose $0$-component is 
$X \mapsto \msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)$.
\end{cor} 

\begin{proof}
Use the adjunction isomorphism
$\bsym{1}_Y \iso \mrm{D}_Y \, \mrm{D}_Y$. Cf.\ Theorem 
\ref{thm2.10}(1,2). 
\end{proof}

Recall that for a finite morphism of schemes
$f : X \to Y$ there is a functor
$f^{\flat} : \msf{D}(\cat{Mod} \mcal{O}_Y) \to 
\msf{D}(\cat{Mod} \mcal{O}_X)$
defined by
\[ f^{\flat} \mcal{N} := \mcal{O}_X 
\otimes_{f^{-1} f_* \mcal{O}_X} f^{-1} 
\mrm{R} \mcal{H}om_{\mcal{O}_Y}(f_* \mcal{O}_X, \mcal{N}) . \]
For a smooth morphism $f$ we have a functor
$f^{\sharp} : \msf{D}(\cat{Mod} \mcal{O}_Y) \to 
\msf{D}(\cat{Mod} \mcal{O}_X)$
defined as follows. Let $X = \coprod X_i$ be the decomposition of 
$X$ into connected components, and for each $i$ let
$n_i$ be the rank of the locally free $\mcal{O}_{X_i}$-module
$\Omega^1_{X_i / Y}$. Denote by $g_i : X_i \to X$ the inclusion.
Then 
\[ f^{\sharp} \mcal{N} :=
\big( \boplus_i \, g_{i *} \, \Omega^{n_i}_{X_i / Y}[n_i] \big)
\otimes_{\mcal{O}_X} f^* \mcal{N}. \]
Cf.\ \cite[Sections III.2 and III.6]{RD}. 

\begin{thm} \label{thm5.3}
Let $\K$ be a regular finite dimensional noetherian ring,
let $f : X \to Y$ be a finite \tup{(}resp.\ smooth\tup{)}
morphism between finite type $\K$-schemes, and let 
$(\mcal{R}_X, \bsym{\rho}_X)$ and $(\mcal{R}_Y, \bsym{\rho}_Y)$
be the rigid dualizing complexes. Then 
the complex $f^{\flat} \mcal{R}_Y$ 
\tup{(}resp.\ $f^{\sharp} \mcal{R}_Y$\tup{)}
is a dualizing complex over $X$, and it has an induced rigid 
structure $f^{\flat}(\bsym{\rho}_Y)$
\tup{(}resp.\ $f^{\sharp}(\bsym{\rho}_Y)$\tup{)}.
Therefore there is a unique rigid isomorphism
$f^{\flat} \mcal{R}_Y \cong \mcal{R}_X$
\tup{(}resp.\ $f^{\sharp} \mcal{R}_Y \cong \mcal{R}_X$\tup{)}.
\end{thm}

\begin{proof}
The fact that $f^{\flat} \mcal{R}_Y$ 
(resp.\ $f^{\sharp} \mcal{R}_Y$) is a dualizing complex on $X$ 
is quite easy to verify; see \cite[Proposition V.2.4]{RD}
(resp.\  \cite[Theorem V.8.3]{RD}).
We need to provide it with a rigid structure 
$f^{\flat}(\bsym{\rho}_Y)$ 
(resp.\ $f^{\sharp} (\bsym{\rho}_Y)$). 
We will do only the case of a finite morphism. The smooth case is 
similar (but easier). 

Let $V \subset Y$ be an affine open set. Define
$A := \Gamma(V, \mcal{O}_Y)$ and
$B := \Gamma(f^{-1}(V), \mcal{O}_X)$. 
So $f^* : A \to B$ is a finite homomorphism of $\K$-algebras. Let
$R_V := \mrm{R} \Gamma(V, \mcal{R}_Y)$, and let $\rho_V$ be its 
rigidifying isomorphism. By Theorem \ref{thm2.2} the complex 
$f^{\flat} R_V$ is a dualizing complex over $B$, with rigidifying 
isomorphism $f^{\flat}(\rho_V)$.
If $V' \subset V$ is a smaller affine open set, and we let
$A' := \Gamma(V', \mcal{O}_Y)$, 
$B' := \Gamma(f^{-1}(V'), \mcal{O}_X)$ and
$R_{V'} := \mrm{R} \Gamma(V', \mcal{R}_Y)$, 
then under the isomorphism 
$f^{\flat} R_{V'} \cong B' \otimes_B f^{\flat} R_{V}$
one has
$f^{\flat}(\rho_{V'}) = \bsym{1}_{B'} \otimes_B f^{\flat}(\rho_V)$.
This is due to Theorem \ref{thm2.8}.

We want to show that for every affine open set $U \subset X$ the 
complex $R_U :=$ \linebreak 
$\mrm{R} \Gamma(U, f^{\flat} \mcal{R}_Y)$
has a rigidifying isomorphism $\rho_U$. If $U \subset f^{-1}(V)$
for some affine open set $V \subset Y$ then this follows from the 
previous paragraph. Indeed, with $A$, $B$ and $R_V$ as defined 
above, and $B' := \Gamma(U, \mcal{O}_X)$, we have an isomorphism
$R_U \cong B' \otimes_B f^{\flat} R_{V}$; so we can use the 
rigidifying isomorphism $f^{\flat}(\rho_V)$. And this 
rigidifying isomorphism of $R_U$ does not depend on the choice of 
$V$. 

Now for an arbitrary affine open set $U \subset X$, let us cover 
it by affine open sets $U_1, \ldots,$ \linebreak 
$U_n$ such that each 
$U_i \subset f^{-1}(V_i)$ for some affine open set 
$V_i \subset Y$. We have to find a rigidifying isomorphism
$\rho_U : R_U \iso \opn{Sq}_{B / \K} R_U$
in $\msf{D}(\cat{Mod} B)$. Let us denote by 
$\mcal{S} \in \msf{D}(\cat{Mod} \mcal{O}_U)$
the sheafification of $\opn{Sq}_{B / \K} R_U$. Since both 
$(f^{\flat} \mcal{R}_Y)|_U$ and $\mcal{S}$ are Cohen-Macaulay 
complexes on $U$, and on each of the open sets $U_i$ we have 
an isomorphism 
$f^{\flat}(\rho_{V_i}) : (f^{\flat} \mcal{R}_Y)|_{U_i} \iso 
\mcal{S}|_{U_i}$,
that agree on double intersections, we can glue them to obtain the 
desired rigidifying isomorphism $\rho_U$.

By construction the various rigidifying isomorphisms 
$\rho_U$ respect localizations, so we have a rigid structure 
on $f^{\flat} \mcal{R}_Y$, which we denote by 
$f^{\flat}(\bsym{\rho}_Y)$. 
By the uniqueness in Theorem \ref{thm5.2} we 
get a rigid isomorphism 
$(f^{\flat} \mcal{R}_Y, f^{\flat}(\bsym{\rho}_Y)) \iso 
(\mcal{R}_X, \bsym{\rho}_X)$.
\end{proof}

\begin{cor} \label{cor5.1}
In the situation of Theorem \tup{\ref{thm5.3}} 
there is a functorial isomorphism
$f^{!} \mcal{N} \cong f^{\flat} \mcal{N}$
\tup{(}resp.\ $f^{!} \mcal{N} \cong f^{\sharp} \mcal{N}$\tup{)}
for 
$\mcal{N} \in \msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)$.
\end{cor}

\begin{proof}
Use Theorem \ref{thm5.3} and standard adjunction formulas.
\end{proof}

For more details on the isomorphisms 
$f^{!} \cong f^{\flat}$ and $f^{!} \cong f^{\sharp}$ see Theorem 
\ref{thm2.10}.

In the next two results we shall consider only 
{\em embeddable} morphisms, in order to avoid complications. 
Most likely they are true without this assumption. 
Recall that a morphism $f : X \to Y$ is called
embeddable if it can be
factored into $f = h \circ g$, where
$g$ is finite and $h$ is smooth.

\begin{prop}[Flat Base Change] \label{prop7.1}  
Let $f : X \to Y$ be an embeddable morphism, and let 
$g : Y' \to Y$ be a flat morphism. Define a scheme
$X' := Y' \times_Y X$, with projections
$f' : X' \to Y'$ and $h : X' \to X$. 
Then there is an isomorphism 
${f'}^! g^* \cong h^* f^!$ of functors 
$\msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_Y) \to 
\msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_{X'})$.
\end{prop}

\begin{proof}
This is immediate when $f$ is either finite or smooth, by Corollary 
\ref{cor5.1}. Cf.\ proof of Theorem \ref{thm2.8}. 
\end{proof}

For a morphism of schemes $f : X \to Y$ let's denote by
\[ f^{!_{(\mrm{G})}} : 
\msf{D}^+_{\mrm{c}}(\cat{Mod} \mcal{O}_Y) 
\to
\msf{D}^+_{\mrm{c}}(\cat{Mod} \mcal{O}_X) \]
Grothendieck's twisted inverse image functor from \tup{\cite{RD}}.

\begin{prop}[Comparison to \cite{RD}]  \label{prop7.2} 
If $f : X \to Y$ is an embeddable morphism then there 
is an isomorphism of functors
$f^{!_{(\mrm{G})}} \cong f^!$.
In particular, if the structural morphism 
$\pi : X \to \opn{Spec} \K$
is embeddable, then there is an isomorphism
$\pi^{!_{(\mrm{G})}} \K \cong \pi^!\, \K = \mcal{R}_X$
in $\msf{D}(\cat{Mod} \mcal{O}_X)$.
\end{prop}

\begin{proof}
Choose a factorization $f = h \circ g$, with $g$ finite and $h$ 
smooth. Then, according to \cite[Theorem III.8.7]{RD},
there are isomorphisms
$g^{!_{(\mrm{G})}} \cong g^{\flat}$,
$h^{!_{(\mrm{G})}} \cong h^{\sharp}$
and 
$f^{!_{(\mrm{G})}} \cong g^{!_{(\mrm{G})}} 
h^{!_{(\mrm{G})}}$. 
On the other hand, by Corollaries \ref{cor5.1} and \ref{cor6.1}
we have
$g^{!} \cong g^{\flat}$,
$h^{!} \cong h^{\sharp}$
and 
$f^{!} \cong g^{!} h^{!}$. 
\end{proof}

\begin{rem} \label{rem7.1}
In case $X$ is a separated flat embeddable $\K$-scheme, 
Proposition \ref{prop7.2} can be strengthened significantly. 
Indeed, one can prove that the dualizing complex 
$\mcal{R}' := \pi^{!_{(\mrm{G})}} \K$
has a rigid structure, which determined by the variance properties 
of the twisted inverse image $2$-functor 
$f \mapsto f^{!_{(\mrm{G})}}$,
as stated in \cite[Theorem III.8.7]{RD}. Here is an outline. 
Letting $X^2 := X \times_{\K} X$,
there are the diagonal embedding
$\Delta : X \to X^2$, which is a finite morphism; and the two 
projections
$\mrm{p}_i : X^2 \to X$, which are flat. See diagram below.
Using flat base change
one can obtain a canonical isomorphism
\begin{equation} \label{eqn13.1}
\mcal{R}' \cong 
\Delta^{-1} \mrm{R} \mcal{H}om_{\mcal{O}_{X^2}}
\big( \Delta_* \mcal{O}_{X}, (\mrm{p}_1^*\, \mcal{R}')
\otimes^{\mrm{L}}_{\mcal{O}_{X^2}} (\mrm{p}_2^*\, \mcal{R}') \big) . 
\end{equation} 

Now take any affine open set $U \subset X$, and let
$A_U := \Gamma(U, \mcal{O}_{X})$ and 
$R'_U := \mrm{R} \Gamma(U, \mcal{R}')$. Applying the functor
$\mrm{R} \Gamma(U, -)$ to the isomorphism (\ref{eqn13.1})
we obtain a rigidifying isomorphism
$\rho'_U : R'_U \iso \opn{Sq}_{A_U / \K} R'_U$
in $\msf{D}(\cat{Mod} A_U)$. 
The collection of isomorphisms $\{ \rho'_U \}$ is 
compatible with localizations, so it's a rigid structure on 
$\mcal{R}'$. 
\[ \UseTips \xymatrix  @C=4ex @R=4ex {
X \ar[r]^(0.6){\Delta \quad} 
& X^2  \ar[d]_{\mrm{p}_1} 
\ar[r]^{\mrm{p}_2} 
& X \ar[d]^{\pi} \\
& X \ar[r]^{\pi \quad}
& \opn{Spec} \K } \]
\end{rem}

To conclude this section we address the question of dependence of 
the twisted inverse image 
$2$-functor $f \mapsto f^!$ on the base ring $\K$. Assume $\K'$ 
is an essentially finite type $\K$-algebra that's regular (but 
maybe not smooth over $\K$). 
Consider the category $\cat{FTSch} / \K'$, with the faithful
functor 
$\cat{FTSch} / \K' \to \cat{FTSch} / \K$. 
Just like for $\K$, any finite type $\K'$-scheme $X$ has a rigid 
dualizing complex relative to $\K'$, which we denote by
$\mcal{R}'_X$. Also there is a $2$-functor 
$\cat{FTSch} / \K' \to \cat{Cat}$, constructed using the complexes
$\mcal{R}'_X$; we denote it by $f \mapsto {f^!}'$. 
Let $R_{\K'}$ be the rigid dualizing complex of $\K'$ relative to 
$\K$. Note that since $\K'$ is regular, one has
$R_{\K'} \cong L[n]$
for some invertible $\K'$-module $L$ and some integer $n$.

\begin{prop}
Given $X \in \cat{FTSch} / \K'$, the complex
$R_{\K'} \otimes^{\mrm{L}}_{\K'} \mcal{R}'_X \in 
\msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)$
has an induced rigid structure relative to $\K$. Therefore there 
is a unique rigid isomorphism
$R_{\K'} \otimes^{\mrm{L}}_{\K'} \mcal{R}'_X
\cong \mcal{R}_X$. 
\end{prop}

\begin{proof}
This is immediate from Proposition \ref{prop4.5}. 
\end{proof}

Because the twisting $R_{\K'} \otimes^{\mrm{L}}_{\K'} -$
is an auto-equivalence of 
$\msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)$
for any scheme $X \in \cat{FTSch} / \K'$, we obtain:

\begin{cor} \label{cor7.10}
There is an isomorphism of $2$-functors
\[ (f \mapsto {f^!}') \cong (f \mapsto {f^!})
: \cat{FTSch} / \K' \to \cat{Cat} . \]
\end{cor}




%\newpage
%% ** section 7 **
\section{The Residue Theorem and Duality}
\label{sec7}

In this section $\K$ denotes a regular finite dimensional
noetherian ring. All schemes are by 
default finite type $\K$-schemes, all algebras are by default 
essentially finite type $\K$-algebras, 
and all morphisms are over $\K$. 

Let $X$ be a scheme. 
The dimension function $\opn{dim}_{\K}$ was introduced in Definition 
\ref{dfn6.2}. For a point $x \in X$ we denote by $\mcal{J}(x)$ an 
injective hull of the residue field $\bsym{k}(x)$, considered as 
an $\mcal{O}_X$-module. So $\mcal{J}(x)$ is a 
quasi-coherent $\mcal{O}_X$-module supported on 
$\overline{\{ x \}}$; see \cite[Section II.7]{RD}. 

\begin{dfn} \label{dfn8.1}
A {\em rigid residue complex on $X$} (relative to $\K$) is a rigid 
dualizing complex $(\mcal{K}_X, \bsym{\rho}_X)$, such that for 
every integer $p$ there is an isomorphism of $\mcal{O}_X$-modules
$\mcal{K}_X^p \cong \boplus_{\opn{dim}_{\K}(x) = -p} \mcal{J}(x)$.
\end{dfn}

\begin{prop} \label{prop8.1}
The scheme $X$ has a rigid residue complex  
$(\mcal{K}_X, \bsym{\rho}_X)$, which is unique up to a 
unique isomorphism in $\msf{C}(\cat{Mod} \mcal{O}_X)$.
\end{prop}

\begin{proof}
Define $\mcal{K}_X := \mrm{E} \mcal{R}_X$, the Cousin complex with 
respect to $\opn{dim}_{\K}$. 
According to \cite[Proposition VI.1.1]{RD}, for any p 
there is an isomorphism
$\mcal{K}_X^p \cong \boplus_{\opn{dim}_{\K}(x) = -p} \mcal{J}(x)$.
By \cite[Proposition IV.3.1]{RD} or \cite[Theorem 2.11]{YZ2}
there is an isomorphism 
$\mcal{K}_X \cong \mcal{R}_X$ in $\msf{D}(\cat{Mod} \mcal{O}_X)$.
Using this isomorphism we obtain a rigid structure $\bsym{\rho}_X$
on $\mcal{K}_X$. 

Now suppose $(\mcal{K}', \bsym{\rho}')$ is another residue complex 
on $X$. According to Theorem \ref{thm5.2} there is a unique rigid 
isomorphism $\phi : \mcal{K}_X \iso \mcal{K}'$ in
$\msf{D}(\cat{Mod} \mcal{O}_X)$. Like in the proof of Lemma 
\ref{lem6.2} we see that $\phi$ is a uniquely determined 
isomorphism in $\msf{C}(\cat{Mod} \mcal{O}_X)$.
\end{proof}

Since $\mcal{K}_X$ is a bounded complex of injective 
$\mcal{O}_X$-modules the rigid duality functor is 
$\mrm{D}_X = \mcal{H}om_{\mcal{O}_X}(-, \mcal{K}_X)$. 
Furthermore, for any complex 
$\mcal{M} \in \msf{D}^{\mrm{b}}(\cat{Mod} \mcal{O}_X)$
the complex 
$\mcal{H}om_{\mcal{O}_X}(\mcal{M}, \mcal{K}_X)$
is a bounded complex of flasque sheaves, and hence
$\mrm{R} f_*\, \mrm{D}_X \mcal{M} = 
f_* \mcal{H}om_{\mcal{O}_X}(\mcal{M}, \mcal{K}_X)$.

Let $x \in X$ be a point with $\opn{dim}_{\K}(x) = -p$. 
Define
$\mcal{K}_X(x) := \mrm{H}^p_{x} \mcal{R}_X$;
so $\mcal{K}_X(x) \cong \mcal{J}(x)$, and
$\mcal{K}_X^p = \boplus_{\opn{dim}_{\K}(x) = -p}
\mcal{K}_X(x)$.

\begin{dfn} \label{dfn8.4}
Let $A$ be a local essentially finite type $\K$-algebra, with 
maximal ideal $\mfrak{m}$, residue field $K$ and rigid dualizing 
complex $R_A$. Let $d := \opn{dim}_{\K}(K)$, and define 
$\mcal{K}(A) := \mrm{H}^{-d}_{\mfrak{m}} R_A$.
\end{dfn}

In the setup of the definition above,
the $A$-module $\mcal{K}(A)$ is an injective hull of the field 
$K$. If $A$ is artinian then 
$\mrm{H}^{i} R_A = 0$ for all 
$i \neq -d$, and hence there is a canonical isomorphism 
$R_A \cong \mcal{K}(A)[d]$
in $\msf{D}(\cat{Mod} A)$.

\begin{lem} \label{lem6.1}
Let $X$ be a $\K$-scheme, $x \in X$ a point and 
$A := \mcal{O}_{X, x}$.
Then there is a canonical isomorphism 
$\mcal{K}_X(x) \cong \mcal{K}(A)$.
\end{lem}

\begin{proof}
Let $U = \opn{Spec} C$ be an affine open neighborhood of $x$ in 
$X$, and let $\mfrak{p} \subset C$ be the prime ideal of $x$.
By definition 
$\mcal{K}_X(x) = \mrm{H}^{-d}_{\mfrak{p}} R_{C}$,
where $d := \opn{dim}_{\K}(x)$. Now according to Proposition 
\ref{prop4.3}  we get a canonical isomorphism
$R_A \cong A \otimes_C R_C$ in
$\msf{D}(\cat{Mod} A)$, inducing an isomorphism
$\mrm{H}^{-d}_{\mfrak{m}} R_{A} \cong
\mrm{H}^{-d}_{\mfrak{p}} R_{C}$.
\end{proof}

Let $A$ be as in Definition \ref{dfn8.4}.
For $i \geq 0$ let
$A_i := A / \mfrak{m}^{i+1}$. 
Corresponding to the finite homomorphisms
$A \to A_i$ there are rigid trace morphisms
$\opn{Tr}_{A_i / A} : R_{A_i} \to R_A$
in $\msf{D}(\cat{Mod} A)$; see Proposition \ref{prop4.4}.
 From these we can extract $A$-linear 
homomorphisms
$\mrm{H}^{-d}_{\mfrak{m}}(\opn{Tr}_{A_i / A}) :
\mcal{K}(A_i) \to \mcal{K}(A)$.

\begin{lem} \label{lem8.1}
In the setup of Definition \tup{\ref{dfn8.4}}, the homomorphisms
$\mrm{H}^{-d}_{\mfrak{m}}(\opn{Tr}_{A_i / A})$
give rise to a bijection
$\lim_{i \to}  \mcal{K}(A_i) \iso \mcal{K}(A)$.
\end{lem}

\begin{proof}
Because $\opn{Tr}_{A_i / A}$ is nondegenerate it induces an 
isomorphism
$\mcal{K}(A_i) \cong \linebreak
\opn{Hom}_A(A_i, \mcal{K}(A))$.
\end{proof}

\begin{dfn} \label{dfn6.1}
Let $f : X \to Y$ be a morphism of schemes. 
Define a homomorphism of graded $\mcal{O}_Y$-modules
$\opn{Tr}_f : f_* \mcal{K}_X \to \mcal{K}_Y$
as follows. There is a decomposition 
$f_* \mcal{K}_X = \boplus_{x \in X} f_* \mcal{K}_X(x)$.
Consider a point $x \in X$, and let $y := f(x)$. There 
are two cases:
\begin{enumerate}
\rmitem{i} If $x$ is closed in its fiber, define
$A_i := \mcal{O}_{Y, y} / \mfrak{m}_y^{i + 1}$ and
$B_i := \mcal{O}_{X, x} / \mfrak{m}_x^{i + 1}$. 
Then $A_i$ is an essentially finite type $\K$-algebra, and
$A_i \to B_i$ is a finite homomorphism. Using the isomorphisms 
from Lemmas \ref{lem6.1} and \ref{lem8.1} we define
$\opn{Tr}_f|_{f_* \mcal{K}_X(x)} :=
\lim_{i \to} \opn{Tr}_{B_i / A_i}$.
\rmitem{ii}
If $x$ is not closed in the fiber $f^{-1}(y)$ then we let
$\opn{Tr}_f|_{f_* \mcal{K}_X(x)} := 0$.
\end{enumerate}
\end{dfn}

\begin{prop} \label{prop8.2}
Given two morphisms of schemes
$X \xar{f} Y \xar{g} Z$ there is equality
\[ \opn{Tr}_{g \circ f} = \opn{Tr}_g \circ \, g_*(\opn{Tr}_f) 
: (g \circ f)_* \mcal{K}_X \to \mcal{K}_Z . \]
\end{prop}

\begin{proof}
This is an immediate consequence of Corollary \ref{cor4.1}.
\end{proof}

The next thing we want to do is to study residues on curves,
and to prove Theorem \ref{thm8.2}. This will lead us to the 
general residue theorem for proper morphisms \ref{thm8.3}. 
The strategy we shall use is taken from \cite[Chapter VII]{RD}, 
but the considerations are much easier in our context. 

Let $A$ be an artinian, local, essentially finite type
$\K$-algebra, and let $X$ be a smooth 
irreducible curve over $A$. Let $x_0$ be the generic point of $X$, 
and let $x_1$ be some closed point. The corresponding
local rings are denoted by $L := \mcal{O}_{X, x_0}$ and
$B := \mcal{O}_{X, x_1}$, and we denote by $\mfrak{n}$ the maximal 
ideal of $B$. The Cousin complex of the sheaf
$\Omega^1_{X / A}$ on $X$ gives rise to a $B$-linear homomorphism
\[ \delta_{(x_0, x_1)} : \Omega^1_{L / A} \cong
\mrm{H}^0_{x_0} \Omega^1_{X / A} 
\to \mrm{H}^1_{x_1} \Omega^1_{X / A}
\cong \mrm{H}^1_{\mfrak{n}} \Omega^1_{B / A} . \]

For any $k \geq 0$ let $B_k := B / \mfrak{n}^{k+1}$.
Since $A \to B$ is essentially smooth of relative dimension $1$, 
and $A \to B_k$ is finite and flat, there is a residue map
$\opn{Res}_{B_k / A} :
\opn{Ext}^1_B(B_k, \Omega^1_{B / A}) \to A$.
See Definition \ref{dfn5.4}. 
There is a canonical isomorphism 
\[ \mrm{H}^1_{\mfrak{n}} \Omega^1_{B / A} \cong
\lim_{k \to} \opn{Ext}^1_B(B_k, \Omega^1_{B / A}) , \]
and we define
\begin{equation} \label{eqn8.2}
\opn{Res}_{B / A} := \lim_{k \to} \opn{Res}_{B_k / A} :
\mrm{H}^1_{\mfrak{n}} \Omega^1_{B / A} \to A . 
\end{equation}

\begin{dfn} \label{dfn8.2}
Let $A$ be an artinian, local, essentially finite type 
$\K$-algebra, let $X$ be a smooth 
irreducible curve over $A$, and let $x$ be a closed point of 
$X$. Denote by $\bsym{k}(X)$ 
the total ring of fractions of $X$. The {\em 
residue map at $x$} is the $A$-linear homomorphism
$\opn{Res}_x : \Omega^1_{\bsym{k}(X) / A} \to A$
which is the composition of the homomorphisms
\[ \Omega^1_{\bsym{k}(X) / A} \xar{\delta_{(x_0, x_1)}}
\mrm{H}^1_{x} \Omega^1_{\mcal{O}_{X, x} / A} 
\xar{\opn{Res}_{\mcal{O}_{X, x} / A}} A  \]
described above.
\end{dfn}

Note that the kernel of $\opn{Res}_x$ is 
$\Omega^1_{X / A, x}$. 
More generally we make the next definition.

\begin{dfn} \label{dfn8.3}
With the data of the previous definition, let $M$ be an 
$A$-module. Define
\[ \opn{Res}_{x; M} : \Omega^1_{\bsym{k}(X) / A} \otimes_A M \to M \]
by the formula
\[ \opn{Res}_{x; M} (\alpha \otimes m) := \opn{Res}_{x} (\alpha)
\cdot m \]
for $\alpha \in \Omega^1_{\bsym{k}(X) / A}$ and $m \in M$.
\end{dfn}

\begin{lem} \label{lem8.2}
In the situation of Definition \tup{\ref{dfn8.2}}, suppose 
$X = \opn{Spec} B$ is an affine curve over $A$.
Let $b \in B$ be some element, 
$\bar{B} := B / (b)$, and $\beta \in \Omega^1_{B / A}$.
Assume that $A \to \bar{B}$ is finite, and let 
$\opn{Res}_{B / A} : \opn{Ext}^1_B(\bar{B}, \Omega^1_{B / A})
\to A$
be the residue map from Definition \tup{\ref{dfn5.4}}. Then
\[ \opn{Res}_{B / A} \smgfrac{\beta}{b} = 
\sum_{x \in X \tup{ closed}} \opn{Res}_{x} (\smfrac{\beta}{b})
. \]
\end{lem}

\begin{proof}
First we note that $b$ is a regular element of $B$, so it is 
invertible in the fraction ring $L := \bsym{k}(X)$. Another thing 
to note is that 
$\opn{Res}_{x} (\smfrac{\beta}{b}) = 0$
if $b(x) \neq 0$, i.e.\ if $x \notin \opn{Spec} \bar{B}$.

Let us denote the generic point of $X$ by $x_0$. The homomorphism
$\delta_{(x_0, x_1)} : \mrm{H}^0_{x_0} \Omega^1_{X / A} 
\to \mrm{H}^1_{x_1} \Omega^1_{X / A}$
sends the fraction $\frac{\beta}{b}$ to the generalized fraction 
$\gfrac{\beta}{b}$. The artinian ring $\bar{B}$ is semi-local:
$\bar{B} = \prod_{x \in \opn{Spec} \bar{B}} \bar{B}_{x}$,
and the projection $B \to \bar{B}_x$ factors via 
$B_{x}$. Looking at the definitions we see that the residue map 
$\opn{Res}_{B / A} : \opn{Ext}^1_B(\bar{B}, \Omega^1_{B / A}) \to 
A$
factors via
\[ \sum \opn{Res}_{B_x / A} :
\boplus_{x \in \opn{Spec} \bar{B}} \mrm{H}^1_{x} \,
\Omega^1_{B_x / A} \to A  . \]
\end{proof}

\begin{lem} \label{lem8.3}
In the situation of Definition \tup{\ref{dfn8.2}}, suppose 
$X = \mbf{P}^1_A$. Let $A'$ be another artinian 
local $\K$-algebra, and let
$f^* : A \to A'$ be a finite homomorphism. Define 
$X' := \mbf{P}^1_{A'}$. We get an induced finite morphism of schemes
$g : X' \to X$. Then for any differential form 
$\alpha \in \Omega^1_{\bsym{k}(X) / A}$ one has
\[ \sum_{x \in X \tup{ closed}} f^*(\opn{Res}_{x} (\alpha)) = 
\sum_{x' \in X' \tup{ closed}} \opn{Res}_{x'} (g^*(\alpha)) . \]
\end{lem}

\begin{proof}
Let us write
$X = U \cup \{ \infty \}$ with 
$U := \mbf{A}^1_A = \opn{Spec} B$ and $B := A[t]$. 
So $\alpha = \frac{\beta}{b}$ for some differential form
$\beta \in \Omega^1_{B / A}$ and some regular element
$b \in B$. Define $B' := A'[t]$ and 
$U' := \mbf{A}^1_{A'} = \opn{Spec} B'$. So $X'$ decomposes into 
$U' \cup \{ \infty' \}$. By Lemma \ref{lem8.2} and 
Proposition \ref{prop5.8} we have
\[ \begin{aligned}
& \sum_{x \in U \tup{ closed}} f^*(\opn{Res}_{x} (\alpha)) = 
f^*( \opn{Res}_{B / A} \smgfrac{\beta}{b}) = \\
& \qquad \opn{Res}_{B' / A'} \smgfrac{g^*(\beta)}{g^*(b)} =
\sum_{x' \in U' \tup{ closed}} \opn{Res}_{x'} (g^*(\alpha)) . 
\end{aligned} \]

At $\infty$ we will use the coordinate $s := \smfrac{1}{t}$.
Then $\alpha = \frac{\gamma}{s^e}$
for some $e \geq 0$ and $\gamma \in \Omega^1_{X / A, \infty}$.
Choose a sufficiently small affine open neighborhood 
$V = \opn{Spec} C$ of $\infty$ in $X$, so that 
$\gamma \in \Gamma(V, \Omega^1_{X / A})$,
but the origin $O$ is not in $V$; so that
$s \in \Gamma(V, \mcal{O}_X)$. 
Define $C' := A' \otimes_A C$. Again using Lemma \ref{lem8.2} 
and Proposition \ref{prop5.8} we obtain
\[ \begin{aligned}
& f^*(\opn{Res}_{\infty} (\smfrac{\gamma}{s^e})) = 
f^*( \opn{Res}_{C / A} \smgfrac{\gamma}{s^e}) = \\
& \qquad \opn{Res}_{C' / A'} \smgfrac{g^*(\gamma)}{g^*(s^e)} =
\opn{Res}_{\infty'} (g^*(\smfrac{\gamma}{s^e})) . 
\end{aligned} \]
\end{proof}

\begin{thm}[Residue Theorem for $\mbf{P}^1$] \label{thm8.2}
Suppose $A$ is an artinian, local, essentially finite type 
$\K$-algebra, and $X = \mbf{P}^1_A$. Let $M$ be an $A$-module and 
let $\alpha \in \Omega^1_{\bsym{k}(X) / A} \otimes_A M$. 
Then
\[ \sum_{x \in X \textup{ closed}}
\opn{Res}_{x; M} (\alpha) = 0 . \]
\end{thm}

\begin{proof}
The homomorphism 
\[ \sum_{x \in X \textup{ closed}}
\opn{Res}_{x; M} : \Omega^1_{\bsym{k}(X) / A} \otimes_A M \to M \]
is functorial in $M$. Thus we can assume that $M$ is finitely 
generated; and by induction on length, we can also assume $M$ is 
simple. Thus we may assume $M \cong K$, where $K$ is the residue 
field of $A$. 
Consider the ring homomorphism $f^* : A \to K$.  
Because $A \otimes_A M \cong K \otimes_K M$, and by 
Lemma \ref{lem8.3}, we can replace $A$ with $K$.

So let us assume that $A = K$ is a field, and 
$M = K$. Let $t$ be the 
coordinate on the finite part of $X$, i.e.\
$X = \mbf{A}^1_K \cup \{ \infty \}$ and
$\mbf{A}^1_K = \opn{Spec} K[t]$. 
We can write $\alpha$ as a fraction
$\alpha = \frac{f(t)}{g(t)} \d t$ where $f(t), g(t)$ are 
polynomials. Choose some finite field extension $K \to K'$ which 
splits the polynomials $f(t)$ and $g(t)$. By Lemma \ref{lem8.3} we 
can replace $K$ with $K'$. So we can assume $f(t)$ and $g(t)$ are 
products of linear terms. Now we may apply partial fraction 
decomposition to the rational function 
$\frac{f(t)}{g(t)}$. So we can assume that either
$\alpha = (t - a)^{-e} \d t$  for some $a \in K$ and $e \geq 1$; 
or that $\alpha = t^e \d t$ for $e \geq 0$. 

Consider the case $\alpha = (t - a)^{-e} \d t$. Applying the
linear change of coordinates $t \mapsto t-a$
(which is permitted by Lemma
\ref{lem8.2} and Proposition \ref{prop5.8}) 
we can assume that $a = 0$.
Let $O \in X$ be the origin. At any closed point 
$x \in X$ except $O$ and $\infty$ one has
$\opn{Res}_{x} (\alpha) = 0$. According to Lemma \ref{lem8.2}
and Proposition \ref{prop5.5} we have
$\opn{Res}_O (\alpha) = \epsilon$ if  $e = 1$, and 
$\opn{Res}_O (\alpha) = 0$ otherwise.
By change of coordinates $t \mapsto s := t^{-1}$ we get
$\alpha = -s^{e-2} \d s$, and the same calculation gives
$\opn{Res}_{\infty} (\alpha) = -\epsilon$ if $e = 1$, 
and $\opn{Res}_{\infty} (\alpha) = 0$ otherwise. 

Finally consider the case $\alpha = t^e \d t$. Then by 
Lemma \ref{lem8.2} and Proposition \ref{prop5.5} we get
$\opn{Res}_x (\alpha) = 0$ at all points.
\end{proof}

\begin{thm}[Residue Theorem for Proper Morphisms] \label{thm8.3}
Let $f : X \to Y$ be a proper morphism between finite 
type $\K$-schemes. Then
$\opn{Tr}_f : f_* \mcal{K}_X \to \mcal{K}_Y$ 
is a homomorphism of complexes.
\end{thm}

\begin{proof}
The proof is in several steps.

\medskip \noindent
Step 1. First consider the case of a finite morphism $f$. 
According to Theorem \ref{thm5.3} we have an isomorphism
$\mcal{K}_X \iso f^{\flat} \mcal{K}_Y$,
which is the same as an isomorphism 
\[ \psi : f_* \mcal{K}_X \iso f_* f^{\flat} \mcal{K}_Y = 
\mcal{H}om_{\mcal{O}_Y} (f_* \mcal{O}_X, \mcal{K}_Y) . \]
By definition \ref{dfn6.1}, the trace
$\opn{Tr}_f : f_* \mcal{K}_X \to \mcal{K}_Y$ 
is transformed by $\psi$ into the homomorphism
$\opn{Tr}_{f; \mcal{K}_Y}^{\flat} : 
f_* f^{\flat} \mcal{K}_Y \to \mcal{K}_Y$,
namely evaluation at $1$. And the latter 
is a homomorphism of complexes.

\medskip \noindent
Step 2. Now let $f$ be any proper morphism. For any point
$x \in X$ let $y := f(x) \in Y$, and denote by 
$\opn{Tr}_{f, x} : \mcal{K}_X(x) \to \mcal{K}_Y(y)$
the corresponding component of $\opn{Tr}_{f}$ (see Definition 
\ref{dfn6.1}). Also, for any point $x' \in X$ which is an immediate 
specialization of $x$, let us denote by  
$\delta_{X, (x, x')} : \mcal{K}_X(x) \to \mcal{K}_X(x')$
the corresponding component of the coboundary operator
$\delta_X : \mcal{K}_X \to \mcal{K}_X$.

There are two kinds of identities we must check. The first 
is when $\opn{dim}_{\K}(x) = \opn{dim}_{\K}(y)$, and
$y' \in Y$ is any point which is an immediate specialization of $y$.
We must then show that given any element $\alpha \in \mcal{K}_X(x)$
the equality
\[ \sum_{x'} (\opn{Tr}_{f, x'} \circ \, \delta_{X, (x, x')})
(\alpha) = 
(\delta_{Y, (y, y')} \circ \opn{Tr}_{f, x}) (\alpha) \]
holds in $\mcal{K}_Y(y')$. The sum is over all points 
$x' \in f^{-1}(y')$ which are immediate specializations of $x$.
This case will be treated now; the other case will be taken care 
of in the subsequent steps.

It is possible to choose a nilpotent closed subscheme $X_0$ of $X$
which is supported on the closed set $\overline{\{ x \}}$,
and such that $\alpha \in \mcal{K}_{X_0}(x)$. The transitivity of 
traces (Proposition \ref{prop8.2}) 
implies that we may replace $X$ with 
$X_0$. Now $f : X \to Y$ is proper and quasi-finite, hence finite; 
and we can apply step 1.

\medskip \noindent
Step 3. In this step we assume that 
$\opn{dim}_{\K}(x) = \opn{dim}_{\K}(y) +1$, and we must show that
\begin{equation} \label{eqn8.1}
\sum_{x'} (\opn{Tr}_{f, x'} \circ \, \delta_{X, (x, x')})
(\alpha) = 0 .
\end{equation}
Here the sum is over the points $x' \in X$ which are immediate 
specializations of $x$; these points necessarily lie in $f^{-1}(y)$.
As done in step 2, we can find nilpotent closed subschemes 
$X_0$ and $Y_0$, supported on 
$\overline{\{ x \}}$ and $\overline{\{ y \}}$ respectively,
such that $\alpha \in \mcal{K}_{X_0}(x)$ and 
$f : X_0 \to Y$ factors via $Y_0$. 
Observe that the identity (\ref{eqn8.1}) 
depends only on the homomorphisms 
$\mcal{O}_{Y_0, y} \to \mcal{O}_{X_0, x'} \to \mcal{O}_{X_0, x}$, 
when these rings are considered as essentially finite type 
$\K$-algebras. 

Define $A := \mcal{O}_{Y_0, y}$.
Let us choose a ring $\K'$ which is a localization of a 
polynomial algebra $\K[t_1, \ldots, t_n]$, and which admits a finite 
homomorphism $\K' \to A$. Then $\K'$ is also a regular noetherian 
ring of finite Krull dimension, and the rigid dualizing 
complex of $\K'$ relative to $\K$ is $\Omega^n_{\K' / \K}[n]$.
In view of Proposition \ref{prop4.5} and Corollary \ref{cor7.10}, 
we can replace $\K$ with $\K'$ -- it amounts to twisting by the 
inverse of $\Omega^n_{\K' / \K}[n]$, which does not effect 
(\ref{eqn8.1}). We conclude that we may replace $Y$ with
$\opn{Spec} A$ and $X$ with $X_0 \times_{Y_0} \opn{Spec} A$.

\medskip \noindent
Step 4. In this step we assume that $A$ is a local artinian finite 
$\K$-algebra, and $X$ is a proper curve over $A$, with generic point 
$x$. Given $\alpha \in \mcal{K}_{X}(x)$, we have to verify 
(\ref{eqn8.1}); and the sum is over all closed points 
$x' \in X$. As explained in \cite[p.\ 373]{RD}, the morphism 
$f : X \to Y = \opn{Spec} A$ factors via a finite morphism
$X \to \mbf{P}^1_A$. Because of step 1 we can replace $X$ with 
$\mbf{P}^1_A$.

Let $x'$ be any closed point in $X = \mbf{P}^1_A$. 
It is immediate from Definitions \ref{dfn8.2} and \ref{dfn8.3}
that under the isomorphisms
\[ \mcal{K}_{X}(x) \cong
\mrm{H}^0_x (\Omega^1_{X / A} \otimes_A \mcal{K}(A))
\cong 
(\mrm{H}^0_x \Omega^1_{X / A}) \otimes_A \mcal{K}(A)
\cong 
\Omega^1_{\bsym{k}(X) / A} \otimes_A
\mcal{K}(A) \]
the homomorphism
\[ \opn{Tr}_{f, x'} \circ \, \delta_{X, (x, x')} :
\mcal{K}_{X}(x) \to \mcal{K}(A) \]
goes to the residue map
\[ \opn{Res}_{x'; \mcal{K}(A)} : 
\Omega^1_{\bsym{k}(X) / A} \otimes_A \mcal{K}(A) \to
\mcal{K}(A) . \]
So Theorem \ref{thm8.2} applies with $M := \mcal{K}(A)$.
\end{proof}

\begin{cor} \label{cor8.1}
\begin{enumerate}
\item Let $f : X \to Y$ be a proper morphism between  
finite type $\K$-schemes. Then there is a morphism of functors
$\opn{Tr}_{f} : \mrm{R} f_* f^! \to \bsym{1}$
of functors from 
$\msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_Y)$
to itself.
%
\item The assignment $f \mapsto \opn{Tr}_f$ above 
is $2$-functorial for proper morphisms. Namely, given another 
proper morphism $g : Y \to Z$, the diagram
\[ \UseTips  \xymatrix @C=5ex @R=4ex {
\mrm{R} (g \circ f)_* \, (g \circ f)^! 
\ar[r]^(0.52){\phi_{g, f}}
\ar[d]^{\opn{Tr}_{g \circ f}}
& \mrm{R} (g \circ f)_* \, f^! \, g^! 
\ar@(r,ul)[dr]^(0.6){\cong}
\\
\bsym{1}_{\msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_Z)}
& \mrm{R} g_* \, g^! 
\ar[l]_{\opn{Tr}_g}
& \mrm{R} g_* \, \mrm{R} f_* \, f^! \, g^! 
\ar[l]_(0.6){\opn{Tr}_f}
} \]
is commutative, where the isomorphism marked ``$\cong$''
is the standard isomorphism of functors
$\mrm{R} (g \circ f)_* \cong \mrm{R} g_* \, \mrm{R} f_*$,
and $\phi_{g, f}$ is from Corollary \tup{\ref{cor6.1}}. 
If $X = Y$ and $f = \bsym{1}_X$, then $\opn{Tr}_{f}$
is the identity automorphism of
$f^! =  
\bsym{1}_{\msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)}$. 
\end{enumerate}
\end{cor}

In the diagram there is a little bit of sloppiness; for instance,
instead of ``$\phi_{g, f}$'' we should have really written 
``$\mrm{R} (g \circ f)_*(\phi_{g, f})$''.

\begin{proof}
(1) Take any 
$\mcal{N} \in \msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_Y)$.
By definition of $f^!$ we have
\[ f^! \mcal{N} = 
\mcal{H}om_{\mcal{O}_X} \big( \mrm{L} f^* \,
\mcal{H}om_{\mcal{O}_Y}(\mcal{M}, \mcal{K}_Y), \mcal{K}_X \big) , \]
and hence
\[ \mrm{R} f_* f^! \mcal{N} =
\mrm{R} \mcal{H}om_{\mcal{O}_Y} \big(
\mcal{H}om_{\mcal{O}_Y}(\mcal{M}, \mcal{K}_Y), f_* \mcal{K}_X \big)
. \]
According to Theorem \ref{thm8.3} the trace map
$\opn{Tr}_f : f_* \mcal{K}_X \to \mcal{K}_Y$
is a homomorphism of complexes, and so we obtain a morphism
\[ \tau : \mrm{R} f_* f^! \mcal{N} \to 
\mcal{H}om_{\mcal{O}_Y} \big(
\mcal{H}om_{\mcal{O}_Y}(\mcal{M}, \mcal{K}_Y), \mcal{K}_Y \big)
= \mrm{D}_Y \mrm{D}_Y \mcal{N} \]
in $\msf{D}^{+}_{\mrm{c}}(\cat{Mod} \mcal{O}_Y)$. 
Using the adjunction isomorphism 
$\phi_Y : \mcal{N} \iso \mrm{D}_Y \mrm{D}_Y \mcal{N}$
we define
\[ \opn{Tr}_{f; \mcal{N}} := \phi_Y^{-1} \circ \tau :
\mrm{R} f_* f^! \mcal{N} \to \mcal{N} . \]
As $\mcal{N}$ varies this becomes a morphism of functors
$\opn{Tr}_{f} : \mrm{R} f_* f^! \to \bsym{1}$.

\medskip \noindent
(2) Recall that the isomorphism $\phi_{g, f}$ was defined solely 
using adjunction formulas. By Proposition \ref{prop8.2}
the traces are transitive:
$\opn{Tr}_{g} \circ \opn{Tr}_{f} = \opn{Tr}_{g \circ f}$.
This implies the commutativity of the diagram. Finally, 
for the identity automorphism $\bsym{1}_X : X \to X$, the trace
$\opn{Tr}_{\bsym{1}_X} : \mcal{K}_X \to \mcal{K}_X$
is the identity automorphism of this complex. 
\end{proof}

\begin{thm}[Duality for Proper Morphisms] \label{thm8.4}
Let $f : X \to Y$ be a proper morphism of finite type
$\K$-schemes, let
$\mcal{M} \in \msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_X)$
and let
$\mcal{N} \in \msf{D}^{\mrm{b}}_{\mrm{c}}
(\cat{Mod} \mcal{O}_Y)$.
Then the morphism
%\begin{equation} \label{eqn7.1}
\[ \mrm{R} f_* \mrm{R} \mcal{H}om_{\mcal{O}_X}
(\mcal{M}, f^! \mcal{N}) \to
\mrm{R} \mcal{H}om_{\mcal{O}_Y}
(\mrm{R} f_* \mcal{M}, \mcal{N}) \]
%\end{equation}
in $\msf{D}(\cat{Mod} \mcal{O}_Y)$
induced by 
$\opn{Tr}_f : \mrm{R} f_* f^! \mcal{N} \to \mcal{N}$ 
is an isomorphism.
\end{thm}

\begin{proof}
Using the same reduction as in the proof of 
\cite[Theorem VII.3.3]{RD} we can assume $Y$ is affine, 
$X = \mbf{P}^n_Y$ and $f$ is the projection. 

For fixed 
$\mcal{N} \in \msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_Y)$
the contravariant functors 
$\mrm{R} f_* \mrm{R} \mcal{H}om_{\mcal{O}_X}(-, f^! \mcal{N})$
and
$\mrm{R} \mcal{H}om_{\mcal{O}_Y}(\mrm{R} f_* -, \mcal{N})$
are way-out left, in the sense of \cite[Section I.7]{RD}. 
Let $\bsym{\omega} := \Omega^n_{X/Y}$, and for any integer $i$
let $\bsym{\omega}(i)$ be the Serre twist.
As explained in the proof of \cite[Theorem III.5.1]{RD}, any 
coherent $\mcal{O}_{X}$-module is a quotient of a finite direct 
sum $\boplus_{j=1}^m \bsym{\omega}(-i_j)$ for some
$i_1, \ldots, i_m > 0$. Therefore, using 
\cite[Proposition I.7.1]{RD}, reversed so as to handle 
contravariant functors, we can assume that 
$\mcal{M} = \bsym{\omega}(-i)[n]$ with $i > 0$.

Now the coherent sheaves $\bsym{\omega}(-i)$ and 
$\mrm{R}^n f_* \bsym{\omega}(-i)$ are locally free, 
and $\mrm{R}^j f_* \bsym{\omega}(-i) = 0$ for $j \neq n$.
Also we know that  
$f^! - \cong \bsym{\omega}[n] \otimes_{\mcal{O}_{X}} 
f^* -$ 
(see Corollary \ref{cor5.1}).
Therefore the functors 
$\mrm{R} f_* \mrm{R} \mcal{H}om_{\mcal{O}_X}
\bigl( \bsym{\omega}(-i)[n], f^! - \bigr)$
and
$\mrm{R} \mcal{H}om_{\mcal{O}_Y} 
\bigl( \mrm{R} f_* \bsym{\omega}(-i)[n], - \bigr)$
are way-out in both directions. Once again using 
\cite[Proposition I.7.1]{RD} we can reduce to the case
$\mcal{N} = \mcal{O}_{Y}$. 

At this stage we have to prove that the morphism 
\[ \theta : \mrm{R} f_* \mrm{R} \mcal{H}om_{\mcal{O}_X}
\bigl( \bsym{\omega}(-i)[n], \bsym{\omega}[n] \bigr) \to
\mrm{R} \mcal{H}om_{\mcal{O}_Y} 
\bigl( \mrm{R} f_* \bsym{\omega}(-i)[n], \mcal{O}_{Y} \bigr) \]
is an isomorphism. By definition 
$\theta = \gamma \circ \beta$, where 
\[ \beta : \mrm{R} f_* \mrm{R} \mcal{H}om_{\mcal{O}_X}
\bigl( \bsym{\omega}(-i)[n], \bsym{\omega}[n] \bigr) \to
\mrm{R} \mcal{H}om_{\mcal{O}_Y}
\bigl( \mrm{R} f_* \bsym{\omega}(-i)[n], 
\mrm{R} f_* \bsym{\omega}[n] \bigr) \]
is the canonical morphism, and 
\[ \gamma : \mrm{R} \mcal{H}om_{\mcal{O}_Y}
\bigl( \mrm{R} f_* \bsym{\omega}(-i)[n], 
\mrm{R} f_* \bsym{\omega}[n] \bigr) \to 
\mrm{R} \mcal{H}om_{\mcal{O}_Y}
\bigl( \mrm{R} f_* \bsym{\omega}(-i)[n], \mcal{O}_{Y} \bigr) \]
is induced by
\[ \opn{Tr}_f : \mrm{R} f_* \bsym{\omega}[n] \cong
\mrm{R} f_* f^! \mcal{O}_Y \to \mcal{O}_Y . \]
Consider the canonical isomorphism
\[ \alpha : \mrm{R} f_* \mcal{O}_{X}(i) \iso
\mrm{R} \mcal{H}om_{\mcal{O}_Y}
\bigl( \mrm{R} f_* \bsym{\omega}(-i)[n], 
\mrm{R} f_* \bsym{\omega}[n] \bigr) \]
The composite
$\beta \circ \alpha$ is an isomorphism, because the cup product 
pairing
\[ f_* \mcal{O}_{X}(i) \times \mrm{R}^n f_* \bsym{\omega}(-i)
\to \mrm{R}^n f_* \bsym{\omega} \]
is perfect (see \cite[Theorem III.3.4]{RD}). Hence $\beta$ 
is an isomorphism. It remains to prove that $\gamma$ is also
an isomorphism. 

To accomplish this we will prove that the trace
$\opn{Tr}_f : \mrm{R} f_* f^! \mcal{O}_Y \to \mcal{O}_Y$
is an isomorphism. We know that 
$f^! \, \mcal{O}_Y \cong \bsym{\omega}[n]$, 
$\mrm{R}^j f_* \,  f^! \, \mcal{O}_Y \cong
\mrm{R}^{j+n} f_* \, \bsym{\omega} = 0$ 
for $j \neq 0$, and that 
$\mrm{R}^0 f_* \, f^! \, \mcal{O}_Y \cong
\mrm{R}^{n} f_* \, \bsym{\omega} \cong \mcal{O}_Y$.
Since $\mrm{R}^0 f_* \, f^! \, \mcal{O}_Y$ is a free 
$\mcal{O}_Y$-module of rank $1$, it suffices to show that 
$\mrm{H}^0(\opn{Tr}_f) : \mrm{R}^0 f_* \, f^! \, \mcal{O}_Y \to
\mcal{O}_Y$
is surjective. 
Choose any section $g : Y \to X$ of $f$. Then according to 
Corollary \ref{cor8.1}(2) we have
$\mrm{H}^0(\opn{Tr}_f) \circ \mrm{H}^0(\opn{Tr}_g) = 
\mrm{H}^0(\opn{Tr}_{\bsym{1}_Y})$,
implying that indeed $\mrm{H}^0(\opn{Tr}_f)$ is surjective.
\end{proof}



%\newpage
%% ** section 8 **
\section{The Relative Dualizing Sheaf}
\label{sec8}

In this section $\K$ denotes a regular noetherian 
commutative ring of finite Krull dimension. All schemes are by 
default finite type $\K$-schemes, all algebras are by default 
essentially finite type $\K$-algebras, 
and all morphisms are over $\K$. 
The base ring $\K$ will have no visible role here; it will only be 
in the background, making rigid residue complexes and the 
$2$-functor $f \mapsto f^!$ available. 

Let us begin with a few facts about $f^!$ for flat morphisms.
\begin{lem} \label{lem9.7}
Suppose $f : X \to Y$ is a flat morphism. Then
\[ f^! \mcal{M} = 
\mcal{H}om_{f^{-1} \mcal{O}_Y} \big( f^{-1}
\mcal{H}om_{\mcal{O}_Y}(\mcal{M}, \mcal{K}_Y), \mcal{K}_X \big)  
\]
for 
$\mcal{M} \in \msf{D}^{\mrm{b}}_{\mrm{c}}(\cat{Mod} \mcal{O}_Y)$.
\end{lem}

\begin{proof}
Due to flatness the rigid residue complex
$\mcal{K}_X$ is a bounded complex of injective 
$f^{-1} \mcal{O}_Y$-modules.
\end{proof}

Given an algebra $A$ we define the rigid residue complex of $A$ to 
be $\mcal{K}_A := \Gamma(U, \mcal{K}_U)$
where $U := \opn{Spec} A$.

\begin{prop} \label{prop5.6}
Let $f^* : A \to B$ be a flat homomorphism of $\K$-algebras. 
\begin{enumerate}
\item The complex $f^! A$ has finite flat dimension over $A$.
\item There is a functorial isomorphism 
$f^! M \cong M \otimes^{\mrm{L}}_{A} f^! A$
for $M \in \msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} A)$.
\end{enumerate}
\end{prop}

\begin{proof}
Since $A \to B$ is flat it follows that each 
$\mcal{K}_B^p$ is an injective $A$-module. Let $d_1, d_2$ be the 
amplitudes of the complexes $\mcal{K}_A$ and $\mcal{K}_B$
respectively. 

Given $M \in \msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} A)$, let
$M'$ be the complex obtained from $M$ by truncating above and 
below the degrees where the cohomology is nonzero. According to  
Lemma \ref{lem9.7} one has
$f^! M \cong \mrm{Hom}_{A} \big( \mrm{Hom}_{A}
(M', \mcal{K}_A), \mcal{K}_B \big)$.
Therefore 
\[ \opn{amp} \mrm{H} f^! M \leq 
\opn{amp} \mrm{H} M + d_1 + d_2 . \]

Next choose a resolution $P \to M$ by a bounded above complex of 
finitely generated free $A$-modules. Then
\[ f^! M 
\cong \mrm{Hom}_{A} \big( 
\mrm{Hom}_{A}(P, \mcal{K}_A), \mcal{K}_B \big) 
\cong P \otimes_A \mrm{Hom}_{A}(\mcal{K}_A, \mcal{K}_B) 
\cong M \otimes^{\mrm{L}}_{A} f^! A . \]
This proves part (2), and also shows that
$\opn{flat{.}dim}_A f^! A \leq d_1 + d_2$.
\end{proof}

\begin{prop} \label{prop5.7}
Let $f^* : A \to B$ be a flat homomorphism of $\K$-algebras.
The canonical morphism
\[ (f^! A) \otimes^{\mrm{L}}_{A} R_A  \cong
\mrm{RHom}_{A}(R_A, R_B) \otimes^{\mrm{L}}_{A} R_A \to R_B \]
is an isomorphism.
\end{prop}

\begin{proof}
Let us denote this morphism by $\psi$, and let $N$ be the cone on 
$\psi$. So $\psi$ is an isomorphism if and only $N = 0$.
By Proposition \ref{prop5.6} the complex 
$(f^! A) \otimes^{\mrm{L}}_{A} R_A$ has bounded cohomology, and 
hence $N \in \msf{D}^{\mrm{b}}(\cat{Mod} A)$.
According to Lemma \ref{lem9.5} the complex
$R_A$ generates $\msf{D}^{\mrm{b}}(\cat{Mod} A)$, and we conclude 
that $N = 0$ if and only if the morphism
\[ \psi' : \mrm{RHom}_{A} \big( R_A, 
\mrm{RHom}_{A}(R_A, R_B) \otimes^{\mrm{L}}_{A} R_A \big) \to
\mrm{RHom}_{A}( R_A, R_B) \]
induced by $\psi$ is an isomorphism. We know that 
$\mrm{RHom}_{A}(R_A, R_B)$ has finite flat dimension over $A$ -- 
again, this is by Proposition \ref{prop5.6}. 
Using Proposition \ref{prop2.4}, under its assumption (iii.b), 
we can pass from $\psi'$ to the morphism 
\[ \mrm{RHom}_{A}(R_A, R_B) \otimes^{\mrm{L}}_{A} 
\mrm{RHom}_{A}(R_A, R_A) \to \mrm{RHom}_{A}(R_A, R_B) , \]
which is evidently an isomorphism.
\end{proof}

A flat morphism of schemes $f : X \to Y$ is said to 
have {\em relative dimension} $n$ if all its fibers 
are equidimensional of dimension $n$. 

\begin{dfn} \label{dfn9.1}
Let $f : X \to Y$ be a flat morphism of relative dimension $n$. 
The {\em relative dualizing sheaf} is
\[ \bsym{\omega}_{X / Y} := 
\mrm{H}^{-n} f^! \mcal{O}_{Y} . \]
\end{dfn}

Some authors refer to $\bsym{\omega}_{X / Y}$ as the {\em relative
canonical sheaf}.
The $\mcal{O}_{X}$-module $\bsym{\omega}_{X / Y}$ is coherent. We 
now study some more of its properties.

\begin{prop} \label{prop9.6}
Let $f : X \to Y$ be flat of relative dimension $n$, and let $U$ 
be an open subset of $X$ such that $f|_U : U \to Y$ is smooth.
Then there is a canonical isomorphism 
$\bsym{\omega}_{X / Y}|_U \cong \Omega^n_{X / Y}|_U$.
\end{prop}

\begin{proof}
Define $f' := f|_U$. By Corollary \ref{cor5.1} there is an
isomorphism
${f'}^! \mcal{O}_Y \cong {f'}^{\sharp} \mcal{O}_Y = 
\Omega^n_{U / Y}[n]$.
\end{proof}

\begin{prop} \label{prop9.1}
Let $f : X \to Y$ be a flat morphism of relative dimension $n$. 
Then 
$\mrm{H}^{i} f^! \mcal{O}_{Y} = 0$ for all $i < -n$. 
Consequently, truncation gives rise to a canonical morphism
\[ \gamma_f : \bsym{\omega}_{X / Y}[n] \to
f^! \mcal{O}_{Y} \]
in $\msf{D}(\cat{Mod} \mcal{O}_X)$.
\end{prop}

\begin{proof}
In view of Lemma \ref{lem9.7}, it suffices to show that the complex 
\linebreak
$\mcal{H}om_{f^{-1} \mcal{O}_Y} 
(f^{-1} \mcal{K}_{Y}, \mcal{K}_{X})$
is concentrated in degrees $\geq -n$.
Suppose we are given a local section 
$\phi \in \mcal{H}om_{f^{-1} \mcal{O}_Y} 
(f^{-1} \mcal{K}_{Y}, \mcal{K}_{X})^i$
which has a nonzero component 
going from $\mcal{J}(y)$ to $\mcal{J}(x)$,
for some points $y \in Y$ and $x \in X$; see Section \ref{sec7} 
for notation. Then we must have
$x \in f^{-1}(y)$. But the dimension of the 
fiber $f^{-1}(y)$ is $n$, and hence 
$\opn{dim}_{\K}(x) \leq \opn{dim}_{\K}(y) + n$, so 
$i \geq -n$.
\end{proof}

Recall that our notation for the residue field of a point 
$x \in X$ is $\bsym{k}(x)$. In case $X$ is an integral scheme with 
generic point $x$, we also write $\bsym{k}(X)$ for this field, 
which is of course the function field of $X$.

Suppose $K$ is a field, and $L$ is a finitely generated extension 
field of $K$ (i.e.\ $L$ is an essentially finite type 
$K$-algebra). Let $M$ be a finite separable field extension of 
$L$, and denote by $\opn{tr}_{M / L} : M \to L$
the trace map. Since the homomorphism
$M \otimes_L \Omega_{L / K} \to \Omega_{M / K}$
is bijective, we obtain an induced 
$\Omega_{L / K}$-linear homomorphism 
$\opn{tr}_{M / L} : \Omega_{M / K}  \to \Omega_{L / K}$.

\begin{thm} \label{thm9.1}
Let $X$ and $Y$ be integral schemes, and let $f : X \to Y$ be a 
flat morphism of relative dimension $n$. Assume $f$ is generically 
smooth. 
\begin{enumerate}
\item The coherent sheaf $\bsym{\omega}_{X / Y}$ is a subsheaf of 
the constant quasi-coherent sheaf \linebreak
$\Omega^n_{\bsym{k}(X) / \bsym{k}(Y)}$.
\item Suppose $U \subset X$ is a nonempty affine open set, and 
there is a commutative diagram 
\[ \UseTips
\xymatrix @=4ex {
U
\ar[r]^{\subset} 
\ar[d]_{g} 
& X
\ar[d]^{f} \\
Z
\ar[r]^{h} 
& Y } \]
with $Z$ an integral affine scheme; $h$ a smooth morphism; and $g$ 
a finite, dominant, separable morphism. Then
\[ \begin{aligned}
\Gamma(U, \bsym{\omega}_{X / Y}) = 
\big\{ \alpha \in \Omega^n_{\bsym{k}(X) / \bsym{k}(Y)} & \mid 
\opn{tr}_{\bsym{k}(X) / \bsym{k}(Z)}(a \alpha) \in 
\Gamma(Z, \Omega^n_{Z / Y}) \\
& \qquad \qquad \qquad \text{ for all }
a \in \Gamma(U, \mcal{O}_{X}) \big\} .
\end{aligned} \]
\end{enumerate}
\end{thm}

The proof of the theorem is after this lemma. 

\begin{lem} \label{lem9.1}
Let $K, L, M$ be fields. Assume $L$ is a  finitely 
generated separable extension of $K$, and $M$ is a finite separable 
extension of $L$. Let $n := \opn{tr{.}deg}_{K} L$.
\begin{enumerate}
\item The rigid dualizing complexes of $L$ and $M$ relative to $K$ 
are $\Omega^n_{L/K}[n]$ and \linebreak
$\Omega^n_{M/K}[n]$ respectively.
%
\item The trace map
$\opn{tr}_{M / L} : \Omega^n_{M / K}[n] \to
\Omega^n_{L / K}[n]$
is a rigid trace morphism relative to $K$.
\end{enumerate} 
\end{lem}

\begin{proof}
(1) The homomorphisms $K \to L$ and $K \to M$ are essentially 
smooth, so Proposition \ref{prop4.2} applies. 

\medskip \noindent 
(2) Let's denote the finite \'etale homomorphism $L \to M$ by $f^*$.
The trace map $\opn{tr}_{M / L} : M \to L$ is nondegenerate
(see Definition \ref{dfn2.2}). So by Proposition \ref{prop4.4},
Proposition \ref{prop4.5} and Corollary \ref{cor7.10}, it 
suffices to prove that $\opn{tr}_{M / L}$
is a rigid trace-like morphism relative to $L$
(see Definition \ref{dfn3.2}). Here $L$ has the 
tautological rigidifying isomorphism $\rho_{\mrm{tau}}$, and 
$M \cong f^{\sharp} L = \Omega^0_{M / L}$ has the rigidifying 
isomorphism $f^{\sharp}(\rho_{\mrm{tau}})$. 

This is an exercise in Galois theory. Using the 
transitivity of both the field traces $\opn{tr}_{- / -}$ 
and the rigid traces $\opn{Tr}_{- / -}$, we may assume that $M$ is 
a Galois extension of $L$. Denote the Galois group by $G$. Then
$M \otimes_L M \cong \prod_{g \in G} M^g$,
where the map $M \otimes_L M \to M^g$ is 
$a \otimes b \mapsto a \cdot g(b)$. 
The rigidifying isomorphism 
\[ f^{\sharp}(\rho_{\mrm{tau}}) : M \iso \opn{Hom}_{M \otimes_L M}
(M, M \otimes_L M) \]
identifies $M$ with $M^{g_0}$, where $g_0$ is the identity 
automorphism. By the properties of the trace for a Galois 
extension one has
$\opn{tr}_{M / L}(a) = \sum_{g \in G} g(a)$. 
A convolution-type calculation shows that under the isomorphism 
$M \otimes_L M \cong \prod_{g \in G} M^g$, 
the map
$\opn{tr}_{M / L} \otimes \opn{tr}_{M / L}$ is sent to
$\sum_{g \in G} \opn{tr}_{M^g / L}$. 
Hence the diagram
\[ \UseTips  \xymatrix @C=7ex @R=4ex {
M 
\ar[r]^(0.25){f^{\sharp}(\rho_{\mrm{tau}})}
\ar[d]_{\opn{tr}_{M / L}}
& \mrm{Hom}_{M \otimes_L M} \big( M, M \otimes_L M \big) 
\ar[d]^{\opn{tr}_{M / L} \, \otimes \, \opn{tr}_{M / L}} \\
L
\ar[r]^(0.25){\rho_{\mrm{tau}}}
& \mrm{Hom}_{L \otimes_L L} \big( L, L \otimes_L L \big) 
} \]
in $\msf{D}(\cat{Mod} L)$ is commutative, and thus indeed 
$\opn{tr}_{M / L}$ is a rigid trace-like morphism.
\end{proof}

\begin{proof}[Proof of Theorem \tup{\ref{thm9.1}}]
(1) By Proposition \ref{prop9.1} there is a canonical morphism  
\linebreak
$\gamma_f : \bsym{\omega}_{X / Y}[n] \to f^! \mcal{O}_{Y}$.
Since $f$ is generically smooth, there is a nonempty open set 
$U_0 \subset X$ such that $f : U_0 \to Y$ is smooth. 
According to Proposition \ref{prop9.6} 
there is a canonical isomorphism 
$f^! \mcal{O}_{Y} |_{U_0} \cong \Omega^n_{U_0 / Y}[n]$. 
Combining these morphisms and passage to the generic stalk, 
we obtain a sheaf homomorphism
$\lambda : \bsym{\omega}_{X / Y} \to 
\Omega^n_{\bsym{k}(X) / \bsym{k}(Y)}$. 
It remains to prove that $\lambda$ is injective.

Pick a point $x \in X$. Using quasi-normalization
and Zariski's Main Theorem 
\cite[Chapter IV, Sections 8.12.3. and 13.3.1]{EGA}
we know that there exists an affine open 
neighborhood $U = \opn{Spec} D$ 
of $x$ in $X$, and a commutative diagram
\[ \UseTips
\xymatrix @=4ex {
W 
\ar[d]_{g}
& U
\ar[l]_{\supset}
\ar[r]^{\subset} 
\ar[d] 
& X
\ar[d]^{f} \\
Z
\ar[r]^{h} 
& V 
\ar[r]^{\subset} 
& Y } \]
where $V = \opn{Spec} A$ is an affine open set in $Y$; 
$Z = \opn{Spec} B$ and $W = \opn{Spec} C$   
are affine integral schemes;
$U \to W$ is an open immersion; $g : W \to Z$ is finite 
dominant; and $h : Z \to V$ is smooth.
Then
\[ \bsym{\omega}_{C / A} =
\mrm{H}^0 (h \circ g)^{!} A \cong 
\mrm{H}^0 g^! h^{!} A \cong \mrm{H}^0 g^{\flat} h^{\sharp} A
\cong \opn{Hom}_B(C, \Omega^n_{B / A}) . \]
This is a torsion-free $C$-module, i.e.\ it embeds in
\[ M \otimes_C \opn{Hom}_B(C, \Omega^n_{B / A}) \cong
\opn{Hom}_L(M, \Omega^n_{L / A}) \cong \Omega^n_{M / K} , \]
where $K := \opn{Frac} A$, 
$L := \opn{Frac} B$ and $M := \opn{Frac} C$.
But on the other hand 
\[ \Gamma(U, \bsym{\omega}_{X / Y}) = 
\bsym{\omega}_{D / A} \cong 
D \otimes_C \bsym{\omega}_{C / A} . \]
 
\medskip \noindent 
(2) Here, in the notation of the proof of part (1), we have 
$U = W$, and in addition $L \to M$ is separable. The rigid trace
$\opn{Tr}_g$ gives rise to an isomorphism
\[ \Gamma(U, \bsym{\omega}_{X / Y}) = \bsym{\omega}_{D / A} \cong
\opn{Hom}_B(D, \Omega^n_{B / A}) . \]
Now $D \to M$ is essentially \'etale, $D \to B$ is finite, and 
$L \cong B \otimes_D M$. Hence 
by Corollary \ref{cor2.7} and Lemma \ref{lem9.1} the diagram
\[ \UseTips  \xymatrix @C=4ex @R=4ex {
\bsym{\omega}_{D / A} 
\ar[r]^{\subset}
\ar[d]_{\opn{Tr}_{g}}
& \Omega^n_{M / K}
\ar[d]^{\opn{tr}_{M / L}} \\
\Omega^n_{B / A}
\ar[r]^{\subset}
& \Omega^n_{L / K}
} \]
is commutative.
\end{proof}

\begin{rem}
There are notions of differential forms and traces for 
inseparable field extensions due to Kunz. Presumably 
these can be used to remove the separability assumption from 
part (2) of Theorem \ref{thm9.1}. Cf.\ \cite{HK}.
\end{rem}





%\newpage
%% ** section 9 **
\section{Base Change and Traces}
\label{sec9}

As before we work in the category $\cat{FTSch} / \K$ of finite 
type $\K$-schemes, where $\K$ is a regular finite dimensional 
noetherian ring. The main results in this section are Theorems 
\ref{thm9.2}  and \ref{thm9.3}, which were first obtained by Conrad 
\cite[Theorems 3.6.1 and 3.6.5]{Co}. Indeed, 
Conrad proved somewhat more general results, since he only assumed 
his schemes are noetherian and admit dualizing complexes. On 
the other hand, our proofs, which rely on rigidity, 
are significantly easier (and shorter) than Conrad's.

\begin{prop} \label{prop9.3}
Let $f^* : A \to B$ be a flat finite type 
homomorphism of $\K$-algebras. The 
complex $f^! A \in \msf{D}^{\mrm{b}}(\cat{Mod} B)$ has a unique 
rigidifying isomorphism 
$\rho_{B / A} : f^! A \iso \opn{Sq}_{B / A} f^! A$, such that 
under the canonical isomorphism
$(f^! A) \otimes^{\mrm{L}}_{A} R_A \cong R_B$
from Proposition \tup{\ref{prop5.7}} one has
$\rho_{B / A} \otimes \rho_{A} = \rho_{B}$.
\end{prop}

\begin{proof}
Let us begin by choosing a factorization
$A \xar{g^*} A[\bsym{t}] \xar{h^*} B$
of $f^*$, where $A[\bsym{t}]$ is a polynomial algebra in $m$ 
variables, and $h^*$ is a surjection. 
According to Theorem \ref{thm2.4}(1) the complex
$g^{\sharp} A = \Omega^m_{A[\bsym{t}] / A}[m]$
has a rigidifying isomorphism $g^{\sharp}(\rho_{\mrm{tau}})$
relative to $A$, where $\rho_{\mrm{tau}}$ is the tautological 
rigidifying isomorphism of $A$. Next, since 
$h^{\flat} g^{\sharp} A \cong f^{!} A$ has 
finite flat dimension over $A$ (see Proposition \ref{prop5.6}),
Theorem \ref{thm2.2}(1) says that 
$h^{\flat} g^{\sharp} A$ has an induced rigidifying isomorphism
$h^{\flat} (g^{\sharp} (\rho_{\mrm{tau}}))$ relative to $A$, which 
we shall denote by $\rho'$. 

There exists a unique element $u \in B^{\times}$ such that 
under the isomorphism 
$(f^! A) \otimes^{\mrm{L}}_{A} R_A \cong R_B$,
the rigidifying isomorphisms 
$u \rho' \otimes \rho_A$ coincides with $\rho_B$. 
Then $\rho_{B / A} := u \rho'$ is the desired rigidifying 
isomorphism of $f^! A$.
\end{proof}

\begin{dfn} \label{dfn8.5}
A morphism of schemes $f : X \to Y$ is called a {\em 
Cohen-Macaulay} morphism of relative dimension $n$ 
if it is flat, and all the fibers are equidimensional
Cohen-Macaulay schemes of dimension $n$.
\end{dfn}

\begin{prop} \label{prop9.5}
Let $f : X \to Y$ be a Cohen-Macaulay morphism of relative 
dimension $n$, and let $g : Y' \to Y$ be an arbitrary morphism. 
Define $X' := X \times_Y Y'$, and let $f' : X' \to Y'$ be the 
projection. Then $f'$ is a Cohen-Macaulay morphism of relative 
dimension $n$.
\end{prop}

\begin{proof}
The fact that $f'$ is flat is trivial. We have to prove that the 
fibers of $f'$ are Cohen-Macaulay schemes. This reduces to the 
following question about rings: let $B$ be an equidimensional 
$n$-dimensional Cohen-Macaulay algebra over the field $K$, let
$K \to K'$ be a field extension, and let
$B' := K' \otimes_K B$. We must show that $B'$ is an equidimensional 
$n$-dimensional Cohen-Macaulay algebra. 

Let us introduce the notation $f^* : K \to B$, 
$g^* : K \to K'$, ${f'}^* : K' \to B'$ and
$h^* : B \to B'$. Since $B$ is an equidimensional Cohen-Macaulay
ring of dimension $n$, and $f^{\sharp} K$ 
is a dualizing complex over it (cf.\ Proposition \ref{prop4.5}), 
we see that $\mrm{H}^i f^{\sharp} K = 0$ for all 
$i \neq -n$; i.e.\ 
$\bsym{\omega}_{B / K}[n] \cong f^{\sharp} K$.
By flat base change (Proposition \ref{prop7.1}) we get
\[ {f'}^! K' \cong {f'}^! g^* K \cong 
h^* f^! K \cong B' \otimes_B \bsym{\omega}_{B / K}[n] . \]
But ${f'}^! K'$ is a dualizing complex over $B'$, and therefore 
this ring is equidimensional $n$-dimensional and Cohen-Macaulay.
\end{proof}

\begin{prop} \label{prop8.3} 
Let $f^* : A \to B$ be a flat homomorphism, and let 
$\mfrak{a} \subset A$ be an ideal. Define 
$\bar{A} := A / \mfrak{a}$ and 
$\bar{B} := B / \mfrak{a} B$. Let 
$\bar{f}^* : \bar{A} \to \bar{B}$ be the induced homomorphism. 
Then there is a functorial isomorphism
$f^! \bar{M} \cong \bar{f}^! \bar{M}$
for $\bar{M} \in \msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} \bar{A})$.
\end{prop}

\begin{proof}
Let $\mcal{K}_A$, $\mcal{K}_B$, $\mcal{K}_{\bar{A}}$ and 
$\mcal{K}_{\bar{B}}$ be the respective residue complexes of these 
algebras. Then
$\mcal{K}_{\bar{A}} \cong \opn{Hom}_A(\bar{A}, \mcal{K}_{A})$
and
$\mcal{K}_{\bar{B}} \cong \opn{Hom}_B(\bar{B}, \mcal{K}_{B})
\cong \opn{Hom}_A(\bar{A}, \mcal{K}_{B})$.
According to Lemma \ref{lem9.7} we have
\[ \begin{aligned}
f^! M & \cong 
\opn{Hom}_A \big( \opn{Hom}_A(\bar{M}, \mcal{K}_{A}),
\mcal{K}_{B} \big) \\
& \cong
\opn{Hom}_{\bar{A}} \big( 
\opn{Hom}_{\bar{A}}(\bar{M}, \mcal{K}_{\bar{A}}),
\mcal{K}_{\bar{B}} \big) \cong \bar{f}^! \bar{M} .
\end{aligned} \]
\end{proof}

\begin{prop} \label{prop9.4}
Let $f : X \to Y$ be a flat morphism of relative dimension $n$. 
The following two conditions are equivalent:
\begin{enumerate}
\rmitem{i} $f$ is a Cohen-Macaulay morphism.
\rmitem{ii} 
$\gamma_f : \bsym{\omega}_{X / Y}[n] \to f^! \mcal{O}_{Y}$
is an isomorphism, and the sheaf 
$\bsym{\omega}_{X / Y}$ is flat over $\mcal{O}_Y$.
\end{enumerate}
\end{prop}

\begin{proof}
We might as well assume that 
$X = \opn{Spec} B$ and $Y = \opn{Spec} A$. 

\medskip \noindent
(i) $\Rightarrow$ (ii):
First we will prove that $\gamma_f$ is an isomorphism. This 
amounts to proving that $\mrm{H}^i f^! A = 0$ for all $i > -n$.
The proof is by contradiction. Define 
$i_1 := \opn{max} \{ i \mid \mrm{H}^i f^! A \neq 0 \}$, and assume 
$i_1 > -n$. Then there is a maximal ideal 
$\mfrak{q} \subset B$ such that
$(B / \mfrak{q}) \otimes_B \mrm{H}^i f^! A \neq 0$.
Let $\mfrak{p} := f(\mfrak{q})$, which is a prime ideal of $A$. 
Define $\bar{A} := \opn{Frac} (A / \mfrak{p})$ and 
$\bar{B} := B \otimes_A \bar{A}$, and let 
$\bar{f}^* : \bar{A} \to \bar{B}$ be the induced homomorphism. So 
$\bar{A}$ is a field, and $\bar{B}$ is a Cohen-Macaulay ring, 
equidimensional of dimension $n$. According to 
Propositions \ref{prop5.6} and \ref{prop8.3},
\[ \bsym{\omega}_{\bar{B} / \bar{A}}[n] \cong
\bar{f}^! \bar{A} \cong f^! \bar{A} \cong 
(f^! A) \otimes^{\mrm{L}}_{A} \bar{A} . \]
Hence
\[ (\mrm{H}^{i_1} f^! A) \otimes_B \bar{B} \cong
(\mrm{H}^{i_1} f^! A) \otimes_A \bar{A} \cong
\mrm{H}^{i_1} \big( (f^! A)  \otimes^{\mrm{L}}_{A} \bar{A} \big)
= 0 . \]
But $B  / \mfrak{q}$ is a quotient of $\bar{B}$, so we have 
a contradiction.

Next we are going to prove that $\bsym{\omega}_{B / A}$ is a flat 
$A$-module. It suffices to show that 
$\mrm{H}^i(M \otimes^{\mrm{L}}_{A} \bsym{\omega}_{B / A}) = 0$
for all $i < 0$ and all cyclic $A$-modules $M$. 
Thus we can assume $M = \bar{A} := A / \mfrak{a}$ for some 
ideal $\mfrak{a}$. 
Let $\bar{B} := B \otimes_A \bar{A}$ and let
$\bar{f}^* : \bar{A} \to \bar{B}$ be the induced homomorphism.
According to Proposition \ref{prop9.5}, $\bar{f}^*$ is a 
Cohen-Macaulay homomorphism of relative dimension $n$. 
Again using Propositions \ref{prop5.6} and \ref{prop8.3},
we obtain
\[ \bar{A} \otimes^{\mrm{L}}_{A} \bsym{\omega}_{B / A}[n] \cong
\bar{A} \otimes^{\mrm{L}}_{A} f^! A \cong f^! \bar{A} \cong
\bar{f}^! \bar{A} \cong \bsym{\omega}_{\bar{B} / \bar{A}}[n] . \]
 
\medskip \noindent
(ii) $\Rightarrow$ (i):
Take any prime ideal $\mfrak{p} \subset A$, and let 
$\bar{A} := A / \mfrak{p}$, $\bar{B} := B \otimes_A \bar{A}$,
$K := \opn{Frac} \bar{A}$ and 
$B_K := B \otimes_A K \cong \bar{B} \otimes_{\bar{A}} K$.
We have to prove that $B_K$ is a Cohen-Macaulay ring, 
equidimensional of dimension $n$. Let's use the notation
$\bar{f}^* : \bar{A} \to \bar{B}$ and
$f_K^* : K \to B_K$. Now
\[ \bar{f}^! \bar{A} \cong f^! \bar{A} \cong 
(f^! A) \otimes^{\mrm{L}}_{A} \bar{A} \cong
\bsym{\omega}_{B / A}[n] \otimes_A \bar{A} , \]
due to the flatness of $\bsym{\omega}_{B / A}$.
And by flat base change, 
\[ f_K^! K \cong K \otimes_{\bar{A}} \bar{f}^! \bar{A} \cong
K \otimes_A \bsym{\omega}_{B / A}[n] . \]
Because $f_K^! K$ is a dualizing complex over $B_K$ we are done.
\end{proof}

Suppose $A$ and $B$ are essentially finite type $\K$-algebras, and 
$f^* : A \to B$ is a Cohen-Macaulay homomorphism of relative 
dimension $n$ (see Definition \ref{dfn8.5}). 
According to Proposition \ref{prop9.3} the complex
$\bsym{\omega}_{B / A}[n] = f^! A$ comes equipped with
a rigidifying isomorphism $\rho_{B / A}$ relative to $A$.
The notion of rigid base change morphism was introduced in 
Definition \ref{dfn3.2}.

\begin{thm} \label{thm9.2}
Suppose
\[ \UseTips
\xymatrix @=4ex {
X'
\ar[d]_{f'} \ar[r]^{h}
& X 
\ar[d]_{f} \\
Y'
\ar[r]^{g} 
& Y } \]
is a cartesian diagram in 
$\cat{FTSch} / \K$, with $f$ a Cohen-Macaulay morphism of relative 
dimension $n$, and $g$ any morphism. Then:
\begin{enumerate}
\item There is a homomorphism $\mcal{O}_{X}$-modules
\[ \theta_{f, g} : \bsym{\omega}_{X / Y} \to
h_* \bsym{\omega}_{X' / Y'} , \]
such that the induced $\mcal{O}_{X'}$-linear homomorphism 
$h^*(\theta_{f, g}) : h^* \bsym{\omega}_{X / Y} \to
\bsym{\omega}_{X' / Y'}$
is an isomorphism.
%
\item The homomorphism $\theta_{f,g}$ satisfies, 
and is determined by the following local condition. 
Let $V = \opn{Spec} A \subset Y$, 
$U = \opn{Spec} B \subset f^{-1}(V)$ and 
$V' = \opn{Spec} A' \subset g^{-1}(V)$ be affine open 
sets, and let 
$U' = \opn{Spec} B' := h^{-1}(U) \cap {f'}^{-1}(V') \subset X'$. 
Then
\[ \Gamma(U, \theta_{f, g}) : 
(\bsym{\omega}_{B / A}[n], \rho_{B / A}) \to
(\bsym{\omega}_{B' / A'}[n], \rho_{B' / A'}) \]
is a rigid base change morphism relative to $A$.
\end{enumerate}
\end{thm}

First a lemma.

\begin{lem} \label{lem9.6}
Let $f^* : A \to B$ be a Cohen-Macaulay homomorphism of relative 
dimension $n$. Then, 
for $M \in \msf{D}^{\mrm{b}}_{\mrm{f}}(\cat{Mod} A)$,
the functorial morphism
\begin{equation} \label{eqn9.4}
\begin{aligned}
& \mrm{RHom}_{B \otimes_A B} \big( B, \bsym{\omega}_{B / A}[n]  
\otimes_A \bsym{\omega}_{B / A}[n] \big) \otimes^{\mrm{L}}_{A} 
M \\
& \qquad \qquad \qquad \to
\mrm{RHom}_{B \otimes_A B} \big( B, \bsym{\omega}_{B / A}[n]  
\otimes_A \bsym{\omega}_{B / A}[n]  \otimes^{\mrm{L}}_{A} 
M \big)
\end{aligned}
\end{equation}
is an isomorphism.
\end{lem}

Observe the similarity to Proposition \ref{prop2.4}. However, 
the hypotheses of Proposition \ref{prop2.4} might not be true here. 

\begin{proof}
Let's introduce the notation 
$A \xar{d^*} B \otimes_A B \xar{e^*} B$;
so $f^* = e^* \circ d^*$. The homomorphism $d^*$ is a 
Cohen-Macaulay homomorphism of relative 
dimension $2n$, and by flat base change (Proposition 
\ref{prop7.1}) we have
\[ d^! A \cong \bsym{\omega}_{(B \otimes_A B) / A}[2n] \cong
\bsym{\omega}_{B / A}[n]  \otimes_A \bsym{\omega}_{B / A}[n] . \]
 
Now there are isomorphisms
\[ \mrm{RHom}_{B \otimes_A B} \big( B, \bsym{\omega}_{B / A}[n]  
\otimes_A \bsym{\omega}_{B / A}[n] \big) \otimes^{\mrm{L}}_{A} M
\cong (f^! A) \otimes^{\mrm{L}}_{A} M
\cong f^! M  \]
and
\[ \mrm{RHom}_{B \otimes_A B} \big( B, \bsym{\omega}_{B / A}[n]  
\otimes_A \bsym{\omega}_{B / A}[n] \otimes^{\mrm{L}}_{A} M \big)
\cong e^! d^! M \cong f^! M , \]
implying (see Proposition \ref{prop5.6}) that both these functors 
are way-out on both sides. According to 
\cite[Proposition I.7.1]{RD}
it suffices to verify that (\ref{eqn9.4})
is an isomorphism when $M = A$; which is of course true.
\end{proof}

\begin{proof}[Proof of Theorem \tup{\ref{thm9.2}}]
The proof is in two steps.

\medskip \noindent
Step 1. We will prove existence and uniqueness of $\theta_{f, g}$
on affine pieces, i.e.\ in the 
setup of part (2). Choose a factorization 
$A \to A[\bsym{t}] \to A'$ of $g^* : A \to A'$,
with $A[\bsym{t}]$ a polynomial algebra in $m$ variables, and 
$A[\bsym{t}] \to A'$ surjective. By flat base change we know that 
$\bsym{\omega}_{B[\bsym{t}] / A[\bsym{t}]} \cong
B[\bsym{t}] \otimes_B \bsym{\omega}_{B / A}$.
This implies that 
$\opn{Hom}_{B}(\bsym{\omega}_{B / A}, 
\bsym{\omega}_{B[\bsym{t}] / A[\bsym{t}]})$
is a free $B[\bsym{t}]$-module of rank $1$,
generated by some homomorphism 
$\theta_0 : \bsym{\omega}_{B / A} \to
\bsym{\omega}_{B[\bsym{t}] / A[\bsym{t}]}$.
By Proposition \ref{prop2.4}, under its condition (iii.b),
we know that the morphism
\[ \begin{aligned}
& \mrm{RHom}_{B \otimes_A B} \big( B, \bsym{\omega}_{B / A}[n]  
\otimes_A \bsym{\omega}_{B / A}[n] \big) \otimes^{\mrm{L}}_{A} 
A[\bsym{t}] \\
& \qquad \to
\mrm{RHom}_{B[\bsym{t}] \otimes_{A[\bsym{t}]} B[\bsym{t}]} 
\big( B[\bsym{t}], \bsym{\omega}_{B[\bsym{t}] / A[\bsym{t}]}[n]
\otimes_{A[\bsym{t}]} 
\bsym{\omega}_{B[\bsym{t}] / A[\bsym{t}]}[n] \big)
\end{aligned} \]
induced by $\theta_{0} \otimes \theta_{0}$
is an isomorphism. Hence there is an
element $u_0 \in B[\bsym{t}]^{\times}$ such that 
$u_0 \theta_0$ is a rigid base change morphism relative to $A$. 

Let's denote the ring homomorphisms by ${f'}^* : A' \to B'$ and 
$f_{\bsym{t}}^* : A[\bsym{t}] \to B[\bsym{t}]$.
These are Cohen-Macaulay homomorphisms of relative dimension $n$.
Using Proposition \ref{prop8.3}, with $A'$ viewed as a quotient of 
$A[\bsym{t}]$, we get
\[ \bsym{\omega}_{B' / A'}[n] \cong {f'}^! A' \cong
 f_{\bsym{t}}^! A' \cong
\bsym{\omega}_{B[\bsym{t}] / A[\bsym{t}]}[n] \otimes_{A[\bsym{t}]}
A' . \]
So 
$\opn{Hom}_{B[\bsym{t}]}(\bsym{\omega}_{B[\bsym{t}] / A[\bsym{t}]}, 
\bsym{\omega}_{B' / A'})$
is a free $B'$-module, generated by some $\theta_1$.
By Lemma \ref{lem9.6}, applied to the $A[\bsym{t}]$-module
$A'$, the morphism
\[ \begin{aligned}
& \mrm{RHom}_{B[\bsym{t}] \otimes_{A[\bsym{t}]} B[\bsym{t}]} 
\big( B[\bsym{t}], \bsym{\omega}_{B[\bsym{t}] / A[\bsym{t}]}[n]
\otimes_{A[\bsym{t}]} 
\bsym{\omega}_{B[\bsym{t}] / A[\bsym{t}]}[n] \big)
\otimes^{\mrm{L}}_{A[\bsym{t}]} A' \\
& \qquad \to
\mrm{RHom}_{B' \otimes_{A'} B'} \big( B', \bsym{\omega}_{B' / A'}[n]
\otimes_{A'} \bsym{\omega}_{B' / A'}[n] \big) 
\end{aligned} \]
induced by $\theta_{1} \otimes \theta_{1}$
is an isomorphism. Therefore there is an
element $u_1 \in {B'}^{\times}$ such that 
$u_1 \theta_1$ is a rigid base change morphism relative to 
$A[\bsym{t}]$. Then
\[ \theta_{f, g} := u_1 \theta_1 \circ u_0 \theta_0 
: \bsym{\omega}_{B / A}[n] \to \bsym{\omega}_{B' / A'}[n] \]
is the rigid base change morphism we want. By Proposition 
\ref{prop3.1} it is unique. 

\medskip \noindent
Step 2. Gluing: in the setup of part (2), suppose 
$V_1 = \opn{Spec} A_1$ is an affine open 
set contained in $V$, $U_1 = \opn{Spec} B_1$ is an affine open 
set contained in $f^{-1}(V_1) \cap U$, and
$V'_1 = \opn{Spec} A'_1$ is an affine open 
set contained in $g^{-1}(V_1) \cap V'$.  
Let $B'_1 := B_1 \otimes_{A_1} A'_1$.
By step 1 we get homomorphisms
$\theta_{f, g} : \bsym{\omega}_{B / A} \to \bsym{\omega}_{B' / A'}$
and
$\theta_{f_1, g_1} : \bsym{\omega}_{B_1 / A_1} \to 
\bsym{\omega}_{B'_1 / A'_1}$.
Consider the diagram
\[ \UseTips  \xymatrix @C=5.5ex @R=4ex {
\bsym{\omega}_{B / A}[n]
\ar[r]^{\theta_{f, g}}
\ar[d]
& \bsym{\omega}_{B' / A'}[n]
\ar[d] \\
\bsym{\omega}_{B_1 / A_1}[n]
\ar[r]^{\theta_{f_1, g_1}}
& \bsym{\omega}_{B'_1 / A'_1}[n]
} \]
where the vertical arrows are the rigid localization 
homomorphisms corresponding to the localizations $B \to B_1$ and
$B' \to B'_1$ (see Proposition \ref{prop2.1}).
Due to the uniqueness in step 1, this diagram is commutative. 

We conclude that as the affine open sets $V \subset Y$, 
$U \subset f^{-1}(V)$ and $V' \subset g^{-1}(V)$ vary,  
the homomorphisms $\theta_{f, g}$
glue to a sheaf homomorphism
$\theta_{f, g} : \bsym{\omega}_{X / Y} \to 
h_* \bsym{\omega}_{X' / Y'}$.
\end{proof}

\begin{cor} \label{cor9.2}
In the situation of Theorem \tup{\ref{thm9.2}}, 
assume $f$ is smooth. Then under the isomorphism
$\bsym{\omega}_{X / Y} \cong \Omega^n_{X / Y}$ 
of Proposition \ref{prop9.6}, $\theta_{f, g}$ is the usual base 
change homomorphism for differential forms
$\Omega^n_{X / Y} \to h_* \, \Omega^n_{X' / Y'}$.
\end{cor}

\begin{proof}
This is because on any affine piece the homomorphism
$\Omega^n_{B / A}[n] \to \Omega^n_{B' / A'}[n]$
is a rigid base change morphism relative to $A$.
\end{proof}

\begin{cor} \label{cor9.1}
In the situation of Theorem \tup{\ref{thm9.2}}, suppose that 
$g' : Y'' \to Y'$ is another morphism. Define
$X'' := Y'' \times_{Y'} X'$, and let $f'' : X'' \to Y''$ and
$h' : X'' \to X'$ be the projections. Then
$\theta_{f, g \circ g'} = g_*(\theta_{f', g'}) \circ \theta_{f, g} 
$.
\end{cor}

\begin{proof}
This is because of the uniqueness in part (2) of the theorem.
\end{proof}

Our final result, Theorem \ref{thm9.3}, 
is about the interaction of base change and traces. In order to 
state it we first need:

\begin{lem} \label{lem9.8}
In the situation of Theorem \tup{\ref{thm9.2}}, assume the morphism 
$f$ is proper. Then 
$\mrm{R}^i f'_*\, \bsym{\omega}_{X' / Y'} = 0$
for all $i < n$. Therefore there are isomorphisms
\[ g_*\, \mrm{R}^n f'_*\, \bsym{\omega}_{X' / Y'} \cong
\mrm{H}^n \mrm{R} g_*\, \mrm{R} f'_*\, \bsym{\omega}_{X' / Y'} \cong
\mrm{H}^n \mrm{R} f_*\, \mrm{R} h_*\, \bsym{\omega}_{X' / Y'} \cong
\mrm{R}^n f_*\, h_*\ \bsym{\omega}_{X' / Y'} . \]
\end{lem}

\begin{proof}
By Theorem \ref{thm8.4} we know that
\[ \mrm{R} f'_*\, \bsym{\omega}_{X' / Y'}[n] \cong
\mrm{R} f'_*\, {f'}^! \mcal{O}_Y \cong 
\mrm{R} \mcal{H}om_{\mcal{O}_Y}(\mrm{R} f'_*\, \mcal{O}_X,
\mcal{O}_Y) . \]
\end{proof}

\begin{thm} \label{thm9.3}
In the situation of Theorem \tup{\ref{thm9.2}}, assume the morphism 
$f$ is proper. Then the diagram of $\mcal{O}_Y$-linear 
homomorphisms
\begin{equation} \label{eqn9.5}
\UseTips \xymatrix @C=7ex @R=4ex {
& \mrm{R}^n f_*\, \bsym{\omega}_{X / Y}
\ar@(l,ur)[dl]_(0.6){\mrm{R}^n f_*(\theta_{f,g}) \ }
\ar[r]^(0.6){\opn{Tr}_f}
& \mcal{O}_Y 
\ar[d]^{g^*}  \\
\mrm{R}^n f_*\, h_*\, \bsym{\omega}_{X' / Y'}
\ar[r]^{\cong}
& g_*\, \mrm{R}^n f'_*\, \bsym{\omega}_{X' / Y'} 
\ar[r]^(0.6){g_*(\opn{Tr}_{f'})} 
& g_* \mcal{O}_{Y'} 
} 
\end{equation}
in which the arrow marked ``$\cong$'' is the one from Lemma 
\tup{\ref{lem9.8}}, is commutative. 
\end{thm}

For the proof we shall need three lemmas.

\begin{lem} \label{lem9.11}
Suppose that $Y = \opn{Spec} K$ and $Y' = \opn{Spec} K'$ 
with $K$ and $K'$ fields; and that 
$e : Z \to X$ is a finite morphism such that 
$f \circ e : Z \to Y$ is a Cohen-Macaulay morphism of relative 
dimension $m$. Define $Z' := Z \times_X X'$, with projections
$e' : Z' \to X'$ and $d : Z' \to Z$. Then the diagram
\begin{equation} \label{eqn10.1}
\UseTips \xymatrix @C=6ex @R=4ex {
e_* \bsym{\omega}_{Z / Y}[m] 
\ar[r]^{\theta_{f \circ e, g}}
\ar[d]_{\opn{Tr}_e}
& d_* \bsym{\omega}_{Z' / Y'}[m]
\ar[d]^{h_*(\opn{Tr}_{e'})} \\
\bsym{\omega}_{X / Y}[n]
\ar[r]^{\theta_{f, g}}
& h_* \bsym{\omega}_{X' / Y'}[n] } 
\end{equation}
in
$\msf{D}(\cat{Mod} \mcal{O}_X)$ is commutative.
\end{lem}

\begin{proof}
Since $Z$ is finite over $K$ it has finitely many points. 
By restricting to one of the points of $Z$ we can actually 
assume that $Z$ and $X$ are affine, say 
$Z = \opn{Spec} C$ and $X = \opn{Spec} B$.
Hence we can also suppose that 
$Z' = \opn{Spec} C'$ and $X' = \opn{Spec} B'$.
We now have to prove that
\[  \theta_{f, g} \circ  \opn{Tr}_e = 
\opn{Tr}_{e'} \circ \, \theta_{f \circ e, g} :
\bsym{\omega}_{C / K}[m] \to \bsym{\omega}_{B' / K'}[n] . \]
Due to rigidity and the fact that 
$\mrm{Hom}_{\msf{D}(\cat{Mod} B)}(\bsym{\omega}_{C / K}[m], 
\bsym{\omega}_{B' / K'}[n]) \cong C'$
it follows that these two morphisms are equal.
\end{proof}

\begin{lem} \label{lem9.9}
Suppose $Y = \opn{Spec} K$ where $K$ is a field.
There exists a closed embedding 
$e : Z \to X$ such that $f \circ e : Z \to Y$ is finite 
\tup{(}hence Cohen-Macaulay of relative dimension $0$\tup{)}; and 
\[ f_*(\opn{Tr}_e) : (f \circ e)_* \bsym{\omega}_{Z / Y} \to
\mrm{R}^n f_*\, \bsym{\omega}_{X / Y} \]
is surjective.
\end{lem}

\begin{proof}
According to Corollary \ref{cor7.10} we can assume that 
$K = \K$. Then 
$\bsym{\omega}_{X / Y} = \mrm{H}^{-n} \mcal{K}_X$, where 
$\mcal{K}_X$ is the rigid residue complex of $X$. The $K$-module 
$\mrm{R}^n f_*\, \bsym{\omega}_{X / Y} = \mrm{H}^0 f_* \mcal{K}_X$
is finitely generated, and is a quotient of 
$f_* \mcal{K}^0_X$. But 
$f_* \mcal{K}^0_X \cong \lim_{\to} (f \circ e)_* \mcal{K}^0_Z$
as $Z$ runs over the finite length closed subschemes of $X$. 
And for any such $Z$ one has 
$\mcal{K}^0_Z = \bsym{\omega}_{Z / Y}$.
\end{proof}

\begin{lem} \label{lem9.10}
In the setup of Proposition \tup{\ref{prop8.3}},
assume that $f^*$ is a 
Cohen-Macaulay homomorphism of relative dimension $n$. By 
Propositions \tup{\ref{prop5.6}} and \tup{\ref{prop8.3}} there are 
isomorphisms
\[ \bsym{\omega}_{\bar{B} / \bar{A}}[n] = \bar{f}^! \bar{A}
\cong f^! \bar{A} \cong \bar{A} \otimes^{\mrm{L}}_{A} f^! A
= \bar{A} \otimes_A \bsym{\omega}_{B / A}[n]  \]
in $\msf{D}(\cat{Mod} B)$. Let
$\theta : \bsym{\omega}_{B / A} \to
\bsym{\omega}_{\bar{B} / \bar{A}}$
be the resulting $B$-linear homomorphism. Then 
$\theta : \bsym{\omega}_{B / A}[n] \to
\bsym{\omega}_{\bar{B} / \bar{A}}[n]$
is a rigid base change morphism relative to $A$, and consequently 
$\theta = \theta_{f, g}$.
\end{lem}

\begin{proof}
Consider the diagram
\[ \UseTips
\xymatrix @=6ex {
R_B 
\ar@(ur,ul)[rrr]^{\rho_B}
\ar[r]_(0.3){\cong}
& \bsym{\omega}_{B / A} \otimes_A R_A
\ar[r]^(0.35){\rho_{B / A} \otimes \rho_A}
& (\opn{Sq}_{B / A} \bsym{\omega}_{B / A}) \otimes^{\mrm{L}}_{A}
(\opn{Sq}_{A / \K} R_A) 
& \opn{Sq}_{B / \K} R_B 
\ar[l]^(0.3){\cong} \\
& \bsym{\omega}_{B / A} \otimes_A R_{\bar{A}}
\ar@{}[dr]|{?}
\ar[u]^{\bsym{1} \otimes \opn{Tr}_{g}}
\ar[r]^(0.35){\rho_{B / A} \otimes \rho_{\bar{A}}}
\ar[d]_{\theta \otimes \bsym{1}}
& (\opn{Sq}_{B / A} \bsym{\omega}_{B / A}) \otimes^{\mrm{L}}_{A}
(\opn{Sq}_{\bar{A} / \K} R_{\bar{A}}) 
\ar[u]_{\bsym{1} \otimes \opn{Sq}_{g / \K}( \opn{Tr}_{g})}
\ar[d]^{\opn{Sq}_{f, g}(\theta) \otimes \bsym{1}} \\
R_{\bar{B}} 
\ar[r]^(0.3){\cong}
\ar[uu]_{\opn{Tr}_{h}}
\ar@(dr,dl)[rrr]_{\rho_{\bar{B}}}
& \bsym{\omega}_{\bar{B} / \bar{A}} \otimes_{\bar{A}} 
\ar[r]^(0.35){\rho_{\bar{B} / \bar{A}} \otimes \rho_{\bar{A}}}
R_{\bar{A}}
& (\opn{Sq}_{\bar{B} / \bar{A}} \bsym{\omega}_{\bar{B} / \bar{A}}) 
\otimes^{\mrm{L}}_{\bar{A}} (\opn{Sq}_{\bar{A} / \K} R_{\bar{A}}) 
& \opn{Sq}_{\bar{B} / \K} R_{\bar{B}}
\ar[l]_(0.3){\cong}
\ar[uu]^(0.4){\opn{Sq}_{h / \K}( \opn{Tr}_{h})}
} \]
of morphisms in $\msf{D}(\cat{Mod} B)$. 
The subdiagrams on the top and on the bottom (involving $\rho_B$ 
and $\rho_{\bar{B}}$) are commutative by definition of the 
rigidifying isomorphisms $\rho_{B/A}$ and 
$\rho_{\bar{B} / \bar{A}}$. The left rectangle is commutative by 
definition of $\theta$. This implies that the right rectangle, which 
is basically obtained from the left rectangle by squaring, is 
commutative. The middle-upper square commutes because $\opn{Tr}_g$ 
is a rigid morphism. The conclusion is that the square marked ``?'' 
is commutative, and hence
$\opn{Sq}_{f, g}(\theta) \circ \rho_{B / A} = 
\rho_{\bar{B} / \bar{A}} \circ \theta$; 
i.e.\ $\theta$ is a rigid base change morphism. Due to uniqueness of 
such morphisms we see that $\theta = \theta_{f, g}$.
\end{proof}


\begin{proof}[Proof of Theorem \tup{\ref{thm9.3}}]
We proceed in several steps.

\medskip \noindent
Step 1. Suppose $g : Y' \to Y$ is a closed embedding. By
Proposition \ref{prop8.3} we can replace 
$g_* \, \mrm{R}^n f'_*\, \bsym{\omega}_{X' / Y'} = 
g_* \, \mrm{R}^0 f'_*\, {f'}^! \mcal{O}_{Y'}$
with 
$\mrm{R}^0 f_*\, f^! \, g_* \, \mcal{O}_{Y'}$,
and then, by Lemma \ref{lem9.10}, instead of 
$\mrm{R}^n f_*(\theta_{f,g})$
we have the homomorphism
\[ \mrm{R}^0 f_*\, f^!(g^*) :
\mrm{R}^0 f_*\, f^! \mcal{O}_{Y} \to
\mrm{R}^0 f_*\, f^! \, g_* \, \mcal{O}_{Y'} , \]
corresponding to the sheaf homomorphism
$g^* : \mcal{O}_{Y} \to g_* \, \mcal{O}_{Y'}$.
Since the trace map 
$\opn{Tr}_{f} : \mrm{R} f_*\, f^!  \to \bsym{1}$
is functorial, it follows that diagram (\ref{eqn9.5}) commutes in 
this case.

\medskip \noindent
Step 2. Now suppose $Y = \opn{Spec} K$ and $Y' = \opn{Spec} K'$,
where $K$ and $K'$ are fields and the homomorphism $K \to K'$ is 
finite. Also suppose that $f$ is finite. Thus 
$X = \opn{Spec} B$ and $X' = \opn{Spec} B'$, where $B$ is a finite 
$K$-algebra, and $B' \cong B \otimes_K K'$.
In this situation 
$\bsym{\omega}_{B / K} = \opn{Hom}_K(B, K)$, and the rigid 
trace 
$\opn{Tr}_{B / K} : \bsym{\omega}_{B / K} \to K$ 
is evaluation at $1$. Likewise for $K'$ and $B'$. The rigid base 
change morphism 
$\theta_{f, g} : \bsym{\omega}_{B / K} \to 
\bsym{\omega}_{B' / K'}$
relative to $K$ arises from the canonical isomorphism
$\opn{Hom}_{K'}(B', K') \cong K' \otimes_K \opn{Hom}_K(B, K)$.
Therefore diagram (\ref{eqn9.5}) commutes in 
this case.

\medskip \noindent
Step 3. In this step we assume that  $Y = \opn{Spec} K$ and 
$Y' = \opn{Spec} K'$, where $K$ and $K'$ are fields,
and the homomorphism $K \to K'$ is finite. 
Choose a closed embedding $e : Z \to X$ as in Lemma 
\ref{lem9.9}, and let $Z'$ and $e'$ be as in Lemma \ref{lem9.11}. 
Let $B := \Gamma(Z, \mcal{O}_Z)$ and 
$B' := \Gamma(Z', \mcal{O}_{Z'})$. Consider the diagram
\[ \UseTips
\xymatrix @=4ex {
\bsym{\omega}_{B / K}
\ar[r]^(0.4){\opn{Tr}_e} 
\ar[d]_{\theta_{f \circ e, g}}
& \mrm{R}^n f_*\, \bsym{\omega}_{X / K}
\ar[r]^(0.7){\opn{Tr}_f} 
\ar[d]^{\theta_{f, g}}
& K 
\ar[d]^{g^*} \\
\bsym{\omega}_{B' / K'}
\ar[r]^(0.4){\opn{Tr}_{e'}}  
& \mrm{R}^n {f'}_*\, \bsym{\omega}_{X' / K'}
\ar[r]^(0.7){\opn{Tr}_{f'}}
& K' .
} \]
By Lemma \ref{lem9.11} the left square is commutative. And by step 
2 above the big rectangle is commutative. Since $\opn{Tr}_e$ is 
surjective it follows that the right square also commutes.

\medskip \noindent
Step 4. Assume $Y' = \{ y' \} = \opn{Spec} K'$ where $K'$ is a 
field. Let $y := g(y') \in Y$. The point $y$ might fail to be 
closed. However, since we are interested in $\mcal{O}_Y$-linear
homomorphisms, we can
replace $Y$ with $\opn{Spec} \mcal{O}_{Y, y}$. The only difficulty 
that may arise is that the $\K$-scheme 
$\opn{Spec} \mcal{O}_{Y, y}$ might 
not be of finite type. This can be repaired as follows: choose a 
$\K$-algebra $\til{\K}$, which is a localization of a polynomial 
$\K$-algebra, such that $\til{\K} \to \mcal{O}_{Y, y}$ is finite. 
Since $\til{\K}$ is an essentially finite type $\K$-algebra which 
is also regular, we can replace $\K$ with $\til{\K}$, as explained 
in Corollary \ref{cor7.10}.

So we now have $y = g(y')$ a closed point of $Y$. The morphism 
$g : Y' \to Y$ factors through the finite morphism 
$Y' \to \opn{Spec} \bsym{k}(y)$ and the closed embedding
$\opn{Spec} \bsym{k}(y) \to Y$. 
Combining steps 1 and 2 we conclude that 
diagram (\ref{eqn9.5}) commutes.

\medskip \noindent
Step 5. This is the general case. We must show that two 
$\mcal{O}_{Y'}$-linear homomorphisms
$g^* \, \mrm{R}^n {f}_*\, \bsym{\omega}_{X / Y} \to
\mcal{O}_{Y'}$
are equal. It suffices to check that they become equal in the 
residue field $\bsym{k}(y')$ for any closed point 
$y' \in Y'$. Using step 1 we can replace $Y'$ with 
$\opn{Spec} \bsym{k}(y')$. Now using step 4 we are done.
\end{proof}






%\newpage
\begin{thebibliography}{LMB}
\bibitem[AFH]{AFH} L. Avramov, H.-B. Foxby and S. Halperin,
        Differential graded homological algebra,
        in preparation. 
\bibitem[AJL]{AJL} L.\ Alonso, A.\ Jerem\'{\i}as and J.\ Lipman,
        Duality and flat base change on formal schemes, 
        in ``Studies in Duality on Noetherian Formal Schemes 
        and Non-Noetherian Ordinary Schemes,'' Contemp.\ Math.\ 
        \textbf{244}, Amer.\ Math.\ Soc., 1999, 3-90.    
\bibitem[Be]{Be} K. Behrend,
        Differential Graded Schemes I, preprint.
\bibitem[Co]{Co} B. Conrad, ``Grothendieck Duality and 
        Base Change,''
        Lecture Notes in Math.\ \textbf{1750}, Springer, 2000. 
\bibitem[Dr]{Dr} V. Drinfeld,
    DG quotients of DG categories, eprint math.KT/0210114 
    at http://arxiv.org.
\bibitem[EG]{EG} P. Etingof and V. Ginzburg, 
    Symplectic reflection algebras, Calogero-Moser space, 
    and deformed Harish-Chandra homomorphism.
    Invent.\ Math.\ {\bf 147} (2002), no.\ 2, 243-348.
\bibitem[EGA]{EGA} A.\ Grothendieck and J.\ Dieudonn\'{e},
     ``\'{E}l\'{e}ments de G\'{e}ometrie Alg\'{e}brique.''
    Chapitre $0{}_{\mrm{IV}}$, 
    Publ.\ Math.\ IHES {\bf 20} (1964);
    Chapitre IV, Publ.\ Math.\ IHES {\bf 32} (1967).
\bibitem[Ha]{Ha} M. Hakim, 
        ``Topos Annel\'es et Sch\'emas Relatifs,''
        Springer, 1972.
\bibitem[Hi]{Hi} V. Hinich, 
        Homological algebra of homotopy algebras,
        Comm.\ Algebra {\bf 25} (1997), no.\ 10, 3291-3323.
\bibitem[HK]{HK} R. \ H\"{u}bl and E.\ Kunz, 
    Regular differential forms and duality for projective 
    morphisms, J.\ reine angew.\ Math.\ 
    \textbf{410} (1990), 84-108.
\bibitem[FIJ]{FIJ} A. Frankild, S. Iyengar and P. J{\o}rgensen, 
    Dualizing Differential Graded modules and Gorenstein 
    Differential Graded Algebras, 
    J. London Math. Soc. (2) 68 (2003), 288-306.
\bibitem[Ke]{Ke} B. Keller, Deriving DG categories,
        Ann.\ Sci.\ \'Ecole Norm.\ Sup.\ (4) {\bf 27}  
        (1994),  no.\ 1, 63-102. 
\bibitem[KKO]{KKO} A. Kapustin, A. Kuznetsov and D. Orlov,
        Noncommutative Instantons and Twistor Transform,
        Comm.\ Math.\ Phys.\ \textbf{221} (2001), 385-432.
\bibitem[Kl]{Kl} S.L. Kleiman, Relative duality for quasi-coherent 
        sheaves, Compositio Math.\ {\bf 41} (1980), no.\ 1, 39-60.
\bibitem[KM]{KM} I. Kriz and J.P. May, 
        ``Operads, Algebras, Modules and Motives,''
        Ast\'erisque {\bf 233} (1995).
\bibitem[KS]{KS} M.\ Kashiwara and P.\ Schapira, ``Sheaves
        on Manifolds,'' Springer-Verlag, Berlin, 1990.
\bibitem[Li]{Li} J. Lipman,
    Dualizing sheaves, differentials and
    residues on algebraic varieties, 
    Ast\'{e}risque \textbf{117} (1984).
\bibitem[LMB]{LMB} G. Laumon and L. Moret-Bailly,
        ``Champs algebriques,'' Springer, 2000.
\bibitem[LNS]{LNS} J. Lipman, S. Nayak and P. Sastry,
    Pseudofunctorial behavior of Cousin complexes on formal 
    schemes, preprint; eprint math.AG/0310032 at http://arxiv.org.
\bibitem[Ma]{Ma} H.\ Matsumura, ``Commutative Algebra'', 
    Benjamin/Cummings, Reading, Mass., 1980.
\bibitem[ML]{ML} S. Maclane, ``Homology,''
    Springer-Verlag, 1994 (reprint). 
\bibitem[Ne]{Ne} A. Neeman, The Grothendieck duality theorem via 
        Bousfield's techniques and Brown representability,
        J. Amer.\ Math.\ Soc.\ \textbf{9} (1996), no.\ 1, 205-236. 
\bibitem[Qu]{Qu} D. Quillen, 
    On the cohomology of commutative rings, 
    Proc.\ Symp.\ Pure Math.\ (AMS) {\bf 17} (1970), pp.\ 65-87.
\bibitem[RD]{RD} R.\ Hartshorne, ``Residues and Duality,''
        Lecture Notes in Math.\ \textbf{20},
        Springer-Verlag, Berlin, 1966.
\bibitem[Sa]{Sa} P.\ Sastry, Residues and duality on algebraic 
        schemes, Compositio Math.\ {\bf 101} (1996), 133-178.
\bibitem[SdS]{SdS} F. Sancho de Salas,
        Residue: a geometric construction,
        Canad.\ Math.\ Bull.\ {\bf 45} (2002), no.\ 2, 284-293.
\bibitem[Sp]{Sp} N. Spaltenstein, 
        Resolutions of unbounded complexes,
        Compositio Math.\ {\bf 65} (1988),  no.\ 2, 121-154. 
\bibitem[VdB]{VdB} M.\ Van den Bergh, Existence theorems for
        dualizing complexes over non-commutative graded and
        filtered ring,
        J.\ Algebra \textbf{195} (1997), no. 2, 662-679.
\bibitem[Ve]{Ve} J.L. Verdier, Base change for twisted inverse 
    image of coherent sheaves, 
    ``Algebraic Geometry,'' Oxford Univ.\ Press, 1969, pp.\ 393 - 
    408.
\bibitem[Ye1]{Ye1} A.\ Yekutieli,
    Dualizing Complexes over Noncommutative Graded Algebras,
    J. Algebra {\bf 153} no.\ 1 (1992), 41-84.
\bibitem[Ye2]{Ye2} A.\ Yekutieli,
    ``An Explicit Construction of the
    Grothendieck Residue Complex'' (with an appendix by P.\ Sastry),
    Ast\'{e}risque {\bf 208} (1992).
\bibitem[Ye3]{Ye3} A.\ Yekutieli,
        Residues and differential operators on schemes,
        Duke Math.\ J. \textbf{95} (1998), 305-341.
\bibitem[YZ1]{YZ1} A.\ Yekutieli and J.J.\ Zhang,
        Rings with Auslander dualizing complexes,
        J.\ Algebra \textbf{213} (1999), no. 1, 1-51.
\bibitem[YZ2]{YZ2} A.\ Yekutieli and J.J.\ Zhang, Residue complexes
        over noncommutative rings, 
        J. Algebra \textbf{259} (2003) no. 2, 451-493.
\bibitem[YZ3]{YZ3} A.\ Yekutieli and J.J.\ Zhang, 
        Dualizing complexes and perverse modules over
        differential algebras, to appear in Compositio Math.; 
        eprint math.RA/0301323 at http://arxiv.org. 
\bibitem[YZ4]{YZ4} A.\ Yekutieli and J.J.\ Zhang, 
        Dualizing complexes and perverse sheaves on 
        noncommutative ringed schemes, 
        eprint math.AG/0211309 at http://arxiv.org.
\end{thebibliography}

\end{document}
