Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.

Slides:



Advertisements
Similar presentations
Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
Advertisements

Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Instructor: Hayk Melikya
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
LDK R Logics for Data and Knowledge Representation Modal Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Logics for Data and Knowledge Representation Modeling Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia, Rui Zhang.
Chapter 7 Reasoning about Knowledge by Neha Saxena Id: 13 CS 267.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
LDK R Logics for Data and Knowledge Representation Modeling First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia.
1st-order Predicate Logic (FOL)
Logics for Data and Knowledge Representation Exercises: Modeling Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese.
LDK R Logics for Data and Knowledge Representation ClassL (part 3): Reasoning with an ABox 1.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Pattern-directed inference systems
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Logics for Data and Knowledge Representation Exercises: DL.
LDK R Logics for Data and Knowledge Representation Modal Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
LDK R Logics for Data and Knowledge Representation PL of Classes.
LDK R Logics for Data and Knowledge Representation Description Logics (ALC)
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
CompSci 102 Discrete Math for Computer Science
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Copyright © Cengage Learning. All rights reserved.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
1 Introduction to Abstract Mathematics Sets Section 2.1 Basic Notions of Sets Section 2.2 Operations with sets Section 2.3 Indexed Sets Instructor: Hayk.
CS6133 Software Specification and Verification
Logics for Data and Knowledge Representation
LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1.
LDK R Logics for Data and Knowledge Representation First Order Logics (FOL) Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
Logics for Data and Knowledge Representation Exercises: ClassL Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese.
LDK R Logics for Data and Knowledge Representation ClassL (part 2): Reasoning with a TBox 1.
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Logics for Data and Knowledge Representation Exercises: DL.
LDK R Logics for Data and Knowledge Representation Description Logics: family of languages.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Artificial Intelligence Logical Agents Chapter 7.
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Propositional Calculus: Boolean Functions and Expressions
Knowledge Representation and Reasoning
The Propositional Calculus
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Back to “Serious” Topics…
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
TRUTH TABLES.
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Presentation transcript:

Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics

Outline  Introduction  Syntax  Alphabet  Formation rules  Semantics  Class-valuation  Venn diagrams  Satisfiability  Validity  Reasoning  Comparing PL and ClassL  ClassL reasoning using DPLL 2

