Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Similar documents
Logic: Propositional Logic (Part I)

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Description Logics. Deduction in Propositional Logic. franconi. Enrico Franconi

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Intelligent Agents. Pınar Yolum Utrecht University

Logical Agents. Chapter 7

Propositional Logic: Logical Agents (Part I)

Logical Agents. Outline

Propositional Logic Language

Introduction to Artificial Intelligence. Logical Agents

CS 380: ARTIFICIAL INTELLIGENCE PREDICATE LOGICS. Santiago Ontañón

Logical Agent & Propositional Logic

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Language of Propositional Logic

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

Logical Agent & Propositional Logic

Logical agents. Chapter 7. Chapter 7 1

Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World

Advanced Topics in LP and FP

Inference in Propositional Logic

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14

Logical Agents. Chapter 7

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

Logical agents. Chapter 7. Chapter 7 1

Kecerdasan Buatan M. Ali Fauzi

Logic: First Order Logic

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

Tecniche di Verifica. Introduction to Propositional Logic

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

TDT4136 Logic and Reasoning Systems

CS 771 Artificial Intelligence. Propositional Logic

Class Assignment Strategies

22c:145 Artificial Intelligence

Propositional Logic: Logical Agents (Part I)

Artificial Intelligence Chapter 7: Logical Agents

CS 380: ARTIFICIAL INTELLIGENCE

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

Lecture 7: Logical Agents and Propositional Logic

Logic: Propositional Logic Truth Tables

Theory of Computer Science

Artificial Intelligence

Natural Deduction for Propositional Logic

CS:4420 Artificial Intelligence

Propositional logic (revision) & semantic entailment. p. 1/34

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz )

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Logic. proof and truth syntacs and semantics. Peter Antal

Propositional Logic: Review

Revised by Hankui Zhuo, March 21, Logical agents. Chapter 7. Chapter 7 1

7. Logical Agents. COMP9414/ 9814/ 3411: Artificial Intelligence. Outline. Knowledge base. Models and Planning. Russell & Norvig, Chapter 7.

CSC Discrete Math I, Spring Propositional Logic

Inference Methods In Propositional Logic

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

KB Agents and Propositional Logic

Artificial Intelligence Knowledge Representation I

Logical Agents (I) Instructor: Tsung-Che Chiang

