0% found this document useful (0 votes)
20 views44 pages

DS1 PropositionalLOGIC

Uploaded by

ngodiemquyen69
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)
20 views44 pages

DS1 PropositionalLOGIC

Uploaded by

ngodiemquyen69
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
You are on page 1/ 44

MATHEMATICAL LOGICS- Propositional Logic

MATHEMATICAL
LOGICS-
Propositional Logic

Chapter 1 Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦
MATHEMATICAL LOGICS-
Propositional Logic Contents

Propositional Logic

Logical
Discrete Structures for Computing on January 11, 2024 Equivalences

Exercise
Tran Tuan Anh†,
Nguyen An Khuong†,
Man Nguyen♦
Faculty of Computer Science and Engineering
† University of Technology - VNUHCM
[email protected]
♦ MUSC, Thailand
1.1
MATHEMATICAL LOGICS- Propositional Logic
Contents

MATHEMATICAL
Contents LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦

1 Propositional Logic Contents

Propositional Logic

Logical
Equivalences
2 Logical Equivalences
Exercise

3 Exercise

1.2
MATHEMATICAL LOGICS- Propositional Logic
Contents

MATHEMATICAL
Course outcomes LOGICS-
Propositional Logic
Course learning outcomes Tran Tuan Anh†,
Nguyen An
Khuong†,
L.O.1 Understanding of logic and discrete structures Man Nguyen♦
L.O.1.1 – Describe definition of propositional and predicate logic
L.O.1.2 – Define basic discrete structures: set, map, graph Contents
L.O.2 Represent & model practical problems with discrete structures
Propositional Logic
L.O.2.1 – Logically describe KEY problems in Computing
Logical
L.O.2.2 – Use proving methods: contrapositive, induction Equivalences
L.O.2.3 – Explain problem modeling using discrete structures
Exercise
L.O.3 Understanding of basic probability and random variables
L.O.3.1 – Define basic probability theory
L.O.3.2 – Explain discrete random variables

L.O.4 Compute quantities of discrete structures and probabilities


L.O.4.1 – Operate (compute/ optimize) on discrete structures
L.O.4.2 – Compute probabilities of various events, conditional
ones, Bayes theorem
1.3
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Logic LOGICS-
Propositional Logic

Tran Tuan Anh†,


Definition (Averroes) Nguyen An
Khuong†,
Man Nguyen♦
The tool for distinguishing between the true and the false.
Contents

Propositional Logic
Definition (Penguin Encyclopedia)
Logical
Equivalences
The formal systematic study of the principles of valid
Exercise
inference and correct reasoning.

Definition (Discrete Mathematics - Rosen)


Rules of logic are used to distinguish between valid and
invalid mathematical arguments.

1.4
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Applications in Computer Science LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦

• Design of computer circuits


Contents
• Construction of computer programs Propositional Logic

• Verification of the correctness of programs Logical


Equivalences
• Constructing proofs automatically Exercise

• Artificial intelligence
• Many more...

1.5
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Propositional Logic LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Definition Man Nguyen♦

A proposition is a declarative sentence that is either true or


Contents
false, but not both.
Propositional Logic

Logical
Examples Equivalences

Exercise
• Hanoi is the capital of Vietnam.
• New York City is the capital of USA.
• 1+1=2
• 2+2=3

1.6
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Examples LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Examples (Which of these are propositions?) Khuong†,
Man Nguyen♦

• How easy is logic!


Contents
• Read this carefully. Propositional Logic

• H1 building is in Ho Chi Minh City. Logical


Equivalences
• 4>2 Exercise

• 2n ≥ 100
• The Sun circles the Earth.
• Today is Thursday.
• Proposition only when the time is specified

1.7
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Notations LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦

Contents

Propositional Logic
• Propositions are denoted by p, q, . . .
Logical
• The truth value (”chân trị”) is true (T) or false (F) Equivalences

Exercise

1.8
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Operators LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦

