Let $n,m$ be coprime so that $x|m$, $y|n$, $x,y \in \mathbb Z$. Prove $(x,y)=1$
This proof was shown in class, and I'm not certain of the last step:
$x|m$, $y|n$ so there are $a,b \in \mathbb Z$ so that $m=ax$ and $n=by$.
We know $(m,n)=1$ so there are $s,t \in \mathbb Z$ so that $$sn+tm=1 \\s(ax)+t(by)=1 \\(sa)x+(tb)y=1$$
Lets say $p=sa$, $q=tb$ so we get: $$px+qy=1$$
Why is the last step true? The claim that if d=$(x,y)$ then there are integers $c,e$ so that $d=cx+ey$ isn't true bothways, is it?