Foundations of Data and Knowledge Systems EPCL Basic Training Camp - - PowerPoint PPT Presentation

foundations of data and knowledge systems
SMART_READER_LITE
LIVE PREVIEW

Foundations of Data and Knowledge Systems EPCL Basic Training Camp - - PowerPoint PPT Presentation

Foundations of DKS Foundations of Data and Knowledge Systems EPCL Basic Training Camp 2012 Part Four Thomas Eiter and Reinhard Pichler Institut fr Informationssysteme Technische Universitt Wien December 20, 2012 Thomas Eiter and Reinhard


slide-1
SLIDE 1

Foundations of DKS

Foundations of Data and Knowledge Systems

EPCL Basic Training Camp 2012 Part Four Thomas Eiter and Reinhard Pichler

Institut für Informationssysteme Technische Universität Wien

December 20, 2012

Thomas Eiter and Reinhard Pichler December 20, 2012 1/53

slide-2
SLIDE 2

Foundations of DKS

Outline

  • 5. Declarative Semantics of Rule Languages

5.1 Minimal Model Semantics of Definite Rules 5.2 Operator Fixpoints 5.3 Fixpoint Semantics of Positive Rules 5.4 Rules with Negation 5.5 Stratifiable Rule Sets 5.6 Stable Model Semantics

Thomas Eiter and Reinhard Pichler December 20, 2012 2/53

slide-3
SLIDE 3

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.1 Minimal Model Semantics

Outline

  • 5. Declarative Semantics of Rule Languages

5.1 Minimal Model Semantics of Definite Rules 5.2 Operator Fixpoints 5.3 Fixpoint Semantics of Positive Rules 5.4 Rules with Negation 5.5 Stratifiable Rule Sets 5.6 Stable Model Semantics

Thomas Eiter and Reinhard Pichler December 20, 2012 3/53

slide-4
SLIDE 4

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.1 Minimal Model Semantics

Minimal Model Semantics of Definite Rules

Recall

Definite programs are finite sets of definite clauses, also called definite rules: A ← B1 ∧ . . . ∧ Bn with n ≥ 0. Definite programs admit a very natural semantics definition:

  • Each program Π is satisfiable.
  • The intersection of all its Herbrand models is a model of Π.
  • This is the minimal model of Π.
  • Precisely the atoms implied by Π are true in the minimal model.

Thomas Eiter and Reinhard Pichler December 20, 2012 4/53

slide-5
SLIDE 5

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.1 Minimal Model Semantics

Minimal Model Semantics of Definite Rules

Recall

Definite programs are finite sets of definite clauses, also called definite rules: A ← B1 ∧ . . . ∧ Bn with n ≥ 0. Definite programs admit a very natural semantics definition:

  • Each program Π is satisfiable.
  • The intersection of all its Herbrand models is a model of Π.
  • This is the minimal model of Π.
  • Precisely the atoms implied by Π are true in the minimal model.

Definite rules are a special case of universal and inductive formulas. The interesting model-theoretic properties of definite rules are inherited from these more general classes of formulas.

Thomas Eiter and Reinhard Pichler December 20, 2012 4/53

slide-6
SLIDE 6

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.1 Minimal Model Semantics

Minimal Model Semantics of Definite Rules ctd.

Recall

A formula is universal, if it can be transformed into a prenex form with universal quantifiers only. A formula is inductive, if it can be transformed into a prenex form with the following properties:

  • The quantifier prefix starts with universal quantifiers for all variables in the

consequent followed by arbitrary quantifiers for the remaining variables.

  • The quantifier-free part is of the form (A1 ∧ . . . ∧ An) ← ϕ, where n ≥ 0 and ϕ

is a positive formula (i.e., it contains no negation).

An inductive formula is either a generalised definite rule (if n ≥ 1) or a generalised definite goal (if n = 0).

Theorem

Each set S of definite rules (i.e., each definite program) has a unique minimal Herbrand model. This model is the intersection of all Herbrand models of S. It satisfies precisely those ground atoms that are logical consequences of S.

Thomas Eiter and Reinhard Pichler December 20, 2012 5/53

slide-7
SLIDE 7

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Outline

  • 5. Declarative Semantics of Rule Languages

5.1 Minimal Model Semantics of Definite Rules 5.2 Operator Fixpoints 5.3 Fixpoint Semantics of Positive Rules 5.4 Rules with Negation 5.5 Stratifiable Rule Sets 5.6 Stable Model Semantics

Thomas Eiter and Reinhard Pichler December 20, 2012 6/53

slide-8
SLIDE 8

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Minimal Model Construction

Outline

The minimal models semantics is not constructive. We need algorithms to compute the / reason from the minimal model Different methods exist, including

  • algebraic approaches (fixpoints of consequence operators, “bottom up”)
  • proof-theoretic approaches (special resolution procedures, “top down”)

We consider here first fix-point construction, for which we need concepts from operator theory. We confine here to a specific case of operators, applied to elements M of the powerset P(X) (the set of subsets) of a set X.

Thomas Eiter and Reinhard Pichler December 20, 2012 7/53

slide-9
SLIDE 9

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Operators

Definition (Operator)

Let X be a set. An operator on X is a mapping Γ : P(X) → P(X).

Definition (Monotonic operator)

Let X be a set. An operator Γ on X is monotonic, iff for all subset M ⊆ M′ ⊆ X it holds that: Γ(M) ⊆ Γ(M′).

Definition (Continuous operator)

Let X be a nonempty set. A set Y ⊆ P(X) of subsets of X is directed, if every finite subset of Y has an upper bound in Y, i.e., for each finite Yfin ⊆ Y, there is a set M ∈ Y such that Yfin ⊆ M. An operator Γ on X is continuous, iff for each directed set Y ⊆ P(X) of subsets

  • f X it holds that: Γ( Y) = {Γ(M) | M ∈ Y}.

Thomas Eiter and Reinhard Pichler December 20, 2012 8/53

slide-10
SLIDE 10

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Continuous vs Monotone Operators

Lemma

Each continuous operator on a nonempty set is monotonic.

Thomas Eiter and Reinhard Pichler December 20, 2012 9/53

slide-11
SLIDE 11

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Continuous vs Monotone Operators

Lemma

Each continuous operator on a nonempty set is monotonic.

Proof.

Let Γ be a continuous operator on X = ∅. Let M ⊆ M′ ⊆ X. Since Γ is continuous, Γ(M′) = Γ(M ∪ M′) = Γ(M) ∪ Γ(M′), thus Γ(M) ⊆ Γ(M′).

Thomas Eiter and Reinhard Pichler December 20, 2012 9/53

slide-12
SLIDE 12

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Continuous vs Monotone Operators

Lemma

Each continuous operator on a nonempty set is monotonic.

Proof.

Let Γ be a continuous operator on X = ∅. Let M ⊆ M′ ⊆ X. Since Γ is continuous, Γ(M′) = Γ(M ∪ M′) = Γ(M) ∪ Γ(M′), thus Γ(M) ⊆ Γ(M′). The converse does not hold.

Example

Let Γ(X) = ∅, if X is finite, and Γ(X) = X, if X is infinite. Γ is monotonic. Γ is not continuous in general. E.g., let X = N and Y = {{0, 1, . . . n} | n ∈ N}. Then Γ( Y) = N but

M∈Y Γ(M) = ∅.

Thomas Eiter and Reinhard Pichler December 20, 2012 9/53

slide-13
SLIDE 13

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Fixpoints of Monotonic and Continuous Operators

Definition (Fixpoint)

Let Γ be an operator on a set X. A subset M ⊆ X is a pre-fixpoint of Γ iff Γ(M) ⊆ M; a fixpoint of Γ iff Γ(M) = M.

Theorem (Knaster-Tarski, existence of least and greatest fixpoint)

Let Γ be a monotonic operator on a nonempty set X. Then Γ has a least fixpoint lfp(Γ) and a greatest fixpoint gfp(Γ) with lfp(Γ) =

  • {M ⊆ X | Γ(M) = M} =
  • {M ⊆ X | Γ(M) ⊆ M}.

gfp(Γ) =

  • {M ⊆ X | Γ(M) = M} =
  • {M ⊆ X | Γ(M) ⊆ M}.

This is a fundamental result with many applications in Computer Science. It holds for more general structures (complete partial orders).

Thomas Eiter and Reinhard Pichler December 20, 2012 10/53

slide-14
SLIDE 14

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Proof.

For the least fixpoint let L = {M ⊆ X | Γ(M) ⊆ M}.

Thomas Eiter and Reinhard Pichler December 20, 2012 11/53

slide-15
SLIDE 15

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Proof.

For the least fixpoint let L = {M ⊆ X | Γ(M) ⊆ M}. Consider an arbitrary M ⊆ X with Γ(M) ⊆ M.

Thomas Eiter and Reinhard Pichler December 20, 2012 11/53

slide-16
SLIDE 16

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Proof.

For the least fixpoint let L = {M ⊆ X | Γ(M) ⊆ M}. Consider an arbitrary M ⊆ X with Γ(M) ⊆ M. By definition of L we have L ⊆ M. Since Γ is monotonic, Γ(L) ⊆ Γ(M). With the assumption Γ(M) ⊆ M follows Γ(L) ⊆ M. Therefore Γ(L) ⊆

  • {M ⊆ X | Γ(M) ⊆ M} = L.

(1)

Thomas Eiter and Reinhard Pichler December 20, 2012 11/53

slide-17
SLIDE 17

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Proof.

For the least fixpoint let L = {M ⊆ X | Γ(M) ⊆ M}. Consider an arbitrary M ⊆ X with Γ(M) ⊆ M. By definition of L we have L ⊆ M. Since Γ is monotonic, Γ(L) ⊆ Γ(M). With the assumption Γ(M) ⊆ M follows Γ(L) ⊆ M. Therefore Γ(L) ⊆

  • {M ⊆ X | Γ(M) ⊆ M} = L.

(1) For the opposite inclusion, from (1) and since Γ is monotonic it follows that Γ(Γ(L)) ⊆ Γ(L). By definition of L, Γ(L) ∈ {M ⊆ X | Γ(M) ⊆ M}; therefore L ⊆ Γ(L). (2) From (1) and (2) it follows that L is a fixpoint of Γ.

Thomas Eiter and Reinhard Pichler December 20, 2012 11/53

slide-18
SLIDE 18

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Proof.

For the least fixpoint let L = {M ⊆ X | Γ(M) ⊆ M}. Consider an arbitrary M ⊆ X with Γ(M) ⊆ M. By definition of L we have L ⊆ M. Since Γ is monotonic, Γ(L) ⊆ Γ(M). With the assumption Γ(M) ⊆ M follows Γ(L) ⊆ M. Therefore Γ(L) ⊆

  • {M ⊆ X | Γ(M) ⊆ M} = L.

(1) For the opposite inclusion, from (1) and since Γ is monotonic it follows that Γ(Γ(L)) ⊆ Γ(L). By definition of L, Γ(L) ∈ {M ⊆ X | Γ(M) ⊆ M}; therefore L ⊆ Γ(L). (2) From (1) and (2) it follows that L is a fixpoint of Γ. Now let L′ = {M ⊆ X | Γ(M) = M}. Then L′ ⊆ L, because L is a fixpoint of Γ.

Thomas Eiter and Reinhard Pichler December 20, 2012 11/53

slide-19
SLIDE 19

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Proof.

