0% found this document useful (0 votes)
30 views

Fundamentals of Logic Notes

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Fundamentals of Logic Notes

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Unit 1.

Fundamentals of Logic
1.1 Propositional Logic
1.1.1 Introduction
The rules of logic give precise meaning to mathematical statements. These rules are used to
distinguish between valid and invalid mathematical arguments. Besides the importance of
logic in understanding mathematical reasoning, logic has numerous applications to computer
science. These rules are used in the design of computer circuits, the construction of computer
programs, the verification of the correctness of programs, and in many other ways.
Furthermore, software systems have been developed for constructing some, but not all, types
of proofs automatically.
1.1.2 Propositions(statement)
A proposition is a declarative sentence (that is, a sentence that declares a fact) that is either
true or false, but not both.

EXAMPLE 1: All the following declarative sentences are propositions.


1. Washington, D.C., is the capital of the United States of America.
2. Toronto is the capital of Canada.
3. 1 + 1 = 2.
4. 2 + 2 = 3.
Propositions 1 and 3 are true, whereas 2 and 4 are false.

Some sentences that are not propositions are given in Example 2.


EXAMPLE 2 Consider the following sentences.
1. What time is it?
2. Read this carefully.
3. x + 1 = 2.
4. x + y = z.

Sentences 1 and 2 are not propositions because they are not declarative sentences. Sentences 3
and 4 are not propositions because they are neither true nor false. Note that each of sentences
3 and 4 can be turned into a proposition if we assign values to the variables.
1.1.3 Important terms
Propositional variables (or sentential variables): These are the variables that represent
propositions, just as letters are used to denote numerical variables. The conventional letters
used for propositional variables are p, q, r, s,… .
Truth value: The truth value of a proposition is true, denoted by T, if it is a true proposition,
and the truth value of a proposition is false, denoted by F, if it is a false proposition.
Atomic propositions.: these are the propositions without any connectives such as or, and but
etc.
example1: Today is Friday
example 2: 3+2=9
Propositional calculus or propositional logic: The area of logic that deals with propositions
is called the propositional calculus or propositional logic. It was first developed
systematically by the Greek philosopher Aristotle more than 2300 years ago.
Compound propositions, many mathematical statements are constructed by combining one
or more atomic propositions. These new propositions are called as compound propositions,
are formed from existing propositions using logical operators.
Example 1: Today is Sunday and it is holiday
Example 2 : If it is raining then road becomes wet
Example 3: Students who have taken either Discrete maths or Use of computer packages will
get a software job.
1.1.4 Logical Operators. (Connectives)
Negation:

Definition: Let p be a proposition. The negation of p, denoted by ¬𝑝 (also denoted by ̅𝑝), is


the statement which is read as “not p.”. The truth value of the negation of p,which is ¬𝑝 is
the opposite of the truth value of p.
EXAMPLE 3 Find the negation of the proposition “Michael’s PC runs Linux” and express this
in simple English.
Solution: The negation is
Michael’s PC does not run Linux.”
This negation can be more simply expressed as
“It is not the case that Michael’s PC runs Linux.”
EXAMPLE 4 Find the negation of the proposition “Nathasha’s smartphone has at least 32 GB
of memory” and express this in simple English.
Solution: The negation is
“Nathasha’s smartphone does not have at least 32 GB of memory”
This negation can also be expressed as
“It is not the case that Nathasha’s smartphone has at least 32 GB of memory.”
or even more simply as
“Nathasha’s smartphone has less than 32 GB of memory.”

The Truth Table for the Negation of a Proposition.


𝒑 ¬𝒑
0 1
1 0

Conjunction(And Connective)
definition :
Let p and q be propositions. The conjunction of p and q, denoted by p ∧ q, which is read as
“p and q.” The conjunction p ∧ q is true when both p and q are true and is false otherwise.

