Abstract 1 Introduction 2 Preliminaries and Notation 3 Technical Background on Guarded Fragment 4 Probabilistic Model Constructions 5 Tightness Analysis: Enforcing Large Models 6 Extension to a Stronger Fragment: Triguarded Fragment 7 Derandomisation: Explicit Model Construction 8 Conclusions References

Random Models and Guarded Logic

Oskar Fiuk ORCID Institute of Computer Science, University of Wrocław, Poland
Abstract

Building on ideas of Gurevich and Shelah for the Gödel Class, we present a new probabilistic proof of the finite model property for the Guarded Fragment of First-Order Logic. Our proof is conceptually simple and yields the optimal doubly-exponential upper bound on the size of minimal models. We precisely analyse the obtained bound, up to constant factors in the exponents, and construct sentences that enforce models of tightly matching size. The probabilistic approach adapts naturally to the Triguarded Fragment, an extension of the Guarded Fragment that also subsumes the Two-Variable Fragment. Finally, we derandomise the probabilistic proof by providing an explicit model construction which replaces randomness with deterministic hash functions.

Keywords and phrases:
guarded fragment, finite model property, probabilistic method
Copyright and License:
[Uncaptioned image] © Oskar Fiuk; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Finite Model Theory
Related Version:
Full Version: https://arxiv.org/abs/2601.05247
Acknowledgements:
I am deeply grateful to Prof. Emanuel Kieroński for his guidance and supervision throughout this work. I also thank the third reviewer of ICALP 2025 for providing detailed and valuable feedback on an earlier version of this paper.
Funding:
Polish National Science Center, grant No. 2021/41/B/ST6/00996.
Editors:
Meena Mahajan, Florin Manea, Annabelle McIver, and Nguyễn Kim Thắng

1 Introduction

In this work we consider First-Order Logic (FO) without function symbols of positive arity. The Guarded Fragment (GF) is a fragment of FO in which quantifiers are relativised by atomic formulas. Syntactically, it is obtained by restricting quantification to the forms:

x¯(γ(x¯,y¯)ψ(x¯,y¯))andx¯(γ(x¯,y¯)ψ(x¯,y¯)),

where γ(x¯,y¯) is an atomic formula, called a guard, mentioning all variables in x¯ and y¯.

For example, the following sentence, describing a professor–student scenario, is in GF:

p,s(𝗌𝗎𝗉𝖾𝗋𝗏𝗂𝗌𝖾𝗌(p,s)(¬𝗀𝗋𝖺𝖽𝗎𝖺𝗍𝖾(s)t(𝗉𝗋𝖾𝗉𝖺𝗋𝖾𝗌(s,t)𝗍𝗁𝖾𝗌𝗂𝗌(t)))), (1)

where 𝗌𝗎𝗉𝖾𝗋𝗏𝗂𝗌𝖾𝗌(p,s) and 𝗉𝗋𝖾𝗉𝖺𝗋𝖾𝗌(s,t) serve as guards. In contrast, the following sentence is not in GF, since the quantifier p,s is not guarded by a single atomic formula:

p,s((𝗉𝗋𝗈𝖿𝖾𝗌𝗌𝗈𝗋(p)𝗌𝗍𝗎𝖽𝖾𝗇𝗍(s))t(𝖻𝖾𝗍𝗍𝖾𝗋-𝗍𝗁𝖺𝗇-𝗂𝗇(p,s,t)𝗍𝗈𝗉𝗂𝖼(t))). (2)

Andréka, van Benthem, and Németi [2] introduced the Guarded Fragment as a generalisation of modal logic, aiming to transfer its key properties into the richer framework of First-Order Logic. They established the decidability of satisfiability, and Grädel [18] later proved the complexity to be 2-ExpTime-complete; under bounded number of variables or bounded arity of relation symbols, the complexity drops to ExpTime-complete.

The decidability of GF is impressively robust: it is preserved under numerous extensions, including fixed points [19], transitive or equivalence guards [25, 24], and (negated) conjunctive queries [5]. Further decidable fragments have been obtained by relaxing the notion of a guard. They include the Loosely, Packed, and Clique-Guarded Fragments [30, 26, 17], the Guarded Negation Fragment [6], and the Triguarded Fragment [29].

Motivations.

In addition to decidability, a central question in the study of logical fragments is the finite model property: namely, whether every satisfiable sentence admits a finite model. For the Guarded Fragment, the finite model property is known to hold, with a doubly exponential upper bound (in the length of the sentence) on the size of minimal models.

The first proof of the finite model property for GF was given by Grädel [18], relying on a deep combinatorial theorem by Herwig [21]. While Grädel’s approach was elegant in its logical formulation – using Herwig’s result as a black box – the underlying construction is technically involved. Moreover, this proof yields only a triply-exponential upper bound on the size of minimal models, which is far from being optimal. A significant improvement came from Bárány, Gottlob, and Otto [4], who established an optimal doubly-exponential bound. Their approach involves analysing finite guarded bisimilar covers of hypergraphs and relational structures, substantially generalising Rosati’s finite chase [28]. In fact, their result extends beyond GF, covering the richer setting where (negations of) conjunctive queries are also allowed. A simplified version tailored specifically to GF appears in Pratt-Hartmann’s book [27], though we believe that even this version remains challenging to follow.

As the existing proofs of the finite model property for GF are unexpectedly difficult, it is natural to ask: Can we find simpler proofs of this fundamental result?

A perspective that connects abstract model theory with applied computer science arises in knowledge representation and reasoning, a subfield of artificial intelligence. In this context, the Guarded Fragment can serve as a logical foundation for decidable reasoning frameworks, subsuming and extending the basic description logics (DLs) of the 𝒜𝒞 family (for an introduction to DLs, see, e.g., [3]). Here, objects from applications such as databases, knowledge bases, or computer programs are represented as logical structures, while formulas act as a declarative specification language describing their properties. Algorithms for satisfiability then become reasoning engines: given a formula, they decide whether an object satisfying the imposed logical constraints exists.

Over the years, a variety of algorithms solving satisfiability for the Guarded Fragment have been developed, ranging from purely theoretical decision procedures (e.g., [18]) to practically implementable methods based on resolution, saturation, or tableau (e.g., [9, 23, 22]). A key aspect is that many of these algorithms not only decide satisfiability but also produce a finite combinatorial object: a certificate of formula consistency.

Our interest lies in the subsequent step: How to turn such certificates into explicit finite models? Since smaller models are typically more useful – both for computational efficiency and for practical interpretability – the central challenge is to generate finite models as small as possible: not only close to the theoretical doubly exponential bounds, typically considered up to polynomial slack in the second-level exponent, but actually sharpened to within constant factors and detailed structural parameters of sentences.

Main Contribution.

In this work, we give a new proof of the finite model property for GF, yielding the optimal doubly exponential bound on the size of minimal models. To the best of our knowledge, no earlier proof exhibits comparable simplicity and self-containment.

We employ a probabilistic approach inspired by Gurevich and Shelah’s proof of the finite model property for the Gödel Class [20]. The central idea is the following: given a formula φ and a (possibly infinite) model 𝔄 with 𝔄φ, we define a random procedure that generates a finite structure 𝔅n with domain of size n. We then prove that, once n exceeds a certain threshold depending only on φ, the probability that 𝔅nφ becomes strictly positive. Consequently, some finite 𝔅n must be a model of φ, yielding the finite model property with an upper bound on the minimal model size that matches this threshold.

Applying this probabilistic method to the Guarded Fragment, we establish our main result: every satisfiable GF-sentence φ has a finite model whose domain size is 22𝒪(|φ|log|φ|).

In this work, we assume that |φ| measures the uniform length of φ: formulas are viewed as words over an infinite alphabet consisting of parentheses, logical connectives, quantifiers, variables, relation symbols, and constants, with each symbol contributing 1 to the length.111The uniform length differs from the bit-length of formulas (finite alphabet), in which n distinct variables or symbols requires Θ(nlogn) bits.

To witness the tightness of our upper bound, we construct a family of sentences (φn)n whose minimal models have domains of size at least 22Ω(|φn|log|φn|). It is an improvement upon earlier approaches for enforcing large models in GF, as they only achieved domain sizes of 22Ω(|φn|) (cf. [18]). Consequently, our probabilistic model construction yields an essentially optimal upper bound, up to constant factors in the second-level exponent.

Theorem 1.

There exist universal constants 0<Clb<Cub such that the following holds.

  1. 1.

    Every satisfiable GF-sentence φ has a finite model whose domain size is at most

    22Cub|φ|log|φ|.
  2. 2.

    For every n, there exists a satisfiable GF-sentence φn with |φn|n such that any model of φn must have domain size at least

    22Clb|φn|log|φn|.

