0% found this document useful (0 votes)
11 views46 pages

MathLogic1-Propositional-Logic

Uploaded by

Eugene
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)
11 views46 pages

MathLogic1-Propositional-Logic

Uploaded by

Eugene
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/ 46

Propositional Logic

Man VM. Nguyen

Chapter 1 Contents

Propositional Logic Propositional Logic

Logical
Equivalences
Introduction to Mathematical Logic Exercise
on January 7, 2025

Man VM. Nguyen


Math Depart., MUSC
1.1

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 1 / 48
Contents

Contents Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic

Logical
1 Propositional Logic Equivalences

Exercise

2 Logical Equivalences

3 Exercise

1.2

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 2 / 48
Contents

Course outcomes Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic

Course learning outcomes Logical


Equivalences

Exercise
L.O.1 Understanding of logic and discrete structures
L.O.1.1 – Describe definition of predicate logic
L.O.1.2 – Define basic discrete structures: set, map, graph
L.O.2 Represent & model practical problems with discrete structures
L.O.2.1 – Logically describe KEY problems in Computing
L.O.2.2 – Use proving methods: contrapositive, induction
L.O.2.3 – Explain problem modeling using discrete structures

1.3

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 3 / 48
CHAPTER 1.
Propositional Logic
Propositional Logic

Logic Propositional Logic

Man VM. Nguyen

Contents
Definition (Averroes)
Propositional Logic
The tool for distinguishing between the true and the false.
Logical
Equivalences

Exercise

Definition (Penguin Encyclopedia)


The formal systematic study of the principles of valid
inference and correct reasoning.

Definition (Discrete Mathematics - Rosen)


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

1.5

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 5 / 48
Propositional Logic

Applications in Computer Science Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic

Logical
• Design of computer circuits Equivalences

• Construction of computer programs Exercise

• Verification of the correctness of programs


• Constructing proofs automatically
• Artificial intelligence
• Many more...

1.6

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 6 / 48
Propositional Logic

Propositional Logic Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic
Definition
Logical
A proposition is a declarative sentence that is either true or Equivalences

false, but not both. Exercise

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

1.7

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 7 / 48
Propositional Logic

Examples Propositional Logic

Man VM. Nguyen

Contents

Examples (Which of these are propositions?) Propositional Logic

Logical
• How easy is logic! Equivalences

• Read this carefully. Exercise

• H1 building is in Ho Chi Minh City.


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

1.8

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 8 / 48
Propositional Logic

Notations Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic

Logical
Equivalences

Exercise

• Propositions are denoted by p, q, . . .


• The truth value is true (T) or false (F)

1.9

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 9 / 48
Propositional Logic

Operators Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic

Negation - : ¬p Logical
Equivalences

Exercise

Table: Truth Table for Negation

p ¬p
T F
F T

1.10

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 10 / 48
Propositional Logic

Operators Propositional Logic

Man VM. Nguyen

Contents
Conjunction - : p ∧ q Disjunction -: p ∨ q Propositional Logic
“p and q” “p or q” Logical
Equivalences

Exercise

p q p∧q p q p∨q
T T T T T T
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.11

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 11 / 48
Propositional Logic

Operators Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic
Exclusive OR : p ⊕ q Implication : p → q Logical
“p or q (but not both)” “if p, then q” Equivalences

Exercise

p q p⊕q p q p→q
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.12

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 12 / 48
Propositional Logic

More Expressions for Implication p → q Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic
• if p, then q
Logical
• p implies q Equivalences

Exercise
• p is sufficient for q
• q if p
• p only if q
• 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.13

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 13 / 48
Propositional Logic

Conditional Statements From p → q Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic

Logical
Equivalences

• q → p (converse ) Exercise

• ¬q → ¬p (contrapositive )
• Prove that only contrapositive have the same truth
table with p → q

1.14

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 14 / 48
Propositional Logic

Propositional Logic

Man VM. Nguyen

Exercise Contents

Propositional Logic
What are the converse and contrapositive of the following
Logical
conditional statement Equivalences
“If he plays online games too much, his girlfriend leaves Exercise

him.”

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


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

1.15

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 15 / 48
Propositional Logic

Biconditionals Propositional Logic

Man VM. Nguyen

p↔q Contents

“p if and only if q” Propositional Logic

Logical
Equivalences

p q p↔q Exercise

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

• “p is necessary and sufficient for q”.


• “if p then q, and conversely”.
• “p iff q”.
1.16

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 16 / 48
Propositional Logic

