\documentclass[11pt,a4paper]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage{amsmath,amssymb,amsthm} \usepackage[margin=1.15in]{geometry} \usepackage[hidelinks]{hyperref} \emergencystretch=3em \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}[theorem]{Proposition} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{remark}[theorem]{Remark} \newcommand{\A}{\mathcal{A}} \newcommand{\K}{\mathcal{K}} \newcommand{\C}{\mathcal{C}} \newcommand{\V}{\mathcal{V}} \newcommand{\Po}{\mathcal{P}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\R}{\mathbb{R}} \newcommand{\F}{\mathbb{F}} \newcommand{\colim}{\operatorname{colim}} \newcommand{\aug}{\operatorname{aug}} \newcommand{\Aut}{\operatorname{Aut}} \newcommand{\Hom}{\operatorname{Hom}} \newcommand{\id}{\mathrm{id}} \title{Exactness of colimits and amenability are independent for categories of finite substructures\thanks{AI-produced. The results are due to a run of GPT-6 Astra (OpenAI, ChatGPT Pro mode); the text was written, and every proof derived again, by Claude Fable~5.2 (Anthropic) at effort max; see Section~\ref{sec:provenance} for who proved, wrote and checked what. No human has checked this text. To the extent that any rights exist in it, they are dedicated to the public domain under CC0~1.0.}} \author{} \date{25 November 2026} \begin{document} \maketitle \begin{abstract} Let $M$ be a countable homogeneous structure, $G$ its automorphism group and $\A$ the category of its finite substructures and embeddings. The colimit functor on diagrams of $R$-modules indexed by $\A$ is exact if and only if the functor of coinvariants $N\mapsto N_G$ is exact on the $R[G]$-modules in which every element has an open stabilizer; this is a property of the topos of continuous $G$-sets. We compare it with amenability of $G$, the existence of invariant probability measures on compact spaces on which $G$ acts, and show that neither implies the other. For the generic partially ordered set with an independent linear order, colimits are exact over every ring, while the group is not amenable by a result of Kechris and Soki\'c. For the vector space of countable dimension over the field with two elements, with a generic linear order on its non-zero vectors, the group is amenable and colimits are exact over the rational numbers, but they are exact over no ring in which $2$ is not invertible. The first statement rests on a transfer theorem: if a subgroup $H$ has exact coinvariants and finitely many orbits on each $G/G_B$, then exactness for $G$ over a field $k$ is equivalent to the existence of a $G$-invariant, finitely additive, $k$-valued function of total mass $1$ on the expansions that $H$ defines; positivity is not required. For posets this function has integer values, given by Euler characteristics of cells of order cones, which are values of the measure of Harman and Snowden for the automorphism group of the ordered real line. A consequence is that the separation property proved by Evans for Ramsey structures holds for a structure that is not a Ramsey structure but is obtained from one by forgetting a relation. \end{abstract} \section{Introduction and results}\label{sec:intro} \paragraph{The setting.} We use the setting of \cite[\S3.1]{D1}. Let $M$ be a non-empty countable set and $G$ a group of permutations of $M$. For $B\subseteq M$ let $G_B$ be the pointwise stabilizer of $B$. A subgroup of $G$ is \emph{open} if it contains $G_B$ for some finite $B$; this is the topology of pointwise convergence on $G$. Let $\K$ be a set of finite subsets of $M$ such that \begin{enumerate} \item[\textup{(K1)}] $\varnothing\in\K$; $gB\in\K$ for $B\in\K$ and $g\in G$; every finite subset of $M$ is contained in a member of $\K$. \end{enumerate} The category $\A=\A(M,G,\K)$ has the non-empty members of $\K$ as objects, and its arrows $B\to C$ are the maps $g|_B$ with $g\in G$ and $gB\subseteq C$. If $M$ is the Fra\"iss\'e limit of a class of finite structures, $G=\Aut(M)$ and $\K$ is the set of all finite subsets, then every embedding between finite substructures of $M$ extends to an automorphism, so $\A$ is the category of non-empty finite substructures of $M$ and embeddings, and it is equivalent to the category of all non-empty structures of the class with embeddings. In Section~\ref{sec:vector} the members of $\K$ are the finite subspaces of a vector space, without the zero vector. All rings are commutative with $1$. For a ring $R$, an $R[G]$-module $N$ is \emph{smooth} if every element of $N$ is fixed by an open subgroup. Its \emph{coinvariants} are $N_G=N/I_GN$, where $I_GN$ is the submodule generated by the elements $gn-n$; the functor $N\mapsto N_G$ is right exact. \begin{definition}\label{def:exact} The category $\A$ is \emph{exact over $R$} if the functor $\colim_{\A}$ from functors $\A\to R\text{-Mod}$ to $R$-modules is exact. \end{definition} Colimits of modules are computed on the underlying abelian groups, so a category that is exact over $\Z$ is exact over every ring; and exactness is invariant under equivalence of categories. The group $G$ is \emph{amenable} if every continuous action of $G$ on a non-empty compact Hausdorff space has an invariant regular Borel probability measure, and \emph{extremely amenable} if every such action has a fixed point. \begin{theorem}\label{thm:dict} Assume \textup{(K1)}. The category $\A(M,G,\K)$ is exact over $R$ if and only if the functor of coinvariants preserves monomorphisms of smooth $R[G]$-modules. Equivalently: in the topos of continuous $G$-sets, the left adjoint of the functor that gives an $R$-module the trivial action of $G$ is exact on $R$-module objects. In particular exactness over $R$ depends only on this topos. \end{theorem} The first sentence is due to the run described in Section~\ref{sec:provenance}; the functors in its proof are those of Artin's theorem as written out for modules by Di, Li, Liang and Xu \cite[Theorem~5.1]{DLLX}. Section~\ref{sec:dict} also proves a criterion in terms of the category alone: $\A$ is exact over $R$ if and only if every finite family of parallel arrows is equalized by a combination of arrows with coefficients in $R$ of sum $1$ (Proposition~\ref{prop:affine}); this is the criterion of Isbell and Mitchell \cite{IM} in the present setting. \begin{theorem}\label{thm:transfer} Assume \textup{(K1)}. Let $H$ be a subgroup of $G$ with finitely many orbits on $G/G_B$ for every $B\in\K$, and let $k$ be a ring such that coinvariants preserve monomorphisms of smooth $k[H]$-modules (smooth for $H$: every element is fixed by $H\cap G_B$ for some finite $B$). For $B\in\K$ let $E(B)=G_B\backslash G/H$. \begin{itemize} \item[\textup{(a)}] If there are functions $\mu_B\colon E(B)\to k$, $B\in\K$, of total sum $1$, compatible with the restriction maps $E(C)\to E(B)$ for $B\subseteq C$ and with the action of $G$ \textup{(}a \emph{normalized invariant measure}, Definition~\textup{\ref{def:measure})}, then $\A(M,G,\K)$ is exact over every $k$-algebra. \item[\textup{(b)}] If $k$ is a field and $\A(M,G,\K)$ is exact over $k$, there is such a family. \item[\textup{(c)}] If $G$ is amenable and $k\supseteq\Q$, there is such a family; so $\A(M,G,\K)$ is then exact over every $\Q$-algebra. \end{itemize} \end{theorem} When $H$ is the automorphism group of an expansion $M^*$ of $M$, the set $E(B)$ is the set of expansions of $B$ that occur in $M^*$, and a normalized invariant measure with values in $[0,1]$ is what is called a consistent random expansion; for excellent pairs of classes its existence is the starting point of Zucker's criterion for amenability \cite[\S3 and Theorem~3.1]{Zu}. Theorem \ref{thm:transfer} says that exactness is the same linear condition without positivity (Remark~\ref{rem:zucker}). \begin{theorem}\label{thm:posets} Let $\Po$ be the class of finite structures $(P,\prec,<)$, where $\prec$ is a strict partial order and $<$ a linear order on $P$, let $M_{\Po}$ be its Fra\"iss\'e limit and $G=\Aut(M_{\Po})$. The category of non-empty members of $\Po$ and embeddings is exact over every ring. The group $G$ is not amenable \textup{(}Kechris and Soki\'c \cite[Remark~3.2]{KS}\textup{)}. \end{theorem} \begin{theorem}\label{thm:vector} Let $\V$ be the category of finite-dimensional non-zero vector spaces over $\F_2$ with a linear order on the set of their non-zero vectors, and of injective linear maps that preserve the order. Let $(V_\infty,<)$ be its Fra\"iss\'e limit and $G$ the group of linear automorphisms of $V_\infty$ that preserve the order. \begin{itemize} \item[\textup{(a)}] $G$ is amenable. \item[\textup{(b)}] $\V$ is exact over every $\Q$-algebra. \item[\textup{(c)}] $\V$ is not exact over any ring in which $2$ is not invertible; in particular not over $\F_2$ and not over $\Z$. \end{itemize} \end{theorem} So exactness over $\Z$ does not imply amenability, and amenability does not imply exactness over $\Z$ or over a field of characteristic $2$. Extreme amenability does imply exactness over $\Z$: this is Lemma~3.7\,(i) of Evans \cite{Ev}, in dual form (Remark~\ref{rem:evans}). The second statement alone has an elementary witness with non-rigid objects. For the category of finite non-empty sets and injections the group is the symmetric group of a countably infinite set. It is amenable by Lemma~\ref{lem:Re}: the uniform distribution $\nu$ on the bijections of $Q$ satisfies $\nu a=\nu a'$ for all arrows $a,a'\colon P\to Q$. The average of the bijections of $Q$ is an affine equalizer over $\Q$ of all arrows $P\to Q$, and an affine equalizer of the automorphisms of an $n$-element set has augmentation in $n!R$; so this category is exact over $R$ exactly when $R$ is a $\Q$-algebra (Proposition~\ref{prop:affine}). In Theorem~\ref{thm:vector} every object is rigid and the category is exact over $\Q$. We do not know whether $\V$ is exact over a ring in which $2$ is invertible and which is not a $\Q$-algebra. Amenability does not imply exactness over $\Q$ in general: for the group of translations of $M=\Z$, with $\K$ the set of finite subsets, the group is discrete and amenable, the objects are rigid, and the inclusion of $\{0\}$ in $\{0,1\}$ and the arrow $0\mapsto1$ have no affine equalizer over any non-zero ring, because the coefficients of an equalizer would form a finitely supported function on $\Z$ that is invariant under translation. By Theorem~\ref{thm:transfer}\,(c) amenability does imply exactness over $\Q$ when $G$ has a subgroup $H$ as in that theorem. \begin{corollary}\label{cor:evans} Let $M=M_{\Po}$, $G=\Aut(M)$, let $W$ be a set with an action of $G$ in which every point has an open stabilizer, $R$ a ring, $Y$ an $R[G]$-submodule of the free module $R[W]$, and $x\in R[W]$. Let $U$ be an open subgroup of $G$ fixing $x$, and $\Omega_U\colon R[W]\to R[U\backslash W]$ the map that sends a point to its $U$-orbit. Then $x\in Y$ if and only if $\Omega_U(x)\in\Omega_U(Y)$. If $R$ is a field and $x\notin Y$, there is a $U$-invariant function $f\colon W\to R$ whose linear extension vanishes on $Y$ and not on $x$. \end{corollary} For $\omega$-categorical Ramsey structures, $W$ a sort of $M^{\mathrm{eq}}$ and $U$ the pointwise stabilizer of the support of $x$, these are Theorem~1.4 and Corollary~1.5 of \cite{Ev}. In Remarks~2.12 of \cite{Ev} Evans asks whether the separation property holds for reducts of Ramsey structures. The structure $M_{\Po}$ is a reduct of a Ramsey structure and is not one itself (its group is not amenable); Corollary~\ref{cor:evans} gives the property for it over every field, and Theorem~\ref{thm:transfer}\,(c) gives it in characteristic $0$ for every reduct with an amenable automorphism group (Remark~\ref{rem:reducts}). \paragraph{What is known and what is new.} Known: the non-amenability in Theorem~\ref{thm:posets} \cite{KS}; the implication from extreme amenability to exactness \cite{Ev}; Artin's dictionary between continuous $G$-sets and sheaves on orbit categories, in the form of \cite{DLLX} and, for Fra\"iss\'e classes, of Caramello \cite[Theorem~2.9, Proposition~2.10]{Ca}; the criterion of Isbell and Mitchell \cite{IM}; the Euler-characteristic measure of Harman and Snowden \cite{HS}, of which the weights of Lemma~\ref{lem:weights} are values (Remark~\ref{rem:HS}). New, to our knowledge after the search described in Section~\ref{sec:provenance}: Theorems~\ref{thm:transfer}, \ref{thm:vector}, the exactness in Theorem~\ref{thm:posets} and Corollary~\ref{cor:evans}. The theory of \cite{HS} does not give these statements: its exactness results concern modules over a completed group algebra, and smoothness of a $k[G]$-module in the sense above is weaker than smoothness over that algebra \cite[Remark~10.10]{HS}; and by Snowden \cite[Proposition~8.2]{Sn} the class of finite posets has no regular measure in their sense. \section{Coinvariants, the topos and affine equalizers}\label{sec:dict} Throughout, $(M,G,\K)$ satisfies (K1) and $\A=\A(M,G,\K)$. By (K1) the non-empty members of $\K$ form a directed set under inclusion, inclusions are arrows of $\A$, and every arrow $f\colon B\to C$ factors as $B\xrightarrow{\,g|_B\,}gB\subseteq C$ for any $g\in G$ with $g|_B=f$. \begin{proof}[Proof of Theorem~\ref{thm:dict}] For $V\colon\A\to R\text{-Mod}$ let $S(V)=\colim_{B}V(B)$, the colimit over the directed set of non-empty members of $\K$ and inclusions. Write $[B,v]$ for the class of $v\in V(B)$. The rule $g[B,v]=[gB,V(g|_B)v]$ is well defined, because $g|_C$ restricts to $g|_B$ for $B\subseteq C$, and it makes $S(V)$ an $R[G]$-module in which $[B,v]$ is fixed by $G_B$; so $S(V)$ is smooth. The functor $S$ is exact, because directed colimits of modules are exact. \emph{Claim: $\colim_{\A}V\cong S(V)_G$, naturally in $V$.} The module $\colim_{\A}V$ is the quotient of $\bigoplus_BV(B)$ by the relations $v\sim V(f)v$ for arrows $f$. By the factorization above these relations are generated by those for inclusions, whose quotient is $S(V)$, and those for the bijections $g|_B\colon B\to gB$, which identify $[B,v]$ with $g[B,v]$. For a smooth $R[G]$-module $N$ define $T(N)\colon\A\to R\text{-Mod}$ by $T(N)(B)=N^{G_B}$ and $T(N)(g|_B)n=gn$. This is well defined: another element of $G$ with the same restriction to $B$ is $gu$ with $u\in G_B$; and $gn$ is fixed by $G_C$ when $gB\subseteq C$, since $g^{-1}G_Cg=G_{g^{-1}C}\subseteq G_B$. Since $N$ is smooth, $S(T(N))=\bigcup_BN^{G_B}=N$ as $R[G]$-modules, and a monomorphism $N'\to N$ gives a monomorphism $T(N')\to T(N)$. If coinvariants preserve monomorphisms of smooth modules, then $\colim_{\A}=(-)_G\circ S$ preserves monomorphisms, and it is right exact; so $\A$ is exact over $R$. Conversely, if $\A$ is exact over $R$ and $N'\subseteq N$ are smooth, then $N'_G=\colim_{\A}T(N')\to\colim_{\A}T(N)=N_G$ is injective. A continuous $G$-set is a set with an action of $G$ in which every point has an open stabilizer, so an $R$-module object of the topos of continuous $G$-sets is a smooth $R[G]$-module. The functor $\gamma^*$ from sets to this topos gives a set the trivial action, and for a smooth $N$ and an $R$-module $B$ we have $\Hom_{R[G]}(N,\gamma^*B)=\Hom_R(N_G,B)$. So the left adjoint of $\gamma^*$ on $R$-module objects is $N\mapsto N_G$. An equivalence of toposes commutes with $\gamma^*$ up to isomorphism, which is unique, and induces an equivalence of the categories of $R$-module objects; hence the last assertion. \end{proof} \begin{remark}\label{rem:topos} Under the equivalence of Artin between continuous $G$-sets and sheaves for the atomic topology on an orbit category of $G$, the functor $T$ is the inclusion of sheaves into presheaves and $S$ is the associated sheaf (when the set of fixed points of $G_B$ in $M$ is $B$ for all $B\in\K$, as in the examples of this paper, so that $\A$ is the opposite of the orbit category on the $G/G_B$; in general $S$ is exact and left adjoint to the fully faithful $T$) \cite[Theorem~5.1 and the equivalence displayed after it]{DLLX}. When $M$ is the Fra\"iss\'e limit of the finitely presentable models of a theory of presheaf type, the topos of continuous $\Aut(M)$-sets is the classifying topos of the theory of homogeneous models \cite[Theorem~2.9, Proposition~2.10]{Ca}. By Theorem~\ref{thm:dict}, exactness of colimits over the category of finite models is then an invariant of that theory up to Morita equivalence. \end{remark} \begin{lemma}\label{lem:open} If coinvariants preserve monomorphisms of smooth $R[G]$-modules, the same holds for every open subgroup $U$ of $G$. Then for every smooth $R[U]$-module $N$ the map $N^U\to N_U$ is injective. \end{lemma} \begin{proof} For a smooth $R[U]$-module $N$ the induced module $R[G]\otimes_{R[U]}N$ is smooth, because $g\otimes n$ is fixed by $gU_ng^{-1}$ and the stabilizer $U_n$ of $n$ is open in $G$. Induction is exact, since $R[G]$ is free as a right $R[U]$-module, and $(R[G]\otimes_{R[U]}N)_G=R\otimes_{R[U]}N=N_U$. So a monomorphism $N'\to N$ of smooth $R[U]$-modules gives a monomorphism $N'_U\to N_U$. For $n\in N^U$ the submodule $Rn$ has trivial action, so $Rn=(Rn)_U\to N_U$ is injective. \end{proof} For objects $P,C$ of $\A$ write $\A(P,C)$ for the set of arrows, which is finite, and $R[\A(P,C)]$ for the free module on it. An arrow $a\colon P\to Q$ induces $t\mapsto ta$ from $R[\A(Q,C)]$ to $R[\A(P,C)]$, and $\aug$ denotes the sum of the coefficients. \begin{definition}\label{def:affine} An \emph{affine equalizer over $R$} of arrows $a_0,\dots,a_k\colon P\to Q$ is an element $t\in R[\A(Q,C)]$, for some object $C$, with $\aug(t)=1$ and $ta_i=ta_0$ for all $i$. \end{definition} \begin{proposition}\label{prop:affine} The category $\A$ is exact over $R$ if and only if every finite family of arrows $a_0,\dots,a_k\colon P\to Q$ of $\A$ has an affine equalizer over $R$. \end{proposition} For arbitrary small categories with common successors this is the criterion of Isbell and Mitchell \cite[Theorem~3.1, Proposition~3.3 and the remark after it, for a commutative ring in place of $\Z$]{IM}. We give a direct proof in the present setting. \begin{proof} For an object $P$ let $E_P$ be the free $R$-module on the set of maps $g|_P$, $g\in G$, with $G$ acting by composition; it is the permutation module on $G/G_P$, it is smooth, and $(E_P)_G=R$ by the augmentation. Suppose $\A$ is exact over $R$ and let $a_0,\dots,a_k\colon P\to Q$. Let $\phi\colon E_Q\to E_P^k$ have the components $t\mapsto ta_i-ta_0$; it is $G$-linear. Put $I=\phi(E_Q)$. Coinvariants are right exact, so $I_G=R/\aug(\ker\phi)$. The composite $E_Q\to I\to E_P^k\to(E_P^k)_G=R^k$ is zero, because $\aug(ta_i)=\aug(ta_0)$; so $I_G\to(E_P^k)_G$ is zero. By Theorem~\ref{thm:dict} it is injective. Hence $I_G=0$, and there is $t\in\ker\phi$ with $\aug(t)=1$. Its support is a finite set of maps $Q\to M$, whose images lie in some $C\in\K$; so $t$ is an affine equalizer. Conversely suppose every finite family has an affine equalizer. Let $N'\subseteq N$ be smooth and $n'\in N'\cap I_GN$, say $n'=\sum_{i=1}^k(g_i-1)n_i$ with $g_i\in G$, $n_i\in N$. Choose $P\in\K$ such that $G_P$ fixes $n_1,\dots,n_k$, and $Q\in\K$ containing $P$ and all $g_iP$. Let $a_0\colon P\to Q$ be the inclusion and $a_i=g_i|_P$, and let $t=\sum_ht_h[h]\in R[\A(Q,C)]$ be an affine equalizer. For each $h$ choose $\hat h\in G$ with $\hat h|_Q=h$. For $n\in N^{G_P}$ the rule $\Phi_n([g|_P])=gn$ defines an $R$-linear map $\Phi_n\colon R[\A(P,C)]\to N$, and $\Phi_n([ha_i])=\hat hg_in$, because $\hat hg_i$ restricts to $ha_i$ on $P$. Therefore \[ \sum_ht_h\hat hg_in_i=\Phi_{n_i}(ta_i)=\Phi_{n_i}(ta_0)=\sum_ht_h\hat hn_i , \] and summing over $i$ gives $\sum_ht_h\hat hn'=0$. As $\sum_ht_h=1$, \[ n'=\sum_ht_hn'-\sum_ht_h\hat hn'=-\sum_ht_h(\hat h-1)n'\in I_GN'. \] So $N'_G\to N_G$ is injective, and $\A$ is exact over $R$ by Theorem~\ref{thm:dict}. \end{proof} \section{Ramsey categories, amenability and the transfer}\label{sec:transfer} \subsection{Ramsey categories} \begin{definition}\label{def:RP} A category $\C$ with finite sets of arrows has the \emph{Ramsey property} if for all objects $P,Q$ and every $r\ge1$ there is an object $C$ such that for every map $\chi\colon\C(P,C)\to\{1,\dots,r\}$ there is $g\in\C(Q,C)$ with $\chi$ constant on $\{ga:a\in\C(P,Q)\}$. It has property \textup{(Re)} if for all arrows $a_0,\dots,a_k\colon P\to Q$ and every $\varepsilon>0$ there are an object $C$ and a probability vector $\nu$ on $\C(Q,C)$ with $\sum_{i=1}^k\|\nu a_i-\nu a_0\|_1<\varepsilon$. \end{definition} Definition~\ref{def:affine} makes sense in any such category. \begin{lemma}\label{lem:ramsey} In a category with finite sets of arrows and the Ramsey property, every finite family $a_0,\dots,a_k\colon P\to Q$ has an affine equalizer over $\Z$, and property \textup{(Re)} holds. \end{lemma} \begin{proof} \emph{Affine equalizers.} Let $N=3k+1$ and let $C$ be as in Definition~\ref{def:RP} for $P$, $Q$ and $r=N^k$. Let $F=\Z[\C(P,C)]^k\oplus\Z$ and let $L\subseteq F$ be the image of $t\mapsto((ta_i-ta_0)_i,\aug t)$ on $\Z[\C(Q,C)]$. An affine equalizer with target $C$ exists if and only if $(0,1)\in L$. Suppose not, and let $x\ne0$ be the class of $(0,1)$ in $F/L$. There is a homomorphism $\psi\colon F/L\to\R/\Z$ such that $c=\psi(x)$ has distance at least $1/3$ from $0$: on the cyclic group generated by $x$ send $x$ to $1/2$ if $x$ has infinite order and to $\lfloor m/2\rfloor/m$ if $x$ has order $m\ge2$, and extend to $F/L$, which is possible because $\R/\Z$ is divisible. The homomorphism $\psi$ is given by functions $\theta_1,\dots,\theta_k\colon\C(P,C)\to\R/\Z$ and the value $c$ on $(0,1)$, and it vanishes on $L$: \[ \sum_{i=1}^k\bigl(\theta_i(ga_i)-\theta_i(ga_0)\bigr)+c=0 \qquad\text{for every }g\in\C(Q,C). \] Divide $\R/\Z$ into $N$ arcs of length $1/N$ and colour $e\in\C(P,C)$ by the $k$-tuple of the arcs containing $\theta_1(e),\dots,\theta_k(e)$. For a $g$ as in the Ramsey property each difference $\theta_i(ga_i)-\theta_i(ga_0)$ has distance less than $1/N$ from $0$, so $c$ has distance less than $k/N<1/3$ from $0$, a contradiction. \emph{Property \textup{(Re)}.} Let $N>2k/\varepsilon$ and let $C$ be as in Definition~\ref{def:RP} for $r=N^k$. Let $\Delta$ be the simplex of probability vectors on $\C(Q,C)$ and $\Lambda=([-1,1]^{\C(P,C)})^k$. The function $\Phi(\nu,\lambda)=\sum_i\langle\lambda_i,\nu a_i-\nu a_0\rangle$ is bilinear on the compact convex sets $\Delta$ and $\Lambda$, so by the minimax theorem \cite{vN} (applied to the matrix game whose columns are the vertices of the cube $\Lambda$; a linear function on $\Lambda$ takes its maximum at a vertex) $\min_\nu\max_\lambda\Phi=\max_\lambda\min_\nu\Phi$. Here $\max_\lambda\Phi(\nu,\lambda)=\sum_i\|\nu a_i-\nu a_0\|_1$, and $\min_\nu\Phi(\nu,\lambda)$ is the minimum over $g\in\C(Q,C)$ of $\sum_i(\lambda_i(ga_i)-\lambda_i(ga_0))$. Given $\lambda$, colour $e\in\C(P,C)$ by the $k$-tuple of the intervals of length $2/N$ of $[-1,1]$ containing $\lambda_i(e)$; a $g$ as in the Ramsey property gives a sum of absolute value at most $2k/N<\varepsilon$. So the common value is less than $\varepsilon$. \end{proof} \begin{remark}\label{rem:evans} For the category of finite substructures of the Fra\"iss\'e limit $M^*$ of a Fra\"iss\'e class of finite structures that have a linear order among their relations, the Ramsey property is equivalent to extreme amenability of $\Aut(M^*)$, by the theorem of Kechris, Pestov and Todorcevic \cite[Theorem~4.8]{KPT}, which is stated for such order classes and for colourings of substructures; for ordered structures these are the embeddings; and for an extremely amenable group Evans proves that invariants are exact on compact continuous modules \cite[Lemma~3.7\,(i)]{Ev}, which by Pontryagin duality is the statement that coinvariants are exact on smooth $\Z[G]$-modules. With Proposition~\ref{prop:affine} this gives the first assertion of Lemma~\ref{lem:ramsey} for such categories. The finite proof above, which comes from the runs, is included because Section~\ref{sec:vector} applies the lemma to a category for which we want no limit object, and because it is short. \end{remark} \begin{lemma}\label{lem:Re} Assume \textup{(K1)}. If $\A(M,G,\K)$ has property \textup{(Re)}, then $G$ is amenable. \end{lemma} \begin{proof} Let $G$ act continuously on a non-empty compact Hausdorff space $X$. The invariant probability measures are the intersection, in the compact space of all regular Borel probability measures with the weak* topology, of the closed sets $\{\lambda:|\lambda(f\circ g)-\lambda(f)|\le\eta\}$ for continuous $f\colon X\to[0,1]$, $g\in G$ and $\eta>0$. So it is enough to find, for continuous $f_1,\dots,f_r\colon X\to[0,1]$, elements $g_1,\dots,g_s\in G$ and $\eta>0$, a probability measure $\lambda$ with $|\lambda(f_i\circ g_j)-\lambda(f_i)|\le3\eta$ for all $i,j$. By continuity of the action and compactness of $X$ there is $P\in\K$ with $|f_i(ux)-f_i(x)|<\eta$ for all $x\in X$, $u\in G_P$ and all $i$. Fix $x_0\in X$. For each map $e=g|_P$, $g\in G$, choose one such $g$ and put $c_i(e)=f_i(g^{-1}x_0)$; for any other $g'$ with $g'|_P=e$ we have $g'=gu$ with $u\in G_P$, so $|f_i(g'^{-1}x_0)-c_i(e)|<\eta$. Let $Q\in\K$ contain $P$ and all $g_j^{-1}P$, let $a_0\colon P\to Q$ be the inclusion and $a_j=g_j^{-1}|_P$. By \textup{(Re)} there are $C$ and a probability vector $\nu$ on $\A(Q,C)$ with $\sum_j\|\nu a_j-\nu a_0\|_1<\eta$. Choose $\hat h\in G$ extending each $h\in\A(Q,C)$ and let $\lambda=\sum_h\nu(h)\delta_{\hat h^{-1}x_0}$. Since $\hat h$ extends $ha_0$ and $\hat hg_j^{-1}$ extends $ha_j$, \[ \bigl|\lambda(f_i)-\textstyle\sum_h\nu(h)c_i(ha_0)\bigr|<\eta,\qquad \bigl|\lambda(f_i\circ g_j)-\textstyle\sum_h\nu(h)c_i(ha_j)\bigr|<\eta , \] and $|\sum_h\nu(h)(c_i(ha_j)-c_i(ha_0))|=|\langle c_i,\nu a_j-\nu a_0\rangle|\le\|\nu a_j-\nu a_0\|_1<\eta$. \end{proof} \subsection{Measures on expansions and the transfer theorem} Let $H$ be a subgroup of $G$ and $E(B)=G_B\backslash G/H$ for $B\in\K$. For $B\subseteq C$ there is the surjection $E(C)\to E(B)$, $\zeta\mapsto\zeta|_B$, induced by $G_C\subseteq G_B$, and for $a\in G$ the bijection $a_*\colon E(B)\to E(aB)$, $G_BgH\mapsto G_{aB}agH$. \begin{definition}\label{def:measure} A \emph{normalized invariant measure} with values in a ring $k$ is a family of functions $\mu_B\colon E(B)\to k$, $B\in\K$, each $E(B)$ being finite, such that \begin{itemize} \item[\textup{(i)}] $\sum_{\xi\in E(B)}\mu_B(\xi)=1$; \item[\textup{(ii)}] $\mu_B(\xi)=\sum_{\zeta|_B=\xi}\mu_C(\zeta)$ for $B\subseteq C$ and $\xi\in E(B)$; \item[\textup{(iii)}] $\mu_{aB}(a_*\xi)=\mu_B(\xi)$ for $a\in G$. \end{itemize} \end{definition} Equivalently, it is a $G$-invariant finitely additive function of total mass $1$ on the closed and open subsets of the compact space $X=\varprojlim_BE(B)$, on which $G$ acts continuously by $(ax)_{aB}=a_*(x_B)$. \begin{proof}[Proof of Theorem~\ref{thm:transfer}] (a) Let $R$ be a $k$-algebra and $N$ a smooth $R[G]$-module. For $n\in N$ choose $B\in\K$ with $G_B$ fixing $n$, and for $\xi=G_BgH\in E(B)$ let $f_n(\xi)$ be the class of $g^{-1}n$ in $N_H$. It is well defined: $(ugh)^{-1}n=h^{-1}g^{-1}n$ for $u\in G_B$, $h\in H$, and this has the same class as $g^{-1}n$. Put \[ s_N(n)=\sum_{\xi\in E(B)}\mu_B(\xi)f_n(\xi)\in N_H . \] By (ii) this does not depend on $B$: for $B\subseteq C$ the function $f_n$ on $E(C)$ is the composite of $E(C)\to E(B)$ with $f_n$ on $E(B)$, and any two choices are contained in a third. So $s_N$ is $R$-linear, and it is natural in $N$. For $a\in G$ the element $an$ is fixed by $G_{aB}$ and $f_{an}(a_*\xi)=f_n(\xi)$, so $s_N(an)=s_N(n)$ by (iii). Hence $s_N$ induces $\bar s_N\colon N_G\to N_H$. If $q_N\colon N_H\to N_G$ is the quotient map, then $q_N(f_n(\xi))$ is the class of $n$, and $q_N\bar s_N=\id$ by (i). Now let $N'\subseteq N$ be smooth and let $x\in N'_G$ go to zero in $N_G$. Then $\bar s_{N'}(x)$ goes to zero in $N_H$; as $N'_H\to N_H$ is injective for $R[H]$-modules that are smooth for $H$ (the hypothesis on $H$ over $k$ gives it over $R$, since coinvariants do not depend on the ring), $\bar s_{N'}(x)=0$ and $x=q_{N'}\bar s_{N'}(x)=0$. By Theorem~\ref{thm:dict}, $\A$ is exact over $R$. (b) Let $F$ be the $k$-vector space of the functions $G/H\to k$ that are invariant under $G_B$ for some $B\in\K$, with $(a\varphi)(x)=\varphi(a^{-1}x)$. It is a smooth $k[G]$-module containing the constants. By exactness and Theorem~\ref{thm:dict}, $k=k_G\to F_G$ is injective, so there is a linear form $\ell$ on $F_G$ with value $1$ on the class of the constant function $1$. Let $\mu_B(\xi)$ be the value of $\ell$ on the class of the indicator function $1_\xi$ of $\xi\subseteq G/H$. Then (i) and (ii) hold because $\sum_\xi1_\xi=1$ and $1_\xi=\sum_{\zeta|_B=\xi}1_\zeta$, and (iii) because $a1_\xi=1_{a_*\xi}$. (c) The space $X$ is non-empty and compact, so there is a $G$-invariant Borel probability measure $\lambda$ on it. The measures of the sets $\{x:x_B=\xi\}$ satisfy (i)--(iii) with real values. Composing with a $\Q$-linear map $\R\to\Q$ that sends $1$ to $1$ gives a normalized invariant measure with values in $\Q$, hence in $k$, and by (a) the category $\A$ is exact over $k$. By Proposition~\ref{prop:affine} every finite family of arrows then has an affine equalizer $t$ over $k$. If $\rho\colon k\to\Q$ is $\Q$-linear with $\rho(1)=1$, applying $\rho$ to the coefficients of $t$ gives an affine equalizer over $\Q$, because the conditions $\aug(t)=1$ and $ta_i=ta_0$ are linear with integer coefficients. So $\A$ is exact over $\Q$, hence over every $\Q$-algebra. \end{proof} \begin{remark}\label{rem:zucker} Let $H=\Aut(M^*)$ for an expansion $M^*$ of a homogeneous structure $M$, as in Section~\ref{sec:posets}. Zucker \cite[\S3]{Zu} considers the rational vector space on the set $\Omega$ of expansions of finite substructures and its subspace $V$ spanned by the vectors ``an expansion minus the sum of its extensions along an embedding''. His Theorem~3.1 states, for an excellent pair, that $\Aut(M)$ is amenable if and only if every non-zero vector of $V$ has coefficients of both signs. A normalized invariant measure with values in a field $k$ is a linear form on $k\Omega$ that vanishes on $V$ and takes the value $1$ on the expansion of the empty structure. So, for $H$ as in Theorem~\ref{thm:transfer}, the category is exact over $k$ if and only if that vector does not lie in $V\otimes k$. \end{remark} \section{Posets with an independent linear order}\label{sec:posets} \subsection{Integer weights on linear extensions} Let $(P,\prec,<)$ be in $\Po$; we call $<$ the reference order. A \emph{cell} of $P$ is a sequence $(B_1,\dots,B_b)$ of non-empty pairwise disjoint subsets with union $P$ such that $y\prec z$ implies that the block of $y$ comes before the block of $z$. A cell \emph{sorts to} the linear order on $P$ that lists $B_1,\dots,B_b$ in this order and each block in the reference order; this is a linear extension of $\prec$. For a linear extension $\pi$ of $\prec$ put \[ w_P(\pi)=(-1)^{|P|}\sum_{\text{cells sorting to }\pi}(-1)^{b}, \] where $b$ is the number of blocks. The empty structure has one cell, with $b=0$, and $w_\varnothing=1$. \begin{lemma}\label{lem:weights} The integers $w_P(\pi)$ are invariant under isomorphisms of structures $(P,\prec,<)$, their sum over the linear extensions of $P$ is $1$, and for every subset $Q\subseteq P$, with the induced relations, and every linear extension $\tau$ of $Q$, \[ \sum_{\pi|_Q=\tau}w_P(\pi)=w_Q(\tau). \] \end{lemma} \begin{proof} Invariance is clear. By induction it is enough to prove the identity for $P=Q\cup\{x\}$; the case $Q=\varnothing$ of the general identity is the statement on the sum. Deleting $x$ from a cell of $P$, and its block if it becomes empty, gives a cell of $Q$, and the sorting of the new cell is the restriction of the sorting of the old one. Fix a cell $(B_1,\dots,B_b)$ of $Q$. Let $l$ be the largest index of a block containing an element below $x$ in $\prec$, or $0$, and $u$ the smallest index of a block containing an element above $x$, or $b+1$. Then $l0$. Let $c$ and $d$ be the dimensions of $P$ and $Q$, and $p=2^c-1$, $q=2^d-1$ the numbers of their non-zero vectors. The orders identify the non-zero vectors of $P$ with $\{1,\dots,p\}$ and those of $Q$ with $\{1,\dots,q\}$, and they identify $a_i$ with an increasing injection $\alpha_i$ of $\{1,\dots,p\}$ into $\{1,\dots,q\}$. \emph{Step 1.} The category of finite linear orders and increasing injections has the Ramsey property, by Ramsey's theorem, hence \textup{(Re)} by Lemma~\ref{lem:ramsey}. So there are $m$ and a probability vector $\nu$ on the increasing injections $\{1,\dots,q\}\to\{1,\dots,m\}$ with $\sum_{i=1}^t\|\nu_i-\nu_0\|_1<\varepsilon/3$, where $\nu_i$ is the image of $\nu$ under composition with $\alpha_i$. Extend $\nu$ and the $\nu_i$ by zero to all maps into $\{1,\dots,m\}$. \emph{Step 2.} Let $n\ge d$ and $V=\F_2^n$. Colour the non-zero vectors of $V$ independently and uniformly by $\chi(v)\in\{1,\dots,m\}$, and order $V\setminus\{0\}$ by colour, ties broken by a fixed order. For an injective linear map $g\colon Q\to V$ put $w(g)=\nu(\chi\circ g)$; it is non-zero only if $g$ preserves the orders. Let $e_r(n)=\prod_{j0$. For this colouring $(V,<)$ is an object of $\V$, $w/W$ is a probability vector on $\V(Q,V)$, its images under the $a_i$ are the $X_i/W$, and $\sum_i\|X_i/W-X_0/W\|_1<\varepsilon$. \end{proof} \subsection{The obstruction in characteristic two} \begin{proof}[Proof of Theorem~\ref{thm:vector}\,\textup{(c)}] Let $P=\F_2^2$ with non-zero vectors $x_1