Introduction to Logic for Artificial Intelligence Lecture 1

Slides:



Advertisements
Similar presentations
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
Advertisements

Models and Propositional Logic In propositional logic, a model in general simply fixes the truth value – true or false – for every proposition symbol.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Logic Use mathematical deduction to derive new knowledge.
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
1 Introduction to Abstract Mathematics Valid AND Invalid Arguments 2.3 Instructor: Hayk Melikya
Logic.
Logic Concepts Lecture Module 11.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Alpha: Symbolization and Inference Bram van Heuveln Minds and Machines Lab RPI.
Introduction to Logic for Artificial Intelligence Lecture 1 Erik Sandewall 2010.
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Introduction to Logic for Artificial Intelligence Lecture 2 Erik Sandewall 2010.
MATH 224 – Discrete Mathematics
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Propositional calculus
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
9/30/98 Prof. Richard Fikes Inference In First Order Logic Computer Science Department Stanford University CS222 Fall 1998.
CS6133 Software Specification and Verification
Of 38 lecture 13: propositional logic – part II. of 38 propositional logic Gentzen system PROP_G design to be simple syntax and vocabulary the same as.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 05 : Knowledge Base & First Order Logic.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
CT214 – Logical Foundations of Computing Darren Doherty Rm. 311 Dept. of Information Technology NUI Galway
Chapter 1 Logic and proofs
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Knowledge Based Systems
EA C461 Artificial Intelligence
Chapter 7. Propositional and Predicate Logic
Arguments with Quantified Statements
2. The Logic of Compound Statements Summary
Introduction to Logic for Artificial Intelligence Lecture 2
Computer Science cpsc322, Lecture 20
Knowledge Representation and Reasoning
Resolution in the Propositional Calculus
The Propositional Calculus
ARTIFICIAL INTELLIGENCE
Logical Inference: Through Proof to Truth
Artificial Intelligence
Logic Use mathematical deduction to derive new knowledge.
CS 270 Math Foundations of CS
Copyright © Cengage Learning. All rights reserved.
Biointelligence Lab School of Computer Sci. & Eng.
Artificial Intelligence: Agents and Propositional Logic.
CS 416 Artificial Intelligence
Back to “Serious” Topics…
MA/CSSE 474 More Math Review Theory of Computation
Metatheorems Computational Logic Lecture 8
Biointelligence Lab School of Computer Sci. & Eng.
Logical Entailment Computational Logic Lecture 3
Chapter 7. Propositional and Predicate Logic
CSNB234 ARTIFICIAL INTELLIGENCE
Computer Science cpsc322, Lecture 20
Methods of Proof Chapter 7, second half.
Foundations of Discrete Mathematics
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
ece 720 intelligent web: ontology and beyond
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Presentation transcript:

Introduction to Logic for Artificial Intelligence Lecture 1 Erik Sandewall 2010

Uses of Formal Logic in A.I. In preconditions of actions In postconditions of actions Contents of knowledgebases/beliefbases Contents of messages Queries Embedded expressions in action scripts Methods for planning and plan revision Obtaining conclusions from knowledgebase Many more

Uses of Formal Logic in A.I. To summarize: Expressions for evaluation, and use of their value Expressions for matching, obtaining variable values as the result Drawing conclusions from logic expressions In order to master these techniques, it is necessary to be precise about the character of logic formulas and the operations on them. This requires: Basic concepts Equivalence rules Inference rules

Propositional logic Expressions and Evaluation (not p) T -> F, F -> T (and p q) TT -> T, TF -> F, FT -> F, FF -> F (or p q) TT -> T, TF -> F, FT -> F, FF -> F (imp p q) TT -> T, TF -> F, FT -> T, FF -> T (eqv p q) TT -> T, TF -> F, FT -> F, FF -> T

Propositional logic Conventional Notations (not p) ¬p, ~p -p (and p q) p  q, p & q p * q (or p q) p  q p + q (imp p q) p → q, p  q (eqv p q) p ↔ q, p  q

Equivalence Relation between Formulas If p and q are two formulas, then we write p == q if and only if the value of p equals the value of q for each possible value of their elements. E.g. (and p q) == (and p q) (and p (or q r)) == (or (and p q)(and p r)) Notice that each of these lines contains a relation between two logic formulas, not a single logic formula It is important to write it as == and not as =, since = will be used for another purpose and within formulas

