Computational Complexity of Theories of a Binary Predicate with a Small Number of Variables

We prove \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Sigma _{1}^{0}$$\end{document}-hardness of a number of theories of a binary predicate with three individual variables (in languages without constants or equality). We also show that, in languages with equality and the operators of composition and of transitive closure, theories of a binary predicate are \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Pi _{1}^{1}$$\end{document}-hard with only two individual variables.


INTRODUCTION
The paper concerns the so-called classical decision problem [1], in particular, the algorithmic complexity of fragments of elementary theories [2,3]. Below we deal with theories of a binary predicate, both in languages with a binary predicate letter only, and those enriched with some additional tools.
The classical logic of a binary predicate is undecidable [4,Chapter 21]. Note that the corresponding proof [4] uses infinitely many individual variables; at the same time, to prove that the first-order logic is undecidable, it suffices to use only three individual variables and, alongside a binary predicate letter, infinitely many unary letters [5]. If we only allow one of the following: only two variables [6,7], only unary predicated letters and equality [4,Chapter 21], or only guarded formulas (where binary letters are allowed only with certain limitations) [8], then we obtain decidable fragments. A natural question, thus, arises concerning decidability of the logic and theories of a single binary predicate in languages with a finite number (at least, three) of variables.
A similar situation applies to first-order languages enriched with operators motivated by applications. For example, the first-order logic with equality and the transitive closure operator is -hard in languages with two variables, but the proof uses several binary predicate letters and infinitely many unary ones [9]; Π 1 1 again, the question arises concerning the computational complexity of theories of a binary predicate with a finite number (in this case, at least two) of variables.
The answer to the question about the decidability of the logic of a binary predicate in languages with at least three variables (and without additional operators) follows from [10]: it is undecidable (see [10, clause (ii) of Section 4.8]). Similar results for the classical logic of a binary predicate in languages with two variables, enriched with additional operators, are unknown to the author.
We shall describe a construction providing us with a short proof, firstly, of the undecidability of many theories of a binary predicate in languages with three individual variables (in particular, -completeness of the logic of a binary predicate and -completeness of the theory of finite models of a binary predicate), and secondly, -hardness of the validity problem for languages with a binary predicate letter, equality, and two individual variables, enriched with the operators of composition and transitive closure. The construction will consist of modelling tiling problems [11,12]; note that this is a well-known method, with applications both in algebra [13,14] and in logic [1,[15][16][17][18]].
An undecidable tiling problem. Tiles are squares, all of the same size; type of a tile is determined by the colors , , , and of its edges. The following tiling problem is -complete [11]: given a set T = {t 0 , …, t n } of tile types, we are to determine if there exists a T-tiling, i.e., a map such that and , for every . If rx, then x is reflexive, and if , then x is irreflexive; means that x belongs to an grid, i.e., x is a tile-holder; induces a congruence; means a single -step; and and are understood as moving, respectively, rightwards and upwards. To obtain a definition of , replace, in the definition of , both with and with ; analogously for , , , etc. For a property , let and = .
Define be the conjunction of the formulas xPz), , , , and . It should be clear that if is true in a model , then contains an grid whose rows are determined by H and columns by ; the elements of the first row are irreflexive, the elements of the second row are reflexive, the the elements of the third row are irreflexive, etc.
where . Formula says that sees an -successor outside the grid, and that the said successor sees a dead end in -steps. We write and instead of and . The intended meaning of is that x contains a tile of type .
Define be the conjunction of the following formulas: is satisfiable there exists a T-tiling. Observe that, in the arguments given above, we can make do with positive formulas only: first, replace with its negation and the satisfiability problem with the refutability problem; then, replace every negation with implication to the formula .
xEy z xPz yPz zPx zPy xSy xPy xEy z xPz zPy zEx zEy xHy xSy rx ry xVy xSy rx ry Theories of a binary predicate. By Lemma 1 and the observation concerning positive formulas, we obtain the following refinement of the Church's theorem [19]: • the positive fragment of the classical predicate logic is -complete in the language with a single binary predicate letter and three individual variables.
Theorem 1 can be extended to theories of a binary predicate: it suffices to make minor adjustments in the above-given encoding. For a class of models of a binary predicate, let us denote by the elementary theory of the class . Let , , , , , , , and be the classes of, respectively, finite, infinite, reflexive, irreflexive, symmetric, antisymmetric, transitive, and intransitive models of a binary predicate. If and are classes of models, then we will write rather than . So, is the class of infinite models that are reflexive, symmetric, and transitive. Theorem 1. Let be a class of models of a binary predicate containing at least one of the following classes: , , , . Then the positive fragment of is -hard in the language with three individual variables.
As a corollary, the elementary theories of the classes If, , , , , , and are not decidable in languages with three individual variables.
Using a similar argument, we obtain the following refinement of Trakhtenbrot's theorem [20,22]: • the positive fragment of the theory of finite models is -complete in languages with a single binary predicate letter and three individual variables.
To prove this statement, it is enough to notice that one can encode with a suitable tiling problem the problem of non-termination of Turing machines on the empty tape, and then to adjust the formulas given above so that they say that the first row of a tiling corresponds to the initial configuration of a Turing machine on the empty tape and that the initial tiling segment does not contain a tile corresponding to a final state of the machine; note that another possible way is to use the effective inseparability [21] and Theorem 1.
A more general statement is also true.

