The algebra of conditional logic

23
Algebra Universalis, 27 (1990) 88-110 0002-5240/90/010088-23501.50 + 0.20/0 1990 Birkh~iuser Verlag, Basel The algebra of conditional logic FERNANDO GUZMAN AND CRAIG C. SQUIER Abstract. Conditional logic is the non-commutative reguiar extension of Boolean logm to 3 truth values; the third truth value stands for "undefined" or "non-terminating evaluation". In conditional logic, expressions are evaluated from left to right and evaluation stops as soon as the answer may be obtained. For example, "x and y" is false whenever x is false, undefined whenever x is undefined and takes the value of y whenever x is true. In this paper we study the variety generated by the 3-element algebra associated with conditional logic. We obtain the following results for this variety: a finite complete set of laws; a detailed description of free algebras as sets of ordered, rooted, labelled, binary trees; a representation theorem for the algebras in this variety, analogous to that for Boolean algebras and a recursive formula and an asymptotic approximation for the orders of the finitely-generated free algebras. In [10], Kleene introduced the notion of a "regular" extension of classical logic. For our purposes, a regular extension of an algebra A is obtained by adjoining a new element U (for "unknown", "undetermined" or "undefined") to A and extending the operations on A to A tO { U} in any manner allowed by a condition that we now describe. Let ~ be an n-ary operation on A and let al, a2, am be elements of A tO {U}. Define A(al, a2, . o , a,,) = ((bl, b2, . . . , bn) cA" l if ai cA, then bi = a~}. The extension/2 of # to A U {U} is required to satisfy the following condition: for all al, a2 ..... a, cA U {U}, /2(a~, a2 .... , an) must be U unless there exists c in A such that for all (bl, b2 .... , bn) in A(a~, a2,. , am), #(b~, b2, . . . , bn) = c, in which case ~(al, a2 ..... a,) is allowed to be c. (In other words, /~(al, a2, aN) must be U unless g is independent of the coordinates in which U occurs, in which case /2 is allowed to be the corresponding element of A.) Below, we will not distinguish notationally between g and #. For example, let B = {T, F} with ordinary negation ('), conjunction (A) and disjunction (v). Since T' 4= F' in B, the only choice for U' in B U { U} is U' = U. There are four regular extensions of A to B tO {U}. These are given by U A F = U Presented by Joel Berman. Received July 30, 1987 and in final form November 15, 1988. 88

Transcript of The algebra of conditional logic

Page 1: The algebra of conditional logic

Algebra Universalis, 27 (1990) 88-110 0002-5240/90/010088-23501.50 + 0.20/0 �9 1990 Birkh~iuser Verlag, Basel

The algebra of conditional logic

FERNANDO GUZMAN AND CRAIG C. SQUIER

Abstract. Conditional logic is the non-commutative reguiar extension of Boolean logm to 3 truth values; the third truth value stands for "undefined" or "non-terminating evaluation". In conditional logic, expressions are evaluated from left to right and evaluation stops as soon as the answer may be obtained. For example, "x and y" is false whenever x is false, undefined whenever x is undefined and takes the value of y whenever x is true.

In this paper we study the variety generated by the 3-element algebra associated with conditional logic. We obtain the following results for this variety: a finite complete set of laws; a detailed description of free algebras as sets of ordered, rooted, labelled, binary trees; a representation theorem for the algebras in this variety, analogous to that for Boolean algebras and a recursive formula and an asymptotic approximation for the orders of the finitely-generated free algebras.

In [10], K l e e n e i n t roduced the no t ion of a " r e g u l a r " ex tens ion of classical

logic. F o r our pu rposes , a r egu la r ex tens ion of an a lge b ra A is o b t a i n e d by

ad jo in ing a new e l e m e n t U (for " u n k n o w n " , " u n d e t e r m i n e d " o r " u n d e f i n e d " ) to

A and ex t end ing the ope ra t i ons on A to A tO { U} in any m a n n e r a l lowed by a

condi t ion tha t we now descr ibe . Le t ~ be an n -a ry o p e r a t i o n on A and let

a l , a2, �9 �9 �9 am be e l emen t s of A tO {U}. Def ine

A ( a l , a2, . o �9 , a, ,) = ( ( b l , b2 , . . . , bn ) c A " l if ai c A , then bi = a~}.

The ex tens ion /2 of # to A U {U} is r e q u i r e d to satisfy the fo l lowing cond i t ion : for

all a l , a2 . . . . . a , c A U {U}, /2(a~, a2 . . . . , an) mus t be U unless t h e r e exists c in

A such tha t for all (b l , b2 . . . . , bn) in A(a~, a2 , . �9 �9 , am), # ( b ~ , b 2 , . . . , b n ) = c , in

which case ~ ( a l , a2 . . . . . a , ) is a l l owed to be c. (In o t h e r words ,

/~(al, a2, �9 �9 �9 aN) mus t be U unless g is i n d e p e n d e n t of the c o o r d i n a t e s in which

U occurs , in which case /2 is a l lowed to be the c o r r e s p o n d i n g e l e m e n t of A . )

Below, we will not d is t inguish no ta t iona l ly b e t w e e n g and #.

F o r example , let B = {T, F} with o r d i n a r y nega t ion ( ' ) , con junc t i on ( A ) and

d is junct ion ( v ) . Since T ' 4= F ' in B, the on ly choice for U ' in B U { U} is U ' = U.

T h e r e are four regu la r ex tens ions of A to B tO {U}. These are given by U A F = U

Presented by Joel Berman. Received July 30, 1987 and in final form November 15, 1988.

88

Page 2: The algebra of conditional logic

Vol. 27, 1990 The algebra of conditional logic 89

or F and F /x U = U or F. (Note that U ^ T , T / x U a n d U A U m u s t all be U.) Similar remarks apply to v.

In [10], Kleene identified the "weak" extension of B (choose U whenever possible) and the "strong" extension of B (choose the element of B whenever possible). From the point-of-view of universal algebra, Kleene's weak logic (called "Bochvar system of logic" in [2]) is very well understood: a complete set of laws is known and the orders of the finitely-generated free algebras are known. See [15] and [16]. From the same point-of-view, Kleene's strong logic is less well understood. A complete set of laws is known (see [9] or [1]). The "arithmetic" in free algebras in the variety generated by Kleene's strong logic is also well understood (see [13] and [4]). But relatively little is known about the orders of the finitely-generated free algebras. We remark that questions about the order of the finitely-generated free algebras in the variety generated by Kleene's strong logic are similar to Dedekind's problem (see [5]).

Up to anti-isomorphism, there is a unique regular extension of B to a 3-valued logic with non-commutative A and v which satisfies deMorgan's laws x" = x and (x A y ) ' = x ' v y ' . Following [7], we call this algebra "conditional logic." Cond- itional logic was first studied by McCarthy [11] and [12]. It is the logic of choice in several programming languages (C, Prolog, Lisp . . . . ) in which the idea of "short circuit evaluation" is implemented. It leads to faster evaluation of the logical expression, since evaluation stops as soon as an answer can be obtained. It also allows the use of convenient expressions that lead to errors when weaker logics are used. For example, if X is an array indexed from 1 to n and P is a predicate, then, when i = n + 1, the expression

if 1 -- i - n and P(X[i]), t h e n . . .

leads to an error using ordinary logic. Our goal below is four-fold. First, we provide a complete set of laws for

conditional logic. Our proof proceeds by showing that the only subdirectly irreducible models of conditional logic are B and its given extension to a 3-valued logic. This gives our second goal: a "pairs of sets" model for interpretations of conditional logic. Our third goal is to give an explicit description of the free algebras associated to conditional logic. Our final goal is to say something about the orders of the finitely-generated free algebras. We are able to give a recursive formula and an asymptotic approximation for the orders. We are unable to give a closed formula.

Using our description of the free algebras associated to conditional logic (see Definitions (3.5) and (3.13) and Theorem (3.14) in Section 3), it can be shown that the variety of algebras generated by conditional logic does not have

Page 3: The algebra of conditional logic

90 FERNANDO GUZMAN AND CRAIG C. SQUIER ~kLGEBRA UNIV.

n-permutable congruences for any integer n > 1 and is not congruence modular. (These conditions are equivalent to the existence of certain ternary or quaternary "Mal'cev polynomials"; see, for example, condition (iii) of Theorem 2.2 and condition (iv) of Theorem 2.4 in [8]. Our description of the free algebras can be used to show that such polynomials do not exist in the free algebras associated to conditional logic.) In fact, Joel Berman [3] has pointed out to the authors that the type set of the variety of algebras generated by conditional logic is {5} (see [6]) and so, by Theorem 9.18 of [6], its congruence lattices satisfy no equations for lattices except those satisfied by all lattices.

The main difficulty in analyzing the algebra of conditional logic seems to be the fact that ^ and v are not commutative. In particular, ordinary lattice theory does seem to be very helpful. I n fact, the "natural" order on conditional logic seems to be U <- T and U -< F with T and F incomparable.

We remark that Kleene's weak logic can be interpreted in conditional logic and that conditional logic can be interpreted in Kleene's strong logic. To describe these results, let ^w and v w denote conjunction and disjunction in Kleene's weak logic: if x = U or y = U, then x ^ w Y = x v,, y = U. Similarly, let A and v denote the "left-dominant" conditional operations: for example, x e, y = x unless x = T, in which case x ^ y = y ; x v y is defined dually (see w In this situation, x^, , ,y = ( x A y ) v (y Ax); x vwy may be defined dually~ Next, let As and vs denote conjunction and disjunction in Kleene's strong logic: ^s and v , may be defined by identifying F, U and T with 0, �89 and 1, respectively, and letting ^s and v~ be ordinary rain and max, respectively. In this notation, x A y = x As(X' vsy) ; x v y may be defined dually. Kleene's weak logic, conditional logic and Kleene's strong logic (without constants) occur as #082# , #083# and #084# in Berman's catalogue [2] of 3-element algebras.

We remark that conditional logic has also been studied by Nagata, Nakanishi and Nishimura [14] and by Zaslavskii [17].

The authors would like to thank Fred Sullivan for suggesting that we work on the problem of determining the laws of conditional logic. He also discovered the examples in Section 1 that show the independence of some of the laws. The calculations in Section 4 were done in a MICROVAX II, using MACSYMA, with FPPREC = 64.

1. The algebra C and its laws

We study the 3-element algebra C = {T, F, U} with the operations x ~---~.x':C--~ C and (x, y) ~-~x ix y, x v y : C2--~ C given by the following tables:

Page 4: The algebra of conditional logic

VoL 27, 1990 The algebra of conditional logic 91

T

F

U

F T

T F

U U

T F U ~ T F U

T F U ! ] T T T

F F F T F U

U U U U U U

In this section, we will list some laws satisfied by C and will derive some consequences of these laws. We will also study properties of the individual elements of C.

The following proposition gives some laws satisfied by C as an algebra of type (1, 2 2) with operations ', ^ , and v. In Section 2 below, we will show that these laws are complete.

(1.1) LEMMA. C satisfies' the following laws:

a) x " = x .

b) (x ^ y ) ' = x ' v y ' . c) (x ^ y ) ^ z = x ^ ( y ^ z ) .

d) x A(y v z )=(x A y ) v ( x ^z) . e) (x vy ) a z = ( x ^ z ) v ( x ' A y Az). f) xv(x^y)=x. g) (xAy) v ( y A x ) = ( y A x ) v ( x A y ) .

Proof. Left to the reader.

By definition, a C-algebra will be an algebra of type (1, 2 z) with operations ', ^ and v which satisfies laws (1.1a-g). By Lemma (1.1), C is a C-algebra.

Laws (1.lab) imply that the variety of C-algebras satisfy a duality principle identical to one in ordinary Boolean algebra. In its weak form, the duality principle has the following consequence: if tl = t2 is a law satisfied by C-algebras, then so is the dual of tl -= t2 (obtained by interchanging ^ and v throughout). We have already made implicit use of the weak duality principle by not stating the duals of (1.1b-g). In this vein, we adopt the following notational convention: if, in our numbering system, (m. n) is a law satisfied by C-algebras, then (m. n)' will denote the dual of (m. n). The strong form of the duality principle (which we will not use) has the following consequence for C-algebras: if A is a C-algebra, then the function x ~ x' :A--~ A is an isomorphism from A (with operations ', ^ and v) to itself (with operations ', v and ^).

Throughout, we will take the associative laws (1.1c) and (1.1c)' for granted. We have already taken this luxury in the statement of (1.1e).

Page 5: The algebra of conditional logic

92 FERNANDO GUZMJ~N AND CRAIG C. SQU1ER ALGEBRA UNIV.

We remark that ^ and v are not commutative in C. (The unique failure of commutativity of ^ is F ^ U~: U ~, F.) We also remark that the ordinary right-distributive laws fail in C. (The unique failure of right-distributivity of a over v is (T v U) A F :/: (T ^ F) v (U ^ F).) Finally, we remark that every Boolean algebra is a C-algebra and that it will follow easily from what we do in Section 2 that the variety of C-algebras is a minimal cover of the variety of Boolean algebras.

In the usual axiomatic treatment of Boolean algebra, the absorption taw (1.1f) is a consequence of the other laws. To see that this does not hold for C-algebras, note that in every other law in (1.1), the same variables occur on both sides of the equality sign. The same remark will apply when we distinguish elements of C; see Lemma (1.4) below. We also remark that Kleene's weak logic satisfies all the laws in (1.1) except OAf).

We note that (1.1g) is independent of the other laws in (1.1). This can be seen by noting that (1.1g) is the only law that changes the leftmost variable. It can also be seen from the following example: adjoin /-/1 and /-]2 to B, define U'~ = U1 and U2 = U2, define x/x y = x unless x = T in which case x A y = y and define v using (1.lab).

