Sheaf-Theoretic Stratification Learning from Geometric and Topological Perspectives

We investigate a sheaf-theoretic interpretation of stratification learning from geometric and topological perspectives. Our main result is the construction of stratification learning algorithms framed in terms of a sheaf on a partially ordered set with the Alexandroff topology. We prove that the resulting decomposition is the unique minimal stratification for which the strata are homogeneous and the given sheaf is constructible. In particular, when we choose to work with the local homology sheaf, our algorithm gives an alternative to the local homology transfer algorithm given in Bendich et al. (Proceedings of the 23rd Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1355–1370, ACM, New York, 2012), and the cohomology stratification algorithm given in Nanda (Found. Comput. Math. 20(2), 195–222, 2020). Additionally, we give examples of stratifications based on the geometric techniques of Breiding et al. (Rev. Mat. Complut. 31(3), 545–593, 2018), illustrating how the sheaf-theoretic approach can be used to study stratifications from both topological and geometric perspectives. This approach also points toward future applications of sheaf theory in the study of topological data analysis by illustrating the utility of the language of sheaf theory in generalizing existing algorithms.


Introduction
Our work is motivated by the following question: Given potentially high-dimensional point cloud samples, can we infer the structures of the underlying data? In the classic setting of manifold learning, we often assume the support for the data is from a low-dimensional space with manifold structure. However, in practice, a significant amount of interesting data contains mixed dimensionality and singularities. To deal with this more general scenario, we assume the data are sampled from a mixture of possibly intersecting manifolds; the objective is to recover the different pieces, often treated as clusters, of the data associated with different manifolds of varying dimensions. Such an objective gives rise to a problem of particular interest in the field of stratification learning. Here, we use the word "stratification learning" loosely to mean an unsupervised, exploratory, clustering process that infers a decomposition of data into disjoint subsets that capture recognizable and meaningful structural information.
Previous work in mathematics has focused on the study of stratified spaces under smooth and continuous settings [14,30] without computational considerations of noisy and discrete datasets. Statistical approaches that rely on inferences of mixture models and local dimension estimation require strict geometric assumptions such as linearity [16,19,29], and may not handle general scenarios with complex singularities. Recently, approaches from topological data analysis [3,5,28], which rely heavily on ingredients from computational [11] and intersection homology [2,4,12], are gaining momentum in stratification learning.
Topological approaches transform the smooth and continuous setting favored by topologists to the noisy and discrete setting familiar to computational topologists in practice. In particular, the local structure of a point cloud (sampled from a stratified space) can be described by a multi-scale notion of local homology [3]; and the point cloud data could be clustered based on how the local homology of nearby sampled points map into one another [5]. Philosophically, our main goal is to find a stratification where any two points in the same strata (or cluster) can not be distinguished by homological methods, and any two points in different strata (different clusters) can be distinguished by homological methods. The majority of the paper will be spent developing a rigorous and computable interpretation of the purposely vague statement "distinguished by homological methods". Furthermore, we will see that our approach to computing the above stratification applies equally well to sheaves other than those based on local homology. As examples, we describe stratification learning with the combinatorially defined sheaf of maximal elements, and the geometrically motivated pre-sheaf of vanishing polynomials. This paper includes the full version of an extended abstract [7], and further extends these results by exploring alternatives to homological stratifications which lie in the sheaf-theoretic framework (Sects. 6 and 7). As our work is an interplay between sheaf theory and stratification, we briefly review various notions of stratification before describing our results.

Stratifications
Given a topological space X , a topological stratification of X is a finite filtration, that is, an increasing sequence of closed subspaces ∅ = X −1 ⊂ X 0 ⊂ · · · ⊂ X d = X , such that for each i, X i − X i−1 is a (possibly empty) open i-dimensional topological manifold. See Fig. 1 for an example of a pinched torus, that is, a torus with points along a geodesic with fixed longitude identified, and a spanning disc glued along the equator.
Ideally, we would compute a topological stratification for a given space. However, if we are restricted to using only homological methods, this is a dubious task. Topological invariants like homology are too rough to detect when a space such as X i − X i−1 is an open i-manifold. A well-known example of a homological manifold that is not a topological manifold can be constructed from a homology 3-sphere with nontrivial fundamental group. The suspension of such a space is a homological manifold, but not a topological manifold, since the links of the suspension points have nontrivial fundamental groups [21, p. 326]. Specifically, the suspension of the Poincaré's homology sphere is a homological manifold but not a topological manifold. In this paper, we will avoid the difficult problem of computing topological stratifications, and instead aim to investigate stratifications which can be computed using homological methods. Therefore, we must first consider a definition of stratification that does not rely on topological conditions which are not distinguished by homology. We begin with an extremely loose definition of stratification (Definition 1.1) which only requires the properties necessary to discuss the constructibility of sheaves (defined in Sect. 2.2). We will then refine our definition of stratification by placing requirements on the constructibility of certain sheaves (Definition 1.4). Definition 1.1 Given a topological space X , a stratification X of X is a finite filtration of X by closed subsets X i : We refer to the space X i − X i−1 as stratum, denoted by S i , and a connected component of S i as a stratum piece.
Suppose we have two stratifications of the topological space X , denoted X and X . We say that X is equivalent to X if each stratum piece of X is equal to a stratum piece of X . Definition 1.2 Given two inequivalent stratifications of X , X and X , we say X is coarser than X , or X refines X, if each stratum piece of X is contained in a stratum piece of X. Figure 3 illustrates some examples of stratifications which are coarser than those in Figs. 1 and 2, as well as a different partition based on local homology transfer algorithm in [5] for the sundial (bottom).
Homological stratification There have been several approaches in topology literature to define homological stratifications. While proving the topological invariance of intersection homology, Goresky and MacPherson defined a type of homological stratification which they call ap-stratification [13,Sect. 4]. There have been several approaches for building on the ideas of Goresky and MacPherson, with applications to computational geometry and topology in mind [4,24]. In this paper, we choose to adopt the perspective of homological stratifications found in [25], with a view toward sheaf theoretic generalizations and applications in topological data analysis.
Consider a filtration ∅ = X −1 ⊂ X 0 ⊂ · · · ⊂ X n = X of a topological space X . We can use relative homology to define a sheaf (the local homology sheaf) which associates to each open set U in X i the relative homology groups H • (X i , X i − U ), for some i. Let L i denote the local homology sheaf on the space X i (see Sect. 5.1 for the definition of the local homology sheaf). Definition 1. 3 We say that a stratification is a homological stratification if L n is locally constant (see Sect. 2.2 for the definition of locally constant) when restricted to X i − X i−1 , for each i. A stratification is a strong homological stratification if for each i both L i and L n are locally constant when restricted to X i − X i−1 . Finally, a stratification is a very strong homological stratification if for each i and every k ≥ i, L k is locally constant when restricted to X i − X i−1 .
As mentioned in [25], it would be interesting to study the relationship between these definitions of homological stratification. We plan to pursue this in a future work. The cohomological stratification given in [24] can be considered as a cohomological analogue of the very strong homological stratification defined above. The utility of this definition is the extent to which it lends itself to the study of topological properties of individual strata. For example, it can be easily shown that the strata of such a stratification are R-(co)homology manifolds (R being the ring with which the local cohomology is computed). The trade off for using the very strong homological stratification is in the number of local (co)homology groups which need to be computed. This is by far the most computationally expensive aspect of the algorithm, and the very strong homological stratification requires one to compute new homology groups for each sheaf L i . By contrast, the homological stratification only requires the computation of local homology groups corresponding to the sheaf L n . In this paper, we choose to study the less rigid (and more computable) notion of homological stratification (see Sect. 4 for more details on computing homological stratifications). Sheaf theoretic stratification The definition of homological stratification naturally lends itself to generalizations, which we now introduce (while delaying formal defini- Fig. 3 Top: A topological stratification of a pinched torus which is coarser than the stratification shown in Fig. 1. Readers familiar with stratification theory will notice that while this is a topological stratification, it is not a locally conelike topological stratified space, also called a cs-space or cs-stratification [15, Def. 1.1]. Middle: An example of a topological stratification of a sundial which is coarser than the stratification shown in Fig. 2. One can check that the coarser stratification is no longer a homological stratification. Bottom: A partition of a sundial into stratum pieces, based on local homology transfer from [5], where we assume an arbitrarily dense sampling of points from the sundial. Notice that the resulting decomposition is not a stratification by our definition, since it is not induced by a filtration by closed subspaces tion of constructible sheaves to Sect. 2.2). The primary observation which illuminates this generalization is that the fundamental mathematical structures (the association of a group or set to an open set and the restriction maps induced by inclusions of open sets) used to construct homological stratifications in [13,24,25] are exactly the formal properties which define a pre-sheaf. Therefore, we will explore analogous constructive stratifications where local homology is replaced with an arbitrary sheaf or pre-sheaf.
The key notion used in the following definition is that of a constructible sheaf. Intuitively, constructibility means that the sheaf can be decomposed into sheaves which are locally constant on various pieces, or stratum, of the given topological space.

