---
title: Gaifman Property in Model Theory
url: https://www.emergentmind.com/topics/gaifman-property
type: topic
---

# Gaifman Property in Model Theory

Searching arXiv for the cited papers and closely related work on the Gaifman property and Gaifman locality.
The expression **Gaifman Property** has two established technical uses. In finite model theory, it usually denotes **Gaifman locality**: the principle that first-order formulas are controlled by bounded-radius neighborhoods in the Gaifman graph, and hence admit decompositions into local and globally separated components. In another model-theoretic tradition, for a complete theory \(T\) with a distinguished unary predicate \(P\), it denotes the **existence property over \(P\)**: every model of the induced theory \(T^P\) occurs as the \(P\)-part of some model of \(T\). The two uses are historically connected by the role of induced relational proximity, but they address different questions—locality of formulas versus realization of induced substructures [2606.11993] [2502.20236].

## 1. Gaifman graphs and the two semantic traditions

For a first-order relational structure
\[
\mathcal A=(A,(R_i)_{i\in I}),
\]
the **Gaifman graph** \(G(\mathcal A)\) has vertex set \(A\), and for distinct \(a,b\in A\),
\[
\{a,b\}\in E(G(\mathcal A)) \iff \exists i\in I\;\exists (u_1,\dots,u_{n_i})\in R_i \text{ such that } a,b\in \{u_1,\dots,u_{n_i}\}.
\]
Equivalently, two elements are adjacent exactly when they **co-occur in some tuple**. In the knowledge-base formulation, there is an edge between \(d,d'\in \mathbf D\) iff they occur together in some fact of some relation, and the graph distance \(\mathtt d_{\mathcal D}(d_1,d_2)\) induces the radius-\(r\) neighborhood
\[
\mathbf N_r(d):=\{x\in \mathbf D\mid \mathtt d_{\mathcal D}(d,x)\le r\}.
\]
These are the basic objects on which locality theorems are formulated [1805.05235] [1610.09369].

This graph-theoretic construction should be distinguished from the relative model-theoretic **Gaifman property over a predicate**. In that setting the relevant object is not a proximity graph but the induced structure on a designated unary predicate \(P\). The resulting ambiguity is substantive: one tradition studies what first-order formulas can see through bounded neighborhoods of the Gaifman graph, while the other asks which \(P\)-structures can be extended to ambient models of \(T\) [2502.20236].

## 2. Classical locality and Gaifman normal form

In the locality sense, a formula becomes local by **relativizing quantifiers to bounded neighborhoods**. If \(\varphi(x)\) is a formula, its \(r\)-local form is obtained schematically by replacing
\[
\exists y\, \psi(x,y,\mathbf z)
\quad\text{by}\quad
\exists y\, \bigl(\mathtt d_{\mathcal D}(x,y)\le r \wedge \psi(x,y,\mathbf z)\bigr),
\]
and
\[
\forall y\, \psi(x,y,\mathbf z)
\quad\text{by}\quad
\forall y\, \bigl(\mathtt d_{\mathcal D}(x,y)\le r \rightarrow \psi(x,y,\mathbf z)\bigr).
\]
A formula \(\psi(x)\) of this form is \(r\)-local, and its truth depends only on the induced \(r\)-neighborhood:
\[
\mathcal D \models \psi(d) \iff \langle \mathbf N_r(d)\rangle \models \psi(d).
\]
A **local sentence** has the form
\[
\exists x_1 \cdots \exists x_k \left( \bigwedge_{1\le i<j\le k} \mathtt d_{\mathcal D}(x_i,x_j) > 2r \wedge \bigwedge_{1\le i\le k} \psi(x_i) \right),
\]
where \(\psi\) is \(r\)-local. The theorem stated in the locality-based literature is: **every first-order sentence is equivalent to a Boolean combination of local sentences** [1610.09369].

A closely related syntactic formulation is **Gaifman normal form**. In the modern presentation, a formula is in Gaifman normal form if it is a Boolean combination of local formulas and **basic local sentences**
\[
\exists x_1\cdots\exists x_m\;\Bigl( \bigwedge_{1\le i<j\le m}\dist(x_i,x_j)>2r \;\wedge\; \bigwedge_{1\le i\le m}\lambda(x_i) \Bigr),
\]
with \(\lambda(x)\) \(r\)-local. The distance constraints isolate pairwise disjoint \(r\)-neighborhoods, so the theorem decomposes first-order definability into a local part and a global pattern of sufficiently separated local witnesses [2606.11993].

## 3. Rank-preserving refinements and algorithmic consequences

Recent work sharpens Gaifman locality by replacing quantifier rank with a new **rank** defined through a hierarchy \(FO^+[p,q]\) over first-order logic extended by distance atoms \(\dist(x,y)\le d\). For a formula \(\varphi\), the rank is
\[
\rk(\varphi)=\min\{q:\varphi\in FO^+[p,q]\text{ for some }p\le q\},
\]
equivalently
\[
\rk(\varphi)=\min\bigl\{q : \varphi\in FO^+[q-|free(\varphi)|,\ q]\bigr\}.
\]
The central theorem states that every \(FO^+\) formula \(\varphi\) of rank \(q\) and with \(k=|free(\varphi)|\) is equivalent to an \(FO^+\) formula \(\varphi'\) in Gaifman normal form with **outer rank** at most \(q\), **inner rank** at most \(q\), **width** at most \(q\), and **radius**
\[
\le \min\{\rho(q-k,q),\, \rho(q-1,q)/2\},
\]
for the auxiliary growth function \(\rho\). The transformation is algorithmic [2606.11993].

This result is explicitly contrasted with quantifier-rank preservation, which fails in general. The point of the new rank is that locality can be exposed **without increasing the relevant logical complexity measure**, while retaining exactly the classical Gaifman normal form. The same paper applies the theorem to simplify the proof that first-order properties of nowhere-dense structures can be decided in time
\[
O(|A|^{1+\varepsilon}),
\]
for every \(\varepsilon>0\), recovering the main algorithmic meta-theorem of Grohe, Kreutzer, and Siebertz in a simpler normal-form framework [2606.11993].

## 4. Extensions and failures beyond ordinary first-order semantics

The locality picture changes sharply for richer logics. For **arb-invariant \(FO+MOD_p\)**, the detailed landscape is nonuniform. On the class of all finite structures, for every \(p\ge 2\), arb-invariant \(FO+MOD_p\) is **neither Hanf nor Gaifman local with respect to a sublinear locality radius**. For odd prime powers \(p\), however, it is **weakly Gaifman local with a polylogarithmic locality radius** on all finite structures, and on the restricted class of string structures it is both Hanf and Gaifman local with a polylogarithmic radius. For even \(p\), failure already appears on strings [1611.07716].

The proof-theoretic mechanism in the positive direction uses **shift locality** together with lower bounds for \(MOD_p\)-circuits, while the negative direction uses order-invariant \(FO+MOD_p\) examples due to Niemistö. This yields a layered conclusion: full Gaifman locality fails on arbitrary finite structures, weak locality survives for odd prime powers, and full locality can be recovered on strings [1611.07716].

A different generalization is given by **semiring semantics**. There, truth values lie in a commutative semiring, and quantifiers are interpreted by semiring sums and products. In this setting, Hanf locality extends to all semirings with idempotent operations, but Gaifman’s theorem is much more fragile. For formulas with free variables, Gaifman normal forms do not generalize beyond the Boolean semiring. For sentences, the theorem fails in the natural semiring and in the tropical semiring, but it does hold constructively for **min-max semirings** and, by lifting, for **lattice semirings**. The same development yields a strengthened Boolean theorem: every sentence has a Gaifman normal form that introduces **no new negations** [2303.12627].

## 5. The Gaifman property over a predicate

In relative model theory, the term **Gaifman property** has a different definition. Let \(T\) be a complete first-order theory with a distinguished unary predicate \(P\), let \(\mathcal C\models T\) be a monster model, and write
\[
\mathcal C^P=\mathcal C|_P,\qquad T^P=\operatorname{Th}(\mathcal C|_P),\qquad P^A=A\cap P^\mathcal C.
\]
A set \(A\) has the **existence property over \(P\)** if
\[
\exists M\models T\quad \big(A\subseteq M \ \wedge\ P^M=P^A\big).
\]
Then \(T\) has the **Gaifman property** iff
\[
\forall N\models T^P\ \exists M\models T\ (P^M=N).
\]
Thus every model of the induced theory on \(P\) occurs as exactly the \(P\)-part of a model of \(T\) [2502.20236].

The necessary closure condition on \(A\) is **completeness**. A set \(A\subseteq\mathcal C\) is complete if for every formula \(\psi(\bar x,\bar y)\) and every \(\bar b\subseteq A\),
\[
\models (\exists \bar x\in P)\psi(\bar x,\bar b)
\ \Longrightarrow\
(\exists \bar a\subseteq P\cap A)\models \psi(\bar a,\bar b).
\]
This expresses that all \(P\)-witnesses to formulas over \(A\) are already present in \(P^A\). The associated relative type space is
\[
S_*(A)=\left\{tp(\bar c/A):P\cap (A\cup \bar c)=P\cap A \text{ and } A\cup \bar c \text{ is complete}\right\},
\]
namely the types that can be realized without enlarging the \(P\)-part [2502.20236].

In the same setting, **relative categoricity** means that for models \(M_1,M_2\models T\), any isomorphism \(M_1^P\cong M_2^P\) lifts to an isomorphism \(M_1\cong M_2\). Pillay formulates the conjecture that relative categoricity should imply the Gaifman property, and calls the latter also **\(P\)-existence** [2602.05866].

## 6. Stability, amalgamation, and current classification-theoretic structure

A substantial recent development connects the Gaifman property over \(P\) to **relative stability**. One paper proves that if \(T\) is **countable** and **fully stable over \(P\)**, then every complete set \(A\) has the existence property; in particular,
\[
\forall N\models T^P\ \exists M\models T\ (P^M=N).
\]
Here stability over \(P\) is measured by the size of \(S_*(A)\), and full stability means that every complete set is stable in that sense [2502.20236].

A later paper recasts the problem through **good systems**, **\(n\)-stability over \(P\)**, and **\(n\)-existence**. A good \(\mathcal P^{-}(n)\)-system is a coherent boundary diagram whose nodes containing \(0\) are elementary submodels of \(\mathcal C\), whose nodes omitting \(0\) are elementary submodels of \(P^{\mathcal C}\), and whose intersections and \(P\)-parts match recursively. The theory \(T\) is \(n\)-stable over \(P\) if the union of every such good boundary system is stable over \(P\). It has \(n\)-existence if every good \(\mathcal P^{-}(n)\)-system extends to a good \(\mathcal P(n)\)-system. The main theorem is that if \(T\) is countable and \(n\)-stable over \(P\) for all \(n<\omega\), then \(T\) has \(n\)-existence for all \(n\), hence the Gaifman property [2507.12631].

Pillay proves complementary partial results on the categoricity side. If \(T\) is relatively \((\omega,\omega)\)-categorical, then any model of \(T^P\) of cardinality at most \(\aleph_1\) is of the form \(M^P\) for some model \(M\models T\). If, in addition, every model \(M\) lies in \(\operatorname{acl}(P(M)\cup F)\) for some finite \(F\subseteq M\), then \(T\) is relatively categorical and has the Gaifman property [2602.05866]. A plausible implication is that the general problem is not merely existential: it belongs to a broader structure/non-structure program over a predicate, in which failure of the Gaifman property should correspond to many non-isomorphic models over \(P\) [2507.12631].

## 7. Adjacent uses: decomposition, data analysis, and relational learning

A further line of work uses the **Gaifman graph** not as a locality theorem but as a representation of co-occurrence structure in data. In this setting, a relational dataset is converted into a Gaifman graph whose vertices are values and whose edges record tuple co-occurrence. Quantitative variants attach multiplicities \(m(x,y)\) to edges, and the resulting complete edge-colored structures are analyzed as **2-structures** through **clans**, **prime clans**, and recursive decompositions. Thresholded, linear colored, and exponential colored Gaifman graphs are then used to reveal patterns in datasets such as Zoo, Titanic, Mushroom, Votes, and hospitalization data [1805.05235] [1910.05146].

This literature is explicit that it is **not** studying Gaifman locality in the finite-model-theoretic sense. Rather, it repurposes the same graph construction as a structural summary of relational data. The conceptual link is genuine but indirect: the graph is still the structure induced by atomic co-occurrence, but the objective is exploratory decomposition rather than locality theorems [1910.05146].

Machine-learning work makes the link operational. **Discriminative Gaifman models** take the locality theorem as motivation and learn from sampled bounded neighborhoods \(\mathbf N_{r,k}(\mathbf d)\) of query tuples, extracting logical and counting features inside those induced substructures. The prediction for a tuple is defined as an expectation over sampled local neighborhoods,
\[
P(\mathsf q[\mathbf s/\mathbf d] = \mathtt{True}) =
\underset{\mathbf N \in \mathbf N_{(r,k)}(\mathbf d)}{\mathbb E}
\left[ p_{\mathcal M}(\mathbf v_{\mathbf N}) \right].
\]
Subsequent work learns the local relational features non-parametrically using **relational tree distances**, again treating Gaifman locality as an inductive bias rather than as an exact decision procedure [1610.09369] [2001.00528].

In this broader landscape, **Gaifman Property** is best understood as a family of closely related notions organized around one construction—the Gaifman graph or, in the over-\(P\) setting, the induced \(P\)-part—but split across distinct questions: locality of first-order formulas, complexity-preserving normal forms, robustness of locality under richer semantics, and existence of ambient models over a distinguished predicate.

Source: https://www.emergentmind.com/topics/gaifman-property