To the best of our knowledge the laws in (1.1) are independent. We have already noted that laws (1.1f) and (1.1g) are independent of the other laws in (1.1). We remark that Kleene's strong logic satisfies all the laws in (1. i ) excep t

(1.1e). The following proposition consists of consequences of the laws (1.1) which will

be used in Section 2 to show that Lemma (1.1) contains a complete set of laws

for C.

(1.2) LEMMA. Every C-algebra satisfies the following taws:

a) x ^ x = x .

b) x ^ y = x A ( x ' v y ) .

Proof. Part a) follows from (1.1f) and (1.10' by a standard argument. For part b), we have

x ^ y = ( x A y ) ^ y )

=(x v (x ^y ) ) ^ (x' v y v (x Ay))

= x ^ (x' v y v ix ^y ) )

= (x/', x ' ) v (x ^ y ) v (x Ay)

= ( x ^ x ' ) v (x ^ y ) = x ^ (x' v y )

(1.2a)'

0 .1e ) '

(1.1f) (1.1d), (1.2a)

(1.2a)' (1.1d)

as required.

Page 6: The algebra of conditional logic

Vol. 27, 1990 The algebra of conditional logic 93

The next proposition contains further laws satisfied by C-algebras.

(1.3) LEMMA. Every C-algebra satisfies the following laws:

a) x v (x' ^ ~ ) = x . b) (x v x ' ) ^ y = ( x ^ y ) v (x' ^ y ) . c) (x v x ' ) ^ x =x.

