On Guessing Whether a Sequence has a Certain Property

Samuel Alexander The Ohio State University Department of Mathematics 231 West 18th Avenue Columbus OH 43210 USA

                 alexander@math.ohio-state.edu

Abstract

A concept of “guessability” is defined for sets of sequences of naturals. Eventually, these sets are thoroughly characterized. To do this, a nonstandard logic is developed, a logic containing symbols for the ellipsis as well as for functions without fixed arity.

1 Motivation

Suppose Alice and Bob are playing a game. Alice is reading a fixed sequence, one entry at a time. Bob is trying to guess whether 0 is in the sequence. He can revise his guess with each new revealed entry, and he wins if his guesses converge to the correct answer. He has an obvious strategy: always guess no, until 0 appears (if ever), then guess yes forever. The set of sequences containing 0 is guessable.

Suppose, instead, Bob is trying to guess whether Alice’s sequence contains infinitely many zeroes. We will see there is no strategy, not even if Bob has unlimited computation power. The set of sequences with infinitely many zeroes is unguessable.

A sequence f : ℕ → ℕ is onto if ∀m ∃n f(n) = m. This definition uses nested quantifiers: quantifiers appear in the scope of other quantifiers. Is it possible to give an alternate definition without nested quantifiers? The answer is “no”, but how to prove it? We will give a proof of a very strong negative answer, strong in the sense that nested quantifiers cannot be eliminated even in an extremely powerful language. Of course, the technique generalizes to a wide class of sets of sequences, not just the onto sequences.

2 Basics

Let ℕ^{ℕ} be the set of sequences f : ℕ → ℕ, and let ℕ^{<ℕ} be the set of finite sequences.

Definition 1. A function G : ℕ^{<ℕ} → {0, 1} guesses (and is a guesser for) a set S ⊆ ℕ^{ℕ} if for every f : ℕ → ℕ, there exists some m > 0 such that for all n > m,

G(f(0), …, f(n)) = \begin{cases}1, & if f ∈ S; \\ 0, & if f ∉ S. \end{cases}

A set S ⊆ ℕ^{ℕ} is guessable if it has a guesser.

The next test is very useful for showing nonguessability, though its converse is not true.

Theorem 2. Let S ⊆ ℕ^{ℕ}. Suppose that, for every finite sequence g ∈ ℕ^{<ℕ}, there are sequences g_{1}, g_{2} ∈ ℕ^{ℕ} extending g with g_{1} ∈ S and g_{2} ∉ S. Then S is nonguessable.

Proof. Suppose S has a guesser G. I will define a sequence f : ℕ → ℕ such that G(f(0), …, f(n)) fails to converge, which violates the definition of guesser.

Clearly S ≠ ∅, so let s_{1} : ℕ → ℕ be some sequence in S. By definition of guesser, we can find some x_{1} such that G(s_{1}(0), …, s_{1}(x_{1})) = 1. Let f(0) = s_{1}(0), …, f(x_{1}) = s_{1}(x_{1}).

Inductively, suppose x_{1} < ⋯ < x_{k} and f(0), …, f(x_{k}) are defined such that

G(f(0), …, f(x_{i})) ≡ i (mod 2)

for i = 1, …, k. By the theorem’s hypothesis, we can find some s_{k+1} : ℕ → ℕ, extending the finite sequence (f(0), …, f(x_{k})), such that s_{k+1} is in S iff k + 1 ≡ 1 (mod 2). By definition of guesser, find x_{k+1} > x_{k} such that G(s_{k+1}(0), …, s_{k+1}(x_{k+1})) ≡ k + 1 (mod 2). Let f(x_{k} + 1) = s_{k+1}(x_{k} + 1), …, f(x_{k+1}) = s_{k+1}(x_{k+1}).

This defines sequences f : ℕ → ℕ and x_{1} < x_{2} < ⋯ with the property that

G(f(0), …, f(x_{i})) ≡ i (mod 2)

for every i > 0. This contradicts that G(f(0), …, f(n)) is supposed to converge.

Using the above test, we can immediately confirm, for example, the set of sequences containing infinitely many zeroes is nonguessable, as is the set of onto sequences.

Remark 3. Theorem 2 is constructive up to certain choices. Starting with a set S satisfying the hypotheses of Theorem 2 and naively trying to guess it, and being systematic in the choices from the proof, can lead to the creation of a concrete sequence which thwarts the naive guessing attempt. In an informal sense, it should be especially difficult for someone not in the know to guess whether the resulting sequence lies in S. And the more sophisticated the futile guessing attempt, the more difficult the resulting sequence becomes. For some explicit examples, see sequences \underline{A082691}, \underline{A182659}, and \underline{A182660} in Sloane’s OEIS [5].

