That's because {c}
is not a model of P1
.
In the case of ground (no variables) positive (all bodies positive) programs, the constraints are pretty simple:
For an interpretation to be a model of a ground positive program, every applicable rule must also be applied, where:
- applicable: for ground positive programs, all literals in the body are contained in the interpretation,
- applied: a head atom is contained the interpretation.
- For a model to be an answer set, it has to be minimal among the set of all models of this program.
So, in P1
you have this rule:
b :- c.
which, for the interpretation {c}
, is applicable (since c
is in the interpretation), but not applied (because b
isn't).
As for P2
, we have the fact f.
, implying you have to have f
in any answer set (since f.
is the same f :-
, meaning it's always applicable). However, f
does not render the rule b :- c
applicable, and there are no other rules, so {f}
is a model of P2
, and obviously also a minimal one - an answer set.
Because of that, e.g. {c,b,f}
is not an answer set of P2
, since it's not minimal when compared with {f}
.