Hello I am trying to make sense of some beginner theorems and propositions in number theory. I am wanting to also know if what I am saying is valid or just completely wrong.
I am wanting to show that given some non zero integers m and n,
$$m=p_{1}^{r_1} \times...\times p_{k}^{r_{k}}$$ $$n=p_{1}^{s_1} \times...\times p_{k}^{s_{k}}$$
then gcd(m,n)=$$m=p_{1}^{min({s_1,}{r_1})} \times...\times p_{k}^{min({s_k},r_{k})}$$
Now what I am trying to use is that a|b if and only if when we write them out as products of primes, a and b have all the same primes but its exponents are greater than b for each respectively.
so for d to divide m we must be able to write it as $$d=p_{1}^{q_1} \times...\times p_{k}^{q_{k}}$$ where $$q_{i} \le r_{i}$$ for all $$i \in (1,2,...,k)$$ and similar for d to divide n we must be able to do the same but with $$q_{i} \le s_{i}$$
So now can I simply just do a contradiction type argument, say for example that suppose r_1=5 and s_1=3 $$q_{1} \neq min{s_1,r_1}$$. and say $q_{1}=4$ then d wouldn't divide n and hence not a gcd etc. Does this make sense? ( and similarly for the LCM we do the same but suppose the exponent was not the max)