1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Rules of Inference Rosen 1.5.
TRUTH TABLES The general truth tables for each of the connectives tell you the value of any possible statement for each of the connectives. Negation.
Logic Concepts Lecture Module 11.
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
Knowledge Representation Methods
CS128 – Discrete Mathematics for Computer Science
TR1413: Discrete Mathematics For Computer Science Lecture 3: Formal approach to propositional logic.
So far we have learned about:
PHIL 120: Jan 8 Basic notions of logic
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 6 Limitations of propositional logic Introduction to predicate logic Symbols, terms and formulae, Parse.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
Copyright © Cengage Learning. All rights reserved.
Adapted from Discrete Math
Predicates and Quantifiers
Discrete Mathematics and Its Applications
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
Formal Logic Mathematical Structures for Computer Science Chapter Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
Chapter 1 Logic Section 1-1 Statements Open your book to page 1 and read the section titled “To the Student” Now turn to page 3 where we will read the.
Section 1.5. Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Computational Semantics Day 5: Inference Aljoscha.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8.
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
Chapter 2 The Logic of Quantified Statements. Section 2.1 Intro to Predicates & Quantified Statements.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
CS6133 Software Specification and Verification
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
1 Propositional Logic Introduction. 2 What is propositional logic? Propositional Logic is concerned with propositions and their interrelationships. 
Chapter 1: The Foundations: Logic and Proofs
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
Propositional Logic Predicate Logic
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
Predicates and Quantifiers Dr. Yasir Ali. 1.Predicates 2.Quantifiers a.Universal Quantifiers b.Existential Quantifiers 3.Negation of Quantifiers 4.Universal.
CS104:Discrete Structures Chapter 2: Proof Techniques.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Outline Logic Propositional Logic Well formed formula Truth table
Tautology. In logic, a tautology (from the Greek word ταυτολογία) is a formula that is true in every possible interpretation.logic Greek formulainterpretation.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
2004/9/15fuzzy set theory chap02.ppt1 Classical Logic the forms of correct reasoning - formal logic.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Logic and Truth Tables Winter 2012 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Propositional Logic. Assignment Write any five rules each from two games which you like by using propositional logic notations.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 4- Logic.
Uniqueness Quantifier ROI for Quantified Statement.
Chapter 1 Logic and proofs
Logical functors and connectives. Negation: ¬ The function of the negation is to reverse the truth value of a given propositions (sentence). If A is true,
Logic.
2. The Logic of Compound Statements Summary
Discrete Mathematics Logic.
COMP 1380 Discrete Structures I Thompson Rivers University
Discrete Mathematics Logic.
CSNB234 ARTIFICIAL INTELLIGENCE
Predicates and Quantifiers
COMP 1380 Discrete Structures I Thompson Rivers University
Logical and Rule-Based Reasoning Part I
Introduction to Computational Linguistics
Presentation transcript:

1 Logic What is it?

2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow from given premises, i.e., whether arguments are valid or not

3 A valid argument is one whose conclusion is true in every case in which all its premises are true.

4 Premise 1: Some cave dwellers use fire. Premise 2: All who use fire have intelligence. Conclusion: Some cave dwellers have intelligence. Valid or not? Valid

5 P1: All geniuses are illogical. P2: Some politicians are illogical. Conclusion: Some politicians are geniuses. Valid or not? Not valid

6 P1: If you overslept, you will be late. P2: You aren’t late. Conclusion: You didn’t oversleep. IF you oversleep, you will be late AND you are not late THEN you didn’t oversleep.

7 P1P2...PnCP1P2...PnC IF P 1 and P 2 and … P n THEN C

8 A valid argument does not say that C is true but that C is true if all the premises are true. That is, there are NO counterexamples. P1: Bertil is a professional musician. P2: All professional musicians have pony-tail. Therefore: Bertil has pony-tail.

9 Postulates Axioms

10 Einstein's Postulates for the Special Theory of Relativity The laws of physics are the same in all reference frames. The speed of light through a vacuum (300,000,000 m/s) is constant as observed by any observer, moving or stationary.

11 Euclid's fifth axiom (parallel axiom): For each point P and each line l, there exists at most one line through P parallel to l.

12 Different Geometries Euclidean: Given a line L and a point P not on L, there is exactly one line passing through P, parallel to L. Hyperbolic: Given a line L and a point P not on L, there are at least two lines passing through P, parallel to L. Elliptic: Given a line L and a point P not on L, there are no lines passing through P, parallel to L.

13 EuclidianElliptic Hyperbolic Sum of the angles:

14 Premises/Postulates/Axioms Conclusion Logic is about how to deduce, on mere form, a valid argument. Valid is a semantic concept. Deduction is a syntactic concept.

15 Logic Propositional calculus Quantification theory (predicate logic)

16 Proposition Propositions are expressed, in natural language, in sentences. It is raining. It is snowing. Where is Jack? (NOT a proposition) Propositions are declarative sentences: saying something that is true or false.

17 More examples: Napoleon was German. All men are mortal. Tweety is a robin. Oxygen is an element. Jenkins is a bachelor. No bachelor are married. If it is raining then it is it is snowing. It is not raining. It is raining or it is snowing It is raining and it is snowing.