Negation - ”Phủ định”: ¬p


Contents

Propositional Logic

Bảng: Truth Table for Negation Logical


Equivalences

Exercise
p ¬p
T F
F T

1.9
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Operators LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Conjunction - ”Hội”: p ∧ q Disjunction - ”Tuyển”: p ∨ q Khuong†,
Man Nguyen♦
“p and q” “p or q”
Contents

Propositional Logic
p q p∧q p q p∨q
Logical
Equivalences
T T T T T T
Exercise
T F F T F T
F T F F T T
F F F F F F

I’m teaching DM1 and it is We need students who have


raining today. experience in Java or C++.
Tomorrow, I will eat Pho or
Bun bo. 1.10
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Operators LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Exclusive OR - Tuyển loại: Implication - Kéo theo: Man Nguyen♦

p⊕q p→q
“p or q (but not both)” “if p, then q” Contents

Propositional Logic

Logical
Equivalences
p q p⊕q p q p→q
Exercise

T T F T T T
T F T T F F
F T T F T T
F F F F F T

If it rains, the pavement will


be wet.
1.11
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
More Expressions for Implication p → q LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
• if p, then q Man Nguyen♦

• p implies q
Contents
• p is sufficient for q Propositional Logic

• q if p Logical
Equivalences
• p only if q Exercise

• q unless ¬p
• If you get 100% on the final, you will get 10 grade.
• If you feel asleep this afternoon, then 2 + 3 = 5.

1.12
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Conditional Statements From p → q LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦

Contents
• q → p (converse - đảo)
Propositional Logic
• ¬q → ¬p (contrapositive - phản đảo) Logical
Equivalences
• Prove that only contrapositive have the same truth Exercise
table with p → q

1.13
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Exercise Khuong†,
Man Nguyen♦
What are the converse and contrapositive of the following
conditional statement Contents
“If he plays online games too much, his girlfriend leaves Propositional Logic
him.” Logical
Equivalences

• Converse: If his girlfriend leaves him, then he plays Exercise

online games too much.


• Contrapositive: If his girlfriend does not leave him, then
he does not play online games too much.

1.14
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Biconditionals LOGICS-
Propositional Logic

Tran Tuan Anh†,


p↔q Nguyen An
Khuong†,
“p if and only if q” Man Nguyen♦

Contents
p q p↔q
Propositional Logic
T T T Logical
Equivalences
T F F
Exercise
F T F
F F T

• “p is necessary and sufficient for q”.


• “if p then q, and conversely”.
• “p iff q”.
1.15
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
The order of operators LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦

• 1. in the bracket() Contents

• 2. negation ¬ Propositional Logic

Logical
• 3. ∨, ∧, ⊕ Equivalences

Exercise
• 4. →
• 5. ↔

1.16
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Translating Natural Sentences LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦
Exercise
I will buy a new phone only if I have enough money to buy Contents

iPhone 4 or my phone is not working. Propositional Logic

Logical
Equivalences
• p: I will buy a new phone
Exercise
• q: I have enough money to buy iPhone 4
• r: My phone is working

• p → (q ∨ ¬r)

1.17
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Translating Natural Sentences LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦

Contents

Exercise Propositional Logic

Logical
He will not run the red light if he sees the police unless he is Equivalences
too risky. Exercise

1.18
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Construct Truth Table LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Exercise Khuong†,
Man Nguyen♦
Construct the truth table of the compound proposition
(p ∨ ¬q) → (p ∧ q). Contents

Propositional Logic

Logical
Equivalences
p q ¬q p ∨ ¬q p∧q (p ∨ ¬q) → (p ∧ q) Exercise

T T F T T T
T F T T F F
F T F F F T
F F T T F F

