Induced betweenness in order-theoretic trees

The ternary relation $B(x,y,z)$ of betweenness states that an element $y$ is between the elements $x$ and $z$, in some sense depending on the considered structure. In a partially ordered set $(N,\leq)$, $B(x,y,z):\Longleftrightarrow x<y<z\vee z<y<x$. The corresponding betweenness structure is $(N,B)$. The class of betweenness structures of linear orders is first-order definable. That of partial orders is monadic second-order definable. An order-theoretic tree is a partial order such that the set of elements larger that any element is linearly ordered and any two elements have an upper-bound. Finite or infinite rooted trees ordered by the ancestor relation are order-theoretic trees. In an order-theoretic tree, we define $B(x,y,z)$ to mean that $x<y<z$ or $z<y<x$ or $x<y\leq x\sqcup z$ or $z<y\leq x\sqcup z$ provided the least upper-bound $x\sqcup z$ of $x$ and $z$ is defined when $x$ and $z$ are incomparable. In a previous article, we established that the corresponding class of betweenness structures is monadic second-order definable.We prove here that the induced substructures of the betweenness structures of the countable order-theoretic trees form a monadic second-order definable class, denoted by IBO. The proof uses a variant of cographs, the partitioned probe cographs, and their known six finite minimal excluded induced subgraphs called the bounds of the class. This proof links two apparently unrelated topics: cographs and order-theoretic trees.However, the class IBO has finitely many bounds, i.e., minimal excluded finite induced substructures. Hence it is first-order definable. The proof of finiteness uses well-quasi-orders and does not provide the finite list of bounds. Hence, the associated first-order defining sentence is not known.


Introduction
Betweenness is an abstract topological notion that has been studied for a long time in different structures [1,2,16,19,21,22].Informally, the ternary relation of betweenness B(x, y, z) states that an element y is between x and z in a sense that depends on the considered structure.In a partially ordered set (N, ≤), B(x, y, z) :⇐⇒ x < y < z ∨ z < y < x.The corresponding betweenness structure is (N, B).The class of betweenness structures of linear orders is first-order definable, i.e., is axiomatized by a single first-order sentence; that of partial orders is monadic second-order definable [8,10,18].
The betweenness structures of certain finite graphs have been studied in [1,2] and those of trees of various kinds in [4,6,7].

Partial orders
For a partial order ≤, ⊆, we denote respectively by <, ⊂, the corresponding strict partial order.We write x⊥y if x and y are incomparable for the considered order.
Let P = (V, ≤) be a partial order.For X, Y ⊆ V , the notation X < Y means that x < y for every x ∈ X and y ∈ Y .We write X < y instead of X < {y} and similarly for x < Y .We use a similar notation for ≤ and ⊥.The least upper-bound of x and y is denoted by x ⊔ y if it exists and is then called their join.
An embedding of a partial order P = (N, ≤) into another one P ′ = (N ′ , ≤ ′ ) is an injective mapping h : N → N ′ such that h(x) ≤ ′ h(y) if and only if x ≤ y.Hence it is monotone (or isotone).It is a join-embedding if h(x) ⊔ ′ h(y) = h(x ⊔ y) whenever x and y have a join in P .We write P ⊆ j P ′ if N ⊆ N ′ and the inclusion mapping is a join-embedding.If P and P ′ are labelled, then the labels are preserved in embeddings.

Graphs
Graphs are undirected and simple, which means without loops and parallel (multiple) edges.We denote respectively by P n , C n , K n a path, a cycle and a clique with n vertices.
The notation u − v designates an edge with ends u and v.As a property, it means also "there is an edge between u and v".We say then that u and v are adjacent or are neighbours.The notation u − v − w − x shows the vertices and edges of a path of 4 vertices.The notation u − v − w − x − u shows the vertices and edges of a 4-cycle. (i) The restriction to countable structures makes it possible to define effective descriptions and to obtain computability results.For example, it is decidable whether two regular join-trees are isomorphic [5], Corollary 3.31.
Induced subgraph inclusion is denoted by ⊆ i and G[X] is the induced subgraph of G = (V, E) with vertex set X ⊆ V .Then, G − x := G[V − {x}].
We denote by G⊕H the union of disjoint graphs G and H.We define G⊗H as G⊕H augmented with edges between any vertex of G and any vertex of H.We can use the notation G 1 ⊕ G 2 ⊕ ... ⊕ G n because the operation ⊕ is associative, and similarly for ⊗.We will also use the notation ⊕(G 1 , G 2 , ..., G n ) or ⊗(G 1 , G 2 , ..., G n ).
The diameter of a connected graph is the maximal distance between two vertices, i.e., the minimum number of edges of a path between them.
By a class of graphs, we mean a set closed under isomorphism.

Rooted trees
In Graph Theory, a tree is a connected graph without cycles.It is convenient to call nodes the vertices of a tree because in some proofs, we will discuss simultaneously a graph and an associated tree.A rooted tree is a triple T = (N T , E T , r) such that (N T , E T ) is a tree and r ∈ N is a distinguished node called its root.This tree can be defined from the partial order (N T , ≤ T ) such that x ≤ T y if and only if y is on the path from the root r to x.In most cases, we will handle a rooted tree T as a partial order (N T , ≤ T ).In Section 3, we will generalize rooted trees into order-theoretic trees, defined as partial orders, as done by Fraïssé [13].
A leaf is a minimal node and L T denotes the set of leaves.The other nodes are internal.If x < T y, then y is an ancestor of x.A node x is a son of y if x < T y and there is no node z such that x < T z < T y.The degree of a node is the number of its sons.A node of degree 0 is thus a leaf.
The subtree of a rooted tree T = (N, ≤) issued from a node u is T /u := (N ≤ (u), ≤ ′ ) where ≤ ′ is the restriction of ≤ to N ≤ (u).
A rooted forest F is the union of pairwise disjoint rooted trees and Rt F denotes the set of roots of its trees.
A finite rooted tree T can be denoted linearly by T defined as follows (which is useful in inductive proofs): if T is reduced to r, then T := r, if T has root r and subtrees T 1 , ..., T p issued from the sons of the root, then T := r( T 1 , ..., T p ).
Any permutation of the sequence T 1 , ..., T p defines the same tree because there is no defined order between the sons of a node.

