In this section, we review the results of de Silva et al. (2016) together with Munch and Wang (2016), showing that the interleaving distance between the mapper of the constructible \(\mathbb {R}\)-space \(({\mathbb {X}},f)\) relative to the open cover \({\mathcal {U}}\) of \(\mathbb {R}\) and the Reeb graph of \(({\mathbb {X}},f)\) is bounded by the resolution of the open cover. Motivated by the categorification of Reeb graphs in de Silva et al. (2016), we introduce a categorified mapper algorithm, and restate the main results of Munch and Wang (2016) in this framework.
Categorification, in this context, means that we are interested in using the theory of constructible cosheaves to study Reeb graphs and mapper graphs. We can accomplish this by defining a cosheaf (the Reeb cosheaf) whose display locale is isomorphic to a given Reeb graph. One goal (completed in de Silva et al. 2016) of this approach is to use cosheaf theory to define an extended metric on the category of Reeb graphs. A natural candidate from the perspective of cosheaf theory is the interleaving distance. Suppose we want to use the interleaving distance of cosheaves to determine if two Reeb graphs are homeomorphic. We can first think of each Reeb graph as the display locale of a cosheaf, \({\mathscr {F}}\) and \({\mathscr {G}}\), respectively. This allows us to rephrase our problem as that of determining if the cosheaves, \({\mathscr {F}}\) and \( {\mathscr {G}}\), are isomorphic. In general, interleaving distances cannot answer this question, since the interleaving distance is an extended pseudo-metric on the category of all cosheaves. In other words, having interleaving distance equal to 0 is not enough to guarantee that \({\mathscr {F}}\) and \({\mathscr {G}}\) are isomorphic as cosheaves. This seems to suggest that the interleaving distance is insufficient for the study of Reeb graphs. However (due to results of de Silva et al. 2016), if we restrict our study to the category of constructible cosheaves (over \(\mathbb {R}\)), we can avoid this subtlety. The interleaving distance is in fact an extended metric on the category of constructible cosheaves. If two constructible cosheaves have interleaving distance equal to 0, then they are isomorphic as cosheaves. Therefore, the display locales of constructible cosheaves (over \(\mathbb {R}\)) are homeomorphic if the interleaving distance between the cosheaves is equal to 0. In other words, if we want to know if two Reeb graphs are homeomorphic, it is sufficient to consider the interleaving distance between constructible cosheaves \({\mathscr {F}}\) and \( {\mathscr {G}}\), provided that the display locales of the constructible cosheaves recover the Reeb graphs. Therefore, in the remainder of this section, we define a mapper cosheaf, and show that the Reeb cosheaf of a constructible \(\mathbb {R}\)-space is a constructible cosheaf, and that the mapper cosheaves are constructible. This allows us to use the commutativity of diagrams and the interleaving distance to prove convergence of the corresponding display locales, that is, the Reeb graphs and the enhanced mapper graphs. We use the example in Fig. 1 as a reference for various notions.
Constructible \(\mathbb {R}\)-spaces
We begin by defining constructible \(\mathbb {R}\)-spaces, which we consider to be the underlying spaces for estimating the Reeb graphs, see Fig. 1. Constructible \(\mathbb {R}\)-spaces can be considered as a class of topological spaces which provide a natural setting for generalizing aspects of classical Morse theory to the study of singular spaces. Like smooth manifolds equipped with a Morse function, constructible \(\mathbb {R}\)-spaces are topological spaces equipped with a real valued function f, whose fibers, \(f^{-1}(x)\), satisfy certain regularity conditions. Specifically, the topological structure of the fibers of the real valued function are required to only change at a finite set of function values. The function values which mark changes in the topological structure of fibers are referred to as critical values.
Definition 1
(de Silva et al. 2016) An \(\mathbb {R}\)-space is a pair \(({\mathbb {X}},f)\), where \({\mathbb {X}}\) is a topological space and \(f:{\mathbb {X}}\rightarrow \mathbb {R}\) is a continuous map. A constructible \(\mathbb {R}\)-space is an \(\mathbb {R}\)-space \(({\mathbb {X}},f)\) satisfying the following conditions:
-
1.
There exists a finite increasing sequence of points \(S=\{a_0,\ldots ,a_n\}\subset \mathbb {R}\), two finite sets of locally path-connected spaces \(\{{\mathbb {V}}_0,\ldots ,{\mathbb {V}}_n\}\) and \(\{{\mathbb {E}}_0,\ldots , {\mathbb {E}}_{n-1}\}\), and two sets of continuous maps \(\{\ell _i:{\mathbb {E}}_i\rightarrow {\mathbb {V}}_i\}\) and \(\{r_i:{\mathbb {E}}_i\rightarrow {\mathbb {V}}_{i+1}\}\), such that \({\mathbb {X}}\) is the quotient space of the disjoint union
$$\begin{aligned} \coprod _{i=0}^n {\mathbb {V}}_i\times \{a_i\}\sqcup \coprod _{i=0}^{n-1}{\mathbb {E}}_i\times [a_i,a_{i+1}] \end{aligned}$$
by the relations
$$\begin{aligned} (\ell _i(x),a_i)\sim (x,a_i)\text { and } (r_i(x),a_{i+1})\sim (x,a_{i+1}) \end{aligned}$$
for all i and \(x\in {\mathbb {E}}_i\).
-
2.
The continuous function \(f:{\mathbb {X}}\rightarrow \mathbb {R}\) is given by projection onto the second factor of \({\mathbb {X}}\).
These are the objects of categories \({\mathbb {R}\text {-}\mathbf {space}}\) and \({\mathbb {R}\text {-}\mathbf {space^c}}\), consisting of \(\mathbb {R}\)-spaces and constructible \(\mathbb {R}\)-spaces, respectively. Morphisms in these categories are function-preserving maps; that is, \(\varphi :({\mathbb {X}},f) \rightarrow ({\mathbb {Y}},g)\) is given by a continuous map \(\varphi :{\mathbb {X}}\rightarrow {\mathbb {Y}}\) such that \(g \circ \varphi (x) = f(x)\).
Example 1
A smooth compact manifold \({\mathbb {X}}\) with a Morse function f constitutes a constructible \(\mathbb {R}\)-space. For instance, Fig. 1a illustrates a topological space \({\mathbb {X}}\) equipped with a height function f; the pair \(({\mathbb {X}}, f)\) is an \(\mathbb {R}\)-space. Similarly, a height function f on a torus \({\mathbb {X}}\) gives rise to an \(\mathbb {R}\)-space \(({\mathbb {X}}, f)\) in Fig. 6a.
In fact, \({\mathbb {X}}\) is not required to be a manifold for \(({\mathbb {X}}, f)\) to be an \(\mathbb {R}\)-space. Throughout the remainder of this paper, we assume that \(({\mathbb {X}}, f)\) is a constructible \(\mathbb {R}\)-space.
Definition 2
(de Silva et al. 2016) An \(\mathbb {R}\)-graph is a constructible \(\mathbb {R}\)-space such that the sets \({\mathbb {V}}_i\) and \({\mathbb {E}}_i\) are finite sets (with the discrete topology) for all i.
Example 2
The Reeb graph of a constructible \(\mathbb {R}\)-space is an \(\mathbb {R}\)-graph. For instance, the Reeb graph of \(({\mathbb {X}}, f)\) in Fig. 1b is an \(\mathbb {R}\)-graph. Similarly, the Reeb graph of a Morse function on a torus is an \(\mathbb {R}\)-graph, see Fig. 6b.
Constructible cosheaves
Sheaves and cosheaves are category-theoretic structures, called functors, which provide a framework for associating data to open sets in a topological space. These associations are required to preserve certain properties inherent to the topology of the space. In this way, one can study the topological structure of the space by studying the data associated to each open set by a given sheaf or cosheaf. In the following sections, we will use cosheaves to encode information about a constructible \(\mathbb {R}\)-space by associating open intervals in the real line to sets of (path-)connected components of fibers of the real valued function corresponding to the constructible \(\mathbb {R}\)-space.
Let \({\mathbf {Int}}\) be the category of connected open sets in \(\mathbb {R}\) with inclusions which we refer to as intervals, and \({\mathbf {Set}}\) the category of abelian groups with group homomorphism maps. We first define a cosheaf over \(\mathbb {R}\), which we propose to be the natural objects for categorifying the mapper algorithm.
Definition 3
A pre-cosheaf \({\mathscr {F}}\) on \(\mathbb {R}\) is a covariant functor \({\mathscr {F}}: {\mathbf {Int}}\rightarrow {\mathbf {Set}}\). The category of precosheaves on \(\mathbb {R}\) is denoted \({\mathbf {Set}}^{\mathbf {Int}}\) with morphisms given by natural transformations.
A pre-cosheaf \({\mathscr {F}}\) is a cosheaf if
$$\begin{aligned} \varinjlim _{V\in {{{\mathcal {V}}}}}{\mathscr {F}}(V) = {\mathscr {F}}(U) \end{aligned}$$
for each open interval \(U \in {\mathbf {Int}}\) and each open interval cover \({{{\mathcal {V}}}}\subset {\mathbf {Int}}\) of U, which is closed under finite intersections. The full subcategory of \({\mathbf {Set}}^{\mathbf {Int}}\) consisting of cosheaves is denoted \({\mathbf {Csh}}\).
Remark 1
We note that usually, cosheaves are defined over the category of arbitrary open sets rather than the category of connected open sets. However, the category of cosheaves defined over connected open sets is equivalent to the category of cosheaves defined over arbitrary open sets, by the colimit property of cosheaves. When we define smoothing operations on cosheaves in Sect. 2.4, there are important distinctions that will make clear the need for the definition with respect to \({\mathbf {Int}}\), as set-thickening operations do not preserve the cosheaf property otherwise.
Since we are interested in working with cosheaves which can be described with a finite amount of data, we will restrict our attention to a well-behaved subcategory of \({\mathbf {Csh}}\), consisting of constructible cosheaves (defined below). Constructibility can be thought of as a type of “tameness” assumption for sheaves and cosheaves.
Definition 4
A cosheaf \({\mathscr {F}}\) is constructible if there exists a finite set \(S\subset \mathbb {R}\) of critical values such that \({\mathscr {F}}[U\subset V]\) is an isomorphism whenever \(S\cap U = S\cap V\). The full subcategory of \({\mathbf {Csh}}\) consisting of constructible cosheaves is denoted \({\mathbf {Csh^c}}\).
The Reeb cosheaf and display locale functors
We introduce the Reeb cosheaf and display locale functors. These functors relate the category of constructible cosheaves to the category of \(\mathbb {R}\)-graphs, and provide a natural categorification of the Reeb graph (de Silva et al. 2016). In other words, via both Reeb cosheaf functor and display locale functors, one could consider the translation between the data and their corresponding categorical interpretations.
Let \({\mathscr {R}}_f\) be the Reeb cosheaf of \(({\mathbb {X}},f)\) on \(\mathbb {R}\), defined by
$$\begin{aligned} {\mathscr {R}}_f(U)=\pi _0({\mathbb {X}}^U), \end{aligned}$$
where \({\mathbb {X}}^U := f^{-1}(U)\) and \(\pi _0({\mathbb {X}}^U)\) denotes the set of path components of \({\mathbb {X}}^U\).
Definition 5
The Reeb cosheaf functor \({{{\mathcal {C}}}}\) from the category of constructible \(\mathbb {R}\)-spaces to the category of constructible cosheaves
is defined by \({{{\mathcal {C}}}}(({\mathbb {X}},f))={\mathscr {R}}_f\). For a function-preserving map \(\varphi :({\mathbb {X}},f) \rightarrow ({\mathbb {Y}},g)\), the resulting morphism \({{{\mathcal {C}}}}[\varphi ]\) is given by \({{{\mathcal {C}}}}[\varphi ]: {\mathscr {R}}_f(U) = \pi _0 \circ f^{-1}(U) \rightarrow \pi _0 \circ g^{-1}(U)= {\mathscr {R}}_g(U)\) induced by \(\varphi \circ f^{-1}(U) \subseteq g^{-1}(U)\).
Definition 6
The costalk of a (pre-)cosheaf \({\mathscr {F}}\) at \(x\in \mathbb {R}\) is
$$\begin{aligned} {\mathscr {F}}_x=\varprojlim _{I\ni x}{\mathscr {F}}(I). \end{aligned}$$
For each costalk \({\mathscr {F}}_x\), there is a natural map \({\mathscr {F}}_x\rightarrow {\mathscr {F}}(I)\) (given by the universal property of limits) for each open interval I containing x.
In order to related the Reeb and mapper cosheaves to geometric objects, we make use of the notion of display locale, introduced in Funk (1995).
Definition 7
The display locale of a cosheaf \({\mathscr {F}}\) (as a set) is defined as
$$\begin{aligned} {\mathcal {D}}({\mathscr {F}})=\coprod _{x\in \mathbb {R}}{\mathscr {F}}_x. \end{aligned}$$
A topology on \({{{\mathcal {D}}}}({\mathscr {F}})\) is generated by open sets of the form
$$\begin{aligned} U_{I,a}=\{s\in {\mathscr {F}}_x:x\in I \text { and }s\mapsto a\in {\mathscr {F}}(I)\}, \end{aligned}$$
for each open interval \(I\in {\mathbf {Int}}\) and each section \(a\in {\mathscr {F}}(I)\).
The display locale gives a functor from the category of cosheaves to the category of \(\mathbb {R}\)-graphs,
We proceed by giving an explicit geometric realization of the display locale of a constructible cosheaf. Let \({\mathscr {F}}\) be a constructible cosheaf with set of critical values \(\mathbb {R}_0 \subset \mathbb {R}\). Let \(\mathbb {R}_1 = \mathbb {R}\setminus \mathbb {R}_0\) be the complement of \(\mathbb {R}_0\), so that we form a stratification
$$\begin{aligned} \mathbb {R}=\mathbb {R}_0\sqcup \mathbb {R}_1, \end{aligned}$$
See Fig. 1e for an example (black points are in \(\mathbb {R}_0\), their complements are in \(\mathbb {R}_1\)). Let \(S_1\) be the set of connected components of \(\mathbb {R}_1\), i.e., the 1-dimensional stratum pieces. For \(x\in \mathbb {R}_0\), let \(I_x\) denote the largest open interval containing x such that \(I_{x}\cap \mathbb {R}_0= \{x\}\). Let
$$\begin{aligned} \tilde{{\mathfrak {D}}}({\mathscr {F}}):=\coprod _{V\in S_1}{\overline{V}}\times {\mathscr {F}}(V)\sqcup \coprod _{x\in \mathbb {R}_0}\{x\}\times {\mathscr {F}}(I_x) , \end{aligned}$$
where \({\overline{V}}\) is the closure of V and the product \(C\times \emptyset \) of a set C with the empty set is understood to be empty. Geometrically, \(\tilde{{\mathfrak {D}}}({\mathscr {F}})\) is a disjoint union of connected closed subsets of \(\mathbb {R}\); if the support of \({\mathscr {F}}\) is compact, then \(\tilde{{\mathfrak {D}}}({\mathscr {F}})\) is a disjoint union of closed intervals and points. Let \(\pi \) denote the projection map
$$\begin{aligned} \pi :\tilde{{\mathfrak {D}}}({\mathscr {F}})\rightarrow & {} \mathbb {R}\\ (x,a)\mapsto & {} x. \end{aligned}$$
Suppose \((x,a)\in {\overline{V}}\times {\mathscr {F}}(V)\subset \tilde{{\mathfrak {D}}}({\mathscr {F}})\) and \(x\in \mathbb {R}_0\). We have that \(V\cap \mathbb {R}_0=\emptyset \) and \(I_{x}\cap V\ne \emptyset \) (because x lies on the boundary of V). By maximality of \(I_{x}\), we have the inclusion \(V\subset I_{x}\). Let \(\varphi _{(x,a)}\) be the map
$$\begin{aligned} \varphi _{(x,a)}:{\mathscr {F}}(V)\rightarrow & {} {\mathscr {F}}(I_{x}) \end{aligned}$$
induced by the inclusion \(V\subset I_{x}\). We can extend this map to the fiber of \(\pi \) over x,
$$\begin{aligned} \psi _{x}:\pi ^{-1}(x)\rightarrow & {} {\mathscr {F}}(I_{x}), \end{aligned}$$
where \(\psi _x((x,a)):=\varphi _{(x,a)}(a)\) if \((x,a)\in {\overline{V}}\times {\mathscr {F}}(V)\) and \(\psi _x((x,a)):= a\) if \((x,a)\in \{x\}\times {\mathscr {F}}(I_x)\). Finally, we define an equivalence relation of points in \(\tilde{{\mathfrak {D}}}({\mathscr {F}})\). Suppose \((x,a),(y,b)\in \tilde{{\mathfrak {D}}}({\mathscr {F}})\). Then \((x,a)\sim (y,b)\) if
-
1.
\(x=y\in \mathbb {R}_0\), and
-
2.
\(\psi _x(a)=\psi _x(b)\in {\mathscr {F}}(I_x)\).
Finally, let
$$\begin{aligned} {\mathfrak {D}}({\mathscr {F}}): = \tilde{{\mathfrak {D}}}({\mathscr {F}})/\sim \end{aligned}$$
be the quotient of \(\tilde{{\mathfrak {D}}}({\mathscr {F}})\) by the equivalence relation. The projection \(\pi \) factors through the quotient, giving a map \({\bar{\pi }}:{\mathfrak {D}}({\mathscr {F}})\rightarrow \mathbb {R}\).
Proposition 1
If \({\mathscr {F}}\) is a constructible cosheaf with set of critical values S, then \({\mathfrak {D}}({\mathscr {F}})\) is a 1-dimensional CW-complex which is isomorphic (as an \(\mathbb {R}\)-space) to the display locale, \({{{\mathcal {D}}}}({\mathscr {F}})\), of \({\mathscr {F}}\).
Proof
We will construct a homeomorphism \(\gamma :{\mathfrak {D}}({\mathscr {F}})\rightarrow {{{\mathcal {D}}}}({\mathscr {F}})\) which preserves the natural quotient maps \({\bar{f}}:{{{\mathcal {D}}}}({\mathscr {F}})\rightarrow \mathbb {R}\) and \({\bar{\pi }}:{\mathfrak {D}}({\mathscr {F}})\rightarrow \mathbb {R}\). Given \(x\in \mathbb {R}_1\), we have that \({\bar{\pi }}^{-1}(x)= \{x\}\times {\mathscr {F}}(V)\), where V is the connected component of \(\mathbb {R}_1\) which contains x. Since \({\mathscr {F}}\) is constructible with respect to the chosen stratification, we have that \({\mathscr {F}}(V)\cong {\mathscr {F}}_x\). This gives a bijection from \({\bar{\pi }}^{-1}(x)\) to \({\bar{f}}^{-1}(x)\). For \(x\in \mathbb {R}_0\), the fiber \({\bar{\pi }}^{-1}(x)\) is by construction in bijection with \( {\mathscr {F}}(I_x)\). Again, since \({\mathscr {F}}\) is constructible and \(I_x\cap \mathbb {R}_0 = B(x)\cap \mathbb {R}_0\) for each sufficiently small neighborhood B(x) of x, we have that \({\mathscr {F}}(I_x)\cong {\mathscr {F}}_x\). These bijections define a map \(\gamma :{\mathfrak {D}}({\mathscr {F}})\rightarrow {{{\mathcal {D}}}}({\mathscr {F}})\), which preserves the quotient maps by construction. All that remains is to show that \(\gamma \) is continuous.
Suppose \(x\in \mathbb {R}_1\), and let V be the connected component of \(\mathbb {R}_1\) which contains x, and B(x) be an open neighborhood of x such that \(B(x)\subset V\). Then \({\mathscr {F}}_y\cong {\mathscr {F}}(V)\) for each \(y\in B(x)\), and \({\mathscr {F}}(B(x))\cong {\mathscr {F}}(V)\). Recall the definition of the basic open sets \(U_{I,a}\) in the definition of display locale (with notation adjusted to better align with the current proof),
$$\begin{aligned} U_{I,a}=\left\{ s\in {\mathscr {F}}_y\subset \coprod _{x\in \mathbb {R}}{\mathscr {F}}_x:y\in I \text { and }s\mapsto a\in {\mathscr {F}}(I)\right\} . \end{aligned}$$
Using the above isomorphisms to simplify the definition according to the current set-up, we get
$$\begin{aligned} U_{B(x),a}\cong & {} \left\{ a\in \coprod _{y\in B(x)} {\mathscr {F}}(V)\right\} . \end{aligned}$$
Therefore, \(\gamma ^{-1}(U_{B(x),a})=B(x)\times \{a\}\), which is open in the quotient topology on \({\mathfrak {D}}({\mathscr {F}})\).
Suppose \(x\in \mathbb {R}_0\), and let B(x) be a neighborhood of x such that \(B(x)\subset I_x\). Let \(V_1\) and \(V_2\) denote the two connected components of \(\mathbb {R}_1\) which are contained in \(I_x\). If \(y\in B(x)\), then \({\mathscr {F}}_y\) is isomorphic to either \({\mathscr {F}}(V_1)\), \({\mathscr {F}}(V_2)\), or \({\mathscr {F}}(I_x)\). Moreover, since \({\mathscr {F}}\) is constructible, we have that \({\mathscr {F}}(B(x))\cong {\mathscr {F}}(I_x)\). Let \(a'\in {\mathscr {F}}(I_x)\) correspond to \(a\in {\mathscr {F}}(B(x))\) under the isomorphism \({\mathscr {F}}(I_x)\cong {\mathscr {F}}(B(x))\). Following the definitions, we have that
$$\begin{aligned} \pi ^{-1}\left( \gamma ^{-1}(U_{B(x),a})\right)&= \left( \overline{V_1}\cap B(x)\right) \times {\mathscr {F}}[V_1\subset I_x]^{-1}(a')\\&\quad \sqcup \left( \overline{V_2}\cap B(x)\right) \times {\mathscr {F}}[V_2\subset I_x]^{-1}(a') \\&\quad \sqcup \{x\}\times \{a'\}, \end{aligned}$$
where \({\mathscr {F}}[V_i\subset I_x]^{-1}(a')\) is understood to be a (possibly empty) subset of \({\mathscr {F}}(V_i)\). It follows that \(\gamma ^{-1}(U_{B(x),a})\) is open in the quotient topology on \({\mathfrak {D}}({\mathscr {F}})\). Therefore, \(\gamma ^{-1}\) maps open sets to open sets, and we have shown that \(\gamma \) is a homeomorphism which preserves the quotient maps \({\bar{f}}\) and \({\bar{\pi }}\), i.e., \({\bar{f}}(\gamma ((x,a)))={\bar{\pi }}((x,a))=x\). \(\square \)
It follows from the proposition that \({\mathfrak {D}}({\mathscr {F}})\) is independent (up to isomorphism) of choice of critical values \(\mathbb {R}_0\). Additionally, we now note that we can freely use the notation \({\mathfrak {D}}({\mathscr {F}})\) or \({{{\mathcal {D}}}}({\mathscr {F}})\) to refer to the display locale of a constructible cosheaf over \(\mathbb {R}\). We will continue to use both symbols, reserving \({{{\mathcal {D}}}}\) for the display locale of an arbitrary cosheaf, and using \({\mathfrak {D}}\) when we want to emphasize the above equivalence for constructible cosheaves.
In de Silva et al. (2016), it is shown that the Reeb graph \({{{\mathcal {R}}}}({\mathbb {X}},f)\) of \(({\mathbb {X}},f)\) is naturally isomorphic to the display locale of \({\mathscr {R}}_f\). Moreover, the display locale functor \({\mathcal {D}}\) and the Reeb functor \({{{\mathcal {C}}}}\) are inverse functors and define an equivalence of categories between the category of Reeb graphs and the category of constructible cosheaves on \(\mathbb {R}\). This equivalence is closely connected to the more general relationships between constructible cosheaves and stratified coverings studied in Woolf (2009). The result allows us to define a distance between Reeb graphs by taking the interleaving distance between the associated constructible cosheaves as shown in the following section.
Interleavings
We start by defining the interleavings on the categorical objects. Interleaving is a typical tool in topological data analysis for quantifying proximity between objects such as persistence modules and cosheaves. For \(U \subseteq \mathbb {R}\), let \(U \mapsto U_\varepsilon := \{ y \in \mathbb {R}\mid \Vert y-U\Vert \le \varepsilon \}\). If \(U = (a,b) \in {\mathbf {Int}}\), then \(U_\varepsilon = (a-\varepsilon , b+\varepsilon )\).
Definition 8
Let \({\mathscr {F}}\) and \({\mathscr {G}}\) be two cosheaves on \(\mathbb {R}\). An \(\varepsilon \)-interleaving between \({\mathscr {F}}\) and \({\mathscr {G}}\) is given by two families of maps
$$\begin{aligned} \varphi _U:{\mathscr {F}}(U)\rightarrow {\mathscr {G}}(U_\varepsilon ),\quad \psi _U:{\mathscr {G}}(U)\rightarrow {\mathscr {F}}(U_\varepsilon ) \end{aligned}$$
which are natural with respect to the inclusion \(U\subset U_\varepsilon \), and such that
$$\begin{aligned} \psi _{U_\varepsilon }\circ \varphi _U = {\mathscr {F}}[U\subset U_{2\varepsilon }],\quad \varphi _{U_\varepsilon }\circ \psi _U={\mathscr {G}}[U\subset U_{2\varepsilon }] \end{aligned}$$
for all open intervals \(U\subset \mathbb {R}\). Equivalently, we require that the diagram
commutes, where the horizontal arrows are induced by \(U \subseteq U_\varepsilon \subseteq U_{2\varepsilon }\).
The interleaving distance between two cosheaves \({\mathscr {F}}\) and \({\mathscr {G}}\) is given by
$$\begin{aligned} d_I({\mathscr {F}},{\mathscr {G}}):=\inf \{\varepsilon \mid \text { there exists an } \varepsilon \text {-interleaving between }{\mathscr {F}}\text { and }{\mathscr {G}}\}. \end{aligned}$$
Now that we have an interleaving for elements of \({\mathbf {Csh^c}}\) along with an equivalence of categories between \({\mathbf {Csh^c}}\) and \({\mathbb {R}\text {-}\mathbf {graph}}\), we can develop this into an interleaving distance for the Reeb graphs themselves. The interleaving distance for Reeb graphs will be defined using a smoothing functor, which we construct below.
Definition 9
Let \(({\mathbb {X}},f)\) be a constructible \(\mathbb {R}\)-space. For \(\varepsilon \ge 0 \), define the thickening functor \({{{\mathcal {T}}}}_\varepsilon \) to be
$$\begin{aligned} {{{\mathcal {T}}}}_\varepsilon ({\mathbb {X}},f)=({\mathbb {X}}\times [-\varepsilon ,\varepsilon ],f_\varepsilon ), \end{aligned}$$
where \(f_\varepsilon (x,t)=f(x)+t\). Given a morphism \(\alpha :{\mathbb {X}}\rightarrow {\mathbb {Y}}\),
$$\begin{aligned} {{{\mathcal {T}}}}_\varepsilon (\alpha ):{\mathbb {X}}\times [-\varepsilon ,\varepsilon ]\rightarrow & {} {\mathbb {Y}}\times [-\varepsilon ,\varepsilon ]\\ (x,t)\mapsto & {} (\alpha (x),t). \end{aligned}$$
The zero section map is the morphism \(({\mathbb {X}},f)\rightarrow {{{\mathcal {T}}}}_\varepsilon ({\mathbb {X}},f)\) induced by
$$\begin{aligned} {\mathbb {X}}\rightarrow & {} {\mathbb {X}}\times [-\varepsilon ,\varepsilon ]\\ x\mapsto & {} (x,0). \end{aligned}$$
Proposition 2
(de Silva et al. 2016, Proposition 4.23) The thickening functor \({{{\mathcal {T}}}}_\varepsilon \) maps \(\mathbb {R}\)-graphs to constructible \(\mathbb {R}\)-spaces, i.e., if \(({\mathbb {G}},g)\in \mathbb {R}{-{\mathbf{graphs}}}\) then \({{{\mathcal {T}}}}_\varepsilon ({\mathbb {G}},g)\in \mathbb {R}{-{\mathbf{spaces}}}^{{{\mathbf{c}}}}\).
In general, the thickening functor \({{{\mathcal {T}}}}_\varepsilon \) will output a constructible \(\mathbb {R}\)-space, and not an \(\mathbb {R}\)-graph. In order to define a ‘smoothing’ functor for \(\mathbb {R}\)-graphs (following de Silva et al. 2016), we need to introduce a Reeb functor, which maps a constructible \(\mathbb {R}\)-space to an \(\mathbb {R}\)-graph.
Definition 10
The Reeb graph functor \({{{\mathcal {R}}}}\) maps a constructible \(\mathbb {R}\)-space \(({\mathbb {X}},f)\) to an \(\mathbb {R}\)-graph \(({\mathbb {X}}_f,{\bar{f}})\), where \({\mathbb {X}}_f\) is the Reeb graph of \(({\mathbb {X}},f)\) and \({\bar{f}}\) is the function induced by f on the quotient space \({\mathbb {X}}_f\). The Reeb quotient map is the morphism \(({\mathbb {X}},f)\rightarrow {{{\mathcal {R}}}}({\mathbb {X}},f)\) induced by the quotient map \({\mathbb {X}}\rightarrow {\mathbb {X}}_f\).
Now we can define a smoothing functor on the category of \(\mathbb {R}\)-graphs.
Definition 11
Let \(({\mathbb {G}},f) \in {\mathbb {R}\text {-}\mathbf {graph}}\). The Reeb smoothing functor \({{{\mathcal {S}}}}_\varepsilon :{\mathbb {R}\text {-}\mathbf {graph}}\rightarrow {\mathbb {R}\text {-}\mathbf {graph}}\) is defined to be the Reeb graph of an \(\varepsilon \)-thickened \(\mathbb {R}\)-graph
$$\begin{aligned} {{{\mathcal {S}}}}_\varepsilon ({\mathbb {G}},f)= {{{\mathcal {R}}}}\left( {{{\mathcal {T}}}}_\varepsilon ({\mathbb {G}},f)\right) . \end{aligned}$$
The Reeb smoothing functor \({{{\mathcal {S}}}}_\varepsilon \) defined above is used to define an interleaving distance for Reeb graphs, called the Reeb interleaving distance. The Reeb interleaving distance, defined below, can be thought of as a geometric analogue of the interleaving distance of constructible cosheaves. Let \(\zeta _{\mathbb {F}}^\varepsilon \) be the map from \(({\mathbb {F}},f)\) to \({{{\mathcal {S}}}}_\varepsilon ({\mathbb {F}},f)\) given by the composition of the zero section map \(({\mathbb {F}},f)\rightarrow {{{\mathcal {T}}}}_\varepsilon ({\mathbb {F}},f)\) with the Reeb quotient map \({{{\mathcal {T}}}}_\varepsilon ({\mathbb {F}},f)\rightarrow {{{\mathcal {R}}}}({{{\mathcal {T}}}}_\varepsilon ({\mathbb {F}},f))\). To ease notation, we will denote the composition of \(\zeta _{\mathbb {F}}^\varepsilon :({\mathbb {F}},f)\rightarrow {{{\mathcal {S}}}}_\varepsilon ({\mathbb {F}},f)\) with \(\zeta _{{{{\mathcal {S}}}}_\varepsilon ({\mathbb {F}},f)}:{{{\mathcal {S}}}}_\varepsilon ({\mathbb {F}},f)\rightarrow {{{\mathcal {S}}}}_\varepsilon ({{{\mathcal {S}}}}_\varepsilon ({\mathbb {F}},f))\) by \(\zeta _{\mathbb {F}}^\varepsilon (\zeta _{\mathbb {F}}^\varepsilon ({\mathbb {F}},f))\).
Definition 12
Let \(({\mathbb {F}},f)\) and \(({\mathbb {G}},g)\) be \(\mathbb {R}\)-graphs. We say that \(({\mathbb {F}},f)\) and \(({\mathbb {G}},g)\) are \(\varepsilon \)-interleaved if there exists a pair of function-preserving maps
$$\begin{aligned} \alpha :({\mathbb {F}},f)\rightarrow {{{\mathcal {S}}}}_\varepsilon ({\mathbb {G}},g)\qquad \text {and}\qquad \beta :({\mathbb {G}},g)\rightarrow {{{\mathcal {S}}}}_\varepsilon ({\mathbb {F}},f) \end{aligned}$$
such that
$$\begin{aligned} {{{\mathcal {S}}}}_\varepsilon (\beta )\left( \alpha ({\mathbb {F}},f)\right) = \zeta _{\mathbb {F}}^\varepsilon \left( \zeta _{\mathbb {F}}^\varepsilon ({\mathbb {F}},f)\right) \quad \text {and}\quad {{{\mathcal {S}}}}_\varepsilon (\alpha )\left( \beta ({\mathbb {G}},g)\right) = \zeta _{\mathbb {G}}^\varepsilon \left( \zeta _{\mathbb {G}}^\varepsilon ({\mathbb {G}},g)\right) . \end{aligned}$$
That is, the diagram
commutes.
The Reeb interleaving distance, \(d_R\left( ({\mathbb {F}},f),({\mathbb {G}},g)\right) \), is defined to be the infimum over all \(\varepsilon \) such that there exists an \(\varepsilon \)-interleaving of \(({\mathbb {F}},f)\) and \(({\mathbb {G}},g)\):
$$\begin{aligned} d_R\left( ({\mathbb {F}},f),({\mathbb {G}},g)\right) :=\inf \{\varepsilon :\text { there exists an }\varepsilon \text {-interleaving of }({\mathbb {F}},f)\text { and }({\mathbb {G}},g)\}. \end{aligned}$$
Remark 2
We should remark on a technical aspect of the above definition. The composition \(\zeta _{\mathbb {F}}^\varepsilon \circ \zeta _{\mathbb {F}}^\varepsilon ({\mathbb {F}},f)\) is naturally isomorphic to \(\zeta _{\mathbb {F}}^{2\varepsilon }({\mathbb {F}},f)\). However, since the definition of the Reeb interleaving distance requires certain diagrams to commute, it is necessary to specify an isomorphism between \(\zeta _{\mathbb {F}}^\varepsilon \circ \zeta _F^\varepsilon ({\mathbb {F}},f)\) and \(\zeta _{\mathbb {F}}^{2\varepsilon }({\mathbb {F}},f)\) if one would like to replace \(\zeta _{\mathbb {F}}^\varepsilon \circ \zeta _F^\varepsilon ({\mathbb {F}},f)\) with \(\zeta _{\mathbb {F}}^{2\varepsilon }({\mathbb {F}},f)\) in the commutative diagrams. Therefore, we choose to work exclusively with the composition of zero section maps, rather than working with diagrams which commute up to natural isomorphism.
The remaining proposition of this section gives a geometric realization of the interleaving distance of constructible cosheaves.
Proposition 3
(de Silva et al. 2016) \({{{\mathcal {D}}}}({\mathscr {F}})\) and \({{{\mathcal {D}}}}({\mathscr {G}})\) are \(\varepsilon \)-interleaved as \(\mathbb {R}\)-graphs if and only if \({\mathscr {F}}\) and \({\mathscr {G}}\) are \(\varepsilon \)-interleaved as constructible cosheaves.
Remark 3
Cosheaves are usually defined as functors on the category of open sets instead of functors on the connected open sets. We choose to use \(\mathbf {Int}\) instead of \(\mathbf {Open}({\mathbb {R}})\) due to technical issues that arise when we begin smoothing the functors. Basically, smoothing the functor does not produce a cosheaf when the intervals are replaced by arbitrary open sets in \({\mathbb {R}}\). Consider the example of Fig. 2, where \({\mathbb {X}}\) is a line with map f projection onto \({\mathbb {R}}\). Say \(U^\varepsilon \) is the thickening of a set, \(U^\varepsilon = \{x \in {\mathbb {R}} \mid |x-U| < \varepsilon \}\). Then we can pick an \(\varepsilon \) so that \(A^\varepsilon \) is two disjoint intervals, and \((A \cup B)^\varepsilon \) is one interval. Let F be the functor \(U \mapsto \pi _0 f^{-1}(U)\) which is a cosheaf representing the Reeb graph. Then the functor \(F \circ (\cdot )^\varepsilon \) is not a cosheaf since by the diagram,
\(F(A\cup B)^\varepsilon = \{ \bullet \}\) is not the colimit of \(F(A^\varepsilon )\) and \(F(B^\varepsilon )\).Footnote 1
Categorified mapper
In this section, we interpret classic mapper (for scalar functions), a topological descriptor, as a category theoretic object. This interpretation, in terms of cosheaves and category theory, simplifies many of the arguments used to prove convergence results in Sect. 4. We first review the classic mapper and then discuss the categorified mapper. The main ingredient needed to define the mapper construction is a choice of cover. We say a cover of \(\mathbb {R}\) is good if all intersections are contractible. A cover \({{{\mathcal {U}}}}\) is locally finite if for every \(x \in \mathbb {R}\), \({{{\mathcal {U}}}}_x=\{V\in {{{\mathcal {U}}}}:x\in V\}\) is a finite set. In particular, locally finiteness implies that the cover restricted to a compact set is finite. For the remainder of the paper, we work with nice covers which are good, locally finite, and consist only of connected intervals, see Fig. 1c for an example.
We will now introduce a categorification of mapper. Let \({\mathcal {U}}\) be a nice cover of \(\mathbb {R}\). Let \({\mathcal {N}}_{\mathcal {U}}\) be the nerve of \({{{\mathcal {U}}}}\), endowed with the Alexandroff topology. Consider the continuous map
$$\begin{aligned} \eta :\mathbb {R}\rightarrow & {} {\mathcal {N}}_{\mathcal {U}}\\ x\mapsto & {} \bigcap _{V\in {{{\mathcal {U}}}}_x} V, \end{aligned}$$
where the intersection \(\bigcap _{V\in {{{\mathcal {U}}}}_x} V\) is viewed as an open simplex of \({{{\mathcal {N}}}}_{{{\mathcal {U}}}}\). The mapper functor \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}:{\mathbf {Set}}^{\mathbf {Int}}\rightarrow {\mathbf {Set}}^{\mathbf {Int}}\) can be defined as
$$\begin{aligned} {{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {C}})= \eta ^*(\eta _*({\mathscr {C}})), \end{aligned}$$
where \(\eta ^*\) and \(\eta _*\) are the (pre)-cosheaf-theoretic pull-back and push-forward operations respectively. However, rather than defining \(\eta ^*\) and \(\eta _*\) in generality, we choose to work with an explicit description of \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {C}})\) given below. For notational convenience, define
$$\begin{aligned} {{{\mathcal {I}}}}_{{{\mathcal {U}}}}:{\mathbf {Int}}\rightarrow & {} {\mathbf {Int}}\\ U\mapsto & {} \eta ^{-1}(\text {St}( \eta (U))), \end{aligned}$$
where \(\text {St}(\eta (U))\) denotes the minimal open set in \({{{\mathcal {N}}}}_{{{\mathcal {U}}}}\) containing \(\eta (U):=\cup _{x\in U}\eta (x)\) (the open star of \(\eta (U)\) in \({{{\mathcal {N}}}}_{{{\mathcal {U}}}}\)). It is often convenient to identify \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(U)\) with a union of open intervals in \(\mathbb {R}\).
Lemma 1
Using the notation defined above, we have the equality
$$\begin{aligned} {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(U)=\bigcup _{x\in U}\bigcap _{V\in {{{\mathcal {U}}}}_x}V, \end{aligned}$$
where \(\bigcap _{V\in {{{\mathcal {U}}}}_x}V\) is viewed as a subset of \(\mathbb {R}\) (not as a simplex of \({{{\mathcal {N}}}}_{{{\mathcal {U}}}}\)).
Proof
If \(y\in \bigcup _{x\in U}\bigcap _{V\in {{{\mathcal {U}}}}_x}V\), then there exists an \(x\in U\) such that \(y\in V\) for all \(V\in {{{\mathcal {U}}}}_x\). In other words, \({{{\mathcal {U}}}}_x\subseteq {{{\mathcal {U}}}}_y\). Therefore, \(\eta (y)\ge \eta (x)\) in the partial order of \({{{\mathcal {N}}}}_{{{\mathcal {U}}}}\). Therefore, \(\eta (y)\in \text {St}(\eta (U))\). This implies that \(\bigcup _{x\in U}\bigcap _{V\in {{{\mathcal {U}}}}_x}V \subseteq {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(U)\). For the reverse inclusion, assume that \(u\in {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(U)\), i.e., \(\eta (u)\in \text {St}(\eta (U))\). This implies that there exists \(v\in U\) such that \(\eta (u)\ge \eta (v)\). In other words, \({{{\mathcal {U}}}}_v\subseteq {{{\mathcal {U}}}}_u\). Therefore \(u\in \cap _{V\in {{{\mathcal {U}}}}_v}V\), and \(u\in \bigcup _{v\in U}\bigcap _{V\in {{{\mathcal {U}}}}_v}V\). \(\square \)
Under this identification, it is clear that \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(U)\) is an open set in \(\mathbb {R}\) (since the open cover \({{{\mathcal {U}}}}\) is locally finite), and if \(U\subset V\) then \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(U)\subset {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(V)\). Moreover, since \(\bigcap _{V\in {{{\mathcal {U}}}}_x}V\) is an interval open neighborhood of x and U is an open interval, then \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(U)\) is an open interval. Therefore, \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}\) can be viewed as a functor from \({\mathbf {Int}}\) to \({\mathbf {Int}}\).
Finally, we can give \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {C}})\) an explicit description in terms of the functor \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}\).
Definition 13
The mapper functor \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}:{\mathbf {Set}}^{\mathbf {Int}}\rightarrow {\mathbf {Set}}^{\mathbf {Int}}\) is defined by
$$\begin{aligned} {{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {C}})(U):= {\mathscr {C}}({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(U)), \end{aligned}$$
for each open interval \(U\in {\mathbf {Int}}\).
Since \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}\) is a functor from \({\mathbf {Int}}\) to \({\mathbf {Int}}\), it follows that \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}\) is a functor from \({\mathbf {Set}}^{\mathbf {Int}}\) to \({\mathbf {Set}}^{\mathbf {Int}}\). Hence, \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {C}})\) is a functor from the category of pre-cosheaves to the category of pre-cosheaves. In the following proposition, we show that if \({\mathscr {C}}\) is a cosheaf, then \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {C}})\) is in fact a constructible cosheaf.
Proposition 4
Let \({{{\mathcal {U}}}}\) be a finite nice open cover of \(\mathbb {R}\). The mapper functor \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}\) is a functor from the category of cosheaves on \(\mathbb {R}\) to the category of constructible cosheaves on \(\mathbb {R}\):
$$\begin{aligned} {{{\mathcal {M}}}}_{{{\mathcal {U}}}}:{\mathbf{CSh}}\rightarrow {\mathbf{CSh}}^{\mathbf{c}}. \end{aligned}$$
Moreover, the set of critical points of \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {F}})\) is a subset of the set of boundary points of open sets in \({{{\mathcal {U}}}}\).
Proof
We will first show that if \({\mathscr {C}}\) is a cosheaf on \(\mathbb {R}\), then \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {C}})\) is a cosheaf on \(\mathbb {R}\). We have already shown that \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {C}})\) is a pre-cosheaf. So all that remains is to prove the colimit property of cosheaves. Let \(U\in {\mathbf {Int}}\) and \({{{\mathcal {V}}}}\subset {\mathbf {Int}}\) be a cover of U by open intervals which is closed under intersections. By definition of \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {C}})\), we have
$$\begin{aligned} \varinjlim _{V\in {{{\mathcal {V}}}}}{{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {C}})(V) = \varinjlim _{V\in {{{\mathcal {V}}}}} {\mathscr {C}}({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(V)). \end{aligned}$$
Notice that \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}({{{\mathcal {V}}}}):=\{{{{\mathcal {I}}}}_{{{\mathcal {U}}}}(V):V\in {{{\mathcal {V}}}}\}\) forms an open cover of \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(U)\). However, in general this cover is no longer closed under intersections. We will proceed by showing that passing from \({{{\mathcal {V}}}}\) to \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}({{{\mathcal {V}}}})':=\{\bigcap _{i\in I} W_i:\{W_i\}_{i\in I}\subset {{{\mathcal {I}}}}_{{{\mathcal {U}}}}({{{\mathcal {V}}}})\}\) does not change the colimit
$$\begin{aligned} \varinjlim _{V\in {{{\mathcal {V}}}}} {\mathscr {C}}({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(V)). \end{aligned}$$
Suppose \(I_1\) and \(I_2\) are two open intervals in \({{{\mathcal {V}}}}\) such that \(I_1\cap I_2=\emptyset \) and \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I_1)\cap {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I_2)\ne \emptyset \). Recall that \({{{\mathcal {U}}}}'\) is the union of \({{{\mathcal {U}}}}\) with all intersections of cover elements in \({{{\mathcal {U}}}}\), i.e., the closure of \({{{\mathcal {U}}}}\) under intersections. By the identification
$$\begin{aligned} {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I_i)=\bigcup _{x\in I_i}\bigcap _{V\in {{{\mathcal {U}}}}_x}V, \end{aligned}$$
there exists a subset \(\{W_j\}_{j\in J}\subset {{{\mathcal {U}}}}'\) such that
$$\begin{aligned} {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I_1)\cap {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I_2)=\bigcup _{j\in J}W_j. \end{aligned}$$
Suppose there exist \(V_1,V_2\in {{{\mathcal {U}}}}'\) such that \(V_i\subsetneq V_1 \cup V_2\) (i.e., one set is not a subset of the other), and \(V_1\cup V_2\subset {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I_1)\cap {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I_2)\). In other words, suppose that the cardinality of J, for any suitable choice of indexing set, is strictly greater than 1. Then there exists \(x_1,x_2\in I_1\) such that \(x_1\in V_1\setminus V_2\) and \(x_2\in V_2\setminus V_1\). Let w either be a point contained in \(V_1\cap V_2\) (if \(V_1\cap V_2\ne \emptyset \)) or a point which lies between \(V_1\) and \(V_2\). Since \(I_1\) is connected, we have that \(w\in I_1\). A similar argument shows that \(w\in I_2\), which implies the contradiction \(I_1\cap I_2\ne \emptyset \). Therefore,
$$\begin{aligned} {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I_1)\cap {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I_2) = W, \end{aligned}$$
for some \(W\in {{{\mathcal {U}}}}'\). Suppose \(W=\bigcap _{k\in K}W_k\) for some \(\{W_k\}_{k\in K}\subset {{{\mathcal {U}}}}\), and let \(I_1=J_1, J_2, \ldots , J_n=I_2\) be a chain of open intervals in \({{{\mathcal {V}}}}\), such that \(J_j\cap J_{j+1}\ne \emptyset \). We have that
$$\begin{aligned} I_1\cup \bigcup _{k\in K}W_k\cup I_2 \end{aligned}$$
is connected, because \(I_1\), \(I_2\), and \(\bigcup _{k\in K}W_k\) are intervals with \(\bigcup _{k\in K}W_k\cap I_1\) and \(\bigcup _{k\in K}W_k\cap I_2\) nonempty. Therefore, for each j, \(J_j\cap W_k\ne \emptyset \) for some k, i.e., \(W\subset {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(J_j)\). In conclusion, we have shown that
$$\begin{aligned} {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I_1)\cap {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I_2)\subseteq {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(J_j)\text { for each } j. \end{aligned}$$
Following the arguments in the proof of Proposition 4.17 of de Silva et al. (2016), it can be shown that
$$\begin{aligned} \varinjlim _{V\in {{{\mathcal {V}}}}} {\mathscr {C}}({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(V)) =\varinjlim _{U\in {{{\mathcal {I}}}}_{{{\mathcal {U}}}}({{{\mathcal {V}}}})} {\mathscr {C}}(U)= \varinjlim _{U\in {{{\mathcal {I}}}}_{{{\mathcal {U}}}}({{{\mathcal {V}}}})'} {\mathscr {C}}(U). \end{aligned}$$
Since \({\mathscr {C}}\) is a cosheaf, we can use the colimit property of cosheaves to get
$$\begin{aligned} \varinjlim _{V\in {{{\mathcal {V}}}}}{{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {C}})(V) = {\mathscr {C}}({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(U)). \end{aligned}$$
Therefore \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {C}})\) is cosheaf. We will proceed to show that \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {C}})\) is constructible.
Let S be the set of boundary points for open sets in \({{{\mathcal {U}}}}\). Since \({{{\mathcal {U}}}}\) is a finite, good cover of \(\mathbb {R}\), S is a finite set. If \(U\subset V\) are two open sets in \(\mathbb {R}\) such that \(U\cap S = V\cap S\), then \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(U)={{{\mathcal {I}}}}_{{{\mathcal {U}}}}(V)\). Therefore \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {F}})(U)\rightarrow {{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {F}})(V)\) is an isomorphism. \(\square \)
We use the mapper functor to relate Reeb graphs (the display locale of the Reeb cosheaf \({\mathscr {R}}_f\)) to the enhanced mapper graph (the display locale of \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {R}}_f)\)). In particular, the error is controlled by the resolution of the cover, as defined below.
Definition 14
Let \({{{\mathcal {U}}}}\) be a nice cover of \(\mathbb {R}\) and \({\mathscr {F}}\) a cosheaf on \(\mathbb {R}\). The resolution of \({{{\mathcal {U}}}}\) relative to \({\mathscr {F}}\), denoted \({{\,\mathrm{res}\,}}_{\mathscr {F}}{{{\mathcal {U}}}}\), is defined to be the maximum of the set of diameters of \({{{\mathcal {U}}}}_{\mathscr {F}}:=\{V\in {{{\mathcal {U}}}}:{\mathscr {F}}(V)\ne \emptyset \}\):
$$\begin{aligned} {{\,\mathrm{res}\,}}_{\mathscr {F}}{{{\mathcal {U}}}}:=\max \{{{\,\mathrm{diam}\,}}(V):V\in {{{\mathcal {U}}}}_{\mathscr {F}}\}. \end{aligned}$$
Here we understand the diameter of open sets of the form \((a,+\infty )\) or \((-\infty ,b)\) to be infinite. Therefore, the resolution \({{\,\mathrm{res}\,}}_{\mathscr {F}}{{{\mathcal {U}}}}\) can take values in the extended non-negative numbers \(\mathbb {R}_{\ge 0}\sqcup \{+\infty \}\).
Remark 4
If \({\mathscr {R}}_f\) is a Reeb cosheaf of a constructible \(\mathbb {R}\)-space \(({\mathbb {X}},f)\), then \({\mathscr {R}}_f(V)\ne \emptyset \) if and only if \(V\cap f({\mathbb {X}})\ne \emptyset \).
Definition 15
Define \({{\,\mathrm{res}\,}}_f{{{\mathcal {U}}}}\) by
$$\begin{aligned} {{\,\mathrm{res}\,}}_{f}{{{\mathcal {U}}}}:=\max \{{{\,\mathrm{diam}\,}}(V):V\in {{{\mathcal {U}}}}_f\}, \end{aligned}$$
where \({{{\mathcal {U}}}}_f:=\{V\in {{{\mathcal {U}}}}: V\cap f({\mathbb {X}})\ne \emptyset \}\).
The following theorem is analogous to Munch and Wang (2016, Theorem 1), adapted to the current setting. Specifically, our definition of the mapper functor \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}\) differs from the functor \({\mathcal {P}}_K\) of Munch and Wang (2016), and the convergence result of Munch and Wang (2016) is proved for multiparameter mapper (whereas the following result is only proved for the one-dimensional case).
Theorem 1
(cf. Munch and Wang 2016, Theorem 1) Let \({{{\mathcal {U}}}}\) be a nice cover of \(\mathbb {R}\), and \({\mathscr {F}}\) a cosheaf on \(\mathbb {R}\). Then
$$\begin{aligned} d_I({\mathscr {F}},{{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {F}}))\le {{\,\mathrm{res}\,}}_{\mathscr {F}}{{{\mathcal {U}}}}. \end{aligned}$$
Proof
If \({{\,\mathrm{res}\,}}_{\mathscr {F}}{{{\mathcal {U}}}}=+\infty \), then the inequality is automatically satisfied. Therefore, we will work with the assumption that \({{\,\mathrm{res}\,}}_{\mathscr {F}}{{{\mathcal {U}}}}<+\infty \). Let \(\delta _{{{\mathcal {U}}}}={{\,\mathrm{res}\,}}_{\mathscr {F}}{{{\mathcal {U}}}}<+\infty \). We will prove the theorem by constructing a \(\delta _{{{\mathcal {U}}}}\)-interleaving of the sheaves \({\mathscr {F}}\) and \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {F}})\). Suppose \(I\in {\mathbf {Int}}\). For each \(x\in I\), let \(W_x=\bigcap _{V\in {{{\mathcal {U}}}}_x}V\). Recall that
$$\begin{aligned} {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I)=\bigcup _{x\in I}W_x. \end{aligned}$$
Ideally, we would construct an interleaving based on an inclusion of the form \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I)\subset I_{\delta _{{{\mathcal {U}}}}}\). However, this inclusion will not always hold. For example, if \({{{\mathcal {U}}}}\) is a finite cover, then it is possible for I to be a bounded open interval, and for \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I)\) to be unbounded.
We will include a simple example to illustrate this behavior. Suppose \({{{\mathcal {U}}}}= \{(-\infty , -1),(-2,2), (1,+\infty )\}\) and let \({\mathscr {F}}\) be the constant cosheaf supported at 0, i.e. \({\mathscr {F}}(U)=\emptyset \) if \(0\notin U\) and \({\mathscr {F}}(V) = \{*\}\) if \(0\in V\). Consider the interval \(I = (0,3)\). For each \(x\in (0,1]\subset I\), we have that \(W_x = (-2,2)\). If \(x\in (1,2)\subset I\), then \(W_x = (-2,2)\cap (1,+\infty )\). Finally, if \(x\in [2,3)\subset I\), then \(W_x = (1,+\infty )\). Therefore, \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I) = (-2,+\infty )\), which is unbounded. However, we observe that \({\mathscr {F}}((-\infty ,-1))=\emptyset \), \({\mathscr {F}}((-2,2))=\{*\}\), and \({\mathscr {F}}((1,+\infty ))=\emptyset \). Therefore, (in the notation of Definition 14) \({{{\mathcal {U}}}}_{\mathscr {F}}=\{(-2,2)\}\), and \({{\,\mathrm{res}\,}}_{\mathscr {F}}{{{\mathcal {U}}}}= {{\,\mathrm{diam}\,}}((-2,2))=4\).
Although \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I)\) may be unbounded, we can construct an interval \(I'\) which is contained in \(I_{\delta _{{{\mathcal {U}}}}}\) and satisfies the equality \({\mathscr {F}}({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I))= {\mathscr {F}}(I')\). The remainder of the proof will be dedicated to constructing such an interval.
Let \({{{\mathcal {W}}}}:=\{U: U =\cap _{a\in A} W_a\text { for some }A\subset I\}\) be an open cover of \({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I)\) which is closed under intersections and generated by the open sets \(W_x\). Then the colimit property of cosheaves gives us the equality
$$\begin{aligned} {\mathscr {F}}({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I)) = \varinjlim _{U\in {{{\mathcal {W}}}}} {\mathscr {F}}(U). \end{aligned}$$
Let \(E:=\{e\in I:{\mathscr {F}}(W_e) = \emptyset \} \). If \(U = \cap _{a\in A }W_a\) and \(A\cap E\ne \emptyset \), then \({\mathscr {F}}(U)=\emptyset \). Let \({{{\mathcal {W}}}}_{I\setminus E}=\{U\in {{{\mathcal {W}}}}: U= \cap _{a\in A} W_a\text { for some } A\subset I\setminus E\}\). We should remark on a small technical matter concerning \( I\setminus E\). In general, this set is not necessarily connected. If that is the case, we should replace \(I\setminus E\) with the minimal interval which covers \(I\setminus E\). Going forward, we will assume that \(I\setminus E \) is connected. Altogether we have
$$\begin{aligned} {{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {F}})(I)={\mathscr {F}}({{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I)) =\varinjlim _{U\in {{{\mathcal {W}}}}} {\mathscr {F}}(U)=\varinjlim _{U\in {{{\mathcal {W}}}}_{I\setminus E}} {\mathscr {F}}(U)={\mathscr {F}}\left( \bigcup _{x\in I\setminus E }W_x\right) . \end{aligned}$$
If \(x\in I\setminus E\), then \(W_x\cap I\ne \emptyset \) and \({\mathscr {F}}(W_x)\ne \emptyset \). Therefore, \(W_x \subseteq I_{\delta _{{{\mathcal {U}}}}}\), since \({{\,\mathrm{diam}\,}}(W_x)\le \delta _{{{\mathcal {U}}}}\). Moreover,
$$\begin{aligned} \bigcup _{x\in I\setminus E}W_x \subseteq I_{\delta _{{{\mathcal {U}}}}} . \end{aligned}$$
The above inclusion induces the following map of sets
$$\begin{aligned} \varphi _I:{{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {F}})(I)\rightarrow {\mathscr {F}}(I_{\delta _{{{\mathcal {U}}}}}), \end{aligned}$$
which gives the first family of maps of the \(\delta _{{{\mathcal {U}}}}\)-interleaving. The second family of maps
$$\begin{aligned} \psi _I:{\mathscr {F}}(I)\rightarrow {{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {F}})(I_{\delta _{{{\mathcal {U}}}}}), \end{aligned}$$
follows from the more obvious inclusion \(I \subset {{{\mathcal {I}}}}_{{{\mathcal {U}}}}(I_{\delta _{{{\mathcal {U}}}}})\). Since the interleaving maps are defined by inclusions of intervals, it is clear that the composition formulae are satisfied:
$$\begin{aligned} \psi _{I_{\delta _{{{\mathcal {U}}}}}}\circ \varphi _I={\mathscr {F}}[I\subset I_{2\delta _{{{\mathcal {U}}}}}],\qquad \varphi _{I_{\delta _{{{\mathcal {U}}}}}}\circ \psi _I={{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {F}})\left[ I\subset I_{2\delta _{{{\mathcal {U}}}}}\right] . \end{aligned}$$
\(\square \)
Remark 5
One might think that Theorem 1 can be used to obtain a convergence result for the mapper graph of a general \(\mathbb {R}\)-space. However, we should emphasize that the interleaving distance is only an extended pseudo-metric on the category of all cosheaves. Therefore, even if the interleaving distance between \({\mathscr {F}}\) and \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {F}})\) goes to 0, this does not imply that the cosheaves are isomorphic. We only obtain a convergence result when restricting to the subcategory of constructible cosheaves, where the interleaving distance gives an extended metric.
The display locale \({\mathfrak {D}}({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {R}}_f))\) of the mapper cosheaf is a 1-dimensional CW-complex obtained by gluing the boundary points of a finite disjoint union of closed intervals, see Fig. 1h. We will refer to this CW-complex as the enhanced mapper graph of \(({\mathbb {X}},f)\) relative to \({{{\mathcal {U}}}}\), see Fig. 1g. There is a natural surjection from \({\mathfrak {D}}({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {R}}_f))\) to the nerve of the connected cover pull-back of \({{{\mathcal {U}}}}\), \({{{\mathcal {N}}}}_{f^*({{{\mathcal {U}}}})}\), i.e., from the enhanced mapper graph to the mapper graph, when the cover \({{{\mathcal {U}}}}\) contains open sets with empty triple intersections.
Using the Reeb interleaving distance and the enhanced mapper graph, we obtain and reinterpret the main result of Munch and Wang (2016) in the following corollary.
Corollary 1
(cf. Munch and Wang 2016, Corollary 6) Let \({{{\mathcal {U}}}}\) be a nice cover of \(\mathbb {R}\), and \(({\mathbb {X}},f) \in {\mathbb {R}\text {-}\mathbf {space^c}}\). Then
$$\begin{aligned} d_R({{{\mathcal {R}}}}({\mathbb {X}},f),{\mathfrak {D}}({{{\mathcal {M}}}}_{{{\mathcal {U}}}}({\mathscr {R}}_f)))\le {{\,\mathrm{res}\,}}_f{\mathcal {U}}. \end{aligned}$$
Throughout this section we introduce several categories and functors which we will now summarize. Let \({\mathbb {R}\text {-}\mathbf {graph}}\) be the category of \(\mathbb {R}\)-graphs (i.e., Reeb graphs), \({\mathbb {R}\text {-}\mathbf {space^c}}\) the category of constructible \(\mathbb {R}\)-spaces, \({\mathbf {Csh^c}}\) be the category of constructible cosheaves on \(\mathbb {R}\), \({{{\mathcal {S}}}}_\varepsilon \) and \({{{\mathcal {T}}}}_\varepsilon \) the smoothing and thickening functors, \({\mathfrak {D}}\) the display locale functor, and \({{{\mathcal {M}}}}_{{{\mathcal {U}}}}\) the mapper functor. Altogether, we have the following diagram of functors and categories,
Enhanced mapper graph algorithm Finally, we briefly describe an algorithm for constructing the enhanced mapper graph, following the example in Fig. 1. Let \(({\mathbb {X}},f)\) be a constructible \(\mathbb {R}\)-space (see Sect. 2.1). For simplicity, suppose that the cover \({{{\mathcal {U}}}}\) consists of open intervals, and contains no nonempty triple intersections (\(U\cap V\cap W=\emptyset \) for all \(U,V,W\in {{{\mathcal {U}}}}\)). Let \(\mathbb {R}_0\) be the union of boundary points of cover elements in the open cover \({{{\mathcal {U}}}}\). Let \(\mathbb {R}_1\) be the complement of \(\mathbb {R}_0\) in \(\mathbb {R}\). The set \(\mathbb {R}_0\) is illustrated with gray dots in Fig. 1e. We begin by forming the disjoint union of closed intervals,
$$\begin{aligned} \coprod _I {\overline{I}}\times \pi _0(f^{-1}(U_I)), \end{aligned}$$
where the disjoint union is taken over all connected components I of \(\mathbb {R}_1\), \({\overline{I}}\) denotes the closure of the open interval I, and \(U_I\) denotes the smallest open set in \({{{\mathcal {U}}}}\cup \{U\cap V \mid U,V\in {{{\mathcal {U}}}}\}\) which contains I. In other words, \(U_I\) is either the intersection of two cover elements in \({{{\mathcal {U}}}}\) or \(U_I\) is equal to a cover element in \({{{\mathcal {U}}}}\). The sets \(\pi _0(f^{-1}(U_I))\) are illustrated in Fig. 1d. Notice that there is a natural projection map from the disjoint union to \(\mathbb {R}\), given by projecting each point (y, a) in the disjoint union onto the first factor, \(y\in \mathbb {R}\). The enhanced mapper graph is a quotient of the above disjoint union by an equivalence relation on endpoints of intervals. This equivalence relation is defined as follows. Let \((y,a) \in {\overline{I}}\times \pi _0(f^{-1}(U_I)) \) and \((z,b) \in {\overline{J}}\times \pi _0(f^{-1}(U_J))\) be two elements of the above disjoint union. If \(y\in \mathbb {R}_0\), then y is contained in exactly one cover element in \({{{\mathcal {U}}}}\), denoted by \(U_y\). Moreover,if \(y\in \mathbb {R}_0\), then there is a map \(\pi _0(f^{-1}(U_I))\rightarrow \pi _0(f^{-1}(U_y))\) induced by the inclusion \(U_I\subseteq U_y\). Denote this map by \(\psi _{(y,I)}\). An analogous map can be constructed for (z, b), if \(z\in \mathbb {R}_0\). We say that \((y,a)\sim (z,b)\) if two conditions hold: \(y=z\) is contained in \(\mathbb {R}_0\), and \(\psi _{(y,I)}(a)=\psi _{(z,J)}(b)\). The enhanced mapper graph is the quotient of the disjoint union by the equivalence relation described above.
For example, as illustrated in Fig. 1, seven cover elements of \({\mathcal {U}}\) in (c) give rise to a stratification of \(\mathbb {R}\) into a set of points \(\mathbb {R}_0\) and a set of intervals \(\mathbb {R}_1\) in (e). For each interval I in \(\mathbb {R}_1\), we look at the set of connected components in \(f^{-1}(U_I)\). We then construct disjoint unions of closed intervals based on the cardinality of \(\pi _0(f^{-1}(U_I))\) for each \(I \in \mathbb {R}_1\). For adjacent intervals \(I_1\) and \(I_2\) in \(\mathbb {R}_1\), suppose that \(I_1\) is contained in the cover element V and \(I_2\) is equal to the intersection of cover elements V and W in \({{{\mathcal {U}}}}\). We consider the mapping from \(\pi _0(f^{-1}(U_{I_2}))\) to \(\pi _0(f^{-1}(U_{I_1}))\) (d). Here, we have that \(U_{I_2}=V\cap W\) and \(U_{I_1}= V\). We then glue these closed intervals following the above mapping, which gives rise to the enhanced mapper graph (g). Appendix A outlines these algorithmic details in the form of pseudocode.