1 Introduction

In many engineering and scientific solutions, a highly desired property is the resistance against noise or perturbations. We can only name a fraction of the instances: stability in data analysis [7], robust optimization [3], image processing [17], or stability of numerical methods [19]. Some very important tools for robust design come from topology, which can capture stable properties of spaces and maps.

In this paper, we take the robustness perspective on the study of the solution set of systems of nonlinear equations, a fundamental problem in mathematics and computer science. Equations arising in mathematical modeling of real problems are usually inferred from observations, measurements or previous computations. We want to extract maximal information about the solution set, if an estimate of the error in the input data is given.

More formally, for a continuous map \(f:K\rightarrow {\mathbb {R}}^n\) on a compact Hausdorff space K and \(r>0\) we want to study properties of the family of zero sets

$$\begin{aligned} Z_r(f):=\{g^{-1}(0):\Vert f-g\Vert \le r\}, \end{aligned}$$

where \(\Vert \cdot \Vert \) is the max-norm with respect to some fixed norm \(|\cdot |\) in \({\mathbb {R}}^n\). The functions g with \(\Vert f-g\Vert \le r\) (or \(\Vert f-g\Vert <r\)) will be referred to as r-perturbations of f (or strict r-perturbations of f, respectively). Quite notably, we are not restricted to parameterized perturbations but allow arbitrary continuous functions at most (or less than) r far from f in the max-norm.

Well Groups. Recently, the concept of well groups was designed to quantify transversality of a map \(K\rightarrow Y\) with respect to a subspace \(Y'\) of Y. Following [11], we assumeFootnote 1 a subspace \({\mathcal {P}}\) of C(KY) with a metric d. Any \(h\in {\mathcal {P}}\) for which \(d(h,f)\le r\) is called an r-perturbation of f and we define \(X_r\subseteq K\) to be the union of \(g^{-1}(Y')\) over all r-perturbations h of f. The inclusion \(h^{-1}(Y')\hookrightarrow X_r\) induces a map in homology \(j_h: H(h^{-1}(Y'))\rightarrow H(X_r)\), where H is a suitable homology theory. For \(r>0\), the well group U(r) is defined to be the intersection \(\cap \,\mathrm {Im}(j_h)\) over all r-perturbations h of f. Informally, well group capture the robustness of intersection of f(K) with \(Y'\) via means of homology, namely “homological properties” that are common to all \(h^{-1}(Y')\) for all r-perturbations h of f.

We will deal with the special but important case when \(Y={\mathbb {R}}^n\), \(Y'=\{0\}\), and \({\mathcal {P}}\) is the space of all continuous functions \(C(K,{\mathbb {R}}^n)\) with the max-norm with respect to a fixed norm on \({\mathbb {R}}^n\). Then well group is a property of \(Z_r(f)\) that captures homological properties common to all zero sets in \(Z_r(f)\). We enhance the theory to include a relative case Footnote 2 that is especially convenient in the case when K is a manifold with boundary. Let \(B\subseteq K\) be a pair of compact Hausdorff spaces and \(f: K\rightarrow {\mathbb {R}}^n\) continuous. Let \(X:=|f|^{-1} [0,r]\) where |f| denotes the function \(x\mapsto |f(x)|\); this is the smallest space containing zero sets of all r-perturbations h of f and coincides with \(X_r\) from the notation of [11].

In the rest of the paper, for any space \(Z\subseteq K\) we will abbreviate the pair \((Z,Z\cap B\)) by (ZB) and, similarly for homology, \(H_*(Z,Z\cap B)\)) by \(H_*(Z,B)\). Everywhere in the paper we use homology and cohomology groups with coefficients in \({\mathbb {Z}}\) unless explicitly stated otherwise. For brevity we omit the coefficients from the notation.

We define the jth well group \(U_j(f,r)\) of f at radius r as the subgroup of \(H_j(X,B)\)

$$\begin{aligned} U_j(f,r):=\bigcap _{Z\in Z_r(f)} \, \mathrm {Im}\big (H_j(Z, B)\mathop {\longrightarrow }\limits ^{i_*} H_j(X,B)\big ), \end{aligned}$$

where \(i_*\) is induced by the inclusion \(i:Z \hookrightarrow X\) and H refers to a convenient homology theory of compact metrizable spaces that we describe below.Footnote 3 This reduces to the original definition whenever \(B=\emptyset \). For a simple example of a map f with nontrivial first well group see Fig. 1 on page 5.

