Solution (source code)

= Solution

A <closed manifold> is a compact <manifold> without boundary. Here $M$ is Hausdorff and every point has a neighbourhood homeomorphic to an open subset of $\mathbb R^n$; the usual countability condition is included in the <manifold> convention. Compactness also gives a finite atlas and hence second countability.

A <local orientation of a manifold>[local orientation] at $x$ is a choice of generator of $H_n(M,M\setminus\{x\};\mathbb Z)\cong\mathbb Z$. An <orientation of a topological manifold>[orientation of a manifold] is a compatible choice of these generators as $x$ varies: locally they are induced by the same coordinate-ball <orientation>, or equivalently by a local <relative homology> class. For an oriented <closed manifold>, the <fundamental class> $[M]\in H_n(M;\mathbb Z)$ is the unique class mapping to the chosen generator at every point. On disconnected closed manifolds this is the sum of the fundamental classes of their finitely many components.

For a triangulated or <Delta-complex>[Delta complex] description, orient the top-dimensional simplices compatibly with the local <orientation> and sum them with their corresponding signs. Each codimension-one face appears twice with opposite induced orientations, so the sum is a cycle. At a point inside any top <simplex> its image is the prescribed local generator, so this cycle represents $[M]$. In the <connected> case $H_n(M)=\mathbb Z$ generated by this class.

The homology conclusions below use the opening closed-<manifold> hypothesis for $M_1,M_2$. That hypothesis is necessary if their later description is read independently: removing a ball from $\mathbb R^n$ for $n\geq2$ creates a nonzero $(n-1)$st homology group, so the claimed <isomorphism> would fail without closedness.