Removing points of discontinuity Consider a not necessarily continuous function $f\colon D\to Y$ from a subspace $D\subseteq X$ of a topological space $X$ to a topological space $Y$.
Let $L=\{x_0\in X:\displaystyle\lim_{x\to x_0}f(x)$ exists$\}\subseteq X$ have the subspace topology and define $g\colon L\to Y$ by $g(x_0)=\displaystyle\lim_{x\to x_0}f(x)$.
Under what, if any, niceness conditions do the following claims hold:


*

*$g\colon L\to Y$ is continuous.

*If $f\colon D\to Y$ is continuous at a point $x_0\in L\cap D\subseteq X$, then $g\colon L\to Y$ is also continuous at $x_0$.
The most common occurence of these is removable singularites of analytic functions, but I am hoping for significantly weaker conditions.
 A: The first condition is for example satisfied in metric spaces. They are first-countable and thus continuity is completely characterized in terms of sequences (i.e. continuity is equivalent to sequential continuity). Hence, all we need to prove is that for all $x_0\in L$ holds
$$ \lim_{x\rightarrow x_0} g(x)= g(x_0). $$
Let $\varepsilon >0$, then by the definition of $L$ and $g$ there exists $r>0$ such that for all $x\in B_r(x_0)$ holds
$$ d_Y(f(x), g(x_0)) < \varepsilon. $$
Now for $x\in B_r(x_0)\cap L$ there exists (again by the definition of $g$ and $L$) some $y\in B_r(x_0) \cap L$ such that
$$ d_Y(f(y), g(x)) < \varepsilon $$
Thus, for $x\in B_r(x_0) \cap L$ we have
$$ d_Y(g(x), g(x_0)) \leq d_Y(g(x), f(y)) + d_Y(f(y), g(x_0)) \leq 2 \varepsilon $$
Hence, $g$ is continuous at $x_0$ and as $x_0\in L$ was arbitrary we get that $g$ is continuous.
Of course the second point holds true as well in this setting as by the first point $g$ is continuoud everywhere.
I am sure, this is not optimal at all.
