Let $X$ be a metric space and $f:X\to X$ continuous. A dynamical system is called positively expansive if $$\exists c > 0 \ \ \forall x, y \in X \ \left( x \neq y \implies \exists n \geq 1: d(f^n(x), f^n(y)) > c \right).$$
According to my lecture notes, if $X$ is compact, positive expansiveness can be characterized topologically:
Let $X$ be compact. Then $f$ is positively expansive iff there is a neighborhood $U$ of the diagonal $\Delta_X$ such that for all $(x,y)\in U \setminus \Delta_X$ holds $\mathcal O_{f \times f}(x,y)\not\subseteq U$.
Where
$\Delta_X := \{(x,y)\in X\times X \mid x=y \}$
$(f \times f)^n (x,y) := (f^n(x), f^n(y))$
$\mathcal O_{f \times f}(x,y):= \{(f \times f)^n (x,y) \mid n\geq1 \}$
The proof appears to be trivial with $U := \{ (x,y)\in X\times X \mid d(x,y) < c \}$ in one direction and a slight variation in another direction.
But where do we need compactness here?
Added:
"A slight variation in another direction":
$U\subseteq X\times X$ is a neighborhood of the diagonal $\Delta_X$ iff there exists $a > 0$ such that $V_a:= \{ (x,y)\in X\times X \mid d(x,y) < a \} \subset U$. Now with $c:=a$ we get the definition of positive expansiveness.
The problem with your proof is that your definition/characterization of a neighborhood of the diagonal is not correct.
You have that for each $(x,x)$ there is some $d_x$ such that the the ball of radius $d_x$ is inside $U$. But this $d_x$ can depend on $x$ and you get no uniform bound in general.
You need that $X$ is compact for your statement regarding a $V_a$ to be true.