10
Flmdamellta Inforlnaticae XI ( 1988) 209-2 J 8 North-Hol/alld 209 per- earch LOGIC PROGRAMMING ON A TOPOLOGICAL BILATTICE stant -439. tween 12th Melvin FITTING Department of Mathematics and Computer Science: Herbert ll. Lehman College (CUNY). Bronx. NY 10468 Department of Computer Science: Department of Philosophy: The Graduate School and Unirersity Center (CUNY). 33 West 42 Street. New York. NY 10036 Bitnet MLFLC@CUNYV1t e and MFCS )ased 1atik lons, Received October 1987 Accepted December 1987 ,d on We investigate the semantics of logic programming using a generalized space of truth values. These truth values may be thought of as evidences for and against - possibly incomplete or contradictory. The truth value spaces we use essentially have the strucmre of M. GinSberg'S bilattices, and arise from topological spaces. The simplest example is a four·valued logic, previously investigated by N. Belrop. The theory of this special case properly contains that developed in earlier research by the author, on logic programming using Kleene's three-valued logic. " 1. INTRODUCTION Logic programming has generally, though not exclusively, been done in the context of two-valued Classical logic. In [3)(and also [6))we argued that a three-valued generalization might be better, allowing for undefined as well as true and lalu. See also (12), [13J and (14). Undefined ought to be taken into account because of the possibility of infinite regress inherent in logic - or any - programming. More recently we bega.n exploring the utility of adding a fourth truth value, overdefined, to allow for inconsistencies in logic programs. It turns out the semantic techniques of (3) extend readily to the four-valued setting and we can treat programs which are inconsistent but which still may contain useful information provided we 'stay a,vay from' the inconsistent parts. This four-valued logic was introduced to Computer Science in [2J, a paper which we strongly recommend. That it applies to logic programming was noted independently by the author and in [8). Further, in [7) we showed that one can even make good operational and denotational sense of logic programming with a Heyting algebra as the space of truth values. It is possible to think of the elements of the Heyting algebra as being the 'justifications' for statements, rather than just an indication of their truth or falsity. It is a reasonable question, then, what is common to all these generalizations of logic programming? M. Ginsberg's notion of bilattice ([9) and (10)) provides a framework in which this question can be addressed. Indeed, it provides a nice conceptual setting for many notions connected with default logic, and database theory as well. But we find the version of negation that he uses too restrictive, and some of the other machinery too weak. ''lYeleave for another time an abstract formalization of a bilattice generalization that is suitable for our purposes. Instead we work with a concretely defined class of examples, arising from topological spaces, which in tum can be thought of as arising from I<ripke Intuitionistic models. These can be treated uniformly, and provide a common generalization of the various logic programming extensions discussed above. * Research supported in part by NSF grant CCR-8702307 and by PSC-CUNY grant 667295. © 1988; Polish Mathematical Society Supplied by The British Library - "The world's knowledge" I

Bilat Topo

Embed Size (px)

DESCRIPTION

ff

Citation preview

Page 1: Bilat Topo

Flmdamellta Inforlnaticae XI (1988) 209-2 J 8North-Hol/alld 209

per-earch LOGIC PROGRAMMING ON A TOPOLOGICAL BILATTICE

stant-439.tween12th

Melvin FITTINGDepartment of Mathematics and Computer Science:Herbert ll. Lehman College (CUNY). Bronx. NY 10468Department of Computer Science: Department of Philosophy:The Graduate School and Unirersity Center (CUNY).33 West 42 Street. New York. NY 10036Bitnet MLFLC@CUNYV1t

e andMFCS

)ased1atik

lons, Received October 1987Accepted December 1987,d on

We investigate the semantics of logic programming using a generalized space of truth values. These truthvalues may be thought of as evidences for and against - possibly incomplete or contradictory. The truthvalue spaces we use essentially have the strucmre of M. GinSberg'S bilattices, and arise from topologicalspaces. The simplest example is a four·valued logic, previously investigated by N. Belrop. The theory ofthis special case properly contains that developed in earlier research by the author, on logic programming

using Kleene's three-valued logic.

"

1. INTRODUCTIONLogic programming has generally, though not exclusively, been done in the context of