1.19
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Exercise - Truth table LOGICS-
Propositional Logic
¬p → (¬q ∨ r)
Tran Tuan Anh†,
Nguyen An
p q r ¬p ¬q ¬q ∨ r ¬p → (¬q ∨ r) Khuong†,
Man Nguyen♦
T T T F F T T
T T F F F F T
T F T F T T T Contents
T F F F T T T Propositional Logic
F T T T F T T
Logical
F T F T F F F Equivalences
F F T T T T T
Exercise
F F F T T T T

a) (p ∧ q) → ¬q
b) (p ∨ r) → (r ∨ ¬p)
c) (p → q) ∨ (q → p)
d) (p ∨ ¬q) ∧ (¬p ∨ q)
e) (p → ¬q) ∨ (q → ¬p)
f) ¬(¬p ∧ ¬q)
g) (p ∨ q) → (p ⊕ q)
h) (p ∧ q) ∨ (r ⊕ q) 1.20
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Applications LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦

• System specifications Contents


• “When a user clicked on Help button, a pop-up will be Propositional Logic

shown up” Logical


Equivalences
• Boolean search
Exercise
• type “dai hoc bach khoa” in Google
• means “dai AND hoc AND bach AND khoa”

1.21
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Applications (cont.) LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦

• Logic puzzles
• There are two kinds of inhabitants on an island, knights, Contents

who always tell the truth, and their opposites, knaves, Propositional Logic

who may lie. You encounter two people A and B. What Logical
Equivalences
are A and B if A says “B is a knight” and B says
Exercise
”The two of us are opposite types”?
• Bit operations
• 101010011 is a bit string of length nine.

1.22
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Tautology and Contradiction LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Definition Khuong†,
Man Nguyen♦
A compound proposition that is always true (false) is called
a tautology - hằng đúng (contradiction - hằng sai). Contents

• Tautology: hằng đúng Propositional Logic

Logical
• Contradiction: mâu thuẫn Equivalences

Exercise

Example

• p ∨ ¬p (tautology)
• p ∧ ¬p (contradiction)

1.23
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Question LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Which of the following is a tautology Man Nguyen♦

Hint: Apply truth table.


Contents
a) (p ∨ q) → (p ∧ q) Propositional Logic

b) (p ∧ q) → (p ∨ q) Logical
Equivalences
c) p → (¬q → p) Exercise

d) p → (p → q)
e) p → (p → p)
f) (p → q) → [(p → r) → (q → r)]

1.24
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Proposition? Truth value? LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
a) “Fansipan is the highest mountain in Vietnam.” Khuong†,
Man Nguyen♦
b) “Two coprime numbers have the only common divisor of 1.”
c) “The product of 3 continuous integers is divisible by 3.”
Contents
d) “Stand up!”
Propositional Logic
e) “x+1=0”
Logical
f) “Hexagons have 8 vertices.” Equivalences

g) “0 is a positive number.” Exercise


h) “The equation: x2 + 5x + 6 = 0 has no root.”
i) “is 2 a prime number?”
j) “The equation mx2 + 2x − 1 = 0 has a single root if and only if m=-1.”
k) “There is a prime that is even.”
l) “x2 + 1 > 0.”

1.25
MATHEMATICAL LOGICS- Propositional Logic
Propositional Logic

MATHEMATICAL
Proposition? Truth value? LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦
m) “When will our class go camping?”
m) “Mercury is not a metal.”
Contents
m) “320 > 230 .”
Propositional Logic
m) “Airplanes are the fastest transport.”
Logical
m) “2002 is a leap year.” Equivalences
m) “There are infinite prime numbers.” Exercise
m) “210 − 1 is divisible by 11.”
m) “No smoking in public place.”
m) “All even positive integer is a summation of 2 prime numbers.”
m) “x is a prime number if it doesn’t have any divisor other than 1 and x.”

1.26
MATHEMATICAL LOGICS- Propositional Logic
Logical Equivalences

MATHEMATICAL
Logical Equivalences LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦

Definition Contents
The compound compositions p and q are called logically Propositional Logic

equivalent if p ↔ q is a tautology, denoted p ≡ q. Logical


Equivalences

