Persistent Cup Product Structures and Related Invariants

One-dimensional persistent homology is arguably the most important and heavily used computational tool in topological data analysis. Additional information can be extracted from datasets by studying multi-dimensional persistence modules and by utilizing cohomological ideas, e.g.~the cohomological cup product. In this work, given a single parameter filtration, we investigate a certain 2-dimensional persistence module structure associated with persistent cohomology, where one parameter is the cup-length $\ell\geq0$ and the other is the filtration parameter. This new persistence structure, called the persistent cup module, is induced by the cohomological cup product and adapted to the persistence setting. Furthermore, we show that this persistence structure is stable. By fixing the cup-length parameter $\ell$, we obtain a 1-dimensional persistence module, called the persistent $\ell$-cup module, and again show it is stable in the interleaving distance sense, and study their associated generalized persistence diagrams. In addition, we consider a generalized notion of a persistent invariant, which extends both the rank invariant (also referred to as persistent Betti number), Puuska's rank invariant induced by epi-mono-preserving invariants of abelian categories, and the recently-defined persistent cup-length invariant, and we establish their stability. This generalized notion of persistent invariant also enables us to lift the Lyusternik-Schnirelmann (LS) category of topological spaces to a novel stable persistent invariant of filtrations, called the persistent LS-category invariant.

In this work, given a single parameter filtration, we investigate a certain 2-dimensional persistence module structure associated with persistent cohomology, where one parameter is the cup-length ℓ ≥ 0 and the other is the filtration parameter. This new persistence structure, called the persistent cup module, is induced by the cohomological cup product and adapted to the persistence setting. Furthermore, we show that this persistence structure is stable. By fixing the cup-length parameter ℓ, we obtain a 1-dimensional persistence module, called the persistent ℓ-cup module, and again show it is stable in the interleaving distance sense, and study their associated generalized persistence diagrams.
In addition, we consider a generalized notion of a persistent invariant, which extends both the rank invariant (also referred to as persistent Betti number ), Puuska's rank invariant induced by epi-mono-preserving

Introduction
Persistent Homology in TDA. In Topological Data Analysis (TDA), one studies the evolution of homology across a filtration of spaces, called persistent homology [16,17,22,32,36,37,59,66]. Persistent homology is able to extract both the time when a topological feature (e.g. a component, loop, cavity) is 'born' and the time when it 'dies'. The collection of these birth-death pairs (real intervals) constitute the barcode, also called the persistence diagram, of the filtration (depending on the manner in which they are visualized).
Cohomology Rings in TDA. In the case of cohomology, which is dual to the case of homology for a given field K, one studies linear functions on (homology) chains, known as cochains. Cohomology has a graded ring structure, inherited from the cup product operation on cochains, denoted by ⌣: H p (X)×H q (X) → H p+q (X) for a space X and dimensions p, q ≥ 0; see [55,Sec. 48 and Sec. 68] and [41,Ch. 3,Sec. 3.D]. This makes the cohomology ring a richer structure than homology (vector spaces). Persistent cohomology has been studied in [5,28,29,31,45], without exploiting the ring structure induced by the cup product. Works which do attempt to exploit this ring structure include [40,44] in the standard case and [3,8,24,25,42,43,52,65] at the persistent level.
In [43], the author applies the persistence algorithm toward calculating a set of invariants related to the cup products in the cohomology ring of a space. In [65], the author studies an algebraic substructure of the cohomology ring. In [25], the authors study a persistence based approach for differentiating quasi-periodic and periodic signals which is inherently based on cup products.
In [3], the author develops a setting for persistent characteristic classes and constructs algorithms for (i) finding the Poincare Dual to a homology class, (ii) decomposing cohomology classes and (iii) deciding when a cohomology class is a Steenrod square. In [52] the authors establish the notion of persistent Steenrod modules by incorporating the Steenrod square operation into the persistence computational pipeline, and they implement an algorithm to compute the barcode of persistent Steenrod modules [51].
Assuming an embedding of a simplicial set into R n , the author of [42] studies a notion of barcodes (together with a suitable extension of the bottleneck distance) which absorb information from a certain A ∞ -algebra structure on persistent cohomology. In [8], the authors study the structure and stability of a family of barcodes that absorb information from an A ∞ -coalgebra structure on persistent homology. See also [7].
In [38], the authors study several interleaving-type distances on persistent cohomology by considering different algebraic structures (including the natural ring structure) and study the stability of the persistent cohomology for filtrations.
In our previous joint work with Contessoto [24], we tackled the question of quantifying the evolution of the cup product structure across a filtration through introducing a polynomial-time computable invariant which is induced from the notion of cup-length: the maximal number of cocycles (in dimensions 1 and above) having non-zero cup product. We call this invariant the persistent cup-length invariant, and we identify a tool -the persistent cup-length diagram (associated to a family of representative cocycles σ of the barcode) as well as a polynomial-time algorithm to compute it. In Sec. 2.3, we recall and provide more details for the mathematical results in [24]. Readers interested in the algorithmic part should still refer to the original paper [24].
The goal of this paper is to develop more general notions of persistent invariants that can extract additional information from the cup product operation than just the persistent cup-length invariant, including the persistent LS-category (see Sec. 2.4) and the persistent cup modules (see Sec. 4).
Some invariants related to the cup product. An invariant in standard topology is a quantity assigned to a given topological space that remains invariant under a certain class of maps. This invariance helps in discovering, studying, and classifying properties of spaces when the class of maps is that of homotopy equivalences. Beyond Betti numbers, examples of classical invariants are: the Lyusternik-Schnirelmann category (LS-category) of a space X, defined as the minimal integer k ≥ 1 such that there is an open cover {U i } k i=1 of X such that each inclusion map U i ֒→ X is null-homotopic, and the cuplength invariant, which is the maximum number of positive-degree cocycles having non-zero cup product. While being relatively more informative, the LScategory is difficult to compute [26], and the rational LS-category 1 is known to be NP-hard to compute [46]. The cup-length invariant, as a lower bound of the LS-category [61,62], serves as a computable estimate for the LS-category. Another well known invariant which can be estimated through the cup-length is the so-called topological complexity [33,63,64].

Our contributions.
Let T op denote the category of (compactly generated weak Hausdorff) topological spaces. 2 Throughout the paper, by a (topological) space we refer to an object in T op, and by a persistent space we mean a functor from the poset category (R, ≤) to T op. A filtration (of spaces) is an example of a persistent space where the transition maps are given by inclusions. This paper considers only persistent spaces with a discrete set of critical values. In addition, all (co)homology groups are assumed to be taken over a field K. We denote by Int ω the set of intervals of type ω, where ω can be any one of the four types: open-open, open-closed, closed-open and closed-closed. Results in this paper apply to all four situations, so for simplicity of notation, we state our results only for closed-closed intervals and omit ω unless otherwise stipulated.
Let (N, ≤) be a poset category (e.g., N = N, N ∞ or N ∞,∞ ) with a partial order ≤. Let (N, ≤) op be the opposite category 3 of (N, ≤), i.e. a poset category on N equipped with the converse (or dual) relation ≥. In Sec. 2, for any given category C, we define the N-valued categorical invariants to be maps I : Ob(C) ⊔ Mor(C) → N assigning values to both objects and morphisms in C, such that I(id X ) = I(X) for all X ∈ Ob(C) and The persistent LS-category invariant, which we introduce in this work, cannot be realized as an invariant of the above types, making our notion of categorical invariant a non-trivial generalization.
Given any persistent object, i.e. a functor F • : (R, ≤) → C, a categorical invariant I gives rise to a persistent (categorical) invariant 4 defined as the functor I(F • ) : (Int, ⊆) → (N, ≤) op sending each interval [a, b] to the I-invariant of the transition map f b a , cf. Defn. 2.7. For example, the well-known rank invariant [18,Defn. 11] of a persistent module is a persistent invariant induced by the dimension map dim : Ob(Vec)⊔Mor(Vec) → N defined by sending each vector space to its dimension and each linear map to the dimension of its image. Here Vec denotes the category of finite-dimensional vector spaces over a given field K.
In Sec. 2.3, we realize the cup-length invariant as a categorical invariant by defining the cup-length of a map to be the cup-length of its image. We then lift the cup-length invariant to a persistent invariant: for a persistent space X • : (R, ≤) → T op with t → X t , the persistent cup-length invariant cup(X • ) : Int → N of X • , see Defn. 2.14, is defined as the functor from (Int, ⊆) to (N, ≥) of non-negative integers, which assigns to each interval [a, b] the cup-length of the image ring im H * (X b ) → H * (X a ) . See also [24,Sec. 2] for details.
In Sec. 2.4, we recall the notion of the LS-category of a map first introduced in [35] and more carefully studied in [10,Defn. 1.1], and see that the LS-category is a categorical invariant of topological spaces. We define the persistent LS-category invariant of a persistent space X • to be the function cat(X • ) : Int → N of X • assigning to each interval [a, b] the LS-category of the transition map X a → X b ; see Defn. 2.31. In Prop. 2.32, we prove that in analogy with the standard fact that cup-length is a lower bound for the LScategory their persistent versions also satisfy that inequality: for any interval See Fig. 1 for examples of the persistent cup-length invariant and the persistent LS-category invariant. Although the latter invariant is pointwisely bounded below by the former, the latter is not necessarily stronger in terms of distinguishing topological filtrations; see Ex. 2.34. In Sec. 3, we establish stability results for persistent invariants. We first prove that the erosion distance d E between persistent invariants is bounded above by the interleaving distance d I between the underlying persistent objects (see Sec. 3.1): Theorem 1 (d I -stability of persistent invariants) Let C be a category, and let I : Ob(C) ⊔ Mor(C) → N be a categorical invariant of C. The persistence I-invariant is 1-Lipschitz stable: for any F•, G• : (R, ≤) → C, In Sec. 3.2, for the case of topological spaces, we consider categorical invariants that preserve weak homotopy equivalences, and we strengthen the above stability result by replacing d I with the homotopy-interleaving distance d HI introduced by Blumberg and Lesnick [11,Defn. 3.6]. Following the fact that d HI is stable under the Gromov-Hausdorff distance d GH between metric spaces (see Prop. 3.4), we also obtain stability of such categorical invariants in the Gromov-Hausdorff sense: Theorem 2 (Homotopical stability) Let I be a categorical invariant of topological spaces satisfying the condition that for any maps X (1) For the Vietoris-Rips filtrations VR•(X) and VR•(Y ) of compact metric spaces X and Y , we have We apply the above theorem to show that the persistent cup-length invariant and the persistent LS-category are stable:  Notice that the persistent cup-length invariant and persistent LS-category invariant are comparable in the sense that neither invariant is stronger than the other (see Ex. 2.34), similar to the static case (see Ex. 2.30).
Through several examples, we show that the persistent cup-length (or LS-category) invariant helps in discriminating filtrations when persistent homology fails to or has a relatively weak performance in doing so, e.g. [24,Ex. 13]. Also, in Ex. 3.6, we specify suitable metrics on the torus T 2 and on the wedge sum S 1 ∨ S 2 ∨ S 1 , and compute the erosion distance between their persistent cup-length (or LS-category) invariants and apply Thm. 2 to obtain a lower bound π 6 for the Gromov-Hausdorff distance between them T 2 and S 1 ∨ S 2 ∨ S 1 (see Prop. 3.7) 5 . We also verify that the interleaving distance between the persistent homology of these two spaces is at most 3 5 of the bound obtained from persistent cup-length (or LS-category) invariants. See Rmk. 3.8.
In Sec. 4, for a given persistent space X • and any ℓ ∈ N + , we study the ℓ-fold product (H + (X • )) ℓ of the persistent (positive-degree) cohomology ring, via the notion of flags of vector spaces. A flag 6 (of vector spaces) means a nonincreasing sequence of vector spaces connected by inclusions, e.g. V 1 ⊇ V 2 ⊇ · · · . A flag is said to have finite depth if there is some n such that V n = 0 (as a consequence, V k = 0 for all k ≥ n). Similarly, we call a non-increasing sequence of graded vector spaces connected by degree-wise inclusions to be a graded flag: For a topological space X, we define Φ(X) to be the graded flag induced by ℓ-fold product (H + (X)) ℓ for all ℓ ∈ N + : Let Flag and GFlag be the category of finite-depth flags and finite-depth graded flags, respectively. For a persistent space X • , we have the persistent graded flag Φ(X • ) : (R, ≤) → GFlag with t → Φ(X t ), and we call it the persistent cup module of X • . Indeed, the persistent cup module can be described via the following commutative diagram: for any t ≤ t ′ , The above diagram suggests that the persistent cup module Φ(X • ) has the structure of a 2D persistence module, which we still denote as Φ(X • ) but view as a functor Φ(X • ) : ℓ . Two-dimensional persistent modules have wild types of indecomposables in most cases [6,48,49], making them difficult to study (see Sec. 4.4 for details). Therefore, in Sec. 4.1, we concentrate on studying Φ(X • ) as a persistent graded flag, and taking the point of view of generalized persistent diagrams [57,Defn. 7.1].
Flags can be completely characterized by a non-increasing sequence of integers, where each integer is the dimension of the corresponding vector space (see Prop. 4.1). We call such non-increasing sequence of integers the dimension of a flag, and write it as We define the rank invariant of flags as the map rk : Flag → N ∞ sending each flag to its dimension and each flag morphism to the dimension of its image; see Defn. 4.7. This invariant is clearly a (N ∞ -valued) categorical invariant and thus can be lifted to a persistent invariant. Similarly, we define the dimension of a graded flag, to be a matrix such that each row is the dimension of the flag in the corresponding degree: The dimension The rank invariant of graded flags is defined similar to the non-graded case and will also be denoted as rk. See Fig. 2. We show that the erosion distance d E between persistent cup modules is stable under the homotopy-interleaving distance d HI between persistent spaces, which is a consequence of Thm. 1. In addition, the stability of persistent cup modules improves the stability of the persistent cup-length invariant. Recall from [21] that a standard persistence module M • : (R, ≤) → Vec is q-tame if it satisfies the condition that rk(M t → M t ′ ) < ∞ whenever t < t ′ .
Theorem 3 For persistent spaces X• and Y• with q-tame persistent (co)homology, we have For the Vietoris-Rips filtrations VR•(X) and VR•(Y ) of two metric spaces X and Y , all the above quantities are bounded above by 2 · d GH (X, Y ) .
For a fixed ℓ, we call the functor We also show that the bottleneck distance d B between barc deg p Φ ℓ (·) is stable under d HI between persistent spaces: For the Vietoris-Rips filtrations VR•(X) and VR•(Y ) of two metric spaces X and Y , all the above quantities are bounded above by 2 · d GH (X, Y ) .
In Ex. 4.2, we use the spaces T 2 ∨ S 3 and (S 1 × S 2 ) ∨ S 1 to demonstrate that the rank invariant of persistent cup modules and the barcode of persistent ℓ-cup modules provide better lower bounds for the Gromov-Hausdorff distance than those given by persistent cup-length (or LS-category) invariants and persistent homology. This shows the ability of persistent cup modules to distinguish between spaces and capture additional important topological information.
In Prop. 4.15, we prove that the persistent cup-length invariant can be obtained from the persistence diagrams of all Φ ℓ (X • ). This is another piece of evidence that the persistent cup module is a richer structure than the persistent cup-length invariant.
Organization of the paper. In Sec. 2.1, we provide an overview of persistent theory and discuss the general concept of persistent objects. In Sec. 2.2, we define categorical invariants, and see that every categorical invariant gives rise to a persistent invariant. In Sec. 2.3, we recall our previous work on the persistent cup-length invariant of a topological filtration, including the graded ring structure of cohomology which is yielded by the cup product, the notion of persistent cup-length diagram, the idea of our proposed algorithm, as well as additional details and examples. In Sec. 2.4, we introduce the persistent LS-category invariant and show that it is pointwisely bounded below by the persistent cup-length invariant. In Sec. 2.5, we study the Möbius inversion of persistent invariants. We show that for persistent cup-length invariant and persistent LS-category, their Möbius inversion can return negative values. In Sec. 3, we establish the stability of persistent invariants, and prove Thm. 1, Thm. 2, Cor. 1.1, and Cor. 1.2. In Sec. 4, we study the ℓ-fold products of persistent cohomology algebras both as a persistent graded flag (see Sec. 4.1) and a 2D persistence module (see Sec. 4.4). In the former case, we identify a complete invariant for flags, and lift it to a persistent invariant which is stable and improves the stability of the persistent cup-length invariant.

