arXiv:1912.02563v3 [math.AT] 8 Apr 2021 pair [Bje16]. modules rectangle of sum multi-paramete direct and finite CO20] a [BL18, to modules block persis of sums two-parameter sum direct include direct finite Examples to set. m isomorphic some are to one generally, longing that More poset some CSEHM10]. by [CSEH07, indexed plane the d in persistence for distance distances between Wasserstein distance and dissimilarity bottleneck the the on and Distances based barcode metric The CSEH07]. barcode [CZCG04b, modules. intervals interval of of collection sum this direct finite a to phic acdsi is it barcodes ftesmercdfeec rteHudrfdsac (Exam monoid commutative distance free Hausdorff a the construct or we difference symmetric the of ( in22 oehrwt aiyof family a with together 2.2) tion rpsto 1.1. Proposition me metrics the recover we barcodes and diagrams persistence hoe 1.2. Theorem i ood(ento .)adtecnnclinclusion canonical the and 4.1) (Definition monoid ric metric hoe 1.3. pro Theorem universal following the of consequence direct a is above aiemti oodotie from obtained monoid metric tative R esuydsacsi etn hticue l fteeexa these of all includes that setting a in distances study We p a produces homology persistent settings computational In Date u osrcin r nvra n aif h olwn u following the satisfy and universal are constructions Our o oepeiesaeeto hsrsl e hoe . an 5.1 Theorem see result this of statement precise more a For 6 2 , ( NVRAIYO ESSEC IGASADTEBTLNC AN BOTTLENECK THE AND DIAGRAMS PERSISTENCE OF UNIVERSALITY d X pi 2 2021. 12, April : ρ , , p eutapist essec igas acds n omu to Kantorovic and satisfies barcodes, distance 1-Wasserstein diagrams, the addition, persistence to applies result A ∆ d on sbdiiecmuaiemni na neligmti sp metric underlying an on monoid commutative -subadditive BSTRACT ) , where , A D ) ( ( Dfiiin31.Frpritnedarm,terlvn met relevant the diagrams, persistence For 3.1). (Definition X Int ie ercpair metric a Given ie ercpair metric a Given , A epoeta essec igaswt the with diagrams persistence that prove We . ie ercpair metric a Given ( ) R d optbewith compatible ) stemti bandfo n fthe of one from obtained metric the is , d , ∅ ) hr Int where , EE UEI N LXELCHESEN ALEX AND BUBENIK PETER ( ( ASRTI DISTANCES WASSERSTEIN ( X X X asrti distances Wasserstein d , ( , , d . X d d ( , R , , , A d A A .I 1. ) ) , ) ) hti,gvnany given is, That . eoe h e fitrasin intervals of set the denotes A , the , ( ( ) NTRODUCTION D D , ( ( ( D X X p ( , Wsesendistance -Wasserstein , 1 X A A , ) ) A i , , + W ( : ) , -uisenduality. h-Rubinstein 0 , W X p W p , ) , Wsesendsac omteuniversal the form distance -Wasserstein p + d p of , , arm ae ntesupremum-norm the on based iagrams 0 , tprmtrpritnemdls In modules. persistence ltiparameter p + q A o all for ewe hs umre nld the include summaries these between c ihadsigihdsbe.This subset. distinguished a with ace essec diagrams persistence sbdiiecmuaiemti monoid metric commutative -subadditive perty. ) nrson -norms 0 , nevl CC0b ZG4]and CZCG04a] [CZCG04b, intervals ) ec oue smrhct finite a to isomorphic modules tence ieslproperties. niversal steuniversal the is toe bv Eape4.15). (Example above ntioned l .) ie uhamti pair, metric a such Given 3.4). ple → ) essec oue isomorphic modules persistence r ritnemdl hti isomor- is that module ersistence sa is fidcmoal oue be- modules indecomposable of essec iga summarize diagram persistence ( pe.W tr ihametric a with start We mples. ento .2 h theorem The 3.12. Definition d p D p ∈ ( yhv essec modules persistence have ay W X sbdiiecmuaiemet- commutative -subadditive [ R p , 1, A R stelargest the is and ∞ ) 2 , i aris pair ric W Eape32,adfor and 3.2), (Example ] Dfiiin41) For 4.12). (Definition p d p sbdiiecommu- -subadditive 0 , sete h length the either is on ) is ( X 1 ( p -Lipschitz. R , -subadditive A 6 2 ) , (Defini- d D , ∆ ) or 2 PETER BUBENIK AND ALEX ELCHESEN

(N, ρ, +, 0) and 1-Lipschitz map ϕ : (X, d, A) → (N, ρ, 0), there is a unique 1-Lipschitz monoid homomor- phism ϕ˜ : (D(X, A), Wp, +, 0) → (N, ρ, +, 0) such that ϕi˜ = ϕ. i i (X, d, A) (D(X, A), Wp, 0) (D(X, A), Wp, +, 0) (X, d, A) (D(X, A), Wp, 0)

∃ ϕ !ϕ ˜ ϕ ϕ˜ (N, ρ, 0) (N, ρ, +, 0) (N, ρ, 0)

We now restate this universal property more concisely. p Theorem 1.4. Let Metpairs denote the of metric pairs and 1-Lipschitz maps and let CMon(Met∗) denote the category of p-subadditive commutative metric monoids and 1-Lipschitz monoid homomorphisms p (Definition 4.1). The forgetful functor U : CMon(Met∗) → Metpairs has a left adjoint Dp such that Dp(X, A) = (D(X, A), Wp, +, 0). The following related result is of independent interest. p Theorem 1.5. For each p ∈ [1, ] there is a symmetric monoidal category Met∗ (Definitions 3.10 and 4.5 p p and Corollary 4.10) for which CMon(Met∗) is the category of commutative monoids internal to Met∗. ∞ As a corollary to these results obtain Converse Stability Theorems (Section 5.2). When p = 1, the Wasserstein distance satisfies Kantorovich-Rubinstein duality (Section 5.3). 1.1. Related work. Several other metrics arising in applied topology have been shown to satisfy universal properties. Lesnick proved a universality result for the interleaving distance [Les15] and Lesnick and Blumberg introduced the homotopy interleaving distance and proved a universality result for it [BL17]. Bauer, Landi, and M´emoli proved a universality result for the Reeb graph edit distance [BLM20]. Also compare our results with the earlier work of d’Amico, Frosini, and Landi [dFL10]. A notion of Wasserstein distance between generalized persistence modules was recently developed by Bubenik, Scott, and Stanley for which a universality result analogous to ours was proven [BSS18]. The Wasserstein distances between persistence diagrams has been studied extensively by Divol and Lacombe [DL21]. There they relate the Wasserstein distance between persistence diagrams to the classical Wasserstein distance on probability measures. Among other things, this allows for a version of Kantorovich-Rubinstein duality to be recovered for persistence diagrams.

2. BACKGROUND 2.1. Metric spaces. In order to include various distances arising in persistent homology, we will use a less restrictive notion of than is standard. Such relaxed metrics are referred to as extended pseudometrics in the literature, but we will refer to them as metrics for brevity. Definition 2.1. A metric space consists of (X, d) where X is a setand d : X × X → [0, ] is a satisfying d(x, x) = 0 for all x ∈ X (point triviality), d(x, y) = d(y, x) for all x, y ∈ X (symmetry), and d(x, y) 6 d(x, z)+ d(z, y) for all x, y, z ∈ X (triangle inequality). Given metric∞ spaces (X, dX) and (Y, dY) a metric map is a function f : X → Y such that dY(f(x), f(y)) 6 dX(x, y) for all x, y ∈ X. Given a set X, a metric space (Y, d), and a function g : X → Y, the pullback of d along g, denoted g∗d, is the metric on X defined by g∗d(x, x′) := d(g(x), g(x′)). 2.2. Monoids. A commutative monoid M = (M, +, 0) is a set M together with an associative com- mutative binary operation + : M × M → M for which there exists an element 0 ∈ M satisfying m + 0 = m for all m ∈ M, called the identity element. A monoid homomorphism between com- mutative monoids M = (M, +M, 0M) and N = (N, +N, 0N) is a map f : M → N such that f(a +M b) = f(a)+N f(b) for all a, b ∈ M and f(0M) = 0N. A subset P ⊂ M is a submonoid if it contains 0 and + restricts to a binary operation on P. UNIVERSALITY OF PERSISTENCE DIAGRAMS AND THE BOTTLENECK AND WASSERSTEIN DISTANCES 3

Given a set X, the free commutative monoid on X, denoted D(X), is the set of all formal sums of elements of X, with the monoid operations being given by addition of formal sums. That is, D(X) is the set of all functions f : X → N ∪ {0} with finite support and with the monoid operation given by the pointwise addition of functions. Formal sums are also called finite multisets. For x ∈ X, let 1x : X → N ∪ {0} be given by 1x(x) = 1 and 1x(y) = 0 for all other y ∈ X. As is customary, we denote 1x by x. With this convention, we may write any formal sum α ∈ D(X) as α = x1 + · · · + xn, where n > 0 and x1,..., xn ∈ X. We define the canonical inclusion ι : X → D(X) by ι(x)= x. An equivalence relation ∼ on a commutative monoid M is called a congruence if a ∼ b and c ∼ d implies a + c ∼ b + d. If ∼ is a congruence then there is a well-defined commutative monoid struc- ture on the set of equivalence classes M/ ∼ given by [a] + [b] := [a + b]. Let M be a commutative monoid and P ⊆ M any submonoid. Define a relation ∼ on M by a ∼ b ⇐⇒ ∃x, y ∈ P such that a + x = b + y. Then ∼ is a congruence and we denote the commutative monoid M/ ∼ by M/P and refer to it as the quotient of M by P. A set pair is a pair (X, A) where X is a set and A is a nonempty subset of X. A map of pairs f : (X, A) → (Y, B) is a function f : X → Y such that f(A) ⊂ B. A pointed set is a pair (X, {x0}), which is denoted (X, x0). Given pointed sets (X, x0) and (Y, y0), a pointed function f : (X, x0) → (Y, y0) is a function f : X → Y such that f(x0)= y0. Definition 2.2. Given a pair (X, A), let D(X, A) denote the quotient monoid D(X)/D(A). We call D(X, A) the commutative monoid of persistence diagrams on (X, A). Note that D(X)/D(A) =∼ D(X \ A). Given a map of pairs f : (X, A) → (Y, B), there is an induced monoid homomorphism f∗ : D(X, A) → D(Y, B) given by f∗(x1 + · · · + xn) = f(x1)+ · · · + f(xn). Note that this also defines a pointed function f∗ : (D(X, A), 0) → (D(Y, B), 0). n 2.3. p-norms. Let p ∈ [1, ] and x = (x1,..., xn) ∈ R . For p < , the p-norm of x is defined /p by kxk = ( n |x |p)1 and for p = , it is defined by kxk = max |x |. For x = p k=1 k ∞ ∞ 16k6n k (x ,..., x ), y = (x + ,..., x + ), and z = (x ,..., x + ), k(kxk , kyk )k = kzk . By the 1 m P m 1 m n 1 m n ∞ p p p p p n ∞ ℓ -distance on R we mean the metric induced by the p-norm, i.e., kx − ykp. The fact that each n k · kp is a norm relies on the Minkowski inequality: for all p ∈ [1, ] and x, y ∈ R , kx + ykp 6 kxkp + kykp. The p-norms are related as follows, which shows in particular that the p-norms are n ∞ 1 − 1 decreasing in p: for x ∈ R and 1 6 p 6 q 6 we have kxkq 6 kxkp 6 n p q kxkq, and these inequalities are attained. Here we adopt the convention 1 = 0. ∞ Let R denote the set of extended real numbers [− , + ]. The ℓp-distance on Rn extends to n ∞ R , with the understanding that it may take a value of . ∞ ∞ 2.4. Universal properties and adjunctions. Consider a∞ functor U : D → C between categories D and C and let X ∈ C. An object Y ∈ D satisfies a universal property with universal element i : X → UY ∈ C if for every object Z ∈ D and f : X → UZ in C there is a unique morphism g : Y → Z in D such that Ug ◦ i = f.

Xi UY Y Xi UY (2.1) ∃!g Ug f f UZ Z UZ For example, consider the forgetful functor U : CMon → Set from the category of commutative monoids to the category of sets and let X ∈ Set. Then the free commutative monoid D(X) ∈ CMon satisfies a universal property with universal element the canonical inclusion i : X → UD(X) ∈ Set. A more succinct way of stating (2.1) is that (Y, i) is the initial object of the category X ↓ C. Furthermore, X ↓ C is the category of elements of the functor C(X, U−) : D → Set. Another way 4 PETER BUBENIK AND ALEX ELCHESEN of stating (2.1) is that there is a natural C(X, U−) =∼ D(Y, −) defined by i ∈ C(X, UY). That is, C(X, U−) is represented by Y via i. Lemma 2.3 ([Rie17, Lemma 4.6.1]). A functor U : D → C admits a left adjoint if and only if for each object X in C the category X ↓ D has an initial object.

If there exists a left adjoint F, then the initial object is (FX, ηX), where ηX : X → UFX is a component of the unit. In the other direction, for each object X in C, write the initial object as (FX, ηX), where ηX : X → UFX. Then this defines a function F from the objects of C to the objects of D. This extends to a functor F by sending h : X → W to the unique map Fh : FX → FW in D in (2.1) obtained from i = ηX and f = ηW ◦ h. For example, the forgetful functor U : CMon → Set has a left adjoint D : Set → CMon, the free commutative monoid functor. A special case of (2.1) has U : D → C being the inclusion of a full subcategory. Definition 2.4. A reflective subcategory of a category C is a full subcategory D of C such that the inclusion D → C has a left adjoint.

3. METRIC PAIRS AND POINTED METRIC SPACES

Definition 3.1. Let Metpairs denote the category whose objects are of the form (X, d, A), where (X, d) is a metric space with A a nonempty subset of X and whose morphisms f : (X, d, A) → (Y, d′, B) are metric maps f : (X, d) → (Y, d′) such that f(A) ⊂ B. (X, d, A) is called a metric pair. Example 3.2. Consider the metric space (R2, d) where d is the metric induced by the q-norm, R2 R2 R2 R2 where 1 6 q 6 . Let 6 = {(x, y) ∈ | x 6 y} and similarly define subsets > and = where R2 R2 R2 the latter is also denoted ∆. Then we have metric pairs ( , d, >) and ( 6, d, ∆). Similarly, we ∞ 2 have the metric pair (R6, d, ∆).

Definition 3.3. Let Met∗ denote the full subcategory of Metpairs whose objects are of the form (X, d, {x0}), which we denote (X, d, x0). We call x0 the basepoint and call (X, d, x0) a pointed metric ′ space. A morphism f : (X, d, x0) → (Y, d , y0) is called a pointed metric map. Example 3.4. Let Int(R) denote the set of intervals in R with d(I, J) equal to the length (i.e. Lebesgue measure) of the symmetric difference (I ∪ J) \ (I ∩ J). Then (Int(R), d, ∅) is a pointed metric space. We may also equip Int(R) with the Hausdorff distance dH to obtain the pointed metric space (Int(R), dH, ∅). Definition 3.5. Given a metric pair (X, d, A) consider the quotient set X/A = (X \ A) ∐ {A}. Let d : X/A × X/A → [0, ] be the induced metric. That is, d(A, A)= 0, for x ∈ X \ A, d(x, A)= d(A, x)= d(x, A), where d(x, A)= infy∈A d(x, y), andfor x, y ∈ X \ A, d(x, y)= min (d(x, y), d(x, A)+ d(y, A)). ∞ Given a morphism f : (X, dX, A) → (Y, dY , B), let f : X/A → Y/B be the induced map. That is, f(A)= B, and for x ∈ X \ A, f(x)= B if f(x) ∈ B and otherwise f(x)= f(x). Lemma 3.6. If (X, d, A) is a metric pair then (X/A, d, A) is a pointed metric space. Proof. We need to show that d is a metric. Point triviality and symmetry follow from the definition. It remains to prove the triangle inequality. There are three nontrivial cases. For the first case, let x, z ∈ X \ A. Then d(x, A) = d(x, A) = infy∈A d(x, y) 6 infy∈A{d(x, z)+ d(z, y)} = d(x, z)+ d(z, A) = d(x, z)+ d(z, A) and d(x, A) 6 d(x, A)+ d(z, A)+ d(z, A). Thus d(x, A) 6 d(x, z)+ d(z, A). For the second case, let x, y ∈ X \ A. Then d(x, y) = min(d(x, y), d(x, A)+ d(A, y)) 6 d(x, A)+ d(A, y)= d(x, A)+ d(A, y). UNIVERSALITY OF PERSISTENCE DIAGRAMS AND THE BOTTLENECK AND WASSERSTEIN DISTANCES 5

For the third case, let x, y, z ∈ X \ A. We want to show that d(x, y) 6 d(x, z)+ d(z, y) = min(d(x, z), d(x, A)+ d(A, z)) + min(d(z, y), d(z, A)+ d(A, y)). The right hand side four possible values. First, d(x, y) 6 d(x, y) 6 d(x, z)+ d(z, y). Second, d(x, y) 6 d(x, A)+ d(A, y) 6 d(x, z)+ d(z, A)+ d(A, y). Third, d(x, y) 6 d(x, A)+ d(A, y) 6 d(x, A)+ d(A, z)+ d(z, y). Fourth, d(x, y) 6 d(x, A)+ d(A, y) 6 d(x, A)+ d(A, z)+ d(z, A)+ d(A, y). Therefore d(x, y) 6 d(x, z)+ d(z, y). 

Lemma 3.7. Given a morphism f : (X, dX, A) → (Y, dY , B) of metric pairs, the induced map f : (X/A, dX, A) → (Y/B, dY, B) is a pointed metric map.

Proof. We will prove that f is a metric map. Let x ∈ X \ A. First we show that dY(f(x), B) 6 ′ ′ dX(x, A). Indeed, dY(f(x), B) = infy∈B dY(f(x), y) 6 infx′∈A dY(f(x), f(x )) 6 infx′∈A dX(x, x ) = ′ d(x, A). Then dY(f(x), f(A)) = dY(f(x), B) = dY(f(x), B) 6 dX(x, A) = dX(x, A). Next let x, x ∈ ′ ′ ′ ′ X \ A. Then dY(f(x), f(x )) = dY(f(x), f(x )) = min(dY(f(x), f(x )), dY(f(x), B)+ dY(B, f(x ))) 6 ′ ′ ′ min(dX(x, x ), dX(x, A)+ dX(A, x )) = dX(x, x ). 

Definition 3.8. Let Q : Metpairs → Met∗ be the functor that sends a metric pair (X, d, A) to the pointed metric space (X/A, d, A) and that sends f : (X, dX, A) → (Y, dY , B) to f : (X/A, dX, A) → (Y/B, dY, B).

Theorem 3.9. Met∗ is a reflective subcategory of Metpairs with left adjoint Q.

Proof. Let (X, dX, A) ∈ Metpairs and f : (X, dX, A) → (Y, dY, y0) ∈ Metpairs where y0 ∈ Y.

r (X, dX, A) (X/A, dX, A)

(3.1) ∃!f f

(Y, dY, y0)

Define the reflector r : (X, dX, A) → (X/A, dX, A) to be given by r(x) = A if x ∈ A and otherwise ′ ′ ′ r(x) = x. Let us show that r is a metric map. Let x, x ∈ X. If x, x 6∈ A then dX(rx, rx ) = ′ ′ ′ ′ ′ dX(x, x )= min(dX(x, x ), dX(x, A)+ dX(A, x)) 6 dX(x, x ). If x 6∈ A and x ∈ A then dX(rx, rx )= ′ dX(x, A)= dX(x, A) 6 dX(x, x ). By the commutativity of (3.1), we are forced to define f(A) = y0 and f(x) = f(x) if x 6∈ A. It remains to show that f is a metric map. If x ∈ X \ A then dY(f(x), f(A)) = dY(f(x), y0) = ′ ′ ′ ′ dY(f(x), f(x )) 6 dX(x, x ) for all x ∈ A. Thus dY(f(x), f(A)) 6 dX(x, A)= dX(x, A). If x, x ∈ X \ ′ ′ ′ ′ ′ A then dY(f(x), f(x )) = dY(f(x), f(x )) 6 dX(x, x ). Furthermore dY(f(x), f(x )) = dY(f(x), f(x )) 6 ′ ′ ′ ′ dY(f(x), y0)+ dY(y0, f(x )) 6 dX(x, A)+ dX(A, x ). Therefore dY(f(x), f(x )) 6 dX(x, x ). 

Definition 3.10. Let (X, d) be a metric space, x0 ∈ X, and p ∈ [1, ]. We say that the metric d ( ) 6 ( ( ) ( )) satisfies the p-strengthened triangle inequality with respect to x0 if d x, y d x, x0 , d x0, y p for p ∞ all x, y ∈ X. Let Met∗ denote the full subcategory of Met∗ consisting of those objects (X, d, x 0) for which (X, d) satisfies the p-strengthened triangle inequality with respect to x0. 1 Note that the 1-strengthened triangle inequality is just the triangle inequality. So Met∗ = Met∗. q p Also, for 1 6 p 6 q 6 , Met∗ is a full subcategory of Met∗.

Example 3.11. Let ∗ denote∞ the singleton set. Also let ∗ denote the pointed metric space (∗, 0, ∗). p p Then for all p ∈ [1, ], ∗∈ Met∗. In fact, it is the initial and terminal object in Met∗.

Definition 3.12. Let∞(X, d, A) be a metric pair and let p ∈ [1, ]. Define dp : X × X → [0, ] by ( ) := ( ( ) ( ( ) ( )) ) dp x, y min d x, y , d x, A , d∞A, y p . ∞

Lemma 3.13. Let p ∈ [1, ]. If (X, d, A) is a metric pair then so is (X, dp , A).

∞ 6 PETER BUBENIK AND ALEX ELCHESEN

Proof. Point triviality and symmetry follow from the definition. To show the triangle inequality, let x, y, z ∈ X. We want to show that

min(d(x, y), k(d(x, A), d(A, y))kp) 6 min(d(x, z), k(d(x, A), d(A, z))kp)

+ min(d(z, y), k(d(z, A), d(A, y))kp). The right hand side has four possible values. First, d(x, y) 6 d(x, z)+ d(z, y). Second,

k(d(x, A), d(A, y))kp 6 k(d(x, z)+ d(z, A), d(A, y))kp

= k(d(x, z), 0) + (d(z, A), d(A, y))kp 6 d(x, z)+ k(d(z, A), d(A, y))kp . Third,

k(d(x, A), d(A, y))kp 6 k(d(x, A), d(A, z)+ d(z, y))kp

= k(d(x, A), d(A, z)) + (0, d(z, y))kp 6 k(d(x, A), d(A, z))kp + d(z, y). Fourth,

k(d(x, A), d(A, y))kp 6 k(d(x, A), d(A, z), d(z, A), d(A, y))kp

= (k(d(x, A), d(A, z))kp , k(d(z, A), d(A, y))kp) p

6 k(d(x, A), d(A, z))kp + k(d(z, A), d(A, y))kp . The result now follows from these inequalities.  ′ Lemma 3.14. Let p ∈ [1, ]. If f : (X, d, x0) → (Y, d , y0) is a pointed metric map, then so is f : ′ (X, dp, x0) → (Y, dp, y0). ∞ ′ ′ ′ ′ ′ ′ ′ ′ Proof. Let x, x ∈ X. Then dp(f(x), f(x )) = min(d (f(x), f(x )), k(d (f(x), y0), d (y0, f(x )))kp) = ′ ′ ′ ′ ′ ′ ′ min(d (f(x), f(x )), k(d (f(x), f(x0)), d (f(x0), f(x )))kp) 6 min(d(x, x ), k(d(x, x0), d(x0, x ))kp) = ′ dp(x, x ).  p q Definition 3.15. Let 1 6 p 6 q 6 . Let Sp,q : Met∗ → Met∗ be the functor that sends (X, d, x0) ′ ′ to (X, dq, x0) and f : (X, d, x0) → (Y, d , y0) to f : (X, dq, x0) → (Y, dq, y0). We will also denote S1,p by Sp. ∞ q p Theorem 3.16. Let 1 6 p 6 q 6 . Met∗ is a reflective subcategory of Met∗ with left adjoint Sp,q. As p a special case, Met∗ is a reflective subcategory of Met∗ with left adjoint Sp. ∞ p ′ q ′ p Proof. Let (X, d, x0) ∈ Met∗, (Y, d , y0) ∈ Met∗ and f : (X, d, x0) → (Y, d , y0) ∈ Met∗. r (X, d, x0) (X, dq, x0)

(3.2) ∃!f f ′ (Y, d , y0) p Define the reflector r : (X, d, x0) → (X, dq, x0) ∈ Met∗ to be given by the identity map. It is a metric ′ ′ ′ map since for all x, x ∈ X, dq(x, x ) 6 d(x, x ). By the commutativity of (3.2), we are forced to define f = f. It remains to show that f is a metric map. Let x, x′ ∈ X. We have d′(f(x), f(x′)) 6 ′ ′ q d(x, x ) and, since (Y, d , y0) ∈ Met∗, ′( ( ) ( ′)) 6 ( ′( ( ) ) ′( ( ′))) d f x , f x d f x , y0 , d y0, f x q = ( ′( ( ) ( )) ′( ( ) ( ′))) 6 ( ( ) ( ′)) d f x , f x0 , d f x0 , f x q d x, x0 , d x0, x q . ′ ′ ′ Therefore d (f(x), f(x )) 6 dq(x, x ).  UNIVERSALITY OF PERSISTENCE DIAGRAMS AND THE BOTTLENECK AND WASSERSTEIN DISTANCES 7

4. COMMUTATIVE METRIC MONOIDS AND WASSERSTEIN DISTANCE 4.1. Commutative metric monoids. Definition 4.1. Let p ∈ [1, ]. A p-subadditive commutative metric monoid is a tuple (M, d, +, 0) where (M, d, 0) is a pointed metric space and (M, +, 0) is a commutative monoid such that for all a, b, a′, b′ ∈ M, ∞ ′ ′ 6 ′ ′ d(a + b, a + b ) (d(a, a ), d(b, b )) p .

A morphism of p-subadditive commutative metric monoids f : (M, d, + , 0) → (N, ρ, +, 0) is a pointed metric map f : (M, d, 0) → (N, ρ, 0) such that f : (M, +, 0) → (N, +, 0) is a monoid homomor- p phism. Call such a map a metric monoid homomorphism. Let CMon(Met∗) denote the category of p-subadditive commutative metric monoids and metric monoid homomorphisms. Lemma 4.2. Let p ∈ [1, ]. Let (M, d, +, 0) be a p-subadditive commutative metric monoid. Then for n > 0 and a1,..., an, b1,..., bn ∈ M, ∞ n d(a1 + · · · + an, b1 + · · · + bn) 6 k(d(ai, bi))i=1kp . Proof. The proof is by induction on n.

d(a1 + · · · + an+1, b1 + · · · + bn+1) 6 k(d(a1 + · · · + an, b1 + · · · + bn), d(an+1, bn+1))kp 6 ( ( ( ))n ( )) = ( ( ))n+1  k d ai, bi i=1kp , d an+1, bn+1 d ai, bi i=1 p . p

Corollary 4.3. Let p ∈ [1, ]. Let (M, d, +, 0) be a p-subadditive commutative metric monoid. Then for n > 0 and a1,..., an, b1,..., bn ∈ M, ∞ n d(a1 + · · · + an, b1 + · · · + bn) 6 min (d(ai, bσ(i)))i=1 , σ∈Σ p n where Σn denotes the symmetric group on n symbols. Lemma 4.4. Let p ∈ [1, ]. Let (M, d, +, 0) be a p-subadditive commutative metric monoid. Then p (M, d, 0) ∈ Met∗. Furthermore if f : (M, d, +, 0) → (N, ρ, +, 0) is a morphism of commutative metric p p monoids then f : (M, d, 0) →∞ (N, ρ, 0) ∈ Met∗. That is, there is a forgetful functor U : CMon(Met∗) → p Met∗. Proof. For the first statement, we show that (M, d, 0) satisfies the p-strengthened triangle inequal- ity at 0. Let a, b ∈ M. Then d(a, b)= d(a + 0, 0 + b) 6 k(d(a, 0), d(0, b))kp. The second statement follows directly from the definitions.  4.2. Symmetric monoidal categories.

Definition 4.5. Let p ∈ [1, ]. Given pointed metric spaces (X, dX, x0) and (Y, dY, y0), define dX ×p dY : (X × Y) × (X × Y) → [0, ] by ∞ (d × d ) (x y) (x′ y′) = (d (x x′) d (y y′)) X p Y ∞, , , X , , Y , p .  Let X ×p Y denote the tuple (X × Y, dX ×p dY, (x0, y 0)).

Lemma 4.6. Let p ∈ [1, ]. If X = (X, dX, x0) and Y = (Y, dY, y0) are pointed metric spaces then so is X ×p Y. ∞ Proof. We show that dX ×p dY is a metric for X × Y. Point triviality and symmetry follow from the corresponding properties for dX and dY. It remains to prove the triangle inequality. For all (x, y), (x′, y′), (x′′, y′′) ∈ X × Y, ′ ′ 6 ′′ ′′ ′ ′′ ′′ ′ (dX(x, x ), dY(y, y )) p (dX(x, x )+ dX(x , x ), dY(y, y )+ dY(y , y )) p ′′ ′′ ′′ ′ ′′ ′ = (dX(x, x ), dY(y, y )) + (dX(x , x ), dY(y , y )) p 6 ( ( ′′) ( ′′)) + ( ( ′′ ′) ( ′′ ′))  dX x, x , dY y, y p dX x , x , dY y , y p .

8 PETER BUBENIK AND ALEX ELCHESEN

Lemma 4.7. A p-subadditive commutative metric monoid is a tuple (M, d, +, 0) where (M, d, 0) is a pointed metric space and (M, +, 0) is a commutative monoid such that +: M ×p M → M is a metric map.

Proof. Consider (M, d, +, 0) where (M, d, 0) is a pointed metric space and (M, +, 0) is a commu- ′ ′ tative monoid. + : M ×p M → M is a metric map if and only if for all (a, b), (a , b ) ∈ M × M, ′ ′ ′ ′ d(a + b, a + b ) 6 kd(a, a ), d(b, b )kp.  p p Lemma 4.8. Let p ∈ [1, ]. If X = (X, dX, x0), Y = (Y, dY , y0) ∈ Met∗ then X ×p Y ∈ Met∗.

Proof. We show that d∞X ×p dY satisfies the p-strengthened triangle inequality with respect to ′ ′ (x0, y0). For all (x, y), (x , y ) ∈ X × Y,

′ ′ ′ ′ (dX(x, x ), dY(y, y )) 6 ( (dX(x, x0), dX(x0, x )) , (dY (y, y0), dY(y0, y )) ) p p p p

′ ′ = (dX(x, x0), dX(x0, x ), dY(y, y0), dY(y0, y )) p

= ( ( ( ) ( )) ( ( ′) ( ′)) )  k dX x, x0 , dY y, y0 kp , dX x0, x , dY y0, y p . p

Proposition 4.9. For each p ∈ [1, ], (Met∗, ×p, ∗) is a symmetric monoidal category. ′ ′ ′ Proof. For the associator, consider∞X, Y, Z ∈ Met∗ and x, x ∈ X, y, y ∈ Y and z, z ∈ Z. Then

(( ) )((( ) ) (( ′ ′) )) = (( )(( ) ( ′ ′)) ( ′)) dX ×p dY ×p dZ x, y , z , x , y , z dX ×p dY x, y , x , y , dZ z, z p

′ ′ ′ ′ ′ ′ = ( (dX(x, x ), dY(y, y )) p , dZ(z, z )) = (dX(x, x ), dY(y, y ), dZ(z, z )) p . p

′ ′ ′ For the left unitor consider X ∈ Met∗ and x, x ∈ X. Then k(dX(x, x ), 0)kp = dX(x, x ). With these computations in hand, the rest of the axioms are easy to check. 

p Corollary 4.10. For each p ∈ [1, ], (Met∗, ×p, ∗) is a symmetric monoidal category, which we denote p by Met∗. ∞ p Let CMon(Met∗, ×p, ∗) and CMon(Met∗) denote the categories of commutative monoids in- p ternal to the symmetric monoidal categories (Met∗, ×p, ∗) and Met∗, respectively. The following proposition shows that this notation is consistent with Definition 4.1 and that these categories are in fact the same. p Proposition 4.11. A commutative monoid in the symmetric monoidal category Met∗ is a p-subadditive p commutative metric monoid and a morphism of commutative monoids in Met∗ is morphism of p-subadditive p commutative metric monoids. Moreover, CMon(Met∗, ×p, ∗)= CMon(Met∗).

p Proof. A commutative monoid in the symmetric monoidal category Met∗ is a pointed metric space p (M, d, m0) ∈ Met∗ together with a binary operation +: M × M → M that is associative, commu- p tative, and for which m0 is a unit, such that +: M ×p M → M ∈ Met∗. That is, + is p-subadditive. p Thus a commutative monoid in Met∗ is a p-subadditive commutative metric monoid. p A morphism f : (M, d, +M, m0) → (N, ρ, +N, n0) of commutative monoids in Met∗ is a mor- p phism f : (M, d, m0) → (N, ρ, n0) ∈ Met∗ such that for all a, b ∈ M, f(a +M b)= f(a)+N f(b) and f(m0)= n0. That is, f : (M, d, m0) → (N, ρ, n0) ∈ Met∗ such that f : (M, +M, m0) → (N, +N, n0) is a monoid homomorphism. p To see that CMon(Met∗, ×p, ∗)= CMon(Met∗), note that is suffices to require that (M, d, m0) ∈ Met∗, since the unit condition and p-subadditivity implies that for a, b ∈ M, d(a, b) = d(a + m0, m0 + b) 6 k(d(a, m0), d(m0, b))kp.  UNIVERSALITY OF PERSISTENCE DIAGRAMS AND THE BOTTLENECK AND WASSERSTEIN DISTANCES 9

4.3. Wasserstein distance. Given a set pair (X, A), recall that D(X, A)= D(X)/D(A). As a special case, for a pointed set (X, x0), D(X, x0)= D(X)/D(x0).

Definition 4.12. Let p ∈ [1, ]. Given a metric pair (X, d, A) define Wp[d, A]: D(X, A) × D(X, A) → [0, ] by ∞ ′ ′ ′ m+n ∞ Wp[d, A](x1 + · · · + xm, x1 + · · · + xn)= inf (d(xk, xσ(k)))k=1 , p ′ ′ where the infimum is taken over xm+1,..., xm+n, xn+1,... xn+m ∈ A and σ ∈ Σm+n, where Σm+n denotes the symmetric group on m + n symbols. One may check that Definition 4.12 may be restated as follows. Lemma 4.13.

′ ′ ′ m+n Wp[d, A](x1 + · · · + xm, x + · · · + x )= min (d(xk, x )) , 1 n ∈ σ(k) k=1 σ Σm+n p

′ ′ where xm+1 = · · · = xm+n = A = xn+1 = · · · xn+m and d(x, A)= infa∈A d(x, a).

For brevity, we will sometimes denote Wp[d, A] by Wp. Remark 4.14. Note that D(X, A) =∼ D(X\A) =∼ D(X/A, A). Explicitly, we have monoid iso- morphisms ϕ : D(X\A) → D(X, A) and ψ : D(X\A) → D(X/A, A) given by x1 + · · · + xn 7→ x1 + · · · + xn + D(A) and x1 + · · · + xn 7→ [x1]+ · · · + [xn]+ D(A), respectively. By Lemma 4.24 below, we have that (D(X, A), Wp[d, A], +, 0) and (D(X \ A, A), Wp[dp, A], +, 0) are isometrically isomorphic, and so we may pass between the settings of metric pairs and pointed metric spaces whenever convenient. R2 R2 Example 4.15. For the metric pair ( 6, d, ∆) or ( 6, d, ∆) (Example 3.2) and p ∈ [1, ], Wp[d, ∆] is the p-Wasserstein distance on persistence diagrams. For the metric pair (Int(R), d, ∅) and d the ∞ length of the symmetric difference (Example 3.4), W1[d, ∅] is the barcode metric.

Lemma 4.16. Let p ∈ [1, ]. If (X, d, x0) is a pointed metric space then (D(X, x0), Wp, 0) is a pointed metric space. ∞ Proof. Point triviality and symmetry follow from the definition. To prove the triangle inequality, let ′ ′ ′′ ′′ α = x1 + · · · + xn, β = x1 + · · · + xm, γ = x1 + · · · + xp, be elements of D(X, x0). Let r = n + m + p ′ ′ ′′ ′′ and let xn+1 = · · · = xr = xm+1 = · · · = xr = xp+1 = · · · = xr = x0. Let σ, τ ∈ Sr be permutations realizing Wp(α, γ), Wp(γ, β), respectively. Let π = τ ◦ σ ∈ Sr. Then ( ) 6 ( ′ ) r Wp α, β d xk, xπ(k) k=1 p ′′ r ′′ ′ r 6 ( ) + ( ) d xk, xσ(k) k=1 d xσ(k), xπ(k) k=1 p ′′ r ′′ ′ r 6 ( ) + (  ) d xk, xσ(k) k=1 p d xσ(k), xπ(k) k=1 p ′′ r ′′ ′ r = ( ) + (  ) d xk, xσ(k) k=1 p d xσ(σ−1(ℓ)), xπ(σ−1( ℓ)) ℓ=1 p ′′ r ′′ ′ r = ( ) + ( ) =  ( )+ ( )  d xk, xσ(k) k=1 p d xℓ , xτ(ℓ) ℓ=1 p Wp α, γ Wp γ, β .  

Lemma 4.17. Let p ∈ [1, ]. If (X, d, x0) is a pointed metric space then (D(X, x0), Wp, +, 0) is a p- p subadditive commutative metric monoid and hence is an object in CMon(Met∗). ∞ ′ Proof. Let α, β, γ, δ ∈ D(X, x0), where α = x1 + · · · + xm, β = xm+n+1 + · · · + xm+n+p, γ = x1 + ′ ′ 6 · · · + xn, δ = xm+n+1 + · · · + xm+n+q. Wewanttoshowthat Wp(α + β, γ + δ) k(Wp(α, γ), Wp(β, δ))kp. ′ ′ ′ Let xm+1 = · · · = xm+n = xm+n+p+1 = xm+n+p+q = xn+1 = · · · = xm+n = xm+n+q+1 = 10 PETER BUBENIK AND ALEX ELCHESEN

′ xm+n+p+q = x0. Given σ ∈ Σm+n and τ ∈ Σp+q, let σ ∗ τ ∈ Σm+n+p+q be defined by σ ∗ τ(i) := σ(i) if i 6 m + n and σ ∗ τ(i) := τ(i) otherwise. Then

′ m+n ′ k(Wp(α, γ), Wp(β, δ))k = min (d(xi, x )) , min (d(xm+n+i, x )) p ∈ σ(i) i=1 ∈ m+n+τ(i) σ Σm+n p τ Σp+q p p

′ m+n+p+q = min min (d(xi, x ∗ )) ∈ ∈ σ τ(i) i=1 σ Σm+n τ Σp+q p

′ m+n+p+q > min (d(xi, x )) = Wp(α + β, γ + δ).  ∈ π(i) i=1 π Σm+n+p+q p

p →֒ (Lemma 4.18. Let p ∈ [1, ]. Let (X, d, x0) ∈ Met∗. Then the inclusion map i : (X, d, x0 (D(X, x0), Wp[d, x0], 0) is an . ∞ Proof. Let x, y ∈ X. Wp[d, x0](x, y)= min d(x, y), k(d(x, x0), d(x0, y))kp = d(x, y).    ′ Lemma 4.19. Let p ∈ [1, ]. Given a pointed metric map f : (X, d, x0) → (Y, d , y0), the induced map f∗ : D(X, x0) → D(Y, y0) is a morphism if p-subadditive commutative metric monoids f∗ : (D(X, x0), ∞ ′ Wp[d, x0], +, 0) → (D(Y, y0), Wp[d , y0], +, 0). ′ Proof. By Definition 4.1, we need to show that f∗ : (D(X, x0), Wp[d, x0]) → (D(Y, y0), Wp[d , y0]) is a metric map and that f∗ : (D(X, x0), +, 0) → (D(Y, y0), +, 0) is a monoid homomorphism. The ′ ′ latter is true by the definition of f∗ (Definition 2.2). Let x1 + · · · + xm, x1 + · · · + xn ∈ D(X, x0). Let ′ ′ xm+1 = · · · = xm+n = x0 = xn+1 = · · · = xn+m and thus f(xm+1) = · · · = f(xm+n) = y0 = ′ ′ f(xn+1)= · · · = f(xn+m). Then

′ ′ ′ ′ ′ m+n Wp[d , y0](f(x1)+ · · · + f(xm), f(x )+ · · · + f(x )) = min (d (f(xi), f(x ))) 1 n ∈ σ(i) i=1 σ Σm+n p

′ m+n ′ 6 min (d(xi, x )) = Wp[d, x0](x1 + · · · + xm, x + · · · + xn).  ∈ σ(i) i=1 1 σ Σm+n p

p p Definition 4.20. Let p ∈ [1, ]. Let Dp : Met∗ → CMon(Met∗) be the functor given by sending ′ (X, d, x0) to (D(X, x0), Wp, +, 0) and f : (X, d, x0) → (Y, d , y0) to f∗ : (D(X, x0), Wp[d, x0], +, 0) → ′ ∞ (D(Y, y0), Wp[d , y0], +, 0). p p Theorem 4.21. Let p ∈ [1, ]. The forgetful functor U : CMon(Met∗) → Met∗ has left adjoint Dp. p p p Proof. Let (X, d, x0) ∈ Met∞∗, (N, ρ, +, 0) ∈ CMon(Met∗) and ϕ : (X, d, x0) → (N, ρ, 0) ∈ Met∗. i (X, d, x0) (D(X, x0), Wp[d, x0], 0) (D(X, x0), Wp[d, x0], +, 0)

(4.1) ∃ ϕ ϕ˜ !ϕ ˜ (N, ρ, 0) (N, ρ, +, 0) By the commutativity of the left hand side of (4.1), we have that for all x ∈ X,ϕ ˜ (x) = ϕ˜ (i(x)) = ϕ(x). Forϕ ˜ to be a monoid homomorphism, we haveϕ ˜ (x1 + · · · + xn) = ϕ(x1)+ · · · + ϕ(xn). Thus,ifϕ ˜ exists it is unique. It remains to show thatϕ ˜ is a metric map. ′ ′ Let α = x1 + · · · + xm ∈ D(X, x0), β = x1 + · · · + xn ∈ D(X, x0) and let xm+1 = · · · = xm+n = ′ ′ x0 = xn+1 = · · · = xn+m. Then ′ ′ ρ(ϕ˜ (α),ϕ ˜ (β)) = ρ(ϕ(x1)+ · · · + ϕ(xm+n), ϕ(x1)+ · · · + ϕ(xm+n)) ′ m+n ′ m+n 6 min (ρ(ϕ(xi), ϕ(xi))) = 6 min (d(xi, xi)) = = Wp[d, x0](α, β).  σ∈Σ i 1 p σ∈Σ i 1 p m+n m+n p Definition 4.22. Let U : CMon(Met∗) → Metpairs be the functor given by sending (M, d, +, 0) to (M, d, {0}) and f : (M, d, +, 0) → (N, ρ, +, 0) to f : (M, d, {0}) → (N, ρ, {0}). UNIVERSALITY OF PERSISTENCE DIAGRAMS AND THE BOTTLENECK AND WASSERSTEIN DISTANCES 11

p Definition 4.23. Let Dp : Metpairs → CMon(Met∗) be the functor given by sending (X, d, A) to ′ (D(X, A), Wp[d, A], +, 0) and f : (X, d, A) → (Y, d , B) to f∗ : (D(X, A), Wp[d, A], +, 0) → (D(Y, B), ′ Wp[d , B], +, 0). p Recall the functors Q : Metpairs → Met∗ of Definition 3.8 and Sp : Met∗ → Met∗ of Definition 3.15. p p Lemma 4.24. The functors Dp : Metpairs → CMon(Met∗) and DpSpQ : Metpairs → CMon(Met∗) are naturally isomorphic.

Proof. Let (X, d, A) ∈ Metpairs. Then Dp(X, d, A) = (D(X, A), Wp[d, A], +, 0) and DpSpQ(X, d, A)= (D(X/A, A), Wp[dp, A], +, 0). Recall (see Remark 4.14) that we have monoid ϕ = ϕX : D(X \ A) → D(X, A) and ψ = ψX : D(X \ A) → D(X/A, A). Let η = ηX : D(X, A) → −1 D(X/A, A) be the composite monoid isomorphism ψXϕX . We will show that ηX is a isometry. ′ ′ ′ Let x1 + · · · + xm, x1 + · · · + xn ∈ D(X \ A). Denote these elements by α and α , respectively. Let ′ ′ xm+1 = · · · = xm+n = xn+1 = xn+m = A. By Lemma 4.13, ′ m+n Wp[d, A](ϕα, ϕα )= min (d(xi, xσ(i))) = . σ∈Σ i 1 p m+n On the other hand, ′ m+n Wp[dp, A](ψα, ψα )= min (dp(xi, xσ(i))) = . σ∈Σ i 1 p m+n ′ ′ Note that by definition of dp, Wp[dp, A](ψα, ψα ) 6 Wp[d, A](ϕα, ϕα ). On the other hand, if σ ∈ Σ W [d A](ψα ψα′) = (d (x x ))m+n 0 n+m is a permutation such that p p, , p i, σ0(i) i=1 p, then we ′ m +n m+n can obtain a new permutation σ ∈ Σn+m with k(d(x , x ′ )) kp = (dp(x , x )) . 0 i σ0(i) i= 1 i σ0 (i) i=1 p ′ ′ Thus Wp[dp, A](ψα, ψα )= Wp[d, A](ϕα, ϕα ). Then ′ −1 −1 ′ −1 −1 ′ ′ Wp[dp, A](ηα, ηα )= Wp[dp, A](ψϕ α, ψϕ α )= Wp[d, A](ϕϕ α, ϕϕ α )= Wp[d, A](α, α ).

Thus we have an isomorphism ηX : Dp(X, d, A) → DpSpQ(X, d, A). To see that these isomorphisms are natural, let f : (X, d, A) → (Y, d′, B) be a morphism in Metpairs. The map Dpf = f∗ : D(X, A) → D(Y, B) is given by x1 + · · · + xn + D(A) 7→ f(x1)+ · · · + f(xn)+ D(B), while the map DpSpQf : D(X/A, A) → D(Y/B, B) is given by x1 + · · · + xn + D(A) 7→ f(x1)+ · · · + f(xn)+ D(B). Thus DpSpQfηX = ηYDpf and hence the maps ηX assemble into a natural isomorphism η : Dp ⇒ DpSpQ.  p Theorem 4.25. The forgetful functor U : CMon(Met∗) → Metpairs has left adjoint Dp. ֒ ֒ p U p Proof. Since U is given by the composition CMon(Met∗) −→ Met∗ → Met∗ → Metpairs, by Theo- rems 3.9, 3.16, and 4.21, it has left adjoint the composite DpSpQ. The composite DpSpQ is given by the mapping (X, d, A) 7→ (X/A, d, A) 7→ (X/A, dp, A) 7→ (D(X/A, A), Wp[dp, A], +, 0). By Lemma ∼ 4.24, Dp = DpSpQ and hence Dp is, up to natural isomorphism, the left adjoint of U. 

5. APPLICATIONS

5.1. Maximality of the Wasserstein distances. The following theorem shows that Wp is the largest p-additive metric extending the underlying metric.

Theorem 5.1. Let p ∈ [1, ] and let (X, d, A) be a metric pair. Then Wp[d, A] is the largest p-subadditive ∗ metric ρ on D(X, A) satisfying i ρ = dp. ∞ ∗ Proof. Suppose that ρ is a p-subadditive metric on D(X, A) with i ρ = dp. Then (D(X, A), ρ, +, 0) ∈ p CMon(Met∗) and i : (X, d, A) ֒→ (D(X, A), ρ, +, 0) is 1-Lipschitz. By Theorem 4.25, there is a unique 1-Lipschitz map i˜ : (D(X, A), Wp[d, A], 0) → (D(X, A), ρ, 0), and hence ρ 6 Wp.  12 PETER BUBENIK AND ALEX ELCHESEN

p Corollary 5.2. Let p ∈ [1, ] and let (X, d, x0) ∈ Met∗. Then Wp[d, x0] is the largest p-subadditive ∗ metric ρ on D(X, x0) satisfying i ρ = d. ∞ 5.2. Converse stability. We show that certain converse stability theorems follow from our results. First, a completely formal (or “soft” [BdSS15]) converse stability result.

Theorem 5.3 (Abstract Converse Stability). Fix p ∈ [1, ]. Let (X, x0) be a pointed set and let ρ be a ∗ p-subadditive metric on D(X, x0). Then ρ 6 Wp[i ρ, x0]. ∞ ∗ Proof. Let d = i ρ and consider the pointed metric space (X, d, x0). Since ρ is p-subadditive by assumption and i∗ρ = d by definition, the result immediately follows from Corollary 5.2. 

Example 5.4 (Converse Algebraic Stability). (See [Les15] for a version of this result that applies R to all pointwise finite dimensional persistence modules.) Let Vect(K)Fin denote the monoid of isomorphism classes of persistence modules which decompose as a finite direct sum of interval R R modules. We can identify Vect(K)Fin with D(Int( ), ∅) via the map that sends a direct sum of R interval modules to the corresponding formal sum of intervals. Equip Vect(K)Fin with the inter- + leaving distance dI [CCSG 09, Les15, BS14]. Note that dI is -subadditive. Indeed, if (ϕ, ψ) is an ǫ-interleaving between M and N and (ϕ′, ϕ′) is an η-interleaving between M′ and N′, then (ϕ ⊕ ϕ′, ψ ⊕ ψ′) is a max(ǫ, η)-interleaving between M ⊕ M′ and∞ N ⊕ N′. Note that the interleav- ing distance for interval modules, is (dH) , the -strengthening of the Hausdorff distance with respect to ∅. That is, i∗d = (d ) , and hence by Theorem 5.3, d 6 W [(d ) , ∅]= W [d , ∅]. I H ∞ I H H ∞ Vect(K)R For a second version of this result,∞ introduce an equivalence relation∞ on ∞ Fin∞given by R R2 M ∼ N if dI(M, N) = 0. Then we can identify Vect(K)Fin/ ∼ with D( 6, ∆) via the map that sends a direct sum of interval modules to the corresponding persistence diagram. By Theorem 5.3, dI 6 W [d, ∆], where d is the ℓ -distance. The distance W [d, ∆] is the bottleneck distance. Note that this distance restricted to the∞ images of interval modules is d , the -strengthening of the ∞ ∞ ℓ -distance. ∞ ∞ ∞ Example 5.5 (Converse Algebraic Stability Theorem for generalized persistence modules). Con- sider generalized persistence modules M : P → A. If P is equipped with certain additional struc- ture, such as a subadditive projection on translations or a superadditive family of translations, then AP can be equipped with an interleaving distance dI [BdSS15]. As in Example 5.4, the interleaving distance dI is -subadditive. Let Ind be a set of indecomposable generalized persistence modules in AP with basepoint the zero module 0. Then we have the set of generalized barcodes D(Ind,0). There is a ∞ from the set of isomorphism classes of generalized persistence modules in AP that are isomorphic to a finite direct sum of elements of Ind to D(Ind, 0), which sends direct sums to formal sums. By Theorem 5.3, dI 6 W [dI, 0], where the latter is also called the bottleneck distance [Bje16]. ∞ 5.3. Kantorovich-Rubinstein duality. Theorem 1.3 can be used to derive, in the case of persis- tence diagrams, one direction of Kantorovich-Rubinstein Duality. Let (X, d, x0) ∈ Met∗ and consider the commutative metric monoid (R, | · |, +, 0), where | · | de- notes the metric induced by absolute value. The inequality |(a + b) − (c + d)| 6 |a − c| + |b − d| implies that (R, | · |, +, 0) ∈ CMon(Met∗). Let h : X → R be a 1-Lipschitz map. Define k : X → R by k(x) = h(x)− h(x0) for all x ∈ X. Then k(x0) = 0 and |k(x)− k(y)| = |h(x)− h(x0) − (h(y)− h(x0))| = |h(x)− h(y)| 6 d(x, y) so that k is a pointed metric map. By Theorem 1.3, there is a unique morphism of commutative metric monoids k˜ : (D(X, x0), W1, +, 0) → (R, | · |, +, 0) such ˜ ˜ n m that k ◦ i = k. Explicitly, k is given by i ci 7→ i k(ci). Then for α = i=1 ai and β = j=1 bj ˜ ˜ P˜ n P ˜ m Pn m P with m > n, we have |k(α)− k(β)| = k ( i=1 ai) − k j=1 bj = i=1 k(ai)− j=1 k(bj) =   P P P P

UNIVERSALITY OF PERSISTENCE DIAGRAMS AND THE BOTTLENECK AND WASSERSTEIN DISTANCES 13

n m ˜ i=1 h(ai)− j=1 h(bj) + (m − n)h(x0) . Since k is 1-Lipschitz, we have the following inequal-

P n P m n m ity: i=1 h(ai)− j=1 h(bj) + (m − n)h (x0) 6 W1 i=1 ai, j=1 bj . Therefore

P P P P  n m n m (5.1) sup h(a )− h(b ) + (m − n)h(x ) h : X → R, 1-Lipschitz 6 W a , b , i j 0 1 i j Xi=1 Xj=1 Xi=1 Xj=1 or equivalently, n m n m sup k(a )− k(b ) k : X → R, k(x )= 0, 1-Lipschitz 6 W a , b . i j 0 1 i j Xi= Xj= Xi= Xj= 1 1 1 1

This inequality is in fact an equality, a result known as Kantorovich-Rubinstein duality. To see this, let α = a1 + · · · + an, β = b1 + · · · + bm ∈ D(X, x0) and consider the classical 1-Wasserstein n m distance w1( i=1 δai + (r − n)δx0 , i=1 δbj + (r − m)δx0 ), where δx is the Dirac measure at x and r = m + n. ItP is known that for sumsP of Dirac measures the computation of w1 is equivalent to the n ˜ m linear assignment problem. In other words, lettingα ˜ = i=1 δai + (r − n)δx0 and β = i=1 δbj +

(r − m)δx0 , we have P P ˜ n+m w1 α˜ , β = min (d(ai, bσ(i)) = ) = W1[d, x0](α, β), σ∈S i 1 1  n+m where an+1 = · · · = an+m = bm+1 = · · · = bn+m = x0. It follows from Kantorovich-Rubinstein duality for measures [Vil03] that

(5.2) sup hd(α˜ − β˜ ) | h : X → R, 1-Lipschitz = w1(α˜ , β˜ )= W1[d, x0](α, β). ZX Since the left-hand side of (5.2) is precisely the left-hand side of (5.1), we obtain the desired equal- ity. For a direct proof of Kantorovich-Rubinstein duality in this setting using linear programming see [BE20, Appendix C].

REFERENCES [BdSS15] Peter Bubenik, Vin de Silva, and Jonathan Scott. Metrics for generalized persistence modules. Found. Com- put. Math., 15(6):1501–1531, 2015. [BE20] Peter Bubenik and Alex Elchesen. Universality of persistence diagrams and the bottleneck and wasserstein distances. arXiv preprint arXiv:1912.02563v2, 12 2020. [Bje16] H˚avard Bakke Bjerkevik. Stability of higher-dimensional interval decomposable persistence modules. arXiv preprint arXiv:1609.02086, 2016. [BL17] Andrew J Blumberg and Michael Lesnick. Universality of the homotopy interleaving distance. arXiv preprint arXiv:1705.01690, 2017. [BL18] Magnus Bakke Botnan and Michael Lesnick. Algebraic stability of zigzag persistence modules. Algebr. Geom. Topol., 18(6):3133–3204, 2018. [BLM20] Ulrich Bauer, Claudia Landi, and Facundo M´emoli. The reeb graph edit distance is universal. Found. Com- put. Math., pages 1–24, 2020. [BS14] Peter Bubenik and Jonathan A. Scott. Categorification of persistent homology. Discrete Comput. Geom., 51(3):600–627, 2014. [BSS18] Peter Bubenik, Jonathan Scott, and Donald Stanley. An algebraic wasserstein distance for generalized persistence modules. arXiv preprint arXiv:1809.09654, 2018. [CCSG+09] Fr´ed´eric Chazal, David Cohen-Steiner, Marc Glisse, Leonidas J. Guibas, and Steve Y. Oudot. Proximity of persistence modules and their diagrams. Proceedings of the 25th annual symposium on Computational geometry - SCG ’09, 2009. [CO20] J´er´emy Cochoy and Steve Oudot. Decomposition of exact pfd persistence bimodules. Discrete Comput. Geom., 63(2):255–293, 2020. [CSEH07] David Cohen-Steiner, Herbert Edelsbrunner, and John Harer. Stability of persistence diagrams. Discrete Comput. Geom., 37(1):103–120, 2007. 14 PETER BUBENIK AND ALEX ELCHESEN

[CSEHM10] David Cohen-Steiner, Herbert Edelsbrunner, John Harer, and Yuriy Mileyko. Lipschitz functions have Lp- stable persistence. Found. Comput. Math., 10(2):127–139, 2010. [CZCG04a] Gunnar Carlsson, Afra Zomorodian, Anne Collins, and Leonidas Guibas. Persistence barcodes for shapes. In SGP ’04: Proceedings of the 2004 Eurographics/ACM SIGGRAPH symposium on Geometry processing, pages 124–135, New York, NY, USA, 2004. ACM Press. [CZCG04b] Anne Collins, Afra Zomorodian, Gunnar Carlsson, and Leonidas J. Guibas. A barcode shape descriptor for curve point cloud data. Computers & Graphics, 28(6):881 – 894, 2004. [dFL10] Michele d’Amico, Patrizio Frosini, and Claudia Landi. Natural pseudo-distance and optimal matching between reduced size functions. Acta Appl. Math., 109(2):527–554, 2010. [DL21] Vincent Divol and Th´eo Lacombe. Understanding the topology and the geometry of the space of persis- tence diagrams via optimal partial transport. J. Appl. Comput. Topol., 5(1):1–53, 2021. [Les15] Michael Lesnick. The theory of the interleaving distance on multidimensional persistence modules. Found. Comput. Math., 15(3):613–650, 2015. [Rie17] E.Riehl. Category Theory in Context. Aurora: Dover Modern Math Originals. Dover Publications, 2017. [Vil03] C´edric Villani. Topics in optimal transportation, volume 58 of Graduate Studies in Mathematics. American Mathematical Society, Providence, RI, 2003.