I am trying to understand the equivalence between two definitions of an upper semicontinuous real-valued function over a compact normed space $X$.
Suppose that for every $y$ in some set $Y$, the function $f(x,y): X\times Y \to \mathbb{R}$ is upper semicontinuous in $x$ over $X$.
Using the usually used definition this means
for every fixed $y \in Y$ and every sequence $\{x_k\}$ in $X$ such that $x_k \to x$, the following inequality holds \begin{equation} \underset{k\to \infty}{\lim\sup} f(x_k,y) \leq f(x,y) \end{equation}
The question is how to show that this definition is equivalent to the following:
for every fixed $y \in Y$, all $x \in X$, and some $\epsilon >0$ the following convergence holds \begin{equation} \sup_{\|\tilde{x} - x \|<\epsilon} f(\tilde{x},y) \to f(x,y) \;\;\; \text{ as } \;\;\; \epsilon \to 0 \end{equation} where $\|\cdot\|$ is some norm defined over $X$.
I have read a formal topological definition on Wikipedia that seems close to the second definition above. In the topological definition, one fix $\epsilon$ first and then the neighborhood exists such that the equality shown there holds. It seems that the second definition above requires the reverse; i.e. as we let $\epsilon$ go to zero, the neighborhood becomes a singleton and the inequality becomes an equality.
Any clarification or a citation to a reference where this is clarified ia appreciated
Suppose that the second definition holds. Take a sequence $(x_n)_{n\in\mathbb N}$ of points of $X$ convergeng to $x$. Now, take $\varepsilon'>0$. Then there is a $\varepsilon>0$ such that$$\left\lvert\sup_{\lVert\tilde x-x\rVert<\varepsilon}f(\tilde x,y)-f(x,y)\right\rvert<\varepsilon'.$$Since $\lim_{n\to\infty}x_n=x$, you have $\lVert x_n-x\rVert<\varepsilon$ if $n\gg1$. But then$$f(x_n,y)-f(x,y)\leqslant\sup_{\lVert\tilde x-x\rVert<\varepsilon}f(\tilde x,y)-f(x,y)<\varepsilon'.$$Since this inequality occurs when $n$ is large enough, $\limsup_{n\to\infty}f(x_n,y)-f(x,y)\leqslant\varepsilon'$. And since this inequality occurs for every $\varepsilon'>0$, $\limsup_{n\to\infty}f(x_n,y)\leqslant f(x,y)$.
This proves that if $f$ is uppor semicontinuous according to the second definition, that it is also upper semicontinuous with respect to the first one.
Can you prove now that the reverse implication also holds?