1 Introduction

Algebraic topology has emerged in the last decade as a powerful framework for analyzing complex high-dimensional data [2, 3]. In this setting, a data set is interpreted as a finite subset X of an ambient metric space \(({\mathbb {M}}, {\mathbf {d}})\); in practice \({\mathbb {M}}\) is usually Euclidean space, a manifold or a simplicial complex. If X has been sampled from/around a “continuous” object \({\mathbb {X}} \subset {\mathbb {M}}\), the topology inference problem asks whether topological features of \({\mathbb {X}}\) can be inferred from X. On the one hand, this is relevant because several data science questions are reinterpretations of topological tests. To name a few: clustering is akin to finding the connected components of a space [4, 5]; coverage in a sensor network relates to the existence of holes [11, 18]; periodicity and quasiperiodicity are linked to nontrivial 1-cycles in time delay reconstructions [31, 33].

On the other hand, concrete descriptions of the underlying space \({\mathbb {X}}\)—e.g. via equations or as a quotient space—yield (geometric) models for the data X, which can then be used for simulation, prediction and hypothesis testing [25, 32]. When determining low-dimensional representations for an abstract data set, the presence of nontrivial topology heavily constrains the dimension and type of appropriate model spaces. The simplest example of this phenomenon is perhaps the circle, which is intrinsically 1-dimensional, but cannot be recovered on the real line without considerable distortion. Viral evolution provides another example; evolutionary trees are often inadequate models, as horizontal recombination introduces cycles [7]. The main goal of this paper is to show that one can leverage knowledge of the topology underlying a data set, e.g. determined via topological inference, to produce appropriate low-dimensional coordinates. In particular, we show how the persistent cohomology of a data set can be used to compute economic representations in real (or complex) projective spaces. These coordinates capture the topological obstructions which prevent the data from being recovered in low-dimensional Euclidean spaces and, correspondingly, yield appropriate representations.

Persistent (co)homology is one avenue to address the topology inference problem [12, 38]; it provides a multiscale description of topological features, and satisfies several inference theorems [8, 10, 30]. Going from a persistent homology computation to actionable knowledge about the initial data set, is in general highly nontrivial. One would like to determine: how are the persistent homology features reflected on the data? if the homology suggests a candidate underlying space \({\mathbb {X}}\), what is a concrete realization (e.g., via equations or as a quotient)? how does the data fit on/around the realization? At least three approaches have been proposed in the literature to address these questions: localization, homological coordinatization and circular coordinates.

For a relevant homology class, the idea behind localization is to find an appropriate representative cycle. This strategy is successful in low dimensions [15, 16], but in general even reasonable heuristics lead to NP-hard problems which are NP-hard to approximate [9]. Homological coordinatization [36] attempts to map a simplicial complex on the data to a simplicial complex with prescribed homology—a model suggested by a persistent homology computation. The map is selected by examining the set of chain homotopy classes of chain maps between the complex on the data and the model. Selecting an appropriate representative chain map, however, involves combinatorial optimizations which are difficult to solve in practice. Circular coordinates [13] leverages the following fact: there is a bijection \(H^1(B;{\mathbb {Z}}) \cong [B,S^1]\) between the 1-dimensional \({\mathbb {Z}}\)-cohomology of a topological space B, and the set of homotopy classes of maps from B to the circle \(S^1\). When B is a simplicial complex with the data as vertex set, this observation is used to turn 1-dimensional (persistent) \({\mathbb {Z}}/p\)-cohomology classes for appropriate primes p, into circle-valued functions on the data.

The circular coordinates approach has been used successfully—for instance to parameterize periodic dynamics [14]—and is part of a bigger picture: if G is an abelian group, \(n\in {\mathbb {Z}}_{\ge 0}\) and K(Gn) is an Eilenberg–MacLane space (i.e. its nth homotopy group is G and the others are trivial), then [26, Chap. 22, Sect. 2]

$$\begin{aligned} H^n(B; G) \cong [B, K(G,n)]. \end{aligned}$$
(1)

In particular \(K({\mathbb {Z}},1) \) is homotopy equivalent to \(S^1\); that is, \(K({\mathbb {Z}},1) \simeq S^1\). Since the bijection in (1) can be chosen so that it commutes with morphisms induced by maps of spaces (i.e. natural), using maps to other Eilenberg–MacLane spaces emerges as an avenue for interpreting persistent cohomology computations, and more importantly, to produce coordinates which leverage knowledge of the underlying topology. One quickly runs into difficulties as the next candidate spaces \(K({\mathbb {Z}}/2,1) \simeq {\mathbb {R}}{\mathbf {P}}^\infty \), \(K({\mathbb {Z}}/p,1) \simeq S^\infty / ({\mathbb {Z}}/p)\) (action via scalar multiplication on \(S^\infty \subset {\mathbb {C}}^\infty \) by the pth roots of unity) and \(K({\mathbb {Z}},2) \simeq {\mathbb {C}}{{\mathbf {P}}}^\infty \) are infinite. The purpose of this paper is to address the cases \({\mathbb {R}}{\mathbf {P}}^\infty \) and \({\mathbb {C}}{{\mathbf {P}}}^\infty \).

1.1 Approach

We use the fact that if \({\mathbb {F}}\) is \({\mathbb {R}}\) or \({\mathbb {C}}\), then \({\mathbb {F}}{\mathbf {P}}^\infty \) is the Grassmannian of 1-planes in \({\mathbb {F}}^\infty \) and—for a topological space B\([B,{\mathbb {F}}{\mathbf {P}}^\infty ]\) can be naturally identified with the set of isomorphism classes of \({\mathbb {F}}\)-line bundles over B (Theorem 2.1). The isomorphism type of an \({\mathbb {R}}\)-line bundle over B is uniquely determined by its first Stiefel–Whitney class \(w_1 \in H^1(B;{\mathbb {Z}}/2)\), and the isomorphism type of a \({\mathbb {C}}\)-line bundle over B is classified by its first Chern class \(c_1 \in H^2(B;{\mathbb {Z}})\). These classes can be identified as elements of appropriate sheaf cohomology groups, and a classifying map \(f:B \longrightarrow {\mathbb {F}}{\mathbf {P}}^\infty \) can be described explicitly from a Čech cocycle representative (Theorem 3.2). This links cohomology to \({\mathbb {F}}{\mathbf {P}}^\infty \)-coordinates. For the case of point cloud data \(X \subset ({\mathbb {M}}, {\mathbf {d}})\), B will be an open neighborhood of X in \({\mathbb {M}}\), and we use the persistent cohomology of a sparse filtration on X to generate appropriate Čech cocycle representatives (Theorem 7.4). Evaluating the resulting classifying map f on the data X produces another point cloud \(f(X)\subset {\mathbb {F}}{\mathbf {P}}^n\). We develop in Sect. 5 a dimensionality reduction procedure for subsets of \({\mathbb {F}}{\mathbf {P}}^n\), referred to as Principal Projective Component Analysis. When this methodology is applied to the point cloud \(f(X)\subset {\mathbb {F}}{\mathbf {P}}^n\), it produces a sequence of projections \(P_k :f(X)\longrightarrow {\mathbb {F}}{\mathbf {P}}^k \), \(k = 1,\ldots , n\), each of which attempts to minimize an appropriate notion of distortion. The sets \(P_k \circ f(X)\) are the \({\mathbb {F}}{\mathbf {P}}^k\)-coordinates of X, for the Čech cocycle giving rise to f.

1.2 Organization

We end this introduction in Sect. 1.3 with a motivating data example. Section 2 is devoted to the theoretical preliminaries needed in later sections of the paper; in particular, we provide a terse introduction to vector bundles, the Čech cohomology of (pre)sheaves and the persistent cohomology of filtered complexes. In Sects. 3 and 4 we prove the main theoretical results underlying our method. In particular, we show how singular cohomology classes yield explicit and computable maps to real (and complex) projective space. Sects. 56 and 7 deal with computational aspects. Specifically, Sect. 5 develops Principal Projectives Components, a dimensionality reduction method in projective space, used to lower the target dimension of the maps developed in Sects. 3 and 4. Section 6 deals with the problem of choosing cocycle representatives; we present theorems and examples which guide these choices. We end the paper in Sect. 7 showing how persistent cohomology can be used to make the approach practical for data sets with low intrinsic dimension.

1.3 Motivation and Road Map

Let us illustrate some of the ideas we will develop in this paper via an example. To this end, let \({\mathbb {X}}\) be the collection of intensity-centered \(7\times 7\) grey-scale images depicting a line segment of fixed width, as show in Fig. 1.

Fig. 1
figure 1

Typical elements in \({\mathbb {X}}\)

By intensity-centered we mean that if the pixel values of \(x\in {\mathbb {X}}\) are encoded as real numbers between −1 (black) and 1 (white), then the mean pixel intensity of x is zero. We regard \({\mathbb {X}}\) as a subset of \({\mathbb {R}}^{49}\) by representing each image as a vector of pixel intensities, and endow it with the distance inherited from \({\mathbb {R}}^{49}\). A data set \(X\subset {\mathbb {X}}\) is generated by sampling 1682 points. The thing to notice is that even when the ambient space for \({\mathbb {X}}\) is \({\mathbb {R}}^{49}\), the intrinsic dimensionality is low. Indeed, each image can be generated from two numbers: the angle of the line segment with the horizontal, and the signed distance from the segment to the center of the patch. This suggests that \({\mathbb {X}}\) is locally 2-dimensional.

Principal Component Analysis (PCA) [21] and ISOMAP [37] are standard tools to produce low-dimensional representations for data; let us see if we can use them to recover an appropriate 2-dimensional representation for X. Given the first k principal components of X, calculated with PCA, their linear span \(V_k\) is interpreted as the k-dimensional linear space which best approximates X. One can calculate the residual variance of this approximation, by computing the mean-squared distance from X to \(V_k\). Similarly, the fraction of variance from X explained by \(V_k\) is equal to difference between the variance of X and the residual variance, divided by the variance of X. A similar notion can be defined for ISOMAP. We show in Fig. 2 the fraction of variance, from X, recovered by PCA and ISOMAP.Footnote 1

Fig. 2
figure 2

Explained variance, from X, versus embedding dimension

Given the low intrinsic dimensionality of \({\mathbb {X}}\), it follows from the PCA plot that the original embedding \({\mathbb {X}} \hookrightarrow {\mathbb {R}}^{49}\) is highly non-linear. Moreover, the ISOMAP plot implies that even after accounting for the way in which \({\mathbb {X}}\) sits in \({\mathbb {R}}^{49}\), the data has intrinsic complexity that prevents it from being recovered faithfully in \({\mathbb {R}}^2\) or \({\mathbb {R}}^3\). That is, the data is locally simple (e.g. each \(x\in X\) is described by angle and displacement) but globally complex. One possible source of said complexity is whether or not \({\mathbb {X}}\) is orientable; this is a topological obstruction to low-dimensional Euclidean embeddings. Using the observation that \({\mathbb {X}}\) is a manifold, its orientability can be determined from X as we describe next. First, we construct a covering \(\{B_r\}_{r= 0}^n\) of X. From now on we will simplify the set notation \(\{a_\alpha \}_{\alpha \in \Lambda }\) to \(\{a_\alpha \}\) in the cases where the indexing set \(\Lambda \) can be inferred from the context. Next, we apply Multi-Dimensional Scaling (MDS) [23] on each \(B_r\) to get local Euclidean coordinates and, finally, we compute the determinant \(\omega _{rt} = \pm 1\) associated to the change of local Euclidean coordinates on each \(B_r \cap B_t\). If there is global agreement of local orientations (e.g., \(\omega _{rt}=1\) always), or local orientations can be reversed in the appropriate \(B_r\)’s so that the result is globally consistent (i.e. \(\{\omega _{rt}\}\) is a coboundary: there exist \(\nu _r\)’s, with \(\nu _r = \pm 1\), so that \(\omega _{rt} = \nu _t/\nu _r\) for all \(r,t=1,\ldots , n\)), then \({\mathbb {X}}\) would be deemed orientable.

The cover for X will be a collection of open balls centered at landmark data points selected through maxmin (also known as farthest point) sampling. That is, first one chooses an arbitrary landmark \(\ell _0 \in X\), and if \(\ell _0,\ldots , \ell _r\) have been determined, then \(\ell _{r+1} \in X\) is given by

$$\begin{aligned} \ell _{r+1} = \mathop {{{\mathrm{argmax}}}}\limits _{x\in X} \big (\mathrm{min}\{{\mathbf {d}}(x, \ell _0),\ldots , {\mathbf {d}}(x , \ell _r)\}\big ). \end{aligned}$$

Here \({\mathbf {d}}\) is the geodesic distance estimate from the ISOMAP calculation. A finite number of steps of maxmin sampling results in a landmark set \(\{\ell _0,\ldots , \ell _n\}\) which tends to be well-distributed and well-separated across the data. For the current example we used \(n=14\). LetFootnote 2 \(\epsilon _0 = \cdots = \epsilon _n = 9.3\) and

$$\begin{aligned} {\mathcal {B}} =\{B_r\}\;\; \text{ where } \;\; B_r = \{x\in X : {\mathbf {d}}(x,\ell _r) < \epsilon _r\}. \end{aligned}$$

To put the radii \(\epsilon _r\) in perspective, the distance between distinct \(\ell _r\)’s ranges from 4.5 to 14.6, and the mean pairwise distance is 9.5.

Let us now show how to calculate the determinant of the change of local coordinates. If \(B_r \cap B_t \ne \emptyset \), let

$$\begin{aligned} f_r :B_r \longrightarrow {\mathbb {R}}^2\;\; \text{ and } \;\; f_t :B_t \longrightarrow {\mathbb {R}}^2 \end{aligned}$$

be the functions obtained from applying MDS on \(\bigl (B_r , {\mathbf {d}}\big |_{B_r}\bigr )\) and \(\bigl (B_t , {\mathbf {d}}\big |_{B_t}\bigr )\), respectively. If \({\mathsf {O}}(2)\) denotes the set of orthogonal \(2\times 2\) real matrices, then the solution to the orthogonal Procrustes problem

$$\begin{aligned} (\Omega _{rt}, {\mathbf {v}}_{rt}) \;\; = \mathop {{{\mathrm{argmin}}}}\limits _{\Omega \in {\mathsf {O}}(2), \; {\mathbf {v}}\in {\mathbb {R}}^2} \; \sum _{x\in B_r \cap B_t} \big \Vert f_t(x) -\big ( \Omega \cdot f_r(x) + {\mathbf {v}}\big ) \big \Vert ^2 \end{aligned}$$

computed following [34], yields the best linear approximation to an isometric change of local ISOMAP coordinates. We let \(\omega _{rt}:= \det (\Omega _{rt})\). In summary, we have constructed a finite covering \({\mathcal {B}} = \{B_r\}\) for X and a collection of numbers \(\omega _{rt}= \pm 1\) which, at least for this example, satisfy the cocycle condition: for all \( 0 \le r \le n\) we have \(\omega _{rr} =1\) and if \(B_r \cap B_s \cap B_t \ne \emptyset \), then \(\omega _{rs}\cdot \omega _{st} = \omega _{rt}\). In particular, a cohomology computation shows that \(\{\omega _{rt}\}\) is not a coboundary and hence \({\mathbb {X}}\) is estimated to be non-orientable.

What we will see now, and throughout the paper, is that this type of cohomological feature can be further leveraged to produce useful coordinates for the data. Indeed (Theorem 3.2 and Corollary 3.4):

Theorem

For \(\lambda \in {\mathbb {R}}\) let \(\left| \lambda \right| _{+} = \max \{\lambda ,0\} \), let \({\mathbb {F}}\) be either \({\mathbb {R}}\) or \({\mathbb {C}}\), and let \({\mathbb {F}}^\times = {\mathbb {F}}\smallsetminus \{{\mathbf {0}}\}\). For a metric space \(({\mathbb {M}},{\mathbf {d}})\) let \(\{\ell _0,\ldots , \ell _n\}\subset {\mathbb {M}}\) and fix positive real numbers \(\epsilon _0,\ldots , \epsilon _n\). If we let \({\mathcal {B}} = \{B_r\}\) with \(B_r =\{b \in {\mathbb {M}} : {\mathbf {d}}(b,\ell _r) < \epsilon _r\}\), \(B = \bigcup {\mathcal {B}}\), and there is a collection \(\omega = \{\omega _{rt} : B_r \cap B_t \longrightarrow {\mathbb {F}}^\times \}\) of continuous maps satisfying the cocycle condition (4), then \(f_\omega :B \longrightarrow {\mathbb {F}} {\mathbf {P}}^n\) given in homogeneous coordinates by

$$\begin{aligned} f_\omega (b) = \big [\omega _{0j}(b)\cdot \left| \epsilon _0 - {\mathbf {d}}(b,\ell _0) \right| _{+} :\cdots : \omega _{nj}(b)\cdot \left| \epsilon _n - {\mathbf {d}}(b, \ell _n) \right| _{+} \big ], \; \; \; b\in B_j, \end{aligned}$$
(2)

is well-defined (i.e. the value \(f_\omega (b)\) is independent of the j for which \(b\in B_j\)) and classifies the \({\mathbb {F}}\)-line bundle on B induced by \(({\mathcal {B}}, \omega )\).

The preliminaries needed to understand this theorem will be covered in Sect. 2, and we will devote Sect. 3 to proving it. The map \(f_\omega \) encodes in a global manner the local interactions captured by \(\omega \), and the explicit formula allows us to map our data set \(X\subset {\mathbb {R}}^{49}\) into \({\mathbb {R}}{\mathbf {P}}^{14}\) using the computed landmarks and determinants of local changes of coordinates. If we compute the principal projective components for \(f_\omega (X) \subset {\mathbb {R}}{\mathbf {P}}^{14}\) (this will be developed in Sect. 5 as a natural extension to PCA in Euclidean space and of Principal Nested Spheres Analysis [22]), the profile of recovered variance shown in Fig. 3 emerges.

Fig. 3
figure 3

Recovered variance, from \(f_\omega (X) \subset {\mathbb {R}}{\mathbf {P}}^{14}\), when projected onto principal projective subspace of given dimension

From this plot we conclude that 2-dimensional projective space provides an appropriate reduction for \(f_\omega (X)\). We show in Fig. 4 said representation; that is, each image is placed in the \({\mathbb {R}}{\mathbf {P}}^2\) coordinate computed via principal projective component analysis on \(f_\omega (X)\).

Fig. 4
figure 4

Some elements from X placed on their computed \({\mathbb {R}}{\mathbf {P}}^2\)-coordinates

As the figure shows, the resulting coordinates recover the variables which we identified as describing points in \({\mathbb {X}}\): the radial coordinate in \({\mathbb {R}}{\mathbf {P}}^2\) corresponds to distance from the line segment to the center of the patch, and the angular coordinate captures orientation. Also, it indicates how \({\mathbb {R}}{\mathbf {P}}^2 \cong {\mathbb {X}}\) parameterizes the original data set X.

Though the strategy employed in this example (i.e. local MDS + determinant of local change of coordinates) was successful, one cannot assume in general that the data under analysis has been sampled from/around a manifold. That said, the result from formula (2) only requires a covering \({\mathcal {B}}\) via open balls, and a collection of \({\mathbb {F}}^\times \)-valued continuous functions \(\omega = \{\omega _{rt}\}\) satisfying the cocycle condition. Given a finite subset X of an ambient metric space \(({\mathbb {M}},{\mathbf {d}})\), one can always use maxmin sampling to produce a covering. We will show that any 1-dimensional (resp. 2-dimensional) \({\mathbb {Z}}/2\)-cocyle (resp. \({\mathbb {Z}}\)-cocycle) of the nerve complex \({\mathcal {N}}({\mathcal {B}})\), for \({\mathbb {F}}= {\mathbb {R}}\) (resp. \({\mathbb {F}}= {\mathbb {C}}\)), yields one such \(\omega \) (Proposition 4.3 and Corollary 4.8). We also show that in dimension 1 (i.e., \({\mathbb {F}}= {\mathbb {R}}\)) cohomologous cocycles yield equivalent projective coordinates, while in dimension 2 (i.e., \({\mathbb {F}}= {\mathbb {C}}\)) the harmonic cocycle is needed (see Sect. 6).

It is entirely possible that a cohomology class reflecting sampling artifacts is chosen, as opposed to one associated to robust topological features of a continuous space \({\mathbb {X}} \subset {\mathbb {M}}\) underlying X. Here is where persistent cohomology comes in. Indeed, under mild connectivity conditions of \({\mathcal {B}}\), distinct cohomology classes yield maps to projective space with distinct homotopy types. Moreover, the maps resulting from a persistent class across its lifetime are compatible up to homotopy (Theorem 7.4 and Proposition 7.6). Hence, the result is a multiscale family of compatible maps which, for classes with long persistence, are more likely to reflect robust features of (neighborhoods around) \({\mathbb {X}}\).

The strategy outlined here is in fact a two-way street. One can use persistent cohomology to compute multiscale compatible projective coordinates, but the reserve is also useful: The resulting coordinates can be used to interpret the distinct persistent cohomology (= persistent homology) features of neighborhoods of the data, at least in cohomological dimensions 1 (with \({\mathbb {Z}}/2\) coefficients) and 2 (with \({\mathbb {Z}}/p\) coefficients for appropriate primes p).

