0% found this document useful (0 votes)
19 views111 pages

Logic and Proofs: Foundations of Reasoning

Chapter 1 covers the fundamentals of logic and proofs, including propositional logic, logical operators, and methods of proof. It introduces key concepts such as propositions, truth tables, implications, and logical equivalences. The chapter also discusses the laws of logic and their applications in mathematical reasoning.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views111 pages

Logic and Proofs: Foundations of Reasoning

Chapter 1 covers the fundamentals of logic and proofs, including propositional logic, logical operators, and methods of proof. It introduces key concepts such as propositions, truth tables, implications, and logical equivalences. The chapter also discusses the laws of logic and their applications in mathematical reasoning.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CHAPTER 1

Logic and Proofs

1
CONTENT

1.1 Logic

1.2 Propositional Equivalences

1.3 Predicates and Quantifiers

1.4 Methods of Proofs


1.1 Logic
Logic is used to give a precise meaning to statements
made in a mathematical system. We will study the rules
and components of logical statements to gain a deeper
understanding of reasoning in mathematics.

1.1.1 Propositions
1.1.2 Fundamental Logical Operators
1.1.3 Implications
1.1.4 Precedence of Logical Operators
1.1.5 Logic and Bit Operations
3
1.1.1 Propositions
A proposition is a declarative statement that not
is either TRUE or FALSE both!
but not both.
Examples.
Washington, D.C. is the capital of the US TRUE

1+1=2 TRUE

2+2=3 FALSE

• We use letters to denote propositions such as p, q, r, and s.


• We denote the truth value of a proposition as T (true) or F (false).
A proposition is a declarative statement that
is either TRUE or FALSE. not
both!

These are NOT propositions:


Study hard!! (Imperative sentence)

Do you like Discrete Structures? (Question sentence)

3+2
x+y=z
Exercise. Which of these sentences are propositions?
What are the truth values of those that are propositions?
a) Paris is the capital of France.
b) The sun rises in the west.
c) 2 + 3 = 5.
d) x + 7 = 10.
e) x2 + 1 >0.
f ) Answer this question.
g) Do not pass go.
h) What time is it?
1.1.2 Fundamental Logical Operators
Suppose p is a proposition. The negation of p is written
p and has meaning:
“It is not the case that p.”
p is read “NOT p”

Example 1: Let p be “Today is Friday”.


Then ¬p is “Today is not Friday.

Example 2 : Let q be “ 2 > 1”.


Then ¬p is “2 ≤ 1”.
Example. What is the negation of each of these
propositions?
a) An has a smartphone.
b) There is no pollution in HCM City.
c) 2 + 1 = 3.
d) The summer in Vietnam is hot and sunny.
e) Duc and Nam are brothers.
f) There are 13 items in a baker’s dozen.
g) Vy sent more than 100 text messages every day.
Definition. A truth table displays the relationship
between the truth values of propositions.

They are useful as a visual display for the workings of a


logical operator such as ¬, and can also be used to
determine the truth value of a compound proposition
based on the truth values of its component propositions

p p
Truth table for negation: T F
F T
Conjunction: p  q corresponds to English “and.”
Proposition p  q is true when p and q are both true.

Example. Let p be “Today is Tuesday” and q be “Classes


are cancelled”.
Then p  q is the proposition “Today is Tuesday and
classes are cancelled”.

Truth table for conjunction: p q pq


T T T
T F F
F T F
F F F
Example. Determine whether these statements are true or
false.
a) 3 > 4 and Paris is the capital of France
b) 2 is an even and prime number
c) An is drinking water and singing a song
d) 32> 9 and the sun rises in the west
Disjunction: p  q corresponds to English “OR”
Proposition p  q is true when p or q (or both) is true.

Example. The students major in CS or Business can


take this course.

Truth table for disjunction:


p q pq
T T T
T F T
F T T
F F F
Example. Determine whether these statements are true or
false.
a) 3 > 4 or Paris is the capital of France

b) 4 is an even number or 5 is prime number

d) 𝜋 > 4 or the sun rises in the west


Exclusive Or: p  q corresponds to English
“either…or… (but not both)”
Proposition p  q is true when p or q (but not both) is
true.

Truth table for exclusive or:


p q pq
T T F
T F T
F T T
F F F
1.1.3 Implications
Implication (Conditional Statements) : p → q corresponds
to English “if…then…”
Proposition p → q is false when p is true and q is false; it is
true otherwise
Example. If it is sunny, then I will go to the beach.
If 2 = 1 then Descartes and Pascal are one person.

