Sequent Calculi for Skeptical Reasoning in Predicate Default Logic ...

Report 2 Downloads 111 Views
Sequent Calculi for Skeptical Reasoning in Predicate Default Logic and Other Nonmonotonic Logics ∗ Robert Saxon Milnikel ([email protected]) Department of Mathematics, Kenyon College Abstract. Sequent calculi for skeptical consequence in predicate default logic, predicate stable model logic programming, and infinite autoepistemic theories are presented and proved sound and complete. While skeptical consequence is decidable in the finite propositional case of all three formalisms, the move to predicate or infinite theories increases the complexity of skeptical reasoning to being Π11 -complete. This implies the need for sequent rules with countably many premises, and such rules are employed. Keywords: Default logic, Stable models, Autoepistemic logic, Sequent calculus AMS Subject Classifications: 03B42, 68N17, 68T27

1. Introduction Skeptical consequence is a notion common to all forms of nonmonotonic reasoning. Every nonmonotonic formalism permits different world views to be justified using the same set of facts and principles; the skeptical consequences of a framework are the notions common to all world views associated with that framework. Our purpose in this paper is to present a Gentzen-style sequent calculus (incorporating some infinitary rules) which will allow us to deduce the skeptical consequences of a given framework. Such sequent calculi (with purely finite rules) were defined for several types of nonmonotonic systems by Bonatti and Olivetti in [6], but they restricted their attention to finite propositional systems for which skeptical consequence is decidable. We will adapt and extend their systems to accommodate infinite predicate systems. We will focus on three types of nonmonotonic reasoning: stable model logic programming (due to Gelfond and Lifschitz, [8]), default logic (due to Reiter, [22]), and autoepistemic logic (due to Moore, [19]). In all three cases, when one steps from the finite and propositional to the predicate and potentially infinite, finding the set of skeptical consequences of a framework goes from being decidable to being Π11 complete, at the same level of the computability hierarchy as true arithmetic. This result was proved for stable model logic program∗

This paper grew directly out of the author’s dissertation, written under the direction of Anil Nerode. c 2004 Kluwer Academic Publishers. Printed in the Netherlands.

fulldefaultsequent.tex; 18/06/2004; 16:12; p.1

2

R.S. Milnikel

ming by Marek, Nerode, and Remmel in [13], but it translates to the other systems quite easily. (The reader should be aware that there will be a few computability theoretic ideas and motivations discussed in this introductory section, but that they may be considered “deep background” and will not be a part of the exposition of the main ideas.) Π11 sets correspond to finite-path computable (or Π01 ) subtrees of ω 0 that if Γ ` ∆ is not provable, it is not true. If n = 0 and Γ ` ∆ is not provable, then both Γ and ∆ are, in effect, subsets of

fulldefaultsequent.tex; 18/06/2004; 16:12; p.14

Predicate Nonmonotone Sequent Calculi

15