Tsaban and Zdomskyy also briefly mention a somewhat similar notion of guessable sets in their paper [6].

3 A Logic for Ellipses

Because guessers are functions which do not have “arity” in the usual sense, instead being defined on the whole space ℕ^{<ℕ} of finite sequences, and since we care so much about expressions like G(f(0), …, f(n)), we will extend logic to mesh better with these sorts of expressions. I assume familiarity with basic first-order logic, which Enderton [2] has written about extensively, as has Bilaniuk [1].

Definition 4. A language with ellipses is a standard language of first-order logic, with a constant symbol 0, together with a set of function symbols of arity ℕ^{<ℕ} and a special logical symbol ⋯_{x} for every variable x.

To avoid confusion, we will use ⋯_{x} for the syntactical symbol and … for meta-ellipses. For example, G(s(0), …, s(2)) is a meta-abbreviation for

G(s(0), s(1), s(2)),

different than G(s(0), ⋯_{x} , s(2)) which has no counterpart in classical logic.

Definition 5. If ℒ is a language with ellipses, then the terms of ℒ (and their free variables) are defined inductively:

1. For any variable x, x is a term and F V (x) = {x}.

2. For any constant symbol c, c is a term and F V (c) = ∅.

3. If f is a function symbol of arity n or arity ℕ^{<ℕ}, and t_{1}, …, t_{n} are terms, then f(t_{1}, …, t_{n}) is a term with free vars F V (t_{1}) ∪ ⋯ ∪ F V (t_{n}).

4. If G is an ℕ^{<ℕ}-ary function symbol, and u, v are terms, and x is a variable, then G(u(0), ⋯_{x} , u(v)) is a term with free variables

(F V (u)\{x}) ∪ F V (v).

The well-formed formulas of ℒ are defined as usual from these terms. Term substitution is defined by the usual induction with two new cases:

• If y ≠ x then

G(u(0), ⋯_{x} , u(v))(y|t) = G(u(y|t)(0), ⋯_{x} , u(y|t)(v(y|t))).

• G(u(0), ⋯_{x} , u(v))(x|t) = G(u(0), ⋯_{x} , u(v(x|t))).

A model for a language with ellipses ℒ is a model ℳ for the classical part of ℒ, together with a function G^{ℳ} : ℳ^{<ℕ} → ℳ for each ℕ^{<ℕ}-ary function symbol G in ℒ. However, defining how an arbitrary model evaluates terms is difficult. We will only be interested in one very specific family of models, where there is no trouble evaluating terms.

Definition 6. The following models lie at the heart of all later results.

• ℒmax is the language with ellipses which contains a constant symbol n for every n ∈ ℕ, an n-ary function symbol w̃ for every function w : ℕ^{n} → ℕ (n > 0), an n-ary predicate symbol p̃ for every subset p ⊆ ℕ^{n} (n > 0), an ℕ^{<ℕ}-ary function symbol G̃ for every function G : ℕ^{<ℕ} → ℕ, and one additional unary function symbol f.

• For every function f : ℕ → ℕ, ℳ_{f} is the model for the language ℒmax with universe ℕ, which interprets n as n for every n, w̃ as w for every w : ℕ^{n} → ℕ, p̃ as p for every p ⊆ ℕ^{n}, and G̃ as G for every G : ℕ^{<ℕ} → ℕ, and which interprets f as f.

If n ∈ ℕ then n̄ denotes the numeral n of n.

Definition 7. Let f : ℕ → ℕ. The semantics of ℳ_{f} are defined as follows. Let s be any assignment from the variables to ℕ.

• (ℳ_{f}, s) interprets terms t into naturals t^{ℳ_{f} ,s} , or t^{s} if there is no ambiguity, according to the usual inductive definition, with one new case:

– If u, v are terms and x is a variable and G is an ℕ^{<ℕ}-ary function symbol, then

G(u(0), ⋯_{x} , u(v))^{s} = G^{ℳ_{f}} (u(x|0)^{s}, …, u (x |\overline{v^{s}})^{s}) .

• For example, the interpretation of G̃(f(x)(0), ⋯_{x} , f(x)(99)) is

G(f(0), …, f(99)),

while the interpretation of G̃(f(x)(0), ⋯_{x} , f(x)(f(y))) is