p q p→q
T T T
Truth table for implication:
T F F
F T T
F F T
Example. Determine whether each of these conditional
statements is true or false.
a) If 1 + 1 = 2, then 2 + 2 = 5.
b) If 1 + 1 = 3, then 2 + 2 = 4.
c) If 1 + 1 = 3, then 2 + 2 = 5.
d) If monkeys can fly, then 1 + 1 = 3.
e) If 1 + 1 = 3, then dogs can fly.
f) If 1 + 1 = 2, then dogs can fly.
g) If 2 + 2 = 4, then 1 + 2 = 3.
There are a number of ways to indicate or express an
implication in a mathematical statement:
p→q
“if p, then q” “p implies q”
“if p, q” “p only if q”
“p is sufficient for q” “q whenever p”
“q if p” “q is necessary for p”
“q when p” “q follows from p”
Ex. Let p and q be the propositions
p :You drive over 65 miles per hour.
q :You get a speeding ticket.
Write these propositions using p and q and logical connectives (including
negations).
a) You do not drive over 65 miles per hour.
b) You drive over 65 miles per hour, but you do not get a speeding ticket.
c) You will get a speeding ticket if you drive over 65 miles per hour.
d) If you do not drive over 65 miles per hour, then you will not get a
speeding ticket.
e) Driving over 65 miles per hour is sufficient for getting a speeding ticket.
f ) You get a speeding ticket, but you do not drive over 65 miles per hour.
g) Whenever you get a speeding ticket, you are driving over 65 miles per
hour.
The implication can be reduced to the other
fundamental logical operators.
Example. Consider the truth tables of p → q and p  q

p q p→q p p  q
T T T F T
T F F F F
F T T T T
F F T T T

They are the same


Biconditional: p  q corresponds to English “… if
and only if”
p  q is true when p and q have the same truth
value; it is false otherwise.

Example. It is cloudy if and only if it is raining.


You can take the flight if and only if you hold
a ticket.
Truth table for biconditional:
p q pq
T T T
T F F
F T F
F F T
Ex. Determine whether these biconditionals are true or
false.
a) 2 + 2 = 4 if and only if 1 + 1 = 2.
b) 1 + 1 = 2 if and only if 2 + 3 = 4.
c) 1 + 1 = 3 if and only if monkeys can fly.
d) 0 > 1 if and only if 2 > 1.
There are a number of ways to indicate or express an
biconditional statement:

pq

“p is necessary and sufficient for q”

“if p then q, and conversely”

“p iff q.”
These propositions are logically equivalent.

Definition. If p and q are propositions, then we say that


p is equivalent to q if their truth tables are the same.
If p is equivalent to q, then we write p  q.

▪Thus p → q  p  q

▪ We will, in the following, substitute any proposition


by an equivalent proposition as many times as we like
Another equivalent proposition of p → q is its
Contrapositive q → p

➢ We can verify easily that the contrapositives


propositions p → q and q → p have the same the
truth tables
Example. “If it is noon, then I am hungry.”
“If I am not hungry, then it is not noon.”

◼ Note that p → q is not equivalent to its converse q → p


Example. “If it is noon, then I am hungry.”
is NOT equivalent to
“If I am hungry, then it is noon.”
➢ Neither is it equivalent to its inverses: p → q

Example. “If it is noon, then I am hungry.”


is NOT equivalent to
“If it is not noon, then I am not hungry.
◼However the converses q → p and the inverses
 p →  q are equivalent to each other because
 p →  q is precisely the contrapositive of q → p

Example. “If I am hungry, then it is noon”


is equivalent to
“If it is not noon, then I am not hungry”
Example. What are the contrapositive, the converse, and
the inverse of the conditional statement
“The home team wins whenever it is raining?”

Solution. The statement can be rewritten as


“If it is raining, then the home team wins.”

Contrapositive:
“If the home team does not win, then it is not raining.”

Converse:
“If the home team wins, then it is raining.”

Inverse is
“If it is not raining, then the home team does not win.”
1.1.4 Precedence of Logical Operators
➢ In a compound proposition with several logical operators,
we have to use parentheses ( ) to specify their order of
execution.
➢ However to reduce the number of parentheses used we
adopted the following precedence convention.
Operator Precedence
Ex. p  q  r means (p  q)  r  1
 2
rather than p  (q  r)
 3
p  q → r means (p  q) → r → 4
 5
