Professional Documents
Culture Documents
Topics covered:
Definition
A proposition is a declarative sentence that is either true or false.
Example
Which of the following sentences are propositions?
a. Good job!
b. Hanoi is the capital of Vietnam.
c. What time is it?
d. It is now 8am.
e. 1+7=9.
f. x = 2021.
Definition
A proposition is a declarative sentence that is either true or false.
Example
Which of the following sentences are propositions?
a. Good job!
b. Hanoi is the capital of Vietnam.
c. What time is it?
d. It is now 8am.
e. 1+7=9.
f. x = 2021.
Answer: b, d, e.
Definition
A proposition is a declarative sentence that is either true or false.
Example
Which of the following sentences are propositions?
a. Good job!
b. Hanoi is the capital of Vietnam.
c. What time is it?
d. It is now 8am.
e. 1+7=9.
f. x = 2021.
Answer: b, d, e.
Let p be a proposition.
Definition
Negation ¬p = proposition that is true if p is false, and is false if p is true.
p ¬p
1 0
0 1
Example
If p = ”Today is not Monday”, then ¬p = ”Today is Monday”.
Example
Let p be the proposition ”Nam is a FPT student” and q be the proposition
”Nam is clever”. Then
Example
Let p be the proposition ”Nam is a FPT student” and q be the proposition
”An is clever”. Then
p q p⊕q
1 1 0
1 0 1
0 1 1
0 0 0
Example
”The window is open or the window is closed.” is a logical operation
exclusive or.
Example
p =”You pass this class”, q =”You miss more than 20% of lectures”.
”You can not pass this class if you miss more than 20% of lectures.”=
q → ¬p.
ThienNV (FPTU) Chapter 1. Logic and Proofs 9/1
Definition
p q p→q
Conditional statement p → q = 1 1 1
proposition that is false when p is true 1 0 0
and q is false, and is true otherwise. 0 1 1
0 0 1
Several ways express p → q:
If p then q
q if p
p is sufficient for q
q is a necessary condition for p
p only if q
Example
p =”You pass this class”, q =”You miss more than 20% of lectures”.
”You can not pass this class if you miss more than 20% of lectures.”=
q → ¬p.
ThienNV (FPTU) Chapter 1. Logic and Proofs 9/1
Definition
p q p↔q
Biconditional statement p ↔ q = 1 1 1
proposition that is true when p and
1 0 0
q have the same truth values, and is
0 1 0
false otherwise.
0 0 1
Example
Translate the sentence ”I watch soccer if and only if Manchester United
plays or I have no homework.” if
p = ”I watch soccer”,
q = ”Manchester United plays”,
r = ”I have no homework”.
Answer: p ↔ (q ∨ r ).
NOT = ¬: ¬1 = 0, ¬0 = 1.
AND = ∧: 1 ∧ 1 = 1, 1 ∧ 0 = 0 ∧ 1 = 0 ∧ 0 = 0.
OR = ∨: 1 ∨ 1 = 1 ∨ 0 = 0 ∨ 1 = 1, 0 ∨ 0 = 0.
XOR = ⊕: 1 ⊕ 1 = 0 ⊕ 0 = 0, 1 ⊕ 0 = 0 ⊕ 1 = 1.
Example
NOT = ¬: ¬1 = 0, ¬0 = 1.
AND = ∧: 1 ∧ 1 = 1, 1 ∧ 0 = 0 ∧ 1 = 0 ∧ 0 = 0.
OR = ∨: 1 ∨ 1 = 1 ∨ 0 = 0 ∨ 1 = 1, 0 ∨ 0 = 0.
XOR = ⊕: 1 ⊕ 1 = 0 ⊕ 0 = 0, 1 ⊕ 0 = 0 ⊕ 1 = 1.
Example
Definition
A compound proposition is called a
tautology if it is always true regardless of the truth values of the
propositions that occur in it.
contradiction if it is always false.
contingency if it is neither tautology nor contradiction.
Two compound propositions p and q are logically equivalent if the
biconditional statement p ↔ q is a tautology, denoted by p ≡ q.
p q ¬p p→q ¬p ∨ q
1 1 0 1 1
p q ¬p p→q ¬p ∨ q
1 1 0 1 1
1 0 0 0 0
p q ¬p p→q ¬p ∨ q
1 1 0 1 1
1 0 0 0 0
0 1 1 1 1
p q ¬p p→q ¬p ∨ q
1 1 0 1 1
1 0 0 0 0
0 1 1 1 1
0 0 1 1 1
p q ¬p p→q ¬p ∨ q
1 1 0 1 1
1 0 0 0 0
0 1 1 1 1
0 0 1 1 1
p → q ≡ ¬p ∨ q
p ↔ q ≡ (p → q) ∧ (q → p)
p → q ≡ ¬p ∨ q
p ↔ q ≡ (p → q) ∧ (q → p)
p ⊕ q ≡ ¬(p ↔ q)
p → q ≡ ¬p ∨ q
p ↔ q ≡ (p → q) ∧ (q → p)
p ⊕ q ≡ ¬(p ↔ q)
¬(p ↔ q) ≡ ¬p ↔ q ≡ p ↔ ¬q
p → q ≡ ¬p ∨ q
p ↔ q ≡ (p → q) ∧ (q → p)
p ⊕ q ≡ ¬(p ↔ q)
¬(p ↔ q) ≡ ¬p ↔ q ≡ p ↔ ¬q
Example
Show that ¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬q.
p → q ≡ ¬p ∨ q
p ↔ q ≡ (p → q) ∧ (q → p)
p ⊕ q ≡ ¬(p ↔ q)
¬(p ↔ q) ≡ ¬p ↔ q ≡ p ↔ ¬q
Example
Show that ¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬q.
¬(p ∨ (¬p ∧ q))
We have
p → q ≡ ¬p ∨ q
p ↔ q ≡ (p → q) ∧ (q → p)
p ⊕ q ≡ ¬(p ↔ q)
¬(p ↔ q) ≡ ¬p ↔ q ≡ p ↔ ¬q
Example
Show that ¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬q.
¬(p ∨ (¬p ∧ q))
≡ ¬p ∧ [¬(¬p ∧ q)]
We have
p → q ≡ ¬p ∨ q
p ↔ q ≡ (p → q) ∧ (q → p)
p ⊕ q ≡ ¬(p ↔ q)
¬(p ↔ q) ≡ ¬p ↔ q ≡ p ↔ ¬q
Example
Show that ¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬q.
¬(p ∨ (¬p ∧ q))
≡ ¬p ∧ [¬(¬p ∧ q)]
≡ ¬p ∧ [¬(¬p) ∨ ¬q]
We have
p → q ≡ ¬p ∨ q
p ↔ q ≡ (p → q) ∧ (q → p)
p ⊕ q ≡ ¬(p ↔ q)
¬(p ↔ q) ≡ ¬p ↔ q ≡ p ↔ ¬q
Example
Show that ¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬q.
¬(p ∨ (¬p ∧ q))
≡ ¬p ∧ [¬(¬p ∧ q)]
≡ ¬p ∧ [¬(¬p) ∨ ¬q]
We have ≡ ¬p ∧ (p ∨ ¬q)
p → q ≡ ¬p ∨ q
p ↔ q ≡ (p → q) ∧ (q → p)
p ⊕ q ≡ ¬(p ↔ q)
¬(p ↔ q) ≡ ¬p ↔ q ≡ p ↔ ¬q
Example
Show that ¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬q.
¬(p ∨ (¬p ∧ q))
≡ ¬p ∧ [¬(¬p ∧ q)]
≡ ¬p ∧ [¬(¬p) ∨ ¬q]
We have ≡ ¬p ∧ (p ∨ ¬q)
≡ (¬p ∧ p) ∨ (¬p ∧ ¬q)
p → q ≡ ¬p ∨ q
p ↔ q ≡ (p → q) ∧ (q → p)
p ⊕ q ≡ ¬(p ↔ q)
¬(p ↔ q) ≡ ¬p ↔ q ≡ p ↔ ¬q
Example
Show that ¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬q.
¬(p ∨ (¬p ∧ q))
≡ ¬p ∧ [¬(¬p ∧ q)]
≡ ¬p ∧ [¬(¬p) ∨ ¬q]
We have ≡ ¬p ∧ (p ∨ ¬q)
≡ (¬p ∧ p) ∨ (¬p ∧ ¬q)
≡ 0 ∨ (¬p ∧ ¬q)
p → q ≡ ¬p ∨ q
p ↔ q ≡ (p → q) ∧ (q → p)
p ⊕ q ≡ ¬(p ↔ q)
¬(p ↔ q) ≡ ¬p ↔ q ≡ p ↔ ¬q
Example
Show that ¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬q.
¬(p ∨ (¬p ∧ q))
≡ ¬p ∧ [¬(¬p ∧ q)]
≡ ¬p ∧ [¬(¬p) ∨ ¬q]
We have ≡ ¬p ∧ (p ∨ ¬q)
≡ (¬p ∧ p) ∨ (¬p ∧ ¬q)
≡ 0 ∨ (¬p ∧ ¬q)
≡ (¬p ∧ ¬q).
p → q ≡ ¬p ∨ q
p ↔ q ≡ (p → q) ∧ (q → p)
p ⊕ q ≡ ¬(p ↔ q)
¬(p ↔ q) ≡ ¬p ↔ q ≡ p ↔ ¬q
Example
Show that ¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬q.
¬(p ∨ (¬p ∧ q))
≡ ¬p ∧ [¬(¬p ∧ q)]
≡ ¬p ∧ [¬(¬p) ∨ ¬q]
We have ≡ ¬p ∧ (p ∨ ¬q)
≡ (¬p ∧ p) ∨ (¬p ∧ ¬q)
≡ 0 ∨ (¬p ∧ ¬q)
≡ (¬p ∧ ¬q).
Example
Let x represent an integer. Determine the truth value of the following
propositions
a. ∀x ((x ≥ 0) → (x 2 ≥ 0)) is True.
b. ∀x ((x ≥ 0) ↔ (x 2 ≥ 0))
Example
Let x represent an integer. Determine the truth value of the following
propositions
a. ∀x ((x ≥ 0) → (x 2 ≥ 0)) is True.
b. ∀x ((x ≥ 0) ↔ (x 2 ≥ 0)) is False.
c. ∃x (x 2 = 16)
Example
Let x represent an integer. Determine the truth value of the following
propositions
a. ∀x ((x ≥ 0) → (x 2 ≥ 0)) is True.
b. ∀x ((x ≥ 0) ↔ (x 2 ≥ 0)) is False.
c. ∃x (x 2 = 16) is True.
d. ∃x (x 3 = 16)
ThienNV (FPTU) Chapter 1. Logic and Proofs 19 / 1
Quantifiers: ∀, ∃
Definition
Let P(x ) be a propositional function where x gets values in a particular
domain.
The universal quantification ∀xP(x ) = For all values of x in the domain,
P(x ) is true.
The existential quantification ∃xP(x ) = There is at least a value of x in
the domain such that P(x ) is true.
Example
Let x represent an integer. Determine the truth value of the following
propositions
a. ∀x ((x ≥ 0) → (x 2 ≥ 0)) is True.
b. ∀x ((x ≥ 0) ↔ (x 2 ≥ 0)) is False.
c. ∃x (x 2 = 16) is True.
d. ∃x (x 3 = 16) is False.
ThienNV
2 (FPTU) Chapter 1. Logic and Proofs 19 / 1
Quantifiers: ∀, ∃
Definition
Let P(x ) be a propositional function where x gets values in a particular
domain.
The universal quantification ∀xP(x ) = For all values of x in the domain,
P(x ) is true.
The existential quantification ∃xP(x ) = There is at least a value of x in
the domain such that P(x ) is true.
Example
Let x represent an integer. Determine the truth value of the following
propositions
a. ∀x ((x ≥ 0) → (x 2 ≥ 0)) is True.
b. ∀x ((x ≥ 0) ↔ (x 2 ≥ 0)) is False.
c. ∃x (x 2 = 16) is True.
d. ∃x (x 3 = 16) is False.
ThienNV
2 (FPTU) Chapter 1. Logic and Proofs 19 / 1
Quantifiers: ∀, ∃
Definition
Let P(x ) be a propositional function where x gets values in a particular
domain.
The universal quantification ∀xP(x ) = For all values of x in the domain,
P(x ) is true.
The existential quantification ∃xP(x ) = There is at least a value of x in
the domain such that P(x ) is true.
Example
Let x represent an integer. Determine the truth value of the following
propositions
a. ∀x ((x ≥ 0) → (x 2 ≥ 0)) is True.
b. ∀x ((x ≥ 0) ↔ (x 2 ≥ 0)) is False.
c. ∃x (x 2 = 16) is True.
d. ∃x (x 3 = 16) is False.
ThienNV
2 (FPTU) Chapter 1. Logic and Proofs 19 / 1
Example
Let x represent a real number. Determine the truth value of the following
propositions
a. ∀x (|x | > 0)
b. ∀x (x 2 ≥ x )
c. ∀x ((x 2 > 0) ∨ (x = 0))
d. ∃x ((x > 0) ∧ (x 2 < x ))
e. ∃x ((x > 2) ⊕ (x 2 > 3))
Answer:
Example
Let P(x ) be a propositional function with domain {0, 1, 2}. Then
Example
Let P(x ) be a propositional function with domain {0, 1, 2}. Then
Example
Rewrite the expression ¬∃x (P(x ) → Q(x )) so that the negation precedes
the predicates.
Example
Rewrite the expression ¬∃x (P(x ) → Q(x )) so that the negation precedes
the predicates.
Answer:
Example
Rewrite the expression ¬∃x (P(x ) → Q(x )) so that the negation precedes
the predicates.
Answer:
Example
Rewrite the expression ¬∃x (P(x ) → Q(x )) so that the negation precedes
the predicates.
Answer:
Example
Rewrite the expression ¬∃x (P(x ) → Q(x )) so that the negation precedes
the predicates.
Answer:
Example
Rewrite the expression ¬∃x (P(x ) → Q(x )) so that the negation precedes
the predicates.
Answer:
Example
Translate ”Someone in your class can speak French.” into logical
expression.
(a) If domain consists of all students in your class.
Example
Translate ”Someone in your class can speak French.” into logical
expression.
(a) If domain consists of all students in your class.
Put P(x ) = ”x speaks French”. Then
Example
Translate ”Someone in your class can speak French.” into logical
expression.
(a) If domain consists of all students in your class.
Put P(x ) = ”x speaks French”. Then
”Someone in your class can speak French.” ≡ ∃xP(x ).
(b) If domain consist of all students in FPTU.
Example
Translate ”Someone in your class can speak French.” into logical
expression.
(a) If domain consists of all students in your class.
Put P(x ) = ”x speaks French”. Then
”Someone in your class can speak French.” ≡ ∃xP(x ).
(b) If domain consist of all students in FPTU.
Put P(x ) = ”x speaks French”, Q(x ) = ”x is a member in your class”.
Then
Example
Translate ”Someone in your class can speak French.” into logical
expression.
(a) If domain consists of all students in your class.
Put P(x ) = ”x speaks French”. Then
”Someone in your class can speak French.” ≡ ∃xP(x ).
(b) If domain consist of all students in FPTU.
Put P(x ) = ”x speaks French”, Q(x ) = ”x is a member in your class”.
Then
”Someone in your class can speak French.” ≡ ∃x (Q(x ) ∧ P(x )).
Example
Translate ”Someone in your class can speak French.” into logical
expression.
(a) If domain consists of all students in your class.
Put P(x ) = ”x speaks French”. Then
”Someone in your class can speak French.” ≡ ∃xP(x ).
(b) If domain consist of all students in FPTU.
Put P(x ) = ”x speaks French”, Q(x ) = ”x is a member in your class”.
Then
”Someone in your class can speak French.” ≡ ∃x (Q(x ) ∧ P(x )).
Example
Translate the sentence ”Any student who is planning a trip to Japan will
takes Japanese course” into a logical expression provided that the domain
is the set of all students, P(x ) = ”x is planning a trip to Japan”, Q(x ) =
”x will takes Japanese course”.
Example
Translate the sentence ”Any student who is planning a trip to Japan will
takes Japanese course” into a logical expression provided that the domain
is the set of all students, P(x ) = ”x is planning a trip to Japan”, Q(x ) =
”x will takes Japanese course”.
Answer:
Example
Translate the sentence ”Any student who is planning a trip to Japan will
takes Japanese course” into a logical expression provided that the domain
is the set of all students, P(x ) = ”x is planning a trip to Japan”, Q(x ) =
”x will takes Japanese course”.
Answer:∀x (P(x ) → Q(x )).
Example
Translate the sentence ”Any student who is planning a trip to Japan will
takes Japanese course” into a logical expression provided that the domain
is the set of all students, P(x ) = ”x is planning a trip to Japan”, Q(x ) =
”x will takes Japanese course”.
Answer:∀x (P(x ) → Q(x )).
∀x ∀yP(x , y ) ≡ ∀y ∀xP(x , y )
∃x ∃yP(x , y ) ≡ ∃y ∃xP(x , y )
∀x ∃yP(x , y ) 6≡ ∃y ∀xP(x , y )
∃x ∀yP(x , y ) 6≡ ∀y ∃xP(x , y ).
∀x ∀yP(x , y ) ≡ ∀y ∀xP(x , y )
∃x ∃yP(x , y ) ≡ ∃y ∃xP(x , y )
∀x ∃yP(x , y ) 6≡ ∃y ∀xP(x , y )
∃x ∀yP(x , y ) 6≡ ∀y ∃xP(x , y ).
Example
∀x ∀y [(x < 0) ∧ (y < 0) → (xy > 0)],
where x , y are real numbers.
Answer:
Example
∀x ∀y [(x < 0) ∧ (y < 0) → (xy > 0)],
where x , y are real numbers.
Answer: The product of two negative numbers is positive.
Example
∀x ∀y [(x < 0) ∧ (y < 0) → (xy > 0)],
where x , y are real numbers.
Answer: The product of two negative numbers is positive.
Example
Let L(x , y ) be the statement “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:
Example
∀x ∀y [(x < 0) ∧ (y < 0) → (xy > 0)],
where x , y are real numbers.
Answer: The product of two negative numbers is positive.
Example
Let L(x , y ) be the statement “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. There is somebody whom everybody loves.
Example
∀x ∀y [(x < 0) ∧ (y < 0) → (xy > 0)],
where x , y are real numbers.
Answer: The product of two negative numbers is positive.
Example
Let L(x , y ) be the statement “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. There is somebody whom everybody loves.∃x ∀yL(y , x )
Example
∀x ∀y [(x < 0) ∧ (y < 0) → (xy > 0)],
where x , y are real numbers.
Answer: The product of two negative numbers is positive.
Example
Let L(x , y ) be the statement “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. There is somebody whom everybody loves.∃x ∀yL(y , x )
b. There are exactly two people whom An loves.
Example
∀x ∀y [(x < 0) ∧ (y < 0) → (xy > 0)],
where x , y are real numbers.
Answer: The product of two negative numbers is positive.
Example
Let L(x , y ) be the statement “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. There is somebody whom everybody loves.∃x ∀yL(y , x )
b. There are exactly two people whom An loves.
Example
∀x ∀y [(x < 0) ∧ (y < 0) → (xy > 0)],
where x , y are real numbers.
Answer: The product of two negative numbers is positive.
Example
Let L(x , y ) be the statement “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. There is somebody whom everybody loves.∃x ∀yL(y , x )
b. There are exactly two people whom An loves.
Answer: We have
¬ [∀x ∃y (∃zT (x , y , z) ∧ Q(x , y ))]
Answer: We have
¬ [∀x ∃y (∃zT (x , y , z) ∧ Q(x , y ))]
= ∃x ∀y ¬(∃zT (x , y , z) ∧ Q(x , y ))
Answer: We have
¬ [∀x ∃y (∃zT (x , y , z) ∧ Q(x , y ))]
= ∃x ∀y ¬(∃zT (x , y , z) ∧ Q(x , y ))
= ∃x ∀y [¬(∃zT (x , y , z)) ∨ ¬Q(x , y )]
Answer: We have
¬ [∀x ∃y (∃zT (x , y , z) ∧ Q(x , y ))]
= ∃x ∀y ¬(∃zT (x , y , z) ∧ Q(x , y ))
= ∃x ∀y [¬(∃zT (x , y , z)) ∨ ¬Q(x , y )]
= ∃x ∀y [∀z¬T (x , y , z) ∨ ¬Q(x , y )] .
ThienNV (FPTU) Chapter 1. Logic and Proofs 29 / 1
Negating Nested Quantifiers
¬(∀x ∀yP(x , y )) = ∃x ∃y ¬P(x , y )
¬(∀x ∃yP(x , y )) = ∃x ∀y ¬P(x , y )
¬(∃x ∀yP(x , y )) = ∀x ∃y ¬P(x , y )
¬(∃x ∃yP(x , y )) = ∀x ∀y ¬P(x , y ).
Example
Find the negation of
Answer: We have
¬ [∀x ∃y (∃zT (x , y , z) ∧ Q(x , y ))]
= ∃x ∀y ¬(∃zT (x , y , z) ∧ Q(x , y ))
= ∃x ∀y [¬(∃zT (x , y , z)) ∨ ¬Q(x , y )]
= ∃x ∀y [∀z¬T (x , y , z) ∨ ¬Q(x , y )] .
ThienNV (FPTU) Chapter 1. Logic and Proofs 29 / 1
Example
Translate the statement ” For all real numbers x there is a real number y
such that x = y 3 ” into logical expressions, then find the negation
statement.
Answer:
Definition
An argument is a sequence of statements that end with a conclusion.
An argument is valid if the conclusion follows from the truth of the
preceding statements (premises or hypotheses).
In propositional logic, an argument is valid if it is based on a
tautology.
Arguments that are not based on tautology are called fallacies.
Example
”If 1+1=3 then pig can fly” is valid since 0 → 0 = 1.
”If it is rainy, I will be at home. Today, I am not at home. Hence, it is not
rainy” is valid.
Definition
An argument is a sequence of statements that end with a conclusion.
An argument is valid if the conclusion follows from the truth of the
preceding statements (premises or hypotheses).
In propositional logic, an argument is valid if it is based on a
tautology.
Arguments that are not based on tautology are called fallacies.
Example
”If 1+1=3 then pig can fly” is valid since 0 → 0 = 1.
”If it is rainy, I will be at home. Today, I am not at home. Hence, it is not
rainy” is valid.
1. p ∨ q 2. ¬q 3. p → r 4. s → ¬r
1. p ∨ q 2. ¬q 3. p → r 4. s → ¬r
1. ¬p ∧ q 2. r → p 3. ¬r → s 4. s → t
1. ¬p ∧ q 2. r → p 3. ¬r → s 4. s → t
Example
”If John is a soccer player then John is rich. John only plays volleyball.
Therefore John is not rich.” is a fallacy of denying the hypothesis.
Example
”If John is a soccer player then John is rich. John only plays volleyball.
Therefore John is not rich.” is a fallacy of denying the hypothesis.
”If John is a soccer player then John is rich. John is rich. Therefore John
is a soccer player.” is a fallacy of affirming the conclusion.
Example
”If John is a soccer player then John is rich. John only plays volleyball.
Therefore John is not rich.” is a fallacy of denying the hypothesis.
”If John is a soccer player then John is rich. John is rich. Therefore John
is a soccer player.” is a fallacy of affirming the conclusion.
Section 1.1: 2, 6, 10, 16, 18, 20, 24, 32, 46, 48 (page 13-17)