36
On Probabilistic Elimination of Generalized Quantifiers Risto Kaila Department of Mathematics, University of Helsinki, Yliopistonkatu 5, 00014 University of Helsinki, Finland; e-mail: risto.kaila@helsinki.fi Received 17 December 1998; revised 23 February 2000; accepted 10 April 2000 ABSTRACT: Let be a collection of generalized quantifiers. We give a convenient charac- terization for the cases where the logic ω ω has quantifier elimination for an arbitrary class of structures. The results provide a method to prove zero-one and convergence laws for such logics with arbitrary sequences of probability measures of finite structures. © 2001 John Wiley & Sons, Inc. Random Struct. Alg., 19, 1–36, 2001 Key Words: zero-one laws; convergence laws; quantifier elimination; Lindstr¨ om quantifiers; and infinitary logics 1. INTRODUCTION A logic has the zero-one law if the probabilities of all sentences on random struc- tures of a given finite size converge to zero or one as the size tends to infinity. If the probabilities converge, but not necessarily to zero or one, then the logic has the convergence law. Zero-one and convergence laws provide a method for studying the expressive powers of logics and the properties of finite structures. The proofs of the very first zero-one law for first-order logic due to Glebskii et al. [7] and Fagin [5] actually show that first-order logic has almost sure quantifier elim- ination. This means that, for every formula ϕ¯ x of first-order logic, there is a quantifier-free formula θ¯ x of first-order logic such that the probability of the sen- tence ∀¯ xϕ¯ xθ¯ x converges to one as the size of structures tends to infinity. © 2001 John Wiley & Sons, Inc. 1

On probabilistic elimination of generalized quantifiers

Embed Size (px)

Citation preview

Page 1: On probabilistic elimination of generalized quantifiers

On Probabilistic Elimination ofGeneralized Quantifiers

Risto KailaDepartment of Mathematics, University of Helsinki, Yliopistonkatu 5, 00014

University of Helsinki, Finland; e-mail: [email protected]

Received 17 December 1998; revised 23 February 2000; accepted 10 April 2000

ABSTRACT: Let � be a collection of generalized quantifiers. We give a convenient charac-terization for the cases where the logic �ω

∞ω��� has quantifier elimination for an arbitraryclass of structures. The results provide a method to prove zero-one and convergence laws forsuch logics with arbitrary sequences of probability measures of finite structures. © 2001 JohnWiley & Sons, Inc. Random Struct. Alg., 19, 1–36, 2001

Key Words: zero-one laws; convergence laws; quantifier elimination; Lindstrom quantifiers; andinfinitary logics

1. INTRODUCTION

A logic has the zero-one law if the probabilities of all sentences on random struc-tures of a given finite size converge to zero or one as the size tends to infinity.If the probabilities converge, but not necessarily to zero or one, then the logichas the convergence law. Zero-one and convergence laws provide a method forstudying the expressive powers of logics and the properties of finite structures. Theproofs of the very first zero-one law for first-order logic due to Glebskii et al. [7]and Fagin [5] actually show that first-order logic has almost sure quantifier elim-ination. This means that, for every formula ϕ�x� of first-order logic, there is aquantifier-free formula θ�x� of first-order logic such that the probability of the sen-tence ∀x�ϕ�x� ↔ θ�x�� converges to one as the size of structures tends to infinity.

© 2001 John Wiley & Sons, Inc.

1

Page 2: On probabilistic elimination of generalized quantifiers

2 KAILA

(Here x may also be the empty sequence and it is assumed that first-order logic hasa quantifier-free everywhere true sentence and its negation.)Zero-one and convergence laws are known to hold in several cases, but there

have been only few results for logics with generalized quantifiers. However, theselaws are especially interesting on logics with generalized quantifiers because nonde-finability results for such logics are often difficult to obtain by using other methods.Knyazev [9] studied the probabilities of formulas of first-order logic augmentedwith some simple unary quantifiers of the form: “there are at least rn many ele-ments,” where r is in the interval �0� 1� and n is the size of structures. Fayolle,Grumbach, and Tollu [6] studied zero-one and convergence laws of sentences of theform Qx1� � � � � xm�ψ1� � � � � ψm�, where Q is a generalized quantifier and each ψi is aformula of first-order logic. They studied, especially, Hartig and Rescher quantifiers.On random graphs, Dawar and Gradel [4] investigated almost sure quantifier elim-ination and zero-one laws of first-order logic augmented with quantifiers expressinggraph properties such as rigidity.Since there is a wealth of interesting generalized quantifiers, a powerful method

for studying zero-one laws of first-order logic and the infinitary logic �ω∞ω aug-

mented with collections of generalized quantifiers would be welcome. In this paperwe characterize the cases where these logics have almost sure quantifier elimination.The results provide a method to prove zero-one and convergence laws for theselogics. We give several examples among simple unary quantifiers, vectorized sim-ple unary quantifiers, some generalized Hartig and Rescher quantifiers, and rigid-ity quantifiers. The paper contains many extensions of known zero-one laws. Forinstance, we generalize a result of Dawar and Gradel [4] by proving that the logic�ω∞ω augmented with the rigidity quantifiers has the zero-one law for some variable

atomic probabilities. One application of our results yields hierarchy theorems forvectorized Hartig and Rescher quantifiers.

2. PRELIMINARIES

We begin by explaining what we mean by (Lindstrom) quantifiers. The definition isequivalent to the original one in Lindstrom [12]. Let r = �r1� � � � � rm� be a finitesequence of numbers in �+ = �1� 2� � � ��. A structure � is of type r if it is of theform � = �A�P1� � � � � Pm�, whereA is the universe and Pi ⊆ Ari for each 1 ≤ i ≤ m.With every class � of structures of type r, which is closed under isomorphisms, weassociate a quantifier Q� of type r. The set of formulas of the logic �ωω�Q�� isdefined as for first-order logic �ωω with the additional rule:

If ψi is a formula and yi is an ri-tuple of distinct variable symbols for each 1 ≤ i ≤ m, thenQ� y1� � � � � ym�ψ1� � � � � ψm� is also a formula. Here the tuples yi and yj may have commoncomponents.

Free and bound variable symbols are defined in the obvious way and a for-mula with no free variable symbols is a sentence. We use x1� x2� � � � and y1� y2� � � �as distinct (if not otherwise indicated) variable symbols and notation like x =�x1� � � � � xm� for sequences of distinct variable symbols. The notation ϕ�x1� � � � � xm�and ψ�y� for formulas ϕ and ψ mean that the free variable symbols are amongx1� � � � � xm and among the components of y, respectively.

Page 3: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 3

The semantics of the quantifierQ� is defined as follows. Suppose the free variablesymbols of a formula ψi are among the components of xi and yi. (Here we assumethat xi and yi do not have a common component. However, xi and yj , xi and xj , aswell as yi and yj , i �= j, may have common components.) For every structure � andinterpretation ai of xi, let

� �= Q� y1� � � � � ym(ψ1�a1� y1�� � � � � ψm�am� ym�

)⇔ (A�ψ

�� a11 � � � � � ψ

�� amm

) ∈ ��

where ψ�� aii = �b ∈ Ari :� �= ψi�ai� b��. The arity of the quantifier Q� of type

�r1� � � � � rm� is #�Q�� = max�ri: 1 ≤ i ≤ m�. If m = 1, Q� is a simple r1-ary quan-tifier. Quantifiers of types �1�� �1� 1�� � � � are called unary. Note that the existentialand universal quantifiers may be viewed as simple unary quantifiers. We often iden-tify quantifiers with the defining classes.In a similar way we can define the logic �ωω���, where � is a collection of

quantifiers. The logic �kωω���, k ∈ �+, is as �ωω��� but every formula has at

most k variable symbols (bound or free). The logic �k∞ω���, k ∈ �+, is defined

as �kωω��� but disjunctions and conjunctions are allowed over any set of formulas,

provided that at most k variable symbols (bound or free) occur in the formulas.Further, �ω

∞ω��� is the union of the logics �k∞ω���, k ∈ �+. The logic �ω

∞ω is thesame as �ω

∞ω��� and �ωωω��� is the same as �ωω���. Note that a quantifier Q

may occur in a formula of �k∞ω�Q�, k ∈ �+, only if #�Q� ≤ k. The quantifier rank

qr�ϕ� of a formula ϕ of �ω∞ω��� is an ordinal which is defined by the following

clauses:

• qr�ϕ� = 0 if ϕ is an atomic formula.• qr�¬ϕ� = qr�ϕ�.• qr�∨�� = qr�∧�� = sup�qr�ϕ�:ϕ ∈ ��.• qr�Qy1� � � � � ym�ψ1� � � � � ψm�� = max�qr�ψ1�� � � � � qr�ψm�� + 1.

With every quantifier Q of type �r1� � � � � rm� and v ∈ �+, we associate a quantifierof type �vr1� � � � � vrm�:

vQ = {�A�P1� � � � � Pm�: �Av� P1� � � � � Pm� ∈ Q}�

where in �A�P1� � � � � Pm� the relation Pi is viewed as a vri-ary relation over A andin �Av� P1� � � � � Pm� it is viewed as an ri-ary relation over Av. The quantifier vQ iscalled the v-vectorization of Q. A quantifier Q of type �r1� � � � � rm� is monotone if,for every structure �A�P1� � � � � Pm� in Q and every Pi ⊆ P ′i ⊆ Ari , 1 ≤ i ≤ m, thestructure �A�P ′1� � � � � P ′m� is also in Q. Note that, if a quantifier Q is monotone,then so are all v-vectorizations vQ. Further information on Lindstrom quantifierscan be found, for example, in Kolaitis and Vaananen [10].A vocabulary τ is a set of finitary relation symbols, finitary function sym-

bols, and constant symbols. We say that τ and τ-structures are relational if τhas only relation symbols. The arity of a relation symbol R is denoted by #�R�.If we want to emphasize that the vocabulary is τ, we write ��τ� for a logic� . For vocabularies τ and τ∗ with τ ⊆ τ∗ and a τ∗-structure �, ��τ is therestriction of � to the vocabulary τ. Further, ��τ = ���τ:� ∈ �� for a class

Page 4: On probabilistic elimination of generalized quantifiers

4 KAILA

� of τ∗-structures. The set of (τ-)terms is the smallest set which satisfies thefollowing.

• Every variable symbol is a τ-term.• Every constant symbol of τ is a τ-term.• If f is an m-ary function symbol of τ and t1� � � � � tm are τ-terms, thenf �t1� � � � � tm� is a τ-term.

The term rank tr�t� of a term t is defined by recursion so that tr�t� = 0 for variableand constant symbols and

tr�f �t1� � � � � tm�� = max�tr�t1�� � � � � tr�tm�� + 1�

The term rank of a formula ϕ is the supremum of the term ranks of the termswhich occur in ϕ.Let � be a logic. Classes of all structures of a fixed vocabulary which satisfy

exactly the same sentences of � are called �-equivalence classes. An �m���-type,m ∈ �, is a maximal consistent class of formulas of � with free variable symbolsin �x1� � � � � xm�. An �m���-type T is realized in a structure � if there is a tuplea ∈ Am such that � �= ϕ�a� for all ϕ ∈ T . For logics � and � ′, the notation� ≤sent �

′ means that every sentence of � is equivalent to a sentence of � ′.A (discrete) random structure is defined as follows. All random structures in this

paper are discrete ones. The size of a structure means the size of its universe.Let �i� n, i ∈ In, be a countable list of distinct τ-structures on universe A of sizen ∈ �+. Let pi� n, i ∈ In, be reals in �0� 1� so that

∑i∈In pi� n = 1 for all n ∈ �+. Let

the probability that a random structure � of size n is �i� n be pi� n. Note that all setsof random structures are measurable. Also note that, if the vocabulary τ is finite,the above is a complete general definition for finite random structures.Let ϕ�x� be a property, which is closed under isomorphisms, of m-tuples, m ∈

� = �0� 1� � � ��, of elements of a universe. For a random structure � of size n anda ∈ Am, the probability of � �= ϕ�a� is denoted by µd

n�� �= ϕ�a�� or µdn�ϕ�a�� =∑

i∈Iϕn pi� n, where Iϕn = �i ∈ In:�i� n �= ϕ�a��. We say that µd

n is a (discrete) prob-ability measure. If µd

n�ψ�a�� �= 0, the conditional probability is defined as usual:µdn�ϕ�a� � ψ�a�� = µd

n�ϕ�a� ∧ ψ�a��/µdn�ψ�a��.

In most applications we will use a probability measure which is denoted by µnand defined as follows. (Of course we could, in principle, use the above definitionwith suitable probabilities pi� n.) The cardinality of a set S is denoted by �S�. LetpR: �+ → �0� 1� for each relation symbol R of the finite relational vocabulary τ.For each R ∈ τ, we let the probability of � �= R�a� be pR��A�� with these eventsmutually independent over all a ∈ A#�R� and R ∈ τ. We say that pR is the atomicprobability of R. If pR is the same function for all R ∈ τ, it is denoted by pato andcalled the atomic probability. Note that the edge probability pedg is defined in thesimilar way for random graphs with the vocabulary �E� as pato above but E�x� x� isnever true and E�x� y� ↔ E�y� x� is always true; see, e.g., Bollobas [1]. We denotethe probability measure also in this case by µn.

Proposition 2.1. Let ϕ�x� be a property, which is closed under isomorphisms, of m-tuples, m ∈ �, of elements of a universe and let both a and a′ be m-tuples of distinct

Page 5: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 5

elements of A. Then

µn

(� �= ϕ�a�

)= µn

(� �= ϕ�a′�

)�

Proof. The claim follows immediately from the definition of the probabilitymeasure µn.

Hence we may define the probability µn�ϕ�x�� on random structures of sizes nso that the components of x have any distinct interpretations. If x has more than ncomponents, let µn�ϕ�x�� = 0.

Definition 2.2. Suppose µdn is a probability measure for τ-structures. A logic � has

the zero-one law for µdn if limn→∞ µd

n�ϕ� ∈ �0� 1� for every sentence ϕ of ��τ�. Alogic � has the convergence law for µd