Example. Construct a truth table for the compound
propositions pq →r
p q r pq p q →r
F F F F T
F F T F T
F T F T F
F T T T T
T F F T F
T F T T T
T T F T F
T T T T T

Exercise. Construct a truth table for the compound


propositions (p  q ) r →p
1.1.5 Bit Operations
◼ We can use a bit to represent a truth value: bit 1 for true
and bit 0 for false.
◼ A Boolean variable has value either true or false, and
can be represented by a bit.
◼ By replacing true by 1 and false by 0 in the truth tables
of logical operators, we obtain the corresponding tables
for bit operations.

Example. 1  1 = 1 10=1 11=0 1 = 0


10=0 00=0 10=1 0 = 1
The operators  ,  ,  and  are also denoted by NOT,
AND, OR and XOR
Definition. A bit string is a sequence of 0 or 1 bits. The
length of a bit string is the number of bits in the string.

◼ The bitwise AND, OR and XOR of two strings of the


same length is the string whose bits are the AND, OR
and XOR of the corresponding bits of the two strings

Example. The bitwise AND, OR and XOR of


01 1001 0110
and 11 0001 1101 are:

AND : 01 0001 0100


OR : 11 1001 1111
XOR : 10 1000 1011
Ex 44p16. Evaluate each of these expressions.
a) 1 1000 ∧ (0 1011 ∨ 1 1011)
b) (0 1111 ∧ 1 0101) ∨ 0 1000
c) (0 1010 ⊕ 1 1011) ⊕ 0 1000
d) (1 1011 ∨ 0 1010) ∧ (1 0001 ∨ 1 1011)
1.2 Propositional Equivalences

1.2.1 Logical Equivalence


1.2.2 The Laws of Logic
1.2.1 Logical Equivalence
Recall that
The propositions p and q are logically equivalent if they
have the same truth tables. We also write p  q.

A tautology (denoted by T) is a compound proposition that


is always true.

A contradiction (denoted by F) is a compound proposition


that is always false.

Thus p and q are logical equivalent if and only if p  q is a


tautology
1.2.2 The Laws of Logic
Following are the Laws of Logic which can be expressed
via logical equivalences
◼ Identity pTp
pFp
p T pT
◼ Domination pTT
T T T
pFF
F T F
◼ Idempotent ppp
ppp
◼ Double negation (p)  p

◼Negation ppT
p  p  F
◼Commutativity pqqp
pqqp

◼Associativity (p  q)  r  p  (q  r)
(p  q)  r  p  (q  r)

◼Distributivity p  (q  r)  (p  q)  (p  r)

p  (q  r)  (p  q)  (p  r)

◼ DeMorgan’s (p  q)  p  q
(p  q)  p  q

◼ Absorption p  (p  q)  p
p  (p  q)  p
Proofs of some famous Equivalences
➢ Distributivity p  (q  r)  (p  q)  (p  r)

p q r qr p  (q  r) pq pr (p  q)  (p  r)

T T T T T T T T
T T F F T T T T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F F F T F F
F F T F F F T F
F F F F F F F F
➢ DeMorgan’s (p  q)  p  q

p q p q p  q pq (p  q)

T T F F F T F
T F F T F T F
F T T F F T F
F F T T T F T
➢ DeMorgan’s (p  q)  p  q

( p   q)  p  q DeMorgan’s for  p and  q

pq Double negation

Therefore

(p  q)  (p  q)

 p  q Double negation
➢ Show that [p  (p → q)] → q is a tautology.
➢ We apply the Laws of Logic in each steps.

[p  (p → q)] → q
 [p  (p  q)] → q substitution for →
 [(p  p)  (p  q)] → q distributivity
 [ F  (p  q)] → q negation
 (p  q) → q identity
 (p  q)  q substitution for →
 (p  q)  q DeMorgan’s
 p  (q  q ) associativity
 p  T negation

T domination
The following logical equivalences involving
implications can be checked using the Laws of Logic

• p→qq→p

•  (p → q)  p   q

• (p → q)  ( p → r)  p → (q  r)

• (p → r)  ( q → r)  (p  q) → r

• (p → q)  ( p → r)  p → (q  r)

• (p → r)  ( q → r)  (p  q) → r
➢ We also have logical equivalences involving
Biconditionals

p  q  (p → q)  (q → p)

pqpq

p  q  (p  q)  ( p   q)

 (p  q)  p   q

Exercise. Show that ( p → r) ∧ (q → r) and (p → q) → r


