foundations of data and knowledge systems
play

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


  1. 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

  2. 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

  3. 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

  4. 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 ordered sets where each set has a minimum.) They generalize natural numbers, and can be defined as well-ordered sets of 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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

  12. 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

  13. 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., of form ∀ ∗ (( A 1 ∧ · · · ∧ A n ) ← ϕ ) , where each A i 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

  14. 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., of form ∀ ∗ (( A 1 ∧ · · · ∧ A n ) ← ϕ ) , where each A i 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: S : P ( HB ) → P ( HB ) T B �→ { A ∈ HB | there is a ground instance (( A 1 ∧ . . . ∧ A n ) ← ϕ ) of a member of S with HI ( B ) | = ϕ and A = A i for some i with 1 ≤ i ≤ n } Thomas Eiter and Reinhard Pichler December 20, 2012 16/53

  15. 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., of form ∀ ∗ (( A 1 ∧ · · · ∧ A n ) ← ϕ ) , where each A i 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: S : P ( HB ) → P ( HB ) T B �→ { A ∈ HB | there is a ground instance (( A 1 ∧ . . . ∧ A n ) ← ϕ ) of a member of S with HI ( B ) | = ϕ and A = A i 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

  16. 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 ( B ) ⊆ B . = S iff T Thomas Eiter and Reinhard Pichler December 20, 2012 17/53

  17. 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 ( B ) ⊆ B . = S iff T Proof. “only if:” Assume HI ( B ) | = S . Let A ∈ T S ( B ) , i.e., A = A i for some ground instance (( A 1 ∧ . . . ∧ A n ) ← ϕ ) of a member of S with HI ( B ) | = ϕ . Thomas Eiter and Reinhard Pichler December 20, 2012 17/53

  18. 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 ( B ) ⊆ B . = S iff T Proof. “only if:” Assume HI ( B ) | = S . Let A ∈ T S ( B ) , i.e., A = A i for some ground instance (( A 1 ∧ . . . ∧ A n ) ← ϕ ) of a member of S with HI ( B ) | = ϕ . By assumption HI ( B ) | = ( A 1 ∧ . . . ∧ A n ) , hence HI ( B ) | = A , hence A ∈ B because A is a ground atom. Thomas Eiter and Reinhard Pichler December 20, 2012 17/53

  19. 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 ( B ) ⊆ B . = S iff T Proof. “only if:” Assume HI ( B ) | = S . Let A ∈ T S ( B ) , i.e., A = A i for some ground instance (( A 1 ∧ . . . ∧ A n ) ← ϕ ) of a member of S with HI ( B ) | = ϕ . By assumption HI ( B ) | = ( A 1 ∧ . . . ∧ A n ) , hence HI ( B ) | = A , hence A ∈ B because A is a ground atom. S ( B ) ⊆ B . Let r = (( A 1 ∧ . . . ∧ A n ) ← ϕ ) be a ground instance of a “if:” Assume T member of S . It suffices to show that HI ( B ) satisfies r . Thomas Eiter and Reinhard Pichler December 20, 2012 17/53

  20. 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 ( B ) ⊆ B . = S iff T Proof. “only if:” Assume HI ( B ) | = S . Let A ∈ T S ( B ) , i.e., A = A i for some ground instance (( A 1 ∧ . . . ∧ A n ) ← ϕ ) of a member of S with HI ( B ) | = ϕ . By assumption HI ( B ) | = ( A 1 ∧ . . . ∧ A n ) , hence HI ( B ) | = A , hence A ∈ B because A is a ground atom. S ( B ) ⊆ B . Let r = (( A 1 ∧ . . . ∧ A n ) ← ϕ ) be a ground instance of a “if:” Assume T 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

  21. 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 ( B ) ⊆ B . = S iff T Proof. “only if:” Assume HI ( B ) | = S . Let A ∈ T S ( B ) , i.e., A = A i for some ground instance (( A 1 ∧ . . . ∧ A n ) ← ϕ ) of a member of S with HI ( B ) | = ϕ . By assumption HI ( B ) | = ( A 1 ∧ . . . ∧ A n ) , hence HI ( B ) | = A , hence A ∈ B because A is a ground atom. S ( B ) ⊆ B . Let r = (( A 1 ∧ . . . ∧ A n ) ← ϕ ) be a ground instance of a “if:” Assume T member of S . It suffices to show that HI ( B ) satisfies r . If HI ( B ) �| = ϕ , it does. If HI ( B ) | = ϕ , then A 1 ∈ T S ( B ) , . . . , A n ∈ T S ( B ) by definition of T S . By assumption A 1 ∈ B , . . . , A n ∈ B . Thomas Eiter and Reinhard Pichler December 20, 2012 17/53

  22. 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 ( B ) ⊆ B . = S iff T Proof. “only if:” Assume HI ( B ) | = S . Let A ∈ T S ( B ) , i.e., A = A i for some ground instance (( A 1 ∧ . . . ∧ A n ) ← ϕ ) of a member of S with HI ( B ) | = ϕ . By assumption HI ( B ) | = ( A 1 ∧ . . . ∧ A n ) , hence HI ( B ) | = A , hence A ∈ B because A is a ground atom. S ( B ) ⊆ B . Let r = (( A 1 ∧ . . . ∧ A n ) ← ϕ ) be a ground instance of a “if:” Assume T member of S . It suffices to show that HI ( B ) satisfies r . If HI ( B ) �| = ϕ , it does. If HI ( B ) | = ϕ , then A 1 ∈ T S ( B ) , . . . , A n ∈ T S ( B ) by definition of T S . By assumption A 1 ∈ B , . . . , A n ∈ B . As all A i are ground atoms, HI ( B ) | = A 1 , . . . , HI ( B ) | = A n . Thus HI ( B ) satisfies r . Thomas Eiter and Reinhard Pichler December 20, 2012 17/53

  23. 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

  24. 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 Mod HB ( S ) � = ∅ (as HI ( HB ) | = S ) Now, = � { B ⊆ HB | T S ( B ) ⊆ B } lfp ( T S ) by the Knaster-Tarski Theorem = � { B ⊆ HB | HI ( B ) | = S } by the previous Theorem = � Mod HB ( S ) by definition of Mod HB = 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

  25. 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

  26. 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

  27. 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

  28. Foundations of DKS 5. Declarative Semantics of Rules 5.4 Rules with Negation Not all Minimal Models convey the CWA Example S 1 = { ( 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 S 1 . Thomas Eiter and Reinhard Pichler December 20, 2012 22/53

  29. Foundations of DKS 5. Declarative Semantics of Rules 5.4 Rules with Negation Not all Minimal Models convey the CWA Example S 1 = { ( 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 S 1 . S 2 = { ( 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

  30. Foundations of DKS 5. Declarative Semantics of Rules 5.4 Rules with Negation Not all Minimal Models convey the CWA Example S 1 = { ( 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 S 1 . S 2 = { ( 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. S 3 = { ( p ← ¬ p ) } Minimal Herbrand model: HI ( { p } ) . p can not be arguably justified from S 3 , which is intuitively not consistent. Thomas Eiter and Reinhard Pichler December 20, 2012 22/53

  31. Foundations of DKS 5. Declarative Semantics of Rules 5.4 Rules with Negation Not all Minimal Models convey the CWA Example S 1 = { ( 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 S 1 . S 2 = { ( 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. S 3 = { ( p ← ¬ p ) } Minimal Herbrand model: HI ( { p } ) . p can not be arguably justified from S 3 , which is intuitively not consistent. S 4 = { ( p ← ¬ p ) , ( p ← ⊤ ) } Minimal Herbrand model: HI ( { p } ) . Here, p is arguably justified and S 4 should be consistent. Note: different from classical logic, a subset of a consistent rule set ( S 3 ⊆ S 4 ) may be inconsistent! Thomas Eiter and Reinhard Pichler December 20, 2012 22/53

  32. 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 S 1 above, only in HI ( { s , r , q } ) all atoms have justifications. The only rule of S 3 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. S 3 must have a model, the only Herbrand candidate is HI ( { p } ) . Thomas Eiter and Reinhard Pichler December 20, 2012 23/53

  33. 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 of formulas Th ( S ) (satisfying certain properties). We can view Th ( S ) as an operator considered above. S 3 and S 4 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

  34. 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 of formulas Th ( S ) (satisfying certain properties). We can view Th ( S ) as an operator considered above. S 3 and S 4 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 Th can ( S ) ). Thomas Eiter and Reinhard Pichler December 20, 2012 24/53

  35. 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 of formulas Th ( S ) (satisfying certain properties). We can view Th ( S ) as an operator considered above. S 3 and S 4 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 Th can ( S ) ). Example S 5 = { ( 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 ∈ Th can ( S 5 ) . Thomas Eiter and Reinhard Pichler December 20, 2012 24/53

  36. 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 of formulas Th ( S ) (satisfying certain properties). We can view Th ( S ) as an operator considered above. S 3 and S 4 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 Th can ( S ) ). Example S 5 = { ( 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 ∈ Th can ( S 5 ) . S ′ 5 = S 5 ∪ { ( 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 ∈ Th can ( S ′ model. Therefore, q / 5 ) . Thus, S 5 ⊆ S ′ 5 , but Th can ( S 5 ) �⊆ Th can ( S ′ 5 ) . Thomas Eiter and Reinhard Pichler December 20, 2012 24/53

  37. 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

  38. 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 S 0 , . . . , S k of S such that For each relation symbol p there is a stratum S i , such that all clauses of S containing p in their consequent are members of S i . In this case one says that the relation symbol p is defined in stratum S i . For each stratum S j and positive literal A in the antecedents of members of S j , the relation symbol of A is defined in a stratum S i with i ≤ j . For each stratum S j and negative literal ¬ A in the antecedents of members of S j , the relation symbol of A is defined in a stratum S i 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

  39. 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

  40. 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 S 0 contains the first clause and the stratum S 1 the last one, while the middle clause may belong to either of the strata. Thomas Eiter and Reinhard Pichler December 20, 2012 27/53

  41. 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 S 0 contains the first clause and the stratum S 1 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

  42. 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 S 0 contains the first clause and the stratum S 1 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

  43. Foundations of DKS 5. Declarative Semantics of Rules 5.5 Stratifiable Rule Sets Stratifable Rule Sets – Canoncial Model Principal Idea The stratum S 0 always consists of definite clauses (positive definite rules). Hence the truth values of all atoms of stratum S 0 can be determined without negation being involved. Thomas Eiter and Reinhard Pichler December 20, 2012 28/53

  44. Foundations of DKS 5. Declarative Semantics of Rules 5.5 Stratifiable Rule Sets Stratifable Rule Sets – Canoncial Model Principal Idea The stratum S 0 always consists of definite clauses (positive definite rules). Hence the truth values of all atoms of stratum S 0 can be determined without negation being involved. After that the clauses of stratum S 1 refer only to such negative literals whose truth values have already been determined in S 0 . After that the clauses of stratum S 2 refer only to such negative literals whose truth values have already been determined in S 0 and S 1 . And so on. That is, work stratum by stratum . Thomas Eiter and Reinhard Pichler December 20, 2012 28/53

  45. Foundations of DKS 5. Declarative Semantics of Rules 5.5 Stratifiable Rule Sets Stratifable Rule Sets – Canoncial Model Principal Idea The stratum S 0 always consists of definite clauses (positive definite rules). Hence the truth values of all atoms of stratum S 0 can be determined without negation being involved. After that the clauses of stratum S 1 refer only to such negative literals whose truth values have already been determined in S 0 . After that the clauses of stratum S 2 refer only to such negative literals whose truth values have already been determined in S 0 and S 1 . 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

  46. 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

  47. 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 ← L 1 ∧ . . . ∧ L n where n ≥ 0 and A is a ground atom and the L i for 1 ≤ i ≤ n are ground literals. Let B ⊆ HB . The Gelfond-Lifschitz transform GL B ( S ) of S with respect to B is obtained 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

  48. 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 GL B ( 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

  49. 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 GL B ( 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 S 1 = { ( 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

  50. 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 GL B ( 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 S 1 = { ( q ← r ∧ ¬ p ) , ( r ← s ∧ ¬ t ) , ( s ← ⊤ ) } has one stable model: HI ( { s , r , q } ) . S 2 = { ( p ← ¬ q ) , ( q ← ¬ p ) } has two stable models: HI ( { p } ) and HI ( { q } ) . Thomas Eiter and Reinhard Pichler December 20, 2012 31/53

  51. 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 GL B ( 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 S 1 = { ( q ← r ∧ ¬ p ) , ( r ← s ∧ ¬ t ) , ( s ← ⊤ ) } has one stable model: HI ( { s , r , q } ) . S 2 = { ( p ← ¬ q ) , ( q ← ¬ p ) } has two stable models: HI ( { p } ) and HI ( { q } ) . S 3 = { ( p ← ¬ p ) } has no stable model. Thomas Eiter and Reinhard Pichler December 20, 2012 31/53

  52. 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 GL B ( 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 S 1 = { ( q ← r ∧ ¬ p ) , ( r ← s ∧ ¬ t ) , ( s ← ⊤ ) } has one stable model: HI ( { s , r , q } ) . S 2 = { ( p ← ¬ q ) , ( q ← ¬ p ) } has two stable models: HI ( { p } ) and HI ( { q } ) . S 3 = { ( p ← ¬ p ) } has no stable model. S 4 = { ( p ← ¬ p ) , ( p ← ⊤ ) } has one stable model: HI ( { p } ) . Thomas Eiter and Reinhard Pichler December 20, 2012 31/53

  53. 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

  54. 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 ) | = GL B ( S ) . As easily seen from the definition of GL B ( · ) , this implies HI ( B ) | = S . Thomas Eiter and Reinhard Pichler December 20, 2012 32/53

  55. 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 ) | = GL B ( S ) . As easily seen from the definition of GL B ( · ) , 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 = GL B ( S ) . Indeed, minimality of stable models implies B ′ = B . implies HI ( B ′ ) | Thomas Eiter and Reinhard Pichler December 20, 2012 32/53

  56. 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 ) | = GL B ( S ) . As easily seen from the definition of GL B ( · ) , 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 = GL B ( S ) . Indeed, minimality of stable models implies B ′ = B . implies HI ( B ′ ) | Let C ∈ GL B ( S ) . Then C results from some clause D ∈ S , by removing the negative ∈ B , and, since B ′ ⊆ B , also literals from its antecedent. If ¬ A is such a literal, then A / ∈ B ′ . Therefore, C ∈ GL B ′ ( S ) . As HI ( B ′ ) | = S , it follows HI ( B ′ ) | A / = C . Thomas Eiter and Reinhard Pichler December 20, 2012 32/53

  57. 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 ) | = GL B ( S ) . As easily seen from the definition of GL B ( · ) , 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 = GL B ( S ) . Indeed, minimality of stable models implies B ′ = B . implies HI ( B ′ ) | Let C ∈ GL B ( S ) . Then C results from some clause D ∈ S , by removing the negative ∈ B , and, since B ′ ⊆ B , also literals from its antecedent. If ¬ A is such a literal, then A / ∈ B ′ . Therefore, C ∈ GL B ′ ( S ) . As HI ( B ′ ) | = S , it follows HI ( B ′ ) | A / = 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

  58. 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

  59. 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

  60. 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

  61. 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

  62. 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

  63. 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 ( t 1 , . . . , t n ) an atom, n ≥ 0 . an atom B supports A in I [ V ] iff = B and B = p ( s 1 , . . . , s n ) and s I [ V ] = t I [ V ] I [ V ] | for 1 ≤ i ≤ n . i i 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

  64. 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 of ψ is defined as follows: primps ( ψ ) = { { ψ } } if ψ is an atom or ⊤ or ⊥ . primps ( ¬ ψ 1 ) = primps ( ψ 1 ) . primps ( ψ 1 ∧ ψ 2 ) = { C 1 ∪ C 2 | C 1 ∈ primps ( ψ 1 ) , C 2 ∈ 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

  65. Foundations of DKS 6. Appendix: General Minimal Models Supportedness by Generalized Rules, Revisited Reconsider the definition: Let I be an interpretation and A = p ( t 1 , . . . , t n ) 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

  66. Foundations of DKS 6. Appendix: General Minimal Models Supportedness by Generalized Rules, Revisited Reconsider the definition: Let I be an interpretation and A = p ( t 1 , . . . , t n ) 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

  67. Foundations of DKS 6. Appendix: General Minimal Models Supportedness by Generalized Rules, Revisited Reconsider the definition: Let I be an interpretation and A = p ( t 1 , . . . , t n ) 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

  68. Foundations of DKS 6. Appendix: General Minimal Models Supportedness by Generalized Rules, Revisited Reconsider the definition: Let I be an interpretation and A = p ( t 1 , . . . , t n ) 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

  69. Foundations of DKS 6. Appendix: General Minimal Models Supportedness by Generalized Rules, Revisited Reconsider the definition: Let I be an interpretation and A = p ( t 1 , . . . , t n ) 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

  70. Foundations of DKS 6. Appendix: General Minimal Models Supportedness by Generalized Rules, Revisited Reconsider the definition: Let I be an interpretation and A = p ( t 1 , . . . , t n ) 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 t I [ V ] = t I [ V ′ ] for 1 ≤ i ≤ n and some implicant C of ψ that i i 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

  71. 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

  72. 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 a I = b I = 1 and p I = { ( 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

  73. 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 a I = b I = 1 and p I = { ( 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

  74. 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

  75. 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

  76. 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

  77. 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 ] | = ( ψ ← ϕ ) . = ϕ , as ϕ is positive, also I ′ [ V ] �| = ϕ ; hence I ′ [ V ] | If I [ V ] �| = ( ψ ← ϕ ) . Thomas Eiter and Reinhard Pichler December 20, 2012 39/53

  78. 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 ] | = ( ψ ← ϕ ) . = ϕ , as ϕ is positive, also I ′ [ V ] �| = ϕ ; hence I ′ [ V ] | If 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

  79. 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 ] | = ( ψ ← ϕ ) . = ϕ , as ϕ is positive, also I ′ [ V ] �| = ϕ ; hence I ′ [ V ] | If 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

  80. 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 ] | = ( ψ ← ϕ ) . = ϕ , as ϕ is positive, also I ′ [ V ] �| = ϕ ; hence I ′ [ V ] | If 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 = C , it follows B I [ V ] � = A I [ V ] for all B ∈ C . Hence, I ′ [ V ] | I [ V ] | = C . Thomas Eiter and Reinhard Pichler December 20, 2012 39/53

  81. 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 ] | = ( ψ ← ϕ ) . = ϕ , as ϕ is positive, also I ′ [ V ] �| = ϕ ; hence I ′ [ V ] | If 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 = C , it follows B I [ V ] � = A I [ V ] for all B ∈ C . Hence, I ′ [ V ] | 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

  82. 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 ] | = ( ψ ← ϕ ) . = ϕ , as ϕ is positive, also I ′ [ V ] �| = ϕ ; hence I ′ [ V ] | If 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 = C , it follows B I [ V ] � = A I [ V ] for all B ∈ C . Hence, I ′ [ V ] | 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 of I . Thomas Eiter and Reinhard Pichler December 20, 2012 39/53

  83. 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

Recommend


More recommend