This equation is an adapted version of the very well-known Kantorovich-Rubinstein formula, which is itself a particular version in the case $p=1$ of the duality formula in optimal transport, see for example [64, Theorem 5.10] and [54, Theorem 1.39]. A proof of Eq. (29) would require to introduce several optimal transport notions. The interested reader can consult Proposition 2.3 in [28] for details.

## 5.2 Convergence of random persistence measures in the thermodynamic regime

Geometric probability is the study of geometric quantities arising naturally from point processes in $\mathbb{R}^d$. Recently, several works [6, 25, 35, 32, 57] used techniques originating from this field to understand the persistent homology of such point processes. Let $X_n := \{X_1, \dots, X_n\}$ be a $n$-sample of a distribution having some density on the cube $[0, 1]^d$, bounded from below and above by positive constants. Extending the work of Hiraoka, Shirai and Trinh [35], Divol and Polonik [25] show laws of large numbers for the persistence diagrams Dgm($X_n$) of $X_n$, built with either the Čech or Rips filtration. More precisely, [25, Theorem 5] states that there exists a Radon measure $\mu$ on $\Omega$ such that, almost surely, the sequence of measures $\mu_n := n^{-1}\text{Dgm}(n^{1/d}X_n)$ converges vaguely to $\mu$ and [25, Theorem 6] implies that $\text{Pers}_p(\mu_n)$ converges to $\text{Pers}_p(\mu) < \infty$ for all $p \ge 1$. Those two facts (vague convergence and convergence of the total persistence), along with Theorem 3.4, gives the following result:

**Proposition 5.3.** $\text{OT}_p(\mu_n, \mu) \xrightarrow{n \to \infty} 0$ almost surely.

**Numerical illustration of the convergence in the one-dimensional case.**
In dimension $d \ge 2$, there is no known closed-form expression for the limit $\mu$. However, in the case $d=1$, authors in [25, Remark 2 (b)] show that if the $X_i$ are $n$ i.i.d realizations of a random variable $X$ admitting a density $\kappa$ supported on $[0, 1]$, bounded from below and above by positive constants, then (the ordinate of) $\mu$—which is supported on $\{0\} \times (0, +\infty)$ as we consider the Rips filtration in homology dimension 0—admits $\varphi(u) := \text{E}_{X\sim\kappa}[\exp(-u\kappa(X))]$ as density. In particular, if $X$ is uniform, then (the ordinate of) $\mu$ admits $u \mapsto e^{-u}$ as density.

It allows us to realize a simple numerical experiment: we sample $n$ points $(X_1, \dots, X_n)$ uniformly on $[0, 1]$ and then compute the corresponding persistence diagram using the Rips filtration, whose points are denoted by $(0, t_1), \dots, (0, t_{n-1})$ (note that we removed the point $(0, +\infty)$). We can now introduce the one-dimensional measure $\mu_n = \frac{1}{n} \sum_{k=1}^{n-1} \delta_{t_k}$ and compute $\text{OT}_p(\mu_n, \mu)$ in closed form using Proposition 3.7 and the fact that computing the distance $W_p$ in dimension $d=1$ is particularly easy (see [54, Chapter 2]). See Figure 6 for an illustration.

## 5.3 Stability of the expected persistence diagrams

Given an i.i.d. sample of $N$ persistence diagrams $a_1 \dots a_N$, a natural persistence measure to consider is their linear sample mean $\bar{a} := \frac{1}{N} \sum_{1 \le i \le N} a_i$. More generally, given $P \in \mathcal{W}^p(\mathcal{M}^p)$, and $\mu \sim P$, one may want to define $\text{E}[\mu]$ the linear expectation of $P$ in the same vein. A well-suited definition of the linear expectation requires technical care (basically, turning the finite sum into a
<figure><img src="image_12.png" /><figcaption>Figure 6: Numerical illustration of $D_p$ convergence in the one dimensional case. From left to right: an example of input point cloud with $n = 20$ points; the corresponding persistence diagram; the (ordinate of) the two measures we compare: $\mu_n$ is the empirical one. Most right: median $\text{OT}_p(\mu_n, \mu)$ for $n = 2...50$, over 100 runs along with 90% and 10% percentiles. Computations made with $p = 2$.</figcaption></figure>

Bochner integral) and is detailed in Appendix D. It however satisfies the natural following characterization—that is sufficient to understand this section:

$$ \forall K \subset \Omega \text{ compact, } \mathbb{E}[\mu](K) = \mathbb{E}[\mu(K)]. \quad (30) $$

The behavior of such measures is studied in [24], which shows that they have densities with respect to the Lebesgue measure in a wide variety of settings. A natural question is the stability of the linear expectations of random diagrams with respect to the underlying phenomenon generating them. The following proposition gives a positive answer to this problem, showing that given two close probability distributions $P$ and $P'$ supported on $M^p$, their linear expectations are close for the metric $\text{OT}_p$.