A brief introduction to Logic. (slides from

Truth-Functional Logic

Lecture 7: Logic and Planning

CS 188: Artificial Intelligence Spring 2007

CS560 Knowledge Discovery and Management. CS560 - Lecture 3 1

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

Inference Methods In Propositional Logic

Part 1: Propositional Logic

Logical Agents: Propositional Logic. Chapter 7

Introduction to Intelligent Systems

Deliberative Agents Knowledge Representation I. Deliberative Agents

Introduction to Intelligent Systems

Lecture 6: Knowledge 1

Intelligent Systems. Propositional Logic. Dieter Fensel and Dumitru Roman. Copyright 2008 STI INNSBRUCK

UNIT-I: Propositional Logic

2.2: Logical Equivalence: The Laws of Logic

Knowledge based Agents

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Propositional Logic: Models and Proofs

Proof Methods for Propositional Logic

Propositional natural deduction

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Outline. Formale Methoden der Informatik First-Order Logic for Forgetters. Why PL1? Why PL1? Cont d. Motivation

cis32-ai lecture # 18 mon-3-apr-2006

Compound Propositions

Artificial Intelligence. Propositional logic

Propositional Logic: Methods of Proof. Chapter 7, Part II

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World

Learning Goals of CS245 Logic and Computation

Propositional Logic and Semantics

CS 7180: Behavioral Modeling and Decision- making in AI

Logical Agents. Outline

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Propositional Logic: Methods of Proof (Part II)

EECS 1028 M: Discrete Mathematics for Engineers

Transcription:

(1/27) Description Logics Foundations of Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester

(2/27) Knowledge bases Inference engine Knowledge base domain-independent algorithms domain-specific content Knowledge base = set of sentences in a formal language = logical theory Declarative approach to building an agent (or other system): TELL it what it needs to know Then it can ASK itself what to do answers should follow from the KB Agents can be viewed at the knowledge level i.e., what they know, regardless of how implemented Or at the implementation level i.e., data structures in KB and algorithms that manipulate them

(3/27) Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language Semantics define the meaning of sentences; i.e., define truth of a sentence in a world E.g., the language of arithmetic x + 2 y is a sentence; x2 + y > is not a sentence x + 2 y is true iff the number x + 2 is no less than the number y x + 2 y is true in a world where x = 7, y = 1 x + 2 y is false in a world where x = 0, y = 6 x + 2 x + 1 is true in every world

(4/27) The one and only Logic? Logics of higher order Modal logics epistemic temporal and spatial... Description logic Non-monotonic logic Intuitionistic logic... But: There are standard approaches propositional and predicate logic

(5/27) Types of logic Logics are characterized by what they commit to as primitives Ontological commitment: what exists facts? objects? time? beliefs? Epistemological commitment: what states of knowledge? Language Ontological Commitment Epistemological Commitment (What exists in the world) (What an agent believes about facts) Propositional logic facts true/false/unknown First-order logic facts, objects, relations true/false/unknown Temporal logic facts, objects, relations, times true/false/unknown Probability theory facts degree of belief 0 1 Fuzzy logic degree of truth degree of belief 0 1 Classical logics are based on the notion of TRUTH

(6/27) Entailment Logical Implication KB = α Knowledge base KB entails sentence α if and only if α is true in all worlds where KB is true E.g., the KB containing Manchester United won and Manchester City won entails Either Manchester United won or Manchester City won

(7/27) Models Logicians typically think in terms of models, which are formally structured worlds with respect to which truth can be evaluated We say m is a model of a sentence α if α is true in m M(α) is the set of all models of α Then KB = α if and only if M(KB) M(α) E.g. KB = United won and City won α = City won or α = Manchester won or α = either City or Manchester won

(8/27) Inference Deduction Reasoning KB i α KB i α = sentence α can be derived from KB by procedure i Soundness: i is sound if whenever KB i α, it is also true that KB = α Completeness: i is complete if whenever KB = α, it is also true that KB i α We will define a logic (first-order logic) which is expressive enough to say almost anything of interest, and for which there exists a sound and complete inference procedure.

(9/27) Propositional Logics: Basic Ideas Statements: The elementary building blocks of propositional logic are atomic statements that cannot be decomposed any further: propositions. E.g., The block is red The proof of the pudding is in the eating It is raining and logical connectives and, or, not, by which we can build propositional formulas.

(10/27) Propositional Logics: Reasoning We are interested in the questions: when is a statement logically implied by a set of statements, in symbols: Θ = φ can we define deduction in such a way that deduction and entailment coincide?

(11/27) Syntax of Propositional Logic Countable alphabet Σ of atomic propositions: a, b, c,.... φ, ψ a atomic formula false true Propositional formulas: φ negation φ ψ conjunction φ ψ disjunction φ ψ implication φ ψ equivalence Atom: atomic formula Clause: disjunction of literals Literal: (negated) atomic formula

(12/27) Semantics: Intuition Atomic statements can be true T or false F. The truth value of formulas is determined by the truth values of the atoms (truth value assignment or interpretation). Example: (a b) c If a and b are wrong and c is true, then the formula is not true. Then logical entailment could be defined as follows: φ is implied by Θ, if φ is true in all states of the world, in which Θ is true.

(13/27) Semantics: Formally A truth value assignment (or interpretation) of the atoms in Σ is a function I: I: Σ {T, F}. Instead of I(a) we also write a I. A formula φ is satisfied by an interpretation I (I = φ) or is true under I: I = I = φ ψ iff if I = φ, then I = ψ I = I = φ ψ iff I = φ, if and only if I = ψ I = a iff a I = T I = φ iff I = φ I = φ ψ iff I = φ and I = ψ I = φ ψ iff I = φ or I = ψ

(14/27) Example I: a T b F c F d T. ((a b) (c d)) ( (a b) (c d)).

(15/27) Exercise Find an interpretation and a formula such that the formula is true in that interpretation (or: the interpretation satisfies the formula). Find an interpretation and a formula such that the formula is not true in that interpretation (or: the interpretation does not satisfy the formula). Find a formula which can t be true in any interpretation (or: no interpretation can satisfy the formula).

(16/27) Satisfiability and Validity An interpretation I is a model of φ: I = φ A formula φ is satisfiable, if there is some I that satisfies φ, unsatisfiable, if φ is not satisfiable, falsifiable, if there is some I that does not satisfy φ, valid (i.e., a tautology), if every I is a model of φ. Two formulas are logically equivalent (φ ψ), if for all I: I = φ iff I = ψ

(17/27) Exercise Satisfiable, tautology? (((a b) a) b) (( φ ψ) (ψ φ)) (a b c) ( a b d) ( a b d) Equivalent? (φ (ψ χ)) ((φ ψ) (ψ χ)) (φ ψ) φ ψ

(18/27) Consequences Proposition: φ is a tautology iff φ is unsatisfiable φ is unsatisfiable iff φ is a tautology. Proposition: φ ψ iff φ ψ is a tautology. Theorem: If φ and ψ are equivalent, and χ results from replacing φ in χ by ψ, then χ and χ are equivalent.

(19/27) Entailment Extension of the entailment relationship to sets of formulas Θ: I = Θ iff I = φ for all φ Θ Remember: we want the formula φ to be implied by a set Θ, if φ is true in all models of Θ (symbolically, Θ = φ): Θ = φ iff I = φ for all models I of Θ

(20/27) Propositional inference: Enumeration method Let α = A B and KB = (A C) (B C) Is it the case that KB = α? Check all possible models α must be true wherever KB is true A B C A C B C KB α F alse F alse F alse F alse F alse T rue F alse T rue F alse F alse T rue T rue T rue F alse F alse T rue F alse T rue T rue T rue F alse T rue T rue T rue

(20/27) Propositional inference: Enumeration method Let α = A B and KB = (A C) (B C) Is it the case that KB = α? Check all possible models α must be true wherever KB is true A B C A C B C KB α F alse F alse F alse F alse F alse F alse T rue T rue F alse T rue F alse F alse F alse T rue T rue T rue T rue F alse F alse T rue T rue F alse T rue T rue T rue T rue F alse T rue T rue T rue T rue T rue

(20/27) Propositional inference: Enumeration method Let α = A B and KB = (A C) (B C) Is it the case that KB = α? Check all possible models α must be true wherever KB is true A B C A C B C KB α F alse F alse F alse F alse T rue F alse F alse T rue T rue F alse F alse T rue F alse F alse T rue F alse T rue T rue T rue T rue T rue F alse F alse T rue T rue T rue F alse T rue T rue F alse T rue T rue F alse T rue T rue T rue T rue T rue T rue T rue

(20/27) Propositional inference: Enumeration method Let α = A B and KB = (A C) (B C) Is it the case that KB = α? Check all possible models α must be true wherever KB is true A B C A C B C KB α F alse F alse F alse F alse T rue F alse F alse F alse T rue T rue F alse F alse F alse T rue F alse F alse T rue F alse F alse T rue T rue T rue T rue T rue T rue F alse F alse T rue T rue T rue T rue F alse T rue T rue F alse F alse T rue T rue F alse T rue T rue T rue T rue T rue T rue T rue T rue T rue

(20/27) Propositional inference: Enumeration method Let α = A B and KB = (A C) (B C) Is it the case that KB = α? Check all possible models α must be true wherever KB is true A B C A C B C KB α F alse F alse F alse F alse T rue F alse F alse F alse F alse T rue T rue F alse F alse F alse F alse T rue F alse F alse T rue F alse T rue F alse T rue T rue T rue T rue T rue T rue T rue F alse F alse T rue T rue T rue T rue T rue F alse T rue T rue F alse F alse T rue T rue T rue F alse T rue T rue T rue T rue T rue T rue T rue T rue T rue T rue T rue

(21/27) Properties of Entailment Θ {φ} = ψ iff Θ = φ ψ (Deduction Theorem) Θ {φ} = ψ iff Θ {ψ} = φ (Contraposition Theorem) Θ {φ} is unsatisfiable iff Θ = φ (Contradiction Theorem)

(22/27) Equivalences (I) Commutativity φ ψ ψ φ φ ψ ψ φ φ ψ ψ φ Associativity (φ ψ) χ φ (ψ χ) (φ ψ) χ φ (ψ χ) Idempotence φ φ φ φ φ φ Absorption φ (φ ψ) φ φ (φ ψ) φ Distributivity φ (ψ χ) (φ ψ) (φ χ) φ (ψ χ) (φ ψ) (φ χ)

(23/27) Equivalences (II) Tautology φ Unsatisfiability φ Negation φ φ φ φ Neutrality φ φ φ φ Double Negation φ φ De Morgan (φ ψ) φ ψ (φ ψ) φ ψ Implication φ ψ φ ψ

(24/27) Normal Forms Other approaches to inference use syntactic operations on sentences, often expressed in standardized forms Conjunctive Normal Form (CNF) conjunction of disjunctions of literals }{{} : n i=1 ( m j=1 l i,j) clauses E.g., (A B) (B C D) Disjunctive Normal Form (DNF) disjunction of conjunctions of literals }{{} : n i=1 ( m j=1 l i,j) terms E.g., (A B) (A C) (A D) ( B C) ( B D)

(25/27) Normal Forms, cont. Horn Form (restricted) conjunction of Horn clauses (clauses with 1 positive literal) E.g., (A B) (B C D) Often written as set of implications: B A and (C D) B Theorem For every formula, there exists an equivalent formula in CNF and one in DNF.

(26/27) Why Normal Forms? We can transform propositional formulas, in particular, we can construct their CNF and DNF. DNF tells us something as to whether a formula is satisfiable. If all disjuncts contain or complementary literals, then no model exists. Otherwise, the formula is satisfiable. CNF tells us something as to whether a formula is a tautology. If all clauses (= conjuncts) contain or complementary literals, then the formula is a tautology. Otherwise, the formula is falsifiable. But: the transformation into DNF or CNF is expensive (in time/space) it is only possible for finite sets of formulas

(27/27) Summary: important notions Syntax: formula, atomic formula, literal, clause Semantics: truth value, assignment, interpretation Formula satisfied by an interpretation Logical implication, entailment Satisfiability, validity, tautology, logical equivalence Deduction theorem, Contraposition Theorem Conjunctive normal form, Disjunctive Normal form, Horn form