The upper bound of Theorem 1 is clean and elegant, but it is stated solely in terms of the length of φ and an unspecified constant in the second-level exponent. We complement this result by deriving a more precise bound on the size of minimal models. For a concise formulation, we express it in terms of the number of (atomic) k-types – that is, maximal consistent configurations of literals over k variables (see Section 2 for a formal definition).

Given a sentence φ, its induced signature σ is the set of all relation and constant symbols occurring in φ. The width of σ, denoted wd(σ), is the maximum arity of any relation symbol in σ. We define the expanded normal-form signature σnf from σ as follows: for every subformula χ of φ that begins with a maximal block of quantifiers and which is not a sentence (i.e., χ has free variables), we introduce a fresh relation symbol Rχ whose arity equals the number of free variables of χ (which is at most wd(σ), since χ is required to be guarded).

Note that the construction of σnf preserves width, i.e., wd(σnf)=wd(σ), does not introduce new constants, and keeps the overall size of σnf linear in |φ|.

Theorem 2.

There exist sequences (Ct)t and (εt)t with Ct>0, εt(0,1/e), and εt0 such that the following holds for every t.

Let φ be any satisfiable GF-sentence, and let σnf be its expanded normal-form signature. Denote k=wd(σnf). If kt2, then φ has a finite model whose domain size is at most

Ct|𝝉kσnf| 11/e+εt,

where 𝛕kσnf is the set of all k-types over σnf.

The exponent in Theorem 2 converges to 11/e0.63 as t. Informally, Theorem 2 can thus be read as stating that every satisfiable GF-sentence admits a finite model of domain size proportional to |𝝉kσnf| 0.63, provided that the width k=wd(σnf) is sufficiently large.

At first sight, working with the expanded normal-form signature rather than the induced one may seem unintuitive. However, this choice is in fact a consequence of the semantics of guarded sentences: a quantified subformula χ(y¯) with free variables y¯ naturally defines a relation in a structure 𝔄, namely Rχ𝔄={a¯𝔄χ(a¯)}. To simplify the quantifier structure of a sentence, a standard technique is to transform it into a suitable normal form (see Section 3 for a definition). The normal-form reduction makes such implicitly defined relations explicit by introducing corresponding relation symbols. As a result, it distinguishes elements that are locally – i.e., at the level of atomic types – indistinguishable in the induced signature, but differ in their satisfaction of quantified subformulas.

Example 3.

To illustrate, consider the following (slightly abstract) GF-sentence:

x(U(x)y,z(P(x,y,z)¬U(y)))u(U(u)v,w(P(u,v,w)U(v))).

This sentence is satisfied in a model 𝔄 with domain {1,2,3}, where U𝔄={1,3} and P𝔄={(1,2,3)}. The variables x, y, z are witnessed by the elements 1, 2, 3; and the variable u by element 3. Notice, however, that in the induced signature σ={P,U}, elements 1 and 3 are indistinguishable at the level of 1-types: both satisfy only the unary predicate U.

Let μ and ν denote the subformulas that begin with quantifiers y,z and v,w, respectively. The expanded normal-form signature introduces two additional predicates Rμ and Rν, which record the different roles of 1 and 3 in the model: Rμ𝔄={1} and Rν𝔄={2,3}.

Finally, note that the subformulas starting with x or u are subsentences; and those with z or w do not begin with a maximal block of quantifiers. Hence we do not introduce fresh relation symbols for them. Thus the resulting signature is σnf={P,U,Rμ,Rν}.

Triguarded Fragment.

The Guarded Fragment (GF) and the Two-Variable Fragment (FO2) are among the most prominent fragments of First-Order Logic. Both capture a wide range of modal and description logics and are decidable, yet they differ substantially and are incomparable in expressive power. In particular, GF cannot express certain basic properties, expressible in FO2, such as s,d((𝗌𝗍𝗎𝖽𝖾𝗇𝗍(s)𝖽𝖾𝖺𝗇(d))𝗄𝗇𝗈𝗐𝗌(s,d)).

To unify these two perspectives, Rudolph and Šimkus [29] introduced the Triguarded Fragment (TGF), building on related ideas developed earlier in [23, 8].

The key idea of TGF is to relax the quantification restrictions of GF: formulas with at most two free variables may be quantified freely, while the guardedness requirement is retained for formulas with three or more free variables (hence the name “tri-guarded”). This way, TGF subsumes both FO2 and GF, while also capturing properties beyond their reach. For instance, in formula (2), the quantifier p,s is admissible in TGF because the quantified subformula has only two free variables, p and s, whereas the quantifier t is required to be guarded, and indeed is by the atom 𝖻𝖾𝗍𝗍𝖾𝗋-𝗍𝗁𝖺𝗇-𝗂𝗇(p,s,t). Hence (2) belongs to TGF.

An important distinction concerns the role of equality. While both FO2 and GF remain decidable in the presence of equality, the satisfiability problem for TGF with equality is undecidable. The reason is that TGF is expressive enough to encode the Gödel Class (i.e., the prefix class ), which was shown to be undecidable in the presence of equality by Goldfarb [13]. Excluding equality suffices to restore decidability of satisfiability, with complexity 2-ExpTime without constants and 2-NExpTime when constants are allowed [29].

Returning to the finite model property, Kieroński and Rudolph [24] proved that the equality-free fragment of TGF has the finite model property, with an optimal doubly exponential bound on minimal model size. Their proof, however, is technically intricate: it uses the finite model property for GF as a black box and adds a further combinatorial construction that carefully glues several structures into a single model.

In contrast, our probabilistic approach to GF extends seamlessly to TGF, yielding a considerably simpler proof of the finite model property for this broader fragment. Moreover, it also achieves the optimal doubly-exponential upper bound on minimal model size.

Theorem 4.

There exists a universal constant C>0 such that the following holds. Let φ be a satisfiable equality-free sentence of TGF. Then φ has a finite model whose domain size is at most

22C|φ|log|φ|.

Derandomisation.

As mentioned earlier, the satisfiability problem for the Guarded Fragment is 2-ExpTime-complete [18]. Yet, although the probabilistic construction shows that every satisfiable sentence has a model of doubly exponential size, this alone does not imply that such a model can be constructed in time matching the decision complexity. Indeed, the number of structures of doubly exponential size is triply exponential.

From a practical point of view, this gap is minor: our randomised construction succeeds with probability at least 1/2 while sampling structures over a domain of doubly exponential size. Nevertheless, from a theoretical standpoint it leaves a conceptual separation between reasoning and model building: deterministic vs. randomised time complexity.

We close this gap by providing a constructive, fully deterministic version of Theorem 1. The central idea is to replace the random choices by carefully selected deterministic ones, using families of hash functions that mimic the statistical properties of true randomness. We then prove that these deterministic choices always produce a valid model.

In our formulation, we rely on the notion of a witness of satisfiability: a finite combinatorial object – namely, a set of k-types satisfying specific closure and consistency properties – that certifies the satisfiability of a sentence. Its definition is deferred to Section 3; for the present discussion it suffices to know that such a witness can be computed from a satisfiable sentence in 2-ExpTime [18, 27]. On this basis we obtain the following constructive guarantee:

Proposition 5.

There exists a deterministic algorithm with the following property: given a witness of satisfiability 𝒲 for a GF-sentence φ, the algorithm constructs a structure 𝔅 with domain of size n such that 𝔅φ, where the parameter n satisfies n=22𝒪(|φ|log|φ|). The algorithm runs in doubly exponential time in the length of φ.

Related Work.

Beyond Gurevich and Shelah’s approach for the Gödel class [20], the probabilistic method has been employed in several other proofs of the finite model property.

One of the earliest and most influential applications of probabilistic techniques in logic is Fagin’s proof of the 01 law for First-Order Logic [10]. A notable consequence of Fagin’s argument is that any finite subset of the theory of the Rado graph admits a finite model.

Goldfarb, Gurevich, and Shelah subsequently extended the approach of the latter two authors to the so-called subminimal Gödel class with identity [16]. Goldfarb later developed probabilistic proofs for additional decidable fragments, namely a solvable Skolem class [15] and the Maslov class [14]. For recent applications of the probabilistic method, see [11, 12].

Technical Overview.

We begin in Section 2 by introducing the basic notation and conventions used throughout the paper. Section 3 provides the necessary background on GF, including its syntax, the normal form, and a satisfiability criterion. Building on this, Section 4 develops probabilistic constructions of finite models for GF. In Section 5, we construct sentences enforcing models that tightly match the upper bound established in Section 4. Section 6 demonstrates that our methods extend naturally to TGF. In Section 7, we give a deterministic procedure for constructing finite models. Finally, Section 8 concludes the paper and discusses directions for future research.

The missing material is provided in the full version of the paper. Beyond the technical details omitted here, the full version also contains additional results, remarks, and examples.

2 Preliminaries and Notation