For the least fixpoint let L = {M ⊆ X | Γ(M) ⊆ M}. Consider an arbitrary M ⊆ X with Γ(M) ⊆ M. By definition of L we have L ⊆ M. Since Γ is monotonic, Γ(L) ⊆ Γ(M). With the assumption Γ(M) ⊆ M follows Γ(L) ⊆ M. Therefore Γ(L) ⊆

  • {M ⊆ X | Γ(M) ⊆ M} = L.

(1) For the opposite inclusion, from (1) and since Γ is monotonic it follows that Γ(Γ(L)) ⊆ Γ(L). By definition of L, Γ(L) ∈ {M ⊆ X | Γ(M) ⊆ M}; therefore L ⊆ Γ(L). (2) From (1) and (2) it follows that L is a fixpoint of Γ. Now let L′ = {M ⊆ X | Γ(M) = M}. Then L′ ⊆ L, because L is a fixpoint of Γ. The opposite inclusion L ⊆ L′ holds, since every set M involved in the intersection defining L′ is also involved in the intersection defining L.

Thomas Eiter and Reinhard Pichler December 20, 2012 11/53

slide-20
SLIDE 20

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Proof.

For the least fixpoint let L = {M ⊆ X | Γ(M) ⊆ M}. Consider an arbitrary M ⊆ X with Γ(M) ⊆ M. By definition of L we have L ⊆ M. Since Γ is monotonic, Γ(L) ⊆ Γ(M). With the assumption Γ(M) ⊆ M follows Γ(L) ⊆ M. Therefore Γ(L) ⊆

  • {M ⊆ X | Γ(M) ⊆ M} = L.

(1) For the opposite inclusion, from (1) and since Γ is monotonic it follows that Γ(Γ(L)) ⊆ Γ(L). By definition of L, Γ(L) ∈ {M ⊆ X | Γ(M) ⊆ M}; therefore L ⊆ Γ(L). (2) From (1) and (2) it follows that L is a fixpoint of Γ. Now let L′ = {M ⊆ X | Γ(M) = M}. Then L′ ⊆ L, because L is a fixpoint of Γ. The opposite inclusion L ⊆ L′ holds, since every set M involved in the intersection defining L′ is also involved in the intersection defining L. The proof for the greatest fixpoint is similar.

Thomas Eiter and Reinhard Pichler December 20, 2012 11/53

slide-21
SLIDE 21

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Ordinal Numbers and Powers

Ordinal numbers are the order types of well-ordered sets (i.e., totally

  • rdered sets where each set has a minimum.)

They generalize natural numbers, and can be defined as well-ordered sets

  • f all smaller ordinals, or as hereditarily transitive sets A: (i) If x ∈ A and

y ∈ x, then y ∈ A; (ii) each x ∈ A is transitive. They are divided into successor ordinals β, given by β = α + 1 for ordinal α, and limit ordinals λ (not of this form). The first limit ordinal, ω, corresponds to the set N of all natural numbers.

Definition (Ordinal powers of a monotonic operator)

Let Γ be a monotonic operator on a nonempty set X. For each ordinal β, the upward and downward power of Γ, Γ ↑ β and Γ ↓ β is defined as Γ ↑ 0 = ∅ β = 0 (base) Γ ↓ 0 = X Γ ↑ α+1 = Γ(Γ ↑ α) β = α + 1 (succ.) Γ ↓ α+1 = Γ(Γ ↓ α) Γ ↑ λ = {Γ ↑ β | β < λ} β = λ (limit) Γ ↓ λ = {Γ ↓ β | β < λ}

Thomas Eiter and Reinhard Pichler December 20, 2012 12/53

slide-22
SLIDE 22

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Lemma

Let Γ be a monotonic operator on a nonempty set X. For each ordinal α holds:

1 Γ ↑ α

⊆ Γ ↑ α + 1

2 Γ ↑ α

⊆ lfp(Γ).

3 If Γ ↑ α = Γ ↑ α + 1, then lfp(Γ) = Γ ↑ α.

Thomas Eiter and Reinhard Pichler December 20, 2012 13/53

slide-23
SLIDE 23

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Lemma

Let Γ be a monotonic operator on a nonempty set X. For each ordinal α holds:

1 Γ ↑ α

⊆ Γ ↑ α + 1

2 Γ ↑ α

⊆ lfp(Γ).

3 If Γ ↑ α = Γ ↑ α + 1, then lfp(Γ) = Γ ↑ α.

Proof (Idea).

Items 1. and 2. are shown by transfinite induction on α.

Thomas Eiter and Reinhard Pichler December 20, 2012 13/53

slide-24
SLIDE 24

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Lemma

Let Γ be a monotonic operator on a nonempty set X. For each ordinal α holds:

1 Γ ↑ α

⊆ Γ ↑ α + 1

2 Γ ↑ α

⊆ lfp(Γ).

3 If Γ ↑ α = Γ ↑ α + 1, then lfp(Γ) = Γ ↑ α.

Proof (Idea).

Items 1. and 2. are shown by transfinite induction on α. Item 3.: If Γ ↑ α = Γ ↑ α + 1, then Γ ↑ α = Γ(Γ ↑ α), i.e., Γ ↑ α is a fixpoint of Γ, therefore Γ ↑ α ⊆ lfp(Γ) by 2., and lfp(Γ) ⊆ Γ ↑ α by definition.

Thomas Eiter and Reinhard Pichler December 20, 2012 13/53

slide-25
SLIDE 25

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Lemma

Let Γ be a monotonic operator on a nonempty set X. For each ordinal α holds:

1 Γ ↑ α

⊆ Γ ↑ α + 1

2 Γ ↑ α

⊆ lfp(Γ).

3 If Γ ↑ α = Γ ↑ α + 1, then lfp(Γ) = Γ ↑ α.

Proof (Idea).

Items 1. and 2. are shown by transfinite induction on α. Item 3.: If Γ ↑ α = Γ ↑ α + 1, then Γ ↑ α = Γ(Γ ↑ α), i.e., Γ ↑ α is a fixpoint of Γ, therefore Γ ↑ α ⊆ lfp(Γ) by 2., and lfp(Γ) ⊆ Γ ↑ α by definition.

Theorem

For any monotonic operator Γ on X = ∅, lfp(Γ) = Γ ↑ α for some ordinal α.

Thomas Eiter and Reinhard Pichler December 20, 2012 13/53

slide-26
SLIDE 26

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Lemma

Let Γ be a monotonic operator on a nonempty set X. For each ordinal α holds:

1 Γ ↑ α

⊆ Γ ↑ α + 1

2 Γ ↑ α

⊆ lfp(Γ).

3 If Γ ↑ α = Γ ↑ α + 1, then lfp(Γ) = Γ ↑ α.

Proof (Idea).

Items 1. and 2. are shown by transfinite induction on α. Item 3.: If Γ ↑ α = Γ ↑ α + 1, then Γ ↑ α = Γ(Γ ↑ α), i.e., Γ ↑ α is a fixpoint of Γ, therefore Γ ↑ α ⊆ lfp(Γ) by 2., and lfp(Γ) ⊆ Γ ↑ α by definition.

Theorem

For any monotonic operator Γ on X = ∅, lfp(Γ) = Γ ↑ α for some ordinal α.

Proof.

If not, for all ordinals α by the previous lemma Γ ↑ α ⊆ Γ ↑ α + 1 and Γ ↑ α = Γ ↑ α + 1. Thus Γ ↑ maps the ordinals 1-1 to (a subset of) P(X), a contradiction (there are “more” ordinals than any set can have elements).

Thomas Eiter and Reinhard Pichler December 20, 2012 13/53

slide-27
SLIDE 27

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Least Fixpoint of Continuous Operator

Theorem (Kleene)

Let Γ be a continuous operator on a nonempty set X. Then lfp(Γ) = Γ ↑ ω.

Thomas Eiter and Reinhard Pichler December 20, 2012 14/53

slide-28
SLIDE 28

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.2 Operator Fixpoints

Least Fixpoint of Continuous Operator

Theorem (Kleene)

Let Γ be a continuous operator on a nonempty set X. Then lfp(Γ) = Γ ↑ ω.

Proof.

By 1. from the previous lemma, it suffices to show that Γ ↑ ω + 1 = Γ ↑ ω. Γ ↑ ω + 1 = Γ(Γ ↑ ω) by definition, successor case = Γ {Γ ↑ n | n ∈ N}

  • by definition, limit case

= Γ(Γ ↑ n) | n ∈ N

  • because Γ is continuous

= Γ ↑ n + 1 | n ∈ N

  • by definition, successor case

= Γ ↑ ω by definition, base case Note: An analogous result for the greatest fixpoint does not hold.

Thomas Eiter and Reinhard Pichler December 20, 2012 14/53

slide-29
SLIDE 29

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Outline

  • 5. Declarative Semantics of Rule Languages

5.1 Minimal Model Semantics of Definite Rules 5.2 Operator Fixpoints 5.3 Fixpoint Semantics of Positive Rules 5.4 Rules with Negation 5.5 Stratifiable Rule Sets 5.6 Stable Model Semantics

Thomas Eiter and Reinhard Pichler December 20, 2012 15/53

slide-30
SLIDE 30

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Immediate Consequence Operator

We now apply the above results for universal generalized definite rules, i.e.,

  • f form ∀∗((A1 ∧ · · · ∧ An) ← ϕ), where each Ai is an atom and ϕ is a

quantifier-free positive formula. Here X = HB and a subset M is a set B ⊆ HB of ground atoms.

Thomas Eiter and Reinhard Pichler December 20, 2012 16/53

slide-31
SLIDE 31

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Immediate Consequence Operator

We now apply the above results for universal generalized definite rules, i.e.,

  • f form ∀∗((A1 ∧ · · · ∧ An) ← ϕ), where each Ai is an atom and ϕ is a

quantifier-free positive formula. Here X = HB and a subset M is a set B ⊆ HB of ground atoms.

Definition (Immediate consequence operator)

Let S be a set of universal generalised definite rules. Let B ⊆ HB be a set of ground atoms. The immediate consequence operator T

S for S is:

T

S : P(HB) → P(HB)

B → {A ∈ HB | there is a ground instance ((A1 ∧ . . . ∧ An) ← ϕ)

  • f a member of S with HI(B) |

= ϕ and A = Ai for some i with 1 ≤ i ≤ n }

Thomas Eiter and Reinhard Pichler December 20, 2012 16/53

slide-32
SLIDE 32

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Immediate Consequence Operator

We now apply the above results for universal generalized definite rules, i.e.,

  • f form ∀∗((A1 ∧ · · · ∧ An) ← ϕ), where each Ai is an atom and ϕ is a

quantifier-free positive formula. Here X = HB and a subset M is a set B ⊆ HB of ground atoms.

Definition (Immediate consequence operator)

Let S be a set of universal generalised definite rules. Let B ⊆ HB be a set of ground atoms. The immediate consequence operator T

S for S is:

T

S : P(HB) → P(HB)

B → {A ∈ HB | there is a ground instance ((A1 ∧ . . . ∧ An) ← ϕ)

  • f a member of S with HI(B) |

= ϕ and A = Ai for some i with 1 ≤ i ≤ n }

Lemma (T

S is continuous)

Let S be a set of universal generalised definite rules. The immediate consequence operator T

S is continuous (hence, also monotonic).

Thomas Eiter and Reinhard Pichler December 20, 2012 16/53

slide-33
SLIDE 33

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Theorem

Let S be a set of universal generalised definite rules. Let B ⊆ HB be a set of ground atoms. Then HI(B) | = S iff T

S(B) ⊆ B.

