1 Introduction

A mathematical structure is called ultrahomogeneous if every isomorphism between its finite (or, more generally, finitely generated), substructures extends to an automorphism. Adding bounds on the cardinality of the substructures we obtain n-homogeneity, where \(n \geqslant 1\) is a natural number. Countable (or, more generally, countably generated) ultrahomogeneous structures are known in model theory as Fraïssé limits (see e.g. Hodges [5]) and they are fully characterized as unique countable ultrahomogeneous structures generated by a given class of finite (or finitely generated) structures satisfying some natural axioms, where the most important one is the amalgamation property. Metric spaces can be easily viewed as first order structures, for instance, replacing the metric by countably many binary relations saying that “the distance is less than a fixed positive rational number”. In this setting, isomorphisms are just bijective isometries and a metric space is ultrahomogeneous if every isometry between its finite subsets extends to a bijective auto-isometry of the space. Perhaps the first and arguably most important example is the Urysohn space [22], the unique separable complete ultrahomogeneous metric space \({\mathbb {U}}\) containing isometric copies of all separable metric spaces. The space \({\mathbb {U}}\) contains a dense countable ultrahomogeneous subspace in which all distances are rational, this is actually the Fraïssé limit of the class of all finite metric spaces with rational distances.

In this paper we consider the special class of metric spaces without isosceles triangles, called isosceles-free, in connection with homogeneity. It turns out this class is a nice source of examples in the context of Fraïssé theory as well as in the context of finite combinatorics and the question of how many distinct distances a finite homogeneous spaces of a fixed size can have.

Our main results include:

  1. (1)

    Realizing that every 1-homogeneous isosceles-free metric space is already ultrahomogeneous (Proposition 3.4), and that homogeneous isosceles-free spaces are exactly uniquely 2-homogeneous spaces (Proposition 3.6).

  2. (2)

    Showing that the class of all finite isosceles-free metric spaces is a hereditary class without the weak amalgamation property (Theorem 3.16).

  3. (3)

    Characterizing all homogeneous isosceles-free spaces up to isometry as normed \(\mathbb {Z}_2\)-linear spaces with an injective norm (Theorem 4.9), using an auxiliary notion of a Boolean metric space.

  4. (4)

    Studying more general 1-homogeneous spaces through the lens of singleton distances (i.e. locally non-repeating distances) and related invariant decompositions, showing that every 1-homogeneous metric space is Boolean or isosceles-generated or a rainbow duplicate of an isosceles-generated space (Theorem 5.19). In the case of 2-homogeneous spaces, this further reduces to being isosceles-generated or isosceles-free.

  5. (5)

    Giving bounds on the maximal number of distances in a homogeneous finite metric space of size n. In the case of a 2-homogeneous space, we have the optimal bound \(2^m(k + 1)\) for \(n = 2^m(2k + 1)\), realized even by ultrahomogeneous spaces (Theorem 6.4 and Example 6.5). This bound is optimal also for 1-homogeneous spaces whose size is odd or a power of two. In the case of an even-sized 1-homogeneous space of size \(2^m(4k + 2)\) we give a better lower bound \(2^m(3k + 2)\) (Example 6.10).

The paper is organized as follows. In Sect. 2 we gather various notions of homogeneity of metric spaces and prove general preservation theorems. In Sect. 3 we study isosceles-free metric spaces in general and in connection with 1-homogeneity. We prove the results (1) and (2) as well as the fact that the automorphism group of an isosceles-free space is Boolean. We also give a couple of illustrative examples.

In Sect. 4 we further exploit the fact that homogeneous isosceles-free spaces are uniquely 1-homogeneous and have a Boolean automorphism group. We call metric spaces with the latter properties Boolean metric spaces and prove that they admit a certain \(\mathbb {Z}_2\)-linear/affine structure. This leads to the proof of the complete classification of homogeneous isosceles-free spaces (3). Later in the section we give infinite Cantor-like examples of homogeneous isosceles-free spaces (Examples 4.13 and 4.14), demonstrating that metric completion may break ultrahomogeneity and the property of being isosceles-free.

In Sect. 5 we study invariant decompositions of homogeneous metric spaces based on singleton distances - the decomposition into isosceles-free components and the decomposition into isosceles-generated components - in order to prove (4). We also introduce the construction of a rainbow duplicate of a 1-homogeneous metric space, and show that this particular construction in fact realizes all 1-homogeneous spaces with two isosceles-generated components.

In Sect. 6 we exploit the structural properties and constructions of homogeneous metric spaces obtained in previous sections to give a partial answer to the question: how many distinct distances can a finite homogeneous metric space of a fixed size n have? We obtain the bounds (5). Concrete values of the bounds are summarized in Table 1.

Let X be a metric space. We use the following notation.

  • The distance is usually denoted by d(xy). We sometimes use \(d_X\) instead of d for clarity.

  • \({\text {Dist}}(X)\) denotes the set of used distances \(\{d(x, y): x, y \in X\}\).

  • \({\text {Aut}}(X)\) denotes the automorphism group of all isometries \(X \rightarrow X\). Note that here the word isometry stands for isometric isomorphism and not isometric embedding.

  • \({\text {Age}}(X)\) denotes the class of all finite metric spaces isometrically embeddable into X.

2 Homogeneity

A metric space X is said to be

  • n-homogeneous for \(n \in \mathbb {N}_+=\{1,2,3,\dotsc \}\) if for every isometry \(f:A \rightarrow B\) between subspaces \(A, B \subseteq X\) with \(|A| \leqslant n\) there exists an automorphism \(F:X \rightarrow X\) extending f, i.e. \(F|_A = f\);

  • ultrahomogeneous if it is n-homogeneous for every \(n \in \mathbb {N}_+\);

  • uniquely n-homogeneous if for every isometry \(f:A \rightarrow B\) for \(A, B \subseteq X\) with \(0 < |A| \leqslant n\) there exists a unique \(F \in {\text {Aut}}(X)\) with \(F|_A = f\);

  • uniquely ultrahomogeneous if it is uniquely n-homogeneous for every \(n \in \mathbb {N}_+\).

Note that X is uniquely n-homogeneous if and only if it is n-homogeneous and uniquely 1-homogeneous. In model theory, uniquely 1-homogeneous structures are called Ohkuma structures, see [3] and [18]. We usually avoid the term homogeneous as it can mean either 1-homogeneous or ultrahomogeneous in the literature.

Definition 2.1

Let X be a metric space. We say that a subspace \(Y \subseteq X\) is quasi-invariant if for every \(f \in {\text {Aut}}(X)\) such that \(f[Y] \cap Y \ne \emptyset \) we have \(f[Y] = Y\).

Example 2.2

The metric space \(X=\{\langle i,j\rangle : 1\leqslant i\leqslant 4,1\leqslant j\leqslant 2\}\) with the metric

$$\begin{aligned} d(\langle i_1,j_1\rangle ,\langle i_2,j_2\rangle )= {\left\{ \begin{array}{ll} 2&{}j_1\ne j_2,\\ 1&{}i_1\ne i_2,\\ 0&{}\text {else.} \end{array}\right. } \end{aligned}$$

has two quasi-invariant subspaces \(Y_j=\{\langle i,j\rangle : 1\leqslant i\leqslant 4\}\) for \(j=1,2\) (see Fig. 1).

Fig. 1
figure 1

The metric space \(X=Y_1\cup Y_2\) with all edges of distance 1 drawn. All pairs of distinct points without an edge between them have distance 2

To check that \(Y_1\) is quasi-invariant, note that if f is an automorphism and maps any point x in \(Y_1\) to \(Y_1\), then due to f being an isometry, we have \(f[Y_1]=Y_1\) since \(Y_1\) is exactly the set of points of distance \(\leqslant 1\) to x. This remains true regardless of which distances (or how many distinct ones) we choose between a point in \(Y_1\) and a point in \(Y_2\), as long as no such distance is chosen as 1.

More generally, any subspace \(Y \subseteq X\) such that \(d[Y \times Y] \cap d[(X {\setminus } Y) \times Y] = \emptyset \) or any component of an invariant decomposition of X (see Definition 5.1) is quasi-invariant.

Proposition 2.3

Let X be a metric space and let \(Y \subseteq X\) be a quasi-invariant subspace. If X is (uniquely) n-homogeneous for some \(n \in \mathbb {N}_+\) or ultrahomogeneous, then so is Y, and this is witnessed by restrictions of automorphisms of X.

Proof

Let \(f:A \rightarrow B\) be an isometry between nonempty finite subspaces \(A, B \subseteq Y \subseteq X\). If X is \(|A|\)-homogeneous, there is \(F \in {\text {Aut}}(X)\) extending f. We have \(\emptyset \ne B \subseteq Y \cap F[Y]\), and hence \(F|_Y \in {\text {Aut}}(Y)\) since Y is quasi-invariant. Moreover, if F is the unique automorphism of X extending f, then \(F|_Y\) is the unique automorphism of Y extending f. \(\square \)

For metric spaces X and Y let \(X \times _1 Y\) denote the product space endowed with the \(\ell _1\)-metric: \(d(\langle x_1, y_1\rangle , \langle x_2, y_2\rangle ) = d_X(x_1, x_2) + d_Y(y_1, y_2)\). Also for every \(f \in {\text {Aut}}(X)\) and \(g \in {\text {Aut}}(Y)\) let \(f \times g\) denote the map \(\langle x, y\rangle \mapsto \langle f(x), g(y)\rangle \).

Proposition 2.4

Suppose that X and Y are nonempty metric spaces such that the map \(+:{\text {Dist}}(X) \times {\text {Dist}}(Y) \rightarrow {\text {Dist}}(X \times _1 Y) \subseteq [0, \infty )\) is injective (and so bijective). Then \(\langle f, g\rangle \mapsto f \times g\) is a group isomorphism \({\text {Aut}}(X) \times {\text {Aut}}(Y) \rightarrow {\text {Aut}}(X \times _1 Y)\). Moreover, \(X \times _1 Y\) is (uniquely) n-homogeneous/ultrahomogeneous if and only if X and Y are.

Proof

Distances in \(X \times _1 Y\) are of the form \(d(\langle x_1,y_1\rangle ,\langle x_2,y_2\rangle )=d_X(x_1,x_2)+d_Y(y_1,y_2)\). Therefore, since sums of the form \(d_X(x_1,x_2)+d_Y(y_1,y_2)\) injectively map into \([0,\infty )\), there will be a one-to-one correspondence between \({\text {Dist}}(X \times _1 Y)\) and \({\text {Dist}}(X)\times {\text {Dist}}(Y)\).

For every \(f, f' \in {\text {Aut}}(X)\) and \(g, g' \in {\text {Aut}}(Y)\) we have

$$\begin{aligned} d((f \times g)(x_1, y_1), (f \times g)(x_2, y_2))&= d_X(f(x_1), f(x_2)) + d_Y(g(y_1), g(y_2)) \\&= d_X(x_1, x_2) + d_Y(y_1, y_2) = d(\langle x_1, y_1\rangle , \langle x_2, y_2\rangle ), \end{aligned}$$

and \((f \times g) \circ (f' \times g') = (f \circ f') \times (g \circ g')\). Hence, \(f \times g \in {\text {Aut}}(X \times _1 Y)\) and \(\langle f, g\rangle \mapsto f \times g\) is a group homomorphism \({\text {Aut}}(X) \times {\text {Aut}}(Y) \rightarrow {\text {Aut}}(X \times _1 Y)\).

Let \(\pi _X:X \times _1 Y \rightarrow X\) and \(\pi _Y:X \times _1 Y \rightarrow Y\) denote the projections. For every \(f \in {\text {Aut}}(X)\), \(g \in {\text {Aut}}(Y)\), \(x \in X\), and \(y \in Y\) we have \(\pi _X((f \times g)(x, y)) = f(x)\) and \(\pi _Y((f \times g)(x, y)) = g(y)\), and hence the homomorphism \(\langle f, g\rangle \mapsto f \times g\) is injective.

To show that it is also surjective and to show the remaining claims, let \(\phi :A \rightarrow B\) be an isometry of some subspaces \(A, B \subseteq X \times _1 Y\). We prove that \(\phi = (\phi _X \times \phi _Y)|_A\) for some isometries \(\phi _X:\pi _X[A] \rightarrow \pi _X[B]\) and \(\phi _Y:\pi _Y[A] \rightarrow \pi _Y[B]\). To that end, let us look at

$$\begin{aligned} d(\phi (x_1, y_1), \phi (x_2, y_2)) = d(\langle x_1, y_1\rangle , \langle x_2, y_2\rangle ) = d_X(x_1, x_2) + d_Y(y_1, y_2) \end{aligned}$$

and note that if \(\phi (x_1,y_1)=:\langle a,b\rangle \) and \(\phi (x_2,y_2)=:\langle c,d\rangle \), then

$$\begin{aligned} d_X(x_1,x_2)+d_Y(y_1,y_2)=d_{X \times _1 Y}(\langle a,b\rangle ,\langle c,d\rangle )=d_X(a,c)+d_Y(b,d) \end{aligned}$$

and it follows from our injectivity assumption of \(+\) on \({\text {Dist}}(X)\times {\text {Dist}}(Y)\) that \(d_X(x_1,x_2)=d_X(a,c)\) and \(d_Y(y_1,y_2)=d_Y(b,d)\). In particular, if \(x_1=x_2\), then \(a=c\), so for all pairs of points \(\langle x,y_1\rangle ,\langle x,y_2\rangle \) with identical X-components, we get that the X-components of the images under \(\phi \) coincide as well: \(\pi _X(\phi (x,y_1)) = \pi _X(\phi (x,y_2)) =: \phi _X(x)\). Also, \(d_X(x_1, x_2) = d_X(a, c)\) shows that \(\phi _X\) is an isometry. Analogously, we obtain the isometry \(\phi _Y\).

Hence, \(\times :{\text {Aut}}(X) \times {\text {Aut}}(Y) \rightarrow {\text {Aut}}(X \times _1 Y)\) is surjective. It also follows that every subspace \(X \times \{y\} \subseteq X \times _1 Y\) (which is isometric to X) is quasi-invariant, and so if \(X \times _1 Y\) is (uniquely) n-homogeneous/ultrahomogeneous, so is X by Proposition 2.3, and similarly for Y. Finally, if \(\phi _X\) and \(\phi _Y\) have (unique) extensions \(\Phi _X \in {\text {Aut}}(X)\) and \(\Phi _Y \in {\text {Aut}}(Y)\), then \(\Phi _X \times \Phi _Y\) is a (unique) extension of \(\phi \), so if X and Y are (uniquely) n-homogeneous/ultrahomogeneous, then so is \(X \times _1 Y\). \(\square \)

Example 2.5

For every \(n\in \mathbb {N}_+\), let \(C_n:=\langle V_n,E_n,d_n\rangle \) be the n-point circle graph with simple graph distance, where \(V_n:=\{0,\dotsc ,n-1\}\) is the vertex set, the set of edges \(E_n:=\{\{i,i+1\} \mod n:0\leqslant i< n\}\) only connects consecutive vertices as well as the first and last vertex with each other, and

$$\begin{aligned} d_n:V_n\times V_n\rightarrow \left[ 0,\frac{n}{2}\right] \cap \mathbb {N}:\langle i,j\rangle \mapsto \min \{|i - j|,n - |i - j|\} \end{aligned}$$

counts the minimum number of edges in \(E_n\) you have to cross to get from i to j.

The metric space \(C_n\) is ultrahomogeneous.

Proof

For any \(C_n\), it is clear that the automorphism group \({\text {Aut}}(C_n)\) contains all rotations around the vertex set \(\Phi _i(k)=(i+k\mod n)\) and all reflections across a vertex \(i\in V_n\), \(\Psi _i(k)=(2i-k\mod n)\).

Each isometry \(\phi :A\rightarrow B\) with \(A,B\subseteq C_n\) can be extended to at least one such rotation or reflection since, after choosing any two points \(x\ne y\in A\) (that are not antipodal in the case of even n), all other points \(z\in C_n\) can be uniquely determined from their distances to x and y, and thus the same holds for \(\phi (z)\). Therefore, it suffices to consider \(|A|\leqslant 2\), and in those cases it is easy to see that rotating one point x onto its image and then potentially reflecting across \(\phi (x)\) will give an automorphism mapping A to B. \(\square \)

3 Isosceles-free spaces

In the following, we will study metric spaces X with the property that all distances from a given point are distinct, i.e. \(d(x,y)\ne d(x,z)\) for all distinct \(x,y,z\in X\). We will refer to such spaces as isosceles-free spaces since the condition is equivalent to “X does not contain any isosceles triangles”. The isosceles-free spaces were introduced under the name star-rigid by Janoš and Martin [9].

Observation 3.1

Every isosceles-free space is zero-dimensional, as observed by Hattori [4, Theorem 2]: Every ball B(xr) has at most one point at the boundary, and every subspace \(C(x, y):= \{z: d(z, x) < d(z, y)\}\) is clopen. Hence, if B(xr) has exactly one point y at the boundary, \(B(x, r) \cap C(x, y)\) is a basic clopen set, and otherwise B(xr) is already a basic clopen set.

Proposition 3.2

If X is any metric space and Y is isosceles-free, then for every \(x\in X\), \(y\in Y\) there exists at most one isometric embedding \(f:X\rightarrow Y\) which maps x to y.

Proof

Pick two isometric embeddings fg such that \(f(x)=y=g(x)\). Hence for any \(x'\in X\) we have that \(d(y, f(x'))=d(x, x')=d(y, g(x'))\). But this means that \(f(x')=g(x')\) since otherwise, we would have a non-trivial isosceles triangle in Y. \(\square \)

