# Density of continuous functions to interior in set of all continuous functions

Let $$M$$ be an $$m$$-dimensional manifold and $$N$$ be an $$n$$-dimensional manifold with boundary. Suppose also that the topology on $$N$$ can be described by a metric. Thus, the set $$C(M,N)$$ can be endowed with the topology of uniform convergence on compacta.

Intuitively it seems that every continuous function $$f:M\rightarrow N$$ can be approximated by continuous functions of the form $$g:M\rightarrow\operatorname{int}(N)$$; where $$\operatorname{int}(N)=N- \partial N$$, $$\partial N$$ denoting the boundary of $$N$$. But is this formally true? I.e., is it true that

$$\overline{C(M,\operatorname{int}(N))} = C(M,N)?$$

Prototype construction: Let $$N=[0,b)$$ then any function $$f$$ can be approximated by: $$f_n= \min\left(\frac1{n},f\right) ,$$ of course, these are continuous but not smooth (since we don't need smoothness this is not an issue). I expect this type of construction can be generalized.

A boundary of a paracompact manifold has a collar neighborhood, i.e. $$U\subset N$$ that includes $$\partial N$$ and is homeomorphic to $$\partial N\times [0,1)$$ via a map $$\psi$$ that maps $$\partial N$$ onto $$\partial N\times \{0\}$$. Therefore, I will be talking about the points in $$U$$ as if they were in $$\partial N\times [0,1)$$.
For $$n>1$$ define a sequence of continuous maps $$\varphi_{n}:N\to int(N)$$ which is the identity on $$N\backslash (\partial N\times [0,\frac{1}{n}))$$, and such that $$\varphi_{n}(x,t)=(x,\frac{1}{n})$$, if $$(x,t)\in \partial N \times [0,\frac{1}{n})$$. Clearly, $$\varphi_{n}$$ converges to the identity map in the compact-open topology.
Now, if $$f:M\to N$$, the sequence $$\varphi_n\circ f$$ converges to $$f$$ in the compact open topology, since composition of map is a continuous operation with respect to the compact-open topology.
Note that the fact that $$M$$ is a manifold is not used, while the fact that $$N$$ is a manifold is used rather lightly. I wonder under which condition on a connected metric spaces $$M$$, $$N$$ and $$F\subset N$$ the set $$C(M,N\backslash F)$$ is dense in $$C(M,N)$$?
Originally (without putting much thought into it) I suggested $$F$$ to be merely closed nowhere dense and not separating $$N$$, but @Pietro Majer swiftly refuted that "conjecture".
• As to the last question, consider $N=M=D$, the closed unit disk of $\mathbb{R}^2$, and $F=\{0\}$. Then any map $f:D\to D$ close to the identity, say $\|f-\text{id}\|_{\infty,D} <1$ has degree $1$ wrto $0$, so it can't be in $C(D,D\setminus\{0\})$. – Pietro Majer Mar 7 at 8:56