Theoremresearch
Strong equivalence of logic programs
Also called Lifschitz-Pearce-Valverde theorem.
Two programs have the same stable models in every context exactly when they have the same SE-models, which is the same as equivalence in the logic of here-and-there.
Two logic programs are strongly equivalent when one can replace the other inside any larger program without a change of the stable models. Ordinary equivalence, the same stable models, is not enough for this, because the stable model semantics is nonmonotonic: and have the same stable model, but after adding the fact they do not. Lifschitz, Pearce and Valverde (2001) proved that strong equivalence is equivalence in the logic of here-and-there, a logic between intuitionistic and classical logic. Turner (2003) restated this with SE-models, built from the Gelfond-Lifschitz reduct, which is the form given here.
Statement
Let and be finite ground normal programs, and let be the set of atoms that occur in or . For a set of atoms, is the reduct of by , and "" means that satisfies every rule of read as a classical implication.
- An SE-model of is a pair with , and . Write for the set of SE-models.
- and are strongly equivalent if, for every normal program , the programs and have the same stable models.
Theorem (Lifschitz, Pearce and Valverde 2001; Turner 2003). and are strongly equivalent if and only if .
In the form of Lifschitz, Pearce and Valverde, the right side reads: and , as sets of formulas with read as negation, are equivalent in the logic of here-and-there. An SE-model is a model of that logic, with the atoms true "here" and the atoms true "there". Both papers prove the theorem for much more general programs: nested expressions, disjunctive heads and, in the later literature, arbitrary propositional theories. The proof below shows that the extra program can always be chosen to consist of facts and rules .
In plain words
Two pieces of a program can give the same answers when they stand alone, and still behave differently once other rules are added. One rule may say "p unless q", the other just "p". Alone, both give p. Add the fact q, and only the second still gives p. Strong equivalence asks for the same answers in every possible surrounding, which is what a programmer needs before replacing one piece by another. The theorem turns this question about all programs into a check on one finite list of pairs of sets of atoms for each program. The lists can be compared directly, or the check can be passed to a standard solver for logic formulas.
Proof
This is the proof through SE-models of Turner (2003). Lifschitz, Pearce and Valverde (2001) prove the same result in the logic of here-and-there.
Lemma 1. is a stable model of if and only if and there is no with .
First, if and only if : a rule of whose body is true in has no negative atom in , so its reduct is in with the same positive body, and conversely. So means . Now holds if and only if is a model of and no proper subset of is, because the least model is contained in every model.
Lemma 2. , for SE-models over the atoms of , and .
This holds because , and a set satisfies a union of rules exactly when it satisfies both parts.
If. If , then by Lemma 2 for every , and by Lemma 1 the two programs have the same stable models. (An atom outside is in only through , and the SE-models of over a larger set of atoms are determined by those over , so the equality carries over.)
Only if. Suppose ; the other case is symmetric. We build such that is stable for exactly one of and .
Case 1: . Let be the facts . Then , and since , its least model is . So is stable for . It is not stable for , because does not satisfy .
Case 2: . Then , so , and as well. Let be the facts together with all rules for . The reduct of is , and a set with satisfies exactly when or , since one atom of forces all the others. So the SE-models of with second part are and . By Lemma 2, has both, so is not stable for it by Lemma 1. has but not , so is stable for it.
A check by hand. Take and over . For , a pair needs , which gives , and . For and , the reduct is empty, so is an SE-model of ; and does not satisfy . This is Case 1: with , the program has the stable model , while has the stable model . In all, has four SE-models that lacks: , , and .
Consequences
- Safe simplification. A rule whose head is also in its positive body, such as , can be deleted from any program, and so can a rule with both and in its body: in both cases the empty program has the same SE-models. Optimizers and grounders of answer set programming use such strong equivalences to rewrite rules.
- Positive parts. is strongly equivalent to : both have the single SE-model . For programs without negation, strong equivalence is the same as classical equivalence.
- Complexity. To decide whether two finite programs are strongly equivalent is coNP-complete. A pair in one set but not the other is a short certificate of non-equivalence. Lin (2002) reduced the problem to classical entailment over the atoms and a primed copy of each, so a SAT solver can check it.
- A logical view of rules. The theorem gives answer set programs a monotonic logic, here-and-there, in which replacement of equivalents is valid, although the stable model semantics itself is nonmonotonic. Pearce's equilibrium logic defines stable models as particular models of this logic.
Tightness
The class of added programs matters. With ranging only over the empty program, the condition is ordinary equivalence, and and pass it. With ranging over sets of facts, the condition is uniform equivalence, which is strictly weaker. For example, and have the same stable models after adding any set of facts. They are not strongly equivalent: is an SE-model of , because , but not of . Case 2 of the proof gives : then has the stable model and has no stable model. The proof shows that facts and rules with one positive body atom are always enough.
The theorem is about the stable model semantics. It does not carry over to the completion: and the empty program are strongly equivalent, but their completions, and , have different models.
History
Pearce introduced equilibrium logic in the 1990s, which defines stable models within the logic of here-and-there. Lifschitz, Pearce and Valverde (2001) used it to characterize strong equivalence. Turner gave the SE-model form in a conference paper in 2001, and in the journal paper of 2003 cited here he extended it to nested expressions and weight constraints. Lin (2002) gave the reduction to classical logic, and the coNP-completeness was shown in the same period by several groups. Uniform equivalence and relativized notions, where is restricted to some atoms, were studied later.
References
- Vladimir Lifschitz, David Pearce and Agustín Valverde, Strongly equivalent logic programs, ACM Transactions on Computational Logic 2(4), 526 to 541 (2001), the definition of strong equivalence and the main theorem on equivalence in the logic of here-and-there
- Hudson Turner, Strong equivalence made easy: nested expressions and weight constraints, Theory and Practice of Logic Programming 3(4-5), 609 to 622 (2003), the definition of SE-models and the characterization of strong equivalence by them
- Fangzhen Lin, Reducing strong equivalence of logic programs to entailment in classical propositional logic, in Proceedings of the Eighth International Conference on Principles of Knowledge Representation and Reasoning (KR 2002), Morgan Kaufmann, 170 to 176 (2002), the reduction to classical entailment and the coNP-completeness of the check
- Vladimir Lifschitz, Answer Set Programming, Springer (2019), the section on strong equivalence and its use to simplify programs
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 R3JT14 Edit this page History Report an error Markdown