Introduction
Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) be a bounded metric measure space (mm-space), meaning that ( X , d X ) (X,d_X) ( X , d X ) is a Polish space of finite diameter diam ( X ) \operatorname{diam}(X) diam ( X ) and μ X \mu_X μ X is a Borel probability measure on X X X , not necessarily fully supported. Many classical summaries of the geometry of X X X are obtained by evaluating the distances between pairs, triples, or n n n -tuples of points and then taking an average or an extremum. Instead of reducing these values to a single number, one can retain their full distribution over random configurations drawn from μ X \mu_X μ X . This distributional viewpoint is particularly natural when X X X is accessible only through samples, either because X X X itself is unknown or because it is too large to compute all pairwise distances, as is increasingly the case for modern datasets.
To treat all quantities that depend only on the distances among n n n points in a unified way, we follow Gromov [31 ] and assign to an n n n -tuple x = ( x 1 , … , x n ) \mathbf{x}=(x_1,\ldots,x_n) x = ( x 1 , … , x n ) its distance matrix:
Ψ n : X n ⟶ R n × n , Ψ n ( x ) i j ≔ d X ( x i , x j ) . \Psi_n:X^n\longrightarrow\mathbb{R}^{n\times n},\qquad\Psi_n(\mathbf{x})_{ij}\coloneqq d_X(x_i,x_j). Ψ n : X n ⟶ R n × n , Ψ n ( x ) ij : = d X ( x i , x j ) .
2020 Mathematics Subject Classification. Primary 60B10; Secondary 53C23, 62R20, 92D15.
Keywords. Metric measure spaces, curvature measures, Wasserstein distance, empirical measures, hyperbolicity, molecular evolution. The image of this map, K n ( X ) : = Ψ n ( X n ) \mathrm{K}_n(X) := \Psi_n(X^n) K n ( X ) := Ψ n ( X n ) , is known as the n n n -th curvature set (Subsection 3.1), and the pushforward
μ n : = ( Ψ n ) # μ X ⊗ n \mu_n := (\Psi_n)_{\#}\mu_X^{\otimes n} μ n := ( Ψ n ) # μ X ⊗ n
is called the n n n -th curvature measure. The measure μ n \mu_n μ n records the geometry of X X X as seen by random n n n -point configurations in X X X . The full family ( μ n ) n ≥ 2 (\mu_n)_{n \ge2} ( μ n ) n ≥ 2 determines the mm-space up to the natural measure-preserving notion of isometry by the Gromov–Vershik reconstruction theorem [31 Sec. 3.5 & 3.7] ; see also [62 Cor. 5] .
Write K n ⊂ R n × n \mathrm{K}_n \subset\mathbb{R}^{n \times n} K n ⊂ R n × n for the set of all distance matrices on n n n points, also known as the n n n -th metric cone . We define a metric n n n -point invariant with values in a Polish space Z Z Z , or n n n -invariant for short (§ 4 ), to be a measurable function
F : K n → Z . F:\mathrm{K}_n \to Z. F : K n → Z .
In other words, an n n n -invariant maps the pairwise distances among n n n points to a value in Z Z Z . Examples include the pairwise distance, the area of a triangle, the four-point hyperbolicity deficit, and the persistence diagram of n n n points, each capturing a particular geometric property of an n n n -point configuration.
The distribution of F F F over random n n n -tuples of X X X is the probability measure on Z Z Z given by the pushforward of the curvature measure of X X X ,
ν F : = F # μ n . \nu_F := F_{\#}\mu_n. ν F := F # μ n .
Throughout, we suppress the dependence of μ n \mu_n μ n and ν F \nu_F ν F on the mm-space ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) whenever it is clear from context and record it in the subscript otherwise, as in μ n , X \mu_{n,X} μ n , X , ν F , X \nu_{F,X} ν F , X , or ν F , μ \nu_{F,\mu} ν F , μ .
In data analysis, the geometry of X X X is expected to carry information about the data-generating process and is often studied through the distributions of n n n -invariants and their statistical summaries, such as the mean, median, or quantiles. Each ν F \nu_F ν F is simpler and often more tractable than μ n \mu_n μ n , but describes only one aspect of the geometry of n n n -point configurations. In this article, we provide sample sizes that guarantee the approximation of μ n \mu_n μ n itself from samples of n n n -tuples and show that they carry over to distributions of all Lipschitz n n n -invariants, including those with high- or infinite-dimensional target spaces, such as persistence diagrams. Given independent samples x ( 1 ) , … , x ( N ) ∼ μ X ⊗ n \mathbf{x}^{(1)},\ldots,\mathbf{x}^{(N)} \sim\mu_X^{\otimes n} x ( 1 ) , … , x ( N ) ∼ μ X ⊗ n , denote the empirical curvature measure by
μ ^ n , N : = 1 N ∑ i = 1 N δ Ψ n ( x ( i ) ) , \widehat{\mu}_{n,N} := \frac{1}{N}\sum_{i=1}^{N}\delta_{\Psi_n(\mathbf{x}^{(i)})}, μ n , N := N 1 i = 1 ∑ N δ Ψ n ( x ( i ) ) ,
where we write δ y \delta_y δ y for the Dirac measure at a point y y y . For every n n n -invariant F F F , the same sample then yields ν ^ F , N : = F # μ ^ n , N \widehat{\nu}_{F,N} := F_{\#}\widehat{\mu}_{n,N} ν F , N := F # μ n , N , the empirical distribution of the values of F F F on the sampled n n n -tuples.
Uniform approximation of the geometry of n n n -point configurations. Our main result is an explicit bound for the expected p p p -Wasserstein distance W p W_p W p between the empirical curvature measure μ ^ n , N \widehat{\mu}_{n,N} μ n , N and the true curvature measure μ n \mu_n μ n . It is obtained by applying the Euclidean empirical-measure convergence rates of Fournier and Guillin [25 ] , with the explicit constants due to Fournier [26 ] , to μ n \mu_n μ n regarded as a measure on R d \mathbb{R}^d R d .
Theorem A. Fix 1 ≤ p < ∞ 1 \le p < \infty 1 ≤ p < ∞ and n ≥ 2 n \ge2 n ≥ 2 , set d : = ( n 2 ) d := \binom{n}{2} d := ( 2 n ) , and suppose that p ≠ d / 2 p \ne d/2 p = d /2 . Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) be a bounded mm-space with fully supported probability measure. Then the expected p p p -Wasserstein distance between the empirical curvature measure μ ^ n , N \widehat{\mu}_{n,N} μ n , N and the true curvature measure μ n \mu_n μ n satisfies
E [ W p ( μ ^ n , N , μ n ) p ] ≤ C ( d , p ) diam ( X ) p N − e d , p , e d , p : = { 1 / 2 , p > d / 2 , p / d , p < d / 2 , \mathbb{E}\left[W_p(\widehat{\mu}_{n,N},\mu_n)^p\right] \le C(d,p)\operatorname{diam}(X)^p N^{-e_{d,p}}, \qquad e_{d,p}:=
\begin{cases}
1/2, & p>d/2,\\
p/d, & p<d/2,
\end{cases} E [ W p ( μ n , N , μ n ) p ] ≤ C ( d , p ) diam ( X ) p N − e d , p , e d , p := { 1/2 , p / d , p > d /2 , p < d /2 , where C ( d , p ) : = 2 d / 2 − 1 1 − 2 d / 2 − p C(d,p):=\frac{2^{d/2-1}}{1-2^{d/2-p}} C ( d , p ) := 1 − 2 d /2 − p 2 d /2 − 1 if d < 2 p d<2p d < 2 p and C ( d , p ) : = 2 p − 2 p / d ( 1 − 2 − d / 2 ) 1 − 2 p / d 1 − 2 p − d / 2 C(d,p):=\frac{2^{p-2p/d}(1-2^{-d/2})^{1-2p/d}}{1-2^{p-d/2}} C ( d , p ) := 1 − 2 p − d /2 2 p − 2 p / d ( 1 − 2 − d /2 ) 1 − 2 p / d if d > 2 p d>2p d > 2 p .
Corollary B. Under the assumptions of Theorem A, let F : K n → Z F:\mathbf{K}_n\to Z F : K n → Z be a Lipschitz metric n n n -point invariant. Then
E [ W p ( ν ^ F , N , ν F ) p ] ≤ C ( d , p ) Lip ( F ) p diam ( X ) p N − e d , p . \mathbb{E}\left[\mathsf{W}_p(\hat{\nu}_{F,N},\nu_F)^p\right]\leq C(d,p)\operatorname{Lip}(F)^p\operatorname{diam}(X)^pN^{-e_{d,p}}. E [ W p ( ν ^ F , N , ν F ) p ] ≤ C ( d , p ) Lip ( F ) p diam ( X ) p N − e d , p .
Corollary C. Choose an error margin ϵ > 0 \epsilon>0 ϵ > 0 and a confidence level 0 < α < 1 0<\alpha<1 0 < α < 1 . Under the assumptions of Theorem A, there is an explicit N ∗ = N ∗ ( n , p , ϵ , α ) N_* = N_*(n,p,\epsilon,\alpha) N ∗ = N ∗ ( n , p , ϵ , α ) such that, for every N > N ∗ N>N_* N > N ∗ , with probability at least α \alpha α ,
W p ( μ ^ n , N , μ n ) ≤ ϵ diam ( X ) W_p(\hat{\mu}_{n,N},\mu_n)\leq\epsilon\operatorname{diam}(X) W p ( μ ^ n , N , μ n ) ≤ ϵ diam ( X ) and, uniformly over all Lipschitz metric n n n -point invariants F : K n → Z F:\mathbf{K}_n\to Z F : K n → Z ,
W p ( ν ^ F , N , ν F ) ≤ ϵ Lip ( F ) diam ( X ) . \mathsf{W}_p(\hat{\nu}_{F,N},\nu_F)\leq\epsilon\operatorname{Lip}(F)\operatorname{diam}(X). W p ( ν ^ F , N , ν F ) ≤ ϵ Lip ( F ) diam ( X ) .
These results are proved in § 6 as Theorem 6.1 and Corollaries 6.2 and 6.3. The first corollary is just the pushforward along a Lipschitz function, while the second relies on a standard bounded-differences concentration argument and McDiarmid’s inequality [64 ] .
Approximating the full n n n -th curvature measure guarantees that the results in Corollaries B and C hold uniformly over all Lipschitz n n n -invariants F : K n → Z F:\mathbf{K}_n\to Z F : K n → Z . In the analysis of a concrete dataset, this allows us to determine the number N ∗ N_* N ∗ of required n n n -tuples for a prescribed accuracy and confidence in advance,1 and every subsequent analysis of the geometry of n n n -point configurations of X X X based on a single sample of this size inherits the guarantee without further sampling or corrections for multiple comparisons. This universality comes at a cost, as the convergence rates are governed by the rapidly growing dimension of the ambient Euclidean space that contains K n \mathbf{K}_n K n . For a single n n n -invariant with a low-dimensional target, applying the same techniques to ν F \nu_F ν F directly can substantially improve the convergence rate. For example, for a real-valued n n n -invariant F : K n → R F:\mathbf{K}_n\to\mathbb{R} F : K n → R , these techniques yield the rate N − 1 / 2 N^{-1/2} N − 1/2 (cf. Proposition 6.6 ), in line with classical results, e.g. [7 Thm. 7.9] . However, if Z Z Z is high- or infinite-dimensional, as for persistence diagrams, such bounds may be poor or unavailable, and passing through μ n \mu_n μ n is the natural route to explicit rates.
The ambient dimension d = ( n 2 ) d=\binom{n}{2} d = ( 2 n ) of K n ⊂ R d \mathbf{K}_n\subset\mathbb{R}^d K n ⊂ R d is often suboptimal since the curvature set K n ( X ) \mathbf{K}_n(X) K n ( X ) in question may have much smaller intrinsic dimension. Convergence rates for empirical measures in terms of intrinsic dimension go back to Dudley [22 ] and have since been further developed using covering dimensions of sets of full or almost full measure [8 , 64 , 16 ] . We obtain the following refinement for Ahlfors s s s -regular spaces from bounds based on an intrinsic Wasserstein-dimension of measures due to Weed and Bach [64 ] .
Theorem D. Fix n ≥ 2 n\geq2 n ≥ 2 . Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) be an Ahlfors s s s -regular mm-space. Then, for all 1 ≤ p ≤ 1 2 d M ( K n ( X ) ) 1\leq p\leq\frac{1}{2}d_M(\mathbf{K}_n(X)) 1 ≤ p ≤ 2 1 d M ( K n ( X )) and t > s t>s t > s there are constants C 1 ( n , p , t ) C_1(n,p,t) C 1 ( n , p , t ) and C 2 ( X , n , p , t ) C_2(X,n,p,t) C 2 ( X , n , p , t ) such that for all N ≥ 1 N\geq1 N ≥ 1
E [ W p ( μ ^ n , N , μ n ) p ] ≤ diam ( X ) p ( C 1 N − p / n t + C 2 N − 1 / 2 ) . \mathbb{E}\left[W_p(\hat{\mu}_{n,N},\mu_n)^p\right]\leq\operatorname{diam}(X)^p\left(C_1N^{-p/nt}+C_2N^{-1/2}\right). E [ W p ( μ ^ n , N , μ n ) p ] ≤ diam ( X ) p ( C 1 N − p / n t + C 2 N − 1/2 ) . where d M d_M d M is the Minkowski dimension.
This result is proved in § 6 as Theorem 6.10 . The exponent p / n t p/nt p / n t can improve upon e d , p = p / d e_{d,p}=p/d e d , p = p / d whenever s < ( n − 1 ) / 2 s<(n-1)/2 s < ( n − 1 ) /2 . Unlike C ( d , p ) C(d,p) C ( d , p ) , however, the constant C 2 C_2 C 2 depends on X X X through a parameter that is not explicit, so Theorem D in its current form cannot yield improvements in sample sizes.
Hyperbolicity distributions. The distribution of hyperbolicity deficits provides an interesting example of the information that may be carried by the distribution of an n n n -invariant. The four-point hyperbolicity deficit hyp : K 4 → R \operatorname{hyp}:\mathbf{K}_4\to\mathbb{R} hyp : K 4 → R (Example 4.6) measures how far a given quadruple is from satisfying the four-point condition for points on a tree [10 ] . Its supremum over all quadruples of a metric space, known as its Gromov hyperbolicity [30 ] , detects obstructions to the space being a tree. For a finite metric space ( X , d X ) (X,d_X) ( X , d X ) , the tight span T ( X , d X ) T(X,d_X) T ( X , d X ) is a canonical geodesic metric space containing X X X with the structure of a finite polytopal complex [43 Sec. 3] . Splitting the tight span at its cut-vertices, the vertices whose removal disconnects it, yields a set of blocks B ( X ) \mathcal{B}(X) B ( X ) (cf. [38 ] ). By a classical result of Dress [21 Thm. 8] , the deficit vanishes on all quadruples of X X X if and only if T ( X , d X ) T(X,d_X) T ( X , d X ) is a tree, i.e. all blocks B ∈ B ( X ) B \in\mathcal{B}(X) B ∈ B ( X ) are intervals. For a finite mm-space ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) , we may view each block B B B as an mm-space with the measure μ B : = ( P B ) # μ X \mu_B := (P_B)_\#\mu_X μ B := ( P B ) # μ X , where P B P_B P B maps each point outside B B B onto the closest point of B B B . If μ X \mu_X μ X has full support, Dress’s theorem then amounts to the statement that ν h y p , X = δ 0 \nu_{\mathrm{hyp},X}=\delta_0 ν hyp , X = δ 0 if and only if all blocks are intervals, which have ν h y p , B = δ 0 \nu_{\mathrm{hyp},B}=\delta_0 ν hyp , B = δ 0 as discussed above. The following result describes how ν h y p , X \nu_{\mathrm{hyp},X} ν hyp , X is assembled from the ν h y p , B \nu_{\mathrm{hyp},B} ν hyp , B more generally.
Theorem E. Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) be a finite mm-space. Then, for every Borel set D ⊂ R D \subset\mathbb{R} D ⊂ R with 0 ∉ D 0 \notin D 0 ∈ / D ,
ν h y p , X ( D ) = ∑ B ∈ B ( X ) ν h y p , B ( D ) . \nu_{\mathrm{hyp},X}(D)=\sum_{B\in\mathcal{B}(X)}\nu_{\mathrm{hyp},B}(D). ν hyp , X ( D ) = B ∈ B ( X ) ∑ ν hyp , B ( D ) . Moreover, ν h y p , X ( { 0 } ) = 1 − ∑ B ∈ B ( X ) ν h y p , B ( R ∖ { 0 } ) \nu_{\mathrm{hyp},X}(\{0\})=1-\sum_{B\in\mathcal{B}(X)}\nu_{\mathrm{hyp},B}(\mathbb{R}\setminus\{0\}) ν hyp , X ({ 0 }) = 1 − ∑ B ∈ B ( X ) ν hyp , B ( R ∖ { 0 }) .
In other words, every violation of the four-point condition in X X X comes from exactly one block that is not an interval, and the contributions of these blocks add up. Consequently, if μ X \mu_X μ X has full support, the Gromov hyperbolicity of X X X is determined by a single block, while ν h y p , X \nu_{\mathrm{hyp},X} ν hyp , X retains the full hyperbolicity distribution of every block. This result and its proof appear in § 7 as Theorem 7.13 .
Application to molecular evolution of SARS-CoV-2. Molecular evolution studies how evolutionary processes, such as mutation, recombination, and natural selection, are reflected in the genome of organisms. Genomic sequences are typically represented as aligned words over the alphabet of nucleotides A , C , G , T A,C,G,T A , C , G , T . Together with the Hamming distance, which counts the number of differing sites, and equipped with the observed genome frequencies, the data form an mm-space (Subsection 8.1). We study three Lipschitz n n n -invariants on this space. (i) The pairwise-distance distribution , known in population genetics as the mismatch distribution , records genetic separation between sampled genomes, and its shape has long been used to study demographic history [54 ] . (ii) The distribution of four-point hyperbolicity deficits , records the frequency and magnitude of departures from the four-point condition for points on a tree [10 ] . (iii) The distribution of degree-one persistence diagrams of four-point samples , known as the (4, 1)-persistence measure [3 , 29 ] , records the prevalence and scales of cycles and has been studied as a signature of reticulate evolution [44 ] . Our sampling guarantees make it possible to quantify how prevalent these configurations are and at which genetic scales they occur, without reconstructing a tree or network and without even computing the full distance matrix of the data. This is a particular advantage for the millions of severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) genomes sequenced during the pandemic. At this scale, even the full distance matrix would occupy several terabytes, and the low divergence of the sequences further complicates reliable phylogenetic inference [46 ] .
We first investigate the distributions one obtains from the uniform measure, the Jukes–Cantor model [40 ] , and the Halpern–Bruno model [34 ] (Subsections 8.2 and 8.3). In all three models, sites are independent, so the mismatch distribution is Poisson–binomial and depends only on how likely two random genomes are to differ at each site (Subsection 8.1). In particular, it records how variable each site is, but not whether this variability involves two or more nucleotides. In contrast, the hyperbolicity and (4, 1)-persistence distributions are sensitive to the frequencies of the individual nucleotides at each site. For example, a half-integer hyperbolicity deficit can only occur if there is a site where the four genomes carry exactly three different nucleotides.
We then analyse a dataset of approximately five million SARS-CoV-2 genomes shared via GISAID, the global data science initiative [23 ] , and compute the three distributions in cumulative samples at five collection-date cutoffs, from the early outbreak to the era of Omicron recombinants (Subsection 8.4). We find that over time the mismatch distribution shifts upward and becomes increasingly overdispersed and multimodal. This shape is consistent with the accumulation of genetically separated lineage clusters as successive variants emerge. The estimated fraction of quadruples violating the four-point condition rises from about 2% at the early stages to 45% towards the end of the pandemic. This is in line with the many documented recurrences of mutations across lineages [VDRT+20, MWT+21], since already a single mutation shared by genomes from two different lineages can cause such a violation. Half-integer hyperbolicity deficits remain suppressed relative to the uniform reference, pointing to constrained triallelic accessibility and consistent with the strongly biased SARS-CoV-2 mutation spectrum [58 , 19 ] . Nontrivial ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence classes, which occur only in such non-tree-like quadruples, are much rarer, occurring in fewer than one in a thousand quadruples, but appear consistently at every collection-date cutoff. Their birth times follow the dominant modes of the mismatch distribution as the lineage clusters separate, while their lifetimes remain short, with most classes having the minimal lifetime 1. In SARS-CoV-2, such short-lived ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence classes formed by single-nucleotide variants (SNVs) have been used to detect recurrent mutations within lineages and shown to correlate with adaptation [BHN+21]. The short-lived ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence classes observed here are their between-lineage counterpart, typically formed by a single SNV that arose independently in two lineage clusters. The rarer classes with longer lifetimes record more pronounced cyclic geometry across several Hamming scales and reflect more complex reticulate configurations, including recombination, which has previously been documented to occur in SARS-CoV-2 [60 ] . Taken together, these findings demonstrate the potential of our sampling-based approach to the geometry of n n n -point configurations as a scalable, phylogeny-free tool for detecting and quantifying evolutionary structure in large genomic datasets.
Organization. § 2 places n n n -invariants and their distributions in the context of the existing literature. § 3 recalls standard definitions and preliminary results. § 4 introduces n n n -invariants, their distributions, and the main examples. § 5 establishes the geometric properties of K n ( X ) \mathbf{K}_n(X) K n ( X ) that § 6 uses to prove the main results A–D. § 7 proves Theorem E on the block decomposition of hyperbolicity distributions. § 8 studies Hamming geometry, substitution models, and the SARS-CoV-2 data.
Related work
Distributions of finite-configuration data have appeared under several names and in several areas. The following non-exhaustive list illustrates some classical and recent uses of distributions of n n n -invariants in geometry, statistics, data analysis, and phylogenetics.
Distance distributions. The simplest example of an n n n -invariant is the pairwise distance (n = 2 n=2 n = 2 ), whose distribution ν d i s t , X \nu_{\mathrm{dist},X} ν dist , X has long been studied in geometric probability [15 , 32 ] . Boutin and Kemper show that this distribution determines generic configurations of at least m + 2 m+2 m + 2 points in R m \mathbb{R}^m R m up to isometry [6 ] . Here genericity means that the distances lie outside the zero set of a constructed nonzero polynomial, a closed set of measure zero that contains, for instance, all configurations with a repeated distance and all configurations with a nontrivial symmetry. In shape analysis, the same distribution is known as the D 2 D2 D 2 shape distribution [53 Sec. 4.1] , and it is closely related to other classical statistics such as the K K K -function in spatial statistics [55 Ch. 8] . A classical way to represent ν d i s t , X \nu_{\mathrm{dist},X} ν dist , X is by its cumulative distribution function
H X ( r ) : = ∫ X μ X ( B X ( x , r ) ) d μ X ( x ) = ν d i s t , X ( [ 0 , r ] ) , r ≥ 0. H_X(r) := \int_X \mu_X(B_X(x,r))\,d\mu_X(x) = \nu_{\mathrm{dist},X}([0,r]), \qquad r \ge0. H X ( r ) := ∫ X μ X ( B X ( x , r )) d μ X ( x ) = ν dist , X ([ 0 , r ]) , r ≥ 0.
H X ( r ) H_X(r) H X ( r ) records how often two sampled points lie within distance r r r , so it measures the average μ X \mu_X μ X -mass of an r r r -ball. For Riemannian manifolds, the small-radius behaviour of H X H_X H X is related to scalar curvature and H X H_X H X similarly provides a signature of the curvature of metric measure spaces [47 Def. 5.4] . The third author and Needham systematically study how much geometric information is retained by global and local distance distributions beyond subsets of Euclidean space [49 ] . Recently, cumulative distance distributions have found applications in parameter inference for systems with chaotic or heterogeneous output using the Correlation Integral Likelihood framework [28 ] .
Average hyperbolicity. Chatterjee and Sloman [14 ] recently proposed an average counterpart to Gromov hyperbolicity. While the supremum of the four-point deficits hyp ( x ) \operatorname{hyp}(x) hyp ( x ) (Example 4.6) detects whether a space looks everywhere like a tree, their average detects whether it looks ‘mostly’ like a tree. For a bounded measurable similarity function s : S × S → [ 0 , b ] s:S \times S \to[0,b] s : S × S → [ 0 , b ] on a probability space ( S , F , μ S ) (S,\mathcal{F},\mu_S) ( S , F , μ S ) , they define
Hyp ( S , F , μ S , s ) : = E [ ( min { s ( X 1 , X 3 ) , s ( X 2 , X 3 ) } − s ( X 1 , X 2 ) ) + ] , (1) \operatorname{Hyp}(S,\mathcal{F},\mu_S,s) := \mathbb{E}\left[\left(\min\{s(X_1,X_3),s(X_2,X_3)\}-s(X_1,X_2)\right)_+\right], \tag*{(1)} Hyp ( S , F , μ S , s ) := E [ ( min { s ( X 1 , X 3 ) , s ( X 2 , X 3 )} − s ( X 1 , X 2 ) ) + ] , (1)
where X 1 , X 2 , X 3 ∼ μ S X_1,X_2,X_3 \sim\mu_S X 1 , X 2 , X 3 ∼ μ S are i.i.d. and ( a ) + : = max { a , 0 } (a)_+ := \max\{a,0\} ( a ) + := max { a , 0 } . Thus Hyp is the average amount by which the inequalities s ( X 1 , X 2 ) ≥ min { s ( X 1 , X 3 ) , s ( X 2 , X 3 ) } s(X_1,X_2) \ge\min\{s(X_1,X_3),s(X_2,X_3)\} s ( X 1 , X 2 ) ≥ min { s ( X 1 , X 3 ) , s ( X 2 , X 3 )} fail. For an mm-space ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) and a fixed base point w ∈ X w \in X w ∈ X , take s s s to be the Gromov product s w ( x , x ′ ) : = ( x ⋅ x ′ ) w = 1 2 ( d X ( x , w ) + d X ( x ′ , w ) − d X ( x , x ′ ) ) s_w(x,x') := (x \cdot x')_w = \frac{1}{2}\bigl(d_X(x,w)+d_X(x',w)-d_X(x,x')\bigr) s w ( x , x ′ ) := ( x ⋅ x ′ ) w = 2 1 ( d X ( x , w ) + d X ( x ′ , w ) − d X ( x , x ′ ) ) . By symmetry, one obtains
Hyp ( X , B ( X ) , μ X , s w ) = 1 3 E [ hyp ( X 1 , X 2 , X 3 , w ) ] . \operatorname{Hyp}(X,\mathcal{B}(X),\mu_X,s_w)=\frac{1}{3}\mathbb{E}\left[\operatorname{hyp}(X_1,X_2,X_3,w)\right]. Hyp ( X , B ( X ) , μ X , s w ) = 3 1 E [ hyp ( X 1 , X 2 , X 3 , w ) ] .
The factor of 1 / 3 1/3 1/3 arises because the average is over all three orderings of the Gromov products ( x 1 ⋅ x 2 ) w (x_1\cdot x_2)_w ( x 1 ⋅ x 2 ) w , ( x 1 ⋅ x 3 ) w (x_1\cdot x_3)_w ( x 1 ⋅ x 3 ) w , ( x 2 ⋅ x 3 ) w (x_2\cdot x_3)_w ( x 2 ⋅ x 3 ) w , and taking the positive part ‘( … ) + (\ldots)_+ ( … ) + ’ sets two of them to zero while the one non-zero case is exactly hyp ( x 1 , x 2 , x 3 , w ) \operatorname{hyp}(x_1,x_2,x_3,w) hyp ( x 1 , x 2 , x 3 , w ) . Averaging over the base point as well gives E w ∼ μ X [ Hyp ( X , B ( X ) , μ X , s w ) ] = 1 3 ∫ R t d ν hyp , X ( t ) \mathbb{E}_{w\sim\mu_X}\left[\operatorname{Hyp}(X,\mathcal{B}(X),\mu_X,s_w)\right]=\frac{1}{3}\int_{\mathbb{R}}t\,d\nu_{\operatorname{hyp},X}(t) E w ∼ μ X [ Hyp ( X , B ( X ) , μ X , s w ) ] = 3 1 ∫ R t d ν hyp , X ( t ) . Chatterjee and Sloman show that Hyp carries geometrically meaningful information: just as vanishing Gromov hyperbolicity gives an isometric embedding into a tree, small average hyperbolicity guarantees an approximate one [14 Thm. 2.4] .
Persistence sets and measures. Blumberg et al. [3 Def. 1.1] study the distribution Φ k n ( X , d X , μ X ) \Phi_k^n(X,d_X,\mu_X) Φ k n ( X , d X , μ X ) of the degree-k k k Vietoris–Rips persistence diagram over i.i.d. n n n -point samples of an mm-space. They prove that these distributions are robust to adding a small proportion of arbitrary points, including outliers, because such points rarely appear in an n n n -point sample [3 Thm. 5.5] . In contrast, even a few such points can change the persistence diagram of the entire space arbitrarily [3 Props. 4.6 and 4.7] . The robustness of Φ k n \Phi_k^n Φ k n makes it possible to base statistical procedures for persistent homology, such as hypothesis tests and confidence intervals, on repeated finite subsamples. In a closely related framework, the second and third authors study the set-valued ( n , k ) (n,k) ( n , k ) -persistence set D n , k V R ( X ) \mathrm{D}_{n,k}^{\mathrm{VR}}(X) D n , k VR ( X ) and the ( n , k ) (n,k) ( n , k ) -persistence measure U n , k V R ( X ) \mathrm{U}_{n,k}^{\mathrm{VR}}(X) U n , k VR ( X ) [29 ] . Persistence sets can recover geometric information such as the curvature of a surface [29 Thm. 5.19] , while the persistence measures can distinguish spaces with the same persistence set but different frequencies of topological features [29 Ex. 5.11, Prop. 5.12] . In our notation, the distribution of Blumberg et al. and this persistence measure both coincide with the pushforward under our ( n , k ) (n,k) ( n , k ) -persistence diagram invariant dgm n , k V R \operatorname{dgm}_{n,k}^{\mathrm{VR}} dgm n , k VR Example 4.8:
Φ k n ( X , d X , μ X ) = U n , k V R ( X ) = ν dgm n , k V R , X . \Phi_k^n(X,d_X,\mu_X)=\mathrm{U}_{n,k}^{\mathrm{VR}}(X)=\nu_{\operatorname{dgm}_{n,k}^{\mathrm{VR}},X}. Φ k n ( X , d X , μ X ) = U n , k VR ( X ) = ν dgm n , k VR , X .
Note that the distance distribution is already contained in this framework: after identifying a degree-zero diagram of the form { ( 0 , r ) } \{(0,r)\} {( 0 , r )} with r r r , the measure U 2 , 0 V R ( X ) \mathrm{U}_{2,0}^{\mathrm{VR}}(X) U 2 , 0 VR ( X ) agrees with ν d i s t , X \nu_{\mathrm{dist},X} ν dist , X [29 Ex. 3.16] .
Geometric distributions in phylogenetics. Several classical summary statistics in phylogenetics and population genetics are distributions of n n n -invariants of aligned sequences with the Hamming distance, or are closely related to them. For a set of sequences, the mismatch distribution [57 ] is the distance distribution ν d i s t , X \nu_{\mathrm{dist},X} ν dist , X , whose shape carries information about demographic history [54 ] ; the nucleotide diversity [52 ] corresponds to the mean of ν d i s t , X \nu_{\mathrm{dist},X} ν dist , X divided by the sequence length. Likewise, several measures of treelikeness are closely related to the hyperbolicity distribution ν h y p , X \nu_{\mathrm{hyp},X} ν hyp , X Example 4.6. The δ \delta δ plot [36 ] is the histogram, over all four-element subsets, of the δ \delta δ -score, a 4-invariant obtained by normalizing the hyperbolicity deficit, and the Q Q Q -residuals [27 ] average 4 hyp ( x ) 2 4\operatorname{hyp}(x)^2 4 hyp ( x ) 2 over quadruples after a rescaling of the distances. An example of a distribution over quadruples that is not the distribution of an n n n -invariant is likelihood mapping [59 ] , which explicitly depends on the site patterns among four sequences, not only on their distances.
Persistent homology and reticulate evolution. Reticulate evolution leaves cyclic signatures in sequence data. The four-gamete test detects when two binary characters are incompatible with a tree on which each site mutates only once [37 ] . Persistent homology of Vietoris–Rips complexes of viral sequences provides a related multiscale approach to detecting recombination and reassortment [11 ] . Lesnick et al. develop mathematical foundations for this approach using galled-tree histories and extend their conclusions to subsamples by stability [44 ] . In earlier joint work, the first, fourth, and fifth authors used short-lived topological cycles formed by SNVs to detect recurrent mutations in SARS-CoV-2 without reconstructing a phylogeny, and showed that such recurrences correlate with adaptation [BHN+21].
Preliminaries
In this section we recall the basic definitions and preliminary results required in the rest of the paper: curvature sets and curvature measures (Subsection 3.1), the Gromov–Hausdorff and Wasserstein distances together with empirical measures and sample sizes (Subsection 3.2), and properties of measures such as moments, enclosing radii, and intrinsic dimensions (Subsection 3.3). The material is standard and we refer to the indicated references for further details.
Throughout, we use boldface letters x \mathbf{x} x to represent tuples ( x 1 , … , x n ) ∈ X n (x_1,\ldots,x_n) \in X^n ( x 1 , … , x n ) ∈ X n . For a metric space ( X , d X ) (X,d_X) ( X , d X ) and p ≥ 1 p \ge1 p ≥ 1 , the ℓ p \ell^p ℓ p product metric on X n X^n X n is defined by
d X , p ( x , x ′ ) : = ( ∑ i = 1 n d X ( x i , x i ′ ) p ) 1 / p . d_{X,p}(\mathbf{x},\mathbf{x}') := \left(\sum_{i=1}^{n}d_X(x_i,x_i')^p\right)^{1/p}. d X , p ( x , x ′ ) := ( i = 1 ∑ n d X ( x i , x i ′ ) p ) 1/ p .
For example, the ℓ p \ell^p ℓ p product metric of ( R , ∣ ⋅ ∣ ) (\mathbb{R},|\cdot|) ( R , ∣ ⋅ ∣ ) is the metric induced by the ℓ p \ell^p ℓ p norm ∥ ⋅ ∥ p \|\cdot\|_p ∥ ⋅ ∥ p . Also recall that the diameter of ( X n , d X , p ) (X^n,d_{X,p}) ( X n , d X , p ) is diam p ( X n ) : = n 1 / p diam ( X ) \operatorname{diam}_p(X^n) := n^{1/p}\operatorname{diam}(X) diam p ( X n ) := n 1/ p diam ( X ) .
Curvature sets and curvature measures
The defining property of a metric n n n -point invariant is that it depends on a tuple x : = ( x 1 , … , x n ) ∈ X n \mathbf{x}:=(x_1,\ldots,x_n) \in X^n x := ( x 1 , … , x n ) ∈ X n only through the pairwise distances d X ( x i , x j ) d_X(x_i,x_j) d X ( x i , x j ) . This means it is a function of the distance matrix of x \mathbf{x} x alone, such that the domain of an n n n -point invariant is the following space.
Definition 3.1 (Metric cone). The n n n -th metric cone K n \mathbb{K}_n K n is the set of matrices M ∈ R n × n M \in\mathbb{R}^{n\times n} M ∈ R n × n such that
M i j ≥ 0 M_{ij} \ge0 M ij ≥ 0 and M i i = 0 M_{ii}=0 M ii = 0 ,
M i j = M j i M_{ij}=M_{ji} M ij = M j i , and
M i j ≤ M i k + M k j M_{ij} \le M_{ik}+M_{kj} M ij ≤ M ik + M k j .
In other words, M ∈ K n M \in\mathbb{K}_n M ∈ K n if and only if M M M is the distance matrix of some pseudometric space with n n n points.
Remark 3.2. The same space is called the semimetric cone and denoted M E T n \mathrm{MET}_n MET n in polyhedral combinatorics [18 Ch. 3] . An infinite-dimensional version, the cone of infinite distance matrices, is used by Vershik as a model for the collection of all Polish spaces [62 ] .
Remark 3.3. Since distance matrices are symmetric and have 0 diagonal, K n \mathbb{K}_n K n admits an embedding into the smaller Euclidean space R ( n 2 ) \mathbb{R}^{\binom{n}{2}} R ( 2 n ) . We will specify the embedding dimension when the result depends on it.
Definition 3.4 (Curvature set [31 Sec. 1.19+] ). Given a metric space ( X , d X ) (X,d_X) ( X , d X ) and an integer n ≥ 2 n \ge2 n ≥ 2 , the n n n -th curvature set of X X X is
K n ( X ) : = { M ∈ R n × n | ∃ x ∈ X n such that M i j = d X ( x i , x j ) } . \mathbb{K}_n(X) := \left\{M \in\mathbb{R}^{n\times n} \mathrel{}\middle|\mathrel{} \exists\,\mathbf{x} \in X^n \text{ such that } M_{ij}=d_X(x_i,x_j)\right\}. K n ( X ) := { M ∈ R n × n ∃ x ∈ X n such that M ij = d X ( x i , x j ) } . K n ( X ) \mathbb{K}_n(X) K n ( X ) comes with a natural map Ψ n : X n → K n ( X ) \Psi_n:X^n \to\mathbb{K}_n(X) Ψ n : X n → K n ( X ) defined by ( Ψ n ( x ) ) i j : = d X ( x i , x j ) (\Psi_n(\mathbf{x}))_{ij}:=d_X(x_i,x_j) ( Ψ n ( x ) ) ij := d X ( x i , x j ) . We equip K n ( X ) \mathbb{K}_n(X) K n ( X ) with the topology generated by the ℓ p \ell^p ℓ p metric on R n × n \mathbb{R}^{n\times n} R n × n , for some p ≥ 1 p \ge1 p ≥ 1 . Note that K n ( X ) ⊂ K n \mathbb{K}_n(X) \subset\mathbb{K}_n K n ( X ) ⊂ K n .
Remark 3.5. When X X X is compact, Ψ n \Psi_n Ψ n is a quotient map. Indeed, Ψ n \Psi_n Ψ n is surjective by definition, continuous because the metric d X : X × X → R d_X:X \times X \to\mathbb{R} d X : X × X → R is continuous, and closed because it maps the compact set X n X^n X n to a Hausdorff space.
Definition 3.6 (Metric measure space). A metric measure space (mm-space ), is a triple ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) where ( X , d X ) (X,d_X) ( X , d X ) is a Polish space, i.e. a complete separable metric space, and μ X \mu_X μ X is a Borel probability measure on X X X , not necessarily fully supported.
Definition 3.7 (Curvature measure [31 Sec. 3\frac{1}{2}+] ). Given an mm-space ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) , the n n n -th curvature measure μ n , X \mu_{n,X} μ n , X , or μ n \mu_n μ n when X X X is clear from context, is defined as the pushforward of the product measure μ X ⊗ n \mu_X^{\otimes n} μ X ⊗ n under the map Ψ n : X n → K n ( X ) \Psi_n:X^n \to\mathbb{K}_n(X) Ψ n : X n → K n ( X ) .
Remark 3.8. Similar to K n \mathbb{K}_n K n , K n ( X ) \mathbb{K}_n(X) K n ( X ) can be embedded in R d \mathbb{R}^d R d with either d : = n 2 d:=n^2 d := n 2 or d : = ( n 2 ) d:=\binom{n}{2} d := ( 2 n ) . Accordingly, we view the curvature measure μ n \mu_n μ n as a measure on the corresponding R d \mathbb{R}^d R d with support K n ( X ) ⊂ R d \mathbb{K}_n(X) \subset\mathbb{R}^d K n ( X ) ⊂ R d .
Distances and empirical measures
We recall the Gromov–Hausdorff distance, a standard metric on the space of compact metric spaces [1 ] , as it appears in stability results for Gromov hyperbolicity and persistent homology.
Definition 3.9 (Gromov–Hausdorff distance, e.g. [1 Ch. 7] ). Let ( X , d X ) (X,d_X) ( X , d X ) and ( Y , d Y ) (Y,d_Y) ( Y , d Y ) be two metric spaces. Denote by π X : X × Y → X \pi_X:X \times Y \to X π X : X × Y → X and π Y : X × Y → Y \pi_Y:X \times Y \to Y π Y : X × Y → Y the canonical projections. A correspondence is a relation R ⊂ X × Y R \subset X \times Y R ⊂ X × Y such that π X ( R ) = X \pi_X(R)=X π X ( R ) = X and π Y ( R ) = Y \pi_Y(R)=Y π Y ( R ) = Y , and its distortion is
dis ( R ) ≔ sup ( x , y ) , ( x ′ , y ′ ) ∈ R ∣ d X ( x , x ′ ) − d Y ( y , y ′ ) ∣ . \operatorname{dis}(R) \coloneqq\sup_{(x,y),(x',y')\in R} \lvert d_X(x,x')-d_Y(y,y')\rvert. dis ( R ) : = ( x , y ) , ( x ′ , y ′ ) ∈ R sup ∣ d X ( x , x ′ ) − d Y ( y , y ′ )∣ . The Gromov–Hausdorff distance is defined as
GH ( X , Y ) ≔ 1 2 inf R dis ( R ) , \operatorname{GH}(X,Y) \coloneqq\frac{1}{2}\inf_R \operatorname{dis}(R), GH ( X , Y ) : = 2 1 R inf dis ( R ) , where the infimum runs over all correspondences between X X X and Y Y Y .
The following comparison, which appeared previously as a step in the proof of [29 Thm. 3.13] , lets us translate the aforementioned stability results for Gromov hyperbolicity and persistent homology into a Lipschitz property of the corresponding n n n -invariant on K n \mathcal{K}_n K n .
Lemma 3.10. Let ( X , d X ) (X,d_X) ( X , d X ) and ( Y , d Y ) (Y,d_Y) ( Y , d Y ) be metric spaces with n n n points. Choose any labelling x 1 , … , x n x_1,\ldots,x_n x 1 , … , x n of X X X and y 1 , … , y n y_1,\ldots,y_n y 1 , … , y n of Y Y Y , and define M X ≔ Ψ n ( ( x 1 , … , x n ) ) M_X \coloneqq\Psi_n((x_1,\ldots,x_n)) M X : = Ψ n (( x 1 , … , x n )) and M Y ≔ Ψ n ( ( y 1 , … , y n ) ) M_Y \coloneqq\Psi_n((y_1,\ldots,y_n)) M Y : = Ψ n (( y 1 , … , y n )) . Then
GH ( X , Y ) ≤ 1 2 ∥ M X − M Y ∥ ∞ . \operatorname{GH}(X,Y) \leq\frac{1}{2}\lVert M_X-M_Y\rVert_\infty. GH ( X , Y ) ≤ 2 1 ∥ M X − M Y ∥ ∞ . Proof. Let R Δ R_\Delta R Δ be the diagonal correspondence { ( x 1 , y 1 ) , … , ( x n , y n ) } \{(x_1,y_1),\ldots,(x_n,y_n)\} {( x 1 , y 1 ) , … , ( x n , y n )} . Then
GH ( X , Y ) ≤ 1 2 dis ( R Δ ) = 1 2 max i , j = 1 , … , n ∣ d X ( x i , x j ) − d Y ( y i , y j ) ∣ = 1 2 ∥ M X − M Y ∥ ∞ . \operatorname{GH}(X,Y) \leq\frac{1}{2}\operatorname{dis}(R_\Delta) = \frac{1}{2}\max_{i,j=1,\ldots,n}\lvert d_X(x_i,x_j)-d_Y(y_i,y_j)\rvert= \frac{1}{2}\lVert M_X-M_Y\rVert_\infty. GH ( X , Y ) ≤ 2 1 dis ( R Δ ) = 2 1 i , j = 1 , … , n max ∣ d X ( x i , x j ) − d Y ( y i , y j )∣ = 2 1 ∥ M X − M Y ∥ ∞ .
Our main results are formulated in terms of the Wasserstein distance, a standard metric on the space of probability measures that is widely used in optimal transport theory [63 ] .
Definition 3.11 (Wasserstein distance, e.g. [63 Ch. 6] ). Fix p ≥ 1 p \geq1 p ≥ 1 and a Polish space ( Z , d Z ) (Z,d_Z) ( Z , d Z ) . Let α \alpha α and β \beta β be Borel probability measures on Z Z Z with finite p p p -th moments. Let Π ( α , β ) \Pi(\alpha,\beta) Π ( α , β ) denote the set of couplings of α \alpha α and β \beta β , that is, the Borel probability measures on Z × Z Z \times Z Z × Z with marginals α \alpha α and β \beta β . The p p p -Wasserstein distance between α \alpha α and β \beta β is defined by
W p ( α , β ) ≔ ( inf π ∈ Π ( α , β ) ∫ Z × Z d Z ( z , z ′ ) p d π ( z , z ′ ) ) 1 / p . W_p(\alpha,\beta) \coloneqq\left(\inf_{\pi\in\Pi(\alpha,\beta)} \int_{Z\times Z} d_Z(z,z')^p\,\mathrm{d}\pi(z,z')\right)^{1/p}. W p ( α , β ) : = ( π ∈ Π ( α , β ) inf ∫ Z × Z d Z ( z , z ′ ) p d π ( z , z ′ ) ) 1/ p .
We will later also use the following standard result about the Wasserstein distance under Lipschitz maps, cf. [63 Ch. 6] , to pass from bounds on the curvature measure to bounds on the distribution of an n n n -invariant; we include a short proof for completeness.
Lemma 3.12. Let ( X , d X ) (X,d_X) ( X , d X ) and ( Y , d Y ) (Y,d_Y) ( Y , d Y ) be Polish metric spaces, and let F : X → Y F:X \to Y F : X → Y be an L L L -Lipschitz function. For any two Borel probability measures α , β \alpha,\beta α , β on X X X and any p ≥ 1 p \geq1 p ≥ 1 ,
W p ( F # α , F # β ) ≤ L ⋅ W p ( α , β ) . W_p(F_\#\alpha,F_\#\beta) \leq L \cdot W_p(\alpha,\beta). W p ( F # α , F # β ) ≤ L ⋅ W p ( α , β ) . Proof. Let π ∈ Π ( α , β ) \pi\in\Pi(\alpha,\beta) π ∈ Π ( α , β ) . Since the pushforward π F ≔ ( F × F ) # π \pi_F \coloneqq(F \times F)_\#\pi π F : = ( F × F ) # π is a coupling of F # α F_\#\alpha F # α and F # β F_\#\beta F # β , we obtain
W p ( F # α , F # β ) p ≤ ∫ Y × Y d Y ( y , y ′ ) p d π F ( y , y ′ ) W_p(F_\#\alpha,F_\#\beta)^p \leq\int_{Y\times Y} d_Y(y,y')^p\,\mathrm{d}\pi_F(y,y') W p ( F # α , F # β ) p ≤ ∫ Y × Y d Y ( y , y ′ ) p d π F ( y , y ′ ) = ∫ X × X d Y ( F ( x ) , F ( x ′ ) ) p d π ( x , x ′ ) ≤ L p ∫ X × X d X ( x , x ′ ) p d π ( x , x ′ ) . = \int_{X\times X} d_Y(F(x),F(x'))^p\,\mathrm{d}\pi(x,x') \leq L^p \int_{X\times X} d_X(x,x')^p\,\mathrm{d}\pi(x,x'). = ∫ X × X d Y ( F ( x ) , F ( x ′ ) ) p d π ( x , x ′ ) ≤ L p ∫ X × X d X ( x , x ′ ) p d π ( x , x ′ ) . Taking p p p -th root and infimizing over all π ∈ Π ( α , β ) \pi\in\Pi(\alpha,\beta) π ∈ Π ( α , β ) yields the result.
Throughout, given i.i.d. samples y 1 , … , y N ∼ μ y_1,\ldots,y_N \sim\mu y 1 , … , y N ∼ μ from a Borel probability measure μ \mu μ on any Polish space, we write
μ ^ N : = 1 N ∑ i = 1 N δ y i (2) \widehat{\mu}_N := \frac{1}{N}\sum_{i=1}^{N}\delta_{y_i} \tag*{(2)} μ N := N 1 i = 1 ∑ N δ y i (2)
for their empirical measure . For example, for the curvature measure μ n \mu_n μ n of an mm-space ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) , we sample N N N tuples x ( 1 ) , … , x ( N ) ∼ μ X ⊗ n x^{(1)},\ldots,x^{(N)} \sim\mu_X^{\otimes n} x ( 1 ) , … , x ( N ) ∼ μ X ⊗ n and their distance matrices Ψ n ( x ( i ) ) \Psi_n(x^{(i)}) Ψ n ( x ( i ) ) are i.i.d. samples from μ n \mu_n μ n , with empirical measure
μ ^ n , N : = 1 N ∑ i = 1 N δ Ψ n ( x ( i ) ) . \widehat{\mu}_{n,N} := \frac{1}{N}\sum_{i=1}^{N}\delta_{\Psi_n(x^{(i)})}. μ n , N := N 1 i = 1 ∑ N δ Ψ n ( x ( i ) ) .
Theorems A and D provide bounds of the form E [ W p ( μ ^ N , μ ) p ] ≤ β ( N ) \mathbb{E}[W_p(\widehat{\mu}_N,\mu)^p] \leq\beta(N) E [ W p ( μ N , μ ) p ] ≤ β ( N ) , where β ( N ) \beta(N) β ( N ) is a non-increasing non-negative function of N N N . Such bounds also determine how many samples are needed to reach a given error with a given confidence. We use the strategy of [64 Sec. 2.3] : choose N N N large enough that the expectation of W p p W_p^p W p p is small, then use the concentration of W p p W_p^p W p p around its expectation, which follows from McDiarmid’s bounded differences inequality [64 Prop. 20] . The following lemma records this argument in a form suitable for our purposes.
Lemma 3.13. Let 1 ≤ p < ∞ 1 \leq p < \infty 1 ≤ p < ∞ , and let μ \mu μ be a Borel probability measure on a Polish space ( Z , d Z ) (Z,d_Z) ( Z , d Z ) with compact support and diam ( supp μ ) ≤ D \operatorname{diam}(\operatorname{supp}\mu) \leq D diam ( supp μ ) ≤ D for some D > 0 D > 0 D > 0 . Suppose E [ W p ( μ ^ N , μ ) p ] ≤ β ( N ) \mathbb{E}[W_p(\widehat{\mu}_N,\mu)^p] \leq\beta(N) E [ W p ( μ N , μ ) p ] ≤ β ( N ) for some non-increasing function β : ( 0 , ∞ ) → [ 0 , ∞ ) \beta:(0,\infty)\to[0,\infty) β : ( 0 , ∞ ) → [ 0 , ∞ ) . Choose an error margin ϵ > 0 \epsilon> 0 ϵ > 0 and a confidence level 0 < α < 1 0 < \alpha< 1 0 < α < 1 , and let N 0 > 0 N_0 > 0 N 0 > 0 satisfy
β ( N 0 ) D p + − 1 2 ln ( 1 − α ) N 0 − 1 / 2 ≤ ϵ p . \frac{\beta(N_0)}{D^p}+\sqrt{-\frac{1}{2}\ln(1-\alpha)}N_0^{-1/2}\leq\epsilon^p. D p β ( N 0 ) + − 2 1 ln ( 1 − α ) N 0 − 1/2 ≤ ϵ p . Then for all N > N 0 N>N_0 N > N 0 ,
W p ( μ ^ N , μ ) < ϵ D (3) W_p(\widehat{\mu}_N,\mu)<\epsilon D \tag*{(3)} W p ( μ N , μ ) < ϵD (3) with probability at least α \alpha α .
Proof. Write W p : = W p ( μ ^ N , μ ) W_p := W_p(\widehat{\mu}_N,\mu) W p := W p ( μ N , μ ) for short, and let K : = supp μ K := \operatorname{supp}\mu K := supp μ . Almost surely, all samples lie in K K K , so W p W_p W p is the Wasserstein distance of two measures on K K K . Since the paper [64 ] works with compact spaces of diameter at most 1 1 1 , we rescale the metric on K K K by 1 / D 1/D 1/ D , which rescales W p W_p W p to W ~ p : = W p / D \widetilde{W}_p := W_p/D W p := W p / D . By [64 Prop. 20] , P [ W ~ p p − E [ W ~ p p ] ≥ t ] ≤ exp ( − 2 N t 2 ) \mathbb{P}[\widetilde{W}_p^p-\mathbb{E}[\widetilde{W}_p^p]\geq t]\leq\exp(-2Nt^2) P [ W p p − E [ W p p ] ≥ t ] ≤ exp ( − 2 N t 2 ) or, equivalently,
P [ W p p − E [ W p p ] ≥ t D p ] ≤ exp ( − 2 N t 2 ) . \mathbb{P}[W_p^p-\mathbb{E}[W_p^p]\geq tD^p]\leq\exp(-2Nt^2). P [ W p p − E [ W p p ] ≥ t D p ] ≤ exp ( − 2 N t 2 ) .
Let t : = − 1 2 ln ( 1 − α ) N − 1 / 2 t:=\sqrt{-\frac{1}{2}\ln(1-\alpha)}N^{-1/2} t := − 2 1 ln ( 1 − α ) N − 1/2 , so that exp ( − 2 N t 2 ) = 1 − α \exp(-2Nt^2)=1-\alpha exp ( − 2 N t 2 ) = 1 − α . Since β \beta β is non-increasing and N > N 0 N>N_0 N > N 0 , with probability at least α \alpha α we have
W p p < E [ W p p ] + t D p ≤ β ( N ) + D p − 1 2 ln ( 1 − α ) N − 1 / 2 < ( β ( N 0 ) D p + − 1 2 ln ( 1 − α ) N 0 − 1 / 2 ) D p ≤ ϵ p D p . \begin{aligned}
W_p^p<\mathbb{E}[W_p^p]+tD^p\leq\beta(N)+D^p\sqrt{-\frac{1}{2}\ln(1-\alpha)}N^{-1/2} \\
&<\left(\frac{\beta(N_0)}{D^p}+\sqrt{-\frac{1}{2}\ln(1-\alpha)}N_0^{-1/2}\right)D^p\leq\epsilon^pD^p.
\end{aligned} W p p < E [ W p p ] + t D p ≤ β ( N ) + D p − 2 1 ln ( 1 − α ) N − 1/2 < ( D p β ( N 0 ) + − 2 1 ln ( 1 − α ) N 0 − 1/2 ) D p ≤ ϵ p D p .
Moments and dimensions of measures
We now collect the remaining ingredients required for the proofs of Theorems A and D . Both bound E [ W p ( μ ^ N , μ ) p ] \mathbb{E}[W_p(\widehat{\mu}_N,\mu)^p] E [ W p ( μ N , μ ) p ] by functions of the form β ( N ) = ∑ i C i N − e i \beta(N)=\sum_i C_iN^{-e_i} β ( N ) = ∑ i C i N − e i , where the smallest e i e_i e i is determined by the dimension of the set in which the convergence is described. Theorem A applies the bounds of [25 , 26 ] for arbitrary measures in Euclidean space R d \mathbb{R}^d R d to μ n \mu_n μ n , so the relevant dimension is the ambient d = ( n 2 ) d=\binom{n}{2} d = ( 2 n ) . In this case there is only a single term and the constant depends on the moments of μ n \mu_n μ n . In contrast, Theorem D relies on convergence within sets of full measure [8 , 16 ] or of almost full measure [64 ] , whose dimensions can be smaller than the ambient dimension and may thus yield a faster convergence rate. We begin by recalling some basic facts about the moments of a measure and then turn to the relevant notions of dimension.
Definition 3.14 (Moments of a measure). Let X ⊂ R d X \subset\mathbb{R}^{d} X ⊂ R d and let μ X \mu_X μ X be a Borel probability measure supported on X X X . Fix 1 ≤ q < ∞ 1 \le q < \infty 1 ≤ q < ∞ , 1 ≤ m ≤ ∞ 1 \le m \le\infty 1 ≤ m ≤ ∞ , and p 0 ∈ R d \mathbf{p}_0 \in\mathbb{R}^{d} p 0 ∈ R d . The q q q -th moment of μ X \mu_X μ X about p 0 \mathbf{p}_0 p 0 is
M q ( m ) ( μ X , p 0 ) : = ∫ X ∥ x − p 0 ∥ m q μ X ( d x ) . \mathcal{M}^{(m)}_q(\mu_X,\mathbf{p}_0) := \int_X \lVert\mathbf{x}-\mathbf{p}_0\rVert_m^q \,\mu_X(\mathrm{d}x). M q ( m ) ( μ X , p 0 ) := ∫ X ∥ x − p 0 ∥ m q μ X ( d x ) . We define the q q q -th translation invariant moment as M q ( m ) ( μ X ) : = inf p 0 ∈ R d M q ( m ) ( μ X , p 0 ) \mathcal{M}^{(m)}_q(\mu_X) := \inf_{\mathbf{p}_0\in\mathbb{R}^{d}} \mathcal{M}^{(m)}_q(\mu_X,\mathbf{p}_0) M q ( m ) ( μ X ) := inf p 0 ∈ R d M q ( m ) ( μ X , p 0 ) . We also define
M ∞ ( m ) ( μ X , p 0 ) : = sup q ≥ 1 M q ( m ) ( μ X , p 0 ) 1 / q = sup x ∈ X ∥ x − p 0 ∥ m \mathcal{M}^{(m)}_\infty(\mu_X,\mathbf{p}_0) := \sup_{q\ge1} \mathcal{M}^{(m)}_q(\mu_X,\mathbf{p}_0)^{1/q} = \sup_{\mathbf{x}\in X} \lVert\mathbf{x}-\mathbf{p}_0\rVert_m M ∞ ( m ) ( μ X , p 0 ) := q ≥ 1 sup M q ( m ) ( μ X , p 0 ) 1/ q = x ∈ X sup ∥ x − p 0 ∥ m M ∞ ( m ) ( μ X ) : = sup q ≥ 1 M q ( m ) ( μ X ) 1 / q . \mathcal{M}^{(m)}_\infty(\mu_X) := \sup_{q\ge1} \mathcal{M}^{(m)}_q(\mu_X)^{1/q}. M ∞ ( m ) ( μ X ) := q ≥ 1 sup M q ( m ) ( μ X ) 1/ q .
The translation invariant moments are defined by an infimum over the base point p 0 \mathbf{p}_0 p 0 and we will need to know how the moments may vary with p 0 \mathbf{p}_0 p 0 , which is the content of the following lemma.
Lemma 3.15. The functions p 0 ↦ M q ( m ) ( μ X , p 0 ) 1 / q \mathbf{p}_0 \mapsto\mathcal{M}^{(m)}_q(\mu_X,\mathbf{p}_0)^{1/q} p 0 ↦ M q ( m ) ( μ X , p 0 ) 1/ q with 1 ≤ q < ∞ 1 \le q < \infty 1 ≤ q < ∞ and p 0 ↦ M ∞ ( m ) ( μ X , p 0 ) \mathbf{p}_0 \mapsto\mathcal{M}^{(m)}_\infty(\mu_X,\mathbf{p}_0) p 0 ↦ M ∞ ( m ) ( μ X , p 0 ) are 1-Lipschitz.
Proof. By Minkowski’s inequality,
M q ( m ) ( μ X , p 0 ) 1 / q ≤ ( ∫ X ( ∥ x − p 0 ′ ∥ m + ∥ p 0 ′ − p 0 ∥ m ) q μ X ( d x ) ) 1 / q ≤ ( ∫ X ∥ x − p 0 ′ ∥ m q μ X ( d x ) ) 1 / q + ( ∫ X ∥ p 0 ′ − p 0 ∥ m q μ X ( d x ) ) 1 / q = M q ( m ) ( μ X , p 0 ′ ) 1 / q + ∥ p 0 ′ − p 0 ∥ m . \begin{aligned}
\mathcal{M}^{(m)}_q(\mu_X,\mathbf{p}_0)^{1/q} \le\left(\int_X \left(\lVert\mathbf{x}-\mathbf{p}'_0\rVert_m+\lVert\mathbf{p}'_0-\mathbf{p}_0\rVert_m\right)^q \,\mu_X(\mathrm{d}x)\right)^{1/q} \\
&\le\left(\int_X \lVert\mathbf{x}-\mathbf{p}'_0\rVert_m^q \,\mu_X(\mathrm{d}x)\right)^{1/q}+\left(\int_X \lVert\mathbf{p}'_0-\mathbf{p}_0\rVert_m^q \,\mu_X(\mathrm{d}x)\right)^{1/q} \\
&= \mathcal{M}^{(m)}_q(\mu_X,\mathbf{p}'_0)^{1/q}+\lVert\mathbf{p}'_0-\mathbf{p}_0\rVert_m.
\end{aligned} M q ( m ) ( μ X , p 0 ) 1/ q ≤ ( ∫ X ( ∥ x − p 0 ′ ∥ m + ∥ p 0 ′ − p 0 ∥ m ) q μ X ( d x ) ) 1/ q ≤ ( ∫ X ∥ x − p 0 ′ ∥ m q μ X ( d x ) ) 1/ q + ( ∫ X ∥ p 0 ′ − p 0 ∥ m q μ X ( d x ) ) 1/ q = M q ( m ) ( μ X , p 0 ′ ) 1/ q + ∥ p 0 ′ − p 0 ∥ m .
Swapping the roles of p 0 \mathbf{p}_0 p 0 and p 0 ′ \mathbf{p}'_0 p 0 ′ yields ∣ M q ( m ) ( μ X , p 0 ′ ) 1 / q − M q ( m ) ( μ X , p 0 ) 1 / q ∣ ≤ ∥ p 0 ′ − p 0 ∥ m \left|\mathcal{M}^{(m)}_q(\mu_X,\mathbf{p}'_0)^{1/q}-\mathcal{M}^{(m)}_q(\mu_X,\mathbf{p}_0)^{1/q}\right| \le\lVert\mathbf{p}'_0-\mathbf{p}_0\rVert_m M q ( m ) ( μ X , p 0 ′ ) 1/ q − M q ( m ) ( μ X , p 0 ) 1/ q ≤ ∥ p 0 ′ − p 0 ∥ m , as claimed. The proof for M ∞ ( m ) ( μ X , p 0 ) \mathcal{M}^{(m)}_\infty(\mu_X,\mathbf{p}_0) M ∞ ( m ) ( μ X , p 0 ) is analogous. □
The moments of a measure are controlled by the size of its support, more precisely its minimum enclosing radius. This will allow us to replace the moment factor in the empirical convergence rates of [26 ] by the diameter of X X X , which is how we obtain an explicit constant in Theorem A .
Definition 3.16 (Minimum enclosing radius). Let X ⊂ R d X \subset\mathbb{R}^{d} X ⊂ R d and fix 1 ≤ p ≤ ∞ 1 \le p \le\infty 1 ≤ p ≤ ∞ . The minimum enclosing radius of X X X in the ℓ p \ell^{p} ℓ p metric is
R p ( X ) : = inf { R > 0 ∣ ∃ p 0 ∈ R d such that ∥ x − p 0 ∥ p ≤ R for all x ∈ X } . R_p(X) := \inf\{R > 0 \mid\exists\,\mathbf{p}_0 \in\mathbb{R}^{d}\text{ such that }\lVert\mathbf{x}-\mathbf{p}_0\rVert_p \le R\text{ for all }\mathbf{x}\in X\}. R p ( X ) := inf { R > 0 ∣ ∃ p 0 ∈ R d such that ∥ x − p 0 ∥ p ≤ R for all x ∈ X } . Alternatively, R p ( X ) = inf p 0 ∈ R d sup x ∈ X ∥ x − p 0 ∥ p R_p(X) = \inf_{\mathbf{p}_0\in\mathbb{R}^{d}}\sup_{\mathbf{x}\in X}\lVert\mathbf{x}-\mathbf{p}_0\rVert_p R p ( X ) = inf p 0 ∈ R d sup x ∈ X ∥ x − p 0 ∥ p .
Proposition 3.17. Let X ⊂ R d X \subset\mathbb{R}^{d} X ⊂ R d and let μ X \mu_X μ X be a Borel probability measure supported on X X X . Fix 1 ≤ m ≤ ∞ 1 \le m \le\infty 1 ≤ m ≤ ∞ . Then M ∞ ( m ) ( μ X ) = sup q ≥ 1 M q ( m ) ( μ X ) 1 / q = R m ( X ) \mathcal{M}^{(m)}_\infty(\mu_X) = \sup_{q\ge1}\mathcal{M}^{(m)}_q(\mu_X)^{1/q} = R_m(X) M ∞ ( m ) ( μ X ) = sup q ≥ 1 M q ( m ) ( μ X ) 1/ q = R m ( X ) .
Proof. Given p 0 ∈ R d \mathbf{p}_0 \in\mathbb{R}^{d} p 0 ∈ R d , define f m , p 0 : X → R f_{m,\mathbf{p}_0}: X \to\mathbb{R} f m , p 0 : X → R by f m , p 0 ( x ) : = ∥ x − p 0 ∥ m f_{m,\mathbf{p}_0}(\mathbf{x}) := \lVert\mathbf{x}-\mathbf{p}_0\rVert_m f m , p 0 ( x ) := ∥ x − p 0 ∥ m . Since μ X \mu_X μ X is a probability measure and M q ( m ) ( μ X , p 0 ) 1 / q = ∥ f m , p 0 ∥ L q ( X , μ X ) \mathcal{M}^{(m)}_q(\mu_X,\mathbf{p}_0)^{1/q} = \lVert f_{m,\mathbf{p}_0}\rVert_{L^q(X,\mu_X)} M q ( m ) ( μ X , p 0 ) 1/ q = ∥ f m , p 0 ∥ L q ( X , μ X ) , the function q ↦ M q ( m ) ( μ X , p 0 ) 1 / q q \mapsto\mathcal{M}^{(m)}_q(\mu_X,\mathbf{p}_0)^{1/q} q ↦ M q ( m ) ( μ X , p 0 ) 1/ q is increasing in q q q and has limit M ∞ ( m ) ( μ X , p 0 ) = ∥ f m , p 0 ∥ L ∞ ( X , μ X ) \mathcal{M}^{(m)}_\infty(\mu_X,\mathbf{p}_0) = \lVert f_{m,\mathbf{p}_0}\rVert_{L^\infty(X,\mu_X)} M ∞ ( m ) ( μ X , p 0 ) = ∥ f m , p 0 ∥ L ∞ ( X , μ X ) . Moreover,
sup q ≥ 1 M q ( m ) ( μ X ) 1 / q ≤ inf p 0 ∈ R d sup q ≥ 1 M q ( m ) ( μ X , p 0 ) 1 / q = inf p 0 ∈ R d sup x ∈ X ∥ x − p 0 ∥ m = R m ( X ) . \sup_{q\ge1}\mathcal{M}^{(m)}_q(\mu_X)^{1/q} \le\inf_{\mathbf{p}_0\in\mathbb{R}^{d}}\sup_{q\ge1}\mathcal{M}^{(m)}_q(\mu_X,\mathbf{p}_0)^{1/q} = \inf_{\mathbf{p}_0\in\mathbb{R}^{d}}\sup_{\mathbf{x}\in X}\lVert\mathbf{x}-\mathbf{p}_0\rVert_m = R_m(X). q ≥ 1 sup M q ( m ) ( μ X ) 1/ q ≤ p 0 ∈ R d inf q ≥ 1 sup M q ( m ) ( μ X , p 0 ) 1/ q = p 0 ∈ R d inf x ∈ X sup ∥ x − p 0 ∥ m = R m ( X ) .
@suppress If supp ( μ X ) \operatorname{supp}(\mu_X) supp ( μ X ) is unbounded, every term above is infinite, so we only prove the reverse inequality when supp ( μ X ) \operatorname{supp}(\mu_X) supp ( μ X ) is bounded. Choose a closed ball B ‾ ⊂ R d \overline{B} \subset\mathbb{R}^d B ⊂ R d that is large enough to contain supp ( μ X ) \operatorname{supp}(\mu_X) supp ( μ X ) and every point p 0 \mathbf{p}_0 p 0 that realizes the infimum in M q ( m ) ( μ X ) M_q^{(m)}(\mu_X) M q ( m ) ( μ X ) for q ≥ 1 q \ge1 q ≥ 1 . By Lemma 3.15 , the functions p 0 ↦ M q ( m ) ( μ X , p 0 ) 1 / q \mathbf{p}_0 \mapsto M_q^{(m)}(\mu_X,\mathbf{p}_0)^{1/q} p 0 ↦ M q ( m ) ( μ X , p 0 ) 1/ q and p 0 ↦ M ∞ ( m ) ( μ X , p 0 ) \mathbf{p}_0 \mapsto M_\infty^{(m)}(\mu_X,\mathbf{p}_0) p 0 ↦ M ∞ ( m ) ( μ X , p 0 ) are 1 1 1 -Lipschitz and, hence, continuous for all q ≥ 1 q \ge1 q ≥ 1 . After replacing q ≥ 1 q \ge1 q ≥ 1 with an integer k ≥ 1 k \ge1 k ≥ 1 and restricting p 0 \mathbf{p}_0 p 0 to the compact set B ‾ \overline{B} B , we get a sequence ( M k ( m ) ( μ X , p 0 ) 1 / k ) k \left(M_k^{(m)}(\mu_X,\mathbf{p}_0)^{1/k}\right)_{k} ( M k ( m ) ( μ X , p 0 ) 1/ k ) k of non-decreasing continuous functions defined on a compact set with a continuous limit, so Dini’s theorem implies that M k ( m ) ( μ X , p 0 ) 1 / k M_k^{(m)}(\mu_X,\mathbf{p}_0)^{1/k} M k ( m ) ( μ X , p 0 ) 1/ k converges uniformly to M ∞ ( m ) ( μ X , p 0 ) M_\infty^{(m)}(\mu_X,\mathbf{p}_0) M ∞ ( m ) ( μ X , p 0 ) . Then for every ϵ > 0 \epsilon> 0 ϵ > 0 , there exists k 0 > 0 k_0 > 0 k 0 > 0 such that
M ∞ ( m ) ( μ X , p 0 ) − ϵ < M k ( m ) ( μ X , p 0 ) 1 / k M_\infty^{(m)}(\mu_X,\mathbf{p}_0)-\epsilon< M_k^{(m)}(\mu_X,\mathbf{p}_0)^{1/k} M ∞ ( m ) ( μ X , p 0 ) − ϵ < M k ( m ) ( μ X , p 0 ) 1/ k
for every k > k 0 k > k_0 k > k 0 and p 0 ∈ B ‾ \mathbf{p}_0 \in\overline{B} p 0 ∈ B . Then
R m ( X ) − ϵ = inf p 0 ∈ B ‾ M ∞ ( m ) ( μ X , p 0 ) − ϵ ≤ inf p 0 ∈ B ‾ M k ( m ) ( μ X , p 0 ) 1 / k = M k ( m ) ( μ X ) 1 / k ≤ M ∞ ( m ) ( μ X ) . R_m(X)-\epsilon=\inf_{\mathbf{p}_0\in\overline{B}}M_\infty^{(m)}(\mu_X,\mathbf{p}_0)-\epsilon\leq\inf_{\mathbf{p}_0\in\overline{B}}M_k^{(m)}(\mu_X,\mathbf{p}_0)^{1/k}=M_k^{(m)}(\mu_X)^{1/k}\leq M_\infty^{(m)}(\mu_X). R m ( X ) − ϵ = p 0 ∈ B inf M ∞ ( m ) ( μ X , p 0 ) − ϵ ≤ p 0 ∈ B inf M k ( m ) ( μ X , p 0 ) 1/ k = M k ( m ) ( μ X ) 1/ k ≤ M ∞ ( m ) ( μ X ) .
Letting ϵ → 0 \epsilon\to0 ϵ → 0 yields R m ( X ) ≤ M ∞ ( m ) ( μ X ) R_m(X) \leq M_\infty^{(m)}(\mu_X) R m ( X ) ≤ M ∞ ( m ) ( μ X ) and, with that, the result. □
As mentioned above, the estimates of [8 , 64 , 16 ] may replace the dimension of the ambient Euclidean space by an intrinsic dimension of supp ( μ ) \operatorname{supp}(\mu) supp ( μ ) , which can be considerably smaller. These sources do not all use the same notion of dimension. The ones we need are the standard Hausdorff and Minkowski dimensions d H ( X ) d_H(X) d H ( X ) and d M ( X ) d_M(X) d M ( X ) of a metric space, and the Wasserstein dimension d p ∗ ( μ X ) d_p^*(\mu_X) d p ∗ ( μ X ) of [64 Def. 4] , which depends on a parameter 1 ≤ p < ∞ 1 \leq p < \infty 1 ≤ p < ∞ . [64 ] also use the Minkowski dimension d M ( μ ) d_M(\mu) d M ( μ ) of a measure [64 Def. 5] , but on a Polish space it equals d M ( supp μ ) d_M(\operatorname{supp}\mu) d M ( supp μ ) because the Minkowski dimension is monotone and invariant under closures [56 Lem. 3.3(i), (ii)] . Rather than reproducing the precise definitions, we impose a standard regularity condition on our mm-spaces, under which all three agree with a single parameter s s s .
Definition 3.18 (Ahlfors regularity, e.g. [35 Ch. 8] ). Let ( X , d X ) (X,d_X) ( X , d X ) be a metric space and μ X \mu_X μ X a Borel measure on X X X . The triple ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) is said to be Ahlfors s s s -regular if there exists a constant C X C_X C X such that
1 C X r s ≤ μ X ( B X ( x 0 , r ) ) ≤ C X r s (4) \frac{1}{C_X}r^s\leq\mu_X(B_X(x_0,r))\leq C_Xr^s \tag*{(4)} C X 1 r s ≤ μ X ( B X ( x 0 , r )) ≤ C X r s (4) for every x 0 ∈ X x_0 \in X x 0 ∈ X and 0 < r < diam ( X ) 0 < r < \operatorname{diam}(X) 0 < r < diam ( X ) .
Lemma 3.19. Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) be an Ahlfors s s s -regular mm-space. Then X X X is compact and μ X \mu_X μ X is fully supported.
Proof. By (4) , μ X ( B X ( x , ϵ / 2 ) ) ≥ ( ϵ / 2 ) s / C X \mu_X(B_X(x,\epsilon/2)) \geq(\epsilon/2)^s/C_X μ X ( B X ( x , ϵ /2 )) ≥ ( ϵ /2 ) s / C X for every x ∈ X x \in X x ∈ X and 0 < ϵ < diam ( X ) 0 < \epsilon< \operatorname{diam}(X) 0 < ϵ < diam ( X ) . If x 1 , … , x k ∈ X x_1,\ldots,x_k \in X x 1 , … , x k ∈ X are ϵ \epsilon ϵ -separated, the balls B X ( x i , ϵ / 2 ) B_X(x_i,\epsilon/2) B X ( x i , ϵ /2 ) are pairwise disjoint, and since μ X \mu_X μ X is a probability measure, k ≤ C X ( 2 / ϵ ) s k \leq C_X(2/\epsilon)^s k ≤ C X ( 2/ ϵ ) s . The ϵ \epsilon ϵ -balls around an ϵ \epsilon ϵ -separated set of maximal cardinality cover X X X , so X X X is totally bounded. Since d X d_X d X is complete, X X X is compact. Finally, (4) holds at every x 0 ∈ X x_0 \in X x 0 ∈ X , so every ball has positive measure and μ X \mu_X μ X is fully supported. □
The following lemma shows that for an Ahlfors s s s -regular mm-space, the three relevant notions of dimension coincide with s s s . In § 5 , we use it to bound the dimensions of K n ( X ) K_n(X) K n ( X ) , which then enter the convergence rates of [64 ] in the proof of Theorem D in § 6 .
Lemma 3.20. Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) be an Ahlfors s s s -regular mm-space and H X s \mathcal{H}_X^s H X s the s s s -dimensional Hausdorff measure on ( X , d X ) (X,d_X) ( X , d X ) . Then:
(i) μ X \mu_X μ X is absolutely continuous with respect to H X s \mathcal{H}_X^s H X s , written μ X ≪ H X s \mu_X \ll\mathcal{H}_X^s μ X ≪ H X s .
(ii) d H ( X ) = d M ( X ) = s d_H(X)=d_M(X)=s d H ( X ) = d M ( X ) = s .
(iii) d p ∗ ( μ X ) = s d_p^*(\mu_X)=s d p ∗ ( μ X ) = s for 1 ≤ p ≤ s / 2 1 \leq p \leq s/2 1 ≤ p ≤ s /2 .
Proof. Assume ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) is Ahlfors s s s -regular. By [35 Ex. 8.11] , there exists C ′ > 0 C' > 0 C ′ > 0 such that
1 C ′ H X s ( E ) ≤ μ X ( E ) ≤ C ′ H X s ( E ) (5) \frac{1}{C'}\mathcal{H}^{s}_{X}(E) \le\mu_X(E) \le C'\mathcal{H}^{s}_{X}(E) \tag*{(5)} C ′ 1 H X s ( E ) ≤ μ X ( E ) ≤ C ′ H X s ( E ) (5)
for every Borel E ⊂ X E \subset X E ⊂ X . Then:
(i) Every null set E E E of H X s \mathcal{H}^{s}_{X} H X s satisfies μ X ( E ) ≤ C ′ H X s ( E ) = 0 \mu_X(E) \le C'\mathcal{H}^{s}_{X}(E) = 0 μ X ( E ) ≤ C ′ H X s ( E ) = 0 , so μ X ≪ H X s \mu_X \ll\mathcal{H}^{s}_{X} μ X ≪ H X s (and, analogously, H X s ≪ μ X \mathcal{H}^{s}_{X} \ll\mu_X H X s ≪ μ X ).
(ii) Combining equations (4) and (5) yields
1 C X C ′ ⋅ r s ≤ H X s ( B X ( x 0 , r ) ) ≤ ( C X C ′ ) ⋅ r s , (6) \frac{1}{C_XC'} \cdot r^s \le\mathcal{H}^{s}_{X}(B_X(x_0,r)) \le(C_XC') \cdot r^s, \tag*{(6)} C X C ′ 1 ⋅ r s ≤ H X s ( B X ( x 0 , r )) ≤ ( C X C ′ ) ⋅ r s , (6)
so by [35 Sec. 8.7] , d H ( X ) = s d_H(X) = s d H ( X ) = s . Regarding d M ( X ) d_M(X) d M ( X ) , the argument of [45 Thm. 5.7] can be extended from R n \mathbb{R}^n R n to any metric space, so d M ( X ) = s d_M(X) = s d M ( X ) = s .
(iii) By Lemma 3.19 and (6) , supp μ X = X \operatorname{supp}\mu_X = X supp μ X = X is a regular set of dimension s s s in the sense of [64 Def. 6] . By (i), [64 Prop. 8] then yields d p ∗ ( μ X ) = s d_p^*(\mu_X) = s d p ∗ ( μ X ) = s for 1 ≤ p ≤ s / 2 1 \le p \le s/2 1 ≤ p ≤ s /2 .
Metric n-point invariants
Metric n n n -point invariants formalize quantities that depend only on the pairwise distances among n n n points. In the simplest cases, n n n -point invariants take values in R \mathbb{R} R or R k \mathbb{R}^k R k , but more general spaces also arise naturally, for example in the case of persistence diagrams. From now on, we fix a Polish space ( Z , d Z ) (Z,d_Z) ( Z , d Z ) equipped with its Borel σ \sigma σ -algebra.
Definition 4.1. A metric n n n -point invariant valued in Z Z Z , or n n n -invariant for short, is any measurable function F : K n → Z F:\mathbf{K}_n \to Z F : K n → Z . We say that an n n n -invariant is L L L -Lipschitz if
d Z ( F ( M ) , F ( M ′ ) ) ≤ L ⋅ ∥ M − M ′ ∥ ∞ d_Z(F(M),F(M')) \le L\cdot\lVert M-M'\rVert_\infty d Z ( F ( M ) , F ( M ′ )) ≤ L ⋅ ∥ M − M ′ ∥ ∞ for any M , M ′ ∈ K n M,M' \in\mathbf{K}_n M , M ′ ∈ K n , and Lipschitz if it is L L L -Lipschitz for some L ≥ 0 L \ge0 L ≥ 0 , in which case we write Lip ( F ) \operatorname{Lip}(F) Lip ( F ) for the smallest such L L L .
Any n n n -invariant induces a map on X n X^n X n via F ∘ Ψ n : X n → Z F\circ\Psi_n:X^n \to Z F ∘ Ψ n : X n → Z . Conversely, any map F X : X n → Z F_X:X^n \to Z F X : X n → Z that satisfies F X ( x ) = F X ( x ′ ) F_X(x)=F_X(x') F X ( x ) = F X ( x ′ ) whenever Ψ n ( x ) = Ψ n ( x ′ ) \Psi_n(x)=\Psi_n(x') Ψ n ( x ) = Ψ n ( x ′ ) defines a map F : K n ( X ) → Z F:\mathbf{K}_n(X) \to Z F : K n ( X ) → Z . We often abuse notation and write F ( x ) F(x) F ( x ) instead of F ( Ψ n ( x ) ) F(\Psi_n(x)) F ( Ψ n ( x )) or F X ( x ) F_X(x) F X ( x ) .
Definition 4.2. Let F : K n → Z F:\mathbf{K}_n \to Z F : K n → Z be an n n n -invariant. Given an mm-space ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) , the distribution of F F F over X X X is the pushforward
ν F , ( X , d X , μ X ) : = F # ( μ n , X ) = ( F ∘ Ψ n ) # ( μ X ⊗ n ) . \nu_{F,(X,d_X,\mu_X)} := F_{\#}(\mu_{n,X}) = (F\circ\Psi_n)_{\#}(\mu_X^{\otimes n}). ν F , ( X , d X , μ X ) := F # ( μ n , X ) = ( F ∘ Ψ n ) # ( μ X ⊗ n ) . Throughout, we suppress parameters that can be inferred from context and write, for instance, ν F , X \nu_{F,X} ν F , X and ν F , μ \nu_{F,\mu} ν F , μ .
Remark 4.3. Note that an n n n -invariant F F F is a Z Z Z -valued random variable on the probability space ( K n , μ n , X ) (\mathbf{K}_n,\mu_{n,X}) ( K n , μ n , X ) for every choice of mm-space X X X , and ν F , X \nu_{F,X} ν F , X is its distribution. Equivalently, ν F , X \nu_{F,X} ν F , X is the distribution of F ( x ) F(\mathbf{x}) F ( x ) for a random n n n -tuple x ∼ μ X ⊗ n \mathbf{x}\sim\mu_X^{\otimes n} x ∼ μ X ⊗ n of independent μ X \mu_X μ X -distributed points.
The collection of all metric n n n -point invariants is closed under measurable postcomposition, and their induced distributions behave naturally under this operation.
Proposition 4.4. Let F : K n → Z F:\mathbf{K}_n \to Z F : K n → Z be an n n n -invariant and let f : Z → Z ′ f:Z \to Z' f : Z → Z ′ be measurable. Then f ∘ F f\circ F f ∘ F is a Z ′ Z' Z ′ -valued n n n -invariant and ν f ∘ F , X = f # ν F , X \nu_{f\circ F,X}=f_{\#}\nu_{F,X} ν f ∘ F , X = f # ν F , X .
Proof. This follows from measurability of compositions and functoriality of pushforwards.
The induced measure ν F , X \nu_{F,X} ν F , X should be viewed as the distribution of the geometric quantity measured by F F F across X X X . As with any probability distribution, we can describe ν F , X \nu_{F,X} ν F , X through statistics such as its mean and higher moments, each of which then summarizes an aspect of the geometry of X X X . For general Z Z Z , this is obtained from the associated Fréchet function Φ ν F , X ( z 0 ) : = ∫ Z d Z ( z , z 0 ) 2 d ν F , X ( z ) \Phi_{\nu_{F,X}}(z_0) := \int_Z d_Z(z,z_0)^2\,d\nu_{F,X}(z) Φ ν F , X ( z 0 ) := ∫ Z d Z ( z , z 0 ) 2 d ν F , X ( z ) , whose minimizers, when they exist, are the Fréchet means of ν F , X \nu_{F,X} ν F , X . When Z = R Z = \mathbb{R} Z = R or Z = R k Z = \mathbb{R}^k Z = R k , the Fréchet mean reduces to the ordinary mean, and one recovers the familiar Euclidean summaries of a distribution. More generally, we can compute E ν F , X [ h ] : = ∫ Z h ( z ) d ν F , X ( z ) \mathbb{E}_{\nu_{F,X}}[h] := \int_Z h(z)\,d\nu_{F,X}(z) E ν F , X [ h ] := ∫ Z h ( z ) d ν F , X ( z ) for a measurable h : Z → R h: Z \to\mathbb{R} h : Z → R and recover, when ( Z , d Z ) (Z,d_Z) ( Z , d Z ) is Euclidean space for instance, the moments, variances, and quantiles of ν F , X \nu_{F,X} ν F , X . More importantly for our purposes, we can use the Wasserstein distance to compare the distributions of an n n n -invariant F F F on different mm-spaces, and thus quantify how different their geometry is in terms of the properties extracted by F F F .
There are many examples of n n n -invariants in the literature. In the following, we discuss the ones we will use in our applications to Hamming geometry and the analysis of viral sequence data in § 8 , along with a few closely related ones. Several of them are, or are closely related to, quantities used to study the geometry of evolutionary processes.
Example 4.5 (Pairwise distance). The simplest n n n -invariant is the canonical embedding K 2 ↪ R K_2 \hookrightarrow\mathbb{R} K 2 ↪ R , which we call the distance map and denote as dist. This name reflects the fact that the induced map dist X : X 2 → R \operatorname{dist}_X: X^2 \to\mathbb{R} dist X : X 2 → R is
dist X ( x ) = d X ( x 1 , x 2 ) \operatorname{dist}_X(\mathbf{x}) = d_X(x_1,x_2) dist X ( x ) = d X ( x 1 , x 2 )
for any ( X , d X ) (X,d_X) ( X , d X ) . Accordingly, the induced measure ν dist , X \nu_{\operatorname{dist},X} ν dist , X is called the distance distribution of X X X ; cf. [47 Def. 5.4] . Note that any Z Z Z -valued 2-invariant has the form h ∘ dist h \circ\operatorname{dist} h ∘ dist for some measurable h : R → Z h: \mathbb{R} \to Z h : R → Z . For sequence data, ν dist , X \nu_{\operatorname{dist},X} ν dist , X is known as the mismatch distribution in population genetics. Its mean is the nucleotide diversity [52 ] scaled by the sequence length, and its shape is used to infer demographic history [54 ] .
Example 4.6 (Four-point hyperbolicity deficit). An important example with n = 4 n = 4 n = 4 is the four-point hyperbolicity deficit . Let ( X , d X ) (X,d_X) ( X , d X ) be a metric space and x ∈ X 4 \mathbf{x} \in X^4 x ∈ X 4 . For a partition { i , j } ∪ { k , ℓ } = { 1 , 2 , 3 , 4 } \{i,j\} \cup\{k,\ell\} = \{1,2,3,4\} { i , j } ∪ { k , ℓ } = { 1 , 2 , 3 , 4 } , denote the associated sum of pairwise distances by
s i j , k ℓ ( x ) : = d X ( x i , x j ) + d X ( x k , x ℓ ) . s_{ij,k\ell}(\mathbf{x}) := d_X(x_i,x_j) + d_X(x_k,x_\ell). s ij , k ℓ ( x ) := d X ( x i , x j ) + d X ( x k , x ℓ ) .
Collect the three possible sums in S ( x ) : = ( s 13 , 24 ( x ) , s 12 , 34 ( x ) , s 14 , 23 ( x ) ) S(\mathbf{x}) := (s_{13,24}(\mathbf{x}),s_{12,34}(\mathbf{x}),s_{14,23}(\mathbf{x})) S ( x ) := ( s 13 , 24 ( x ) , s 12 , 34 ( x ) , s 14 , 23 ( x )) , and let S ( 1 ) ( x ) ≥ S ( 2 ) ( x ) ≥ S ( 3 ) ( x ) S_{(1)}(\mathbf{x}) \ge S_{(2)}(\mathbf{x}) \ge S_{(3)}(\mathbf{x}) S ( 1 ) ( x ) ≥ S ( 2 ) ( x ) ≥ S ( 3 ) ( x ) denote its components in descending order. Then the hyperbolicity deficit of x \mathbf{x} x is the upper gap
hyp ( x ) : = 1 2 ( S ( 1 ) ( x ) − S ( 2 ) ( x ) ) . \operatorname{hyp}(\mathbf{x}) := \frac{1}{2}\left(S_{(1)}(\mathbf{x}) - S_{(2)}(\mathbf{x})\right). hyp ( x ) := 2 1 ( S ( 1 ) ( x ) − S ( 2 ) ( x ) ) .
If S ( 1 ) ( x ) S_{(1)}(\mathbf{x}) S ( 1 ) ( x ) and S ( 2 ) ( x ) S_{(2)}(\mathbf{x}) S ( 2 ) ( x ) coincide, then hyp ( x ) = 0 \operatorname{hyp}(\mathbf{x}) = 0 hyp ( x ) = 0 . This is exactly the case when the distances of the quadruple x \mathbf{x} x behave like those on a tree, in the sense that they can be realized by a tree with four leaves corresponding to x 1 , x 2 , x 3 , x 4 x_1,x_2,x_3,x_4 x 1 , x 2 , x 3 , x 4 ; see Figure 1 . In particular, hyp ( x ) = 0 \operatorname{hyp}(\mathbf{x}) = 0 hyp ( x ) = 0 whenever two of the points coincide: if, say, x 1 = x 2 x_1 = x_2 x 1 = x 2 , then s 13 , 24 ( x ) = s 14 , 23 ( x ) ≥ d X ( x 3 , x 4 ) = s 12 , 34 ( x ) s_{13,24}(\mathbf{x}) = s_{14,23}(\mathbf{x}) \ge d_X(x_3,x_4) = s_{12,34}(\mathbf{x}) s 13 , 24 ( x ) = s 14 , 23 ( x ) ≥ d X ( x 3 , x 4 ) = s 12 , 34 ( x ) by the triangle inequality. For arbitrary x \mathbf{x} x , the triangle inequality gives s 13 , 24 ( x ) − s 12 , 34 ( x ) ≤ 2 d X ( x 2 , x 3 ) s_{13,24}(\mathbf{x}) - s_{12,34}(\mathbf{x}) \le2d_X(x_2,x_3) s 13 , 24 ( x ) − s 12 , 34 ( x ) ≤ 2 d X ( x 2 , x 3 ) , and likewise for any other pair of sums, so hyp ( x ) ≤ diam ( X ) \operatorname{hyp}(\mathbf{x}) \le\operatorname{diam}(X) hyp ( x ) ≤ diam ( X ) .
Figure 1. Illustration of the four-point hyperbolicity deficit. The hyperbolicity deficit hyp ( x ) = 1 2 ( S ( 1 ) ( x ) − S ( 2 ) ( x ) ) \operatorname{hyp}(\mathbf{x}) = \frac{1}{2}(S_{(1)}(\mathbf{x}) - S_{(2)}(\mathbf{x})) hyp ( x ) = 2 1 ( S ( 1 ) ( x ) − S ( 2 ) ( x )) measures the failure of a quadruple to behave like leaves on a tree. In a generic metric space, shown on the left, S ( 1 ) S_{(1)} S ( 1 ) and S ( 2 ) S_{(2)} S ( 2 ) do not reuse the same distances, so S ( 1 ) > S ( 2 ) S_{(1)} > S_{(2)} S ( 1 ) > S ( 2 ) and hyp ( x ) > 0 \operatorname{hyp}(\mathbf{x}) > 0 hyp ( x ) > 0 . In contrast, when the distances arise from a tree, shown on the right, S ( 1 ) S_{(1)} S ( 1 ) and S ( 2 ) S_{(2)} S ( 2 ) arise from the same edges with equal multiplicity and therefore coincide, giving hyp ( x ) = 0 \operatorname{hyp}(\mathbf{x}) = 0 hyp ( x ) = 0 .
For a metric space X X X , the supremum hyp ( X ) : = sup x ∈ X 4 hyp ( x ) \operatorname{hyp}(X) := \sup_{\mathbf{x}\in X^4}\operatorname{hyp}(\mathbf{x}) hyp ( X ) := sup x ∈ X 4 hyp ( x ) is known as the Gromov hyperbolicity of X X X [30 Sec. 1.1, p. 89] . It is a basic notion in metric geometry and geometric group theory that measures worst-case deviation from tree-likeness. For geodesic spaces, bounds on hyp ( X ) \operatorname{hyp}(X) hyp ( X ) are equivalent to a uniform slim-triangle condition. In particular, hyp ( X ) = 0 \operatorname{hyp}(X) = 0 hyp ( X ) = 0 if and only if X X X embeds isometrically into an R \mathbb{R} R -tree (e.g. [21 Thm. 8] ). In phylogenetics, the condition hyp ( x ) = 0 \operatorname{hyp}(\mathbf{x}) = 0 hyp ( x ) = 0 for all quadruples is known as the four-point condition, which characterizes the metrics that can be realized by trees [10 ] .
For an mm-space ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) , the distribution ν hyp , X \nu_{\operatorname{hyp},X} ν hyp , X complements this worst-case measure. If X X X is an R \mathbb{R} R -tree, every quadruple satisfies the four-point condition and ν hyp , X = δ 0 \nu_{\operatorname{hyp},X} = \delta_0 ν hyp , X = δ 0 . Since the only coupling of any probability measure with δ 0 \delta_0 δ 0 is the product coupling, the moments of ν hyp , X \nu_{\operatorname{hyp},X} ν hyp , X are Wasserstein distances to the hyperbolicity distribution of a tree,
W p ( ν hyp , X , δ 0 ) p = E x ∼ μ X ⊗ 4 [ hyp ( x ) p ] for all 1 ≤ p < ∞ . W_p(\nu_{\operatorname{hyp},X},\delta_0)^p = \mathbb{E}_{\mathbf{x}\sim\mu_X^{\otimes4}}\left[\operatorname{hyp}(\mathbf{x})^p\right] \qquad\text{for all } 1 \le p < \infty. W p ( ν hyp , X , δ 0 ) p = E x ∼ μ X ⊗ 4 [ hyp ( x ) p ] for all 1 ≤ p < ∞.
In particular, up to a factor of 1 3 \frac{1}{3} 3 1 , the 1-Wasserstein distance W 1 ( ν hyp , X , δ 0 ) W_1(\nu_{\operatorname{hyp},X}, \delta_0) W 1 ( ν hyp , X , δ 0 ) is the average hyperbolicity of Chatterjee and Sloman with the base point averaged over μ X \mu_X μ X (Section 2), while in the limit p → ∞ p \to\infty p → ∞ we recover the Gromov hyperbolicity hyp ( X ) \operatorname{hyp}(X) hyp ( X ) as long as μ X \mu_X μ X has full support.
Two classical measures of tree-likeness in phylogenetics (Section 2) are closely related to ν hyp , X \nu_{\operatorname{hyp},X} ν hyp , X . In our notation, the δ \delta δ -score of Holland et al. [36 ] is
δ ( x ) : = S ( 1 ) ( x ) − S ( 2 ) ( x ) S ( 1 ) ( x ) − S ( 3 ) ( x ) = 2 hyp ( x ) S ( 1 ) ( x ) − S ( 3 ) ( x ) \delta(\mathbf{x}) := \frac{S_{(1)}(\mathbf{x}) - S_{(2)}(\mathbf{x})}{S_{(1)}(\mathbf{x}) - S_{(3)}(\mathbf{x})} = \frac{2\operatorname{hyp}(\mathbf{x})}{S_{(1)}(\mathbf{x}) - S_{(3)}(\mathbf{x})} δ ( x ) := S ( 1 ) ( x ) − S ( 3 ) ( x ) S ( 1 ) ( x ) − S ( 2 ) ( x ) = S ( 1 ) ( x ) − S ( 3 ) ( x ) 2 hyp ( x )
when S ( 1 ) ( x ) > S ( 3 ) ( x ) S_{(1)}(\mathbf{x}) > S_{(3)}(\mathbf{x}) S ( 1 ) ( x ) > S ( 3 ) ( x ) , and 0 otherwise, and the δ \delta δ -plot of a finite metric space is the histogram of these scores over all four-element subsets. The normalization makes δ \delta δ invariant under rescaling of the metric, but also discontinuous at quadruples with S ( 1 ) ( x ) = S ( 2 ) ( x ) = S ( 3 ) ( x ) S_{(1)}(\mathbf{x}) = S_{(2)}(\mathbf{x}) = S_{(3)}(\mathbf{x}) S ( 1 ) ( x ) = S ( 2 ) ( x ) = S ( 3 ) ( x ) , near which it takes the values 0 and 1.
The Q-residual of Gray et al. [27 ] first rescales the distances so that their average over pairs of distinct points is 1, and then averages ( S ( 1 ) ( x ) − S ( 2 ) ( x ) ) 2 = 4 hyp ( x ) 2 (S_{(1)}(\mathbf{x}) - S_{(2)}(\mathbf{x}))^2 = 4\operatorname{hyp}(\mathbf{x})^2 ( S ( 1 ) ( x ) − S ( 2 ) ( x ) ) 2 = 4 hyp ( x ) 2 over all four-element subsets. Since hyp \operatorname{hyp} hyp scales linearly with the metric and vanishes on quadruples with a repeated point, the Q-residual of a metric space X X X with N ≥ 4 N \ge4 N ≥ 4 points and the uniform measure μ X \mu_X μ X equals
N ( N − 1 ) ( N − 2 ) ( N − 3 ) ⋅ 4 W 2 ( ν hyp , X , δ 0 ) 2 ( ∫ R t d ν dist , X ( t ) ) 2 . \frac{N(N-1)}{(N-2)(N-3)} \cdot\frac{4W_2(\nu_{\operatorname{hyp},X},\delta_0)^2}{\left(\int_{\mathbb{R}} t\,\mathrm{d}\nu_{\operatorname{dist},X}(t)\right)^2}. ( N − 2 ) ( N − 3 ) N ( N − 1 ) ⋅ ( ∫ R t d ν dist , X ( t ) ) 2 4 W 2 ( ν hyp , X , δ 0 ) 2 .
Up to a factor that tends to 1 as N → ∞ N \to\infty N → ∞ , it is thus the squared 2-Wasserstein distance between ν hyp , X \nu_{\operatorname{hyp},X} ν hyp , X and the hyperbolicity distribution of a tree, measured in units of the mean distance.
Example 4.7 (Higher hyperbolicity [41 ] ). Let ( X , d X ) (X,d_X) ( X , d X ) be a metric space, m ≥ 1 m \ge1 m ≥ 1 , and let I I I be an index set with ∣ I ∣ = 2 ( m + 1 ) |I| = 2(m+1) ∣ I ∣ = 2 ( m + 1 ) . For x = ( x i ) i ∈ I ∈ X 2 ( m + 1 ) \mathbf{x} = (x_i)_{i \in I} \in X^{2(m+1)} x = ( x i ) i ∈ I ∈ X 2 ( m + 1 ) and a permutation α \alpha α of I I I , write
p α ( x ) : = ∑ i ∈ I d X ( x i , x α ( i ) ) . p_\alpha(\mathbf{x}) := \sum_{i \in I} d_X(x_i,x_{\alpha(i)}). p α ( x ) := i ∈ I ∑ d X ( x i , x α ( i ) ) . Set P ( x ) : = ( p α ( x ) ) α ∈ Sym ( I ) P(\mathbf{x}) := (p_\alpha(\mathbf{x}))_{\alpha\in\operatorname{Sym}(I)} P ( x ) := ( p α ( x ) ) α ∈ Sym ( I ) , with α \alpha α ranging over all permutations of I I I , and let P ( 1 ) ( x ) ≥ P ( 2 ) ( x ) ≥ ⋯ P_{(1)}(\mathbf{x}) \ge P_{(2)}(\mathbf{x}) \ge\cdots P ( 1 ) ( x ) ≥ P ( 2 ) ( x ) ≥ ⋯ denote its components in descending order. The m m m -th hyperbolicity deficit of x \mathbf{x} x is the upper gap
hyp m ( x ) : = 1 2 ( P ( 1 ) ( x ) − P ( 2 ) ( x ) ) . \operatorname{hyp}_m(\mathbf{x}) := \frac{1}{2}\left(P_{(1)}(\mathbf{x}) - P_{(2)}(\mathbf{x})\right). hyp m ( x ) := 2 1 ( P ( 1 ) ( x ) − P ( 2 ) ( x ) ) . For δ ≥ 0 \delta\ge0 δ ≥ 0 , the space X X X is called ( m , δ ) (m,\delta) ( m , δ ) -hyperbolic if hyp m ( x ) ≤ δ \operatorname{hyp}_m(\mathbf{x}) \le\delta hyp m ( x ) ≤ δ for every x ∈ X 2 ( m + 1 ) \mathbf{x} \in X^{2(m+1)} x ∈ X 2 ( m + 1 ) . The m m m -th hyperbolicity of X X X is the optimal such bound,
hyp m ( X ) : = sup x ∈ X 2 ( m + 1 ) hyp m ( x ) . \operatorname{hyp}_m(X) := \sup_{\mathbf{x} \in X^{2(m+1)}} \operatorname{hyp}_m(\mathbf{x}). hyp m ( X ) := x ∈ X 2 ( m + 1 ) sup hyp m ( x ) .
This generalizes Gromov’s four-point hyperbolicity in the sense that every space with hyp m ( X ) ≤ δ \operatorname{hyp}_{m}(X) \le\delta hyp m ( X ) ≤ δ satisfies a uniform slim ( m + 1 ) (m+1) ( m + 1 ) -simplex condition [41 Thm. 1.3] , while hyp m ( X ) = 0 \operatorname{hyp}_{m}(X) = 0 hyp m ( X ) = 0 characterizes spaces of combinatorial dimension at most m m m [41 Cor. 4.4] . Indeed, when m = 1 m = 1 m = 1 , the identities p ( i j ) ( k ℓ ) ( x ) = 2 s i j , k ℓ ( x ) p_{(ij)(k\ell)}(x) = 2s_{ij,k\ell}(x) p ( ij ) ( k ℓ ) ( x ) = 2 s ij , k ℓ ( x ) and p ( i j k ℓ ) ( x ) = s i j , k ℓ ( x ) + s i ℓ , j k ( x ) p_{(ijk\ell)}(x) = s_{ij,k\ell}(x) + s_{i\ell,jk}(x) p ( ij k ℓ ) ( x ) = s ij , k ℓ ( x ) + s i ℓ , j k ( x ) , together with the triangle inequality, give P ( 1 ) ( x ) − P ( 2 ) ( x ) = 2 S ( 1 ) ( x ) − ( S ( 1 ) ( x ) + S ( 2 ) ( x ) ) = S ( 1 ) ( x ) − S ( 2 ) ( x ) P_{(1)}(x)-P_{(2)}(x) = 2S_{(1)}(x)-(S_{(1)}(x)+S_{(2)}(x)) = S_{(1)}(x)-S_{(2)}(x) P ( 1 ) ( x ) − P ( 2 ) ( x ) = 2 S ( 1 ) ( x ) − ( S ( 1 ) ( x ) + S ( 2 ) ( x )) = S ( 1 ) ( x ) − S ( 2 ) ( x ) . Hence hyp 1 ( x ) = hyp ( x ) \operatorname{hyp}_{1}(x) = \operatorname{hyp}(x) hyp 1 ( x ) = hyp ( x ) for every x ∈ X 4 x \in X^{4} x ∈ X 4 , and consequently hyp 1 ( X ) = hyp ( X ) \operatorname{hyp}_{1}(X) = \operatorname{hyp}(X) hyp 1 ( X ) = hyp ( X ) (cf. [41 Prop. 2.2] ).
Remark. The provided definition of ( m , δ ) (m,\delta) ( m , δ ) -hyperbolicity is equivalent to the one in [41 Def. 1.1] , which states that X X X is ( m , δ ) (m,\delta) ( m , δ ) -hyperbolic if, for every x = ( x i ) i ∈ I \mathbf{x} = (x_i)_{i\in I} x = ( x i ) i ∈ I , there exists a permutation α ≠ − Id \alpha\ne-\operatorname{Id} α = − Id of I = { ± 1 , ± 2 , … , ± ( m + 1 ) } I = \{\pm1,\pm2,\ldots,\pm(m+1)\} I = { ± 1 , ± 2 , … , ± ( m + 1 )} such that
∑ i ∈ I d X ( x i , x − i ) ≤ ∑ i ∈ I d X ( x i , x α ( i ) ) + 2 δ . \sum_{i\in I} d_X(x_i,x_{-i}) \le\sum_{i\in I} d_X(x_i,x_{\alpha(i)}) + 2\delta. i ∈ I ∑ d X ( x i , x − i ) ≤ i ∈ I ∑ d X ( x i , x α ( i ) ) + 2 δ .
In the notation above, this expression is simply p − Id ( x ) ≤ p α ( x ) + 2 δ p_{-\operatorname{Id}}(\mathbf{x}) \le p_\alpha(\mathbf{x}) + 2\delta p − Id ( x ) ≤ p α ( x ) + 2 δ . Suppose first that hyp m ( x ) ≤ δ \operatorname{hyp}_{m}(x) \le\delta hyp m ( x ) ≤ δ for every x x x and fix x x x . We may assume p − Id ( x ) = P ( 1 ) ( x ) p_{-\operatorname{Id}}(x) = P_{(1)}(x) p − Id ( x ) = P ( 1 ) ( x ) , since otherwise p − Id ( x ) ≤ P ( 1 ) ( x ) p_{-\operatorname{Id}}(x) \le P_{(1)}(x) p − Id ( x ) ≤ P ( 1 ) ( x ) providing an α ≠ − Id \alpha\ne-\operatorname{Id} α = − Id that satisfies the desired inequality with δ = 0 \delta= 0 δ = 0 . Then there is some α ≠ − Id \alpha\ne-\operatorname{Id} α = − Id such that P ( 2 ) ( x ) = p α ( x ) P_{(2)}(x) = p_\alpha(x) P ( 2 ) ( x ) = p α ( x ) , which gives p − Id ( x ) − p α ( x ) = 2 hyp m ( x ) ≤ 2 δ p_{-\operatorname{Id}}(x) - p_\alpha(x) = 2\operatorname{hyp}_{m}(x) \le2\delta p − Id ( x ) − p α ( x ) = 2 hyp m ( x ) ≤ 2 δ . Conversely, suppose that X X X satisfies [41 Def. 1.1] and fix x x x . We may assume hyp m ( x ) > 0 \operatorname{hyp}_{m}(x) > 0 hyp m ( x ) > 0 , since otherwise hyp m ( x ) = 0 ≤ δ \operatorname{hyp}_{m}(x) = 0 \le\delta hyp m ( x ) = 0 ≤ δ and there is nothing to prove. Then P ( 1 ) ( x ) > P ( 2 ) ( x ) P_{(1)}(x) > P_{(2)}(x) P ( 1 ) ( x ) > P ( 2 ) ( x ) , so P ( 1 ) ( x ) = p β ( x ) P_{(1)}(x) = p_\beta(x) P ( 1 ) ( x ) = p β ( x ) for some unique permutation β \beta β . The identity p β ( x ) = p β − 1 ( x ) p_\beta(x) = p_{\beta^{-1}}(x) p β ( x ) = p β − 1 ( x ) forces β = β − 1 \beta= \beta^{-1} β = β − 1 . By [41 Lem. 2.1] , β \beta β has no fixed points, hence is a product of m + 1 m+1 m + 1 disjoint transpositions and therefore conjugate to − Id -\operatorname{Id} − Id . As the hypothesis is assumed for every x x x , we may relabel and take β = − Id \beta= -\operatorname{Id} β = − Id . Now [41 Def. 1.1] yields some α ≠ − Id \alpha\ne-\operatorname{Id} α = − Id with P ( 1 ) ( x ) ≤ p α ( x ) + 2 δ ≤ P ( 2 ) ( x ) + 2 δ P_{(1)}(x) \le p_\alpha(x)+2\delta\le P_{(2)}(x)+2\delta P ( 1 ) ( x ) ≤ p α ( x ) + 2 δ ≤ P ( 2 ) ( x ) + 2 δ , that is, hyp m ( x ) ≤ δ \operatorname{hyp}_{m}(x) \le\delta hyp m ( x ) ≤ δ .
Example 4.8 (( n , k ) (n,k) ( n , k ) -persistence diagram [29 ] ). For a metric space ( X , d X ) (X,d_X) ( X , d X ) and r ≥ 0 r \ge0 r ≥ 0 , the Vietoris–Rips complex is
VR r ( X ) : = { σ ⊂ X : ∣ σ ∣ < ∞ and diam ( σ ) ≤ r } , \operatorname{VR}_{r}(X) := \{\sigma\subset X : |\sigma| < \infty\text{ and } \operatorname{diam}(\sigma) \le r\}, VR r ( X ) := { σ ⊂ X : ∣ σ ∣ < ∞ and diam ( σ ) ≤ r } ,
and we write dgm k VR ( X ) \operatorname{dgm}^{\operatorname{VR}}_{k}(X) dgm k VR ( X ) for its degree-k k k persistence diagram. The construction uses only distances, so we obtain an n n n -invariant by extending it to distance matrices
dgm n , k VR : K n → D ‾ , \operatorname{dgm}^{\operatorname{VR}}_{n,k} : \mathcal{K}_{n} \to\overline{\mathcal{D}}, dgm n , k VR : K n → D ,
where D ‾ \overline{\mathcal{D}} D is a suitable space of persistence diagrams. This is the factorization of dgm n , k VR \operatorname{dgm}^{\operatorname{VR}}_{n,k} dgm n , k VR through Ψ n \Psi_n Ψ n observed in [29 ] , which also shows that it is continuous and therefore measurable. Following [29 Defs. 3.10 and 3.18] , we write D n , k VR ( X ) : = dgm n , k VR ( K n ( X ) ) \mathcal{D}^{\operatorname{VR}}_{n,k}(X) := \operatorname{dgm}^{\operatorname{VR}}_{n,k}(\mathcal{K}_{n}(X)) D n , k VR ( X ) := dgm n , k VR ( K n ( X )) for the ( n , k ) (n,k) ( n , k ) -persistence set of X X X , the collection of all degree-k k k diagrams realized by at most n n n points of X X X , and U n , k VR ( X ) : = ν dgm n , k VR , X \mathcal{U}^{\operatorname{VR}}_{n,k}(X) := \nu_{\operatorname{dgm}^{\operatorname{VR}}_{n,k},X} U n , k VR ( X ) := ν dgm n , k VR , X for the ( n , k ) (n,k) ( n , k ) -persistence measure of X X X , which records how often each of them occurs.
In Definition 4.1 we require the target to be Polish. The unrestricted space of countable diagrams with the bottleneck distance is not separable [CCGG+24, Ex. 5.3], but [3 ] proved that the sets D j \mathcal{D}_j D j of diagrams with at most j j j points and the completion D ‾ \overline{\mathcal{D}} D of ⋃ j ≥ 0 D j \bigcup_{j\ge0}\mathcal{D}_j ⋃ j ≥ 0 D j with the bottleneck distance are both Polish [3 Thms. 3.2 and 3.5] . Since a space with n n n points has only finitely many simplices at every scale, its diagram has finitely many points and thus lies in D ‾ \overline{\mathcal{D}} D . In fact, ( D ‾ , d B ) (\overline{\mathcal{D}},d_B) ( D , d B ) is the space of choice of [3 ] for studying empirical distributions of persistence diagrams. Another possible choice is the set of diagrams with finite total persistence equipped with the p p p -Wasserstein distance; see [MMH11, Def. 4, Thms. 6 and 12].
In phylogenetics, the ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence invariant dgm 4 , 1 VR \operatorname{dgm}^{\operatorname{VR}}_{4,1} dgm 4 , 1 VR has a simple geometric interpretation. It is nonempty precisely when the four points form a chordless cycle in the Vietoris–Rips complex at some scale; its unique class is born when the last cycle edge appears and dies when the first diagonal appears. For sequence data, the cycle condition means that every adjacent pair agrees at more variable sites than either opposite pair. Thus, ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence provides a scale-sensitive summary of competing repeated-state patterns within quadruples of sequences, which are associated with recurrent and reticulate processes such as homoplasy and recombination.
Proposition 4.9. The n n n -invariants in Examples 4.5 to 4.8 satisfy the following Lipschitz bounds.
(i) The distance map dist : K 2 → R \operatorname{dist}: \mathbf{K}_2 \to\mathbb{R} dist : K 2 → R is 1 1 1 -Lipschitz.
(ii) The four-point hyperbolicity deficit hyp : K 4 → R \operatorname{hyp}: \mathbf{K}_4 \to\mathbb{R} hyp : K 4 → R is 2 2 2 -Lipschitz. Moreover, the function X ↦ hyp ( X ) X \mapsto\operatorname{hyp}(X) X ↦ hyp ( X ) on metric spaces is 4 4 4 -Lipschitz with respect to the Gromov–Hausdorff distance.
(iii) For every m ≥ 1 m \ge1 m ≥ 1 , the higher-hyperbolicity invariant hyp m : K 2 ( m + 1 ) → R \operatorname{hyp}_m: \mathbf{K}_{2(m+1)} \to\mathbb{R} hyp m : K 2 ( m + 1 ) → R is 2 ( m + 1 ) 2(m+1) 2 ( m + 1 ) -Lipschitz. Moreover, the function X ↦ hyp m ( X ) X \mapsto\operatorname{hyp}_m(X) X ↦ hyp m ( X ) on metric spaces is 4 ( m + 1 ) 4(m+1) 4 ( m + 1 ) -Lipschitz with respect to the Gromov–Hausdorff distance.
(iv) For every n ≥ 2 n \ge2 n ≥ 2 and k ≥ 0 k \ge0 k ≥ 0 , the persistence-diagram invariant dgm n , k V R : K n → D ‾ \operatorname{dgm}^{\mathrm{VR}}_{n,k}: \mathbf{K}_n \to\overline{\mathcal{D}} dgm n , k VR : K n → D is 1 1 1 -Lipschitz with respect to the supremum norm on K n \mathbf{K}_n K n and the bottleneck distance on D ‾ \overline{\mathcal{D}} D .
Proof. (i) For M , M ′ ∈ K 2 ≃ R ≥ 0 M,M' \in\mathbf{K}_2 \simeq\mathbb{R}_{\ge0} M , M ′ ∈ K 2 ≃ R ≥ 0 , we have ∣ dist ( M ) − dist ( M ′ ) ∣ = ∥ M − M ′ ∥ ∞ |\operatorname{dist}(M)-\operatorname{dist}(M')|=\lVert M-M'\rVert_\infty ∣ dist ( M ) − dist ( M ′ ) ∣ = ∥ M − M ′ ∥ ∞ .
(ii) For M , M ′ ∈ K 4 M,M' \in\mathbf{K}_4 M , M ′ ∈ K 4 , let S ( M ) S(M) S ( M ) and S ( M ′ ) S(M') S ( M ′ ) be the vectors of the three distance sums in Example 4.6. If D : = ∥ M − M ′ ∥ ∞ D := \lVert M-M'\rVert_\infty D := ∥ M − M ′ ∥ ∞ , then ∥ S ( M ) − S ( M ′ ) ∥ ∞ ≤ 2 D \lVert S(M)-S(M')\rVert_\infty\le2D ∥ S ( M ) − S ( M ′ ) ∥ ∞ ≤ 2 D . Taking either the largest or the second-largest component is 1 1 1 -Lipschitz with respect to the supremum norm, so
∣ hyp ( M ) − hyp ( M ′ ) ∣ ≤ 1 2 ( 2 D + 2 D ) = 2 D . |\operatorname{hyp}(M)-\operatorname{hyp}(M')| \le\frac{1}{2}(2D+2D)=2D. ∣ hyp ( M ) − hyp ( M ′ ) ∣ ≤ 2 1 ( 2 D + 2 D ) = 2 D .
The 4 4 4 -Lipschitz bound for X ↦ hyp ( X ) X \mapsto\operatorname{hyp}(X) X ↦ hyp ( X ) is [50 Prop. A.8] .
(iii) For M , M ′ ∈ K 2 ( m + 1 ) M,M' \in\mathbf{K}_{2(m+1)} M , M ′ ∈ K 2 ( m + 1 ) , let P ( M ) P(M) P ( M ) and P ( M ′ ) P(M') P ( M ′ ) be the vectors of the distance sums in Example 4.7 . If D : = ∥ M − M ′ ∥ ∞ D := \lVert M-M'\rVert_\infty D := ∥ M − M ′ ∥ ∞ , then ∥ P ( M ) − P ( M ′ ) ∥ ∞ ≤ 2 ( m + 1 ) D \lVert P(M)-P(M')\rVert_\infty\le2(m+1)D ∥ P ( M ) − P ( M ′ ) ∥ ∞ ≤ 2 ( m + 1 ) D . Taking either the largest or the second-largest component is 1 1 1 -Lipschitz with respect to the supremum norm, so
∣ hyp m ( M ) − hyp m ( M ′ ) ∣ ≤ 1 2 ( 2 ( m + 1 ) D + 2 ( m + 1 ) D ) = 2 ( m + 1 ) D . |\operatorname{hyp}_m(M)-\operatorname{hyp}_m(M')| \le\frac{1}{2}(2(m+1)D+2(m+1)D)=2(m+1)D. ∣ hyp m ( M ) − hyp m ( M ′ ) ∣ ≤ 2 1 ( 2 ( m + 1 ) D + 2 ( m + 1 ) D ) = 2 ( m + 1 ) D .
Now let R R R be a correspondence between metric spaces X X X and Y Y Y . For any x ∈ X 2 ( m + 1 ) x \in X^{2(m+1)} x ∈ X 2 ( m + 1 ) , choose y ∈ Y 2 ( m + 1 ) y \in Y^{2(m+1)} y ∈ Y 2 ( m + 1 ) componentwise so that ( x i , y i ) ∈ R (x_i,y_i) \in R ( x i , y i ) ∈ R for every i i i . The resulting pair of distance matrices differs by at most the distortion dis ( R ) \operatorname{dis}(R) dis ( R ) in the supremum norm, and therefore
hyp m ( x ) ≤ hyp m ( y ) + 2 ( m + 1 ) dis ( R ) ≤ hyp m ( Y ) + 2 ( m + 1 ) dis ( R ) . \begin{aligned}
\operatorname{hyp}_m(\mathbf{x}) &\le\operatorname{hyp}_m(\mathbf{y})+2(m+1)\operatorname{dis}(R)\\
&\le\operatorname{hyp}_m(Y)+2(m+1)\operatorname{dis}(R).
\end{aligned} hyp m ( x ) ≤ hyp m ( y ) + 2 ( m + 1 ) dis ( R ) ≤ hyp m ( Y ) + 2 ( m + 1 ) dis ( R ) .
Taking the supremum over x \mathbf{x} x , exchanging X X X and Y Y Y , and then taking the infimum over all correspondences gives
∣ hyp m ( X ) − hyp m ( Y ) ∣ ≤ 4 ( m + 1 ) GH ( X , Y ) . |\operatorname{hyp}_m(X)-\operatorname{hyp}_m(Y)| \le4(m+1)\operatorname{GH}(X,Y). ∣ hyp m ( X ) − hyp m ( Y ) ∣ ≤ 4 ( m + 1 ) GH ( X , Y ) .
(iv) Let M , M ′ ∈ K n M,M' \in\mathbf{K}_n M , M ′ ∈ K n and let X M , X M ′ X_M,X_{M'} X M , X M ′ be their finite labelled realizations. By stability of persistent homology [12 Thm. 3.1] 2 and Lemma 3.10 ,
d B ( dgm n , k V R ( M ) , dgm n , k V R ( M ′ ) ) ≤ 2 GH ( X M , X M ′ ) ≤ ∥ M − M ′ ∥ ∞ . d_B\left(\operatorname{dgm}^{\mathrm{VR}}_{n,k}(M),\operatorname{dgm}^{\mathrm{VR}}_{n,k}(M')\right) \le2\operatorname{GH}(X_M,X_{M'}) \le\lVert M-M'\rVert_\infty. d B ( dgm n , k VR ( M ) , dgm n , k VR ( M ′ ) ) ≤ 2 GH ( X M , X M ′ ) ≤ ∥ M − M ′ ∥ ∞ .
Remark 4.10. When m = 1 m=1 m = 1 , the bound in part (iii) is not sharp: since hyp 1 = hyp \operatorname{hyp}_1=\operatorname{hyp} hyp 1 = hyp , the sharper bound in part (ii) applies. The discrepancy arises because, when m = 1 m=1 m = 1 , the higher-hyperbolicity condition is a somewhat inefficient reformulation of the four-point condition due to the additional permutations and repeated distance terms; see [41 Def. 1.1] .
Geometry of K n ( X ) K_n(X) K n ( X )
This section establishes the geometric properties of K n ( X ) K_n(X) K n ( X ) required for the proofs of Theorems A and D in § 6 . We begin by computing the minimum enclosing radius of K n ( X ) K_n(X) K n ( X ) and the moments of μ n \mu_n μ n , and then bound the dimensions of K n ( X ) K_n(X) K n ( X ) and μ n \mu_n μ n . Both rest on elementary Lipschitz and diameter estimates for Ψ n \Psi_n Ψ n , which we establish first.
Lemma 5.1. Let ( X , d X ) (X,d_X) ( X , d X ) be a metric space. Then for every x 1 , x 2 , x 1 ′ , x 2 ′ ∈ X x_1,x_2,x_1',x_2'\in X x 1 , x 2 , x 1 ′ , x 2 ′ ∈ X ,
(i) ∣ d X ( x 1 , x 2 ) − d X ( x 1 ′ , x 2 ′ ) ∣ ≤ d X ( x 1 , x 1 ′ ) + d X ( x 2 , x 2 ′ ) \lvert d_X(x_1,x_2)-d_X(x_1',x_2')\rvert\le d_X(x_1,x_1')+d_X(x_2,x_2') ∣ d X ( x 1 , x 2 ) − d X ( x 1 ′ , x 2 ′ )∣ ≤ d X ( x 1 , x 1 ′ ) + d X ( x 2 , x 2 ′ ) .
(ii) ∣ d X ( x 1 , x 2 ) − d X ( x 1 ′ , x 2 ′ ) ∣ ≤ diam ( X ) \lvert d_X(x_1,x_2)-d_X(x_1',x_2')\rvert\le\operatorname{diam}(X) ∣ d X ( x 1 , x 2 ) − d X ( x 1 ′ , x 2 ′ )∣ ≤ diam ( X ) .
Proof. By the triangle inequality,
d X ( x 1 , x 2 ) − d X ( x 1 ′ , x 2 ′ ) ≤ d X ( x 1 , x 1 ′ ) + d X ( x 1 ′ , x 2 ′ ) + d X ( x 2 ′ , x 2 ) − d X ( x 1 ′ , x 2 ′ ) = d X ( x 1 , x 1 ′ ) + d X ( x 2 , x 2 ′ ) . d_X(x_1,x_2)-d_X(x_1',x_2')\le d_X(x_1,x_1')+d_X(x_1',x_2')+d_X(x_2',x_2)-d_X(x_1',x_2')=d_X(x_1,x_1')+d_X(x_2,x_2'). d X ( x 1 , x 2 ) − d X ( x 1 ′ , x 2 ′ ) ≤ d X ( x 1 , x 1 ′ ) + d X ( x 1 ′ , x 2 ′ ) + d X ( x 2 ′ , x 2 ) − d X ( x 1 ′ , x 2 ′ ) = d X ( x 1 , x 1 ′ ) + d X ( x 2 , x 2 ′ ) .
The symmetric argument yields (i). On the other hand, d X ( x 1 , x 2 ) − d X ( x 1 ′ , x 2 ′ ) ≤ diam ( X ) − 0 = diam ( X ) d_X(x_1,x_2)-d_X(x_1',x_2')\le\operatorname{diam}(X)-0=\operatorname{diam}(X) d X ( x 1 , x 2 ) − d X ( x 1 ′ , x 2 ′ ) ≤ diam ( X ) − 0 = diam ( X ) , and (ii) follows by symmetry once again. □ \square □
Since we embed K n K_n K n in either R n × n \mathbb{R}^{n\times n} R n × n or R ( n 2 ) \mathbb{R}^{\binom{n}{2}} R ( 2 n ) , we first record the relationship between the metrics on these two spaces.
Lemma 5.2. Fix 1 ≤ p ≤ ∞ 1\le p\le\infty 1 ≤ p ≤ ∞ and n ≥ 2 n\ge2 n ≥ 2 , and let d : = ( n 2 ) d:=\binom{n}{2} d := ( 2 n ) . Let ∥ ⋅ ∥ ℓ p ( R m ) \lVert\cdot\rVert_{\ell^p(\mathbb{R}^m)} ∥ ⋅ ∥ ℓ p ( R m ) be the ℓ p \ell^p ℓ p norm on R m \mathbb{R}^m R m . Then for every M , M ′ ∈ K n M,M'\in K_n M , M ′ ∈ K n ,
∥ M − M ′ ∥ ℓ p ( R d ) = 2 − 1 / p ∥ M − M ′ ∥ ℓ p ( R n × n ) . \lVert M-M'\rVert_{\ell^p(\mathbb{R}^d)}=2^{-1/p}\lVert M-M'\rVert_{\ell^p(\mathbb{R}^{n\times n})}. ∥ M − M ′ ∥ ℓ p ( R d ) = 2 − 1/ p ∥ M − M ′ ∥ ℓ p ( R n × n ) .
Proof. If p < ∞ p<\infty p < ∞ ,
∥ M − M ′ ∥ ℓ p ( R d ) = ( ∑ 1 ≤ i < j ≤ n ∣ d X ( x i , x j ) − d X ( x i ′ , x j ′ ) ∣ p ) 1 / p = ( 1 2 ∑ 1 ≤ i ≠ j ≤ n ∣ d X ( x i , x j ) − d X ( x i ′ , x j ′ ) ∣ p ) 1 / p = 2 − 1 / p ∥ M − M ′ ∥ ℓ p ( R n × n ) . \begin{aligned}
\lVert M-M'\rVert_{\ell^p(\mathbb{R}^d)}
&=\left(\sum_{1\le i<j\le n}\lvert d_X(x_i,x_j)-d_X(x_i',x_j')\rvert^p\right)^{1/p}\\
&=\left(\frac{1}{2}\sum_{1\le i\ne j\le n}\lvert d_X(x_i,x_j)-d_X(x_i',x_j')\rvert^p\right)^{1/p}\\
&=2^{-1/p}\lVert M-M'\rVert_{\ell^p(\mathbb{R}^{n\times n})}.
\end{aligned} ∥ M − M ′ ∥ ℓ p ( R d ) = ( 1 ≤ i < j ≤ n ∑ ∣ d X ( x i , x j ) − d X ( x i ′ , x j ′ ) ∣ p ) 1/ p = 2 1 1 ≤ i = j ≤ n ∑ ∣ d X ( x i , x j ) − d X ( x i ′ , x j ′ ) ∣ p 1/ p = 2 − 1/ p ∥ M − M ′ ∥ ℓ p ( R n × n ) .
The result for p = ∞ p=\infty p = ∞ follows by letting p → ∞ p\to\infty p → ∞ . □ \square □
The next Proposition gives control over the curvature map Ψ n \Psi_n Ψ n and the diameter of K n ( X ) K_n(X) K n ( X ) .
Proposition 5.3. Let ( X , d X ) (X,d_X) ( X , d X ) be a metric space. Fix n ≥ 2 n\ge2 n ≥ 2 and 1 ≤ p , q ≤ ∞ 1\le p,q\le\infty 1 ≤ p , q ≤ ∞ . Let d : = ( n 2 ) d:=\binom{n}{2} d := ( 2 n ) . Equip X n X^n X n with the ℓ p \ell^p ℓ p product metric and K n ( X ) K_n(X) K n ( X ) with the ℓ q \ell^q ℓ q metric coming from R d \mathbb{R}^d R d . Then:
(i) Ψ n : X n → K n ( X ) ⊂ R d \Psi_n:X^n\to K_n(X)\subset\mathbb{R}^d Ψ n : X n → K n ( X ) ⊂ R d is Lipschitz continuous with constant 2 1 − 1 / q ( n − 1 ) 1 / q 2^{1-1/q}(n-1)^{1/q} 2 1 − 1/ q ( n − 1 ) 1/ q if p ≤ q p\le q p ≤ q and 2 1 − 1 / q ( n − 1 ) 1 / q n 1 / q − 1 / p 2^{1-1/q}(n-1)^{1/q}n^{1/q-1/p} 2 1 − 1/ q ( n − 1 ) 1/ q n 1/ q − 1/ p if p > q p>q p > q . In particular, the Lipschitz constant is 2 2 2 when p = q = ∞ p=q=\infty p = q = ∞ .
(ii) diam q ( K n ( X ) ) ≤ d 1 / q diam ( X ) \operatorname{diam}_q(K_n(X))\le d^{1/q}\operatorname{diam}(X) diam q ( K n ( X )) ≤ d 1/ q diam ( X ) . In particular, diam ∞ ( K n ( X ) ) = diam ( X ) \operatorname{diam}_\infty(K_n(X))=\operatorname{diam}(X) diam ∞ ( K n ( X )) = diam ( X ) . Additionally, K n ( X ) K_n(X) K n ( X ) is unbounded if X X X is.
(iii) If X X X is compact, so is K n ( X ) K_n(X) K n ( X ) .
Proof. Let x , x ′ ∈ X n \mathbf{x},\mathbf{x}'\in X^n x , x ′ ∈ X n and M = Ψ n ( x ) , M ′ = Ψ n ( x ′ ) ∈ K n ( X ) M=\Psi_n(\mathbf{x}),M'=\Psi_n(\mathbf{x}')\in K_n(X) M = Ψ n ( x ) , M ′ = Ψ n ( x ′ ) ∈ K n ( X ) . (i) When q < ∞ q < \infty q < ∞ , Lemma 5.1 (i) and the Minkowski inequality yield
∥ M − M ′ ∥ ℓ q ( R n × n ) = ( ∑ 1 ≤ i ≠ j ≤ n ∣ d X ( x i , x j ) − d X ( x i ′ , x j ′ ) ∣ q ) 1 / q ≤ ( ∑ 1 ≤ i ≠ j ≤ n ( d X ( x i , x i ′ ) + d X ( x j , x j ′ ) ) q ) 1 / q ≤ ( ∑ 1 ≤ i ≠ j ≤ n d X ( x i , x i ′ ) q ) 1 / q + ( ∑ 1 ≤ i ≠ j ≤ n d X ( x j , x j ′ ) q ) 1 / q = ( ( n − 1 ) ∑ 1 ≤ i ≤ n d X ( x i , x i ′ ) q ) 1 / q + ( ( n − 1 ) ∑ 1 ≤ j ≤ n d X ( x j , x j ′ ) q ) 1 / q = 2 ( n − 1 ) 1 / q d X , q ( x , x ′ ) . \begin{aligned}
\lVert M-M'\rVert_{\ell^q(\mathbb{R}^{n\times n})}=\left(\sum_{1\leq i\neq j\leq n}\left\lvert d_X(x_i,x_j)-d_X(x'_i,x'_j)\right\rvert^q\right)^{1/q} \\
&\leq\left(\sum_{1\leq i\neq j\leq n}\left(d_X(x_i,x'_i)+d_X(x_j,x'_j)\right)^q\right)^{1/q} \\
&\leq\left(\sum_{1\leq i\neq j\leq n}d_X(x_i,x'_i)^q\right)^{1/q}+\left(\sum_{1\leq i\neq j\leq n}d_X(x_j,x'_j)^q\right)^{1/q} \\
&=\left((n-1)\sum_{1\leq i\leq n}d_X(x_i,x'_i)^q\right)^{1/q}+\left((n-1)\sum_{1\leq j\leq n}d_X(x_j,x'_j)^q\right)^{1/q} \\
&=2(n-1)^{1/q}d_{X,q}(x,x').
\end{aligned} ∥ M − M ′ ∥ ℓ q ( R n × n ) = 1 ≤ i = j ≤ n ∑ d X ( x i , x j ) − d X ( x i ′ , x j ′ ) q 1/ q ≤ 1 ≤ i = j ≤ n ∑ ( d X ( x i , x i ′ ) + d X ( x j , x j ′ ) ) q 1/ q ≤ 1 ≤ i = j ≤ n ∑ d X ( x i , x i ′ ) q 1/ q + 1 ≤ i = j ≤ n ∑ d X ( x j , x j ′ ) q 1/ q = ( ( n − 1 ) 1 ≤ i ≤ n ∑ d X ( x i , x i ′ ) q ) 1/ q + ( ( n − 1 ) 1 ≤ j ≤ n ∑ d X ( x j , x j ′ ) q ) 1/ q = 2 ( n − 1 ) 1/ q d X , q ( x , x ′ ) .
Together with Lemma 5.2 , we obtain ∥ M − M ′ ∥ ℓ q ( R d ) = 2 − 1 / q ∥ M − M ′ ∥ ℓ q ( R n × n ) ≤ 2 1 − 1 / q ( n − 1 ) 1 / q d X , q ( x , x ′ ) \lVert M-M'\rVert_{\ell^q(\mathbb{R}^d)}=2^{-1/q}\lVert M-M'\rVert_{\ell^q(\mathbb{R}^{n\times n})}\leq2^{1-1/q}(n-1)^{1/q}d_{X,q}(x,x') ∥ M − M ′ ∥ ℓ q ( R d ) = 2 − 1/ q ∥ M − M ′ ∥ ℓ q ( R n × n ) ≤ 2 1 − 1/ q ( n − 1 ) 1/ q d X , q ( x , x ′ ) . The result follows from the basic inequalities d X , q ≤ d X , p d_{X,q}\leq d_{X,p} d X , q ≤ d X , p if p ≤ q p\leq q p ≤ q and d X , q ≤ n 1 / q − 1 / p ⋅ d X , p d_{X,q}\leq n^{1/q-1/p}\cdot d_{X,p} d X , q ≤ n 1/ q − 1/ p ⋅ d X , p if p > q p>q p > q . Once again, the q = ∞ q=\infty q = ∞ case follows by taking a limit.
(ii) When q < ∞ q<\infty q < ∞ , Lemma 5.1 (ii) gives
∥ M − M ′ ∥ ℓ q ( R d ) = ( ∑ 1 ≤ i < j ≤ n ∣ d X ( x i , x j ) − d X ( x i ′ , x j ′ ) ∣ q ) 1 / q ≤ ( ∑ 1 ≤ i < j ≤ n diam ( X ) q ) 1 / q = d 1 / q diam ( X ) . \begin{aligned}
\lVert M-M'\rVert_{\ell^q(\mathbb{R}^d)}=\left(\sum_{1\leq i<j\leq n}\left\lvert d_X(x_i,x_j)-d_X(x'_i,x'_j)\right\rvert^q\right)^{1/q} \\
&\leq\left(\sum_{1\leq i<j\leq n}\operatorname{diam}(X)^q\right)^{1/q}=d^{1/q}\operatorname{diam}(X).
\end{aligned} ∥ M − M ′ ∥ ℓ q ( R d ) = ( 1 ≤ i < j ≤ n ∑ d X ( x i , x j ) − d X ( x i ′ , x j ′ ) q ) 1/ q ≤ ( 1 ≤ i < j ≤ n ∑ diam ( X ) q ) 1/ q = d 1/ q diam ( X ) .
Thus, diam q ( K n ( X ) ) ≤ d 1 / q diam ( X ) \operatorname{diam}_q(K_n(X))\leq d^{1/q}\operatorname{diam}(X) diam q ( K n ( X )) ≤ d 1/ q diam ( X ) . On the other hand, choose a sequence { ( x k , x k ′ ) } k = 0 ∞ ⊂ X 2 \{(x_k,x'_k)\}_{k=0}^{\infty}\subset X^2 {( x k , x k ′ ) } k = 0 ∞ ⊂ X 2 with x 0 = x 0 ′ x_0=x'_0 x 0 = x 0 ′ such that d X ( x k , x k ′ ) → diam ( X ) d_X(x_k,x'_k)\to\operatorname{diam}(X) d X ( x k , x k ′ ) → diam ( X ) as k → ∞ k\to\infty k → ∞ . Let M k : = Ψ n ( x k ′ , x k , … , x k ) ∈ K n ( X ) M_k:=\Psi_n(x'_k,x_k,\ldots,x_k)\in K_n(X) M k := Ψ n ( x k ′ , x k , … , x k ) ∈ K n ( X ) . Then
∥ M k − M 0 ∥ ℓ q ( R d ) = ( n − 1 ) 1 / q d X ( x k , x k ′ ) → ( n − 1 ) 1 / q diam ( X ) \lVert M_k-M_0\rVert_{\ell^q(\mathbb{R}^d)}=(n-1)^{1/q}d_X(x_k,x'_k)\to(n-1)^{1/q}\operatorname{diam}(X) ∥ M k − M 0 ∥ ℓ q ( R d ) = ( n − 1 ) 1/ q d X ( x k , x k ′ ) → ( n − 1 ) 1/ q diam ( X )
as k → ∞ k\to\infty k → ∞ . Hence, diam ( K n ( X ) ) = ∞ \operatorname{diam}(K_n(X))=\infty diam ( K n ( X )) = ∞ if diam ( X ) = ∞ \operatorname{diam}(X)=\infty diam ( X ) = ∞ . If q = ∞ q=\infty q = ∞ , letting q → ∞ q\to\infty q → ∞ in the above gives diam ∞ ( K n ( X ) ) ≤ diam ( X ) \operatorname{diam}_\infty(K_n(X))\leq\operatorname{diam}(X) diam ∞ ( K n ( X )) ≤ diam ( X ) , ∥ M k − M 0 ∥ ℓ ∞ ( R d ) → diam ( X ) \lVert M_k-M_0\rVert_{\ell^\infty(\mathbb{R}^d)}\to\operatorname{diam}(X) ∥ M k − M 0 ∥ ℓ ∞ ( R d ) → diam ( X ) and, thus, diam ∞ ( K n ( X ) ) = diam ( X ) \operatorname{diam}_\infty(K_n(X))=\operatorname{diam}(X) diam ∞ ( K n ( X )) = diam ( X ) .
(iii) Regardless of the values of p p p and q q q , if X X X is compact, then K n ( X ) = Ψ n ( X n ) K_n(X)=\Psi_n(X^n) K n ( X ) = Ψ n ( X n ) is the continuous image of a compact set, hence compact.
We now apply Proposition 3.17 to the curvature set K n ( X ) K_n(X) K n ( X ) and the curvature measure μ n \mu_n μ n . The results of [26 ] leave room to choose the centre p 0 \mathbf{p}_0 p 0 in M q ( m ) ( μ n , p 0 ) \mathcal{M}^{(m)}_q(\mu_n,\mathbf{p}_0) M q ( m ) ( μ n , p 0 ) , so we will use the symmetry of K n ( X ) K_n(X) K n ( X ) and Proposition 5.3 to minimize M q ( m ) ( μ n , p 0 ) \mathcal{M}^{(m)}_q(\mu_n,\mathbf{p}_0) M q ( m ) ( μ n , p 0 ) .
Proposition 5.4. Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) be an mm-space with fully supported μ X \mu_X μ X . Fix n ≥ 2 n\geq2 n ≥ 2 and let d : = ( n 2 ) d:=\binom{n}{2} d := ( 2 n ) . Let 1 ≤ q < ∞ 1\leq q<\infty 1 ≤ q < ∞ and 1 ≤ m ≤ ∞ 1\leq m\leq\infty 1 ≤ m ≤ ∞ . Let μ n \mu_n μ n be the associated curvature measure.
(i) If m < ∞ m<\infty m < ∞ , the minimum enclosing radius of K n ( X ) K_n(X) K n ( X ) in ( R d , ℓ m ) (\mathbb{R}^d,\ell^m) ( R d , ℓ m ) is at most d 1 / m diam ( X ) / 2 d^{1/m}\operatorname{diam}(X)/2 d 1/ m diam ( X ) /2 . If m = ∞ m=\infty m = ∞ , R ∞ ( K n ( X ) ) = diam ( X ) / 2 R_\infty(K_n(X))=\operatorname{diam}(X)/2 R ∞ ( K n ( X )) = diam ( X ) /2 .
(ii) M q ( m ) ( μ n ) 1 / q ≤ d 1 / m diam ( X ) / 2 \mathcal{M}^{(m)}_q(\mu_n)^{1/q}\leq d^{1/m}\operatorname{diam}(X)/2 M q ( m ) ( μ n ) 1/ q ≤ d 1/ m diam ( X ) /2 and sup q ≥ 1 M q ( ∞ ) ( μ n ) 1 / q = diam ( X ) / 2 \sup_{q\geq1}\mathcal{M}^{(\infty)}_q(\mu_n)^{1/q}=\operatorname{diam}(X)/2 sup q ≥ 1 M q ( ∞ ) ( μ n ) 1/ q = diam ( X ) /2 . In particular, if diam ( X ) < ∞ \operatorname{diam}(X)<\infty diam ( X ) < ∞ , then μ n \mu_n μ n has finite moments of all orders.
Proof. If diam ( X ) = ∞ \operatorname{diam}(X)=\infty diam ( X ) = ∞ , the Proposition holds immediately because diam p ( K n ( X ) ) = ∞ \operatorname{diam}_p(K_n(X))=\infty diam p ( K n ( X )) = ∞ by Proposition 5.3 (ii) and, thus, R p ( K n ( X ) ) = ∞ R_p(K_n(X))=\infty R p ( K n ( X )) = ∞ for all p p p . Hence, assume diam ∞ ( K n ( X ) ) = diam ( X ) < ∞ \operatorname{diam}_\infty(K_n(X))=\operatorname{diam}(X)<\infty diam ∞ ( K n ( X )) = diam ( X ) < ∞ , and let D 0 ∈ R d D_0\in\mathbb{R}^d D 0 ∈ R d be the vector with all components equal to diam ( X ) / 2 \operatorname{diam}(X)/2 diam ( X ) /2 .
(i) For all x ∈ X n x\in X^n x ∈ X n ,
∥ Ψ n ( x ) − D 0 ∥ ℓ m m ( R d ) m = ∑ 1 ≤ i < j ≤ n ∣ d X ( x i , x j ) − diam ( X ) / 2 ∣ m ≤ ∑ 1 ≤ i < j ≤ n ( diam ( X ) / 2 ) m = d ( diam ( X ) / 2 ) m . \lVert\Psi_n(\mathbf{x})-D_0\rVert_{\ell_m^m(\mathbb{R}^d)}^m=\sum_{1\leq i<j\leq n}\left|d_X(x_i,x_j)-\operatorname{diam}(X)/2\right|^m\leq\sum_{1\leq i<j\leq n}(\operatorname{diam}(X)/2)^m=d(\operatorname{diam}(X)/2)^m. ∥ Ψ n ( x ) − D 0 ∥ ℓ m m ( R d ) m = 1 ≤ i < j ≤ n ∑ ∣ d X ( x i , x j ) − diam ( X ) /2 ∣ m ≤ 1 ≤ i < j ≤ n ∑ ( diam ( X ) /2 ) m = d ( diam ( X ) /2 ) m .
Equality holds if x i = x j x_i=x_j x i = x j for all 1 ≤ i < j ≤ n 1\leq i<j\leq n 1 ≤ i < j ≤ n . Hence, R m ( K n ( X ) ) ≤ d 1 / m diam ( X ) / 2 R_m(K_n(X))\leq d^{1/m}\operatorname{diam}(X)/2 R m ( K n ( X )) ≤ d 1/ m diam ( X ) /2 .
If m = ∞ m=\infty m = ∞ , R ∞ ( K n ( X ) ) ≤ diam ( X ) / 2 R_\infty(K_n(X))\leq\operatorname{diam}(X)/2 R ∞ ( K n ( X )) ≤ diam ( X ) /2 follows analogously. On the other hand, let M 0 ∈ R d M_0\in\mathbb{R}^d M 0 ∈ R d such that ∥ M − M 0 ∥ ∞ ≤ R ∞ ( K n ( X ) ) \lVert M-M_0\rVert_\infty\leq R_\infty(K_n(X)) ∥ M − M 0 ∥ ∞ ≤ R ∞ ( K n ( X )) for all M ∈ K n ( X ) M\in K_n(X) M ∈ K n ( X ) . Given ϵ > 0 \epsilon>0 ϵ > 0 , choose M , M ′ ∈ K n ( X ) M,M'\in K_n(X) M , M ′ ∈ K n ( X ) such that diam ( X ) − ϵ ≤ ∥ M − M ′ ∥ ∞ \operatorname{diam}(X)-\epsilon\leq\lVert M-M'\rVert_\infty diam ( X ) − ϵ ≤ ∥ M − M ′ ∥ ∞ . By the triangle inequality,
diam ( X ) − ϵ ≤ ∥ M − M ′ ∥ ∞ ≤ ∥ M − M 0 ∥ ∞ + ∥ M 0 − M ′ ∥ ∞ ≤ 2 R ∞ ( K n ( X ) ) . \operatorname{diam}(X)-\epsilon\leq\lVert M-M'\rVert_\infty\leq\lVert M-M_0\rVert_\infty+\lVert M_0-M'\rVert_\infty\leq2R_\infty(K_n(X)). diam ( X ) − ϵ ≤ ∥ M − M ′ ∥ ∞ ≤ ∥ M − M 0 ∥ ∞ + ∥ M 0 − M ′ ∥ ∞ ≤ 2 R ∞ ( K n ( X )) .
Letting ϵ → 0 \epsilon\to0 ϵ → 0 yields diam ( X ) / 2 ≤ R ∞ ( K n ( X ) ) \operatorname{diam}(X)/2\leq R_\infty(K_n(X)) diam ( X ) /2 ≤ R ∞ ( K n ( X )) . This proves (i) .
(ii) This is a direct consequence of Proposition 3.17 and Item (i) .
Lemma 5.5. Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) and ( Y , d Y , μ Y ) (Y,d_Y,\mu_Y) ( Y , d Y , μ Y ) be Ahlfors regular of dimensions s s s and t t t , respectively. Let d ∞ d_\infty d ∞ be the metric d ∞ ( ( x , y ) , ( x ′ , y ′ ) ) = max ( d X ( x , x ′ ) , d Y ( y , y ′ ) ) d_\infty((x,y),(x',y'))=\max(d_X(x,x'),d_Y(y,y')) d ∞ (( x , y ) , ( x ′ , y ′ )) = max ( d X ( x , x ′ ) , d Y ( y , y ′ )) . Then ( X × Y , d ∞ , μ X ⊗ μ Y ) (X\times Y,d_\infty,\mu_X\otimes\mu_Y) ( X × Y , d ∞ , μ X ⊗ μ Y ) is Ahlfors ( s + t ) (s+t) ( s + t ) -regular.
Proof. Suppose that for every x 0 ∈ X x_0\in X x 0 ∈ X , y 0 ∈ Y y_0\in Y y 0 ∈ Y , and r > 0 r>0 r > 0 ,
1 C X r s ≤ μ X ( B X ( x 0 , r ) ) ≤ C X r s \frac{1}{C_X}r^s\leq\mu_X(B_X(x_0,r))\leq C_Xr^s C X 1 r s ≤ μ X ( B X ( x 0 , r )) ≤ C X r s 1 C Y r t ≤ μ Y ( B Y ( y 0 , r ) ) ≤ C Y r t . \frac{1}{C_Y}r^t\leq\mu_Y(B_Y(y_0,r))\leq C_Yr^t. C Y 1 r t ≤ μ Y ( B Y ( y 0 , r )) ≤ C Y r t . Since B X × Y ( ( x 0 , y 0 ) , r ) = B X ( x 0 , r ) × B Y ( y 0 , r ) B_{X\times Y}((x_0,y_0),r)=B_X(x_0,r)\times B_Y(y_0,r) B X × Y (( x 0 , y 0 ) , r ) = B X ( x 0 , r ) × B Y ( y 0 , r ) , we get
1 C X C Y ⋅ r s + t ≤ ( μ X ⊗ μ Y ) ( B X × Y ( ( x 0 , y 0 ) , r ) ) ≤ ( C X C Y ) ⋅ r s + t . \frac{1}{C_XC_Y}\cdot r^{s+t}\leq(\mu_X\otimes\mu_Y)(B_{X\times Y}((x_0,y_0),r))\leq(C_XC_Y)\cdot r^{s+t}. C X C Y 1 ⋅ r s + t ≤ ( μ X ⊗ μ Y ) ( B X × Y (( x 0 , y 0 ) , r )) ≤ ( C X C Y ) ⋅ r s + t .
Unfortunately, the Ahlfors condition does not descend immediately from X n X^n X n to K n ( X ) K_n(X) K n ( X ) . Still, we can use comparisons from [64 ] to provide an upper bound for the dimensions of K n ( X ) K_n(X) K n ( X ) .
Proposition 5.6. Suppose that ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) is an Ahlfors s s s -regular mm-space and fix 1 ≤ m ≤ ∞ 1\leq m\leq\infty 1 ≤ m ≤ ∞ . Equip X n X^n X n and K n ( X ) K_n(X) K n ( X ) with the metrics d X , m d_{X,m} d X , m and ℓ m \ell^m ℓ m , respectively. Then
(i) d H ( X n ) = d M ( X n ) = n s d_H(X^n)=d_M(X^n)=ns d H ( X n ) = d M ( X n ) = n s , and d p ∗ ( μ X ⊗ n ) = n s d_p^*(\mu_X^{\otimes n})=ns d p ∗ ( μ X ⊗ n ) = n s when 1 ≤ p ≤ n s / 2 1\leq p\leq ns/2 1 ≤ p ≤ n s /2 .
(ii) d p ∗ ( μ n ) ≤ d M ( K n ( X ) ) ≤ n s d_p^*(\mu_n)\leq d_M(K_n(X))\leq ns d p ∗ ( μ n ) ≤ d M ( K n ( X )) ≤ n s when 1 ≤ p ≤ 1 2 d M ( K n ( X ) ) 1\leq p\leq\frac{1}{2}d_M(K_n(X)) 1 ≤ p ≤ 2 1 d M ( K n ( X )) .
Proof.
(i) By Lemma 5.5, ( X n , d X , ∞ , μ X ⊗ n ) (X^n,d_{X,\infty},\mu_X^{\otimes n}) ( X n , d X , ∞ , μ X ⊗ n ) is Ahlfors ( n s ) (ns) ( n s ) -regular. Since d X , m d_{X,m} d X , m and d X , ∞ d_{X,\infty} d X , ∞ are bi-Lipschitz equivalent, ( X n , d X , m , μ X ⊗ n ) (X^n,d_{X,m},\mu_X^{\otimes n}) ( X n , d X , m , μ X ⊗ n ) is also Ahlfors ( n s ) (ns) ( n s ) -regular. The conclusion follows by Lemma 3.20 .
(ii) Since μ X \mu_X μ X is fully supported by Lemma 3.19 , so is μ X n \mu_X^n μ X n , and by continuity of Ψ n \Psi_n Ψ n so is μ n \mu_n μ n on K n ( X ) K_n(X) K n ( X ) . Hence d M ( μ n ) = d M ( K n ( X ) ) d_M(\mu_n)=d_M(K_n(X)) d M ( μ n ) = d M ( K n ( X )) , and [64 Prop. 2] yields d p ∗ ( μ n ) ≤ d M ( K n ( X ) ) d^*_p(\mu_n)\le d_M(K_n(X)) d p ∗ ( μ n ) ≤ d M ( K n ( X )) when p ≤ 1 2 d M ( K n ( X ) ) p\le\frac{1}{2}d_M(K_n(X)) p ≤ 2 1 d M ( K n ( X )) . Moreover, by Proposition 5.3 (i), Ψ n : ( X n , d X , m ) → ( K n ( X ) , ℓ m ) \Psi_n:(X^n,d_{X,m})\to(K_n(X),\ell^m) Ψ n : ( X n , d X , m ) → ( K n ( X ) , ℓ m ) is Lipschitz continuous, so by [56 Lem. 3.3(iv)] and (i), d M ( K n ( X ) ) ≤ d M ( X n ) = n s d_M(K_n(X))\le d_M(X^n)=ns d M ( K n ( X )) ≤ d M ( X n ) = n s .
Remark 5.7. Note that d M ( K n ( X ) ) ≤ n s d_M(K_n(X))\le ns d M ( K n ( X )) ≤ n s in Proposition 5.6 is not an equality in general. For example, [24 ] proved that K n ( S 1 ) K_n(S^1) K n ( S 1 ) is the geometric realization of a simplicial complex whose maximal simplices all have dimension n − 1 n-1 n − 1 . Then d H ( K n ( S 1 ) ) = d M ( K n ( S 1 ) ) = n − 1 d_H(K_n(S^1))=d_M(K_n(S^1))=n-1 d H ( K n ( S 1 )) = d M ( K n ( S 1 )) = n − 1 because K n ( S 1 ) K_n(S^1) K n ( S 1 ) is a finite union of simplices Δ n − 1 ⊂ R d \Delta_{n-1}\subset\mathbb{R}^d Δ n − 1 ⊂ R d (with either d = n × n d=n\times n d = n × n or d = 2 d=2 d = 2 ), all of whom have d H ( Δ n − 1 ) = d M ( Δ n − 1 ) = n − 1 d_H(\Delta_{n-1})=d_M(\Delta_{n-1})=n-1 d H ( Δ n − 1 ) = d M ( Δ n − 1 ) = n − 1 . On the other hand, the uniform measure μ S 1 \mu_{S^1} μ S 1 satisfies
μ S 1 ( B S 1 ( x 0 , r ) ) = r / π \mu_{S^1}(B_{S^1}(x_0,r))=r/\pi μ S 1 ( B S 1 ( x 0 , r )) = r / π
for 0 < r ≤ π 0<r\le\pi 0 < r ≤ π , so μ S 1 \mu_{S^1} μ S 1 is Ahlfors 1-regular. Hence, d M ( ( S 1 ) n ) = n > d M ( K n ( S 1 ) ) d_M((S^1)^n)=n>d_M(K_n(S^1)) d M (( S 1 ) n ) = n > d M ( K n ( S 1 )) .
Wasserstein convergence of empirical curvature measures
In this section we prove our main results A–D. The main tool for Theorem A is the Wasserstein convergence of empirical measures on Euclidean space, established by Fournier–Guillin [25 ] , in the form of [26 ] , which provides an explicit constant. We apply their results to μ n \mu_n μ n , bounding its moment term by the diameter of X X X with the results of § 5 . Lipschitz n n n -invariants inherit this bound (Corollary B ), and Lemma 3.13 turns it into sample sizes (Corollary C ). We improve the convergence rate for Ahlfors regular spaces in Theorem D , by combining the estimates of [64 ] with the dimension bounds of § 5 .
The following are Theorem A and Corollary B .
Theorem 6.1. Fix a real number 1 ≤ p < ∞ 1\le p<\infty 1 ≤ p < ∞ and integers N ≥ 1 N\ge1 N ≥ 1 , n ≥ 2 n\ge2 n ≥ 2 . Let d : = ( n 2 ) d:=\binom{n}{2} d := ( 2 n ) and assume p ≠ d / 2 p\ne d/2 p = d /2 . Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) be a bounded mm-space with fully supported probability measure μ X \mu_X μ X . Embed K n ( X ) K_n(X) K n ( X ) in ( R d , ∥ ⋅ ∥ ∞ ) (\mathbb{R}^d,\|\cdot\|_\infty) ( R d , ∥ ⋅ ∥ ∞ ) . Then
E [ W p ( μ ^ n , N , μ n ) p ] ≤ C ( d , p ) ⋅ diam ( X ) p ⋅ N − e d , p , e d , p : = { 1 2 , d < 2 p p d , d > 2 p , \mathbb{E}[W_p(\hat{\mu}_{n,N},\mu_n)^p]\le C(d,p)\cdot\operatorname{diam}(X)^p\cdot N^{-e_{d,p}},\qquad e_{d,p}:=\begin{cases}\frac{1}{2},&d<2p\\ \frac{p}{d},&d>2p,\end{cases} E [ W p ( μ ^ n , N , μ n ) p ] ≤ C ( d , p ) ⋅ diam ( X ) p ⋅ N − e d , p , e d , p := { 2 1 , d p , d < 2 p d > 2 p , where
C ( d , p ) : = 2 d / 2 − 1 1 − 2 d / 2 − p if d < 2 p and C ( d , p ) : = 2 p − 2 p / d ( 1 − 2 − d / 2 ) 1 − 2 p / d 1 − 2 p − d / 2 if d > 2 p . C(d,p):=\frac{2^{d/2-1}}{1-2^{d/2-p}}\quad\text{if }d<2p\quad\text{and}\quad C(d,p):=\frac{2^{p-2p/d}(1-2^{-d/2})^{1-2p/d}}{1-2^{p-d/2}}\quad\text{if }d>2p. C ( d , p ) := 1 − 2 d /2 − p 2 d /2 − 1 if d < 2 p and C ( d , p ) := 1 − 2 p − d /2 2 p − 2 p / d ( 1 − 2 − d /2 ) 1 − 2 p / d if d > 2 p .
Proof. Write D X : = diam ( X ) D_X:=\operatorname{diam}(X) D X := diam ( X ) . Since the metric on K n ( X ) K_n(X) K n ( X ) is ∥ ⋅ ∥ ∞ \|\cdot\|_\infty ∥ ⋅ ∥ ∞ , we apply [26 Thm. 2.1] with m = ∞ m=\infty m = ∞ . Then
E [ W p ( μ ^ n , N , μ n ) p ] ≤ 2 p κ d , p ( ∞ ) ( M q ( ∞ ) ( μ n ) ) p / q θ d , p , q ( ∞ ) N − e d , p . \mathbb{E}[W_p(\hat{\mu}_{n,N},\mu_n)^p]\le2^p\kappa_{d,p}^{(\infty)}\left(\mathcal{M}_q^{(\infty)}(\mu_n)\right)^{p/q}\theta_{d,p,q}^{(\infty)}N^{-e_{d,p}}. E [ W p ( μ ^ n , N , μ n ) p ] ≤ 2 p κ d , p ( ∞ ) ( M q ( ∞ ) ( μ n ) ) p / q θ d , p , q ( ∞ ) N − e d , p .
with e d , p e_{d,p} e d , p as in the statement. By Propositions 5.4 and 3.17 (ii), 2 p ( M q ( ∞ ) ( μ n ) ) p / q ≤ 2 p ( M ∞ ( ∞ ) ( μ n ) ) p = D X p 2^p\left(\mathcal{M}_q^{(\infty)}(\mu_n)\right)^{p/q}\le2^p\left(\mathcal{M}_\infty^{(\infty)}(\mu_n)\right)^p=D_X^p 2 p ( M q ( ∞ ) ( μ n ) ) p / q ≤ 2 p ( M ∞ ( ∞ ) ( μ n ) ) p = D X p . Hence,
E [ W p ( μ ^ n , N , μ n ) p ] ≤ κ d , p ( ∞ ) D X p θ d , p , q ( ∞ ) N − e d , p . \mathbb{E}[W_p(\hat{\mu}_{n,N},\mu_n)^p]\le\kappa_{d,p}^{(\infty)}D_X^p\theta_{d,p,q}^{(\infty)}N^{-e_{d,p}}. E [ W p ( μ ^ n , N , μ n ) p ] ≤ κ d , p ( ∞ ) D X p θ d , p , q ( ∞ ) N − e d , p .
By the comments in [26 Sec. 2.4] , the function q ↦ θ d , p , q ( ∞ ) q\mapsto\theta_{d,p,q}^{(\infty)} q ↦ θ d , p , q ( ∞ ) is decreasing and converges to 1 1 1 as q → ∞ q\to\infty q → ∞ . Taking the infimum over all q q q and setting C ( d , p ) : = κ d , p ( ∞ ) C(d,p):=\kappa_{d,p}^{(\infty)} C ( d , p ) := κ d , p ( ∞ ) yields the result. □ \square □
Corollary 6.2. Under the assumptions of Theorem 6.1 , let F : K n → Z F:K_n\to Z F : K n → Z be a Lipschitz n n n -invariant. Then
E [ W p ( ν ^ F , N , ν F ) p ] ≤ C ( d , p ) ⋅ ( Lip ( F ) diam ( X ) ) p ⋅ N − e d , p . \mathbb{E}[W_p(\hat{\nu}_{F,N},\nu_F)^p]\le C(d,p)\cdot(\operatorname{Lip}(F)\operatorname{diam}(X))^p\cdot N^{-e_{d,p}}. E [ W p ( ν ^ F , N , ν F ) p ] ≤ C ( d , p ) ⋅ ( Lip ( F ) diam ( X ) ) p ⋅ N − e d , p .
Proof. Since ν ^ F , N = F # ( μ ^ n , N ) \hat{\nu}_{F,N}=F_{\#}(\hat{\mu}_{n,N}) ν ^ F , N = F # ( μ ^ n , N ) and ν F = F # ( μ n ) \nu_F=F_{\#}(\mu_n) ν F = F # ( μ n ) , Lemma 3.12 yields
W p ( ν ^ F , N , ν F ) ≤ Lip ( F ) W p ( μ ^ n , N , μ n ) W_p(\hat{\nu}_{F,N},\nu_F)\leq\operatorname{Lip}(F)W_p(\hat{\mu}_{n,N},\mu_n) W p ( ν ^ F , N , ν F ) ≤ Lip ( F ) W p ( μ ^ n , N , μ n )
for every realization of the sample. Taking p p p -th powers and expectations and applying Theorem 6.1 gives the claim. □ \square □
In other words, ν ^ F , N \hat{\nu}_{F,N} ν ^ F , N converges at the same rate as μ ^ n , N \hat{\mu}_{n,N} μ ^ n , N , up to an additional multiplicative constant that has the same effect as scaling X X X by Lip ( F ) \operatorname{Lip}(F) Lip ( F ) . By Lemma 3.13 , these bounds immediately tell us how many n n n -tuples suffice for the empirical measures to approximate μ n \mu_n μ n and ν F \nu_F ν F up to a given error with a given confidence, which is the content of Corollary C .
Corollary 6.3. Under the assumptions of Theorem 6.1 , choose an error margin ϵ > 0 \epsilon>0 ϵ > 0 and a confidence level 0 < α < 1 0<\alpha<1 0 < α < 1 , and let N ∗ N_* N ∗ be the positive solution of
C ( d , p ) N ∗ − e d , p + − 1 2 ln ( 1 − α ) N ∗ − 1 / 2 = ϵ p . C(d,p)N_*^{-e_{d,p}}+\sqrt{-\frac{1}{2}\ln(1-\alpha)N_*^{-1/2}}=\epsilon^p. C ( d , p ) N ∗ − e d , p + − 2 1 ln ( 1 − α ) N ∗ − 1/2 = ϵ p . Then for all N > N ∗ N>N_* N > N ∗ , with probability at least α \alpha α , we have W p ( μ ^ n , N , μ n ) ≤ ϵ diam ( X ) W_p(\hat{\mu}_{n,N},\mu_n)\leq\epsilon\operatorname{diam}(X) W p ( μ ^ n , N , μ n ) ≤ ϵ diam ( X ) and, uniformly over all Lipschitz n n n -invariants F F F , W p ( ν ^ F , N , ν F ) ≤ ϵ Lip ( F ) diam ( X ) W_p(\hat{\nu}_{F,N},\nu_F)\leq\epsilon\operatorname{Lip}(F)\operatorname{diam}(X) W p ( ν ^ F , N , ν F ) ≤ ϵ Lip ( F ) diam ( X ) .
Proof. Write D X : = diam ( X ) D_X:=\operatorname{diam}(X) D X := diam ( X ) . We may assume D X > 0 D_X>0 D X > 0 , since otherwise both sides vanish. The support of μ n \mu_n μ n is contained in the closure of K n ( X ) K_n(X) K n ( X ) in R d \mathbb{R}^d R d , which is compact of diameter D X D_X D X by Proposition 5.3 (ii). By Theorem 6.1 , Lemma 3.13 applies with D : = D X D:=D_X D := D X and β ( N ) : = C ( d , p ) D X p N − e d , p \beta(N):=C(d,p)D_X^pN^{-e_{d,p}} β ( N ) := C ( d , p ) D X p N − e d , p , and its condition on N ∗ N_* N ∗ is the displayed equation. This gives W p ( μ ^ n , N , μ n ) < ϵ D X W_p(\hat{\mu}_{n,N},\mu_n)<\epsilon D_X W p ( μ ^ n , N , μ n ) < ϵ D X with probability at least α \alpha α . In this event, Lemma 3.12 gives W p ( ν ^ F , N , ν F ) ≤ Lip ( F ) W p ( μ ^ n , N , μ n ) ≤ ϵ Lip ( F ) D X W_p(\hat{\nu}_{F,N},\nu_F)\leq\operatorname{Lip}(F)W_p(\hat{\mu}_{n,N},\mu_n)\leq\epsilon\operatorname{Lip}(F)D_X W p ( ν ^ F , N , ν F ) ≤ Lip ( F ) W p ( μ ^ n , N , μ n ) ≤ ϵ Lip ( F ) D X for all Lipschitz F F F . □ \square □
Remark 6.4. Since Corollary 6.3 is uniform in F F F , the same i.i.d. sample of n n n -tuples may be used to obtain the empirical distributions of any number of n n n -invariants. While this makes the observed empirical distributions dependent, the Wasserstein bound holds for all of them simultaneously with the same confidence level α \alpha α . By contrast, if R R R separate sampling runs are used and all R R R guarantees are to hold with overall confidence α \alpha α , the union bound tells us that the per-run confidence has to be set to 1 − ( 1 − α ) / R 1-(1-\alpha)/R 1 − ( 1 − α ) / R .
Since F F F is Lipschitz, its range satisfies diam F ( K n ( X ) ) ≤ Lip ( F ) diam ( X ) \operatorname{diam}F(K_n(X))\leq\operatorname{Lip}(F)\operatorname{diam}(X) diam F ( K n ( X )) ≤ Lip ( F ) diam ( X ) . When F F F satisfies the more stringent bound diam F ( K n ( X ) ) ≤ λ diam ( X ) \operatorname{diam}F(K_n(X))\leq\lambda\operatorname{diam}(X) diam F ( K n ( X )) ≤ λ diam ( X ) for some λ ≤ Lip ( F ) \lambda\leq\operatorname{Lip}(F) λ ≤ Lip ( F ) , it pays to apply Lemma 3.13 to ν F \nu_F ν F directly, instead of moving through μ n \mu_n μ n , which gives the following refinement.
Corollary 6.5. Under the assumptions of Corollary 6.3, assume additionally that diam F ( K n ( X ) ) ≤ λ diam ( X ) \operatorname{diam}F(K_n(X))\leq\lambda\operatorname{diam}(X) diam F ( K n ( X )) ≤ λ diam ( X ) for some λ > 0 \lambda>0 λ > 0 . Choose an error margin ϵ > 0 \epsilon>0 ϵ > 0 and a confidence level 0 < α < 1 0<\alpha<1 0 < α < 1 , and let N λ N_\lambda N λ be the positive solution of
Lip ( F ) p C ( d , p ) N λ − e d , p + λ p − 1 2 ln ( 1 − α ) N λ − 1 / 2 = ϵ p . \operatorname{Lip}(F)^pC(d,p)N_\lambda^{-e_{d,p}}+\lambda^p\sqrt{-\frac{1}{2}\ln(1-\alpha)N_\lambda^{-1/2}}=\epsilon^p. Lip ( F ) p C ( d , p ) N λ − e d , p + λ p − 2 1 ln ( 1 − α ) N λ − 1/2 = ϵ p . Then for all N > N λ N>N_\lambda N > N λ , W p ( ν ^ F , N , ν F ) ≤ ϵ diam ( X ) W_p(\hat{\nu}_{F,N},\nu_F)\leq\epsilon\operatorname{diam}(X) W p ( ν ^ F , N , ν F ) ≤ ϵ diam ( X ) with probability at least α \alpha α .
Proof. Write D X : = diam ( X ) D_X:=\operatorname{diam}(X) D X := diam ( X ) . We may again assume D X > 0 D_X>0 D X > 0 . Since K n ( X ) K_n(X) K n ( X ) is bounded (Proposition 5.3 (ii)) and F F F is Lipschitz, F ( K n ( X ) ) F(K_n(X)) F ( K n ( X )) is totally bounded, so its closure in the Polish space Z Z Z is a compact set of diameter λ D X \lambda D_X λ D X containing supp ν F \operatorname{supp}\nu_F supp ν F . By Corollary 6.2, Lemma 3.13 applies with D : = λ D X D:=\lambda D_X D := λ D X , β ( N ) : = Lip ( F ) p C ( d , p ) D X p N − e d , p \beta(N):=\operatorname{Lip}(F)^pC(d,p)D_X^pN^{-e_{d,p}} β ( N ) := Lip ( F ) p C ( d , p ) D X p N − e d , p , and error margin ϵ / λ \epsilon/\lambda ϵ / λ , and its condition on N λ N_\lambda N λ is the displayed equation divided by λ p \lambda^p λ p . This gives W p ( ν ^ F , N , ν F ) < ϵ D X W_p(\hat{\nu}_{F,N},\nu_F)<\epsilon D_X W p ( ν ^ F , N , ν F ) < ϵ D X with probability at least α \alpha α . □ \square □
To reach a W 1 W_1 W 1 error of ϵ diam ( X ) \epsilon\operatorname{diam}(X) ϵ diam ( X ) from Corollary 6.3, one has to ask for an accuracy of ϵ / Lip ( F ) \epsilon/\operatorname{Lip}(F) ϵ / Lip ( F ) . Since λ \lambda λ enters only the second term of the equation in Corollary 6.5, the two sample sizes satisfy N λ ( ϵ ) ≤ N Lip ( F ) ( ϵ ) = N ∗ ( ϵ / Lip ( F ) ) N_\lambda(\epsilon)\leq N_{\operatorname{Lip}(F)}(\epsilon)=N_*(\epsilon/\operatorname{Lip}(F)) N λ ( ϵ ) ≤ N Lip ( F ) ( ϵ ) = N ∗ ( ϵ / Lip ( F )) . The improvement is modest, though: for d ≥ 2 p d\geq2p d ≥ 2 p the sample size is governed by the first term Lip ( F ) p C ( d , p ) N − e d , p \operatorname{Lip}(F)^pC(d,p)N^{-e_{d,p}} Lip ( F ) p C ( d , p ) N − e d , p , which involves neither λ \lambda λ nor α \alpha α , so the target accuracy ϵ \epsilon ϵ drives the count while the range of F F F and the confidence level only move the smaller term (cf. Figure 2 ).
Figure 2. Required sample count N λ = 1 N_{\lambda=1} N λ = 1 from Corollary 6.5 for estimating ν F \nu_F ν F up to W 1 W_1 W 1 error ϵ diam ( X ) \epsilon\operatorname{diam}(X) ϵ diam ( X ) , plotted against confidence α \alpha α and accuracy ϵ \epsilon ϵ . White contours mark powers of ten in N N N . The colours indicate sampling cost from feasible (blue/green) through expensive (yellow) to prohibitive (red) as N N N increases.
Both corollaries pass through the curvature measure μ n \mu_n μ n . This is what makes Corollary 6.3 uniform over all Lipschitz n n n -invariants, and it is also what ties the exponent to the dimension d = ( n 2 ) d = \binom{n}{2} d = ( 2 n ) of the space of distance matrices. If only a given real-valued n n n -invariant is of interest, one can instead apply the argument of Theorem 6.1 to ν F \nu_F ν F directly, viewed as a measure on R \mathbb{R} R .
Proposition 6.6. Fix a real number 1 ≤ p < ∞ 1 \le p < \infty 1 ≤ p < ∞ and integers N ≥ 1 N \ge1 N ≥ 1 , n ≥ 2 n \ge2 n ≥ 2 . Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) be a bounded m m mm mm -space, and let F : K n → R F:\mathbf{K}_n \to\mathbb{R} F : K n → R be a real-valued n n n -invariant with diam F ( K n ( X ) ) ≤ λ diam ( X ) \operatorname{diam} F(\mathbf{K}_n(X)) \le\lambda\operatorname{diam}(X) diam F ( K n ( X )) ≤ λ diam ( X ) for some λ > 0 \lambda> 0 λ > 0 . Then
E [ W p ( ν ^ F , N , ν F ) p ] ≤ C ( 1 , p ) ⋅ ( λ diam ( X ) ) p ⋅ N − 1 / 2 , C ( 1 , p ) = 1 2 1 / 2 − 2 1 − p . \mathbb{E}\left[W_p(\widehat{\nu}_{F,N},\nu_F)^p\right] \le C(1,p)\cdot\left(\lambda\operatorname{diam}(X)\right)^p\cdot N^{-1/2}, \qquad C(1,p)=\frac{1}{2^{1/2}-2^{1-p}}. E [ W p ( ν F , N , ν F ) p ] ≤ C ( 1 , p ) ⋅ ( λ diam ( X ) ) p ⋅ N − 1/2 , C ( 1 , p ) = 2 1/2 − 2 1 − p 1 . Moreover, choose an error margin ϵ > 0 \epsilon> 0 ϵ > 0 and a confidence level 0 < α < 1 0 < \alpha< 1 0 < α < 1 , and let
N F : = ( ( C ( 1 , p ) + − 1 2 ln ( 1 − α ) ) λ p ϵ p ) 2 . N_F := \left(\left(C(1,p)+\sqrt{-\frac{1}{2}\ln(1-\alpha)}\right)\frac{\lambda^p}{\epsilon^p}\right)^2. N F := ( ( C ( 1 , p ) + − 2 1 ln ( 1 − α ) ) ϵ p λ p ) 2 . Then for all N > N F N > N_F N > N F , W p ( ν ^ F , N , ν F ) ≤ ϵ diam ( X ) W_p(\widehat{\nu}_{F,N},\nu_F) \le\epsilon\operatorname{diam}(X) W p ( ν F , N , ν F ) ≤ ϵ diam ( X ) with probability at least α \alpha α .
Proof. Write D X : = diam ( X ) D_X := \operatorname{diam}(X) D X := diam ( X ) and D : = λ D X D := \lambda D_X D := λ D X . We may assume D X > 0 D_X > 0 D X > 0 , since otherwise ν F \nu_F ν F is a Dirac measure and both sides vanish. The closure K K K of F ( K n ( X ) ) F(\mathbf{K}_n(X)) F ( K n ( X )) in R \mathbb{R} R is a compact set of diameter at most D D D containing supp ν F \operatorname{supp}\nu_F supp ν F , and ν ^ F , N = F # ( μ ^ n , N ) \widehat{\nu}_{F,N}=F_{\#}(\widehat{\mu}_{n,N}) ν F , N = F # ( μ n , N ) is the empirical measure of the N N N independent samples F ( Ψ n ( x ( i ) ) ) ∼ ν F F(\Psi_n(x^{(i)}))\sim\nu_F F ( Ψ n ( x ( i ) )) ∼ ν F . We repeat the proof of Theorem 6.1 for ν F \nu_F ν F on R \mathbb{R} R in place of μ n \mu_n μ n on R d \mathbb{R}^d R d , i.e. with d = 1 d=1 d = 1 , which satisfies d < 2 p d<2p d < 2 p for every p ≥ 1 p\ge1 p ≥ 1 , so the exponent is e 1 , p = 1 / 2 e_{1,p}=1/2 e 1 , p = 1/2 . All norms on R \mathbb{R} R agree, and [26 Thm. 2.1] with m = ∞ m=\infty m = ∞ gives
E [ W p ( ν ^ F , N , ν F ) p ] ≤ 2 p κ 1 , p ( ∞ ) ( M q ( ∞ ) ( ν F ) ) p / q θ 1 , p , q ( ∞ ) N − 1 / 2 . \mathbb{E}\left[W_p(\widehat{\nu}_{F,N},\nu_F)^p\right]\le2^p\kappa_{1,p}^{(\infty)}\left(\mathcal{M}^{(\infty)}_q(\nu_F)\right)^{p/q}\theta_{1,p,q}^{(\infty)}N^{-1/2}. E [ W p ( ν F , N , ν F ) p ] ≤ 2 p κ 1 , p ( ∞ ) ( M q ( ∞ ) ( ν F ) ) p / q θ 1 , p , q ( ∞ ) N − 1/2 .
By Proposition 3.17 , M q ( ∞ ) ( ν F ) 1 / q ≤ R ∞ ( K ) ≤ D / 2 \mathcal{M}^{(\infty)}_q(\nu_F)^{1/q}\le R_\infty(K)\le D/2 M q ( ∞ ) ( ν F ) 1/ q ≤ R ∞ ( K ) ≤ D /2 , so 2 p ( M q ( ∞ ) ( ν F ) ) p / q ≤ D p 2^p\left(\mathcal{M}^{(\infty)}_q(\nu_F)\right)^{p/q}\le D^p 2 p ( M q ( ∞ ) ( ν F ) ) p / q ≤ D p . Taking the infimum over q q q as in the proof of Theorem 6.1 gives the first claim with C ( 1 , p ) = κ 1 , p ∞ C(1,p)=\kappa_{1,p}^{\infty} C ( 1 , p ) = κ 1 , p ∞ . For the second claim, Lemma 3.13 applies to ν F \nu_F ν F with D D D , β ( N ) : = C ( 1 , p ) D p N − 1 / 2 \beta(N):=C(1,p)D^pN^{-1/2} β ( N ) := C ( 1 , p ) D p N − 1/2 , and error margin ϵ / λ \epsilon/\lambda ϵ / λ . Its condition on N F N_F N F reads ( C ( 1 , p ) + − 1 2 ln ( 1 − α ) ) N F − 1 / 2 ≤ ϵ p / λ p \left(C(1,p)+\sqrt{-\frac{1}{2}\ln(1-\alpha)}\right)N_F^{-1/2}\le\epsilon^p/\lambda^p ( C ( 1 , p ) + − 2 1 ln ( 1 − α ) ) N F − 1/2 ≤ ϵ p / λ p , which holds with equality by definition of N F N_F N F . This gives W p ( ν ^ F , N , ν F ) < ( ϵ / λ ) D = ϵ D X W_p(\widehat{\nu}_{F,N},\nu_F)<(\epsilon/\lambda)D=\epsilon D_X W p ( ν F , N , ν F ) < ( ϵ / λ ) D = ϵ D X with probability at least α \alpha α . □ \square □
Remark 6.7. Nothing in the proof goes beyond the fact that ν F \nu_F ν F lives on R \mathbb{R} R , and such one-dimensional bounds are classical; see [7 ] for a comprehensive treatment.
The main qualitative content of Theorem 6.1 lies in the exponents N − 1 / 2 N^{-1/2} N − 1/2 and N − p / d N^{-p/d} N − p / d . The examples following Thm. 1 in [25 ] show that the exponents e d , p = 1 / 2 e_{d,p}=1/2 e d , p = 1/2 and e d , p = p / d e_{d,p}=p/d e d , p = p / d of [26 Thm. 2.1] are sharp. We adapt them to give an example of a curvature set where the growth rate is sharp.
Example 6.8. Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) be an mm-space with two points at distance D D D and uniform measure μ X \mu_X μ X . Then K 2 ( X ) K_2(X) K 2 ( X ) , viewed as a subset of R \mathbb{R} R , is the set { 0 , D } \{0,D\} { 0 , D } and μ 2 \mu_2 μ 2 is the uniform measure. Since d / 2 = 1 / 2 < 1 d/2=1/2<1 d /2 = 1/2 < 1 , Theorem 6.1 yields
E [ W p ( μ ^ 2 , N , μ 2 ) p ] ≤ C ( 1 , p ) D p N − 1 / 2 = D p 2 1 / 2 − 2 1 − p N − 1 / 2 \mathbb{E}[W_p(\hat{\mu}_{2,N},\mu_2)^p] \le C(1,p)D^pN^{-1/2}=\frac{D^p}{2^{1/2}-2^{1-p}}N^{-1/2} E [ W p ( μ ^ 2 , N , μ 2 ) p ] ≤ C ( 1 , p ) D p N − 1/2 = 2 1/2 − 2 1 − p D p N − 1/2 with C ( 1 , p ) = 1 2 1 / 2 − 2 1 − p C(1,p)=\frac{1}{2^{1/2}-2^{1-p}} C ( 1 , p ) = 2 1/2 − 2 1 − p 1 for any p ≥ 1 p\ge1 p ≥ 1 . On the other hand, μ ^ 2 , N = K N δ 0 + ( 1 − K N ) δ D \hat{\mu}_{2,N}=\frac{K}{N}\delta_0+\left(1-\frac{K}{N}\right)\delta_D μ ^ 2 , N = N K δ 0 + ( 1 − N K ) δ D , where K ∼ Bin ( N , 1 / 2 ) K\sim\operatorname{Bin}(N,1/2) K ∼ Bin ( N , 1/2 ) is the number of sampled distances equal to 0 0 0 , so W p ( μ ^ 2 , N , μ 2 ) p = D p ∣ K / N − 1 / 2 ∣ W_p(\hat{\mu}_{2,N},\mu_2)^p=D^p|K/N-1/2| W p ( μ ^ 2 , N , μ 2 ) p = D p ∣ K / N − 1/2∣ as in Ex. (a) following Thm. 1 in [25 ] . By symmetry and the identity N − 2 k N ( N k ) = ( N − 1 k ) − ( N − 1 k − 1 ) \frac{N-2k}{N}\binom{N}{k}=\binom{N-1}{k}-\binom{N-1}{k-1} N N − 2 k ( k N ) = ( k N − 1 ) − ( k − 1 N − 1 ) , the resulting sum telescopes, and Stirling’s formula yields
E [ W p ( μ ^ 2 , N , μ 2 ) p ] = D p 2 N ∑ k = 0 N ∣ k N − 1 2 ∣ ( N k ) = D p 2 N ( N − 1 ⌊ N / 2 ⌋ ) ∼ D p 2 π N − 1 / 2 . \mathbb{E}[W_p(\hat{\mu}_{2,N},\mu_2)^p]=\frac{D^p}{2^N}\sum_{k=0}^{N}\left|\frac{k}{N}-\frac{1}{2}\right|\binom{N}{k}=\frac{D^p}{2^N}\binom{N-1}{\lfloor N/2\rfloor}\sim\frac{D^p}{\sqrt{2\pi}}N^{-1/2}. E [ W p ( μ ^ 2 , N , μ 2 ) p ] = 2 N D p k = 0 ∑ N N k − 2 1 ( k N ) = 2 N D p ( ⌊ N /2 ⌋ N − 1 ) ∼ 2 π D p N − 1/2 .
Unlike in the last example, the exponents in Theorem 6.1 are unlikely to be sharp for n ≥ 3 n\ge3 n ≥ 3 , because K n ( X ) K_n(X) K n ( X ) is often of much lower dimension than ( n 2 ) \binom{n}{2} ( 2 n ) (Remark 5.7). Combining the estimates of [64 ] with Proposition 5.6, we can replace ( n 2 ) \binom{n}{2} ( 2 n ) by n s ns n s for Ahlfors s s s -regular X X X , which is an improvement whenever s < ( n − 1 ) / 2 s<(n-1)/2 s < ( n − 1 ) /2 . This is the content of Theorem D , which is the following result.
Theorem 6.10. Fix an integer n ≥ 2 n\ge2 n ≥ 2 . Let d : = n 2 d:=n^2 d := n 2 or d : = ( n 2 ) d:=\binom{n}{2} d := ( 2 n ) . Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) be an Ahlfors s s s -regular mm-space. Embed K n ( X ) K_n(X) K n ( X ) in ( R d , ∥ ⋅ ∥ ∞ ) (\mathbb{R}^d,\|\cdot\|_\infty) ( R d , ∥ ⋅ ∥ ∞ ) . Fix real numbers 1 ≤ p ≤ 1 2 d M ( K n ( X ) ) 1\le p\le\frac{1}{2}d_M(K_n(X)) 1 ≤ p ≤ 2 1 d M ( K n ( X )) and t > s t>s t > s . Then there exists 0 < ϵ ′ ≤ 1 0<\epsilon'\le1 0 < ϵ ′ ≤ 1 , depending on ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) , n n n , p p p , and t t t but not on N N N , such that for all N ≥ 1 N\ge1 N ≥ 1
E [ W p ( μ ^ n , N , μ n ) p ] ≤ diam ( X ) p ( C 1 ⋅ N − p / n t + C 2 ⋅ N − 1 / 2 ) , \mathbb{E}[W_p(\hat{\mu}_{n,N},\mu_n)^p]\le\operatorname{diam}(X)^p\left(C_1\cdot N^{-p/nt}+C_2\cdot N^{-1/2}\right), E [ W p ( μ ^ n , N , μ n ) p ] ≤ diam ( X ) p ( C 1 ⋅ N − p / n t + C 2 ⋅ N − 1/2 ) , where C 1 : = 3 3 n t p n t − 2 p + 1 ( 1 3 n t / 2 − p − 1 + 3 ) C_1:=3^{\frac{3ntp}{nt-2p}+1}\left(\frac{1}{3^{nt/2-p-1}}+3\right) C 1 := 3 n t − 2 p 3 n tp + 1 ( 3 n t /2 − p − 1 1 + 3 ) and C 2 : = ( 27 / ϵ ′ ) n t / 2 C_2:=(27/\epsilon')^{nt/2} C 2 := ( 27/ ϵ ′ ) n t /2 .
Proof. Write D X : = diam ( X ) D_X:=\operatorname{diam}(X) D X := diam ( X ) . We may assume D X > 0 D_X>0 D X > 0 , since otherwise both sides vanish. As [64 ] normalize to diameter at most 1 1 1 , we first prove the bound for the rescaled mm-space X ′ : = ( X , d X / D X , μ X ) X':=(X,d_X/D_X,\mu_X) X ′ := ( X , d X / D X , μ X ) , which has diameter 1 1 1 and is again Ahlfors s s s -regular, with constant C X max ( D X s , D X − s ) C_X\max(D_X^s,D_X^{-s}) C X max ( D X s , D X − s ) . Its curvature set K n ( X ′ ) = D X − 1 K n ( X ) K_n(X')=D_X^{-1}K_n(X) K n ( X ′ ) = D X − 1 K n ( X ) is compact by Lemma 3.19 and Proposition 5.3 (iii), has diameter 1 1 1 by Proposition 5.3 (ii), and has the same Minkowski dimension as K n ( X ) K_n(X) K n ( X ) . Hence 1 ≤ p ≤ 1 2 d M ( K n ( X ′ ) ) 1\le p\le\frac{1}{2}d_M(K_n(X')) 1 ≤ p ≤ 2 1 d M ( K n ( X ′ )) , and Proposition 5.6(ii) applied to X ′ X' X ′ yields d μ n , X ′ ∗ ( p ) ≤ n s < n t d^*_{\mu_{n,X'}}(p)\le ns<nt d μ n , X ′ ∗ ( p ) ≤ n s < n t for its curvature measure μ n , X ′ \mu_{n,X'} μ n , X ′ . Following the proof of [64 Cor. 1] , this implies there exists 0 < ϵ ′ ≤ 1 0<\epsilon'\le1 0 < ϵ ′ ≤ 1 , depending only on μ n , X ′ \mu_{n,X'} μ n , X ′ , p p p , and t t t , that satisfies the hypothesis of [64 Prop. 5] for μ n , X ′ \mu_{n,X'} μ n , X ′ with n t nt n t in place of their s s s , so for all N ≥ 1 N\ge1 N ≥ 1 we have E [ W p ( μ ^ n , N ′ , μ n , X ′ ) p ] ≤ C 1 ⋅ N − p / n t + C 2 ⋅ N − 1 / 2 \mathbb{E}[W_p(\hat{\mu}'_{n,N},\mu_{n,X'})^p]\le C_1\cdot N^{-p/nt}+C_2\cdot N^{-1/2} E [ W p ( μ ^ n , N ′ , μ n , X ′ ) p ] ≤ C 1 ⋅ N − p / n t + C 2 ⋅ N − 1/2 , where the image μ ^ n , N ′ \hat{\mu}'_{n,N} μ ^ n , N ′ of μ ^ n , N \hat{\mu}_{n,N} μ ^ n , N under scaling by 1 / D X 1/D_X 1/ D X is an empirical measure of μ n , X ′ \mu_{n,X'} μ n , X ′ . Scaling by D X D_X D X maps μ n , X ′ \mu_{n,X'} μ n , X ′ to μ n , X \mu_{n,X} μ n , X and μ ^ n , N ′ \hat{\mu}'_{n,N} μ ^ n , N ′ to μ ^ n , N \hat{\mu}_{n,N} μ ^ n , N and multiplies W p W_p W p by D X D_X D X , which gives the claim. □ \square □
Block decomposition of four-point hyperbolicity distributions
In this section we prove Theorem E, which states that the hyperbolicity distribution of a finite mm-space is the sum of those of the blocks of its tight span. Intuitively, the four-point hyperbolicity deficit only registers how geodesics branch, not how far out they extend after branching. A finite metric space has no geodesics to speak of, so we first embed X X X isometrically into its tight span, a geodesic metric space that contains X X X and in which this branching becomes visible. For finite X X X the tight span decomposes into blocks, and every quadruple with a nonzero deficit can be localized to a single block, so that non-tree-likeness is traced to identifiable pieces of X X X . As a consequence, the hyperbolicity distribution can also be estimated block by block, which reduces the sampling cost when the blocks that are not intervals are small compared with X X X .
We begin by recalling the definition of the tight span, introduced independently by Isbell [39 ] and Dress [21 ] ; we follow the presentation of Lang [43 Sec. 3] . The idea is to adjoin to X X X every point that could lie on a geodesic between points of X X X . Each such point p p p is described by its distances f ( x ) = d ( p , x ) f(x)=d(p,x) f ( x ) = d ( p , x ) to the points of X X X , and the triangle inequality requires f ( x ) ≥ d X ( x , x ′ ) − f ( x ′ ) f(x)\ge d_X(x,x')-f(x') f ( x ) ≥ d X ( x , x ′ ) − f ( x ′ ) for all x , x ′ ∈ X x,x'\in X x , x ′ ∈ X , with equality exactly when p p p lies on a geodesic from x x x to x ′ x' x ′ . The tight span is the set of all such functions f f f that are minimal, meaning that no value f ( x ) f(x) f ( x ) can be lowered.
Definition 7.1 (Tight span [39 , 21 ] ). Let ( X , d X ) (X,d_X) ( X , d X ) be a metric space. The tight span T ( X , d X ) T(X,d_X) T ( X , d X ) is the set of functions f : X → R f:X\to\mathbb{R} f : X → R such that
f ( x ) = sup x ′ ∈ X [ d X ( x , x ′ ) − f ( x ′ ) ] for all x ∈ X , f(x)=\sup_{x'\in X}\left[d_X(x,x')-f(x')\right] \quad\text{for all }x\in X, f ( x ) = x ′ ∈ X sup [ d X ( x , x ′ ) − f ( x ′ ) ] for all x ∈ X , equipped with the L ∞ L^\infty L ∞ metric d ∞ ( f , g ) : = sup x ∈ X ∣ f ( x ) − g ( x ) ∣ d_\infty(f,g):=\sup_{x\in X}|f(x)-g(x)| d ∞ ( f , g ) := sup x ∈ X ∣ f ( x ) − g ( x ) ∣ .
A metric space E E E is injective if every 1-Lipschitz map into E E E defined on a subset A A A of a metric space B B B extends to a 1-Lipschitz map B → E B\to E B → E [39 Sec. 1] . The tight span is also known as the injective hull of X X X , since it is the smallest injective metric space containing X X X [39 2.10] .
We will need the following properties.
Proposition 7.2. Let ( X , d X ) (X,d_X) ( X , d X ) be a metric space. Then:
(i) The map h ∙ : X → T ( X , d X ) h_\bullet:X\to T(X,d_X) h ∙ : X → T ( X , d X ) given by x ↦ ( h x : x ′ ↦ d X ( x , x ′ ) ) x\mapsto(h_x:x'\mapsto d_X(x,x')) x ↦ ( h x : x ′ ↦ d X ( x , x ′ )) is an isometric embedding ( X , d X ) ↪ T ( X , d X ) (X,d_X)\hookrightarrow T(X,d_X) ( X , d X ) ↪ T ( X , d X ) .
(ii) T ( X , d X ) T(X,d_X) T ( X , d X ) is geodesic.
(iii) If X X X is finite, T ( X , d X ) T(X,d_X) T ( X , d X ) is a finite polytopal complex, i.e. a polyhedral complex whose cells are convex compact polytopes.
(iv) If A ⊂ X A\subset X A ⊂ X , there is an isometric embedding ι : T ( A , d X ∣ A ) ↪ T ( X , d X ) \iota:T(A,d_X|_A)\hookrightarrow T(X,d_X) ι : T ( A , d X ∣ A ) ↪ T ( X , d X ) with ι ( f ) ∣ A = f \iota(f)|_A=f ι ( f ) ∣ A = f for all f ∈ T ( A , d X ∣ A ) f\in T(A,d_X|_A) f ∈ T ( A , d X ∣ A ) . It is compatible with the embeddings of the first item, that is, ι ( h a ) = h a \iota(h_a)=h_a ι ( h a ) = h a for all a ∈ A a\in A a ∈ A .
Proof. (i) See the proof of [39 Thm. 2.1] (routine calculation using the triangle inequality). (ii) T ( X , d X ) T(X,d_X) T ( X , d X ) is injective [39 2.9] , and injective metric spaces are geodesic [43 Sec. 2] . (iii) See the discussion following [43 Prop. 3.5] . (iv) The embedding is [43 Prop. 3.5(1)] . Since d ∞ ( f , h a ) = f ( a ) d_\infty(f,h_a)=f(a) d ∞ ( f , h a ) = f ( a ) for all f ∈ T ( X , d X ) f\in T(X,d_X) f ∈ T ( X , d X ) [43 Eq. (3.2)] , we get d ∞ ( ι ( h a ) , h a ) = h a ( a ) = 0 d_\infty(\iota(h_a),h_a)=h_a(a)=0 d ∞ ( ι ( h a ) , h a ) = h a ( a ) = 0 . □
Example 7.3. Perhaps the simplest example of an injective space is a metric tree with its geodesic distance. In fact, by [21 Thm. 8] , T ( X , d X ) T(X,d_X) T ( X , d X ) is the smallest R \mathbb{R} R -tree that contains X X X when hyp ( X ) = 0 \operatorname{hyp}(X)=0 hyp ( X ) = 0 . Another simple example is when ∣ X ∣ = 4 |X|=4 ∣ X ∣ = 4 : T ( X , d X ) T(X,d_X) T ( X , d X ) is isometric to a rectangle [ 0 , L 1 ] × [ 0 , L 2 ] [0,L_1]\times[0,L_2] [ 0 , L 1 ] × [ 0 , L 2 ] equipped with the ℓ 1 \ell_1 ℓ 1 metric and with 4 edges glued to its vertices [21 Ex. (1.16)] ; see Figure 3 . Since X X X embeds isometrically in T ( X , d X ) T(X,d_X) T ( X , d X ) , distances in X X X can be read off from this picture, e.g. d X ( x 1 , x 2 ) = a 1 + L 1 + a 2 d_X(x_1,x_2)=a_1+L_1+a_2 d X ( x 1 , x 2 ) = a 1 + L 1 + a 2 .
Figure 3. The tight span of any four-point metric space X = { x 1 , x 2 , x 3 , x 4 } X = \{x_1,x_2,x_3,x_4\} X = { x 1 , x 2 , x 3 , x 4 } is isometric to a rectangle [ 0 , L 1 ] × [ 0 , L 2 ] [0,L_1] \times[0,L_2] [ 0 , L 1 ] × [ 0 , L 2 ] with the ℓ 1 \ell^1 ℓ 1 metric and 4 edges of lengths a 1 , a 2 , a 3 , a 4 a_1,a_2,a_3,a_4 a 1 , a 2 , a 3 , a 4 glued to its vertices.
We exploit the polytopal structure of the tight span via the following decomposition.
Definition 7.5 (Blocks and cut-vertices, cf. [38 ] ). Let T T T be a connected polytopal complex. A vertex v ∈ T v \in T v ∈ T is a cut-vertex if T ∖ { v } T \setminus\{v\} T ∖ { v } is disconnected. We say that v v v separates two subsets A , B ⊂ T A,B \subset T A , B ⊂ T if A ∖ { v } A \setminus\{v\} A ∖ { v } and B ∖ { v } B \setminus\{v\} B ∖ { v } are contained in different connected components of T ∖ { v } T \setminus\{v\} T ∖ { v } . A maximal subcomplex B ⊂ T B \subset T B ⊂ T that does not have cut-vertices is called a block . We denote the set of cut-vertices of T T T as cut ( T ) \operatorname{cut}(T) cut ( T ) and the set of blocks as B ( T ) \mathcal{B}(T) B ( T ) .
Definition 7.6 (Block-cut tree, cf. [38 ] ). The block-cut tree of a connected polytopal complex T T T is the graph BC ( T ) \operatorname{BC}(T) BC ( T ) with nodes B ( T ) ∪ cut ( T ) \mathcal{B}(T) \cup\operatorname{cut}(T) B ( T ) ∪ cut ( T ) and edge set
E : = { { B , c } ∣ B ∈ B ( T ) , c ∈ cut ( T ) and c ∈ B } . E := \{\{B,c\} \mid B \in\mathcal{B}(T), c \in\operatorname{cut}(T) \text{ and } c \in B\}. E := {{ B , c } ∣ B ∈ B ( T ) , c ∈ cut ( T ) and c ∈ B } . It is straightforward to show that BC ( T ) \operatorname{BC}(T) BC ( T ) is a tree for any connected polytopal complex by generalizing [38 Thm. 1] . This tree is the combinatorial device that keeps track of how the blocks of the tight span are attached to one another. Given a finite metric space ( X , d X ) (X,d_X) ( X , d X ) , we denote the set of blocks and cut-vertices of T ( X , d X ) T(X,d_X) T ( X , d X ) by B ( X ) \mathcal{B}(X) B ( X ) and cut ( X ) \operatorname{cut}(X) cut ( X ) , respectively. Similarly, we write BC ( X ) \operatorname{BC}(X) BC ( X ) to denote the block-cut tree of T ( X , d X ) T(X,d_X) T ( X , d X ) .
Example 7.7. In Figure 3 , let B B B be the central rectangle [ 0 , L 1 ] × [ 0 , L 2 ] [0,L_1] \times[0,L_2] [ 0 , L 1 ] × [ 0 , L 2 ] and E i E_i E i the edge attached to B B B at c i c_i c i . Then cut ( X ) = { c 1 , c 2 , c 3 , c 4 } \operatorname{cut}(X) = \{c_1,c_2,c_3,c_4\} cut ( X ) = { c 1 , c 2 , c 3 , c 4 } and B ( X ) = { B , E 1 , E 2 , E 3 , E 4 } \mathcal{B}(X) = \{B,E_1,E_2,E_3,E_4\} B ( X ) = { B , E 1 , E 2 , E 3 , E 4 } , while BC ( X ) \operatorname{BC}(X) BC ( X ) is the graph on B ( X ) ∪ cut ( X ) \mathcal{B}(X) \cup\operatorname{cut}(X) B ( X ) ∪ cut ( X ) with edges { B , c i } \{B,c_i\} { B , c i } and { c i , E i } \{c_i,E_i\} { c i , E i } for 1 ≤ i ≤ 4 1 \le i \le4 1 ≤ i ≤ 4 .
With this language in place, we can project points and tuples to a chosen block by collapsing everything outside the block onto the unique separating cut-vertex.
Definition 7.8. Let ( X , d X ) (X,d_X) ( X , d X ) be a finite metric space and B ∈ B ( X ) B \in\mathcal{B}(X) B ∈ B ( X ) . We define P B : X → B P_B \colon X \to B P B : X → B by
P B ( x ) : = { x if x ∈ B c if x ∉ B P_B(x) :=
\begin{cases}
x & \text{if } x \in B \\
c & \text{if } x \notin B
\end{cases} P B ( x ) := { x c if x ∈ B if x ∈ / B where c ∈ cut ( X ) ∩ B c \in\operatorname{cut}(X) \cap B c ∈ cut ( X ) ∩ B is the unique cut-vertex that separates x x x from B B B . Given x = ( x 1 , … , x n ) ∈ X n \mathbf{x} = (x_1,\ldots,x_n) \in X^n x = ( x 1 , … , x n ) ∈ X n , we extend the definition of P B P_B P B to X n X^n X n by setting P B ( x ) : = ( P B ( x 1 ) , … , P B ( x n ) ) P_B(\mathbf{x}) := (P_B(x_1),\ldots,P_B(x_n)) P B ( x ) := ( P B ( x 1 ) , … , P B ( x n )) .
That is, P B P_B P B fixes the points of the tuple already contained in B B B and collapses everything else onto the point where it attaches to B B B ; equivalently, P B ( x ) P_B(\mathbf{x}) P B ( x ) is the point of B B B nearest to x x x , since P B ( x ) P_B(\mathbf{x}) P B ( x ) separates x x x from B B B and every geodesic from x x x to a point of B B B therefore passes through P B ( x ) P_B(\mathbf{x}) P B ( x ) . For example, in Figure 3 , P B ( ( x 1 , x 2 , c 3 , c 4 ) ) = ( c 1 , c 2 , c 3 , c 4 ) P_B((x_1,x_2,c_3,c_4)) = (c_1,c_2,c_3,c_4) P B (( x 1 , x 2 , c 3 , c 4 )) = ( c 1 , c 2 , c 3 , c 4 ) .
The next lemmas show that at most one block retains a full four-point configuration under projection, that such a block exists whenever the hyperbolicity deficit is nonzero, and that projecting onto it preserves the deficit. We first observe that the lengths a i a_i a i of the edges attached to the rectangle in Figure 3 do not affect hyp ( x ) \operatorname{hyp}(\mathbf{x}) hyp ( x ) .
Lemma 7.9. Let x = ( x 1 , x 2 , x 3 , x 4 ) \mathbf{x} = (x_1,x_2,x_3,x_4) x = ( x 1 , x 2 , x 3 , x 4 ) and c = ( c 1 , c 2 , c 3 , c 4 ) \mathbf{c} = (c_1,c_2,c_3,c_4) c = ( c 1 , c 2 , c 3 , c 4 ) as in Figure 3 . Then hyp ( x ) = hyp ( c ) = min ( L 1 , L 2 ) \operatorname{hyp}(\mathbf{x}) = \operatorname{hyp}(\mathbf{c}) = \min(L_1,L_2) hyp ( x ) = hyp ( c ) = min ( L 1 , L 2 ) .
Proof. Denote the metric on T ( X , d X ) T(X,d_X) T ( X , d X ) as d T d_T d T . Note that d X ( x i , x j ) = a i + d T ( c i , c j ) + a j d_X(x_i,x_j)=a_i+d_T(c_i,c_j)+a_j d X ( x i , x j ) = a i + d T ( c i , c j ) + a j , so for any permutation σ ∈ Sym ( 4 ) \sigma\in\operatorname{Sym}(4) σ ∈ Sym ( 4 ) ,
d X ( x σ ( 1 ) , x σ ( 2 ) ) + d X ( x σ ( 3 ) , x σ ( 4 ) ) = d T ( c σ ( 1 ) , c σ ( 2 ) ) + d T ( c σ ( 3 ) , c σ ( 4 ) ) + ( a 1 + a 2 + a 3 + a 4 ) . d_X(x_{\sigma(1)},x_{\sigma(2)})+d_X(x_{\sigma(3)},x_{\sigma(4)})=d_T(c_{\sigma(1)},c_{\sigma(2)})+d_T(c_{\sigma(3)},c_{\sigma(4)})+(a_1+a_2+a_3+a_4). d X ( x σ ( 1 ) , x σ ( 2 ) ) + d X ( x σ ( 3 ) , x σ ( 4 ) ) = d T ( c σ ( 1 ) , c σ ( 2 ) ) + d T ( c σ ( 3 ) , c σ ( 4 ) ) + ( a 1 + a 2 + a 3 + a 4 ) .
Thus, S ( x ) = S ( c ) + ( a 1 + a 2 + a 3 + a 4 ) ( 1 , 1 , 1 ) S(\mathbf{x})=S(\mathbf{c})+(a_1+a_2+a_3+a_4)(1,1,1) S ( x ) = S ( c ) + ( a 1 + a 2 + a 3 + a 4 ) ( 1 , 1 , 1 ) , and
hyp ( x ) = 1 2 ( S ( 1 ) ( x ) − S ( 2 ) ( x ) ) = 1 2 ( S ( 1 ) ( c ) − S ( 2 ) ( c ) ) = hyp ( c ) . \operatorname{hyp}(\mathbf{x})=\frac{1}{2}\left(S_{(1)}(\mathbf{x})-S_{(2)}(\mathbf{x})\right)=\frac{1}{2}\left(S_{(1)}(\mathbf{c})-S_{(2)}(\mathbf{c})\right)=\operatorname{hyp}(\mathbf{c}). hyp ( x ) = 2 1 ( S ( 1 ) ( x ) − S ( 2 ) ( x ) ) = 2 1 ( S ( 1 ) ( c ) − S ( 2 ) ( c ) ) = hyp ( c ) .
Lastly, s 12 , 34 ( c ) = 2 L 1 s_{12,34}(\mathbf{c})=2L_1 s 12 , 34 ( c ) = 2 L 1 , s 14 , 23 ( c ) = 2 L 2 s_{14,23}(\mathbf{c})=2L_2 s 14 , 23 ( c ) = 2 L 2 , and s 13 , 24 ( c ) = 2 ( L 1 + L 2 ) s_{13,24}(\mathbf{c})=2(L_1+L_2) s 13 , 24 ( c ) = 2 ( L 1 + L 2 ) , so S ( 2 ) ( c ) = 2 max ( L 1 , L 2 ) S_{(2)}(\mathbf{c})=2\max(L_1,L_2) S ( 2 ) ( c ) = 2 max ( L 1 , L 2 ) and S ( 1 ) ( c ) = 2 ( L 1 + L 2 ) S_{(1)}(\mathbf{c})=2(L_1+L_2) S ( 1 ) ( c ) = 2 ( L 1 + L 2 ) . Hence, hyp ( c ) = 1 2 [ S ( 1 ) ( c ) − S ( 2 ) ( c ) ] = min ( L 1 , L 2 ) \operatorname{hyp}(\mathbf{c})=\frac{1}{2}[S_{(1)}(\mathbf{c})-S_{(2)}(\mathbf{c})]=\min(L_1,L_2) hyp ( c ) = 2 1 [ S ( 1 ) ( c ) − S ( 2 ) ( c )] = min ( L 1 , L 2 ) .
The same splitting holds for the projection onto an arbitrary block of T ( X , d X ) T(X,d_X) T ( X , d X ) , which gives the following generalization.
Lemma 7.10. Let ( X , d X ) (X,d_X) ( X , d X ) be a finite metric space, B ∈ B ( X ) B\in\mathcal{B}(X) B ∈ B ( X ) , and x ∈ X 4 \mathbf{x}\in X^4 x ∈ X 4 . If ∣ P B ( x ) ∣ = 4 |P_B(\mathbf{x})|=4 ∣ P B ( x ) ∣ = 4 , then hyp ( x ) = hyp ( P B ( x ) ) \operatorname{hyp}(\mathbf{x})=\operatorname{hyp}(P_B(\mathbf{x})) hyp ( x ) = hyp ( P B ( x )) . Otherwise, hyp ( P B ( x ) ) = 0 \operatorname{hyp}(P_B(\mathbf{x}))=0 hyp ( P B ( x )) = 0 .
Proof. Denote the metric on T ( X , d X ) T(X,d_X) T ( X , d X ) by d T d_T d T ; it restricts to d X d_X d X on X X X by Proposition 7.2 (i). Suppose first that ∣ P B ( x ) ∣ < 4 |P_B(\mathbf{x})|<4 ∣ P B ( x ) ∣ < 4 . Then two entries of P B ( x ) P_B(\mathbf{x}) P B ( x ) coincide, so hyp ( P B ( x ) ) = 0 \operatorname{hyp}(P_B(\mathbf{x}))=0 hyp ( P B ( x )) = 0 (see Example 4.6).
Now suppose ∣ P B ( x ) ∣ = 4 |P_B(\mathbf{x})|=4 ∣ P B ( x ) ∣ = 4 , and write c i : = P B ( x i ) c_i:=P_B(x_i) c i := P B ( x i ) and a i : = d T ( x i , c i ) a_i:=d_T(x_i,c_i) a i := d T ( x i , c i ) . We show that
d X ( x i , x j ) = a i + d T ( c i , c j ) + a j for all i ≠ j . d_X(x_i,x_j)=a_i+d_T(c_i,c_j)+a_j \qquad\text{for all }i\ne j. d X ( x i , x j ) = a i + d T ( c i , c j ) + a j for all i = j .
By Proposition 7.2 (ii), any two points of T ( X , d X ) T(X,d_X) T ( X , d X ) are joined by a geodesic, and such a geodesic passes through every point that separates its endpoints. If x i ∉ B x_i\notin B x i ∈ / B , then c i c_i c i separates x i x_i x i from B B B . It also separates x i x_i x i from x j x_j x j : otherwise x j x_j x j would lie in the same connected component of T ( X , d X ) ∖ { c i } T(X,d_X)\setminus\{c_i\} T ( X , d X ) ∖ { c i } as x i x_i x i , so x j ∉ B x_j\notin B x j ∈ / B and c i c_i c i would separate x j x_j x j from B B B , and uniqueness in the definition of P B P_B P B would give c j = c i c_j=c_i c j = c i . Hence d X ( x i , x j ) = a i + d T ( c i , x j ) d_X(x_i,x_j)=a_i+d_T(c_i,x_j) d X ( x i , x j ) = a i + d T ( c i , x j ) , which holds trivially if x i ∈ B x_i\in B x i ∈ B , since then c i = x i c_i=x_i c i = x i . Similarly, if x j ∉ B x_j\notin B x j ∈ / B , then c j c_j c j separates x j x_j x j from c i ∈ B ∖ { c j } c_i\in B\setminus\{c_j\} c i ∈ B ∖ { c j } , so d T ( c i , x j ) = d T ( c i , c j ) + a j d_T(c_i,x_j)=d_T(c_i,c_j)+a_j d T ( c i , x j ) = d T ( c i , c j ) + a j , which again holds trivially if x j ∈ B x_j\in B x j ∈ B . Consequently, each of the three pair sums of x \mathbf{x} x exceeds the corresponding pair sum of P B ( x ) P_B(\mathbf{x}) P B ( x ) by a 1 + a 2 + a 3 + a 4 a_1+a_2+a_3+a_4 a 1 + a 2 + a 3 + a 4 , and hyp ( x ) = hyp ( P B ( x ) ) \operatorname{hyp}(\mathbf{x})=\operatorname{hyp}(P_B(\mathbf{x})) hyp ( x ) = hyp ( P B ( x )) follows as in the proof of Lemma 7.9 .
Thus projecting onto a block preserves the hyperbolicity deficit whenever four distinct points remain. The next lemma shows that this happens for at most one block.
Lemma 7.11. Let ( X , d X ) (X,d_X) ( X , d X ) be a finite metric space and fix n ≥ 3 n\ge3 n ≥ 3 . For any x ∈ X n \mathbf{x}\in X^n x ∈ X n , there exists at most one B ∈ B ( X ) B\in\mathcal{B}(X) B ∈ B ( X ) such that ∣ P B ( x ) ∣ = n |P_B(\mathbf{x})|=n ∣ P B ( x ) ∣ = n .
Proof. Suppose there exists B 0 ∈ B ( X ) B_0\in\mathcal{B}(X) B 0 ∈ B ( X ) such that ∣ P B 0 ( x ) ∣ = n |P_{B_0}(\mathbf{x})|=n ∣ P B 0 ( x ) ∣ = n . Choose any B ∈ B ( X ) ∖ { B 0 } B\in\mathcal{B}(X)\setminus\{B_0\} B ∈ B ( X ) ∖ { B 0 } , and let c 0 ∈ cut ( X ) ∩ B 0 c_0\in\operatorname{cut}(X)\cap B_0 c 0 ∈ cut ( X ) ∩ B 0 and c ∈ cut ( X ) ∩ B c\in\operatorname{cut}(X)\cap B c ∈ cut ( X ) ∩ B be the cut-vertices that separate B 0 B_0 B 0 and B B B . Note that the unique path in B C ( X ) \mathrm{BC}(X) BC ( X ) from B 0 B_0 B 0 to B B B contains c c c . Each point x i x_i x i corresponds to a node of B C ( X ) \mathrm{BC}(X) BC ( X ) , namely to x i x_i x i itself if it is a cut-vertex and to the unique block containing it otherwise. If P B 0 ( x i ) ≠ c 0 P_{B_0}(x_i)\ne c_0 P B 0 ( x i ) = c 0 , then the path in B C ( X ) \mathrm{BC}(X) BC ( X ) from the node corresponding to x i x_i x i to B 0 B_0 B 0 does not contain c 0 c_0 c 0 . However, concatenating it with the path from B 0 B_0 B 0 to B B B yields a path from the node corresponding to x i x_i x i to B B B that contains c c c . Hence, P B ( x i ) = c P_B(x_i)=c P B ( x i ) = c . Since ∣ P B 0 ( x ) ∣ = n |P_{B_0}(\mathbf{x})|=n ∣ P B 0 ( x ) ∣ = n , there are at least n − 1 ≥ 2 n-1\ge2 n − 1 ≥ 2 points x i x_i x i such that P B 0 ( x i ) ≠ c 0 P_{B_0}(x_i)\ne c_0 P B 0 ( x i ) = c 0 , so by the previous argument, there are at least two x i x_i x i such that P B ( x i ) = c P_B(x_i)=c P B ( x i ) = c . Hence, ∣ P B ( x ) ∣ < n |P_B(\mathbf{x})|<n ∣ P B ( x ) ∣ < n .
The next lemma shows that such a block exists whenever the hyperbolicity deficit is nonzero.
Lemma 7.12. Let ( X , d X ) (X,d_X) ( X , d X ) be a finite metric space and x ∈ X 4 \mathbf{x}\in X^4 x ∈ X 4 . If hyp ( x ) ≠ 0 \operatorname{hyp}(\mathbf{x})\ne0 hyp ( x ) = 0 , then there exists a block B ∈ B ( X ) B\in\mathcal{B}(X) B ∈ B ( X ) such that ∣ P B ( x ) ∣ = 4 |P_B(\mathbf{x})|=4 ∣ P B ( x ) ∣ = 4 .
Proof. Since hyp ( x ) ≠ 0 \operatorname{hyp}(\mathbf{x}) \ne0 hyp ( x ) = 0 , the points x 1 , … , x 4 x_1,\ldots,x_4 x 1 , … , x 4 are pairwise distinct (see Example 4.6), and their tight span T ( x ) T(\mathbf{x}) T ( x ) is as in Figure 3 , with central rectangle B 0 = [ 0 , L 1 ] × [ 0 , L 2 ] B_0=[0,L_1]\times[0,L_2] B 0 = [ 0 , L 1 ] × [ 0 , L 2 ] and edges E i E_i E i from x i x_i x i to the corners c i c_i c i of B 0 B_0 B 0 . By Lemma 7.9 , min ( L 1 , L 2 ) = hyp ( x ) > 0 \min(L_1,L_2)=\operatorname{hyp}(\mathbf{x})>0 min ( L 1 , L 2 ) = hyp ( x ) > 0 , so the corners c i c_i c i are pairwise distinct and the edges E i E_i E i are pairwise disjoint. By Proposition 7.2 (iv), applied to A = { x 1 , x 2 , x 3 , x 4 } A=\{x_1,x_2,x_3,x_4\} A = { x 1 , x 2 , x 3 , x 4 } , there is an isometric embedding T ( x ) ↪ T ( X , d X ) T(\mathbf{x})\hookrightarrow T(X,d_X) T ( x ) ↪ T ( X , d X ) that is compatible with the embeddings of x \mathbf{x} x and X X X , and we identify T ( x ) T(\mathbf{x}) T ( x ) with its image. Removing a single point from the rectangle B 0 B_0 B 0 leaves it connected, so no cut-vertex of T ( X , d X ) T(X,d_X) T ( X , d X ) separates two points of B 0 B_0 B 0 . Hence B 0 B_0 B 0 is contained in a single block B ∈ B ( X ) B\in\mathcal{B}(X) B ∈ B ( X ) .
We claim that P B ( x i ) ∈ E i P_B(x_i)\in E_i P B ( x i ) ∈ E i for every i i i . If x i ∈ B x_i\in B x i ∈ B , then P B ( x i ) = x i ∈ E i P_B(x_i)=x_i\in E_i P B ( x i ) = x i ∈ E i . Otherwise, P B ( x i ) P_B(x_i) P B ( x i ) separates x i x_i x i from B B B . If P B ( x i ) P_B(x_i) P B ( x i ) were not contained in E i E_i E i , then E i E_i E i would be a path in T ( X , d X ) ∖ { P B ( x i ) } T(X,d_X)\setminus\{P_B(x_i)\} T ( X , d X ) ∖ { P B ( x i )} from x i x_i x i to c i ∈ B c_i\in B c i ∈ B , a contradiction. Since the edges E i E_i E i are pairwise disjoint, ∣ P B ( x ) ∣ = 4 \lvert P_B(\mathbf{x})\rvert=4 ∣ P B ( x )∣ = 4 .
It follows that every x ∈ X 4 \mathbf{x}\in X^4 x ∈ X 4 with hyp ( x ) ≠ 0 \operatorname{hyp}(\mathbf{x})\ne0 hyp ( x ) = 0 has a unique block B x ∈ B ( X ) B_{\mathbf{x}}\in\mathcal{B}(X) B x ∈ B ( X ) with ∣ P B x ( x ) ∣ = 4 \lvert P_{B_{\mathbf{x}}}(\mathbf{x})\rvert=4 ∣ P B x ( x )∣ = 4 . We equip each block B ∈ B ( X ) B\in\mathcal{B}(X) B ∈ B ( X ) with the metric inherited from T ( X , d X ) T(X,d_X) T ( X , d X ) and with the measure μ B : = ( P B ) # μ X \mu_B:=(P_B)_\#\mu_X μ B := ( P B ) # μ X , which moves all mass outside B B B onto the cut-vertex where it is attached, and write ν hyp , B : = hyp # ( μ B ⊗ 4 ) \nu_{\operatorname{hyp},B}:=\operatorname{hyp}_\#(\mu_B^{\otimes4}) ν hyp , B := hyp # ( μ B ⊗ 4 ) for the distribution of hyperbolicity deficits of the resulting mm-space. With this, we can state and prove Theorem E.
Theorem 7.13. Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) be a finite mm-space. Then, for every Borel set D ⊂ R D\subset\mathbb{R} D ⊂ R with 0 ∉ D 0\notin D 0 ∈ / D ,
ν hyp , X ( D ) = ∑ B ∈ B ( X ) ν hyp , B ( D ) . \nu_{\operatorname{hyp},X}(D)=\sum_{B\in\mathcal{B}(X)}\nu_{\operatorname{hyp},B}(D). ν hyp , X ( D ) = B ∈ B ( X ) ∑ ν hyp , B ( D ) . Moreover, ν hyp , X ( { 0 } ) = 1 − ∑ B ∈ B ( X ) ν hyp , B ( R ∖ { 0 } ) \nu_{\operatorname{hyp},X}(\{0\})=1-\sum_{B\in\mathcal{B}(X)}\nu_{\operatorname{hyp},B}(\mathbb{R}\setminus\{0\}) ν hyp , X ({ 0 }) = 1 − ∑ B ∈ B ( X ) ν hyp , B ( R ∖ { 0 }) .
Proof. Let D ⊂ R D\subset\mathbb{R} D ⊂ R be a Borel set with 0 ∉ D 0\notin D 0 ∈ / D . Then
ν hyp , X ( D ) = μ X ⊗ 4 ( { x ∈ X 4 ∣ hyp ( x ) ∈ D } ) = ∑ B ∈ B ( X ) μ X ⊗ 4 ( { x ∈ X 4 ∣ hyp ( x ) ∈ D and B x = B } ) = ∑ B ∈ B ( X ) μ X ⊗ 4 ( { x ∈ X 4 ∣ hyp ( P B ( x ) ) ∈ D } ) = ∑ B ∈ B ( X ) ν hyp , B ( D ) , \begin{aligned}
\nu_{\operatorname{hyp},X}(D)
&=\mu_X^{\otimes4}\bigl(\{\mathbf{x}\in X^4\mid\operatorname{hyp}(\mathbf{x})\in D\}\bigr)\\
&=\sum_{B\in\mathcal{B}(X)}\mu_X^{\otimes4}\bigl(\{\mathbf{x}\in X^4\mid\operatorname{hyp}(\mathbf{x})\in D\text{ and }B_{\mathbf{x}}=B\}\bigr)\\
&=\sum_{B\in\mathcal{B}(X)}\mu_X^{\otimes4}\bigl(\{\mathbf{x}\in X^4\mid\operatorname{hyp}(P_B(\mathbf{x}))\in D\}\bigr)\\
&=\sum_{B\in\mathcal{B}(X)}\nu_{\operatorname{hyp},B}(D),
\end{aligned} ν hyp , X ( D ) = μ X ⊗ 4 ( { x ∈ X 4 ∣ hyp ( x ) ∈ D } ) = B ∈ B ( X ) ∑ μ X ⊗ 4 ( { x ∈ X 4 ∣ hyp ( x ) ∈ D and B x = B } ) = B ∈ B ( X ) ∑ μ X ⊗ 4 ( { x ∈ X 4 ∣ hyp ( P B ( x )) ∈ D } ) = B ∈ B ( X ) ∑ ν hyp , B ( D ) ,
where the second equality groups the quadruples x \mathbf{x} x by their unique blocks B x B_{\mathbf{x}} B x , provided by Lemmas 7.11 and 7.12 since 0 ∉ D 0\notin D 0 ∈ / D , and the third follows from Lemma 7.10 for the same reason. The formula for ν hyp , X ( { 0 } ) \nu_{\operatorname{hyp},X}(\{0\}) ν hyp , X ({ 0 }) then follows by normalization.
Corollary 7.14. Let ( X , d X , μ X ) (X,d_X,\mu_X) ( X , d X , μ X ) be a finite mm-space with B ( X ) = { B 0 } ⊔ B I \mathcal{B}(X)=\{B_0\}\sqcup\mathcal{B}_I B ( X ) = { B 0 } ⊔ B I , where every block in B I \mathcal{B}_I B I is isometric to an interval. Then ν hyp , X = ν hyp , B 0 \nu_{\operatorname{hyp},X}=\nu_{\operatorname{hyp},B_0} ν hyp , X = ν hyp , B 0 .
Proof. A block B B B that is isometric to an interval is an R \mathbb{R} R -tree, so every quadruple in B B B has hyperbolicity deficit 0 0 0 (see Example 4.6) and ν hyp , B = δ 0 \nu_{\operatorname{hyp},B}=\delta_0 ν hyp , B = δ 0 . In particular, the blocks in B I \mathcal{B}_I B I contribute nothing to the sum in Theorem 7.13 , and ν hyp , X \nu_{\operatorname{hyp},X} ν hyp , X and ν hyp , B 0 \nu_{\operatorname{hyp},B_0} ν hyp , B 0 therefore agree on every Borel set not containing 0 0 0 , and hence also on { 0 } \{0\} { 0 } , so the two measures coincide.
Remark 7.15. If μ X \mu_X μ X has full support, Dress’s criterion [21 Thm. 8] amounts to the statement that ν hyp , X = δ 0 \nu_{\operatorname{hyp},X}=\delta_0 ν hyp , X = δ 0 if and only if all blocks of T ( X , d X ) T(X,d_X) T ( X , d X ) are intervals, each of which satisfies ν hyp , B = δ 0 \nu_{\operatorname{hyp},B}=\delta_0 ν hyp , B = δ 0 . The block decomposition in Theorem 7.13 captures how ν hyp , X \nu_{\operatorname{hyp},X} ν hyp , X arises from the hyperbolicity distributions of the blocks more generally.
As a consequence of the block decomposition, we also find that ν hyp , X \nu_{\operatorname{hyp},X} ν hyp , X can be estimated block by block: blocks isometric to intervals have ν hyp , B = δ 0 \nu_{\operatorname{hyp},B}=\delta_0 ν hyp , B = δ 0 and can be skipped, and for every other block one estimates ν hyp , B \nu_{\operatorname{hyp},B} ν hyp , B by its empirical distribution as in Corollary 6.5 (with λ = 1 \lambda=1 λ = 1 , see Example 4.6), adds these away from 0, and obtains the atom at 0 by normalization.3 The W 1 W_1 W 1 errors of the blocks add up, so to reach a total W 1 W_1 W 1 error ϵ diam ( X ) \epsilon\operatorname{diam}(X) ϵ diam ( X ) , we may assign to each sampled block B B B the share ϵ diam ( X ) ⋅ diam ( B ) / ∑ B ′ diam ( B ′ ) \epsilon\operatorname{diam}(X)\cdot\operatorname{diam}(B)/\sum_{B'}\operatorname{diam}(B') ϵ diam ( X ) ⋅ diam ( B ) / ∑ B ′ diam ( B ′ ) of this error, where the sum runs over the blocks that are not intervals. Measured in units of the diameter of the respective block, this gives every block the same error ϵ ′ : = ϵ diam ( X ) / ∑ B ′ diam ( B ′ ) \epsilon' := \epsilon\operatorname{diam}(X)/\sum_{B'}\operatorname{diam}(B') ϵ ′ := ϵ diam ( X ) / ∑ B ′ diam ( B ′ ) , so with p = 1 p=1 p = 1 each block requires N λ = 1 ( ϵ ′ ) N_{\lambda=1}(\epsilon') N λ = 1 ( ϵ ′ ) samples instead of the N λ = 1 ( ϵ ) N_{\lambda=1}(\epsilon) N λ = 1 ( ϵ ) samples needed for X X X . Since N λ = 1 N_{\lambda=1} N λ = 1 grows like ϵ − 6 \epsilon^{-6} ϵ − 6 , this pays off when few blocks are not intervals and their diameters add up to much less than diam ( X ) \operatorname{diam}(X) diam ( X ) . In the situation of Corollary 7.14, the number of samples drops by roughly a factor ( diam ( X ) / diam ( B 0 ) ) 6 (\operatorname{diam}(X)/\operatorname{diam}(B_0))^6 ( diam ( X ) / diam ( B 0 ) ) 6 . The cut-vertices of T ( X , d X ) T(X,d_X) T ( X , d X ) that are attached to blocks with nonzero hyperbolicity distribution can be computed from the distance matrix in O ( ∣ X ∣ 3 ) O(|X|^3) O ( ∣ X ∣ 3 ) time [17 ] .
Applications in Hamming geometry and molecular evolution
Molecular evolution studies how the genomes of organisms change over time. Abstractly, genome sequences are words of finite length over the four-character nucleotide alphabet { A , C , G , T } \{A,C,G,T\} { A , C , G , T } . After alignment, distances between them are measured by counting the number of sites at which two sequences differ, commonly called the Hamming distance [33 ] . We refer to the metric space of all possible sequences of a fixed length together with this metric as the Hamming cube . This space provides a natural ambient geometry for the evolution of genomes. The genomes of a population determines a probability measure on the Hamming cube. The shape of this distribution then reflects information about mutation frequency, selection, and interactions between sites. Accordingly, the distributions of n n n -invariants obtained from the observed population can be used to study the evolutionary dynamics of a population.
In Subsection 8.1, we show how the distributions of n n n -invariants on the Hamming cube are determined by the site-wise nucleotide frequencies when sites are independent. We then apply this to the uniform measure (Subsection 8.2) and to single-nucleotide substitution models (Subsection 8.3), which serve as references for the SARS-CoV-2 genome data in Subsection 8.4.
The site-wise structure of Hamming geometry
Let Σ \Sigma Σ be a finite alphabet of cardinality k ≥ 2 k\ge2 k ≥ 2 , equipped with the discrete metric d Σ ( σ , τ ) : = 1 σ ≠ τ d_\Sigma(\sigma,\tau):=\mathbf{1}_{\sigma\ne\tau} d Σ ( σ , τ ) := 1 σ = τ .
Definition 8.1. For L ≥ 1 L\ge1 L ≥ 1 , the Hamming cube of dimension L L L over Σ \Sigma Σ is the L L L -fold product space H ( Σ , L ) : = Σ L H(\Sigma,L):=\Sigma^L H ( Σ , L ) := Σ L equipped with the ℓ 1 \ell^1 ℓ 1 -product metric, called the Hamming metric , given for x , x ′ ∈ H ( Σ , L ) x,x'\in H(\Sigma,L) x , x ′ ∈ H ( Σ , L ) by
d H ( x , x ′ ) : = ∑ m = 1 L d Σ ( x m , x m ′ ) = # { m ∈ { 1 , … , L } ∣ x m ≠ x m ′ } . (7) d_H(x,x'):=\sum_{m=1}^{L}d_\Sigma(x_m,x'_m)=\#\{m\in\{1,\ldots,L\}\mid x_m\ne x'_m\}. \tag*{(7)} d H ( x , x ′ ) := m = 1 ∑ L d Σ ( x m , x m ′ ) = # { m ∈ { 1 , … , L } ∣ x m = x m ′ } . (7)
We often write H H H for H ( Σ , L ) H(\Sigma,L) H ( Σ , L ) when alphabet and length are clear from context. Elements x = ( x m ) m = 1 L ∈ H x=(x_m)_{m=1}^{L}\in H x = ( x m ) m = 1 L ∈ H are called words or sequences , and we denote the projection to the m m m -th character or site of a word by π m : H → Σ \pi_m:H\to\Sigma π m : H → Σ , π m ( x ) : = x m \pi_m(x):=x_m π m ( x ) := x m . For an n n n -tuple of words x = ( x 1 , … , x n ) ∈ H n x=(x_1,\ldots,x_n)\in H^n x = ( x 1 , … , x n ) ∈ H n , we apply this projection componentwise and write π m ( x ) : = ( π m ( x 1 ) , … , π m ( x n ) ) ∈ Σ n \pi_m(x):=(\pi_m(x_1),\ldots,\pi_m(x_n))\in\Sigma^n π m ( x ) := ( π m ( x 1 ) , … , π m ( x n )) ∈ Σ n . Characters of Σ \Sigma Σ are also called alleles , and we say a site m m m is monoallelic , biallelic , or triallelic if the number of distinct alleles occurring in π m ( x ) \pi_m(x) π m ( x ) is exactly 1 1 1 , 2 2 2 , or 3 3 3 , respectively.
Consider a product probability measure μ \mu μ on H H H , and write ρ m : = ( π m ) # μ \rho_m:=(\pi_m)_\#\mu ρ m := ( π m ) # μ for its single-site marginals; the product assumption means that μ \mu μ is the product of these marginals, i.e. μ = ⨂ m = 1 L ρ m \mu=\bigotimes_{m=1}^{L}\rho_m μ = ⨂ m = 1 L ρ m . Under the canonical identification H n = ( Σ L ) n ≅ ( Σ n ) L H^n=(\Sigma^L)^n\cong(\Sigma^n)^L H n = ( Σ L ) n ≅ ( Σ n ) L , we have μ ⊗ n = ⨂ m = 1 L ρ m ⊗ n \mu^{\otimes n}=\bigotimes_{m=1}^{L}\rho_m^{\otimes n} μ ⊗ n = ⨂ m = 1 L ρ m ⊗ n . In other words, drawing n n n independent words from μ \mu μ is equivalent to drawing, independently at each site m m m , an n n n -tuple of characters with distribution ρ m ⊗ n \rho_m^{\otimes n} ρ m ⊗ n . For a probability measure ρ \rho ρ on Σ \Sigma Σ and j ≥ 2 j\ge2 j ≥ 2 , define its j j j -th collision moment by c j ( ρ ) : = ∑ σ ∈ Σ ρ ( σ ) j c_j(\rho):=\sum_{\sigma\in\Sigma}\rho(\sigma)^j c j ( ρ ) := ∑ σ ∈ Σ ρ ( σ ) j . Equivalently, c j ( ρ ) c_j(\rho) c j ( ρ ) is the probability that j j j independent draws from ρ \rho ρ all agree.
A particularly well-behaved class of n n n -invariants consists of those that are given by a sum of single-site contributions.
Definition 8.2. Assume Z Z Z is a commutative monoid with measurable addition. We say a Z Z Z -valued metric n n n -invariant F F F is site-wise additive on the Hamming cube H H H if for every x ∈ H n \mathbf{x} \in H^n x ∈ H n one has
F ( x ) = ∑ m = 1 L F ( π m ( x ) ) . (8) F(\mathbf{x}) = \sum_{m=1}^{L} F(\pi_m(\mathbf{x})). \tag*{(8)} F ( x ) = m = 1 ∑ L F ( π m ( x )) . (8)
For a site-wise additive n n n -invariant F F F , the pushforward measure ν F , μ \nu_{F,\mu} ν F , μ is fully determined by the single-site measures ν F , ρ m \nu_{F,\rho_m} ν F , ρ m . To make this precise, for a commutative monoid Z Z Z with measurable addition and r ≥ 1 r \ge1 r ≥ 1 let sum r : Z r → Z \operatorname{sum}_r: Z^r \to Z sum r : Z r → Z be r r r -fold summation, i.e. the map given by sum r ( z 1 , … , z r ) : = ∑ m = 1 r z m \operatorname{sum}_r(z_1,\ldots,z_r) := \sum_{m=1}^{r} z_m sum r ( z 1 , … , z r ) := ∑ m = 1 r z m . For probability measures ν , λ \nu,\lambda ν , λ on Z Z Z , denote their additive convolution by ν ∗ λ : = ( sum 2 ) # ( ν ⊗ λ ) \nu\ast\lambda:= (\operatorname{sum}_2)_{\#}(\nu\otimes\lambda) ν ∗ λ := ( sum 2 ) # ( ν ⊗ λ ) , or equivalently ( ν ∗ λ ) ( { z } ) = ∑ z 1 + z 2 = z ν ( { z 1 } ) λ ( { z 2 } ) (\nu\ast\lambda)(\{z\}) = \sum_{z_1+z_2=z} \nu(\{z_1\})\lambda(\{z_2\}) ( ν ∗ λ ) ({ z }) = ∑ z 1 + z 2 = z ν ({ z 1 }) λ ({ z 2 }) . We write ν ∗ r : = ( sum r ) # ( ν ⊗ r ) \nu^{\ast r} := (\operatorname{sum}_r)_{\#}(\nu^{\otimes r}) ν ∗ r := ( sum r ) # ( ν ⊗ r ) for the r r r -th power under additive convolution.
Lemma 8.3. Let Z Z Z be a commutative monoid with measurable addition and let F F F be a Z Z Z -valued metric n n n -invariant that is site-wise additive on H H H . Then
ν F , μ = ν F , ρ 1 ∗ ⋯ ∗ ν F , ρ L . (9) \nu_{F,\mu} = \nu_{F,\rho_1} \ast\cdots\ast\nu_{F,\rho_L}. \tag*{(9)} ν F , μ = ν F , ρ 1 ∗ ⋯ ∗ ν F , ρ L . (9) In particular, if ρ m = ρ \rho_m = \rho ρ m = ρ for every m m m , then ν F , μ = ( ν F , ρ ) ∗ L \nu_{F,\mu} = (\nu_{F,\rho})^{\ast L} ν F , μ = ( ν F , ρ ) ∗ L .
Proof. Under H n ≅ ( Σ n ) L H^n \cong(\Sigma^n)^L H n ≅ ( Σ n ) L , the single-site contributions F ∘ π m F \circ\pi_m F ∘ π m are independent and have distributions ν F , ρ m \nu_{F,\rho_m} ν F , ρ m . Since F F F evaluates on H n H^n H n as the sum of single-site contributions, its distribution is the stated convolution. □
The distance map is site-wise additive by definition, so Lemma 8.3 gives the following result.
Proposition 8.4. Let μ = ⨂ m = 1 L ρ m \mu= \bigotimes_{m=1}^{L} \rho_m μ = ⨂ m = 1 L ρ m be a product measure on H H H , and set p m : = 1 − c 2 ( ρ m ) p_m := 1-c_2(\rho_m) p m := 1 − c 2 ( ρ m ) . Then the distance distribution is Poisson–binomial with probability vector ( p 1 , … , p L ) (p_1,\ldots,p_L) ( p 1 , … , p L ) :
ν d i s t , μ = PBin ( p 1 , … , p L ) . (10) \nu_{\mathrm{dist},\mu} = \operatorname{PBin}(p_1,\ldots,p_L). \tag*{(10)} ν dist , μ = PBin ( p 1 , … , p L ) . (10) In particular, if ρ m = ρ \rho_m = \rho ρ m = ρ for every m m m , then p m = p p_m = p p m = p and ν d i s t , μ = Pois ( p ) \nu_{\mathrm{dist},\mu} = \operatorname{Pois}(p) ν dist , μ = Pois ( p ) .
Proof. The probability that two characters disagree is the complement of the second collision moment, i.e. given by p m = 1 − c 2 ( ρ m ) p_m = 1-c_2(\rho_m) p m = 1 − c 2 ( ρ m ) , such that ν d i s t , ρ m = Bern ( p m ) \nu_{\mathrm{dist},\rho_m} = \operatorname{Bern}(p_m) ν dist , ρ m = Bern ( p m ) . By Lemma 8.3 , we have ν d i s t , μ = ν d i s t , ρ 1 ∗ ⋯ ∗ ν d i s t , ρ L = Bern ( p 1 ) ∗ ⋯ ∗ Bern ( p L ) \nu_{\mathrm{dist},\mu} = \nu_{\mathrm{dist},\rho_1} \ast\cdots\ast\nu_{\mathrm{dist},\rho_L} = \operatorname{Bern}(p_1) \ast\cdots\ast\operatorname{Bern}(p_L) ν dist , μ = ν dist , ρ 1 ∗ ⋯ ∗ ν dist , ρ L = Bern ( p 1 ) ∗ ⋯ ∗ Bern ( p L ) , which is exactly the Poisson–binomial distribution PBin ( p 1 , … , p L ) \operatorname{PBin}(p_1,\ldots,p_L) PBin ( p 1 , … , p L ) . □
For the four-point hyperbolicity deficit, recall from Example 4.6 that hyp = gap + ∘ S \operatorname{hyp} = \operatorname{gap}_{+} \circ S hyp = gap + ∘ S , where gap + ( a , b , c ) : = 1 2 ( max { a , b , c } − med { a , b , c } ) \operatorname{gap}_{+}(a,b,c) := \frac{1}{2}(\max\{a,b,c\} - \operatorname{med}\{a,b,c\}) gap + ( a , b , c ) := 2 1 ( max { a , b , c } − med { a , b , c }) extracts the upper gap from triple of pairwise-distance sums S S S :
S ( x ) : = ( s 13 , 24 ( x ) , s 12 , 34 ( x ) , s 14 , 23 ( x ) ) , x ∈ H 4 . (11) S(\mathbf{x}) := (s_{13,24}(\mathbf{x}),s_{12,34}(\mathbf{x}),s_{14,23}(\mathbf{x})), \qquad\mathbf{x} \in H^4. \tag*{(11)} S ( x ) := ( s 13 , 24 ( x ) , s 12 , 34 ( x ) , s 14 , 23 ( x )) , x ∈ H 4 . (11)
According to Proposition 4.4 , the hyperbolicity distribution is given by ν h y p , X = ( gap + ) # ν S , X \nu_{\mathrm{hyp},X} = (\operatorname{gap}_{+})_{\#}\nu_{S,X} ν hyp , X = ( gap + ) # ν S , X . Each component s i j , k ℓ s_{ij,k\ell} s ij , k ℓ of S S S is site-wise additive and hence so is S S S . Using Lemma 8.3 , the distribution of S S S on H 4 H^4 H 4 is thus the convolution of its single-site distributions. Figure 4 shows the nine values S S S can take on a single site. The five displayed patterns admit explicit probabilities in terms of the collision moments, leading to the following result.
Figure 4. Single-site values of the pair-sum map S S S on ( Σ , d Σ ) (\Sigma, d_{\Sigma}) ( Σ , d Σ ) . The components of S S S correspond in order to the sums of the diagonal, horizontal, and vertical edge lengths, as indicated by the upper-right schematics.
Proposition 8.5. Let ρ \rho ρ be a probability measure on Σ \Sigma Σ and write c j = c j ( ρ ) c_j = c_j(\rho) c j = c j ( ρ ) . The induced single-site distribution of S S S is
ν S , ρ = c 4 δ ( 0 , 0 , 0 ) + 4 ( c 3 − c 4 ) δ ( 1 , 1 , 1 ) + ( c 2 2 − c 4 ) ( δ ( 0 , 2 , 2 ) + δ ( 2 , 0 , 2 ) + δ ( 2 , 2 , 0 ) ) + 2 ( c 2 − 2 c 3 + c 4 − c 2 2 ) ( δ ( 1 , 2 , 2 ) + δ ( 2 , 1 , 2 ) + δ ( 2 , 2 , 1 ) ) + ( 1 − 6 c 2 + 3 c 2 2 + 8 c 3 − 6 c 4 ) δ ( 2 , 2 , 2 ) . (12) \begin{aligned}
\nu_{S,\rho} ={}& c_4\delta_{(0,0,0)} + 4(c_3-c_4)\delta_{(1,1,1)} + (c_2^2-c_4)(\delta_{(0,2,2)}+\delta_{(2,0,2)}+\delta_{(2,2,0)}) \\
&+ 2(c_2-2c_3+c_4-c_2^2)(\delta_{(1,2,2)}+\delta_{(2,1,2)}+\delta_{(2,2,1)}) +(1-6c_2+3c_2^2+8c_3-6c_4)\delta_{(2,2,2)}. \tag*{(12)}
\end{aligned} ν S , ρ = c 4 δ ( 0 , 0 , 0 ) + 4 ( c 3 − c 4 ) δ ( 1 , 1 , 1 ) + ( c 2 2 − c 4 ) ( δ ( 0 , 2 , 2 ) + δ ( 2 , 0 , 2 ) + δ ( 2 , 2 , 0 ) ) + 2 ( c 2 − 2 c 3 + c 4 − c 2 2 ) ( δ ( 1 , 2 , 2 ) + δ ( 2 , 1 , 2 ) + δ ( 2 , 2 , 1 ) ) + ( 1 − 6 c 2 + 3 c 2 2 + 8 c 3 − 6 c 4 ) δ ( 2 , 2 , 2 ) . (12)
Proof. The value S = ( 0 , 0 , 0 ) S=(0,0,0) S = ( 0 , 0 , 0 ) occurs when all four characters agree, which happens with probability ∑ σ ρ ( σ ) 4 = c 4 \sum_{\sigma}\rho(\sigma)^4=c_4 ∑ σ ρ ( σ ) 4 = c 4 . S = ( 1 , 1 , 1 ) S=(1,1,1) S = ( 1 , 1 , 1 ) occurs when one character appears three times and another appears once, which has probability
4 ∑ σ ρ ( σ ) 3 ( 1 − ρ ( σ ) ) = 4 ( c 3 − c 4 ) . (13) 4\sum_{\sigma}\rho(\sigma)^3(1-\rho(\sigma))=4(c_3-c_4). \tag*{(13)} 4 σ ∑ ρ ( σ ) 3 ( 1 − ρ ( σ )) = 4 ( c 3 − c 4 ) . (13)
The three arrangements with two pairs of equal characters correspond to S = ( 0 , 2 , 2 ) S=(0,2,2) S = ( 0 , 2 , 2 ) , S = ( 2 , 0 , 2 ) S=(2,0,2) S = ( 2 , 0 , 2 ) , and S = ( 2 , 2 , 0 ) S=(2,2,0) S = ( 2 , 2 , 0 ) , each with probability
∑ σ ≠ τ ρ ( σ ) 2 ρ ( τ ) 2 = c 2 2 − c 4 . (14) \sum_{\sigma\ne\tau}\rho(\sigma)^2\rho(\tau)^2=c_2^2-c_4. \tag*{(14)} σ = τ ∑ ρ ( σ ) 2 ρ ( τ ) 2 = c 2 2 − c 4 . (14)
The three triallelic arrangements have S = ( 1 , 2 , 2 ) S=(1,2,2) S = ( 1 , 2 , 2 ) , S = ( 2 , 1 , 2 ) S=(2,1,2) S = ( 2 , 1 , 2 ) , and S = ( 2 , 2 , 1 ) S=(2,2,1) S = ( 2 , 2 , 1 ) . For each of these, there are two possible positions for the repeated pair, and hence the probability is
2 ∑ σ ρ ( σ ) 2 ∑ τ , ν ≠ σ τ ≠ ν ρ ( τ ) ρ ( ν ) = 2 ∑ σ ρ ( σ ) 2 ( 1 − 2 ρ ( σ ) + 2 ρ ( σ ) 2 − c 2 ) = 2 ( c 2 − 2 c 3 + 2 c 4 − c 2 2 ) . (15) 2\sum_{\sigma}\rho(\sigma)^2\sum_{\substack{\tau,\nu\ne\sigma\\\tau\ne\nu}}\rho(\tau)\rho(\nu)
=2\sum_{\sigma}\rho(\sigma)^2(1-2\rho(\sigma)+2\rho(\sigma)^2-c_2)
=2(c_2-2c_3+2c_4-c_2^2). \tag*{(15)} 2 σ ∑ ρ ( σ ) 2 τ , ν = σ τ = ν ∑ ρ ( τ ) ρ ( ν ) = 2 σ ∑ ρ ( σ ) 2 ( 1 − 2 ρ ( σ ) + 2 ρ ( σ ) 2 − c 2 ) = 2 ( c 2 − 2 c 3 + 2 c 4 − c 2 2 ) . (15)
The remaining probability, corresponding to four distinct characters and hence to S = ( 2 , 2 , 2 ) S=(2,2,2) S = ( 2 , 2 , 2 ) , is obtained by subtracting the probabilities of the preceding cases from 1 1 1 , giving 1 − 6 c 2 + 3 c 2 2 + 8 c 3 − 6 c 4 1-6c_2+3c_2^2+8c_3-6c_4 1 − 6 c 2 + 3 c 2 2 + 8 c 3 − 6 c 4 .
Proposition 8.6. Let μ = ⨂ m = 1 L ρ m \mu=\bigotimes_{m=1}^{L}\rho_m μ = ⨂ m = 1 L ρ m be a product measure on H H H . Then the distribution of hyperbolicity deficits on H 4 H^4 H 4 is
ν h y p , μ = ( gap + ) # ( ν S , ρ 1 ∗ ⋯ ∗ ν S , ρ L ) . (16) \nu_{\mathrm{hyp},\mu}=(\operatorname{gap}_{+})_{\#}\left(\nu_{S,\rho_1}*\cdots*\nu_{S,\rho_L}\right). \tag*{(16)} ν hyp , μ = ( gap + ) # ( ν S , ρ 1 ∗ ⋯ ∗ ν S , ρ L ) . (16)
Proof. By Lemma 8.3 , the distribution of S S S on H 4 H^4 H 4 is the convolution of its single-site distributions. Since h y p = gap + ∘ S \mathrm{hyp}=\operatorname{gap}_{+}\circ S hyp = gap + ∘ S , the result follows from Proposition 4.4 .
While this is not an explicit analytic expression for ν h y p , μ \nu_{\mathrm{hyp},\mu} ν hyp , μ , it provides a method to compute ν h y p , μ \nu_{\mathrm{hyp},\mu} ν hyp , μ from the single-site distributions ν S , ρ m \nu_{S,\rho_m} ν S , ρ m . In practice one can for example use a fast Fourier transform for the convolution step, which makes exact computation feasible for moderately large L L L .
The site-wise decomposition also shows which sites can produce a positive deficit. The single-site patterns ( 0 , 0 , 0 ) (0,0,0) ( 0 , 0 , 0 ) , ( 1 , 1 , 1 ) (1,1,1) ( 1 , 1 , 1 ) , and ( 2 , 2 , 2 ) (2,2,2) ( 2 , 2 , 2 ) add the same amount to all three components of S S S and therefore do not affect h y p \mathrm{hyp} hyp . Each of the remaining patterns, two pairs of equal characters or a triallelic site, favours one of the three ways of grouping the four sequences into two pairs, and hyp ( x ) > 0 \operatorname{hyp}(x)>0 hyp ( x ) > 0 requires sites favouring at least two different groupings. For biallelic sites, this is exactly incompatibility in the sense of the four-gamete test [37 ] . In particular, if the four sequences are related by a tree on which every site mutates at most once, every such site favours the grouping given by the tree, and hyp ( x ) = 0 \operatorname{hyp}(x)=0 hyp ( x ) = 0 . A positive deficit thus requires homoplasy or recombination.
The pushforward along gap + \operatorname{gap}_{+} gap + also reveals that triallelic quadruples are the only single-site patterns for which the three components of S S S do not have the same parity, and hence the only possible source of half-integer hyperbolicity deficits. This motivates the following definition.
Definition 8.7. For a probability measure ρ \rho ρ on Σ \Sigma Σ , define its triallelic accessibility to be the probability of drawing exactly three distinct characters in four independent trials,
θ ( ρ ) : = ρ ⊗ 4 ( { ( τ 1 , … , τ 4 ) ∈ Σ 4 : ∣ { τ 1 , … , τ 4 } ∣ = 3 } ) . (17) \theta(\rho) := \rho^{\otimes4}\left(\left\{(\tau_1,\ldots,\tau_4)\in\Sigma^4:\left|\{\tau_1,\ldots,\tau_4\}\right|=3\right\}\right). \tag*{(17)} θ ( ρ ) := ρ ⊗ 4 ( { ( τ 1 , … , τ 4 ) ∈ Σ 4 : ∣ { τ 1 , … , τ 4 } ∣ = 3 } ) . (17)
By Proposition 8.5, the common coefficient of the three triallelic atoms ( 1 , 2 , 2 ) (1,2,2) ( 1 , 2 , 2 ) , ( 2 , 1 , 2 ) (2,1,2) ( 2 , 1 , 2 ) , and ( 2 , 2 , 1 ) (2,2,1) ( 2 , 2 , 1 ) in the single-site distribution of S S S is θ ( ρ ) / 3 \theta(\rho)/3 θ ( ρ ) /3 .
Proposition 8.8. Let μ = ⨂ m = 1 L ρ m \mu=\bigotimes_{m=1}^{L}\rho_m μ = ⨂ m = 1 L ρ m . Then
ν hyp , μ ( 1 2 + Z ≥ 0 ) ≤ ∑ m = 1 L θ ( ρ m ) . (18) \nu_{\operatorname{hyp},\mu}\left(\frac{1}{2}+\mathbb{Z}_{\geq0}\right)\leq\sum_{m=1}^{L}\theta(\rho_m). \tag*{(18)} ν hyp , μ ( 2 1 + Z ≥ 0 ) ≤ m = 1 ∑ L θ ( ρ m ) . (18) In particular, if every ρ m \rho_m ρ m is supported on at most two characters, then ν hyp , μ ( 1 2 + Z ≥ 0 ) = 0 \nu_{\operatorname{hyp},\mu}\left(\frac{1}{2}+\mathbb{Z}_{\geq0}\right)=0 ν hyp , μ ( 2 1 + Z ≥ 0 ) = 0 .
Proof. Let A ⊂ H 4 A\subset H^4 A ⊂ H 4 be the set of quadruples that are triallelic at some site. By Proposition 8.5, if x ∉ A x\notin A x ∈ / A , then every summand S ( π m ( x ) ) S(\pi_m(x)) S ( π m ( x )) in the site-wise decomposition S ( x ) = ∑ m = 1 L S ( π m ( x ) ) S(x)=\sum_{m=1}^{L}S(\pi_m(x)) S ( x ) = ∑ m = 1 L S ( π m ( x )) is a vector whose components have the same parity. Consequently, the components of S ( x ) S(x) S ( x ) have the same parity and hyp ( x ) ∈ Z ≥ 0 \operatorname{hyp}(x)\in\mathbb{Z}_{\geq0} hyp ( x ) ∈ Z ≥ 0 for every x ∈ H 4 ∖ A x\in H^4\setminus A x ∈ H 4 ∖ A , so hyp − 1 ( 1 2 + Z ≥ 0 ) ⊆ A \operatorname{hyp}^{-1}\left(\frac{1}{2}+\mathbb{Z}_{\geq0}\right)\subseteq A hyp − 1 ( 2 1 + Z ≥ 0 ) ⊆ A . Thus, ν hyp , μ ( 1 2 + Z ≥ 0 ) = μ ⊗ 4 ( hyp − 1 ( 1 2 + Z ≥ 0 ) ) ≤ μ ⊗ 4 ( A ) \nu_{\operatorname{hyp},\mu}\left(\frac{1}{2}+\mathbb{Z}_{\geq0}\right)=\mu^{\otimes4}\left(\operatorname{hyp}^{-1}\left(\frac{1}{2}+\mathbb{Z}_{\geq0}\right)\right)\leq\mu^{\otimes4}(A) ν hyp , μ ( 2 1 + Z ≥ 0 ) = μ ⊗ 4 ( hyp − 1 ( 2 1 + Z ≥ 0 ) ) ≤ μ ⊗ 4 ( A ) . Independence across sites then gives μ ⊗ 4 ( A ) = 1 − ∏ m = 1 L ( 1 − θ ( ρ m ) ) ≤ ∑ m = 1 L θ ( ρ m ) \mu^{\otimes4}(A)=1-\prod_{m=1}^{L}(1-\theta(\rho_m))\leq\sum_{m=1}^{L}\theta(\rho_m) μ ⊗ 4 ( A ) = 1 − ∏ m = 1 L ( 1 − θ ( ρ m )) ≤ ∑ m = 1 L θ ( ρ m ) .
Note that, as a consequence of Proposition 8.8, ν hyp , ρ \nu_{\operatorname{hyp},\rho} ν hyp , ρ and ν hyp , μ \nu_{\operatorname{hyp},\mu} ν hyp , μ are supported on ℓ k Z ≥ 0 \ell_k\mathbb{Z}_{\geq0} ℓ k Z ≥ 0 , with lattice spacing ℓ k = 1 \ell_k=1 ℓ k = 1 when k = 2 k=2 k = 2 and ℓ k = 1 2 \ell_k=\frac{1}{2} ℓ k = 2 1 when k ≥ 3 k\geq3 k ≥ 3 . For the uniform measure, all half-integer bins are accordingly empty for k = 2 k=2 k = 2 (Figure 5 , top row).
Figure 5. Exact and asymptotic distributions of hyperbolicity deficits ν h y p , μ \nu_{\mathrm{hyp},\mu} ν hyp , μ for the uniform measure μ \mu μ on the Hamming cubes H ( Σ , L ) H(\Sigma,L) H ( Σ , L ) for alphabet sizes k = 2 , 4 , 8 k=2,4,8 k = 2 , 4 , 8 (rows), and word lengths L = 2 , 4 , 16 , 64 L=2,4,16,64 L = 2 , 4 , 16 , 64 (columns). Bars give the exact probabilities computed by FFT-based convolution with alternating shades for integer and half-integer values. For k = 2 k=2 k = 2 all half-integer bins are empty. The black curve is the Gaussian approximation in Proposition 8.10 with nodes marking the value on the corresponding support ℓ k Z ≥ 0 \ell_k\mathbb{Z}_{\geq0} ℓ k Z ≥ 0 .
The ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence measure U 4 , 1 V R U^{\mathrm{VR}}_{4,1} U 4 , 1 VR (Example 4.8) can formally be treated in the same way as the hyperbolicity deficit by convolving the single-site distributions of the vector of all six pairwise distances and then applying the persistence map. Unfortunately, persistence does not factor through an intermediate, lower-dimensional n n n -invariant, so this does not admit a more tractable expression. For this reason, we obtain the ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence measures primarily through sampling. It is, however, possible to describe the support of U 4 , 1 V R U^{\mathrm{VR}}_{4,1} U 4 , 1 VR , i.e. to determine the ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence set D 4 , 1 V R D^{\mathrm{VR}}_{4,1} D 4 , 1 VR for the Hamming cube.
Proposition 8.9. The ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence set of the Hamming cube is given by
D 4 , 1 V R ( H ( Z , L ) ) = { ( t b , t d ) ∈ Z 2 : 0 < t b < t d ≤ L and t d ≤ 2 t b } . (19) D^{\mathrm{VR}}_{4,1}(H(\mathbb{Z},L))=\left\{(t_b,t_d)\in\mathbb{Z}^2:0<t_b<t_d\leq L\text{ and }t_d\leq2t_b\right\}. \tag*{(19)} D 4 , 1 VR ( H ( Z , L )) = { ( t b , t d ) ∈ Z 2 : 0 < t b < t d ≤ L and t d ≤ 2 t b } . (19)
Proof.
( ⊆ ) (\subseteq) ( ⊆ ) Since the metric d H d_H d H is integer valued and has diameter L L L , ( t b , t d ) ∈ Z 2 (t_b,t_d)\in\mathbb{Z}^2 ( t b , t d ) ∈ Z 2 and t d ≤ L t_d\leq L t d ≤ L for all ( t b , t d ) ∈ D 4 , 1 V R ( H ( Z , L ) ) (t_b,t_d)\in D^{\mathrm{VR}}_{4,1}(H(\mathbb{Z},L)) ( t b , t d ) ∈ D 4 , 1 VR ( H ( Z , L )) . To show the bound t d ≤ 2 t b t_d\leq2t_b t d ≤ 2 t b , let X = { x 1 , x 2 , x 3 , x 4 } ⊂ H ( Z , L ) X=\{x_1,x_2,x_3,x_4\}\subset H(\mathbb{Z},L) X = { x 1 , x 2 , x 3 , x 4 } ⊂ H ( Z , L ) , and let b b b , c c c , a i a_i a i (with i = 1 , 2 , 3 , 4 i=1,2,3,4 i = 1 , 2 , 3 , 4 ) be the isolation indices of X X X (see Figure 3 ). By [29 ] , Prop. 6.4, Item 3, t d ( X ) − t b ( X ) ≤ min ( b , c ) t_d(X)-t_b(X)\leq\min(b,c) t d ( X ) − t b ( X ) ≤ min ( b , c ) . Note that every d H ( x i , x j ) d_H(x_i,x_j) d H ( x i , x j ) equals a i + a j a_i+a_j a i + a j for either b b b , c c c , or both, so min ( b , c ) ≤ d H ( x i , x j ) \min(b,c)\leq d_H(x_i,x_j) min ( b , c ) ≤ d H ( x i , x j ) for all 1 ≤ i , j ≤ 4 1\leq i,j\leq4 1 ≤ i , j ≤ 4 . In particular, t b ( X ) t_b(X) t b ( X ) equals d H ( x i , x j ) d_H(x_i,x_j) d H ( x i , x j ) for some i i i and j j j , so t d ( X ) − t b ( X ) ≤ min ( b , c ) ≤ t b ( X ) t_d(X)-t_b(X)\leq\min(b,c)\leq t_b(X) t d ( X ) − t b ( X ) ≤ min ( b , c ) ≤ t b ( X ) . Thus, t d ( X ) ≤ 2 t b ( X ) t_d(X)\leq2t_b(X) t d ( X ) ≤ 2 t b ( X ) .
( ⊇ ) (\supseteq) ( ⊇ ) Let ( t b , t d ) ∈ Z 2 (t_b,t_d)\in\mathbb{Z}^2 ( t b , t d ) ∈ Z 2 with 0 < t b < t d ≤ L 0<t_b<t_d\leq L 0 < t b < t d ≤ L and t d ≤ 2 t b t_d\leq2t_b t d ≤ 2 t b . Let σ , τ , ξ ∈ Σ \sigma,\tau,\xi\in\Sigma σ , τ , ξ ∈ Σ , and let x 1 = σ t d ⋅ ξ L − t d x_1=\sigma^{t_d}\cdot\xi^{L-t_d} x 1 = σ t d ⋅ ξ L − t d , x 2 = τ t b σ t d − t b ⋅ ξ L − t d x_2=\tau^{t_b}\sigma^{t_d-t_b}\cdot\xi^{L-t_d} x 2 = τ t b σ t d − t b ⋅ ξ L − t d , x 3 = τ t d ⋅ ξ L − t d x_3=\tau^{t_d}\cdot\xi^{L-t_d} x 3 = τ t d ⋅ ξ L − t d , and x 4 = σ t b τ t d − t b ⋅ ξ L − t d x_4=\sigma^{t_b}\tau^{t_d-t_b}\cdot\xi^{L-t_d} x 4 = σ t b τ t d − t b ⋅ ξ L − t d . Note that all x i x_i x i share the last term ξ L − t d \xi^{L-t_d} ξ L − t d , so the distances d H ( x i , x j ) d_H(x_i,x_j) d H ( x i , x j ) are determined by the σ \sigma σ and τ \tau τ components. In fact, d H ( x 1 , x 2 ) = d H ( x 3 , x 4 ) = t b d_H(x_1,x_2)=d_H(x_3,x_4)=t_b d H ( x 1 , x 2 ) = d H ( x 3 , x 4 ) = t b , d H ( x 2 , x 3 ) = d H ( x 4 , x 1 ) = t d − t b d_H(x_2,x_3)=d_H(x_4,x_1)=t_d-t_b d H ( x 2 , x 3 ) = d H ( x 4 , x 1 ) = t d − t b , and d H ( x 1 , x 3 ) = d H ( x 2 , x 4 ) = t d d_H(x_1,x_3)=d_H(x_2,x_4)=t_d d H ( x 1 , x 3 ) = d H ( x 2 , x 4 ) = t d . Since t b < t d ≤ 2 t b t_b<t_d\leq2t_b t b < t d ≤ 2 t b , we have t d − t b ≤ t b < t d t_d-t_b\leq t_b<t_d t d − t b ≤ t b < t d , so t b ( X ) = d H ( x 1 , x 2 ) = t b t_b(X)=d_H(x_1,x_2)=t_b t b ( X ) = d H ( x 1 , x 2 ) = t b and t d ( X ) = d H ( x 1 , x 3 ) = t d t_d(X)=d_H(x_1,x_3)=t_d t d ( X ) = d H ( x 1 , x 3 ) = t d .
The uniform measure
We now describe the geometric properties of the Hamming cube itself, as seen by the distance distribution, the distribution of hyperbolicity deficits, and the ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence measure. For this, equip Σ \Sigma Σ with the uniform probability measure ρ : = 1 k ∑ a ∈ Σ δ a \rho:=\frac{1}{k}\sum_{a\in\Sigma}\delta_a ρ := k 1 ∑ a ∈ Σ δ a and consider the uniform measure μ : = ρ ⊗ L \mu:=\rho^{\otimes L} μ := ρ ⊗ L on H ( Σ , L ) H(\Sigma,L) H ( Σ , L ) .
The distance distribution on H ( Σ , L ) H(\Sigma,L) H ( Σ , L ) is Bin ( L , k − 1 k ) \operatorname{Bin}\left(L,\frac{k-1}{k}\right) Bin ( L , k k − 1 ) , as follows from Proposition 8.4 .
The distribution of hyperbolicity deficits can be computed from the single-site distribution of the pairwise sums S S S per Proposition 8.6 . For the latter, observe that the collision moments of ρ \rho ρ are given by c j ( ρ ) = k 1 − j c_j(\rho)=k^{1-j} c j ( ρ ) = k 1 − j for j = 2 , 3 , 4 j=2,3,4 j = 2 , 3 , 4 . Substitution into Proposition 8.5 gives the explicit single-site distribution:
ν S , ρ = 1 k 3 δ ( 0 , 0 , 0 ) + 4 ( k − 1 ) k 3 δ ( 1 , 1 , 1 ) + k − 1 k 3 ( δ ( 0 , 2 , 2 ) + δ ( 2 , 0 , 2 ) + δ ( 2 , 2 , 0 ) ) + 2 ( k − 1 ) ( k − 2 ) k 3 ( δ ( 1 , 2 , 2 ) + δ ( 2 , 1 , 2 ) + δ ( 2 , 2 , 1 ) ) + ( k − 1 ) ( k − 2 ) ( k − 3 ) k 3 δ ( 2 , 2 , 2 ) . (20) \nu_{S,\rho}=\frac{1}{k^3}\delta_{(0,0,0)}+\frac{4(k-1)}{k^3}\delta_{(1,1,1)}+\frac{k-1}{k^3}\left(\delta_{(0,2,2)}+\delta_{(2,0,2)}+\delta_{(2,2,0)}\right)\\
+\frac{2(k-1)(k-2)}{k^3}\left(\delta_{(1,2,2)}+\delta_{(2,1,2)}+\delta_{(2,2,1)}\right)+\frac{(k-1)(k-2)(k-3)}{k^3}\delta_{(2,2,2)}. \tag*{(20)} ν S , ρ = k 3 1 δ ( 0 , 0 , 0 ) + k 3 4 ( k − 1 ) δ ( 1 , 1 , 1 ) + k 3 k − 1 ( δ ( 0 , 2 , 2 ) + δ ( 2 , 0 , 2 ) + δ ( 2 , 2 , 0 ) ) + k 3 2 ( k − 1 ) ( k − 2 ) ( δ ( 1 , 2 , 2 ) + δ ( 2 , 1 , 2 ) + δ ( 2 , 2 , 1 ) ) + k 3 ( k − 1 ) ( k − 2 ) ( k − 3 ) δ ( 2 , 2 , 2 ) . (20)
From this, the distribution of hyperbolicity deficits ν h y p , μ \nu_{\mathrm{hyp},\mu} ν hyp , μ can be computed exactly for moderate L L L by convolving L L L copies of ν S , ρ \nu_{S,\rho} ν S , ρ and pushing forward along gap + \operatorname{gap}_+ gap + (Proposition 8.6 ). For the uniform measure, the upcoming proposition gives an asymptotic expression for the distribution of hyperbolicity deficits as L → ∞ L\to\infty L → ∞ . See Figure 5 for a comparison of the exact and asymptotic distributions for various alphabet sizes and word lengths.
Proposition 8.10. Let N μ , σ 2 \mathcal{N}_{\mu,\sigma^2} N μ , σ 2 denote the probability density of the normal distribution with mean μ \mu μ and variance σ 2 \sigma^2 σ 2 , write Φ μ , σ 2 ( r ) : = ∫ − ∞ r N μ , σ 2 ( t ) d t \Phi_{\mu,\sigma^2}(r):=\int_{-\infty}^{r}\mathcal{N}_{\mu,\sigma^2}(t)\,\mathrm{d}t Φ μ , σ 2 ( r ) := ∫ − ∞ r N μ , σ 2 ( t ) d t for its cumulative distribution function, and let Θ \Theta Θ be the
Heaviside function with Θ ( 0 ) : = 1 2 \Theta(0):=\frac{1}{2} Θ ( 0 ) := 2 1 . Let σ k 2 : = 2 ( k − 1 ) k 2 \sigma_k^2:=\frac{2(k-1)}{k^2} σ k 2 := k 2 2 ( k − 1 ) be the variance of the site-wise ν S , ρ \nu_{S,\rho} ν S , ρ . For r ∈ ℓ k Z r\in\ell_k\mathbb{Z} r ∈ ℓ k Z ,
ν h y p , μ ( { r } ) ∼ 6 ℓ k Θ ( r ) N 0 , 1 2 σ k 2 L ( r ) Φ 0 , 3 2 σ k 2 L ( − r ) , ( L → ∞ ) . (21) \nu_{\mathrm{hyp},\mu}(\{r\})\sim6\ell_k\Theta(r)\mathcal{N}_{0,\frac{1}{2}\sigma_k^2L}(r)\Phi_{0,\frac{3}{2}\sigma_k^2L}(-r),\qquad(L\to\infty). \tag*{(21)} ν hyp , μ ({ r }) ∼ 6 ℓ k Θ ( r ) N 0 , 2 1 σ k 2 L ( r ) Φ 0 , 2 3 σ k 2 L ( − r ) , ( L → ∞ ) . (21)
Proof. The preceding convolution and pushforward identities determine ν h y p , μ \nu_{\mathrm{hyp},\mu} ν hyp , μ from the distribution of S S S on Σ 4 \Sigma^4 Σ 4 . The mean of ν S , ρ \nu_{S,\rho} ν S , ρ is μ k = 2 ( k − 1 ) k ( 1 , 1 , 1 ) \mu_k=\frac{2(k-1)}{k}(1,1,1) μ k = k 2 ( k − 1 ) ( 1 , 1 , 1 ) and the covariance matrix has diagonal entries σ k 2 = 2 ( k − 1 ) k 2 \sigma_k^2=\frac{2(k-1)}{k^2} σ k 2 = k 2 2 ( k − 1 ) and is zero otherwise. Standardize the image of S : H 4 → Z 3 S:H^4\to\mathbb{Z}^3 S : H 4 → Z 3 by centring it at L μ k L\mu_k L μ k and rescaling by L σ k \sqrt{L\sigma_k} L σ k . Denote the corresponding affine map A k , L : R 3 → R 3 A_{k,L}:\mathbb{R}^3\to\mathbb{R}^3 A k , L : R 3 → R 3 by A k , L ( z ) : = z − L μ k L σ k A_{k,L}(z):=\frac{z-L\mu_k}{\sqrt{L\sigma_k}} A k , L ( z ) := L σ k z − L μ k . The centred and rescaled distribution of S S S on H H H is then ν ~ S , μ : = ( A k , L ) # ν S , μ \widetilde{\nu}_{S,\mu}:=(A_{k,L})_{\#}\nu_{S,\mu} ν S , μ := ( A k , L ) # ν S , μ .
Since ν S , μ = ν S , ρ ∗ L = ( sum L ) # ( ν S , ρ ⊗ L ) \nu_{S,\mu}=\nu_{S,\rho}^{*L}=(\operatorname{sum}_L)_{\#}(\nu_{S,\rho}^{\otimes L}) ν S , μ = ν S , ρ ∗ L = ( sum L ) # ( ν S , ρ ⊗ L ) by Lemma 8.3, pushing forward along A k , L A_{k,L} A k , L gives exactly the distribution of a centred and rescaled sum of L L L i.i.d. random vectors. Consequently, the multivariate central limit theorem gives ν ~ S , μ ⟶ w N 0 , I 3 \widetilde{\nu}_{S,\mu}\mathrel{\overset{w}{\longrightarrow}}\mathcal{N}_{0,I_3} ν S , μ ⟶ w N 0 , I 3 as L → ∞ L\to\infty L → ∞ [5 Thm. 29.5] , where N 0 , I 3 \mathcal{N}_{0,I_3} N 0 , I 3 denotes the standard normal distribution on R 3 \mathbb{R}^3 R 3 . Since μ k \mu_k μ k lies on the diagonal and gap + \operatorname{gap}_+ gap + is invariant under diagonal translations and homogeneous under positive scalar multiplication, gap + ( A k , L ( z ) ) = gap + ( z ) σ k L \operatorname{gap}_+(A_{k,L}(z))=\frac{\operatorname{gap}_+(z)}{\sigma_k\sqrt{L}} gap + ( A k , L ( z )) = σ k L gap + ( z ) for every z ∈ R 3 z\in\mathbb{R}^3 z ∈ R 3 . The continuous mapping theorem [5 Thm. 29.2] then gives
( gap + ) # ν ~ S , μ ⟶ w ( gap + ) # N 0 , I 3 . (22) (\operatorname{gap}_+)_{\#}\widetilde{\nu}_{S,\mu}\mathrel{\overset{w}{\longrightarrow}}(\operatorname{gap}_+)_{\#}\mathcal{N}_{0,I_3}. \tag*{(22)} ( gap + ) # ν S , μ ⟶ w ( gap + ) # N 0 , I 3 . (22)
Write q ( 1 ) ≥ q ( 2 ) ≥ q ( 3 ) q_{(1)}\ge q_{(2)}\ge q_{(3)} q ( 1 ) ≥ q ( 2 ) ≥ q ( 3 ) for the descending order statistics of the components q 1 , q 2 , q 3 q_1,q_2,q_3 q 1 , q 2 , q 3 under N 0 , I 3 \mathcal{N}_{0,I_3} N 0 , I 3 , such that 2 gap + ( q ) = q ( 1 ) − q ( 2 ) 2\operatorname{gap}_+(q)=q_{(1)}-q_{(2)} 2 gap + ( q ) = q ( 1 ) − q ( 2 ) . The joint density of two order statistics [20 Sec. 2.2, Eq. (2.2.2)] specializes here to
f q ( 1 ) , q ( 2 ) ( u , v ) = 6 Φ 0 , 1 ( v ) N 0 , 1 ( v ) N 0 , 1 ( u ) 1 { v ≤ u } . (23) f_{q_{(1)},q_{(2)}}(u,v)=6\Phi_{0,1}(v)\mathcal{N}_{0,1}(v)\mathcal{N}_{0,1}(u)\mathbf{1}_{\{v\le u\}}. \tag*{(23)} f q ( 1 ) , q ( 2 ) ( u , v ) = 6 Φ 0 , 1 ( v ) N 0 , 1 ( v ) N 0 , 1 ( u ) 1 { v ≤ u } . (23)
The three factors have the following interpretation: N 0 , 1 ( u ) \mathcal{N}_{0,1}(u) N 0 , 1 ( u ) and N 0 , 1 ( v ) \mathcal{N}_{0,1}(v) N 0 , 1 ( v ) are the Gaussian densities of the components that realize the maximum and median, while Φ 0 , 1 ( v ) \Phi_{0,1}(v) Φ 0 , 1 ( v ) is the probability that the minimum lies below v v v , enforcing the ordering constraint v = q ( 2 ) ≥ q ( 3 ) v=q_{(2)}\ge q_{(3)} v = q ( 2 ) ≥ q ( 3 ) . Integrating f q ( 1 ) , q ( 2 ) f_{q_{(1)},q_{(2)}} f q ( 1 ) , q ( 2 ) over v v v with u = v + t u=v+t u = v + t gives the probability density of the spacing t = q ( 1 ) − q ( 2 ) = 2 gap + ( q ) t=q_{(1)}-q_{(2)}=2\operatorname{gap}_+(q) t = q ( 1 ) − q ( 2 ) = 2 gap + ( q ) . Completing the square, we have N 0 , 1 ( v ) N 0 , 1 ( v + t ) = N 0 , 2 ( t ) N − t 2 , 1 2 ( v ) \mathcal{N}_{0,1}(v)\mathcal{N}_{0,1}(v+t)=\mathcal{N}_{0,2}(t)\mathcal{N}_{-\frac{t}{2},\frac{1}{2}}(v) N 0 , 1 ( v ) N 0 , 1 ( v + t ) = N 0 , 2 ( t ) N − 2 t , 2 1 ( v ) . If Y Y Y is a random variable with distribution N − t 2 , 1 2 \mathcal{N}_{-\frac{t}{2},\frac{1}{2}} N − 2 t , 2 1 , then E [ Φ 0 , 1 ( Y ) ] = Φ 0 , 3 2 ( − t 2 ) \mathbb{E}[\Phi_{0,1}(Y)]=\Phi_{0,\frac{3}{2}}\left(-\frac{t}{2}\right) E [ Φ 0 , 1 ( Y )] = Φ 0 , 2 3 ( − 2 t ) . Thus the probability density of q ( 1 ) − q ( 2 ) q_{(1)}-q_{(2)} q ( 1 ) − q ( 2 ) is given by
f q ( 1 ) − q ( 2 ) ( t ) = 6 ∫ − ∞ ∞ Φ 0 , 1 ( v ) N 0 , 1 ( v ) N 0 , 1 ( v + t ) d v = 6 N 0 , 2 ( t ) Φ 0 , 3 2 ( − t 2 ) , t ≥ 0. (24) f_{q_{(1)}-q_{(2)}}(t)=6\int_{-\infty}^{\infty}\Phi_{0,1}(v)\mathcal{N}_{0,1}(v)\mathcal{N}_{0,1}(v+t)\,dv=6\mathcal{N}_{0,2}(t)\Phi_{0,\frac{3}{2}}\left(-\frac{t}{2}\right),\qquad t\ge0. \tag*{(24)} f q ( 1 ) − q ( 2 ) ( t ) = 6 ∫ − ∞ ∞ Φ 0 , 1 ( v ) N 0 , 1 ( v ) N 0 , 1 ( v + t ) d v = 6 N 0 , 2 ( t ) Φ 0 , 2 3 ( − 2 t ) , t ≥ 0. (24)
The scaled variable gap + ( S ) / ( σ k L ) \operatorname{gap}_+(S)/(\sigma_k\sqrt{L}) gap + ( S ) / ( σ k L ) takes values in the lattice ℓ k σ k L Z ≥ 0 \frac{\ell_k}{\sigma_k\sqrt{L}}\mathbb{Z}_{\ge0} σ k L ℓ k Z ≥ 0 . The limiting variable is gap + ( q ) \operatorname{gap}_+(q) gap + ( q ) with q ∼ N 0 , I 3 q\sim\mathcal{N}_{0,I_3} q ∼ N 0 , I 3 , and since q ( 1 ) − q ( 2 ) = 2 gap + ( q ) q_{(1)}-q_{(2)}=2\operatorname{gap}_+(q) q ( 1 ) − q ( 2 ) = 2 gap + ( q ) its density is given by 2 f q ( 1 ) − q ( 2 ) ( 2 w ) 2f_{q_{(1)}-q_{(2)}}(2w) 2 f q ( 1 ) − q ( 2 ) ( 2 w ) for w ≥ 0 w\ge0 w ≥ 0 . The leading term in the multivariate lattice local expansion [9 Thm. 22.1] , applied to the sum distribution of S S S and summed over the lattice fibres of gap + \operatorname{gap}_+ gap + , gives the corresponding local approximation for the pushforward: its mass at a lattice point is the limiting density at the corresponding scaled value times the scaled lattice spacing. Thus, for r ∈ ℓ k Z ≥ 0 r\in\ell_k\mathbb{Z}_{\ge0} r ∈ ℓ k Z ≥ 0 ,
ν h y p , μ ( { r } ) ∼ Θ ( r ) ℓ k σ k L 2 f q ( 1 ) − q ( 2 ) ( 2 r σ k L ) , ( L → ∞ ) . (25) \nu_{\mathrm{hyp},\mu}(\{r\})\sim\Theta(r)\frac{\ell_k}{\sigma_k\sqrt{L}}\,2f_{q_{(1)}-q_{(2)}}\left(\frac{2r}{\sigma_k\sqrt{L}}\right),\qquad(L\to\infty). \tag*{(25)} ν hyp , μ ({ r }) ∼ Θ ( r ) σ k L ℓ k 2 f q ( 1 ) − q ( 2 ) ( σ k L 2 r ) , ( L → ∞ ) . (25)
The Heaviside factor Θ ( 0 ) = 1 2 \Theta(0)=\frac{1}{2} Θ ( 0 ) = 2 1 arises from the half cell at the boundary point r = 0 r=0 r = 0 . Using the standard scaling identities a − 1 N 0 , σ 2 ( x / a ) = N 0 , a 2 σ 2 ( x ) a^{-1}\mathcal{N}_{0,\sigma^2}(x/a)=\mathcal{N}_{0,a^2\sigma^2}(x) a − 1 N 0 , σ 2 ( x / a ) = N 0 , a 2 σ 2 ( x ) and Φ 0 , σ 2 ( x / a ) = Φ 0 , a 2 σ 2 ( x ) \Phi_{0,\sigma^2}(x/a)=\Phi_{0,a^2\sigma^2}(x) Φ 0 , σ 2 ( x / a ) = Φ 0 , a 2 σ 2 ( x ) , gives
2 ℓ k σ k L f q ( 1 ) − q ( 2 ) ( 2 r σ k L ) = 6 ℓ k N 0 , 1 2 σ k 2 L ( r ) Φ 0 , 3 2 σ k 2 L ( − r ) . (26) \frac{2\ell_k}{\sigma_k\sqrt{L}}f_{q_{(1)}-q_{(2)}}\left(\frac{2r}{\sigma_k\sqrt{L}}\right)=6\ell_k\mathcal{N}_{0,\frac{1}{2}\sigma_k^2L}(r)\Phi_{0,\frac{3}{2}\sigma_k^2L}(-r). \tag*{(26)} σ k L 2 ℓ k f q ( 1 ) − q ( 2 ) ( σ k L 2 r ) = 6 ℓ k N 0 , 2 1 σ k 2 L ( r ) Φ 0 , 2 3 σ k 2 L ( − r ) . (26)
which yields the stated formula.
Single-nucleotide substitution models
We now consider probability measures on H H H derived from models for evolutionary dynamics. Let μ t \mu_t μ t denote the probability distribution of genomes for some organism at time t t t . A substitution model describes the evolution of μ t \mu_t μ t as a continuous-time Markov chain on H H H : individual genomes undergo random nucleotide substitutions , i.e. transitions x → x ′ x \to x' x → x ′ based on substituting nucleotides to obtain x ′ x' x ′ from x x x . The distribution μ t \mu_t μ t thus evolves according to the Kolmogorov forward equation
d d t μ t = μ t Q , (27) \frac{d}{dt}\mu_t = \mu_t Q, \tag*{(27)} d t d μ t = μ t Q , (27)
with generator Q Q Q . The off-diagonal entry Q x x ′ ≥ 0 Q_{xx'} \ge0 Q x x ′ ≥ 0 is the rate at which a genome of type x x x is replaced by one of type x ′ x' x ′ , while the diagonal entry Q x x = − ∑ x ′ ≠ x Q x x ′ Q_{xx} = -\sum_{x'\ne x} Q_{xx'} Q xx = − ∑ x ′ = x Q x x ′ is chosen such that each row sums to zero, which ensures that μ t \mu_t μ t remains a probability measure for all t ≥ 0 t \ge0 t ≥ 0 . In general, Q Q Q may couple substitution rates at different sites, encoding epistatic interactions, where the rate of substitution at site m m m depends on the presence of a certain allele at site m ′ m' m ′ .
We restrict ourselves to single-nucleotide substitution models , where each substitution changes exactly one nucleotide, independently from all other sites. In this case, the generator Q Q Q is given by
Q = ∑ m = 1 L I ⊗ ( m − 1 ) ⊗ Q ( m ) ⊗ I ⊗ ( L − m ) , (28) Q = \sum_{m=1}^{L} I^{\otimes(m-1)} \otimes Q^{(m)} \otimes I^{\otimes(L-m)}, \tag*{(28)} Q = m = 1 ∑ L I ⊗ ( m − 1 ) ⊗ Q ( m ) ⊗ I ⊗ ( L − m ) , (28)
where I I I denotes the k × k k \times k k × k identity matrix and each Q ( m ) Q^{(m)} Q ( m ) is a k × k k \times k k × k single-site generator encoding nucleotide substitutions at site m m m . In this case one can show that, if the initial distribution is a product measure μ 0 = ⨂ m = 1 L ρ m , 0 \mu_0 = \bigotimes_{m=1}^{L}\rho_{m,0} μ 0 = ⨂ m = 1 L ρ m , 0 , then the distribution remains a product measure μ t = ⨂ m = 1 L ρ m , t \mu_t = \bigotimes_{m=1}^{L}\rho_{m,t} μ t = ⨂ m = 1 L ρ m , t , where ρ m , t : = ρ m , 0 exp ( t Q ( m ) ) \rho_{m,t} := \rho_{m,0}\exp\left(tQ^{(m)}\right) ρ m , t := ρ m , 0 exp ( t Q ( m ) ) .
One of the simplest examples for such models is the Jukes–Cantor (JC) model , where all nucleotide substitutions occur at the same rate, i.e. the single-site generator is given by
Q σ τ ( m ) = 1 k − 1 , σ ≠ τ , (29) Q_{\sigma\tau}^{(m)} = \frac{1}{k-1}, \qquad\sigma\ne\tau, \tag*{(29)} Q σ τ ( m ) = k − 1 1 , σ = τ , (29)
and diagonal entries are determined by the condition that rows sum to zero, so that each state has total exit rate 1 1 1 and, correspondingly, t t t corresponds to the number of expected substitutions per site.
Another important example is the Halpern–Bruno (HB) model , in which a site-independent baseline mutation process is modulated by site-specific fitness effects to obtain the substitution rates [34 ] . Let B B B be a matrix of transition rates on Σ \Sigma Σ , and let ϕ ( m ) : Σ → R \phi^{(m)}:\Sigma\to\mathbb{R} ϕ ( m ) : Σ → R be a function that associates a fitness value to each allele at site m m m . The HB single-site generator at site m m m has off-diagonal entries
Q σ τ ( m ) = B σ τ ϕ ( m ) ( τ ) − ϕ ( m ) ( σ ) 1 − exp ( − ( ϕ ( m ) ( τ ) − ϕ ( m ) ( σ ) ) ) , σ ≠ τ , (30) Q_{\sigma\tau}^{(m)} = B_{\sigma\tau}\frac{\phi^{(m)}(\tau)-\phi^{(m)}(\sigma)}{1-\exp\left(-(\phi^{(m)}(\tau)-\phi^{(m)}(\sigma))\right)}, \qquad\sigma\ne\tau, \tag*{(30)} Q σ τ ( m ) = B σ τ 1 − exp ( − ( ϕ ( m ) ( τ ) − ϕ ( m ) ( σ )) ) ϕ ( m ) ( τ ) − ϕ ( m ) ( σ ) , σ = τ , (30)
and diagonal entries are determined by the condition that rows sum to zero. The matrix B B B encodes the baseline substitution rates independent of evolutionary selection, reflecting for instance biochemical frequencies. The fitness factor then makes substitutions towards higher-fitness alleles faster and substitutions towards lower-fitness alleles slower.
The JC and HB models differ in their long-time behaviour. As t → ∞ t \to\infty t → ∞ the JC model approaches the uniform distribution of Subsection 8.2. The homogeneous HB model with symmetric JC baseline matrix B B B and finite fitness values instead approaches a stationary Boltzmann distribution ρ ϕ ( σ ) ∝ exp ( ϕ ( σ ) ) \rho_\phi(\sigma) \propto\exp(\phi(\sigma)) ρ ϕ ( σ ) ∝ exp ( ϕ ( σ )) with distance distribution Bin ( L , 1 − c 2 ( ρ ϕ ) ) \operatorname{Bin}(L,1-c_2(\rho_\phi)) Bin ( L , 1 − c 2 ( ρ ϕ )) , recovering the uniform baseline only when ϕ \phi ϕ is constant.
The distance distribution, the distribution of hyperbolicity deficits, and the ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence measure of the JC and HB models are determined as discussed in Proposition 8.4 , Proposition 8.6 , and around Proposition 8.9 , respectively. In particular, since the single-site generators of both models are irreducible,
μ t = ⨂ m = 1 L ρ m , t \mu_t = \bigotimes_{m=1}^{L}\rho_{m,t} μ t = ⨂ m = 1 L ρ m , t is fully supported for every t > 0 t > 0 t > 0 , so the sampling results of § 6 apply. See Figure 6 for a comparison of the JC model and the homogeneous HB model with JC baseline matrix and the biallelic-favouring fitness profile ϕ = ( 0 , 0 , − 10 , − 10 ) \phi= (0, 0, -10, -10) ϕ = ( 0 , 0 , − 10 , − 10 ) at every site (for more details, see Appendix § 12 ).
Figure 6. Metric n n n -point invariants of single-nucleotide substitution models with alphabet size k = 4 k = 4 k = 4 and sequence length L = 100 L = 100 L = 100 . The top row shows the JC model and the bottom row shows a homogeneous HB model with JC baseline matrix and fitness profile ϕ = ( 0 , 0 , − 10 , − 10 ) \phi= (0, 0, -10, -10) ϕ = ( 0 , 0 , − 10 , − 10 ) . Columns show a sampled metric-MDS visualization, the pairwise Hamming-distance distribution, the four-point hyperbolicity deficit distribution, and the ( 4 , 1 ) (4, 1) ( 4 , 1 ) -persistence measure in a birth–persistence plot at times t = 0.05 , 0.1 , 0.5 , 1.0 , ∞ t = 0.05, 0.1, 0.5, 1.0, \infty t = 0.05 , 0.1 , 0.5 , 1.0 , ∞ . The distance distribution and the distribution of hyperbolicity deficits are exact, while the persistence measures are estimated from N ≈ 10 8 N \approx10^{8} N ≈ 1 0 8 independent quadruples, as determined by Corollary 6.3 for error ϵ = 0.1 \epsilon= 0.1 ϵ = 0.1 and per-distribution confidence α = 0.995 \alpha= 0.995 α = 0.995 (providing 0.95 simultaneous confidence across the ten distributions). In the ( 4 , 1 ) (4, 1) ( 4 , 1 ) -persistence diagrams, points mark observed nonzero birth–persistence classes and shaded regions correspond to Gaussian-smoothed highest-density regions containing 95%, 80%, and 50% of the nonzero ( 4 , 1 ) (4, 1) ( 4 , 1 ) -persistence mass. The grey region is excluded by the support bounds in Hamming geometry reported in Proposition 8.9 .
The distance distribution depends on the fitness only through the collision moments c 2 ( ρ m , t ) c_2(\rho_{m,t}) c 2 ( ρ m , t ) : it records how variable each site is, but does not distinguish two fit alleles from several fit alleles with the same collision probability. Both models are homogeneous, so their distance distributions (Figure 6 , second column) are binomial at all times and differ only in the mismatch probability 1 − c 2 ( ρ t ) 1 - c_2(\rho_t) 1 − c 2 ( ρ t ) . In the stationary limit t = ∞ t = \infty t = ∞ , the biallelic-favouring profile ϕ \phi ϕ gives c 2 ( ρ ϕ ) ≈ 1 2 c_2(\rho_\phi) \approx\frac{1}{2} c 2 ( ρ ϕ ) ≈ 2 1 , so the distance distribution of the HB model is centred near L / 2 L/2 L /2 rather than near 3 4 L \frac{3}{4}L 4 3 L as for the JC model. In contrast, the distribution of hyperbolicity deficits (Figure 6 , third column) depends on all three collision moments c 2 ( ρ m , t ) c_2(\rho_{m,t}) c 2 ( ρ m , t ) , c 3 ( ρ m , t ) c_3(\rho_{m,t}) c 3 ( ρ m , t ) , and c 4 ( ρ m , t ) c_4(\rho_{m,t}) c 4 ( ρ m , t ) , and hence is sensitive to the fitness distributions at each site. For example, by Proposition 8.8 its half-integer part is bounded by the total triallelic accessibility ∑ m = 1 L θ ( ρ m , t ) \sum_{m=1}^{L}\theta(\rho_{m,t}) ∑ m = 1 L θ ( ρ m , t ) , which suppresses half-integer hyperbolicity deficits. For the HB model, whose fitness profile favours two alleles, this produces a sawtooth pattern in which the half-integer bars lie well below the neighbouring integer bars, whereas for the JC model integer and half-integer values follow a single smooth profile.
SARS-CoV-2 sequence data
We now turn from theoretical substitution models to real-world data of SARS-CoV-2 genome sequences collected during the COVID-19 pandemic between December 2019 and January 2024 and shared via GISAID, the global data science initiative [23 ] (see Appendix § 13 ). The ambient metric space is the Hamming cube H ( Σ , L ) H(\Sigma,L) H ( Σ , L ) over the alphabet Σ = { A , C , G , T } \Sigma= \{A,C,G,T\} Σ = { A , C , G , T } (k = 4 k = 4 k = 4 ) of length L = 28,207 L = 28{,}207 L = 28 , 207 . The filtered whole-genome alignment consists of 5,000,450 dated sequences, forming a fixed subset X ⊂ H X \subset H X ⊂ H of ∣ X ∣ = 2,722,574 |X| = 2{,}722{,}574 ∣ X ∣ = 2 , 722 , 574 distinct haplotypes. Their full distance matrix would have about 3.7 × 10 12 3.7 \times10^{12} 3.7 × 1 0 12 entries and occupy more than 7 terabytes even at two bytes per entry, so all distances we evaluate lie within the sampled tuples. Of the L = 28,207 L = 28{,}207 L = 28 , 207 sites, 27,181 are polymorphic across X X X , the remaining sites are constant and do not contribute to the Hamming distance between sequences in X X X .
Using the collection dates of the sequences, we can construct a time series of measures over X X X . Writing c ≤ t ( x ) c_{\leq t}(x) c ≤ t ( x ) for the number of records of haplotype x x x collected on or before a cutoff time t t t and R ( t ) : = ∑ x ∈ X c ≤ t ( x ) R(t) := \sum_{x \in X} c_{\leq t}(x) R ( t ) := ∑ x ∈ X c ≤ t ( x ) for the total number of sequences collected by time t t t ,
μ ≤ t S A R S : = 1 R ( t ) ∑ x ∈ X c ≤ t ( x ) δ x . (31) \mu^{\mathrm{SARS}}_{\leq t} := \frac{1}{R(t)} \sum_{x \in X} c_{\leq t}(x)\,\delta_x. \tag*{(31)} μ ≤ t SARS := R ( t ) 1 x ∈ X ∑ c ≤ t ( x ) δ x . (31)
We use five collection-date cutoffs, corresponding to five phases of the COVID-19 pandemic: 30 June 2020 (early outbreak, pre Variant of Concern), 30 April 2021 (Alpha-dominant with Beta and Gamma cocirculating, pre-Delta), 31 October 2021 (Delta-dominated, pre-Omicron), 1 March 2022 (the Omicron BA.1/BA.2 wave, pre-recombinant), and 31 January 2024 (the Omicron-recombinant and XBB era, the full dataset).
The measure μ ≤ t S A R S \mu^{\mathrm{SARS}}_{\leq t} μ ≤ t SARS at each collection-date cutoff is a frequency-weighted cumulative sample of the observed SARS-CoV-2 sequences, rather than an instantaneous distribution at time t t t . If μ t S A R S \mu^{\mathrm{SARS}}_t μ t SARS denotes an idealized instantaneous distribution and λ ( t ) \lambda(t) λ ( t ) the sampling intensity at time t t t , then its population-level cumulative counterpart would correspond to the weighted average μ ≤ t S A R S = 1 Λ ( t ) ∫ 0 t λ ( s ) μ s S A R S d s \mu^{\mathrm{SARS}}_{\leq t} = \frac{1}{\Lambda(t)} \int_0^t \lambda(s)\mu^{\mathrm{SARS}}_s\,\mathrm{d}s μ ≤ t SARS = Λ ( t ) 1 ∫ 0 t λ ( s ) μ s SARS d s , where Λ ( t ) : = ∫ 0 t λ ( s ) d s \Lambda(t) := \int_0^t \lambda(s)\,\mathrm{d}s Λ ( t ) := ∫ 0 t λ ( s ) d s is the total number of samples collected by time t t t .
At each collection-date cutoff t t t , we estimate the curvature measure μ 4 \mu_4 μ 4 of ( X , d H , μ ≤ t S A R S ) (X,d_H,\mu^{\mathrm{SARS}}_{\leq t}) ( X , d H , μ ≤ t SARS ) from a single i.i.d. sample of N ≈ 5.3 × 10 7 N \approx5.3 \times10^7 N ≈ 5.3 × 1 0 7 quadruples and compute all three distributions from it. The hyperbolicity deficit and the ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence are evaluated on each quadruple directly, while for the distance we use that the restriction π 12 : K 4 → K 2 \pi_{12}: K_4 \to K_2 π 12 : K 4 → K 2 to the first two points is 1-Lipschitz and pushes μ 4 \mu_4 μ 4 forward to μ 2 \mu_2 μ 2 , so by Proposition 4.4 the 4-invariant dist ∘ π 12 \operatorname{dist} \circ\pi_{12} dist ∘ π 12 has distribution ν d i s t \nu_{\mathrm{dist}} ν dist . By Corollary 6.3 with ϵ = 0.1 \epsilon= 0.1 ϵ = 0.1 and confidence 1 − 0.05 / 15 1-0.05/15 1 − 0.05/15 , the sample size ensures W 1 ( μ ^ 4 , N , μ 4 ) ≤ 0.1 diam ( X ) W_1(\hat{\mu}_{4,N},\mu_4) \leq0.1\operatorname{diam}(X) W 1 ( μ ^ 4 , N , μ 4 ) ≤ 0.1 diam ( X ) and hence, by Remark 6.4, W 1 ( ν ^ F , N , ν F ) ≤ 0.1 Lip ( F ) diam ( X ) W_1(\hat{\nu}_{F,N},\nu_F) \leq0.1\operatorname{Lip}(F)\operatorname{diam}(X) W 1 ( ν ^ F , N , ν F ) ≤ 0.1 Lip ( F ) diam ( X ) for every Lipschitz 4-invariant F F F evaluated on the same sample. The ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence is 1-Lipschitz (Proposition 4.9), which gives accuracy 0.1 diam ( X ) 0.1\operatorname{diam}(X) 0.1 diam ( X ) for U 4 , 1 V R U^{\mathrm{VR}}_{4,1} U 4 , 1 VR . The hyperbolicity deficit and the distance are real-valued with range of diameter at most diam ( X ) \operatorname{diam}(X) diam ( X ) (see Example 4.6), so at the same sample size and confidence, Proposition 6.6 shows that ν h y p \nu_{\mathrm{hyp}} ν hyp and ν d i s t \nu_{\mathrm{dist}} ν dist are estimated much more accurately than μ 4 \mu_4 μ 4 , to within 5.6 × 10 − 4 diam ( X ) 5.6 \times10^{-4}\operatorname{diam}(X) 5.6 × 1 0 − 4 diam ( X ) . The confidence 1 − 0.05 / 15 1-0.05/15 1 − 0.05/15 is chosen so that, using the standard union bound, we obtain an overall confidence of 0.95 in these accuracies of the three distributions over the five cutoffs. Figure 7 shows the resulting distributions, with one row per cutoff from the earliest (top) to the full dataset (bottom).
Figure 7. Geometry of the cumulative SARS-CoV-2 data, one row per collection-date cutoff, earliest at the top. The leftmost panel shows a 2D metric-MDS embedding of a subsample of 50,000 sequences from the full alignment. The remaining columns show the distributions of the pairwise distance ν d i s t \nu_{\mathrm{dist}} ν dist , the four-point hyperbolicity deficit ν h y p \nu_{\mathrm{hyp}} ν hyp , and the ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence measure U 4 , 1 V R U^{\mathrm{VR}}_{4,1} U 4 , 1 VR . In the ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence panels, contours enclose 95%, 80%, and 50% of the Gaussian-smoothed nonzero mass, while the shaded region is excluded by the ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence set of the ambient Hamming cube (Proposition 8.9 ). The empirical curvature measures μ ^ 4 , N \hat{\mu}_{4,N} μ ^ 4 , N are obtained with the sample size N N N required by Corollary 6.3 at accuracy ϵ = 0.1 \epsilon= 0.1 ϵ = 0.1 and a combined confidence of 0.95 across the five cutoffs, and the distributions of the three n n n -invariants are computed from them.
Pairwise distance. The mean of the mismatch distribution ν d i s t \nu_{\mathrm{dist}} ν dist (Figure 7 , second column), and with it the nucleotide diversity of μ ≤ t S A R S \mu^{\mathrm{SARS}}_{\leq t} μ ≤ t SARS , grows monotonically across the five cutoffs, from 10 substitutions at 30 June 2020 to 62 at the full dataset. The variance grows faster than the mean, the variance-to-mean ratio rising from 2.7 to 14. The distribution is multimodal, with additional prominent modes appearing in each successive cutoff. A thin tail of large distances, visible as small isolated bumps on the right, persists at every cutoff (sampled maximum 989), but its mass remains below 30 parts per million (ppm) at all five cutoffs.
Four-point hyperbolicity deficit. The hyperbolicity deficits (Figure 7 , third column) vanish on the majority of sampled quadruples throughout the pandemic, with probability P ( h y p = 0 ) \mathbb{P}(\mathrm{hyp}=0) P ( hyp = 0 ) falling over time from 98% to 55%. The mean deficit grows from 0.015 to 0.60, and the sampled maximum from 4 at the first cutoff to 24 at the fourth, providing a lower bound of hyp ( X ) ≥ 24 \operatorname{hyp}(X) \geq24 hyp ( X ) ≥ 24 for the Gromov hyperbolicity of the full dataset. Half-integer hyperbolicity deficits remain suppressed throughout, visible as the lower bars of the alternating pattern, and grow from 0.2% to 20% of the total mass across the cutoff dates, still significantly below the uniform Hamming cube reference of 50%.
(4,1)-persistence. The (4,1)-persistence measure U 4 , 1 V R U^{\mathrm{VR}}_{4,1} U 4 , 1 VR (Figure 7 , fourth column) is close to trivial: the nonzero mass ranges only from 68 to 310 ppm across the five cutoffs. Among the nonzero (4,1)-persistence classes, the proportion with lifetime 1 ranges from 77% to 94% across the cutoffs, and the sampled maximum lifetime is 15. Their births concentrate near the modes of ν d i s t \nu_{\mathrm{dist}} ν dist , drifting upward across the cutoffs from around 9 at the first to around 84 at the last.
Discussion. The three distributions resolve increasingly specific features of the data: the distance distribution records how far apart genomes lie, the hyperbolicity deficit how often four genomes fail to fit on a tree, and ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence the rarer case in which such a failure produces a cycle. A single expanding population would produce a smooth unimodal wave [54 ] , whereas here the pairwise-distance distribution becomes increasingly multimodal. Its upward drift and multimodality are consistent with the accumulation of genetically separated lineage clusters in the cumulative measures μ ≤ t S A R S \mu_{\leq t}^{\mathrm{SARS}} μ ≤ t SARS , which also appear as separated groups in the metric-MDS embedding (Figure 7 , first column). Against this background, the increase of P ( h y p > 0 ) \mathbb{P}(\mathrm{hyp}>0) P ( hyp > 0 ) from about 2% at the beginning of the pandemic to 45% at its end shows that non-tree-like four-point configurations become common as these clusters accumulate, whereas only 68–310 ppm of quadruples have nontrivial ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence. Thus, most violations of the four-point condition do not give rise to nontrivial ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence. A positive deficit requires homoplasy or recombination (Subsection 8.1), and a single mutation shared by one genome from each of two lineage clusters can already produce one. The rise of P ( h y p > 0 ) \mathbb{P}(\mathrm{hyp}>0) P ( hyp > 0 ) is thus in line with the many documented recurrences of mutations across lineages in SARS-CoV-2 [61 MWT+21] . The suppression of half-integer deficits provides additional sitewise information: by Proposition 8.8 , such a deficit can occur only if the sampled quartet is triallelic at some site. Because their frequency remains below the uniform Hamming-cube reference, their suppression points to constrained triallelic accessibility, consistent with the strongly biased SARS-CoV-2 mutation spectrum [58 , 19 ] .
The nontrivial ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence classes provide a more specific repeated-state signature. By Example 4.8, such a class occurs when the four genomes can be cyclically ordered so that each adjacent pair agrees at more variable sites than either opposite pair; its birth is the longest cycle-edge distance and its death the shorter diagonal distance. The concentration of birth times near the modes of the mismatch distribution therefore places these cycles at characteristic separations of the main lineage clusters, and their drift from around 9 to around 84 tracks the increasing separation of those clusters. The simplest way to obtain such a cycle across two lineage clusters is a single site at which one genome from each cluster carries the same nucleotide and the other two do not, i.e. the same SNV arising independently in both lineages; any class produced this way has lifetime exactly 1. The predominance of lifetime-1 classes thus shows the between-lineage counterpart of the short-lived, within-lineage classes that were used to detect recurrent mutations in SARS-CoV-2 and shown to correlate with adaptation [BHN+21], in agreement with phylogenetic evidence of recurrent mutation [61 MWT+21] . Since the classes found at later cutoffs are born at larger scales, they involve the later, more separated lineage clusters, so such recurrences are not confined to the early pandemic. The still rarer classes with longer lifetimes record a larger separation between cycle-edge and diagonal scales and reflect more complex repeated-state patterns, including multisite convergence and recombination; both within- and between-lineage recombination have been documented in SARS-CoV-2, albeit at a low recombination-to-mutation ratio [60 ] .
Acknowledgements
We gratefully acknowledge all data contributors, i.e., the Authors and their Originating laboratories responsible for obtaining the specimens, and their Submitting laboratories for generating the genetic sequence and metadata and sharing via the GISAID Initiative, on which this research is based. The authors acknowledge the use of de.NBI Cloud and the support by the High Performance and Cloud Computing Group at the Zentrum für Datenverarbeitung of the University of Tübingen and the German Federal Ministry of Education and Research (BMBF) through grant no 031 A535A. M.B. is funded by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (project PEPS, no. 101071786). M.N. was supported by the Helmholtz Association under the joint research school “HIDSS4Health – Helmholtz Information and Data Science School for Health”. M.N. and A.O. were supported by the Karlsruhe Institute of Technology and the Helmholtz Association [POF4; 5207.0004.0012]. F.M. gratefully acknowledges support from the National Science Foundation through grants CCF-2523653, DMS-2524362 and RI-1901360. This project was supported by the Vector Stiftung.
Code and data availability
The code used to generate all figures and analyses in this article is available in the public GitHub repository https://github.com/subthaumic/n-invariants and archived on Zenodo under https://doi.org/10.5281/zenodo.23210358 [BGM+26]. The computational procedures used for the theoretical substitution-model results are documented in Appendix § 12 . The SARS-CoV-2 genome data analysed in this study were shared via GISAID, the global data science initiative [23 ] . The findings of this study are based on 5,000,450 records collected between 24 December 2019 and 31 January 2024 in 217 countries and territories, and accessible at https://doi.org/10.55876/gis8.261006ze (EPI_SET_261006ze, comprising 5,000,421 of the records). The download date and preparation of these data are documented in Appendix § 13 .
During the preparation of this work, the authors used Codex (OpenAI; GPT-5 and GPT-6 series models) and Claude Code (Anthropic; Claude Opus 5 and 5.5) to improve the wording of parts of the text and to check statements against the cited literature. These tools were also used to write scripts for generating figures and to refactor the research code into a clean Python package available in the public repository. The authors reviewed and edited all output and take full responsibility for the content of this publication.
Simulations of single-nucleotide substitution models
For Figure 6 , we used the alphabet Σ = { 0 , 1 , 2 , 3 } \Sigma= \{0,1,2,3\} Σ = { 0 , 1 , 2 , 3 } , sequence length L = 100 L = 100 L = 100 , and the homogeneous product initial measure δ 0 ⊗ L \delta_0^{\otimes L} δ 0 ⊗ L . The JC generator has total exit rate one, as in Subsection 8.3. For the homogeneous HB model, every site uses the same symmetric JC baseline generator and fitness profile ϕ = ( 0 , 0 , − 10 , − 10 ) \phi= (0,0,-10,-10) ϕ = ( 0 , 0 , − 10 , − 10 ) . At each finite time t ∈ { 0.05 , 0.1 , 0.5 , 1 } t \in\{0.05,0.1,0.5,1\} t ∈ { 0.05 , 0.1 , 0.5 , 1 } , we computed the one-site distribution ρ t = δ 0 exp ( t Q ) \rho_t = \delta_0 \exp(tQ) ρ t = δ 0 exp ( tQ ) by matrix exponentiation. At t = ∞ t = \infty t = ∞ , we used the corresponding stationary distribution: the uniform distribution for JC and the distribution proportional to exp ( ϕ ) \exp(\phi) exp ( ϕ ) for HB.
For each model, the metric-MDS panel uses 160 independently sampled sequences from each of the five time layers, embedded jointly from their pairwise Hamming-distance matrix. We used one random initialization and at most 500 metric-MDS iterations.
The pairwise-distance distributions were evaluated exactly as Bin ( L , 1 − c 2 ( ρ t ) ) \operatorname{Bin}(L,1-c_2(\rho_t)) Bin ( L , 1 − c 2 ( ρ t )) using Proposition 8.4 . For the distributions of hyperbolicity deficits, we enumerated the one-site distribution ν S , ρ t \nu_{S,\rho_t} ν S , ρ t , computed its L L L -fold convolution by fast Fourier transform, and pushed the result forward along gap + \operatorname{gap}_+ gap + as in Proposition 8.6 . The sample count N = 117,207,232 N = 117{,}207{,}232 N = 117 , 207 , 232 was obtained from Corollary 6.3 with n = 4 n = 4 n = 4 , p = 2 p = 2 p = 2 , error ϵ = 0.1 \epsilon= 0.1 ϵ = 0.1 , Lipschitz constant 1, and per-distribution confidence α = 0.995 \alpha= 0.995 α = 0.995 ; by a union bound, the latter provides at least 0.95 simultaneous confidence across the ten model–time distributions. For each model and time, the ( 4 , 1 ) (4,1) ( 4 , 1 ) -persistence measure was then estimated from N N N independent ordered quadruples whose sequences were sampled with replacement from ρ t ⊗ L \rho_t^{\otimes L} ρ t ⊗ L . Rather than materializing the sampled sequences, we sampled multinomial counts of the one-site six-edge mismatch patterns in batches of 100,000 quadruples and summed them to obtain the six Hamming distances. For visualization, the nonzero birth–persistence mass was smoothed on its integer lattice with a Gaussian kernel of standard deviation one lattice unit, and the plotted contours enclose 95%, 80%, and 50% of that smoothed mass.
All code implementing the steps described in this section is available at https://github.com/subthaumic/n-invariants [BGM+26].
SARS-CoV-2 data availability and preparation
We used SARS-CoV-2 genome data shared via GISAID, the global data science initiative [23 ] . We downloaded the alignment msa_0222.fasta on 24 February 2024. This alignment comprises 14,956,990 SARS-CoV-2 nucleotide sequences that were aligned to the reference sequence hCoV-19/Wuhan/WIV04/2019 (GISAID accession number EPI_ISL_402124) with MAFFT v7.497 [42 ] .
(i) Coverage and date filter. Every sequence containing a character other than A, C, G, T or the gap symbol ‘-’, or lacking a complete YYYY-MM-DD collection date in its header, was removed. This retains exactly the completely covered, dated genomes.
(ii) Gap removal. Since the distances between indels and nucleotides are ambiguous, we removed all gap symbols ‘-’ from the alignment. We first discarded every alignment column in which more than 0.05% of the sequences carried a gap. This removes the positions of common insertions and deletions from the alignment, leaving only the core genome. We then removed the residual sequences that still carried a gap in any of the retained columns. The result is a fixed-width alignment over { A , C , G , T } \{A,C,G,T\} { A , C , G , T } , containing only the positions on the genome that have not been subject to a widespread insertion or deletion event.
After these steps, 5,000,450 complete records remain, which reduce to U = 2 , 722 , 574 U = 2,722,574 U = 2 , 722 , 574 distinct haplotypes. The findings of this study are based on these records, collected between 24 December 2019 and 31 January 2024 in 217 countries and territories, and accessible at https://doi.org/10.55876/gis8.261006ze (EPI_SET_261006ze, comprising 5,000,421 of the records). These unique haplotypes provide a subset X ⊂ H ( Σ , L ) X \subset\mathcal{H}(\Sigma,L) X ⊂ H ( Σ , L ) of the Hamming cube over the alphabet Σ = { A , C , G , T } \Sigma= \{A,C,G,T\} Σ = { A , C , G , T } and length L = 28 , 207 L = 28,207 L = 28 , 207 , of which 27,181 sites are polymorphic. The time series μ t S A R S \mu_t^{\mathrm{SARS}} μ t SARS is obtained from the frequency of the haplotypes observed up to the cutoff date t t t . At each cutoff, the n n n -tuples are drawn independently and with replacement from μ ≤ t S A R S \mu_{\le t}^{\mathrm{SARS}} μ ≤ t SARS , so the sampling guarantees of § 6 apply to X X X with this measure.
All code implementing the steps described in this section is available at https://github.com/subthaumic/n-invariants [BGM+26].