Solution (source code)

= Solution

A <topological surface> is a <Hausdorff space> with a countable <basis of a topology> in which every point has an <open> <neighbourhood> <homeomorphic> to an <open subset> of the <Euclidean plane>. We use the convention that a <surface> has no boundary unless a <surface with boundary> is explicitly specified. A closed <surface> is <compact> and has no boundary. Some conventions also include <connectedness> in the definition; we impose it on the <closed combinatorial surface> below.

A <closed combinatorial surface> is a finite <connected> <simplicial complex> $K$ with the following properties: every <simplex> is a <face of a simplex> of dimension two, and the <link of a simplex> at every vertex is a <cycle graph>. Explicitly, for a vertex $v$ its link is the <simplicial subcomplex>
$$
\operatorname{lk}_K(v)=\{\rho\in K:v\notin\rho,\ \rho\cup\{v\}\in K\}.
$$
To say this is a <cycle graph> means that there are distinct vertices $w_1,\ldots,w_m$, with $m\geq3$, and exactly the link <edges> $\{w_i,w_{i+1}\}$, with indices modulo $m$. In particular, every edge of $K$ belongs to exactly two triangles. The vertex-link condition also requires that the triangles around each vertex form one cyclic fan; edge incidence alone would allow singular examples.

These conditions make $|K|$ a closed <surface>. A point inside a triangle has a disc <neighbourhood>, the two triangles at an edge give a disc <neighbourhood>, and the cyclic fan at a vertex gives a disc <neighbourhood>. Finiteness gives <compactness>, the <Hausdorff> property, and a countable <basis of a topology> from a realization in a finite-dimensional <Euclidean space>. If disconnected <closed combinatorial surfaces> are allowed, each <connected component> satisfies this definition separately.