Equivalence rules for not, and and or (not (not p)) == p (and p p) == p (and p q) == (and q p) (and p (and q r)) == (and (and p q) r) similar to these for or instead of and (not (and p q)) == (or (not p)(not q)) (not (or p q)) == (and (not p)(not q)) (and p (or q r)) == (or (and p q)(and p r)) (or p (and q r)) == (and (or p q)(or p r)) (imp p q) == (or (not p) q) (eqv p q) == (or (and p q)(and (not p)(not q)))

Some terms Vocabulary for a logic formula: set of symbols containing all those that occur in the formula (and maybe some more) Interpretation for a logic formula: a mapping from a vocabulary for it, to truth-values T or F Model for a logic formula: an interpretation where the value of the formula is T Joint vocabulary for two (or more) logic formulas: something that is a vocabulary for each one of them (but there is of course a smallest joint vocabulary) p == q holds if they have the same value for all interpretations in all their joint vocabularies

Some terms Vocabulary for a logic formula: set of symbols containing all those that occur in the formula (and maybe some more) Interpretation for a logic formula: a mapping from a vocabulary for it, to truth-values T or F Model for a logic formula: an interpretation where the value of the formula is T Joint vocabulary for two (or more) logic formulas: something that is a vocabulary for each one of them (but there is of course a smallest joint vocabulary) p == q holds if they have the same value for all interpretations in all their joint vocabularies p |= q holds if, considering all interpretations in their joint vocabularies, if p is true in one then q is also true there. This is pronounced p entails q (Swedish: "innebär")

Some entailment rules (and p q) |= p General rule: if p == q then p |= q General rule: if p |= q and q |= p then p == q (not p) |= (imp p q) (and p (not p)) |= q Also, write p, q |= r if r is true in all interpretations where both p and q are true. (Allow two or more premises). Obtain: p, (imp p q) |= q /modus ponens/ p, q |= (and p q)

A very simple proof (imp a b) (imp b c) (imp (and c d) e) a d --------------------------- b c (and c d) e

Inference rule For organizing proofs, it is customary to identify a limited number of entailment rules and to require that only these shall be used each time a line is added to the proof The selected entailment rules are called the inference rules of this particular inference system Uses of the inference rules are expressed using |- instead of |= A proof with C1, C2, ... Cn as premises and D as conclusion is summarized as C1, C2, ... Cn |- D

Resolution Method for Theorem-Proving Transformations on Given Premises Rewrite all uses of imp and eqv using and, or, not Move all uses of not inwards, (not (and a b)) == (or (not a)(not b)) Replace (not (not p)) by p Move uses of or inside and, (or p (and q r)) == (and (or p q)(or p r)) Rewrite (or p (or q r)) as (or p q r), with arbitrary number of arguments, and similarly for and The result is an expression on conjunctive normal form Consider the arguments of and as separate formulas, obtaining a set of or-expressions with literals as their arguments Consider these or-expressions as having a set of literals as its argument, not a sequence of them. Results are called clauses. For convenience we shall write (not p) as -p

Resolution Method for Theorem-Proving Inference Rule Only one single inference rule is sufficient: {p}  A, {-p}  B |- A  B assuming p is not a member of A and -p is not a member of B Some examples: {a, b, c}, {-a, d, e} |- {b, c, d, e} {a, b, c}, {-a, b, e} |- {b, c, e} {a, b, c}, {-a, -b, d} |- {b, c, -b, d} This conclusion is correct, but useless for further proof! {a}, {b}, {c}, {-a, -b, -c, d} |- {d}

Resolution Method for Theorem-Proving Metatheorems If there exists a proof with C1, C2, ... Cn as premises and D as the consequence, then we write C1, C2, ... Cn |- D Metatheorems: Soundness: if C1, C2, ... Cn |- D then C1, C2, ... Cn |= D Completeness: if C1, C2, ... Cn |= D then C1, C2, ... Cn |- D Both of these hold - but completeness is more difficult to prove Soundness is automatic provided that each inference rule is in fact an entailment rule

Proof by Contradiction Given a set of propositions C1, C2, ... Cn and desired conclusion D We want to show that C1, C2, ... Cn |= D Transform the problem by considering C1, C2, ... Cn, (not D) and try to prove a contradiction e.g. (and p (not p)) for some p Write contradiction as  , or as {} in the case of resolution If this can be proved then we have a proof for what we want to show. In the case of resolution proofs: Add (not D) to the given propositions before the conversion to clause form Technically, we have a meta-theorem: if C1, C2, ... Cn, (not D) |=  then C1, C2, ... Cn |= D