In pure Prolog, NAF literals of the form can occur in the body of clauses and can be used to derive other NAF literals. For example, given only the four clauses
NAF derives , and .
The semantics of NAF remained an open issue until Keith Clark  showed that it is correct with respect to the completion of the logic program, where, loosely speaking, "only" and are interpreted as "if and only if", written as "iff" or "".
For example, the completion of the four clauses above is
The NAF inference rule simulates reasoning explicitly with the completion, where both sides of the equivalence are negated and negation on the right-hand side is distributed down to atomic formulae. For example, to show , NAF simulates reasoning with the equivalences
In the non-propositional case, the completion needs to be augmented with equality axioms, to formalise the assumption that individuals with distinct names are distinct. NAF simulates this by failure of unification. For example, given only the two clauses
NAF derives .
The completion of the program is
augmented with unique names axioms and domain closure axioms.
The completion semantics justifies interpreting the result of a NAF inference as the classical negation of . However, Michael Gelfond  showed that it is also possible to interpret literally as " can not be shown", " is not known" or " is not believed", as in autoepistemic logic. The autoepistemic interpretation was developed further by Gelfond and Lifschitz  and is the basis of answer set programming.
The autoepistemics semantics of a pure Prolog program P with NAF literals is obtained by "expanding" P with a set of ground (variable-free) NAF literals Δ that is stable in the sense that
In other words, a set of assumptions Δ about what can not be shown is stable if and only if Δ is the set of all sentences that truly can not be shown from the program P expanded by Δ. Here, because of the simple syntax of pure Prolog programs, "implied by" can be understood very simply as derivability using modus ponens and universal instantiation alone.
A program can have zero, one or more stable expansions. For example
The autoepistemic interpretation of NAF can be combined with classical negation, as in extended logic programming and answer set programming. Combining the two negations, it is possible to express, for example