Significance of Well Groups. We only mention a few of many interesting things mostly related to our setting. The well group in dimension zero characterizes robustness of solutions of a system of equations \(f(x)=0\). Namely, \(\emptyset \in Z_r(f)\) if and only if \(U_0(f,r)\cong 0\). Higher well groups capture additional robust topological properties of the zero set such as in Fig. 1. Perhaps the most important is their ability to form well diagrams [11]—a kind of measure for robustness of the zero set (or more generally, robustness of the intersection of f with other subspace \(Y'\subseteq Y)\). The well diagrams are stable with respect to taking perturbations of f.Footnote 4

Homology Theory. For the foundation of well groups we need a homology theory on compact Hausdorff spaces that satisfies some additional properties that we specify later in Sect. 3. Roughly speaking, we want that the homology theory behaves well with respect to infinite intersections. Without these properties we would have to consider only “well behaved” perturbations of a given f in order to be able to obtain some nontrivial well groups in dimension greater than zero. We explain this in more detail also in Sect. 3. For the moment it is enough to say that the Čech homology can be used and that for any computational purposes it behaves like simplicial homology. In Sect. 3 we explain why using singular homology would make the notion of well groups trivial.

A basic ingredient of our methods is the notion of cap product

$$\begin{aligned} \frown : H^n(X,A)\otimes H_k(X,A\cup B)\rightarrow H_{k-n}(X,B) \end{aligned}$$

between cohomology and homology. We refer the reader to [28, Sect. 2.2] and [18, p. 239] for its properties and to Appendix 4 for its construction in Čech (co)homology. Again, it behaves like the simplicial cap product when applied to simplicial complexes. For an algorithmic implementation, one can use its simplicial definition from [28].

1.1 Computability Results

The main result introduced in this section is the computability of certain subgroup of the well group that in many cases coincides with the full well group. A core ingredient is certain cohomology class that we will call primary obstruction. Intuitively, it assigns to each n-cell in a triangulation of X the intersection number with arbitrary zero set in \(Z_r(f)\). In the example illustrated in Fig. 1, it would be an element assigning \(\pm 1\) to each vertical edge of a triangulation of the rectangle X that connects the “lower face” with the “upper face”, indicating that such edge intersects the zero set at least once. If X is a compact oriented connected manifold, there is a well-defined Poincaré dual of the primary obstruction: this is a homology class of a cycle that intersects the cells of X as prescribed by the primary obstruction. We will show that not only the Poincaré dual but, even more generally, any cap productFootnote 5 of the primary obstruction is contained in the well group of f.

Fig. 1
figure 1

For the projection \(f(x,y)=y\) to the vertical axis defined on a box K, the zero set of every r-perturbation is contained in \(X=|f|^{-1}[0,r]\) and \(\partial X\) consists of A (upper and lower side) where \(|f|=r\), and \(X\cap B\subseteq \partial K\). The zero set always separates the two components of A. On the homological level, the zero set “connects” the two components of \(X\cap B\) and the image of \(H_1(g^{-1}(0),B)\) in \(H_1(X,B)\) is always surjective and thus \(U_1(f,r)\cong H_1(X,B)\). Note that the well group would be trivial with \(B=\emptyset \)

Computer Representation. To speak about computability, we need to fix some computer representation of the input. Here we assume the simple but general setting of [14], namely, K is a finite simplicial complex, \(B\subseteq K\) a subcomplex, f is simplexwise linear with rational values on verticesFootnote 6 and the norm \(|\cdot |\) in \({\mathbb {R}}^n\) can be (but is not restricted to) \(\ell _1,\ell _2\) or \(\ell _\infty \) norm.

Previous Results. The algorithm for the computation of well groups was developed only in the particular cases of \(n=1\) [4] or \(\dim K=n\) [8]. In [14] we settled the computational complexity of the well group \(U_0(f,r)\). The complexity is essentially identical to deciding whether the restriction \(f|_A:A\rightarrow S^{n-1}\) can be extended to \(X\rightarrow S^{n-1}\) for \(A=|f|^{-1}(r)\), or equivalently, \(A=f^{-1}(S^{n-1})\). The extendability problem can be decided as long as \(\dim K\le 2n-3\) or \(n=1,2\) or n is even. On the contrary, the extendability of maps into a sphere—as well as triviality of \(U_0(f,r)\)—cannot be decided for \(\dim K\ge 2n-2\) and n odd, see [14].Footnote 7 In this paper we shift our attention to higher well groups.

Higher Well Groups—Extendability Revisited. The main idea of our study of well groups is based on the following. We try to find r-perturbations of f with as small zero set as possible, that is, avoiding zero on \(X'\) for \(X'\subseteq X\) as large as possible. It is shown in [13, Lem. 3.1] that for each strict r-perturbation g of f we can find an extension \(e:X\rightarrow {\mathbb {R}}^n\) of \(f|_A\) with \(g^{-1}(0)=e^{-1}(0)\) and vice versa. Thus equivalently, we try to extend \(f|_A\) to a map \(X'\rightarrow S^{n-1}\) for \(X'\) as large as possible. The higher skeletonFootnote 8 of X we cover, the more well groups we kill.

Observation 1

Let \(f:K\rightarrow {\mathbb {R}}^n\) be a map on a compact space. Assume that the pair of spaces \(A\subseteq X\) defined as \(|f|^{-1}(r)\subseteq |f|^{-1}[0,r]\), respectively, can be triangulated and \(\dim X=m\). If the map \(f|_A\) can be extended to a map \(A\cup X^ {(i-1)} \rightarrow S^{n-1}\) then \(U_j(f,r)\) is trivial for \(j>m-i\).

Assume, in addition, that there is no extension \(A\cup X^{(i)}\rightarrow S^{n-1} \). By the connectivity of the sphere \(S^{n-1}\), we have \(i\ge n\). Does the lack of extendability to \(X^{(i)}\) relate to higher well groups, especially \(U_{m-i}(f,r)\)? The answer is yes when \(i=n\) as we show in our computability results below. On the other hand, when \(i>n\), the lack of extendability is not necessarily reflected by \(U_{m-i}(f,r)\). This leads to the incompleteness results we show in the second part of the paper.

The Primary Obstruction. The lack of extendability of \(f|_A\) to the n-skeleton is measured by the so called primary obstruction that is defined in terms of cohomology theory as follows. We can view f as a map of pairs \((X,A)\rightarrow (B^n, S^{n-1})\) where \(B^n\) is the ball bounded by the sphere \(S^{n-1}:=\{x:|x|= r\}\). Then the primary obstruction \(\phi _f\) is equal to the pullback \( f^*(\xi )\in H^n(X,A)\) of the fundamental cohomology class \(\xi ^n\in H^n(B^n,S^{n-1})\).Footnote 9

Theorem 1

Let \(B\subseteq K\) be compact spaces, \(f: K\rightarrow {\mathbb {R}}^n\) be continuous, \(r>0\), and assume the choice of Čech (co)homology theory. Let \(|f|^{-1}[0,r]\) and \( |f|^{-1}(r)\) be denoted by X and A, respectively, and \(\phi _f\) be the primary obstruction. Then \(\phi _f\frown H_k(X,A\cup B)\) is a subgroupFootnote 10 of \(U_{k-n}(f,r)\) for each \(k\ge n\).

After the proof of Theorem 1 we will show that the groups \(\phi _f\frown H_k(X,A\cup B)\) are not only subgroups of well groups but they also fit into a natural sequence of homomorphisms for varying r. The resulting persistence module is then a submodule of so called well module.

Our assumptions on computer representation allow for simplicial approximation of XA and f. The pullback of \(\xi ^n\in H^n(B^n,S^{n-1})\) and the cap product can be computed by standard formulas. This together with more details worked out in the proof in Sect. 3 gives the following.

Theorem 2

Under the assumption on computer representation of KB and f as above, the subgroup \(\phi _f\frown H_k(X,A\cup B)\) of \(U_{k-n}(f,r)\) (as in Theorem 1) can be computed. The running time is polynomial when the dimension of K is fixed.

The Gap Between \(U_{k-n}\) and \(\phi _f\frown H_k(X,A\cup B)\). There are maps f with \(\phi _f\) trivial but nontrivial \(U_0(f,r)\).Footnote 11 But this can be detected by the above mentioned extendability criterion. We do not present an example where \(U_{k-n}(f,r)\ne \phi _f\frown H_k(X,A\cup B)\) for \(k-n>0\), although the inequality is possible in general. In the rest of the paper we work in the other direction to show that there is no gap in various cases and various dimensions.

An important instance of Theorem 1 is the case when X can be equipped with the structure of a smooth orientable manifold.

Theorem 3

Let \(f:K\rightarrow {\mathbb {R}}^n\) and XA be as above. Assume that X can be equipped with a smooth orientable manifold structure, \(A=\partial X\), \(B=\emptyset \) and \(n+1\le m\le 2n-3\) for \(m=\dim X\). Then

$$\begin{aligned} U_{m-n}(f,r)=\phi _f\frown H_m(X,\partial X). \end{aligned}$$

When \(m=n\), the well group \(U_0(f,r)\) can be strictly larger than \(\phi _f\frown H_n(X,\partial X)\) but it can be computed.

We believe that the same claim holds when X is an orientable PL manifold. It remains open whether the last equation holds also for \(m> 2n-3\). Throughout the proof of Theorem 3, we will show that if \(g: K\rightarrow {\mathbb {R}}^n\) is a smooth r-perturbation of f transverse to 0, then the fundamental class of \(g^{-1}(0)\) is mapped to the Poincaré dual of the primary obstruction. This also holds if \(B\ne \emptyset \) and in all dimensions.

1.2 Well Groups \(U_*(f,r)\) are Incomplete as an Invariant of \(Z_r(f)\)

A simple example illustrating Theorem 3 is the map \(f:S^2\times B^3\rightarrow {\mathbb {R}}^3\) defined by \(f(x,y):=y\) with \(B^3\) considered as the unit ball in \({\mathbb {R}}^3\). It is easy to show that

$$\begin{aligned}&\hbox {for every }1\hbox {-perturbation }g \hbox { of }f\hbox { and every }x\in S^2 \nonumber \\&\hbox {there is a root of }g\hbox { in }\{x\}\times B^3. \end{aligned}$$
(1)

This robust property is nicely captured by (and can be also derived from) the fact \(U_2(f,1) \cong {\mathbb {Z}}\).

The main question of Sect. 4 is what happens, when the primary obstruction \(\phi _f\) is trivial—and thus \(f|_A\) can be extended to \(X^{(n)}\)—but the map \(f|_A\) cannot be extended to whole of X. The zero set of f can still have various robust properties such as (1). It is the case of \(f:S^2\times B^4\rightarrow {\mathbb {R}}^3\) defined by \(f(x,y):=|y|{\eta }(y/|y|)\) where \({\eta }:S^3\rightarrow S^2\) is a homotopically nontrivial map such as the Hopf map. The zero set of each r-perturbation g of f intersects each section \(\{x\}\times B_4\), but unlike in the example before, well groups do not capture this property. All well groups \(U_j(f,r)\) are trivial for \(j>0\) and,Footnote 12 consequently, they cannot distinguish f from another \(f'\) having only a single robust root in X. We will describe the construction of such \(f'\) for a wider range examples.

In the following, \(B^i_q\) will denote the i-dimensional ball of radius q, that is, \(B^i_q=\{y\in {\mathbb {R}}^i:|y|\le q\}\). We also emphasize that this and the following theorem hold for arbitrary coefficient group of the homology theory \(H_*\).

Theorem 4

Let \(i,m, n\in {\mathbb {N}}\) be such that \(m-i<n<i< (m+n+1) /2\) and both \(\pi _{i-1} (S^{n-1})\) and \(\pi _{m-1}(S^{n-1})\) are nontrivial. Then on \(K=S^{m-i}\times B^i_1\) we can define two maps \(f,f':K\rightarrow {\mathbb {R}}^n\) such that for all \(r\in (0,1]\)

  • f, \(f'\) induce the same \(X= S^{m-i}\times B^i_r\) and \(A=\partial X\) and have the same well groups for any coefficient group of the homology theory \(H_*\) defining the well groups,

  • but \(Z_r(f)\ne Z_r(f')\).

In particular, the property

$$\begin{aligned} \hbox {for each } Z\in Z_r(.)\hbox { and } x\in S^{m-i}\ \hbox { there exists } y\in B^i_r\hbox { such that } (x,y)\in Z \end{aligned}$$

is satisfied for f but not for \(f'\). Namely, \(Z_\varepsilon (f')\) contains a singleton for each \(\varepsilon >0\).

In Sect. 4 we discuss that the maps f and \(f'\) are no peculiar examples but rather typical choices given that the underlying space K is the solid torus \(S^{m-i}\times B^i\) and that both \(Z_r(\cdot )\) are nontrivial. Further we indicate that the same result holds for even more realistic choice of the underlying space \(K=B^m\) and \(B=\partial K\). For the sake of exposition, we chose the case where f is large on the boundary of K and we do not need to consider nonempty B.

The Lack of Extendability Not Reflected by \(U_{m-i}(f,r)\). The key property of the example of Theorem 4 is that the maps \(f|_A\) and \(f'|_A\) can be extended to the \((i-1)\)-skeleton \(X^{(i-1)}\) of X, for \(i>n\). The difference between the maps lies in the extendability to \(X^{(i)}\). Unlike in the case when \(i=n\), the lack of extendability is not reflected by the well groups. The crucial part is the triviality of the well groups in dimension \(m-i\) andFootnote 13 this triviality holds in greater generality:

Theorem 5

Let \(f:K\rightarrow {\mathbb {R}}^n\), \(B\subseteq K\), \(X:=|f|^{-1}[0,r]\) and \(A:=|f|^{-1}\{r\}\). Assume that the pair (XA) can be finitely triangulated.Footnote 14 Further assume that \(f|_A\) can be extended to a map \(h: A\cup X^{(i-1)}\rightarrow S^{n-1}\) for some i such that \(m-i<n<i< (m+n)/2\) for \(m:=\dim X\). Then \(U_{m-i}(f,r)=0\) for any coefficient group of the homology theory \(H_*\).

The proof is all delegated to Appendix 3 as its core idea is already contained in the proof of Theorem 4. Note that in the setting of the last Theorem, \(U_j\) is trivial for \(j>m-i\) by Observation 1. One could ask the question of triviality in dimensions smaller than \(m-i\) as well. Our favorite problem is the following one.

Problem 1

Let f be as in Theorem 5 and let \(i=n+1\), that is, the primary obstruction is trivial. Is it true that all well groups \(U_{j}(f,r)\) for \(j\ge (m-n+2)/2\) are trivial?

The bound \(j\ge (m-n+2)/2\) is not known to be necessary (we only know that the statement is not true for \(j=1\)). But passing the bound seems to bring various technical difficulties such as inapplicability of the Freudenthal suspension theorem.

Our Subjective Conclusion on Well Groups of \({\mathbb {R}}^n\)-Valued Maps. We find the problem of the computability of well groups interesting and challenging with connections to homotopy theory (see also Proposition 1 below). Moreover, well groups may be accessible for non-topologists: they are based on the language of homology theory that is relatively intuitive and easy to understand. On the other hand, well groups may not have sufficient descriptive power for various situations (Theorems 4 and 5). Furthermore, despite all the effort, the computability of well groups seems far from being solved. In the following paragraph, we propose an alternative based on homotopy and obstruction theory that addresses these drawbacks.

1.3 Related Work

A Replacement of Well Groups of \({\mathbb {R}}^n\)-Valued Maps. In a companion paper [13], we find a complete invariant for an enriched version of \(Z_r(f)\). The starting point is the surprising claim that \(Z_r(f)\)—an object of a geometric nature—is determined by terms of homotopy theory.

Proposition 1

([13, Thm. A]) Let \(f:K\rightarrow {\mathbb {R}}^n\) be a continuous map on a compact Hausdorff domain, \(r>0\), and let us denote the space \(|f|^{-1}[r,\infty ]\) by \(A_r\). Then the set \(Z_r(f):=\{g^{-1}(0):\Vert g-f\Vert \le r\}\) is determined by the pair \((K,A_r)\) and the homotopy class of \(f|_{A_r}\) in \([A_r,\{x\in {\mathbb {R}}^n:\Vert x\Vert \ge r\}]\cong [A_r,S^{n-1}]\).Footnote 15

Note that since the well groups is a property of \(Z_r(f)\), they are determined by the pair \((K,A_r)\) and the homotopy class \([f|_{A_r}]\). Thus the homotopy class has a greater descriptive power and the examples from the previous section show that this inequality is strict. If K is a simplicial complex, f is simplexwise linear and \(\dim \ A_r\le 2n-4\) then \([A_r,S^{n-1}]\) has a natural structure of an Abelian group denoted by \(\pi ^{n-1}(A_r).\) The restriction \(\dim A_r\le 2n-4\) does not apply when \(n=1,2\) andFootnote 16 otherwise we could replace \([A_r,S^{n-1}]\) with \([A_r^{(2n-4)}, S^{n-1}]\) which contains less information but is computable. The isomorphism type of \(\pi ^{n-1}(A_r)\) together with the distinguished element \([f|_{A_r}]\) can be computed essentially by [6, Thm.  1.1]. Moreover, the inclusions \(A_s\subseteq A_r\) for \(s\ge r\) induce computable homomorphisms between the corresponding pointed Abelian groups. Thus for a given f we obtain a sequence of pointed Abelian groups \(\pi ^{n-1}(A_r)\) for \({r>0}\). On such sequences, there is a natural distance function (called the interleaving distance Footnote 17) and it can be easily shown that the distance between the sequences corresponding to a given functions f and \(f'\) is bounded by \(\Vert f-f'\Vert \). Thus after tensoring the groups by an arbitrary field, we get persistence diagrams (with a distinguished bar) that will be stable with respect to the bottleneck distance and the \(L_\infty \) norm. The construction is detailed in [13].

The computation of the cohomotopy group \(\pi ^{n-1}(A)\) is naturally segmented into a hierarchy of approximations of growing computational complexity. Therefore our proposal allows for a compromise between the running time and the descriptive power of the outcome. The first level of this hierarchy is the primary obstruction \(\phi _f\). One could form similar modules of cohomology groups with a distinguished element as we did with the cohomotopy groups above. However, in this paper we passed to homology via cap product in order to relate it to the established well groups. In the “generic” case when X is a manifold no information is lost as from the Poincaré dual \(\phi _f \frown [X]\) we can reconstruct the primary obstruction \(\phi _f\) back.

The Cap-Image Groups. The groups \(\phi _f\frown H_k(X,A)\) (with \(B=\emptyset \)) has been studied by Amit K. Patel and R. MacPherson under the name cap-image groups. In fact, his setting is slightly more complex with \({\mathbb {R}}^n\) replaced by arbitrary manifold Y. Instead of the zero sets, he considers preimages of all points of Y simultaneously in some sense. Although his ideas have not been published yet, they influenced our research; the application of the cap product in the context of well groups should be attributed to Patel.Footnote 18

The advantage of the primary obstructions and the cap image groups is their computability and well understood mathematical structure. However, the incompleteness results of this paper apply to these invariants as well.

Verification of Zeros. An important topic in the interval computation community is the verification of the (non)existence of zeros of a given function [27]. While the nonexistence can be often verified by interval arithmetic alone, a proof of existence requires additional methods which often include topological considerations. In the case of continuous maps \(f: B^n\rightarrow {\mathbb {R}}^n\), Miranda’s or Borsuk’s theorem can be used for zero verification [2, 16], or the computation of the topological degree [9, 15, 21]. Fulfilled assumptions of these tests not only yield a zero in \(B^n\) but also a “robust” zero and a nontrivial 0th well group \(U_0(f,r)\) for some \(r>0\). Recently, topological degree has been used for simplification of vector fields [29].

The primary obstruction \(\phi _f\) is the analog of the degree for underdetermined systems, that is, when \(\dim K>n\) in our setting. To the best of our knowledge, this tool has not been algorithmically utilized.

2 Topological Preliminaries

In this section we introduce some definitions from algebraic topology that we need throughout the proofs. The details can be found in standard textbooks, such as [18, 30].

Simplicial Complexes and Cell Complexes. A simplicial complex is a collection of simplices such that the intersection of any two of them is again a (possibly empty) simplex in the collection. It can easily be topologized and the underlying space is compact whenever the simplicial complex consists of finitely many simplices. The ith skeleton \(X^{(i)}\) of a simplicial complex X is the subcomplex consisting of all simplices of dimension at most i. A simplicial map \(X\rightarrow Y\) is a function that maps simplices of X to simplices of Y. It again has a simple representation as a continuous map between the underlying topological spaces.

cell complex is an inductive description of a topological space X that consists of skeleta \(X^{(0)}\subseteq X^{(1)}\subseteq \cdots \subseteq X\). The 0-skeleton \(X^{(0)}\) is a discrete set and the n-skeleton \(X^{(n)}\) is defined to be the quotient space \(X^{(n-1)}\sqcup _\alpha B_\alpha ^n/\sim \) where \(\{B_\alpha ^n\}\) is a collection of closed n-balls and the equivalence \(\sim \) identifies points in \(\partial B_\alpha ^n\) with points in \(X^{(n-1)}\) via continuous attaching maps \(\varphi _\alpha : S^{n-1}\rightarrow X^{(n-1)}\). The balls \(B_\alpha ^n\) are called cells and the composition \(B_\alpha ^n\hookrightarrow X^{(n-1)}\sqcup _\alpha B_\alpha ^n\rightarrow X^{(n-1)}\sqcup _\alpha B_\alpha ^n/\sim \) is called the characteristic map of the cell \(B_\alpha ^n\). All cell complexes occurring in this paper consists of finitely many cells in which case this uniquely describes a topology of \(X=\bigcup _i X^{(i)}\).

Basic Operation on Spaces. For pointed topological spaces (Xx) and (Yy), the wedge sum \((X,x)\vee (Y,y)\) is the space \((X\sqcup Y)/\{x,y\}\), that is, x and y are identified to a single point. If the choice of the base points xy is not important, we will simply write \(X\vee Y\). The smash product \(X\wedge Y\) is defined to be the quotient space \((X\times Y)/(X\vee Y)\). For pointed spheres \(S^i\) and \(S^j\), their smash product \(S^i\wedge S^j\) is homeomorphic to the pointed sphere \(S^{i+j}\).

For a space X we define the cone over X to be the space \(CX:=(X\times [0,1])/(X\times \{1\})\) and the suspension \({\varSigma } X\) to be \(CX/(X\times \{0\})\). For spheres, the identity \({\varSigma } S^i\simeq S^{i+1}\) holds. The suspension of \(f: X\!\rightarrow \! Y\) is the map \({\varSigma } f: {\varSigma } X\!\rightarrow \!{\varSigma } Y\) defined by \((x,t)\mapsto [(f(x),t)]\) for \(t\in [0,1]\), which converts \({\varSigma }\) into a functor \(\mathrm {Top}\rightarrow \mathrm {Top}\).

Homotopy Groups of Spheres. For a pointed topological space (Xx), the i th homotopy group of X is a group which underlying space is the set of homotopy classes of maps \((S^i,*)\rightarrow (X,x)\) and the product is defined as follows. We realize the i-sphere as \((S^i,*)=(I^i/\partial I^i, \partial I^i/\partial I^i)\), the quotient of the unit cube \(I^i\), and define \((f g)(s_1,\ldots , s_n)\) to be \(f(2s_1,s_2,\ldots , s_n)\) for \(s_1\in [0,1/2]\) and \(g(2s_1-1,s_2,\ldots , s_n)\) for \(s_1\in [1/2,1]\). This boils down to a group operation on homotopy classes of maps that is commutative whenever \(i>1\). This group is denoted by \(\pi _i(X,x)\). If the choice of base point x is not important, we will use the simpler notation \(\pi _i(X)\).

Throughout this paper, we will use the facts that \(\pi _i(S^i)\simeq {\mathbb {Z}}\), \(\pi _3(S^2)\simeq {\mathbb {Z}}\), and that \(\pi _i(S^j)\) is nontrivial for many \(i>j\) (although not in all cases). The suspension operator induces a natural map \({\varSigma }: \pi _i(X)\rightarrow \pi _{i+1}({\varSigma } X)\). An important ingredient of some proofs in this paper is the Freudenthal suspension theorem which states that the suspension map \(\pi _i(S^n)\rightarrow \pi _{i+1}(S^{n+1})\) is an isomorphism for \(i<2n-1\) and a surjection for \(i=2n-1\).

(Co)Homology. We assume that the reader is familiar with simplicial (co)homology. While we assume the input spaces KXB to be triangulable, a continuous perturbation h of f can be “wild” and have non-triangulable zero set. In its full generality, (co)homology is a (contravariant) functor from the category of topological pairs to the category of Abelian groups which satisfies Eilenberg–Steenrod axioms. These axioms are known as homotopy invariance, exactness, excision, and the dimension axiom, see [12] for exact formulations in the original source. The most common (co)homology theory is the singular (co)homology. We require a (co)homology theory satisfying additional axioms specified in the next section of which the Čech (co)homology is a good example. Čech homology can violate the exactness axiom in case of “wild” spaces and is therefore, strictly speaking, not a homology theory. However, it constitutes a good basis for the definition of well groups.

3 Computing Lower Bounds on Well Groups

Homology Theory Behind the Well Groups. For computing the approximation \(\phi _f\frown H_k(X,A\cup B)\) of well group \(U_{k-n}(f)\) we only have to work with simplicial complexes and simplicial maps for which all homology theories satisfying the Eilenberg–Steenrod axioms are naturally equivalent. Hence, regardless of the homology theory \(H_*\) used, we can do the computations in simplicial homology. Therefore the standard algorithms of computational topology [10] and the formula for the cap product of a simplicial cycle and cocycle [28, Sect.  2.2] will do the job.

The need for a carefully chosen homology theory stems from the courageous claim that the zero set Z of arbitrary continuous perturbation supports \(\phi _f\frown \beta \) for any \(\beta \in H_*(X,A\cup B)\), i.e. some element of \(H_*(Z,B)\) is mapped by the inclusion-induced map to \(\phi _f\frown \beta \). Without more restrictions on the perturbations, the zero sets can be “wild” non-triangulable topological spaces that can fool singular homology and render this claim false and—to the best of our knowledge—make well groups trivial. See an example after the proof of Theorem 1.

For the purpose of the work with the general zero sets, we will require that our homology theory satisfies the Eilenberg–Steenrod axioms with a possible exception of the exactness axiom, and these additional properties:

  1. 1.

    Weak Continuity Property: for an inverse sequence of compact pairs

    $$\begin{aligned} (X_0,B_0)\supset (X_1,B_1)\supset \cdots \end{aligned}$$

    the homomorphism \(H_*\varprojlim (X_i,B_i)\rightarrow \varprojlim H_*(X_i,B_i)\) induced by the family of inclusion \(\varprojlim (X_i,B_i)=\bigcap (X_i,B_i)\hookrightarrow (X_j,B_j)\) is surjective.

  2. 2.

    Strong Excision: Let \(f:(X,X')\rightarrow (Y,Y')\) be a map of compact pairs that maps \(X\setminus X'\) homeomorphically onto \(Y\setminus Y'\). Then \(f_*:H_*(X,X')\rightarrow H_*(Y,Y')\) is an isomorphism.

An intuitive explanation of how are the properties will be used in the proof of Theorem 1 is the following: we work with a sequence of shrinking neighborhoods \(X_0, X_1,\ldots \) of the zero sets of our a given perturbation g of f. In these neighborhood we can identify the “look-for homology classes” with the help of the excision (but in the case \(\Vert g-f\Vert =r\) we have to use the strong excision above). Finally, by using the weak continuity property we can identify the looked-for homology class in the infinite intersection \(\bigcap _iX_i\)—the zero set \(g^{-1}(0)\)—as well.

Čech homology theory satisfies these properties as well as the Eilenberg–Steenrod axioms with the exception of the exactness axiom, and coincides with simplicial homology for triangulable spaces [31, Chap. 6].

In addition, we need a cohomology theory \(H^*\) that satisfies the Eilenberg–Steenrod axioms and is paired with \(H_*\) via a cap product \(H^n(X,A)\otimes H_k(X,A\cup B)\mathop {\longrightarrow }\limits ^{\frown } H_{k-n}(X,B)\) that is naturalFootnote 19 and coincides with the simplicial cap product when applied to simplicial complexes. We have not found any reference for the definition of cap product in Čech (co)homology, so we present our own construction in Appendix 4. However, if (XA) is a triangulable pair, then we may as well use simplicial cap product and identify \(\phi _f\frown H_*(X,A\cup B)\) with the corresponding subgroup of our homology theory. After slight changes in the proof of Theorem 1, all cap products could be only applied to triangulable spaces. Thus Theorem 1 would still hold under the assumption that the pair (XA) can be triangulated, that is, the expression \(\phi _f\frown H_k(X,A\cup B)\) makes sense there. At least for computability results, this is no severe restriction. With this in mind, we might as well use the Steenrod homology theory of compact metrizable spaces [24] with cap product defined simplicially on triangulable spaces. The advantage of Steenrod homology is that it satisfies the exactness axiom. We also believe that it is possible to pair it with a suitable cohomology theory by a cap product but we do not know how.

Proof of Theorem 1

We will not explicitly deal with the definition of Čech (co)homology and will only use the facts that it satisfies the weak continuity property, strong excision, axiom of homotopy invariance, and naturality of the cap product.

We need to show that for any map g with \(\Vert g-f\Vert \le r\), the image of the inclusion-induced map

$$\begin{aligned} H_*(g^{-1}(0), B)\rightarrow H_*(X,B) \end{aligned}$$

contains the cap product of the primary obstruction \(\phi _f:=f^*(\xi )\) with all relative homology classes of \((X, A\cup B)\). Let us first restrict to the less technical case of g being a strict r-perturbation, that is, \(\Vert g-f\Vert <r\).

Fig. 2
figure 2

Example of spaces defined in the proof of Theorem 1

Let us denote \(X_0:=X=|f|^{-1}[0,r]\) and \(A_0:=A=|f|^{-1}(r)\). Next we choose a decreasing positive sequence \(\varepsilon _1>\varepsilon _2>\ldots \) with \(\lim _{i\rightarrow \infty } \varepsilon _i=0\) and with \(\varepsilon _1<r-\Vert f-g\Vert .\) Then we for each \(i>0\) we define

  • \(X_i:= |g |^{-1}[0, \varepsilon _i]\),

  • \(A_{i}:=X_{i}\setminus X_{i+1}\),

  • \(A'_{i-1}:=X_{i-1}\setminus X_{i+1}\), and,

  • \(B_{i-1}:=B\cap X_{i-1}\).

See Fig. 2 for an illustration of the spaces defined above. Note that \(\bigcap _i X_i=g^{-1}(0)\), and consequently, \(\bigcap _i B_i=g^{-1}(0)\cap B\). For any given \(\beta \in H_k(X,A\cup B)\), our strategy is to find homology classes \(\alpha _i\in H_{k-n}(X_i,B_i),\) with \(\alpha _0=\phi _f\frown \beta \), that fit into the sequence of maps \(H_{k-n}(X_0,B_0) \leftarrow H_{k-n}(X_1,B_1)\leftarrow \ldots \) induced by inclusions. This gives an element in \(\varprojlim H_{k-n}(X_i,B_i)\), and consequently, by the weak continuity property (requirement 1 above), we get the desired element \(\alpha \in H_{k-n}(g^{-1}(0),B)\).

The elements \(\alpha _i\) will be constructed as cap products. To that end, we need to obtain “analogs” of \(\beta \) and for that we will need a more complicated sequence of maps. It is the zig–zag sequence

$$\begin{aligned} X_0\mathop {\rightarrow }\limits ^{{{\mathrm{id}}}}X_0\mathop {\hookleftarrow }\limits ^{{{\mathrm{incl}}}}X_1 \mathop {\rightarrow }\limits ^{{{\mathrm{id}}}} X_1 \mathop {\hookleftarrow }\limits ^{{{\mathrm{incl}}}} X_2 \mathop {\rightarrow }\limits ^{{{\mathrm{id}}}}\cdots \end{aligned}$$
(2)

that restricts to the zig–zags

$$\begin{aligned} A_0\mathop {\hookrightarrow }\limits ^{{{\mathrm{incl}}}}A'_0\mathop { \hookleftarrow }\limits ^{{{\mathrm{incl}}}}A_1 \mathop {\hookrightarrow }\limits ^{{{\mathrm{incl}}}} A'_1\mathop {\hookleftarrow }\limits ^{{{\mathrm{incl}}}} A_2 \mathop {\hookrightarrow }\limits ^{{{\mathrm{incl}}}}\cdots \end{aligned}$$
(3)

and

$$\begin{aligned} A_0\cup B_0\mathop {\hookrightarrow }\limits ^{{{\mathrm{incl}}}}A'_0\cup B_0\mathop {\hookleftarrow }\limits ^{{{\mathrm{incl}}}}A_1\cup B_1 \mathop {\hookrightarrow }\limits ^{{{\mathrm{incl}}}} A'_1\cup B_1\mathop {\hookleftarrow }\limits ^{{{\mathrm{incl}}}} A_2\cup B_2 \mathop {\hookrightarrow }\limits ^{{{\mathrm{incl}}}}\cdots \end{aligned}$$
(4)

The pair \((X_{i+1},A_{i+1}\cup B_{i+1})\) is obtained from \((X_i,A'_i\cup B_{i})\) by excision of \(|g|^{-1}(\varepsilon _{i+1},\varepsilon _i]\), that is, \(X_{i+1}=X_i\setminus |g|^{-1}(\varepsilon _{i+1},\varepsilon _i]\) and \(A_{i+1}\cup B_{i+1}=(A'_i\cup B_i)\setminus |g|^{-1}(\varepsilon _{i+1},\varepsilon _i]\). Hence by excision,Footnote 20 each inclusion of the pairs \((X_i,A'_i\cup B_i)\hookrightarrow (X_{i+1},A_{i+1}\cup B_{i+1})\) induces isomorphism on relative homology groups. Therefore the zig–zag sequences (2) and (4) induce a sequence

that can be made pointed by choosing the distinguished homology classes \(\beta _i\in H_k(X_i,A_i\cup B_i)\) and \(\beta '_i\in H_k(X_i,A'_i\cup B_i)\) that are the images of \(\beta _0:=\beta \in H_k(X_,A\cup B)\) in this sequence.

Similarly, we want to construct a pointed zig–zag sequence in cohomology induced by (2) and (3). The distinguished elements \(\phi _i\in H^n(X_i,A_i)\) and \(\phi '_i\in H^n(X_i,A'_i)\) are defined as the pullbacks of the fundamental cohomology class \(\xi \in H^n({\mathbb {R}}^n,{\mathbb {R}}^n\setminus \{0\})\) by the restrictions of g. Because of the functoriality of cohomology, \(\phi _i\) and \(\phi _i'\) fit into the sequence induced by (2) and (3):

Since g is an r-perturbation of f and thus \(g|_{(X,A)}\) is homotopic to \(f|_{(X,A)}\) via the straight line homotopy, we have that \(\phi _0=\phi _f\in H^n(X,A)\).

From the naturality of the cap product we get that the elements \(\phi _i\frown \beta _i\) and \(\phi _i'\frown \beta '_i\) fit into the sequence

that is induced by (2), that is, each \(H_{k-n} (X_i,B_i) \mathop {\cong }\limits ^{{{\mathrm{id}}}} H_{k-n}(X_i,B_i)\) is induced by the identity \(X_i\mathop {\rightarrow }\limits ^{\cong } X_i\) and each map \( H_{k-n}(X_i,B_i) \leftarrow H_{k-n}(X_{i+1}, B_{i+1})\) is induced by the inclusion \(X_i\hookleftarrow X_{i+1}\). Hence \(\alpha _i:=\phi _i\frown \beta _i\) are the desired elements and thus there is an element \({{\tilde{\alpha }}}:=(\alpha _0,\alpha _1,\ldots )\) in \(\varprojlim H_{k-n}(X_i,B_i)\).

We recall that the weak continuity property of the homology theory \(H_*\) assures the surjectivity of the the map

$$\begin{aligned} (\iota _i)_{i\ge 0}:H_{k-n}\big (\bigcap X_i,B\big )\rightarrow \varprojlim H_{k-n}(X_i,B), \end{aligned}$$
(5)

where each component \(\iota _i\) is induced by the inclusion \(\bigcap _i X_i\hookrightarrow X_i\). Let \(\alpha \in H_{k-n}(g^{-1}(0), B)\) be arbitrary preimage of \({{\tilde{\alpha }}}\) under the surjection (5). By construction, \(\alpha \) is mapped to \(\alpha _0=\phi _f\frown \beta \) by the map \(\iota _0\).

It remains to prove the theorem in the case when \(\Vert g-f\Vert =r\). The proof goes along the same lines with only the following differences:

  • For arbitrary decreasing sequence \(1=\varepsilon _0>\varepsilon _1>\varepsilon _2> \cdots \) with \(\lim \varepsilon _i=0\) we define \(h_i:=\varepsilon _i f+ (1-\varepsilon _i)g\) for \(i\ge 0\). We will furthermore need that \(2\varepsilon _{i+1}>\varepsilon _i\) for every \(i\ge 0\). Let

    We have \(A_i\subseteq A'_i\) because by definition \(\Vert h_i-h_{i+1}\Vert \le (\varepsilon _i -\varepsilon _{i+1})r\) and thus \(|h_i(x)|= \varepsilon _i r\) implies \(|h_{i+1}(x)|\ge \varepsilon _{i+1} r\). Similarly \(A_{i+1}\subseteq A'_i\) and \(X_{i+1}\subseteq X_i\). Therefore as before, the zig–zag sequence (2) restricts to (3) and (4).

  • The homology classes \(\beta _i\) and \(\beta '_i\) are defined as above. We only need to use the strong excision for the inclusion \((X_i,A'_i\cup B_i)\hookleftarrow (X_{i+1},A_{i+1}\cup B_{i+1})\).

  • We define the cohomology classes \(\phi _i:=h_i^*(\xi )\) and \(\phi _i':= h_{i+1}^*(\xi )\). We only need to check that \(h_i\) is homotopic to \(h_{i+1}\) as a map of pairs \((X_i,A'_i)\rightarrow ({\mathbb {R}}^n,{\mathbb {R}}^n\setminus \{0\})\). Indeed, they are homotopic via the straight-line homotopy since \(|h_{i+1}(x)|\ge \varepsilon _{i+1}r\) implies \(|h_i(x)|\ge \varepsilon _ {i+1}r- (\varepsilon _i-\varepsilon _{i+1})r=(2\varepsilon _{i+1}-\varepsilon _i)r >0\). We used the inequality \(2\varepsilon _{i+1}>\varepsilon _i\) which was our requirement on the sequence \((\varepsilon _i)_{i>0}\). We also have \(\phi _0=\phi _f\) as \(h_0=f\) and \((X_0,A_0)=(X,A)\).

  • We continue by defining cap products \(\alpha _i\), their limit \({{\tilde{\alpha }}}\) and its preimage \(\alpha \) under the surjection \(H_{k-n}(\bigcap _i X_i,B)\rightarrow \varprojlim _i H_{k-n}(X_i,B)\). To finish the proof we claim that \(\bigcap _i X_i=g^{-1}(0)\). Indeed, \(g(x)=0\) implies \(h_i(x)\le \Vert h_i-g\Vert =\varepsilon _i r\) for each i and \(g(x)>0\) implies \(h_i(x)>0\) for i such that \(2\varepsilon _i r<|g(x)|\).

\(\square \)

Importance of the Choice of Homology Theory. The surjectivity of (5) and the strong excision is not only a crucial step for Theorem 1 but implicitly also for the results stated in [4, p. 16]. If we defined well groups by means of singular homology, then even in a basic example \(f(x,y)=x^2+y^2-2\) and \(r=1\), the first well group \(U_1(f,r)\) would be trivial. The zero set of any 1-perturbation g is contained in the annulus \(X:=\{(x,y):\,\,1 \le x^2+y^2\le 3\}\) and the two components of \(\partial X\) are not in the same connected components of \(\{x\in X:\,g(x)\ne 0\}\). However, we could construct a “wild” 1-perturbation g of f such that \(g^{-1}(0)\) is a Warsaw circle [23] which is, roughly speaking, a circle with infinite length, trivial first singular homology, but nontrivial Čech homology. Thus Čech homology serves as a better theoretical basis for the well groups. Another solution to avoid problems with wild zero sets would be to restrict ourselves to “nice” perturbations, for example piecewise linear or smooth and transverse to 0. Such approach would lead, to the best of our knowledge, to identical results.

Proof of Theorem 2

Assume that the dimension of K is fixed. Under the assumption on computer representation of K and f, the pair (XA) is homeomorphic to a polynomial-time computable simplicial pair \((X',A')\) such that \(X'\) is a subcomplex of a subdivision \(K'\) of K [14, Lem. 3.4]. Therefore, the induced triangulation \(B'\) of \(B\cap X'\) is a subcomplex of \(X'\). Furthermore, a simplicial approximation \(f' :A'\rightarrow S'\) of \(f|_A:A\rightarrow S^{n-1}\) can be computed in polynomial time. The computation is implicit in the proof of Theorem 1.2 in [14] where the sphere \(S^{n-1}\) is approximated by the boundary \(S'\) of the n-dimensional cross polytope \(B'\). The simplicial approximation \((X',A')\rightarrow (B',S')\) of \(f|_X\) can be constructed consequently by sending each vertex of \(X'\setminus A'\) to an arbitrary point in the interior of the cross polytope, say \(0\in {\mathbb {R}}^n\). The pullback of a cohomology class can be computed by the definition of the induced map in simplicial cohomology. Namely, if a generator \(\xi \) of \(H^n(B',S')\) is represented by a cocycle that assigns 1 to a distinguished n-simplex \(\sigma ^n\in B'\) and 0 to any other simplex, then \(f^*(\xi )\) is represented by a cocycle that assigns to a simplex \(\tau ^n\in X'\) the number \(\pm 1\) iff \(f'(\tau ^n)=\pm \sigma ^n\) and 0 otherwise.Footnote 21 Therefore \(\phi _f\) and \(H_*(X,B)\) can be computed and the explicit formula for the cap product in [28, Sect. 2.1] yields the computation of \(\phi _f\frown H_*(X,B)\). \(\square \)

Modules and Diagrams Associated with \(\phi \frown H_*(X,A\cup B)\). If the parameter r varies, well groups U(fr) naturally fit into a zig–zag sequence of homomorphisms called well module that can be converted into a well diagram, a multiset of real numbers indicating the death of homology classes of \(X_r\) supported by all \(Z\in Z_r(f)\) as r increases [11]. In this section, we show that the subgroups \(V:=\phi \frown H_*(X,A\cup B)\) are not only subgroups of well groups for fixed r but they naturally form a persistence module which is a sub-module of the well module in some sense. It can further be converted to a sub-diagram of the well diagram. Unlike for well groups, the persistence module \(\{V_{r}\rightarrow V_s\}_{0<s<r}\) is computable. It contains incomplete but often nontrivial information about homology classes of zero sets and their robustness.

Let \(r_1>r_2>0\) and let \(X_1\), \(X_2\), \(A_1\), \(A_2\) be \(|f|^{-1}[0,r_1]\), \(|f|^{-1}[0,r_2]\), \(|f|^{-1}\{r_1\}\), \(|f|^{-1}\{r_2\}\) respectively, \(\phi _1\), \(\phi _2\) be the respective obstructions. Further, let \(A_1':=|f|^{-1}[r_2,r_1]\) and \(\phi _1'=f^*(\xi )\in H^n(X_1, A_1')\) be the pullback of the fundamental class \(\xi \in H^n({\mathbb {R}}^n, {\mathbb {R}}^n\setminus \{0\})\). The inclusions \((X_1, A_1)\subseteq (X_1, A_1')\supseteq (X_2, A_2)\) induce cohomology maps that take \(\phi _1'\) to \(\phi _1\) resp. \(\phi _2\). Let us denote, for simplicity, by \(V_1\) the group \(\phi _1\frown H_*(X_1, A_1\cup B)\), \(V_2:=\phi _2\frown H_*(X_2, A_2\cup B)\) and \(V_1':=\phi _1'\frown H_*(X_1, A_1'\cup B)\). Further, let \(U_1\) resp. \(U_2\) be the well groups \(U(f,r_1)\) resp. \(U(f, r_2)\).

In this section, we analyze the relation between \(V_1\) and \(V_2\). First let \(i_1\) be a map from \(V_1\) to \(V_1'\) that maps \(\phi _1\frown \beta _1\) to \(\phi _1'\frown i_*(\beta _1)\). By the naturality of cap product, \(\phi _1\frown \beta _1=\phi _1'\frown i_*(\beta _1)\), so \(i_1\) is an inclusion. By excision, there is an inclusion-induced isomorphisms \(i_1': H_*(X_2, A_2\cup B)\mathop {\rightarrow }\limits ^{\sim } H_*(X_1, A_1'\cup B)\) and its inverse induces an isomorphism \(i_2: V_1' \mathop {\rightarrow }\limits ^{\sim } V_2\) by mapping \(\phi _1'\frown \beta _1'\) to \(\phi _2\frown (i_1')^{-1}(\beta _1')\). The composition \(i_2\circ i_1=:\iota _{12}\) is a homomorphism from \(V_1\) to \(V_2\). Being the composition of an inclusion and an isomorphism, \(\iota _{12}\) is an injection and one easily verifies that the inclusion-induced map \(i_{21}: H_*(X_2, B){\rightarrow } H_*(X_1, B)\) satisfies \(i_{21}\circ \iota _{12}=\mathrm {id}|_{V_1}\). It follows that \(\{V(r_i), \iota _{i,i+1}\}_{r_i>r_{i+1}}\) is a persistence module consisting of shrinking abelian groups and injections \(V_{i}\rightarrow V_{i+1}\) for \(r_i>r_{i+1}\). The relation between \(\iota \) and well diagrams described in [11] is reflected by the commutative diagram above.

The rank of U(r) resp. V(r) can only decrease with increasing r. In [11], authors encode the properties of well groups to a well diagram that consists of pairs \(\{(r_j, \mu _j)\}\) where \(r_j\) is a number in which the rank of U decreases by \(\mu _j\in {\mathbb {N}}\). Using computable information about \(\{V(r)\}\), we may define a diagram consisting of pairs \((r_j', \mu _j')\) where the rank of V(r) decreases in \(r_j'\) by \(\mu _j'\). This is a subdiagram of the well diagram in the following sense: each \(r_k'\) is then contained in \(\{r_j\}_j\) and \(\mu _k'\le \mu _k\).

The Idea Behind the Proof of Theorem 3. In the special case when X is a smooth m-manifold with \(A=\partial X\), the zero set of any smooth r-perturbation g transverse to 0 is an \((m-n)\)-dimensional smooth submanifold of X. It is not so difficult to show that its fundamental class \([g^{-1}(0)]\) is mapped by the inclusion-induced map to \(\phi _f\frown [X]\), where \([X]\in H_m(X,\partial X)\) is the fundamental class of X. If \(g^{-1}(0)\) is connected, then \(H_{m-n}(g^{-1}(0))\) is generated by its fundamental class and we immediately obtain the reverse inclusion \(\phi _f\frown H_m (X,A)\supseteq U_{m-n}(f,r)\). The nontrivial part in the proof of Theorem 3 is to show that in the indicated dimension range, we can find a perturbation g so that \(g^{-1}(0)\) is connected. The full proof is in Appendix 2.

4 Incompleteness of Well Groups

In this section, we study the case when the primary obstruction \(\phi _f\) is trivial and thus the map \(f|_A\) can be extended to a map \(f^{(n)}:X^{(n)}\rightarrow S^{n-1}\) on the n-skeleton \(X^{(n)}\) of X. Observation 1 (proved in Appendix 3) implies that the only possibly nontrivial well groups are \(U_j(f,r)\) for \(j\le m-n-1\).

The following lemma summarizes the necessary tools for the constructions of this section. They directly follow from [13, Lem.  3.1] and from [14, Lem. 3.3].

Lemma 1

Let \(f:K\rightarrow {\mathbb {R}}^n\) be a map on a compact Hausdorff space, \(r>0\), and let us denote the pair of spaces \(|f|^{-1}[0,r]\) and \(|f|^{-1}\{r\}\) by X and A, respectively. Then

  1. 1.

    for each extension \(e:X\rightarrow {\mathbb {R}}^n\) of \(f|_A\) we can find a strict r-perturbation g of f with \(g^{-1}(0)= e^{-1}(0)\);

  2. 2.

    for each r-perturbation g of f without a root there is an extension \(e:X\rightarrow {\mathbb {R}}^n\setminus \{0\}\) of \(f|_A\) (without a root).

In the following we want to show that well groups can fail to distinguish between maps with intrinsically different families of zero sets. Namely, in the following examples we present maps f and \(f'\) with \(U_0(f,r)=U_0(f',r)={\mathbb {Z}}\) for each \(r\le 1\) and \(U_i(f,r)=U_i(f,r)=0\) for each \(r\le 1\) and \(i>0\). However, \(Z_r(f)\) will be significantly different from \(Z_r(f')\).

Proof of Theorem 4

We have that \(B=\emptyset \) and \(K=S^j\times B^i\), where \(B^i\) is represented by the unit ball in \({\mathbb {R}}^i\) and \(j=m-i\). Let the maps \(f,f': K\rightarrow {\mathbb {R}}^n\) be defined by

$$\begin{aligned} f(x,y):=|y| \,\varphi (x,y/|y|) \quad \hbox { and }\quad f'(x,y):=|y|\varphi ' (x,y/|y|), \end{aligned}$$

where \(\varphi ,\varphi ':S^j\times S^{i-1}\rightarrow S^{n-1}\subseteq {\mathbb {R}}^n\) are defined by

  • \(\varphi (x,y):=\mu (y)\) where \(\mu : S^{i-1}\rightarrow S^{n-1}\) is an arbitrary nontrivial map.

  • \(\varphi '\) is defined as the composition \(S^j\times S^{i-1}\rightarrow S^{m-1}\mathop {\rightarrow }\limits ^{\nu } S^{n-1}\) where the first map is the quotient map \(S^j\times S^{i-1}\rightarrow S^j\wedge S^{i-1}\cong S^{m-1}\) and \(\nu \) is an arbitrary nontrivial map. In other words, we require that the composition \(\varphi '{\varPhi }\)—where \({\varPhi }\) denotes the characteristic map of the \((m-1)\)-cell of \(S^j\times S^{i-1}\)—is equal to the composition \(\nu q\), where q is the quotient map \(B^{m-1}\rightarrow B^{m-1}/(\partial B^{m-1})\cong S^{m-1}\).

Well Groups Computation. Next we prove that the well groups of \(U_*(f,r)\) and \(U_*(f',r)\) are the same for \(r\in (0,1]\), namely, nonzero only in dimension 0, where they are isomorphic to \({\mathbb {Z}}\). We obviously have \(X=S^j\times \{y\in {\mathbb {R}}^i:|y|\le r\}\simeq S^j\times B^i\) and \(A=\partial X\) for both maps. The restriction \(f|_A\) and \(f'|_A\) are equal to \(\varphi \) and \(\varphi '\) (after normalization). We first prove that \(U_0(f,1)\cong U_0(f',1)\cong {\mathbb {Z}}\). This fact follows from \(H_0(X)\cong {\mathbb {Z}}\), from non-extendability of \(\varphi \) and \(\varphi '\) and from Lemma 1 part 2 (or [14, Lem. 3.3]).

Lemma 2

The map \(\varphi '\) cannot be extended to a map \(X\rightarrow S^{n-1}\).

We postpone the proof to Appendix 1. Since the map \(\mu :S^{i-1}\rightarrow S^{n-1}\) cannot be extended to \(B^i\supset S^{i-1}\), also \(\varphi \) cannot be extended to X.

Since then only the jth homology group of X is nontrivial, the remaining task is to show that \(U_j(f,1)\cong U_j(f',1) \cong 0\). We do so by presenting two r-perturbations g and \(g'\) of f and \(f'\), respectively:

  • \(g(x,y):=f(x,y)-rx=|y|\mu (y/|y|)-rx\) where we consider \(S^j\subseteq {\mathbb {R}}^{j+1}\) as a subset of \({\mathbb {R}}^n\) naturally embedded in the first \(j+1\) coordinates (here we need that \(j=m-i<n\)).

  • We first construct an extension \(e':X\rightarrow {\mathbb {R}}^n\) of \(\varphi ' =f'|_A\) and then the r-perturbation \(g'\) is obtained by Lemma 1 part 1. The extension \(e'\) is defined as constant on the single i-cell of X, that is, \(e'(x_0,y)\) is put equal to the basepoint of \(S^{n-1}\subseteq {\mathbb {R}}^n\). On the remaining m-cell \(B^m\cong \{z\in {\mathbb {R}}^m:|z|\le 1\}\) of X we define \(e'(z):=|z|e'(z/|z|)\), where each point z is identified with a point of X via the characteristic map \({\varPsi }_1:B^m\rightarrow X\) of the m-cell \(B^m\).Footnote 22

By definition the only root of \(g'\) is the single point \({\varPsi }_1(0)\) of the interior of X. Therefore \(U_j(f,1)\cong 0\). Note that the role of \({\varPsi }_1(0)\) could be played by an arbitrary point in the interior of X.Footnote 23

The zero set \(g^{-1}(0)=\{(x,y):\,|y|=r\) and \(\mu (y/|y|)=x\}\) is by definition homeomorphic to the pullback (i.e., a limit) of the diagram

(6)

where \(\iota \) is the equatorial embedding, i.e., sends each element x to \((x,0,0,\ldots )\). In plain words, the zero set is the \(\mu \)-preimage of the equatorial j-subsphere of \(S^{n-1}\). We will prove that under our assumptions on dimensions, this is the \((m-n)\)-sphere \(S^{m-n}\). Then from \(m-n>m-i=j\) it will follow that \(H_j(g^{-1}(0))\cong 0\) which proves Theorem 4.

The topology of the pullback is particularly easy to see in the case when \(j=n-1\) and \(\iota \) is the identity. There it is simply the domain of \(\mu \), that is, \(S^{i-1}\) where \(i-1=m-j-1=m-n\).

In the general case, the only additional tool we use to identify the pullback is the Freudenthal suspension theorem. The pullback is homeomorphic to the \(\mu \)-preimage of the equatorial subsphere \(S^{m-i}\subseteq S^{n-1}\). By Freudenthal suspension theorem \(\mu \) is homotopic to an iterated suspension \({\varSigma }^a\eta \) for some \(\eta :S^{i-1-a}\rightarrow S^{n-1-a}\) assuming \(i-1-a\le 2(n-1-a)-1\). We want to choose a so that \(n-1-a=m-i\) and thus images \(\mathrm{Im}(\eta )=S^{n-1-a}\) and \(\mathrm{Im}(\iota )=S^j\subseteq S^{n-1}\) coincide (since \(j=m-i\) by definition). The last inequality with the choice \(a=n-1-m+i\) is equivalent to the bound \(i\le (m+n-1)/2\) from the hypotheses of the theorem. In our example, we may have chosen f in such a way that \(\mu ={\varSigma }^a\eta \). But even for the choices of \(\mu \) only homotopic to \({\varSigma }^a\eta \) we could have changed f on a neighborhood of \(\partial K\) by a suitable homotopy. To finish the proof we use the fact that, by the definition of suspension, the \(\mu \)-preimage of \(S^{m-i}\subseteq S^{n-1}\) is identical to the \(\eta \)-preimage of \(S^{m-i}\), that is \(S^{i-1-j}=S^{m-n}\).

Difference Between \(Z_r(f)\) and \(Z_r(f')\). Because the map \(\mu \) is homotopically nontrivial, the zero set of each extension \(e:X\rightarrow {\mathbb {R}}^n \) of \(f|_A\) intersects each “section” \(\{x\}\times B^i\) of X. By Lemma 1 part 2 (or [14, Lem. 3.3]) applied to each restriction \(f|_{\{x\}\times B^i}\), the same holds for r-perturbations g of f as well. In other words, the formula “for each \(x\in S^j\) there is \(y\in B^i\) such that \(f(x,y)=0\)” is satisfied robustly, that is

$$\begin{aligned} \forall Z\in Z_r(f):\forall x\in S^j: \exists y\in B^i: (x,y) \in Z \end{aligned}$$

is satisfied. The above formula is obviously not true for \(f'\) as can be seen on the r-perturbations \(g'\). In particular, for every \(r\in (0,1]\) the family \(Z_r(f')\) contains a singleton. This completes the proof of Theorem 5. \(\square \)

Robust Optimization. As an example of another relevant property of \(Z_r(f)\) not captured by the well groups, we mention the following. For any given \(u:K\rightarrow {\mathbb {R}}\), we may want to know what is the r-robust maximum of u over the zero set of f, i.e., \(\inf _{Z\in Z_r(f)}\max _{z\in Z} u(z)\). Let, for instance, \(u(x,y)=u(x)\) depend on the first coordinate only. Then the r-robust maximum for f is equal to \(\max _{x\in S^j} u(x)\) as follows from the discussion in the previous paragraph. On the other hand, the r-robust maximum for \(f'\) is equal to \(\min _x u(x)\) and is attained in \(g'\) when we set the value \({\varPsi }_1(0):=(\mathrm {arg}\,\mathrm{min}_{x\in S^j}u(x),0)\) from the proof above. This holds for r arbitrarily small. The robust optima constitutes another and, in our opinion, practically relevant quantity whose approximation cannot be derived from well groups.

Further Remarks on Theorem 4. We first want to indicate that in some sense the maps f and \(f'\) are no peculiar examples but rather typical choices. More precisely, we assume that \(r>0\) is fixed and that \(X=S^j\times B^i\) and \(A=\partial X\). (Note that in the natural cell structure of X there is only one i-dimensional and one \((i+j)\)-dimensional cell outside of A.) It can be easily proved that under these assumptions the maps f and \(f'\) can be chosen arbitrarily in such a way that

  • \(f|_A\) cannot be extended to \(X^{(i)}\) (it extends to \( X^{(i-1)}\) trivially as \(A=X^{(i-1)}\)) and

  • \(f'|_A\) extends to \(X^{(i)}\) but not to X.Footnote 24

The only addition needed to prove this more general version is in the computation of \(U_{m-i}(f,r)\). For that we can either use Theorem 5 when \(i< (m+n)/2\) or enhance the proof of Theorem 4 when \(i=(m+n)/2\) which we omit here. Note that the nonextendability properties of f and \(f'\) require nontriviality of the homotopy groups of spheres as in the hypothesis of Theorem 4. Then only for the requirement \(i>n\) we know that is strict. The other two inequalities are used to find the map \(\iota \) such that the pullback (6) is connected enough. The inequality \(i<(m+n+1)/2\) can be relaxed to requiring the existence of \([\mu ]\in \pi _{i-1}(S^{n-1})\) such that \([\mu ]={\varSigma }^a \eta \) for a sufficiently large as stated in the proof.

Finally, we remark that the same incompleteness results could be achieved for even more realistic domain \(K=B^j\times B^i\cong B^m\). We only need to choose f and \(f'\) with \(X=B^j\times B^i_r\) and \(A=B^j\times (\partial B^i_r)\) and with the same properties as above. Then for the natural choice \(B=\partial K\) and under the same hypotheses, both well groups will be equal.

Sketch of the Proof of Lemma 2. The ultimate claim is that \(\varphi '\) cannot be extended to the m-cell of X no matter how the extension on the i-cell was chosen. To this end, we need two properties of the obstruction to extendability on the m-cell (which is an element of \(\pi _{m-1} (S^{n-1})\)):

  1. 1.

    First, that the obstruction is independent of the choice of the extension on the i-cell. This essentially follows from the bilinearity of the Whitehead product \(\pi _{i}(S^{n-1})\otimes \pi _{m-i}(S^{n-1})\rightarrow \pi _{m-1} (S^{n-1})\), namely, that the Whitehead product of a trivial element with an arbitrary element is again a trivial element.

  2. 2.

    Second, that the obstruction depends linearly on the choice of the element \([\nu ]\in \pi _{m-1}(S^{n-1})\) in the definition of the map \(\varphi '\). This amounts to the basic obstruction theory and the cell structure of the solid torus.

The full proof is presented in Appendix 1.