foundations of computational agents
The complete knowledge assumption, as discussed in Section 5.6, is the assumption that any statement that does not follow from a knowledge base is false. It also allows for proof by negation as failure.
To extend the complete knowledge assumption to logic programs with variables and functions symbols, we require axioms for equality, and the domain closure, and a more sophisticated notion of the completion. Again, this defines a form of negation as failure.
Suppose a relation is defined by
The complete knowledge assumption would say that these three are the only students:
That is, if is , , or , then is a student, and if is a student, must be one of these three. In particular, is not a student.
Concluding requires proving prove . To derive the inequalities, the unique names assumption is required.
The Clark normal form of the clause
is the clause
Suppose all of the clauses for are put into Clark normal form, with the same set of introduced variables, giving
which is equivalent to
This implication is logically equivalent to the set of original clauses.
Clark’s completion of predicate is the equivalence
where negation as failure () in bodies is replaced by standard logical negation (). The completion means that is true if and only if at least one body is true.
For the clauses
the Clark normal form is
which is equivalent to
The completion of the predicate is
Consider the following recursive definition:
In Clark normal form, this can be written as
Here, we have removed the equalities that specify renaming of variables and have renamed the variables as appropriate. Thus, Clark’s completion of is
Under the complete knowledge assumption, relations that cannot be defined using only definite clauses can now be defined.
Suppose you are given a database of that is true if is a course, and , which means that student is enrolled in course . Without the complete knowledge assumption, you cannot define which is true if there are no students enrolled in course . This is because there is always a model of the knowledge base where every course has someone enrolled.
Using negation as failure, can be defined by
The completion of this is
Here we offer a word of caution. You should be very careful when you include free variables within negation as failure. They usually do not mean what you think they might. We introduced the predicate in the previous example to avoid having a free variable within a negation as failure. Consider what would have happened if you had not done this:
One may be tempted to define in the following manner:
which has the completion
This is not correct. Given the clauses
is an instance of the preceding clause for which the body is true, and the head is false, because is not an empty course. This is a contradiction to the truth of the preceding clause.
Note that the completion of the definition in Example 13.50 is equivalent to
The existence is in the scope of the negation, so this is equivalent to