{'fraction_non_alphanumeric': 0.06159870117467291, 'fraction_numerical': 0.009932193677776717, 'mean_word_length': 3.5252808988764044, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Numeric Invariants from Multidimensional Persistence

We extend the results of Adcock, Carlsson, and Carlsson by constructing numeric invariants from the computation of a multidimensional persistence module as given by Carlsson, Singh, and Zomorodian.

The use of topology to study point cloud data has been well established ( [Car09], [Car14]). Given a finite metric space (e.g., a finite set in R n ), one first constructs a filtered complex which attempts to approximate the shape of the underlying data. Commonly used complexes include the Vietoris-Rips complex, the Cech complex, the α-complex, and the witness complex. The persistent homology of a filtered complex is an abstract algebraic entity which combines information about the homology of the levelwise complexes in a filtered simplicial complex and the maps on homology induced by the filtration maps of the complex. The process of constructing a filtered complex and taking persistent homology provides abstract algebraic information about the original point cloud data.
It is difficult to interpret raw calculations of persistent homology from a geometric and intuitive standpoint. This is partially remedied by Adcock, Carlsson, and Carlsson, who have successfully studied ways of interpreting persistent homology geometrically through the construction of numeric invariants [ACC13]. They produce an infinite family of functions, each of which takes as input any one-dimensional persistence module (the most notable of such objects being the persistent homology of a one-dimensional filtered complex) and outputs a nonnegative number which has a concrete interpretation in terms of the geometric features of the filtered complex. If the filtered complex was obtained from point cloud data, these values provide information about the size and density of the geometric features in the point cloud data. The process by which one obtains values from point cloud data by constructing a filtered complex, taking homology, and calculating functions serves as a useful pipeline for the construction of numerical features which can then be used in machine learning algorithms.
Unfortunately, the method of [ACC13] does not generalize nicely to multidimensional persistence modules. The construction of the algebraic functions in [ACC13] relies heavily on the classification theorem of finitely generated modules over a PID and the categorical equivalence between one-dimensional persistence modules and finitely generated modules over a PID. Multidimensional persistence modules are categorically equivalent to finitely presented graded R[x 1 , ..., x n ]-modules, for which there is no analogous classification theorem. Furthermore, the results of [CZ09] show that there is no complete discrete invariant for multidimensional persistence; any numeric invariants that we provide must necessarily be incomplete.
It is our goal to provide functions which generalize those of [ACC13]. Although our functions are provably identical to those of [ACC13], our construction is measure theoretic rather than algebraic. As such, our functions can be defined just as easily on the space of multidimensional persistence modules as on the space of one-dimensional persistence modules.
In Section 1 we review multidimensional persistence and introduce convenient notation. In Section 2 we calculate the ring of K-finite functions on a convenient set of multidimensional persistence modules, which we then extend to all multidimensional persistence modules in Section 3. Finally, in Section 4, we show how to recover information about a multidimensional persistence module from the functions defined in Section 3.

Preliminaries and Conventions
Notation: We will denote elements of R n by bold letters (i.e., a ∈ R n ), but we will denote their components by italic letters (i.e., a j ∈ R). For a, b ∈ R n , we will denote the sum n j=1 a i + b i by a + b and the product n i=1 a bi i by a b . If additionally c, d ∈ R, we denote the quantity ( n i=1 a i ) + c by a + c, the quantity n i=1 c ai by c a , and the quantity n i=1 (a i + c)(b i + d) by (a + c)(b +d). Note that we will frequently make use of these abbreviations for constants in R n , but we will never make use of these abbreviations for variables. That is, for variables x, y ∈ R n , the quantity x + y denotes the vector sum of x and y in R n .
For a variable or constant x ∈ R n , denote by ⌊x⌋ (respectively, ⌈x⌉) the elements of R n obtained by taking the floor (respectively, ceiling) of each of the components x j of x. Similarly, for x, y ∈ R n , we say that x ≤ y if x j ≤ y j for all i. Additionally, we will use ≤ ℓ to denote the lexicographic order on R n .
Finally, unless otherwise noted, sets in this paper will be sets with repetition.
Multidimensional persistence: We begin by reviewing the concept of persistence.
Definition 1.1. A persistence module M indexed by the partially ordered set V is a family of k-modules {M v } v∈V together with homomorphisms φ u,v : In the literature, the indexing set V above has almost always referred to N n for some n ∈ N >0 . We do not generalize V to arbitrary ordered sets in this paper. When the indexing set V is N 1 , we refer to M as a one-dimensional persistence module. However, when V is N n for n > 1, we refer to M as a multidimensional persistence module.
Definition 1.2. Given a persistence module M indexed over N n , we can define an n-graded module α(M ) over k[x 1 , ..., x n ] via the following: where the k[x 1 , ..., x n ]-module structure is given by Furthermore, we have the following theorem: ). The correspondence α defines an equivalence of categories between the category of finite persistence modules over k and the category of finitely presented n-graded modules over k[x 1 , ..., x n ]. Theorem 1.3 allows us to interpret persistence modules indexed by N n as finitely presented graded k[x 1 , ..., x n ]-modules. This correspondence allows us to study persistence modules using the well-developed theory of graded modules.
From this point forward, we will focus on the case k = R.
Definition 1.4. Define M(R n ) to be the category of all persistence R-modules indexed by N n . For an element M ∈ M(R n ), we will often consider M simultaneously as a persistence module and as a finitely presented n-graded R[x 1 , ..., x n ]-module.
1.5. Algebraic Geometry. In this paper, k will denote a field of arbitrary characteristic. An algebraic variety over k is a set of the form The ring of global sections A[X] on an algebraic variety X is defined to be the ring Furthermore, if the group G acts on the variety X, we can form the quotient variety X/G. For this paper, we require only the case when G = S n is the symmetric group on n elements, where S n acts on k[x 1 , ..., x n ] by permuting the x i s. Since the quotient of k[x 1 , ..., x n ] under the action of S n is itself isomorphic to a ring of the form k[e 1 , ..., e n ] ⊆ k[x 1 , ..., x n ] (e j is commonly known as the jth elementary symmetric polynomial), we see that X/S n is defined by the polynomials f 1 , ..., f k , where f i is the image of f i in k[e 1 , ..., e n ] under the quotient map.