G(f(0), …, f(f(y^{s}))).

• From here, the remaining semantics of ℳ_{f} are defined as usual.

In classical logic, every term with no free variables has the property that its interpretation in any model depends only on finitely many values of the interpretations of the function symbols in that model. For example, the interpretation of 5 + (2 · 3) depends only on one value of · and one value of +. Similar properties are true of our ℳ_{f} models.

Lemma 8. Suppose u is a term with no free variables, and c is a constant symbol. For any f : ℕ → ℕ, ℳ_{f} ⊧ u = c iff there is some k such that whenever g : ℕ → ℕ extends (f(0), …, f(k)), ℳ_{g} ⊧ u = c and to check whether ℳ_{g} ⊧ u = c using the inductive definition of semantics for ℳ_{g}, it is not necessary to query g(i) for any i > k.

Proof. (⇒) Induction on complexity of u.

• Since u has no free variables, u cannot be a variable. If u is a constant symbol, the lemma is trivial.

• Suppose that u is h(u_{1}, …, u_{n}) for some n-ary (or ℕ^{<ℕ}-ary) function symbol h other than f, and some terms u_{1}, …, u_{n} with no free variables. If ℳ_{f} ⊧ h(u_{1}, …, u_{n}) = c, then there are a_{1}, …, a_{n} ∈ ℕ such that h^{ℳ_{f}} (a_{1}, …, a_{n}) = c^{ℳ_{f}} and ℳ_{f} ⊧ u_{i} = ā_{i} for i = 1, …, n. Since ā_{i} is a constant symbol, by induction find k_{1}, …, k_{n} such that for any i = 1, …, n and any g : ℕ → ℕ with g(0) = f(0), …, g(k_{i}) = f(k_{i}), ℳ_{g} ⊧ u_{i} = ā_{i}, and checking this by definition of semantics does not require querying g(j) for any j > a_{i}. Then k = max{k_{1}, …, k_{n}} works (using the fact h^{ℳ_{g}} does not depend on g since h is not f).

• Next, suppose u is f(v) where v is a term with no free variables. If ℳ_{f} ⊧ f(v) = c then there iss a ∈ ℕ such that f(a) = c^{ℳ_{f}} and ℳ_{f} ⊧ v = ā. Since ā is a constant symbol, by induction find k_{0} such that whenever g(0) = f(0), …, g(k_{0}) = f(k_{0}), then ℳ_{g} ⊧ v = ā, and checking ℳ_{g} ⊧ v = ā does not require querying g(i) for any i > k_{0}. Let k = max{k_{0}, a}. Suppose g(0) = f(0), …, g(k) = f(k). Then f(v)^{ℳ_{g}} = f^{ℳ_{g}} (v^{ℳ_{g}} ) = g(a) = f(a) = c^{ℳ_{f}} . So ℳ_{g} ⊧ f(v) = c, and to check so, we only had to query g(a) in addition to any queries we had to make to check ℳ_{g} ⊧ v = ā, so we did not have to query g(i) for any i > k.

• Finally, suppose u is G(v(0), ⋯_{x} , v(w)) where v, w are terms, x is a variable, F V (w) = ∅, F V (v) ⊆ {x}, and G is an ℕ^{<ℕ}-ary function symbol. If ℳ_{f} ⊧ G(v(0), ⋯_{x} , v(w)) = c then

G^{ℳ_{f}} (v(x|0)^{ℳ_{f}} , …, v (x \sqrt{w^{ℳ_{f}}} )^{ℳ_{f}} ) = c^{ℳ_{f}} .

Since ℳ_{f} ⊧ w = \overline{w^{ℳ_{f}}} , find some number k_{−1} such that whenever g extends (f(0), ..., f(k_{−1})), ℳ_{g} ⊧ w = \overline{w^{ℳ_{f}}} and checking so does not require queries beyond g(k_{−1}). Since ℳ_{f} ⊧ v(x|i) = \overline{v(x|i)} for i = 0, …, w^{ℳ_{f}} , find k_{0}, …, k_{w^{ℳ_{f}}} such that for each i = 0, …, w^{ℳ_{f}} , if g(0) = f(0), …, g(k_{i}) = f(k_{i}) then ℳ_{g} ⊧ v(x|\overline{i}) = \overline{v(x|\overline{i})} can be confirmed without querying g beyond g(k_{i}).