n if limn→∞ µdn�ϕ� exists for every sentence ϕ

of ��τ�.

For notational simplicity, we assume that every logic has the empty disjunction∨� and the empty conjunction∧� which are everywhere false and, respectively,

true sentences.

Definition 2.3. Let � be a class of τ-structures. A logic � has quantifier eliminationfor � if, for every formula ϕ�x� of ��τ�, there is a quantifier-free formula θ�x� of��τ� such that � �= ∀x�ϕ�x� ↔ θ�x�� for all � ∈ �. (Note that x may also be theempty sequence, then ϕ and θ are sentences.)

We also say, with the obvious meaning, that a logic has quantifier elimination fora structure.

Definition 2.4. Suppose µdn is a probability measure for τ-structures and � is a

collection of functions f : �+ → �. A logic � has almost sure quantifier eliminationfor µd

n if, for each formula ϕ�x� of ��τ�, there is a quantifier-free formula θ�x�of ��τ� such that limn→∞ µd

n�∀x�ϕ�x� ↔ θ�x��� = 1. (Note that x may also be theempty sequence.) Further, the logic � has � -sure quantifier elimination for µd

n if, foreach formula ϕ�x� of ��τ�, there are a quantifier-free formula θ�x� of ��τ� and anf ∈ � such that µd

n�∀x�ϕ�x� ↔ θ�x��� ≥ f �n� for all n ∈ �+.

Definition 2.5. Suppose µdn is a probability measure for τ-structures and � is a

collection of functions f : �+ → �. A logic � has almost sure strong quantifierelimination for µd

n if there is a class � of τ-structures such that limn→∞ µdn��� = 1

and � has quantifier elimination for �. Further, if � is as above and there is anf ∈ � such that µd

n��� ≥ f �n� for all n ∈ �+, then the logic � has � -sure strongquantifier elimination for µd

n.

Note that � -sure strong quantifier elimination implies � -sure quantifier elimina-tion trivially. We also say, for instance, that a logic has almost sure quantifier elim-ination for an atomic probability pato if it has almost sure quantifier eliminationfor all probability measures which are defined by pato, that is, the finite relationalvocabulary is arbitrary.

Page 6: On probabilistic elimination of generalized quantifiers

6 KAILA

If the vocabulary of random structures does not have constant symbols, thenalmost sure quantifier elimination coincide with almost sure strong quantifier elim-ination for logics of the form �k

∞ω���, k ∈ �+, by the next theorem.

Theorem 2.6. Suppose the vocabulary of random structures does not have constantsymbols. Suppose � is a collection of quantifiers, k ∈ �+, and � is a collection offunctions f : �+ → � such that limn→∞ f �n� = 1 for all f ∈ � . Then �k

∞ω��� has� -sure quantifier elimination if and only if it has � -sure strong quantifier elimination.

Proof. Suppose that �k∞ω��� has � -sure quantifier elimination for µd

n. Then ithas also the zero-one law for µd

n, since the vocabulary of random structures doesnot have constant symbols. Let ϕi, i ∈ I ⊆ �, be a list of sentences of �k

∞ω���which characterize the distinct �k

∞ω���-equivalence classes over random structures.That is, the sentences ϕi, i ∈ I, characterize the distinct �k

∞ω���-equivalence classesover �rnd, where �rnd is the minimal set of structures such that µd

n��rnd� = 1 forall n ∈ �+. Since �rnd is a countable set, it is easy to see that such sentences ϕi,i ∈ I ⊆ �, of �k

∞ω��� exist.limn→∞ µd

n�ϕi� ∈ �0� 1� for all i ∈ I since �k∞ω��� has the zero-one law. If all

these limits are 0, it is easy to see that �k∞ω��� cannot have the zero-one law since,

for every n ∈ �+, there is a finite subset In of I such that µdn�∨i∈In ϕi� ≥ 1− 1/n.

Hence limn→∞ µdn�ϕi� = 1 for some i ∈ I. Furthermore, µd

n�ϕi� ≥ f �n� for some f ∈� since every quantifier-free sentence is now equivalent to

∨� or∧�. So there

are an �k∞ω���-equivalence class � and a function f ∈ � such that µd

n�� ∈ �� ≥f �n�, where � is a random structure of size n. For every formula ϕ�x� of �k

∞ω���,there is a quantifier-free formula θϕ�x� of �k

∞ω such that limn→∞ µdn�∀x�ϕ�x� ↔

θϕ�x��� = 1. Hence � �= ∀x�ϕ�x� ↔ θϕ�x�� for all � ∈ � and all formulas ϕ of�k∞ω���. Therefore, �k

∞ω��� has � -sure strong quantifier elimination for µdn. The

other direction of the claim is trivial.

The next theorem concerns almost sure equivalence of formulas in a mannerwhich is related to the above theorem. For a collection � of functions f : �+ → �,a class of formulas, and a probability measure µd

n, let � = �f ∗: f ∗ is a functionf ∗: �+ → � and f ∗�n� = f �n� + µd

n�θ� − 1 for all n ∈ �+ for a function f ∈ � anda sentence θ ∈ with limn→∞ µd

n�θ� = 1�.

Theorem 2.7. Suppose µdn is a probability measure, � is a collection of functions

f : �+ → � such that limn→∞ f �n� = 1 for all f ∈ � , � is a collection of quantifiers,k ∈ �+, and is a countable set of formulas of �k

∞ω���. Suppose that there is aformula θϕ�x� ∈ and a function fϕ ∈ � for each formula ϕ�x� of �k

∞ω��� suchthat µd

n�∀x�ϕ�x� ↔ θϕ�x��� ≥ fϕ�n� for all n ∈ �+. Then there are a class � ofstructures, a function f ∈ � , and a finite subset ∗ of such that µd

n��� ≥ f �n� forall n ∈ �+ and there is a formula θ∗ϕ�x� of ∗ for each formula ϕ�x� of �k

∞ω��� suchthat � �= ∀x�ϕ�x� ↔ θ∗ϕ�x�� for all � ∈ �.

Proof. Let xm be the tuple �x1� � � � � xm� of variables. Note that there are onlycountably many �m��k

∞ω����-types, 0 ≤ m ≤ k, which are realized in randomstructures. Hence it is easy to see that there is a list ϕmi �xm�, i ∈ I�m� ⊆ �, of

Page 7: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 7

formulas of �k∞ω��� which characterize the distinct �m��k

∞ω����-types over ran-dom structures. More precisely, the formulas ϕmi �xm�, i ∈ I�m�, characterize thedistinct �m��k

∞ω����-types over �rnd, where �rnd is the minimal set of structuressuch that µd

n��rnd� = 1 for all n ∈ �+.Let I0�m� be the set �i ∈ I�m�: limn→∞ µd

n�∃xmϕmi �xm�� = 0�. We will first showthat

limn→∞µ

dn

( ∨i∈I0�m�

∃xmϕmi �xm�)= 0 (1)

for all m ∈ �0� � � � � k�. Towards a contradiction, suppose

lim supn→∞

µdn

( ∨i∈I0�m�

∃xmϕmi �xm�)> 0

for some m ∈ �0� � � � � k�. Let θs�xm�, s ∈ �, be a list of the formulas of

+ =def

{θ�xm� ∈ : lim sup

n→∞µdn�∃xmθ�xm�� > 0

}such that each formula of + occurs infinitely many times in the list. Since there isa finite subset In�m� of I�m� such that µd

n�∀xm�∨i∈In�m� ϕ

mi �xm��� ≥ 1− 1/n for all

n ∈ �+, we can choose a sequence n0 < n1 < � � � of natural numbers and a subsetJ0�m� of I0�m� such that

µdn2s

(∃xmθs�xm�) > lim supn→∞

µdn

(∃xmθs�xm�)/2�µdn2s

( ∨i∈J0�m�

∃xmϕmi �xm�)< lim sup

n→∞µdn

(∃xmθs�xm�)/3� and

µdn2s+1

( ∨i∈J0�m�

∃xmϕmi �xm�)> lim sup

n→∞µdn

( ∨i∈I0�m�

∃xmϕmi �xm�)/2

for all s ∈ �. It follows that limn→∞ µdn�∀xm��

∨i∈J0�m� ϕ

mi �xm�� ↔ θ�xm��� �= 1 for

all θ�xm� ∈ , a contradiction.Next we will show that there is a class �′ of structures such that only finitely

many �m��k∞ω����-types, m ∈ �0� � � � � k�, are realized in the structures of �′ and

limn→∞ µdn��′� = 1. Suppose that, for some m ∈ �0� � � � � k�, there are infinitely

many formulas ϕmi �xm�, i ∈ I�m�, such that

lim supn→∞

µdn

(∃xmϕmi �xm�) > 0� (2)

Since each ϕmi �xm� characterizes an �m��k∞ω����-type over random structures, it

follows that there are continuumly many formulas ϕα�xm�, α < 2ℵ0 , of �k∞ω���

such that lim supn→∞ µdn�∃xm¬�ϕα�xm� ↔ ϕβ�xm��� > 0 for all distinct α�β < 2ℵ0 .

However, has only countably many formulas, a contradiction. So Inequality (2)holds only for finitely many i ∈ I�m�. Since

µdn

(∀xm

[ ∨i∈I�m�\I0�m�

ϕmi �xm�])

= 1− µdn

( ∨i∈I0�m�

∃xmϕmi �xm�)�

Page 8: On probabilistic elimination of generalized quantifiers

8 KAILA

Eq. (1) guarantees that there is a finite subset I∗�m� = I�m�\I0�m� of I�m� suchthat limn→∞ µd

n�∀xm�∨i∈I∗�m� ϕ

mi �xm��� = 1. Therefore, �′ exists.

Let ψmj �xm�, j ∈ J�m� and 0 ≤ m ≤ k, be a list of all formulas of �k∞ω���

which are mutually nonequivalent over random structures. Since only finitely many�m��k

∞ω����-types are realized in the structures of �′, only finitely many of the for-mulas ψmj �xm�, j ∈ J�m�, are mutually nonequivalent over �′. Hence there is a finitesubset ∗ of such that, for every formula ψmj �xm�, where j ∈ J�m� and 0 ≤ m ≤ k,there is a formula θmj �xm� of ∗ such that limn→∞ µd

n�∧km=0

∧j∈J�m� ∀xm�ψmj �xm� ↔

θmj �xm��� = 1. Furthermore,

µdn

([ k∧m=0

∧j∈J�m�

∀xm�ψmj �xm� ↔ θmj �xm��]↔ θ

)≥ f �n�

for a sentence θ ∈ with limn→∞ µdn�θ� = 1 and a function f ∈ � which implies

µdn

k∧m=0

∧j∈J�m�

∀xm�ψmj �xm� ↔ θmj �xm��)

≤ µdn�¬θ� + µd

n

(¬[[ k∧

m=0

∧j∈J�m�

∀xm�ψmj �xm� ↔ θmj �xm��]↔ θ

])

≤ µdn�¬θ� + 1− f �n� = 2 − µd

n�θ� − f �n�

and µdn�∧km=0

∧j∈J�m� ∀xm�ψmj �xm� ↔ θmj �xm��� ≥ f �n� + µd

n�θ� − 1.

Some results related to Theorems 2.6 and 2.7 can be found in Hella, Kolaitis,and Luosto [8], where almost sure equivalence of logics is studied.Let � be a collection of functions f : �+ → � such that limn→∞ f �n� = 1 for all

f ∈ � . The following facts are immediate consequences of definitions. If a logic �has � -sure quantifier elimination for a probability measure µd

n and the vocabularyof random structures does not have constant symbols, then the logic � has thezero-one law for µd

n. Furthermore, for every sentence ϕ of � , there is an f ∈ �such that either µd

n�ϕ� ≤ 1− f �n� for all n ∈ �+ or µdn�ϕ� ≥ f �n� for all n ∈ �+. If

a logic � has almost sure quantifier elimination for an atomic probability pato withlimn→∞ pato�n� ∈ �0� 1� (respectively, the limit exists), then

limn→∞µn�ϕ� = lim

n→∞µn�θ� ∈ �0� 1� (respectively, the limit exists)

for every formula ϕ of � and some quantifier-free formula θ of � .Finally, we will use the following notation: �x� means for a real x the largest

integer so that �x� ≤ x, f �n� = o�g�n�� if limn→∞ f �n�/g�n� = 0, and f �n� =O�g�n�� if lim supn→∞ �f �n�/g�n�� <∞. For a function f : �+ → � and a collection� of functions, the notation f �n� ∈ � means that f ∈ � .

Page 9: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 9

3. QUANTIFIER ELIMINATION IN ARBITRARYCLASSES OF STRUCTURES

We will give a convenient characterization for the cases where the logic �ω∞ω��� or

�ωω��� has quantifier elimination for arbitrary classes of structures. We will see thatit suffices that certain very simple formulas of quantifier rank one are equivalent toquantifier-free formulas.

Definition 3.1. A consistent quantifier-free formula χ�x� of �ω∞ω�τ� is a complete

quantifier-free (τ-)formula if the conditions � �= χ�a� and � �= χ�b� imply that� �= θ�a� if and only if � �= θ�b� for all quantifier-free formulas θ�x� of �ω

∞ω�τ�and all τ-structures � and �.

For instance, the empty conjunction∧� is a complete quantifier-free τ-formula,

provided that τ does not have constant symbols.

Definition 3.2. A formula θ�x� y� of �ω∞ω�τ� is a y-simple (τ-)formula if (1) it is

quantifier-free and (2) the truth value of θ�x� y� is independent of the truth valuesof all complete quantifier-free τ-formulas χ�x� for all distributions of truth valuesof atomic formulas. For convenience, the equations which involve both variables ofx and y can be ignored unless the equations occur in θ�x� y�.

Example 3.3. Let R1� R2� � � � be relation symbols of the vocabulary and y =�y1� y2�. Then

∨�� ∧�� R1�x� y�� and R1�x� y� ∨ �R2�y1� ∧ R3�x� y1��

are y-simple formulas while the formulas