Corollary 3.3

Every 1-homogeneous isosceles-free space X is uniquely 1-homogeneous, i.e. for every \(x,y\in X\) there exists precisely one \(f\in {\text {Aut}}(X)\) such that \(f(x) = y\).

Proof

Since X is 1-homogeneous, there exists at least one \(f\in {\text {Aut}}(X)\) mapping x to y, and according to Proposition 3.2, there exists at most one. \(\square \)

Proposition 3.4

Every 1-homogeneous isosceles-free space X is ultrahomogeneous.

Proof

Let \(i:A\rightarrow B\) be an isometry from a finite subset \(A\subset X\) to \(B\subset X\). Choose any \(x\in A\) and find the automorphism f which maps x to i(x). Then, i and \(f|_A\) are both isometric embeddings from A into X which map x to i(x). According to Proposition 3.2, this means they are equal. \(\square \)

Remark 3.5

Observe that the proof of Proposition 3.4 shows that we have homogeneity not only for finite substructures, but for all substructures of X. This is called absolute homogeneity by Piotr Niemiec, studied in his recent preprint [17].

Since 1-homogeneity and ultrahomogeneity are equivalent for isosceles-free spaces, we will call them just homogeneous isosceles-free spaces.

Proposition 3.6

A metric space X is homogeneous isosceles-free if and only if it is uniquely 2-homogeneous.

Proof

Recall that being uniquely 2-homogeneous is equivalent to being 2-homogeneous and uniquely 1-homogeneous. Suppose X is 1-homogeneous and isosceles-free. By Proposition 3.4, X is even ultrahomogeneous. By Corollary 3.3, X is uniquely 1-homogeneous.

On the other hand, suppose that X is uniquely 2-homogeneous, and let \(x, y, z \in X\) be such that \(d(x, y) = d(x, z)\). By 2-homogeneity there is \(f \in {\text {Aut}}(X)\) with \(f(x) = x\) and \(f(y) = z\). By unique 1-homogeneity, f is the unique automorphism fixing x, and so \(f = {\text {id}}_X\) and \(y = z\), so X is isosceles-free. \(\square \)

Recall that a Boolean group is a group G such that \(g^2 = 1\), i.e. \(g^{-1}= g\), for every \(g \in G\). It follows that G is Abelian as \(g h g^{-1}h^{-1}= (gh)(gh) = 1\) and so \(gh = hg\) for every \(g, h \in G\).

Proposition 3.7

For every isosceles-free space X the isometry group \({\text {Aut}}(X)\) is Boolean.

Proof

For every \(f \in {\text {Aut}}(X)\) and \(x \in X\) we have \(d(x, f(x)) = d(f(x), f(f(x)))\), and hence \(x = f(f(x))\) since X is isosceles-free. Hence \(f^2 = {\text {id}}_X\). \(\square \)

Observation 3.8

Let X be a metric space. For every \(a \in X\) let

  • \(D_a:X \rightarrow {\text {Dist}}(X)\) denote the distance map \(x \mapsto d(x, a)\),

  • \(E_a:{\text {Aut}}(X) \rightarrow X\) denote the evaluation map \(f \mapsto f(a)\).

We have the following reformulation of the properties considered.

  1. (1)

    X is isosceles-free if and only if the maps \(D_a\) are injective, and in that case it follows that the maps \(E_a\) are injective.

  2. (2)

    X is 1-homogeneous if and only if the maps \(E_a\) are surjective, and in that case it follows that the maps \(D_a\) are surjective.

  3. (3)

    X is uniquely 1-homogeneous if and only if the maps \(E_a\) are bijective.

  4. (4)

    X is homogeneous isosceles-free if and only if the maps \(D_a\) and \(E_a\) are bijective.

Proof

Clearly the maps \(D_a\) being injective is essentially the definition of being isosceles-free. The maps \(E_a\) are injective and surjective if and only if for every \(x, y \in X\) there exists at most and at least, respectively, one \(f \in {\text {Aut}}(X)\) such that \(f(x) = y\). Proposition 3.2 says that the first option is true for isosceles-free spaces. Also for every \(r \in {\text {Dist}}(X)\) there are \(x, y \in X\) with \(d(x, y) = r\), and so if X is 1-homogeneous, for every \(a \in X\) there is \(f \in {\text {Aut}}(X)\) with \(f(x) = a\), and so \(d(a, f(y)) = r\) and the maps \(E_a\) are surjective. The rest is clear. \(\square \)

Corollary 3.9

For every finite homogeneous isosceles-free metric space X we have \(|X| = 2^m\) for some \(m \in \omega \).

Proof

We have a bijection \(E_a:{\text {Aut}}(X) \rightarrow X\) and \({\text {Aut}}(X)\) is a Boolean group by Proposition 3.7. \(\square \)

Example 3.10

Let \(X = \{1, 2, 3, 4\}\) and let \(R = \{a, b, c\}\) where abc are any positive real numbers forming a triangle. There are exactly three decompositions of X into two pairs of points: \(Y_a = \{\{1, 2\}, \{3, 4\}\}\), \(Y_b = \{\{1, 3\}, \{2, 4\}\}\), \(Y_c = \{\{1, 4\}, \{2, 3\}\}\). We put \(d(x, y) = r\) if and only if \(\{x, y\} \in Y_r\), for \(x \ne y \in X\) and \(r \in R\). This gives a simple example of a homogeneous isosceles-free space, as in Fig. 2.

Fig. 2
figure 2

A four-point homogeneous isosceles-free space

Example 3.11

We consider the set \(X=\{1,2,3,4,5,6\}\) and pick five pairwise distinct numbers \(d_1,d_2,d_3,d_4,d_5\in [1,2]\) and set the distances as indicated in Fig. 3.

Since all distances are between 1 and 2, the triangle inequality is always satisfied. Moreover at every point each distance appears exactly once, so the mappings \(D_a\) are bijective and X is isosceles-free but it is not 1-homogeneous. That it is not 1-homogeneous can be checked directly, but it also follows from Corollary 3.9 as its size is not a power of two.

Fig. 3
figure 3

An isosceles-free space that is not 1-homogeneous

Example 3.12

Let X be a Polish (i.e. separable, complete) metric space in which all spheres and all bisectors are nowhere dense. A sphere in X is any set of the form

$$\begin{aligned}S_r(a):= \{x \in X :d(a,x) = r\}\end{aligned}$$

while the bisector of \(a,b \in X\) is

$$\begin{aligned}{\text {bs}}(a,b):= \{x \in X :d(a,x) = d(x,b)\}.\end{aligned}$$

Assuming all spheres and all bisectors are nowhere dense, we can easily construct a sequence \(A = \{a_n\}_{n \in \omega }\) such that all the distances between pairs of points of A are pairwise distinct (such spaces are called strongly rigid [8]). This way we obtain a dense countable isoceles-free subspace of X, where X could be, for example, \(\mathbb {R}^n\), a manifold with the geodesic distance, a Banach space, or the Urysohn space.

The next result exhibits a universality property of the automorphism groups of homogeneous isosceles-free spaces. Let us note that a countable ultrahomogeneous structure U, the Fraïssé limit of a given class of finite/finitely generated structures \(\mathcal F\), is universal in the sense that it contains isomorphic copies of all countable structures that are unions of chains from \(\mathcal F\). So, it is natural to ask whether \({\text {Aut}}(U)\) contains isomorphic copies of \({\text {Aut}}(X)\) for every \(X \in {\mathcal {F}}\) or, even better, for every X that is the union of a countable chain in \(\mathcal F\). This universality question had been explicitly asked by Jaligot [7] and it turns out that for most classical Fraïssé classes the answer is positive [13], however there exist relational homogeneous structures whose automorphism groups are far from being universal, see [14]. The next result gives a positive answer to the question above in the case of isosceles-free metric spaces.

Definition 3.13

Let \(e:X \rightarrow Y\) be an isometric embedding of metric spaces. By an extension operator along e we mean a group homomorphism \(e_*:{\text {Aut}}(X) \rightarrow {\text {Aut}}(Y)\) (which is necessarily injective) such that \(e_*(f) \circ e = e \circ f\) for every \(f \in {\text {Aut}}(X)\). In the case that e is the inclusion \(X \subseteq Y\), this means simply that \(e_*(f)\) extends f for every \(f \in {\text {Aut}}(X)\).

Proposition 3.14

Let \(e:X \rightarrow Y\) be an isometric embedding of an isosceles-free space into a homogeneous isosceles-free space.

  1. (1)

    There is a unique extension operator \(e_*:{\text {Aut}}(X) \rightarrow {\text {Aut}}(Y)\).

  2. (2)

    For any \(a \in X\) we have \(e_* = E_{e(a)}^{-1}\circ e \circ E_a\).

  3. (3)

    The assignment \(X \mapsto {\text {Aut}}(X)\) and \(e \mapsto e_*\) defines a functor from the category of homogeneous isosceles-free metric spaces and isometric embeddings to the category of Boolean groups and injective group homomorphisms.

Proof

If \(e_*\) is an extension operator and \(a \in X\), then for every \(f \in {\text {Aut}}(X)\) we have \(e_*(f)(e(a)) = e(f(a))\), and by unique 1-homogeneity of Y, \(e_*(f)\) is the unique automorphism of Y mapping e(a) to e(f(a)), so \(E_{e(a)}(e_*(f)) = e(E_a(f))\). This shows (2) and uniqueness in (1) if \(X \ne \emptyset \). For \(X = \emptyset \), we have \({\text {Aut}}(X) = \{{\text {id}}_X\}\) and (1) holds.

To show existence of the extension operator for \(X \ne \emptyset \), we fix any \(a \in X\) and for \(f \in {\text {Aut}}(X)\) we let \(e_*(f)\) be the unique automorphism of Y mapping \(e(a) \mapsto e(f(a))\). Both \(e_*(f) \circ e\) and \(e \circ f\) map \(a \mapsto e(f(a))\), and so they are equal by Proposition 3.2. For \(f, g \in {\text {Aut}}(X)\) we have \((e_*(f) \circ e_*(g)) \circ e = e_*(f) \circ e \circ g = e \circ (f \circ g)\), and hence \(e_*\) is a group homomorphism \({\text {Aut}}(X) \rightarrow {\text {Aut}}(Y)\). Moreover the assignment is injective: if \(e_*(f) = e_*(g)\), then \(e \circ f = e \circ g\) and \(f = g\) since e is an embedding.

To show (3), consider two isometric embeddings between homogeneous isosceles-free spaces \(i:X \rightarrow Y\) and \(j:Y \rightarrow Z\). For every \(f \in {\text {Aut}}(X)\) we have

$$\begin{aligned} (j_* \circ i_*)(f) \circ (j \circ i) = j_*(i_*(f)) \circ j \circ i = j \circ i_*(f) \circ i = j \circ (i \circ f), \end{aligned}$$

and clearly \(j_* \circ i_*\) is a group homomorphism. Hence, \(j_* \circ i_* = (j \circ i)_*\). Clearly also \(({\text {id}}_X)_* = {\text {id}}_{{\text {Aut}}(X)}\). \(\square \)

In the following, we will talk about classes of metric spaces (with isometric embeddings as morphisms), and we define the weak amalgamation property, which was formally introduced by Ivanov [6] and independently by Kechris and Rosendal [10] in connections with generic automorphisms of Fraïssé limits. It was recently explored in the context of Fraïssé limits by Krawczyk and Kubiś [11]; a purely category-theoretic framework was developed in [12] and for more information we refer to these two sources. (WAP) is crucial for the existence of (weak) Fraïssé sequences and thus for the construction of an object M which is generic over \(\mathcal {K}\), roughly speaking, the most common (or perhaps most complicated) object (a metric space, in our case) that can be built as the union of a chain in \(\mathcal {K}\).

In the context of metric spaces, it seems to be rather difficult to find easy-to-describe classes that lack the weak amalgamation property. Note that graphs can be seen as metric spaces, with distance set \(\{0,1,2\}\) depending on whether two points are connected by an edge or not. Then, graph embeddings correspond to isometric embeddings and thus some nontrivial examples of hereditary classes without (WAP) are given in [11] and [19].

Definition 3.15

A class of metric spaces \(\mathcal {K}\) has the weak amalgamation property (WAP) if for every \(A\in \mathcal {K}\) there exists a \(\mathcal {K}\)-embedding \(\phi :A\rightarrow B\) such that for every two \(\mathcal {K}\)-embeddings \(\psi _X:B\rightarrow X\), \(\psi _Y:B\rightarrow Y\) there exist \(\mathcal {K}\)-embeddings \(\pi _X:X\rightarrow Z\), \(\pi _Y:Y\rightarrow Z\) into a common space Z such that both ways of mapping A to Z coincide: \(\pi _X\circ \psi _X\circ \phi =\pi _Y\circ \psi _Y\circ \phi \) (cf. Fig. 4). (Here a \(\mathcal {K}\)-embedding means an isometric embedding between spaces from \(\mathcal {K}\).)

Fig. 4
figure 4

(WAP) requires the left diagram to be commutative, the right one need not be

Theorem 3.16

The class of all finite isosceles-free spaces does not have the weak amalgamation property.

Proof

Let \(\mathcal {K}\) denote the class of all finite isosceles-free spaces, let \(A:=\{0,1\}\), let \(\langle A,d_A\rangle \) be our base space in \(\mathcal {K}\), and let \(\langle B,d_B\rangle \in \mathcal {K}\) be any extension of \(\langle A, d_A\rangle \). In order to show a failure of (WAP), we will define two one-point extensions \(X:=B\cup \{x\}\) and \(Y:=B\cup \{y\}\) of B, with distance functions \(d_X\) and \(d_Y\), respectively, such that no space Z exists in \(\mathcal {K}\) which allows X and Y to be embedded into it in such a way that the images of A coincide.

To this end, define \(r_0\) as a distance larger than any distance in B, and let \(r_1\) be a distance very close to \(r_0\):

$$\begin{aligned} r_0&:=\max \{d_B(a,b):a,b\in B\}+1,\\ \varepsilon&:=\frac{1}{2} \min \{|d_B(a,0)-d_B(b,1)|>0:a,b\in B\},\\ r_1&:=r_0-\varepsilon . \end{aligned}$$

Note that B is a finite metric space and thus the minimum in the definition of \(\varepsilon \) really is a minimum rather than an infimum (in particular, \(\varepsilon >0\)).

Since they are supposed to be extensions of B, let \(d_X(a,b):=d_B(a,b)=:d_Y(a,b)\) for any \(a,b\in B\). Moreover, for any \(a\in B\), let

$$\begin{aligned}d_X(a,x):=d_B(a,0)+r_0,\qquad d_Y(a,y):= \min \{d_B(a,0)+r_0,d_B(a,1)+r_1\}\end{aligned}$$