Let k = max{k_{−1}, k_{0}, …, k_{w^{ℳ_{f}}} }. Suppose g(0) = f(0), …, g(k) = f(k). Then ℳ_{g} ⊧ w = \overline{w^{ℳ_{f}}} , so w^{ℳ_{g}} = w^{ℳ_{f}} . Similarly v(x|i)^{ℳ_{g}} = v(x|i)^{ℳ_{f}} for i = 0, …, w^{ℳ_{f}} . And G^{ℳ_{g}} = G^{ℳ_{f}} . It follows that

ℳ_{g} ⊧ G(v(0), ⋯_{x} , v(w)) = c,

and checking so does not require any queries to g(j) for any j > k.

(⇐) Suppose there is some k so that whenever g extends (f(0), …, f(k)) then ℳ_{g} ⊧ u = c. In particular, f itself extends (f(0), …, f(k)), so ℳ_{f} ⊧ u = c.

Corollary 9. Let ϕ be a quantifier-free sentence. For any f : ℕ → ℕ, ℳ_{f} ⊧ ϕ iff there is some k such that for every g : ℕ → ℕ extending (f(0), …, f(k)), ℳ_{g} ⊧ ϕ, and in checking ℳ_{g} ⊧ ϕ by the inductive definition of semantics, we never need to query g(i) for any i > k.

Proof. By induction on the complexity of ϕ.

• Suppose ϕ is u = v for terms u, v with no free variables. Assume ℳ_{f} ⊧ u = v. Then ℳ_{f} ⊧ u = \overline{u^{ℳ_{f}}} and ℳ_{f} ⊧ v = \overline{u^{ℳ_{f}}} . By Lemma 8, find k big enough that whenever g(0) = f(0), …, g(k) = f(k), then ℳ_{g} ⊧ u = \overline{u^{ℳ_{f}}} and ℳ_{g} ⊧ v = \overline{u^{ℳ_{f}}} and both facts can be confirmed without querying g beyond g(k). For any such g, ℳ_{g} ⊧ u = v, verifiable with no additional g-queries. The converse is trivial.

• Next, suppose ϕ is p̃(u_{1}, …, u_{n}) for an n-ary predicate symbol p̃ and terms u_{1}, …, u_{n} with no free variables. Then ϕ is equivalent (in every ℳ_{·}) to g̃(u_{1}, …, u_{n}) = 1 where g is the characteristic function of p, so we are done by the previous case.

• Suppose ϕ is ϕ_{1}∧ϕ_{2}. Assume ℳ_{f} ⊧ ϕ. Inductively, find k_{1} and k_{2} such that if g extends (f(0), …, f(k_{i})) then ℳ_{g} ⊧ ϕ_{i} is verifiable with no g-queries beyond g(k_{i}). Then any g extending (f(0), …, f(max{k_{1}, k_{2}})) has ℳ_{g} ⊧ ϕ, verifiable without querying beyond g(max{k_{1}, k_{2}}). The converse is trivial.

• The cases of other propositional connectives are similar.

If s is an assignment from the variables of a language onto the universe of the language, and if x is a variable, and n is a number, then s(x|n) denotes the assignment which is identical to s except that it maps x to n. Similarly if a model is understood by context and c is a constant symbol then s(x|c) denotes the assignment identical to s except that it maps x to the interpretation of c in the model.

Lemma 10. (The Weak Substitution Lemma) For a formula ϕ, an assignment s, and a constant symbol c, and for any f : ℕ → ℕ, ℳ_{f} ⊧ ϕ[s(x|\overline{c^{s}})] iff ℳ_{f} ⊧ ϕ(x|c)[s].

Proof. By the inductive argument used to prove the full Substitution Lemma in classical logic, most of which we omit. But there are tricky new cases for our new terms.

Claim: For any terms u, v, constant symbol c, variables x ≠ y, and assignment s,

G(u(0), ⋯_{x} , u(v))(y|c)^{s} = G(u(0), ⋯_{x} , u(v))^{s(y|c)}.

The details are (using the induction hypothesis repeatedly) as follows:

G(u(0), ⋯_{x} , u(v))(y|c)^{s} = G (u(y|c)(0), ⋯_{x} , u(y|c)(v(y|c)))^{s}
= G^{ℳ_{f}} (u(y|c)(x|0)^{s}, …, u(y|c) (x \sqrt{v(y|c)^{s}} )^{s})
= G^{ℳ_{f}} (u(x|0)^{s(y|c)}, …, u (x \sqrt{v^{s(y|c)}} )^{s(y|c)})
= G(u(0), ⋯_{x} , u(v))^{s(y|c)}.

Claim: For any terms u, v, constant symbol c, and variable x and assignment s,