are logically equivalent.

Exercise. Show that (p →q)∧[ q (q → r) and  q   p


are logically equivalent.
1.3 Predicates and Quantifiers

1.3.1 Predicates

1.3.2 Quantifiers

1.3.3 Negations

1.3.4 Biding Variables


1.3.1 Predicates
➢ We will now discuss the area of predicate logic. Predicate
logic builds on propositional logic by introducing
quantifiers to handle special types of “variables” in a
mathematical statement.
➢ With quantifiers and predicates, we can express a great
deal more than we could using propositional logic.
Example. Which statements are propositions:
YES
➢ Tuan loves ice cream.

➢ X loves ice cream. NO

➢ Everyone loves ice cream. YES

➢ Someone loves ice cream. YES


Example. Which statements are propositions:
3+2=5 YES

X+2=5 NO

X + 2 = 5 for any choice of X in {1, 2, 3}


YES

X + 2 = 5 for some X in {1, 2, 3}


YES
Proposition, YES or NO?

12 > 4 YES

X>4 NO

X > 4 for any choice of X in {3, 4, 5} YES

X > 4 for some X in {1, 2, 3} YES


The efficiency of Predicates.
An eats pizza at least once a week.
Binh eats pizza at least once a week.
Ha eats pizza at least once a week.
Minh eats pizza at least once a week.
Thu eats pizza at least once a week.
Huy eats pizza at least once a week.
Viet eats pizza at least once a week.
An eats pizza at least once a week.
…………………………………….
…………………………………….
…………………………………….
Define:
P(x) = “x eats pizza at least once a week.”
Universe of Discourse - x is a student in Discrete
Math class
➢ Note that P(x) is not a proposition, P(Thinh) is.
The efficiency of Predicates.
Definition. A predicate, or propositional function, is a
function defined on a set U and returns a proposition
as its value.
The set U is called the universe of discourse.

◼ We often denote a predicate by P(x)

◼ Note that P(x) is not a proposition, but P(a) where a is


some fixed element of U is a proposition with well
determined truth value
Predicates
Example. Let Q(x,y) = “x > y”
Which statements are propositions:
Q(x,y) NO

Q(3,4) YES

Q(x,9) NO

Q(x,y) is a predicates in two free variables x


and y in R (real numbers)
1.3.2 Quantifiers
The universal quantifier
Let P(x) be a predicate on some universe of discourse U.
➢ One way to obtain a proposition from P(x) is to substitute
x by a fixed element of U.
➢ Another way to obtain a proposition from P(x) is to use
the universal quantifier.
Consider the statement:
“P(x) is true for all x in the universe of discourse.”
- We write it x P(x) and say “for all x, P(x) ”
- The symbol  is the universal quantifier.
The universal quantifier
Let P(x) be a predicate on some universe of discourse U.

Consider the statement


“P(x) is true for all x in the universe of discourse.”
We write it x P(x), and say “for all x, P(x) ”

The proposition x P(x) is called the universal


quantification of the predicate P(x). It is
- TRUE if P(a) is true when we substitute x by any
element a in U
- FALSE if there is an element a in U for which P(a) is
false.
Examples.

➢ Let P(x) be the predicate x + 1 > x, where the


universe of discourse are the real numbers.
Then x P(x) is a TRUE proposition because for all real
number x , x + 1 is always greater than x

➢ Let Q(x) be the predicate x < 1, where the universe of


discourse are the real numbers.
Then x Q(x) is a FALSE proposition because we can
find a real number, say 3 such that 3 < 1 is a FALSE
proposition.
In the special case that the universe of discourse, U, is
finite, say U = {x1, x2, x3, …, xn}. Then

x P(x)

corresponds to the proposition:

P(x1)  P(x2)  …  P(xn)

We can write a program to loop through the elements in


the universe and check each for truthfulness. If all are
true, then the proposition is true. Otherwise it is false!
The existential quantifier
Yet another way of changing a predicate into a
proposition.
Let P(x) is a predicate on some universe of discourse.
The existential quantification of P(x) is the proposition:
“There exists an element x in the universe of
discourse such that P(x) is true.”
We write it x P(x), and say “for some x, P(x)”
 is called the existential quantifier

▪ x P(x) is FALSE if P(x) is false for every single x.


▪ x P(x) is TRUE if there is an a for which P(a) is true.
Examples.

➢ Let P(x) be the predicate x > 3, where the universe of


discourse are the real numbers.
Then  x P(x) is a TRUE proposition because we can
find a real number, say 4 such that 4 > 3 is a TRUE
proposition

➢ Let Q(x) be the predicate x = x + 1, where the


universe of discourse are the real numbers.
Then  x Q(x) is a FALSE proposition because for all
real number x , x and x + 1 are distinct real numbers.
In the special case that the universe of discourse, U, is
finite, say U = {x1, x2, x3, …, xn}. Then
x P(x)

corresponds to the proposition:

P(x1)  P(x2)  …  P(xn)

We can write a program to loop through the elements in


the universe and check each for truthfulness.

The program will stop when we find an element xi such


that P(xi) is true. In this case the Proposition is true.

Otherwise, it is false
Ex 11/53 Let P(x) be the statement “x =x2.” If the domain
consists of the integers, what are these truth values?
a) P(0) b) P(1) c) P(2)
d) P(−1) e) ∃xP(x) f ) ∀xP(x)

