Vous êtes sur la page 1sur 7

Some Useful Theroems

Theorem 1
Let P be a logic program.
If the empty set ‘{}’ is an answer set for P, it is
unique.

Example:
The logic program
a :- b.
has {} as unique answer set.
Theorem 2
Let P be a logic program, and facts(P) be the set
containing all and only the facts in P.
If S is an answer set for P, then facts(P)⊆S.
Example:
The logic program
a v b :- c.
c.
d.
has {a,c,d} and {b,c,d} as answer sets, and both
contain the facts {c,d}.
Theorem 3
Let P be a logic program, and facts(P) the set
containing all and only the facts in P.
If facts(P) is an answer set, it is unique.

Example:
The logic program P
a v b :- c.
d.
e.
has {d,e} = facts(P) as unique answer set.
Definition
Let P be a logic program, and I an interpretation
for P. An atom a∈ I is supported in I if there
exists a rule r∈ P such that body(r) is true w.r.t.
I and head(r)∩ I = a (i.e., a is the only true
atom appearing in the head of r).
Theorem 4
Let P be a logic program, and I a closed
interpretation for P. I is an answer set for P only
if for each atom a∈ I, a is supported w.r.t. I.

Example:
For the logic program P
a v b :- c.
d.
e.
I={a,d,e} is closed, but a is not supported -> I is not
an answer set.
Theorem 5
Let P be an acyclic (i.e., non-recursive) logic
program, and I a closed interpretation for P. I is
an answer set for P if and only if for each atom
a∈ I, a is supported w.r.t. I.
Example:
For the logic program P
a :- b.
b :- a.
I={a,b} is closed, and both atoms are supported, but since P is
not acyclic this is not sufficient to guarantee that I is an
answer set. Indeed, it is easy to see that I is not an answer
set.
For the reader: Which are the answer sets for P?

Vous aimerez peut-être aussi