The order of operators Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic

Logical
Equivalences
• 1. in the bracket() Exercise
• 2. negation ¬
• 3. ∨, ∧, ⊕
• 4. →
• 5. ↔

1.17

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 17 / 48
Propositional Logic

Translating Natural Sentences Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic
Exercise Logical
Equivalences
I will buy a new phone only if I have enough money to buy
Exercise
iPhone 4 or my phone is not working.

• p: I will buy a new phone


• q: I have enough money to buy iPhone 4
• r: My phone is working

• p → (q ∨ ¬r)

1.18

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 18 / 48
Propositional Logic

Translating Natural Sentences Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic

Logical
Equivalences

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

1.19

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 19 / 48
Propositional Logic

Construct Truth Table Propositional Logic

Man VM. Nguyen

Contents
Exercise Propositional Logic

Construct the truth table of the compound proposition Logical


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

p q ¬q p ∨ ¬q p∧q (p ∨ ¬q) → (p ∧ q)
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.20

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 20 / 48
Propositional Logic

Exercise - Truth table Propositional Logic

Man VM. Nguyen

¬p → (¬q ∨ r)
Contents
p q r ¬p ¬q ¬q ∨ r ¬p → (¬q ∨ r)
T T T F F T T Propositional Logic
T T F F F F T Logical
T F T F T T T Equivalences
T F F F T T T Exercise
F T T T F T T
F T F T F F F
F F T T T T T
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.21

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 21 / 48
Propositional Logic

Applications Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic

Logical
Equivalences
• System specifications
Exercise
• “When a user clicked on Help button, a pop-up will be
shown up”
• Boolean search
• type “dai hoc bach khoa” in Google
• means “dai AND hoc AND bach AND khoa”

1.22

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 22 / 48
Propositional Logic

Applications (cont.) Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic

• Logic puzzles Logical


Equivalences
• There are two kinds of inhabitants on an island, knights, Exercise
who always tell the truth, and their opposites, knaves,
who may lie. You encounter two people A and B.
What are A and B if A says “B is a knight” and B
says ”The two of us are opposite types”?
• Bit operations
• 101010011 is a bit string of length nine.

1.23

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 23 / 48
Propositional Logic

Tautology and Contradiction Propositional Logic

Man VM. Nguyen

Contents
Definition Propositional Logic

A compound proposition that is always true (false) is called Logical


Equivalences
a tautology (contradiction). Exercise

• Tautology:
• Contradiction:

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

1.24

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 24 / 48
Propositional Logic

Question Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic
Which of the following is a tautology
Logical
Hint: Apply truth table. Equivalences

Exercise
a) (p ∨ q) → (p ∧ q)
b) (p ∧ q) → (p ∨ q)
c) p → (¬q → p)
d) p → (p → q)
e) p → (p → p)
f) (p → q) → [(p → r) → (q → r)]

1.25

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 25 / 48
Propositional Logic

Proposition? Truth value? Propositional Logic

Man VM. Nguyen

Contents
a) “Fansipan is the highest mountain in Vietnam.” Propositional Logic
b) “Two coprime numbers have the only common divisor of 1.” Logical
c) “The product of 3 continuous integers is divisible by 3.” Equivalences

d) “Stand up!” Exercise

e) “x+1=0”
f) “Hexagons have 8 vertices.”
g) “0 is a positive number.”
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.26

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 26 / 48
Propositional Logic

Proposition? Truth value? Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic
m) “When will our class go camping?”
Logical
m) “Mercury is not a metal.” Equivalences

m) “320 ¿ 230 .” Exercise


m) “Airplanes are the fastest transport.”
m) “2002 is a leap year.”
m) “There are infinite prime numbers.”
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.27

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 27 / 48
Logical Equivalences

Logical Equivalences Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic

Logical
Equivalences
Definition
Exercise
The compound compositions p and q are called logically
equivalent if p ↔ q is a tautology, denoted p ≡ q.

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

1.28

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 28 / 48
Logical Equivalences

Logical Equivalences Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic
p∧T ≡ p Identity laws Logical
p∨F ≡ p Equivalences

Exercise
p∨T ≡ T Domination laws
p∧F ≡ F
p∨p ≡ p Idempotent laws
p∧p ≡ p
¬(¬p) ≡ p Double negation law

1.29

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 29 / 48
Logical Equivalences

Logical Equivalences Propositional Logic

