arXiv:1803.10575v4 [math.CO] 7 Nov 2020 h rtato a atal upre yNFgat DMS-13085 DMS-1855711. grants grant NSF NSF by by supported supported partially partially was was author author first The Date opim n nue ugah.The integer subgraphs. induced and morphisms h olwn holds. following the ra n ioi h 0s[7,adcliae nasre fppr from the papers in 1.1 of summarized are series Theorem results a These pictu in complete culminated properties. almost graph and an hereditary [27], beg gave which jumps 90’s Weinreich, these Bollob´as, the propert and of Balogh, in graph Study Zito hereditary speeds. and of possible erman speed the the in as “jumps” discrete occur can function any eeiaygahproperty, graph hereditary A 3 hr san is There (3) 1 hr are There (1) 2 hr sa integer an is There (2) oebr1,2020. 10, November : UP NSED FHRDTR RPRISI FINITE IN PROPERTIES HEREDITARY OF SPEEDS IN JUMPS up nta ag.Orterm bu h atra ag use range factorial algebraicity. the mutual na about of many theorems notion out the Our ruling to range, related range. penultimate that the in of jumps bounds lower and upper rprisof properties neligset underlying fBlg,Blo´s n enec,w hwta o all for that show we Weinreich, Bollob´as, and Balogh, of ucinwihsnsa integer an sends which function e o l xmlsrqiigalnug faiygetrta two, than in greater results arity of The of properties language graphs. a factor hereditary of requiring case and examples the all polynomial in for as new the same in the essentially jumps are they the characterize we particular, osbesed fahereditary a of speeds possible Abstract. finite B large n n to ∼ L n ( |H srcue lsdudrioopimadsbtutr.The substructure. and isomorphism under closed -structures n/ , [,6 ,8 11]) 8, 7, 6, ([2, |H n log | k where , ie nt eainllanguage relational finite a Given n k IHE .LSOSIADCRLN .TERRY A. CAROLINE AND LASKOWSKI C. MICHAEL | ∈ uiomhprrpswoesed silt ewe ucin n functions between oscillate speeds whose hypergraphs -uniform { n > ǫ = 1 ) N .,n ..., , n P n ainlpolynomials rational and eoe the denotes 0 i k =1 H } EAINLLANGUAGES RELATIONAL k nti ae egv ecito fmn e up nthe in jumps new many of description a give we paper this In . uhta o ucetylarge sufficiently for that such k n p uiomhprrpsfor hypergraphs -uniform ≥ i stesto lmnsof elements of the is ( n 2 . ) H Suppose uhthat such i L n sacaso nt rpswihi lsdudriso- under closed is which graphs finite of a is , poet,where -property, 1. . n n t elnumber. Bell -th ≥ introduction otenme fdsic lmnsin elements distinct of number the to 1 speed H |H 1 sahrdtr rp rpry hnoeof one Then property. graph hereditary a is n of | L = a , p H L 1 n > k hereditary ( sayfiierltoa agae In language. relational finite any is (1 stefnto hc ed positive a sends which function the is x ) − p , . . . , .Frhr dpiga example an adapting Further, 2. k 1 + H o k (1)) n ihvre e [ set vertex with 6adDS1579 h second The DMS-1855789. and 46 ≥ , L k n ( -property . B x ,teeaehereditary are there 2, nldn h etn of setting the including n ) h atra ag are range factorial the oe hoei tools theoretic model a ags n show and ranges, ial .Seicly hr are there Specifically, y. uhta o sufficiently for that such nwt oko Schein- of work with an olwn theorem. following |H ≤ pe of speed ua ucin as functions tural saclass a is eo h up for jumps the of re n ≤ | H h 00sby 2000’s the H a the ear n 2 sthe is .Ntjust Not ]. n H with 2 − of ǫ where , JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 2

(1− 1 +o(1))n2/2 (4) There is an integer k 2 such that =2 k . ≥ |Hn| The jumps from (1) to (2) and within (2) are from [6], the jump from (2) to (3) is from [6, 8], the jump from (3) to (4) is from [2, 11], and the jumps within (4) are from [11]. Moreover, in [7], Balogh, Bollob´as, and Weinreich showed that there exist hereditary graph properties whose speeds oscillate between functions near the lower and upper bound of range (3), which rules out most “natural” functions as possible jumps in that range. Further, structural characterizations of the properties in ranges (1), (2) and (4) are given in [6] (ranges (1) and (2)) and [11] (range (4)). Despite the detailed understanding Theorem 1.1 gives us about jumps in speeds of hered- itary graph properties, relatively little was known about the jumps in speeds of hereditary properties of higher arity hypergraphs. The goal of this paper is to generalize new as- pects of Theorem 1.1 to the setting of hereditary properties in arbitrary finite languages consisting of relations and/or constant symbols (we call such a language finite relational). Specifically, we consider hereditary -properties, where, given a finite relational language , a hereditary -property is a classL of finite -structures closed under isomorphisms and substructures.L ThisL notion encompasses mostL of the hereditary properties studied in the combinatorics literature1, including for example, hereditary properties of posets, of linear orders, and of k-uniform hypergraphs (ordered or unordered) for any k 2. We now sum- marize what was previously known about generalizing Theorem 1.1 to hereditary≥ properties of -structures. L Theorem 1.2 ([1, 10, 32, 31]). Suppose is a finite relational language of arity r 1 and is a hereditary -property. Then oneL of the following holds. ≥ H L >0 k (i) There are constants C,k N such that for sufficiently large n, n Cn . ∈ Cn|H | ≤ nr−ǫ (ii) There are constants C,ǫ > 0 such that for sufficiently large n, 2 n 2 . C n +o(nr) ≤ |H | ≤ (iii) There is a constant C > 0 such that =2 (r) . |Hn| The existence of a jump to (iii) was first shown for r-uniform hypergraphs in [1, 10], and later for finite relational languages in [31]. The jump between (ii) and (iii) as stated (an improvement from [1, 10, 31]) is from [32]. The jump from (i) and (ii) for finite relational languages is from [32] (similar results were also obtained in [13]). Stronger results, including an additional jump from the exponential to the factorial range, have also been shown in special cases (see [5, 3, 4, 16, 17]). However, to our knowledge, Theorem 1.1 encompasses all that was known in general, and even in the special case of hereditary properties of r- uniform hypergraphs for r 3 (unordered). Our focus in this paper is on the polynomial, exponential, and factorial ranges,≥ where we obtain results analogous to those in Theorem 1.1 for arbitrary hereditary -properties. The arity of is the maximum arity of its relation symbols. By convention,L if consists of constantL symbols, we say it has arity 0. L Theorem 1.3. Suppose is a hereditary -property, where is a finite relational language of arity r 0. Then oneH of the followingL hold. L ≥ 1Notable exceptions include hereditary properties of permutations and non-uniform hypergraphs. JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 3

(1) There are k N and rational polynomials p1(x),...,pk(x) such that for sufficiently ∈ k n large n, n = i=1 pi(n)i . |H | (1− 1 −o(1))n (2) There is an integer k 2 such that = n k . P n (3) nn(1−o(1)). ≥ |H | |Hn| ≥ The most interesting and difficult parts of Theorem 1.3 are the jumps within range (2) and between ranges (2) and (3), which were not previously known for any hereditary property in a language of arity larger than two. Combining Theorem 1.2 with Theorem 1.3 yields the following overall result about jumps in speeds of hereditary -properties. L Theorem 1.4. Suppose is a hereditary -property, where is a finite relational language of arity r 0. Then oneH of the followingL hold. L ≥ (1) There are k N and rational polynomials p1(x),...,pk(x) such that for sufficiently ∈ k n large n, n = i=1 pi(n)i . |H | (1− 1 −o(1))n (2) There is an integer k 2 such that n = n k . P ≥ n(1−o(1)) |H | nr−ǫ (3) There is ǫ> 0 such that n n 2 . (4) There is a constant C > 0 such that≤ |H | ≤=2Cnr+o(nr). |Hn| We also generalize results of [7] to show there are properties whose speeds oscillate between functions near the extremes of the penultimate range (case (3) of Theorem 1.4). Theorem 1.5. For all integers r 2, and real numbers c 1/(r 1) and ǫ > 1/c, there is a hereditary property of r-uniform≥ hypergraphs such≥ that for− arbitrarily large n, r−ǫ = ncn(r−1)(1−o(1)) and for arbitrarily large n, H2n . |Hn| |Hn| ≥ While there still remain many open problems about the penultimate range, Theorem 1.5 shows that, for instance, there are no jumps of the form nkn for k > 1or2nk for 1

Here and elsewhere, we use the compactness theorem, which allows us to work with infinite structures rather than large finite ones. The effectiveness of model theoretic tools in the context of this paper can be attributed to the fact that any hereditary -property can be viewed as the class of finite models of a universal, first-order theoryLT . TheH speed of is then the same as the function H H sending n to the number of distinct quantifier-free types in the variables (x1,...,xn) which are consistent with TH, and which imply xi = xj for distinct i and j. Problems about counting types have been fundamental to model6 theory for many years (see e.g. [29]). From this perspective it is not surprising that tools from turn out to be useful for solving problems about speeds of hereditary -properties. Further, variations of this kind of problem have previously been investigatedL in model theory (see for example, [12, 22, 23]). We will point out direct connections with this line of work throughout the paper. We end this introduction by outlining some problems which remain open around this topic. First, Theorem 1.1 describes precisely the speeds occurring within the fastest growth rate (case (4)). A similar analysis in the hypergraph setting would amount to understanding the possible Tur´an densities of hereditary hypergraph properties, a notoriously difficult question which we have made no attempt to address in this paper (see e.g. [25]). There are many questions remaining around the penultimate range. For instance, in the graph case, Theorem 1.1 gives a precise lower bound for the penultimate range, namely the n-th Bell number n. This is accomplished in [8] by characterizing the minimal graph properties in this range,B which they show are the properties consisting of disjoint unions of cliques cl, or disjoint unions of anti-cliques, cl. A general analogue of this kind of result wouldH be very interesting. H Problem 1.6. Given a finite relational language , characterize the minimal hereditary -properties in the penultimate range. L L It is easy to see the answer must be more complicated in general than the graph case. Indeed, let = R(x, y) and consider the hereditary -property consisting of all finite, transitive tournaments.L { } Then = n! < falls intoL the penultimateH range. Conse- |Hn| Bn quently, while cl, cl are the only minimal hereditary graph properties in the penultimate range, there areH otherH hereditary -properties in this range with strictly smaller speed. Theorem 1.5 rules out many possibleL jumps in the penultimate range, however, there does not yet exist a satisfying formalization of the idea that there can be no more “reasonable” jumps in this range (see [7] for a thorough discussion of this). Finally, while Theorem 1.5 shows there are properties whose speeds oscillate infinitely often between functions near the upper and lower bounds, there also exist properties whose speeds lies in the penultimate range, and for which wide oscillation is not possible (for an example of this, see [9]). This leads to the following question. Question 1.7. Suppose is a finite relational language. Are there jumps within the penultimate range amongL restricted classes of hereditary -properties (for instance among those which can be defined using finitely many forbiddenL configurations)? JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 5

Both authors are grateful to the anonymous referee, who identified a gap in the proof of Proposition 4.27 in a prior version of this paper, and whose careful reading greatly improved the exposition.

1.1. Notation and outline. We now give an outline of the paper. In Section 2 we deal with the polynomial/exponential case, i.e. case (1) of Theorem 1.4. Specifically, we define the class of basic hereditary properties, and show the speed of any basic has the form appearing in case (1) of Theorem 1.4. In Section 3 we prove counting dichotomiesH for a restricted class of properties called totally bounded properties, which generalize bounded degree graph properties. In Section 4 we define mutually algebraic properties, and prove counting dichotomies for mutually algebraic properties by showing they are controlled by finitely many totally bounded properties, after an appropriate change in language. We then show non-mutually algebraic properties fall into cases (3) or (4). In Section 6, we generalize an example from [7] to show that for all r 2, there are hereditary properties of r-uniform hypergraphs whose speeds oscillate between≥ functions near the upper and lower bounds of the penultimate range. We spend the rest of this subsection fixing notation and definitions. We have attempted to include sufficient information here so that the reader with a only a basic knowledge of first-order logic could read this paper. Suppose ℓ 1 is an integer, X is a set, and x =(x ,...,x ) Xℓ. Then [ℓ]= 1,...,ℓ , ≥ 1 ℓ ∈ { } x = x1,...,xℓ , and x = ℓ. We will sometimes abuse notation and write x instead of ∪x when{ it is clear} from| context| what is meant. Given x =(x ,...,x ) and I [ℓ], x is ∪ 1 ℓ ⊆ I the tuple (xi : i I). We write x y to denote that x is a subtuple of y, i.e. x = yI for some I. Given a∈ sequence of variables⊆ (z ,...,z ), we write z = x y to mean there is a 1 s ∧ partition I J of [s] into nonempty sets such that x = zI and y = zJ . In this case, we call x y a proper∪ partition of z. Set ∧ X Xℓ = (x ,...,x ) Xℓ : x = x for each i = j and = Y X : Y = ℓ . { 1 ℓ ∈ i 6 j 6 } ℓ { ⊆ | | }   X ℓ >0 Notice that ℓ = x : x X . Given u, v N , a permutation σ :[u] [u], and a set Σ [v]u let {∪ ∈ } ∈ → ⊆  σ(Σ) := (v ,...,v ):(v ,...,v ) Σ . { σ(1) σ(u) 1 u ∈ } We say Σ is invariant under σ when σ(Σ) = Σ. We say a first order language is finite relational if it consists of finitely many relation and constant symbols and no functionL symbols. Suppose is a finite relational language. We let denote the total number of constants and relationsL in . By convention, the arity of|L|is 0 if consists of only constant symbols, and is otherwiseL the largest arity of a relationL in . GivenL an -formula ϕ and a tuple of variables x, we write ϕ(x) to denote that the freeL variables of Lϕ are all in the set x. Similarly, if p is a set of formulas, we write p(x) to mean every formula in p has free∪ variables in the set x. We will use script letters for -structures and the corresponding non-script letters for∪ their underlying set. So for instanceL if is an -structure, M denotes the underlying set of . M L M JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 6

Suppose is an -structure. Given a formula ϕ(x ,...,x ), M L 1 s ϕM = (m ,...,m ) M s : = ϕ(m ,...,m ) . { 1 s ∈ M| 1 s } A formula with parameters from is a an expression of the form ϕ(x, a) where ϕ(x, y) is a formula and a M |y|. The setM of realizations of ϕ(x, a) in is ∈ M ϕ( , a) := m M |x| : = ϕ(m, a) . M { ∈ M| } Given A M, a set B M |x| is defined by ϕ(x, y) over A if there is a A|y| such that B = ϕ( ⊆; a). In this case⊆ we say B is definable in . If B is defined by a∈ formula without M M parameters, we say that B is 0-definable. If ∆(x1,...,xs) is a set of formulas (possibly with parameters from M), a realization of ∆ in is a tuple m M s such that = ϕ(m) for M ∈ M| all ϕ(x1,...,xs) ∆. If c is a constant∈ of , recall that cM denotes the interpretation of c in . Similarly, if R is a t-ary relationL of , then RM := x M t : = R(x) is the interpretationM of R in . If C is the set ofL constants of {, let∈ CM =Mc |M : c }C . If f : M N is a bijection,M then f( ) is the -structure withL domain N{such that∈ cf}(M) = f(cM→) for each c C, and for eachM relationLR , Rf(M) = f(RM). An isomorphism from to is a bijection∈ f : M N such that∈L = f( ). An automorphism of is anM isomorphismN from to . → N M M GivenM X MM containing CM, [X] is the -structure with domain X such that for all c C, c⊆M[X] = cM and for allM relations R(Lx ,...,x ) , RM[X] = RM Xs. An ∈ 1 s ∈ L ∩ -structure is an -substructure of , denoted L if and only if = [X] for Lsome X MN. If isL clear from contextM we will justN write ⊆ M . The atomicN M formulas of are⊆ the formulasL of the following forms. N ⊆M L t = t where each of t , t is either a variable or a constant from . • 1 2 1 2 L R(t1,...,tn), where R(x1,...,xn) is a relation symbol of and each ti is either a • variable or a constant from . L L The quantifier-free -formulas consist of all boolean combinations of atomic -formulas. L L When we write ϕ(x1,...,xn), we require the variable symbols x1,...,xn be distinct. It will be convenient in Section 2 to work with the following set of formulas. Definition 1.8. ∆ := ϕ(x ,...,x ) x = x : ϕ(x ,...,x ) is an atomic -formula . neq { 1 s ∧ i 6 j 1 s L } 1≤i

A hereditary -property is trivial if there are only finitely many non-isomorphic . Equivalently,L isH trivial if there is N N such that = for all n N. M ∈ H H ∈ Hn ∅ ≥ Since we are interested in the size of n for large n, we will be exclusively concerned with non-trivial hereditary -properties inH this paper. L Definition 1.9. Given an -structure , the universal theory of , T h ( ) is the set L M M ∀ M of sentences true in which are of the form x1 ... xnϕ(x1,...,xn), where ϕ(x1,...,xn) is a quantifier-free M-formula. ∀ ∀ The age of , denotedL age( ), is the class of finite models of T h ( ). M M ∀ M The age of is always a hereditary -property (but not every hereditary -property is the age of aM single structure). We willL use throughout the paper the followingL standard model theoretic facts (see for instance Section 6.5 of [30]) (1) If , and ϕ is a universal sentence, then = ϕ implies = ϕ. (2) If N ⊆M= T h ( ), then there is ′ = T h( ) suchM| that N′. | N | ∀ M M | M N ⊆M Together these imply that if = age( ), then for all n N, n is the set of all -structures with domain [n] andH whichM are isomorphic to a∈ substructureH of . More Lgenerally, if is any hereditary property, and = T , then age( ) . M H M| H M ⊆ H 2. Case 1: Polynomial/Exponential Growth In this section we give a sufficient condition for a hereditary property to have speed of the special form appearing in case (1) of Theorem 1.4 (we will see later it is in fact necessary and sufficient). Throughout this section, is a finite relational language, and r 0 is the arity of . We will use the following naturalL relation defined on any -structure.≥ L L Definition 2.1. Given an -structure and a, b M, define a b if and only if for every atomic formula R(x ,...,xL ) and Mm ,...,m ∈M a, b , ∼ 1 s 2 s ∈ \{ } = R(a, b, m ,...,m ) R(b, a, m ,...,m ) R(a, m ,...,m ) R(b, m ,...,m ) . M| 3 s ↔ 3 s ∧ 2 s ↔ 2 s     In model theory terms, a b if and only if qftpM(ab/(M a, b )) = qftpM(ba/(M a, b )). ∼ \{ } \{ } Example 2.2. Suppose = (M, E) is a directed r-uniform hypergraph with vertex set M and edge set E M r.M Given a, b M an 1 i < j r, let ⊆ ∈ ≤ ≤ N (a, b)= (c ,...,c ) M r−2 :(c ,...,c ,a,c ,...,c ,b,c ,...,c ) E and ij { 1 r−2 ∈ 1 i−1 i j j+1 r−2 ∈ } N (a, b)= (c ,...,c ) (M b )r−1 :(c ,...,c ,a,c ,...,c ) E . i { 1 r−1 ∈ \{ } 1 i−1 i r ∈ } Considering as an = R(x1,...,xr) structure in the usual way yields that for all a, b , aM b holdsL if and{ only if for} all 1 i < j r, N (a, b) = N (b, a) and ∈ M ∼ ≤ ≤ ij ij Ni(a, b)= Ni(b, a) It is easy to check that for any -structure , is an equivalence relation on . L M ∼ M Definition 2.3. A hereditary -property is basic if there is k N such that every has at most k distinct L-classes. H ∈ M ∈ H ∼ JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 8

The main theorem of this section shows that the speeds of basic properties have the form appearing in case (1) of Theorem 1.4. Theorem 2.4. Suppose is a basic hereditary -property. Then there is k N and H L k ∈ rational polynomials p (x),...,p (x) such that for sufficiently large n, = p (n)in. 1 k |Hn| i=1 i We will see later that something even stronger holds, namely that is basicPif and only if its speed has the form appearing in case (1) of Theorem 1.4 (seeH Corollary 5.1). For the rest of this section, is a fixed non-trivial, basic hereditary -property. We end this introductoryH subsection with a historical note. The equivalenceL relation of Definition 2.1 also makes an appearance in [15] (see section 2 there). In that paper, the authors show that for a countably infinite -structure , several properties are equivalent to having finitely many -classes. AsL a directM consequence, we obtain equivalent formulationsM of basic properties.∼ Specifically, in the terminology of [15], a hereditary - property is basic if and only if every countable model of T is finitely partitioned, if andL H H only if every countable model of TH is absolutely ubiquitous. Observe that if TH is basic, then it is -categorical. ℵ0 2.1. Infinite models as templates. Our proof of Theorem 2.4 can be seen as a gener- alization of the proof of Theorem 20 in [6]. One idea used in our proof of Theorem 2.4 is to view countably infinite = TH as “templates” for finite elements of . In this sub- section we fix notation to makeM | this idea precise, and show that the set of finiteH structures compatible with a fixed template can be described using first order sentences. The main advantage of this approach is that it allows us to leverage the compactness theorem in the next subsection. Fix a countably infinite = TH. We make a series of definitions related to . First, by our assumption on , M|has finitely many -classes. Fix an enumeration ofM them, say H M ∼ A1,...,Ak, satisfying 0 < A1 ... Ak , and call this the canonical decomposition of | | ≤ ≤ | | M s . It is straightforward to check that for each τ(x1,...,xs) ∆neq, there is Στ [k] Msuch that ∈ ⊆ τ M = (A ... A ) M s :(i ,...,i ) ΣM . { i1 × × is ∩ 1 s ∈ τ } Let t = max i [k]: A is[ finite and set K = max r, A . Given any set X, let ΩM(X) { ∈ i } { | t|} denote the set of ordered partitions (X1,...,Xk) of X satisfying Xi = Ai for each i [t], min X : t < i k >K. Note (A ,...,A ) ΩM(M). | | | | ∈ {| i| ≤ } 1 k ∈ M Definition 2.5. An -structure is compatible with if there is (B1,...,Bk) Ω (N) such that for each τ(xL ,...,x ) N∆ , τ N = (B M... B ) N s :(i ,...,i ∈) ΣM . 1 s ∈ neq { i1 × × is ∩ 1 s ∈ τ } M Observe that if is compatible with ,S witnessed by (B1,...,Bk) Ω (N), then N M ∈ B1,...,Bk are the -classes of . It is straightforward to see that if is finite and {compatible} with , then∼ is isomorphicN to a substructure of , and isN thus in . For this reason we thinkM of Nas forming a “template” for the finiteM structures whichH are compatible with . WeM now show that being compatible with can be definedN using a first-order sentence.M We leave it to the reader to check that thereM is a formula ϕ(x, y) (with JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 9 quantifiers) such that for any -structure and a, b G, a b if and only if = ϕ(a, b). We will abuse notation and writeL x y forG this formula.∈ ∼ G | ∼ Lemma 2.6. There is a sentence θM such that for any -structure , = θM if and only if is compatible with . L N N | N M Proof. Given τ(x ,...,x ) ∆ , let ϕ (z ,...,z ) be the following formula. 1 s ∈ neq τ,M 1 k s x ... x τ(x ,...,x ) x = x x z . ∀ 1 ∀ s 1 s ↔ i 6 j ∧ j ∼ ij M j=1   1≤^i6=j≤s   (i1,...,i_s)∈Στ  ^ 

Note that for any (a1,...,ak) A1 ... Ak and τ ∆neq, = ϕτ,M(a1,...,ak). Define θ to be the following -sentence,∈ × where× n = A ∈for eachM|i [t]. M L i | i| ∈ z ... z =ni x(x z ) >Kx(x z ) ϕ (z ,...,z ) . ∃ 1 ∃ k ∃ ∼ i ∧ ∃ ∼ i ∧ τ,M 1 k  i^∈[t]   i∈^[k]\[t]   τ∈^∆neq 

We leave it to the reader to verify that for any -structure , = θM if and only if is compatible with . L N N | N M

Observe that for any = θM, there is a sufficiently saturated elementary extension ′ N | ′ such that is isomorphic to a substructure of . Thus = T h∀( ), so M≺M= T , and consequentlyN age( ) . M N | M N | H N ⊆ H 2.2. Proof of Theorem 2.4. In this subsection we prove Theorem 2.4 by showing the speed of is asymptotically equal to a sum of the form k p (n)in for some rational H i=1 i polynomials p1,...,pk. Our strategy is as follows. First, we compute the the number of compatible with a single fixed = T (PropositionP 2.10). We then use the G ∈ Hn M | H compactness theorem to show there are finitely many = TH which serve as templates for all sufficiently large elements of . This will then allowM | us to compute the speed of . The first goal of the section is toH prove Proposition 2.10, which shows the numberH of M elements of n which are compatible with a fixed = TH is equal to C Ω ([n]) for some constant C Hdepending on . We give a brief outlineM| of the argument here.| Given| a fixed M = TH and n N, every element of n which is compatible with can be constructed M| ∈ M H M by choosing an element of Ω ([n]), then choosing the realizations of each τ ∆neq as M P ∈ M ∈ prescribed by the set Στ . This gives an upper bound of Ω ([n]) . The constant factor then arises from considering double counting. Dealing with| the double| counting is the motivation for the next definition.

Definition 2.7. Suppose = TH is countably infinite and A1,...,Ak is its canonical decomposition. Define AutM∗( | ) to be the set of permutations σ :[k] [k] with the property that there is an automorphismM f of satisfying f(A )= A for→ each i [k]. M i σ(i) ∈ We will show in Proposition 2.10 that the number of element of n compatible with a fixed is ΩM([n]) / Aut∗( ) . We need the next two lemmas forH this. M | | | M | JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 10

Lemma 2.8. Let k N>0, and let σ :[k] [k] be a permutation. Assume , ∈ → M1 M2 ∈ H are countably infinite, both have k distinct -classes, and 2 has at least as many finite - M2 M1 ∼ M M2 M1 ∼ classes as 1. If σ(Ω (X)) Ω (X) = for some set X, then σ(Ω (Y )) Ω (Y ) for all setsMY . ∩ 6 ∅ ⊆ Proof. Let n ... n and m ... m be the sizes of the finite -classes of and 1 ≤ ≤ t1 1 ≤ ≤ t2 ∼ M1 2, respectively. Note by assumption, t1 t2. Set K1 = max r, nt1 . By assumption, M M2 ≤ { M1 } there is (X1,...,Xk) Ω (X) such that (Xσ(1),...,Xσ(k)) Ω (X). By definition, we must have that for∈ each i [t ], n = m , and for all i∈ > t , m > K . Since ∈ 1 i σ(i) 1 σ(i) 1 t1 t2, this implies σ([t1]) = [t1], and for all i [t1], ni = mi. Consequently, for all ≤ ∈ M2 j > t1, mj > K1. Clearly this implies that for any set Y , if (Y1,...,Yk) Ω (Y ), then M1 M2 M1 ∈ (Yσ(1),...,Yσ(k)) Ω (Y ), i.e. σ(Ω (Y )) Ω (Y ). ∈ ⊆  The next Lemma gives us useful information about elements of Aut∗( ). M Lemma 2.9. Suppose = TH is countably infinite, A1,...,Ak is its canonical decom- position, and σ :[k] M[k] | is a permutation. Then σ Aut∗( ) if and only if for all τ(x ,...,x ) ∆ , Σ→M and ΩM(M) are invariant under∈ σ. M 1 s ∈ neq τ Proof. Let t = max i [k]: A is finite . First, suppose σ Aut∗( ). Then there is an { ∈ i } ∈ M automorphism f of such that for each i [k], f(Ai)= Aσ(i). This implies that for each τ(x ,...,x ) ∆ M, ∈ 1 s ∈ neq M s s τ = (Ai1 ... Ais ) M = (Aσ(i1) ... Aσ(is)) M , M × × ∩ M × × ∩ (i1,...,i[s)∈Στ (i1,...,i[s)∈Στ M M M which implies σ(Στ ) = Στ , i.e. Στ is invariant under σ. Further, since f is a bijection, M ni = nσ(i) for each i [t], and σ([t]) = [t]. Therefore Ω (M) is invariant under σ. ∈ M M Suppose conversely that for all τ(x1,...,xs) ∆neq, Ω (M) and Στ are invariant M ∈ M under σ. Since Ω (M) is invariant under σ, (Aσ(1),...,Aσ(k)) Ω (M). Therefore, for each i [t], A = A , and for each i [k] [t], A = A ∈ = . Thus there is a ∈ | i| | σ(i)| ∈ \ | i| | σ(i)| ℵ0 bijection f : M M satisfying f(Ai)= Aσ(i) for each i [k]. → ∈s Now fix τ(x1,...,xs) ∆neq and (a1,...,as) M . Suppose = τ(a1,...,as). ∈ ∈ M M | Then (a1,...,as) Ai1 ... Ais for some (i1,...,is) Στ . By definition of f, (f(a ),...,f(a )) ∈A × ... × A . Since σ(ΣM) = ΣM∈, (σ(i ),...,σ(i )) ΣM, so 1 s ∈ σ(i1) × × σ(is) τ τ 1 s ∈ τ by definition of ΣM, = τ(f(a ),...,f(a )). This shows that = τ(f(a ),...,f(a )) τ M| 1 s M| 1 s if and only if = τ(a1,...,as) (the “only if” part comes from the same argument applied to f −1). ThusM|f is an automorphism of and consequently σ Aut∗( ).  M ∈ M Proposition 2.10. For any countably infinite = T and sufficiently large n N, M| H ∈ : = θ = ΩM([n]) / Aut∗( ) . |{N ∈Hn N | M}| | | | M | Proof. Fix a countably infinite = TH and a large n N. Given = (X1,...,Xk) ΩM([n]), let be the structureM with | domain [n] satisfying,∈ for each τP(x ,...,x ) ∆ ∈, NP 1 s ∈ neq τ NP = (X ... X ) [n]s :(i ,...,i ) ΣM . { i1 × × is ∩ 1 s ∈ τ } [ JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 11

M By definition, n is compatible with if and only if = P for some Ω ([n]). Thus if we defineG ∈ Φ( H )= for each MΩM([n]), then ΦG is a functionN Φ : ΩPM([ ∈n]) P NP P ∈ → Hn satisfying Im(Φ) = n : = θM . It suffices to show that for all Im(Φ), Φ−1( ) = Aut∗( ){N, since ∈ H thenN | } G ∈ | G | | M | Im(Φ) = : = θ = ΩM([n]) / Aut∗( ) . | | |{N ∈Hn N | M}| | | | M | Fix Im(Φ). By definition, there is a ΩM([n]) so that = . We show G ∈ P ∈ G NP (1) Φ−1( )= σ( ): σ Aut∗( ) . G { P ∈ M } Suppose σ Aut∗( ). By Lemma 2.9, ΩM(M) σ(ΩM(M)) = , so Lemma 2.8 implies M ∈ M M M ∩ 6 ∅ M M σ(Ω ([n])) Ω ([n]). Thus σ( ) Ω ([n]). Then, also by Lemma 2.9, σ(Στ ) = Στ ⊆ P N∈P Nσ(P) for each τ ∆neq, which implies τ = τ . Thus Φ(σ( )) = σ(P) = P = , so σ( ) Φ−1∈( ). P N N G P ∈ G −1 On the other hand, suppose Φ ( ). Note = P = Q implies there is a permutation η :[k] [k] suchQ that ∈ =Gη( ). ThenG N ΩM([Nn]) η(ΩM([n])) and ΩM([n]) η−1(Ω→M([n])) imply byQ LemmaP 2.8 that ΩQM ∈(M) = η(Ω∩M(M)). Further, P ∈ ∩ M M P = Q implies that for each τ(x1,...,xs) ∆neq, η(Στ ) = Στ . Thus by Lemma N2.9, η N Aut∗( ). Since Aut∗( ) is clearly∈ closed under inverses and = η−1( ), σ∈( ): σ MAut∗( ) . ThusM we have shown (1) and Φ−1( ) = Aut∗(Q ) . P Q∈{ P ∈ M } | G | | M | Lemma 2.11 below, proved in [6], will be used to compute ΩM([n]) for a fixed = T . | | M| H Lemma 2.11 (Lemma 19 in [6]). Suppose ℓ,s,c ,...,c are integers. If c ,...,c s, then 1 t 1 t ≤ there are rational polynomials p1,...,pℓ such that the following holds for all n ℓs + c, t ≥ where c = i=1 ci. P ℓ n n (2) = pi(n)i . n1,...,nℓ,c1,...,ct n ,...,n >s,Pℓ n =n−c   i=1 1 ℓ Xi=1 i X

Further, if ℓ =1, then p1 has degree c.

M Note that for any = TH, Ω ([n]) is by definition of the form appearing in the left hand side of Lemma 2.11.M| We use| this along| with Proposition 2.10 to compute the number of compatible with a fixed = T . G ∈ Hn M| H Corollary 2.12. Suppose = TH is countably infinite with ℓ infinite -classes. Then there are rational polynomialsMp | ,...,p such that for all sufficiently large∼n N, 1 ℓ ∈ ℓ : = θ = p (n)in. |{N ∈Hn N | M}| i i=1 X Further, when ℓ = 1, the degree of p1(x) is equal to the number of elements of in a finite -class. M ∼ JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 12

Proof. Let c ... c be the sizes of the finite -classes of . Set c = t c , and 1 ≤ ≤ t ∼ M i=1 i K = max r, ct . By definition, if ℓ = k t, then { } − P n (3) ΩM([n]) = . | | n1,...,nℓ,c1,...,ct n ,...,n >K,Pℓ n =n−c   1 ℓ Xi=1 i By Lemma 2.11, there are rational polynomials q1,...,qℓ such that for large enough n, M ℓ n Ω ([n]) = i=1 qi(n)i . Further, if ℓ = 1, then q1(x) has degree c. Combining this with Proposition| | 2.10, we obtain that for sufficiently large n, P ℓ ℓ : = θ = ΩM([n]) / Aut∗( ) = q (n)in / Aut∗( ) = p (n)in, |{N ∈Hn N | M}| | | | M | i | M | i i=1 i=1  X  X where each pi(x) is the rational polynomial obtained by dividing the coefficients of qi(x) by the integer Aut∗( ) .  | M | We now prove our final lemma, which reduces the problem of counting the number of n compatible with finitely many templates to the problem of counting the number compatibleG ∈ H with a single template.

Lemma 2.13. Suppose ℓ 1 is an integer, 1,..., ℓ = TH are countably infinite, and θ ... θ is satisfiable.≥ Then there is Mi [ℓ] suchM that| θ ... θ θ . M1 ∧ ∧ Mℓ ∈ M1 ∧ ∧ Mℓ ≡ Mi Proof. By induction it suffices to do the proof for ℓ = 2. Suppose , = T are M1 M2 | H countably infinite and θM1 θM2 is satisfiable. Clearly this implies 1 and 2 must have the same number of -classes,∧ say this number is k 1. WithoutM loss of generality,M ∼ ≥ assume 2 has at least as many finite -classes as 1. By assumption,M there is an -structure∼ satisfyingM both θ and θ . Since = θ , L B M1 M2 B| M2 there is (B ,...,B ) ΩM2 (B) so that for each τ(x ,...,x ) ∆ , 1 k ∈ 1 s ∈ neq (4) τ B = (B ... B ) Bs :(j ,...,j ) ΣM2 . { j1 × × js ∩ 1 s ∈ τ } M1 Since = θM1 , there is[ a permutation σ :[k] [k] so that (Bσ(1),...,Bσ(k)) Ω (B) and forB all | τ(x ,...,x ) ∆ , → ∈ 1 s ∈ neq (5) τ B = (B ... B ) Bs :(j ,...,j ) ΣM1 . { σ(j1) × × σ(js) ∩ 1 s ∈ τ } Observe (4) and (5)[ imply σ(ΣM1 ) = ΣM2 for all τ ∆ . Further, σ(ΩM2 (B)) τ τ ∈ neq ∩ ΩM1 (B) = , so Lemma 2.8 implies that σ(ΩM2 (Y )) ΩM1 (Y ) for any set Y . We now6 show∅ θ θ θ . Clearly it suffices⊆ to show θ = θ . Fix = θ . M1 ∧ M2 ≡ M2 M2 | M1 N | M2 Then there is (N ,...,N ) ΩM2 (N) so that for each τ(x ,...,x ) ∆ 1 k ∈ 1 s ∈ neq (6) τ N = (N ... N ) N s :(i ,...,i ) ΣM2 . { i1 × × is ∩ 1 s ∈ τ } Since σ(ΩM2 (N)) ΩM[1 (N), we have (N ,...,N ) ΩM1 (N). Further, for each ⊆ σ(1) σ(k) ∈ τ(x ,...,x ) ∆ , σ(ΣM1 ) = ΣM2 , so (6) implies that 1 s ∈ neq τ τ τ N = (N ... N ) N s :(i ,...,i ) ΣM1 . { σ(i1) × × σ(is) ∩ 1 s ∈ τ } [ JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 13

Thus by definition, = θ .  N | M1 We now prove the main result of this subsection. The proof uses the compactness theorem and the preceding lemma to show the speed of is a linear combination of finitely many functions of the form appearing in Corollary 2.12.H

Theorem 2.14. There are k N and rational polynomials p1(x),...,pk(x) such that for k∈ sufficiently large n, = p (n)in. |Hn| i=1 i Proof. Clearly the followingP set of sentences is inconsistent.

T θ : = T is countably infinite x ... x x = x : n 1 . H ∪ {¬ M M| H }∪{∃ 1 ∃ n i 6 j ≥ } ^i6=j

Thus by compactness, there are finitely many θM1 ,...,θMk such that for sufficiently large k n, any element of n must satisfy i=1 θMi . Combining this with the inclusion/exclusion principle yields thatH for large n, W = : = θ ... θ |Hn| |{M ∈ Hn M| M1 ∨ ∨ Mk }| k u+1 = ( 1) n : = θM ... θM . − |{M ∈ H M| i1 ∧ ∧ iu }| u=1 X  1≤i1<...

Theorem 2.14 proves Theorem 2.4, since was an arbitrary basic non-trivial hereditary -property. We have actually shown moreH about basic properties, which we sum up in LCorollary 2.15 below. We leave the proof to the reader, as it follows from the proof of Theorem 2.14 and the fact that for any = T , : = θ age( ) . M| H {N ∈H N | M} ⊆ M ⊆ H Corollary 2.15. Suppose is a non-trivial basic hereditary -property. Then there is a trivial hereditary -propertyH and finitely many countablyL infinite basic -structures ,..., such thatL = F m age( ). L M1 Mm H F ∪ i=1 Mi Moreover the following hold, where for each 1 i m, mi is the number of elements of in a finite -class and ℓ is theS number of infinite≤ ≤ -classes of . Mi ∼ i ∼ Mi (1) If ℓ = max ℓ : i [m] =1 then for large n, = p(n) where p(n) is a rational { i ∈ } |Hn| polynomial of degree c := max mi : i [m] . { ∈ } ℓ (2) If ℓ = max ℓ : i [m] 2, then for large n, = p (n)in where each { i ∈ } ≥ |Hn| i=1 i pi(n) is a rational polynomial. P The structural dichotomy between cases (1) and (2) in Corollary 2.15 also made an appearance in [15]. Specifically, in the terminology of [15], case (1) in Corollary 2.15 holds if and only if every model = T is absolutely M -ubiquitous. M| H | | JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 14

3. Totally bounded properties In this section we prove results about a very restricted class of properties, namely those which are totally bounded. The main result of this section is Theorem 3.9 which tells us about the speeds of totally bounded properties. Totally bounded hereditary -properties behave much like hereditary graph properties with uniformly bounded degree,L and our proofs in this section largely follow the corresponding proofs for these kinds of graphs (see Lemmas 24 and 25 in [6]). The results of this subsection will be used in Section 4 to prove counting dichotomies for more general classes. In this section is a finite relational language of arity r 0. Throughout, C denotes the set of constantsL of . ≥ L Definition 3.1. An -structure is totally k-bounded if for every relation symbol R(x ,...,x ) in andL every partitionM [s]= I J into nonempty sets I and J, 1 s L ∪ = x

Proof. Suppose first that k = 1. Then there is a fixed integer w such that for any = TH, MM| all but w elements of M are in a component of size 1. Fix = TH. Let D = C , and let X M be the set of elements contained in a componentM| of size greater than 1. Observe ⊆ that for all a = b M (X D), a b if and only if for every relation R(x1,...,xs) of , = R(a,...,a6 ∈) \R(b,...,b∪ ). Consequently,∼ the number of distinct -classes of Lis atM| most X + D +2↔ |L| w + C +2|L|. Since this bound does not depend∼ on , thisM shows is| basic.| | | ≤ | | M H (1−1/k−o(1))n Suppose now k 2. That n n is immediate from Lemma 3.4. We now show that ≥n(1−1/k+o(1))|Hn.| By≥ choice of k, there is an integer w such that for all |Hn| ≤ = TH, all but w elements of M are contained in a component of size at most k in . M| k M Let c = C , and let d = . By convention, let consist of the empty structure, | | i=1 |Hi| H0 so 0 = 1. Suppose now n is large. Then we can construct every n as follows. |H | P G ∈ H 1. Choose D = CG, the interpretations of the constants in . There are at most nc ways to do this. G 2. Choose a set A [n] of size at most w and choose [A]. The number of ways to do this is at most w ⊆n (w + 1)nw2|L|wr . G i=0 i |Hi| ≤ 3. Choose a sequence of natural numbers (b1,...,bn) (some of which may be 0) such that each b kPand n b = [n] A . Then partition [n] A into parts B ,...,B of sizes i ≤ i=1 i | \ | \ 1 n b1,...,bn, respectively (note some of the Bi may be empty). The number of ways to do P n n n this step is at most n k n . {(b1,...,bn)∈[n] :bi≤k,P bi=n−|A|} b1,...,bn ≤ 4. Choose a sequence ( ,..., ) such that for each 1 i n, . Then make PG1 Gn ≤ ≤ Gi ∈ Hbi [Bi] isomorphic to i via the order-preserving bijection from [bi] to Bi. There are at Gmost (d + 1)n ways toG do this. |x| |x| n |x| 5. For all relations R(x) in and a [n] ((A i=1 Bi ), let = R(a). There is only one way to do this givenL our∈ previous\ choices.∪ G | ¬ S This yields the following upper bound (recall c, w, ,d are all constants). |L| r (7) nc(w + 1)nw2|L|w knnn(d + 1)n = nn(1+o(1)). |Hn| ≤

We now consider how many times each n was counted. Fix n, and assume G G ∈ H G ∈ H G is constructed from the sets D = C (step 1), A (step 2), and the sequences (b1,...,bn), (B1,...,Bn), and ( 1,..., n) (steps 3, 4 and 5 respectively). Let 1,..., d enumerate all the distinct elementsG ofG k , and for each i [d], let J =Nj [nN]: = ∪i=1Hi ∈ i { ∈ Gj Ni} and set ai = Ji . Then for any permutation σ :[n] [n] satisfying σ(Ji) = Ji for each i [d], is also| | generated by making the same choices→ in steps 1 and 2, while in steps 3-5 ∈ G choosing the sequences (b1,...,bn), (Bσ(1),...,Bσ(n)), and ( 1,..., n). So is counted at d G Gd G least a1! ad! times. Observe n w n A = i=1 Ni ai k i=1 ai. Combining this inequality··· with Fact 3.5, we obtain− ≤ −| | | | ≤ P P d n−w d n w d n w k a ! a ! a /d ! − ! − nn/k−o(n), 1 ··· d ≥ i ≥ kd ≥ kd ≥ i=1  X         JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 17 where the last inequality is because n is large and w,c,k,d are constants. Therefore each is counted at least nn/k−o(1) many times. Combining this with (7) yields that G n(1+o(1)) −n/k+o(n) n(1− 1 +o(1)) n n = n k .  |Hn| ≤ Note that by Lemma 3.6, we now understand the speed of hereditary properties with finite components. The next two lemmas will help us understand the case of a totally bounded property with infinite components. Specifically, they show that given a totally bounded , if has an infinite component, then by deleting elements, we can find a substructureM of M with infinitely many components of size k for arbitrarily large finite k. In the proof of TheoremM 3.9 we will combine this with Lemma 3.4 to show that if a totally n(1−o(1)) bounded hereditary -property has infinite components, then n n . We will use the followingL notionH of distance in an -structure |H. Given| ≥ a, b M, define L M ∈ the distance from a to b in , dM(a, b), to be 0 if a = b, to be if no path exists between a and b in , and otherwiseM to be the minimum length of a path∞ from a to b in . Given a A, andMi N, define M ∈ ∈ BM(a) := e M : d (a, e) i . i { ∈ M ≤ } M M ′ Then for X A and i N, set Bi (X) = a∈X Bi (a). Observe that if and ′ ⊆ ∈ M ⊆ M a, b M , then dM(a, b) dM′ (a, b). ∈ ≤ S Lemma 3.7. Suppose t 1 is an integer, and has maximum arity r 2. Assume is an -structure which contains≥ an infinite connectedL set A. Then for any≥ a A, thereM is t t′ L tr and a connected set A′ BM(a) with A′ = t′. ∈ ≤ ≤ ⊆ t | | Proof. Fix a A. Since A is connected and infinite, there is a relation ψ (x ), and a A|x1| ∈ 1 1 1 ∈ such that ψ1(a1) and a a1. Suppose 1 i < t and we have chosen a1,..., ai such that ( a ) ... ( a ) is a connected∈ subset≤ of A, and i ( a ) ... ( a ) ir. Since A ∪ 1 ∪ ∪ ∪ i ≤| ∪ 1 ∪ ∪ ∪ i | ≤ is infinite and connected, there is some a A|xi+1| and a relation ψ (x ), such that i+1 ∈ i+1 i+1 M = ψi+1(ai+1), ( ai+1) (( a1) ... ( ai)) = , and ( ai+1) (( a1) ... ( ai)) = . | ∪ ∩ ∪ ∪ ∪ ∪ 6 ∅ ∪ ′ \ ∪ ∪ ∪ ∪ 6 ∅ Note i +1 ( a1) ... ( ai+1) (i +1)r. After t steps, A := ( a1) ... ( at) will be connected≤| with∪ t∪ A∪′ ∪tr. By| ≤ construction, A′ BM(a). ∪ ∪ ∪ ∪  ≤| | ≤ ⊆ t Lemma 3.8. Suppose k, t 1 are integers, and has maximum arity r 2. Assume is a totally k-bounded -structure,≥ and containsL an infinite component.≥ Then there M ′ L ′ M ′ is t t tr and a substructure L so that contains infinitely many distinct components≤ ≤ of size t′. M ⊆ M M Proof. Let A be an infinite component of . Observe that since is totally k-bounded, M M M M we have that for any finite X M and any s N, Bs (X) is finite. Let D = C . Then BM(D) is finite, so [A BM⊆(D)] has finitely∈ many components. One of them must be 1 M \ 1 infinite, call this A0. Since A is an infinite component, and since BM(X) is finite for all s N and finite 0 s ∈ X M, there exists a set ai : i N A0 such that for each i = j, dM(ai, aj) > 2t+1. By ⊆ { ∈ } ⊆ 6 M Lemma 3.7, we may choose for each i N a connected set Ci Bt (ai) with t Ci tr. Note that by construction, for all i ∈N, BM(C ) (D ⊆ C )= . ≤| | ≤ ∈ 1 i ∩ ∪ j∈N\{i} j ∅ S JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 18

′ ′ Let := [D i∈N Ci]. Fix i N. We show Ci is a component of . Clearly M M ∪ ′ ∈ M Ci is connected in . Suppose towards a contradiction there is c Ci connected to ′ MS ′ ∈ some a M Ci by a finite path b1,..., bs in . Then for some 1 u s, we have ∈ \ ′ MM′ ≤ ≤ bu Ci = and bu (M Ci) = . But now B1 (Ci) (D j∈N\{j} Cj) = , which is ∩ 6 ∅ ∩ M′\ 6 ∅ M ∩ ∪ 6 ∅′ a contradiction since B1 (Ci) B1 (Ci). Thus each Ci is a component of . By the ⊆ ′ S M ′ pigeon hole principle, there is some t t tr such that infinitely many Ci have size t . This finishes the proof. ≤ ≤  We can now prove our counting theorem for totally bounded properties. n(1−o(1))n Theorem 3.9. Suppose is totally bounded. Then either is basic, n n , or for some integer k 2H, = nn(1−1/k−o(1)). H |H | ≥ ≥ |Hn| Proof. Clearly if has maximum arity r 1, then is basic. So assume has maximum L ≤ H L arity r 2. Suppose has infinite components. Then there is = TH with an infinite component.≥ Lemma 3.8H implies that for all t, there is t t′ tr suchM| that has infinitely ′ n(1−≤1/tr−≤o(1)) H many components of size t . By Lemma 3.4, n n for all t 1, consequently n(1−o(1)) |H | ≥ ≥ n n . |HAssume| ≥ now that has finite components. Then there is an integer m such that for H ′ every = TH, every component of has size at most m and there is a maximal m m such thatM| contains infinitely manyM components of size m′. By Lemma 3.6, if m′ ≤= 1 ′ then is basic.H Otherwise m′ 2, and Lemma 3.6 implies = nn(1−1/m −o(1)).  H ≥ |Hn| n(1−o(1)) Note Theorem 3.9 shows that if is totally bounded, then n n if and only if has infinite components. GivenHℓ 2, a hereditary -property|H | ≥ is factorial of degree H n(1−1/ℓ−o(1)) ≥ L H ℓ if n = n . The proof of Theorem 3.9 shows that if is totally bounded and factorial|H | of degree ℓ, then ℓ is the largest integer so that has infinitelyH many components of size ℓ. In fact we can show something stronger. H Corollary 3.10. Suppose is a totally bounded hereditary -property with finite compo- nents and ℓ 2 is an integer.H The there are finitely many countablyL infinite -structures ≥ L 1,..., m, each of which is totally bounded with finite components, and a trivial property M M m such that = i=1 age( i). F Further, His factorialF ∪ of degreeM ℓ if and only if ℓ is the largest integer such that for some i [mH], hasS infinitely many components of size ℓ. ∈ Mi Proof. Since has finite components there are integers t 1 and w 0 such that there H ≥ ≥ ′ exists = TH with infinitely many components of size t, but for all = TH, there are atM most | w elements of ′ in a component of size strictly larger thanM t|. Since is finite, this implies there areM only finitely many non-isomorphic -structures with domainL L N and satisfying TH, say 1,..., m. Since each i is totally bounded and has all but w elements in a componentM of sizeM at most t, it isM straightforward to see that T h ( ) ∀ Mi is finitely axiomatizable, in fact by a single sentence, say ψi. Then the following set of sentences is inconsistent. T ψ : i [m] x ... x x = x : n 1 . H ∪ {¬ i ∈ }∪{∃ 1 ∃ n i 6 j ≥ } 1≤i^6=j≤n JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 19

By compactness, there is K such that for all = T of size at least K, = ψ for some M| H M| i i [m] (thus if is also finite, then age( i)). Let be the property consisting ∈ M M ∈ M m F of the elements in of size at most K. Then = i=1 age( i). For all ℓ 2, the proof of Theorem 3.9H shows that is factorialH of degreeF ∪ ℓ if andM only if ℓ is the≥ largest integer such that one of the hasH infinitely many componentsS of size ℓ.  Mi 4. A dividing line: mutual algebraicity This section contains the remaining ingredients needed for Theorem 1.3. We proceed by partitioning hereditary properties based on the dividing line of mutual algebraicity (see Subsection 4.1 for precise definitions). The idea is that mutually algebraic properties are “well behaved,” allowing a detailed analysis of their structure and speeds, whereas non-mutually algebraic properties have “bad behavior” implying a relatively fast speed. Specifically, in Subsection 4.2, we consider the case where is mutually algebraic. We use structural implications of this assumption to prove the remainingH counting dichotomies. n(1−o(1)) n(1−1/k−o(1)) Namely, either n n , n = n for some integer k 2, or is basic, in which case, by|H Section| ≥ 2, the|H speed| of is asymptotically equal to a≥ sum ofH the form k n H i=1 pi(n)i for finitely many rational polynomials p1,...,pk. The proofs in Section 4.2 rely on Section 3 along with the fact that a mutually algebraic property is always controlled Pby finitely many totally bounded properties (see Subsection 4.2 for details). By contrast, in Subsection 4.3, we show that for any finite relational language , if n(1−o(1)) L H is a non-mutually algebraic hereditary -property , then n n . To prove this, we require a model theoretic result,L Theorem 4.19,H which|H relies| ≥ on results from [19]. This theorem describes some properties of large, in fact uncountable, models of TH. This allows us to show there is an uncountable model of TH which has many distinct finite substructures, yielding the desired lower bound on n . Our strategy can be seen as a generalization of the|H strategy| employed by Balogh, Bol- lob´as, and Weinreich in the graph case [6]. However, executing this strategy is significantly more complicated when dealing with relations of arity larger than 2. The crucial new ingredient in our proof, Theorem 4.19, required ideas from stability theory. 4.1. Preliminaries. In this subsection we give the relevant background on mutually al- gebraic properties. We begin with the basic definitions, first introduced in [21].

Definition 4.1. Given a formula ϕ(x) = ϕ(x1,...,xs) and an -structure , ϕ(x) is k-mutually algebraic in if for every partition [s]= I J into nonemptyL setsMI and J, M ∪ = x

(2) There is a formula, θ(x; y), which is a boolean combination of elements of ∆, such that = x(ψ(x) θ(x; a)). M| ∀ ↔ In the definition above, there is no bound on the quantifier complexity of either ϕ or of the formulas in ∆. However, detecting whether or not a structure is mutually algebraic can be seen by looking at quantifier-free formulas. In fact, as we are working in a finite language without function symbols, we have the following characterization. L Lemma 4.3. An -structure is mutually algebraic if and only if for some integers s,k 0, there is aL finite set ∆M = ∆(x, y) of quantifier-free -formulas with y = s and parameters≥ a M s such that the following hold. L | | ∈ (1) For every ϕ(x′, y) ∆, ϕ(x′, a) is k-mutually algebraic in (here, x′ x is a subsequence of x, possibly∈ varying with ϕ ∆); and M ⊆ ′ ∈ ′ (2) For every relation symbol R(x ) of , there is a formula δR(x , y), which is a boolean combination of elements of ∆, suchL that = x′(R(x′) δ (x′, a)). M| ∀ ↔ R Proof. First, assume is mutually algebraic. By Proposition 4.1 of [20], every relation is equivalent in to aM boolean combination of quantifier-free mutually algebraic formulas. As there are onlyM finitely many relations in , we can choose a finite set ∆ of quantifier-free formulas, and a uniform finite k, so that eachL relation of is equivalent in to a boolean combination of elements of ∆, and such that every elementL of ∆ is k-mutuallyM algebraic in . MConversely, suppose there exist s,k N and ∆(x; y), a set of quantifier-free -formulas with y = s, such that (1) and (2) hold.∈ Let MA∗( ) denote the set of all formulasL θ(x; a), where| a| is a tuple of parameters from M, with theM property that θ(x; a) is equivalent in to a boolean combination of mutually algebraic formulas. By assumption, every relationM of is in MA∗( ). Clearly MA∗( ) is closed under substituting constants for variables, andL under takingM boolean combinations.M It is closed under existential quantification by Proposition 2.7 of [21]. It follows that is mutually algebraic.  M Definition 4.4. We say a (possibly incomplete) theory T is mutually algebraic if every = T is mutually algebraic. A hereditary -property is mutually algebraic if TH is Mmutually | algebraic. L H Observe that every totally bounded -structure is automatically mutually algebraic (just take ∆ in Lemma 4.3 to be the set ofL all atomic formulas). We will see that relative to an appropriate change of language, the converse holds as well. In what follows, a totally bounded frame, defined precisely below, is an -formula encoding conditions (1) and (2) of Lemma 4.3. Given a tuple of variables x and Lx x, letx ˆ denote the tuple obtained from x by deleting x. ∈ ∪ Definition 4.5. A totally bounded frame is a universal -formula θ(y) such that the fol- lowing holds. There exists k N, a finite set ∆(x, y) of L-formulas, and for each relation ′ ∈ ′ L R(x ) , a corresponding formula δR(x ; y), which is a boolean combination of elements from ∆(∈Lx; y), so that JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 21

θ(y) x ≤kxϕˆ (x, x,ˆ y) x′[R(x′) δ (x′, y)] . ⊢ ∀ ∃ ∧ ∀ ↔ R ϕ∈∆ x∈∪x ! R∈L ! ^ ^ ^ The following Lemma amounts to simply unpacking the definitions, with (2) (3) being an instance of compactness. ⇒ Lemma 4.6. The following are equivalent for a (possibly incomplete) -theory T : L (1) T is mutually algebraic; (2) For every = T , there is a totally bounded frame θ(y) so that = yθ(y); and M| M| ∃ (3) There is a finite set θj(yj):1 j m of totally bounded frames such that m { ≤ ≤ } T y θ (y ). ⊢ j=1 ∃ j j j 4.2. CountingW dichotomies for mutually algebraic properties. In this subsection we analyze the possible speeds of mutually algebraic hereditary -properties. The main idea is that, via totally bounded frames θ(y), any mutually algebraicL hereditary -property is essentially controlled by finitely many totally bounded properties ∗, althoughL eachH of Hθ these totally bounded properties will have its own language θ. The new language θ will be constructed from in two steps. First, we add s new constantL symbols, where sL= y , to form an intermediateL language (s). Then we replace all of the relation symbols of |(s|) by new relation symbols R (x′) forL ϕ(x′, y) ∆(x, y), thereby forming the languge L. ϕ ∈ Lθ Definition 4.7. Suppose is a hereditary -property and s N. Let (s) := H L ∈ L L ∪ c1,...,cs , where each ci is a new constant symbol not in . For any and { }s L N ∈ H any a N , let a denote the natural expansion of to an (s)-structure obtained by interpreting∈ eachNc as a . Let (s) := : , aN N s . L i i H {Na N ∈ H ∈ } When (s) is clear from context, we will write c to denote (c1,...,cs), the tuple of new constantL symbols. Clearly, if is a hereditary -property, then (s) is a hereditary (s)-property. Moreover, for any integerH n, L H L (s) ns . |Hn|≤|H n| ≤ |Hn| Definition 4.8. Given a totally bounded frame θ(y) with y = s, let | | := (s): = θ(c) . Hθ {N ∈H N | } Observe that for any totally bounded frame θ(y) with y = s, since θ(y) is a universal | | formula, and since (s) is a hereditary (s)-property, we have that θ is also a hereditary (s)-property. H L H L Lemma 4.9. Suppose is a hereditary -property and θ(y) is a totally bounded frame H L H with y = s. For every n N, if n(θ) := n : = yθ(y) , then n(θ) ( )| | ns n(θ). ∈ |{M ∈ H M | ∃ }| ≤ | Hθ n| ≤ · Proof. The inequalities are obvious, since for any n with = yθ(y), there is at least one, and at most ns many a M s, such thatM ∈= H θ(c). M| ∃  ∈ Ma | JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 22

Definition 4.10. Suppose is a hereditary -property and θ(y) is a totally bounded H ′ L ′ frame with data k,s, ∆(x, y), and δR(x , y): R(x ) as in Definition 4.5. ′ {′ ∈ L} Let ∆c(x) := ϕ(x , c): ϕ(x , y) ∆ . • { ∈ } ′ ′ Let θ := constants of (s) Rϕ(x ): ϕ(x , c) ∆c . • L { L }∪{ ∈ } ∗ If ψ is a boolean combination of elements of ∆c, let ψ denote the θ-formula • ′ L ′ obtained as follows: for each ϕ(x ; c) ∆c, replace any instance of ϕ(x ; c) in ψ ′ ∈ with Rϕ(x ; c). Define a function f : θ θ-structures as follows. Given θ, let f( ) • H → {L } f(M) M ∈ H M be the θ-structure with underlying set M, where c = c for all constants L f(M) |x′| c θ, and where Rϕ := b M : = ϕ(b, c) . Let∈L ∗ := f( ): {. ∈ M| } • Hθ { M M ∈ Hθ} M We claim that for any θ, any relation R , and any relation Rϕ θ, R M ∈f(M H) ∈ L ∈ L is 0-definable in f( ) and Rϕ is 0-definable in . Indeed, given a relation R , M M∗ M f(M) ∈ L R = δR( ; c)= δR(f( ); c), and given a relation Rϕ of θ, Rϕ = ϕ( ; c). An easy inductionM on formulas thenM implies that for any ℓ N, L and f( ) haveM exactly the ℓ ∈ M M same 0-definable of M (this also uses the facts that (s) and θ have the same set of constants, and that and f( ) have the same realizationsL of saidL constants). These observations make theM following lemmaM straightforward. Lemma 4.11. Let be a hereditary -property and let θ(y) be a totally bounded frame. Then the following hold.H L ∗ (1) The function f : θ θ is bijection. (2) For any integer nH, f→maps H ( ) onto ( ∗) , so ( ) = ( ∗) . Hθ n Hθ n | Hθ n| | Hθ n| (3) For every θ, and f( ) have the same number of -classes (in the sense of DefinitionM 2.1).∈ H M M ∼ (4) ∗ is a totally bounded, hereditary -property. Hθ Lθ Proof. Proof of (1): That f maps onto ∗ is immediate by the definition of ∗. To Hθ Hθ Hθ see that f is injective, suppose , θ and f( ) = f( ). Then clearly, M = N, and cM = cf(M) = cf(N ) = cN forM eachN constant ∈ H symbolM c (Ns). Fix any relation symbol R(x′) (s). Since the relation symbols in (s) are the∈L same as in , R(x′) . Since , ∈= Lθ(c), we have L L ∈ L M N | = x′(R(x′) δ (x′; c)) and = x′(R(x′) δ (x′, c)). M| ∀ ↔ R N | ∀ ↔ R M |x′| |x′| ∗ Thus, R = b M : = δR(b; c) = b M : f( ) = δR(b) , and dually, N |{x′| ∈ M | }|x′| { ∈ ∗ M | } R = b N : = δR(b; c) = b N : f( ) = δR(b) . Since f( ) = f( ), we ∗{ ∈ N |∗ } { ∈ M NN | } M N have δR(f( ); c) = δR(f( ); c). Thus, R = R , so the (s)-structures and are equal. M N L M N Proof of (2): This follows immediately from (1), since for all θ, has underlying set [n] if and only if f( ) has underlying set [n]. M ∈ H M Proof of (3): This followsM from the fact that for every power ℓ, the subsets of M ℓ defined by quantifier-free (s)-formulas in are the same as those defined by quantifier-free -formulas in f( L) (see the remarksM following Definition 4.10). Lθ M JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 23

∗ Proof of (4): It is clear that θ is closed under isomorphism, since θ is. To see that ∗ H∗ ∗ ∗ ∗ H ∗ θ is hereditary, choose any θ and let be an θ-substructure of . H M ∈ H∗ N ⊆ M L M Let N denote the underlying set of . We want to show that there is some θ with ∗ ∗ N ∗ N ∈ H f( )= . By definition of θ, there is some θ so that = f( ). Let be theN (s)-substructureN of withH underlying set NM(this ∈ H is possible,M since forM each constantN L M f(M) MN ∗ c of (s), c = c = c N). As θ is hereditary by Lemma 4.9, θ, so f( ) is defined.L We claim that ∗∈= f( ).H Clearly, ∗ and have the sameN underlying∈ H set,N N N f(N ) NN M N f(M) N ∗ N. For any constant symbol c of θ, c = c = c = c = c , with the first and third equalities arising by the definitionL of f and the second and fourth by the definition of being a substructure. Now choose any relation symbol R (x′) . Say x′ = ℓ. Then ϕ ∈Lθ | | ∗ RN = Rf(M) N ℓ = ϕM N ℓ = ϕN = Rf(N ), ϕ ϕ ∩ ∩ ϕ ∗ where the first equality is from being an θ-substructure of f( ) and the underlying sets of , ∗ both being N, theN second andL fourth equalities are fromM the definition of f, and theN thirdN equality is from being an (s)-substructure of . Thus, ∗ = f( ), so ∗ ∗ N L∗ M N N θ. Therefore, we have shown that θ is a hereditary θ-property. N That∈ H ∗ is totally bounded follows fromH the fact that for everyL , every ϕ(x′, c) Hθ M ∈ Hθ ∈ ∆c is k-mutually algebraic in (since θ(y) is a totally bounded frame), hence every R is k-mutually algebraicM in f( ).  ϕ ∈Lθ M We combine Lemmas 4.6 and 4.11 to get a decomposition of any mutually algebraic property . H Proposition 4.12. Suppose is a mutually algebraic hereditary -property. Then there are positive integers s and m,H such that for each j [m], there is a finiteL relational language ∈ , a totally bounded hereditary -property , and a map π : satisfying: Lj Lj Hj j Hj → H (1) For every j, the following hold. (a) andMπ ∈(H ) have the same universee M; and e M j M (b) the numbere of -classes of πj( ) is at most the number of -classes of . ∼ M s ∼ M (2) For every integer n, the restriction of πj to ( j)n is at most n -to-one. m H (3) = j=1 πj( ): j . H { M M ∈ H } e Proof. As T is mutually algebraic, Lemma 4.6 implies there exists a set θ (y ): j [m] HS e j j of totally bounded frames such that for every , there is some{j [m] so∈ that} M ∈ H ∈ = y θ (y ). Set s := max y : j [m] . For each j [m], let := , := ∗ , M| ∃ j j j {| j| ∈ } ∈ Lj Lθj Hj Hθj and let f : be as in Definition 4.10 applied to θ (y ). Note that by Lemma 4.11, j Hθj → Hj j j each is a totally bounded hereditary -property. e Hj Lj For each j [m],e set := : = y θ (y ) and define a map π : ∈ Hj {M∈H M| ∃ j j j } j Hj → Hj as follows:e given , let π ( ) be the -reduct of the ( y )-structure, f −1( ) M ∈ Hj j M L L | j| j M (note f −1( ) is well defined since f is injective). e j M j Then (1a) holds by definitione of πj, and (1b) holds by Lemma 4.11(3) and the fact that, in general, the number of -classes of a structure is non-increasing when taking reducts. ∼ JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 24

Property (2) follows from Lemmas 4.9 and 4.11(2). For (3), it suffices to show that for each j [m], = π ( ): (since = m ). To this end, fix j [m]. We ∈ Hj { j M M ∈ Hj} H j=1 Hj ∈ show first that π ( ): . Suppose . By definition of , there Hj ⊆ { j M M ∈ Hj} SN ∈ Hj Hj exists a N |yj | such that = θ (ae). Note . Let ∗ = f ( ) . Since f ∈ N | j Na ∈ Hθj N j Na ∈ Hj j is a bijection (Lemma 4.11), f −1( ∗)=e f −1(f ( )) = . Clearly the -reduct of is j N j j Na Na L Na , and thus π ( ∗)= . This shows π ( ): . e N j N N N ∈{ j M M ∈ Hj} We now show j πj( ): j . Suppose πj( ): j . Let ∗ H ⊇ { M M∗ ∈ H } N ∈{e M ′ M− ∈1 H ∗} j be such that = πj( ), i.e., is the -reduct of := fj ( ). By definitionN ∈ H of f , ′ N. By definitionN e of N , the L-reduct of N′ must beN ine , so j N ∈ Hθj Hθj L N Hj je.  N ∈ H We now combine the results of Sections 2 and 3 to prove counting dichotomies for the speed of a mutually algebraic property. We do this by characterizing their speeds in terms of the speeds of totally bounded properties. Theorem 4.13. Suppose is mutually algebraic. Then one of the following holds: is basic, = n(1−1/ℓ−o(1))Hn for some ℓ 2, or n(1−o(1))n. More specifically, letH |Hn| ≥ |Hn| ≥ : j [m] be as in Proposition 4.12. Then one of the following holds: {Hj ∈ } (a) For some j [m], has infinite components. In this case, nn(1−o(1))n. ∈ Hj |Hn| ≥ (b)e For every j [m], has finite components, and ℓ 2 is maximal such that for some ∈ Hj ≥ j [m], ∗ has infinitelye many components of size ℓ. In this case, = nn(1−1/ℓ−o(1)). ∈ Hj |Hn| (c) For every j [m], e is basic. In this case, is basic. ∈ Hj H Proof. Fix m, s N, and , , π : j [m] be as in Proposition 4.12. For each j [m], ∈ e {Lj Hj j ∈ } ∈ let π ( )= π ( ): . We split into cases depending on the complexity of the j Hj { j M M ∈ Hj} totally bounded properties .e Hj Supposee first that for each je [m], is basic. Then there is K N such that for each ∈ Hj ∈ j [m], every element of ej has at most K distinct -classes. By Proposition 4.12(1b), ∈ H e ∼ m every πj( ) has at most K distinct -classes. Since = j=1 πj( j), this implies is basic as well.M e ∼ H H H S Suppose now that for some j [m], j has infinite components. Thene by Theorem 3.9, ∈ H ( ) nn(1−o(1)), so by Proposition 4.12(2) (π (( ) ) n−s nn(1−o(1)) = nn(1−o(1)). | Hj n| ≥ | j Hj n | ≥ · Thus, nn(1−o(1)), since π ( ) e . |Hn| ≥ j Hj ⊆ H eWe are left with the case where J := j [m]:e is not basic = and for each { ∈ Hj } 6 ∅ j [m], has finite components.e For each j J, let w(j) 2 be the maximum integer ∈ Hj ∈ ≥ such that some element of j has infinitely many componentse of size w(j). By Theorem n(1−1/w(j)−o(1))H 3.9, ( j)en = n . Thus if ℓ = max w(j): j [m] , these observations and Proposition| H | 4.12 imply e { ∈ } e n−s nn(1−1/ℓ−o(1)) J nn(1−1/ℓ+o(1)), · ≤ |Hn|≤| | which implies = nn(1−1/ℓ+o(1)), since J m and s are constants.  |Hn| | | ≤ JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 25

Note that Theorem 4.13 together with Corollary 3.10 give us a strong structural un- derstanding of the properties in the factorial range, although we are required to consider properties in other languages. In forthcoming work, the authors consider characterizations of these properties in terms of the original language, in analogy to the structural charac- terizations of the factorial range for graph properties from [6]. This work also shows the gap between the factorial and penultimate range is directly related to cellularity, a notion with several interesting model theoretic formulations (see for instance [22, 23, 28]).

4.3. A lower bound for non-mutually algebraic hereditary classes. The goal of this subsection is to prove Proposition 4.27, which shows that if a hereditary -property is not mutually algebraic, then n(1−o(1))n. In order to do this, we needL to introduceH |Hn| ≥ concepts and quote results from [19] that describe the structure of large models of TH. Throughout this subsection, assume that is a finite relational language where every atomic formula has free variables among z,L with z = r. In a prior version [18] of this article, there was| | a gap in the proof of Proposition 4.27 (Proposition 4.10 there). Remedying this required additional model theoretic results, namely Lemma 4.21 and Proposition 4.25. The interested reader without model theo- retic training may wish to also refer to [18], since the statements of the results there are still correct and use less model theoretic terminology. Definition 4.14. Suppose is a (possibly infinite) -structure, A M, and x is a M L ⊆ subsequence of z. For b M |x|, ∈ qftp(b/A)= quantifier-free formulas θ(x, a): = θ(b, a) and a A { M| ∪ ⊆ } A complete quantifier-free type p(x) over A is anything of the form qftp(b/A), where b N |x| ∈ for some -structure . We let Sx(A) denote the set of complete quantifier-free types over A inL the variablesNx ⊇M. In model theory, it is more common to work with the notion of tp(b/A), which denotes the set of all formulas (including those with quantifiers) over A satisfied by b. However, as we will be passing to finite substructures, we work exclusively with quantifier-free types. Thus, any reference to “types” from here on out refers to quantifier-free types. Note that whenever A B M, there is a natural projection from Sx(B) onto Sx(A) given by restriction, i.e. given⊆ ⊆p S (B), let ∈ x p↾ := θ(x, a) p : a A . A { ∈ ∪ ⊆ } An easy induction on the complexity of quantifier-free formulas shows that for any two |y| distinct p, q Sx(A), there is some atomic -formula α(x, y) and some a A such that α(x, a) is in∈ the symmetric difference p q.L Iterating this gives a bound∈ on the size of a separating family for finitely many types.△ Lemma 4.15. Suppose is any -structure. For any subset A M and any x z, if M L ⊆ ⊆ pi(x): i [m] Sx(A) are distinct, then there is B A, such that B mr and such {that p ↾ ∈: i }[m ⊆] are pairwise distinct. ⊆ | | ≤ { i B ∈ } JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 26

Proof. Given such a set of types, pi(x): i [m] , we claim by induction on 0 j m that there is B A of size at most{ jr such∈ that } ≤ ≤ j ⊆ p ↾ : i [m] j, |{ i Bj ∈ }| ≥ which suffices to prove the Lemma. For j = 0, the claim is trivially by taking B0 = . So assume 0 j < m, and suppose by induction that B is chosen so that B jr∅ ≤ j | j| ≤ and pi↾Bj : i [m] j. Let ℓ := pi↾Bj : i [m] . If ℓ j + 1, then taking |{ ∈ }| ≥ |{ ∈ }| ≥ ′ Bj+1 = Bj suffices. However, if ℓ = j, then as j < m, there are distinct i, i [m] such that ′ ′ ∈ ′ pi↾Bj = pi ↾Bj . As pi = pi , by the observation above, there is an atomic α(x, a) pi pi . Setting B := B 6 a then suffices (note B B + r (j + 1)r). ∈ △  j+1 j ∪ {∪ } | j+1|≤| j| ≤ Definition 4.16. Suppose is an -structure. An infinite array in is any set of the form d : i N M k forM some k L1, such that ( d ) ( d )= forM distinct i, j N. { i ∈ } ⊆ ≥ ∪ i ∩ ∪ j ∅ ∈ Given A M and p Sx(A), we say p supports an infinite array in there is an infinite array⊆ of realizations∈ of p in . M M 2 Definition 4.17. An -structure is 1-saturated if, for every A U, for every x z, and forL every p(x) U S (ℵA), realizes p, i.e., there is b U |x| such⊆ that ⊆ ∈ x U ∈ = θ(b, a) for every θ(x, a) p. U | ∈ Suppose is 1-saturated. A type p Sx(U) is called a global type. Such types p are typically notU realizedℵ in , but for any countable∈ set A U, the restriction p A is realized in . In [19], the authorsU identify three important classes⊆ of global types. | U Definition 4.18. Suppose is -saturated and x z. U ℵ1 ⊆ Supp ( ) := p S (U) : for every countable A U, there is b (U A)|x| realizing p A . • x U { ∈ x ⊆ ∈ \ | } QMA ( )= p Supp ( ): p contains a mutually algebraic formula of the form θ(x, a) . • x U { ∈ x U } A type p Suppx( ) is array isolated if there is some θ(x, a) p such that p is the •unique element∈ of SuppU ( ) containing θ(x; a). ∈ x U Global types p Supp ( ) are called supportive types. This is because an easy com- ∈ x U pactness argument shows that for a global type p, p Suppx( ) if and only if for every countable A U, p A supports an infinite array in .∈ U In Theorem⊆ 6.1 of| [19], the authors give several equivalentsU of mutual algebraicity in a finite, relational language.

Theorem 4.19 (Theorem 6.1 of [19]). Suppose is an 1-saturated -structure. Then the following are equivalent. U ℵ L (1) T h( ) is mutually algebraic; (2) ForU all x z, Supp ( ) is finite; ⊆ x U (3) For all x z, QMAx( ) is finite; (4) For all x ⊆ z, every pU Supp ( ) is array isolated. ⊆ ∈ x U 2This notion usually refers to realizations of types involving quantifiers, but here we consider only quantifier-free types. JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 27

A crucial idea in this section will be, given a non-mutually algebraic hereditary property , to consider the shortest x z for which Clause (3) of Theorem 4.19 fails in some - H ⊆ ℵ1 saturated = TH (e.g. this will occur in the proof of Proposition 4.25). In a related vein, our next lemma,U | Lemma 4.21, considers what one can deduce about types in the variables x, when every proper subtuple x′ ( x satisfies Clause (3) above. To state Lemma 4.21, we first require a definition and some further results from [19].

Definition 4.20. Suppose is an -saturated -structure and p(x) Supp ( ) and U ℵ1 L ∈ x U q(y) Suppy( ) are array isolated, global types in disjoint variables x, y z. The free product∈ p q Uis defined to be the set of formulas θ(x, y; a), such that for some⊆ countable ⊗ |x| |y| with a M, some c U realizing p↾M , and some d U realizing q↾Mc, it holdsM ≺ thatU =∪ θ(⊆c, d; a). ∈ ∈ U | In [19], the authors showed that in the notation of Definition 4.20, p q Supp ( ), ⊗ ∈ xy U and moreover, θ(x, y, a) p q if and only if = θ(c, d, a) for every countable ∈ ⊗|x| U | |y| M  U with a M, for every c U realizing p↾M , and for every dd U realizing q↾Mc. We∪ are⊆ now ready to state∈ Lemma 4.21. Its proof arises from∈ simply relativizing the proof of Proposition 5.9 of [19] to a subsequences x z with only finitely many supportive types. ⊆

Lemma 4.21 (cf. Proposition 5.9 of [19]). Let be an 1-saturated -structure. Suppose U ℵ ′ L x z is a non-empty subtuple, and QMAx′ ( ) is finite for all x ( x. Then the following hold.⊆ U ′ (1) For all x ( x, every p Suppx′ ( ) is a free product of at most r types from ′′ ′ ∈ U QMA ′′ ( ): x x . In particular Supp ′ ( ) is finite. { x U ⊆ } x U (2)S Every p Suppx( ) QMAx( ) is a free product of at most r types from QMAx′ ( ): x′ ( x .∈ Thus, SuppU \ ( ) QMAU ( ) is finite as well. { U } x U \ x U S Proof. For (1), this is a direct consequence of the proof of Proposition 5.9 of [19]. We now show (2). Choose p Suppx( ) QMAx( ), and let be any countable submodel. Choose a realization∈ c of p↾U \in , andU fix a maximalM  U mutually algebraic M U decomposition c = c1 cs of c (i.e. for each 1 i s, ci satisfies a quantifier-free mutually algebraic formula∧···∧ with parameters from M,≤ and≤s is as small as possible). Since qftp(c/M) is not mutually algebraic, s> 1. For each j, let qj be the global type extending qftp(cj/M). Then run the argument from the proof of Proposition 5.9 to conclude that if p = q1 qs, then qftp(c/M) would contain a mutually algebraic formula θ(x, m), contradicting6 ⊗···⊗p QMA ( ).  6∈ x U Observe that when x = 1, Lemma 4.21 (1) is vacuous, and (2) is immediate (since | | in that case, Suppx( ) = QMAx( )). Further, we point out that if T h( ) is mutually algebraic, then LemmaU 4.21 followsU immediately from Proposition 5.9 and TheoremU 6.1 of [19]. JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 28

With the technical machinery above, our next step is to describe an indiscernible grid (Definition 4.23 below) and show that if is any non-mutually algebraic hereditary prop- H erty, then there is an indiscernible grid = TH (Proposition 4.25 below). From this , we will extract a family of finite substructuresN | that we will will use to prove PropositionN 4.27. Definition 4.22. Suppose is an infinite -structure, x z is a non-empty subtuple, and P = p (x): i N is aM set of distinct typesL from S (M⊆). A grid for and P is an { i ∈ } x M -structure whose universe has the form N = M bi,q : i N, q Q , such that Lthe followingN holds. ∪ {∪ ∈ ∈ } S (1) For each i N and q Q, b (N M)s, and b = s, where s = x . ∈ ∈ i,q ∈ \ | ∪ i,q| | | (2) For each i N, b : q Q is a set of realizations of p (x). ∈ { i,q ∈ } i (3) Each b N M is contained in exactly one b . ∈ \ i,q Suppose is a grid for and P , in the notation of Definition 4.22. Observe that N M ′ ′ (1) implies that for each i N, and every x = x x, we have x = x pi(x). Given σ Aut(Q, ), note that σ ∈induces a permutation6 σ∈∗ on N as follows:6 σ∗(∈m)= m for all ∈ ≤ m M and σ∗(b )= b . ∈ i,q i,σ(q) Definition 4.23. Suppose is a grid for and P , in the notation of Definition 4.22. N M (1) We say is an indiscernible grid for and P if for every σ Aut(Q, ), σ∗ is an -automorphismN of . M ∈ ≤ (2) AssumingL is an indiscernibleN grid for and P , a hybrid tuple is an s-tuple N M d (N M)s such that d is not a permutation of any b . A hybrid type is an ∈ \ i,q element of Sx(M) of the form qftp(d/M), for some hybrid tuple d. Remark 4.24. Note that if s = 1, then there are no hybrids. In particular, if were binary, then for any grid as in Definition 4.22, there would be no hybrid tuples, andL consequently, no hybrid types. This is part of what makes Proposition 4.27 much less complicated in the binary case. Proposition 4.25. Suppose T is any universal -theory that is not mutually algebraic. Then there are 1 s r, an integer e, a countableL = T , and an infinite set P = p (x): i N ≤S (M≤) with x = s, such that each pM(x) | contains a mutually algebraic { i ∈ } ⊆ x | | i formula θi(x). Moreover: (1) There exists an indiscernible grid for and P such that = T ; and N M N | (2) qftp(d/M): d N s a hybrid tuple e. |{ ∈ }| ≤ Proof. As T is not mutually algebraic, use Theorem 4.19(3) of [19] to choose 1 s r ≤ ≤ least such that there exists x z with x = s, and an 1-saturated = T with infinitely many distinct global types S⊆= p (x|) | QMA ( ):ℵ i N . FixU | such a , x, and { i ∈ x U ∈ } U S = pi(x) QMAx( ): i N . By the minimality of s, for any proper subsequence ′ { ∈ U ∈ } ′ x ( x, there are only finitely many q(x ) QMAx′ ( ). Thus, by eliminating at most ∈ U ′ finitely many types from S, we may assume that for each i N, (x = x ) pi(x) for all distinct x, x′ x. Since each p (x) Supp ( ), (x = m) ∈p for all6 x ∈x and m . ∈ i ∈ x U 6 ∈ i ∈ ∈ U JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 29

Let be any countable, elementary substructure, and for each i N, let pi := pi↾M . ThenM let P U = p (x): i N . ∈ { i ∈ } To prove (1) holds, choose, for each i N, an infinite array d : ℓ N of realizations ∈ { i,ℓ ∈ } of pi(x) in . By the pigeon-hole principle, we may assume, possibly after reindexing, that U ′ ′ ′ di,ℓ and di′,ℓ′ are disjoint unless (i, ℓ)=(i ,ℓ ). Let be a countable elementary M ′ U substructure containing M di,ℓ : i, ℓ N . Visibly, contains a grid for and P , but it might not be indiscernible.∪ { We obtain∈ } an indiscernibleM grid by compactness:M Let ∗ S L be , adjoined with new constant symbols cm : m M ci,q : i N, q Q (each ci,q is anL s-tuple of new constant symbols) and{ let T ∗ be∈ the}∪{∗-theory∈ asserting:∈ } L The elementary diagram of ; • M For each i N, each ci,q realizes pi(x), • ∈ ′ ′ For distinct (i, q), (i , q ) N Q, ci,q and ci′,q′ are disjoint; • For each σ Aut(Q, ),∈σ∗ is× an -automorphism of M c : i N, q Q . • ∈ ≤ L ∪ { i,q ∈ ∈ } Arguing by induction on the number of σ’s mentioned, every finite subset of T ∗ can be S S realized in an ∗-expansion of ′. Let ∗ = T ∗ be any model. For each i N, q Q, L M ∗ M | ∈ ∈ let bi,q be the realization of ci,q in . Set N = M bi,q : i N, q Q , and ∗ = ∗[N]. Finally, let be the M-reduct of ∗. ∪ { ∈ ∈ } N To proveM (2), let Nbe an L-saturated elementaryN S extension.S By the minimality U M ℵ1 of s, for every proper x′ ( x, there are only finitely many q(x′) S ′ (M) that contain ∈ x a mutually algebraic formula and support an infinite array. It follows that QMAx′ ( ) is ′ ′ U finite for each proper x ( x. Hence, := QMA ′ ( ): x ( x is finite as well. Q { x U } We claim that for every hybrid tuple d (N M)s, qftp(d/M) is the restriction to M ∈ \ of a free product of types from . To seeS this, fix d (N M)s that is not contained Q ∈ \ in any b . Clearly, qftp(d/M) supports an infinite array (in fact, contains an infinite i,q N array of realizations of this type), but the indiscernibility demonstrates that qftp(d/M) cannot contain a mutually algebraic formula. Thus, the global extension p of qftp(d/M) is in Suppx( ) QMAx( ). So, by Lemma 4.21(2), p is the free product of at most r global types fromU \. Since U is finite, this shows (2). Q Q  Lemma 4.26. Suppose is a hereditary -property that is not mutually algebraic. Then there are positive integersH s r and e suchL that for every positive integer L, there is ≤ L = TH and quantifier-free formulas ϕi(x, a): i [L] such that NL can be partitioned asN | { ∈ } N = A b : i [L], q Q , L L ∪ {∪ i,q ∈ ∈ } so that the following hold. s (1) For each i [L] and q Q, bi,q NL and bi,q = x = s. (2) A (L +∈e)r + w, where∈ w is∈ the number| ∪ of constants| | | from . | L| ≤ L (3) For each constant c of , cNL A . L ∈ L (4) a = AL. (5)∪ For all i [L], the following hold. ∈ (a) For all q Q, = ϕ (b ; a); and ∈ NL | i i,q JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 30

(b) If d (N )s and = ϕ (d; a), then d is a permutation of some b . ∈ L NL | i i,q

Proof. As TH is not mutually algebraic, Proposition 4.25 implies there exist positive integers s r and e, a countable = TH, an infinite set P = pi(x): i N Sx(M), where x≤= s, and an indiscernibleM grid | for and P , with universe{ ∈ } ⊆ | | N M N = M b : i N, q Q , ∪ {∪ i,q ∈ ∈ } [ such that there are at most e many hybrid types realized in over M. Let qj : j [e] be the hybrid types over M realized in . N { ∈ } N N Let AL be a minimal subset of containing c for every constant c, and such that the restrictions of the types p (x):Mi L + e to A are pairwise distinct. In light of { i ≤ } L Lemma 4.15, such an AL can be found of at most (L + e)r + w. Let be the substructure of with universe N = A b : i [L], q Q . As A NL N L L ∪{ i,q ∈ ∈ } L is finite, every complete quantifier-free type over AL can be described by a single formula. For each i [L], let ϕ (x; a) be the formula describing the restriction p ↾ . Since each ∈ i i AL bi,q realizes pi, we have L = ϕi(bi,q; a) for every q Q. By construction, we now have properties (1)-(3) as wellN as| (4a). ∈ s We just need to verify (4b). To this end, fix d (NL) such that L = ϕi(d; a) for some i [L]. Since p implies x = m for every x x ∈and m M, and sinceN | ϕ (x; a) describes ∈ i 6 ∈ ∈ i p ↾ , we must have d (N A )s. By definition of N and A , this implies d (N M)s. i AL ∈ L \ L L L ∈ \ By our choice of AL, for each j [e], pi↾AL = qj↾AL , so qftp(d/M) / qj : j [e] . Thus s ∈ 6 ∈ { ∈ } d (N M) is not a hybrid tuple, and consequently must be a permutation of b ′ ′ for ∈ \ i ,q some i′ N and q′ Q. Since d N s , we must have i′ [L]. Finally, because i′ [L], ∈ ∈ ∈ L ∈ ∈ d = p ↾ , and p ↾ = p ↾ for all j [L] i , we must have that i = i′.  | i AL i AL 6 j AL ∈ \{ }

Proposition 4.27. For any hereditary -property , if is not mutually algebraic, then n(1−o(1))n. L H H |Hn| ≥ Proof. Assume is a hereditary -property which is not mutually algebraic. Let w denote the number of constantsH of . ApplyL Lemma 4.26 to obtain 1 s r and e. We show r L (1− +1 −o(1))n ≤ ≤ (1−o(1))n that for every integer t 1, n n ts+r . This implies n n . Fix an integer t 1 and≥ choose|H | ≥n tre. We will construct a|H special| ≥ , and then ≥ ≫ G ∈ Hn show there are many distinct elements of n, each isomorphic to . Set L = n−er−w . Let , A , ϕ (x;Ha): i [L] and b : Gi [L], q Q be as in ⌊ st+r ⌋ NL L { i ∈ } { i,q ∈ ∈ } the conclusion of Lemma 4.26. Let B = b : i [L], j [t] . Note that B = Lst, so {∪ i,j ∈ ∈ } | | AL B Lst+(L+e)r +w n. Choose X NL (AL B) so that AL + B + X = n. | Define∪ | ≤ := [A B X≤], and observeS ⊆ that \ ∪ . For each|i | [L|], let| |θ (|x) be G NL L ∪ ∪ G ∈ Hn ∈ i the formula ϕi(x, a) x = a. Note each θi(x) has parameters from AL X, ∧ x∈x,a∈X∪AL 6 ∪ and = t θ (b ). Further, for all d Gs, if = θ (d), then there is j [t] such that G | j=1 i i,j V ∈ G | i ∈ d is a permutation of b . V i,j JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 31

Let θ(x)= L θ (x). Clearly = L t θ(b ). Further, for all d Gs, if = θ(d), i=1 i G | i=1 j=1 ij ∈ G | then d is the permutation of b for some i [L] and j [t]. We now give a procedure for W i,j V V constructing many distinct -structures, each∈ isomorphic∈ to . L G (1) Choose an equipartition = P1,...,PLt of B into Lt pieces, each of size s. For each i [Lt], let p denoteP the{ tuple enumerating} P in increasing order. ∈ i i (2) Choose an equipartition = Q1,...,QL of into L pieces, each of size t. For Qi { i } P each 1 i L, let 1 α <...<α Lt be such that Qi = Pαi ,...,Pαi . ≤ ≤ ≤ 1 t ≤ { 1 t } (3) Let f :[n] [n] be the function which fixes A X pointwise, and such that, P,Q → L ∪ for each 1 i L and 1 j t, fP,Q(bij)= p i . ≤ ≤ ≤ ≤ αj (4) Let P,Q be the -structure with universe [n] so that fP,Q : P,Q is an - isomorphism.G L G → G L We now show that if and ′ are distinct choices from step (1), then for any respective ′ P P ′ choices of and in step (2), we have P,Q = P′,Q′ . Indeed, let = be distinct equipartitionsQ of BQ. Then there is some GP 6 Gwith P / ′. LetPp 6 enumerateP P in ∈ P ∈ P increasing order. Then by construction, there are i [L], j [t], such that p = fP,Q(bij), ′ ∈ ∈ and thus P,Q = θ(p). However, P / implies that no permutation of p can be equal to G | ′ ′ ∈ P fP′,Q′ (bi′j′ ), for any i [L], j [t]. Consequently, P′,Q′ = θ(p). Thus P,Q = P′,Q′ . We now show that for∈ any fixed∈ choice of = PG,...,P| ¬ from step (1),G if 6 G= ′ are P { 1 t} Q 6 Q distinct choices in step (2), then we have P,Q = P,Q′ . Indeed, suppose = Q1,...,Qt ′ ′ ′ G 6 G Q { ′ } and = Q1,...,Qt are distinct equipartitions of . Then there is some 1 i = i t for whichQ {Q Q′ = } , say u Q Q′ . Let p enumerateP P in increasing≤ order.6 ≤ By i ∩ i 6 ∅ ∈ i ∩ i u u ′ ′ ′ ′ construction, pu = fP,Q(bij)= fP,Q (bi j ) for some j, j [t]. Thus P,Q = ϕi(pu; a) while ′ ∈ G | ′ = ϕ ′ (p ; a). Since i = i , ϕ (x; a) ϕ ′ (x; a), so we must have = ′ . GP,Q | i u 6 i ⊢ ¬ i GP,Q 6 GP,Q Thus n is at least the number of equipartitions of [ B ] = [Lst] into Lt pieces, times the number|H | of equipartitions of [Lt] into L pieces. By Lemma| | 3.3 we obtain the following, where n′ = Lst (note n′ s,r,e,w). ≫ ′ ′ ′ ′ (n′)(1−1/s−o(1))n (n′/s)(1−1/t)(n /s) =(n′)(1−1/ts−o(1))n = n(1−1/ts−o(1))n |Hn| ≥ (1−1/ts−o(1)) tsn = n ts+r ( ts − 1 −o(1))n = n ts+r ts+r (1− r+1 −o(1))n = n ts+r .

(1− r+1 −o(1))n (1−o(1))n We have shown that for all t 1, n n ts+r . Consequently, n n . ≥ |H | ≥ |H | ≥ 

5. Proof of Theorem 1.3 and Minimal Properties in Range 1 In this section we bring together what we have shown to prove Theorem 1.3. We then characterize the minimal properties of each speed in range 1. JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 32

Proof of Theorem 1.3. If is basic, then by Theorem 2.4 there are finitely many H k n rational polynomials p1,...,pk such that for all sufficiently large n, n = i=1 pi(x)i , so case (1) holds. So assume is not basic. Observe that by definition,|H this| implies r 2. H n(1−o(1))P ≥ If is also not mutually algebraic, then Theorem 4.27 implies n n and caseH (3) holds. We are left with the case when is mutually algebraic and not≤ basic. |H | By n(1−o(1)) H Theorem 4.13, either n n (so case (3) holds), or there is an integer k 2 such that = nn(1−1/k−o|H(1)) |(case ≥ (2) holds). ≥  |Hn| An immediate corollary of the proof of Theorem 1.3 is the converse of Theorem 2.4.

Corollary 5.1. is basic if and only if there is k 1 and rational polynomials p1,...,pk H k ≥ such that for sufficiently large n, = p (x)in. |Hn| i=1 i Now that we have Corollary 5.1, we canP characterize the minimal properties of each speed in range (1). Suppose is a hereditary -property. A strict subproperty of is any hereditary -property ′ satisfyingH ′ ( .L We say is polynomial if asymptoticallyH L H H H H n = p(n) for some rational polynomial p(x). In this case, the degree of is the degree of|Hp|(x). We say is exponential if its speed is asymptotically equal to a sumH of the form ℓ n H i=1 pi(n)i , where the pi are rational polynomials and ℓ 2. In this case, the degree of is ℓ. A polynomial hereditary -property is minimal≥ if every strict subproperty ofP H is polynomial of strictly smallerL degree. AnH exponential hereditary -property is minimalH if every strict subproperty of is either exponential of strictly smallerL degreeH or polynomial. H Theorem 5.2. Suppose is a non-trivial hereditary -property. H L (1) is a minimal polynomial property of degree k 0 if and only if = age( ) for Hsome countably infinite -structure with one infinite≥ -class and exactlyH k elementsM contained in finite -classes.L ∼ (2) is a minimal exponential∼ property of degree ℓ 2 if and only if = age( ) for someH countably infinite -structure with ℓ infinite≥ -classes and noH finite -classes.M L ∼ ∼ Proof. Fix a hereditary -property which is polynomial of degree k 0 (respectively exponential of degree ℓ L2) and minimal.H By Corollary 5.1, is basic. By≥ Corollary 2.15 ≥ H there are finitely many countably infinite -structures 1,..., m, each with finitely m L M M many -classes, such that = i=1 age( i), where is a trivial hereditary - property.∼ Since is minimal,H weF may ∪ assume M= (sinceF deleting does not changeL H S F ∅ F the asymptotic speed of ). Further, since age( i) is a basic hereditary -property for each i [m], CorollaryH 5.1 and = m ageM( ) implies there is 1 L i m such ∈ H i=1 Mi ≤ ≤ that age( i) is also polynomial of degree k (respectively exponential of degree ℓ). By minimality,M = age( ). Since = Sage( ) is polynomial of degree k (respectively H Mi H Mi exponential of degree ℓ 2), Corollary 2.15 implies i has one infinite -class and exactly k elements in finite -classes≥ (respectively ℓ infiniteM-classes). We now∼ show further, that ∼ ∼ in the case when is exponential of degree ℓ 2, i has no finite -classes. Indeed, suppose it did. LetH ′ be the substructure of ≥obtainedM by deleting the∼ finite -classes. Mi Mi ∼ JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 33

′ Then age( i) is a strict subproperty of which is exponential of degree ℓ by Corollary 2.12, a contradiction.M This takes care of theH forward directions of both (1) and (2). Suppose for the converse that is a countably infinite -structure with one infinite -class and exactly k 0 elementsM contained in a finite L -classes (respectively with ∼ℓ infinite -classes and≥ no finite -classes). By Corollary 2.15,∼ age( ) is polynomial of degree k (respectively∼ exponential∼ of degree ℓ). Suppose by contradictionM there is is a strict subproperty ′ of age( ) which is also polynomial of degree k (respectively exponential of degree ℓ). H M Corollary 2.15 implies there are finitely many countably infinite -structures 1,..., m, each with finitely many -classes, such that ′ = m ageL( ), whereM is a triv-M ∼ H F ∪ i=1 Mi F ial hereditary -property. Again, there must be some i [m] so that age( i) is itself L S∈ M polynomial of degree k (respectively exponential of degree ℓ). By Corollary 2.15, age( i) has one infinite -class and exactly k elements contained in a finite -classes (respectivelyM with ℓ infinite ∼-classes an no finite ones). It is straightforward∼ to check that because ∼ age( i) age( ), we must have that i = T h∀( ). M ⊆ M M | M ′ Since i = T h∀( ), by fact (2) from the end of Section 1.1, there is some = M | M ′ M | ′′ T h( ) with i . By downward L¨owenheim-Skolem, there is a countable M M′′ ⊆ M′ M with i . Our assumptions on the structure of imply that T h( ) is countablyM ⊆ categorical, M ≺ M and thus ′′ is isomorphic to ′′. Consequently,M we haveM shown M M has a substructure isomorphic to i. This along with what we have shown about the structureM of and imply that M must in fact be isomorphic to , contradicting M Mi Mi M that age( i) ( age( ). M M 

6. penultimate range In this section we show that for each r 2 there is a hereditary property of r-uniform hypergraphs whose speed oscillates between≥ speeds close the lower and upper bounds of the penultimate range (case (3) of Theorem 1.4). Our example is a straightforward generaliza- tion of one used in the graph case (see [7]). We include the full proofs for completeness. Throughout this section r 2 is an integer and is the class of finite r-uniform hyper- graphs. We will use different≥ notational conventionsG in this section, as it requires no logic. For this section, a property means a class of finite r-uniform hypergraphs closed under P isomorphism. The speed of a property is the function n n . We denote elements P 7→ |P | V of as pairs G = (V, E) where V is the set of vertices of G and E r is the set of edges.G In this notation, we let v(G) = V and e(G) = E . Given U⊆ V , G[U] is the U | | | ′ | ⊆  hypergraph (U, E r ). Given a hypergraph H = (U, E ), we write H G if H is an ∩ of G, i.e. if U V and H = G[U]. We begin by defining⊆ properties which we will use throughout  the section.⊆ Definition 6.1. For c R≥0, define ∈ c = G : e(G) cv(G) and c = G : H c for all H G . S { ∈ G ≤ } Q { ∈ G ∈ S ⊆ } JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 34

Suppose G = (V, E) is a finite r-uniform hypergraph. The density of G is ρ(G) = e(G)/v(G), and we say G is strictly balanced if for all V ′ ( V , ρ(G[V ′]) < ρ(G). The following theorem, proved by Matushkin in [24], is a generalization to hypergraphs of results about strictly balanced graphs (see [14, 26]). Theorem 6.2 (Matushkin [24]). Suppose r 2 is an integer and c Q≥0. There exists a strictly balanced r-uniform hypergraph with density≥ c if an only if c ∈ 1 or c = k ≥ r−1 1+k(r−1) for some integer k 1. ≥ Given an vertex set V and a partition = P1,...,Pk of V , an r-matching compatible V P { } with is a set E r such that for every e E and 1 i k, e Pi 1, and for P ′ ⊆ ′ ∈ ≤ ≤ | ∩ | ≤ every e = e E, e e = . We say is an equipartition of V if Pi Pj 1 for all 1 i, j 6 k.∈ The following∩  ∅ is a straightforwardP generalization of Theorem|| |−| 16|| in ≤ [27]. ≤ ≤ Proposition 6.3. For any constant c 1 , c = n(r−1)(c+o(1))n = c . ≥ r−1 |Sn| |Qn| c c Proof. For the upper bound bound, note that by definition, for large n, both n and n are bounded above by the following. |Q | |S | ⌊cn⌋ n nr nre cn r cn (cn + 1) = n(r−1)cn(1+o(1)). j ≤ cn ≤ cn j=0  X       c (r−1)cn−o(n) For the lower bound, it suffices to show n n . Assume first c is rational. Then by Theorem 6.2, we can choose a|Q finite,| ≥ strictly balanced r-uniform hypergraph H =(V, E) with density c. Without loss of generality, say V = [t] for some t N>0. Note E = ct and H c. Suppose n t is sufficiently large, and choose an equipartition∈ | | ∈ Q ≫ = W1,...,Wt of [n]. For each e E, choose Ee to be a maximal matching in [n] Pcompatible{ with } and satisfying E ∈ W . Note the number of ways to choose E P e ⊆ x∈e x e is at least ( n/t !)r−1. We claim⌊G :=⌋ ([n], E ) c . FixS X [n]. We show e(G[X]) c X . For each e∈E e ∈ Qn ⊆ ≤ | | 1 i t, let Xi = X Wi and ni = Xi . For each 1 u n, let Vu = i [t]: ni u , and≤ let≤H = H[V ]. Let∩S ℓ = max u :| V | = , and observe≤ ≤ that ℓ n/t{ .∈ Observe≥ that} u u { u 6 ∅} ≤ ⌈ ⌉ X = ℓ v(H ), since | | u=1 u Pℓ ℓ ℓ ℓ X = u V V = u( V V )= V V + (u (u 1)) V = v(H ), | | | u\ u+1| | u|−| u+1| | 1|−| ℓ+1| − − | u| u u=1 u=1 u=2 u=1 X X X X ℓ where the last equality uses that Vℓ+1 = . We now show that e(G[X]) = u=1 e(Hu). For ′ ∅ each 1 u ℓ, let V = Vu Vu+1, and given 1 i1,...,ir ℓ, let ≤ ≤ u \ ≤ ≤ P e(V ′ ,...,V ′ )= a ,...,a E : a V ′ ,...,a V ′ . i1 ir |{{ 1 r} ∈ 1 ∈ i1 r ∈ ir }| Then by construction,

′ ′ e(G[X]) = i1e(Vi1 ,...,Vir ). 1≤i1≤X...≤ir≤ℓX JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 35

′ ′ On the other hand, for each 1 u ℓ, e(Hu)= e(V ,...,V ), so ≤ ≤ u≤i1≤...≤ir≤ℓ i1 ir ℓ ℓ P ′ ′ ′ ′ e(Hu)= e(Vi1 ,...,Vir )= i1e(Vi1 ,...,Vir ). u=1 u=1 X X u≤i1≤X...≤ir≤ℓ 1≤i1≤X...≤ir≤ℓ ℓ Thus e(G[X]) = u=1 e(Hu). Since H is strictly balanced of density c, we know that for each u [ℓ], e(Hu) cv(Hu). Combining these observations yields that ∈ P≤ n ℓ e(G[X]) = e(H ) c v(H )= c X . u ≤ u | | i=1 Xu=ℓ X c Thus G n. Clearly distinct choices for the set Ee : e E yield distinct elements ∈ Q c { ∈ } ([n], e∈E Ee) of n. Since for each e E, the number of ways to choose Ee is at least ( n/t !)r−1, this showsQ that ∈ ⌊ S⌋ r−1 |E| (r−1)ct c n/t ! = n/t ! = n(r−1)cn−o(n). |Qn| ≥ ⌊ ⌋ ⌊ ⌋      ′ Assume now c is irrational. Note that for all c′ c, c c. Thus by the calculations ′ above, for all 1 c′ < c, where c′ Q, we have≤ Q c ⊆ Qn(r−1)(c −o(1))n. Clearly this r−1 ≤ ∈ |Qn| ≥ implies c n(r−1)(c−o(1))n.  |Qn| ≥

Definition 6.4. Given an increasing (possibly finite) sequence ν = (ν1, ν2,...) of natural numbers, let

ν,c = G : if H G and v(H)= ν for some i, then e(H) cν . P { ∈ G ⊆ i ≤ i} Lemma 6.5. Let c 1 , ǫ > 1/c, and ν = (ν ) a sequence of natural numbers with ≥ r−1 i i∈N k = sup ν : i N N . Then { i ∈ } ∈ ∪ {∞} ν,c (r−1)(c+o(1))n ν,c (r−1)(c+o(1))n (1) n n and n = n whenever n = νi for some i N, |P | ≥ |P | r−ǫ ∈ (2) if k < and n is sufficiently large, then n 2n . ∞ |Pν,c| ≥ c c,ν c,ν c (r−1)(c+o(1))n Proof. Note so by Proposition 6.3, n n n . When n = νi Q ⊆ P c ν,c |P c|≥ |Q | ≥ for some i N, then by definition, n n n. Consequently Proposition 6.3 implies c,ν (c∈(r−1)+o(1))n Q ⊆ P ⊆ S n = n . This shows (1) holds. |PAssume| now k < and let (k) = (1,...,k). Note (k),c ν,c, so it suffices to ∞ (k),c n2−ǫ P ⊆ P show that for large enough n, n 2 . Choose δ satisfying ǫ>δ> 1/c and let −δ |P | ≥ p = n . Recall that Gn,p is the random r-uniform hypergraph on vertex set [n], with (k),c edge probability p. We consider the probability G / n , i.e. the probability that n,p ∈ P there is H G with v(H) k and e(H) > cv(H). Given 1 j k and S [n] , ⊆ n,p ≤ ≤ ≤ ∈ j let XS : Gn,p N be the random variable defined by XS(G) = 1 if e(G[S]) > cj. Note → j j j  (r) ( ) i −i cj P(X = 1) r p (1 p)(r) C p for some constant C depending only on S ≤ i=⌈cj⌉ i − ≤ j j P  JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 36 j, r and c. Therefore we have the following. k k n k P(G / (k),c) P(X = 1) C pcj C (n1−δc)j. n,p ∈ Pn ≤ S ≤ j j ≤ j j=1 S∈ [n] j=1   i=1 X X( j ) X X (k),c Since δc > 1, we have 1 δc < 0 and thus P(Gn,p / n ) 0 as n . Thus we may − (k),c ∈ P → →∞ choose n so that P(G / n ) < 1/3 for all n n . 0 n,p ∈ P ≥ 0 Fix any 0 < ǫ0 < 1/6. If n is sufficiently large, P(e(Gn,p) < pN/2) 1/2+ ǫ0, where n ≤ N = r . Combining this with the above, we have shown that for all sufficiently large n, (k),c  P(Gn,p and e(Gn,p) pN/2) 1/2 ǫ0 1/3 > 0. ∈ Pn ≥ ≥ − − (k),c Thus for all sufficiently large n, there exists G = ([n], E) n such that e(G) pN/2. ′ (k),c ′ ∈ P ≥ Since ([n], E ) n for all E E, we have that ∈ P ⊆ n−δ n /2 r−ǫ (k),c 2pN/2 =2 (r) 2n , |Pn | ≥ ≥ where the last inequality is because n is sufficiently large, and ǫ < δ.  We now show that for any c 1/(r 1) and ǫ > 1/c, there is a property whose speed ≥ −r−ǫ oscillates between nnc(r−1)(1−o(1)) and 2n . Theorem 6.6. Let c 1 and ǫ > 1/c. There exists sequences ν = (ν ) and µ = ≥ r−1 i i∈N (µi)i∈N where µi = νi 1 for all i N such that the following hold. ν,c (r−1)(−c+o(1))n ∈ (1) n = n whenever n = νi, |Pν,c| nr−ǫ (2) n 2 whenever n = µi, |P | ≥ r−ǫ (3) n(r−1)(c+o(1))n ν,c < 2n if n = µ . ≤ |P | 6 i Proof. Set ν0 = r + 1. Assume now k 0 and suppose by induction we have chosen ≥ ν,c nr−ǫ ν0,...,νk. Let ν =(ν1,...,νk) and note by Lemma 6.5, n 2 for large enough n. − µr ǫ |P | ≥ Choose µ > ν minimal so that ν,c 2 k+1 and set ν = µ + 1.  k k |Pµk | ≥ k+1 k Proof of Theorem 1.5 Let = R(x ,...,x ) . Given c 1 and ǫ > 1/c, let L { 1 r } ≥ r−1 ν =(νi)i∈N and µ =(µi)i∈N be sequences as in Theorem 6.6. Let Tν,c be the universal theory ν,c of and observe that class of models of Tν,c is a hereditary -property such that for P L H r−ǫ arbitrarily large n, = n(r−1)(c+o(1))n and for arbitrarily large n, 2n .  |Hn| |Hn| ≥ References [1] V. E. Alekseev, Hereditary classes and coding of graphs, Problemy Kibernet. (1982), no. 39, 151–164. MR 694829 [2] Noga Alon, J´ozsef Balogh, B´ela Bollob´as, and Robert Morris, The structure of almost all graphs in a hereditary property, J. Combin. Theory Ser. B 101 (2011), no. 2, 85–110. MR 2763071 (2012d:05316) [3] J´ozsef Balogh, B´ela Bollob´as, and Robert Morris, Hereditary properties of partitions, ordered graphs and ordered hypergraphs, European Journal of Combinatorics 27 (2006), no. 8, 1263 – 1281, Special Issue on Extremal and Probabilistic Combinatorics. [4] J´ozsef Balogh, B´ela Bollob´as, and Robert Morris, Hereditary properties of combinatorial structures: Posets and oriented graphs, Journal of 56 (2007), no. 4, 311–332. JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 37

[5] J´ozsef Balogh, B´ela Bollob´as, and Robert Morris, Hereditary properties of tournaments, the electronic journal of combinatorics 14 (2007), no. 1, 60. [6] J´ozsef Balogh, B´ela Bollob´as, and David Weinreich, The speed of hereditary properties of graphs,J. Combin. Theory Ser. B 79 (2000), no. 2, 131–156. MR 1769217 [7] , The penultimate rate of growth for graph properties, European J. Combin. 22 (2001), no. 3, 277–289. MR 1822715 [8] J´ozsef Balogh, B´ela Bollob´as, and David Weinreich, A jump to the bell number for hereditary graph properties, Journal of Combinatorial Theory, Series B 95 (2005), no. 1, 29 – 48. [9] J´ozsef Balogh, Bhargav Narayanan, and Jozef Skokan, The number of hypergraphs without linear cycles, arXiv:1706.01207 [math.CO], 2017. [10] B´ela Bollob´as and Andrew Thomason, Projections of bodies and hereditary properties of hypergraphs, Bull. London Math. Soc. 27 (1995), no. 5, 417–424. MR 1338683 [11] B´ela Bollob´as and Andrew Thomason, Hereditary and monotone properties of graphs, The mathemat- ics of Paul Erd¨os, II, Algorithms Combin., vol. 14, Springer, Berlin, 1997, pp. 70–78. MR 1425205 [12] Macpherson H. D., Growth rates in infinite graphs and permutation groups, Proceedings of the London Mathematical Society s3-51, no. 2, 285–294. [13] V. Falgas-Ravry, K. O’Connell, J. Str¨omberg, and A. Uzzell, Multicolour containers and the entropy of decorated graph limits, arXiv:1607.08152 [math.CO], 2016. [14] E. Gy¨ori, B. Rothschild, and A. Ruci´nski, Every balanced graph is contained in a sparsest possible balanced graph, Math. Proc. Cambridge Phil. Soc. 98 (1985), 397–401. [15] I. M. Hodkinson and H. D. Macpherson, Relational structures determined by their finite induced substructures, Journal of Symbolic Logic 53 (1988), no. 1, 222-230. [16] T. Kaizer and M. Klazar, On growth rates of closed permutation classes, Electron. J. Combin. 9 (2002-3), no. 2, Research Paper 10, 20 pp. (electronic). [17] Martin Klazar and Adam Marcus, Extensions of the linear bound in the f¨uredi–hajnal conjecture, Advances in Applied Mathematics 38 (2007), no. 2, 258 – 266. [18] M. C. Laskowski and C. Terry, Jumps in speeds of hereditary properties in finite relational languages, arXiv:1803.10575 (v3) [math.CO], 2018. [19] M. C. Laskowski and C. Terry, Uniformly bounded arrays and mutually algebraic structures, arXiv:1803.10054 [math.LO], 2018. [20] Michael C. Laskowski, The elementary diagram of a trivial, weakly minimal structure is near model complete, Archive for Mathematical Logic 48 (2009), no. 1, 15–24. [21] , Mutually algebraic structures and expansions by predicates, J. Symbolic Logic 78 (2013), no. 1, 185–194. [22] Michael C. Laskowski and Laura L. Mayer, Stable structures with few substructures, The Journal of Symbolic Logic 61 (1996), no. 3, 985–1005. [23] Dugald Macpherson and James H. Schmerl, Binary relational structures having only countably many nonisomorphic substructures, Journal of Symbolic Logic 56 (1991), no. 3, 876–884. [24] Aleksandr Matushkin, Zero-one law for random uniform hypergraphs, arXiv:1607.07654 [math.Pr], 2016. [25] Oleg Pikhurko, On possible Tur´an densities, Israel J. Math. 201 (2014), no. 1, 415–454. MR 3265290 [26] Andrzej Ruci´nski and Andrew Vince, Strongly balanced graphs and random graphs, Journal of Graph Theory 10 (1986), no. 2, 251–264. [27] Edward R. Scheinerman and Jennifer Zito, On the size of hereditary classes of graphs, J. Combin. Theory Ser. B 61 (1994), no. 1, 16–39. MR 1275261 [28] James H. Schmerl, Coinductive 0-categorical theories, Journal of Symbolic Logic 55 (1990), no. 3, 1130–1137. ℵ [29] S. Shelah, Classification theory: and the number of non-isomorphic models, Studies in Logic and the Foundations of Mathematics, Elsevier Science, 1990. JUMPS IN SPEEDS OF HEREDITARY PROPERTIES IN FINITE RELATIONAL LANGUAGES 38

[30] Wilfred Hodges, Model Theory, Encyclopedia of Mathematics and its Applications, Cambridge Uni- versity Press, 1993. [31] C. Terry, Structure and enumeration theorems for hereditary properties in finite relational languages, Annals of Pure and Applied Logic 169 (2018), no. 5, 413–449. [32] C. Terry, VCℓ-dimension and the jump to the fastest speed of a hereditary -property, Proc. Amer. Math. Soc. 146 (2018), 3111–3126. L

Department of Mathematics, University of Maryland, College Park, MD 20742, USA Email address: [email protected]

Department of Mathematics, The Ohio State University, Columbus, OH 43210, USA Email address: [email protected]