Definition 1.4
Suppose F is a sheaf on a topological space X . An F-stratification ("sheaf-stratification") of X is a stratification such that F is constructible with respect to X = S i . A coarsest F-stratification is an F-stratification such that F is not constructible with respect to any coarser stratification.
For general topological spaces, a coarsest F-stratification may not exist, and may not be unique if it does exist. The main focus of this paper will be proving existence and uniqueness results for certain coarsest F-stratifications. The extra structure needed to prove uniqueness is homogeneity of strata, and minimality of stratifications. By working with homogeneous stratifications, we are requiring strata to have a good notion of dimension. By defining a preorder on the set of homogeneous stratifications (Sect. 3), we are able to identify the output of the stratification algorithm described in Sect. 4 as the unique minimal homogeneous stratification with respect to the preorder.

Our Contribution
In this paper, we study stratification learning using the tool of constructible sheaves. As a sheaf is designed to systematically track locally defined data attached to the open sets of a topological space, it seems to be a natural tool in the study of stratification based on local structure of the data. Our contributions are fourfold: 1. We prove the existence of coarsest F-stratifications and the existence and uniqueness of the minimal homogeneous F-stratification for finite T 0 -spaces (Sect. 3). 2. We give an algorithm for computing each of the above stratifications of a finite T 0 -space based on a sheaf-theoretic language (Sect. 4). 3. In particular, when applying the local homology sheaf in our algorithm, we obtain a coarsest homological stratification (Sect. 5.2). 4. We give detailed examples of sheaf-theoretic stratifications based on combinatorial techniques (Sect. 6) and geometric techniques (Sect. 7).
We envision that our abstraction could give rise to a larger class of stratifications beyond homological stratification. For instance, we give examples of a "maximal element-stratification" when the sheaf is defined by considering maximal elements of an open set (Sect. 6) and a "vanishing polynomial" stratification when the (pre)-sheaf is defined with sets of vanishing polynomials (Sect. 7). Moreover, we see the geometric stratifications based on vanishing sets of polynomials as having natural applications to the mapper algorithm of [8,22,27] (see Sect. 7).
Comparison to prior work This paper can be viewed as a continuation of previous works which adapt the stratification and homology theory of Goresky and MacPherson to the realm of topological data analysis. In [25], Rourke and Sanderson give a proof of the topological invariance of intersection homology on PL homology stratifications, and give a recursive process for identifying a homological stratification (defined in [25,Sect. 5]). In [4], Bendich and Harer introduce a persistent version of intersection homology that can be applied to simplicial complexes. In [5], Bendich et al. provide computational approach that yields a stratification of point clouds by computing transfer maps between local homology groups of an open covering of the point cloud. In [24], Nanda uses the machinery of derived categories to study cohomological stratifications based on local cohomology. Motivated by the results of [5,24], we aim to develop a computational approach to the stratifications studied in [25]. Our main results can be summarized as the generalization of homological stratifications of [25] to F-stratifications, and a proof of existence and uniqueness of the minimal homogeneous F-stratification of a finite simplicial complex. When F is the local homology sheaf, we recover the homological stratification described by [25]. While admitting a similar flavor as [24], our work differs from [24] in several important ways. The most obvious difference is our choice to work with homology and sheaves rather than cohomology and cosheaves. More importantly however, we reduce the number of local homology groups which need to be computed. We will investigate the differences between homological, strong homological, and very strong homological stratifications in a future work.
In [5], stratifications of point clouds are defined using persistent local homology and an equivalence based on local homology transfer. This method can easily be adapted to the setting of simplicial complexes by defining two simplices τ and σ to be in the same stratum if there exists a sequence of face/coface relations τ ≤ γ 1 ≥ · · · ≤ γ n ≥ σ , such that each face/coface relation induces an isomorphism of local homology groups. We choose not to take this approach here because the local homology transfer algorithm fails to produce reasonable stratifications for certain topological spaces. For example, the stratification of the sundial example (i.e., a stratified space with boundary) given by local homology transfer (see Fig. 3) is not technically a stratification by our definition, since the 1-dimensional stratum (which in this case is equal to X 1 in the induced filtration) is not closed. In comparison, the current algorithm correctly gives a coarsest homological stratification of this space. The algorithms described in this paper differ from local homology transfer in that we inductively define strata by requiring all restriction maps (transfer maps in a small neighborhood of a point/simplex) of a point/simplex in the said stratum to induce isomorphisms of local homology groups. In this sense, our algorithm assigns a point/simplex to the top stratum if the local homology is unchanged as we move small amounts in "any direction" of the point, while the homology transfer algorithm assigns two points to the same stratum if there exists at least one path connecting them which induces an isomorphism of local homology. Furthermore, the work in [5] uses persistent homology in an essential way so that it is amenable to point cloud data. The current work only brushes with the concept of persistence in Sect. 9. We plan to build on the results of [5,28], and extend the sheaf-theoretic stratification learning perspective described in this paper to the study of stratifications of point cloud data using persistent local homology.

Compact Polyhedra, Finite T 0 -Spaces and Posets
Our broader aim is to compute a clustering of a finite set of points sampled from a compact polyhedron, based on the coarsest F-stratification of a finite T 0 -space built from the point set. In this paper, we avoid discussion of sampling theory, and assume the finite point set forms the vertex set of a triangulated compact polyhedron. The finite T 0 -space is the set of simplices of the triangulation, with the corresponding partial order given by the face/coface relation (τ ≤ σ if simplex τ is a face of simplex σ ). To describe this correspondence in more detail, we first consider the connection between compact polyhedra and finite simplicial complexes. We then consider the correspondence between simplicial complexes and T 0 -topological spaces.

Compact polyhedra and triangulations
A compact polyhedron is a topological space which is homeomorphic to a finite simplicial complex. A triangulation of a compact polyhedron is a finite simplicial complex K and a homeomorphism from K to the polyhedron.
T 0 -spaces A T 0 -space is a topological space such that for each pair of distinct points, there exists an open set containing one but not the other. The correspondence between finite T 0 -spaces and simplicial complexes is detailed in [20]: 1. For each finite T 0 -space X there exists a (finite) simplicial complex K and a weak homotopy equivalence f : |K | → X . 2. For each finite simplicial complex K there exists a finite T 0 -space X and a weak homotopy equivalence f : |K | → X .
Here, weak homotopy equivalence is a continuous map which induces isomorphisms on all homotopy groups.
T 0 -spaces have a natural partial order In this paper, we study certain topological properties of a compact polyhedron by considering its corresponding finite T 0 -space. The last ingredient, developed in [1], is a natural partial order defined on a given finite T 0 -space. We can define this partial ordering on a finite T 0 -space X by considering minimal open neighborhoods of each point (i.e., element) x ∈ X . Let X be a finite T 0 -space. Each point x ∈ X has a minimal open neighborhood, denoted B x , which is equal to the intersection of all open sets containing x. where Conversely, we can endow any poset X with the Alexandroff topology as follows. For each element τ ∈ X , we define a minimal open neighborhood containing τ by B τ := {γ ∈ X : γ ≥ τ }. The collection of minimal open neighborhoods for each τ ∈ X forms a basis for a topology on X . We call this topology the Alexandroff topology. Moreover, a finite T 0 -space X is naturally equal (as a topological space) to X viewed as a poset with the Alexandroff topology. Therefore, we see that each partially ordered set is naturally a T 0 -space, and each finite T 0 -space is naturally a partially ordered set. The purpose for reviewing this correspondence here is to give the abstractly defined finite T 0 -spaces a concrete and familiar realization.
As a concrete example, let K denote the finite T 0 -space consisting of elements which are open simplices in a simplicial complex. In this setting, we can describe the T 0 -space K using the more familiar language of simplicial complexes. This is also the setting that applies to most of the subsequent examples in this paper. For a simplex σ ∈ K , its minimal open neighborhood B σ is its star consisting of all cofaces of σ , St σ = {τ ∈ K : σ ≤ τ }. Using the partial order induced by inclusions of minimal open neighborhoods, we set τ ≤ σ if B σ ⊆ B τ . By describing minimal open neighborhoods as open stars of simplices, we can state the partial order as τ ≤ σ if St σ ⊆ St τ . On the other hand, K is equipped with a partial order based on face relations, where τ ≤ σ if simplex τ is a face of simplex σ . Therefore, the two partial orders (the face partial order and the open neighborhood inclusion partial order) coincide.
Given a finite T 0 -space X with the above partial order, we say consisting of elements y j ∈ Y such that y 0 ≤ · · · ≤ y j ≤ · · · ≤ y k and n i=0 {x i } Y . The cardinality of a chain x 0 ≤ x 1 ≤ · · · ≤ x n is n + 1. We say that a finite T 0 -space has dimension m if the maximal cardinality of maximal chains is m + 1.

Definition 2.1
An m-dimensional simplicial complex is called homogeneous if each simplex of dimension less than m is a face of a simplex of dimension m. Motivated by the correspondence between simplicial complexes and T 0 -spaces, we say an mdimensional finite T 0 -space is homogeneous if each maximal chain has cardinality m + 1.
See Fig. 4 for an example. The correspondences allow us to study certain topological properties of compact polyhedra by using the combinatorial theory of partially ordered sets. In particular, instead of using the more complicated theory of sheaves on the geometric realization |K | of a simplicial complex K , we will continue by studying sheaves on the corresponding finite T 0 -space, denoted by X .

Constructible Sheaves
Intuitively, a sheaf assigns some piece of data to each open set in a topological space X , in a way that allows us to glue data together to recover some information about the larger space. This process can be described as the mathematics behind understanding global structure by studying local properties of a space. In this paper, we are primarily interested in sheaves on finite T 0 -spaces, which are closely related to the cellular sheaves studied in [10,24,26].
Sheaves Suppose X is a topological space. Let Top(X ) denote the category consisting of objects which are open sets in X with morphisms given by inclusion. Let F be a contravariant functor from Top(X ) to S, the category of sets. For open sets U ⊂ V in X , we refer to the morphism F(U ⊂ V ) : F(V ) → F(U ) induced by F and the inclusion U ⊂ V , as a restriction map from V to U . We say that F is a sheaf 1 on X if F satisfies the following conditions 1.-3.; a pre-sheaf is a functor E (as above) which satisfies conditions 1.-2.: There is a useful process known as sheafification, which allows us to transform any presheaf into a sheaf. In the setting of finite T 0 -spaces, sheafification takes on a relatively simple form. Let E be a pre-sheaf on a finite T 0 -space X . Then the sheafification of E, denoted E + , is given by For any pre-sheaf E, it can be seen that E + is necessarily a sheaf. We only need to know the values E(B x ) for minimal open neighborhoods B x , and the corresponding restriction maps between minimal open neighborhoods E(B x ⊂ B y ), in order to define the sheafification of E. The result is that two pre-sheaves will sheafify to the same sheaf if they agree on all minimal open neighborhoods. We will use this fact several times in Sect. 3. Unless otherwise specified, for the remaining of this paper, we use X to denote a T 0 -space.

Constant and locally constant sheaves
Now we can define classes of well-behaved sheaves, constant and locally constant ones, which we can think of intuitively as analogues of constant functions based on definitions common to algebraic geometry and topology [18]. A sheaf F is a constant sheaf if F is isomorphic to the pull back of a sheaf G on a single point space {x}, along the projection map p : Definition 2.2 A sheaf F on a finite T 0 -space X is constructible with respect to the decomposition X = S i of X into finitely many disjoint locally closed subsets, if F| S i is locally constant for each i.

Main Results
In this section we state three of our main theorems, namely, the existence of F-stratifications (Definition 1.4, Proposition 3.1), the existence of coarsest Fstratifications (Theorem 3.2), and the existence and uniqueness of minimal homogeneous F-stratifications (Theorem 3.6). Of course, Theorem 3.2 immediately implies Proposition 3.1. We choose to include a separate statement of Proposition 3.1 however, as we wish to illustrate the existence of F-stratifications which are not necessarily the coarsest. We include proof sketches here and refer to Sect. 8 for technical details. Proof sketch F is constructible with respect to the decomposition X = x∈X x.
Proof sketch We can prove Theorem 3.2 easily as follows. There are only finitely many stratifications of our space X , which implies that there must be an F-stratification with a minimal number of strata pieces. Such a stratification must be a coarsest stratification, since any coarser stratification would have fewer strata pieces.
However, the above proof is rather unenlightening if we are interested in computing the coarsest F-stratification. Therefore we include a constructive proof of the existence of a coarsest F-stratification which we sketch here. We can proceed iteratively, by defining the top-dimensional stratum to be the collection of points (i.e., elements) so that the sheaf is constant when restricted to the minimal open neighborhoods of the said points. Our process is a greedy algorithm as it seeks to make locally optimal choice at each stage. Rephrased using the language of simplicial complexes, the topdimensional stratum will consist of all simplices such that the sheaf is constant when restricted to the open star of the simplex. We then remove the top-dimensional stratum from our space, and pull back the sheaf to the remaining points/simplices. Notice that the points/simplices which are maximal with respect to the natural partial order (described in Sect. 2.1) are guaranteed to be included in the top-dimensional stratum. We proceed inductively until all the points in our space have been assigned to a stratum. We can see that this is a coarsest F-stratification by arguing that this algorithm, in some sense, maximizes the size of each stratum piece, and thus any coarser F-stratification is actually equivalent to the one constructed above. We refer the reader to Sect. 8.2 for the details of the above argument. 5 An example of two inequivalent coarsest homogeneous C-stratifications, where C is a constant sheaf on X . The stratification given on the right is the minimal homogeneous C-stratification Observe that if F is the constant sheaf on a simplicial complex X , as in Fig. 5, then the skeletal filtration of X (defined by setting X i to be the set of i-simplices of the simplical complex X ) is automatically a homogeneous F-stratification. However, the skeletal stratification is not guaranteed to be a coarsest F-stratification.
We will introduce a lexicographical preorder on the set of homogeneous stratifications of a finite T 0 -space X . While this preorder can be extended to the set of all stratifications, we choose to define the preorder on homogeneous stratifications in order to take advantage of the required regularity of the indexing of stratum. Specifically, the fact that the stratum X i − X i−1 is homogeneous of dimension i will guarantee compatible indexing of each homogeneous stratification of X . Let X be a homogeneous stratification of X given by We define a sequence A X := {|X n |, . . . , |X i |, . . . , |X 0 |}, where |X i | denotes the cardinality of the set X i . Notice that the order of the sequence A X is the reverse of the natural filtration order corresponding to X. Given two homogeneous stratifications X and X of X , let m ∈ {−1, . . . , n} be the smallest integer such that For two stratifications X and X of the same space X , the first term, |X n | − |X n |, of the sequence A X − A X , is automatically zero, since X n = X n = X . Figure 5 illustrates two homogeneous stratifications of the simplicial complex X . The stratification on the left produces an integer sequence A X = {10, 9, 0}, while the stratification on the right produces the sequence A X = {10, 5, 0}. The sequence of differences is then A X − A X = {0, 4, 0}. The first nonzero term in the sequence is positive, so X < X . Proposition 3.4 If X and X are homogeneous stratifications of X such that X is coarser than X , then X ≤ X . Moreover, if X is coarser than X , and A X = A X , then X = X .
Proof By Definition 1.2, each stratum piece of X is contained in a stratum piece of X. Assume that a connected component of X i − X i−1 is contained in a connected component of X j − X j−1 for some j. Since both stratifications are assumed to be homogeneous, we have that each connected component of X i − X i−1 is homogeneous of dimension i and each connected component of X j − X j−1 is homogeneous of dimension j. By the assumed containment of stratum pieces, we have that i ≤ j.
Assume that We will use the preorder on the set of homogeneous F-stratifications to identify a unique stratification which is minimal in the preorder.
Definition 3. 5 We say that a stratification X is a minimal homogeneous F-stratification if X ≤ X for every other homogeneous F-stratification X . In other words, a homogeneous F-stratification is minimal if it is minimal with respect to the lexicographic order on homogeneous F-stratifications.
There are several examples which illustrate the necessity of introducing minimal homogeneous F-stratifications, rather than studying only coarsest homogeneous Fstratifications. Consider the simplicial complex K illustrated in Fig. 5. Let C denote the constant sheaf on the corresponding T 0 -space X by assigning the one-dimensional vector space k to the star of each simplex σ , C(St σ ) = k. For the restriction maps, C(St τ ⊂ St σ ) is an isomorphism for each pair σ < τ. Figure 5 shows that there are two coarsest homogeneous C-stratifications of X . The stratification on the right side of Fig. 5 is the minimal homogeneous C-stratification.
Theorem 3.6 Let K be a finite simplicial complex, and X be a finite T 0 -space consisting of the simplices of K endowed with the Alexandroff topology. Let F be a sheaf on X .
There exists a unique minimal homogeneous F-stratification of X .

Proof sketch
The idea for this proof is very similar to that of Theorem 3.2. We construct a stratification in a very similar way, with the only difference being that we must be careful to only construct homogeneous strata. The argument for the uniqueness of the resulting stratification uses the observation that this iterative process maximizes the size of the current stratum (starting with the top-dimensional stratum) before moving on to define lower-dimensional strata. Thus the resulting stratification is minimal in the lexicographic order. The top-dimensional stratum of any other minimal homogeneous F-stratification then must equal the top stratum constructed above, since these must both include the set of top-dimensional simplices, and have maximal size. An inductive argument then shows the stratifications are equivalent. Again, we refer readers to Sect. 8.3 for the remaining details.

A Sheaf-Theoretic Stratification Learning Algorithm
We outline an explicit algorithm for computing the coarsest F-stratification of a space X given a particular sheaf F. We give two examples of stratification learning using the local homology sheaf (Sect. 5) and the sheaf of maximal elements (Sect. 6). Let X be a finite T 0 -space, equipped with the natural partial order defined in Sect. 2.1. Instead of using the sheaf-theoretic language of Theorem 3.6, we frame the computation in terms of X and an "indicator function" δ. For every x, y ∈ X with a relation x ≤ y, δ assigns a binary value to the relation. That is, is an isomorphism, and δ(x≤y) = 0 otherwise. We say a pair w ≤ y is adjacent if w ≤ z ≤ y implies z = w or z = y (in other words, there are no elements in between w and y). Due to condition 2. in the definition of a sheaf (Sect. 2.2), δ is fully determined by the values δ(w≤y) assigned to each adjacent pair (w, y). If a 1 ≤ a 2 ≤ · · · ≤ a k is a chain of adjacent elements (a i is adjacent to a i+1 for each i), we have that As X is equipped with a finite partial ordering, computing δ can be interpreted as assigning a binary label to the edges of a Hasse diagram associated with the partial ordering (see Sect. 5 for an example).
For simplicity, we assume that δ is pre-computed, with a complexity of O(m) where m denotes the number of adjacent relations in X . When X corresponds to a simplicial complex K , m is the number of nonzero terms in the boundary matrices of K . δ can, of course, be processed on-the-fly, which may lead to more efficient algorithm. In addition, determining the value of δ is a local computation for each x ∈ X , therefore it is easily parallelizable.
Computing a coarsest F-stratification If we are only concerned with calculating a coarsest F-stratification as described in Theorem 3.2, we may use the algorithm below.

Return S.
Here, i is the step counter; d i is the dimension of the current strata of interest; the set S d i is the stratum of dimension d i . d i decreases from dim X to 0. To include an element x to the current stratum S d i , we need to check δ for adjacent relations among all x's cofaces. It is worthwhile to note that in step 2a, we only want to consider adjacent pairs w ≤ y in the minimal open neighborhood of x (i.e., the open star of x) which have not been previously assigned to a stratum. In other words, instead of checking δ(w≤y) for every adjacent pair in the minimal open neighborhood of x, we only want to require δ(w≤y) = 1 for each adjacent pair which is contained in both the minimal open neighborhood of x and in the d i -level of the filtration. Moreover, each element of X which is maximal with respect to the partial order will be automatically included in current strata defined by the algorithm. Hence the cardinality of the set of unassigned elements will decrease after each iteration of the algorithm.
Computing the unique minimal homogeneous F-stratification If we would like to obtain the unique minimal homogeneous F-stratification, then we need to modify step 2a. Let c(x, i) = 1 if all maximal chains in X d i containing x have cardinality d i , and c(x, i) = 0 otherwise. Then the modified version of 2a. is: The only modification in the algorithm for computing the unique minimal homogeneous F-stratification is the additional requirement that c(x, i) = 1 for x to be included in the stratum X d i . This algorithm constructs a stratification which is minimal in the lexicographic order on homogeneous F-stratifications because the algorithm iteratively maximizes the cardinality of each stratum, starting with the top-dimensional stratum. In Sect. 8.3, we give a detailed proof that since the cardinality of the stratum is maximized at each iteration of the algorithm, the resulting stratification must be minimal in the lexicographic order.

Local Homology Sheaf
We begin with an example that uses homology to cluster simplices of a T 0 -space into strata. In order to capture local structure, we study a version of relative homology (i.e., the local homology) involving minimal open neighborhoods. In order to define relative (and local) homology, we will start with a chain complex associated to a finite T 0 -space. For a finite T 0 -space X , consider the chain complex C • (X ), where C p (X ) denotes the free R-module generated by ( p+1)-chains in X , with chain maps ∂ p : C p (X ) → C p−1 (X ) given by whereâ i means that the element a i is to be removed from the chain. Define the homology of X (with coefficients in the ring R) to be the homology groups of C • (X ), Since X is a finite T 0 -space, each subset U of X is a finite T 0 -space. We therefore define the homology of X relative to U , H • (X , U ), to be the homology groups of the quotient of chain complexes C • (X )/C • (U ). If X is a more general topological space (CW space, simplicial complex, manifold, etc.), then the local homology of X at x ∈ X is defined to be the direct limit of relative homology H • (X , X −x) := lim − → H • (X , X −U ) (where the direct limit is taken over all open neighborhoods U of x with the inclusion partial order) [23, p. 196]. In our setting, the local homology of X (a finite T 0 -space) at a point x ∈ X is given by H • (X , X −B x ).
Here we avoid using notions of direct limit by working with topological spaces that have minimal open neighborhoods. This motivates our decision to refer to the sheaf defined by relative homology H • (X , X −U ) for each open set U (see Theorem 5.1), as the local homology sheaf. 2 The following theorem, though straightforward, provides justification for applying the results of Sect. 4 to local homology computations.
We have the following commutative diagram of chain complexes

we have the restriction maps
. This can be seen by applying our construction of the restriction map above to three short exact sequences of chain complexes. In order to prove that condition 3. in the definition of a sheaf is satisfied, we could apply Mayer-Vietoris sequences for relative homology groups. But considering that we only need to think of L as a pre-sheaf in order to apply our algorithm, we will not include the details of this part of the proof.