Ex 13/53. Determine the truth value of each of these


statements if the domain consists of all integers.
a) ∀n(n + 1 > n) b) ∃n(2n = 3n)
c) ∃n(n = −n) d) ∀n(3n ≤ 4n)
Predicates - not so boring examples
Suppose the universe of discourse is all creatures,
and define the following:
L(x) = “x is a lion.”
F(x) = “x is fierce.”
C(x) = “x drinks coffee.”

All lions are fierce. x (L(x) → F(x))

Some lions don’t drink coffee. x (L(x)  C(x))


Some fierce creatures don’t drink coffee.
x (F(x)  C(x))
Ex 7/53 Translate these statements into English, where
C(x) is “x is a comedian” and
F(x) is “x is funny”
and the domain consists of all people.
a) ∀x(C(x) → F(x))

b) ∀x(C(x) ∧ F(x))

c) ∃x(C(x) → F(x))

d) ∃x(C(x) ∧ F(x))
a) ∀x(C(x) → F(x))
All comedians are funny
b) ∀x(C(x) ∧ F(x))
Every person is funny and a comedian.
c) ∃x(C(x) → F(x))
There exists a person such that if this person is a
comedian then this person is funny
d) ∃x(C(x) ∧ F(x))
There is a person who is a comedian and funny
Ex 9 /53 Let
P(x) = “x can speak Russian” and let
Q(x) =“x knows the computer language C++.”
Express each of these sentences in terms of P(x), Q(x),
quantifiers, and logical connectives. The domain for quantifiers
consists of all students at your school.
a) There is a student at your school who can speak Russian
and who knows C++.
b) There is a student at your school who can speak Russian
but who doesn’t know C++.
c) Every student at your school either can speak Russian or
knows C++.
d) No student at your school can speak Russian or knows
C++.
a) There is a student at your school who can speak Russian
and who knows C++.
∃x (P(x) ∧ Q(x))

b) There is a student at your school who can speak Russian


but who doesn’t know C++.
∃x (P(x) ∧  Q(x))
c) Every student at your school either can speak Russian or
knows C++.
∀x (P(x)  Q(x))

d) No student at your school can speak Russian or knows


C++.
(∃x (P(x)  Q(x)))
Ex 25/54. Translate each of these statements into logical
expressions using predicates, quantifiers, and logical
connectives.
a) No one is perfect.
b) Not everyone is perfect.
c) All your friends are perfect.
d) At least one of your friends is perfect.
a) No one is perfect.

¬∃x (P(x))

b) Not everyone is perfect.

¬∀x(P(x))

c) All your friends are perfect.

∀x (F (x) → P (x))

d) At least one of your friends is perfect.

∃x (F(x) ∧ P(x))
1.3.3 Negations
Another:
B(x) = “x is a hummingbird.”
L(x) = “x is a large bird.”
H(x) = “x lives on honey.”
R(x) = “x is richly colored.”
x (B(x) → R(x))
All hummingbirds are richly colored.

No large birds live on honey. x (L(x)  H(x))

Birds that do not live on


honey are dully colored. x (H(x) → R(x))
No large birds live on honey. x (L(x)  H(x))

x P(x) means “P(x) is true for every x.”

What about x P(x) ?


Not[“P(x) is true for every x.”]
“There is an x for which P(x) is not true.”
x P(x)
So, x P(x) is the same as x P(x).
Predicates - quantifier negation
No large birds live on honey. x (L(x)  H(x))

x P(x) means “P(x) is true for some x.”


