# Extending partial isometries of antipodal graphs

We prove EPPA (extension property for partial automorphisms) for all antipodal classes from Cherlin's list of metrically homogeneous graphs, thereby answering a question of Aranda et al. This paper should be seen as the first application of a new general method for proving EPPA which can bypass the lack of an automorphism-preserving completion. It is done by combining the recent strengthening of the Herwig--Lascar theorem by Hubička, Nešetřil and the author with the ideas of the proof of EPPA for two-graphs by Evans et al.

## Authors

• 13 publications
12/28/2018

### EPPA for two-graphs and antipodal metric spaces

We prove that the class of two-graphs has the extension property for par...
08/10/2019

### Avoidable paths in graphs

We prove a recent conjecture of Beisegel et al. that for every positive ...
10/21/2019

### Cryptanalysis of two schemes of Baba et al. by linear algebra methods

We show that the attacks based on the linear decomposition method introd...
07/09/2018

### How should we (correctly) compare multiple graphs?

Graphs are used in almost every scientific discipline to express relatio...
06/10/2019

### Efficient enumeration of non-isomorphic interval graphs

Recently, Yamazaki et al. provided an algorithm that enumerates all non-...
03/26/2020

### A Topological Characterization of Modulo-p Arguments and Implications for Necklace Splitting

The classes PPA-p have attracted attention lately, because they are the ...
02/11/2019

### All those EPPA classes (Strengthenings of the Herwig-Lascar theorem)

In this paper we prove a general theorem showing the extension property ...
##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

Let be a (not necessarily finite) graph and be subsets of . We say that a function is a partial automorphism of if is isomorphism of and , the graphs induced by on and respectively. This notion naturally extends to arbitrary structures (see Section 2).

In 1992 Hrushovski [18] proved that for every finite graph there is a finite graph such that is an induced subgraph of and every partial automorphism of extends to an automorphism of . This property is, in general, called the extension property for partial automorphisms:

###### Definition 1.1.

Let be a class of finite structures. We say that has the extension property for partial automorphisms (or EPPA), also called the Hrushovski property, if for every there is such that an for every isomorphism of substructures of there is an automorphism of such that . We call such an EPPA-witness for .

Hrushovski’s proof was group-theoretical, Herwig and Lascar [15] later gave a simple combinatorial proof by embedding into a Kneser graph. After this, the quest of identifying new classes of structures with EPPA continued with a series of papers including [13, 14, 15, 17, 32, 33, 8, 29, 4, 20, 25, 21, 9, 22].

Let be a graph. We say that a (partial) map is distance-preserving if whenever are in the domain of then the distance between and is the same as the distance between and . Clearly, every automorphism is distance-preserving. In 2005 Solecki [32] (and independently also Vershik [33]) proved that the class of graphs has a variant of EPPA for distance-preserving maps. Namely, they proved that for every finite graph there is a finite graph satisfying the following:

1. and furthermore whenever are vertices of , then the distance between and is the same in and in , and

2. every partial distance-preserving map of extends to an automorphism of .

It is not very convenient to talk about distance-preserving maps, because they are relative to a graph and this does not work well together with taking subgraphs. Given a graph , it is more natural to consider the metric space where is the path-distance between and in (we will call this the path-metric space of ). And this is in fact what Solecki and Vershik did — they proved EPPA for all (integer-valued) metric spaces, which is equivalent to EPPA for graphs with distance-preserving maps.

Vershik’s proof is unpublished, Solecki’s proof uses a complicated general theorem of Herwig and Lascar [15, Theorem 3.2] about EPPA for structures with forbidden homomorphisms, Hubička, Nešetřil and the author [20] recently gave a simple self-contained proof of Solecki’s result. There is also a group theoretical proof by Sabok [30] using a construction à la Mackey [27].

This paper continues in this direction. We prove the following theorem (antipodal metric spaces are finite metric subspaces of the path-metric of countable antipodal metrically homogeneous graphs, see Section 2.3).

###### Theorem 1.2.

Every class of antipodal metric spaces from Cherlin’s list has EPPA.

