So I'm working on some problems from a book and my proof doesn't seem right to me because I'm not sure if theorems in $\mathbb{Z}$ work since I use an element from $\mathbb{Q}$. Anyhow the question is as follows:
Let $f(x)=a_0+a_1x+...+a_rx^r$. Suppose $m/n \in \mathbb{Q}$ with $(m,n)=1$. If $m/n$ is a root of $f(x)$, then $m|a_0$ and $n|a_r$.
My proof is something along the lines of the following:
Let $m/n$ be a root of f(x). We then have $0=f(m/n)=a_0+a_1(m/n)+...+a_r(m/n)^r$. By some algebra we have $-na_0=m(a_1+...+a_r(m/n)^{r-1})$. Clearly $m|-na_0$, but (m,n)=1 and so $m|a_0$. To show that $n|a_r$ we would keep doing that algebra and see that $-(na_0/m)-(na_1/m)-...-(na_{r-1}/m)=a_r$....
I would proceed in the same way as the first half and show that $n|ma_r$ but (m,n)=1.
Does this work? Or would it fall apart because m/n is in $\mathbb{Q}$?