The Negation-as-Failure Rule

The suppression task revisited


Computational Logic and Human Thinking, Chapter 5 (75-91), Appendix A4 (284-289)



Negation-as-Failure and Negation-Introduction

Negation-as-failure (NAF) is not the negation-introduction rule of classical logic. NAF says that a failure to prove φ is a proof of ¬φ. The classical rule says if a contradiction is a consequence of a set of premises and assumption φ, then ¬φ is a consequence of these premises:


    [A]¹
     .
     .
     .
     ⊥
  ------- ¬I,1
    ¬A
     

Negation-as-Failure in Defeasible Reasoning

It may seem that NAF is used in everyday reasoning. Suppose, for example, I look at a schedule of flights from Phoenix to San Francisco. Suppose that I don't see one listed as leaving at 10:00am. So I conclude that it is not the case that a flight leaves at that time. This inference seems entirely reasonable, but it is not sanctioned by the classical negation-introduction rule.

What makes it rational to reason in this way?

The answer might be what is called the closed world assumption. "The use of negation as failure to derive a negative conclusion is justified by the closed world assumption that you have complete knowledge about all the conditions under which the positive conclusion holds" (Kowalksi, Computational Logic and Human Thinking, 79). If we think we know the complete list of flights from Phoenix to San Francisco, it seems reasonable to conclude that no flight leaves at a certain time if, on the basis of the list, we are unable to prove that there is a flight that leaves at that time.

Given this justification, however, the reasoning looks more like conclusive reasoning than defeasible reasoning. It seems that we would have to give up our belief that we had a complete list of flight times if we were to discover that there is a flight that leaves for San Francisco at 10:00am. In this case, the reasoning is not defeasible. It is conclusive.

A clearer example of a use of NAF is in the kind of defeasible reasoning Kowalski calls "default reasoning, in which an agent jumps to a conclusion, but then withdraws the conclusion given new information that leads to the contrary of the conclusion" (Computational Logic and Human Thinking, 81). Default reasoning does not depend on the closed world assumption.

(Kowalski can seem to say that defeasible and default reasoning are the same thing. (Computational Logic and Human Thinking, 46, 79). His characterization, though, of default reasoning in terms of the agent withdrawing "the conclusion given new information that leads to the contrary of the conclusion" does not allow for undercutting defeaters.)

To understand NAF in default reasoning, consider Kowalski's a slight variation on "innocent unless proven guilty" example (Computational Logic and Human Thinking, 84).

A person is innocent of a crime if the person is accused of the crime and it is not the case that the person committed the crime.
A person committed a crime if another person witnessed the person commit the crime.
Bob is accused of the crime of robbing a bank

Suppose we put to this logic program the query

Bob is innocent of the crime of robbing a bank.

If the negation in the first rule is NAF, then the query will succeed. If, however, we add to the the belief that someone witnessed Bob commit the crime of robbing a bank, the query will fail.


Negation-as-Failure in Logic Programming

Logic programming may be developed so that it allows for negation-as-failure.

Logic programs, as we have defined them, do not contain negations. So the first step is to allow negations to appear in the body of rules. Now a rule may have this form:

positive condition if positive conditions and negative conditions

In addition, the evaluation step must handle negative conditions. Consider the following logic program:

P if Q, not-R
R if S, T
Q
S

Suppose the query is

?-P

This query unifies with the head of the first rule. So the derived query becomes

?- Q, not-R

Q unifies with the head of the first fact. Since it (like all facts) has no body, the derived query is

?- not-R

This query succeeds just in case the following query fails

?- R

Does this query fail? Well, R unifies with the head of the second rule to produce the query

?- S, T

S unifies with the head of the second fact. Since it has no body, the new query is

?- T

This query does not unify with any head in the program. So the query

?- R

fails. Hence, the query

?- not-R

succeeds. And so the original query

?- P

succeeds. Given negation-as-failure, P is a consequence of the program.


The Suppression Task Revisited

Kowalski suggests, reasonably enough, that in everyday conversation it is common to state only the most important conditions of a general statement and to leave implicit that other conditions that apply. So, for example, in the example in the Suppression Task, the general statement is

If she has an essay to write, she will study late in the library.

If, according to Kowalski (Computational Logic and Human Thinking, 86), the underlying rule were made more explicit, it would look something like this:

If she as an essay to write, and it is not the case that she is prevented from studying late in the library,
then she will study late in the library.

To set out this more formally, let the sentences be symbolized as follows:

E = She has an essay to write
L = She will study late in the library
P = She is prevented from studying late in the library

The corresponding logic program is

L if E, not-P
E

Relative to this program, the query

?- L

succeeds. This is what we expect. Here is the computation. L unifies with the head of the rule. The new query list is

?- E, not-P.

E unifies with the head of the fact. Facts have no tails. So now the query is

?- not-P.

This 'not' is negation-as-failure. So the query succeeds if the query

?- P

fails. This query fails. So L is a consequence of the program given negation-as-failure.


New information Suppresses the Prior Conclusion

In the experiment, the subjects suppress their prior conclusion upon receiving the new information

If the library is open, she will study late in the library.

So this information needs to be incorporated into the logic/programming model in such a way that the query

?- L.

fails. How this works can be a little confusing.


A first attempt to incorporate new information

The idea, first of all, is that this new information makes explicit a condition that was implicit:

She is prevented from studying late in the library if the library is not open.

If this new information is incorporated, it would seem that the logic program becomes

L if E, not-P
E
P if not-O