Example 1:
Find the conjunction of the propositions p and q where
p : “Rebecca’s PC has more than 16 GB free hard disk space”
q : “The processor in Rebecca’s PC runs faster than 1 GHz.”
Solution: The conjunction of these propositions, p ∧ q, is the proposition “Rebecca’s PC has
more than 16 GB free hard disk space, and the processor in Rebecca’s PC runs faster than
1 GHz.”
This conjunction can be expressed more simply as “Rebecca’s PC has more than
16 GB free hard disk space, and its processor runs faster than 1 GHz.”
For this conjunction to be true, both conditions given must be true. It is false when one or both
of these conditions are false.
Example 2:
Find the conjunction of the propositions p and q where
p: John has taken Discrete mathematics course
q: John has taken M S Office corse
p q p∧q
0 0 0
0 1 0
1 0 0
1 1 1

disjuction(or connective)
Let p and q be propositions. The disjunction of p and q, denoted by p ∨ q, is read as “ p or q “.
The disjunction p ∨ q is false when both p and q are false and is true otherwise.
The use of the connective or in a disjunction corresponds to one of the two ways the word
or is used in English, namely, as an inclusive or. A disjunction is true when at least one of the
two propositions is true. That is, p ∨ q is true when both p and q are true or when exactly one
of p and q is true.
Example 1:
Find the disjunction of the propositions P and Q where
P: “A student who has taken calculus can take this class”
Q: “A student who has taken introductory computer science can take this class.”
𝑝⋁𝑞: 𝐴 𝑠𝑡𝑢𝑑𝑒𝑛𝑡 𝑤ℎ𝑜 ℎ𝑎𝑠 𝑡𝑎𝑘𝑒𝑛 𝑐𝑎𝑙𝑐𝑢𝑙𝑢𝑠 𝑎𝑛𝑑 𝑖𝑛𝑡𝑟𝑜𝑑𝑢𝑐𝑡𝑜𝑟𝑦 𝑐𝑜𝑚𝑝𝑢𝑡𝑒𝑟 𝑠𝑐𝑖𝑒𝑛𝑐𝑒 𝑐𝑎𝑛 𝑡𝑎𝑘𝑒 𝑡ℎ𝑖𝑠 𝑐𝑙𝑎𝑠𝑠
Example 2:
Find the disjunction of the propositions p and q where
p : “Rebecca’s PC has more than 16 GB free hard disk space”
q : “The processor in Rebecca’s PC runs faster than 1 GHz.”
𝑝⋁𝑞: 𝑅𝑒𝑏𝑒𝑐𝑐𝑎′ 𝑠 𝑃𝐶 ℎ𝑎𝑠 𝑚𝑜𝑟𝑒 𝑡ℎ𝑎𝑛 16𝐺𝐵 𝑓𝑟𝑒𝑒 ℎ𝑎𝑟𝑑 𝑑𝑖𝑠𝑘 𝑠𝑝𝑎𝑐𝑒 𝑜𝑡 𝑝𝑟𝑜𝑐𝑒𝑠𝑠𝑜𝑟 𝑜𝑛 ℎ𝑒𝑟 𝑃𝐶 𝑟𝑢𝑛𝑠
𝑓𝑎𝑠𝑡𝑒𝑟 𝑡ℎ𝑎𝑛1 𝐺𝐻𝑍
TRUTH TABLE:
p q p∨q
0 0 0
0 1 1
1 0 1
1 1 1
Exclusive OR (XOR)
Let p and q be propositions. The exclusive or of p and q, denoted by p ⊕ q (or pXOR q), is
the proposition that is true when exactly one of p and q is true and is false otherwise.
Example 1:
Find the exclusive or of the propositions P and Q where
P: A student can have a salad with dinner”
Q: A student can have soup with dinner,
p ⊕ q: A student can have either salad or soup with dinner but not both
Example 2:
Find the exclusive or of the propositions P and Q where
P: “I will use all my savings to travel to Europe
Q: I will use all my savings to buy an electric car.”
p ⊕ q: I will use all my savings either to travel to Europe or to buy an electric car but not both
TRUTH TABLE:
p q p⊕q
0 0 0
0 1 1
1 0 1
1 1 0