BH and Γ ∩ ∆ = ∅. In that case, Γ itself is a model of Γ which excludes all members of ∆. Now let us assume that n > 0. If Γ, (p ← q1 , . . . , qm ) ` ∆ is not provable, then either Γ, p ` ∆ is not provable or Γ ` qi , ∆ is not provable for some 1 ≤ i ≤ m. By our induction hypothesis, any of the sequents just listed which is unprovable is also not true. Thus, either there is a model M of Γ, p which excludes all of ∆ or there is a model M of Γ which excludes not only all of ∆ but also excludes some qi . In either case, M is a model of Γ, (p ← q1 , . . . , qm ) which excludes all of ∆ and hence Γ, (p ← q1 , . . . , qm ) ` ∆ is not true. Example 3.2. Continuing to use the language of Example 2.2, let us give a sequent proof that A(0), B(0) ← A(0) ` B(0). A(0) ` B(0), A(0) A(0), B(0) ` B(0) A(0), B(0) ← A(0) ` B(0) Both premises, in this case, are axioms. Antisequents will be defined in a way quite similar to sequents. A monotone logic program antisequent is a pair hΓ, ∆i usually written Γ 0 ∆ with Γ a finite ground Horn program and ∆ a finite subset of BH . An antisequent Γ 0 ∆ will be considered true if there is a model of Γ which excludes all of ∆. Although we will again need only one axiom scheme, Γ ` ∆ with Γ ⊆ BH and Γ ∩ ∆ = ∅, we will need two antisequent rules: Γ0∆ Γ 0 qi (for any 1 ≤ i ≤ m) Γ, (p ← q1 , . . . , qm ) 0 ∆

and

Γ, p 0 ∆ . Γ, (p ← q1 , . . . qm ) 0 ∆

Proposition 3.3. Monotone logic program antisequent Γ 0 ∆ is provable if and only if it is true. Proof. Again, the soundness of the axiom is apparent. If Γ ⊆ BH and Γ ∩ ∆ = ∅, then Γ itself is a model of Γ excluding ∆. The soundness of each of the rules is also easy to see. If there are models M 0 and M 00 of Γ excluding all of ∆ and some qi respectively, then M , the least model of Γ, will exclude all of ∆ and at least one of the qi ’s. That means that M is a model of Γ, (p ← q1 , . . . , qm ) which excludes all of ∆. Even more simple is the other rule. Any model of Γ, p is also a model of Γ, (p ← q1 , . . . , qm ), so if there is a model of Γ, p which excludes ∆, the same model will also be a model of Γ, (p ← q1 , . . . , qm ) which excludes ∆. To show that any antisequent Γ 0 ∆ which is not derivable is false we will again use induction on the number n of rules in Γ which are of

fulldefaultsequent.tex; 18/06/2004; 16:12; p.15

16

R.S. Milnikel

the form p ← q1 , . . . , qm with m > 0. If n = 0, Γ ⊆ BH but Γ 0 ∆ is not provable, so Γ ∩ ∆ 6= ∅. Of course any p ∈ Γ (technically p ← is in Γ) will be a member of any model of Γ, so if Γ ∩ ∆ 6= ∅, no model of Γ will exclude all of ∆. If n > 0, assume that Γ, (p ← q1 , . . . , qm ) 0 ∆ is not derivable. This means that either Γ 0 ∆ is not provable or Γ 0 qi is not provable for all 1 ≤ i ≤ m (and by inductive hypothesis not true). Thus, either it is the case that every model of Γ contains some element of ∆ or it is the case that every model of Γ contains all of {q1 , . . . , qm }. By the non-derivability of Γ, (p ← q1 , . . . , qm ) 0 ∆ we also know that Γ, p 0 ∆ is not derivable and by induction not true. This means that every model of Γ, p contains some element of ∆. Let M be any model of Γ, (p ← q1 , . . . , qm ). Because M is a model of Γ, either it contains some element of ∆, or it contains all of {q1 , . . . , qm }. If M is a model of p ← q1 , . . . , qm and {q1 , . . . , qm } ⊆ M , then p ∈ M . If M is a model of Γ and p ∈ M , then M is a model of Γ, p and thus contains some element of ∆. We have just shown that any model of Γ, (p ← q1 , . . . , qm ) contains some element of ∆ and thus that Γ, (p ← q1 , . . . , qm ) 0 ∆ is not true. Example 3.4. Continuing to use the language of Example 2.2, let us show that A(3), (A(0) ← A(6), N (6, 0)), (G(7, 4) ← G(6, 4)) 0 A(0). A(3), G(7, 4) 0 A(0) A(3), G(7, 4) 0 A(6) A(3), G(7, 4), (A(0) ← A(6), N (6, 0)) 0 A(0) A(3), (G(7, 4) ← G(6, 4)), (A(0) ← A(6), N (6, 0)) 0 A(0) Both top sequents are axioms. 3.2. Skeptical Sequent Calculus One can think of Gentzen proof systems as failed exhaustive searches for countermodels. Thus, what we will want to do as we search for a countermodel to the claim “All stable models of program P contain p” is keep track of which elements of BH are in and out of our potential countermodel to the claim. We will want to make sure that all elements of BH we would like to see in our potential countermodel do, in fact, have proofs; and we want also to make sure that all elements of BH we plan to exclude do not have proofs. Finally, we will use our increasing information about the potential countermodel to determine which clauses of P will be dismissed as irrelevant and which will be retained as Horn clauses in the reduct.

fulldefaultsequent.tex; 18/06/2004; 16:12; p.16

Predicate Nonmonotone Sequent Calculi

17

The sequents for skeptical reasoning for logic programs will be triples hΣ, Γ, ∆i, usually notated Σ; Γ|∼∆. This notation is drawn directly from [6]. The sets Γ and ∆ are fairly straightforward. Γ is a ground logic program and ∆ is a subset of BH , neither necessarily finite. The set Σ is more complicated. In Bonatti and Olivetti’s formulation, it was a finite collection provability constraints of the form Lp or ¬Lp where p ∈ BH . The intention was to suggest the modal operator L, and indicate whether p was in or out of our potential countermodel, as it exists so far. We will need to extend the notion of a provability constraint to be more explicit than “p can be proved.” We will need to be able to say “p can be proved from these specific rules.” Thus, in addition to provability constraints of the form Lp and ¬Lp (which we will call implicit provability constraints), we will also include explicit provability constraints LΓ p where Γ is a finite ground Horn program. The intended meaning of LΓ p is “Γ ` p.” Together, explicit and implicit provability constraints will be known as general provability constraints. We can now finally describe Σ as a finite set of general provability constraints. We will say that a M ⊆ BH satisfies Lp if p ∈ M and satisfies ¬Lp if p ∈ / M . We will say that M satisfies LΓ p if p ∈ M and in addition Γ ` p. The reader may wonder why we do not need explicit provability constraints of the form ¬LΓ p. We will be making claims both of the form “p has a proof” and of the form “p has no proof”. To contradict a claim of the form “p has no proof,” it is necessary simply to exhibit a single proof of p. On the other hand, to contradict a claim of the form “p has a proof,” we must look at all possible proofs of p, that is, all (relevant) explicit proof constraints. Before we proceed to the axioms and rules for the skeptical sequent calculus, let us establish the meaning of the sequents. We will say that Σ; Γ|∼∆ is true if every stable model M of the program Γ which satisfies all constraints in Σ includes at least one member of ∆. Thus, p is a skeptical consequence of the logic program P if ∅; ground(P )|∼p is a true sequent. (As usual, we will abuse notation by writing p for {p} and ∆, p for ∆ ∪ {p} in sequents.) We are now finally in a position to define the sequent calculus for skeptical reasoning in stable model logic programming. This calculus incorporates three sorts of sequents, in fact: monotone logic program sequents, monotone logic program antisequents, and the skeptical reasoning sequents just defined. The sequent calculus for skeptical reasoning will include all axioms and rules of the monotone sequent and antisequent calculi, plus five new rules. (No additional axioms will be necessary. The leaves of every proof tree will be monotone sequent and antisequent axioms.)

fulldefaultsequent.tex; 18/06/2004; 16:12; p.17

18

R.S. Milnikel

Definition 3.5 (Skeptical Sequent Calculus—Logic Programming). The axioms of the skeptical sequent calculus are monotone logic program sequents Γ ` ∆ with Γ ⊆ BH and Γ ∩ ∆ 6= ∅; and monotone logic program antisequents Γ 0 ∆ with Γ ⊆ BH and Γ ∩ ∆ = ∅. The rules are: 0. The three rules of the monotone sequent and antisequent calculi. 1.

