{'fraction_non_alphanumeric': 0.07144842924659438, 'fraction_numerical': 0.021287580920608444, 'mean_word_length': 3.2743167543710747, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Upper bound theorem for odd-dimensional flag triangulations of manifolds

We prove that among all flag triangulations of manifolds of odd dimension 2r-1 with sufficiently many vertices the unique maximizer of the entries of the f-, h-, g- and gamma-vector is the balanced join of r cycles. Our proof uses methods from extremal graph theory.


INTRODUCTION
The classification of face numbers ( f -vectors) of various classes of simplicial complexes, especially triangulations of spheres, balls and manifolds, is a classical topic in enumerative combinatorics. The Charney-Davis conjecture [5] and its generalization by Gal [10] sparkled the interest in similar questions for the class of flag triangulations. In this paper we prove a general upper bound theorem for flag triangulations of odd-dimensional manifolds.
A simplicial complex K is flag if every set of vertices pairwise adjacent in the 1-skeleton of K spans a face of K or, equivalently, if K is the clique complex of its 1-skeleton. Flag complexes appear prominently in Gromov's approach to nonpositive curvature (see [13] and [4] for an exposition). In this context Charney and Davis proposed their famous conjecture [5] that a certain linear combination of the face numbers of any odd-dimensional flag homology sphere is non-negative. Subsequently, Gal [10] introduced a modification of the f -vector called the γ-vector, which seems well-suited to the study of flag homology spheres, and is conjecturally non-negative. Since then a number of conjectures have been made about the structure of γ-vectors of flag spheres, with many of them verified in special cases [2,3,10,14,16,18,19]. Note that a flag complex is completely determined by its 1-skeleton, and thus its face vector is the clique vector of the underlying graph. Paradoxically, this only adds to the complexity of the problem. For example, face vectors of arbitrary simplicial complexes are characterized by the Kruskal-Katona theorem, while the clique vectors of general graphs are not so well understood [9].
Our contribution is an upper bound theorem for odd-dimensional flag homology manifolds, a class which includes flag simplicial manifolds and flag homology spheres. We exhibit a unique maximizer of any reasonable linear combination of face numbers. For any r ≥ 1 and n ≥ 4r let J r (n) be the n-vertex flag complex obtained as a join of r copies of the circle S 1 , each one a cycle with ⌊ n r ⌋ or ⌈ n r ⌉ vertices. This complex is a flag simplicial (2r − 1)-sphere. To phrase our main theorem we say that a real-valued function F defined on simplicial complexes is a face MA   In this context the standard statistics based on face numbers are the f -vector Moreover, equality in any of these inequalities implies that M is isomorphic to J d 2

(n).
For all other values of the index i, as well as for face functions in dimension 0 or −1 in Theorem 1, the corresponding inequalities are trivially satisfied with equality for all M.
The only previously known case of Corollary 2 was d = 4 (for any n) due to Gal [10], with the uniqueness part (for large n) following from [2]. In this case all inequalities follow from f 1 (M) ≤ f 1 (J 2 (n)). Our upper bound for the γ-vector confirms for large n a conjecture of Lutz and Nevo [17,Conjecture 6.3] and provides supporting evidence for a question of Nevo and Petersen [18,Problem 6.4] (see Section 5 for details). We also previously conjectured the upper bound on f 1 for arbitrary even d in [2].
For arbitrary (not necessarily flag) odd-dimensional homology manifolds tight upper bounds for f i were obtained by Novik [20,Theorem 1.4]. In this case the maximum is attained by the boundary of the d-dimensional cyclic polytope with n vertices (the maximizer is not unique). For the subclass of simplicial spheres this had been known before by the celebrated upper bound theorem of Stanley [23]. In the flag case our result is new even for flag simplicial spheres.

PRELIMINARIES
We recommend the reader [24] and [20] as references for face numbers of triangulations of manifolds and spheres.
An abstract simplicial complex K with vertex set V is a collection K ⊆ 2 V such that σ ∈ K and τ ⊆ σ imply τ ∈ K. The elements of K are called faces. The dimension of σ is |σ| − 1 and the dimension of K is the maximal dimension of any of its faces. The link of a face σ is the subcomplex lk K (σ) = {τ ∈ K : τ ∩ σ = ∅, τ ∪ σ ∈ K}.
A simplicial complex K is a simplicial manifold (resp. simplicial sphere) of dimension q if the geometric realization |K| is homeomorphic to a connected, compact topological q-manifold without boundary (resp. to the sphere S q ). Most known results involving face numbers of simplicial manifolds hold for more general objects, which we now introduce. A simplicial complex K is a homology manifold if for any point p ∈ |K| and any i = dim K, H i (|K|, |K| − p; Z) = 0 and H dim K (|K|, |K| − p; Z) = Z. This is equivalent to saying that for every nonempty face σ ∈ K the link lk K (σ) has the homology of the sphere S q−|σ| (equivalence follows from the excision axiom, see [15,Lemma 3.3]). A homology sphere is a homology manifold K such that K itself has the homology of a sphere. It is easy to see that if K is a homology q-manifold then for every nonempty face σ ∈ K the link lk K (σ) is a homology (q − |σ|)-sphere. Clearly every simplicial manifold (resp. simplicial sphere) is a homology manifold (resp. homology sphere).
A complex K of dimension q is called Eulerian if for every face σ ∈ K (including the empty one) the link lk K (σ) has the same Euler characteristic as the sphere S q−|σ| . Every homology manifold satisfies Poincaré duality; as a consequence the Euler characteristic of an odd-dimensional homology manifold M equals 0 and so M is Eulerian. For Note h 0 (K) = 1 and h 1 (K) = n − d. An Eulerian simplicial complex satisfies the Dehn-Sommerville equations h i (K) = h d−i (K) for 0 ≤ i ≤ d. In that case one can define the γ-vector (γ 0 , . . . , γ ⌊ d 2 ⌋ ) of K by the identity Here γ 0 (K) = 1 and γ 1 (K) = n − 2d. The γ-vector was first introduced by Gal [10] for flag homology spheres, for which it is conjectured to be non-negative. This conjecture generalizes the Charney-Davis conjecture, which in this language asserts that γ d 2 (K) is non-negative for a (d − 1)-dimensional flag homology sphere K with d even. Another classical invariant, studied mostly for simplicial spheres and balls, is the g-vector (g 0 , g 1 , . . . , g ⌊ d 2 ⌋ ) given by g 0 = 1 and   Let us now move towards flag complexes. If G = (V, E) is a finite, simple, undirected graph then the clique number ω = ω(G) of G is the cardinality of the largest clique (complete subgraph) in G and the clique vector of G is the sequence (e 0 (G), e 1 (G), . . . , e ω (G)), where e i (G) is the number of cliques of cardinality i (in particular e 0 (G) = 1, e 1 (G) = |V| and e 2 (G) = |E|). The clique complex of G, denoted X(G), is the simplicial complex with vertex set V whose faces are all cliques in G. We have dim A flag homology manifold (resp. flag homology sphere) is a flag complex which is a homology manifold (resp. a homology sphere).
By abuse of language we will say that G triangulates a homology manifold (resp. sphere) if X(G) is a flag homology manifold (resp. sphere).
Fix n, r ∈ N. We write T r (n) for the r-partite Turán graph of order n, that is a graph with n vertices partitioned into sets V 1 , V 2 , . . . , V r , each of size either ⌊ n r ⌋ or ⌈ n r ⌉, with no edge inside any V i and with a complete bipartite graph between every two V i and V j , i = j. Further, for n ≥ 4r we define J r (n) to be the graph obtained from T r (n) by declaring that each of the parts V i induces a cycle of length |V i |. The condition n ≥ 4r guarantees that each part is a cycle of length at least 4, hence a flag triangulation of S 1 . Of course we have J r (n) = X(J r (n)) and this complex is a flag simplicial (2r − 1)-sphere.
We say that a real-valued function F defined on graphs is a clique function of order k, if F can be written as F(G) = c k e k (G) + c k−1 e k−1 (G) + · · · + c 1 e 1 (G) + c 0 where c i ∈ R and c k > 0. Theorem 1 can be equivalently rephrased as follows.
Theorem 3 (Main Theorem, Graph formulation). For every r ≥ 2 and every clique function F of order k, where 2 ≤ k ≤ r, there exists a constant n 0 for which the following holds. If G is a graph with n ≥ n 0 vertices which triangulates a (2r − 1)-dimensional homology manifold then and equality holds if and only if G is isomorphic to J r (n).
Let us first fix some additional notation.
The subscript G will be omitted if there is no risk of confusion.
2.1. Properties of flag homology manifolds. Below, we record two basic properties of flag homology manifolds that we need for our proof of the Main Theorem.

Lemma 4.
For every r ≥ 1 there is a constant C r such that every n-vertex graph G triangulating a (2r − 1)-dimensional homology manifold satisfies e r+1 (G) ≤ C r n r .
Proof. The Dehn-Sommerville relation h r+1 (X(G)) = h r−1 (X(G)) expressed in terms of face numbers implies that f r (X(G)) is a linear combination of entries of the vector ( f r−1 (X(G)), . . . , f −1 (X(G))) = (e r (G), . . . , e 0 (G)) with coefficients depending only on r. Since e i (G) ≤ ( n i ) ≤ n r for 0 ≤ i ≤ r, we get e r+1 (G) = f r (X(G)) ≤ C r n r for a suitable C r . Let K r 3 := T r (3r) denote the complete r-partite graph with all parts of size 3. A graph G is H-free if it does not contain H as a subgraph. The crucial geometric ingredient of our arguments is provided by the next lemma.
Proof. By a result of Galewski and Stern [11, Corollary , formed by the original K r 3 and any three of the four suspending vertices. That contradicts the theorem of van Kampen and Flores [25,8] (see also [26,Section 2.4 In our arguments we are going to apply Lemma 5 to links of faces in a homology manifold. For example, we get that if G triangulates a homology (2r − 1)-manifold then for every vertex v the link lk G (v) is K r 3 -free. 2.2. Extremal graph theory. The remaining tools for our proof come entirely from extremal graph theory. An approach to face enumeration via extremal graph theory was pioneered in [2] where we classified all flag homology 3-manifolds M with a sufficiently large number n of vertices which are almost extremal for f 1 or γ 2 . Thus, the main technical contribution of our current work is in connecting further tools from extremal graph theory (namely Zykov's inequalities (Theorem 8) and the Removal lemma (Theorem 9)) to the area of face enumeration.
The following definition introduces a distance -sometimes called the edit distance -on the set of n-vertex graphs. Definition 6. We say that two graphs with the same number of n vertices are ǫclose if there exists an identification of their vertex sets, so that then one graph can be obtained from the other by editing (i.e., adding or deleting) less than ǫn 2 edges.
The celebrated Stability Theorem of Erdős and Simonovits [6,22] below says that a K r+1 -free graph whose number of edges is close to the Turán bound must actually be close to the Turán graph in the edit distance.
We will also make use of the following result. Theorem 8. Let r ≥ 1 and suppose than H is an n-vertex, K r+1 -free graph. Then we have 1 = e 1 (H) e 1 (T r (n)) ≥ e 2 (H) e 2 (T r (n)) ≥ . . . ≥ e r (H) e r (T r (n)) .
Theorem 8 generalizes the result of Zykov [27] that e k (H) ≤ e k (T r (n)), which in turn generalizes Turán's Theorem stating e 2 (H) ≤ e 2 (T r (n)). A nice proof of Theorem 8 using symmetrization can be found in [12, Theorem 3.1].
Let us now motivate the Removal lemma. A graph of order n can contain at most ( n r+1 ) = Θ(n r+1 ) copies of K r+1 . If the graph is not complete then of course it contains less copies. However, we think of the graph H as "essentially K r+1 -free" if e r+1 (H) = o(n r+1 ). It is then tempting to say that by removing a few edges we can delete all the copies of K r+1 . This is true, yet far from trivial, and a subject of the famous Removal lemma, a form of which first appeared in [21], and which was later formulated in its full strength in [7]. Theorem 9. Suppose that r ≥ 1 and α > 0 are given. Then there exists β > 0 such that whenever H is an n-vertex graph with e r+1 (H) ≤ βn r+1 then by deleting a suitable set of less than αn 2 edges H can be made K r+1 -free.

2.3.
Outline of the proof of Theorem 3. Suppose G triangulates a homology (2r − 1)-manifold and the number of vertices n is large. First, note that if k ≤ r then e k (T r (n)) ≈ ( r k ) n r k and e k (J r (n)) = e k (T r (n)) (T r (n)), for a fixed (but arbitrary) α > 0 then the inequality F(G) ≤ F(J r (n)) follows just by comparing the terms of order n k in F. That leaves us only with the case where e k (G) ≈ e k (T r (n)), in which case we can also deduce e 2 (G) ≈ e 2 (T r (n)) by Theorem 8. By Lemma 4, G is "sparse in (r + 1)-cliques", i.e., it has only O(n r ) = o(n r+1 ) many K r+1 's, yet at the same time very dense (close to the maximal number of edges allowed for a K r+1 -free graph by Turán's Theorem). At this point Theorem 7 shows that G must be similar to T r (n). Additional geometric properties of X(G) allow us to conclude from there that F(G) is maximized by F(J r (n)).
2.4. Organisation of the paper. As said earlier, the difficult cases Theorem 3 are those when G is close to T r (n). We will analyze their structure more closely in the next section. In Section 4 we give a proof of Theorem 3. We then conclude with open problems stemming from this work in Section 5.

ANALYSIS OF ALMOST EXTREMAL GRAPHS
In this section we deal with almost extremal cases, that is, with triangulations of homology (2r − 1)-manifolds that are close to T r (n). These graphs fall into the class of (η, r)-extremal graphs introduced below. Definition 10. Let 0 ≤ η < 1 and r ≥ 1 be given. We say that an n-vertex graph H is (η, r)-extremal if the vertices of H can be partitioned into sets V 0 , V 1 , . . . , V r such that (a) |V 0 | ≤ 1 30r r ηn and ⌊(1 − 1 For small η, graphs with the above structure resemble J r (n) up to some error. That is, we allow that a small fraction of edges missing in each H[V i , V j ], that the parts are slightly unbalanced and we admit a small set of exceptional vertices V 0 . In the next definition we introduce a class of graphs that resemble J r (n) even better.
Definition 11. We say that a graph is r-radical if it is (0, r)-extremal, and for each An r-radical graph is (η, r)extremal for any 0 ≤ η < 1. Note that if H is any n-vertex r-radical graph then F(H) = F(J r (n)) for every clique function F.

Lemma 12. If H is an r-radical graph with n vertices which triangulates a homology (2r − 1)-manifold then H is isomorphic to J r (n).
Proof. For all i = 1, . . . , r − 1 pick any edge in H[V i ]. The endpoints of these r − 1 edges form a clique of order 2r − 2 whose link is H[V r ]. However, in a homology (2r − 1)-manifold the link of a face of size 2r − 2 is a homology 1-sphere, that is a cycle. It means that H[V r ] is a cycle. The same argument shows that all H[V i ] are cycles and therefore H is isomorphic to J r (n).
The next lemma is used to find copies of K r 3 in (η, r)-extremal graphs. Lemma 13. Fix r ≥ 1 and η > 0. Suppose H is a graph with n ≥ 2rη −1 vertices and a partition V(H) = V 0 ⊔ V 1 ⊔ . . . ⊔ V r which satisfies conditions (a) and (d) of Definition 10. Let w 1 , w 2 , w 3 ∈ V 1 be any three fixed vertices. For i ∈ {2, . . . , r} let A i ⊆ V i be sets with |A i | ≥ 3rη|V i |. Then the subgraph of H induced by {w 1 , w 2 , w 3 } ∪ r i=2 A i contains a K r 3 with 3 vertices in each part V i , i ∈ [r]. Proof. We will construct by induction 3-element subsets {w i 1 , w i 2 , w i 3 } ⊆ A i such that for each l ∈ [r] the subgraph of H induced by w i j with j = 1, 2, 3 and i = 1, . . . , l contains K l 3 . For l = r this proves the lemma. When i = 1 the vertices w 1 j = w j are already given.
Suppose we have constructed the vertices {w i where the last line uses condition (a) of Definition 10 and the bound n ≥ 2rη −1 . It means that we can pick three distinct vertices w l+1 1 , w l+1 2 , w l+1 3 ∈ A l+1 ∩ N l+1 and the induction step is complete.
We can now prove that graphs triangulating homology (2r − 1)-manifolds are (η, r)-extremal as soon as they are sufficiently close to T r (n).
Proof. If H is ǫ-close to T r (n) then the vertices of H can be partitioned into r sets X 1 , . . . , X r , each of size ⌊ n r ⌋ or ⌈ n r ⌉, such that Here e 2 (H[X i , X j ]) is the number of edges missing between X i and X j , that is Every vertex in X i,j contributes to the number of missing edgesē(H[X i , X j ]) as follows We have |Y 0 | ≤ r 2 · 2ǫrη −1 n = 1 60r r ηn and, for i ∈ [r], By definition, for every vertex v ∈ Y 0 there exists an index j ∈ [r] such that deg(v, X j ) ≤ (1 − 2 3 η)|X j |. Let Z j ⊂ Y 0 consists of those vertices for which j is the only such index, formally: . We now define the final partition of V(H) as We claim that the partition That proves condition (a) of Definition 10. Next we verify condition (d). Pick any To prove property (b), suppose, without loss of generality, that H[ By the already proven property (d) we have |A i | ≥ (1 − 3η)|V i | ≥ 3ηr|V i | (the last inequality uses η < 1 7r ). Since n ≥ 2rη −1 Lemma 13 now yields that the link lk H (t) contains K r−1 3 as a subgraph. This is a contradiction to Lemma 5, since lk H (t) triangulates a homology sphere of dimension 2r − 1 − 3 = 2(r − 2).
We now turn to verifying (e). Let us start with an auxiliary claim.

Claim.
Let v ∈ V 0 be any vertex and suppose j ∈ [r] is any index such that Now suppose that some vertex v ∈ V 0 is not of Type 2. Then, without loss of generality, deg(v, V i ) > 3ηr|V i | for i = 2, . . . , r. Suppose that deg(v, V 1 ) ≥ 3 and let w 1 , w 2, w 3 ∈ N H (v) ∩ V 1 be three distinct vertices. We already proved properties (a) and (d), so we can apply Lemma 13 with w 1 , w 2 , w 3 and A i = N H (v) ∩ V i for i = 2, . . . , r to conclude that lk H (v) contains a K r 3 , a contradiction to Lemma 5. Therefore, deg(v, V 1 ) ≤ 2. By the definition of V 0 , there exist an index j = 1 such deg(v, X j ) ≤ (1 − 2 3 η)|X j |. The above Claim then gives that deg(v, V j ) ≤ (1 − 1 2 η)|V j |. This proves that v is of Type 1. Condition (e) follows. This completes the proof of the lemma.
Our last lemma says that for among (η, r)-extremal graphs, the graph J r (n) maximizes any clique function of order up to r (for sufficiently large n). Note that in this part of the proof we do not assume that H triangulates a homology manifold.
Lemma 15. Let r ≥ 2 and let F be a clique function of order k, 2 ≤ k ≤ r. Set η = 1 14r r . Then there exists a number m 0 such that the following holds. If H is a graph with n ≥ m 0 vertices then F(H) ≤ F(J r (n)) and equality is attained only when H is r-radical.
Proof. Let the clique function be F(G) = c k e k (G) + c k−1 e k−1 (G) + . . . + c 1 e 1 (G) + c 0 . The value of m 0 will be chosen during the proof in such a way that (3.1), (3.2), (3.3), (3.4) and (3.5) are satisfied for all n ≥ m 0 . Among all (η, r)-extremal graphs with n vertices, let us consider a graph H that maximizes F(H). We will show that H is r-radical.
Proof. Suppose for a contradiction and without loss of generality that there exist vertices v 1 ∈ V 1 and v 2 ∈ V 2 that do not form an edge. Let us now add that edge to H. Observe that the modified graph H ′ is still (η, r)-extremal. We will now find a lower bound for the number of cliques in H ′ which contain the edge v 1 v 2 . By condition (d), v 1 and v 2 are both adjacent to at least (1 − 2η)|V 3 . . , v ℓ . This sequential extension gives at least ((1 − kη) n r ) k−2 > ( 1 2 · n r ) k−2 many k-cliques containing both v 1 and v 2 in H ′ . For each t = 2, . . . , k − 1, the number of t-cliques increased by at most n t−2 , and the number of vertices did not change. So, in total, since the coefficients c t are fixed and n ≥ m 0 is large enough. This is a contradiction to the assumption that H maximizes F.
Claim. The set V 0 does not contain any Type 1 vertex.
Proof. Suppose that v ∈ V 0 is a Type 1 vertex. Let g and h be the two indices as in the definition of Type 1 in Definition 10. Since the average size of the sets V i , We construct a new graph H ′ by deleting v (and its incident edges) from V 0 and introducing a new vertex w into the set V j . We make w adjacent to all the vertices in i∈[r]\j V i , and to no other. The modified graph H ′ is (η, r)-extremal.
Let us now upper-bound the number of k-cliques in H containing v. The number of cliques containing v and some other vertex of V 0 is at most |V 0 | · n k−2 ≤ 1 30r r ηn k−1 . The number of k-cliques through v and through a vertex from the set V g is at most 2n k−2 by the definition of Type 1. By Definition 10(c) and (d), if k ≥ 3 the number of cliques containing v and at least two vertices from a fixed V i , i ∈ [r], is at most e 2 (H[V i ]) · n k−3 ≤ |V i | · n k−3 . Therefore the number of k-cliques that touch some of the sets V i in at least two vertices is upper bounded by n k−2 . It remains to upper-bound the number of k-cliques in H through v that contain no vertex from (V 0 \ {v}) ∪ V g , and that intersect each of the sets V i in at most one vertex. Trivially, this number is at most ( r−1 k−1 )⌈(1 + 1 30r η) n r ⌉ k−1 . However, the fact that deg(v, V h ) ≤ (1 − 1 2 η)|V h | allows us to refine this upper-bound to Putting these bounds together, we get By Bernoulli's inequality the coefficient in the square brackets is at least That gives The number of cliques of size t changed by at most n t−1 for t = 2, . . . , k − 1. That implies |c t |n t−1 > 0 since n ≥ m 0 is sufficiently large. That contradicts the maximality of H and proves the claim.
Claim. The set V 0 does not contain any Type 2 vertex.
Proof. We proceed similarly as in the previous case. Suppose that v ∈ V 0 is a Type 2 vertex. Let g and h be the two indices as in Definition 10. We delete v from V 0 and introduce a new vertex w in some set V j , j ∈ [r] with |V j | < n r which we make adjacent to all the vertices in i∈[r]\{j} V i , and to no other. Let H ′ be the resulting (η, r)-extremal graph. As before, the new vertex w belongs to at least ( r−1 k−1 )⌊(1 − 1 30r η) n r ⌋ k−1 cliques of size k in H ′ . Next we upper-bound the number of cliques containing v in H. The number of k-cliques through v and through a vertex from the set The number of k-cliques through v that touch at least two vertices in some V i is at most n k−2 , as in the previous claim. Last, the number of k-cliques through v that do not intersect V g ∪ V h ∪ (V 0 \ {v}) and contain at most one vertex from each V i is upper-bounded by (in particular it must be 0 when k = r). Proceeding as in the proof of the previous claim we get The expression in the square brackets is at least 10r .
Hence we get where we used 7η ≤ 1 2r r , and finally Thus, by the three claims above, the vertex set of H is partitioned into sets V 1 , . . . , V r , all pairs of which form complete bipartite graphs. Recall that the graphs H[V i ] are triangle-free and of maximum degree at most 2.
Proof. The condition that the maximum degree of H[V i ] is at most 2 implies that e 2 (H[V i ]) ≤ |V i |. Suppose now that e 2 (H[V i ]) < |V i |. We replace the subgraph H[V i ] with the graph consisting of a path with e 2 (H[V i ]) edges followed by |V i | − e 2 (H[V i ]) − 1 isolated vertices. Let H ′ be the resulting graph. Note that H ′ is (η, r)extremal, and since H[V i ] was triangle-free we have e ℓ (H ′ ) = e ℓ (H) for all ℓ. Next, we create H ′′ by adding one edge to H ′ [V i ], so that we get a longer path or a cycle. We still have that H ′′ is (η, r)-extremal.
That leaves us with the case F(H) > (1 − 1 4 δ)F(T r (n)). Since n ≥ m 2 we get e k (H) > (1 − 1 2 δ)e k (T r (n)). By Lemma 4 we have e r+1 (H) ≤ C r n r ≤ βn r+1 . Theorem 9 now shows that we can remove at most αn 2 edges from H to obtain a K r+1 -free subgraph G with the same vertex set. The removal of one edge destroys at most n k−2 cliques of size k, therefore e k (G) ≥ e k (H) − αn k ≥ (1 − 1 2 δ)e k (T r (n)) − 1 4 δ r k 1 r k n k ≥ (1 − δ)e k (T r (n)), where in the last step we used e k (T r (n)) ≥ 1 2 ( r k ) n k r k . Theorem 8 now gives e 2 (G) ≥ (1 − δ)e 2 (T r (n)). By Theorem 7 the graph G is 1 2 ǫ-close to T r (n). Since H arises from G by adding at most αn 2 ≤ 1 2 ǫn 2 edges, we conclude that H is ǫ-close to T r (n). From Lemma 14, we have that H is (η, r)-extremal. As n ≥ m 0 , Lemma 15 now shows that F(H) ≤ F(J r (n)). That ends the proof of the inequality.
If F(H) = F(J r (n)) then by Lemma 15 the graph H is r-radical. Since H triangulates a homology (2r − 1)-manifold, Lemma 12 yields that H is isomorphic to J r (n). That proves the uniqueness part.

CONJECTURES
First of all, it is natural to expect that the conclusion of Corollary 2 holds for flag triangulations of any size, not just sufficiently large. For the γ-vector this was conjectured in [17]. Moreover, we conjecture that the extremum is stable, in the sense that if F(M) is sufficiently close to F(J d