Given a UFD $R$, is every flat ideal in $R$ principal? If not, is it true for finitely generated flat ideals, or if $R$ is Noetherian?
Examples showing plausibility:
The non-principal ideal $(x,y)$ is not flat in $K[x,y]$ for any field $K$. A proof can be seen in Example 2.16 at Keith Conrad's pdf file.
Similarly, the non-principal ideal $I=(2,x)$ in $\mathbb{Z}[x]$ is not flat either. Indeed, the multiplication map $I \otimes_{\mathbb{Z}[x]} I \to I$ is not injective.
To see why, we need to think about linear maps out of $I$. The kernel of the map $\mathbb{Z}[x] \oplus \mathbb{Z}[x] \to I$ that sends $(f,g)$ to $2f+xg$ is precisely the submodule generated by $(x,-2)$ (because $(2) \cap (x)=(2x)$).
So, for any $\mathbb{Z}[x]$-module $M$, a linear map $I \to M$ is equivalently a pair $(m,n)$ of elements of $M$ for which $xm-2n=0$. From this, one can conclude that a bilinear map from $I \times I$ to $M$ is equivalently a quadruple $(m,n,p,q)$ of elements of $M$ for which the following four equations hold:
- $xm-2n=0$
- $xp-2q-0$
- $xm-2p=0$
- $xn-2q=0$
Now, let $M$ be the quotient $\mathbb{Z}[x]/I$ and consider the quadruple $(0,1,0,0)$. Then, the above equations certainly hold (everything is annihilated by both $x$ and $2$), but the middle two components are not equal (because $1 \notin I$). So, there is a bilinear map $B:I \times I \to M$, $(2f+xg,2h+xk) \mapsto fk$, for which $B(2,x)=1$ while $B(x,2)=0$. So, $2 \otimes x \ne x \otimes 2 \in I \otimes_{\mathbb{Z}[x]} I$, while $2 \cdot x=x \cdot 2$, which means that the multiplication map $I \otimes_{\mathbb{Z}[x]} I \to I$ is not injective. $\square$
The above proof only used the facts that $(2) \cap (x)=(2x)$ and $1 \notin (2,x)$. In general, for any two coprime elements $a$ and $b$ of a UFD, one of their lcms (unique up to associates) is $ab$, and so $(a) \cap (b)=(ab)$. So, if $(a,b)$ is a proper ideal, then a similar proof shows that it cannot be flat.
According to this paper https://www.mdpi.com/2227-7390/8/2/247/htm, every flat ideal in a UFD is indeed principal (see the paragraph between Corollary 4 and Proposition 3)