What about x P(x) ?
Not[“P(x) is true for some x.”]
“P(x) is not true for all x.”
x P(x)
So, x P(x) is the same as x P(x).
No large birds live on honey. x (L(x)  H(x))

So, x P(x) is the same as x P(x).


and, x P(x) is the same as x P(x).

General rule: to negate a quantification,


➢ move negation () to the right,
➢ change the quantifier from  to , and from  to .
No large birds live on honey.

x (L(x)  H(x))  x (L(x)  H(x)) Negation rule

 x (L(x)  H(x)) DeMorgan’s

 x (L(x) → H(x)) Subst for →

Large birds do not live on honey.


Ex 33/54. Express each of these statements using quantifiers.
Then form the negation of the statement, so that no negation is to
the left of a quantifier. Next, express the negation in simple
English. (Do not simply use the phrase “It is not the case that.”)
a) Some old dogs can learn new tricks.
b) No rabbit knows calculus.
c) Every bird can fly.
d) There is no dog that can talk.
e) There is no one in this class who knows French and Russian.
a) Some old dogs can learn new tricks.
No dog can learn new tricks
b) No rabbit knows calculus.
Some rabbits know calculus
c) Every bird can fly.
Some birds can not fly
d) There is no dog that can talk.
There exists a dog that can talk
e) There is no one in this class who knows French and Russian.
Someone in this class knows French and Russian
1.3.4 Biding Variables
A variable is bound if it is known or
quantified. Otherwise, it is free.
Examples.
➢ P(x) x is free
➢ P(5) x is bound to 5
➢ x P(x) x is bound by quantifier

Reminder: in a
proposition, all
variables must be
bound.
Predicates - multiple quantifiers
To bind many variables, use many quantifiers.

Example. P(x,y) = “x > y”


➢ x P(x,y) NOT a proposition

◼xy P(x,y) FALSE proposition

◼xy P(x,y) TRUE proposition

◼x P(x, 3) FALSE proposition


Predicates - the meaning of multiple
quantifiers
▪ “xy P(x,y)” means P(x,y) is true for every possible
combination of x and y.
➢ “xy P(x,y)” means P(x,y) is true for some choice of
x and y (together).
➢ “xy P(x,y)” means for every x we can find a
(possibly different) y so that P(x,y) is true.
➢ “xy P(x,y)” means there is (at least one) particular
x for which P(x,y) is always true.

Notice: quantifier order is


not interchangeable!
Example. N(x,y) = “x is sitting next to y”
xy N(x,y) - everyone is sitting next to False
everyone else.

xy N(x,y) - there are two True?


people sitting next to each other.
xy N(x,y) - every person is True?
sitting next to somebody.
xy N(x,y) - a particular person
False
is sitting next to everyone else.
Ex 9/65. Let L(x, y) = “x loves y,” where the domain for both x and y
consists of all people in the world.
Use quantifiers to express each of these statements.
a) Everybody loves Jerry.
b) Everybody loves somebody.
c) There is somebody whom everybody loves.
d) Nobody loves everybody.
e) There is somebody whom Lydia does not love.
f ) There is somebody whom no one loves.
g) There is exactly one person whom everybody loves.
h) There are exactly two people whom Lynn loves.
i) Everyone loves himself or herself.
j) There is someone who loves no one besides himself or herself.
1.4 Rules of Inference

1.4.1 Definitions
1.2.2 Rules of Inference
1.4.3 Fallacies
1.4.4 Rules of Inference and Quantifiers
1.4.5
1.4.1 Definition
An argument in propositional logic is a sequence of
propositions. All but the final proposition in the
argument are called premises and the final
proposition is called the conclusion.

✓“if you have a current password,


then you can log onto the network” premises
✓“you have a current password”

Therefore,
▪ “you can log onto the network” conclusion

81
1.4.2. Rules of Inference
An argument form in propositional logic is a sequence of
compound propositions involving propositional
variables.
p
“if you have a current password,
then you can log onto the network” q
✓ “you have a current password”
Therefore,
“you can log onto the network”
p→q
p
q
82
Valid arguments in propositional logic

An argument is valid if the truth of all its premises


implies that the conclusion is true.

If we have an argument with premises p1, p2, p3,


…………,pn and conclusion q

This argument is valid when


(p1  p2  p3  …………  pn) → q is a tautology

83
We can use a truth table to show that an argument form is
valid. By showing that whenever the premises are true,
the conclusion must also be true.
p→q
p
q