Conditional Statements
Let p and q be propositions. The conditional statement p → q is read as, “if p, then
q.” The conditional statement p → q is false when p is true and q is false, and true otherwise.
In the conditional statement p → q, p is called the hypothesis (or antecedent or premise) and
q is called the conclusion (or consequence).
Because conditional statements play such an essential role in mathematical reasoning, a variety
of terminology is used to express p → q. the following ways are used to express this conditional
statement:
p → q. not equals to q → p
p:It is raining
q: road becomes wet
“if p, then q” “p implies q”
“if p, q” “p only if q”
“p is sufficient for q” “a sufficient condition for q is p”
“q if p” “q whenever p”
“q when p” “q is necessary for p”
“a necessary condition for p is q” “q follows from p”
“q unless ¬𝒑” “q provided that p”

Example 1:
Find the conditional statements of the propositions P and Q where
P: I am elected as President of Zambia
Q: I will lower taxes
p → q: if I am elected as President of Zambia then I will lower the taxes
Example 2:
Find the conditional statements of the propositions P and Q where
P: you get 100% on the final exam
Q: you will get an A grade
p → q: if you get 100% on the final exam the you will get an A grade
Example 3:
“You can receive an A in the course only if your score on the final is at least 90%.” Is it a
conditional statement?
Answer : Yes ,It is. It Is in the form of Q only if P
Example 4:
Let p be the statement “Maria learns discrete mathematics” and q the statement “Maria will
find a good job.” Express the statement p → q as a statement in English.
SOLUTION: If I Maria learns discrete mathematics then she will find a good job.
TRUTH TABLE:
p q p→q
0 0 1
0 1 1
1 0 0
1 1 1

BICONDITIONALS
Let p and q be propositions. The biconditional statement p ↔ q is read as “p if and
only if q.” The biconditional statement p ↔ q is true when p and q have the same truth values,
and is false otherwise. Biconditional statements are also called bi-implications.
(p→ 𝑞 ) ∧ (𝑞 → 𝑝)
There are some other common ways to express p ↔ q:
“p is necessary and sufficient for q”
“if p then q, and if q then p”
“p iff q.” “p exactly when q.”
Example 1: Let p be the statement “You can take the flight,” and let q be the statement “You
buy a ticket.”
Then find the p ↔ q the statement
You can take the flight if and only if you buy a ticket
TRUTH TABLE:
p q p↔q
0 0 1
0 1 0
1 0 0
1 1 1
Truth Tables Of Logical Operators

Exercises
1) Let p and q be the propositions
p: I bought a lottery ticket this week.
q: I won the million-dollar jackpot.
Express each of these propositions as an English sentence.
2) Let p and q be the propositions “The election is decided” and “The votes have been
counted,” respectively. Express each of these compound propositions as an English
sentence.

3) Let p and q be the propositions


p: It is below freezing.
q: It is snowing.
Write these propositions using p and q and logical connectives (including negations).
a) It is below freezing and snowing. =𝑝 ∧ 𝑞
b) It is below freezing but not snowing. = 𝑝 ∧ ¬𝑞
c) It is not below freezing and it is not snowing. = ¬𝑝 ∧ ¬𝑞
d) It is either snowing or below freezing (or both).= 𝑞 ∨ 𝑝
e) If it is below freezing, it is also snowing.= 𝑝 → 𝑞
f ) Either it is below freezing or it is snowing , but it is not snowing if it is below
freezing.= (𝑝 ∨ 𝑞) ∧ (𝑝 → ¬𝑞)
rephrase as below
Either it is below freezing or it is snowing , but ,if it is below freezing, then it is not
snowing
g) That it is below freezing is necessary and sufficient for it to be snowing. = 𝑝 ↔ 𝑞

4) Let p, q, and r be the propositions


p: You have the flu.
q: You miss the final examination.
r: You pass the course.
Express each of these propositions as an English sentence.
a) p → q b) ¬q ↔ r
c) q → ¬r d) p ∨ q ∨ r
e) (p → ¬r) ∨ (q → ¬r) f ) (p ∧ q) ∨ (¬q ∧ r)

5) 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.
rephrase the above statement
if you drive over 65 miles per hour then You will get a speeding ticket = 𝑝 → 𝑞
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.= 𝑞 → 𝑝

6) Let p, q, and r be the propositions


