Logics for Data and Knowledge Representation

Slides:



Advertisements
Similar presentations
Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Advertisements

Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Logic Use mathematical deduction to derive new knowledge.
Logic.
Logic Concepts Lecture Module 11.
LDK R Logics for Data and Knowledge Representation Modal Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Logics for Data and Knowledge Representation Modeling Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia, Rui Zhang.
Knoweldge Representation & Reasoning
CS 4700: Foundations of Artificial Intelligence
Relation, function 1 Mathematical logic Lesson 5 Relations, mappings, countable and uncountable sets.
LDK R Logics for Data and Knowledge Representation Context Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
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.
Pattern-directed inference systems
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Logical Agents Logic Propositional Logic Summary
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 Languages for Data Representation First version by Alessandro Agostini and Fausto Giunchiglia Second version.
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.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
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.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
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.
1 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
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.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 04 : Logic.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
Propositional Logic (a.k.a. Sentential Logic)
Logics for Data and Knowledge Representation
Chapter 7. Propositional and Predicate Logic
Lecture 1 – Formal Logic.
Knowledge Representation and Reasoning
(CSC 102) Discrete Structures Lecture 2.
The Propositional Calculus
ARTIFICIAL INTELLIGENCE
Logics for Data and Knowledge Representation
Logical Inference: Through Proof to Truth
Logics for Data and Knowledge Representation
Propositional Calculus: Boolean Algebra and Simplification
Information Technology Department
Logics for Data and Knowledge Representation
Lesson 5 Relations, mappings, countable and uncountable sets
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Propositional Equivalences
CS 416 Artificial Intelligence
Lesson 5 Relations, mappings, countable and uncountable sets
Knowledge and reasoning – second part
Back to “Serious” Topics…
Computer Security: Art and Science, 2nd Edition
Logics for Data and Knowledge Representation
CSNB234 ARTIFICIAL INTELLIGENCE
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 Propositional Logic First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Outline Introduction Syntax Semantics Implication Reasoning Services Intensions Entailment Implication Reasoning Services First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Introduction Despite all the several representation languages, all knowledge representation languages deal with sentences. Sentences denote propositions (by definition). Propositional logic deals with propositions. Propositional logic is the simplest logic that does this, First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Outline Introduction Syntax Semantics Reasoning Services Intensions Entailment Reasoning Services First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Language (Syntax) The first step in setting up a formal language (viz. a propositional language, PL) is to list the symbols, that is, the alphabet of symbols. We denote the alphabet of a propositional language by Σ0. So, PL is a symbolic language. Symbols in Σ0 are divided in ‘descriptive’ (nonlogical) and ‘non-descriptive’ (logical). First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Logical Symbols (non-descriptive) Propositional constants: A, B, ... Logical constants (“Boolean operators”): ∧, ∨, ¬ Parentheses (auxiliary symbols): (, ) Propositional variables: P, Q, ..., ψ,θ... Remark: not only characters but also words like e.g. “monkey”, “LDKR,” etc. are in 4. First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Defined Symbols Logical defined constants are, for all P: ⊥ (falsehood symbol): ⊥ =df P∧¬P ⊤(truth symbol): ⊤=df ¬⊥ Defined symbols are not necessary. They increase the usability by reducing the syntactic complexity of propositions. First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Formation Rules (FR) Atomic Formulas (atomic propositions): A, B,..., P, Q,...; ⊥, ⊤. Propositional Formulas (propositions), also called well- formed formulas, in short wff’s): All the atomic formulas; ¬P, P∧Q, P∨Q for all wff’s P, Q. Σ0 + FR define a propositional language. First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Remarks Propositions (wff’s in PL) are the “correct” formal expression to be built from Σ0. ‘inLab(Monkey)’ or also ‘inLab-Monkey’, ‘inlab-monkey’, ‘in-lab- monkey’ are correct (with meaning T in our example); ‘inLab(Monkey)∧’, ‘P ¬∧Q’ are not correct (i.e. with no meaning). ‘Monkey’ does not represent an individual of some domain; we have not such an expressiveness in PL! (We need class- PL.) Parentheses in ‘inLab(Monkey)’ are not the auxiliary symbols like in e.g. (P∧¬Q) ∨ Q (problem of ambiguity) First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Example (MB) Some significant data are: the monkey, the bananas, the box, positions A, B... Significant knowledge is: Low, High, Go, Climb_Up... All other data and knowledge are irrelevant! “There is a monkey in a laboratory with some bananas hanging out of reach from the ceiling. A box is available that will enable the monkey to reach the bananas if he climbs on it. Initially, the monkey is at A, the bananas at B, and the box at C. The monkey and box have height Low, but if the monkey climbs onto the box he will have height High, the same as the bananas. [...]” First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Example (MB, cont’) Language: ‘Monkey’, ‘Bananas’, ‘Box’, ‘Ceiling’, ‘A’, ‘B’, ‘C’; ‘inLab-Monkey’, ‘inLab-Bananas’, ‘inLab-Box’, ‘high-Bananas’, ‘low-Monkey’, ... blue wff’s: data, red wff’s: knowledge. In PL we cannot reason by using ‘Monkey’ and ‘inLab- Monkey’ to conclude something on the monkey as an individual in the world. First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Propositional Theory Definition: A set of propositions is a propositional (or sentential) theory. A propositional theory is a (propositional) knowledge base. Recall that: knowledge is a “statement” we assumed statements are propositions. First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Propositional Theories and Databases A propositional theory is not a data base! Propositions don’t show data explicitly Example: In ‘inLab(Monkey)’, ‘Monkey’ does not refer to an individual from some data domain. In PL the form P(a) must be interpreted as P-a (so the use of form P(a) is ambiguous). First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Example + Remark Example: A propositional theory, i.e., a knowledge base (KB) for the MB problem is a set like this: {inLab-Monkey, inLab-Bananas, inLab-Box, high-Bananas, low-Monkey, isAtMonkey-A, isAtBananas-B, isAtBox-C, not(ClimbMonkeyBox∧isAtBox-B) or reachMonkey-Bananas,...}. Remark: The notion of theory / KB is a syntactic notion (i.e. no meaning in symbols). First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Outline Introduction Syntax Semantics Reasoning Properties Summary Intensions Entailment Reasoning DP Procedure Properties Decidability Summary First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