**Proposition 5.4.** Let $P, P' \in W^p(M^p)$. Let $\mu \sim P$ and $\mu' \sim P'$. Then, we have $\text{OT}_p(\mathbb{E}[\mu], \mathbb{E}[\mu']) \le W_{p,\text{OT}_p}(P, P')$.

The proof is postponed to Appendix D.

Using stability results on the distances $d_p (= \text{OT}_p)$ between persistence diagrams [22], one is able to obtain a more precise control between the expectations in some situations. For $\mathbb{Y}$ a sample in some metric space, denote by $\text{Dgm}(\mathbb{Y})$ the persistence diagram of $\mathbb{Y}$ built with the Čech filtration.

**Proposition 5.5.** Let $\xi, \xi'$ be two probability measures on $\mathbb{R}^d$. Let $\mathbb{X}_n$ (resp. $\mathbb{X}'_n$) be a $n$-sample of law $\xi$ (resp. $\xi'$). Then, for any $k > d$, and any $p \ge k+1$,

$$ \text{OT}_p^p(\mathbb{E}[\text{Dgm}(\mathbb{X}_n)], \mathbb{E}[\text{Dgm}(\mathbb{X}'_n)]) \le C_{k,d} \cdot n \cdot W_{p-k}^p(\xi, \xi') \quad (31) $$

where $C_{k,d} := C \text{diam}(\mathbb{X})^{k-d} \frac{k}{k-d}$ for some constant $C$ depending only on $\mathbb{X}$. In particular, letting $p \to \infty$, we obtain a bottleneck stability result:

$$ \text{OT}_{\infty}(\mathbb{E}[\text{Dgm}(\mathbb{X}_n)], \mathbb{E}[\text{Dgm}(\mathbb{X}'_n)]) \le W_{\infty}(\xi, \xi'). \quad (32) $$

*Proof.* Let $P$ be the law of $\text{Dgm}(\mathbb{X}_n)$, $P'$ be the law of $\text{Dgm}(\mathbb{X}'_n)$ and let $\gamma$ be any coupling between $\mathbb{X}_n$ a $n$-sample of law $\xi$, and $\mathbb{X}'_n$ a $n$-sample of law $\xi'$. Then, the law of $(\text{Dgm}(\mathbb{X}_n), \text{Dgm}(\mathbb{X}'_n))$ is a coupling between $P$ and $P'$. Thus, Proposition 5.4 yields

$$ \text{OT}_p^p(\mathbb{E}[\text{Dgm}(\mathbb{X}_n)], \mathbb{E}[\text{Dgm}(\mathbb{X}'_n)]) \le \mathbb{E}_\gamma[\text{OT}_p^p(\text{Dgm}(\mathbb{X}_n), \text{Dgm}(\mathbb{X}'_n))]. $$
<figure><img src="image_12.png" /><figcaption>Figure 6: Numerical illustration of $D_p$ convergence in the one dimensional case. From left to right: an example of input point cloud with $n = 20$ points; the corresponding persistence diagram; the (ordinate of) the two measures we compare: $\mu_n$ is the empirical one. Most right: median $\text{OT}_p(\mu_n, \mu)$ for $n = 2...50$, over 100 runs along with 90% and 10% percentiles. Computations made with $p = 2$.</figcaption></figure>

Bochner integral) and is detailed in Appendix D. It however satisfies the natural following characterization—that is sufficient to understand this section:

$$ \forall K \subset \Omega \text{ compact, } \mathbb{E}[\mu](K) = \mathbb{E}[\mu(K)]. \quad (30) $$

The behavior of such measures is studied in [24], which shows that they have densities with respect to the Lebesgue measure in a wide variety of settings. A natural question is the stability of the linear expectations of random diagrams with respect to the underlying phenomenon generating them. The following proposition gives a positive answer to this problem, showing that given two close probability distributions $P$ and $P'$ supported on $M^p$, their linear expectations are close for the metric $\text{OT}_p$.

**Proposition 5.4.** Let $P, P' \in W^p(M^p)$. Let $\mu \sim P$ and $\mu' \sim P'$. Then, we have $\text{OT}_p(\mathbb{E}[\mu], \mathbb{E}[\mu']) \le W_{p,\text{OT}_p}(P, P')$.

The proof is postponed to Appendix D.

Using stability results on the distances $d_p (= \text{OT}_p)$ between persistence diagrams [22], one is able to obtain a more precise control between the expectations in some situations. For $\mathbb{Y}$ a sample in some metric space, denote by $\text{Dgm}(\mathbb{Y})$ the persistence diagram of $\mathbb{Y}$ built with the Čech filtration.

**Proposition 5.5.** Let $\xi, \xi'$ be two probability measures on $\mathbb{R}^d$. Let $\mathbb{X}_n$ (resp. $\mathbb{X}'_n$) be a $n$-sample of law $\xi$ (resp. $\xi'$). Then, for any $k > d$, and any $p \ge k+1$,

$$ \text{OT}_p^p(\mathbb{E}[\text{Dgm}(\mathbb{X}_n)], \mathbb{E}[\text{Dgm}(\mathbb{X}'_n)]) \le C_{k,d} \cdot n \cdot W_{p-k}^{p-k}(\xi, \xi') \quad (31) $$

where $C_{k,d} := C \text{diam}(\mathbb{X})^{k-d} \frac{k}{k-d}$ for some constant $C$ depending only on $\mathbb{X}$. In particular, letting $p \to \infty$, we obtain a bottleneck stability result:

$$ \text{OT}_{\infty}(\mathbb{E}[\text{Dgm}(\mathbb{X}_n)], \mathbb{E}[\text{Dgm}(\mathbb{X}'_n)]) \le W_{\infty}(\xi, \xi'). \quad (32) $$

*Proof.* Let $P$ be the law of $\text{Dgm}(\mathbb{X}_n)$, $P'$ be the law of $\text{Dgm}(\mathbb{X}'_n)$ and let $\gamma$ be any coupling between $\mathbb{X}_n$ a $n$-sample of law $\xi$, and $\mathbb{X}'_n$ a $n$-sample of law $\xi'$. Then, the law of $(\text{Dgm}(\mathbb{X}_n), \text{Dgm}(\mathbb{X}'_n))$ is a coupling between $P$ and $P'$. Thus, Proposition 5.4 yields

$$ \text{OT}_p^p(\mathbb{E}[\text{Dgm}(\mathbb{X}_n)], \mathbb{E}[\text{Dgm}(\mathbb{X}'_n)]) \le \mathbb{E}_\gamma[\text{OT}_p^p(\text{Dgm}(\mathbb{X}_n), \text{Dgm}(\mathbb{X}'_n))]. $$
It is stated in [22, Wasserstein Stability Theorem] that

$$OT_p^p(Dgm(\mathbb{X}_n), Dgm(\mathbb{X}'_n)) \leq C_{k,d} H(\mathbb{X}_n, \mathbb{X}'_n)^{p-k},$$

where $C_{k,d} := C \operatorname{diam}(\mathbb{X})^{k-d} \frac{k}{k-d}$ for some constant $C$ depending only on $\mathbb{X}$, and $H$ is the Hausdorff distance between sets. By taking the infimum on transport plans $\gamma$, we obtain

$$OT_p^p(\mathbb{E}[Dgm(\mathbb{X}_n)], \mathbb{E}[Dgm(\mathbb{X}'_n)]) \leq C_{k,d} W_{p-k,H}^{p-k}(\xi^{\otimes n}, (\xi')^{\otimes n}),$$

where $W_{H,p}$ is the $p$-Wasserstein distance between probability distributions on compact sets of the manifold $\mathbb{X}$, endowed with the Hausdorff distance. Lemma 15 of [17] states that

$$W_{p-k,H}^{p-k}(\xi^{\otimes n}, (\xi')^{\otimes n}) \leq n \cdot W_{p-k}^{p-k}(\xi, \xi'),$$

concluding the proof. □

Note that this proposition illustrates the usefulness of introducing new distances $OT_p$: considering the proximity between linear expectations requires to extend the metrics $d_p$ to Radon measures.

# 6 Conclusion and further work.

In this article, we introduce the space of persistence measures, a generalization of persistence diagrams which naturally appears in different applications (e.g. when studying persistence diagrams coming from a random process). We provide an analysis of this space that also holds for the subspace of persistence diagrams. In particular, we observe that many notions used for the statistical analysis of persistence diagrams can be expressed naturally using this formalism based on optimal partial transport. We give characterizations of convergence of persistence diagrams and measures with respect to optimal transport metrics in terms of convergence for measures. We then prove existence and consistency of $p$-Fréchet means for any probability distribution of persistence diagrams and measures, extending previous work in the TDA community. We illustrate the interest of introducing the persistence measures space and its metrics in statistical applications of TDA: continuity of diagram representations, law of large number for persistence diagrams, stability of diagrams in a random settings.

We believe that closing the gap between optimal transport metrics and those of topological data analysis will help to develop new approaches in TDA and give a better understanding of the statistical behavior of topological descriptors. It allows one to address new problems, in particular those involving continuous counterpart of persistence diagrams, and invites one to consider various theoretical and computational tools developed in optimal transport theory that could be of major interest in topological data analysis: gradient flows [55] in the persistence diagrams space, entropic regularization [23] of metrics, use of diagram metrics in (deep) learning pipelines [31], along with the use of well developed libraries [29].
It is stated in [22, Wasserstein Stability Theorem] that

$$OT_p^p(Dgm(\mathbb{X}_n), Dgm(\mathbb{X}'_n)) \leq C_{k,d} H(\mathbb{X}_n, \mathbb{X}'_n)^{p-k},$$

where $C_{k,d} := C \operatorname{diam}(\mathbb{X})^{k-d} \frac{k}{k-d}$ for some constant $C$ depending only on $\mathbb{X}$, and $H$ is the Hausdorff distance between sets. By taking the infimum on transport plans $\gamma$, we obtain

$$OT_p^p(\mathbb{E}[Dgm(\mathbb{X}_n)], \mathbb{E}[Dgm(\mathbb{X}'_n)]) \leq C_{k,d} W_{p-k,H}^{p-k}(\xi^{\otimes n}, (\xi')^{\otimes n}),$$

where $W_{H,p}$ is the $p$-Wasserstein distance between probability distributions on compact sets of the manifold $\mathbb{X}$, endowed with the Hausdorff distance. Lemma 15 of [17] states that

$$W_{p-k,H}^{p-k}(\xi^{\otimes n}, (\xi')^{\otimes n}) \leq n \cdot W_{p-k}^{p-k}(\xi, \xi'),$$

concluding the proof. □

Note that this proposition illustrates the usefulness of introducing new distances $OT_p$: considering the proximity between linear expectations requires to extend the metrics $d_p$ to Radon measures.

# 6 Conclusion and further work.

In this article, we introduce the space of persistence measures, a generalization of persistence diagrams which naturally appears in different applications (e.g. when studying persistence diagrams coming from a random process). We provide an analysis of this space that also holds for the subspace of persistence diagrams. In particular, we observe that many notions used for the statistical analysis of persistence diagrams can be expressed naturally using this formalism based on optimal partial transport. We give characterizations of convergence of persistence diagrams and measures with respect to optimal transport metrics in terms of convergence for measures. We then prove existence and consistency of $p$-Fréchet means for any probability distribution of persistence diagrams and measures, extending previous work in the TDA community. We illustrate the interest of introducing the persistence measures space and its metrics in statistical applications of TDA: continuity of diagram representations, law of large number for persistence diagrams, stability of diagrams in a random settings.

We believe that closing the gap between optimal transport metrics and those of topological data analysis will help to develop new approaches in TDA and give a better understanding of the statistical behavior of topological descriptors. It allows one to address new problems, in particular those involving continuous counterpart of persistence diagrams, and invites one to consider various theoretical and computational tools developed in optimal transport theory that could be of major interest in topological data analysis: gradient flows [55] in the persistence diagrams space, entropic regularization [23] of metrics, use of diagram metrics in (deep) learning pipelines [31], along with the use of well developed libraries [29].
References

[1] Adams, H., Emerson, T., Kirby, M., Neville, R., Peterson, C., Shipman, P., Chepushtanova, S., Hanson, E., Motta, F., Ziegelmeier, L.: Persistence images: a stable vector representation of persistent homology. Journal of Machine Learning Research **18**(8), 1–35 (2017)

[2] Agueh, M., Carlier, G.: Barycenters in the Wasserstein space. SIAM Journal on Mathematical Analysis **43**(2), 904–924 (2011)

[3] Ambrosio, L., Gigli, N., Savaré, G.: Gradient flows: in metric spaces and in the space of probability measures. Springer Science & Business Media (2008)

[4] Billingsley, P.: Convergence of probability measures. Wiley Series in Probability and Statistics. Wiley (2013)

[5] Blumberg, A.J., Gal, I., Mandell, M.A., Pancia, M.: Robust statistics, hypothesis testing, and confidence intervals for persistent homology on metric measure spaces. Foundations of Computational Mathematics **14**(4), 745–789 (2014)

[6] Bobrowski, O., Kahle, M., Skraba, P., et al.: Maximally persistent cycles in random geometric complexes. The Annals of Applied Probability **27**(4), 2032–2060 (2017)

[7] Bochner, S.: Integration von funktionen, deren werte die elemente eines vektorraumes sind. Fundamenta Mathematicae **20**(1), 262–176 (1933)

[8] Bogachev, V.: Measure theory. No. v. 1 in Measure Theory. Springer Berlin Heidelberg (2007)

[9] Bubenik, P., Dłotko, P.: A persistence landscapes toolbox for topological statistics. Journal of Symbolic Computation **78**, 91–114 (2017)

[10] Bubenik, P., Vergili, T.: Topological spaces of persistence modules and their properties. Journal of Applied and Computational Topology pp. 1–37 (2018)

[11] Carlier, G., Ekeland, I.: Matching for teams. Economic Theory **42**(2), 397–418 (2010)

[12] Carlier, G., Oberman, A., Oudet, E.: Numerical methods for matching for teams and Wasserstein barycenters. ESAIM: Mathematical Modelling and Numerical Analysis **49**(6), 1621–1642 (2015)

[13] Carrière, M., Cuturi, M., Oudot, S.: Sliced Wasserstein kernel for persistence diagrams. In: 34th International Conference on Machine Learning (2017)

[14] Carrière, M., Oudot, S.Y., Ovsjanikov, M.: Stable topological signatures for points on 3d shapes. Computer Graphics Forum **34**(5), 1–12 (2015). DOI 10.1111/cgf.12692

[15] Cascales, B., Raja, M.: Measurable selectors for the metric projection. Mathematische Nachrichten **254**(1), 27–34 (2003)
References

[1] Adams, H., Emerson, T., Kirby, M., Neville, R., Peterson, C., Shipman, P., Chepushtanova, S., Hanson, E., Motta, F., Ziegelmeier, L.: Persistence images: a stable vector representation of persistent homology. Journal of Machine Learning Research **18**(8), 1–35 (2017)

[2] Agueh, M., Carlier, G.: Barycenters in the Wasserstein space. SIAM Journal on Mathematical Analysis **43**(2), 904–924 (2011)

[3] Ambrosio, L., Gigli, N., Savaré, G.: Gradient flows: in metric spaces and in the space of probability measures. Springer Science & Business Media (2008)

[4] Billingsley, P.: Convergence of probability measures. Wiley Series in Probability and Statistics. Wiley (2013)

[5] Blumberg, A.J., Gal, I., Mandell, M.A., Pancia, M.: Robust statistics, hypothesis testing, and confidence intervals for persistent homology on metric measure spaces. Foundations of Computational Mathematics **14**(4), 745–789 (2014)

[6] Bobrowski, O., Kahle, M., Skraba, P., et al.: Maximally persistent cycles in random geometric complexes. The Annals of Applied Probability **27**(4), 2032–2060 (2017)

[7] Bochner, S.: Integration von funktionen, deren werte die elemente eines vektorraumes sind. Fundamenta Mathematicae **20**(1), 262–176 (1933)

[8] Bogachev, V.: Measure theory. No. v. 1 in Measure Theory. Springer Berlin Heidelberg (2007)

[9] Bubenik, P., Dłotko, P.: A persistence landscapes toolbox for topological statistics. Journal of Symbolic Computation **78**, 91–114 (2017)

[10] Bubenik, P., Vergili, T.: Topological spaces of persistence modules and their properties. Journal of Applied and Computational Topology pp. 1–37 (2018)

[11] Carlier, G., Ekeland, I.: Matching for teams. Economic Theory **42**(2), 397–418 (2010)

[12] Carlier, G., Oberman, A., Oudet, E.: Numerical methods for matching for teams and Wasserstein barycenters. ESAIM: Mathematical Modelling and Numerical Analysis **49**(6), 1621–1642 (2015)

[13] Carrière, M., Cuturi, M., Oudot, S.: Sliced Wasserstein kernel for persistence diagrams. In: 34th International Conference on Machine Learning (2017)

[14] Carrière, M., Oudot, S.Y., Ovsjanikov, M.: Stable topological signatures for points on 3d shapes. Computer Graphics Forum **34**(5), 1–12 (2015). DOI 10.1111/cgf.12692

[15] Cascales, B., Raja, M.: Measurable selectors for the metric projection. Mathematische Nachrichten **254**(1), 27–34 (2003)
[16] Chazal, F., De Silva, V., Glisse, M., Oudot, S.: The structure and stability of persistence modules. Springer (2016)

[17] Chazal, F., Fasy, B., Lecci, F., Michel, B., Rinaldo, A., Wasserman, L.: Subsampling methods for persistent homology. In: International Conference on Machine Learning, pp. 2143–2151 (2015)

[18] Chazal, F., Fasy, B.T., Lecci, F., Rinaldo, A., Wasserman, L.A.: Stochastic convergence of persistence landscapes and silhouettes. JoCG **6**(2), 140–161 (2015). DOI 10.20382/jocg.v6i2a8

[19] Chen, Y.C., Wang, D., Rinaldo, A., Wasserman, L.: Statistical analysis of persistence intensity functions. arXiv preprint arXiv:1510.02502 (2015)

[20] Chizat, L., Peyré, G., Schmitzer, B., Vialard, F.X.: Unbalanced optimal transport: geometry and kantorovich formulation. arXiv preprint arXiv:1508.05216 (2015)

[21] Cohen-Steiner, D., Edelsbrunner, H., Harer, J.: Stability of persistence diagrams. Discrete & Computational Geometry **37**(1), 103–120 (2007)

[22] Cohen-Steiner, D., Edelsbrunner, H., Harer, J., Mileyko, Y.: Lipschitz functions have Lp-stable persistence. Foundations of computational mathematics **10**(2), 127–139 (2010)

[23] Cuturi, M.: Sinkhorn distances: Lightspeed computation of optimal transport. In: Advances in Neural Information Processing Systems, pp. 2292–2300 (2013)

[24] Divol, V., Chazal, F.: The density of expected persistence diagrams and its kernel based estimation. JoCG **10**(2), 127–153 (2019). DOI 10.20382/jocg.v10i2a7

[25] Divol, V., Polonik, W.: On the choice of weight functions for linear representations of persistence diagrams. Journal of Applied and Computational Topology **3**(3), 249–283 (2019)

[26] Edelsbrunner, H., Harer, J.: Computational topology: an introduction. American Mathematical Soc. (2010)

[27] Figalli, A.: The optimal partial transport problem. Archive for rational mechanics and analysis **195**(2), 533–560 (2010)

[28] Figalli, A., Gigli, N.: A new transportation distance between non-negative measures, with applications to gradients flows with dirichlet boundary conditions. Journal de mathématiques pures et appliquées **94**(2), 107–130 (2010)

[29] Flamary, R., Courty, N.: POT python optimal transport library (2017). URL https://github.com/rflamary/POT

[30] Folland, G.: Real analysis: modern techniques and their applications. Pure and Applied Mathematics: A Wiley Series of Texts, Monographs and Tracts. Wiley (2013)
[16] Chazal, F., De Silva, V., Glisse, M., Oudot, S.: The structure and stability of persistence modules. Springer (2016)

[17] Chazal, F., Fasy, B., Lecci, F., Michel, B., Rinaldo, A., Wasserman, L.: Subsampling methods for persistent homology. In: International Conference on Machine Learning, pp. 2143–2151 (2015)

[18] Chazal, F., Fasy, B.T., Lecci, F., Rinaldo, A., Wasserman, L.A.: Stochastic convergence of persistence landscapes and silhouettes. JoCG **6**(2), 140–161 (2015). DOI 10.20382/jocg.v6i2a8

[19] Chen, Y.C., Wang, D., Rinaldo, A., Wasserman, L.: Statistical analysis of persistence intensity functions. arXiv preprint arXiv:1510.02502 (2015)

[20] Chizat, L., Peyré, G., Schmitzer, B., Vialard, F.X.: Unbalanced optimal transport: geometry and kantorovich formulation. arXiv preprint arXiv:1508.05216 (2015)

[21] Cohen-Steiner, D., Edelsbrunner, H., Harer, J.: Stability of persistence diagrams. Discrete & Computational Geometry **37**(1), 103–120 (2007)

[22] Cohen-Steiner, D., Edelsbrunner, H., Harer, J., Mileyko, Y.: Lipschitz functions have Lp-stable persistence. Foundations of computational mathematics **10**(2), 127–139 (2010)

[23] Cuturi, M.: Sinkhorn distances: Lightspeed computation of optimal transport. In: Advances in Neural Information Processing Systems, pp. 2292–2300 (2013)

[24] Divol, V., Chazal, F.: The density of expected persistence diagrams and its kernel based estimation. JoCG **10**(2), 127–153 (2019). DOI 10.20382/jocg.v10i2a7

[25] Divol, V., Polonik, W.: On the choice of weight functions for linear representations of persistence diagrams. Journal of Applied and Computational Topology **3**(3), 249–283 (2019)

[26] Edelsbrunner, H., Harer, J.: Computational topology: an introduction. American Mathematical Soc. (2010)

[27] Figalli, A.: The optimal partial transport problem. Archive for rational mechanics and analysis **195**(2), 533–560 (2010)

[28] Figalli, A., Gigli, N.: A new transportation distance between non-negative measures, with applications to gradients flows with dirichlet boundary conditions. Journal de mathématiques pures et appliquées **94**(2), 107–130 (2010)

[29] Flamary, R., Courty, N.: POT python optimal transport library (2017). URL https://github.com/rflamary/POT

[30] Folland, G.: Real analysis: modern techniques and their applications. Pure and Applied Mathematics: A Wiley Series of Texts, Monographs and Tracts. Wiley (2013)
[31] Genevay, A., Peyre, G., Cuturi, M.: Learning generative models with sinkhorn divergences. In: International Conference on Artificial Intelligence and Statistics, pp. 1608–1617 (2018)

[32] Goel, A., Trinh, K.D., Tsunoda, K.: Asymptotic behavior of Betti numbers of random geometric complexes. arXiv preprint arXiv:1805.05032 (2018)

[33] Hall, M.: Combinatorial theory (2nd ed). John Wiley & Sons (1986)

[34] Hiraoka, Y., Nakamura, T., Hirata, A., Escolar, E.G., Matsue, K., Nishiura, Y.: Hierarchical structures of amorphous solids characterized by persistent homology. Proceedings of the National Academy of Sciences (2016). DOI 10.1073/pnas.1520877113

[35] Hiraoka, Y., Shirai, T., Trinh, K.D., et al.: Limit theorems for persistence diagrams. The Annals of Applied Probability 28(5), 2740–2780 (2018)

[36] Hofer, C.D., Kwitt, R., Niethammer, M.: Learning representations of persistence barcodes. Journal of Machine Learning Research 20(126), 1–45 (2019)

[37] Kallenberg, O.: Random measures. Elsevier Science & Technology Books (1983)

[38] Kechris, A.: Classical descriptive set theory. Graduate Texts in Mathematics. Springer-Verlag (1995)

[39] Kerber, M., Morozov, D., Nigmetov, A.: Geometry helps to compare persistence diagrams. Journal of Experimental Algorithmics (JEA) 22(1), 1–4 (2017)

[40] Kondratyev, S., Monsaingeon, L., Vorotnikov, D., et al.: A new optimal transport distance on the space of finite Radon measures. Advances in Differential Equations 21(11/12), 1117–1164 (2016)

[41] Kramar, M., Goullet, A., Kondic, L., Mischaikow, K.: Persistence of force networks in compressed granular media. Phys. Rev. E 87, 042207 (2013). DOI 10.1103/PhysRevE.87.042207

[42] Kusano, G., Fukumizu, K., Hiraoka, Y.: Kernel method for persistence diagrams via kernel embedding and weight factor. The Journal of Machine Learning Research 18(1), 6947–6987 (2017)

[43] Kusano, G., Hiraoka, Y., Fukumizu, K.: Persistence weighted gaussian kernel for topological data analysis. In: International Conference on Machine Learning, pp. 2004–2013 (2016)

[44] Kwitt, R., Huber, S., Niethammer, M., Lin, W., Bauer, U.: Statistical topological data analysis - a kernel perspective. In: Advances in neural information processing systems, pp. 3070–3078 (2015)

[45] Lacombe, T., Cuturi, M., Oudot, S.: Large scale computation of means and clusters for persistence diagrams using optimal transport. In: Advances in Neural Information Processing Systems (2018)
[31] Genevay, A., Peyre, G., Cuturi, M.: Learning generative models with sinkhorn divergences. In: International Conference on Artificial Intelligence and Statistics, pp. 1608–1617 (2018)

[32] Goel, A., Trinh, K.D., Tsunoda, K.: Asymptotic behavior of Betti numbers of random geometric complexes. arXiv preprint arXiv:1805.05032 (2018)

[33] Hall, M.: Combinatorial theory (2nd ed). John Wiley & Sons (1986)

[34] Hiraoka, Y., Nakamura, T., Hirata, A., Escolar, E.G., Matsue, K., Nishiura, Y.: Hierarchical structures of amorphous solids characterized by persistent homology. Proceedings of the National Academy of Sciences (2016). DOI 10.1073/pnas.1520877113

[35] Hiraoka, Y., Shirai, T., Trinh, K.D., et al.: Limit theorems for persistence diagrams. The Annals of Applied Probability 28(5), 2740–2780 (2018)

[36] Hofer, C.D., Kwitt, R., Niethammer, M.: Learning representations of persistence barcodes. Journal of Machine Learning Research 20(126), 1–45 (2019)

[37] Kallenberg, O.: Random measures. Elsevier Science & Technology Books (1983)

[38] Kechris, A.: Classical descriptive set theory. Graduate Texts in Mathematics. Springer-Verlag (1995)

[39] Kerber, M., Morozov, D., Nigmetov, A.: Geometry helps to compare persistence diagrams. Journal of Experimental Algorithmics (JEA) 22(1), 1–4 (2017)

[40] Kondratyev, S., Monsaingeon, L., Vorotnikov, D., et al.: A new optimal transport distance on the space of finite Radon measures. Advances in Differential Equations 21(11/12), 1117–1164 (2016)

[41] Kramar, M., Goullet, A., Kondic, L., Mischaikow, K.: Persistence of force networks in compressed granular media. Phys. Rev. E 87, 042207 (2013). DOI 10.1103/PhysRevE.87.042207

[42] Kusano, G., Fukumizu, K., Hiraoka, Y.: Kernel method for persistence diagrams via kernel embedding and weight factor. The Journal of Machine Learning Research 18(1), 6947–6987 (2017)

[43] Kusano, G., Hiraoka, Y., Fukumizu, K.: Persistence weighted gaussian kernel for topological data analysis. In: International Conference on Machine Learning, pp. 2004–2013 (2016)

[44] Kwitt, R., Huber, S., Niethammer, M., Lin, W., Bauer, U.: Statistical topological data analysis - a kernel perspective. In: Advances in neural information processing systems, pp. 3070–3078 (2015)

[45] Lacombe, T., Cuturi, M., Oudot, S.: Large scale computation of means and clusters for persistence diagrams using optimal transport. In: Advances in Neural Information Processing Systems (2018)
[46] Le Gouic, T., Loubes, J.M.: Existence and consistency of Wasserstein barycenters. Probability Theory and Related Fields pp. 1–17 (2016)

[47] Li, C., Ovsjanikov, M., Chazal, F.: Persistence-based structural recognition. In: The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2014)

[48] Mileyko, Y., Mukherjee, S., Harer, J.: Probability measures on the space of persistence diagrams. Inverse Problems **27**(12), 124007 (2011)

[49] Nielsen, L.: Weak convergence and Banach space-valued functions: improving the stability theory of feynman's operational calculi. Mathematical Physics, Analysis and Geometry **14**(4), 279–294 (2011)

[50] Oudot, S.Y.: Persistence theory: from quiver representations to data analysis, vol. 209. American Mathematical Society (2015)

[51] Perlman, M.D.: Jensen's inequality for a convex vector-valued function on an infinite-dimensional space. Journal of Multivariate Analysis **4**(1), 52–65 (1974)

[52] Peyré, G., Cuturi, M.: Computational optimal transport. 2017-86 (2017)

[53] Reininghaus, J., Huber, S., Bauer, U., Kwitt, R.: A stable multi-scale kernel for topological machine learning. In: Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 4741–4748 (2015)

[54] Santambrogio, F.: Optimal transport for applied mathematicians. Birkhäuser, NY (2015)

[55] Santambrogio, F.: Euclidean, metric, and Wasserstein gradient flows: an overview. Bulletin of Mathematical Sciences **7**(1), 87–154 (2017)

[56] Schrijver, A.: Combinatorial optimization: polyhedra and efficiency, vol. 24. Springer Science & Business Media (2003)

[57] Schweinhart, B.: Weighted persistent homology sums of random Čech complexes. arXiv preprint arXiv:1807.07054 (2018)

[58] Som, A., Thopalli, K., Natesan Ramamurthy, K., Venkataraman, V., Shukla, A., Turaga, P.: Perturbation robust representations of topological persistence diagrams. In: Proceedings of the European Conference on Computer Vision (ECCV), pp. 617–635 (2018)

[59] Turner, K.: Means and medians of sets of persistence diagrams. arXiv preprint arXiv:1307.8300 (2013)

[60] Turner, K., Mileyko, Y., Mukherjee, S., Harer, J.: Fréchet means for distributions of persistence diagrams. Discrete & Computational Geometry **52**(1), 44–70 (2014)

[61] Turner, K., Mukherjee, S., Boyer, D.M.: Persistent homology transform for modeling shapes and surfaces. Information and Inference: A Journal of the IMA **3**(4), 310–344 (2014). DOI 10.1093/imaiai/iau011
[46] Le Gouic, T., Loubes, J.M.: Existence and consistency of Wasserstein barycenters. Probability Theory and Related Fields pp. 1–17 (2016)

[47] Li, C., Ovsjanikov, M., Chazal, F.: Persistence-based structural recognition. In: The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2014)

[48] Mileyko, Y., Mukherjee, S., Harer, J.: Probability measures on the space of persistence diagrams. Inverse Problems **27**(12), 124007 (2011)

[49] Nielsen, L.: Weak convergence and Banach space-valued functions: improving the stability theory of feynman's operational calculi. Mathematical Physics, Analysis and Geometry **14**(4), 279–294 (2011)

[50] Oudot, S.Y.: Persistence theory: from quiver representations to data analysis, vol. 209. American Mathematical Society (2015)

[51] Perlman, M.D.: Jensen's inequality for a convex vector-valued function on an infinite-dimensional space. Journal of Multivariate Analysis **4**(1), 52–65 (1974)

[52] Peyré, G., Cuturi, M.: Computational optimal transport. 2017-86 (2017)

[53] Reininghaus, J., Huber, S., Bauer, U., Kwitt, R.: A stable multi-scale kernel for topological machine learning. In: Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 4741–4748 (2015)

[54] Santambrogio, F.: Optimal transport for applied mathematicians. Birkhäuser, NY (2015)

[55] Santambrogio, F.: Euclidean, metric, and Wasserstein gradient flows: an overview. Bulletin of Mathematical Sciences **7**(1), 87–154 (2017)

[56] Schrijver, A.: Combinatorial optimization: polyhedra and efficiency, vol. 24. Springer Science & Business Media (2003)

[57] Schweinhart, B.: Weighted persistent homology sums of random Čech complexes. arXiv preprint arXiv:1807.07054 (2018)

[58] Som, A., Thopalli, K., Natesan Ramamurthy, K., Venkataraman, V., Shukla, A., Turaga, P.: Perturbation robust representations of topological persistence diagrams. In: Proceedings of the European Conference on Computer Vision (ECCV), pp. 617–635 (2018)

[59] Turner, K.: Means and medians of sets of persistence diagrams. arXiv preprint arXiv:1307.8300 (2013)

[60] Turner, K., Mileyko, Y., Mukherjee, S., Harer, J.: Fréchet means for distributions of persistence diagrams. Discrete & Computational Geometry **52**(1), 44–70 (2014)

[61] Turner, K., Mukherjee, S., Boyer, D.M.: Persistent homology transform for modeling shapes and surfaces. Information and Inference: A Journal of the IMA **3**(4), 310–344 (2014). DOI 10.1093/imaiai/iau011
[62] Umeda, Y.: Time series classification via topological data analysis. Information and Media Technologies **12**, 228–239 (2017)

[63] Villani, C.: Topics in optimal transportation. 58. American Mathematical Soc. (2003)

[64] Villani, C.: Optimal transport: old and new, vol. 338. Springer Science & Business Media (2008)
[62] Umeda, Y.: Time series classification via topological data analysis. Information and Media Technologies **12**, 228–239 (2017)

[63] Villani, C.: Topics in optimal transportation. 58. American Mathematical Soc. (2003)

[64] Villani, C.: Optimal transport: old and new, vol. 338. Springer Science & Business Media (2008)
# A Elements of measure theory

In the following, $\Omega$ denotes a locally compact Polish metric space (i.e. a Polish space equipped with a distinguished Polish metric).

**Definition A.1.** The space $M(\Omega)$ of Radon measures supported on $\Omega$ is the space of Borel measures which give finite mass to every compact set of $\Omega$. The vague topology on $M(\Omega)$ is the coarsest topology such that the maps $\mu \mapsto \mu(f) := \int f d\mu$ are continuous for every $f \in C_c(\Omega)$, the space of continuous functions with compact support in $\Omega$.

Radon measures on a general space are also required to be regular (i.e. well approximated by above by open sets and by below by compact sets). However, on a locally compact Polish metric space (such as $\Omega$), regularity is implied by the above definition (see [30, Section 7.1 and Theorem 7.8] for details).

**Definition A.2.** Denote by $M_f(\Omega)$ the space of finite Borel measures on $\Omega$. The weak topology on $M_f(\Omega)$ is the coarsest topology such that the maps $\mu \mapsto \mu(f)$ are continuous for every $f \in C_b(\Omega)$, the space of continuous bounded functions in $\Omega$.

See [8, Chapter 8] for more details on the weak topology on the set of finite Borel measures (which coincide with the set of Baire measures for $\Omega$ a metrizable space). We denote by $\stackrel{w}{\to}$ the vague convergence and $\stackrel{v}{\to}$ the weak convergence.

**Definition A.3.** A set $F \subset M(\Omega)$ is said to be tight if, for every $\varepsilon > 0$, there exists a compact set $K$ with $\mu(\Omega \setminus K) \le \varepsilon$ for every $\mu \in F$.

The following propositions are standard results. Corresponding proofs can be found for instance in [37, Section 15.7].

**Proposition A.1.** A set $F \subset M(\Omega)$ is relatively compact for the vague topology if and only if for every compact set $K$ included in $\Omega$,

$$ \sup\{\mu(K), \mu \in F\} < \infty. $$

**Proposition A.2 (Prokhorov's theorem).** A set $F \subset M_f(\Omega)$ is relatively compact for the weak topology if and only if $F$ is tight and $\sup_{\mu \in F} \mu(\Omega) < \infty$.

**Proposition A.3.** Let $\mu, \mu_1, \mu_2, \dots$ be measures in $M_f(\Omega)$. Then, $\mu_n \stackrel{w}{\to} \mu$ if and only if $\mu_n(\Omega) \to \mu(\Omega)$ and $\mu_n \stackrel{v}{\to} \mu$.

**Proposition A.4 (The Portmanteau theorem).** Let $\mu, \mu_1, \mu_2, \dots$ be measures in $M(\Omega)$. Then, $\mu_n \stackrel{v}{\to} \mu$ if and only if one of the following propositions holds:

* for all open sets $U \subset \Omega$ and all bounded closed sets $F \subset \Omega$,

$$ \limsup_{n \to \infty} \mu_n(F) \le \mu(F) \text{ and } \liminf_{n \to \infty} \mu_n(U) \ge \mu(U). $$

* for all bounded Borel sets $A$ with $\mu(\partial A) = 0$, $\lim_{n \to \infty} \mu_n(A) = \mu(A)$.
# A Elements of measure theory

In the following, $\Omega$ denotes a locally compact Polish metric space (i.e. a Polish space equipped with a distinguished Polish metric).

**Definition A.1.** The space $M(\Omega)$ of Radon measures supported on $\Omega$ is the space of Borel measures which give finite mass to every compact set of $\Omega$. The vague topology on $M(\Omega)$ is the coarsest topology such that the maps $\mu \mapsto \mu(f) := \int f d\mu$ are continuous for every $f \in C_c(\Omega)$, the space of continuous functions with compact support in $\Omega$.

Radon measures on a general space are also required to be regular (i.e. well approximated by above by open sets and by below by compact sets). However, on a locally compact Polish metric space (such as $\Omega$), regularity is implied by the above definition (see [30, Section 7.1 and Theorem 7.8] for details).

**Definition A.2.** Denote by $M_f(\Omega)$ the space of finite Borel measures on $\Omega$. The weak topology on $M_f(\Omega)$ is the coarsest topology such that the maps $\mu \mapsto \mu(f)$ are continuous for every $f \in C_b(\Omega)$, the space of continuous bounded functions in $\Omega$.

See [8, Chapter 8] for more details on the weak topology on the set of finite Borel measures (which coincide with the set of Baire measures for $\Omega$ a metrizable space). We denote by $\stackrel{w}{\to}$ the vague convergence and $\stackrel{v}{\to}$ the weak convergence.

**Definition A.3.** A set $F \subset M(\Omega)$ is said to be tight if, for every $\varepsilon > 0$, there exists a compact set $K$ with $\mu(\Omega \setminus K) \le \varepsilon$ for every $\mu \in F$.

The following propositions are standard results. Corresponding proofs can be found for instance in [37, Section 15.7].

**Proposition A.1.** A set $F \subset M(\Omega)$ is relatively compact for the vague topology if and only if for every compact set $K$ included in $\Omega$,

$$ \sup\{\mu(K), \mu \in F\} < \infty. $$

**Proposition A.2 (Prokhorov's theorem).** A set $F \subset M_f(\Omega)$ is relatively compact for the weak topology if and only if $F$ is tight and $\sup_{\mu \in F} \mu(\Omega) < \infty$.

**Proposition A.3.** Let $\mu, \mu_1, \mu_2, \dots$ be measures in $M_f(\Omega)$. Then, $\mu_n \stackrel{w}{\to} \mu$ if and only if $\mu_n(\Omega) \to \mu(\Omega)$ and $\mu_n \stackrel{v}{\to} \mu$.

**Proposition A.4 (The Portmanteau theorem).** Let $\mu, \mu_1, \mu_2, \dots$ be measures in $M(\Omega)$. Then, $\mu_n \stackrel{v}{\to} \mu$ if and only if one of the following propositions holds:

* for all open sets $U \subset \Omega$ and all bounded closed sets $F \subset \Omega$,

$$ \limsup_{n \to \infty} \mu_n(F) \le \mu(F) \quad \text{and} \quad \liminf_{n \to \infty} \mu_n(U) \ge \mu(U). $$

* for all bounded Borel sets $A$ with $\mu(\partial A) = 0$, $\lim_{n \to \infty} \mu_n(A) = \mu(A)$.
**Definition A.4.** The set of point measures on $\Omega$ is the subset $\mathcal{D}(\Omega) \subset \mathcal{M}(\Omega)$ of Radon measures with discrete support and integer mass on each point, that is of the form

$$ \sum_{x \in X} n_x \delta_x $$

where $n_x \in \mathbb{N}$ and $X \subset \Omega$ is some locally finite set.

**Proposition A.5.** The set $\mathcal{D}(\Omega)$ is closed in $\mathcal{M}(\Omega)$ for the vague topology.

We now discuss properties of the VM topology. Recall that $E_{\Omega} = (\bar{\Omega} \times \bar{\Omega})\setminus(\partial\Omega \times \partial\Omega)$, where $\Omega = \{(t_1, t_2) \in \mathbb{R}^2, t_2 > t_1\}$.

**Proposition A.6.** A subset $F \subset \mathcal{M}(E_{\Omega})$ is relatively compact for the VM topology if and only if the sets $\{\pi_1, \pi \in F\}$ and $\{\pi_2, \pi \in F\}$ are relatively compact for the vague topology, where $\pi_1$ (resp. $\pi_2$) is the first (resp. second) marginal of a measure $\pi$.

*Proof.* By definition of the initial topology, a subset $F \subset \mathcal{M}(E_{\Omega})$ is relatively compact for the VM topology if and only if $I(F)$ is relatively compact: according to Proposition A.1, this is equivalent to having for all compact sets $K \subset \Omega$ and $L \subset E_{\Omega}$

$$ \max(\sup\{\pi_1(K), \pi \in F\}, \sup\{\pi_2(K), \pi \in F\}, \sup\{\pi(L), \pi \in F\}) < \infty. $$

Any compact set $L$ in $E_{\Omega}$ is included in a set of the form $(K \times \Omega) \cup (\Omega \times K)$ for some compact set $K \subset \Omega$. Hence,

$$ \begin{aligned} \sup_{\pi \in F} \pi(L) &\le \sup_{\pi \in F} \pi((K \times \Omega) \cup (\Omega \times K)) \\ &\le \sup_{\pi \in F} (\pi_1(K) + \pi_2(K)) \\ &\le \sup_{\pi \in F} \pi_1(K) + \sup_{\pi \in F} \pi_2(K). \end{aligned} $$

Hence, the set $I(F)$ is relatively compact if and only if for all compact sets $K \subset \Omega$, $\sup_{\pi \in F} \pi_1(K) < +\infty$ and $\sup_{\pi \in F} \pi_2(K) < +\infty$, which is equivalent to the two sets of first and second marginals being relatively compact for the vague topology. $\square$

# B Delayed proofs of Section 3

For the sake of completeness, we present in this section proofs which either require very few adaptations from corresponding proofs in [28] or which are close to standard proofs in optimal transport theory.

*Proofs of Proposition 3.1 and Proposition 3.8.*

* For any $\pi \in \mathrm{Adm}(\mu, \nu)$, $\pi_1 = \mu$ and $\pi_2 = \nu$. Hence, Proposition A.6 directly implies that the set $\mathrm{Adm}(\mu, \nu)$ is relatively compact for the VM topology. Moreover, if a sequence $(\pi_n)$ in $\mathrm{Adm}(\mu, \nu)$ converges for the VM topology to some $\pi \in \mathcal{M}(E_{\Omega})$, then, by definition, the sequence of the first (resp. second) marginals of $(\pi_n)_n$ converges vaguely to the first (resp. second) marginal of $\pi$. But this sequence is constant equal to $\mu$ (resp. $\nu$). Hence, the first marginal of $\pi$ is $\mu$ (resp. the second marginal of $\pi$ is $\nu$). We have proved that $\mathrm{Adm}(\mu, \nu)$ is also closed: hence, it is a compact set for the VM topology.
**Definition A.4.** The set of point measures on $\Omega$ is the subset $\mathcal{D}(\Omega) \subset \mathcal{M}(\Omega)$ of Radon measures with discrete support and integer mass on each point, that is of the form

$$ \sum_{x \in X} n_x \delta_x $$

where $n_x \in \mathbb{N}$ and $X \subset \Omega$ is some locally finite set.

**Proposition A.5.** The set $\mathcal{D}(\Omega)$ is closed in $\mathcal{M}(\Omega)$ for the vague topology.

We now discuss properties of the VM topology. Recall that $E_{\Omega} = (\bar{\Omega} \times \bar{\Omega})\setminus(\partial\Omega \times \partial\Omega)$, where $\Omega = \{(t_1, t_2) \in \mathbb{R}^2, t_2 > t_1\}$.

**Proposition A.6.** A subset $F \subset \mathcal{M}(E_{\Omega})$ is relatively compact for the VM topology if and only if the sets $\{\pi_1, \pi \in F\}$ and $\{\pi_2, \pi \in F\}$ are relatively compact for the vague topology, where $\pi_1$ (resp. $\pi_2$) is the first (resp. second) marginal of a measure $\pi$.

*Proof.* By definition of the initial topology, a subset $F \subset \mathcal{M}(E_{\Omega})$ is relatively compact for the VM topology if and only if $I(F)$ is relatively compact: according to Proposition A.1, this is equivalent to having for all compact sets $K \subset \Omega$ and $L \subset E_{\Omega}$

$$ \max(\sup\{\pi_1(K), \pi \in F\}, \sup\{\pi_2(K), \pi \in F\}, \sup\{\pi(L), \pi \in F\}) < \infty. $$

Any compact set $L$ in $E_{\Omega}$ is included in a set of the form $(K \times \Omega) \cup (\Omega \times K)$ for some compact set $K \subset \Omega$. Hence,

$$ \begin{aligned} \sup_{\pi \in F} \pi(L) &\le \sup_{\pi \in F} \pi((K \times \Omega) \cup (\Omega \times K)) \\ &\le \sup_{\pi \in F} (\pi_1(K) + \pi_2(K)) \\ &\le \sup_{\pi \in F} \pi_1(K) + \sup_{\pi \in F} \pi_2(K). \end{aligned} $$

Hence, the set $I(F)$ is relatively compact if and only if for all compact sets $K \subset \Omega$, $\sup_{\pi \in F} \pi_1(K) < +\infty$ and $\sup_{\pi \in F} \pi_2(K) < +\infty$, which is equivalent to the two sets of first and second marginals being relatively compact for the vague topology. $\square$

# B Delayed proofs of Section 3

For the sake of completeness, we present in this section proofs which either require very few adaptations from corresponding proofs in [28] or which are close to standard proofs in optimal transport theory.

*Proofs of Proposition 3.1 and Proposition 3.8.*

* For any $\pi \in \mathrm{Adm}(\mu, \nu)$, $\pi_1 = \mu$ and $\pi_2 = \nu$. Hence, Proposition A.6 directly implies that the set $\mathrm{Adm}(\mu, \nu)$ is relatively compact for the VM topology. Moreover, if a sequence $(\pi_n)$ in $\mathrm{Adm}(\mu, \nu)$ converges for the VM topology to some $\pi \in \mathcal{M}(E_{\Omega})$, then, by definition, the sequence of the first (resp. second) marginals of $(\pi_n)_n$ converges vaguely to the first (resp. second) marginal of $\pi$. But this sequence is constant equal to $\mu$ (resp. $\nu$). Hence, the first marginal of $\pi$ is $\mu$ (resp. the second marginal of $\pi$ is $\nu$). We have proved that $\mathrm{Adm}(\mu, \nu)$ is also closed: hence, it is a compact set for the VM topology.
* To prove the second point of Proposition 3.1, consider $\pi, \pi_1, \pi_2, \dots$ such that $\pi_n \to \pi$ for the VM topology, and introduce $\pi'_n : A \mapsto \iint_A d(x, y)^p d\pi_n$. The sequence $(\pi'_n)_n$ converges vaguely to $\pi' : A \mapsto \iint_A d(x, y)^p d\pi$. The Portmanteau theorem (Proposition A.4) applied with the open set $E_\Omega$ to the measures $\pi'_n \xrightarrow{v} \pi'$ implies that

$$C_p(\pi) = \pi'(E_\Omega) \le \liminf_n \pi'_n(E_\Omega) = \liminf_n C_p(\pi_n),$$

i.e. $C_p$ is lower semi-continuous.

* We now prove the lower semi-continuity of $C_\infty$. Let $(\pi_n)_n$ be a sequence converging to $\pi$ for the VM topology and let $r > \liminf_{n \to \infty} C_\infty(\pi_n)$. The set $U_r = \{(x, y) \in E_\Omega, d(x, y) > r\}$ is open. By the Portmanteau theorem (Proposition A.4), we have

$$0 = \liminf_{n \to \infty} \pi_n(U_r) \ge \pi(U_r).$$

Therefore, $\text{spt}(\pi) \subset U_r^c$ and $C_\infty(\pi) \le r$. As this holds for any $r > \liminf_{n \to \infty} C_\infty(\pi_n)$, we have $\liminf_{n \to \infty} C_\infty(\pi_n) \ge C_\infty(\pi)$.

* We show that for any $1 \le p \le \infty$, the lower semi-continuity of $C_p$ and the sequential compactness of $\text{Adm}(\mu, \nu)$ with respect to the VM topology imply that 1. $\text{Opt}_p(\mu, \nu)$ is a non-empty compact set for the vague topology on $E_\Omega$ and that 2. $\text{OT}_p$ is lower semi-continuous.

1. Let $(\pi_n)_n$ be a minimizing sequence of (10) or (24) in $\text{Adm}(\mu, \nu)$. As $\text{Adm}(\mu, \nu)$ is sequentially compact, it has a subsequential limit $\pi$, and the lower semi-continuity implies that $C_p(\pi) \le \liminf_{n \to \infty} C_p(\pi_n) = \text{OT}_p^p(\mu, \nu)$, so that $\text{Opt}_p(\mu, \nu)$ is non-empty. Using once again the lower semi-continuity of $C_p$, if a sequence in $\text{Opt}_p(\mu, \nu)$ converges to some limit, then the cost of the limit is less than or equal to (and thus equal to) $\text{OT}_p^p(\mu, \nu)$, i.e. the limit is in $\text{Opt}_p(\mu, \nu)$. The set $\text{Opt}_p(\mu, \nu)$ being closed in the sequentially compact set $\text{Adm}(\mu, \nu)$, it is also sequentially compact.

2. Let $\mu_n \xrightarrow{v} \mu$ and $\nu_n \xrightarrow{v} \nu$. One has $\liminf_n \text{OT}_p(\mu_n, \nu_n) = \lim_k \text{OT}_p(\mu_{n_k}, \nu_{n_k})$ for some subsequence $(n_k)_k$. For ease of notation, we will still use the index $n$ to denote this subsequence. If the limit is infinite, there is nothing to prove. Otherwise, consider $\pi_n \in \text{Opt}_p(\mu_n, \nu_n)$, and note that for any compact sets $K \subset \Omega$, one has $\sup_n \mu_n(K) + \sup_n \nu_n(K') < \infty$. Therefore, by Proposition A.6, there exists a subsequence $(\pi_{n_k})_k$ which converges to some measure $\pi \in \text{Adm}(\mu, \nu)$ for the VM topology. Note that the first (resp. second) marginal of $\pi$ is equal to the limit $\mu$ (resp. $\nu$) of the first (resp. second) marginal of $(\pi_{n_k})$, so that $\pi$ is in $\text{Adm}(\mu, \nu)$. Therefore,

$$\text{OT}_p^p(\mu, \nu) \le C_p(\pi) \le \liminf_{n \to \infty} C_p(\pi_n) = \liminf_{n \to \infty} \text{OT}_p^p(\mu_n, \nu_n).$$

* Finally, we prove that $\text{OT}_p$ is a metric on $M^p$. Let $\mu, \nu, \lambda \in M^p$. The symmetry of $\text{OT}_p$ is clear. If $\text{OT}_p(\mu, \nu) = 0$, then there exists $\pi \in \text{Adm}(\mu, \nu)$ supported on $\{(x, x), x \in \Omega\}$. Therefore, for a Borel set $A \subset \Omega$,
* To prove the second point of Proposition 3.1, consider $\pi, \pi_1, \pi_2, \dots$ such that $\pi_n \to \pi$ for the VM topology, and introduce $\pi'_n : A \mapsto \iint_A d(x, y)^p d\pi_n$. The sequence $(\pi'_n)_n$ converges vaguely to $\pi' : A \mapsto \iint_A d(x, y)^p d\pi$. The Portmanteau theorem (Proposition A.4) applied with the open set $E_\Omega$ to the measures $\pi'_n \xrightarrow{v} \pi'$ implies that

$$C_p(\pi) = \pi'(E_\Omega) \le \liminf_n \pi'_n(E_\Omega) = \liminf_n C_p(\pi_n),$$

i.e. $C_p$ is lower semi-continuous.

* We now prove the lower semi-continuity of $C_\infty$. Let $(\pi_n)_n$ be a sequence converging to $\pi$ for the VM topology and let $r > \liminf_{n \to \infty} C_\infty(\pi_n)$. The set $U_r = \{(x, y) \in E_\Omega, d(x, y) > r\}$ is open. By the Portmanteau theorem (Proposition A.4), we have

$$0 = \liminf_{n \to \infty} \pi_n(U_r) \ge \pi(U_r).$$

Therefore, $\text{spt}(\pi) \subset U_r^c$ and $C_\infty(\pi) \le r$. As this holds for any $r > \liminf_{n \to \infty} C_\infty(\pi_n)$, we have $\liminf_{n \to \infty} C_\infty(\pi_n) \ge C_\infty(\pi)$.

* We show that for any $1 \le p \le \infty$, the lower semi-continuity of $C_p$ and the sequential compactness of $\text{Adm}(\mu, \nu)$ with respect to the VM topology imply that 1. $\text{Opt}_p(\mu, \nu)$ is a non-empty compact set for the vague topology on $E_\Omega$ and that 2. $\text{OT}_p$ is lower semi-continuous.

1. Let $(\pi_n)_n$ be a minimizing sequence of (10) or (24) in $\text{Adm}(\mu, \nu)$. As $\text{Adm}(\mu, \nu)$ is sequentially compact, it has a subsequential limit $\pi$, and the lower semi-continuity implies that $C_p(\pi) \le \liminf_{n \to \infty} C_p(\pi_n) = \text{OT}_p^p(\mu, \nu)$, so that $\text{Opt}_p(\mu, \nu)$ is non-empty. Using once again the lower semi-continuity of $C_p$, if a sequence in $\text{Opt}_p(\mu, \nu)$ converges to some limit, then the cost of the limit is less than or equal to (and thus equal to) $\text{OT}_p^p(\mu, \nu)$, i.e. the limit is in $\text{Opt}_p(\mu, \nu)$. The set $\text{Opt}_p(\mu, \nu)$ being closed in the sequentially compact set $\text{Adm}(\mu, \nu)$, it is also sequentially compact.

2. Let $\mu_n \xrightarrow{v} \mu$ and $\nu_n \xrightarrow{v} \nu$. One has $\liminf_n \text{OT}_p(\mu_n, \nu_n) = \lim_k \text{OT}_p(\mu_{n_k}, \nu_{n_k})$ for some subsequence $(n_k)_k$. For ease of notation, we will still use the index $n$ to denote this subsequence. If the limit is infinite, there is nothing to prove. Otherwise, consider $\pi_n \in \text{Opt}_p(\mu_n, \nu_n)$, and note that for any compact sets $K \subset \Omega$, one has $\sup_n \mu_n(K) + \sup_n \nu_n(K') < \infty$. Therefore, by Proposition A.6, there exists a subsequence $(\pi_{n_k})_k$ which converges to some measure $\pi \in \text{Adm}(\mu, \nu)$ for the VM topology. Note that the first (resp. second) marginal of $\pi$ is equal to the limit $\mu$ (resp. $\nu$) of the first (resp. second) marginal of $(\pi_{n_k})$, so that $\pi$ is in $\text{Adm}(\mu, \nu)$. Therefore,

$$\text{OT}_p^p(\mu, \nu) \le C_p(\pi) \le \liminf_{n \to \infty} C_p(\pi_n) = \liminf_{n \to \infty} \text{OT}_p^p(\mu_n, \nu_n).$$

* Finally, we prove that $\text{OT}_p$ is a metric on $M^p$. Let $\mu, \nu, \lambda \in M^p$. The symmetry of $\text{OT}_p$ is clear. If $\text{OT}_p(\mu, \nu) = 0$, then there exists $\pi \in \text{Adm}(\mu, \nu)$ supported on $\{(x, x), x \in \Omega\}$. Therefore, for a Borel set $A \subset \Omega$,
$\mu(A) = \pi(A \times \bar{\Omega}) = \pi(A \times A) = \pi(\bar{\Omega} \times A) = \nu(A)$, and $\mu = \nu$. To prove the triangle inequality, we need a variant on the gluing lemma, stated in [28, Lemma 2.1]: for $\pi_{12} \in \text{Opt}(\mu, \nu)$ and $\pi_{23} \in \text{Opt}(\nu, \lambda)$ there exists a measure $\gamma \in \mathcal{M}(\bar{\Omega}^3)$ such that the marginal corresponding to the first two entries (resp. two last entries), when restricted to $E_{\Omega}$, is equal to $\pi_{12}$ (resp. $\pi_{23}$), and induces a zero cost on $\partial\Omega \times \partial\Omega$. Therefore, by the triangle inequality and the Minkowski inequality,

$$
\begin{align*}
\mathrm{OT}_p(\mu, \lambda) &\le \left( \int_{\bar{\Omega}^2} d(x, z)^p d\gamma(x, y, z) \right)^{1/p} \\
&\le \left( \int_{\bar{\Omega}^2} d(x, y)^p d\gamma(x, y, z) \right)^{1/p} + \left( \int_{\bar{\Omega}^2} d(y, z)^p d\gamma(x, y, z) \right)^{1/p} \\
&= \left( \int_{\bar{\Omega}^2} d(x, y)^p d\pi_{12}(x, y) \right)^{1/p} + \left( \int_{\bar{\Omega}^2} d(y, z)^p d\pi_{23}(y, z) \right)^{1/p} \\
&= \mathrm{OT}_p(\mu, \nu) + \mathrm{OT}_p(\nu, \lambda).
\end{align*}
$$

The proof is similar for $p = \infty$.

<figure><img src="image_13.png" /></figure>

Proof of Proposition 3.3. We first show the separability. Consider for $k > 0$ a partition of $\Omega$ into squares $(C_i^k)$ of side length $2^{-k}$, centered at points $x_i^k$. Let $F$ be the set of all measures of the form $\sum_{i \in I} q_i \delta_{x_i^k}$ for $q_i$ positive rationals, $k > 0$ and $I$ a finite subset of $\mathbb{N}$. Our goal is to show that the countable set $F$ is dense in $\mathcal{M}^p$. Fix $\varepsilon > 0$, and $\mu \in \mathcal{M}^p$. The proof is in three steps.

1. Since $\text{Pers}_p(\mu) < \infty$, there exists a compact $K \subset \Omega$ such that $\text{Pers}_p(\mu) - \text{Pers}_p(\mu_0) < \varepsilon^p$, where $\mu_0$ is the restriction of $\mu$ to $K$. By considering the transport plan between $\mu$ and $\mu_0$ induced by the identity map on $K$ and the projection onto the diagonal on $\bar{\Omega} \setminus K$, it follows that $\text{OT}_p^p(\mu, \mu_0) \le \text{Pers}_p(\mu) - \text{Pers}_p(\mu_0) \le \varepsilon^p$.

2. Consider $k$ such that $2^{-k} \le \varepsilon/(\sqrt{2}\mu(K)^{1/p})$ and denote by $I$ the indices corresponding to squares $C_i^k$ intersecting $K$. Let $\mu_1 = \sum_{i \in I} \mu_0(C_i^k) \delta_{x_i^k}$. One can create a transport map between $\mu_0$ and $\mu_1$ by mapping each square $C_i^k$ to its center $x_i^k$, so that

$$
\mathrm{OT}_p(\mu_0, \mu_1) \le \left( \sum_i \mu_0(C_i^k) (\sqrt{2} \cdot 2^{-k})^p \right)^{1/p} \le \mu(K)^{1/p} \sqrt{2} \cdot 2^{-k} \le \varepsilon.
$$

3. Consider, for $i \in I$, $q_i$ a rational number satisfying $q_i \le \mu_0(C_i^k)$ and $|\mu_0(C_i^k) - q_i| \le \varepsilon^p / (\sum_{i \in I} d(x_i^k, \partial\Omega)^p)$. Let $\mu_2 = \sum_{i \in I} q_i \delta_{x_i^k}$. Consider the transport plan between $\mu_2$ and $\mu_1$ that fully transports $\mu_2$ onto $\mu_1$, and transport the remaining mass in $\mu_1$ onto the diagonal. Then,

$$
\mathrm{OT}_p(\mu_1, \mu_2) \le \left( \sum_{i \in I} |\mu_0(C_i^k) - q_i| d(x_i^k, \partial\Omega)^p \right)^{1/p} \le \varepsilon.
$$
$\mu(A) = \pi(A \times \bar{\Omega}) = \pi(A \times A) = \pi(\bar{\Omega} \times A) = \nu(A)$, and $\mu = \nu$. To prove the triangle inequality, we need a variant on the gluing lemma, stated in [28, Lemma 2.1]: for $\pi_{12} \in \text{Opt}(\mu, \nu)$ and $\pi_{23} \in \text{Opt}(\nu, \lambda)$ there exists a measure $\gamma \in \mathcal{M}(\bar{\Omega}^3)$ such that the marginal corresponding to the first two entries (resp. two last entries), when restricted to $E_\Omega$, is equal to $\pi_{12}$ (resp. $\pi_{23}$), and induces a zero cost on $\partial\Omega \times \partial\Omega$. Therefore, by the triangle inequality and the Minkowski inequality,

$$ 
\begin{align*}
\mathrm{OT}_p(\mu, \lambda) &\le \left( \int_{\bar{\Omega}^2} d(x, z)^p d\gamma(x, y, z) \right)^{1/p} \\
&\le \left( \int_{\bar{\Omega}^2} d(x, y)^p d\gamma(x, y, z) \right)^{1/p} + \left( \int_{\bar{\Omega}^2} d(y, z)^p d\gamma(x, y, z) \right)^{1/p} \\
&= \left( \int_{\bar{\Omega}^2} d(x, y)^p d\pi_{12}(x, y) \right)^{1/p} + \left( \int_{\bar{\Omega}^2} d(y, z)^p d\pi_{23}(y, z) \right)^{1/p} \\
&= \mathrm{OT}_p(\mu, \nu) + \mathrm{OT}_p(\nu, \lambda).
\end{align*}
$$

The proof is similar for $p = \infty$.

<figure><img src="image_13.png" /></figure>

*Proof of Proposition 3.3.* We first show the separability. Consider for $k > 0$ a partition of $\Omega$ into squares $(C_i^k)$ of side length $2^{-k}$, centered at points $x_i^k$. Let $F$ be the set of all measures of the form $\sum_{i \in I} q_i \delta_{x_i^k}$ for $q_i$ positive rationals, $k > 0$ and $I$ a finite subset of $\mathbb{N}$. Our goal is to show that the countable set $F$ is dense in $\mathcal{M}^p$. Fix $\varepsilon > 0$, and $\mu \in \mathcal{M}^p$. The proof is in three steps.

1. Since $\mathrm{Pers}_p(\mu) < \infty$, there exists a compact $K \subset \Omega$ such that $\mathrm{Pers}_p(\mu) - \mathrm{Pers}_p(\mu_0) < \varepsilon^p$, where $\mu_0$ is the restriction of $\mu$ to $K$. By considering the transport plan between $\mu$ and $\mu_0$ induced by the identity map on $K$ and the projection onto the diagonal on $\bar{\Omega} \setminus K$, it follows that $\mathrm{OT}_p^p(\mu, \mu_0) \le \mathrm{Pers}_p(\mu) - \mathrm{Pers}_p(\mu_0) \le \varepsilon^p$.

2. Consider $k$ such that $2^{-k} \le \varepsilon/(\sqrt{2}\mu(K)^{1/p})$ and denote by $I$ the indices corresponding to squares $C_i^k$ intersecting $K$. Let $\mu_1 = \sum_{i \in I} \mu_0(C_i^k) \delta_{x_i^k}$. One can create a transport map between $\mu_0$ and $\mu_1$ by mapping each square $C_i^k$ to its center $x_i^k$, so that

$$ \mathrm{OT}_p(\mu_0, \mu_1) \le \left( \sum_i \mu_0(C_i^k) (\sqrt{2} \cdot 2^{-k})^p \right)^{1/p} \le \mu(K)^{1/p} \sqrt{2} \cdot 2^{-k} \le \varepsilon. $$

3. Consider, for $i \in I$, $q_i$ a rational number satisfying $q_i \le \mu_0(C_i^k)$ and $|\mu_0(C_i^k) - q_i| \le \varepsilon^p / (\sum_{i \in I} d(x_i^k, \partial\Omega)^p)$. Let $\mu_2 = \sum_{i \in I} q_i \delta_{x_i^k}$. Consider the transport plan between $\mu_2$ and $\mu_1$ that fully transports $\mu_2$ onto $\mu_1$, and transport the remaining mass in $\mu_1$ onto the diagonal. Then,

$$ \mathrm{OT}_p(\mu_1, \mu_2) \le \left( \sum_{i \in I} |\mu_0(C_i^k) - q_i| d(x_i^k, \partial\Omega)^p \right)^{1/p} \le \varepsilon. $$
As $\mu_2 \in F$ and $\text{OT}_p(\mu, \mu_2) \le 3\epsilon$, the separability is proven.

To prove that the space is complete, consider a Cauchy sequence $(\mu_n)_n$. As the sequence $(\text{Pers}_p(\mu_n))_n = (\text{OT}_p^p(\mu_n, 0))_n$ is a Cauchy sequence, it is bounded. Therefore, for $K \subset \Omega$ a compact set, (15) implies that $\sup_n \mu_n(K) < \infty$. Proposition A.1 implies that $(\mu_n)_n$ is relatively compact for the vague topology on $\Omega$. Consider $(\mu_{n_k})_k$ a subsequence converging vaguely on $\Omega$ to some measure $\mu$. By the lower semi-continuity of $\text{OT}_p$,

$$ \text{Pers}_p(\mu) = \text{OT}_p^p(\mu, 0) \le \liminf_{k \to \infty} \text{OT}_p^p(\mu_{n_k}, 0) < \infty, $$

so that $\mu \in \mathcal{M}^p$. Using once again the lower semi-continuity of $\text{OT}_p$,

$$ \begin{aligned} \text{OT}_p(\mu_n, \mu) &\le \liminf_{k \to \infty} \text{OT}_p(\mu_n, \mu_{n_k}) \\ \lim_{n \to \infty} \text{OT}_p(\mu_n, \mu) &\le \lim_{n \to \infty} \liminf_{k \to \infty} \text{OT}_p(\mu_n, \mu_{n_k}) = 0, \end{aligned} $$

ensuring that $\text{OT}_p(\mu_n, \mu) \to 0$, that is the space is complete. $\square$

<figure><img src="image_14.png" /></figure>

*Proof of the direct implication of Theorem 3.4.* Let $\mu, \mu_1, \mu_2, \dots$ be elements of $\mathcal{M}^p$ and assume that the sequence $(\text{OT}_p(\mu_n, \mu))_n$ converges to 0. The triangle inequality implies that $\text{Pers}_p(\mu_n) = \text{OT}_p^p(\mu_n, 0)$ converges to $\text{Pers}_p(\mu) = \text{OT}_p^p(\mu, 0)$. Let $f \in C_c(\Omega)$, whose support is included in some compact set $K$. For any $\epsilon > 0$, there exists a Lipschitz function $f_\epsilon$, with Lipschitz constant $L$ and whose support is included in $K$, with the $\infty$-norm $\|f - f_\epsilon\|_\infty$ less than or equal to $\epsilon$. The convergence of $\text{Pers}_p(\mu_n)$ and (15) imply that $\sup_k \mu_k(K) < \infty$. Let $\pi_n \in \text{Opt}_p(\mu_n, \mu)$, we have

$$ \begin{aligned} |\mu_n(f) - \mu(f)| &\le |\mu_n(f - f_\epsilon)| + |\mu(f - f_\epsilon)| + |\mu_n(f_\epsilon) - \mu(f_\epsilon)| \\ &\le (\mu_n(K) + \mu(K))\epsilon + |\mu_n(f_\epsilon) - \mu(f_\epsilon)| \\ &\le (\sup_k \mu_k(K) + \mu(K))\epsilon + |\mu_n(f_\epsilon) - \mu(f_\epsilon)|. \end{aligned} $$

Also,

$$ \begin{aligned} |\mu_n(f_\epsilon) - \mu(f_\epsilon)| &\le \iint_{\overline{\Omega}^2} |f_\epsilon(x) - f_\epsilon(y)| d\pi_n(x, y) \quad \text{where } \pi_n \in \text{Opt}(\mu_n, \mu) \\ &\le L \iint_{(K \times \overline{\Omega}) \cup (\overline{\Omega} \times K)} d(x, y) d\pi_n(x, y) \end{aligned} $$

$$ \le L \pi_n((K \times \overline{\Omega}) \cup (\overline{\Omega} \times K))^{1-\frac{1}{p}} \left( \iint_{(K \times \overline{\Omega}) \cup (\overline{\Omega} \times K)} d(x, y)^p d\pi_n(x, y) \right)^{\frac{1}{p}} $$

by Hölder's inequality.

$$ \le L \left( \sup_k \mu_k(K) + \mu(K) \right)^{1-\frac{1}{p}} \text{OT}_p(\mu_n, \mu) \xrightarrow{n \to \infty} 0. $$

Therefore, taking the limsup in $n$ and then letting $\epsilon$ goes to 0, we obtain that $\mu_n(f) \to \mu(f)$. $\square$

<figure><img src="image_15.png" /></figure>
As $\mu_2 \in F$ and $\text{OT}_p(\mu, \mu_2) \le 3\epsilon$, the separability is proven.

To prove that the space is complete, consider a Cauchy sequence $(\mu_n)_n$. As the sequence $(\text{Pers}_p(\mu_n))_n = (\text{OT}_p^p(\mu_n, 0))_n$ is a Cauchy sequence, it is bounded. Therefore, for $K \subset \Omega$ a compact set, (15) implies that $\sup_n \mu_n(K) < \infty$. Proposition A.1 implies that $(\mu_n)_n$ is relatively compact for the vague topology on $\Omega$. Consider $(\mu_{n_k})_k$ a subsequence converging vaguely on $\Omega$ to some measure $\mu$. By the lower semi-continuity of $\text{OT}_p$,

$$ \text{Pers}_p(\mu) = \text{OT}_p^p(\mu, 0) \le \liminf_{k \to \infty} \text{OT}_p^p(\mu_{n_k}, 0) < \infty, $$

so that $\mu \in \mathcal{M}^p$. Using once again the lower semi-continuity of $\text{OT}_p$,

$$ \begin{aligned} \text{OT}_p(\mu_n, \mu) &\le \liminf_{k \to \infty} \text{OT}_p(\mu_n, \mu_{n_k}) \\ \lim_{n \to \infty} \text{OT}_p(\mu_n, \mu) &\le \lim_{n \to \infty} \liminf_{k \to \infty} \text{OT}_p(\mu_n, \mu_{n_k}) = 0, \end{aligned} $$

ensuring that $\text{OT}_p(\mu_n, \mu) \to 0$, that is the space is complete. $\square$

*Proof of the direct implication of Theorem 3.4.* Let $\mu, \mu_1, \mu_2, \dots$ be elements of $\mathcal{M}^p$ and assume that the sequence $(\text{OT}_p(\mu_n, \mu))_n$ converges to 0. The triangle inequality implies that $\text{Pers}_p(\mu_n) = \text{OT}_p^p(\mu_n, 0)$ converges to $\text{Pers}_p(\mu) = \text{OT}_p^p(\mu, 0)$. Let $f \in C_c(\Omega)$, whose support is included in some compact set $K$. For any $\epsilon > 0$, there exists a Lipschitz function $f_\epsilon$, with Lipschitz constant $L$ and whose support is included in $K$, with the $\infty$-norm $\|f - f_\epsilon\|_\infty$ less than or equal to $\epsilon$. The convergence of $\text{Pers}_p(\mu_n)$ and (15) imply that $\sup_k \mu_k(K) < \infty$. Let $\pi_n \in \text{Opt}_p(\mu_n, \mu)$, we have

$$ \begin{aligned} |\mu_n(f) - \mu(f)| &\le |\mu_n(f - f_\epsilon)| + |\mu(f - f_\epsilon)| + |\mu_n(f_\epsilon) - \mu(f_\epsilon)| \\ &\le (\mu_n(K) + \mu(K))\epsilon + |\mu_n(f_\epsilon) - \mu(f_\epsilon)| \\ &\le (\sup_k \mu_k(K) + \mu(K))\epsilon + |\mu_n(f_\epsilon) - \mu(f_\epsilon)|. \end{aligned} $$

Also,

$$ \begin{aligned} |\mu_n(f_\epsilon) - \mu(f_\epsilon)| &\le \iint_{\overline{\Omega}^2} |f_\epsilon(x) - f_\epsilon(y)| d\pi_n(x, y) \quad \text{where } \pi_n \in \text{Opt}(\mu_n, \mu) \\ &\le L \iint_{(K \times \overline{\Omega}) \cup (\overline{\Omega} \times K)} d(x, y) d\pi_n(x, y) \end{aligned} $$

$$ \le L \pi_n((K \times \overline{\Omega}) \cup (\overline{\Omega} \times K))^{1-\frac{1}{p}} \left( \iint_{(K \times \overline{\Omega}) \cup (\overline{\Omega} \times K)} d(x, y)^p d\pi_n(x, y) \right)^{\frac{1}{p}} $$

by Hölder's inequality.

$$ \le L \left( \sup_k \mu_k(K) + \mu(K) \right)^{1-\frac{1}{p}} \text{OT}_p(\mu_n, \mu) \xrightarrow{n \to \infty} 0. $$

Therefore, taking the limsup in $n$ and then letting $\epsilon$ goes to 0, we obtain that $\mu_n(f) \to \mu(f)$. $\square$
C Proofs of the technical lemmas of Section 4

The following proof is already found in [46]. We reproduce it here for the sake of completeness.

Proof of Lemma 4.2. Recall that $P_n$ is a sequence in $W^p(M^p)$ such that each $P_n$ has a $p$-Fréchet mean $\mu_n$ and that $W_{p,OT_p}(P_n, P) \to 0$ for some $P \in W^p(M^p)$. According to the beginning of the proof of Proposition 4.2, the sequence $(\mu_n)_n$ is relatively compact for the vague convergence. Let $\nu \in M^p$ and let $\mu$ be the vague limit of some subsequence, which, for ease of notations, will be denoted as the initial sequence. By Skorokhod's representation theorem [4, Theorem 6.7], as $P_n$ converges weakly to $P$, there exists a probabilistic space on which are defined random variables $\mu \sim P$ and $\mu_n \sim P_n$ for $n \ge 0$, such that $\mu_n$ converges almost surely with respect to the $OT_p$ metric towards $\mu$. Using those random variables, we have

$$
\begin{align*}
\mathcal{E}(\nu) &= \mathbb{E}\mathrm{OT}_p^p(\nu, \boldsymbol{\mu}) = W_{p,\mathrm{OT}_p}^p(\delta_\nu, P) \\
&= \lim_n W_{p,\mathrm{OT}_p}^p(\delta_\nu, P_n) \quad \text{since } W_{p,\mathrm{OT}_p}(P_n, P) \to 0 \\
&= \lim_n \mathbb{E}\mathrm{OT}_p^p(\nu, \boldsymbol{\mu}_n) \\
&\ge \lim_n \mathbb{E}\mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}_n) \quad \text{since } \mu_n \text{ is a barycenter of } P_n \\
&\ge \mathbb{E}\liminf_n \mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}_n) \quad \text{by Fatou's lemma} \\
&\ge \mathbb{E}\mathrm{OT}_p^p(\mu, \boldsymbol{\mu}) = \mathcal{E}(\mu) \quad \text{by lower semi-continuity of } \mathrm{OT}_p \text{ (Prop. 3.1).}
\end{align*}
$$

This implies that $\mu$ is a barycenter of $P$. We are now going to show that, almost surely, $\liminf_n \mathrm{OT}_p(\mu_n, \boldsymbol{\mu}) = \mathrm{OT}_p(\mu, \boldsymbol{\mu})$. This concludes the proof by letting $n_k$ be the subsequence attaining the liminf for some fixed realization of $\boldsymbol{\mu}$. By plugging in $\nu = \mu$ in (33), all the inequalities become equalities, and in particular,

$$ \lim_n W_{p,\mathrm{OT}_p}^p(\delta_{\mu_n}, P_n) = \lim_n \mathbb{E}\mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}_n) = \mathbb{E}\mathrm{OT}_p^p(\mu, \boldsymbol{\mu}) = W_{p,\mathrm{OT}_p}^p(\delta_{\mu}, P). $$

This yields

$$ \begin{align*} 0 \le W_{p,\mathrm{OT}_p}(\delta_{\mu_n}, P) - W_{p,\mathrm{OT}_p}(\delta_{\mu}, P) & \\ & \le W_{p,\mathrm{OT}_p}(\delta_{\mu_n}, P_n) + W_{p,\mathrm{OT}_p}(P_n, P) - W_{p,\mathrm{OT}_p}(\delta_{\mu}, P) \to 0 \end{align*} $$

as $n$ goes to $+\infty$, i.e. $\lim_n W_{p,\mathrm{OT}_p}(\delta_{\mu_n}, P) = W_{p,\mathrm{OT}_p}(\delta_{\mu}, P)$. Therefore,

$$
\begin{align*}
\mathbb{E}\mathrm{OT}_p^p(\mu, \boldsymbol{\mu}) &= W_{p,\mathrm{OT}_p}^p(\delta_\mu, P) = \lim_n W_{p,\mathrm{OT}_p}^p(\delta_{\mu_n}, P) = \lim_n \mathbb{E}\mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}) \\
&\ge \mathbb{E}\liminf_n \mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}) \text{ by Fatou's lemma} \\
&\ge \mathbb{E}\mathrm{OT}_p^p(\mu, \boldsymbol{\mu}) \text{ by lower semi-continuity of } \mathrm{OT}_p.
\end{align*}
$$

As $\liminf_n \mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}) \ge \mathrm{OT}_p^p(\mu, \boldsymbol{\mu})$ and $\mathbb{E}\liminf_n \mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}) = \mathbb{E}\mathrm{OT}_p^p(\mu, \boldsymbol{\mu})$, we actually have $\liminf_n \mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}) = \mathrm{OT}_p^p(\mu, \boldsymbol{\mu})$, concluding the proof. $\square$

Proof of Lemma 4.3. For the direct implication, take $\nu = 0$ and apply Theorem 3.4.

Let us prove the converse implication. Assume that $\mu_n \xrightarrow{v} \mu$ and $\mathrm{OT}_p(\mu_n, \nu) \to \mathrm{OT}_p(\mu, \nu)$ for some $\nu \in D^p$. The vague convergence of $(\mu_n)_n$ implies that $\mu^{(p)}$
C Proofs of the technical lemmas of Section 4

The following proof is already found in [46]. We reproduce it here for the sake of completeness.

Proof of Lemma 4.2. Recall that $P_n$ is a sequence in $W^p(M^p)$ such that each $P_n$ has a $p$-Fréchet mean $\mu_n$ and that $W_{p,OT_p}(P_n, P) \to 0$ for some $P \in W^p(M^p)$. According to the beginning of the proof of Proposition 4.2, the sequence $(\mu_n)_n$ is relatively compact for the vague convergence. Let $\nu \in M^p$ and let $\mu$ be the vague limit of some subsequence, which, for ease of notations, will be denoted as the initial sequence. By Skorokhod's representation theorem [4, Theorem 6.7], as $P_n$ converges weakly to $P$, there exists a probabilistic space on which are defined random variables $\mu \sim P$ and $\mu_n \sim P_n$ for $n \ge 0$, such that $\mu_n$ converges almost surely with respect to the $OT_p$ metric towards $\mu$. Using those random variables, we have

$$
\begin{align*}
\mathcal{E}(\nu) &= \mathbb{E}\mathrm{OT}_p^p(\nu, \boldsymbol{\mu}) = W_{p,\mathrm{OT}_p}^p(\delta_\nu, P) \\
&= \lim_n W_{p,\mathrm{OT}_p}^p(\delta_\nu, P_n) \quad \text{since } W_{p,\mathrm{OT}_p}(P_n, P) \to 0 \\
&= \lim_n \mathbb{E}\mathrm{OT}_p^p(\nu, \boldsymbol{\mu}_n) \\
&\ge \lim_n \mathbb{E}\mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}_n) \quad \text{since } \mu_n \text{ is a barycenter of } P_n \\
&\ge \mathbb{E}\liminf_n \mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}_n) \quad \text{by Fatou's lemma} \\
&\ge \mathbb{E}\mathrm{OT}_p^p(\mu, \boldsymbol{\mu}) = \mathcal{E}(\mu) \quad \text{by lower semi-continuity of } \mathrm{OT}_p \text{ (Prop. 3.1).}
\end{align*}
$$

This implies that $\mu$ is a barycenter of $P$. We are now going to show that, almost surely, $\liminf_n \mathrm{OT}_p(\mu_n, \boldsymbol{\mu}) = \mathrm{OT}_p(\mu, \boldsymbol{\mu})$. This concludes the proof by letting $n_k$ be the subsequence attaining the liminf for some fixed realization of $\boldsymbol{\mu}$. By plugging in $\nu = \mu$ in (33), all the inequalities become equalities, and in particular,

$$ \lim_n W_{p,\mathrm{OT}_p}^p(\delta_{\mu_n}, P_n) = \lim_n \mathbb{E}\mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}_n) = \mathbb{E}\mathrm{OT}_p^p(\mu, \boldsymbol{\mu}) = W_{p,\mathrm{OT}_p}^p(\delta_{\mu}, P). $$