R4�x� ∨ R5�x� y�� R4�x� ∧ R5�x� y�� �R4�x� ∧ R5�x� y�� ∨ R6�x� y��x1 = y1 ∧ R6�x� y1�� and x1 �= y1 ∨ R6�x� y1�

are not.

Let us sketch the idea of the quantifier elimination technique. Suppose � is aclass of τ-structures, � is a collection of quantifiers, and k ∈ �+. For simplicity, letus assume that the quantifiers in � are simple and unary. Suppose that for each com-plete quantifier-free formula χ�x� of �k

∞ω�τ�, each quantifier-free formula θ�x� y�of �k

∞ω�τ�, and each quantifier Q ∈ � ∪ �∃� either � �= ∀x�χ�x� → ¬Qyθ�x� y��for all � ∈ � or � �= ∀x�χ�x� → Qyθ�x� y�� for all � ∈ �. Then it is easy tosee that �k

∞ω��� has quantifier elimination for �. Furthermore, since each χ�x�is a complete quantifier-free formula, it clearly suffices that the above conditionshold for y-simple formulas θ�x� y�. The last step may seem unessential, but thewhole point of the technique is that y-simple formulas are often much easier tohandle than quantifier-free formulas in general, especially when one is dealing withprobabilities.

Page 10: On probabilistic elimination of generalized quantifiers

10 KAILA

For a quantifier Q, a k ∈ �+, and a vocabulary τ, let

+Qkτ =

{Qy1� � � � � ym�θ1� � � � � θm�:Qy1� � � � � ym�θ1� � � � � θm�is a formula of �k

∞ω�Q��τ� of quantifier rank one and each θi�xi� yi�is a yi-simple formula

}�

For a formula ϕ, let ,ϕτ be a collection of all mutually nonequivalent completequantifier-free τ-formulas which have the same free variables as ϕ. It is easy tosee that ,ϕτ is a set, not a proper class. For every finite vocabulary τ which doesnot have function symbols, every quantifier-free formula of �k

∞ω�τ� is equivalent toa quantifier-free formula of �k

ωω�τ�. So, if τ is finite and does not have functionsymbols, we may replace �k

∞ω�Q��τ� by �kωω�Q��τ� in the definition of +Q

kτ andassume that the formulas in ,ϕτ are formulas of �ωω�τ�.Suppose Q is a quantifier, k ∈ �+, and τ is a vocabulary. A quantifier elimination

�Q� k� τ�-characteristic is a �0� 1�-valued function on ��χ�ϕ� " χ ∈ ,ϕτ and ϕ ∈ +Qkτ�.

With each quantifier elimination �Q� k� τ�-characteristic -, we associate a quantifierelimination axiom λ

Qkτ�-�, which is defined as follows:

∧{∀x�χ�x� → ¬ϕ�x��: -�χ�ϕ� = 0� χ�x� ∈ ,ϕτ � and ϕ�x� ∈ +Qkτ

} ∧∧{∀x�χ�x� → ϕ�x��: -�χ�ϕ� = 1� χ�x� ∈ ,ϕτ � and ϕ�x� ∈ +Qkτ

}�

Note that λQkτ�-� is not a sentence of �k∞ω�Q��τ� since +Q

kτ is a proper class.However, it is easy to see that λQkτ�-� is equivalent to a sentence of �k

∞ω�Q��τ�. Wewill see that such axioms for all quantifiers in � # ∃ characterizes the cases where�k∞ω��� has quantifier elimination for a class of τ-structures.

Definition 3.4. Suppose τ is a vocabulary, � is a class of τ-structures, and k ∈�+. A quantifier Q is k-benign for � if there is a quantifier elimination �Q� k� τ�-characteristic - with � �= λQkτ�-� for all � ∈ �. Further, Q is ω-benign for � if itis k-benign with all k ∈ �+. A collection of quantifiers is k-benign, k ∈ �+ ∪ �ω�,for � if all its elements are.

Theorem 3.5. Suppose � # ∃ is a collection of quantifiers, τ is a vocabulary, � is aclass of τ-structures, and k ∈ �+ ∪ �ω�. Then �k

∞ω��� has quantifier elimination for� if and only if � is k-benign for �.

Proof. Assume first that � is k-benign, k ∈ �+, for �. Let us study a formula ϕof �k

∞ω����τ� of the form

Qy1� � � � � ym(ψ1�x1� y1�� � � � � ψm�xm� ym�

)�

where each ψi�xi� yi� is a quantifier-free formula of �k∞ω�τ�. Let ,ϕτ = �χh " h ∈ H�.

For every h ∈ H,

χh�x1� � � � � xm� ∧Qy1� � � � � ym(ψ1�x1� y1�� � � � � ψm�xm� ym�

)⇔ χh�x1� � � � � xm� ∧Qy1� � � � � ym

(ψ∗1h�x1� y1�� � � � � ψ∗mh�xm� ym�

)�

Page 11: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 11

where each ψ∗ih�xi� yi� is a yi-simple formula, and the same holds when “Q” isreplaced by “¬Q”. Since Q is k-benign for �, we may choose a quantifier elimina-tion �Q� k� τ�-characteristic - such that all structures in � satisfy the axiom λ

Qkτ�-�.

By the definition of λQkτ�-�, either

λQkτ�-� �=∀x1 ···∀xm

[χh�x1�����xm�→¬Qy1�����ym

(ψ∗1h�x1�y1������ψ∗mh�xm�ym�

)]or

λQkτ�-� �=∀x1 ···∀xm

[χh�x1�����xm�→Qy1�����ym

(ψ∗1h�x1�y1������ψ∗mh�xm�ym�

)]for every h ∈ H. Let

H1 ={h ∈ H:λQkτ�-� �= ∀x1 · · · ∀xm

[χh�x1� � � � � xm�

→ Qy1� � � � � ym(ψ∗1h�x1� y1�� � � � � ψ∗mh�xm� ym�

)]}�

Then

λQkτ�-� �= ∀x1 · · · ∀xm

[Qy1� � � � � ym

(ψ1�x1� y1�� � � � � ψm�xm� ym�

)

↔ ∨h∈H1

χh�x1� � � � � xm�]�

So �k∞ω��� has quantifier elimination for �.

Finally, assume that �k∞ω���, k ∈ �+, has quantifier elimination for �. Suppose

Q ∈ �, ϕ ∈ +Qkτ, and ,

ϕτ = �χh " h ∈ H�. Since �k

∞ω��� has quantifier eliminationfor �, we may choose a subset Hϕ of H such that

� �= ∀x[ϕ�x� ↔ ∨

h∈Hϕχh�x�

]

for all � ∈ �. Especially,

� �= ∀x[χh�x� → ¬ϕ�x�] if h ∈ H\Hϕ and

� �= ∀x[χh�x� → ϕ�x�] if h ∈ Hϕ

for all � ∈ �. Hence Q is k-benign for �.

The next theorem is an example of the power of Theorem 3.5. The Rescherquantifier R is defined by the class ��A�P1� P2� " P1� P2 ⊆ A and �P1� ≤ �P2��.

Theorem 3.6. The logic �ω∞ω��vR " v ∈ �+�� has quantifier elimination for ���<�,

where � is the set of reals and < is the usual linear order of reals.

Page 12: On probabilistic elimination of generalized quantifiers

12 KAILA

Proof. Theorem 3.5. The rather easy details are left to the reader.

Suppose � is a logic, is a set of formulas of ��τ�, and � is a class ofτ-structures. We say that is an elimination set for � in � if, for each formulaϕ�x� of ��τ�, there is a formula θ�x� of ��τ� which is a finite or infinite booleancombination of formulas of and � �= ∀x�ϕ�x� ↔ θ�x�� for all � ∈ �. Note thatx can also be the empty sequence, then ϕ and θ are sentences.Theorem 3.5 shows that, if � # ∃ is k-benign for �, then, for example, the col-

lection of all atomic formulas of �kωω�τ�, together with the sentence

∧�, is anelimination set for �k

∞ω��� in �. Furthermore, it is easy to see that Theorem 3.5can be used in more general cases to choose elimination sets for �k

∞ω��� in �if the following holds. (The same applies to Theorem 3.9 below with obviousmodifications.)

• There is a vocabulary τ∗ ⊇ τ and a class �∗ of τ∗-structures so that � = �∗�τ.• � # ∃ is k-benign for �∗.• For each relation symbol R ∈ τ∗\τ, there is a formula ψR of �k

∞ω����τ� suchthat � �= ∀x�R�x� ↔ ψR�x�� for all � ∈ �∗.

• For each function symbol f ∈ τ∗\τ, there is a formula ψf of �k∞ω����τ� such

that � �= ∀x∀y�f �x� = y ↔ ψf �x� y�� for all � ∈ �∗.• For each constant symbol c ∈ τ∗\τ, there is a formula ψc of �k

∞ω����τ� suchthat � �= ∀x�c = x↔ ψc�x�� for all � ∈ �∗.

• k = ω if there are function or constant symbols in τ∗\τ. (Note that functionand constant symbols can be nested inside atomic formulas and some addi-tional variables may be needed to handle that.)

For example, suppose f ∈ τ∗\τ is a unary function symbol and ψf �x� y� is aformula of �h

∞ω����τ�, h ∈ �+, which satisfies the above condition. Let f 1�x� bef �x� and let f i+1�x� be f �f i�x�� for i ∈ �+. We must find a formula ψif �x� y� of�s∞ω��� for each i ∈ �+ and a fixed s ∈ �+ such that ψif �x� y� is equivalent tof i�x� = y on all structures of �∗. Here we have a similar problem as in the proofof Theorem 2.8 of Kolaitis and Vardi [11], where it is shown that the logic �ω

∞ωcan express every formula of fixpoint logic on finite structures. We would like tomake substitutions of variables in some formulas without changing their meaningsand keeping a fixed bound to the number of variables. We apply the idea of Kolaitisand Vardi to overcome this difficulty. Let ψ1

f �x� y� be ψf �x� y� and let ψi+1f �x� y� be

∃z[∃y�y = z ∧ ψif �x� y�� ∧ ∃x�x = z ∧ ψif �x� y��]for each i ∈ �+. If there are at least three variable symbols in ψf �x� y�, we mayassume that z occurs as a bound variable in ψf �x� y�. So each ψif �x� y� is a formula

of �max�3�h�∞ω ����τ� and � �= ∀x∀y�f i�x� = y ↔ ψif �x� y�� for all � ∈ �∗ and i ∈ �+.

Finally, we will modify Theorem 3.5 to characterize the cases where �kωω���

has quantifier elimination for a class of structures. Note that Theorem 3.5 alreadyprovides such a characterization if the vocabulary is finite and it does not havefunction symbols.

Page 13: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 13

Definition 3.7. Suppose τ is a finite vocabulary and r ∈ �. A consistent quantifier-free formula χ�x� of �ωω�τ� with term rank at most r is an r-complete quantifier-free(τ-)formula if the conditions � �= χ�a� and � �= χ�b� imply that � �= θ�a� if andonly if � �= θ�b� for all quantifier-free formulas θ�x� of �ωω�τ� with term ranks atmost r and all τ-structures � and �.

Suppose Q is a quantifier, k ∈ �+, and τ is a finite vocabulary. Let ∗+Qkτ be

defined as +Qkτ except that �k

∞ω�Q��τ� is replaced by �kωω�Q��τ�. For a formula

ϕ and an r ∈ �, let ,ϕrτ be a collection of all mutually nonequivalent r-completequantifier-free τ-formulas which have the same free variables as ϕ. Note that ,ϕrτis a finite set. We say that a binary function - with dom�-� = ��χ�ϕ� " χ ∈ ,ϕrτ,ϕ ∈ ∗+Q

kτ, and r ∈ �� is a weak quantifier elimination �Q� k� τ�-characteristic if

