The van Kampen theorem
================================================

|indent| Suppose a space :math:`X` is decomposed as the union of a collection of path-connected
open subsets :math:`A_\alpha`, each of which contains the basepoint :math:`x_0 \in X`. By the remarks in the 
preceding paragraph, the homomorphisms :math:`j_\alpha:\pi_1(A_\alpha)\rightarrow \pi_1(X)` induced by the
inclusions :math:`A_\alpha \hookrightarrow X` extend to a homomorphism :math:`\phi : {\Large *}\pi_1(A_\alpha)\rightarrow \pi_1(X)`. The van Kampen
theorem will say that :math:`\phi` is very often surjective, but we can expect :math:`\phi` to have nontrivial
kernel in general. For if :math:`i_{\alpha \beta}:\pi_1(A_\alpha \cap A_\beta) \rightarrow \pi_1(A_\alpha)` is the homomorphism induced
by the inclusion :math:`A_\alpha \cup A\beta \hookrightarrow X`, so the kernel of :math:`\phi` contains all the elements
of the form :math:`i_{\alpha \beta}(w)i_{\beta \alpha}(w)^{-1}` for :math:`w \in \pi_1(A_\alpha \cup A_\beta)`. Van Kampen's theorem asserts
that under fairly broad hypotheses this gives a full description of :math:`\phi`:

.. _Theorem 1.20:

    **Theorem 1.20.** *If* :math:`X` *is the union of path-connected open sets* :math:`A_\alpha` *each containing
    the basepoint* :math:`x_0 \in X` *and if each intersection* :math:`A\alpha \cup A_\beta` *is path-connected, then the
    homomorphism* :math:`\phi : {\Large *}_\alpha \pi_1(A_\alpha) \rightarrow \pi_1 (X)` *is surjective. If in addition each intersection*
    :math:`A_\alpha \cup A_\beta \cup A_\gamma` *is path-connected, then the kernel of* :math:`\phi` *is the normal subgroup* :math:`N`
    *generated by all elements of the form* :math:`i_{\alpha \beta}(w)i_{\beta \alpha}(w)|^{-1}` *for* :math:`w \in \pi_1(A_\alpha \cup A_\beta)`, *and
    hence* :math:`\phi` *induces an isomorphism* :math:`\pi_1(X) \approx {\Large *}_\alpha \pi_1(A_\alpha)/N`.

.. _Example 1.21:

.. container::
    
    **Example 1.21: Wedge Sums.** In :ref:`Chapter 0 we defined the wedge sum <Wedge Sum>` :math:`\bigvee _\alpha X_\alpha` of a 
    collection of spaces :math:`X_\alpha` with basepoints :math:`x_\alpha \in X_\alpha` to be the quotient space of the
    disjoint union :math:`\coprod _\alpha X_\alpha` in which all the basepoints :math:`x_\alpha` are identified to a single point.
    If each :math:`x_\alpha` is a deformation retract of an open neighborhood :math:`U_\alpha` in :math:`X_\alpha`, then :math:`X_\alpha` is
    a deformation retract of its open neighborhood :math:`A_\alpha = X_\alpha \bigvee _{\beta \neq \alpha}U_\beta`. The intersection
    of two or more distinct :math:`A_\alpha`'s is :math:`\bigvee_\alpha U_\alpha`, which deformation retracts to a point. Van
    Kampen's theorem then implies that :math:`\phi: {\Large *}_\alpha \pi_1(X_\alpha)\rightarrow \pi_1(\bigvee_\alpha X_\alpha)` is an isomorphism,
    assuming that each :math:`X_\alpha` is path-connected, hence also each :math:`A_\alpha`.

    |indent| Thus for a wedge sum :math:`\bigvee_\alpha S^1_\alpha` of circles, :math:`\pi_1(\bigvee_\alpha X_\alpha)` is a free group, the free product
    of copies of :math:`\mathbb{Z}`, one for each circle :math:`S^1_\alpha`. In particular, :math:`\pi_1(S^1\vee S^1)` is the free group :math:`\mathbb{Z}*\mathbb{Z}`,
    as in the example at the beginning of this section.

    |indent| It is true more generally that the fundamental group of any connected graph is 
    free, as we show in :ref:`§1.A <>`. Here is an example illustrating the general technique.


