Proving Arguments Valid in Predicate Calculus

Similar documents
Formal (Natural) Deduction for Predicate Calculus

Predicate Calculus - Syntax

1.3 Predicates and Quantifiers

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. February 9, :30 pm Duration: 1:50 hs. Closed book, no calculators

(Refer Slide Time: 02:20)

Formal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures

Predicate Logic: Sematics Part 1

Predicate Calculus. Lila Kari. University of Waterloo. Predicate Calculus CS245, Logic and Computation 1 / 59

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

Formal (natural) deduction in propositional logic

Predicate Logic. Andreas Klappenecker

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers

Example ( x.(p(x) Q(x))) ( x.p(x) x.q(x)) premise. 2. ( x.(p(x) Q(x))) -elim, 1 3. ( x.p(x) x.q(x)) -elim, x. P(x) x.

Announcement. Homework 1

I thank the author of the examination paper on which sample paper is based. VH

10 LOGIC Introduction. Objectives

Mathacle. PSet ---- Algebra, Logic. Level Number Name: Date: I. BASICS OF PROPOSITIONAL LOGIC

Predicate Logic. CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo

Propositional Language - Semantics

ICS141: Discrete Mathematics for Computer Science I

4 Quantifiers and Quantified Arguments 4.1 Quantifiers

III. Elementary Logic

Section Summary. Predicates Variables Quantifiers. Negating Quantifiers. Translating English to Logic Logic Programming (optional)

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Predicate Logic Thursday, January 17, 2013 Chittu Tripathy Lecture 04

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

1 Predicates and Quantifiers

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Logic. Quantifiers. (real numbers understood). x [x is rotten in Denmark]. x<x+x 2 +1

For all For every For each For any There exists at least one There exists There is Some

2. Use quantifiers to express the associative law for multiplication of real numbers.

First Order Logic: Syntax and Semantics

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

2-4: The Use of Quantifiers

Class 29 - November 3 Semantics for Predicate Logic

8.8 Statement Forms and Material Equivalence

Predicates, Quantifiers and Nested Quantifiers

Logic and Modelling. Introduction to Predicate Logic. Jörg Endrullis. VU University Amsterdam

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

Discrete Mathematics and Its Applications

Denote John by j and Smith by s, is a bachelor by predicate letter B. The statements (1) and (2) may be written as B(j) and B(s).

Quantifiers Here is a (true) statement about real numbers: Every real number is either rational or irrational.

Symbolising Quantified Arguments

Mathematical Logic. Reasoning in First Order Logic. Chiara Ghidini. FBK-IRST, Trento, Italy

2 Truth Tables, Equivalences and the Contrapositive

Mat 243 Exam 1 Review

COMP 409: Logic Homework 5

Introduction to Sets and Logic (MATH 1190)

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

The statement calculus and logic

Math Fundamentals of Higher Math

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

Introduction. Predicates and Quantifiers. Discrete Mathematics Andrei Bulatov

Notes on Propositional and First-Order Logic (CPSC 229 Class Notes, January )

First order Logic ( Predicate Logic) and Methods of Proof

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

1 Completeness Theorem for First Order Logic

1. Prove that the number cannot be represented as a 2 +3b 2 for any integers a and b. (Hint: Consider the remainder mod 3).

The Process of Mathematical Proof

Introduction to Logic in Computer Science: Autumn 2006

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

MAT2345 Discrete Math

1 Completeness Theorem for Classical Predicate

Section 2.1: Introduction to the Logic of Quantified Statements

Proofs. Chapter 2 P P Q Q

Semantics I, Rutgers University Week 3-1 Yimei Xiang September 17, Predicate logic

MATH 1090 Problem Set #3 Solutions March York University

Predicate Logic - Deductive Systems

2. Introduction to commutative rings (continued)

Chapter 1, Part II: Predicate Logic

Propositional Functions. Quantifiers. Assignment of values. Existential Quantification of P(x) Universal Quantification of P(x)

Exercises. Exercise Sheet 1: Propositional Logic

Predicate Logic - Semantic Tableau

With Question/Answer Animations. Chapter 2

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

First-Order Logic (FOL)

Q250: Math and Logic Unit 1 Review Problems for 9/7/12

INTRODUCTION TO LOGIC 8 Identity and Definite Descriptions

Predicate Calculus - Semantics 1/4

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

Propositional Logic. Argument Forms. Ioan Despi. University of New England. July 19, 2013

JUST THE MATHS UNIT NUMBER 1.6. ALGEBRA 6 (Formulae and algebraic equations) A.J.Hobson

Predicate Calculus. Formal Methods in Verification of Computer Systems Jeremy Johnson

First-Order Logic. Chapter Overview Syntax

