Find finite path connected topological space with $π_1 (X, x_0 ) \cong \Bbb Z/2\Bbb Z$

There is a general theory of finite topological spaces which makes questions like this easy to answer. In particular, here are some of the central theorems.

Theorem 1: Let $X$ be a preordered set. Then $X$ can be given a topology by saying a subset $U\subseteq X$ is open iff for all $x\in U$ and $y\leq x$, $y\in U$. Conversely, every finite topological space arises from a preordered set in this way and this gives an isomorphism of categories between the category of finite preordered sets and finite topological spaces (i.e., continuous maps are the same thing as order-preserving maps).

Proof sketch: The first part is easy, as is the statement that continuous maps are the same as order-preserving maps. To prove every finite topological space arises in this way, given a topological space $X$, define a preorder $\leq$ by $x\leq y$ iff $y\in\overline{\{x\}}$. Now verify that if $X$ is finite, its topology must coincide with the topology given by this preorder.

Using this theorem, we will treat finite preordered sets and finite topological spaces as interchangeable, and will always consider preordered sets as having the topology described above.

Theorem 2: Let $X$ and $Y$ be preordered sets and $f,g:X\to Y$ be order-preserving maps. Then if $f(x)\leq g(x)$ for all $x$, $f$ and $g$ are homotopic as continuous maps.

Proof: Consider the homotopy $H(x,t)=f(x)$ for $t\in[0,1)$ and $H(x,1)=g(x)$.

Theorem 3 (McCord): Let $X$ be a preordered set, and let $N(X)$ be its nerve. Then there is a natural map $|N(X)|\to X$ which is a weak homotopy equivalence.

This theorem is much deeper and harder to prove than the others. You can find a proof in McCord's paper Singular homology groups and homotopy groups of finite topological spaces.

Corollary: Let $K$ be a simplicial complex and let $X$ be the partially ordered set of faces of $K$. Then there is a weak homotopy equivalence $|K|\to X$.

To deduce the Corollary from Theorem 3, note that $N(X)$ is exactly the simplicial set corresponding to the first barycentric subdivision of $K$, and so there is a canonical homeomorphism $|K|\cong |N(X)|$.

Using the Corollary, we can now quickly get an answer to your question: just take any connected finite simplicial complex $K$ such that $\pi_1(|K|)\cong\mathbb{Z}/2$, and let $X$ be the poset of faces of $K$, considered as a topological space as in Theorem 1. For instance, you could take $K$ to be a triangulation of $\mathbb{R}P^2$.


Alternatively, here is a modification of the idea in William's answer that works to give a smaller example than you can get from a triangulation of $\mathbb{R}P^2$ and without using the full power of Theorem 3. We start with the poset $FS(4)$ which has four points $a,b,c,d$ ordered by $a,b\leq c,d$. This poset is weak equivalent to $S^1$, and in particular $\pi_1(FS(4))\cong\mathbb{Z}$. (You can verify that $\pi_1(FS(4))\cong\mathbb{Z}$ without using Theorem 3 by explicitly constructing a universal cover.) There is a double cover $p:FS(8)\to FS(4)$ corresponding to the subgroup of index $2$ in $\pi_1(FS(4))$. Explicitly, we can write $FS(8)=\{a_1,a_2,b_1,b_2,c_1,c_2,d_1,d_2\}$ with the order $$a_1\leq c_1\geq b_1\leq d_1\geq a_2 \leq c_2 \geq b_2\leq d_2\geq a_1$$ and the $p$ is the obvious map that drops the subscripts.

Now the idea is to construct a finite "mapping cone" of $p$. To do this, consider the poset $I(3)$ with three points $\{0,1/2,1\}$ ordered by $1/2\leq 0,1$. (If this ordering seems strange, note that the nerve of this poset has two non-degenerate 1-simplices $\{0,1/2\}$ and $\{1/2,1\}$ which are glued together at $1/2$, so this is a finite model for an interval with $0$ and $1$ at the ends. It also makes $\{0,1/2\}$ and $\{1/2,1\}$ open, which will be important for using van Kampen below.) We now consider the space $$X=FS(8)\times I(3)/\sim$$ where $\sim$ is the equivalence relation that collapses all of $FS(8)\times\{1\}$ to a point and collapses $FS(8)\times\{0\}$ to a copy of $FS(4)$ by the equivalence relation given by $p$. We think of $X$ as a union $\{1\}\cup FS(8)\cup FS(4)$, where $\{1\}$ is the image of $FS(8)\times\{1\}$, $FS(8)$ is the image of $FS(8)\times \{1/2\}$, and $FS(4)$ is the image of $FS(8)\times\{0\}$.

