1 Introduction

Persistence modules appear in different forms and guises across many areas of mathematics. In recent years, particular interest and focus has come from their extensive use in topological data analysis (TDA) in general and persistent homology in particular. In this paper, we examine persistence modules of the form \((V_\bullet , f_\bullet )\):

(1)

where each \(V_i\) is a vector space of finite dimension \(n_i\) (over an underlying field \({\mathbb {F}}\)) and each \(f_i:V_{i-1} \rightarrow V_i\) is a linear map. We study three different aspects.

1.1 Computing barcode bases

The first is the central question of finding a barcode basis for \((V_\bullet ,f_\bullet )\). This amounts to a choice of basis for each \(V_i\) with respect to which the linear maps \(f_i\) have a particularly nice form — they admit at most a single 1 in each row and column, with all other entries being 0. The existence of such bases and matrix representations is well known (Gabriel 1972). We say that the matrices are in barcode form and the corresponding basis of \(\bigoplus _{i=0}^\ell V_i\) is a barcode basis, since the barcodes familiar from TDA can easily be extracted.

Algorithms to compute barcode bases in TDA typically take as input a filtered chain complex as in Zomorodian and Carlsson (2005), where one has recourse to matrix representations of the boundary operators. Algorithms for general persistence modules include the well-known (Carlsson and de Silva 2010) and much more recently, (Hang and Mio 2020) and (Henselman-Petrusek 2017). Here we present a new algorithm that takes as its input a matrix representation \(A_\bullet = ( A_1, \dots , A_\ell )\) relative to some initial basis of the persistence module \((V_\bullet , f_\bullet )\) and outputs a sequence \(g= (g_0 , \dots , g_\ell )\) of change of basis matrices \(g_i\) for each of the \(V_i\) so that the new matrix representation \(A'_\bullet = (A'_1, \dots , A'_\ell )\) with \(A_i' = g_i \cdot A_i \cdot g_{i-1}^{-1}\) is in barcode form. Our algorithm in Sect. 3.2 is explicit and elementary in the sense that every intermediate step amounts to performing standard (row or column) operations on the constituent \(A_i\)’s. The key difficulty here is that column operations on \(A_i\) often force new matrix operations on \(A_k\) for \(k<i\), and similarly row operations on \(A_i\) often require changes in \(A_k\) for \(k > i\).

1.2 The space of barcode bases

Our second goal is to describe the set of all barcode basesFootnote 1 of \((V_\bullet ,f_\bullet )\). We show that this set can naturally be identified as the stabiliser of a matrix representation \(A_\bullet \) of \((V_\bullet , f_\bullet )\), and hence as a subgroup of the product

$$\begin{aligned} G := \mathrm{GL}(n_0; {\mathbb {F}}) \times \dots \times \mathrm{GL}(n_\ell ; {\mathbb {F}}), \end{aligned}$$

where \(\mathrm{GL}(d;{\mathbb {F}})\) indicates the general linear group of invertible \(d \times d\) matrices with entries in \({\mathbb {F}}\). Writing

$$\begin{aligned}{}[i_1,j_1] \preceq [i_2,j_2] \quad \text { whenever } \quad i_1 \le i_2 \le j_1 \le j_2 \end{aligned}$$

and \(\text {Mat}(m \times n; {\mathbb {F}})\) for the set of \(m \times n\) matrices with coefficients in \({\mathbb {F}}\), we show in Theorem 4.4 that the set of barcode bases is in one-to-one correspondence with

Here \(d_{ij} \) is the multiplicity of the interval [ij] in the barcode of \((V_\bullet ,f_\bullet )\). If the matrix representation is already in barcode form, then the elements in \(\mathrm{GL}(d_{ij};{\mathbb {F}})\) correspond to changes of basis for the sub-vector space of \(V_i\) spanned by the basis elements corresponding to the bars [ij], and the elements in \(\mathrm{Mat}(d_{i_{1}j_{1} }\times d_{i_{2}j_{2}};{\mathbb {F}})\) represent the changes to basis vectors in \(V_{i_2}\) corresponding to intervals \([i_2, j_2]\) obtained by adding vectors from \(V_{i_2}\) which correspond to intervals \([i_1, j_1]\).

1.3 Simplifying maps of persistence modules

We now turn attention to our third problem. Given a map of persistence modules

$$\begin{aligned} \phi : (V_\bullet , f_\bullet ) \rightarrow (W_\bullet , h_\bullet ), \end{aligned}$$

we seek barcode bases for source and target in terms of which \(\phi \) assumes its simplest form, in the sense that we now specify. An interval [ij] represents a submodule canonically isomorphic to the interval module \(\mathbf{I}[i,j]_\bullet \). It is an elementary observation that such a module can be mapped non-trivially to another interval module \(\mathbf{I}[i', j']_\bullet \) if and only if \([i',j'] \preceq [i,j]\); and in this case the non-zero map is unique up to a non-zero scalar. In the simplest case, \(\phi \) induces a partial matching where each bar in the source is mapped to exactly one in the target or mapped to zero. Surprisingly, we show in Theorem 5.3 that such a partial matching exists (after a change of barcode bases) whenever neither source nor target admit a pair of strictly nested intervals in their respective barcode decompositions.Footnote 2 In an example we also show that these conditions are necessary.

1.4 Zigzag modules

Finally, we generalise the algorithm and theorems described above to zizag modules of a fixed type \(\tau \): the linear maps of the persistence module (1) can go either forward \(V_{i-1} \xrightarrow {f_i} V_{i}\) or backward \(V_{i-1} \xleftarrow {q_i} V_{i}\) according to pattern fixed by \(\tau \). Such modules are also classified in terms of sums of interval modules. Our algorithm can be adapted to compute barcode bases of zizag modules of any type. Next, we introduce a generalisation of the order \(\preceq \) that depends on the type \(\tau \). This order takes into account that the order \(\preceq \) has to be reversed when all the arrows in (1) are reversed. With this order in place, we can once again classify the set of all barcode bases, see Theorem 6.11. Similarly when considering maps of zizag modules, we generalise the notion of strictly nested bars, which once again depends on the type \(\tau \). Excluding such nested bars, we are able to obtain barcode bases of the source and target zizag modules in terms of which the map is described by a partial matching on the set of bars; see Theorem 6.14.

1.5 Outline

We take the view that a persistence module \((V_\bullet , f_\bullet )\) is a quiver representation. In Sect. 3, we provide a constructive proof (and concomitant algorithm) of Gabriel’s decomposition theorem for persistence modules. In Sect. 4 we identify the set of all barcode bases with a stabiliser of the action of the group G on the set of all possible matrix representations of \((V_\bullet ,f_\bullet )\). In Sect. 5 we study maps between persistence modules by viewing them as representations of ladder quivers with relations. Gabriel’s theorem no longer applies here; however, using similar arguments as in Asashiba et al. (2018), we are able to prove a finite decomposition when source and target have no nested bars. Finally, in Sect. 6 we extend our results to any quiver of type A, that is zigzag persistence modules.

1.6 Related work

As mentioned above, there are several well known algorithms which compute barcodes of persistence modules. Some start with chains on a filtered simplicial complex, some deal with more general persistence modules and in some cases zizag modules.

There are two algorithms that explicitly deal with computing the barcode bases associated to the interval decomposition. In Carlsson et al. (2019) the authors use matrix factorisation techniques to obtain bases in which the matrices are in echelon form. This technique also applies to zizag modules. In Gregorio et al. (2021) the authors inductively compute interval bases using basis completions techniques at each step, but they do not deal with the zizag case. Neither of these papers attempts to compute the set of barcode bases associated with the persistence module, and the algorithm we describe here takes a different approach to reducing matrices in barcode form. Most recently, the authors of Hang et al. (2021) use U-match matrix factorisation to reduce computational complexity and memory storage in computing barcodes.

It was shown in Escolar and Hiraoka (2016) that maps between persistence modules of length less than 5 admit a tractable classification in the sense that the associated ladder persistence modules are always of finite type. In contrast, the authors of Buchet and Escolar (2018) find an infinite class of indecomposable non-isomorphic ladder persistence module whenever the length is greater then 5. In Asashiba et al. (2018) the authors outline an algorithm which computes the decomposition into a sum of indecomposables for ladder persistence modules of length \( < 5\).

2 Persistence modules and barcode bases

A persistence module, for the purposes of this paper, is a finite collection \((V_\bullet ,f_\bullet )\) of finite-dimensional vector spaces \(V_i\) over a field \({\mathbb {F}}\) along with \({\mathbb {F}}\)-linear maps \(f_i\) arranged as follows:

The number \(\ell +1\) is called the length of \((V_\bullet ,f_\bullet )\). The direct sum of \((V_\bullet ,f_\bullet )\) with another persistence module \((W_\bullet ,h_\bullet )\) of the same length is defined pointwise — in other words, the vector space at its i-th position is \(V_i \oplus W_i\) for each admissible index i, and similarly the corresponding linear map is given by \(f_i \oplus h_i\). We call \((V_\bullet ,f_\bullet )\) isomorphic to \((W_\bullet ,h_\bullet )\) if there are invertible linear maps \(\phi _i:V_i \rightarrow W_i\) so that the square

commutes for each index i in \(\left\{ 1,\ldots ,\ell \right\} \). Isomorphisms from \((V_\bullet ,f_\bullet )\) to itself are called automorphisms, and these evidently form a group under composition. We denote this group by \(\text {Aut} (V_\bullet , f_\bullet )\).

The interval module corresponding to a pair of non-negative integers \(i \le j\) is the persistence module \(\mathbf{I}[i,j]_\bullet \) given by

where the contiguous string of \({\mathbb {F}}\)’s spans \(\left\{ i,i+1,\ldots ,j-1,j\right\} \), all intermediate \({\mathbb {F}}\rightarrow {\mathbb {F}}\) maps are identities, and all other vector spaces are trivial. The importance of interval modules stems from the following result (Zomorodian and Carlsson 2005).

Theorem 2.1

For each persistence module \((V_\bullet ,f_\bullet )\) of length \(\ell +1\), there exists a finite set of non-negative integer pairs

$$\begin{aligned} {\mathbf{Bar}}(V_\bullet ,f_\bullet ) := \left\{ i_1 \le j_1, \ldots , i_k \le j_k\right\} , \end{aligned}$$