Proof. For part a), use (1.2b)' and (1.2a)'. For part b), we have

(x v x ' ) Ay = (x ^y ) v (x' ^x ' ^y )

=(xA y) v(x' A y)

(1.1e)

(1.2a)'

For part c), use (1.3b), (1.2a) and (1.3a).

Next, we study the individual elements of C. After giving laws that these elements satisfy, we will derive some consequences of these laws.

(1.4) LEMMA. The elements U, T and F of C satisfy the following laws.

a) U ' = U . b) T A x = x . c) T ' = F .

Proof. By inspection.

Note that (1.4b) asserts that T is a left-identity for A in C. We will show that if A is a C-algebra and a ~ A is a left-identity for ^ , then a is a right-identity for ^ and a ' is a left-zero for A. Thus, a C-algebra has at most one left-identity. In Section 2, we will derive similar results about (l.4a): if A is a C-algebra and a ~ A satisfies a ' = a, then a is a left zero for A and v; a C-algebra has at most one element a which satisfies a ' = a; see (2.6). Here are the consequences of (1.4ab) that we will need in the next section.

(1.5) LEMMA. Let A be a C-algebra and assume that a ~ A is a left-identity for A. Then:

a) a' is a left-zero for A, and b) a is a right-identity for A.

In particular a is uniquely determined.

Proof. Let x cA. By hypothesis, a ' v x =x . Thus,

a' -- a' ^ (a' v x) (1. lf) '

= a ' AX

Page 7: The algebra of conditional logic

94 FERr~ANDO GUZMAN AND CRAIG C. SOUIER

which proves a). For b), we have

X = a A X

= (a v a ' ) A X

= (a AX) V (a' A x)

- - x v a'

as required.

ALGEBRA UNIV.

( a A X = X)

a) '

(1.3b)

9l / \ X =: X, a )

We will say that a C-algebra A "has T and F " provided some a 6 A is a left-identity for A ; in this situation, we will feel free to write T in place of a and F in place of a ' . It follows from Lemrna (1.5) that each C-algebra has at most one T and therefore at most one F. For later reference, we will prove one further property of T and F.

(1.6) LEMMA. Let A be a C-algebra with T and F and let x, y 6 A .

a) I f x v y = F, then x = F.

b) I f x v y = T , t h e n x v x ' = T .

Proof. For a), we have

X = X V F

= X V X v y

= x v y

= F

For b), we have

T : x v y

= x v (x ' A y )

= (X V X') A (X V y )

= (x v x ' ) A T

= X V X ~

(I.5b)'

(x v y = F )

(1.2a)'

(x vy =F)

(x v y = T )

(1.2b)'

( t . ld ) '

(x v y = T )

(1.5b)

as required.

Page 8: The algebra of conditional logic

Vol. 27, 1990 The algebra of conditional logic 95

2. The laws are complete

In this section, we will show that every C-algebra is a subalgebra of a direct

product of copies of C. It will follow that the laws (1.1) are a complete set of laws

for C. We will also discuss what happens when certain elements of C are

distinguished. Let A be a C-algebra and let a ~ A. Let 0a denote the equivalence relation

associated to the function a ~ a A X from A to itself: 0a = {(x, y) 6 A • A I a A X = a ^ y}. We will write xO~y to indicate (x, y) ~ 0a.

(2.1) L E M M A . Let A be a C-algebra and let a ~ A. Then:

a) 0~ is a congruence relation on A.

b) 0o n 0o, = 0ovo,.

Proof, If x, y, u, v c A sa t i s fy xOay and uO~v, it follows f rom (1.1d) that

(x v u)Oa(y v v). Also, if x, y c A satisfy XOay, it follows that a ' v x ' = a ' v y' , so that a A (a ' v x ' ) = a A (a ' v y ' ) . Using (1.2b), we conclude that x 'O,y ' . It

follows that if x, y, u, v c A satisfy xOay and uOav, then (x A u)O~(y A V). This

completes the proof of part a).

For part b), if a A X = a /x y and a ' A X = a ' A y, it follows from (1.3b) that

(a v a ' ) A X = (a v a ' ) A y which proves 0, n 0,, ~ O, va,. Since we will not need

the opposite inclusion, we omit its proof.

We make some remarks about the ' ex t reme ' possibilities for the congruences

0a. Given a C-algebra A, we let AA denote the trivial congruence on A: z~ A = {(X, X) IX E A}, Let a c A. It follows f rom (1.2a) that the function x ~ a A X

from A to itself is idempotent . We draw two conclusions f rom this fact. First,

0, = Ao if and only if a is a left-identity for A. (In this situation, A has T and F.)

Second, 0a = A • A if and only if a is a left-zero for ^ .

Our next goal is to show that if A is a C-algebra and a, b c A satisfy a ~ b,

then there is a C-algebra homomorph i sm f :A--+ C such that f (a ) 4:f(b) .

(2.2) L E M M A . Let A be a C-algebra and let a, b c A . I f aOab, aOa,b, bOba and bOb,a, then a = b.

Proof, Note first that