p: You get an A on the final exam.
q: You do every exercise in this book.
r: You get an A in this class.
Write these propositions using p, q, and r and logical connectives (including negations).
a) You get an A in this class, but you do not do every exercise in this book.
b) You get an A on the final, you do every exercise in this book, and you get an A in
this class.
c) To get an A in this class, it is necessary for you to get an A on the final.
d) You get an A on the final, but you don’t do every exercise in this book; nevertheless,
you get an A in this class.
e) Getting an A on the final and doing every exercise in this book is sufficient for getting
an A in this class.
f ) You will get an A in this class if and only if you either do every exercise in this book
or you get an A on the final.
7) Let p and q be the propositions “Swimming at the New Jersey shore is allowed” and
“Sharks have been spotted near the shore,” respectively. Express each of these
compound propositions as an English sentence.

8) Let p, q, and r be the propositions


p: Grizzly bears have been seen in the area.
q: Hiking is safe on the trail.
r: Berries are ripe along the trail.
Write these propositions using p, q, and r and logical connectives (including negations).
a) Berries are ripe along the trail, but grizzly bears have not been seen in the area.
b) Grizzly bears have not been seen in the area and hiking on the trail is safe, but
berries are ripe along the trail.
c) If berries are ripe along the trail, hiking is safe if and only if grizzly bears have
not been seen in the area.
d) It is not safe to hike on the trail, but grizzly bears have not been seen in the area
and the berries along the trail are ripe.
e) For hiking on the trail to be safe, it is necessary but not sufficient that berries not
be ripe along the trail and for grizzly bears not to have been seen in the area.
f ) Hiking is not safe on the trail whenever grizzly bears have been seen in the area
and berries are ripe along the trail.

9) For each of these sentences, determine whether an inclusive or, or an exclusive or, is
intended. Explain your answer.
a) Experience with C++ or Java is required.
b) Lunch includes soup or salad.
c) To enter the country, you need a passport or a voter registration card.
d) Publish or perish.
10) For each of these sentences, state what the sentence means if the logical connective or
is an inclusive or (that is, a disjunction) versus an exclusive or. Which of these meanings
of or do you think is intended?
a) To take discrete mathematics, you must have taken calculus or a course in computer
science.
b) When you buy a new car from Acme Motor Company, you get $2000 back in cash or
a 2% car loan.
c) Dinner for two includes two items from column A or three items from column B.
d) School is closed if more than two feet of snow falls or if the wind chill is below −100
◦F.

Truth Tables of Compound Propositions


Five important logical connectives are, —conjunction, disjunction, exclusive or, implication,
and the biconditional operator—as well as negation.
We can use these connectives to build up complicated compound propositions involving any
number of propositional variables.
We can use truth tables to determine the truth values of these compound propositions
We use a separate column to find the truth value of each compound expression that occurs in
the compound proposition as it is built up.
The truth values of the compound proposition for each combination of truth values of the
propositional variables in it is found in the final column of the table.

Example 1:
Construct the truth table of the compound proposition 𝑝 ∧ ¬𝑝
Solution: Since the compound proposition has 1 variable , we have 2n = 21= 2 possible
combinations of inputs. Then the truth table is written as follows,
p ¬𝑝 𝑝 ∧ ¬𝑝
0 1 0
1 0 0

Example 2:
Construct the truth table of the compound proposition (𝑝 ∨ ¬𝑞) ∧ (𝑞 ∨ ¬𝑝)
Solution: Since the compound proposition has 2 variables, we have 2n = 22= 4 possible
combinations of inputs (4 rows). Then the truth table is written as follows,
p q ¬𝑞 (𝑝 ∨ ¬𝑞) ¬𝑝 (𝑞 ∨ ¬𝑝) (𝑝 ∨ ¬𝑞) ∧ (𝑞 ∨ ¬𝑝)
0 0 1 1 1 1 1
0 1 0 0 1 1 0
1 0 1 1 0 0 0
1 1 0 1 0 1 1

