# stacks/stacks-project

4d4c354 Jan 29, 2017
5653 lines (4901 sloc) 212 KB
 \input{preamble} % OK, start here. % \begin{document} \title{Examples} \maketitle \phantomsection \label{section-phantom} \tableofcontents \section{Introduction} \label{section-introduction} \noindent This chapter will contain examples which illuminate the theory. \section{An empty limit} \label{section-empty-limit} \noindent This example is due to Waterhouse, see \cite{Waterhouse}. Let $S$ be an uncountable set. For every finite subset $T \subset S$ consider the set $M_T$ of injective maps $T \to \mathbf{N}$. For $T \subset T' \subset S$ finite the restriction $M_{T'} \to M_T$ is surjective. Thus we have an inverse system over the directed partially ordered set of finite subsets of $S$ with surjective transition maps. But $\lim M_T = \emptyset$ as an element in the limit would define an injective map $S \to \mathbf{N}$. \section{A zero limit} \label{section-zero-limit} \noindent Let $(S_i)_{i \in I}$ be a directed inverse system of nonempty sets with surjective transition maps and with $\lim S_i = \emptyset$, see Section \ref{section-empty-limit}. Let $K$ be a field and set $$V_i = \bigoplus\nolimits_{s \in S_i} K$$ Then the transition maps $V_i \to V_j$ are surjective for $i \geq j$. However, $\lim V_i = 0$. Namely, if $v = (v_i)$ is an element of the limit, then the support of $v_i$ would be a finite subset $T_i \subset S_i$ with $\lim T_i \not = \emptyset$, see Categories, Lemma \ref{categories-lemma-nonempty-limit}. \medskip\noindent For each $i$ consider the unique $K$-linear map $V_i \to K$ which sends each basis vector $s \in S_i$ to $1$. Let $W_i \subset V_i$ be the kernel. Then $$0 \to (W_i) \to (V_i) \to (K) \to 0$$ is a nonsplit short exact sequence of inverse systems of vector spaces over the directed set $I$. Hence $W_i$ is a directed system of $K$-vector spaces with surjective transition maps, vanishing limit, and nonvanishing $R^1\lim$. \section{Non-quasi-compact inverse limit of quasi-compact spaces} \label{section-lim-not-quasi-compact} \noindent Let $\mathbf{N}$ denote the set of natural numbers. For every integer $n$, let $I_n$ denote the set of all natural numbers $> n$. Define $T_n$ to be the unique topology on $\mathbf{N}$ with basis $\{1\}, \ldots , \{n\}, I_n$. Denote by $X_n$ the topological space $(\mathbf{N}, T_n)$. For each $m < n$, the identity map, $$f_{n, m} : X_n \longrightarrow X_m$$ is continuous. Obviously for $m < n < p$, the composition $f_{p, n} \circ f_{n, m}$ equals $f_{p, m}$. So $((X_n), (f_{n,m}))$ is a directed inverse system of quasi-compact topological spaces. \medskip\noindent Let $T$ be the discrete topology on $\mathbf{N}$, and let $X$ be $(\mathbf{N}, T)$. Then for every integer $n$, the identity map, $$f_n : X \longrightarrow X_n$$ is continuous. We claim that this is the inverse limit of the directed system above. Let $(Y, S)$ be any topological space. For every integer $n$, let $$g_n : (Y, S) \longrightarrow (\mathbf{N}, T_n)$$ be a continuous map. Assume that for every $m < n$ we have $f_{n,m} \circ g_n = g_m$, i.e., the system $(g_n)$ is compatible with the directed system above. In particular, all of the set maps $g_n$ are equal to a common set map $$g : Y \longrightarrow \mathbf{N}.$$ Moreover, for every integer $n$, since $\{n\}$ is open in $X_n$, also $g^{-1}(\{n\}) = g_n^{-1}(\{n\})$ is open in $Y$. Therefore the set map $g$ is continuous for the topology $S$ on $Y$ and the topology $T$ on $\mathbf{N}$. Thus $(X, (f_n))$ is the inverse limit of the directed system above. \medskip\noindent However, clearly $X$ is not quasi-compact, since the infinite open covering by singleton sets has no inverse limit. \begin{lemma} \label{lemma-lim-not-quasi-compact} There exists an inverse system of quasi-compact topological spaces over $\mathbf{N}$ whose limit is not quasi-compact. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{A nonintegral connected scheme whose local rings are domains} \label{section-connected-locally-integral-not-integral} \noindent We give an example of an affine scheme $X = \Spec(A)$ which is connected, all of whose local rings are domains, but which is not integral. Connectedness of $X$ means $A$ has no nontrivial idempotents, see Algebra, Lemma \ref{algebra-lemma-disjoint-decomposition}. The local rings of $X$ are domains if, whenever $fg = 0$ in $A$, every point of $X$ has a neighborhood where either $f$ or $g$ vanishes. As long as $A$ is not a domain, then $X$ is not integral (Properties, Definition \ref{properties-definition-integral}). \medskip\noindent Roughly speaking, the construction is as follows: let $X_0$ be the cross (the union of coordinate axes) on the affine plane. Then let $X_1$ be the (reduced) full preimage of $X_0$ on the blow-up of the plane ($X_1$ has three rational components forming a chain). Then blow up the resulting surface at the two singularities of $X_1$, and let $X_2$ be the reduced preimage of $X_1$ (which has five rational components), etc. Take $X$ to be the inverse limit. The only problem with this construction is that blow-ups glue in a projective line, so $X_1$ is not affine. Let us correct this by glueing in an affine line instead (so our scheme will be an open subset in what was described above). \medskip\noindent Here is a completely algebraic construction: For every $k \ge 0$, let $A_k$ be the following ring: its elements are collections of polynomials $p_i \in \mathbf{C}[x]$ where $i = 0, \ldots, 2^k$ such that $p_i(1) = p_{i + 1}(0)$. Set $X_k = \Spec(A_k)$. Observe that $X_k$ is a union of $2^k + 1$ affine lines that meet transversally in a chain. Define a ring homomorphism $A_k \to A_{k + 1}$ by $$(p_0, \ldots, p_{2^k}) \longmapsto (p_0, p_0(1), p_1, p_1(1), \ldots, p_{2^k}),$$ in other words, every other polynomial is constant. This identifies $A_k$ with a subring of $A_{k + 1}$. Let $A$ be the direct limit of $A_k$ (basically, their union). Set $X = \Spec(A)$. For every $k$, we have a natural embedding $A_k \to A$, that is, a map $X\to X_k$. Each $A_k$ is connected but not integral; this implies that $A$ is connected but not integral. It remains to show that the local rings of $A$ are domains. \medskip\noindent Take $f, g \in A$ with $fg = 0$ and $x \in X$. Let us construct a neighborhood of $x$ on which one of $f$ and $g$ vanishes. Choose $k$ such that $f, g \in A_{k - 1}$ (note the $k - 1$ index). Let $y$ be the image of $x$ in $X_k$. It suffices to prove that $y$ has a neighborhood on which either $f$ or $g$ viewed as sections of $\mathcal{O}_{X_k}$ vanishes. If $y$ is a smooth point of $X_k$, that is, it lies on only one of the $2^k + 1$ lines, this is obvious. We can therefore assume that $y$ is one of the $2^k$ singular points, so two components of $X_k$ pass through $y$. However, on one of these two components (the one with odd index), both $f$ and $g$ are constant, since they are pullbacks of functions on $X_{k - 1}$. Since $fg = 0$ everywhere, either $f$ or $g$ (say, $f$) vanishes on the other component. This implies that $f$ vanishes on both components, as required. \section{Noncomplete completion} \label{section-noncomplete-completion} \noindent Let $R$ be a ring and let $\mathfrak m$ be a maximal ideal. Consider the completion $$R^\wedge = \lim R/\mathfrak m^n.$$ Note that $R^\wedge$ is a local ring with maximal ideal $\mathfrak m' = \Ker(R^\wedge \to R/\mathfrak m)$. Namely, if $x = (x_n) \in R^\wedge$ is not in $\mathfrak m'$, then $y = (x_n^{-1}) \in R^\wedge$ satisfies $xy = 1$, whence $R^\wedge$ is local by Algebra, Lemma \ref{algebra-lemma-characterize-local-ring}. Now it is always true that $R^\wedge$ complete in its limit topology (see the discussion in More on Algebra, Section \ref{more-algebra-section-topological-ring}). But beyond that, we have the following questions: \begin{enumerate} \item Is it true that $\mathfrak m R^\wedge = \mathfrak m'$? \item Is $R^\wedge$ viewed as an $R^\wedge$-module $\mathfrak m'$-adically complete? \item Is $R^\wedge$ viewed as an $R$-module $\mathfrak m$-adically complete? \end{enumerate} It turns out that these questions all have a negative answer. The example below was taken from an unpublished note of Bart de Smit and Hendrik Lenstra. See also \cite[Exercise III.2.12]{Bourbaki-CA} and \cite[Example 1.8]{Yekutieli} \medskip\noindent Let $k$ be a field, $R = k[x_1, x_2, x_3, \ldots]$, and $\mathfrak m = (x_1, x_2, x_3, \ldots)$. We will think of an element $f$ of $R^\wedge$ as a (possibly) infinite sum $$f = \sum a_I x^I$$ (using multi-index notation) such that for each $d \geq 0$ there are only finitely many nonzero $a_I$ for $|I| = d$. The maximal ideal $\mathfrak m' \subset R^\wedge$ is the collection of $f$ with zero constant term. In particular, the element $$f = x_1 + x_2^2 + x_3^3 + \ldots$$ is in $\mathfrak m'$ but not in $\mathfrak m R^\wedge$ which shows that (1) is false in this example. However, if (1) is false, then (3) is necessarily false because $\mathfrak m' = \Ker(R^\wedge \to R/\mathfrak m)$ and we can apply Algebra, Lemma \ref{algebra-lemma-hathat} with $n = 1$. \medskip\noindent To finish we prove that $R^\wedge$ is not $\mathfrak m'$-adically complete. For $n \geq 1$ let $K_n = \Ker(R^\wedge \to R/\mathfrak m^n)$. Then we have short exact sequences $$0 \to K_n/(\mathfrak m')^n \to R^\wedge/(\mathfrak m')^n \to R/\mathfrak m^n \to 0$$ The projection map $R^\wedge \to R/\mathfrak m^{n + 1}$ sends $(\mathfrak m')^n$ onto $\mathfrak m^n/\mathfrak m^{n + 1}$. It follows that $K_{n + 1} \to K_n/(\mathfrak m')^n$ is surjective. Hence the inverse system $\left(K_n/(\mathfrak m')^n\right)$ has surjective transition maps and taking inverse limits we obtain an exact sequence $$0 \to \lim K_n/(\mathfrak m')^n \to \lim R^\wedge/(\mathfrak m')^n \to \lim R/\mathfrak m^n \to 0$$ by Algebra, Lemma \ref{algebra-lemma-Mittag-Leffler}. Thus we see that $R^\wedge$ is complete with respect to $\mathfrak m'$ if and only if $K_n = (\mathfrak m')^n$ for all $n \geq 1$. \medskip\noindent To show that $R^\wedge$ is not $\mathfrak m'$-adically complete in our example we show that $K_2 = \Ker(R^\wedge \to R/\mathfrak m^2)$ is not equal to $(\mathfrak m')^2$. Note that an element of $(\mathfrak m')^2$ can be written as a finite sum \begin{equation} \label{equation-sum} \sum\nolimits_{i = 1, \ldots, t} f_i g_i \end{equation} with $f_i, g_i \in R^\wedge$ having vanishing constant terms. To get an example we are going to choose an $z \in K_2$ of the form $$z = z_1 + z_2 + z_3 + \ldots$$ with the following properties \begin{enumerate} \item there exist sequences $1 < d_1 < d_2 < d_3 < \ldots$ and $0 < n_1 < n_2 < n_3 < \ldots$ such that $z_i \in k[x_{n_i}, x_{n_i + 1}, \ldots, x_{n_{i + 1} - 1}]$ homogeneous of degree $d_i$, and \item in the ring $k[[x_{n_i}, x_{n_i + 1}, \ldots, x_{n_{i + 1} - 1}]]$ the element $z_i$ cannot be written as a sum (\ref{equation-sum}) with $t \leq i$. \end{enumerate} Clearly this implies that $z$ is not in $(\mathfrak m')^2$ because the image of the relation (\ref{equation-sum}) in the ring $k[[x_{n_i}, x_{n_i + 1}, \ldots, x_{n_{i + 1} - 1}]]$ for $i$ large enough would produce a contradiction. Hence it suffices to prove that for all $t > 0$ there exists a $d \gg 0$ and an integer $n$ such that we can find an homogeneous element $z \in k[x_1, \ldots, x_n]$ of degree $d$ which cannot be written as a sum (\ref{equation-sum}) for the given $t$ in $k[[x_1, \ldots, x_n]]$. Take $n > 2t$ and any $d > 1$ prime to the characteristic of $p$ and set $z = \sum_{i = 1, \ldots, n} x_i^d$. Then the vanishing locus of the ideal $$(\frac{\partial z}{\partial x_1}, \ldots, \frac{\partial z}{\partial x_n}) = (dx_1^{d - 1}, \ldots, dx_n^{d - 1})$$ consists of one point. On the other hand, $$\frac{\partial ( \sum\nolimits_{i = 1, \ldots, t} f_i g_i ) }{\partial x_j} \in (f_1, \ldots, f_t, g_1, \ldots, g_t)$$ by the Leibniz rule and hence the vanishing locus of these derivatives contains at least $$V(f_1, \ldots, f_t, g_1, \ldots, g_t) \subset \Spec(k[[x_1, \ldots, x_n]]).$$ Hence this is a contradiction as the dimension of $V(f_1, \ldots, f_t, g_1, \ldots, g_t)$ is at least $n - 2t \geq 1$. \begin{lemma} \label{lemma-noncomplete-completion} There exists a local ring $R$ and a maximal ideal $\mathfrak m$ such that the completion $R^\wedge$ of $R$ with respect to $\mathfrak m$ has the following properties \begin{enumerate} \item $R^\wedge$ is local, but its maximal ideal is not equal to $\mathfrak m R^\wedge$, \item $R^\wedge$ is not a complete local ring, and \item $R^\wedge$ is not $\mathfrak m$-adically complete as an $R$-module. \end{enumerate} \end{lemma} \begin{proof} This follows from the discussion above as (with $R = k[x_1, x_2, x_3, \ldots]$) the completion of the localization $R_{\mathfrak m}$ is equal to the completion of $R$. \end{proof} \section{Noncomplete quotient} \label{section-noncomplete-quotient} \noindent Let $k$ be a field. Let $$R = k[t, z_1, z_2, z_3, \ldots, w_1, w_2, w_3, \ldots, x]/ (z_it - x^iw_i, z_i w_j)$$ Note that in particular $z_iz_jt = 0$ in this ring. Any element $f$ of $R$ can be uniquely written as a finite sum $$f = \sum\nolimits_{i = 0, \ldots, d} f_i x^i$$ where each $f_i \in k[t, z_i, w_j]$ has no terms involving the products $z_it$ or $z_iw_j$. Moreover, if $f$ is written in this way, then $f \in (x^n)$ if and only if $f_i = 0$ for $i < n$. So $x$ is a nonzerodivisor and $\bigcap (x^n) = 0$. Let $R^\wedge$ be the completion of $R$ with respect to the ideal $(x)$. Note that $R^\wedge$ is $(x)$-adically complete, see Algebra, Lemma \ref{algebra-lemma-hathat-finitely-generated}. By the above we see that an element of $R^\wedge$ can be uniquely written as an infinite sum $$f = \sum\nolimits_{i = 0}^\infty f_i x^i$$ where each $f_i \in k[t, z_i, w_j]$ has no terms involving the products $z_it$ or $z_iw_j$. Consider the element $$f = \sum\nolimits_{i = 1}^\infty x^i w_i = xw_1 + x^2w_2 + x^3w_3 + \ldots$$ i.e., we have $f_n = w_n$. Note that $f \in (t , x^n)$ for every $n$ because $x^mw_m \in (t)$ for all $m$. We claim that $f \not \in (t)$. To prove this assume that $tg = f$ where $g = \sum g_lx^l$ in canonical form as above. Since $tz_iz_j = 0$ we may as well assume that none of the $g_l$ have terms involving the products $z_iz_j$. Examining the process to get $tg$ in canonical form we see the following: Given any term $c m$ of $g_l$ where $c \in k$ and $m$ is a monomial in $t, z_i, w_j$ and we make the following replacement \begin{enumerate} \item if the monomial $m$ does not involve any $z_i$, then $ctm$ is a term of $f_l$, and \item if the monomial $m$ does involve a $z_i$ then it is equal to $m = z_i$ and we see that $cw_i$ is term of $f_{l + i}$. \end{enumerate} Since $g_0$ is a polynomial only finitely many of the variables $z_i$ occur in it. Pick $n$ such that $z_n$ does not occur in $g_0$. Then the rules above show that $w_n$ does not occur in $f_n$ which is a contradiction. It follows that $R^\wedge/(t)$ is not complete, see Algebra, Lemma \ref{algebra-lemma-quotient-complete}. \begin{lemma} \label{lemma-noncomplete-quotient} There exists a ring $R$ complete with respect to a principal ideal $I$ and a principal ideal $J$ such that $R/J$ is not $I$-adically complete. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{Completion is not exact} \label{section-completion-not-exact} \noindent A quick example is the following. Suppose that $R = k[t]$. Let $P = K = \bigoplus_{n \in \mathbf{N}} R$ and $M = \bigoplus_{n \in \mathbf{N}} R/(t^n)$. Then there is a short exact sequence $0 \to K \to P \to M \to 0$ where the first map is given by multiplication by $t^n$ on the $n$th summand. We claim that $0 \to K^\wedge \to P^\wedge \to M^\wedge \to 0$ is not exact in the middle. Namely, $\xi = (t^2, t^3, t^4, \ldots) \in P^\wedge$ maps to zero in $M^\wedge$ but is not in the image of $K^\wedge \to P^\wedge$, because it would be the image of $(t, t, t, \ldots)$ which is not an element of $K^\wedge$. \medskip\noindent A smaller'' example is the following. In the situation of Lemma \ref{lemma-noncomplete-quotient} the short exact sequence $0 \to J \to R \to R/J \to 0$ does not remain exact after completion. Namely, if $f \in J$ is a generator, then $f : R \to J$ is surjective, hence $R \to J^\wedge$ is surjective, hence the image of $J^\wedge \to R$ is $(f) = J$ but the fact that $R/J$ is noncomplete means that the kernel of the surjection $R \to (R/J)^\wedge$ is strictly bigger than $J$, see Algebra, Lemmas \ref{algebra-lemma-completion-generalities} and \ref{algebra-lemma-quotient-complete}. By the same token the sequence $R \to R \to R/(f) \to 0$ does not remain exact on completion. \begin{lemma} \label{lemma-completion-not-exact} \begin{slogan} Completion is neither left nor right exact in general. \end{slogan} Completion is not an exact functor in general; it is not even right exact in general. This holds even when $I$ is finitely generated on the category of finitely presented modules. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{The category of complete modules is not abelian} \label{section-non-abelian} \noindent Let $R$ be a ring and let $I \subset R$ be a finitely generated ideal. Consider the category $\mathcal{A}$ of $I$-adically complete $R$-modules, see Algebra, Definition \ref{algebra-definition-complete}. Let $\varphi : M \to N$ be a morphism of $\mathcal{A}$. The cokernel of $\varphi$ in $\mathcal{A}$ is the completion $(\Coker(\varphi))^\wedge$ of the usual cokernel (as $I$ is finitely generated this completion is complete, see Algebra, Lemma \ref{algebra-lemma-hathat-finitely-generated}). Let $K = \Ker(\varphi)$. We claim that $K$ is complete and hence is the kernel of $\varphi$ in $\mathcal{A}$. Namely, let $K^\wedge$ be the completion. As $M$ is complete we obtain a factorization $$K \to K^\wedge \to M \xrightarrow{\varphi} N$$ Since $\varphi$ is continuous for the $I$-adic topology, $K \to K^\wedge$ has dense image, and $K = \Ker(\varphi)$ we conclude that $K^\wedge$ maps into $K$. Thus $K^\wedge = K \oplus C$ and $K$ is a direct summand of a complete module, hence complete. \medskip\noindent We will give an example that shows that $\Im \not = \Coim$ in general. We take $R = \mathbf{Z}_p = \lim_n \mathbf{Z}/p^n\mathbf{Z}$ to be the ring of $p$-adic integers and we take $I = (p)$. Consider the map $$\text{diag}(1, p, p^2, \ldots) : \left(\bigoplus\nolimits_{n \geq 1} \mathbf{Z}_p\right)^\wedge \longrightarrow \prod\nolimits_{n \geq 1} \mathbf{Z}_p$$ where the left hand side is the $p$-adic completion of the direct sum. Hence an element of the left hand side is a vector $(x_1, x_2, x_3, \ldots)$ with $x_i \in \mathbf{Z}_p$ with $p$-adic valuation $v_p(x_i) \to \infty$ as $i \to \infty$. This maps to $(x_1, px_2, p^2x_3, \ldots)$. Hence we see that $(1, p, p^2, \ldots)$ is in the closure of the image but not in the image. By our description of kernels and cokernels above it is clear that $\Im \not = \Coim$ for this map. \begin{lemma} \label{lemma-complete-modules-not-abelian} Let $R$ be a ring and let $I \subset R$ be a finitely generated ideal. The category of $I$-adically complete $R$-modules has kernels and cokernels but is not abelian in general. \end{lemma} \begin{proof} See above. \end{proof} \section{The category of derived complete modules} \label{section-derived-complete-modules} \noindent Let $A$ be a ring and let $I$ be an ideal. Consider the category $\mathcal{C}$ of derived complete modules as defined in More on Algebra, Definition \ref{more-algebra-definition-derived-complete}. By More on Algebra, Lemma \ref{more-algebra-lemma-serre-subcategory} we see that $\mathcal{C}$ is abelian. \medskip\noindent Let $T$ be a set and let $M_t$, $t \in T$ be a family of derived complete modules. We claim that in general $\bigoplus M_t$ is not a complete module. For a specific example, let $A = \mathbf{Z}_p$ and $I = (p)$ and $\bigoplus_{n \in \mathbf{N}} \mathbf{Z}_p$. The map from $\bigoplus_{n \in \mathbf{N}} \mathbf{Z}_p$ to its $p$-adic completion isn't surjective. This means that $\bigoplus_{n \in \mathbf{N}} \mathbf{Z}_p$ cannot be derived complete as this would imply otherwise, see More on Algebra, Lemma \ref{more-algebra-lemma-complete-derived-complete}. \medskip\noindent Assume $I$ is finitely generated. Let ${}^\wedge : D(A) \to D(A)$ denote the {\bf derived completion} functor, see More on Algebra, Lemma \ref{more-algebra-lemma-derived-completion}. We claim that $$M = H^0((\bigoplus M_t)^\wedge) \in \Ob(\mathcal{C})$$ is a direct sum of $M_t$ in the category $\mathcal{C}$. Note that for $E$ a derived complete object of $D(A)$ we have $$\Hom_{D(A)}((\bigoplus M_t)^\wedge, E) = \Hom_{D(A)}(\bigoplus M_t, E) = \prod \Hom_{D(A)}(M_t, E)$$ Note that the right hand side is zero if $H^i(E) = 0$ for $i < 1$. In particular, applying this with $E = \tau_{\geq 1} (\bigoplus M_t)^\wedge$ which is derived complete by More on Algebra, Lemma \ref{more-algebra-lemma-serre-subcategory} we see that the canonical map $(\bigoplus M_t)^\wedge \to \tau_{\geq 1}(\bigoplus M_t)^\wedge$ is zero, in other words, we have $H^i((\bigoplus M_t)^\wedge) = 0$ for $i \geq 1$. Then, for an object $N \in \mathcal{C}$ we see that \begin{align*} \Hom_\mathcal{C}(M, N) & = \Hom_{D(A)}((\bigoplus M_t)^\wedge, N)\\ & = \prod \Hom_A(M_t, N) \\ & = \prod \Hom_\mathcal{C}(M_t, N) \end{align*} as desired. This implies that $\mathcal{C}$ has all colimits, see Categories, Lemma \ref{categories-lemma-colimits-coproducts-coequalizers}. In fact, arguing similarly as above we see that given a system $M_t$ in $\mathcal{C}$ over a preordered set $T$ the colimit in $\mathcal{C}$ is equal to $H^0((\colim M_t)^\wedge)$ where the inner colimit is the colimit in the category of $A$-modules. \medskip\noindent However, we claim that filtered colimits are not exact in the category $\mathcal{C}$. Namely, suppose that $A = \mathbf{Z}_p$ and $I = (p)$. One has inclusions $f_n : \mathbf{Z}_p/p\mathbf{Z}_p \to \mathbf{Z}_p/p^n\mathbf{Z}_p$ of $p$-adically complete $A$-modules given by multiplication by $p^{n - 1}$. There are commutative diagrams $$\xymatrix{ \mathbf{Z}_p/p\mathbf{Z}_p \ar[r]_{f_n} \ar[d]^1 & \mathbf{Z}_p/p^n\mathbf{Z}_p \ar[d]_p \\ \mathbf{Z}_p/p\mathbf{Z}_p \ar[r]^{f_{n + 1}} & \mathbf{Z}_p/p^{n + 1}\mathbf{Z}_p }$$ Now take the colimit of these inclusions in the category $\mathcal{C}$ derived to get $\mathbf{Z}_p/p\mathbf{Z}_p \to 0$. Namely, the colimit in $\text{Mod}_A$ of the system on the right is $\mathbf{Q}_p/\mathbf{Z}_p$. The reader can directly compute that $(\mathbf{Q}_p/\mathbf{Z}_p)^\wedge = \mathbf{Z}_p[1]$ in $D(A)$. Thus $H^0 = 0$ which proves our claim. \begin{lemma} \label{lemma-derived-complete-modules} Let $A$ be a ring and let $I \subset A$ be an ideal. The category $\mathcal{C}$ of derived complete modules is abelian and the inclusion functor $F : \mathcal{C} \to \text{Mod}_A$ is exact and commutes with arbitrary limits. If $I$ is finitely generated, then $\mathcal{C}$ has arbitrary direct sums and colimits, but $F$ does not commute with these in general. Finally, filtered colimits are not exact in $\mathcal{C}$ in general, hence $\mathcal{C}$ is not a Grothendieck abelian category. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{Nonflat completions} \label{section-nonflat} \noindent The completion of a ring with respect to an ideal isn't always flat, contrary to the Noetherian case. We have seen two examples of this phenomenon in More on Algebra, Example \ref{more-algebra-example-not-glueing-pair}. In this section we give two more examples. \begin{lemma} \label{lemma-countable-fg-tensor} Let $R$ be a ring. Let $M$ be an $R$-module which is countable. Then $M$ is a finite $R$-module if and only if $M \otimes_R R^\mathbf{N} \to M^\mathbf{N}$ is surjective. \end{lemma} \begin{proof} If $M$ is a finite module, then the map is surjective by Algebra, Proposition \ref{algebra-proposition-fg-tensor}. Conversely, assume the map is surjective. Let $m_1, m_2, m_3, \ldots$ be an enumeration of the elements of $M$. Let $\sum_{j = 1, \ldots, m} x_j \otimes a_j$ be an element of the tensor product mapping to the element $(m_n) \in M^\mathbf{N}$. Then we see that $x_1, \ldots, x_m$ generate $M$ over $R$ as in the proof of Algebra, Proposition \ref{algebra-proposition-fg-tensor}. \end{proof} \begin{lemma} \label{lemma-countable-fp-tensor} Let $R$ be a countable ring. Let $M$ be a countable $R$-module. Then $M$ is finitely presented if and only if the canonical map $M \otimes_R R^\mathbf{N} \to M^\mathbf{N}$ is an isomorphism. \end{lemma} \begin{proof} If $M$ is a finitely presented module, then the map is an isomorphism by Algebra, Proposition \ref{algebra-proposition-fp-tensor}. Conversely, assume the map is an isomorphism. By Lemma \ref{lemma-countable-fg-tensor} the module $M$ is finite. Choose a surjection $R^{\oplus m} \to M$ with kernel $K$. Then $K$ is countable as a submodule of $R^{\oplus m}$. Arguing as in the proof of Algebra, Proposition \ref{algebra-proposition-fp-tensor} we see that $K \otimes_R R^\mathbf{N} \to K^\mathbf{N}$ is surjective. Hence we conclude that $K$ is a finite $R$-module by Lemma \ref{lemma-countable-fg-tensor}. Thus $M$ is finitely presented. \end{proof} \begin{lemma} \label{lemma-countable-coherent} Let $R$ be a countable ring. Then $R$ is coherent if and only if $R^\mathbf{N}$ is a flat $R$-module. \end{lemma} \begin{proof} If $R$ is coherent, then $R^\mathbf{N}$ is a flat module by Algebra, Proposition \ref{algebra-proposition-characterize-coherent}. Assume $R^\mathbf{N}$ is flat. Let $I \subset R$ be a finitely generated ideal. To prove the lemma we show that $I$ is finitely presented as an $R$-module. Namely, the map $I \otimes_R R^\mathbf{N} \to R^\mathbf{N}$ is injective as $R^\mathbf{N}$ is flat and its image is $I^\mathbf{N}$ by Lemma \ref{lemma-countable-fg-tensor}. Thus we conclude by Lemma \ref{lemma-countable-fp-tensor}. \end{proof} \noindent Let $R$ be a countable ring. Observe that $R[[x]]$ is isomorphic to $R^\mathbf{N}$ as an $R$-module. By Lemma \ref{lemma-countable-coherent} we see that $R \to R[[x]]$ is flat if and only if $R$ is coherent. There are plenty of noncoherent countable rings, for example $$R = k[y, z, a_1, b_1, a_2, b_2, a_3, b_3, \ldots]/ (a_1 y + b_1 z, a_2 y + b_2 z, a_3 y + b_3 z, \ldots)$$ where $k$ is a countable field. This ring is not coherent because the ideal $(y, z)$ of $R$ is not a finitely presented $R$-module. Note that $R[[x]]$ is the completion of $R[x]$ by the principal ideal $(x)$. \begin{lemma} \label{lemma-completion-polynomial-ring-not-flat} There exists a ring such that the completion $R[[x]]$ of $R[x]$ at $(x)$ is not flat over $R$ and a fortiori not flat over $R[x]$. \end{lemma} \begin{proof} See discussion above. \end{proof} \noindent Next, we will construct an example where the completion of a localization is nonflat. To do this consider the ring $$R = k[y, z, a_1, a_2, a_3, \ldots]/(ya_i, a_i a_j)$$ Denote $f \in R$ the residue class of $z$. We claim the ring map \begin{equation} \label{equation-nonflat} R[[x]] \longrightarrow R_f[[x]] \end{equation} isn't flat. Let $I$ be the kernel of $y : R[[x]] \to R[[x]]$. A typical element $g$ of $I$ looks like $g = \sum g_{n, m} a_mx^n$ where $g_{n, m} \in k[z]$ and for a given $n$ only a finite number of nonzero $g_{n, m}$. Let $J$ be the kernel of $y : R_f[[x]] \to R_f[[x]]$. We claim that $J \not = I R_f[[x]]$. Namely, if this were true then we would have $$\sum z^{-n} a_n x^n = \sum\nolimits_{i = 1, \ldots, m} h_i g_i$$ for some $m \geq 1$, $g_i \in I$, and $h_i \in R_f[[x]]$. Say $h_i = \bar h_i \bmod (y, a_1, a_2, a_3, \ldots)$ with $\bar h_i \in k[z, 1/z][[x]]$. Looking at the coefficient of $a_n$ and using the description of the elements $g_i$ above we would get $$z^{-n} x^n = \sum \bar h_i \bar g_{i, n}$$ for some $\bar g_{i, n} \in k[z][[x]]$. This would mean that all $z^{-n}x^n$ are contained in the finite $k[z][[x]]$-module generated by the elements $\bar h_i$. Since $k[z][[x]]$ is Noetherian this implies that the $R[z][[x]]$-submodule of $k[z, 1/z][[x]]$ generated by $1, z^{-1}x, z^{-2}x^2, \ldots$ is finite. By Algebra, Lemma \ref{algebra-lemma-characterize-integral-element} we would conclude that $z^{-1}x$ is integral over $k[z][[x]]$ which is absurd. On the other hand, if (\ref{equation-nonflat}) were flat, then we would get $J = IR_f[[x]]$ by tensoring the exact sequence $0 \to I \to R[[x]] \xrightarrow{y} R[[x]]$ with $R_f[[x]]$. \begin{lemma} \label{lemma-nonflat-completion-localization} There exists a ring $A$ complete with respect to a principal ideal $I$ and an element $f \in A$ such that the $I$-adic completion $A_f^\wedge$ of $A_f$ is not flat over $A$. \end{lemma} \begin{proof} Set $A = R[[x]]$ and $I = (x)$ and observe that $R_f[[x]]$ is the completion of $R[[x]]_f$. \end{proof} \section{Nonabelian category of quasi-coherent modules} \label{section-nonabelian-QCoh} \noindent In Sheaves on Stacks, Section \ref{stacks-sheaves-section-quasi-coherent} we defined the category of quasi-coherent modules on a category fibred in groupoids over $\Sch$. Although we show in Sheaves on Stacks, Section \ref{stacks-sheaves-section-quasi-coherent-algebraic-stacks} that this category is abelian for algebraic stacks, in this section we show that this is not the case for formal algebraic spaces. \medskip\noindent Namely, consider $\mathbf{Z}_p$ viewed as topological ring using the $p$-adic topology. Let $X = \text{Spf}(\mathbf{Z}_p)$, see Formal Spaces, Definition \ref{formal-spaces-definition-affine-formal-spectrum}. Then $X$ is a sheaf in sets on $(\Sch/\mathbf{Z})_{fppf}$ and gives rise to a stack in setoids $\mathcal{X}$, see Stacks, Lemma \ref{stacks-lemma-when-stack-in-sets}. Thus the discussion of Sheaves on Stacks, Section \ref{stacks-sheaves-section-quasi-coherent-algebraic-stacks} applies. \medskip\noindent Let $\mathcal{F}$ be a quasi-coherent module on $\mathcal{X}$. Since $X = \colim \Spec(\mathbf{Z}/p^n\mathbf{Z})$ it is clear from Sheaves on Stacks, Lemma \ref{stacks-sheaves-lemma-quasi-coherent} that $\mathcal{F}$ is given by a sequence $(\mathcal{F}_n)$ where \begin{enumerate} \item $\mathcal{F}_n$ is a quasi-coherent module on $\Spec(\mathbf{Z}/p^n\mathbf{Z})$, and \item the transition maps give isomorphisms $\mathcal{F}_n = \mathcal{F}_{n + 1}/p^n\mathcal{F}_{n + 1}$. \end{enumerate} Converting into modules we see that $\mathcal{F}$ corresponds to a system $(M_n)$ where each $M_n$ is an abelian group annihilated by $p^n$ and the transition maps induce isomorphisms $M_n = M_{n + 1}/p^n M_{n + 1}$. In this situation the module $M = \lim M_n$ is a $p$-adically complete module and $M_n = M/p^n M$, see Algebra, Lemma \ref{algebra-lemma-limit-complete}. We conclude that the category of quasi-coherent modules on $X$ is equivalent to the category of $p$-adically complete abelian groups. This category is not abelian, see Section \ref{section-non-abelian}. \begin{lemma} \label{lemma-quasi-coherent-not-abelian} The category of quasi-coherent\footnote{With quasi-coherent modules as defined above. Due to how things are setup in the Stacks project, this is really the correct definition; as seen above our definition agrees with what one would naively have defined to be quasi-coherent modules on $\text{Spf}(A)$, namely complete $A$-modules.} modules on a formal algebraic space $X$ is not abelian in general, even if $X$ is a Noetherian affine formal algebraic space. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{Regular sequences and base change} \label{section-regular-base-change} \noindent We are going to construct a ring $R$ with a regular sequence $(x, y, z)$ such that there exists a nonzero element $\delta \in R/zR$ with $x\delta = y\delta = 0$. \medskip\noindent To construct our example we first construct a peculiar module $E$ over the ring $k[x, y, z]$ where $k$ is any field. Namely, $E$ will be a push-out as in the following diagram $$\xymatrix{ \frac{xk[x, y, z, y^{-1}]}{xyk[x, y, z]} \ar[r] \ar[d]^{z/x} & \frac{k[x, y, z, x^{-1}, y^{-1}]}{yk[x, y, z, x^{-1}]} \ar[r] \ar[d] & \frac{k[x, y, z, x^{-1}, y^{-1}]}{yk[x, y, z, x^{-1}] + xk[x, y, z, y^{-1}]} \ar[d] \\ \frac{k[x, y, z, y^{-1}]}{yzk[x, y, z]} \ar[r] & E \ar[r] & \frac{k[x, y, z, x^{-1}, y^{-1}]}{yk[x, y, z, x^{-1}] + xk[x, y, z, y^{-1}]} }$$ where the rows are short exact sequences (we dropped the outer zeros due to typesetting problems). Another way to describe $E$ is as $$E = \{(f, g) \mid f \in k[x, y, z, x^{-1}, y^{-1}], g \in k[x, y, z, y^{-1}] \}/\sim$$ where $(f, g) \sim (f', g')$ if and only if there exists a $h \in k[x, y, z, y^{-1}]$ such that $$f = f' + xh \bmod yk[x, y, z, x^{-1}], \quad g = g' - zh \bmod yzk[x, y, z]$$ We claim: (a) $x : E \to E$ is injective, (b) $y : E/xE \to E/xE$ is injective, (c) $E/(x, y)E = 0$, (d) there exists a nonzero element $\delta \in E/zE$ such that $x\delta = y\delta = 0$. \medskip\noindent To prove (a) suppose that $(f, g)$ is a pair that gives rise to an element of $E$ and that $(xf, xg) \sim 0$. Then there exists a $h \in k[x, y, z, y^{-1}]$ such that $xf + xh \in yk[x, y, z, x^{-1}]$ and $xg - zh \in yzk[x, y, z]$. We may assume that $h = \sum a_{i, j, k}x^iy^jz^k$ is a sum of monomials where only $j \leq 0$ occurs. Then $xg - zh \in yzk[x, y, z]$ implies that only $i > 0$ occurs, i.e., $h = xh'$ for some $h' \in k[x, y, z, y^{-1}]$. Then $(f, g) \sim (f + xh', g - zh')$ and we see that we may assume that $g = 0$ and $h = 0$. In this case $xf \in yk[x, y, z, x^{-1}]$ implies $f \in yk[x, y, z, x^{-1}]$ and we see that $(f, g) \sim 0$. Thus $x : E \to E$ is injective. \medskip\noindent Since multiplication by $x$ is an isomorphism on $\frac{k[x, y, z, x^{-1}, y^{-1}]}{yk[x, y, z, x^{-1}]}$ we see that $E/xE$ is isomorphic to $$\frac{k[x, y, z, y^{-1}]}{ yzk[x, y, z] + xk[x, y, z, y^{-1}] + zk[x, y, z, y^{-1}]} = \frac{k[x, y, z, y^{-1}]}{xk[x, y, z, y^{-1}] + zk[x, y, z, y^{-1}]}$$ and hence multiplication by $y$ is an isomorphism on $E/xE$. This clearly implies (b) and (c). \medskip\noindent Let $e \in E$ be the equivalence class of $(1, 0)$. Suppose that $e \in zE$. Then there exist $f \in k[x, y, z, x^{-1}, y^{-1}]$, $g \in k[x, y, z, y^{-1}]$, and $h \in k[x, y, z, y^{-1}]$ such that $$1 + zf + xh \in yk[x, y, z, x^{-1}], \quad 0 + zg - zh \in yzk[x, y, z].$$ This is impossible: the monomial $1$ cannot occur in $zf$, nor in $xh$. On the other hand, we have $ye = 0$ and $xe = (x, 0) \sim (0, -z) = z(0, -1)$. Hence setting $\delta$ equal to the congruence class of $e$ in $E/zE$ we obtain (d). \begin{lemma} \label{lemma-strange-regular-sequence} There exists a local ring $R$ and a regular sequence $x, y, z$ (in the maximal ideal) such that there exists a nonzero element $\delta \in R/zR$ with $x\delta = y\delta = 0$. \end{lemma} \begin{proof} Let $R = k[x, y, z] \oplus E$ where $E$ is the module above considered as a square zero ideal. Then it is clear that $x, y, z$ is a regular sequence in $R$, and that the element $\delta \in E/zE \subset R/zR$ gives an element with the desired properties. To get a local example we may localize $R$ at the maximal ideal $\mathfrak m = (x, y, z, E)$. The sequence $x, y, z$ remains a regular sequence (as localization is exact), and the element $\delta$ remains nonzero as it is supported at $\mathfrak m$. \end{proof} \begin{lemma} \label{lemma-base-change-regular-sequence} There exists a local homomorphism of local rings $A \to B$ and a regular sequence $x, y$ in the maximal ideal of $B$ such that $B/(x, y)$ is flat over $A$, but such that the images $\overline{x}, \overline{y}$ of $x, y$ in $B/\mathfrak m_AB$ do not form a regular sequence, nor even a Koszul-regular sequence. \end{lemma} \begin{proof} Set $A = k[z]_{(z)}$ and let $B = (k[x, y, z] \oplus E)_{(x, y, z, E)}$. Since $x, y, z$ is a regular sequence in $B$, see proof of Lemma \ref{lemma-strange-regular-sequence}, we see that $x, y$ is a regular sequence in $B$ and that $B/(x, y)$ is a torsion free $A$-module, hence flat. On the other hand, there exists a nonzero element $\delta \in B/\mathfrak m_AB = B/zB$ which is annihilated by $\overline{x}, \overline{y}$. Hence $H_2(K_\bullet(B/\mathfrak m_AB, \overline{x}, \overline{y})) \not = 0$. Thus $\overline{x}, \overline{y}$ is not Koszul-regular, in particular it is not a regular sequence, see More on Algebra, Lemma \ref{more-algebra-lemma-regular-koszul-regular}. \end{proof} \section{A Noetherian ring of infinite dimension} \label{section-Noetherian-infinite-dimension} \noindent A Noetherian local ring has finite dimension as we saw in Algebra, Proposition \ref{algebra-proposition-dimension}. But there exist Noetherian rings of infinite dimension. See \cite[Appendix, Example 1]{Nagata}. \medskip\noindent Namely, let $k$ be a field, and consider the ring $$R = k[x_1, x_2, x_3, \ldots ].$$ Let $\mathfrak p_i = (x_{2^{i - 1}}, x_{2^{i - 1} + 1}, \ldots, x_{2^i - 1})$ for $i = 1, 2, \ldots$ which are prime ideals of $R$. Let $S$ be the multiplicative subset $$S = \bigcap\nolimits_{i \geq 1} (R \setminus \mathfrak p_i).$$ Consider the ring $A = S^{-1}R$. We claim that \begin{enumerate} \item The maximal ideals of the ring $A$ are the ideals $\mathfrak m_i = \mathfrak p_iA$. \item We have $A_{\mathfrak m_i} = R_{\mathfrak p_i}$ which is a Noetherian local ring of dimension $2^i$. \item The ring $A$ is Noetherian. \end{enumerate} Hence it is clear that this is the example we are looking for. Details omitted. \section{Local rings with nonreduced completion} \label{section-local-completion-nonreduced} \noindent In Algebra, Example \ref{algebra-example-bad-dvr-char-p} we gave an example of a characteristic $p$ Noetherian local domain $R$ of dimension $1$ whose completion is nonreduced. In this section we present the example of \cite[Proposition 3.1]{Ferrand-Raynaud} which gives a similar ring in characteristic zero. \medskip\noindent Let $\mathbf{C}\{x\}$ be the ring of convergent power series over the field $\mathbf{C}$ of complex numbers. The ring of all power series $\mathbf{C}[[x]]$ is its completion. Let $K = \mathbf{C}\{x\}[1/x] = f.f.(B)$ be the field of convergent Laurent series. The $K$-module $\Omega_{K/\mathbf{C}}$ of algebraic differentials of $K$ over $\mathbf{C}$ is an infinite dimensional $K$-vector space (proof omitted). We may choose $f_n \in x\mathbf{C}\{x\}$, $n \geq 1$ such that $\text{d}x, \text{d}f_1, \text{d}f_2, \ldots$ are part of a basis of $\Omega_{K/\mathbf{C}}$. Thus we can find a $\mathbf{C}$-derivation $$D : \mathbf{C}\{x\} \longrightarrow \mathbf{C}((x))$$ such that $D(x) = 0$ and $D(f_i) = x^{-n}$. Let $$A = \{f \in \mathbf{C}\{x\} \mid D(f) \in \mathbf{C}[[x]]\}$$ We claim that \begin{enumerate} \item $\mathbf{C}\{x\}$ is integral over $A$, \item $A$ is a local domain, \item $\dim(A) = 1$, \item the maximal ideal of $A$ is generated by $x$ and $xf_1$, \item $A$ is Noetherian, and \item the completion of $A$ is equal to the ring of dual numbers over $\mathbf{C}[[x]]$. \end{enumerate} Since the dual numbers are nonreduced the ring $A$ gives the example. \medskip\noindent Note that if $0 \not = f \in x\mathbf{C}\{x\}$ then we may write $D(f) = h/f^n$ for some $n \geq 0$ and $h \in \mathbf{C}[[x]]$. Hence $D(f^{n + 1}/(n + 1)) \in \mathbf{C}[[x]]$ and $D(f^{n + 2}/(n + 2)) \in \mathbf{C}[[x]]$. Thus we see $f^{n + 1}, f^{n + 2} \in A$! In particular we see (1) holds. We also conclude that the fraction field of $A$ is equal to the fraction field of $\mathbf{C}\{x\}$. It also follows immediately that $A \cap x\mathbf{C}\{x\}$ is the set of nonunits of $A$, hence $A$ is a local domain of dimension $1$. If we can show (4) then it will follow that $A$ is Noetherian (proof omitted). Suppose that $f \in A \cap x\mathbf{C}\{x\}$. Write $D(f) = h$, $h \in \mathbf{C}[[x]]$. Write $h = c + xh'$ with $c \in \mathbf{C}$, $h' \in \mathbf{C}[[x]]$. Then $D(f - cxf_1) = c + xh' - c = xh'$. On the other hand $f - cxf_1 = xg$ with $g \in \mathbf{C}\{x\}$, but by the computation above we have $D(g) = h' \in \mathbf{C}[[x]]$ and hence $g \in A$. Thus $f = cxf_1 + xg \in (x, xf_1)$ as desired. \medskip\noindent Finally, why is the completion of $A$ nonreduced? Denote $\hat A$ the completion of $A$. Of course this maps surjectively to the completion $\mathbf{C}[[x]]$ of $\mathbf{C}\{x\}$ because $x \in A$. Denote this map $\psi : \hat A \to \mathbf{C}[[x]]$. Above we saw that $\mathfrak m_A = (x, xf_1)$ and hence $D(\mathfrak m_A^n) \subset (x^{n - 1})$ by an easy computation. Thus $D : A \to \mathbf{C}[[x]]$ is continuous and gives rise to a continuous derivation $\hat D : \hat A \to \mathbf{C}[[x]]$ over $\psi$. Hence we get a ring map $$\psi + \epsilon \hat D : \hat A \longrightarrow \mathbf{C}[[x]][\epsilon].$$ Since $\hat A$ is a one dimensional Noetherian complete local ring, if we can show this arrow is surjective then it will follow that $\hat A$ is nonreduced. Actually the map is an isomorphism but we omit the verification of this. The subring $\mathbf{C}[x]_{(x)} \subset A$ gives rise to a map $i : \mathbf{C}[[x]] \to \hat A$ on completions such that $i \circ \psi = \text{id}$ and such that $D \circ i = 0$ (as $D(x) = 0$ by construction). Consider the elements $x^nf_n \in A$. We have $$(\psi + \epsilon D)(x^nf_n) = x^n f_n + \epsilon$$ for all $n \geq 1$. Surjectivity easily follows from these remarks. \section{A non catenary Noetherian local ring} \label{section-non-catenary-Noetherian-local} \noindent Even though there is a succesful dimension theory of Noetherian local rings there are non-catenary Noetherian local rings. An example may be found in \cite[Appendix, Example 2]{Nagata}. In fact, we will present this example in the simplest case. Namely, we will construct a local Noetherian domain $A$ of dimension $2$ which is not universally catenary. (Note that $A$ is automatically catenary, see Exercises, Exercise \ref{exercises-exercise-Noetherian-local-domain-dim-2-catenary}.) The existence of a Noetherian local ring which is not universally catenary implies the existence of a Noetherian local ring which is not catenary -- and we spell this out at the end of this section in the particular example at hand. \medskip\noindent Let $k$ be a field, and consider the formal power series ring $k[[x]]$ in one variable over $k$. Let $$z = \sum\nolimits_{i = 1}^\infty a_i x^i$$ be a formal power series. We assume $z$ as an element of the Laurent series field $k((x)) = f.f.(k[[x]])$ is transcendental over $k(x)$. Put $$z_j = x^{-j}(z - \sum\nolimits_{i = 1, \ldots, j - 1} a_i x^i) = \sum\nolimits_{i = j}^\infty a_i x^{i - j} \in k[[x]].$$ Note that $z = z_1$. Let $R$ be the subring of $k[[x]]$ generated by $x$, $z$ and all of the $z_j$, in other words $$R = k[x, z_1, z_2, z_3, \ldots ] \subset k[[x]].$$ Consider the ideals $\mathfrak m = (x)$ and $\mathfrak n = (x - 1, z_1, z_2, \ldots)$ of $R$. \medskip\noindent We have $x(z_{j + 1} + a_j) = z_j$. Hence $R/\mathfrak m = k$ and $\mathfrak m$ is a maximal ideal. Moreover, any element of $R$ not in $\mathfrak m$ maps to a unit in $k[[x]]$ and hence $R_{\mathfrak m} \subset k[[x]]$. In fact it is easy to deduce that $R_{\mathfrak m}$ is a discrete valuation ring and residue field $k$. \medskip\noindent We claim that $$R/(x - 1) = k[x, z_1, z_2, z_3, \ldots ]/(x - 1) \cong k[z].$$ Namely, the relation above implies that $(x - 1)(z_{j + 1} + a_j) = -z_{j + 1} - a_j + z_j$, and hence we may express the class of $z_{j + 1}$ in terms of $z_j$ in the quotient $R/(x - 1)$. Since the fraction field of $R$ has transcendence degree $2$ over $k$ by construction we see that $z$ is transcendental over $k$ in $R/(x - 1)$, whence the desired isomorphism. Hence $\mathfrak n = (x - 1, z)$ and is a maximal ideal. In fact the map $$k[x, x^{-1}, z]_{(x - 1, z)} \longrightarrow R_{\mathfrak n}$$ is an isomorphism (since $x^{-1}$ is invertible in $R_{\mathfrak n}$ and since $z_{j + 1} = x^{-1}z_j - a_j = \ldots = f_j(x, x^{-1}, z)$). This shows that $R_{\mathfrak n}$ is a regular local ring of dimension $2$ and residue field $k$. \medskip\noindent Let $S$ be the multiplicative subset $$S = (R \setminus \mathfrak m) \cap (R \setminus \mathfrak n) = R \setminus (\mathfrak m \cup \mathfrak n)$$ and set $B = S^{-1}R$. We claim that \begin{enumerate} \item The ring $B$ is a $k$-algebra. \item The maximal ideals of the ring $B$ are the two ideals $\mathfrak mB$ and $\mathfrak nB$. \item The residue fields at these maximal ideals is $k$. \item We have $B_{\mathfrak mB} = R_{\mathfrak m}$ and $B_{\mathfrak nB} = R_{\mathfrak n}$ which are Noetherian regular local rings of dimensions $1$ and $2$. \item The ring $B$ is Noetherian. \end{enumerate} We omit the details of the verifications. \medskip\noindent Whenever given a $k$-algebra $B$ with the properties listed above we get an example as follows. Take $A = k + \text{rad}(B) \subset B$, in our case $\text{rad}(B) = \mathfrak mB + \mathfrak nB$. It is easy to see that $B$ is finite over $A$ and hence $A$ is Noetherian by Eakin's theorem (see \cite{Eakin}, or \cite[Appendix A1]{Nagata}, or insert future reference here). Also $A$ is a local domain with the same fraction field as $B$ and residue field $k$. Since the dimension of $B$ is $2$ we see that $A$ has dimension $2$ as well, by Algebra, Lemma \ref{algebra-lemma-integral-sub-dim-equal}. \medskip\noindent If $A$ were universally catenary then the dimension formula, Algebra, Lemma \ref{algebra-lemma-dimension-formula} would give $\dim(B_{\mathfrak mB}) = 2$ contradiction. \medskip\noindent Note that $B$ is generated by one element over $A$. Hence $B = A[x]/\mathfrak p$ for some prime $\mathfrak p$ of $A[x]$. Let $\mathfrak m' \subset A[x]$ be the maximal ideal corresponding to $\mathfrak mB$. Then on the one hand $\dim(A[x]_{\mathfrak m'}) = 3$ and on the other hand $$(0) \subset \mathfrak pA[x]_{\mathfrak m'} \subset \mathfrak m'A[x]_{\mathfrak m'}$$ is a maximal chain of primes. Hence $A[x]_{\mathfrak m'}$ is an example of a non catenary Noetherian local ring. \section{Existence of bad local Noetherian rings} \label{section-bad} \noindent Let $(A, \mathfrak m, \kappa)$ be a Noetherian complete local ring. In \cite{Lech} it was shown that $A$ is the completion of a Noetherian local domain if $\text{depth}(A) \geq 1$ and $A$ contains either $\mathbf{Q}$ or $\mathbf{F}_p$ as a subring, or contains $\mathbf{Z}$ as a subring and $A$ is torsion free as a $\mathbf{Z}$-module. This produces many examples of Noetherian local domains with bizarre'' properties. \medskip\noindent Applying this for example to $A = \mathbf{C}[[x, y]]/(y^2)$ we find a Noetherian local domain whose completion is nonreduced. Please compare with Section \ref{section-local-completion-nonreduced}. \medskip\noindent In \cite{LLPY} conditions were found that characterize when $A$ is the completion of a reduced local Noetherian ring. \medskip\noindent In \cite{Heitmann-completion-UFD} it was shown that $A$ is the completion of a local Noetherian UFD $R$ if $\text{depth}(A) \geq 2$ and $A$ contains either $\mathbf{Q}$ or $\mathbf{F}_p$ as a subring, or contains $\mathbf{Z}$ as a subring and $A$ is torsion free as a $\mathbf{Z}$-module. In particular $R$ is normal (Algebra, Lemma \ref{algebra-lemma-UFD-normal}) hence the henselization of $R$ is a normal domain too (More on Algebra, Lemma \ref{more-algebra-lemma-henselization-normal}). Thus $A$ as above is the completion of a henselian Noetherian local normal domain (because the completion of $R$ and its henselization agree, see More on Algebra, Lemma \ref{more-algebra-lemma-henselization-noetherian}). \medskip\noindent Apply this to find a Noetherian local UFD $R$ such that $R^\wedge \cong \mathbf{C}[[x, y, z, w]]/(wx, wy)$. Note that $\Spec(R^\wedge)$ is the union of a regular $2$-dimensional and a regular $3$-dimensional component. The ring $R$ cannot be universally catenary: Let $$X \longrightarrow \Spec(R)$$ be the blowing up of the maximal ideal. Then $X$ is an integral scheme. There is a closed point $x \in X$ such that $\dim(\mathcal{O}_{X, x}) = 2$, namely, on the level of the complete local ring we pick $x$ to lie on the strict transform of the $2$-dimensional component and not on the strict transform of the $3$-dimensional component. By Morphisms, Lemma \ref{morphisms-lemma-dimension-formula} we see that $R$ is not universally catenary. Please compare with Section \ref{section-non-catenary-Noetherian-local}. \medskip\noindent The ring above is catenary (being a $3$-dimensional local Noetherian UFD). However, in \cite{Ogoma-example} the author constructs a normal local Noetherian domain $R$ with $R^\wedge \cong \mathbf{C}[[x, y, z, w]]/(wx, wy)$ such that $R$ is not catenary. See also \cite{Heitmann-Ogoma} and \cite{Lech-YAPO}. \medskip\noindent In \cite{Heitmann-isolated} it was shown that $A$ is the completion of a local Noetherian ring $R$ with an isolated singularity provided $A$ contains either $\mathbf{Q}$ or $\mathbf{F}_p$ as a subring or $A$ has residue characteristic $p > 0$ and $p$ cannot map to a nonzero zerodivisor in any proper localization of $A$. Here we say a Noetherian local ring $R$ has an isolated singularity if $R_\mathfrak p$ is a regular local ring for all nonmaximal primes $\mathfrak p \subset R$. \medskip\noindent The paper \cite{Nishimura-few} contains a long list of bad'' Noetherian local rings with given completions. In particular it constructs an example of a $2$-dimensional Nagata local normal domain whose completion is $\mathbf{C}[[x, y, z]]/(yz)$ and one whose completion is $\mathbf{C}[[x, y, z]]/(y^2 - z^3)$. \medskip\noindent As an aside, in \cite{Loepp} it was shown that $A$ is the completion of an excellent Noetherian local domain if $A$ is reduced, equidimensional, and no integer in $A$ is a zero divisor. However, this doesn't lead to bad'' Noetherian local rings as we obtain excellent ones! \section{Non-quasi-affine variety with quasi-affine normalization} \label{section-nonquasi-affine} \noindent The existence of an example of this kind is mentioned in \cite[II Remark 6.6.13]{EGA}. They refer to the fifth volume of EGA for such an example, but the fifth volume did not appear. \medskip\noindent Let $k$ be a field. Let $Y = \mathbf{A}^2_k \setminus \{(0, 0)\}$. We are going to construct a finite surjective birational morphism $\pi : Y \longrightarrow X$ with $X$ a variety over $k$ such that $X$ is not quasi-affine. Namely, consider the following curves in $Y$: $$\begin{matrix} C_1 & : & x = 0 \\ C_2 & : & y = 0 \end{matrix}$$ Note that $C_1 \cap C_2 = \emptyset$. We choose the isomorphism $\varphi : C_1 \to C_2$, $(0, y) \mapsto (y^{-1}, 0)$. We claim there is a unique morphism $\pi : Y \to X$ as above such that $$\xymatrix{ C_1 \ar@<1ex>[rr]^{\text{id}} \ar@<-1ex>[rr]_{\varphi} & & Y \ar[r]^\pi & X }$$ is a coequalizer diagram in the category of varieties (and even in the category of schemes). Accepting this for the moment let us show that such an $X$ cannot be quasi-affine. Namely, it is clear that we would get $$\Gamma(X, \mathcal{O}_X) = \{ f \in k[x, y] \mid f(0, y) = f(y^{-1}, 0)\} = k \oplus (xy) \subset k[x, y].$$ In particular these functions do not separate the points $(1, 0)$ and $(-1, 0)$ whose images in $X$ (we will see below) are distinct (if the characteristic of $k$ is not $2$). \medskip\noindent To show that $X$ exists consider the Zariski open $D(x + y) \subset Y$ of $Y$. This is the spectrum of the ring $k[x, y, 1/(x + y)]$ and the curves $C_1$, $C_2$ are completely contained in $D(x + y)$. Moreover the morphism $$C_1 \amalg C_2 \longrightarrow D(x + y) \cap Y = \Spec(k[x, y, 1/(x + y)])$$ is a closed immersion. It follows from More on Algebra, Lemma \ref{more-algebra-lemma-fibre-product-finite-type} that the ring $$A = \{f \in k[x, y, 1/(x + y)] \mid f(0, y) = f(y^{-1}, 0)\}$$ is of finite type over $k$. On the other hand we have the open $D(xy) \subset Y$ of $Y$ which is disjoint from the curves $C_1$ and $C_2$. It is the spectrum of the ring $$B = k[x, y, 1/xy].$$ Note that we have $A_{xy} \cong B_{x + y}$ (since $A$ clearly contains the elements $xyP(x, y)$ any polynomial $P$ and the element $xy/(x + y)$). The scheme $X$ is obtained by glueing the affine schemes $\Spec(A)$ and $\Spec(B)$ using the isomorphism $A_{xy} \cong B_{x + y}$ and hence is clearly of finite type over $k$. To see that it is separated one has to show that the ring map $A \otimes_k B \to B_{x + y}$ is surjective. To see this use that $A \otimes_k B$ contains the element $xy/(x + y) \otimes 1/xy$ which maps to $1/(x + y)$. The morphism $X \to Y$ is given by the natural maps $D(x + y) \to \Spec(A)$ and $D(xy) \to \Spec(B)$. Since these are both finite we deduce that $X \to Y$ is finite as desired. We omit the verification that $X$ is indeed the coequalizer of the displayed diagram above, however, see (insert future reference for pushouts in the category of schemes here). Note that the morphism $\pi : Y \to X$ does map the points $(1, 0)$ and $(-1, 0)$ to distinct points in $X$ because the function $(x + y^3)/(x + y)^2 \in A$ has value $1/1$, resp.\ $-1/(-1)^2 = -1$ which are always distinct (unless the characteristic is $2$ -- please find your own points for characteristic $2$). We summarize this discussion in the form of a lemma. \begin{lemma} \label{lemma-quasi-affine-normalization-not-quasi-affine} Let $k$ be a field. There exists a variety $X$ whose normalization is quasi-affine but which is itself not quasi-affine. \end{lemma} \begin{proof} See discussion above and (insert future reference on normalization here). \end{proof} \section{A locally closed subscheme which is not open in closed} \label{section-strange-immersion} \noindent This is a copy of Morphisms, Example \ref{morphisms-example-thibaut}. Here is an example of an immersion which is not a composition of an open immersion followed by a closed immersion. Let $k$ be a field. Let $X = \Spec(k[x_1, x_2, x_3, \ldots])$. Let $U = \bigcup_{n = 1}^{\infty} D(x_n)$. Then $U \to X$ is an open immersion. Consider the ideals $$I_n = (x_1^n, x_2^n, \ldots, x_{n - 1}^n, x_n - 1, x_{n + 1}, x_{n + 2}, \ldots) \subset k[x_1, x_2, x_3, \ldots][1/x_n].$$ Note that $I_n k[x_1, x_2, x_3, \ldots][1/x_nx_m] = (1)$ for any $m \not = n$. Hence the quasi-coherent ideals $\widetilde I_n$ on $D(x_n)$ agree on $D(x_nx_m)$, namely $\widetilde I_n|_{D(x_nx_m)} = \mathcal{O}_{D(x_n x_m)}$ if $n \not = m$. Hence these ideals glue to a quasi-coherent sheaf of ideals $\mathcal{I} \subset \mathcal{O}_U$. Let $Z \subset U$ be the closed subscheme corresponding to $\mathcal{I}$. Thus $Z \to X$ is an immersion. \medskip\noindent We claim that we cannot factor $Z \to X$ as $Z \to \overline{Z} \to X$, where $\overline{Z} \to X$ is closed and $Z \to \overline{Z}$ is open. Namely, $\overline{Z}$ would have to be defined by an ideal $I \subset k[x_1, x_2, x_3, \ldots]$ such that $I_n = I k[x_1, x_2, x_3, \ldots][1/x_n]$. But the only element $f \in k[x_1, x_2, x_3, \ldots]$ which ends up in all $I_n$ is $0$! Hence $I$ does not exist. \section{Nonexistence of suitable opens} \label{section-nonexistence-opens} \noindent This section complements the results of Properties, Section \ref{properties-section-finding-affine-opens}. \medskip\noindent Let $k$ be a field and let $A = k[z_1, z_2, z_3, \ldots]/I$ where $I$ is the ideal generated by all pairwise products $z_iz_j$, $i \not = j$, $i, j \in \mathbf{N}$. Set $S = \Spec(A)$. Let $s \in S$ be the closed point corresponding to the maximal ideal $(z_i)$. We claim there is no quasi-compact open $V \subset S \setminus \{s\}$ which is dense in $S \setminus \{s\}$. Note that $S \setminus \{s\} = \bigcup D(z_i)$. Each $D(z_i)$ is open and irreducible with generic point $\eta_i$. We conclude that $\eta_i \in V$ for all $i$. However, a principal affine open of $S \setminus \{s\}$ is of the form $D(f)$ where $f \in (z_1, z_2, \ldots)$. Then $f \in (z_1, \ldots, z_n)$ for some $n$ and we see that $D(f)$ contains only finitely many of the points $\eta_i$. Thus $V$ cannot be quasi-compact. \medskip\noindent Let $k$ be a field and let $B = k[x, z_1, z_2, z_3, \ldots]/J$ where $J$ is the ideal generated by the products $xz_i$, $i \in \mathbf{N}$ and by all pairwise products $z_iz_j$, $i \not = j$, $i, j \in \mathbf{N}$. Set $T = \Spec(B)$. Consider the principal open $U = D(x)$. We claim there is no quasi-compact open $V \subset S$ such that $V \cap U = \emptyset$ and $V \cup U$ is dense in $S$. Let $t \in T$ be the closed point corresponding to the maximal ideal $(x, z_i)$. The closure of $U$ in $T$ is $\overline{U} = U \cup \{t\}$. Hence $V \subset \bigcup_i D(z_i)$ is a quasi-compact open. By the arguments of the previous paragraph we see that $V$ cannot be dense in $\bigcup D(z_i)$. \begin{lemma} \label{lemma-complement-of-affine-does-not-contain-qc-dense-open} Nonexistence quasi-compact opens of affines: \begin{enumerate} \item There exist an affine scheme $S$ and affine open $U \subset S$ such that there is no quasi-compact open $V \subset S$ with $U \cap V = \emptyset$ and $U \cup V$ dense in $S$. \item There exists an affine scheme $S$ and a closed point $s \in S$ such that $S \setminus \{s\}$ does not contain a quasi-compact dense open. \end{enumerate} \end{lemma} \begin{proof} See discussion above. \end{proof} \noindent Let $X$ be the glueing of two copies of the affine scheme $T$ (see above) along the affine open $U$. Thus there is a morphism $\pi : X \to T$ and $X = U_1 \cup U_2$ such that $\pi$ maps $U_i$ isomorphically to $T$ and $U_1 \cap U_2$ isomorphically to $U$. Note that $X$ is quasi-separated (by Schemes, Lemma \ref{schemes-lemma-characterize-quasi-separated}) and quasi-compact. We claim there does not exist a separated, dense, quasi-compact open $W \subset X$. Namely, consider the two closed points $x_1 \in U_1$, $x_2 \in U_2$ mapping to the closed point $t \in T$ introduced above. Let $\tilde \eta \in U_1 \cap U_2$ be the generic point mapping to the (unique) generic point $\eta$ of $U$. Note that $\tilde\eta \leadsto x_1$ and $\tilde\eta \leadsto x_2$ lying over the specialization $\eta \leadsto s$. Since $\pi|_W : W \to T$ is separated we conclude that we cannot have both $x_1$ and $x_2 \in W$ (by the valuative criterion of separatedness Schemes, Lemma \ref{schemes-lemma-valuative-criterion-separatedness}). Say $x_1 \not \in W$. Then $W \cap U_1$ is a quasi-compact (as $X$ is quasi-separated) dense open of $U_1$ which does not contain $x_1$. Now observe that there exists an isomorphism $(T, t) \cong (S, s)$ of schemes (by sending $x$ to $z_1$ and $z_i$ to $z_{i + 1}$). Hence by the first paragraph of this section we arrive at a contradiction. \begin{lemma} \label{lemma-no-dense-separated-quasi-compact-open-in-qcqs} There exists a quasi-compact and quasi-separated scheme $X$ which does not contain a separated quasi-compact dense open. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{Nonexistence of quasi-compact dense open subscheme} \label{section-nonexistence-qc-dense-open-subscheme} \noindent Let $X$ be a quasi-compact and quasi-separated algebraic space over a field $k$. We know that the schematic locus $X' \subset X$ is a dense open subspace, see Properties of Spaces, Proposition \ref{spaces-properties-proposition-locally-quasi-separated-open-dense-scheme}. In fact, this result holds when $X$ is reasonable, see Decent Spaces, Proposition \ref{decent-spaces-proposition-reasonable-open-dense-scheme}. A natural question is whether one can find a quasi-compact dense open subscheme of $X$. It turns out this is not possible in general. \medskip\noindent Assume the characteristic of $k$ is not 2. Let $B = k[x, z_1, z_2, z_3, \ldots]/J$ where $J$ is the ideal generated by the products $xz_i$, $i \in \mathbf{N}$ and by all pairwise products $z_iz_j$, $i \not = j$, $i, j \in \mathbf{N}$. Set $U = \Spec(B)$. Denote $0 \in U$ the closed point all of whose coordinates are zero. Set $$j : R = \Delta \amalg \Gamma \longrightarrow U \times_k U$$ where $\Delta$ is the image of the diagonal morphism of $U$ over $k$ and $$\Gamma = \{((x, 0, 0, 0, \ldots), (-x, 0, 0, 0, \ldots)) \mid x \in \mathbf{A}^1_k, x \not = 0\}.$$ It is clear that $s, t : R \to U$ are \'etale, and hence $j$ is an \'etale equivalence relation. The quotient $X = U/R$ is an algebraic space (Spaces, Theorem \ref{spaces-theorem-presentation}). Note that $j$ is not an immersion because $(0, 0) \in \Delta$ is in the closure of $\Gamma$. Hence $X$ is not a scheme. On the other hand, $X$ is quasi-separated as $R$ is quasi-compact. Denote $0_X$ the image of the point $0 \in U$. We claim that $X \setminus \{0_X\}$ is a scheme, namely $$X \setminus \{0_X\} = \Spec\left(k[x^2, x^{-2}]\right) \amalg \Spec\left(k[z_1, z_2, z_3, \ldots]/(z_iz_j)\right) \setminus \{0\}$$ (details omitted). On the other hand, we have seen in Section \ref{section-nonexistence-opens} that the scheme on the right hand side does not contain a quasi-compact dense open. \begin{lemma} \label{lemma-nonexistence-qc-dense-open-subscheme} There exists a quasi-compact and quasi-separated algebraic space which does not contain a quasi-compact dense open subscheme. \end{lemma} \begin{proof} See discussion above. \end{proof} \noindent Using the construction of Spaces, Example \ref{spaces-example-non-representable-descent} in the same manner as we used the construction of Spaces, Example \ref{spaces-example-affine-line-involution} above, one obtains an example of a quasi-compact, quasi-separated, and locally separated algebraic space which does not contain a quasi-compact dense open subscheme. \section{Affines over algebraic spaces} \label{section-embedding-affines} \medskip\noindent Suppose that $f : Y \to X$ is a morphism of schemes with $f$ locally of finite type and $Y$ affine. Then there exists an immersion $Y \to \mathbf{A}^n_X$ of $Y$ into affine $n$-space over $X$. See the slightly more general Morphisms, Lemma \ref{morphisms-lemma-quasi-affine-finite-type-over-S}. \medskip\noindent Now suppose that $f : Y \to X$ is a morphism of algebraic spaces with $f$ locally of finite type and $Y$ an affine scheme. Then it is not true in general that we can find an immersion of $Y$ into affine $n$-space over $X$. \medskip\noindent A first (nasty) counter example is $Y = \Spec(k)$ and $X = [\mathbf{A}^1_k/\mathbf{Z}]$ where $k$ is a field of characteristic zero and $\mathbf{Z}$ acts on $\mathbf{A}^1_k$ by translation $(n, t) \mapsto t + n$. Namely, for any morphism $Y \to \mathbf{A}^n_X$ over $X$ we can pullback to the covering $\mathbf{A}^1_k$ of $X$ and we get an infinite disjoint union of $\mathbf{A}^1_k$'s mapping into $\mathbf{A}^{n + 1}_k$ which is not an immersion. \medskip\noindent A second counter example is $Y = \mathbf{A}^1_k \to X = \mathbf{A}^1_k/R$ with $R = \{(t, t)\} \amalg \{(t, -t), t \not = 0\}$. Namely, in this case the morphism $Y \to \mathbf{A}^n_X$ would be given by some regular functions $f_1, \ldots, f_n$ on $Y$ and hence the fibre product of $Y$ with the covering $\mathbf{A}^{n + 1}_k \to \mathbf{A}^n_X$ would be the scheme $$\{(f_1(t), \ldots, f_n(t), t)\} \amalg \{(f_1(t), \ldots, f_n(t), -t), t \not = 0\}$$ with obvious morphism to $\mathbf{A}^{n + 1}_k$ which is not an immersion. Note that this gives a counter example with $X$ quasi-separated. \begin{lemma} \label{lemma-cannot-embed-into-affine} There exists a finite type morphism of algebraic spaces $Y \to X$ with $Y$ affine and $X$ quasi-separated, such that there does not exist an immersion $Y \to \mathbf{A}^n_X$ over $X$. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{Pushforward of quasi-coherent modules} \label{section-push-quasi-coherent} \noindent In Schemes, Lemma \ref{schemes-lemma-push-forward-quasi-coherent} we proved that $f_*$ transforms quasi-coherent modules into quasi-coherent modules when $f$ is quasi-compact and quasi-separated. Here are some examples to show that these conditions are both necessary. \medskip\noindent Suppose that $Y = \Spec(A)$ is an affine scheme and that $X = \coprod_{n \in \mathbf{N}} Y$. We claim that $f_*\mathcal{O}_X$ is not quasi-coherent where $f : X \to Y$ is the obvious morphism. Namely, for $a \in A$ we have $$f_*\mathcal{O}_X(D(a)) = \prod\nolimits_{n \in \mathbf{N}} A_a$$ Hence, in order for $f_*\mathcal{O}_X$ to be quasi-coherent we would need $$\prod\nolimits_{n \in \mathbf{N}} A_a = \left(\prod\nolimits_{n \in \mathbf{N}} A\right)_a$$ for all $a \in A$. This isn't true in general, for example if $A = \mathbf{Z}$ and $a = 2$, then $(1, 1/2, 1/4, 1/8, \ldots)$ is an element of the left hand side which is not in the right hand side. Note that $f$ is a non-quasi-compact separated morphism. \medskip\noindent Let $k$ be a field. Set $$A = k[t, z, x_1, x_2, x_3, \ldots]/(tx_1z, t^2x_2^2z, t^3x_3^3z, \ldots)$$ Let $Y = \Spec(A)$. Let $V \subset Y$ be the open subscheme $V = D(x_1) \cup D(x_2) \cup \ldots$. Let $X$ be two copies of $Y$ glued along $V$. Let $f : X \to Y$ be the obvious morphism. Then we have an exact sequence $$0 \to f_*\mathcal{O}_X \to \mathcal{O}_Y \oplus \mathcal{O}_Y \xrightarrow{(1, -1)} j_*\mathcal{O}_V$$ where $j : V \to Y$ is the inclusion morphism. Since $$A \longrightarrow \prod A_{x_n}$$ is injective (details omitted) we see that $\Gamma(Y, f_*\mathcal{O}_X) = A$. On the other hand, the kernel of the map $$A_t \longrightarrow \prod A_{tx_n}$$ is nonzero because it contains the element $z$. Hence $\Gamma(D(t), f_*\mathcal{O}_X)$ is strictly bigger than $A_t$ because it contains $(z, 0)$. Thus we see that $f_*\mathcal{O}_X$ is not quasi-coherent. Note that $f$ is quasi-compact but non-quasi-separated. \begin{lemma} \label{lemma-pushforward-quasi-coherent} Schemes, Lemma \ref{schemes-lemma-push-forward-quasi-coherent} is sharp in the sense that one can neither drop the assumption of quasi-compactness nor the assumption of quasi-separatedness. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{A nonfinite module with finite free rank 1 stalks} \label{section-nonfree} \noindent Let $R = \mathbf{Q}[x]$. Set $M = \sum_{n \in \mathbf{N}} \frac{1}{x - n}R$ as a submodule of the fraction field of $R$. Then $M$ is not finitely generated, but for every prime $\mathfrak p$ of $R$ we have $M_{\mathfrak p} \cong R_{\mathfrak p}$ as an $R_{\mathfrak p}$-module. \section{A noninvertible ideal invertible in stalks} \label{section-locally-invertible-not-invertible} \noindent Let $A$ be a domain and let $I \subset A$ be a nonzero ideal. Recall that when we say $I$ is invertible, we mean that $I$ is invertible as an $A$-module. We are going to make an example of this situation where $I$ is not invertible, yet $I_\mathfrak q = (f) \subset A_\mathfrak q$ is a (nonzero) principal ideal for every prime ideal $\mathfrak q \subset A$. In the literature the property that $I_\mathfrak q$ is principal for all primes $\mathfrak q$ is sometimes expressed by saying $I$ is a locally principal ideal''. We can't use this terminology as our local'' always means local in the Zariski topology'' (or whatever topology we are currently working with). \medskip\noindent Let $R = \mathbf{Q}[x]$ and let $M = \sum \frac{1}{x - n}R$ be the module constructed in Section \ref{section-nonfree}. Consider the ring\footnote{The ring $A$ is an example of a non-Noetherian domain whose local rings are Noetherian.} $$A = \text{Sym}^*_R(M)$$ and the ideal $I = M A = \bigoplus_{d \geq 1} \text{Sym}^d_R(M)$. Since $M$ is not finitely generated as an $R$-module we see that $I$ cannot be generated by finitely many elements as an ideal in $A$. Since an invertible module is finitely generated, this means that $I$ is not invertible. On the other hand, let $\mathfrak p \subset R$ be a prime ideal. By construction $M_\mathfrak p \cong R_\mathfrak p$. Hence $$A_\mathfrak p = \text{Sym}^*_{R_\mathfrak p}(M_\mathfrak p) \cong \text{Sym}^*_{R_\mathfrak p}(R_\mathfrak p) = R_\mathfrak p[T]$$ as a graded $R_\mathfrak p$-algebra. It follows that $I_\mathfrak p \subset A_\mathfrak p$ is generated by the nonzerodivisor $T$. Thus certainly for any prime ideal $\mathfrak q \subset A$ we see that $I_\mathfrak q$ is generated by a single element. \begin{lemma} \label{lemma-locally-principal-not-invertible} There exists a domain $A$ and a nonzero ideal $I \subset A$ such that $I_\mathfrak q \subset A_\mathfrak q$ is a principal ideal for all primes $\mathfrak q \subset A$ but $I$ is not an invertible $A$-module. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{A finite flat module which is not projective} \label{section-finite-flat-not-projective} \noindent This is a copy of Algebra, Remark \ref{algebra-remark-warning}. It is not true that a finite $R$-module which is $R$-flat is automatically projective. A counter example is where $R = \mathcal{C}^\infty(\mathbf{R})$ is the ring of infinitely differentiable functions on $\mathbf{R}$, and $M = R_{\mathfrak m} = R/I$ where $\mathfrak m = \{f \in R \mid f(0) = 0\}$ and $I = \{f \in R \mid \exists \epsilon, \epsilon > 0 : f(x) = 0\ \forall x, |x| < \epsilon\}$. \medskip\noindent The morphism $\Spec(R/I) \to \Spec(R)$ is also an example of a flat closed immersion which is not open. \begin{lemma} \label{lemma-finite-flat-non-projective} Strange flat modules. \begin{enumerate} \item There exists a ring $R$ and a finite flat $R$-module $M$ which is not projective. \item There exists a closed immersion which is flat but not open. \end{enumerate} \end{lemma} \begin{proof} See discussion above. \end{proof} \section{A projective module which is not locally free} \label{section-projective-not-locally-free} \noindent We give two examples. One where the rank is between $0$ and $1$ and one where the rank is $\aleph_0$. \begin{lemma} \label{lemma-ideal-generated-by-idempotents-projective} Let $R$ be a ring. Let $I \subset R$ be an ideal generated by a countable collection of idempotents. Then $I$ is projective as an $R$-module. \end{lemma} \begin{proof} Say $I = (e_1, e_2, e_3, \ldots)$ with $e_n$ an idempotent of $R$. After inductively replacing $e_{n + 1}$ by $e_n + (1 - e_n)e_{n + 1}$ we may assume that $(e_1) \subset (e_2) \subset (e_3) \subset \ldots$ and hence $I = \bigcup_{n \geq 1} (e_n) = \colim_n e_nR$. In this case $$\Hom_R(I, M) = \Hom_R(\colim_n e_nR, M) = \lim_n \Hom_R(e_nR, M) = \lim_n e_nM$$ Note that the transition maps $e_{n + 1}M \to e_nM$ are given by multiplication by $e_n$ and are surjective. Hence by Algebra, Lemma \ref{algebra-lemma-ML-exact-sequence} the functor $\Hom_R(I, M)$ is exact, i.e., $I$ is a projective $R$-module. \end{proof} \begin{lemma} \label{lemma-map-cannot-be-injective} \begin{slogan} A map of finite free modules cannot be injective if the source has rank bigger than the target. \end{slogan} Let $R$ be a nonzero ring. Let $n \geq 1$. Let $M$ be an $R$-module generated by $< n$ elements. Then any $R$-module map $f : R^{\oplus n} \to M$ has a nonzero kernel. \end{lemma} \begin{proof} Choose a surjection $R^{\oplus n - 1} \to M$. We may lift the map $f$ to a map $f' : R^{\oplus n} \to R^{\oplus n - 1}$. It suffices to prove $f'$ has a nonzero kernel. The map $f' : R^{\oplus n} \to R^{\oplus n - 1}$ is given by a matrix $A = (a_{ij})$. If one of the $a_{ij}$ is not nilpotent, say $a = a_{ij}$ is not, then we can replace $A$ by the localization $A_a$ and we may assume $a_{ij}$ is a unit. Since if we find a nonzero kernel after localization then there was a nonzero kernel to start with as localization is exact, see Algebra, Proposition \ref{algebra-proposition-localization-exact}. In this case we can do a base change on both $R^{\oplus n}$ and $R^{\oplus n - 1}$ and reduce to the case where $$A = \left( \begin{matrix} 1 & 0 & 0 & \ldots \\ 0 & a_{22} & a_{23} & \ldots \\ 0 & a_{32} & \ldots \\ \ldots & \ldots \end{matrix} \right)$$ Hence in this case we win by induction on $n$. If not then each $a_{ij}$ is nilpotent. Set $I = (a_{ij}) \subset R$. Note that $I^{m + 1} = 0$ for some $m \geq 0$. Let $m$ be the largest integer such that $I^m \not = 0$. Then we see that $(I^m)^{\oplus n}$ is contained in the kernel of the map and we win. \end{proof} \noindent Suppose that $P \subset Q$ is an inclusion of $R$-modules with $Q$ a finite $R$-module and $P$ locally free, see Algebra, Definition \ref{algebra-definition-locally-free}. Suppose that $Q$ can be generated by $N$ elements as an $R$-module. Then it follows from Lemma \ref{lemma-map-cannot-be-injective} that $P$ is finite locally free (with the free parts having rank at most $N$). And in this case $P$ is a finite $R$-module, see Algebra, Lemma \ref{algebra-lemma-finite-projective}. \medskip\noindent Combining this with the above we see that a non-finitely-generated ideal which is generated by a countable collection of idempotents is projective but not locally free. An explicit example is $R = \prod_{n \in \mathbf{N}} \mathbf{F}_2$ and $I$ the ideal generated by the idempotents $$e_n = (1, 1, \ldots, 1, 0, \ldots )$$ where the sequence of $1$'s has length $n$. \begin{lemma} \label{lemma-ideal-projective-not-locally-free} There exists a ring $R$ and an ideal $I$ such that $I$ is projective as an $R$-module but not locally free as an $R$-module. \end{lemma} \begin{proof} See above. \end{proof} \begin{lemma} \label{lemma-chow-group-product} Let $K$ be a field. Let $C_i$, $i = 1, \ldots, n$ be smooth, projective, geometrically irreducible curves over $K$. Let $P_i \in C_i(K)$ be a rational point and let $Q_i \in C_i$ be a point such that $[\kappa(Q_i) : K] = 2$. Then $[P_1 \times \ldots \times P_n]$ is nonzero in $A_0(U_1 \times_K \ldots \times_K U_n)$ where $U_i = C_i \setminus \{Q_i\}$. \end{lemma} \begin{proof} There is a degree map $\deg : A_0(C_1 \times_K \ldots \times_K C_n) \to \mathbf{Z}$ Because each $Q_i$ has degree $2$ over $K$ we see that any zero cycle supported on the boundary'' $$C_1 \times_K \ldots \times_K C_n \setminus U_1 \times_K \ldots \times_K U_n$$ has degree divisible by $2$. \end{proof} \noindent We can construct another example of a projective but not locally free module using the lemma above as follows. Let $C_n$, $n = 1, 2, 3, \ldots$ be smooth, projective, geometrically irreducible curves over $\mathbf{Q}$ each with a pair of points $P_n, Q_n \in C_n$ such that $\kappa(P_n) = \mathbf{Q}$ and $\kappa(Q_n)$ is a quadratic extension of $\mathbf{Q}$. Set $U_n = C_n \setminus \{Q_n\}$; this is an affine curve. Let $\mathcal{L}_n$ be the inverse of the ideal sheaf of $P_n$ on $U_n$. Note that $c_1(\mathcal{L}_n) = [P_n]$ in the group of zero cycles $A_0(U_n)$. Set $A_n = \Gamma(U_n, \mathcal{O}_{U_n})$. Let $L_n = \Gamma(U_n, \mathcal{L}_n)$ which is a locally free module of rank $1$ over $A_n$. Set $$B_n = A_1 \otimes_{\mathbf{Q}} A_2 \otimes_{\mathbf{Q}} \ldots \otimes_{\mathbf{Q}} A_n$$ so that $\Spec(B_n) = U_1 \times \ldots \times U_n$ all products over $\Spec(\mathbf{Q})$. For $i \leq n$ we set $$L_{n, i} = A_1 \otimes_{\mathbf{Q}} \ldots \otimes_{\mathbf{Q}} M_i \otimes_{\mathbf{Q}} \ldots \otimes_{\mathbf{Q}} A_n$$ which is a locally free $B_n$-module of rank $1$. Note that this is also the global sections of $\text{pr}_i^*\mathcal{L}_n$. Set $$B_\infty = \colim_n B_n \quad\text{and}\quad L_{\infty, i} = \colim_n L_{n, i}$$ Finally, set $$M = \bigoplus\nolimits_{i \geq 1} L_{\infty, i}.$$ This is a direct sum of finite locally free modules, hence projective. We claim that $M$ is not locally free. Namely, suppose that $f \in B_\infty$ is a nonzero function such that $M_f$ is free over $(B_\infty)_f$. Let $e_1, e_2, \ldots$ be a basis. Choose $n \geq 1$ such that $f \in B_n$. Choose $m \geq n + 1$ such that $e_1, \ldots, e_{n + 1}$ are in $$\bigoplus\nolimits_{1 \leq i \leq m} L_{m, i}.$$ Because the elements $e_1, \ldots, e_{n + 1}$ are part of a basis after a faithfully flat base change we conclude that the chern classes $$c_i(\text{pr}_1^*\mathcal{L}_1 \oplus \ldots \oplus \text{pr}_m^*\mathcal{L}_m), \quad i = m, m - 1, \ldots, m - n$$ are zero in the chow group of $$D(f) \subset U_1 \times \ldots \times U_m$$ Since $f$ is the pullback of a function on $U_1 \times \ldots \times U_n$ this implies in particular that $$c_{m - n}(\mathcal{O}_W^{\oplus n} \oplus \text{pr}_1^*\mathcal{L}_{n + 1} \oplus \ldots \oplus \text{pr}_{m - n}^*\mathcal{L}_m) = 0.$$ on the variety $$W = (C_{n + 1} \times \ldots \times C_m)_K$$ over the field $K = \mathbf{Q}(C_1 \times \ldots \times C_n)$. In other words the cycle $$[(P_{n + 1} \times \ldots \times P_m)_K]$$ is zero in the chow group of zero cycles on $W$. This contradicts Lemma \ref{lemma-chow-group-product} above because the points $Q_i$, $n + 1 \leq i \leq m$ induce corresponding points $Q_i'$ on $(C_n)_K$ and as $K/\mathbf{Q}$ is geometrically irreducible we have $[\kappa(Q_i') : K] = 2$. \begin{lemma} \label{lemma-projective-not-locally-free} There exists a countable ring $R$ and a projective module $M$ which is a direct sum of countably many locally free rank $1$ modules such that $M$ is not locally free. \end{lemma} \begin{proof} See above. \end{proof} \section{Zero dimensional local ring with nonzero flat ideal} \label{section-zero-dimensional-flat-ideal} \noindent In \cite{Lazard} and \cite{Autour} there is an example of a zero dimensional local ring with a nonzero flat ideal. Here is the construction. Let $k$ be a field. Let $X_i, Y_i$, $i \geq 1$ be variables. Take $R = k[X_i, Y_i]/(X_i - Y_i X_{i + 1}, Y_i^2)$. Denote $x_i$, resp.\ $y_i$ the image of $X_i$, resp.\ $Y_i$ in this ring. Note that $$x_i = y_i x_{i + 1} = y_i y_{i +1} x_{i + 2} = y_i y_{i + 1} y_{i + 2} x_{i + 3} = \ldots$$ in this ring. The ring $R$ has only one prime ideal, namely $\mathfrak m = (x_i, y_i)$. We claim that the ideal $I = (x_i)$ is flat as an $R$-module. \medskip\noindent Note that the annihilator of $x_i$ in $R$ is the ideal $(x_1, x_2, x_3, \ldots, y_i, y_{i + 1}, y_{i + 2}, \ldots)$. Consider the $R$-module $M$ generated by elements $e_i$, $i \geq 1$ and relations $e_i = y_i e_{i + 1}$. Then $M$ is flat as it is the colimit $\colim_i R$ of copies of $R$ with transition maps $$R \xrightarrow{y_1} R \xrightarrow{y_2} R \xrightarrow{y_3} \ldots$$ Note that the annihilator of $e_i$ in $M$ is the ideal $(x_1, x_2, x_3, \ldots, y_i, y_{i + 1}, y_{i + 2}, \ldots)$. Since every element of $M$, resp.\ $I$ can be written as $f e_i$, resp.\ $h x_i$ for some $f, h \in R$ we see that the map $M \to I$, $e_i \to x_i$ is an isomorphism and $I$ is flat. \begin{lemma} \label{lemma-zero-dimensional-flat-ideal} \begin{slogan} Zero dimensional ring with flat ideal. \end{slogan} There exists a local ring $R$ with a unique prime ideal and a nonzero ideal $I \subset R$ which is a flat $R$-module \end{lemma} \begin{proof} See discussion above. \end{proof} \section{An epimorphism of zero-dimensional rings which is not surjective} \label{section-epimorphism-not-surjective} \noindent In \cite{Lazard-deux} and \cite{Autour} one can find the following example. Let $k$ be a field. Consider the ring homomorphism $$k[x_1, x_2, \ldots, z_1, z_2, \ldots]/ (x_i^{4^i}, z_i^{4^i}) \longrightarrow k[x_1, x_2, \ldots, y_1, y_2, \ldots]/ (x_i^{4^i}, y_i - x_{i + 1}y_{i + 1}^2)$$ which maps $x_i$ to $x_i$ and $z_i$ to $x_iy_i$. Note that $y_i^{4^{i + 1}}$ is zero in the right hand side but that $y_1$ is not zero (details omitted). This map is not surjective: we can think of the above as a map of $\mathbf{Z}$-graded algebras by setting $\deg(x_i) = -1$, $\deg(z_i) = 0$, and $\deg(y_i) = 1$ and then it is clear that $y_1$ is not in the image. Finally, the map is an epimorphism because $$y_{i - 1} \otimes 1 = x_i y_i^2 \otimes 1 = y_i \otimes x_i y_i = x_i y_i \otimes y_i = 1 \otimes x_i y_i^2.$$ hence the tensor product of the target over the source is isomorphic to the target. \begin{lemma} \label{lemma-epi-not-surjective} There exists an epimorphism of local rings of dimension $0$ which is not a surjection. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{Finite type, not finitely presented, flat at prime} \label{section-ft-not-fp-flat-at-prime} \noindent Let $k$ be a field. Consider the local ring $A_0 = k[x, y]_{(x, y)}$. Denote $\mathfrak p_{0, n} = (y + x^n + x^{2n + 1})$. This is a prime ideal. Set $$A = A_0[z_1, z_2, z_3, \ldots]/(z_n z_m, z_n(y + x^n + x^{2n + 1}))$$ Note that $A \to A_0$ is a surjection whose kernel is an ideal of square zero. Hence $A$ is also a local ring and the prime ideals of $A$ are in one-to-one correspondence with the prime ideals of $A_0$. Denote $\mathfrak p_n$ the prime ideal of $A$ corresponding to $\mathfrak p_{0, n}$. Observe that $\mathfrak p_n$ is the annihilator of $z_n$ in $A$. Let $$C = A[z]/(xz^2 + z + y)[\frac{1}{2zx + 1}]$$ Note that $A \to C$ is an \'etale ring map, see Algebra, Example \ref{algebra-example-make-standard-smooth}. Let $\mathfrak q \subset C$ be the maximal ideal generated by $x$, $y$, $z$ and all $z_n$. As $A \to C$ is flat we see that the annihilator of $z_n$ in $C$ is $\mathfrak p_nC$. We compute \begin{align*} C/\mathfrak p_n C & = A_0[z]/(xz^2 + z + y, y + x^n + x^{2n + 1})[1/(2zx + 1)] \\ & = k[x]_{(x)}[z]/(xz^2 + z - x^n - x^{2n + 1})[1/(2zx + 1)] \\ & = k[x]_{(x)}[z]/(z - x^n) \times k[x]_{(x)}[z]/(xz + x^{n + 1} + 1)[1/(2zx + 1)] \\ & = k[x]_{(x)} \times k(x) \end{align*} because $(z - x^n)(xz + x^{n + 1} + 1) = xz^2 + z - x^n - x^{2n + 1}$. Hence we see that $\mathfrak p_nC = \mathfrak r_n \cap \mathfrak q_n$ with $\mathfrak r_n = \mathfrak p_nC + (z - x^n)C$ and $\mathfrak q_n = \mathfrak p_nC + (xz + x^{n + 1} + 1)C$. Since $\mathfrak q_n + \mathfrak r_n = C$ we also get $\mathfrak p_nC = \mathfrak r_n \mathfrak q_n$. It follows that $\mathfrak q_n$ is the annihilator of $\xi_n = (z - x^n)z_n$. Observe that on the one hand $\mathfrak r_n \subset \mathfrak q$, and on the other hand $\mathfrak q_n + \mathfrak q = C$. This follows for example because $\mathfrak q_n$ is a maximal ideal of $C$ distinct from $\mathfrak q$. Similarly we have $\mathfrak q_n + \mathfrak q_m = C$ for $n \not = m$. At this point we let $$B = \Im(C \longrightarrow C_{\mathfrak q})$$ We observe that the elements $\xi_n$ map to zero in $B$ as $xz + x^{n + 1} + 1$ is not in $\mathfrak q$. Denote $\mathfrak q' \subset B$ the image of $\mathfrak q$. By construction $B$ is a finite type $A$-algebra, with $B_{\mathfrak q'} \cong C_{\mathfrak q}$. In particular we see that $B_{\mathfrak q'}$ is flat over $A$. \medskip\noindent We claim there does not exist an element $g' \in B$, $g' \not \in \mathfrak q'$ such that $B_{g'}$ is of finite presentation over $A$. We sketch a proof of this claim. Choose an element $g \in C$ which maps to $g' \in B$. Consider the map $C_g \to B_{g'}$. By Algebra, Lemma \ref{algebra-lemma-finite-presentation-independent} we see that $B_g$ is finitely presented over $A$ if and only if the kernel of $C_g \to B_{g'}$ is finitely generated. But the element $g \in C$ is not contained in $\mathfrak q$, hence maps to a nonzero element of $A_0[z]/(xz^2 + z + y)$. Hence $g$ can only be contained in finitely many of the prime ideals $\mathfrak q_n$, because the primes $(y + x^n + x^{2n + 1}, xz + x^{n + 1} + 1)$ are an infinite collection of codimension 1 points of the 2-dimensional irreducible Noetherian space $\Spec(k[x, y, z]/(xz^2 + z + y))$. The map $$\bigoplus\nolimits_{g \not \in \mathfrak q_n} C/\mathfrak q_n \longrightarrow C_g, \quad (c_n) \longrightarrow \sum c_n \xi_n$$ is injective and its image is the kernel of $C_g \to B_{g'}$. We omit the proof of this statement. (Hint: Write $A = A_0 \oplus I$ as an $A_0$-module where $I$ is the kernel of $A \to A_0$. Similarly, write $C = C_0 \oplus IC$. Write $IC = \bigoplus Cz_n \cong \bigoplus (C/\mathfrak r_n \oplus C/\mathfrak q_n)$ and study the effect of multiplication by $g$ on the summands.) This concludes the sketch of the proof of the claim. This also proves that $B_{g'}$ is not flat over $A$ for any $g'$ as above. Namely, if it were flat, then the annihilator of the image of $z_n$ in $B_{g'}$ would be $\mathfrak p_nB_{g'}$, and would not contain $z - x^n$. \medskip\noindent As a consequence we can answer (negatively) a question posed in \cite[Part I, Remarques (3.4.7) (\romannumeral 5)]{GruRay}. Here is a precise statement. \begin{lemma} \label{lemma-example-raynaud-gruson} There exists a local ring $A$, a finite type ring map $A \to B$ and a prime $\mathfrak q$ lying over $\mathfrak m_A$ such that $B_{\mathfrak q}$ is flat over $A$, and for any element $g \in B$, $g \not \in \mathfrak q$ the ring $B_g$ is neither finitely presented over $A$ nor flat over $A$. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{Finite type, flat and not of finite presentation} \label{section-finite-type-flat-not-finite-presentation} \noindent In this section we give some examples of ring maps and morphisms which are of finite type and flat but not of finite presentation. \medskip\noindent Let $R$ be a ring which has an ideal $I$ such that $R/I$ is a finite flat module but not projective, see Section \ref{section-finite-flat-not-projective} for an explicit example. Note that this means that $I$ is not finitely generated, see Algebra, Lemma \ref{algebra-lemma-finitely-generated-pure-ideal}. Note that $I = I^2$, see Algebra, Lemma \ref{algebra-lemma-pure}. The base ring in our examples will be $R$ and correspondingly the base scheme $S = \Spec(R)$. \medskip\noindent Consider the ring map $R \to R \oplus R/I\epsilon$ where $\epsilon^2 = 0$ by convention. This is a finite, flat ring map which is not of finite presentation. All the fibre rings are complete intersections and geometrically irreducible. \medskip\noindent Let $A = R[x, y]/(xy, ay; a \in I)$. Note that as an $R$-module we have $A = \bigoplus_{i \geq 0} Ry^i \oplus \bigoplus_{j > 0} R/Ix^j$. Hence $R \to A$ is a flat finite type ring map which is not of finite presentation. Each fibre ring is isomorphic to either $\kappa(\mathfrak p)[x, y]/(xy)$ or $\kappa(\mathfrak p)[x]$. \medskip\noindent We can turn the previous example into a projective morphism by taking $B = R[X_0, X_1, X_2]/(X_1X_2, aX_2; a \in I)$. In this case $X = \text{Proj}(B) \to S$ is a proper flat morphism which is not of finite presentation such that for each $s \in S$ the fibre $X_s$ is isomorphic either to $\mathbf{P}^1_s$ or to the closed subscheme of $\mathbf{P}^2_s$ defined by the vanishing of $X_1X_2$ (this is a projective nodal curve of arithmetic genus $0$). \medskip\noindent Let $M = R \oplus R \oplus R/I$. Set $B = \text{Sym}_R(M)$ the symmetric algebra on $M$. Set $X = \text{Proj}(B)$. Then $X \to S$ is a proper flat morphism, not of finite presentation such that for $s \in S$ the geometric fibre is isomorphic to either $\mathbf{P}^1_s$ or $\mathbf{P}^2_s$. In particular these fibres are smooth and geometrically irreducible. \begin{lemma} \label{lemma-finite-type-flat-not-finitely-presented} There exist examples of \begin{enumerate} \item a flat finite type ring map with geometrically irreducible complete intersection fibre rings which is not of finite presentation, \item a flat finite type ring map with geometrically connected, geometrically reduced, dimension 1, complete intersection fibre rings which is not of finite presentation, \item a proper flat morphism of schemes $X \to S$ each of whose fibres is isomorphic to either $\mathbf{P}^1_s$ or to the vanishing locus of $X_1X_2$ in $\mathbf{P}^2_s$ which is not of finite presentation, and \item a proper flat morphism of schemes $X \to S$ each of whose fibres is isomorphic to either $\mathbf{P}^1_s$ or $\mathbf{P}^2_s$ which is not of finite presentation. \end{enumerate} \end{lemma} \begin{proof} See discussion above. \end{proof} \section{Topology of a finite type ring map} \label{section-topology-finite-type} \noindent Let $A \to B$ be a local map of local domains. If $A$ is Noetherian, $A \to B$ is essentially of finite type, and $A/\mathfrak m_A \subset B/\mathfrak m_B$ is finite then there exists a prime $\mathfrak q \subset B$, $\mathfrak q \not = \mathfrak m_B$ such that $A \to B/\mathfrak q$ is the localization of a quasi-finite ring map. See More on Morphisms, Lemma \ref{more-morphisms-lemma-quasi-finite-quasi-section-meeting-nearby-open}. \medskip\noindent In this section we give an example that shows this result is false $A$ is no longer Noetherian. Namely, let $k$ be a field and set $$A = \{a_0 + a_1 x + a_2 x^2 + \ldots \mid a_0 \in k, a_i \in k((y)) \text{ for }i\geq 1\}$$ and $$C = \{a_0 + a_1 x + a_2 x^2 + \ldots \mid a_0 \in k[y], a_i \in k((y)) \text{ for }i\geq 1\}.$$ The inclusion $A \to C$ is of finite type as $C$ is generated by $y$ over $A$. We claim that $A$ is a local ring with maximal ideal $\mathfrak m = \{a_1 x + a_2 x^2 + \ldots \in A\}$ and no prime ideals besides $(0)$ and $\mathfrak m$. Namely, an element $f = a_0 + a_1 x + a_2 x^2 + \ldots$ of $A$ is invertible as soon as $a_0 \not = 0$. If $\mathfrak q \subset A$ is a nonzero prime ideal, and $f = a_i x^i + \ldots \in \mathfrak q$, then using properties of power series one sees that for any $g \in k((y))$ the element $g^{i + 1} x^{i + 1} \in \mathfrak q$, i.e., $gx \in \mathfrak q$. This proves that $\mathfrak q = \mathfrak m$. \medskip\noindent As to the spectrum of the ring $C$, arguing in the same way as above we see that any nonzero prime ideal contains the prime $\mathfrak p = \{a_1 x + a_2 x^2 + \ldots \in C\}$ which lies over $\mathfrak m$. Thus the only prime of $C$ which lies over $(0)$ is $(0)$. Set $\mathfrak m_C = yC + \mathfrak p$ and $B = C_{\mathfrak m_C}$. Then $A \to B$ is the desired example. \begin{lemma} \label{lemma-topology-finite-type} There exists a local homomorphism $A \to B$ of local domains which is essentially of finite type and such that $A/\mathfrak m_A \to B/\mathfrak m_B$ is finite such that for every prime $\mathfrak q \not = \mathfrak m_B$ of $B$ the ring map $A \to B/\mathfrak q$ is not the localization of a quasi-finite ring map. \end{lemma} \begin{proof} See the discussion above. \end{proof} \section{Pure not universally pure} \label{section-pure-not-universally} \noindent Let $k$ be a field. Let $$R = k[[x, xy, xy^2, \ldots]] \subset k[[x, y]].$$ In other words, a power series $f \in k[[x, y]]$ is in $R$ if and only if $f(0, y)$ is a constant. In particular $R[1/x] = k[[x, y]][1/x]$ and $R/xR$ is a local ring with a maximal ideal whose square is zero. Denote $R[y] \subset k[[x, y]]$ the set of power series $f \in k[[x, y]]$ such that $f(0, y)$ is a polynomial in $y$. Then $R \to R[y]$ is a finite type but not finitely presented ring map which induces an isomorphism after inverting $x$. Also there is a surjection $R[y]/xR[y] \to k[y]$ whose kernel has square zero. Consider the finitely presented ring map $R \to S = R[t]/(xt - xy)$. Again $R[1/x] \to S[1/x]$ is an isomorphism and in this case $S/xS \cong (R/xR)[t]/(xy)$ maps onto $k[t]$ with nilpotent kernel. There is a surjection $S \to R[y]$, $t \longmapsto y$ which induces an isomorphism on inverting $x$ and a surjection with nilpotent kernel modulo $x$. Hence the kernel of $S \to R[y]$ is locally nilpotent. In particular $S \to R[y]$ is a universal homeomorphism. \medskip\noindent First we claim that $S$ is an $S$-module which is relatively pure over $R$. Since on inverting $x$ we obtain an isomorphism we only need to check this at the maximal ideal $\mathfrak m \subset R$. Since $R$ is complete with respect to its maximal ideal it is henselian hence we need only check that every prime $\mathfrak p \subset R$, $\mathfrak p \not = \mathfrak m$, the unique prime $\mathfrak q$ of $S$ lying over $\mathfrak p$ satisfies $\mathfrak mS + \mathfrak q \not = S$. Since $\mathfrak p \not = \mathfrak m$ it corresponds to a unique prime ideal of $k[[x, y]][1/x]$. Hence either $\mathfrak p = (0)$ or $\mathfrak p = (f)$ for some irreducible element $f \in k[[x, y]]$ which is not associated to $x$ (here we use that $k[[x, y]]$ is a UFD -- insert future reference here). In the first case $\mathfrak q = (0)$ and the result is clear. In the second case we may multiply $f$ by a unit so that $f \in R[y]$ (Weierstrass preparation; details omitted). Then it is easy to see that $R[y]/fR[y] \cong k[[x, y]]/(f)$ hence $f$ defines a prime ideal of $R[y]$ and $\mathfrak mR[y] + fR[y] \not = R[y]$. Since $S \to R[y]$ is a universal homeomorphism we deduce the desired result for $S$ also. \medskip\noindent Second we claim that $S$ is not universally relatively pure over $R$. Namely, to see this it suffices to find a valuation ring $\mathcal{O}$ and a local ring map $R \to \mathcal{O}$ such that $\Spec(R[y] \otimes_R \mathcal{O}) \to \Spec(\mathcal{O})$ does not hit the closed point of $\Spec(\mathcal{O})$. Equivalently, we have to find $\varphi : R \to \mathcal{O}$ such that $\varphi(x) \not = 0$ and $v(\varphi(x)) > v(\varphi(xy))$ where $v$ is the valuation of $\mathcal{O}$. (Because this means that the valuation of $y$ is negative.) To do this consider the ring map $$R \longrightarrow \{a_0 + a_1 x + a_2 x^2 + \ldots \mid a_0 \in k[y^{-1}], a_i \in k((y))\}$$ defined in the obvious way. We can find a valuation ring $\mathcal{O}$ dominating the localization of the right hand side at the maximal ideal $(y^{-1}, x)$ and we win. \begin{lemma} \label{lemma-pure-not-universally-pure} There exists a morphism of affine schemes of finite presentation $X \to S$ and an $\mathcal{O}_X$-module $\mathcal{F}$ of finite presentation such that $\mathcal{F}$ is pure relative to $S$, but not universally pure relative to $S$. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{A formally smooth non-flat ring map} \label{section-formally-smooth-nonflat} \noindent Let $k$ be a field. Consider the $k$-algebra $k[\mathbf{Q}]$. This is the $k$-algebra with basis $x_\alpha, \alpha \in \mathbf{Q}$ and multiplication determined by $x_\alpha x_\beta = x_{\alpha + \beta}$. (In particular $x_0 = 1$.) Consider the $k$-algebra homomorphism $$k[\mathbf{Q}] \longrightarrow k, \quad x_\alpha \longmapsto 1.$$ It is surjective with kernel $J$ generated by the elements $x_\alpha - 1$. Let us compute $J/J^2$. Note that multiplication by $x_\alpha$ on $J/J^2$ is the identity map. Denote $z_\alpha$ the class of $x_\alpha - 1$ modulo $J^2$. These classes generate $J/J^2$. Since $$(x_\alpha - 1)(x_\beta - 1) = x_{\alpha + \beta} - x_\alpha - x_\beta + 1 = (x_{\alpha + \beta} - 1) - (x_\alpha - 1) - (x_\beta - 1)$$ we see that $z_{\alpha + \beta} = z_\alpha + z_\beta$ in $J/J^2$. A general element of $J/J^2$ is of the form $\sum \lambda_\alpha z_\alpha$ with $\lambda_\alpha \in k$ (only finitely many nonzero). Note that if the characteristic of $k$ is $p > 0$ then $$0 = pz_{\alpha/p} = z_{\alpha/p} + \ldots + z_{\alpha/p} = z_\alpha$$ and we see that $J/J^2 = 0$. If the characteristic of $k$ is zero, then $$J/J^2 = \mathbf{Q} \otimes_{\mathbf{Z}} k \cong k$$ (details omitted) is not zero. \medskip\noindent We claim that $k[\mathbf{Q}] \to k$ is a formally smooth ring map if the characteristic of $k$ is positive. Namely, suppose given a solid commutative diagram $$\xymatrix{ k \ar[r] \ar@{..>}[rd] & A \\ k[\mathbf{Q}] \ar[u] \ar[r]^\varphi & A' \ar[u] }$$ with $A' \to A$ a surjection whose kernel $I$ has square zero. To show that $k[\mathbf{Q}] \to k$ is formally smooth we have to prove that $\varphi$ factors through $k$. Since $\varphi(x_\alpha - 1)$ maps to zero in $A$ we see that $\varphi$ induces a map $\overline{\varphi} : J/J^2 \to I$ whose vanishing is the obstruction to the desired factorization. Since $J/J^2 = 0$ if the characteristic is $p > 0$ we get the result we want, i.e., $k[\mathbf{Q}] \to k$ is formally smooth in this case. Finally, this ring map is not flat, for example as the nonzerodivisor $x_2 - 1$ is mapped to zero. \begin{lemma} \label{lemma-formally-smooth-nonflat} There exists a formally smooth ring map which is not flat. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{A formally \'etale non-flat ring map} \label{section-formally-etale-nonflat} \noindent In this section we give a counterexample to the final sentence in \cite[0, Example 19.10.3(i)]{EGA} (this was not one of the items caught in their later errata lists). Consider $A \to A/J$ for a local ring $A$ and a nonzero proper ideal $J$ such that $J^2 = J$ (so $J$ isn't finitely generated); the valuation ring of an algebraically closed non-archimedean field with $J$ its maximal ideal is a source of such $(A, J)$. These non-flat quotient maps are formally \'etale. Namely, suppose given a commutative diagram $$\xymatrix{ A/J \ar[r] & R/I \\ A \ar[u] \ar[r]^\varphi & R \ar[u] }$$ where $I$ is an ideal of the ring $R$ with $I^2 = 0$. Then $A \to R$ factors uniquely through $A/J$ because $$\varphi(J) = \varphi(J^2) \subset (\varphi(J)A)^2 \subset I^2 = 0.$$ Hence this also provides a counterexample to the formally \'etale case of the structure theorem'' for locally finite type and formally \'etale morphisms in \cite[IV, Theorem 18.4.6(i)]{EGA} (but not a counterexample to part (ii), which is what people actually use in practice). The error in the proof of the latter is that the very last step of the proof is to invoke the incorrect \cite[0, Example 19.3.10(i)]{EGA}, which is how the counterexample just mentioned creeps in. \begin{lemma} \label{lemma-formally-etale-not-presented} There exist formally \'etale nonflat ring maps. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{A formally \'etale ring map with nontrivial cotangent complex} \label{section-formally-etale-nontrivial-cotangent-complex} \noindent Let $k$ be a field. Consider the ring $$R = k[\{x_n\}_{n \geq 1}, \{y_n\}_{n \geq 1}]/( x_1y_1, x_{nm}^m - x_n, y_{nm}^m - y_n)$$ Let $A$ be the localization at the maximal ideal generated by all $x_n, y_n$ and denote $J \subset A$ the maximal ideal. Set $B = A/J$. By construction $J^2 = J$ and hence $A \to B$ is formally \'etale (see Section \ref{section-formally-etale-nonflat}). We claim that the element $x_1 \otimes y_1$ is a nonzero element in the kernel of $$J \otimes_A J \longrightarrow J.$$ Namely, $(A, J)$ is the colimit of the localizations $(A_n, J_n)$ of the rings $$R_n = k[x_n, y_n]/(x_n^n y_n^n)$$ at their corresponding maximal ideals. Then $x_1 \otimes y_1$ corresponds to the element $x_n^n \otimes y_n^n \in J_n \otimes_{A_n} J_n$ and is nonzero (by an explicit computation which we omit). Since $\otimes$ commutes with colimits we conclude. By \cite[III Section 3.3]{cotangent} we see that $J$ is not weakly regular. Hence by \cite[III Proposition 3.3.3]{cotangent} we see that the cotangent complex $L_{B/A}$ is not zero. In fact, we can be more precise. We have $H_0(L_{B/A}) = \Omega_{B/A}$ and $H_1(L_{B/A}) = 0$ because $J/J^2 = 0$. But from the five-term exact sequence of Quillen's fundamental spectral sequence (see Cotangent, Remark \ref{cotangent-remark-elucidate-ss} or \cite[Corollary 8.2.6]{Reinhard}) and the nonvanishing of $\text{Tor}_2^A(B, B) = \Ker(J \otimes_A J \to J)$ we conclude that $H_2(L_{B/A})$ is nonzero. \begin{lemma} \label{lemma-formally-etale-nontrivial-cotangent-complex} There exists a formally \'etale surjective ring map $A \to B$ with $L_{B/A}$ not equal to zero. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{Ideals generated by sets of idempotents and localization} \label{section-ideal-locally-idempotents} \noindent Let $R$ be a ring. Consider the ring $$B(R) = R[x_n; n \in \mathbf{Z}]/(x_n(x_n - 1), x_nx_m; n \not = m)$$ It is easy to show that every prime $\mathfrak q \subset B(R)$ is either of the form $$\mathfrak q = \mathfrak pB(R) + (x_n; n \in \mathbf{Z})$$ or of the form $$\mathfrak q = \mathfrak pB(R) + (x_n - 1) + (x_m; n \not = m, m \in \mathbf{Z}).$$ Hence we see that $$\Spec(B(R)) = \Spec(R) \amalg \coprod\nolimits_{n \in \mathbf{Z}} \Spec(R)$$ where the topology is not just the disjoint union topology. It has the following properties: Each of the copies indexed by $n \in \mathbf{Z}$ is an open subscheme, namely it is the standard open $D(x_n)$. The "central" copy of $\Spec(R)$ is in the closure of the union of any infinitely many of the other copies of $\Spec(R)$. Note that this last copy of $\Spec(R)$ is cut out by the ideal $(x_n, n \in \mathbf{Z})$ which is generated by the idempotents $x_n$. Hence we see that if $\Spec(R)$ is connected, then the decomposition above is exactly the decomposition of $\Spec(B(R))$ into connected components. \medskip\noindent Next, let $A = \mathbf{C}[x, y]/((y - x^2 + 1)(y + x^2 - 1))$. The spectrum of $A$ consists of two irreducible components $C_1 = \Spec(A_1)$, $C_2 = \Spec(A_2)$ with $A_1 = \mathbf{C}[x, y]/(y - x^2 + 1)$ and $A_2 = \mathbf{C}[x, y]/(y + x^2 - 1)$. Note that these are parametrized by $(x, y) = (t, t^2 - 1)$ and $(x, y) = (t, -t^2 + 1)$ which meet in $P = (-1, 0)$ and $Q = (1, 0)$. We can make a twisted version of $B(A)$ where we glue $B(A_1)$ to $B(A_2)$ in the following way: Above $P$ we let $x_n \in B(A_1) \otimes \kappa(P)$ correspond to $x_n \in B(A_2) \otimes \kappa(P)$, but above $Q$ we let $x_n \in B(A_1) \otimes \kappa(Q)$ correspond to $x_{n + 1} \in B(A_2) \otimes \kappa(Q)$. Let $B^{twist}(A)$ denote the resulting $A$-algebra. Details omitted. By construction $B^{twist}(A)$ is Zariski locally over $A$ isomorphic to the untwisted version. Namely, this happens over both the principal open $\Spec(A) \setminus \{P\}$ and the principal open $\Spec(A) \setminus \{Q\}$. However, our choice of glueing produces enough "monodromy" such that $\Spec(B^{twist}(A))$ is connected (details omitted). Finally, there is a central copy of $\Spec(A) \to \Spec(B^{twist}(A))$ which gives a closed subscheme whose ideal is Zariski locally on $B^{twist}(A)$ cut out by ideals generated by idempotents, but not globally (as $B^{twist}(A)$ has no nontrivial idempotents). \begin{lemma} \label{lemma-not-generated-idempotents} There exists an affine scheme $X = \Spec(A)$ and a closed subscheme $T \subset X$ such that $T$ is Zariski locally on $X$ cut out by ideals generated by idempotents, but $T$ is not cut out by an ideal generated by idempotents. \end{lemma} \begin{proof} See above. \end{proof} \section{A ring map which identifies local rings which is not ind-\'etale} \label{section-not-ind-etale} \noindent Note that the ring map $R \to B(R)$ constructed in Section \ref{section-ideal-locally-idempotents} is a colimit of finite products of copies of $R$. Hence $R \to B(R)$ is ind-Zariski, see Pro-\'etale Cohomology, Definition \ref{proetale-definition-ind-zariski}. Next, consider the ring map $A \to B^{twist}(A)$ constructed in Section \ref{section-ideal-locally-idempotents}. Since this ring map is Zariski locally on $\Spec(A)$ isomorphic to an ind-Zariski ring map $R \to B(R)$ we conclude that it identifies local rings (see Pro-\'etale Cohomology, Lemma \ref{proetale-lemma-ind-zariski-implies}). The discussion in Section \ref{section-ideal-locally-idempotents} shows there is a section $B^{twist}(A) \to A$ whose kernel is not generated by idempotents. Now, if $A \to B^{twist}(A)$ were ind-\'etale, i.e., $B^{twist}(A) = \colim A_i$ with $A \to A_i$ \'etale, then the kernel of $A_i \to A$ would be generated by an idempotent (Algebra, Lemmas \ref{algebra-lemma-map-between-etale} and \ref{algebra-lemma-surjective-flat-finitely-presented}). This would contradict the result mentioned above. \begin{lemma} \label{lemma-not-ind-etale} There is a ring map $A \to B$ which identifies local rings but which is not ind-\'etale. A fortiori it is not ind-Zariski. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{Non flasque quasi-coherent sheaf associated to injective module} \label{section-nonflasque} \noindent For more examples of this type see \cite[Expos\'e II, Appendix I]{SGA6} where Illusie explains some examples due to Verdier. \medskip\noindent Consider the affine scheme $X = \Spec(A)$ where $$A = k[x, y, z_1, z_2, \ldots]/(x^nz_n)$$ is the ring from Properties, Example \ref{properties-example-does-not-work-in-general}. Set $I = (x) \subset A$. Consider the quasi-compact open $U = D(x)$ of $X$. We have seen in loc.\ cit.\ that there is a section $s \in \mathcal{O}_X(U)$ which does not come from an $A$-module map $I^n \to A$ for any $n \geq 0$. \medskip\noindent Let $\alpha : A \to J$ be the embedding of $A$ into an injective $A$-module. Let $Q = J/\alpha(A)$ and denote $\beta : J \to Q$ the quotient map. We claim that the map $$\Gamma(X, \widetilde{J}) \longrightarrow \Gamma(U, \widetilde{J})$$ is not surjective. Namely, we claim that $\alpha(s)$ is not in the image. To see this, we argue by contradiction. So assume that $x \in J$ is an element which restricts to $\alpha(s)$ over $U$. Then $\beta(x) \in Q$ is an element which restricts to $0$ over $U$. Hence we know that $I^n\beta(x) = 0$ for some $n$, see Properties, Lemma \ref{properties-lemma-sections-over-quasi-compact-open-in-affine}. This implies that we get a morphism $\varphi : I^n \to A$, $h \mapsto \alpha^{-1}(hx)$. It is easy to see that this morphism $\varphi$ gives rise to the section $s$ via the map of Properties, Lemma \ref{properties-lemma-sections-over-quasi-compact-open-in-affine} which is a contradiction. \begin{lemma} \label{lemma-nonflasque} There exists an affine scheme $X = \Spec(A)$ and an injective $A$-module $J$ such that $\widetilde{J}$ is not a flasque sheaf on $X$. Even the restriction $\Gamma(X, \widetilde{J}) \to \Gamma(U, \widetilde{J})$ with $U$ a standard open need not be surjective. \end{lemma} \begin{proof} See above. \end{proof} \noindent In fact, we can use a similar construction to get an example of an injective module whose associated quasi-coherent sheaf has nonzero cohomology over a quasi-compact open. Namely, we start with the ring $$A = k[x, y, w_1, u_1, w_2, u_2, \ldots]/(x^nw_n, y^nu_n, u_n^2, w_n^2)$$ where $k$ is a field. Choose an injective map $A \to I$ where $I$ is an injective $A$-module. We claim that the element $1/xy$ in $A_{xy} \subset I_{xy}$ is not in the image of $I_x \oplus I_y \to I_{xy}$. Arguing by contradiction, suppose that $$\frac{1}{xy} = \frac{i}{x^n} + \frac{j}{y^n}$$ for some $n \geq 1$ and $i, j \in I$. Clearing denominators we obtain $$(xy)^{n + m - 1} = x^my^{n + m}i + x^{n + m}y^mj$$ for some $m \geq 0$. Multiplying with $u_{n + m}w_{n + m}$ we see that $u_{n + m}w_{n + m}(xy)^{n + m - 1} = 0$ in $A$ which is the desired contradiction. Let $U = D(x) \cup D(y) \subset X = \Spec(A)$. For any $A$-module $M$ we have an exact sequence $$0 \to H^0(U, \widetilde{M}) \to M_x \oplus M_y \to M_{xy} \to H^1(U, \widetilde{M}) \to 0$$ by Mayer-Vietoris. We conclude that $H^1(U, \widetilde{I})$ is nonzero. \begin{lemma} \label{lemma-nonvanishing} There exists an affine scheme $X = \Spec(A)$ whose underlying topological space is Noetherian and an injective $A$-module $I$ such that $\widetilde{I}$ has nonvanishing $H^1$ on some quasi-compact open $U$ of $X$. \end{lemma} \begin{proof} See above. Note that $\Spec(A) = \Spec(k[x, y])$ as topological spaces. \end{proof} \section{A non-separated flat group scheme} \label{section-non-separated-group-scheme} \noindent Every group scheme over a field is separated, see Groupoids, Lemma \ref{groupoids-lemma-group-scheme-over-field-separated}. This is not true for group schemes over a base. \medskip\noindent Let $k$ be a field. Let $S = \Spec(k[x]) = \mathbf{A}^1_k$. Let $G$ be the affine line with $0$ doubled (see Schemes, Example \ref{schemes-example-affine-space-zero-doubled}) seen as a scheme over $S$. Thus a fibre of $G \to S$ is either a singleton or a set with two elements (one in $U$ and one in $V$). Thus we can endow these fibres with the structure of a group (by letting the element in $U$ be the zero of the group structure). More precisely, $G$ has two opens $U, V$ which map isomorphically to $S$ such that $U \cap V$ is mapped isomorphically to $S \setminus \{0\}$. Then $$G \times_S G = U \times_S U \cup V \times_S U \cup U \times_S V \cup V \times_S V$$ where each piece is isomorphic to $S$. Hence we can define a multiplication $m : G \times_S G \to G$ as the unique $S$-morphism which maps the first and the last piece into $U$ and the two middle pieces into $V$. This matches the pointwise description given above. We omit the verification that this defines a group scheme structure. \begin{lemma} \label{lemma-non-separated-group-scheme} There exists a flat group scheme of finite type over the affine line which is not separated. \end{lemma} \begin{proof} See the discussion above. \end{proof} \begin{lemma} \label{lemma-non-quasi-separated-group-scheme} There exists a flat group scheme of finite type over the infinite dimensional affine space which is not quasi-separated. \end{lemma} \begin{proof} The same construction as above can be carried out with the infinite dimensional affine space $S = \mathbf{A}^\infty_k = \Spec k[x_1, x_2, \ldots]$ as the base and the origin $0 \in S$ corresponding to the maximal ideal $(x_1, x_2, \ldots)$ as the closed point which is doubled in $G$. The resulting group scheme $G \rightarrow S$ is not quasi-separated as explained in Schemes, Example \ref{schemes-example-not-quasi-separated}. \end{proof} \section{A non-flat group scheme with flat identity component} \label{section-non-flat-group-scheme} \noindent Let $X \to S$ be a monomorphism of schemes. Let $G = S \amalg X$. Let $m : G \times_S G \to G$ be the $S$-morphism $$G \times_S G = X \times_S X \amalg X \amalg X \amalg S \longrightarrow G = X \amalg S$$ which maps the summands $X \times_S X$ and $S$ into $S$ and maps the summands $X$ into $X$ by the identity morphism. This defines a group law. To see this we have to show that $m \circ (m \times \text{id}_G) = m \circ (\text{id}_G \times m)$ as maps $G \times_S G \times_S G \to G$. Decomposing $G \times_S G \times_S G$ into components as above, we see that we need to verify this for the restriction to each of the $8$-pieces. Each piece is isomorphic to either $S$, $X$, $X \times_S X$, or $X \times_S X \times_S X$. Moreover, both maps map these pieces to $S$, $X$, $S$, $X$ respectively. Having said this, the fact that $X \to S$ is a monomorphism implies that $X \times_S X \cong X$ and $X \times_S X \times_S X \cong X$ and that there is in each case exactly one $S$-morphism $S \to S$ or $X \to X$. Thus we see that $m \circ (m \times \text{id}_G) = m \circ (\text{id}_G \times m)$. Thus taking $X \to S$ to be any nonflat monomorphism of schemes (e.g., a closed immersion) we get an example of a group scheme over a base $S$ whose identity component is $S$ (hence flat) but which is not flat. \begin{lemma} \label{lemma-non-flat-group-scheme} There exists a group scheme $G$ over a base $S$ whose identity component is flat over $S$ but which is not flat over $S$. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{A non-separated group algebraic space over a field} \label{section-non-separated-group-space} \noindent Every group scheme over a field is separated, see Groupoids, Lemma \ref{groupoids-lemma-group-scheme-over-field-separated}. This is not true for group algebraic spaces over a field (but see end of this section for positive results). \medskip\noindent Let $k$ be a field of characteristic zero. Consider the algebraic space $G = \mathbf{A}^1_k/\mathbf{Z}$ from Spaces, Example \ref{spaces-example-affine-line-translation}. By construction $G$ is the fppf sheaf associated to the presheaf $$T \longmapsto \Gamma(T, \mathcal{O}_T) / \mathbf{Z}$$ on the category of schemes over $k$. The obvious addition rule on the presheaf induces an addition $m : G \times G \to G$ which turns $G$ into a group algebraic space over $\Spec(k)$. Note that $G$ is not separated (and not even quasi-separated or locally separated). On the other hand $G \to \Spec(k)$ is of finite type! \begin{lemma} \label{lemma-non-separated-group-space} There exists a group algebraic space of finite type over a field which is not separated (and not even quasi-separated or locally separated). \end{lemma} \begin{proof} See discussion above. \end{proof} \noindent Positive results: If the group algebraic space $G$ is either quasi-separated, or locally separated, or more generally a decent algebraic space, then $G$ is in fact separated, see More on Groupoids in Spaces, Lemma \ref{spaces-more-groupoids-lemma-group-scheme-over-field-separated}. Moreover, a finite type, separated group algebraic space over a field is in fact a scheme by More on Groupoids in Spaces, Lemma \ref{spaces-more-groupoids-lemma-group-space-scheme-locally-finite-type-over-k}. The idea of the proof is that the schematic locus is open dense, see Properties of Spaces, Proposition \ref{spaces-properties-proposition-locally-quasi-separated-open-dense-scheme} or Decent Spaces, Theorem \ref{decent-spaces-theorem-decent-open-dense-scheme}. By translating this open we see that every point of $G$ has an open neighbourhood which is a scheme. \section{Specializations between points in fibre \'etale morphism} \label{section-specializations-fibre-etale} \noindent If $f : X \to Y$ is an \'etale, or more generally a locally quasi-finite morphism of schemes, then there are no specializations between points of fibres, see Morphisms, Lemma \ref{morphisms-lemma-locally-quasi-finite-fibres}. However, for morphisms of algebraic spaces this doesn't hold in general. \medskip\noindent To give an example, let $k$ be a field. Set $$P = k[u, u^{-1}, y, \{x_n\}_{n \in \mathbf{Z}}].$$ Consider the action of $\mathbf{Z}$ on $P$ by $k$-algebra maps generated by the automorphism $\tau$ given by the rules $\tau(u) = u$, $\tau(y) = uy$, and $\tau(x_n) = x_{n + 1}$. For $d \geq 1$ set $I_d = ((1 - u^d)y, x_n - x_{n + d}, n \in \mathbf{Z})$. Then $V(I_d) \subset \Spec(P)$ is the fix point locus of $\tau^d$. Let $S \subset P$ be the multiplicative subset generated by $y$ and all $1 - u^d$, $d \in \mathbf{N}$. Then we see that $\mathbf{Z}$ acts freely on $U = \Spec(S^{-1}P)$. Let $X = U/\mathbf{Z}$ be the quotient algebraic space, see Spaces, Definition \ref{spaces-definition-quotient}. \medskip\noindent Consider the prime ideals $\mathfrak p_n = (x_n, x_{n + 1}, \ldots)$ in $S^{-1}P$. Note that $\tau(\mathfrak p_n) = \mathfrak p_{n + 1}$. Hence each of these define point $\xi_n \in U$ whose image in $X$ is the same point $x$ of $X$. Moreover we have the specializations $$\ldots \leadsto \xi_n \leadsto \xi_{n - 1} \leadsto \ldots$$ We conclude that $U \to X$ is an example of the promised type. \begin{lemma} \label{lemma-specializations-fibre-etale} There exists an \'etale morphism of algebraic spaces $f : X \to Y$ and a nontrivial specialization of points $x \leadsto x'$ in $|X|$ with $f(x) = f(x')$ in $|Y|$. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{A torsor which is not an fppf torsor} \label{section-torsor-not-fppf} \noindent In Groupoids, Remark \ref{groupoids-remark-fun-with-torsors} we raise the question whether any $G$-torsor is a $G$-torsor for the fppf topology. In this section we show that this is not always the case. \medskip\noindent Let $k$ be a field. All schemes and stacks are over $k$ in what follows. Let $G \to \Spec(k)$ be the group scheme $$G = (\mu_{2, k})^\infty = \mu_{2, k} \times_k \mu_{2, k} \times_k \mu_{2, k} \times_k \ldots = \lim_n (\mu_{2, k})^n$$ where $\mu_{2, k}$ is the group scheme of second roots of unity over $\Spec(k)$, see Groupoids, Example \ref{groupoids-example-roots-of-unity}. As an inverse limit of affine schemes we see that $G$ is an affine group scheme. In fact it is the spectrum of the ring $k[t_1, t_2, t_3, \ldots]/(t_i^2 - 1)$. The multiplication map $m : G \times_k G \to G$ is on the algebra level given by $t_i \mapsto t_i \otimes t_i$. \medskip\noindent We claim that any $G$-torsor over $k$ is of the form $$P = \Spec(k[x_1, x_2, x_3, \ldots]/(x_i^2 - a_i))$$ for certain $a_i \in k^*$ and with $G$-action $G \times_k P \to P$ given by $x_i \to t_i \otimes x_i$ on the algebra level. We omit the proof. Actually for the example we only need that $P$ is a $G$-torsor which is clear since over $k' = k(\sqrt{a_1}, \sqrt{a_2}, \ldots)$ the scheme $P$ becomes isomorphic to $G$ in a $G$-equivariant manner. Note that $P$ is trivial if and only if $k' = k$ since if $P$ has a $k$-rational point then all of the $a_i$ are squares. \medskip\noindent We claim that $P$ is an fppf torsor if and only if the field extension $k \subset k' = k(\sqrt{a_1}, \sqrt{a_2}, \ldots)$ is finite. If $k'$ is finite over $k$, then $\{\Spec(k') \to \Spec(k)\}$ is an fppf covering which trivializes $P$ and we see that $P$ is indeed an fppf torsor. Conversely, suppose that $P$ is an fppf $G$-torsor. This means that there exists an fppf covering $\{S_i \to \Spec(k)\}$ such that each $P_{S_i}$ is trivial. Pick an $i$ such that $S_i$ is not empty. Let $s \in S_i$ be a closed point. By Varieties, Lemma \ref{varieties-lemma-locally-finite-type-Jacobson} the field extension $k \subset \kappa(s)$ is finite, and by construction $P_{\kappa(s)}$ has a $\kappa(s)$-rational point. Thus we see that $k \subset k' \subset \kappa(s)$ and $k'$ is finite over $k$. \medskip\noindent To get an explicit example take $k = \mathbf{Q}$ and $a_i = i$ for example (or $a_i$ is the $i$th prime if you like). \begin{lemma} \label{lemma-torsors-principal-spaces-not-equal} Let $S$ be a scheme. Let $G$ be a group scheme over $S$. The stack $G\textit{-Principal}$ classifying principal homogeneous $G$-spaces (see Examples of Stacks, Subsection \ref{examples-stacks-subsection-principal-homogeneous-spaces}) and the stack $G\textit{-Torsors}$ classifying fppf $G$-torsors (see Examples of Stacks, Subsection \ref{examples-stacks-subsection-fppf-torsors}) are not equivalent in general. \end{lemma} \begin{proof} The discussion above shows that the functor $G\textit{-Torsors} \to G\textit{-Principal}$ isn't essentially surjective in general. \end{proof} \section{Stack with quasi-compact flat covering which is not algebraic} \label{section-not-algebraic-stack} \noindent In this section we briefly describe an example due to Brian Conrad. You can find the example online at \href{http://mathoverflow.net/questions/15082/fpqc-covers-of-stacks/15269#15269}{this location}. Our example is slightly different. \medskip\noindent Let $k$ be an algebraically closed field. All schemes and stacks are over $k$ in what follows. Let $G \to \Spec(k)$ be an affine group scheme. In Examples of Stacks, Lemma \ref{examples-stacks-lemma-classifying-stacks} we have given several different equivalent ways to view $\mathcal{X} = [\Spec(k)/G]$ as a stack in groupoids over $(\Sch/\Spec(k))_{fppf}$. In particular $\mathcal{X}$ classifies fppf $G$-torsors. More precisely, a $1$-morphism $T \to \mathcal{X}$ corresponds to an fppf $G_T$-torsor $P$ over $T$ and $2$-arrows correspond to isomorphisms of torsors. It follows that the diagonal $1$-morphism $$\Delta : \mathcal{X} \longrightarrow \mathcal{X} \times_{\Spec(k)} \mathcal{X}$$ is representable and affine. Namely, given any pair of fppf $G_T$-torsors $P_1, P_2$ over a scheme $T/k$ the scheme $\mathit{Isom}(P_1, P_2)$ is affine over $T$. The trivial $G$-torsor over $\Spec(k)$ defines a $1$-morphism $$f : \Spec(k) \longrightarrow \mathcal{X}.$$ We claim that this is a surjective $1$-morphism. The reason is simply that by definition for any $1$-morphism $T \to \mathcal{X}$ there exists a fppf covering $\{T_i \to T\}$ such that $P_{T_i}$ is isomorphic to the trivial $G_{T_i}$-torsor. Hence the compositions $T_i \to T \to \mathcal{X}$ factor through $f$. Thus it is clear that the projection $T \times_\mathcal{X} \Spec(k) \to T$ is surjective (which is how we define the property that $f$ is surjective, see Algebraic Stacks, Definition \ref{algebraic-definition-relative-representable-property}). In a similar way you show that $f$ is quasi-compact and flat (details omitted). We also record here the observation that $$\Spec(k) \times_\mathcal{X} \Spec(k) \cong G$$ as schemes over $k$. \medskip\noindent Suppose there exists a surjective smooth morphism $p : U \to \mathcal{X}$ where $U$ is a scheme. Consider the fibre product $$\xymatrix{ W \ar[d] \ar[r] & U \ar[d] \\ \Spec(k) \ar[r] & \mathcal{X} }$$ Then we see that $W$ is a nonempty smooth scheme over $k$ which hence has a $k$-point. This means that we can factor $f$ through $U$. Hence we obtain $$G \cong \Spec(k) \times_\mathcal{X} \Spec(k) \cong (\Spec(k) \times_k \Spec(k)) \times_{(U \times_k U)} (U \times_\mathcal{X} U)$$ and since the projections $U \times_\mathcal{X} U \to U$ were assumed smooth we conclude that $U \times_\mathcal{X} U \to U \times_k U$ is locally of finite type, see Morphisms, Lemma \ref{morphisms-lemma-permanence-finite-type}. It follows that in this case $G$ is locally of finite type over $k$. Altogether we have proved the following lemma (which can be significantly generalized). \begin{lemma} \label{lemma-BG-algebraic} Let $k$ be a field. Let $G$ be an affine group scheme over $k$. If the stack $[\Spec(k)/G]$ has a smooth covering by a scheme, then $G$ is of finite type over $k$. \end{lemma} \begin{proof} See discussion above. \end{proof} \noindent To get an explicit example as in the title of this section, take for example $G = (\mu_{2, k})^\infty$ the group scheme of Section \ref{section-torsor-not-fppf}, which is not locally of finite type over $k$. By the discussion above we see that $\mathcal{X} = [\Spec(k)/G]$ has properties (1) and (2) of Algebraic Stacks, Definition \ref{algebraic-definition-algebraic-stack}, but not property (3). Hence $\mathcal{X}$ is not an algebraic stack. On the other hand, there does exist a scheme $U$ and a surjective, flat, quasi-compact morphism $U \to \mathcal{X}$, namely the morphism $f : \Spec(k) \to \mathcal{X}$ we studied above. \section{Limit preserving on objects, not limit preserving} \label{section-limit-preserving} \noindent Let $S$ be a nonempty scheme. Let $\mathcal{G}$ be an injective abelian sheaf on $(\Sch/S)_{fppf}$. We obtain a stack in groupoids $$\mathcal{G}\textit{-Torsors} \longrightarrow (\Sch/S)_{fppf}$$ over $S$, see Examples of Stacks, Lemma \ref{examples-stacks-lemma-torsors-sheaf-stack-in-groupoids}. This stack is limit preserving on objects over $(\Sch/S)_{fppf}$ (see Criteria for Representability, Section \ref{criteria-section-limit-preserving}) because every $\mathcal{G}$-torsor is trivial. On the other hand, $\mathcal{G}\textit{-Torsors}$ is in general not limit preserving (see Artin's Axioms, Definition \ref{artin-definition-limit-preserving}) as $\mathcal{G}$ need not be limit preserving as a sheaf. For example, take any nonzero injective sheaf $\mathcal{I}$ and set $\mathcal{G} = \prod_{n \in \mathbf{Z}} \mathcal{I}$ to get an example. \begin{lemma} \label{lemma-limit-preserving-on-objects-not-limit-preserving} Let $S$ be a nonempty scheme. There exists a stack in groupoids $p : \mathcal{X} \to (\Sch/S)_{fppf}$ such that $p$ is limit preserving on objects, but $\mathcal{X}$ is not limit preserving. \end{lemma} \begin{proof} See discussion above. \end{proof} \section{A non-algebraic classifying stack} \label{section-non-algebraic} \noindent Let $S = \Spec(\mathbf{F}_p)$ and let $\mu_p$ denote the group scheme of $p$th roots of unity over $S$. In Groupoids in Spaces, Section \ref{spaces-groupoids-section-stacks} we have introduced the quotient stack $[S/\mu_p]$ and in Examples of Stacks, Section \ref{examples-stacks-section-group-quotient-stacks} we have shown $[S/\mu_p]$ is the classifying stack for fppf $\mu_p$-torsors: Given a scheme <