Powers of a sheaf of ideals Let $\mathscr I$ be a sheaf of ideals on a scheme $X$.  What is the meaning of $\mathscr I^2$?
I would think we would define $\mathscr I^2(U)$ to be the ideal $\mathscr I(U)\mathscr I(U)$.  But there is no reason to believe this defines a sheaf.  Is $\mathscr I^2$ the sheaf associated to the presheaf $U \mapsto \mathscr I(U)^2$?
 A: I will give an answer with the stuff I figured out by myself. As far as I know, the following text is the only piece of writing I am aware of that treats the topic of “product of ideal sheaves” in a general way. I haven't been able to find anything related on the Stacks Project, Hartshorne or Eisenbud-Harris's Geometry of Schemes, although I haven't looked in EGA. In 14.3.E from Vakil's, they only give an ad-hoc definition for quasi-coherent of ideals on a scheme. From the proof of upcoming Corollary 10, it follows that Vakil's definition is a particular case of our Definition 2, which works for general ringed spaces.
Any comments or remarks which expand what I did or which point out to any other references are very welcome.
Here's the most interesting bits of the upcoming text: In Definition 2 I give a general definition of the ideal product sheaf over general ringed spaces. On Proposition 4 I link to the proof of the fact that ideal product sheaf commutes with the operation of taking stalks. As a consequence of the general definition, in Proposition 9 I prove that this ideal product sheaf commutes with tildification of ideals, $\widetilde{IJ}=\widetilde{I}\widetilde{J}$, over $\operatorname{Spec}A$. As a corollary, we obtain that over any scheme the ideal product sheaf of two quasi-coherent ideals sheaves is quasi-coherent.

Definition 1. Let $(X,\mathcal{O}_X)$ be a ringed space. An ideal (pre)sheaf or a (pre)sheaf of ideals over $X$ is a (pre)sheaf $\mathcal{I}$ over $X$ such that

*

*as sets, $\mathcal{I}(U)\subset\mathcal{O}_X(U)$, for $U\subset X$ open,

*the restriction maps of $\mathcal{I}$ are induced by those of $\mathcal{O}_X$,

(1+2 means that $\mathcal{I}$ is a subsheaf of $\mathcal{O}_X$)


*$\mathcal{I}(U)$ is an ideal of $\mathcal{O}_X(U)$.

Equivalently, $\mathcal{I}$ is a (pre)sheaf of $\mathcal{O}_X$-submodules of $\mathcal{O}_X$ (a (pre)sheaf of $\mathcal{O}_X$-submodules of an $\mathcal{O}_X$-module $\mathcal{M}$ is a (pre)sheaf of $\mathcal{O}_X$-modules $\mathcal{N}$ that is a subsheaf of $\mathcal{M}$ and such that $\mathcal{N}(U)\subset\mathcal{M}(U)$ is an $\mathcal{O}_X(U)$-submodule).