We denote the set of natural numbers including 0 by . For k, the notation [k] stands for the set {1,,k}, with the convention that [0]=. More generally, we use interval notation [a,b] to denote the set {a,a+1,,b} whenever ab, and the empty set whenever a>b. For a set S, we denote by 2S the powerset of S, and by (Sk) the set of all k-subsets of S. If S, we also use (Sk) for the set {a1,,akSka1<<ak}.

First-Order Logic.

We assume general familiarity with First-Order Logic (FO). The logical symbols are =,,,,,¬,,, and the quantifiers ,. Formulas may also use non-logical symbols: relation symbols of arbitrary arity (from a countably infinite set), constant symbols (also from a countably infinite set), and variables (again countably many). We do not allow function symbols. The length of a formula φ, denoted |φ|, is defined as the total number of symbols it contains, where each occurrence of a symbol – be it a variable, relation symbol, or constant – contributes 1. We use fv(φ) to denote the set of free variables of φ.

A signature σ is a finite set of symbols, partitioned as σ=RelsCons, where Rels is the set of relation symbols and Cons is the set of constant symbols. We require Rels. Every relation symbol RRels comes with associated arity, denoted ar(R). We require ar(R)1. The width of σ, denoted wd(σ), is the maximum arity of any symbol in Rels. The signature of a formula is the finite set of relation and constant symbols that appear in the formula.

We use Fraktur letters such as 𝔄,𝔅, to denote structures, and the corresponding Roman letters A,B, for their domains. A σ-structure 𝔄 is a structure that interprets the symbols in σ: a relation symbol R as a relation R𝔄Ak with k denoting the arity of R; and a constant symbol c as an element c𝔄A. If BA, we write 𝔄B for the restriction of 𝔄 to the subdomain B. Note that B must include all interpretations of constant symbols to remain a σ-structure. The structure 𝔄 is empty if it contains no facts, i.e., R𝔄= for all relation symbols R; however, we do not insist (and even forbid) that the domain is the empty set . The size of a structure is the cardinality of its domain.

With respect to satisfiability, equality between constants can be eliminated by a straightforward reduction: if a formula has a model 𝔄 satisfying c1𝔄=c2𝔄, then c2 can be replaced by c1 throughout the formula, without affecting satisfiability. Thus we work under the standard name assumption requiring that constants are interpreted in structures by themselves. Given a σ-structure 𝔄, we partition its domain A as A0Cons, where A0 and Cons are disjoint sets of unnamed and, respectively, named elements.

Types.

Fix a signature σ=RelsCons. For k, let Litk(σ) denote the set of all non-equality literals over relation and constant symbols from σ and variables x1,,xk.

For k, a k-type over σ is a maximal consistent subset of Litk(σ). A type is simply a k-type for some k. We write 𝝉kσ for the set of all k-types over σ, and 𝝉σ:=k𝝉kσ.

Claim 6.

For every k, we have

|𝝉kσ|=RRels2(k+|Cons|)ar(R)and thus2kwd(σ)|𝝉kσ|2|Rels|(k+|Cons|)wd(σ).

We denote by τall-neg the type consisting exclusively of negative literals (the value of k will be clear from the context).

If k, we write τ2τ1 to indicate that a k-type τ1 is contained in an -type τ2.

For τ𝝉kσ, we define: τ:={γτfv(γ)={x1,,xk}}, and int(τ):=ττ, that is, the boundary and interior of τ. The set of all boundary k-types is 𝝉kσ:={ττ𝝉kσ}.

A k-type τ is called guarded if either k1 or τ contains a positive literal γ with fv(γ)={x1,,xk}, i.e., γτ. Note that necessarily kwd(σ).

Given a k-tuple of distinct unnamed elements a1,,ak of a σ-structure 𝔄, we write tp𝔄[a1,,ak] for the unique k-type realised by a1,,ak in 𝔄. Formally, tp𝔄[a1,,ak] is the set of literals γLitk(σ) such that 𝔄,fγ, where f is the assignment that sends xiai for every i[k]. The collection of all k-types realised in 𝔄 is denoted

𝝉k𝔄:={tp𝔄[a1,,ak]a1,,akACons are pairwise distinct}.

It is convenient to view k-types themselves as σ-structures over the canonical domain {x1,,xk}Cons. This allows us to use structure-like notation; for instance, if τ𝝉3σ, we may write tpτ[x1,x3] for the 2-type induced by τ on the variables x1 and x3.

3 Technical Background on Guarded Fragment

In this section we formally introduce the syntax of the Guarded Fragment, together with the normal form and a satisfiability criterion. The material presented here is mostly a direct adaptation of Grädel’s work [18] and is included primarily for the reader’s convenience. In particular, no claims of novelty are made here. For a comprehensive introduction to the Guarded Fragment, see also Chapter 4 in Pratt-Hartmann’s monograph [27].

Syntax of GF.

We formalise the syntax of the Guarded Fragment in Definition 7.

Definition 7.

The Guarded Fragment (GF) is the set of formulas in First-Order Logic generated by the following rules:

  1. (i)

    Every atomic formula belongs to GF.

  2. (ii)

    GF is closed under Boolean connectives.

  3. (iii)

    Let x¯ be a tuple of variables, let ψ be a formula in GF, and let γ be an atomic formula. If fv(ψ)fv(γ) and x¯fv(γ), then both x¯(γψ) and x¯(γψ) belong to GF.

The atom γ in rule (iii) is called a guard.

Note that equality may serve as a guard: the formula x(x=xψ) is in GF whenever ψGF and fv(ψ){x}. This allows for free quantification over individual elements.

Normal Form.

Let φ be a sentence in GF. Then φ is in normal form if it is a conjunction of a finite number of guarded existential, guarded universal, and guarded Skolem sentences:

tx¯(αt(x¯)ψt(x¯))tx¯(αt(x¯)ψt(x¯))tx¯(αt(x¯)y¯(βt(x¯,y¯)ψt(x¯,y¯))),

where x¯ and y¯ are disjoint tuples of distinct variables, αt(x¯) and βt(x¯,y¯) are guards, and ψt are quantifier-free formulas. The notation ψ(x¯) only highlights that the set of free variables of ψ is contained in the tuple x¯. However, it does not imply that all of them are actually used by ψ. In particular, when ψ is an atom, the variables can occur in any order and with repetitions. Also the actual sets of free variables of αt, βt, and ψt can vary with t. Nevertheless, we require that each conjunct is properly guarded. For every relevant index t, the following must hold: if t corresponds to an existential or universal conjunct, then fv(ψt)fv(αt)=x¯; if t corresponds to a Skolem conjunct, then fv(αt)=x¯ and fv(ψt)y¯fv(βt)x¯y¯, where in both cases the tuples x¯ and y¯ may depend on t.

Lemma 8 reduces the finite model property for GF to the normal-form case. Moreover, any upper bound on minimal model size that depends only on the length and signature, and is proved for normal-form sentences, naturally carries over to arbitrary GF-sentences.

Lemma 8.

Let φ be a GF-sentence over a signature σ. Then there exists a normal-form GF-sentence φnf over an expanded signature σnfσ such that the following conditions hold.

  1. 1.

    The sentences φ and φnf are equisatisfiable.

  2. 2.

    If 𝔅 is a σnf-structure with 𝔅φnf, then the σ-reduct of 𝔅 is a model of φ.

  3. 3.

    |φnf|C|φ| for some fixed constant C>0.

  4. 4.

    The expanded signature σnf is obtained from σ as follows: for every subformula χ of φ that begins with a maximal block of quantifiers and is not a sentence (i.e., has free variables), introduce a fresh relation symbol Rχ whose arity equals the number of free variables of χ (which is at most wd(σ), since χ is required to be guarded).

Satisfiability Criterion.

We now formulate a sufficient criterion for the satisfiability of sentences in GF. This allows us to modularise the argument and clearly separate the general properties of guarded logic from the new components of our proof.

Let σ=RelsCons be a signature. A set of types 𝝉𝝉σ is said to be closed (under reductions) if the following holds: for every τ𝝉 which is a k-type for some k, and for every [0,k] and choice of distinct indices i1,,i[k], the type tpτ[xi1,,xi] also belongs to 𝝉. Further, the set 𝝉 is said to be consistent if it contains a unique 0-type.

Definition 9.

Let σ=RelsCons be a signature, and let 𝛕=k=0wd(σ)𝛕k be a family of sets of k-types over σ, where 𝛕k𝛕kσ for each k[0,wd(σ)]. Let 𝔄 be a σ-structure with domain A, and let Ak={a1,,ak(ACons)ka1,,akare pairwise distinct}.

  1. (i)

    We say that 𝔄 is 𝝉-guarded if, for every k[0,wd(σ)] and every a¯Ak, whenever the k-type tp𝔄[a¯] is guarded, it holds that tp𝔄[a¯]𝝉k.

  2. (ii)

    We say that 𝔄 has the 𝝉-extension property if, for every k[0,wd(σ)1] and every pair (τ1,τ2)𝝉k×𝝉k+1 such that τ2τ1, the following holds: whenever a¯Ak satisfies tp𝔄[a¯]=τ1, there exists an element bA(a¯Cons) such that tp𝔄[a¯,b]=τ2.

