$f:[a,b] \rightarrow R$ is continuous, then $f$ is uniformly continuous.
Proof from my lecture:
Suppose $f$ is not uniformly continuous. Then, $\exists \varepsilon$ such that $\forall \delta$, $\exists x,y \in [a,b]$ with $|x-y|<\delta$, and $|f(x)-f(y)|<\varepsilon$.
Let $\delta = 1/n$ for $n\in Z^+$, and $x_n,y_n \in [a,b]$. Then, $|x_n-y_n|<1/n.$ By Bolzano theorem, there exists a subsequence $x_{n_k}$ such that $\lim_{k \to \infty} x_{n_k} = x$. In addition,$y_{n_k}$ has a subsequence $y_{n_{k_l}}$ such that $\lim_{l \to \infty} y_{n_{k_l}}=y.$
Then, $|x_{n_{k_l}}-y_{n_{k_l}}|<1/n_{k_l}\le 1/l$.So if we take a limit from $l$ to $\infty$, we get $x=y$.
My question is why do we use $y_{n_{k_l}}$ instead of $y_{n_{k}}$? Since the domain is bounded, $y_{n_k}$ is also convergent subsequence, but my lecturer uses another subsequence of a subsequence and I feel it makes the proof more complicated. But, I guess there must be a reason for this. Could you tell me what am I missing here?
Thank you in advance.
Based on the comments below your question, it looks like it boils down to a confusion about what Bozano's theorem guarantees.
This is not saying that if I get two bounded sequences $(a_n)_n$ and $(b_n)_n$, by applying Bolzano to each of them separately I will get the same sequence of indices $n_1 < \dots < n_k<\dots$ such that $(a_{n_k})_k$ and $(b_{n_k})_k$ are both convergent. The subsequence of indices may not be the same, and that is why your teacher applies Bolzano's theorem to a subsequence of $(y_n)_n$ instead of directly to $(y_n)_n$. (But you seem to be confused by the notation $(n_k)_k$ -- it may be worth going and see what it actually means, i.e., the definition of a subsequence.)
An example: the sequences $(a_n)_n$ and $(b_n)_n$ defined by $a_n = (-1)^n$ and $b_{2n}=b_{2n+1}=(-1)^n$ are both bounded. If you apply Boznao's theorem to the first, you may get $(n_k)_k = (2k)_k$ (even indices), as $(a_{2n})_n$ is a constant and hence convergent subsequence of $(a_n)_n$.
But $(b_{2n})_n$ is not a convergent subsequence of $(b_n)_n$. Appplying Bolzano to $(b_n)_n$ may have given you another sequence of indices, e.g. $(n_k)_k = (4k)_k$ (as $(b_{4n})_n$ is a convergent subsequence of $(b_n)_n$).