Exercise
Example
Show that ¬(p ∨ q) and ¬p ∧ ¬q are logically equivalent.

1.27
MATHEMATICAL LOGICS- Propositional Logic
Logical Equivalences

MATHEMATICAL
Logical Equivalences LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦
p∧T ≡ p Identity laws
p∨F ≡ p Luật đồng nhất Contents

p∨T ≡ T Domination laws Propositional Logic

p∧F ≡ F Luật nuốt Logical


Equivalences

p∨p ≡ p Idempotent laws Exercise

p∧p ≡ p Luật lũy đẳng


¬(¬p) ≡ p Double negation law
Luât phủ định kép

1.28
MATHEMATICAL LOGICS- Propositional Logic
Logical Equivalences

MATHEMATICAL
Logical Equivalences LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
p∨q ≡ q∨p Commutative laws Khuong†,
Man Nguyen♦
p∧q ≡ q∧p Luật giao hoán
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r) Associative laws Contents

(p ∧ q) ∧ r ≡ p ∧ (q ∧ r) Luật kết hợp Propositional Logic

Logical
p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) Distributive laws Equivalences

Exercise
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r) Luật phân phối
¬(p ∧ q) ≡ ¬p ∨ ¬q De Morgan’s law
¬(p ∨ q) ≡ ¬p ∧ ¬q Luật De Morgan
p ∨ (p ∧ q) ≡ p Absorption laws
p ∧ (p ∨ q) ≡ p Luật hút thu

1.29
MATHEMATICAL LOGICS- Propositional Logic
Logical Equivalences

MATHEMATICAL
Logical Equivalences LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Equivalence Man Nguyen♦

p ∨ ¬p ≡ T
Contents
p ∧ ¬p ≡ F Propositional Logic
p→q ≡ ¬p ∨ q Logical
(p → q) ∧ (p → r) ≡ p → (q ∧ r) Equivalences

(p → r) ∧ (q → r) ≡ (p ∨ q) → r Exercise

(p → q) ∨ (p → r) ≡ p → (q ∨ r)
(p → r) ∨ (q → r) ≡ (p ∧ q) → r
p↔q ≡ (p → q) ∧ (q → p)
p↔q ≡ (¬p ∨ q) ∧ (p ∨ ¬q)

1.30
MATHEMATICAL LOGICS- Propositional Logic
Logical Equivalences

MATHEMATICAL
Constructing New Logical Equivalences LOGICS-
Propositional Logic
Example
Tran Tuan Anh†,
Nguyen An
Show that ¬(p ∨ (¬p ∧ q)) and ¬p ∧ ¬q are logically Khuong†,
Man Nguyen♦
equivalent by developing a series of logical equivalences.
Contents
Solution
Propositional Logic

Logical
Equivalences
¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬(¬p ∧ q) by the second De Morgan law
Exercise

≡ ¬p ∧ [¬(¬p) ∨ ¬q] by the first De Morgan law

≡ ¬p ∧ (p ∨ ¬q) by the double negation law

≡ (¬p ∧ p) ∨ (¬p ∧ ¬q) by the second distributive law

≡ F ∨ (¬p ∧ ¬q) because ¬p ∧ p ≡ F

≡ ¬p ∧ ¬q by the identity law for F


1.31
MATHEMATICAL LOGICS- Propositional Logic
Exercise

MATHEMATICAL
Exercise A LOGICS-
Propositional Logic
Negate the following proposition and try to simplify it.
Tran Tuan Anh†,
Nguyen An
Example Khuong†,
Man Nguyen♦
p → (¬q ∧ r)
By using the truth table, we can prove that p → q and Contents
¬p ∨ q are logical equivalence. Propositional Logic

Negate: ¬(p → (¬q ∧ r)) Logical


Equivalences
≡ ¬(¬p ∨ (¬q ∧ r))
Exercise
≡ p ∧ ¬(¬q ∧ r)
≡ p ∧ (q ∨ ¬r)

