Logic and adjunctions with ideals in ring theory Studying ring theory, I remarked two things in the context of ideals that look like some interpretation of a logic in the ideals of a ring (I never studied this subject so my formulation is quite imprecise).
First, there is the "comma operation" on ideals, characterized by $J ⊆ I:S ⇔ JS ⊆ I$.
And then there is the "content of a polynomial ideal" construction. This came from studying Gauss' lemma as stated in the general version on wikipedia. Let us define the content $\DeclareMathOperator{\cont}{cont}\cont(U)$ of an ideal $U ⊆ R[x]$ as the ideal generated by all the coefficients of all the elements of $U$.
Then we get, for any ideal $I ⊆ R$, the equivalence of $\cont(U) ⊆ I$ and $U ⊆ I[X]$. We also have this sort of "universal property" of the product of ideals, relatively to primes : $IJ ⊆ \mathfrak{p} ⇔ I ⊆ \mathfrak{p} ∨ J ⊆ \mathfrak{p}$ for any ideals $I,J$ and any prime ideal $\mathfrak{p}$.
Gauss' lemma: $\sqrt{\cont(UV)} = \sqrt{\cont(U) \cont(V)}$.
In words, "$U ↦ \cont(U)$ preserves products relatively to prime ideals".
Proof. Use the "adjoints preserve limits" trick, remarking that $\mathfrak{p}[x]$ is prime as soon as $\mathfrak{p}$ is.
$$\begin{align*}\cont(UV) ⊆ \mathfrak{p} &⇔ UV ⊆ \mathfrak{p}[x]\\
&⇔ U ⊆ \mathfrak{p}[x] ∨ V ⊆ \mathfrak{p}[x]\\
&⇔ \cont(U) ⊆ \mathfrak{p} ∨ \cont(V) ⊆ \mathfrak{p}\\
&⇔ \cont(U) \cont(V) ⊆ \mathfrak{p}\qquad\qquad\square\end{align*}$$
As a side note, it also makes me think of the theory of Hilbert spaces where one can prove that a map with an adjoint is additive with again the same trick : if $\newcommand{\inprod}[2]{\langle #1, #2 \rangle}\inprod{f(x)}{y} = \inprod{x}{g(y)}$ for all $x,y$, then $\inprod{f(a+b)}{y} = \inprod{a+b}{g(y)} = \inprod{a}{g(y)} + \inprod{b}{g(y)} = \inprod{f(a) + f(b)}{y}$. So by the analog of the Yoneda Lemma (injectivity of the map to the dual in the case of Hilbert space ; we also have density as in category theory...), we get that $f(a+b) = f(a)+f(b)$.
The product of ideals looks like a cartesian product and the "comma operation" looks like an internal hom. We can interpret morphisms from $S$ to $I$ as elements $x$ of the ring such that $xS ⊆ I$. For instance we have $I ⊆ J$ if and only if $(1) ⊆ J:I$. There must be something going on, it looks too much like things we do in logic with for instance the interpretation of intuitionistic logic with topological spaces.
What is going on and how to interpret more precisely Gauss' lemma, prime ideals, etc. in this context? Is there any reference about this?
 A: The collection of ideals forms a poset, and hence a category, under inclusion. The product of ideals is not the categorical product (that would be intersection), but it is a monoidal structure, and the comma operation is an internal hom in the monoidal sense, giving a closed monoidal structure. (Note that if the monoidal structure were cartesian we would have a Heyting algebra, which give semantics for intuitionistic logic.) In fact we have a bit more, namely a quantale structure. There is a kind of "quantum logic" related to these, hence the name; see linear logic. 

I like your approach to Gauss's lemma; it's not one I've seen before. Let me see if I can say anything relevant to it. In general, if $f : R \to S$ is a map of commutative rings, we get a pullback / inverse image operation 
$$f^{-1} : \text{Idl}(S) \ni I \mapsto f^{-1}(I) \in \text{Idl}(R)$$ 
sending an ideal $I \subseteq S$ to the inverse image $f^{-1}(I) \subseteq R$; this is ideal contraction. Contraction, regarded as a functor between categories (posets), always has a left adjoint
$$f_{\ast} : \text{Idl}(R) \ni J \mapsto (f(J)) \in \text{Idl}(S)$$
given by the ideal generated by the direct image; this is ideal extension. Applied to $f : R \to R[X]$, ideal extension sends an ideal $I \subseteq R$ to the ideal $I[X] \subseteq R[X]$, so your observation about contents says that in this case ideal extension has a further left adjoint given by the content operation. I don't know off the top of my head when this happens in general; it probably suffices for $S$ to be free over $R$, and perhaps it suffices for $S$ to be flat over $R$. 
