Discrete Mathematics: Predicate Logic, Lecture notes of Discrete Mathematics

Predicates and quantified statements in discrete mathematics, specifically focusing on truth sets and how to obtain propositions from predicates. It also covers the two types of quantifiers, universal and existential, and provides examples of each. The document concludes with a discussion of implicit quantification using symbols like ⇒ and ⇔.

Typology: Lecture notes

2021/2022

Uploaded on 05/11/2023

tylar
tylar 🇺🇸

4.8

(19)

238 documents

1 / 56

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Discrete Mathematics
(Predicate Logic)
Pramod Ganapathi
Department of Computer Science
State University of New York at Stony Brook
January 24, 2021
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38

Partial preview of the text

Download Discrete Mathematics: Predicate Logic and more Lecture notes Discrete Mathematics in PDF only on Docsity!

Discrete Mathematics

(Predicate Logic)

Pramod Ganapathi

Department of Computer Science State University of New York at Stony Brook

January 24, 2021

Contents

Contents Predicates and Quantified Statements Statements with Multiple Quantifiers Arguments with Quantified Statements

What is a propositional function or predicate?

Definition A propositional function or predicate is a sentence that contains one or more variables A predicate is neither true nor false A predicate becomes a proposition when the variables are sub- stituted with specific values The domain of a predicate variable is the set of all values that may be substituted for the variable Examples Symbol Predicate Domain Propositions p ( x ) x > 5 x ∈ R p (6) , p (− 3_._ 6) , p (0) ,... p ( x, y ) x + y is odd x ∈ Z , y ∈ Z p (4 , 5) , p (− 4 , −4) ,... p ( x, y ) x^2 + y^2 = 4 x ∈ R , y ∈ R p (− 1_._ 7 , 8_._ 9) , p (− √ 3 , −1) ,...

What is a truth set?

Definition A truth set of a predicate is the set of all values of the predicate that makes the predicate true If p ( x ) is a predicate and x has domain D , then the truth set of p ( x ) is the set of all elements of D that makes p ( x ) true when the values are substituted for x. That is,

Truth set of p ( x ) = { xD | p ( x )} Examples Symbol Predicate Domain Truth set p ( x ) x > 5 x ∈ R { p (6) , p (13_._ 6) , p (5_._ 001) ,... } p ( x, y ) x + y is odd x ∈ Z , y ∈ Z { p (4 , 5) , p (− 4 , −3) ,... } p ( x, y ) x^2 + y^2 = 4 x ∈ R , y ∈ R { p (− 2 , 2) , p (− √ 3 , −1) ,... }

What are quantifiers?

Definition Quantifiers are words that refer to quantities such as “all” or “some” and they tell for how many elements a given predicate is true

Introduced into logic by logicians Charles Sanders Pierce and Gottlob Frege during late 19th century Two types of quantifiers:

  1. Universal quantifier (∀)
  2. Existential quantifier (∃)

Universal quantifier (∀)

Definition Let p ( x ) be a predicate and D be the domain of x A universal statement is a statement of the form

xD, p ( x )

Forms: “ p ( x ) is true for all values of x ” “For all x , p ( x )” “For each x , p ( x )” “For every x , p ( x )” “Given any x , p ( x )” It is true if p ( x ) is true for each x in D ; It is false if p ( x ) is false for at least one x in D A counterexample to the universal statement is the value of x for which p ( x ) is false

Existential quantifier (∃)

Definition Let p ( x ) be a predicate and D be the domain of x An existential statement is a statement of the form

xD, p ( x )

Forms: “There exists an x such that p ( x )” “For some x , p ( x )” “We can find an x , such that p ( x )” “There is some x such that p ( x )” “There is at least one x such that p ( x )” It is true if p ( x ) is true for at least one x in D ; It is false if p ( x ) is false for all x in D A counterproof to the existential statement is the proof to show that p ( x ) is true is for no x

Existential quantifier (∃)

Examples Universal st.s Domain Truth value Method ∃ xD, x^2 ≥ x D = { 1 , 2 , 3 } True Method of exhaust. ∃ x ∈ R , x^2 ≥ x R True Example ∃ x ∈ Z , x + 1 ≤ x Z False How?

Universal conditional statement (∀ , →)