We can give a slightly more general definition of an ideal (pre)sheaf, which comes from giving a slightly more general definition of a (pre)sheaf of $\mathcal{O}_X$-submodules: a (pre)sheaf of $\mathcal{O}_X$-submodules of $\mathcal{M}$ is any monomorphism of (pre)sheaves of $\mathcal{O}_X$-modules $i:\mathcal{N}\to\mathcal{M}$. Equivalently, the map on sections $i_U:\mathcal{N}(U)\to\mathcal{M}(U)$ is an injective map for all $U\subset X$ open (see 007V and 007U) and this way we can identify $\mathcal{N}$ with the image presheaf of $i$, which turns out to be a sheaf if $\mathcal{N}$ is a sheaf.
Technical omissible remark: For those who noticed, yeah, the result in 007V and 007U is stated for (pre)sheaves of sets; but it also holds for (pre)sheaves of $\mathcal{O}_X$-modules. One way of seeing this is because in a preabelian category (as both $\mathsf{PMod}(\mathcal{O}_X)$ and $\mathsf{Mod}(\mathcal{O}_X)$ are) a morphism is a monomorphism if and only its kernel vanishes (in the theory of (pre)abelian categories, a morphism with a vanishing kernel is said to be injective, so monic and injective morphisms are the same thing in preabelian categories). And the kernel presheaf, $\operatorname{Ker} \varphi$, of $\varphi:\mathcal{N}\to\mathcal{M}\in\mathsf{PMod}(\mathcal{O}_X)$, which is given by the section-wise kernel, $(\operatorname{Ker}\varphi)(U)=\operatorname{Ker}\varphi_U\subset\mathcal{N}(U)$, becomes the kernel sheaf in $\mathsf{Mod}(\mathcal{O}_X)$ whenever $\mathcal{N},\mathcal{M}\in\mathsf{Mod}(\mathcal{O}_X)$.
The following example will be later used to explain a counterexample. It may be omitted for now.
Example. for $X$ any ringed space, pick a point $x\in X$ and an ideal $I$ of $\mathcal{O}_{X,x}$. For each open $U\subset X$, define
$$
\mathcal{I}(U)=
\begin{cases}
\mathcal{O}_X(U),&x\notin U,\\
\{f\in\mathcal{O}_X(U)\mid f_x\in I\},&x\in U.
\end{cases}
$$
It is easy to verify that the restriction map $\mathcal{O}_X(V)\to\mathcal{O}_X(V')$ for open sets $V'\subset V\subset X$ induce a map $\mathcal{I}(V)\to\mathcal{I}(V')$, and this maps turns $\mathcal{I}$ into a presheaf. This presheaf an ideal presheaf, since “taking germs” is a multiplicative operation in a sheaf of rings. Also, $\mathcal{I}$ is a separated presheaf since it is a subsheaf of the separated presheaf $\mathcal{O}_X$. On the other hand the property of gluing comes from that of $\mathcal{O}_X$, where one can verify that the glued section is actually from $\mathcal{I}$, using the general fact $(f|_W)_y=f_y$, for $y\in X$, open subsets $W\subset V\subset X$ and $f\in\mathcal{O}_X(V)$. Thus $\mathcal{I}$ is an ideal sheaf.
If $X$ is a locally ringed space and $I=\mathfrak{m}_{X,x}\subset\mathcal{O}_{X,x}$ is the maximal ideal, then $\mathcal{I}$ is called the sheaf of vanishing functions at $x$. If $X$ is a scheme, and $x\in X$ is a closed point, then the ideal sheaf of functions which vanish at $x\in X$ coincides with the ideal sheaf associated to the closed immersion $i:\operatorname{Spec}\kappa (x)\to X$, where $\kappa(x)$ is the residue field at $x$. Indeed, it is not difficult to verify that this ideal coincides with the kernel sheaf of $\mathcal{O}_X\to i_*\mathcal{O_{\operatorname{Spec}\kappa(x)}}$.

Definition 2. Given a ringed space $(X,\mathcal{O}_X)$ and ideal sheaves $\mathcal{I}$ and $\mathcal{J}$ over $X$, we define the ideal product presheaf $\mathcal{I}\cdot_p\mathcal{J}$ as the ideal presheaf
$$
U\mapsto(\mathcal{I}\cdot_p\mathcal{J})(U)=\mathcal{I}(U)\mathcal{J}(U)\subset\mathcal{O}_X(U).
$$
We define the ideal product sheaf $\mathcal{I}\mathcal{J}$ to be the sheafification of the ideal product presheaf, $\mathcal{I}\mathcal{J}=(\mathcal{I}\cdot_p\mathcal{J})^\#$.

Note that the ideal product presheaf is a separated presheaf, since it is a subpresheaf of a separated presheaf, namely, $\mathcal{O}_X$. So we have that $\mathcal{I}\cdot_p\mathcal{J}\subset\mathcal{I}\mathcal{J}$ as presheaves of $\mathcal{O}_X$-modules, by 0082. That is, the map $\mathcal{I}\cdot_p\mathcal{J}\to\mathcal{I}\mathcal{J}$, over an open subset $U\subset X$, identifies the sections of the former with a subset of sections of the latter, $\mathcal{I}(U)\mathcal{J}(U)\subset(\mathcal{I}\mathcal{J})(U)$. However, this contention may be strict, for $\mathcal{I}\cdot_p\mathcal{J}$ is not a sheaf in general. For counterexamples, see the answers to this question. We explain the answer from Louis Jaburi:
With the ideals “of vanishing functions” at some point, he is referring at what we define in the example before Definition 2. Let $X_1$ and $X_2$ be the two copies of the affine line that are glued to get $X$, the affine line with double origin. We define the ideal sheaves $I_1$ and $I_2$ from his answer as:
$$
I_i|_{X_j}=
\begin{cases}
\mathcal{O}_{X_j},&\text{if }i\neq j,\\
\widetilde{(t_i)},& i= j.
\end{cases}
$$
for $i,j\in\{1,2\}$. This definition is coherent in the intersection $X_1\cap X_2$, since $\widetilde{(t_i)}|_{D(t_i)}=\mathcal{O}_{X_i}|_{D(t_i)}$, and we have an isomorphism $k[t_1,t_1^{-1}]\to k[t_2,t_2^{-1}]$ which maps $t_1$ to $t_2$.
Our terminology is well-chosen:

Proposition 3. The ideal product sheaf is an ideal sheaf.

Proof. From the obvious morphism $\mathcal{I}\cdot_p\mathcal{J}\to\mathcal{O}_X$ of presheaves of $\mathcal{O}_X$-modules, the universal property of the sheafification of a presheaf of $\mathcal{O}_X$-modules yields a commutative diagram
$$
\begin{array}{ccc}
\mathcal{I}\cdot_p\mathcal{J}&\to&\mathcal{O}_X\\
\downarrow&\nearrow&\\
\mathcal{I}\mathcal{J}
\end{array}
$$
The induced map on stalks at $x\in X$ by $\mathcal{I}\cdot_p\mathcal{J}\to\mathcal{O}_X$ coincides with the one induced by $\mathcal{I}\mathcal{J}\to\mathcal{O}_X$. The former is injective, since filtered colimits are exact (see 00DB). Hence, we obtain that $\mathcal{I}\mathcal{J}\to\mathcal{O}_X$ is a monomorphism of $\mathcal{O}_X$-modules (by 007V, 007U and 007T), i.e., $\mathcal{I}\mathcal{J}$ is an ideal sheaf of $\mathcal{O}_X$. $\square$
Second technical omissible remark: Although again we hyperlinked the corresponding result for sheaves of sets, the statement “a morphism of sheaves is monic if and only if its induced maps on stalks are all injective” also holds in for $\mathcal{O}_X$-modules. This is because $(\operatorname{Ker}\varphi)_x=\operatorname{Ker}\varphi_x$ for a morphism $\varphi$ from $\operatorname{Mod}(\mathcal{O}_X)$, as filtered colimits are exact, and due to the fact that a sheaf of $\mathcal{O}_X$-modules is zero if and only if all of its stalks vanish.
Product of ideal sheaves commutes with taking stalks.

Proposition 4. If $X$ is a ringed space and $\mathcal{I},\mathcal{J}\subset\mathcal{O}_X$ are sheaves of ideals, then $(\mathcal{I}\mathcal{J})_x\cong\mathcal{I}_x\mathcal{J}_x$, for $x\in X$.

Proof. It was proven in this answer. $\square$
Ideal product sheaf is associative.

Proposition 5. If $X$ is a ringed space and $\mathcal{I},\mathcal{J},\mathcal{K}$ are ideal sheaves, then $(\mathcal{I}\mathcal{J})\mathcal{K}=\mathcal{I}(\mathcal{J}\mathcal{K})$.

Proof. First note that the result is true for rings: it holds $(IJ)K=IJK=I(JK)$ for ideals $I,J,K$ of a ring $A$, where $IJK$ is the ideal generated by $\{xyz\mid x\in I, y\in J, z\in K\}$. Then we have that the result is true for the ideal product presheaf, $(\mathcal{I}\cdot_p\mathcal{J})\cdot_p\mathcal{K}
=\mathcal{I}\cdot_p\mathcal{J}\cdot_p\mathcal{K}
=\mathcal{I}\cdot_p(\mathcal{J}\cdot_p\mathcal{K})$, where the middle sheaf is the subsheaf of $\mathcal{O}_X$ that in an open set $U\subset X$ has sections $\mathcal{I}(U)\mathcal{J}(U)\mathcal{K}(U)$. Therefore, as a consequence of last proposition, for $x\in X$ we have
$$
(\mathcal{I}\cdot_p\mathcal{J}\cdot_p\mathcal{K})_x
=((\mathcal{I}\cdot_p\mathcal{J})\cdot_p\mathcal{K})_x
=(\mathcal{I}\cdot_p\mathcal{J})_x\mathcal{K}_x
=(\mathcal{I}_x\mathcal{J}_x)\mathcal{K}_x
=\mathcal{I}_x\mathcal{J}_x\mathcal{K}_x.
$$
Denote $\mathcal{I}\mathcal{J}\mathcal{K}$ to the sheaf associated to $\mathcal{I}\cdot_p\mathcal{J}\cdot_p\mathcal{K}$. In general, from two ideal sheaf inclusions $\mathcal{I}\subset\mathcal{I}'$ and $\mathcal{J}\subset\mathcal{J}'$ we obtain a morphism of $\mathcal{O}_X$-modules $\mathcal{I}\cdot_p\mathcal{J}\to\mathcal{I}'\cdot_p\mathcal{J}'$ (also an inclusion). As $\mathcal{I}\cdot_p\mathcal{J}\subset\mathcal{I}\mathcal{J}$, we define the composite
$$
\mathcal{I}\cdot_p\mathcal{J}\cdot_p\mathcal{K}
\longrightarrow(\mathcal{I}\mathcal{J})\cdot_p\mathcal{K}
\longrightarrow(\mathcal{I}\mathcal{J})\mathcal{K},
$$
which by the universal property of the sheafification, gives us a morphism of $\mathcal{O}_X$-modules $\mathcal{I}\mathcal{J}\mathcal{K}
\to(\mathcal{I}\mathcal{J})\mathcal{K}$. But on stalks this map is the identity. $\square$
As the last thing we will do, we consider now the case of affine schemes and quasi-coherent sheaves of ideals. Note that if $\mathcal{I}$ is a quasi-coherent ideal sheaf over $X=\operatorname{Spec}A$, then $\mathcal{I}\cong\widetilde{I}$, where $I=\Gamma(\mathcal{I},X)\subset A$ is an ideal. That is, quasi-coherent sheaves of ideals over $\operatorname{Spec}A$ are in one-to-one correspondence with ideals of $A$.

Lemma 6. Localization commutes with finite products of ideals. Specifically, if $A$ is a ring, $I,J\subset A$ are ideals and $S\subset A$ is a multiplicatively closed subset of $A$, then $S^{-1}(IJ)=(S^{-1}I)(S^{-1}J)$.

Proof. The set of generators $\frac{ij}{s}=\frac{i}{s}\frac{j}{1}$ of the LHS is contained in the RHS. The set of generators $\frac{i}{s}\frac{j}{t}=\frac{ij}{st}$ of the RHS is contained in the LHS. $\square$
We will be proving that tildification of ideals commutes with ideal product (Proposition 9). To give a clean proof of this fact, we have to delve a little bit into sheaf theory. We will obtain a sheaf-theoretic result (Corollary 8) from which our proof for Proposition 9 will be very simple.
We denote the sheafification of a presheaf $\mathcal{F}$ as $\mathcal{F}^\#$. If $X$ is a topological space, $\mathcal{B}$ is a basis of $X$, and $\mathcal{G}$ is a sheaf of sets over $\mathcal{B}$, we denote $\mathcal{G}^\text{ext}$ to the extension of $\mathcal{G}$ to all the open sets of $X$, in the style of the notation used in 009N.
Suppose we have the following situation:
\begin{equation}
\tag{$\star$}\label{sit}
\text{$X$ is a topological space, $\mathcal{B}$ is a basis of $X$, and there exists }\\\text{a presheaf of sets $\mathcal{F}$ over $X$ such that $\mathcal{F}|_\mathcal{B}$ is a sheaf of sets over }\mathcal{B}.
\end{equation}
In this situation, it is natural to ask ourselves: must $\mathcal{F}$ be a sheaf on this case? The answer turns out to be no: for a counterexample with a sheaf of abelian groups (which also therefore works as a counterexample for sheaves of sets) consider any non-zero abelian group $A$, the discrete topological space $X=\{x,y\}$ and the presheaf $\mathcal{F}$ of rings over $X$ defined as $0=\mathcal{F}(X)=\mathcal{F}(\varnothing)$ and $A=\mathcal{F}(\{x\})=\mathcal{F}(\{y\})$, with the unique possible choice of restriction mappings. We have that $\mathcal{B}=\{\{a\},\{b\}\}$ is a basis of $X$ and that $\mathcal{F}|_\mathcal{B}$ is a sheaf of sets over $\mathcal{B}$. Although $\mathcal{F}$ is a separated presheaf, we cannot in general glue a section from $\mathcal{F}(\{x\})$ with a section from $\mathcal{F}(\{y\})$ to a global section, so $\mathcal{F}$ is not a sheaf.
We can however say something if we encountered with situation \eqref{sit}.

Lemma 7. Let $X$ be a topological space, $\mathcal{B}$ be a basis of $X$, and $\mathcal{F}$ be a presheaf of sets over $X$. Then $\mathcal{F}|_\mathcal{B}$ is a sheaf over $\mathcal{B}$ if and only if $\mathcal{F}^\#|_\mathcal{B}=\mathcal{F}|_\mathcal{B}$. Therefore, if (any of) these equivalent conditions hold,
$$
\mathcal{F}^\#
=(\mathcal{F}|_\mathcal{B})^\text{ext}.
$$
If $X$ is further a ringed space and $\mathcal{F}$ is a presheaf of $\mathcal{O}_X$-modules, the analogous results hold.

Proof. Implication $(\Leftarrow)$ holds since the restriction of a sheaf to a basis is a sheaf over that basis. We show $(\Rightarrow)$. Since $\mathcal{B}$ is a basis, it is not difficult to see that the property $(*)$ given in the second paragraph of 007X coincides with the property $(*)$ given in 009M. Thus $\mathcal{F}^\#(U)=\mathcal{F}(U)$ for $U\in\mathcal{B}$. Since also the restriction mappings between sections of open basic sets coincide for these two sheaves, we have $\mathcal{F}^\#|_\mathcal{B}=\mathcal{F}|_\mathcal{B}$. By the uniqueness in 009N (or the equivalence of categories in 009O), we conclude $\mathcal{F}^\#
=(\mathcal{F}|_\mathcal{B})^\text{ext}.$
The case of $\mathcal{O}_X$-modules is analogous, using the fact that the property $(*)$ for the case of sets is formally the same for describing the sections of the sheafification of the underlying presheaf of abelian groups (see 0083 to read about sheafification of presheaves of abelian groups), and using now 009U instead of 009O. $\square$

Corollary 8. Let $X$ be a topological space, $\mathcal{B}$ be a basis of $X$, and $\mathcal{F}$ and $\mathcal{G}$ be, respectively, a sheaf and a presheaf of sets over $X$. Then $\mathcal{F}|_\mathcal{B}=\mathcal{G}|_\mathcal{B}$ if and only if $\mathcal{F}=\mathcal{G}^\#$ and $\mathcal{G}|_\mathcal{B}$ is a sheaf of sets over $\mathcal{B}$. Thus, if (any of) these equivalent conditions hold,
$
\mathcal{G}^\#
=(\mathcal{G}|_\mathcal{B})^\text{ext}.
$
If $X$ is further a ringed space and $\mathcal{F}$ is a presheaf of $\mathcal{O}_X$-modules, the analogous results hold.

Proof. For the case of sets, both implications follow from last lemma plus uniqueness in 009N (or the equivalence of categories in 009O). In the implication to the right, one also uses that the restriction of a sheaf to a basis is a sheaf over that basis. The case for $\mathcal{O}_X$-modules follows mutatis mutandis. $\square$
Here's one example of application of the last corollary: it allows one to see that $\widetilde{M}\otimes_{\mathcal{O}_X}\widetilde{N}=\widetilde{M\otimes_AN}$, where $X=\operatorname{Spec}A$ and $M, N$ are $A$-modules. Indeed, on the basis of distinguished open subsets,
\begin{align*}
(\widetilde{M} \otimes_{p,\mathcal{O}_{X}} \widetilde{N})(D(f))
&=\widetilde{M}(D(f)) \otimes_{\mathcal{O}_{X}(D(f))} \widetilde{N}(D(f))\\
&=M\left[f^{-1}\right] \otimes_{A\left[f^{-1}\right]} N\left[f^{-1}\right]\\
&=\left(M \otimes_{A} N\right)\left[f^{-1}\right],
&\text{tensor product commutes with localization}\\
&=\widetilde{M \otimes_{A} N}(D(f)).
\end{align*}
Where $\widetilde{M} \otimes_{p,\mathcal{O}_{X}} \widetilde{N}$ is the notation given in the second paragraph of 01CA.
We will be using it to show that tildification of ideals commutes with ideal product.

Proposition 9. If $I,J\subset A$ are ideals, then $\widetilde{IJ}=\widetilde{I}\widetilde{J}$. Moreover, the sections of this sheaf over an open distinguished set  $D(f)$, $f\in A$, are $(I[f^{-1}])(J[f^{-1}])$.

Proof. By last corollary, it suffices to see that $\widetilde{IJ}|_\mathcal{B}=(\widetilde{I}\cdot_p\widetilde{J})|_\mathcal{B}$, where we pick $\mathcal{B}$ to be the basis of distinguished open subsets of $X=\operatorname{Spec} A$. For $f\in A$, we have
\begin{align*}
\widetilde{IJ}(D(f))&=(IJ)[f^{-1}]\\
&=(I[f^{-1}])(J[f^{-1}])&\text{by Lemma 5,}\\
&=\widetilde{I}(D(f))\widetilde{J}(D(f))\\
&=(\widetilde{I}\cdot_p\widetilde{J})(D(f)).
\end{align*}
This gives equality of sections. On the other hand, due to the way the tildification of a module and the ideal product presheaf are defined, the restriction maps of $\widetilde{IJ}|_\mathcal{B}$ and of $(\widetilde{I}\cdot_p\widetilde{J})|_\mathcal{B}$ also coincide. Thus $\widetilde{IJ}=\widetilde{I}\widetilde{J}$. $\square$

Corollary 10. Over any scheme, the ideal product sheaf of two quasi-coherent ideal sheaves is quasi-coherent.

Proof. Let $X$ be a scheme and let $\mathcal{I},\mathcal{J}\subset\mathcal{O}_X$ be quasi-coherent ideal sheaves. Suppose $\operatorname{Spec}A=U\subset X$ is open affine. Then $\mathcal{I}|_U\cong\widetilde{I}$ and $\mathcal{J}|_U=\widetilde{J}$ for some ideals $I,J\subset A$ and we have
$$
\begin{align*}
\mathcal{I}\mathcal{J}|_U&=((\mathcal{I}\cdot_p\mathcal{J})|_U)^\#
&\text{(sheafification commutes with restriction)}\\
&=(\mathcal{I}|_U\cdot_p\mathcal{J}|_U)^\#\\
&\cong(\widetilde{I}|_U\cdot_p\widetilde{J}|_U)^\#\\
&=\widetilde{I}\widetilde{J}|_U\\
&=\widetilde{IJ}|_U&\text{by last corollary. }\square
\end{align*}
$$
