Proof of the equivalence between the set of rational numbers and the union of integers, finite decimals, and repeating (periodic) decimals

Proposition

The set of rational numbers is a closed set, therefore it suffices to prove that the set of reduced proper fractions is equivalent to the union of finite decimals and repeating decimals in \((0,1)\).

Outline of the proof

Conventions

  • Unless otherwise stated, letters in this text are positive integers;
  • When discussing finite decimals and repeating decimals we take \((0,1)\) as the universe by default;
  • \(\perp\) denotes the coprime relation.

Finite decimals

Finite decimals \(\to\) reduced proper fractions

Trivial.

Reduced proper fractions \(\to\) finite decimals

A reduced proper fraction \(\dfrac{p}{q}\) can be written as a finite decimal iff \(q\) has no prime factors other than \(2,5\).

Sketch: If \(q\) has no prime factors other than \(2,5\), write \(q=2^\alpha 5^\beta,\ k=\max \{\alpha,\beta \}\). Multiply numerator and denominator by \(2^{k-\alpha}5^{k-\beta}\) so that the denominator becomes \(10^k\); then \(\dfrac{p}{q}\) becomes a finite decimal. Conversely, if \(q\) has a prime factor other than \(2,5\), those prime factors cannot be canceled because \(p\perp q\); \(q\) can never become a power of \(10\), so \(\dfrac{p}{q}\) cannot be a finite decimal.

Repeating (infinite periodic) decimals

Repeating decimals \(\to\) reduced proper fractions

Any repeating decimal \(x\) can be written in the form

\[x=0.u_1 u_2 \dots u_s\overline{v_1 v_2 \dots v_t}, \]

where \(\overline{v_1 v_2 \dots v_t}\) is the repeating block. For convenience denote \(a=u_1 u_2 \dots u_s,\ b=v_1 v_2 \dots v_t\). Then

\[\begin{aligned} x &= 10^{-s}\times a + 10^{-s}\times b \times\left(10^{-t}+10^{-2t}+10^{-3t}+\cdots\right)\\ &= 10^{-s}\times\left(a + b\times\lim_{n\to\infty}\frac{10^{-t}\times\left(1-(10^{-t})^n\right)}{1-10^{-t}}\right)\\ &= 10^{-s}\times\left(a + b\times\frac{10^{-t}}{1-10^{-t}}\right)\\ &= 10^{-s}\times\left(a + \frac{b}{10^t-1}\right). \end{aligned} \]

(These middle two steps may be informal; this is an outline.) Since \(x\in(0,1)\), this is evidently equivalent to the form of a reduced proper fraction.

Reduced proper fractions \(\to\) repeating decimals

For any reduced proper fraction \(\dfrac{p}{q}\) such that \(q\) has prime factors other than \(2,5\), we aim to construct positive integers \(a,s,b,t\) so that

\[\frac{p}{q}=10^{-s}\times\left(a+\frac{b}{10^t-1}\right) \tag{1} \]

so that we can recover the repeating decimal by reversing the computation.

Because \(s,t\) are the lengths of \(a,b\), we have \(a<10^s,\ b<10^t\) (we allow leading zeros in the decimal form, so we do not require \(a\ge 10^{s-1},\ b\ge 10^{t-1}\)).

Note that \((a,s,b,t)\) is not unique. For example for \(0.1\overline{3}\) the most direct solution is \((1,1,3,1)\), but \((13,2,3333,4)\) also works: one may absorb a digit from the repeating block into the nonrepeating part, and a repeating block \(3\) is equivalent to repeating block \(3333\), etc. Any tuple satisfying

\[\frac{p}{q}=10^{-s}\times a + 10^{-s}\times b\times\left(10^{-t}+10^{-2t}+\cdots\right) \]

is acceptable.

Rewriting \((1)\) yields

\[b=\frac{p}{q}\cdot 10^s\cdot(10^t-1)-a\cdot(10^t-1) \tag{2} \]

which factors as

\[b=(10^t-1)\left(\frac{p}{q}\cdot 10^s - a\right) \tag{3} \]

Condition 1: \(b\) is an integer

From \((2)\), since \(b\) must be an integer and \(p\perp q\), we need

\[q\mid 10^s\cdot(10^t-1). \]

By hypothesis \(q\) has prime factors other than \(2,5\). To ensure divisibility we can allocate all factors \(2,5\) of \(q\) to \(10^s\) and all other prime factors to \(10^t-1\). Formally, let

\[q'=\max\{x: x\mid q,\ 2\nmid x,\ 5\nmid x\} \]

be the part of \(q\) with all factors \(2,5\) removed. Then necessarily

\[\frac{q}{q'}\mid 10^s,\qquad q'\mid 10^t-1. \]

Since \(s\) is chosen by us and may be as large as needed, the first condition is easy to satisfy. For the second condition we need

\[10^t\equiv 1\pmod{q'}. \]

Because \(2\nmid q',\ 5\nmid q'\), we have \(10\perp q'\). This suggests using Euler's theorem: taking \(t=\varphi(q')\) satisfies the congruence. Although this is only a sufficient (not necessary) condition for \(b\) to be an integer, given the nonuniqueness of solutions this is satisfactory.

Condition 2: \(0<a<10^s,\ 0<b<10^t\)

Substituting \((3)\) into \(0<b<10^t\) and rearranging gives

\[0<\frac{p}{q}\cdot 10^s - a < 1 + \frac{1}{10^t-1}. \]

Since \(\dfrac{1}{10^t-1}\) is very small, we may relax the right side to \(1\), obtaining

\[\frac{p}{q}\cdot 10^s - 1 \le a < \frac{p}{q}\cdot 10^s, \]

which automatically satisfies \(a<10^s\).

Thus we may set

\[a=\left\lceil\frac{p}{q}\cdot 10^s\right\rceil - 1. \]

Because \(a>0\) and we also require \(\dfrac{q}{q'}\mid 10^s\), \(s\) cannot be too small. For convenience choose the minimal feasible \(s\):

\[s=\min\left\{x:\ \frac{q}{q'}\mid 10^x,\ \left\lceil\frac{p}{q}\cdot 10^x\right\rceil>1\right\}. \]

(Choosing \(s\) small makes the solution closer to the most direct one where \(a,s\) exactly correspond to the nonrepeating part.)

Now \(a,s,t\) are fixed, and \(b\) is obtained from \((2)\) or \((3)\).

Summary

Set

\[\begin{aligned} & q'=\max\{x: x\mid q,\ 2\nmid x,\ 5\nmid x\},\\ & s=\min\left\{x: \frac{q}{q'}\mid 10^x,\ \left\lceil\frac{p}{q}\cdot 10^x\right\rceil>1\right\},\\ & a=\left\lceil\frac{p}{q}\cdot 10^s\right\rceil-1,\\ & t=\varphi(q'),\\ & b=(10^t-1)\left(\frac{p}{q}\cdot 10^s - a\right). \end{aligned} \]

This construction meets all requirements:

  • \(a,s,b,t\) are positive integers;
  • \(a<10^s,\ b<10^t\);
  • equation \((1)\) holds.

Therefore

\[\frac{p}{q}=0.a\overline{b}. \]


Proof complete. This obviously generalizes to any base.

From the above one deduces a neat corollary: for any integer base \(n>1\) and any reduced proper fraction \(\dfrac{p}{q}\), if \(\dfrac{p}{q}\) has a repeating expansion in base \(n\), then the length of the repeating block must divide \(\varphi(q')\), where \(q'=\max\{x: x\mid q,\ x\perp n\}\).

posted @ 2025-08-23 08:13  lzy20091001  阅读(25)  评论(0)    收藏  举报