I am interested in the following innocent looking statement:



> 
> Let $A \leftarrow R \rightarrow B$ be two homomorphisms of commutative rings. Assume that their kernels consist of nilpotent elements. Then, the kernel of $R \to A \otimes\_R B$ consists of nilpotent elements, too.
> 
> 
> 


Geometrically, this means that if $X \to S$ and $Y \to S$ are two quasi-compact morphisms of schemes with dense image, then the image of $X \times\_S Y \to S$ is dense, too.


We can prove this as follows (using the axiom of choice many times): It suffices to show that the kernel of $R \to A \otimes\_R B$ is contained in any minimal prime ideal $P \subseteq R$. Since the kernel of $R \to A$ is contained in $P$, we have $A\_P \neq 0$, and likewise $B\_P \neq 0$. Choose prime ideals in these rings. Their preimages are prime ideals $I \subseteq A$, $J \subseteq B$ such that $I \cap R = P$ (since $I \cap R \subseteq P$ and $P$ is minimal) and $J \cap R = P$. The kernel of $R \to A \otimes\_R B$ is contained in the kernel of $R \to Q(A/I) \otimes\_{Q(R/P)} Q(B/J)$, which equals the kernel of $R \to Q(R/P)$, i.e. $P$, since $Q(R/P) \to Q(A/I) \otimes\_{Q(R/P)} Q(B/J)$ is injective.


In fact, one can prove this statement in $\mathsf{ZF}$, i.e. the axiom of choice is not necessary. The trick is to use filtered colimits (or the explicit construction of the tensor product) to reduce to the case that $R$ is of finite type over $\mathbf{Z}$, hence countable, and to the case that $A,B$ are finite type over $R$, hence countable too. In Kostas Hatzikiriakou, "Minimal Prime Ideals and Arithmetic Comprehension", it is proven (in a fragment of $\mathsf{ZF}$) that every non-trivial countable commutative has a minimal prime ideal. Moreover, $\mathsf{ZF}$ proves that vector spaces are flat: Again, using filtered colimits, it suffices to prove this for finitely generated vector spaces, but these are free and hence flat. This proves in particular that the tensor product of two non-trivial vectors is a non-trivial vector. In particular, $Q(R/P) \to Q(A/I) \otimes\_{Q(R/P)} Q(B/J)$ is injective.


The proof is still not very satisfying. We have a rather elementary statement about tensor products of algebras, do we really need prime ideals? Is it possible to simplify the proof further? Also notice that the proof above is not constructive, i.e., it uses the law of the excluded middle.


**Question.** Is there a constructive proof of the statement? If yes, how does it look like?


Notice that we may assume that $R,A,B$ are reduced. In that case, the question becomes: If $R \to A$ and $R \to B$ are injective, why is $R \to A \otimes\_R B$ injective, too? The special case that $R$ is a field was already discussed above, and this part was constructive, I guess.


I have recently asked a [similar](https://mathoverflow.net/questions/249868) yet broader question. I am not sure how to handle minimal prime ideals here. There is just a very short chapter about minimal prime ideals in the [book](http://hlombardi.free.fr/CACM.pdf) by Lombardi and Quitté on constructive commutative algebra, and they "only" apply this to give a constructive proof of Traverso-Swan's theorem characterizing seminormal rings. But I would prefer a constructive proof of the statement which is really down-to-earth and can be therefore understood without any prerequisites on constructive mathematics (like the proof for the case that $R$ is a field).


*Added 1.* Using localization at some element in the kernel, it suffices to prove $A \otimes\_R B = 0 \Rightarrow R = 0$ when $R \to A$, $R \to B$ are as above. Therefore, a related statement is the following: If $M,N$ are finitely generated $R$-modules, then it is known $\sqrt{\mathrm{Ann}(M \otimes\_R N)} = \sqrt{\mathrm{Ann}(M)+\mathrm{Ann}(N)};$ this follows from $\mathrm{supp}(M \otimes\_R N) = \mathrm{supp}(M) \cap \mathrm{supp}(N)$ as subsets of $\mathrm{Spec}(R)$. In particular, $\mathrm{Ann}(M) \subseteq \sqrt{0}$ and $\mathrm{Ann}(N) \subseteq \sqrt{0}$ imply $\mathrm{Ann}(M \otimes\_R N) \subseteq \sqrt{0}$, thus $M \otimes\_R N = 0 \Rightarrow R =0$. Again, I don't know a constructive proof. (But this probably won't help here since $A,B$ may just be assumed to be finitely generated $R$-algebras, not finitely generated $R$-modules).