This yields

$$ \begin{align*} 0 \le W_{p,\mathrm{OT}_p}(\delta_{\mu_n}, P) - W_{p,\mathrm{OT}_p}(\delta_{\mu}, P) & \\ & \le W_{p,\mathrm{OT}_p}(\delta_{\mu_n}, P_n) + W_{p,\mathrm{OT}_p}(P_n, P) - W_{p,\mathrm{OT}_p}(\delta_{\mu}, P) \to 0 \end{align*} $$

as $n$ goes to $+\infty$, i.e. $\lim_n W_{p,\mathrm{OT}_p}(\delta_{\mu_n}, P) = W_{p,\mathrm{OT}_p}(\delta_{\mu}, P)$. Therefore,

$$
\begin{align*}
\mathbb{E}\mathrm{OT}_p^p(\mu, \boldsymbol{\mu}) &= W_{p,\mathrm{OT}_p}^p(\delta_\mu, P) = \lim_n W_{p,\mathrm{OT}_p}^p(\delta_{\mu_n}, P) = \lim_n \mathbb{E}\mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}) \\
&\ge \mathbb{E}\liminf_n \mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}) \text{ by Fatou's lemma} \\
&\ge \mathbb{E}\mathrm{OT}_p^p(\mu, \boldsymbol{\mu}) \text{ by lower semi-continuity of } \mathrm{OT}_p.
\end{align*}
$$

As $\liminf_n \mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}) \ge \mathrm{OT}_p^p(\mu, \boldsymbol{\mu})$ and $\mathbb{E}\liminf_n \mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}) = \mathbb{E}\mathrm{OT}_p^p(\mu, \boldsymbol{\mu})$, we actually have $\liminf_n \mathrm{OT}_p^p(\mu_n, \boldsymbol{\mu}) = \mathrm{OT}_p^p(\mu, \boldsymbol{\mu})$, concluding the proof. $\square$

