Non-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. 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][2].

Let $$N'\subseteq N$$ be a dense subset which is homeomorphic to $$\mathbb{R}^n$$. In this post's answer's comment it was remarked that $$C(D,D-\{0\})$$ is not dense in $$C(D,D)$$ where $$D$$ is the unit disc.

In general, when is $$C(M,N')$$ not dense in $$C(M,N)$$?

• Actually, even the case of $N=S^1$, $N'=\mathbb{R}$ is an example of non-density. Note that if $N'$ is homeomorphic to $\mathbb{R}^n$, every map into $N'$ is null-homotopic. Null-homotopic maps are closed in $C(M,N)$, and so $C(M,N')$ is NOT dense as long as there is a non-null homotopic map from $M$ into $N$. So, if $N$ is not contractible, the identity map cannot be approximated. I am however not that well-versed in algebraic topology to prove that if $N$ is null-homotopic, $C(M,N')$ is dense. – erz Apr 2 at 0:29
• Would you know a reference where I can find the fact that null-homotopic maps form a closed subspace? – AnnieLeKatsu Apr 2 at 6:43
• Yeah, I thought that it is obvious when I was writing that comment, but now I cannot find neither a proof, nor a reference. I guess, time to ask yet another question. – erz Apr 2 at 22:35

1) About Erz' answer, and Annie's second question. It is a general property that for two differentiable manifolds $$M$$, $$N$$, such that $$M$$ is compact, and given a continuous map $$f:M\to N$$, any continuous map $$g:M\to N$$ close enough to $$f$$ is homotopic to $$f$$. This can be proved by many different ways, depending on taste. (One can assume that $$N$$ is also compact, since we are only interested in a small neighborhood of the compact $$f(M)$$ in $$N$$):

a) Put a Riemannian metric on $$N$$, let $$i>0$$ be its injectivity radius: any two points $$x,y\in N$$ whose distance is less than $$i$$ are linked by a unique shortest geodesic, and this geodesic depends continuously on the pair $$(x,y)$$. Then, assuming that $$d(f(x),g(x)) for every $$x\in M$$, the geodesics from $$f(x)$$ to $$g(x)$$ provide the desired homotopy;

b) Embed $$N$$ in $$R^n$$ for $$n$$ large enough (Whitney); then $$N$$ has a tubular neighborhood $$T$$ in $$R^n$$ together with a continuous retraction $$p:T\to N$$; if $$g$$ is close enough to $$f$$, then the segments $$[f(x),g(x)]$$ in $$R^n$$ are contained in $$T$$ and their projection under $$p$$ provide the homotopy;

c) Triangulate $$N$$ and use the straight lines in the simplices of the triangulation instead of the geodesics;

d) Use a good cover of $$N$$ by open subsets $$U(i)$$ such that every intersection $$U(i_1)\cap\dots\cap U(i_k)$$ which is nonempty is contractible...

2) Erz' homotopical argument is excellent; but even if $$N$$ is contractible, $$C(M,N')$$ is in general not dense in $$C(M,N)$$. We should think to the complement $$X$$ of $$N'$$ in $$N$$. For example, let $$M$$ be the compact interval $$[-1,+1]$$, $$N$$ be the complex plane $$\mathbb{C}$$ and $$X$$ be the nonpositive real halfline $$\mathbb{R}_-$$. Clearly, $$\mathbb{C}\backslash X$$ is diffeomorphic with the plane (being open and starred with respect to $$1$$.) Then, the embedding $$[-1,+1]\to\mathbb{C}$$: $$t\mapsto-1+it$$ can certainly not be approximated by continuous maps valued in $$\mathbb{C}\backslash X$$ (by the elementary "intermediate value theorem").

More generally, note that by Weierstrass' approximation theorem, Annie's question is equivalent to: when is $$C^\infty(M,N')$$ not $$C^0$$-dense in $$C^\infty(M,N)$$? The advantage of this differentiable setting is that thanks to Thom's transversality theorem, one can answer in all cases where $$X$$ is regular enough (technically, a finite or denumerable union of smooth submanifolds $$S_i\subset N$$; e.g. a polytope):

a) If one at least of the $$S_i$$'s is of codimension $$\le m$$ in $$N$$, then there will be a smooth map $$f:M \to N$$ which intersects $$S_i$$ transversely in at least one point; and $$f$$ cannot be in the $$C^0$$-closure of $$C(M,N')$$.

b) If on the contrary each $$S_i$$ is of codimension $$>m$$ in $$N$$, then by Thom's transversality theorem, $$C^\infty(M,N')$$ is $$C^\infty$$-dense in $$C^\infty(M,N)$$, and in particular $$C^0$$-dense. (As to Erz' second question: since $$\dim(M)+\dim(S_i)<\dim(N)$$, saying that $$f:M\to N$$ is transverse to $$S_i$$ amounts to say that $$f(M)$$ does not meet $$S_i$$).

• I took liberty of latexifying your answer. I hope you don't mind. Could you please elaborate on your last point? I looked up Hirsh, and he says that the transversal maps are dense. But why are "avoiding" maps dense in the set of transversal ones? – erz Apr 3 at 20:58
• Also, what if we apply this to $M=N$? $X$ then cannot contain a submanifold of any co-dimension, and so should be empty? And finally, is there a way to have similar reasoning without smoothness? – erz Apr 3 at 20:59
• I also have a question/ confusion: If $N=[0,1]^n,N'=(0,1)^n, X=\partial (0,1)^n$, and $M=\mathbb{R}^m$; with $m\geq 1$. Then unless $n\leq 1$, $C(M,N')$ is not dense in $C(M,N)$? Doesn't that contradict @erz 's answer to this post: mathoverflow.net/questions/354304/… ? I'm assuming that the argument somehow breakdown when looking at (smooth) manifolds with boundaries? – AnnieLeKatsu Apr 6 at 14:21
• @AnnieTheKatsu From my understanding the argument goes like this: if $X$ contains a submanifold and a $f$ is transversal to this submanifold, then locally, you have the inclusion of $\mathbb{R}^m$ into $\mathbb{R}^m\oplus \mathbb{R}^k$, where $X$ contains $\mathbb{R}^k$. Surely, you cannot approximate such an inclusion avoiding $X$. However, this only works for submanifolds. The boundary of a manifold with boundary is not a submanifold in this sense. – erz Apr 6 at 16:58
• Of course, the transversality theorem does not hold when the submanifold is contained in the boundary. As for the other question, by "Weierstrass" I mean: every continuous map $f:M\to N$ between two manifolds can be approximated by a smooth one. This is proved by embedding $N$ into $R^d$ (Whitney), approximating $f$ by a smooth map $g:M\to R^d$ by the classical Weierstrass theorem, and reprojecting $g$ into $M$ by a local projection. – Gael Meigniez Apr 7 at 15:21