without formal meanings Semantics So far the elements of our propositional language are simply strings of symbols without formal meanings The meanings which are intended to be attached to the symbols and propositions form the intended interpretation of the language (viz. its symbols, formulas, etc.). First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Semantics Cont. We must make sure to assign the formal meanings out of our intended interpretation to the language, so that formulas (propositions) express what we intended. This is done by defining a formal model M. Technically: we have to define a pair ( M,|= ) for our propositional language (see below). First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Intensional Semantics Definition: The intension of a proposition is the sum of all the properties that must be possessed by every particular to which the proposition can be applied. The intension consists of all the properties the proposition implies (Rescher, 1964). First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Example: Airplane Airplanes may differ in many ways, but anything to which one properly refers to by using the proposition ‘airplane’ will have to have certain specifiable properties, e.g. be self-propelled, man-made, having wings, etc. These specifiable properties help to define the intension of the proposition ‘airplane’. First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Intentional Interpretation The intentional interpretation II of a proposition P, denoted by II(P), is the intension of P. Example 1: II(‘airplane’) = = {self-propelled, man-made, having wings, ...} Example 2: II(‘inLab-Monkey’) = = {there is a monkey, there is a lab, the monkey is in the lab} First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Intensions vs. Truth-values The intentional interpretation of a proposition determines its truth-value. Example: Proposition ‘airplane’ is true iff airplanes are - self-propelled and - man-made and - have wings and - fly and - are not birds, ... First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Truth-values Definition: A truth valuation on a propositional language L is a mapping ν assigning to each formula P of L a truth value ν(P). ν(P), with P atomic as part of the theory/ (formal) model building ν(¬P) = True iff ν(P)=False ν(P∧Q) = True iff ν(P)=True and ν(Q)=True ν(P∨Q) = True iff ν(P)=True or ν(Q)=True ν(⊥) = False (since ⊥=df P∧¬P) ν(⊤) = True (since⊤=df ¬⊥) First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Truth-table (TT) for the logical constants ¬ , ∧, ∨ Truth Tables To compute (in polynomial time) truth valuations, the method of Truth Tables was introduced (Wittgenstein, 1921). Truth tables are well-known: Truth-table (TT) for the logical constants ¬ , ∧, ∨ First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Truth Relation (Satisfaction Relation) Let ν be a truth valuation on language L. We define the truth-relation (or satisfaction-relation) |= and write ν |= P (read: ν satisfies P) iff ν(P) = True. Given a set of propositions Γ, we define ν |= Γ iff if ν |= θ for all θ ∈ Γ. First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Model and Satisfiable Definition: Let ν be a truth valuation on language L. ν is a model of a proposition P (set of propositions Γ) iff ν satisfies P (Γ). P (Γ) is satisfiable if there is some truth valuation ν such that ν |= P (ν |= Γ). First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Truth and Validity Definition: Let ν be a truth valuation: (1) P is true under ν if ν |= P. (2) P is valid (and P is called a tautology), if ν |= P for all ν (notation: |= P). First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Outline Introduction Syntax Semantics Reasoning Services Intensions Entailment Reasoning Services First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Reasoning Services The basic reasoning tasks (or “services”) we can represent (and compute) using |= are: Model Checking Satisfiability Validity Entailment First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Reasoning Services (EVAL) Model Checking (EVAL): Is a proposition P true under a truth-valuation ν, namely: ν |= P Example: Take P = ‘inLab-monkey∨inLab-box’ P is true under any truth-valuation ν that assigns True to ‘inLab-box’. First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Reasoning Services (SAT) Satisfiability (SAT): Is P satisfiable? Does there exist ν, ν |= P Example: Being is satisfiable. Being∨¬Being is satisfiable. A∧¬A is unsatisfiable (inconsistent): for every truth- valuation ν, either ν(A) = T, so ν(¬A) = F, hence ν(P) = F; or ν(A) = F, so ν(¬A) = T, hence ν(P) = T. First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Reasoning Services (Validity) Validity: Is a proposition P true under every possible truth- valuation ν? For all ν, ν |= P Example: Take P = ‘Being∨¬Being’. P is valid, since for every truth-valuation ν, either ν(‘Being’) = T, so ν(P) = T; or ν(‘Being’) = F, so ν(¬‘Being’) = T, i.e. ν(P) = T. First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Reasoning Services (Entailment) A set Γ (eventually empty) of propositions θ entails a proposition ψ, written: Γ |= ψ (if for all ν), if ν |= θ for all θ ∈ Γ, then ν |= ψ. If Γ |= ψ, then we say that ψ is a logical consequence of Γ, and Γ logically implies ψ. |= P the same as {} |= P Remark: The entailment is a relationship between wff’s that is based on semantics First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Reasoning Services (Entailment) Exercise: {‘today’} |= ‘today’∨‘tomorrow’ {‘today’} not-|= ‘tomorrow’ Suppose P = ‘today’∨‘tomorrow’. Then: Define Γ and P such that Γ |= P. Define Γ and P such that Γ not-|= P. Remark: The entailment is a relationship between wff’s that is based on semantics First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Outline Introduction Syntax Semantics Logical implication Reasoning Intensions Entailment Logical implication Reasoning DP Procedure Properties Decidability Summary First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