An Example Using the Local Homology Sheaf
If X is a T 0 -space corresponding to a simplicial complex K , then the local homology groups in Sect. 5.1 are isomorphic to the simplicial homology groups of K . We now give a detailed example of stratification learning using local homology sheaf for the sundial example from Fig. 2. We will abuse notation slightly, and use K to denote the finite T 0 -space consisting of elements which are open simplices corresponding to the triangulated sundial (Fig. 6). We choose this notation so that we can describe our T 0 -space using the more familiar language of simplicial complexes. For a simplex σ ∈ K , its minimal open neighborhood B σ is its star consisting of all cofaces of σ , St σ = {τ ∈ K : σ ≤ τ }. The closed star, St σ , is the smallest subcomplex that contains the star. The link consists of all simplices in the closed star that are disjoint from the star, Lk σ = {τ ∈ St σ : τ ∩ St σ = ∅}. K is equipped with a partial order based on face relations, where x < y if x is a proper face of y. This partial order gives rise to a Hasse diagram illustrated in Fig. 7. A sheaf on K can be considered as a labeling of each vertex in the Hasse diagram with a set and each edge with a morphism between the corresponding sets. Consider the local homology sheaf L on K which takes each open set 3 The local homology sheaf is naturally group-valued, but we make no use of the group structure here. So we will forget the group structure of local homology groups, and think of them purely as sets. The above isomorphisms follow from excision and the [1,3] [ observation that K −U (resp. Lk U ) is a closed subcomplex of K (resp. Cl U ), and therefore (K , K −U ) and (Cl U , Lk U ) form good pairs (see [17, p. 124]). Our algorithm described in Sect. 4 can then be interpreted as computing local homology sheaf associated with each vertex in the Hasse diagram, and determining whether each edge in the diagram is an isomorphism. Our algorithm works by considering an element σ in the Hasse diagram to be in the top-dimensional strata if all of the edges above σ are isomorphisms, that is, if L(σ <τ ) is an isomorphism for all pairs σ < τ.
As illustrated in Fig. 7, first, we start with the 2-simplices. Automatically, we have that L is constant when restricted to any 2-simplex, and gives homology groups isomorphic to the reduced homology of a 2-sphere. For instance, the local homology group of the 2-simplex σ = [0, 1, 3] is isomorphic to the reduced homology of a 2-sphere, Second, we consider the restriction of L to the minimal open neighborhood of a 1-simplex. For instance, consider the 1-simplex [1,3]; B [1,3] [1,3] , Lk B [1,3] ) is isomorphic to the reduced homology of a single point space. Therefore the restriction map L(B [1,3] ) → L(B [0,1,3] ) is not an isomorphism (illustrated as a dotted blue line in Fig. 7 [1,3]. Therefore L(B [0,3] ) is isomorphic to the reduced homology of a 2-sphere. Moreover, both of the restriction maps corresponding to B [0,1,3] ⊂ B [0,3] and B [0,2,3] ⊂ B [0,3] are isomorphisms (illustrated as solid red lines in Fig. 7). This implies that [0, 3] ∈ S 2 = X 2 − X 1 . Alternatively, we can consider the simplex [0, 1] and see that L( , the reduced homology of the wedge of two spheres. Therefore, for any 2-simplex τ , the restriction map L([0, 1]<τ ) cannot be an isomorphism. We conclude that [0, 1] is not contained in the top-dimensional stratum. If we continue, we see that the top-dimensional stratum is given by Fig. 6.
Next, we can calculate the stratum S 1 = X 1 − X 0 by only considering restriction maps whose codomain is not contained in S 2 (see Fig. 8 [4], which is visualized in Fig. 6. Finally, the stratum S 0 = X 0 consists of the vertices which have not been assigned to any strata. We think it prudent to point out several observations related to the above example. First, we see that the local homology groups assigned to a simplex are trivial if and only if the simplex belongs to the boundary of our space. In this sense, local homology can detect which simplices are on the boundary of the space without relying on any particu-lar geometric realization of the abstract simplicial complex (embedding of the abstract simplicial complex into Euclidean space). Secondly, we observe that (for this example) the coarsest L-stratification we calculated is actually the unique minimal homogeneous L-stratification. We will investigate this coincidence for L-stratifications elsewhere, in an attempt to say if a coarsest L-stratification is automatically homogeneous or minimal. For low-dimensional examples, we observe local homology based stratification we recover is actually a topological stratification. In general, local homology does not carry enough information to recover a stratification into manifold pieces, and examples exist in higher dimensions where L-stratifications are not topological stratifications. One final remark related to the above example concerns the existence of restriction maps between isomorphic homology groups which are not isomorphisms. Suppose open sets U ⊂ V in a finite T 0 -space have the property that L(U ) is isomorphic to L(V ). A natural question to ask is if the restriction map L(U ⊂V ) : L(V ) → L(U ) is necessarily an isomorphism. This happens to be true for the sundial example above, but it is not true in general. See Fig. 1 for an illustration of a pinched torus. The local homology of the pinched point and any point on the 1-dimensional strata are each isomorphic to the reduced homology of the wedge of two spheres. However, the restriction map from an open neighborhood of the pinched point to an open neighborhood of a 1-simplex in the one strata which is adjacent to the pinched point is not an isomorphism. The coarsest L-stratification we obtain from our algorithm coincides with the stratification given in Fig. 1 (for a suitable triangulation of the pinched torus).

Stratification Learning with Sheaf of Maximal Elements
We will now consider a stratification of the triangulated sundial given by the sheaf of maximal elements (defined below). Again, let |K | be the polyhedron in Fig. 6 with labeled vertices.

Sheaf of maximal elements
Consider the sheaf F on the space K which takes each open set U ⊂ K to the free Z-module generated by maximal elements of U . For V ⊂ U , F(U ) → F(V ) maps an element u ∈ U to u ∈ V if u ∈ V and 0 otherwise. Stratification learning using sheaf of maximal elements Now for the triangulated sundial, F is automatically constant when restricted to any of the 2-simplices.
Let us consider the restriction of F to the minimal open set containing [1,3], that is, B [1,3] 1,3]. The restriction map F(B [1,3] ) → F(B [0,1,3] ) sends the only maximal element in B [1,3] to the only maximal element in B [0, 1,3] , and therefore is an isomorphism from Z to Z. This means that neither of the restriction maps can be isomorphisms, since F(B [0,1,3] ) and F(B [0,2,3] ) are each isomorphic to Z. If we continue, we see that the top stratum is given by

Fig. 10
The labeled Hasse diagram for the sundial with the sheaf of maximal elements after the topdimensional stratum has been removed Fig. 11 A triangulated sundial and its stratification based on the sheaf of maximal elements For this example, the stratum S 2 is automatically homogeneous, hence the two algorithm variations in Sect. 4 (2a. and 2a .) produce the same 2-stratum S 2 , illustrated in Fig. 11. We construct the labeled Hasse diagram based on the sheaf of maximal elements, as shown in Fig. 9. Next, we can calculate the strata S 1 by only considering restriction maps whose codomain is not contained in S 2 (see Fig. 10). We get We can consider the Hasse diagram and corresponding visualization of S 1 , as illustrated in Fig. 11. Again, the stratum S 1 is automatically homogeneous, meaning that the algorithm variations 2a. and 2a . produce the same out put.
Finally, the strata X 0 in the coarsest F-stratification consists of the points which have not been assigned to a strata yet. So Intuitively, we are using this relatively simple sheaf to cluster the space |K | into stratum pieces where small neighborhoods of points in the same stratum piece intersect the same set of 2-simplices.

Pre-Sheaf of Vanishing Polynomials
In this section we will use Learning Algebraic Varieties from Samples [6] to stratify the nerve of an open cover of a point cloud data set. Suppose X ⊂ R n is a finite set of points, and {U i } is a finite cover of X , such that U i ⊂ X for each i, and X = i U i . We will proceed by outlining a geometric method for computing a stratification of the nerve of {U i }, N , viewed as a finite T 0 -space.
We will begin by briefly reviewing the approach to learning algebraic varieties described in [6]. To each algebraic set S ⊂ R n , defined to be the set of solutions to a system of polynomial equations, we can associate an ideal of polynomial functions If Ω is a finite set of points sampled from S, then I (Ω) ⊃ I (S). The insight used in [6], is that certain finite-dimensional subspaces of polynomial functions will not be able to distinguish Ω from S. More precisely, we will start with a finite set of linearly independent polynomial functions M, and consider the subspace R M consisting of R-linear combinations of elements in M. To a given set V ⊂ R n , we will associate the subspace of polynomial functions in R M which vanish on V : The goal is to carefully choose a finite set of polynomials M so that I M (Ω) = I M (S) and I M (S) generates the ideal I (S) in the ring of polynomial functions.
The pre-sheaf of vanishing polynomials I M is defined using the above association of a finite-dimensional vector space I M (V ) to various point sets V ⊂ R n . Given a collection of subsets {U i } i∈J , we define an abstract simplicial complex on the index set J by declaring a subset τ ⊆ J to be a simplex if and only if the corresponding intersection  The pre-sheaf of vanishing polynomials I M is defined by Remark We could sheafify this pre-sheaf, and get a sheaf of vanishing, locally polynomial functions. However, since the algorithm outlined in this paper only requires a pre-sheaf as an input, we will continue without taking into account the larger space of locally polynomial functions.

Examples
Here we will provide examples of geometric stratifications of open covers of finite point sets in R 2 and R 3 . These examples aim to illustrate some of the features, as well as subtleties, of the I M -stratifications described above.
The circle S 1 Intuitively, we expect that the I M -stratification will be trivial (i.e., will consist of a single stratum) when our underlying geometric space is sufficiently Fig. 13 The minimal homogeneous I M -stratification of N (U Ω ) is trivial well behaved (an analytic manifold, for example). We will begin by checking this intuition for the I M -stratification of a circle. Consider the finite set Ω consisting of 100 points on the unit circle S 1 in R 2 spaced at regular intervals, with an open cover U Ω = {U 1 , . . . , U 6 } consisting of six open sets (see Fig. 12).
Suppose M = {1, x, y, x 2 , y 2 , x y} and U = i∈I U i is a subset of Ω corresponding to a simplex of N (U Ω ). The subspace of polynomials in R M which vanish on U is equal to the kernel of the linear map where (x i , y i ) are the elements of U with some fixed order. See [6, Sect. 5] for a discussion concerning how to optimize our choice of M, possibly resulting in the above map being represented by a sparse matrix. For our example we will assume that the subspace of polynomials in R M which vanish on U is the R-span of x 2 + y 2 − 1: Notice that this calculation follows for any open set U ⊂ N (U Ω ). If V and U are two such sets with V ⊂ U , then is an isomorphism. Therefore, our pre-sheaf I M is constant. This implies that the I M -stratification of N (U Ω ) is the trivial stratification (i.e., the stratification of N (U Ω ) consisting of a single stratum). It should be noted that for degree reasons, the trivial stratification would be produced even if fewer points were sampled from the space. Specifically, as long as each cover element U i contains at least four distinct points, then the resulting pre-sheaf I M will be constant, and the I M -stratification will be trivial (Fig. 13).
A corner As a second example, we want to explore the extent to which the geometrically defined I M -stratification is capable of detecting geometric singularities. Such a feature will provide an illustration of the key differences between   (x, 0), where The restriction map of vector spaces is not an isomorphism. The resulting I M -stratification of N (U Ω ) is illustrated in Fig. 14.
The curve y 2 = x 3 + x 2 Now we will give an example that aims to illustrate some of the more subtle properties of I M -stratifications. Specifically, we will see a singularity that the local homology sheaf detects, but the I M pre-sheaf does not. This example will consist of a finite set of solutions of The set of all real solutions of y 2 = x 3 + x 2 , denoted by X , is parameterized by the map Suppose f ∈ I M (U ), for a given open set U ⊂ X (in the subspace topology). The function is a polynomial function from R to R. Let V = φ −1 (U ). Since f vanishes on U , g must vanish on V . Since V is an open subset of R, we can conclude that g is the zero polynomial. Therefore f vanishes everywhere on X . Therefore, the I M -stratification of X is the trivial stratification, even though X has a singular point at (0, 0).
Informed by the calculation above, we turn our attention to the finite open cover of an -net of X (illustrated in Fig. 15). For each U ∈ U Ω , the vector space of vanishing polynomials is Moreover, the pre-sheaf I M is constant, and the resulting I M -stratification is the trivial stratification, illustrated in Fig. 15. Notice that for this example (as well as the circle example) the pre-sheaf I M would be constant for most choices of cover U Ω of X . Specifically, if U Ω consists of two intersecting sets, then the corresponding nerve In this example, we obtain the trivial stratification 16 The minimal homogeneous L-stratification of a triangulation X of a bounded connected set of real solutions to y 2 = x 3 + x 2 N (U Ω ) will consist of two vertices connected by an edge. The I M -stratification of the 1-simplex N (U Ω ) will be the trivial stratification.
To contrast with the I M -stratification illustrated in Fig. 15, we include ( Fig. 16) a local homology stratification of the simplicial complex N (U Ω ). Unlike the polynomial based stratification, the local homology stratification distinguishes the singular point where the elliptic curve crosses over itself, as well as the boundary points of the simplicial complex. Points sampled from the sundial In this example we study a higher-dimensional corner, as a comparison to the second example in this section. We will assume that we have a point sample Ω of the sundial (see Fig. 2), with an open cover U of the sundial whose nerve is the triangulation given in Fig . We will additionally assume that the base of the sundial is contained in a 2-dimensional plane in R 3 , with the complement of the base contained in a subspace perpendicular to the 2-dimensional plane. The resulting I M -stratification is given in Fig. 17.
Relation to the mapper construction As a final example, we will show how I Mstratifications naturally apply to the mapper construction. The mapper algorithm, originally developed in [27], gives a topological description of the fibers of a continuous function. We will illustrate the fundamental concept of the algorithm through an example. Suppose Ω is an -net of points on the torus T in R 3 (illustrated in Fig. 18). In other words, let Ω be any finite subset of T such that the Hausdorff distance between The I M -stratification is naturally suited to work with the mapper construction studied in [8,22,27]. Let f * (U) Ω = {U ∩ Ω : U ∈ f * (U)} be the open cover of the point set Ω (in the discrete topology) induced by f * (U). Additionally, choose M so that R M is the set of all polynomials in three variables with degree less than or equal to 4, R M = {ax n 1 + by n 2 + cz n 3 : a, b, c ∈ R and 0 ≤ n 1 , n 2 , n 3 ≤ 4}.
As an example, we will contrast the I M -stratification obtained from Ω, f , and U with the I M -stratification obtained from Λ, g, and U, where Λ is an -net of points sampled from the ellipse with two branching lines embedded in R 3 (illustrated in Fig. 18), and g is the height function on Λ . To distinguish the pre-sheaf of vanishing polynomials defined using Ω and f from the pre-sheaf of vanishing polynomials defined using Λ and g, we will use the notation I Ω M and I Λ M , respectively. We can consider the I Ω Mstratification of N ( f * (U) Ω ), by taking each open set V ∈ f * (U) Ω to the vector space resulting in the trivial stratification (Fig. 19).
However, open sets V ∈ g * (U) Λ containing only points on the branching lines will result in vector spaces generated (as vector spaces) by polynomials (in R M ) of the form x · p(x, y, z). Alternatively, open sets V ∈ g * (U) Λ which contain only points on the ellipse will result in the vector space R cx 2 + dy 2 − 1 for constants c, d ∈ R. Therefore, the I Λ M -stratification (depicted in Fig. 20) is nontrivial.

Proofs of Our Main Results
We detail the proofs of our main theorems, that is, the existence of F-stratifications (Proposition 3.1), the existence of coarsest F-stratifications (Theorem 3.2), and the existence and uniqueness of minimal homogeneous F-stratifications (Theorem 3.6).

Proof of Proposition 3.1
We can take the finest filtration of X , so that each X i − X i−1 consists of a single point (i.e., element) S i = X i − X i−1 = x i ∈ X . Then X = x i ∈X x i . In order to insure that the corresponding filtration is a filtration by closed subsets, we need to order our points so that x i is minimal (with the poset ordering) in the complement of X i−1 . Now we wish to show that F| x i is locally constant for each x i ∈ X . This is trivial, and in fact F| x i is a constant sheaf, since it is a sheaf defined on a topological space consisting of a single point. Therefore F is constructible with respect to the single point decomposition X = x i ∈X x i .

Proof of Theorem 3.2
This theorem can be proven immediately by noticing that there are only finitely many stratifications of X (X being a finite T 0 -space with finitely many points). Since the set of F-stratifications is nonempty, there must be an F-stratification with a minimal number of strata pieces, and such a stratification must be a coarsest F-stratification. However, for the purposes of developing an algorithm, we will prove this constructively by defining each X i in a coarsest F-stratification. Let d 0 be the dimension of X and X d 0 := X . Define is an isomorphism for all chains x ≤ y ≤ w}.
Set d 1 to be the dimension of X d 0 − S d 0 . Then define X d 1 to be the complement of S d 0 in X d 0 : Now each (d 0 +1)-chain in X d 0 terminates with an element x of S d 0 because F| B x is automatically constant when x is the terminal element of a maximal chain. The dimension of X d 1 is strictly less than d 0 , since each (d 0 +1)-chain in X ends with an element of S d 0 , and thus is not a chain in X − S d 0 . Define X i := X for each i such that Then we can use the same condition as above to define S d 1 : Again notice that S d 1 is not empty since terminal elements of maximal chains are guaranteed to be elements of S d 1 , which we obtain by applying our definition of E , the assumption (made in our definition of S i ) that F(B y ⊂B w ) is an isomorphism for all x ≤ y ≤ w ∈ X i , and the definition of E. These equalities further imply that E (B i y ) = E(B i y ). So we have shown that the sheafification of E is isomorphic to the sheafification of E , which is a constant sheaf. Therefore (F| S i )| B x is constant, which implies that F| S i is locally constant, which in turn implies that F is constructible with respect to the decomposition X = S i . So we have constructed an F-stratification. Now suppose that there exists a coarser F-stratification ∅ ⊂ X 0 ⊂ · · · ⊂ X n = X .
We will continue by using the notation S • i (respectively S j • ) to denote a connected Since F is locally constant when restricted to S j • , we have that F is constant when restricted to So we can finally conclude that F is constant when restricted to B x ∩ X i . However, by the definition of S i above, we see that x must be an element of S i . Therefore Therefore each stratum piece of the stratification ∅ ⊂ X 0 ⊂ · · · ⊂ X n = X is equal to a stratum piece of the stratification ∅ ⊂ X 0 ⊂ · · · ⊂ X n = X . So we can conclude that these two stratifications are equivalent, which concludes the proof.

Proof of Theorem 3.6
We will prove this constructively by defining each X i in a minimal homogeneous F-stratification, and then showing that any minimal homogeneous F-stratification is necessarily equal to the stratification constructed below. In many ways, this proof is similar to the proof of Theorem 3.2. Let d 0 be the dimension of K and X d 0 = X . Define (H for homogeneous) and )-chain in X d 0 terminates with an element x of S d 0 because Cl x is homogeneous of dimension d 0 by our assumption that X d 0 consists of simplices of a simplicial complex. We have that d 1 is strictly less than d 0 , since each (d 0 + 1)-chain in X d 0 ends with an element of S d 0 , and thus is not a chain in X d 1 x denote the minimal open neighborhood of x in X d 1 . Then we can use the same condition as above to define x is homogeneous of dimension d 1 and C d 1 := x ∈ H d 1 : F(B w ⊂B y ) is an iso. for all chains x ≤ y ≤ w in H d 1 .
As before, let S d 1 = H d 1 ∩C d 1 and notice that S d 1 is not empty since X d 1 corresponds to a sub-simplicial complex of K . Continue to define H d k , C d k , S d k , and X d k+1 inductively until d k = 0. To fill out the missed indices, define S i to be empty if d j < i < d j−1 and X i := X d j if d j < i < d j−1 .
Notice that each S i is an open subset of X i . Therefore X i−1 is closed in X i , and X i − X i−1 is an open set in X i (and therefore locally closed in X ). Additionally, Cl (X i −X i−1 ) = Cl S i is either empty or is homogeneous of dimension i. So we have constructed a homogeneous stratification of X . Now we wish to show that this is a homogeneous F-stratification. It remains to show that F| S i is locally constant. This follows the same argument as in the proof of Theorem 3.2. So F is constructible with respect to the stratification given by the filtration ∅ ⊂ X 0 ⊂ · · · ⊂ X d 0 = X . We will denote this stratification by X.
Suppose that there exists a minimal homogeneous F-stratification ∅ ⊂ X 0 ⊂ · · · ⊂ X d 0 = X , denoted by X . Now S i must contain all of the elements of X i corresponding to isimplices in K . Moreover, for each element x ∈ S i , there exists y ∈ X i corresponding to an i-simplex in K , such that x ≤ y (due to the homogeneity of X i − X i−1 ). Suppose a ∈ S n and b ∈ S n are such that a ≤ b (an analogous argument follows for b ≤ a). Since b is necessarily a face of an n-simplex τ ∈ X n = X n = X , we have a ≤ b ≤ τ . Since τ is an n-simplex, we have that τ ∈ S n . Since F is assumed to be locally constant when restricted to S i and S i , we have that ρ B a ,B τ and ρ B b ,B τ are isomorphisms. By the third part of the sheaf axiom (which is also true for pre-sheaves), we have that ρ B b ,B τ • ρ B a ,B b = ρ B a ,B τ . Therefore, F(B b ⊂B a ) is an isomorphism. So if we set S n := S n ∪ S n , then Cl S n is homogeneous of dimension n and F| S n is locally constant. However, by our construction of S n , we can see that S n is the maximal set with these properties. So S n ⊂ S n implies that S n = S n . This implies that S n ⊂ S n = X − X n−1 . If S n S n , then we would have that X < X , which would contradict the minimality of X . So we must have that S n = S n , which implies that X n−1 = X n−1 . This allows us to use inductively the same argument as above to show that X i = X i for all i. Therefore the two stratifications are equal, which concludes the proof.