.. _Example 1.22:

.. container::

    .. image:: fig/eg-1-22.png
        :align: right
        :width: 25%

    **Example 1.22.** Let :math:`X` be the graph shown in the figure, consisting
    of the twelve edges of a cube. The seven heavily shaded edges
    form a maximal tree :math:`T \subset X`, a contractible subgraph containing all
    the vertices of :math:`X`. We claim that :math:`\pi_1(X)` is the free product of five
    copies of :math:`\mathbb{Z}`, one for each edge not in :math:`T`. To deduce this from van
    Kampen's theorem, choose for each edge :math:`e_\alpha` of :math:`X-T` an open neighborhood :math:`A_\alpha` of 
    :math:`T \cup e_\alpha` in :math:`X` that deformation retracts onto :math:`T \cup e_\alpha`. The intersection of two or more
    :math:`A_\alpha`'s deformation retracts onto :math:`T`, hence is contractible. The :math:`A_\alpha`'s form a cover of
    :math:`X` satisfying the hypotheses of van Kampen's theorem, and since the intersection of 
    any two of them is simply-connected we obtain an isomorphism :math:`\pi_1(X) \approx {\Large *}_\alpha \pi_1(A_\alpha)`.
    Each :math:`A_\alpha` deformation retracts onto a circle, so :math:`\pi_1(X)` is free on five generators, as
    claimed. As explicit generators we can choose for each edge :math:`e_\alpha` of :math:`X-T` a loop :math:`f_\alpha`
    that starts at a basepoint in :math:`T`, travels in :math:`T` to one end of :math:`e_\alpha`, then across :math:`e_\alpha`, then
    back to the basepoint along a path in :math:`T`.

|indent| Van Kampen's theorem is often applied when there are just two sets :math:`A_\alpha` and :math:`A_\beta` in 
the cover of :math:`X`, so the condition on triple intersections :math:`A_\alpha \cup A_\beta \cup A_\gamma` is superfluous and 
one obtains an isomorphism :math:`\pi_1(X) \approx (\pi_1(A_\alpha) * \pi_1(A_\beta))/N`, under the assumption
that :math:`A_\alpha \cup A_\beta` is path-connected. The proof in this special case is virtually identical
with the proof in the general case, however.

|indent| One can see that the intersections :math:`A_\alpha \cup A_\beta` need to be path-connected by
considering the example of :math:`S^1` decomposed as the union of two open arcs. In this case
:math:`\phi` is not surjective. For an example showing that triple intersections :math:`A_\alpha \cup A_\beta \cup A_\gamma`
need to be path-connected, let :math:`X` be the suspension of three points :math:`a,\, b,\, c`, and let
:math:`A_\alpha ,\, A_\beta ,\, ` and  :math:`A_\gamma` be the complements of these three points.

.. image:: fig/abc.png
    :align: right
    :width: 20%

The theorem does apply to the covering :math:`\{A_\alpha, A_\beta\}`, so there are isomorphisms
:math:`\pi_1(X) \approx \pi_1(A_\alpha) * \pi_1(A_\beta) \approx \mathbb{Z}*\mathbb{Z}` since :math:`A_\alpha \cup A_\beta` is contractible.
If we tried to use the covering :math:`\{A_\alpha,A_\beta,A_\gamma\}`, which has each of the
twofold intersections path-connected but not the triple intersection, then we would
get :math:`\pi_1(X) \approx \mathbb{Z}*\mathbb{Z}*\mathbb{Z}`, but this is not isomorphic to :math:`\mathbb{Z}*\mathbb{Z}` since it has a different
abelianization.

**Proof of van Kampen's theorem:** We have already proved the first part of the theorem
concerning surjectivity of :math:`\phi` in :ref:`Lemma 1.15 <lemma 1.15>`. To prove the harder part of the theorem,
that the kernel of :math:`\phi` is :math:`N`, we first introduce some terminology. By a *factorization* of 
an element :math:`[f] \in \pi_1(X)` we shall mean a formal product :math:`[f_1] \cdot [f_k]` where:

-   Each :math:`f_i` is a loop in some :math:`A_\alpha` at the basepoint :math:`x_0`, and :math:`[f_i] \in \pi_1(A_\alpha)` is the 
    homotopy class of :math:`f_i`.
-   The loop :math:`f` is homotopic to :math:`f_1 \cdot \cdots f_k` in :math:`X`.

A factroization of :math:`[f]` is thus a word in :math:`{\Large *}_\alpha \pi_1(A_\alpha)`, possibly unreduced, that is
mapped to :math:`[f]` by :math:`\phi`. Surjectivity of :math:`\phi` is equivalent to saying that every :math:`[f] \in \pi_1(X)`
has a factorization.

|indent| We will be concerned with the uniqueness of factorizations. Call two factorizations 
of :math:`[f]` *equivalent* if they are related by a sequence of the following two sorts of
moves or their inverses:

-   Combine adjacent terms :math:`[f_i][f_{i+1}]` into a single term :math:`[f_i \cdot f_{i+1}]` if :math:`[f_i]` and :math:`[f_{i+1}]`
    lie in the same group :math:`\pi_1(A_\alpha)`.
-   Regard the term :math:`[f_i]\in \pi_1 (A_\alpha)` as lying in the group :math:`\pi_1(A_\beta)` rather than :math:`\pi_1(A_\alpha)`
    if :math:`f_i` is a loop in :math:`A_\alpha \cup A_\beta`.

The first move does not change the element of :math:`{\Large *}_\alpha \pi_1 (A_\alpha)` defined by the factorization.
The second move does not change the image of this element in the quotient group
:math:`Q={\Large *}_\alpha \pi_1(A_\alpha)/N`, by the definition of :math:`N`. So equivalent factorizations give the same
element of :math:`Q`.

|indent| If we can show that any two factorizations of :math:`[f]` are equivalent, this will say that
the map :math:`Q \rightarrow \pi_1(X)` induced by :math:`\phi` is injective, hence the kernel of :math:`\phi` is exactly :math:`N`, and
the proof will be complete.

|indent| Let :math:`[f_1] \cdots [f_k]` and :math:`[f'_1] \cdots [f'_l]` be two factorizations of :math:`[f]`. The composed
paths :math:`f_1 \cdot \cdots \cdot f_k` and :math:`f_1'\cdot \cdots \cdot f_l'` are then homotopic, so let :math:`F:I\times I \rightarrow X` be a homotopy
from :math:`f_1 \cdot \cdots \cdot f_k` to :math:`f_1' \cdot \cdots \cdot f_l'`. There exist partitions :math:`0=s_0<s_1<\cdots < s_m = 1`
and :math:`0 = t_0 < t_1 < \cdots < t_n =1` such that each rectangle :math:`R_{ij}=[s_{i-1},s_i]\times [t_{j-1},t_j]`
is mapped by :math:`F` into a single :math:`A_\alpha`, which we label :math:`A_{ij}`. These partitions may be 
obtained by covering :math:`I\times I` by finitely many rectangles :math:`[a,b] \times [c,d]` each mapping to a 
single :math:`A_\alpha`, using a compactness argument, then partitioning :math:`I \times I` by the union of all
the horizontal and vertical lines containing edges of theses rectangles. 

.. image:: fig/partition.png
    :width: 25%
    :align: right

We may assume
the :math:`s`-partition subdivides the partitions giving the products
:math:`f_1 \cdot \cdots \cdot f_k` and :math:`f_1' \cdot \cdots \cdot f_l'`. Since :math:`F` maps a neighborhood
of :math:`R_{ij}` to :math:`A_{ij}`, we may perturb the vertical sides of the rectangles
:math:`R_{ij}` so that each point of :math:`I \times I` lies in at most three
:math:`R_{ij}`'s. We may assume there are at least three rwos of rectangles,
so we can do this perturbation just on the rectangles
in the intermediate rows, leaving the top and bottom rows unchanged. Let us relabel 
the new rectangles :math:`R_1,R_2, \cdots ,R_{mn}`, ordering them as in the figure.

|indent| If :math:`\gamma` is a path in :math:`I \times I` from the left edge to the right edge, then the restriction :math:`F|\gamma`
is a loop at the basepoint :math:`x_0` since :math:`F` maps both the left and right edges of :math:`I \times I` to :math:`x_0`.
Let :math:`\gamma_r` be the path separating the first :math:`r` rectangles :math:`R_1, \cdots, R_r` from the remaining
rectangles. Thus :math:`\gamma_0` is the bottom edge of :math:`I \times I` and :math:`\gamma_{mn}` is the top edge. We pass
from :math:`\gamma_r` to :math:`\gamma_{r+1}` by pushing across the rectangle :math:`R_{r+1}`.

|indent| Let us call the corners of the :math:`R_r`'s *vertices*. For each vertex :math:`v` with :math:`F(v) \neq x_0`
we can choose a path :math:`g_v` from :math:`x_0` to :math:`F(v)` that lies in the intersection of the two
or three :math:`A_{ij}`'s corresponding to the :math:`R_r`s containing :math:`v`, since we assume the intersection
of any two or three :math:`A_{ij}`'s is path-connected. Then we obtain a factorization
of :math:`[F|\gamma_r]` by inserting the appropriate paths :math:`\bar{g}_vg_v` into :math:`F|\gamma_r` at successive vertices,
as in the proof of surjectivity of :math:`\phi` in :ref:`Lemma 1.15 <lemma 1.15>`. This factorization depends on
certain choices, since the loop corresponding to a segment between two successive
vertices can lie in two different :math:`A_{ij}`'s when there are two different rectangles :math:`R_{ij}` containing 
this edge. Different choices of these :math:`A_{ij}`'s change the factorization of :math:`[F|\gamma_r]`
to an equivalent factorization, however. Furthermore, the factorizations associated
to successive paths :math:`\gamma_r` and :math:`\gamma_{r+1}` are equivalent since pushing :math:`\gamma_r` across :math:`R_{r+1}` to :math:`\gamma_{r+1}`
changes :math:`F|\gamma_r` to :math:`F|\gamma_{r+1}` by a homotopy within the :math:`A_{ij}` corresponding to :math:`R_{r+1}`, and 
we can choose this :math:`A_{ij}` for all the segments of :math:`\gamma_r` and :math:`\gamma_{r+1}` in :math:`R_{r+1}`.

|indent| We can arrange that the factorization associated to :math:`\gamma_0` is equivalent to the factorization
:math:`[f_1] \cdots [f_k]` by choosing the path :math:`g_v` for each vertex :math:`v` along the lower edge
of :math:`I \times I` to lie not just in the two :math:`A_{ij}`'s corresponding to the :math:`R_s`'s containing :math:`v` along the lower edge
to lie in the :math:`A_\alpha` for the :math:`f_i` containing :math:`v` in its domain. In case :math:`v` is the common end-point 
of the domains of two consecutive :math:`f_i`'s we have :math:`F(v)=x_0`, so there is no need
to choose a :math:`g_v` for such :math:`v`'s. In similar fashion we may assume that the factorization
associated to the final :math:`\gamma_{mn}` is equivalent to :math:`[f_1'] \cdots [f_l']`. Since the factorizations 
associated to all the :math:`\gamma_r`'s are equivalent, we conclude that the factorizations :math:`[f_1] \cdots [f_k]`
and :math:`[f_1'] \cdots [f_l']` are equivalent. |qed|

..

.. _Example 1.23:

.. container::

    **Example 1.23: Linking of Circles.** We can apply van Kampen's theorem to calculate 
    the fundamental groups of three spaces discussed in the introduction to this chapter,
    the complements in :math:`\mathbb{R}^3`of a single circle, two unlinked circles, and two linked circles.

    .. image:: fig/eg-1-23-a.png
        :align: right
        :width: 40%
    
    |indent| The complement :math:`\mathbb{R}^3 -A` of a single circle :math:`A`
    deformation retracts onto a wedge sum :math:`S^1 \vee S^2`
    embedded in :math:`\mathbb{R}^3 -A` as shown in the first of the 
    two figures a t the right. It may be easier to see
    that :math:`\mathbb{R}^3 - A` deformation retracts onto the union 
    of :math:`S^2` with a diameter, as in the second figure,
    where points outside :math:`S^2` deformation retract onto :math:`S^2`, and points inside :math:`S^2` and not in
    :math:`A` can be pushed away from :math:`A` toward :math:`S^2` or the diameter. Having this deformation
    retraction in mind, one can then see how it must be modified if the two endpoints
    of the diameter are gradually moved toward each other along the equator until they
    coincide, forming the :math:`S^1` summand of :math:`S^1 \vee S^2`. Another way of seeing the deformation
    retraction of :math:`\mathbb{R}^3-A` onto :math:`S^1 \vee S^2` is to note first that an open :math:`\epsilon`- neighborhood of
    :math:`S^1 \vee S^2` obvioulsy deformation retracts onto :math:`S^1 \vee S^2` if :math:`\epsilon` is sufficiently small. Then
    observe that this neighborhood is homeomorphic to :math:`\mathbb{R}^3 -A` by a homeomorphism
    that is the identity on :math:`S^1 \vee S^2`. In fact, the neighborhood can be gradually enlarged
    by homeomorphisms until it becomes all of :math:`\mathbb{R}^3 - A`.

    |indent| In any event, once we see that :math:`\mathbb{R}^3 -A` deformation retracts to :math:`S^1 \vee S^2`, then we
    immediately obtain isomorphisms :math:`\pi_1(\mathbb{R}^3-A) \approx \pi_1(S^1 \vee S^2) \approx \mathbb{Z}` since :math:`\pi_1(S^2)=0`.

    .. image:: fig/eg-1-23-b.png
        :align: right
        :width: 30%
    
    |indent| In similar fashion, the complement :math:`\mathbb{R}^3 - (A \cup B)` 
    of two unlinked circles :math:`A` and :math:`B` deformation retracts
    onto :math:`S^1 \vee S^1 \vee S^2 \vee S^2`, as in the figure to the right. From
    this we get :math:`\pi_1(\mathbb{R}^3 - (A \cup B)) \approx \mathbb{Z} * \mathbb{Z}`

    .. image:: fig/eg-1-23-c.png
        :align: left
        :width: 20%

    On the other hand, if :math:`A` and :math:`B` are linked, then :math:`\mathbb{R}^3 - (A\cup B)` deformation retracts onto
    the wedge sum of :math:`S^2` and a torus :math:`S^1 \times S^1` separating :math:`A` and :math:`B`,
    as shown in the figure to the left, hence :math:`\pi_1 (\mathbb{R}^3 - (A \cup B)) \approx \pi_1(S^1 \times S^1) \approx \mathbb{Z} \times \mathbb{Z}`.

.. _Example 1.24:

.. container::

    **Example 1.24: Torus Knots.** For relatively prime positive integers :math:`m` and :math:`n`, the 
    **torus knot** :math:`K=K_{m,n} \subset \mathbb{R}^3` is the image of the embedding :math:`f:S^1 \rightarrow S^1 \times S^1 \subset \mathbb{R}^3`,
    :math:`f(z)=(z^m,z^n)`, where the torus :math:`S^1 \times S^1` is embedded in :math:`\mathbb{R}^3` in the standard way.

    .. image:: fig/eg-1-24-a.png
        :align: right
        :width: 40%
    
    The knot :math:`K` winds around the torus a total of :math:`m`
    times in the longitudinal direction and :math:`n` times in 
    the meridional direction, as shown in the figure for 
    the case :math:`(m,n)=(2,3)` and :math:`(3,4)`. One needs to 
    assume that :math:`m` and :math:`n` are relatively prime in order
    for the map :math:`f` to be injective. Without this assumption :math:`f` would be :math:`d`-to-:math:`1` where
    :math:`d` is the greatest common divisor of :math:`m` and :math:`n`, and the image of :math:`f` would be the 
    knot :math:`K_{m/d,n/d}`. One could also allow negative values for :math:`m` or :math:`n`, but this would only
    change :math:`K` to a mirror-image knot.

    |indent| Let us compute :math:`\pi_1(\mathbb{R}^3-K)`. It is slighyl easier to do the calculation with :math:`\mathbb{R}^3`
    replaced by its one-point compactification :math:`S^3`. An application of van Kampen's theorem
    shows that this does not affect :math:`\pi_1`. Namely, write :math:`S^3-K` as the union of :math:`\mathbb{R}^3-K` and 
    an open ball :math:`B` formed by the compactification point together with the complement of 
    a large closed ball in :math:`\mathbb{R}^3` containing :math:`K`. Both :math:`B` and :math:`B \cap (\mathbb{R}^3-K)` are simply-connected,
    the latter space being homeomorphic to :math:`S^2 \times \mathbb{R}`. Hence van Kampen's theorem implies
    that the inclusion :math:`\mathbb{R}^3-K \hookrightarrow S^3 -K` induces an isomorphism on :math:`\pi_1`.

    |indent| We compute :math:`\pi_1(S^3 - K)` by showing that it deformation retracts onto a :math:`2`-dimensional
    complex :math:`X=X_{m,n}` homeomorphic to the quotient space of a cylinder :math:`S^1 \times I`
    under the identifications :math:`(z,0) ~ (e^{2\pi i / m}z,0)` and :math:`(z,1)~(e^{2\pi i/n}z,1)`. If we let :math:`X_m`
    and :math:`X_n` be the two halves of :math:`X` formed by the quotients of :math:`S^1 \times [0, \frac{1}{2}]` and :math:`S^1 \times [\frac{1}{2}, 1]`,
    then :math:`X_m` and :math:`X_n` are the mapping cylinders of :math:`z \mapsto z^m` and :math:`z \mapsto z^n`. The intersection
    :math:`X_m \cup X_n` is the circle :math:`S^1 \times \{\frac{1}{2}\}`, the domain end of each mapping cylinder.

    |indent| To obtain an embedding of :math:`X` in :math:`S^3 - K` as a deformation retract we will use the 
    standard decomposition of :math:`S^3` into to solid tori :math:`S^1 \times D^2` and :math:`D^2 \times S^1`, the result of
    regarding :math:`S^3` as :math:`\partial D^4 = \partial(D^2 \times D^2) = \partial D^2 \times D^2 \cup D^2 \times \partial D^2`. Geometrically, the first
    solid torus :math:`S^1 \times D^2` can be identified with the compact region in :math:`\mathbb{R}^3` bounded by the 
    standard torus :math:`S^1 \times S^1` containing :math:`K`, and the second solid torus :math:`D^2 \times S^1` is then the
    closure of the complement of the first solid torus, together with the compactification
    point at infinity. Notice that meridional circles in :math:`S^1 \times S^1` bound disks in the first solid
    torus, while it is longitudinal circles that bound disks in the second solid torus.

    .. image:: fig/eg-1-24-b.png
        :align: right
        :width: 25%

    |indent| In the first solid torus, :math:`K` intersects each of the meridian
    circles :math:`\{x\} \times \partial D^2` in :math:`m` equally spaced points, as indicated in 
    the figure at the right, which shows a meridian disk :math:`\{x\} \times D^2`.
    These :math:`m` points can be separated by a union of :math:`m` radial line
    segments. Letting :math:`x` vary, these radial segments then trace out
    a copy of the mapping cylinder :math:`X_m` in the first solid torus.
    Symmetrically, there is a copy of the other mapping cylinder :math:`X_n` in the second solid torus.
    The complement of :math:`K` in the first solid torus deformation retracts onto :math:`X_m` by flowing
    within each meridian disk as shown. In similar fashion the complement of :math:`K` in the 
    second solid torus deformation retracts onto :math:`X_n`. These two deformation retractions 
    do not agree on their common domain of definition :math:`S^1 \times S^1 - K`, but this is easy to 
    correct by distorting the flows in the two solid tori so that in :math:`S^1 \times S^1 -K` both flows 
    are orthogonal to :math:`K`. After this modification we now have a well-defined deformation
    retraction of :math:`S^3-K` onto :math:`X`. Another way of describing the situation would be to 
    say that for an open :math:`\epsilon`-neighborhood :math:`N` of :math:`K` bounded by a torus :math:`T`, the complement
    :math:`S^3-N` is the mapping cylinder of a map :math:`T \rightarrow X`.

    |indent| To compute :math:`\pi_1(X)` we apply van Kampen's theorem to the decomposition of :math:`X`
    as the union of :math:`X_m` and :math:`X_n`, or more properly, open neighborhoods of these two 
    sets that deformation retract onto them. Both :math:`X_m` and :math:`X_n` are mapping cylinders
    that deformation retract onto circles, and :math:`X_m \cup X_n` is a circle, so all three of these
    spaces have fundamental group :math:`\mathbb{Z}`. A loop in :math:`X_m \cup X_n` representing a generator of
    :math:`\pi_1(X_m \cup X_n)` is homotopic in :math:`X_m` to a loop representing :math:`m` times a generator, and in
    :math:`X_n` to a loop representing :math:`n` times a generator. Van Kampen's theorem then says that 
    :math:`\pi_1(X)` is the quotient of the free group on generators :math:`a` and :math:`b` obtained by factoring
    out the normal subgroup generated by the element :math:`a^mb^{-n}`.

    |indent| Let us denote by :math:`G_{m,n}` this group :math:`\pi_1(X_{m,n})` defined by two generators :math:`a` and
    :math:`b` and one relation :math:`a^m = b^n`. If :math:`m` or :math:`n` is :math:`1`, then :math:`G_{m,n}` is infinite cyclic since in
    these cases the relation just expresses one generator as a power of the other. To
    describe the structure of :math:`G_{m,n}` when :math:`m,n>1` let us first compute the center of
    :math:`G_{m,n}`, the subgroup consisting of elements that commute with all elements of :math:`G_{m,n}`.
    The element :math:`a^m=b^n` commutes with :math:`a` and :math:`b`, so the cyclic subgroup :math:`C` generated
    by this element lies in the center. In particular, :math:`C` is a normal subgroup, so we can
    pass to the quotient group :math:`G_{m,n} /C`, which is the free product :math:`\mathbb{Z}_m * \mathbb{Z}_n`. According
    to :ref:`Exercise 1 <Exercise 1-2-1>` at the end of this section, a free product of nontrivial groups has trivial
    center. From this it follows that :math:`C` is exactly the center of :math:`G_{m,n}`. As we will see in
    :ref:`Example 1.44 <Example 1.44>`, the elements :math:`a` and :math:`b` have infinite order in :math:`G_{m,n}`, so :math:`C` is infinite cyclic,
    but we will not need this fact here.

    |indent| We will show now that the integers :math:`m` and :math:`n` are uniquely determined by the 
    group :math:`\mathbb{Z}_m * \mathbb{Z}_n`, hence also by :math:`G_{m,n}`. The abelianization of :math:`\mathbb{Z}_m * \mathbb{Z}_n` is :math:`\mathbb{Z}_m \times \mathbb{Z}_n`, of
    order :math:`mn` , so the product :math:`mn` is uniquely determined by :math:`\mathbb{Z}_m * \mathbb{Z}_n`. To determine :math:`m`
    and :math:`n` individually, we use another assertion from :ref:`Exercise 1 <Exercise 1-2-1>` at the end of the section,
    that all torsion elements of :math:`\mathbb{Z}_m * \mathbb{Z}_n` are conjugate to elements of one of the subgroups
    :math:`\mathbb{Z}_m` and :math:`\mathbb{Z}_n`, hence have order dividing :math:`m` or :math:`n`. Thus the maximum order of torsion
    elements of :math:`\mathbb{Z}_m * \mathbb{Z}_n` is the larger of :math:`m` and :math:`n`. The larger of these two numbers is 
    therefore uniquely determined by the group :math:`\mathbb{Z}_m * \mathbb{Z}_n`, hence also the smaller since the
    product is uniquely determined.

    |indent| The preceding analysis of :math:`\pi_1(X_{m,n})` did not need the assumption that :math:`m` and :math:`n`
    are relatively prime, which was used only to realte :math:`X_{m,n}` to torus knots. An interesting
    fact is that :math:`X_{m,n}` can be embedded in :math:`\mathbb{R}^3` only when :math:`m` and :math:`n` are relatively prime.
    This is shown in the remarks following :ref:`Corollary 3.46 <Corollary 3.46>`. For example, :math:`X_{2,2}` is the Klein
    bottle since it is the union of two copies of the Möbius band :math:`X_2` with their boundary 
    circles identified, so this nonembeddability statement generalizes the fact that the 
    Klein bottle cannot be embedded in :math:`\mathbb{R}^3`.

    |indent| An algorithm for computing a presentation for :math:`\pi_1(\mathbb{R}^3 - K)` for an arbitrary smooth
    or piecewise linear knot :math:`K` is described in the exercises, but the problem of determining
    when two of these fundamental groups are isomorphic is generally much more
    difficult than in the special case of torus knots.

.. _Example 1.25:

.. container::

    .. image:: fig/eg-1-25.png
        :align: right
        :width: 20%
        
    **Example 1.25: The Shrinking Wedge of Circles.** Consider the subspace
    :math:`X \subset \mathbb{R}^2` that is the union of the circles :math:`C_n` of radius :math:`\frac{1}{n}` and
    center :math:`(\frac{1}{n}, 0)` for :math:`n=1,2, \cdots`. At first glance one might confuse
    :math:`X` with the wedge sum of an infinite sequence of circles, but we will
    show that :math:`X` has a much larger fundamental group than the wedge
    sum. Consider the retractions :math:`r_n : X \rightarrow C_n` collapsing all :math:`C_i`'s except :math:`C_n` to the origin.
    Each :math:`r_n` induces a surjection :math:`\rho _n : \pi_1(X) \rightarrow \pi_1(C_n) \approx \mathbb{Z}`, where we take the origin as
    the basepoint. The product of the :math:`\rho_n`'s is a homomorphism :math:`\rho :\pi_1(X) \rightarrow \prod _\infty \mathbb{Z}` to the 
    direct product (not the direct sum) of infinitely many copies of :math:`\mathbb{Z}`, and :math:`\rho` is surjective
    since for every sequence of integers :math:`k_n` we can construct a loop :math:`f:I\rightarrow X` that wraps
    :math:`k_n` times around :math:`C_n` in the time interval :math:`[1-\frac{1}{n},1-\frac{1}{n+1}]`. This infinite composition
    of loops is certainly continuous at each time less than :math:`1`, and it is continuous at time
    :math:`1` since every neighborhood of the basepoint in :Math:`X` contains all but finitely many of the 
    circles :math:`C_n`. Since :math:`\pi_1(X)` maps onto the uncountable group :math:`\prod_\infty \mathbb{Z}`, it is uncountable.
    On the other hand, the fundamental group of a wedge sum of countably many circles
    is countably generated, hence countable.

    |indent| The group :math:`\pi_1(X)` is actually far more complicated than :math:`\prod_\infty \mathbb{Z}`. For one thing,
    it is nonabelian, since the retraction :math:`X \rightarrow C_1 \cup \cdots \cup C_n` that collapses all the circles
    smaller than :math:`C_n` to the basepoint induces a surjection from :math:`\pi_1(X)` to a free group on 
    :math:`n` generators. For a complete description of :math:`\pi_1(X)` see :ref:`[Cannon & Conner 2000] <>`.

    |indent| It is a theorem of :ref:`[Shelah 1988] <>` that for a path-connected, locally path-connected 
    compact metric space :math:`X`, :math:`\pi_1(X)` is either finitely generated on uncountable.

    

.. |indent| raw:: html

    <span style="margin-left: 2em">

.. |qed| raw:: html
    
    <span style="float:right">&#9723</span>