I claim $\pi_1(X)\cong\mathbb{Z}/2$. To prove this, let $U=FS(4)\cup FS(8)\subset X$ and $V=FS(8)\cup\{1\}\subset X$. Then $U$ and $V$ are open in $X$ and path-connected, and $U\cap V=FS(8)$ is also path-connected, so we can use them to compute $\pi_1(X)$ by van Kampen's theorem.

To identify $\pi_1(U)$, let $f:U\to U$ be the map that is the identity of $FS(4)$ and is $p$ on $FS(8)$. Note that the $FS(8)$ and $FS(4)$ inside $U$ are ordered so that each element of $FS(8)$ is less than its image under $p$ in $FS(4)$ (this is because we used the product ordering on $FS(8)\times I(3)$ to construct $X$ and $1/2\leq 0$ in $X$). It follows that $x\leq f(x)$ for all $x\in U$, and so $f$ is homotopic to the identity map by Theorem 2. Thus $U$ deformation-retracts to $FS(4)$ and so $\pi_1(U)\cong\mathbb{Z}$. Moreover, the inclusion map $U\cap V\to U$ becomes $p:FS(8)\to FS(4)$ when composed with this deformation-retraction, and so the map $\pi_1(U\cap V)\to\pi_1(U)$ can be identified with the inclusion $2\mathbb{Z}\to\mathbb{Z}$.

In the same way, we can show that $\pi_1(V)$ deformation-retracts to $\{1\}$ and thus is contractible (just replace $p$ with the constant map $FS(8)\to \{1\}$ everywhere in the discussion above). Thus by van Kampen, $$\pi_1(X)\cong\pi_1(U)*_{\pi_1(U\cap V)}\pi_1(V)\cong\mathbb{Z}*_{2\mathbb{Z}}\{1\}\cong\mathbb{Z}/2\mathbb{Z}.$$


Update: Eric Wofsey points out in the comments that the construction I had did not work as stated. I had the right-ish idea but the correct details are all contained in Eric's answer.


I have some ideas for how you might construct an example on a space with less than $27$ points, but there are details I haven't worked out. The idea is to try to mimic the CW construction where you attach a disc to a circle with a map of degree $2$ on the boundary.

Step 1: There is a finite model of the circle with $4$ points, called the pseudocircle. Let $FS(4)=\{a, b, c, d\}$, with topology

$$ \left\{\{a,b,c,d\},\{a,b,c\},\{a,b,d\},\{a,b\},\{a\},\{b\},\emptyset \right\}.$$ Then there is a weak equivalence $S^1 \to FS(4)$, spelled out in the wikipedia article.

Step 2: Eric Wofsey points out in the comments that there is indeed an $8$-point model of the circle $FS(8)$ and a double cover $f\colon FS(8)\to FS(4)$ which is multiplication by $2$ on the fundamental group. This is the double cover corresponding to the index $2$ subgroup of $\pi_1 FS(4)$.

For the "attaching a disc" part, you need to be careful about what you mean by "cone". The model of cone I want to use will be of the form $X\times(\text{interval})/(\text{one of the ends})$, so we need to specify what we mean by an interval. I think the model of intervals I want will be the sets $\underline{n} = \{0,\dots,n\}$ where the basis for their topology is downward-facing rays (edit: this is not the right topology, see Eric's answer): these are path-connected, contractible spaces, representing an interval of length $n$. My cones will be

$$C_nX = (X\times \underline{n})/(X\times \{n\}).$$

This space contains $n$ parallel copies of $X$ along with a "cone point" that the space retracts onto.

Step 3: Let $Y=C_2(FS(8))$, and form the quotient space

$$ Z = Y \cup_f FS(4). $$

Then $Z$ has 13 points. Now we should be able to use van-Kampen to show the fundamental group is $\mathbb{Z}/2$. For one open set I think we want the subspace $U_1 = (X\times \{1, 2\})/(X\times \{2 \})\subset Y$ which is contractible, and the other set $U_2$ is the quotient of $X\times \{0, 1\}$ by $f$, which retracts onto the $4$-point circle. Their intersection is the $8$-point circle (edit: again, I used the wrong topology so this will not be open, see Eric's answer), whose inclusion into $U_2$ induces multiplication by $2$ on the fundamental group.