p q p→q (p→q)  p [p(p→q)] →q


F F T F T
F T T F T
T F F F T
T T T T T
84
We can use a truth table to show that an argument form is
valid. By showing that whenever the premises are true,
the conclusion must also be true.

If an argument form involves 10 different propositional


variables, to use truth table, 210=1024 rows are needed.
This is a tedious (long and boring) approach.

85
Instead of using a truth table to show that an argument form
is valid, we can use Rules of inference.
The tautology (p (p→q))→q is the basis of the rule of
inference called Modus Ponens ( or law of detachment-
mode that affirms)
p→q
p
q
The hypotheses are written in a column, followed by
horizontal bar, followed by the  and the conclusion.

86
Terminology
➢A theorem is a statement that can be shown to be true.

➢A lemma is a simple theorem used as an intermediate


result in the proof of another theorem.

➢A corollary is a proposition that follows directly from a


theorem that has been proved.

➢A conjecture is a statement whose truth value is


unknown. Once it is proven, it becomes a theorem.

87
A theorem is a statement that can be shown to be
true.
A proof is the means of doing so.

Axioms, postulates,
hypotheses, & previously
proven theorems
Rules of Inference

Proof
Modus Ponens
I am Luyen.
If I am Luyen, then I am a lecturer of
Mathematics.

 I am a lecturer of Mathematics.
p Inference
tautology: Rule:
p→q
(p  (p → q)) → q Modus
q Ponens
Modus Tollens
I am not a great actor.
If I am Thanh, then I am a great actor.
 I am not Thanh!

q Inference
tautology:
p→q Rule:
(q  (p → q)) → p Modus
 p
Tollens
Addition

I am not a great actor.


 I am not a great actor or I am tall.

Inference
tautology:
p Rule:
p → (p  q)
pq Addition
Conjunction

- I not a great actor.


- I am a lecturer
 I am not a great actor and I am a lecturer.

Inference
tautology:
p Rule:
q p  q → (p  q)
Conjuction
pq
Simplification
I am not a great actor and you are sleepy.
 you are sleepy.

tautology: Inference Rule:


pq
(p  q) → p Simplification
p
Disjunctive Syllogism
I am BM major or CS major.
I am not a BM major.
 I am a CS major!

pq Inference
tautology: Rule:
q
((p  q)  q) → p Disjunctive
p Syllogism
Hypothetical Syllogism
If you are a CS major, then you must pass Math 2215.
If you passed Math 2215, then you are good in logic.
 If you are a CS major, then you are good in logic.

p→q Inference
tautology: Rule:
q→r
((p → q)  (q → r)) → (p → r) Hypothetical
p→r Syllogism
Rule of Inference Tautology Name
p p→pq Addition
pq
pq pq→p Simplification
p
p, q (p)  (q) → p  q Conjunction
pq
p, p → q p  (p → q) → q Modus Ponens
q
q, p → q q  (p → q) → p Modus Tollens
 p
p → q, q → r (p → q)  (q → r) Hypothetical
p→r → (p → r) Syllogism
p  q, p (p  q)  p → q Disjunctive
q Syllogism
Ex 3/78. Which rule of inference is used in each argument
below?
a) Alice is a Math major. Therefore, Alice is either a Math
major or a CS major.
b) Jerry is a Math major and a CS major. Therefore, Jerry is a
Maths major.
c) If it is rainy, then the pool will be closed. It is rainy.
Therefore, the pool is closed.
d) If it snows today, the university will close. The university is
not closed today. Therefore, it did not snow today.
e) If I go swimming, then I will stay in the sun too long. If I
stay in the sun too long, then I will sunburn. Therefore, if I
go swimming, then I will sunburn.
f) I go swimming or eat an ice cream. I did not go swimming.
Therefore, I eat an ice cream.
Using Rules of Inference to Build Arguments
A formal proof of a conclusion C, given premises p1,
p2,…,pn consists of a sequence of steps, each of which
applies some inference rule to premises or to previously-
proven statements (as hypotheses) to yield a new true
statement (the conclusion).

•A proof demonstrates that if the premises are true, then


the conclusion is true (i.e., valid argument).

99
Example.
Show that the hypotheses
“It is not sunny and it is cold (q).”
“we will swim (r) only if it is sunny (p),
“If we do not swim, then we will canoe (s).”
“If we canoe, then we will be home early (t).”
Leads to the conclusion
“We will be home early” t
p  q , r → p, r →s, s → t

