Theoremadvanced
Fages' theorem
Also called tight program theorem.
If no atom of a normal program depends positively on itself, the stable models of the program are exactly the models of its Clark completion, so a SAT solver can find them.
Fages' theorem says when the two main readings of negation as failure agree. Every stable model of a normal program is a model of its Clark completion, but the completion can have more models, because it accepts atoms that support each other in a positive cycle. Fages (1994) proved that if the program has no such cycles, the two sets of models are the same. The result is the reason why the stable models of many programs can be found by a SAT solver, and loop formulas extend it to all programs.
Statement
Let be a ground normal program over a set of atoms, possibly infinite. A rule has the form , and is its completion: for each , the formula over the rules with head , with .
is tight if there is a level mapping such that, for every rule of and every positive body atom of it, . For a finite program, this means that the positive dependency graph, with an edge from to each , has no cycle.
Theorem (Fages 1994). If is tight, then a set is a stable model of if and only if is a model of .
Negative body literals play no part in the hypothesis. Fages called such programs positive-order-consistent; the name tight is from Erdem and Lifschitz (2003), who proved a more general form (their Corollary 2 covers this case).
In plain words
A logic program can be read in two ways. In the first, an atom is true when one of its rules applies, and false when none does. In the second, which is the stable model reading, an atom is true only if it can be built up step by step from facts. The first reading allows a circle: "p because q, and q because p" makes both true with no outside reason. The second does not. If the program has no such circle among its positive conditions, the two readings give the same answers. Then each atom can be checked with a simple local rule, and a solver for plain logic formulas can do the work.
Proof
The proof has three steps. Write for the set of heads of rules whose body is true in , and for the least model of the reduct of by .
Step 1: the models of the completion are the sets with . The formulas hold in exactly when . The formulas hold exactly when each is the head of a rule whose body is true in , that is . Such sets are the supported models.
Step 2: every stable model is supported, for any . Let . If the body of a rule is true in , then no is in , so contains with all , and . So . If , then some rule of has all . It comes from a rule of with no , so the body of that rule is true in and .
Step 3: if is tight, every supported model is stable. Let . First, , because is closed under the rules of : such a rule comes from a rule of with no , and if its are in , the body of is true in , so its head is in . Second, we show for each , by induction on . Since , some rule with head has its body true in . Its positive atoms are in and have , so by the induction hypothesis they are in . No is in , so is in , and . The induction is valid because the levels are natural numbers. Hence .
Steps 1 and 2 give "stable implies a model of the completion" for every program, and Steps 1 and 3 give the converse for tight programs. This is the argument of Fages (1994); Erdem and Lifschitz (2003) give the same structure in a more general setting.
A check by hand. Take , , . The only positive edge is , so the program is tight. The completion is , , , . Its models are and . The reduct by is with least model , and the reduct by is with least model , so both are stable, as the theorem says.
Consequences
- Answer sets by SAT. For a finite tight program, the clausal form of the completion, which is linear in the size of the program after one new atom per rule body, is a SAT instance whose models are the stable models. The first answer set solvers built on SAT solvers used this for tight programs.
- Consistency. The title of Fages' paper: a tight program has a stable model if and only if its completion is consistent.
- The search problem stays hard. Tight programs are enough to encode SAT: for each variable , the rules and , and for each clause a constraint that is violated when all its literals are false. The program is tight, so deciding whether a tight program has a stable model is still NP-complete.
- Testing the hypothesis. Tightness of a finite program is decided in linear time by a search for a cycle in the positive dependency graph, for example with the strongly connected components.
- Programs with loops. For a program that is not tight, the stable models are the models of the completion that also satisfy the loop formulas of Lin and Zhao (2004). Fages' theorem is the case in which there are no loops.
Tightness
The hypothesis cannot be dropped. The program has the positive cycle . Its completion has the models and , while the only stable model is .
For infinite programs, an acyclic positive dependency graph is not enough. The program for has no cycle, but it has no level mapping into , because is impossible. Its completion has the model in which every is true, while the only stable model is . The induction of Step 3 needs a well-founded order.
The condition is sufficient, not necessary: is not tight, but its completion and its stable models are both . Erdem and Lifschitz (2003) weaken the hypothesis to tightness on a set of atoms, which constrains only the rules whose head and positive body atoms lie in ; the conclusion then holds for the models contained in .
History
Clark (1978) defined the completion, and Gelfond and Lifschitz (1988) defined stable models. Fages (1994) proved that the two agree on positive-order-consistent programs. Erdem and Lifschitz (2003) gave the name tight programs, and extended the result to programs with nested expressions and to tightness relative to a set of atoms. Lin and Zhao (2004) removed the hypothesis by adding loop formulas to the completion.
References
- François Fages, Consistency of Clark's completion and existence of stable models, Methods of Logic in Computer Science 1(1), 51 to 60 (1994), the main theorem on positive-order-consistent programs
- Esra Erdem and Vladimir Lifschitz, Tight logic programs, Theory and Practice of Logic Programming 3(4-5), 499 to 518 (2003), Corollary 2
- Keith L. Clark, Negation as failure, in Hervé Gallaire and Jack Minker (eds.), Logic and Data Bases, Plenum Press, New York, 293 to 322 (1978), the definition of the completion
- Michael Gelfond and Vladimir Lifschitz, The stable model semantics for logic programming, in Robert A. Kowalski and Kenneth A. Bowen (eds.), Logic Programming: Proceedings of the Fifth International Conference and Symposium, MIT Press, 1070 to 1080 (1988), the definition of stable models
- Fangzhen Lin and Yuting Zhao, ASSAT: computing answer sets of a logic program by SAT solvers, Artificial Intelligence 157(1-2), 115 to 137 (2004), the generalization of the theorem to programs with loops
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag YYCJPC Edit this page History Report an error Markdown