Persistent invariants
In this section, we define the notions of invariants and persistent invariants in a general setting.
In classical topology, an invariant is a numerical quantity associated to a given topological space that remains invariant under a homeomorphism. In linear algebra, an invariant is a numerical quantity that remains invariant under a linear isomorphism of vector spaces. Extending these notions to the general 'persistence' setting from TDA, leads to the study of persistent invariants, which are designed to extract and quantify important information about TDA structures, such as the rank invariant for persistent vector spaces [18,Defn. 11]. We study two other persistent invariants: the persistent cup-length invariant of persistent spaces [24,Defn. 7] (see also Sec. 2.3) and the persistent LS-category invariant of persistent spaces (see Sec. 2.4) that we introduce.

Persistence theory
We recall the notions of persistent objects and their morphisms from [57,Defn. 2.2]. For general definitions and results in category theory, we refer to [4,47,54]. Definition 2.1 Let C be a category. We call any functor F• : (R, ≤) → C a persistent object (in C). Specifically, a persistent object F• : (R, ≤) → C consists of For each inequality t ≤ s in R, we have the inclusion ι s t : X t ֒→ X s giving rise to a persistent space X • : (R, ≤) → T op.
• Applying the p-th homology functor to a persistent topological space X • , for each t ∈ R we obtain the vector space H p (X t ) and for each pair of parameters t ≤ s in R, we have the linear map in (co)homology induced by the inclusion X t ֒→ X s . This is another example of a persistent object, namely a persistent vector space H p (X • ) : (R, ≤) → Vec. Dually, by applying the p-th cohomology functor, we obtain a persistent vector space H p (X • ) : (R, ≤) → Vec which is a contravariant functor.
In the literature, different types of invariants have been identified to study properties of persistent objects based on the category they lie in. For example: Example 2.4 • For the category of finite sets, Set, whose morphisms are functions between finite sets, we consider I : Ob(Set) → N to be the cardinality invariant. • For the category of vector spaces over K, Vec, whose morphisms are linear maps, we consider I : Ob(Vec) → N to be the dimension invariant. • For the category of topological spaces, T op, whose morphisms are continuous maps, we consider I : Ob(T op) → N to be the invariant that counts the number of connected components. • For the category of smooth manifolds, Man, whose morphisms are smooth maps, we consider J : Ob(Man) → N to be the genus invariant.
Persistence modules, barcodes and persistence diagrams. A persistent object in Vec is also called a (standard) persistence module. An interval module associated to an interval [a, b] is the persistence module, denoted by When M • can be decomposed as a direct sum of interval modules (e.g. . It is clear that barc(M • ) and dgm(M • ) determine each other. Later in Ex. 2.39, we recall that the persistence diagram is the Möbius inversion of the rank invariant.
In the following subsection, we study more general persistent objects and identify a general condition on invariants so that they can be used to study these persistent objects.

Persistent N-valued categorical invariants
We introduce the notion of N-valued categorical invariants, where N is a poset category with a partial order ≥ (e.g., N = N or N ∞ ), and devise a method for lifting such invariants to persistent invariants.
a map on the class Mor(C) of morphisms in C such that (i) I(id X ) = I(X), for all X ∈ Ob(C), and (ii) for any commutative diagram of the following form: Remark 2.6 A categorical invariant preserves isomorphisms in the underlying category. This follows immediately from Condition (ii) of Defn. 2.5: for any isomorphism f : X → Y in a given category C, and similarly I(f −1 ) ≤ I(f ).
Condition (ii) of Defn. 2.5 also implies that for a persistent object F • : Thus, we can associate a functor (Int, ⊆) → (N, ≤) op to each persistent object in C as follows: Definition 2.7 Let C be a category and let I be a N-valued categorical invariant. For any given persistent object F• : (R, ≤) → C, we associate the functor We call I(F•) the persistence I-invariant associated to F•.
We establish an equivalent definition of Defn. 2.5 (2), which is easier to use when checking whether an invariant is a categorical invariant.
By its definition, a categorical invariant needs to assign values to both the objects and the morphisms in a category. Below, we consider one type of invariants that are originally defined only on objects but can be easily extended to a categorical invariant by sending each morphism to the invariant evaluated on its image. Example 2.9 (epi-mono invariant) Let C be any regular category (e.g. the category of rings or the category of vector spaces). An N-valued epi-mono invariant in C is any map I : Ob(C) → N such that: In a regular category C, the regular epimorphisms and monomorphisms form a factorization system, and thus C is a category with images in particular. Hence, any epi-mono invariant I : Ob(C) → N of a regular category C, yields a categorical invariant I : Example 2.10 (Rank invariant, [18,Defn. 11]) Recall that Vec is the category of vector spaces over the field K whose morphisms are K-linear maps. The dimension invariant dim : Ob(Vec) → N, that assigns to each vector space its dimension, is an example of an N-valued epi-mono invariant. According to Ex. 2.9, for any F• :

Comparison to related notions of invariants
The notion of categorical invariant in Defn. 2.5 can be seen as a generalization of both that of an epi-mono invariant as in Ex. 2.9 and of related notions that have been considered in the TDA literature. Below we provide the details.
• For C an abelian category (and thus a regular category in particular) then (a) the notion of epi-mono-respecting pre-orders on C introduced by Puuska [58, Defn. 3.2] is equivalent to (b) the restriction of our notion of epi-mono invariant to abelian categories (and thus a special case of a categorical invariant), as follows.
(b)⇒(a): Given any epi-mono invariant I : Ob(C) → N on an abelian category C where N is a poset, we can define a pre-order ≤ I on Ob(C), induced by the invariant, given by: . By the definition of an epi-mono invariant, I is non-decreasing on monomorphisms, and nonincreasing on regular epimorphisms. This implies that the pre-order ≤ I is epi-mono-respecting in the sense of Puuska.
(a)⇒(b): Suppose that we have an epi-mono-respecting pre-order ≤ on Ob(C) in the sense of Puuska. Then the "1-skeleton" of that pre-order (viewed as a category whose objects are the equivalence classes associated with the equivalence x ≃ y ⇔ x ≤ y and y ≤ x ) will be a poset which we denote by N := (Ob(C)/≃, ≤). Then, we obtain the persistent invariant One can check that these two constructions (I →≤ I and ≤ → I ≤ ) are inverses of each other, i.e. they induce a bijection.
• For C any category, the notion of categorical persistence function of Bergomi et al. [9,Defn. 3.2] is a lower bounded function p : Mor(C) → N such that The first condition is equivalent to our notion of a categorical invariant (we consider that the categorical persistence function is defined on each object X in C as p(X) := p(id X )). The second condition is actually equivalent to the positivity of the persistence diagram (yielded as the Möbius inversion as in Defn. 2.37) of the categorical persistence function. However, our notion of categorical invariant in Defn. 2.5 does not assume such positivity conditions, e.g. both the persistent cup-length and persistent LS-category invariants sometimes can have negative persistence diagrams (see Ex. 2.40).
To summarize, our notion of a categorical invariant is a strict generalization of several concepts introduced in the TDA literature. In particular, the persistent LS-category invariant cannot be realized as an invariant of the above types.
In the remaining part of Sec. 2, we will concentrate on two other N-valued categorical invariants and will omit the term 'N-valued' for conciseness.
In Sec. 2.3, we consider the cup-length, a categorical invariant of topological spaces, which arises from the cohomology ring structure. Recall that the cohomology functor is contravariant. In general, a contravariant functor from C to N is equivalent to a covariant functor from the opposite category C op of C to N. It is clear that any categorical invariant I : Ob(C) → N of C is also a categorical invariant in the opposite category C op of C.
Later in Sec. 2.4, we study the persistent invariant arising from the LScategory of topological spaces, which admits the persistent cup-length invariant as a pointwise lower bound.

Persistent cup-length invariant
In the standard setting of persistent homology, one considers a filtration of spaces, i.e. a collection of spaces X • = {X t } t∈R such that X t ⊆ X s for all t ≤ s, and studies its p-th persistent homology for any given dimension p. Persistent homology is defined as the functor H p (X • ) : (R, ≤) → Vec which sends each t to the p-th homology H p (X t ) of X t ; see [16,32]. The barcode of the p-th persistent homology H p (X • ), also called the p-th barcode of X • , encodes the lifespans of the degree-p holes (p-cycles that are not p-boundaries) in X • . The p-th persistent cohomology H p (X • ) and its corresponding barcode barc(H p (X • )) are defined dually. Although persistent homology and persistent cohomology have the same barcode [28,Prop. 2.3], this paper mostly concerns cohomology so we will use the latter notion. We call the barcode barc(H * (X • )) of H * (X • ), which is the disjoint union ⊔ p∈N barc(H p (X • )), the total barcode of X • .
In Sec. 2.3.1 we recall the notion of the cup product of cocycles, together with the notion and properties of the cup-length invariant of cohomology rings. In Sec. 2.3.2 we lift the cup-length invariant to a persistent invariant, called the persistent cup-length invariant, and examine some examples that highlight its strength.
Persistent cup-length invariant sometimes captures more information than persistent (co)homology, cf. [24,Ex. 13]. However, cup-length is not a complete invariant of graded rings. For instance, the spaces T 2 ∨ T 2 and S 1 ∨ S 2 ∨ S 1 ∨ T 2 have different ring structures, but have the same cup-length. For the purpose of extracting even more information from the cohomology ring structure, in Sec. 4 we will study the (persistent) ℓ-fold product of the persistent cohomology algebra, which provide a strengthening of the notion of cup-length.

Cohomology ring and cup-length
We recall the cup product operation in the setting of simplicial cohomology. Let X be a simplicial complex with an ordered vertex set {x 1 < · · · < x n }. For any non-negative integer p, we denote a p-simplex by α := [α 0 , . . . , α p ] where α 0 < · · · < α p are ordered vertices in X, and by α * : C p (X) → K, the dual of α. Here K is the base field as before. Let β := [β 0 , . . . , β q ] be a q-simplex for some non-negative integer q. The cup product α * ⌣ β * is defined as the linear map C p+q (X) → K such that for any (p + q)-simplex τ = [τ 0 , . . . , τ p+q ], Equivalently, we have that α * ⌣ β * is [α 0 , . . . , α p , β 1 , . . . , β q ] * if α p = β 0 , and 0 otherwise. By a p-cochain we mean a finite linear sum σ = h j=1 λ j α j * , where each α j is a p-simplex in X and λ j ∈ K. The cup product of a p-cochain σ = h j=1 λ j α j * and a q- For a given space X, the cup product yields a bilinear map ⌣: H p (X) × H q (X) → H p+q (X) of vector spaces. In particular, it turns the total cohomology vector space H * (X) := p∈N H p (X) into a graded ring (H * (X), +, ⌣). The cohomology ring map X → H * (X) defines a contravariant functor from the category of spaces, T op, to the category of graded rings, GRing (see [41,Sec. 3.2]). To avoid the difficulty of describing and comparing ring structures (in a computer), we study a computable invariant of the graded cohomology ring, called the cup-length. Definition 2.12 The length of a graded ring R is the largest non-negative integer ℓ such that there exist homogeneous elements η 1 , . . . , η ℓ ∈ R with nonzero degrees (i.e. η 1 , . . . , η ℓ ∈ p≥1 Rp), such that η 1 • · · · • η ℓ = 0. If p≥1 Rp = ∅, then we declare that the length of R is zero. We denote the length of a graded ring R by len(R). The map len : Ob(GRing) → N, with R → len(R) is called the length invariant.
When R = (H * (X), +, ⌣) for some space X, we denote cup(X) := len(H * (X)) and call it the cup-length of X. The map is called the cup-length invariant.
Here are some properties of the (cup-)length invariant that we will use.
Rp, we can write every η i as a linear sum of elements in B. Thus, η can be written as a linear sum of elements in the form of r 1 • · · · • r ℓ , where each r j ∈ B. Because η = 0, there must be a summand r 1 • · · · • r ℓ = 0. Therefore,

Persistent cohomology ring and persistent cup-length invariant
We study the persistent cohomology ring of a filtration and the associated notion of persistent cup-length invariant. We examine several examples of this persistent invariant and establish a way to visualize it in the half-plane above the diagonal. A functor R • : (R, ≤) → GRing is called a persistent graded ring. Recall the contravariant cohomology ring functor H * : T op → GRing. Given a persistent space X • : (R, ≤) → T op, the composition H * (X • ) : (R, ≤) → GRing is called the persistent cohomology ring of X • . Due to the contravariance of H * , we consider only contravariant persistent graded rings in this paper.
By [23,Prop. 38], the length of graded rings is an epi-mono invariant 7 and thus a categorical invariant, so for any persistent graded ring R • , len(R • ) defines a functor from (Int, ⊆) to (N, ≤) op . We lift the length invariant to a persistent invariant as: 14 Given a persistent graded ring R• : (R, ≤) → GRing op we define the persistent length invariant of R• as the functor is the persistent cohomology ring of a given persistent space X• : (R, ≤) → T op, then we will call the functor , the persistent cup-length invariant of X•, and we will denote it by cup(X•) : Prop. 2.15 below allows us to compute the cohomology images of a persistent cohomology ring from representative cocycles (see [24,Defn. 3]), which is applied to establish Thm. 1 of [24] and to compute persistent cup-length invariants. Prop. 2.16 allows us to simplify the calculation of persistent cup-length invariants in certain cases, such as the Vietoris-Rips filtration of products or wedge sums of metric spaces, e.g. Ex. 2.17.
, generated as a graded ring.
Proof First, let us recall the following: Given a space X, the cohomology ring H * (X) ∈ GRing is a graded ring generated by the graded cohomology vector space H * (X) ∈ Vec, under the operation of cup products. It is clear that any linear basis of H * (X) also generates the ring H * (X), under the cup product. Given an inclusion of spaces X ι ֒− → Y , let f : H * (Y ) → H * (X) denotes the induced cohomology ring morphism. Let A be a linear basis for H * (Y ). Since A also generates H * (Y ) as a ring, the image f (A) generates f (H * (Y )) as a ring. Now, let H * (ι s t ) : H * (Xs) → H * (X t ) denote the cohomology map induced by the inclusion ι s t : X t ֒→ Xs. Notice that the set A := {[σ I ]s : s ∈ I ∈ barc(H * (X•))} forms a linear basis for H * (Xs), and thus H * (ι s t )(A) generates im(H * (ι s t )) as a ring. On the other hand, for each representative cocycle and any t ≤ s, Here ×, ∐ and ∨ denote point-wise product, disjoint union, and wedge sum, respectively. For the first item, we additionally require the spaces in X• and Y• to have torsion-free cohomology rings.
Proof By functoriality of products , disjoint unions, and wedge sums, we can define the persistent spaces:

Visualization of persistent cup-length invariant. Each interval [a, b] in
Int is visualized as a point (a, b) in the half-plane above the diagonal (see Fig. 3). To visualize the persistent cup-length invariant of a filtration X • , we assign to each point (a, b) the integer value cup(X • ) ([a, b]), if it is positive.
If cup(X • )([a, b]) = 0 we do not assign any value. We present an example to demonstrate how persistent cup-length invariants are visualized in the upperdiagonal plane (see Fig. 6). Example 2.17 (S 1 and T d : visualization of cup(·)) Let S 1 be the geodesic circle with radius 1, and consider the Vietoris-Rips filtration VR•(S 1 ). In [1], the authors computed the homotopy types of Vietoris-Rips complexes of S 1 at all scale parameters. Following from their results, the persistent graded ring H * (VR•(S 1 )) is given by where the map H * (VRs(S 1 )) → H * (VRr(S 1 )) is an isomorphism if l 2l+1 2π < r ≤ s < l+1 2l+3 2π, and is 0 otherwise. We compute the persistent cup-length invariant of VR•(S 1 ) and obtain: for any a ≤ b, 2l+3 2π , for some l = 0, 1, . . . 0, otherwise, which is equal to the rank of H * (VR b (S 1 )) → H * (VRa(S 1 )) (viewed as a linear map).
As an application of Prop. 2.16, we also study the persistent cup-length invariant of the Vietoris-Rips filtration of the d-torus We draw visualizations for both cup VR•(S 1 ) and cup VR•(T d ) in Fig. 4.

Persistent cup-length diagram and computation of the persistent cup-length invariant
In this section, we recall from [24,Sec. 3] the notion of the persistent cup-length diagram of a filtration, defined by using a family of representative cocycles, and recall that the persistent cup-length invariant can be retrieved from the persistent cup-length diagram (cf. Thm. 4).
Definition 2.18 (Support of ℓ-fold products) Let σ be a family of representative cocycles for H * (X•). Let ℓ ∈ N + and let I 1 , . . . , I ℓ be a sequence of elements in barc(H * (X•)) with representative cocycles σ I1 , . . . , σ I ℓ ∈ σ, respectively. Consider the ℓ-fold product σ I1 ⌣ · · · ⌣ σ I ℓ . We define the support of σ I1 ⌣ · · · ⌣ σ I ℓ to be Proposition 2.19 With the same assumption and notation in Defn. 2.18, let I := supp(σ I1 ⌣ · · · ⌣ σ I ℓ ). If I = ∅, then I is an interval [b, d], where b ≤ d are such that d is the right end of ∩ 1≤i≤ℓ I i and b is the left end of some I ′ ∈ barc(H * (X•)) (I ′ is not necessarily one of the I i ).
Proof We prove in the case of closed intervals. For the other types of intervals, the statement follows from a similar discussion. Let d be the right end of ∩ 1≤i≤ℓ I i . Clearly, any t > d is not in I, because there is some Thus, I = ∅, which gives a contradiction. Therefore, d is the right end of I.
We show that I in an interval, i.e. for any t ∈ I and s ∈ [t, d], we have s ∈ I. This is true because [σ I1 ]s ⌣ · · · ⌣ [σ I ℓ ]s, as the preimage of a non-zero element [σ I1 ] t ⌣ · · · ⌣ [σ I ℓ ] t , cannot be zero.
Assume the left end of I is b.
Let barc(H + (X • )) consist of the positive-degree bars in the barcode of X • .
with the convention that max ∅ = 0.
Recall from [24,Ex. 18] that the persistent cup-length diagram depends on the choice of the representative cocycles σ. However, the persistent cup-length diagram can always be used to compute the persistent cup-length invariant (regardless of the choice of σ), through the following theorem. 9 Theorem 4 Let X• be a filtration, and let σ be a family of representative cocycles for the barcode of X•. The persistent cup-length invariant cup(X•) can be retrieved from the persistent cup-length diagram dgm (cup(X•), σ): for any [a, b] ∈ Int, Eqn. (5) The '⇐' is trivial. As for '⇒', recall from Prop. 2.19 that in this case the support is a non-empty interval with its right end equal to the right end of ∩ i I ′ i ⊇ [a, b]. It follows that the support, as an interval, contains both a and b, and thus containing [a, b]. Therefore, we have Eqn. (8) below: Here Eqn. (9) and Eqn. (10)  Because H * (X•) is non-trivial up to degree 2, dgm (cup(X•), σ) (I) ≤ 2 for any I. The only non-trivial cup product is α ⌣ β, whose support is [2, 3). Thus, dgm (cup(X•), σ) ([2, 3)) = 2. Therefore, the persistent cup-length diagram dgm (cup(X•), σ) is (see the left-most figure in Fig. 6 for its visualization): Applying Thm. 4, we obtain the persistent cup-length invariant cup(X•), visualized in Fig. 6: To compute the persistent cup-length invariant, it suffices to compute the persistent cup-length diagram. For a finite simplicial filtration X • : X 1 ֒→ · · · ֒→ X N (= X), let barc(H + (X • )) be the barcode over positive dimensions and σ := {σ I } I∈barc(H + (X•)) a family of representative cocycles. For any ℓ ≥ 1, let Σ ℓ be the collection of all supp(σ I1 ⌣ · · · ⌣ σ I ℓ ) where each I i ∈ barc(H + (X • )). Then the persistent cup-length diagram is obtained by first computing {Σ ℓ } ℓ≥1 using: while Σ ℓ = ∅ do for (I 1 , σ 1 ) ∈ barc(H + (X • )) and ( See [24,Sec. 3.4] for the detailed algorithm and a proof that our algorithm runs in polynomial-time in the total number of simplices.

Persistent LS-category invariant
In this section, we study another example of categorical invariants, the LScategory of topological spaces. Then we lift it to a persistent invariant, which we call the persistent LS-category invariant.
One expects the persistent LS-category invariant to be difficult to compute, but it will be seen in Prop. 2.32 that the persistent cup-length invariant serves as a computable lower bound estimate of the persistent LS-category.
The LS-category of a space was introduced by Lyusternik and Schnirelmann for providing lower bounds on the number of critical points for smooth functions on a manifold [53]. The LS-category of a map was first defined by Fox [35] and subsequently studied by Berstein and Ganea [10]. We recall the definitions of the LS-category of spaces and maps: in X that cover X such that each inclusion U i ֒→ X is null-homotopic (i.e. U i is contractible to a point in X). We recall the following properties of LS-category from [10,26], which guarantees that the LS-category yields a categorical invariant (see Defn. 2.5) of T op even though it is not an epi-mono invariant (see Ex. 2.28).  In particular, this implies that cat(ι) = 0 is not equal to cat(imι) = cat(S 1 ) = 1.

Example 2.29
The inequality cup(X) ≤ cat(X) can be strict. For a topological space X, let L(X) be its free loop space, i.e. the set of unbased loops equipped with the compact-open topology. By [26,Thm. 9.3], if X be any simply-connected space of finite type (all its homology groups are finitely generated) and non-trivial reduced rational homology, then cat(L(X)) = ∞. For instance (cf. [26, Rmk. 9.10]), for the two-dimensional sphere S 2 , we have

Example 2.30
The cup-length and LS-category are not necessarily stronger invariants than each other. For instance, the spaces S 2 and the free loop space L S 2 have identical cup-length but different LS-category: by Ex. 2.29, we have On the other hand, the spaces L S 2 × S 2 and L S 2 have identical LS-category but different cup-length: Because the LS-category is a categorical invariant, we can lift it to a persistent invariant as: We see in the following example that using the persistent cup-length invariant and Prop. 2.32 can help us compute the persistent LS-category. Example 2.33 (Example of cat(X•)) Let X• = {X t } t≥0 be a filtration of the wedge sum of two 2-disks, as shown in Fig. 7. In order to compute the persistent LS-category of X• from its definition, one needs to figure out the LS-category of the (non-identity) transition maps in X•. Let us instead compute the persistent cup-length invariant first. In Sec. 3.2, we will show that the erosion distance between the persistent cup-length (or persistent LS-category) invariants is stable under the homotopyinterleaving distance of persistent spaces, cf. Cor. 1.1 (or Cor. 1.2). It is worth noticing that even though persistent cup-length serves as a pointwise lower bound of persistent LS-category, the latter is not necessarily a stronger invariant than the former one, nor vice versa. See the example below: Example 2.34 A constant filtration of X is a filtration X• such that X t = X for all t and all transition maps are the identity map on X. The phenomenon in the static case that cup-length and LS-category are not necessarily stronger than each other can be easily extended to the persistent setting, by considering the constant filtrations of spaces in Ex. 2.30.

Möbius inversion of persistent invariants
In this section, we study the Möbius inversion of I(F • ) for a given persistent object F • : (R, ≤) → C and a categorical invariant I.
First, we recall the concept of Möbius inversion in the sense of Rota [60]. We define the Möbius function µ Q : Q × Q → Z, given recursively by the formula We recall the following result of Rota's: with an initial element 0 (i.e. 0 ≤ q, for all q ∈ Q) and let K be a field. Let f, g : Q → K be a pair of functions. If f (q) = p≤q g(q) for q ∈ Q, then g is given point-wisely by The function g will be called the Möbius inversion of f .
Following [57, Defn. 2.2], we consider a certain constructibility condition on persistent objects, in which case the Möbius inversion of a persistent invariant associated to such persistent objects exists. Let C be a category with an identity object e. For a set of real number {s 1 < · · · < s m }, a persistent object F • : (R, ≤) → C is said to be {s 1 < · · · < s m }-constructible, if F t → F s is an isomorphism when [t, s] ⊆ [s i , s i+1 ] for some i or [t, s] ⊆ [s m , ∞), and F t → F s is the identity on e when [t, s] ⊆ (−∞, s 1 ). Definition 2.37 Let F• be an {s 1 < · · · < sm}-constructible persistent object. Given any persistence I-invariant I(F•) : Int → N (viewed as a function), we define the persistence I-diagram 10 (associated to F•) dgm(I(F•))(·) : Int → Z point-wisely as Finally, note that the Möbius inversion of the rank invariant of a constructible persistence module M • is always non-negative, is due to the fact that M • is interval decomposable (see [27,Thm. 1.1]).

Stability of persistent invariants
In Sec. 3.1, we recall the notions of the interleaving distance between persistent objects (see Defn. 3.1) and the erosion distance d E between persistent invariants (see Defn. 3.2). We show the following categorical stability for any persistent invariant: In Sec. 3.2, we show that the erosion distance d E between persistent invariants that arise from weak homotopy invariants is stable under the homotopy interleaving d HI (see Defn. 3.3) between persistent spaces. Subsequently, for persistent spaces arising from Vietoris-Rips filtrations, we establish the stability of persistent invariants under the Gromov-Hausdorff distance d GH between metric spaces. (1) For the Vietoris-Rips filtrations VR•(X) and VR•(Y ) of compact metric spaces X and Y , we have By checking that the persistent cup-length invariant of persistent spaces and the persistent LS-category of persistent CW complexes satisfy the assumptions in the above theorem, we obtain the following two corollaries:

Categorical stability of persistent invariants
We first recall the definition of the interleaving distance between persistent objects and the notion of erosion distance between persistent invariants.
commute for all t ∈ R. The interleaving distance between F• and G• is with the convention that d E (J 1 , J 2 ) = ∞ if an ǫ satisfying the condition above does not exist.
Proof of Thm. 1 Denote by f b a : Fa → F b and g b a : Ga → G b , a ≤ b, the associated morphisms from F• to G•. Assume that F•, G• are ǫ-interleaved. Then, there exist two R-indexed families of morphisms ϕ t : F t → G t+ǫ and ψ t : G t → F t+ǫ , which are natural for all t ∈ R, such that ψ t+ǫ • ϕ t = f t+2ǫ t and ϕ t+ǫ • ψ t = g t+2ǫ t , for all t ∈ R.
Let [a, b] ∈ Int. We claim that I(g b+ǫ a−ǫ ) ≤ I f b a . If we show this, then similarly we can show the symmetric inequality, and therefore obtain that I(F•), I(G•) are ǫ-eroded. Indeed, the claim is true because

Homotopical stability of persistent invariants
To prove Thm. 2, we first recall the definition of the homotopy-interleaving distance, together with certain results from persistence theory. Following the terminology in [11, Defn. 1.7], a pair of persistent spaces X • , Y • : (R, ≤) → T op are called weakly equivalent, denoted by X • ≃ Y • , if there exists a persistent space Z • : (R, ≤) → T op and a pair of natural transformations ϕ : Z • ⇒ X • and ψ : Z • ⇒ Y • such that for each t ∈ R, the maps ϕ t : Z t → X t and ψ t : Z t → Y t are weak homotopy equivalences, i.e., they induce isomorphisms on all homotopy groups.  To prove Thm. 2, we establish the following lemma: We apply the Lem. 3.5 and Thm. 1 to prove Thm. 2, which states that certain categorical weak homotopy invariant is stable under the homotopyinterleaving distance between persistent spaces.
Proof of Thm. 2 Let X•, Y• : (R, ≤) → T op be two persistent spaces. For any pair where g is a weak homotopy equivalence of CW complexes (and thus a homotopy equivalence), we have The strength of the persistent cup-length invariant at discriminating filtrations has been demonstrated by several examples in [24]. In particular, the following example was stated there without proof. Here, we provide detailed proofs for the case of the persistent cup-length invariant, and also extend it to the case of the persistent LS-category invariant. In Rmk. 3.8, we compute the interleaving distance between the persistent homology of these two spaces and see that the persistent cup-length (or LS-category) invariant provides a better approximation of the Gromov-Hausdorff distance of the two spaces than persistent homology.
The wedge sum X ∨ x0∼y0 Y (in short, X ∨ Y ) of two (X, x 0 ) and (Y, y 0 ) is the quotient space of the disjoint union of X and Y by the identification of basepoints x 0 ∼ y 0 . Recall from [2,15] that the gluing metric on X ∨ Y is given by Example 3.6 (VR(T 2 ) v.s. VR(S 1 ∨ S 2 ∨ S 1 )) Let the 2-torus T 2 = S 1 × S 1 be the ℓ∞-product of two unit geodesic circles. Let S 2 be the unit 2-sphere, equipped with the geodesic distance, and denote by S 1 ∨ S 2 ∨ S 1 the wedge sum equipped with the gluing metric. Using the characterization of Vietoris-Rips complex of S 1 given by [1], we obtain the persistent cup-length invariant of VR(S 1 ). Combined with Prop. 2.16, we obtain the persistent cup-length invariant of VR(T 2 ) (see Fig. 9): for any interval Via a similar discussion, we obtain the persistent LS-category invariant of VR(T 2 ) which turns out to be the same as cup VR(T 2 ) . Indeed, VR(T 2 ) consists of the homotopy types of even-dimensional torus, and for any n, the LS-category of an n-dimensional torus is 2 the same as its cup-length.
Due to the current lack of knowledge about the homotopy types of VRr(S 2 ) for r close to π, we are not able to completely characterize the function cup(VR(S 2 )), nor cup(VR(S 1 ∨ S 2 ∨ S 1 )). However, despite this, we are still able to exactly evaluate the erosion distance of cup(VR(S 1 ∨ S 2 ∨ S 1 )) and cup(VR(T 2 )), as in Prop. 3.7.
Proposition 3.7 Let I = cup or cat. For the 2-torus T 2 and the wedge sum space Proof For simplicity of notation, we denote J × := I(VR(T 2 )) and J∨ := I(VR(S 1 ∨ S 2 ∨ S 1 )).
interesting objects, we will consider the subalgebra A + of A which consists of positive-degree elements in A, and study the ℓ-fold product of A + , instead. Given p ∈ N, let deg p (·) be the degree-p component of a graded vector space. For instance, deg p (H * (X)) = H p (X) is the p-th cohomology of a topological space X. For any ℓ ≥ 1 and a graded algebra A, we will write deg p (A + ) ℓ to extract the degree-p component of the ℓ-fold product of A + . Let H + : T op → GAlg op denote the positive-degree cohomology algebra functor, i.e.
In Sec. 4.1, we first study the category of (graded) flags and a complete invariant for it, which we call the rank invariant and denote as rk(·), as well a, the Möbius inversion of rk(·). In Sec. 4.1.3, we introduce the notion of persistent cup modules Φ(·) (see Defn. 4.10) and persistent ℓ-cup modules Φ ℓ (·) (see Defn. 4.11), which are persistent graded flags and persistent graded vector spaces, respectively. Let d E be the erosion distance between persistent invariants (see Definition 3.2), and d B be the bottleneck distance between barcodes (see [22,Defn. 3.1]). We establish the following stability result for persistent cup modules and persistent ℓ-cup modules: Theorem 3 For persistent spaces X• and Y• with q-tame persistent (co)homology, we have . For the Vietoris-Rips filtrations VR•(X) and VR•(Y ) of two metric spaces X and Y , all the above quantities are bounded above by 2 · d GH (X, Y ) .
For the Vietoris-Rips filtrations VR•(X) and VR•(Y ) of two metric spaces X and Y , all the above quantities are bounded above by 2 · d GH (X, Y ) .
We provide a concrete example in Sec. 4.2 to compare the performance of different persistent invariants, including persistent homology, persistent cup-length invariant, persistent LS-category, persistent cup modules and persistent ℓ-cup modules. In particular, we show that persistent (ℓ)-cup modules sometimes have stronger distinguishing powers than other invariants.
In Sec. 4.4, we see that persistent cup modules also have the structure of 2-dimensional persistence modules.

Persistent cup module as a persistent graded flag
In Sec. 4.1.1, we recall the notion of flags of vector spaces over the base field K (see Defn. 4.3) and study the decomposition of flags. Let Flag denote the category of finite-depth flags, and let Flag fin be the full subcategory of Flag consisting of flags of finite-dimensional vector spaces which we will refer to as finite dimensional flags for simplicity. Let J(Flag fin ) denote the commutative monoid (under the direct sum) of isomorphism classes of elements in Flag fin , and let A(Flag fin ) be the Grothendieck group of Flag fin , defined as the group completion of J(Flag fin ).
Below, we will establish:   V⋆ := V 1 ⊇ V 2 ⊇ · · · ⊇ V ℓ ⊇ · · · . The flag V⋆ is said to have finite depth if there exists n such that Vn = 0 and it is said to be finite-dimensional if dim(V 1 ) < ∞ (as a consequence, dim(Vn) < ∞ for all n).
A morphism f : V⋆ → W⋆ of flags is a linear map f : We say that a persistent flag V ⋆,• is q-tame if for every interval I, im(V ⋆,• (I)) is finite dimensional. Note that if a persistent space X • has q-tame persistent (co)homology, then its persistent cup-module Φ(X • ) is a q-tame persistent flag and so is the persistent ℓ-cup module Φ ℓ (X • ) for any ℓ. In other words, the rank invariant is a persistent invariant because it arises from dim which is categorical invariant, cf. Defn. 2.7.
Graded flags. All the above results for flags can be generalized to graded flags. A graded flag is a degree-wise non-increasing filtration of graded vector spaces: which will be denoted by V • ⋆ . Here • and ⋆ represent the parameter for degree and depth (in flags), respectively. Let GVec be the category of graded vector spaces. As before, we can see that the category GFlag fin of finite-depth graded flags of finite-dimensional vector spaces is an additive category with zero object, kenerls, cokernels, images and coimages, but it is not abelian.
For a persistent graded flag V • ⋆,• , we define its rank invariant of a persistent flag V ⋆,• to be the functor rk It is straightforward to check that the rank invariant of persistent graded flags and its Möbius inversion are both given degree-wise, i.e. and Eqn. (14) suggests that the persistence diagram of a persistent graded flag V • ⋆,• can be obtained by stacking the standard persistence diagrams of all V p ℓ,• , for all ℓ and p; see Fig. 12 for an example.

Persistent cup module as a persistent graded flag and its stability
For a topological space X and any ℓ ≥ 1, let (H + (X)) ℓ be the ℓ-fold product of the graded algebra (H + (X), +, ⌣). Then the following non-increasing sequence of spaces forms a graded flag: Any continuous map f : X → Y induces a map from H + (f ) : H + (Y ) → H + (X) that preserves the cup product operation. Therefore, for any ℓ, Definition 4.10 For a persistent space X•, we define the persistent cup module of X• to be the persistent graded flag In particular, we have the following commutative diagram: For a persistent space X• and any ℓ ≥ 1, we define the persistent ℓ-cup module of X• to be the persistence graded vector space Let barc deg p Φ ℓ (X • ) be the barcode of the degree-p component of the persistent ℓ-cup module, and In particular, barc Φ 1 (X • ) is the standard barcode of X • in all positive degrees.
We now establish the stability of persistent cup modules and persistent ℓ-cup modules i.e. Thm. 3 and Prop. 1.3. Stability of persistent (ℓ-)cup modules In general, for any persistent graded algebra A • (see pg. 4), there is a persistent graded flag structure similar to the one underlying persistent cup modules: for any t ≤ t ′ , Φ(A t ) : Proof First notice that for any t ≤ s, im( Thus, By similar discussion, we have len Proof of Thm. 3 By Lem. 4.12, we have the first inequality below: To prove the second inequality, we apply Thm. 1. Recall from the proof of Cor. 1.1 that weak homotopy equivalence preserves cohomology algebras. For any maps where g is a weak homotopy equivalence, we have a graded algebra isomorphism H * (g) : H * (Z) → H * (Y ). Thus, H * (g) induces an graded flag isomorphism Φ(g) : Φ(Z) → Φ(Y ), implying that rk(Φ(g • f )) = rk(Φ(f )) and rk(Φ(h • g)) = rk(Φ(h)).
Therefore, the second inequality follows immediately from Thm. 1.
For the case of Vietoris-Rips filtrations of metric spaces, the statement follows from Prop. 3.4.
Proof of Prop. 1.3 By considering the following functors for any p, ℓ ≥ 1,

Comparative performance of the different invariants
In this subsection, we use the spaces T 2 ∨ S 3 v.s. (S 1 × S 2 ) ∨ S 1 to compare the distinguishing powers of persistent homology, persistent cup-length invariant, persistent LS-category, persistent cup modules and persistent ℓ-cup modules.
In particular, we see that in this example the latter two invariants provide better approximation of the Gromov-Hausdorff distance than other invariants. As before, let T 2 = S 1 × S 1 be the ℓ ∞ -product of two unit geodesic circles, and similarly let S 1 × S 2 be equipped the ℓ ∞ -product metric. Let T 2 ∨ S 3 and (S 1 × S 2 ) ∨ S 1 both be equipped with the gluing metric (see page 35).

Fig. 10
Top row: persistence diagram of persistent cohomology of T 2 ∨ S 3 in degree 1, 2 and 3. Bottom row: persistence diagram of persistent cohomology of (S 1 × S 2 ) ∨ S 1 in degree 1, 2 and 3. In each figure, the gray part is the only region (beside the blue dots) that could attain non-zero value in the persistence diagram.
Therefore, we have the persistent cup-length (or LS-category) invariants of T 1 ∨ S 2 and (S 1 × S 2 ) ∨ S 1 as in Fig. 1. And notice that Persistence diagrams and barcodes of persistent ℓ-cup modules.
Each of the persistence diagram in Fig. 10 contains an undetermined region, so we cannot always get the precise value of the bottleneck distance between the barcodes associated to each vertical two diagrams. Instead, we can easily estimate them:

Fig. 11
Top row: persistence diagram of the persistent 2-cup module of T 2 ∨ S 3 in degree 1, 2 and 3. Bottom row: persistence diagram of the persistent 2-cup module of (S 1 × S 2 ) ∨ S 1 in degree 1, 2 and 3.
For the persistence diagram of persistent 2-cup modules, see Fig. 11 which we use to estimate the bottleneck distance between the barcodes associated to each vertical two diagrams. Fortunately, for the second and third item below, we are able to get the precise value for d B . This is because in both cases, matching all points to the diagonal is an optimal matching.
2 . Now consider the case p > 3. Recall that VR r (S n ) is homotopy equivalent to S n for all r ∈ (0, ζ n ). Thus, VR r T 2 ∨ S 3 is homotopy equivalent to T 2 ∨S 3 for all r ∈ (0, ζ 3 ). As a consequence, there are no bars in the degree-p barcode of T 2 ∨ S 3 whose length is larger than π − ζ 3 . Via a similar discussion, there are no bars in the degree-p barcode of (S 1 × S 2 ) ∨ S 1 whose length is larger than π − ζ 2 . Therefore, for all ℓ, we have which holds because the right-hand side is an upper bound for the cost of matching all bars to the diagonal.

Further discussion on persistent cup modules
Retrieving cup(X • ) from persistent cup modules. On the other hand, the persistent cup-length invariant can be computed from the barcode of persistent ℓ-cup modules via the following proposition. Let X • be a filtration of topological spaces. The persistent cup module of X • also has the structure of a 2-dimensional persistence module, because it can be viewed as a functor Φ(X • ) : (N + , ≤) × (R, ≤) → GVec op with (ℓ, t) → (H + (X t )) ℓ . This is due to the factor that for any ℓ ≤ ℓ ′ and t ≤ t ′ , we have the following commutative diagram: where the row morphisms are natural linear inclusions and the column morphisms are induced maps of H + (X t ) ← H + (X t ′ ). Unlike the 1-dimensional case where indecomposable persistence module can be characterized by intervals, the indecomposables of 2-dimensional persistence modules are much more complicated and in most cases not finite [6,48,49]. A simple type of 2-dimensional persistence modules are those that can be decomposed into rectangle modules, but the persistent cup modules are not necessarily rectangle decomposable, see Ex. 4.19 below.  Fig. 5 the filtration X• = {X t } t≥0 of a pinched 2-torus T 2 and its total barcode. We directly compute the persistence module (H + (X•)) 2 , and see that it is only nonzero in degree 2 and its barcode consists of only one bar [2,3). However, the barcode of H 2 (X•) has a single bar [2, ∞). Thus, the persistent cup module of X• has an indecomposable (in degree 2) given by The persistent cup module has the special structure that its row maps are inclusions of vector spaces, implying that (1) each column is a persistence submodule of any column left to it and (2) (2), we were inspired to study the persistent cup modules as persistent (graded) flags in the previous section.

Discussion
Understanding the stability of persistent cup modules when represented as 2D modules. Note that: (i) The right inequality in Rem. 4.13 can also be interpreted as the stability of the persistence cup module as a 2D persistence module R × N → Vec op : indeed we can consider the strict flow (a.k.a. linear family of translations) Ω = (Ω ǫ ) ǫ≥0 on the poset R × N, given by (t, ℓ) → (t + ǫ, ℓ). (ii) A flag is also a functor N → Vec op and thus a persistent flag is also a functor R → (Vec op ) N ; in particular the interleaving distance of persistent flags coincides with the restriction of the interleaving distance on ((Vec op ) N ) R on persistent flags. (iii) By construction of Ω, the category with a flow ((Vec op ) R×N , − · Ω) is flow-equivariantly isomorphic to (((Vec op ) N ) R , − · S) (where for each ǫ ≥ 0, S ǫ : t → t + ǫ), in the sense of [30,Defn. 4.2], and thus the corresponding interleaving distances are isometric [30,Thm. 4.3].
Extension to more general domain posets. Note that all of our results in this paper can be generalized from the setting of persistence modules over R to the setting of persistence modules over more general posets P , for instance for P = R n . If we change R with general posets P , then Thm. 1's statement and proof (as well as the other theorems) can be changed and expanded: intervals Int and their thickening flow ∇ (which gives rise to the erosion distance) should be replaced by (con(P ), con(Ω)), where con(Ω) should be the thickening flow on the poset of connected subposets con(P ) induced by the given flow Ω on P . We did not develop further the ideas towards this direction since this is not the main point of this paper.

Appendix A The category Flag fin
The direct sum in Flag fin is given by V ⋆ ⊕ W ⋆ := (V ⊕ W, F(V ⊕ W )), where F ℓ (V ⊕ W ) := V ℓ ⊕ W ℓ for each ℓ. Let f : V ⋆ → W ⋆ be a morphism of flags.
The kernel of f is the vector space injection ker(f ) ⊆ V , where ker(f ) is endowed with the filtation given by F l ker(f ) := ker(f ) ∩ V ℓ . The cokernel of f is the sujection of vector spaces W ։ coker(f ) = W/ im(f ), where coker(f ) is endowed with the filtration given by F l coker(f ) := coker(f | V ℓ : V ℓ → W ℓ ) = W ℓ / im(f | V ℓ ). Proof If two flags V⋆ and W⋆ are isomorphic, then there are morphisms f : V⋆ → W⋆ and g : W⋆ → V⋆ such that g • f = id V⋆ and f • g = id W⋆ . It immediately follows that for any l ∈ N + , f | F ℓ V and g| F ℓ W induce an isomorphism between F ℓ V and F ℓ W . Thus, dim(V ℓ ) = dim(W ℓ ) for any ℓ.
Conversely, we first consider the case of finite-depth flags. If two finite-depth flags V⋆ and W⋆ have the same dim, then one can construct an isomorphism between them inductively. Start with the smallest space FnV and FnW in each flag. Because FnV and FnW have the same dimension, we can construct an isomorphism between them. Extend this isomorphism to an isomorphism between F n−1 V and F n−1 W . In the case of infinite-depth flags, because we are considering flags of finite-dimensional vector spaces, every flag stabilizes in finitely many steps. Thus, we can apply a similar argument as in the case of finite-depth flags.