2 Preliminaries

2.1 Vector Bundles

For a more thorough review please refer to [27]. Let E and B be topological spaces, and let \(p:E \longrightarrow B\) be a surjective continuous map. The triple \(\zeta = (E,B,p)\) is said to be a rank \(k\in {\mathbb {N}}\) vector bundle over a field \({\mathbb {F}}\) (i.e. an \({\mathbb {F}}\)-vector bundle) if each fiber \(p^{-1}(b)\) is an \({\mathbb {F}}\)-vector space of dimension k, and \(\zeta \) is locally trivial. That is, for every \(b_0\in B\) there exist an open neighborhood \(U \subset B\) and a homeomorphism \(\rho _U :U\times {\mathbb {F}}^k \longrightarrow p^{-1}(U) \), called a local trivialization around \(b_0\), satisfying:

  1. 1.

    \(p(\rho _U(b,{\mathbf {v}})) = b\) for every \((b,{\mathbf {v}}) \in U\times {\mathbb {F}}^k\),

  2. 2.

    \(\rho _U(b,\cdot ) :{\mathbb {F}}^k \longrightarrow p^{-1}(b)\) is an isomorphism of \({\mathbb {F}}\)-vector spaces for each \(b\in U\).

E and B are referred to as the total and base space of the bundle, and the function \(p:E \longrightarrow B\) is called the projection map. Two vector bundles \(\zeta =(E,B,p)\) and \(\zeta ' = (E',B,p')\) are said to be isomorphic, \(\zeta \cong \zeta '\), if there exists a homeomorphism \(T:E \longrightarrow E'\) so that \(p'\circ T = p \) and for which each restriction \(T|_{p^{-1}(b)} \), \(b\in B\), is a linear isomorphism.

The collection of isomorphism classes of \({\mathbb {F}}\)-vector bundles of rank k over B is denoted \({\mathsf {Vect}}_{\mathbb {F}}^k(B)\). An \({\mathbb {F}}\)-vector bundle of rank 1 is called an \({\mathbb {F}}\)-line bundle, and the set \({\mathsf {Vect}}^1_{\mathbb {F}}(B)\) is an abelian group with respect to fiberwise tensor product of \({\mathbb {F}}\)-vector spaces.