COMP 2600: Formal Methods for Software Engineeing

Logic: Propositional Logic Truth Tables

Discrete Structures for Computer Science

Peano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now

Introduction to first-order logic:

Lecture 9 CS 1813 Discrete Mathematics. Predicate Calculus. Propositions Plus Plus

Propositional Logic Review

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

All psychiatrists are doctors All doctors are college graduates All psychiatrists are college graduates

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

INTRODUCTION TO LOGIC 8 Identity and Definite Descriptions

First Order Logic Implication (4A) Young W. Lim 4/6/17

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

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

Predicate Logic. Example. Statements in Predicate Logic. Some statements cannot be expressed in propositional logic, such as: Predicate Logic

Transcription:

Proving Arguments Valid in Predicate Calculus Lila Kari University of Waterloo Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 1 / 22

Predicate calculus - Logical consequence Logical consequences in L pred, which are the counterparts of tautological consequences in L p, involve semantics. The notation = for tautological consequences is also used for logical consequences. Definition. Suppose Σ is a set of formulas in L pred and A is a formula in L pred. A is called a logical consequence of Σ, written as Σ = A, iff for any interpretation I and any value assignment s in I, if [I, s](σ) = 1 then [I, s](a) = 1. The notations = and = are used in the same sense as in propositional logic. Two formulas are called logically equivalent (or equivalent for short, if no confusion will arise) iff A = B holds. Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 2 / 22

Example: Proving an argument in L pred valid Prove that x A(x) = xa(x). Proof: Suppose the contrary, that is, suppose that there is some interpretation I over domain D and some assignment s in I such that: (1) [I, s]( x A(x)) = 1 (2) [I, s]( xa(x)) = 0. Let u be a free variable symbol not occurring in A(x). Consider A(u). By (1), (3) [I, s [u=d] ]( A(u)) = 1 for all d D. Hence, (4) [I, s [u=d] ](A(u)) = 0 for all d D. Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 3 / 22

Example contd. On the other hand, by (2) we have that is, (5) [I, s]( xa(x)) = 1. (6) [I, s [u=d] ](A(u)) = 1 for some d D. We have reached a contradiction (between (6) and (4)), therefore our assumption was false. Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 4 / 22

The particular case of empty premises: (universally) valid formulas in L pred Recall that the notion of (universally) valid formula in L pred is analogous to the notion of tautology in propositional logic. For any formula A in L pred, one has = A if and only if A is (universally) valid. To demonstrate that a formula A is (universally) valid, we have to show that = A under all possible interpretations. In other words, a formula A is (universally) valid if there is no interpretation for which A yields false. Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 5 / 22

Proving a formula is not (universally) valid To demonstrate that a formula A is not (universally) valid, it is therefore sufficient to find an single counterexample: that is, it is sufficient to give a single interpretation for which A yields false. In the case when A is of the form B C, A is false iff B is true while C is false. Consequently, to prove that a conditional is not (universally) valid, it is sufficient to find an interpretation that makes the antecedent true and the consequent false. Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 6 / 22

Example Consider the following formula: xp(x) xp(x) ( ) Note that if P(x) is true for some x, this obviously does not justify the conclusion that P(x) is true for all x. For instance, if a program runs for some input data, this obviously does not allow one to conclude that the program runs for all possible input data. Thus, to prove that ( ) is not (universally) valid, one must find an interpretation that makes the antecedent xp(x) true and the consequent xp(x) false. In other words, one must find an interpretation that satisfies xp(x) xp(x) Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 7 / 22

Example contd. It is not difficult to find such an interpretation. Choose a domain D = {a, b} and assign P(a) the value 1 and P(b) the value 0. Then there is an x, that is, x = a such that P(x) is true, which means that xp(x) yields true. However, xp(x) is obviously false. This implies that xp(x) xp(x) is not (universally) valid, that is, = xp(x) xp(x) Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 8 / 22

Example Prove that the following formula is not (universally) valid: x(p(x) Q(x)) xp(x) xq(x). Solution. We find an interpretation that uses a domain in which a and b are the only individuals. The value assignment is given by the following table. x P(x) Q(x) P(x) Q(x) a 1 0 1 b 0 1 1 It is easy to see that this assignment makes the left side of the formula true and the right side false. Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 9 / 22

Example contd. For example, if P(x) and Q(x) mean, respectively, x has brown shoes and x has black shoes then x(p(x) Q(x)) means that everyone has either brown shoes or black shoes, xp(x) xq(x) means that either everyone has brown shoes or that everyone has black shoes. In other words, in addition to the fact that all shoes are either brown or black, all shoes must be of the same colour in order to satisfy the right side of the formula. This is obviously a stronger condition than merely requiring that all shoes be either brown or black. Since we found an interpretation that makes the formula false, the formula is not (universally) valid, that is = x(p(x) Q(x)) xp(x) xq(x). Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 10 / 22

