# Integral closure $\tilde{A}$ is flat over $A$, then $A$ is integrally closed

Question. Let $A$ be an integral domain and $\tilde{A}$ be its integral closure in the field of fractions $K$. Assume that $\tilde{A}$ is a finitely generated $A$-module. I want to prove that if $\tilde{A}$ is flat over $A$, then $A$ is integrally closed.

I thought the following fact would be useful:

Fact: Let $A$ be an integral domain and $K$ be its field of fractions. Also let $B$ be a finitely generated $A$-submodule of $K$. Then $B$ is flat iff $B$ is locally free of rank $1$.

By the above fact, I think we may assume that $\tilde{A}$ is locally free of rank $1$, i.e., $\tilde{A}_{\mathfrak{p}}$ is free of rank $1$ over $A_\mathfrak{p}$ for every prime ideal $\mathfrak{p}$ of $A$. However, I don't think that this would immediately imply that $A=B$ but I don't know how to use the fact that $\tilde{A}$ is the integral closure of $A$.

-

Let $A\subseteq B$ be an extension of integral domains such that $B_{\mathfrak p}=x_{\mathfrak p}A_{\mathfrak p}$ for every prime ideal $\mathfrak p$ of $A$ and some element $x_{\mathfrak p}\in B_{\mathfrak p}$. Then $x_{\mathfrak p}$ is invertible in $B_{\mathfrak p}$ and therefore $B_{\mathfrak p}=A_{\mathfrak p}$. One then gets

$B\subseteq\bigcap\limits_{\mathfrak p} B_{\mathfrak p} =\bigcap\limits_{\mathfrak p} A_{\mathfrak p}=A$.

-
1. If $A\subset B$ is an integral extension and $B$ is flat over $A$, then $B$ is faithfully flat over $A$.
2. If $A\subset B$ are integral domains with the same field of fractions and $B$ is faithfully flat over $A$, then $A=B$.
Remark. This argument shows that the condition "$\tilde{A}$ is a finitely generated $A$-module" is supefluous.