two-valued Classical logic. In [3)(and also [6))we argued that a three-valued generalizationmight be better, allowing for undefined as well as true and lalu. See also (12), [13J and(14). Undefined ought to be taken into account because of the possibility of infinite regressinherent in logic - or any - programming. More recently we bega.n exploring the utility ofadding a fourth truth value, overdefined, to allow for inconsistencies in logic programs. Itturns out the semantic techniques of (3) extend readily to the four-valued setting and wecan treat programs which are inconsistent but which still may contain useful informationprovided we 'stay a,vay from' the inconsistent parts. This four-valued logicwas introducedto Computer Science in [2J, a paper which westrongly recommend. That it applies to logicprogramming was noted independently by the author and in [8).

Further, in [7) we showed that one can even make good operational and denotationalsense of logic programming with a Heyting algebra as the space of truth values. It ispossible to think of the elements of the Heyting algebra as being the 'justifications' forstatements, rather than just an indication of their truth or falsity.

It is a reasonable question, then, what is common to all these generalizations of logicprogramming? M. Ginsberg's notion of bilattice ([9) and (10)) provides a framework inwhich this question can be addressed. Indeed, it provides a nice conceptual setting formany notions connected with default logic, and database theory as well. But we findthe version of negation that he uses too restrictive, and some of the other machinery tooweak. ''lYeleave for another time an abstract formalization of a bilattice generalizationthat is suitable for our purposes. Instead we work with a concretely defined class ofexamples, arising from topological spaces, which in tum can be thought of as arising fromI<ripke Intuitionistic models. These can be treated uniformly, and provide a commongeneralization of the various logic programming extensions discussed above.

* Research supported in part by NSF grant CCR-8702307 and by PSC-CUNY grant 667295.

© 1988; Polish Mathematical Society

Supplied by The British Library - "The world's knowledge"

I

Page 2: Bilat Topo

(

210 M. Fitting / Logic Programming

.""

F~:follo,Jx to 'J.Tl,Kripklchan~:based!.'

Un

larg!totsetVS

!'/

Supplied by The Brit-is-h-L-ib-r-ary---"T-h-e-w-or-Id-'S-kn-o-W-Ie-d-g-e-"---------~

2. MOTIVATIONThe following is meant to be suggestive only. Suppose we have a I(ripke Intuitionistic

logic model, K [1l]. Then a topological space can be associated naturally with K: thedomain D is the set of possible worlds of K, and a subset 0 of D is called open if it isclosed under the accessibility relation of K. This topological space, in tum, gives rise tothe Heyting algebra of its open sets, and there are well-known relationships between thisalgebra and the Kripke model K with which we began. At any rate, it is the topologicalspace that concerns us now.

For any proposition P, the set of worlds of K in which P holds is a set closed under theaccessibility relation of K, hence an open set of D. Dually, the set of worlds of K in whichP fails will be a closed set. We might think of the set of worlds in which a propositionholds as a measure of our belief in that proposition: the larger the set, the stronger ourbelief. Likewise the set of worlds in which a proposition fails can be taken to reflect ourdisbelief. Thus, ideally, corresponding to a proposition P we could associate an orderedpair (0, G), where 0 is the set of possible worlds in which P holds (an open set), and C isthe set of possible worlds in which P fails (a closed set), and 0 and C are complementarysets. This pair is an exact depiction of our beliefs for and against the proposition P.

In general, though, our information may be less than perfect. \Ve may not know howP behaves in all worlds. Of course, if we know that P holds in some possible world, wealso know it holds in any world accessible from it, so the set of worlds in which we know Pholds will be open, though it may be smaller than the set of all worlds in which P holds.Similarly for the worlds in which P fails. Thus, in 'real life' we may have to settle fora pair (0, C) where 0 and C do not, between them, exhaust all possible worlds. Evenworse, information we have may be erroneous, leading us to the pair (0, C) where 0 andG overlap! So, adopting a generous viewpoint, we will take as our 'truth-values' all pairs(0, C) whatsoever, subject only to the conditions that 0 be open and C be closed.

Next, following (9) and [101, we define two natural partial orderings on these 'truth-values'. The first is the knowledge or k-ordering: our knowledge has increased if our degreeof belief, or our degree of disbelief, or both, have gone up. The second is the truth or t-ordering: the 'degree' of truth has increased if our degree of belief has gone up, or ourdegree of disbelief has gone down, or both. It turns out that these orderings are intimatelyconnected with each other. We consider them formally starting in the next section.

3. TOPOLOGICAL BILATTICESLet D be a topological space, fixed for this section. All our definitions are relative to

it. We introduce several constructs in this section, based on D. The resulting collectionof sets and relations constitutes what we loosely term a topological bilattice. An exactdefinition will not be needed.

"

Definition. A D truth value is a pair (0, C) where 0 is open and C is closed. We writeT(D) for the space ofD truth values. A D truth value is:

1)overdefincd if 0 n G =1= 0,2) consistent if 0 n C = 0,3) exact HOnG = 0 and 0 UC = D.

Definition, We define two partial orderings on the family T(D):1) the knowledge order: (O),C)) ~k (Oz,Cz) if 0) ~ O2 and C) ~ C2•

