Let $R$ be a Dedekind domain. Let $A$ and $B$ be two finitely generated domains over $R$. Assume that for every maximal ideal $\mathfrak{p}\subset R$ the $R\_{\mathfrak{p}}$-algebras $A\_{\mathfrak{p}}$ and $B\_{\mathfrak{p}}$ are isomorphic. Are $A$ and $B$ isomorphic?



Locally isomorphic algebras over a Dedekind domain
**Counterexample.** Let $R$ be a Dedekind domain with $\operatorname{Cl}(R) \neq 0$. Let $I \subseteq R$ be an ideal that is not principal (in algebraic geometry language, let $\mathscr L$ be a nontrivial line bundle), and let $J = R$ be the trivial ideal (let $\mathcal O$ be the trivial line bundle). Then $I\_{\mathfrak p} \cong R\_\mathfrak p \cong J\_\mathfrak p$ for every $\mathfrak p$.


Then $A = \operatorname{Sym}^\*(I^\vee)$ and $B = R[t] = \operatorname{Sym}^\*(J^\vee)$ are not isomorphic. Geometrically, this is saying that the geometric vector bundles $\mathbf V(\mathscr L) = \operatorname{Spec}(\operatorname{Sym}^\* \mathscr L^\vee)$ and $\mathbf V(\mathcal O) = \mathbf A^1\_R$ are not isomorphic as $R$-schemes. For example, $\mathbf V(\mathcal O)$ has a pair of disjoint sections $0, 1 \colon \operatorname{Spec} R \rightrightarrows \mathbf V(\mathcal O)$, but a nontrivial line bundle $\mathscr L$ does not have two disjoint sections (the difference gives a nowhere vanishing section, which is an isomorphism $\mathcal O \stackrel\sim\to \mathscr L$). But they are locally isomorphic at every prime since every vector bundle over a local ring is trivial.


(In principle you could unwind this argument algebraically if you want: $B$ has a surjection to $R \times R$ by $f(t) \mapsto (f(0),f(1))$, but $A$ does not admit such a surjection. Basic geometric operations like 'take the difference of two sections' and 'a nowhere vanishing section is an isomorphism $\mathcal O \stackrel\sim\to \mathscr L$' become Hopf algebra stuff, so you have to do some work.)


**Remark.** If you want an example over a PID, just take any PID $R$ that has a finite extension $R \subseteq R'$ of Dedekind domains such that $\operatorname{Cl}(R') \neq 0$ (such an extension exists in many cases, e.g. if $R = \mathbf Z$ or $R = k[t]$ for any field $k$). Take $I, J \subseteq R'$ and $R' \to A$ and $R' \to B$ as above. They are still isomorphic around any $\mathfrak p \subseteq R$, because a line bundle on $\operatorname{Spec} R'$ is trivialised on the finite set of primes above $\mathfrak p$.


Given an isomorphism $\phi \colon A \stackrel\sim\to B$ of $R$-algebras, the integral closure $R'$ of $R$ in $A$ and $B$ is preserved by $\phi$, hence up to composing with an $R$-automorphism of $R'$ we may assume $\phi$ is an $R'$-algebra isomorphism, which is impossible by the argument above.


