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.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Completeness and Expressiveness
Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
1 A formula in predicate logic An atom is a formula. If F is a formula then (~F) is a formula. If F and G are Formulae then (F /\ G), (F \/ G), (F → G),
Introduction to Theorem Proving
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.
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Propositional Logic Russell and Norvig: Chapter 6 Chapter 7, Sections 7.1—7.4 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/home.htm.
1 Introduction to Abstract Mathematics Valid AND Invalid Arguments 2.3 Instructor: Hayk Melikya
Deduction In addition to being able to represent facts, or real- world statements, as formulas, we want to be able to manipulate facts, e.g., derive new.
Logic.
Logic Concepts Lecture Module 11.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
CS128 – Discrete Mathematics for Computer Science
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
From Chapter 4 Formal Specification using Z David Lightfoot
Knoweldge Representation & Reasoning
Chapter 3 Propositional Logic
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
Discrete Mathematics and its Applications
Adapted from Discrete Math
I NTRO TO L OGIC Dr Shlomo Hershkop March
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Discrete Mathematics and Its Applications
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
Propositional Resolution Computational LogicLecture 4 Michael Genesereth Spring 2005.
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
Math 240: Transition to Advanced Math Deductive reasoning: logic is used to draw conclusions based on statements accepted as true. Thus conclusions are.
10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Pattern-directed inference systems
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
1 CMSC 471 Fall 2002 Class #10/12–Wednesday, October 2 / Wednesday, October 9.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
LECTURE LECTURE Propositional Logic Syntax 1 Source: MIT OpenCourseWare.
Propositional calculus
CS6133 Software Specification and Verification
Artificial Intelligence “Introduction to Formal Logic” Jennifer J. Burg Department of Mathematics and Computer Science.
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.
CS2351 Artificial Intelligence Bhaskar.V Class Notes on Knowledge Representation - Logical Agents.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
Propositional Logic Russell and Norvig: Chapter 6 Chapter 7, Sections 7.1—7.4.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Propositional Logic Russell and Norvig: Chapter 6 Chapter 7, Sections 7.1—7.4 CS121 – Winter 2003.
1 Propositional Proofs 1. Problem 2 Deduction In deduction, the conclusion is true whenever the premises are true.  Premise: p Conclusion: (p ∨ q) 
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Chapter 1 Logic and proofs
Chapter 7. Propositional and Predicate Logic
Knowledge Representation and Reasoning
Resolution in the Propositional Calculus
The Propositional Calculus
Proposition & Predicates
Propositional Calculus: Boolean Algebra and Simplification
Back to “Serious” Topics…
Computer Security: Art and Science, 2nd Edition
Chapter 7. Propositional and Predicate Logic
Foundations of Discrete Mathematics
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Presentation transcript:

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 symbolic logic rules and procedures are used to draw conclusions using various logical techniques.

2 The general form of a logical process Logical Process (using logic to Reason) Premises Or Facts Inferences OR Conclusions Inference is a process that is used to derive new facts from the ones that are known.

3 Logic Propositional Logic A^B C First Order Logic (Predicate Logic or Predicate Calculus) A system of computing Not differential or integral calculus \/ x (ODD(x)→EVEN(add(x,1))) Higher order Logics \/ P (P(x)) \/ f (P(f(x)))

4 Propositional Logic and Automated Reasoning A: Today is Monday. B: It is raining now. Not A: Today is not Monday. Not B: It is not raining now. A proposition is a declaration: New Zealand is beautiful. The sun is made of chocolate. Symbols like A,B,C,… are used to denote propositions. These are called atoms. A proposition can either be true or false but not both. This is called its truth value and it is assigned not inherent to the proposition.

5 A Formula A formula is built with atoms, parantheses and the following five logical operators: Negation ~not Conjunction /\and Disjunction \/or Implication -> if…then Double implication if and only if Example formulae A (~A) (( B \/ C) /\ ~D ) ((( A -> B) /\ C) /\ D) Order of precedence ~ /\ \/ -> (((~A)/\B) -> (C\/D)) ≡ ~A /\ B -> C \/ D