Clearly, this way, X is a valid finite metric space and both choices of distances \(\rho (a,y):=d_B(a,0)+r_0\) and \(\rho '(a,y):=d_B(a,1)+r_1\) within the minimum in the definition of \(d_Y\) would define a valid metric on Y (again with \(\rho =\rho '=d_B\) on \(B\times B\)). So to show that \(d_Y\) is valid as well, observe that the minimum of two metrics always satisfies all conditions for a metric except potentially the triangle inequality. However, the two metrics \(\rho \) and \(\rho '\) only differ when y is one of the two arguments, so we need to check whether

$$\begin{aligned} d_Y(a,y)=\min \{\rho (a,y),\rho '(a,y)\}&\leqslant \min \{\rho (a,b)+\rho (b,y),\rho '(a,b)+\rho '(b,y)\}\\&= d_B(a,b)+\min \{\rho (b,y),\rho '(b,y)\}. \end{aligned}$$

But since \(\rho \) and \(\rho '\) are valid metrics on Y, the only cases in which this might fail are when (w.l.o.g.) \(\rho (a,y)<\rho '(a,y)\) and \(\rho (b,y)>\rho '(b,y)\). But in that case,

$$\begin{aligned} d_Y(a,y)<\rho '(a,y)\leqslant \rho '(a,b)+\rho '(b,y)=d_Y(a,b)+d_Y(b,y). \end{aligned}$$

Lastly, when y only shows up on the right-hand side of the triangle inequality, we have to show that:

$$\begin{aligned} d_Y(a,b)\leqslant \min \{\rho (a,y),\rho '(a,y)\} +\min \{\rho (y,b),\rho '(y,b)\}=d_Y(a,y)+d_Y(y,b). \end{aligned}$$

If \(\rho (a,y)<\rho '(a,y)\) or \(\rho (b,y)<\rho '(b,y)\) this is clear since \(\rho (\,\cdot ,y)\geqslant r_0>d_B(a,b)=d_Y(a,b)\) on B. If, on the other hand, \(\rho (a,y)>\rho '(a,y)\) and \(\rho (b,y)>\rho '(b,y)\), then

$$\begin{aligned}d_Y(a,y)+d_Y(b,y)=\rho '(a,y)+\rho '(b,y) \geqslant \rho '(a,b)=d_Y(a,b).\end{aligned}$$

So \((X,d_X),(Y,d_Y)\) are both valid metric spaces. Let us additionally show that they are isosceles-free: since B already contains no isosceles triangles, the only way to add an isosceles triangle to X would be if \(d_X(a,x)=d_X(b,x)\) for some \(a,b\in B\), but in that case, it would follow that \(d_B(a,0)=d_B(b,0)\), a clear contradiction.

For Y, the situation is slightly more complicated. If \(a,b\in B\) and \(d_Y(a,y)=d_Y(b,y)\), then we need to consider four cases, however, if both \(d_Y(a,y)=d_B(a,0)+r_0\) and \(d_Y(b,y)=d_B(b,0)+r_0\) or \(d_B(a,1)+r_1=d_Y(b,y)=d_B(b,1)+r_1\), then the same argument as in the previous paragraph leads to the conclusion that B is not isosceles-free. Thus, up to re-labelling a and b, we only need to consider the case where

$$\begin{aligned}d_Y(a,y)=d_B(a,0)+r_0=d_Y(b,y)=d_B(b,1)+r_1.\end{aligned}$$

However, in this case,

$$\begin{aligned} d_B(a,0)+r_0=d_B(b,1)+r_0-\varepsilon \Leftrightarrow \varepsilon =d_B(b,1)-d_B(a,0). \end{aligned}$$

Clearly, this cannot be the case due to our definition of \(\varepsilon \) since the right-hand side is always either 0, negative or at least double the value of \(\varepsilon \).

It follows that X and Y are both in \(\mathcal {K}\). However, in order for (WAP) to hold, we would need to find a \(Z\in \mathcal {K}\) such that both X and Y embed into Z in such a way that 0 and 1 in A are mapped to the same points in Z no matter whether they are mapped via X or via Y.

So any such space Z would need to satisfy that there exist \(\mathcal {K}\)-embeddings \(\pi _X,\pi _Y\) such that \(\pi _X(0)=\pi _Y(0)=:0\) and \(\pi _X(1)=\pi _Y(1)=:1\).

However, in such a case, due to isometry of \(\mathcal {K}\)-embeddings, we get

$$\begin{aligned}d_Z(0,\pi _X(x))=d_X(0,x)=r_0=\min \{r_0,d_B(0,1)+r_1\}=d_Y(0,y)= d_Z(0,\pi _Y(y)).\end{aligned}$$

This contradicts our assumption that \(Z\in \mathcal {K}\) since for that, Z would have to be isosceles-free and yet \(\pi _X(x)\ne \pi _Y(y)\) (their distances to 1 are different, for example) and \(\{0,\pi _X(x),\pi _Y(y)\}\) is a non-trivial isosceles triangle in Z. \(\square \)

Remark 3.17

Note that the result above is valid when the distance set is restricted to a dense subgroup A of \(\mathbb {R}\), which includes the case of rational distances. Let \({\mathcal {F}}_A\) denote the class of all countable isosceles-free spaces X with \({\text {Dist}}(X) \subseteq A\).

One of the properties of a Fraïssé limit is that it is universal for the associated class of countable structures. When (WAP) fails, not only is there no Fraïssé limit, but there is not even a universal structure; in fact by [11, Corollary 6.3] the universality number of \({\mathcal {F}}_A\), that is the minimal cardinality of a subfamily \({\mathcal {C}} \subseteq {\mathcal {F}}_A\) such that every \(X \in \mathcal F_A\) embeds isometrically into a member of \({\mathcal {C}}\), is the continuum.

Remark 3.18

Note that by classical Fraïssé theory [5, Theorem 7.1.7], for every countable homogeneous isosceles-free metric space X, the family of all finite spaces embeddable into X (denoted by \({\text {Age}}(X)\)) has even the amalgamation property (AP). This is no contradiction with the previous result - \({\text {Age}}(X)\) is a much more restrictive class of finite isosceles-free spaces than \({\mathcal {F}}_A\) from the previous remark. In fact, in a homogeneous isosceles-free space X for every positive \(p \ne q \in {\text {Dist}}(X)\) there is \(r \in {\text {Dist}}(X)\) such that every triangle in X with distances p and q is completed by the distance r. Hence, every one-point extension \(F \cup \{x\} \subseteq X\) is uniquely determined by \(d_F\) and a single distance d(ax) for a fixed point \(a \in F\) since every d(bx) for \(b \ne a \in F\) is the unique distance completing the distances d(ax) and d(ab). This also shows that the class of finite homogeneous isosceles-free spaces does not have the joint embedding property (JEP), while it is easy to see that the class of finite isosceles-free spaces has (JEP). We will give a precise description of \({\text {Age}}(X)\) for a homogeneous isosceles-free space X in Proposition 4.18 and Corollary 4.21.

4 Boolean metric spaces

Definition 4.1

By a Boolean metric space we mean a nonempty 1-homogeneous metric space X such that \({\text {Aut}}(X)\) is a Boolean group.

Remark 4.2

Note that the notion of Boolean metric space we use here is not related to the notion where the metric itself takes values in a Boolean algebra, as used by, for example, Melter in [15] or Avilés in [1].

We have shown that every homogeneous isosceles-free space is Boolean (Proposition 3.7) and uniquely 1-homogeneous (Corollary 3.3). It turns out that every Boolean metric space is uniquely 1-homogeneous and that it is in fact enough to suppose that the automorphism group is Abelian (Corollary 4.4). Moreover, Boolean metric spaces can be viewed as normed \(\mathbb {Z}_2\)-linear spaces, which gives us a concrete representation of every homogeneous isosceles-free space.

By a norm on an Abelian group X we mean a map \(\Vert \cdot \Vert :X \rightarrow [0, \infty )\) such that

  1. (1)

    \(\Vert x\Vert = 0\) if and only if \(x = 0\), for \(x \in X\),

  2. (2)

    \(\Vert x + y\Vert \leqslant \Vert x\Vert + \Vert y\Vert \), for \(x, y \in X\),

  3. (3)

    \(\Vert -x\Vert = \Vert x\Vert \), for \(x \in X\).

It is a more general version of an F-norm in linear vector spaces, cf. Rolewicz [20, p. 4], and is nowadays present in several aspects of group theory. It is well-known that every norm induces an invariant metric on X (i.e. a metric such that \(d(x + z, y + z) = d(x, y)\) for every \(x, y, z \in X\)) by putting \(d(x, y):= \Vert x - y\Vert \). Then we have \(\Vert x\Vert = d(x, 0)\). On the other hand, the previous formula gives a norm for any invariant metric on X. Altogether, norms and invariant metrics on X are in one-to-one correspondence. Similarly, norm-preserving maps \(X \rightarrow Y\) between normed Abelian groups are in one-to-one correspondence with isometric embeddings preserving 0.

If the Abelian group X is Boolean, X is a linear space over \(\mathbb {Z}_2\) and the norm is trivially a \(\mathbb {Z}_2\)-norm, i.e. it also satisfies \(\Vert \alpha \cdot x\Vert = |\alpha | \cdot \Vert x\Vert \) for every \(\alpha \in \mathbb {Z}_2\) and \(x \in X\). Altogether, a Boolean group endowed with an invariant metric is the same thing as a normed \(\mathbb {Z}_2\)-linear space, and isometric embeddings preserving 0 are linear.

Proposition 4.3

Let X be a 1-homogeneous space such that \({\text {Aut}}(X)\) is Abelian.

  1. (1)

    For every \(f \in {\text {Aut}}(X)\), the displacement d(xf(x)) does not depend on the point \(x \in X\).

  2. (2)

    Putting \(\Vert f\Vert := d(x, f(x))\) for any \(x \in X\) defines a norm on \(\langle {\text {Aut}}(X), \circ \rangle \).

  3. (3)

    X is uniquely 1-homogeneous.

  4. (4)

    The evaluation map \(E_a:{\text {Aut}}(X) \rightarrow X\) is an isometry for every \(a \in X\).

  5. (5)

    \({\text {Aut}}(X)\) is a Boolean group.

Proof

  1. (1)

    Let \(f \in {\text {Aut}}(X)\) and \(x, y \in X\). By 1-homogeneity there is a \(g \in {\text {Aut}}(X)\) with \(g(x) = y\). We have \(d(y, f(y)) = d(g(x), f(g(x))) = d(g(x), g(f(x))) = d(x, f(x))\).

  2. (2)

    We have \(\Vert f\Vert = 0\) if and only if \(d(x, f(x)) = 0\) for every \(x \in X\), i.e. if and only if \(f = {\text {id}}_X\). For every \(f, g \in {\text {Aut}}(X)\) and \(x \in X\) we have \(\Vert f \circ g\Vert = d(x, f(g(x))) \leqslant d(x, f(x)) + d(f(x), f(g(x))) = d(x, f(x)) + d(x, g(x)) = \Vert f\Vert + \Vert g\Vert \). Finally, \(\Vert f^{-1}\Vert = d(x, f^{-1}(x)) = d(f(x), x) = \Vert f\Vert \).

  3. (3)

    If \(f(x) = g(x)\) for \(f, g \in {\text {Aut}}(X)\) and some \(x \in X\), then \(\Vert f^{-1}\circ g\Vert = d(x, f^{-1}(g(x))) = d(f(x), g(x)) = 0\), and so \(f^{-1}\circ g = {\text {id}}_X\) by the first property of the norm.

  4. (4)

    We have \(d(E_a(f), E_a(g)) = d(f(a), g(a)) = d(a, f^{-1}(g(a))) = \Vert f^{-1}\circ g\Vert = d_{{\text {Aut}}(X)}(f, g)\). Hence, \(E_a\) is an isometric embedding. It is onto since X is 1-homogeneous (see Observation 3.8)

  5. (5)

    By (4), \({\text {Aut}}(X)\) is isometric to X, and so is uniquely 1-homogeneous by (3). By the third property of the norm, the map \(\phi :{\text {Aut}}(X) \rightarrow {\text {Aut}}(X)\), \(f \mapsto f^{-1}\), is norm-preserving, and hence an isometry fixing \({\text {id}}_X\). Therefore \(\phi ({\text {id}}_X) = {\text {id}}_{{\text {Aut}}(X)}({\text {id}}_X)\), and so \(\phi = {\text {id}}_{{\text {Aut}}(X)}\) since \({\text {Aut}}(X)\) is uniquely 1-homogeneous. \(\square \)

Corollary 4.4

For a 1-homogeneous metric space X, \({\text {Aut}}(X)\) is Abelian if and only if \({\text {Aut}}(X)\) is Boolean, and in this case, X is uniquely 1-homogeneous.

Corollary 4.5

Let X be a Boolean metric space. \({\text {Aut}}(X)\) is a normed \(\mathbb {Z}_2\)-linear space, and the canonical action of \({\text {Aut}}(X)\) on X turns X into an affine space over \({\text {Aut}}(X)\). Moreover, every evaluation map \(E_a:{\text {Aut}}(X) \rightarrow X\) is an affine isometry.

Proof

\({\text {Aut}}(X)\) is a Boolean group, and hence a \(\mathbb {Z}_2\)-linear space. By Proposition 4.3 (2) it is endowed with a norm, which is trivially a \(\mathbb {Z}_2\)-norm. By Proposition 4.3 (3) the action of \({\text {Aut}}(X)\) on X is transitive and faithful, and so X is an affine space over \({\text {Aut}}(X)\). By Proposition 4.3 (4) the map \(E_a\) is an isometry. Moreover, it is affine since its linear part is just \({\text {id}}_{{\text {Aut}}(X)}\). \(\square \)

Since every Boolean group is a \(\mathbb {Z}_2\)-linear space, and by choosing a basis I we obtain an isomorphism to \(\mathbb {Z}_2^{(I)}\), i.e. to the subspace of \(\mathbb {Z}_2^I\) consisting of all functions of finite support. We can equivalently view \(\mathbb {Z}_2^{(I)}\) as the family \(\mathcal {P}_{\omega }(I)\) of all finite subsets of I with the operation of symmetric difference: \(A \mathbin {\triangle }B = (A \setminus B) \cup (B \setminus A)\). We shall write just \(2^{(I)}\) and switch the perspective between \(\langle \mathbb {Z}_2^{(I)}, +\rangle \) and \(\langle \mathcal {P}_{\omega }(I), \mathbin {\triangle }\rangle \) as convenient, and similarly for \(2^I\). To turn \(2^{(I)}\) into a normed \(\mathbb {Z}_2\)-linear space means to provide a map \(\Vert \cdot \Vert :2^{(I)} \rightarrow [0, \infty )\) satisfying \(\Vert \emptyset \Vert = 0\) and \(\Vert x \mathbin {\triangle }y\Vert \leqslant \Vert x\Vert + \Vert y\Vert \) for \(x, y \in 2^{(I)}\).

Definition 4.6

We say that a metric space X is \(\mathbb {Z}_2\)-normable if it is isometric to a normed \(\mathbb {Z}_2\)-linear space, or equivalently to \(\langle 2^{(I)}, \Vert \cdot \Vert \rangle \) for some set I and a norm \(\Vert \cdot \Vert \). Note that every \(\mathbb {Z}_2\)-normable space is 1-homogeneous as witnessed by the translations.

Observation 4.7

We have shown that every (nonempty) homogeneous isosceles-free space is Boolean, that every Boolean metric space is \(\mathbb {Z}_2\)-normable, and that \(\mathbb {Z}_2\)-normable spaces admit a very concrete description. Figure 5 summarizes the implications between the properties considered.

Moreover, for a metric space X we have the following.

  1. (1)

    X is Boolean if and only if it is \(\mathbb {Z}_2\)-normable and uniquely 1-homogeneous.

  2. (2)

    X is homogeneous isosceles-free if and only if it is Boolean and 2-homogeneous.

Also, a discrete metric space (\(d(x, y) = 1\) for \(x \ne y\)) of size \(2^n\) for \(n \geqslant 2\) is clearly ultrahomogeneous and \(\mathbb {Z}_2\)-normable, but not uniquely 1-homogeneous. Example 5.8 gives a uniquely 1-homogeneous space that is not Boolean (or equivalently not \(\mathbb {Z}_2\)-normable). Example 5.17 gives a Boolean metric space that is not isosceles-free.

Fig. 5
figure 5

Implications between properties of metric spaces considered

Proof

Suppose that X is \(\mathbb {Z}_2\)-normable. Then for every \(x, y \in X\) there is a unique translation \(T \in {\text {Aut}}(X)\) such that \(T(x) = y\). If X is also uniquely 1-homogeneous, then all auto-isometries are translations, and so \({\text {Aut}}(X)\) is Abelian, and we may use Corollary 4.4.

Now suppose that X is Boolean and 2-homogeneous. Then X is uniquely 2-homogeneous, and so isosceles-free by Proposition 3.6. \(\square \)

We observe that it is easy to identify isosceles-free spaces among \(\mathbb {Z}_2\)-normable spaces.

Observation 4.8

A normed linear space X (a priori over any valued field) is isosceles-free if and only if the norm \(\Vert \cdot \Vert :X \rightarrow [0, \infty )\) is injective, and in that case the field is necessarily \(\mathbb {Z}_2\) since \(\{x, 0, -x\}\) forms an isosceles triangle unless \(x = -x\).

Altogether, we obtain the following summarizing theorem.

Theorem 4.9

Let I be a set and let \(\Vert \cdot \Vert :2^{(I)} \rightarrow [0, \infty )\) be an injective map satisfying \(\Vert \emptyset \Vert = 0\) and \(\Vert x \mathbin {\triangle }y\Vert \leqslant \Vert x\Vert + \Vert y\Vert \) for \(x, y \in 2^{(I)}\). By putting \(d(x, y):= \Vert x \mathbin {\triangle }y\Vert \) for \(x, y \in 2^{(I)}\) we obtain a homogeneous isosceles-free space. Moreover, every homogeneous isosceles-free space can be obtained this way up to an isometry.

Definition 4.10

We say that a \(\mathbb {Z}_2\)-normable space X is additive if it is isometric to the space \(2^{(I)}\) with the norm \(\Vert x\Vert = \sum _{i \in x} r_i = \sum _{i \in I} x(i) \cdot r_i\) for some \(\{r_i: i \in I\} \subseteq (0, \infty )\). We always have \(\Vert x \mathbin {\triangle }y\Vert \leqslant \Vert x\Vert + \Vert y\Vert \) in this case. The distance satisfies \(d(x, y) = \sum _{i \in I} |x(i) - y(i)| \cdot r_i\), so X embeds into \(\ell _1(I)\).

We say that a \(\mathbb {Z}_2\)-normable space X is monotone if it is isometric to the space \(2^{(I)}\) with a monotone norm, i.e. \(\Vert x\Vert \leqslant \Vert y\Vert \) for every \(x \subseteq y\). Clearly, every additive \(\mathbb {Z}_2\)-normable space is monotone.

Remark 4.11

The triangle inequality of the space \(\langle 2^{(I)}, \Vert \cdot \Vert \rangle \) expressed using the norm is

$$\begin{aligned} \Vert x \mathbin {\triangle }z\Vert \leqslant \Vert x \mathbin {\triangle }y\Vert + \Vert y \mathbin {\triangle }z\Vert \quad \hbox { for every}\ x, y, z \in 2^{(I)}, \end{aligned}$$

but it reduces to

$$\begin{aligned} \Vert x' \mathbin {\triangle }y'\Vert \leqslant \Vert x'\Vert + \Vert y'\Vert \quad \text {for every } x, y \in 2^{(I)} \end{aligned}$$

in every Boolean group with an invariant metric since we can put \(x' = x \mathbin {\triangle }y\) and \(y' = y \mathbin {\triangle }z\).

A different simplification of the original inequality is the fact that it is enough to verify it only for triples of pairwise disjoint sets. For every \(\{x_k: k < 3\} \subseteq X\) we put \(w:= \{i \in I: |\{k < 3: i \in x_k\}| \geqslant 2\}\). Then w is a finite set, the sets \(x_k \mathbin {\triangle }w\), \(k < 3\), are pairwise disjoint, and \(d(x_k, x_{k'}) = d(x_k \mathbin {\triangle }w, x_{k'} \mathbin {\triangle }w)\). The triangle inequality then reduces to

$$\begin{aligned} \Vert x \cup z\Vert \leqslant \Vert x \cup y\Vert + \Vert y \cup z\Vert \quad \text {for every pairwise disjoint } x, y, z \in 2^{(I)}. \end{aligned}$$

In particular, the norm is \(\cup \)-subadditive: \(\Vert x \cup y\Vert \leqslant \Vert x\Vert + \Vert y\Vert \) for xy disjoint, but it may not be monotone (see Example 4.17).

Example 4.12

Let \(r_n:= 2^n\) for \(n \in \omega \). The induced additive norm is the bijection \(2^{(\omega )} \rightarrow \omega \) corresponding to binary expansions of natural numbers. Hence we obtain the countable infinite discrete homogeneous isosceles-free space \(X_\omega = \langle 2^{(\omega )}, \Vert \cdot \Vert \rangle \). We can also consider the restricted finite spaces \(X_n = \langle 2^n, \Vert \cdot \Vert \rangle \). We have \({\text {Dist}}(X_n) = \{0, \ldots , 2^n - 1\}\).

Example 4.13

Let \(r_n:= 2^{-n}\) for \(n \in \omega \) and let \(\Vert \cdot \Vert \) be the corresponding additive norm on \(2^{(\omega )}\), which is a bijection onto the dyadic rational numbers in [0, 2). The corresponding homogeneous isosceles-free space is the dense subset \(2^{(\omega )}\) of the Cantor space \(2^\omega \) with the metric \(d(x, y) = \sum _{n \in \omega } |x(n) - y(n)| \cdot 2^{-n}\).

Note that the completion \(2^\omega \) of our homogeneous isosceles-free space \(2^{(\omega )}\) is uniquely 1-homogeneous and Boolean, but not 2-homogeneous and not isosceles-free. The 1-homogeneity follows from the fact that \(2^\omega \) is a normed \(\mathbb {Z}_2\)-linear space. Hence, \(2^\omega \) is Boolean if and only if it is uniquely 1-homogeneous. If \(f(x) = g(x)\) for \(x \in 2^\omega \) and \(f, g \in {\text {Aut}}(2^\omega )\), then \(f(h(0)) = g(h(0))\) for \(h \in {\text {Aut}}(2^\omega )\) with \(h(0) = x\), and so \(h^{-1}\circ f^{-1}\circ g \circ h\) is a an auto-isometry fixing 0. It is enough to show that \({\text {id}}_{2^\omega }\) is the only auto-isometry \(\phi \) fixing 0. This follows from the fact that every \(x \in 2^\omega \) that is not eventually constant is the unique element of norm \(\Vert x\Vert \), and so \(x = {\text {id}}\) on a dense subset of \(2^\omega \).

Let \(e_n, e'_n \in 2^\omega \) denote the characteristic function of \(\{n\}\) and of its complement, respectively. Then \(\Vert e_0\Vert = 1 = \Vert e'_0\Vert \), so the completion is not isosceles-free. Also, \(e_1\) is a mid-point of 0 and \(e'_0\), while there is no mid-point of 0 and \(e_0\), and so the completion is not 2-homogeneous.

Example 4.14

Let \(r_n:= 3^{-n}\) for \(n \in \omega \) and let \(\Vert \cdot \Vert \) be the corresponding additive norm on \(2^{(\omega )}\), which is injective. Similarly to the previous example, the corresponding homogeneous isosceles-free space is the dense subset \(2^{(\omega )}\) of the Cantor space \(2^\omega \) with the metric \(d(x, y) = \sum _{n \in \omega } |x(n) - y(n)| \cdot 3^{-n}\). However, this time the completion \(2^\omega \) is still a homogeneous isosceles-free space. This is because the norm \(\Vert x\Vert = \sum _{n \in \omega } x(n) \cdot 3^{-n}\) is injective on \(2^\omega \): if \(x(n) = y(n)\) for every \(n < n_0\) and \(x(n_0) < y(n_0)\), then \(\Vert x\Vert \leqslant \sum _{n > n_0} 3^{-n} = 3/2 \cdot 3^{-(n_0 + 1)} < 3^{-n_0} \leqslant \Vert y\Vert \).

Remark 4.15

It is known that the completion of a countable ultrahomogeneous metric sometimes is (as for the rational Urysohn space) and sometimes is not (see [16, Proposition 10]) ultrahomogeneous. The two very similar examples above demonstrate this phenomenon in the realm of isosceles-free homogeneous spaces.

In the next proposition we refine our results on extension operators (Proposition 3.14).

Proposition 4.16

Let X and Y be homogeneous isosceles-free spaces.

  1. (1)

    For every isometric embedding \(e:X \rightarrow Y\) the extension operator \(e_*:{\text {Aut}}(X) \rightarrow {\text {Aut}}(Y)\) is a linear isometric embedding.

  2. (2)

    Every isometric embedding \({\text {Aut}}(X) \rightarrow {\text {Aut}}(Y)\) mapping \({\text {id}}_X\) to \({\text {id}}_Y\) is an extension operator and hence linear, and every isometric embedding \(X \rightarrow Y\) is affine.

Proof

For every \(a \in X\) and \(f \in {\text {Aut}}(X)\), \(e_*(f)\) maps e(a) to e(f(a)), and so we have \(\Vert e_*(f)\Vert = d(e(a), e(f(a))) = d(a, f(a)) = \Vert f\Vert \). As a group homomorphism, \(e_*\) is linear. Together, a norm-preserving linear map is an isometric embedding.

For every embedding \(e:X \rightarrow Y\) we have that \(e = E_{e(a)} \circ e_* \circ E_a^{-1}\) by Proposition 3.14, and hence is affine as a composition of affine maps. On the other hand, every isometric embedding \(f:{\text {Aut}}(X) \rightarrow {\text {Aut}}(Y)\) such that \(f({\text {id}}_X) = {\text {id}}_Y\) is of the form \(e_*\), and so is linear. Namely, we take any \(a \in X\) and \(b \in Y\) and put \(e:= E_b \circ f \circ E_a^{-1}\). Since \(f({\text {id}}_X) = {\text {id}}_Y\), we have \(e(a) = E_b(f({\text {id}}_X)) = E_b({\text {id}}_Y) = b\), and so \(f = e_*\) by unique 1-homogeneity. \(\square \)

Example 4.17

There is a homogeneous isosceles-free space X that is not monotone. We take X to be \(2^{\{0, 1, 2\}}\) and define the norm so that \(\Vert 0\Vert = 0\), \(\{\Vert e_0\Vert , \Vert e_1\Vert , \Vert e_2\Vert \} = \{10, 11, 12\}\), \(\{\Vert e_0 + e_1\Vert , \Vert e_1 + e_2\Vert , \Vert e_2 + e_0\Vert \} = \{14, 15, 16\}\), and \(\Vert e_1 + e_2 + e_3\Vert = 13\). The norm is injective, and the triangle inequality is satisfied since the positive distances are in the interval [a, 2a] for \(a = 10\), so we have a homogeneous isosceles-free space. The given norm is obviously not monotone, but we need to show that the space is not isometric to \(2^{\{0, 1, 2\}}\) with a monotone norm. By homogeneity, it is enough to consider isometries fixing the zero vector, and such isometries are linear by Proposition 4.16. \(\{e_0, e_1, e_2\}\) is a linearly independent set of vectors of norm taking the smallest positive values from \({\text {Dist}}(X)\), and hence every isomorphism making the norm monotone would need to fix this set up to re-labelling. However, the vector \(e_0 + e_1 + e_2\) would need to be fixed as well by linearity, and so the other norm would not be monotone.

In the last part of this section we describe amalgamation classes associated to homogeneous isoceles-free spaces, as promised in Remark 3.18.

Let us call a triple \(\langle p, q, r\rangle \) of positive real numbers a triangle if \(p \leqslant q + r\) and \(q \leqslant r + p\) and \(r \leqslant p + q\). If \(p = q\), then 0 is the only r completing the triangle. Similarly, if \(p = 0\), then \(r = q\) is the only choice completing the triangle. These triangles are called degenerate, while triangles with \(p, q, r > 0\) are non-degenerate. Let \(T_{p, q, r}(a, b, c)\) denote the space \(\{a, b, c\}\) with the metric \(d(a, b) = p\), \(d(a, c) = q\), \(d(b, c) = r\). This notation automatically implies that if \(p = 0\), then \(a = b\), and so on. We write just \(T_{p, q, r}\) when the supporting set is irrelevant.

For a class \(\mathcal {F}\) of metric spaces we denote the set of distances \(\bigcup _{X \in \mathcal {F}} {\text {Dist}}(X) \subseteq [0, \infty )\) by \({\text {Dist}}(\mathcal {F})\). We also call \(\mathcal {F}\) hereditary if for every isometric embedding \(e:A \rightarrow B\) with \(B \in \mathcal {F}\) we have \(A \in \mathcal {F}\). This automatically means that \(\mathcal {F}\) is closed under isomorphic copies.

Proposition 4.18

Let \(\mathcal {F}\) be a class of isosceles-free metric spaces such that for every \(p, q \in {\text {Dist}}(\mathcal {F})\) there is \(A \in \mathcal {F}\) and \(a, b, c \in A\) such that \(d(a, b) = p\) and \(d(a, c) = q\). Then the following conditions are equivalent.

  1. (1)

    \(\mathcal {F}\) can be extended to a hereditary class \(\overline{\mathcal {F}}\) of isosceles-free spaces with the amalgamation property such that \({\text {Dist}}(\overline{\mathcal {F}}) = {\text {Dist}}(\mathcal {F})\).

  2. (2)

    We have

    1. (2a)

      for every \(p, q \in {\text {Dist}}(\mathcal {F})\) there is a unique \(t(p, q) \in {\text {Dist}}(\mathcal {F})\) such that \(\langle p, q, t(p, q)\rangle \) is a triangle and \(T_{p, q, t(p, q)}\) embeds into a member of \(\mathcal {F}\),

    2. (2b)

      for every \(p, q, p', q' \in {\text {Dist}}(\mathcal {F})\) with \(t(p, q) = t(p', q')\) we have \(t(p, p') = t(q, q')\).

  3. (3)

    There is a homogeneous isosceles-free space \(X_{\mathcal {F}}\) such that \({\text {Dist}}(X_\mathcal {F}) = {\text {Dist}}(\mathcal {F})\) and \({\text {Age}}(X_\mathcal {F}) \supseteq \mathcal {F}\).

Moreover, the class \(\overline{\mathcal {F}}\) and the space \(X_\mathcal {F}\) are unique, and \(\overline{\mathcal {F}} = {\text {Age}}(X_\mathcal {F})\).

Proof

Suppose (1) and let \(p, q \in {\text {Dist}}(\mathcal {F})\). We show that (2) holds. By the assumption there is some r such that \(T_{p, q, r}\) is embedded into a member of \(\mathcal {F}\). Since \(\overline{\mathcal {F}}\) is hereditary, we have \(T_{p, q, r}(a, b, c) \in \overline{\mathcal {F}}\). If \(T_{p, q, r'} \in \overline{\mathcal {F}}\) for some \(r' \ne r\), without loss of generality, we have \(T_{p, q, r'}(a, b, c') \in \overline{\mathcal {F}}\), necessarily with \(c' \ne c\). We view \(T_{p, q, r}(a, b, c)\) and \(T_{p, q, r'}(a, b, c')\) as one-point extensions of \(\{a, b\}\). By the amalgamation property it is possible to define \(d(c, c')\) so that \(T_{p, q, r}(a, b, c) \cup T_{p, q, r'}(a, b, c') \in \overline{\mathcal {F}}\), but this is impossible since \(\{a, c, c'\}\) would form an isosceles triangle as \(d(a, c) = q = d(a, c')\). Hence, t(pq) is well-defined and unique.

Next, let \(p', q' \in {\text {Dist}}(\mathcal {F})\) with \(t(p', q') = t(p, q) = r\). Hence, without loss of generality, \(T_{p, q, r}(a, b, c), T_{p', q', r}(a', b, c) \in \overline{\mathcal {F}}\). By the amalgamation property, their union is contained in a space A containing also the triangles \(T_{p, p', t(p, p')}(b, a, a')\) and \(T_{q, q', t(q, q')}(c, a, a')\). Hence, \(t(p, p') = d_A(a, a') = t(q, q')\).

Now suppose (2) in order to show that it implies (3). We put \(X_{\mathcal {F}}:= {\text {Dist}}(\mathcal {F})\), and \(p + q:= t(p, q)\) and \(\Vert p\Vert := p\) for \(p, q \in X_{\mathcal {F}}\). It is enough to show that \(+\) is a commutative associative addition with the neutral element 0, and that \(\Vert \cdot \Vert \) is an injective norm. By considering degenerate triangles, it is easy to see that 0 is the neutral element and that \(p = -p\) for every \(p \in X_{\mathcal {F}}\). Clearly, \(\Vert \cdot \Vert \) is injective and we have \(\Vert p\Vert = 0\) if and only if \(p = 0\). The triangle inequality for \(\Vert \cdot \Vert \) follows from the fact that every \(\langle p, q, t(p, q)\rangle \) is a triangle. The only missing property is the associativity of \(+\). For every \(p, q, r \in {\text {Dist}}(\mathcal {F})\) we have \(t(p, p + q) = q = t(q + r, r)\), and so by (2b) \(t(p, q + r) = t(p + q, r)\).

Finally, suppose (3) and put \(\overline{\mathcal {F}}:= {\text {Age}}(X_\mathcal {F})\). We show that (1) holds. Clearly, \(\overline{\mathcal {F}}\) is a hereditary class of isosceles-free spaces extending \(\mathcal {F}\) with \({\text {Dist}}(\overline{\mathcal {F}}) = {\text {Dist}}(\mathcal {F})\). The amalgamation property is also easy to see and follows from the homogeneity of \(X_\mathcal {F}\) as in classical Fraïssé theory [5, Theorem 7.1.7].

This finishes the proof of the equivalences.

Next we show the uniqueness of \(\overline{\mathcal {F}}\). On one hand, every \(A \in \overline{\mathcal {F}}\) satisfies \(d(b, c) = t(d(a, b), d(a, c))\) for every \(a, b, c \in A\). On the other hand, by induction, every such metric space A is a member of \(\overline{\mathcal {F}}\). Since \(\overline{\mathcal {F}}\) is hereditary and \({\text {Dist}}(\overline{\mathcal {F}}) = {\text {Dist}}(\mathcal {F})\), every at most two-point space with distances from \({\text {Dist}}(\mathcal {F})\) is in \(\mathcal {F}\). For every A of cardinality \(|A| \geqslant 3\) we write A as the disjoint union \(B \cup \{x\} \cup \{y\}\) for some \(x, y \in A\), and we observe that A embeds into any amalgamation of \(B \cup \{x\}\) and \(B \cup \{y\}\) in \(\overline{\mathcal {F}}\). This is because in any such amalgamation we have \(d(x, y) = t(d_A(b, x), d_A(b, y))\) for any \(b \in B\).

The uniqueness of \(X_\mathcal {F}\) follows from the fact that for any \(0 \in X_\mathcal {F}\) the map \(\Vert x\Vert := d(x, 0)\) is a bijection \(X_\mathcal {F}\rightarrow {\text {Dist}}(\mathcal {F})\) and we have \(d(x, y) = t(\Vert x\Vert , \Vert y\Vert )\) for every \(x, y \in X_\mathcal {F}\). \(\square \)

Remark 4.19

Note that the previous proposition covers also uncountable distance sets and uncountable limit spaces. It is the unique amalagamation that allows us to build uncountable homogeneous structures directly in this case.

Remark 4.20

It is known that the class \(\mathcal {F}_R\) of all finite metric spaces with distances from a set \(0 \in R \subseteq [0, \infty )\) has the amalgamation property if and only if it satisfies the four-values condition [2, Proposition 1.4], see also [21, Theorem 1.4]. In the context of isoceles-free spaces the analogue of the four-values conditions is the condition (2b). It is formally similar and it also corresponds to the amalgamation of two one-point extensions over a two-point space. In fact, when we restrict \(\mathcal {F}_R\) to the subclass \(\mathcal {F}_{R, t}\) of all isosceles-free spaces compatible with the given scheme t (2a), then (2b) characterizes the amalgamation property as well.

Corollary 4.21

Let \(0 \in R \subseteq [0, \infty )\) and let \(t:R^2 \rightarrow R\) be such that for every \(p, q \in R\) we have

  1. (1)

    \(t(p, q) = t(q, p) \leqslant p + q\),

  2. (2)

    \(t(t(p, q), q) = t(p, 0) = p\),

Moreover, let \(\mathcal {F}_{R, t}\) be the class of all finite metric spaces A such that for every \(a, b, c \in A\) we have \(t(d(a, b), d(a, c)) = d(b, c)\). Then \(\mathcal {F}_{R, t}\) is a hereditary class of isosceles-free spaces with \({\text {Dist}}(\mathcal {F}_{R, t}) = R\), and it has the amalgamation property if and only if t satisfies 4.18 (2b).

Proof

Clearly, \(\mathcal {F}_{R, t}\) is a hereditary class of metric spaces. Note that we have \(t(p, p) = t(t(0, p), p) = 0\) for every \(p \in R\), and also \(t(p, q) \notin \{p, q\}\) if \(p, q > 0\) since \(t(p, q) = q\) would imply \(p = t(t(p, q), q) = t(q, q) = 0\). Hence, all members of \(\mathcal {F}_{R, t}\) are isosceles-free. It is easy to check that the properties of t imply that the triangle \(T_{p, q, t(p, q)}(a, b, c)\) is a member of \(\mathcal {F}_{R, t}\), and hence \({\text {Dist}}(\mathcal {F}_{R, t}) = R\) and we can apply Proposition 4.18. Since \(\mathcal {F}_{R, t}\) is the largest class compatible with the scheme t, we have \(\overline{\mathcal {F}_{R, t}} = \mathcal {F}_{R, t}\) if the amalgamation extension exists. Hence the claim follows from Proposition 4.18 (2). \(\square \)

Example 4.22

We conclude with an example of a finite set of distances \(0 \in R \subseteq [0, \infty )\) with a scheme \(t:R^2 \rightarrow R\) satisfying the conditions of the previous corollary, but not 4.18 (2b). We shall take \(R \subseteq \{0\} \cup [1, 2]\) so that the triangle inequality becomes trivial. In that case t satisfying the conditions can be equivalently described as a family \(\mathcal {T}\) of 3-point subsets of \(R \setminus \{0\}\) such that every 2-point subset of \(R \setminus \{0\}\) is contained in exactly one member of \(\mathcal {T}\). Let us pick any 9-point subset \(R {\setminus } \{0\} \subseteq [1, 2]\) and identify it with the 2-dimensional linear space \(\mathbb {Z}_3 \times \mathbb {Z}_3\) over the 3-element field. Taking \(\mathcal {T}\) consisting of the twelve 3-point affine lines in \(\mathbb {Z}_3 \times \mathbb {Z}_3\) works. The condition 4.18 (2b) fails as we have e.g. \(t(\langle 0, 1\rangle , \langle 0, 2\rangle ) = \langle 0, 0\rangle = t(\langle 1, 0\rangle , \langle 2, 0\rangle )\), while \(t(\langle 0, 1\rangle , \langle 1, 0\rangle ) = \langle 2, 2\rangle \ne \langle 1, 1\rangle = t(\langle 0, 2\rangle , \langle 2, 0\rangle )\).

5 Decompositions of homogeneous spaces

In this section we study two invariant decompositions of homogeneous spaces based on non-repeating distances. This will give more insight into the structure of homogeneous spaces that are close to being isosceles-free and will be applied in Sect. 6.

Definition 5.1

We say that an equivalence \(\sim \) on a metric space X and the corresponding decomposition \(X/{\sim }\) are invariant if for every automorphism \(f \in {\text {Aut}}(X)\) and a component \(C \in X/{\sim }\) we have that f[C] is a component. Equivalently, \(x \sim y\) implies \(f(x) \sim f(y)\) for every \(x, y \in X\).

By \({\text {Aut}}_*(X)\) we denote the family of all automorphisms \(f \in {\text {Aut}}(X)\) setwise fixing all components, i.e. \(f[C] = C\) for every \(C \in X/{\sim }\).

Proposition 5.2

Let \(\sim \) be an invariant decomposition of a metric space X.

  1. (1)

    \({\text {Aut}}_*(X)\) is a normal subgroup of \({\text {Aut}}(X)\).

  2. (2)

    The restriction map \(\rho _C:{\text {Aut}}_*(X) \rightarrow {\text {Aut}}(C)\), \(f\mapsto f|_C\), is a group homomorphism.

  3. (3)

    If X is 1-homogeneous, all components \(C \in X/{\sim }\) are isometric.

  4. (4)

    If X is n-homogeneous or ultrahomogeneous, so is every component \(C \in X/{\sim }\), and this is witnessed by the subgroup \({\text {im}}(\rho _C) \leqslant {\text {Aut}}(C)\).

Proof

  1. (1)

    Clearly, \({\text {Aut}}_*(X) \subseteq {\text {Aut}}(X)\) is a subgroup. Also for every \(f \in {\text {Aut}}_*(X)\), \(g \in {\text {Aut}}(X)\), and a component C, we have \(g[f[g^{-1}[C]] =: g[f[C']] = g[C'] = g[g^{-1}[C]] = C\), and so \({\text {Aut}}_*(X)\) is a normal subgroup.

  2. (2)

    This is clear.

  3. (3)

    For every two components \(C, C'\) we pick points \(x \in C\) and \(y \in C'\). Since X is 1-homogeneous there is \(f \in {\text {Aut}}(X)\) such that \(f(x) = y\) and so \(f[C] = C'\), showing that C and \(C'\) are isometric.

  4. (4)

    This follows from Proposition 2.3 since every component is quasi-invariant. \(\square \)

In the following, we define two invariant decompositions of homogeneous spaces related to isosceles-free spaces.

Definition 5.3

Let X be a 1-homogeneous space. We say that a distance \(s \in {\text {Dist}}(X)\) is singleton if for every \(x \in X\) there exists a unique \(y \in Y\) such that \(d(x, y) = s\), i.e. there is no isosceles triangle with side lengths \(\langle s, s, t\rangle \) in X (for \(t > 0\)). By 1-homogeneity, it is enough if the defining condition holds at a single point \(x \in X\).

Let \(S_X \subseteq {\text {Dist}}(X)\) be the set of all singleton distances in X. Clearly, X is isosceles-free if and only if \(S_X = {\text {Dist}}(X)\).

Theorem 5.4

(Decomposition into isosceles-free components) Let X be a 2-homogeneous space and let \(x \sim y\) if \(d(x, y) \in S_X\) for \(x, y \in X\). We have that \(\sim \) is an invariant equivalence relation inducing a decomposition of X into pairwise isometric homogeneous isosceles-free spaces.

Proof

Symmetry and reflexivity are trivial, transitivity follows from the fact that if we assume \(x\sim y\sim z\) and \(x\not \sim z\), this means that \(d(x,z)\notin S\), therefore (due to homogeneity) there exists some point \(w\in X\) with \(d(x,w)=d(x,z)\), meaning the function \(f:\{x,z\}\rightarrow \{x,w\}\) which fixes x and maps z to w is an isometry. However, due to 2-homogeneity, we now know that there exists an automorphism F which extends f. It follows that \(d(x,y)=d(x,F(y))\), but since we assumed \(x\sim y\), this means \(y=F(y)\). Analogously, \(d(y,z)=d(y,F(z))=d(y,w)\), but because we assumed \(y\sim z\), this implies \(z=w\).

Clearly, the equivalence \(\sim \) is invariant since isometries preserve distances, and the components \(C \in X/{\sim }\) are isosceles-free. By Proposition 5.2, they are also pairwise isometric and 2-homogeneous, and hence ultrahomogeneous by Proposition 3.4. \(\square \)

A simple example of the decomposition into isosceles-free components follows. It also shows that the map \(\rho _C:{\text {Aut}}_*(X) \rightarrow {\text {Aut}}(C)\) is not necessarily injective.

Example 5.5

Let \(C_4 = \{1, 2, 3, 4\}\) be the four element circle graph considered in Example 2.5. Then the isosceles-free components of \(C_4\) are \(C = \{1, 3\}\) and \(C' = \{2, 4\}\), the pairs of antipodal points in \(C_4\), with all distances between two components being equal to one.

Now \({\text {Aut}}_*(C_4) = \{(1\ 3)^i (2\ 4)^j \in \Sigma _4: i, j \in \{0, 1\}\}\) is a 4-element group, whereas \({\text {Aut}}(C) = \{(1\ 3)^i: i \in \{0, 1\}\}\) and \({\text {Aut}}(C') = \{(2\ 4)^i: i \in \{0, 1\}\}\) are both 2-element groups. Hence, the restriction maps \(\rho _C, \rho _{C'}\) are surjective, but not injective.

We define another decomposition, which is in a sense dual to the previous one.

Theorem 5.6

(Decomposition into isosceles-generated components) Let X be a 1-homogeneous space. Let \(\sim \) be the equivalence generated by the relation \(x \sim y\) if there is \(z \ne y\) such that \(d(x, y) = d(x, z)\), i.e. we identify points along non-singleton distances, or equivalently collapse all non-degenerate isosceles triangles.

  1. (1)

    The equivalence \(\sim \) induces an invariant decomposition into isometric 1-homogeneous components. In particular, automorphisms map components onto components.

  2. (2)

    If \(|X/{\sim }| \geqslant 2\), then X is uniquely 1-homogeneous.

  3. (3)

    For every \(f \in {\text {Aut}}(X)\) either all components C are fixed by f (setwise), or none of them are. In the latter case we have \(f \circ f = {\text {id}}\).

  4. (4)

    For every \(C \in X/{\sim }\) the homomorphism \(\rho _C:{\text {Aut}}_*(X) \rightarrow {\text {Aut}}(C)\) is an embedding.

  5. (5)

    For every \(h \in {\text {Aut}}_*(X)\) and \(f \in {\text {Aut}}(X) {\setminus } {\text {Aut}}_*(X)\) we have \(f \circ h \circ f^{-1} = h^{-1}\).

  6. (6)

    If \(|X/{\sim }| \geqslant 3\), then \({\text {Aut}}(X)\) is Boolean, i.e. X is a Boolean metric space.

  7. (7)

    If \(|X/{\sim }| \geqslant 2\), then \({\text {Aut}}_*(X)\) is Abelian.

Proof

  1. (1)

    Clearly, a distance d(xy) is non-singleton from the point of view of x if and only if it is non-singleton from the point of view of y as the space X is 1-homogeneous. Also then, d(f(x), f(y)) is non-singleton for every \(f \in {\text {Aut}}(X)\). Hence, the generating symmetric relation and so its reflexive transitive closure is preserved by automorphisms, and we have an invariant decomposition. The rest follows from Proposition 5.2.

  2. (2)

    Let \(f \in {\text {Aut}}(X)\) such that \(f(x) = y\). For any \(x'\) from a different component than x, we have that \(d(x, x')\) is a singleton distance, and so \(f(x')\) is the unique point \(y'\) such that \(d(y, y') = d(x, x')\). For every \(x'' \sim x\) we have that \(x''\) is from a different component than \(x'\), and we can apply the same argument for \(x', x''\).

  3. (3)

    Suppose \(y:= f(x) \not \sim x\) for some \(x \in X\). Since \(d(x, y) = d(y, f(y))\) is a singleton distance, we have \(f(y) = x\). Hence, f swaps the components \(C_x\) and \(C_y\) of x and y. We will show that \(f[C] \ne C\) for every component C, and \(f \circ f = {\text {id}}\) will follow as we can repeat the above argument for any point \(x \in X\).

    Let \(C_z \ni z\) be a component different from \(C_x\) and \(C_y\). The distances \(\langle a, b, c\rangle := \langle d(x, y), d(y, z), d(z, x)\rangle \) are singleton, and hence pairwise different. Moreover, by 1-homogeneity for every point \(w \in X\) and all distinct distances \(\{i, j\} \subseteq \{a, b, c\}\) there are unique points \(w_i, w_j\) with \(d(w, w_i) = i\) and \(d(w, w_j) = j\), and necessarily \(d(w_i, w_j) = k\) where \(\{i, j, k\} = \{a, b, c\}\). By applying this to \(w = y\), we have \(d(y, z) = b\), \(d(y, f(z)) = d(f(x), f(z)) = d(x, z) = c\), and so \(d(z, f(z)) = a\). Hence, the unique automorphism \(g \in {\text {Aut}}(X)\) mapping \(z \mapsto x\) also maps \(f(z) \mapsto y\). It follows that \(z \not \sim f(z)\) since otherwise we would have \(x \sim y\) as g preserves the equivalence \(\sim \).

  4. (4)

    The map \(\rho _C\) is injective by (2) if there are at least two components and trivially if there is only one component.

  5. (5)

    We have \(h \circ f \in {\text {Aut}}(X) {\setminus } {\text {Aut}}_*(X)\), and so \((h \circ f)^2 = {\text {id}}\) by (3). On the other hand, \(f^2 = {\text {id}}\) and \((h \circ f)^2 = h \circ f \circ h \circ f = h \circ (f \circ h \circ f^{-1})\). Together, this shows \(h \circ (f \circ h \circ f^{-1}) = {\text {id}}\), and so \(f \circ h \circ f^{-1} = h^{-1}\).

  6. (6)

    We already know that \(f^2 = {\text {id}}\) for \(f \in {\text {Aut}}(X) {\setminus } {\text {Aut}}_*(X)\). Let \(h \in {\text {Aut}}_*(X)\). Suppose \(C_0, C_1, C_2\) are distinct components of X. There are \(f_1, f_2 \in {\text {Aut}}(X)\) swapping \(C_0\) with \(C_1\) and \(C_0\) with \(C_2\), respectively. Hence, \(f_2 \circ f_1\) moves \(C_1\) onto \(C_2\), and so is not a member of \({\text {Aut}}_*(X)\). On one hand, \((f_2 \circ f_1) \circ h \circ (f_2 \circ f_1)^{-1} = h^{-1}\). On the other hand, \((f_2 \circ f_1) \circ h \circ (f_2 \circ f_1)^{-1} = f_2 \circ (f_1 \circ h \circ f_1^{-1}) \circ f_2^{-1} = (h^{-1})^{-1} = h\). Hence, \(h^{-1} = h\) and \(h^2 = {\text {id}}\).

  7. (7)

    Let \(h, k \in {\text {Aut}}_*(X)\). Since \(|X/{\sim }| \geqslant 2\), there is an \(f \in {\text {Aut}}(X) \setminus {\text {Aut}}_*(X)\). We have \(h \circ f \notin {\text {Aut}}_*(X)\). On one hand, \((h \circ f) \circ k \circ (h \circ f)^{-1} = k^{-1}\). On the other hand, \((h \circ f) \circ k \circ (h \circ f)^{-1} = h \circ (f \circ k \circ f^{-1}) \circ h^{-1} = h \circ k^{-1} \circ h^{-1}\). Together, \(h \circ k^{-1} \circ h^{-1} = k^{-1}\) and \(k \circ h = h \circ k\). \(\square \)

Definition 5.7

We say that a metric space is isosceles-generated if its decomposition into isosceles-generated components has at most one component.

Example 5.8

Given \(n \in \mathbb {N}_+\), we define the space \(D_n\) as follows. We take two copies of the cyclic space \(C_n\) from Example 2.5 and define the distances in \(D_n = C_n \times 2\) between the copies as follows: \(d(\langle i, 0\rangle , \langle j, 1\rangle ):= q_{j - i}\) for every \(i, j \in C_n\), where \(q_k\), \(k \in \mathbb {Z}_n\), are distinct distances not in \({\text {Dist}}(C_n) = \{0, \ldots , \left\lfloor n/2\right\rfloor \}\) suitable for the triangle inequality, i.e. \(0 < |q_i - q_j| \leqslant 1\) and \(q_i > \left\lfloor n/2\right\rfloor \) for every \(i, j \in \mathbb {Z}_n\). We choose e.g. \(q_k:= \left\lfloor n/2\right\rfloor + 1 + k/n\) for \(k \in \mathbb {Z}_n\).

The space \(D_n\) is 1-homogeneous: We know that \({\text {Aut}}(C_n)\) consists of rotations \(\Phi _k:i \mapsto i + k\) and reflections \(\Psi _k:i \mapsto k - i\) for \(k \in \mathbb {Z}_n\). Let \(\sigma :2 \rightarrow 2\) denote the unique transposition. For every \(k \in \mathbb {Z}_n\) the maps \(\Phi _k \times {\text {id}}\) and \(\Psi _k \times \sigma \) are automorphisms of \(D_n\), as the following computations show for every \(i, j, k \in \mathbb {Z}_n\), \(x \in 2\), \(f \in {\text {Aut}}(C_n)\), \(g \in {\text {Aut}}(2)\):

$$\begin{aligned} d\bigl (\langle f(i), g(x)\rangle , \langle f(j), g(x)\rangle \bigr )&= d_{C_n}(f(i), f(j)) = d_{C_n}(i, j) = d(\langle i, x\rangle , \langle j, x\rangle ), \\ d\bigl (\langle \Phi _k(i), {\text {id}}(0)\rangle , \langle \Phi _k(j), {\text {id}}(1)\rangle \bigr )&= q_{\Phi _k(j) - \Phi _k(i)} = q_{(k + j) - (k + i)} = q_{j - i} = d(\langle i, 0\rangle , \langle j, 1\rangle ), \\ d\bigl (\langle \Psi _k(i), \sigma (0)\rangle , \langle \Psi _k(j), \sigma (1)\rangle \bigr )&= q_{\Psi _k(i) - \Psi _k(j)} = q_{(k - i) - (k - j)} = q_{j - i} = d(\langle i, 0\rangle , \langle j, 1\rangle ). \end{aligned}$$

We consider the decomposition into isosceles-generated components. Since in \(C_n\) every point has the same distance to both its “neighbours”, the space \(C_n\) is isosceles-generated. As \(D_n\) retains the distances within the copies of \(C_n\) and as the distances \(q_k\) are singleton, the isosceles-generated components of \(D_n\) are the sets \(C_n\times \{0\}\) and \(C_n\times \{1\}\). Hence \(D_n\) consists of two isosceles-generated components, and so is uniquely 1-homogeneous.

We see that \({\text {Aut}}_*(D_n) = \{\Phi _k \times {\text {id}}: k \in \mathbb {Z}_n\}\), and so the natural map \(\rho :{\text {Aut}}_*(D_n) \rightarrow {\text {Aut}}(C_n)\) is not surjective. Also for \(n \geqslant 3\), \(\mathbb {Z}_n \leqslant {\text {Aut}}(D_n)\) is not a Boolean group, and so \(D_n\) is not a Boolean metric space.

Remark 5.9

The two extreme cases of the decomposition of a 1-homogeneous space into isosceles-generated components are as follows. The components are singletons if and only if the space is isosceles-free, and if there is only one component, the space is isosceles-generated. Note that for a 2-homogeneous metric space (so both decompositions make sense) the situation is always extreme, see Theorem 5.19.

Next we consider the question whether for the decomposition into isosceles-generated components the normal subgroup \({\text {Aut}}_*(X) \leqslant {\text {Aut}}(X)\) induces a decomposition of \({\text {Aut}}(X)\) into a semi-direct product. In the following we show that it is indeed the case, and moreover we endow the set of components \(X/{\sim }\) with a metric turning it into a homogeneous isosceles-free space.

Theorem 5.10

Let X be a 1-homogeneous space, and let \(X/{\sim }\) be its decomposition into isosceles-generated components. For \(r, q \in {\text {Dist}}(X)\) let us put \(r \sim q\) if there are points \(x, x_r, x_q \in X\) such that \(d(x, x_r) = r\), \(d(x, x_q) = q\), and \(x_r \sim x_q\). For every \(R \in {\text {Dist}}(X)/{\sim }\) let us pick a distance \(q_R \in [0, \infty )\) such that \(q_{0/{\sim }} = 0\), \(q_R \in [a, 2a]\) for every \(R \ne 0/{\sim }\) and fixed \(a > 0\), and such that \(R \mapsto q_R\) is injective. For all components \(C, C' \in X/{\sim }\) we put \(d(C, C'):= q_R\) where \(d(x, y) \in R\) for any \(x \in C\) and \(y \in C'\).

  1. (1)

    The relation \(\sim \) is a well-defined equivalence on \({\text {Dist}}(X)\), and for every \(x, y \in X\) we have \(x \sim y\) if and only if \(d(x, y) \sim 0\).

  2. (2)

    We can always choose the distances \(q_R\) as described, and the induced map d is a well-defined metric on \(X/{\sim }\) turning it into a homogeneous isosceles-free space.

For every \(f \in {\text {Aut}}(X)\) let \(\tilde{f}\) denote the induced bijection on \(X/{\sim }\).

  1. (3)

    The map \(Q:f \mapsto \tilde{f}\) is a surjective homomorphism \({\text {Aut}}(X) \rightarrow {\text {Aut}}(X/{\sim })\) inducing an isomorphism \({\text {Aut}}(X)/{{\text {Aut}}_*(X)} \rightarrow {\text {Aut}}(X/{\sim })\).

By a section we mean a group homomorphism \(S:{\text {Aut}}(X/{\sim }) \rightarrow {\text {Aut}}(X)\) (necessarily an embedding) such that \(Q \circ S = {\text {id}}_{{\text {Aut}}(X/{\sim })}\), i.e. a section selects a representative \(f \in {\text {Aut}}(X)\) for every \(\tilde{f} \in {\text {Aut}}(X/{\sim })\) in a coherent way.

  1. (4)

    For every section S we have that \({\text {Aut}}(X)\) is the semidirect product \({\text {Aut}}_*(X) \rtimes {\text {im}}(S)\).

  2. (5)

    For every \(\mathbb {Z}_2\)-linear base \(B \subseteq {\text {Aut}}(X/{\sim })\) and every map \(\beta :B \rightarrow {\text {Aut}}(X)\) choosing a representative \(\beta (f) \in {\text {Aut}}(X)\) with \(Q(\beta (f)) = f\), there is a unique group embedding \(S_\beta :{\text {Aut}}(X/{\sim }) \rightarrow {\text {Aut}}(X)\) extending \(\beta \), which is necessarily a section. Hence, \({\text {Aut}}(X) \cong {\text {Aut}}_*(X) \rtimes {\text {Aut}}(X/{\sim })\).

Proof

  1. (1)

    The relation \(\sim \) on \({\text {Dist}}(X)\) is clearly reflexive and symmetric. To show transitivity, suppose that a triple \(\langle x, x_r, x_q\rangle \) witnesses \(r \sim q\) and that \(\langle y, y_q, y_p\rangle \) witnesses \(q \sim p\). By 1-homogeneity there is an automorphism f such that \(f(x) = y\). Since \(d(y,f(x_q)) = d(x, x_q) = q = d(y, y_q)\), we have \(f(x_r) \sim f(x_q) \sim y_q \sim y_p\), and so \(r \sim p\).

    Finally, for every \(x, y \in X\), if \(x \sim y\), then \(\langle x, x, y\rangle \) witnesses that \(0 = d(x, x) \sim d(x, y)\). On the other hand, if \(d(x, y) \sim 0\), then there are \(x' \sim y' \in X\) such that \(d(x, y) = d(x', y')\). By 1-homogeneity there is \(f \in {\text {Aut}}(X)\) such that \(f(x) = x'\). We have \(d(x', f(y)) = d(x, y) = d(x', y')\), and so \(f(y) \sim y' \sim x' = f(x)\) and \(x \sim y\).

  2. (2)

    We can always pick the distances \(q_R\) as described since \(|{\text {Dist}}(X/{\sim })| \leqslant |{\text {Dist}}(X)| \leqslant |\mathbb {R}| = |\{0\} \cup [a, 2a]|\) for any \(a > 0\).

    The map d is well-defined since for every \(x, x' \in C\) and \(y, y' \in C'\) we have \(d(x, y) \sim d(x, y')\) as witnessed by \(\langle x, y, y'\rangle \) and \(d(x, y') \sim d(x', y')\) as witnessed by \(\langle y', x, x'\rangle \). Clearly, d is symmetric, and \(d(C, C) = 0\) for every component C since \(q_{0/{\sim }} = 0\). Also if \(d(C, C') = 0\), then for any \(x \in C\) and \(y \in C'\) we have \(d(x, y) \sim 0\), and so \(x \sim y\) by (1) and \(C = C'\). Finally, d trivially satisfies the triangle inequality since \({\text {Dist}}(X/{\sim }) \subseteq \{0\} \cup [a, 2a]\).

    To show that the space \(X/{\sim }\) is isosceles-free, suppose \(d(C, C') = d(C, C'') > 0\). For any \(x \in C\), \(x' \in C'\), and \(x'' \in C''\) we have \(d(x, x') \sim d(x, x'')\), and so there is a witnessing triple \(\langle y, y', y''\rangle \). By 1-homogeneity there is \(f \in {\text {Aut}}(X)\) such that \(f(x) = y\). Since the distances \(d(x, x')\) and \(d(x, x'')\) are singleton, we have \(f(x') = y'\) and \(f(x'') = y''\), and so \(y' \sim y''\) implies \(x' \sim x''\) and \(C' = C''\).

    \(X/{\sim }\) is 1-homogeneous since for all components \(C \ni x\) and \(C' \ni y\) there is \(g \in {\text {Aut}}(X)\) such that \(g(x) = y\), and so \(\tilde{g}(C) = C'\), where \(\tilde{g}\) is the induced bijection on \(X/{\sim }\). We have \(\tilde{g} \in {\text {Aut}}(X/{\sim })\) by (3).

  3. (3)

    For every \(f \in {\text {Aut}}(X)\) we have \(\tilde{f} \in {\text {Aut}}(X/{\sim })\) since for all points and components \(x \in C\) and \(y \in C'\) we have \(d(\tilde{f}(C), \tilde{f}(C')) = q_{d(f(x), f(y))/{\sim }} = q_{d(x, y)/{\sim }} = d(C, C')\). Clearly, the assignment \(f \mapsto \tilde{f}\) preserves composition and the identity, and so \(Q:{\text {Aut}}(X) \rightarrow {\text {Aut}}(X/{\sim })\) is a group homomorphism.

    Let \(g \in {\text {Aut}}(X/{\sim })\) and let \(x \in C \in X/{\sim }\). We take \(x' \in g(C)\) and consider \(f \in {\text {Aut}}(X)\) such that \(f(x) = x'\). We have \(\tilde{f}(C) = \tilde{g}(C)\), and hence \(\tilde{f} = \tilde{g}\) by Corollary 3.3 since \(X/{\sim }\) is homogeneous isosceles-free by (2). Hence, Q is a surjection. Finally, \(\tilde{f} = {\text {id}}_{X/{\sim }}\) if and only if f setwise fixes all components, i.e. \(f \in {\text {Aut}}_*(X)\). Hence, Q induces an isomorphism \({\text {Aut}}(X)/{{\text {Aut}}_*(X)} \rightarrow {\text {Aut}}(X/{\sim })\).

  4. (4)

    This follows from standard group-theoretic facts. We already know that \({\text {Aut}}_*(X) \leqslant {\text {Aut}}(X)\) is a normal subgroup. We have \({\text {Aut}}_*(X) \cap {\text {im}}(S) = \{{\text {id}}\}\) since every \(f \in {\text {Aut}}(X)\) such that \(\tilde{f} \ne {\text {id}}_{X/{\sim }}\) moves components, and so \(f \notin {\text {Aut}}_*(X)\). We have \({\text {Aut}}_*(X) \circ {\text {im}}(S) = {\text {Aut}}(X)\) since for every \(f \in {\text {Aut}}(X)\) and \(g:= S(\tilde{f}) \in {\text {im}}(S)\) we have \(f = (f \circ g^{-1}) \circ g\) and \(f \circ g^{-1} \in {\text {Aut}}_*(X)\) as \(Q(f \circ g^{-1}) = Q(f) \circ Q(g)^{-1} = \tilde{f} \circ \tilde{f}^{-1} = {\text {id}}\).

  5. (5)

    By Theorem 4.9 we know that \({\text {Aut}}(X/{\sim })\) is indeed a \(\mathbb {Z}_2\)-linear space. The subgroup \(H \leqslant {\text {Aut}}(X)\) generated by \({\text {im}}(\beta )\) is Boolean since every composition \(g:= \beta (f_1) \circ \cdots \circ \beta (f_n)\) for \(f_i \in {\text {Aut}}(X/{\sim })\), \(i \leqslant n\), satisfies \(g^2 = {\text {id}}\). This is obvious for \(n = 0\), and otherwise we have \(Q(g) = f_1 \circ \cdots \circ f_n \ne {\text {id}}\) since B is linearly independent, and so \(g \not \in {\text {Aut}}_*(X)\). Hence, we have a map \(\beta :B \rightarrow H\) into a \(\mathbb {Z}_2\)-linear space, which has a unique linear extension \(S_\beta :{\text {Aut}}(X/{\sim }) \rightarrow H\), which is the same thing as a group homomorphism extension \({\text {Aut}}(X/{\sim }) \rightarrow {\text {Aut}}(X)\). \(S_\beta \) is necessarily a section since \(Q \circ S_\beta = {\text {id}}\) holds on B and so on the subgroup generated by B.

\(\square \)

From the previous theorem and from the structure of finite homogeneous isosceles-free spaces (Theorem 4.9) we obtain the following.

Corollary 5.11

Let X be a 1-homogeneous space, and let \(X/{\sim }\) be its decomposition into isosceles-generated components. We have that the normal subgroup \({\text {Aut}}_*(X) \leqslant {\text {Aut}}(X)\) is complemented, and so \({\text {Aut}}(X)\) decomposes as a semidirect product \({\text {Aut}}_*(X) \rtimes ({\text {Aut}}(X)/{\text {Aut}}_*(X))\). Moreover, if X is finite and nonempty, then \(|X/{\sim }| = 2^m\) for some \(m \in \omega \).

In the following we generalize the construction from Example 5.8 and show that every 1-homogeneous space with exactly two isosceles-generated components arises this way.

Construction 5.12

(Rainbow duplicate) Let X be a 1-homogeneous space and let \(H \leqslant {\text {Aut}}(X)\) be an Abelian subgroup such that for every \(x, y \in X\) there is a unique element \(h \in H\) (denoted by \(h_x^y\)) such that \(h(x) = y\). We define the corresponding rainbow duplicate of X as the metric space \(X \times _r 2\) with the distance

$$\begin{aligned} d(\langle x, 0\rangle , \langle y, 0\rangle )&= d(\langle x, 1\rangle , \langle y, 1\rangle ) = d_X(x, y), \\ d(\langle x, 0\rangle , \langle y, 1\rangle )&= r(h_x^y), \end{aligned}$$

where \(r:H \rightarrow (0, \infty ) \setminus {\text {Dist}}(X)\) is an injective map such that triangle inequality in \(X \times _r 2\) is satisfied. We also suppose there exists a map \(g \in {\text {Aut}}(X)\) such that \(g \circ g = {\text {id}}\) and \(g \circ h \circ g^{-1} = h^{-1}\) for every \(h \in H\).

  1. (1)

    If \(|r(h) - r(h')| \leqslant \min ({\text {Dist}}(X) {\setminus } \{0\})\) and \(r(h) \geqslant \max ({\text {Dist}}(X))\) for every \(h, h' \in H\), then d satisfies the triangle inequality.

  2. (2)

    We have \({\text {Dist}}(X \times _r 2) = {\text {Dist}}(X) \cup {\text {im}}(r)\), which is a disjoint union.

  3. (3)

    The decomposition of \(X \times _r 2\) into isosceles-generated components refines \(\{X \times \{0\},[1] X \times \{1\}\}\), and we have equality if and only if X is isosceles-generated.

  4. (4)

    The map \(e_H:h \mapsto h \times {\text {id}}\) is a group embedding \(H \rightarrow {\text {Aut}}(X \times _r 2)\).

  5. (5)

    The map \(g \times \sigma \) (where \(\sigma :2 \rightarrow 2\) is the transposition) generates a copy of \(\mathbb {Z}_2\) in \({\text {Aut}}(X \times _r 2)\).

  6. (6)

    The rainbow duplicate \(X \times _r 2\) is 1-homogeneous, and the maps above induce an isomorphism \(H \rtimes \mathbb {Z}_2 \rightarrow {\text {Aut}}(X \times _r 2)\).

Proof

  1. (1)

    The two triangles to check are of the form \(\langle x, 0\rangle , \langle y, 0\rangle , \langle z, 1\rangle \) and \(\langle x, 0\rangle , \langle y, 1\rangle , \langle z, 1\rangle \) for \(x, y, z \in X\), corresponding to the triangles of distances \(d_X(x, y), r(h_x^z), r(h_y^z)\) and \(r(h_x^y), r(h_x^z), d_X(y, z)\), respectively.

  2. (2)

    This is clear.

  3. (3)

    This is also clear.

  4. (4)

    It is enough to show that \(f \times {\text {id}}\) preserves distances for every \(f \in H\). We have

    $$\begin{aligned} d(\langle f(x), i\rangle , \langle f(y), i\rangle )&= d_X(f(x), f(y)) = d_X(x, y) = d(\langle x, i\rangle , \langle y, i\rangle ), \hbox { for}\ i \in \{0, 1\}, \\ d(\langle f(x), 0\rangle , \langle f(y), 1\rangle )&= r(h_{f(x)}^{f(y)}) = r(h_x^y) = d(\langle x, 0\rangle , \langle y, 1\rangle ). \end{aligned}$$

    The equality \(h_{f(x)}^{f(y)} = h_x^y\) for every \(x, y \in X\) means \(h(f(x)) = f(h(x))\) for every \(h \in H\) and \(x \in X\) (by substituting \(y = h(x)\) and \(h = h_x^y\)), and it is true since \(f \in H\) and H is Abelian.

  5. (5)

    Clearly \((g \times \sigma )^2 = {\text {id}}\). We need to show that \(g \times \sigma \) preserves distances. We have

    $$\begin{aligned}&d(\langle g(x), \sigma (i)\rangle , \langle g(y), \sigma (i)\rangle ) = d_X(g(x), g(y)) = d_X(x, y) = d(\langle x, i\rangle , \langle y, i\rangle ), \ i \in \{0, 1\}, \\&d(\langle g(x), 1\rangle , \langle g(y), 0\rangle ) = r(h_{g(y)}^{g(x)}) = r(h_x^y) = d(\langle x, 0\rangle , \langle y, 1\rangle ). \end{aligned}$$

    The equality \(h_{g(y)}^{g(x)} = h_x^y\) for every \(x, y \in X\) means \(h(g(h(x))) = g(x)\) for every \(h \in H\) and \(x \in X\), which is equivalent to \(g \circ h \circ g^{-1} = h^{-1}\) for every \(h \in H\).

  6. (6)

    The maps \(h \times {\text {id}}\) for \(h \in H\) witness 1-homogeneity for pairs of points in the same copy of X, while \(g \times \sigma \) swaps the copies. Hence, the rainbow duplicate is 1-homogeneous. Clearly, \({\text {im}}(e_H) \cap \{{\text {id}}, g \times \sigma \} = \{{\text {id}}\}\) and \((g \times \sigma ) \circ (h \times {\text {id}}) \circ (g \times \sigma )^{-1} = (g \circ h \circ g^{-1}) \times {\text {id}}= h^{-1} \times {\text {id}}= (h \times {\text {id}})^{-1}\), and so we have an embedding \(H \rtimes \mathbb {Z}_2 \rightarrow {\text {Aut}}(X \times _r 2)\). The embedding is onto since the maps in the image already witness 1-homogeneity of the rainbow duplicate, and by 5.12 the decomposition into isosceles-generated components has at least two components, and by Theorem 5.6 (2) the automorphisms witnessing 1-homogeneity are unique.

\(\square \)

Remark 5.13

The spaces \(D_n\) from Example 5.8 are rainbow duplicates: \(D_n = C_n \times _r 2\) for H the group of all rotations \(\{\Phi _k: k \in \mathbb {Z}_n\} \leqslant {\text {Aut}}(C_n)\), g any reflection \(\Psi _k\), and \(r:H \rightarrow (0, \infty )\) defined by \(r(\Phi _k) = q_k\).

Proposition 5.14

Let \(X \times _r 2\) be a rainbow duplicate for some \(r:H \rightarrow (0, \infty )\).

  1. (1)

    \(X \times _r 2\) is uniquely 1-homogeneous.

  2. (2)

    \(X \times _r 2\) is a Boolean metric space if and only if H is a Boolean group.

  3. (3)

    An iterated rainbow duplicate \((X \times _r 2) \times _{r'} 2\) for some \(r':H' \rightarrow (0, \infty )\) can be formed only if the first duplicate \(X \times _r 2\) is Boolean. In this case, necessarily \(H' = {\text {Aut}}(X \times _r 2)\), and \((X \times _r 2) \times _{r'} 2\) is Boolean as well.

Proof

  1. (1)

    Follows from Construction 5.12 (3) and Theorem 5.6 (2).

  2. (2)

    By Construction 5.12 (6) we have an isomorphism \(H \rtimes \mathbb {Z}_2 \rightarrow {\text {Aut}}(X \times _r 2)\) where \(\mathbb {Z}_2\) acts on H by taking the inverse. Hence, if \({\text {Aut}}(X \times _r 2)\) is Boolean, then H is Boolean since it is isomorphic to its subgroup. On the other hand, H is Boolean, then the inverse on H is trivial, and so \(H \rtimes \mathbb {Z}_2\) is a direct product and a Boolean group.

  3. (3)

    Necessarily \(H' = {\text {Aut}}(X \times _r 2)\) since \(X \times _r 2\) is uniquely 1-homogeneous by (1), and so \({\text {Aut}}(X \times _r 2)\) is Abelian and \(X \times _r 2\) is a Boolean metric space by Corollary 4.4. \((X \times _r 2) \times _{r'} 2\) is then Boolean by (2). \(\square \)

Remark 5.15

It is not hard to see that every finite homogeneous isosceles-free space can be obtained as an iterated rainbow duplicate of a singleton space.

Remark 5.16

Let X be a 1-homogeneous metric space. Every Boolean subgroup \(H \leqslant {\text {Aut}}(X)\) such that for every \(x, y \in X\) there is a unique \(h \in H\) with \(h(x) = y\) is admissible for the rainbow duplicate construction since for any \(g, h \in H\) we have \(g \circ h \circ g^{-1}= g \circ g^{-1}\circ h = h = h^{-1}\).

Also, if X is finite, then for any admissible subgroup H there is an admissible map \(r:H \rightarrow (0, \infty )\) by Construction 5.12 (1).

Example 5.17

Let \(Y_n\) be a copy of the homogeneous isosceles-free space of size \(2^n\) from Example 4.12, but endowed with the discrete metric \(d(x, y) = 1\) for \(x \ne y\). Then for \(H = {\text {Aut}}(X_n)\) and any injective \(r:H \rightarrow (1, 2)\) we have a Boolean rainbow duplicate \(Y_n \times _r 2\) that is not isosceles-free (for \(n \geqslant 2\)).

Proposition 5.18

Let Y be a 1-homogeneous metric space with exactly 2 isosceles-generated components \(X, X'\). Then Y is isometric to a rainbow duplicate of X. More precisely, we have the following.

  1. (1)

    For every \(q \in \{d(x, x'): x \in X, x' \in X'\} = {\text {Dist}}(Y) {\setminus } {\text {Dist}}(X)\) there is a unique map \(f_q:Y \rightarrow Y\) such that \(d(y, f_q(y)) = q\). We have \(f_q \circ f_q = {\text {id}}_Y\), \(f_q\) swaps the components \(X, X'\), the restriction \(f_q:X \rightarrow X'\) is an isometry, and \(f_q \circ g = g \circ f_q\) for every \(g \in {\text {Aut}}(Y)\).

  2. (2)

    The map \(\phi :\langle x, i\rangle \mapsto f_q^i(x)\) is a bijection \(X \times 2 \rightarrow Y\) such that the metric d on \(X \times 2\) turning \(\phi \) into an isometry satisfies \(d(\langle x, i\rangle , \langle y, i\rangle ) = d_X(x, y)\) for every \(x, y \in X\) and \(i \in \{0, 1\}\).

  3. (3)

    Let \(H:= \{h|_X: h \in {\text {Aut}}_*(Y)\} \leqslant {\text {Aut}}(X)\). We have that \(h \mapsto h \times {\text {id}}\) is an isomorphism \(H \rightarrow {\text {Aut}}_*(X \times 2) \cong _{\phi } {\text {Aut}}_*(Y)\), H is Abelian, and for every \(x, y \in X\) there is unique \(h \in H\) with \(h(x) = y\).

  4. (4)

    For every \(h \in H\), the distance \(r(h):= d(\langle x, 0\rangle , \langle h(x), 1\rangle )\) does not depend on \(x \in X\). This defines an injective map \(r:H \rightarrow (0, \infty ) \setminus {\text {Dist}}(X)\).

  5. (5)

    The group H and the map r are admissible parameters for the rainbow duplicate construction, and \(\phi :X \times _r 2 \rightarrow Y\) is an isometric isomorphism.

Proof

  1. (1)

    Since q is a distance between the components, it is singleton, and so for every \(y \in Y\) there is a unique point \(y'\) with \(d(y, y') = q\). Hence, \(f_q\) is well-defined, and \(f_q^2 = {\text {id}}\).

    The distance q cannot occur in a single component, i.e. we indeed have \(\{d(x, x'): x \in X, x' \in X'\} = {\text {Dist}}(Y) {\setminus } {\text {Dist}}(X)\): let \(x \in X\) and \(x' \in X'\) with \(d(x, x') = q\). If also \(d(y, y') = q\) for some \(y, y' \in X\), then the automorphism mapping x to y would have to also map \(x'\) to \(y'\) since q is a singleton distance, but this is impossible since every automorphism induces a bijection between the components. Hence, \(f_q\) swaps the components, and the restriction \(X \rightarrow X'\) is well-defined.

    We need to show that \(f_q:X \rightarrow X'\) is an isometry. Let \(x, y \in X\). We have \(d(x, f_q(x)) = d(y, f_q(y)) = q\). Let \(q':= d(x, f_q(y))\). Since x and \(f_q(y)\) are from different components, \(q'\) is a singleton distance. By 1-homogeneity every triangle with side distances q and \(q'\) has the same distance \(q''\) of the third side. We apply this observation to the triangles \(\langle x, y, f_q(y)\rangle \) and \(\langle x, f_q(x), f_q(y)\rangle \), and so we have \(d(x, y) = q'' = d(f_q(x), f_q(y))\).

    We have \(d(g(f_q(x)), g(x)) = d(f_q(x), x) = q = d(f_q(g(x)), g(x))\) for every \(g \in {\text {Aut}}(Y)\) and \(x \in Y\), and so \(g(f_q(x)) = f_q(g(x))\) since q is a singleton distance.

  2. (2)

    The map \(\phi \) is is clearly a bijection as it bijectively maps \(X \times \{0\}\) to X and \(X \times \{1\}\) to \(f_q[X] = X'\). The rest follows easily from (1): for each \(x,y\in X\) and each \(i\in \{0,1\}\), we have \(d(\langle x, i\rangle , \langle y, i\rangle ) = d_Y(f_q^i(x), f_q^i(y)) = d_X(x, y)\).

  3. (3)

    Clearly \(h \mapsto h|_X\) is an isomorphism \({\text {Aut}}_*(Y) \rightarrow H\) by Theorem 5.6 (4). We just need to observe that \(h|_X \times {\text {id}}\) translates to h via \(\phi \), i.e. \(\phi \circ (h|_X \times {\text {id}}) = h \circ \phi \), which reduces to \(f_q^i(h(x)) = h(f_q^i(x))\) for every \(x \in X\) and \(i \in \{0, 1\}\). But this is true by (1).

    H is Abelian since \({\text {Aut}}_*(Y)\) is Abelian by Theorem 5.6 (7). We know that for every \(x, y \in X\) there is a unique \(k \in {\text {Aut}}_*(Y)\) with \(k(x) = y\), and the restriction \(k \mapsto k|_X\) is an isomorphism \({\text {Aut}}_*(Y) \rightarrow H\), so there is a unique \(h \in H\) with \(h(x) = y\).

  4. (4)

    We have \(d(\langle x, 0\rangle , \langle h(x), 1\rangle ) = d_Y(f_q^0(x), f_q^1(h(x))) = d_Y(x, f_q(h(x)))\). Let \(x' \in X\) be another point, and let \(k \in {\text {Aut}}_*(Y)\) be the map such that \(k(x) = x'\). Then \(d_Y(x', f_q(h(x'))) = d_Y(k(x), f_q(h(k(x)))) = d_Y(k(x), k(f_q(h(x)))) = d_Y(x, f_q(h(x)))\) since H is Abelian and \(k \circ f_q = f_q \circ k\) by (1).

    We have \(r(h) \notin {\text {Dist}}(X)\) for every \(h \in H\) by (1) since r(h) is a distance between the components, and r is injective since for \(h \ne h' \in H\), \(\langle h(x), 1\rangle \) and \(\langle h'(x), 1\rangle \) are distinct points in the other component.

  5. (5)

    H and r are admissible by (3) and (4). We compare the metrics on \(X \times 2\) coming from the identification \(\phi \) and from the rainbow duplicate construction. By (2) the metrics agree on the components, and by (4) the distances agree between the components.

    It remains to show the existence of a suitable witnessing map \(g \in {\text {Aut}}(X)\) for the rainbow duplicate construction. Let \(f \in {\text {Aut}}(Y)\) be a map swapping the components and let \(g:= f_q \circ f|_X \in {\text {Aut}}(X)\). We have \(g^2 = (f_q \circ f)^2 |_X = (f_q^2 \circ f^2) |_X = {\text {id}}_X\), and similarly \(g \circ h \circ g^{-1} = ((f_q \circ f) \circ \tilde{h} \circ (f_q \circ f)^{-1}) |_X = (f_q^2 \circ f \circ \tilde{h} \circ f^{-1}) |_X = \tilde{h}^{-1}|_X = h^{-1}\) where \(\tilde{h} \in {\text {Aut}}(Y)\) is the extension of h.

\(\square \)

We finish this section with a classification of 1-homogeneous metric spaces.

Theorem 5.19

Let X be a 1-homogeneous metric space. Then one of the following is true.

  1. (1)

    X is isosceles-generated.

  2. (2)

    X is a rainbow duplicate of an isosceles-generated space.

  3. (3)

    X is a Boolean metric space.

Suppose that X is even 2-homogeneous. Then one of the following is true.

  1. (1’)

    X is isosceles-generated.

  2. (2’)

    X is isosceles-free.

Proof

By Proposition 5.18, if X has exactly two isosceles-generated components, then it is a rainbow duplicate of an isosceles-generated space. By Proposition 5.6 (6), if X has at least three isosceles-generated components, then it is a Boolean metric space.

If X is 2-homogeneous, we can consider also the decomposition into isosceles-free components. For every two distinct isosceles-generated components \(C, C'\) and points \(x \in C\) and \(x' \in C'\) we have that \(d(x, x')\) is a singleton distance, and so \(x, x'\) are in the same isosceles-free component. Since \(x' \in C'\) was arbitrary, all elements of \(C'\) are in the same isosceles-free component as x. Hence, \(C'\) is isosceles-free, and so degenerate as an isosceles-generated component. Hence, if there are at least two isosceles-generated components, they are degenerate, and so the whole space is isosceles-free. \(\square \)

6 Maximal number of distances

We have seen that restricting distances of finite metric spaces by a coherent triangle scheme \(t:R^2 \rightarrow R\) (Corollary 4.21) leads to an isosceles-free Fraïssé limit X. If the set of distances R is finite, this forces X to be finite as well, despite X being the “largest” and “most complicated” structure associated to the given class of finite structures. In fact, we get \(|X| = |R|\). This is in contrast with the situation when distances are restricted just to a given finite set satisfying the four-values condition, where the Fraïssé limit is clearly infinite.

In this section, instead of limiting the set of distances and asking about the cardinality of the Fraïssé limit, we start with a general homogeneous metric space of a given finite cardinality and ask how homogeneity limits the number of attained distances. Namely, we consider the following question: What is the maximal number of different distances attained in a k-homogeneous metric space of cardinality \(n \in \mathbb {N}_+\)? It turns out that spaces with the highest ratio of the number of attained distances to the number of points are somewhat close to being isosceles-free and that it is useful to view them through the lens of decompositions into isosceles-free and isosceles-generated components, developed in the previous section.

For every metric space X let \(\delta (X)\) denote the number of distinct distance values used in X, i.e. \(\delta (X):= |{\text {Dist}}(X)|\). Moreover let

$$\begin{aligned} \Delta _k(n)&:= \max \{\delta (X): X \text { a }k\text {-homogeneous space with }|X| = n\}, \text {for }k \in \mathbb {N}_+, \\ \Delta _\omega (n)&:= \max \{\delta (X): X \text { an ultrahomogeneous space with } |X| = n\}. \end{aligned}$$

Clearly, we have \(\Delta _\omega (n) \leqslant \cdots \leqslant \Delta _2(n) \leqslant \Delta _1(n)\) for every \(n \in \mathbb {N}_+\).

Example 6.1

The circle graph space \(C_n\) considered in Example 2.5 is ultrahomogeneous and \(\delta (C_n) = \left\lfloor \frac{n}{2}\right\rfloor + 1\). Hence, \(\Delta _\omega (n) \geqslant \left\lfloor \frac{n}{2}\right\rfloor + 1\).

Recall that by \(S_X:=\{r\in [0,\infty ):\forall x\in X\, \exists !y\in X:d(x,y)=r\}\subseteq {\text {Dist}}(X)\) we mean the set of singleton distances from Definition 5.3.

Observation 6.2

We have \(\delta (X) \leqslant (|S_X| + |X|) / 2\) for every finite 1-homogeneous space X. This is because for any \(x \in X\) the map \(d(x, \cdot ):X \rightarrow {\text {Dist}}(X)\) is a surjection where exactly the elements of \(S_X\) have a unique preimage. Hence, \(|X| \geqslant |S_X| + 2 (\delta (X) - |S_X|)\).

Proposition 6.3

Let X be a finite 1-homogeneous n-point space. Clearly, \(\delta (X) \leqslant n\). We have \(\delta (X) = n\) if and only if X is isosceles-free, and in this case X is ultrahomogeneous and n is a power of two.

In other words, \(\Delta _\omega (n) = \Delta _1(n) = n\) if \(n = 2^m\), and \(\Delta _1(n) < n\) otherwise.

Proof

By Observation 3.8, for every \(a \in X\) the map \(D_a:x \mapsto d(a, x)\), \(X \rightarrow {\text {Dist}}(X)\), is surjective, and X is isosceles-free if and only if \(D_a\) is injective, which happens if and only if \(\delta (X) = n\). In this case, X is ultrahomogeneous by Proposition 3.4, and n is a power of two by Corollary 3.9. A homogeneous isosceles-free space of cardinality \(2^m\) exists by Example 4.12. \(\square \)

Theorem 6.4

For a finite 2-homogeneous metric space X of \(n:= |X|\) elements, where \(n = 2^m (2k + 1)\), we have \(\delta (X) \leqslant 2^m(k+1) =: \beta _n\).

Proof

Since the space X is 2-homogeneous, we may consider its decomposition into isosceles-free components \(X/{\sim }\) (Theorem 5.4). We have \(|S_X| = |C|\) for any \(C \in X/{\sim }\). Moreover, \(|C|\) is a power of two since C is a homogenous isosceles-free space, and \(|C| \leqslant 2^m\) since \(X/{\sim }\) is a decomposition into pairwise-isometric subspaces and so \(|C|\) is a factor \(|X|\). Together, by Observation 6.2 we have

$$\begin{aligned} \delta (X) \leqslant \frac{|S_X| + |X|}{2} \leqslant \frac{2^m + 2^m(2k + 1)}{2} = 2^m(k + 1). \end{aligned}$$

\(\square \)

The next example witnesses that this bound is optimal.

Example 6.5

Let \(B_{m, k}:=2^mC_{2k+1} \times _1 \langle 2^m,\Vert \cdot \Vert \rangle \), the \(\ell _1\)-product of a scaled-up circle graph \(C_{2k+1}\) from Example 2.5 with the isosceles-free space \(\langle 2^m,\Vert \cdot \Vert \rangle \) from Example 4.12. The space \(B_{m,k}\) is ultrahomogeneous, has \(n=2^{m}(2k+1)\) elements and satisfies \(\delta (B_{m,k})=\beta _n\).

Proof

We already know that \(C_{2k+1}\) is ultrahomogeneous with \(\left\lfloor \frac{2k+1}{2}\right\rfloor + 1 = k + 1\) distances from Example 2.5 and that \(\langle 2^m, \Vert \cdot \Vert \rangle \) is ultrahomogeneous with \(2^m\) distances from Example 4.12. Multiplying the usual metric on \(C_{2k+1}\) by \(2^m\) to get the metric space \(2^mC_{2k+1}:=\langle C_{2k+1},2^md_{C_{2k+1}}\rangle \) makes sure that \(+:{\text {Dist}}(2^m C_{2k+1}) \times {\text {Dist}}(\langle 2^m, \Vert \cdot \Vert \rangle ) \rightarrow {\text {Dist}}(B_{m, k})\) is injective, and we may use Proposition 2.4 to conclude that \(B_{m, k}\) is ultrahomogeneous with \(2^m(k+1)\) distinct distances. \(\square \)

Corollary 6.6

For every \(n \in \mathbb {N}_+\) we have \(\Delta _\omega (n) = \Delta _2(n) = \beta _n \leqslant \Delta _1(n) \leqslant n\).

Now let us bound the number of distances used in 1-homogeneous spaces.

Proposition 6.7

Let X be a 1-homogeneous metric space X of \(n:= |X|\) elements. If \(n = 2k + 1\), then \(\delta (X) \leqslant k + 1\). Hence, \(\Delta _1(n) = \Delta _2(n) = \beta _n\) for every odd n.

Proof

Note that for any distance \(r\in {\text {Dist}}(X)\) which is singleton, we can find pairs \(\{x, y_r(x)\}\) where \(y_r(x)\) is the unique element of X satisfying \(d(x,y_r(x))=r\) (note this is symmetrical since \(x=y_r(y_r(x))\)). Clearly, if \(r>0\), this would lead to a decomposition of X into pairs of elements, which is impossible since \(|X|\) is odd. Hence, \(S_X = \{0\}\), and we have \(\delta (X) \leqslant (|S_X| + |X|)/2 = (1 + (2k + 1))/2 = k + 1\) by Observation 6.2. \(\square \)

Example 6.8

In Example 5.8 for \(n \in \mathbb {N}_+\) we constructed the 1-homogeneous space \(D_n = C_n\times _r 2\) with

$$\begin{aligned} |D_n| = 2n = {\left\{ \begin{array}{ll} 4\ell , \\ 4\ell + 2, \end{array}\right. } \text {and}\quad \delta (D_n) = \left\lfloor n/2\right\rfloor + 1 + n = {\left\{ \begin{array}{ll} 3\ell + 1, &{} n = 2\ell , \\ 3\ell + 2, &{} n = 2\ell + 1. \end{array}\right. } \end{aligned}$$

We have \(\delta (D_n) > \beta _{2n}\) for every n that is not a power of two, i.e. we break the optimal bound for 2-homogeneous spaces.

The construction of \(D_n\) can be compared to Example 6.5 in the case of two cycles of odd length. There we retain more symmetry while losing more distances, while here we lose more symmetry while keeping more distances.

Proof

We observe that \(\delta (D_n) > \beta _{2n}\) for every \(n = 2^m(2k + 1)\) that is not a power of two, i.e. \(k > 0\). If n is odd, we have \(n = 2k + 1\) and \(\delta (D_n) = 3k + 2 > 2k + 2 = \beta _{2n}\). If n is even, we have \(n = 2\ell \) for \(\ell = 2^{m - 1} (2k + 1)\). Hence,

$$\begin{aligned} \delta (D_n)&= 3\ell + 1 = 2^{m - 1} (6k + 3) + 1, \\ \beta _{2n}&= 2^{m + 1} (k + 1) = 2^{m - 1} (4k + 4), \end{aligned}$$

and again \(\delta (D_n) > \beta _{2n}\) since \(k \geqslant 1\). \(\square \)

Corollary 6.9

We have \(\Delta _2(n)< \Delta _1(n) < n\) for even n that is not a power of two.

To retain more distances in a space of size 2n, we can improve the previous example by taking the space \(B_{m, k}\) instead of \(C_n\) as a base for the rainbow duplicate construction.

Example 6.10

Let \(E_{m,k}:= B_{m,k} \times _r 2\) be a rainbow duplicate of \(B_{m,k}\). If we put \(n:= 2^m(2k + 1)\), we have \(|E_{m, k}| = 2n\) and \(\delta (E_{m, k}) = 2^m (3k + 2) =: \alpha _{2n} \geqslant \beta _{2n} = 2^m(2k + 2)\). Moreover, we have \(\alpha _{2n} \geqslant \delta (D_n)\) and even \(\alpha _{2n} > \delta (D_n)\) if \(m \geqslant 2\).

Proof

Given we can indeed form a rainbow duplicate \(B_{m, k} \times _r 2\), which we show in a moment, we have

$$\begin{aligned} \delta (E_{m, k}) = \delta (B_{m, k}) + |{\text {im}}(r)| = \beta _n + n = 2^m(k + 1) + 2^m(2k + 1) = 2^m(3k + 2). \end{aligned}$$

Since \(\delta (D_n) = \delta (C_n) + n\), the comparison between \(\alpha _{2n}\) and \(\delta (D_n)\) reduces to comparison between \(\beta _n\) and \(\left\lfloor n/2\right\rfloor + 1\). For n odd (i.e. \(m = 0\)) we have \(\beta _n = k + 1 = \left\lfloor n/2\right\rfloor + 1\). For n even we have \(\beta _n = 2^{m - 1}(2k + 2) \geqslant 2^{m - 1}(2k + 1) + 1 = \left\lfloor n/2\right\rfloor + 1\), which becomes a strict inequality if \(m \geqslant 2\).

To form a rainbow duplicate \(B_{m, k} \times _r 2\), we need:

  1. (1)

    an Abelian subgroup \(H\leqslant {\text {Aut}}(B_{m,k})\) such that for each \(x,y\in X\), there exists precisely one \(h\in H\) with \(h(x)=y\) (denoted by \(h_x^y\)),

  2. (2)

    a map \(g\in {\text {Aut}}(B_{m,k})\) such that \(g^2={\text {id}}\) and \(g\circ h\circ g^{-1}=h^{-1}\) for every \(h\in H\),

  3. (3)

    an admissible map \(r:H \rightarrow (0, \infty )\), but such map exists by Remark 5.16.

So let us start with (1). By definition, \(B_{m,k} = (2^mC_{2k+1}) \times _1 X_m\), so \(\langle \phi , \psi \rangle \mapsto \phi \times \psi \) is a group isomorphism \({\text {Aut}}(C_{2k+1}) \times {\text {Aut}}(X_m) \rightarrow {\text {Aut}}(B_{m,k})\) by Proposition 2.4. As we have shown in Example 5.8, if we restrict ourselves to rotations in \(C_{2k+1}\), we get an Abelian subgroup \(H_1\leqslant {\text {Aut}}(C_{2k+1})\) which has the desired property on \(C_{2k+1}\) (and any of its re-scalings), whereas Corollary 3.3 tells us that \(H_2:={\text {Aut}}(X_m)\) already has it on \(X_m\), and \(H_2\) is Abelian since it is Boolean. It is a standard fact of direct group products that this implies \(H_1\times H_2=:H\leqslant {\text {Aut}}(B_{m,k})\), while uniqueness of \(h_x^y\) follows from the uniqueness of the representation of an element \(h\in H\) in the direct product as a tuple \(\langle h_1,h_2\rangle \) as well as the uniqueness of \((h_1)_x^y\) and \((h_2)_{x'}^{y'}\) in the two factors. And of course, H is again Abelian.

What remains to be shown is (2). However, we have shown in 5.13 already that we can choose any reflection \(\Psi _i\) on \(C_{2k+1}\) as a function \(g_1\), say \(g_1:=\Psi _0\), and since \(X_m\) is Boolean, we can choose \(g_2:={\text {id}}_{X_m}\). From this we get that \(\langle g_1,g_2\rangle \) will naturally satisfy (2) since a direct product’s group operation distributes into the components. \(\square \)

Proposition 6.11

The number of distances in a 1-homogeneous space X of cardinality \(n=2(2k+1)\) with \(2k+1\) prime is bounded from above by \(3k+2\). Hence, \(\Delta _1(n) = \alpha _n\) for such n.

Proof

Assume \(\delta (X)\geqslant 3k+2\). Since \(|X|=4k+2\), this means there are at least \(2k+2\) singleton distances in X. Therefore it is possible to pick two non-zero singleton distances \(s_1>s_2>0\) and define \(f_1\) as the function which maps each \(x\in X\) to the unique point of distance \(s_1\) from x, and analogously define \(f_2(x)\) by \(d(f_2(x),x)=s_2\) for all x.

Now, define a sequence starting at an arbitrary point \(x_0\in X\) as:

$$\begin{aligned} x_{2i+1}&:=f_1(x_{2i}),&x_{2i+2}&:=f_2(x_{2i+1}),&i&\in \omega . \end{aligned}$$

Clearly, for each \(x_i\), \(f_j(x_i)\ne x_i\) since they have distance \(s_j>0\) from each other, and for \(\ell \ne j\) we have \(f_\ell (f_j(x_i))\ne x_i\) since their distances from \(f_j(x_i)\) are distinct.

So we have a non-trivial sequence \(\langle x_n\rangle _{n\in \omega }\) in the finite space X and we want to find the smallest \(m\in \mathbb {N}^+\) such that \(x_m=x_i\) for some \(i<m\). Note that since \(s_1\) and \(s_2\) are singleton distances and \(d(x_{2i},x_{2i+1})=s_1\) and \(d(x_{2i+2},x_{2i+1})=s_2\) for all i, the first m points \(x_i\) form a ‘chain’ where each point in said chain except \(x_0\) and \(x_m\) are already connected to their unique partners of distance \(s_1\) and \(s_2\), respectively. So the only possible way to achieve \(x_m=x_i\) for some \(i<m\) is if \(i=0\) and thus the sequence is m-periodic.

Moreover, changing the starting point to \(x_0'\not \in \{x_n:n\in \omega \}\) will yield a disjoint set \(\{x_n':n\in \omega \}\), again because no point \(x_i\) has more than one point y of distance \(s_j\) to \(x_i\) in X. Due to 1-homogeneity, it follows that \(|\{x_n:n\in \omega \}|=m \mid 2(2k+1)=|X|\). Since we have already shown that \(m>2\), it follows that \(m=2k+1\) or \(m=4k+2\), however, if m were \(2k+1\) and therefore odd, this would imply that \(x_0=x_m=x_{2k+1}=f_1(x_{2k})\), meaning \(x_1=x_{m-1}\) since they both have distance \(s_1\) to \(x_0\), contradicting the minimality of m. It follows that \(m=4k+2=|X|\) and thus \(\{x_n: n\in \omega \}=X\).

We can use this observation to find k distances which are repeated in X. To do this, first notice that each automorphism \(g\in {\text {Aut}}(X)\) acts on X like a rotation or reflection, i.e. there always exists an \(i\in \omega \) such that either \(g(x_j)=x_{i+j}\) for all j (if i is even), or \(g(x_j)=x_{i-j}\) (if i is odd). This is because g preserves distances, so it, in particular, preserves pairs \(\{x,f_j(x)\}\) of distance \(s_j\). This means g commutes with both \(f_1\) and \(f_2\).

It follows that if g maps \(x_0\) to \(x_i\), then

$$\begin{aligned} g(x_j)=g(f_{\ell _j}\circ \dotsc \circ f_1(x_0))=f_{\ell _j}\circ \cdots \circ f_1(x_i)= {\left\{ \begin{array}{ll} x_{i+j},&{}i\text { even,}\\ x_{i-j},&{}i\text { odd.} \end{array}\right. } \end{aligned}$$

This is because for even i, \(f_1(x_i)=x_{i+1}\) whereas, for odd i, it is \(x_{i-1}\), and from that point onwards \(f_1\) and \(f_2\) alternate.

Let \(g_i\in {\text {Aut}}(X)\) be the automorphism satisfying \(g_i(x_0)=x_i\). Then, for each even i, notice that \(d(x_{m-i},x_0)=d(g_i(x_{m-i}),g_i(x_0))=d(x_0,x_i)=:r_i\), and the function \(d(\cdot ,x_0)\) therefore assumes at most \(k+1\) distinct values on the \(2k+1\) points in X with an even index \(\{x_{2n}:n\in \omega \}\), and of course at most \(2k+1\) distinct values on the remaining \(2k+1\) odd-indexed points, yielding an upper bound of \(\delta (X)\leqslant 3k+2 = \alpha _n\). \(\square \)

Proposition 6.12

We have \(\Delta _1(n) \leqslant n - 2\) for every \(n \geqslant 7\) that is not a power of two.

Proof

Let X be a 1-homogeneous space of cardinality n. If n is not a power of two, then \(\delta (X) \leqslant n - 1\) by Proposition 6.3. Suppose \(\delta (X) = n - 1\). That means there is exactly one \(r \in {\text {Dist}}(X)\) that is not a singleton distance, and for every \(x \in X\) there are exactly two points \(y \in X\) with \(d(x, y) = r\).

Let \(x_1, x_2 \in X\) be such that \(d(x_1, x_2) = r\). Then for every \(i \geqslant 2\) there is a unique point \(x_{i + 1} \in X\) such that \(d(x_i, x_{i + 1}) = r\) and \(x_{i + 1} \ne x_{i - 1}\). Since X is finite, there is the smallest k such that \(x_{k + 1} \in \{x_1, \ldots , x_k\}\). Necessarily, \(k \geqslant 3\) (otherwise r would be singleton) and \(x_{k + 1} = x_1\) (if \(x_{k + 1} = x_i\) with \(1 < i \leqslant k\), then \(i < k - 1\) and \(x_{i - 1}, x_{i + 1}, x_k\) are three distinct points with distance r from \(x_i\)). Hence we have obtained a cycle \(C:= \{x_i: i \in \mathbb {Z}_k\}\) such that \(d(x_i, x_{i + 1}) = r\) for every \(i \in \mathbb {Z}_k\).

Let \(q:= d(x_1, x_{-1})\). By 1-homogeneity, for every \(i \in \mathbb {Z}_k\) there is \(f \in {\text {Aut}}(X)\) such that \(f(x_0) = x_i\). It follows that \(\{x_{i + 1}, x_{i - 1}\} = \{y \in X: d(y, x_i) = r\} = \{f(y) \in X: d(y, x_0) = r\} = \{f(x_1), f(x_{-1})\}\), and so \(d(x_{i + 1}, x_{i - 1}) = q\). Hence, \(d(x_i, x_{i + 2}) = d(x_i, x_{i - 2}) = q\) for every \(i \in \mathbb {Z}_k\). Since r is the only non-singleton distance, we have either \(q \ne r\), \(x_{i + 2} = x_{i - 2}\), and \(k = 4\), or \(q = r\), \(x_{i + 2} = x_{i - 1}\), and \(k = 3\).

Since r is the only non-singleton distance, C is a component of the decomposition \(X/{\sim }\) into isosceles-generated components. Since \(|X|\) is not a power of two, X is not a Boolean space, and so \(|X/{\sim }| \in \{1, 2\}\). Hence \(|X| = |C| \cdot |X/{\sim }| \in \{3, 4, 6, 8\}\). \(\square \)

Table 1 summarizes the maximal number of distances in small homogeneous spaces. We use the following results obtained throughout this section. Namely, we use the bounds \(\beta _n\) from Theorem 6.4 and \(\alpha _n\) from Example 6.10 (where we define define \(\alpha _n:= \beta _n\) for n odd).

  • For every \(n \in \mathbb {N}_+\) we have \(\Delta _\omega (n) = \Delta _2(n) = \beta _n \leqslant \alpha _n \leqslant \Delta _1(n) \leqslant n\).

  • For n power of two or odd we have \(\Delta _1(n) = \Delta _2(n) = \beta _n = \alpha _n\).

  • For \(n = 2(2k + 1)\) with \(2k + 1\) prime we have \(\Delta _1(n) = 3k + 2 = \alpha _n\).

  • For \(7 \leqslant n\) not power of two we have \(\Delta _1(n) \leqslant n - 2\).

Table 1 Maximal number of distances in small spaces

Question 1 What are the values of \(\Delta _1(n)\) for the cases not covered so far (\(n = 2^m(2k + 1)\) for \(k > 0\) where \(m \geqslant 2\) or \(m = 1\) and \(2k + 1\) non-prime)?

Remark 6.13

Note that when searching for \(\Delta _1(n)\) where n is not a power of two, a space X of cardinality n cannot be Boolean, and hence by Theorem 5.19 is either isosceles-generated, or a rainbow duplicate of an isosceles-generated space Y, and in the latter case \(\delta (X) = \delta (Y) + n/2\). Hence, \(\Delta _1(n)\) ultimately depends on numbers of distances of isosceles-generated spaces.

Remark 6.14

Let us note that the question of maximal number of distances in a finite homogeneous metric space can be rephrased in the language of colorings of complete graphs. Let X be a set and let \(c:X \times X \rightarrow C_X \ni 0\) be a surjective map onto a set \(C_X\) such that

  • \(c(x, y) = 0\) if and only if \(x = y\), i.e. 0 is a special color reserved for the diagonal,

  • \(c(x, y) = c(y, x)\), i.e. c is symmetric.

The map c can be naturally viewed as a (not necessarily proper) edge coloring of the complete graph on X. Let us call pairs \(\langle X, c\rangle \) (edge-)colored complete graphs.

Note that for every metric space X, the distance \(d:X \times X \rightarrow {\text {Dist}}(X)\) is a valid coloring, and that the notions of automorphisms and n-homogeneity are exactly the same when we view X as a colored graph instead of a metric space. 1-homogeneity of the metric would be more traditionally called vertex-transitivity of the induced coloring. Also note that for every finite colored complete graph X we may consider an embedding \(e:C_X \rightarrow \{0\} \cup [a, 2a] \subseteq \mathbb {R}\) such that \(e(0) = 0\) for some \(a > 0\), and put \(d(x, y) = e(c(x, y))\). This defines a metric on X inducing an equivalent coloring. Since we take positive distances in [a, 2a], the triangle inequality becomes trivial. This is what we have done in Theorem 5.10.

Altogether, the question of maximal number of distances can be reformulated as: “What is the maximal number of colors used by a vertex-transitive coloring of a complete graph of cardinality n?”