Let $X$ be a topological vector space. Assume that there exists a sequence $\phi\_n:X\to X$ of finite range measurable functions with $\lim\phi\_n(x)=x$ for every $x\in X$. Can we concluded there exists a sequence $\{X\_n\}$ of ***subsets*** of $X$ with $X=\cup X\_n$ such that $X\_n$'s are all relatively second-countable? 


Note that the answer will be negative if [$X$ is only assumed to be a **topological space**](https://mathoverflow.net/questions/300544/approximation-of-the-identity-by-simple-functions).



Approximation of the identity by finite range functions in topological vector spaces
It seems that the space $X:=C\_p(2^\omega)$ of real-valued continuous functions on the Cantor set is a counterexample to this question. The space $C\_p(2^\omega)$ is endowed with the topology of pointwise convergence.


**Claim 1.** *The space $X$ cannot be written as the countable union $X=\bigcup\_{n\in\omega}X\_n$ of first-countable subspaces.*


**Proof.** To derive a contradiction, assume that $X=\bigcup\_{n\in\omega}X\_n$ for some first-countable subsets. For every $n\in\omega$ let $\bar X\_n$ be the closeure of $X\_n$ in the topology of the Banach space $C(2^\omega)$. By the Baire Theorem, some $\bar X\_n$ contains some ball $B(f;\varepsilon):=\{g\in C(2^\omega):\|f-g\|<\varepsilon\}$. Replacing $B(f,\varepsilon)$ by a smaller ball in $B(f,\varepsilon)$, we can assume that the center $f$ of the ball belongs to $X\_n$. Since $X\_n$ is first-countable at $f$, there exists a countable neighborhood base $(U\_k)\_{k\in\omega}$ at $X\_n$. We can assume that each $U\_k$ is of the basic form $U\_k=X\_n\cap \{g\in C\_p(2^\omega):\max\_{x\in F\_k}|g(x)-f(x)|<\varepsilon\_k\}$ for some finite set $F\_k\subset 2^\omega$ and some positive $\varepsilon\_k<\frac12\varepsilon$. Choose any point $z\in 2^\omega\setminus\bigcup\_{k\in\omega}F\_k$ and consider the open neighborhood $V\_z:=X\_n\cap\{g\in C\_p(2^\omega):|g(z)-f(z)|<\frac12\varepsilon\}$. We claim that $U\_k\not \subset V\_z$ for every $k\in\omega$. Indeed, for every $k\in\omega$, we can find a function $g\in B(f,\varepsilon)$ such that $|g(z)-f(z)|>\frac12\varepsilon$ and $|g(x)-f(x)|<\frac12\varepsilon$ for all $x\in F\_k$. Since $X\_n\cap B(f,\varepsilon)$ is dense in $B(f;\varepsilon)$, we can replace $g$ by a near function in $X\_n$ and assume that $g\in X\_n$. Then $g\not\in V\_z$ but $g\in X\_n\cap B(F\_k,\varepsilon\_k)=U\_k$ and hence $U\_k\not\subset V\_z$. But this contradicts the choice of $(U\_n)\_{n\in\omega}$ as a neighborhood base of $X\_n$ at $f$. $\square$


**Claim 2.** There exists a sequence $(\phi\_n)\_{n\in\omega}$ of measurable (in fact, constructible) finite range functions $\phi\_n:C\_p(2^\omega)\to C\_p(2^\omega)$ that converges pointwisely to the identity function of $C\_p(2^\omega)$.


**Proof.** Since the real line $\mathbb R$ is homeomorphic to the open interval $J:=(-1,1)$, the function space $C\_p(2^\omega)$ is homeomorphic to the space $C\_p(2^\omega,J)$ of continuous functions from $2^\omega$ to $J$. So, it suffices to construct th sequence $(\phi\_n)$ for the function space $C\_p(2^\omega,J)$.


The interval $J$ is a bit better than the real line as it admits a sequence of finite range measurable maps $\psi\_n:J\to J$, which converges uniformly to the identity function of $J$.


Next, for every $n\in\omega$ denote by $\mathcal C\_n$ the canonical finite disjoint cover of the Cantor set $2^\omega$ by basic closed-and-open sets of diameter $\frac1{3^n}$. In each basic set $C\in\mathcal C\_n$ fix a point $x\_C$ and for any function $f\in C\_p(2^\omega,J)$ consider the finite range function $f\_n:2^\omega\to C$ such that $f\_n(C)=\{f(x\_C)\}$ for every $C\in\mathcal C\_n$. It is easy to see that the sequence $(f\_n)$ converges to $f$ in $C\_p(X,J)$.


So, $\varphi\_n:C\_p(2^\omega,J)\mapsto C\_p(2^\omega,J)$, $\varphi\_n:f\mapsto f\_n$, is a sequence of continuous functions such that $\varphi\_n(f)\to f$ for any $f\in C\_p(2^\omega,J)$. Finally observe that the sequence of functions $\phi\_n:=\varphi\_n\circ\psi\_n:C\_p(2^\omega,J)\to C\_p(2^\omega,J)$ has the desired property. They have finite range and converges pointwise to the identity function of $C\_p(2^\omega,J)$.


Moreover, each function $\phi\_n$ is not just measurable, but constructible. More percisely, the preimage of any open set can be written as the difference $U\setminus V$ of two open sets, because the half-intervals (= $\varphi^{-1}(y)$) on $J$ have this property. 


