Add the ground atomTogether with the three rules above, this is the Datalog with negation knowledge base . There are no supplied divisibility facts and no other year facts. In particular, nothing in this knowledge base asserts or .
Use
not for negation as failure, rather than classical logical negation. The disjunctive condition is expressed by two separate Datalog with negation rules:The positive premise restricts the rule to years and makes the variable explicitly safe. The divisibility relation is input data; the integer-looking constants do not make arbitrary arithmetic facts true automatically.A safe one-rule Datalog with negation example with no stable model isThere are no variables, so no safety condition is violated. If is absent from a proposed stable model, its reduct contains the fact , whose least Herbrand model contains . If is present, the rule is deleted, and the reduct has empty least Herbrand model. Either choice disagrees with its reduct's least Herbrand model. Additional unsupported atoms cannot repair the disagreement. Hence there is no stable model.
Stratified Datalog 2026-10-31
A Datalog with negation program whose predicates can be assigned levels so that positive premises do not exceed their head's level and negative premises have strictly lower levels. Finite programs of this form can be evaluated stratum by stratum and have a unique stable model.