Lemma 10.

Let φ be a normal-form GF-sentence over a signature σ=RelsCons. Suppose φ is satisfiable. Then there exists a closed and consistent family of sets of k-types 𝛕=k=0wd(σ)𝛕k, where 𝛕k𝛕kσ for each k[0,wd(σ)], such that the following holds: whenever a σ-structure 𝔅 is 𝛕-guarded and satisfies the 𝛕-extension property, then 𝔅φ.

Let φ be a GF-sentence in normal form. If a family of sets of k-types 𝝉=k=0wd(σ)𝝉k satisfies the conditions of Lemma 10, then we call it a satisfiability witness for φ. Assuming that φ is satisfiable, one may obtain a satisfiability witness for φ by taking the collection of all k-types, with kwd(σ), that are realised in some (possibly infinite) model of φ. This argument is inherently non-constructive; see [27] for a procedure that decides satisfiability and, if so, computes a corresponding satisfiability witness in 2-ExpTime.

W.l.o.g. we will always assume 𝝉k for all k[0,wd(σ)]. By Claim 6, we have that

|𝝉|=k=0wd(σ)|𝝉k|k=0wd(σ)2|Rels|(k+|Cons|)wd(σ)=22𝒪(|φ|log|φ|), (3)

provided that σ=RelsCons is the induced signature of φ.

4 Probabilistic Model Constructions

In this section we establish Theorems 1 and 2. We begin with an informal overview of the probabilistic approach (Subsection 4.1), and then develop the technical details in two stages. First, in Subsection 4.2, we present the baseline method of Independent Sampling, which already yields a doubly-exponential upper bound, sufficient for proving Theorem 1. Next, in Subsection 4.3, we refine the construction via Markovian Sampling, achieving a sharper bound that is necessary for proving Theorem 2.

4.1 Informal Overview

To gain intuition, let us start with Gurevich and Shelah’s probabilistic proof of the finite model property for the Gödel Class [20]. Consider a sentence φ in the shape of x1,x2yψ, where ψ is quantifier-free and uses only predicates of arity 1 and 2. Assuming that φ has a model 𝔄, we generate a finite random structure 𝔅 as follows. First prepare a domain B of size n and assign to its elements the 1-types realised in 𝔄, so that each 1-type is assigned roughly to the same number of elements. Then we set the 2-types: for each pair of distinct elements b1,b2 choose a 2-type randomly from those 2-types realised in 𝔄 whose endpoints agree with the already defined 1-types of b1 and b2. When n is large enough, the structure 𝔅 becomes a finite model of φ. To see this, consider any two elements b1,b2 of 𝔅. Let a1,a2 be a pair in 𝔄 realising the same 2-type as b1,b2. With probability at least 12δn, for a certain fixed independent of n number δ>0, some element b3 of 𝔅 extends the 2-type of b1,b2 to a 3-type in the same way as a correct witness a3 in 𝔄 extends the 2-type of a1,a2. By the union bound over all such pairs b1,b2, we get [𝔅⊧̸φ]n22δn0.

Imagine now a hypothetical generalisation of this method to sentences in the shape of φ=x1,x2,x3yψ, where ψ uses symbols of arbitrary arity. We first assign 1-types, then randomly choose 2-types, …and when trying to assign 3-types, we get stuck. Indeed, the independent random choices could generate a configuration of 2-types on pairs b1,b2, b2,b3, and b1,b3 which is not induced by any 3-type realised in 𝔄.

Suppose now that φ is a guarded sentence in normal form. If we decide not to put any facts speaking about {b1,b2,b3} or any of its supersets, then a guarded sentence cannot notice that this unintended pattern has occured. Therefore, the following strategy appears natural. We first assign the 1-types, then proceed by randomly choosing the 2-types, and for the 3-types we act as follows. For each triple b1,b2,b3, we randomly select a 3-type τ. However, before assigning τ to b1,b2,b3, we first check whether τ is compatible with the pattern induced by the previously defined 2-types on b1,b2,b3. (We make the notion of compatibility precise in a moment.) If it is indeed compatible, then we set the 3-type of b1,b2,b3 to τ; otherwise, we simply omit this triple and continue with the remaining ones. In a similar manner, we can then specify the k-types also for k>3.

Assuming an appropriate choice of the parameter n and relying on careful probability estimates, we show that, although many tuples are omitted due to conflicts between k-types, there is still a significant chance that all required witnesses exist for all tuples. Consequently, we conclude that there is a sequence of random choices that produces a finite model 𝔅 for φ.

4.2 Baseline: Independent Sampling

In this subsection we prove Proposition 11. Combined with Lemmas 8 and 10, it yields the upper bound of Theorem 1: every satisfiable GF-sentence φ admits a finite model whose domain has cardinality 22𝒪(|φ|log|φ|). (The lower bound of Theorem 1 is proven in Section 5.)

Proposition 11.

There exists a constant C>0 such that the following holds. Let φ be a normal-form GF-sentence with signature σ=RelsCons. If 𝛕𝛕σ is a satisfiability witness for φ, then φ has a finite model with unnamed domain of size at most

C|𝝉|2wd(σ).

To prove Proposition 11, we describe a procedure that generates a σ-structure 𝔅 from a witness of satisfiability 𝝉=k=0wd(σ)𝝉k. The procedure is given in Algorithm 1. In addition to 𝝉, the algorithm takes as input a parameter n, specifying the size of the unnamed part of the domain of 𝔅. The analysis of the algorithm is carried out in Lemma 12.

Algorithm 1 Model generation from a satisfiability witness via Independent Sampling.

In Algorithm 1, we rely on the following notion to determine a set of k-types to which a given configuration of atoms can be extended. Let k and let τ1,τ2 be k-types. We say that τ1 and τ2 are compatible if these k-types agree on every literal that mentions a strict subset of the variables {x1,,xk}, i.e., the interiors of τ1 and τ2 are the same: int(τ1)=int(τ2). For instance, 2-types are compatible if they agree on the 1-types corresponding to their endpoints x1 and x2 but possibly differ on some literals that use both x1 and x2; similarly 3-types are compatible if they agree on the 2-types induced on x1,x2, x2,x3, and x1,x3 but possibly differ on some literals that use simultaneously x1, x2, and x3; and so on for larger k. In particular, 1-types are compatible if they agree on constants.

Lemma 12.

There exists a fixed constant C>0 such that the following holds: if σ is the signature of φ, 𝛕=k=0wd(σ)𝛕k is a satisfiability witness for φ, and the parameter n is chosen so that

nC|𝝉|2wd(σ),

then the structure 𝔅 generated by Algorithm 1 satisfies 𝔅φ with probability at least 1/2.

Proof of Lemma 12.

W.l.o.g. assume |𝝉|3.222If 𝝉={τ0} with τ0 the unique 0-type, then φ is satisfiable already in the domain Cons. If 𝝉={τ0,τ1} where τ0 is a 0-type and τ1 a 1-type, then φ is satisfiable in the domain Cons{1}. Set δ=|𝝉|2wd(σ)1.

For the analysis, we introduce a family of random variables 𝒳={𝒳(b¯)b¯k=1wd(σ)([n]k)}. For each k[wd(σ)] and each k-tuple b¯([n]k), the variable 𝒳(b¯) records the k-type τ chosen by Algorithm 1 at Line 1 when processing b¯. Thus, 𝒳(b¯) is uniformly distributed over 𝝉k, and the variables in 𝒳 are mutually independent.

Note that each k-tuple b¯=b1,,bk([n]k) is assumed to be ordered increasingly. For a permutation ρ:[k][k], we will naturally write 𝒳(bρ(1),,bρ(k))=tp𝒳(b¯)[xρ(1),,xρ(k)], i.e., 𝒳(ρ(b¯)) is the k-type 𝒳(b¯) reindexed according to ρ. This convention is adopted mainly for convenience in later proofs. As the witness of satisfiability 𝝉 is closed under reductions (and hence under permutations of k-types), this convention will not be problematic.

Claim 13.

For every k[wd(σ)] and every k-tuple b1,,bk([n]k), the following holds:

  1. 1.

    For any k-type τ𝝉k, we have tp𝔅[b1,,bk]=τ whenever

    tpτ[xi1,,xit]=𝒳(bi1,,bit) for every t[k] and every 1i1<<itk.
  2. 2.

    If -tp𝔅[b1,,bk]τall-neg, then tp𝔅[b1,,bk]=𝒳(b1,,bk).

Proof.

