# De Rham cohomology of degree $0$ of a manifold with infinitely many connected components

Exercise 24.2 of Tu's An Introduction to Manifolds (2nd ed.) goes as following:

Suppose a manifold $$M$$ has infinitely many components. Compute its de Rham cohomology vector space $$H^0(M)$$ in degree $$0$$. (Hint: by second countability, the number of connected components of a manifold is countable).

I believe we can prove the hint by saying that a manifold $$M$$, being second countable, by definition must admit a countable basis $$B$$. Each connected component $$C_\alpha$$ has to be covered by a subset $$B_\alpha \subset B$$ and the disjoint union $$\cup B_\alpha = B$$. If the set $$C_\alpha$$ were uncountable, $$B$$ would be the union of an uncountable number of countable sets, and would be uncountable as well, contradiction the assumption. Is this correct?

That said, few section before, it is proven that if a manifold has $$r$$ connected components, an element of $$H^0(M)$$ is specified by an ordered tuple of real numbers, each number representing a constant function on a connected component of $$M$$. This because if $$f$$ is a $$0$$-form (a real valued smooth function of $$M$$), for $$f$$ to be "closed" we need to have $$df=0$$ everywhere on $$M$$, that is, $$f$$ has to be locally constant. As there are no nonzero exact $$0$$-forms, $$H^0(M)$$={closed $$0$$-forms}. I understand that if a manifold is connected, a locally constant function has to be constant on $$M$$, so $$H^0(M) \simeq \mathbb{R}$$, while if there are $$r$$ connected (hence disjoint) components, $$f$$ can have different values on each component, so we have $$r$$ degrees of freedom for the constant value of $$f$$ on each connected component, hence $$H^0(M) \simeq \mathbb{R}^r$$.

I would be tempted to say that in the case in which the number of connected components is infinite (countable) we just have $$H^0(M)$$ isomorphic to an infinite dimensional vector space, where each element can be represented by a countable sequence of real numbers. I have no experience at all with non finite dimensional vector spaces, so I was wondering if I should progress further or this is a correct solution of this exercise. I am also not sure about the notation in which I should represent the solution.

It is not true that each $$C_{\alpha}$$ must be contained in a single $$B_{\alpha}$$ (think of $$M$$ a single component). Also, the disjoint union $$B$$ is uncountable, even though the family isn't.
A way to prove the hint is by considering a countable dense subset $$A\subseteq M$$ (which exists because second countable implies separable). Then any connected component, being open, contains a point of $$A$$. Sending components to points of $$A$$ this way defines an injective map (because components are disjoint) into a countable set. Thus the number of components is at most countable.
Lastly, you are done after you notice closed $$0$$-forms on such a space will still be the locally constant functions. This space is naturally identifiable with that of sequences $$\mathbb{R}^{\infty}$$ as you said.