Discussion
Many problems in computational geometry and topology are solved by finding suitable combinatorial models which reflect the geometric or topological properties of a particular space of interest. One way to study properties of a space such as the pinched torus in Fig. 1 is to begin by finding a triangulation of the space, which in some sense provides a combinatorial model which is amenable to computation. The corresponding triangulation can be thought of as a stratification of the space, by defining the d-dimensional stratum to be the collection of d-dimensional simplices. However, this stratification is too "fine" in a sense, as it breaks up the underlying space into too many pieces, resulting in each stratum piece retaining relatively little information about the underlying geometry of the total space. The results of this paper can be interpreted as a method for computing a coarsening of the stratification obtained from the triangulation of our underlying space, using homological techniques (or more generally, sheaf-theoretic techniques) to determine when two simplices should belong to the same coarser stratum. There are two key features of the sheaf-theoretic stratification learning algorithm which should be highlighted. The first feature is that we avoid computations requiring the sheafification process. At first glance this may be surprising to those not familiar with cellular sheaves, since constructible sheaves cannot be defined without referencing sheafification, and our algorithm builds a stratification for which a given sheaf is constructible. In other words, each time we want to determine the restriction of a sheaf to a subspace, we need to compute the sheafification of the pre-sheaf referenced in the definition of the pull back of a sheaf (Sect. 2.2). We can avoid this by noticing two facts. Suppose E is a pre-sheaf and E + is the sheafification of E. First, in the setting of finite T 0 -spaces, we can deduce if E + is constant by considering how it behaves on minimal open neighborhoods. Second, the behavior of E + will agree with the behavior of the pre-sheaf E on minimal open neighborhoods. Symbolically, this is represented by the equalities E + (B x ) = E(B x ) and E + (B w ⊂B x ) = E(B w ⊂B x ) for all pairs of minimal open neighborhoods B w ⊂ B x (where B x is a minimal open neighborhood of x, and B w is a minimal open neighborhood of an element w ∈ B x ). Therefore, we can determine if E + is constant, locally constant, or constructible, while only using computations involving the pre-sheaf E applied to minimal open neighborhoods.
The second feature of our algorithm (which is made possible by the first one) is that the only sheaf-theoretic computation required is checking if F(B w ⊂B x ) is an isomorphism for each pair B w ⊂ B x in our space. This is extremely relevant for implementations of the algorithm, as it minimizes the number of expensive computations required to build an F-stratification. For example, if our sheaf is the local homology sheaf, we will only need to compute the restriction maps between local homology groups of minimal open neighborhoods. The computation of local homology groups can therefore be distributed and computed independently. Additionally, once we have determined whether the local homology restriction maps are isomorphisms, we can quickly compute a coarsest L-stratification, or a minimal homogeneous L-stratification, without requiring any local homology groups to be recomputed. As we saw with the pre-sheaf of vanishing polynomials I M , there are often cases of stratifications which rely only on the image of the sheaf applied to each minimal open set, making computations even more streamlined.
There are several interesting questions related to F-stratifications that we will investigate in the future. We are interested in the stability of local homology based stratifications under refinements of triangulations of polyhedra. In this direction, it would be useful to view L-stratifications from the perspective of persistent homology. If we are given a point cloud sampled from a compact polyhedron, it would be natural to ask about the asymptotics of persistent local homology based stratifications.