(with \([i_p,j_p] \subset [0,\ell ]\) for all \(1 \le p \le k\)), called the barcode of \((V_\bullet ,f_\bullet )\), and an integer multiplicity \(d_{i_pj_p} > 0\) so that \((V_\bullet ,f_\bullet )\) is isomorphic to a direct sum of interval modules:

$$\begin{aligned} (V_\bullet ,f_\bullet ) \simeq \bigoplus _{p=1}^k \mathbf{I}[i_p,j_p]_\bullet ^{d_{i_pj_p}}. \end{aligned}$$
(2)

Here the i-th summand on the right side is to be interpreted as the \(d_{i_pj_p}\)-fold direct sum of the interval module \(\mathbf{I}[i_p,j_p]_\bullet \) with itself.

This interval decomposition theorem follows from Gabriel’s foundational result on the decomposability of quiver representations (Gabriel 1972) — since \((V_\bullet ,f_\bullet )\) is a representation of a type-\(\mathbf{A}_{\ell +1}\) quiver. Our goal here is to provide an explicit algorithm which not only furnishes such the isomorphism (2), but can also be readily implemented on a computer.

To this end, fix a persistence module \((V_\bullet ,f_\bullet )\) of length \(\ell +1\) and set \(n_i := \dim _{\mathbb {F}}V_i\) for each \(i \in \left\{ 0,\ldots ,\ell \right\} \). Without loss of generality, we may select a basis family

$$\begin{aligned} {\mathscr {B}}:= \left\{ B_i \subset V_i \mid 0 \le i \le \ell \right\} , \end{aligned}$$

where each \(B_i\) forms an ordered basis for the vector space \(V_i\). This choice amounts to fixing an isomorphism \(V_i \simeq {\mathbb {F}}^{n_i}\) for each i. Thus, every linear map \(f_i:V_{i-1} \rightarrow V_i\) can be represented (in terms of the chosen bases \(B_{i-1}\) and \(B_i\) from \({\mathscr {B}}\)) as a matrix \(A_i\) of size \(n_i \times n_{i-1}\) with entries in \({\mathbb {F}}\); consequently, \((V_\bullet ,f_\bullet )\) is isomorphic to

(3)

In light of Theorem 2.1, we are particularly interested in a special class of basis families.

Definition 2.2

An \(m \times n\) matrix A of rank r is in barcode form if there exists a strictly increasing function \(c:\left\{ 1,\ldots ,r\right\} \rightarrow \left\{ 1,\ldots ,n\right\} \) so that