Relational structures and logic
A relational structure is a tuple S = (D, R 1 , ..., R p ) where D is a set, its domain, and R 1 , ..., R p are relations of fixed arities.The signature of S is the sequence of arities of the relations R 1 , ..., R p .We will consider classes of structures having a fixed signature.
If S is a relational structure with domain N and X ⊆ N , then S[X] denotes the induced substructure with domain X, and ⊆ i denotes an induced inclusion of relational structures of same signature.
We will use structures (N, ≤) to describe a partial order, a rooted tree or an order-theoretic forest (defined in Section 3), (V, edg) to describe an undirected graph with set V of vertices where edg(x, y) means that there is an edge between x and y, and (N, B) for a betweenness structure (cf.Introduction and Section 4), where B is a ternary relation.Additional unary relations will formalize labellings of the elements of N or V .
The isomorphism of relational structures is denoted by ≃.The isomorphism class of a structure S is denoted by [S] ≃ .A set of structures is called a class if it is closed under isomorphism.We say that it is finite if the set of its isomorphism classes is finite.A class C is hereditary if it is closed under taking induced substructures.
Properties of structures (and of graphs) will be expressed by first-order (FO) or monadic-second order (MSO) formulas and sentences.A sentence is a formula without free variables.For an example, that a graph has no induced subgraph isomorphic to a finite graph H is FO expressible.That a graph is not connected is expressed in its representing structure (V, edg) by the following MSO-sentence: The book [10] contains a detailed study of monadic second-order logic for expressing graph properties.We will consider classes of countable (which means "finite or countably infinite") structures.Such a class is MSO (or FO) definable if it is the class of countable models of an MSO (or FO)-sentence.It is uFO definable, if it is defined by a universal FO-sentence, i.e., of the form ∀x, y, z...φ(x, y, z, ...) where φ(x, y, z, ...) is quantifier-free.
The finiteness of an arbitrary set X is not MSO expressible.However it is if some linear order on X can be defined by MSO-formulas in the case where X is part of the domain D of a structure having a nonempty signature (see Example 1.6 in [7]).This is the case for an example if D is the set of nodes of a tree of bounded degree.An MSO f in -sentence is an MSO-sentence where the finiteness set predicate F in(X) expressing that a set X is finite can be used.
These definitions and the next proposition apply to graphs represented by structures (V, edg).
A class of structures C is finitary if a structure S belongs to it if and only if all finite induced substructures of S belong to C. This implies that C is hereditary and characterized by its subclass C f in of finite structures.If C is finitary and contains an infinite structure, then C f in is hereditary but not finitary.
If C is finitary, then its bounds, forming the class Bnd(C), are the finite structures not in C whose proper induced substructures are all in C. Then C is the class of structures having no induced substructure isomorphic to one in Bnd(C).
A class may be hereditary while having infinitely many bounds.Consider for an example the class of graphs without cycles whose vertices have all degree 2; then each cycle C n , where n ≥ 3 is a bound of this class.
A routine proof can establish the following.Proposition 1.1: A class of structures is uFO definable if and only if it is finitary and has a finite set of bounds (where finiteness is up to isomorphism).If it is so, its finite structures can be recognized in polynomial time.

Cographs and related notions
In this section all graphs (and trees) are finite.(d) The syntactic tree of a term defining a cograph G = (V, E) is called a {⊕, ⊗}-tree.It is a rooted tree whose set of leaves is V and whose internal nodes are of degree at least 2 and labelled by ⊕ or ⊗.
Definition 2.2: 2-graphs A 2-graph is a graph (V, E) equipped with a bipartition V 1 ⊎ V 2 of its vertex set V .We will say that x ∈ V i is an i-vertex.The type of a finite path x 1 − x 2 − ... − x n in a 2-graph is the word b 1 b 2 ...b n over {1, 2} such that x j is a b j -vertex for each j = 1, ..., n.
V and removing the edges between its 1-vertices.
(b) A probe cograph (a p-cograph in short) is obtained from a pp-cograph by forgetting the bipartition (and the corresponding labelling of its vertices by 1 or 2).
(c) A bipartition of a graph (or its corresponding vertex-labelling by 1 or 2) is good if it makes it into a pp-cograph.
(d) Partitioned probe cographs can be defined by terms, similar to those that define cographs, using the operation ⊕ and the operation ⊗ that we redefine as follows for 2-graphs: G⊗H is G⊕H augmented with all edges between an i-vertex of G and a j-vertex of H, provided i and j are not both 1.These two operations do not modify the vertex labellings of G and H.They are associative.A nullary symbol • i (x) defines x as an isolated i-vertex.
The path P 4 = a − b − c − d with labelling of type 1212 is a pp-cograph defined by the term To define it up to isomorphism, we can use the term We review some results from [11,17].(2) The class of probe cographs is hereditary and has finitely many bounds.Its graphs can be recognized in linear time.
An immediate consequence of interest for the present article is that pp-cographs are uFO definable among 2-graphs.The defining sentence is effectively constructed from the six known bounds.Probe cographs are so, but the corresponding uFO sentence is not known, because the complete list of bounds is not either.However, their bounds are definable by a known MSO-sentence obtained from the FO-sentence that defines the pp-cographs.We will discuss these points in Section 5.

