AI Glossary / Graphs and symbolic AI / Beginner
Literal
Definition
A literal, in logic, is an atomic formula or the negation of an atomic formula. P is a positive literal, and NOT P is a negative literal. Literals are basic components of clauses and are central to satisfiability solving, resolution, and symbolic reasoning.
What it means
An atomic formula expresses a basic proposition or predicate application without being built from smaller formulas using logical connectives. A literal keeps that atom either positive or directly negated. For example, Ready and NOT Ready are literals, while Ready AND Paid is a compound formula containing two literals.
The word positive describes syntactic form, not whether the statement is true, desirable, or favorable. A positive literal can be false in an interpretation. A negative literal can be true. This logical meaning also differs from a programming-language literal, such as a number or a quoted string written directly in source code.
How it works
A truth assignment determines the truth of propositional atoms. Negation reverses that truth value, so complementary literals P and NOT P cannot both be true under one classical interpretation. Clauses combine literals with OR; a conjunction of clauses forms conjunctive normal form.
Reasoning procedures exploit these structures. A unit clause contains a single literal, and resolution combines clauses through complementary literals. In first-order logic, atoms may contain variables and arguments, such as Ready(x). Matching complementary predicate literals can require a substitution. The literal's syntax alone does not establish its truth or supply values for its variables.
Three practical examples
- A SAT encoding can represent a binary configuration choice with an atom and use its negation for the opposite choice.
- A rule explanation can show which positive or negative conditions occur in a clause.
- A proof trace can identify the complementary literals removed in a resolution step, making the inference easier to check.
Think of it this way
Think of a labeled switch and the statement that it is on or that it is not on. Those two forms correspond to an atom and its negation. The analogy is limited because logical atoms may express complex domain facts, and a first-order atom may contain variables rather than refer to one physical two-position switch.
Worked example
Let P mean the package is packed, L mean it is labeled, and S mean it is ready for shipment. These meanings are invented for this example. Consider the clause NOT P OR NOT L OR S. It contains three literals: negative P, negative L, and positive S.
Under the assignment P = true, L = true, and S = false, all three literals are false. Therefore the clause is false. Under P = false, L = true, and S = false, NOT P is true and the clause is true. That second assignment does not establish that the package is ready; it merely satisfies this particular implication-shaped rule.
The clause is equivalent to saying that if the package is packed and labeled, it is ready for shipment. Now add unit clauses P and L. Resolving the three-literal clause with P removes NOT P and gives NOT L OR S. Resolving that result with L gives S. The conclusion follows from the rule together with both facts.
Compare the expression NOT(P OR L). As written, it is not a literal because the negation applies to a compound formula. By De Morgan's law it is equivalent to NOT P AND NOT L, a conjunction of two literals. Equivalence does not mean the original compound expression itself has the literal syntax.
Finally, Ready(Item7) is an atomic predicate formula, so it is a positive first-order literal. NOT Ready(Item7) is its negative counterpart. The argument Item7 is part of the atom; it does not become a separate literal merely because it is written inside parentheses.
Illustrative case study
In a fictional rule editor, Ash Rules labels all negative literals as false conditions. A reviewer points out that NOT Archived can be true for a current document, while the positive atom Archived is false.
The team changes the display to distinguish polarity from evaluated truth. It also highlights whether a negation applies to one atom or to an entire compound expression. This invented case illustrates how a small terminology error can make an otherwise valid logical rule difficult to interpret.
Common misconceptions and mistakes
Negative literal does not mean false literal. It means an atom preceded by logical negation. Also, every literal is a formula, but not every formula is a literal.
Do not count the internal terms of a predicate as additional literals. Nor should the absence of P from a knowledge base automatically be treated as a stored negative literal NOT P. Whether lack of evidence supports negation depends on the system's assumptions and logic. Classical explicit negation and logic-programming negation-as-failure are different concepts, even when an interface uses similar-looking words.
Business use
The term is useful when reviewing symbolic rules, constraint encodings, and proof explanations. Make the meaning of each atom explicit and keep logical structure visible. A reader should be able to tell whether a rule negates a single condition or a compound condition.
Test a rule under representative assignments, including cases where an implication's premise is false. Separate the rule's truth from the truth of a desired conclusion. For first-order rules, document variable scope and the objects represented by arguments. These checks reduce misunderstandings before a rule is translated into a solver-specific representation.
People also ask
Can a negative literal be true?
Yes. NOT P is true when P is false in the interpretation.
Is P OR Q one literal?
No. It is a clause containing two literals.
Is NOT(P AND Q) a literal?
No. Its negation applies to a compound formula, although it can be transformed into an equivalent formula built from literals.
Check your understanding
Why does the shipment clause become true when P is false even if S is false?
Answer: NOT P is then true, and a disjunction is true when at least one of its literals is true. That does not independently establish S; it only satisfies the clause.
Related terms
- Negation
- Clause
- Unit clause
- Conjunctive normal form
- Complementary literals
- Resolution
- Predicate (logic)
- Atomic formula
- proposition
- predicate
- truth assignment
Learn next
Identify the literals in three clauses and evaluate each clause under two different truth assignments. Then practice converting a negated compound formula with De Morgan's laws. Keep syntax, logical equivalence, and truth under an interpretation as three separate questions.
More in Graphs and symbolic AI
- Linguistic Linked Open Data - Linguistic Linked Open Data, or LLOD, is an approach and community movement for publishing and connecting language resources using linked-data principles...
- Linkage constraints - Linkage constraints are restrictions imposed by the physical connections among the links and joints of a mechanism.
- Liquid event - A liquid event is an event type or temporal property that, when true throughout an interval, is also true throughout its subintervals.
- Local beam search - Local beam search is a local-search method that keeps several candidate states at once.
- Local Community Detection - Local community detection identifies a group of related nodes around a chosen source node in a network.
- Local consistency - Local consistency is a family of conditions used in constraint satisfaction to check whether assignments to small groups of variables can be extended...
Sources
Russell and Norvig, Artificial Intelligence: A Modern Approach, propositional-logic chapter, literals, clauses and resolution: https://aima.cs.berkeley.edu/newchap07.pdf
Previous: List sample Next: Literature-based discovery