{'fraction_non_alphanumeric': 0.051628224730798006, 'fraction_numerical': 0.008393246364553174, 'mean_word_length': 3.527245949926362, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Examples of weak amalgamation classes

We present several examples of hereditary classes of finite structures satisfying the joint embedding property and the weak amalgamation property, but failing the cofinal amalgamation property. These include a continuum-sized family of classes of finite undirected graphs, as well as an example due to Pouzet with countably categorical generic limit.


Introduction
In classical Fraïssé theory (see e.g. [5, Section 7.1]), the basic objects of interest are Fraïssé classes: hereditary classes of finitely generated structures which are countable up to isomorphism and satisfy the joint embedding property and the amalgamation property. Any such class K is associated to a countable homogeneous structure M, its Fraïssé limit, which is distinguished up to isomorphism as the unique countable homogeneous structure with age K (the age of a structure M is the class of isomorphism types of all finitely generated substructures of M).
The Fraïssé limit of K is also generic among countable structures with age contained in K. The precise meaning of generic can be explained in multiple equivalent ways: topologically (the isomorphism class of M is comeager in an appropriate space of structures) [13,3], game-theoretically [9], or via forcing [8].
It turns out that the full strength of the amalgamation property is not necessary for the existence of a generic structure with age K; a condition called the weak amalgamation property suffices and in fact characterizes the existence of a generic structure. The weak amalgamation property was introduced by Ivanov [6] (under the name "almost amalgamation property") and independently by Kechris and Rosendal [7], during the study of generic automorphisms of ω-categorical structures and Fraïssé limits. More recent expositions can be found in [9] and [10]. See also [11] and [4] for a purely category-theoretic approach.
Corresponding to this weakening of amalgamation is a weakening of homogeneity: the generic limit, or weak Fraïssé limit, of a weak Fraïssé class K is characterized as the unique countable weakly homogeneous structure with age K. Weakly homogeneous structures were first studied by Pabion [12], who called them prehomogeneous; however, he did not define the weak amalgamation property explicitly.
Most natural examples of classes with the weak amalgamation property actually satisfy an intermediate condition, the cofinal amalgamation property. This property was isolated earlier, by Calais [2], who also studied the generic limits of classes with the cofinal amalgamation property. Calais called these limits pseudo-homogeneous, but we prefer the term cofinally homogeneous. The cofinal amalgamation property was also rediscovered by Truss in his work on generic automorphisms [14].
In this note, we present several examples of classes of finite structures with the weak amalgamation property but without the cofinal amalgamation property. Each example is a hereditary class in a finite relational language and satisfies the joint embedding property. After making the definitions precise in Section 2, we give an example in Section 3.1 of a class of undirected vertex-colored graphs, which appeared previously in the second-named author's PhD thesis [10]. In Section 3.2, we give an example of a class of directed edgecolored graphs. The ideas in these examples are refined in Section 3.3 to give an example of a class of undirected graphs, and expanded in Section 3.4 to a continuum-sized family of examples. Finally, in Section 4, we first recall the main aspects of the theory of generic limits of weak Fraïssé classes (including weak homogeneity) and next we rescue from obscurity a nice example from [12], attributed to Pouzet. This example, unlike our others, has a generic limit with a countably categorical theory. We use this example to answer a question of Ahlman, and we pose a question of our own. 2 Weak amalgamations Throughout this note we consider structures in a countable first-order language. In all of our examples, the language will be finite and relational.

Contents
Definition 2.1. Let F be a class of finitely generated structures.
• We say that F has the hereditary property (also called hereditary), if for every embedding f : Z → Y between structures, if Y ∈ F then Z ∈ F. Note that every hereditary class is isomorphism-closed.
• We say that F has the joint embedding property (briefly: JEP ) if for every Y, Z ∈ F, there exists X ∈ F and embeddings f : Y → X and g : Z → X.
• We say that F has the weak amalgamation property (briefly: WAP ) if for every Z ∈ F there is Z ′ ∈ F and an embedding η : Z → Z ′ such that for all embeddings f : In other words, the following diagram is commutative.
We say that F has the cofinal amalgamation property (briefly: CAP ) if we also require that holds in the definition above.
• Finally, we say that F has the amalgamation property (briefly: AP ) if we also require that Z ′ = Z and η = id Z in the definition above.
A weak Fraïssé class is a hereditary class of finitely generated structures that has the joint embedding property, the weak amalgamation property and is countable up to isomorphism. (a) F has WAP.
(b) Every cofinal subclass of F has WAP.
(c) There exists a cofinal subclass of F that has WAP.
Proof. (a) =⇒ (b) Let G be a cofinal subclass of F and fix Z ∈ G. There is Z ′ ∈ F and an embedding η : Z → Z ′ , witnessing the WAP in F. Since G is cofinal, there is an embedding Then η ′ • η : Z → Z ′′ witnesses the WAP in G. Indeed, for any embeddings f : Z ′′ → X and g : Z ′′ → Y with X, Y ∈ G, we can apply the WAP in F to the embeddings f • η ′ : Z ′ → X and g • η ′ : Z ′ → Y to obtain W ∈ F and embeddings f ′ : X → W and g ′ : (c) =⇒ (a) Let G be cofinal in F and assume G has WAP. Fix Z ∈ F and choose an embedding η : Z → Z ′ with Z ′ ∈ G. Now we can find an embedding η ′ : for any embeddings f : Z ′′ → X and g : Z ′′ → Y with X, Y ∈ F, we can find embeddings f * : X → X * and g * : Y → Y * with X * , Y * ∈ G. Then we can apply the WAP in G to the embeddings f * • f : Z ′′ → X * and g * • g : Z ′′ → Y * to obtain W ∈ G and embeddings f ′ : X * → W and g ′ : , as required.
A simple example shows that CAP can be easily lost when passing to a cofinal subclass.
Example 2.3. Let F be the class of all finite acyclic undirected graphs (i.e. finite forests). This is an example of a hereditary class satisfying CAP but not AP; in this case, the greatest cofinal subclass with AP is the class of all connected finite acyclic undirected graphs (i.e. trees). Another cofinal subclass is the one consisting of all disconnected finite acyclic graphs. This subclass has WAP (because F has WAP) and fails CAP.
In fact, given any class of finitely generated structures satisfying CAP and not AP, we may take the cofinal subclass of all structures witnessing the failure of AP. Such a subclass will have WAP and not CAP. On the other hand hereditary classes satisfying WAP but not CAP are less easy to come by. The rest of this note is devoted to such examples. All of them are weak Fraïssé classes.
3 The examples

A class of undirected labeled graphs
Let K be the class of all finite acyclic undirected graphs whose vertices are labeled by integers 0, 1, 2, 3, 4 and the following configurations of labelings are omitted: In other words, a graph G ∈ K is a finite forest such that each vertex of G has a unique label from the additive group Z/5Z, and if v ∈ G has label i ∈ Z/5Z then it cannot have two neighbors with labels i + 1 and i + 2, where + denotes addition in Z/5Z, i.e. addition modulo 5. A vertex v ∈ G is determined by a vertex w ∈ G if v and w are adjacent, v has label i, and w has label i + 1 or i + 2. Note that in this case w may be determined or not, however it cannot be determined by v (this is why we need at least five labels).
Claim 3.1. Every nonempty G ∈ K has a vertex that is not determined.
Proof. Supposing every vertex of G is determined, we would be able to construct an infinite The vertices in this path are all distinct, because the relation of being determined is antisymmetric and there are no cycles in G. Thus G is infinite, which is a contradiction.
It is clear that K is hereditary and has JEP. Proof. Fix a nonempty G ∈ K and let v ∈ G be an undetermined vertex, with label i. Let G 1 and G 2 be two extensions of G by adding one new vertex adjacent to v only, such that the new vertex in G 1 has label i + 1, and the new vertex in G 2 has label i + 2. Clearly, the inclusions G → G 1 and G → G 2 cannot be amalgamated in K.
It follows that for any nonempty H ∈ K, there is no extension H ⊆ H ′ ∈ K that serves as a witness for CAP.
Proof. Fix H ∈ K. We find a witness for WAP over H in two stages. First, choose H ⊆ H ′ ∈ K such that H ′ in connected: any two connected components in H can be connected by adding a new vertex, with an appropriate label, adjacent to a single vertex of each of them. Next, choose H ′ ⊆ G ∈ K such that every vertex of H ′ is determined in G: for each undetermined vertex v ∈ H ′ , add a new vertex, with an appropriate label, adjacent only to v. Of course, G \ H ′ will contain undetermined vertices.
Now suppose e 1 : G → G 1 and e 2 : G → G 2 are embeddings, with G 1 , G 2 ∈ K. Let K be the free amalgamation of e 1 ↾ H ′ and e 2 ↾ H ′ , i.e., with no equalities or edges between vertices in G 1 \ e 1 (H ′ ) and G 2 \ e 2 (H ′ ). Note that each vertex in G \ H ′ has two distinct images in K.
Then K ∈ K. Indeed, K is acyclic because H ′ is connected and acyclic. Suppose for contradiction that a b c is a subgraph of K, where the label of b is i, the label of a is i + 1, and the label of c is i + 2. This subgraph cannot be contained in G 1 or in G 2 , so we must have b ∈ H ′ . Then b is determined by a vertex b ′ ∈ G. Both G 1 and G 2 contain a copy of b ′ , which gives a contradiction. For example, if the label of b ′ is i + 1, then c cannot be adjacent to b in G 1 or in G 2 .
Finally, note that K is a weak Fraïssé class, as it obviously has JEP and countably many isomorphism types.

A class of directed graphs with labeled edges
Our next example is very similar to the previous one. This time we consider directed graphs and label the edges instead of the vertices.
For an edge e = (v, w) ∈ R, we denote by s(e) = v the source of e, and by t(e) = w the target of e. We write G * for the symmetrization of G, defined by We say that G = (A, R) is a directed forest if: (iii) the undirected graph G * is acyclic. Now consider the language L consisting of two binary relation symbols S and T . For every L-structure X = (A, S, T ), we can form a directed graph (A, S ∪ T ). Whenever S and T are disjoint, we may think of (A, S, T ) as the structure resulting from the directed graph (A, S ∪ T ) after we color each edge of the latter using two colors. Consider the class P of all finite L-structures X = (A, S, T ) with the following properties: (P2) the sets S and T are disjoint; (P3) for every w ∈ A, the set {e ∈ S ∪ T | t(e) = w} of all edges with target w is entirely contained in either S or T .
It is immediate that P is hereditary and has JEP. We will now check that P has WAP but not CAP.
Otherwise v is determined. Since (A, S ∪ T ) is antisymmetric and acyclic, it follows just as in Claim 3.1 above that if A is nonempty, then there is some undetermined vertex in A.
Claim 3.4. P does not have CAP.
Proof. Let Z ∈ P be nonempty, and let v ∈ Z be an undetermined vertex. Then there are two incompatible extensions Y 1 and Y 2 of Z. Define Y 1 by adding one vertex w 1 to Z and a new S-edge from w 1 to v, and define Y 2 by adding one vertex w 2 to Z and a new T -edge from w 2 to v. Any amalgamation X of Y 1 and Y 2 over Z would fail to satisfy property (3) of the definition of P.
It follows that for any nonempty Z ∈ P, there is no extension Z ⊆ Z ′ ∈ P that would serve as a witness for CAP.
Proof. The proof is almost exactly like the proof of Claim 3.3 above.
Let Z ∈ P. We find a witness for WAP over Z in two stages. First, chose an extension Let W be the free amalgamation of e 1 ↾ Z ′ and e 2 ↾ Z ′ , i.e., with no equalities or edges between vertices in X 1 \ e 1 (Z ′ ) and X 2 \ e 2 (Z ′ ). It follows as in the proof of Claim 3.3 that W ∈ P.
Finally, note that P is a weak Fraïssé class, as it obviously has JEP and countably many isomorphism types.

A class of undirected graphs
Let G be the class of all finite acyclic undirected graphs in which no two vertices of degree greater than 2 are adjacent. Obviously, G is hereditary and has JEP.
We denote by deg G (x) the degree of a vertex x in the graph G. Being cycle-free ensures that each G ∈ G has at least one vertex of degree 1. Furthermore, every graph in G can be extended to a connected one, simply adding a new vertex connected to selected vertices of degree 1 from each component. Proof. Fix a non-discrete (i.e., containing at least one edge) H ∈ G and choose v ∈ H of degree 1 (such a vertex exists, because H is acyclic). Consider two extensions of H by attaching to v one of the following graphs. Any amalgamation of the resulting graphs over H contains two neighbors of degree > 2, as either v raises its degree (and c is its neighbor) or else c is identified with a and consequently a and b have degrees > 2.
It follows that for any non-discrete H ∈ G, there is no extension H ⊆ H ′ ∈ G that serves as a witness for CAP.
Proof. Let us call H ∈ G tame if it satisfies the following conditions: (1) H is connected and has more than two vertices.
(2) Every vertex of degree 2 in H has a neighbor of degree > 2.
(3) The unique neighbor of every vertex of degree 1 in H has degree 2.
We claim that every member of G can be extended to a tame one. Fix H ∈ G. It is easy to satisfy (1) by adding new vertices if necessary and extending to a connected graph in G, as noted above. Toward (2), suppose v ∈ H is a vertex of degree two such that the two neighbors of v have degree 2. Then extend H by adding a new vertex adjacent only to v. The result is a graph in G satisfying (1), with fewer vertices of degree 2 (the new vertex has degree 1, and v has degree 3 in the extension). So we can repeat until (2) is satisfied. Toward (3), suppose v is a vertex of degree 1 whose unique neighbor w does not have degree 2. By (1), deg H (w) > 2. Then extend H by adding a new vertex adjacent only to v. This preserves (1) and (2), since in the extension v has degree 2 and a neighbor w of degree > 2. The new vertex has degree 1, but its unique neighbor v has degree 2, so the result is a graph in G with fewer problematic vertices of degree 1, and we can repeat until (3) is satisfied.
We now show WAP. Fix H ∈ G, and let H ′ ⊇ H be a tame extension. Let G ⊇ H ′ be the graph obtained from H ′ by adding, for each vertex u ∈ H ′ of degree 1, two new vertices a u , b u adjacent to u. Then deg G (u) = 3, but by (3), u is not adjacent to any vertex of degree > 2, so G ∈ G.
Now fix two embeddings f : G → X, g : G → Y with X, Y ∈ G, We claim that there are W ∈ G and embeddings f ′ : We may assume that X ∩ Y = H ′ and f ↾ H ′ and g ↾ H ′ are inclusions. Let W = X ∪ Y with no new edges between X \ H ′ and Y \ H ′ (so W is the free amalgmation of X and Y over It remains to show that W ∈ G. As H ′ is connected, W is acyclic. Suppose u, v ∈ W are neighbors of degree > 2. We may assume that u, v ∈ X (the case u, v ∈ Y is symmetric). Since X ∈ G, we infer that deg X (u) 2 or deg X (v) 2. Suppose deg X (u) 2 (the other case is symmetric). Then since deg W (u) > deg X (u), u ∈ H ′ , and deg H ′ (u) deg X (u) 2. If deg H ′ (u) = 2, then by condition (2) of tameness, u is adjacent to a vertex in H ′ of degree > 2, so u cannot be adjacent to a vertex of Y \ H ′ , contradiction. We conclude that deg H ′ (u) = 1. But then there are two vertices a u , b u ∈ G \ H ′ which are adjacent to u, and G embeds in X over H ′ , so deg X (u) ≥ 3, contradiction.
As before, note that G is a weak Fraïssé class.

Continuum-many classes of finite graphs
We now present a modification of the example from the previous section, obtaining a different class of finite graphs for each set A ⊆ ω \ 3 with |A| ≥ 2. Fix such a set A and define G A to be the class of all finite graphs G satisfying the following conditions.
(1) The length of each cycle is an element of A.
(2) No two cycles share an edge.
(3) Each cycle contains at most two vertices of degree > 2.
Clearly, G A is hereditary and has JEP.
Given a graph G ∈ G A , we shall say that a cycle C ⊆ G is free if it contains at most one vertex of degree > 2 in G. A graph is non-discrete if it contains at least one edge.
Lemma 3.8. Each non-discrete graph in G A contains either a free cycle or a vertex of degree one.
Proof. Let G ∈ G A be non-discrete. Assume G has no free cycles. Then by (3), any cycle in G consists of a pair of paths between two vertices v and w of degree > 2. By (2), these are the only two paths from v to w. Remove both of these paths and the vertices of degree 2 on them, replacing them by a single edge between v and w. This removes a cycle from G and does not change the number of vertices of degree 1 in G, since the degrees of v and w only drop by 1. After applying this construction to each cycle in G, we obtain a non-discrete finite acyclic graph G ′ , which must have a vertex of degree 1. Therefore G does as well. Lemma 3.9. Suppose G ∈ G A contains an edge e with endpoints v and w which is not contained in any cycle. Let n ∈ A. Then the graph H obtained by adjoining a new path of length n − 1 from v to w is in G A .
Proof. Since the edge e is not contained in any cycle in G, there is a unique path in G from v to w, consisting of the single edge e. Thus there is a single new cycle in H, namely the cycle of length n ∈ A consisting of e and the new path. It follows that (1) and (2)  Proof. Fix G ∈ G A and assume it is non-discrete. Let n and m be two distinct elements of A. If G contains a vertex v of degree 1, let w be its neighbor, and note that the edge between v and w is not contained in any cycle. Consider the two extensions G n and G m of G obtained by adjoining new paths from v to w of lengths n − 1 and m − 1, respectively. Then G n and G m are both in G A by Lemma 3.9. But G n and G m cannot be amalgamated over G, since in any such amalgam, the two cycles would both contain the original edge between v and w, violating (2). Now suppose C ⊆ G is a free cycle. C contains at least three vertices, at most one of which has degree > 2. So let a, b, and c be distinct elements of C such that a has degree > 2 if there is such an element in C. Let G a,b be the extension of G obtained by adding two new vertices, adjacent to a and b, respectively. Let G c be the extension of G obtained by adding a new vertex adjacent to c. Then G a,b and G c are in G A , but in any amalgamation of these two graphs over G, all three of a, b, and c would have degree > 2, violating (3).
It follows that for any non-discrete H ∈ G A , there is no extension H ⊆ H ′ ∈ G A that serves as a witness for CAP. Proposition 3.11. G A has the weak amalgamation property.
Proof. Fix G ∈ G A . We first extend G to a graph H ∈ G A which is connected and non-discrete, and such that every edge in H is contained in a cycle.
By Lemma 3.8, each connected component of G contains either a free cycle or a vertex of degree at most 1. From each component, choose a single vertex which either has degree at most 1 or has degree 2 and is contained in a free cycle. Add a single new vertex which is adjacent to each of these chosen vertices. The result is a connected non-discrete graph in G A containing G. Then by repeatedly apply Lemma 3.9, we can further extend to a graph H ⊇ G such that every edge in H is contained in a cycle.
The key property of the graph H is that in any extension X ⊇ H with X ∈ G A , any path p in X between distinct vertices v and w in H in already contained in H. Indeed, since H is connected, there is some path q from v to w in H. If the path p contains an edge which is not in H, then there is some cycle C in X, consisting of a nonempty segment of p and a nonempty segment of q, which is not contained in H. But any edge in q is contained in some cycle C ′ in H, so the cycles C and C ′ share an edge, contradicting (2). Now we find a witness for WAP. For each free cycle in H, choose one vertex v of degree 2 in that cycle and add a new vertex adjacent to v. If H contains a free cycle with no vertices of degree > 2 (which only happens if H is itself a cycle), choose two vertices in this cycle and add new vertices adjacent to each of them. Call the resulting graph with no free cycles H ′ .
Suppose f : H ′ → X and g : H ′ → Y are embeddings, with X, Y ∈ G A . We may assume that X ∩ Y = H, and that f ↾ H and g ↾ H are inclusions. Let W = X ∪ Y , with no new edges between vertices in X \ H and Y \ H (so W is the free amalgamation of X and Y over H). It remains to show that W ∈ G A .
We observe first that any cycle C ⊆ W which contains more than one vertex in H is contained in H. Since there are no edges in W between X \ H and Y \ H, any such cycle C is a union of paths, each contained in X or contained in Y , between distinct vertices in H. By the key property of H noted above, each of these paths is contained in H, so C ⊆ H. It follows from this that for any cycle C ⊆ W , we have C ⊆ X or C ⊆ Y , since W is a free amalgam over H.
From the latter observation, (1) is satisfied in W . For (2), note that if two cycles C and C ′ in W share an edge e between v and w, then (without loss of generality) C ⊆ X, C ′ ⊆ Y , and v, w ∈ H. But then by the observation above, C ⊆ H and C ′ ⊆ H, contradicting (2) in H.
Finally, for (3), suppose that some cycle C in W contains more than two vertices of degree greater than 2. We may assume C ⊆ X, so there is some vertex v in C such that Then v is adjacent to a vertex in Y , so v ∈ H. Now H is connected and non-discrete, and every edge is part of a cycle, so every vertex in H has degree at least 2. It follows that deg H (v) = 2, so v is not adjacent to any vertex in X \ H. Thus C contains more than one vertex in H, so C ⊆ H. Since there are no free cycles in H ′ , there are vertices a and b in C, distinct from v, such that deg H ′ (a) > 2 and deg H ′ (b) > 2. But H ′ embeds in Y over H, so a and b are two vertices in C with degree > 2 in Y . By (3), we must have deg Y (v) = 2, contradiction. Proof. For each A ⊆ ω \ 3 with |A| ≥ 2, the class G A gives an example, and G A = G B whenever A = B.

Generic limits and Pouzet's example
We conclude by describing an example from [12], which Pabion attributes to M. Pouzet. This gives an example of a class with WAP but not CAP with a countably categorical generic limit, and it answers a recent question of Ahlman.
Rather than working with this class directly, it is easier to describe its generic limit. For that reason, we take a moment to define the homogeneity properties alluded to in the introduction. • M is cofinally homogeneous if we also require that σ extends f in the definition above.
• M is homogeneous if we also require that A = B in the definition above.
Proposition 4.2 (cf. [9], [10]). Suppose K is a hereditary class of finitely generated structures with JEP which is countable up to isomorphism (i.e. has countably many isomorphism types).
• K has WAP if and only if there exists a countable structure M which is weakly homogeneous and has Age(M ) = K. Moreover, M is unique up to isomorphism. In this case, we call K a weak Fraïssé class and call M the generic limit of K.
• K has CAP if and only if its generic limit is cofinally homogeneous.
• K has AP if and only if its generic limit is homogeneous. In this case we call K a Fraïssé class and call M its Fraïssé limit.
Generic limits of weak Fraïssé classes can also be described in terms of a natural infinite game (called the Banach-Mazur game in [9]). Namely, given a class K and a structure M as above, two players play by alternately choosing bigger and bigger elements of K, thus building a chain where each inclusion E n ⊆ E n+1 is an embedding. The second player wins if n∈ω E n is isomorphic to M . It turns out that M is the generic limit of K if and only if the second player has a winning strategy in this game, see [9].
For instance, if K is the Fraïssé class of all finite linearly ordered sets then the winning strategy is very simple and does not even depend on the history: Given a finite linear order X, it is enough to add a new point between every two consecutive ones, plus one more point below the minimum and one more above the maximum. By this way, after infinitely many moves the resulting linear order will be dense and with no end points, therefore isomorphic to (Q, <).
Another natural example is the class T of all finite cycle-free graphs. The generic limit is the countable everywhere inifnitely branching tree T, namely, a countable connected cycle-free graph whose each vertex has infinite degree.
The generic limits of our examples are described below.
Example 4.3. (a) The generic limit of the class K from Section 3.1 can be obtained from the unique everywhere infinitely branching tree T, by adding labels to all the vertices in such a way that the prohibited configurations do not show up, while at the same time all other configurations appear everywhere. The Banach-Mazur game mentioned above can help here. Indeed, given E n ∈ K, the second player can always make it connected and can make sure the degree of each vertex of E n is at least n, by adding suitable labels.
(b) The generic limit of the class P from Section 3.2 can be obtained from the tree T by first turning edges into arrows so that both the source and target degree of each vertex is infinite; next add the "colors" (S or T ) so that condition (P3) is satisfied and both "colors" occur infinitely many times in the neighborhood of each vertex.
(c) The generic limit of the class G from Section 3.3 has a particularly nice description. Start with the unique everywhere infinitely branching countable tree T, as above. Pick a subset X of the edges of T such that for every vertex v ∈ T, infinitely many edges out of v are in X and infinitely many are not in X. Now subdivide each edge {v, w} in X into two pieces: v • w and subdivide each edge {v, w} not in X into three pieces: The resulting tree is the generic limit of G.
A suitable modification, involving cycles, leads to the description of the generic limit of G A (see Section 3.4). We leave the details to interested readers.

***
We now describe Pouzet's example. Let R be the ternary relation on Q defined by Then the structure (Q, R) is interdefinable with the homogeneous structure (Q, <). It will be useful below to observe that the relation < and its complement are both definable in (Q, R) by existential formulas: x < y ⇐⇒ ∃z R(x, y, z) ¬(x < y) ⇐⇒ x = y ∨ ∃z R(y, x, z).
In [12], the follow proposition is stated without proof.
Proposition 4.4. The structure (Q, R) is weakly homogeneous but not cofinally homogeneous.
Proof. For weak homogeneity, suppose A is a finite substructure of Q. Let b be any element of Q which is greater than every element of A in the standard order, and let B = A ∪ {b}.
Let g : B → Q be an embedding, and let f = g ↾ A. Then f is order-preserving, since for any a, a ′ ∈ A, we have a < a ′ if and only if R(a, a ′ , b), if and only if R(f (a), f (a ′ ), g(b)), if and only if f (a) < f (a ′ ). By homogeneity of the structure (Q, <), f extends to an automorphism of (Q, <), which is also an automorphism of (Q, R).
To contradict cofinal homogeneity, it suffices to show that for any finite substructure B ⊆ Q with |B| ≥ 2, there is an embedding f : B → Q which does not extend to an automorphism of (Q, R).
Enumerate B in increasing order as b 1 < · · · < b n−1 < b n , and define f by f (b n ) = b n−1 , f (b n−1 ) = b n , and f (b i ) = b i for all 1 ≤ i < n − 1. Then f is an embedding, but it does not extend to an automorphism of (Q, R): all such automorphisms are order-preserving, since (Q, R) is interdefinable with (Q, <).
It is not hard to show that the age of (Q, R) is the class K of finite structures (X, R) such that for all x, y, z, w, w ′ ∈ X: The proof of Proposition 4.4 shows that (Q, R) is uniformly weakly homogeneous. That is, there is a function f : N → N such that for every finite substructure A with |A| = n, there is a substructure B with |B| ≤ f (n) which serves as a witness for weak homogeneity over A. In this case, we can take f (n) = n + 1.
If M is a countable structure in a finite relational language, then M is uniformly weakly homogeneous if and only if Th(M ) is countably categorical and model complete, see [12,Proposition 3]. In the case M = (Q, R), it is also easy to argue directly: M is a reduct of with the structure (Q, R, <), whose theory is countably categorical, so Th(M ) is countably categorical. Further, Th(Q, R, <) has quantifier elimination, and as observed above, the relation < and its complement are both definable in M by existential formulas. It follows that every formula is equivalent modulo Th(M) to an existential formula, so Th(M ) is model complete.
The definable expansion (Q, R, <) also shows that (Q, R) is homogenizable. The argument that (Q, R) is not boundedly homogenizable is essentially the same as the proof that this structure is not cofinally homogeneous. For any tuple a containing at least two distinct elements, tp(a) is not isolated by a quantifier-free formula, since the partial map exchanging the two greatest elements of a preserves the truth of all quantifier-free formulas but does not preserve the truth of the formula ∃z R(x, y, z) expressing the order relation.
We end with a question. All of the examples in this note are closely related to trees or orders: a witness to the weak amalgamation property over A must always go "further out" (in the tree or in the order). No infinite tree has a countably categorical theory, which suggests the possibility that for a weak Fraïssé class with countably categorical generic limit, a failure of CAP must come from a definable order. Recall that a first-order theory T has the strict order property if there is a formula ϕ(x, y), where x and y are tuples of variables of the same length, such that in some model M |= T , ϕ(x, y) defines a preorder with infinite chains.
Question 4.6. Suppose K is a weak Fraïssé class without CAP in a finite relational language, and let M be its generic limit. If Th(M ) is countably categorical, does Th(M ) have the strict order property? Equivalently, if M is a countable structure in a finite relational language which is uniformly weakly homogeneous but not cofinally homogeneous, does Th(M ) have the strict order property?