Misplaced Pages

Clause (logic)

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
A disjunction of literals, used in propositional or predicate logic. For other uses, see Clause (disambiguation).

In logic, a clause is a propositional formula formed from a finite collection of literals (atoms or their negations) and logical connectives. A clause is true either whenever at least one of the literals that form it is true (a disjunctive clause, the most common use of the term), or when all of the literals that form it are true (a conjunctive clause, a less common use of the term). That is, it is a finite disjunction or conjunction of literals, depending on the context. Clauses are usually written as follows, where the symbols l i {\displaystyle l_{i}} are literals:

l 1 l n {\displaystyle l_{1}\vee \cdots \vee l_{n}}

Empty clauses

A clause can be empty (defined from an empty set of literals). The empty clause is denoted by various symbols such as {\displaystyle \emptyset } , {\displaystyle \bot } , or {\displaystyle \Box } . The truth evaluation of an empty disjunctive clause is always f a l s e {\displaystyle false} . This is justified by considering that f a l s e {\displaystyle false} is the neutral element of the monoid ( { f a l s e , t r u e } , ) {\displaystyle (\{false,true\},\vee )} .

The truth evaluation of an empty conjunctive clause is always t r u e {\displaystyle true} . This is related to the concept of a vacuous truth.

Implicative form

Every nonempty (disjunctive) clause is logically equivalent to an implication of a head from a body, where the head is an arbitrary literal of the clause and the body is the conjunction of the complements of the other literals. That is, if a truth assignment causes a clause to be true, and all of the literals of the body satisfy the clause, then the head must also be true.

This equivalence is commonly used in logic programming, where clauses are usually written as an implication in this form. More generally, the head may be a disjunction of literals. If b 1 , , b m {\displaystyle b_{1},\ldots ,b_{m}} are the literals in the body of a clause and h 1 , , h n {\displaystyle h_{1},\ldots ,h_{n}} are those of its head, the clause is usually written as follows:

h 1 , , h n b 1 , , b m . {\displaystyle h_{1},\ldots ,h_{n}\leftarrow b_{1},\ldots ,b_{m}.}
  • If n = 1 and m = 0, the clause is called a (Prolog) fact.
  • If n = 1 and m > 0, the clause is called a (Prolog) rule.
  • If n = 0 and m > 0, the clause is called a (Prolog) query.
  • If n > 1, the clause is no longer Horn.

See also

References

  1. Chang, Chin-Liang; Richard Char-Tung Lee (1973). Symbolic Logic and Mechanical Theorem Proving. Academic Press. p. 48. ISBN 0-12-170350-9.

External links

Stub icon

This logic-related article is a stub. You can help Misplaced Pages by expanding it.

Categories: