Computing simplicial representatives of homotopy group elements
 211 Downloads
Abstract
A central problem of algebraic topology is to understand the homotopy groups\(\pi _d(X)\) of a topological space X. For the computational version of the problem, it is well known that there is no algorithm to decide whether the fundamental group\(\pi _1(X)\) of a given finite simplicial complex X is trivial. On the other hand, there are several algorithms that, given a finite simplicial complex X that is simply connected (i.e., with \(\pi _1(X)\) trivial), compute the higher homotopy group \(\pi _d(X)\) for any given \(d\ge 2\). However, these algorithms come with a caveat: They compute the isomorphism type of \(\pi _d(X)\), \(d\ge 2\) as an abstract finitely generated abelian group given by generators and relations, but they work with very implicit representations of the elements of \(\pi _d(X)\). Converting elements of this abstract group into explicit geometric maps from the ddimensional sphere \(S^d\) to X has been one of the main unsolved problems in the emerging field of computational homotopy theory. Here we present an algorithm that, given a simply connected space X, computes \(\pi _d(X)\) and represents its elements as simplicial maps from a suitable triangulation of the dsphere \(S^d\) to X. For fixed d, the algorithm runs in time exponential in \(\mathrm {size}(X)\), the number of simplices of X. Moreover, we prove that this is optimal: For every fixed \(d\ge 2\), we construct a family of simply connected spaces X such that for any simplicial map representing a generator of \(\pi _d(X)\), the size of the triangulation of \(S^d\) on which the map is defined, is exponential in \(\mathrm {size}(X)\).
Keywords
Computational homotopy theory Effective Hurewicz Theorem Whitehead towerMathematics Subject Classification
68U05 68W99 68Q17 55Q05 55P991 Introduction
One of the central concepts in topology are the homotopy groups\(\pi _d(X)\) of a topological space X. Similar to the homology groups\(H_d(X)\), the homotopy groups \(\pi _d(X)\) provide a mathematically precise way of measuring the “ddimensional holes” in X, but the latter are significantly more subtle and computationally much less tractable than the former. Understanding homotopy groups has been one of the main challenges propelling research in algebraic topology, with only partial results so far despite an enormous effort (see, e.g., Ravenel 2004; Kochman 1990); the amazing complexity of the problem is illustrated by the fact that even for the 2dimensional sphere \(S^2\), the higher homotopy groups \(\pi _d(S^2)\) are nontrivial for infinitely many d and known only for a few dozen values of d.
For computational purposes, we consider spaces that have a combinatorial description as simplicial sets (or, alternatively, finite simplicial complexes) and maps between them as simplicial maps.
A fundamental computational result about homotopy groups is negative: There is no algorithm to decide whether the fundamental group\(\pi _1(X)\) of a finite simplicial complex X is trivial, i.e., whether every continuous map from the circle \(S^1\) to X can be continuously contracted to a point; this holds even if X is restricted to be 2dimensional.^{1}
On the other hand, given a space X that is simply connected (i.e., path connected and with \(\pi _1(X)\) trivial) there are algorithms that compute the higher homotopy group \(\pi _d(X)\), for every given \(d \ge 2\). The first such algorithm was given by Brown (1957), and newer ones have been obtained as a part of general computational frameworks in algebraic topology; in particular, an algorithm based on the methods of Sergeraert (1994) and Rubio and Sergeraert (2002) was described by Real (1996).
More recently, Čadek et al. (2014b) proved that, for any fixed d, the homotopy group \(\pi _d(X)\) of a given 1connected finite simplicial set can be computed in polynomial time. On the negative side, computing \(\pi _d(X)\) is #Phard if d is part of the input (Anick 1989; Čadek et al. 2013b) (and, moreover, W[1]hard with respect to the parameter dMatoušek 2014), even if X is restricted to be 4dimensional. These results form part of a general effort to understand the computational complexity of topological questions concerning the classification of maps up to homotopy (Čadek et al. 2013a, b, 2014a; Filakovský and Vokřínek 2013) and related questions, such as the embeddability problem for simplicial complexes (a higherdimensional analogue of graph planarity) (Matoušek et al. 2011, 2014; Čadek et al. 2017).
1.1 Our results: representing homotopy classes by explicit maps
By definition, elements of \(\pi _d(X)\) are equivalence classes of continuous maps from the ddimensional sphere \(S^d\) to X, with maps being considered equivalent (or lying in the same homotopy class) if they are homotopic, i.e. if they can be continuously deformed into one another (see Sect. 3 for more details).
The algorithms of Brown (1957) or Čadek et al. (2014b) mentioned above compute \(\pi _d(X)\) as an abstract abelian group, in terms of generators and relations.^{2} However, they work with very implicit representations of the elements of \(\pi _d(X)\).
On the other hand, assuming that X is finite, 0reduced and \((d1)\) connected, Berger (1991, 1995) presented an algorithm that computes generators of \(\pi _d (X)\) as explicit simplicial maps.
Combining this algorithm with an algorithmic construction of the Whitehead tower, we managed to drop the condition on the connectivity and obtained the main result of this paper: an algorithm that, given an element \(\alpha \) of \(\pi _d(X)\), computes a suitable triangulation \({\varSigma }^d\) of the sphere \(S^d\) and an explicit simplicial map \({\varSigma }^d \rightarrow X\) representing the given homotopy class \(\alpha \).
Apart from the intrinsic importance of homotopy groups, we see this as a step towards the more general goal of computing explicit maps with specific topological properties; instances of this goal include computing explicit representatives of homotopy classes of maps between more general spaces X and Y (a problem raised in Čadek et al. 2014a) as well as computing an explicit embedding of a given simplicial complex into \({\mathbb {R}}^d\) (as opposed to deciding embeddability). Moreover, these questions are also closely related to quantitative questions in homotopy theory (Gromov 1999) and in the theory of embeddings (Freedman and Krushkal 2014). See Sect. 1.2 for a more detailed discussion of these questions.
Throughout this paper, we assume that the input X is simply connected, i.e., that it is connected and has trivial fundamental group \(\pi _1(X)\). For the purpose of the exposition, we will assume that X is given as a 1reduced simplicial set, encoded as a list of its nondegenerate simplices and boundary operators given via finite tables. We remark that the class of 1reduced simplicial sets contains standard models of 1connected topological spaces, such as spheres or complex projective spaces. A more general version of the theorem that also includes simply connected simplicial complexes is discussed in Sect. 4.
Theorem A
There exists an algorithm that, given \(d\ge 2\) and a finite 1reduced simplicial set X, computes a set of generators \(g_1,\ldots , g_k\) of \(\pi _d(X)\) as simplicial maps \({\varSigma }_j^d\rightarrow X\), for suitable triangulations \({\varSigma }_j^d\) of \(S^d\), \(j=1,\ldots ,k\).
For fixed d, the time complexity is exponential in the size (number of simplices) of X; more precisely, it is \(O(2^{P(\mathrm {size}(X))})\) where \(P=P_d\) is a polynomial depending only on d.
Any element of \(\pi _d(X)\) can be expressed as a sum of generators, and expressing the sum of two explicit maps from spheres into X as another explicit map is a simple operation. Hence, the algorithm in Theorem A can convert any element of \(\pi _d(X)\) into an explicit simplicial map.
Theorem A also has the following quantitative consequence: Fix some standard triangulation \({\varSigma }\) of the sphere \(S^d\), e.g., as the boundary of a \(d+1\)simplex. By the classical Simplicial Approximation Theorem (Hatcher 2001, 2.C), for any continuous map \(f:S^d \rightarrow X\), there is a subdivision \({\varSigma }'\) of \({\varSigma }\) and a simplicial map \(f':{\varSigma }'\rightarrow X\) that is homotopic to f. Theorem A implies that if f represents a generator of \(\pi _d(X)\), then the size of \({\varSigma }'\) can be bounded by an exponential function of the number of simplices of X.
Furthermore, we can show that the exponential dependence on the number of simplices in X is inevitable:
Theorem B
Let \(d\ge 2\) be fixed. Then there is an infinite family of ddimensional 0reduced 1connected simplicial sets X such that for any simplicial map \({\varSigma }\rightarrow X\) representing a generator of \(\pi _d(X)\), the triangulation \({\varSigma }\) of \(S^d\) on which f is defined has size at least \(2^{{\varOmega }(\mathrm {size}(X))}\). If \(d\ge 3\), we may even assume that X are 1reduced.
Consequently, any algorithm for computing simplicial representatives of the generators of \(\pi _d(X)\) for 1reduced simplicial set X has time complexity at least \(2^{{\varOmega }(\mathrm {size}(X))}\).
In Sects. 4 and 5, we state and prove generalizations of Theorems A and B denoted as Theorems A.1 and B.1 . They remove the assumption that X is 1reduced and replace it by a more flexible certificate of simply connectedness, allowing the input space X to be a more flexible simplicial set or simplicial complex.
This reduction from simplicial sets to simplicial complexes is achieved using a technical result we formulate later in the text as Lemma 6. The main ideas of this Lemma can be summarized as follows. For a finite simplicial complex \(X^{sc}\) endowed with a certificate of 1connectedness, we choose a spanning tree T and contract it into a point, creating a 0reduced simplicial set \(X=X^{sc}/T\). The certificate of 1connectedness transfers to X and generalizes the 1reduceness assumption in Theorem A. Once we compute a homotopy representative \({\varSigma }\rightarrow X\), we then convert it to an equivalent map \(Sd({\varSigma })\rightarrow X^{sc}\) where Sd is a suitable subdivision functor, see Sect. 8 for details.
1.1.1 Source of the exponential
Let us briefly discuss the source of the exponential time complexity bound: Given the X as an input in Theorem A, the algorithm computes a set of generators of \(\pi _d(X)\). These have an algebraic representation as elements of a simplicial group G. In particular, a generator \(g \in G\) of \(\pi _d\) has a form \(g = \gamma _1 ^{\alpha _1}\cdots \gamma _n ^{\alpha _n}\), where the elements \(\gamma _i\) are some agreed upon generators of G. The size of the exponents \(\alpha _i\) is considered in a standard way (i.e. number of bits). All steps are polynomial up to this point.
The exponential blowup happens, when we assign a simplicial model of a sphere to \(g = \gamma _1 ^{\alpha _1}\cdots \gamma _n ^{\alpha _n}\). The resulting sphere will contain \(\sim \)\(\sum _{i = 1} ^{n} \alpha _i\) number of distinct dsimplices. This number can be large (even though its bitsize is polynomial). Hence, just outputting all these simplices could have exponentialtime complexity in the input. In Theorem B, we show that this blowup really happens.
We remark that, in the boundary case of 1reduced simplicial sets for \(d=2\) (outside the scope of Theorem B), we don’t know whether the lower complexity bound is subexponential or not. However, we can show that the algorithm from Theorem A is optimal in that case as well, see a discussion in Sect. 5.
1.2 Related and future work
1.2.1 Computational homotopy theory and applications
This paper falls into the broader area of computational topology, which has been a rapidly developing area (see, for instance, the textbooks Edelsbrunner and Harer 2010; Zomorodian 2005; Matveev 2007); more specifically, as mentioned above, this work forms part of a general effort to understand the computational complexity of problems in homotopy theory, both because of the intrinsic importance of these problems in topology and because of applications in other areas, e.g., to algorithmic questions regarding embeddability of simplicial complexes (Matoušek et al. 2011; Čadek et al. 2017), to questions in topological combinatorics (see, e.g., Mabillard and Wagner 2016), or to the robust satisfiability of equations (Franek and Krčál 2015).
A central theme in topology is to understand the set [X, Y] of all homotopy classes of maps from a space X to a space Y. In many cases of interest, this set carries additional structure, e.g., an abelian group structure, as in the case \(\pi _d(X)=[S^d,X]\) of higher homotopy groups that are the focus of the present paper.
Homotopytheoretic questions have been at the heart of the development of algebraic topology since the 1940’s. In the 1990s, three independent groups of researchers proposed general frameworks to make various more advanced methods of algebraic topology (such as spectral sequences) effective (algorithmic): Schön (1991), Smith (1998), and Sergeraert, Rubio, Dousson, Romero, and coworkers (e.g., Sergeraert 1994; Rubio and Sergeraert 2002, 2005; Romero et al. 2006; also see Rubio and Sergeraert 2012 for an exposition). These frameworks yielded general computability results for homotopytheoretic questions (including new algorithms for the computation of higher homotopy groups Real 1996), and in the case of Sergeraert et al., also a practical implementation in form of the Kenzo software package (Heras et al. 2011).
Building on the framework of objects with effective homology by Sergeraert et al., in recent years a variety of new results in computational homotopy theory were obtained (Čadek et al. 2013b, 2014a, b, 2017; Krčál et al. 2013; Vokřínek 2017; Filakovský and Vokřínek 2013; Romero and Sergeraert 2012, 2016), including, in some cases, the first polynomialtime algorithms, by using a refined framework of objects with polynomialtime homology (Krčál et al. 2013; Čadek et al. 2014b) that allows for a computational complexity analysis. For an introduction to this area from a theoretical computer science perspective and an overview of some of these results, see, e.g., Čadek et al. (2013a) and the references therein.
1.2.2 Explicit maps
As mentioned above, the above algorithms often work with rather implicit representations of the homotopy classes in \(\pi _d(X)\) (or, more generally, in [X, Y]) but does not yields explicit maps representing these homotopy classes.
For instance, the algorithm in Real (1996) computes \(\pi _d(X)\) as the homology group\(H_d(F)\) of an auxiliary space \(F=F_d(X)\) constructed from X in such a way that \(\pi _d(X)\) and \(H_d(F)\) are isomorphic as groups.^{3}
More recently, Romero and Sergeraert (2016) devised an algorithm that, given a 1reduced (and hence simply connected) simplicial set X and \(d\ge 2\), computes the homotopy group \(\pi _d(X)\) as the homotopy group \(\pi _d(K)\) of an auxiliary simplicial set K (a socalled Kan completion of X) with \(\pi _d(X)\cong \pi _d(K)\). Moreover, given an element of this group, the algorithm can compute an explicit simplicial map \({\varSigma }^d \rightarrow K\) from a suitable triangulation of \(S^d\) to K representing the given homotopy class. In this way, homotopy classes are represented by explicit maps, but as maps to the auxiliary space K, which is homotopy equivalent to but not homeomorphic to the given space X.
By contrast, our general goal is to is represent homotopy classes by maps into the given space; in the present paper, we treat, as an important first instance, the case \(\pi _d(X)=[S^d,X]\).
1.2.3 Open problems and future work
Our next goal is to extend the results here to the setting of Čadek et al. (2014a), i.e., to represent, more generally, homotopy classes in [X, Y] by explicit simplicial maps from some suitable subdivision \(X'\) to Y (under suitable assumptions that allow us to compute [X, Y]).^{4}
In a subsequent step, we hope to generalize this further to the equivariant setting \([X,Y]_G\) of Čadek et al. (2017), in which a finite group G of symmetries acts on the spaces X, Y and all maps and homotopies are required to be equivariant, i.e., to preserve the symmetries.
As mentioned above, one motivation is the problem of algorithmically constructing embeddings of simplicial complexes into \({\mathbb {R}}^d\). Indeed, in a suitable range of dimensions (\(d\ge \frac{3(k+1)}{2}\)), the existence of an embedding of a finite kdimensional simplicial complex K into \({\mathbb {R}}^d\) is equivalent to the existence of an \({\mathbb {Z}}_2\)equivariant map from an auxiliary complex \({\tilde{K}}\) (the deleted product) into the sphere \(S^{d1}\), by a classical theorem of Haefliger (1962) and Weber (1967). The proof of the Haefliger–Weber Theorem is, in principle, constructive, but in order to turn this construction into an algorithm to compute an embedding, one needs an explicit equivariant map into the sphere \(S^{d1}\).
1.2.4 Quantitative homotopy theory
Another motivation for representing homotopy classes by simplicial maps and complexity bounds for such algorithms is the connection to quantitative questions in homotopy theory (Gromov 1999; Ferry and Weinberger 2013) and in the theory of embeddings (Freedman and Krushkal 2014). Given a suitable measure of complexity for the maps in question, typical questions are: What is the relation between the complexity of a given nullhomotopic map \(f: X\rightarrow Y\) and the minimum complexity of a nullhomotopy witnessing this? What is the minimum complexity of an embedding of a simplicial complex K into \({\mathbb {R}}^d\)? In quantitative homotopy theory, complexity is often quantified by assuming that the spaces are metric spaces and by considering Lipschitz constants (which are closely related to the sizes of the simplicial representatives of maps and homotopies Ferry and Weinberger 2013). For embeddings, the connection is even more direct: a typical measure is the smallest number of simplices in a subdivision \(K'\) or K such that there exists a simplexwise linearembedding \(K' \hookrightarrow {\mathbb {R}}^d\).
1.3 Structure of the paper
The remainder of the paper is structured as follows: In Sect. 2, we give a highlevel description of the main ingredients of the algorithm from Theorem A. In Sect. 3, we review a number of necessary technical definitions regarding simplicial sets and the frameworks of effective and polynomialtime homology, in particular Kan’s simplicial version of loop spaces and polynomialtime loop contractions for infinite simplicial sets. In Sect. 4, we formally describe the algorithm from Theorem A and give a high level proof based on a number of lemmas which are proved in in subsequent chapters. Section 5 contains the proof of Theorem B. The rest of the paper contains several technical parts needed for the proof of Theorem A: in Sect. 6, we describe Berger’s effective Hurewicz inverse and analyze its running time (Theorem 1), in Sect. 7, we prove that the stages of the Whitehead tower have polynomialtime contractible loops (Lemma 4). Finally, in Sect. 8, we show how to reduce the case when the input is a simplicial complex \(X^{sc}\) to the case of an associated simplicial set X and convert a map \({\varSigma }\rightarrow X\) into a map from a subdivision \(Sd({\varSigma })\) into \(X^{sc}\) (Lemma 6).
2 Outline of the algorithm
In this section we present a highlevel description of the main steps and ingredients involved in the algorithm from Theorem A.
2.1 The algorithm in a nutshell
 1.
In the simplest case when the space X is \((d1)\)connected (i.e., \(\pi _i({X})=0\) for all \(i\le d1\)), the classical Hurewicz Theorem (Hatcher 2001, Sect. 4.2) yields an isomorphism \(\pi _d(X)\cong H_d(X)\) between the dth homotopy group and the dth homology group of X. Computing generators of the homology group is known to be a computationally easy task (it amounts to solving a linear system of equations over the integers). The key is then converting the homology generators into the corresponding homotopy generators, i.e., to compute an inverse of the Hurewicz isomorphism. This was described in the work of Berger (1991, 1995). We analyze the complexity of Berger’s algorithm in detail and show that it runs in exponential time in the size of X (assuming that the dimension d is fixed).
 2.For the general case, we construct an auxiliary simplicial set \(F_d\) together with a simplicial map \(\psi _d: F_d\rightarrow {X}\) that has the following properties:Our construction of \(F_d\) is based on computing stages of the Whitehead tower^{5} of X (Hatcher 2001, p. 356); this is similar to Real’s algorithm, which computes \(\pi _d(X)\) as \(H_d(F_d)\) as an abstract abelian group.

\(F_d\) is a simplicial set that is \(d1\) connected, and

\(\psi _d: F_d \rightarrow {X}\) induces an isomorphism \(\psi _{d*} : \pi _d(F_d) \rightarrow \pi _d({X})\).
The overall strategy is to use Berger’s algorithm on the space \(F_d\) and compute generators of \(\pi _d(F_d)\) as simplicial maps. Then we use the simplicial map \(\psi _d\) to convert each generator of \(\pi _d(F_d) \) into a map \({\varSigma }^d\rightarrow {X}\), and these maps generate \(\pi _d({X})\). The main technical task for this step is to show that Berger’s algorithm can be applied to \(F_d\). For this, we need to construct a polynomial algorithm for explicit contractions of loops in \(F_d\) (this space is 1connected but not 1reduced in general).

2.2 Our contributions
The main ingredients of the algorithm outlined above are the computability of stages of the Whitehead tower (Real 1996) as simplicial sets with polynomialtime homology and Berger’s algorithmization of the inverse Hurewicz isomorphism (Berger 1991, 1995).

We give a complexity analysis of Berger’s algorithm to compute the inverse of the Hurewicz isomorphism (Theorem 1).

We show that the homology generators of the Whitehead stage \(F_d\) can be computed in polynomial time (Lemma 3).

Berger’s algorithm requires an explicit algorithm for loop contraction—a certificate of 1connectedness of the space \(F_d\). While \(F_d\) is not 1reduced in general, we describe an explicit algorithm for contracting its loop and show that Berger’s algorithm can be applied.
3 Definitions and preliminaries
In this section, we give the necessary technical definitions that will be used throughout this paper. In the first part, we recall the standard definitions for simplicial sets and the toolbox of effective homology.
Afterwards, we present Kan’s definition of a loop space and further formalize our definition of (polynomialtime) loop contractions.
3.1 Simplicial sets and polynomialtime effective homology
3.1.1 Simplicial sets and their computer representation
Simplicial maps between simplicial sets are maps of graded sets which commute with the face and degeneracy operators. The elements of \(X_{n}\) are called \({n}\)simplices. We say that a simplex \(x \in X_{n}\) is (non)degenerate if it can(not) be expressed as \(x = s_i y\) for some \(y \in X_{{n}1}\). If a simplicial set X is also a graded (Abelian) group and face and degeneracy operators are group homomorphisms, we say that X is a simplicial (Abelian) group.
A simplicial set is called kreduced for \(k\ge 0\) if it has a single isimplex for each \(i\le k\).
We define a simplicial set to be finite if it has finitely many nondegenerate simplices. Such simplicial set can be algorithmically represented in the following way. The encoding of nondegenerate simplices can be given via a finite list and the encoding of a degenerate simplex \(s_{i_k}\ldots s_{i_1} y\) for \(i_1<i_2<\cdots <i_k\) and a nondegenerate y can be assumed to be a pair consisting of the sequence \((i_1,\ldots , i_k)\) and the encoding of y. The face operators are fully described by their action on nondegenerate simplices and can be given via finite tables. In this way, any simplicial set with finitely many nondegenerate simplices is naturally locally effective. Any choice of an implementation of the encoding and face operators is called a representation of the simplicial set. The size of a representation is the overall memory space one needs to store the data which represent the simplicial set.
3.1.2 Geometric realization
Similarly, a simplicial map between simplicial complexes naturally induces a continuous map between their geometric realizations.
3.1.3 Simplicial complexes and simplicial sets
In any simplicial complex \(X^{sc}\), we can choose an ordering of vertices and define a simplicial sets \(X^{ss}\) that consists of all nondecrasing sequences of points in \(X^{sc}\): the dimension of \((V_0,\ldots , V_d)\) equals d. The face operator is \(d_i\) omits the i’th coordinate and the degeneracy \(s_j\) doubles the j’th coordinate. Moreover, choosing a maximal tree T in the 1skeleton of X enables us to construct a simplicial set \({X}:=X^{ss}/T\) in which all vertices and edges in the tree, as well as their degeneracies, are considered to be a basepoint (or its degeneracies). The geometric realizations of \(X^{sc}\) and X are homotopy equivalent and X is 0reduced, i.e. it has one vertex only.
3.1.4 Homotopy groups
Let \((X,x_0)\) be a pointed topological space. The kth homotopy group \(\pi _k(X,x_0)\) of \((X,x_0)\) is defined as the set of pointed homotopy^{6} classes of pointed continuous maps \(({S}^k , *) \rightarrow (X,x_0)\), where \(* \in {S}^k\) is a distinguished point. In particular, the 0th homotopy group has one element for each path connected component of X. For \(k=1\), \(\pi _1(X,x_0)\) is the fundamental group of X, once we endow it with the group operation that concatenates loops starting and ending in \(x_0\). The group operation on \(\pi _k(X,x_0)\) for \(k>1\) assigns to [f], [g] the homotopy class of the composition \(S^k{\mathop {\rightarrow }\limits ^{\pi }} S^k\vee S^k {\mathop {\rightarrow }\limits ^{f\vee g}} X\) where \(\pi \) factors an equatorial \((k1)\)sphere containing \(x_0\) into a point. Homotopy groups \(\pi _k\) are commutative for \(k>1\).
If the choice of basepoints is understood from the context or unimportant, we will use the shorter notation \(\pi _k(X)\). For a simplicial set X, we will use the notation \(\pi _k(X)\) for the k’th homotopy group of its geometric realization X.
An important tool for computing homotopy groups is the Hurewicz theorem. It says that whenever X is \((d1)\)connected, then there is an isomorphism \(\pi _d(X)\rightarrow H_d(X)\). Moreover, if the element of \(\pi _d(X)\) is represented by a simplicial map \(f: {\varSigma }^d\rightarrow X\) and \(\sum _j k_j \sigma _j\) represents a homology generator of \(H_d({\varSigma }^d)\), then the Hurewicz isomorphism maps [f] to the homology class of the formal sum \(\sum _{j} k_j f(\sigma _j)\) of dsimplices in X.
3.1.5 Effective homology
We call a chain complex \(C_*\)locally effective if the elements \(c\in C_*\) have finite (agreed upon) encoding and there are algorithms computing the addition, zero, inverse and differential for the elements of \(C_*\).
A locally effective chain complex \(C_*\) is called effective if there is an algorithm that for given \(n \in {\mathbb {N}}\) generates a finite basis \(c_\alpha \in C_n\) and an algorithm that for every \(c\in C_*\) outputs the unique decomposition of c into a linear combination of \(c_\alpha \)’s.
Let \(C_*\) and \(D_*\) be chain complexes. A reduction Open image in new window is a triple (f, g, h) of maps such that \(f: C_*\rightarrow D_*\) and \(g: D_*\rightarrow C_*\) are chain homomorphisms, \(h: C_*\rightarrow C_*\) has degree 1, \(fg=\mathrm {id}\) and \(fg\mathrm {id}=h\partial + \partial h\), and further \(hh=hg=fh=0\).
A locally effective chain complex \(C_*\) has effective homology (\(C_*\) is a chain complex with effective homology) if there is a locally effective chain complex \({\tilde{C}}_*\), reductions Open image in new window where \(C_* ^\mathrm {ef}\) is an effective chain complex, and all the reduction maps are computable.
3.1.6 Eilenberg–MacLane spaces
Let \(d\ge 1\) and \(\pi \) be an Abelian group. An Eilenberg–MacLane space \(K(\pi , d)\) is a topological space with the properties \(\pi _d(K(\pi ,d))\simeq \pi \) and \(\pi _j(K(\pi ,d))=0\) for \(0<j\ne d\). It can be shown that such space \(K(\pi ,d)\) exists and, under certain natural restrictions, has a unique homotopy type. If \(\pi \) is finitely generated, then \(K(\pi ,d)\) has a locally effective simplicial model (Krčál et al. 2013).
3.1.7 Globally polynomialtime homology and related notions
In many auxiliary steps of the algorithm, we will construct various spaces and maps. To analyze the overall time complexity, we need to parametrize all these objects by the very initial input, which is in our case an encoding of a finite 1reduced simplicial set (or, in Theorem A.1, a more general space endowed with certain explicit certificate of 1connectedness).
More generally, let \({\mathcal {I}}\) be a parameter set so that for each \(I\in {\mathcal {I}}\) an integer \(\mathrm {size}(I)\) is defined. We say that F is a parametrized simplicial set (group, chain group, ...) if for each \(I\in {\mathcal {I}}\), a locally effective simplicial set (group, chain group, ...) F(I) is given. The simplicial set F is locally polynomialtime if there exists a locally effective model of F(I) such that for each \(k\in {\mathbb {N}}\) and an encoding of a ksimplex \(x\in F(I)\), the encoding of \(d_i(x)\) and \(s_j(x)\) can be computed in time polynomial in \(\mathrm {size}(\text {enc}(x))+\mathrm {size}(I)\). The polynomial, however, may depend on k. A polynomialtime map between parametrized simplicial sets F and G is an algorithm that for each \(k\in {\mathbb {N}}\), \(I\in {\mathcal {I}}\) and an encoding of an ksimplex x in F(I) computes the encoding of f(x) in time polynomial in \(\mathrm {size}(\text {enc}(x))+\mathrm {size}(I)\): again, the polynomial may depend on k.
Similarly, a locally polynomialtime (parametrized) chain complex is an assignment of a computer representation \(C_*(I)\) of a chain complex with a distinguished basis in each gradation, such that all these basis elements have some agreedupon encoding. A chain \(\sum _j k_j \sigma _j\) is assumed to be represented as a list of pairs \((k_j, \text {enc}(\sigma _j))_j\) and has size \(\sum _j (\mathrm {size}(k_j)+\mathrm {size}(\text {enc}(\sigma _j)))\), where we assume that the size of an integer \(k_j\) is its bitsize. Further, an algorithm is given that computes the differential of a chain \(z\in C_k(I)\) in time polynomial in \(\mathrm {size}(z)+\mathrm {size}(I)\), the polynomial depending on k. The notion of a polynomialtime chain map is straightforward.
A globally polynomialtime chain complex is a locally polynomialtime chain complex EC that in addition has all chain groups \(EC(I)_k\) finitely generated and an additional algorithm is given that for each k computes the encoding of the generators of \(EC(I)_k\) in time polynomial in \(\mathrm {size}(I)\). Finally, we define a simplicial set with globally polynomialtime homology to be a locally polynomialtime parametrized simplicial set F together with reductions Open image in new window where \({\tilde{C}},EC\) are locally polynomialtime chain complexes, EC is a globally polynomialtime chain complex and the reduction data are all polynomialtime maps, as usual the polynomials depending on the grading k.
The name “polynomialtime homology” is motivated by the following:
Lemma 1
Let F be a parametrized simplicial set with polynomialtime homology and \(k\ge 0\) be fixed. Then all generators of \(H_k(F(I))\) can be computed in time polynomial in \(\mathrm {size}(I)\).
Proof
For the globally polynomialtime chain complex EF and each fixed j, we can compute the matrix of the differentials \(d_j : EF(I)_j \rightarrow EF(I)_{j1}\) with respect to the distinguished bases in time polynomial in \(\mathrm {size}(I)\): we just evaluate \(d_k\) on each element of the distinguished basis of \(EF(I)_k\). Then the homology generators of \(H_k(EC)\) can be computed using a Smith normal form algorithm applied to the matrices of \(d_k\) and \(d_{k+1}\), as is explained in standard textbooks (such as Munkres 1984). Polynomialtime algorithms for the Smith normal form are nontrivial but known (Kannan and Bachem 1981).
3.2 Loop spaces and polynomialtime loop contraction
3.2.1 Principal bundles and loop group complexes
In the text we will frequently deal with principal twisted Cartesian products: these are simplicial analogues of principal fiber bundles. The definitions in this section come from Kan’s article (Kan 1958b).
We first define the Cartesian product \(X \times Y\) of simplicial sets X, Y: The set of nsimplices \((X \times Y)_n\) consists of tuples (x, y), where \(x \in X_n, x\in Y_n\). The face and degeneracy operators on \(X \times Y\) are given by \(d_i (x,y) = (d_i x, d_i y)\), \(s_i (x,y) = (s_i x, s_i y)\).
Definition 1

\(d_{n}\tau (b)=\tau (d_{n+1}b)^{1}\tau (d_n b)\)

\(d_i\tau (b)=\tau (d_{i}b )\) for \(0\le i < {n}\)

\(s_i\tau (b)=\tau (s_{i} b)\), \(i < {n}\), and

\(\tau (s_{n}b)=1_{n}\) for all \(b \in B_{n}\) where \(1_{n}\) is the unit element of \(G_{n}\).
It is not trivial to see why this should be the right way of representing fiber bundles simplicially, but for us, it is only important that it works, and we will have explicit formulas available for the twisting operator for all the specific applications.
We remark that in the literature one can find multiple definitions of twisted operator and twisted product (May 1992; Kan 1958b; Berger 1991) and that they, in essence differ from each other based on the decision whether the twisting “compresses” the first two or the last two face operators. Here, we follow the same notation as in Berger (1991).
3.2.2 Dwyer–Kan loop group construction
A simplicial set X can be viewed as a discrete description of a topological space X. It is natural to ask whether one can give a discrete description of a loop space of X. It turns out there are multiple models that can be used. Here, we describe the Dwyer–Kan’s Gconstruction (Kan 1958b) and later in Sect. 6, we present another model which is due to Berger (1991). Before the formal definition, we give some geometric intuition
For any \(n \ge 0\) one can define a graph where \(X_{n+1}\) is the set of edges and \(X_0\) is the set of vertices with source and target operators \(s,t:X_{n+1} \rightarrow X_0\), defined by \(s(\sigma ) = (d_0)^{n+1} \sigma \) and \(t (\sigma ) = d_{n+1} (d_0)^n \sigma \). Further a relation \(1 = s_n \sigma \) is added.
In short, any simplex \(\sigma \in X_{n+1}\) is an (ndimensional) edge which goes from its secondtolast vertex to its last vertex and the simplex degenerate along this edge is considered a trivial path.
The Dwyer–Kan loop groupoid GX is defined as a free simplicial groupoid (e.g. paths) on the graph described above. In the case X is a 0reduced simplicial set, the paths all begin and end in the only vertex, making them loops and the space GX can defined as follows:
Definition 2

\(GX_n\) has a generator \({\overline{\sigma }}\) for each \((n+1)\)simplex \(\sigma \in X\) and a relation \(\overline{s_{n} y}=1\) for each simplex in the image of the last degeneracy \(s_{n}\).

The face operators are given by \(d_i {\overline{\sigma }}:=\overline{d_i \sigma }\) for \(i<n\) and \(d_n {\overline{\sigma }}:=(\overline{d_{n+1}\sigma })^{1} \overline{d_n \sigma }\)

The degeneracy operators are \(s_i {\overline{\sigma }}:=\overline{s_i \sigma }\).
We use the multiplicative notation, with 1 being the neutral element. For the proof that GX is indeed a discrete simplicial analog of the loop space of X, see Kan (1958b) and May (1992).
For algorithmic puroposes, we assume that an elements \(\prod _{j} {\overline{\sigma }}_j^{k_j}\) of GX is represented as a list of pairs \((\sigma _j, k_j)\) and has size \(\sum _j \mathrm {size}(\sigma _j)+\mathrm {size}(k_j)\).
Definition 3
Let X be a 0reduced simplicial set. We say that a map \(c_0: GX_0\rightarrow GX_1\) is a contraction of loops in X if \(d_0 c_0(x)=x\) and \(d_1 c_0(x)=1\) for each \(x\in GX_0\).
3.2.3 Loop contraction for simplicial complexes

The end vertex of \(e_i\) equals the initial vertex of \(e_{i+1}\), and

The initial vertex of \(e_1\) and the end vertex of \(e_k\) equal R.
Definition 4
Let S be a set, \(U\subseteq S\), F(S) and F(U) be free groups generated by S, U, respectively.^{7} Let \(h_U: F(S)\rightarrow F(S)\) be a homomorphism that sends each \(u\in U\) to 1 and each \(s\in S{\setminus } U\) to itself. We say that an element x of F(S) equals y modulo U if \(h_U(x)=y\).
An example of an element that is trivial modulo U is the word \(s \, u \, s^{1}\), where \(s\in S\) and \(u\in U\).
Definition 5

for each i, \(\{A_i,A_{i+1}, B_{i+1}\}\) is a simplex of \(X^{sc}\), and
 the element of F(S)equals \(\alpha \) modulo U.$$\begin{aligned} (A_0 B_1) (B_1 A_1) (A_1 B_2) (B_2 A_2) \ldots (B_s A_s) (A_s A_{s1}) (A_{s1} A_{s2}) \ldots (A_1 A_0) \end{aligned}$$(1)
A loop contraction in a simplicial complex is the choice of a contraction of \(\alpha \) for each edge \(\alpha \in X^{sc}{\setminus } T\).
The geometry behind this definition is displayed in Fig. 1. The sequence of \(A_i\)’s and \(B_j\)’s gives rise to a map from the sequence of (full) triangles into \(X^{sc}\). The big loop around the boundary is combinatorially described by (1). We can continuously contract all of its parts that are in the tree T to a chosen basepoint, as the tree is contractible. Further, we can continuously contract all pairs of edges \((e,e^{1})\) and what remains is the original edge \(\alpha \): with all the tree contracted to a point, it will be transformed into a loop that geometrically corresponds to \(l_\alpha \). The interior of the full triangles then constitutes its “filler”, hence a certificate of the contractibility of \(l_\alpha \).
A loop contraction in the sense of Definition 1 exists iff the space \(X^{sc}\) is simply connected. One could choose different notions of loop contraction. For instance, we could provide, for each \(\alpha \), a simplicial map from a triangulated 2disc into \(X^{sc}\) such that the oriented boundary of the disc would be mapped exactly to \(l_\alpha \). The description from Definition 5 could easily be converted into such map. We chose the current definition because of its canonical and algebraic nature. The connection between Definitions 3 and 5 is the content of the following lemma.
Lemma 2
Let \(X^{sc}\) be a 1connected simplicial complex with a chosen orientation of all simplices, \(X^{ss}\) the induced simplicial set, T a maximal tree in \(X^{sc}\), and \({X}:=X^{ss}/T\) the corresponding 0reduced simplicial set. Assume that a loop contraction in the simplicial complex \(X^{sc}\) is given, such as described in Definition 5. Then we can algorithmically compute \(c_0(\alpha )\in G{X}_1\) such that \(d_0 c_0(\alpha )=\alpha \) and \(d_1 c_0(\alpha )=1\), for every generator \(\alpha \) of \(G{X}_0\). Moreover, the computation of \(c_0(\alpha )\) is linear in the size of \(X^{sc}\) and the size of the simplicial complex contraction data.
Proof

If \(\sigma _i=(B_{i+1}, A_i, A_{i+1})\), then \(g_i:={\overline{\sigma }}_i\),

If \(\sigma _i=(A_i, A_{i+1}, B_{i+1})\), then \(g_i:=s_0\overline{(d_2 {\sigma _i})} \, {\overline{\sigma }}_i \,s_0 d_0({\overline{\sigma }}_i)^{1}\)

If \(\sigma _i=(A_{i+1}, B_{i+1}, A_{i})\), then \(g_i= s_0 d_0\overline{\sigma _i}^{1} \,\overline{\sigma _i} \, s_0 (\overline{d_1 {\sigma }_i})^{1}\)

If \(\sigma _i=(B_{i+1}, A_{i+1}, A_i)\), then \(g_i:=\overline{\sigma _i}^{1}\)

If \(\sigma _i=(A_{i+1}, A_i, B_{i+1})\), then \(g_i:= s_0 d_0\overline{\sigma _i} \,\, \overline{\sigma _i}^{1}\, s_0 (\overline{d_2 \sigma _i})^{1}\)

If \(\sigma _i=(A_{i}, B_{i+1}, A_{i+1})\), then \(g_i:=s_0(\overline{d_1 \sigma _i})\,\overline{\sigma _i}^{1} s_0 d_0\overline{\sigma _i}\).
3.2.4 Polynomialtime loop contraction
Let F be a parametrized simplicial set such that each F(I) is 0reduced. Using constructions analogous to those defined above, GF is a parametrized locallypolynomial simplicial group whereas we assume a simple encoding of elements of \(GF_i\) as follows. If \(x=\prod _j \overline{\sigma _j}^{k_j}\in GF(I)_k\) where \(\sigma _j\) are \((k+1)\)simplices in F(I), not in the image of \(s_k\), then we assume that x is stored in the memory as a list of pairs \((k_j,\text {enc}(\sigma _j))\) and has size \(\sum _j (\mathrm {size}(k_j)+\mathrm {size}(\sigma _j))\) where some \(\sigma _i\) may be equal to \(\sigma _j\) for \(i\ne j\). Face and degeneracy operators are defined in Definition (2) and it is easy to see that for any locally polynomialtime simplicial set F, GF is a locally polynomialtime simplicial group.
Definition 6
Let F be a locally polynomial simplicial set. We say that F has polynomially contractible loops if there exists an algorithm that for a 0simplex \(x\in GF(I)\) computes a 1simplex \(c_0(x)\in GF(I)\) such that \(d_0 x=x\), \(d_1 x=1 \in GF(I)_0\), and the runningtime is polynomial in \(\mathrm {size}(x)+\mathrm {size}(I)\).
4 Proof of Theorem 1
We will prove a stronger statement of Theorem A formulated as follows.
Theorem A.1
There exists an algorithm that, given \(d\ge 2\) and a finite 0reduced simplicial set X (alternatively, a finite simplicial complex) with an explicit loop contraction \(c_0\) (such as in Definitions 3 or 5) computes the generators \(g_1,\ldots , g_k\) of \(\pi _d(X)\) as simplicial maps \({\varSigma }_j^d\rightarrow X\), for suitable triangulations \({\varSigma }_j^d\) of \(S^d\), \(j=1,\ldots ,k\).
For fixed d, the time complexity is exponential in the size of X and the size of the loop contraction \(c_0\); more precisely, it is \(O(2^{P(\mathrm {size}(X)+\mathrm {size}(c_0))})\) where \(P=P_d\) is a polynomial depending only on d.
This immediately implies Theorem A, as for a 1reduced simplicial set, the contraction \(c_0\) is trivial, given by \(c_0(1)=1\).
The proof of Theorem A.1 is based on a combination of four statements presented here as Lemma 3, Theorem 1, Lemma 4 and Lemma 6. Each of them is relatively independent and their proofs are delegated to further sections.

the simplicial set \(F_d\) is \(d1\) connected, it has polynomialtime effective homology and polynomially contractible loops.

the simplicial map \(\psi _d: F_d \rightarrow X\) is polynomialtime and induces an isomorphism \(\psi _{d*} : \pi _d(F_d) \rightarrow \pi _d(X)\).
4.1 Whitehead tower
Lemma 3
Let \(d\ge 2\) be a fixed integer. Then there exists a polynomialtime algorithm that, for a given 1connected finite simplicial set X, constructs the stages \(F_2, \ldots , F_d\) of the Whitehead tower of X.
The simplicial sets \(F_k(X)\), parametrized by 1connected finite simplicial sets X, have polynomialtime homology and the maps \(f_k\) are polynomialtime simplicial maps.
Proof
 1.
We compute simplicial map \(\varphi _{k}: F_{k} \rightarrow K(\pi _{k}(X), k) = K(\pi _k(F_k), k)\) that induces an isomorphism \(\varphi _{k*}: \pi _{k}(F_{k}) \rightarrow \pi _{k}(K(\pi _{k}(X), k))\cong \pi _{k}(X)\). This is done using the algorithm in Čadek et al. (2014b), as \(K(\pi _{k}(X), k)\) is the first nontrivial stage of the Postnikov tower for the simplicial set \(F_{k}\).
For the simplicial set \(K(\pi _{k}(X), k)\) and for such simplicial sets there is a classical principal bundle (twisted Cartesian product) (see May 1992):  2.We construct \(F_{k+1}\) and \(f_{k+1}\) as a pullback of the twisted Cartesian product:
To show correctness of the algorithm, we assume inductively, that \(F_{k}\) has polynomialtime effective homology. According to Čadek et al. (2014b, Section 3.8), the simplicial sets \(K(\pi _{k}(X), {k1})\), \(E(\pi _{k}(X), k1)\), \(K(\pi _{k}(X), k)\) have polynomialtime effective homology and maps \(\varphi _k, \delta \) are polynomialtime. Further, they are all obtained by an algorithm that runs in polynomial time.
As \(F_{k+1}\) is constructed as a twisted product of \(F_k\) with \(K(\pi _{k}(X), k)\), Corollary 3.18 of Čadek et al. (2014b) implies that \(F_{k+1}\) has polynomialtime effective homology and \(f_{k+1}\) is a polynomialtime map.^{8}
The inductive assumption, together with the fact that \(\varphi _k\) induces an isomorphism \(\varphi _{k*}: \pi _{k}(F_{k}) \rightarrow \pi _{k}(K(\pi _{k}(X),k))\) imply that \(f_k\) induces an isomorphism \(\pi _j(F_{k +1}) \rightarrow \pi _j(F_{k})\) for \(j>k\) and \(\pi _j(F_{k +1}) = 0\) for \(j\le k\). \(\square \)
The lemma implies that the simplicial sets \(F_k\) have polynomialtime effective homology and maps \(\psi _k = f_k f_{k1} \ldots f_3\) are polynomialtime as they are defined as a composition of polynomialtime maps \(f_i\).
The following theorem is a key ingredient of our algorithm.
Theorem 1
(Effective Hurewicz Inverse) Let \(d>1\) be fixed and F be an \((d1)\)connected 0reduced simplicial set parametrized by a set \({\mathcal {I}}\), with polynomialtime homology and polynomially contractible loops.
Then there exists an algorithm that, for a given dcycle \(z\in Z_{d}(F(I))\), outputs a simplicial model \({\varSigma }^{d}\) of the dsphere and a simplicial map \({\varSigma }^{d}\rightarrow F(I)\) whose homotopy class is the Hurewicz inverse of \([z]\in H_{d}(F(I))\).
Moreover, the time complexity is bounded by an exponential of a polynomial function in \(\mathrm {size}(I)+\mathrm {size}(z)\).
Lemma 4
Let \(d\ge 2\) be a fixed integer and \({\mathcal {I}}\) be the set of all 1connected 0reduced finite simplicial sets with an explicit loop contraction \(c_0\). Then the simplicial set \(F_d\) from Lemma 3, parametrized by \({\mathcal {I}}\) has polynomialtime contractible loops (see Definition 6).
The proof is constructive, based on explicit formulas in our model of \(F_d\). The details are in Sect. 7.
We remark that the output of the algorithm in Lemma 4 i.e. the loop contraction of \(F_d\) is polynomial time with respect to the input—a 0reduced and 1connected simplicial set with a specific loop contraction \(c_0\) on this simplicial set.
The core of the algorithm we will describe works with simplicial sets and simplicial maps between them. If our input is a simplicial complex, we need tools to convert them into maps between simplicial complexes. The next two lemmas address this.
Lemma 5
Let Y be a finite simplicial set. Then there exists a polynomialtime algorithm that computes a simplicial complex \(Y^{sc}\) with a given orientation of each simplex, and a map \(\gamma : Y^{sc}\rightarrow Y\) (still understood to be a map between simplicial sets) such that the geometric realization of \(\gamma \) is homotopic to a homeomorphism.
This construction is originally due to Barratt (1956), and described in detail in Čadek et al. (2013b, Appendix B).^{9} Explicitly, the simplicial complex \(Y^{sc}\) is defined to be \(Y^{sc}:=B_*(Sd(Y))\), where Sd is the barycentric subdivision functor and \(B_*\) a functor introduced in Jardine (2004): \(Y^{sc}\) can be constructed recursively by adding a vertex \(v_\sigma \) for each nondegenerate simplex \(\sigma \in Sd(Y)\) and replacing \(\sigma \) by the cone with apex \(v_\sigma \) over \(B_*(\partial \sigma )\). The subdivision Sd(Y) is a regular simplicial set and \(B_*(Sd(Y))\) coincides with the flag simplicial complex of the poset of nondegenerate simplices of Sd(Y). It follows that the geometric realizations \(Y^{sc}\) is homeomorphic^{10} to Y. Simplices of \(Y^{sc}\) are naturally oriented and the explicit description of \(\gamma \) is given in Čadek et al. (2013b, p. 61) and the references therein.
In our main algorithm, \(Y={\varSigma }^d\) will be a triangulation of the dsphere and X a simplicial set derived from a simplicial complex \(X^{sc}\) by contracting its spanning tree into a point. The following lemma shows that we can convert a map \({\varSigma }^{sc}\rightarrow X\) into a map \(({\varSigma }^{sc})'\rightarrow X^{sc}\) between simplicial complexes.
Lemma 6
Let \(d>0\) be fixed. Assume that \(X^{sc}\) is a given simplicial complex with a chosen ordering of vertices and a maximal spanning tree T; we denote the underlying simplicial set by \(X^{ss}\). Let \(p: X^{ss} \rightarrow X:=X^{ss}/T\) be the projection to the associated 0reduced simplicial set. Let \({\varSigma }\) be a given ddimensional simplicial complex with a chosen orientation of each simplex, \({\varSigma }^{ss}\) the induced simplicial set, and \(f:{\varSigma }^{ss}\rightarrow {X}\) a simplicial map.
Thus if \({\varSigma }\) is a sphere and f corresponds to a homotopy generator, \(f'\) is the corresponding homotopy generator represented as a simplicial map between simplicial complexes. We remark that the algorithm we describe works even if d is a part of the input, but the time complexity would be exponential in general, as the number of vertices in our subdivision \(\mathrm {Sd}({\varSigma })\) would grow exponentially with d.
The proof of Lemma 6 is given in Sect. 8.
Proof of Theorem A.1
 1.
We choose an ordering of vertices and convert \(X^{sc}\) into a simplicial set. Choosing a spanning tree and contracting it to a point creates a 0reduced simplicial set X homotopy equivalent to \(X^{sc}\). By Lemma 2, we can convert the input data into a list \(c_0(\alpha )\) for all generators \(\alpha \) of \(GX_0\) in polynomial time.
 2.
We construct the simplicial set \(F_d\) from Lemma 3 as simplicial set with polynomialtime effective homology. Hence by Lemma 1 we can compute the generators of \(H_d(F_d)\) in time polynomial in \(\mathrm {size}(X)\). Due to Lemma 4 and Theorem 1, we can convert these homology generators to homotopy generators \({\varSigma }_j^d \rightarrow F_d\) in time exponential in \(P(\mathrm {size}(X)+\mathrm {size}(c_0))\) where P is a polynomial.
 3.
We compose the representatives of \(\pi _d(F_d)\) with \(\psi _d\) to obtain representatives \({\varSigma }_j^d\rightarrow X\) of the generators of \(\pi _d(X)\), another polynomialtime operation. This way, we compute explicit homotopy generators as maps into the simplicial set X.
 4.
We use Lemma 5 to compute simplicial complexes \({\varSigma }_j^{sc}\) and maps \({\varSigma }_j^{sc}\rightarrow {\varSigma }^d\) homotopic to homeomorphisms. The compositions \({\varSigma }_j^{sc}\rightarrow {\varSigma }_j^d\rightarrow X\) still represent a set of homotopy generators. Finally, by Lemma 6, we can compute, for each j, a subdivision of the sphere \({\varSigma }_j^{sc}\) and a simplicial map from this subdivision into the simplicial complex\(X^{sc}\), in time polynomial in the size of the representatives \({\varSigma }_j^{sc}\rightarrow X\).
5 Proof of Theorem B
Similarly as in the proof of Theorem A, we prove a slightly more general version of Theorem B that also includes finite simplicial complexes.
Theorem B.1
 1.
there is an infinite family of ddimensional 1connected finite simplicial complexes X such that for any simplicial map \({\varSigma }\rightarrow X\) representing a generator of \(\pi _d(X)\), the triangulation \({\varSigma }\) of \(S^d\) on which f is defined has size at least \(2^{{\varOmega }(\mathrm {size}(X))}\).
 2.
there is an infinite family of ddimensional \((d1)\)connected and \((d2)\)reduced simplicial sets X such that for any simplicial map \({\varSigma }\rightarrow X\) representing a generator of \(\pi _d(X)\), the triangulation \({\varSigma }\) of \(S^d\) on which f is defined has size at least \(2^{{\varOmega }(\mathrm {size}(X))}\).
The second item immediately implies Theorem B.
In the first item, we don’t assume any certificate for 1connectedness. However, we suspect that any algorithm that computes representatives of \(\pi _d(X)\) for simplicial complexes Xmust necessarily use some explicit certificate of simple connectivity, but so far we have not been able to verify this.
Lemma 7
 1.
There exists a sequence \(\{X_k\}_{k \ge 1}\) of ddimensional \((d1)\)connected simplicial complexes, such that \(H_{d}(X_k)\simeq {\mathbb {Z}}\) for all k and for any choice of a cycle \(z_k\in Z_{d}(X_k)\) generating the homology group, the largest coefficient in \(z_k\) grows exponentially in \(\mathrm {size}(X_k)\).
 2.
There exists a sequence \(\{X_k\}_{k \ge 1}\) of ddimensional \((d1)\)connected and \((d2)\)reduced simplicial sets, such that \(H_{d}(X_k)\simeq {\mathbb {Z}}\) for all k and for any choice of cycles \(z_k\in Z_{d}(X_k)\) generating the homology, the largest coefficient in \(z_k\) grows exponentially^{12} in \(\mathrm {size}(X_k)\).
Proof of Theorem 2 based on Lemma 7
It remains to define the sequence from Lemma 7:
Proof of Lemma 7
1. We begin by constructing for every \(d\ge 2\), a sequence of \(\{X_k\}_{k \ge 1}\) of \((d1)\)connected simplicial complexes, such that \(H_{d}(X_k)\simeq {\mathbb {Z}}\) for all k, and for any choice of a cycle \(z_k\in Z_{d}(X_k)\) generating the homology group, the largest coefficient in \(z_k\) grows exponentially in \(\mathrm {size}(X_k)\).
We start with \(d=2\). The idea is to glue \(X_k\) out of k copies of a triangulated mapping cylinders of a degree 2 map \({S}^1 \rightarrow {S}^1\), i.e. k Möbius bands, and then fill in the two open ends with one triangle each (A and B in Fig. 2). The case \(k=1\) is shown in Fig. 2. For \(k \ge 2\), we take k copies of the triangulated Möbius band and identify the middle circle of each one to the boundary of the next one.
Similarly for \(d>2\), the simplicial complex \(X_k\) is obtained by glueing k copies of a triangulated mapping cylinder of a degree 2 map \(S^{d1} \rightarrow S^{d1}\), and the two open ends are filled in with two triangulated dballs.

\(d_0 A=\sigma _1\), \(d_j A=*\) for \(j>0\),

\(d_0 C_i=\sigma _i\), \(d_1 C_i=\sigma _{i+1}\), \(d_2 C_i=\sigma _i\) and \(d_j C_i=*\) for \(j>2\), and

\(d_{0} B=\sigma _k\), \(d_j B=*\) for \(j>0\).

\(\partial A=\sigma _1\)

\(\partial C_i=2\sigma _i\sigma _{i+1}\), and

\(\partial B=\sigma _k\).
5.1 Discussion on optimality
If \(d=2\) and X is a 1reduced simplicial set, then generators of \(H_2(X)\) can be computed via the Smith normal form of the differential \(\partial _3: C_3(X)\rightarrow C_2(X)\). Using canonical bases, the matrix of \(\partial _3=d_0d_1+d_2d_3\) satisfies that the sum of absolute values over each column is at most 4. We were not able to find any infinite family of such matrices so that the smallest coefficient in any set of homology generating cycles grows exponentially with the size of X (that is, the size of the matrix). However, if a set of homologygenerating cycles with subexponential coefficients always exists and can be found algorithmically in polynomial time, our main algorithm given as Theorem A is optimal in this case as well. This is because the exponential complexity of the algorithm only appears in the geometric realization of an element of \(GX_1^{sph}\) with large (exponential) exponents (see “Arrow 3” in Sect. 6), and the only source of such exponents is the homology \(H_1(AX)\simeq H_2(X)\).
6 Effective Hurewicz inverse
Here, we will prove Theorem 1 by directly describing the algorithm proposed in Berger (1991) and analysing its running time.
Definition 7
Let G be a simplicial group. Then the Moore complex \({\tilde{G}}\) is a (possibly nonabelian) chain complex defined by \({\tilde{G}}_i:=G_i\cap (\bigcap _{j>0} \ker {d_j})\) endowed with the differential \(d_0: {\tilde{G}}_i\rightarrow {\tilde{G}}_{i1}\).
It can be shown that \(d_0 d_0=1\) in \({\tilde{G}}\) and that \(\mathrm {Im}(d_0)\) is a normal subgroup of \(\ker d_0\) so that the homology \(H_*({\tilde{G}})\) is well defined.
Definition 8
Let F be a 0reduced simplicial set, GF the associated simplicial group from Definition 2, and \({\widetilde{GF}}\) its Moore complex. We define AF to be the Abelianization of GF and \({\widetilde{AF}}\) to be the Moore complex of AF. The simplicial group AF is also endowed with a chain group structure via \(\partial = \sum _j (1)^j d_j\). If \(\sigma \in F_k\), we will denote by \({\overline{\sigma }}\) the corresponding simplex in \(GF_{i1}\), resp. \(AF_{i1}\).
Note that, following Definition 2, the “last” differential \(d_k {\overline{\sigma }}\) in \(AF_k\) equals \(\overline{d_k \sigma }  \overline{d_{k+1}\sigma }\). Clearly, the Abelianization map \(p: GF\rightarrow GF/[GF,GF]=AF\) takes \({\widetilde{GF}}\) into \({\widetilde{AF}}\).
6.1 Arrow 1
Let F be a 0reduced simplicial set, \(C_*(F)\) be the (unreduced) chain complex of F and \(AF_{*1}\) the shifted chain complex of AF defined by \((AF_{*1})_i:=AF_{i1}\). As a chain complex, \(AF_{*1}\) is a subcomplex of \(C_*(F)\) generated by all simplices that are not in the image of the last degeneracy. Let \({\widetilde{AF}}_{*1}\) be the Moore complex of \(AF_{*1}\).
We will describe a chain homotopy \((f,g,h): C_*(F) \rightarrow {\widetilde{AF}}_{*1}\). Arrow 1 then coincides, on the level of chains, with f. We only need f for the actual algorithm; however, we prefer to state a more general Lemma claiming that g, h are polynomial time maps as well.
Lemma 8
There exists a polynomialtime strong chain deformation retraction \((f,g,h): C_*(F)\rightarrow {\widetilde{AF}}_{*1}\). That is, \(f: C_*(F)\rightarrow {\widetilde{AF}}_{*1}\), \(g: {\widetilde{AF}}_{*1}\rightarrow C_*(F)\) are polynomialtime chainmaps and \(h: C_*(F)\rightarrow C_{*+1}(F)\) is a polynomial map such that \(fg=\mathrm {id}\) and \(gf\mathrm {id}=h\partial + \partial h\).
Proof
First we will describe the deformation retraction in terms of formulas and then comment on polynomiality.
Part 1: Formulas for the deformation retraction. We begin with a chain deformation retraction from \(C_*(F)\) to \(AF_{*1}\) represented by \(f_0: C_*(F)\rightarrow AF_{*1}\), \(g_0: AF_{*1}\rightarrow C_*(F)\) and \(h_0: C_*(F)\rightarrow C_{*+1}(F)\).
Part 2: Polynomiality. We need to show that if the degree k is fixed, then we can evaluate f, g, h on \(C_k(F)\) resp. \({\widetilde{AF}}_{k1}\) in time polynomial in the input size. The map \(f_0\) is defined via the ifelse condition (4). To decide whether a simplex \(\sigma \in F(I)\) is in the image of \(s_{k1}\) amounts to deciding \(\sigma =s_{k1} d_k \sigma \) which can be done in time polynomial in \(\mathrm {size}(I)+\mathrm {size}(\sigma )\), the polynomial depending on k. It follows that \(f_0\) is a locally polynomial map. All the remaining maps \(f_i, g_i\) and \(h_i\) are defined via simple formulas and are obviously locally polynomialtime maps.
For fixed k, the definition of f, g, h includes only \(f_i, g_i, h_i\) for \(i<k\). It follows that f, g are composed of k polynomialtime maps and h is a sum of k polynomialtime maps. \(\square \)
6.2 Arrow 2
This part is taken almost completely from Berger (1991), we only slightly adjusted the notation to our settings, formalized some details that in Berger (1991) are treated as obvious, and comment on polynomiality.
We remark that without having something like the contraction data \(c_k\), it is hard to find any nontrivial spherical elements of \({\widetilde{GF}}_*\).
Lemma 9
(Boundary certificate) Let \(d>1\) be fixed and let F be a \((d1)\)connected simplicial set with polynomialtime homology. There is an algorithm that, for \(j<d1\) and a cycle \(z\in Z_{j}({\widetilde{AF}})\), computes an element \(c^A(z)\in {\widetilde{AF}}_{j+1}\) such that \(d_0 c^{A}(z)=z\). The running time is polynomial in \(\mathrm {size}(z)+\mathrm {size}(I)\).
Proof
First note that the \((d1)\)connectedness of F implies that \(H_{j+1}(F)\simeq H_{j}({\widetilde{AF}})\) are trivial for \(j<d1\), so each cycle in these dimensions is a boundary.
Let \(j<d1\) and \(z\in Z_j({\widetilde{AF}})\), \(z=\sum _j k_j y_j\). Then the element \(f'' g'(z)\) is a cycle in \(E_{j+1}F\) and can be computed in time polynomial in \(\mathrm {size}(z)+\mathrm {size}(I)\). In particular, the size of \(f''g'(z)\) is bounded by such polynomial. The number of generators of \(E_{j+2}F\) and \(E_{j+1}F\) is polynomial in \(\mathrm {size}(I)\) and we can compute, in time polynomial in \(\mathrm {size}(I)\), the boundary matrix of \(\partial : E_{j+2}F\rightarrow E_{j+1}F\) with respect to the generators.
Next we want to find an element \(t\in E_{j+2}F\) such that \(\partial t=f''g'(z)\). Using generating sets for \(E_{j+2}F\), \(E_{j+1}F\), this reduces to a linear system of Diophantine equations and can be solved in time polynomial in the size of the \(\partial \)matrix and the right hand side \(f''g'(z)\) (Kannan and Bachem 1981).
The next lemma will be needed as an auxiliary tool later.
Lemma 10
Let S be a countable set with a given encoding, G be the free (nonabelian) group generated by S, and define \(\mathrm {size}(\prod _j s_j^{k_j}):=\sum _j (\mathrm {size}(s_j)+\mathrm {size}(k_j))\). Let \(G':=[G,G]\) be its commutator subgroup.
Then there exists a polynomialtime algorithm that for an element \( g=\prod _j s_j^{k_j} \) in \(G'\subseteq G\), computes elements \(a_i, b_i\in G\) such that \(g=\prod _j [a_j, b_j]\).
In other words, we can decompose commutator elements into simple commutators in polynomialtime at most.
Proof
Let us choose a linear ordering on S and let \(g=\prod _j s_j^{k_j}\) be in \(G'\): that is, for each j, the exponents \(\{k_{j'}:\,s_{j'}=s_j\}\) sum up to zero. We will present a bubblesort type algorithm for sorting elements in g. Going from the left to right, we will always swap \(s_j^{k_j}\) and \(s_{j+1}^{k+1}\) whenever \(s_{j+1}<s_j\). Such swap always creates a commutator, but that will immediately be moved to the initial segment of commutators.
Let us call everything before the commutator section a “regular section”. Going from left to right and performing these swaps will ensure that the largest element will be at the end of the regular section. But no later then that, the largest element \(y_{\text {largest}}\) disappears from the regular section completely, because all of its exponents add up to 0. Again, starting from the left and performing another round of swaps will ensure that the secondlargest elements disappear from the regular section; repeating this, all the regular section will eventually disappear which will happen in at most \(\mathrm {size}(g)^2\) swaps in total. Each swap has complexity linear in \(\mathrm {size}(g)\) and the overall time complexity is not worse than cubic. \(\square \)
Lemma 11
Assume that F is a parametrized simplicial set with polynomially contractible loops. Let \(k>0\), \(\gamma \in GF_k\) be spherical, i.e. \(d_i \gamma = 1\), \(0\le i\le k\), and \(\alpha \in GF_k\) is arbitrary. There is a polynomialtime algorithm that computes \(\delta \in GF_{k+1}'\) such that \(d_0 \delta =[\alpha , \gamma ]\) and \(d_i \delta =1\) for all \(i>0\).
In other words, a simple commutator of a spherical element with another element can always be “contracted” in \(GF'\) in polynomial time. Our proof roughly follows the construction in Kan (1958a, Sect. 8).
Proof

\(d_0 \beta _0=\alpha \).

\(d_j \beta _j=d_j \beta _{j1}\), \(1\le j\le k\)

\(d_{k+1} \beta _k=1\).
Lemma 12
 1.
\(d_0 c_j=\mathrm {id}\),
 2.
\(d_i c_j=c_{j1}d_{i1}\), \(0<i\le j+1\), and
 3.
\(c_{j} s_{i} = s_{i+1} c_{j1}\) for \(0<j<d1\) and \(0\le i< j\),
 4.
\(d_1 c_0(x)=1\) for all \(x\in GF_0\).
Proof
The homomorphism \(c_0\) can be constructed directly from the assumption on polynomial contractibility of loops. We have a canonical basis of \(GF_0\) consisting of all nondegenerate 1simplices of F. For \(\sigma \in F_1\), we denote by \({\overline{\sigma }}\) the corresponding generator of \(GF_0\). The we define \(c_0(\prod {\overline{\sigma }}_j^{k_j})\) to be \(\prod b_j^{k_j}\) where \(b_j\) is the element of \(GF_1\) such that \(d_0 b_j={\overline{\sigma }}_j\) and \(d_1 b_j=1\).
In what follows, assume that \(1\le k<d1\) and \(c_i\) have been defined for all \(i<k\). We will define \(c_k\) in the following steps.
Step 1. Contractible elements.
Let \(x\in GF_k\). We will say that x is contractible and \(y\in GF_{k+1}\) is a contraction of x if \(d_0 y=x\) and \(d_i y=c_{k1} d_{i1} x\) for all \(i>0\).
The general strategy for defining \(c_k\) will be to find a contraction h for each basis element (\((k+1)\)simplex) \(g\in GF_k\) and define \(c_k(g):=h\). This will enforce properties 1 and 2. Moreover, in case when g is degenerate, the contraction will be chosen in such a way that property 3 holds too; otherwise it holds vacuously. Property 4 only deals with \(c_0\) and is satisfied by the definition of loop contraction (a polynomialtime \(c_0\) is given as an input in Theorem 1).
Step 2. Contraction of degenerate elements.
So far, we have shown that \(c_k(g):=s_{j+1} c_{k1} g\) is a contraction of g. It remains to show property 3. That is, we have to show that if \(g=s_j z\) can also be expressed as \(s_i y\), then \(c_k(s_i y)=s_{i+1} c_{k1} y\).
Step 3. Decomposition into spherical and conical parts.
We will call an element \({\hat{x}}\in GF_k\) to be conical if it is a product of elements that are either degenerate or in the image of \(c_{k1}\). Let \(x\in GF_k\) be arbitrary. We define \(x_k:=x\) and inductively \(x_{i1}:=x_i (s_{i1} d_i x_i)^{1}\). In this way we obtain \(x_0,\ldots , x_n\) such that \(x_i\) is in the kernel of \(d_j\) for \(j>i\) and \(x=x_0 y\) where y is a product of degenerate simplices. Further, let \(x^s:=x_0 (c_{k1} d_0 x_0)^{1}\). A simple computation shows that \(x^s\) is spherical, that is, \(d_i x^s=1\) for all i. We obtain an equation \(x=x^s {\hat{x}}\) where \({\hat{x}}=(c_{k1} (d_0 x_0) y\); this is a decomposition of x into a spherical part \(x^s\) and a conical element \({\hat{x}}\).
We will define \(c_k\) on nondegenerate basis elements \(g={\overline{\sigma }}\) by first decomposing \(g=g^S {\hat{g}}\) into a spherical and conical part, finding contractions \(h_1\) of \(g^S\) and \(h_2\) of \({\hat{g}}\), and defining \(c_k(g):=h_1 h_2\). Then \(c_k(g)\) is a contraction of g and hence satisfies properties 1 and 2: property 3 is vacuously true once g is nondegenerate.
Step 4. Contraction of the conical part.
The contraction of degenerate elements y has already been defined in Step 2, so we can define a contraction of \(c_{k1}(d_0 x_0) y\) to be \(s_0 c_{k1}(d_0 x_0)\,c_k(y)\).
Step 5. Contraction of commutators.
Let \(g'\in GF_k'\) be an element of the commutator subgroup. By Lemma 10, we can algorithmically decompose \(g'\) into a product of simple commutators, so to find a contraction of \(g'\), it is sufficient to find a contraction of each simple commutator [x, y] in this decomposition.
By Lemma 11 we can find an elements \(\lambda _i\in {\widetilde{GF}}_{k+1}\) such that \(d_0 \lambda _i=[\alpha _i,\gamma _i]\), \(i=1,2\), in polynomial time. Further, both \({\tilde{x}}\) and \({\tilde{y}}\) are conical and they are in the form \({\tilde{x}}=c_0 (d_0 x_0) x_{deg}\) where \(x_0\in {\widetilde{GF}}_k\) and \(x_{deg}\) is degenerate; similar decomposition holds for y. In Step 4 we showed how to compute elements \(c^x\) and \(c^y\) such that \(c^x\), \(c^y\) is a contraction of \({\hat{x}}\), \({\hat{y}}\), respectively. Then \([c^x, c^y]\) is a contraction of \([{\hat{x}}, {\hat{y}}]\) and \( \lambda _1 \lambda _2 [c^x, c^y] \) is a contraction of [x, y].
Step 6. Contraction of spherical elements.
The last missing step is to compute a contraction of the spherical element \(g^S\) where \(g^S\) is the spherical part of a basis element \(g\in GF_k\).
Let us denote by p the projection \(GF{\mathop {\rightarrow }\limits ^{p}} AF\). The projection \(z:=p(g^S)\) is in the kernel of all face operators and hence a cycle in \({\widetilde{AF}}_{k}\). By Lemma 9, we can compute \(t:=c_k^A(z)\in {\widetilde{AF}}_{k+1}\) such that \(d_0 t=z\), in polynomial time. Let \(h\in {GF}_{k+1}\) be any ppreimage^{14} of t. Let \(h_k:=h\) and inductively define \(h_{j1}:=h_{j} (s_{j1} d_j h_{j})^{1}\) for \(j<k\). Then \(h_0\) is in the kernel of all faces except \(d_0\), that is, \(h_0\in {\widetilde{GF}}_{k+1}\). It follows that \(p(h_0)\in {\widetilde{AF}}_{k+1}\) is in the kernel of all faces except \(d_0\). We claim that \(p(h_0)=t\).This can be shown as follows: assume that \(p(h_j)=t\), then \(p(h_{j1})=p(h_j) + p(s_{j1} d_j h_j^{1})=t + s_{j1} d_j t=t+0=t\).
This completes the construction of \(c_k\): for each nondegenerate basis element g of \(GF_k\), \(c_k(g)\) is defined to be the product of the contraction of \(g^S\) and the contraction^{15} of \({\hat{g}}\).
All the subroutines described in the above steps are polynomialtime. Thus we showed that if there exists a polynomialtime algorithm for \(c_{k1}\), then there also exists a polynomialtime algorithm for \(c_k\). The existence of a polynomialtime \(c_0\) follows from the assumption on polynomial loop contractibility and d is fixed, thus there exists a polynomialtime algorithm that for \(x\in GF_{j}\) computes \(c_j(x)\) for each \(j<d1\). \(\square \)
Lemma 13
(Construction of arrow 2) Under the assumption of Theorem 1, let \(z\in Z_{d1}({\widetilde{AF}})\) be a cycle. Then there exists a polynomialtime algorithm that computes a cycle \(x\in Z_{d1}({\widetilde{GF}})\) such that the Abelianization of x is z.
Proof
Let \(c_{d2}\) be the contraction from Lemma 12 and \(z\in Z_{d1}({\widetilde{AF}})\) be a cycle. First choose \(y\in GF_{d1}\) such that \(p(y)=z\). Creating the sequence \(y_n:=y\), \(y_{j1}:=y_j s_{j1} d_j y_j^{1}\) for decreasing j, yields an element \(y_0\in {\widetilde{GF}}_{d1}\) that is still mapped to z by p, similarly as in Step 4 of Lemma 12. The equation \(p d_0 (y_0)=d_0 p (y_0)=d_0 z=0\) shows that \(d_0 y_0\) is in the commutator subgroup \({\widetilde{GF}}_{d2}'\). We define \(x:=y_0 c_{d2} (d_0 y_0)^{1}\): this is already a cycle in \({\widetilde{GF}}_{d1}\) and \(p(x)=p(y_0)=z\). \(\square \)
6.3 Arrow 3
A cycle \(g \in {\widetilde{GF}}_{d1}\subseteq GF_{d1}\) represents a generator of the homotopy group \(H_{d1} ({\widetilde{GF}}) \cong \pi _{d} (F)\). Given such g, our goal is to construct a simplicial set \({\varSigma }^{d}\) with \({\varSigma }^{d} = S^{d}\) and a simplicial map \(\gamma _g: {\varSigma }^{d} \rightarrow F\) with \([\gamma _g] \cong [g]\).
We have nearly achieved what we aimed for  one can show that Y is homotopy equivalent to the wedge sum of d  dimensional spheres and \([f']\cong g\). However, in general Y is not homeomorphic to \(S^d\). One way to overcome the problem is to make the space Y “thicker” and making sure that identifying simplices never results in a wedge of spheres.
To this end, we utilize the following construction which is one of the main results from Berger (1995). Here, we describe the main points of the construction while details are given in later sections.
On an algebraic level, we define another simplicial model of a loopspace of F—a simplicial group \({\overline{{\varOmega }}}F\). Further, there is a homomorphism of simplicial groups \(t:GF \rightarrow {\overline{{\varOmega }}}F\) that induces an isomorphism on the level of homotopy groups. This is described in Berger (1995, Proposition 3.3).
The homomorphism t is given later by formula (8) and the simplicial set \({\overline{{\varOmega }}}F\) is described in the next section. Here, we remark that the size of t(g) is exponential in size of g.
Finally, Lemma 14 describes an algorithm that for a spherical element \(\gamma \in {\overline{{\varOmega }}}F_{d1}\) constructs a simplicial map \(\gamma _\mathsf {sph}: {\varSigma }^{d}(\gamma ) \rightarrow F\) such that \(\pi _{d1}({\overline{{\varOmega }}}F)\ni [\gamma ] \simeq [\gamma _\mathsf {sph}] \in \pi _{d}(F)\)  essentially using the naive idea described above. We describe the construction in detail in the next section.
The size of \(\gamma _\mathsf {sph}\) is polynomial in \(\mathrm {size}(\gamma )\). Hence, given a spherical \(g \in {\widetilde{GF}}_{d1}\), the algorithm produces \(t(g)_\mathsf {sph}:{\varSigma }^{d}(t(g)) \rightarrow F\) that is exponential with respect to \(\mathrm {size}(g)\).
6.4 Berger’s model of the loop space
Definition 9
An edge \([x, i]^\epsilon \in E_n\) is called compressible if \(x = s_i x'\) for some \(x' \in X_{n}\).
Definition 10
Moreover, for every \(x\in V_n = X_n\) we define a path of length zero \(1_x\) with the property \(\mathsf {source} \,1_x = x = \mathsf {target} \,1_x\) and relations \(a 1_x=a\) whenever \(\mathsf {target} \,{a}=x\) and \(1_x b=b\) whenever \(\mathsf {source} \,{b}=x\).
For any \(\gamma , \gamma ' \in IX\) such that \(\mathsf {target} \,{\gamma } = \mathsf {source} \,{\gamma '}\), we define a composition \(\gamma \cdot \gamma '\) in an obvious way.
Definition 11
An edge \([x, i]^\epsilon \in E_n\) is called compressible if \(x = s_i x'\) for some \(x' \in X_{n}\). A path is compressed if it does not contain any compressible edge.
For \(\gamma , \gamma '\in IX_n\), we write \(\gamma \sim \gamma '\) if they represent the same element in \({\overline{I}}X_n\). The symbol \({\overline{\gamma }}\), denotes the (unique) compressed and reduced path such that \(\gamma \sim {\overline{\gamma }}\). One can see \({\overline{I}}X\) (\({\overline{P}}X, {\overline{{\varOmega }}}X\)) as the set of reduced and compressed paths in \(IX (P X, {\varOmega } X)\).
In a natural way, we can extend the definition of face and degeneracy operators \(d_i, s_i\) on sets \({\overline{I}}X ({\overline{P}}X\),\({\overline{{\varOmega }}}X\)) by setting \(d_i \gamma = \overline{d_i \gamma }\) and \(s_i \gamma = \overline{s_i \gamma }\). One can check that this turns \({\overline{I}}X\), \( {\overline{P}}X\) and \({\overline{{\varOmega }}}X\) into simplicial sets.
Similarly, we define operation \(\cdot : {\overline{{\varOmega }}}X_n \times {\overline{{\varOmega }}}X_n \rightarrow {\overline{{\varOmega }}}X_n\) by \(\gamma \cdot \gamma ' \mapsto \overline{\gamma \gamma '}\), i.e. we first compose the loops and then assign the appropriate compressed and reduced representative. With the operation defined as above, \({\overline{{\varOmega }}}X\) is a simplicial group.
6.5 Homomorphism \({\varvec{t: GX \rightarrow {\overline{{\varOmega }}}X}}\)
We first describe how to any given \(x \in X_n\) assign a path \(\gamma _x \in {\overline{P}}X_n\) with the property \(\mathsf {source} \,\gamma _x = x\) and \(\mathsf {target} \,\gamma _x = *\):
6.6 Universal preimage of a path
 1.
\(\mathsf {Dom}(\gamma ) = D^{d}\).
 2.
\(\gamma _\mathsf {map}\) maps \(\mathsf {Dom}(\gamma )\) to the set of simplices contained in the path \({\gamma }\).
Definition 12
Let \(\gamma \in IX_{d1}\) . We define \(\mathsf {Dom}(\gamma )\) and \(\gamma _\mathsf {map}\) as follows. Suppose, that \(\gamma = [y_1,i_1]^{\epsilon _1}[y_2,i_2]^{\epsilon _2}\cdots [y_k,i_k]^{\epsilon _k}\). For every edge \([y_j, i_j]^{\epsilon _j}\), let \(\alpha _j\) be the simplicial map \({\varDelta }^{d} \rightarrow y_j\) sending the nondegenerate d simplex in \({\varDelta }^{d}\) to \(y_j\).
We recall that simplicial set \({\overline{I}}X\) was defined as the set of “reduced and compressed” paths in IX. Similarly, one introduces a reduced and compressed versions of the construction \(\mathsf {Dom}\). As a final step we then get
Lemma 14
We will not give the proof of correctness of Lemma 14 (it can be found in Berger 1995). Instead, in the next section, we only describe the algorithmic construction of \(\gamma _\mathsf {sph}: {\varSigma }^{d}(\gamma ) \rightarrow X\) and give a running time estimate.
6.7 Algorithm from Lemma 14
 \(\mathsf {Dom}(\gamma )\):

We interpret \(\gamma \) as an element in IX and construct \(\gamma _\mathsf {map}: \mathsf {Dom}(\gamma ) \rightarrow X\). This is clearly linear in the size of \(\gamma \).
 \({\overline{\mathsf {Dom}}}(\gamma )\):

The algorithm checks, whether an edge \([y,j]^\epsilon \) in \(d_{i_1}d_{i_2}\ldots d_{i_\ell } \gamma \), where \(0\le {i_1}< {i_2}< \cdots< {i_\ell }<(d\ell 2)\) is compressible, i.e. \(y = s_j d_j y\). If this is the case, add a corresponding relation on the preimages: \(\alpha ^{1}(y) \sim s_j d_j \alpha ^{1}(y)\). Factoring out the relations, we get a map \(\gamma _{\mathsf {c}}: {\overline{\mathsf {Dom}}}(\gamma ) \rightarrow X\).
Although the number of faces we have to go through is exponential in d, this is not a problem, since d is deemed as a constant in the algorithm and so is \(2^d\). Hence the number of operations is again linear in the size of \(\gamma \).
 \({\overline{{\overline{\mathsf {Dom}}}}}(\gamma )\):

Let \(k<d\). We know that \(\overline{d_k \gamma }=1_*\), so after removing all compressible elements from the path \(d_k \gamma \), it will contain a sequence of pairs (\([y_i,j_i]^{\epsilon _i}, [y_i, j_i]^{\epsilon _i})\) such that, after removing all \([y_u, j_u]^{\pm 1}\) for all \(u<v\), then \([y_v, j_v]^{\epsilon _v}\) and \([y_v, j_v]^{\epsilon _v}\) are next to each other.^{17} Each such pair \(([y_i,j_i]^{\epsilon _i}, [y_i, j_i]^{\epsilon _i})\) corresponds to a pair of indices \((l_i,m_i)\) corresponding to the positions of those edges in \(d_k \gamma \). These sequences are not unique, but can be easily found in time linear in \(\mathrm {length}(\gamma )\). Then we glue \(\alpha _{l_i}^{1}(y_i)\) with \(\alpha _{m_i}^{1}(y_i)\) for all i. Performing such identifications for all k defines the new simplicial set \({\overline{{\overline{\mathsf {Dom}}}}}(\gamma )\).
 \({\varSigma }^{d}(\gamma )\):

It remains to identify \(\alpha ^{1}(\mathsf {source} \,\gamma )\) and \(\alpha ^{1} (\mathsf {target} \,\gamma )\) with the appropriate degeneracy of the (unique) basepoint. The resulting space \({\varSigma }^{d}(\gamma )\) is a dsphere.
7 Polynomialtime loop contraction in \(F_d\)
In this section, we show that simplicial sets \(F_i\), \(2\le i \le d\) constructed algorithmically in Sect. 4 have polynomialtime contractible loops, thus proving Lemma 4.
Assuming that X is a 0reduced, 1connected simplicial set with a given algorithm that computes the contraction on loops \(c_0: (GX)_0 \rightarrow (GX)_1\), the contraction \(c_0\) on \(F_2\) is automatically defined, as \(F_2 = X\).
The majority of the effort in the rest of this section is concentrated on the description of the contraction \(c_0\) on \(F_3\), as show that the contraction \(F_i, i>3\) can be easily obtained from the contraction on \(F_3\).
We remark that the loop contractions, i.e. maps \(c_0 :G_0(F_i) \rightarrow G_1(F_i)\) with \(d_0 c_0 = {\mathrm{id}}\) and \(d_1 c_0 = 1\), are not unique. We only describe one of possible choices and provide an analysis on the overall length of the formulas/running time of the algorithm.
7.1 Notation
We will further use the following shorthand notation: For a 0reduced simplicial set X we will denote the iterated degeneracy \(s_0 \cdots s_0 *\) of its unique basepoint \(*\) by \(*\) and we set \(\pi _i = \pi _i(X)\). For any Eilenberg–Maclane space \(K(\pi _i, i1)\), \(i\ge 2\), we denote its basepoint and its degeneracies by 0. From the context, it will always be clear which simplicial set we refer to.
7.2 Loop contraction on \(F_i\), \(i>3\)
Before the definition of contraction on simplicial set \(F_3\), we recall some basic facts about the simplicial model of Eilenberg–MacLane spaces we are using.
7.3 Eilenberg–MacLane spaces
It follows from our model of Eilenberg–MacLane space, that elements of \(K(\pi _2, 1)_2\) can be identified with labelings of 1faces of a 2simplex by elements of \(\pi _2\) that sum up to zero.
As \(\pi _2\) is an Abelian group, we use the additive notation for \(\pi _2\). We identify the elements of \(K(\pi _2, 1)_2\) with triples \((k_0, k_1, k_2)\), \(k_i \in \pi _2\), \(0\le i\le 2\), such that \(k_0  k_1 + k_2 = 0 \in \pi _2\).
7.4 Loop contraction on \(F_3\)
Let X be a 0reduced, 1connected simplicial set with a given algorithm that computes the contraction on loops \(c_0: (GX)_0 \rightarrow (GX)_1\).
In the rest of the section, we will assume \(x \in X_1\). Then by our assumptions \(c_0 {\overline{x}} = \overline{y_1}^{\epsilon _1} \cdots \overline{y_n}^{\epsilon _n}\), where \(y_i \in X_2, \epsilon _i \in {\mathbb {Z}}\), \(1\le i\le n\). Let \(k_i = \tau ' (y_i)\).
We first show that in order to give a contraction on elements of the form \(\overline{(x,0)}\) and \(\overline{(x,k)}\), it suffices to have the contraction on elements of the form \(\overline{(*,k)}\):
7.5 Contraction on element (x, 0)
7.6 Contraction on element (x, k)
7.7 Contraction on element \((*,k)\)
We formalize the existence of the contraction as follows:
Lemma 15
Let \(k\in \pi _2(X)\). Then there is an algorithm that computes an element \(z\in (GF_3)_1\) such that \(d_0 z = \overline{(*,k)}\) and \(d_1 z = 1\).
The proof is postponed until later and uses a variety of technical results. The main idea is to take a generator of \(\pi _2(X)\) represented by a spherical element \(\gamma \in \pi _1(GX)\) with \([\gamma ] = k\), and use it to find a filler of \(\overline{(*,k)}\).
In general case, for an arbitrary \(k\in \pi _2\) one cannot expect that there exists y with the properties as above, however, the following is true:
Lemma 16
Let \(k\in \pi _2\), then there exists \(\gamma = \overline{y_1}^{\epsilon _1}\cdots \overline{y_n}^{\epsilon _n} \in {\widetilde{GX}}_1\) where \(y_i \in X_2\) and \(\tau ' y_i = k_i \in \pi _2 (X)\), such that \(d_0 \gamma = 1 = d_1 \gamma \) and \(\sum _{i=1}^{n} \epsilon _i \cdot k_i = k\).
Proof
Therefore, if we consider \(\gamma ' \in {\widetilde{AX}}_1\), we can algorithmically compute a spherical element \(\gamma = \overline{y_1}^{\epsilon _1}\cdots \overline{y_n}^{\epsilon _n} \in {\widetilde{GX}}_1\) and it is easy to see that it has the desired properties. \(\square \)
We can now use Lemma 16 and some minor technical tricks to prove Lemma 15.
Proof of Lemma 15
Let \(k\in \pi _2\), then, by Lemma 16, we compute \(\gamma = \overline{y_1}^{\epsilon _1}\cdots \overline{y_n}^{\epsilon _n} \in {\widetilde{GX}}_1\) with \(y_i \in X_2\) and \(\tau ' y_i = k_i \in \pi _2 (X)\), such that \(d_0 \gamma = 1 = d_1 \gamma \) and \(\sum _{i=1}^{n} \epsilon _i \cdot k_i = k\).
7.8 Technical statements
Definition 13
Let \(Z = \{z \in (GF_3)_1 \mid d_0 z = 1\}\) and let \(W = \{d_1 z \mid z\in Z \}\) We define an equivalence relation \(\sim \) on the elements of W in the following way: We say that \(w\sim w'\) if there exists \(z \in Z\), \(\alpha , \beta \in (GF_3)_1\) such that \(d_1 z = w\), \(\alpha z \beta \in Z\) and \(d_1(\alpha z \beta ) = w'\).
Lemma 17
 1.
\(w= \overline{(x,k)}^{\epsilon }\cdot \alpha \), where \(\alpha \in (GF_3)_1\) Then \(w = \overline{(x,k)}^{\epsilon }\cdot \alpha \sim \alpha \cdot (x,k)^{\epsilon } = w'\).
 2.
\(w =\overline{(*,k)}^{\epsilon } \cdot \alpha \), where \(\alpha \in (GF_3)_0\). Then \(w \sim w'= \overline{(*,k)}^{\epsilon } \cdot \alpha \).
 3.
\(w = \overline{(*, k)}^{1} (x,0)\cdot \alpha \), where \(\alpha \in (GF_3)_0\). Then \(w \sim w' = \overline{(x,k)}\cdot \alpha \).
 4.
\(w = \overline{(x,0)}^{1} \overline{(x,k)} \cdot \alpha \), where \(\alpha \in (GF_3)_0\). Then \(w \sim w'= \overline{(*,k)} \cdot \alpha \).
 5.
\(w = \overline{(*, l)}^{1} \overline{(*,k)} \cdot \alpha \), where \(\alpha \in (GF_3)_0\). Then \(w \sim w'= \overline{(*,k+l)}\cdot \alpha \).
Proof
 1.
\(z' = s_0 \overline{(x.k)}^{\epsilon } \cdot z \cdot s_0 \overline{(x,k)}^{\epsilon }\).
 2.
\(z' = \overline{(*,(k, 0, k))}^{\epsilon } \cdot (s_0\overline{(*,k)})^{\epsilon } \cdot z\).
 3.
\(z' = (s_0\overline{(x,k)}) \cdot \overline{(s_0 x,(k, 0, k))}^{1} \cdot z\).
 4.
\(z' = (s_0\overline{(*,k)})\overline{(s_1 x,(k,k,0))}^{1}\cdot z\).
 5.
\(z' = \overline{(s_0(*,k + l))}\overline{(*,(k + l,k,  l))}^{1}\cdot z\).
Lemma 18
Proof
It follows that the construction described above can be applied iteratively until all elements \(\overline{(x_i, 0)}\) are removed and we obtain \(w \sim \overline{( \sum _{i = 1} ^{n} k_i, *)}^{1} \sim \overline{(\sum _{i = 1} ^{n} k_i, *)}\). \(\square \)
7.9 Computational complexity
We first observe that formulas for \(c_0\) on a general element \(\overline{(x,k)}\) depend polynomially on the size of \(c_0 (\overline{x})\) and the size of contractions on \(\overline{(*,k)}\). Hence it is enough to analyze the complexity of the algorithm described in Proposition 15.
The computation of \(\gamma '\) is obtained by the polynomialtime Smith normal form algorithm presented in Kannan and Bachem (1981) and the polynomialtime algorithm in Lemma 13. The size of \(z'\) depends polynomially (in fact linearly) on size of \(\gamma '\). The algorithm described in Lemma 18 runs in a linear time in the size of \(z'\).
To sum up, the algorithm computes the formula for contraction on the elements of \(GF_i\) in time polynomial in the input (\(\mathrm {size}\, X + \mathrm {size}\, c_0 (GX)\)).
8 Reconstructing a map to the original simplicial complex
8.1 Edgewise subdivision of simplicial complexes

The vertices of \(\mathrm {Esd}_k({\varDelta }^m)\) are labeled by integer coordinates \((a_0,\ldots , a_{m})\) such that \(a_j\ge 0\) and \(\sum _j a_j=k\).

Two vertices \((a_0,\ldots a_m)\) and \((b_0,\ldots , b_m)\) are adjacent if there is a pair \(j<k\) such that \(b_ja_j=b_ka_k=1\) and \(a_i=b_i\) for \(i\ne j,k\).

Simplices of \(\mathrm {Esd}_k({\varDelta }^m)\) are given by tuples of vertices such that each vertex of a simplex is adjacent to each other vertex.
An edgewise ksubdivision of \({\varDelta }^m\) induces an edgewise ksubdivision of all faces, hence we may naturally define an edgewise subdivision of any simplicial complex.
8.2 Constructing the map \(\mathrm {Esd}_k({\varSigma })\rightarrow X^{sc}\)

\(M(j)(V):=V\) if \(j\ge \mathrm {dist}_T(V)\), and

M(j)(V) is the vertex on the unique treepath from R to V that has treedistance j from R if \(j < \mathrm {dist}_T(V)\).
Assume that d is the dimension of \({\varSigma }\) and \(k:=l(d+1)+1\). We will define \(f': \mathrm {Esd}_k({\varSigma })\rightarrow X^{sc}\) simplexwise. Let \(\tau \in {\varSigma }\) be an msimplex and \(f(\tau )={\tilde{\sigma }}\in {X}\) be its image in the simplicial set X. If \({\sigma }\) is the degeneracy of the basepoint \(*\in X\), then we define \(f'(x):=R\) for all vertices x of \(\mathrm {Esd}_k(\tau )\): in other words, \(f'\) will be constant on the subdivision of \(\tau \). Otherwise, \({\tilde{\sigma }}\) is not the degeneracy of a point and has a unique lift \(\sigma \in X^{ss}\) (recall that \(X:=X^{ss}/T\)). Let \((V_0,\ldots , V_m)\) be the vertices of \(\sigma \) (order given by orientation): these vertices are not necessarily different, as \(\sigma \) may be degenerate.

For each \(\{i_0,\ldots , i_j\}\in S\), \(\{V_{i_0}, \ldots , V_{i_j}\}\) is in the tree (that is, it is either an edge or a single vertex),

Each set in S is maximal wrt. inclusion.
Definition 14
Let \({\varDelta }^m\) be an oriented msimplex, represented as a sequence of vertices \((e_0,\ldots , e_m)\). For any face \(s\subseteq \{e_0,\ldots , e_m\}\), we define the extended face\({\mathcal {E}}(s)\)in\(\mathrm {Esd}_k({\varDelta }^m)\) to be the set of vertices \((x_0,\ldots , x_m)\) in \(\mathrm {Esd}_k({\varDelta }^m)\) that have nonzero coordinates only on positions i such that \(e_i\in S\).
The geometric meaning of this is illustrated by Fig. 5.
Definition 15
Let S be defined as above. We define the extended tree\({\mathcal {E}}(T)\) to be the union of the extended faces \({\mathcal {E}}(s)\) in \(\mathrm {Esd}_k({\varDelta }^m)\) for all \(s\in S\). The edgedistance of a vertex x in \(\mathrm {Esd}_k({\varDelta }^m)\) from \({\mathcal {E}}(T)\) will be denoted by \(\mathrm {dist}_{ET}(x)\).
In words, \({\mathcal {E}}(T)\) it is the union of all vertices in parts of the boundary of \(\mathrm {Esd}_k({\varDelta }^m)\) that correspond to the faces of \(\sigma \) that are in the tree, see Fig. 5. The number \(\mathrm {dist}_{ET}(x)\) is the distance to x from those boundary parts that correspond to faces of \(\sigma \) that are in the tree.
8.3 Computational complexity
Assuming that we have a given encoding of \({\varSigma },f,{X},X^{sc}\) and a choice of T and R, defining a simplicial map \(f':\mathrm {Esd}_k({\varSigma })\rightarrow X^{sc}\) is equivalent to labeling vertices of \(\mathrm {Esd}_k({\varSigma })\) by vertices of \(X^{sc}\). Clearly, the maximal treedistance l of some vertex depends only polynomially on the size of \(X^{sc}\) and can be computed in polynomial time, as well as the maps \(M(0),\ldots , M(l)\). Whenever \(j>l\), we can use the formula \(M(j)=\mathrm {id}\). Further, \(k=l(d+1)+1\) is linear in l, assuming the dimension d is fixed. If \(\tau \in {\varSigma }\) is an msimplex, then the number of vertices in \(\mathrm {Esd}_k(\tau )\) is polynomial^{19} in k, and their coordinates can be computed in polynomial time. Finding the lift \(\sigma \) of \(f(\tau )={\tilde{\sigma }}\) is at most a linear operation in \(\mathrm {size}(X^{sc})+\mathrm {size}({\tilde{\sigma }})\). Converting \(\sigma \in X^{ss}\) into an ordered sequence \((V_0,V_1,\ldots , V_m)\) amounts to computing its vertices \(d_0 d_1 \ldots \hat{d_i}\ldots , d_m \sigma \), where \(d_i\) is omitted. Collecting information on faces of \(\sigma \) that are in the tree and the set of vertices \({\mathcal {E}}(T)\) is straightforward: note that assuming fixed dimensions, there are only constantly many faces of each simplex to be checked. If \(s=\{i_0,\ldots , i_j\}\) is a face, then the edgedistance of a vertex x from \({\mathcal {E}}(s)\) equals to \(\sum _{u} x_{i_u}\). Applying formula (11) to x requires to compute the edgedistance of x from \({\mathcal {E}}(T)\): this equals to the minimum of the edgedistances of x from \({\mathcal {E}}(s)\) for all faces s of \(\sigma \) that are in the tree. Computing \({{\mathrm{arg\,max}}}x\) is a trivial operation. Finally, the number of simplices \(\tau \) of \({\varSigma }\) is bounded by the size of \({\varSigma }\), so applying (11) to each vertex of \(\mathrm {Esd}_k({\varSigma })\) only requires polynomially many steps in \(\mathrm {size}({\varSigma },f,X^{sc},T,{X})\).
8.4 Correctness
What remains is to prove that formula (11) defines a welldefined simplicial map and that \(\mathrm {Esd}_k({\varSigma })\rightarrow X^{sc}\rightarrow {X}\) is homotopic to \({\varSigma }\rightarrow {X}\).
Lemma 19
The above algorithm determines a welldefined simplicial map \(\mathrm {Esd}({\varSigma })\rightarrow X^{sc}\).
Proof

If \(\tau '\) is spanned by vertices of \(\tau \) corresponding to \(s\subseteq \{0,\ldots , m\}\), then a vertex \(x':=(x_0,\ldots ,x_j)\) in \(\mathrm {Esd}_k(\tau ')\) has coordinates x in \(\mathrm {Esd}_k(\tau )\) equal to zero on positions \(\{0\ldots , m\}{\setminus } s\) and to \(x_0,\ldots , x_j\) on other positions, successively.
 If \(V_k':=V_{i_k}\) for \(s=(i_0,\ldots ,i_j)\) are the vertices of the corresponding face of \(\sigma \), then$$\begin{aligned} V_{{{\mathrm{arg\,max}}}x'}'=V_{{{\mathrm{arg\,max}}}x} \end{aligned}$$

The extended tree \(\mathcal {E'}(T)\) in \(\mathrm {Esd}_k(\tau ')\) equals the intersection of the extended tree in \(\mathrm {Esd}_k(\tau )\) with \({\mathcal {E}}(\tau ')\)

The distance \(\mathrm {dist}_{ET}(x')\) in \(\mathrm {Esd}_k(\tau ')\) equals \(\mathrm {dist}_{ET}(x)\) in \(\mathrm {Esd}_k(\tau )\).
We will show the last claim by contradiction. Assume that some simplex is not mapped to a subset of \(\{V_0,\ldots , V_m\}\), and also it is not mapped to an edge of the tree and not mapped to a single vertex. Then there exist two vertices x and y in this simplex that are labeled by U and W in \(X^{sc}\), such that either U or W is not in \(\{V_0,\ldots , V_m\}\), UW is not in the tree, and \(U\ne W\).
The fact that at least one of \(\{U,W\}\) does not belong to \(\{V_0\ldots , V_m\}\), implies that \({{\mathrm{dist}}}_{ET}(x)<l\) or \({{\mathrm{dist}}}_{ET}(y)<l\) (as M(j) maps each \(V_{{{\mathrm{arg\,max}}}x}\) to itself for \(j\ge l\)).
We claim that \(V_0\ne V_1\) and that the edge \(V_0V_1\) is not in the tree. This is because there exists a treepath from R via U to \(V_0\) and also a treepath from R via W to \(V_1\) (and \(U\ne W\)): both \(V_0=V_1\) as well as a treeedge \(V_0 V_1\) would create a circle in the tree. In coordinates, this means that vertices \((*,*,0,0,\ldots , 0)\) are not contained in \({\mathcal {E}}(T)\), apart of \((k,0,0,\ldots , 0)\) and \((0,k,0,\ldots , 0)\). So, any vertex in \({\mathcal {E}}(T)\) has a zero on either the zeroth or the first coordinate. This immediately implies that \({{\mathrm{dist}}}_{ET}(x)\ge j\) and \({{\mathrm{dist}}}_{ET}(y)\ge j\). Keeping in mind that coordinates of x (and y) has to sum up to \(k=l(d+1)+1\), the smallest possible value of j is \(j=l\) (if \(m=d\) is maximal), in which case \(x=(l+1, l,l,\ldots ,l)\) and \(y=(l,l+1,\ldots , l)\). This choice, however, would contradict the fact that either \({{\mathrm{dist}}}_{ET}(x)<l\) or \({{\mathrm{dist}}}_{ET}(y)<l\). Therefore we have a strict inequality \(j>l.\) Finally, we derive a contradiction having either \({{\mathrm{dist}}}_{ET}(x)\ge j>l>{{\mathrm{dist}}}_{ET}(x)\), or a similar inequality for y.
This completes the proof that each simplex is either mapped to a subset of \(\{V_0,\ldots , V_m\}\) or to an edge in the tree or to a single vertex: the image is a simplex in \(X^{sc}\) in either case. \(\square \)
Lemma 20
The geometric realizations of \(pf': \mathrm {Esd}_k({\varSigma })\rightarrow {X}\) and \(f: {\varSigma }\rightarrow {X}\) are homotopic.
Proof
Let us denote the (ordered) vertices of \(\tau \) by \(\{v_0,v_1,\ldots ,v_d\}\) and let \(\delta \subseteq \tau \) be one of its faces: further, let \(w_i\) be the vertex of \(\tau ^{int}\) with barycentric coordinates \((l,\ldots ,l,l+1,l,\ldots ,l)/k\) in \(\tau \) such that the \(l+1\) is in position i. The homotopy \(H_{\tau }\) sends points in \(\delta \) onto the span of points \(w_i\) for which \(v_i\in \delta \). For \(y\in \delta \), the jth barycentric coordinate of \(H_{\tau }(y,t)\) is equal to \(t\,(l/k)\) for each \(j\notin \delta \). In particular, the jth coordinate of \(H_{\tau }(y,t)\) is between 0 and l / k for \(j\notin \delta \), and hence it is not the “dominant” coordinate. It follows that each \(z:=H_{\tau }(x,t)\) is contained in the interior of a unique simplex \({\varDelta }\) of \(\mathrm {Esd}_k(\tau )\) such that \(v_{{{\mathrm{arg\,max}}}x}\in \delta \) for all vertices x of \({\varDelta }\).
Let \(i_0< i_1\cdots < i_k\) be the indices with \(v_{i_j}\in \delta \), and \(j_1< \cdots < j_{dk}\) be the remaining indices. Let \(\tau '=(v_0',\ldots ,v_d')\) be another dsimplex containing \(\delta \) as a face. Assume, for simplicity, that the vertices of \(\tau '\) are ordered so that vertices of \(\delta \) have orders \(i_0,\ldots ,i_k\)—such as it is in \(\tau \). Let \(\sigma ,\sigma '\) be the lift of \(f(\tau )\), \(f(\tau ')\) respectively, and \(V_i\), \(V_i'\) the ith vertex of \(\sigma \), \(\sigma '\) respectively.
We define a “mirror” map \(m: \tau \rightarrow \tau '\), which to a point with barycentric coordinates \((x_0,\ldots ,x_d)\) with respect to \(\tau \) assigns a point in \(\tau '\) with the same barycentric coordinates with respect to \(\tau '\). Clearly, \(H_{\tau '}(y,t)=m(H_{\tau }(y,t))\) for \(y\in \tau \) and whenever z is in the interior of a simplex \({\varDelta }\in \mathrm {Esd}_k(\tau )\), then m(z) is in the interior of \(m({\varDelta })\), where vertices of \({\varDelta }\) and \(m({\varDelta })\) have the same barycentric coordinates with respect to \(\tau \) and \(\tau '\), respectively. If, moreover, \({\varDelta }\) is such that each of its vertices r have coordinates \(\le l/k\) on positions \(j_1,\ldots , j_{dk}\), then \(V_{{{\mathrm{arg\,max}}}r}=V_{{{\mathrm{arg\,max}}}m(r)}'\).

they have the same coordinates wrt. \(\tau \), \(\tau '\), respectively,

they are in the interior of simplices \({\varDelta }\in \mathrm {Esd}_k(\tau )\), \({\varDelta }'\in \mathrm {Esd}_k(\tau ')\) whose vertices have the same coordinates wrt. \(\tau \), \(\tau '\), respectively,

the \({{\mathrm{arg\,max}}}\) labeling induces the same labeling of vertices of \({\varDelta }\), \({\varDelta }'\) by vertices of \(\delta \), respectively.
The map \(pf'\) takes each msimplex \({\varDelta }\) in \(\mathrm {Esd}_k(\tau )\) with vertices \(t_u\) labeled by \(V_{{{\mathrm{arg\,max}}}t_u}\) onto \(p(V_{{{\mathrm{arg\,max}}}t_0},\ldots , V_{{{\mathrm{arg\,max}}}t_m})\) and it follows from the above properties that \(m({\varDelta })\) is mapped to the same simplex. We conclude that \(pf' H_{\tau }(y,t)=pf'H_{\tau '}(y,t)\) for each \(y\in \delta \) and \(t \in [0,1]\) (Fig. 8). \(\square \)
Footnotes
 1.
 2.
That is, they compute integers \(r,q_1,\ldots ,q_k\) such that \(\pi _d(X)\) is isomorphic to \({\mathbb {Z}}^r\oplus {\mathbb {Z}}_{q_1}\oplus \cdots \oplus {\mathbb {Z}}_{q_k}\).
 3.
Similarly, the algorithm in Čadek et al. (2014b) constructs an auxiliary chain complex C such that \(\pi _d(X)\) is isomorphic to the homology group \(H_{d+1}(C)\) and computes the latter.
 4.
Similarly as before, the algorithm in Čadek et al. (2014a) computes [X, Y] as the set [X, P] for some auxiliary space P (a stage of a Postnikov system for Y) and represents the elements of \([X,Y]\cong [X,P]\) as maps from X to P, but not as maps to Y.
 5.
The Whitehead tower can is a “dual” construction to the Postnikov tower, beginning with the space X and gradually eliminating the homotopy groups “’form the bottom”. For the readers familiar with Moore–Postnikov towers (or relative Postnikov towers), the Whitehead tower is the Moore–Postnikov tower for \(* \rightarrow X\), see e.g. Goerss and Jardine (1999), Def. IV, 2.9.
 6.
A homotopy \(F: {S}^k \times I \rightarrow X\) is pointed if \(F(*,t) = x_0\) for all \(t \in I\).
 7.
Formally, elements of F(S) are sequences of symbols \(s^{\epsilon }\) for \(\epsilon \in \{1,1\}\) and \(s\in S\) with the relation \(s^1 s^{1}=1\), where 1 represents the empty sequence. The group operation is concatenation.
 8.
We remark that the paper Čadek et al. (2014b) uses a different formalization of twitsed cartesian product than the one employed by us. However, the paper Filakovský (2012), on which the Corollary 3.18 of Čadek et al. (2014b) is based, can be reformulated in context of the definition used here. We do not provide full details, only remark that one has to make a choice of Eilenberg–Zilber reduction data that corresponds to the definition of twisted cartesian product.
 9.
 10.
The subdivision Sd(Y) has geometric realization homeomorphic to Y by Fritsch and Piccinini (1990, Thm 4.6.4). The realization of Sd(X) is a regular CW complex and \(B_*(Sd(Y))\) coincides with the first derived subdivision of this regular CW complex, as defined in Geoghegan (2007, p. 137). The geometric realization of the resulting simplicial complex is still homeomorphic to Y and Sd(Y) by Geoghegan (2007, Prop. 5.3.8).
 11.
The constructed map f does not necessarily preserves orientations: it only maps simplices to simplices.
 12.
With a slight abuse of language, we assume that each \(X_k\) not only a simplicial set but also its algorithmic representation with a specified size such as explained in Sect. 3.
 13.
Kan uses a slightly different convention in Kan (1958a) but the resulting properties are the same. The sequence \(\beta _0,\ldots ,\beta _k\) can be interpreted as a discrete path from \(\alpha \) to the identity element.
 14.
For \(t=\sum _j k_j {\overline{\sigma }}_j\), we may choose \(h=\prod _j {\overline{\sigma }}_j^{k_j}\) (choosing any order of the simplices).
 15.
The connectivity assumption on F was exploited in the existence of the contraction \(c_j^A\) on the Abelian part.
 16.
By nontrivial we mean that \(\gamma \ne 1_x\) for any \(x\in X_{d1}\).
 17.
For example, \([a,1] [b,2] [b,2]^{1} [a,1]^{1}\) can be split into a sequence \(([b,2], [b,2]^{1}), ([a,1], [a,1]^{1})\).
 18.
If \(\dim (\tau )=d\) is maximal, then \(j=l\) and this mostmiddle simplex has particularly nice coordinates \((l+1,l,\ldots , l), \ldots , (l,\ldots , l,l+1)\).
 19.
Here the assumption on the fixed dimension d is crucial.
 20.
In general, vertices of \(\delta \) may have different order in \(\tau \) and \(\tau '\) and the assumption on compatible ordering was chosen only to increase readability. If \(i_0'< \cdots <i_{k}'\) are such that \(v_{i_j'}'=v_{i_j}\) (orders of \(\delta \)vertices wrt. \(\tau '\)) and \(j_1'<\cdots <j_{dk}'\) are positions of the remaining vertices in \(\tau '\), then m is defined so that it maps \(x\in \tau \) with \(\tau \)coordinates \((x_0,\ldots , x_d)\) into \(x'\in \tau '\) with coordinates \(x_{i_j'}'=x_{i_j}\) and \(x_{j_k}'=x_{j_k}\).
Notes
Acknowledgements
Open access funding provided by Austrian Science Fund (FWF). We would like to thank Marek Krčál, Lukáš Vokřínek, Martin Čadek and Sergey Avvakumov for helpful conversations and comments.
References
 Adyan, S.I.: Algorithmic unsolvability of problems of recognition of certain properties of groups. Dokl. Akad. Nauk SSSR (NS) 103, 533–535 (1955)MathSciNetzbMATHGoogle Scholar
 Anick, D.J.: The computation of rational homotopy groups is #\(\wp \)hard. In: Proceedings of the Conference on Computers in Geometry and Topology, Chicago/IL, 1986, Lecture Notes in Pure and Application Mathematics, vol. 114, pp. 1–56 (1989)Google Scholar
 Barratt, M.: Simplcial and Semisimplicial Complextes. Mimeographed Lecture Notes. Princeton University, Princeton (1956)Google Scholar
 Berger, C.: An effective version of the Hurewicz theorem. Theses, Université JosephFourier—Grenoble I, (1991). https://tel.archivesouvertes.fr/tel00339314
 Berger, C.: Un groupoïde simplicial comme modèle de l’espace des chemins. Bull. Soc. Math. Fr. 123(1), 1–32 (1995)MathSciNetzbMATHGoogle Scholar
 Brown Jr., E.H.: Finite computability of Postnikov complexes. Ann. Math. 2(65), 1–20 (1957)MathSciNetzbMATHGoogle Scholar
 Čadek, M., Krcál, M., Matoušek, J., Vokřínek, L., Wagner, U.: Extending continuous maps: polynomiality and undecidability. In: STOC, pp. 595–604 (2013a)Google Scholar
 Čadek, M., Krčál, M., Matoušek, J., Vokřínek, L., Wagner, U.: Extendability of continuous maps is undecidable. Discrete Comput. Geom. 51(1), 24–66 (2013)MathSciNetzbMATHGoogle Scholar
 Čadek, M., Krčál, M., Matoušek, J., Sergeraert, F., Vokřínek, L., Wagner, U.: Computing all maps into a sphere. J. ACM 61(3), 17:1–17:44 (2014)MathSciNetzbMATHGoogle Scholar
 Čadek, M., Krčál, M., Matoušek, J., Vokřínek, L., Wagner, U.: Polynomialtime computation of homotopy groups and Postnikov systems in fixed dimension. SIAM J. Comput. 43(5), 1728–1780 (2014)MathSciNetzbMATHGoogle Scholar
 Čadek, M., Krčál, M., Vokřínek, L.: Algorithmic solvability of the liftingextension problem. Discrete Comput. Geom. 57, 1–51 (2017)MathSciNetzbMATHGoogle Scholar
 Edelsbrunner, H., Grayson, D.R.: Edgewise subdivision of a simplex. In: Proceedings of the Fifteenth Annual Symposium on Computational Geometry, SCG ’99, pp. 24–30, New York, NY, USA, 1999. ACMGoogle Scholar
 Edelsbrunner, H., Harer, J.L.: Computational Topology. American Mathematical Society, Providence, RI (2010)zbMATHGoogle Scholar
 Ferry, S., Weinberger, S.: Quantitative algebraic topology and lipschitz homotopy. Proc. Natl. Acad. Sci. 110(48), 19246–19250 (2013)MathSciNetzbMATHGoogle Scholar
 Filakovský, M.: Effective chain complexes for twisted products. Preprint (2012). arXiv:1209.1240
 Filakovský, M., Vokřínek, L.: Are two given maps homotopic? An algorithmic viewpoint (2013). Preprint arXiv:1312.2337
 Franek, P., Krčál, M.: Robust satisfiability of systems of equations. J. ACM 62(4), 26:1–26:19 (2015)MathSciNetzbMATHGoogle Scholar
 Freedman, M., Krushkal, V.: Geometric complexity of embeddings in \({\mathbb{R}}^d\). Geom. Funct. Anal. 24(5), 1406–1430 (2014)MathSciNetzbMATHGoogle Scholar
 Fritsch, R., Piccinini, R.A.: Cellular Structures in Topology. Cambridge Studies in Advanced Mathematics, vol. 19. Cambridge University Press, Cambridge (1990). https://doi.org/10.1017/CBO9780511983948 zbMATHGoogle Scholar
 Geoghegan, R.: Topological Methods in Group Theory. Graduate Texts in Mathematics. Springer, New York (2007). https://books.google.at/books?id=BwX6gblqV8MC
 Goerss, P.G., Jardine, J.F.: Simplicial Homotopy Theory. Birkhäuser, Basel (1999)zbMATHGoogle Scholar
 Gromov, M.: Quantitative homotopy theory. In: Rossi, H. (ed.) Prospects in Mathematics: Invited Talks on the Occasion of the 250th Anniversary of Princeton University, pp. 45–49 (1999)Google Scholar
 Haefliger, A.: Plongements différentiables dans le domaine stable. Comment. Math. Helv. 37, 155–176 (1962/1963)Google Scholar
 Hatcher, A.: Algebraic Topology. Cambridge University Press, Cambridge (2001)zbMATHGoogle Scholar
 Heras, J., Pascual, V., Rubio, J., Sergeraert, F.: fKenzo: a user interface for computations in algebraic topology. J. Symb. Comput. 46(6), 685–698 (2011)MathSciNetzbMATHGoogle Scholar
 Jardine, J.F.: Simplicial approximation. Theory Appl. Categ. 12(2), 34–72 (2004)MathSciNetzbMATHGoogle Scholar
 Kan, D.: The Hurewicz theorem. In: International Symposium of Algebraic Topology, Autonomous University of Mexico and UNESCO, pp. 225–231 (1958a)Google Scholar
 Kan, D.M.: A combinatorial definition of homotopy groups. Ann. Math. 67(2), 282–312 (1958)MathSciNetzbMATHGoogle Scholar
 Kannan, R., Bachem, A.: Polynomial algorithms for computing the Smith and Hermite normal forms of an integer matrix. SIAM J. Comput. 8, 499–507 (1981)MathSciNetzbMATHGoogle Scholar
 Kochman, S.O.: Stable Homotopy Groups of Spheres: A ComputerAssisted Approach. Lecture Notes in Mathematics, vol. 1423. Springer, Berlin (1990)zbMATHGoogle Scholar
 Krčál, M., Matoušek, J., Sergeraert, F.: Polynomialtime homology for simplicial Eilenberg–MacLane spaces. Found. Comput. Math. 13, 935–963 (2013)MathSciNetzbMATHGoogle Scholar
 Mabillard, I., Wagner, U.: Eliminating highermultiplicity intersections, II. The deleted product criterion in the \(r\)metastable range. In: Proceedings of the 32nd International Symposium on Computational Geometry (SoCG 2016), pp. 51:1–51:12 (2016)Google Scholar
 Matoušek, J.: Computing higher homotopy groups is \(W[1]\)hard. Fund. Inf. (2014). Preprint arXiv:1304.7705
 Matoušek, J., Tancer, M., Wagner, U.: Hardness of embedding simplicial complexes in \({\mathbb{R}}^d\). J. Eur. Math. Soc. 13(2), 259–295 (2011)MathSciNetzbMATHGoogle Scholar
 Matoušek, J., Sedgwick, E., Tancer, M., Wagner, U.: Embeddability in the 3sphere is decidable. In: Proceedings of the Thirtieth Annual ACM Symposium on Computational Geometry, SOCG’14, pp. 78–84, New York, NY, USA (2014)Google Scholar
 Matveev, S.: Algorithmic Topology and Classification of 3Manifolds. Springer, Berlin (2007)zbMATHGoogle Scholar
 May, J.P.: Simplicial Objects in Algebraic Topology. Chicago Lectures in Mathematics. University of Chicago Press, Chicago (1992). (reprint of the 1967 original)Google Scholar
 Munkres, J.R.: Elements of Algebraic Topology. AddisonWesley, Reading, MA (1984)zbMATHGoogle Scholar
 Quillen, D.G.: Homotopical Algebra. Lecture Notes in Mathematics. Springer, Berlin (1967)Google Scholar
 Rabin, M.O.: Recursive unsolvability of group theoretic problems. Ann. Math. 2(67), 172–194 (1958)MathSciNetzbMATHGoogle Scholar
 Ravenel, D.C.: Complex Cobordism and Stable Homotopy Groups of Spheres, 2nd edn. American Mathematical Society, Providence (2004)zbMATHGoogle Scholar
 Real, P.: An algorithm computing homotopy groups. Math. Comput. Simul. 42, 461–465 (1996)MathSciNetzbMATHGoogle Scholar
 Romero, A., Sergeraert, F.: Effective homotopy of fibrations. Appl. Algebra Eng. Commun. Comput. 23(1–2), 85–100 (2012)MathSciNetzbMATHGoogle Scholar
 Romero, A., Sergeraert, F.: A BousfieldKan algorithm for computing the effective homotopy of a space. Found. Comput. Math. 17, 1–32 (2016)MathSciNetGoogle Scholar
 Romero, A., Rubio, J., Sergeraert, F.: Computing spectral sequences. J. Symb. Comput. 41(10), 1059–1079 (2006)MathSciNetzbMATHGoogle Scholar
 Rubio, J., Sergeraert, F.: Constructive algebraic topology. Bull. Sci. Math. 126(5), 389–412 (2002)MathSciNetzbMATHGoogle Scholar
 Rubio, J., Sergeraert, F.: Algebraic models for homotopy types. Homol. Homotopy Appl. 17, 139–160 (2005)MathSciNetzbMATHGoogle Scholar
 Rubio, J., Sergeraert, F.: Constructive homological algebra and applications. Preprint arXiv:1208.3816 (2012)
 Schön, R.: Effective Algebraic Topology. Memoirs of the American Mathematical Society. American Mathematical Society, Providence (1991)Google Scholar
 Sergeraert, F.: The computability problem in algebraic topology. Adv. Math. 104(1), 1–29 (1994)MathSciNetzbMATHGoogle Scholar
 Smith, J.R.: mStructures determine integral homotopy type. Preprint arXiv:math/9809151v1 (1998)
 Soare, R.I.: Computability theory and differential geometry. Bull. Symb. Logic 10(4), 457–486 (2004)MathSciNetzbMATHGoogle Scholar
 Vokřínek, L.: Decidability of the extension problem for maps into odddimensional spheres. Discrete Comput. Geom. 57(1), 1–11 (2017)MathSciNetzbMATHGoogle Scholar
 Weber, C.: Plongements de polyèdres dans le domaine metastable. Comment. Math. Helv. 42, 1–27 (1967)MathSciNetzbMATHGoogle Scholar
 Zomorodian, A.J.: Topology for Computing. Cambridge Monographs on Applied and Computational Mathematics, vol. 16. Cambridge University Press, Cambridge (2005)Google Scholar
Copyright information
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.