2) the truth order: (OhCl) ~t (Ol,C2) if 0) ~ O2 andG2 ~ C1•

We give diagrams of the two simplest topological bilattices. The. first, Figure 1, arisesfrom the one-world model whose only world is a. It is the bilattice of Classical logic, sincethe one-world Kripke models are essentially the Classical models. It is also fundamental inthe sense that an isomorphic copy of it occurs as part of every bilattice. The logic arisingfrom this bilattice was extensively investigated in [2].

Page 3: Bilat Topo

mistic~: the )f it islse ton thisogical

~r theivhichsit ion,r ourtour:lered[ Cisntary

. how1, we'JwP.olds.e forEven, andpairs

,'uth-'greeor t-our

ltely

'e totionx:act

'rite

isesncelin;ing

M. Fitting / Logic Programming 211

~

Figure 1.

Figure 1 is essentially a double Hasse diagram, and is intended to be read in thefollowing way. A path uphill from x to y indicates that x 5k y; a path to the right fromx to y indicates that x 5, y. This convention applies throughout the paper.

The second-example, Figure 2, is the topological bilattice deriving from 'a two-worldKripke model, with worlds a and b, such that b is accessible from a but not conversely. Bychanging the accessibility relation but not the set of worlds, other topological bilatticesbased on the same set of worlds can result.

k

({a,b}. (a,b)

/ ".({b). (a,bD <Sa,b), {at>

/"'/'\(0, (a,bt> qb), {aD <Sa,b}, 0)

'\/"'/(0, {a~ ({b), 0)" /(0,0)

!;1j!!I'I11'IIIIiII

;I1 ~.:[I'dII:1

)

"Figure 2.

Now we look at the properties of the space T(D) under the knowledge and the truthorderings separately, then together, and finally we introduce a weak notion of negation.

Under the truth order:T(D) is a complete lattice. The smallest element is (0, D), which we denote lalJe; the

largest element is (D,0), which we denote true. Note that falJe indicates no belief, buttotal disbelief, while true is the dual. We denote the least upper bound of a non-emptyset S in this ordering by V S, and the greatest lower bound by /\ S. It is easy to see thatV S = (O,C), where 0 = UfO I (O,C) E S} and C = n{C I (O,C) E S}. Also, /\S =

Supplied by The British Library - "The world's knowledge"

Page 4: Bilat Topo

.-"'~...........

212 M. Fittillg / Logic Programming

(O, C), where 0 = interiorn{O I (a, C) E S} and C = closureU{C 1(0, C) E S}. Notethat if S is finite, the interior and closure operations are not needed. We also use thenotation a V b for V {a, b}, and a 1\ b for 1\{a, b}. T(D) is a distributive lattice as well.

Of course the family T(D) is closed under the operations V and 1\, but a momentswork will show that so are the family of consistent truth values and the family of exacttruth values, Thus, each of these is a complete, distributive lattice. In fact, the family ofexact truth ....alues is isomorphic to the family of open subsets of D, and hence is even aHeyting algebra.

Under tbe knowledge order:Again T(D) is a complete lattice. This time the smallest element is (0,0), which we

denote .L; the largest element is (D, D), which we denote T . .L indicates neither belief nordisbelief, while T is simultaneous total belief and total disbelief. Wedenote the least upperbound of a non-empty set S in the knowledge ordering by L: S, and the greatest lowerbound by nS. And now, L:S = (O,C), where 0 = U{O I (O,C) ES} and C = closureU{C I (O,C) E S}; and nS = (O,C), where 0 = interiorn{O I (O,C) E S} andC = n{C I (O,C) E S}. We use the notation a+b for L:{a,b}, and a X b for n{a,b}.T(D) is a distributive lattice under this ordering as well,

The family of exact truth values is never closed under + or x. For example, true andjal.Je are exact, but true + lalu. = T and true X lal.Je = .L, neither of which is exact.Thefamily of consistent truth values is closed under n, and Wlder directed L:, and soconstitutes what is sometimes called a complete semi-lattice.

In terconnections:Of course, if a ~k a' and b ~l: b' then a + b ~'" a' + b'. This is a trivial consequence

of T(D) being a lattice under ~l:. But more surprisingly, if a ~t a' and b ~t b' thena + b ~t a' + b'. More generally, suppose that for A, B ~ T(D) we use A ~t B to mean:for each a E A there is some b E B with a ~t b, and for each b E B there is some a E Awith a ~t b. Then A ~f B implies EA ~t EB. In fact, each of the two lattice orderingsrespects the meet and join of the other. In [9Jand (10) this was taken as one of the definingproperties of the abstract notion of bilattice.

The features in the preceeding paragraph are the interconnections we will need in thispaper. But there are others, notably distributive laws. Each of the four operations +, x,V and 1\ is distributive over the others. This played no role in the definition of bilattice inGinsberg's work.

Negation:We define negation on members of T(D) in a straightfonvard way. RougWy, the idea

is to reverse the roles of belief and of disbelief, but we must also respect the topologicalmechanism.

"

Definition, .,{O, C} = (interior C, closure 0).

The family of all truth values is closed under negation, and so are the families ofconsistent, and of exact truth values.

If a ~t b then .,b ~f "a. But also, if a ~l: b then "a $", .,b. (If we know more aboutb than about a, we also know more about its negation than we do about the negation ofa.) These were also among the defining conditions for.the abstract notion of bilattice inGinsberg's work.

Finally, though we will not need it in what follows, we also have a ~t ""a, whichmeans our negation is something like that of Intuitionistic logic. This is weaker than whatwas assumed in Ginsberg's version, which postulated that ""a = a.

Supplied by The British Library - "The world's knowledge"

Page 5: Bilat Topo

M. Fitting / Logic Programmillg 213

. NotelSetherell.lInents:'exactnilyofeven a

ich weiefnorupperlower

'osurc} and{a, b}.

:e andexact..nd so

uencethen

nean:1 E A!ringsfining

[l this+, x,ice in

~idea)gical

:es of

Ibouton of.ce in

~hichwhat

4. LOGICFormulas in a first-order language may be assigned truth values in T(D) in two ways,

since we could naturally associate logical conjunction and disjunction with the mcct andjoin operations of the ~k or of the ~, ordering. We use the truth ordering here. The roleof the operations arising from the knowledge ordering will be considered in a subsequentpaper.

Let M be a non-empty set. By L(M) we mean the first-order language whose termsare variables and members of M, and in which formulas are built up using /\, V, .." V and3 in the usual \vay. We are going to think of quantifiers in this language as being over M,and we will assign members of T(D) as truth values.

Definition. An interpretation is a mapping from closed atomic formulas. of L(M) toT(D). Ifv and w are interpretations, we write v ~1: w provided V(A)::;k weAl for every

. closed atomic formula A. Similarly for v ~, w.

Interpretations can be extended to maps from all closed formulas to T(D), valuations.\Ve use the same notation for an interpretation and for its valuation extension. Formally,we have the following.Definition. Let v be an interpretation. v is extended to all formulas using the following:

v(X /\l':}= veX) /\ v(Y)vex V Y) = veX) V v(Y)v(..,X) = ..,v(X)v«Vx).p(x» = J\{v(¢(m)) 1m E M}v«(3x).p(x» = V{v(¢(m» 1m EM}.

Proposition 4-1. Let X be a closed formula ofL(M), and let v and w be interpretations.Then

1) v ::;k w implies v(X) ::;1: w(X);2) v::;, w implies veX) ~, w(X), provided X does not contain any negations.

Proof. Item 2) follows immediately because the operations of a lattice are monotone withrespect to the lattice ordering. Item 1) makes use of the fact that the operations associatedwith the truth ordering are respected by the knowledge ordering, and also of the fact thatthe knowledge ordering respects negation.