This answers a question from [4] and completes the study of EPPA for classes from Cherlin’s list. It is proved by combining the results of [4] with the ideas from [9] and the new strengthening of the Herwig–Lascar theorem by Hubička, Nešetřil and the author [22].

## 2 Preliminaries

A (not necessarily finite) structure is homogeneous if every partial automorphism of with finite domain extends to a full automorphism of itself (so it is, in a sense, an EPPA-witness for itself). Gardiner proved [11] that the finite homogeneous graphs are disjoint unions of cliques of the same size, their complements, the 5-cycle and which is the graph on the vertex set where is connected with if and only if and . Lachlan and Woodrow later [26]classified the countably infinite homogeneous graphs. These are disjoint unions of cliques of the same size (possibly infinite), their complements, the Rado graph, the -free variants of the Rado graph and their complements.

Every homogeneous structure can be associated with the class of all (isomorphism types of) its finite substructures called its age. By the Fraïssé theorem [10], one can reconstruct the homogeneous structure back from this class (because it has the so-called amalgamation property). For more on homogeneous structures see the survey by Macpherson [28].

A graph is vertex transitive if for every pair of vertices there is an automorphism sending to , it is edge transitive if every edge can be sent to every other edge by an automorphism and it is distance transitive if for every two pairs of vertices in the same distance there is an automorphism sending the first onto the other.

Distance transitivity is a very strong condition. For example, there are only finitely many finite 3-regular distance transitive graphs [5] and the full catalogue is available in some other particular cases. However, for larger degrees, the classification is unknown, see e.g. the book by Godsil and Royle [12] devoted to the study of distance transitive graphs.

In this paper we study metric homogeneity which is a combination of the notions of distance transitivity and homogeneity. A connected graph is metrically homogeneous if it is homogeneous as a metric space where the distances are the path distances. Cherlin [6] gave a list of countable metrically homogeneous graphs which is conjectured to be complete (and provably complete in some cases [1, 7]) in terms of classes of finite metric spaces which embed to the path-metric space of the given metrically homogeneous graphs. All connected homogeneous graphs are also metrically homogeneous, because every pair of vertices is either connected by an edge or by a path of length 2. An example of non-homogeneous metrically homogeneous graphs are cycles.

EPPA and other combinatorial properties of classes from Cherlin’s list were studied by Aranda, Bradley-Williams, Hng, Hubička, Karamanlis, Kompatscher, Pawliuk and the author [2, 3, 4] (see also [24]) and in [4]

almost all the questions were settled, only EPPA for antipodal classes of odd diameter and bipartite antipodal classes of even diameter remained open. An important step in this direction was later done by Evans, Hubička, Nešetřil and the author

[9] who proved EPPA for antipodal metric spaces of diameter 3 and upon whose ideas we are building here.

###### Remark 2.1.

If one checks the known classes with EPPA, they will find out that they all are ages of homogeneous structures. This is not a coincidence. It is easy to see that if a class of finite structures has EPPA and the joint embedding property (for every there is which contains a copy of both of them) then is the age of a homogeneous structure. This restricts the candidate classes for EPPA severely and connects finite combinatorics with the study of infinite homogeneous structures and infinite permutation groups.

In the other direction, EPPA has some implications for the automorphism group (with the pointwise convergence topology) of the corresponding homogeneous structure, see for example the paper of Hodges, Hodkinson, Lascar, and Shelah [16].

### 2.1 ΓL-structures

An important feature of the strengthening of the Herwig–Lascar theorem by Hubička, Nešetřil and the author is that it allows to also permute the language. However, it means that one needs to update all the standard definitions to accommodate this change.

The following notions are taken from [22], sometimes stated in a more special form which is sufficient for our purposes. Many of them were introduced by Hubička and Nešetřil in [23] (i.e. homomorphism-embedding or completions).

Let be a language with relational symbols , each having associated arities denoted by and function symbols . All functions in this paper are unary and have unary range. Let be a permutation group on which preserves types and arities of all symbols. We will say that is a language equipped with a permutation group.