Proof of Lemma 4.3. For the direct implication, take $\nu = 0$ and apply Theorem 3.4.

Let us prove the converse implication. Assume that $\mu_n \xrightarrow{v} \mu$ and $\mathrm{OT}_p(\mu_n, \nu) \to \mathrm{OT}_p(\mu, \nu)$ for some $\nu \in D^p$. The vague convergence of $(\mu_n)_n$ implies that $\mu^{(p)}$
<figure><img src="image_16.png" /><figcaption>Figure 7: Partition of Ω used in the proof of Lemma 4.3.</figcaption></figure>

is the only possible accumulation point for weak convergence of the sequence $(\mu_n^{(p)})_n$. Therefore, it is sufficient to show that the sequence $(\mu_n^{(p)})_n$ is relatively compact for weak convergence (i.e. tight and bounded in total variation, see Proposition A.2). Indeed, this would mean that $(\mu_n^{(p)})$ converges weakly to $\mu^{(p)}$, or equivalently by Proposition A.3 that $\mu_n \xrightarrow{v} \mu$ and $\text{Pers}_p(\mu_n) \to \text{Pers}_p(\mu)$. The conclusion is then obtained thanks to Theorem 3.4.

Thus, let $(\mu_n)_n$ be any subsequence and $(\pi_n)_n$ be corresponding optimal transport plans between $\mu_n$ and $\nu$. The vague convergence of $(\mu_n)_n$ implies that $(\pi_n)_n$ is relatively compact with respect to the VM topology. Let $\pi$ be a limit of any converging subsequence of $(\pi_n)_n$, which indexes are still denoted by $n$. One can prove that $\pi \in \text{Opt}(\mu, \nu)$ (see [28, Prop. 2.3]). For $r > 0$, define $A_r := \{x \in \Omega, d(x, \partial\Omega) \le r\}$ and write $\bar{A}_r$ for $A_r \cup \partial\Omega$. Consider $\eta > 1$. We can write