Thomas Eiter and Reinhard Pichler December 20, 2012 17/53

slide-34
SLIDE 34

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Theorem

Let S be a set of universal generalised definite rules. Let B ⊆ HB be a set of ground atoms. Then HI(B) | = S iff T

S(B) ⊆ B.

Proof.

“only if:” Assume HI(B) | = S. Let A ∈ T

S(B), i.e., A = Ai for some ground instance

((A1 ∧ . . . ∧ An) ← ϕ) of a member of S with HI(B) | = ϕ.

Thomas Eiter and Reinhard Pichler December 20, 2012 17/53

slide-35
SLIDE 35

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Theorem

Let S be a set of universal generalised definite rules. Let B ⊆ HB be a set of ground atoms. Then HI(B) | = S iff T

S(B) ⊆ B.

Proof.

“only if:” Assume HI(B) | = S. Let A ∈ T

S(B), i.e., A = Ai for some ground instance

((A1 ∧ . . . ∧ An) ← ϕ) of a member of S with HI(B) | = ϕ. By assumption HI(B) | = (A1 ∧ . . . ∧ An), hence HI(B) | = A, hence A ∈ B because A is a ground atom.

Thomas Eiter and Reinhard Pichler December 20, 2012 17/53

slide-36
SLIDE 36

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Theorem

Let S be a set of universal generalised definite rules. Let B ⊆ HB be a set of ground atoms. Then HI(B) | = S iff T

S(B) ⊆ B.

Proof.

“only if:” Assume HI(B) | = S. Let A ∈ T

S(B), i.e., A = Ai for some ground instance

((A1 ∧ . . . ∧ An) ← ϕ) of a member of S with HI(B) | = ϕ. By assumption HI(B) | = (A1 ∧ . . . ∧ An), hence HI(B) | = A, hence A ∈ B because A is a ground atom. “if:” Assume T

S(B) ⊆ B. Let r = ((A1 ∧ . . . ∧ An) ← ϕ) be a ground instance of a

member of S. It suffices to show that HI(B) satisfies r.

Thomas Eiter and Reinhard Pichler December 20, 2012 17/53

slide-37
SLIDE 37

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Theorem

Let S be a set of universal generalised definite rules. Let B ⊆ HB be a set of ground atoms. Then HI(B) | = S iff T

S(B) ⊆ B.

Proof.

“only if:” Assume HI(B) | = S. Let A ∈ T

S(B), i.e., A = Ai for some ground instance

((A1 ∧ . . . ∧ An) ← ϕ) of a member of S with HI(B) | = ϕ. By assumption HI(B) | = (A1 ∧ . . . ∧ An), hence HI(B) | = A, hence A ∈ B because A is a ground atom. “if:” Assume T

S(B) ⊆ B. Let r = ((A1 ∧ . . . ∧ An) ← ϕ) be a ground instance of a

member of S. It suffices to show that HI(B) satisfies r. If HI(B) | = ϕ, it does.

Thomas Eiter and Reinhard Pichler December 20, 2012 17/53

slide-38
SLIDE 38

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Theorem

Let S be a set of universal generalised definite rules. Let B ⊆ HB be a set of ground atoms. Then HI(B) | = S iff T

S(B) ⊆ B.

Proof.

“only if:” Assume HI(B) | = S. Let A ∈ T

S(B), i.e., A = Ai for some ground instance

((A1 ∧ . . . ∧ An) ← ϕ) of a member of S with HI(B) | = ϕ. By assumption HI(B) | = (A1 ∧ . . . ∧ An), hence HI(B) | = A, hence A ∈ B because A is a ground atom. “if:” Assume T

S(B) ⊆ B. Let r = ((A1 ∧ . . . ∧ An) ← ϕ) be a ground instance of a

member of S. It suffices to show that HI(B) satisfies r. If HI(B) | = ϕ, it does. If HI(B) | = ϕ, then A1 ∈ T

S(B), . . . , An ∈ T S(B) by definition of T S.

By assumption A1 ∈ B, . . . , An ∈ B.

Thomas Eiter and Reinhard Pichler December 20, 2012 17/53

slide-39
SLIDE 39

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Theorem

Let S be a set of universal generalised definite rules. Let B ⊆ HB be a set of ground atoms. Then HI(B) | = S iff T

S(B) ⊆ B.

Proof.

“only if:” Assume HI(B) | = S. Let A ∈ T

S(B), i.e., A = Ai for some ground instance

((A1 ∧ . . . ∧ An) ← ϕ) of a member of S with HI(B) | = ϕ. By assumption HI(B) | = (A1 ∧ . . . ∧ An), hence HI(B) | = A, hence A ∈ B because A is a ground atom. “if:” Assume T

S(B) ⊆ B. Let r = ((A1 ∧ . . . ∧ An) ← ϕ) be a ground instance of a

member of S. It suffices to show that HI(B) satisfies r. If HI(B) | = ϕ, it does. If HI(B) | = ϕ, then A1 ∈ T

S(B), . . . , An ∈ T S(B) by definition of T S.

By assumption A1 ∈ B, . . . , An ∈ B. As all Ai are ground atoms, HI(B) | = A1, . . . , HI(B) | = An. Thus HI(B) satisfies r.

Thomas Eiter and Reinhard Pichler December 20, 2012 17/53

slide-40
SLIDE 40

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Corollary (Fixpoint Characterization of the Least Herbrand Model)

Let S be a set of universal generalised definite rules. Then (i) lfp(T

S) = T S ↑ ω = Mod∩(S) = {A ∈ HB | S |

= A} and (ii) HI(lfp(T

S)) is the unique minimal Herbrand model of S.

Thomas Eiter and Reinhard Pichler December 20, 2012 18/53

slide-41
SLIDE 41

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Corollary (Fixpoint Characterization of the Least Herbrand Model)

Let S be a set of universal generalised definite rules. Then (i) lfp(T

S) = T S ↑ ω = Mod∩(S) = {A ∈ HB | S |

= A} and (ii) HI(lfp(T

S)) is the unique minimal Herbrand model of S.

Proof.

(i): By the Lemma above, T

S is a continuous operator on HB, and by Kleene’s Theorem,

lfp(T

S) = T S ↑ ω. Note that ModHB(S) = ∅ (as HI(HB) |

= S) Now, lfp(T

S)

= {B ⊆ HB | T

S(B) ⊆ B}

by the Knaster-Tarski Theorem = {B ⊆ HB | HI(B) | = S} by the previous Theorem = ModHB(S) by definition of ModHB = Mod∩(S) by definition of Mod∩ = {A ∈ HB | S | = A} as S is universal (see unit 4) (ii): By (i), HI(lfp(T

S)) is the intersection of all Herbrand models of S, and

HI(lfp(T

S)) |

= S, as S is satisfiable. Hence, HI(lfp(T

S)) is the unique minimal Herbrand model of S.

Thomas Eiter and Reinhard Pichler December 20, 2012 18/53

slide-42
SLIDE 42

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.3 Fixpoint Semantics

Characterization Summary

The “natural meaning” of a set S of universal generalised definite rules can defined in different but equivalent ways:

  • as the unique minimal Herbrand model of S;
  • as the intersection HI(Mod∩(S)) of all Herbrand models of S;
  • as the set {A ∈ HB | S |

= A} of ground atoms entailed by S;

  • as the least fixpoint lfp(T

S) of the immediate consequence operator

Declarative and procedural (forward chaining) semantics coincide. Further equivalent procedural semantics, based on SLD resolution, exists (backward chaining).

Thomas Eiter and Reinhard Pichler December 20, 2012 19/53

slide-43
SLIDE 43

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.4 Rules with Negation

Outline

  • 5. Declarative Semantics of Rule Languages

5.1 Minimal Model Semantics of Definite Rules 5.2 Operator Fixpoints 5.3 Fixpoint Semantics of Positive Rules 5.4 Rules with Negation 5.5 Stratifiable Rule Sets 5.6 Stable Model Semantics

Thomas Eiter and Reinhard Pichler December 20, 2012 20/53

slide-44
SLIDE 44

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.4 Rules with Negation

Declarative Semantics of Rules with Negation

If a database of students does not list “Mary”, then one may conclude that “Mary” is not a student. The principle underlying this is called closed world assumption (CWA). Two approaches to coping with this form of negation: axiomatization within first-oder predicate logic deduction methods not requiring specific axioms conveying the CWA The second approach is desirable but it poses the problem of the declarative semantics, or model theory.

Thomas Eiter and Reinhard Pichler December 20, 2012 21/53

slide-45
SLIDE 45

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.4 Rules with Negation

Not all Minimal Models convey the CWA

Example

S1 = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) } Minimal Herbrand models: HI({s, r, q}), HI({s, r, p}), and HI({s, t}). Intuitively, p and t are not “justified” by the rules on S1.

Thomas Eiter and Reinhard Pichler December 20, 2012 22/53

slide-46
SLIDE 46

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.4 Rules with Negation

Not all Minimal Models convey the CWA

Example

S1 = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) } Minimal Herbrand models: HI({s, r, q}), HI({s, r, p}), and HI({s, t}). Intuitively, p and t are not “justified” by the rules on S1. S2 = { (p ← ¬q), (q ← ¬p) } Minimal Herbrand models: HI({p}), HI({q}). Intuitively, exactly one of p and q should be true, but it is unclear which.

Thomas Eiter and Reinhard Pichler December 20, 2012 22/53

slide-47
SLIDE 47

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.4 Rules with Negation

Not all Minimal Models convey the CWA

Example

S1 = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) } Minimal Herbrand models: HI({s, r, q}), HI({s, r, p}), and HI({s, t}). Intuitively, p and t are not “justified” by the rules on S1. S2 = { (p ← ¬q), (q ← ¬p) } Minimal Herbrand models: HI({p}), HI({q}). Intuitively, exactly one of p and q should be true, but it is unclear which. S3 = { (p ← ¬p) } Minimal Herbrand model: HI({p}). p can not be arguably justified from S3, which is intuitively not consistent.

Thomas Eiter and Reinhard Pichler December 20, 2012 22/53

slide-48
SLIDE 48

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.4 Rules with Negation

Not all Minimal Models convey the CWA

Example

S1 = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) } Minimal Herbrand models: HI({s, r, q}), HI({s, r, p}), and HI({s, t}). Intuitively, p and t are not “justified” by the rules on S1. S2 = { (p ← ¬q), (q ← ¬p) } Minimal Herbrand models: HI({p}), HI({q}). Intuitively, exactly one of p and q should be true, but it is unclear which. S3 = { (p ← ¬p) } Minimal Herbrand model: HI({p}). p can not be arguably justified from S3, which is intuitively not consistent. S4 = { (p ← ¬p), (p ← ⊤) } Minimal Herbrand model: HI({p}). Here, p is arguably justified and S4 should be consistent. Note: different from classical logic, a subset of a consistent rule set (S3 ⊆ S4) may be inconsistent!

Thomas Eiter and Reinhard Pichler December 20, 2012 22/53

slide-49
SLIDE 49

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.4 Rules with Negation

Justification and Consistency Postulate

Summarizing the above examples:

Justification Postulate

Derived truths must have “justifications” in terms of rules. In S1 above, only in HI({s, r, q}) all atoms have justifications. The only rule of S3 does not “justify” p

Consistency Postulate

Every syntactically correct set of normal clauses is consistent (as it has a classical model) and must therefore have a model. S3 must have a model, the only Herbrand candidate is HI({p}).

Thomas Eiter and Reinhard Pichler December 20, 2012 23/53