-�χ�ϕ� ={−rϕ − 1 orrϕ + 1

for some rϕ ∈ �, which only depends on ϕ, and all �χ�ϕ� ∈ dom�-�. Let ∗λQkτ�-� be∧{∀x�χ�x� → ¬ϕ�x�� "-�χ�ϕ� = −r − 1�

χ�x� ∈ ,ϕrτ� ϕ�x� ∈ ∗+Qkτ� and r ∈ �

}∧

∧{∀x�χ�x� → ϕ�x�� "-�χ�ϕ� = r + 1�

χ�x� ∈ ,ϕrτ� ϕ�x� ∈ ∗+Qkτ� and r ∈ �

}�

Definition 3.8. Suppose τ is a finite vocabulary, � is a class of τ-structures, andk ∈ �+. A quantifier Q is weakly k-benign for � if there is a weak quantifierelimination �Q� k� τ�-characteristic - with � �= ∗λQkτ�-� for all � ∈ �. Further, Qis weakly ω-benign for � if it is weakly k-benign with all k ∈ �+. A collection ofquantifiers is weakly k-benign, k ∈ �+ ∪ �ω�, for � if all its elements are.

Theorem 3.9. Suppose � # ∃ is a collection of quantifiers, τ is a vocabulary, � is aclass of τ-structures, and k ∈ �+ ∪ �ω�. Then �k

ωω��� has quantifier elimination for� if and only if � is weakly k-benign for ��τ0 with all finite subsets τ0 of τ.

Proof. The proof is essentially the same as the proof of Theorem 3.5.

4. PROBABILISTIC QUANTIFIER ELIMINATION

We will reformulate Theorem 3.5 for random structures and state some otherresults, too.

Definition 4.1. Suppose µdn is a probability measure and k ∈ �+ ∪ �ω�. A collec-

tion � of quantifiers is k-benign for µdn if there is a class � of structures such that

limn→∞ µdn�� ∈ �� = 1, where � is a random structure of size n, and � is k-benign

for �. A quantifier Q is k-benign for µdn if the collection �Q� is.

Page 14: On probabilistic elimination of generalized quantifiers

14 KAILA

For a weak quantifier elimination �Q� k� τ�-characteristic -, let ∗SQkτ�-� be the setof subformulas of ∗λQkτ�-� which are sentences and do not have the conjunctionsymbol. So ∗λQkτ�-� is equivalent to

∧�λ " λ ∈ ∗SQkτ�-��.

Definition 4.2. Suppose τ is a finite vocabulary, µdn is a probability measure for

τ-structures, and k ∈ �+. A quantifier Q is finitely weakly k-benign for µdn if there is

a weak quantifier elimination �Q� k� τ�-characteristic - with limn→∞ µdn�λ� = 1 for

all λ ∈ ∗SQkτ�-�. Further, Q is finitely weakly ω-benign for µdn if it is finitely weakly

k-benign with all k ∈ �+. A collection of quantifiers is finitely weakly k-benign,k ∈ �+ ∪ �ω�, for µd

n if all its elements are.

Let τ be a finite relational vocabulary. We also say, for instance, that a collection� of quantifiers is �k� τ�-benign for an atomic probability pato if it is k-benign for theprobability measure of τ-structures which is defined by pato. Further, � is k-benignfor pato if it is �k� τ�-benign for pato with all finite relational vocabularies τ.

Proposition 4.3. If collections � and �′ of quantifiers are k-benign, k ∈ �+ ∪ �ω�,for µd

n, then so is the collection � ∪ �′.

Proof. The claim follows from the fact that, if limn→∞ µdn�� ∈ �� = 1 and

limn→∞ µdn�� ∈ �′� = 1, then also limn→∞ µd

n�� ∈ � ∩�′� = 1.

For formulas χ�x� and ϕ�x�, let

Pχϕ�n� = max{µdn�χ�a� ∧ ϕ�a�� " a is an interpretation of x

}�

Let -Q be the quantifier elimination �Q� k� τ�-characteristic which is defined by thefollowing condition:

-Q�χ�ϕ� ={0 if limn→∞ P

χϕ�n� = 0 and

1 otherwise

for all χ ∈ ,ϕτ and ϕ ∈ +Qkτ. For a collection � of quantifiers, let λ�kτ be

∧�λQkτ�-Q� "Q ∈ ��. We now can reformulate Theorem 3.5 for random structures as follows.

Theorem 4.4. Suppose µdn is a probability measure for τ-structures, � # ∃ is a collec-

tion of quantifiers, and k ∈ �+. The following are equivalent.

• �k∞ω��� has almost sure strong quantifier elimination for µd

n.• � is k-benign for µd

n.• limn→∞ µd

n�λ�kτ� = 1.

Furthermore, �k∞ω��� has the zero-one law for µd

n if the vocabulary does not haveconstant symbols and one of the above conditions hold.

Proof. Theorem 3.5.

Page 15: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 15

Corollary 4.5. Suppose µdn is a probability measure for τ-structures, k ∈ �+, and a

collection � # ∃ of quantifiers is k-benign for µdn. Let � = �f�, where f : �+ → �

is such that f �n� = µdn�λ�kτ� for all n ∈ �+. [Note that limn→∞ µd

n�λ�kτ� = 1.] Then�k∞ω��� has � -sure strong quantifier elimination for µd

n. If the vocabulary τ does nothave constant symbols, then limn→∞ µd

n�ϕ� ∈ �0� 1� and either µdn�ϕ� ≤ 1− µd

n�λ�kτ�or µd

n�ϕ� ≥ µdn�λ�kτ� for every sentence ϕ of �k

∞ω����τ�.

The next proposition will be handy in applications.

Proposition 4.6. Suppose the vocabulary τ is finite and it does not have functionsymbols, µd

n is a probability measure for τ-structures, and k ∈ �+. Then a finite col-lection � of quantifiers is k-benign for µd

n if, for each quantifier Q ∈ � and formulaϕ�x� ∈ +Q

kτ, we have either

limn→∞n

sµdn�ϕ�a�� = 0 for all interpretations a of x

or

limn→∞n

sµdn�¬ϕ�a�� = 0 for all interpretations a of x�

or more generally, for each Q ∈ �, χ ∈ ,ϕτ , and ϕ ∈ +Qkτ, either

limn→∞n

sPχϕ�n� = 0 or limn→∞n

sPχ¬ϕ�n� = 0�

where s = k−#�Q� if Q is a simple quantifier and otherwise s = k.

Proof. If limn→∞ Pχϕ�n� = 0, then

µdn

(¬�χ�a� → ¬ϕ�a��) = µdn

(χ�a� ∧ ϕ�a�) ≤ Pχϕ�n�

and

µdn

(¬∀x�χ�x� → ¬ϕ�x��) = µdn

(∃x¬�χ�x� → ¬ϕ�x��) ≤ nsPχϕ�n��If limn→∞ P

χ¬ϕ�n� = 0, then

µdn

(¬�χ�a� → ϕ�a��) = µdn

(χ�a� ∧ ¬ϕ�a�) ≤ Pχ¬ϕ�n�

and

µdn

(¬∀x�χ�x� → ϕ�x��) = µdn

(∃x¬�χ�x� → ϕ�x��) ≤ nsPχ¬ϕ�n��Let �λi " i ∈ I� be a set of all mutually nonequivalent sentences which are subfor-mulas of λ�kτ and does not have the conjunction symbol. Now �I� ∈ � and we havefor some ε: �→ � with limn→∞ ε�n� = 0: µd

n�¬λi� ≤ ε�n�, µdn�∨i∈I ¬λi� ≤ �I�ε�n�,

and µdn�λ�kτ� ≥ 1− �I�ε�n�.

If the vocabulary is allowed to have function symbols, then an obvious modifica-tion of the above proposition (replace +Q

kτ by ∗+Qkτ and “χ ∈ ,ϕτ ” by “χ ∈ ,ϕrτ for

Page 16: On probabilistic elimination of generalized quantifiers

16 KAILA

some r ∈ �”) guarantees that a collection of quantifiers is finitely weakly k-benignfor µd

n.Direct adaptation of Theorem 3.9 to random structures would give a result which

is, in practice, rather uninteresting; the next theorem will be more useful.

Theorem 4.7. Suppose τ is a finite vocabulary, µdn is a probability measure for τ-

structures, � # ∃ is a collection of quantifiers, and k ∈ �+ ∪ �ω�. The following areequivalent.

• �kωω��� has almost sure quantifier elimination for µd

n.• � is finitely weakly k-benign for µd

n.

Furthermore, �kωω��� has the zero-one law for µd

n if the vocabulary does not haveconstant symbols and one of the above conditions hold.

Proof. The proof is similar to the proofs of Theorems 3.5 and 3.9, the details areleft to the reader.

In Section 3 it is shown how the range of applications of Theorems 3.5 and 3.9can be extended to prove more general results for arbitrary elimination sets, notjust for elimination sets which consist of quantifier-free formulas. The same alsoapplies to Theorems 4.4 and 4.7 with obvious modifications.The next simple idea shows how zero-one laws can be used to prove convergence

laws. Suppose µdn is a probability measure for τ-structures and �i, i ∈ I ⊆ �, is a

collection of τ-structures. Let µin� i ∈ I, be the probability measure such that

µin�� �= ϕ� ={µdn�� �= ϕ � � ∈ �i� if µd

n�� ∈ �i� > 0 andµdn�� �= ϕ� if µd

n�� ∈ �i� = 0�

where � is a random structure of size n. Suppose the following holds.

• �i ∩�j = � for all distinct i� j ∈ I.• limn→∞ µd

n�� ∈ �i� ∈ �0� 1� for all i ∈ I.•∑i∈I limn→∞ µd

n�� ∈ �i� = 1.• A logic � has the zero-one law for each probability measure µin� i ∈ I.

Let ϕ be a sentence of ��τ�. Then

µdn�ϕ� = µd

n

(� �= ϕ and � ∈ ⋃i∈I �i)+O(µd

n

(� �∈ ⋃i∈I �i))

=∑i∈Iµdn

(� �= ϕ and � ∈ �i

)+O

(µdn

(� �∈ ⋃i∈I �i))

=∑i∈Iµin�� �= ϕ�µd

n�� ∈ �i� +O(µdn

(� �∈ ⋃i∈I �i))

and

limn→∞µ

dn�ϕ� =

∑i∈I1

limn→∞µ

dn�� ∈ �i��

Page 17: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 17

where I1 = �i ∈ I " limn→∞ µin�ϕ� = 1�. So the logic � has the convergence lawfor µd

n.Kolaitis and Vardi [11] proved that the logic �ω

∞ω has the zero-one law for theconstant atomic probability 1/2. They suggested the investigation of zero-one lawsof �ω

∞ω with variable atomic probabilities. Using Theorem 4.4, it is easy to seethat �ω

∞ω has the zero-one law if n−α ≤ pato�n� ≤ 1 − n−α for every α > 0 for allsufficiently large n, see Theorem 6.19. This result also follows from the facts that (1)every formula of �ω

∞ω is a formula of �k∞ω for some k ∈ �+, (2) every quantifier-

free formula of �k∞ω�τ�, where τ is a finite relational vocabulary, is equivalent

to a quantifier-free formula of �kωω�τ�, (3) there are only finitely many mutually

nonequivalent quantifier-free formulas of �kωω�τ�, and (4) the proofs of the zero-

one laws of Fagin [5] and Glebskii et al. [7] actually show that first-order logic �ωωhas almost sure quantifier elimination for pato.

5. A CHARACTERIZATION FOR CONVERGENCE LAWS

McArthur [17, Theorem 10] characterized the convergence laws of the logic �k∞ω,

k ∈ �+, in terms of �kωω-equivalence classes. The next theorem extends the result

of McArthur for the logic �k∞ω���.

Theorem 5.1. Suppose µdn is a probability measure, � is a collection of quantifiers,

and k ∈ �+. Then �k∞ω��� has the convergence law for µd

n if and only if there aredistinct �k

ωω���-equivalence classes �i, i ∈ I ⊆ �, such that limn→∞ µdn�� ∈ �i� ∈

�0� 1�, where � is a random structure of size n, for all i ∈ I and ∑i∈I limn→∞ µdn�� ∈

�i� = 1. Furthermore, �k∞ω��� has the zero-one law for µd

n if and only if there is an�kωω���-equivalence class � with limn→∞ µd

n�� ∈ �� = 1.

Proof. First suppose that there are such �kωω���-equivalence classes �i, i ∈ I.

Note that there are only countably many distinct �kωω���-equivalence classes �i,

i ∈ I ′ ⊆ �, which cannot be ignored on random structures, that is, µdn�� ∈ �i� �= 0

for some n ∈ �+. Let ϕi be a sentence of �k∞ω��� which characterizes the class �i

over random structures. Since �kωω���-equivalence classes coincide with �k

∞ω���-equivalence classes on finite structures (see Kolaitis and Vaananen [10, Theorem3.4 and the comment at the end of Sect. 3]), every sentence of �k

∞ω��� is equivalentto a sentence of the form

∨j∈J ϕj for some J ⊆ I ′ over random structures. Further,

µdn

(∨j∈Jϕj

) = µdn

(�∨j∈J∩Iϕj� ∨ �∨j∈J\Iϕj�) = ∑j∈J∩I

µdn�ϕj� + µd

n

(∨j∈J\Iϕj

)

and

limn→∞µ

dn

(∨j∈Jϕj

) = ∑j∈J∩I

limn→∞µ

dn�ϕj�

since∑i∈I limn→∞ µd

n�ϕi� = 1 and limn→∞ µdn�∨j∈I ′\I ϕj� = 0. So the logic �k

∞ω���has the convergence law.

Page 18: On probabilistic elimination of generalized quantifiers

18 KAILA

Then suppose that �k∞ω��� has the convergence law. Let ϕi, i ∈ I ′ ⊆ �, be

a list of sentences of �k∞ω��� which characterizes the distinct �k

ωω���-equiva-lence classes over random structures and I = �i ∈ I ′ " limn→∞ µd

n�ϕi� �= 0�. Now∑i∈I limn→∞ µd

n�ϕi� is a real number in the interval �0� 1�. If it is less than one,it is easy to see that �k

∞ω��� cannot have the convergence law since, for everyn ∈ �+, there is a finite subset I ′n of I ′ such that µd

n�∨i∈I ′n ϕi� ≥ 1− 1/n. Therefore∑

i∈I limn→∞ µdn�ϕi� = 1.

6. APPLICATIONS WITH ATOMIC PROBABILITIES

In this section we will give examples of the use of Theorem 4.4 and Corollary 4.5with atomic probabilities. By Proposition 4.3, we can also combine some of theresults.For a vectorized simple unary quantifier Q, let

fQ�n� ={�P� " �A�P� ∈ Q and �A� = n} and

lowQ�n� = min(fQ�n� ∪ �n#�Q� + 1�)�

Definition 6.1. A collection � of vectorized simple unary quantifiers is k-semi-stable, k ∈ �+, if there is an m ∈ �+ such that the sets

{i ∈ � " i < k and i ∈ fQ�n�

}and{

i ∈ � " i < k and n#�Q� − i ∈ fQ�n�}

are independent of n ≥ m for each Q ∈ � with #�Q� ≤ k. A collection of vectorizedsimple unary quantifiers is ω-semistable if it is k-semistable for every k ∈ �+. A vec-torized simple unary quantifier Q is k-semistable, k ∈ �+ ∪ �ω�, if the collection�Q� is.

In connection with simple unary quantifiers, we speak about k-stability instead ofk-semistability since in this case it characterizes whether �k

∞ω������ has the zero-one law, see the next proposition. Similar characterization for vectorized simpleunary quantifiers would be unnecessarily complicated for us.

Proposition 6.2. Suppose � is a collection of simple unary quantifiers, k ∈ �+, andµdn is a probability measure. Then �k

∞ω������ has the zero-one law (the convergencelaw) for µd

n if and only if � is k-stable. If a simple unary quantifier Q is not k-stable,�kωω�Q���� does not have the convergence law for µd

n.

Proof. It is easy to see that limn→∞ µdn�λ�k�� = 1 if � is k-stable. So we may assume

that � is not k-stable by Theorem 4.4.Suppose � contains a quantifier Q0 which is not k-stable. Suppose 0 ≤ i ≤ k− 1,

i ∈ fQ0�n� for infinitely many n, and i �∈ fQ0

�n� for infinitely many n. The casewhere n− i ∈ fQ0

�n� for infinitely many n and n− i �∈ fQ0�n� for infinitely many n

Page 19: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 19

is similar. If i = 0, let ϕ0 be Q0y�y �= y�. For 1 ≤ i ≤ k− 1, let ϕ0 be the followingsentence of �k

ωω�Q0�

∃x1 · · · ∃xi{ ∧1≤h<j≤i

xh �= xj ∧Q0y

[ ∨1≤j≤i

xj = y]}�

Then there are infinite sets S0� S1 ⊂ �+ such that � �= ¬ϕ if �A� ∈ S0 and � �= ϕif �A� ∈ S1.By the above observation, we may assume that the quantifiers in � are k-stable.

Then there are 0 ≤ i ≤ k− 1, natural numbers n0 < n1 < � � � , and distinct quanti-fiers Q0�Q1� � � � of � such that

i ∈ fQj�nj� ⇔ i �∈ fQj

�nj + 1�

and

i ∈ fQj�n� ⇔ i ∈ fQj

�n′�

for all n� n′ ≥ nj + 1 (or similar conditions hold for n − i instead of i). Let thesentence ϕj be as ϕ0 above but Q0 is replaced by Qj ,

ψj = def

{ϕj if i ∈ fQj

�nj�,¬ϕj if i �∈ fQj

�nj��ψ∗j = def ψj ∧

∧h<j

[ψh ↔ ∀x�x �= x�]� and

ϕ = def∨j∈�ψ∗2j �

Then � �= ϕ if �A� ∈ �n2j " j ∈ �� and � �= ¬ϕ if �A� ∈ �n2j+1 " j ∈ ��.

6.1. Unary Quantifiers—Constant Atomic Probability

Let Frv be the collection of all finite relational vocabularies. For atomic probabilitiesof the form α+ o�1�, where α ∈ �0� 1� is a constant, k ∈ �+, and τ ∈ Frv, let

Ckτα ={limn→∞µn�θ�x� y�� " θ is a y-simple formula of �k

ωω�τ�}∖�0� 1� and

Cα =⋃{Ckτα " k ∈ �+ and τ ∈ Frv

}�

It is clear that each Ckτα is finite and k < k′ implies that Ckτα ⊂ Ck′τα assuming thatthe vocabulary τ contains a relation symbol of arity at least two.

Proposition 6.3. For positive natural numbers r < s,

Cr/s ⊆{-/sm " -�m ∈ �+ and 1 ≤ - ≤ sm − 1

}�

Page 20: On probabilistic elimination of generalized quantifiers

20 KAILA

Proof. Let θ�x� y� be a quantifier-free formula of �ωω. By the definition of theprobability of formulas, we may assume that θ�x� y� does not contain the equality.Further, by the disjunctive normal form theorem we may assume that θ�x� y� is ofthe form

∨i∈I�∧j∈Ji θij�x� y��, where each θij�x� y� is an atomic or negated atomic

formula. Now it is easy to see that the claim holds.

Let

H ={h " h is a function h:�→ � and lim

n→∞h�n�/√n ln�n� = ∞

}and ρ�a� b� = �a− b� a+ b� ∩� for a� b ∈ �. For α ∈ �0� 1�, let

α ={Q " Q is an ω-stable simple unary quantifier and, for all

k ∈ �+ and τ ∈ Frv, there are n0 ∈ �+ and h ∈ H so that ρ�ξn� h�n��⊆ fQ�n� or ρ�ξn� h�n�� ∩ fQ�n� = � for all ξ ∈ Ckτα and n ≥ n0

}�

For example, let Qγ be a monotone ω-stable simple unary quantifier withlowQγ

�n� = �γn� + o�n�, where γ ∈ �0� 1� is a constant. Then Qγ ∈ α if γ �∈ Cα,especially Qγ ∈ 1/2 if γ �∈ �-/2m " -�m ∈ �+ and 1 ≤ - ≤ sm − 1�.The generalized Hartig and Rescher quantifiers are of the form

Ig ={�A�P1� P2� " P1� P2 ⊆ A and �P1� = g��P2��

}and

Rg ={�A�P1� P2� " P1� P2 ⊆ A and �P1� ≤ g��P2��

}�

respectively, where g " � → � is arbitrary. The quantifier IId, where Id�n� = nfor all n ∈ �, is the Hartig quantifier (on finite structures) and is also denoted by I.Similarly, RId is the Rescher quantifier (on finite structures) and is also denoted by R.For α ∈ �0� 1�, let

α ={Ig " for all k ∈ �+� i ∈ �� and τ ∈ Frv� there are n0 ∈ �+ and

h ∈ H so that(ρ�ξ1n� h�n�� ∪ �0� i� ∪ �n− i� n�

) ∩g(ρ�ξ2n� h�n�� ∪ �n− i� n�

) = � for all ξ1� ξ2 ∈ Ckτα and n ≥ n0}�

Note that{Ig " g�m� = �γm� + o�m�� whereγ ∈ �0� 1� is a constant so that

ξ1 �= γξ2 for all ξ1� ξ2 ∈ Cα ∪ �1�} ⊆ α

and a generalized Hartig quantifier Ig is in α if, for example, α is rational, g�m� =�γm� + o�m�, and γ ∈ �0� 1� is irrational. The collection �α of generalized Rescherquantifiers is defined in a similar manner as α above.

Definition 6.4. Let � σftp = �f : f " �+ → � and limn→∞ nm�f �n� −σ� = 0 for everym ∈ �� for σ ∈ �0� 1�. (The subscript ftp refers to the fact that the convergence isfaster than polynomial.)

Page 21: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 21

Theorem 6.5. Suppose the atomic probability is pato�n� = α+ O�√ln�n�/n�, where

α ∈ �0� 1� is a constant. Then the logic �ω∞ω���, where � ⊂ α ∪ α ∪�α is finite, has

� 1ftp-sure quantifier elimination for pato.

Proof. Using Proposition 4.6, we will show that � ∪ �∃� is ω-benign for pato. Theestimates for the convergence rates are given by Corollary 4.5 and the proof ofProposition 4.6. We assume that � ⊂ α, the general case follows easily. Supposeθ�x� y� is a y-simple formula of �ωω. The cases where µn�θ�x� y�� = 0 or 1 for allsufficiently large n are easy. Hence we may assume that µn�θ�x� y�� �∈ �0� 1� forall sufficiently large n. For a y-simple formula θ�x1� � � � � xm� y�, random structureson universe A, and some fixed a = �a1� � � � � am� ∈ Am with distinct components,the number of b ∈ A\�a1� � � � � am� with θ�a� b� is binomially distributed and thedistribution does not depend on a (if we assume that its components are distinct).Thus, for n ≥ m,

µn

(Qy[θ�x� y� ∧

m∧j=1xj �= y

])=∑

i∈I

(n−mi

)�µn�θ��i�1− µn�θ��n−m−i�

where I = fQ�n� ∩ �0� � � � � n−m�. The rest of the proof follows from Lemma 6.7,the proof of Proposition 4.6, and Corollary 4.5.

The following theorem due to Chernoff [2] (see also Bollobas [1]) gives upperbounds for the tails of binomial distributions.

Theorem (Chernoff) 6.6. Let P�i� = (ni

)pi�1− p�n−i be a binomial probability dis-

tribution. For any real r ≥ 0,

∑i∈IP�i� ≤ 2e−2r

2/n� where I = {i ∈ �0� � � � � n� " �i− np� ≥ r}�The next lemma was used in the proof of Theorem 6.5.

Lemma 6.7. Suppose p�n� = ξ + O�√ln�n�/n�, 0 ≤ p�n� ≤ 1, ξ ∈ Ckτα , k ∈ �+,and τ is a finite relational vocabulary. For Q ∈ α, 0 ≤ j ≤ m < k, and n ≥ m, let

Sj�n� =∑i∈fj�n�

(n−mi

)�p�n��i�1− p�n��n−m−i�

where fj�n� = �i ∈ � " i+ j ∈ fQ�n�� ∩ �0� � � � � n−m�. For n < m, we put Sj�n� = 0.Then Sj ∈ � 0

ftp for all 0 ≤ j ≤ m or Sj ∈ � 1ftp for all 0 ≤ j ≤ m.

Proof. By Chernoff’s theorem,

∣∣∣∣ ∑i∈fj�n�

(n−mi

)�p�n��i�1− p�n��n−m−i − σ

∣∣∣∣ ≤ 2e−2��h�n��2/n��1−O�

√n ln�n��/h�n��2

for some σ ∈ �0� 1�, h ∈ H, and all sufficiently large n.

Page 22: On probabilistic elimination of generalized quantifiers

22 KAILA

Definition 6.8. Let � σδ = �f : f : �+ → � and limn→∞ eεnδ�f �n� −σ� = 0 for some

ε > 0�, where σ ∈ �0� 1� and δ > 0.

For a set C ⊆ �0� 1� and a function g: �+ → �, let

�Cg ={Q " Q is a simple unary quantifier withfQ�n� ⊆ ρ�γn� g�n���or Q is monotone and �lowQ�n� − γn� ≤ g�n�� for someγ ∈ Cand all n ∈ �+

}�

Theorem 6.9. Let the atomic probability be pato�n� = α + o�1�, where α ∈ �0� 1� isa constant. Suppose C ⊂ �0� 1�\Cα is finite and limn→∞ g�n�/n = 0. Then the logic�ω∞ω���, where � ⊆ �Cg is ω-stable, has � 1

1 -sure quantifier elimination for pato.

Proof. We may assume that ∃ ∈ �. By Chernoff’s theorem, for all k ∈ �+ and allfinite relational vocabularies τ, there are c > 0 and ξ ∈ �0� 1� so that

µn�¬λ�kτ� ≤ ce−n�ξ−g�n�/n�2

for all n. So � is ω-benign for pato and the claim follows from Corollary 4.5.

Proposition 6.10. Let γ be a constant in �0� 1� and let g: �+ → � be a functionwith limn→∞�ln�n� − 2g�n�� = ∞. Suppose Q and Q′ are monotone simple unaryquantifiers and for some h ∈ � both

�1� lowQ�n� = �γn� + g�n� and lowQ′ �n� = �γn� + g�n� + h and�2� lowQ�n� = �γn� + g�n� and lowQ′ �n� > �γn� + g�n� + h

for infinitely many n ∈ �+. Then the logic �kωω��Q�Q′��, k = max�h + 1� 2�, does

not have the convergence law for the constant atomic probability γ.

Proof. The proof is based on the same idea as the proof of Theorem 4.4 in Fayolleet al. [6] (see, also, Theorem 6.13 of this paper, where the result of Fayolle et al. isextended). We prove the claim for random graphs. The proof is easy to generalize todirected graphs (by studying out-degree instead of degree) and further for randomstructures assuming that the vocabulary contains at least one relation symbol ofarity at least two.Let ϕ be the sentence ∃x�QyE�x� y� ∧ ¬Q′yE�x� y�� if h = 0 and otherwise

∃x1 · · · ∃xh{QyE�x1� y� ∧ ¬Q′y

[E�x1� y� ∨

(�x1 = y ∨ · · · ∨ xh = y�

∧¬E�x1� x2� ∧ · · · ∧ ¬E�x1� xh� ∧∧

1≤i<j≤hxi �= xj

)]}�

where E is the edge relation. The degree of a vertex v of a graph � is ��v′ ∈ G "� �= E�v� v′���. To prove that limn→∞ µn�ϕ� does not exist it suffices to show that

limn→∞µn

(a graph has a vertex of degree �γn� + g�n�) = 1�

Page 23: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 23

In order to prove this we use the following lemma which is included in Theorem 1of Chapter III of Bollobas [1].

Lemma 6.11. Suppose εn−3/2 ≤ pedg�n� ≤ 1 − εn−3/2 for a constant ε > 0 and alln ∈ �+. Let d: �+ → � be a function and let Xd�n� be the random variable repre-senting the number of vertices of degree d�n� on a random graph with n vertices. Theexpected value of Xd�n� is λ�d�n�� n� =def n

(n−1d�n�)�pedg�n��d�n��1 − pedg�n��n−1−d�n�,

and the following holds for every - ∈ �:

if limn→∞λ�d�n�� n� = ∞ then lim

n→∞µn�Xd�n� ≥ -� = 1�

By the above lemma, it suffices to show that limn→∞ λ��γn� + g�n�� n� = ∞.Using Stirling’s asymptotic formula n! ∼ nne−n√2πn, we have

λ(�γn� + g�n�� n

)= n(

n− 1�γn� + g�n�

)γ�γn�+g�n��1− γ�n−1−�γn�−g�n�

≥ c nn√nn�γn�+g�n�nn−1−�γn�−g�n�

× γ�γn�+g�n�

���γn� + g�n��/n��γn�+g�n�

× �1− γ�n−1−�γn�−g�n���n− 1− �γn� − g�n��/n�n−1−�γn�−g�n� → ∞�

as n→∞, where c > 0 is a constant and we used the facts that (recall: ln�1+ x� =x+O�x2� for �x� < 1)

���γn� + g�n��/n��γn�+g�n�γ�γn�+g�n�

× exp�− ln�n�/2�

= exp{[�γn� + g�n�

]ln( ��γn� + g�n��/n

γ

)− ln�n�/2

}

= exp{[�γn� + g�n�

]ln(1+O� 1

n� + g�n�

γn

)− ln�n�/2

}

= exp{�γn�γn

g�n� − ln�n�/2 +O�1�}→ 0� as n→∞�

and 1− γ ≥ �n− 1− �γn� − g�n��/n for all n ∈ �+.

Theorem 6.12. Suppose Q1/2 is the monotone simple unary quantifier withlowQ1/2

�n� = �n/2�. The logic �2ωω�Q1/2� does not have the convergence law for

the constant atomic probability 1/2.

Proof. Let Q1/2 be the monotone simple unary quantifier with lowQ1/2�n� = n −�n/2� + 1. Then Q1/2xϕ is equivalent to ¬Q1/2x¬ϕ for all formulas ϕ. Hence everyformula of �2

ωω��Q1/2�Q1/2�� can be expressed in �2ωω�Q1/2� and the claim follows

from Proposition 6.10.

Fayolle et al. [6] showed that the logic �2ωω�I� does not have the convergence law

for the constant edge probability 1/2. The following theorem extends their result ina straightforward way.

Page 24: On probabilistic elimination of generalized quantifiers

24 KAILA

Theorem 6.13. Let the constant atomic probability be 1/�1 + γ�, where γ ∈ �0� 1�,and g�m� = �γm� for all m ∈ �. Then the logic �2

ωω�Ig� does not have the conver-gence law.

Proof. We imitate the proof of Theorem 4.4 of Fayolle et al. [6], so the proof issimilar to the proof of Proposition 6.10. We prove the claim for random graphs.The proof is easy to generalize to directed graphs (by studying out-degree insteadof degree) and further for random structures assuming that the vocabulary containsat least one relation symbol of arity at least two. Since 1− 1/�1+ γ� = γ/�1+ γ�, itsuffices to prove the claim for the constant edge probability γ/�1+ γ�. Let ϕ be thesentence ∃xIgy� y�E�x� y��¬E�x� y��, where E is the edge relation. The sentence ϕsays that there is a vertex which has degree d such that d = g�n− d� = �γ�n− d��for some d ≤ n− 1.It is easy to see that there are infinitely many n ∈ �+ such that d �= �γ�n− d��

for all d ≤ n− 1. Hence µn�ϕ� = 0 for infinitely many n and it suffices to show thatlim supn→∞ µn�ϕ� = 1. For infinitely many n ∈ �+,

d = �γ�n− d�� ⇔ d = γ

1+ γn+ h�n��

where h�n� = O�1�. We apply Lemma 6.11 and show

limn→∞λ

1+ γn+ h�n�� n)= ∞�

Using Stirling’s asymptotic formula n! ∼ nne−n√2πn and the expansion ln�1+ x� =x+O�x2� for �x� < 1, we have

λ

1+ γn+ h�n�� n)= n(

n− 1γ

1+γn+ h�n�)(

γ

1+ γ) γ

1+γ n+h�n�( 11+ γ

) 11+γ n−1−h�n�

≥ c√n exp{−(

γ

1+ γn+ h�n�)ln(1+ 1+ γ

γ

h�n�n

)

−(

11+ γn− 1− h�n�

)ln(1− �1+ γ�

(1+ h�n�

n

))}

= c√n exp�O�1�� → ∞� as n→∞�

where c > 0 is a constant.

Corollary 6.14. Suppose γ ∈ �0� 1� and g�m� = �γm� for all m ∈ �. Then �2ωω�Ig�,

�1ωω�Rg� �≤sent �ω

∞ω�� ∪ �′�, where � ⊆ �Cf is ω-stable, C ⊂ �0� 1�\Cα is finite,limn→∞ f �n�/n = 0, �′ ⊂ α ∪ α ∪�α is finite, and α = 1/�1+ γ�.

Proof. By the proofs of Theorems 6.5 and 6.9, the collection � ∪ �′ ∪ �∃� is ω-benign for the constant atomic probability α. So, for the quantifier Ig the claimfollows from Theorems 4.4 and 6.13. For the quantifier Rg, we use the fact thatlimn→∞ µn�Rgx� x�¬U�x��U�x��� �∈ �0� 1�, where U is a unary relation symbol of

Page 25: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 25

the vocabulary. (This follows easily from the classical theorem of DeMoivre andLaplace, where binomial distribution is approximated by a normal distribution; see,e.g., Bollobas [1, Theorem 6 of Chap. I].)

A result of Kolaitis and Vaananen [10] states that �1ωω�I� �≤sent �ω

∞ω��� and�1ωω�R� �≤sent �

ω∞ω��I� ∪ �� for any finite collection � of simple unary quantifiers.

A detailed study of definability among unary quantifiers can be found in Vaananen[20]. One application of his results states that �ωω�Rg� ≤sent �ωω���, where � isthe collection of all simple unary quantifiers, if and only if there is an m ∈ � sothat g�n� ≤ m for all n ∈ �. The case of generalized Hartig quantifiers seems moredifficult and Vaananen gave definability results for them only in some special cases.The following theorem extends Theorems 4.1 and 5.1 of Fayolle et al. [6], where

the theorems are for sentences of the form Ix� y�ϕ�x�� ψ�y�� and Rx� y�ϕ�x�� ψ�y��,where ϕ and ψ are formulas of �ωω.

Theorem 6.15. Let � be a collection of quantifiers. Suppose � ∪ �∃� is k-benign,k ∈ �+, for the constant atomic probability. Then for every sentence of the formIx� y�ϕ�x�� ψ�y�� and Rx� y�ϕ�x�� ψ�y��, where ϕ and ψ are formulas of �k

∞ω���,we have

limn→∞µn

(Ix� y�ϕ�x�� ψ�y��) ∈ �0� 1� and

limn→∞µn

(Rx� y�ϕ�x�� ψ�y��) ∈ �0� 1/2� 1��

Proof. The proof is essentially the same as the proof of Theorems 4.1 and 5.1 inFayolle et al. [6]. By Theorem 4.4,

limn→∞µn

(∀x�ϕ�x� ↔ θ�x��) = 1 and limn→∞µn

(∀y�ψ�y� ↔ θ∗�y��) = 1

for some quantifier-free formulas θ and θ∗ of �kωω. Let the finite relational vocab-

ulary be τ and let �θi�x� " i ∈ I� be a list of all mutually nonequivalent completequantifier-free τ-formulas. Now θ�x� and θ∗�y� are equivalent to some formulas∨i∈J θi�x�, J ⊆ I, and

∨i∈J∗ θi�y�, J∗ ⊆ I, respectively. Hence

Ix� y�θ�x�� θ∗�y�� ⇔ Ix� y(∨

i∈Hθi�x��∨i∈H∗θi�y�

)�

whereH = J\J∗ andH∗ = J∗\J. Let p1 = µn�∨i∈H θi�x�� and p2 = µn�

∨i∈H∗ θi�y��

for some (all) n ∈ �+. We now have a multinomial probability distribution withprobabilities p1, p2, and 1− p1 − p2. Thus

µn(Ix� y

(∨i∈Hθi�x��

∨i∈H∗θi�y�

)) = �n/2�∑-=0

n!-!-!�n− 2-�!p

-1p-2�1− p1 − p2�n−2-�

Fayolle et al. showed, using analytical methods, that the above probability convergesto zero if p1 + p2 �= 0. The idea of the proof is similar in the case of the Rescherquantifier.

Fayolle et al. formulated the original theorems ([6, Theorems 4.1 and 5.1]) forHartig and Rescher quantifiers of any type �s� t� ∈ �2

+, which are defined in the

Page 26: On probabilistic elimination of generalized quantifiers

26 KAILA

obvious way (see Sect. 7), but the proofs are correct only in the case where s = t = 1.The next proposition shows that Theorem 5.1 of [6] is incorrect if s� t ≥ 2. Let Rs� t

be the Rescher quantifier of type �s� t�.

Proposition 6.16. Suppose s� t ≥ 2 and the atomic probability is a constant in �0� 1�.Then there are formulas ϕ�x� and ψ�y� of �ωω so that

limn→∞µn

(Rs� t x� y�ϕ�x�� ψ�y��) �∈ �0� 1/2� 1��

Proof. Let P1 and P2 be s-ary and, respectively, t-ary relation symbols of the vocab-ulary and let ϕ�x� be

P1�x1� � � � � xs� ∧ θs�x1� � � � � xs� ∧ x1 �= x2�

where θs�x1� � � � � xs� says, for each 1 ≤ i < j ≤ s, that xi = xj if i + j is even.Similarly, ψ�y� is

P2�y1� � � � � yt� ∧ θt�y1� � � � � yt��

Let the atomic probability be a constant p ∈ �0� 1�. The number of tuples ofelements which satisfy ϕ�x� (respectively, ψ�y�) is distributed binomially and theexpected value is p�n2 − n� (respectively, pn2), where n is the size of the struc-ture. By the classical theorem of DeMoivre and Laplace, where binomial distribu-tion is approximated by a normal distribution (see, e.g., Bollobas [1, Theorem 6 ofChap. I]),

limn→∞µn

(∣∣{a ∈ As " � �= ϕ�a�}∣∣ ≤ p�n2 − n�) = 1/2 and

limn→∞µn

(p�n2 − n� ≤ ∣∣{a ∈ At " � �= ψ�a�}∣∣) ∈ �1/2� 1��

Now the claim follows easily.

6.2. Vectorized Simple Unary Quantifiers—Atomic Probability IsBetween Two Functions

Definition 6.17. For v� k ∈ �+ with v ≤ k, let av�k� τ� be the maximum numberof distinct atomic subformulas, which involve a relation symbol of the vocabularyτ, of a formula of �k

ωω�τ� with variables in �x1� � � � � xk−1� y1� � � � � yv� so that all ofthese atomic formulas have a variable in �y1� � � � � yv�. Hence we have a1�k� τ� =∑R∈τ∑

1≤i≤#�R�(#�R�

i

)�k− 1�#�R�−i. For graphs (with the edge relation E), we do notcount atomic formulas of the form E�y� y� since they are never true and formulasE�x� y� and E�y� x� are counted as one formula since they are equivalent. So forgraphs, av�k� τ� = max�v′�k − v′� + v′�v′ − 1�/2 " 1 ≤ v′ ≤ v� = v�k − v� + v�v −1�/2, as can be easily seen.

For a function g: �+ → �, let

�g ={Q " Q is a simple unary quantifier such that �g�n�� n− g�n�� ∩� ⊆ fQ�n�for all n ∈ �+ or �g�n�� n− g�n�� ∩ fQ�n� = � for all n ∈ �+

}�

Page 27: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 27

and for v ∈ �+, let

�vg ={Q " Q is a monotone simple unary quantifier and lowQ�nv� ≤ g�n�for all n ∈ �+

}�

For a collection � of quantifiers, let v� be the collection of all v-vectorizations ofthe quantifiers in �. Let the class � σδ of functions be as in Definition 6.8.

Theorem 6.18. Let -� k ∈ �+ with - ≤ k. Suppose n−α ≤ pato�n� ≤ 1 − n−α fora constant α, 0 < αa-�k� τ� < 1/2, and all sufficiently large n. For all v ≤ k, letgv: �+ → � be a function with lim supn→∞ gv�n�/n1−αav�k�τ� < 1/v. Let δ = 1 −2αa-�k� τ�. Then �k

∞ω�� ∪ �′��τ�, where � ⊆ �g1 is k-stable and �′ ⊆ ⋃1≤v≤- v��vgv�is k--semi-stable, has � 1

δ -sure quantifier elimination for pato.

Proof. We will show that � ∪ �′ ∪ �∃� is �k� τ�-benign for pato. The estimates forthe convergence rates are given by Corollary 4.5. We first show that � ∪ �∃� is�k� τ�-benign for pato. Suppose θ�x� y� is a y-simple formula of �k

ωω�τ�. The caseswhere µn�θ�x� y�� = 0 or 1 for all sufficiently large n can be easily handled by thefact that � ∪ �∃� is k-stable. Thus we may assume that µn�θ�x� y�� �∈ �0� 1� for allsufficiently large n. Now the claim follows from Chernoff’s theorem, the calculationsare similar to those in Lemma 6.7.Then we show that �′ is �k� τ�-benign for pato. Suppose θ�x� y� is a y-

simple formula of �kωω�τ�, where x = �x1� � � � � xm� and y = �y1� � � � � yv�. The

cases where θ�x� y� is a formula of �kωω��� are easy. So we may assume that

θ�x� y� ∧ ∧1≤i<j≤m xi �= xj is not equivalent to any formula of �kωω���. The

disjunctive normal form theorem gives that there are a quantifier-free formulaθ∗�x� y� of �k

ωω�τ� such that θ∗�x� y� → θ�x� y� is valid and a v-tuple z of vari-ables in �x1� � � � � xm� ∪ �y1� � � � � yv� so that at least one of its components isin �y1� � � � � yv�, θ∗�x� z� is a y-simple formula, and µn�θ∗�x� z�� �∈ �0� 1� forall sufficiently large n. It suffices to show that, for some h ∈ � 1

δ , we haveµn�vQy�θ∗�x� y� ∧ int�y� z ��� ≥ h�n� for all n ∈ �+ and all Q ∈ �′ ∩ �vgv , whereint�y� z � says that y and z have the same interpretation.Let A be a universe of size n. We fix a = �a1� � � � � am� ∈ Am, the interpre-

tation of x, so that its components are distinct. Let �Ai " i ∈ I� be a maximalcollection of disjoint subsets of A\�a1� � � � � am� each containing v elements. Then�I� = ���A� −m�/v�. On each Ai we fix the interpretation of the variables y1� � � � � yvso that

∧1≤i<j≤v yi �= yj holds. We now have defined �I� interpretations of z. We

denote them by bi, i ∈ I. For random structures on universe A, the number of inter-pretations bi, i ∈ I, of z for which θ∗�a� bi� holds is binomially distributed and thedistribution does not depend on a (if we assume that its components are distinct).Now µn�θ∗�x� z�� ≥ n−αav�k�τ� and the claim follows from Chernoff’s theorem. Thecalculations are similar to those in Lemma 6.7.

Suppose n−α ≤ pato�n� ≤ 1− n−α for all α > 0 for all sufficiently large n. Let Qlnbe the monotone simple unary quantifier with lowQln

�n� = �ln�n��. Then Qln ∈ �vgv ,where gv�n� = �v ln�n��, for all v ∈ �+. Let δ be a constant in �0� 1�. Now theabove theorem shows that the logic �ω

∞ω��vQln " v ∈ �+�� has � 1δ -sure quantifier

elimination for pato.

Page 28: On probabilistic elimination of generalized quantifiers

28 KAILA

In the case of the logic �k∞ω, the above theorem can be slightly improved. Fur-

thermore, the proof is rather easy in this case.

Theorem 6.19. Let k ∈ �+. Suppose n−α ≤ pato�n� ≤ 1 − n−α for a constant α,0 < αa1�k� τ� < 1, and all sufficiently large n. Let δ = 1 − αa1�k� τ�. Then �k

∞ω�τ�has � 1

δ -sure quantifier elimination for pato.

Proof. We will show that the existential quantifier is �k� τ�-benign for pato. Theestimates for the convergence rates are given by Corollary 4.5 and the proofof Proposition 4.6. Suppose θ�x� y� is a y-simple formula of �k

ωω�τ�. The caseswhere µn�θ�x� y�� = 0 or 1 for all sufficiently large n can be easily handledby the fact that the existential quantifier is ω-stable. So we may assume thatµn�θ�x� y�� �∈ �0� 1� for all sufficiently large n. Now the claim follows from the factthat n−αa1�k� τ� ≤ µn�θ�x� y�� ≤ 1− n−αa1�k� τ� and

(1− n−αa1�k� τ�

)n−m= e�n−m� ln�1−n−αa1�k� τ�� ≤ e−�n−m�n−αa1�k� τ� ∈ � 0

δ �

where m is the number of the variables in the tuple x.

Theorem 6.19 extends the following result of Lynch [15, 16] (note that a1�k� τ� =k− 1 for graphs).

Theorem (Lynch) 6.20. Let τ be the vocabulary of graphs and let pedg be the edgeprobability. Suppose k ≥ 2 and n−α ≤ pedg�n� ≤ 1 − n−α for a constant α, 0 < α <1/�k − 1�, and all sufficiently large n. Then for all sentences ϕ of �k

∞ω�τ� there isδ > 0 such that µn�ϕ� ∈ � 0

δ ∪ � 1δ .

6.3. Rigidity Quantifiers—Atomic Probability IsBetween Two Functions

In this section we extend a result of Dawar and Gradel [4], which states that first-order logic �ωω augmented with the simple binary rigidity quantifier has almost surequantifier elimination on random graphs with the constant edge probability 1/2.A structure � is rigid if it has only the trivial automorphism Id: A→ A, Id�a� = a

for all a ∈ A. The following theorem can be found at least in [3].

Theorem 6.21. Suppose τ is a finite relational vocabulary and max�#�R�:R ∈ τ� ≥ 2. Then the class of rigid τ-structures is not definable in �ω

∞ω (even ifonly finite structures are considered).

Proof. Let �1 and �2 be rigid, connected (a structure is connected if it is nota disjoint union of two structures), and nonisomorphic finite τ-structures so thatthey satisfy the same sentences of �k

∞ω, where k ∈ �+. One can use a probabilisticargument to show that such structures exist. Let �′

1 be the disjoint union of �1 and�2 and let �′

2 be the disjoint union of two copies of �2. Now it is easy to see that�′

1 is rigid, �′2 is not rigid, and they satisfy the same sentences of �k

∞ω. The lastfact is easy to prove by using the k-pebble game.

Page 29: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 29

The rigidity quantifier of type r = �r1� � � � � rm� ∈ �m+ , m ∈ �+, is

Qrrig =

{�A� R1� � � � � Rm� " �A� R1� � � � � Rm� is rigid and each Ri ⊆ Ari}

and �rig = �Qrrig " r ∈ �m+ and m ∈ �+�. Let � σδ and av�k� τ� be as in Definitions

6.8 and 6.17, respectively.

Proposition 6.22. Let � ⊆ �rig, k ∈ �+, and r = max��1� ∪ �#�Q� " Q ∈ �and #�Q� ≤ k��. Suppose n−α ≤ pato�n� ≤ 1− n−α for a constant α, 0 <αar�k� τ� < 1/2, and all sufficiently large n. Then �k

∞ω����τ� has � 1δ -sure, where

δ = 1− 2αar�k� τ�, quantifier elimination for pato.

Proof. By applying Proposition 4.6, we first show that �Q2rig� ∃� is �k� τ�-benign

for pato. The estimates for the convergence rates are given by Corollary 4.5 andthe proof of Proposition 4.6. As in the proof of Theorem 6.19, we see that theassumptions of Proposition 4.6 hold for the existential quantifier.Let θ�x� y� be a y-simple formula of �k

ωω�τ�, where x = �x1� � � � � xm� and y =�y1� y2�. Let �Ti�x� z� " i ∈ I� be a list of all mutually nonequivalent consistent z-simple formulas of �k

ωω�τ� so that either �= Ti�x� z� → ψ�x� z� or �= Ti�x� z� →¬ψ�x� z� for all i ∈ I and z-simple formulas ψ�x� z� of �k

ωω�τ�. Note that �=Ti�x� z� → x- �= z for all i ∈ I and - ∈ �1� � � � �m� since we assume that the vocab-ulary τ is nonempty. Let Si� j�x� y�, where i� j ∈ I, be a minimal formula so that�= Ti�x� y1� ∧ Tj�x� y2� → �Si� j�x� y� ↔ θ�x� y��.Let a = �a1� � � � � am� be an interpretation of x with distinct components. By

Chernoff’s theorem (Theorem 6.6),

µn(��b ∈ A " � �= Ti�a� b��� ≥ 1

2n1−αa1�k� τ�) ≥ 1− 2e−�1/3�n

1−2αa1�k� τ� (3)

for all i ∈ I and all sufficiently large n.

Case I. ∃i ∈ I ∀j ∈ I �µn�Si� j�x� y��� µn�Sj� i�x� y�� ∈ �0� 1� for all sufficientlylarge n�. For a random structure � of size n, let �∗ be �A� �b ∈ A2 " � �= θ�a� b���.By Estimate (3), we may assume that there are distinct b′� b′′ ∈ A\�a1� � � � � am�with � �= Ti�a� b′� ∧ Ti�a� b′′�, where i ∈ I is such that it witnesses that we arein case I. We now can define an automorphism f of �∗ by letting f �b′� = b′′,f �b′′� = b′, and f �a� = a if a �∈ �b′� b′′�. So in this case

µn(Q2

rigyθ�x� y�) ≤ �I�2e−�1/3�n1−2αa1�k� τ� ∈ � 0

δ �

Case II. ∀i ∈ I ∃j ∈ I �µn�Si� j�x� y�� �∈ �0� 1� for all sufficiently large n orµn�Sj� i�x� y�� �∈ �0� 1� for all sufficiently large n�. Let A0 be �a1� � � � � am�. We firstshow that

p�n� = µn(�∗ has an automorphism π with π�a� �= afor some a ∈ A\A0

) ∈ � 0δ �

We say that a permutation π: A → A is of kind d if ��a ∈ A " π�a� �= a�� = d.The number of permutations on A which are of kind d is at most

(nd

)d! ≤ nd.

Page 30: On probabilistic elimination of generalized quantifiers

30 KAILA

By Estimate (3), among other things,

p�n� ≤n∑d=2nd(1− n−αa2�k� τ�

)�d/2�·��1/4�n1−αa1�k� τ�−2�·1/2·�1/�m+1�� + �I�2e−�1/3�n1−2αa1�k� τ�≤ nn2e−1/�8m+8�n1−2αa2�k� τ�+n−αa2�k� τ� + �I�2e−�1/3�n1−2αa1�k� τ� ∈ � 0

δ

for all sufficiently large n.For a complete quantifier-free τ-formula χ�x�, which implies that xi �= xj for all

distinct i� j ∈ �1� � � � �m�, letAχ =

{a ∈ A0 " either �Ti�a� y2� ∧ χ�a�� → θ�a� a� y2� or�Ti�a� y1� ∧ χ�a�� → θ�a� y1� a�is neither valid nor inconsistent for some i ∈ I}�

By Estimate (3),

µn(� �= χ�a� and a permutation π of A0 with π�a� �= afor some a ∈ Aχ defines an automorphism of �∗)≤ m(1− n−αa1�k� τ�)�1/2�n1−αa1�k� τ� + �I�2e−�1/3�n1−2αa1�k� τ� ∈ � 0

δ �

On the other hand, the condition � �= χ�a� determines whether a permutation onA0\Aχ defines an automorphism of �∗. Hence �Q2

rig� ∃� is �k� τ�-benign for pato.

The proof is similar for simple r-ary, r ≥ 3, rigidity quantifiers. Now we firststudy, using the same ideas as above, the cases y1 �= y2 ∧

∧�y1 = yi " 3 ≤ i ≤r� ∧ θ�x� y�� � � �, ∧1≤i<j≤r yi �= yj ∧ θ�x� y� separately. Then it follows easily thatµn�Qr

rigyθ�x� y�� ∈ � 0δ ∪ � 1

δ . It is also easy to generalize the proof for nonsim-ple rigidity quantifiers. Note that, although a formula of �k

∞ω��rig� may containinfinitely many distinct quantifiers (we may increase the number of formulas whichthey bind), we may apply Proposition 4.6 since it suffices to consider only finitelymany of these quantifiers. Also note that the cases with unary rigidity quantifiers aretrivial since all sufficiently large unary structures have nontrivial automorphisms.

The above proposition, as all similar results in this paper, holds also for randomgraphs.

Theorem 6.23. Suppose n−α ≤ pato�n� ≤ 1 − n−α for all constants α > 0 for allsufficiently large n. Let δ be a constant in �0� 1�. Then �ω

∞ω��rig� has � 1δ -sure quantifier

elimination for pato.

Proof. Proposition 6.22.

Theorem 6.24. Suppose n−α ≤ pato�n� ≤ 1 − n−α for a constant α ∈ �0� 1� and allsufficiently large n. If the vocabulary contains a relation symbol of arity at least two(or it is the vocabulary of graphs), then µn[a structure (a graph) is rigid] ∈ � 1

1−α.

Proof. The claim follows easily from a modification of a part of the proof of Propo-sition 6.22. The details are left to the reader.

Page 31: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 31

7. HIERARCHY THEOREMS FOR HARTIG ANDRESCHER QUANTIFIERS

A quantifier Q is definable in a logic � if there is a sentence ϕ of ��τ�, where τ isthe vocabulary of the structures in Q, so that Q = �� " � �= ϕ and � is a τ-struc-ture�. If � is of the form �ωω��� or �ω

∞ω���, then Q is definable in � if andonly if �ωω�Q� ≤sent � . Luosto [13] studied hierarchies of unary quantifiers. Oneapplication of his results shows that 2I is not definable in �ω

∞ω���, where � is anyfinite collection of unary quantifiers. He left an open question: Is it true that v+1I isnot definable in �ωω�vI� when v ∈ �+. Theorem 7.1 below gives a positive answerto the question of Luosto.Let us first define Hartig and Rescher quantifiers of types �s� t� ∈ �2

+:

Is� t = {�A�S� T � " S ⊆ As� T ⊆ At and �S� = �T �} andRs� t = {�A�S� T � " S ⊆ As� T ⊆ At and �S� ≤ �T �}�

The quantifier I1� 1 is called the Hartig quantifier and it is also denoted by I. In thesame way, R1� 1 is called the Rescher quantifier and it is also denoted by R. Notethat we may identify Iv� v and Rv� v with the vectorizations vI and vR, respectively. For�s� t�� �s′� t ′� ∈ �2

+, let �s� t� � �s′� t ′� mean that

min�s� t� ≤ min�s′� t ′� and max�s� t� ≤ max�s′� t ′��Theorem 7.1. Let �s� t�� �s′� t ′� ∈ �2

+. The quantifier Is� t (respectively, Rs� t� is defin-

able in �ω∞ω�Is

′�t ′ � [respectively, in �ω∞ω�Rs

′�t ′ �� if and only if �s� t� � �s′� t ′�.

Proof. We prove the claim only for Hartig quantifiers, the proof for Rescher quan-tifiers is essentially the same. When �s� t� � �s′� t ′�, it is easy to see that Is� t isdefinable even in �k

ωω�Is′� t ′ �, where k = max�s′� t ′�.

Then suppose �s� t� /� �s′� t ′�. We may assume that s ≤ t. Note that t ≥ 2, since�1� 1� � �s′� t ′� for all �s′� t ′� ∈ �2

+. We will tailor a sequence µ∗n, n ∈ �+, of proba-bility measures so that �ω

∞ω�Is′�t ′ � has the zero-one law but � t

ωω�Is� t� does not haveeven the convergence law.Let the vocabulary τ be �U1� � � � � Us� V1� � � � � Vt�W �, where all relation symbols

are unary. Let pi, i ∈ �+, be the ith prime number (p1 = 2, p2 = 3, p3 = 5, etc.)and let dn = max�d ∈ � " d = ti for some i ∈ � and pdt ≤ ln�n�� for n ≥ 3. Forall sufficiently large n, let �n be a τ-structure of size n which satisfies the followingconditions:

• ∀x[∨ si=1Ui�x� ∨

∨ tj=1 Vj�x� ∨W �x�

].

• U1� � � � � Us� V1� � � � � Vt�W are mutually disjoint.• �Ui� = pdni for 1 ≤ i < s.• �Us� = pdns

∏tj=s+1 p

dnj .

• �Vi� =∏tj=1 p

dn/tj for 1 ≤ i ≤ t if n is odd.

• �Vi� = �∏tj=1 pdn/tj � − 1 for 1 ≤ i ≤ t if n is even.

Let µ∗n be a probability measure so that µ∗n�� ∼= �n� = 1, where � is a randomstructure of size n, for all sufficiently large n.

Page 32: On probabilistic elimination of generalized quantifiers

32 KAILA

For instance, if s′ ≤ s and t ′ ≤ t, we have

µ∗n(Is′� t ′y1� � � � � ys′� y1� � � � � yt ′

(U1�y1� ∧ · · · ∧Us′ �ys′ �� V1�y1� ∧ · · · ∧ Vt ′ �yt ′ �

)) = 0

for all sufficiently large n. Furthermore, it is easy to see that �ω∞ω�Is

′� t ′ � has thezero-one law by Theorem 4.4. We leave the simple but rather long details to thereader. On the other hand,

µ∗n(Is� ty1� � � � � ys� y1� � � � � yt

(U1�y1� ∧ · · · ∧Us�ys�� V1�y1� ∧ · · · ∧ Vt�yt�

))={ 0 if n is even and1 if n is odd

for all sufficiently large n. Hence � tωω�Is� t� does not have the convergence law.

Note that the above proof can be easily modified so that there are no referencesto random structures.

8. APPLICATIONS WITH BUILT-IN PERMUTATIONS

Usually it is assumed that logics have the equality which is interpreted in the sameway on every structure. It is an example of so-called built-in relations, other exam-ples are, among other things, the linear order and the successor relation.

Definition 8.1. Let J be a set. Suppose we define structures so that we associateto each one special relations which we denote always by Rbi

j , j ∈ J. They are notinterpretations of any relation symbols of the vocabulary, and on all structures �and � of the same size the structures �A� �Rbi

j �j∈J� and �B� �Rbij �j∈J� are isomorphic.

Then we say that Rbij , j ∈ J, are built-in relations. Built-in functions are defined in

the same way and, if a structure � has an r-ary built-in function f , we assume thatdom�f � = Ar . A unary built-in function, which is a permutation on each structure,is a built-in permutation.

Suppose first-order logic contains a built-in linear order (<) or a built-in successorrelation and limn→∞ pato�n� �∈ �0� 1� (or it does not exist). Then it does not havethe zero-one law since, for example,

µn(∃x[U�x� ∧ ¬∃y�y < x�]) = pato�n��

where U is a unary relation symbol of the vocabulary. See Spencer [19], Shelah andSpencer [18], and Lynch [14] for further results with built-in relations and functions.In the following we will concentrate on built-in permutations.Let be a collection of built-in permutations. Suppose π1� � � � � π- ∈ . We say

that an element a of universeA is on a �π1� � � � � π-�-loop if � �= π- ◦ · · · ◦π1�a� = a.Note that the definition that a is on a �π1� � � � � π-�-loop is slightly misleading. Thefact that a is on a �π1� � � � � π-�-loop does not imply that, for example, π1�a� ison the same loop, but π1�a� is then always on the �π2� � � � � π-� π1�-loop. All loopsof the above form are called -loops. For collections �1 and �2 of -loops, let

Page 33: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 33

Nn��1��2� be the number of elements on a structure of size n which are on eachloop of �1 but not on any loop of �2. Elements a and b are on the same -component if � �= π- ◦ · · · ◦ π1�a� = b for some π1� � � � � π- ∈ and - ∈ �+. Thesize of a -component is the number of its elements. For an r ∈ � and a tuplea = �a1� � � � � am� of elements of universe A, let

ρr�a� ={b ∈ A " there are π1� � � � � πj ∈ , j ≤ r, and a ∈ �a1� � � � � am�so that πj ◦ · · · ◦ π1�a� = b

} ∪ {a1� � � � � am}�For a collection of built-in permutations, let the collection ∗ of built-in permu-tations be ∪ �π−1 " π ∈ �, where π−1 is the inverse function of π.We say, with the obvious meaning, that a collection of quantifiers is, for instance,

finitely weakly k-benign for an atomic probability with a collection of built-in per-mutations. We now are ready to apply the results of Section 4 for �ωω��� and�ω∞ω���, where � is a suitable collection of monotone simple unary quantifiers,

with built-in permutations. However, in the following we will concentrate on thelogics �ωω and �ω

∞ω with built-in permutations. Our results extend Theorem 2.6 ofLynch [14] which states that first-order logic �ωω with a cyclic successor functionhas the zero-one law for the constant atomic probability 1/2.

8.1. Atomic Probability Is Between Two Constants

Proposition 8.2. Let be a collection of built-in permutations. Suppose there are a -loop and an m ∈ �+ so that the number of elements on that particular -loop is mfor infinitely many sizes of structures. (In the case of random graphs we assume thatm ≥ 2.) Then first-order logic �ωω with does not have the zero-one law for pato if0 < pmin ≤ pato�n� ≤ pmax < 1 for some constants pmin and pmax and all n ∈ �+.

Proof. Let ϕ be the sentence ∀x�θ�x� → U�x��, where θ characterizes the ele-ments which are on the -loop and U is a unary relation symbol of the vocabulary.Then µn�ϕ� = �pato�n��m for infinitely many n.

A collection of built-in permutations is smooth if either

Nn��1��2� = 0 for all sufficiently large n or

limn→∞

Nn��1��2�ln�n� = ∞

for all finite collections �1 and �2 of -loops.

Theorem 8.3. Suppose a finite collection of built-in permutations is smooth, = ∗, and 0 < pmin ≤ pato�n� ≤ pmax < 1 for some constants pmin and pmax and alln ∈ �+. Then first-order logic �ωω with has � 1

ftp-sure quantifier elimination for pato.Further, if the sizes of -components are on each structure below some fixed finitenumber, then even the infinitary logic �ω

∞ω with has � 1ftp-sure quantifier elimination

for pato.

Page 34: On probabilistic elimination of generalized quantifiers

34 KAILA

Proof. Let us fix a finite relational vocabulary τ. Using the obvious modification ofProposition 4.6, we will show that the existential quantifier is finitely weakly �ω� τ�-benign for pato with . Then �ωω with has almost sure quantifier elimination forpato by Theorem 4.7. The estimates for the convergence rates are given by obviousmodifications of Corollary 4.5 and the proof of Proposition 4.6.Let θ�x� y� be a y-simple formula of �ωω�τ ∪ � with term rank r ∈ � and let

χ�x� be a 3r-complete quantifier-free �τ ∪ �-formula. Let us first assume thatθ�x� y� is of the form

∧h∈H θh�x� y�, where each θh is an atomic or negated atomic

formula. Since is smooth, we may assume that µn�χ�a�� > 0 for some interpre-tation a of x for all sufficiently large n. Let � be a random structure of size n andlet a be an interpretation of x such that � �= χ�a�. Let �bi " i ∈ In� be a maximalcollection of elements of A such that:

• ρ3r�a� ∩ ρr�bi� = � for all i ∈ In.• ρr�bi� ∩ ρr�bj� = � for all distinct i� j ∈ In.• Each bi, i ∈ In, satisfy those of the formulas θh�x� y�, h ∈ H, which are equa-

tions and negated equations of the form t1�y� = t2�y� and t1�y� �= t2�y�, respec-tively, where t1 and t2 are -terms.

Let �1 and �2 be the collections of -loops which correspond to the above equa-tions and negated equations, respectively. We may assume that

limn→∞Nn��1��2�/ ln�n� = ∞�

Then also limn→∞ �In�/ ln�n� = ∞, as it is easily seen.The events θ�a� bi�, i ∈ In, are mutually independent and the probability

µn�θ�a� bi� � χ�a�� is the same for all i ∈ In. If µn�θ�a� bi� � χ�a�� = 0 for allsufficiently large n, then θ�a� b� can only hold if ρr�a� ∩ ρr�b� �= �. This caseis handled by the 3r-complete quantifier-free �τ ∪ �-formula χ�x�. So we mayassume that µn�θ�a� bi� � χ�a�� ≥ ξ, where ξ is a constant in �0� 1�, for allsufficiently large n. Then

µn(χ�a� ∧ ¬∃yθ�a� y�) ≤ µn(¬∃yθ�a� y� � χ�a�)≤ µn

(¬∃i[i ∈ In ∧ θ�a� bi�] � χ�a�) ≤ �1− ξ��In� ∈ � 0ftp (4)

for all sufficiently large n.By the disjunctive normal form theorem, the above proves the claim also for an

arbitrary y-simple formula θ�x� y�. Finally, if the sizes of -components are belowsome fixed finite number, it follows easily that the existential quantifier is even�ω� τ�-benign for pato with .

The next simple proposition demonstrates the fact that fixpoint logic and theinfinitary logic �ω

∞ω can use built-in permutations more efficiently to destroy azero-one law than first-order logic. For the definition of fixpoint logic, see, e.g.,Kolaitis and Vardi [11], where one of the results shows that the infinitary logic �ω

∞ωcan express every formula of fixpoint logic on finite structures. Let π+1 be sucha built-in permutation that each structure contains exactly one �π+1�-component.

Page 35: On probabilistic elimination of generalized quantifiers

ON PROBABILISTIC ELIMINATION OF GENERALIZED QUANTIFIERS 35

We say that π+1 is a cyclic successor function. Then �π+1� π−1+1� is smooth and first-order logic �ωω with π+1 has the zero-one law for suitable atomic probabilities (seeTheorems 8.3 and 8.6).

Proposition 8.4. Fixpoint logic with a cyclic successor function does not have theconvergence law for any probability measure µd

n.

Proof. Let ϕ�x� y� be the least fixpoint of the following formula (V is a binaryrelation variable)

V �x� y� ∨ ∃z[π+1�x� = z ∧ π+1�z� = y]�Then clearly � �= ∃x∀yϕ�x� y� if and only if �A� is odd.

8.2. Atomic Probability Is Between Two Functions

A collection of built-in permutations is γ-smooth, γ ∈ �0� 1�, if either

Nn��1��2� = 0 for all sufficiently large n or

lim infn→∞

Nn��1��2�nγ

> 0

for all finite collections �1 and �2 of -loops. Let av�k� τ� be as in Definition 6.17.

Theorem 8.5. Let k ∈ �+ and let be a finite collection of built-in permutations sothat = ∗ and the sizes of -components are on each structure at most s ∈ �+.Suppose n−α ≤ pato�n� ≤ 1 − n−α for a constant α, 0 < αas�ks� τ� < 1, and allsufficiently large n. Suppose is γ-smooth for some γ with αas�ks� τ� < γ ≤ 1. Then�k∞ω�τ� with has � 1

δ -sure, where δ = γ− αas�ks� τ�, quantifier elimination for pato.

Proof. The proof is essentially the same as the proof of Theorem 8.3. We just makesome obvious modifications and replace (4) by

µn(χ�a� ∧ ¬∃yθ�a� y�) ≤ µn(¬∃yθ�a� y� � χ�a�)

≤ µn(¬∃i[i ∈ In ∧ θ�a� bi�] � χ�a�)

≤ (1− n−αas�ks� τ�)�In� ≤ e−�In�n−αas �ks� τ� ∈ � 0δ �

where δ = γ − αas�ks� τ�.

Theorem 8.6. Suppose n−α ≤ pato�n� ≤ 1 − n−α for every α > 0 for all sufficientlylarge n, a finite collection of built-in permutations is γ-smooth for some 0 < γ ≤ 1,and = ∗. Let δ be a constant in �0� γ�. Then first-order logic �ωω with has� 1δ -sure quantifier elimination for pato. Further, if the sizes of -components are on

each structure below some fixed finite number, then even the infinitary logic �ω∞ω with

has � 1δ -sure quantifier elimination for pato.

Proof. The proof is similar to the proofs of Theorems 8.3 and 8.5.

Page 36: On probabilistic elimination of generalized quantifiers

36 KAILA

ACKNOWLEDGMENTS

I would like to thank Jouko Vaananen, Kerkko Luosto, and an anonymous referee for valuablecomments.

REFERENCES

[1] B. Bollobas, Random graphs, Academic Press, London, (1985).[2] H. Chernoff, A measure of asymptotic efficiency for test of a hypothesis based on the

sum of observation, Ann Math Stat 23 (1952), 493–509.[3] A. Dawar, Feasible computation through model theory, Ph.D. thesis, University of

Pennsylvania, 1993.[4] A. Dawar and E. Gradel, Generalized quantifiers and 0–1 laws, Proc Tenth Annual

IEEE Symp Logic in Computer Science, 1995, pp. 54–64.[5] R. Fagin, Probabilities on finite models, J Symbolic Logic 41 (1976), 50–58.[6] G. Fayolle, S. Grumbach, and C. Tollu, Asymptotic probabilities of languages with gen-

eralized quantifiers, Proc Eighth Annual IEEE Symp Logic in Computer Science, 1993,pp. 199–207.

[7] Yu.V. Glebskii, D.I. Kogan, M.I. Liogon’kii, and V.A. Talanov, Range and degree ofrealizability of formulas in the restricted predicate calculus, Kibernetika (Kiev) 5 (1969),17–28. [English trans.: Cybernetics 5 (1972), 142–154.]

[8] L. Hella, Ph.G. Kolaitis, and K. Luosto, Almost everywhere equivalence of logics infinite model theory, Bull Symbolic Logic 2 (1996), 422–443.

[9] V.V. Knyazev, Zero-one law for an extension of first-order predicate language,Kibernetica, 2 (1990), 110–113. [English trans.: Cybernetics 26 (1990), 292–296.]

[10] Ph.G. Kolaitis and J.A. Vaananen, Generalized quantifiers and pebble games on finitestructures, Ann Pure and Applied Logic 74 (1995), 23–75.

[11] Ph.G. Kolaitis and M.Y. Vardi, Infinitary logics and 0–1 laws, Inform and Comput 98(1992), 258–294.

[12] P. Lindstrom, First order predicate logic with generalized quantifiers, Theoria 32 (1966),186–195.

[13] K. Luosto, Hierarchies of monadic generalized quantifiers, J Symbolic Logic 65 (2000),1241–1263.

[14] J.F. Lynch, Almost sure theories, Ann Math Logic 18 (1980), 91–135.[15] J.F. Lynch, An extension of 0–1 laws, Random Struct Alg 5 (1994), 155–172.[16] J.F. Lynch, Infinitary logics and very sparse random graphs, J Symbolic Logic 62 (1997),

609–623.[17] M. McArthur, Convergence and 0–1 laws for �k

∞ω under arbitrary measures, LectureNotes in Comput Sci 933 (1995), 228–241.

[18] S. Shelah and J. Spencer, Random sparse unary predicates, Random Struct Alg 5 (1994),375–394.

[19] J. Spencer, A survey/expository paper—Zero-one laws with variable probability,J Symbolic Logic 58 (1993), 33–53.

[20] J. Vaananen, Unary quantifiers on finite models, J Logic Lang Inform 6 (1997), 275–304.