6 A Recursive Definition of Formulae in Propositional Logic An atom is a formula. If F is a formula then ~F is a formula. If F and G are formlae then F /\ G F \/ G F -> G F G Are formulae. There are no formulae other than these just defined

7 Formulae have truth values. Truth value of a formula can be obtained from its atoms and logical operators. B C D (B\/C) (~C) ((B\/C)/\~C) (((B\/C)/\~C)\/D) true true true true false false true true true false true false false false true false true true true true true true false false true true true true false true true true false false true false true false true false false false false false true false true false true false false false false true false false Interpretation of Formulae An interpretation of a formula F is an assignment of truth values to every atom. A formula having n atoms has 2^n interpretations (a table with 2^n rows).

8 A formula is a tautology (or a valid formula) if and only if it is true under all interpretations. B \/ ~B A formula is an inconsistency if and only if it is false under all interpretations. A formula is a tautology if and only if its negation is an inconsistency (or unsatisfiable formula). (~B /\ B) A formula is consistent (or satisfiable) if it is not inconsistent. In other words, a formula is consistent if it is true under at least one interpretation. If a formula is a tautology it is consistent but the converse may not hold. A formula F is equivalent to formula G if and only if the truth value of F is equivalent to the truth value of G under all interpretations.

9 A Proof Formula G is said to be the logical consequence of formulae F1, F2,…, Fn if and only if every interpretation that satisfies (F1/\F2/\…/\Fn) also satisfies G. We may also say, F1, F2,…,Fn imply G. G is called the Goal and the Fi are called the premisses. To demonstrate that G is a logical consequence of the Fs is to prove that ((F1/\F2/\…/\Fn) -> G) is a theorem. The demonstartion is the proof. The formulae we will work on will be the ones that are consistent.

10 A proof may be a direct proof a refutation proof Direct method: ((F1/\F2/\…/\Fn) -> G) is a tautology. Refutation method: ~((F1/\F2/\…/\Fn) -> G) is an inconsistency. Since the negation of a tautology is an inconsistency these are equivalent. ~((F1/\F2/\…/\Fn) -> G) ≡ ~(~(F1/\F2/\…/\Fn) \/ G ) ≡ ((F1/\F2/\…/\Fn) /\ ~G)

11 F G ~G F->G F/\(F -> G) (F/\(F -> G)) -> G (F/\(F -> G)) /\ ~ G true true false true true true false true false true false false true false false true false true false true false false false true true false true false Example Prove by both methods that G is a logical consequence of F and F-> G We need 4 rows because we have 2 atoms. This shows that there exists a finite procedure in propositional logic to decide whether a given goal is a theorem or not. Propositional logic is thus decidable. This is known as modus ponens.

12 As the number of atoms (n) increases the number of rows in the table increases exponentially which makes the use of truth table for proving theorems impractical. There are other methods that may be used. Rules of inference What we proved using the table (modus ponens) is called a rule of inference and is written as, if F and (F-> G) then G A rule of inference applied to a set of premises produces a formula. In the case of modus ponens above we can say that G is deduced from F and F-> G by modus ponens. There are other rules of inference and these rules are used in a theorem proving method called the natural deduction.

13 Natural Deduction A rule of inference is applied to a set of given premises to deduce the Logical consequence formula which is added to the set of premises. New formulae is deduced and added to a set by applying various rules of inference until we deduce a formula that is identical to the goal or we can no longer deduce new formulae. One of these cases occurs in finite time. Natural deduction is a direct method. Using this method of Proof we may produce formulae that are not useful in reaching the goal. This is not a computationally desirable method There is a refutation proof method called the resolution principle which Uses one rule of inference called the resolution which is effective enough to make other rules secondary. We will look at this rule and its theorem proving procedure.

14 1)A 2)B 3)A/\C -> D 4)B->C 5)Cmodus ponens on 2 and 4 6)A/\Cintroducing conjunction on 1 and 5 7)Dmodus ponens on 3 and 6 The goal has been deduce as a logical consequence of the premises. The goal has been proved to be a theorem. Example Proving D Given