The Bezout Lemma in the integers states that
For any $a, b \in\mathbb Z$, let $g = \gcd(a, b)$, There exists $x, y$ such that $ax+by = g$.
This can be generalized to a commutative ring that is a principal ideal domain (PID).
For any $a, b$ in a PID $R$, let $g = \gcd(a, b)$, which is defined by multiplying the common factors in their unique factorization (hence it is defined up to associates), then:
- There exists $x, y$ such that $ax+by = g$.
- The ideals generated by $a, b$ and $g$ respectively are the same: $(a, b) = (g)$
For the above setup, can we say $\gcd(x, y) = 1$? I think this is true (at least in the integers), but I got stuck when I tried to prove it.
My Proof Attempt: Say by contradiction that $\gcd(x, y) \ne 1$, then I can write $x = q\bar x, y = q\bar y$ for some non-unit $q$, then $$ax+by = g \Leftrightarrow q(a\bar x + b\bar y)=g$$ Obviously the element $a\bar x+b \bar y \in(a, b)=(g)$...
To complete the proof I need the fact that since $(a, b) = (g)$, $q$ has to be a unit. How can I do this? Thank you.