I'm studying real analysis from Rudin's Principles of mathematical analysis, and I feel confused about some definition in Cauchy sequences and feel like there is a contradiction in some idea, or maybe there isn't because I'm a beginner..
Here I quote the concerned part from Rudin's book:
If $\{p_{n}\}$ is a sequence in $X$ and if $E_{N}$ consists of the points $p_{N}, p_{N+1}, p_{N+2},...,$ it is clear from the two preceding definitions that $\{p_{n}\}$ is a Cauchy sequence if and only if $\lim_{n\to \infty}\ diam\ E_{N}=0$.
and the mentioned preceding definitions are:
Def. A sequence $\{p_{n}\}$ in a metric space $X$ is said to be a Cauchy sequence if for every $\epsilon>0$ there is an integer $N$ such that $d(p_{n}, p_{m})<\epsilon$ if $n\geq N\ and\ m\geq N.$
Def. Let $E$ be a subset of a metric space $X$, and let $S$ be the set of all real numbers of the form $d(p,q)$, with $p,q\in E$. The sup of $S$ is called the diameter of $E$.
According to the first quoted sentence, it means -as I understand- that the distance between the points in the sequence is approaching and converging to $0$ as you increase the index of the sequence to $\infty$.
But doesn't this idea contradict with an example of a Cauchy sequence that does not converge such as a sequence in the space of all rational numbers (e.g. $1/n$ which will never converge in $\mathbb{Q}$)?
How the distances between its elements will converge to zero while the sequence never converges ?
CORRECTION:
$1/n$ will converge in $\mathbb{Q}$, so the correct example should be $1/n$ in $(0, \infty)$ for example which will not converge.
I don't see where is the problem in your specific example (and in fact, there is none):
For instance, for $x_n=\frac{1}{n},$ we have that $\text{diam}(E_N)=\frac{1}{N}$, which clearly goes to $0$. (and, for instance, $1/n$ converges in $\mathbb{Q}$. Not on $(0,\infty)$ though, but $\text{diam}({E}_N)$ is still $1/N$ and still goes to $0$ as it should. Note that we are seeing this now as a sequence of real numbers. (see below)).
The fact that distances are real numbers and that the diameter is defined in terms of $\sup$ entails nothing about completion(s) of the space(s). You only need to know $\mathbb{R}$, which you must already know to define a metric space. Then the suprema (and infima) are taken when you consider the distances (that is, real numbers), not the elements of the space. This can be a little confusing if you work only on examples of $\mathbb{Q}$. For that, remember the maxim:
We already know the existence and elementary properties of the real numbers when we are talking about metric spaces.
You don't even need to know that $\mathbb{R}$ is the completion of $\mathbb{Q}$.
Bottom line: When we analyze the sequence $a_n:=\text{diam}(E_N)$, we are looking at a sequence in $\mathbb{R}$, no matter what space are the $p_n$ from.