$$ \begin{aligned} \int_{A_r} d(x, \partial\Omega)^p d\mu_n(x) &= \iint_{A_r \times \bar{\Omega}} d(x, \partial\Omega)^p d\pi_n(x, y) \\ &= \iint_{A_r \times (\Omega \setminus A_{\eta r})} d(x, \partial\Omega)^p d\pi_n(x, y) + \iint_{\bar{A}_r \times \bar{A}_{\eta r}} d(x, \partial\Omega)^p d\pi_n(x, y) \\ &\le \frac{1}{(\eta-1)^p} \iint_{A_r \times (\Omega \setminus A_{\eta r})} d(x, y)^p d\pi_n(x, y) + \iint_{\bar{A}_r \times \bar{A}_{\eta r}} d(x, \partial\Omega)^p d\pi_n(x, y) \\ &\le \frac{1}{(\eta-1)^p} \text{OT}_p^p(\mu_n, \nu) + 2^{p-1} \left( \iint_{\bar{A}_r \times \bar{A}_{\eta r}} d(x, y)^p d\pi_n(x, y) + \iint_{\bar{A}_r \times \bar{A}_{\eta r}} d(y, \partial\Omega)^p d\pi_n(x, y) \right) \\ &\le \frac{1}{(\eta-1)^p} \text{OT}_p^p(\mu_n, \nu) + 2^{p-1} \left( \text{OT}_p^p(\mu_n, \nu) - \iint_{E_{\Omega \setminus (\bar{A}_r \times \bar{A}_{\eta r})}} d(x, y)^p d\pi_n(x, y) + \int_{A_{\eta r}} d(y, \partial\Omega)^p d\nu(y) \right) \end{aligned} $$