G(u(0), ⋯_{x} , u(v))(x|c)^{s} = G(u(0), ⋯_{x} , u(v))^{s(x|c)}.

Using the induction hypothesis repeatedly:

G(u(0), ⋯_{x} , u(v))(x|c)^{s} = G(u(0), ⋯_{x} , u(v(x|c)))^{s}
= G^{ℳ_{f}} (u(x|0)^{s}, …, u (x \sqrt{v(x|c)^{s}} )^{s})
= G^{ℳ_{f}} (u(x|0)^{s}, …, u (x \sqrt{v^{s(x|c)}} )^{s})
= G^{ℳ_{f}} (u(x|0)^{s(x|c)}, …, u (x \sqrt{v^{s(x|c)}} )^{s(x|c)})
= G(u(0), ⋯_{x} , u(v))^{s(x|c)}.

The next to last equation is justified because the terms whose “exponents” are changed do not depend on x.

A full Substitution Lemma is also true, but it requires a nonclassical definition of substitutable, which would take us too far afield.

4 Guessability and Quantifiers

Definition 11. Let S ⊆ ℕ^{ℕ} be a set of sequences. Let ϕ be a sentence in ℒmax. We say that ϕ defines S if, for every f : ℕ → ℕ, ℳ_{f} ⊧ ϕ iff f ∈ S.

Theorem 12. A set S ⊆ ℕ^{ℕ} is guessable if and only if it is defined by some sentence ∀x ∃y ϕ and also by some sentence ∃x ∀y ψ, where ϕ and ψ are quantifier-free.

We divide the proof of the theorem above into a sequence of lemmata.

Lemma 13. Suppose S ⊆ ℕ^{ℕ} is guessable. Then S is defined by some sentence ∃x ∀y ϕ and also by some sentence ∀x ∃y ψ, where ϕ and ψ are quantifier-free.

Proof. Let G be a guesser for S. For any f : ℕ → ℕ, f ∈ S if and only if G(f(0), …, f(n)) = 1 for all n sufficiently large. Therefore S is defined by

∃x ∀y ((y > x) → G̃(f(z)(0), ⋯_{z} , f(z)(y)) = 1),

where “y > x” is shorthand for ˜>(y, x). Similarly, S is also defined by

∀x ∃y ((y > x) ∧ G̃(f(z)(0), ⋯_{z} , f(z)(y)) = 1).

We will prove the converse of Lemma 13 shortly. To that end, a piece of technical machinery is needed.

Definition 14. A set S ⊆ ℕ^{ℕ} is overguessable if there is a function μ : ℕ^{<ℕ} → ℕ ∪ {∞} such that:

1. For every f ∈ S, μ(f(0), …, f(n)) is eventually bounded by a finite number.

2. For every f ∉ S, μ(f(0), …, f(n)) → ∞ as n → ∞.

Lemma 15. Suppose S ⊆ ℕ^{ℕ} is defined by the sentence ∃x ∀y ϕ where ϕ is quantifier-free. Then S is overguessable.

Proof. Given a tuple (n_{0}, …, n_{k}), define μ(n_{0}, …, n_{k}) as follows. Let h : ℕ → ℕ be defined by h(i) = n_{i} if i ≤ k, h(i) = 0 otherwise. Given a pair (a, b) ∈ ℕ^{2}, consider the sentence ϕ(x, y|ā, b̄). Attempt to check whether ℳ_{h} ⊧ ϕ(x, y|ā, b̄), using the inductive definition of the semantics of ℳ_{h}. If, in so doing, you must query h(i) for some i > k, say that the attempt failed. Otherwise, say the attempt succeeded. If the attempt failed, or if ℳ_{h} ⊧ ϕ(x, y|ā, b̄), then say that (a, b) is nice.

Call a number a very nice if (a, b) is nice for every b. If there is any very nice number, then let μ(n_{0}, …, n_{k}) be the smallest very nice number. Otherwise let μ(n_{0}, …, n_{k}) = ∞.

I claim the above μ witnesses that S is overguessable.

First, suppose f ∈ S. Since S is defined by ∃x ∀y ϕ, ℳ_{f} ⊧ ∃x ∀y ϕ. By the Weak Substitution Lemma, for some a, ℳ_{f} ⊧ ϕ(x, y|ā, b̄) for every b. When we attempt to check whether ℳ_{h} ⊧ ϕ(x, y|ā, b̄) in the definition of μ(f(0), …, f(k)), if the attempt succeeds, then ℳ_{h} ⊧ ϕ(x, y|ā, b̄) because ℳ_{f} ⊧ ϕ(x, y|ā, b̄) and we never had to look at the part of h which disagrees with f. So (a, b) is nice for every b, so a is very nice, so μ(f(0), …, f(k)) is bounded by a.

