# On an integral domain, with $(m,n)=1$, $a^m = b^m$ and $a^n = b^n$ implies $a=b$.

An exercise says: Let $R$ be an integral domain, let $m,n\in\mathbb{Z}$ such that $(m,n)=1$, then prove that $a^m = b^m$ and $a^n = b^n$ implies that $a=b$.

I managed to prove it, but without using the fact that we are working on an integral domain:

Because $(m,n)=1$, there exists $r,s\in\mathbb{Z}$ such that $1 = mr + ns$. Now: $$a = a^1 = a^{mr+ns} = (a^{m})^r(a^n)^s = (b^m)^r(b^n)^s = b^{mr+ns} = b^1 = b$$ Q.E.D.

What's faulty with this argument?, there's another version which would use said hypothesis (taking into account that $(a-b)\mid a^n - b^n$ for every $n\in\mathbb{N}-\{0,1\}$)

• I don't think there's anything faulty, maybe just that you didn't explicitly state the fact that because you're in an integral domain, neither $(a^m)^r$ or $(a^n)^s$ are zero-divisors. Same thing with $b$. Perhaps I'm in the wrong about this. – implicati0n Sep 12 '15 at 20:21

In a general ring, $a^{mr+ns} = (a^m)^r(a^n)^s$ does not hold unless $m, r, n$ and $s$ are non-negative: if any of them is negative, then that formula is only valid if $a$ is invertible. If $R$ is an integral domain, then your argument works in the field of fractions of $R$ and gives the result you want.
As noted, there exist $r,s\in\mathbb{Z}$ such that $1 = mr + ns$. Since $m$ and $n$ are positive, exactly one of $r$ or $s$ is negative. WLOG, let $r$ be negative. Then $1+mu=nv$ with $u=-r$ and $v=s$, and now both $u$ and $v$ are positive.
Then $$a\cdot a^{mu}=a^{nv}=(a^n)^v=(b^n)^v=b^{nv}=b\cdot b^{mu}$$ Since $a^m=b^m$, we can cancel $a^{mu}$ on the left and $b^{mu}$ on the right, because we are in a domain. This gives $a=b$.