Please note that the content of this book primarily consists of articles available from Wikipedia or other free sources online. Negation as failure (NAF, for short) is a non-monotonic inference rule in logic programming, used to derive mathrm{not}~p (i.e. that ~p is assumed not to hold) from failure to derive ~p. Note that mathrm{not}~p is different from the stronger statement neg p of the logical negation of ~p. Negation as failure has been an important feature of logic programming since the earliest days of both Planner and Prolog. In Prolog, it is usually implemented using Prolog''s extralogical constructs.