Next, suppose f ∉ S. Let a ∈ ℕ, I claim μ(f(0), ..., f(n)) ≠ a for all n sufficiently large. Since f ∉ S, ℳ_{f} |̸= ∃x ∀y ϕ. By the Weak Substitution Lemma, there is some b such that ℳ_{f} |̸= ϕ(x, y|ā, b̄). Since ϕ is quantifier-free, we invoke Corollary 9 on ¬ϕ(x, y|ā, b̄) and find k such that ℳ_{g} |̸= ϕ(x, y|ā, b̄) whenever g extends (f(0), …, f(k)), and, to check whether ℳ_{g} ⊧ ϕ(x, y|ā, b̄), we do not need to query g(i) for i > k. Then, in the definition of μ(f(0), …, f(k)), for pair (a, b), the attempt succeeds and ℳ_{h} |̸= ϕ(x, y|ā, b̄), so (a, b) is not nice, so a is not very nice, so μ(f(0), …, f(k)) ≠ a, in fact, μ(f(0), …, f(j)) ≠ a for all j ≥ k. By arbitrariness of a, μ(f(0), ..., f(n)) → ∞.

Lemma 16. Suppose a set S ⊆ ℕ^{ℕ} is defined by some sentence ∀x ∃y ϕ and also by some sentence ∃x ∀y ψ, where ϕ and ψ are quantifier-free. Then S is guessable.

Proof. By Lemma 15, find μ : ℕ^{<ℕ} → ℕ ∪ {∞} which overguesses S. And since S^{c} is defined by ∃x ∀y ¬ϕ, use Lemma 15 again to find ν : ℕ^{<ℕ} → ℕ ∪ {∞} which overguesses S^{c}.

Define G : ℕ^{<ℕ} → {0, 1} by saying G(n_{0}, …, n_{k}) = 1 if μ(n_{0}, …, n_{k}) ≤ ν(n_{0}, …, n_{k}) and 0 otherwise. If f ∈ S then μ(f(0), …, f(k)) is eventually bounded by a finite number and ν(f(0), …, f(k)) → ∞, so G(f(0), …, f(k)) converges to 1. The other case is similar.

Combining Lemmata 13 and 16 proves Theorem 12.

Proposition 17. If S ⊂ ℕ^{ℕ} is overguessable, then it is defined by some sentence ∃x∀yϕ with ϕ quantifier-free.

Proof. Suppose S is overguessed by μ : ℕ^{<ℕ} → ℕ ∪ {∞}. Define μ′ : ℕ^{ℕ} → ℕ by saying μ′(n) = μ(n) + 1 if μ(n) ≠ ∞, μ′(n) = 0 if μ(n) = ∞. If f : ℕ → ℕ, then f ∈ S if and only if the sequence μ(f(0), …, f(n)) is eventually bounded by some finite number. This is true if and only if μ′(f(0), …, f(n)) is eventually bounded by some finite number and eventually nonzero. This latter equivalence can be expressed by

∃m_{1} ∃m_{2} ∀m_{3} ((m_{3} > m_{2}) → (0 < μ′(f(0), …, f(m_{3})) < m_{1})).

Let d : ℕ → ℕ^{2} be any onto map from ℕ to ℕ^{2}. Write d(n) = (d_{1}(n), d_{2}(n)), thus defining two functions d_{1}, d_{2} : ℕ → ℕ. Then the above formula is equivalent to

∃m ∀m_{3} ((m_{3} > d_{2}(m)) → (0 < μ′(f(0), …, f(m_{3})) < d_{1}(m))).

This can be formalized in ℒmax, providing a sentence ∃x ∀y ϕ which defines S, with ϕ quantifier-free.

Example 18. Every countable subset of ℕ^{ℕ} is overguessable.

Proof. Let S ⊆ ℕ^{ℕ} be countable. Define g : ℕ^{2} → ℕ by saying g(m, n) = h_{m}(n) where h_{m} is the mth element of S. Then S is defined by

∃x ∀y g̃(x, y) = f(y).

By Lemma 15, S is overguessable.

