# Adaptive Metrics for Adaptive Samples
## 3 Results
### Smooth Adaptive Distance and Homology Inference
#### 3.3.1 Critical Points of Distance Functions  
In this section, we give a minimal presentation of the critical point theory of distance functions to explain and motivate the results about interleaving offsets of distance functions in Riemannian manifolds. The main fact we use is that such interleavings lead immediately to results about homology inference (Lemma 16).  
For a smooth Riemannian manifold \(M\) and a compact subset \(X\subset M\), one can consider the function \(f_{X}:M\to\mathbb{R}\) that maps each point in \(M\) to the distance to its nearest point in \(X\) as measured by the metric on the manifold. The gradient of \(f_{X}\) can be defined on \(M\), and the critical points are those points for which the gradient is zero. The critical values of \(f_{X}\) are those values of \(r\) such that \(f_{X}^{-1}(r)\) contains a critical point. The critical point theory of distance functions developed by [PERSON] and others [11] extends the ideas from Morse theory to such distance functions. In particular, the theory gives the following result.  
**Lemma 15** ([PERSON] [11]).: _If \([r,r^{\prime}]\) contains no critical values, then \(f_{X}^{-1}([0,r])\hookrightarrow f_{X}^{-1}([0,r^{\prime}])\) is a homotopy equivalence._  
This means that for intervals that do not contain critical values, the inclusion maps in the filtration \(F(r):=\{f_{X}^{-1}([0,r])\mid r\geq 0\}\) are all homotopy equivalences and therefore induce isomorphisms in homology. This is used to give some information about the homology of filtrations that are interleaved with \(F\).  
We write \(H_{*}\) to denote homology over a field. Therefore, for a set \(X\subseteq\mathbb{R}^{d}\), we have a vector space \(H_{*}(X)\), and for a continuous map \(f:X\to Y\), we have a linear map \(H_{*}(f)\). For the canonical inclusion map \(X\hookrightarrow Y\) for a subset \(X\subseteq Y\), we will denote the corresponding linear map in homology as \(H_{*}(X\hookrightarrow Y)\). The image of this map is denoted \(\text{im }H_{*}(X\hookrightarrow Y)\).  
**Lemma 16**: _Let \(f_{X}\) be the distance function to a compact set in a Riemannian manifold such that \([r,r^{\prime}]\) contains no critical values of \(f_{X}\). Let \(F\) be the sublevel filtration of \(f_{X}\), and let \(G\) be a filtration such that \((F,G)\) are \((h_{1},h_{2})\)-interleaved in \((r,r^{\prime})\). If \(r^{\prime}<(h_{2}\circ h_{1}\circ h_{2}\circ h_{1})(r)\), then:_  
\[\mathrm{im}\ H_{*}(G(h_{1}(r))\hookrightarrow G((h_{1}\circ h_{2}\circ h_{1}) (r)))\cong H_{*}(F(r)).\]  
Proof.: The interleaving and the hypotheses imply that we have the following inclusions.  
\[F(r)\subseteq G(h_{1}(r))\subseteq F((h_{2}\circ h_{1})(r))\subseteq G((h_{ 1}\circ h_{2}\circ h_{1})(r))\subseteq F((h_{2}\circ h_{1}\circ h_{2}\circ h_ {1})(r))\]  
The preceding lemma implies that the maps \(F(r)\hookrightarrow F((h_{2}\circ h_{1})(r))\), \(F((h_{2}\circ h_{1})(r))\hookrightarrow F((h_{2}\circ h_{1}\circ h_{2}\circ h _{1})(r))\), and \(F(r)\hookrightarrow F((h_{2}\circ h_{1}\circ h_{2}\circ h_{1})(r))\) all induce isomorphisms in homology. It follows that \(\mathrm{im}\ H_{*}(G(h_{1}(r))\hookrightarrow G((h_{1}\circ h_{2}\circ h_{1}) (r)))\cong H_{*}(F(r))\), because the inclusion of spaces in G is factored through a space in \(F\), and it factors an inclusion of spaces, all of which are isomorphic in homology.