Examples

  • The trivial bundle. \(B\times {\mathbb {F}}^k\): Fix \(k\in {\mathbb {N}}\) and let

    $$\begin{aligned} \begin{array}{llll} p:&{}B\times {\mathbb {F}}^k &{}\longrightarrow &{}B \\ &{}(b,{\mathbf {v}})&{}\mapsto &{} b. \end{array} \end{aligned}$$

    It follows that \(\varepsilon _k = (B\times {\mathbb {F}}^k, B, p)\) is an \({\mathbb {F}}\)-vector bundle over B of rank k. \(\varepsilon _k\) is referred to as the trivial bundle.

  • The Möbius band. Let \(\sim \) be the relation on \({\mathbb {R}}\times {\mathbb {R}}\) given by \((x,{\mathbf {u}}) \sim (y,{\mathbf {v}})\) if and only if \(x-y \in {\mathbb {Z}}\) and \({\mathbf {u}}= (-1)^{x-y}{\mathbf {v}}\). It follows that \(\sim \) is an equivalence relation, and if \(E = {\mathbb {R}}\times {\mathbb {R}}/\sim \), then \({\widetilde{p}} :{\mathbb {R}}\times {\mathbb {R}}\longrightarrow {\mathbb {R}}\) given by \({\widetilde{p}}(x,{\mathbf {u}}) = x\) descends to a continuous surjective map \(p :E \longrightarrow {\mathbb {R}}/{\mathbb {Z}}\). Hence \(\gamma ^1 = (E, {\mathbb {R}}/{\mathbb {Z}}, p)\) is an \({\mathbb {R}}\)-line bundle over the circle \({\mathbb {R}}/{\mathbb {Z}}\), whose total space is a model for the Möbius band. Since E is nonorientable, it follows that \(\gamma ^1 \) is not isomorphic to the trivial line bundle \( \varepsilon _1\).

  • Grassmann manifolds and their tautological bundles. Let \({\mathbb {F}}\) be either \({\mathbb {R}}\) or \({\mathbb {C}}\). Given \(k\in {\mathbb {Z}}_{\ge 0}\) and \(m\in {\mathbb {Z}}_{\ge k}\cup \{\infty \}\), let \({\mathsf {Gr}}_k({\mathbb {F}}^m)\) be the collection of k-dimensional linear subspaces of \({\mathbb {F}}^m\). This set is in fact a manifold, referred to as the Grassmannian of k-planes in \({\mathbb {F}}^m\). The tautological bundle over \({\mathsf {Gr}}_k({\mathbb {F}}^m)\), denoted \(\gamma ^k_{m}\), has total space

    $$\begin{aligned} E(\gamma _{m}^k) = \big \{(V,{\mathbf {u}}) \in {\mathsf {Gr}}_k({\mathbb {F}}^m) \times {\mathbb {F}}^m : {\mathbf {u}}\in V\big \} \end{aligned}$$

    and projection \(p:E(\gamma _{m}^k) \longrightarrow {\mathsf {Gr}}_k({\mathbb {F}}^m)\) given by \(p(V,{\mathbf {u}}) = V\). In particular one has that \({\mathsf {Gr}}_1({\mathbb {F}}^{m+1}) = {\mathbb {F}}{\mathbf {P}}^{m}\), which shows that each projective space \({\mathbb {F}}{\mathbf {P}}^m\) can be endowed with a tautological line bundle \(\gamma ^1_{m}\).

  • Pullbacks. Let B and \(B'\) be topological spaces, let \(\zeta = (E,B,p)\) be a vector bundle and let \(f:B' \longrightarrow B\) be a continuous map. The pullback of \(\zeta \) through f, denoted \(f^*\zeta \), is the vector bundle over \(B'\) with total space

    $$\begin{aligned} E(f^*\zeta ) = \big \{(b,e) \in B'\times E : f(b) = p(e)\big \} \end{aligned}$$

    and projection \(p':E(f^*\zeta ) \longrightarrow B'\) given by \(p'(b,e) = b\).

Theorem 2.1

([27, 5.6 and 5.7]) If B is a paracompact topological space and \(\zeta \) is an \({\mathbb {F}}\)-vector bundle of rank k over B, then there exists a continuous map

$$\begin{aligned} f_\zeta :B \longrightarrow {\mathsf {Gr}}_k({\mathbb {F}}^\infty ) \end{aligned}$$

satisfying \(f_\zeta ^*\gamma _{\infty }^k \cong \zeta \). Moreover, if \(g :B \longrightarrow {\mathsf {Gr}}_k({\mathbb {F}}^\infty )\) is continuous and also satisfies \(g^*\gamma _{\infty }^k \cong \zeta \), then \(f_\zeta \simeq g\) and hence \(f_\zeta \) is unique up to homotopy.

The previous theorem can be rephrased as follows: For B paracompact, the function

$$\begin{aligned} \begin{array}{ccc} {\mathsf {Vect}}_{\mathbb {F}}^k(B) &{} \longrightarrow &{} \big [B,{\mathsf {Gr}}_k({\mathbb {F}}^\infty )\big ] \\ {[}\zeta ] &{} \mapsto &{} [f_\zeta ] \end{array} \end{aligned}$$
(3)

is a bijection. Any such \(f_\zeta \) is referred to as a classifying map for \(\zeta \).

Transition Functions. If \(\rho _U :U\times {\mathbb {F}}^k \longrightarrow p^{-1}(U)\) and \(\rho _V:V \times {\mathbb {F}}^k \longrightarrow \rho ^{-1}(V)\) are local trivializations around a point \(b_0\in U\cap V\), then given \(b\in U\cap V\) the composition

figure a

defines an element \(\rho _{UV}(b) \) in the general linear group \( {\mathsf {GL}}_k({\mathbb {F}})\). The resulting function \(\rho _{UV} :U \cap V \longrightarrow {\mathsf {GL}}_k({\mathbb {F}})\) is a continuous map, uniquely determined by

$$\begin{aligned} \rho _U^{-1}\circ \rho _V(b,{\mathbf {v}}) = (b, \rho _{UV}(b)({\mathbf {v}}))\quad \text{ for } \text{ every }\, (b,{\mathbf {v}}) \in (U\cap V)\times {\mathbb {F}}^k. \end{aligned}$$

This characterization of \(\rho _{UV}\) readily implies that the set \(\{\rho _{UV}\}\) satisfies:

(4)

Each \(\rho _{UV} :U\cap V\longrightarrow {\mathsf {GL}}_k({\mathbb {F}})\) is called a transition function for the bundle \(\zeta \), and the collection \(\{\rho _{UV}\}\) is the system of transition functions associated to the system of local trivializations \(\{\rho _U\}\). More importantly, this construction can be reversed: If \({\mathcal {U}} = \{U_r\}\) is a covering of B and

$$\begin{aligned} \omega = \big \{\omega _{rt}: U_r \cap U_t \longrightarrow {\mathsf {GL}}_k({\mathbb {F}})\big \} \end{aligned}$$

is a collection of continuous functions satisfying the cocycle condition, then one can form the quotient space

$$\begin{aligned} E(\omega ) = \Big (\bigcup _r (U_r\times \{r\} \times {\mathbb {F}}^k)\Big )\big /\sim \end{aligned}$$

where \((b,r,{\mathbf {v}}) \sim (b,t,\omega _{rt}(b)^{-1}({\mathbf {v}}))\) for \(b\in U_r \cap U_t\). Moreover, if

$$\begin{aligned} p_\omega :E(\omega ) \longrightarrow B \end{aligned}$$

is projection onto the first coordinate, then \(\zeta _\omega = (E(\omega ), B, p_\omega )\) is an \({\mathbb {F}}\)-vector bundle of rank k over B. It follows that each composition

figure b

is a local trivialization for \(\zeta _\omega \), and that \(\omega \) is the associated system of transition functions. We say that \(\zeta _\omega \) is the vector bundle induced by \(({\mathcal {U}}, \omega )\).

2.2 (Pre)Sheaves and Their Čech Cohomology

For a more detailed introduction please refer to [28]. A presheaf \({\mathcal {F}}\) of abelian groups over a topological space B is a collection of abelian groups \({\mathcal {F}}(U)\), one for each open set \(U\subset B\), and group homomorphisms \(\eta ^{U}_{V}:{\mathcal {F}}(U) \longrightarrow {\mathcal {F}}(V)\) for each pair \(V\subset U\) of open subsets of B, called restrictions, so that:

  1. 1.

    \({\mathcal {F}}(\emptyset )\) is the group with one element,

  2. 2.

    \(\eta _U^U\) is the identity homomorphism,

  3. 3.

    \(\eta _W^U = \eta ^V_W \circ \eta ^U_V\) for every triple \(W\subset V \subset U\).

Furthermore, a presheaf \({\mathcal {F}}\) is said to be a sheaf if it satisfies the gluing axiom:

  1. 4.

    If \(U\subset B\) is open, \(\{U_j\}_{ j\in J}\) is an open covering of U and there are elements \(\{s_j \in {\mathcal {F}}(U_j) : j\in J\}\) so that

    $$\begin{aligned} \eta ^{U_j}_{U_j \cap U_\ell }(s_j) = \eta _{U_j\cap U_\ell }^{U_\ell }(s_\ell ) \end{aligned}$$

    for every non-empty intersection \(U_j \cap U_\ell \ne \emptyset \), with \(j,\ell \in J\), then there exists a unique \(s\in {\mathcal {F}}(U)\) so that \(\eta ^U_{U_j}(s) = s_j\) for every \(j\in J\).

Examples

  • Presheaves of constant functions. Let G be an abelian group and for each open set \(\emptyset \ne U \subset B\), let \({\mathcal {P}}_G(U)\) be the set of constant functions from U to G. Let \({\mathcal {P}}_G(\emptyset ) = \{0\} \subset G\). If for \(V\subset U \subset B\) we let \(\eta _V^U :{\mathcal {P}}_G(U) \longrightarrow {\mathcal {P}}_G(V)\) be the restriction map \(f\mapsto f|_V\), then \({\mathcal {P}}_G\) is a presheaf over B. It is not in general a sheaf since it does not always satisfy the gluing axiom: for if \(U,V \subset B\) are disjoint nonempty open sets and \(|G| \ge 2\), then \(f \in {\mathcal {P}}_G(U)\) and \(g \in {\mathcal {P}}_G(V)\) taking distinct values cannot be realized as restrictions of a constant function \(h:U\cup V \longrightarrow G\).

  • Sheaves of locally constant functions. Let G be an abelian group and for each open set \(\emptyset \ne U \subset B\), let \(\underline{G}(U)\) be the set of functions \(f:U \longrightarrow G\) for which there exists an open set \(\emptyset \ne V \subset U\) so that the restriction \(f|_V :V \longrightarrow G\) is a constant function. Define \(\underline{G}(\emptyset )\) and \(\eta _V^U\) as in the presheaf of constant functions. One can check that \(\underline{G}\) is a sheaf over B.

  • Sheaves of continuous functions. Let G be a topological abelian group and for each open set \(\emptyset \ne U \subset B\), let \({\mathscr {C}}_G(U)\) be the set of continuous functions from U to G. If \({\mathscr {C}}_G(\emptyset )\) and \(\eta _V^U\) are as above, then \({\mathscr {C}}_G\) is a sheaf over B. Moreover, \(\underline{G}\) is a subsheaf of \({\mathscr {C}}_G\) in that \(\underline{G}(U) \subset {\mathscr {C}}_G(U)\) for every open set \(U\subset B\). Similarly, if R is a commutative topological ring with unity, and \(R^\times \) denotes its (multiplicative) group of units, then \({\mathscr {C}}^\times _R := {\mathscr {C}}_{R^\times }\) is also a sheaf over B.

Let \(n\ge 0\) be an integer, \({\mathcal {U}} = \{U_j\}\) an open cover of B and let \({\mathcal {F}}\) be a presheaf over B. The group of Čech n-cochains is defined as

$$\begin{aligned} \check{C}^n({\mathcal {U}}; {\mathcal {F}})\;\; = \prod _{(j_0,\ldots , j_n)} {\mathcal {F}}(U_{j_0} \cap \cdots \cap U_ {j_n}). \end{aligned}$$

Elements of \(\check{C}^n({\mathcal {U}}; {\mathcal {F}})\) are denoted \( \{f_{j_0,\ldots , j_n}\}\), for \(f_{j_0,\ldots ,j_n} \in {\mathcal {F}}(U_{j_0} \cap \cdots \cap U_{j_n})\). If \(0 \le r \le n\) let \((j_0,\ldots , {\widehat{j}}_r, \ldots , j_n)\) denote the n-tuple obtained by removing \(j_r\) from the \((n+1)\)-tuple \((j_0,\ldots , j_n)\), let \(U_{j_0, \ldots , j_n} = U_{j_0} \cap \cdots \cap U_{j_n}\) and let

$$\begin{aligned} \eta _{j_r} :{\mathcal {F}}\bigl (U_{j_0,\ldots , {\widehat{j}}_r , \ldots , j_n}\bigr ) \longrightarrow {\mathcal {F}}\bigl (U_{j_0,\ldots , j_n}\bigr ) \end{aligned}$$

be the associated restriction homomorphism. The coboundary homomorphism

$$\begin{aligned} \delta ^n :\check{C}^n({\mathcal {U}};{\mathcal {F}}) \longrightarrow \check{C}^{n+1}({\mathcal {U}}; {\mathcal {F}}) \end{aligned}$$

is given by \(\delta ^{n}(\{f_{j_0,\ldots , j_n}\}) = \{g_{k_0,\ldots , k_{n+1}}\}\) where

$$\begin{aligned} g_{k_0,\ldots , k_{n+1}} = \sum _{r=0}^{n+1} (-1)^r \eta _{k_r}\bigl (f_{k_0,\ldots , {\widehat{k}}_r,\ldots , k_{n+1}}\bigr ). \end{aligned}$$

One can check that \(\delta ^{n+1} \circ \delta ^n = 0\). The group of Čech n-cocycles \(\check{Z}^n({\mathcal {U}}; {\mathcal {F}})\) is the kernel of \(\delta ^n\), the group of Čech n-boundaries \(\check{B}^n({\mathcal {U}};{\mathcal {F}}) \subset \check{Z}^n({\mathcal {U}};{\mathcal {F}})\) is the image of \(\delta ^{n-1}\), and the nth Čech cohomology group of \({\mathcal {F}}\) with respect to the covering \({\mathcal {U}}\) is given by the quotient of abelian groups

$$\begin{aligned} \check{H}^n({\mathcal {U}};{\mathcal {F}}) = \check{Z}^n({\mathcal {U}};{\mathcal {F}}) / \check{B}^n({\mathcal {U}};{\mathcal {F}}). \end{aligned}$$

2.3 Persistent Cohomology of Filtered Complexes

Given a nonempty set S, an abstract simplicial complex K with vertices in S is a set

$$\begin{aligned} K \subset \{ \sigma \subset S : \sigma \text{ is } \text{ finite } \text{ and } \sigma \ne \emptyset \} \end{aligned}$$

for which \(\emptyset \ne \tau \subset \sigma \in K\) always implies \(\tau \in K\). An element \(\sigma \in K\) with cardinality \(|\sigma | = n+1\) is called an n-simplex of K, and a 0-simplex is referred to as a vertex.

Examples

  • The Rips Complex. Let \(({\mathbb {M}}, {\mathbf {d}})\) be a metric space, let \(X\subset {\mathbb {M}}\) and \(\epsilon \ge 0\). The Rips complex at scale \(\epsilon \) and vertex set X, denoted \(R_\epsilon (X)\), is the collection of finite nonempty subsets of X with diameter less than \(2\epsilon \).

  • The Čech Complex. With \({\mathbb {M}}, {\mathbf {d}}, X, \epsilon \) as above, the (ambient) Čech complex at scale \(\epsilon \) and vertices in X is the set

    $$\begin{aligned} \check{C}_\epsilon (X) = \big \{ \{s_0,\ldots , s_n\} \subset X : B_{\epsilon }(s_0) \cap \cdots \cap B_{\epsilon }(s_n) \ne \emptyset , \, n \in {\mathbb {Z}}_{\ge 0} \big \} \end{aligned}$$

    where \(B_\epsilon (s)\) denotes the open ball in \({\mathbb {M}}\) of radius \(\epsilon \) centered at \(s\in X\). It can be readily checked that \(\check{C}_{\epsilon }(X) \subset R_{\epsilon }(X) \subset \check{C}_{2\epsilon }(X)\) for all \(\epsilon > 0\).

For each \(n \in {\mathbb {Z}}_{\ge 0}\) let \(K^{(n)}\) be the set of n-simplices of K. If G is an abelian group, the set of functions \(\varphi :K^{(n)} \longrightarrow G\) which evaluate to zero in all but finitely many n-simplices form an abelian group denoted \( C^n(K;G) \), and referred to as the group of n-cochains of K with coefficients in G. The coboundary of an n-cochain \(\varphi \in C^n(K;G)\) is the element \(\delta ^n(\varphi ) \in C^{n+1}(K;G)\) which operates on each \((n{+}1)\)-simplex \(\sigma = \{s_0,\ldots , s_{n+1}\}\) as

$$\begin{aligned} \delta ^n(\varphi )(\sigma ) = \sum _{j=0}^{n+1} (-1)^j\varphi \big (\sigma \smallsetminus \{s_j\}\big ). \end{aligned}$$

This defines a homomorphism \(\delta ^n :C^n(K;G) \longrightarrow C^{n+1}(K;G)\) that, as can be checked, satisfies \(\delta ^{n+1}\circ \delta ^n = 0\) for all \(n\in {\mathbb {Z}}_{\ge 0}\). The group of n-coboundaries \(B^n(K;G) = \mathrm{Img} (\delta ^{n-1})\) is therefore a subgroup of \(Z^n(K;G)= \mathrm{Ker}(\delta ^n)\), the group of n-cocyles, and the nth cohomology group of K with coefficients in G is defined as the quotient

$$\begin{aligned} H^n(K;G) = Z^n(K;G)/ B^n(K;G). \end{aligned}$$

Notice that if \({\mathbb {F}}\) is a field, then \(H^n(K;{\mathbb {F}})\) is in fact a vector space over \({\mathbb {F}}\).

A filtered simplicial complex is a collection \({\mathcal {K}}= \{K_\epsilon \}_{\epsilon \ge 0}\) of abstract simplicial complexes so that \(K_0 = \emptyset \) and \(K_\epsilon \subset K_{\epsilon '}\) whenever \(\epsilon \le \epsilon '\). If \(0 = \epsilon _0< \epsilon _1 < \cdots \) is a discretization of \({\mathbb {R}}_{\ge 0}\), then for each field \({\mathbb {K}}\) and \(n \in {\mathbb {Z}}_{\ge 0}\) one obtains the diagram of \({\mathbb {F}}\)-vector spaces and linear transformations

figure c

where \(T_{r} :H^n(K_{\epsilon _{r}} ; {\mathbb {F}}) \longrightarrow H^n(K_{\epsilon _{r-1}} ; {\mathbb {F}})\) is given by

$$\begin{aligned} T_{r}([\varphi ]) = \bigl [ \varphi \big |_{K^{(n)}_{\epsilon _{r-1}}} \bigr ]. \end{aligned}$$

If each \(H^n(K_{\epsilon _r}; {\mathbb {F}})\) is finite dimensional and for all r large enough \(T_r\) is an isomorphism, we say that (5) is of finite type.

The Basis Lemma [17, Sect. 3.4] implies that when (5) is of finite type one can choose a basis \(V^r = \{{\mathbf {v}}^r_1,\ldots , {\mathbf {v}}^r_{d_r}\}\) for each \(H^n(K_{\epsilon _r};{\mathbb {F}})\) so that the following compatibility condition holds: \(T_{r}(V^r) \subset V^{r-1} \cup \{{\mathbf {0}}\}\) for all \(r\in {\mathbb {Z}}_{\ge 0}\), and if \(T_r({\mathbf {v}}_\ell ^r) = T_r({\mathbf {v}}_m^r) \ne {\mathbf {0}}\), then \(\ell = m \). The set

$$\begin{aligned} V = \bigcup \limits _{r\in {\mathbb {Z}}_{\ge 0 }} V^r \end{aligned}$$

can be endowed with a partial order \(\preceq \) where \({\mathbf {v}}^j_m \preceq {\mathbf {v}}^r_\ell \) if and only if \(r\ge j\) and \({\mathbf {v}}_m^j=T_{j+1}\circ \cdots \circ T_r({\mathbf {v}}^r_\ell ) \). The maximal chains in \((V,\preceq )\) are pairwise disjoint, and hence represent independent cohomological features of the complexes \(K_\epsilon \) which are stable with respect to changes in \(\epsilon \). These are called persistent cohomology classes. A maximal chain of finite length

$$\begin{aligned} {\mathbf {v}}_m^j \preceq {\mathbf {v}}_k^{j+1} \preceq \cdots \preceq {\mathbf {v}}_\ell ^r \end{aligned}$$

yields the interval \([\epsilon _{j}, \epsilon _{r}]\), while an infinite maximal chain \({\mathbf {v}}_m^j \preceq {\mathbf {v}}_k^{j+1} \preceq \cdots \) yields the interval \([\epsilon _{j} ,\infty )\). This is meant to signify that there is a class which starts (is born) at the cohomology group corresponding to the right end-point of the interval, here \(\epsilon _r\) or \(\infty \). This class, in turn, is mapped to zero (it dies) leaving the cohomology group for the left end-point, here \(\epsilon _j\), but not before. The multi-set of all such intervals (as several chains might yield the same interval) is independent of the choice of compatible bases \(V^r\), and can be visualized as a barcode (Fig. 5).

Fig. 5
figure 5

Example of a barcode

Details on the computation of persistent cohomology, and its advantages over persistent homology, can be found in [12].

3 Explicit Classifying Maps

The goal of this section is to derive (2), which is in fact a specialization of the proof of Theorem 2.1 to the case of line bundles over metric spaces with finite trivializing covers. When a metric is given, the partition of unity involved in the argument can be described explicitly in terms of bump functions supported on metric balls. Moreover, the local trivializations used in the proof can be replaced by transition functions which—as we will see in Sects. 4 and 7—can be calculated in a robust multiscale manner from the persistent cohomology of an appropriate sparse filtration. From this point on, all topological spaces are assumed to be paracompact and Hausdorff.

3.1 Classifying Maps in Terms of Local Trivializations

Let us sketch the proof of existence in Theorem 2.1 when B has a finite trivializing cover. Starting with local trivializations

figure d

for the vector bundle \(\zeta = (E,B,p)\), let \(\mu _r :p^{-1}(U_r) \longrightarrow {\mathbb {F}}^k\) be \(\mu _r(\rho _r(b,{\mathbf {v}})) = {\mathbf {v}}\) for all \((b,{\mathbf {v}}) \in U_r \times {\mathbb {F}}^k\).

Definition 3.1

A collection of continuous maps \(\varphi _r :U_r \longrightarrow {\mathbb {R}}_{\ge 0}\) is called a partition of unity dominated by \({\mathcal {U}} = \{U_r\}\) if

$$\begin{aligned} \sum _{r} \varphi _r = 1 \quad \text{ and } \quad {\mathsf {support}}(\varphi _r) \subset {\mathsf {closure}}(U_r). \end{aligned}$$

Notice that this notion differs from the usual partition of unity subordinated to a cover in that supports need not be contained in the open sets. However, this is enough for our purposes. Notice that since for paracompact spaces there is always a partition of unity subordinated to a given cover, the same is true in the dominated case.

Let \(\psi :[0,1] \longrightarrow [0,1]\) be any homeomorphism so that \(\psi (0) = 0\) and \(\psi (1)=1\). If \(\{\varphi _r\}\) is a partition of unity dominated by the trivializing cover from (6) and we let \(\psi _r = \psi \circ \varphi _r\), then each \(\mu _r :p^{-1}(U_r) \longrightarrow {\mathbb {F}}^k\) yields a fiberwise linear map \({\widehat{\mu }}_r :E \longrightarrow {\mathbb {F}}^k\) given by

$$\begin{aligned}{\widehat{\mu }}_r(e) = \left\{ \begin{array}{ll} \psi _r(p(e))\cdot \mu _r(e) &{}\quad \hbox { if }\, p(e)\in U_r,\\ \\ {\mathbf {0}} &{}\quad \hbox { if }\, p(e)\notin U_r. \end{array} \right. \end{aligned}$$

Thus one has a continuous map

$$\begin{aligned} \begin{array}{llll} {\widehat{\mu }} :&{}E&{}\longrightarrow &{} {\mathbb {F}}^k \oplus \cdots \oplus {\mathbb {F}}^k \\ &{}e&{} \mapsto &{} [{\widehat{\mu }}_0(e),\ldots , {\widehat{\mu }}_n(e)] \end{array} \end{aligned}$$

which, as can be checked, is linear and injective on each fiber. It follows from [27, Lem. 3.1] that the induced continuous map

$$\begin{aligned} \begin{array}{llll} f_\zeta :&{}B&{} \longrightarrow &{} {\mathsf {Gr}}_k\big ({\mathbb {F}}^{k(n+1)}\big ) \\ &{}b&{} \mapsto &{} {\widehat{\mu }}(p^{-1}(b)) \end{array} \end{aligned}$$

satisfies \(f_\zeta ^*(\gamma ^k_{m}) \cong \zeta \), if \(m = k(n+1)\). This completes the sketch of the proof; let us now describe \(f_\zeta \) more explicitly in terms of transition functions. The main reason for this change is that transition functions can be determined via a cohomology computation.

3.2 Classifying Maps from Transition Functions

Fix \(b\in B\) and let \(0 \le j\le n\) be so that \(b \in U_j\). If \(\{{\mathbf {v}}_1,\ldots , {\mathbf {v}}_k\}\) is a basis for \({\mathbb {F}}^k\), then \( \{ \rho _j ( b, {\mathbf {v}}_s ) : s=1,\ldots , k \} \) is a basis for \(p^{-1}(b)\) and therefore

$$\begin{aligned} f_\zeta (b) = {\mathsf {Span}}_{\mathbb {F}}\, \bigl \{ {\widehat{\mu }}(\rho _j(b,{\mathbf {v}}_s)):s=1,\ldots , k \bigr \}, \end{aligned}$$
(7)

where

$$\begin{aligned} {\widehat{\mu }}(\rho _j(b,{\mathbf {v}}_s)) = \big [ {\widehat{\mu }}_0(\rho _j(b,{\mathbf {v}}_s)),\ldots , {\widehat{\mu }}_n(\rho _j(b,{\mathbf {v}}_s))\big ] \in {\mathbb {F}}^{k(n+1)}.\end{aligned}$$

If \(\{\omega _{rt}: U_r \cap U_t \longrightarrow {\mathsf {GL}}_k({\mathbb {F}})\}\) is the collection of transition functions for \(\zeta \) associated to the system of local trivializations \(\{\rho _r\}\), then whenever \(U_r \cap U_t \ne \emptyset \) we have the commutative diagram

figure e

Let \(0\le l \le n\). If \(b\in U_j \smallsetminus U_l\), then \({\widehat{\mu }}_l(\rho _j(b,{\mathbf {v}}_s)) =0\); else \(b \in U_j\cap U_l\) and

$$\begin{aligned} {\widehat{\mu }}_l\big (\rho _j(b,{\mathbf {v}}_s)\big )= & {} {\widehat{\mu }}_l\big (\rho _l\big (b, \omega _{jl}(b)^{-1}({\mathbf {v}}_s)\big )\big ) \\= & {} \psi _l(b)\cdot \omega _{lj}(b)({\mathbf {v}}_s). \end{aligned}$$

Putting this calculation together with (7), it follows that for \(b\in U_j\)

$$\begin{aligned} f_\zeta (b) = {\mathsf {Span}}_{\mathbb {F}}\big \{ \big [\psi _0(b)\cdot \omega _{0j}(b)({\mathbf {v}}_s)\,, \ldots ,\,\psi _n(b)\cdot \omega _{nj}(b)({\mathbf {v}}_s) \big ]: s =1,\ldots , k\big \}. \end{aligned}$$
(8)

3.3 The Case of Line Bundles

If \(k=1\) we can take \({\mathbf {v}}_1 = \mathbf 1 \in {\mathbb {F}}\), and abuse notation by writing \(\omega _{rt}(b) \in {\mathbb {F}}^\times \) instead of \(\omega _{rt}(b)({\mathbf {1}})\). Moreover, in this case we have \({\mathsf {Gr}}_k({\mathbb {F}}^{k(n+1)}) = {\mathbb {F}}{\mathbf {P}}^n\), and if we use homogeneous coordinates and \(\psi (x) = \sqrt{x}\), then \(f_\zeta :B \longrightarrow {\mathbb {F}}{\mathbf {P}}^n\) can be expressed locally (i.e. on each \(U_j\)) as

$$\begin{aligned} f_\zeta (b) = \big [ \omega _{0j}(b)\cdot \sqrt{\varphi _0(b)} : \cdots : \omega _{nj}(b)\cdot \sqrt{\varphi _n(b)} \big ], \;\;\;\; b\in U_j .\end{aligned}$$

The choice \(\psi (x) = \sqrt{x}\) is so that when the transition functions \(\omega _{rt}\) are unitary, i.e. \(|\omega _{rt}(b)| =1 \), then the formula above without homogeneous coordinates produces a representative of \(f_\zeta (b)\) on the unit sphere of \({\mathbb {F}}^{n+1}\). We summarize the results thus far in the following theorem:

Theorem 3.2

Let B be a topological space and let \({\mathcal {U}} = \{U_r\}_{r=0}^n\) be an open cover. If \(\{\varphi _r\}\) is a partition of unity dominated by \({\mathcal {U}}\), \({\mathbb {F}}\) is \({\mathbb {R}}\) or \({\mathbb {C}}\), and

$$\begin{aligned}\omega = \big \{ \omega _{rt} : U_r \cap U_t \longrightarrow {\mathbb {F}}^\times \big \} \end{aligned}$$

is a collection of continuous maps satisfying the cocycle condition (4), then the map \( f_\omega :B \longrightarrow {\mathbb {F}}{\mathbf {P}}^n \) given in homogenous coordinates by

$$\begin{aligned} f_\omega (b) = \big [ \omega _{0j}(b)\cdot \sqrt{\varphi _0(b)}: \cdots : \omega _{nj}(b)\cdot \sqrt{\varphi _n(b)} \big ], \;\;\;\;\; b\in U_j, \end{aligned}$$
(9)

is well-defined and classifies the \({\mathbb {F}}\)-line bundle \(\zeta _\omega \) induced by \(({\mathcal {U}}, \omega )\).

3.4 Line Bundles over Metric Spaces

If B comes equipped with a metric \({\mathbf {d}}\), then (9) can be further specialized to a covering via open balls, and a dominated partition of unity constructed from bump functions supported on the closure of each ball. Indeed, let

$$\begin{aligned} B_{\epsilon _r}(\ell _r) = \big \{b\in B : {\mathbf {d}}(b,\ell _r) < \epsilon _r\big \},\quad r = 0,\ldots , n, \end{aligned}$$

for some collection \(\{\ell _0,\ldots , \ell _n\} \subset B\) and radii \(\epsilon _r > 0\).

Proposition 3.3

Let \((B,{\mathbf {d}})\) be a metric space and let \({\mathcal {B}} = \{ B_{\epsilon _r}(\ell _r)\}_{r= 0 }^n\) be an open cover. If \(\phi :{\mathbb {R}}\longrightarrow {\mathbb {R}}_{\ge 0}\) is a continuous map so that \(\phi ^{-1}(0) = {\mathbb {R}}_{\le 0}\), and \(\lambda _0, \ldots , \lambda _n \in {\mathbb {R}}_{> 0}\) is a set of weights, then

$$\begin{aligned} \varphi _r (b) = \tfrac{ \lambda _r \cdot \phi \big ( 1 - \tfrac{{\mathbf {d}}(b,\ell _r)}{\epsilon _r}\big ) }{ \sum \limits _{t=0}^n \lambda _t\cdot \phi \big (1 - \tfrac{{\mathbf {d}}(b,\ell _t)}{\epsilon _t}\big ) } , \;\;\; r = 0,\ldots , n, \end{aligned}$$

is a partition of unity for B dominated by \({\mathcal {B}}\).

Due to the shape of its graph, the map \( b \mapsto \lambda _r \cdot \phi \big (1 - \frac{{\mathbf {d}}(b,\ell _r)}{\epsilon _r}\big )\) is often referred to as a bump function supported on \(\overline{B_r}\). The height of the bump is controlled by the weight \(\lambda _r\), while its overall shape is captured by the function \(\phi \). Of course one can choose different functions \(\phi _r\) on each ball, for instance to capture local density if B comes equipped with a measure. Some examples of bump-shapes are:

  • Triangular. The positive part of \(x \in {\mathbb {R}}\) is defined as \(\left| x \right| _{+} = \max \{x, 0\}\), and \(b\mapsto \lambda \cdot \left| 1 - \frac{{\mathbf {d}}(b,\ell )}{\epsilon } \right| _{+}\) is the associated triangular bump supported on \(\overline{B_\epsilon (\ell )}\).

  • Polynomial. The polynomial bump with exponent \(p>0\) is induced by the function \(\phi (x) = \left| x \right| _{+}^p\). The triangular bump is recovered when \(p =1\), while \(p=2\) yields the quadratic bump.

  • Gaussian. The Gaussian bump is induced by the funcion

    $$\begin{aligned} \phi (x) = \left\{ \begin{array}{ll} e^{-1/x^2} &{}\quad \hbox {if } x > 0, \\ 0 &{}\quad \hbox {else}. \end{array} \right. \end{aligned}$$
  • Logarithmic. It is the one associated to \(\phi (x) = \log (1 + \left| x \right| _{+})\).

Figure 6 shows some of these bump functions, with weight \(\lambda =1\), for \(B_1(0)\).

Fig. 6
figure 6

Examples of bump functions supported on \(\overline{B_1(0)} \subset {\mathbb {R}}\). Please refer to an online version for colors

Choosing \(\phi (x) = \left| x \right| _{+}^2\) and the weights as \(\lambda _r = \epsilon _r^2\) simplifies Theorem 3.2 to:

Corollary 3.4

Let \((B,{\mathbf {d}})\) be a metric space and \({\mathcal {B}} = \{B_r = B_{\epsilon _r}(\ell _r)\}_{r=0}^n\) a covering. If \({\mathbb {F}}\) is \( {\mathbb {R}}\) or \( {\mathbb {C}}\) and \(\omega = \{\omega _{rt} : B_r \cap B_t \longrightarrow {\mathbb {F}}^\times \}\) are continuous maps satisfying the cocycle condition, then \(f_\omega :B \longrightarrow {\mathbb {F}}{\mathbf {P}}^n\) given in homogeneous coordinates by

$$\begin{aligned} f_\omega (b) = \Big [ \omega _{0j}(b)\cdot \left| \epsilon _0 - {\mathbf {d}}(b,\ell _0) \right| _{+}: \cdots : \omega _{nj}(b)\cdot \left| \epsilon _n - {\mathbf {d}}(b,\ell _n) \right| _{+} \Big ] , \;\;\; b\in B_j, \end{aligned}$$

is well-defined and classifies the \({\mathbb {F}}\)-line bundle \(\zeta _\omega \) induced by \(({\mathcal {B}}, \omega )\).

3.5 Geometric Interpretation

Let us clarify (9) for the case of constant transition functions and \({\mathbb {F}}= {\mathbb {R}}\). If \({\mathcal {U}} = \{U_0,\ldots , U_n\}\) is a cover of B, then the nerve of \({\mathcal {U}}\)—denoted \({\mathcal {N}}({\mathcal {U}})\)—is the abstract simplicial complex with one vertex for each open set \(U_r\in {\mathcal {U}}\), and a simplex \(\{r_0,\ldots , r_k\}\) for each collection \(U_{r_0},\ldots , U_{r_k} \in {\mathcal {U}}\) such that

$$\begin{aligned} U_{r_0} \cap \cdots \cap U_{r_k} \ne \emptyset . \end{aligned}$$

Given a geometric realization \(|{\mathcal {N}}({\mathcal {U}})| \subset {\mathbb {R}}^{2n+1}\), let \({\mathbf {v}}_r \in |{\mathcal {N}}({\mathcal {U}})|\) be the point corresponding to the vertex \(r\in {\mathcal {N}}({\mathcal {U}})\). Each \({\mathbf {x}}\in |{\mathcal {N}}({\mathcal {U}})|\) is then uniquely determined by (and uniquely determines) its barycentric coordinates: a sequence \(\{x_r\}\) of real numbers between 0 and 1, one for each open set \(U_r\in {\mathcal {U}}\), so that

$$\begin{aligned} \sum \limits _r x_r = 1 \;\;\;\; \text{ and } \;\;\;\; \sum _{r} x_r{\mathbf {v}}_r = {\mathbf {x}}. \end{aligned}$$

To see this, notice that given a non-vertex \({\mathbf {x}}\in |{\mathcal {N}}({\mathcal {U}})|\) there exists a unique maximal geometric simplex \(\sigma \) of \(|{\mathcal {N}}({\mathcal {U}})|\) so that \({\mathbf {x}}\) is in the interior of \(\sigma \). If \({\mathbf {v}}_{r_0}, \ldots , {\mathbf {v}}_{r_k} \in |{\mathcal {N}}({\mathcal {U}})|\) are the vertices of \(\sigma \), then \({\mathbf {x}}\) can be expressed uniquely as a convex combination of \({\mathbf {v}}_{r_0},\ldots , {\mathbf {v}}_{r_k}\) which determines \(x_{r_0}, \ldots , x_{r_k}\). If \(r \ne r_0,\ldots , r_k\), then we let \(x_r = 0\).

A partition of unity \(\{\varphi _r\}\) dominated by \({\mathcal {U}}\) induces a continuous map

$$\begin{aligned} \begin{array}{llll} \varphi :&{} B &{}\longrightarrow &{}|{\mathcal {N}}({\mathcal {U}})| \\ &{} b &{} \mapsto &{} \sum \limits _r \varphi _r(b){\mathbf {v}}_r. \end{array} \end{aligned}$$
(10)

That is, \(\varphi \) sends b to the point \(\varphi (b)\) with barycentric coordinates \(\varphi _r(b)\). Moreover, if \(\big \{\omega _{rt} : U_r \cap U_t \longrightarrow \{-1,1\} \big \}\) is a collection of constant functions satisfying the cocycle condition, then the associated classifying map \(f_\omega :B \longrightarrow {\mathbb {R}}{\mathbf {P}}^n\) from Theorem 3.2 can be decomposed as

figure f

where \(F_\omega :|{\mathcal {N}}({\mathcal {U}})| \longrightarrow {\mathbb {R}}{\mathbf {P}}^n\), in barycentric coordinates, is given on the open star of a vertex \({\mathbf {v}}_j \in |{\mathcal {N}}({\mathcal {U}})|\) as

$$\begin{aligned} F_\omega (x_0,\ldots , x_n) = \Big [\omega _{0j}\sqrt{x_0} : \cdots : \omega _{nj}\sqrt{x_n}\Big ]. \end{aligned}$$

Example Let \( B = S^1\), the unit circle, and let \({\mathcal {U}} = \{U_0, U_1, U_2\}\) be the open covering depicted in Fig. 7 (left).

Fig. 7
figure 7

An open covering of the circle and the resulting nerve complex

Define \(\omega _{rt} =1\) for \(r,t=0,1,2\); let \(\omega '_{02} = \omega '_{20} = -1\) and let \(\omega '_{rt} = 1\) for all \((r,t) \ne (0,2), (2,0)\). Let \((x_0,x_1,x_2)\) denote the barycentric coordinates of a point in \(|{\mathcal {N}}({\mathcal {U}})|\). For instance, the vertex labeled as 0 has coordinates (1, 0, 0) and the midpoint of the edge \(\{0,1\}\) has coordinates (1 / 2, 1 / 2, 0). Then

$$\begin{aligned} F_\omega (x_0,x_1,x_2) = \big [\sqrt{x_0} : \sqrt{x_1} : \sqrt{x_2}\big ] \end{aligned}$$

and for each \(0 \le x \le 1\)

$$\begin{aligned} F_{\omega '}(x, 1 - x,0)= & {} \big [\sqrt{x}: \sqrt{1 - x}: 0\big ], \\ F_{\omega '}(x,0,1-x)= & {} \big [\sqrt{x}: 0 : - \sqrt{1-x}\big ], \\ F_{\omega '}(0,x,1-x)= & {} \big [0:\sqrt{x}: \sqrt{1-x}\big ]. \end{aligned}$$

We show in Fig. 8 how \(F_\omega \) and \(F_{\omega '}\) map \(|{\mathcal {N}}({\mathcal {U}})|\) to \({\mathbb {R}}{\mathbf {P}}^2 = S^2 /({\mathbf {x}}\sim - {\mathbf {x}})\).

Fig. 8
figure 8

Image of \(F_\omega \) (left) and \(F_{\omega '}\) (right) in \({\mathbb {R}}{\mathbf {P}}^2 = S^2/({\mathbf {u}}\sim - {\mathbf {u}})\)

If \({\mathbf {d}}\) is the geodesic distance on \(S^1\), then each arc \(U_r\) is an open ball \(B_{\epsilon _r}(\ell _r)\) for some \((\epsilon _r,\ell _r)\in {\mathbb {R}}^{+} \times S^1\). When \(\varphi :S^1 \longrightarrow |{\mathcal {N}}({\mathcal {U}})| \) is induced by the partition of unity from the triangular bumps \(\phi (x) = \left| x \right| _{+}\), then \(\varphi \) maps each arc \(\{\ell _r, \ell _t\}\) linearly onto the edge \(|\{r,t\}|\). It is not hard to see that the \({\mathbb {R}}\)-line bundle induced by \(\{\omega _{rt}\}\) is trivial, while the one induced by \(\{\omega '_{rt}\}\) is the nontrivial bundle on \(S^1\) having the Möbius band as total space. This is captured by \(f_\omega = F_\omega \circ \varphi :S^1 \longrightarrow {\mathbb {R}}{\mathbf {P}}^2\) being null-homotopic and \(f_{\omega '} = F_{\omega '} \circ \varphi \) representing the nontrivial element in the fundamental group \(\pi _{1}({\mathbb {R}}{\mathbf {P}}^2) \cong {\mathbb {Z}}/2\).

4 Transition Functions from Simplicial Cohomology

Let \({\mathcal {U}} = \{U_r\}\) be a cover for B. We have shown thus far that given a collection \(\omega = \{\omega _{rt}\}\) of continuous maps

$$\begin{aligned} \omega _{rt} :U_r \cap U_t \longrightarrow {\mathsf {GL}}_1({\mathbb {F}}) = {\mathbb {F}}^\times ,\;\; U_r \cap U_t \ne \emptyset , \end{aligned}$$

satisfying the cocycle condition, one can explicitly write down (given a dominated partition of unity) a classifying map \(f_\omega :B \longrightarrow {\mathbb {F}}{\mathbf {P}}^n\) for the associated \({\mathbb {F}}\)-line bundle \(\zeta _\omega \). What we will see next is that determining such transition functions can be reduced to a computation in simplicial cohomology.

4.1 Formulation in Terms of Sheaf Cohomology

If \({\mathscr {C}}_{\mathbb {F}}^\times \) denotes the sheaf of continuous \({\mathbb {F}}^\times \)-valued functions on B, then one has that \(\omega \in \check{C}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {F}}^\times )\). Moreover, since \(\omega \) satisfies the cocycle condition, then \(\omega \in \check{Z}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {F}}^\times )\), and hence we can consider the cohomology class \([\omega ] \in \check{H}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {F}}^\times )\). If \({\mathcal {V}}\) is another covering of B we say that \({\mathcal {V}}\) is a refinement of \({\mathcal {U}}\), denoted \({\mathcal {V}} \prec {\mathcal {U}}\), if for every \(V \in {\mathcal {V}}\) there exists \(U \in {\mathcal {U}}\) so that \(V\subset U\). A standard result [1, Ex. 6.2] is the following:

Lemma 4.1

If \(\omega , \omega ' \in \check{Z}^1({\mathcal {U}};{\mathscr {C}}_{{\mathbb {F}}}^{\times })\) are cohomologous, then \(\zeta _\omega \cong \zeta _{\omega ^{\prime }}\). Moreover, the function

$$\begin{aligned} \begin{array}{cccc} \check{H}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {F}}^\times ) &{}\longrightarrow &{}{\mathsf {Vect}}^1_{\mathbb {F}}(B)\\ {[}\,\omega \,] &{}\mapsto &{} [\,\zeta _\omega \,] \end{array} \end{aligned}$$

is an injective homomorphism, and natural with respect to refinements of \({\mathcal {U}}\).

Here natural means that if \(H^{\mathcal {U}}_{\mathcal {V}} :\check{H}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {F}}^\times ) \longrightarrow \check{H}^1({\mathcal {V}};{\mathscr {C}}_{\mathbb {F}}^\times )\) is the homomorphism induced by the refinement \({\mathcal {V}} \prec {\mathcal {U}}\) (see [28, Chap. IX, Lem. 3.10]), then the diagram

figure g

is commutative. Combining this with (3) yields

Corollary 4.2

Let \({\mathcal {U}}\) be an open covering of B. Then the function

$$\begin{aligned} \begin{array}{cccc} \Gamma _{{\mathcal {U}}}:&{}\check{H}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {F}}^\times )&{} \longrightarrow &{} [ B , {\mathbb {F}}{\mathbf {P}}^\infty ] \\ &{} [\omega ] &{} \mapsto &{} [f_\omega ] \end{array} \end{aligned}$$

is injective, and natural with respect to refinements of \({\mathcal {U}}\).

The sheaf cohomology group \(\check{H}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {F}}^\times )\) can be replaced, under suitable conditions, by simplicial cohomology groups: \(H^1({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}/2)\) when \({\mathbb {F}}= {\mathbb {R}}\), and \(H^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}})\) when \({\mathbb {F}}= {\mathbb {C}}\). We will not assume that \({\mathcal {U}}\) is a good cover (i.e. that each finite intersection \(U_{r_0} \cap \ldots \cap U_{r_k}\) is either empty or contractible), but rather will phrase the reduction theorems in terms of the relevant connectivity conditions. The construction is described next.