100
We can use the truth table
Premises p  q , r → p, r →s, s → t
Conclusion t
Step Reason p  q
1. p  q Hypothesis r→p
2. p Simplification using (1) r →s
3. r → p Hypothesis s→t
4. r Modus Tollens using (2) (3) t
5. r →s Hypothesis
6. s Modus ponens using (4) (5)
7. s → t Hypothesis
8. t Modus ponens using (6) (7)
101
A little proof…
Here’s what you know:
Minh is a BM major or a CS major.
If Minh does not like discrete math, he is not a CS
major.
If Minh likes discrete math, he is smart.
BC
Minh is not a BM major.
D → C
Can you conclude Minh is smart? D→S

 B
1. B  C
2. D → C
3. D → S
4. B

5. C Disjunctive Syllogism (1,4)


6. C → D Contrapositive of 2

7. C → S Hypothetical Syllogism (6,3)

8. S Modus Ponens (5,7)


Minh is smart!
1.4.3 Fallacies
Rules of inference, appropriately applied give
valid arguments.

Mistakes in applying rules of inference are


called fallacies.
If I am Descartes, then I am a mathematician
I am a mathematician!

 I am Descartes
Affirming the
I’m Luyen
conclusion.

((p → q)  q) → p
Fallacies:
Not at tautology.
If you don’t give me $10, I bite your ear.
I bite your ear!
 You didn’t give me $10.

Affirming the
conclusion.

((p → q)  q) → p
Fallacies:
Not at tautology.
If it rains then it is cloudy.
It does not rain.
 It is not cloudy

Denying the
hypothesis.

((p → q)  p) → q
Fallacies:
Not at tautology.
If it is a bicycle, then it has 2 wheels.
It is not a bicycle.
 It doesn’t have 2 wheels.

Denying the Motor


hypothesis. cycle

((p → q)  p) → q
Fallacies:
Not at tautology.
1.4.4. Rules of Inference for Quantified Statements
x P(x) Universal
__________
 P(c) if cU instantiation

P(c) for an arbitrary cU Universal


___________________
 x P(x) generalization

x P(x) Existential
______________________
instantiation
 P(c) for some element cU
P(c) for some element cU Existential
____________________
 x P(x) generalization

109
Rules of Inference for Quantified Statements

Example.

Every US student is a genius.


An is an US student.
Therefore, An is a genius.

U(x): “x is an US student.”
G(x): “x is a genius.”

110
Rules of Inference for Quantified Statements

➢The following steps are used in the argument:


➢Step 1: x (U(x) → G(x)) Hypothesis
➢Step 2: U(An) → G(An) Univ. instantiation
using Step 1
Step 3: U(An) Hypothesis
Step 4: G(An) Modus ponens
using Steps 2 & 3

 x P(x)
__________ Universal
P(c) if cU instantiation

111
Example
Anyone performs well is either intelligent or a good actor.
If someone is intelligent, then he/she can count
from 1 to 10.
Gary performs well.
Gary can only count from 1 to 3.
Therefore, not everyone is both intelligent and a good actor
P(x): x performs well
I(x): x is intelligent
A(x): x is a good actor
C(x): x can count from 1 to 10

112
Hypotheses:
Anyone performs well is either intelligent or a good actor.
x (P(x) → I(x)  A(x))
If someone is intelligent, then he/she can count
from 1 to 10.
x (I(x) → C(x) )
Gary performs well.
P(G)
Gary can only count from 1 to 3.
C(G)
Conclusion: not everyone is both intelligent and a good
actor
x(I(x)  A(x))
113
The following steps are used in the argument:
Step 1: x (P(x) → I(x)  A(x)) Hypothesis
Step 2: P(G) → I(G)  A(G) Univ. Inst. Step 1
Step 3: P(G) Hypothesis
Step 4: I(G)  A(G) Modus ponens Steps 2 & 3
Step 5: x (I(x) → C(x)) Hypothesis
Step 6: I(G) → C(G) Univ. inst. Step5
Step 7: C(G) Hypothesis
Step 8: I(G) Modus tollens Steps 6 & 7
Step 9: I(G)  A(G) Addition Step 8
Step 10: (I(G)  A(G)) Equivalence Step 9
Step 11: x(I(x)  A(x)) Exist. general. Step 10
Step 12: x (I(x)  A(x)) Equivalence Step 11

Conclusion: x (I(x)  A(x)), not everyone is both intelligent and


a good actor.

114

You might also like