Example 3:
Construct the truth table of the compound proposition (𝑝 → 𝑞) ↔ (¬𝑞 → ¬𝑝 )
Solution: Since the compound proposition has 2 variables, we have 2n = 22= 4 possible
combinations of inputs(4 rows). Then the truth table is written as follows,
p q (𝑝 → 𝑞) ¬𝑞 ¬𝑝 (¬𝑞 → ¬𝑝) (𝑝 → 𝑞) ↔ (¬𝑞 → ¬𝑝 )
0 0 1 1 1 1 1
0 1 1 0 1 1 1
1 0 0 1 0 0 1
1 1 1 0 0 1 1
Example 4:

Construct the truth table for [(p → q) ∧ (q → r)] → (p → r)

p q r (p → q) (q → r) [(p → q) ∧ (q → r) (p → r) [(p → q) ∧ (q → r)] → (p → r)


0 0 0 1 1 1 1 1
0 0 1 1 1 1 1 1
0 1 0 1 0 0 1 1
0 1 1 1 1 1 1 1
1 0 0 0 1 0 0 1
1 0 1 0 1 0 1 1
1 1 0 1 0 0 0 1
1 1 1 1 1 1 1 1

Exercise:

1) Construct a truth table for each of these compound propositions.


2) Construct a truth table for each of these compound propositions.

3) Construct a truth table for each of these compound propositions.

4) How many rows appear in a truth table for each of these compound propositions?

5) How many rows appear in a truth table for each of these compound propositions?

1.2 Propositional Equivalences


An important type of step used in a mathematical argument is the replacement of statement
with another statement with the same truth value. Because of this, methods that produce
propositions with the same truth value as a given compound proposition are used extensively
in the construction of mathematical arguments.
Note that we will use the term “compound proposition” to refer to an expression formed from
propositional variables using logical operators, such as p ∧ q.

1.2.1 Classification of compound propositions according to their possible truth values:


Tautology: A compound proposition that is always true, no matter what the truth values of the
propositional variables that occur in it, is called a tautology.

Example 1: 𝑝 ∨ ¬𝑝 is a tautology.
Example 2: : (𝑝 ∨ 𝑞) → (𝑞 ∨ 𝑝) is a tautology.

Contradiction: A compound proposition that is always false, for all possible combinations of
inputs is called a contradiction.

Example 1: 𝑝 ∧ ¬𝑝 is a contradiction.
Example 2: : (𝑝 ∧ 𝑞) ∧ ¬(𝑝 ∨ 𝑞) is a contradiction.

Contingency: A compound proposition that is neither a tautology nor a contradiction is called


a contingency.
Example 1: 𝑝 ∧ ¬𝑝 is a contingency.
Example 2: : (𝑝 → 𝑞) ∧ (𝑝 ∧ 𝑞) is a contingency

Worked examples:
Q1) Show that whether the following compound proposition is tautology or not?
[¬𝑝 ∧ (𝑝 → 𝑞)] → ¬q

p q ¬𝑝 ¬q (𝑝 → 𝑞) [¬𝑝 ∧ (𝑝 → 𝑞)] [¬𝑝 ∧ (𝑝 → 𝑞)]


→ ¬q
0 0 1 1 1 1 1
0 1 1 0 1 1 0
1 0 0 1 0 0 1
1 1 0 0 1 0 1

Conclusion: Since the last column contains combinations of both 0’s and 1’s . It is not
tautology

Q2: Show that whether the following compound proposition is tautology or not?
[¬𝑞 ∧ (𝑝 → 𝑞)] → ¬p
p q ¬q (𝑝 → 𝑞) [¬𝑞 ∧ (𝑝 → 𝑞)] ¬p [¬𝑞 ∧ (𝑝 → 𝑞)] → ¬p
0 0 1 1 1 1 1
0 1 0 1 0 1 1
1 0 1 0 0 0 1
1 1 0 1 0 0 1

Conclusion : Since all the truth values of last column are only 1’s. It is a tautology

Q3: show that (𝑝 → 𝑞) ∧ (q → r) → (p → r) is a tautology?

p q r (p → q) (q → r) p → r) (p → q) ∧ (q → r) (p → q) ∧ (q → r) →
(p → r)
0 0 0 1 1 1 1 1
0 0 1 1 1 1 1 1
0 1 0 1 0 1 0 1
0 1 1 1 1 1 1 1
1 0 0 0 1 0 0 1
1 0 1 0 1 1 0 1
1 1 0 1 0 0 0 1
1 1 1 1 1 1 1 1