4.2 Reduction to Simplicial Cohomology

If \(\tau \in Z^1({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}/2)\), then for each \(U_r \cap U_t \ne \emptyset \) we have \(\tau (\{r ,t\}) = \tau _{rt}\in \{0,1\} = {\mathbb {Z}}/2\). Let \(\phi ^\tau = \{\phi ^\tau _{rt}\}\) be the collection of constant functions

$$\begin{aligned} \begin{array}{cccc} \phi _{rt}^\tau :&{} U_r \cap U_t &{} \longrightarrow &{} {\mathbb {R}}^\times \\ &{} y &{} \mapsto &{} (-1)^{\tau _{rt}}. \end{array} \end{aligned}$$

Therefore each \(\phi ^\tau _{rt}\) is continuous, so \(\phi ^\tau \in \check{C}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {R}}^\times )\), and since \(\tau \) is a cocycle it follows that \(\phi ^\tau \in \check{Z}^1({\mathcal {U}}; {\mathscr {C}}_{\mathbb {R}}^\times )\). Moreover, the association \(\tau \mapsto \phi ^\tau \) induces the homomorphism

$$\begin{aligned} \begin{array}{cccc} \Phi _{\mathcal {U}} :&{}H^1({\mathcal {N}}({\mathcal {U}}); {\mathbb {Z}}/2)&{} \longrightarrow &{}\check{H}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {R}}^\times )\\ &{} [\tau ] &{} \mapsto &{}[\phi ^\tau ] \end{array} \end{aligned}$$

which is well-defined and satisfies:

Proposition 4.3

$$\begin{aligned} \Phi _{\mathcal {U}}:H^1({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}/2) \longrightarrow \check{H}^1({\mathcal {U}};{\mathscr {C}}^\times _{\mathbb {R}}) \end{aligned}$$

is natural with respect to refinements. Moreover, if each \(U_r\) is connected, then \(\Phi _{\mathcal {U}}\) is injective.

Proof

Fix \(\tau \in Z^1({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}/2)\) and assume that there is a collection of continuous maps \(\{f_r : U_r \longrightarrow {\mathbb {R}}^\times \}\) for which \((-1)^{\tau _{rt}} = \frac{f_t}{f_r}\) on \(U_r \cap U_t\ne \emptyset \). If each element of \({\mathcal {U}}\) is connected, then the \(f_r\)’s have constat sign (either \(+1\) or \(-1\)) in their domains, and hence we can define \(\nu \in C^0({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}/2)\) as

$$\begin{aligned} \nu (\{r\}) = \frac{1 - {\mathsf {sign}}(f_r)}{2}. \end{aligned}$$

Therefore \( \tau (\{r,t\}) = \delta ^0(\nu )(\{r,t\}) \) and the result follows.\(\square \)

Define \({\mathbf {w}}_1^{\mathcal {U}}\) as the composition

figure h

Corollary 4.4

If each \(U_r\) is connected, then

$$\begin{aligned} {\mathbf {w}}_1^{\mathcal {U}}:H^1({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}/2) \longrightarrow [B, {\mathbb {R}}{\mathbf {P}}^\infty ] \end{aligned}$$

is injective and natural with respect to refinements.

Let us now address the complex case. Given \(\sigma \in Z^2({\mathcal {N}}({\mathcal {U}}); {\mathbb {Z}})\) let \(\psi ^\sigma = \{\psi ^\sigma _{rst}\}\) be the collection of constant functions

$$\begin{aligned} \begin{array}{cccc} \psi ^\sigma _{rst} :&{} U_r \cap U_s \cap U_t &{}\longrightarrow &{} {\mathbb {Z}}\\ &{}y&{} \mapsto &{} \sigma _{rst}. \end{array} \end{aligned}$$

Each \(\psi _{rst}^\sigma \) is locally constant and therefore \(\psi ^\sigma \in \check{Z}^2({\mathcal {U}}; \underline{{\mathbb {Z}}})\). It follows that the association \(\sigma \mapsto \psi ^\sigma \) induces a homomorphism

$$\begin{aligned} \begin{array}{cccc} \Psi _{\mathcal {U}} :&{}H^2 ({\mathcal {N}}({\mathcal {U}}); {\mathbb {Z}})&{} \longrightarrow &{} \check{H}^2({\mathcal {U}};\underline{{\mathbb {Z}}}) \\ &{} [\sigma ] &{} \mapsto &{} [\psi ^\sigma ] \end{array} \end{aligned}$$

which is well-defined and satisfies:

Proposition 4.5

$$\begin{aligned} \Psi _{\mathcal {U}}:H^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}) \longrightarrow \check{H}^2({\mathcal {U}};\underline{{\mathbb {Z}}}) \end{aligned}$$

is natural with respect to refinements. Moreover, if each \(U_r \cap U_t\) is either empty or connected, then \(\Psi _{\mathcal {U}}\) is injective.

Proof

The result is deduced from the following observation: if \(U_r \cap U_t\) is connected, then any function \(\mu _{rt} :U_r \cap U_t \longrightarrow {\mathbb {Z}}\) which is locally constant is in fact constant.\(\square \)

We will now link \(\check{H}^2({\mathcal {U}};\underline{{\mathbb {Z}}})\) and \(\check{H}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {C}}^\times )\) using the exponential sequence

figure i

which is given at the level of open sets \(U\in {\mathcal {U}}\) by

figure j

If \({\mathfrak {Im}}(\exp )\) denotes the image presheaf

figure k

then

figure l

is a short exact sequence of presheaves (i.e. exact for every open set), and hence we get a long exact sequence in Čech cohomology [35, Sect. 24]

figure m

Since \({\mathscr {C}}_{\mathbb {C}}\) admits partitions of unity (i.e. it is a fine sheaf), then

Lemma 4.6

\(\check{H}^k({\mathcal {U}};{\mathscr {C}}_{\mathbb {C}}) = 0\) for every \(k\ge 1\).

Hence \(\Delta :\check{H}^1({\mathcal {U}};{\mathfrak {Im}}(\exp )) \longrightarrow \check{H}^2({\mathcal {U}};\underline{{\mathbb {Z}}})\) is an isomorphism. Moreover,

Proposition 4.7

Let \(\{\varphi _t\}\) be a continuous partition of unity dominated by \({\mathcal {U}}\). If \(\eta = \{\eta _{rst}\} \in Z^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}})\), then

$$\begin{aligned} \omega _{rs} = \exp \Big ( 2\pi i \sum _{t} \varphi _t\cdot \eta _{rst} \Big ) , \;\;\; U_r \cap U_s \ne \emptyset , \end{aligned}$$

defines an element \(\omega = \{\omega _{rs}\} \in \check{C}^1({\mathcal {U}}; {\mathfrak {Im}}(\exp ))\). Moreover, \(\omega \) is a Čech cocycle, and the composition

figure n

satisfies \(\Delta ^{-1}\circ \Psi _{\mathcal {U}} ([\eta ] ) = [\omega ]\).

Proof

First we check that \(\omega \) is a Čech cocycle:

$$\begin{aligned} \omega _{rs}\cdot \omega _{st}= & {} \exp \Big (2\pi i \sum _{\ell } \varphi _\ell \cdot (\eta _{rs\ell } + \eta _{st \ell })\Big ) \\= & {} \exp \Big (2\pi i \sum _{\ell } \varphi _\ell \cdot (\eta _{rt\ell } + \eta _{rst})\Big ) \\= & {} \exp \Big (2\pi i \cdot \eta _{rst} + \sum _{\ell } \varphi _\ell \cdot \eta _{rt\ell } \Big ) \\= & {} \omega _{rt}. \end{aligned}$$

In order to see that \(\Delta ([\omega ]) = \Psi _{\mathcal {U}}([\eta ])\), we use the definition of the connecting homomorphism \(\Delta \). First, we let \(g = \{g_{rs}\} \in \check{C}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {C}})\) be the collection of functions

$$\begin{aligned} g_{rs}(b) = \sum _\ell \varphi _\ell (b)\cdot \eta _{rs\ell },\quad b\in U_r \cap U_s. \end{aligned}$$

It follows that \(\omega = \exp ^\# (g)\) and therefore \(\Delta ([\omega ]) = [\delta ^1(g)]\). The coboundary \(\delta ^1(g)\) can be computed as

$$\begin{aligned} \delta ^1(g)_{rst}= & {} g_{rs} - g_{rt} + g_{st} \\= & {} \sum _\ell \varphi _\ell \cdot (\eta _{rs\ell } - \eta _{rt\ell } + \eta _{st\ell }) \\= & {} \sum _\ell \varphi _\ell \cdot \eta _{rst} \\= & {} \eta _{rst} \end{aligned}$$

and therefore \( \Delta ([\omega ]) = \Psi _{\mathcal {U}}([\eta ])\). \(\square \)

Corollary 4.8

If each \(U_r \cap U_t\) is either empty or connected, then

$$\begin{aligned} \begin{array}{llll} \Delta ^{-1}\circ \Psi _{\mathcal {U}} :&{}H^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}})&{} \longrightarrow &{} \check{H}^1({\mathcal {U}};{\mathfrak {Im}}(\exp )) \\ &{} [\{\eta _{rst}\}] &{} \mapsto &{} [\{\omega _{rs}\}] \end{array} \end{aligned}$$

is injective, where

$$\begin{aligned} \omega _{rs} = \exp \Big ( 2\pi i \sum \limits _{t} \varphi _t \cdot \eta _{rst}\Big ). \end{aligned}$$

When going from \(\check{H}^1({\mathcal {U}};{\mathfrak {Im}}(\exp ))\) to \(\check{H}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {C}}^\times )\) one considers the inclusion of presheaves \(\jmath :{\mathfrak {Im}}(\exp ) \longrightarrow {\mathscr {C}}_{\mathbb {C}}^\times \) and its induced homomorphism in cohomology

$$\begin{aligned} \jmath _{\mathcal {U}} :\check{H}^1({\mathcal {U}};{\mathfrak {Im}}(\exp )) \longrightarrow \check{H}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {C}}^\times ). \end{aligned}$$

After taking direct limits over refinements of \({\mathcal {U}}\), the resulting homomorphism is an isomorphism [35, Prop. 7, Sect. 25]. That is, each element in \(\ker (\jmath _{\mathcal {U}})\) is also in the kernel of \(\check{H}^1({\mathcal {U}};{\mathfrak {Im}}(\exp )) \longrightarrow \check{H}^1({\mathcal {V}};{\mathfrak {Im}}(\exp ))\) for some refinement \({\mathcal {V}} \) of \({\mathcal {U}}\); and for every element in \(\check{H}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {C}}^\times )\) there exists a refinement \({\mathcal {W}}\) of \({\mathcal {U}}\) so that the image of said element via \(\check{H}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {C}}^\times ) \longrightarrow \check{H}^1({\mathcal {W}};{\mathscr {C}}_{\mathbb {C}}^\times ) \) is also in the image of \(\check{H}^1({\mathcal {W}};{\mathfrak {Im}}(\exp )) \longrightarrow \check{H}^1({\mathcal {W}};{\mathscr {C}}_{\mathbb {C}}^\times )\).

The situation is sometimes simpler. Recall that a topological space is said to be simply connected if it is path-connected and its fundamental group is trivial. In addition, it is said to be locally path-connected if each point has a path-connected open neighborhood.

Lemma 4.9

Let \({\mathcal {U}} = \{U_r\}\) be an open covering of B such that each \(U_r\) is locally path-connected and simply connected. Then

$$\begin{aligned} \jmath _{\mathcal {U}} :\check{H}^1({\mathcal {U}};{\mathfrak {Im}}(\exp )) \longrightarrow \check{H}^1({\mathcal {U}};{\mathscr {C}}^\times _{\mathbb {C}}) \end{aligned}$$

is injective.

Proof

Let \([\{\omega _{rt}\}] \in \check{H}^1({\mathcal {U}};{\mathfrak {Im}}(\exp ))\) be an element in the kernel of \(\jmath _{\mathcal {U}}\). Then there exists a collection of continuous maps

$$\begin{aligned} \nu _r :U_r \longrightarrow {\mathbb {C}}^\times \end{aligned}$$

so that \(\omega _{rt} = \frac{\nu _t}{\nu _r}\) on \(U_r \cap U_t \ne \emptyset \). If we let

$$\begin{aligned} \begin{array}{llll} p :&{}{\mathbb {R}}_{+} \times {\mathbb {R}}&{}\longrightarrow &{} {\mathbb {C}}^\times \\ &{}(\rho ,\theta )&{} \mapsto &{} \rho \cdot e^{2\pi i \cdot \theta } \end{array} \end{aligned}$$

then it follows that \(({\mathbb {R}}_{+}\times {\mathbb {R}}, p)\) is the universal cover for \({\mathbb {C}}^\times \). Moreover, since each \(U_r\) is locally path-connected and simply connected, then each \(\nu _r\) has a lift [19, Prop. 1.33]

$$\begin{aligned} \begin{array}{llll} {\widetilde{\nu }}_r :&{} U_r&{} \longrightarrow &{} {\mathbb {R}}_{+} \times {\mathbb {R}}\\ &{}b&{} \mapsto &{} \big (\rho _r(b), \theta _r (b)\big ). \end{array} \end{aligned}$$

That is \(p \circ {\widetilde{\nu }}_r(b )= \nu _r(b)\) for all \(b\in U_r\). Let \(\phi _r :U_r \longrightarrow {\mathbb {C}}\) be defined as

$$\begin{aligned} \phi _r(b) = \theta _r(b) - i\frac{\ln (\rho _r(b))}{2\pi }. \end{aligned}$$

It follows that \(\{\phi _r\} \in \check{C}^0({\mathcal {U}};{\mathscr {C}}_{\mathbb {C}})\) and that for all \(b\in U_r\)

$$\begin{aligned} \exp \big (2\pi i \cdot \phi _r(b)\big )= & {} \exp \big (\ln (\rho _r(b)) + 2\pi i\cdot \theta _r(b)\big ) \\= & {} \rho _r(b)\cdot e^{2\pi i \cdot \theta _r (b)} \\= & {} \nu _r (b). \end{aligned}$$

Therefore \(\nu _r = \exp (2\pi i \cdot \phi _r)\) and \(\{\nu _r\} \in \check{C}^0({\mathcal {U}};{\mathfrak {Im}}(\exp ))\), which implies \([\{\omega _{rt}\}] = 0 \) in \(\check{H}^1({\mathcal {U}};{\mathfrak {Im}}(\exp ))\) as claimed.\(\square \)

In summary, given an open cover \({\mathcal {U}}\) of B we get the function

figure o

which is natural with respect to refinements and satisfies

Corollary 4.10