Remark 19. Guessable and overguessable sets of sequences are analogous to computable and computably enumerable sets of naturals, respectively. One shows that Δ_{1} sets (in a much weaker logical setting than ℒmax) of naturals are computable by showing that they and their complements are c.e. by using the characterization of c.e. sets as sets which are Σ_{1}- definable (in the weaker setting). By comparison, I have shown that Δ_{2} sets of sequences (in a very strong logical setting) are guessable by showing that they and their complements are overguessable by using the characterization of overguessable sets as Σ_{2}-definable (in the stronger setting). These analogous phenomena in computability theory have been written about by Rogers [3], Enderton [2], Bilaniuk [1], and many other authors.

We will elaborate more on Remark 19 in Section 5.

Lemma 20. Suppose S ⊆ ℕ^{ℕ} is definable by a sentence ∀x ∃y ϕ where ϕ is quantifier-free. If S is countable then S is guessable.

Proof. Suppose S is countable. In the proof of Example 18, we showed S is definable by a sentence ∃x ∀y ψ where ψ is quantifier-free. By Theorem 12, S is guessable.

Example 21. There are uncountably many permutations of ℕ.

Proof. A function f : ℕ → ℕ is a permutation iff

∀m_{1} ∀m_{2} ∃n ((f(m_{1}) = f(m_{2}) → m_{1} = m_{2}) ∧ f(n) = m_{2}).

By appropriately coding ⟨m_{1}, m_{2}⟩, the set S of permutations is defined by a sentence ∀x ∃y ϕ where ϕ is quantifier-free.

Permutations are not guessable. If G were a permutation-guesser, it would diverge on the following sequence. Let f(0) = 0, f(1) = 1, and so on until G(f(0), …, f(k_{1})) = 1 (this must happen since G would converge to 1 if we kept going forever). Then skip a number, f(k_{1} + 1) = k_{1} + 2, f(k_{1} + 2) = k_{1} + 3, and keep going until G(f(0), …, f(k_{2})) = 0. Then fill in the gap, f(k_{2} + 1) = k_{1} + 1, and resume where we left off, f(k_{2} + 2) = k_{2} + 2, and so on until G(f(0), …, f(k_{3})) = 1. This process shows permutations are unguessable.

By Lemma 20, S is uncountable.

Example 22. (Cantor) There are uncountably many real numbers.

Proof. Consider the set A of numbers in the interval (0, 1) which have infinitely many 5s in their decimal expansions. There is an obvious bijection between A and the set S of sequences f : ℕ → {0, 9} such that f(n) = 5 infinitely often. This set S is defined by

∀x ∃y ((y > x) ∧ f(y) = 5 ∧ f(x) ≥ 0 ∧ f(x) ≤ 9).

By Lemma 20, if S is countable then it is guessable. But it is not: if G were a guesser for S, then we could define a sequence on whose initial segments G does not converge. Namely, let f(0) = … = f(x_{k}) = 0 where x_{k} is big enough that G(f(0), ..., f(x_{k})) = 0, and then let f(x_{k} + 1) = ⋯ = f(x_{k+1}) = 5, where x_{k+1} > x_{k} is big enough that G(f(0), ..., f(x_{k+1})) = 1. And so on, alternating, forever. This shows S is not guessable, so S is not countable, so A is uncountable, so ℝ is uncountable.

Lemma 23. If S ⊆ ℕ^{ℕ} is definable by a sentence ϕ without nested quantifiers (that is, no quantifier appearing in the scope of another), then S is guessable.

Proof. If so, then ϕ is a propositional combination of quantifier-free sentences and sentences of the form ∀x ϕ_{0} and ∃x ϕ_{1} where ϕ_{0}, ϕ_{1} are quantifier-free. The sets defined by these component sentences are guessable by Theorem 12. Clearly guessable sets are closed under union, intersection, and complement, so S itself is guessable.

Example 24. The definition of onto functions cannot be simplified to get rid of nested quantifiers, not even with the full power of ℒmax.

Proof. By Lemma 23 and the fact the set of onto functions is not guessable, see Theorem 2.

5 Descriptive Set Theory

In this section we will elaborate further on Remark 19. In descriptive set theory, ℕ^{ℕ} is endowed with the topology whose basic open sets are those sets of the form

{f ∈ ℕ^{ℕ} : f extends f_{0}}

where f_{0} ∈ ℕ^{<ℕ}. Since ℕ^{<ℕ} is countable, ℕ^{ℕ} is second countable in the sense of basic topology. A set is called G_{δ} if it is a countable intersection of open sets, and F_{σ} if it is a countable union of closed sets. A set is Δ_{2}^{0} if it is both G_{δ} and F_{σ} (equivalently, if it and its complement are both G_{δ}). This Δ_{2}^{0} is one of the levels of the Borel hierarchy which many authors, including Moschovakis [4], have written about.