[ (θ1∧θ2∧ ... ∧θn) logically implies ψ ] Implication Premise Propositional entailment in the finite, i.e. {θ1, ..., θn} |= ψ ({θ1, ..., θn} finite set of propositions) can be viewed as the logical implication (θ1∧θ2∧ ... ∧θn) → ψ [ (θ1∧θ2∧ ... ∧θn) logically implies ψ ] First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Implication and equivalence We extend our alphabet of symbols with the defined logical constants: → (implication) ↔ (double implication or equivalence) such that P→Q, P↔Q are wff’s for all wff’s P, Q. Let propositions ψ, θ, and finite set {θ1,...,θn} of propositions be given. We define: |= θ→ψ iff θ |= ψ |= (θ1∧...∧θn)→ψ iff {θ1,...,θn} |= ψ |= θ↔ψ iff θ→ψ and ψ→θ. Remark: ⊥ and ⊤ are syntactically defined symbols: ⊥ =df P∧¬P, ⊤=df ¬⊥, →,↔ are semantically defined symbols! First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Truth Table of → By defining the semantics of → in terms of |= we have the following truth-table for the logical implication P→Q: REMEMBER: Given ν, P |= Q iff ν |= P then ν |= Q. First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Three Properties of Logical Implication P1: For all ψ,θ, ψ→θ iff ¬ψ∨θ. P2: For all ψ, ¬ψ iff ψ→⊥. P3: For all ψ, ⊥ |= ψ (inconsistent theories imply any proposition) First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Examples (tautologies) Laws for ∧, ¬ and →: - (A∧¬B) → ¬(A→B) - ¬(A→B) →(A∧¬B) Pierce’s law: ((A→B) →A) →A De Morgan’s laws: 1. ¬(A∨B) →(¬A∧¬B); (¬A∧¬B) →¬(A∨B) 2. ¬(A∧B) →(¬A∨¬B); (¬A∨¬B) →¬(A∧B) First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Exercise (tautologies) Prove the following double implications (i.e., logical equivalences) by using truth tables. (α ∧ β) ↔ (β ∧ α): Commutativity of ∧ (α ∨ β) ↔ (β ∨ α): Commutativity of ∨ ((α ∧ β) ∧ γ) ↔ (α ∧ (β ∧ γ)): Associativity of ∧ ((α ∨ β) ∨ γ) ↔ (α ∨ (β ∨ γ)): Associativity of ∨ ¬(¬α) ↔ α: double-negation elimination (α →β) ↔ (¬β →¬α):contraposition First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Exercise (cont’) (α →β)↔ (¬α ∨ β): →-elimination ¬(α ∧ β) ↔ (¬α∨¬β): DeMorgan Law for ∧ ¬(α ∨ β) ↔ (¬α∧¬β): DeMorgan Law for ∨ (α ∧ (β ∨ γ)) ↔ ((α ∧ β) ∨ (α ∧ γ)): distributivity of ∧ over ∨ (α ∨ (β ∧ γ)) ↔ ((α ∨ β) ∧ (α ∨ γ)): distributivity of ∨ over ∧ First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009

Normal Forms Need definition of clause CNF, a proposition is in conjunctive normal form (CNF) if it is a (finite) conjunction of clauses. DNF, a proposition is in disjunctive normal form (DNF) if it is a (finite) disjunction of conjunctive clauses. Horn, a Horn clause is a clause (a disjunction of literals) with at most one positive literal. First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang 9/2009