Local cohomology and stratification

We outline an algorithm to recover the canonical (or, coarsest) stratification of a given regular CW complex into cohomology manifolds, each of which is a union of cells. The construction proceeds by iteratively localizing the poset of cells about a family of subposets; these subposets are in turn determined by a collection of cosheaves which capture variations in cohomology of cellular neighborhoods across the underlying complex. The result is a finite sequence of categories whose colimit recovers the canonical strata via (isomorphism classes of) its objects. The entire process is amenable to efficient distributed computation.


Introduction
Setting aside technicalities for the moment, an n-dimensional stratification of a given topological space X is a nested sequence of closed subspaces ∅ = X −1 ⊂ X 0 ⊂ · · · ⊂ X n = X where each successive difference X d − X d−1 resembles a (possibly empty) d-dimensional manifold whose connected components are the d-dimensional strata. The suppressed technicalities guarantee uniformity of sufficiently small neighborhoods in X around (points in) every stratum. Stratified spaces are of fundamental importance in any branch of mathematics which seriously confronts singularities. Every topological manifold admits a straightforward stratification into its connected components; less trivially, the following spaces all admit, and are often analyzed using, stratifications: finite CW complexes, quotients of properly discontinuous Lie group actions on smooth manifolds, algebraic varieties, semialgebraic and subanalytic sets.
The 2-dimensional singular space below (let's call it Y) is built by pinching a torus along a meridian and attaching a disk across an equator: Any regular CW structure is a stratification of Y by skeleta, where d-dimensional strata are precisely the d-cells; passing to a subdivision further refines this skeletal stratification in the sense that every new cell is entirely contained in the interior of an old 1 cell. On the other hand, the coarsest stratification of Y into manifolds requires only one 0-stratum, one 1-stratum and two 2-strata: Our main result here involves algorithmically recovering the coarsest stratification of a finite regular CW complex where all strata are unions of cells. This is called the canonical stratification of the complex, and its existence and uniqueness play a central role in Goresky and MacPherson's proof of the topological invariance of intersection homology for stratified pseudomanifolds [14,Sec 4]. Our argument, like theirs, has an intuitive geometric core but invokes algebraic and categorical machinery. For the purposes of this introductory section, we focus on geometry and ask: given a finite cellulation of Y, how might one identify the canonical strata and determine which cells lie in each canonical stratum? Attempts to formulate answers highlight the hazards of investigating local topology of small neighborhoods around cells in the 0, 1 and 2dimensional canonical strata of Y: Each neighborhood above deformation-retracts to its central cell and is therefore contractible; however, compactifying these three classes of neighborhoods by collapsing their boundaries to points creates new stratified spaces with potentially interesting topology. The compactified neighborhood around the vertex in the canonical 0-stratum of Y is (homeomorphic to) two 2-spheres joined at their north and south poles with a spanning disk across the middle. The compactified neighborhood of any cell in the canonical 1-stratum resembles a 2-sphere whose interior has been partitioned in two by a disk attached along a great circle passing through the north and south poles. And finally, the compactified neighborhood around any cell in either of the two canonical 2-strata is homeomorphic to a 2-sphere: One hopes to recover intrisic strata by clustering cells whenever they exhibit similar compactified neighborhoods. But already in this example, we encounter two significant difficulties: first, the compactified neighborhoods do not distinguish cells in the two 2-strata from each other. The second difficulty is somewhat subtler -although the compactified neighborhoods of cells in the 0-stratum and 1-stratum are not homeomorphic, both are homotopy-equivalent to a wedge of two 2-spheres. Therefore, they can not be distinguished by weaker, more computable topological invariants such as cohomology. We tackle the first problem by constructing a complex of cosheaves which encodes how local topology varies across cells, and we bypass the second problem by working exclusively in the category of cohomologically stratified spaces.
Consider the task of determining the canonical stratification of a finite regular CW complex X into R-cohomology manifolds, where R is a fixed nontrivial commutative ring with unity. In this case, our complex of cosheaves assumes a particularly appealing form: it is a functor L • : Fc(X) → Ch(R) from the poset of cells in X (where x > y denotes that y is a face of x, or equivalently, that x is a co-face of y) to the category of lower-bounded R-module cochain complexes. To each cell x of X, it assigns a cochain complex L • (x): x are inherited verbatim from incidence degrees among cells of X taking values in R. Thus, L • (x) computes the reduced cohomology of x's compactified neighborhood in X. Given another cell y satisfying x ≥ y, there is an inclusion map arising from the fact that co-faces of x are also co-faces of y. Here is a simple version of our main result. Theorem 1.1. There is a category S obtained from Fc(X) by formally inverting a particular subset of those face relations x ≥ y for which L • (x ≥ y) induces isomorphisms on cohomology; two cells lie in the same canonical stratum of X if and only if they are isomorphic in S.
Before proceeding to the L • -induced definition of S and a proof of this theorem, we highlight three salient features. First, the construction of S is algorithmic and isomorphism classes of its objects are explicitly (and efficiently) computable. Second, the nonisomorphisms in S reveal when a canonical stratum contains another in its boundary. And third, our construction actually yields a nested sequence of intermediate categories each of which receives a functor from Fc(X) compatible with the previous ones; and all the canonical strata of dimension exceeding (dim X − d) may be recovered from certain isomorphism classes in S d .
This paper is organized as follows. Section 2 tersely collects relevant background material involving stratifications and cosheaves, while Section 3 describes the local cohomology complex of cosheaves L • associated to a regular CW complex X. In Section 4 we use L • to define an initial functor Fc(X) → S 0 via categorical localization, and prove that the top-dimensional canonical strata of X correspond bijectively with isomorphism classes of (images of) top-cells in S 0 . Section 5 contains the heart of our argument: it concludes the proof of Theorem 1.1 by describing the inductive construction of Fc(X) → S d from the preceding Fc(X) → S d−1 . The final Section 6 may be read independently of the preceding ones -it is devoted to computational matters, and includes an efficient distributed algorithm for recovering canonical strata in practice.
Context. Our goal is to provide a principled topological pre-processor for various manifold learning algorithms. The fundamental aim of manifold learning is to automatically infer the intrinsic dimension of a compact submanifold M (often with boundary) of Euclidean space from a finite point sample P ⊂ R n lying on, or at least near, M. An enormous amount of work has been done in this field, and we will make no attempt to even summarize it here -the curious reader is referred to [20] and its myriad citations. In most cases, one constructs a graph around the points in P by inserting all edges of Euclidean length bounded above by a parameter threshold > 0. Shortest paths along this graph then serve as proxies for intrinsic geodesics of M and are used to find distance-preserving projections to lower-dimensional subspaces of R n via spectral methods.
When M is not a single manifold, but rather a union of different manifolds across several dimensions, our standard manifold learning methods necessarily result in overfitting along regions where M has low intrinsic dimension. Theorem 1.1 provides a remedy by conferring the ability to partition P into distinct clusters, each of which (at the given scale ) is guaranteed to lie on a cohomology manifold of known dimension. These clusters may then be independently subjected to the usual manifold learning techniques. Perhaps more important from a practical perspective is the fact that the computations involved in partitioning P are easily distributed across several processors. And as a straightforward byproduct, one also gains the capacity to identify (those points of P which lie in) every anomalous, singular region of M.
There now exists a substantial body of work where filtered (co)homology groups of cell complexes built around data points play a central role [12,24]. With the knowledge of canonical strata of such cell complexes comes the prospect of efficiently computing far more refined topological invariants such as intersection cohomology [13] groups. Also accessible, thanks to suitable flavors of Morse theory [23,25], is the ability to cluster canonical d-strata by (d + 1)-dimensional cobordisms internal to the ambient dataset.

Cohomological stratifications.
Fix a non-trivial commutative ring R with identity and recall that an R-cohomology manifold of dimension d ≥ 0 is a locally compact Hausdorff topological space Z where each point z has an open neighborhood U z ⊂ Z whose compactly-supported R-valued cohomology agrees with that of d-dimensional Readers may safely replace the compactly supported cohomology of U z (and any open set encountered henceforth) by the standard cohomology of its one-point compactification relative to the additional point.
1. An n-dimensional (cohomological) stratification of a locally compact Hausdorff topological space X is an ascending sequence of closed subspaces where the connected components of X d − X d−1 , called d-dimensional strata, are required to obey the following axioms.
• Frontier: if a stratum σ intersects the closure of another stratum τ, then in fact σ is completely contained in the closure of τ and dim τ ≥ dim σ (with equality occurring if and only if τ = σ). This relation, denoted by τ σ henceforth, forms a locally finite partial order on the set of all strata. • Link: for each d-stratum σ, there exists an (n − d − 1)-dimensional stratified space L = L(σ), called the link of σ: so that every open neighborhood around a point p in σ admits a basic open subneighborhood U p ⊂ X with the following structure. The intersections U p ∩ X i are empty for i < d, while for d ≤ i ≤ n there are stratified quasi-isomorphisms of compactly-supported singular cochain complexes (of R-modules): where C L • denotes the open cone 1 on L • .
By quasi-isomorphism here (and elsewhere) we mean a cochain map which induces isomorphisms on all cohomology groups. The additional requirement that the maps from (2) be stratified guarantees that they behave naturally in three separate ways: they should be filtered, stratum-preserving and refinable as explained below.
(1) They should respect (contravariant maps induced by) the inclusions L • ⊂ L •+1 in their domains and X • ⊂ X •+1 their codomains so that the following squares commute: The open cone on Z is the quotient of Z × [0, 1) by the relation which identifies (z, 0) with (z , 0) for any z and z in Z; by convention, the open cone on the empty set is the one-point space.
(2) They should preserve strata in the sense that there exist bijections so that the maps from (2) restrict to quasi-isomorphisms (3) They should refine to smaller basic neighborhoods V p so that the following triangles of quasi-isomorphisms commute: Remark 2.2. The following observations concern Definition 2.1.
(1) By a theorem of Eilenberg and Zilber [9], links are well-defined (only) up to filtered quasi-isomorphism type: we may replace L by a filtered cochain complex by substituting a tensor product for the left side of (2).
This definition, unlike similar notions which typically appear in the intersection homology literature, does not require the union of top strata to be dense in X.
In other words, X n−1 need not equal X n−2 .
We call one stratification a coarsening of another whenever each stratum of the former is a union of strata of the latter. All stratifications encountered henceforth will be coarsenings of the skeletal stratification of a fixed finite regular 2 CW complex X. The skeletal stratification is defined as follows: writing the face partial order among cells as ≥, we recall that each cell y of X has • an open star st(y) containing all cells x which satisfy x ≥ y, and • a link lk(y), containing all cells x that share a co-face but no face with y. The d-dimensional skeletal strata are the d-cells of X, and the frontier partial order coincides with ≥. Since st(y) of a d-cell y is simultaneously homeomorphic to all sufficiently small neighborhoods around points in y and to C lk(y) × R d , the link L(y) in the sense of Definition 2.1 is precisely lk(y). Definition 2.3. The canonical stratification of a regular CW complex X is the smallest coarsening of the cellular stratification. In other words, it is the coarsest stratification of X whose strata are all unions of cells.
The existence and uniqueness of canonical stratifications was established (in greater generality than ours) by Goresky and MacPherson [14,Sec 4]. Here we only identify a simple consequence of the frontier axiom for cells lying in top strata. Proposition 2.4. Let X be a finite regular CW complex of dimension n equipped with any stratification coarser than its skeletal stratification. If a cell y of X lies in an n-dimensional stratum σ, then so must every cell x which satisfies x ≥ y.
Proof. Let τ be the unique coarse stratum containing x. Since y lies in the boundary of x by assumption, the closure of τ intersects σ non-trivially at y. The desired conclusion now follows from the axiom of the frontier in Definition 2.1 and the fact that there are no strata of dimension exceeding n, since dim τ ≥ dim σ = n forces τ = σ.
Thus, membership of cells in top-dimensional canonical strata is upward-closed with respect to the face partial order.

Localizations of posets.
The localization of a poset P about a subcollection Σ of its order relations is the minimal category containing P in which the relations of Σ have been rendered invertible [10, Ch I.1].
Definition 2.5. Let (P, ≥) be a poset and Σ = {(x • ≥ y • )} a subset of its relations which is closed 3 under composition. The localization of P about Σ is a category P[Σ −1 ] whose objects are precisely the elements of P, while morphisms from p to q are given by equivalence classes of finite (but arbitrarily long) Σ-zigzags of order relations in P where: (1) only relations in Σ and equalities can point backwards (i.e., ≤), (2) composition is given by concatenation, and (3) the trivial zigzag p = p represents the identity of each element p.
The equivalence between Σ-zigzags is generated by the transitive closure of the following basic relations. Two such zigzags are related • horizontally if one is obtained from the other by excision of equalities: • or vertically, if they form the rows in a grid: The category P[Σ −1 ] enjoys the following universal property [10, Lem I.1.3] -there is a canonical localization functor P → P[Σ −1 ] which acts by inclusion. In particular, it sends each element of P to itself and each relation x ≥ y to its own equivalence class of Σ-zigzags. Moreover, any functor P → C which maps order relations in Σ to isomorphisms in the target category C factorizes uniquely across the localization functor.

Cellular cosheaves. Sheaves (and their dual cosheaves) assign algebraic objects
to open sets of topological spaces [2]. Our interest here is in a particularly tame and computable sub-class of cosheaves, where the base space is always a finite regular regular CW complex X and the assigned algebraic objects are cell-wise constant. We write Fc(X) to indicate the poset of cells with order relation x > y denoting that y is a face of x.
Definition 2.6. A cellular cosheaf over X taking values in an Abelian category A is a functor F : Fc(X) → A. Thus, it assigns to each cell x an A-object F(x) and to each face We call F(x) the stalk of F at x, and call F(x ≥ y) the extension map of F at x ≥ y.
A morphism of cellular cosheaves η : F → G over X is a natural transformation; it assigns to each cell x an A-morphism η x : F(x) → G(x) so that for each x ≥ y the relevant square in A commutes: Cosheaf morphisms may be composed stalkwise, and there is always a zero morphism 0 : F → G which (as one might expect) assigns the zero map 0 x : F(x) → G(x) in A to each cell x of X. Definition 2.7. A (lower-bounded) complex of cellular cosheaves F • (over X, taking values in A) is a sequence of A-valued cellular cosheaves over X connected by cosheaf morphisms: so that every successive composition η •+1 • η • yields the zero morphism.
Every complex of cosheaves F • on X may be reinterpreted as a single cosheaf which takes values in the category Ch(A) of lower-bounded cochain complexes in A -consider the collection of commuting squares in A that are assigned to face relations x ≥ y ≥ z ≥ · · · of X: The horizontal slices of this diagram confirm that a cochain complex in A is allocated to each cell, while vertical arrows between these slices prescribe the desired extension maps. Taking cohomology horizontally, one therefore obtains an ordinary cellular cosheaf of (graded) A-objects over X. We call this the cohomology of F • and denote it by H • F.

Local cohomology of CW complexes
Let X be a finite regular CW complex with face poset Fc(X) and R a fixed nontrivial commutative ring with identity 1 R . We write Mod(R) to denote the category of R-modules, and Ch(R) -rather than the cumbersome Ch(Mod(R)) -to indicate the category of cochain complexes of R-modules indexed by the non-negative natural numbers.
over X taking values in Mod(R), prescribed by the following data.
(1) For each dimension d ≥ 0 and cell x of X, the cosheaf L d has as its stalk

by (linearly extending) the following action on basis cells. For each
where the sum is taken over all (d + 1)-cells w ≥ x, and w, z R ∈ {0, ±1 R } is the R-valued degree of the attaching map in X from the boundary of w onto z.
Routine calculations confirm that β d+1 • β d is always zero, and that the β • x 's commute with all relevant extension maps. In light of the discussion following Defintion 2.7, we will shift perspective and regard L • as a single cosheaf valued in Ch(R). In this setting, the stalk L • (x) lying over each cell x is the entire cochain complex When y is a zero-dimensional cell, we have ∂st(y) = lk(y).
For each d ≥ 0, we write R[d] • to indicate the special cochain complex in Ch(R) which is trivial except for a single copy of R in the d-th position: is the cohomology of small neighborhoods in d-dimensional R-cohomology manifolds, as in (1) Proof. The first assertion follows from Definition 3.1 and the fact that there are no cells of dimension ≥ (n + 1) in X. Turning to the second assumption, note that the local cohomology of an (n − 1)-cell y is only supported in dimensions (n − 1) and n: where k counts the number of n-cells x satisfying x > y. , and it must be isomorphic to R = H n R[n] by assumption. Since R is a commutative ring, it satisfies the invariant basis property and we have k = 2.
In light of the preceding result and (1), one might hope to identify top-dimensional canonical strata by simply clustering together adjacent cells x ≥ y in X whenever there exists a top-dimensional cell w satisfying w ≥ x so that all extension maps below are quasi-isomorphisms: Our next example shows that this (necessary) condition for x and y to belong to the same top stratum is not sufficient when dim w − dim y > 1. Let w, x and y respectively denote the extra 2-simplex, the shared half-diagonal, and the central vertex. It is easy to confirm that L • (y) is quasi-isomorphic to R[2] • since its link has the cohomology of a circle. And moreover, given any sequence w > x > y of cells where w and x differ from w and x respectively, the inclusion maps are all quasi-isomorphisms. Note, however, that L • (x) is not quasi-isomorphic to R[2] • by Proposition 3.2 since there are three 2-simplices containing x as a face. Thus, x does not belong to any canonical 2-stratum, and hence (by Proposition 2.4), neither does y.

Extracting top strata
Throughout this section, X denotes a finite n-dimensional regular CW complex, R is a fixed commutative ring and L • : Fc(X) → Ch(R) is the local cohomology complex of X from Definition 3.1. Consider the collection of face relations (x ≥ y) in Fc(X) sent by L • to quasi-isomorphisms, i.e., and define the subcollection In other words, W 0 is what remains of E 0 when we impose • dimensionality: retain only those face relations in which both cells have the local cohomology (isomorphic to that) of a top-dimensional cell, and • upward-closure: is not a quasi-isomorphism. It is clear that if W 0 contains both (x ≥ y) and (y ≥ z), then it also contains (x ≥ z). Recall that S 0 has the cells of X as objects, while its morphisms are equivalence classes of W 0 -zigzags (as described in Definition 2.5). And, there is a canonical functor Fc(X) → S 0 which is universal with respect to rendering all the face relations from W 0 invertible. Proposition 4.2. Two cells w and z are isomorphic in S 0 if and only if there is a W 0 -zigzag w ≥ y 0 ≤ x 0 ≥ · · · ≥ y k ≤ x k ≥ z whose last relation (x k ≥ z) lies in W 0 .
Proof. Given any W 0 -zigzag from w to z such as the one depicted above, recall that every (x • ≥ y • ) is in W 0 . And by the upward-closure requirement, each preceding (x •−1 ≥ y • ) is automatically in W 0 (with the understanding that x −1 = w). Since the last relation (x k ≥ z) is assumed to lie in W 0 as well, one can directly construct an inverse zigzag in S 0 : z = z ≤ x k ≥ y k ≤ · · · ≤ x 0 ≥ y 0 ≤ w = w. Conversely, if w and z are isomorphic in S 0 , then there exist W 0 -zigzags from w to z and vice-versa whose composites are (equivalent to) identity morphisms. We label some relevant cells in these zigzags: w ≥ · · · ≤ x ≥ z and z ≥ y ≤ · · · ≥ w.
A brief examination of the horizontal and vertical relations from Definition 2.5 confirms that any zigzag in the equivalence class of the identity must have all its forward-pointing ≥'s lying in W 0 . As a consequence, when we compose the zigzags labeled above, we obtain (x ≥ y) ∈ W 0 . An appeal to the upward-closure requirement now forces (x ≥ z) ∈ W 0 , as desired.
Here is the main result of this section. Proof. To show that the first assertion implies the second, let σ be the n-stratum containing two cells w and z. Since σ is connected by Definition 2.1, there exists a zigzag of cells lying entirely in σ from w to z, say By the same definition and Proposition 2.4, it follows that every face relation appearing above lies in W 0 . By adding an identity to the end of this zigzag, we may therefore construct a morphism in S 0 from w to z, It is now evident from Proposition 4.2 that w and z are isomorphic in S 0 . In order to show the reverse implication, assume the existence of an isomorphism from w to z in S 0 , say w ≥ y 0 ≤ x 0 ≥ · · · ≥ y k ≤ x k = z, where the last equality follows from the fact that X contains no cells of dimension > n. Define the union of open stars, and note that Z is connected -every constituent st(y i ) is connected and intersects the subsequent st(y i+1 ) non-trivially (since both stars must contain x i ). By the dimensionality requirement on W 0 , every point in Z has an open neighborhood with compactly supported cohomology isomorphic to H • R[n] = H • c (R n ), and by the upwardclosure requirement no cell lying in Z may lie in the boundary of a cell lying outside Z. Thus, the frontier and link requirements on strata imposed by Definition 2.1 are satisfied by the connected set Z ⊂ X, whence all cells lying in Z must belong to the same canonical n-stratum σ of X. Thus, σ contains both w and z as desired.
Finally, note that if an arbitrary cell y lies in a (not necessarily canonical) n-stratum σ of X, then there must exist an n-cell w ≥ y also lying in σ by Proposition 2.4, otherwise we arrive at the contradiction H n L(y) = 0. Thus, we have the following consequence of Proposition 4.3.
Corollary 4.4. The canonical n-strata of X correspond bijectively with isomorphism classes of its n-cells in S 0 .

Uncovering lower strata
As before, let X be the finite n-dimensional CW complex whose canonical strata we wish to discover. In this section, we will inductively construct the desired stratification where each Y • ⊂ X is a regular CW subcomplex, so that the connected components of each difference Y d − Y d+1 are precisely the canonical (n − d)-strata of X. We have numbered the Y • in reverse (compare Definition 2.1) merely to indicate the order in which they are constructed. In addition to the initial complex Y 0 = X, the first step of our construction also requires using the sets E 0 and W 0 which were defined in (3) and (4) and also This produces the subsequent triple (Y d , E d , W d ).
Note that W • is an increasing sequence of sets while both Y • and E • are decreasing. As a motivating example for the preceding constructions, consider the 2-dimensional stratified space Z 0 obtained as the closed cone over a wedge of two circles: If Z 0 is equipped with a regular CW decomposition, then all cells lying in its boundary (i.e., the figure-eight on the left side) will have trivial local cohomology. The local cohomology of Z 0 thus fails to distinguish generic cells lying on either of the two boundary circles from the special vertex which forms their intersection. But once we identify all cells lying on canonical 2-strata (as described in Section 4), removing those cells produces a 1-dimensional CW subcomplex Z 1 ⊂ Z 0 whose local cohomology correctly distinguishes the special vertex: Similar top-down constructions have been employed implicitly by Whitney [33] and explicitly by Goresky-MacPherson [14] in non-cellular contexts.
Remark 5.2. Two properties of the sequence Y • mentioned in Definition 5.1 may be inductively justified as follows, using the fact that Y 0 is an n-dimensional regular CW complex as a base case.
(1) To see that Y d ⊂ Y d−1 is a regular CW subcomplex, note that if a cell y lies in the difference Y d−1 − Y d , then we have (y = y) ∈ W d−1 . And given any cell Thus, x also lies in the difference Y d−1 − Y d . Since the collection of cells removed from Y d−1 to obtain Y d is upward-closed with respect to the face partial order, Since Y d contains no cells of dimension (n − d + 1), its dimension can not exceed (n − d).
, the category S d is the localization of Fc(X) about the set W d from (7).
Recall from Section 2.2 that there is a universal functor Fc(X) → S d for each d; and since W d−1 ⊂ W d holds by (7), the universal property of localization guarantees a unique functor S d−1 → S d which makes the following diagram commute:

Fc(X)
" " Then, ϕ is monotone increasing in the sense that ϕ( Proof. Set ϕ(p) = q for a fixed p, so that (x p ≥ y p ) ∈ W q − W q−1 , whence both x p and y p are cells in Y q − Y q+1 . Since x p−1 ≥ y p holds in X, the cell x p−1 must lie in Y r − Y r+1 for some r ≤ q because Y • is a decreasing sequence of CW subcomplexes of X. Thus, (x p−1 ≥ y p−1 ) ∈ W r , so we have The monotonicity from the preceding lemma guarantees the non-existence of certain morphisms in the entire sequence S • . Proof. Note that a direct face relation w ≥ z can not hold in X since Y j is a CW subcomplex. Thus, any morphism in S d from w to z admits a genuine zigzag representative. Proceeding by contradiction, assume the existence of such a zigzag: The face relations w ≥ y 0 and x k ≥ z in X guarantee j ≤ ϕ(0) and ϕ(k) ≤ i, where ϕ is the function from (8). The monotonicity of ϕ from Lemma 5.4 now forces j ≤ i, and hence, i = j. The cell z is thus constrained to lie in Y i − Y j = ∅, which yields the desired contradiction.
As a direct consequence of the preceding result, isomorphism classes in S i of (n − i)dimensional cells from Y i remain unchanged across all the inclusions S i → S j for i ≤ j. The next result gives convenient alternate descriptions of such isomorphism classes across the entire sequence S • . Proposition 5.6. For each d ∈ [n], the following are equivalent. Two cells w and z in X are connected by a W d -zigzag, whose relations (≤ and ≥) all lie in W d − W d−1 , Proof. We will show (1) ⇒ (2) ⇒ (3) ⇒ (1). If w and z lie in the same connected Proof. Let ∅ = L −1 ⊂ · · · ⊂ L d−1 = L be the link of σ in the sense of Definition 2.1. Assume, proceeding via induction, that for each j < d the canonical (n − j)-strata of X correspond to isomorphism classes in S j of (n − j)-cells from Y j . By Proposition 5.6, these strata are precisely the connected components of Y j − Y j+1 . Thus, for each cell x lying in σ and j < d, we have quasi-isomorphisms the the open star of x in X = Y 0 . The cochain complexes on the right side compute the compactly-supported cohomology of x's open star in Y j , and (by the equivalence of singular and cellular cohomology), they are filtered chain homotopy equivalent to the local cohomology complexes L • j (x). By refinability of the quasi-isomorphisms above, whenever x ≥ y holds in X for another cell y lying in σ, we obtain commuting triangles of filtered quasi-isomorphisms is a quasi-isomorphism whenever j < d, and so by (6) we have (x ≥ y) ∈ E d−1 . Being an (n − d)-stratum, σ is an R-cohomology manifold, and there are quasi-isomorphisms (7). Since σ is connected, any two cells of X that it contains may be connected by a zigzag of cells lying in σ; and by the preceding argument, each face relation appearing in such a zigzag lies in W d − W d−1 . The desired conclusion now follows from Proposition 5.6.
The following result establishes the converse of Proposition 5.7.
Proof. Proceeding once again by induction, we assume that the statement holds for all j in [d − 1]. Fix an (n − d)-dimensional cell w in Y d ⊂ X, and let σ be the collection of all cells which are isomorphic to w in S d . We first show that σ satisfies the link axiom from Definition 2.1. Writing st(w) and lk(w) for w's star and link in X, for each i ≤ d we have the intersections which form the star and link of w in Y i ⊂ X. Since st • (w) admits a stratified homeomorphism to the corresponding C lk • (w) × R n−d , we get stratified quasi-isomorphisms of singular cochain complexes , whose codomains are, in turn, quasi-isomorphic to the local cohomology stalks L • i (w). If z is any other cell which becomes isomorphic to w in S d , then by Proposition 5.6 there a zigzag from w to z whose face relations all lie in W d − W d−1 : and hence zigzags of quasi-isomorphisms in Ch(R) for all i ∈ [d] . Each complex in sight is bounded and free (hence projective), so the backwards-pointing maps admit quasi-inverses (see [31,Cor 10.4.7]). Thus, one may turn them around to obtain maps L • i (w) → L • i (z) which fit into a string of quasi-isomorphisms , one obtains a candidate (d − 1)-dimensional stratified space L to serve as the link of σ. Turning now to the frontier axiom, for each i < d let K • i be the quotient complex L • i /L • i+1 , suitably restricted so that it assigns zero stalks to all cells lying outside σ. Over each cell z in σ, the cohomology H • K i (z) coincides with the (compactly supported) cohomology of the difference st i (z) − st i+1 (z). By construction, the closure of a canonical (n − i)-stratum τ in X intersects σ at the cell z if and only if the cohomology H n−i K i (z) is non-trivial. By definition, K • i fits into a short exact sequence (of complexes of cosheaves over σ): Applying the five-lemma [31,Ex 1.3.3] to the resulting long exact sequence, we note that all the extension maps of K • i induce isomorphisms on cohomology. Thus, if H n−i K i is non-zero at z, then it is also non-zero at every other cell in σ, whence every cell in σ admits a co-face from τ. Thus, σ ⊂ τ, as desired.
Finally, to see that σ is canonical, we use Proposition 5.7 to pick an (n − d)-cell w from Y d so that all cells in σ are isomorphic in S d to w. Proposition 5.6 now guarantees that no additional cells may be added to σ while preserving its connectedness.
The three preceding propositions establish that the sequence Y • ⊂ X from Definition 5.1 constitutes the canonical stratification of X. The localization functors Fc(X) → S • and the universal functors S • → S •+1 arising from the inclusions W • ⊂ W •+1 fit into a commutative diagram

Fc(X)
$ $ + + S 0 / / S 1 / / · · · / / S n = S, which one may view as analogous to an injective resolution of the functor Fc(X) → S 0 from Section 4. Proceeding from left to right in the sequence above, we obtain canonical strata of decreasing dimension by examining isomorphism classes in S • . We collect these results into the following expanded version of Theorem 1.1.
Theorem 5.9. Given a finite regular n-dimensional CW complex X, let Y • and W • be as in Definition 5.1, and let S • denote the localization of the face poset Fc(X) about W • . For each d ∈ [n], the canonical (n − d)-strata of X correspond bijectively with isomorphism classes of (n − d)-dimensional cells from Y d in S k for any k ≥ d.
The morphisms in S = S n = colim(S • ) also recover the frontier partial order among canonical strata.
Proposition 5.10. The frontier relation τ σ holds among two canonical strata of X if and only if there is a morphism in S from a cell lying in τ to a cell lying in σ.
Proof. If τ σ holds, then there are cells w and z in τ and σ respectively so that w ≥ z in Fc(X). This face relation includes into S as a morphism from w to z. Conversely, given cells w and z in τ and σ respectively, assume the existence of a W-zigzag w ≥ y 0 ≤ x 0 ≥ · · · ≥ y k ≤ x k ≥ z and let ϕ : [k] → [n] be the associated monotone function from Lemma 5.4. By construction, this zigzag contains cells in canonical strata τ i of dimension n − ϕ(i) for all i in [k]. If ϕ(i) = ϕ(i + 1) then τ i = τ i+1 , otherwise τ i τ i+1 (because x i is a co-face of y i+1 ). Thus, there is a descending sequence of canonical strata τ τ 0 τ 1 · · · τ k σ, so we obtain τ σ as desired.
The argument above shows that the zigzag paths which form morphisms in S may remain indefinitely in a single stratum or descend to lower-dimensional adjacent strata, but they can never ascend to higher strata. In other words, S is a (cellular, 1-categorical) version of the entrance path category associated to the canonical stratification of X -see [23,Def 3.1], [30,Sec 7] or [34, Sec 2].

Algorithms
Progress in applied algebraic topology [12,24] has inspired, and been sustained by, a combination of theoretical advances [1, 3, 4] on one hand and increased algorithmic sophistication on the other [7,16,21]. As a pleasant consequence, one has recourse to a profusion of advanced software [26] dedicated to the very specific task of efficiently computing (co)homology groups of vast cell complexes [17,22]. From a computational perspective, the local cohomology L • of a finite regular CW complex enjoys the obvious, but enormous, advantage of being local. One only ever needs to construct cochain complexes corresponding to open stars of cells (rather than holding the entire complex in system memory). Since each such star-complex may be processed independently of the others, the construction of L • and the computation of H • L are inherently distributable operations.

Subroutines.
There are several avenues for efficiently storing a CW complex for the purpose of computing its cohomology: one may employ a Hasse graph, whose vertices are cells and whose edges, usually adorned with an orientation, connect neighboring cells across codimension one. Alternately, one may directly store (sparse avatars of) coboundary matrices over R, whose nonzero entries encode adjacencies between cells of codimension one. In the presence of extra structure -for instance, if the complex involved is simplicial or cubical -the additional rigidity affords access to highly optimized data structures such as simplex trees or bitmaps. Rather than tethering the prospective implementer to a fixed and possibly inconvenient representation, we will present all our algorithms at a high level and work directly with the poset of cells.
Our first subroutine UpSet employs a minor modification of breadth-first search on a finite poset P to extract the subposet of all elements which lie above a fixed element v but not above a fixed element u. In all instances of interest here, our input P will be the face poset Fc(X) of a finite regular CW complex X, while u and v will be adjacent cells across codimension one: By definition, the output P u v in such cases is precisely the subposet of Fc(X) containing cells which lie in the difference of open stars st(v) − st(u). We also reserve the right to set u = ∅, so that line 07 does not check x against u and the output is just the poset of cells in st(v).
The main loop (in line 01) increments the current codimension d from 0 up to n; as it executes each iteration, the cells lying on (n − d)-dimensional canonical strata are identified and removed from X, so that in the d-th iteration we pass from Y d to Y d+1 in the language of Definition 5.1. There are three secondary loops (at lines 02, 04 and 09); all three are trivially distributable across several processors, as indicated by the dist comments in those lines. The first loop in line 04 is easiest to explain: it uses our subroutines UpSet and Cohom to compute the compactly-supported cohomology of each The second loop from line 04 computes whether or not inclusions of open stars st(x) ⊂ st(y) for x > 1 y induce isomorphisms on compactly supported cohomology by examining their cokernels. In other words, we use the fact that the map induced by on cohomology is an isomorphism if and only if the difference (st(y) − st(x)) ∩ Y d has trivial cohomology. We begin by assigning to each face relation (x > 1 y) the number (x > 1 y) = −1. As the algorithm executes, (x > 1 y) gets incremented to the largest integer k so that the extension maps L • i (x > 1 y) are quasi-isomorphisms for all i ∈ [k]. Thus, we are guaranteed to have (x > 1 y) ∈ E k where E • denotes the sets from (6). Since this loop is completely independent of the loop in line 02, it may be executed simultaneously with that loop.
The third loop, which spans lines 09 through 12, must be executed after the first two intermediate loops have terminated. It uses the cohomology groups h • computed by the loop in line 02 and the cohomology groups -values computed by the loop in line 04 to select cells lying on canonical strata of dimension (n − d) via (7). Note that line 10 ensures the correct dimensionality and line 11 enforces upward closure. Line 12 removes all cells lying on canonical (n − d)-strata from Y d , so we are left with Y d+1 and the outer loop of line 01 enters its next iteration. Since all cells with codim = d are identified on lines 08 and 12 in a given iteration of the outer d-loop of StratCast, we assume that removing them from X incurs no additional cost. Putting all our estimates together, each iteration of the d-loop incurs a worstcase cost of O(p 3 + np). Since this loop executes exactly (n + 1) times, the total complexity of running StratCast (assuming that the number of available processors exceeds the number of cells and codimension one face relations in X) is O (n + 1)(p 3 + np) . And once StratCast has terminated, one may find all desired canonical strata of X by computing connected components of cells with the same codim value. This is linear in the number of cells in X, so we obtain the following result. Proposition 6.1. Let X be an n-dimensional regular CW complex with m cells and star size p as in (9). The time complexity of computing its canonical stratification with coefficients in a (commutative, unital) ring R via StratCast is O (n + 1)(p 3 + np) + m , The first two conditions above are satisfied by typical choices of R (such as the integers or finite fields). In practice, one expects to have m (n + 1)(p 3 + np), so the observed cost of computing canonical strata is essentially linear in the size of X.