<s>
Negation	B-Application
as	I-Application
failure	I-Application
(	O
NAF	O
,	O
for	O
short	O
)	O
is	O
a	O
non-monotonic	O
inference	O
rule	O
in	O
logic	B-Language
programming	I-Language
,	O
used	O
to	O
derive	O
(	O
i.e.	O
</s>
<s>
Negation	B-Application
as	I-Application
failure	I-Application
has	O
been	O
an	O
important	O
feature	O
of	O
logic	B-Language
programming	I-Language
since	O
the	O
earliest	O
days	O
of	O
both	O
Planner	B-Application
and	O
Prolog	B-Language
.	O
</s>
<s>
In	O
Prolog	B-Language
,	O
it	O
is	O
usually	O
implemented	O
using	O
Prolog	B-Language
's	O
extralogical	O
constructs	O
.	O
</s>
<s>
More	O
generally	O
,	O
this	O
kind	O
of	O
negation	O
is	O
known	O
as	O
weak	B-Application
negation	I-Application
,	O
in	O
contrast	O
with	O
the	O
strong	O
(	O
i.e.	O
</s>
<s>
In	O
Planner	B-Application
,	O
negation	B-Application
as	I-Application
failure	I-Application
could	O
be	O
implemented	O
as	O
follows	O
:	O
</s>
<s>
However	O
,	O
Planner	B-Application
not	O
being	O
based	O
on	O
a	O
logical	O
model	O
,	O
a	O
logical	O
interpretation	O
of	O
the	O
preceding	O
remains	O
obscure	O
.	O
</s>
<s>
In	O
pure	O
Prolog	B-Language
,	O
NAF	O
literals	O
of	O
the	O
form	O
can	O
occur	O
in	O
the	O
body	O
of	O
clauses	O
and	O
can	O
be	O
used	O
to	O
derive	O
other	O
NAF	O
literals	O
.	O
</s>
<s>
The	O
semantics	O
of	O
NAF	O
remained	O
an	O
open	O
issue	O
until	O
1978	O
,	O
when	O
Keith	O
Clark	O
showed	O
that	O
it	O
is	O
correct	O
with	O
respect	O
to	O
the	O
completion	O
of	O
the	O
logic	B-Language
program	I-Language
,	O
where	O
,	O
loosely	O
speaking	O
,	O
"	O
only	O
"	O
and	O
are	O
interpreted	O
as	O
"	O
if	O
and	O
only	O
if	O
"	O
,	O
written	O
as	O
"	O
iff	O
"	O
or	O
""	O
.	O
</s>
<s>
The	O
completion	O
semantics	O
is	O
closely	O
related	O
both	O
to	O
circumscription	B-Application
and	O
to	O
the	O
closed	B-Application
world	I-Application
assumption	I-Application
.	O
</s>
<s>
However	O
,	O
in	O
1987	O
,	O
Michael	O
Gelfond	O
showed	O
that	O
it	O
is	O
also	O
possible	O
to	O
interpret	O
literally	O
as	O
"	O
can	O
not	O
be	O
shown	O
"	O
,	O
"	O
is	O
not	O
known	O
"	O
or	O
"	O
is	O
not	O
believed	O
"	O
,	O
as	O
in	O
autoepistemic	B-Application
logic	I-Application
.	O
</s>
<s>
The	O
autoepistemic	O
interpretation	O
was	O
developed	O
further	O
by	O
Gelfond	O
and	O
Lifschitz	O
in	O
1988	O
,	O
and	O
is	O
the	O
basis	O
of	O
answer	B-Application
set	I-Application
programming	I-Application
.	O
</s>
<s>
In	O
other	O
words	O
,	O
a	O
set	O
of	O
assumptions	O
Δ	O
about	O
what	O
can	O
not	O
be	O
shown	O
is	O
stable	B-Application
if	O
and	O
only	O
if	O
Δ	O
is	O
the	O
set	O
of	O
all	O
sentences	O
that	O
truly	O
can	O
not	O
be	O
shown	O
from	O
the	O
program	O
P	O
expanded	O
by	O
Δ	O
.	O
</s>
<s>
Here	O
,	O
because	O
of	O
the	O
simple	O
syntax	O
of	O
pure	O
Prolog	B-Language
programs	O
,	O
"	O
implied	O
by	O
"	O
can	O
be	O
understood	O
very	O
simply	O
as	O
derivability	O
using	O
modus	O
ponens	O
and	O
universal	O
instantiation	O
alone	O
.	O
</s>
<s>
A	O
program	O
can	O
have	O
zero	O
,	O
one	O
or	O
more	O
stable	B-Application
expansions	O
.	O
</s>
<s>
has	O
no	O
stable	B-Application
expansions	O
.	O
</s>
<s>
has	O
exactly	O
two	O
stable	B-Application
expansions	O
Δ1	O
=	O
 {  } 	O
and	O
Δ2	O
=	O
 {  } 	O
.	O
</s>
<s>
The	O
autoepistemic	O
interpretation	O
of	O
NAF	O
can	O
be	O
combined	O
with	O
classical	O
negation	O
,	O
as	O
in	O
extended	O
logic	B-Language
programming	I-Language
and	O
answer	B-Application
set	I-Application
programming	I-Application
.	O
</s>
