Your SlideShare is downloading. ×
  • Like
(06) Semantic Web Technologies - Logics
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

(06) Semantic Web Technologies - Logics

  • 1,080 views
Published

 

Published in Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,080
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
63
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Semantic Web Technologies Lecture Dr. Harald Sack Hasso-Plattner-Institut für IT Systems Engineering University of Potsdam Winter Semester 2012/13 Lecture Blog: http://semweb2013.blogspot.com/ This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)Dienstag, 20. November 12
  • 2. Semantic Web Technologies Content2 1. Introduction 2. Semantic Web - Basic Architecture Languages of the Semantic Web - Part 1 3. Knowledge Representation and Logics Languages of the Semantic Web - Part 2 4. Applications in the ,Web of Data‘ Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 3. last lectureWeb Technologien Semantic Wiederholung3 e n g i l o to O n Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 4. Semantic Web Technologies Content4 3. Knowledge Representation and Logics The Languages of the Semantic Web - Part 2 • Excursion: Ontologies in Philosophy and Computer Science • Recapitulation: Popositional Logic and First Order Logic • Description Logics • RDF(S) Semantics • OWL and OWL-Semantics • OWL 2 and Rules Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 5. 5 Formalization of Ontological Models with Logic Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 6. 3. Knowledge Representation & Logic 3.2 Recapitulation: Popositional Logic and First Order Logic6 3.2 Recapitulation: Popositional Logic and First Order Logic 3.2.1 Foundations of Logic 3.2.2 Modeltheoretic Semantics 3.2.3 Canonical Form 3.2.4 Resolution 3.2.5 Properties of PL and FOL Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 7. A friend of Einstein‘s, 3. Wissensrepräsentationen Kurt Gödel found a holeund Prädikatenlogik 3.2 Wiederholung Aussagenlogik in7 the center of Mathematics... Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam Turmbau zu Babel, Pieter Brueghel, 1563Dienstag, 20. November 12
  • 8. 3. Knowledge Representation & Logic 3.2 Recapitulation: Popositional Logic and First Order Logic8 Foundations of Logic ■ we only give a brief recapitulation □ cf. in your bachelor computer science course, etc. ■ a fundamental understanding of the principles of logic including propositional logic and first order logic is mandatory. Please recapitulate for yourself, if necessary... □ see also U. Schöning: Logik für Informatiker, Spektrum Akademischer Verlag, 5. Aufl. 2000. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam Turmbau zu Babel, Pieter Brueghel, 1563Dienstag, 20. November 12
  • 9. Foundations of Logic ■ Origin of the term:9 λογος =[greek] word, study, ... ■ Definition (for our lecture): Logic is the study of how to make Raimundus Lullus formal correct deductions and (1232-1316) inferences. ■ Logic according to Ramon Lull is ■ Why „formal logic“? „the art and the science to --> automation distinguish between truth ■ Construction of a calculator machine or lie with the help of for logic. reason, to accept truth and to reject lie.“ Arbor naturalis et logicalis, aus Raimundus Lullus „Ars Magna“, ca. 1275 AD zu Babel, Pieter Brueghel, 1563 Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam TurmbauDienstag, 20. November 12
  • 10. Foundations of Logic10 "... omnes h umanas ratio calculum aliqv cinationes ad em characterist Algebra comb icum qvalis in inatoriave ar habetur, revoc te et numeri andi, qvo no s arte inventio h n tantum cer umana promov ta controversiae m eri posset, sed e ultae tolli, cer t distingvi, et tum ab incert ipsi gradus o aestimari, dum probabilitatum disputantium al posset: calculem ter alteri dicere us." Gottfried Wilhelm Leibniz (1646-1716) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam J. Spener, Juli 1687 Leibniz in a letter to Ph.Dienstag, 20. November 12
  • 11. Foundations of Logic11 „ alle men schlichen irgendeine Schlussfolg mit Zeic erungen m zurückgefüh hen arbe üssten au rt werden itende R f Kombinator , wie es echnungsa ik und mi sie in der rt nur mit t den Zah Algebra un einer unzw len gibt, w d Erfindungs eifelhaften odurch nich gabe geförd Kunst die t viele Strei ert werde menschliche tigkeiten b n könnte, vom Unsi eendet we sondern au cheren unt rden könnt ch Wahrschein erschieden en, das Si lichkeiten a und selbst chere der eine d bgeschätzt die Grade er im Dis werden kö der könnte: La put Streiten nnten, da sst uns do den zum ja ch nachrec anderen sa hnen!“ gen Gottfried Wilhelm Leibniz (1646-1716) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam Ph. J. Spener, Juli 1687 Leibnitz in einem Brief anDienstag, 20. November 12
  • 12. Foundations of Logic ■ Syntax: symbols without meaning12 defines rules, how to construct well-formed and valid sequences of symbols (strings) ■ Semantic: meaning of syntax defines rules how the meaning of complex sequences of symbols can be derived from atomic sequences of symbols. Syntax If (i<0) then display (“negatives Guthaben!“) print the message “negative account!“, if assignment of the account balance is negative meaning Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 13. Variants of Semantics ■ E.g. programming languages13 computation of the factorial FUNCTION f(n:natural):natural; BEGIN intentional semantics IF n=0 THEN f:=1 ELSE f:=n*f(n-1); END; • „the meaning intended by the user“ • restricts the set of all possible models (meanings) to the meaning intended by the (human) user Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 14. Variants of Semantics ■ E.g. programming languages14 computation of the factorial FUNCTION f(n:natural):natural; intentional semantics BEGIN IF n=0 THEN f:=1 ELSE f:=n*f(n-1); f : n → n! END; formal semantics Syntax € • aims to express the meaning of symbol sequences (programs) in a formal language, in a way that assertions over the symbol sequences (programs) can be proven by the application of deduction rules. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 15. Variants of Semantics ■ E.g. programming languages15 computation of the factorial FUNCTION f(n:natural):natural; intentional semantics BEGIN IF n=0 THEN f:=1 ELSE f:=n*f(n-1); f : n → n! END; formal semantics behaviour of the program at execution Syntax € procedural semantics • the meaning of a language expression (program) is the procedure that takes place internally, whenever the expression does occur. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 16. Variants of Semantics16 ■ Model-theoretic semantics performs the semantic interpretation of artificial and natural languages by „identifying meaning with an exact and formally defined interpretation with a model“ ■ = formal Interpretation with a model Alfred Tarski (1901-1983) ■ e.g. model-theoretic semantics of propositional logic ■ assignment of truth values „true“ and „false“ to atomic assertions and ■ description of logical connectives with truth tables Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 17. Model-theoretic Semantics17 ■ Example: the language of arithmetics ■ Syntax: ■ x+2 ≥ y is a formula ■ x2+y≥ is not a formula Alfred Tarski (1901-1983) ■ Semantics: ■ x+2 ≥ y is true under the interpretation x = 7, y = 1 ■ x+2 ≥ y is not true under the interpretation x = 1, y = 7 ■ Inference/Entailment: ■ Gaussian Elimination is an algorithm for arithmetics. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 18. How Logic works...18 ■ Any logic L:=(S,⊨) consists of a set of assertions S and an entailment relation ⊨ ■ Let Φ ⊆ S and φ ∈ S : Φ⊨φ ■ „ φ is a logical consequence of Φ“ or „from the assertions of Φ follows the assertion φ“ Syntax ■ If for 2 assertions φ,ψ ∈ S both {φ} ⊨ ψ and {ψ} ⊨ φ, then both assertions φ and ψ are logically equivalent φ≡ψ Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 19. Propositional Logic (PL)19 ■ Already in classical Greek antiquity Stoic philosophers laid the foundations of logic ■ Chrysippus of Soli developed the first complete logic calculus based on logical connectives in the 3rd century BC and called it ,grammatical logic‘ Syntax Chrysippus of Soli (279-206 BC) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 20. Propositional Logic (PL)20 ■ George Boole developed the first algebraic calculus of logic in his 1847 published „The Mathematical Analysis of Logic“ ■ Boole formalized classical logic and propositional logic and developed a decision algorithm for true formulas via disjunctive canonical form George Boole (1815-1864) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 21. Propositional Logic (PL)21 ■ Gottlob Frege formulates the first calculus for propositional logic with deduction rules whithin the scope of his 1879 published „Begriffsschrift“ Gottlob Frege (1848-1925) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 22. Propositional Logic (PL)22 ■ Bertrand Russel together with Alfred North Whitehead formulates a calculus for propositional logic in their „Principia Mathematica“ in 1910 Bertrand Arthur William Russell, 3. Earl Russell (1872-1970) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 23. Propositional Logic (PL) logical connective Name intentional meaning23 ⌐ Negation „not“ ∧ Conjunction „and“ ⋁ Disjunction „or“ → Implication „if – then“ ↔ Equivalence „if, and only if, then“ ■ Logical connectives: Op={ ¬,∧,∨,→, ,(,) }, a set of symbols Σ with Σ∩Op=∅ and {true, false} ■ Production rules for propositional formulae (propositions): ■ all atomic formulas are propositions (all elements of Σ) ■ if φ is a proposition, then also ¬φ ■ if φ and ψ are propositions, then also φ∧ψ, φ∨ψ, φ→ψ, φ ψ ■ Priority: ¬ prior to ∧,∨ prior to →, Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 24. Propositional Logic (PL)24 • How to model facts? Simple Assertions Modeling The moon is made of green cheese g It rains r The street is getting wet. n Composed Assertions Modeling if it rains, then the street wil get wet. r →n If it rains and the street does not get wet, then the moon is made of green cheese. (r ∧ ⌐n) → g Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 25. First Order Logic (FOL) Aristotle (384-322 BC) ■ Basic approaches of a generalization of25 propositional logic can already be found at Aristotle and his Syllogisms. minor term middle term major term major premise All humans are mortal minor premise All Greeks are humans conclusion All Greeks are mortal subject predicate Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 26. First Order Logic (FOL)26 ■ Gottlob Frege develops and formalizes a first order logic calculus in his 1879 published „Begriffsschrift - eine der arithmetischen nachgebildete Formelsprache des reinen Denkens“ Gottlob Frege (1848-1925) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 27. First Order Logic (FOL)27 ■ Charles Sanders Peirce develops together with his student O.H. Mitchell (independent from Gottlob Frege) a complete syntax for quantifier logic in today‘s form of notation Charles Sanders Peirce (1839-1914) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 28. First Order Logic (FOL)28 Quantifier Name Intentional Meaning ∃ Existential Quantifier „it exists“ ∀ Universal Quantifier „for all“ □ Operators as in propositional logic □ Variables, e.g., X,Y,Z,… □ Constants, e.g., a, b, c, … □ Functions, e.g., f, g, h, … (incl. arity) □ Relations / Predicates,e.g., p, q, r, … (incl. arity) (∀X)(∃Y) ((p(X)∨ ¬q(f(X),Y))→ r(X)) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 29. First Order Logic (FOL)29 FOL: Syntax ■ „correct“ formulation of Terms from Variables, Constants and Functions: □ f(X), g(a,f(Y)), s(a), .(H,T), x_location(Pixel) ■ „correct“ formulation of Atoms from Relations with Terms as arguments □ p(f(X)), q (s(a),g(a,f(Y))), add(a,s(a),s(a)), greater_than(x_location(Pixel),128) ■ „correct“ formulation of Formulas from Atoms, Operators and Quantifiers: □ (∀Pixel) (greater_than(x_location(Pixel),128) → red(Pixel) ) ■ If in doubt, use brackets! ■ All Variables shoul be quantified! Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 30. First Order Logic (FOL)30 • How to model facts? ■ „All kids love icecream.“ ∀X: Child(X) → lovesIcecreme(X) ■ „the father of a person is a male parent.“ ∀X ∀Y: isFather(X,Y) (Male(X) ∧ isParent(X,Y)) ■ „There are (one or more) interesting lectures.“ ∃X: Lecture(X) ∧ Interesting(X) ■ „The relation ,isNNeighbor‘ is symmetric.“ ∀X ∀Y: isNeighbor(X,Y) → isNeighbor(Y,X) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 31. First Order Logic (FOL)31 ■ Example: Relationships (∀X) ( parent(X) ( human(X) ∧ (∃Y) parent_of(X,Y) )) (∀X) ( human(X) → (∃Y) parent_of(Y,X) ) (∀X) (orphan(X) (human(X) ∧¬(∃Y) (parent_of(Y,X)∧ alive(Y)))) (∀X)(∀Y)(∀Z) (uncle_of(X,Z) (brother_of(X,Y) ∧ parent_of(Y,Z)) ) Intentional Semantics should be clear... Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 32. First Order Logic (FOL)32 ■ Example: Pinguins ( (∀X)( penguin(X) → blackandwhite(X) ) ∧ (∃X)( oldTVshow(X) ∧ blackandwhite(X) ) ) → (∃X)( penguin(X) ∧ oldTVshow(X) ) Intentional Semantics? Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 33. 3. Knowledge Representation & Logic 3.2 Recapitulation: Popositional Logic and First Order Logic33 3.2 Recapitulation: Popositional Logic and First Order Logic 3.2.1 Foundations of Logic 3.2.2 Modeltheoretic Semantics 3.2.3 Canonical Form 3.2.4 Resolution 3.2.5 Properties of PL and FOL Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 34. PL - Model-theoretic Semantics3034 ■ Interpretation I: Mapping of all atomic propositions to {t,f}. ■ If F is a formula and I an Interpretation, then I(F) is a truth value computed from F and I via truth tables. I(p) I(q) I(⌐p) I(p⋁q) I(p∧q) I(p→q) I(p↔q) f f t f t t t f t t t f t f t f f t f f f t t f t t t t Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 35. PL - Model-theoretic Semantics3035 ■ We write I ⊨ F, if I(F)=w, and call Interpretation I a Model of formula F. ■ Rules of Semantics: ■ I is model of ¬φ, iff I is not a model of φ ■ I is model of (φ∧ψ), iff I is a model of φ AND of ψ ■ ... ■ Basic concepts: □ tautology □ satisfiable □ refutable □ unsatisfiable (contradiction) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 36. FOL - Model-theoretic Semantics3036 ■ Structure: □ Definition of a domain D. □ Constant symbols are mapped to elements of D. □ Function symbols are mapped to funtions in D. □ Relation symbols are mapped to relations over D. ■ Then: □ Assertions will become elements of D. □ Relation symbols with arguments will become true or false. □ Logical connectives and quantifiers are treated likewise. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 37. FOL - Model-theoretic Semantics3037 ( (∀X)( penguin(X) → blackandwhite(X) ) ∧ (∃X)( oldTVshow(X) ∧ blackandwhite(X) ) ) → (∃X)( penguin(X) ∧ oldTVshow(X) ) ■ Interpretation I: □ Domain: a set M, containing elements a,b. □ … no constant of function symbols … □ We show: the formula is refutable (i.e. it is not a tautology): □ If I(penguin)(a), I(blackandwhite)(a), I(oldTVshow)(b), I(blackandwhite)(b) is true , I(oldTVshow)(a) and I(penguin)(b) is wrong, □ then formula with Interpretation I is wrong, d.h. I ⊭ F . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 38. Logical Entailment ■ a theory T is a set of formulas.3038 ■ an interpretation I is a model of T, iff I ⊨ G for all formulas G in T. ■ a formula F is a logical consequence from T, iff all models of T are also models of F. ■ then we write T ⊨ F. ■ two formulas F,G are called logically equivalent, iff {F} ⊨ G and {G} ⊨ F. ■ then we write F ≡ G Theory ≣ Knowledge Base Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 39. Logical Entailment ■ a theory T is a set of formulas.3039 ■ an interpretation I is a model of T, iff I ⊨ G for all formulas G in T. ■ a formula F is a logical consequence of T, iff all models of T are also models of F. ■ then we write T ⊨ F. ■ two formulas F,G are called logically equivalent, iff {F} ⊨ G and {G} ⊨ F. ■ then we write F ≡ G Theory ≣ Knowledge Base Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 40. Logical Equivalences3040 F∧G≡G∧F ¬(∀X) F ≡ (∃X) ¬F F∨G≡G∨F ¬(∃X) F ≡ (∀X) ¬F F → G ≡ ¬F ∨ G (∀X)(∀Y) F ≡ (∀Y)(∀X) F Augustus De Morgan (∃X)(∃Y) F ≡ (∃Y)(∃X) F (1806-1871) F ↔ G ≡ (F → G) ∧ (G → F) ¬(F ∧ G) ≡ ¬F ∨ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬(F ∨ G) ≡ ¬F ∧ ¬G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G DeMorgans‘ Laws ¬¬F ≡ F F∧t≡F F∧f≡f F ∧ ¬F = f F ∨ ¬F = t F∨t≡t F∨f≡F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 41. Commutativity and Quantifiers3041 ■ Quantifiers (of the same sort) are commutative (∀X)(∀Y) F ≡ (∀Y)(∀X) F (∃X)(∃Y) F ≡ (∃Y)(∃X) F ■ But (∃X)(∀Y) F ≢ (∀Y)(∃X) F ■ Example: ■ (∃x)(∀y): loves(x,y) „There exists somebody, who loves everybody.“ ■ (∀y)(∃x): loves(x,y) „Everybody is loved by somebody.“ Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 42. 3. Knowledge Representation & Logic 3.2 Recapitulation: Popositional Logic and First Order Logic42 3.2 Recapitulation: Popositional Logic and First Order Logic 3.2.1 Foundations of Logic 3.2.2 Modeltheoretic Semantics 3.2.3 Canonical Form 3.2.4 Resolution 3.2.5 Properties of PL and FOL Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 43. Canonical Form (Normal Form) ■ For every formula there exist infinitely many logically3043 equivalent formulas. F∧G≡G∧F F∨G≡G∨F F → G ≡ ¬F ∨ G F ↔ G ≡ (F → G) ∧ (G → F) ¬(F ∧ G) ≡ ¬F ∨ ¬G ¬(F ∨ G) ≡ ¬F ∧ ¬G ¬¬F ≡ F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) ¬(∀X) F ≡ (∃X) ¬F ¬(∃X) F ≡ (∀X) ¬F (∀X)(∀Y) F ≡ (∀Y)(∀X) F (∃X)(∃Y) F ≡ (∃Y)(∃X) F (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 44. Canonical Form (Normal Form)3044 F∧G≡G∧F F∨G≡G∨F ¬(∀X) F ≡ (∃X) ¬F F → G ≡ ¬F ∨ G ¬(∃X) F ≡ (∀X) ¬F F ↔ G ≡ (F → G) ∧ (G → F) (∀X)(∀Y) F ≡ (∀Y)(∀X) F ¬(F ∧ G) ≡ ¬F ∨ ¬G (∃X)(∃Y) F ≡ (∃Y)(∃X) F ¬(F ∨ G) ≡ ¬F ∧ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬¬F ≡ F (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) ■ For all of these Equivalence Classes one designates a most simple and unique representative. ■ The representatives are called Canonical Forms or Normal Forms. ■ Simple example: □ we write ¬F instead of ¬¬¬¬¬F Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 45. Canonical Form (Normal Forms)30 ■ Goal: Transformation of formulas into Clausal form.45 ■ (a∧(b∨¬c)∧(a∨d)) {a,{b,¬c},{a,d}} (CNF) (Clause) ■ Required Steps: 1. Negation Normal Form □ move all negations inwards 2. Prenex Normal Form □ move all quantifiers in front 3. Skolem Normal Form □ remove existential quantifiers 4. Conjunctive Normal Morm (CNF) = Clausal Form □ Representation as Conjunction of Disjunctions Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 46. Negation Normal Form3046 ■ All negations are moved inwards via the following logical equivalences: F G ≡ (F → G)∧(G → F) ¬(F ∧ G) ≡ ¬F ∨ ¬G F → G ≡ ¬F ∨ G ¬(F ∨ G) ≡ ¬F ∧ ¬G ¬(∀X) F ≡ (∃X) ¬F ¬¬F ≡ F ¬(∃X) F ≡ (∀X) ¬F ■ Result: □ Implications and Equivalences are removed □ multiple Negations are removed □ all Negations are placed directly in fron of Atoms Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 47. Negation Normal Form3047 ■ Example ( (∀X)( penguin(X) → blackandwhite(X) ) ∧ (∃X)( oldTVshow(X) ∧ blackandwhite(X) ) ) → (∃X)( penguin(X) ∧ oldTVshow(X) ) is transformed into ¬( (∀X)( ¬penguin(X) ∨ blackandwhite(X) ) ∧ (∃X)( oldTVshow(X) ∧ blackandwhite(X) ) ) ∨ (∃X)( penguin(X) ∧ oldTVshow(X) ) is transformed into ( (∃X)( penguin(X) ∧ ¬blackandwhite(X) ) ∨ (∀X)(¬oldTVshow(X) ∨ ¬blackandwhite(X) ) ) ∨ (∃X)( penguin(X) ∧ oldTVshow(X) ) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 48. Prenex Normal Form3048 ■ Clean up formulas (Quantifiers are bound to different variables). ( (∃X)( penguin(X) ∧ ¬blackandwhite(X) ) ∨ (∀X)( ¬oldTVshow(X) ∨ ¬blackandwhite(X) ) ) ∨ (∃X)( penguin(X) ∧ oldTVshow(X) ) is transformed into ( (∃X)( penguin(X) ∧ ¬blackandwhite(X) ) ∨ (∀Y)( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ (∃Z)( penguin(Z) ∧ oldTVshow(Z) ) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 49. Prenex Normal Form3049 ■ Then put all Quantifiers from Negation Normal Form in front ( (∃X)( penguin(X) ∧ ¬blackandwhite(X) ) ∨ (∀Y)( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ (∃Z)( penguin(Z) ∧ oldTVshow(Z) ) is transformed into (∃X)(∀Y)(∃Z)( ( penguin(X) ∧ ¬blackandwhite(X) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ ( penguin(Z) ∧ oldTVshow(Z) ) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 50. Skolem Normal Form3050 ■ remove existential quantifiers (∃X) (∀Y) (∃Z) ( ( penguin(X) ∧ ¬blackandwhite(X) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ ( penguin(Z) ∧ oldTVshow(Z) ) is transformed into (∀Y)( ( penguin(a) ∧ ¬blackandwhite(a) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ ( penguin( f(Y) ) ∧ oldTVshow( f(Y) ) ) ■ where a and f are new symbols (so called Skolem Constant or Skolem Function). Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 51. Skolem Normal Form3051 ■ How To: 1. Remove Existential Quantifiers from left to right. 2. If there is no Universal Quantifier left of the existential quantifier to be removed, then the according variable is substituted by a new Constant Symbol. 3. If there are n Universal Quantifiers left of the existential quantifier to be removed, then the according variable is substituted with a new Function Symbol with arity n, whose arguments are exactely the Variables of the n Universal Quantifiers sind. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 52. Skolem Normal Form3052 ■ remove existential quantifiers (∃X) (∀Y) (∃Z) ( ( penguin(X) ∧ ¬blackandwhite(X) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ ( penguin(Z) ∧ oldTVshow(Z) ) is transformed into (∀Y)( ( penguin(a) ∧ ¬blackandwhite(a) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ ( penguin( f(Y) ) ∧ oldTVshow( f(Y) ) ) ■ where a and f are new symbols (so called Skolem Constant or Skolem Function). Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 53. Conjunctive Normal Form (Clausal Form)3053 ■ There are only Universal Quantifiers, therefore we can also remove them: ( penguin(a) ∧ ¬blackandwhite(a) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ ( penguin(f(Y)) ∧ oldTVshow(f(Y)) ■ With the help of logical equivalences the formula is now transfomed into a Conjunction of Disjunctions. F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 54. Conjunctive Normal Form (Clausal Form)3054 (penguin(a) ∧ ¬blackandwhite(a) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ∨ ( penguin(f(Y)) ∧ oldTVshow(f(Y)) is transformed into ( penguin(a)∨¬oldTVshow(Y)∨¬blackandwhite(Y)∨penguin(f(Y)) ) ∧ ( penguin(a)∨¬oldTVshow(Y)∨¬blackandwhite(Y)∨oldTVshow(f(Y)) ) ∧ ( ¬blackandwhite(a)∨¬oldTVshow(Y)∨¬blackandwhite(Y)∨penguin(f(Y)) ) ∧ ( ¬blackandwhite(a)∨¬oldTVshow(Y)∨¬blackandwhite(Y)∨oldTVshow(f(Y)) ) is transformed into { {penguin(a),¬oldTVshow(Y),¬blackandwhite(Y),penguin(f(Y))}, {penguin(a),¬oldTVshow(Y),¬blackandwhite(Y),oldTVshow(f(Y))}, { ¬blackandwhite(a),¬oldTVshow(Y),¬blackandwhite(Y),penguin(f(Y))}, {¬blackandwhite(a),¬oldTVshow(Y),¬blackandwhite(Y),oldTVshow(f(Y))} } Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 55. Properties of Canonical Forms3055 ■ Let F be a formula, ■ G is the Prenex Normal Form of F, ■ H is the Skolem Normal Form of G, ■ K is the Clausal Form of H. ■ Then F ≡ G and H ≡ K but usually F ≢ K. ■ Nevertheless it holds, that □ F is not satisfiable (a contradiction), if K is a contradiction. (Foundation of the Resolution) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 56. Skolemnization is not a Logical Equivalence3056 ■ The formula (∃x) p(x) ∨ ¬(∃x) p(x) is a tautology. ■ Negation Normal Form: (∃x) p(x) ∨ (∀x) ¬p(x) ■ Prenex Normal Form: (∃x) (∀y) (p(x) ∨ ¬p(y)) ■ Skolem Normal Form: (∀y) (p(a) ∨ ¬p(y)) ■ logical equivalent to: p(a) ∨ ¬(∃y) p(y) ■ The resulting formula is not a tautology ■ e.g. with Interpretation I □ I(p(a)) = f □ I(p(b)) = t Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 57. 3.2 Recapitulation: Popositional Logic and First Order Logic 3.2.1 Foundations of Logic 3.2.2 Modeltheoretic Semantics57 3.2.3 Canonical Form 3.2.4 Resolution 3.2.5 Properties of PL and FOL3. Knowledge Representation & Logic3.2 Recapitulation: Web, Dr. Harald Sack, Hasso-Plattner-Institut, UniversitätLogic Vorlesung Semantic Popositional Logic and First Order PotsdamDienstag, 20. November 12
  • 58. A Calculator Machine for Logic30 ■ Recall:58 ■ A formula F is a logical consequence of a theory/knowledge base T, if all models of T are also models of F. ■ Problem: ■ How do I work with all possible Interpretations in practice? Gottfried Wilhelm Leibniz (1646-1716) ■ Therefore, logical consequence is implemented via syntactical methods (= Calculus). ■ Correctness: every syntactic entailment is also a semantic entailment, if T ⊢ F then T ⊨ F ■ Completeness: all semantic entailments are also syntactic entailments, if T ⊨ F then T ⊢ F Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 59. A Calculator Machine for Logic ■ We distinguish:3059 ■ Decision Procedures (Decidability) ■ Input: {φ1,..., φn} and assertion φ ■ Output: ■ „Yes“, if assertions φ exists with {φ1,..., φn} ⊨ φ ■ „No“, otherwise. ■ Enumeration Procedures (Semi Decidability) ■ Input: {φ1,..., φn} ■ Output: ■ assertions φ with {φ1,..., φn} ⊨ φ Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 60. Resolution3060 Theory {F1,…,Fn} with F0 as logical Consequence equivalent assertions {F1,…,Fn} ⊨ F0 F1 ∧… ∧ Fn → F0 is a tautology ¬(F1 ∧… ∧ Fn → F0) is a contradiction John Alan Robinson (*1930) G1 ∧ …∧ Gk is a contradiction □ The resolution procedure allows the entailment of a contradiction from G1 ∧ …∧ Gk. John Alan Robinson, "A Machine-Oriented Logic Based on the Resolution Principle", Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam Communications of the ACM, 5:23–41, 1965.Dienstag, 20. November 12
  • 61. Resolution (Propositional Logic) ■ If (p1∨…∨pk∨p∨¬q1∨…∨¬ql)∧(r1∨…∨rm∨¬p∨¬s1∨…∨¬sn)3061 is true, then: ■ One of both p, ¬p has to be wrong. ■ Therefore: One of the other Literals must be true, i.e. p1∨…∨pk∨¬q1∨…∨¬ql∨r1∨…∨rm∨¬s1∨…∨¬sn must be true. ■ Therfore: If p1∨…∨pk∨¬q1∨…∨¬ql∨r1∨…∨rm∨¬s1∨…∨¬sn is a contradiction, then (p1∨…∨pk∨p∨¬q1∨…∨¬ql)∧(r1∨…∨rm∨¬p∨¬s1∨…∨¬sn) is also a contradiction. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 62. Resolution (Propositional Logic)3062 (p1∨…∨pk∨p∨¬q1∨…∨¬ql) ∧ (r1∨…∨rm∨¬p∨¬s1∨…∨¬sn) K1 K2 Resolution step {K1,K 2} ⊨ K3 p1∨…∨pk∨¬q1∨…∨¬ql∨r1∨…∨rm∨¬s1∨…∨¬sn K3 ■ two clauses are transformed into a new one ■ End of the resolution procedure: ■ If clauses are resolved that cosist only of an atom and the negated atom, then a new „empty clause“ ⊥ can be resolved. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 63. Resolution (Propositional Logic)3063 • How to deduce a contradiction from a set M of clauses: 1. Select two clauses from M and create a new clause K via a resolution step. 2. If K =⊥ , then a contradiction has been found. 3. If K ≠⊥ , K is added to the set M, continue with step 1. • The Resolution Calculus is correct and complete Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 64. Resolution (First Order Logic)3064 ■ For resolution in First Order Logic additional variable bindings have to be considered with the help of Substitutions ■ e.g. (p(X,f(Y)) ∨ q( f(X),Y)) (¬p(a,Z) ∨ r(Z) ) Resolution with [X/a, Z/f(Y)] results in Substitutions (q( f(a),Y) ∨ r(f(Y))). Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 65. Resolution (First Order Logic)3065 ■ Unification of Terms ■ Given: Literals L1, L2 ■ Wanted: Variable substitution σ applied on L1 and L2 results in: L1σ = L2σ ■ If there is such a variable substiution σ, then σ is called Unifier of L1 und L2. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 66. Resolution (First Order Logic)3066 Unification Algorithm ■ Given: Literals L1, L2 ■ Wanted: Unifier σ of L1 and L2. 1. L1 and L2 are Constants: only unifiable, if L1 = L2 . 2. L1 is Variable and L2 arbitrary Term: unifiable, if for Variable L1 the Term L2 can be substituted and Variable L1 does not occur in L2. 3. L1 and L2 are Predicates or Functions PL1(s1,...,sm) and PL2(t1,...,tn): unifiable, if 1. PL1 = PL2 or 2. n=m and all terms si are unifiable with a term ti Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 67. Resolution (First Order Logic)3067 Examples for Unification L1 L2 σ p(X,X) p(a,a) [X/a] p(X,X) p(a,b) n.a. p(X,Y) p(a,b) [X/a, Y/b] p(X,Y) p(a,a) [X/a, Y/a] p(f(X),b) p(f(c),Z) [X/c, Z/b] p(X,f(X)) p(Y,Z) [X/Y, Z/f(Y)] p(X,f(X)) p(Y,Y) n.a. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 68. Resolution (First Order Logic)3068 ■ For resolution in First Order Logic additional variable bindings have to be considered with the help of Substitutions ■ e.g. (p(X,f(Y)) ∨ q( f(X),Y)) (¬p(a,Z) ∨ r(Z) ) Resolution with [X/a, Z/f(Y)] results in (q( f(a),Y) ∨ r(f(Y))). Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 69. Resolution (First Order Logic)3069 Example for FOL Resolution: ■ Terminological Knowledge (TBox): (∀X) ( human(X) → (∃Y) parent_of(Y,X) ) (∀X) ( orphan(X) (human(X) ∧ ¬(∃Y) (parent_of(Y,X) ∧ alive(Y))) ■ Assertional Knowledge (ABox): orphan(harrypotter) parent_of(jamespotter,harrypotter) ■ Can we deduce: ¬alive(jamespotter)? Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 70. Resolution (First Order Logic)3070 Example for FOL Resolution: We have to proof that: ((∀X) ( human(X) → (∃Y) parent_of(Y,X) ) ∧ (∀X) (orphan(X) (human(X) ∧ ¬(∃Y) (parent_of(Y,X) ∧ alive(Y))) ∧ orphan(harrypotter) ∧ parent_of(jamespotter,harrypotter)) → ¬alive(jamespotter)) is a tautology. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 71. Resolution (First Order Logic)3071 Example for FOL Resolution: We have to proof that: ¬((∀X) ( human(X) → (∃Y) parent_of(Y,X) ) ∧ (∀X) (orphan(X) (human(X) ∧ ¬(∃Y) (parent_of(Y,X) ∧ alive(Y))) ∧ orphan(harrypotter) ∧ parent_of(jamespotter,harrypotter)) → ¬alive(jamespotter)) ist a contradiction. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 72. Resolution (First Order Logic)3072 Example for FOL Resolution: ■ Prenex Normal Form: (∀X)(∃Y)(∀X1)(∀Y1)(∀X2)(∃Y2) (( ¬human(X) ∨ parent_of(Y,X) ) ∧ (¬orphan(X1)∨ (human(X1) ∧ (¬parent_of(Y1,X1) ∨ ¬alive(Y1))) ∧ (orphan(X2) ∨ (¬human(X2) ∨ (parent_of(Y2,X2) ∧ alive(Y2))) ∧ orphan(harrypotter) ∧ parent_of(jamespotter,harrypotter)) ∧ alive(jamespotter)) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 73. Resolution (First Order Logic)3073 Example for FOL Resolution: ■ Clausal Form (CNF): ( ¬human(X) ∨ parent_of(f(X),X) ) ∧ (¬orphan(X1) ∨ human(X1)) ∧ (¬orphan(X1) ∨ ¬parent_of(Y1,X1) ∨ ¬alive(Y1)) ∧ (orphan(X2) ∨ ¬human(X2) ∨ parent_of(g(X,X1,Y1,X2),X2)) ∧ (orphan(X2) ∨ ¬human(X2) ∨ alive(g(X,X1,Y1,X2))) ∧ orphan(harrypotter) ∧ parent_of(jamespotter,harrypotter)) ∧ alive(jamespotter) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 74. Resolution (First Order Logic)3074 Example for FOL Resolution: ■ Clausal Form (CNF): { {¬human(X), parent_of(f(X),X)}, {¬orphan(X1), human(X1)}, {¬orphan(X1),¬parent_of(Y1,X1),¬alive(Y1)}, {orphan(X2),¬human(X2),parent_of(g(X,X1,Y1,X2),X2)}, {orphan(X2) ,¬human(X2),alive(g(X,X1,Y1,X2))}, {orphan(harrypotter)}, {parent_of(jamespotter,harrypotter)}, {alive(jamespotter)} } Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 75. Resolution (First Order Logic)3075 Example for FOL Resolution: Knowledge Base: 1. {¬human(X), parent_of(f(X),X)} 2. {(¬orphan(X1), human(X1)} 3. {¬orphan(X1), ¬parent_of(Y1,X1),¬alive(Y1))} 4. {(orphan(X2), ¬human(X2), parent_of(g(X,X1,Y1,X2),X2)} 5. {orphan(X2), ¬human(X2), alive(g(X,X1,Y1,X2))} 6. {orphan(harrypotter)} 7. {parent_of(jamespotter,harrypotter)} 8. {alive(jamespotter)} Entailed Clauses: 9. {¬orphan(harrypotter), ¬alive(jamespotter)} (3,7) [X1/harrypotter, Y1/jamespotter] Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 76. Resolution (First Order Logic)3076 Example for FOL Resolution: Knowledge Base: 1. {¬human(X), parent_of(f(X),X)} 2. {(¬orphan(X1), human(X1)} 3. {¬orphan(X1), ¬parent_of(Y1,X1),¬alive(Y1))} 4. {(orphan(X2), ¬human(X2), parent_of(g(X,X1,Y1,X2),X2)} 5. {orphan(X2), ¬human(X2), alive(g(X,X1,Y1,X2))} 6. {orphan(harrypotter)} 7. {parent_of(jamespotter,harrypotter)} 8. {alive(jamespotter)} Entailed Clauses: 9. {¬orphan(harrypotter), ¬alive(jamespotter)} (3,7) 10. {¬orphan(harrypotter)} (8,9) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 77. Resolution (First Order Logic)3077 Example for FOL Resolution: Knowledge Base: 1. {¬human(X), parent_of(f(X),X)} 2. {(¬orphan(X1), human(X1)} 3. {¬orphan(X1), ¬parent_of(Y1,X1),¬alive(Y1))} 4. {(orphan(X2), ¬human(X2), parent_of(g(X,X1,Y1,X2),X2)} 5. {orphan(X2), ¬human(X2), alive(g(X,X1,Y1,X2))} 6. {orphan(harrypotter)} 7. {parent_of(jamespotter,harrypotter)} 8. {alive(jamespotter)} Entailed Clauses: 9. {¬orphan(harrypotter), ¬alive(jamespotter)} (3,7) 10. {¬orphan(harrypotter)} (8,9) 11. ⊥ (6,10) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 78. Resolution (First Order Logic)3078 Properties of FOL Resolution ■ Completeness of Refutation □ If resolution is applied to a contradictory set of clauses, then there exists a finite number of resolution steps to detect the contradiction. □ The number n of necessary steps can be very large (not efficient) □ Resolution in FOL is undecidable □ If the set of clauses is not contradictory, then the termination of the resolution is not guaranteed. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 79. 3. Knowledge Representation & Logic3.2 Recapitulation: Popositional Logic and First Order Logic79 3.2 Recapitulation: Popositional Logic and First Order Logic 3.2.1 Foundations of Logic 3.2.2 Modeltheoretic Semantics 3.2.3 Canonical Form 3.2.4 Resolution 3.2.5 Properties of PL and FOL Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 80. Properties of FOL3080 ■ Monotony □ If the knowledge base growths, all previously possible entailments hold. □ S and T are Theories, with S⊆T □ Then it holds that {F|S ⊨ F} ⊆ {F|T ⊨ F} Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 81. Properties of FOL3081 ■ Compactness □ For each entailment made from a theory, a finite subset of the theory is sufficient. ■ Semi-decidability □ FOL is not decidable □ But, FOL is semi-decidable, i.e. a logical consequence T ⊨ F always can be proven in finite time (but not necessarely also T⊭F) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 82. Properties of PL3082 ■ All properties of FOL hold, including ■ Decidability □ All true entailments can be found, and all false entailments can be refuted, as long as you spent enough time. ■ there always exist terminating automatic theorem proofer ■ Useful property: ■ {φ1,...,φn} ⊨ φ holds, iff (φ1 ∧...∧ φn) → φ is a tautology ■ The decision, if an assertion is an tautology, can be made via truth table ■ in principle this equals the evaluation of all possible interpretations Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 83. 3. Knowledge Representation & Logic 3.2 Recapitulation: Popositional Logic and First Order Logic83 3.2 Recapitulation: Popositional Logic and First Order Logic 3.2.1 Foundations of Logic 3.2.2 Modeltheoretic Semantics 3.2.3 Canonical Form 3.2.4 Resolution 3.2.5 Properties of PL and FOL Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 84. Semantic Web Technologies Content84 3. Knowledge Representation and Logics The Languages of the Semantic Web - Part 2 • Excursion: Ontologies in Philosophy and Computer Science • Recapitulation: Popositional Logic and First Order Logic • Description Logics • RDFS Semantics • OWL and OWL-Semantics • OWL 2 and Rules Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 85. next lecture i o n85 p t i s r c c i s g e o D L Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 86. 3. Knowledge Representation & Logic 3.2 Recapitulation: Popositional Logic and First Order Logic86 Bibliography • P. Hitzler, S. Roschke, Y. Sure: Semantic Web Grundlagen, Springer, 2007. • U. Schöning: Logik für Informatiker, Spektrum Akademischer Verlag, 5. Aufl. 2000. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 87. 3. Knowledge Representation & Logic 3.2 Recapitulation: Popositional Logic and First Order Logic87 Complementary Bibliography • A. Doxiadis, C.H. Papadimitriou: Logicomix: eine epische Suche nach der Wahrheit, Atrium Verlag, 2010. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12
  • 88. 3. Knowledge Representation & Logic 3.2 Ontologies in Philosophy and Computer Science88 □Blog http://semweb2013.blogspot.com/ □Webseite http://www.hpi.uni-potsdam.de/studium/ lehrangebot/itse/veranstaltung/ semantic_web_technologien-3.html □bibsonomy - Bookmarks http://www.bibsonomy.org/user/lysander07/ swt1213_06 Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 20. November 12