If $Gf$ is connected and locally-connected then $f$ is continuous. I encountered this proof in the H. Herrlich's Topology book. There are several steps there that are unclear, perhaps someone would have an idea.
Prove that:
$f: \underline R \rightarrow \underline R\ $ is a map and $GF = \{(x, f(x)) \ | \ x \in R)\}$ it's graph. Then $f$ is continuous if $GF$ is connected and locally-connected.
The author starts by stating that if $f$ were discontinuous then WLOG there would exist such $x \in R$ and $r > 0$ and monotone icreasing $x_n \rightarrow x$.
It would hold then that $f(x_n) > f (x) + r, \forall n \in N$. Then the set U = $\{ (a,b) \in Gf \ |\ b < f(x) + r \}$ would be an open neighbourhood of $(x, f(x))$.
Since $GF$ is locally-connected, there is such open and connected $V \subset U$.
If one defines $V_n = \{(a,b) \ \in V | \ a < x_n\}$ then each $V_n$ has to be empty. Therefore, from $a < x_n$ it follows that $(a, f(a)) \notin V$.
Hence, $V$ is an open neighbourhood of $(x,f(x))$, such that it does not intersect $A = \{ (a,b) \in Gf \ | \ a < x \}$.
$A$ would be therefore both open and closed, which contradicts the connectedness of $Gf$.

I've marked unclear parts using bold font.

*

*In order to prove that $A$ is closed the author needs to show that any point not from $A$ has an open neighbourhood that does not intersect $A$. He finds it by defining $V$ for $(x, f(x))$. The way I see it $(x, f(x))$ is not an arbitrary point. However, in the beginning, the author states that it is. By writing WLOG, it looks as if the author assumes that the map is discontinuous at every point. Why is that?


*Why does it follow that each $V_n$ must be empty? I see why $V_n$ is supposed to be closed and open set and since $V$ is connected then $V_n$ must be either $\emptyset$ or $V$ itself. Why is the latter not possible and only the $\emptyset$ is considered?


*Why does it follow that $(a, f(a)) \notin V$? I guess it has to hold for each $V_n$ but how does one transition from there to $V$? $V$ could be bigger than the union of all $V_n$'s and thus contain $(a,f(a))$ in that gap.
 A: Let us begin with some notation. For $x \in \mathbb R$ let $p(x) = (x,f(x)) \in Gf$, $H_+(x) = \{ (a,b) \in \mathbb R^2 \mid a > x \},  H_-(x) = \{ (a,b) \in \mathbb R^2 \mid a < x \}$. The sets $H_\pm(x)$ are open in $\mathbb R^2$, hence the sets $Gf_\pm(x) = Gf \cap H_\pm(x)$ are open in $Gf$.

*

*W.l.o.g. :
If $f$ is not continuous, then there exists $x$ and $r > 0$ and a sequence $(x_n)$ converging to $x$ such that $x_n \ne x$ and $\lvert f(x_n) - f(x) \rvert > r$. Thus $f(x_n) - f(x)  > r$ for infinitely many $n$ or $f(x_n) - f(x)  <  -r$ for infinitely many $n$. We may assume that $f(x_n) - f(x)  > r$ for infinitely many $n$, the other case can be treated similarly. So w.l.o.g. all  $f(x_n) - f(x)  > r$ (otherwise take a subsequence). We may also assume that the sequence $(\lvert x_n - x \lvert)$ is stricty decreasing (otherwise take a subsequence). But infinitely many $x_n < x$ or infinitely many $x_n > x$. We may assume that infinitely many $x_n < x$, the other case can be treated similarly. So w.l.o.g. all  $x_n < x$ (otherwise take a subsequence). This means that $(x_n)$ is strictly increasing.


*$V_n$ has to be empty :
Note that $f(x_n) > f(x) + r$, thus $p(x_n) \notin U$ and hence $p(x_n) \notin V$. Therefore $V = (V \cap Gf_+(x_n)) \cup (V \cap Gf_-(x_n))$, where $V \cap Gf_\pm(x_n)$ are disjoint open subsets of $V$. Clearly $V \cap Gf_+(x_n) \ne \emptyset$ because $p(x) \in V$ and $p(x) \in Gf_+(x_n)$ because $x > x_n$. Since $V$ is connected, we conclude that $V_n = V \cap Gf_-(x_n)$ must be empty. Now assume that $V \cap Gf_-(x) \ne \emptyset$. Then there exists $(a,b) \in V$ such that $(a,b) \in Gf_-(x)$, i.e. $a < x$. There exists $n$ such that $a < x_n < x$ which implies $(a,b) \in Gf_-(x_n)$. Thus $(a,b) \in V \cap Gf_-(x_n)$, a contradiction.


*$A = Gf_-(x)$ is open and closed in $Gf$ :
It is open by definition. Moreover $Gf = Gf_-(x) \cup V \cup Gf_+(x)$. We have $Gf_-(x) \cap (V \cup Gf_+(x)) = Gf_-(x) \cap V \cup Gf_-(x) \cap Gf_+(x)) = \emptyset$. Therefore $Gf_-(x)$ is the complement of the open subset $V \cup Gf_+(x) \subset Gf$.