Conclusion : Since all the truth values of last column are only 1’s. It is a tautology
Q4: show that (𝑝 ∨ 𝑞) ∧ (¬p ∨ r) → (q ∨ r) is a tautology?

Logical Equivalences

The compound propositions p and q are called logically equivalent if all the truth values of p
is equals to all the truth values of q The notation p ≡ q denotes that p and q are logically
equivalent. The symbol ⇔ is sometimes used instead of ≡ to denote logical equivalence.

One way to determine whether two compound propositions are equivalent is to use a truth table.
In particular, the compound propositions p and q are equivalent if and only if the columns
giving their truth values agree. Example 1 illustrates this method to establish an extremely
important and useful logical equivalence, namely, that of ¬(𝑝 ∨ 𝑞) ≡ ¬𝑝 ∧ ¬𝑞
Example 1: Show that ¬(𝑝 ∨ 𝑞) 𝑎𝑛𝑑¬𝑝 ∧ ¬𝑞 are logically equivalent.
Solution:
The truth tables for these compound propositions are displayed below. Because the truth values
of the compound propositions ¬(𝑝 ∨ 𝑞) 𝑎𝑛𝑑¬𝑝 ∧ ¬𝑞 agree for all possible combinations of
the truth values of p and q, it follows that ¬(𝑝 ∨ 𝑞) 𝑎𝑛𝑑¬𝑝 ∧ ¬𝑞 compound propositions are
logically equivalent.
p q (𝑝 ∨ 𝑞) ¬(𝑝 ∨ 𝑞) ¬𝑝 ¬𝑞 ¬𝑝 ∧ ¬𝑞
0 0 0 1 1 1 1
0 1 1 0 1 0 0
1 0 1 0 0 1 0
1 1 1 0 0 0 0

Since the truth values of 4th column and 7th column are same, we can say that
¬(𝑝 ∨ 𝑞) 𝑎𝑛𝑑¬𝑝 ∧ ¬𝑞 are logically equivalent. That is

¬(𝑝 ∨ 𝑞) ≡ ¬𝑝 ∧ ¬𝑞
Example 2:
Show that (𝑝 → 𝑞) ∧ (p → r) and [𝑝 → ( 𝑞 ∧ r)] are logically equivalent

p q r (p → q) (p → r) (p → q) ∧ ( 𝑞 ∧ r) [𝑝 → ( 𝑞 ∧ r)]
(p → r)
0 0 0 1 1 1 0 1
0 0 1 1 1 1 0 1
0 1 0 1 1 1 0 1
0 1 1 1 1 1 1 1
1 0 0 0 0 0 0 0
1 0 1 0 1 0 0 0
1 1 0 1 0 0 0 0
1 1 1 1 1 1 1 1

Since all the truth values of 6th and 8th Columns are same ,
(𝑝 → 𝑞) ∧ (p → r) ≡ [𝑝 → ( 𝑞 ∧ r)]

Exercises:
1) Show that each of these conditional statements is a tautology by using truth tables.

2) Show that each of these conditional statements is a tautology by using truth tables.

3) Show that 𝑝 ↔ 𝑞 𝑎𝑛𝑑 (𝑝 ∧ 𝑞) ∨ (¬p ∧ ¬q) are logically equivalent.


4) Show that ¬( 𝑝 ↔ 𝑞)𝑎𝑛𝑑 𝑝 ↔ ¬𝑞 logically equivalent.
5) Show that p → q 𝑎𝑛𝑑 ¬𝑞 → ¬𝑝 p are logically equivalent.
6) Show that ¬p ↔ q 𝑎𝑛𝑑 𝑝 ↔ ¬𝑞 are logically equivalent.
7) Show that ¬(p ⊕ q) 𝑎𝑛𝑑 𝑝 ↔ 𝑞 q are logically equivalent.
8) Show that (𝑝 → 𝑞) ∧ (𝑝 → 𝑟) 𝑎𝑛𝑑 𝑝 → (𝑞 ∧ 𝑟) are logically equivalent.
9) Show that (𝑝 → 𝑟) ∧ (𝑞 → 𝑟) 𝑎𝑛𝑑 (𝑝 ∨ 𝑞) → 𝑟 are logically equivalent.
10) Show that (𝑝 → 𝑞) ∨ (𝑝 → 𝑟) 𝑎𝑛𝑑 𝑝 → (𝑞 ∨ 𝑟) are logically equivalent.
11) Show that (𝑝 → 𝑟) ∨ (𝑞 → 𝑟) 𝑎𝑛𝑑 (𝑝 ∧ 𝑞) → 𝑟 are logically equivalent.
12) Show that ¬𝑝 → (𝑞 → 𝑟) 𝑎𝑛𝑑 𝑞 → (𝑝 ∨ 𝑟) are logically equivalent.

