Is it possible to generalize [Degree of sum of algebraic numbers](https://mathoverflow.net/questions/26832/degree-of-sum-of-algebraic-numbers?rq=1) (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.



Degree of sum of integral elements over a UFD
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.