18 If A then B not A A or B A and B If it is raining then it is it is snowing. It is not raining. It is raining or it is snowing It is raining and it is snowing. Propositional CALCULUS uses variables for propositions and study the form, not the content (semantics), in order to deduce valid conclusions.

19 Compare with mathematics.

20 We shall treat propositions as unanalyzed, thus making no attempt to discern their logical structure. We shall be concerned only with the relations between propositions, and then only insofar as those relations concern truth or falsehood.

21 OR Either you wash the car or you cut the grass. The symbol V (from Latin vel) is used to indicate ‘or’ as in ‘Either A or B’. V is inclusive.

22 Exact definition of V. Lower-case letters ‘ p ’, ‘ q ’, ‘ r ’, etc., are used for propositional variables, just as ‘x’, ‘y’ are numerical variables. p q p V q FFF FTT TFT TTT

23 ‘Socrates is alive V Plato is alive’ is false. ‘Socrates is alive V Plato is dead’ is true.

24 p q p V q

25 Not:

26 AND: Socrates is alive Plato is alive

27 TT F T F F T TF F F T T F..

28 An ‘ if … then ___’ is called a conditional. The proposition replacing ‘…’ is called the antecedent, and that replacing the ‘___’ is called the consequent. How is ‘if … then ___ ’ represented? ‘if it isn’t raining, then he is at game’ antecedentconsequent

29 Truth value for conditionals. Things that are q Things that are p Things that are neither p nor q

30 Truth Table

31 if p, then q p only if q q p You have malaria only if you have fever.

32 Only men are whisky-drinkers. Only M is W If W then M

33 Equivalence De Morgan’s laws:

34 Tautology is a proposition that is always true. Contradiction is a proposition that is always false: Falsum: symbolizes a contradiction

35 if is a tautology, then is a contradiction. if is a contradiction, then is a tautology.

36 Inference rules

37 introduction

Compare:

Compare:

Compare

41 Proof or Deduction stands for a proof: there is one or more inferences that together lead to C.

A Proof

43 Soundness and completeness A logic is sound if a deduction yields a valid argument. It is complete if there is a deduction for a valid argument.

44 Quantification Theory For all member in a set … There exist a member in a set …

45 All teachers are friendly. For all x (if x is a teacher then x is friendly) Some teachers are unfriendly There is (exists) a teacher such that (x is a teacher and x is unfriendly)

46 All teachers are friendly. (if x is a teacher then x is friendly) Some teachers are unfriendly (x is a teacher and x is unfriendly)

47 All teachers are friendly. Some teachers are unfriendly

48 All teachers are friendly. Some teachers are unfriendly

49 A predicate is expressed by an incomplete sentence or sentence skeleton containing an open place. “___ is a man” expresses a predicate. When we fill the open place with the name of a subject, such as Socrates, the sentence “Socrates is a man” is obtained.

50 Consider the skeleton “___ loves ___”. In grammatical terminology, this consists of a transitive verb and two open places, one to be filled by the name of a subject, such as “Jane”, the other of an object, such as “John”. Binary relation

51 Another example: “___ is less than ___”. “2 is less than 3”. In mathematical language:

52 alternatively

53 “___ is a man” “___ loves ___”

54 Existential quantifier There is something with a particular property.

55 Universal quantifier Every man is mortal.

56 there are right-angled triangles OR there is a triangle that is right-angled OR there is a triangle with the property of being right-angled.

57 All teachers are friendly. Some teachers are unfriendly

58 Combinations of universal and existential quantifiers.

59 Problems 1. Interpretation

60 Three different interpretations: 1. S is the “security number of a person”. 2. S is the “successor function in arithmetic. 3. S is the “DNA sequence of a person”.

61 2. Difficulties in expressing natural language sentences. a. All men are mortal. b. Dog is a quadruped. c. Only drunk drivers under eighteen cause bad accident. a. Driving is risky, if you are drunk.

62 All have the same form:

63 All men are mortal. Dog is a quadruped. Only drunk drivers under eighteen cause bad accident. Driving is risky, if you are drunk.

64 Al men are not good. There are no good men. Not all men are good.

65 Everything with F has G Nothing with F has G Something with F has G Something with F has not G

66 Negation can be read ‘it is not the case that all x have the property P’ i.e., ‘some x has not property P’ i.e., there exist some x which not has property P i.e.,

67 ‘there is no x with the property P’ i.e., all x have the property notP

68 Interpretation What does it mean for a quantified expression to be true or false?

69 says that all element in a particular domain (a nonempty set) have the property P, i.e., all x belongs to the set that is decided by the interpretation of P. says that in the domain, decided by the interpretation of P, there is at least one element with the property P.

70 The meaning of D: ‘x has the dog y’ Domain: Växjö. The interpretation of D is the all pairs such that p is the name of a person in Växjö that has a dog with the name d.

71 Let R stands for raven and B for black. Then the sentence expresses that all ravens are black. Black animals Ravens Animals

72 ‘There is a dog that is toothless’. Domain: All animals If there is a dog that is toothless the sentence is true.

73 END