Decidability of second-order theories and automata on infinite trees.

Introduction. In this paper we solve the decision problem of a certain secondorder mathematical theory and apply it to obtain a large number of decidability results. The method of solution involves the development of a theory of automata on infinite trees—a chapter in combinatorial mathematics which may be of independent interest. Let £ = {0, 1}, and denote by T the set of all words (finite sequences) on 2. Let r0: T^-T and rx: T—>■ T be, respectively, the successor functions ro(x)=x0 and r1(x) = xl, xeT. Our main result is that the (monadic) second-order theory of the structure (T, r0, rxy of two successor functions is decidable. This answers a question raised by Biichi [1]. It turns out that this result is very powerful and many difficult decidability results follow from it by simple reductions. The decision procedures obtained by this method are elementary recursive (in the sense of Kalmar). The applications include the following. (Whenever we refer, in this paper, to second-order theories, we mean monadic second-order; weak second-order means quantification restricted to finite subsets of the domain.) The second-order theory of countable linearly ordered sets is proved decidable. As a corollary we get that the weak second-order theory of arbitrary linearly ordered sets is decidable ; a result due to Läuchli [9] which improves on a result of Ehrenfeucht [5]. In [4] Ehrenfeucht announced the decidability of the first-order theory of a unary function. We prove that the second-order theory of a unary function with a countable domain is decidable. Also, the weak second-order theory of a unary function with an arbitrary domain is decidable. There are also applications to point set topology. Let CD be Cantor's discontinuum (i.e., (0, 1}TM with the product topology). Let Fa be the lattice of all subsets of CD which are denumerable unions of closed sets, and let Lc be the sublattice of all closed subsets of CD. The first-order theory of the lattice Fa, with Lc as a distinguished sublattice, is decidable. Similar results hold for the real line with the usual topology. This answers in the affirmative Grzegorczyk's question [8] whether