slide-50
SLIDE 50

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.4 Rules with Negation

Non-Monotonic Consequence

A consequence operator is a mapping that assigns a set S of formulas a set

  • f formulas Th(S) (satisfying certain properties).

We can view Th(S) as an operator considered above. S3 and S4 suggest that a consequence operator for rules with negation should be non-monotonic (if Th(S) for “inconsistent” S yields all formulas).

Thomas Eiter and Reinhard Pichler December 20, 2012 24/53

slide-51
SLIDE 51

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.4 Rules with Negation

Non-Monotonic Consequence

A consequence operator is a mapping that assigns a set S of formulas a set

  • f formulas Th(S) (satisfying certain properties).

We can view Th(S) as an operator considered above. S3 and S4 suggest that a consequence operator for rules with negation should be non-monotonic (if Th(S) for “inconsistent” S yields all formulas). But also for “consistent” sets of formulas, consequence should act non-monotonic, if it is based on canonical models, which are preferred minimal Herbrand models (denoted Thcan(S)).

Thomas Eiter and Reinhard Pichler December 20, 2012 24/53

slide-52
SLIDE 52

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.4 Rules with Negation

Non-Monotonic Consequence

A consequence operator is a mapping that assigns a set S of formulas a set

  • f formulas Th(S) (satisfying certain properties).

We can view Th(S) as an operator considered above. S3 and S4 suggest that a consequence operator for rules with negation should be non-monotonic (if Th(S) for “inconsistent” S yields all formulas). But also for “consistent” sets of formulas, consequence should act non-monotonic, if it is based on canonical models, which are preferred minimal Herbrand models (denoted Thcan(S)).

Example

S5 = { (q ← ¬p) } has the minimal Herbrand models: HI({p}) and HI({q}). Only HI({q}) conveys the intuitive meaning under the CWA and should be retained as (the only) canonical model. Therefore, q ∈ Thcan(S5).

Thomas Eiter and Reinhard Pichler December 20, 2012 24/53

slide-53
SLIDE 53

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.4 Rules with Negation

Non-Monotonic Consequence

A consequence operator is a mapping that assigns a set S of formulas a set

  • f formulas Th(S) (satisfying certain properties).

We can view Th(S) as an operator considered above. S3 and S4 suggest that a consequence operator for rules with negation should be non-monotonic (if Th(S) for “inconsistent” S yields all formulas). But also for “consistent” sets of formulas, consequence should act non-monotonic, if it is based on canonical models, which are preferred minimal Herbrand models (denoted Thcan(S)).

Example

S5 = { (q ← ¬p) } has the minimal Herbrand models: HI({p}) and HI({q}). Only HI({q}) conveys the intuitive meaning under the CWA and should be retained as (the only) canonical model. Therefore, q ∈ Thcan(S5). S′

5 = S5 ∪ { (p ← ⊤) } has the single minimal Herbrand model HI({p}), which also

conveys the intuitive meaning under the CWA and should be retained as a canonical

  • model. Therefore, q /

∈ Thcan(S′

5).

Thus, S5 ⊆ S′

5, but Thcan(S5) ⊆ Thcan(S′ 5).

Thomas Eiter and Reinhard Pichler December 20, 2012 24/53

slide-54
SLIDE 54

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.5 Stratifiable Rule Sets

Outline

  • 5. Declarative Semantics of Rule Languages

5.1 Minimal Model Semantics of Definite Rules 5.2 Operator Fixpoints 5.3 Fixpoint Semantics of Positive Rules 5.4 Rules with Negation 5.5 Stratifiable Rule Sets 5.6 Stable Model Semantics

Thomas Eiter and Reinhard Pichler December 20, 2012 25/53

slide-55
SLIDE 55

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.5 Stratifiable Rule Sets

Stratifiable Rule Sets

Basic Idea

Avoid cases like (p ← ¬p) and more generally recursion through negative literals.

Definition (Stratification)

A stratification of a set S of normal clauses (rules) is a partition S0, . . . , Sk of S such that For each relation symbol p there is a stratum Si, such that all clauses of S containing p in their consequent are members of Si. In this case one says that the relation symbol p is defined in stratum Si. For each stratum Sj and positive literal A in the antecedents of members

  • f Sj, the relation symbol of A is defined in a stratum Si with i ≤ j.

For each stratum Sj and negative literal ¬A in the antecedents of members

  • f Sj, the relation symbol of A is defined in a stratum Si with i < j.

A set of normal clauses is called stratifiable, if there exists a stratification of it.

Thomas Eiter and Reinhard Pichler December 20, 2012 26/53

slide-56
SLIDE 56

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.5 Stratifiable Rule Sets

Example

Each definite program is stratifiable by making it its only stratum.

Thomas Eiter and Reinhard Pichler December 20, 2012 27/53

slide-57
SLIDE 57

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.5 Stratifiable Rule Sets

Example

Each definite program is stratifiable by making it its only stratum. The set S = { (r ← ⊤), (q ← r), (p ← q ∧ ¬r) } is stratifiable: the stratum S0 contains the first clause and the stratum S1 the last one, while the middle clause may belong to either of the strata.

Thomas Eiter and Reinhard Pichler December 20, 2012 27/53

slide-58
SLIDE 58

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.5 Stratifiable Rule Sets

Example

Each definite program is stratifiable by making it its only stratum. The set S = { (r ← ⊤), (q ← r), (p ← q ∧ ¬r) } is stratifiable: the stratum S0 contains the first clause and the stratum S1 the last one, while the middle clause may belong to either of the strata. The set S = { (p ← ¬p) } is not stratifiable.

Thomas Eiter and Reinhard Pichler December 20, 2012 27/53

slide-59
SLIDE 59

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.5 Stratifiable Rule Sets

Example

Each definite program is stratifiable by making it its only stratum. The set S = { (r ← ⊤), (q ← r), (p ← q ∧ ¬r) } is stratifiable: the stratum S0 contains the first clause and the stratum S1 the last one, while the middle clause may belong to either of the strata. The set S = { (p ← ¬p) } is not stratifiable. Any set of normal clauses with a “cycle of recursion through negation” (defined syntactically via a dependency graph is not stratifiable.

Thomas Eiter and Reinhard Pichler December 20, 2012 27/53

slide-60
SLIDE 60

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.5 Stratifiable Rule Sets

Stratifable Rule Sets – Canoncial Model

Principal Idea

The stratum S0 always consists of definite clauses (positive definite rules). Hence the truth values of all atoms of stratum S0 can be determined without negation being involved.

Thomas Eiter and Reinhard Pichler December 20, 2012 28/53

slide-61
SLIDE 61

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.5 Stratifiable Rule Sets

Stratifable Rule Sets – Canoncial Model

Principal Idea

The stratum S0 always consists of definite clauses (positive definite rules). Hence the truth values of all atoms of stratum S0 can be determined without negation being involved. After that the clauses of stratum S1 refer only to such negative literals whose truth values have already been determined in S0. After that the clauses of stratum S2 refer only to such negative literals whose truth values have already been determined in S0 and S1. And so on. That is, work stratum by stratum.

Thomas Eiter and Reinhard Pichler December 20, 2012 28/53

slide-62
SLIDE 62

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.5 Stratifiable Rule Sets

Stratifable Rule Sets – Canoncial Model

Principal Idea

The stratum S0 always consists of definite clauses (positive definite rules). Hence the truth values of all atoms of stratum S0 can be determined without negation being involved. After that the clauses of stratum S1 refer only to such negative literals whose truth values have already been determined in S0. After that the clauses of stratum S2 refer only to such negative literals whose truth values have already been determined in S0 and S1. And so on. That is, work stratum by stratum.

Stratification Theorem (Apt, Blair and Walker)

Each stratifiable rule set has a well-defined canonical model (also called perfect model), which is independent of a particular stratification.

Thomas Eiter and Reinhard Pichler December 20, 2012 28/53

slide-63
SLIDE 63

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.6 Stable Model Semantics

Outline

  • 5. Declarative Semantics of Rule Languages

5.1 Minimal Model Semantics of Definite Rules 5.2 Operator Fixpoints 5.3 Fixpoint Semantics of Positive Rules 5.4 Rules with Negation 5.5 Stratifiable Rule Sets 5.6 Stable Model Semantics

Thomas Eiter and Reinhard Pichler December 20, 2012 29/53

slide-64
SLIDE 64

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.6 Stable Model Semantics

Stable Model Semantics

Basic Idea

Perform assumption-based evaluation, where negation takes the value in the final result.

Definition (Gelfond-Lifschitz transformation)

Let S be a (possibly infinite) set of ground normal clauses, i.e., of formulas A ← L1 ∧ . . . ∧ Ln where n ≥ 0 and A is a ground atom and the Li for 1 ≤ i ≤ n are ground literals. Let B ⊆ HB. The Gelfond-Lifschitz transform GLB(S) of S with respect to B is

  • btained from S as follows:

1 remove each clause whose antecedent contains a literal ¬A with A ∈ B. 2 remove from the antecedents of the remaining clauses all negative literals.

Thomas Eiter and Reinhard Pichler December 20, 2012 30/53

slide-65
SLIDE 65

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.6 Stable Model Semantics

Definition (Stable model)

Let S be a (possibly infinite) set of ground normal clauses. An Herbrand interpretation HI(B) is a stable model of S iff it is the unique minimal Herbrand model of GLB(S). A stable model of a set S of normal clauses is a stable model of the (possibly infinite) set of ground instances of S.

Thomas Eiter and Reinhard Pichler December 20, 2012 31/53

slide-66
SLIDE 66

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.6 Stable Model Semantics

Definition (Stable model)

Let S be a (possibly infinite) set of ground normal clauses. An Herbrand interpretation HI(B) is a stable model of S iff it is the unique minimal Herbrand model of GLB(S). A stable model of a set S of normal clauses is a stable model of the (possibly infinite) set of ground instances of S.

Example

S1 = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) } has one stable model: HI({s, r, q}).

Thomas Eiter and Reinhard Pichler December 20, 2012 31/53

slide-67
SLIDE 67

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.6 Stable Model Semantics

Definition (Stable model)

Let S be a (possibly infinite) set of ground normal clauses. An Herbrand interpretation HI(B) is a stable model of S iff it is the unique minimal Herbrand model of GLB(S). A stable model of a set S of normal clauses is a stable model of the (possibly infinite) set of ground instances of S.

Example

S1 = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) } has one stable model: HI({s, r, q}). S2 = { (p ← ¬q), (q ← ¬p) } has two stable models: HI({p}) and HI({q}).

Thomas Eiter and Reinhard Pichler December 20, 2012 31/53

slide-68
SLIDE 68

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.6 Stable Model Semantics

Definition (Stable model)

Let S be a (possibly infinite) set of ground normal clauses. An Herbrand interpretation HI(B) is a stable model of S iff it is the unique minimal Herbrand model of GLB(S). A stable model of a set S of normal clauses is a stable model of the (possibly infinite) set of ground instances of S.

Example

S1 = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) } has one stable model: HI({s, r, q}). S2 = { (p ← ¬q), (q ← ¬p) } has two stable models: HI({p}) and HI({q}). S3 = { (p ← ¬p) } has no stable model.

Thomas Eiter and Reinhard Pichler December 20, 2012 31/53

slide-69
SLIDE 69

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.6 Stable Model Semantics

Definition (Stable model)