a = a v (a ' A a) (1.3a)

= a v (a' 1,, b) aOa,b

= a v b (1.2b) '

= (a A b) v (b ^ a) aOab, bOba, (1.2a)

Similarly, b = (b A a) v (a A b). Using (1.1g), it follows that a = b, as required.

Page 9: The algebra of conditional logic

96 FERNANDO GUZM.AN AND CRAIG C. SQUIER ALGEBRA UNIV.

The proof of Lemma (2.2) is the only time that we will use (1.1g). We will use (2.2) to find a non-trivial congruence on A that separates a and b whenever a 4: b and neither a nor b is T or F. To separate x e A - ( T, F} from T and F, we use the following lemma.

(2.3) LEMMA. Let A be a C-algebra with T and F. Suppose ~hag for every x e A - { T, F}, x v x ' 4: T. Define f :A ~ C by f ( T ) = T, f ( F ) = F and f ( x ) = U if x 4: T, F. Then f is a C-algebra homomorphisrn.

Proof. Clearly, if x e A, then f ( x ' ) = f ( x ) ' . To complete the proof, it suffices to show that if x, y e A , then f ( x v y ) = f ( x ) v f ( y ) . By (1.5b)', f ( T v y ) = f ( T ) v f ( y ) = T. By (1.5a)', f ( F v y ) = f ( F ) v f ( y ) = f ( y ) . To complete the proof, assume x e A - {T, F}. By (1.6a), x v y 4:F. From (1.6b) and x v x '4: T, we conclude that x v y 4 : T . It follows that f ( x v y ) = f ( x ) v f ( y ) = U, as required.

Let B denote the C-algebra (T, F} with the usual Boolean operations. An algebra A is called subdirectly irreducible provided there is a congruence ~ on A such that cp 4: AA, and if 0 4: AA is a congruence on A, then ~ _~ 0. See, for example, [1, p. 13].

(2.4) THEOREM. B and C are the only subdirectly irreducible C-algebras.

Proof. Since B and C are simple algebras, they are subdirectly irreducible. Assume that A is a subdirectly irreducible C-algebra. If A does not have T and F, it follows that for each a e A, 0a 4: AA. But (2.2) implies that f-'),a~A Oa = An, a contradiction. Thus we may assume that A has T and F. We may also assume that for each a e A - { T , F } , a v a ' 4 : T . (Otherwise, by (2.1b), OaOOa,~AA, a

contradiction.) In this situation, let 0 =f-'/,~A-(T~ 0, and let q~ denote the congruence associated to the homomorphism given by (2.3). Using (2.2) again, we conclude that q) N 0 = z~ A. Since 0 :~ An, we conclude that q~ = A A. It follows that A is a subalgebra of C, as required.

(2.5) COROLLARY. Every C-algebra is a subalgebra of a product of copies

of C.

Proof. By (2.4) and a theorem of Birkhoff (see [1, p. 14]), every C-algebra is a subdirect product of copies of B and C. Since B is a subalgebra of C, (2.5)

follows.

(2.6) COROLLARY. Let A be a C-algebra. If a ~ A satisfies a' = a, zhen a is a left-zero for /x and v. If, in addition, b ~ A satisfies b' = b, then b = a,

Proof. Both parts follow from the theorem, since they hold in C.

Page 10: The algebra of conditional logic

Vol. 27, 1990 The algebra of conditional logic 97

We will say that a C-algebra "has U" provided some a s A satisfies a ' = a; in this situation, we will feel free to write U in place of a.

(2.7) COROLLARY. (1.1) (and (1.4), when appropriate) contain a complete set of laws satisfied by C.

Proof. By (1.1) (and (1.4), when appropriate), C is a C-algebra. By (2.5), every C-algebra belongs to the variety generated by C, as required.

(2.8) C O R O L L A R Y . The variety of C-algebras & a minimal cover of the variety of Boolean algebras.

Proof. The theorem of Birkhoff cited in the proof of (2.5) implies that a variety is determined by its subdirectly irreducibles. Thus (2.8) follows easily from (2.4).

Corollary (2.5) leads to a representation of C-algebras as certain algebras of pairs of sets, which we now describe. If S is a set, let C(S) denote the C-algebra of all function from S to C under pointwise operations. In other words, C(S) is an S-indexed product of copies of C. To each element f:S---~ C of C(S), associate the ordered pair ( f -1(r) , f-1(F)) of subsets of S~ Note that f-I( t) and f - l (F) are disjoint. This gives a bijection between C(S) and the set of ordered pairs of disjoint subsets of S. It can be checked that the operations induced on these pairs of sets are given as follows:

(/1, e2)' = (/'2, el)

(P1, P2) ^ (Q!, Q2) = (P1 71 Q1, Pz tA (P1 N Q2))

(P1, P2) V (Qa, Q2) = (P, u (P2 n Q1), P2 f3 Q2)

with T = (S, •), F = (Q, S) and U = (0 , Q). It follows from (2.5) that for every C-algebra A, there is a set S such that A is isomorphic to a subalgebra of the C-algebra of all ordered pairs of disjoint subsets of S under the operations defined above. (We will refer to this "representation theorem" as the "pairs of sets" model for C-algebras.) We remark that S can be taken to be the set of all C-algebra homomorphisms from A to C. We remark that if the requirement that the pairs be disjoint is omitted, then the laws (1.1c-g) are no longer satisfied.

We conclude this section by showing how to formally adjoin T and F to a C-algebra A (even if A already has T and F). Let A = A U {T, F}, changing the name of the old T and F (if they exist). By (1.4c) and (1.1a), we must have T' = F and F ' = T in A. By (1.4b) and (1.5), we must have T A x = x , x A T = x and F/x x = F for each x ~ A. The value of x ^ F in A is determined by the following:

Page 11: The algebra of conditional logic

98 FERNANDO GUZMAN AND CRAIG C. SQUIER ALGEBRA UNIV.

(2.9) COROLLARY. Every C-algebra with T and F satisfies ~he law x A F = x A X '.

Proof. It is easy to check that this law holds in C. It follows from (2.5) that it holds in all C-algebras.

Having defined ' and /~ in fi~, use (1.1b) to define v. It can be checked that the laws (1.1) and, if appropriate, (1.4a) continue to be satisfied. This construction can also be justified using the "pairs of sets" model for C-algebras described above: given a subalgebra A of C(S), add a new element * to S, let T = (S U { * }, Q) and F = (•, S W { * }) and note that A U {T, F} is closed under ', A and v. We remark that the process of adjoining U is not so easy to describe.

Note that C arises by adjoining T and F to the 1-element C-algebra. We remark that the process of adjoining T and F to C-algebras shows that there exist C-algebras of every finite order, in contrast to the situation in Boolean algebra.

3. Free C-algebras

In this section, we will describe free C-algebras. There are several cases according to which elements of C are distinguished. Since the function x ~->x' interchanges T and F, there are four basic cases: no distinguished elements, U distinguished, T and F distinguished and all elements of C distinguished.

Using the process of adjoining T and F, it is easy to describe the free C-algebras when T and F are not distinguished in terms of the free algebras when T and F are distinguished: the latter arises from the former by adjoining T and F. To see this, let A be a C-algebra and let A denote the C-algebra (with T and F) obtained by adjoining T and F to A. Using (1.4bc), (1.5) and (2.9), we have the following: if A1 is a C-algebra with T and F and f :A-+A1 a C-algebra homomorphism, then there is a unique C-algebra homomorphism f:TI--~A~ which preserves T and F and whose restriction to A is f. Thus, if A is the free algebra on a set X in the variety of all C-algebras (or in the variety of all C-algebras with U), then A is the free algebra on X in the variety of ati C-algebras with T and F or with T, F and U. This follows from the fact that A has the required universal property.

Much of what we do will be independent of whether or not U is distinguished. We will treat the cases when U is distinguished either parenthetically or by using the phrase "when U is distinguished".

Our description of free C-algebras will be given in terms of a ternary operation F, which we define below. We will need some elementary properties of

Page 12: The algebra of conditional logic

Vol. 27, 1990 The algebra of conditional logic 99

the "standard model" of free C-algebras as subdirect products of copies of C. Our model of free C-algebras will consist of what we call "reduced trees", which are built out of constants and variables using a formal analogue of the ternary operation F. Our reduced trees are related to McCarthy's "generalized Boolean forms" (see p. 54 of [12]). We will conclude this section by deriving a crude upper bound for the orders of finitely-generated free C-algebras (which includes a sharp lower bound for the number of factors in a subdirect product representation of a finitely-generated free C-algebra).

a) The ternary operation F.

For reasons that will become clear, we write the first argument of F as a subscript and the second and third arguments using function notation. We remark that F~(p, q) should be viewed as a conditional "if x, then p, else q."

(3ol) DEFINITION. Let A be a C-algebra. If x, p, q c A , define Fx(p, q)= ( x A p ) v ( x ' Aq).

Here are the most important properties of the operation F.

(3.2) LEMMA. Every C-algebra satisfies the laws:

a) r~(p, q)' = rx(p', q'). b) F~(p, q) ^ r = F~(p /x r, q A r). c) F~(p, q) v r= Fx(p v r, q v r). d) F~(Fy(p, q), Fy(r, s)) = Fy(F~(p, r), Fx(q, s)).

(3.3) LEMMA. Every C-algebra with the indicated constants satisfies the following laws:

a) Fu(p, q)= U. b) F~(U, U) = U. c) C~(p, q)=p. d) FF(p, q) = q. e) F~(T, F) =x.

