Is the union of a compact and the relatively compact components of its complementary in a manifold compact?

I was thinking of a way to prove this and I realised that for my approach the lemma from the title would be useful, and it´s an interesting question on its own. Obviously it is true if the manifold is compact or $$\mathbb{R}^n$$, but I don´t see it in general. This is the precise question:

Let $$M$$ be a connected manifold and $$X$$ a compact inside it, then is the union of $$X$$ and all the relatively compact components of $$M\setminus X$$ compact?

P.S. I already asked this question in MSE a few days ago, but after asking a few people I thought it could be more appropiate for MO.

• I doubt that this is true. There are simple examples which fail to be manifolds, e.g., $X= [0,1]\times \{0\} \cup \{0\}\times [0,\infty) \cup \bigcup_{n\in\mathbb N} \{1/n\}\times [0,n]$ and $K=[0,1]\times [0,1]$. Perhaps one can make such a comb a manifold in higher dimensions. Dec 5 '21 at 12:05

I believe your set is indeed compact. Its complement is the collection of points $$x$$ such that there exists a continuous curve $$\gamma^x:\mathbb R_+\to M$$ such that

• $$\gamma^x(0)=x$$;
• $$\gamma^x$$ leaves every compact set;
• the image of $$\gamma^x$$ stays outside $$X$$.

According to this point of view, it is clear that this set is open, and decreasing in $$X$$. It will suffice to show that your set is compact for some $$X'\supset X$$ large enough.

Let $$X'\supset X$$ be a compact submanifold with boundary in $$M$$ of maximal dimension (for instance, embed $$M$$ as a closed set of $$\mathbb R^n$$, and consider the intersection with a large close ball; by Sard's lemma it is a manifold with boundary most of the time). I claim that $$M\setminus X'$$ only has finitely many components, which will conclude. Every point of $$\partial X'$$ admits a neighbourhood that intersects exactly one connected component of $$M\setminus X'$$ (because locally $$X'$$ is just a half-space). By compactness, we can find an open neighbourhood of $$\partial X'$$ that intersects only finitely many components, and by connectedness of $$M$$ every such component intersects every neighbourhood of $$\partial X'$$, so those are finitely many as advertised.

• I am using Sard's theorem in the following way: 1) since the function $x\mapsto \|x\|^2$ is smooth, its regular values are dense 2) if $c$ is a regular value of a smooth map $f:M\to\mathbb R$, then $X'=f^{-1}(-\infty,c]$ is a submanifold with boundary, and $\partial X'=f^{-1}\{c\}$. Dec 5 '21 at 16:08
• Thanks! I noticed after writing the comment Dec 5 '21 at 16:11

Actually, there is an elementary proof of this. I will imitate the one given in O.Forster Lectures on Riemann Surfaces. We assume $$M$$ is connected. Let $$Y$$ be equal to the union of $$X$$ with all the relatively compact components of $$M \setminus X$$

Let $$U$$ be a relatively compact, open subset containing $$X$$ and let $$C_j$$, $$j \in J$$ be the connected components of $$M \smallsetminus X$$. Let $$bU$$ be the boundary of $$U$$, which is compact and disjoint from $$X$$.

• Claim 1. Every $$C_j$$ meets $$U$$: If $$C_j \subset M \setminus U$$, its closure in $$M$$ is also contained in $$M \setminus U$$, but $$C_j$$ is a connected component of $$M \setminus U$$ so $$C_j = \overline{C_j}$$ which conttradicts connectedness of $$M$$.
• Claim 2. Only finitely many $$C_j$$ intersects $$bU$$: This is because $$bU$$ is compact and the $$C_j$$ are open and disjoint, anc cover $$bU$$.
• Claim 3. $$Y$$ is closed: Let $$J_0$$ consist of the indices corresponding to relatively compact components. Then $$M \setminus Y = \bigcup_{j \not \in J_0} C_j$$, which is open.

By Claim 2, we can find $$j_1, \ldots , j_k \in J_0$$ be such that $$C_{j_i}$$ intersects $$bU$$. Then , by Claim 1 again, any other $$C_j$$ is contained in $$U$$. Therefore, $$Y \subset U \cup C_{j_1} \cup \ldots \cup C_{j_k}$$ RHS is relatively compact by the choice of $$U$$ and the $$j_i$$, and LHS is closed by Claim 3, so LHS is compact too.

• This is a wonderful proof! What do we need about $M$, it should be Hausdorff, locally compact, locally connected? This would rule out Jochen Wengenroth's example above. Dec 11 '21 at 9:48
• @PierrePC I think you also need $M$ to have only finitely many connected components, if not to be connected itself. Example: $M=\mathbb N$ with the discrete topology is LCH and locally connected, but if $X=\{1\}$ then $Y = \mathbb N$ is not compact. Dec 11 '21 at 18:00
• Ah yes, I see. I would say the remaining components are rather uninteresting though. I would probably consider only the inverse image of the interesting component in $M/K$ or so. Dec 13 '21 at 9:34