$$\begin{aligned} A_{ij} = {\left\{ \begin{array}{ll} 1 &{} \text {if } j = c(i), \\ 0 &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$

Thus, a matrix is in barcode form whenever its entries lie in \(\left\{ 0,1\right\} \), with at most one non-zero term in each row and column, and the r non-zero terms appear in the first r rows and in strictly increasing column order.

A basis family \({\mathscr {B}}\) is called an barcode basis for \((V_\bullet ,f_\bullet )\) if all of the \(A_i\) are in barcode form. The natural basis arising from an interval decomposition of a persistence module is a barcode basis.

Example 2.3

Consider, for instance, the persistence module of length 4 given by the barcode containing \(0 \le 3\) along with \(0 \le 1\) and \(1 \le 3\), each with multiplicity one:

figure a

With respect to the basis family obtained by ordering these intervals from top to bottom, the matrices \(A_i\) are given by

and all three are evidently in barcode form. Conversely, one can also recover the interval decomposition immediately from these three matrices.

To put our quest for a constructive proof of Theorem 2.1 on a firm algebraic footing, let X be the set of all the possible matrix-sequences \(A_\bullet \) which can arise in (3). It is a (strict) subset of the product of matrices of the appropriate dimensions:

$$\begin{aligned} X \subset \prod _{i=1}^\ell \text {Mat}\left( n_i \times n_{i-1};{\mathbb {F}}\right) . \end{aligned}$$
(4)

Writing \(\mathrm{GL}(n;{\mathbb {F}})\) for the group of all \(n \times n\) invertible matrices over \({\mathbb {F}}\), consider the product

$$\begin{aligned} G := \prod _{i=0}^\ell \mathrm{GL}(n_i;{\mathbb {F}}), \end{aligned}$$
(5)

which acts naturally via a change-of-basis action on X: the group element \(g := (g_0,\ldots ,g_\ell )\) sends each matrix-sequence \(A_\bullet \) in X to the new sequence \((gA)_\bullet \) given by

$$\begin{aligned} (gA)_i := g_i \cdot A_i \cdot g_{i-1}^{-1} \end{aligned}$$
(6)

for each admissible index i. This is equivalent to replacing the original basis family \({\mathscr {B}}= \left\{ B_i\right\} \) with the new basis family \(g{\mathscr {B}}= \left\{ g_i B_i\right\} \). Thus, X is the free orbit of \(A_\bullet \) under this G-action. So our first task, solved in Sect. 3, translates to discovering some \(g \in G\) that transforms a given basis family \({\mathscr {B}}\) of \((V_\bullet ,f_\bullet )\) to a barcode basis.

3 Constructing a barcode basis

Throughout this section, we fix a persistence module \((V_\bullet ,f_\bullet )\) expressed as a sequence of matrices \(A_\bullet \) as in (3) with respect to an arbitrary (i.e., not necessarily barcode) basis family \({\mathscr {B}}\).

3.1 Barcode bases via elementary matrix operations

To conveniently describe relevant elements of G, we fix notation for matrices which implement certain fundamental row and column operations.

Definition 3.1

For each dimension \(n > 0\), distinct indices \(1 \le p,q \le n\), and scalar \(\lambda \in {\mathbb {F}}\), let \(e_{p,q}^n(\lambda )\) denote the elementary matrix in \(\mathrm{GL}(n;{\mathbb {F}})\) which has 1’s all along its diagonal, \(\lambda \) in the (pq)-th position, and zeros everywhere else.

Since the dimension n will be clear from context, we omit it from the superscript and simply write \(e_{p,q}(\lambda )\) to indicate the relevant elementary matrix. The following standard facts about such matrices will be freely used in the sequel —

  1. (1)

    multiplying a matrix on the left by \(e_{p,q}(\lambda )\) implements the following elementary row operation

    $$\begin{aligned} \text {Row}(p) \leftarrow \text {Row}(p) + \lambda \cdot \text {Row}(q) \end{aligned}$$

    which we denote \({{\textbf {R}}}_{p \leftarrow q}(\lambda )\); similarly,

  2. (2)

    multiplying a matrix on the right by \(e_{p,q}(\lambda )\) implements the following elementary column operation

    $$\begin{aligned} \text {Col}(q) \leftarrow \text {Col}(q) + \lambda \cdot \text {Col}(p), \end{aligned}$$

    which we denote \({{\textbf {C}}}_{q \leftarrow p}(\lambda )\); and finally,

  3. (3)

    the inverse of \(e_{p,q}(\lambda )\) is \(e_{p,q}(-\lambda )\).

Remark 3.2

Consider the element \(g = (g_0,\ldots ,g_\ell ) \in G\) for which \(g_i = e_{p,q}(\lambda )\) and all the other \(g_j\) are identity matrices. The action of this g on a given matrix sequence \(A_\bullet \) is to simultaneously perform \({{\textbf {C}}}_{p \leftarrow q}(\lambda )\) on \(A_i\) and \({{\textbf {R}}}_{q \leftarrow p}(-\lambda )\) on \(A_{i-1}\) while leaving all the other \(A_j\)’s invariant.

The following result plays an essential part in our constructive proof of Theorem 2.1. In its statement and beyond, we will use A(pq) to indicate the entry in the p-th row and q-th column of a given matrix A.

Lemma 3.3

Assume that the first \(\ell -1\) matrices \(\left\{ A_i \mid 1 \le i < \ell \right\} \) of (3) are in barcode form, and that the last matrix \(A_\ell \) has a pivot in the (rq) position, i.e., \(A_{\ell }(r,q)=1\) and all other entries in the q-th column are zero. If there is a nonzero entry \(\alpha := A_\ell (r,p)\) in the same row r but some other column \(p > q\), then there exists \(g \in G\) with \(g_{\ell }=\mathrm{Id}\) so that \((gA)_\bullet \) equals \(A_\bullet \) except \(A_\ell \) where the \(\alpha \) entry is replaced by zero.

Proof

We proceed by induction on \(\ell \), noting that the case \(\ell =1\) is immediately true since there is only one matrix in sight. Assume that the statement holds up to \(\ell -1\). The r-th row of \(A_\ell \) contains a pivot 1 in the q-th column and some \(\alpha \ne 0\) in the p-th column. To eliminate this offending \(\alpha \), we perform \({{\textbf {C}}}_{p \leftarrow q}(-\alpha )\) on \(A_\ell \) by performing the basis change \(e_{p,q}(-\alpha )\) on \(V_{\ell -1}\). Since \(A_\ell (r,q)\) is assumed to be a pivot, the only resulting difference in \(A_\ell \) is that the (rp)-th entry changes from \(\alpha \) to 0. But by Remark 3.2, we are also compelled to perform \({{\textbf {R}}}_{q \leftarrow p}(\alpha )\) on the preceding matrix \(A_{\ell -1}\). This results in a new matrix \(A'_{\ell -1}\), and there are now 2 cases to consider, of which only the second requires the inductive hypothesis:

Case 1: if the p-th row of \(A_{\ell -1}\) is identically zero, then our row operation has had no effect whatsoever; thus, \(A'_{\ell -1} = A_{\ell -1}\) is still in barcode form and we have arrived at the desired result.

Case 2: If the p-th row of \(A_{\ell -1}\) is nonzero, then since \(q<p\) and \(A_{\ell -1}\) is in barcode form, we see that the q-th row of \(A_{\ell -1}\) must also be non-zero. Then by Definition 2.2 they must have pivot ones in distinct columns, say c and d respectively, and furthermore \(c < d\). Thus, after we have performed \({{\textbf {R}}}_{q \leftarrow p}(\alpha )\) on \(A_{\ell -1}\), the resulting matrix \(A'_{\ell -1}\) has the form

By induction, there exists a \(g \in \prod _{i=0}^{\ell -1} \mathrm{GL}_{n_i}({\mathbb {F}})\) with \(g_{\ell -1}=\mathrm{Id}\) so that \(g_{i}A_{i}g^{-1}_{i-1}\) is still in barcode form for \(1 \le i \le \ell -2\), and

is again in barcode form. Furthermore, since \(g_{\ell -1}=\mathrm{Id}\), the matrix \(A_{\ell }\) is left unchanged by this change of basis. The desired basis change is \((g_0,g_1, \dots , g_{\ell -2},e_{p,q}(-\alpha ),\mathrm{Id})\). \(\square \)

Proposition 3.4

Given the sequence of matrices \(A_\bullet \) as in (6), there is a \(g \in G\) such that \((gA)_\bullet \) has all its matrices in barcode form.

Proof

When \(\ell =1\), we may diagonalise the matrix \(A_{1}\) via standard row and column operations. Proceeding by induction for \(\ell > 1\), assume the existence of some group element

$$\begin{aligned} g' = (g_0, \dots , g_{\ell -1}) \in \prod _{i=0}^{\ell -1}\mathrm{GL}_{n_{i}}({\mathbb {F}}) \end{aligned}$$

satisfying the following property: the matrices \(g_{i}A_{i}g_{i-1}^{-1}\) are in barcode form for \(1 \le i \le \ell -1\).

Consider \(g = (g',\text {Id}_{n_{\ell }})\), which evidently lies in G. Replacing \(A_\bullet \) by \((gA)_\bullet \) if necessary, we may assume that \(A_\bullet \) has its first \(\ell -1\) matrices in barcode form. Performing row operations on \(A_{\ell }\) has no impact on the previous matrices, as it corresponds to multiplying \(A_{\ell }\) on the left by some \(g_{\ell }\). Thus, we may assume without loss of generality that all previous matrices are in barcode form while \(A_\ell \) itself is in reduced row echelon form. By Lemma 3.3, there is a basis change \(g \in G\) which zeroes out each non-pivot entry whilst maintaining the barcode form of the previous matrices. Applying these basis changes gets us to the desired barcode basis. \(\square \)

Remark 3.5

If \({\mathscr {B}}\) is the basis family with respect to which \((V_\bullet , f_\bullet )\) has matrix form \(A_\bullet \), then \(g{\mathscr {B}}\) is a barcode basis where \(g \in G\) is as in Proposition 3.4. We may therefore regard it as a constructive analogue of Theorem 2.1.

3.2 Algorithms

Here we describe algorithms which implement the constructions of Lemma 3.3 and Proposition 3.4. In particular, the main algorithm CompPers described below accepts as input an initial sequence of matrices \(A_\bullet \) as in (3) and puts them in barcode form. The sub-computations which we require frequently have been isolated into concomitant subroutines, described as follows.

  1. (1)

    The first subroutine ColOp implements the inductive strategy underlying our proof of Lemma 3.3; in particular, this algorithm acts as step k of the inductive procedure described in the proof of that lemma.

  2. (2)

    The second subroutine \({\textbf {Reduce}}\) takes as input a sequence \(A_\bullet \) for which the first \(\ell -1\) matrices are in barcode form together with an invertible matrix \(g \in \prod _{i=0}^{\ell -1}\mathrm{GL}(n_{i};{\mathbb {F}})\). It then reduces the final matrix \(A_\ell \) until it is in barcode form, while maintaining the barcode form of all previous matrices and suitably updating the basis change g.

  3. (3)

    Finally, the main algorithm \({\textbf {CompPers}}(A_\bullet )\) takes as input an arbitrary sequence of matrices \(A_\bullet \) and produces as output \(g \in G\) together with \((gA)_\bullet \) in barcode form. From these matrices we can directly access all intervals in barcode of \((V_\bullet ,f_\bullet )\).

figure b
figure c
figure d

Remark 3.6

The computational complexity of CompPers(\(A_\bullet \)) can be expressed in terms of \(n=\max _{ 0 \le i \le \ell } n_{i}\) and \(\ell \). The cost of placing all the \(A_i\) in reduced row echelon form via Gaussian elimination is \(O(n^{3}\ell )\). Furthermore, performing column operations to further reduce these matrices requires at most \(O(n^{2})\) operations on each matrix. And column operations on \(A_{i}\) will, in the worst case, require down-stream column operations on \(A_{i-1} \dots A_{1}\). Thus, for column operations, we have a \(O(n^{2} \sum _{i=1}^{\ell } i)=O(n^{2}\frac{\ell ^(\ell -1)}{2})=O(n^{2}\ell ^{2})\) complexity. Combining these factors, the total complexity of the algorithm is

$$\begin{aligned} O(n^{3}\ell +n^{2}\ell ^{2}). \end{aligned}$$

At each step of the algorithm, we perform an elementary basis change on a single vector space \(V_i\), which amounts to multiplying a matrix \(g_i \in \mathrm{GL}(V_i)\) by an elementary matrix., This incurs an O(n) cost; thus, if we also wish to keep track of the basis changes, then the total complexity of CompPers becomes

$$\begin{aligned} O(n^{4}\ell +n^{3}\ell ^{2}). \end{aligned}$$

We conclude with an illustrative example of how CompPers acts on a sequence of input matrices.

Example 3.7

Consider

$$\begin{aligned} A_\bullet = \left( \left[ \begin{matrix} 1 &{} 0 &{} 0\\ 0 &{} 1 &{} 0\\ 0 &{} 0 &{} 0 \end{matrix}\right] , \left[ \begin{matrix} 1 &{} 0 &{} 0\\ 0 &{} 1 &{} 0\\ 0 &{} 0 &{} 1 \end{matrix}\right] , \left[ \begin{matrix} 1 &{} 0 &{} 1\\ 0 &{} 1 &{} 1\\ 0 &{} 0 &{} 0 \end{matrix}\right] \right) \end{aligned}$$

To put \(A_3\) in barcode form, we must zero out the terms \(A_{3}(1,3)\) and \(A_{3}(2,3)\) using column operations. At each step, we will be performing row and column operations on matrices of \(A_\bullet \), amounting to basis changes on the vectors spaces \(V_{0}, V_{1}\) and \(V_{2}\). For conciseness sake, we will not keep track of the basis changes done along the way, and will simply be performing operations on the matrices to put them in barcode form.

We begin by zeroing out the \(A_{3}(2,3)\) term.

1: \({{\textbf {C}}}_{3 \leftarrow 2}(-1)\) on \(A_3\), inducing \({{\textbf {R}}}_{2 \leftarrow 3}(1)\) on \(A_2\), giving us matrices

2: \({{\textbf {C}}}_{3 \leftarrow 2}(-1)\) on \(A_2\), inducing \({{\textbf {R}}}_{2 \leftarrow 3}(1)\). We see here that the third row of \(A_{1}\) is zero, so we are in Case 1 of Lemma 3.3, and so we are done.

We have achieved our goal of zeroing out \(A_{3}(2,3)\) whilst keeping the previous matrices in barcode form, making no other changes to \(A_{3}\). It remains to zero out the \(A_{3}(1,3)\) term.

1: \({{\textbf {C}}}_{3 \leftarrow 1}(-1)\) on \(A_3\), inducing \({{\textbf {R}}}_{1 \leftarrow 3}(1)\) on \(A_2\) giving us matrices

2: \({{\textbf {C}}}_{3 \leftarrow 1}(-1)\) on \(A_2\), inducing \({{\textbf {R}}}_{1 \leftarrow 3}(1)\) on \(A_1\). Since the third row of \(A_{1}\) is zero, this operations has no impact on \(A_{1}\), giving us matrices

and so we are done.

4 The space of barcode bases

Let \(A_\bullet \in X\) be a sequence of matrices as in (3) arising from an arbitrary choice of basis for some persistence module \((V_\bullet ,f_\bullet )\). Consider the group G from (5), recalling that G acts on X via change of basis. Our quest to describe all possible barcode bases for \((V_\bullet ,f_\bullet )\) begins with a formula for the stabiliser of the chosen matrices \(A_\bullet \) under this G-action. Namely, we seek the subgroup of G given by

$$\begin{aligned} \mathrm{Stab}(A_\bullet ) := \left\{ g \in G \mid g_i\cdot A_i \cdot g_{i-1}^{-1} = A_i \text { for all } 1 \le i \le \ell \right\} . \end{aligned}$$
(7)

To describe \(\mathrm{Stab}(A_\bullet )\), we employ two binary relations on the set of all intervals which might possibly arise in the barcode decomposition of \((V_\bullet ,f_\bullet )\) à la Theorem 2.1.

Definition 4.1

Let \(\preceq \) be the binary relation on \(\left\{ [i,j] \in {\mathbb {Z}}^2 \mid 0 \le i \le j \le \ell \right\} \) given by

$$\begin{aligned}{}[a,b] \preceq [c,d] \text { whenever } a \le c \le b \le d. \end{aligned}$$

(Although this relation \(\preceq \) is reflexive and anti-symmetric on its domain, it is not transitive and hence does not form a partial order.)

The second binary relation is the standard lexicographic order.

Definition 4.2

Let \(\trianglelefteq \) be the lexicographic ordering on \(\left\{ [i,j] \in {\mathbb {Z}}^2 \mid 0 \le i \le j \le \ell \right\} \), given by

$$\begin{aligned}{}[a,b] \trianglelefteq [c,d] \quad \Longleftrightarrow \quad a < c \hbox { or }a=c\hbox { and }b \le d. \end{aligned}$$

This yields a total order on the set of all possible bars in the interval decomposition of our persistence module \((V_\bullet , f_\bullet )\).

Remark 4.3

The binary relation \(\preceq \) is compatible with the lexicographical order \(\trianglelefteq \) in the sense that \([a,b] \preceq [c,d]\) implies \([a,b] \trianglelefteq [c,d]\).

Given a barcode basis \({\mathscr {B}}\), we may totally order its bars using the lexicographic order, arbitrarily ordering bars with the same start and end point. This in turn yields a natural ordering of the bases \(B_i\). The matrix representation of such bases is unique. Indeed, the first \(d_{0i}\) basis vectors of \(B_i\) are part of [0, i] bars, then the next \(d_{0,i+1}\) basis vectors are those part an \([0,i+1]\) bar, and so on following the lexicographic ordering until finally the \(d_{i,\ell }\) basis vectors part of an \([i,\ell ]\) bar. This yields a matrix representation for which \(A_i\) is of the form

(8)

where

is a matrix of dimension \((\sum _{k=i}^{\ell }d_{jk}) \times (\sum _{k=i-1}^{\ell } d_{jk})\). As such, bases that have been ordered in the above way are barcode bases in the usual sense; we call these ordered barcode bases of \((V_\bullet ,f_\bullet )\) and devote the remainder of this section to completely characterising them.

Theorem 4.4

For each pair [ij] in \(\left\{ 0,1,\ldots ,\ell \right\} \) with \(i \le j\), let \(d_{ij}\) equal the multiplicity of \(i \le j\) in the barcode of \((V_\bullet ,f_\bullet )\), with the understanding that \(d_{ij} = 0\) whenever [ij] is not in \({\mathbf{Bar}}(V_\bullet ,f_\bullet )\). Then there is a bijection of sets:

(The induced group structure on the right side is given in Corollary 4.5 below)

Proof

Elements in the same orbit have isomorphic stabilisers, so without loss of generality we may assume \(A_\bullet \) is given by the matrix representation of the linear maps in a ordered barcode basis. An element \(g = (g_0,\ldots ,g_\ell )\) of G lies in \(\mathrm{Stab}(A_\bullet )\) if and only if we have an equality of matrix products

$$\begin{aligned} g_i\cdot A_i = A_i \cdot g_{i-1} \end{aligned}$$

for each \(i \in \left\{ 1,\ldots ,\ell \right\} \). Set \(k_i := \text {rank }A_i\) and note that since \(A_i\) is in barcode form, there is a strictly increasing function \(c_i:\left\{ 1,\ldots ,k_i\right\} \rightarrow \left\{ 1,\ldots ,n_{i-1}\right\} \) so that the unique nonzero entry in the p-th row of \(A_i\) lies in column \(c_i(p)\). The product \(g_i\cdot A_i\) on the left side of our equality has as its q-th column either the \(c_i^{-1}(q)\)-th column of \(g_i\) (if q lies in the image of \(c_i\)), or is identically zero otherwise. Conversely, for \(p \le k_i\) the matrix \(A_i \cdot g_{i-1}\) on the right side has as its p-th row the c(p)-th row of \(g_{i-1}\), and its rows corresponding to \(p > k_i\) are identically zero.

Therefore, requiring these two products to be equal amounts to imposing three types of constraints on the entries of \(g_{i-1}\) and \(g_i\):

  1. (1)

    \(g_{i}(p,q) = 0\) whenever \(p > k_i \ge q\).

  2. (2)

    \(g_{i-1}(p,q) = 0\) whenever \(p \in \text {Img}(c_i)\) and \(q \notin \text {Img}(c_i)\).

  3. (3)

    \(g_{i-1}(c_i(p),c_i(q)) = g_i(p,q)\) whenever both p and q are \(\le k_i\).

Recalling that \((V_\bullet ,f_\bullet )\) is the persistence module represented by \(A_\bullet \), we have a bijection

Let \([i_1,j_1]\) and \([i_2,j_2]\) be two intervals in the barcode decomposition of \((V_\bullet ,f_\bullet )\), and denote their corresponding sequences by \(\left\{ p_\bullet \right\} \) and \(\left\{ q_\bullet \right\} \). It follows from constraint (3) above that \(g_k(p_k,q_k)\) remains constant whenever k ranges over the indices in \([i,j] := [i_1,j_1] \cap [i_2,j_2]\). In other words, we have

$$\begin{aligned} g_k(p_k,q_k) = g_{k'}(p_{k'},q_{k'}) \text { for all } k,k' \in [i,j]. \end{aligned}$$
(9)

The following observation is crucial.

Claim: The entry \(g_k(p_k,q_k)\) is zero for all \(k \in [i,j]\) whenever \([i_1,j_1] \not \preceq [i_2,j_2]\).

To prove this claim, note that if \(i_2 < i_1\) holds then \(p_{i_1} > k_{i_1} \ge q_{i_1}\), so \(g_{i_1}(p_{i_1},q_{i_1}) = 0\) by constraint (1) above. Thus the claim extends to all k in [ij] by (9). Similarly, if \(j_2 < j_1\) then \(p_{j_2} \in \mathrm{Img}(c_{j_2})\) but \(q_{j_2} \not \in \mathrm{Img}(c_{j_2})\), whence \(g_{j_2}(p_{j_2},q_{j_2}) = 0\) by constraint (2). Once again, this extends to all \(k \in [i,j]\) by (9), and so the claim is proved.

Returning to the main argument, for each pair \([i_1,j_1] \preceq [i_2,j_2]\) of intervals in the barcode of \((V_\bullet ,f_\bullet )\), we may select some \(k \in [i_1,j_1] \cap [i_2,j_2]\). We denote by \(g_{[i_1,j_1]}^{[i_2,j_2]}\) the submatrix of \(g_k\) spanned by all entries \(g_k(p_k,q_k)\) for which \(\left\{ p_\bullet \right\} \) and \(\left\{ q_\bullet \right\} \) are sequences corresponding to intervals of type \([i_1,j_1]\) and \([i_2,j_2]\) respectively. Thus, \(g_{[i_1,j_1]}^{[i_2,j_2]}\) has exactly \(d_{i_1j_1}\) rows and \(d_{i_2j_2}\) columns; and from (9) we know that it forms a submatrix of \(g_k\) for all k in \([i_1,j_1] \cap [i_2,j_2]\). It follows from our claim that each \(g_k\) is block upper-triangular:

$$\begin{aligned} g_{k}= \left[ \begin{array}{cccccccccc} g_{[0,k]}^{[0,k]} &{} g_{[0,k]}^{[0,k+1]} &{} \cdots &{} \cdots &{} g_{[0,k]}^{[0,\ell ]} &{} 0 &{} \cdots &{} \cdots &{} \cdots &{} 0\\ 0 &{} g_{[0,k+1]}^{[0,k+1]} &{} \cdots &{} \cdots &{} g_{[0,k+1]}^{[0,\ell ]} &{} 0&{} \cdots &{} \cdots &{} \cdots &{} 0\\ 0 &{} 0&{} \ddots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ \vdots &{} \vdots &{} 0&{} \cdots &{} \cdots &{} \cdots &{} \cdots &{} 0 &{}g_{[k,\ell -1]}^{ [k,\ell -1]} &{} g_{[k,\ell -1]}^{[k,\ell ]}\\ 0 &{} 0&{} \cdots &{} \cdots &{} \cdots &{} \cdots &{} \cdots &{} 0&{} 0 &{} g_{[k,\ell ]}^{[k,\ell ]} \\ \end{array} \right] \end{aligned}$$
(10)

The fact that \(g_k\) must be invertible forces the diagonal blocks to be invertible, while the off-diagonal blocks remain entirely unconstrained. The map

which sends each g to this distinguished collection of invertible \(g_{[i,j]}^{[i,j]}\) and arbitrary \(g_{[i_1,j_1]}^{[i_2,j_2]}\) furnishes the desired bijection. \(\square \)

Using the block upper triangular form of the matrices \(g_k\) described in the argument above, we may immediately obtain the group structure of \(\mathrm{Stab}(A_\bullet )\).

Corollary 4.5

For \(g,h \in \mathrm{Stab}(A_\bullet )\), we have

$$\begin{aligned} (gh)_{[i_1,j_1]}^{[i_2,j_2]}= \sum _{[a,b]} g_{[i_1,j_1]}^{[a,b]} h_{[a,b]}^{[i_2,j_2]}, \end{aligned}$$

with the sum being indexed over intervals that satisfy \([i_1,j_1] \preceq [a,b] \preceq [i_2,j_2]\).

If \({\mathbb {F}}\) is the field of real or complex numbers, as a subgroup of \(\prod _{i=0}^{\ell }\mathrm{GL}_{n_{i}}({\mathbb {F}})\), the group \(\mathrm{Stab}(A_\bullet )\) is a Lie group. Theorem 4.4 immediately allows us to obtain its dimension.

Corollary 4.6

If \({\mathbb {F}}\) is the field of real or complex numbers, \(\mathrm{Stab}(A_\bullet )\) is a Lie group of dimension

$$\begin{aligned} \sum _{[i_1,j_1] \preceq [i_2,j_2] }d_{i_{1}j_{1}}d_{i_{2}j_{2}} \end{aligned}$$

As stated at the start of this section, our task here is to determine the space of all possible ordered barcode bases for a given persistence module \((V_\bullet , f_\bullet )\).

We denote by \({\mathbb {B}}=\{ {\mathscr {B}}=(B_i)_{0 \le i \le \ell } \; | \; B_i \subset V_i \; \text {is an ordered basis}\}\) the set of all possible ordered bases of \((V_\bullet , f_\bullet )\). Having fixed an initial basis \({\mathscr {B}}\in {\mathbb {B}}\), we know the group G from (5) acts freely and transitively on the set \({\mathbb {B}}\), so that any element of \({\mathbb {B}}\) may be expressed as \(g {\mathscr {B}}\) for some unique \(g \in G\). Thus, once we have fixed an initial basis \({\mathscr {B}}\), the set \({\mathbb {B}}\) may be identified with G. Then as subset of \({\mathbb {B}}\), the set of all possible ordered barcode bases of \((V_\bullet , f_\bullet )\) can be identified as a subset of the group G.

Recall, X is the set of all possible matrix-sequences as defined in (4). For each possible basis \({\mathscr {B}}\in {\mathbb {B}}\), we define \(A({\mathscr {B}})_\bullet \in X\) to be the matrix representation of the linear maps \(f_\bullet \) in the chosen basis \({\mathscr {B}}\). This assignment prescribes the matrix representation map

$$\begin{aligned} A()_\bullet : {\mathbb {B}} \mapsto X, \end{aligned}$$

and finding all possible ordered barcode bases for \((V_\bullet , f_\bullet )\) amounts to determining all bases \({\mathscr {B}}\in {\mathbb {B}}\) for which \(A({\mathscr {B}})_\bullet \) is as in (8). Furthermore, this map is equivariant in the sense that \(A(g{\mathscr {B}})_\bullet =(gA({\mathscr {B}}))_\bullet \) for each \(g \in G\), where g acts via the basis action defined in (6).

The following result makes the link between the stabiliser of \(A_\bullet \) and the set of ordered barcode bases of a persistence module \((V_\bullet , f_\bullet )\).

Proposition 4.7

Given a persistence module \((V_\bullet , f_\bullet )\) together with an ordered barcode basis \({\mathscr {B}}\) with matrix representation \(A_\bullet \), the set of all ordered barcode bases is given by the orbit \(\mathrm{Stab}(A_\bullet ) {\mathscr {B}}\).

Proof

Let \({\mathscr {B}}'\) be another ordered barcode basis. As seen above, two ordered barcode bases have the same matrix representations (8), so that \(A({\mathscr {B}}')_\bullet =A_\bullet \). As previously stated, G acts freely and transitively on \({\mathbb {B}}\) so that there exists a unique \(g \in G\) for which \({\mathscr {B}}'=g{\mathscr {B}}\). We then have \(A_\bullet =A({\mathscr {B}})_\bullet =A( g {\mathscr {B}}')_\bullet =gA({\mathscr {B}}')_\bullet =gA_\bullet \), so that \(g \in \mathrm{Stab}(A_\bullet )\) which implies \({\mathscr {B}}' \in \mathrm{Stab}(A_\bullet ) {\mathscr {B}}\). \(\square \)

As such, we may identify the set of all ordered barcode bases of a persistence module \((V_\bullet , f_\bullet )\) with \(\mathrm{Stab}(A_\bullet )\), which was fully characterised in Theorem 4.4.

Remark 4.8

The automorphism group \(\text {Aut}_Q(M)\) of a representation M of a general quiver Q has been described, for instance in (Brion 2012, Section 2.2). It is known that \(\text {Aut}_Q(M)\) is a semi-direct product of the form

$$\begin{aligned} U \rtimes \prod _{i=1}^{r} \mathrm{GL}(m_i,{\mathbb {F}}). \end{aligned}$$

Here \(M=\bigoplus _{i=1}^{r}M_i^{m_i}\) is a decomposition of M into indecomposable summands \(M_i\), while U is unipotent normal subgroup of \(\text {Aut}_Q(M)\) (see (Brion 2012, Prop 2.2.1)). Viewed from this context, the main content of Theorem 4.4 is an explicit description of U in the special case where Q is a type-A quiver. In particular, U is generated by matrices which have the form (10), but with identity blocks along the diagonal. This explicit description of U in the type-A case plays a crucial role in subsequent results which appear in this paper.

5 Simplifying maps of persistence modules

We now shift our interest to maps of persistence modules \(\phi _\bullet : (V_\bullet , f_\bullet ) \mapsto (W_\bullet ,h_\bullet )\), where \(V_\bullet \) and \(W_\bullet \) are persistence modules of length \(\ell +1\). We recall that each such \(\phi _\bullet \) is a collection of linear maps \(\phi _i : V_{i} \mapsto W_{i}\) satisfying \(\phi _i \circ f_i=h_i \circ \phi _{i-1}\). In other words, the following diagram commutes:

Our objective here is to show that if neither \(V_\bullet \) nor \(W_\bullet \) admits a pair of strictly nested bars in its barcode, then there exist barcode bases of \(V_\bullet \) and \(W_\bullet \) in which \(\phi \) induces a partial matching of the bars. To make this precise, we first describe the nestedness condition.

Definition 5.1

A bar \([i_2,j_2]\) is strictly nested in a bar \([i_1,j_1] \), denoted \([i_2,j_2] \subset [i_1,j_1]\) if \(i_1< i_2 \le j_2 < j_1\). This is best represented as

figure e

Note that two intersecting bars are strictly nested if and only if they are not related by \(\preceq \).

Before stating the main result, we remark that the data of our map \(\phi _\bullet \) can be interpreted as a representation of the rectangle quiver of length \(\ell +1\):

Such representations have been called ladder persistence modules in the literature (Escolar and Hiraoka 2016). When treating \(\phi \) as a ladder persistence module, we will denote it \((V_\bullet , W_\bullet , \phi _\bullet )\). We may therefore seek to decompose \(\phi _\bullet \) into a direct sum of indecomposable ladder persistence modules.

Definition 5.2

Three families of ladder persistence modules are defined below:

  1. (1)

    Given intervals \([i_1,j_1] \preceq [i_2,j_2]\), denote by \({{\textbf {R}}}_{[i_1,j_1]_\bullet }^{[i_2,j_2]}\) the ladder persistence module where \(V_\bullet \) is the interval module \(\mathbf{I}[i_2,j_2]_\bullet \) while \(W_\bullet \) is the interval module \(\mathbf{I}[i_1,j_1]_\bullet \); all vertical maps are \(1'\)s whenever possible and 0 otherwise:

  2. (2)

    Given an interval [ij], let \(\mathbf{I}^+[i,j]_\bullet \) denote the ladder persistence module for which \(V_\bullet \) is \(\mathbf{I}[i,j]_\bullet \) and \(W_\bullet \) is 0, with all vertical maps necessarily being 0:

  3. (3)

    And finally, given an interval [ij], let \(\mathbf{I}^-[i,j]_\bullet \) be the ladder persistence module for which \(V_\bullet \) is trivial while \(W_\bullet \) is \(\mathbf{I}[i,j]_\bullet \), so once again all vertical maps are 0:

It is readily seen that these three families of ladder persistence modules are mutually non-isomorphic and indecomposable. Therefore, by the Krull-Schmidt theorem, if \(\phi _\bullet \) were to decompose as a direct sum of modules sourced from these three families, then such a decomposition would be unique. From such a decomposition, we can obtain the desired partial matching of the source and target bars: the presence of each \({{\textbf {R}}}_{[i_1,j_1]_\bullet }^{[i_2,j_2]}\) summand matches a bar \([i_2,j_2]\) of \(V_\bullet \) to a bar \([i_1,j_1]\) of \(W_\bullet \), whilst the existence of \(\mathbf{I}^+[i,j]_\bullet \) (or \(\mathbf{I}^-[i,j]_\bullet \)) summands reveals bars [ij] in \(V_\bullet \) (or \(W_\bullet )\) that are matched to 0. With this in mind, here is the main result of this section.

Theorem 5.3

Let \((V_\bullet , W_\bullet , \phi _\bullet )\) be a ladder persistence module of length \(\ell +1\) where neither \(V_\bullet \) nor \(W_\bullet \) admit a pair of strictly nested bars. Then there are integers \(r_{[i_1,j_1]} ^{[i_2,j_2]}\) and \(d_{ij}^{\pm } \in {\mathbb {N}}\) for which:

$$\begin{aligned} (V_\bullet , W_\bullet , \phi _\bullet ) \simeq \bigoplus _{[i_1,j_1] \preceq [i_2,j_2]} \left( {{\textbf {R}}}_{[i_1,j_1]_\bullet }^{[i_2,j_2]}\right) ^{r_{[i_1,j_1]}^{[i_2,j_2]}} \oplus \bigoplus _{i \le j} \left( \mathbf{I}^{+}[i,j]_\bullet \right) ^{d_{ij}^{+}} \oplus \bigoplus _{i \le j} \left( \mathbf{I}^{-}[i,j]_\bullet \right) ^{d_{ij}^{-}} \end{aligned}$$

(In Example 5.4 below we show that the assumption precluding nested bars is necessary.)

Proof

The argument proceeds along three basic steps.

Step 1: Representing \(\phi \). Consider ordered barcode bases

$$\begin{aligned} {\mathscr {B}}_{V} := \left\{ B_{V,i} \subset V_i \mid 0 \le i \le \ell \right\} \text { and } {\mathscr {B}}_{W} := \left\{ B_{W,i} \subset W_i \mid 0 \le i \le \ell \right\} \end{aligned}$$

of \(V_\bullet \) and \(W_\bullet \). Let \(d_{i,j}^{V}\) and \(d_{i,j}^{W}\) be the multiplicity of [ij] bars in the barcodes of \(V_\bullet \) and \(W_\bullet \). We denote by \(b_\bullet \) the matrix representations of the maps \(\phi _\bullet \) in these chosen bases. As in the proof Theorem 4.4, let \([i_1,j_1]\) and \([i_2,j_2]\) be two intervals in the barcode decomposition of \((V_\bullet ,f_\bullet )\), and denote their corresponding sequences by \(\left\{ p_\bullet \right\} \) and \(\left\{ q_\bullet \right\} \). Using the commuting relations \(\phi _k \circ f_k=h_k \circ \phi _{k-1}\), we have \(\phi _k(p_k,q_k)=\phi _{k'}(p_{k'},q_{k'}) \), for all \(k, k' \in [i,j]=[i_1,j_1] \cap [i_2,j_2]\), with this coefficient being zero unless \([i_1,j_1] \preceq [i_2,j_2]\). Assuming this order relation holds, define \(X_{[i_1,j_1]}^{[i_2,j_2]}\), to be the submatrix of \(b_{i}\) obtained by taking the \(d_{i_2,j_2}^{V}\) columns corresponding to basis vectors part of an \([i_1,j_1]\) bar of V, and the \(d_{i_1,j_1}^{W}\) rows corresponding to basis to basis vectors part of an \([i_2,j_2]\) bar of W. From the above observation, \(X_{[i_1,j_1]}^{[i_2,j_2]}\) is a submatrix of \(b_{i}, b_{i+1}, \dots b_{j}\), and is of dimension \(d_{i_1,j_1}^{W} \times d_{i_2,j_2}^{V}\). Thus, the matrices \(b_\bullet \) are completely determined by the matrices \(X_{[i_1,j_1]}^{[i_2,j_2]}\) and may therefore be represented as a single block matrix

$$\begin{aligned} \left[ \begin{array}{ccccccc} X_{[0,0]}^{ [0,0]} &{} X_{[0,0]}^{ [0,1]} &{} \dots &{} X_{[0,0]}^{[0, \ell ]} &{}0 &{} \dots &{}0\\ 0 &{} X_{[0,1]}^{[0,1]} &{} \dots &{} \dots &{} X_{[0,1]}^{[1,\ell ]} &{} \dots &{} 0 \\ \vdots &{} \vdots &{} \ddots &{} &{} &{} &{} \\ &{} &{} &{} \ddots \\ &{} &{} &{} &{} \ddots \\ &{} &{} &{} &{} &{} X_{[\ell , \ell -1]}^{ [\ell , \ell -1]} &{} X_{[\ell , \ell -1]}^{ [\ell , \ell ]}\\ 0&{} 0 &{} &{} &{} &{} 0 &{} X_{[\ell , \ell ]}^{ [\ell , \ell ]} \\ \end{array} \right] \end{aligned}$$

This is a matrix of size \((\sum d_{i,j}^{W}) \times (\sum d_{i,j}^{V})\).

Step 2: Admissible Operations. Given two ordered barcode bases \({\mathscr {B}}_{V}\) and \({\mathscr {B}}_{w}\) we may define a block matrix as above, which we denote \(b({\mathscr {B}}_V,{\mathscr {B}}_W)\). By Proposition 4.7, the set of ordered all barcode bases of \((V_\bullet , f_\bullet )\) coincides precisely with the orbit \(\mathrm{Stab}(A({\mathscr {B}}_1)_\bullet ) {\mathscr {B}}_1\), where \({\mathscr {B}}_1\) is an ordered barcode basis. Then given \((h,k) \in \mathrm{Stab}(A({\mathscr {B}}_V)_\bullet ) \times \mathrm{Stab}(A({\mathscr {B}}_W)_\bullet )\), we may consider \(b(h{\mathscr {B}}_V,k {\mathscr {B}}_W)\). As seen in the proof of Theorem 4.4, we are able to completely characterise an element \(h \in \mathrm{Stab}(A({\mathscr {B}}_V)_\bullet )\) in terms of the submatrices \(h_{[i_1,j_1]}^{ [i_2,j_2]}\), so that h may be represented as a single block matrix

$$\begin{aligned} \left[ \begin{array}{ccccccc} h_{[0,0]}^{ [0,0]} &{} h_{[0,0]}^{ [0,1]} &{} \dots &{} h_{[0,0]}^{[0, \ell ]} &{}0 &{} \dots &{}0\\ 0 &{} h_{[0,1]}^{[0,1]} &{} \dots &{} \dots &{} h_{[0,1]}^{[1,\ell ]} &{} \dots &{} 0 \\ \vdots &{} \vdots &{} \ddots &{} &{} &{} &{} \\ &{} &{} &{} \ddots \\ &{} &{} &{} &{} &{} h_{[\ell , \ell -1]}^{ [\ell , \ell -1]} &{} h_{[\ell , \ell -1]}^{ [\ell , \ell ]}\\ 0&{} 0 &{} &{} &{} &{} 0 &{} h_{[\ell , \ell ]}^{ [\ell , \ell ]} \\ \end{array} \right] \end{aligned}$$

of size \((\sum d_{i,j}^{V}) \times (\sum d_{i,j}^{V})\). The same is true for \(k \in \mathrm{Stab}(A({\mathscr {B}}_W)_\bullet )\), whence \(b(h {\mathscr {B}}_V,k {\mathscr {B}}_W)\) equals the (matrix) product \(k \cdot b({\mathscr {B}}_V,{\mathscr {B}}_W) \cdot h^{-1}\). Thus, we are only allowed to perform the following legal operations on \(b({\mathscr {B}}_V,{\mathscr {B}}_W)\):

  1. (1)

    Using invertible block diagonal elements \(h_{[i_1,j_1]}^{[i_1,j_1]}\) and \(k_{[i_1,j_1]}^{[i_1,j_1]}\), we may perform any operations between column and rows corresponding to \([i_1,j_1]\) bars in our block matrix.

  2. (2)

    Using the block matrices \(h_{[i_1,j_1]}^{ [i_2,j_2]}\), we see we may modify columns corresponding to \([i_2,j_2]\) bars using columns corresponding to \([i_1,j_1]\) in our block matrix, whenever \([i_1,j_1] \preceq [i_2,j_2]\).

  3. (3)

    Using the block matrices \(k_{[i_1,j_1]}^{ [i_2,j_2]}\), we see we may modify rows corresponding to \([i_1,j_1]\) bars using columns corresponding to \([i_2,j_2]\) in our block matrix, whenever \([i_1,j_1] \preceq [i_2,j_2]\).

Step 3: Matrix Reduction. We wish to find ordered barcode bases for which the corresponding matrix \(b({\mathscr {B}}_V,{\mathscr {B}}_W)\) admits at most one non-zero term 1 in each row and column. From this form, the desired decomposition can be easily extracted: every 1 in a row corresponding to an \([i_1,j_1]\) bar and column corresponding to an \([i_2,j_2]\) bar (with \([i_1,j_1] \preceq [i_2,j_2]\)) corresponds to an \({{\textbf {R}}}_{[i_1,j_1]_\bullet }^{[i_2,j_2]}\) summand. Similarly, zero rows and columns then yield \(\mathbf{I}^{-}[i,j]_\bullet \) and \(\mathbf{I}^{+}[i,j]_\bullet \) summands respectively.

Let \({\mathscr {B}}_V\), \({\mathscr {B}}_W\) be ordered barcode bases of \(V_\bullet \), \(W_\bullet \) so that

$$\begin{aligned} b({\mathscr {B}}_V,{\mathscr {B}}_W)= \left[ \begin{array}{ccccccc} X_{[0,0]}^{ [0,0]} &{} X_{[0,0]}^{ [0,1]} &{} \dots &{} X_{[0,0]}^{[0, \ell ]} &{}0 &{} \dots &{}0\\ 0 &{} X_{[0,1]}^{[0,1]} &{} \dots &{} \dots &{} X_{[0,1]}^{[1,\ell ]} &{} \dots &{} 0 \\ \vdots &{} \vdots &{} \ddots &{} &{} &{} &{} \\ &{} &{} &{} \ddots \\ &{} &{} &{} &{} \ddots \\ &{} &{} &{} &{} &{} X_{[\ell , \ell -1]}^{ [\ell , \ell -1]} &{} X_{[\ell , \ell -1]}^{ [\ell , \ell ]}\\ 0&{} 0 &{} &{} &{} &{} 0 &{} X_{[\ell , \ell ]}^{ [\ell , \ell ]} \\ \end{array} \right] \end{aligned}$$

We seek stabiliser elements (hk) so that \(B(h{\mathscr {B}}_V,k{\mathscr {B}}_W)=kB({\mathscr {B}}_V,{\mathscr {B}}_W)h^{-1}\) is in barcode form. To this end, we perform basis changes using legal operations of type (1), (2) and (3). We process the column-blocks of this matrix from left to right, in each case starting from the diagonal block and working our way upwards. We will denote each treated matrix that has been put in adequate form by \(P_{[i_1,j_1]}^{[i_2,j_2]}\).

That is, we start with \(X_{[0,0]}^{[0,0]}\), putting it in Smith normal form using basis changes \(h_{[0,0]}^{[0,0]}\) and \(k_{[0,0]}^{ [0,0]}\). Now assume we wish to treat \(X_{[i_1,j_1]}^{[i_2,j_2]}\), where all matrices below it and to its left have been treated. That is, we have

Given non-intersecting bars \([a,b] \trianglelefteq [c,d]\), we have either \([a,b] \preceq [c,d]\) or \([a,b] \subset [c,d]\). Then by hypothesis, given \(P_{[i_1,j_1]}^{[a,b]}\) to the left of \(X_{[i_1,j_1]}^{[i_2,j_2]}\), we have \([a,b] \preceq [i_2,j_2]\). So we may zero out rows of \(X_{[i_1,j_1]}^{[i_2,j_2]}\) in which \(P_{[i_1,j_1]}^{[a,b]}\) has 1’s using operations of type (2). Similarly, given \(P_{[a,b]}^{[i_2,j_2]}\) below \(X_{[i_1,j_1]}^{[i_2,j_2]}\), we may zero out corresponding columns using operations of type (3). The non-zero columns of the resulting matrix \({\tilde{X}}_{[i_1,j_1]}^{ [i_2,j_2]}\) have 0’s below them, and non-zero rows have 0’s to their left.

Then using basis changes \(h_{[i_2,j_2]}^{[i_2,j_2]}\) and \(k_{[i_1,j_1]}^{[i_1,j_1]}\), we may put A in Smith normal form, without adding non-zero terms in any rows below and column to its left, preserving the desired structure. \(\square \)

Example 5.4

We illustrate the difficulties imposed by strictly nested bars in the context of Theorem 5.3. Consider the map \(\phi _\bullet : V_\bullet \mapsto W_\bullet \) where \(V_\bullet \) has barcode

figure f

and \(W_\bullet \) has barcode

figure g

with associated ordered barcode bases \({\mathscr {B}}_V\), \({\mathscr {B}}_W\), and \(\phi _\bullet \) is given by the block matrix representation

Since \([2,3] \subset [1,4]\), stabiliser changes of basis for \({\mathscr {B}}_V\) are invertible diagonal matrices , and stabiliser changes of basis for \({\mathscr {B}}_W\) are invertible matrices \(\left[ {\begin{matrix} c \end{matrix}} \right] \). As such, \((V_\bullet , W_\bullet , \phi _\bullet )\) which will never be expressible as a direct sum of modules as in Theorem 5.3, since there is no change of basis which will allow us to transform this matrix into either \(\left[ {\begin{matrix} 0&1 \end{matrix}} \right] \) or \(\left[ {\begin{matrix} 1&0 \end{matrix}} \right] \). The same is true if \(V_\bullet \) has barcode

figure h

and \(W_\bullet \) has barcode

figure i

with associated ordered barcode bases \({\mathscr {B}}_V\), \({\mathscr {B}}_W\), and \(\phi _\bullet \) is given by the block matrix representation

Thus, if the nested condition is violated on either \(V_\bullet \) or \(W_\bullet \), a decomposition as in Theorem 5.3 is not always possible.

Remark 5.5

The non-nestedness hypothesis on the bars of \(V_\bullet \) and \(W_\bullet \) from Theorem 5.3 is quite restrictive. There are, however, several scenarios of interest where it is satisfied:

  1. (1)

    The 0-th persistent homology of a point cloud satisfies the hypothesis because all bars have left endpoint 0.

  2. (2)

    Similarly, the 1st persistent homology of a filtered graph admits no strictly nested bars because all bars have right endpoint \(\infty \).

  3. (3)

    More generally, the n-th persistent homology of an n-dimensional filtered complex satisfies the non-nestedness criterion. One may consider, for instance, the Linial-Meshulam model of random simplicial complexes (Linial and Meshulam 2006). A random simplicial complex chosen from this model on a given vertex set consists of every possible simplex of dimension \(< n\), with candidate n-simplices being included independently with uniform probability \(p \in [0,1]\). The n-th persistent homology of any filtration of such a random complex satisfies the hypothesis.

Theorem 5.3 applies in all such cases.

6 Zizag modules

In this section, we wish to generalise the previous work to representations of any type A quiver, in other words zizag persistence modules. The nomenclature we adpot here is extracted from (Carlsson and de Silva 2010). A zizag module is given by a sequence

where each is either a forward map or a backwards map . The direction of the arrows define the type \(\tau \) of the zizag module, which is the direction of the arrows of the underlying type A quiver. For example,

has type \(\tau =fq\). We denote zizag modules as \((V_\bullet , p_\bullet , \tau )\).

The interval module of type \(\tau \) corresponding to a pair of non-negative integers \(i \le j\) is the zizag module \(\mathbf{I}_\tau [i,j]_\bullet \) given by

where the contiguous string of \({\mathbb {F}}\)’s spans \(\left\{ i,i+1,\ldots ,j-1,j\right\} \), all intermediate \({\mathbb {F}}\longleftrightarrow {\mathbb {F}}\) maps are identities in the direction depending on \(\tau \), and all other vector spaces are trivial. Zizag modules also decompose into interval modules: this follows from the main result of Gabriel (1972), and is established more directly in Carlsson and de Silva (2010). In particular, every zigzag module \((V_\bullet , p_\bullet , \tau )\) is isomorphic to a direct sum

$$\begin{aligned} (V_\bullet , p_\bullet , \tau ) \cong \bigoplus _{0 \le i \le j \le \ell } ( \mathbf{I}_\tau [i,j])^{d_{ij}}, \end{aligned}$$

for some uniquely determined \(d_{ij} \in {\mathbb {N}}\).

Definition 6.1

An \(m \times n\) matrix A of rank r is in reversed barcode form if there exists a strictly increasing function \(c : \left\{ m-r+1, \ldots , m\right\} \rightarrow \left\{ 1, \ldots n\right\} \) so that

$$\begin{aligned} A_{ij} = {\left\{ \begin{array}{ll} 1 &{} \text {if } j = c(i), \\ 0 &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$

Thus, a matrix is in reversed barcode form whenever its entries lie in \(\left\{ 0,1\right\} \), with at most one non-zero term in each row and column, and satisfies the following additional requirement: the r non-zero terms appear in the last r columns, with increasing row order. (We warn the reader that if a matrix A is in barcode form, then its transpose will not in general be in reversed barcode form; however, the off-diagonal transpose of A will be in reversed barcode form).

Definition 6.2

A basis family \({\mathscr {B}}\) for a zizag module is called an barcode basis for \((V_\bullet ,p_\bullet , \tau )\) if all of the \(A_i\) for which are in barcode form, and all the \(A_i\) for which are in reversed barcode form. The corresponding matrices \(A_\bullet \) are then said to be in zizag barcode form.

We note that this notion coincides with Definition 2.2 whenever all maps in sight are forward. Barcode bases for zizag modules are the natural bases arising from their decomposition into interval modules.

6.1 Algorithm for zizag modules

We wish to generalise our algorithm from Sect. 3 to treat the case of zizag modules. Instead of presenting concrete algorithms, we will adapt our proof of Proposition 3.4 in Sect. 3 to the more general setting. Implementing the algorithm is then achieved in similar fashion to what was done in Sect. 3 for classical persistence modules. To this end, we fix a zizag module \((V_\bullet ,p_\bullet , \tau )\) expressed as a sequence of matrices \(A_\bullet \) with respect to an arbitrary (i.e., not necessarily barcode) basis family \({\mathscr {B}}\):

(11)

The matrices \(A_{i}\) are of dimension either \(n_{i} \times n_{i-1}\) or \(n_{i-1} \times n_{i}\), depending on the type \(\tau \) of \(V_\bullet \). Analogously to Sect. 2, we may define \(X_\tau \) to be the set of all the possible matrix-sequences \(A_\bullet \) which can arise in (11). It is a (strict) subset

$$\begin{aligned} X_\tau \subset \prod _{i=1}^{\ell }Y_i, \quad \text {where} \quad Y_i= {\left\{ \begin{array}{ll} \text {Mat}\left( n_i \times n_{i-1};{\mathbb {F}}\right) \quad \text {if} \quad i-1 \longrightarrow i \\ \text {Mat}\left( n_{i-1} \times n_i;{\mathbb {F}}\right) \quad \text {if} \quad i-1 \longleftarrow i \end{array}\right. } \end{aligned}$$

Changes of bases for zigzag modules are obtained by a new action of the group G from (5) on the set \(X_\tau \); the major difference between this action and the one treated in Sect. 3 is that the (direction of) conjugation now depends on the type \(\tau \). Explicitly, if points forward, then it gets sent to \(g_i \circ f_i \circ g_{i-1}^{-1}\) as before; and conversely, if points backwards, then it is sent to \(g_{i-1} \circ q_i \circ g_i^{-1}\). For this action, we obtain the following analogue of Lemma 3.3.

Lemma 6.3

Assume that the first \(\ell -1\) matrices of \(\left\{ A_i \mid 1 \le i < \ell \right\} \) from (11) are in zizag barcode form.

  • If \(f_\ell : V_{\ell -1} \rightarrow V_\ell \), and the last matrix \(A_\ell \) has a pivot in the (rq) positionFootnote 3, together with a nonzero entry \(\alpha := A_\ell (r,p)\) in the same row r but some other column \(p > q\), then there exists \(g \in G\) with \(g_{\ell }=\mathrm{Id}\) so that \((gA)_\bullet \) equals \(A_\bullet \) except \(A_\ell \) where the \(\alpha \) entry is replaced by zero.

  • If \(q_\ell : V_{\ell -1} \leftarrow V_\ell \), and the last matrix \(A_\ell \) has a pivot in the (rq) position, together with a nonzero entry \(\alpha := A_\ell (s,q)\) in the same column q but some other row \( s<r\), then there exists \(g \in G\) with \(g_{\ell }=\mathrm{Id}\) so that \((gA)_\bullet \) equals \(A_\bullet \) except \(A_\ell \) where the \(\alpha \) entry is replaced by zero.

Proof

The proof is done by induction, in similar fashion to that of Lemma 3.3. The case \(\ell =1\) remains trivial. To prove the induction, 4 cases should now be considered.

Case 1 :\(V_{\ell -2} \rightarrow V_{\ell -1} \rightarrow V_{\ell }\)

This case is precisely that of Lemma 3.3, and the proof remains, the same.

Case 2: \(V_{\ell -2} \leftarrow V_{\ell -1} \rightarrow V_{\ell }\)

Performing \({{\textbf {C}}}_{p \leftarrow q}(-\alpha )\) on \(A_\ell \) induces the same operation on \(A_{\ell -1}\). If the q-th column of \(A_{\ell -1}\) is identically zero, this operation leaves \(A_{\ell -1}\) unchanged. Otherwise, since \(p>q\) and \(A_{\ell -1}\) is in reversed barcode form, if the q-th column isn’t zero then the p-th column is also non-zero. Then the resulting matrix \(A_{\ell -1}'\) has the form

where we may again use induction.

Case 3: \(V_{\ell -2} \rightarrow V_{\ell -1} \leftarrow V_{\ell }\)

We must perform the row operation \({{\textbf {R}}}_{s \leftarrow r}(-\alpha )\) on \(A_\ell \), inducing the same row operation on \(A_{\ell -1}\). Again, if the r-th row of \(A_{\ell -1}\) is identically zero, we are done. Otherwise, since \(A_{\ell }\) is in barcode form and \(s<r\), if the r-th row isn’t zero then the s-th row isn’t zero, and so the resulting matrix \(A_{\ell -1}'\) has the form \(A_{\ell -1}'\) has the form

where we may again use induction.

Case 4: \(V_{\ell -2} \leftarrow V_{\ell -1} \leftarrow V_{\ell }\)

We perform the row operation \({{\textbf {R}}}_{s \leftarrow r}(-\alpha )\) on \(A_\ell \), inducing the column operation \({{\textbf {C}}}_{r \leftarrow s}(\alpha )\) on \(A_{\ell -1}\). Again, if the s-th column of \(A_{\ell -1}\) is zero, we are done. Otherwise, since \(A_{\ell -1}\) is in barcode form and \(s<r\), the r-th column is also non-zero so that the resulting matrix \(A_{\ell -1}'\) has the form

where we may again use induction. \(\square \)

The zigzag-compatible avatar of Proposition 3.4 is given as follows. As before, we regard this result as the ’matrix version’ of the decomposition theorem for zizag persistence modules.

Proposition 6.4

Given the sequence of matrices \(A_\bullet \) as in (11), there is a \(g \in G\) such that \((gA)_\bullet \) has all its matrices in zizag barcode form.

Proof

We proceed by induction. The case \(\ell =1\) is trivial. We can reduce ourselves by induction hypothesis to the case where the first \(\ell -1\) matrices are in zizag barcode form. If \( V_{\ell -1} \rightarrow V_{\ell }\) we perform row operations on \(A_{\ell }\) to put it in reduced row echelon form. Otherwise, if \(V_{\ell -1} \leftarrow V_{\ell }\), we perform column operations to put \(A_{\ell }\) in reversed reduced column echelon form. That is, we put \(A_{\ell }\) in the form

This is achieved through a slight tweak to the standard Gaussian algorithm for placing matrices in column echelon form, where one starts with the last row and works upwards. Finally, we may apply Lemma 6.3 to the non-zero \(\star \) term of \(A_{\ell }\) obtain the desired result.

\(\square \)

6.2 Barcode bases of zizag modules

In order to characterise the set of barcode bases of a zizag module, we must again attempt to characterise the set \(\mathrm{Stab}(A_\bullet )\) corresponding to linear maps of a zizag module in a barcode basis. In Sect. 4, we defined an order \(\preceq \) on the set of intervals that allowed us to classify the stabiliser as

The \(\mathrm{Mat}(d_{i_{1}j_{1} }\times d_{i_{2}j_{2}};{\mathbb {F}})\) came from the fact that in standard persistence, the interval module \(\mathbf{I}[i_1,j_1]\) can be mapped non-trivially to the interval \(\mathbf{I}[i_2,j_2]\) if and only if \([i_1,j_1] \preceq [i_2,j_2]\). In zizag persistence, this is no longer true.

Example 6.5

One checks that in the following scenario

figure j

the interval [1, 4] may be non-trivially mapped to the interval [2, 3].

To then obtain a similar classification result for zizag modules, we see we must adapt our partial order \(\preceq \) to the type \(\tau \) of our zizag module.

Definition 6.6

Let \(\tau \) be a type of zizag module, defining an orientation on the standard length \(\ell \) quiver. Let \(\preceq _{\tau }\) be the binary relation on \(\left\{ [i,j] \in {\mathbb {Z}}^2 \mid 0 \le i \le j \le \ell \right\} \) given by

$$\begin{aligned}{}[i_1,j_1] \preceq _\tau [i_2,j_2] \Leftrightarrow {\left\{ \begin{array}{ll} [i_1,j_1] \cap [i_2,j_2]=[i,j] \ne \emptyset \quad \text {and} \\ i_1 \le i_2 \quad \text {if} \quad i-1 \rightarrow i, \quad i_2 \le i_1 \quad \text {if} \quad i-1 \leftarrow i \quad \text {and} \\ j_1 \le j_2 \quad \text {if} \quad j \rightarrow j+1, \quad j_2 \le j_1 \quad \text {if} \quad j \leftarrow j+1 \end{array}\right. } \end{aligned}$$

We observe that when all maps point forward, i.e., when \(\tau =ff \ldots f\), we have \(\preceq _\tau =\preceq \). And if all maps point backwards, ie \(\tau = qq \ldots q\), then \(\preceq _\tau \) is the reverse of \(\preceq \) in the sense that

$$\begin{aligned}{}[i_1,j_1] \preceq _\tau [i_2,j_2] \Leftrightarrow [i_2,j_2] \preceq [i_1,j_1]. \end{aligned}$$

Our description of the stabiliser from Theorem 4.4 relied on the compatibility of \(\preceq \) with the lexicographical total order \(\trianglelefteq \) on the bars. Having produced a \(\tau \)-analogue of \(\preceq \), we must now construct the zigzag version of \(\trianglelefteq \). To this end, we define two new auxiliary total orders on the set of all possible endpoints \(\left\{ 0, \ldots , \ell \right\} \). Note that any such order < amounts to a choice of element \(\sigma _\ell \) lying in the permutation group \(S_{\ell +1}\) via the identification

$$\begin{aligned} \sigma (0)< \sigma (1)< \cdots < \sigma (\ell ). \end{aligned}$$

Definition 6.7

Let \(\le _\tau \) be the total order on \(\left\{ 0,1 \ldots \ell \right\} \) given by the permutation \(\sigma _\ell \) defined inductively as follows. Assuming we have ordered \(\left\{ 0, \ldots , i\right\} \) with corresponding permutation \(\sigma _i\), we order \(\left\{ 0, \ldots , i+1\right\} \) with permutation \(\sigma _{i+1}\), setting

$$\begin{aligned} \sigma _{i+1}(k)= {\left\{ \begin{array}{ll} \sigma _{i}(k) &{} \text {if} \quad i \longrightarrow i+1 \quad \text {for} \quad k \in \left\{ 0,\ldots i\right\} \\ i+1 &{} \text {if} \quad i \longrightarrow i+1 \quad \text {for} \quad k=i+1\\ \sigma _{i}(k)+1 &{} \text {if} \quad i \longleftarrow i+1 \quad \text {for} \quad k \in \left\{ 0. \ldots i\right\} \\ 0 &{} \text {if} \quad i \longleftarrow i+1 \quad \text {for} \quad k=i+1 \end{array}\right. } \end{aligned}$$

Definition 6.8

Let \({\le ^*_\tau }\) be the total order on \(\left\{ 0,1 \ldots , \ell \right\} \) given by the permutation \(\sigma ^*_\ell \) defined inductively as follows. Assuming we have ordered \(\left\{ j+1, \ldots , \ell \right\} \) with corresponding permutation \(\sigma ^*_{j+1}\), we order \(\left\{ j, \ldots , \ell \right\} \) with permutation \({\sigma }^*_{j}\), setting

$$\begin{aligned} {\sigma }^*_{j}(k)= {\left\{ \begin{array}{ll} {\sigma }^*_{j+1}(k) &{} \text {if} \quad j \longrightarrow j+1 \quad \text {for} \quad k \in \left\{ j+1. \ldots \ell \right\} \\ j &{} \text {if} \quad j \longrightarrow j+1 \quad \text {for} \quad k=j\\ {\sigma }^*_{j+1}(k)-1 &{} \text {if} \quad j \longleftarrow j+1 \quad \text {for} \quad k \in \left\{ j+1. \ldots \ell \right\} \\ \ell &{} \text {if} \quad j \longleftarrow j+1 \quad \text {for} \quad k=j \end{array}\right. } \end{aligned}$$

If \(\tau =ff\ldots f\), both of the above total orders coincide with the standard ordering \(\le \) on \(\left\{ 0,1 \ldots \ell \right\} \).

Example 6.9

Consider zigzag modules of length 4 with type \(0 \longleftarrow 1 \longrightarrow 2 \longleftarrow 3\). For such modules, the two total orders defined above are

$$\begin{aligned}&3 \le _\tau 1 \le _\tau 0 \le _\tau 2, \text { and} \\&1 \le ^*_\tau 3 \le ^*_\tau 2 \le ^*_\tau 0. \end{aligned}$$

Definition 6.10

Let \(\tau \) be a type of length-\(\ell \) zigzag module. The corresponding total order \(\trianglelefteq _{\tau }\) on \(\left\{ [i,j] \in {\mathbb {Z}}^2 \mid 0 \le i \le j \le \ell \right\} \) is given by

$$\begin{aligned}{}[a,b] \trianglelefteq _\tau [c,d] \Leftrightarrow a <_\tau c \hbox { or }a=c\hbox { and }b \; {\le }^*_\tau \; d. \end{aligned}$$

By construction, if \(\tau =f f \ldots f\), this coincides with the lexicographic order \(\trianglelefteq \) from Sect. 4, and \([i_1,j_1] \preceq _\tau [i_2,j_2] \Rightarrow [i_1,j_1] \trianglelefteq _\tau [i_2,j_2]\). Using this total order on the bars, we may generalise our notion of ordered barcode bases to zizag modules, by ordering the bars with the order \(\trianglelefteq _\tau \). We now have all the necessary tools to adapt our results from Sect. 4 to the case of zizag modules.

Theorem 6.11

For each pair [ij] in \(\left\{ 0,1,\ldots ,\ell \right\} \) with \(i \le j\), let \(d_{ij}\) be the multiplicity in the barcode of \((V_\bullet ,p_\bullet , \tau )\), with the understanding that \(d_{ij} = 0\) whenever [ij] is not in \({\mathbf{Bar}}(V_\bullet ,p_\bullet , \tau )\). Then there is a bijection of sets:

Proposition 6.12

Given a zizag module \((V_\bullet , p_\bullet , \tau )\) together with an ordered barcode basis \({\mathscr {B}}\) with matrix representation \(A_\bullet \), the set of all ordered barcode bases is given by the orbit \(\mathrm{Stab}(A_\bullet ) {\mathscr {B}}\).

6.3 Maps of zizag modules

We now turn our attention to morphisms \((V_\bullet , p_\bullet , \tau ) \rightarrow (W_\bullet , {\tilde{p}}_\bullet , \tau )\) between zigzag persistence modules of the same type \(\tau \). Each such morphism is determined by linear maps \(\phi _i : V_i \mapsto W_i\) along with the requirement that the evident squares commute. That is, if \(p_i=f_i\) (and so \({\tilde{p}}_i={\tilde{f}}_i\)), we have \(\phi _i \circ f_i={\tilde{f}}_i \circ \phi _{i-1}\), and if \(p_i=q_i\) (and so \({\tilde{p}}_i={\tilde{q}}_i)\), we have \(\phi _{i-1 } \circ q_i={\tilde{q}}_i \circ \phi _i\). This is best represented through the following diagram

where each natural square commutes.

As in Sect. 5, such maps may be identified as ladder persistence module on the rectangle quiver with orientation \(\tau \). We denote such modules \((V_\bullet , W_\bullet , \phi _\bullet , \tau )\). We may analogously define a special class of of modules, namely \({{\textbf {R}}}_{\tau _{[i_1,j_1]_\bullet }}^{ [i_2,j_2]}\), \(\mathbf{I}_\tau ^{+}[i,j]_\bullet \) and \(\mathbf{I}_\tau ^{-}[i,j]_\bullet \). Here is the zigzag analogue of Definition 5.1

Definition 6.13

Given a type \(\tau \) of zizag module, we say a bar \([i_2,j_2]\) is strictly nested in a bar \([i_1,j_1]\) with regards to \(\tau \), denoted \([i_2,j_2] \subset _\tau [i_1,j_1]\), if they are non-intersecting with \([i_1,j_1] \trianglelefteq _\tau [i_2,j_2]\) but \([i_1,j_1] \not \preceq _\tau [i_2,j_2]\).

As in Sect. 5, maps of zizag module may be compactly represented as block upper triangular matrices using ordered barcode basis for the source and target and zizag modules. Having excluded strictly nested bars, we are free to perform operations of type (1), (2) and (3) à la Theorem 5.3 and obtain the following result.

Theorem 6.14

Let \((V_\bullet , W_\bullet , \phi _\bullet , \tau )\) be a ladder persistence module of length \(\ell +1\) and type \(\tau \), where neither \(V_\bullet \) nor \(W_\bullet \) admit a pair of strictly nested bars with regards to \(\tau \). Then there are integers \(r_{[i_1,j_1]}^{ [i_2,j_2]}\), \(d_{ij}^{{\pm }} > 0\) for which :

$$\begin{aligned} (V_\bullet , W_\bullet , \phi _\bullet , \tau ) \simeq \bigoplus _{[i_1,j_1] \preceq _\tau [i_2,j_2]} (\mathbf{R}_{\tau _{[i_1,j_1]_\bullet }}^{ [i_2,j_2]})^{r_{[i_1,j_1]}^{ [i_2,j_2]}} \oplus \bigoplus _{i \le j} (\mathbf{I}_\tau ^{+}[i,j]_\bullet )^{d_{ij}^{+}} \oplus \bigoplus _{i \le j} (\mathbf{I}_\tau ^{-}[i,j]_\bullet )^{d_{ij}^{-}} \end{aligned}$$