\section{Cancellation and finite roots for maximum products}\label{sec:cancellation} We use the measures constructed in the preceding section to prove cancellation and uniqueness of finite roots for maximum products. We consider the probability that each pairwise distance is at most a prescribed threshold. For the maximum product, the event is the intersection of the corresponding coordinate events, so its probability under a product measure factors. For cancellation, it suffices to consider threshold vectors with positive rational entries. At every such vector the threshold probability of the common factor is positive, so we can divide by it. For uniqueness of roots, equality of the $n$th powers of the two probabilities allows us to take their nonnegative $n$th roots. Varying all thresholds determines the measure of each lower rectangle under the distance-matrix map for every sample size. We then apply \Cref{lem:reconstruction} to recover the underlying spaces up to isometry. Fix an integer $m\geq2$, a compact metric space $\MetricSpace{M}{d}$, and a probability measure $\mu\in\ProbabilityMeasures(M)$. For a vector $s=(s_{ij})_{0\leq i0$. \end{lemma} \begin{proof} Cover $B$ by finitely many balls of diameter less than $\min_{0\leq i0. \] \end{proof} \begin{proof}[Proof of \Cref{thm:cancellation}] Let $F\colon \MetricSpace{X\times K}{d\boxt \rho}\to \MetricSpace{Y\times K}{e\boxt \rho}$ be an isometry. Apply \Cref{prop:compatible-measures} with factors $\MetricSpace{X}{d}$, $\MetricSpace{Y}{e}$, and $\MetricSpace{K}{\rho}$. We obtain probability measures $\CoverMaxMeasure{d},\CoverMaxMeasure{e},\CoverMaxMeasure{\rho}$ of full support satisfying \begin{equation}\label{eq:cancel-measure} F_*(\CoverMaxMeasure{d}\otimes\CoverMaxMeasure{\rho})=\CoverMaxMeasure{e}\otimes\CoverMaxMeasure{\rho}.\end{equation} Fix an integer $m\geq2$ and set $I=\{(i,j)\mid 0\leq i0}^I$ write $Q_s=\prod_{(i,j)\in I}[0,s_{ij}]$ for the corresponding lower rectangle. Applying \Cref{lem:sample-array-pushforward} to the isometry $F$ and the two product measures in \eqref{eq:cancel-measure} shows that the distance-matrix maps on the two products have the same image measure. Comparing the masses of $Q_s$ and using \eqref{eq:distribution-product} yields \[ T_s(\MetricSpace{X}{d},\CoverMaxMeasure{d})T_s(\MetricSpace{K}{\rho},\CoverMaxMeasure{\rho})=T_s(\MetricSpace{Y}{e},\CoverMaxMeasure{e})T_s(\MetricSpace{K}{\rho},\CoverMaxMeasure{\rho}).\] By \Cref{lem:threshold-positive}, the common factor $T_s(\MetricSpace{K}{\rho},\CoverMaxMeasure{\rho})$ is positive and cancels. Hence $T_s(\MetricSpace{X}{d},\CoverMaxMeasure{d})=T_s(\MetricSpace{Y}{e},\CoverMaxMeasure{e})$. The rectangles $\{Q_s\}_{s\in\mathbb Q_{>0}^I}$ are closed under finite intersections. The intervals $[0,a]$ with positive rational $a$ generate the Borel sets of $[0,\infty)$, so the rectangles form a $\pi$-system generating the Borel sets of $[0,\infty)^I$. Thus the two probability measures agree on $[0,\infty)^I$. Since $m\geq2$ was arbitrary, $\mathcal L_m(\MetricSpace{X}{d},\CoverMaxMeasure{d})=\mathcal L_m(\MetricSpace{Y}{e},\CoverMaxMeasure{e})$ holds for every $m$. By \Cref{lem:reconstruction} we obtain $\MetricSpace{X}{d}\cong \MetricSpace{Y}{e}$. \end{proof} For uniqueness of roots we take the nonnegative $n$th root of each side. This operation is well defined on $[0,1]$, including at zero. \begin{proof}[Proof of \Cref{thm:roots}] Let $n\geq2$ and let $F\colon \MetricSpace{X^n}{d^{\boxt n}}\to \MetricSpace{Y^n}{e^{\boxt n}}$ be an isometry. Apply \Cref{prop:compatible-measures} to the factors $\MetricSpace{X}{d}$ and $\MetricSpace{Y}{e}$. By induction using \eqref{eq:compatible-product} and then by \eqref{eq:compatible-isometry}, we have \begin{equation}\label{eq:root-measure} F_*(\CoverMaxMeasure{d}^{\otimes n})=\CoverMaxMeasure{e}^{\otimes n}.\end{equation} Fix an integer $m\geq2$ and a threshold vector $s\in\R^{\binom m2}$. By \eqref{eq:root-measure} and \Cref{lem:sample-array-pushforward}, the isometry $F$ preserves the probability that the distance matrix of the product belongs to the lower rectangle $\prod_{0\leq i