Introduction: ClassL, the logic of classes  It is a propositional logic  Sentences expressing propositions (something true or false)  It is also called Propositional Description Logic (DL) or ALC DL  Different alphabet and semantics w.r.t. PL (notational variant)  The logical constants (“operators”) are: ⊓ (“and, intersection”), ⊔ (“or, disjunction”),  (“not”)  Meta-logical symbols: ⊥, ⊤  Extensional interpretation The domain is a set of objects. Propositions are interpreted using an extensional interpretation. 3 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Intensional vs Extensional interpretation 4 BeingLion Lion2 Intentional interpretation: D = {T, F} The WorldThe Mental ModelThe Formal Model Lion1 Monkey TF. Tree. INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Intensional vs Extensional interpretation 5 Extensional interpretation: D = {Cita, Kimba, Simba} BeingLion Lion2 The WorldThe Mental ModelThe Formal Model Lion1 Monkey Kimba. Tree Simba. Cita. INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Language (Syntax)  The syntax of ClassL is similar to PL  Alphabet of symbols Σ 0 6 Σ0Σ0 Descriptive Logical ⊓, ⊔,  Constants one proposition only A, B, C … Variables they can be substituted by any proposition or formula P, Q, ψ … NOTE: not only characters but also words (composed by several characters) like “monkey” are descriptive symbols INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Additional Symbols  Auxiliary symbols  Parentheses: ( )  Additional logical constants:  Logical constants are, for all propositions P: ⊥ (falsehood symbol, false, bottom) ⊥  P ⊓ ¬P T (truth symbol, true, top)T  ¬ ⊥  Note that differently from PL, in ClassL they are not defined symbols but they are logical facts, i.e. theorems 7 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Formation Rules (FR): well formed formulas  Well formed formulas (wff) in ClassL can be described by the following BNF (*) grammar (codifying the rules): ::= A | B |... | P | Q |... | ⊥ | ⊤ ::= | ¬ | ⊓ | ⊔  Atomic formulas are also called atomic propositions  Wff are class-propositional formulas (or just propositions)  A formula is correct if and only if it is a wff  Σ 0 + FR define a propositional language (*) BNF = Backus–Naur form (formal grammar) 8 PARSER ψ, ClassL Yes, ψ is correct! No INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Semantics means providing an interpretation  So far the elements of our propositional language are simply strings of symbols without formal meaning  The meanings which are intended to be attached to the symbols and propositions form the intended interpretation σ (sigma) of the language 9 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Extensional Semantics: Extensions  The semantics of a propositional language of classes L are extensional (semantics)  The extensional semantics of L is based on the notion of “extension” of a formula (proposition) in L  The extension of a proposition is the totality, or class, or set of all objects D (domain elements) to which the proposition applies 10 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Examples  Take the proposition lion: its extension may include (according to the modeler) not only living lions, but also all the lions of the past, and those of the future  Take the proposition Rome: its extension can be simply the singleton set whose element is the city of Rome (notice that several cities may have the same name, so we need to specify which Rome)  Take the proposition red ⊓ apple: its extension can the class containing all the red apples 11 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Extensions - Remarks  If a proposition applies to an individual object, its extension is simply the one object designated (denoted) by the proposition.  If a proposition applies to a group of objects, its extension is the class consisting of all the objects, if any, to which it applies.  In ClassL, a proposition is also called a concept 12 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Extensional Interpretation  Given a domain (or universe) of interpretation U, the extensional interpretation I of a proposition P, denoted by I(P) or P I is a subset of U This is fundamental to make the language formal. NOTE: By assuming one world, i.e. one domain, the extension of a proposition is unique. 13 Take P = ‘airplane’. I(airplane) = {Boeing , Boeing n, piper1, piperk,...} = … all airplanes occurring in the part of the world being modeled INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Class-valuation σ  In extensional semantics, the first central semantic notion is that of class-valuation (the interpretation function)  Given a Class Language L  Given a domain of interpretation U  A class valuation σ of a propositional language of classes L is a mapping (function) assigning to each formula ψ of L a set σ ( ψ ) of “objects” (truth-set) in U: σ: L  U 14 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Class-valuation σ  σ ( ⊥ ) = ∅  σ ( ⊤ ) = U (Universal Class, or Universe)  σ (P)  U, as defined by σ  σ (¬P) = {a  U | a ∉ σ (P)} = comp( σ (P)) (Complement)  σ (P ⊓ Q) = σ (P) ∩ σ (Q) (Intersection)  σ (P ⊔ Q) = σ (P) ∪ σ (Q) (Union) 15 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Example  Suppose Person and Female are atomic formulas (also called concepts)  Person ⊓ Female denotes those persons that are female  Person ⊓  Female denotes those that are not female  Person ⊔  Person is the concept describing the whole world ( ⊤ ) 16 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Venn Diagrams and Class-Values  By regarding propositions as classes, it is very convenient to use Venn diagrams  Venn diagrams are used to represent extensional semantics of propositions in analogy of how truth-tables are used to represent intentional semantics  Venn diagrams allow to compute a class valuation σ ’s value in polynomial time  In Venn diagrams we use intersecting circles to represent the extension of a proposition, in particular of each atomic proposition  The key idea is to use Venn diagrams to symbolize the extension of a proposition P by the device of shading the region corresponding to the proposition, as to indicate that P has a meaning (i.e., the extension of P is not empty). 17 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Venn Diagram of P, ⊥ Venn diagrams are built starting from a “main box” which is used to represent the Universe U. 18 P σ(P) σ( ⊥ ) ⊥ The falsehood symbol corresponds to the empty set. INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Venn Diagram of ¬P, ⊤ ¬P corresponds to the complement of P w.r.t. the universe U. 19 P The truth symbol corresponds to the universe U. σ(¬P) σ( ⊤ ) INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Venn Diagram of P ⊓ Q and P ⊔ Q The intersection of P and Q 20 P The union of P and Q Q PQ σ(P ⊓ Q) σ(P ⊔ Q) INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

How to use Venn diagrams: exercise 1 21  Prove by Venn diagrams that σ(P) = σ( ¬¬ P)  Case P = ∅ ⊥ σ(P) σ(¬P) ⊥ σ(¬¬P) INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

How to use Venn diagrams: exercise 1 22  Prove by Venn diagrams that σ(P) = σ( ¬¬ P)  Case P = U σ(P) σ(¬P) σ(¬¬P) ⊥ INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

How to use Venn diagrams: exercise 1 23  Prove by Venn diagrams that σ(P) = σ( ¬¬ P)  Case P not empty and different from U σ(P) σ(¬P) σ(¬¬P) P P P INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

