Degree of sum of integral elements over a UFD Is it possible to generalize Degree of sum of algebraic numbers (especially Pete L. Clark's answer, based on Keith Conrad's answer) 
in the following way:
Let $D$ be a (noetherian) UFD of zero characteristic which is not a field, and let $a$ and $b$ be integral over $D$.
Denote the degree of the minimal polynomial of $a$, $b$, $a+b$ by $n$, $m$, $d$, respectively. Assume that $d=nm$. Is it true that $D[a+b]=D[a,b]$?
What about other conditions (instead of $d=nm$) guaranteeing $D[a+b]=D[a,b]$?; for example (as noted in the above question), the maximum of $n$ and $m$ is a prime number.
Sorry if my question is somewhat trivial.
 A: When you don't work over a field your previous experience with field degrees can break down pretty badly because over a ring that is not a field (even over a ring as simple as $\mathbf Z$) a finite free module can be a submodule of another finite free module with the same rank and the two modules don't have to be the same. The simple property that $K \subset F \subset E$ and $[F:K] = [E:K]$ implies $E = F$ for finite extensions of fields is false when you replace fields with other integral domains. In terms of linear algebra, a subspace of an $n$-dimensional vector space with dimension $n$ must be the whole space, but this isn't generally true when you work with finite free modules over rings other than fields.
A counterexample to your question occurs in the simplest case $m = n = 2$ and $D = \mathbf Z$. Try $a = \sqrt{2}$ and $b = \sqrt{3}$. Although $\mathbf Q(\sqrt{2}+\sqrt{3}) = \mathbf Q(\sqrt{2},\sqrt{3})$, the ring $\mathbf Z[\sqrt{2}+\sqrt{3}]$ is not $\mathbf Z[\sqrt{2},\sqrt{3}]$. In fact, the first ring has index 4 in the second. More generally, if $a$ and $b$ are nonsquares in $\mathbf Z$ such that their ratio $a/b$ is also not a square, then $\mathbf Q(\sqrt{a}+\sqrt{b}) = \mathbf Q(\sqrt{a},\sqrt{b})$ but $\mathbf Z[\sqrt{a}+\sqrt{b}]$ is not $\mathbf Z[\sqrt{a},\sqrt{b}]$: the first ring has index $4|b-a|$ in the second.
I think it is hopeless to extend the property you read about over fields to other kinds of integral domains in any simple way.
A: Take $D=k[x,y]$ ($k$ a field, $x$ and $y$ indeterminates), and $a=x^{1/n}$, $b=y^{1/n}$ for any $m,n\geq2$. Then $D[a,b]\cong k[u,v]/(u^n -x,v^m-y)$. Reducing modulo the ideal $J=(x,y)$ of $D$, we get the $D/J$-algebra $k[u,v]/(u^n ,v^m)$ which cannot be generated by one element, hence is not isomorphic to $D[a+b]\,/\,J\,D[a+b]$. Hence $D[a,b]\not\cong D[a+b]$ as $D$-algebras.