Proof. Proceed as in the proof of (2.9). (Hint: check (3.3) first and then check (3.2) by cases on x.)

b) The standard model of free C-algebras.

If X is a set, then C x will denote the set of all functions from X to C and, as in Section 2, C(C x) denotes the C-algebra of all functions from C x to C under pointwise operations. If x e X, we also let the symbol x denote the corresponding

Page 13: The algebra of conditional logic

100 FERNANDO GUZMAN AND CRAIG C. SQUIER ALGEBRA UNIV.

projection function: if f ~ C x, then x ( f ) =f (x ) . Viewing X as a subset of C(C x) under this identification, we let F(X) denote the C-subalgebra of C(C x) generated by X and the constant functions T, F (and U). Then F(X) is the free C-algebra on X.

We will need some endomorphisms of C(CX). If V is one of T, F or U and f ~ C x, we let f i x ~--V] denote the function g e C x defined by g(y) = f ( y ) i fy =/:x and g(x) = V. If t e C(cX), we define t[x ~ V] e C(C x) by

(t[x ~ V])(f) = t(f[x ~-- V]).

We record the following: if f e C x satisfies f (x ) = V, then t ( f) = (t[x <--V])(f). Note that if W e (T, F, U}, then W[x<---V]=W. Also, x[x~--V]= V and if y e X - { x } , then y[x,~--V] =y. We will need the following properties of the function t ~ t[x #-- V].

(3.4) LEMMA. Let x, y e X, let p, q e C(cX), let f e C x and let V be T or F. Then

a) Ix(p, q)(f) = Ff~x~(p(f), q(f)). b) Ix(p, q)[x ~ T] =p[x ~ T] and F~(p, q)[x ~F]=q[x e--Fl. c) lf y--/:x, then G(p, q)[x ~-V]= F~(p[x ~V], q[x ~V]). d) Ix(p, q)=Ix(p[x~--T], q[x ~ F]).

Proof. Part a) follows from the definition of Ix(p, q). Parts b) and c) follow from (3.3cd) using the fact that if t ~ t e is an endomorphism of c(cX) , then F~(p, q)e = Ix~(pe, qe). For part d), evaluate both sides at an arbitrary f e C x and consider the three cases x = T, F and U (in which cases, both sides simplify to p[x *-- T], q[x ~--F] and U, respectively).

c) Reduced trees and the algebra R(X).

We will view Fx(p, q) as a binary tree with root labelled x, left branch p and right branch q. An element of the free C-algebra on a set X will be an equivalence class of such trees, where p and q either have been previously defined or are one of T, F (or U). In order to define these trees precisely, we will use a formal ternary operation symbol Y and consider certain formal expressions involving % elements of X and T, F (and U).

(3.5) DEFINITION. Let X be a set. Reduced trees t on X and the variables X(t) ~_ X that they involve are defined recursively as follows:

a) T, F (and U) are reduced trees. If t is one of these trees, then X(t) = Q. b) Let x ~ X. If p and q are reduced trees on X and x r X ( p ) U X(q), then

~'x(P, q) is a reduced tree on X and X(yx(p, q)) = {x} U X ( p ) U X(q).

Page 14: The algebra of conditional logic

Vol. 27, 1990 The algebra of conditional logic 101

We let R ( X ) denote the set of all reduced trees on X. Elements of R ( X ) correspond to ordered, rooted, binary trees with internal vertices labelled by

elements of X and leaves labelled T, F (or U) such that repeated labels do not occur on any path from the root to a leaf. Alternately, R ( X ) can be viewed as a subset of the term algebra (no laws) involving the ternary operation 7, generators X and constants T, F (and U).

In order to define the operations ', ^ and v on R ( X ) , we introduce an analogue of the endomorphisms t ~ t[x ~-- V] defined on C(C x ) above.

(3.6) DEFINITION. Let X be a set, let x e X , let V e { T , F } and let t e R ( X ) . Define t[x *- V] recursively as follows:

a) If t is one of T, F (or U), then t[x <-- V ] = r

bl) If t = 7y(P, q) with y :#x, then t[x <---V] = yy(p[x <--- V], q[x ~--- V])

b2) If t = 7~(P, q), then t[x ~---T] = p and t[x *--F] =q.

The following can be easily proved by induction on r

(3.7) LEMMA. Let X be a set, let x, y ~ X with x --/:y, let V, W ~ {T, F} and let t ~ R ( X ) . Then

a) t[x ~-- V] is a reduced tree on X and X( t[x ~ V]) = X ( t ) - x. b) I f x ~ X( t ) , then t[x ~-- V] = t. c) t[x ~V][y ~Wl = t[y . - W l [ x ~ -v ] .

Here are the definitions of ', ^ , and v on R ( X ) .

(3.8) DEFINITION. Let X be a set, let tl, t ~ R ( X ) .

a) If tl is one of T, F (or U), then t;, t 1 A t and t I v t are defined in accordance with (1.4), (1.5a) and their duals.

b) If tl = )'x(P, q), we use the following:

7x(P, q ) ' = 7x(P', q ' )

Yx(P, q) ^ t= 7x(P ^ t[x ~-- T], q A t[x +--F])

7x(P, q) v t= 7~(P v t[x *-- T], q v t[x ~ F])

where, in each case, the arguments of 7x on the right hand side have been defined previously.

Using (3.7ac), the following are easy consequences of the definitions of ', ^ and v on R ( X ) .

Page 15: The algebra of conditional logic

102 ~RNANDO GUZMfilN AND CRAIG C. SQUIER ALGEBRA UNIV.

(3.9) LEMMA. Let X be a set, let q, t s R ( X ) , let x s X and tel" V e ( T, F}.

Then

a) t~, tl A t and t l v t all belong to R (X) . b) X(t;) = X( t l ) and both X ( q ,x t) and X( t l v t) are subsets of X ( t 0 U X(t) . c) The function t~--~t[x<--V] is a ', /x and v homomorphism from R(x) to

itself.

Next, we define a homomorphism CO from R ( X ) to c ( c X ) .

(3.10) DEFINITION. Let X be a set. The function q ) : R ( X ) - ~ C ( C x ) is defined recursively as follows:

a) CO(T), CO(F) (and cO(U)) are the corresponding constant functions in C(CX) .

b) q)(yx(p, q)) = ~(CO(p), CO(q)).

We will show that CO is a homomorphism onto the subalgebra F ( X ) of C(C x ) with kernel generated by the analogue of (3.2d) and (3.3b). First we need the following.

(3.11) LEMMA. Let X be a set, let x ~ X, let V e (T, F} and lee t ~ R ( X ) .

Then co(t[x ~ V]) = co(t)[x <-- V].

Pro@ Induct on t. If t is one of T, F (or U), then both sides evaluate to the corresponding constant function in c ( c X ) . If t = yy(p, q) with y 4=x, the lemma follows from (3.4b), using the inductive hypothesis and the definitions. Finally, if t = Yx(P, q), we have

co(t)[x ~-- T] = F~(CO(p), q~(q))[x <-- T]

= @(p)[x ~- T] (3.4b)

= co(p[x ~ TI)

= CO(p) (3.6b)

= co(t[x ~ V]) (3.5b2)

as required. (The first equality is the definition of q~ and the third equality is the inductive hypothesis.) A similar proof works for ~(t)[x <--FI.

(3.12) PROPOSITION. Let X be a set. Then 4) is a ~, A and v homomorphism from R ( X ) onto F(X) .

Page 16: The algebra of conditional logic

Vol. 27, 1990 The algebra of conditional logic 103

Pro@ It is an easy consequence of (3.2a) and properties of T, F and U that is a ' homomorphism. We show that q~(tl ^ t) = q~(fi) ^ q~(t) by induction on

ft. If tl is one of T, F (or U), this equality is an easy consequence of the properties of these elements and the corresponding constant functions in c(cX). If tl = y~(p, q), we have

a~(t~ ^ t) = 4~(7~(p ^ t[x ~ T], q A t[X ~ F I ) )

= F~(q'((p ^ t)[x ~ TI), q~((q A t )[x ~-F]) )

= I"~(q~(p ^ t)[x ~ T I , 4~(q ^ t)[x ~ F ] )

= r x ( ~ ( p ) ^ q'(t) , ~ ( q ) ^ ~ ( t ) )

= F ~ ( ~ ( p ) , ~ ( q ) ) ^ cl)(t)

= ~(t l ) A q~(t)

(3.7b)

(3.9b), (3.7b), (3.9c)

(3.10)

(3.4d)

(3.2b)

(3.9b)

as required. (The fourth equality also uses the inductive hypothesis.) A similar proof works for v. Finally, q~ maps R(X) onto F(X) since q~(yx(T,f))= F~(T, F) =x , by (3.3e).

We remark that q~ is not an isomorphism from R(X) onto F(X). (In fact, R(X) is not a C-algebra.) In order to understand the relationship between R(X) and F(X) more closely, we make the following:

(3.13) DEFINITION. Let X be a set. The relation - on R(X) is defined to be the smallest equivalence relation on R(X) that satisfies the following:

a) if x, y 6 X and p, q, r, s oR(X) satisfy x 4=y and x, y ~X(p ) UX(q) U X(r) U X(s), then Yx(Ty(P, q), 7y( r, s)) - 7y(Yx(P, r), 7x(q, s)).

b) if x c X and p, q, r, s ~ R(X) satisfy p - r , q - s and x r tAX(q) U X(r) U X(s), then y,(p, q) - yx(r, s).

c) when U is distinguished: if x e X, then 7x(U, U) - U.

Note that if tl and t 2 a r e reduced trees on X, it can be checked whether or not t~ - t2. We are ready to state the main result of this section.

(3.14) THEOREM. q~ induces an isomorphism from R(x)/-- onto F(X).

We first show that q~ induces a function from R ( X ) / - to F(X).

(3.15) LEMMA. Let X be a set and let tl, 6 o R ( X ) . If t l - t 2 , then q~(tl) = 4,(t:) .

Page 17: The algebra of conditional logic

104 FERNANDO GUZMAN AND CRAIG C. SQUIER ALGEBRA UNIV.

Proof. This follows from (3.2d) (and (3.3b) when U is distinguished).

Since q~ maps R ( X ) onto F(X) , to complete the proof of (3.14), it suffices to prove the converse of (3.15). We begin with the constants.

(3.16) LEMMA. Let X be a set, let x e X and let p, q, ~ e R ( X ) with x ~t X ( p ) tO X(q) .

a) if ~(Yx(P, q)) is a constant function, then 49(p) = q)(q) = U. b) if ~( t ) = T or F, then t = r or F, respectively. c) if q)(t) = U, then t - U.

Proof. For a), note first that by (3.3a) and (3.4a), if f e C x satisfies f ( x ) = U, then q~(y~(p, q ) ) ( f ) = U. It follows that if q)(y~(p, q)) is a constant function, then @(Yx(P, q)) = U. If q~(p) 4= U, then there exists f e C x such that q)(p) ( f ) --/= U. Defne g ~ C x by

g(y )={ fT (y ) if y e X - { x } , i f y =x .

Using (3.3c), it follows that ~(,/~(p, q ) ) ( g ) r U so that ~(Tx(P, q))4: U. It follows that q)(Yx(P, q)) is not a constant function. A similar argument works when 4~(q) 4: U, defining g(x) = F and using (3.3d).

Part b) is an easy consequence of part a). Part c) follows from part a) by recursive induction on t.

d) The undefining set of a reduced tree

We proved above that if t ~ R ( X ) satisfies @(t) = T, F or U, then ~ - F, F or U, respectively. In order to extend this result to more general values of q~(t), we need the following:

(3.17) DEFINITION. Let X be a set and let t ~ R (X). The undefining set U(t) of t is defined as follows:

U ( t ) = { x c X t 3 1 ) , q e R ( X ) with t - y ~ ( p , q ) } .

We have called U(t) the undefimng set of t because it satisfies the following property: x ~ U(t) if and only if for all f c C x, if f ( x ) = U, then ~ ( t ) ( f ) = U. Here are the important properties of the undefining set.

Page 18: The algebra of conditional logic

Vol. 27, 1990 The algebra of conditional logic 105

(3.18) LEMMA. Let X be a non-empty set, let x e X and let p, q, t, tl,

t2 R(X) with x X(p) u X(q).

a) U(y,(p, q)) = {x} U (U(p) N U(q)). b) U(t) = Q if and only if t is T or F. c) if t, ~ t2, then U(tl) = U(t2). d) if ,P( t , ) = then U(tO = U(t2).

Proof. The inclusion _~ in part a) follows from the definition of - . The other inclusion (which we will not need) can be proved by induction. For the " if" in part b), note that it follows from (3.15) and (3.16b) that if t - T or F, then t = T or F, respectively, so U(t) T- Q. For the converse, note that if t is not T or F, then either t is of the form y~(p, q) or t is U. In the second case, we have t ~ yx(U, U) for some (in fact, any) x e X since X is non-empty. In both cases, U(t) 4= Q. Part c) follows from the fact that ~ is an equivalence relation.

For part d), we will prove that if q~(tl) = q~(t2), then U(tl) ~_ U(t2) by recursive induction on t2. If t2 is T or F, use (3.16b). If t2 is U, use (3.16c) and part b). Finally, assume t2 = 7y(r, s) and let x e U(tl). If x = y, then x e U(t2), as required. I f x 4:y, then there exist p, q ~ R ( X ) so that tl - Yx(P, q). Then

�9 (r) = ~(t2[y +-- V]) (3.5b2)

= ~(t2)[y ~-- T] (3.10)

= 45(tl)[y ~-- T]

= ~(Tx(P[Y <-- T], q[y ~ T]) (3.10), (3.6bl)

By the inductive hypothesis U(y , (p[y ~---T], q[y ~--T]))_c U(r) so that, by part a), x e U(r). A similar argument shows that x e U(s). By part a) again, we conclude that x E U(t2), as required.

Proof of (3.14). As noted following (3.15), it suffices to prove that if 49(tO = q~(t2), then tl ~ t2. We prove this by induction on tl. If t~ is one of T, F or U, use (3.16bc). If q is y~(p, q), then, by (3.18d), we have x e U(t2). Thus there exist r, s e R ( X ) so that t 2 ~ y , ( r , s ) . By (3.15), we have q)(y~(p, q ) ) = q~(y~(r, s)). Using (3.6b2) and (3.11), we get q~(p)= q)(r) and q)(q)= ~(s). By the inductive hypothesis, p ~ r and q ~s . It follows that t l ~ t 2 , as re- quired.

In Section 4, we will need the following consequence of the proof of (3.14).

(3.19) COROLLARY. Let X be a set, let x e X and let p, q, r, s e R ( X ) satisfy x r X ( p ) U X ( q ) U X ( r ) U X(s) . I f gx(P, q) ~ yx(r, s), then p ~ r and q ~ s.

Proof. Assume y,(p, q) ~ y,(r, s). By (3.15), we have ~(g~(p, q)) = (b(y~(r, s)). It follows from the proof of (3.14) that p - r and q - s , as required.

Page 19: The algebra of conditional logic

106 FERNANDO GUZMAN AND CRAIG C. SQU1ER ALGEBRA UNIV.

In the next section, we will derive recursive and asymptotic formulae for the cardinality of F(X) when X is finite. We conclude this section with an observation that makes it clear that the obvious upper bound 3 3" (when X has cardinality n) is

entirely too large. Here is the observation:

(3.20) PROPOSITION. Let tl, t2 E F(X) . I f tl 4: t2, then there exists f ~ C x such that q ( f ) 4= tz(f) and {x e X I f (x) = U} has cardinality at most 1.

Proof. We begin with some special cases. If one of tl or t2 is U (so that the other is not U), note that if t 4= U, then there exists f :X ~ { T, F} such that t ( f ) 4= U. From now on, we will assume that neither tl nor tz is U, so that, in particular, U(q) and U(t2) are both finite.

The case when U(tl)4= O(t2) is an easy consequence of the following obser- vation: if x c X and t e F (X) satisfy x q~ U(t), then there exists f : X - + C such

that f ( X - {x}) c {T, F} and t ( f ) 4= U. If U(q) = U(t2) = •, then one of tl or t2 is T and the other is F. This follows

from (3.18b) and tl 4= t2. The general case follows by induction on the cardinality of X ( q ) t3 X(t2) under

the assumption that U(t~) = U(tz) 4= Q. Choose x ~ U(q) = U(t2). It follows that there exist p~, q~, P2, q2 E F(X) with x ~ X ( p l ) U X(p2) U X(q l ) U X(q2) such

that tl = Fx(p~, qO and t 2 = l~x(P2, q2)- Since t~ 4= t2, either p~ 4:P2 or ql =/= q2- If pl4=p2, by the inductive hypothesis, there exist f l : X - { x } - - ~ C such that

Pl(J]) v~pz(fl) and {y e X - {x} t f l(Y) = U} has cardinality at most 1. Extend f t o X by f ( x ) = T. The proof when ql v~ q2 is similar, using f ( x ) = F.

It can be shown that the set of all f e C x which satisfy the condition in (3.20) is the unique minimal subset of C x which separates elements of F(X) . (In

particular, if f e C ( X ) satisfies the condition in (3.20), then there exists

t~ 4=t2 ~ F(X) such that if g e C(X) satisfies fi(g) 4= tz(g), then g = f . ) We remark that if follows from (3.20) that if X is finite of cardinality n, then

F(X) has order at most 22~ "z~ ' when U is not distinguished and at most 3 z"+"z" ~ when U is distinguished. In the next section, we will obtain much better bounds

for the order of F(X) .

4. The cardinality of F(X)

Let X be a finite set of cardinality n. When T and F (only) are distinguished, we let fn denote the cardinality of F(X). When T, F and U are distinguished, we let gn denote the cardinality of F(X). Many of our arguments will refer simultaneously to fn and gn; in these arguments, we will use the symbol h~ to refer

to fn or gn-

Page 20: The algebra of conditional logic

Vol. 27, 1990 The algebra of conditional logic 107

(4.1) LEMMA. Let Y be a subset of X of cardinality k and let U(X; Y) = 2 ~ {t e F(X) ] U(t) ~_ Y}. Then U(X; Y) has cardinality h,-k.

Proof. If Y = ;~, then U(X; Y)= F(X) which has cardinality h,. If Y4:• , choose y e Y. It follows that

U(X; Y ) = {Fy(p, q)IP, q e U ( X - {y}; Y - {y})}.

(4.1) follows by induction on k, using (3.19).

(4.2) THEOREM. f 0 = 2 and go=3. For n>O, let h~ hk =g~ (O<-k<-n). Then