5. KRIPKE MODELS, GENERALIZEDWe give a simple generalization of Kripke Intuitionistic logic models that allows partial

or conflicting information. This generalization is then related with the valuations in topo-logical bilattices that we have been considering. We confine things to the propositionalcase, because the fit between Kripke and topological models for intuitionistic logic is nota good one where the universal quantifier is concerned. This arises from the feature ofKripke models that allows different possible worlds to have different domains of quantifi-cation. But the propositional case should be sufficient to illustrate the naturalness of thevaluation rules we have been using.

A (propositional) Kripke Intuitionistic model is a triple (g, n, 1=) where 9 is a non-empty set (of possible worlds), n is a transitive, reflexive relation on 9 (of accessibility),and 1= is a relation between possible worlds and propositional atomic formulas meetingthe condition that, for any world rEg, if r 1= A and rn.6. then .6.FA.

Given a Kripke model (g, 17.,1=), the relation 1= is extended to all propositionalformulasusing the conditions:

r 1= (X /\ Y) {=} r 1= X and r 1= Y

Supplied by The British Library - "The world's knowledge"

Page 6: Bilat Topo

.~

214 M. Fitting I Logic Programming

r F (X V Y) ¢::} r F X or r F Yr F ..,X ¢::} for every tl. with rntl.,