where (*) holds because $d(x, y) \ge (\eta-1)r \ge (\eta-1)d(x, \partial\Omega)$ for $(x, y) \in A_r \times A_{\eta r}^c$.
<figure><img src="image_14.png" /><figcaption>Figure 7: Partition of Ω used in the proof of Lemma 4.3.</figcaption></figure>

is the only possible accumulation point for weak convergence of the sequence $(\mu_n^{(p)})_n$. Therefore, it is sufficient to show that the sequence $(\mu_n^{(p)})_n$ is relatively compact for weak convergence (i.e. tight and bounded in total variation, see Proposition A.2). Indeed, this would mean that $(\mu_n^{(p)})$ converges weakly to $\mu^{(p)}$, or equivalently by Proposition A.3 that $\mu_n \xrightarrow{v} \mu$ and $\text{Pers}_p(\mu_n) \to \text{Pers}_p(\mu)$. The conclusion is then obtained thanks to Theorem 3.4.

Thus, let $(\mu_n)_n$ be any subsequence and $(\pi_n)_n$ be corresponding optimal transport plans between $\mu_n$ and $\nu$. The vague convergence of $(\mu_n)_n$ implies that $(\pi_n)_n$ is relatively compact with respect to the VM topology. Let $\pi$ be a limit of any converging subsequence of $(\pi_n)_n$, which indexes are still denoted by $n$. One can prove that $\pi \in \text{Opt}(\mu, \nu)$ (see [28, Prop. 2.3]). For $r > 0$, define $A_r := \{x \in \Omega, d(x, \partial\Omega) \le r\}$ and write $\bar{A}_r$ for $A_r \cup \partial\Omega$. Consider $\eta > 1$. We can write

$$ 
\begin{align*}
\int_{A_r} d(x, \partial\Omega)^p d\mu_n(x) &= \iint_{A_r \times \bar{\Omega}} d(x, \partial\Omega)^p d\pi_n(x, y) \\
&= \iint_{A_r \times (\Omega \setminus A_{\eta r})} d(x, \partial\Omega)^p d\pi_n(x, y) + \iint_{\bar{A}_r \times \bar{A}_{\eta r}} d(x, \partial\Omega)^p d\pi_n(x, y) \\
&\stackrel{(*)}{\le} \frac{1}{(\eta-1)^p} \iint_{A_r \times (\Omega \setminus A_{\eta r})} d(x, y)^p d\pi_n(x, y) + \iint_{\bar{A}_r \times \bar{A}_{\eta r}} d(x, \partial\Omega)^p d\pi_n(x, y) \\
&\le \frac{1}{(\eta-1)^p} \text{OT}_p^p(\mu_n, \nu) + 2^{p-1} \left( \iint_{\bar{A}_r \times \bar{A}_{\eta r}} d(x, y)^p d\pi_n(x, y) + \iint_{\bar{A}_r \times \bar{A}_{\eta r}} d(y, \partial\Omega)^p d\pi_n(x, y) \right) \\
&\le \frac{1}{(\eta-1)^p} \text{OT}_p^p(\mu_n, \nu) + 2^{p-1} \left( \text{OT}_p^p(\mu_n, \nu) - \iint_{E_{\Omega \setminus (\bar{A}_r \times \bar{A}_{\eta r})}} d(x, y)^p d\pi_n(x, y) + \int_{A_{\eta r}} d(y, \partial\Omega)^p d\nu(y) \right)
\end{align*}
$$

where (*) holds because $d(x, y) \ge (\eta-1)r \ge (\eta-1)d(x, \partial\Omega)$ for $(x, y) \in A_r \times A_{\eta r}^c$.
Therefore,

$$ \limsup_{n \to \infty} \int_{A_r} d(x, \partial\Omega)^p d\mu_n(x) \le \frac{1}{(\eta-1)^p} \mathrm{OT}_p^p(\mu, \nu) + 2^{p-1} \left( \mathrm{OT}_p^p(\mu, \nu) - \iint_{E_\Omega \setminus (\bar{A}_r \times \bar{A}_{\eta r})} d(x, y)^p d\pi(x, y) + \int_{A_{\eta r}} d(y, \partial\Omega)^p d\nu(y) \right) $$

Note that at the last line, we used the Portmanteau theorem (see Proposition A.4) on the sequence of measures $(d(x, y)^p d\pi_n(x, y))_n$ for the open set $E_\Omega \setminus (\bar{A}_r \times \bar{A}_{\eta r})$. Letting $r$ goes to 0, then $\eta$ goes to infinity, one obtains

$$ \lim_{r \to 0} \limsup_{n \to \infty} \int_{A_r} d(x, \partial\Omega)^p d\mu_n(x) = 0. $$

The second part consists in showing that there can not be mass escaping “at infinity” in the subsequence $(\mu_n^{(p)})_n$. Fix $r, M > 0$. For $x \in \Omega$, denote $s(x)$ the projection of $x$ on $\partial\Omega$. Pose

$$ K_{M,r} := \{x \in \Omega \setminus A_r, d(x, \partial\Omega) < M, d(s(x), 0) < M\} $$

and $L_{M,r}$ the closure of $\Omega \setminus (A_r \cup K_{M,r})$ (see Figure 7). For $r' > 0$,

$$ \begin{align*} \int_{L_{M,r}} d(x, \partial\Omega)^p d\mu_n(x) &= \iint_{L_{M,r} \times \bar{\Omega}} d(x, \partial\Omega)^p d\pi_n(x, y) \\ &= \iint_{L_{M,r} \times (L_{M/2,r'} \cup \bar{A}_{r'})} d(x, \partial\Omega)^p d\pi_n(x, y) + \iint_{L_{M,r} \times K_{M/2,r'}} d(x, \partial\Omega)^p d\pi_n(x, y) \\ &\le 2^{p-1} \iint_{L_{M,r} \times (L_{M/2,r'} \cup \bar{A}_{r'})} d(x, y)^p d\pi_n(x, y) \\ &\quad + 2^{p-1} \iint_{L_{M,r} \times (L_{M/2,r'} \cup \bar{A}_{r'})} d(\partial\Omega, y)^p d\pi_n(x, y) \\ &\quad + \iint_{L_{M,r} \times K_{M/2,r'}} d(x, \partial\Omega)^p d\pi_n(x, y). \end{align*} $$

We treat the three parts of the sum separately. As before, taking the lim sup in $n$ and letting $M$ goes to $\infty$, the first part of the sum converges to 0 (apply the Portmanteau theorem on the open set $E_\Omega \setminus (L_{M,r} \times (L_{M/2,r'} \cup \bar{A}_{r'}))$. The second part is less than or equal to

$$ 2^{p-1} \int_{L_{M/2,r'} \cup A_{r'}} d(y, \partial\Omega)^p d\nu(y), $$

which converges to 0 as $M \to \infty$ and $r' \to 0$. For the third part, notice that if $(x, y) \in L_{M,r} \times K_{M/2,r'}$, then

$$ d(x, \partial\Omega) \le d(x, s(y)) \le d(x, y) + d(y, s(y)) \le d(x, y) + \frac{M}{2} \le 2d(x, y). $$
Therefore,

$$ \limsup_{n \to \infty} \int_{A_r} d(x, \partial\Omega)^p d\mu_n(x) \le \frac{1}{(\eta-1)^p} \mathrm{OT}_p^p(\mu, \nu) + 2^{p-1} \left( \mathrm{OT}_p^p(\mu, \nu) - \iint_{E_\Omega \setminus (\bar{A}_r \times \bar{A}_{\eta r})} d(x, y)^p d\pi(x, y) + \int_{A_{\eta r}} d(y, \partial\Omega)^p d\nu(y) \right) $$

Note that at the last line, we used the Portmanteau theorem (see Proposition A.4) on the sequence of measures $(d(x, y)^p d\pi_n(x, y))_n$ for the open set $E_\Omega \setminus (\bar{A}_r \times \bar{A}_{\eta r})$. Letting $r$ goes to 0, then $\eta$ goes to infinity, one obtains

$$ \lim_{r \to 0} \limsup_{n \to \infty} \int_{A_r} d(x, \partial\Omega)^p d\mu_n(x) = 0. $$

The second part consists in showing that there can not be mass escaping “at infinity” in the subsequence $(\mu_n^{(p)})_n$. Fix $r, M > 0$. For $x \in \Omega$, denote $s(x)$ the projection of $x$ on $\partial\Omega$. Pose

$$ K_{M,r} := \{x \in \Omega \setminus A_r, d(x, \partial\Omega) < M, d(s(x), 0) < M\} $$

and $L_{M,r}$ the closure of $\Omega \setminus (A_r \cup K_{M,r})$ (see Figure 7). For $r' > 0$,

$$ \begin{aligned} \int_{L_{M,r}} d(x, \partial\Omega)^p d\mu_n(x) &= \iint_{L_{M,r} \times \bar{\Omega}} d(x, \partial\Omega)^p d\pi_n(x, y) \\ &= \iint_{L_{M,r} \times (L_{M/2,r'} \cup \bar{A}_{r'})} d(x, \partial\Omega)^p d\pi_n(x, y) + \iint_{L_{M,r} \times K_{M/2,r'}} d(x, \partial\Omega)^p d\pi_n(x, y) \\ &\le 2^{p-1} \iint_{L_{M,r} \times (L_{M/2,r'} \cup \bar{A}_{r'})} d(x, y)^p d\pi_n(x, y) \\ &\quad + 2^{p-1} \iint_{L_{M,r} \times (L_{M/2,r'} \cup \bar{A}_{r'})} d(\partial\Omega, y)^p d\pi_n(x, y) \\ &\quad + \iint_{L_{M,r} \times K_{M/2,r'}} d(x, \partial\Omega)^p d\pi_n(x, y). \end{aligned} $$