Dual of compound proposition:

The dual of a compound proposition that contains only the logical operators ∨, ∧, and ¬ is the
compound proposition obtained by replacing each ∨ by ∧, each ∧ by ∨, each T by F, and each
F by T. The dual of s is denoted by s∗.
Example1 : Write the duals of
(a) (𝑝 ∨ ¬𝑞 ) ∧ 𝑟 (b) (𝑝 ∨ ¬𝑟) ∧ (𝑞 ∧ 𝑝) (c) )(𝑝 ∨ 𝑞) ∧ (¬𝑝 ∧ ¬𝑞)
Solution: The duals are
(a) (𝑝 ∧ ¬𝑞 ) ∨ 𝑟 ∨ r (b) (𝑝 ∧ ¬𝑟) ∨ (𝑞 ∨ 𝑝) (c) )(𝑝 ∧ 𝑞) ∨ (¬𝑝 ∨ ¬𝑞)
1) Find the dual of each of these compound propositions.
a) 𝑝 ∨ ¬𝑞 = 𝑝 ∧ ¬𝑞
𝒃) 𝑝 ∧ (𝑞 ∨ (𝑟 ∧ 𝑻)) = 𝑝 ∨ (𝑞 ∧ (𝑟 ∨ 𝑭))
𝒄) (𝑝 ∧ ¬𝑞) ∨ (𝑞 ∧ 𝑭) =(𝑝 ∨ ¬𝑞) ∧ (𝑞 ∨ 𝑻)
2) Find the dual of each of these compound propositions.
𝒂) 𝑝 ∧ ¬𝑞 ∧ ¬𝑟
𝒃) (𝑝 ∧ 𝑞 ∧ 𝑟) ∨ 𝑠
𝒄) (𝑝 ∨ 𝑭) ∧ (𝑞 ∨ 𝑻)

Laws of Logic
Example 1:
Using laws of logic Show 𝑡ℎ𝑎𝑡 ¬ (𝑝 → 𝑞) 𝑎𝑛𝑑 𝑝 ∧ ¬𝑞 are logically equivalent.

Example 2:
Using laws of logic Show that ¬ [p ∨ (¬ p ∧ q)] and ¬ p ∧ ¬ q are logically equivalent by
developing a series of logical equivalences.

Example 3:
Using laws of logic Show that (𝑝 ∧ 𝑞) → (𝑝 ∨ 𝑞) is a tautology.

Example4: Simplify the following statements:


a) ¬(𝑝 ∨ ¬𝑞)
b) ¬(¬𝑝 ∧ 𝑞)
c) ¬(¬𝑝 ∨ ¬𝑞)
d) (𝑝 ∨ 𝑞) ∧ ¬𝑝
e) 𝑝 ∨ (𝑝 ∧ 𝑞)
f) (𝑝 ∨ 𝑞) ∧ (¬𝑝 ∨ 𝑞)
Example 5: Using laws of logic show the logical equivalences
𝑎) [(𝑝 ∨ 𝑞) ∧ (𝑝 ∨ ¬𝑞)] ≡ (𝑝 ∨ 𝑞)
𝑏) 𝑝 ∨ [𝑝 ∧ (𝑝 ∨ 𝑞)] ≡ 𝑝
𝑐) [𝑝 ∧ (¬𝑝 ∨ 𝑞)] ∨ [𝑞 ∧ ¬(𝑝 ∧ 𝑞)] ≡ 𝑞

You might also like