2.

3.

4.

5.

Σ0 , Γ0 ` ∆0 where Γ0 ⊆ Γ is a finite ground Horn program, Σ0 ⊆ Σ; Γ|∼∆ ({p|Lp ∈ Σ} ∪ {p|LΓ00 p ∈ Σ for some Γ00 }), and ∆0 ⊆ ∆ is finite. Σ 0 , Γ0 ` p where Γ0 ⊆ Γ is a finite ground Horn program, Σ0 ⊆ ¬Lp, Σ; Γ|∼∆ ({p|Lp ∈ Σ} ∪ {p|LΓ00 p ∈ Σ for some Γ00 }). Γ0 0 p where Γ0 is a finite ground Horn program. LΓ0 p, Σ; Γ|∼∆ {LΓ00 p, Σ, Σ00 ; Γ00 , (Γ \ Γ0 )|∼∆|Γ0 ⊆ Γ is finite}

where Γ00 = {p ← Lp, Σ; Γ|∼∆ q1 , . . . , qm | p ← q1 , . . . , qm , not r1 , . . . , not rn ∈ Γ0 }, Σ00 = {¬Lr|r = rj for some p ← q1 , . . . , qm , not r1 , . . . , not rn ∈ Γ0 and some 1 ≤ j ≤ n}. ¬Lr1 , . . . , ¬Lrn , Σ; Γ, (p ← q1 , . . . , qm )|∼∆ Lr1 , Σ; Γ|∼∆ · · · Lrn , Σ; Γ|∼∆ Σ; Γ, (p ← q1 , . . . , qm , not r1 , . . . , not rn )|∼∆

