# Proving that $y_n$ converges to $\{x_n : n\in \mathbb{Z}^+\}$.

I am trying to prepare for a quiz and am really stuck on this question. Any help with this would be greatly appreciated!

Let $\{x_n\}$ be a sequence of real numbers and let $y_n = \max \{x_1, x_2, \ldots , x_n\}$ for each positive integer $n$.

Suppose that $\{x_n\}$ is bounded. Prove that $\{y_n\}$ converges to $\sup{x_n : n \in \mathbb{Z}^+}$.

Hint: $\{y_n\}$ is bounded and monotone increasing, hence convergent. Now just show that it converges to the right value.
Additional hint: Suppose $M$ is the supremum of the $\{x_n\}$, and $L$ is the limit of $\{y_n\}$. If $L<M$, get a contradiction. If $L>M$, get a contradiction.
Since $y_{n+1}$ is the maximum of a larger set than $y_n$, we have $$y_{n+1}\ge y_n\tag{1}$$ Since $y_n\in\{x_k:k\in\mathbb{Z}^+\}$, we have $$y_n\le\sup\{x_k:k\in\mathbb{Z}^+\}\tag{2}$$ For any $\epsilon\gt0$, there is an $n_\epsilon\in\mathbb{Z}^+$ so that $0\le\sup\{x_k:k\in\mathbb{Z}^+\}-x_{n_\epsilon}\le\epsilon$, which implies that for $n\ge n_\epsilon$, $$0\le\sup\{x_k:k\in\mathbb{Z}^+\}-y_n\le\epsilon\tag{3}$$ which says that $$\lim_{n\to\infty}y_n=\sup\{x_k:k\in\mathbb{Z}^+\}\tag{4}$$