*Added 2.* Here is a first simplification: We may assume that $R$ is reduced. Let $P$ be a minimal prime ideal of $R$. Then $R\_P$ is a reduced zero-dimensional local ring, i.e. a field. The $R\_P$-algebras $A\_P$ and $B\_P$ are non-trivial, hence $R\_P \to A\_P \otimes\_{R\_P} B\_P$ is injective. It follows that the kernel of $R \to A \otimes\_R B$ is contained in the kernel of $R \to R\_P$, which is $P$. Now, Lombardi and Quitté write in their book in section XIII.7:



> 
> "It is a fact that the use of minimal prime ideals in a proof of classical mathematics can in general be made innocuous (i.e. constructive) by using $A\_{\mathrm{min}}$".
> 
> 
> 


Here, $A\_{\mathrm{min}}$ denots a rather peculiar looking commutative ring constructed in Theorem 7.8. Does this mean that we can somehow prove that $R\_{\mathrm{min}} \to A\_{\mathrm{min}} \otimes\_{R\_{\mathrm{min}}} B\_{\mathrm{min}}$ is injective? This would suffice since $R \to R\_{\mathrm{min}}$ is injective when $R$ is reduced.


*Added 3.* Here is another proof, which seems to be more suitable for constructivization. We may assume that $A,B$ are of finite type over $R$ with $A \otimes\_R B = 0$ and that $R$ is reduced, the goal is $R=0$. By [generic freeness](http://stacks.math.columbia.edu/tag/051Z), there is some open dense subset $U \subseteq \mathrm{Spec}(R)$ such that $A\_f$ is free over $R\_f$ (hence, flat) for every $D(f) \subseteq U$. It follows that $A\_f = A\_f \otimes\_{R\_f} R\_f$ injects into $A\_f \otimes\_{R\_f} B\_f = 0$, i.e. $A\_f=0$. Since $R \to A$ is injective, this means $f=0$. This shows $U=\emptyset$, and therefore $R=0$. Theorem 2.45 in "Computational Methods in Commutative Algebra and Algebraic Geometry" by Wolmer Vasconcelos seems to be a constructive proof of Generic Flatness at least for Noetherian domains $R$. So we would have to generalize this to reduced commutative rings $R$, and avoid the usage of the prime spectrum.



Constructive proof that a kernel consists of nilpotent elements
This answer provides a scheme how to construct a constructive proof, though I'm still working to actually explicitly extract the constructive proof, so please don't accept the answer just yet. (Update: See below.) We'll prove the following statement:



> 
> Let $R$ be a reduced ring. Let $A$ be a finitely generated $R$-module and let $B$ be an arbitrary $R$-module. Let injections $\alpha : R \to A$ and $\beta : R \to B$ be given. Then the canonical map $R \to A \otimes\_R B$ is injective.
> 
> 
> 


The general case, with $A$ not necessarily being finitely generated, follows formally from this case, since $A$ is the directed union of its finitely generated submodules which contain the image of $\alpha$ and tensoring with $B$ commutes with colimits.


We'll prove this statement by working internal to the little Zariski topos of $R$, that is the topos of sheaves on $\operatorname{Spec}(R)$, as explained in [these notes](http://rawgit.com/iblech/internal-methods/master/notes.pdf). In this topos $R$, $A$, and $B$ have mirror images $R^\sim$, $A^\sim$, and $B^\sim$ such that $R \to A \otimes\_R B$ is injective if and only if $R^\sim \to A^\sim \otimes\_{R^\sim} B^\sim$ is a monomorphism in the topos. In order to ultimately be able to extract a fully explicit, constructive, non-toposophic proof, the little Zariski topos needs to be defined in a constructibly sensible way; but this is possible. I presume that the extracted proof will look convoluted at first, but it's possible that it could be simplified even to the point that one wonders why one didn't see it without help of tools.


The point is that working internal to that topos simplifies the situation to the easiest case, namely that the base ring is a field, such that the proof is almost trivial. This is because the internal universe of the Zariski topos has the following peculiarities:


* The ring $R^\sim$ is a field in the sense that $1 \neq 0$ and $\forall x {:} R^\sim. \neg(\text{$x$ invertible}) \Rightarrow x = 0$.
* From this it follows that $\forall x{:}R^\sim. \neg\neg(x = 0) \Rightarrow x = 0$. This is a huge simplification, since it's much easier to verify doubly negated statements: In order to show that $\neg\neg\varphi \Rightarrow \neg\neg\psi$, it suffices to show that $\varphi \Rightarrow \neg\neg\psi$. Note that this is really a peculiarity of the Zariski topos. The analogous statement $\forall x \in R. \neg\neg(x = 0) \Rightarrow x = 0$ is in general not intuitionistically justified.
* Any finitely generated module over $R^\sim$ is *not not* finite free. (There does *not not* exist a minimal generating family. The usual proof shows that such a family is linearly independent and therefore a basis.)


Without further ado, here is the internal proof. Let $r:R^\sim$ such that $r \cdot (\alpha(1) \otimes \beta(1)) = 0$ in $A^\sim \otimes B^\sim$. We want to verify that $r = 0$, but it suffices to verify that $\neg\neg(r = 0)$. Therefore we may assume that $A^\sim$ is finite free. Let $(x\_1,\ldots,x\_n)$ be a basis. Write $\alpha(r) = \sum\_i r\_i x\_i$. Since $A^\sim \otimes B^\sim \cong (B^\sim)^n$, it follows that $r\_i \beta(1) = 0$ for all $i$. Since $\beta$ is injective, it follows that $r\_i = 0$ for all $i$. Thus $\alpha(r) = 0$. Since $\alpha$ is injective, it follows that $r = 0$.


**Update:** Here is a fully explicit constructive proof, obtained by working with @HeinrichD in the comments to unravel the scheme sketched above. Unfortunately it's rather convoluted and not particularly memorable; I hope that it can be simplified.


**Lemma 1.** Let $R$ be a ring. Let $A$ be an $R$-module with generating family $(x\_1,\ldots,x\_n)$. Assume that the only $g \in R$ such that one of the $x\_i$ is an $R[g^{-1}]$-linear combination of the others in $A[g^{-1}]$ is $g = 0$. Then $A$ is free with $(x\_1,\ldots,x\_n)$ as a basis.


*Proof:* Let $\sum\_i r\_i x\_i = 0$. Let $i$ be arbitrary. In $A[r\_i^{-1}]$, the generator $x\_i$ is a linear combination of the others. By assumption it follows that $r\_i = 0$.


**Lemma 2.** Let $R$ be a reduced ring. Let $A$ be a finitely generated $R$-module. Assume that the only $f \in R$ such that $A[f^{-1}]$ is a free $R[f^{-1}]$-module is $f = 0$. Then $R = 0$.


*Proof:* By induction on the length $n$ of a given generating family $(x\_1,\ldots,x\_n)$ of $A$. Note that we'll apply the induction
hypothesis not to the ring $R$, but to some localizations of $R$.


If $n = 0$, then $A = 0$. Thus we can finish by using the assumption for $f := 1$.


If $n \geq 1$, then we want to verify the assumptions of Lemma 1.
Thus let $g \in R$ be given such that one of the $x\_i$ is an $R[g^{-1}]$-linear combination of the others in $A[g^{-1}]$. Therefore the $R[g^{-1}]$-module $A[g^{-1}]$ can be generated by $n-1$ elements. By the induction hypothesis (applied to the [reduced](https://math.stackexchange.com/questions/8150/does-localization-preserve-reducedness) ring $R[g^{-1}]$ and its module $A[g^{-1}]$, which are easily seen to satisfy the assumptions of the induction hypothesis) it follows that $R[g^{-1}] = 0$ (in this step the assumption enters for many different $f$'s). Therefore $g = 0$.


Thus, by Lemma 1, $A$ is free. We can finish by using the assumption for $f := 1$.


**Corollary.** Let $R$ be a reduced ring. Let $A$ be a finitely generated
$R$-module. Let $B$ be an arbitrary $R$-module. Let injections $\alpha : R \to
A$ and $\beta : R \to B$ be given. Then the canonical map $\alpha \otimes \beta : R \to A \otimes\_R B$
is injective.


*Proof.* Let $r \in R$ such that $r \cdot (\alpha(1) \otimes \beta(1)) = 0$. To verify that $r = 0$, we'll apply Lemma 2 to the ring $R' := R[r^{-1}]$ and the $R'$-module $A' := A[r^{-1}]$. Let therefore $f \in R'$ be given such that $A'[f^{-1}]$ is a free $R'[f^{-1}]$-module. The canonical map $R'[f^{-1}] \to A'[f^{-1}] \otimes B[r^{-1}][f^{-1}]$ is injective (the easy case!). Therefore $r = 0$ in $R'[f^{-1}]$. Since $r$ is invertible in $R'$, it follows that $R'[f^{-1}] = 0$ and therefore $f = 0$.