Let \({\mathcal {U}} = \{U_j\}\) be an open cover of B such that each \(U_r\) is locally path-connected and simply connected, and each \(U_r \cap U_t\) is either empty or connected. Then

$$\begin{aligned} {\mathbf {c}}_1^{\mathcal {U}}:H^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}) \longrightarrow [ B , {\mathbb {C}}{{\mathbf {P}}}^\infty ] \end{aligned}$$

is injective.

We summarize the results of this section in the following theorem:

Theorem 4.11

Let \({\mathcal {U}} = \{U_0 ,\ldots , U_n\}\) be an open cover of B, and let \(\{\varphi _r\}\) be a partition of unity dominated by \({\mathcal {U}}\). Then we have functions

$$\begin{aligned} \begin{array}{llll} {\mathbf {w}}^{\mathcal {U}}_1 :&{} H^1({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}/2) &{}\longrightarrow &{} [B,{\mathbb {R}}{\mathbf {P}}^\infty ] \\ &{}[\tau = \{\tau _{rt}\}] &{} \mapsto &{} [f_\tau ] \end{array} \text{, } \quad \begin{array}{llll} {\mathbf {c}}^{\mathcal {U}}_1 :&{} H^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}) &{} \longrightarrow &{} [B,{\mathbb {C}}{{\mathbf {P}}}^\infty ]\\ &{}[\eta = \{\eta _{rst}\}] &{} \mapsto &{} [f_\eta ] \end{array} \end{aligned}$$

natural w.r.t refinements of \({\mathcal {U}}\), where \(\tau _{rt} = \tau (\{r,t\})\), \(\eta _{rst} = \eta (\{r,s,t\})\) and

$$\begin{aligned} \begin{array}{llll} f_\tau :&{} B &{}\longrightarrow &{} {\mathbb {R}}{\mathbf {P}}^n \\ &{} U_j \ni b &{} \mapsto &{} \big [(-1)^{\tau _{0j}}\sqrt{\varphi _0(b)}: \cdots : (-1)^{\tau _{nj}}\sqrt{\varphi _n(b)} \big ] \\ \\ f_\eta :&{} B &{}\longrightarrow &{} {\mathbb {C}}{{\mathbf {P}}}^n \\ &{} U_j \ni b &{} \mapsto &{} \big [e^{2\pi i\sum \limits _t \varphi _t(b) \eta _{0jt}}\sqrt{\varphi _0(b)} \;: \cdots :\; e^{2\pi i \sum \limits _t \varphi _t(b)\eta _{njt}}\sqrt{\varphi _n(b)} \big ] \end{array} \end{aligned}$$

are well-defined. Moreover, if each \(U_r\) is connected, then \( {\mathbf {w}}_1^{\mathcal {U}}\) is injective; if in addition each \(U_r\) is locally path-connected and simply connected, and each \(U_r \cap U_t\) is either empty or connected, then \( {\mathbf {c}}_1^{\mathcal {U}} \) is injective.

5 Dimensionality Reduction in \({\mathbb {F}}{\mathbf {P}}^n\) via Principal Projective Coordinates

Let \(V \subset {\mathbb {F}}^{n+1}\) be a linear subspace with \(\dim (V) \ge 1\). If \(\sim \) is the equivalence relation on \({\mathbb {F}}^{n+1}\smallsetminus \{{\mathbf {0}}\}\) given by \({\mathbf {u}}\sim {\mathbf {v}}\) if and only if \({\mathbf {u}}= \lambda {\mathbf {v}}\) for some \(\lambda \in {\mathbb {F}}\), then \(\sim \) is also an equivalence relation on \(V\smallsetminus \{{\mathbf {0}}\}\) and hence we can define

$$\begin{aligned} {\mathbb {F}}{\mathbf {P}}^{\dim (V)-1}_V := \big (V \smallsetminus \{{\mathbf {0}}\}\big )\big /\sim . \end{aligned}$$

In particular \({\mathbb {F}}{\mathbf {P}}^{\dim (U)-1}_U = {\mathbb {F}}{\mathbf {P}}^{\dim (V)-1}_V\) if and only if \(U = V\), and \({\mathbb {F}}{\mathbf {P}}_V^{\dim (V)-1}\) is a subset of \({\mathbb {F}}{\mathbf {P}}^n\). Recall that \({\mathbb {F}}\) is either \({\mathbb {R}}\) or \({\mathbb {C}}\). For \({\mathbf {u}},{\mathbf {v}}\in {\mathbb {F}}^{n+1}\) let

$$\begin{aligned} \langle {\mathbf {u}},{\mathbf {v}}\rangle = \sum _{r=0}^n u_r \cdot \bar{v}_r \end{aligned}$$

denote their inner product. If \({\mathbf {d}}_g\) denotes the geodesic distance in \({\mathbb {F}}{\mathbf {P}}^n\) induced by the Fubini–Study metric, then one has that

$$\begin{aligned} {\mathbf {d}}_g([{\mathbf {u}}],[{\mathbf {v}}]) = \arccos \left( \frac{|\langle {\mathbf {u}},{\mathbf {v}}\rangle |}{\Vert {\mathbf {u}}\Vert \cdot \Vert {\mathbf {v}}\Vert }\right) \end{aligned}$$

and it can be checked that \({\mathbb {F}}{\mathbf {P}}^{\dim (V)-1}_V\) is an isometric copy of \({\mathbb {F}}{\mathbf {P}}^{\dim (V)-1}\) inside \({\mathbb {F}}{\mathbf {P}}^n\).

If \(1\le \dim (V)\le n\) and \(V^\perp = \{{\mathbf {u}}\in {\mathbb {F}}^{n+1} : \langle {\mathbf {u}},{\mathbf {v}}\rangle = 0 \text{ for } \text{ all } {\mathbf {v}}\in V\}\), then the orthogonal projection \(p_V :{\mathbb {F}}^{n+1} \longrightarrow V\) descends to a continuous map

$$\begin{aligned} \begin{array}{llll} P_V :&{}{\mathbb {F}}{\mathbf {P}}^{n} \smallsetminus {\mathbb {F}}{\mathbf {P}}_{V^\perp }^{n -\dim (V)} &{}\longrightarrow &{} {\mathbb {F}}{\mathbf {P}}_V^{\dim (V)-1} \\ &{} \, [{\mathbf {u}}] &{} \mapsto &{} [\,p_V({\mathbf {u}})]. \end{array} \end{aligned}$$

Recall that \(p_V\) sends each \({\mathbf {u}}\in {\mathbb {F}}^{n+1}\) to its closest point in V with respect to the distance induced by \(\Vert \cdot \Vert \). A similar property is inherited by \(P_V\):

Proposition 5.1

If \([{\mathbf {w}}] \in {\mathbb {F}}{\mathbf {P}}^n\smallsetminus {\mathbb {F}}{\mathbf {P}}_{V^\perp }^{n-\dim (V)}\), then \(P_V([{\mathbf {w}}])\) is the point in \({\mathbb {F}}{\mathbf {P}}_V^{\dim (V)-1}\) which is closest to \([{\mathbf {w}}]\) with respect to \({\mathbf {d}}_g\).

Proof

Let \([{\mathbf {u}}] \in {\mathbb {F}}{\mathbf {P}}^{\dim (V)-1}_V\). Since \([{\mathbf {w}}] \notin {\mathbb {F}}{\mathbf {P}}_{V^\perp }^{n - \dim (V)}\), then \({\mathbf {w}}- p_V({\mathbf {w}})\in V^\perp \) with \(p_V({\mathbf {w}})\ne {\mathbf {0}}\). Therefore \(\langle {\mathbf {u}}, {\mathbf {w}}- p_U({\mathbf {w}})\rangle = 0\) and by the Cauchy–Schwartz inequality

$$\begin{aligned} \big | \big \langle {\mathbf {w}}, {\mathbf {u}}\big \rangle \big | = |\langle p_U({\mathbf {w}}),{\mathbf {u}}\rangle | \le \Vert p_U({\mathbf {w}})\Vert \cdot \Vert {\mathbf {u}}\Vert . \end{aligned}$$

Hence

$$\begin{aligned} \frac{|\langle {\mathbf {w}},{\mathbf {u}}\rangle |}{\Vert {\mathbf {w}}\Vert \cdot \Vert {\mathbf {u}}\Vert } \le \frac{\Vert p_U({\mathbf {w}})\Vert }{\Vert {\mathbf {w}}\Vert } = \frac{|\langle {\mathbf {w}},p_U({\mathbf {w}})\rangle |}{\Vert {\mathbf {w}}\Vert \cdot \Vert p_U({\mathbf {w}})\Vert } \end{aligned}$$

and since \(\arccos (\alpha )\) is decreasing, then \({\mathbf {d}}_g([{\mathbf {w}}],P_U([{\mathbf {w}}])) \le {\mathbf {d}}_g([{\mathbf {w}}],[{\mathbf {u}}])\). \(\square \)

Therefore, we can think of \(P_V\) as the projection onto \({\mathbb {F}}{\mathbf {P}}_{V}^{\dim (V)-1}\). Moreover, let \(\jmath _V:{\mathbb {F}}{\mathbf {P}}_V^{\dim (V)-1} \hookrightarrow {\mathbb {F}}{\mathbf {P}}^n \smallsetminus {\mathbb {F}}{\mathbf {P}}^{n - \dim (V)}_{V^\perp }\) be the inclusion map.

Proposition 5.2

\(\jmath _V \circ P_V \) is a deformation retraction.

Proof

Since \(p_V\) is surjective and satisfies \(p_V \circ p_V ({\mathbf {w}}) = p_V({\mathbf {w}})\) for all \({\mathbf {w}}\in {\mathbb {F}}^{n+1}\), it follows that \(P_V\) is a retraction. Let \(h :{\mathbb {F}}^{n+1} \times [0,1] \longrightarrow {\mathbb {F}}^{n+1}\) be given by \(h({\mathbf {w}}, t) = (1-t)\cdot {\mathbf {w}}+ t\cdot p_V({\mathbf {w}}) \). Since \(h({\mathbf {w}},t) = {\mathbf {0}}\) implies that \({\mathbf {w}}\in V^\perp \), then h induces a continuous map

$$\begin{aligned} \big ({\mathbb {F}}{\mathbf {P}}^n \smallsetminus {\mathbb {F}}{\mathbf {P}}_{V^\perp }^{n - \dim (V)}\big )\times [0,1]\longrightarrow & {} {\mathbb {F}}{\mathbf {P}}^n \smallsetminus {\mathbb {F}}{\mathbf {P}}_{V^\perp }^{n - \dim (V)} \\ ([{\mathbf {w}}], t)\mapsto & {} [h({\mathbf {w}},t)] \end{aligned}$$

which is a homotopy between the identity of \({\mathbb {F}}{\mathbf {P}}^n \smallsetminus {\mathbb {F}}{\mathbf {P}}_{V^\perp }^{n - \dim (V)}\) and \(\jmath _V \circ P_V\).\(\square \)

Notice that \([{\mathbf {u}}] = {\mathsf {Span}}({\mathbf {u}})\) for \({\mathbf {u}}\in {\mathbb {F}}^{n+1} \smallsetminus \{{\mathbf {0}}\}\). The previous proposition yields

Corollary 5.3

Let \(f:B \longrightarrow {\mathbb {F}}{\mathbf {P}}^n\) be a continuous map which is not surjective. If \([{\mathbf {u}}] \notin f(B)\), then f is homotopic to \(P_{[{\mathbf {u}}]^\perp } \circ f:B \longrightarrow {\mathbb {F}}{\mathbf {P}}_{[{\mathbf {u}}]^\perp }^{n-1}\subset {\mathbb {F}}{\mathbf {P}}^n\).

Summarizing, if \(f:B \longrightarrow {\mathbb {F}}{\mathbf {P}}^n\) is not surjective, then it can be continuously deformed so that its image lies in \({\mathbb {F}}{\mathbf {P}}^{n-1}_{[{\mathbf {u}}]^\perp } \subset {\mathbb {F}}{\mathbf {P}}^n\), for \([{\mathbf {u}}]\notin f(B)\). Moreover, the deformation is obtained by sending each \(f(b) \in {\mathbb {F}}{\mathbf {P}}^n\) to its closest point in \({\mathbb {F}}{\mathbf {P}}^{n-1}_{[{\mathbf {u}}]^\perp }\) with respect to \({\mathbf {d}}_g\), along a shortest path in \({\mathbb {F}}{\mathbf {P}}^n\). This analysis shows that the topological properties encoded by f are preserved by the dimensionality reduction step if \(f(B) \ne {\mathbb {F}}{\mathbf {P}}^n\).

Given a finite set \({\mathbf {Y}}\subset {\mathbb {F}}{\mathbf {P}}^n\), we will show next that \({\mathbf {u}}\) can be chosen so that \({\mathbb {F}}{\mathbf {P}}^{n-1}_{[{\mathbf {u}}]^\perp }\) provides the best \((n-1)\)-dimensional approximation. Indeed, given

$$\begin{aligned} {\mathbf {Y}} = \big \{ [{\mathbf {y}}_1],\ldots , [{\mathbf {y}}_N]\big \} \subset {\mathbb {F}}{\mathbf {P}}^n, \end{aligned}$$

the goal is to find \({\mathbf {u}}^* \in {\mathbb {F}}^{n+1}\) so that

$$\begin{aligned} {\mathbf {u}}^* = \mathop {{{\mathrm{argmin}}}}\limits _{\begin{array}{c} {\mathbf {u}}\in {\mathbb {F}}^{n+1} \\ \Vert {\mathbf {u}}\Vert =1 \end{array}} \sum _{r=1}^N {\mathbf {d}}_g \big ([{\mathbf {y}}_r], {\mathbb {F}}{\mathbf {P}}^{n-1}_{[{\mathbf {u}}]^\perp }\big )^2. \end{aligned}$$

Since

$$\begin{aligned} {\mathbf {d}}_g\big ([{\mathbf {y}}_r], {\mathbb {F}}{\mathbf {P}}^{n-1}_{[{\mathbf {u}}]^\perp }\big ) = {\mathbf {d}}_g\big ([{\mathbf {y}}_r], P_{[{\mathbf {u}}]^\perp }([{\mathbf {y}}_r])\big ) = {\mathbf {d}}_g\big ([{\mathbf {y}}_r], \big [{\mathbf {y}}_r - \langle {\mathbf {y}}_r,{\mathbf {u}}\rangle {\mathbf {u}}\big ]\big ), \end{aligned}$$

then

$$\begin{aligned} \begin{aligned} {\mathbf {u}}^*&= \mathop {{{\mathrm{argmin}}}}\limits _{\begin{array}{c} {\mathbf {u}}\in {\mathbb {F}}^{n+1} \\ \Vert {\mathbf {u}}\Vert =1 \end{array}} \sum _{r=1}^N \arccos \left( \frac{\big |\big \langle {\mathbf {y}}_r, {\mathbf {y}}_r - \langle {\mathbf {y}}_r,{\mathbf {u}}\rangle {\mathbf {u}}\big \rangle \big |}{\Vert {\mathbf {y}}_r\Vert \cdot \Vert {\mathbf {y}}_r - \langle {\mathbf {y}}_r , {\mathbf {u}}\rangle {\mathbf {u}}\Vert }\right) ^2 \\&= \mathop {{{\mathrm{argmin}}}}\limits _{\begin{array}{c} {\mathbf {u}}\in {\mathbb {F}}^{n+1} \\ \Vert {\mathbf {u}}\Vert =1 \end{array}} \sum _{r=1}^N \arccos \left( \frac{ \Vert {\mathbf {y}}_r - \langle {\mathbf {y}}_r , {\mathbf {u}}\rangle {\mathbf {u}}\Vert }{\Vert {\mathbf {y}}_r\Vert }\right) ^2 \\&= \mathop {{{\mathrm{argmin}}}}\limits _{\begin{array}{c} {\mathbf {u}}\in {\mathbb {F}}^{n+1} \\ \Vert {\mathbf {u}}\Vert =1 \end{array}} \sum _{r=1}^N \left( \frac{\pi }{2} - \arccos \frac{\big |\langle {\mathbf {y}}_r,{\mathbf {u}}\rangle \big |}{\Vert {\mathbf {y}}_r\Vert } \right) ^2. \end{aligned} \end{aligned}$$
(11)

This nonlinear least squares problem—in a nonlinear domain—can be solved approximately using linearization; the reduction, in turn, has a closed form solution. Indeed, the Taylor series expansion for \(\arccos (\alpha )\) around 0 is

$$\begin{aligned} \arccos (\alpha ) = \frac{\pi }{2} - \left( \alpha + \sum _{\ell =1}^\infty \frac{(2\ell )!}{4^\ell (\ell !)^2}\frac{\alpha ^{2\ell +1}}{2\ell +1} \right) , \;\;\; |\alpha | < 1, \end{aligned}$$

and therefore \(\big |\frac{\pi }{2}-\arccos (\alpha )\big | \approx |\alpha |\) is a third order approximation. Hence

$$\begin{aligned} {\mathbf {u}}^* \approx \mathop {{{\mathrm{argmin}}}}\limits _{\begin{array}{c} {\mathbf {u}}\in {\mathbb {F}}^{n+1} \\ \Vert {\mathbf {u}}\Vert =1 \end{array}} \sum _{r=1}^N \Big |\frac{\langle {\mathbf {y}}_r,{\mathbf {u}}\rangle }{\Vert {\mathbf {y}}_r\Vert }\Big |^2, \end{aligned}$$
(12)

which is a linear least squares problem, and a solution is the eigenvector of the (\(n+1\))-by-(\(n+1\)) uncentered covariance matrix

corresponding to the smallest eigenvalue. Notice that if \(a_1 ,\ldots , a_N \in {\mathbb {F}}\) satisfy \(|a_r| = 1\) for each \(r=1,\ldots , N\), then

$$\begin{aligned} {\mathsf {Cov}}\left( \frac{{\mathbf {y}}_1}{\Vert {\mathbf {y}}_1\Vert },\ldots , \frac{{\mathbf {y}}_N}{\Vert {\mathbf {y}}_N\Vert }\right) = {\mathsf {Cov}}\left( a_1\frac{{\mathbf {y}}_1}{\Vert {\mathbf {y}}_1\Vert },\ldots , a_N\frac{{\mathbf {y}}_N}{\Vert {\mathbf {y}}_N\Vert }\right) \end{aligned}$$

and hence we can write \({\mathsf {Cov}}({\mathbf {Y}})\) for the unique uncentered covariance matrix associated to \({\mathbf {Y}} = \big \{[{\mathbf {y}}_1],\ldots , [{\mathbf {y}}_N]\big \} \subset {\mathbb {F}}{\mathbf {P}}^n\). If \({\mathbf {u}}\in {\mathbb {F}}^{n+1}\) is an eigenvector of \({\mathsf {Cov}}({\mathbf {Y}})\) corresponding to the smallest eigenvalue, then we use the notation \([{\mathbf {u}}] = \mathtt{LastProjComp}({\mathbf {Y}},{\mathbb {F}}{\mathbf {P}}^n)\) with the understanding that \([{\mathbf {u}}]\) is unique only if the relevant eigenspace has dimension one. If not, the choice is arbitrary.

5.1 Principal Projective Coordinates

First we define, inductively, the Principal Projective Components of \({\mathbf {Y}}. \,\mathrm{Starting \,with} [{\mathbf {v}}_n] =\texttt {LastProjComp}({\mathbf {Y}},{\mathbb {F}}{\mathbf {P}}^n),\) assume that for \(1 \le k \le n-1\) the components \([{\mathbf {v}}_{k+1}],\ldots , [{\mathbf {v}}_{n}]\in {\mathbb {F}}{\mathbf {P}}^{n}\) have been determined and let us define \([{\mathbf {v}}_k]\). To this end, let \(\{{\mathbf {u}}_0,\ldots , {\mathbf {u}}_k\}\) be an orthonormal basis for \(V^k = {\mathsf {Span}}({\mathbf {v}}_{k+1},\ldots , {\mathbf {v}}_n)^\perp \), let

$$\begin{aligned} A_k = {\begin{bmatrix}|&| \\ {\mathbf {u}}_0&\cdots&{\mathbf {u}}_k \\ |&|\end{bmatrix}} \end{aligned}$$

and let \(A_k^{\dag }\) be its conjugate transpose. If \(A_k^\dag \cdot {\mathbf {Y}}= \big \{\big [A_k^\dag {\mathbf {y}}_1 \big ],\ldots , \big [A_k^\dag {\mathbf {y}}_N \big ]\big \}\), define

$$\begin{aligned} {[}{\mathbf {v}}_k]:= A_k \cdot \mathtt{LastProjComp}\big (A_k^\dag \cdot {\mathbf {Y}}, {\mathbb {F}}{\mathbf {P}}^k\big ). \end{aligned}$$

This is well-defined as the following proposition shows.

Proposition 5.4

The class \( [{\mathbf {v}}_k] = A_k\cdot \mathtt{LastProjComp}\big (A_k^\dag \cdot {\mathbf {Y}}, {\mathbb {F}}{\mathbf {P}}^k\big ) \) is independent of the choice of orthonormal basis \(\{{\mathbf {u}}_0,\ldots , {\mathbf {u}}_k\}\).