Let S be a (possibly infinite) set of ground normal clauses. An Herbrand interpretation HI(B) is a stable model of S iff it is the unique minimal Herbrand model of GLB(S). A stable model of a set S of normal clauses is a stable model of the (possibly infinite) set of ground instances of S.

Example

S1 = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) } has one stable model: HI({s, r, q}). S2 = { (p ← ¬q), (q ← ¬p) } has two stable models: HI({p}) and HI({q}). S3 = { (p ← ¬p) } has no stable model. S4 = { (p ← ¬p), (p ← ⊤) } has one stable model: HI({p}).

Thomas Eiter and Reinhard Pichler December 20, 2012 31/53

slide-70
SLIDE 70

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.6 Stable Model Semantics

Stable Model Semantics –Properties

Theorem

Every stable model of a normal clause set S is a minimal Herbrand model of S.

Thomas Eiter and Reinhard Pichler December 20, 2012 32/53

slide-71
SLIDE 71

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.6 Stable Model Semantics

Stable Model Semantics –Properties

Theorem

Every stable model of a normal clause set S is a minimal Herbrand model of S.

Proof.

It suffices to consider a set S of ground normal clauses. Let B ⊆ HB such that HI(B) is a stable model of S. Then HI(B) | = GLB(S). As easily seen from the definition of GLB(·), this implies HI(B) | = S.

Thomas Eiter and Reinhard Pichler December 20, 2012 32/53

slide-72
SLIDE 72

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.6 Stable Model Semantics

Stable Model Semantics –Properties

Theorem

Every stable model of a normal clause set S is a minimal Herbrand model of S.

Proof.

It suffices to consider a set S of ground normal clauses. Let B ⊆ HB such that HI(B) is a stable model of S. Then HI(B) | = GLB(S). As easily seen from the definition of GLB(·), this implies HI(B) | = S. To show HI(B) is a minimal Herbrand model of S, it suffices to show B′ ⊆ B ∧ HI(B′) | = S implies HI(B′) | = GLB(S). Indeed, minimality of stable models implies B′ = B.

Thomas Eiter and Reinhard Pichler December 20, 2012 32/53

slide-73
SLIDE 73

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.6 Stable Model Semantics

Stable Model Semantics –Properties

Theorem

Every stable model of a normal clause set S is a minimal Herbrand model of S.

Proof.

It suffices to consider a set S of ground normal clauses. Let B ⊆ HB such that HI(B) is a stable model of S. Then HI(B) | = GLB(S). As easily seen from the definition of GLB(·), this implies HI(B) | = S. To show HI(B) is a minimal Herbrand model of S, it suffices to show B′ ⊆ B ∧ HI(B′) | = S implies HI(B′) | = GLB(S). Indeed, minimality of stable models implies B′ = B. Let C ∈ GLB(S). Then C results from some clause D ∈ S, by removing the negative literals from its antecedent. If ¬A is such a literal, then A / ∈ B, and, since B′ ⊆ B, also A / ∈ B′. Therefore, C ∈ GLB′(S). As HI(B′) | = S, it follows HI(B′) | = C.

Thomas Eiter and Reinhard Pichler December 20, 2012 32/53

slide-74
SLIDE 74

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.6 Stable Model Semantics

Stable Model Semantics –Properties

Theorem

Every stable model of a normal clause set S is a minimal Herbrand model of S.

Proof.

It suffices to consider a set S of ground normal clauses. Let B ⊆ HB such that HI(B) is a stable model of S. Then HI(B) | = GLB(S). As easily seen from the definition of GLB(·), this implies HI(B) | = S. To show HI(B) is a minimal Herbrand model of S, it suffices to show B′ ⊆ B ∧ HI(B′) | = S implies HI(B′) | = GLB(S). Indeed, minimality of stable models implies B′ = B. Let C ∈ GLB(S). Then C results from some clause D ∈ S, by removing the negative literals from its antecedent. If ¬A is such a literal, then A / ∈ B, and, since B′ ⊆ B, also A / ∈ B′. Therefore, C ∈ GLB′(S). As HI(B′) | = S, it follows HI(B′) | = C.

Proposition

Every stratifiable rule set has exactly one stable model, which coincides with the respective canonical model.

Thomas Eiter and Reinhard Pichler December 20, 2012 32/53

slide-75
SLIDE 75

Foundations of DKS

  • 5. Declarative Semantics of Rules

5.6 Stable Model Semantics

Stable Model Semantics – Evaluation

The Stable Model Semantics coincides with the intuitive understanding based on the Justification Postulate. It does not satisfy the Consistency Postulate. It gracefully generalizes the canonical semantics. To date, Stable Model Semantics is the predominant multiple model non-montonic semantics for rule sets with negation.

Thomas Eiter and Reinhard Pichler December 20, 2012 33/53

slide-76
SLIDE 76

Foundations of DKS

  • 6. Appendix: General Minimal Models

Appendix: Beyond Herbrand Models

Generalisation

Minimal Models are also defined for non-Herbrand interpretations They make sense also for generalizations of non-inductive formulas Uniqueness and intersection property might be lost Still the results can be useful

Thomas Eiter and Reinhard Pichler December 20, 2012 34/53

slide-77
SLIDE 77

Foundations of DKS

  • 6. Appendix: General Minimal Models

Appendix: Beyond Herbrand Models

Generalisation

Minimal Models are also defined for non-Herbrand interpretations They make sense also for generalizations of non-inductive formulas Uniqueness and intersection property might be lost Still the results can be useful

Definition (Generalised Rules)

A generalised rule is a formula of the form ∀∗(ψ ← ϕ) where ϕ is positive and ψ is positive and quantifier-free.

Thomas Eiter and Reinhard Pichler December 20, 2012 34/53

slide-78
SLIDE 78

Foundations of DKS

  • 6. Appendix: General Minimal Models

Appendix: Beyond Herbrand Models

Generalisation

Minimal Models are also defined for non-Herbrand interpretations They make sense also for generalizations of non-inductive formulas Uniqueness and intersection property might be lost Still the results can be useful

Definition (Generalised Rules)

A generalised rule is a formula of the form ∀∗(ψ ← ϕ) where ϕ is positive and ψ is positive and quantifier-free.

Example

The rule (p(a) ∨ p(b) ← ⊤) is a generalised rule (which is indefinite).

Thomas Eiter and Reinhard Pichler December 20, 2012 34/53

slide-79
SLIDE 79

Foundations of DKS

  • 6. Appendix: General Minimal Models

Appendix: Beyond Herbrand Models

Generalisation

Minimal Models are also defined for non-Herbrand interpretations They make sense also for generalizations of non-inductive formulas Uniqueness and intersection property might be lost Still the results can be useful

Definition (Generalised Rules)

A generalised rule is a formula of the form ∀∗(ψ ← ϕ) where ϕ is positive and ψ is positive and quantifier-free.

Example

The rule (p(a) ∨ p(b) ← ⊤) is a generalised rule (which is indefinite). Generalised rules are not necessarily universal: p(a) ← ∀x.q(x)

Thomas Eiter and Reinhard Pichler December 20, 2012 34/53

slide-80
SLIDE 80

Foundations of DKS

  • 6. Appendix: General Minimal Models

Supportedness in Minimal Models

Definition (Supported Atoms)

Let I be an interpretation, V a variable assignment in dom(I) and A = p(t1, . . . , tn) an atom, n ≥ 0. an atom B supports A in I[V] iff I[V] | = B and B = p(s1, . . . , sn) and sI[V]

i

= tI[V]

i

for 1 ≤ i ≤ n. a set C of atoms supports A in I[V] iff I[V] | = C and there is an atom in C that supports A in I[V]. a generalised rule ∀∗(ψ ← ϕ) supports A in I iff for each variable assignment V with I[V] | = ϕ there exists an implicant C of ψ that supports A in I[V]. Informally, an implicant C of ψ is a set of atoms which logically implies ψ

Thomas Eiter and Reinhard Pichler December 20, 2012 35/53

slide-81
SLIDE 81

Foundations of DKS

  • 6. Appendix: General Minimal Models

Implicant of a Positive Quantifier-Free Formula

Definition (Pre-Implicant and Implicant)

Let ψ be a positive quantifier-free formula. The set primps(ψ) of pre-implicants

  • f ψ is defined as follows:

primps(ψ) = { {ψ} } if ψ is an atom or ⊤ or ⊥. primps(¬ψ1) = primps(ψ1). primps(ψ1 ∧ ψ2) = { C1 ∪ C2 | C1 ∈ primps(ψ1), C2 ∈ primps(ψ2) }. primps(ψ1 ∨ ψ2) = primps(ψ1 ⇒ψ2) = primps(ψ1) ∪ primps(ψ2). The set of implicants of ψ is obtained from primps(ψ) by removing all sets containing ⊥ and by removing ⊤ from the remaining sets.

Lemma

1 If C is an implicant of ψ, then C |

= ψ.

2 For any interpretation I and variable assignment V in dom(I), if I[V] |

= ψ then there exists an implicant C of ψ with I[V] | = C.

Thomas Eiter and Reinhard Pichler December 20, 2012 36/53

slide-82
SLIDE 82

Foundations of DKS

  • 6. Appendix: General Minimal Models

Supportedness by Generalized Rules, Revisited

Reconsider the definition: Let I be an interpretation and A = p(t1, . . . , tn) an atom, n ≥ 0. Then a generalised rule ∀∗(ψ ← ϕ) supports A in I iff for each variable assignment V with I[V] | = ϕ there exists some implicant C of ψ that supports A in I[V].

Example

Consider r = ∀x(p(x) ← q(x)) and the facts q(a) and q(b).

Thomas Eiter and Reinhard Pichler December 20, 2012 37/53

slide-83
SLIDE 83

Foundations of DKS

  • 6. Appendix: General Minimal Models

Supportedness by Generalized Rules, Revisited

Reconsider the definition: Let I be an interpretation and A = p(t1, . . . , tn) an atom, n ≥ 0. Then a generalised rule ∀∗(ψ ← ϕ) supports A in I iff for each variable assignment V with I[V] | = ϕ there exists some implicant C of ψ that supports A in I[V].

Example

Consider r = ∀x(p(x) ← q(x)) and the facts q(a) and q(b). The only implicant of p(x) is p(x) itself.

Thomas Eiter and Reinhard Pichler December 20, 2012 37/53

slide-84
SLIDE 84

Foundations of DKS

  • 6. Appendix: General Minimal Models

Supportedness by Generalized Rules, Revisited

Reconsider the definition: Let I be an interpretation and A = p(t1, . . . , tn) an atom, n ≥ 0. Then a generalised rule ∀∗(ψ ← ϕ) supports A in I iff for each variable assignment V with I[V] | = ϕ there exists some implicant C of ψ that supports A in I[V].

Example

Consider r = ∀x(p(x) ← q(x)) and the facts q(a) and q(b). The only implicant of p(x) is p(x) itself. Let I be the Herbrand interpretation that satisfies q(a), q(b), p(a), and p(b).

Thomas Eiter and Reinhard Pichler December 20, 2012 37/53

slide-85
SLIDE 85

Foundations of DKS

  • 6. Appendix: General Minimal Models

Supportedness by Generalized Rules, Revisited

Reconsider the definition: Let I be an interpretation and A = p(t1, . . . , tn) an atom, n ≥ 0. Then a generalised rule ∀∗(ψ ← ϕ) supports A in I iff for each variable assignment V with I[V] | = ϕ there exists some implicant C of ψ that supports A in I[V].

Example