Observe first that Algorithm 1 initialises 𝔅 with facts only on the constants, and subsequently proceeds by monotonically adding new facts in each iteration. More precisely, when processing a tuple b¯, there are two possibilities: either 𝔅 remains unchanged, or the k-type on b¯ is set to tp𝔅[b¯]=𝒳(b¯). Crucially, the latter occurs only if 𝒳(b¯) is compatible with the atoms already defined in 𝔅, i.e., int(tp𝔅[b¯])=int(𝒳(b¯)). Thus, only the boundary of tp𝔅[b¯] – that is, the facts R(a¯) whose scope satisfies b¯a¯b¯Cons – may be modified: -tp𝔅[b¯] is set to 𝒳(b¯). Moreover, boundaries corresponding to distinct tuples b¯ are disjoint, and therefore never interfere with each other. Consequently, for every b¯, we have either

-tp𝔅[b¯]=𝒳(b¯)andint(tp𝔅[b¯])=int(𝒳(b¯)),

or else -tp𝔅[b¯] remains equal to τall-neg throughout.

The claim follows easily from the above explanation. Item 1 can be proven by induction over the subtuples of b¯=b1,,bk. Assume that every proper subtuple bi1,,bit has already been assigned the t-type tpτ[xi1,,xit]. Since 𝒳(b¯)=τ, the compatibility test at Line 1 succeeds, and the algorithm assigns the type 𝒳(b¯) to b¯. Item 2 is immediate.

The proof of Lemma 12 rests on three auxiliary claims. Claim 14 establishes that 𝔅 is 𝝉-guarded with certainty. Claims 15 and 16 establish that 𝔅 satisfies the 𝝉-extension property with probability at least 1/2. By Lemma 10, these two properties imply 𝔅φ.

Claim 14.

The structure 𝔅 is 𝝉-guarded in every realisation, i.e., deterministically.

Proof.

It is readily verified that the 0-type of 𝔅 is the unique element of 𝝉0. Likewise, every 1-type realised in 𝔅 comes from 𝝉1: for every b[n], its 1-type tp𝔅[b] is given by 𝒳(b)𝝉1.

For k[2,wd(σ)], we fix a k-tuple b¯([n]k) such that its k-type tp𝔅[b¯] is guarded, i.e., it contains a positive literal γ with fv(γ)={x1,,xk}. As γ belongs to the boundary of tp𝔅[b¯], we have that -tp𝔅[b¯]τall-neg. From Claim 13, it follows that tp𝔅[b¯]=𝒳(b¯)𝝉k.

Claim 15.

Let k[0,wd(σ)1] and let b¯([n]k). Fix a k-type τ1𝝉k and a (k+1)-type τ2𝝉k+1 satisfying that τ2τ1. Define ail(τ2τ1;b¯) to be the probabilistic event that

tp𝔅[b¯]=τ1andtp𝔅[b¯,b]τ2 for every b[n]b¯.

Then [ail(τ2τ1;b¯)]eδ(nwd(σ)).

Proof.

Assume that [tp𝔅[b¯]=τ1]>0, as otherwise [ail(τ2τ1;b¯)]=0 and the claim holds trivially. We condition on the probabilistic event {tp𝔅[b¯]=τ1}.

Enumerate the elements of b¯ as b1,,bk. Let us fix bk+1[n]b¯. We argue that, with probability at least δ, it happens that {tp𝔅[b¯,bk+1]=τ2}. From Claim 13, it follows that tp𝔅[b1,,bk+1]=τ2 whenever, for every t[k+1] and every 1i1<<itk+1, we have that 𝒳(bi1,,bit)=tpτ2[xi1,,xit]. Since τ2τ1 and {tp𝔅[b¯]=τ1} is fixed, we can restrict our attention to subsequences having it=k+1. Consequently, the random event {tp𝔅[b¯,bk+1]=τ2}, under the condition {tp𝔅[b¯]=τ1}, can be expanded as

0tk1i1<<itk{𝒳(bi1,,bit,bk+1)=tpτ2[xi1,,xit,xk+1]}. (4)

Using the independence of variables in 𝒳, the probability [tp𝔅[b¯,bk+1]=τ2tp𝔅[b¯]=τ1] can be lower bounded by δ as follows:

0tk1i1<<itk[𝒳(bi1,,bit,bk+1)=tpτ2[xi1,,xit,xk+1]|tp𝔅[b¯]=τ1]
=t=0k|𝝉t+1|(kt)t=0k|𝝉|(kt)=|𝝉|2k|𝝉|2wd(σ)1=δ. (5)

We keep the k-tuple b¯, the k-type τ1, and the (k+1)-type τ2 fixed as before, as well as the condition {tp𝔅[b¯]=τ1}. We now bound the probability that no candidate b for bk+1 makes tp𝔅[b¯,bk+1]=τ2. Since {tp𝔅[b¯]=τ1} is fixed, the events {tp𝔅[b¯,b]=τ2}, where b ranges the set [n]b¯, are mutually independent. Indeed, by (4), they are generated by disjoint subsets of 𝒳. Hence the event ail(τ2τ1;b¯) happens with probability at most

b[n]{b1,,bk}[tp𝔅[b¯,b]τ2|tp𝔅[b¯]=τ1](1δ)nkeδ(nwd(σ)). (6)

In the last inequality, we use that 1δeδ, for any δ, to move δ to the exponent.

We conclude that [ail(τ2τ1;b¯)]eδ(nwd(σ)), as claimed.

Claim 16.

Let K=8δ1(wd(σ)+ln|𝝉|). If nKlnK, then the structure 𝔅 satisfies the 𝝉-extension property with probability at least 1/2.

Proof.

The structure 𝔅 satisfies the 𝝉-extension property precisely when none of the events ail(τ2τ1;b¯) occur. Applying the union bound, we estimate the probability of the complementary event – that at least one of the events ail(τ2τ1;b¯) occurs – as follows:

b¯,τ1,τ2Ω[ail(τ2τ1;b¯)]nwd(σ)|𝝉|eδ(nwd(σ)), (7)

where the summation ranges over the set

Ω=k=0wd(σ)1{b¯,τ1,τ2([n]k)×𝝉k×𝝉k+1|τ2τ1}. (8)

The notation b¯([n]k) implicitly assumes that b¯ is sorted in increasing order. Since 𝝉 is closed, it suffices to consider the events ail(τ2τ1;b¯) only for such tuples.

By Claim 15, we have the estimate on probability: [ail(τ2τ1;b¯)]eδ(nwd(σ)). Since τ2 determines τ1 and k=0wd(σ)1(nk)nwd(σ) for all n2, we have the estimate on size: |Ω|nwd(σ)|𝝉|. Combining these estimates yields (7).

Let p denote the right side of (7). We require p1/e<1/2. Taking natural logarithms on both sides of p1/e yields

wd(σ)lnn+ln|𝝉|δ(nwd(σ))1. (9)

Rearranging (9) to isolate n gives

nδ1(wd(σ)lnn+ln|𝝉|+1)+wd(σ). (10)

By collecting the terms in (10) into two groups ν and μ, we can rewrite the inequality as

nνlnn+μ,whereν=δ1wd(σ)andμ=δ1(ln|𝝉|+1)+wd(σ).

The inequality nνlnn+μ holds whenever n4(ν+μ)ln(ν+μ). Since

ν+μ=δ1(wd(σ)+ln|𝝉|+1)+wd(σ)2δ1(wd(σ)+ln|𝝉|)K/4,

it follows that choosing nKlnK ensures p1/e, thereby establishing the claim.

We conclude now the proof of Lemma 12. Since |𝝉|3 and δ1=|𝝉|2wd(σ)1, it holds wd(σ)ln(δ1) and ln|𝝉|ln(δ1). In consequence, the number K from Claim 16 satisfies K16δ1lnδ1. Hence there exists a constant C>0 such that

KlnK16δ1lnδ1ln(16δ1lnδ1)asymptotically dominated by δ1Cδ2. (11)

We derive the threshold of Lemma 12 directly from Claim 16 and inequality (11):

nCδ2=C|𝝉|22wd(σ)1=C|𝝉|2wd(σ). (12)

4.3 Alternative: Markovian Sampling

It is important to note that Proposition 11, proved in Section 4.2, is not strong enough to yield Theorem 2. To achieve the sharper bound stated in Theorem 2, we refine the method of Section 4.2 and establish Proposition 17. Theorem 2 then follows from the observation that |𝝉wd(σ)1σ||𝝉wd(σ)σ|1/eε, where ε0 as the width wd(σ).

Proposition 17.

There exists a constant C>0 such that the following holds. Let φ be a normal-form GF-sentence with signature σ=RelsCons. If φ is satisfiable, then it has a finite model with unnamed domain of size at most

C|𝝉wd(σ)σ||𝝉wd(σ)1σ|(ln|𝝉wd(σ)σ|)2.