Examples 2.5:
(1) The path P 4 is not a cograph.It has good labellings of types 1212 and 1221.Its labellings of type 1222, 2122 and 2222 are not good.
(2) The labelled path P 5 = a − b − c − d − e of type 12121 is a pp-cograph defined by the term No other labelling of it is good, which follows from Proposition 2.4(1).
(  (2).It follows that a p-cograph has no induced P 6 .Hence, a connected p-cograph cannot have diameter 5 or more because otherwise, it would contain an induced path P 6 .Furthermore, P 6 is a bound of p-cographs.
(4) A similar proof using (1) shows that the cycle C 5 is a bound of p-cographs.All other graphs having at most 5 vertices are p-cographs.Proposition 5.5 will present some bounds for p-cographs.
(a) An order-theoretic forest (an O-forest in short) is a partial order J = (N, ≤) such that, for each x in N , called the set of nodes, the set L ≥ (x) := {y | y ≥ x} is linearly ordered.An O-forest is an O-tree if every two nodes have an upper-bound.An O-tree is a join-tree (ii) if every two nodes x and y have a least upper-bound, denoted by x ⊔ y and also called their join.An O-tree may have no largest node.Its largest node if it exists is called the root.If x ⊔ y and y ⊔ z are defined, then so is x ⊔ z and it belongs to {x ⊔ y, y ⊔ z}.
(b) If u < w, then we say that w is an ancestor of u.
(d) A leaf is a minimal node.It has degree 0; the set of leaves is denoted by L J .
(ii) We used join-trees to define the modular decomposition and the rank-width of countable graphs [4,9].We studied them in algebraic and logical perspectives in [5].
(e) A node x has degree 1 if there is y < x such that every node z < x is comparable with y.For finite forests, this is equivalent to the definition of degree given in Section 1.If we delete some nodes of degree 1 of an O-forest J, we obtain a (possibly empty) O-forest J ′ that join-embeds into J (cf.Section 1) because a node of degree 1 is not the join of any two incomparable nodes.
The partial order (N T , ≤ T ) associated with a rooted tree T is a join-tree such that L ≥ (x) is finite for each node x.Conversely, every O-tree having this property is associated in this way with a rooted tree.Definition 3.2: Substitutions of lines in O-forests.Let J = (N, ≤) be an O-forest and, for each x ∈ N , let (A x , ≤ x ) be a (possibly empty) linearly ordered set.These sets are assumed to be pairwise disjoint.We let It is an O-forest in which each nonempty set A x is a line.

Definitions 3.3:
The join-completion of an O-forest.Let J = (N, ≤) be an O-forest and K be the set of upwards closed lines of the form L ≥ (x, y) := L ≥ (x) ∩ L ≥ (y) for all (possibly equal) nodes x, y.If x and y have a join, then The family K is countable.We let h : N → K map x to L ≥ (x) and J := (K, ⊇).We call J the join-completion of J because of the following proposition, stated with these hypotheses and notation.Proposition 3.4 [7]: The partially ordered set J := (K, ⊇) is a join-tree and h is a join-embedding J → J.
If we identify x ∈ N with h(x) := L ≥ (x), then h defines a join-embedding of J into J.The join of h(x) and h(y) is L ≥ (x, y).
The following side proposition shows that cographs arise naturally from O-forests.We recall that ⊥ denotes incomparability in a partial order.Proposition 3.5: The cocomparability graph CC(J) := (N, ⊥) of a finite forest J = (N, ≤) is a cograph.
Proof sketch: First we prove that the cocomparability graph CC(T ) = (N, ⊥) of a finite rooted tree If we define as a cograph any finite or infinite graph without induced path P 4 , then this proposition extends to countable O-forests.

Betweenness in order-theoretic trees
We will consider ternary structures S = (N, B).
Definitions and background 4.1: Betweenness in O-forests.
(a) The betweenness relation of an O-forest J = (N, ≤) is the ternary relation B J ⊆ N 3 such that: We have We denote by BO the class of betweenness structures (N, B J ) of O-forests J = (N, ≤).
(b) The following related classes have been considered in [6,7].
IBO is the class of induced substructures of the structures in BO.QT (for quasi-trees (iii) ) is the class of betweenness structures of join-trees.IBQT is the class of induced substructures of structures in QT.
The classes IBQT and BO are incomparable, and for finite structures, we have QT = BO.
Conversely, every ternary structure satisfying these properties is in QT [4].Hence, the class QT is FO-definable.It is not hereditary.Its closure under taking induced substructures, denoted by IBQT, is uFO definable by Proposition 2.12 of [7].It is defined by A1-A6 together with: The class BO is MSO definable [6,7].The case of IBO was left as a conjecture.We will prove the following two results.

Theorem 4.2:
(1) The class IBO is effectively MSO f in definable.
(2) This class is uFO definable.Assertion (2) is not effective: we do not know the defining sentence.To the opposite, Assertion (1) is.It entails that the class of bounds of IBO is MSO definable (among finite structures).One can prove that Bnd(IBO) is finite, but this fact and the knowledge of the defining MSO-sentence are not sufficient to yield an algorithm (see Section 6).
We will consider ternary structures (N, B) that always satisfy the uFO expressible properties A1-A6.These properties hold in every structure in IBO but do not characterize this class (Proposition 3.22 of [7]).

Preliminary results on IBO
Defintion 4.3: The Gaifman graph of a ternary structure S = (N, B) is the graph Gf (S) whose vertex set is N and that has an edge u − v if and only if u and v belong to some triple in B. We say that S is connected if Gf (S) is.If it is not, then S is the disjoint union of the induced structures S[X] for all connected components Gf (S)[X] of Gf (S).

Lemma 4.4:
(1) A structure S is in IBO if and only if its connected components are.
(2) If a structure S in IBO is connected, then it is an induced betweenness structure of an O-tree. Proof: (1) The "only if" direction is clear by the definitions.Conversely, assume that each connected component of a ternary structure S = (N, B) is in IBO.For each of them S[X], let U X := (M X , ≤ X ) be a defining O-forest (we have M X ⊇ X).We let N R be N ordered by reversing the natural order.We assume these forests U X pairwise disjoint and disjoint from N R .We let W be the union of N R and the U X 's that we order as follows: x ≤ W y if and only if x ≤ y in N R or, for some component X, we have, either x ≤ X y or x ∈ M X and y ∈ N.
Then W is an O-tree and B = B W ∩ N 3 .
(2) Let S = (N, B) be such that B = B U ∩ N 3 for some O-forest U = (M, ≤).Let M ′ be the union of the lines L ≥ (x) of U for all x ∈ N .Then We prove that it is an O-tree if furthermore S is connected.If x and y belong to a triple in B, then they have an upper-bound in M ′ by the definition of B U and, furthermore, any x ′ ≥ x and y ′ ≥ y also have an upper-bound in M ′ .Let u, v ∈ M ′ .There is a path x 1 − x 2 − ... − x n in Gf (S) such that u ≥ x 1 and v ≥ x n .Hence we have z 1 , z 2 , ..., z n−1 such that: z 1 is an upper-bound of u and x 2 , z 2 is an upper-bound of z 1 and x 3 , ..., and finally z n−1 is an upper-bound of z n−2 and v ≥ x n .
We have The converse of Assertion (2) may be false: consider a star T = (N, ≤) with root (iv) r and S := (N − {r}, B) where Then, S is in IBO, defined from a tree, but not connected as B is empty.Definition 4.5: Marked join-trees and related notions (b) We define the betweenness relation B T ⊆ V 3 T of T as follows: The join x ⊔ T z is always defined as T is a join-tree.We have B T (x, y, z) if x < y < z.
We define the betweenness structure of T as S T := (V T , B T ).Its Gaifman graph has vertex set V T .
(c) If we delete from T all nodes of degree 1 belonging to M ⊕ ⊎M ⊗ , we obtain a marked join-tree having the same betweenness structure and that join-embeds into T (cf.Definition 3.1(e)).We call reduced such a marked join-tree.
(e) We say that a marked join-tree U = (N, ≤, N ⊕ , N ⊗ ) join-embeds into a marked join-tree T = (M, ≤ , M ⊕ , M ⊗ ) if there is a join-embedding of (N, ≤) into (M, ≤) that maps N ⊕ to M ⊕ and N ⊗ to M ⊗ .
Lemma 4.6: Let T = (M, ≤, M ⊕ , M ⊗ ) be a marked join-tree. ( (2) If X ⊆ V T and B = B T [X], then there exists U as in (1) such that B U = B.
(iv) All other nodes are adjacent to the root.
(3) If T 1 , ..., T n , ... is a sequence of marked join-trees such that T n ⊆ j T n+1 and T is the union of the T n 's, then B T is the union of the increasing sequence B T1 ⊆ i B T2 ⊆ i ...B Tn ⊆ i ...

Proof:
(1) Since U join-embeds into T , if x, y ∈ N ∩ V T , then x ⊔ U y = x ⊔ T y and this join belongs to M ⊕ (resp.M ⊗ ) if and only if it belongs to N ⊕ (resp.to N ⊗ ).The result follows from the definitions.
(2) Let T = (M, ≤, M ⊕ , M ⊗ ) be a marked join-tree and N ⊆ M .Let us remove from T all subtrees T /u that contain no node of N .We obtain U = (N ′ , ≤, N ⊕ , N ⊗ ), a marked join-tree that join-embeds into T and 1).
(3) We have T n ⊆ j T for each n.The result follows. 2 Proposition 4.7: (2) If N is finite, then T can be chosen finite of size at most 2 |N | − 1. Proof: (1) "If" direction.Let S T := (V T , B T ) be defined from a marked join-tree T = (M, ≤, M ⊕ , M ⊗ ).We will construct an O-tree For each node x in M ⊕ , we let N R x be an isomorphic copy of N ordered by reversing the natural ordering.Hence N R x has no least element.We choose these copies pairwise disjoint and disjoint with M .
We define It is an O-tree by Definition 3.2 (where substitutions are defined).
If x ⊔ T z ∈ M ⊕ , then x and z have no join in U .Let x, y, z ∈ V T be such that B T (x, y, z) holds.If x < y < z or z < y < x in T, then the same holds in U and B U (x, y, z) holds.Otherwise, x and z are incomparable and x < y ≤ x ⊔ T z > z or x < x ⊔ T z ≥ y > z.Then, x ⊔ T z is either in V T or is labelled by ⊗.In both cases, x ⊔ T z is the join of x and z in U .Hence, B U (x, y, z) holds.
Conversely, assume that x, y, z ∈ V T and B U (x, y, z) holds.If x < y < z or z < y < x in U, then the same holds in T and B T (x, y, z) holds.Otherwise, x and z are incomparable and x < y ≤ x⊔ U z > z or x < x ⊔ U z ≥ y > z.Then x and z have a join m in T .It must be in V T ∪ M ⊗ , otherwise, x ⊔ U z does not exist because it would be the minimal element of N R m .Hence B T (x, y, z) holds.Hence S ∈ IBO."Only if" direction.Conversely, assume that S = (N, B) in IBO is defined from an O-tree U = (M, ≤) such that N ⊆ M and B = B U ∩ N 3 .We can assume that for every y ∈ M , we have x ≤ y for some x ∈ N : if this is not the case, we replace M by the union M ′ of the upwards closed lines L U ≥ (x) for all x ∈ N and, letting Let W = (P, ≤) be the join-completion of U , cf Definition 3.3.We label by ⊗ a node in M − N , and by ⊕ a node in P − M .These latter nodes have been added to U in place of missing joins, according to Proposition 3.4.
Proof: B ⊆ B W .Let B(x, y, z).If x < y < z or z < y < x in U then the same holds in W and B W (x, y, z) holds.
Otherwise, x and z are incomparable and x < y Conversely, assume that B W (x, y, z) holds.A similar proof establishes that B(x, y, z) holds. 2 If S = (N, B) in IBO is defined from an O-forest U = (M, ≤) as opposed to an O-tree, then its connected components are defined by O-trees.For each of them, we have a marked join-tree.We put them together in a marked join-tree with a root labelled by ⊕. (Similarly to the proof of Lemma 4.4(2)).
(2) Let S = (N, B) in IBO be finite and defined from a marked join-tree T = (M, ≤, M ⊕ , M ⊗ ) such that N = V T and B = B T .By removing the nodes in M ⊕ ∪ M ⊗ of degree 1, we obtain a reduced marked join-tree that defines S and has at most Remark 4.8: We observed in Proposition 2.15 of [7] that a finite structure in IBO may not be defined from any finite O-forest U (cf. Definition 4.1).Marked join-trees remedy this "defect" and yield Proposition 4.7, a key fact for our proof.We do not have B + (a ′ , a, c, c ′ ) because a and c have no join.The right part shows a finite marked join-tree T = (M, ≤, M ⊕ , M ⊗ ) where z has been added as join of x and y and the nodes 2, 3, ..., n, ... of degree 1 above z have been deleted (cf.Definition 3.1 for the degree).
Proposition 4.10: The class IBO is finitary, that is, S is in IBO if and only if each of its finite induced substructures is.

Proof:
The "only if" direction is clear as, by its definition, the class IBO is hereditary, i.e., closed under taking induced substructures."If" direction.First, some observations.If S = (V T , B) is defined from a marked join-tree T = (N, ≤ , N ⊕ , N ⊗ ) and S ′ ⊆ i S, then the restriction T ′ of T to {x ∈ N | x ≥ y for some y ∈ V T } is a marked join-tree that defines S ′ .By reducing it (Definition 4.5(c)), we get T ′′ ⊆ j T that defines S ′ .
By Proposition 4.7, each finite structure S = (N, B) in IBO of size m = |N | is defined by marked join-trees of size at most 2m − 1.We let J(S) be the finite set of all such join-trees, up to isomorphism.
For proving the statement, we let S = (N, B) be infinite.It is the union of an increasing sequence S 1 ⊂ i S 2 ⊂ i ... ⊂ i S n ⊂ i ... of finite induced substructures that we assume to be in IBO.
We will use the following version of Koenig's Lemma.Let A 1 , A 2 , ..., A n ,... be an infinite sequence of pairwise disjoint finite sets, and A be their union.Let R ⊆ A × A be such that for every b in A n , n > 1, there is a ∈ A n−1 such that (a, b) ∈ R.Then, there exists an infinite sequence a 1 , ..., a n , ... such that (a n−1 , a n ) ∈ R for each n > 1.
Hence, there is an infinite sequence of marked join-trees trees T 1 ⊂ j T 2 ⊂ j ... ⊂ j T n ⊂ j ... such that T n ∈ J(S n ) for each n.By Lemma 4.6(3), their union is a marked join-tree T such that T n ⊂ j T for each n.We obtain an increasing sequence of finite marked join-trees whose union is a marked join-tree that defines S. Hence S ∈ IBO. 2 The proof of Theorem 4.2(1) reduces to that of the following proposition.

Proposition 4.11:
There is an MSO-sentence that characterizes the finite connected structures in IBO among the finite ternary structures.

Proof of Theorem 4.2(1): assuming proved Proposition 4.11:
Let φ be an MSO-sentence such that, for every finite ternary structure S = (N, B): S |= φ if and only if S is connected and belongs to IBO.
Consider the MSO f in sentence ψ : where γ(X) expresses that X is connected in the Gaifman graph Gf (S) and φ[X] is the relativization of φ to X.
Relativizing a sentence to a set, here X, is a classical construction in logic, see e.g.[ Proposition 4.11 is the main technical result.We will only handle finite objects: graphs, rooted trees, rooted forests and structures (N, B).All trees and forests will be rooted, defined as partial orders (N, ≤) and simply called trees and forests.We need some more definitions.(i) if B(x, y, z) holds, then x < T y or z < T y, (ii) if B(x, y, z) and x < T y > T z hold, then y = x ⊔ T z.
(iii) if x < T z, then B(x, y, z) holds if and only if x < T y < T z. □ Lemma 4.13: Let S = (N, B) ∈ IBO be finite, connected and defined from a finite reduced marked tree (v) (1) Then T := U [N ] = (N, ≤ T ) is a finite forest compatible with B, where ≤ T is the restriction of ≤ U to N .
(2) The order ≤ T is FO definable in the structure (N, B, R) where R is the set of roots of T , i.e. of maximal elements with respect to ≤ T .
(v) Every finite tree is a join-tree.
The forest T is not necessarily a tree because the root of U need not be in N .This root cannot be labelled by ⊕, otherwise S is not connected (we exclude the trivial case where N is singleton).

Proof:
(1) Let S, T, U as in the statement.
(i) If B(x, y, z) holds, then: where in the latter case, In all cases, we have x < U y or z < U y, hence x < T y or z < T y.
(ii) If B(x, y, z) and x < T y > T z hold, then the above description of B(x, y, z) shows that y ≤ U x ⊔ U z.As we have x < U y > U z, we must have y = x ⊔ U z.If y is not x ⊔ T z, we have m ∈ N such that x < m and z < m < y in T and in U .But then y is not the join of x and z in U, and so, y = x ⊔ T z.
(iii) Clear from the definitions because ≤ T is the restriction of ≤ U to N .
(2) If R = {r}, then x ≤ T y if and only if x = y or y = r or B(x, y, r) holds.
Otherwise, the root of U is in N ⊗ and has degree at least 2. Let x and y be not in R.

Claim
(a) If r ∈ R, we have x < T r if and only if B(x, r, r ′ ) holds for some r ′ ∈ R.
(b) We have x < T y if and only if B(x, y, r) holds for some r ∈ R.

Proof of the claim:
(a) Assume that x < T r.There is r ′ ∈ R such that r ⊔ U r ′ has label ⊗.Hence B(x, r, r ′ ) holds.Conversely, if B(x, r, r ′ ) holds for some r ′ ∈ R, we have x < T r or r ′ < T r because T is compatible with B. As r and r ′ are different and are distinct roots of T , they are incomparable and we have x < T r.
(b) If x < T y, we have x < T y < T r for some r ∈ R. Hence B(x, y, r) holds since T is compatible with B.
Conversely, if B(x, y, r) holds for some r ∈ R, then, we have x < T y or r < T y.The latter is not possible as r is a root. 2 Let ψ(R, x, y) be the following FO formula (an FO formula may have free set variables, as here R, and use atomic formulas of the form u ∈ R): (a) For each node x of T with sons y 1 , ..., y s , s ≥ 2, we define y i ∼ x y j if and only if i = j or y i ⊔ U y j ̸ = x so that this join has label ⊗ or ⊕.It is clear that ∼ x is an equivalence relation.
We have y i ∼ x y j if and only if B(y i , x, y j ) does not hold, by (ii) of compatibility, Definition 4.12.y ∈ C 2 if and only if y ′ < y for some y ′ ∈ N , y − z is an edge (vi) if and only if y or z is in C 2 and y ⊔ U z has label ⊗.
There are no edges between vertices in C 1 .Hence G x,C is a pp-cograph.We obtain a cograph if we add edges y − z such that y and z are in C 1 and y ⊔ U z has label ⊗.
(c) Let R = {r 1 , ..., r p }, p ≥ 2. We let G root be the 2-graph (R, E, R 1 , R 2 ) defined as G x,C above, where R replaces C and y ∈ R 2 if and only if y ′ < y for some y ′ ∈ N .It is also a pp-cograph.
Lemma 4.17: The edges y − z of G x,C and G root are characterized by the FO formula Proof: Consider x ∈ N having sons y and z in a class C of ∼ x .Let y − z be an edge of G x,C such that y ∈ C 2 and y ⊔ U z has label ⊗.Then B U (y ′ , y, z) holds for all y ′ < y and so does B(y ′ , y, z) as B = B U .
(vi) E denotes the set of edges.
Conversely, if y ′ < y∧ B(y ′ , y, z) holds, then the join y ⊔ U z must have label ⊗ or be in N .But in the latter case, it must be x as y and z are sons of x.Hence, we have B(y, x, z) but then, we do not have y ∼ x z.Hence, y − z is an edge of G x,C .
The proof is similar for G root .The join y ⊔ U z cannot be in N as y, z are distinct roots. 2 It follows that the 2-graphs G root and G x,C can be defined from B and T only, without using U that we are actually looking for.Furthermore, they can be described by FO formulas in the structure (N, B, R).
The formulas φ(R) and ψ(R, x, y) are defined before Proposition 4.14.
(1) There exists a marked tree U ⊇ T such that B = B U if and only if the 2-graphs G root and G x,C are pp-cographs.
(2) This condition is FO expressible in the structure (N, B, ≤). Proof: (1) The "only if" direction follows from the previous constructions.
Conversely, assume that each 2-graph G x,C (determined solely from T and B by Lemma 4.17) as in the statement is a pp-cograph.By adding some edges between its 1-vertices, we can get a cograph . It is defined by a {⊕, ⊗}-tree t x,C (Definition 2.1(c)), a tree whose internal nodes are labelled by ⊕ or ⊗ and whose set of leaves is C.
Similarly, if T has several roots and G root is a pp-cograph, there is a cograph H root ⊇ G root defined by a {⊕, ⊗}-tree t root whose set of leaves is R.
By inserting in T the internal nodes of t x,C between x and the nodes in C, for all relevant pairs (C, x), and those of t root above the roots of T , we get a marked tree U such that U ⊇ T = U [N ] and B = B U .
This can be formalized as follows.By bottom-up induction, we define marked trees T x and T x,C for each x in N and equivalence class C of the relation ∼ x .We assume that the trees t x,C and t root are pairwise disjoint.
(a) If x is a leaf, then T x := x.There is no set C to consider.
Otherwise, T x := x(..., T x,C , ...) where the list covers all equivalence classes C of ∼ x .(We use the linear notation of finite rooted trees defined in Section 1).
Otherwise, we use the {⊕, ⊗}-tree t x,C to define T x,C := t x,C [..., y ←− T y /y, ...], that denotes the simultaneous substitution in t x,C of T y for each y ∈ C (it is a leaf of t x,C ).
(c) To complete the construction, we define U := T r if T is a tree with root r ∈ N .Otherwise, U := t root [..., r ←− T r , ...] denoting the substitution in t root of T r for each leaf r ∈ R (it is a leaf of t root ).
π(R) : R is not singleton and G root is a pp-cograph (we use α and η).
It is MSO expressible in (N, B, ≤) by Proposition 2.4(1) whether the 2-graphs G root and G x,C are all pp-cographs.The condition of Assertion ( 1) is thus MSO expressible in the structure (N, B, ≤) by an MSO-sentence µ. 2 Proof of Proposition 4.11: We prove that an MSO-sentence can characterize the finite connected structures in IBO among the finite ternary structures.There is an MSO-sentence χ expressing that a ternary structure S = (N, B) is connected and satisfies A1-A6.The sentence over S = (N, B) defined as ∃R.(φ(R) ∧ µ ′ (R)) where µ ′ translates µ (of Proposition 4.18(2)) by using ψ(R, x, y) to define ≤ expresses well that S is in IBO by Proposition 4.18 (1).Hence, χ ∧ ∃R.(φ(R) ∧ µ ′ (R)) is the desired sentence.2

Well-quasi-orderings and finite sets of bounds
We recall definitions and a result from [20].(b) The class U(C) is well-quasi-ordered (implicitely by induced inclusion) if, for every infinite sequence S 1 , S 2 , ... of structures in this class, there are n < q such that S n is isomorphic to an induced substructure of S q , which we denote by S n ⊆ i∼ S q .
With these hypotheses and notation, Corollary 2.4 of [20] (also Theorem (vii) 13.2.3 of [13]) states the following.(The class of bounds Bnd(C) is defined in Section 1.Its finiteness is up to isomorphism.)Proposition 4.7 (2) shows that every S in U(IBO) is defined from a marked tree T belonging to T. We denote then S = S(T ).Precisely, S(T ) = (N, B T ′ , U 1 , ..., U 5 ) where T ′ is the marked tree Proof: Let S 1 , S 2 , ... be an infinite sequence of finite structures in U(IBO).For each S n , we let T n in T be such that S(T n ) = S n .By Kruskal's Theorem, T n ⊆ j∼ T q for some n < q.The above fact yields S n ⊆ i∼ S q . 2 shows that Bnd(IBQT) is finite, hence that IBQT is FO definable, without constructing the defining sentence.The FO definability of IBQT is Theorem 3.1 of [7], where the defining FO-sentence is the conjunction of Conditions A1-A6 and A8 of Definition 4.1.
In Section 6, we will explain why computing the bounds of IBO is even harder than computing those of probe cographs.

Clique-width and the bounds of probe cographs
We first review clique-width, then, we discuss some properties of probe cographs, in view of determining their bounds.(b) A term over the above defined operations is well-formed if no two occurrences of nullary symbols denote the same vertex (so that the graphs defined by two arguments of any operation ⊕ are disjoint).
We call them the clique-width terms.Each term t denotes a vertex labelled graph val(t) whose vertices are those specified by the nullary symbols of t.Its width is the number of labels that occur in t.The clique-width of a graph G without labels from L (but possibly with labels from another set like {1, 2}), denoted by cwd(G), is the least width of a term t that denotes some vertex labelling of G.It follows that each graph of clique-width at most k is defined by infinitely many terms written with a fixed set L of k labels.However, one can "normalize" these terms so as to avoid redundancies.This is done in Proposition 2.121 of [10].Let us call normal such a term.Then, each graph of clique-width at most Pumping lemmas are classical tools of language theory by which one can bound the sizes of the terms of a finite recognizable set defined by a given finite automaton without listing them.However the obtained bound would be ridiculous huge. 2 This decision procedure is actually intractable, because of the complexity of the sentence ξ and the size of the corresponding automaton, that needs to handle clique-width terms with 8 labels.

Some bounds of probe cographs
By a bound, we mean a bound of probe cographs, hence, a graph in B. We denote by G the edge-complement of a graph G.By substituting an edge (i.e., the graph K 2 ) to a vertex a of a graph G, we obtain the graph denoted by G[a ←− K 2 ].Its vertex a is replaced by the edge a 1 −a 2 and any edge a−x of G is replaced by the two edges a 1 −x and a Proposition 5.5: The following graphs, all of clique-width 3, are in B: (1) The standard graphs C 5 , P 6 and C 6 .
(2) The graphs C 6 , D and D derived from C 6 , see Figure 3.
(3) Four graphs obtained by substituting an edge to one or two vertices of a path P 4 or P 5 .See Figure 4.
(4) Two graphs obtained from the house H by substituting edges as in (3).See Figure 5.
Proof: The proofs are based on the following observations (cf.Example 2.5) : • the only good labellings of P 4 are 1212, 2121 and 1221, • the only good labelling of P 5 is 12121, • the two good labellings of the "house" H with vertices {a, b, c, d, e} and top vertex c, cf.• every good labelling of a graph is good for its induced subgraphs.
( (2) The graph C 6 is shown in Figure 3.By removing f , we get the "house" H with top vertex c that should be labelled by 1, so that either b or d should be labelled by 1.Hence, f must be labelled by 2, but it is the top vertex of the house C 6 − c.Hence, C 6 is not a p-cograph.However, it is a bound.From the graph D shown in Figure 3, we get two "houses" by removing either c or f .Both vertices should be labelled by 1, so that none of the others can be labelled by 1.
(   (5) Among the connected graphs with 5 vertices that are not cographs we have are C 5 and H.
Similarly, we get from H 2 , the bound H The graphs C 5 , P 6 and C 6 are known to have clique-width 3.That H, C 6 , D and D have cliquewidth 3 can be checked with [12] or proved directly.All other bounds of (3),( 4) and ( 5) are obtained by substituting K 2 to vertices of graphs of clique-width 3. Hence, they have clique-width 3. 2 We do not know any graph of clique-width 4 or more that is a bound of probe cographs.Hence, for now, we are far from the upper-bound 8 of Proposition 5.3.Monadic second-order logic does not help for effective computations because of the huge sizes of the automata constructed from MSO-sentences.Problem 6.2: Does there exist a monadic second-order transduction, cf.Chapter 7 of [10], that transforms a finite ternary structure assumed to be in IBO into a finite marked tree defining it?

Open problems
In [7], we studied four classes of betweenness structures (cf.Definition 4.1): QT, IBQT, BO and IBO.Each betweenness structure S = (N, B) is defined from a labelled O-tree, say T = (M, ≤, N ⊕ , N ⊗ ).This description covers all cases, although labels are useless in some cases.
The question is whether some witnessing O-tree T can be defined by MSO-formulas in the given structure S, in technical words, by an MSO-transduction.An FO-transduction exists for QT and MSOtransductions exist for IBQT and BO [7].
Theorem 4.2(1) establishes that the class IBO is MSO f in -definable, without building an associated MSO-transduction.We recall that an MSO-transduction transforms a structure with n elements into one with at most kn elements for some fixed k.As a finite structure in IBO having n elements can be defined from a marked tree with at most 2n − 1 nodes, it is not hopeless to look for such a transduction.An intermediate result seems necessary: to find an MSO-transduction that constructs, from a pp-cograph, a term that defines it.Such a transduction exists for countable cographs given with an auxiliary linear order [3,9].Such an auxiliary order would be useful, even perhaps necessary.Problem 6.3: Determine the set of bounds of IBO.
We have presently no result similar to Theorem 5.4 because ternary structures do not share certain good properties of graphs, as we now explain.
First we observe that, since we have an effective MSO characterization of the finite structures in IBO by Theorem 4.2(1), we have one of the set of their bounds because the proof for graphs (Proposition 5.3) extends to relational structures.
The proof of Theorem 5.4 uses the fact that the bounds of probe cographs have clique-width ≤ 8 (even if this upper-bound is overestimated).We miss a corresponding fact for Bnd(IBO).First because there is no really convenient notion of clique-width for ternary structures.However, we can replace the property "the graphs of C have clique-width at most k" by "the structures of C are all in τ (Trees) for some MSOtransduction τ " where Trees is the class of finite rooted trees, and say that C is tree-definable.Bounded clique-width is equivalent for a class of graphs to tree-definability ([10], Chapter 7).Furthermore, the computability results for classes of graphs of bounded clique-width hold for tree-definable classes of structures.
For a set C of structures of a fixed signature, we let C + be the set of structures S with domain N such that S[N − x] is in C for some x in N .If C is a set of graphs of clique-width at most k, then the graphs in C + have clique-width at most 2k (see [14]), which is used to obtain the upper-bound 8 to the clique-width of the bounds of probe cographs in Proposition 5.3.However, this fact does not extend to tree-definable classes of structures as we prove below.Hence, we cannot extend Theorem 5.4 to the computation of Bnd(IBO).Proposition 6.4:There is a tree-definable set of ternary structures C ⊆ IBO such that C + is not treedefinable.
Proof: We will use results from [10].Let S G = ([n], B G ) where B G consists of the triples (1, i, j) and (j, i, 1) for the edges i − j of some graph G = ({2, 3, ..., n}, E) and i < j.Then S G is a ternary structure that satisfies Properties A1-A6.It is in C + where C is the set of trivial ternary structures ({2, 3, ..., n}, ∅), obviously in IBO.There is an MSO-transduction θ that transforms each structure S G into G: it deletes 1 and replaces the triples (1, i, j) and (j, i, 1) in B G by (i, j) and (j, i), thus defining E.
It is clear that C is tree-definable.If C + would be, that is, if C + ⊆ τ (Trees) for some MSO transduction τ, then the MSO transduction θ•τ would produce all finite graphs from Trees (up to isomorphism), hence, all graphs would have clique-width bounded by a fixed value ([10], Chapter 7), which is false. 2 define the same 2-graph.See also Example 2.5(1).

Proposition 2. 4 :( 1 )
The class of partitioned probe cographs is hereditary.Its bounds are the paths of types 11, 2222, 1222, 2122 or 21212 and the 2-graph Q defined as the path a − b − c − d − e of type 12221 augmented with the edge b − d.Partitioned probe graphs can be recognized in linear time.
) The path P 6 = a − b − c − d − e − f is not a p-cograph.Assume it has a good labelling.The induced path a − b − c − d − e must have type 12121 and f must have label 2. But then b − c − d − e − f has type 21212, which is not possible by

Definition 4 . 12 :
Forests compatible with a ternary relation.A rooted forest T = (N, ≤ T ) is compatible with a relation B ⊆ N 3 satisfying Axioms A1-A6 (Definition 4.1) if, for all x, y, z ∈ N :
(b) For each class C of the equivalence relation ∼ x , we define G x,C as the 2-graph (C, E, C 1 , C 2 ) such that:

Definitions 4. 19 :
(a) If C is a hereditary class of finite structures S = (N, R 1 , ..., R p ), if m is the maximal arity of a relation R i , we denote by U(C) the class of structures (N, R 1 , ..., R p , U 1 , ..., U 2m−1 ) for all S in C, where U 1 , ..., U 2m−1 are unary relations, hence that denote subsets of N .

Proposition 4 . 21 :
Definition 4.5(b).Fact: If T ,T ′ are in T and T ⊆ j∼ T ′ , then S(T ) ⊆ i∼ S(T ′ ).It is a corollary of Lemma 4.6(1).The class of finite structures in U(IBO) is well-quasi-ordered.(vii)Fraïssé states the result with 2m instead of 2m − 1 but translates from French the proof by Pouzet.

Theorem 4 . 2 ( 2 ): 2 Remark 4 . 22 :
The class IBO has finitely many bounds.Proof: The hereditary class of finite structures belonging to IBO has finitely many bounds by Proposition 4.21 and Theorem 4.20.The result holds by Proposition 4.10.We recall from Definition 4.1 that IBQT is the class of induced betweenness of jointrees.It is a proper subclass of IBO.The structures in IBQT are defined from marked join-trees T = (N ⊎ N ⊕ ⊎ N ⊗ , ≤, N ⊕ , N ⊗ ) such that N ⊕ is empty (Definition 4.5(d)).The proof of Theorem 4.2(2)

Definition 5 . 1 :
Clique-width.(a) Graphs are built with the help of vertex labels (in addition to the labels of 2-graphs).Each vertex has a label in a set L. The nullary symbol a(x) where a ∈ L, denotes the isolated vertex x labelled by a.The operations are the union ⊕ of disjoint graphs (it does not modify labels), the unary operation add a,b for a, b ∈ L, b ̸ = a, that adds to a graph an edge between each a-labelled vertex and each b-labelled vertex (unless they are already adjacent), the unary operation relab a→b that changes every vertex label a into b.

(
c) Clique-width terms may contain redundancies: for example, we have add a,b (add c,d (add a,b (G))) = add c,d (add a,b (G)) and relab a→b (relab a→c (G)) = relab a→c (G) for every graph G.
Figure 5, label by 1 either c and d, or c and b; the other vertices are labelled by 2, ) See Examples 2.5 for C 5 and P6 .Let C 6 = a − b − c − d − e − f − a.Assume for a contradiction that it has a good labelling.By removing a, we get P 5 , hence b and f must be labelled by 1, hence a must be labelled by 2. Similarly, b must be labelled by 2. As P 5 is a p-cograph, C 6 is a bound.Hence, C 5 , P 6 and C 6 are bounds.

)
The path P 5 = a−b−c−d−e has a unique good labelling of type 12121.If we substitute K 2 for any of a, c or e, we obtain a bound as the two vertices of the substituted edge cannot be both labelled by 1.We obtain only two non-isomorphic bounds, shown in the top part of Figure 4, because substituting an edge to a and e give isomorphic graphs.The path P 4 = a − b − c − d has three good labellings of types 1212, 2121 and 1221.For each good labelling, at least one vertex in {a, b}, in {a, d} and in {c, d} must be labelled by 1.It follows that P 4 [a ←− K 2 , b ←− K 2 ] and P 4 [a ←− K 2 , d ←− K 2 ] shown in the bottom part of Figure 4 are bounds as one checks easily.So is P 4 [c ←− K 2 , d ←− K 2 ] isomorphic to the first one.We obtain two non-isomorphic bounds.(4) Every good labelling of the "house" H shown to the left of Figure 5, must label c by 1 and, either b or d, by 1.We obtain the two bounds H[c ←− K 2 ] and H[b ←− K 2 , d ←− K 2 ] shown in Figure 4.

Fig. 5 :
Fig. 5: The "house" to the left (it is a p-cograph), and the two bounds of Proposition 5.5(4).

Fig. 6 :
Fig.6: Two p-cographs used in Proposition 5.5(5) Figure 6 shows two others, H 1 and H 2 .The good labellings of H 1 label, either b, c and d by 1, or a and b by 1, or e or d by 1, and, in each case, all other vertices are labelled by 2. Hence H 1 [b

Problem 6 . 1 :
Determine the set of bounds of probe cographs.What can be said about them in addition to what is stated in Proposition 5.3?
Definition 2.1: Cographs (a) A graph is a cograph if and only if it can be generated from isolated vertices by the operations ⊕ and ⊗, if and only if it has no induced path P 4 .There are many other characterizations [23].The family of cographs is hereditary.Its only bound is P 4 .We can use the notation t 1 ⊕ t 2 ⊕ ... ⊕ t n because the operation ⊕ is associative, and similarly for ⊗.We can also use the notation ⊕(t 1 , t 2 , ..., t n ) or ⊗(t 1 , t 2 , ..., t n ).
10], Section 5.2.1 for monadic second-order logic.If S = (N, B) is a ternary structure and X ⊆ N , then S |= φ[X] if and only if S[X] |= φ. holds hence S[X] is in IBO.Otherwise, it is a disjoint union of connected sets in Gf (S).For each of them, say Y , the validity of ψ implies that φ[Y ] holds, S[Y ] is in IBO and so are S[X] by Lemma 4.4(1) and S by Proposition 4.10.
We prove that S |= ψ if and only if S is in IBO.If S is in IBO, then every induced substructure S[X], in particular every finite and connected one satisfies φ, hence S |= ψ.Conversely, assume that S |= ψ.Let X be a finite subset of N .If it is connected in Gf (S), then φ[X] 2 4.2 Proof of Proposition 4.11