Consider r = ∀x(p(x) ← q(x)) and the facts q(a) and q(b). The only implicant of p(x) is p(x) itself. Let I be the Herbrand interpretation that satisfies q(a), q(b), p(a), and p(b). r supports p(x)

Thomas Eiter and Reinhard Pichler December 20, 2012 37/53

slide-86
SLIDE 86

Foundations of DKS

  • 6. Appendix: General Minimal Models

Supportedness by Generalized Rules, Revisited

Reconsider the definition: Let I be an interpretation and A = p(t1, . . . , tn) an atom, n ≥ 0. Then a generalised rule ∀∗(ψ ← ϕ) supports A in I iff for each variable assignment V with I[V] | = ϕ there exists some implicant C of ψ that supports A in I[V].

Example

Consider r = ∀x(p(x) ← q(x)) and the facts q(a) and q(b). The only implicant of p(x) is p(x) itself. Let I be the Herbrand interpretation that satisfies q(a), q(b), p(a), and p(b). r supports p(x) r does not support p(a), not p(b)

Thomas Eiter and Reinhard Pichler December 20, 2012 37/53

slide-87
SLIDE 87

Foundations of DKS

  • 6. Appendix: General Minimal Models

Supportedness by Generalized Rules, Revisited

Reconsider the definition: Let I be an interpretation and A = p(t1, . . . , tn) an atom, n ≥ 0. Then a generalised rule ∀∗(ψ ← ϕ) supports A in I iff for each variable assignment V with I[V] | = ϕ there exists some variable assignment V′ such that tI[V]

i

= tI[V′]

i

for 1 ≤ i ≤ n and some implicant C of ψ that supports A in I[V′].

Example

Consider r = ∀x(p(x) ← q(x)) and the facts q(a) and q(b). The only implicant of p(x) is p(x) itself. Let I be the Herbrand interpretation that satisfies q(a), q(b), p(a), and p(b). r supports p(x) r does not support p(a), not p(b) Fix: allow variables “outside” A to change value.

Thomas Eiter and Reinhard Pichler December 20, 2012 37/53

slide-88
SLIDE 88

Foundations of DKS

  • 6. Appendix: General Minimal Models

Supportedness Result

Theorem (Minimal Models Satisfy Only Supported Ground Atom)

Let S be a set of generalised rules. If I is a minimal model of S, then for each ground atom A with I | = A there exists some generalised rule in S that supports A in I.

Thomas Eiter and Reinhard Pichler December 20, 2012 38/53

slide-89
SLIDE 89

Foundations of DKS

  • 6. Appendix: General Minimal Models

Supportedness Result

Theorem (Minimal Models Satisfy Only Supported Ground Atom)

Let S be a set of generalised rules. If I is a minimal model of S, then for each ground atom A with I | = A there exists some generalised rule in S that supports A in I.

Example

Consider a signature with a unary relation symbol p and constants a and b. Let S = { (p(b) ← ⊤) }. The interpretation I with dom(I) = {1} and aI = bI = 1 and pI = {(1)} is a minimal model of S. Moreover, I | = p(a). By the theorem, p(a) is supported in I by p(b), which can be confirmed by applying the definition.

Thomas Eiter and Reinhard Pichler December 20, 2012 38/53

slide-90
SLIDE 90

Foundations of DKS

  • 6. Appendix: General Minimal Models

Supportedness Result

Theorem (Minimal Models Satisfy Only Supported Ground Atom)

Let S be a set of generalised rules. If I is a minimal model of S, then for each ground atom A with I | = A there exists some generalised rule in S that supports A in I.

Example

Consider a signature with a unary relation symbol p and constants a and b. Let S = { (p(b) ← ⊤) }. The interpretation I with dom(I) = {1} and aI = bI = 1 and pI = {(1)} is a minimal model of S. Moreover, I | = p(a). By the theorem, p(a) is supported in I by p(b), which can be confirmed by applying the definition.

Non-Minimal Supportedness

The converse of the Theorem fails, e.g. S = { (p ← p) }.

Thomas Eiter and Reinhard Pichler December 20, 2012 38/53

slide-91
SLIDE 91

Foundations of DKS

  • 6. Appendix: General Minimal Models

Proof.

Assume that I is a minimal model of S with domain D and there is a ground atom A with I | = A, such that no r ∈ S supports A in I.

Thomas Eiter and Reinhard Pichler December 20, 2012 39/53

slide-92
SLIDE 92

Foundations of DKS

  • 6. Appendix: General Minimal Models

Proof.

Assume that I is a minimal model of S with domain D and there is a ground atom A with I | = A, such that no r ∈ S supports A in I. Let I′ be identical to I except that I′ | = A. Then I′ < I.

Thomas Eiter and Reinhard Pichler December 20, 2012 39/53

slide-93
SLIDE 93

Foundations of DKS

  • 6. Appendix: General Minimal Models

Proof.

Assume that I is a minimal model of S with domain D and there is a ground atom A with I | = A, such that no r ∈ S supports A in I. Let I′ be identical to I except that I′ | = A. Then I′ < I. Consider any r = ∀∗(ψ ← ϕ) from S. Let V be an arbitrary variable assignment in D. We show I′[V] | = (ψ ← ϕ).

Thomas Eiter and Reinhard Pichler December 20, 2012 39/53

slide-94
SLIDE 94

Foundations of DKS

  • 6. Appendix: General Minimal Models

Proof.

Assume that I is a minimal model of S with domain D and there is a ground atom A with I | = A, such that no r ∈ S supports A in I. Let I′ be identical to I except that I′ | = A. Then I′ < I. Consider any r = ∀∗(ψ ← ϕ) from S. Let V be an arbitrary variable assignment in D. We show I′[V] | = (ψ ← ϕ). If I[V] | = ϕ, as ϕ is positive, also I′[V] | = ϕ; hence I′[V] | = (ψ ← ϕ).

Thomas Eiter and Reinhard Pichler December 20, 2012 39/53

slide-95
SLIDE 95

Foundations of DKS

  • 6. Appendix: General Minimal Models

Proof.

Assume that I is a minimal model of S with domain D and there is a ground atom A with I | = A, such that no r ∈ S supports A in I. Let I′ be identical to I except that I′ | = A. Then I′ < I. Consider any r = ∀∗(ψ ← ϕ) from S. Let V be an arbitrary variable assignment in D. We show I′[V] | = (ψ ← ϕ). If I[V] | = ϕ, as ϕ is positive, also I′[V] | = ϕ; hence I′[V] | = (ψ ← ϕ). If I[V] | = ϕ, then I[V] | = ψ because I is a model of S. By part 2 of the Lemma above, there exists some implicant C of ψ such that I[V] | = C.

Thomas Eiter and Reinhard Pichler December 20, 2012 39/53

slide-96
SLIDE 96

Foundations of DKS

  • 6. Appendix: General Minimal Models

Proof.

Assume that I is a minimal model of S with domain D and there is a ground atom A with I | = A, such that no r ∈ S supports A in I. Let I′ be identical to I except that I′ | = A. Then I′ < I. Consider any r = ∀∗(ψ ← ϕ) from S. Let V be an arbitrary variable assignment in D. We show I′[V] | = (ψ ← ϕ). If I[V] | = ϕ, as ϕ is positive, also I′[V] | = ϕ; hence I′[V] | = (ψ ← ϕ). If I[V] | = ϕ, then I[V] | = ψ because I is a model of S. By part 2 of the Lemma above, there exists some implicant C of ψ such that I[V] | = C. As by hypothesis, r does not support A in I and I[V] | = ϕ and A is ground, it follows that for every variable assignment V′ in D, no implicant of ψ supports A in I[V′].

Thomas Eiter and Reinhard Pichler December 20, 2012 39/53

slide-97
SLIDE 97

Foundations of DKS

  • 6. Appendix: General Minimal Models

Proof.

Assume that I is a minimal model of S with domain D and there is a ground atom A with I | = A, such that no r ∈ S supports A in I. Let I′ be identical to I except that I′ | = A. Then I′ < I. Consider any r = ∀∗(ψ ← ϕ) from S. Let V be an arbitrary variable assignment in D. We show I′[V] | = (ψ ← ϕ). If I[V] | = ϕ, as ϕ is positive, also I′[V] | = ϕ; hence I′[V] | = (ψ ← ϕ). If I[V] | = ϕ, then I[V] | = ψ because I is a model of S. By part 2 of the Lemma above, there exists some implicant C of ψ such that I[V] | = C. As by hypothesis, r does not support A in I and I[V] | = ϕ and A is ground, it follows that for every variable assignment V′ in D, no implicant of ψ supports A in I[V′]. In particular, for V′ = V the implicant C of ψ does not support A in I[V]. As I[V] | = C, it follows BI[V] = AI[V] for all B ∈ C. Hence, I′[V] | = C.

Thomas Eiter and Reinhard Pichler December 20, 2012 39/53

slide-98
SLIDE 98

Foundations of DKS

  • 6. Appendix: General Minimal Models

Proof.

Assume that I is a minimal model of S with domain D and there is a ground atom A with I | = A, such that no r ∈ S supports A in I. Let I′ be identical to I except that I′ | = A. Then I′ < I. Consider any r = ∀∗(ψ ← ϕ) from S. Let V be an arbitrary variable assignment in D. We show I′[V] | = (ψ ← ϕ). If I[V] | = ϕ, as ϕ is positive, also I′[V] | = ϕ; hence I′[V] | = (ψ ← ϕ). If I[V] | = ϕ, then I[V] | = ψ because I is a model of S. By part 2 of the Lemma above, there exists some implicant C of ψ such that I[V] | = C. As by hypothesis, r does not support A in I and I[V] | = ϕ and A is ground, it follows that for every variable assignment V′ in D, no implicant of ψ supports A in I[V′]. In particular, for V′ = V the implicant C of ψ does not support A in I[V]. As I[V] | = C, it follows BI[V] = AI[V] for all B ∈ C. Hence, I′[V] | = C. By part 1 of the above Lemma , I′[V] | = ψ. Hence I′[V] | = (ψ ← ϕ).

Thomas Eiter and Reinhard Pichler December 20, 2012 39/53

slide-99
SLIDE 99

Foundations of DKS

  • 6. Appendix: General Minimal Models

Proof.

Assume that I is a minimal model of S with domain D and there is a ground atom A with I | = A, such that no r ∈ S supports A in I. Let I′ be identical to I except that I′ | = A. Then I′ < I. Consider any r = ∀∗(ψ ← ϕ) from S. Let V be an arbitrary variable assignment in D. We show I′[V] | = (ψ ← ϕ). If I[V] | = ϕ, as ϕ is positive, also I′[V] | = ϕ; hence I′[V] | = (ψ ← ϕ). If I[V] | = ϕ, then I[V] | = ψ because I is a model of S. By part 2 of the Lemma above, there exists some implicant C of ψ such that I[V] | = C. As by hypothesis, r does not support A in I and I[V] | = ϕ and A is ground, it follows that for every variable assignment V′ in D, no implicant of ψ supports A in I[V′]. In particular, for V′ = V the implicant C of ψ does not support A in I[V]. As I[V] | = C, it follows BI[V] = AI[V] for all B ∈ C. Hence, I′[V] | = C. By part 1 of the above Lemma , I′[V] | = ψ. Hence I′[V] | = (ψ ← ϕ). In all possible cases I′ satisfies r; thus I′ is a model of S, contradicting the minimality

  • f I.

Thomas Eiter and Reinhard Pichler December 20, 2012 39/53

slide-100
SLIDE 100

Foundations of DKS

  • 6. Appendix: General Minimal Models