The Ring of K-finite Algebraic Functions on Persistent Cubes
In this section, we calculate the ring of K-finite algebraic functions on a simple and easily studied subset R(R n ) ⊆ M(R n ). The definition of R(R n ), given below, is very easily parameterized, and hence is easily analyzed from the standpoint of algebra and algebraic geometry. This section extends a result of [ACC13].
where v i represents a grading and 0 We see that each summand of an element of R(R n ) can be represented by 2n coordinates: . The first n coordinates can be viewed as when the summand is "born", and the last n coordinates represent when the summand "dies." Note additionally that the ordering of each summand within the direct sum decomposition given above is irrelevant. We now formulate this intuition algebraically.
Definition 2.2. Let J be any set. Let Sp m (J) denote all unordered collections of m elements in J. Concretely: where the symmetric group S m acts on the m coordinates of J ×m by permuting coordinates.
we see that our former intuition about the R m (R n ) translates into the following statement.
Proposition 2.3. There is a set-isomorphism between R m (R n ) and the semialgebraic variety Sp m (J n ).
The inequality present in the definition of J n presents mathematical difficulties: the study of algebraic objects defined using inequalities is less straightforward than the study of algebraic objects defined using only equalities. For the purposes of this paper, then, we consider J n as a subset of R n × R n and view Sp m (J n ) as a sub-semi-algebraic variety of the algebraic variety Sp m (R n × R n ), which is much more tractable.
We have natural inclusions ι m : which has global sections In the definition of R(R n ) given above, we require that the d ij be strictly positive. That is, we wish to regard as irrelevant any element of Sp(J n ) which contains a factor of the form (x, y) ∈ J n where one coordinate x i of x is equal to the corresponding coordinate y i of y. Intuitively, we think of (x, y) as opposite vertices of a cube, and we wish to disregard any cubes of volume 0.
To this end, define where ≃ is the equivalence relation generated by all relations of the form where one of the coordinates of z equals one of the coordinates of z ′ . Since