a) p ∧ (q ∨ r) ∧ (¬p ∨ ¬q ∨ r)
b) (p ∧ q) → r
c) p ∨ q ∨ (¬p ∧ ¬q ∧ r)
d) [[[(p ∧ q) ∧ r] ∨ [(p ∧ r) ∧ ¬r]] ∨ ¬q] → s 1.32
MATHEMATICAL LOGICS- Propositional Logic
Exercise

MATHEMATICAL
Solution LOGICS-
Propositional Logic
a) ¬[p ∧ (q ∨ r) ∧ (¬p ∨ ¬q ∨ r)]
Tran Tuan Anh†,
≡ ¬p ∨ ¬(q ∨ r) ∨ ¬(¬p ∨ ¬q ∨ r) Nguyen An
Khuong†,
≡ ¬p ∨ (¬q ∧ ¬r) ∨ (p ∧ q ∧ ¬r) Man Nguyen♦

≡ (¬q ∧ ¬r) ∨ [¬p ∨ [(p ∧ (q ∧ ¬r)]]


≡ (¬q ∧ ¬r) ∨ [(¬p ∨ p) ∧ [(¬p ∨ (q ∧ ¬r)]] Contents

≡ (¬q ∧ ¬r) ∨ [1 ∧ [(¬p ∨ (q ∧ ¬r)] Propositional Logic

Logical
≡ (¬q ∧ ¬r) ∨ [¬p ∨ (q ∧ ¬r)] Equivalences
≡ ¬p ∨ [(¬q ∧ ¬r) ∨ (q ∧ ¬r)] Exercise

≡ ¬p ∨ [(¬q ∨ q) ∧ ¬r]
≡ ¬p ∨ (1 ∧ ¬r) ≡ ¬p ∨ ¬r
b) ¬((p ∧ q) → r) ≡ ¬(¬(p ∧ q) ∨ r) ≡ (p ∧ q) ∧ ¬r
c) ¬[p ∨ q ∨ (¬p ∧ ¬q ∧ r)]
≡ ¬[(p ∨ q) ∨ (¬(p ∨ q) ∧ r)]
≡ ¬{[(p ∨ q) ∨ ¬(p ∨ q)] ∧ [(p ∨ q) ∨ r]}
≡ ¬{1 ∧ [(p ∨ q) ∨ r]} ≡ ¬(p ∨ q ∨ r) 1.33
MATHEMATICAL LOGICS- Propositional Logic
Exercise

MATHEMATICAL
Exercise B LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Prove the following proposition are logical equivalence. Man Nguyen♦

Hint: Apply truth table or the series of logical equivalences.


Contents
a) ¬(p ↔ q) and ¬p ↔ q Propositional Logic

b) (p → q) ∧ (p → r) and p → (q ∧ r) Logical
Equivalences
c) (p → r) ∧ (q → r) and (p ∨ q) → r Exercise

d) (p → q) ∨ (p → r) and p → (q ∨ r)
e) ¬p → (q → r) and q → (p ∨ r)
f) p ↔ q and (p → q) ∧ (q → p)

1.34
MATHEMATICAL LOGICS- Propositional Logic
Exercise

MATHEMATICAL
Exercise C LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
The following proposition are logical equivalence? Man Nguyen♦
Prove it or give an example?
a) p ∧ (p → q) and p ∧ q Contents

Propositional Logic
b) p → q and ¬p ∨ (p ∧ q) Logical
Equivalences
c) p → q and ¬p ∨ ¬q
Exercise
d) ¬p and ¬(p ∨ q) ∨ (¬p ∧ q)
e) [(p ↔ q) ∧ (q ↔ r) ∧ (r ↔ p)] and
[(p → q) ∧ (q → r) ∧ (r → p)]
f) [(p ∧ q) ∨ (q ∧ r) ∨ (r ∧ p)] and [(p ∨ q) ∧ (q ∨ r) ∧ (r ∨ p)]

