iLz such that R EF and Ylf,vOG-ul, vlFvo+. Consequently. FE h:(R) and E= G by Lemma lO(2). Thus hz(RU)c{F:FE h:(R)}. For the reverse inclusion we let FE h:(R) ...
Annals of Pure and Applied North-Holland
A SEQUENT
Logic 25 (1983) 73-101
CALCULUS
73
FOR
RELATION
ALGEBRAS
Roger MADDUX Mathematics Deparhnent, Iowa State University, Ames, IA 50011, Communicated by K. Kunen Received 18 November 1981; revised
28 April
USA
1983
In [ZS], Tarski considered two methods of setting up the foundations of the calculus of relations. The second method used equational logic and led to the theory of relation algebras. The first method was to augment first-order logic with operations on relations, and with axioms which serve as definitions of the added operations. Tarski proved that every sentence in the calculus of relations is equivalent to a first-order sentence which contains only three distinct variables and uses no operations on relations. For example, the associative law for relative product, (R ; S) ; T= R ; (S ; T), is equivalent to vxvy[3z(3y(xRyAysz)AzTy)
f,
32(xRzA3x(zSxAxTy))].
Tarski proved the converse as well: any sentence involving no more than three distinct variables can be translated into an equation in the calculus of relations. It was therefore natural to ask which such sentences can be proved in first-order logic by proofs in which no sentence uses more than three variables. Tarski found that, except for the associative law mentioned above, all the translations of the postulates for relation algebras can be proved using only three variables. Transforming an algebraic result of J.C.C. McKinsey, Tarski showed that the sentence expressing the associative law requires four variables to prove. (For another proof, see [2].) Tarski asked whether there are any equations with translations which can be proved using only three variables, but which cannot be derived from the postulates for relation algebras without using the associative law for relative product. It turns out that there are such equations. One of them is the semiassociative law:
(R;l);l=R;l. Replacing the associativity of ; with the semi-associative law yields the definition of semi-associative relation algebra. It was proved in [8] that an equation is true in every relation algebra iff its translation into a first-order sentence can be proved with no more than four variables, and an equation is true in every semi-associative relation algebra iff its translation can be proved using only three variables. These results are proved in this paper for a different deductive system. We adopt a third method for founding the calculus of relations: the sequent 0168-0072/83/$3.00
0
1983, Elsevier
Science
Publishers
B.V.
(North-Holland)
74
R. Maddux
calculus. (Other closely related proof systems for the calculus of relations appear in [4], [14], and [16]. They were motivated by the use of the calculus of relations in theoretical computer science.) A sequent T+A is a pair of sets r, A of formulas of the form xRy, where x, y are variables and R is a relation term built up from relation variables and constants by means of operations such as ; . The sets I’, A may be infinite. Loosely speaking r+A asserts that if all the formulas in r are true, then one of the formulas in A must also be true. To establish some property of relations of the form R c S in this system, we would prove the sequent xRy+xSy. By restricting proofs to sequents involving only the first n variables, we obtain the concept of n-provability. As models we use atomic semi-associative relation algebras with sets of n-by-n matrices of atoms having certain properties. For the main completeness theorem we construct, for each n > 3, a canonical model in which a sequent holds iff it is n-provable. This result leads to the definition of a sequence of classes of algebras MA,, 3 6 n SW. In a certain sense (made precise in the main results), MA,, is complete with respect to n-provability. We show that MA, is the class of semi-associative relation algebras, MA4 is the class of relation algebras, MA,,, is the class of representable relation algebras, and each MA,, is a variety which is closed under the formation of perfect extensions. All this occurs in Sections 1 through 4. In Section 5 we use these results to translate results in the elementary theory of semi-associative relation algebras into results about n-provability in the sequent calculus. For example, we show that four variables are sufficient, but three variables are not, for proving that the relative product of two functions is a function. The paper ends with an example of a sequent which is 5-provable but not 4-provable. This paper will make considerable use of the terminology, definitions, and results of [9]. Any reference of the form n.m is to item m of section n of [9].
1. The
sequent calculus
} is the set of relation variables. We assume Ri # Ri whenever Rv={Ro,R1,... if j, i, j < w. (The assumption that Rv is countably infinite is merely a convenience. No results in this paper depend on the cardinality of Rv.) There are three relation constants, namely 0, 1, and l’, not included in Rv. The set Rt of relation terms is built up from Rv U{O, 1, 1’) by using two unary operations, - and “, and three binary operations, + , . , and ; . More specifically, Rt is the intersection of all sets X satisfying these conditions: RVC X, 0, 1, 1’ E X, and if R, S EX, then -R, R”, R + S, R * S, R ; S E X. We assume that relation terms obtained in different ways are different. In algebraic terms this means that the algebra
is an absolutely free algebra of similarity type (2,2, l,O, 0,2,1,0). %t is a relation-type algebra in the sense of Definition 1.1 of [9]. %t satisfies no identities
A sequent calculus for relation algebras whatsoever,
and is freely generated
into the universe of a relation-type
by Rv. Thus every function which maps Rv algebra can be extended to a homomorphism
from 9B into that algebra. Parentheses relation
terms according
75
will be omitted from expressions denoting
to the convention
that the operations
should be per-
formed in the following order: ‘-‘, -, ;, . , +, -j- (where R t S = -(-R ; -S)). For example, -RU = -(R”), -R ; S” = (-R) ; (S”), and R + S ; T - U = R +((S ; T) * U).
When
the same
binary
operation
occurs
several
times,
the
calculation
proceeds from left to right, e.g. R ; S ; T ; U = ((R ; S) ; T) ; U. Pv = {%, Ul, fJ2,. . . } is the set of point variables. We assume PvnRt = $9 and ui # Uj whenever i # j, i, j < o. Fm is the set of formulas, consisting of all triples xRy (more precisely, (x, R, y)) where x, y EPV and R E Rt. For any n so, Pv,={q:i, and +A is ((a, A). A sequent r+A is finite iff r and A are finite. r+A is an axiom, or is axiomatic, iff any of the following conditions holds for some x,y~Pv:Tf~Af~, xOy~r, xly~d, xl’x~d. The rules of inference are listed below. Each rule has one or two hypotheses, appearing above the horizontal line, a conclusion, appearing below the line, and a name, appearing at the right end of the line.
r, XRY =$A
r,xsYJA(+j)
r, xR+Sy+A
r+
A, XRY, XsY
I’JA,
r+A,
xR +Sy (++) XRY
I’JA, r+
A, XRY
T+A, (y cannot appear in the conclusion of (;*))
r+A, xR * Sy
XSY (+.)
r*A, XR ; Sz
YSZ@;)
R. Maddux
76 Let 9’ be a set of n-sequents.
A sequent TJA
is n-provable from Y, in symbols
j A, iff there is a finite sequence of n-sequents
such that r+ A is the last sequent in the sequence, and every sequent in the sequence is either an axiom, or is in 9, or follows from earlier sequents by some rule of inference. Such a
Yt,r
sequence
of n-sequents
write T’+A’l-,T+A n-provable
is called an n-proof of r+A instead of {r’jA’}t-,T+A.
from Y must be an n-sequent,
from 9. If Lf={(rl$A’} Clearly
a sequent
and if the hypotheses
we
which is
of a rule of
inference are n-provable from Y, then so is the conclusion of that rule. We say T+A is n-provable, in symbols k,T+A, iff @I-,T+A. Notice that if k,,T+A, then Yl-,TjA for every set 9’ of n-sequents. The following lemma gives a sampling of chosen for inclusion happen to be just the ones 1 below, but they offer an opportunity to see including one with an essential use of the CUT
3-provable sequents. The ones needed for the proof of Theorem (and work out) a few 3-proofs, rule (see the end of Section 2).
Lemma 1. For any x, y E Pv, and any R, S E Rt the following hold. (1) (2) (3) (4) (5)
t, xR + Sy j xRy, xSy. k,xRy j xR + Sy. t,xSyjxR+Sy. k,xR . Sy 3 xRy. b,xR .
77
A sequent calculus for relation algebras
(14): (15):
(16):
Similar to (13). Axiom
1. xRyjxRy 2. XRZ, zl’y+xRy
1, Id
3. xR ; 1’yjxRy
2, (;*)
1. 2. 3. 4. 5. 6. 7. 8. 9.
Axiom
xRy, ylz+xRy xRy, ylz+ylx xRy, ylzjxR ; lx xR ; lz+xR ; lx XRZ, zlx+xRz xRz, zlxjzly XRZ, zlxjxR ; ly xR ; 1xjxR ; ly xR ; lz+xR ; ly 10. xR;lz,zlyjxR;ly 11. x(R;l);ly+xR;ly
Axiom 1,2,(J;) 3, (;*) Axiom Axiom 536, (=, ;) 7,(;3) 4,8, CUT 9, (Wj) 10, (;*)
This section concludes with some useful facts about sets of finite n-sequents. Lemma 2. If Y is a set of finite n-sequents and Yk,T+A, some finite r’ E I and A’ c A.
Proot.
Use induction on the lengths of n-proofs
then Spl-,Y+A’
for
from Y.
For any FE Rt and any x, y E IV,, let xFy = {xRy : R E F}. F is n-consistent with Y (a set of n-sequents) iff .YH,vOFul+, i.e. voFvlj is not n-provable from Y. We say F is n-consistent
iff F is n-consistent
n-consistent with Y, then F is n-consistent n-consistent.
with @. Notice
with every Y’c_Y,
that if F is
in particular,
F is
Lemma 3. Let Y be a set of finite n-sequents, Fs Rt, and x, y E Pv,. (1) Yb,xFy 3 iff Yb,, yFxj. (2) If Ylf,xFyj, then F is n-consistent with 9’.
Proof. (1) The for some finite Any n-proof of by (e=$), so as
result is trivial if x = y, so assume x # y. By Lemma 2, Yl-,xGy =$ GsF. Let G={S1 ,..., Sk} and set R=( . . . (S,.S,). . ..).S.. xGy 3 from Y may be extended by k - 1 sequents, each following to obtain an n-proof of xRy+ from s9. Recalling n a3, choose
R. Maddux
78
z E F’v, -{x, follows.
y}. Any n-proof of xRy j
1. xRy+ 2. xRy, y l’z 3
1, (W3)
3. xR ; 1’23 4. xRz+xRz
2, (;3) Axiom
5. xRz+zl’z 6. xRzjxR 7. xRz+
may be extended to a proof of xRz j
as
Axiom ; l’z
4,5, (+ ;I 6,3, CUT
Any proof of xRz+ may be similarly extended to one of yRz j, which may be extended again to an n-proof of yRxj. Repeated use of Lemma l(6) and CUT yields an n-proof of yGz 3 from an n-proof of yRx+. Finally, Y’l-,yFx+ by (Wj). (2) It suffices to show that if 9’~,v0Fv,j, then SPt,xFy j. (It turns out that the converse can fail when x = y.) This can be easily done by imitating the proof of part (1).
2. Algebraic
semantics
1’) be an atomic semi-associative relation algebra Let%=(A,+;,-,O,l,;,“, (see 1.2), and let Mc “““At ‘% (i.e. M is a set of n-by-n matrices of atoms of a). M is an n-dimensional basis for ‘?I iff the following three conditions hold. EM and i, j, k