How to use Venn diagrams: exercise 2 24  Prove by Venn diagrams that σ( ¬( A ⊔ B )) = σ( ¬ A ⊓ ¬ B )  Case A and B not empty (try the other cases as homework) σ(¬(A ⊔ B)) σ(¬ A ⊓ ¬ B) AB AB σ(A ⊔ B) σ(¬ A) AB AB σ(¬ B) AB INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Truth Relation (Satisfaction Relation)  Let σ be a class-valuation on language L, we define the truth- relation (or class-satisfaction relation) ⊨ and write σ ⊨ P (read: σ satisfies P) iff σ (P) ≠ ∅  Given a set of propositions Γ, we define σ ⊨ Γ iff σ ⊨ θ for all formulas θ ∈ Γ 25 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Model and Satisfiability  Let σ be a class valuation on language L. σ is a model of a proposition P (set of propositions Γ ) iff σ satisfies P ( Γ ).  P ( Γ ) is class-satisfiable if there is a class valuation σ such that σ ⊨ P ( σ ⊨ Γ ). 26 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Satisfiability, an example  Is the formula P = ¬( A ⊓ B ) satisfiable? In other words, there exist a σ that satisfies P? YES! In order to prove it we use Venn diagrams and it is enough to find one. σ is a model for P 27 AB INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Truth, satisfiability and validity  Let σ be a class valuation on language L.  P is true under σ if P is satisfiable ( σ ⊨ P)  P is valid if σ ⊨ P for all σ (notation: ⊨ P) In this case, P is called a tautology (always true) NOTE: the notions of ‘true’ and ‘false’ are relative to some truth valuation. NOTE: A proposition is true iff it is satisfiable 28 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Validity, an example  Is the formula P = A ⊔ ¬A valid? In other words, is P true for all σ? YES! In order to prove it we use Venn diagrams, but we need to discuss all cases. 29 A Case A empty: if A is empty, then ¬A is the universe U Case A not empty: if A is not empty, ¬A covers all the other elements of U ⊥ INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Reasoning on Class-Propositions  Given a class-propositions P we want to reason about the following:  Model checkingDoes σ satisfy P? ( σ ⊨ P?)  Satisfiability Is there any σ such that σ ⊨ P?  UnsatisfiabilityIs it true that there are no σ satisfying P?  Validity Is P a tautology? (true for all σ ) 30 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Class-Values and Truth-Values  Intensional Interpretation: the intentional interpretation ν of a proposition P determines a truth-value ν (P) “P holds”  Extensional Interpretation: the extensional interpretation of σ of P determines a class of objects σ (P) “x belongs to P” or “x in P” or “x is an instance of P”  What is the relation between ν (P) and σ (P)? (see next slides) 31 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

PL and ClassL: table of the symbols PLClassL Syntax ∧⊓ ∨⊔  ⊤⊤ ⊥⊥ P, Q... Semantics∆={true, false} ∆={o, …} (compare models) 32  RECALL: A proposition P is true (in a model) iff it is satisfiable  NOTE: There is no logical implication (yet) INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

PL and ClassL are notational variants  Theorem: P is satisfiable w.r.t. an intensional interpretation ν if and only if P is satifisfiable w.r.t. an extensional interpretation σ ν (P) implies σ (P): Build σ (P) from ν (P) by substituting true with U and false with empty set. σ (P) implies ν (P): Less trivial. Build first a σ ’(P) which is equivalent to σ (P) and which uses only U and empty set. 33 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

ClassL reasoning using DPLL  Given the theorem and the correspondences above, ClassL reasoning can be implemented using DPLL.  The first step consists in translating P into P’ expressed in PL  Model checkingDoes σ satisfy P? ( σ ⊨ P?) Find the corresponding model ν and check that v(P’) = true  Satisfiability Is there any σ such that σ ⊨ P? Check that DPLL(P’) succeeds and returns a ν  UnsatisfiabilityIs it true that there are no σ satisfying P? Check that DPLL(P’) fails  Validity Is P a tautology? (true for all σ ) Check that DPLL(  P’) fails 34 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Entailment in ClassL  Logical consequence (entailment) is not preserved in ClassL  Intersection σ ⊨ P and σ ⊨ Q may not imply that σ ⊨ P ⊓ Q implies σ ⊨  (P ⊓ Q) (sometimes) Satisfiability in an extensional interpretation is “richer” than in an intensional interpretation  NOTE about union σ ⊨ P and σ ⊨ Q, implies σ ⊨ P ⊔ Q (always)  NOTE about negation If σ ⊨ P implies σ ⊨  P (sometimes) 35 INTRODUCTION :: SYNTAX :: SEMANTICS :: REASONING :: PL AND CLASSL :: CLASSL REASONING USING DPLL

Entailment in ClassL  Suppose that Male and Female are satisfiable. Is Male ∧ Female satisfiable in PL? And Male ⊓ Female in ClassL?  It is clear that if we assume that they are disjoint: 1. It cannot be ν ⊨ Male and ν ⊨ Female for the same ν 2. σ ⊨ Male and σ ⊨ Female do not imply that σ ⊨ Male ⊓ Female 3. We have that σ ⊨ Male ⊔ Female 4. We have that σ ⊨ Male and σ ⊨  Male IMPORTANT NOTE: In PL, ν ⊨ A and ν ⊨ B implies that ν ⊨ A ∧ B (same ν !) In ClassL, σ ⊨ A and σ ⊨ B may not imply that σ ⊨ A ⊓ B (same σ !) Think to the case Male and  Male above. 36 INTRODUCTION :: SYNTAX :: SEMANTICS :: PL AND CLASSL :: CLASSL REASONING USING DPLL