tl.f6Xr F (X:::> Y) ¢::} for every tl. with rntl.,

tl.FX:::}tl.FY

In a Kripke model, if r F A and rntl., then tl. F A, where A is atomic, It is easilyshown by induction on formula complexity that this extends to all formulas. Since we havenot been taking:::> into account in earlier sections, we will not consider it further here,though we note that the work below extends naturally to incorporate it.

In any Kripke model, at a world r, some formulas will hold, others will not. Weintroduce some notation that will allow us to state facts of this sort directly. For thispurpose we use signed formulas, expressions of the forms TX and FX, where X is aformula and T and F are two new symbols. \Ve write:

r F TX forr FXr F F X for r f6 X

Then the general properties of this extended notation follow easily from the conditionssatisfiedby·Kripke models stated above.

r F T(X 1\ Y) {::::> r F TX and r F TYr F F(X 1\ Y) {::::> r F FX or r F FY

r F T(XVY) {::::> r F TX or r F TYr F F(X V Y) {::::> r F F X and r F FY

r F T-,X {::::> for every tl. with rntl., tl. F F Xr F F-,X {::::> for some tl. with rntl., tl. F T X

r F TX =} for every tl. with rn6, tl. F TXtl. F F X =} for every r with rn6, r F F X

exactly one ofr F TX and r F FX

"

These conditions can be thought of as saying under what circumstances (in whatworlds) we have positive information and under what circumstances we have negativeinformation. Further, we can take these conditions as basic, and forget the original Kripkemodel conditions that gave rise to them. Now, it is the final condition above that requiresconsistency and completeness in our information. At no world can we ever have both T Xand FX, though we must have one of them. Suppose we drop this condition, thus allowinginformation to be inconsistent or incomplete.

Definition. A weak Kripke model is a structure {Q,n,l=} that meets all the signed for-mula conditions stated above, except possibly the final one.

Let (9, n, F} be a weak Kripke model. As sketched in §2; we can associate a topologicalspace with a Kripke structure: in this case the set of points is 9, and a set is topologicallyopen if it is closed under the n relation. Then a topological bilattice can be associatedwith this space. Further, we define a valuation as follows. For each atomic formula A,set v(A) = (O,C} where 0 = {r E 9 I r 1= TA} and C = {r E 9 I r F FA}. Thisinterpretation then extends to all formulas in the usual way. The principle fact about theresulting map is the following.

Supplied by The British Library - "The world's knowledge"

a

pr

10tris,

!,

aco:

T,

D

r,

"

vh.a

it

p

Page 7: Bilat Topo

easilye have. here,

'. WeIr this( is a

itions

whatativeripkeuiresTX

wing

, for-

sical:ally!l.ted~ A,rhisthe

M. Fitting / Logic Programming 215

Proposition 5-1. For any propositional formula X, veX) := (O, C) where °= {f E g If FTX} and C = {f E g IfF FX}.

We omit the proof of this. It says that the evaluation of truth values in this topo-logical bilattice cari be thought of as corresponding to evaluation in a Kripke model, buttreating positive and negative information as if each came from different sources, and thusis independent of the other.

Finally we observe that, for one-world weak Kripke models, the conditions requiredabove essentially collapse to those of saturated sets in (3) or [4] that are not required to beconsistent or complete.

6. PROGRAMSWe present a logic programming language that generalizes Horn clause programming.

, The choice of underlying data structure is left open; in this we follow (5). And of coursewe allow truth values in T(D), a topological bilattice.

Definition, A data structure is a tuple {M; R}, ... , Rn} where M is a non-empty setand R1, ••• , Rn are relations on M, called the given relations of the data structure.

From now on we assume that a unique relation symbol Ri has been associated witheach given..r:ejation Ri of the data structure {M;RI>'" ,Rn}. We refer to these relationsymbols as reserved, and think of them as repreSenting the given relations.

Definition. A definition of the n place relation symbol P is an expression of the formP(Xl,'" ,xn) +- F(xlt ... , xn), where the body, F(Xl,"" xn), is any fonnula of L(M)whose free variables are among Xl>"" xn• A program is a finite set of definitions suchthat no relation symbol has more than one definition, and no definition is for a reservedrelation symbol. A program is positive ifno definition body contains a negation symbol.

Conventional Horn clause programs are a special case of the programs defined above.Horn clause bodies can be taken to be conjunctions; multiple Horn clauses containing thesame relation symbol in the head can be combined using disjunction; and free variablesin bodies that do not appear in heads can be thought of as existentially quantified. Notevery program in our sense corresponds to a Horn clause, however.

Definition. An interpretation v from the language L(M) to the topologic~l bilattice T(D)is said to be in the data structure {M; Rb ... ,Rn} provided, for each i = 1, ... , n, v(R;) =Ri.Definition, v is a model for a program P in the data structure {M; Rl, ••• ,Rn} providedv is an interpretation in this data structure and, for each n-place relation symbol P: if Phas no definition in P then v(P(ab' .. ,an» = !ahe for each at, ... ,an E M; and if P hasa definition P(Xlt , xn) +- F(Xl' . '" xn) in P, then for each all" .,an E M, v(P(alt... , an» = v(F(a17 , an)}.

Thus a model is a valuation that assigns instances of definition heads the same valuesit assigns to their bodies. The condition covering relation symbols without- definitions isrelated to the idea of negation as failure. It would also be reasonable to take the 'default'value to be .L in this case, though doing so would affect several key results below.

The problem now is to show that models exist, and that among them there is a sim-plest. or course the word 'simplest' can be given a meaning with respect to either theknowledge ordering or the truth ordering. In what follows we consider both possibilities,and establish relationships between them. For this purpose, we associate an operator witheach program, mapping interpretations to interpretations. \Ve denote this operator by <P.It is a generalization of the T operator of [1].

Supplied by The British Library - "The world's knowledge"

Page 8: Bilat Topo

216 M. Fitting I Logic Programmillg

Definition. Let P be a program and (M; R), ... , Rn} be a data structure. <pp is themap on interpretations given by the following conditions: for any interpretation v, <pp(v)is the interpretatioll w such tllat

1) if Rj is a reserved relation symbol, w(Rj) = Rj;2) if P is an unreserved relation symbol, with definition P(xJ, ... , xn) +- F(xI, ... , xn)

in program P, then foraI, ... ,an EM, w(P(a}, ... ,an» = v(F(a}, ,an»i3) if P is neither reserved nor has a definition in P then w(P( aI, , an» = lab e.

It is easy to see that the models of a program P are exactly the fixed points of <Pp. Sofrom now on we concentrate on the behavior of <Pp. The key result is the following, whichfollows immediately from Proposition 4-1. We omit a detailed proof.

Proposition 6-1. For an arbitrary program P, <pp is monotone with respect to the ~k

ordering and, ifP is positive, <pp is monotone with respect to the ~I ordering.

T(D) is a complete lattice with respect to both knowledge and truth orderings. Sincethe family of all maps from a set to a complete lattice yields another complete lattice usingthe induced pointwise ordering on the maps, then the family of interpretations becomesa complete lattice under both the ~k and the ~I orderings. Then it follows from theKnaster-Tarski Theorem that <pp always has a smallest and a greatest fued point in theknowledge.ordering, and also does in the truth ordering provided program P is positive.

In §3 we defined notions of exact and consistent for truth values. These are extendedpointwise to interpretations. Thus we call an interpretation v exact if it assigns to eachclosed atomic formula an exact truth value. Similarly for consistent.

Proposition 6-2. The least fixed point of<pp in the knowledge ordering is consistent.

Proof, The least fixed point of a monotone operator in a complete lattice can be 'con-structed' as the limit of a transfinite sequence in the following way. The initial term of thesequence is the smallest member of the lattice. The a + 1'1 term is the result of applyingthe monotone operator to the alh term. And at limit ordinals we take the least upperbound of the family of earlier terms (which will constitute a chain).

In the lattice of interpretations under the ~k ordering, the smallest member is theinterpretation that maps every closed atomic formula to .l, which is a consistent inter-pretation, We noted in §3 that the family of consistent truth values \vas closed under 1\,V, 1\, V and ...,. It follows that <Ppapplied to a consistent interpretation yields anotherconsistent interpretation. Finally, again in §3, we observed that the family of consistenttruth values \vas closed under directed }:. It follows that the lub, in the ~k ordering, ofa chain of consistent interpretations is another consistent interpretation.

Then, by transfinite induction, the least fixed point of !J>pmust be a consistent inter-pretation.

Proposition 6-3, Suppose P is a positive program. Then both the least and the greatestfixed points of!J>p in the ~, ordering must be exact.

Proof, The argument that the smallest fixed point is exact is similar to that of Proposition6-2. Now, of course, we need to use the closure of the family of exact truth values under1\, V, 1\ and V, The smallest interpretation in the truth ordering is the one that mapsevery closed atomic formula to laue, which is an exact interpretation.

The argument to establish the assertion concerning the greatest fixed point is duaLThis time we use a transfinite sequence of interpretations that begins with the biggest, andcomes down to a fixed point, rather than starting with the smallest and working upward.The biggest interpretation now is the one that maps every closed atomic formula to true,which is exact. And the rest of the argument dualizes in a similar, straightforward manner.

Supplied by The British Library - "The world's knowledge"

I~

oper~and Ipropprogesta~

poin~I

S!

a fix~i."ProatoJvalu~Pro·valu~l

VI;; ::;~c~nsiSmc .

clai~lf:

imp.1iagatl)clai-~

~~:~i'assocorde",Ialu

Jnot clprogrico

Page 9: Bilat Topo

p is the" <Pp(v)

<Pp. So;, which

the :5k

:. Since:eusingecomes:lm the,in thesitive.tended:0 each

.tent.

e 'con-.ofthe,plyingupper

is theinter-der 11.,lother;istentng, of

inter-

eatest

sit ionIlUdermaps

dual., and,yard.true,nner.

•M. Fittillg / Logic Programming 217

For the rest of this section let P be a fixed positive program wilh <Pp the correspondingoperator. Let Vt and Vt be the least and greatest fixed points of <Pp in the :5t ordering,and let VI; be the least fixed point of <pp in the :5k ordering. Then, by the preceedingpropositions, Vt and Vi are exact, and Vk is consistent, and each of these is a model for theprogram P. There are some simple relationships between these models which are easy toestablish.

Since Vk is the smallest fixed point in the :5k ordering, and both Vt and Vi are fixedpoints, then Vk :5k Vt and Vk :5k Vt·

Since V, is the smallest and Vi is the biggest fixed point in the :5t ordering, and Uk isa fixed point, then Vt :5t VI; ~t Vt·

Proposition 6-4. Let Vt, Vt and Vk be as above. Then VI; and Vt giv'e the same closed. atomic formulas tIle value true, and Vk and Vt give the same closed atomic formulas thevalue false.

Proof, Let A be a closed atomic formula. Since Vt :St Vk, and true is the largest truthvalue in the ~t ordering, vtCA) = true implies vk(A) = true. In the other direction, sinceVk :Sk Vt then vk(A) = true implies true ~k vt(A). It is easy to see that no exact, or evenconsistent truth value can be strictly above an exact truth value in the knowledge order.Since true iifexact and Vt is exact, it follows that vl(A) = true. This establishes the firstclaim.

Since Vk :S, Vi, and la&c is the smallest truth value in the ~t ordering, Vi(A) == fa13eimplies vk(A) = false. Further, since Vk ~k tilt tlk(A) = la13e implies lalse :5k Vi(A). Butagain, Vt is exact, so if false ~k Vt(A) then fa13e = Vi{A). This establishes the secondclaim.

The simplest bilattice, arising from a one-world or Classical Kripke model, was shownearlier as Figure 1. We repeat it as Figure 3, but without the inessentials due to Kripkemodels shown. Instead we only notate items by their role in the bilattice. The four-valuedlogic depicted in Figure 3 was examined in detail in [2].

In Figure 3 the only exact truth values are false and true, those of conventional two-valued Classical logic. Also the only consistent truth values are la13e, true and .L, and theoperations on these corresponding to the truth ordering are those of Kleene's three-valuedlogic, which was the logic used in [3). Since Vt and Vi must be exact, Proposition 6-4completely determines their characteristics for this bilaHice. This result was essentiallyestablished in §7 of (3J.

Conventional logic programming can be considered to be working with the sublogic ofthis four-valued logic consisting of exact truth values, namely lalse and true. Further, theordering used is :St; if there is nothing in a program to force an atomic formula to be true,then the default is false. Proposition 6-3 then says why only the Classical two truth valuesarise for logic programming without negation.

In (3) we used Kleene's three-valued logic, whlch amounts to working with just theconsistent truth values of the four-valued logic above. The key innovation of that paper,though we did not think of it in these terms at the time, was to use the logical operationsassociated with the truth ordering, but take least fixed points with respect to the knowledgeordering. Proposition 6-2 accounts for why this approach never got us beyond a three-valued logic. ,-

Just as negation moves us from a two to a three valued logic, truth values that arenot consistent can arise naturally if more general constructs are allowed in writing logicprograms. For example, suppose a logic program is distributed over two sites which do notcommunicate. If I issue the query Q and one site responds true while the other responds

Supplied by The British Library - "The world's knowledge"

- ...;.-

lit.

Page 10: Bilat Topo

i

J:11,!

Supplied by The British Library - "The world's knowledge" l

218 M. Fitting I Logic Progralllllling

false

k

.L

~

Figure S.

jalJc, how am I to merge these answers? One possibility is to accept both, thus assigningQ the value T, or overdefined. Another possibility is to insist on consensus, and so inthis case-assign Q the value .1 or undefined. These informal actions correspond to thebilattice operations + and x. It is reasonable then, to consider extensions of conventionallogic programming languages that allow such operations. But this is a topic for furtherresearch.

REFERENCES[1] Apt, KR. and Van Emden, M.H., Contributions to the theory oflogic programming,J. Assoc. Comput. Mach., 29 (1982), 841-862.[2] Belnal, N.D. Jr., A useful four-valued logic, in Modern Uses of Multjple Valued Logic,J. M. Dunn, J.M. and Epstein, G. (cds.), Reidel (1977), Dordrecht, 8-37.(3) Fitting, M., A Kripke-Kleene semantics for logic programs, Journal of Logic Program-ming, 2 (1985),295-312.(4)Fitting, M., Notes on the mathematical aspects of Kripke's theory of truth, Notre DameJ. of Formal Logic, 27 (1986) 75-88.[5) Fitting, M., Computability Theory, Semantics, and Logic Programming, OxfordUniversity Press, New York (1987).[6) Fitting, M., Partial models and logic programming, Theoretical Computer Science, 48(1987) 229-255.[7] Fitting, M., Pseudo-Boolean valued Prolog, forthcoming in Studia Logica.[8) Foo, N.Y. and Rao, A.S., Open world and closed world negations, manuscript (1987).(9) Ginsberg, M., Multi-valued Logics, technical report 86-29 KSL, Stanford University(1986).(10) Ginsberg, M., Multi-Valued logics, Proc. AAAI-86, fifth national conference on arti-ficial intelligence, (1986),243-247, Morgan Kaufmann, Los Altos, CA.[11]Kripke, S., Semantical analysis of intuitionistic logic I, in Fonnal systems and recursivefunctions, (1963), 92-130, North-Holland, Amsterdam,[12) Kunen, K, Negation in logic programming, K. Kunen, J. of Logic Programming, 4(1987), 289-308. -.[13) Lassez, J.1. and Maher, M.J., Optimal Hxcdpoints of logic programs, TheoreticalComputer Science, 39 (1985), 15-25.[14)Mycroft, A., Logic programs and many-valued logic, Pmc. first STACS Coni. (1983).