Multisymmetric and Invariant Polynomials. We review some facts about
Sm is generated (with relations) as an R-algbera by the multi-symmetric power sums consisting of power series p with the property that, given any finite subset S of {p a,b }, there are finitely many terms in p involving only elements of S. In particular, there are no relations among the .
the structure of a graded ring (with the grading of a monomial given by its degree), then the K-finite elements of A [Sp ∞ (R n × R n )] are simply those with finite degree (because R [p a,b ] has only finitely many generators in each degree).
Let W i ⊆ A m n be the closed subvariety defined by the equation n k=1 y ik −x ik = 0. Note that W i is the union of n hyperplanes in R n × R n . Our goal, then is to isolate the elements f of A f in [Sp ∞ (R n × R n )] which "disregard" any cubes with volume 0 in the following sense: for X 1 , X 2 ∈ Sp ∞ (R n × R n ) such that X 1 and X 2 are identified in Sp(R n × R n ), we wish f (X 1 ) = f (X 2 ). We denote the collection of such f by A f in Sp(R n × R n ) .
Consider the subring R m n of A[A m n ] consisting of all functions whose restriction to W i is independent of x ij and y ij for all i, j, and let R ∞ n = lim ← −m R m n . Then 2.6. The Calculation. It will be convenient now to change coordinates. Define Proposition 2.7. The ring R m n is characterized algebraically as the subring of all f ∈ A[A m n ] such that ∂f ∂ξij ∈ (η ik ) for all i, j, k, and such that ∂f ∂ηij ∈ (η ik ) for all i, j, k with j = k.
Proof. With our new coordinates, W i can be defined by the equation n k=1 η ik = 0. Let W ik ⊆ R n × R n denote the hyperplane defined by the equation η ik = 0, and note that W i = n k=1 W ik . Then R m n is the subring of A[A m n ] consisting of all functions whose restriction to W i is independent of ξ ij − η ij and ξ ij + η ij for all i, j. Equivalently, R m n is the subring of A[A m n ] consisting of all functions whose restriction to W ik is independent of ξ ij and η ij for all i, j, k.
Suppose f ∈ R[ξ ij , η ij ]. For any i, k, we can write where η ik does not appear in r ik (ξ, η). Since f | W ik = r| W ik , it follows that f ∈ R m n iff for all i, j, k, ∂r ik ∂ξij = ∂r ik ∂ηij = 0. This in turn is equivalent to the condition that ∂f ∂ξij ∈ (η ik ) for all i, j, k and ∂f ∂ηij ∈ (η ik ) for all i, j, k with j = k.
Proposition 2.8. The following set of monomials forms an R-basis for R m n : Proof. The differential conditions given in proposition 2.7 which are necessary and sufficient for a polynomial f ∈ A[A m n ] to belong to R m n are true for a polynomial f iff they are true for each of the monomial summands of f . Hence, we know that there exists a basis of monomials for R m n . The monomials which satisfy the conditions of proposition 2.7 are exactly those listed in the statement of this proposition.
Having completed these initial calculations, it remains to calculate A f in Sp(R n × R n ) .
Recall that the Hilbert series HS Ω (t) of a real vector space Ω is defined to be the sum Theorem 2.9. A f in Sp(R n × R n ) is freely generated as an R-algebra by the infinite symmetric polynomials Proof. Let A denote the R-algebra generated by the p a,b such that a j ≥ 1 for all j. By lemma 2.5, A is freely generated by these p a,b . Since each of these p a,b is in is a freely generated sub-algebra. It remains to show that these two algebras are in fact equal.
To prove equality, we need only show that HS A (t) = HS A f in [ Sp(R n × R n )] (t). This equality follows from the results of lemmas 2.10 and 2.11 below.
Proof. Since we require that a j ≥ 1 for all generators p a,b of A, it follows that A has 0 generators in degrees 1 through n−1. In degrees d ≥ n, A has d+n−1 d−n = d+n−1 2n−1 generators (this multinomial coefficient represents the number of ways to put d − n balls into 2n buckets).
Proof. For ease of notation, let f (t) = HS A f in [ Sp(R n × R n )] (t). Additionally, let We must show that f (t) = g(t). Let ≤ ℓ denote the lexicographic order on N n + × N n . Let ≺ denote the following linear order on N n to be the Hilbert series of the free subalgebra of A f in Sp(R n × R n ) generated by the symmetrizations of the monomials where (a i , b i ) ∈ N n + × N n . For (a, b) ∈ N n + × N n , let (a ′ , b ′ ) ∈ N n + × N n be the immediate predecessor to (a, b) under the ordering (if it exists). Then we have . We now analyze the function g(t). For Note that g 1,0 (t) = (1 − t n ) −1 . Lemma 2.12 below shows that g a,b (t) = (1 − t a+b ) −1 g a ′ ,b ′ (t).
Since f 1,0 = g 1,0 and the f a,b and g a,b satisfy the same recurrence relation, it follows that f a,b = g a,b for each a, b, and thus Lemma 2.12. In the notation given in lemma 2.11, the functions g a,b satisfy Proof. Due to the complicated definition of the total order ≺ used above, this lemma must be proven separately for the following five cases: (2) a ′ = a, and there exists an index i 0 < n − 1 such that For case (1), we have: Note that B a,b,n−1 (t) = 1 − t a+b −1 B a ′ ,b ′ ,n−1 (t). As all other factors of g a,b and g a ′ ,b ′ are identical, the lemma holds. The proofs of cases (2) through (5) are very similar. Of these, for ease, we only prove case (2). For this case, we have: It suffices to show that as all other factors of g a,b and g a ′ ,b ′ are identical. Both sides of the equation above are merely products of powers of 1 − t a+b , so we need only show that the exponents of 1 − t a+b are the same on both sides of the equality. That is, we must show that This simplifies to Because b j = 0 for i + 1 ≤ j < n, we can further simplify to This equality holds due to the combinatorial identity which is easily proven by induction on k using Pascal's rule.

