Suppose we have the following program:
human(socrates).
day(tomorrow).
die(X) :- human(X).
may_go_to_school(Y) :- day(Y),
not holiday(Y).
If we run clingo to aquire the answer set of the program, we get
Answer: 1
human(socrates) day(tomorrow) die(socrates) may_go_to_school(tomorrow)
We know the grounder will firstly instantiate all the variables into constants, so the program after grounding will be:
human(socrates).
day(tomorrow).
die(socrates) :- human(socrates).
may_go_to_school(tomorrow) :- day(tomorrow),
not holiday(tomorrow).
I read in book from Gelfond it gives 3 rules to acquire the answer sets:
Satisfy the rules of Π. In other words, believe in the head of a rule if you believe in its body.
Do not believe in contradictions.
Adhere to the “Rationality Principle” which says: “Believe nothing you are not forced to believe.”
Here in the rule:
may_go_to_school(tomorrow) :- day(tomorrow),
not holiday(tomorrow).
we got a negation as failure not holiday(tomorrow)
As is illustrated in this book:
Symbol
not
is a new logical connective called default negation, (or negation as failure); not l is often read as “it is not believed that l is true.” Note that this does not imply that l is believed to be false. It is conceivable, in fact quite normal, for a rational reasoner to believe neither statementp
nor its negation,¬p
.
Then based on rule 1, believe in the head of a rule if you believe in its body
, should I believe the body not holiday(tomorrow).
since I should believe neither holiday(tomorrow).
nor ¬holiday(tomorrow).
?
According to the answer, I should believe ¬holiday(tomorrow).
- Then why do we need this negation as failure?
- Can we just use classical negation?
not
and its semantics. – Telesthesia