Man VM. Nguyen

Contents
p∨q ≡ q∨p Commutative laws Propositional Logic
p∧q ≡ q∧p Logical
Equivalences
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r) Associative laws Exercise
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) Distributive laws
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
¬(p ∧ q) ≡ ¬p ∨ ¬q De Morgan’s law
¬(p ∨ q) ≡ ¬p ∧ ¬q
p ∨ (p ∧ q) ≡ p Absorption laws
p ∧ (p ∨ q) ≡ p

1.30

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 30 / 48
Logical Equivalences

Logical Equivalences Propositional Logic

Man VM. Nguyen

Contents

Equivalence Propositional Logic

Logical
p ∨ ¬p ≡ T Equivalences

p ∧ ¬p ≡ F Exercise

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
p↔q ≡ (p → q) ∧ (q → p)
p↔q ≡ (¬p ∨ q) ∧ (p ∨ ¬q)

1.31

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 31 / 48
Logical Equivalences

Constructing New Logical Equivalences Propositional Logic

Man VM. Nguyen

Example
Show that ¬(p ∨ (¬p ∧ q)) and ¬p ∧ ¬q are logically Contents

Propositional Logic
equivalent by developing a series of logical equivalences.
Logical
Equivalences
Solution Exercise

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

≡ ¬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.32
Consequently, ¬(p ∨ (¬p ∧ q)) and ¬p ∧Propositional
Man VM. Nguyen (Math Depart., MUSC)
¬q are logically
Logic
equivalent. January 7, 2025 32 / 48
Exercise

Exercise A Propositional Logic

Man VM. Nguyen

Negate the following proposition and try to simplify it.


Contents
Example
Propositional Logic
p → (¬q ∧ r) Logical
Equivalences
By using the truth table, we can prove that p → q and
Exercise
¬p ∨ q are logical equivalence.
Negate: ¬(p → (¬q ∧ r))
≡ ¬(¬p ∨ (¬q ∧ r))
≡ 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.33

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 33 / 48
Exercise

Solution Propositional Logic

Man VM. Nguyen

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


≡ ¬p ∨ ¬(q ∨ r) ∨ ¬(¬p ∨ ¬q ∨ r) Contents

≡ ¬p ∨ (¬q ∧ ¬r) ∨ (p ∧ q ∧ ¬r) Propositional Logic

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


Equivalences
≡ (¬q ∧ ¬r) ∨ [(¬p ∨ p) ∧ [(¬p ∨ (q ∧ ¬r)]] Exercise
≡ (¬q ∧ ¬r) ∨ [1 ∧ [(¬p ∨ (q ∧ ¬r)]
≡ (¬q ∧ ¬r) ∨ [¬p ∨ (q ∧ ¬r)]
≡ ¬p ∨ [(¬q ∧ ¬r) ∨ (q ∧ ¬r)]
≡ ¬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.34

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 34 / 48
Exercise

Exercise B Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic
Prove the following proposition are logical equivalence.
Logical
Hint: Apply truth table or the series of logical equivalences. Equivalences

Exercise
a) ¬(p ↔ q) and ¬p ↔ q
b) (p → q) ∧ (p → r) and p → (q ∧ r)
c) (p → r) ∧ (q → r) and (p ∨ q) → r
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.35

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 35 / 48
Exercise

Exercise C Propositional Logic

Man VM. Nguyen

Contents

The following proposition are logical equivalence? Propositional Logic

Prove it or give an example? Logical


Equivalences
a) p ∧ (p → q) and p ∧ q Exercise

b) p → q and ¬p ∨ (p ∧ q)
c) p → q and ¬p ∨ ¬q
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.36

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 36 / 48
Exercise

Solution Propositional Logic

Man VM. Nguyen

• Using truth tables to prove the following: Contents


c) e) is not logically equivalent. Propositional Logic
a) b) d) f) logically equivalent.
Logical
• The other cases can be proved by logical equivalence. Equivalences

a) p ∧ (p → q) ≡ p ∧ (¬p ∨ q) Exercise
≡ (p ∧ ¬p) ∨ (p ∧ q) ≡ 0 ∨ (p ∧ q) ≡ p ∧ q

b) ¬p ∨ (p ∧ q) ≡ ¬p ∨ (p ∧ q)
≡ (¬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.37

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 37 / 48
Exercise

Exercise D Propositional Logic

Man VM. Nguyen

Determine the truth value and find the contrapositions as Contents


well as the contradictions of the following propositions. Propositional Logic
a) “If ABCD is a rectangle, AB and CD are perpendicular.” Logical
b) “If 14 is an odd number, 15 is divisible by 4.” Equivalences