1.35
MATHEMATICAL LOGICS- Propositional Logic
Exercise

MATHEMATICAL
Solution LOGICS-
Propositional Logic

• Using truth tables to prove the following: Tran Tuan Anh†,


Nguyen An
c) e) is not logically equivalent. Khuong†,
Man Nguyen♦
a) b) d) f) logically equivalent.
• The other cases can be proved by logical equivalence.
Contents
a) p ∧ (p → q) ≡ p ∧ (¬p ∨ q)
Propositional Logic
≡ (p ∧ ¬p) ∨ (p ∧ q) ≡ 0 ∨ (p ∧ q) ≡ p ∧ q
Logical
Equivalences
b) ¬p ∨ (p ∧ q) ≡ ¬p ∨ (p ∧ q)
Exercise
≡ (¬p ∨ p) ∧ (¬p ∨ q) ≡ 1 ∧ (¬p ∨ q)
≡ ¬p ∨ q ≡ p → q

d) ¬(p ∨ q) ∨ (¬p ∧ q)
≡ (¬p ∧ ¬q) ∨ (¬p ∧ q)
≡ ¬p ∧ (¬q ∨ q)
≡ ¬p ∧ 1
≡ ¬p

1.36
MATHEMATICAL LOGICS- Propositional Logic
Exercise

MATHEMATICAL
Exercise D LOGICS-
Propositional Logic

Determine the truth value and find the contrapositions as Tran Tuan Anh†,
Nguyen An
well as the contradictions of the following propositions. Khuong†,
Man Nguyen♦
a) “If ABCD is a rectangle, AB and CD are perpendicular.”
b) “If 14 is an odd number, 15 is divisible by 4.”
Contents
c) “Two equal triangles have the same area.”
Propositional Logic
d) “If the quadratic equation ax2 + bx + c = 0 has a.c < 0, it has root.”
Logical
e) “If two numbers x and y are both divisible by n, (x + y) is also divisible Equivalences
by n.” Exercise
f) “If 45 ended with 5, 45 is divisible by 5.”
√ √ √
g) “If 2 is an irrational number then 2. 2 is an irrational number.”
h) “If Pythagoras is French, Vietnam belongs to Asia.”
i) “If 3n + 2 is an odd integer, n is an odd integer.”
j) “If 8 < 9, 5 is a prime number.”
k) “A quadrilateral is a rhombus when it has 2 perpendicular diagonals.”
l) “If 5 < 3, 7 is a prime number.”

1.37
MATHEMATICAL LOGICS- Propositional Logic
Exercise

MATHEMATICAL
Exercise E LOGICS-
Propositional Logic
Let p and q be:
Tran Tuan Anh†,
• p: "Brandon likes reading" Nguyen An
Khuong†,
• q: "Brandon is a good student" Man Nguyen♦

The statement that formalizes "If Brandon likes reading,


Contents
Brandon is a good student, vice versa, If Brandon is a good
Propositional Logic
student, Brandon like reading" is: Logical
A) (p ∧ q) → r Equivalences

Exercise
B) p → q
C) p ∨ q
D) p ∧ q
E) p ↔ q
F) ¬p → ¬q
G) ¬p ∨ (p ∧ q)
H) None of the others. 1.39
MATHEMATICAL LOGICS- Propositional Logic
Exercise

MATHEMATICAL
Exercise F: Let P , Q, R be: LOGICS-
Propositional Logic
• P : “Potter is studying Math”.
Tran Tuan Anh†,
• Q: “Potter is studying Computer science”. Nguyen An
Khuong†,
• R: “Potter is studying English”. Man Nguyen♦

Example Contents

Propositional Logic
“Potter is studying Math and English but not Computer
Logical
science” is formalized as: P ∧ R ∧ ¬Q Equivalences

