How to understand negation as failure in ASP?

Suppose I write instead:

may_go_to_school(D) :- not holiday(D).

Which answers do you expect, i.e., what are the models of this? And what is actually given?

The key issue is that negation as failure is straight-forward to implement, but does not fully capture what we mean with ¬ in logic. For example, what about D = hello?


Can we just use classical negation?

Well it seems we can't. The problem is that we can't implement logical negation. The main idea is that Prolog generates a model (Herbrand model) for your program-theory. When we add negation, semantics of the program change so that Prolog may not be able to find a model using sld resolution. So negation as failure has the advantage that we can have a negation (not exactly logical negation) and still not having problems with program semantics like we had with classical negation.

You can take a look in my relevant question: Logical Negation in Prolog. This question does not ask exactly the same thing as this question, but @j4n bur53 in his answer describes why we can't have logical negation.