Relative to this program, the query

?- L

fails. Here is the computation. L unifies with the head of the first rule. The new query list is

?- E, not-P.

E unifies with the head of the first fact. It has no tail. So now the query is

?- not-P.

This 'not' is negation-as-failure. So the query succeeds if the query

?- P

fails. P unifies with the head of the second rule. This produces the derived query

?- not-O.

This query succeeds if the query

?-O

fails. This query fails. O does not unify with any head in the program. So L is not a consequence of the program.


Does incorporating the new information this way explain the suppression?

The answer, it seems, is 'no.' There are lots of possible conditions that would present the subject from studying in the library

She is prevented from studying late in the library if the library is not open.
She is prevented from studying late in the library if she is unwell.
She is prevented from studying late in the library if she has an important meeting.

and so on. Merely becoming aware of these conditions, it seems, should not be enough to "suppress" the conclusion.

Plus, it is clear from considering this list of possible conditions that there is no guarantee that the preventing condition will be negative. In fact, it seems that we should not represent the condition as negative because the mere awareness of the condition should not "suppress" the conclusion that She will study late in the library.


How, then, is the new information incorporated so that it explains suppression?

One possibility is that the new information changes the logic program so that it is

E = She has an essay to write
L = She will study late in the library
O = The library is open

L if E, O
E

L is not a consequence of this logic program.


Another possibility is that the new information changes the logic program so that it is

E = She has an essay to write
L = She will study late in the library
P = She is prevented from studying late in the library
C = The library is closed

L if E, not-P
E
P if C
C

L is not a consequence of this logic program.


Which possibility is more plausible?

This second possibility can seem to be the more plausible of the two insofar as the new information is added to the logic program. In the first, the new information changes an entry in the program. The problem, though, is that one of the additions to the logic program in the second possibility is the belief that the library is closed. The justification for this addition is not immediately clear.


Which possibility does Kowalski intend?

His discussion (87) suggests that he thinks that the first possibility is correct. He says that the "higher-level representation"

she will study late in the library if she has an essay to write and it is not the case that she is prevented from studying late in the library.
she is prevented from studying late in the library if the library is not open.
she is prevented from studying late in the library if she is unwell.
she is prevented from studying late in the library if she has a more important meeting.
she is prevented from studying late in the library if she has been distracted.

is "compiled into" the following "lower-level representation":

she will study late in the library
if she has an essay to write
and the library is open and she is not unwell
and she doesn’t have a more important meeting
and she hasn’t been distracted.

Just why he thinks this happens, however, is unclear to me.


Problems for the New Logic Programming/Agent Model

The addition of negation-as-failure improves the logic programming/agent model, but it also highlights certain problems.


1. An agent is permitted to believe a given proposition if he notices that it is a consequence of what he believes, but negation-as-failure does not allow for this possibility. Although queries of the form "not-φ" can be consequences of a logic program, they cannot be added to the logic program as new beliefs. The form of beliefs in a logic program is

positive condition if positive conditions and negative conditions.


2. Belief revision is also a problem. This is a problem for the old and the new model.

Suppose that an agent notices that a given proposition is a logical consequence of what he believes. He is permitted to add the consequence to his beliefs, but he is not required he add it. He might instead decide to give up one of his existing beliefs. There no way to make this decision in logic programming/agent model as we are understanding it.

Suppose an agent reasons that something is red because it looks red and is not a white object with a red light shinning on it.

R = The object is red.
L = The object looks red.
W = The object is white and has a red light shinning on it.

R if L, not-W
L.

Since R is a consequence of what the agent believes, he is permitted (but not required) to add R to his beliefs. Suppose that he does. Suppose further that subsequently he comes to believe that W is true. Now he should retract his belief in R. The logic programming/agent model as we are understanding it has no explicit mechanism for belief retraction.

Negation-As-Failure in Prolog

Here is an example prolog program (based on the movie Pulp Fiction) with negation-as-failure. According to the program, Vincent enjoys every kind of burger except a Big Kahuna Burger.


enjoys(vincent,X) :- burger(X), \+ big_kahuna_burger(X).

burger(X) :- big_mac(X).
burger(X) :- big_kahuna_burger(X).
burger(X) :- whopper(X).
 
big_mac(a).
big_mac(c).
big_kahuna_burger(b).
whopper(d).

Suppose we ask whether there is something Vincent enjoys. Here is a screenshot with the query:


tom:arch [~/Desktop]
% swipl     
Welcome to SWI-Prolog (threaded, 64 bits, version 7.6.4)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?- consult('big_kauna.pl').
true.

?- enjoys(vincent,X).
X = a ;
X = c ;
X = d.

?- 

Here is the first computation. The query unifies with the head of the first rule to produce the derived query list

burger(X), \+ big_kahuna_burger(X)

The first conjunct in this query unifies with the head of first rule in the definition. Now the derived query is

big_mac(X), \+ big_kahuna_burger(X)

The first conjunct of the derived query unifies with the first fact in the program. Now the derived query is

\+ big_kahuna_burger(a)

This succeeds if

big_kahuna_burger(a)

fails. This query fails. It unifies with the head of nothing in the program.



What we have accomplished in this lecture

We looked at the negation-as-failure rule (NAF). We distinguished it from the negation-introduction rule of classical logic. We considered how NAF is used in default reasoning. We looked at how to incorporate NAF into logic programming. We looked at Kowalski's use of default reasoning in his solution to the Suppression Task. We considered an example of NAF in Prolog.







move on g back