How to represent 0 as rational number?
$0/0$ is not legitimate, $0/\text{const}$ should be good enough, but what is the right value of const? $0/1$ works for a lot of computational cases, but only on intuitive.
How to represent 0 as rational number?
$0/0$ is not legitimate, $0/\text{const}$ should be good enough, but what is the right value of const? $0/1$ works for a lot of computational cases, but only on intuitive.
There is no single right value. The rational number $0$ can be represented as the quotient of an integer by a non-zero integer in infinitely many ways: $0=\frac 0d$ ($d\in\mathbb{Z}\setminus\{0\}$). Choosing $d=1$ is a natural choice: every rational number can be represented in one and only one way as $\frac nd$ with $n\in\mathbb Z$, $d\in\mathbb N$ and $\gcd(n,d)=1$. In the case of $0$, that representation is $\frac01$.
What is wrong with $$ \cdots=\frac{0}{-2}=\frac{0}{-1}=0=\frac{0}{1}=\frac{0}{2}=\frac{0}{3}=\cdots \ ?$$ You have an infinity of perfectly defined representations...
$0/1$ is generally considered to be the canonical form. This is important for the definition of the "rational ruler" or modified Dirichlet function:
$$ f(x) = \begin{cases} 0 & x \in \Bbb{R}\setminus\Bbb{Q} \\ 1/q & x = p/q \mbox{ in lowest terms}\end{cases}$$
and I'm sure in many other situations too.
As other answers have mentioned, there are many equivalent representations of $0$ in the rational numbers.
A formal way to define rational numbers is the following:
Consider the set - $$S = \{ (x,y) \in \textbf{Z} \times \textbf{Z} \quad |\quad y \neq 0\} . $$
The each element $q$ of the rational numbers Q is an equivalence class $\bar{s} \in S/\equiv_{\sim}$ under the equivalence relation: $$(a,b)\sim (c,d) \iff ad = bc$$ Or equivalently in Q: $$ad = bc\iff \frac{a}{b}= \frac{c}{d}$$ Since $0 \cdot b = 0 \cdot d = 0$ for any $d, c \in \textbf{Z}$, we can represent $0 \in \textbf{Q} $ as $(0,x)$ for any $x \in \textbf{Z}-\{0\}$.
You can do this procedure for any integral domain $R$, and it represents the field of fractions of $R$, denoted commonly as $Quot(R)$.