The reader may recall from the introduction that we noted that infinitary rules of inference would be necessary in some cases. When applied to a sequent with an infinite Γ, rule 4 has infinitely many premises. Let us examine what each of these rules accomplishes, thinking of ourselves as traversing a completed proof backwards, from conclusions to premises, examining each branch as a failed attempt to find a counterexample to the assertion made at the root of the tree. Just as we are moving backwards through the proof, let us also move backwards through the rules. Rule 5 says: “Either clause p ← q1 , . . . , qm , not r1 , . . . , not rn is relevant or it is not. If it is relevant, make sure that the context reflects that, and put the reduct p ← q1 , . . . , qm into our list of usable Horn clauses. If it is not relevant, it must be because one of the rj ’s is in the context.” Rule 4 says: “If we are asserting that p is in the stable model we are trying to build, it must have a proof from the available clauses.

fulldefaultsequent.tex; 18/06/2004; 16:12; p.18

Predicate Nonmonotone Sequent Calculi

19

Because in different stable models, it might have different proofs, we will need to examine each possible proof independently. If non-Horn clauses from Γ are used, update the context to reflect their usability and replace them in Γ with their reducts.” Rule 3 says: “If we have said that Γ0 ` p and yet we can show that Γ0 0 p, show this and stop.” Rule 2 says: “If we have said that p has no proof, and yet from what we already know about the potential stable model we are building we can show that that model must contain p, show this and stop.” Rule 1 says: “If from what we already know about the potential stable model we are building, we can show that a member of ∆ must be in that stable model, show this and stop.” Before we state and prove the soundness and completeness theorems for the skeptical sequent calculus, let us finish the journey started in Example 2.2 and continued in Examples 2.6, 2.18, 3.2, and 3.4. Because of the complexity of the example, the long lists of clauses involved, and the infinite numbers of premises, we will not write out a complete proof, or even assemble the parts we will look at in detail. We will consider the sequents we will need on an individual basis and leave it to the reader to assemble the proof in something like its entirety. Example 3.6. We stated in Example 2.18 that B(0) is in the set of skeptical consequences of program P from Example 2.2. Let us now show how our skeptical sequent calculus would prove this. We will again use the abbreviation HP to refer to the entire Horn portion of ground(P ). The sequent we want to prove, then is: ; HP , (A(0) ← not A(0)), (A(1) ← not A(1)), (A(2) ← not A(2)), . . . |∼B(0). We will prove this sequent by rule 5. The two premises we will need are: ¬LA(0); HP , A(0), (A(1) ← not A(1)), (A(2) ← not A(2)), . . . |∼B(0) and LA(0); HP , (A(1) ← not A(1)), (A(2) ← not A(2)), . . . |∼B(0). These sequents will have very different proofs. We can prove the former by means of rule 2, since A(0) and B(0) ← A(0) are among the Horn clauses in the Γ of the sequent, and we saw in Example 3.2 a proof of A(0), (B(0) ← A(0)) ` B(0). The latter we will prove by means of rule 4, which will have infinitely many premises, each of the form LΓ00 , Σ00 ; Γ00 , (Γ \ Γ0 )|∼B(0)

fulldefaultsequent.tex; 18/06/2004; 16:12; p.19

20

R.S. Milnikel

where Γ = HP ∪{(A(1) ← not A(1)), (A(2) ← not A(2)), (A(3) ← not A(3)), . . .}. We will look at a few representative premises. In each case, writing out the sequent with Γ0 and the other terms expanded to fit the particular case would be unwieldy, so we will simply use the template above and refer to Γ00 and so forth by name. − In the case that Γ0 consists of A(3) ← not A(3) and A(0) ← A(3), N (3, 0) plus enough of HP to prove N (3, 0), Γ00 will consist of A(3) and A(0) ← A(3), N (3, 0) together with the rest of the Horn portions of Γ0 . Σ00 will consist of ¬LA(3). In this case, the premise can be proved using rule 1, since A(3) ∈ Γ00 and B(0) ← A(3) ∈ (Γ \ Γ0 ), and A(3), (B(0) ← A(3)) ` B(0). − In the case that Γ0 consists of A(3) ← not A(3), A(0) ← A(3), N (3, 0), and A(4) ← not A(4), plus enough of HP to prove N (3, 0), we could proceed just as in the above case. We do have another option open to us in this case, though, which will illustrate the use of rule 2. Γ00 will include both A(3) and A(4), while Σ00 will consist of both ¬LA(3) and ¬LA(4). By taking A(3) from Γ00 and the relevant portions of HP from Γ\Γ0 , we can show that A(3), (A(4) ← A(3), N (3, 4)), (N (3, 4) ← L(3, 4)), L(3, 4) ` A(4) and use rule 2 to prove the desired sequent. − In the case that Γ0 is drawn entirely from HP , say Γ0 consists of G(7, 4) ← G(6, 4) and A(0) ← A(6), N (6, 0), we see that Γ00 = Γ0 , and we can show Γ00 0 A(0). That is to say we can prove (G(7, 4) ← G(6, 4)), (A(0) ← A(6), N (6, 0)) 0 A(0) and use rule 3 to prove our sequent. We have seen that we can derive at least some of the sequents which are rule 4 premises using rules 1, 2, and 3. In fact, all of the infinite set of premises of our particular application of rule 4 can be proved using these three rules. One application of rule 4 gets us one of our two premises of our desired case of rule 5, and the other was proved directly by rule 2. With one application of rule 5, our deduction is complete. Theorem 3.7. If a stable model logic programming skeptical reasoning sequent Σ; Γ|∼∆ is provable then it is true.