Extending and Calculating the Invariants
Having determined the ring of K-finite global sections of R(R n ), we are now faced with two problems. First, it is not clear how (or if) these functions might extend to M(R n ). Second, although we have determined the ring of K-finite global sections of R(R n ), it is not clear how one might calculate them. This section addresses both of these issues.
3.1. Defining the Invariants. For a multidimensional persistence module M over a field k and u, v ∈ N n , the rank invariant ρ u,v (M ) is defined by For a measure-theoretic treatment of multidimensional persistence, one would remove the floor and ceiling symbols in the definition of ρ u,v . An algorithm to calculate the rank invariant is given in [CSZ10]. For a ∈ N n + , let I = {i | a i = 1}, and let J = {i | a i > 1}. Let (z, z ′ ) ∈ R n+|J| denote a variable constructed so that z, z ′ ∈ R n denote variables such that for all i ∈ I, the ith coordinate of z is the same as the ith coordinate of z ′ .
For any persistence module M and (a, b) ∈ N n + × N n , define 3.2. Proving Equivalence of Invariants. In this section, we will prove that on R(R n ), the invariants {F a,b } defined in Section 3.1 are equivalent to the invariants {p a,b } defined in theorem 2.9 (equivalent in the sense that they encode the same information about an element M ∈ R(R n )). This shows that the invariants {F a,b } extend to all of M(R n ) the invariants {p a,b } defined on R(R n ). Furthermore, since the rank invariant is a complete invariant for all elements of R(R n ), the invariants F a,b form the strongest set of invariants on M(R n ) which can be defined in terms of the rank invariant alone (rather than invariants obtained from higher syzygies).
More concretely, we will prove that on R(R n ), We prove this fact in three iterations -first for R 1 (R 1 ), then for R 1 (R n ), and finally for R(R n ).
In proving equivalence, it will be necessary to define a partial order on N n + × N n (which is different than the linear order defined in the proof of lemma 2.11). For We extend this partial order to monomials: x a y b as "higher order terms" (it will be clear from context what the monomial represented here by x a y b is).
Proof. It suffices to prove that for all k, the following holds (on R 1 (R 1 )): More concretely, we will show that F a,b can be written as a (finite) linear combination of p a,b and higher order terms. It follows from this computation that Since there are only finitely many pairs (a ′ , b ′ ) ∈ N + × N with a ′ + b ′ = a + b = k, it follows from back substitution that effectively proving the lemma.
We return now to the matter of calculating F a,b (M ) for M ∈ R 1 (R 1 ). Assume M = [x, y] ∈ R 1 (R 1 ). Let (a, b) ∈ N + × N. We first consider the case a = 1. In this case, we have that ρ z,z (M ) is simply the characteristic function ½ [x,y] , and so: Next, we calculate F a,b (M ) for M = [x, y] ∈ R 1 (R 1 ) and (a, b) ∈ N + × N with a ≥ 2. Note that in this case, ρ z,z ′ (M ) is the characteristic function of the solid triangular region T x,y in R 2 consisting of the points (z, z ′ ) with (z, z ′ ) ∈ [x, y]×[x, y] and z ′ ≥ z. In the calculation of F a,b , we will change variables by putting α = z ′ − z and β = z ′ + z. The triangular region under consideration can now be described by the points (α, β) with 2x + α ≤ β ≤ 2y − α and 0 ≤ α ≤ y − x. We calculate: p a,b (M ) + higher order terms .
Lemma 3.4. On R 1 (R n ), Proof. The proof of this lemma will be similar to that of lemma 3.3. That is, we prove that for all k, the following holds (on R 1 (R n )): by showing that F a,b can be written as a (finite) linear combination of p a,b and higher order terms.
Note that M is determined by vertices x, y ∈ R n with x ≤ y. Let (a, b) ∈ N n + × N n . As discussed previously, we let I = {i | a i = 1} and J = {i | a i > 1}. We can write the rank function ρ z,z ′ (M ) as a convenient product: where the region T xi,yi is as defined in the proof of lemma 3.3. This allows us to reduce the calculation of F a,b (M ) to the calculations performed in lemma 3.3: p a,b (M ) + higher order terms .
The previous two lemmas allow us to prove the main theorem of this section: Proof. The proof of this lemma will be similar to that of lemma 3.4. That is, we prove that for all k, the following holds (on R(R n )): Span {F a,b } a+b=k = Span {p a,b } a+b=k by showing that F a,b can be written as a (finite) linear combination of p a,b and higher order terms.
Each element M of R(R n ) can be viewed as the finite direct sum where M k ∈ R 1 (R n ). Hence, for (a, b) ∈ N n + × N n , we have that This allows us to calculate F a,b (M ) from the calculation of F a,b (M k ) from lemma 3.4: p a,b (M k ) + higher order terms = i∈I 1 2 bi i∈J 1 a i (a i − 1) p a,b (M ) + higher order terms .

Recovering the Point Cloud
Section 2 examines the K-finite sections of R(R n ), and Section 3 provides a concrete method for calculating them. In this section, we provide a way to recover information about M ∈ R(R n ) (including M itself) from the invariants p a,b (M ) (where (a, b) ∈ N n + × N n ). First, we prove two technical lemmas: Lemma 4.1. Let a 1 , ..., a n ∈ R with a j > 0 for all j. Assume that a 1 < 1. Then lim k→∞   n j=1 a k n+1−j j   = 0.
Proof. We prove this lemma by induction on n. The case n = 1 is trivial. If the lemma is true when n = m − 1, it is also true for the case n = m, since Letting A equal the algebra generated by the p a,b for (a, b) ∈ N n + × N n and letting X equal R 1 (R n ) will allow us to recover the values of various functions on the individual cubes that constitute an element M of R(R n ). For example, letting f 1 = p 1,0 will allow us to determine in decreasing order the volumes of the cubes which constitute M .