Exercise
Formalize the followings using the propositional connectives.
a) Potter is studying Math and Computer science but not
Computer science and English at the same time.
b) It is not true that Potter is studying English or
Computer science and not Math.
c) Potter is not studying both Computer science and
English but is studying Math. 1.40
MATHEMATICAL LOGICS- Propositional Logic
Exercise

MATHEMATICAL
Exercise G LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
Khuong†,
Man Nguyen♦

Which of the following proposition is a truth. Contents

Propositional Logic
A) (p ∨ ¬q) → q
Logical
B) p → (p ∧ q) Equivalences

Exercise
C) ¬p → (p → q)
D) ¬(p → q) → q
E) none of the others.

1.41
MATHEMATICAL LOGICS- Propositional Logic
Exercise

MATHEMATICAL
Exercise H Let’s consider a propositional language where: LOGICS-
Propositional Logic
• p: “ABC is an isosceles triangle”. Tran Tuan Anh†,
Nguyen An
• q: “ABC is an equilateral triangle”. Khuong†,
Man Nguyen♦
• r: “ABC has a 60o angle”.
Q: Which of the following compounds formalize the Contents

theorem: “if ABC is an isosceles triangle and has a 60o Propositional Logic

Logical
angle then it is an equilateral triangle” ? Equivalences

Exercise

A) (p ∧ q) → r
B) (p ∧ r) → q
C) (p ∧ r) ∨ q
D) q → (p ∨ r)
E) none of the others.
1.42
MATHEMATICAL LOGICS- Propositional Logic
Exercise

MATHEMATICAL
Exercise J LOGICS-
Propositional Logic

Tran Tuan Anh†,


Nguyen An
There are 6 soccer teams A, B, C, D, E, F contested in a Khuong†,
Man Nguyen♦
tournament. The following are statements on which two
teams are in the grand final: Contents

a. A and C Propositional Logic

Logical
b. B and E Equivalences

c. B and F Exercise

d. A and F
e. A and D
Knowing that there are 4 half true statements and 1 totally
false statement. What teams are in the grand final?

1.43
MATHEMATICAL LOGICS- Propositional Logic
Exercise

MATHEMATICAL
Exercise K [Final] LOGICS-
Propositional Logic
Find the truth values of the following statements Tran Tuan Anh†,
Nguyen An
(with brief explanations): Khuong†,
Man Nguyen♦
a) “∀x ∈ N, x2 + 5x + 6 is not a prime number.”
b) “∃x ∈ R, x2 + x + 1 ≤ 0” Contents

c) “∃n ∈ N, (n3 − n) is not a multiple of 3.” Propositional Logic

Logical
d) “∀n ∈ N ∗, n2 − 1 is a multiple of 3.” Equivalences

e) “∀x, ∀y ∈ R, x2 + y 2 > 2xy” Exercise

f) “∃r ∈ Q, 3 < r < π”


g) “∃n ∈ N, n2 + 1 divisible by 8”
h) “∀x ∈ R, |x| < 3 ⇔ x2 < 9”
i) “∃a, b ∈ R, (a + b)2 > 2(a2 + b2 )”
j) “All real numbers are positive.”
1.45
MATHEMATICAL LOGICS- Propositional Logic
Exercise

MATHEMATICAL
Find the truth values of the followings LOGICS-
Propositional Logic
a) “There is a liquid metal.” Tran Tuan Anh†,
Nguyen An
b) “All equilateral triangles are equal.” Khuong†,
Man Nguyen♦
c) “All gases are non-conductive.”
d) “There exist quadrilaterals which don’t have Contents

circumcircles.” Propositional Logic

Logical
e) “There is a natural number n that, for all real numbers Equivalences

x, we have f (x) = x2 − 2x + n is not negative.” Exercise

f) “For all positive integers x and y we have x ≤ y.”


g) “For all positive integers x, there is a positive integer y
so that x ≤ y.”
h) “There is a positive integer x that, for all positive
integers y, we have x ≤ y.”
i) “There exist positive integers x and y so that x ≤ y.”
1.46

You might also like