c) “Two equal triangles have the same area.” Exercise

d) “If the quadratic equation ax2 + bx + c = 0 has a.c < 0, it has root.”
e) “If two numbers x and y are both divisible by n, (x + y) is also divisible
by n.”
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.38

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 38 / 48
Exercise

Exercise E Propositional Logic

Man VM. Nguyen


Let p and q be:
• p: ”Brandon likes reading” Contents

• q: ”Brandon is a good student” Propositional Logic

Logical
The statement that formalizes ”If Brandon likes reading, Equivalences

Brandon is a good student, vice versa, If Brandon is a good Exercise

student, Brandon like reading” is:


A) (p ∧ q) → r

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

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 39 / 48
Exercise

Exercise F: Let P , Q, R be: Propositional Logic

Man VM. Nguyen

• P : “Potter is studying Math”.


• Q: “Potter is studying Computer science”. Contents

Propositional Logic
• R: “Potter is studying English”.
Logical
Equivalences
Example Exercise

“Potter is studying Math and English but not Computer


science” is formalized as: P ∧ R ∧ ¬Q

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

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 40 / 48
Exercise

Exercise G Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic

Logical
Which of the following proposition is a truth. Equivalences

Exercise
A) (p ∨ ¬q) → q
B) p → (p ∧ q)
C) ¬p → (p → q)
D) ¬(p → q) → q
E) none of the others.

1.41

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 41 / 48
Exercise

Exercise H Let’s consider a propositional language where: Propositional Logic

Man VM. Nguyen

• p: “ABC is an isosceles triangle”. Contents

• q: “ABC is an equilateral triangle”. Propositional Logic

Logical
• r: “ABC has a 60o angle”. Equivalences

Exercise
Q: Which of the following compounds formalize the
theorem: “if ABC is an isosceles triangle and has a 60o
angle then it is an equilateral triangle” ?

A) (p ∧ q) → r
B) (p ∧ r) → q
C) (p ∧ r) ∨ q
D) q → (p ∨ r)
E) none of the others.

1.42

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 42 / 48
Exercise

Exercise J Propositional Logic

Man VM. Nguyen

Contents
There are 6 soccer teams A, B, C, D, E, F contested in a Propositional Logic
tournament. The following are statements on which two Logical
Equivalences
teams are in the grand final:
Exercise
a. A and C
b. B and E
c. B and F
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

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 43 / 48
Exercise

Exercise K [Final] Propositional Logic

Man VM. Nguyen

Find the truth values of the following statements


Contents
(with brief explanations):
Propositional Logic
a) “∀x ∈ N, x2 + 5x + 6 is not a prime number.” Logical
Equivalences
b) “∃x ∈ R, x2 + x + 1 ≤ 0” Exercise
c) “∃n ∈ N, (n3 − n) is not a multiple of 3.”
d) “∀n ∈ N ∗, n2 − 1 is a multiple of 3.”
e) “∀x, ∀y ∈ R, x2 + y 2 > 2xy”
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.44

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 44 / 48
Exercise

Find the truth values of the followings Propositional Logic

Man VM. Nguyen

a) “There is a liquid metal.”


Contents
b) “All equilateral triangles are equal.” Propositional Logic

c) “All gases are non-conductive.” Logical


Equivalences
d) “There exist quadrilaterals which don’t have Exercise
circumcircles.”
e) “There is a natural number n that, for all real numbers
x, we have f (x) = x2 − 2x + n is not negative.”
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.45

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 45 / 48
Exercise

Solution Propositional Logic

Man VM. Nguyen

Contents

Propositional Logic

Logical
a) “∀x ∈ N, x2
+ 5x + 6 is not a prime number.” → True. Equivalences
→ x2 + 5x + 6 = (x + 2).(x + 3) ...
Exercise

b) “∃x ∈ R, x2 + x + 1 ≤ 0” → False.
→ x2 + x + 1 = (x + 12 )2 + 34 > 0∀x ∈ R.

c) “∃n ∈ N, (n3 − n) is not a multiple of 3.” → F. (Why?)


→ n3 − n = (n.1). n. (n + 1) ... .

1.46

Man VM. Nguyen (Math Depart., MUSC) Propositional Logic January 7, 2025 46 / 48

You might also like