Abstract. The validity problem for first-order logic is a well-known undecidable problem. The undecidability also holds even for FO3 and (equational formulas of) the calculus of relations. In this paper we tighten these undecidability results to the following: (1) FO3 with just one binary relation is undecidable even without equality; and (2) the calculus of relations with just one character and with only composition, union, and complement is undecidable. Additionally we prove that the finite validity problem is also undecidable for the above two classes.
Keywords: First-order logic · The calculus of relations · Undecidability
1 Introduction
The validity problem for first-order logic (a.k.a. the Entscheidungsproblem) is the problem to decide whether a given formula of first-order logic (FO) is valid or not. The problem is recursively enumerable by Gödel's completeness theorem [7], but is undecidable, as shown by Church [5] and Turing [24]. In connection with the undecidability result, many decidable and undecidable variants of FO have been studied (we refer to the book [4]).
One restriction is to consider the validity problem over a restricted signature. In 1915, Löwenheim [13] proved that monadic FO with equality is decidable (more precisely, coNEXPTIME-complete [12, p. 318]). Monadic FO is FO with only unary relation symbols. In 1919, Skolem [20] extended the decidability result to monadic second-order logic (see also [26]). Subsequently Büchi [3] extended the decidability result to monadic second-order logic over IN with the linear order (called S1S). In contrast to this, FO with just one binary relation symbol is undecidable even without equality. Löwenheim [13] reduced FO to FO with only binary relation symbols, so the latter is also undecidable by [5,24], but the number of binary relation symbols is countably infinite. Subsequently the number was reduced to three by Herbrand [9] and to just one by Kalmár
Supported by JSPS KAKENHI Grant Number 16J08119. The affiliation above is that at the time of the conference version. The e-mail address is the author's address at the time of uploading to the repository.
** This is a long version of the paper at ICLA'19 [18], with (Ax.1) and (Ax.2) in Sect. 3 corrected (see the remark at the end of Sect. 3).
Yoshiki Nakamura
[11], see e.g., [4, p. 6] or [2, Theorem 21.4 (The Church-Herbrand theorem)]. Over finite models, FO with just one binary relation symbol is also undecidable by Trakhtenbrot's Theorem [23] (moreover, the undecidability holds even over finite graphs of vertex-degree at most 3 [27]).
Another restriction is with respect to the number of variables occurring in formulas. FOk denotes the restriction of FO to formulas with at most k distinct variables. In these classes, it is known that FO3 with countably infinitely many binary relation symbols and without equality is undecidable (because the ∀∃∀ case is undecidable [10]), whereas FO2 (even with equality) is decidable [17] and coNEXPTIME-complete [8, Corollary 5.4]. FO2 has a connection with modal logic in the sense that some propositional modal logics can be embedded into FO2 [25]. With respect to the expressive power of unary relations, FO2 is equivalent to Boolean modal logic with relational converse and the identity relation [14]. As for FO3, it has a connection with the calculus of (binary) relations [21]. We denote the full signature of the calculus of relations by ⟨⋅,∙−,∪,∙∘,1⟩, where ⋅ is relational composition, ∙−is set-theoretic complement, ∪ is set-theoretic union, ∙∘ is relational converse, and 1 is the identity relation. Actually, with respect to the expressive power of binary relations, FO3 with equality is equivalent to terms of the calculus of relations [22] (see also [6]).
In this paper we prove that the intersection of the above two restrictions is also undecidable, i.e., the validity problem for FO3 with just one binary relation symbol and without equality is undecidable. Moreover we prove that the finite validity problem for the class is undecidable. The class is the minimal undecidable fragment with respect to the above two restrictions since both monadic FO and FO2 are decidable. As for the calculus of relations, we prove that the validity problem and the finite validity problem for equational formulas of the calculus of relations with just one character over the signature ⟨⋅,∙−,∪⟩ are undecidable.
Outline
Figure 1 gives the outline of this paper. Every arrow denotes a reduction from the source to the target preserving validity and finite validity (hence a conservative reduction, via taking the negations of the source and target formulas), and A denotes a countably infinite set. In Sect. 2 we introduce first-order logic and the calculus of relations, and we show that FO3 with equality and the calculus of relations are equivalent in the sense of expressive power of binary relations. In this section we prove that relational converse ∙ and the identity relation symbol 1 can be eliminated by using fresh characters preserving validity and finite validity. In Sect. 3 we give reductions for reducing the number of characters to one. Finally, in Sect. 4 we conclude this paper.
2 FO3 and the Calculus of Relations
Let V be a countably infinite set of (first-order) variables. In this paper we assume that every signature of first-order logic is a set of binary relation symbols. Let A
First-order logic
The calculus of relations
Fig. 1. An overview of reductions
be a set denoting a signature. The set of formulas of first-order logic over A, written FOA=, is defined by the following grammar (we omit parentheses and use them only when it is not clear how to parse):
φ,ψ∈FOA=::=a(x,y)∣x=y∣φ∨ψ∣∃x.φ∣¬φa∈Aandx,y∈V
We use the following abbreviations: (1) φ∧ψ:=¬((¬φ)∨(¬ψ)); (2) φ→ψ:=(¬φ)∨ψ; (3) φ↔ψ:=(φ→ψ)∧(ψ→φ); (4) ∀x.φ:=¬∃x.¬φ. FOA denotes the subset of FOA= whose formulas do not contain the symbol =. FOkA= (resp. FOkA) denotes the subset of FOA= (resp. FOA) whose formulas contain at most k distinct variables 1. FO= denotes the set of all formulas in FOA= over a signature A.
A model over A is a tuple M=⟨∣M∣,RM⟩, where ∣M∣ is a nonempty set; and RM:A→℘(∣M∣2) is a function. Each RM(a) denotes a binary relation on ∣M∣. We may view every model as a graph, e.g., each element of ∣M∣ is called a vertex and each element of RM(a) is called an edge labeled with a. An interpretation I on M is a function from V to ∣M∣. The semantics of every formula φ on ⟨M,I⟩ is a truth value. ⟨M,I⟩⊨φ (resp. ⟨M,I⟩⊨φ) denotes that the value of φ on ⟨M,I⟩ is true (resp. false). ⟨M,I⟩⊨φ is defined as follows: (1) ⟨M,I⟩⊨a(x,y)⟺⟨I(x),I(y)⟩∈RM(a) for a∈A; (2) ⟨M,I⟩⊨x=y⟺I(x)=I(y); (3) ⟨M,I⟩⊨φ∨ψ⟺⟨M,I⟩⊨φ or ⟨M,I⟩⊨ψ; (4) ⟨M,I⟩⊨∃x.φ⟺ there is v∈∣M∣ s.t. ⟨M,[v/x]I⟩⊨φ; (5) ⟨M,I⟩⊨¬φ⟺⟨M,I⟩⊨φ, where [v/x]I denotes the function I in which I(x) has been replaced by the element v. Then the semantics of φ on M is defined by [φ]M:={I:V→∣M∣∣⟨M,I⟩⊨φ}. M⊨φ denotes that, for any interpretation I, ⟨M,I⟩⊨φ holds. [φ]Mx denotes the projection of [φ]M with respect to x, i.e., [φ]Mx:={⟨I(x1),…,I(xn)⟩∣I∈[φ]M}, where x=⟨x1,…,xn⟩.
A formula φ over the signature A is called valid (resp. finitely valid) if, for any model (resp. finite model) M over A, M⊨φ holds. The validity problem (resp. the finite validity problem) is the problem to decide whether a given formula is valid (resp. finitely valid). In this paper we rely on the undecidability
1 For example, ∃x.∃y.∃z.∃w.a(x,y) is not an FO3{a} formula (the formula is an FO4{a} formula), but ∃x.∃y.∃z.∃x.a(x,y) is an FO3{a} formula.
Yoshiki Nakamura
of the ∀∃∀ case [10] and modify the result for FO3 and the calculus of relations. This class is a conservative reduction class [4, Definition 2.1.35] (i.e., there is a recursive function from every first-order logic formula over any signature to a formula of the class preserving satisfiability and finite satisfiability). From this, the following holds.
Lemma 1 (A corollary of [4, Theorem 3.1.9]). Let A be any countably infinite set. Then
– the validity problem for FO3A is undecidable; and
– the finite validity problem for FO3A is undecidable.
We now define the calculus of relations. Let X be a set and let R and R′ be binary relations on X. The identity relation △(Y) on a set Y is defined as {⟨v,v⟩∣v∈Y}. The relational composition R⋅R′ is defined as {⟨v,v′⟩∣∃v′′⋅⟨v,v′′⟩∈R∧⟨v′′,v′⟩∈R′}. The relational converse R∼ is defined as {⟨v′,v⟩∣⟨v,v′⟩∈R}. The union R∪R′ and the complement R− are defined as set-theoretic union and complement (in particular, R−:=X2∖R). Let A be a set of characters. The set of terms over A, written TA, is defined by the following grammar:
t,u∈TA::=a∣t⋅u∣t−∣t∪u∣t∼∣1
a∈A
We use the following abbreviations: (1) t∩u:=(t−∪u−)−; (2) ⊤:=a∪a−; (3) 0:=a∩a−; (4) tn+1:=tn⋅t and t1:=t, where a is some character in A and n≥1. TAς denotes the set of terms over A and over the signature ς, where ς is a subsequence of ⟨⋅,∙−,∪,∙∼,1⟩. Note that the symbols, ∙∼ and 1, are not used in these abbreviations.
Let M be a model over A. The semantics of every term t on M, written [t]M, is a binary relation on ∣M∣, defined as follows: (1) [a]M:=RM(a); (2) [t⋅u]M:=[t]M⋅[u]M; (3) [t−]M:=∣M∣2∖[t]M; (4) [t∪u]M:=[t]M∪[u]M; (5) [t∼]M:=[t]M∼; (6) [1]M:=△(∣M∣). Note that [t∩u]M=[t]M∩[u]M, [T]M=∣M∣2, and [0]M=∅ hold. We also define the set of formulas of the calculus of relations over a set T of terms, written Φ[T], by the following grammar:
φ,ψ∈Φ[T]:=t=u∣φ∨ψ∣¬φ
t,u∈T
The semantics of every formula φ∈Φ[T] on M is a truth value. M⊨φ (resp. M⊨φ) denotes that the value of φ on M is true (resp. false) defined as follows: (1) M⊨t=u⟺[t]M=[u]M; (2) M⊨φ∨ψ⟺M⊨φ or M⊨ψ; (3) M⊨¬φ⟺M⊨φ. A formula of the form t=u is called an equational formula. We denote the set of equational formulas over a set T by Eq[ T]. Actually every formula is equivalent to an equational formula by the following lemma.
Lemma 2 (cf. [16, Theorem 1]). For any formula φ in Φ[TA], there is an equational formula ψ of the form t=0 in Eq[TA] s.t. for any M over A, M⊨φ⟺M⊨ψ.
Proof (Sketch). It is proved by using the following equivalences: (1) M⊨t=u⟺M⊨(t∩u−)∪(t−∩u)=0; (2) M⊨(t=0)∨(u=0)⟺M⊨t⋅⊤⋅u=0; (3) M⊨¬(t=0)⟺M⊨(⊤⋅t⋅⊤)−=0.
By Lemma 2, every formula of the calculus of relations can be translated to an equational formula preserving validity and finite validity. For simplicity, we may use formulas of the calculus of relations (but it is not essential). Note that the symbols, ∙ and 1, are not used in the translation in Lemma 2.
We use [n] to denote the set {1,…,n} for every natural number n≥0. The following lemma shows that every term of the calculus of relations has an equivalent FO3= formula.
Lemma 3 (e.g., [22, p. 28], [6]). Let x1, x2, and x3 be three distinct variables. There is a recursive function G from TA×[3]2 to FO3A= s.t., for any ⟨t,i,j⟩ with i=j and any model M over A, [t]M=[G(t,i,j)]Mxi,xj holds.
Proof (Sketch). We define G(t,i,j) as follows: (1) G(a,i,j):=a(xi,xj); (2) G(t⋅u,i,j):=∃xk.G(t,i,k)∧G(u,k,j); (3) G(t−,i,j):=¬G(t,i,j); (4) G(t∪u,i,j):=G(t,i,j)∨G(u,i,j); (5) G(t∼,i,j):=G(t,j,i); (6) G(1,i,j):=xi=xj, where k is the minimum element in [3]∖{i,j}. Then [t]M=[G(t,i,j)]Mxi,xj is proved by induction on the structure of t.
Actually the converse of Lemma 3 also holds, i.e., FO3= and the calculus of relations are equivalent in the sense of expressive power of binary relations.
Lemma 4 (e.g., [22, Sect. 3.9], [6]). There is a recursive function H from FO3A=×V2 to TA s.t., for any ⟨φ,x,y⟩ and any model M over A, [φ]Mx,y=[H(φ,x,y)]M.
By Lemmas 3 and 4, every equational formula of the calculus of relations can be translated to an FO3 sentence, and vice versa, by the following:
where φ is an FO3 sentence and x and y are arbitrary distinct variables. Therefore the following also holds.
Lemma 5. Let A be any countably infinite set. Then both the validity problem and the finite validity problem for Eq[TA⟨⋅,∙−,∪,∙−,1⟩] are undecidable.
2.1 Elimination of Relational Converse (Using the Identity Relation)
In this subsection, we show that relational converse ∙ can be eliminated by using fresh characters preserving validity and finite validity (Lemma 7). Let Aˇ be a countably infinite set that is disjoint from A. We use aˇ to denote the character in Aˇ denoting the converse of the character a in A. The following two axioms force that aˇ is the converse of a: (Ca.1)(a⋅aˇ−)∩1=0; and (Ca.2)(aˇ⋅a−)∩1=0.
(Ca.1-2) denotes the formula (Ca.1) ∧ (Ca.2). In fact the following holds.
Proposition 6. For any model M over A∪Aˇ, the following hold: (1) M⊨ (Ca.1-2) ⟺M⊨a∼=aˇ; (2) M⊨(t⋅u)∼=u∼⋅t∼; (3) M⊨(t−)∼=(t∼)−; (4) M⊨(t∪u)∼=t∼∪u∼; (5) M⊨(t∼)∼=t; (6) M⊨(1)∼=1.
Yoshiki Nakamura
Proof. (2)–(6) are easily proved by the definition of [t]M. We only prove (1). ( ⇒): We assume that there is a pair ⟨v,w⟩ such that ⟨v,w⟩∈[a]M∖[a~]M. Then, by ⟨w,v⟩∈[a]M and ⟨v,w⟩∈[a~−]M, ⟨w,w⟩∈[(a⋅a~−)∩1]M. However this contradicts (Ca.1). Therefore [a]M⊆[a~]M. We assume that there is a pair ⟨v,w⟩ such that ⟨v,w⟩∈[a~]M∖[a]M. Then, by ⟨v,w⟩∈[a~]M and ⟨w,v⟩∈[a−]M, ⟨v,v⟩∈[(a~⋅a−)∩1]M. However this contradicts (Ca.2). Therefore [a]M⊇[a~]M, and thus M⊨a∼=a~. ( ⇔): We prove the contraposition. If M⊨(Ca.1), there are v and w such that ⟨v,w⟩∈[a]M and ⟨w,v⟩∈[a~−]M. Then by ⟨w,v⟩∈[a−]M and ⟨w,v⟩∈/[a~]M, M⊨a∼=a~. If M⊨(Ca.2), there are v and w such that ⟨v,w⟩∈[a~]M and ⟨w,v⟩∈[a−]M. Then by ⟨v,w⟩∈/[a−]M and ⟨v,w⟩∈[a~]M, M⊨a∼=a~.
Let CF(t) be the normal form of a term t w.r.t. the following rewriting rules: (1) (a)∼⇝aˇ and (aˇ)∼⇝a; (2) (t⋅u)∼⇝u∼⋅t∼; (3) (t−)∼⇝(t−)−; (4) (t∪u)∼⇝t∼∪u∼; (5) (t∼)∼⇝t; (6) (1)∼⇝1. Note that, for any term t, CF(t) does not contain ∙∼. We use Aφ to denote the finite set of all characters occurring in φ.
Lemma 7. For any t,u∈TA, the following are equivalent: (1) t=u is valid (resp. finitely valid). (2) (⋀a∈At=u(Ca.1-2))→CF(t)=CF(u) is valid (resp. finitely valid).
Proof. (2) ⇒ (1): Let M be a model over A such that M⊨t=u. We define the model M′ over A∪Aˇ by M′:=⟨∣M∣,R′⟩, where R′(a):=RM(a) for a∈A; and R′(aˇ):=RM(a)∼ for aˇ∈Aˇ. Then M′⊨⋀a∈At=u(Ca.1-2) holds by Proposition 6 (1). Moreover, for any term t′∈TA, [t′]M=[CF(t′)]M′ holds by using Proposition 6. Therefore M′⊨CF(t)=CF(u). (1) ⇒ (2): Let M be a model over A∪Aˇ such that M⊨⋀a∈At=u(Ca.1-2) holds, but M⊨CF(t)=CF(u). Then [t′]M=[CF(t′)]M holds for any term t′ over At=u by using Proposition 6, and thus M⊨t=u.
By Lemma 2, each formula (⋀a∈At=u(Ca.1-2))→CF(t)=CF(u) can be translated to an equational formula without ∙∼.
2.2 Elimination of the Identity Relation
In this subsection, we also eliminate the identity relation symbol 1 by using a fresh character E. The key is to construct an equivalence relation denoting the identity relation not using 1 or ∙. Let us consider the following axioms: (E.1) E⋅⊤=⊤; (E.2) (E−⋅E)∩E=0; (E.3) (E⋅E−)∩E=0; and (E.4) (E⋅E)∩E−=0. (E.1-4) denotes the formula (E.1) ∧⋯∧ (E.4).
Proposition 8. For any model M over A∪{E}, M⊨ (E.1-4) ⟺[E]M is an equivalence relation on ∣M∣.
Proof. ( ⇔): (E.1) is by the reflexivity. (E.4) is by the transitivity. (E.2) and (E.3) are by the symmetry and the transitivity. ( ⇒): The reflexivity is shown by (E.1) and (E.2). Let v be any vertex in ∣M∣. Then let w be a vertex such that ⟨v,w⟩∈[E]M holds (such w always exists by (E.1)). We assume that ⟨v,v⟩∈/[E]M. Then, by ⟨v,v⟩∈[E−]M, ⟨v,w⟩∈[(E−⋅E)∩E]M holds. However this contradicts
(E.2). Therefore ⟨v,v⟩∈[E]M. The symmetry is by the reflexivity and (E.3). Let ⟨v,w⟩∈[E]M. We assume ⟨w,v⟩∈/[E]M. Then ⟨v,v⟩∈[(E⋅E−)∩E]M by the reflexivity. However this contradicts (E.3). Therefore ⟨w,v⟩∈[E]M. The transitivity is by (E.4).
For every term t, the term IF(t) is inductively defined as follows: (1) IF(a):=E⋅a⋅E; (2) IF(t⋅u):=IF(t)⋅IF(u); (3) IF(t−):=IF(t)−; (4) IF(t∪u):=IF(t)∪IF(u); (5) IF(t−):=IF(t)−; (6) IF(1):=E. Note that (i) IF(t) does not contain the symbol 1; and (ii) if t does not contain ∙−, then IF(t) also does not contain ∙−.
Lemma 9. For any t,u∈TA⟨⋅,∙−,∪,∙−,1⟩, the following are equivalent: (1) t=u is valid (resp. finitely valid). (2) (E.1−4)→IF(t)=IF(u) is valid (resp. finitely valid).
Proof. (2) ⇒ (1): Let M be a model over A such that M⊨t=u. We define the model M′ over A∪{E} by M′:=⟨∣M∣,R′⟩, where R′(a):=RM(a) for a∈A and R′(E):=△(∣M∣). Then M′⊨ (E.1-4) holds because [E]M′ is an equivalence relation. Also M′⊨IF(t)=IF(u) holds because [t]M=[IF(t)]M′ holds by the definition of M′. (1) ⇒ (2): Let M be a model over A∪{E} such that M⊨ (E.1-4) holds, but M⊨IF(t)=IF(u). We define the model M′ over A by M′:=⟨∣M∣/E,R′⟩, where ∣M∣/E is the quotient set of ∣M∣ by [E]M; [v]E denotes the equivalence class of an element v with respect to [E]M; and R′(a):={⟨[v]E,[w]E⟩∣⟨v,w⟩∈RM(a)} for a∈A. Then {⟨[v]E,[w]E⟩∣⟨v,w⟩∈[IF(t′)]M}=[t′]M′ holds for any term t′. This is proved by induction on the structure of t′ (see Appendix A). Therefore M′⊨t=u.
We can eliminate both converse and the identity relation preserving validity and finite validity by Lemmas 7 and 9. Therefore the following holds.
Corollary 10. Let A be a countably infinite set. Then both the validity problem and the finite validity problem for Eq[TA⟨⋅,∙−,∪⟩] are undecidable.
3 Reductions to the One Binary Relation Case
In this section we consider reducing the number of characters. Let A be an ordered set {a1,a2,…}. Without loss of generality, we can assume that every term is in TA⟨⋅,∙−,∪⟩ by Corollary 10. In this section we give two reductions to the one binary relation case. First we give a simple reduction, but this reduction uses the identity relation. The second reduction is a bit more complex than the first reduction, but the reduction does not use the identity relation.
3.1 A Conservative Reduction Using Identity
We first give a reduction T1 from TA⟨⋅,∙−,∪,1⟩ to T{a}⟨⋅,∙−,∪,1⟩. The term T1(t) is inductively defined as follows: (1) T1(ai):=(a∩1)⋅a⋅((a−∩1)⋅a)i⋅(a∩1); (2) T1(t⋅u):=T1(t)⋅T1(u); (3) T1(t−):=(a∩1)⋅T1(t)−⋅(a∩1); (4) T1(t∪u):=T1(t)∪T1(u); (5) T1(1):=(a∩1).
Yoshiki Nakamura
Figure 2 is an example of transforming models over A to models over {a} in Lemma 11. Each blue (resp. red, gray) colored edge denotes an edge labeled with a1 (resp. a2, a).
Fig. 2. A transformation to the one binary relation case using identity
Lemma 11. For any t,u∈TA⟨⋅,∙−,∪,1⟩, the following are equivalent: (1) t=u is valid (resp. finitely valid). (2) T1(t)=T1(u) is valid (resp. finitely valid).
Proof. (2) ⇒ (1): Let M be a model over At=u such that M=t=u. We define the model M′ over {a} by M′:=⟨∣M′∣,R′⟩, where ∣M′∣:=∣M∣∪{⟨v,w,i,j⟩∣⟨v,w⟩∈RM(ai),j∈[i]} and R′(a):=△(∣M∣)∪{⟨v,⟨v,w,i,1⟩⟩,⟨⟨v,w,i,i⟩,w⟩∣⟨v,w⟩∈RM(ai)}∪{⟨⟨v,w,i,j⟩,⟨v,w,i,j+1⟩⟩∣⟨v,w⟩∈RM(ai),j∈[i−1]}. The right-hand side in Figure 2 is an example of M′. Note that if M is finite, M′ is also finite because At=u is finite. Then [t]M=[T1(t)]M′ holds. This is easily proved by induction on the structure of t (see Appendix B). Therefore M′=T1(t)=T1(u). (1) ⇒ (2): Let M be a model over {a} such that M=T1(t)=T1(u). Then we define the model M′ over A by M′:=⟨∣M′∣,R′⟩, where ∣M′∣:={v∣⟨v,v⟩∈[a]M} and R′(ai):=∣M′∣2∩[T1(ai)]M. Here ∣M′∣=∅, since if not, [T1(t)]M=∅=[T1(u)]M. Then [t]M′=[T1(t)]M holds. This is easily proved by induction on the structure of t (see Appendix C). Therefore M′=t=u.
By the above lemma, the following has been proved.
Theorem 12. Let a be a character. Then both the validity problem and the finite validity problem for Eq[T{a}⟨⋅,∙−,∪,1⟩] are undecidable.
Remark 13. The undecidability of the validity problem for the calculus of relations with just one character over the signature ⟨⋅,∙−,∪,∙∼,1⟩ had been shown by Maddux [15, p. 399]. More strongly, Theorem 12 shows that the validity problem is undecidable even without ∙∼ and shows that the finite validity problem is also undecidable. Furthermore, Theorem 12 will be strengthened to Theorem 17.
Combining Theorem 12 and Lemma 9, the following is also proved.
Corollary 14. Let a1,a2 be two distinct characters. Then both the validity problem and the finite validity problem for Eq[T{a1,a2}⟨⋅,∙−,∪⟩] are undecidable.
3.2 A Conservative Reduction Not Using Identity
In this subsection we give another reduction, which does not use the identity relation or relational converse. The key is how to distinguish the vertices of a given model from the other vertices on the transformed model, not relying on the identity relation. Without loss of generality we can assume that the number of characters is 2 by Corollary 14. Now we consider the following axioms: (Ax.1) (a∩a2)⋅((a∩a3)⋅⊤)−=0; and (Ax.2) (⊤⋅(a∩a2))−⋅(a∩a3)=0. (Ax.1-2) denotes the formula (Ax.1) ∧ (Ax.2). These axioms are used to force cod([a∩a2]M)=dom([a∩a3]M), where dom(R) (resp. cod(R)) denotes the domain (resp. codomain) of a binary relation R, i.e., dom(R):={v∣∃w.⟨v,w⟩∈R} and cod(R):={w∣∃v.⟨v,w⟩∈R}. In fact the following holds.
Proposition 15. For every model M over {a}, M⊨(Ax.1-2)⟺cod([a∩a2]M)=dom([a∩a3]M).
Proof. By M⊨(Ax.1)⟺cod([a∩a2]M)⊆dom([a∩a3]M) and M⊨(Ax.2)⟺cod([a∩a2]M)⊇dom([a∩a3]M).
We define a reduction T2 from T{a1,a2}⟨⋅,∙−,∪⟩ to T{a}⟨⋅,∙−,∪⟩ as follows: (1) T2(ai):=(a∩a3)⋅ai+1⋅(a∩a2); (2) T2(t⋅u):=T2(t)⋅T2(u); (3) T2(t−):=((a∩a3)⋅⊤)∩(⊤⋅(a∩a2))∩T2(t)−; (4) T2(t∪u):=T2(t)∪T2(u). Intuitively, both the codomain of a∩a2 and the domain of a∩a3 denote the set of vertices in the pre-transformed model in the above reduction.
Figure 3 is an example of transforming models over {a1,a2} to models over {a} in Lemma 16. Each blue (resp. red, gray) colored edge denotes an edge labeled with a1 (resp. a2, a).
Fig. 3. A transformation to the one binary relation case not using identity
Lemma 16. For any t,u∈T{a1,a2}⟨⋅,∙−,∪⟩, the following are equivalent: (1) t=u is valid (resp. finitely valid). (2) (Ax.1-2)→T2(t)=T2(u) is valid (resp. finitely valid).
Proof. (2) ⇒ (1): Let M be a model over {a1,a2} such that M=t=u. We define the model M′ over {a} by M′:=⟨∣M′∣,R′⟩, where ∣M′∣:=(∣M∣×[6])∪{⟨v,w,i,j⟩∣⟨v,w⟩∈RM(ai),j∈[i]} and R′(a) is the union of the following:
(ii) ⋃i∈{1,2}{⟨⟨v,6⟩,⟨v,w,i,1⟩⟩,⟨⟨v,w,i,i⟩,⟨w,1⟩⟩∣⟨v,w⟩∈RM(ai)}; and
(iii) {⟨⟨v,w,2,1⟩,⟨v,w,2,2⟩⟩∣⟨v,w⟩∈RM(a2)}.
The right-hand side in Figure 3 is an example of M′. Note that if M is finite, M′ is also finite.
First M′⊨ (Ax.1-2) holds by cod([a∩a2]M′)={⟨v,3⟩∣v∈∣M∣}=dom([a∩a3]M′). Moreover the following holds: {⟨⟨v,3⟩,⟨w,3⟩⟩∣⟨v,w⟩∈[t]M}=[T2(t)]M′⋯(♡). M′⊨T2(t)=T2(u) is proved by ( ♡). We prove ( ♡) by induction on the structure of t.
If t≡ai, let ⟨v,w⟩ be a pair such that ⟨v,w⟩∈[ai]M. Then ⟨⟨v,3⟩,⟨w,3⟩⟩∈[(a∩a3)⋅ai+1⋅(a∩a2)]M′ is easily checked. Conversely, if ⟨v,w⟩∈[(a∩a3)⋅ai+1⋅(a∩a2)]M′, then there are v′,w′∈∣M∣ such that ⟨v,w⟩=⟨⟨v′,3⟩,⟨w′,3⟩⟩ by cod([a∩a2]M′)=dom([a∩a3]M′)={⟨v,3⟩∣v∈∣M∣}. Then {v∣⟨⟨v′,3⟩,v⟩∈[a∩a3]M′}={⟨v′,6⟩} and {w∣⟨w,⟨w′,3⟩⟩∈[a∩a2]M′}={⟨w′,1⟩} hold, and thus ⟨⟨v′,6⟩,⟨w′,1⟩⟩∈[ai+1]M′. If we assume ⟨v′,w′⟩∈/[ai]M, then ⟨w′,1⟩ is not reachable from ⟨v′,6⟩ in i+1 steps because i+1≤3, the length of paths from ⟨v′,6⟩ to ⟨w′,1⟩ via ⟨v′,w′,j,1⟩ with j=i is j+1, and the length of paths from ⟨v′,6⟩ to ⟨w′,1⟩ via some ⟨w′′,1⟩ is at least 6, where w′′ is an element in ∣M∣ not equal to w′. (More concretely, the following path is the shortest path from ⟨v′,6⟩ to ⟨w′,1⟩ via ⟨w′′,1⟩: ⟨v′,6⟩⇝⟨v′,w′′,1,1⟩⇝⟨w′′,1⟩⇝⟨w′′,3⟩⇝⟨w′′,6⟩⇝⟨w′′,w′,1,1⟩⇝⟨w′,1⟩.) However this contradicts ⟨⟨v′,6⟩,⟨w′,1⟩⟩∈[ai+1]M′. Therefore ⟨v′,w′⟩∈[ai]M.
(1) ⇒ (2): Let M be a model over {a} such that M⊨ (Ax.1-2), but M⊨T2(t)=T2(u). Then we define the model M′ over {a1,a2} by M′:=⟨∣M′∣,R′⟩, where ∣M′∣:=dom([a∩a3]M) and R′(ai):=[T2(ai)]M. Note that R′(ai)⊆∣M′∣2 holds because dom([a∩a3]M)=cod([a∩a2]M) by Proposition 15. Here ∣M′∣=∅, since if not, [T2(t)]M=∅=[T2(u)]M. Then the following holds:
[t]M′=[T2(t)]M⋯(♠).M′⊨t=u is proved by (♠). We now prove (♠) by induction on the structure of t.
If t≡ai, [ai]M′=[T2(ai)]M is shown by the definition of M′.
Theorem 17. Let a be a character. Then both the validity problem and the finite validity problem for Eq[T{a}⟨⋅,∙−,∪⟩] are undecidable.
Combining Theorem 17 and Lemma 3, the following is also proved. Note that, if a term t does not contain 1, the formula G(t,i,j) does not contain =.
Theorem 18. Let a be a character. Then both the validity problem and the finite validity problem for FO3{a} are undecidable.
Remark (Correction of [18]). In the conference version [18], the axioms (Ax.1) and (Ax.2) were given as (a∩a2)⋅⊤=(a∩a2)⋅(a∩a3)⋅⊤ and ⊤⋅(a∩a3)=⊤⋅(a∩a2)⋅(a∩a3). However, Proposition 15 fails for them. Proposition 15 holds for the corrected axioms (Ax.1) and (Ax.2) above. The rest of the proof is unchanged, as the axioms (Ax.1) and (Ax.2) are used only through Proposition 15.
4 Conclusion
In this paper we showed that the validity problem and the finite validity problem are undecidable for the following classes: (1) FO3 with just one binary relation symbol and without equality; and (2) equational formulas of the calculus of relations with just one character over the signature ⟨⋅,∙−,∪⟩. In connection with (2), the following decidable fragments are known.
Theorem 19 (cf. [1, Theorem 5] for (1)). The validity problem and the finite validity problem are decidable for equational formulas of the following classes: (1) the calculus of relations over the signature ⟨⋅,∪⟩ (even with ∙, 1, 0, ⊤, ∩, and atomic negation); and (2) the calculus of relations over the signature ⟨∙−,∪⟩ (even with ∙, 1).
These decidability results are proved by the reduction to FO3 (Lemma 3) and using the decidability of the satisfiability problem and the finite model property of the ∃∗∀∗ case with equality (proved by Ramsey [19] in 1930, see also [4, Sect. 6.2.2]). To the best of our knowledge, the (un)decidability of the validity problem and the finite validity problem for equational formulas of the calculus of relations over the signature ⟨⋅,∙−⟩ is open regardless of the number of characters.
Yoshiki Nakamura
References
Andréka, H., Bredikhin, D.A.: The equational theory of union-free algebras of relations. Algebra Universalis 33(4), 516–532 (1995). doi: 10.1007/BF01225472
Boolos, G.S., Burgess, J.P., Jeffrey, R.C.: Computability and Logic. Cambridge University Press, 5 edn. (2007). doi: 10.1017/CBO9780511804076
Büchi, J.R.: On a decision method in restricted second order arithmetic. In: International Congress on Logic, Methodology, and Philosophy of Science 1960. pp. 1–11. Stanford University Press (1962)
Börger, E., Grädel, E., Gurevich, Y.: The Classical Decision Problem. Springer (1997)
Church, A.: A note on the Entscheidungsproblem. The Journal of Symbolic Logic 1(1), 40–41 (1936). doi: 10.2307/2269326
Givant, S.: The calculus of relations as a foundation for mathematics. Journal of Automated Reasoning 37(4), 277–322 (2007). doi: 10.1007/s10817-006-9062-x
Gödel, K.: Die Vollständigkeit der Axiome des logischen Funktionenkalküls. Monatshefte für Mathematik und Physik 37(1), 349–360 (1930). doi: 10.1007/BF01696781
Grädel, E., Kolaitis, P.G., Vardi, M.Y.: On the decision problem for two-variable first-order logic. The Bulletin of Symbolic Logic 3(1), 53–69 (1997). doi: 10.2307/421196
Herbrand, J.: Sur le problème fondamental de la logique mathématique. Sprawozdania z posiedzeń Towarzystwa Naukowego Warszawskiego, Wydział III 24, 12–56 (1931)
Kahr, A.S., Moore, E.F., Wang, H.: Entscheidungsproblem reduced to the AEA case. Proceedings of the National Academy of Sciences 48(3), 365–377 (1962). doi: 10.1073/pnas.48.3.365
Kalmár, L.: Zurückführung des Entscheidungsproblems auf den Fall von Formeln mit einer einzigen, binären, Funktionsvariablen. Compositio mathematica 4, 137–144 (1936)
Lewis, H.R.: Complexity results for classes of quantificational formulas. Journal of Computer and System Sciences 21(3), 317–353 (1980). doi: 10.1016/0022-0000(80)90027-6
Löwenheim, L.: Über Möglichkeiten im Relativkalkül. Mathematische Annalen 76(4), 447–470 (1915). doi: 10.1007/BF01458217
Lutz, C., Sattler, U., Wolter, F.: Modal logic and the two-variable fragment. In: 15th Annual Conference of the European Association for Computer Science Logic (CSL). LNCS, vol. 2142, pp. 247–261. Springer (2001). doi: 10.1007/3-540-44802-0_18
Maddux, R.D.: Undecidable semiassociative relation algebras. The Journal of Symbolic Logic 59(2), 398–418 (1994). doi: 10.2307/2275397
Maddux, R.D.: Calculus of relations. In: Relation Algebras, vol. 150, pp. 1–33. Elsevier (2006). doi: 10.1016/S0049-237X(06)80023-6
Mortimer, M.: On languages with two variables. Mathematical Logic Quarterly 21(1), 135–140 (1975). doi: 10.1002/malq.19750210118
Nakamura, Y.: The undecidability of FO3 and the calculus of relations with just one binary relation. In: Indian Conference on Logic and Its Applications (ICLA). LNCS, vol. 11600, pp. 108–120. Springer (2019). doi: 10.1007/978-3-662-58771-3_11
Ramsey, F.P.: On a problem of formal logic. Proceedings of the London Mathematical Society s2-30(1), 264–286 (1930). doi: 10.1112/plms/s2-30.1.264
Skolem, T.: Untersuchungen über die Axiome des Klassenkalküls und über Produktations- und Summationsprobleme, welche gewisse Klassen von Aussagen betreffen. Videnskapssselskapets skrifter, I. Matematisk-naturvidenskabelig Klasse (3) (1919)
Tarski, A.: On the calculus of relations. The Journal of Symbolic Logic 6(3), 73–89 (1941). doi: 10.2307/2268577
Tarski, A., Givant, S.: A Formalization of Set Theory without Variables, Colloquium Publications, vol. 41. American Mathematical Society (1987). doi: 10.1090/coll/041
Trakhtenbrot, B.A.: The impossibility of an algorithm for the decision problem in finite classes. In: Nine Papers on Logic and Quantum Electrodynamics, vol. 23, pp. 1–5. American Mathematical Society (1963). doi: 10.1090/trans2/023/01
Turing, A.M.: On computable numbers, with an application to the Entscheidungsproblem. Proceedings of the London Mathematical Society s2-42(1), 230–265 (1937). doi: 10.1112/plms/s2-42.1.230
Vardi, M.Y.: Why is modal logic so robustly decidable? In: Descriptive Complexity and Finite Models, DIMACS Series in Discrete Mathematics and Theoretical Computer Science, vol. 31, pp. 149–183. American Mathematical Society (1997). doi: 10.1090/dimacs/031/05
Vardi, M.Y.: From philosophical to industrial logics. In: Indian Conference on Logic and Its Applications (ICLA). LNCS, vol. 5378, pp. 89–115. Springer (2008). doi: 10.1007/978-3-540-92701-3_7
Willard, R.: Hereditary undecidability of some theories of finite structures. The Journal of Symbolic Logic 59(4), 1254–1262 (1994). doi: 10.2307/2275703
A Completion of the Proof of Lemma 9
We prove the following by induction on the structure of t:
(1) If ⟨v,v′⟩,⟨w,w′⟩∈[E]M, then ⟨v,w⟩∈[IF(t)]M⟺⟨v′,w′⟩∈[IF(t)]M; and
(2) {⟨[v]E,[w]E⟩∣⟨v,w⟩∈[IF(t)]M}=[t]M′,
where M and M′ are the models in Lemma 9. For (1), if t≡a or t≡1, this part is proved by the definition of IF(t) and that [E]M is an equivalence relation. If t≡t⋅u,
We prove [t]M=[T1(t)]M′ by induction on the structure of t, where M and M′ are the models in Lemma 11.
If t≡ai, let ⟨v,w⟩ be a pair such that ⟨v,w⟩∈[ai]M. Then ⟨v,w⟩∈[T1(ai)]M′ holds by the construction of M′. Conversely if ⟨v,w⟩∈[T1(ai)]M′, there is a sequence ⟨v0,…,vi+1⟩ such that (1) ⟨v,w⟩=⟨v0,vi+1⟩; (2) v0,vi+1∈dom([a∩
1]M′ and v1,…,vi∈/dom([a∩1]M′; and (3) ⟨vj,vj+1⟩∈[a]M′ for 0≤j≤i. Therefore, v,w∈∣M∣, and thus ⟨v,w⟩∈[ai]M.