Definition A universal conditional statement is of the form

x, if p ( x ) then q ( x ) Examples ∀ x ∈ R, if x > 2 then x^2 > 4 ∀ real number x , if x is an integer then x is rational ∀ integer x , x is rational B Logically equivalent ∀ x , if x is a square then x is a rectangle ∀ square x , x is a rectangle B Logically equivalent ∀ xU , if p ( x ) then q ( x ) ∀ xD , q ( x ) B Logically equivalent (where, D = { xU | p ( x ) is true})

Can be extended to existential conditional statement (∃ , →)

Implicit quantification (⇒ , ⇔)

Examples If a number is an integer, then it is a rational number Implicit meaning: ∀ number x , if x is an integer, x is rational The number 10 can be written as a sum of two prime numbers Implicit meaning: ∃ prime numbers p and q such that 10 = p + q If x > 2 , then x^2 > 4 Implicit meaning: ∀ real x , if x > 2 , then x^2 > 4 Definition Let p ( x ) and q ( x ) be predicates and D be the common domain of x. Then implicit quant. symbols ⇒ , ⇔ are defined as:

p ( x ) ⇒ q ( x ) ≡ ∀ x, p ( x ) → q ( x ) p ( x ) ⇔ q ( x ) ≡ ∀ x, p ( x ) ↔ q ( x )

Implicit quantification (⇒ , ⇔)

Problem q ( n ): n is a factor of 8; r ( n ): n is a factor of 4 s ( n ): n < 5 and n 6 = 3 Domain of n is Z+^ (i.e., positive integers) What are the relationships between q ( n ), r ( n ), and s ( n ) using symbols ⇒ and ⇔? Solution Truth set of q ( n ) = { 1 , 2 , 4 , 8 }; Truth set of r ( n ) = { 1 , 2 , 4 }; Truth set of s ( n ) = { 1 , 2 , 4 } ∀ n in Z+ , r ( n ) → q ( n ) i.e., r ( n ) ⇒ q ( n ) i.e., “ n is a factor of 4” ⇒ “ n is a factor of 8” ∀ n in Z+ , r ( n ) ↔ s ( n ) i.e., r ( n ) ⇔ s ( n ) i.e., “ n is a factor of 4” ⇔ “ n < 5 and n 6 = 3” ∀ n in Z+ , s ( n ) → q ( n ) i.e., s ( n ) ⇒ q ( n ) i.e., “ n < 5 and n 6 = 3” ⇒ “ n is a factor of 8”

Negation of quantified statements (∼)

Definition Formally,

∼ (∀ xD, p ( x )) ≡ ∃ xD,p ( x ) ∼ (∃ xD, p ( x )) ≡ ∀ xD,p ( x )

Negation of a universal statement (“all are”) is logically equiv- alent to an existential statement (“there is at least one that is not”) Negation of an existential statement (“some are”) is logically equivalent to a universal statement (“all are not”) Methods Two methods to avoid errors while finding negations:

  1. Write the statements formally and then take negations
  2. Ask “What exactly would it mean for the given statement to be false?”

Negation of quantified statements (∼)

Examples ∀ primes p , p is odd Negation: ∃ primes p , p is even ∃ triangle T , sum of angles of T equals 200 ◦ ∀ triangles T , sum of angles of T does not equal 200 ◦ No politicians are honest Formal statement: ∀ politicians x , x is not honest Formal negation: ∃ politician x , x is honest Informal negation: Some politicians are honest 1357 is not divisible by any integer between 1 and 37 Formal statement: ∀ n ∈ [1 , 37], 1357 is not divisible by n Formal negation: ∃ n ∈ [1 , 37], 1357 is divisible by n Informal negation: 1357 is divisible by some integer between 1 and 37

Negation of universal conditional statements

Definition Formally,

∼ (∀ x, p ( x ) → q ( x )) ≡ ∃ x, ∼ ( p ( x ) → q ( x )) ≡ ∃ x, ( p ( x )∧ ∼ q ( x ))

Examples ∀ real x , if x > 10 , then x^2 > 100. Negation: ∃ real x such that x > 10 and x^2 ≤ 100. If a computer program has more than 100,000 lines, then it contains a bug. Negation: There is at least one computer program that has more than 100,000 lines and does not contain a bug.