We treat the three parts of the sum separately. As before, taking the lim sup in $n$ and letting $M$ goes to $\infty$, the first part of the sum converges to 0 (apply the Portmanteau theorem on the open set $E_\Omega \setminus (L_{M,r} \times (L_{M/2,r'} \cup \bar{A}_{r'}))$. The second part is less than or equal to

$$ 2^{p-1} \int_{L_{M/2,r'} \cup A_{r'}} d(y, \partial\Omega)^p d\nu(y), $$

which converges to 0 as $M \to \infty$ and $r' \to 0$. For the third part, notice that if $(x, y) \in L_{M,r} \times K_{M/2,r'}$, then

$$ d(x, \partial\Omega) \le d(x, s(y)) \le d(x, y) + d(y, s(y)) \le d(x, y) + \frac{M}{2} \le 2d(x, y). $$
Therefore,

$$ \iint_{L_{M,r} \times \bar{K}_{M/2,r'}} d(x, \partial\Omega)^p d\pi_n(x, y) \le 2^p \iint_{L_{M,r} \times \bar{K}_{M/2,r'}} d(x, y)^p d\pi_n(x, y) \\ \le 2^p \iint_{L_{M,r} \times \bar{\Omega}} d(x, y)^p d\pi_n(x, y). $$

As before, it is shown that $\limsup_n \iint_{L_{M,r} \times \bar{\Omega}} d(x, y)^p d\pi_n(x, y)$ converges to 0 when $M$ goes to infinity by applying the Portmanteau theorem on the open set $E_{\Omega} \setminus (L_{M,r} \times \bar{\Omega})$.

Finally, we have shown, that by taking $r$ small enough and $M$ large enough, one can find a compact set $\bar{K}_{M,r}$ such that $\int_{\Omega \setminus \bar{K}_{M,r}} d(x, \partial\Omega)^p d\mu_n = \mu_n^{(p)}(\Omega \setminus \bar{K}_{M,r})$ is uniformly small: $(\mu_n^{(p)})_n$ is tight. As we have

$$ \mu_n^{(p)}(\Omega) = \mathrm{Pers}_p(\mu_n) = \mathrm{OT}_p^p(\mu_n, 0) \\ \le (\mathrm{OT}_p(\mu_n, \nu) + \mathrm{OT}_p(\nu, 0))^p \to (\mathrm{OT}_p(\mu, \nu) + \mathrm{OT}_p(\nu, 0))^p, $$

it is also bounded in total variation. Hence, $(\mu_n^{(p)})_n$ is relatively compact for the weak convergence: this concludes the proof. $\square$

**Proof of Lemma 4.4.** Let $P = \sum_{i=1}^N \lambda_i \delta_{a_i}$ a probability distribution with $a_i \in D_f$ of mass $m_i \in \mathbb{N}$, and define $m_{tot} = \sum_{i=1}^N m_i$. By Proposition 4.1, every $p$-Fréchet mean $a$ of $P$ is in correspondence with a $p$-Fréchet mean for the Wasserstein distance $\tilde{a}$ of $\tilde{P} = \sum_{i=1}^N \lambda_i \delta_{\tilde{a}_i}$, where $\tilde{a}_i = a_i + (m_{tot} - m_i)\delta_{\partial\Omega}$, with $a$ being the restriction of $\tilde{a}$ to $\Omega$.

Let thus fix $m \in \mathbb{N}$, and let $\tilde{a}_1, \dots, \tilde{a}_N$ be point measures of mass $m$ in $\tilde{\Omega}$. Write $\tilde{a}_i = \sum_{j=1}^m \delta_{x_{i,j}}$, so that $x_{i,j} \in \tilde{\Omega}$ for $1 \le i \le N$, $1 \le j \le m$, with the $x_{i,j}$s non-necessarily distinct. Define

$$ T: (x_1, \dots, x_N) \in \tilde{\Omega}^N \mapsto \arg\min \left\{ \sum_{i=1}^N \lambda_i \rho(x_i, y)^p, y \in \tilde{\Omega} \right\} \in \tilde{\Omega}. \quad (34) $$

Since we assume $p > 1$, $T$ is well-defined and is continuous (the minimizer is unique by strict convexity). Using the localization property stated in [12, Section 2.2], we know that the support of a $p$-Fréchet mean of $\tilde{P}$ is included in the finite set

$$ S := \{T(x_{1,j_1}, \dots, x_{N,j_N}), 1 \le j_1, \dots, j_N \le m\}. $$

Let $K = m^N$ and let $z_1, \dots, z_K$ be an enumeration of the points of $S$ (with potential repetitions). Denote by $\mathrm{Gr}(z_k)$ the $N$ elements $x_1, \dots, x_N$, with $x_i \in \mathrm{spt}(\tilde{a}_i)$, such that $z_k = T(x_1, \dots, x_N)$. It is explained in [12, §2.3], that finding a $p$-Fréchet mean of $\tilde{P}$ is equivalent to finding a minimizer of the problem

$$ \inf_{(\gamma_1, \dots, \gamma_N) \in \Pi} \sum_{i=1}^{N} \lambda_i \iint_{\tilde{\Omega}^2} \rho(x_i, y)^p d\gamma_i(x_i, y), \quad (35) $$

where $\Pi$ is the set of plans $(\gamma_i)_{i=1,\dots,N}$, with $\gamma_i$ having for first marginal $\tilde{a}_i$, and such that all $\gamma_i$s share the same (non-fixed) second marginal. Furthermore, we can
Therefore,

$$ \iint_{L_{M,r} \times \bar{K}_{M/2,r'}} d(x, \partial\Omega)^p d\pi_n(x, y) \le 2^p \iint_{L_{M,r} \times \bar{K}_{M/2,r'}} d(x, y)^p d\pi_n(x, y) \\ \le 2^p \iint_{L_{M,r} \times \bar{\Omega}} d(x, y)^p d\pi_n(x, y). $$

As before, it is shown that $\limsup_n \iint_{L_{M,r} \times \bar{\Omega}} d(x, y)^p d\pi_n(x, y)$ converges to 0 when $M$ goes to infinity by applying the Portmanteau theorem on the open set $E_{\Omega} \setminus (L_{M,r} \times \bar{\Omega})$.

Finally, we have shown, that by taking $r$ small enough and $M$ large enough, one can find a compact set $\bar{K}_{M,r}$ such that $\int_{\Omega \setminus \bar{K}_{M,r}} d(x, \partial\Omega)^p d\mu_n = \mu_n^{(p)}(\Omega \setminus \bar{K}_{M,r})$ is uniformly small: $(\mu_n^{(p)})_n$ is tight. As we have

$$ \mu_n^{(p)}(\Omega) = \mathrm{Pers}_p(\mu_n) = \mathrm{OT}_p^p(\mu_n, 0) \\ \le (\mathrm{OT}_p(\mu_n, \nu) + \mathrm{OT}_p(\nu, 0))^p \to (\mathrm{OT}_p(\mu, \nu) + \mathrm{OT}_p(\nu, 0))^p, $$

it is also bounded in total variation. Hence, $(\mu_n^{(p)})_n$ is relatively compact for the weak convergence: this concludes the proof. $\square$

**Proof of Lemma 4.4.** Let $P = \sum_{i=1}^N \lambda_i \delta_{a_i}$ a probability distribution with $a_i \in D_f$ of mass $m_i \in \mathbb{N}$, and define $m_{tot} = \sum_{i=1}^N m_i$. By Proposition 4.1, every $p$-Fréchet mean $a$ of $P$ is in correspondence with a $p$-Fréchet mean for the Wasserstein distance $\tilde{a}$ of $\tilde{P} = \sum_{i=1}^N \lambda_i \delta_{\tilde{a}_i}$, where $\tilde{a}_i = a_i + (m_{tot} - m_i)\delta_{\partial\Omega}$, with $a$ being the restriction of $\tilde{a}$ to $\Omega$.

Let thus fix $m \in \mathbb{N}$, and let $\tilde{a}_1, \dots, \tilde{a}_N$ be point measures of mass $m$ in $\tilde{\Omega}$. Write $\tilde{a}_i = \sum_{j=1}^m \delta_{x_{i,j}}$, so that $x_{i,j} \in \tilde{\Omega}$ for $1 \le i \le N$, $1 \le j \le m$, with the $x_{i,j}$s non-necessarily distinct. Define

$$ T : (x_1, \dots, x_N) \in \tilde{\Omega}^N \mapsto \arg \min \left\{ \sum_{i=1}^N \lambda_i \rho(x_i, y)^p, y \in \tilde{\Omega} \right\} \in \tilde{\Omega}. \quad (34) $$

Since we assume $p > 1$, $T$ is well-defined and is continuous (the minimizer is unique by strict convexity). Using the localization property stated in [12, Section 2.2], we know that the support of a $p$-Fréchet mean of $\tilde{P}$ is included in the finite set

$$ S := \{T(x_{1,j_1}, \dots, x_{N,j_N}), 1 \le j_1, \dots, j_N \le m\}. $$

Let $K = m^N$ and let $z_1, \dots, z_K$ be an enumeration of the points of $S$ (with potential repetitions). Denote by $\mathrm{Gr}(z_k)$ the $N$ elements $x_1, \dots, x_N$, with $x_i \in \mathrm{spt}(\tilde{a}_i)$, such that $z_k = T(x_1, \dots, x_N)$. It is explained in [12, §2.3], that finding a $p$-Fréchet mean of $\tilde{P}$ is equivalent to finding a minimizer of the problem

$$ \inf_{(\gamma_1, \dots, \gamma_N) \in \Pi} \sum_{i=1}^{N} \lambda_i \iint_{\tilde{\Omega}^2} \rho(x_i, y)^p d\gamma_i(x_i, y), \quad (35) $$

where $\Pi$ is the set of plans $(\gamma_i)_{i=1, \dots, N}$, with $\gamma_i$ having for first marginal $\tilde{a}_i$, and such that all $\gamma_i$s share the same (non-fixed) second marginal. Furthermore, we can
assume without loss of generality that $(\gamma_1...\gamma_N)$ is supported on $(\mathrm{Gr}(z_k), z_k)_k$, i.e. a point $z_k$ in the $p$-Fréchet mean is necessary transported to its corresponding grouping $\mathrm{Gr}(z_k)$ by (optimal) $\gamma_1, ... \gamma_N$ [12, §2.3]. For such a minimizer, the common second marginal is a $p$-Fréchet mean of $\dot{P}$.

A potential minimizer of (35) is described by a vector $\gamma = (\gamma_{i,j,k}) \in \mathbb{R}_+^{NmK}$ such that:

$$ \left\{ \begin{array}{l} \text{for } 1 \le i \le N, 1 \le j \le m, \quad \sum_{k=1}^{K} \gamma_{i,j,k} = 1 \text{ and} \\ \text{for } 2 \le i \le N, 1 \le k \le K, \quad \sum_{j=1}^{m} \gamma_{1,j,k} = \sum_{j=1}^{m} \gamma_{i,j,k}. \end{array} \right. \qquad (36) $$

Let $c \in \mathbb{R}^{NmK}$ be the vector defined by $c_{i,j,k} = \mathbf{1}\{x_{i,j} \in \mathrm{Gr}(z_k)\}\lambda_i\rho(x_{i,j}, z_k)^p$. Then, the problem (35) is equivalent to

$$ \underset{\gamma \in \mathbb{R}_+^{NmK}}{\text{minimize}} \quad \gamma^T c \quad \text{under the constraints (36).} \qquad (37) $$

The set of $p$-Fréchet means of $P$ are in bijection with the set of minimizers of this Linear Programming problem (see [56, §5.15]), which is given by a face of the polyhedron described by the equations (36). Hence, if we show that this polyhedron is integer (i.e. its vertices have integer values), then it would imply that the extreme points of the set of $p$-Fréchet means of $P$ are point measures, concluding the proof. The constraints (36) are described by a matrix $A$ of size $(Nm + (N-1)K) \times NmK$ and a vector $b = [\mathbf{1}_{Nm}, \mathbf{0}_{(N-1)K}]$, such that $\gamma \in \mathbb{R}^{NmK}$ satisfies (36) if and only if $A\gamma = b$. A sufficient condition for the polyhedron $\{Ax \le b\}$ to be integer is to satisfy the following property (see [56, Section 5.17]): for all $u \in \mathbb{Z}^{NmK}$, the dual problem

$$ \max\{y^T b, y \ge 0 \text{ and } y^T A = u\} \qquad (38) $$

has either no solution (i.e. there is no $y \ge 0$ satisfying $y^T A = u$), or it has an integer optimal solution $y$.

For $y$ satisfying $y^T A = u$, write $y = [y^0, y^1]$ with $y^0 \in \mathbb{R}^{Nm}$ and $y^1 \in \mathbb{R}^{(N-1)K}$, so that $y^0$ is indexed on $1 \le i \le N$, $1 \le j \le m$ and $y^1$ is indexed on $2 \le i \le N$, $1 \le k \le K$. One can check that, for $2 \le i \le N$, $1 \le j \le m$, $1 \le k \le K$:

$$ u_{1,j,k} = y_{1,j}^0 + \sum_{i'=2}^{N} y_{i',k}^1 \quad \text{and} \quad u_{i,j,k} = y_{i,j}^0 - y_{i,k}^1, \qquad (39) $$

so that,

$$ \begin{align*} y^T b &= \sum_{i=1}^{N} \sum_{j=1}^{m} y_{i,j}^0 = \sum_{j=1}^{m} y_{1,j}^0 + \sum_{i=2}^{N} \sum_{j=1}^{m} y_{i,j}^0 \\ &= \sum_{j=1}^{m} (u_{1,j,k} - \sum_{i=2}^{N} y_{i,k}^1) + \sum_{i=2}^{N} \sum_{j=1}^{m} (u_{i,j,k} + y_{i,k}^1) \\ &= \sum_{i=1}^{N} \sum_{j=1}^{m} u_{i,j,k}. \end{align*} $$

Therefore, the function $y^T b$ is constant on the set $P := \{y \ge 0, y^T A = u\}$, and any point of the set is an argmax. We need to check that if the set $P$
assume without loss of generality that $(\gamma_1...\gamma_N)$ is supported on $(\mathrm{Gr}(z_k), z_k)_k$, i.e. a point $z_k$ in the $p$-Fréchet mean is necessary transported to its corresponding grouping $\mathrm{Gr}(z_k)$ by (optimal) $\gamma_1, ... \gamma_N$ [12, §2.3]. For such a minimizer, the common second marginal is a $p$-Fréchet mean of $\dot{P}$.

A potential minimizer of (35) is described by a vector $\gamma = (\gamma_{i,j,k}) \in \mathbb{R}_+^{NmK}$ such that:

$$ \left\{ \begin{array}{l} \text{for } 1 \le i \le N, 1 \le j \le m, \quad \sum_{k=1}^{K} \gamma_{i,j,k} = 1 \text{ and} \\ \text{for } 2 \le i \le N, 1 \le k \le K, \quad \sum_{j=1}^{m} \gamma_{1,j,k} = \sum_{j=1}^{m} \gamma_{i,j,k}. \end{array} \right. \qquad (36) $$

Let $c \in \mathbb{R}^{NmK}$ be the vector defined by $c_{i,j,k} = \mathbf{1}\{x_{i,j} \in \mathrm{Gr}(z_k)\}\lambda_i\rho(x_{i,j}, z_k)^p$. Then, the problem (35) is equivalent to

$$ \underset{\gamma \in \mathbb{R}_+^{NmK}}{\text{minimize}} \quad \gamma^T c \quad \text{under the constraints (36).} \qquad (37) $$

The set of $p$-Fréchet means of $P$ are in bijection with the set of minimizers of this Linear Programming problem (see [56, §5.15]), which is given by a face of the polyhedron described by the equations (36). Hence, if we show that this polyhedron is integer (i.e. its vertices have integer values), then it would imply that the extreme points of the set of $p$-Fréchet means of $P$ are point measures, concluding the proof. The constraints (36) are described by a matrix $A$ of size $(Nm + (N-1)K) \times NmK$ and a vector $b = [\mathbf{1}_{Nm}, \mathbf{0}_{(N-1)K}]$, such that $\gamma \in \mathbb{R}^{NmK}$ satisfies (36) if and only if $A\gamma = b$. A sufficient condition for the polyhedron $\{Ax \le b\}$ to be integer is to satisfy the following property (see [56, Section 5.17]): for all $u \in \mathbb{Z}^{NmK}$, the dual problem

$$ \max\{y^T b, y \ge 0 \text{ and } y^T A = u\} \qquad (38) $$

has either no solution (i.e. there is no $y \ge 0$ satisfying $y^T A = u$), or it has an integer optimal solution $y$.

For $y$ satisfying $y^T A = u$, write $y = [y^0, y^1]$ with $y^0 \in \mathbb{R}^{Nm}$ and $y^1 \in \mathbb{R}^{(N-1)K}$, so that $y^0$ is indexed on $1 \le i \le N$, $1 \le j \le m$ and $y^1$ is indexed on $2 \le i \le N$, $1 \le k \le K$. One can check that, for $2 \le i \le N$, $1 \le j \le m$, $1 \le k \le K$:

$$ u_{1,j,k} = y_{1,j}^0 + \sum_{i'=2}^{N} y_{i',k}^1 \quad \text{and} \quad u_{i,j,k} = y_{i,j}^0 - y_{i,k}^1, \qquad (39) $$

so that,

$$ \begin{align*} y^T b &= \sum_{i=1}^{N} \sum_{j=1}^{m} y_{i,j}^0 = \sum_{j=1}^{m} y_{1,j}^0 + \sum_{i=2}^{N} \sum_{j=1}^{m} y_{i,j}^0 \\ &= \sum_{j=1}^{m} (u_{1,j,k} - \sum_{i=2}^{N} y_{i,k}^1) + \sum_{i=2}^{N} \sum_{j=1}^{m} (u_{i,j,k} + y_{i,k}^1) \\ &= \sum_{i=1}^{N} \sum_{j=1}^{m} u_{i,j,k}. \end{align*} $$

Therefore, the function $y^T b$ is constant on the set $P := \{y \ge 0, y^T A = u\}$, and any point of the set is an argmax. We need to check that if the set $P$
is non-empty, then it contains a vector with integer coordinates: this would conclude the proof. A solution of the homogeneous equation $y^T A = 0$ satisfies $y_{i,j}^0 = y_{i,k}^1 = \lambda_i$ for $i \ge 2$ and $y_{1,j}^0 = -\sum_{i=2}^N y_{i,k}^1 = -\sum_{i=2}^N \lambda_i$ and reciprocally, any choice of $\lambda_i \in \mathbb{R}$ gives rise to a solution of the homogeneous equation. For a given $u$, one can verify that the set of solutions of $y^T A = u$ is given, for $\lambda_i \in \mathbb{R}$, by

$$ egin{cases} y_{1,j}^0 = \sum_{i=1}^N u_{i,j,k} - \sum_{i=2}^N \lambda_i \\ y_{i,j}^0 = \lambda_i \text{ for } i \ge 2, \\ y_{i,k}^1 = -u_{i,j,k} + \lambda_i \text{ for } i \ge 2. \end{cases} $$

Such a solution exists if and only if for all $j$, $U_j := \sum_{i=1}^N u_{i,j,k}$ does not depend on $k$ and for $i \ge 2$, $U_{i,k} := u_{i,j,k}$ does not depend on $j$. For such a vector $u$, $P$ corresponds to the $\lambda_i \ge 0$ with $\lambda_i \ge \max_k U_{i,k}$ and $U_j \ge \sum_{i=1}^N \lambda_i$. If this set is non empty, it contains as least the point corresponding to $\lambda_i = \max\{0, \max_k U_{i,k}\}$, which is an integer: this point is integer valued, concluding the proof. $\square$

## D Technical details regarding Section 5.3

Write $M_f$ for $M_f(\Omega)$ and define $M_\pm$ the space of finite signed measures on $\Omega$, i.e. a measure $\mu \in M_\pm$ is written $\mu_+ - \mu_-$ for two finite measures $\mu_+, \mu_- \in M_f$. The total variation distance $|\cdot|$ is a norm on $M_\pm$, and $(M_\pm, |\cdot|)$ is a Banach space. The Bochner integral [7] is a generalization of the Lebesgue integral for functions taking their values in Banach space. We define the expected persistence measure of $P \in W^p(M^p)$ as the Bochner integral of some pushforward of $P$. More precisely, recall the definition (19) of $\mu^{(p)}$ and define

$$ F : (M^p, \text{OT}_p) \rightarrow (M_\pm, |\cdot|) \\ \mu \mapsto \mu^{(p)}. $$

Note that $F$ has an inverse $G$ on $M_f$, defined by $G(\nu)(A) := \int_A d(x, \Omega)^{-p}d\nu(x)$ for $A \subset \Omega$ a Borel set. Theorem 3.4 implies that $G$ is a continuous function from $(M_f, |\cdot|)$ to $(M^p, \text{OT}_p)$. In particular, as $M_f$ and $M^p$ are Polish spaces and $G$ is injective, the map $F$ is measurable (see [38, Theorem 15.1]). For $P \in W^p(M^p(\Omega))$, define for $\boldsymbol{\mu} \sim P$, $\mathbb{E}[\boldsymbol{\mu}]$ the linear expectation of $P$ by

$$ \mathbb{E}[\boldsymbol{\mu}] := G \left( \int \nu d(F_{\#} P)(\nu) \right) \in M^p, \quad (40) $$

where the integral is the Bochner integral on the Banach space $(M_\pm, |\cdot|)$ and $F_{\#}P$ is the pushforward of $P$ by $F$. It is straightforward to check that $\mathbb{E}[\boldsymbol{\mu}]$ defined in that way satisfies the relation

$$ \forall K \subset \Omega \text{ compact, } \mathbb{E}[\boldsymbol{\mu}](K) = \mathbb{E}[\boldsymbol{\mu}(K)]. $$

The proof of Proposition 5.4 consists in applying Jensen's inequality in an infinite-dimensional setting. We first show that the function $\text{OT}_p^p$ is convex.

**Lemma D.1.** For $1 \le p < \infty$, the function $\text{OT}_p^p : M^p \times M^p \to \mathbb{R}$ is convex.
is non-empty, then it contains a vector with integer coordinates: this would conclude the proof. A solution of the homogeneous equation $y^T A = 0$ satisfies $y_{i,j}^0 = y_{i,k}^1 = \lambda_i$ for $i \ge 2$ and $y_{1,j}^0 = -\sum_{i=2}^N y_{i,k}^1 = -\sum_{i=2}^N \lambda_i$ and reciprocally, any choice of $\lambda_i \in \mathbb{R}$ gives rise to a solution of the homogeneous equation. For a given $u$, one can verify that the set of solutions of $y^T A = u$ is given, for $\lambda_i \in \mathbb{R}$, by

$$ \begin{cases} y_{1,j}^0 = \sum_{i=1}^N u_{i,j,k} - \sum_{i=2}^N \lambda_i \\ y_{i,j}^0 = \lambda_i \text{ for } i \ge 2, \\ y_{i,k}^1 = -u_{i,j,k} + \lambda_i \text{ for } i \ge 2. \end{cases} $$

Such a solution exists if and only if for all $j$, $U_j := \sum_{i=1}^N u_{i,j,k}$ does not depend on $k$ and for $i \ge 2$, $U_{i,k} := u_{i,j,k}$ does not depend on $j$. For such a vector $u$, $P$ corresponds to the $\lambda_i \ge 0$ with $\lambda_i \ge \max_k U_{i,k}$ and $U_j \ge \sum_{i=1}^N \lambda_i$. If this set is non empty, it contains as least the point corresponding to $\lambda_i = \max\{0, \max_k U_{i,k}\}$, which is an integer: this point is integer valued, concluding the proof. $\square$

## D Technical details regarding Section 5.3

Write $M_f$ for $M_f(\Omega)$ and define $M_\pm$ the space of finite signed measures on $\Omega$, i.e. a measure $\mu \in M_\pm$ is written $\mu_+ - \mu_-$ for two finite measures $\mu_+, \mu_- \in M_f$. The total variation distance $|\cdot|$ is a norm on $M_\pm$, and $(M_\pm, |\cdot|)$ is a Banach space. The Bochner integral [7] is a generalization of the Lebesgue integral for functions taking their values in Banach space. We define the expected persistence measure of $P \in W^p(M^p)$ as the Bochner integral of some pushforward of $P$. More precisely, recall the definition (19) of $\mu^{(p)}$ and define

$$ F : (M^p, \text{OT}_p) \rightarrow (M_\pm, |\cdot|) \\ \mu \mapsto \mu^{(p)}. $$

Note that $F$ has an inverse $G$ on $M_f$, defined by $G(\nu)(A) := \int_A d(x, \Omega)^{-p}d\nu(x)$ for $A \subset \Omega$ a Borel set. Theorem 3.4 implies that $G$ is a continuous function from $(M_f, |\cdot|)$ to $(M^p, \text{OT}_p)$. In particular, as $M_f$ and $M^p$ are Polish spaces and $G$ is injective, the map $F$ is measurable (see [38, Theorem 15.1]). For $P \in W^p(M^p(\Omega))$, define for $\boldsymbol{\mu} \sim P$, $\mathbb{E}[\boldsymbol{\mu}]$ the linear expectation of $P$ by

$$ \mathbb{E}[\boldsymbol{\mu}] := G \left( \int \nu d(F_{\#} P)(\nu) \right) \in M^p, \quad (40) $$

where the integral is the Bochner integral on the Banach space $(M_\pm, |\cdot|)$ and $F_{\#}P$ is the pushforward of $P$ by $F$. It is straightforward to check that $\mathbb{E}[\boldsymbol{\mu}]$ defined in that way satisfies the relation

$$ \forall K \subset \Omega \text{ compact, } \mathbb{E}[\boldsymbol{\mu}](K) = \mathbb{E}[\boldsymbol{\mu}(K)]. $$

The proof of Proposition 5.4 consists in applying Jensen's inequality in an infinite-dimensional setting. We first show that the function $\text{OT}_p^p$ is convex.

**Lemma D.1.** For $1 \le p < \infty$, the function $\text{OT}_p^p : M^p \times M^p \to \mathbb{R}$ is convex.
Proof. Fix $\mu_1, \mu_2, \nu_1, \nu_2 \in \mathcal{M}^p$ and $t \in [0, 1]$. Our goal is to show that

$$ \mathrm{OT}_p^p(t\mu_1 + (1-t)\mu_2, t\nu_1 + (1-t)\nu_2) \le \mathrm{OT}_p^p(\mu_1, \nu_1) + (1-t)\mathrm{OT}_p^p(\mu_2, \nu_2). $$

Let $\pi_{11} \in \mathrm{Opt}_p(\mu_1, \nu_1)$ and $\pi_{22} \in \mathrm{Opt}_p(\mu_2, \nu_2)$. It is straightforward to check that $\pi := t\pi_{11} + (1-t)\pi_{22}$ is an admissible plan between $t\mu_1 + (1-t)\mu_2$ and $t\nu_1+(1-t)\nu_2$. The cost of this admissible plan is $t\mathrm{OT}_p^p(\mu_1, \nu_1)+(1-t)\mathrm{OT}_p^p(\mu_2, \nu_2)$, which is therefore larger than $\mathrm{OT}_p^p(t\mu_1 + (1-t)\mu_2, t\nu_1 + (1-t)\nu_2)$. $\square$

We then use the following result, which is a particular case of [51, Theorem 3.10].

**Proposition D.1.** Let $\mathcal{X}$ be a Hausdorff locally convex topological vector space and $C \subset \mathcal{X}$ a closed convex set. Let $Q$ be a probability measure on $\mathcal{X}$ endowed with its borelian $\sigma$-algebra, which is supported on $C$. Assume that $\int \|x\|dQ(x) < \infty$. Let $f: C \to [0, \infty)$ be a continuous convex function with $\int f(x)dQ(x) < \infty$. Then

$$ f\left(\int x dQ(x)\right) \le \int f(x) dQ(x). $$

Let $\mathcal{X} = \mathcal{M}_{\pm} \times \mathcal{M}_{\pm}$ which is a Banach space (endowed with the product norm), and thus in particular a Hausdorff locally convex topological vector space. Let $C = \mathcal{M}_f \times \mathcal{M}_f$, which is convex and closed (closedness follows immediately from the definition of the total variation $|\cdot|$) and let $f = \mathrm{OT}_p^p \circ (G, G) : \mathcal{X} \to \mathbb{R}$. The continuity of $G$ implies that $f$ is continuous and Lemma D.1 implies the convexity of $f$. Let $P, P'$ be two probability measures in $W^p(\mathcal{M}^p)$ and $\gamma$ be an optimal coupling between $P$ and $P'$. We let $Q$ be the image measure of $\gamma$ by $(F, F)$, so that

$$ \begin{aligned} \int_{x \in \mathcal{X}} \|x\| dQ(x) &= \int_{\mu, \mu' \in \mathcal{M}^p} \max(|\mu^{(p)}|, |(\mu')^{(p)}|) d\gamma(\mu, \mu') \\ &\le \int_{\mu} \mathrm{Pers}_p(\mu) dP(\mu) + \int_{\mu'} \mathrm{Pers}_p(\mu') dP'(\mu') < \infty \end{aligned} $$

and that

$$ \int_{x \in \mathcal{X}} f(x) dQ(x) = \int_{\mu, \mu' \in \mathcal{M}^p} \mathrm{OT}_p^p(\mu, \mu') d\gamma(\mu, \mu') = W_{p, \mathrm{OT}_p}^p(P, P') < \infty. $$

Also, we have

$$ \begin{aligned} \int x dQ(x) &= \int_{\nu, \nu' \in \mathcal{M}^p} (\nu, \nu') d(F, F)_{\#} \gamma(\nu, \nu') \\ &= \left( \int_{\nu \in \mathcal{M}^p} \nu dF_{\#} P(\nu), \int_{\nu' \in \mathcal{M}^p} \nu' dF_{\#} P'(\nu') \right), \end{aligned} $$

so that by (40), $f(\int x dQ(x)) = \mathrm{OT}_p^p(\mathbb{E}[\mu], \mathbb{E}[\mu'])$, where $\mu \sim P$ and $\mu' \sim P'$. Proposition 5.4 yields the conclusion.
Proof. Fix $\mu_1, \mu_2, \nu_1, \nu_2 \in \mathcal{M}^p$ and $t \in [0, 1]$. Our goal is to show that

$$ \mathrm{OT}_p^p(t\mu_1 + (1-t)\mu_2, t\nu_1 + (1-t)\nu_2) \le \mathrm{OT}_p^p(\mu_1, \nu_1) + (1-t)\mathrm{OT}_p^p(\mu_2, \nu_2). $$

Let $\pi_{11} \in \mathrm{Opt}_p(\mu_1, \nu_1)$ and $\pi_{22} \in \mathrm{Opt}_p(\mu_2, \nu_2)$. It is straightforward to check that $\pi := t\pi_{11} + (1-t)\pi_{22}$ is an admissible plan between $t\mu_1 + (1-t)\mu_2$ and $t\nu_1+(1-t)\nu_2$. The cost of this admissible plan is $t\mathrm{OT}_p^p(\mu_1, \nu_1)+(1-t)\mathrm{OT}_p^p(\mu_2, \nu_2)$, which is therefore larger than $\mathrm{OT}_p^p(t\mu_1 + (1-t)\mu_2, t\nu_1 + (1-t)\nu_2)$. $\square$

We then use the following result, which is a particular case of [51, Theorem 3.10].

**Proposition D.1.** Let $\mathcal{X}$ be a Hausdorff locally convex topological vector space and $C \subset \mathcal{X}$ a closed convex set. Let $Q$ be a probability measure on $\mathcal{X}$ endowed with its borelian $\sigma$-algebra, which is supported on $C$. Assume that $\int \|x\|dQ(x) < \infty$. Let $f: C \to [0, \infty)$ be a continuous convex function with $\int f(x)dQ(x) < \infty$. Then

$$ f\left(\int x dQ(x)\right) \le \int f(x) dQ(x). $$

Let $\mathcal{X} = \mathcal{M}_{\pm} \times \mathcal{M}_{\pm}$ which is a Banach space (endowed with the product norm), and thus in particular a Hausdorff locally convex topological vector space. Let $C = \mathcal{M}_f \times \mathcal{M}_f$, which is convex and closed (closedness follows immediately from the definition of the total variation $|\cdot|$) and let $f = \mathrm{OT}_p^p \circ (G, G) : \mathcal{X} \to \mathbb{R}$. The continuity of $G$ implies that $f$ is continuous and Lemma D.1 implies the convexity of $f$. Let $P, P'$ be two probability measures in $W^p(\mathcal{M}^p)$ and $\gamma$ be an optimal coupling between $P$ and $P'$. We let $Q$ be the image measure of $\gamma$ by $(F, F)$, so that

$$ \begin{aligned} \int_{x \in \mathcal{X}} \|x\| dQ(x) &= \int_{\mu, \mu' \in \mathcal{M}^p} \max(|\mu^{(p)}|, |(\mu')^{(p)}|) d\gamma(\mu, \mu') \\ &\le \int_{\mu} \mathrm{Pers}_p(\mu) dP(\mu) + \int_{\mu'} \mathrm{Pers}_p(\mu') dP'(\mu') < \infty \end{aligned} $$

and that

$$ \int_{x \in \mathcal{X}} f(x) dQ(x) = \int_{\mu, \mu' \in \mathcal{M}^p} \mathrm{OT}_p^p(\mu, \mu') d\gamma(\mu, \mu') = W_{p, \mathrm{OT}_p}^p(P, P') < \infty. $$

Also, we have

$$ \begin{aligned} \int x dQ(x) &= \int_{\nu, \nu' \in \mathcal{M}^p} (\nu, \nu') d(F, F)_{\#} \gamma(\nu, \nu') \\ &= \left( \int_{\nu \in \mathcal{M}^p} \nu dF_{\#} P(\nu), \int_{\nu' \in \mathcal{M}^p} \nu' dF_{\#} P'(\nu') \right), \end{aligned} $$

so that by (40), $f(\int x dQ(x)) = \mathrm{OT}_p^p(\mathbb{E}[\mu], \mathbb{E}[\mu'])$, where $\mu \sim P$ and $\mu' \sim P'$. Proposition 5.4 yields the conclusion.