Let us first see where the bottleneck of Algorithm 1 occurs. When processing a tuple b¯, Algorithm 1 samples a k-type τ uniformly at random, independently of all previous choices. Only a posteriori it verifies whether the chosen τ is compatible with the already defined structure on tp𝔅[b¯]. This leads to a loss of probability, as many samples are rejected.

To improve this, we incorporate information from previous decisions directly into the sampling process. The key idea is to replace independent sampling with a Markovian scheme: when considering a tuple b¯, we first determine whether the pattern induced by the already fixed structure on tp𝔅[b¯] can be extended to a k-type in 𝝉k. If so, we choose uniformly at random among the k-types that are compatible with this pattern; if not, we simply omit the tuple b¯, forcing all atoms involving precisely those unnamed elements to be false. In this way, every random choice has a higher chance of being accepted, boosting the overall success probability of the procedure.

We formalise this idea in Algorithm 2. Its analysis follows the same general scheme as that of Algorithm 1 (Lemma 12). In particular, Claims 13 and 14 remain valid without modification. The analogue of Claim 15 requires exploiting the Markov property in place of full independence. The details are deferred to the full version.

Algorithm 2 Model generation from a satisfiability witness via Markovian Sampling.

5 Tightness Analysis: Enforcing Large Models

Setting wd(σ)=Θ(|φ|), Proposition 11 provides an upper bound of 22𝒪(|φ|log|φ|) on the size of minimal finite models for sentences in GF. In this section we show that this bound is essentially tight: we explicitly construct a family of GF-sentences whose minimal models match this doubly exponential upper bound, up to constant factors in the second-level exponent. Hence we establish the lower bound of Theorem 1: for specific sentences φ, models of size 22Ω(|φ|log|φ|) are necessary.

Proposition 18.

There exists a family of GF-sentences (φn)n such that each φn contains neither constants nor equality, is over a signature σn with wd(σn)=n+4, satisfies |φn|Cn for some fixed constant C>0, and is satisfiable, but only in domains of size at least 2n!.

The general strategy for enforcing large models is to encode within them a combinatorial object of the desired size. A well-known technique for enforcing models of size 22n is to encode 2n-bit numbers from the range [0,22n1]. However, let us highlight that the standard constructions appearing in the literature (e.g., [18, 27]) yield formulas of size Θ(n2). Consequently, they enforce models of size only 22Ω(|φ|), which is asymptotically much smaller than the upper bound 22𝒪(|φ|log|φ|) from Proposition 11; even when compared at the doubly logarithmic scale, since n/(nlogn)0. That said, it should be noted that these lower bounds were developed primarily to establish complexity lower bounds, rather than to enforce large domain sizes.

The bottleneck arises from the way these encodings represent 2n-bit numbers: fix two distinct elements a,b. A pair (a,b) is used to encode a 2n-bit number v. The k-th bit of v is set to 1 precisely when the atom Bit(c1,,cn) holds, where the tuple c1,,cn{a,b}n corresponds to the binary representation of k. Otherwise the k-th bit of v is set to 0.

Yet, specifying that some two sequences c1,,cn and c1,,cn correspond to respectively the k-th and (k+1)-st bits of v requires examining n different cases to account for potential carries, which forces formulas of size Ω(n2).

To reach the optimal lower bound of 22Ω(|φ|log|φ|) a different construction is required. Our approach is to encode the powerset of the set of all permutations of n elements, which has cardinality 2n!=22Θ(nlogn). We use a certain decomposition of permutations from [12] to achieve this with formulas of length 𝒪(n), thereby ensuring the desired growth rate.

Proof of Proposition 18.

Fix an integer n3. We shall construct a GF-sentence φn designed to encode the powerset of Sn (the set of permutations of {1,,n}). The signature of φn contains the following relation symbols:

σn={Wit,Mem,Adj,Gen,Inc,Dec,Succ,P1,,Pn,Q1,,Qn1}, (13)

where the arity of Wit and Mem is n+1; of Adj is n+2; of Gen, Inc, and Dec is n+3; of Succ is n+4; and the symbols Pi and Qi are all unary. We write x¯=x1,,xn and y¯=y1,y2 for the short-hand tuples that occur repeatedly below. Let πcyc denote the cyclic permutation 12n1, and let πswp denote the transposition swapping 1 and 2.

The construction relies on encoding subsets of the symmetric group Sn. We begin with a fixed “ground set” of size n, represented by some n-tuple of elements, denoted a¯.

For every subset FSn we postulate the existence of a witness element wF. The witness wF is linked uniformly to all permutations of the ground set: for each πSn we require Wit(π(a¯),wF). The actual membership of a permutation π in F is then expressed via the predicate Mem: Mem(π(a¯),wF) if and only if πF. This forces distinct subsets F,F to be represented by distinct witnesses wFwF. Thus, if we succeed in enforcing the existence of witnesses for all subsets of Sn, the model will contain at least 2n! distinct elements.

To navigate between different subsets, observe that one can transform any subset FSn into any other FSn by toggling permutations one by one. We capture this stepwise modification using the relation Adj: the atom Adj(π(a¯),wF,wF) is intended to hold precisely when the symmetric difference of F and F is the singleton {π}.

To axiomatise the relation Adj, we employ a certain decomposition of permutations, which will be implemented using the remaining auxiliary predicates. Details of this decomposition and its encoding will be presented below.

We first postulate the existence of the ground set and an initial witness:

x¯,y(Wit(x¯,y)i=1nPi(xi)). (14)

In what follows, we denote the tuple witnessing for x¯ by a¯=a1,,an. We require the components of a¯ to be pairwise distinct. For this we axiomatise that ¬Pi(x)¬Pj(x) holds for distinct ij. However, the obvious sentence would be of size Θ(n2). To keep the formula of size linear in n, we use the auxiliary predicates Q1,,Qn1:

i=2nx(Pi(x)Qi1(x))i=2n1x(Qi(x)Qi1(x))i=1n1x(Qi(x)¬Pi(x)). (15)

Next, we ensure that witnesses respect the intended invariant: for every witness y and every permutation πSn we must have Wit(π(a¯),y). Since Sn is generated by πcyc and πswp, it suffices to enforce closure under these two transformations:

x¯,y(Wit(x¯,y)(Wit(πswp(x¯),y)Wit(πcyc(x¯),y))). (16)

We now enforce that every set F can be extended to a set F differing precisely on a single permutation π. Formally, we require that for each permutation tuple π(a¯) and each witness y1, there exists another witness y2 that differs exactly on the membership of π:

x¯,y1(Wit(x¯,y1)y2(Adj(x¯,y1,y2)Wit(x¯,y2)(Mem(x¯,y1)Mem(x¯,y2)))). (17)

To axiomatise that the witnesses y1 and y2 agree on every other permutation ππ, i.e., Mem(π(a),y1)Mem(π(a),y2), we employ the following combinatorial lemma.

Lemma 19 (Lemma 7.2 in [12]).

Let π,πSn be permutations. Then ππ if and only if π=πcycjρπcyckπ for some 0j<k<n and some ρSn fixing n (i.e., ρ(n)=n).

We implement the decomposition of Lemma 19 using the auxiliary predicates Gen, Inc, Dec, and Succ. Intuitively: Inc increases the counter along powers of πcyc; Gen introduces the action of ρ restricted to [n1], generated by πswp and πcyc: 12n11; Dec decreases the counter via powers of πcyc1; and Succ provides the successor relation on the counter elements. The counter itself is represented by the last argument, where an element marked by Pi with 1in1 indicates the difference i:=kj (j, k as in Lemma 19). This ensures that we never reach 0 or n, thereby avoiding the trivial case π=π.

We axiomatise Succ as:

x¯,y¯,z,z(Succ(x¯,y¯,z,z)i=1n2(Pi(z)Pi+1(z))). (18)

Next, we generate permutations of the form πcyckπ for 0<k<n:

x¯,y¯(Adj(x¯,y¯)z(Inc(πcyc(x¯),y¯,z)P1(z))), (19)
x¯,y¯,z(Inc(x¯,y¯,z)(Pn1(z)z(Succ(x¯,y¯,z,z)Inc(πcyc(x¯),y¯,z)))). (20)

Then, we generate permutations of the form ρπcyckπ, where ρ fixes n. The subgroup {ρSnρ(n)=n} is induced by πswp and πcyc: 12n11. We enforce:

x¯,y¯,z(Inc(x¯,y¯,z)Gen(x¯,y¯,z)), (21)
x¯,y¯,z(Gen(x¯,y¯,z)(Gen(πcyc(x¯),y¯,z)Gen(πswp(x¯),y¯,z))). (22)

Finally, we generate permutations of the form πcycjρπcyckπ with 0j<k<n:

x¯,y¯,z(Gen(x¯,y¯,z)Dec(x¯,y¯,z)), (23)
x¯,y¯,z(Dec(x¯,y¯,z)(P1(z)z(Succ(x¯,y¯,z,z)Dec(πcyc1(x¯),y¯,z)))). (24)