Proof

Let \(\{{\mathbf {w}}_0,\ldots , {\mathbf {w}}_k\}\) be another orthonormal basis for \(V^k\) and let

$$\begin{aligned} B_k = {\begin{bmatrix}|&| \\ {\mathbf {w}}_0&\cdots&{\mathbf {w}}_k \\ |&|\end{bmatrix}}. \end{aligned}$$

It follows that \(B_k^\dag B_k = A_k^\dag A_k = I_{k+1}\), the \((k+1)\)-by-\((k+1)\) identity matrix, and that \(B_kB_k^\dag = A_kA_k^\dag \) is the matrix (with respect to the standard basis of \({\mathbb {F}}^{n+1}\)) of the orthogonal projection \(p_{V^k}:{\mathbb {F}}^{n+1} \longrightarrow V^k\). Therefore

$$\begin{aligned} \big ( B^\dag _kA_k \big ) \big ( A_k^\dag B_k \big )= & {} B^\dag _k \big (A_k A_k^\dag \big ) B_k \\= & {} B^\dag _k \big (B_k B_k^\dag \big ) B_k \\= & {} I_{r+1}, \end{aligned}$$

which shows that \(A^\dag _kB_k\) is an orthogonal matrix. Since

$$\begin{aligned} \big \Vert A_k^\dag {\mathbf {y}}\big \Vert ^2 = \big \langle {\mathbf {y}}, A_k A_k^\dag {\mathbf {y}}\big \rangle = \big \Vert B_k^\dag {\mathbf {y}}\big \Vert ^2 \end{aligned}$$

for every \({\mathbf {y}}\in {\mathbb {F}}^{n+1}\), then

$$\begin{aligned} {\mathsf {Cov}}\big (A^\dag _k {\mathbf {Y}}\big )= & {} {\mathsf {Cov}} \left( \frac{A^\dag _k {\mathbf {y}}_1}{\big \Vert A^\dag _k{\mathbf {y}}_1\big \Vert } , \ldots , \frac{A^\dag _k {\mathbf {y}}_N}{\big \Vert A^\dag _k{\mathbf {y}}_N\big \Vert } \right) \\= & {} {\mathsf {Cov}} \left( A^\dag _kB_k \frac{B^\dag _k {\mathbf {y}}_1}{\big \Vert B^\dag _k{\mathbf {y}}_1\big \Vert } , \ldots , A^\dag _kB_k \frac{B^\dag _k {\mathbf {y}}_N}{\big \Vert B^\dag _k{\mathbf {y}}_N\big \Vert } \right) \\= & {} A^\dag _kB_k \cdot {\mathsf {Cov}}\big (B_k^\dag {\mathbf {Y}}\big ) \cdot B^\dag _kA_k \end{aligned}$$

and thus \({\mathsf {Cov}}\big (A^\dag _k{\mathbf {Y}}\big )\) and \({\mathsf {Cov}}\big (B_k^\dag {\mathbf {Y}}\big )\) have the same spectrum. Moreover, \({\mathbf {u}}\) is an eigenvector of \({\mathsf {Cov}}\big (A^\dag _k{\mathbf {Y}}\big )\) corresponding to the smallest eigenvalue \(\lambda \) if and only if \({\mathbf {u}}= A^\dag _kB_k{\mathbf {w}}\) for a unique eigenvector \({\mathbf {w}}\) of \({\mathsf {Cov}}\big (B^\dag _k{\mathbf {Y}}\big )\) with eigenvalue \(\lambda \). Since \(B_k{\mathbf {w}}\in V^k\) and \(A_kA^\dag _k\) is the matrix of \(p_{V^k}\), then

$$\begin{aligned} A_k {\mathbf {u}}= A_kA_k^\dag B_k {\mathbf {w}}= B_k {\mathbf {w}}, \end{aligned}$$

which shows that

$$\begin{aligned} A_k\cdot \mathtt{LastProjComp}\big (A_k^\dag \cdot {\mathbf {Y}},{\mathbb {F}}{\mathbf {P}}^k\big ) = B_k\cdot \mathtt{LastProjComp}\big (B_k^\dag \cdot {\mathbf {Y}}, {\mathbb {F}}{\mathbf {P}}^k\big ). \end{aligned}$$

\(\square \)

This inductive procedure defines \([{\mathbf {v}}_1],\ldots , [{\mathbf {v}}_n] \in {\mathbb {F}}{\mathbf {P}}^n\), and we let \({\mathbf {v}}_0 \in {\mathbb {F}}^{n+1}\) with \(\Vert {\mathbf {v}}_0\Vert = 1\) be so that \({\mathsf {Span}}({\mathbf {v}}_0) = {\mathsf {Span}}({\mathbf {v}}_1,\ldots , {\mathbf {v}}_n)^\perp \). We will use the notation

$$\begin{aligned} \mathtt{PrinProjComps}({\mathbf {Y}}) = \big \{[{\mathbf {v}}_0],\ldots , [{\mathbf {v}}_n]\big \} \end{aligned}$$

for the principal projective components of \({\mathbf {Y}}\) computed in this fashion. Each choice of unitary (i.e. having norm 1) representatives \({\mathbf {u}}_0 \in [{\mathbf {v}}_0],\ldots , {\mathbf {u}}_n \in [{\mathbf {v}}_n]\) yields an orthonormal basis \( \{{\mathbf {u}}_0,\ldots , {\mathbf {u}}_n\}\) for \({\mathbb {F}}^{n+1}\), and each \({\mathbf {y}}\in {\mathbb {F}}^{n+1}\) can be represented in terms of its vector of coefficients

$$\begin{aligned} {\mathsf {coeff}}_U({\mathbf {y}}) = {\begin{bmatrix}\langle {\mathbf {y}},{\mathbf {u}}_0\rangle \\ \vdots \\ \langle {\mathbf {y}},{\mathbf {u}}_n\rangle \end{bmatrix}}. \end{aligned}$$

If \({\widetilde{U}}\) is another set of unitary representatives for \(\mathtt{PrinProjComps}({\mathbf {Y}})\), then there exists a \((n+1)\)-by-\((n+1)\) diagonal matrix \(\Lambda \), with entries in the unit circle in \({\mathbb {F}}\), and so that \({\mathsf {coeff}}_{{\widetilde{U}}}({\mathbf {y}}) = \Lambda \cdot {\mathsf {coeff}}_U({\mathbf {y}})\). That is, the resulting principal projective coordinates \([{\mathsf {coeff}}_U({\mathbf {y}})] \in {\mathbb {F}}{\mathbf {P}}^n\) are unique up to a diagonal isometry.

5.2 Visualizing the Reduction

Fix a set of unitary representatives \({\mathbf {v}}_0,\ldots , {\mathbf {v}}_n\) for \(\mathtt{PrinProjComps}({\mathbf {Y}})\), and let \(V^k = {\mathsf {Span}}({\mathbf {v}}_0,\ldots , {\mathbf {v}}_k)\) for \(1\le k \le n\). It is often useful to visualize \(P_{ V^k}({\mathbf {Y}})\subset {\mathbb {F}}{\mathbf {P}}_{V^k}^k\) for k small, specially in \({\mathbb {R}}{\mathbf {P}}^1\), \({\mathbb {R}}{\mathbf {P}}^2\), \({\mathbb {R}}{\mathbf {P}}^3\) and \({\mathbb {C}}{{\mathbf {P}}}^1\). We do this using the principal projective coordinates of \({\mathbf {Y}}\). For the real case (i.e. \({\mathbb {R}}{\mathbf {P}}^1\), \({\mathbb {R}}{\mathbf {P}}^2\) and \({\mathbb {R}}{\mathbf {P}}^3\)) we consider the set

$$\begin{aligned} \left\{ \frac{{\mathbf {x}}_r}{\Vert {\mathbf {x}}_r\Vert } \in S^k : {\mathbf {x}}_r \;=\; {\mathsf {sign}}\big (\langle {\mathbf {y}}_r, {\mathbf {v}}_0\rangle \big )\cdot {\begin{bmatrix}\langle {\mathbf {y}}_r , {\mathbf {v}}_0\rangle \\ \vdots \\ \langle {\mathbf {y}}_r , {\mathbf {v}}_{k}\rangle \end{bmatrix}}, \, r=1,\ldots , N \right\} , \; k \le 3, \end{aligned}$$

and its image through the stereographic projection \( S^k \smallsetminus \{-{\mathbf {e}}_1\} \longrightarrow D^k \) with respect to \(-{\mathbf {e}}_1\), where \({\mathbf {e}}_1\) is the first standard basis vector \({\mathbf {e}}_1 \in {\mathbb {R}}^{k+1}\). That is, we visualize \(P_{V^k}({\mathbf {Y}})\) in the k-disk \( D^k\subset {\mathbb {R}}^k\) with the understanding that antipodal points on the boundary are identified. For the complex case (i.e. \({\mathbb {C}}{{\mathbf {P}}}^1\)) we consider the set

$$\begin{aligned} \left\{ \frac{{\mathbf {z}}_r}{\Vert {\mathbf {z}}_r\Vert } \in {\mathbb {C}}^2 : {\mathbf {z}}_r = {\begin{bmatrix}\langle {\mathbf {y}}_r , {\mathbf {v}}_0\rangle \\ \langle {\mathbf {y}}_r, {\mathbf {v}}_1\rangle \end{bmatrix}} , \, r=1,\ldots , N \right\} \end{aligned}$$

and its image through the Höpf map

$$\begin{aligned} \begin{array}{llll} H :&{} S^{3}\subset {\mathbb {C}}^2&{} \longrightarrow &{}S^2 \subset {\mathbb {C}}\times {\mathbb {R}}\\ &{}[z_1,z_2]&{}\mapsto &{}\big (2z_1\bar{z_2}, |z_1|^2 - |z_2|^2\big ) \end{array} \end{aligned}$$

which is exactly the composition of \(S^3 \subset {\mathbb {C}}^2 \longrightarrow {\mathbb {C}}_\infty = {\mathbb {C}}\cup \{\infty \}\), sending \([z_1,z_2]\) to \(z_1/z_2\), and the isometry \({\mathbb {C}}_\infty \cong S^2\subset {\mathbb {C}}\times {\mathbb {R}}\) given by the inverse of the north-pole stereographic projection.

5.3 Choosing the Target Dimension

Given \(1\le k \le n\), the cumulative variance recovered by \(P_{V^k}({\mathbf {Y}})\subset {\mathbb {F}}{\mathbf {P}}_{V^k}^k\) is given by the expression

$$\begin{aligned} {\mathsf {var}}_{\mathbf {Y}}(k)= & {} \frac{1}{N} \sum _{\ell =1}^{k} \sum _{r=1}^{N} {\mathbf {d}}_g \big ( P_{V^\ell }([{\mathbf {y}}_r]) , {\mathbb {F}}{\mathbf {P}}^{\ell -1}_{V^{\ell -1}} \big )^2 \nonumber \\= & {} \frac{1}{N} \sum _{\ell =1}^k \sum _{r=1}^N \Big ( \frac{\pi }{2} - {\mathbf {d}}_g\big (P_{V^{\ell -1}}([{\mathbf {y}}_r]), \big [{\mathbf {v}}_{\ell }\big ]\big ) \Big )^2. \end{aligned}$$
(13)

Define the percentage of cumulative variance as

$$\begin{aligned} {\mathsf {p.var}}_{\mathbf {Y}}(k) = \frac{ {\mathsf {var}}_{\mathbf {Y}}(k) }{{\mathsf {var}}_{\mathbf {Y}}(n)}. \end{aligned}$$
(14)

A common rule of thumb for choosing the target dimension is identifying the smallest value of k so that \({\mathsf {p.var}}_{\mathbf {Y}}\) exhibits a prominent reduction in growth rate. Visually, this creates an “elbow” in the graph of \({\mathsf {p.var}}_{\mathbf {Y}}\) at k (see Fig. 2(b), \(k=5\)). The target dimension can also be chosen as the smallest \(k\ge 1\) so that \({\mathsf {p.var}}_{\mathbf {Y}}(k)\) is greater than a predetermined threshold, e.g. 0.7 (see Fig. 3, \(k=2\)).

Examples

Let us illustrate the inner workings of the framework we have developed thus far.

The Projective Plane. \({\mathbb {R}}{\mathbf {P}}^2\): Let \({\mathbb {R}}{\mathbf {P}}^2\) denote the quotient \(S^2/({\mathbf {u}}\sim -{\mathbf {u}})\), endowed with the geodesic distance \({\mathbf {d}}_g({\mathbf {u}},{\mathbf {v}}) = \arccos (|\langle {\mathbf {u}},{\mathbf {v}}\rangle |)\). We begin by selecting six landmark points \(\ell _0,\ldots , \ell _5 \in {\mathbb {R}}{\mathbf {P}}^2\) as shown in Fig. 9 (Left). If for each landmark \(\ell _j\) we let \(r_j = \min \{{\mathbf {d}}_g(\ell _j,\ell _r) : r\ne j\}\) and let \(\epsilon _j = 0.95*r_j\), then \({\mathcal {U}} = \{B_{\epsilon _j}(\ell _j)\}\) is a covering for \({\mathbb {R}}{\mathbf {P}}^2\) and the corresponding nerve complex \({\mathcal {N}}({\mathcal {U}})\) is shown in Fig. 9 (Right).

Fig. 9
figure 9

Left: Landmark points on \({\mathbb {R}}{\mathbf {P}}^2\). Right: Induced nerve complex \({\mathcal {N}}({\mathcal {U}})\)

Let be the indicator function if \(\{i,j\} = \{r,k\}\) and 0 otherwise. Then

is a 1-cocycle, and its cohomology class \([\tau ]\) is the non-zero element in

$$\begin{aligned} H^1({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}/2) \cong {\mathbb {Z}}/2. \end{aligned}$$

Using the formula from Theorem 4.11, the cocycle \(\tau \) above, and quadratic bumps with weights \(\lambda _j = \epsilon _j^2\), we get the corresponding map \(f_\tau :{\mathbb {R}}{\mathbf {P}}^2 \longrightarrow {\mathbb {R}}{\mathbf {P}}^5\). For instance, if \(b\in B_{\epsilon _0}(\ell _0)\), then

$$\begin{aligned} f_\tau (b)= & {} \big [ \left| \epsilon _0 - {\mathbf {d}}_g(b, \ell _0) \right| _{+} \;:\; -\left| \epsilon _1 - {\mathbf {d}}_g(b, \ell _1) \right| _{+} \;:\; -\left| \epsilon _2 - {\mathbf {d}}_g(b, \ell _2) \right| _{+}\big . \\&\quad \big .:\left| \epsilon _3 - {\mathbf {d}}_g(b, \ell _3) \right| _{+} \;:\; -\left| \epsilon _4 - {\mathbf {d}}_g(b, \ell _4) \right| _{+}\; :\; \left| \epsilon _5 - {\mathbf {d}}_g(b, \ell _5) \right| _{+} \big ]. \end{aligned}$$

Let \({\mathbf {X}}\subset {\mathbb {R}}{\mathbf {P}}^2\) be a uniform random sample with 10,000 points. After computing the principal projective components of \(f_\tau ({\mathbf {X}})\subset {\mathbb {R}}{\mathbf {P}}^5\) and the percentage of cumulative variance \({\mathsf {p.var}}_{\mathbf {Y}}(k)\) (see (14)) for \(k=1,\ldots , 5\) we obtain Fig. 10.

Fig. 10
figure 10

Percentage of cumulative variance

This profile of cumulative variance suggests that dimension 2 is appropriate for representing \(f_\tau ({\mathbf {X}})\): both “the elbow” and the “70% of recovered variance” happen at around \(k =2\). In Fig. 11 we show the original sample \({\mathbf {X}}\subset {\mathbb {R}}{\mathbf {P}}^2\) as well as the point cloud \(P_{V^2}(f_\tau ({\mathbf {X}}))\) resulting from projecting \(f_\tau ({\mathbf {X}})\) onto \({\mathbb {R}}{\mathbf {P}}^2_{V^2} \subset {\mathbb {R}}{\mathbf {P}}^5\). Recall that \(P_{V^2}(f_\tau ({\mathbf {X}}))\) is visualized on the unit disk \(D^2 = \{{\mathbf {u}}\in {\mathbb {R}}^2 : \Vert {\mathbf {u}}\Vert \le 1\}\), with the understanding that points in the boundary \(\partial D^2 = S^1\) are identified with their antipodes.

Fig. 11
figure 11

Left: Original sample \({\mathbf {X}}\subset {\mathbb {R}}{\mathbf {P}}^2\). Right: Visualization of resulting projective coordinates. Please refer to an electronic version for colors

These results are consistent with the fact that any \(f:{\mathbb {R}}{\mathbf {P}}^2 \longrightarrow {\mathbb {R}}{\mathbf {P}}^\infty \) which classifies the nontrivial bundle over \({\mathbb {R}}{\mathbf {P}}^2\), must be homotopic to the inclusion \({\mathbb {R}}{\mathbf {P}}^2 \hookrightarrow {\mathbb {R}}{\mathbf {P}}^\infty \). So not only did we get the right homotopy-type, but also the global geometry and the metric information were recovered to a large extent.

The Klein Bottle K. Let K denote the quotient of the unit square \([0,1]\times [0,1]\) by the relation \(\sim \) given by \((x,0) \sim (x,1)\) and \((0,y) \sim (1,1-y)\). Let us endow K with the induced flat metric, which we denote by \({\mathbf {d}}\), and let \(\ell _0,\ldots , \ell _8 \in K\) be landmark points selected as shown in Fig. 12 (Left). If for each landmark \(\ell _j\) we let

$$\begin{aligned} \epsilon _j = \min \big \{{\mathbf {d}}(\ell _j, \ell _r):j \ne r\big \}, \end{aligned}$$

then \({\mathcal {U}} = \{B_{\epsilon _j}(\ell _j)\}\) is a covering for K and the resulting nerve complex \({\mathcal {N}}({\mathcal {U}})\) is shown in Fig. 12 (Right).

Fig. 12
figure 12

Left: Landmarks on the Klein bottle. Right: Induced nerve complex

It follows that the 1-skeleton of \({\mathcal {N}}({\mathcal {U}})\) is the complete graph on nine vertices, and that there are thirty-six 2-simplices and nine 3-simplices. Let us define the 1-chains

$$\begin{aligned} \tau _{{\mathsf {diag}}},\tau _{{\mathsf {horz}}},\tau _{{\mathsf {vert}}} \in C^1({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}/2) \end{aligned}$$

as follows: \(\tau _{{\mathsf {diag}}}\) will be the sum of indicator functions on the diagonal edges, \(\tau _{{\mathsf {horz}}}\) is the sum of indicator functions on the horizontal edges, and \(\tau _{{\mathsf {vert}}}\) will be the sum of indicator functios on the vertical edges. One can check that

$$\begin{aligned} \tau =\tau _{{\mathsf {diag}}} + \tau _{{\mathsf {horz}}} \;\;\;\;\; \text{ and } \;\;\;\;\; \tau ' = \tau _{{\mathsf {diag}}} + \tau _{{\mathsf {vert}}} \end{aligned}$$

are coycles and that their cohomology classes generate

$$\begin{aligned} H^1({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}/2) \cong {\mathbb {Z}}/2 \oplus {\mathbb {Z}}/2. \end{aligned}$$

Let \({\mathbf {X}}\subset K\) be a random sample with 10,000 points. The formula from Theorem 4.11 yields classifying maps

$$\begin{aligned} f_\tau , f_{\tau '}, f_{\tau + \tau '} :K \longrightarrow {\mathbb {R}}{\mathbf {P}}^8 \end{aligned}$$

and we obtain the point clouds \(f_\tau ({\mathbf {X}}), f_{\tau '}({\mathbf {X}}), f_{\tau + \tau '}({\mathbf {X}}) \subset {\mathbb {R}}{\mathbf {P}}^8\) of which we will compute their principal projective coordinates. Starting with \(f_\tau ({\mathbf {X}})\) we get the profile of recovered variance shown in Fig. 13.

Fig. 13
figure 13

Percentage of cumulative variance for \(f_\tau ({\mathbf {X}})\)

The figure suggests that dimension 3 provides an appropriate representation of \(f_\tau ({\mathbf {X}}) \subset {\mathbb {R}}{\mathbf {P}}^8\). As described above, we visualize \(P_{V^3}(f_\tau ({\mathbf {X}})) \subset {\mathbb {R}}{\mathbf {P}}^3_{V^3} \) in the 3-dimensional unit disk \(D^3 = \{{\mathbf {u}}\in {\mathbb {R}}^3:\Vert {\mathbf {u}}\Vert \le 1\}\) with the understanding that points on the boundary \(\partial D^3 = S^2\) are identified with their antipodes. The results are summarized in Fig. 14.

Fig. 14
figure 14

Left: Original sample \({\mathbf {X}}\subset K\); Center: Visualization of \(P_{V^3}(f_\tau ({\mathbf {X}})) \subset {\mathbb {R}}{\mathbf {P}}^3_{V^3}\) in \(D^3/\! \sim \; = {\mathbb {R}}{\mathbf {P}}^3\); Right: Lateral (upper right) and aerial view of the representation (lower right). Please refer to an electronic version for colors