Theorem 25. Let S ⊆ ℕ^{ℕ}. Then S is guessable if and only if S is Δ_{2}^{0}.

Proof. (⇒) Suppose S is guessable. By Lemma 13, S is defined by a sentence ∀x ∃y ϕ where ϕ is quantifier-free. For every i, j ∈ ℕ, let S_{i} ⊆ ℕ^{ℕ} be the set defined by ∃y ϕ(x|i) and let T_{ij} ⊆ ℕ^{ℕ} be the set defined by ϕ(x, y|i, j). It follows from Corollary 9 that each T_{ij} is open. Each S_{i} = ∪_{j}T_{ij}, so each S_{i} is open. Since S = ∩_{i}S_{i}, S is G_{δ}. Since S^{c} is also guessable, identical reasoning shows S^{c} is G_{δ}, so S is Δ_{2}^{0}.

(⇐) Suppose S is Δ_{2}^{0}. Write S = ∩_{i∈ℕ}S_{i} where each S_{i} is open. By second countability, write S_{i} = ∪_{j∈ℕ}T_{ij} where each T_{ij} is basic open. By the nature of basic open sets of ℕ^{ℕ}, there are T_{ij}^{0} ∈ ℕ^{<ℕ} such that each T_{ij} is exactly the set of infinite extensions of T_{ij}^{0}. Let τ : ℕ^{<ℕ} → ℕ be defined by saying τ(i, j, x_{0}, …, x_{k}) = 1 if (x_{0}, …, x_{k}) = T_{ij}^{0}, τ is 0 everywhere else. Define ℓ : ℕ^{2} → ℕ by letting ℓ(i, j) be the length of T_{ij}^{0}. Then for any f : ℕ → ℕ, f extends T_{ij}^{0} if and only if τ(i, j, f(0), …, f(ℓ(i, j))) = 1. Thus, f ∈ S if and only if

∀i ∃j τ(i, j, f(0), …, f(ℓ(i, j))) = 1.

This can be formalized in ℒmax. By dual reasoning applied to S^{c}, S can also be defined by some ∃i ∀j ϕ where ϕ is quantifier-free. By Theorem 12, S is guessable.

6 Addendum – January 20 2012

In January 2012, we learned that the notion of guessability was introduced some time ago in the Ph. D. dissertation of William W. Wadge (1983, Reducibility and Determinateness on the Baire Space, UC Berkeley, pp. 141–145). Instead of considering guesser functions, Wadge considered guesser sets, calling a subset S ⊆ ℕ^{ℕ} guessable if there are disjoint sets U, W ⊆ ℕ^{<ℕ} such that for every sequence f, f ∈ S iff f|k ∈ U for all but finitely many k, and f ∉ S iff f|k ∈ W for all but finitely many k. This is clearly equivalent to our definition. Wadge gave a game-theoretical proof that guessability is equivalent to being Δ_{2}^{0} (our Theorem 25) and then used this fact to show a special case, for Δ_{2}^{0} sets, of what is now known as Wadge’s lemma, an important result about Wadge degrees studied by descriptive set theorists.

References

[1] S. Bilaniuk, A Problem Course in Mathematical Logic, self-published, 1991, available at

   http://euclid.trentu.ca/math/sb/pcml/pcml-16.pdf.

[2] H. Enderton, A Mathematical Introduction to Logic, 2nd Edition, Academic Press, 2001.

[3] H. Rogers, Theory of Recursive Functions and Effective Computability, MIT Press, 1987.

[4] Y. N. Moschovakis, Descriptive Set Theory, 2nd Edition, AMS, 2009.

[5] N. J. A. Sloane, Online Encyclopedia of Integer Sequences (OEIS), http://oeis.org.

[6] B. Tsaban and L. Zdomskyy, Combinatorial images of sets of reals and semifilter trichotomy, J. Symbolic Logic 73 (2008), 1278–1288.

2010 Mathematics Subject Classification: Primary 03B60; Secondary 03B80. Keywords: guessing, guessability, integer sequences, nonclassic logic, ellipsis.

(Concerned with sequences \underline{A082691}, \underline{A182659}, and \underline{A182660}.)

Received November 27 2010; revised version received March 25 2011. Published in Journal of Integer Sequences, March 26 2011. Addendum, January 28 2012.

Return to Journal of Integer Sequences home page.