Semantic vs Syntactic Support

The above theorem is semantic in nature: In the above example, p(a) is supported by p(b) There is no syntactic connection between these atoms. It holds under suitable conditions.

Thomas Eiter and Reinhard Pichler December 20, 2012 40/53

slide-101
SLIDE 101

Foundations of DKS

  • 6. Appendix: General Minimal Models

Semantic vs Syntactic Support

The above theorem is semantic in nature: In the above example, p(a) is supported by p(b) There is no syntactic connection between these atoms. It holds under suitable conditions.

Definition (Unique Name Property)

An interpretation I has the unique name property, if for each term s, ground term t, and variable assignment V in dom(I) with sI[V] = tI[V] there exists a substitution σ with sσ = t.

Thomas Eiter and Reinhard Pichler December 20, 2012 40/53

slide-102
SLIDE 102

Foundations of DKS

  • 6. Appendix: General Minimal Models

Semantic vs Syntactic Support

The above theorem is semantic in nature: In the above example, p(a) is supported by p(b) There is no syntactic connection between these atoms. It holds under suitable conditions.

Definition (Unique Name Property)

An interpretation I has the unique name property, if for each term s, ground term t, and variable assignment V in dom(I) with sI[V] = tI[V] there exists a substitution σ with sσ = t. Herbrand interpretations have the unique name property. The relationship between the supporting atom and the supported ground atom specialises to the (syntactic and decidable) ground instance relationship. Sometimes, unique names are postulated (Unique Names Assumption)

Thomas Eiter and Reinhard Pichler December 20, 2012 40/53

slide-103
SLIDE 103

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Well-Founded Semantics

Basic Idea

Avoid cases like (p ← ¬p) by using a third truth value, unkown. Try to build a single partial model, in which p would be unknown.

Thomas Eiter and Reinhard Pichler December 20, 2012 41/53

slide-104
SLIDE 104

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Well-Founded Semantics

Basic Idea

Avoid cases like (p ← ¬p) by using a third truth value, unkown. Try to build a single partial model, in which p would be unknown.

Notation

For a literal L, L is its complement with A = ¬A and ¬A = A for an atom A. For a set I of ground literals, I = { L | L ∈ I }, pos(I) = I ∩ HB, neg(I) = I ∩ HB. Thus, I = pos(I) ∪ neg(I).

Definition

A set I of ground literals is consistent, if pos(I) ∩ neg(I) = ∅, else inconsistent. Sets I1, I2 of ground literals are (in)consistent if I1 ∪ I2 is (in)consistent. A ground literal L and a set I of ground literals are (in)consistent if {L} ∪ I is (in)consistent.

Thomas Eiter and Reinhard Pichler December 20, 2012 41/53

slide-105
SLIDE 105

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Definition (Partial interpretation)

A partial interpretation is a consistent set I of ground literals; it is total, iff pos(I) ∪ neg(I) = HB, i.e., for each ground atom A either A ∈ I or ¬A ∈ I. For a total I, the Herbrand interpretation induced by I is HI(I) = HI(pos(I)).

Definition (Satisfaction for partial interpretations)

Let I be a partial interpretation. Then ⊤ is satisfied in I and ⊥ is falsified in I. A ground literal L is satisfied or true in I iff L ∈ I. falsified or false in I iff L ∈ I. undefined in I iff L / ∈ I and L / ∈ I. A conjunction L1 ∧ . . . ∧ Ln of ground literals, n ≥ 0, is satisfied or true in I iff each Li for 1 ≤ i ≤ n is satisfied in I. falsified or false in I iff at least one Li for 1 ≤ i ≤ n is falsified in I. undefined in I iff each Li for 1 ≤ i ≤ n is satisfied or undefined in I and at least one of them is undefined in I.

Thomas Eiter and Reinhard Pichler December 20, 2012 42/53

slide-106
SLIDE 106

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Definition (Satisfaction, ctd)

Let I be a partial interpretation. A ground normal clause A ← ϕ is satisfied or true in I iff A is satisfied in I or ϕ is falsified in I. falsified or false in I iff A is falsified in I and ϕ is satisfied in I. weakly falsified in I iff A is falsified in I and ϕ is satisfied or undefined in I. A normal clause is satisfied or true in I iff each of its ground instances is. falsified or false in I iff at least one of its ground instances is. weakly falsified in I iff at least one of its ground instances is. A set of normal clauses is satisfied or true in I iff each of its members is. falsified or false in I iff at least one of its members is. weakly falsified in I iff at least one of its members is.

Note: “weakly falsified” intuitively means that by turning from “undefined” to “true”, the clause could be falsified. For a total interpretation I, the cases “undefined” and “weakly falsified” are impossible, and satisfaction in HI(I) amounts to the classical notion.

Thomas Eiter and Reinhard Pichler December 20, 2012 43/53

slide-107
SLIDE 107

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Definition (Total and partial model)

Let S be a set of normal clauses. A total interpretation I is a total model of S, iff S is satisfied in I. A partial interpretation I is a partial model of S, iff there exists a total model I′ of S with I ⊆ I′.

Thomas Eiter and Reinhard Pichler December 20, 2012 44/53

slide-108
SLIDE 108

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Definition (Total and partial model)

Let S be a set of normal clauses. A total interpretation I is a total model of S, iff S is satisfied in I. A partial interpretation I is a partial model of S, iff there exists a total model I′ of S with I ⊆ I′. If a ground normal clause C is weakly falsified, but not falsified in a partial interpretation I, then its consequent is falsified in I and some literal L in its antecedent is undefined in I.

Thomas Eiter and Reinhard Pichler December 20, 2012 44/53

slide-109
SLIDE 109

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Definition (Total and partial model)

Let S be a set of normal clauses. A total interpretation I is a total model of S, iff S is satisfied in I. A partial interpretation I is a partial model of S, iff there exists a total model I′ of S with I ⊆ I′. If a ground normal clause C is weakly falsified, but not falsified in a partial interpretation I, then its consequent is falsified in I and some literal L in its antecedent is undefined in I. No extension of I with additional literals can satisfy the consequent.

Thomas Eiter and Reinhard Pichler December 20, 2012 44/53

slide-110
SLIDE 110

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Definition (Total and partial model)

Let S be a set of normal clauses. A total interpretation I is a total model of S, iff S is satisfied in I. A partial interpretation I is a partial model of S, iff there exists a total model I′ of S with I ⊆ I′. If a ground normal clause C is weakly falsified, but not falsified in a partial interpretation I, then its consequent is falsified in I and some literal L in its antecedent is undefined in I. No extension of I with additional literals can satisfy the consequent. The only way to satisfy S is to extend I by the complement L of some undefined antecedent literal L (which falsifies the antecedent).

Thomas Eiter and Reinhard Pichler December 20, 2012 44/53

slide-111
SLIDE 111

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Definition (Total and partial model)

Let S be a set of normal clauses. A total interpretation I is a total model of S, iff S is satisfied in I. A partial interpretation I is a partial model of S, iff there exists a total model I′ of S with I ⊆ I′. If a ground normal clause C is weakly falsified, but not falsified in a partial interpretation I, then its consequent is falsified in I and some literal L in its antecedent is undefined in I. No extension of I with additional literals can satisfy the consequent. The only way to satisfy S is to extend I by the complement L of some undefined antecedent literal L (which falsifies the antecedent). Any extension of I that satisfies all antecedent literals L falsifies C.

Thomas Eiter and Reinhard Pichler December 20, 2012 44/53

slide-112
SLIDE 112

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Definition (Total and partial model)

Let S be a set of normal clauses. A total interpretation I is a total model of S, iff S is satisfied in I. A partial interpretation I is a partial model of S, iff there exists a total model I′ of S with I ⊆ I′. If a ground normal clause C is weakly falsified, but not falsified in a partial interpretation I, then its consequent is falsified in I and some literal L in its antecedent is undefined in I. No extension of I with additional literals can satisfy the consequent. The only way to satisfy S is to extend I by the complement L of some undefined antecedent literal L (which falsifies the antecedent). Any extension of I that satisfies all antecedent literals L falsifies C.

Lemma (Weak Falsification)

Let S be a set of normal clauses and I a partial interpretation. If no clause in S is weakly falsified in I, then I is a partial model of S.

Thomas Eiter and Reinhard Pichler December 20, 2012 44/53

slide-113
SLIDE 113

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Unfounded Sets

Principle for Drawing Negative Conclusions

Given a partial interpretation I, a set U of ground atoms is “unfounded” wrt a clause set, if each atom A in U is unjustified wrt I, taking U into account.

Example

Let S = {(p ← q), (q ← p)}. For U = {p, q}, p, q are unjustified wrt {p, q}.

Thomas Eiter and Reinhard Pichler December 20, 2012 45/53

slide-114
SLIDE 114

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Unfounded Sets

Principle for Drawing Negative Conclusions

Given a partial interpretation I, a set U of ground atoms is “unfounded” wrt a clause set, if each atom A in U is unjustified wrt I, taking U into account.

Example

Let S = {(p ← q), (q ← p)}. For U = {p, q}, p, q are unjustified wrt {p, q}.

Definition (Unfounded set of ground atoms)

Let S be a set of normal clauses, and I a partial interpretation. A set U ⊆ HB of ground atoms is an unfounded set wrt S and I, if for each A ∈ U and for each ground instance r = A ← L1 ∧ . . . ∧ Ln, n ≥ 1, of a member

  • f S, at least one of the following holds:

1 Li ∈ I for some positive or negative Li with 1 ≤ i ≤ n. (Li is falsified in I) 2 Li ∈ U for some positive Li with 1 ≤ i ≤ n. (Li is unfounded)

A respective Li is a witness of unusability for r.

Thomas Eiter and Reinhard Pichler December 20, 2012 45/53

slide-115
SLIDE 115

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Example

Let S = {(p ← q), (q ← p)}. Then U = {p, q} is an unfounded set wrt S and I = {p, q}. Both a and b are unfounded by condition 2. Let S′ = { (q ← p), (r ← s), (s ← r) } and I = {¬p, ¬q}. The set U′ = {q, r, s} is unfounded wrt S′ and I. The atom q is unfounded by condition 1, the atoms r and s by condition 2.

Thomas Eiter and Reinhard Pichler December 20, 2012 46/53

slide-116
SLIDE 116

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Example

Let S = {(p ← q), (q ← p)}. Then U = {p, q} is an unfounded set wrt S and I = {p, q}. Both a and b are unfounded by condition 2. Let S′ = { (q ← p), (r ← s), (s ← r) } and I = {¬p, ¬q}. The set U′ = {q, r, s} is unfounded wrt S′ and I. The atom q is unfounded by condition 1, the atoms r and s by condition 2.

Lemma

Let S be a set of normal clauses and I a partial interpretation. There exists a unique maximal (under set inclusion) unfounded set wrt. S and I, denoted GUSS(I), Moreover, GUSS(I) is the union of all unfounded sets wrt. S and I.

Example (cont’d)

GUSS(I) = {p, q} and GUSS′(I′) = {p, q, r, s}

Thomas Eiter and Reinhard Pichler December 20, 2012 46/53

slide-117
SLIDE 117

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Observation

If all atoms in I are founded, by switching any unfounded atom(s) to false (and further affected unfounded atoms), all rules remain satisfied. As no backtracking is needed, unfounded atoms can be safely made false.

Thomas Eiter and Reinhard Pichler December 20, 2012 47/53

slide-118
SLIDE 118

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Observation

