On the Declarative and Procedural Semantics of ... - Semantic Scholar

10 downloads 0 Views 390KB Size Report
closed world assumption, Moore's autoepistemic logic and Reiter's default the- ...... Michael Gelfond, Jean Louis Lassez, Vladimir Lifschitz, John McCarthy, Jack ...
On the Declarative and Procedural Semantics of Logic Programs Teodor C. Przymusinski December 15, 1987 (Revised March 3, 1995)

Abstract

One of the most important and dicult problems in logic programming is the problem of nding a suitable declarative or intended semantics for logic programs. The importance of this problem stems from the declarative character of logic programming, whereas its diculty can be largely attributed to the non-monotonic character of the negation operator used in logic programs. The problem can therefore be viewed as the problem of nding a suitable formalization of the type of non-monotonic reasoning used in logic programming. In this paper we introduce a semantics of logic programs based on the class PERF(P) of all, not necessarily Herbrand, perfect models of a program P and we show that the proposed semantics is not only natural but it also combines many of the desirable features of previous approaches, at the same time eliminating some of their drawbacks. For a positive program P, the class PERF(P) of perfect models coincides with the class MIN(P) of all minimal models of P. The perfect model semantics is shown to be equivalent to the semantics of McCarthy's circumscription and is also equivalent to the remaining three major formalizations of non-monotonic reasoning in arti cial intelligence { Reiter's closed world assumption, Moore's autoepistemic logic and Reiter's default theory { thus establishing a closer link between the areas of logic programming and non-monotonic reasoning. We also de ne a generalization of SLD-resolution, called SLS-resolution and we prove that SLS-resolution is sound and complete with respect to the perfect model semantics.

The article appeared in the Journal of Automated Reasoning 5(1989), 167-205. Address: Department of Mathematics, University of Texas at El Paso, El Paso, TX 79968. E-mail: teodor%[email protected] 

1

Contents 1 2 3 4

Introduction Notation and de nitions Declarative vs. procedural semantics A discussion of declarative semantics

4.1 Clark's completion : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4.2 The least Herbrand model semantics : : : : : : : : : : : : : : : : : :

7 10

5 6 7 A

Minimal model semantics for positive programs Perfect model semantics for general programs Procedural semantics Appendix: Remaining proofs

12 16 24 31

A.1 A.2 A.3 A.4 A.5

Proof of Theorem 6.4 : : : : : : : : Proof of Proposition 6.1 : : : : : : Proof of Theorem 6.6 : : : : : : : : Proof of Theorems 7.1, 7.2 and 7.3 Proof of Theorem 7.4 : : : : : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

: : : : :

2 4 6 7

32 33 33 34 38

1 Introduction Logic programming introduced to computer science the important concept of declarative { as opposed to procedural { programming, based on mathematical logic. Logic programs, however, do not use logical negation, but instead rely on a non-monotonic operator { often referred to as negation as failure. As a result, the problem of nding a suitable declarative or intended semantics for logic programs is one of the most important and dicult problems in logic programming and is frequently discussed in the literature (see e.g. [S], [S2], [S3], [JLM], [C], [R], [R2], [LM], [K], [ABW], [VG], [L], [N], [BH], [P], [GPP], [GMN], [E], [Mi], [F], [G]). Due to the non-monotonic character of the negation operator, this problem, however, can be viewed as the problem of nding a suitable formalization of the type of non-monotonic reasoning used in logic programming. In spite of the close relationship between non-monotonic reasoning and logic programming, the two research areas seem to be developing largely in parallel rather than in tandem and there is not as much interaction between the two elds as one would expect. One possible explanation of this phenomenon is the fact that, traditionally, the declarative semantics of logic programming has been based on the non-monotonic 2

formalism, developed by Clark [C], and called Clark's completion (see [Ld]). Clark's formalism is based on a very intuitive and useful idea of constructing the completion of a program P by essentially replacing the `if' statements in P by suitable `i ' statements. Unfortunately, Clark's formalism is not suciently general to be applied beyond the realm of logic programming and therefore does not play a major role in formalizing general non-monotonic reasoning in AI. In addition, Clark's semantics is considered by many researchers to be too weak and has some other important drawbacks often discussed in the literature (see e.g. [S],[S2],[S3]). In this paper we describe a semantics based on the class PERF(P) of all perfect { not necessarily Herbrand { models of a program P. This approach leads to a natural intended semantics of logic programs, which is shown to combine many desirable features of previously de ned semantics, at the same time eliminating some of their drawbacks. Our results are an outgrowth of an earlier work on strati ed logic programs initiated by Apt, Blair and Walker [ABW] and by Van Gelder [VG]. We rst consider the class of positive logic programs and conclude that the wellknown least Herbrand model semantics (see [VEK]) has an important drawback { which we call the universal query problem { caused by the fact that only Herbrand models of P are considered. We show that the universal query problem can be eliminated by considering the class MIN(P) of all minimal models of P rather than just the unique minimal Herbrand model of P. We demonstrate that the so de ned semantics retains the advantages of the least Herbrand model semantics and { while eliminating the universal query problem { is still equivalent to the least model semantics for existential queries. Next, we address the problem of extending the minimal model semantics to the class of general logic programs. In [ABW] Apt, Blair and Walker and { independently { Van Gelder [VG] (see also Chandra and Harel [CH] and Naqvi [N]) introduced the class of strati ed logic programs, de ned a unique `natural' Herbrand model MP of a strati ed logic program and argued that this model should represent the intended semantics of such programs. T.Przymusinski [P] introduced the class of perfect Herbrand models of a logic program and showed that every strati ed logic program has exactly one such model, which coincides with the `natural' model MP . However, basing the semantics of general logic programs on the unique perfect Herbrand model causes the same diculties as those discussed above in connection with the universal query problem. We show that these diculties can be eliminated by extending the notion of a Herbrand perfect model of a general logic program onto the class of all, not necessarily Herbrand, models and by considering the semantics determined by the class PERF(P) of all perfect models of a general logic program P. We demonstrate, that for a positive program P, the class PERF(P) of perfect models coincides with the class MIN(P) of minimal models of P, so that the perfect model semantics is a generalization of the minimal model semantics. Moreover, for an important class of existential queries the perfect model semantics is equivalent to the semantics generated by the unique perfect Herbrand model MP . The perfect model semantics also has a natural extension onto the class of disjunctive deductive 3

databases (see [P]). It is easily seen that the minimal model semantics is equivalent to the semantics of McCarthy's parallel circumscription (see [Mc],[Mc2],[L2] and [Mi2]) and we show that the perfect model semantics proposed in this paper is equivalent to the semantics of McCarthy's prioritized circumscription. Moreover, it can be shown that the perfect model semantics is also equivalent to the remaining three major formalizations of non-monotonic reasoning: Reiter's default theory, Moore's autoepistemic logic and Reiter's closed world assumption (see [P3]). These results establish a closer link between logic programming and non-monotonic reasoning and underscore the naturality of the proposed semantics. Relating logic programming more closely to non-monotonic reasoning has been suggested before in the literature (see e.g. [GMN]). Addressing the problem of procedural semantics, we show that { for positive programs { standard SLD-resolution with negation as failure is sound and complete with respect to the minimal model semantics. Moreover, we de ne the so called SLSresolution (Linear resolution with Selection function for Strati ed programs) and we show that { for non- oundering queries { SLS-resolution is sound and complete with respect to the perfect model semantics. SLS-resolution is a natural generalization of SLD-resolution (Linear resolution with Selection function for De nite programs) from the class of positive (de nite) programs onto the class of strati ed programs. Since SLS-resolution is a more powerful procedural mechanism than SLDNF-resolution, the latter is always sound with respect to the perfect model semantics. For an extension of results obtained in this paper onto the so called well-founded semantics, see [P4] and [P5].

2 Notation and de nitions By a general logic program or just a program P we mean a nite set of universally quanti ed clauses of the form A L1 ; : : : ; L m where m0, A is an atom and Li are positive or negative literals (see [Ld]). If all literals in all clauses are positive, then we say that the program is positive (or de nite). The alphabet of a program P consists of all the constant, predicate and function symbols that appear in P, a countably in nite set of variable symbols and the usual punctuation symbols, connectives (:; ^; _) and quanti ers (9; 8). We assume that the equality predicate = does not appear in P and if P does not contain any constants, then one is added to the alphabet. The language of P consists of all the well-formed formulae of the so obtained rst order theory. A formula is called positive if it does not contain the negation symbol :. The Herbrand base of P is the set of all ground atoms of the theory. Following PROLOG's convention, names of variables are capitalized, functions, constants and predicates are written in lower case and in program clauses commas are used instead of ^. Constants are identi ed with functions of arity zero. For a 4

formula F, by 9(F) (resp. 8(F)) we denote the existential (resp. universal) closure of F. By a general query or just a query Q we mean a conjunction of literals of the form

L1 ; : : : ; Lm where m  0 and Li 's are literals. If all literals are positive then the query is called positive. A universally (resp. existentially) quanti ed query will be called a universal (resp. existential) query. By Clark's Equational Theory of P (CET(P)) (see [K]), we mean the theory P augmented with the equality predicate = and the following set of universally quanti ed axioms, called CET axioms:

CET1. CET2. CET3. CET4. f;

X =X ; X =Y )Y =X ; X = Y ^ Y = Z ) X = Z; X1 = Y1 ^ : : : ^ Xm = Ym ) f (X1; : : : ; Xm) = f (Y1; : : : ; Ym); for a function

CET5. X1 = Y1 ^ : : : ^ Xm = Ym ) (p(X1 ; : : : ; Xm ) ) p(Y1; : : : ; Ym)); for a predicate p;

CET6. f (X1; : : : ; Xm ) 6= g(Y1; : : : ; Yn); for any two di erent function symbols f and g;

CET7. f (X1; : : : ; Xm ) = f (Y1; : : : ; Ym) ) X1 = Y1 ^ : : : ^ Xm = Ym; for any function f;

CET8. t[X ] 6= X; for any term t[X ] di erent from X, but containing X. The rst ve axioms describe the usual equality axioms and the remaining three axioms are called unique names axioms or freeness axioms. The signi cance of these axioms to logic programming is widely recognized (see [Ld],[S2],[S3],[LT],[K]) and is a consequence of the important role of uni cation in logic programming and the following lemma due to Clark [C] :

Lemma 2.1 Suppose that t1 and t2 are two terms. Then t1 and t2 are uni able () CET j= 9(t1 = t2 ) t1 and t2 are not uni able () CET j= 8(t1 6= t2 ): 2

5

Throughout this paper we assume that CET axioms are satis ed, i.e. instead of considering the theory P itself we consider its extension CET (P ) = P + CET . The equality axioms (CET1) { (CET5) ensure that we can always assume that the equality predicate = is interpreted as identity in all models of CET(P). As a result, models of CET(P) can be identi ed with precisely those models of P in which the equality predicate { when interpreted as identity { satis es the unique names axioms (CET6) { (CET8). This means that models of CET(P) can simply be viewed as a subclass of the class of all models of P. Since Herbrand models of P { with equality interpreted as identity { always satisfy the axioms (CET6) { (CET(8), we can identify them with Herbrand models of CET(P). In view of the above and in order to simplify the exposition, we will continue to talk about models of P instead of { more precisely { models of CET(P). We also assume that all the discussed formulae and queries do not contain the equality symbol. We do not assume any domain closure axioms. Domain closure axioms combined with unique names axioms tend to reduce the entire theory to a propositional case, which is a very strong restriction unacceptable for many applications (see [GPP2,GPP3]). Herbrand interpretations of P are as usual identi ed with subsets of the Herbrand base. If M and N are two models of P with the same universe and the same interpretation of functions (and constants) then we say that M  N, if the extension of every predicate in M is contained in its extension in N. A model N of P is called minimal if there is no distinct from N model M of P such that M  N. It follows from well-known results [BS] that for every model M of P there is a minimal model N of P such that N  M. It is easy to see, that M is a minimal model of CET(P) i it is a minimal model of P and a model of CET(P). For every positive logic program P there exists exactly one minimal Herbrand model MP , which is called the least Herbrand model of P (see [VEK],[AVE]).

3 Declarative vs. procedural semantics A precise meaning or semantics must be associated with any logic program P, so that we know how to answer queries about P. There are two distinct, although closely interrelated methods in which the semantics of a logic program P can be de ned. One is declarative and the other procedural. Declarative semantics of a logic program can be speci ed in various ways, among which the following two are most common. One that can be called proof-theoretic, associates with P its rst order completion c(P) (e.g. c(P) can be P itself or c(P) can be Clark's completion comp(P)) and declares that a substitution  is a correct answer substitution (see [Ld]) for a given query Q i 8(Q) can be logically derived from c(P), i.e. if c(P ) j= 8(Q). Another, that can be called model-theoretic, associates with P a set MOD(P) of one or more models of P (e.g. MOD(P) can be the set of all minimal models of P or the unique least Herbrand model of P, if P is positive) and declares that a substitution  is a correct answer substitution for a given query Q i 8(Q) is 6

satis ed in all models from MOD(P), i.e. if MOD(P ) j= 8(Q). The common feature of all de nitions of declarative semantics is that they provide a mathematically precise de nition of the meaning of P, which is independent of any procedural considerations. Combinations of two approaches are possible (see [F,K]). Procedural semantics of a logic program usually is given by providing a procedural mechanism that, at least in theory and perhaps under some additional assumptions, is capable of providing answers to a wide class of queries. For example, SLD-resolution provides such a computational mechanism for positive programs and positive queries (see [Ld]). Most researchers agree that logic programs should have a clearly de ned declarative semantics, which is independent of any procedural or implementation issues. As Kunen puts it in [K]: \The logic component should give us a declarative semantics of the language which tells us whether or not [a given answer] follows semantically from P. [...] The user should be able to understand the semantics just by `logic'; not by a detailed understanding of the implementation of the interpreter. It is really this key fact that separates logic programming from more conventional procedural forms of programming." Once a suitable declarative semantics of logic programs is found, a procedural mechanism should be described to produce answers in accordance with this semantics. The performance of such a mechanism can then be evaluated by describing when and how its behavior di ers from the behavior prescribed by the declarative semantics. In other words, declarative semantics should serve as a speci cation for computational mechanisms (cf. [E]). The most natural { at least from the point of view of a logician { `solution' to the problem of nding an appropriate declarative semantics for logic programs obtained by declaring that  is a correct answer substitution to a query Q i 8(Q) follows logically from P itself, is { for various reasons { unacceptable. One reason is that such a de nition would force us to implement full classical negation in logic programs, thus making query answering very expensive and hence impractical. Another, perhaps more important, reason is that we really do not want classical negation in logic programs. We want logic programs to be as easy to write and comprehend as possible, free from overwhelming amounts of explicit negative information and as close to natural discourse as possible. In other words, we want the semantics of logic programs to be determined more by their commonsense meaning than by their purely logical contents. For example, given the information that 0 is a natural number and that if n is a natural number then so is n+1, we should be able to derive a non-monotonic or commonsense conclusion that -1 is not a natural number, even though this fact clearly does not follow logically from our assumptions. 7

4 A discussion of declarative semantics In this section we brie y discuss some of the desirable features and some drawbacks of two successful semantics of logic programs: the semantics based on Clark's completion and the least Herbrand model semantics. We restrict our attention to those aspects that are relevant for our further presentation.

4.1 Clark's completion

The most often used declarative semantics of logic programs is based on the so called Clark's completion comp(P) of a program P [C]. Clark's completion of P is obtained by rst rewriting every clause in P of the form: q(K1; : : : ; Kn) L1 ; : : : ; Lm; where K1; : : : ; Kn are terms containing variables X1; : : : ; Xk , as a clause q(T1; : : : ; Tn) F; where F = 9X1 ; : : : ; Xk (T1 = K1 ^ : : : ^ Tn = Kn ^ L1 ^ : : : ^ Lm ) and then replacing, for every predicate symbol q in the alphabet, the (possibly empty) set of all clauses q(K11; : : : ; Kn1 ) F1 ::: ::: s s q(K1 ; : : : ; Kn) Fs with q appearing in the head, by a single universally quanti ed logical equivalence q(T1 ; : : : ; Tn) ! (F1 _ : : : _ Fs): Clark's approach is founded on a very natural idea that in common discourse we often tend to use `if' statements, when we really mean `i ' statements. For example, we may use the following program P1 to describe natural numbers: natural number(0) natural number(succ(X )) natural number(X ): The above theory P1 is rather weak. It does not even imply that, say, (a constant) mary is not a natural number. This is because, what we really have in mind is natural number(T ) ! 9X (T = 0 _ (T = succ(X ) ^ natural number(X ))) which is in fact Clark's completion of P1 and implies :natural number(mary). The success of Clark's semantics is due { among others { to the following three features that it possesses: 8

 Clark's completion has a natural and easily intelligible de nition.  If P is a positive program then a positive formula F is derivable from comp(P)

i it is derivable from P, i.e. for positive programs comp(P) does not introduce any new positive information (see [Ld]).  SLDNF-resolution (used in Prolog) is always sound with respect to Clark's semantics and for positive programs and queries { as well as for recursion-free programs { it is also complete (see [JLL],[Ld]). Let us observe, that the second property seems very natural and important for positive programs. Indeed, non-monotonic semantics of logic programs can be considered as built upon the following two important premises: (a) It has to imply all formulae provable from P itself; (b) It should imply negation of some positive formulae, which are not provable from P itself. Obviously { depending on the semantics { the set of such negated formulae varies. Consequently, in a positive program, neither (a) nor (b) can add any new positive information to that already implied by P. On the other hand, in a general logic program, the presence of negative premises may result in condition (b) forcing some new positive information to be introduced. Unfortunately, Clark's completion does not always result in a satisfactory semantics. For many programs, Clark's completion leads to a semantics which appears too weak. This problem is well-known and has been often pointed out in the literature. We illustrate it on the following three examples: 1. Suppose that to the program P1 given above we add a seemingly neutral clause: natural number(X ) natural number(X ): It appears, the newly obtained program P2 should have the same semantics. However, Clark's completion of P2 is: natural number(T ) ! (natural number(T ) _ T = 0 _ 9X (T = succ(X ) ^ natural number(X ))) from which it no longer follows that mary (or anything else, for that matter) is not a natural number. 2. Suppose that program P3 is given by the following clauses: bird(tweety) fly(X ) bird(X ); :abnormal(X ) abnormal(X ) irregular(X ) irregular(X ) abnormal(X ): 9

The last two clauses merely state that irregularity is synonymous with abnormality. Based on the fact that nothing leads us to believe that tweety is abnormal, we are justi ed to expect that tweety ies, but Clark's completion of P3 merely yields

fly(T ) ! (bird(T ) ^ :abnormal(T )) abnormal(T ) ! irregular(T ); from which it does not follow that anything ies. On the other hand, without the last two clauses (or just one of them) Clark's semantics produces correct results. 3. (Van Gelder) Suppose, that we want to describe which vertices in a graph are reachable from a given vertex a. We could write the following program P4: edge(a; b) edge(c; d) edge(d; c) reachable(a) reachable(X ) reachable(Y ); edge(Y; X ): We clearly expect vertices c and d not to be reachable. However, Clark's completion of the predicate `reachable' gives only reachable(X ) ! (X = a _ 9Y (reachable(Y ) ^ edge(Y; X ))) from which such a conclusion again cannot be derived. Here, the diculty is caused by the existence of symmetric clauses edge(c; d) and edge(d; c). The above described behavior of Clark's completion is bound to be confusing for a thoughtful logic programmer, who may very well wonder why, for example, the addition of a seemingly harmless statement \natural number(X ) natural number(X )" should change the meaning of the rst program. The explanation that will most likely occur to him will be procedural in nature, namely, the fact that the above added clause may lead to a loop. But it was the idea of replacing procedural programming by declarative programming, that brought about the concept of logic programming in the rst place, and therefore it seems that such a procedural explanation should be atly rejected. It is sometimes argued that the above criticism of Clark's semantics is unfounded because Clark meant the completed program P  = COMP (P ) to be considered as the `real' program, while the program P written by the programmer should serve only as its abbreviated form. Unfortunately, a great majority of Prolog programmers never heard about Clark's completion and of the remaining small minority only very few would be able to actually write a completed version of his programs and some 10

of them would be surprised by its contents. Clearly, it is the programs that logic programmers write that must re ect users' intended meaning and not completions or translations of such programs, which are hidden from the user and are too complex for him to understand.

4.2 The least Herbrand model semantics

As we pointed out in Section 2, every positive logic program P has the unique least Herbrand Model MP , or { in other words { the unique minimal Herbrand model ([VEK], [AVE]), which is sometimes considered to represent the intended declarative meaning of P. The motivation behind this approach is based on the idea that we should minimize positive information as much as possible, limiting it to facts implied by P, and making everything else false. For example, for the program P1 given above, MP is as given by:

fnatural number(0); natural number(succ(0)); : : :g which is exactly what we intended. Similarly, the least Herbrand model of the program P4 above is

fedge(a; b); edge(c; d); edge(d; c); reachable(a); reachable(b)g; which is again exactly what we would expect. Similar situation occurs with the programs P2 and P4 . The least Herbrand model semantics is very intuitive and seems to properly re ect the intended meaning of positive logic programs. It has, however, one important drawback, which is caused by the fact that only Herbrand models of P are considered. We will call it the universal query problem. Before we begin its discussion, we wish to point out that the universal query problem is not new. The problem was already pointed out in the literature (see e.g. Lloyd's book [Ld, pp. 31]) and there are di erent ways in which one can try to rectify it, leading to essentially di erent results (e.g. extended domain assumptions or extensions of the language). However, as far as we know, neither the problem itself nor its possible solutions were ever formally investigated or compared. Since the problem is important, we decided to give it a name and to propose a systematic and formal solution, which appears to be satisfactory and also seems to o er technical advantages over some other possible approaches. Suppose that our program consists of a trivial clause p(a). Its only Herbrand model is MP = fp(a)g and therefore the least Herbrand model semantics of P implies 8X p(X ), i.e. MP j= 8X p(X ): This fact has at least two negative consequences: (a) Since 8X p(X ) is a positive formula, not implied by P itself, the least Herbrand model semantics violates the principle that no new positive information should 11

be introduced by the semantics of positive programs, which { as we pointed out above { seems to be a very natural and important requirement. (b) The least Herbrand model semantics seems to a priori prevent standard uni cation-based computational mechanisms from being complete with respect to this semantics. Indeed, when we ask the query p(X) in logic programming, we not only want to have an answer to the question `is there an X for which p(X)?', but in fact we are interested in obtaining all bindings (or substitutions)  for which our semantics implies 8X p(X ). Therefore, in this case, if our semantics is determined by the unique Herbrand model MP and if we ask p(X), we should expect simply the answer `yes' indicating that p(X) is satis ed for all X's or { in other words { signifying, that the empty substitution is a correct answer substitution. Unfortunately, standard uni cation-based computational mechanisms will be only capable of returning the special case substitution  = fX jag. It is sometimes argued that logic programming should only be concerned with Herbrand models rather than with general models of P. This conclusion is motivated by the belief that the role of logic programming is to answer existential queries and by the well-known fact that an existential formula F is derivable from a given (universal) theory T if and only if it is satis ed in all Herbrand models of T (see e.g. [S3]). This argument is only partially correct. In reality, logic programming is not only concerned with answering existential queries, but it is primarily concerned with providing `most general' bindings (substitutions) for the answers. For example, if our program is

parent(X; father(X )) parent(X; mother(X )) grand parent(X; Y )

parent(X; Z ); parent(Z; Y )

and we ask grand parent(X,Y), then we expect to obtain answers: Y = mother(father(X)), Y = mother(mother(X)), etc., signifying that

8X grand parent(X; mother(father(X )))

8X grand parent(X; mother(mother(X ))); : : :

In other words, we expect to obtain `most general' substitutions for which the given query holds and as a result we are in fact interested in answers to universal queries, like `Is it true that for every X grandparent(X,mother(father(X)))?', for which general models and Herbrand models, in general, provide di erent answers, as it was illustrated above in case of the trivial program p(a). This explains why, in order to provide a declarative semantics for logic programs, not only Herbrand models need to be considered. 12

5 Minimal model semantics for positive programs Throughout this section we assume that P is a positive logic program. As we pointed out in Section 4, the least Herbrand model semantics is very intuitive and seems to properly re ect the intended meaning of such programs. We also showed, however, that this semantics has an important drawback { we called it the universal query problem { which is caused by the fact that only Herbrand models of P are considered. In this section we show that this problem can be eliminated by considering the class of all minimal models of a positive program P instead of just considering the unique minimal Herbrand model of P. While avoiding the universal query problem, the minimal model semantics is still equivalent to the least Herbrand model semantics for existential queries. Moreover, for positive queries SLD-resolution with negation as failure is sound and complete with respect to this semantics. The minimal model semantics is equivalent to the semantics of McCarthy's (parallel) circumscription thus providing a close connection between logic programming and non-monotonic reasoning in AI. We now give precise de nitions.

De nition 5.1 Let P be a positive logic program and let MIN(P) be the set of all

minimal, but not necessarily Herbrand, models1 of P. By a minimal model semantics of P we mean the semantics induced by the set MIN(P). Under this semantics a sentence F is considered to be true i F is satis ed in all minimal models of P. In this case we write MIN(P) j= F. We say that a substitution  is a correct-answer-substitution for a given query Q, if MIN(P) j= 8(Q). 2

Consider the following example.

Example 5.1 Suppose that our program P consists of clauses: renowned physicist(einstein) former president(ford) famous man(X ) famous man(X ) able mathematician(X )

renowned physicist(X ) former president(X ) renowned physicist(X ):

This program has many di erent models. In some of them both Einstein and Ford are former presidents, renowned physicists and able mathematicians. Such models hardly seem to describe the intended meaning of P. Actually, there is nothing in this program to imply that Ford is a physicist or an able mathematician nor that Einstein is a former president. In fact, we are inclined to believe that the lack of such information indicates that we can assume the contrary. Recall, that we assume CET axioms and therefore the models considered are in fact models of CET(P). 1

13

The unique minimal Herbrand model MP of P or { equivalently { the least Herbrand model of P is equal to

frenowned physicist(einstein); former president(ford); able mathematician(einstein); famous man(einstein); famous man(ford)g and it seems to properly interpret the intended meaning of P as far as ground atoms are concerned, but it also implies a universal conclusion that everybody is famous: F = 8X famous man(X ); which cannot be derived by standard uni cation-based interpreters. Clearly, F is a positive formula that is not derivable from P itself. This program has many minimal models, whose common characteristics is that they all coincide with the model MP as far as ground atoms are concerned. As a result, the minimal model semantics provides the same ground information as the least model semantics, but does not add any new positive information. On the other hand, both semantics imply new universal negative facts, such as e.g.

F = 8X :(former president(X ) ^ renowned physicist(X )): 2 We can now formalize these claims. First, we need a result obtained by Gelfond, H.Przymusinska and T. Przymusinski [GPP3], showing that for positive existential queries and for their negations the minimal model semantics MIN(P) of P is equivalent to the least Herbrand model semantics MP of P. In particular, this result applies to all (positive or negative) ground queries.

Theorem 5.1 ([GPP3]) Suppose that P is a positive logic program and Q is a pos-

itive query. Then:

MIN (P ) j= 9(Q) () MP j= 9(Q); MIN (P ) j= :9(Q) () MP j= :9(Q): 2

The following example illustrates the assumptions used.

Example 5.2 (a) The assumption that Q is positive is essential. Indeed, if P is given by a single clause p(a) and Q = :p(X ), then MP j= :9(Q) and yet MIN (P ) 6j= :9(Q). (b) The assumption that the query is existential is also essential. Indeed, if P and Q are as above and F = 8X p(X ), then MP j= F and yet MIN (P ) 6j= F . (c) The assumption that P is a positive logic program is essential, because nonpositive logic programs in general do not have unique minimal models (cf. Section 7). 14

(d) The assumption that only models of CET(P) are considered is also essential. Indeed, if P consists of clauses p(a) and q(b) and Q is a positive ground query q(a), then MP j= :Q and yet there exist minimal models of P in which Q holds, because in some minimal models of P we may have e.g. a = b: 2 The following corollary shows that for all existential { positive or negative { queries the minimal model semantics MIN(P) of P is still equivalent to the least Herbrand model semantics MP of P, although { as Example 5.2 shows { this may no longer be true for negations of such queries.

Corollary 5.2 Suppose that P is a positive logic program and Q is a query. Then: MIN (P ) j= 9(Q) () MP j= 9(Q): Proof: Let F = 9(Q) and let Q be represented as a conjunction of literals Li ; i  n. Clearly, if MIN (P ) j= F then MP j= F . Suppose now that MP j= F . Since

MP represents a unique model, there must exist a ground substitution  such that MP j= Q. Therefore, for every i  n MP j= Li . If Li is positive, then { by Theorem 5.1 { MIN (P ) j= Li . If Li is negative, then Li = :Ai , where Ai is an atom and MP j= :Ai. Again { by Theorem 5.1 { it follows that MIN (P ) j= :Ai  and therefore MIN (P ) j= Li, for all i's. Consequently, MIN (P ) j= Q and therefore MIN (P ) j= F . 2 The above two results are important, because they con rm that, as far as ex-

istential queries are concerned, using all minimal models or just the unique minimal Herbrand model produces exactly the same results. The above proof also shows that for a query Q, MIN (P ) j= 9(Q) i there is a ground substitution  such that MIN (P ) j= Q. On the other hand, it follows from the previous examples as well as from next theorem that for universal queries the two approaches are no longer equivalent. Indeed, the minimal model semantics does not introduce any new positive information and therefore avoids the universal query problem, whereas { as we pointed out in Section 4 { the least Herbrand model semantics does not have this property.

Theorem 5.3 ([EMR],[L2]) Suppose that P is a positive logic program and F is

any positive sentence. Then:

MIN (P ) j= F () P j= F: 2 Therefore, a positive formula is implied by MIN(P) i it can be logically derived from P itself. As we mentioned already before, this seems to be a very desirable property for positive logic programs. Theorems 5.1 and 5.3 yield an important result showing that for positive queries SLD-resolution { with negation interpreted as failure to prove { is sound and complete 15

with respect to the minimal model semantics. Recall, that SLD-resolution is de ned only for positive queries. By a substitution being more general than a substitution  we mean that there exists a substitution such that  = . We assume that a xed computation rule selecting literals from non-empty lists of literals is given (see [Ld]). For the de nition of SLD-answer-substitution, see [Ld]. An SLD-tree for a query Q is failed if all of its branches are either in nite or end with a failure node or { equivalently { if there is no SLD-answer substitution for Q. Theorem 5.4 (Soundness and Completeness of SLD-resolution) Suppose that P is a positive program, R is a xed computation rule, Q is a positive query and ! is a substitution. Then (i) MIN (P ) j= 9(Q) () there is an SLD-answer-substitution for Q (ii) MIN (P ) j= :9(Q) () SLD-tree for Q is failed (iii) MIN (P ) j= 8(Q!) () there is an SLD-answer-substitution more general than !: Proof: Parts (i) and (iii) follow immediately from Theorem 5.3 and the well-known [Ld] soundness and completeness of SLD-resolution for positive queries, stating that for positive queries Q we have: P j= 9(Q) () there exists an SLD-answer-substitution for Q; P j= 8(Q!) () there exists an SLD-answer-substitution more general than !: To prove (ii), suppose that MIN (P ) j= 8(:Q) and SLD-tree for Q is not failed, that is suppose that there exists an SLD-answer substitution !. By the rst part, MIN (P ) j= 8(Q!), which is impossible. Suppose now that SLD-tree for Q is failed and yet MIN (P ) 6j= 8(:Q). By Theorem 5.1 P j= 9(Q) and therefore by the above completeness result there is an SLD-answer substitution, which is again impossible. Observe, that the equivalence (i) is a consequence of (ii) and (iii). 2 Notice, that because of the universal query problem, an analogous result is not valid for the least Herbrand model semantics. Indeed, if P is given by p(a), then MP j= 8X p(X ), whereas the only answer substitution produced by SLD-resolution is the substitution  = fX jag. Clark's semantics is in general weaker than the minimal model semantics and an analogous result is true only when failure to prove is replaced by nite failure to prove (cf. Section 7). In [Mc] McCarthy de ned the notion of parallel circumscription, which was further developed by him in [Mc2] and by Lifschitz in [L2]. (Parallel) circumscription CIRC(T) of a given theory T is de ned as a second order formula, but it is known [L2] that its semantics { in the simplest case, when all predicates are minimized { is determined by the class MIN(T) of all minimal models of T. Consequently, we have Theorem 5.5 ([EMR,L2]) Minimal model semantics of a positive logic program P coincides with the semantics of parallel circumscription of P, i.e. for any sentence F MIN (P ) j= F () CIRC (P ) j= F: 2 16

Thus the choice of minimal model semantics for positive logic programs establishes a clear relationship between logic programming and non-monotonic reasoning in AI. Minimal model semantics has been also introduced in the context of deductive databases by Minker [Mi2] in the form of the so called Generalized Closed-World Assumption and studied in [BS], [GPP], [P], [BH]. In the next two sections the minimal model semantics as well as the results obtained in this section will be generalized to the class of general logic programs.

6 Perfect model semantics for general programs In this section we will de ne the perfect model semantics, which extends the minimal model semantics onto the class of general logic programs. Recently, Apt, Blair and Walker [ABW] and independently Van Gelder [VG] (see also Chandra and Harel [CH] and Naqvi [N]) introduced the class of strati ed logic programs, de ned a unique `natural' Herbrand model MP of a strati ed logic program and argued that this model provides a natural intended semantics of such programs. In [P] Przymusinski extended the notion of a strati ed program onto the class of disjunctive deductive databases and introduced the class of perfect Herbrand models of deductive databases. He showed that every strati ed deductive database has at least one perfect Herbrand model and that every strati ed logic program has exactly one such model, which coincides with the model MP . In view of this result, we will refer to the model MP as the (unique) perfect Herbrand model of a strati ed logic program. The de nition of perfect models was based on the idea of assigning di erent priorities to predicate symbols and provided an additional justi cation and explanation of the `naturality' of the model MP . Moreover, there are natural logic programs and disjunctive databases, which are not strati ed, but have perfect models. A fairly large class of such databases { called locally strati ed { is discussed in [P]. Przymusinski [P] showed, that a Herbrand model of a strati ed disjunctive database is perfect i it is a model of McCarthy's prioritized circumscription (an analogous result for logic programs and pointwise circumscription was obtained in [L]). It has been also proven ([P],[BF],[GPP],[Ge],[Pr]), that suitable forms of the remaining three major formalizations of commonsense reasoning { Reiter's default theory, Reiter's closed world assumption and Moore's autoepistemic logic { are equivalent to the perfect model semantics (see [P3] for a detailed discussion). The semantics based on the unique perfect Herbrand model is stronger than Clark's semantics and therefore avoids the diculties discussed in Section 4, which were caused by the fact that Clark's semantics often seems to be too weak. For positive logic programs, the unique Herbrand perfect model coincides with the least Herbrand model. Consequently, the perfect model semantics { if it is limited to Herbrand models { must necessarily su er from the universal query problem. We will show how to extend the notion of a perfect Herbrand model of a gen17

eral logic program to the class of all, not necessarily Herbrand, models and we will demonstrate that the class PERF(P) of perfect models of a general logic program P describes a natural declarative semantics of P, which combines many advantages and eliminates some of the drawbacks of the previous approaches. For a positive program P, the class PERF(P) of perfect models of P coincides with the class MIN(P) of minimal models of P, so that the perfect model semantics extends the previously discussed minimal model semantics. We also show that M is a perfect model of P i it is a model of McCarthy's prioritized circumscription, thus further relating the semantics of logic programming to non-monotonic reasoning. Example 6.1 Suppose that we know that a typical businessman tends to avoid using advanced mathematics in his work, unless somehow he happens to be a good mathematician, and that Iacocca is a businessman and that Einstein is a physicist. We can express these facts using a general program as follows: businessman(X ); :good mathematician(X ) (1) avoids math(X ) businessman(iacocca) physicist(einstein): This program P has two minimal Herbrand models M1 and M2 . In both of them Iacocca is the only businessman and Einstein is the only physicist, but in M1 Iacocca avoids advanced mathematics and in M2 he is a good mathematician, instead. Do both of these models capture the intended meaning of P? Clearly not! By placing negated predicate good mathematician(X) among the premises of the rule, we most likely intended to say that businessmen, in general, avoid advanced mathematics unless they happen to be good mathematicians. Since we have no reason to believe that Iacocca is a good mathematician we are inclined to infer that he does not use advanced mathematics. Therefore, only the rst minimal model M1 corresponds to the intended meaning of P. The reason for this asymmetry is easy to explain. The rst clause (1) of P is logically equivalent to the following clause (2) without negation: good mathematician(X ) _ avoids math(X ) businessman(X ) (2) and models M1 and M2 are therefore also minimal models of the theory P 0, obtained from P by replacing (1) by (2). These models provide a suitable semantics of P 0 because P 0 does not assign di erent priorities to predicates good mathematician and avoids math, treating them as equally plausible. The program P, on the other hand, gives a higher priority to the predicate good mathematician than to the predicate avoids math, in the sense that the predicate good mathematician has a higher priority for minimization (of its extension) than the predicate avoids math. We can easily imagine the above priorities reversed. This is for instance the case in the following program: physicist(X ); :avoids math(X ) good mathematician(X ) 18

businessman(iacocca) physicist(einstein); which says that if X is a physicist and if we have no speci c evidence showing that he avoids mathematics then we are allowed to assume that he is a good mathematician. Here, the predicate avoids math has a higher priority for minimization than the predicate good mathematician. This shows that relative priorities among the predicates in the program are determined by the syntax of its clauses, with heads having lower priority then negated premises. Analogous remarks apply to non-Herbrand minimal models of P. 2 From the preceding example we can see that the set MIN(P) of all minimal models of a general program may contain models which do not properly interpret the declarative meaning of the program and therefore we need to properly identify the class of those minimal models of P which properly describe the intended meaning of P. The class of perfect models described below seems to ful ll those needs. The class of perfect models is a subclass of the class of minimal models, enjoying many of its natural properties. In view of the need to consider all, not necessarily Herbrand, models of P, the de nition given below extends the de nition of perfect Herbrand models given in [P]. As we have observed before, the syntax of program clauses determines relative priorities between predicate symbols, so that I. Negative premises must have higher priority than the heads. Moreover, II. Positive premises must have priority higher than or equal to that of the heads. Indeed, if B A, then minimizing B immediately results in A being minimized, too. Consequently, A is always minimized before or at the same time when B is minimized. To formalize conditions I and II, we rst introduce the dependency graph G of the program P (cf. [ABW,VG]), whose vertices are predicate symbols. If A and B are two such symbols, then there is a directed edge in G from B to A if, and only if, there is a clause in P such that A occurs in its head and B in one of its premises. If this premise is negative, then the edge is called negative. We now de ne the priority relations < and  between elements A and B of the set S of all predicate symbols in P as follows: A  B (resp. A < B ) i there is a directed path in G leading from B to A (resp. passing through at least one negative edge). If A avoids math and therefore M1  M2 . Con-

sequently, M1 is perfect, but M2 is not. 2 Not every logic program has a perfect model: Example 6.4 The program: p :q , q :p has only two minimal Herbrand models M1 = fpg and M2 = fqg and since p C and D 2 N ? M . If D 2 R, then D 2 R ? M ; a contradiction. Otherwise, D 2 N ? R and there is an E > D such that E 2 R ? N , but this contradicts the maximality of C. Suppose now that A does not belong to N. Then A 2 M ? N and there is a D such that D > A and D 2 N ? M . We can assume that D is maximal. If D 2 R then we obtain a contradiction. Otherwise, D 2 N ? R and there is a maximal E such that E > D and E 2 R ? N . If E does not belong to M then we have a contradiction. Otherwise, E 2 M ? N and there is an F > E such that F 2 N ? M . This contradicts the maximality of D and completes the proof. 2 Our basic result states that every model of a strati ed program P is `subsumed' by a perfect model and that P has exactly one perfect Herbrand model, which coincides with the `natural' model MP de ned by Apt et al. These properties are completely analogous to the corresponding properties of minimal models and of the least Herbrand model.

Theorem 6.4 (Basic) For every model N of a strati ed program P there exists a (unique) perfect model M such that M  N.

In particular, every strati ed program has a unique perfect Herbrand model. Moreover, this model coincides with the `natural' model MP . Proof: The proof of Theorem 6.4 is given in the Appendix. 2 Now we de ne the perfect model semantics of a general logic program.

22

De nition 6.3 Let P be a general logic program and let PERF(P) be the set of all

perfect, not necessarily Herbrand, models of P. By the perfect model semantics of P we mean the semantics induced by the set PERF(P). Under this semantics a sentence F is considered to be true i F is satis ed in all perfect models of P. In this case we write PERF(P) j= F. A substitution  is called a correct-answer-substitution for a query Q if PERF(P) j= 8(Q). 2

Clearly, it follows from Theorem 6.1 that for positive programs, the perfect model semantics coincides with the minimal model semantics. Theorem 6.4 shows that the perfect model semantics is well-de ned for any strati ed program P. Our next theorem shows, that for strati ed programs the perfect model semantics is strictly stronger than the semantics de ned by Clark's completion. In its proof we will need the following technical result showing that all perfect models are supported and therefore also positivistic. The notion of a supported model was introduced by Bidoit and Hall [BH] and Apt et. al. [ABW]. The notion of a positivistic model was introduced by Bidoit and Hall [BH]. Both notions are de ned in the Appendix. Observe, that in view of the fact that perfect models are supported and supported models are models of Clark's semantics, Clark's completion is always consistent for strati ed programs. This result has been rst proved by Apt et. al. [ABW].

Proposition 6.1 Every perfect model is supported. Proof: The proof is given in the Appendix. 2

Theorem 6.5 Suppose that P is a strati ed logic program. For any sentence F, if comp(P ) j= F , then PERF (P ) j= F: This implies that the perfect model semantics is strictly stronger than the semantics de ned by Clark's completion. Proof: It is known (see [JLL] and [AVE]) that M is a model of Clark's completion comp(P) of a program P i M is a supported model of CET(P). By Proposition 6.1 every perfect model is supported and therefore every sentence F which is satis ed in all models of comp(P) is also satis ed in all models from PERF(P). To see that the perfect model semantics is strictly stronger than the semantics de ned by Clark's completion, observe that for the program P consisting of the clause p p, we have PERF (P ) j= :p, whereas comp(P ) 6j= :p. 2 In [Mc2] McCarthy de ned the notion of prioritized circumscription, which was further developed by Lifschitz in [L2] and generalizes the notion of parallel circumscription. Suppose that S1,..., Sn, is any decomposition of the set S of all predicates of a program P into disjoint sets. Prioritized circumscription CIRC(P;S1 >...>Sn) of a logic program P w.r.t. priorities S1 >...>Sn is de ned as a second order formula,

23

but its semantics can be de ned in terms of models of prioritized circumscription3 (see [L2]). The following theorem shows that the semantics of prioritized circumscription is equivalent to the perfect model semantics (a similar result for pointwise circumscription was obtained by Lifschitz [L]). It also generalizes Theorem 5.5.

Theorem 6.6 Suppose that P is a strati ed program and fS1,...,Sng is a strati cation

of P. A model of P is perfect if and only if it is a model of prioritized circumscription CIRC(P;S1>...>Sn). Consequently, the perfect model semantics of P coincides with the semantics of prioritized circumscription of P, i.e. for any sentence F

PERF (P ) j= F () CIRC (P ; S1 > : : : > Sn) j= F: Proof: See the Appendix. 2

Corollary 6.7 Suppose that fS1 ,...,Sng and fT1 ,...,Tmg are two strati cations of the same program P. Then M is a model of CIRC(P;S1>...>Sn) if and only if it is a model of CIRC(P;T1>...>Tm).

Proof: The de nition of a perfect model does not depend on the choice of strati cation and { by Theorem 6.6 { a model is perfect if and only if it is a model of prioritized circumscription with respect to the corresponding set of priorities. Consequently, models of prioritized circumscription for any two such sets of priorities must be identical. 2 The above results provide a further justi cation of the perfect model semantics and underscore the fact that the notion of a perfect model is a proper extension of the notion of a minimal model onto the class of general logic programs. They also underscore the relationship between logic programming and non-monotonic reasoning in AI. In [GPP2], under the assumption of the Domain Closure Axiom, a syntactic characterization of the perfect model semantics is obtained in the form of the so called Iterated Closed-World Assumption.

7 Procedural semantics In this section we de ne the so called SLS-resolution (Linear resolution with Selection function for Strati ed programs4 ). SLS-resolution is sound and complete (for non- oundering queries) w.r.t. the perfect model semantics. SLS-resolution is a natural generalization of SLD-resolution (Linear resolution with Selection function for De nite programs) from the class of positive (de nite) programs onto the class of 3 4

For the sake of simplicity, we ignore here variable predicates. This name was suggested by R.Topor.

24

strati ed programs. SLS-resolution is also a modi cation of SLDNF-resolution5. The obtained results generalize the results obtained in Section 5 for the minimal model semantics. Suppose that P is a strati ed program, S is the set of all predicate symbols of P and fS1,...,Sn g is a strati cation of P. For any atom A let stratum(A)=i, where i is the unique integer such that the predicate symbol of A belongs to Si and let stratum(:A) = stratum(A) + 1. Recall that a goal G is a headless clause L1 ,..., Lk , where k0 and Li 's are literals. We also write, G = Q, where Q = L1 ,..., Lk . We de ne stratum(G) as follows: ( 0; if G is empty; stratum(G) = max fstratum(Li ) : i = 1; :::; kg; otherwise. For example, if G = A; :B and stratum(A)=stratum(B)=2, then stratum(G)=3. From now on we assume that R is any xed safe computation rule (see [Ld]), i.e. a rule that selects { whenever possible { exactly one positive or one ground negative literal from a given goal G. If the goal G is non-empty and if such a selection is not possible, then the computation rule R ounders on G (cf. [C],[S2],[S3],[LT2]). Now we are ready to de ne SLS-resolution.

De nition 7.1 (De nition of SLS-trees) By induction on the stratum of G, we de ne the notions of an SLS-tree, a success leaf, a failure leaf and a ounder leaf for a given program P and goal G. If stratum(G)=0, then G is an empty clause and its SLS-tree T consists of only one node, namely G itself. Its only leaf is a success leaf. Assume now that stratum(G)=m, m>0, and that SLS-trees have already been de ned for goals, whose strata are less than m. We de ne the SLS-tree T for G. The root node of T is G. If H is any node of T then its immediate descendents (successors) are obtained as follows:  if H is empty, then H has no immediate descendents and is a success leaf;  if the rule R ounders on H, then H has no immediate descendents and is a

ounder leaf;

 if the literal L selected by R from H is positive, then the immediate descendents of H are all goals K that can be obtained from the goal H by resolving H with (a variant of) one of the program clauses upon the literal L using most general uni ers; if there are no such K's, then H has no immediate descendents and is a failure leaf;

5

K.Apt points out that SLS-resolution is also a generalization of the interpreter de ned in [ABW].

25

 if the selected literal L is negative, then L = :A, where A is a ground atom, and it is easy to verify that stratum( A) < m and therefore the SLS-tree T 0 for A was already de ned. We consider three cases:

{ if all leaves of T 0 are failed, then the only immediate descendent of H is H ? fLg, i.e. the goal H with L removed; { if T 0 contains a success leaf, then H has no immediate descendents and is a failure leaf; { otherwise, H has no immediate descendents and is a ounder leaf. 2

We now make the following standard de nitions.

De nition 7.2 (De nition of SLS-resolution) An SLS-tree is successful if it has

a success leaf, i.e. an empty node 2. An SLS-tree is oundered if it has a ounder leaf. An SLS-tree is failed if all of its leaves are failed (equivalently, if all of its branches are in nite or end with a failure leaf). A branch beginning at the root and ending with a success leaf is a successful branch and is also called an SLS-refutation of G. The substitution  obtained as a composition of the corresponding most general uni ers for a successful branch is called an SLSanswer-substitution for G. If G = Q, where Q is a query, then we also say that  is an SLS-answer-substitution for Q. Any partial branch of the SLS-tree beginning at the root is called an SLS-derivation from G. The process of constructing SLS-derivations is called SLS-resolution. A branch is called failed if it is either in nite or ends with a failure leaf. A branch ending with a ounder leaf is called oundered. We will say that a query Q is oundered if the SLS-tree for the goal G = Q is oundered. We say that a substitution is more general than a substitution  if there exists a substitution such that = . 2

Every leaf of an SLS-tree is either a success leaf or a failure leaf or a ounder leaf, and therefore every SLS-tree is either successful or oundered or failed. An SLS-tree is failed i all of its branches are failed. Notice that an SLS-tree can be both successful and oundered, but a failed tree is neither successful nor oundered. Observe, that since all the negative subgoals in SLS-resolution must be ground, they do not have any e ect upon answer substitutions. Also observe, that in the special case when P is a positive program, for any positive (non-empty) goal G we have stratum(G)=1 and for any goal including negative literals we have stratum(G)=2. In the rst case, SLS-resolution is equivalent to the standard SLD-resolution and in the second case it is equivalent to SLD-resolution with (not necessarily nite!) negation as failure (cf. Theorem 5.4).

26