Your proof seems very nice to me. You have represented your decimal as a (potentially) reducible rational with $10^n$ as the denominator. Clearly reduction will not introduce any new factors into the denominator so the only factors of the denominators are the factors of $10$, i.e. $2$ and $5$.
The converse is similar. Consider a fraction of the form
$$r=\frac{x}{2^a5^b}$$
If $a=b$ then it is easy to see that we have a terminating decimal with the same digits as $x$ (except shifted of course). If the factors on the bottom are unequal in power, then try to "complete" the $10$ to get a form similar to the previous case. You can then finish off by using the uniqueness of the decimal expansion for a number.
I think the problem is that if you simply state those definitions exactly as they are you'll fall in the problem of not having defined the notion of "a quotient of integers". So the good and cool definition of rationals that solve all of these problems is to introduce one equivalence relation in a certain set. I don't know if you are used to equivalence relations (or even relations at all), so I'll talk about that first.
If you have two sets $A$ and $B$ you can create a relation $R$ between them which is a subset of the cartesian product $R\subset A\times B$. Think for a minute, elements of $A\times B$ are pairs $(a,b)$ with $a\in A$ and $b\in B$, so if $(a,b)\in R$ we are telling that $a$ is in some way related to $b$ and in this case we write $aRb$. Now, an equivalence relation can be introduced between a set and itself to mimic equality, it is usually denoted $\sim$ and satisfies those properties:
- $a\sim a$ (Reflexivity)
- $a \sim b \Longrightarrow b \sim a$ (Symmetry)
- $a \sim b \wedge b \sim c \Longrightarrow a\sim c$ (Transitivity)
In the third one the $\wedge$ symbol means AND. Look now that equality always obeys those three properties. So when we have a set and we want to construct a notion of the objects being equivalent without being equal we use an equivalence relation. Now, given a set $A$, an equivalence relation $\sim$ in $A$ and some element $a \in A$ the set of all other elements of $A$ equivalent to $a$ by $\sim$ is called equivalence class and denoted $\left[a\right]$. The set of all equivalence classes is called the quotient set and denoted $A/\sim$ and although the elements are sets of elements of $A$ we can usually think of $A/\sim$ as just the elements of $A$ with $\sim$ imposed on them.
Now returning to your problem! Given the set $\mathbb{Z}\times (\mathbb{Z}\setminus\{0\})$, in other words, ordered pairs of integers without any pair with $0$ in the second element we introduce the following equivalence relation $\sim$ on the set:
$$(a,b)\sim(a',b') \Longleftrightarrow ab'=a'b$$
Now stop for a while and look what we did! We are almost defining the quocient of integers. If we introduce the notation:
$$\frac{a}{b}=\left\{(a',b') \in \mathbb{Z}\times (\mathbb{Z}\setminus\{0\}) : (a',b')\sim (a,b)\right\}$$
We have exactly what the quotient is: the equivalence class of all those elements $(a,b)$ with the relation imposed. Proving this is really an equivalence relation is a good exercise. Now, look what I've said before: formally we define the quotient using equivalence classes but in practice we simply think of it as the element $(a,b) \in \mathbb{Z}\times(\mathbb{Z}\setminus\{0\})$ with the relation $\sim$ imposed.
Now, we define the set of rationals by:
$$\mathbb{Q}=(\mathbb{Z}\times(\mathbb{Z}\setminus\{0\}))/\sim$$
In other words, the set of rationals is the set of all quotients of integers, recalling that we defined the quotient as that equivalence class. With this your first definition is obviously equivalent (indeed we just made it formal using this thought) and the second is the exact same thing.
I hope this helps you somehow! Good luck!
Best Answer
First off, your definition of rational numbers is correct. So $3/2$ is a rational number, but in the definition it does not say that $p/q$ should be an integer, only that both of $p$ and $q$ should. Rational numbers can have decimals and even an infinite decimals, BUT any rational number's decimals will have a repeating pattern at some point whether it be like $$ \frac23 = 0.666... $$ or $$\frac{92}{111000} = 0.000\hspace{2px}828\hspace{2px}828\hspace{2px}828... $$ or $$\frac32 = 1.500 \hspace{2px} 000 \hspace{2px} 000...$$ The reason why $\sqrt{45}$ is not rational is not because it has decimals. We have that $$\sqrt{45} = \sqrt{5\cdot 9} = \sqrt{5}\sqrt{9} = 3\sqrt{5},$$ so $\sqrt{45}$ must be irrational if $\sqrt{5}$ is irrational. In fact it is known that $\sqrt{p}$ for all primes $p$ is irrational such as $p=5$, see e.g. this.
Therefore we can say that $\sqrt{45}$ is irrational.
To see why the product of a (non-zero) rational number and an irrational number is irrational, see this.