fulldefaultsequent.tex; 18/06/2004; 16:12; p.20

Predicate Nonmonotone Sequent Calculi

21

Proof. We will establish the soundness of each of our rules: 0. The soundness of the monotone sequent and antisequent rules has already been established. 1. Any stable model M of Γ satisfying Σ will contain Σ0 and will be closed under all clauses of Γ0 , so if any subset of BH containing Σ0 and closed under Γ0 must contain an element of ∆, then of course M must contain an element of ∆. 2. Any stable model M of Γ satisfying Σ will contain Σ0 and will be closed under all clauses of Γ0 and so must contain p. Thus, there will be no stable model of Γ satisfying Σ and ¬Lp, and the conclusion is vacuously true. 3. If Γ0 0 p, then it is impossible for any subset M of BH to satisfy LΓ0 p, and thus the conclusion is vacuously true. 4. Suppose that the conclusion of the rule, Lp, Σ; Γ|∼∆, were false. That is, assume that there is a stable model M of Γ satisfying Σ with M ∩ ∆ = ∅ and p ∈ M . Because p is in the least Herbrand model of ΓM , there must be some finite Γ00 ⊆ ΓM such that p is in the least Herbrand model of Γ00 . Define Γ0 as the set of clauses of Γ whose M -reducts form Γ00 . Because Γ0 consists entirely of rules which survive the M -reduction process, and because of the way Σ00 was defined, we get essentially for free that M is a stable model of Γ00 ∪ (Γ \ Γ0 ) satisfying Σ00 ∪ Σ. M is therefore a witness that LΓ00 p, Σ00 , Σ; Γ00 , (Γ \ Γ0 )|∼∆ is false. Thus, if all premises of rule 4 are true, so is the conclusion. 5. Suppose that the conclusion of the rule, Σ; Γ, (p ← q1 , . . . , qm , not r1 , . . . , not rn )|∼∆, were false. That is, suppose that there is a stable model M of program Γ, (p ← q1 , . . . , qm , not r1 , . . . , not rn ) satisfying the constraints Σ and M ∩ ∆ = ∅. If {r1 , . . . , rn } ∩ M = ∅, then M is also a stable model of Γ, (p ← q1 , . . . , qm ). (Because {r1 , . . . , rn } ∩ M = ∅, the reduct p ← q1 , . . . , qm of p ← q1 , . . . , qm , not r1 , . . . , not rn would appear in ΓM , so M must satisfy p ← q1 , . . . , qm .) Thus, if {r1 , . . . , rm }∩M = ∅, M witnesses that ¬Lr1 , . . . , ¬Lrm , Σ; Γ, (p ← q1 , . . . , qm )|∼∆ is false. If, on the other hand rj ∈ M , then M is also a stable model of Γ (because p ← q1 , . . . , qm , not r1 , . . . , not rn would be excluded in any reduction using M as context). Thus, if

fulldefaultsequent.tex; 18/06/2004; 16:12; p.21

22

R.S. Milnikel

rj ∈ M , M witnesses that Lrj , Σ; Γ|∼∆ is false. What we have just shown is that if the conclusion of rule 5 is false, so is some premise. This completes the argument for the soundness of the rules. Theorem 3.8. A stable model logic programming skeptical reasoning sequent Σ; Γ|∼∆ is true then it is provable. Proof. We will show the contrapositive of our completeness theorem. Let us assume that sequent Σ0 ; Γ0 |∼∆0 has no proof. We will build a failed attempt at a proof which will be guaranteed to have at least one branch not terminating in an axiom. The context developed on this branch will be a witness to the falsehood of Σ0 ; Γ0 |∼∆0 . Choose an arbitrary well-ordering of the tree ω