I was wondering, if there are any mistakes, in this proof of the extreme value theorem:
Theorem. Let $X$ be a compact set and $f:X\rightarrow\mathbb{R}$, s.t. $f$ is continuous. Then there exists $x\in X$, s.t. for all $y\in X$, $f(y)\leq f(x)$.
Proof. Let $\epsilon>0$, $x\in X$ and $U_x=f^{-1}(-\infty,f(x)+\epsilon)$. As $f$ is continuous, $U_x$ is open. Also, $x\in U_x$. Then $\{U_x\}_{x\in X}$ is an open cover of $X$. As $X$ is compact, there exists $x_1,\dots,x_n\in X$, s.t. that $\{U_{x_k}\}_{1\leq k\leq n}$ is an open cover of $X$.
Let $1\leq m\leq n$, such that $f(x_m)=\max_{1\leq k\leq n}f(x_k)$ and $y\in X$. Then, there exists $1\leq k\leq n$, s.t. that $y\in U_{x_k}$. Then $f(y)<f(x_k)+\epsilon\leq f(x_m)+\epsilon$. As $\epsilon$ was arbitrary, $f(y)\leq f(x_m)$.
Somehow, I am sceptic about this proof, as it seems too simple. Any thoughts?