A -structure is a structure with vertex set , functions for every and relations for every . We will write structures in bold and their corresponding vertex sets in normal font. Note that when is trivial, one obtains the usual notion of model-theoretic -structures and all the following notions also collapse to their standard variants.

The language and its permutation group is usually fixed and understood from the context (and it is in most cases denoted by and respectively). If the set is finite we call a finite structure. If the language contains no function symbols, we call a relational language and say that a -structure is a relational -structure.

A homomorphism is a pair where and is a mapping such that for every and we have:

1. , and,

2. .

For brevity we will also write for in the context where and for where . For a subset we denote by the set and by the homomorphic image of a structure . Note that we write to emphasize that respects the structure.

If is injective then is called a monomorphism. A monomorphism is an embedding if for every we have the equivalence in the definition, that is,

 (x1,x2,…,xa(R))∈RA⟺(f(x1),f(x2),…,f(xa(R)))∈f(R)B.

If is an embedding where is onto then is an isomorphism. If is an inclusion and is the identity then is a substructure of . For an embedding with being the identity we say that is a copy of in .

Given a -structure and , the closure of in , denoted by , is the smallest substructure of containing . For we will also write for .

Generalising the notion of a graph clique, we say that a -structure is irreducible if every pair of vertices of is together in some relation of (possibly with some more vertices). Note that this is a weaker notion than given in [22], but sufficient for the purposes of this paper (and giving the definition in full strength would require some more preliminary definitions).

###### Example.

In this paper the languages will only consist of unary and binary relations and unary functions. In this case a structure is irreducible if and only if the union of the binary relations is a clique.

Homomorphism is a homomorphism-embedding if the restriction is an embedding whenever is an irreducible substructure of .

### 2.2 EPPA for ΓL-structures

We now state the main result of [22], but first we need to give a few more definitions. Again, they are often EPPA variants of an analogous result for the Ramsey property (the Hubička–Nešetřil theorem [23]).

A partial automorphism of -structure is an isomorphism where and are substructures of (remember that it also includes a full permutation of the language). We say that a class of finite -structures has the extension property for partial automorphisms (EPPA) if for every there is such that is a substructure of and every partial automorphism of extends to an automorphism of . We call with such a property an EPPA-witness of . is an irreducible structure faithful EPPA-witness of if it has the property that for every irreducible substructure of there exists an automorphism of such that .

###### Definition 2.2.

Let be a structure. An irreducible structure is a completion of if there exists a homomorphism-embedding such that it does not permute the language. It is automorphism-preserving if .

All structures in this paper will only consist of unary and binary relations (and possibly unary functions, but they will follow the existing binary relations). In this situation is a completion of if and (the structure induced by on ) differs from precisely by adding some binary relations on every pair of vertices of which is in none.

###### Definition 2.3.

Let be a finite language with relations and unary functions equipped with a permutation group . Let be a class of finite irreducible -structures and a subclass of . We say that the class is a locally finite subclass of if for every and every there is a finite integer such that every -structure has a completion provided that it satisfies the following:

1. For every vertex it holds that lies in a copy of ,

2. there is a homomorphism-embedding from to , and,

3. every substructure of with at most vertices has a completion in .

We say that is a locally finite automorphism-preserving subclass of if in the condition above the completion of can always be chosen to be automorphism-preserving.

The main theorem of [22] is then as follows.

###### Theorem 2.4 ([22]).

Let be a finite language with relations and unary functions equipped with a permutation group , let be a class of irreducible finite -structures which has EPPA and let be a hereditary locally finite automorphism-preserving subclass of with strong amalgamation. Then has EPPA. Moreover if EPPA-witnesses in can be chosen to be irreducible structure faithful then EPPA-witnesses in are irreducible structure faithful, too.

Here is hereditary if whenever and , then also . We will not define what strong amalgamation is (see [22]), but all classes for which we will use Theorem 2.4 will indeed satisfy this property.

We will also need the following theorem from [22].

###### Theorem 2.5 ([22]).

Let be a finite language with relations and unary functions equipped with a permutation group . Then the class of all finite -structures has irreducible structure faithful EPPA.

### 2.3 Metrically homogeneous graphs

Most of the details of Cherlin’s metric spaces are not important for this paper. We only give minimum necessary definitions and facts and refer the reader to [6], [4] or [24].

All the metric spaces we will work with will have distances from for some integer . Therefore, we will view them interchangeably as pairs where is the metric, as relational structures with trivial and binary relations (distance is not represented) and as complete graphs with edges labelled by (we will call these complete -edge-labelled graphs). The last point of view works well with the notion of completion: Given a (not necessary complete) -edge-labelled graph , a complete -edge-labelled graph is its completion if is a non-induced subgraph of .

We will also say that two vertices are in distance and that they are connected by an edge of length interchangeably. In particular, when we talk about an edge of a -edge-labelled, graph, it can be an arbitrary pair of vertices such that their distance is defined, it does not necessarily mean that they are in distance 1.

Major part of Cherlin’s list of the classes of finite metric spaces which embed to the path-metric of a countably infinite metrically homogeneous graph consists of certain 5-parameter classes . These are classes of metric spaces with distances (we call the diameter of such spaces) such that some other triangles are forbidden (e.g. triangles of short odd perimeter or triangles of long even perimeter).

A special case of these classes are antipodal

classes, where the five parameters have only two degrees of freedom. Here we will denote the antipodal classes as

.111The other parameters are then defined as , , and . is defined as the class of all finite metric spaces with distances from such that they contain no triangle with distances such that one of the following holds:

1. ,

2. is odd and , or

3. is odd and .

However, here we only need the following fact:

###### Fact 2.6 (Antipodal spaces).

In a class of antipodal metric spaces from Cherlin’s list the following holds:

1. The edges of length form a matching (that is, for every vertex there is at most one vertex in distance from it) and one can without loss of generality assume that it is a perfect matching.

2. For every pair of vertices such that and for every vertex we have .

3. If one selects exactly one vertex from each edge of length , the metric space they induce is from a special (non-antipodal) class of diameter which we will call .222It is in fact for , , and . And the other way around, one can get an antipodal metric space from every metric space by taking two disjoint copies of , connecting every vertex to its copy by an edge of length and using point 2 to fill-in the missing distances.

There are two kinds of antipodal classes with different combinatorial behaviour — those that come from a countable bipartite metrically homogeneous graph and those that come from a non-bipartite one. We will call the first the bipartite classes (their members have the property that they contain no triangles, or more generally cycles, of odd perimeter) and we will call the others the non-bipartite ones. This is slightly misleading, because some of the finite metric subspaces of the path-metric of a non-bipartite metrically homogeneous graph are surely bipartite, but it should not cause any confusion in this paper. The non-bipartite class of antipodal metric spaces of diameter is closely connected to switching classes of graphs and two-graphs (see [9]).

The following fact summarizes results from [4] about the non-bipartite odd diameter antipodal classes.

###### Fact 2.7.

Let be a non-bipartite class of antipodal metric spaces of odd diameter . Let be a -edge-labelled graph such that edges of length of form a perfect matching and furthermore for every such that and either is not connected by an edge to any of , or . Suppose furthermore that contains none of the finitely many cycles forbidden in .

Let be a mapping satisfying the following.

1. Whenever is an edge of , then .

2. Let and be two different edges of length of . Then , and .

There is such that the following holds.

1. is a completion of with the same vertex set,

2. for every edge of it holds that , and

3. Every automorphism of which preserves values of is also an automorphism of .

Such can be constructed by picking one vertex from each edge of length , considering this auxiliary metric space of diameter , completing it using [4] and then pulling this completion back using . The proof then uses [4, Lemma 4.18] (see also [19]) and the observation that the completion procedure for from [4] preserves the equivalence “”. That is, we say that two -edge-labelled graphs and are equivalent if they share the same vertex set and the same edge set and every edge has either the same label in both and , or it has label in and in . The completion procedure then produces equivalent graphs whenever given equivalent graphs.

## 3 The odd diameter non-bipartite case

EPPA for the even diameter non-bipartite case was proved in [4] (because it has automorphism-preserving completion by itself). In this section we prove the following proposition

###### Proposition 3.1.

Let be a non-bipartite class of antipodal metric spaces of odd diameter. Then for every there is which is an EPPA-witness of .

Fix . We can without loss of generality assume that every vertex has some vertex such that . Enumerate the edges of of length as and let be their indices, that is, (we will sometimes treat also as the set itself using the natural bijection). We furthermore denote , where and are vertices of .

### 3.1 The expanded language

We will call a function is a valuation function. For a set , we denote by the flip of , that is, the function defined as

 χF(i)={1−χ(i) if i∈Fχ(i) otherwise,

and for a permutation of we denote by the function satisfying .

Let be the language consisting of symmetric binary relations representing the distances, a unary function , and unary marks for every and for every valuation function .

We now define the permutation group . Let be a permutation of and let be such that if , then also . For every we let be the set of such that . We denote by the permutation of sending and fixing and pointwise. is then the group consisting of all for every possible choice of and .

For notational convenience, whenever is a -structure and is a vertex which has precisely one unary mark , we will denote by its projection and by its valuation. If does not have precisely one unary mark, we leave and undefined.

The following observation follows directly from the definitions above.

###### Observation 3.2.

Let be a -structure such that every vertex of has precisely one unary mark , let be an automorphism of , let be arbitrary vertices of , and assume that and . Then we have

 χu(j)=χv(i)

if and only if

 ψ(χFiu)(ψ(j))=ψ(χFjv)(ψ(i)).

This implies that the function defined by if and otherwise is invariant under automorphism of (including permuting the language).

### 3.2 The class K and completion to it

Let . We say that a -structure is a suitable expansion of if the following hold:

1. and share the same vertex set,

2. and share the same relations ,

3. if and only if ,

4. every vertex of has precisely one unary mark,

5. if and in , then , where , and

6. in it holds that if and only if is odd.

Denote by the class of all suitable expansions of all where the edges of length form a perfect matching (Fact 2.6 says that this is without loss of generality; one can always uniquely and canonically add vertices so that this condition is satisfied).

###### Proposition 3.3.

is a locally finite automorphism-preserving subclass of , the class of all finite -structures.

###### Proof.

Let be a large enough integer (say, at least 4 and at least twice the number of vertices of the largest forbidden cycle in ) and let and be as in Definition 2.3. (This is a different than we fixed at the beginning of this section.) We will not need here.

The fact that for every it holds that lies in a copy of implies that if and only if and furthermore the edges of length form a perfect matching in (because this holds in ).

Every substructure on at most vertices having a completion in implies the following:

1. Every pair of vertices is in at most one distance relation (and these relations are symmetric),

2. every vertex of is in precisely one unary relation,

3. whenever and , then .

We can assume that if and is a vertex of such that at least one of , is defined, then in fact both distances are defined and furthermore , because there is a unique way how to complete it. It also follows that whenever are vertices such that their distance is defined, then if and only if is odd.

Finally, from the definition of it also follows that contains no cycles forbidden in (we needed to be twice the number of vertices because Definition 2.3 talks about substructures and these need to be closed for functions). Hence if we define function as if and otherwise, Fact 2.7 gives us an automorphism-preserving way to add the remaining non- distances, which is exactly what we need for a completion to . ∎

Let us remark that is hereditary and from Fact 2.7 it follows that it is a strong amalgamation class.

### 3.3 Constructing the witness

For we define by putting

 χi(j)={0 if i≤j or i>j and dA(xi,xj) is even,1 otherwise.

We define a -structure which is a -expansion of . It will have the same vertex set and the same distance relations as , but we furthermore put for every such that . For every we put and .

Now we use Theorems 2.4 and 2.5 with Proposition 3.3 to get which is an EPPA-witness for (so, in particular, ). Finally, we put to be the reduct of forgetting all unary marks and all functions . Thus indeed, . And since , we also have .

### 3.4 Extending partial automorphisms

We will show that extends all partial automorphisms of . Fix a partial automorphism of . Without loss of generality we can assume that whenever and , then also (because there is a unique way of extending to ). Let be a permutation of extending the action of on the edges of length of in the natural sense.

We now define set of flipping pairs. We put and in if and in . Note that if both and are in the domain of then the outcome would be the same if we considered instead (because is an automorphism and therefore preserves the parity of and thus also the (non)-equality of the corresponding valuations). Note also that if we considered instead of , the outcome would still be the same.

It is easy to check that the pair is a -automorphism of and hence it extends to an automorphism of , where and . But this means that is an automorphism of extending and we thus conclude the proof of Proposition 3.1.

### 3.5 Remarks

1. If we extended the action of on the edges of length to coherently (say, in an order-preserving way), we would get coherent EPPA (see [31]) as in [9].

2. The same strategy would also work for proving EPPA for antipodal metric spaces of even diameter, we would only need to pick a subset such that and precisely one of is in for every and replace each occurrence of “odd distance” by “distance from ” and “even distance” by “distance such that ”. (Note that for even , we have , so “is both odd and even” in this sense.)

3. Cherlin also allows to forbid certain sets of -valued metric spaces (he calls them Henson constraints). We chose not to include these classes in order to avoid further technical complications, but using irreducible structure faithfulness and the fact that the completion from Fact 2.7 does not create distances and gives EPPA also in this case.

## 4 The even diameter bipartite case

The odd diameter bipartite case was done in [4] (because the edges of length go across the parts and there is thus an automorphism-preserving completion), so it suffices to deal with the even diameter case. We prove the following proposition.

###### Proposition 4.1.

Let be a bipartite class of antipodal metric spaces of even diameter. Then for every there is which is an EPPA-witness of .

The structure of the proof will be very similar to the odd non-bipartite case. We will also introduce some facts from [4] about completions, add unary functions and unary marks which will help us decide how to fill-in the missing distances while preserving all necessary automorphisms. We have to be a bit more careful in dealing with the bipartiteness (edges of length now lie inside the parts, so we need to make preserve the bipartition, there are also infinitely many forbidden cycles — the odd perimeter ones), but the general structure is identical.

Fix . We can without loss of generality assume that every vertex has some vertex such that . Consider the set of edges of of length and let be their indices, that is, . We denote , where and are vertices of and also assume that , where consists of the indices of edges in one part and of the indices of edges in the other part.

We also assume without loss of generality that (otherwise we can add more vertices to , and if this larger structure has an EPPA-witness , then it is also an EPPA-witness of the original ).

We will need the following analogue of Fact 2.7.

###### Fact 4.2.

Let be a bipartite class of antipodal metric spaces. Let be a -edge-labelled graph such that edges of length of form a perfect matching and furthermore for every such that and either is not connected by an edge to any of , or . Suppose furthermore that contains no odd perimeter cycles and none of the finitely many even perimeter cycles forbidden in .

Let be a set such that and exactly one of is in for every and denote by the set .

Let be a mapping satisfying the following.

1. Whenever is an edge of , then implies that and implies that .333This seemingly sloppy statement is necessary in order to deal with being in both and for even .

2. Let and be two different edges of length of . Then , and .

There is such that the following holds.

1. is a completion of with the same vertex set,

2. for every edge of it holds that implies that and implies that , and

3. Every automorphism of which preserves values of is also an automorphism of .

### 4.1 The expanded language

As in the odd non-bipartite case, we will call a function a valuation function, adopt the same notions of flips and permutations . We also let be the same language as before.

We also keep the definition of , however, we will put to be the group consisting of all for every possible choice of , but only for such permutations which preserve the partition of into two parts (that is, either and , or and vice versa.

Again, for a vertex in a -structure which has precisely one unary mark , we define and and we have a very similar observation as before.

###### Observation 4.3.

Let be a -structure (not necessarily a bipartite one) such that every vertex of has precisely one unary mark , let be an automorphism of , let be arbitrary vertices of , and assume that and . Then we have

 χu(j)=χv(i)

if and only if

 ψ(χFiu)(ψ(j))=ψ(χFjv)(ψ(i)).

This implies that the function defined by if and otherwise is invariant under automorphism of (including permuting the language).

### 4.2 The class K and completion to it

Now we also have to ensure that structures from are bipartite. Let . We say that a -structure is a suitable expansion of if the following hold:

1. and share the same vertex set,

2. and share the same relations ,

3. if and only if ,

4. every vertex of has precisely one unary mark,

5. if and in , then ,

6. in it holds that if then and if then , and

7. let and (where is taken with respect to ). Then is the bipartition of (and thus also of ).

Denote by the class of all suitable expansions of all where the edges of length form a perfect matching.

###### Proposition 4.4.

is a locally finite automorphism-preserving subclass of , the class of all finite -structures.

###### Proof.

Let be a large enough integer (say, at least 4 and at least twice the number of vertices of the largest even-perimeter forbidden cycle in ) and let and be as in Definition 2.3. (This is a different then fixed at the beginning of this section.) We will not need here.

Like for the odd non-bipartite case we get the following:

1. Every vertex of is in precisely one unary relation,

2. every pair of vertices is in at most one distance relation (and these relations are symmetric),

3. ,

4. the edges of length form a perfect matching in ,

5. whenever and , then ,

6. if and is a vertex of such that at least one of , is defined, then both distances are defined and furthermore .

7. let be vertices such that their distance is defined. Then implies and implies .

Furthermore, from the last condition for a suitable expansion we also get that whenever two vertices of are in an even distance, then there is such that and that whenever they are in an odd distance, then and are in different parts of . Note that this implies that contains no cycles of odd perimeter (each cycle has to contain an even number of odd edges).

Finally, from the definition of it also follows that contains no even cycles forbidden in . Hence if we define function as if and otherwise, Fact 4.2 gives us an automorphism-preserving way to add the remaining distances, which is exactly what we need for a completion to . ∎

Let us again remark that is hereditary and from Fact 4.2 it follows that it is a strong amalgamation class.

### 4.3 Constructing the witness

This is completely the same as for the odd diameter non-bipartite case. We define a -structure which is a -expansion of with the same vertex set, use Theorems 2.4 and 2.5 with Proposition 4.4 to get which is an EPPA-witness for . Finally, we put to be the reduct of forgetting all unary marks and all functions .

### 4.4 Extending partial automorphisms

Again, this is completely the same as before with the exception that the permutation of has to preserve the bipartition (with, possibly, exchanging and ). Every partial automorphism of respects the bipartition, and since we assumed that , it is always possible to extend it to a full permutation as needed.

Let us remark that if one is a bit more careful, the same strategy again gives coherent EPPA.

## 5 Conclusion

We are now ready to prove Theorem 1.2.

###### Proof of Theorem 1.2.

In [4] EPPA is proved for non-bipartite classes of even diameter and bipartite classes of odd diameter. Proposition 3.1 proves EPPA for non-bipartite classes of odd diameter and Proposition 4.1 proves EPPA for bipartite classes of even diameter, hence Theorem 1.2 is proved. ∎

We think of this paper as the first example of a more general method for bypassing the lack of an automorphism-preserving completion. As observed in [4], the non-bipartite antipodal classes of odd diameter do not have automorphism-preserving completion essentially because there is no canonical way of completing the graph consisting only of two edges of length — one pair of the added distances has to be odd and the other even and there is no way of picking this canonically.

Here, we are using the method of valuation functions to add more information to the structures (and thus restrict automorphisms) while preserving all partial automorphisms of one given structure and then putting this expanded class into the existing machinery. A similar trick can be done also for structures with higher arities using higher arity valuation functions (cf. [22]). However, there are still classes where this method does not work, for example the class of tournaments which poses a long-standing important problem in this area.

## 6 Acknowledgements

I would like to thank Jan Hubička, Jaroslav Nešetřil and Gregory Cherlin for valuable advice and comments which significantly improved this paper. Supported by project 18-13685Y of the Czech Science Foundation (GAČR).