This example highlights the following point: when representing data sampled from complicated spaces, e.g. the Klein bottle, it is advantageous to use target spaces with similar properties. In particular, the representation for \({\mathbf {X}}\subset K\) we recover here is much simpler than those obtained with traditional dimensionality reduction methods. We now transition to the 2-dimensional reduction \(P_{V^2}(f_\tau ({\mathbf {X}})) \subset {\mathbb {R}}{\mathbf {P}}^2_{V^2}\). As before we visualize the representation in the 2-dimensional unit disk \(D^2\) with the understanding that points on the boundary \(\partial D^2 = S^1\) are identified with their antipodes (Fig. 15).

Fig. 15
figure 15

\({\mathbb {R}}{\mathbf {P}}^2\)-coordinates for \({\mathbf {X}} \subset K\) corresponding to the cocycle \(\tau \)

We conclude this example by examining the \({\mathbb {R}}{\mathbf {P}}^2\) coordinates induced by \(\tau '\) and \(\tau + \tau '\) (Fig. 16). For completeness we include the one for \(\tau \) and also add figures with coloring by the vertical direction in K.

Fig. 16
figure 16

Columns: \({\mathbb {R}}{\mathbf {P}}^2\) coordinates for \({\mathbf {X}}\subset K\) induced by the cocycles \(\tau = \tau _{\mathsf {diag}} + \tau _{\mathsf {horz}}\), \(\tau ' = \tau _{\mathsf {diag}} + \tau _{\mathsf {vert}}\) and \(\tau + \tau ' = \tau _{\mathsf {horz}} + \tau _{\mathsf {vert}}\), respectively. Rows: Color schemes of the computed coordinates according to the horizontal and vertical directions in K. Please refer to an electronic version for colors

6 Choosing Cocycle Representatives

We now describe how \(f_\tau :B \longrightarrow {\mathbb {R}}{\mathbf {P}}^n\) and \(f_\eta :B \longrightarrow {\mathbb {C}}{{\mathbf {P}}}^n\) depend on the choice of representatives \(\tau = \{\tau _{rt}\} \in Z^1({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}/2)\) and \(\eta = \{ \eta _{rst} \} \in Z^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}})\), respectively. We know that any two such choices yield homotopic maps (Theorem 4.11), but intricate geometries can negatively impact the dimensionality reduction step. Given \({\mathbf {X}}= \{{\mathbf {x}}_1,\ldots , {\mathbf {x}}_N\} \subset B\), the goal is to elucidate the affects on the principal projective coordinates of \(f_\tau ({\mathbf {X}}) \subset {\mathbb {R}}{\mathbf {P}}^n\) and \(f_\eta ({\mathbf {X}}) \subset {\mathbb {C}}{{\mathbf {P}}}^n\). The results are: the real case is essentially independent of the cocycle representative; while the complex case requires the harmonic cocycle.

We begin with a simple observation. Let \({\mathbf {Y}}= \big \{[{\mathbf {y}}_1],\ldots , [{\mathbf {y}}_N]\big \}\subset {\mathbb {F}}{\mathbf {P}}^n\), let A be an \((n+1)\times (n+1)\) orthogonal matrix with entries in \({\mathbb {F}}\), that is \(A\in {\mathsf {O}}(n+1,{\mathbb {F}})\), and let \(A\cdot {\mathbf {Y}}\) denote the set \(\big \{[A\cdot {\mathbf {y}}_1], \ldots , [A\cdot {\mathbf {y}}_N]\big \}\).

Proposition 6.1

Let \(A\in {\mathsf {O}}(n+1,{\mathbb {F}})\) and let \({\mathbf {Y}}\subset {\mathbb {F}}{\mathbf {P}}^n\) be finite. Then

$$\begin{aligned} \mathtt{PrinProjComps}(A\cdot {\mathbf {Y}}) = A\cdot \mathtt{PrinProjComps}({\mathbf {Y}}). \end{aligned}$$

Proof

Since A is an orthogonal matrix, then

$$\begin{aligned} {\mathsf {Cov}}(A\cdot {\mathbf {Y}}) = A \cdot {\mathsf {Cov}} ({\mathbf {Y}}) \cdot A^\dag . \end{aligned}$$

Hence, if \({\mathbf {u}}\) is an eigenvector of \({\mathsf {Cov}}({\mathbf {Y}})\), then \(A\cdot {\mathbf {u}}\) is an eigenvector of \({\mathsf {Cov}}(A\cdot {\mathbf {Y}})\) with the same eigenvalue and therefore, if \(\mathtt{LastProjComp}({\mathbf {Y}},{\mathbb {F}}{\mathbf {P}}^n) = [{\mathbf {v}}_n]\), then

$$\begin{aligned} \mathtt{LastProjComp}(A\cdot {\mathbf {Y}},{\mathbb {F}}{\mathbf {P}}^n) = [A\cdot {\mathbf {v}}_n]. \end{aligned}$$

Since the remaining principal projective components are computed in the same fashion, after the appropriate orthogonal projections, the result follows.\(\square \)

6.1 The Real Case is Independent of the Cocycle Representative

Let \(\alpha = \{\alpha _r\} \in C^0({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}/2)\) and let \({\widetilde{\tau }} = \tau + \delta ^0(\alpha )\). It follows that for \(b\in U_j\)

$$\begin{aligned} f_{{\widetilde{\tau }}}(b)= & {} \big [ (-1)^{{\widetilde{\tau }}_{0j}}\sqrt{\varphi _0(b)} : \cdots : (-1)^{{\widetilde{\tau }}_{nj}}\sqrt{\varphi _n(b)} \big ] \\= & {} \big [ (-1)^{\tau _{0j} + \alpha _0}\sqrt{\varphi _0(b)} : \cdots : (-1)^{\tau _{nj} + \alpha _n}\sqrt{\varphi _n(b)} \big ]. \end{aligned}$$

Hence, if \(f_\tau ({\mathbf {X}}) = \big \{[{\mathbf {y}}_1],\ldots , [{\mathbf {y}}_N]\big \}\) and

$$\begin{aligned} A_\alpha = {\begin{bmatrix}(-1)^{\alpha _0}&0 \\&\ddots&\\ 0&(-1)^{\alpha _n}\end{bmatrix}}, \end{aligned}$$

then \(f_{{\widetilde{\tau }}}({\mathbf {X}}) = \big \{[A_\alpha \cdot {\mathbf {y}}_1] ,\ldots , [A_\alpha \cdot {\mathbf {y}}_N]\big \} = A_\alpha \cdot f_\tau ({\mathbf {X}})\). This shows that

$$\begin{aligned} \mathtt{PrinProjComps}(f_{{\widetilde{\tau }}}({\mathbf {X}})) = A_\alpha \cdot \mathtt{PrinProjComps}(f_\tau ({\mathbf {X}})), \end{aligned}$$

which implies, in particular, that the profiles of cumulative variance for \(f_{{\widetilde{\tau }}}({\mathbf {X}})\) and \(f_\tau ({\mathbf {X}})\) are identical. Moreover, the resulting projective coordinates for both point-clouds differ by the isometry of \({\mathbb {F}}{\mathbf {P}}^n\) induced by \(A_\alpha \).

6.2 The Harmonic Representative is Required for the Complex Case

Just as we did in Sect. 3.5 (Geometric Interpretation), given \(\eta = \{\eta _{rst}\}\in Z^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}})\) we can express \(f_\eta :B \longrightarrow {\mathbb {C}}{{\mathbf {P}}}^n\) as

figure p

where \(\varphi \) is defined in (10) and \(F_\eta :|{\mathcal {N}}({\mathcal {U}})|\longrightarrow {\mathbb {C}}{{\mathbf {P}}}^n\) is given (in barycentric coordinates) on the open star of a vertex \({\mathbf {v}}_j\) by

$$\begin{aligned} F_\eta (x_0,\ldots , x_n) = \Big [ \sqrt{x_0}\cdot e^{2\pi i \sum \limits _t (x_t\cdot \eta _{0jt})} : \cdots :\sqrt{x_n}\cdot e^{2\pi i \sum \limits _t (x_t \cdot \eta _{njt})} \Big ]. \end{aligned}$$

Let us describe the local behavior of \(F_\eta \) when restricted to the 2-skeleton of \(|{\mathcal {N}}({\mathcal {U}})|\). To this end, let \(\sigma \) be the 2-simplex of \(|{\mathcal {N}}({\mathcal {U}})|\) spanned by the vertices \({\mathbf {v}}_r, {\mathbf {v}}_s, {\mathbf {v}}_t\), with \(0\le r< s < t\le n\). It follows that \(F_\eta :\sigma \longrightarrow {\mathbb {C}}{{\mathbf {P}}}^n\) can be written as

$$\begin{aligned} F_\eta (x_r,x_s,x_t) = \big [ \sqrt{x_r} : \sqrt{x_s} \cdot e^{-2\pi i\cdot \eta _{rst}\cdot x_t} : \sqrt{x_t} \cdot e^{2\pi i \cdot \eta _{rst}\cdot x_s} \big ] \end{aligned}$$
(15)

with the understanding that only the potentially-nonzero entries appear. Furthermore, if we fix \(0< c < 1\) and consider the straight line in \(\sigma \) given by

$$\begin{aligned} L_c = \big \{(1-c,x, c-x) : 0 \le x \le c \big \}, \end{aligned}$$

then \(F_\eta :L_c\longrightarrow {\mathbb {C}}{{\mathbf {P}}}^n \) can be written as

$$\begin{aligned} F_\eta (x)= & {} \Big [ \sqrt{1-c}\; :\; \sqrt{x} \cdot e^{2\pi i (x-c)\eta _{rst}}\; :\; \sqrt{c-x}\cdot e^{2\pi i \cdot x \cdot \eta _{rst}} \Big ] \\= & {} \Big [ \sqrt{1-c}\cdot e^{-2\pi i \cdot x \cdot \eta _{rst}} \;:\; \sqrt{x}\cdot e^{-2\pi i \cdot c\cdot \eta _{rst}}\; :\; \sqrt{c - x} \Big ], \end{aligned}$$

which parameterizes a spiral with radius \(\sqrt{1-c}\) and winding number \(\big \lfloor c\cdot |\eta _{rst}| \big \rfloor \). Hence, as each \(|\eta _{rst}|\) gets larger, \(F_\eta \) becomes increasingly highly-nonlinear on the 2-simplices of \(|{\mathcal {N}}({\mathcal {U}})|\). As a consequence, the dimensionality reduction scheme furnished by principal projective components is less likely to work as it relies on a (global) linear approximation. Let us illustrate this phenomenon via an example.

Example

Let \(B = S^2\) be the unit sphere in \({\mathbb {R}}^3\), and for \(r\in \{0,1,2,3\}\) let \(U_r\subset S^2\) be the geodesic open ball of radius \( \arccos (-1/3)\) centered at

$$\begin{aligned} \ell _0 = {\begin{bmatrix}0 \\ 0 \\ 1\end{bmatrix}} , \;\; \ell _1 = \frac{1}{3}{\begin{bmatrix}2\sqrt{2} \\ 0 \\ -1\end{bmatrix}} , \;\; \ell _2 = \frac{1}{3}{\begin{bmatrix} -\sqrt{2} \\ \sqrt{6} \\ -1\end{bmatrix}} , \;\; \ell _3 = \frac{1}{3}{\begin{bmatrix}-\sqrt{2} \\ -\sqrt{6} \\ -1\end{bmatrix}}, \end{aligned}$$

respectively. It follows that \({\mathcal {U}}= \{U_0,U_1,U_2,U_3\}\) is an open cover of of \(S^2\), and that \({\mathcal {N}}({\mathcal {U}})\) is the boundary of the 3-simplex. Therefore, if

$$\begin{aligned} \sigma _0 = \{0,1,2\} , \;\; \sigma _1 = \{0,2,3\} , \;\; \sigma _2 = \{0,1,3\} , \;\; \sigma _3 = \{1,2,3\} \end{aligned}$$

denote the 2-simplices of \({\mathcal {N}}({\mathcal {U}})\) and \(\{\eta ^0 ,\eta ^1,\eta ^2, \eta ^3\}\) is the basis for \(C^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}})\) of indicator functions, then each \(\eta ^r\) is a cocycle whose cohomology class generates

$$\begin{aligned} H^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}) \cong {\mathbb {Z}}. \end{aligned}$$

Moreover, \(\big \{\eta ^0 - \eta ^1,\eta ^0 + \eta ^2,\eta ^0 + \eta ^3 \big \}\) is a basis for \(B^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}})\) and therefore

$$\begin{aligned} {[}\eta ^0] = [\eta ^1] = - [\eta ^2] = -[\eta ^3]. \end{aligned}$$

Consider the map \(f_\eta :S^2 \longrightarrow {\mathbb {C}}{{\mathbf {P}}}^3\) associated to \(\eta = \eta ^0\); the results will be similar for the other \(\eta ^r\)’s. We show in Fig. 17 the computed \({\mathbb {C}}{{\mathbf {P}}}^1\) coordinates of \(f_\eta ({\mathbf {X}})\) for a random sample \({\mathbf {X}}\subset S^2\) with 10,000 points. As one can see, the homotopy type of the resulting map is correct, but the distances are completely distorted.

Fig. 17
figure 17

\({\mathbb {C}}{{\mathbf {P}}}^1\) coordinates for points on the 2-sphere using the map \(f_\eta \) associated to the integer cocycle \(\eta = \eta ^0\). This shows the inadequacy of the integer cocycle; see Fig. 18 for comparison. Please refer to an electronic version for colors

The main difference between the real and complex cases is that the former is locally linear, while the latter has local nonlinearities arising from the terms

$$\begin{aligned} \exp \big (2\pi i \cdot \eta _{rst} \cdot x_t \big ). \end{aligned}$$

The tempting conclusion would be then to choose the cocycle representative \(\eta = \{\eta _{rst}\} \in Z^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}})\) that makes \(F_\eta \) as locally linear as possible. This can be achieved by making each \(|\eta _{rst}|\) small. The problem—as in the sphere example—is that since \(\eta _{rst} \in {\mathbb {Z}}\), then even this choice is inadequate. What we will see now is that the integer constraint can be relaxed via Hodge theory (see, for instance, [24, Sect. 2]).

6.2.1 Harmonic Smoothing

Let K be a finite simplicial complex. Then for each \(n\ge 0\) the group of n-cochains \(C^n(K;{\mathbb {R}})\) is a finite dimensional vector space over \({\mathbb {R}}\), and hence can be endowed with an inner product. A common choice is

$$\begin{aligned} \langle \beta _1,\beta _2\rangle _n = \sum _{\sigma } \beta _1(\sigma )\beta _2(\sigma ), \end{aligned}$$

where \(\beta _1,\beta _2 \in C^n(K;{\mathbb {R}})\) and the sum ranges over all n-simplices \(\sigma \) of K. In particular we have the induced norm

$$\begin{aligned} \Vert \beta \Vert ^2 = \sum _{\sigma } |\beta (\sigma )|^2. \end{aligned}$$

Each boundary map \(\delta ^n :C^n(K;{\mathbb {R}}) \longrightarrow C^{n+1}(K;{\mathbb {R}})\) is therefore a linear transformation between inner-product spaces, and hence has an associated dual map \(d_{n+1} :C^{n+1}(K;{\mathbb {R}}) \longrightarrow C^n(K;{\mathbb {R}})\) uniquely determined by the identity

$$\begin{aligned} \big \langle \,\delta ^n(\nu ), \beta \,\big \rangle _{n+1} = \big \langle \,\nu , d_{n+1}(\beta )\,\big \rangle _n \end{aligned}$$

for all \(\nu \in C^n(K;{\mathbb {R}})\) and all \(\beta \in C^{n+1}(K;{\mathbb {R}})\). The Hodge Laplacian \(\Delta _n\) is the endomorphism of \(C^n(K;{\mathbb {R}})\) defined by the formula

$$\begin{aligned} \Delta _n = d_{n+1}\circ \delta ^n \;+\; \delta ^{n-1}\circ d_n \end{aligned}$$

and a cochain \(\theta \in C^n(K;{\mathbb {R}})\) is said to be harmonic if \(\Delta _n(\theta ) = 0\). A simple linear algebra argument shows that harmonic cochains can be characterized as follows:

Proposition 6.2

\(\theta \in C^n(K;{\mathbb {R}})\) is harmonic if and only if

$$\begin{aligned} d_n(\theta ) = 0\;\;\; \text{ and } \;\;\; \delta ^n(\theta )= 0. \end{aligned}$$

That is, harmonic cochains are in particular cocycles. Moreover,

Theorem 6.3

Every class \([\beta ] \in H^n(K;{\mathbb {R}})\) is represented by a unique harmonic cocycle \(\theta \in Z^n(K;{\mathbb {R}})\) satisfying \(\theta = \beta - \delta ^{n-1}(\nu ^*)\), where

$$\begin{aligned} \nu ^* = {{\mathrm{argmin}}}\big \{ \big \Vert \beta - \delta ^{n-1}(\nu )\big \Vert : \nu \in C^{n-1}(K;{\mathbb {R}}) \big \}. \end{aligned}$$

In other words, given \(\beta \in Z^n(K;{\mathbb {R}})\), \(\theta \) is obtained by projecting \(\beta \) orthogonally onto the orthogonal complement of \(B^n(K;{\mathbb {R}})\) in \(Z^n(K;{\mathbb {R}})\).

Let us now go back to our original set up: A covering \({\mathcal {U}} = \{U_r\}\) for a space B, a partition of unity \(\{\varphi _r\}\) dominated by \({\mathcal {U}}\) and a class \([\eta ] \in H^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}})\). The inclusion \(\jmath :{\mathbb {Z}}\hookrightarrow {\mathbb {R}}\) induces a homomorphism

$$\begin{aligned} \jmath ^*:H^2({\mathcal {N}}({\mathcal {U}});{\mathbb {Z}}) \longrightarrow H^2({\mathcal {N}}({\mathcal {U}});{\mathbb {R}}) \end{aligned}$$

