# stacks/stacks-project

Fix idiotic error in last commit

As I was walking down the street it occured to me that what I had just
proven was wrong and in fact any nontrivial closed immersion would be a
counter example...
 @@ -11829,7 +11829,7 @@ \section{Gysin maps for diagonals} Let $(S, \delta)$ be as in Situation \ref{situation-setup}. Let $f : X \to Y$ be a smooth morphism of schemes locally of finite type over $S$. Then the diagonal morphism $\Delta : X \longrightarrow X \times_Y X$ is a regular immersion and in fact this characterizes when $f$ is smooth, see is a regular immersion, see More on Morphisms, Lemma \ref{more-morphisms-lemma-smooth-diagonal-perfect}. Thus we have the gysin map $$39 dpa.tex  @@ -2294,7 +2294,7 @@ \section{Smooth ring maps and diagonals} \begin{lemma} \label{lemma-local-perfect-diagonal} Let A \to B be a local ring homomorphism of Noetherian local rings such that B is essentially of finite type over A. If B is flat and essentially of finite type over A. If$$ B \otimes_A B \longrightarrow B $$@@ -2328,20 +2328,35 @@ \section{Smooth ring maps and diagonals} Let K = (f_1, \ldots, f_r) with r minimal. We may and do assume that f_i \in R is the image of an element of A[x_1, \ldots, x_n] which we also denote f_i. Observe that I is generated by f_i \otimes 1 and 1 \otimes f_i. We claim that this is a minimal by f_1 \otimes 1, \ldots, f_r \otimes 1 and 1 \otimes f_1, \ldots, 1 \otimes f_r. We claim that this is a minimal set of generators of I. Namely, if \kappa is the common residue field of R and B, then we have a map of R, B, (R \otimes_A R)_\mathfrak m, and (B \otimes_A B)_\mathfrak m then we have a map R \otimes_A R \to R \otimes_A \kappa \oplus \kappa \otimes_A R which factors through (R \otimes_A R)_\mathfrak m. Restricting to I we obtain a map I \to K \otimes_A \kappa \oplus \kappa \otimes_A K \to K \otimes_B \kappa \oplus \kappa \otimes_B K. The elements f_i \otimes 1, 1 \otimes f_i map to a basis of the target of this map which proves our claim. which factors through (R \otimes_A R)_\mathfrak m. Since B is flat over A and since we have the short exact sequence 0 \to K \to R \to B \to 0 we see that K \otimes_A \kappa \subset R \otimes_A \kappa, see Algebra, Lemma \ref{algebra-lemma-flat-tor-zero}. Thus restricting the map (R \otimes_A R)_\mathfrak m \to R \otimes_A \kappa \oplus \kappa \otimes_A R to I we obtain a map$$ I \to K \otimes_A \kappa \oplus \kappa \otimes_A K \to K \otimes_B \kappa \oplus \kappa \otimes_B K. $$The elements f_1 \otimes 1, \ldots, f_r \otimes 1, 1 \otimes f_1, \ldots, 1 \otimes f_r map to a basis of the target of this map, since by Nakayama's lemma (Algebra, Lemma \ref{algebra-lemma-NAK}) f_1, \ldots, f_r map to a basis of K \otimes_B \kappa. This proves our claim. \medskip\noindent The ideal J is generated by f_i \otimes 1 and the elements x_i \otimes 1 - 1 \otimes x_i (for the proof it suffices to The ideal J is generated by f_1 \otimes 1, \ldots, f_r \otimes 1 and the elements x_1 \otimes 1 - 1 \otimes x_1, \ldots, x_n \otimes 1 - 1 \otimes x_n (for the proof it suffices to see that these elements are contained in the ideal J). Now we can write$$ @@ -2370,7 +2385,7 @@ \section{Smooth ring maps and diagonals} \begin{lemma} \label{lemma-perfect-diagonal} Let $A \to B$ be a finite type ring map of Noetherian rings. If Let $A \to B$ be a flat finite type ring map of Noetherian rings. If $$B \otimes_A B \longrightarrow B$$
 \end{proof} \noindent The following lemma gives a characterization of smooth morphisms in terms of the diagonal. The following lemma gives a characterization of smooth morphisms as flat morphisms whose diagonal is perfect. \begin{lemma} \label{lemma-smooth-diagonal-perfect} The following are equivalent \begin{enumerate} \item $f$ is smooth, \item $\Delta : X \to X \times_Y X$ is a regular immersion, \item $\Delta : X \to X \times_Y X$ is a local complete intersection morphism, \item $\Delta : X \to X \times_Y X$ is perfect. \item $f$ is flat and $\Delta : X \to X \times_Y X$ is a regular immersion, \item $f$ is flat and $\Delta : X \to X \times_Y X$ is a local complete intersection morphism, \item $f$ is flat and $\Delta : X \to X \times_Y X$ is perfect. \end{enumerate} \end{lemma} \begin{proof} Assume (1). Then the projections $X \times_Y X \to X$ are smooth by Assume (1). Then $f$ is flat by Morphisms, Lemma \ref{morphisms-lemma-smooth-flat}. The projections $X \times_Y X \to X$ are smooth by Morphisms, Lemma \ref{morphisms-lemma-base-change-smooth}. Hence the diagonal is a section to a smooth morphism and hence a regular immersion, see Divisors, Lemma \ref{divisors-lemma-section-smooth-regular-immersion}.