By Lemma 19, every ππ admits a representation such that Dec(π(a¯),y1,y2,z) holds. We then enforce membership agreement between y1 and y2 on all such permutations:

x¯,y1,y2,z(Dec(x¯,y1,y2,z)(Mem(x¯,y1)Mem(x¯,y2))). (25)

We define φn to be the conjunction of the sentences (14)–(25). Since each conjunct has length 𝒪(n), the resulting sentence φn satisfies |φn|=𝒪(n). Moreover, the signature σn of φn has width n+4, as required. Finally, by the discussion above, φn guarantees the existence of a distinguished tuple a¯ and, for every subset FSn, a corresponding witness wF. Since the elements wF and wF are distinct whenever FF, every model of φn contains at least 2n! distinct elements. This completes the proof of Proposition 18.

6 Extension to a Stronger Fragment: Triguarded Fragment

The Triguarded Fragment (TGF) extends the Guarded Fragment by admitting one additional rule in the syntax of GF (Definition 7):

  1. (iv)

    Let x,y be variables and let ψ be a formula in TGF. If fv(ψ){x,y}, then both xψ and xψ belong to TGF.

Rule (iv) relaxes the guarding requirement of GF in the case of formulas with at most two free variables. Thus, TGF permits unguarded quantification over pairs of elements. To compare, recall that GF allows for free quantification only over individual elements.

In this section we establish Theorem 4, showing that the equality-free subfragment of TGF enjoys the finite model property with a doubly exponential upper bound on model size.

Proof of Theorem 4.

To unify the syntax of GF and TGF, it is convenient (following [29]) to introduce an auxiliary fragment, denoted GFU. This is simply GF over signatures extended by a distinguished binary symbol U, interpreted as the full binary relation on the domain. In the terminology of description logics, U is referred to as a universal role. With this convention, rule (iv) can be viewed as a special case of the guarded quantifier rule (iii), with U acting as a dummy guard for formulas with at most two free variables. In particular, Theorem 4 is obtained as a corollary of Theorem 1, in combination with the following lemma.

Lemma 20.

Let 𝛕=k=0wd(σ)𝛕k be a satisfiability witness, and let n be arbitrary. Assume that 𝛕 satisfies the following condition:

for every pair of 1-types τ1,τ2𝛕1, there exists a 2-type τ1,2𝛕2 such that
its endpoints are τ1 and τ2, that is, tpτ1,2[x1]=τ1 and tpτ1,2[x2]=τ2.

Then Algorithm 2 given 𝛕 and n generates the structure 𝔅 with the property that between every pair of elements the 2-type is defined, i.e., tp𝔅[a,b]𝛕2 for all distinct a,b[n].

The constraint on the satisfiability witness 𝝉 in Lemma 20 guarantees that the symbol U is interpreted as a universal relation: it ensures that Algorithm 2 always has at least one compatible 2-type to assign to every pair of elements.333Note that this property does not hold for Algorithm 1, since it selects 2-types from the entire space rather than restricting to those compatible with the already assigned 1-types.

The model construction for GFU is clearly sound: given a witness 𝝉 satisfying the constraint of Lemma 20, the algorithm produces a valid model 𝔅. A natural question is whether this condition is also complete – i.e., whether for every satisfiable GFU-sentence we can always find a model 𝔄 of φ and extract a witness 𝝉 from 𝔄 that satisfies this constraint.

The sufficient condition for completeness is straightforward: the only problematic case arises when both 1-types are identical. Hence the requirement reduces to ensuring that, for every 1-type realised in a model, there exist at least two distinct unnamed elements realising it.444Recall that, by our (non-standard) convention, 1-types are defined only for unnamed elements. A standard argument shows that such models always exist for equality-free sentences: given a structure 𝔄, we define 2𝔄 to be a structure with domain {0,1}×A, where each constant c is identified with (c,0). For every relation symbol R and every sequence i1,,ik{0,1}, we put R2𝔄((a1,i1),,(ak,ik)) whenever R𝔄(a1,,ak). Then 𝔄 and 2𝔄 satisfy the same equality-free sentences (see Lemma 6.2.26 in [7]).

Consequently, by the reduction to the equality-free GFU, this establishes Theorem 4.

7 Derandomisation: Explicit Model Construction

In Section 4 using probabilistic arguments we established Theorem 1: every satisfiable sentence φ of GF admits a finite model of doubly exponential size. However, the probabilistic proof is inherently non-constructive: it does not produce a concrete model of φ, but instead shows only that models of φ constitute a non-zero fraction of all structures of the given size.

We now turn to a constructive variant of Theorem 1. Our strategy is to derandomise the probabilistic proof by giving explicit values for the random choices in Algorithm 1. The resulting deterministic procedure (Algorithm 3) relies on algebraic hash functions to simulate randomness, and we prove that with appropriate parameters, it always produces a valid model (Lemma 21).

Algorithm 3 Deterministic model generation from a satisfiability witness.
Lemma 21.

Let σ be the signature of φ, and let 𝛕=k=0wd(σ)𝛕k be a satisfiability witness for φ. Suppose the hash parameters p1,,p2wd(σ)1 are chosen so that

  1. 1.

    p1,,p2wd(σ)1 are all prime, and

  2. 2.

    |𝝉wd(σ)σ|p1<<p2wd(σ)1.

Then the structure 𝔅 generated by Algorithm 3 satisfies 𝔅φ.

Proof of Lemma 21.

Let us assume that every type in 𝝉 is guarded.

Set M=i=12wd(σ)1pi. For each k[wd(σ)], let Ωk denote the set of k-tuples processed in the inner loop at Line 3, during the kth iteration of the outer loop at Line 3:

Ωk={(α1,β1),,(αk,βk)| 0α1<<αk<wd(σ),β1,,βk[0,M1]}.

For technical reasons, we also declare Ω0 as the set with the unique zero-length tuple.

For each k[wd(σ)] and each k-tuple b¯Ωk, let 𝒳(b¯) denote the k-type τ chosen by Algorithm 3 at Line 3 when processing b¯. For a permutation ρ:[k][k], we naturally write 𝒳(ρ(b¯))=tp𝒳(b¯)[xρ(1),,xρ(k)], that is, the k-type 𝒳(b¯) reindexed according to ρ.

The values 𝒳(b¯) can be viewed as a particular instantiation of the random variables in Algorithm 1. Hence by the same reasoning as in Claim 14 the structure 𝔅 is 𝝉-guarded. If we show that 𝔅 also satisfies the 𝝉-extension property, then Lemma 10 will imply that 𝔅φ. The main technical step is Claim 22, being a deterministic replacement for Claim 15.

Claim 22.

Let k[0,wd(σ)1], and let τ𝝉k+1 be a (k+1)-type. Consider a tuple (α1,β1),,(αk,βk)Ωk together with an index αk+1[0,wd(σ)1]{α1,,αk}. Then there exists some βk+1[0,M1] such that the following holds: for every t[0,k] and every sequence 1j1<<jtk,

𝒳((αj1,βj1),,(αjt,βjt),(αk+1,βk+1))=tpτ[xj1,,xjt,xk+1].

Proof.

To prove the claim, we need to find βk+1[0,M1] such that for every subset S[0,k+1] with k+1S the following holds.

Let m=|S|, and let r1,,rm enumerate S so that αr1<<αrm. The hash value computed at Line 3 when processing (αr1,βr1),,(αrm,βrm)Ωm shall satisfy:

((βr1++βrm)modpS)mod|𝝉m|=hS, (26)

where pS:=pi for the index i as computed at Line 3, i.e., i=2αr1++2αrm; and hS is the position of the m-type tpτ[xr1,,xrm] in the enumeration of 𝝉m as specified at Line 3, i.e., 𝝉m(hS)=tpτ[xr1,,xrm]. Note that βk+1 occurs in (26), as k+1S.

Since hS<|𝝉m||𝝉wd(σ)σ|pS, the solvability of (26) reduces to

βr1++βrmhSmodpS. (27)

Now, observe a natural correspondence: the subset {αr1,,αrm}[0,wd(σ)1] is encoded in the binary digits of the index i=2αr1++2αrm.

In consequence, the moduli of (27) are distinct primes for distinct subsets S. By the Chinese remainder theorem the set of congruences specified by (27) admits a solution βk+1[0,M1], thereby proving the claim.

Note that Claim 22 applies only to tuples from the sets Ωk. Since all types in 𝝉 are guarded, the 𝝉-extension property therefore needs to be verified only for such tuples.

Let k[0,wd(σ)1]. Consider a tuple b¯=(α1,β1),,(αk,βk)Ωk, a k-type τ1𝝉k, and a (k+1)-type τ2𝝉k+1 with τ2τ1. Assume that tp𝔅[b¯]=τ1. Choose arbitrarily αk+1[0,wd(σ)1]{α1,,αk}. Let βk+1[0,M1] be the element obtained from Claim 22. One then verifies that tp𝔅[b¯,bk+1]=τ2 for bk+1=(αk+1,βk+1).

