---
# System prepended metadata

title: 2. Finding metric spaces to use as charts

---

# 2. Finding metric spaces to use as charts


## 2.0 What sort of charts are we after and why do we want them?

In the first step, we'll assume that we're given a metric space $X$ and a set of functions $\{f_1,\dots, f_n\}$ from $X$ to $\mathbb{R}$.

We'd like to find spaces $Y_1,\dots, Y_n$ that serve as nice "local charts" for $X$. The first question we might ask is, what counts as a nice local chart in a general setting where our space $X$ is a finite metric space? Out intuition is that we'd like the $Y_i$ to model the sets $B_r(x)$ for "medium sized" r, i.e. $r$ such that $B_r(x)$ has a rich set of points, but such that there aren't that many local models needed to model the sets $B_r(x)$ as $x$ varies.

What are we really after here? Well it seems to me that the central thing we need to mirror the recipe given by convolution is a the following:

**Central Reason for Thinking About Charts:** In order to make convolution work, the main thing we need is a notion of "same function" on two different metric balls $B_{r_1}(x_1)$ and $B_{r_2}(x_2)$.

A chart certainly gives a notion of "same function." I think the converse is also true, i.e. that a reasonable notion of "same function" is the same thing as a chart in a given category. There's probably some sort of sheaf-theoretic justification of this, but here's a direct argument for a sort of converse.

Let's imagine that we've found a single nice space $(Y,y)$ to use as a comparison space globally across $X$. This means that for each $x\in X$, there exists an $r$ such that we've got a family of "nice maps" $\{\phi_x^i : (Y,y) \to B_r(x) \}$. 

Let's assume for simplicity that these "nice maps" are injective. We then end up with a family of "nice maps" of the form $\phi_{x_2}^j\circ \left(\phi_{x_1}^i\right)^{-1}: B_{r_1}(x_1)\to B_{r_2}(x_2)$. This shows that a "nice" family of charts covering $X$ is the essential the same thing as a family of "nice" comparison maps between $r$-balls in $X$.

Given that we're in a geometric category, it seems that the term "nice" should be in terms of metric distortion.

### Local contratibility

Is there anything topological or quasi-topological that we should bear in mind here?

One basic source of intuition here is the case of manifolds, it matters for some purposes that the charts are locally contractible.  If $X$ were a manifold (or more generally a locally contractile space) we'd be looking for models for $B_r(x)$ where the obvious inclusion $x\hookrightarrow B_r(x)$ is a homotopy equivalence.

In the setting of finite metric spaces, $x \hookrightarrow B_r(x)$ is a homotopy equivalence if and only $B_r(x)=\{x\}$, so this isn't quite the right notion here. But we can certainly come up with a course version of this by considering Cech homology, i.e. we're looking for $r$ such that there exists an $\epsilon$ "significantly smaller" than $r$ such that the $\epsilon$ Cech complex of the metric space $B_r(x)$ is contractible.

Should we care about this in our setting? It's not clear to me, but it seems like a nice intuition:

**Intuition 1:** We should try to model local neighborhoods that are "coarsley locally contractible."

This might be helpful in deciding an appropriate scale $r$ to use for selecting the germ at a point.




### Extension of functions

In the case of pixel functions, it might be useful to think of the comparison space $Y$ as the entire space $\mathbb{R}^2$ rather than just a discretization of a grid, and in general it might be useful to allow $Y$ to have a richer family of points that $B_r(x)$ for any single $x$. As an example, if $X$ were the finite metric space given by sampling many points from the unit square in $\mathbb{R}^2$, a good model for the $\epsilon$ balls in $X$ would be given by an $\epsilon$ ball in $\mathbb{R}^2$. Each given $\epsilon$ ball in $X$ would embedd in this uniform model, but there wouldn't necessarily be a nice map the other way.

So we may want to consider model spaces $Y$ that have infinitely many points, and therefore we won't expect there to be maps from $Y \to X$ but only maps from $X \to Y$.

Since our main goal here is to come up with a notion of "same function" on different balls at different points of $X$, we'll need a way to use a chart to "transfer" a function from $B_{r_1}(x_1)$ to $B_{r_2}(x_2)$ for different $x_1,r_1$, $x_2, r_2$. This seems to be the same thing as 

It therefore seems like we might want to require the following:

**Function extension property:** Given a chart $\phi: B_r(x)\to Y$ and a function $f: B_r(x)\to Z$, there exists a map $\psi: Y\to Z$ such that $\psi\circ \phi = f$.

If this property is satisfied, then given $f:B_r(x)\to Z$, and $\psi$ as above, we can consider $\psi\circ \phi': B_{r'}(x')\to Z$ to be the "same function" as $f$ for any chart $\phi': B_{r'}(x')\to Y$. This extension property therefore solves the problem of finding the "same function" when the maps go the wrong way.

This offers one justification for thinking of the spaces $B_r(x)$ and $Y$ as "contractible" in some sense. If this is the case and the chart maps are injective, then the function extension problem can be solved unconditionally for any space $Z$. In general, I think there's some extension criterion based on the homotopy groups of $Z$ so this may not matter if we suppose that the range of all our functions is always $\mathbb{R}$. But there might be a reason why we want to allow functions with targets in arbitrary domains.

This leads me to the following (still somewhat sketchy) hypothesis

**Hypothesis:** Our comparison spaces should be locally contractible topological spaces, and our charted regions $B_r(x)$ should have contractible $\epsilon$ Cech complexes for the right choice of $\epsilon$.



## 2.1 Finding comparison spaces $\{Y_i, \dots , Y_n\}$ based on the geometry of $X$ alone

What are the ways we can use to look for comparison space that solely take into consideration the geometry of the space $X$?

### 2.1.1 Finding an "average" $r$-balls for an appropriate $r$

Consider the family of metric spaces $\mathcal{F}=\{d\ast B_r(x)~|~x\in X,~d\in\mathbb{R}^+\,~r\in\mathbb{R}^+\}$, where $d\ast M$ denotes the metric space $M$ with distances scaled by a factor of $d$. 

By a section $\phi:X\to \mathcal{F}$, we will mean a map $\phi$ such that $\phi(x)$ is metric space of the form $d\ast B_r(x)$ for all $x$.

We now pick an $n$ for the total number of comparison spaces we'd like to consider. We then look for the best section $\phi$ such that $\phi(X)$ can be clustered into $n$ pieces with respect to the Hausdorff metric. We can then take some sort of "average" metric over the clusters, or enveloping metric. 

[[ This is still sketchy ]]




## 2.2 Finding comparison spaces based on the geometry of $X$ together with the functions $\{f_1,\dots, f_n\}$

In some cases, we may be interesting in having the information in the functions ${f_1,\dots, f_n}$ play a strong role in selecting the geometry on $X$. 

In other cases, however, we may want the geometry on $X$ to be static over a wide variety of functions, as would be the case for pixel values, where we might want $X$ to always be a discretization of the plane regardless of what the images are. We then might want the comparison spaces to be sensitive to the specific set of images we're feeding in.

### 2.2.1 Using the $f_i$'s to change the metric on X for the purpose of choosing charts

For anything listed above in 2.1, we can apply it to the metric space $X'$ given by induced metric on the graph of the function $F: X\to \mathbb{R}^n$ given by $F(x)=(f_1(x),\dots, f_n(x))$. 


## 2.3 Selecting comparison spaces $\{Y_1,\dots, Y_n\}$ from a database

If we have a database of comparison spaces built up, it should be possible to search through it for the best possible charts for $X$. 