If all atoms in I are founded, by switching any unfounded atom(s) to false (and further affected unfounded atoms), all rules remain satisfied. As no backtracking is needed, unfounded atoms can be safely made false.

Lemma

Let S be a set of normal clauses, I be a partial interpretation, and U′ be an unfounded set wrt. S and I, such that pos(I) ∩ U′ = ∅. For each U ⊆ U′, its remainder U′ \ U is unfounded w.r.t. S and I ∪ U.

Thomas Eiter and Reinhard Pichler December 20, 2012 47/53

slide-119
SLIDE 119

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Observation

If all atoms in I are founded, by switching any unfounded atom(s) to false (and further affected unfounded atoms), all rules remain satisfied. As no backtracking is needed, unfounded atoms can be safely made false.

Lemma

Let S be a set of normal clauses, I be a partial interpretation, and U′ be an unfounded set wrt. S and I, such that pos(I) ∩ U′ = ∅. For each U ⊆ U′, its remainder U′ \ U is unfounded w.r.t. S and I ∪ U. A kind of opposite property is that false atoms are unfounded.

Lemma

Let S be a set of normal clauses and I = pos(I) ∪ neg(I) be a partial

  • interpretation. If no clause in S is weakly falsified in I (i.e., I is a partial model of

S), then neg(I) is unfounded wrt. S and pos(I).

Thomas Eiter and Reinhard Pichler December 20, 2012 47/53

slide-120
SLIDE 120

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

The above properties are exploited to extend a partial interpretation.

Definition (Operators T

S, U S, W S)

Let PI = { I ⊆ HB ∪ HB | I is consistent }, and note that P(HB) ⊆ PI. Let S be a set of normal clauses. We define three operators: T

S :

PI → P(HB) I → { A ∈ HB | there is a ground instance (A ← ϕ)

  • f a member of S such that ϕ is satisfied in I }

U

S :

PI → P(HB) I → the maximal subset of HB that is unfounded wrt S and I W

S :

PI → PI I → T

S(I) ∪ U S(I)

Starting from “knowing” I, the ground atoms in T

S(I) have to be true;

those in U

S(I) are unfounded;

T

S(I) ∩ U S(I) = ∅, thus W S(I) is consistent.

Thomas Eiter and Reinhard Pichler December 20, 2012 48/53

slide-121
SLIDE 121

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

The above properties are exploited to extend a partial interpretation.

Definition (Operators T

S, U S, W S)

Let PI = { I ⊆ HB ∪ HB | I is consistent }, and note that P(HB) ⊆ PI. Let S be a set of normal clauses. We define three operators: T

S :

PI → P(HB) I → { A ∈ HB | there is a ground instance (A ← ϕ)

  • f a member of S such that ϕ is satisfied in I }

U

S :

PI → P(HB) I → the maximal subset of HB that is unfounded wrt S and I W

S :

PI → PI I → T

S(I) ∪ U S(I)

Starting from “knowing” I, the ground atoms in T

S(I) have to be true;

those in U

S(I) are unfounded;

T

S(I) ∩ U S(I) = ∅, thus W S(I) is consistent.

Lemma

T

S, U S, and W S are monotonic.

Thomas Eiter and Reinhard Pichler December 20, 2012 48/53

slide-122
SLIDE 122

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Example

Suppose HB = {p, q, r, s, t}, and let I0 = ∅ and S = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) }.

Thomas Eiter and Reinhard Pichler December 20, 2012 49/53

slide-123
SLIDE 123

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Example

Suppose HB = {p, q, r, s, t}, and let I0 = ∅ and S = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) }. T

S(I0)

= {s} U

S(I0)

= {p, t} W

S(I0)

= {s, ¬p, ¬t} = I1

Thomas Eiter and Reinhard Pichler December 20, 2012 49/53

slide-124
SLIDE 124

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Example

Suppose HB = {p, q, r, s, t}, and let I0 = ∅ and S = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) }. T

S(I0)

= {s} U

S(I0)

= {p, t} W

S(I0)

= {s, ¬p, ¬t} = I1 T

S(I1)

= {s, r} U

S(I1)

= {p, t} W

S(I1)

= {s, r, ¬p, ¬t} = I2

Thomas Eiter and Reinhard Pichler December 20, 2012 49/53

slide-125
SLIDE 125

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Example

Suppose HB = {p, q, r, s, t}, and let I0 = ∅ and S = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) }. T

S(I0)

= {s} U

S(I0)

= {p, t} W

S(I0)

= {s, ¬p, ¬t} = I1 T

S(I1)

= {s, r} U

S(I1)

= {p, t} W

S(I1)

= {s, r, ¬p, ¬t} = I2 T

S(I2)

= {s, r, q} U

S(I2)

= {p, t} W

S(I2)

= {s, r, q, ¬p, ¬t} = I3

Thomas Eiter and Reinhard Pichler December 20, 2012 49/53

slide-126
SLIDE 126

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Example

Suppose HB = {p, q, r, s, t}, and let I0 = ∅ and S = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) }. T

S(I0)

= {s} U

S(I0)

= {p, t} W

S(I0)

= {s, ¬p, ¬t} = I1 T

S(I1)

= {s, r} U

S(I1)

= {p, t} W

S(I1)

= {s, r, ¬p, ¬t} = I2 T

S(I2)

= {s, r, q} U

S(I2)

= {p, t} W

S(I2)

= {s, r, q, ¬p, ¬t} = I3 T

S(I3)

= {s, r, q} U

S(I3)

= {p, t} W

S(I3)

= I3

Thomas Eiter and Reinhard Pichler December 20, 2012 49/53

slide-127
SLIDE 127

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Theorem (Existence of least fixpoint)

Let S be a set of normal clauses. Then (1) W

S has a least fixpoint given by

lfp(W

S) = {I ∈ PI | W S(I) = I} = {I ∈ PI | W S(I) ⊆ I}.

(2) lfp(W

S) is a partial interpretation of S

(3) lfp(W

S) is a partial model of S.

Thomas Eiter and Reinhard Pichler December 20, 2012 50/53

slide-128
SLIDE 128

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Theorem (Existence of least fixpoint)

Let S be a set of normal clauses. Then (1) W

S has a least fixpoint given by

lfp(W

S) = {I ∈ PI | W S(I) = I} = {I ∈ PI | W S(I) ⊆ I}.

(2) lfp(W

S) is a partial interpretation of S

(3) lfp(W

S) is a partial model of S.

Proof.

(1): Knaster-Tarski Theorem. (2): show consistency and that no clause in S is weakly falsified by transfinite induction. (3): Weak Falsification Lemma.

Thomas Eiter and Reinhard Pichler December 20, 2012 50/53

slide-129
SLIDE 129

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Definition (Well-founded model)

The well-founded model of a set S of normal clauses is lfp(W

S).

The well-founded model may be total (it specifies a truth value for each ground atom) or partial (it leaves some atoms undefined). If S is stratifiable, then S has a total well-founded model, which coincides with the perfect model.

Thomas Eiter and Reinhard Pichler December 20, 2012 51/53

slide-130
SLIDE 130

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Definition (Well-founded model)

The well-founded model of a set S of normal clauses is lfp(W

S).

The well-founded model may be total (it specifies a truth value for each ground atom) or partial (it leaves some atoms undefined). If S is stratifiable, then S has a total well-founded model, which coincides with the perfect model.

Example

S1 = { (q ← r ∧ ¬p), (r ← s ∧ ¬t), (s ← ⊤) } has the well-founded model {s, r, q, ¬p, ¬t}. It is total. S2 = { (p ← ¬q), (q ← ¬p) } has the well-founded model ∅. It is partial and leaves the truth values of p and of q undefined. S3 = { (p ← ¬p) } has the well-founded model ∅. It is partial and leaves the truth value of p undefined. S4 = { (p ← ¬p), (p ← ⊤) } has the well-founded model {p}. It is total.

Thomas Eiter and Reinhard Pichler December 20, 2012 51/53

slide-131
SLIDE 131

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Well-Founded Semantics - Evaluation

The well-founded semantics (WFS) coincides with an intuitive understanding based on the “Justification Postulate”. A set of normal clauses always has exactly one well-founded model, but some ground atoms might be “undefined” in it (they can be defined, however). Thus, WFS coincides with the “Consistency Postulate”. The well-founded model might not be computable (in those not infrequent cases where the fixpoint is reached after more than ω steps).

Thomas Eiter and Reinhard Pichler December 20, 2012 52/53

slide-132
SLIDE 132

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Well-Founded Semantics - Evaluation

The well-founded semantics (WFS) coincides with an intuitive understanding based on the “Justification Postulate”. A set of normal clauses always has exactly one well-founded model, but some ground atoms might be “undefined” in it (they can be defined, however). Thus, WFS coincides with the “Consistency Postulate”. The well-founded model might not be computable (in those not infrequent cases where the fixpoint is reached after more than ω steps).

Example

S = { p(a) ←⊤, p(f(x)) ← p(x), q(y) ← p(y), s ← p(z) ∧ ¬q(z), r ← ¬s } is the (standard) translation of the following set of generalised rules { p(a) ←⊤, p(f(x)) ← p(x), q(y) ← p(y), r ← ∀z

  • p(z) ⇒ q(z)
  • }

into normal clauses. Then lfp(W

S) = W S ↑ ω + 2

= { p(a), . . . , p(f n(a)), . . . } ∪ { q(a), . . . , q(f n(a)), . . . } ∪ { ¬s, r }

Thomas Eiter and Reinhard Pichler December 20, 2012 52/53

slide-133
SLIDE 133

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Stable and Well-Founded Semantics Compared

If a rule set is stratifiable, then it has a unique minimal model, which is its

  • nly stable model and is also its well-founded model and total.

Thomas Eiter and Reinhard Pichler December 20, 2012 53/53

slide-134
SLIDE 134

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Stable and Well-Founded Semantics Compared

If a rule set is stratifiable, then it has a unique minimal model, which is its

  • nly stable model and is also its well-founded model and total.

If a rule set S has a total well-founded model, then this model is also the single stable model of S.

Thomas Eiter and Reinhard Pichler December 20, 2012 53/53

slide-135
SLIDE 135

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Stable and Well-Founded Semantics Compared

If a rule set is stratifiable, then it has a unique minimal model, which is its

  • nly stable model and is also its well-founded model and total.

If a rule set S has a total well-founded model, then this model is also the single stable model of S. If a rule set S has a single stable model, then this model is not necessarily the well-founded model of S.

Example

The set S = {p ← ¬q, q ← ¬p, p ← ¬p} has the single stable model {p}, but its well-founded model is ∅.

Thomas Eiter and Reinhard Pichler December 20, 2012 53/53

slide-136
SLIDE 136

Foundations of DKS

  • 7. Appendix

7.1 Appendix: Well-Founded Semantics

Stable and Well-Founded Semantics Compared

If a rule set is stratifiable, then it has a unique minimal model, which is its

  • nly stable model and is also its well-founded model and total.

If a rule set S has a total well-founded model, then this model is also the single stable model of S. If a rule set S has a single stable model, then this model is not necessarily the well-founded model of S.

Example

The set S = {p ← ¬q, q ← ¬p, p ← ¬p} has the single stable model {p}, but its well-founded model is ∅. Stable model entailment does not imply well-founded entailment:

Example

Let S = {p ← ¬q, q ← ¬p, r ← p, r ← q}. Then r is true in all stable models but it is undefined in the well-founded model. “reasoning by cases”

Thomas Eiter and Reinhard Pichler December 20, 2012 53/53