Theorem 2. Let be a class of finite models of a binary predicate containing or . Then the positive fragment of is -hard in languages with three individual variables.
Enriching the language. We shall now show that logics and theories in enriched languages can be highly undecidable, even with only two variables. Consider the tiling problem where the -tiling f is required to additionally satisfy the condition that the set is infinite. This problem is known to be -complete [12,Theorem 6.4].

RYBAKOV
Extend the language of first-order logic with the transitive closure operator and denote by the transitive closure of . For a formula , define to be the formula obtained from A by uniformly replacing with . Let . Define G* be the conjunction of the  formulas  ,  ,  , , , y(xVy → ly)), and to be the conjunction of and the formula .
Then, is satisfiable if, and only if, there exists a -tiling with the extra condition. This proveshardness of a number of theories of a binary predicate letter with three variables; note that the transitive closure operator was applied only to atomic formulas.
If, in addition, we have equality and composition in the language, then, using ideas from [9], we can describe the same tiling problem with formulas containing only two variables and only one binary predicate letter. The third variable is used in the definitions of and , as well as in one of the conjuncts of the formula . Replace with equality. Using equality and the transitive closure operator, one can define the following properties of a binary relation: functionality, surjectivity, and disjointness of its domain and its range, see [9]. This allows us to divide steps alongside and into "even" steps and and "odd" steps , , , and ; also, we can use instead of in ; then, there is no need for any more. The conjunct of with three variables can be replaced with , where xHy = and . Again, we obtain -hardness of theories, but this time with two variables.
As a result, we obtain the following theorem. Theorem 3. The validity problem for languages with two individual language, binary predicate letter, equality and the operators of composition and transitive closure is -hard. Note that the validity problem for such languages in the class of all finite models is in the class , since it is possible to effectively enumerate both all formulas and all finite models (up to isomorphism), which makes it possible to construct an effective enumeration of the set of refutable formulas.

DISCUSSION
Note that slightly weakened versions of Theorems 1 and 2 can be obtained from [10] in view of the results presented in [2,3,22] and in other papers (see, for g g x lx y xE y xP y ly t y g g x y x H V y xV H y ∨  [23;24,Appendix]). Thus, in [10], the undecidability of the logic of a binary predicate in the language with three individual variables is proved, and using the translations from [2,3], one can obtain undecidability (and, in view of [22], -hardness or -hardness) of various theories of a binary predicate in languages with a finite (sometimes, perhaps, quite large) number of individual variables; the idea is to eliminate some variables in translations when nested quantifiers appear in formulas, roughly as in the definition of formulas above, i.e., to reuse a variable in the recursive clause for a formula whenever does not occur freely in , rather than introducing a new variable.
We also note that a lot of attention has been devoted (see, for example, [1,3]) to the study of the computational properties of elementary fragments defined by quantifier prefixes from some regular set; if the said set is infinite, then it contains arbitrarily long quantifier prefixes; hence, the corresponding fragment of the language contains infinitely many individual variables. Sets of quantifier prefixes leading to undecidability of the logic of a binary predicate determined are infinite. Thus, a natural question arises: is it possible to extract from the above construction a proof of the undecidability of some fragment of the logic of a binary predicate defined by a finite set of quantifier prefixes? The answer is negative: the formulas use nested quantifiers for the variables x and y, and their quantifier depth depends on ; therefore, converting formulas of the form to prefix normal form and increasing the number of elements in T, we get an increase in the length of the quantifier prefix, which leads to an increase in the number of variables in the resultant formula.
format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.