and if \(\beta \in \jmath ^*([\eta ])\), then there exists \(\nu \in C^1({\mathcal {N}}({\mathcal {U}});{\mathbb {R}})\) so that \(\jmath ^\#(\eta ) = \beta + \delta ^1(\nu )\).

Lemma 6.4

Let \(\omega = \{\omega _{rs}\}\) and \({\widetilde{\omega }} = \{{\widetilde{\omega }}_{rs}\}\) be the sets of functions

$$\begin{aligned} \begin{array}{llll} \omega _{rs} :&{} U_r \cap U_s &{} \longrightarrow &{}{\mathbb {C}}^\times \\ &{} b &{} \mapsto &{} \exp \big \{2\pi i \sum \limits _t \varphi _t(b)\eta _{rst}\big \} \\ \\ {\widetilde{\omega }}_{rs} :&{} U_r \cap U_s &{} \longrightarrow &{} {\mathbb {C}}^\times \\ &{} b &{} \mapsto &{} \exp \big \{2\pi i\big (\nu _{rs} + \sum \limits _t \varphi _t(b)\beta _{rst}\big )\big \}, \end{array} \end{aligned}$$

then \(\omega ,{\widetilde{\omega }} \in \check{C}^1({\mathcal {U}};{\mathscr {C}}_{\mathbb {C}}^\times )\) are cohomologous Čech cocycles.

Proof

Since \(\omega \) is a cocycle, it is enough to check that \(\omega \) and \({\widetilde{\omega }}\) are cohomologous. To this end let \(\mu = \{\mu _r\}\in \check{C}^0({\mathcal {U}};{\mathscr {C}}_{\mathbb {C}}^\times )\), where

$$\begin{aligned} \mu _r(b) = \exp \Big \{2\pi i \sum _t \varphi _t(b)\cdot \nu _{rt}\Big \}, \quad b\in U_r. \end{aligned}$$

Since for every \(U_r \cap U_t \ne \emptyset \)

$$\begin{aligned} \sum _t \varphi _t \cdot n_{rst}= & {} \sum _t \varphi _t \cdot \big (\beta _{rst} + \delta ^1(\nu )_{rst}\big ) \\= & {} \sum _t \varphi _t \cdot (\beta _{rst} + \nu _{rs} - \nu _{rt} + \nu _{st}) \\= & {} \nu _{rs} + \sum _t \varphi _t \cdot \beta _{rst} + \sum _t \varphi _t \cdot \nu _{st} - \sum _t \varphi _t \cdot \nu _{rt}, \end{aligned}$$

then

$$\begin{aligned} \omega _{rs} = {\widetilde{\omega }}_{rs} \cdot \frac{\mu _s}{\mu _r} = {\widetilde{\omega }}_{rs} \cdot \delta ^0(\mu )_{rs} \end{aligned}$$

and the result follows.\(\square \)

Let \(\theta \in Z^2({\mathcal {N}}({\mathcal {U}});{\mathbb {R}})\) be the harmonic cocycle representing the class

$$\begin{aligned} \jmath ^*([\eta ]) \in H^2({\mathcal {N}}({\mathcal {U}});{\mathbb {R}}), \end{aligned}$$

let \( \nu \in C^1({\mathcal {N}}({\mathcal {U}});{\mathbb {R}})\) be such that \( \jmath ^\#(\eta ) - \theta = \delta ^1(\nu ) \) and let \(f_{\theta ,\nu } :B \longrightarrow {\mathbb {C}}{{\mathbf {P}}}^n\) be given on \(b\in U_j\)

$$\begin{aligned} f_{\theta ,\nu }(b) = \Big [ \sqrt{\varphi _0(b)}\cdot e^{2\pi i \big (\nu _{0j} + \sum \nolimits _t \varphi _t(b)\theta _{0jt}\big )} : \cdots : \sqrt{\varphi _n(b)}\cdot e^{2\pi i \big (\nu _{nj} + \sum \nolimits _t \varphi _t(b)\theta _{njt}\big )} \Big ].\nonumber \\ \end{aligned}$$
(16)

It follows that \(f_\eta \) and \( f_{\theta ,\nu }\) are homotopic, \(f_{\theta ,\nu }\) is as locally linear as possible, and for different choices of \(\nu \) the resulting principal projective coordinates of \(f_{\theta ,\nu }({\mathbf {X}})\) differ by a linear (diagonal) isometry.

We now revisit the 2-sphere example. One can check that

$$\begin{aligned} \theta = \jmath ^\#\big (\eta ^0 + \eta ^1 - \eta ^2 - \eta ^3\big )/4 \end{aligned}$$

is the harmonic cocycle representing the cohomology class

$$\begin{aligned}\jmath ^* \big ( \big [ \eta ^0 \big ]\big ) \in H^2({\mathcal {N}}({\mathcal {U}}); {\mathbb {R}}). \end{aligned}$$

Let \(\nu \in C^1({\mathcal {N}}({\mathcal {U}});{\mathbb {R}})\) be so that \(\theta = \jmath ^\#(\eta ^0) - \delta ^1(\nu )\) and let \(f_{\theta ,\nu } :S^2 \longrightarrow {\mathbb {C}}{{\mathbf {P}}}^3\) be as in (16). We show in Fig. 18 the computed \({\mathbb {C}}{{\mathbf {P}}}^1\) coordinates of \(f_{\theta ,\nu }({\mathbf {X}})\) for the finite random sample \({\mathbf {X}}\subset S^2\).

Fig. 18
figure 18

\({\mathbb {C}}{{\mathbf {P}}}^1\) coordinates for \({\mathbf {X}}\subset S^2\) using the harmonic cocycle \(\theta \); see Fig. 17 for comparison. Please refer to an electronic version for colors.

7 Multiscale Projective Coordinates via Persistent Cohomology of Sparse Filtrations

The goal of this section is to show how one can use persistent cohomology to construct multiscale projective coordinates.

7.1 Greedy Permutations

Let \(\underline{k} = \{0,\ldots ,k\}\) for \(k\in {\mathbb {Z}}_{\ge 0}\), let \(({\mathbb {M}},{\mathbf {d}})\) be a metric space and let \(X\subset {\mathbb {M}}\) be a finite subset with \(n+1\) elements. A greedy permutation on X is a bijection \(\sigma _g:\underline{n} \longrightarrow X\) which satisfies

$$\begin{aligned} \sigma _g(s+1) = \mathop {{{\mathrm{argmax}}}}\limits _{x\in X}\, {\mathbf {d}} \big (x, \sigma _g(\underline{s})\big ) ,\;\;\; s =0,\ldots , n-1. \end{aligned}$$

7.2 Sparse Filtrations

Given a greedy permutation \(\sigma _g : \underline{n} \longrightarrow X \), let \(x_s = \sigma _g(s)\) and \(X_s = \sigma _g(\underline{s})\). The insertion radius of \(x_s\), denoted \(\lambda _s\), is defined as

$$\begin{aligned} \lambda _s = \left\{ \begin{array}{lll} \infty &{} \text{ if } &{} s = 0, \\ {\mathbf {d}}(x_s , X_{s-1}) &{} \text{ if } &{} s>0. \end{array} \right. \end{aligned}$$

If follows that \(\infty =\lambda _0 > \lambda _1 \ge \cdots \ge \lambda _n \) . Fix \(0< \epsilon < 1\) and for \(\alpha \ge 0\) define

$$\begin{aligned} r_s(\alpha ) = \left\{ \begin{array}{lll} \alpha &{} \hbox { if } &{} \alpha < \lambda _s (1+\epsilon )/\epsilon ,\\ \lambda _s(1 + \epsilon )/\epsilon &{} \hbox { if }&{} \lambda _s(1+\epsilon )/\epsilon \le \alpha \le \lambda _s(1+\epsilon )^2/\epsilon , \\ 0 &{} \hbox { if }&{} \alpha >\lambda _s(1+\epsilon )^2/\epsilon . \end{array} \right. \end{aligned}$$
(17)

In particular \(r_0(\alpha ) = \alpha \) for all \(\alpha \ge 0\), and for \(s\ge 1\) the graph of \(r_s\) is shown in Fig. 19.

Fig. 19
figure 19

Function \(r_s\)

Definition 7.1

For \(\alpha \ge 0\) let

$$\begin{aligned} B_s^\alpha = \big \{b\in {\mathbb {M}} \; : \; {\mathbf {d}}(b,x_s) < r_s(\alpha )\big \}. \end{aligned}$$

It follows that \(S_\alpha = \big \{ s\in \underline{n} : \lambda _s \ge \epsilon \alpha /(1+\epsilon )^2\big \}\) is the collection of indices s for which \(B_s^\alpha \ne \emptyset \). Moreover,

$$\begin{aligned} {\mathcal {B}}^\alpha = \{B_s^\alpha \; : \; s \in S_\alpha \} \end{aligned}$$

satisfies \(X \subset \bigcup {\mathcal {B}}^\alpha \) for each \(\alpha > 0\), and it is a sparse covering in the sense that as \(\alpha \) increases there are fewer balls in \({\mathcal {B}}^\alpha \), but of larger radii. Moreover, it is a \((1+\epsilon )\)-approximation of the \(\alpha \)-offset \(X^\alpha = \{b\in {\mathbb {M}} \; : \; {\mathbf {d}}(b,X) < \alpha \}\):

Proposition 7.2

[6, Cor. 2] If \(\beta \ge (1+\epsilon )\alpha \), then

$$\begin{aligned} \bigcup {\mathcal {B}}^\alpha \subset X^\alpha \subset \bigcup {\mathcal {B}}^\beta . \end{aligned}$$

Let

$$\begin{aligned} U^\alpha _s = \bigcup _{0 \le \lambda \le \alpha } \big ( B_s^\lambda \times \{\lambda \} \big ) \;\;\; \text{ and } \;\;\; {\mathcal {U}}^\alpha = \big \{ U_s^\alpha : s \in \underline{n}\big \}. \end{aligned}$$

It follows that \({\mathcal {N}}({\mathcal {U}}^\alpha )\subset {\mathcal {N}}({\mathcal {U}}^\beta )\) whenever \(\alpha \le \beta \).

Definition 7.3

The sparse Čech filtration with sparsity parameter \(0<\epsilon <1\), induced by the greedy permutation \(\sigma _g :\underline{n} \longrightarrow X\), is the filtered simplicial complex

$$\begin{aligned} \check{{\mathcal {C}}}(\sigma _g, \epsilon ) = \big \{ \check{C}_\alpha (\sigma _g, \epsilon ):\alpha \ge 0 \big \}, \end{aligned}$$

where

$$\begin{aligned} \check{{\mathcal {C}}}_\alpha (\sigma _g, \epsilon ) = {\mathcal {N}}({\mathcal {U}}^\alpha ). \end{aligned}$$

7.3 Multiscale Projective Coordinates

We will show now how the persistent cohomology of \(\check{{\mathcal {C}}}(\sigma _g , \epsilon )\) can be used to compute multiscale compatible classifying maps. The first thing to notice is that projection onto the first coordinate

$$\begin{aligned} \bigcup {\mathcal {U}}^\alpha\longrightarrow & {} \bigcup {\mathcal {B}}^{\alpha } \\ (b,\lambda )\mapsto & {} b \end{aligned}$$

is a deformation retraction if one regards \(B_s^\alpha \) as a subset of \(U_s^{\alpha }\) via the inclusion

$$\begin{aligned} \begin{array}{cccc} B_s^\alpha &{} \hookrightarrow &{} U^\alpha _s \\ b &{}\mapsto &{} (b,\alpha ). \end{array} \end{aligned}$$
(18)

Theorem 7.4

Let \(({\mathbb {M}}, {\mathbf {d}})\) be a metric space and let \(X\subset {\mathbb {M}}\) be a subset with \(n+1\) points. Given a greedy permutation \(\sigma _g :\underline{n} \longrightarrow X\) and a sparsity parameter \(0< \epsilon < 1\), let \(r_s(\alpha )\) for \(\alpha \ge 0\) be as in (17). If \(\check{{\mathcal {C}}}(\sigma _g, \epsilon )\) is the resulting sparse Čech filtration and

$$\begin{aligned} \varphi ^\alpha _s(b) = \frac{\left| r_s(\alpha ) - {\mathbf {d}}(b,x_s) \right| _{+}^2}{\sum \limits _{t\in \underline{n}} \left| r_t(\alpha ) - {\mathbf {d}}(b,x_t) \right| _{+}^2}\quad \mathrm{{for}} \quad s\in \underline{n} , \;\; b\in \bigcup {\mathcal {B}}^\alpha , \end{aligned}$$

then we have well-defined maps

and

where \(\theta = \{\theta _{rst}\} \in Z^2\big (\check{C}_\alpha (\sigma _g,\epsilon ); {\mathbb {R}}\big )\) is the harmonic cocycle representing \(\jmath ^*([\eta ]) \in H^2\big (\check{C}_\alpha (\sigma _g,\epsilon );{\mathbb {R}}\big )\) and \(\nu = \{\nu _{rt}\} \in C^1\big (\check{C}_\alpha (\sigma _g,\epsilon );{\mathbb {R}}\big ) \) is so that \(\theta = \jmath ^\#(\eta ) - \delta ^1(\nu )\). Moreover, if each \(B^\alpha _s \in {\mathcal {B}}^\alpha \) is connected, then \( {\mathbf {w}}_1^\alpha \) is injective; if in addition each \(B^\alpha _s\) is locally path-connected and simply connected, and each \(B^\alpha _r \cap B^\alpha _t\) is either empty or connected, then \( {\mathbf {c}}_1^\alpha \) is injective.

Proof

The first thing to notice is that the collection of continuous maps

$$\begin{aligned} \begin{array}{llll} \varphi _s&{} :\bigcup {\mathcal {U}}^\alpha &{} \longrightarrow &{} {\mathbb {R}}\\ &{}(b,\lambda ) &{} \mapsto &{} \varphi _s^\lambda (b) \end{array} , \;\;\;\; s\in \underline{n}, \end{aligned}$$

is a partition of unity dominated by \({\mathcal {U}}^\alpha \). The theorem follows from combining Theorem 4.11 and the following two facts: the inclusion \(\bigcup {\mathcal {B}}^\alpha \hookrightarrow \bigcup {\mathcal {U}}^\alpha \) from (18) induces a bijection

$$\begin{aligned}\big [\bigcup {\mathcal {U}}^\alpha , {\mathbb {F}}{\mathbf {P}}^\infty \big ] \longrightarrow \big [\bigcup {\mathcal {B}}^\alpha , {\mathbb {F}}{\mathbf {P}}^\infty \big ] \end{aligned}$$

and the necessary connectedness conditions are satisfied by \({\mathcal {U}}^\alpha \) if they are satisfied by \({\mathcal {B}}^\alpha \).\(\square \)

Remark 7.5

As \(\alpha \) increases, the number of potentially nontrivial dimensions in the images of \(f_\tau ^\alpha \) and \(f_{\theta ,\nu }^\alpha \) decrease. Indeed, since \(\varphi _s^\alpha \) is identically zero if and only if \(B_s^\alpha = \emptyset \), it follows that for any \(b\in \bigcup {\mathcal {B}}^\alpha \) the only potentially non-zero entries in either \(f^\alpha _\tau (b)\) or \(f^\alpha _{\theta ,\nu }(b)\) correspond to the indices in

$$\begin{aligned} S_\alpha = \big \{s \in \underline{n} \; : \; \lambda _s \ge \epsilon \alpha / (1+\epsilon )^2\big \}. \end{aligned}$$

The observation follows from the fact that the sequence \(\{\lambda _s\}_{s\in \underline{n}}\) is non-increasing, and monotonically decreasing for generic X.

Proposition 7.6

Let \( \alpha \le \beta \), then the diagrams

figure q

are commutative.

As a consequence, if for \(\alpha = \alpha _0< \cdots< \alpha _{\ell -1} < \alpha _\ell = \beta \) one has classes

figure r

then the diagram

figure s

commutes up to a homotopy which perhaps takes place in a higher dimensional projective space. The same is true in dimension one with \({\mathbb {Z}}/2\) coefficients. The persistent cohomology of the sparse Čech filtration \(\check{{\mathcal {C}}}(\sigma _g, \epsilon )\) now becomes relevant: over \({\mathbb {Z}}/2\), a 1-dimensional cohomology class with nonzero persistence yields a multiscale system of compatible (up to homotopy) \({\mathbb {R}}{\mathbf {P}}^n\) coordinates. Constructing multiscale \({\mathbb {C}}{{\mathbf {P}}}^n\) coordinates from a persistent cohomology computation for \(k=2\) requires a bit more work, as the barcode decomposition is not valid for integer coefficients. Let p be a prime and consider the short exact sequence of abelian groups

figure t

The induced homomorphism

$$\begin{aligned} H^2\big ({\mathcal {\check{C}}}_\alpha (\sigma _g, \epsilon );{\mathbb {Z}}\big ) \longrightarrow H^2\big ({\mathcal {\check{C}}}_\alpha (\sigma _g, \epsilon );{\mathbb {Z}}/p\big ) \end{aligned}$$

will be an epimorphism whenever \(H^3\big ({\mathcal {\check{C}}}_\alpha (\sigma _g, \epsilon );{\mathbb {Z}}\big )\) has no p-torsion. The universal coefficient theorem implies the following

Proposition 7.7

Let p be a prime not dividing the order of the torsion subgroup of \(H_2({\mathcal {\check{C}}}_\alpha (\sigma _g, \epsilon );{\mathbb {Z}})\). Then the homomorphism

$$\begin{aligned} H^2({\mathcal {\check{C}}}_\alpha (\sigma _g, \epsilon );{\mathbb {Z}}) \longrightarrow H^2({\mathcal {\check{C}}}_\alpha (\sigma _g, \epsilon );{\mathbb {Z}}/p) \end{aligned}$$

is surjective.

Now one can follow the strategy in [13, Sects. 2.4 and 2.5] for choosing p, lifting to integer coefficients and constructing the harmonic representative. The solution to the harmonic representative problem is plugged into (16).

Definition 7.8

The sparse Rips filtration, with sparsity parameter \(0<\epsilon <1\), induced by the greedy permutation \(\sigma _g :\underline{n} \longrightarrow X\) is the filtered simplicial complex

$$\begin{aligned} {\mathcal {R}}(\sigma _g, \epsilon ) = \big \{ R_\alpha (\sigma _g, \epsilon ): \alpha \ge 0 \big \}, \end{aligned}$$

where

$$\begin{aligned} R_\alpha (\sigma _g,\epsilon ) = \big \{ \{s_0,\ldots , s_k\} \subset \underline{n} : U_{s_r}^\alpha \cap U_{s_t}^\alpha \ne \emptyset \text{ for } \text{ all } 0\le r,t \le k \big \}. \end{aligned}$$

Remark 7.9

It follows that for all \(\beta \ge 0\)

$$\begin{aligned} \check{C}_\beta (\sigma _g , \epsilon ) \subset R_\beta (\sigma _g, \epsilon ) \end{aligned}$$

and if \(\alpha \) is small enough (as the cones \(U_s^\alpha \) stop growing) we also get the inclusion \(R_\alpha (\sigma _g, \epsilon ) \subset \check{C}_{2\alpha }(\sigma _g,\epsilon ).\) Then for each abelian group G and integer \(k\ge 0\) we get a commutative diagram

figure u

which shows that cohomology classes in the sparse Rips filtration with long enough persistence, and small enough death time, yield nontrivial persistent cohomology classes in the sparse Čech filtration. This is useful because the persistent cohomology of the sparse Rips filtration is easier to compute in practice.

Example Let \({\mathbf {X}}\) be a uniform random sample with 2500 points from the 2-dimensional torus \(S^1\times S^1 \subset {\mathbb {C}}^2\), endowed with the metric \({\mathbf {d}}\) given by

$$\begin{aligned} {\mathbf {d}}\big ((z_1,w_1) ,(z_2, w_2)\big ) = \sqrt{\big |\arccos (\langle z_1,z_2\rangle )\big |^2 + \big |\arccos (\langle w_1,w_2\rangle )\big |^2 }. \end{aligned}$$

There are two things we would like to illustrate with this example: First, that one does not need the entire data set \({\mathbf {X}}\) to compute appropriate classifying maps \(f^\alpha _\tau \), in fact a small subsample suffices; and second, that one can use the sparse Rips filtration instead of the Čech filtration, which simplifies computations. Indeed, let \(n= 34\) and let

$$\begin{aligned}X = \{x_0,\ldots , x_n\}\subset {\mathbf {X}}\end{aligned}$$

be obtained through maxmin sampling. Notice that X is \(1.4\%\) of the total size of \({\mathbf {X}}\) and that \(\sigma _g:\underline{n} \longrightarrow X\) given by \(\sigma _g(s) = x_s\) is a greedy permutation on X. We let \(\epsilon = 0.01\) since the sample is already sparse. Computing the 1-dimensional persistent cohomology with coefficients in \({\mathbb {Z}}/2\) for the sparse Rips filtration \({\mathcal {R}}(\sigma _g, \epsilon )\), yields the barcode shown in Fig. 20 (left).

Fig. 20
figure 20

\({\mathbb {R}}{\mathbf {P}}^2\) coordinates for \({\mathbf {X}}\subset S^1 \times S^1\), from the 1-dimensional \({\mathbb {Z}}/2\)-persistent cohomology of a sparse rips filtration. Left: Computed barcode, Right: resulting \({\mathbb {R}}{\mathbf {P}}^2\) coordinates induced by classes with large persistence. In both cases, the \({\mathbb {R}}{\mathbf {P}}^2\) coordinates of a point \((z,w) \in {\mathbf {X}}\) are colored according to \(\arg (z)\in [0,2\pi )\). Please refer to an electronic version for colors.

For this calculation we first determine the birth-times of the edges as in [6, Alg. 3], and input them as a distance matrix into Dionysus’ persistent cohomology algorithm [29]. After selecting the two classes with the longest persistence, Dionysus outputs cocycle representatives \(\mu _1\) and \(\mu _2\) at cohomological birth \(\alpha _1, \alpha _2 \approx 1.18\). Now, using the fact that \( \check{C}_\alpha (\sigma _g, \epsilon ) \subset R_\alpha (\sigma _g, \epsilon )\) for all \(\alpha \ge 0\), we have that the induced homomorphism

$$\begin{aligned} C^1 (R_\alpha (\sigma _g, \epsilon ) ; {\mathbb {Z}}/2) \longrightarrow C^1(\check{C}_\alpha (\sigma _g, \epsilon );{\mathbb {Z}}/2) \end{aligned}$$

sends \(\mu _1\) and \(\mu _2\) to \(\tau _1\) and \(\tau _2\), respectively. Moreover, since \(R_\alpha (\sigma _g, \epsilon )\) is connected at \(\alpha = \min \{\alpha _1,\alpha _2\}\) it follows that \({\mathbf {X}}\subset \bigcup {\mathcal {B}}^{\alpha }\), and using the formula from Theorem 7.4 we get the point clouds \(f_{\tau _1}^{\alpha }({\mathbf {X}}), f_{\tau _2}^{\alpha }({\mathbf {X}}) \subset {\mathbb {R}}{\mathbf {P}}^{34}\). The result of computing their \({\mathbb {R}}{\mathbf {P}}^2\) coordinates via principal projective components is shown in Fig. 20 (right).

8 Discussion

We have shown in this paper how 1-dimensional (resp. 2-dimensional) persistent cohomology classes with \({\mathbb {Z}}/2\) coefficients (resp. \({\mathbb {Z}}/p\) coefficients for appropriate primes p) can be used to produce multiscale projective coordinates for data. The main ingredients were: interpreting a given cohomology class as the characteristic class corresponding to a unique isomorphism type of line bundle, and constructing explicit classifying maps from Čech cocycle representatives. In addition, we develop a dimensionality reduction step in projective space in order to lower the target dimension of the original classifying map.

Some questions/directions suggested by the current approach are the following: The case \(H^3(B;{\mathbb {Z}})\) has a similar flavor to the bundle perspective presented here, and can perhaps be addressed using gerbes [20]. On the other hand, since Principal Projective Components is essentially a global fitting procedure, it would be valuable to investigate what local nonlinear dimensionality reduction techniques can be adapted to projective space.