Hash Parameters.

To constructively derive Theorem 1 from Lemma 21, it remains to show that suitable hash parameters p1,,p2wd(σ)1 can indeed be chosen. A simple approach is to invoke the classical Bertrand’s postulate (see: Chapter 2 in [1]): for every integer m2, there exists a prime p with m<p<2m.

We start from |𝝉wd(σ)σ| and apply Bertrand’s postulate iteratively 2wd(σ)1 times. This yields distinct primes p1,,p2wd(σ)1 such that 2i1|𝝉wd(σ)σ|<pi<2i|𝝉wd(σ)σ| for all i[2wd(σ)1]. This is sufficient to obtain the upper bound stated in Theorem 1:

i=12wd(σ)1pi21++2wd(σ)1|𝝉wd(σ)σ|2wd(σ)124wd(σ)/2|𝝉wd(σ)σ|2wd(σ)1. (28)

8 Conclusions

In this work, we presented a new probabilistic proof of the finite model property for the Guarded Fragment. Our methods yield tight bounds on the size of minimal models and extend naturally to the Triguarded Fragment. To the best of our knowledge, no previous work on the Guarded Fragment has employed a similar probabilistic technique.

Several natural directions remain open. A particularly appealing challenge is to extend the applicability of probabilistic methods to stronger fragments. One candidate is the Clique Guarded Fragment (CGF), which is known to enjoy the finite model property [4]. Here, however, a direct probabilistic approach seems out of reach. For instance, in a graph-theoretic setting with a single relation E, CGF can express the absence of triangles via the sentence

x,y,z((E(x,y)E(y,z)E(z,x))).

Yet if edges were placed obliviously at random, a triangle would appear almost with certainty. This suggests that some additional underlying structure is needed, and that future work may profit from combining probabilistic reasoning with classical model constructions.

References

  • [1] Martin Aigner and Günter M. Ziegler. Proofs from THE BOOK (3. ed.). Springer, 2004. doi:10.1007/978-3-662-57265-8.
  • [2] Hajnal Andréka, István Németi, and Johan van Benthem. Modal languages and bounded fragments of predicate logic. J. Philos. Log., 27(3):217–274, 1998. doi:10.1023/A:1004275029985.
  • [3] Franz Baader, Ian Horrocks, Carsten Lutz, and Uli Sattler. An Introduction to Description Logic. Cambridge University Press, 2017. doi:10.1017/9781139025355.
  • [4] Vince Bárány, Georg Gottlob, and Martin Otto. Querying the guarded fragment. Log. Methods Comput. Sci., 10(2), 2014. doi:10.2168/LMCS-10(2:3)2014.
  • [5] Vince Bárány, Balder ten Cate, and Martin Otto. Queries with guarded negation. Proc. VLDB Endow., 5(11):1328–1339, 2012. doi:10.14778/2350229.2350250.
  • [6] Vince Bárány, Balder ten Cate, and Luc Segoufin. Guarded negation. J. ACM, 62(3):22:1–22:26, 2015. doi:10.1145/2701414.
  • [7] Egon Börger, Erich Grädel, and Yuri Gurevich. The Classical Decision Problem. Perspectives in Mathematical Logic. Springer, 1997.
  • [8] Pierre Bourhis, Michael Morak, and Andreas Pieris. Making cross products and guarded ontology languages compatible. In Carles Sierra, editor, Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI 2017, Melbourne, Australia, August 19-25, 2017, pages 880–886. ijcai.org, 2017. doi:10.24963/ijcai.2017/122.
  • [9] Hans de Nivelle and Maarten de Rijke. Deciding the guarded fragments by resolution. J. Symb. Comput., 35(1):21–58, 2003. doi:10.1016/S0747-7171(02)00092-5.
  • [10] Ronald Fagin. Probabilities on finite models. J. Symb. Log., 41(1):50–58, 1976. doi:10.1017/S0022481200051756.
  • [11] Oskar Fiuk and Emanuel Kieronski. Alternating quantifiers in uniform one-dimensional fragments with an excursion into three-variable logic. Log. Methods Comput. Sci., 21(1), March 2025. doi:10.46298/lmcs-21(1:25)2025.
  • [12] Oskar Fiuk, Emanuel Kieronski, and Vincent Michielini. On the complexity of maslov’s class K. In Pawel Sobocinski, Ugo Dal Lago, and Javier Esparza, editors, Proceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2024, Tallinn, Estonia, July 8-11, 2024, pages 35:1–35:14. ACM, 2024. doi:10.1145/3661814.3662097.
  • [13] Warren D. Goldfarb. The unsolvability of the godel class with identity. J. Symb. Log., 49(4):1237–1252, 1984. doi:10.2307/2274274.
  • [14] Warren D. Goldfarb. Random models and the maslov class. J. Symb. Log., 54(2):460–466, 1989. doi:10.2307/2274860.
  • [15] Warren D. Goldfarb. Random models and solvable skolem classes. J. Symb. Log., 58(3):908–914, 1993. doi:10.2307/2275103.
  • [16] Warren D. Goldfarb, Yuri Gurevich, and Saharon Shelah. A decidable subclass of the minimal godel class with identity. J. Symb. Log., 49(4):1253–1261, 1984. doi:10.2307/2274275.
  • [17] Erich Grädel. Invited talk: Decision procedures for guarded logics. In Harald Ganzinger, editor, Automated Deduction - CADE-16, 16th International Conference on Automated Deduction, Trento, Italy, July 7-10, 1999, Proceedings, volume 1632 of Lecture Notes in Computer Science, pages 31–51. Springer, 1999. doi:10.1007/3-540-48660-7_3.
  • [18] Erich Grädel. On the restraining power of guards. J. Symb. Log., 64(4):1719–1742, 1999. doi:10.2307/2586808.
  • [19] Erich Grädel and Igor Walukiewicz. Guarded fixed point logic. In 14th Annual IEEE Symposium on Logic in Computer Science, Trento, Italy, July 2-5, 1999, pages 45–54. IEEE Computer Society, 1999. doi:10.1109/LICS.1999.782585.
  • [20] Yuri Gurevich and Saharon Shelah. Random models and the godel case of the decision problem. J. Symb. Log., 48(4):1120–1124, 1983. doi:10.2307/2273674.
  • [21] Bernhard Herwig. Extending partial isomorphisms on finite structures. Comb., 15(3):365–371, 1995. doi:10.1007/BF01299742.
  • [22] Colin Hirsch. Guarded logics: algorithms and bisimulation. Doctoral dissertation, RWTH Aachen University, Germany, 2002. URL: http://sylvester.bth.rwth-aachen.de/dissertationen/2002/195/index.htm.
  • [23] Yevgeny Kazakov. Saturation-based decision procedures for extensions of the guarded fragment. PhD thesis, Universität des Saarlandes, Saarbrücken, Germany, 2006.
  • [24] Emanuel Kieronski and Sebastian Rudolph. Finite model theory of the triguarded fragment and related logics. In 36th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2021, Rome, Italy, June 29 - July 2, 2021, pages 1–13. IEEE, 2021. doi:10.1109/LICS52264.2021.9470734.
  • [25] Emanuel Kieronski and Lidia Tendera. Finite satisfiability of the two-variable guarded fragment with transitive guards and related variants. ACM Trans. Comput. Log., 19(2):8:1–8:34, 2018. doi:10.1145/3174805.
  • [26] Maarten Marx. Tolerance logic. J. Log. Lang. Inf., 10(3):353–374, 2001. doi:10.1023/A:1011207512025.
  • [27] Ian Pratt-Hartmann. Fragments of First-Order Logic. Oxford University Press, 2023. doi:10.1093/oso/9780192867964.001.0001.
  • [28] Riccardo Rosati. On the decidability and finite controllability of query processing in databases with incomplete information. In Stijn Vansummeren, editor, Proceedings of the Twenty-Fifth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, June 26-28, 2006, Chicago, Illinois, USA, PODS ’06, pages 356–365, New York, NY, USA, 2006. ACM. doi:10.1145/1142351.1142404.
  • [29] Sebastian Rudolph and Mantas Simkus. The triguarded fragment of first-order logic. In Gilles Barthe, Geoff Sutcliffe, and Margus Veanes, editors, LPAR-22. 22nd International Conference on Logic for Programming, Artificial Intelligence and Reasoning, Awassa, Ethiopia, 16-21 November 2018, volume 57 of EPiC Series in Computing, pages 604–619. EasyChair, 2018. doi:10.29007/m8ts.
  • [30] Johan van Benthem. Dynamic bits and pieces. Technical report, ILLC, 1997. URL: https://eprints.illc.uva.nl/id/eprint/1251/.