Proving that a formula is (universally) valid The problem of proving whether or not a formula in L pred is (universally) valid is undecidable; that is, there is no generally applicable algorithm that, given an arbitrary formula in L pred as input, can reliably determine whether or not the formula is (universally) valid. There are methods that work in many particular cases. For instance, all formulas that arise from tautologies, such as xp(x) ( xp(x)), are (universally) valid. Other formulas are (universally) valid by definition. For instance, xp(x) must imply P(t) for every term t, so the formula xp(x) P(a), where a is in the domain, is (universally) valid. However, there is no algorithm to provide an answer (universally valid or not), in all cases. Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 11 / 22

Example Prove that ( ) is (universally) valid. xp(x) x P(x) Proof. One must show that this formula is true under any interpretation or, equivalently, that there is no interpretation that makes it false (that is, no inperpretation that makes xp(x) true, while making x P(x) true). This however is easy, as one observes that it is impossible that P(x) be true for all x and at the same time false for all x. Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 12 / 22

Note that even though xp(x) x P(x) is (universally) valid, its converse is not (the converse of p q is q p). In other words, the following formula is not (universally) valid: x P(x) xp(x). For instance, if P(x) is x has a job then antecedent (the left side) of this implication means not everyone is unemployed whereas the consequent (the right side) means everyone has a job, and the first does not imply the second. Indeed, the statement not everyone is unemployed admits the possibility that some people are without jobs, whereas everyone has a job does not. Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 13 / 22

Example Show that the following formula is (universally) valid. xp(x) xq(x) x(p(x) Q(x)). Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 14 / 22

Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 15 / 22

Proof that penguins are not good at logic Premise 1: x(penguin(x) blackwhite(x)) Premise 2: x(tv(x) blackwhite(x)) Conclusion: x(penguin(x) tv(x)) Proof: Take the interpretation with domain D = {Pingu, OldTV}, where Pingu is a penguin, and OldTV is a black-and-white TV, and the values of the predicates penguin(x), tv(x), blackwhite(x) are: penguin(x) blackandwhite(x) tv(x) Pingu 1 1 0 OldTV 0 1 1 One can see that under this interpretation the premises are true, but the conclusion is false. Therefore, the argument is not valid. Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 16 / 22

Theorem. Let n N and A 1, A 2,..., A n be formulas in L pred. Then if and only if A 1,..., A n = A = A 1... A n A. Note. In the proof, we only care about the interpretations that make A 1 A 2... A n true, because falsehood implies anything. Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 17 / 22

Russell and the Pope One philosopher was shocked when Bertrand Russell told him that a false proposition implies any proposition. He said You mean from the statement 2+2=5 it follows that you are the Pope? Russell replied Yes. Can you prove it? Certainly. Suppose 2 + 2 = 5. Subtracting 2 from both sides we get 2 = 3. Transposing we get 3 = 2. Subtracting 1 from both sides we get 2 = 1. Now suppose the Pope and I are two. Since 2 = 1, then the Pope and I are one. Hence I am the Pope. Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 18 / 22

Exercises from Lewis Carroll Lewis Carroll, (really Charles Dodgson writing under a pseudonym), the author of Alice in Wonderland is also author of several works in symbolic logic. The next exercises for proving arguments in L pred valid or invalid, come from his book Symbolic Logic. Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 19 / 22

Exercise 1 Consider the following argument. a) All lions are fierce. b) Some lions do not drink coffee. c) Some fierce creatures do not drink coffee. Express the argument in the language of predicate calculus, where L(x), F (x) and C(x) are the statements x is a lion, x is fierce and x drinks coffee respectively. The universe of discourse is the set of all creatures. Does c) follow from a) and b)? Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 20 / 22

Exercise from Lewis Carroll Let P(x), I (x) and V (x) be the statements x is a professor, x is ignorant, and x is vain. Express each of the following statements in L pred where the universe of discourse is the set of all people. a) No professors are ignorant. b) All ignorant people are vain. c) No professors are vain. Does c) follow from a) and b)? Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 21 / 22

Exercise from Lewis Caroll Let B(x), L(x), C(x) and D(x) be the statements x is a baby, x is logical, x is able to manage crocodiles and x is despised. Express each of the following statements in L pred if the universe of discourse is the set of all people: a) Babies are illogical. b) Nobody is despised who can manage a crocodile. c) Illogical persons are despised. d) Babies cannot manage crocodiles. Does d) follow from a), b) and c)? Proving Arguments Valid in Predicate Calculus CS245, Logic and Computation 22 / 22