To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

Negation as failure

From Wikipedia, the free encyclopedia

Negation as failure (NAF, for short) is a non-monotonic inference rule in logic programming, used to derive (i.e. that is assumed not to hold) from failure to derive . Note that can be different from the statement of the logical negation of , depending on the completeness of the inference algorithm and thus also on the formal logic system.

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.

More generally, this kind of negation is known as weak negation,[1][2] in contrast with the strong (i.e. explicit, provable) negation.

YouTube Encyclopedic

  • 1/5
    Views:
    8 130
    336
    22 387
    735
    72 631
  • Prolog - Negation as Failure
  • Prolog: Negation by Failure
  • CUT and Fail in PROLOG
  • Negation & Affirmation | Psychoanalysis of Jacques Lacan
  • I almost failed calculus. Today I'm a math prof.

Transcription

Planner semantics

In Planner, negation as failure could be implemented as follows:

if (not (goal p)), then (assert ¬p)

which says that if an exhaustive search to prove p fails, then assert ¬p.[3] This states that proposition p shall be assumed as "not true" in any subsequent processing. However, Planner not being based on a logical model, a logical interpretation of the preceding remains obscure.

Prolog semantics

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 as well as and .

Completion semantics

The semantics of NAF remained an open issue until 1978, when 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 formalize 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 is closely related both to circumscription and to the closed world assumption.

Autoepistemic semantics

The completion semantics justifies interpreting the result of a NAF inference as the classical negation of . However, in 1987, 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 in 1988, and is the basis of answer set programming.

The autoepistemic 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

Δ = {not p | p is not implied by P ∪ Δ}

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,

has no stable expansions.

has exactly one stable expansion Δ = {not q}

has exactly two stable expansions Δ1 = {not p} and Δ2 = {not q}.

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

(the closed world assumption) and
( holds by default).

Footnotes

  1. ^ Bílková, M.; Colacito, A. (2020). "Proof Theory for Positive Logic with Weak Negation". Studia Logica. 108 (4): 649–686. arXiv:1907.05411. doi:10.1007/s11225-019-09869-y. S2CID 195886568.
  2. ^ Wagner, G. (2003). "Web Rules Need Two Kinds of Negation" (PDF). In Bry, F.; Henze, N.; Maluszynski, J. (eds.). Principles and Practice of Semantic Web Reasoning. PPSW3 2003. Lecture Notes in Computer Science. Vol. 2901. Lecture Notes in Computer Science: Springer. pp. 33–50. doi:10.1007/978-3-540-24572-8_3. ISBN 978-3-540-24572-8.
  3. ^ Clark, Keith (1978). "Negation as a failure" (PDF). Logic and Data Bases. Springer-Verlag. pp. 293–322. doi:10.1007/978-1-4684-3384-5_11. ISBN 978-1-4684-3384-5.

References

External links

  • Report from the W3C Workshop on Rule Languages for Interoperability. Includes notes on NAF and SNAF (scoped negation as failure).
This page was last edited on 11 October 2023, at 21:35
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.