=fk (0 <-k<-n) or

hn = 2 + ( - 1 ) ,_~. k = l k

Proof. If n = 0, then fn and gn count the number of distinguished elements which is 2 and 3, respectively. For n > 0, note that {T, F} = {t ~ F(X) I U(I) = G~}, which accounts for the " 2 + " in (4.2). The summation in (4.2) arises by counting (t e F(X) IU(t ) ~aQ} using (4.1) and the inclusion-exclusion principle.

The following table lists f , and gn for 0-< n -< 5 and, for technical reasons, ( n - 1 2 )fn and (n - 1)g] for 1 -< n --- 4.

n L (n 1 - - ) f ~

2 6 58 6462 105783730 39780675932043318

0 3364 83514888 33570592598138700

n gn (n - 1)g 2

3 11 163 42347 3751991875 42984317797208367563

0 26569 3586536818 42232329090198046875

Page 21: The algebra of conditional logic

108 FERNANDO GUZM~,N AND CRAIG C. SOUIER ALGEBRA UNIV.

(4.3) LEMMA. Let n >- 1 and let h~ =f~ (k = n or n + 1) or hk =gk (k = n or

n + 1). Then

(n - 1)h ] <- h,+i <- (n + 1)he,.

Proof. We use the fact that the partial sums in the inclusion-exclusion principle are alternately too high and too low. For the upper bound on h,+l, this gives h~+l -< 2 + (n + 1)hZ~. Since n >- 1, it can be checked that the " 2 + " can be

ignored. For the lower bound, we will prove: if n---4 and h~+x > - ( n - 1)h], then

2 h~+2 >-nhn+v Using the inclusion-exclusion principle, we have

hn+ 2 ~ (n q- 2)h2+, - �89 + 2)(n + 1)h 4

- ( n +2)had+l - (n +2 ) (n + 1) h2+, 2(n - 1) 2

where the second inequality uses h~ <-hn+~/(n - 1). Since n >-4, it follows that

n + 2 (n + 2)(n + l) ~ n 2(n - 1) 2

2 so that hn+ 2 ~ nhn+~, as required. The proof that hn+ ~ >- (n - ! ) h i when t -< n -< 4 is contained in the tables above.

(4.4) LEMMA. Assume {hn}n>_ 2 is a sequence of positive real numbers which

satisfies the inequalities in (4.3). I f there exist positive real numbers A and B such that

1 1 - - A 2n <-hn <- B 2" n - 1 n + 2

it follows that

1A2.+~<h~+ 1 1 n n + 3 '

Proof. For the lower bound, we have

h , , + ~ > ( n _ l ) h ~ > _ - 1 A 2 " ~ > ! A 2 .... n - 1 n

Page 22: The algebra of conditional logic

Vol. 27, 1990 The algebra of conditional logic 109

as required. For the upper bound, we have

n + 1 2-+' 1 B2.+1 h"+l<-(n+l)h]<-(n+2)2B < n + 3

as required.

In the situation of (4.4), for n->2, we define An = ( ( n - 1 ) h n ) 1/2" and B. = ((n + 2)h.) ~/2~ Note that An < B..

(4.5) LEMMA. The sequence {An} is strictly increasing, the sequence {B.} is strictly decreasing and limn~= An = limn~= B,.

Proof. Since AZ~ - 1) = hn = B]~ + 2), it follows from (4.4) that

1 2n+l 1 2n+l

from which we conclude that An < An+l and that Bn+ 1% Bn. To conclude that the limits are equal, note that

( K ) (n-1~'/2~ lim A, = lira \ ~ - ~ / = 1.

In the situation of (4.4) and (4.5), let c~ = litany= An = lim . . . . Bn.

(4.6) T H E O R E M . hn - 1 a~2 n. n

Proof. This follows from

n - 1 A 2 " _ ( n - 1 ) h " < ( n - 1 ) h . < ( n - 1 ) h n

n + 2 B~" B]" c~ 2~ A 2" .

To ten decimal places, for the sequence {fn}, o~ = 3.4892848811 and for the sequence {g,}, a~ = 4.3345669774.

REFERENCES

[1] BALBES, R. and DWINGER, P., "Distributive Lattices," University of Missouri Press, Columbia, Missouri, 1974.

Page 23: The algebra of conditional logic

110 FERNANDO GUZMAN AND CRAIG C. SQUIER ALGEBRA UNIV.

[2] BERMAN, J., Free spectra of 3-element algebras, in "Universal Algebra and Lattice Theory," (edited by Freese, R. and Garcia, O.), Springer Lecture Notes in Mathematics 1004, 1983.

[3] BERMAN, J., Personal communication (June, 1988). [4] BERMAN, J. and MUKAIDONO, M., Enumerating fuzzy switching functions and free Kleene

algebras, Comp. and Maths with Appls. 10 (1984), 25-35. [5] EPSTEIN, G. and LIu, Y., Positive multiple-valued switching functions- an extension of

Dedekmd's problem, Proc. 12-th ISMVL, IEEE Paris (1982). [6] HOBBY, D. and McKENZlE, R., "The Structure of Finite Algebras," AMS Contemporary

Mathematics 76, 1988. [7] GRIES, D., "The Science of Programming," Springer-Verlag, New York, 1981. [8] JONSSON, B., Congruence varieties, Algebra Universalis 10 (1980), 355-394. [9] KALMAN, J., Lattices with involution, Trans. Am. Math. Soc. 87 (1958), 485-491.

[10] KLEENE, S., "Introduction to Metamathematics," Van Nostrand, New York, 1952. [11] McCARTHY, J., Predicate calculus with "undefined" as a truth value, Stanford Artificial

Intelligence Project Memo I (1963). [12] MCCARTHY, J., A basis for a mathematical theory of computation, in "Computer Programming

and Formal Systems," (edited by Braffort, P. and Hirschberg, D.), North-Holland, Amsterdam, 1963, pp. 33-70.

[13] MUKAIDONO, M., Some kinds of functional completeness of ternary logic, 10-th ISMVL, IEEE, Evanston, Illinois (1980).

[14] NAGATA, M., NAKANISHI, M. and NISHIMURA, T., Implementation of Lukasiewicz's, Kleene's and McCarthy's 3-valued logic, Sci. Rep. Tokyo Kyoiku Daigaku Sect. A 13 no. 347-365, 90-100 (1975).

[15] PLONKA, J., On equational classes of abstract algebras defined by regular equations, Fund. Math. 64 (1969), 241-247.

[16] PLONKA, J., On free algebras and algebraic decompositions of algebras from some equational classes defined by regular equations, Algebra Universalis 1 (1971), 261-264,

[17] ZASLAVSKn, I., Realization of three-valued logical functions by means of recursive and Turing operators (Russian), in "Studies in the Theory of Algorithms and Mathematical Logic," Nauka~ Moscow, 1979, pp. 52-61.

Department of Mathematical Sciences, State University of New York, Binghamton, New York, U.S.A.