Additional Notes Unit-2
Additional Notes Unit-2
01 Mathematical Logic
Subtopics
1.1 Statement
1.2 Logical Connectives, Compound Statements and Truth Tables
1.3 Statement Pattern and Logical Equivalence Tautology, Contradiction
and Contingency
1.4 Quantifiers and Quantified Statements
1.5 Duality
1.6 Negation of Compound Statement
1.7 Algebra of Statements (Some Standard equivalent Statements)
1.8 Application of Logic to Switching Circuits
1
Std. XII : Perfect Maths - I
2
Chapter 01: Mathematical Logic
Introduction Note:
The sentences like exclamatory, interrogative,
Mathematics is an exact science. Every imperative etc., are not considered as statements as
mathematical statement must be precise. Hence, the truth value for these statements cannot be
there has to be proper reasoning in every determined.
mathematical proof.
Proper reasoning involves logic. The study of logic Open sentence
helps in increasing one’s ability of systematic and
logical reasoning. It also helps to develop the skills An open sentence is a sentence whose truth can vary
of understanding various statements and their according to some conditions, which are not stated
validity. in the sentence.
Logic has a wide scale application in circuit Note:
designing, computer programming etc. Hence, the Open sentence is not considered as statement in logic.
study of logic becomes essential.
For example:
Statement and its truth value
i. x × 5 = 20
There are various means of communication viz., This is an open sentence as its truth depends
verbal, written etc. Most of the communication on value of x (if x = 4, it is true and if x ≠ 4, it
involves the use of language whereby, the ideas are is false).
conveyed through sentences.
ii. Chinese food is very tasty.
There are various types of sentences such as: This is an open sentence as its truth varies
i. Declarative (Assertive) from individual to individual.
ii. Imperative (A command or a request)
iii. Exclamatory (Emotions, excitement) Exercise 1.1
iv. Interrogative (Question)
State which of the following sentences are
Statement statements. Justify your answer. In case of the
statements, write down the truth value.
A statement is a declarative sentence which is either
true or false but not both simultaneously. Statements i. The Sun is a star.
are denoted by the letters p, q, r…. ii. May God bless you!
For example: iii. The sum of interior angles of a triangle is
i. 3 is an odd number. 180°.
ii. 5 is a perfect square. iv. Every real number is a complex number.
iii. Sun rises in the east. v. Why are you upset?
iv. x + 3 = 6, when x = 3. vi. Every quadratic equation has two real
roots.
Truth Value
vii. −9 is a rational number.
A statement is either True or False. The Truth value 2
of a ‘true’ statement is defined to be T (TRUE) and viii. x − 3x + 2 = 0, implies that x = −1 or x = −2.
that of a ‘false’ statement is defined to be F ix. The sum of cube roots of unity is one.
(FALSE). x. Please get me a glass of water.
xi. He is a good person.
Note: 0 and 1 can also be used for T and F
xii. Two is the only even prime number.
respectively.
xiii. sin 2θ = 2sin θ cos θ for all θ ∈ R.
Consider the following statements: xiv. What a horrible sight it was!
i. There is no prime number between 23 and 29.
xv. Do not disturb.
ii. The Sun rises in the west.
iii. The square of a real number is negative. xvi. x2 − 3x − 4 = 0, x = −1.
iv. The sum of the angles of a plane triangle is xvii. Can you speak in French?
180°. xviii. The square of every real number is positive.
Here, the truth value of statement i. and iv. is T and xix. It is red in colour.
that of ii. and iii. is F. xx. Every parallelogram is a rhombus.
3
Std. XII : Perfect Maths - I
Solution: Compound Statements:
i. It is a statement which is true, hence its truth The new statement that is formed by combining two
value is ‘T’. or more simple statements by using logical
ii. It is an exclamatory sentence, hence, it is not a connectives are called compound statements.
statement.
iii. It is a statement which is true, hence its truth Component Statements:
value is ‘T’. The simple statements that are joined using logical
iv. It is a statement which is true, hence its truth connectives are called component statements.
value is ‘T’. For example:
v. It is an interrogative sentence, hence it is not a Consider the following simple statements,
statement. i. e is a vowel
vi. It is a statement which is false, hence its truth ii. b is a consonant
value is ‘F’.
vii. It is a statement which is false, hence its truth These two component statements can be joined by
value is ‘F’. using the logical connective ‘or’ as shown below:
viii. It is a statement which is false, hence its truth ‘e is a vowel or b is a consonant’
value is ‘F’. The above statement is called compound statement
ix. It is a statement which is false, hence its truth formed by using logical connective ‘or’.
value is ‘F’.
x. It is an imperative sentence, hence it is not a Truth Table
statement. A table that shows the relationship between truth
xi. It is an open sentence, hence it is not a values of simple statements and the truth values of
statement. compounds statements formed by using these simple
xii. It is a statement which is true, hence its truth statements is called truth table.
value is ‘T’.
xiii. It is a statement which is true, hence its truth Note:
value is ‘T’. The truth value of a compoud statement depends
xiv. It is an exclamatory sentence, hence it is not a upon the truth values of its component statements.
statement. Logical Connectives
xv. It is an imperative sentence, hence it is not a
statement. A. AND [ ∧ ] (Conjunction):
xvi. It is a statement which is true, hence its truth If p and q are any two statements connected
value is ‘T’. by the word ‘and’, then the resulting
xvii. It is an interrogative sentence, hence, it is not compound statement ‘p and q’ is called
a statement. conjunction of p and q which is written in the
xviii. It is a statement which is false, hence its truth symbolic form as ‘p ∧ q’.
value is ‘F’. (Since, 0 is a real number and For example:
square of 0 is 0 which is neither positive nor p: Today is a pleasant day.
negative).
q: I want to go for shopping.
xix. It is an open sentence, hence it is not a
The conjunction of above two statements is
statement. (The truth of this sentence depends
‘p ∧ q’ i.e. ‘Today is a pleasant day and I want
upon the reference for the pronoun ‘It’.)
to go for shopping’.
xx. It is a statement which is false, hence its truth
value is ‘F’. A conjunction is true if and only if both p and
q are true.
Logical Connectives, Compound Statements and Truth table for conjunction of p and q is as
Truth Tables shown below:
Logical Connectives: p q p ∧ q
The words or group of words such as “and, or, if …. T T T
then, if and only if, not” are used to join or connect T F F
two or more simple sentences. These connecting F T F
words are called logical connectives. F F F
4
Chapter 01: Mathematical Logic
Note: Solution:
The words such as but, yet, still, inspite, i. Let p : Mango is a fruit, q : Potato is a vegetable.
though, moreover are also used to connect the ∴ The symbolic form of the given statement is
simple statements. p ∧ q.
These words are generally used by replacing
ii. Let p : We play football, q : We go for cycling.
‘and’.
∴ The symbolic form of the given statement is
B. OR [ ∨ ] (Disjunction): p ∨ q.
If p and q are any two statements connected by iii. Let p : Milk is white, q : Grass is green.
the word ‘or’, then the resulting compound ∴ The symbolic form of the given statement is
statement ‘p or q’ is called disjunction of p and p ∨ q.
q which is written in the symbolic form as
iv. Let p : Rahul has physical disability,
‘p ∨ q’. q : Rahul stood first in the class.
The word ‘or’ is used in English language in The given statement can be considered as ‘Rahul
two distinct senses, exclusive and inclusive. has physical disability and he stood first in the
For example: class.’
i. Rahul will pass or fail in the exam. ∴ The symbolic form of the given statement is
p ∧ q.
ii. Candidate must be graduate or
post-graduate. v. Let p : Jagdish stays at home,
In eg. (i), ‘or’ indicates that only one of the q : Shrijeet and Shalmali go for a movie.
The given statement can be considered as
two possibilities exists but not both which is
‘Jagdish stays at home and Shrijeet and Shalmali
called exclusive sense of ‘or’. In eg. (ii), ‘or’ go for a movie.’
indicates that first or second or both the ∴ The symbolic form of the given statement is
possibilities may exist which is called p ∧ q.
inclusive sense of ‘or’.
2. Write the truth values of following
A disjunction is false only when both p and q statements.
are false.
i. 3 is a rational number or 3 + i is a
Truth table for disjunction of p and q is as complex number.
shown below: ii. Jupiter is a planet and Mars is a star.
iii. 2 + 3 ≠ 5 or 2 × 3 < 5
p q p∨ q iv. 2 × 0 = 2 and 2 + 0 = 2
T T T v. 9 is a perfect square but 11 is a prime
T F T number.
F T T vi. Moscow is in Russia or London is in
F F F France.
Solution:
Exercise 1.2
i. Let p : 3 is a rational number,
1. Express the following statements in q : 3 + i is a complex number.
∴ The symbolic form of the given statement is
symbolic form:
p ∨ q.
i. Mango is a fruit but potato is a Since, truth value of p is F and that of q is T.
vegetable.
∴ truth value of p ∨ q is T
ii. Either we play football or go for
cycling. ii. Let p : Jupiter is a planet,
iii. Milk is white or grass is green. q : Mars is a star.
iv. Inspite of physical disability, Rahul ∴ The symbolic form of the given statement is
stood first in the class. p ∧ q.
v. Jagdish stays at home while Shrijeet Since, truth value of p is T and that of q is F.
and Shalmali go for a movie. ∴ truth value of p ∧ q is F
5
Std. XII : Perfect Maths - I
iii. Let p : 2 + 3 ≠ 5, vii. Zero is not a complex number.
q : 2 × 3 < 5. viii. Re (z) ≤ | z |.
∴ The symbolic form of the given statement is ix. The sun sets in the East.
p ∨ q. x. It is not true that the mangoes are inexpensive.
Since, truth value of both p and q is F. Solution:
∴ truth value of p ∨ q is F i. Rome is not in Italy.
iv. Let p : 2 × 0 = 2, ii. 5 + 5 ≠ 10
q : 2 + 0 = 2. iii. 3 is not greater than 4.
∴ The symbolic form of the given statement is iv. John is not good in river rafting.
p ∧ q. v. π is not an irrational number.
Since, truth value of p is F and that of q is T. vi. The square of a real number is not positive.
∴ truth value of p ∧ q is F vii. Zero is a complex number.
viii. Re (z) > |z|.
v. Let p : 9 is a perfect square, ix. The sun does not set in the East.
q : 11 is a prime number. x. It is true that the mangoes are inexpensive.
∴ The symbolic form of the given statement is
p ∧ q.
D. If….then (Implication, →) (Conditional):
Since, truth value of both p and q is T.
If p and q are any two simple statements, then
∴ truth value of p ∧ q is T
the compound statement, ‘if p then q’,
vi. Let p : Moscow is in Russia, meaning “statement p implies statement q or
q : London is in France. statement q is implied by statement p”, is
∴ The symbolic form of the given statement is called a conditional statement and is denoted
p ∨ q. by p → q or p ⇒ q.
Since, truth value of p is T and that of q is F. Here p is called the antecedent (hypothesis)
∴ truth value of p ∨ q is T and q is called the consequent (conclusion).
C. Not [~] (Negation): For example:
If p is any statement then negation of p Let p: I travel by train.
i.e., ‘not p’ is denoted by ~p. Negation of any q: My journey will be cheaper.
simple statement p can also be formed by Here the conditional statement is
writing ‘It is not true that’ or ‘It is false that’,
before p. ‘p → q: If I travel by train then my journey
will be cheaper.’
For example:
Conditional statement is false if and only if
p : Mango is a fruit.
antecedent is true and consequent is false.
~p : Mango is not a fruit.
Truth table for conditional is as shown
Truth table for negation is as shown below:
below:
p ~p
T F p q p→q
F T T T T
T F F
Note: If a statement is true its negation is false F T T
and vice-versa. F F T
Exercise 1.3 Note: Equivalent forms of the conditional
Write negations of the following statements: statement
i. Rome is in Italy. p → q:
ii. 5 + 5 = 10 a. p is sufficient for q.
iii. 3 is greater than 4. b. q is necessary for p.
iv. John is good in river rafting. c. p implies q.
v. π is an irrational number. d. p only if q.
vi. The square of a real number is positive. e. q follows from p.
6
Chapter 01: Mathematical Logic
E. Converse, Inverse and Contrapositive
Exercise 1.4
statements:
If p → q is given, then its 1. Express the following in symbolic form.
converse is q→p i. I like playing but not singing.
inverse is ~p → ~q ii. Anand neither likes cricket nor tennis.
contrapositive is ~q → ~p iii. Rekha and Rama are twins.
For example: iv. It is not true that ‘i’ is a real number.
Let p : Smita is intelligent. v. Either 25 is a perfect square or 41 is
q : Smita will join Medical. divisible by 7.
i. q → p: If Smita joins Medical then she vi. Rani never works hard yet she gets
is intelligent. good marks.
ii. ~p → ~q: If Smita is not intelligent then vii. Eventhough it is not cloudy, it is still
she will not join Medical. raining.
iii. ~q → ~p: If Smita does not join Medical Solution:
then she is not intelligent. i. Let p: I like playing, q: I like singing,
Consider, the following truth table: ∴ The symbolic form of the given statement is
p ∧ ~q.
p q p→q ~p ~q q→p ~q→~p ~p →~q
T T T F F T T T ii. Let p: Anand likes cricket, q: Anand likes tennis.
T F F F T T F T ∴ The symbolic form of the given statement is
F T T T F F T F ~p ∧ ~q.
F F T T T T T T
iii. In this statement ‘and’ is combining two nouns
From the above table, we conclude that and not two simple statements.
i. a conditional statement and its Hence, it is not used as a connective, so given
contrapositive are always equivalent. statement is a simple statement which can be
ii. converse and inverse of the conditional symbolically expressed as p itself.
statement are always equivalent.
iv. Let, p : ‘i’ is a real number.
F. If and only if (Double Implication, ↔) ∴ The symbolic form of the given statement is ~p.
(Biconditional):
v. Let p : 25 is a perfect square,
If p and q are any two statements, then
q : 41 is divisible by 7.
‘p if and only if q’ or ‘p iff q’ is called the
biconditional statement and is denoted by ∴ The symbolic form of the given statement is
p ↔ q. Here, both p and q are called p ∨ q.
implicants. vi. Let p : Rani works hard, q : Rani gets good
marks.
For example:
Let p : price increases ∴ The symbolic form of the given statement is
q : demand falls ~p ∧ q.
Here the Biconditional statement is vii. Let p : It is cloudy, q : It is still raining.
‘p ↔ q : Price increases if and only if demand ∴ The symbolic form of the given statement is
falls’. ~p ∧ q.
A biconditional statement is true if and only if
both the implicants have same truth value. 2. If p: girls are happy, q: girls are playing,
Truth table for biconditional is as shown express the following sentences in symbolic
below: form.
i. Either the girls are happy or they are
p q p↔q not playing.
T T T ii. Girls are unhappy but they are
T F F playing.
F T F iii. It is not true that the girls are not
F F T playing but they are happy.
7
Std. XII : Perfect Maths - I
Solution: vi. Let p: 3 + 5 > 7, q: 4 + 6 < 10
i. p ∨ ~q ii. ~p ∧ q ∴ The symbolic form of the given statement is
iii. ~(~q ∧ p) p ↔ q.
Since, truth value of p is T and that of q is F.
3. Find the truth value of the following ∴ truth value of p ↔ q is F
statements.
4. State the converse, inverse and
i. 14 is a composite number or 15 is a contrapositive of the following conditional
prime number. statements:
ii. Neither 21 is a prime number nor it is i. If it rains then the match will be
divisible by 3. cancelled.
iii. It is not true that 4+3i is a real ii. If a function is differentiable then it is
number. continuous.
iv. 2 is the only even prime number and 5 iii. If surface area decreases then the
divides 26. pressure increases.
v. Either 64 is a perfect square or 46 is a iv. If a sequence is bounded then it is
prime number. convergent.
vi. 3 + 5 > 7 if and only if 4 + 6 < 10. Solution:
Solution: i. Let p : It rains, q : the match will be cancelled.
i. Let p : 14 is a composite number, ∴ The symbolic form of the given statement is
q : 15 is a prime number. p → q.
∴ The symbolic form of the given statement is Converse: q → p
p ∨ q. i.e., If the match is cancelled then it rains.
Since, truth value of p is T and that of q is F. Inverse: ~p → ~q
∴ truth value of p ∨ q is T. i.e., If it does not rain then the match will not be
cancelled.
ii. Let p: 21 is a prime number, Contrapositive: ~q → ~p
q: 21 is divisible by 3. i.e. If the match is not cancelled then it does
∴ The symbolic form of the given statement is not rain.
~p ∧ ~q. ii. Let p: A function is differentiable,
Since, truth value of p is F and that of q is T q: It is continuous.
∴ truth value of ~p ∧ ~q is F. ∴ The symbolic form of the given statement is
iii. Let p: 4 + 3i is a real number. p → q.
Converse: q → p
∴ The symbolic form of the given statement is ~p.
i.e. If a function is continuous then it is
Since, truth value of p is F.
differentiable.
∴ truth value of ~p is T.
Inverse: ~p → ~q
iv. Let p: 2 is the only even prime number, i.e. If a function is not differentiable then it
q: 5 divides 26. is not continuous.
∴ The symbolic form of the given statement is Contrapositive: ~q → ~p
p ∧ q.
i.e. If a function is not continuous then it is
Since, truth value of p is T and that of q is F
not differentiable.
∴ truth value of p ∧ q is F.
iii. Let p: Surface area decreases,
v. Let p: 64 is a perfect square, q: The pressure increases.
q: 46 is a prime number. ∴ The symbolic form of the given statement is
∴ The symbolic form of the given statement is p→q
p ∨ q. Converse: q → p
Since, truth value of p is T and that of q is F. i.e. If the pressure increases then the surface
∴ truth value of p ∨ q is T area decreases.
8
Chapter 01: Mathematical Logic
Inverse: ~p → ~q iv. ~(p ∧ ∼r) ∨ (∼q ∨ s)
i.e. If the surface area does not decrease ≡ ∼ (T ∧ T) ∨ (F ∨ F)
then the pressure does not increase. ≡ ∼ (T) ∨ F
Contrapositive: ~q → ~p ≡F∨F
i.e. If the pressure does not increase then the ≡F
surface area does not decrease.
∴ truth value of the given statement is false.
iv. Let p: A sequence is bounded,
q: It is convergent. 6. If p: It is daytime, q: It is warm
∴ The symbolic form of the given statement is Give the compound statements in verbal
p→q form denoted by
Converse: q → p i. p ∧ ∼q [Oct 14]
i.e. If a sequence is convergent then it is ii. p∨q
bounded. iii. p → q
Inverse: ~p → ~q iv. q ↔ p [Oct 14]
i.e. If a sequence is not bounded then it is Solution:
not convergent. i. It is daytime but it is not warm. [1 Mark]
Contrapositive: ~q → ~p ii. It is daytime or it is warm.
i.e. If a sequence is not convergent then it is iii. If it is daytime then it is warm.
not bounded. iv. It is warm if and only if it is daytime.
[1 Mark]
5. If p and q are true and r and s are false
statements, find the truth value of the
7. Prepare the truth tables for the following:
following statements:
i. ∼p ∧ q ii. p → (p ∨ q)
i. (p ∧ q) ∨ r
iii. ∼p ↔ q
ii. p ∧ (r → s)
Solution:
iii. (p ∨ s) ↔ (q ∧ r)
i. ∼p ∧ q
iv. ~ (p ∧ ∼r) ∨ (∼q ∨ s)
Solution: p q ~p ~p ∧ q
Given that p and q are T and r and s are F. T T F F
i. (p ∧ q) ∨ r T F F F
≡ (T ∧ T) ∨ F F T T T
≡T∨F F F T F
≡T
ii. p → (p ∨ q)
∴ truth value of the given statement is true.
p q p∨q p → (p ∨ q)
ii. p ∧ (r → s)
T T T T
≡ T ∧ (F → F) T F T T
≡T∧T F T T T
≡T F F F T
∴ truth value of the given statement is true. iii. ∼p ↔ q
iii. (p ∨ s) ↔ (q ∧ r)
p q ~p ~p ↔ q
≡ (T ∨ F) ↔ (T ∧ F) T T F F
≡T↔F T F F T
≡F F T T T
∴ truth value of the given statement is false. F F T F
9
Std. XII : Perfect Maths - I
Statement Pattern and Logical Equivalence ii. ~(p ∧ q) ≡ ~p ∨ ~q (De-Morgan’s 2nd Law)
identical
A. Statement Pattern
Let, p, q, r,… be simple statements. A p q ~p ~q p ∧ q ~(p ∧ q) ~p ∨ ~q
compound statement obtained from these T T F F T F F
simple statements and by using one or more T F F T F T T
connectives ∧, ∨, ~, →, ↔ is called a F T T F F T T
statement pattern. F F T T F T T
Following points must be noted while
preparing truth tables of the statement iii. p → q ≡ (~p) ∨ q
patterns: identical
i. Parentheses must be introduced
wherever necessary. p q ~p p→ql ~p ∨ q
For example: T T F T T
~ (p ∧ q) and ~ p ∧ q are not the same. T F F F F
ii. If a statement pattern consists of ‘n’ F T T T T
statements and ‘m’ connectives, then F F T T T
truth table consists of 2n rows and
(m + n) columns. iv. p ↔ q ≡ (p → q) ∧ (q → p)
[Mar 98, Oct 00, 01,04]
B. Logical equivalence identical
Two logical statements are said to be
equivalent if and only if the truth values in p q p → q q → p p ↔ q (p → q) ∧ (q → p)
their respective columns in the joint truth table T T T T T T
are identical. T F F T F F
If S1 and S2 are logically equivalent statement F T T F F F
patterns, we write F F T T T T
S1 ≡ S2.
For example: Tautology, Contradiction and Contingency
To prove: p ∧ q ≡ ~(p → ~q)
[Mar 08] Tautology
16
Chapter 01: Mathematical Logic
≡ (~q ∧ r) ∨ (~p ∧ ~q) i. Switches S1 and S2 connected in series:
…. (Negation of negation)
As shown in the above figures, if the switch is on ii. Switches S1 and S2 are in parallel
i.e., circuit is closed, current passes through the
circuit and vice-versa. S1
Consider a simple circuit having a switch ‘S’, a S2
battery and a lamp ‘L’. When the switch ‘S’ is L
closed (i.e., ON, current is flowing through the
circuit), the lamp glows (is on). Similarly, when the
swtich is open (i.e., OFF, current is not flowing Let p : the switch S1 is closed
through the circuit), the lamp does not glow (is off). q : the switch S2 is closed
l : the lamp glows
In this case, the lamp glows, if at least one of
S
the switches is closed.
Battery Lamp L
Thus, we have p ∨ q ≡ l,
Input – output (switching) table:
Thus, if p is a statement ‘the switch is closed’ and if p q p∨q
l is a statement ‘the lamp glows’ then p is equivalent T (1) T (1) T (1)
to l i.e p ≡ l. T (1) F (0) T (1)
F (0) T (1) T (1)
Note:
i. ~p means ‘the switch is open’. In this case, F (0) F (0) F (0)
the lamp will not glow and thus ∼ p ≡ ∼ l. The above two networks can be combined
to form a complicated network as shown
ii. If a switch is ‘ON’ then its truth value is T or below:
1 and if the switch is ‘OFF’, its truth value is
F or 0. S1 S2
L
If there are two switches, then they can be
connected in the following ways: S3
17
Std. XII : Perfect Maths - I
Let p : The switch S1 is closed ∴ Symbolic form of the given circuit is,
q : The switch S2 is closed [(p ∧ q) ∨ (∼ p ∧ ∼ r)] ∧ (p ∨ q ∨ r) ≡ l
r : The switch S3 is closed
l : The lamp glows Generally l is not written and therefore the
In this case, the lamp glows, if S1 and S2 both are symbolic form is
closed or if S3 is closed. [(p ∧ q) ∨ (∼ p ∧ ∼ r)] ∧ (p∨q ∨ r)
Thus we have, (p ∧ q) ∨ r ≡ l.
Note: i. If two or more switches in a circuit are Exercise 1.9
open or closed simultaneously, then they
are denoted by same letter and are called 1. Represent the following circuits
‘equivalent switches.’ symbolically and write the input-output or
ii. Any two switches in a circuit having switching table.
opposite states are called
complementary switches. S1
For example, if S1 and S2 are the two i.
switches such that when S1 is closed, S2
is open and vice-versa, then the switches S2
S1 and S2 are called complementary
switches and S2 is denoted as S1′ . In S1′ S′2
such a situation, one of them is
considered as p and the other as ~p or p′. L
iii. Two circuits are called equivalent if
output of the two circuits is always same.
iv. A circuit is called simpler if it contains
lesser number of switches. ii. S1 S2
Example : S3
Express the following circuit in the symbolic form:
S1′ S′2
S1 S2 S1
L
S2
S1′ S′3 S3
iii.
S1 S3
S2
L
Solution: S2 S1′
Let p : The switch S1 is closed.
q : The switch S2 is closed.
r : The switch S3 is closed.
∼ p : The switch S1′ is closed. L
Switching Table: (p ∨ q)
(p ∨ q)
p q r ~p p ∨ q (r ∨ ~p) ∧q∧
p q ~p ~q p ∨ q ~p ∧ ~q (p ∨ q) ∨ (~p ∧ ~q) ∧q
(r ∨ ~p)
T T F F T F T
1 1 1 0 1 1 1 1
T F F T T F T
F T T F T F T 1 1 0 0 1 1 0 0
F F T T F T T 1 0 1 0 1 0 1 0
1 0 0 0 1 0 0 0
ii. Let p: The switch S1 is closed. 0 1 1 1 1 1 1 1
q: The switch S2 is closed. 0 1 0 1 1 1 1 1
r: The switch S3 is closed.
0 0 1 1 0 0 1 0
~p: The switch S1′ is closed or the switch S1 is
0 0 0 1 0 0 1 0
open.
~q: The switch S′2 is closed or the switch S2 is Switching table:
open.
(p ∨ q) (p ∨ q) ∧ q ∧
∴ The symbolic form of the given circuit is p q r ~p p ∨ q r ∨ ~p
∧q (r ∨ ~p)
[(p ∧ q) ∨ (~p ∧ ~q)] ∧ r.
Let a ≡ (p ∧ q), b ≡ (∼p ∧ ∼q) T T T F T T T T
T T F F T T F F
Input-output Table: T F T F T F T F
p q r ~p ~q a b a∨b (a ∨ b) ∧ r T F F F T F F F
1 1 1 0 0 1 0 1 1 F T T T T T T T
F T F T T T T T
1 1 0 0 0 1 0 1 0
F F T T F F T F
1 0 1 0 1 0 0 0 0
F F F T F F T F
1 0 0 0 1 0 0 0 0
0 1 1 1 0 0 0 0 0
2. Construct the switching circuits of the
0 1 0 1 0 0 0 0 0
following statements.
0 0 1 1 1 0 1 1 1
i. [p ∨ (~p ∧ q)] ∨ [(∼q ∧ r) ∨ ∼p]
0 0 0 1 1 0 1 1 0 [Mar 15]
Switching table: ii. (p ∧ q ∧ r) ∨ [∼p ∨ (q ∧ ∼r)]
iii. [(p ∧ r) ∨ (~q ∧ ∼r)] ∨ (~p ∧ ~r)
p q r ~p ~q a b a ∨ b (a ∨ b) ∧ r
Solution:
T T T F F T F T T
T T F F F T F T F i. Let p: The switch S1 is closed
T F T F T F F F F q: The switch S2 is closed.
T F F F T F F F F r: The switch S3 is closed.
F T T T F F F F F ~p: The switch S1′ is closed or the switch S1 is
F T F T F F F F F open.
F F T T T F T T T ~q: The switch S′2 is closed or the switch S2 is
F F F T T F T T F open.
iii. Let p: The switch S1 is closed ~r : The switch S′3 is closed or the switch S3 is
q: The switch S2 is closed open. [1 Mark]
19
Std. XII : Perfect Maths - I
Consider the given statement,
S1 S2 S3
[p ∨ (∼ p ∧ q )] ∨ [(∼q ∧ r) ∨ ∼ p].
p ∨ (∼p ∧ q): represents that switch S1 is S′1
S1′ S2S1
S2
S3 S′2 S3S2
L L
21
Std. XII : Perfect Maths - I
5. Find the symbolic form of the following ∼q : The switch S′2 is closed or the switch S2 is
switching circuit, construct its switching open.
table and interpret your result. ∴ The symbolic form of the given circuit is
[p ∧ (~p ∨ ~q)] ∧ q
S1
≡ [(p ∧ ~p) ∨ (p ∧ ~q)] ∧ q
….[Associative and Distributive law]
S1′ S′2
≡ [F ∨ (p ∧ ~q)] ∧ q ….[Complement law]
S2 ≡ (p ∧ ~q) ∧ q ….[Identity law]
≡ (p ∧ q) ∧ (~q ∧ q) ….[Distributive law]
≡ (p ∧ q) ∧ F ….[Complement law]
L ≡F ….[Identity law]
Solution: ∴ Irrespective of the status of the switches, the
Let p : The Switch S1 is closed. current will not flow in the circuit, that is, the
q : The Switch S2 is closed. circuit will always be open.
∼p : The Switch S1′ is closed or the switch S1 is Miscellaneous Exercise - 1
open.
∼q : The switch S′2 is closed or the switch S2 is 1. Which of the following sentences are
statements in logic? Justify your answer.
open.
∴ The symbolic form of the given circuit is: i π is a real number.
(p∨q) ∧ (∼p) ∧ (∼q) ii. 5! = 120
iii. Himalaya is an ocean and Ganga is a
Switching table: river.
p q ∼p ∼q p∨q (p∨q) ∧ (∼p) ∧ (∼q) iv. Please get me a cup of tea.
T T F F T F v. Bring me a notebook.
T F F T T F vi. Alas! We lost the match
F T T F T F vii. cos 2θ = cos2 θ − sin2 θ, for all θ ∈ R.
F F T T F F viii. If x is a real number then x2 ≥ 0.
Solution:
In the above truth table, all the entries in the last
i. It is a statement.
column are ‘F’,
ii. It is a statement.
∴ the given circuit represents a contradiction.
iii. It is a statement.
∴ Irrespective of whether the switches S1 and S2
are open or closed, the given circuit will iv. It is an imperative sentence, hence it is not a
always be open (i.e. off). statement.
v. It is an imperative sentence, hence it is not a
6. Simplify the given circuit by writing its logical statement.
expression. Also write your conclusion. vi. It is an exclamatory sentence, hence it is not a
statement.
S1′ vii. It is a statement.
viii. It is a statement.
S1 S2
23
Std. XII : Perfect Maths - I
iii. Let p: I can travel by train, Solution:
q: I get my ticket reserved. The symbolic forms of the given statements are:
∴ The symbolic form of the given statement is i. ~p → ~q ii. p↔q
q → p. iii. ~(~p ∨ q) iv. p ∧ ~q
v. q→p
iv. Let p: Sandeep likes tea,
q: Sandeep likes coffee. Truth table for all the above statements:
r: Sandeep enjoys a soft-drink. p q ∼p ∼q (∼p∨q) (i) (ii) (iii) (iv) (v)
∴ The symbolic form of the given statement is T T F F T T T F F T
(~p ∧ ~q) ∧ r. T F F T F T F T T T
v. Let p: ABC is a triangle, F T T F T F F F F F
F F T T T T T F F T
q: AB + BC > AC.
∴ The symbolic form of the given statement is Note: In the above table, the numbers (i), (ii), (iii), (iv)
p → q. and (v) represent corresponding statements.
vi. Let p: Rajesh is studious, In the above table, the columns of statements (i) and (v)
q: Rajesh gets good marks. are same.
∴ The symbolic form of the given statement is ∴ They are logically equivalent.
p ∧ ~q. Similarly, the columns of statements (iii) and (iv) are same.
∴ They are also logically equivalent.
6. If p : The examinations are approaching, 8. Rewrite the following statements without
q : Students study hard, give a verbal using the conditional form:
statement for each of the following: i. If prices increase then the wages rise.
i. p ∧ ∼q ii. p↔q ii. If it is cold, we wear woolen clothes.
iii. ∼p → q iv. p ∨ q iii. I can catch cold if I take cold water bath.
Solution:
v. ∼q → ∼p
Solution: All these statements are of the form p → q ≡ ∼p ∨ q.
∴ The statements without using conditional form
i. The examinations are approaching but the
students do not study hard. will be,
i. Prices do not increase or the wages rise.
ii. The examinations are approaching if and only
ii. It is not cold or we wear woolen clothes.
if the students study hard.
iii. I do not take cold water bath or I catch cold.
iii. If the examinations are not approaching, then
the students study hard. 9. If p, q, r are statements with truth values T,
iv. The examinations are approaching or the F, T respectively, determine the truth
students study hard. values of the following:
v. If the students do not study hard then the i. q → (p ∨ ∼r)
examinations are not approaching. ii. (∼r ∧ p) ∨ ∼q
iii. (p → q) ∨ r
7. If p: It is raining, q: The weather is humid, iv. (r ∧ q) ↔ ∼p [July 16]
which of the following statements are v. (p ∨ q) → (q ∨ r)
logically equivalent? Justify! Solution:
i. If it is not raining then the weather is Truth value of p, q and r are T, F and T respectively.
not humid. i. q → (p ∨ ~r)
ii. It is raining if and only if the weather is ≡ F → (T ∨ ~T)
humid. ≡ F → (T ∨ F)
iii. It is not true that it is not raining or ≡F→T
the weather is humid. ≡T
iv. It is raining but the weather is not Hence, the truth value is ‘T’.
humid. ii. (~r ∧ p) ∨ ~q
v. The weather is humid only if it is ≡ (~T ∧ T) ∨ ~F
raining. ≡ (F ∧ T) ∨ T
24
Chapter 01: Mathematical Logic
≡F∨T Solution:
≡T i. Let, p: 6 is an even number.
Hence, the truth value is ‘T’. q: 36 is a perfect square.
iii. (p → q) ∨ r ∴ The given statement is of the form p ∨ q
≡ (T → F) ∨ T Its Negation is ∼p ∧ ∼q
i.e. 6 is not an even number and 36 is not a perfect
≡F∨T
square.
≡T
Hence, the truth value is ‘T’. ii. Let, p: Diagonals of a parallelogram are
iv. (r ∧ q) ↔ ∼p perpendicular.
≡ (T ∧ F) ↔ ∼T q : It is a rhombus.
∴ The given statement is of the form p → q.
≡ (T ∧ F) ↔ F [1 Mark]
Its negation is p ∧ ∼q.
≡ F↔F
≡T i.e. diagonals of a parallelogram are perpendicular
Hence, the truth value is ‘T’ [1 Mark] but it is not a rhombus.
v. (p ∨ q) → (q ∨ r) iii. Let, p : 10 > 5 and 5 < 8
≡ (T ∨ F) → (F ∨ T) q:8<7
≡T→T ∴ The given statement is of the form p → q
≡T Its negation is p ∧ ∼ q
Hence, the truth value is ‘T’. i.e, 10 > 5 and 5 < 8 but 8 ≥ 7.
iv. Let, p: A person is rich.
10. Change each of the following statement in q: He is a software engineer.
the form if… then… ∴ The given statement is of the form p ↔ q.
i. I shall come provided I finish my Its negation is (p ∧ ∼ q) ∨ (q ∧ ∼ p)
work. i.e., a person is rich and he is not a software
ii. Rights follow from performing the engineer or a person is software engineer and
duties sincerely. he is not rich.
iii. x = 1 only if x2 = x.
iv. The sufficient condition for being rich v. Let, p: Mangoes are delicious.
is to be rational. q: Mangoes are expensive.
v. Getting bonus is necessary condition ∴ The given statement is of the form p ∧ q
for me to purchase a car. Its negation is, ∼p ∨ ∼q.
Solution: i.e., mangoes are not delicious or they are not
i. If I finish my work then I shall come. expensive.
ii. If the duties are performed sincerely then the
rights follow. vi. Let, p: Sky is not blue.
iii. If x = 1 then x2 = x. ∴ The given statement is of the form (∼p)
iv. If a man is rational, then he is rich. Its negation will be, ∼(∼p) ≡ p
v. If I purchase a car then I get bonus. i.e., sky is not blue.
11. Write negations of the following statements: vii. Let, p: The weather is fine.
i. 6 is an even number or 36 is a perfect q: My friends are coming.
square. r: We go for a picnic.
ii. If diagonals of a parallelogram are ∴ The given statement is of the form p → (q ∧ r)
perpendicular then it is a rhombus. Its negation is, p ∧ ∼(q ∧ r) ≡ p ∧ (∼q ∨ ∼ r)
iii. If 10 > 5 and 5 < 8 then 8 < 7. i.e., the weather is fine but my friends are not
iv. A person is rich if and only if he is a coming or we are not going for a picnic.
software engineer.
12. Construct the truth table for each of the
v. Mangoes are delicious but expensive.
vi. It is false that the sky is not blue. following statement patterns:
vii. If the weather is fine then my friends i. p → (q → p)
will come and we go for a picnic. ii. (~ p ∨ ~ q) ↔ [~ (p ∧ q)]
25
Std. XII : Perfect Maths - I
iii. ~(~p ∧ ~q) ∨ q T F F F F T F F T
iv. [(p ∧ q) ∨ r] ∧ [~r ∨ (p ∧ q)] F T T T T T T T T
F T F T T F F T T
v. [(∼p ∨ q) ∧ (q → r)] → (p → r)
F F T T T T T T T
Solution:
F F F T T T T T T
i. p → (q → p)
13. Using truth tables show that following
p q q→p p → (q → p)
statement patterns are tautologies.
T T T T i. [(p → q) ∧ ∼q] → (∼p)
T F T T ii. (p → q) ∨ (q → p)
F T F T iii. [p → (q → r)] ↔ [(p ∧ q) → r]
F F T T Solution:
i.
ii. (~p ∨ ~ q) ↔ [~ (p ∧ q)]
[(p → q) [(p → q) ∧
p q ~p ~q (p → q)
(~p ∨ ~q ) ↔ ∧ ~q ] ~q] → (~p)
p q ~p ~q ~p ∨ ~q p ∧ q ~(p ∧ q)
[~(p ∧ q)] T T F F T F T
T T F F F T F T T F F T F F T
T F F T T F T T F T T F T F T
F T T F T F T T F F T T T T T
F F T T T F T T
In the above truth table, all the entries in the
iii. ~(~p ∧ ~q) ∨ q last column are T.
∴ The given statement pattern is a tautology.
p q ~p ~q ~p ∧ ~q ~(~p ∧~q) ~(~p ∧ ~q) ∨ q
ii.
T T F F F T T p q p→q q→p (p → q) ∨ (q → p)
T F F T F T T
T T T T T
F T T F F T T
T F F T T
F F T T T F F
F T T F T
iv. [(p ∧ q) ∨ r] ∧ [~r ∨ (p ∧ q)] F F T T T
[(p ∧ q) ∨ [~r ∨ [(p ∧ q) ∨ r] ∧ In the above truth table, all the entries in the
p q r p∧q ~r last column are T.
r] (p ∧ q)] [~r ∨ (p ∧ q)]
∴ The given statement pattern is a tautology.
T T T T T F T T
T T F T T T T T iii.
T F T F T F F F q [p → (q → r)]
[p → [(p∧ q)
T F F F F T T F p q r → (p ∧ q) ↔[(p∧ q)
(q → r)] → r]
F T T F T F F F r → r]
F T F F F T T F T T T T T T T T
F F T F T F F F T T F F F T F T
F F F F F T T F T F T T T F T T
T F F T T F T T
v. [(∼p ∨ q) ∧ (q → r)] → (p → r)
F T T T T F T T
[(~p ∨ q) ∧ F T F F T F T T
(~p ∨ q) ∧
p q r ~p ~p ∨q q → r p → r (q → r)] → F F T T T F T T
(q → r)
( p → r) F F F T T F T T
T T T F T T T T T In the above truth table, all the entries in the
T T F F T F F F T last column are T.
T F T F F T F T T ∴ The given statement pattern is a tautology.
26
Chapter 01: Mathematical Logic
14. Using truth tables show that following ii. (p ∨ q) is T and (p ∨ q) → q is F.
statement patterns are contradictions. Consider the following truth table:
i. [(p ∨ q) ∧ ∼p] ∧ (∼q)
ii. (p ∧ q) ∧ (∼p ∨ ∼q) p q p∨q (p ∨ q) → q
Solution:
T T T T
i.
T F T F
[(p ∨ q) ∧ ~p]
p q ~p ~q p ∨ q [(p ∨ q) ∧ ~p]
∧ (~q) F T T T
T T F F T F F
T F F T T F F F F F T
F T T F T T F
∴ If (p ∨ q) is T and (p ∨ q) → q is F, then p is
F F T T F F F true and q is false i.e., truth value of p is T and
In the above truth table, all the entries in the that of q is F.
last column are F. iii. (p ∧ q) is F and (p ∧ q) → q is T
∴ The given statement pattern is a contradiction.
Consider the following truth table:
ii.
p q p∧q (p ∧ q) → q
(p ∧ q) ∧
p q ~p ~q p ∧ q (~p ∨ ~q) T T T T
(~p ∨ ~q)
T T F F T F F
T F F T
T F F T F T F
F T T F F T F F T F T
F F T T F T F
F F F T
In the above truth table, all the entries in the
last column are F. ∴ If (p ∧ q) is F and (p ∧ q) → q is T, then there
∴ The given statement pattern is a contradiction. are three possibilities for the truth value of
p and q.
15. Find truth values of p and q in the
Either, p is T and q is F or
following cases:
p is F and q is T or
i. (p ∨ q) is T and (p ∧ q) is T.
both p and q are F.
ii. (p ∨ q) is T and (p ∨ q) → q is F.
iii. (p ∧ q) is F and (p ∧ q) → q is T.
16. Determine whether the following statement
Solution: patterns are tautologies, contradictions or
i. (p ∨ q) is T and (p ∧ q) is T. contingencies.
Consider the following truth table: i. (p → q) ∧ (p ∧ ~q)
ii. (p ∧ q) ∨ (~p ∧ q) ∨ (p ∧ ~q) ∨ (~p ∧ ~q)
p q p∨q p∧q
iii. [p ∧ (p → q)] → q
T T T T iv. [(p ∨ ~q) ∨ (~p ∧ q)] ∧ r
Solution:
T F T F i.
F T T F p q p → q ~q p ∧ ~q (p → q) ∧
(p ∧ ~q)
F F F F T T T F F F
∴ If (p ∨ q) is T and (p ∧ q) is T, then both p and T F F T T F
q have to be true i.e. their truth value must be F T T F F F
T. F F T T F F
27
Std. XII : Perfect Maths - I
In the above truth table, all the entries in the Solution:
last column are F. i. Consider, RHS = ∼(p ∧ ∼q) ∧ ∼(q ∧ ∼p)
∴ (p → q) ∧ (p ∧ ~q) is a contradiction. ≡ ∼[(p ∧ ∼q) ∨ (q ∧ ∼p)]
ii. ….[Negation of disjunction]
≡ ∼[∼(p ↔ q)]
(p ∧ q) ∨ ….[Negation of double implication]
(~p ∧ q) ∨
p q ~p ~q p ∧ q ~p ∧ q p ∧ ~q ~p ∧ ~q ≡p↔q
(p ∧ ~q) ∨
….[Negation of negation]
(~p ∧ ~q)
= LHS.
T T F F T F F F T
∴ p ↔ q ≡ ∼(p ∧ ∼q) ∧ ∼(q ∧ ∼p)
T F F T F F T F T
F T T F F T F F T ii. Consider,
F F T T F F F T T LHS = ∼(p ∨ q) ∨ (∼p ∧ q)
≡ (∼p ∧ ∼q) ∨ (∼p ∧ q)
In the above truth table, all the entries in the …. (Negation of disjunction) [1 Mark]
last column are T.
≡ ∼p ∧ (∼q ∨ q)
∴ (p ∧ q) ∨ (~p ∧ q) ∨ (p ∧ ~q) ∨ (~p ∧ ~q) is a ….(Distributive law) [1 Mark]
tautology.
≡ ∼p ∧ T ....(Complement law)
iii. ≡∼p ....(Identity law) [1 Mark]
= RHS.
p q p → q p ∧ (p → q) [p ∧ (p → q)] → q
∴ ∼(p ∨ q) ∨ (∼p ∧ q) ≡ ∼p
T T T T T
T F F F T iii. Consider, RHS = (p ∨ q) ∧ ∼p
F T T F T ≡ (p ∧ ∼ p) ∨ (q ∧ ∼p)
F F T F T …. [Distributive law]
In the above truth table, all the entries in the ≡ (p ∧ ∼ p) ∨ (∼p ∧ q)
last column are T. ….[Commutative law]
∴ [p ∧ (p → q)] → q is a tautology. ≡ F ∨ (∼p ∧ q)
…. [Complement law]
iv.
≡∼p∧q …. [Identity law]
(p ∨ ~q) ∨ [(p ∨ ~q) ∨ = LHS
p q r ~p ~q p ∨ ~q ~p ∧ q
(~p ∧ q) (~p ∧ q)] ∧ r ∴ ∼ p ∧ q ≡ (p ∨ q) ∧ ∼p
T T T F F T F T T
T T F F F T F T F 18. Using truth tables prove the following
T F T F T T F T T logical equivalences:
T F F F T T F T F i. p ↔ q ≡ (p ∧ q) ∨ (∼p ∧ ∼q)
F T T T F F T T T ii. (p ∧ q) → r ≡ p → (q → r)
F T F T F F T T F Solution:
F F T T T T F T T i. Ref Exercise 1.5 Q2 (ii)
F F F T T T F T F
ii. Ref Exercise 1.5 Q2 (iii)
In the above truth table, the entries in the last
column are a combination of T and F.
19. Write converse, inverse and contrapositive
∴ [(p ∨ ~q) ∨ (~p ∧ q)] ∧ r is a contingency. of the following conditional statements:
i. If an angle is a right angle then its
17. Using the rules of logic, prove the following
measure is 90°.
logical equivalences.
ii. If two triangles are congruent then their
i. p ↔ q ≡ ~(p ∧ ~q) ∧ ~(q ∧ ~p) areas are equal. [Mar 15]
ii. ~(p ∨ q) ∨ (~p ∧ q) ≡ ~p [Mar 16] iii. If f(2) = 0 then f(x) is divisible by
iii. ~p ∧ q ≡ (p ∨ q) ∧ ~p (x − 2).
28
Chapter 01: Mathematical Logic
Solution: ≡ (~q ∨ p) ∨ q ….[Negation of negation]
i. Let p : An angle is a right angle, ≡ (p ∨ ~q) ∨ q ....[Commutative law]
q : Its measure is 90°. ≡ p ∨ (~q ∨ q) ....[Associative law]
∴ The symbolic form of the given statement is ≡p∨T ....[Complement law]
p → q. ≡T ....[Identity law]
Converse: q → p
Since, the truth value of the given statement pattern
i.e. If the measure of an angle is 90°, then it is a is T, therefore, it is a tautology.
right angle.
Inverse: ~p → ~q 21. Consider following statements.
i.e. If an angle is not a right angle, then its i. If a person is social then he is happy.
measure is not 90°. ii. If a person is not social then he is not
happy.
Contrapositive: ~q → ~p
iii. If a person is unhappy then he is not
i.e. If the measure of an angle is not 90° then it
social.
is not a right angle.
iv. If a person is happy then he is social.
ii. Let p : Two triangles are congruent, Identify the pairs of statements having
q : Their areas are equal. same meaning.
∴ The symbolic form of the given statement is Solution:
p → q. Let p: A person is social, q: He is happy.
Converse: q → p The symbolic forms of the given statements are:
i.e. If areas of two triangles are equal then they i. p→q
are congruent. [1 Mark]
ii. ~p → ~q
Inverse: ~p → ~q
iii. ~q → ~p
i.e. If two triangles are not congruent then their
iv. q → p
areas are not equal.
Contrapositive: ~q → ~p Statements (i) and (iii) have same meaning.
i.e. If areas of two triangles are not equal then they Since, a statement and its contrapositive are
are not congruent. [1 Mark] equivalent.
Also, statements (ii) and (iv) have the same
iii. Let p: f(2) = 0, meaning. Since, converse and inverse of a
q: f(x) is divisible by (x − 2) compound statement are also equivalent.
∴ The symbolic form of the given statement is
p → q. 22. Using the rules of logic, write the negations
Converse: q → p of the following statements:
i.e. If f(x) is divisible by (x − 2), then f(2) = 0. i. (p ∨ q) ∧ (q ∨ ∼r)
Inverse: ~p → ~q ii. (∼p ∧ q) ∨ (p ∧ ∼q)
i.e. If f(2) ≠ 0, then f(x) is not divisible by iii. p ∧ (q ∨ r)
(x − 2). iv. (p → q) ∧ r
Contrapositive: ~q → ~p Solution:
i.e. If f(x) is not divisible by (x−2) then f(2) ≠ 0. i. ~[(p ∨ q) ∧ (q ∨ ~r)]
≡ ~(p ∨ q) ∨ ~(q ∨ ~r)
20. Without using truth table, prove that ….[Negation of conjunction]
[(p ∨ q) ∧ ∼p] → q is a tautology. ≡ (~p ∧ ~q) ∨ (~q ∧ ~ (~r)]
Solution: ….[Negation of disjunction]
[(p ∨ q) ∧ ∼p] → q ≡ (~p ∧ ~q) ∨ (~q ∧ r)
≡ [(p ∧ ~p) ∨ (q ∧ ~p)] → q ….[Distributive law] ….[Negation of negation]
≡ [F ∨ (q ∧ ~p)] → q ….[Complement law] ≡ (∼ p ∧ ∼q) ∨ (r ∧ ∼q)
≡ (q ∧ ~p) → q ….[Identity law] ....[Commutative law]
≡ ~(q ∧ ~p) ∨ q …[Conditional law] ≡ (~p ∨ r) ∧ ~q
≡ [(~q ∨ ~(~p)] ∨ q ....[Negation of conjunction] ….[Distributive law]
29
Std. XII : Perfect Maths - I
ii. ∼[(∼ p ∧ q) ∨ (p ∧ ∼ q)] 24. Construct the switching circuits of the
≡ ∼(∼ p ∧ q) ∧ ∼ (p ∧ ∼q) following statements:
….[Negation of disjunction] i. (p ∧ ~q ∧ r) ∨ [p ∧ (~q ∨ ~r)]
≡ [∼(∼ p) ∨ ∼q] ∧ [∼ p ∨ ∼(∼ q)] ii. [(p ∧ r) ∨ (~q ∧ ~r)] ∧ (~p ∧ ~r)
….[Negation of conjunction] Solution:
≡ (p ∨ ∼q) ∧ [∼ p ∨ q) i. Let p: the switch S1 is closed.
….[Negation of negation] q: the switch S2 is closed.
iii. ∼[p ∧ (q ∨ r)] ≡ ∼p ∨ ∼(q ∨ r) r: the switch S3 is closed.
….[Negation of conjunction] ~q: the switch S′2 is closed or the switch S2
≡ ∼p ∨ (∼ q ∧ ∼ r) is open.
….[Negation of disjunction] ~r: the switch S′3 is closed or the switch S3
iv. ~[(p → q) ∧ r] is open.
≡ ~(p → q) ∨ ~r Consider the given statement,
....[Negation of conjunction] (p ∧ ~q ∧ r) ∨ [p ∧ (~q ∨ ~r)]
≡ (p ∧ ~q) ∨ ~r p ∧ ~q ∨ r: represents that the switches S1, S′2
....[Negation of implication] and S3 are connected in series.
23. Express the given circuits in symbolic form. p ∧ (~q ∨ ~r): represents that parallel
combination of S′2 and S′3 is connected in
i. S1 S2 series with S1.
Therefore, (p ∧ ~q ∧ r) ∨ [p ∧ (~q ∨ ~ r)]
represents that the circuits corresponding to
S1′ [(p ∧ ~q ∧ r) and [p ∧ (~ q ∨ ~r)] are
connected in parallel with each other.
Hence, the switching circuit of given statement is
S1 S′2
S1 S′2 S3
L
S′S2 '2
ii. S1 L
S1 S1 SS11 S′3
S2 S3
L ii. Let p: the switch S1 is closed
q: the switch S2 is closed
r: the switch S3 is closed
Solution: ~p: the switch S1′ is closed or the switch S1
i. Let p: the switch S1 is closed. is open.
q: the switch S2 is closed.
~q: the switch S′2 is closed or the switch S2
~p: the switch S1′ is closed or the switch S1
is open.
is open.
~r: the switch S′3 is closed or the switch S3 is
~q: the switch S′2 is closed or the switch S2
open.
is open.
Consider the given statement,
∴ The symbolic form of the given circuit is
[(p ∧ r) ∨ (~q ∧ ~r)] ∧ (~p ∧ ~r)
(p ∧ q) ∨ (~p) ∨ (p ∧ ~q)
(p ∧ r) ∨ (~q ∧ ~r): represents that series
ii. Let p: the switch S1 is closed combination of S1 and S3 and series combination
q: the switch S2 is closed
of S′2 and S3′ are connected in parallel.
r: the switch S3 is closed
∴ The symbolic form of the given circuit is ~p ∧ ~r : represents that S1′ and S3′ are connected
(p ∨ q) ∧ (p ∨ r) in series.
30
Chapter 01: Mathematical Logic
Therefore, [(p ∧ r) ∨ (~q ∧ ~ r)] ∧ (~p ∧ ~ r) The symbolic form of the given circuit is,
represents that the circuits corresponding to [(p ∧ q) ∨ (~r ∨ ~s ∨ ~t) ] ∧ [(p ∧ q) ∨ (r ∧ s ∧ t)]
[(p ∧ r) ∨ (~q ∧ ~ r)] and (~p ∧ ~r) are ≡ [(p ∧ q) ∨ ~(r ∧ s ∧ t)] ∧ [(p ∧ q) ∨ (r ∧ s ∧ t)]
connected in series. ….[De-Morgan’s law]
Hence, switching circuit of the given statement ≡ (p ∧ q) ∨ [~(r ∧ s ∧ t) ∧ (r ∧ s ∧ t)]
is ….[Distributive law]
S1 S1 S3 S′S1 1 S1 S′3
≡ (p ∧ q) ∨ F ….[Complement law]
S′2 S′3
≡p∧q ….[Identity law]
L Hence, the simplified circuit is
S1 S2
S1′ S′2
S3
L
ii.
S1 S2
S1 S2 S1 S2
ii.
S′3
S′4 S1 S3
S ′5 B. i.
S3 S4 S5
S1 S2
L S2 S3
Solution:
i. Refer to Exercise 1.9 Q.3. ii. S1
ii. Let, p: The switch S1 is closed.
q: The switch S2 closed.
r: The switch S3 is closed. S3
S2
s: The switch S4 is closed. Solution:
t: The switch S5 is closed. Let,
~r : The switch S′3 is closed or the switch S3 is p : The switch S1 is closed.
open. q : The switch S2 is closed.
~s: The switch S′4 is closed or the switch S4 is r : The switch S3 is closed.
open. A. i. The symbolic form of given circuit is,
~t: The switch S′5 is closed or the switch S5 is p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r) ….(i)
open. ….[distributive law]
31
Std. XII : Perfect Maths - I
ii. The symbolic form of given circuit is, ≡ [(q ∨ p) ∧ T] ∧ r ….[Complement law]
(p ∧ q) ∨ (p ∧ r) …. (ii) ≡ (q ∨ p) ∧ r ….[Identity law]
∴ The given circuits are logically equivalent ≡ (p ∨ q) ∧ r ….[Commutative law]
....[From (i) and (ii)] ∴ The switching circuit corresponding to the
B. i. The symbolic form of the given circuit is given statement is:
(p ∨ q) ∧ (q ∨ r) ....(i)
ii. The symbolic form of the given circuit is, S1 S3
p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
….[distributive law] ....(ii) S2
∴ The given circuits are not logically
equivalent ....[From (i) and (ii)] L
27. Give alternative arrangement of the 28. Draw the simplified circuit of the following
following circuit, so that the new circuit has switching circuit.
minimum switches only. S1′
S1 S2 S′1
S2
S′1 S2 S3
S1
S1 S2 S3
S′2
S1 S′2 S3
L S1
Solution:
Let, p : The switch S1 is closed. S2
q : The switch S2 is closed.
r : The switch S3 is closed. L
∼p: The switch S1′ is closed or the switch S1 is Solution:
open. Let p : The switch S1 is closed.
~q: The switch S′2 is closed or the switch S2 is q : The switch S2 is closed.
open. ~p : The switch S1′ is closed or the switch S1 is open.
The symbolic form of given circuit is, ~q : The switch S′2 is closed or the switch S2 is open.
(p ∧ q ∧ ~p) ∨ (~p ∧ q ∧ r) ∨ (p ∧ q ∧ r) The symbolic form of the given circuit is
∨ (p ∧ ~q ∧ r) (~p ∨ q) ∨ (p ∨ ~q) ∨ (p ∨ q)
≡ (p ∧ ~p ∧ q) ∨ (~p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ≡ (~p ∨ q) ∨ [p ∨ (q ∨ ~q)]
∨ (p ∧ ~q ∧ r) ….[Commutative law] ….[Commutative and Distributive law]
≡ (F ∧ q) ∨ (~p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ ~q ∧ r) ≡ (~p ∨ q) ∨ (p ∨ T) ….[Complement law]
….[Complement law] ≡ (~p ∨ q) ∨ T ….[Identity law]
≡ F ∨ (~p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ ~q ∧ r) ≡∼ p ∨ (q ∨ T) ….[Commutative law]
….[Identity law] ≡ ~p ∨ T ….[Identity law]
≡ (~p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ ~q ∧ r) ≡T ….[Identity law]
….[Identity Law]
∴ The symbolic form of the given circuit is a
≡ [(~p ∨ p) ∧ (q ∧ r)] ∨ (p ∧ ~q ∧ r) tautology. Hence, the current will always flow
….[Distributive law] through the circuit irrespective of whether the
≡ [T ∧ (q ∧ r)] ∨ (p ∧ ~q ∧ r) switches are open or closed.
….[Complement law]
≡ (q ∧ r) ∨ (p ∧ ~q ∧ r) ….[Identity law]
≡ [q ∨ (p ∧ ~q)] ∧ r ….[Distributive law]
≡ [(q ∨ p) ∧ (q ∨ ~q)] ∧ r ….[Distributive law] L
32
Chapter 01: Mathematical Logic
29. Represent the following switching circuit in
Multiple Choice Questions
symbolic form and construct its switching
table. Write your conclusion from the 1. Which of the following is a statement?
switching table. (A) Stand up!
(B) Will you help me?
S1 S1 (C) Do you like social studies?
(D) 27 is a perfect cube.
S′2
2. Which of the following is not a statement?
S′3 S2 S3 (A) Please do me a favour.
(B) 2 is an even integer.
(C) 2 + 1 = 3.
L (D) The number 17 is prime.
3. Which of the following is an open statement?
Solution: (A) x is a natural number.
Let p : The switch S1 is closed. (B) Give me a glass of water.
q : The switch S2 is closed. (C) Wish you best of luck.
r : The switch S3 is closed. (D) Good morning to all.
~p : The switch S1′ is closed or the switch S1 is open
4. Which of the following is not a proposition in
~q : The switch S′2 is closed or the switch S2 is open logic.
~r : The switch S′3 is closed or the switch S3 is (A) 3 is a prime.
open. (B) 2 is a irrational.
The symbolic form of the given circuit is (C) Mathematics is interesting.
(p ∨ ~q ∨ ~r) ∧ [p ∨ (q ∧ r)] (D) 5 is an even integer.
∴ The switching table corresponding to the
given statements is : 5. If p: The sun has set
q: The moon has risen,
[p ∨ (~q) ∨ then the statement ‘The sun has not set or the
p∨ p∨
p q r ~q ~r q∧r (~r)] ∧ moon has not risen’ in symbolic form is
(~q) ∨ (~r) (q ∧ r) written as
[p∨(q∧r)]
(A) ~p ∨ ~q (B) ~p ∧ q
T T T F F T T T T
(C) p ∧ ~q (D) p ∨ ~q
T T F F T T F T T
T F T T F T F T T 6. Assuming p: She is beautiful, q: She is clever,
T F F T T T F T T the verbal form of p ∧ (~q) is
(A) She is beautiful but not clever.
F T T F F F T T F (B) She is beautiful and clever.
F T F F T T F F F (C) She is not beautiful and not clever.
F F T T F T F F F (D) She is beautiful or not clever.
F F F T T T F F F 7. Let p: ‘It is hot’ and q: ‘It is raining’.
The final column of the above table is equivalent The verbal statement for (p ∧ ~q) → p is
to the column of ‘p’ i.e. column corresponding to (A) If it is hot and not raining, then it is hot.
(B) If it is hot and raining, then it is hot.
switch S1. Hence, the given circuit is equivalent to
(C) If it is hot or raining, then it is not hot.
the circuit where only switch S1 is present. (D) If it is hot and raining, then it is not hot.
Hence, switching circuit is as follows:
8. Using the statements
p: Kiran passed the examination,
S1 S1 s : Kiran is sad.
the statement ‘It is not true that Kiran passes
therefore he is sad’ in symbolic form is
L (A) ~p → s (B) ~ (p → ~ s)
(C) ~p → ~ s (D) ~ (p → s)
33
Std. XII : Perfect Maths - I
9. Assuming p: She is beautiful, q: She is clever, 18. If p and q be two statements then the
the verbal form of ~p ∧ (~q) is conjunction of the statements, p ∧ q is false
(A) She is beautiful but not clever. when
(B) She is beautiful and clever. (A) both p and q are true.
(C) She is not beautiful and not clever. (B) either p or q are true
(D) She is beautiful or not clever. (C) either p or q or both are false.
(D) both p and q are false.
10. The converse of the statement ‘If it is raining
then it is cool’ is 19. The negation of the statement, “The question
(A) If it is cool then it is raining. paper is not easy and we shall not pass” is
(B) If it is not cool then it is raining. (A) The question paper is not easy or we
(C) If it is not cool then it is not raining. shall not pass.
(D) If it is not raining then it is not cool. (B) The question paper is not easy implies
we shall not pass.
11. If p and q are simple propositions, then p ∧ q (C) The question paper is easy or we shall
is true when pass.
(A) p is true and q is false. (D) We shall pass implies the question paper
(B) p is false and q is true. is not easy.
(C) p is true and q is true. 20. The statement (p ∧ q) ∧ (~ p ∨ ~ q) is
(D) p is false q is false. (A) a contradiction.
12. Which of the following is logically equivalent (B) a tautology.
to ~[~p → q] (C) neither a contradiction nor a tautology.
(A) p ∨ ~q (B) ~p ∧ q (D) equivalent to p ∨ q.
(C) ~p ∧ q (D) ~p ∧ ~q 21. The proposition p ∧ ~p is a
13. The logically equivalent statement of p → q (A) tautology and contradiction.
is (B) contingency.
(C) tautology.
(A) ~p ∨ q (B) q → ~p
(D) contradiction.
(C) ~q ∨ p (D) ~q ∨ ~p
22. The proposition p → ~ (p ∧ q) is a
14. The logically equivalent statement of ~p ∨ ~q (A) tautology
is
(B) contradiction
(A) ~p ∧ ~q (B) ~(p ∧ q) (C) contingency
(C) ~(p ∨ q) (D) p ∧ q (D) either (A) or (B)
15. The contrapositive of (p ∨ q) → r is 23. The false statement in the following is
(A) ~r → ~p ∧ ~q (B) ~r →(p ∨ q) (A) p ∧ (~p) is a contradiction.
(C) r →(p ∨ q) (D) p → (q ∨ r) (B) (p → q) → (~q → ~p) is a contradiction.
(C) ~(~p) → p is a tautology.
16. Which of the following propositions is true?
(D) p ∨ (~p) is a tautology.
(A) p → q ≡ ~p → ~q
(B) ~(p → ~q) ≡ ~p ∧ q 24. Negation of ~(p ∨ q) is
(C) ~(p ↔ q) ≡[~ (p → q) ∧ ~ (q →p)] (A) ~p ∨ ~q
(D) ~(~p → ~q) ≡ ~p ∧ q (B) ~p ∧ ~q
(C) p ∧ ~q
17. When two statements are connected by the
(D) p ∨ ~q
connective ‘if and only if’ then the compound
statement is called 25. The dual of ~(p∨q) ∨[p∨(q∧~r)]is,
(A) conjunction of the statements. (A) ~(p∧q) ∧ [p ∨ (q∧~r)]
(B) disjunction of the statements. (B) (p∧q) ∧ [p ∧ (q∨ ~ r)]
(C) biconditional statement. (C) ~(p∧q) ∧ [p ∧ (q∧ r)]
(D) conditional statement. (D) ~(p∧q) ∧ [p ∧ (q ∨ ~ r)]
34
Chapter 01: Mathematical Logic
26. The symbolic form of the following circuit,
where p: switch S1 is closed.and q: switch S2 is
closed, is-
(A) (p∨q) ∧ [∼p∨(p∧~q)]
(B) (~p∧q) ∨ [~p∨ (p∧~q)]
(C) (p∨q) ∨ [~p∧(p∨~q)]
(D) (p∧q) ∨ [~p∧(p∧~q)]
S1 S11
S2
S1S1S1
S1′ S
S′2
L
35
Logic 407
Logic
Logic is, basically, the study of valid reasoning. When searching the internet, we use Boolean
logic – terms like “and” and “or” – to help us find specific web pages that fit in the sets we
are interested in. After exploring this form of logic, we will look at logical arguments and
how we can determine the validity of a claim.
Boolean Logic
We can often classify items as belonging to sets. If you went the library to search for a book
and they asked you to express your search using unions, intersections, and complements of
sets, that would feel a little strange. Instead, we typically using words like “and”, “or”, and
“not” to connect our keywords together to form a search. These words, which form the basis
of Boolean logic, are directly related to our set operations. (Boolean logic was developed by
the 19th-century English mathematician George Boole.)
Boolean Logic
Boolean logic combines multiple statements that are either true or false into an
expression that is either true or false.
Suppose M is the set of all mystery books, and C is the set of all comedy books. If we search
for “mystery”, we are looking for all the books that are an element of the set M; the search is
true for books that are in the set.
When we search for “mystery and comedy”, we are looking for a book that is an element of
both sets, in the intersection. If we were to search for “mystery or comedy”, we are looking
for a book that is a mystery, a comedy, or both, which is the union of the sets. If we searched
for “not comedy”, we are looking for any book in the library that is not a comedy, the
complement of the set C.
Notice here that or is not exclusive. This is a difference between the Boolean logic use of the
word and common everyday use. When your significant other asks “do you want to go to the
park or the movies?” they usually are proposing an exclusive choice – one option or the
other, but not both. In Boolean logic, the or is not exclusive – more like being asked at a
restaurant “would you like fries or a drink with that?” Answering “both, please” is an
acceptable answer.
Example 1
Suppose we are searching a library database for Mexican universities. Express a reasonable
search using Boolean logic.
We could start with the search “Mexico and university”, but would be likely to find results
for the U.S. state New Mexico. To account for this, we could revise our search to read:
Mexico and university not “New Mexico”
In most internet search engines, it is not necessary to include the word and; the search engine
assumes that if you provide two keywords you are looking for both. In Google’s search, the
keyword or has be capitalized as OR, and a negative sign in front of a word is used to
indicate not. Quotes around a phrase indicate that the entire phrase should be looked for. The
search from the previous example on Google could be written:
Mexico university -“New Mexico”
Example 2
Describe the numbers that meet the condition:
even and less than 10 and greater than 0
Sometimes statements made in English can be ambiguous. For this reason, Boolean logic
uses parentheses to show precedent, just like in algebraic order of operations.
Example 3
Describe the numbers that meet the condition:
odd number and less than 20 and greater than 0 and (multiple of 3 or multiple of 5)
The first three conditions limit us to the set {1, 3, 5, 7, 9, 11, 13, 15, 17, 19}
The last grouped conditions tell us to find elements of this set that are also either a multiple
of 3 or a multiple of 5. This leaves us with the set {3, 5, 9, 15}
Notice that we would have gotten a very different result if we had written
(odd number and less than 20 and greater than 0 and multiple of 3) or multiple of 5
The first grouped set of conditions would give {3, 9, 15}. When combined with the last
condition, though, this set expands without limits:
{3, 5, 9, 15, 20, 25, 30, 35, 40, 45, …}
Logic 409
Example 4
The English phrase “Go to the store and buy me eggs and bagels or cereal” is ambiguous; it
is not clear whether the requestors is asking for eggs always along with either bagels or
cereal, or whether they’re asking for either the combination of eggs and bagels, or just cereal.
Be aware that when a string of conditions is written without grouping symbols, it is often
interpreted from the left to right, resulting in the latter interpretation.
Conditional Statements
Beyond searching, Boolean logic is commonly used in spreadsheet applications like Excel to
do conditional calculations. A statement is something that is either true or false. A statement
like 3 < 5 is true; a statement like “a rat is a fish” is false. A statement like “x < 5” is true for
some values of x and false for others. When an action is taken or not depending on the value
of a statement, it forms a conditional.
Example 5
In common language, an example of a conditional statement would be “If it is raining, then
we’ll go to the mall. Otherwise we’ll go for a hike.”
The statement “If it is raining” is the condition – this may be true or false for any given day.
If the condition is true, then we will follow the first course of action, and go to the mall. If
the condition is false, then we will use the alternative, and go for a hike.
Example 6
As mentioned earlier, conditional statements are commonly used in spreadsheet applications
like Excel or Google Sheets. In Excel, you can enter an expression like
=IF(A1<2000, A1+1, A1*2)
Notice that after the IF, there are three parts. The first part is the condition, and the second
two are calculations. Excel will look at the value in cell A1 and compare it to 2000. If that
condition is true, then the first calculation is used, and 1 is added to the value of A1 and the
result is stored. If the condition is false, then the second calculation is used, and A1 is
multiplied by 2 and the result is stored.
410
In other words, this statement is equivalent to saying “If the value of A1 is less than 2000,
then add 1 to the value in A1. Otherwise, multiply A1 by 2”.
Example 7
The expression =IF(A1>5, 2*A1, 3*A1) is used. Find the result if A1 is 3, and the result if
A1 is 8.
If A1 is 3, then the condition is false, since 3 > 5 is not true, so we do the alternate action,
and multiply by 3, giving 3*3 = 9
If A1 is 8, then the condition is true, since 8 > 5, so we multiply the value by 2, giving
2*8=16
Example 8
An accountant needs to withhold 15% of income for taxes if the income is below $30,000,
and 20% of income if the income is $30,000 or more. Write an expression that would
calculate the amount to withhold.
Our conditional needs to compare the value to 30,000. If the income is less than 30,000, we
need to calculate 15% of the income: 0.15*income. If the income is more than 30,000, we
need to calculate 20% of the income: 0.20*income.
In words we could write “If income < 30,000, then multiply by 0.15, otherwise multiply by
0.20”. In Excel, we would write:
As we did earlier, we can create more complex conditions by using the operators and, or, and
not to join simpler conditions together.
Example 9
A parent might say to their child “if you clean your room and take out the garbage, then you
can have ice cream.”
Since these conditions were joined with and, the combined conditional will be true only if
both simpler conditions are true; if either chore is not completed, then the parent’s condition
is not met.
Notice that if the parent had said “if you clean your room or take out the garbage, then you
can have ice cream”, then the child would need to complete only one chore to meet the
condition.
Suppose you wanted to have something happen when a certain value is between 100 and 300.
To create the condition “A1 < 300 and A1 > 100” in Excel, you would need to enter
“AND(A1<300, A1>100)”. Likewise, for the condition “A1=4 or A1=6” you would enter
“OR(A1=4, A1=6)”
Example 10
In a spreadsheet, cell A1 contains annual income, and A2 contains number of dependents.
A certain tax credit applies if someone with no dependents earns less than $10,000, or if
someone with dependents earns less than $20,000. Write a rule that describes this.
Quantified Statements
Words that describe an entire set, such as “all”, “every”, or “none”, are called universal
quantifiers because that set could be considered a universal set. In contrast, words or phrases
such as “some”, “one”, or “at least one” are called existential quantifiers because they
describe the existence of at least one element in a set.
Quantifiers
A universal quantifier states that an entire set of things share a characteristic.
Example 11
Suppose your friend says “Everybody cheats on their taxes.” What is the minimum amount
of evidence you would need to prove your friend wrong?
To show that it is not true that everybody cheats on their taxes, all you need is one person
who does not cheat on their taxes. It would be perfectly fine to produce more people who do
not cheat, but one counterexample is all you need.
It is important to note that you do not need to show that absolutely nobody cheats on their
taxes.
Example 12
Suppose your friend says “One of these six cartons of milk is leaking.” What is the minimum
amount of evidence you would need to prove your friend wrong?
In this case, you would need to check all six cartons and show that none of them is leaking.
You cannot disprove your friend’s statement by checking only one of the cartons.
Example 13
“Somebody brought a flashlight.” Write the negation of this statement.
Example 14
“There are no prime numbers that are even.” Write the negation of this statement.
Try it Now 1
Write the negation of “All Icelandic children learn English in school.”
Logic 413
Symbols
The symbol ⋀ is used for and: A and B is notated A ⋀ B
The symbol ⋁ is used for or: A or B is notated A ⋁ B
The symbol ~ is used for not: not A is notated ~A
You can remember the first two symbols by relating them to the shapes for the union and
intersection. A ⋀ B would be the elements that exist in both sets, in A ⋂ B. Likewise, A ⋁ B
would be the elements that exist in either set, in A ⋃ B. When we are working with sets, we
use the rounded version of the symbols; when we are working with statements, we use the
pointy version.
Example 15
Translate each statement into symbolic notation. Let P represent “I like Pepsi” and let C
represent “I like Coke”.
a. P ⋁ C
b. P ⋀ C
c. ~P
d. ~(P ⋁ C)
e. P ⋀ ~C
As you can see, we can use parentheses to organize more complicated statements.
Try it Now 2
Translate “We have carrots or we will not make soup” into symbols. Let C represent “we
have carrots” and let S represent “we will make soup”.
414
Because complex Boolean statements can get tricky to think about, we can create a truth
table to keep track of what truth values for the simple statements make the complex
statement true and false.
Truth table
A table showing what the resulting truth value of a complex statement is for all the
possible truth values for the simple statements.
Example 16
Suppose you’re picking out a new couch, and your significant other says “get a sectional or
something with a chaise”.
This is a complex statement made of two simpler conditions: “is a sectional”, and “has a
chaise”. For simplicity, let’s use S to designate “is a sectional”, and C to designate “has a
chaise”.
A truth table for this situation would look like this:
S C S or C
T T T
T F T
F T T
F F F
In the table, T is used for true, and F for false. In the first row, if S is true and C is also true,
then the complex statement “S or C” is true. This would be a sectional that also has a chaise,
which meets our desire. (Remember that or in logic is not exclusive; if the couch has both
features, it meets the condition.)
In the previous example about the couch, the truth table was really just summarizing what we
already know about how the or statement work. The truth tables for the basic and, or, and not
statements are shown below.
Truth tables really become useful when we analyze more complex Boolean statements.
Logic 415
Example 17
Create a truth table for the statement A ⋁ ~B
When we create the truth table, we need to list all the possible truth value combinations for A
and B. Notice how the first column contains 2 Ts followed by 2 Fs, and the second column
alternates T, F, T, F. This pattern ensures that all 4 combinations are considered.
A B
T T
T F
F T
F F
After creating columns with those initial values, we create a third column for the expression
~B. Now we will temporarily ignore the column for A and write the truth values for ~B.
A B ~B
T T F
T F T
F T F
F F T
Next we can find the truth values of A ⋁ ~B, using the first and third columns.
A B ~B A ⋁ ~B
T T F T
T F T T
F T F F
F F T T
The truth table shows that A ⋁ ~B is true in three cases and false in one case. If you’re
wondering what the point of this is, suppose it is the last day of the baseball season and two
teams, who are not playing each other, are competing for the final playoff spot. Anaheim will
make the playoffs if it wins its game or if Boston does not win its game. (Anaheim owns the
tie-breaker; if both teams win, or if both teams lose, then Anaheim gets the playoff spot.) If A
= Anaheim wins its game and B = Boston wins its game, then A ⋁ ~B represents the situation
“Anaheim wins its game or Boston does not win its game”. The truth table shows us the
different scenarios related to Anaheim making the playoffs. In the first row, Anaheim wins
its game and Boston wins its game, so it is true that Anaheim makes the playoffs. In the
second row, Anaheim wins and Boston does not win, so it is true that Anaheim makes the
playoffs. In the third row, Anaheim does not win its game and Boston wins its game, so it is
false that Anaheim makes the playoffs. In the fourth row, Anaheim does not win and Boston
does not win, so it is true that Anaheim makes the playoffs.
Try it Now 3
Create a truth table for this statement: ~A ⋀ B
416
Example 18
Create a truth table for the statement A ⋀ ~(B ⋁ C)
It helps to work from the inside out when creating a truth table, and to create columns in the
table for intermediate operations. We start by listing all the possible truth value combinations
for A, B, and C. Notice how the first column contains 4 Ts followed by 4 Fs, the second
column contains 2 Ts, 2 Fs, then repeats, and the last column alternates T, F, T, F... This
pattern ensures that all 8 combinations are considered. After creating columns with those
initial values, we create a fourth column for the innermost expression, B ⋁ C. Now we will
temporarily ignore the column for A and focus on B and C, writing the truth values for B ⋁ C.
A B C A B C B⋁C
T T T T T T T
T T F T T F T
T F T T F T T
T F F T F F F
F T T F T T T
F T F F T F T
F F T F F T T
F F F F F F F
Next we can find the negation of B ⋁ C, working off the B ⋁ C column we just created.
(Ignore the first three columns and simply negate the values in the B ⋁ C column.)
A B C B ⋁ C ~(B ⋁ C)
T T T T F
T T F T F
T F T T F
T F F F T
F T T T F
F T F T F
F F T T F
F F F F T
Finally, we find the values of A and ~(B ⋁ C). (Ignore the second, third, and fourth columns.)
A B C B ⋁ C ~(B ⋁ C) A ⋀ ~(B ⋁ C)
T T T T F F
T T F T F F
T F T T F F
T F F F T T
F T T T F F
F T F T F F
F F T T F F
F F F F T F
Logic 417
It turns out that this complex expression is true in only one case: when A is true, B is false,
and C is false. To illustrate this situation, suppose that Anaheim will make the playoffs if: (1)
Anaheim wins, and (2) neither Boston nor Cleveland wins. TFF is the only scenario in which
Anaheim will make the playoffs.
Try it Now 4
Create a truth table for this statement: (~A ⋀ B) ⋁ ~B
Conditional
A conditional is a logical compound statement in which a statement p, called the
antecedent, implies a statement q, called the consequent.
Example 19
The English statement “If it is raining, then there are clouds is the sky” is a conditional
statement. It makes sense because if the antecedent “it is raining” is true, then the consequent
“there are clouds in the sky” must also be true.
Notice that the statement tells us nothing of what to expect if it is not raining; there might be
clouds in the sky, or there might not. If the antecedent is false, then the consquent becomes
irrelevant.
Example 20
Suppose you order a team jersey online on Tuesday and want to receive it by Friday so you
can wear it to Saturday’s game. The website says that if you pay for expedited shipping, you
will receive the jersey by Friday. In what situation is the website telling a lie?
Only one of these outcomes proves that the website was lying: the second outcome in which
you pay for expedited shipping but don’t receive the jersey by Friday. The first outcome is
exactly what was promised, so there’s no problem with that. The third outcome is not a lie
because the website never said what would happen if you didn’t pay for expedited shipping;
maybe the jersey would arrive by Friday whether you paid for expedited shipping or not. The
fourth outcome is not a lie because, again, the website didn’t make any promises about when
the jersey would arrive if you didn’t pay for expedited shipping.
It may seem strange that the third outcome in the previous example, in which the first part is
false but the second part is true, is not a lie. Remember, though, that if the antecedent is false,
we cannot make any judgment about the consequent. The website never said that paying for
expedited shipping was the only way to receive the jersey by Friday.
Example 21
A friend tells you “If you upload that picture to Facebook, you’ll lose your job.” Under what
conditions can you say that your friend was wrong?
There is only one possible case in which you can say your friend was wrong: the second
outcome in which you upload the picture but still keep your job. In the last two cases, your
friend didn’t say anything about what would happen if you didn’t upload the picture, so you
can’t say that their statement was wrong. Even if you didn’t upload the picture and lost your
job anyway, your friend never said that you were guaranteed to keep your job if you didn’t
upload the picture; you might lose your job for missing a shift or punching your boss instead.
In traditional logic, a conditional is considered true as long as there are no cases in which the
antecedent is true and the consequent is false.
Again, if the antecedent p is false, we cannot prove that the statement is a lie, so the result of
the third and fourth rows is true.
Logic 419
Example 22
Construct a truth table for the statement (m ⋀ ~p) → r
We start by constructing a truth table with 8 rows to cover all possible scenarios. Next, we
can focus on the antecedent, m ⋀ ~p.
m p r m p r ~p m p r ~p m ⋀ ~p
T T T T T T F T T T F F
T T F T T F F T T F F F
T F T T F T T T F T T T
T F F T F F T T F F T T
F T T F T T F F T T F F
F T F F T F F F T F F F
F F T F F T T F F T T F
F F F F F F T F F F T F
Now we can create a column for the conditional. Because it can be confusing to keep track of
all the Ts and Fs, why don’t we copy the column for r to the right of the column for m ⋀ ~p ?
This makes it a lot easier to read the conditional from left to right.
m p r ~p m ⋀ ~p r (m ⋀ ~p) → r
T T T F F T T
T T F F F F T
T F T T T T T
T F F T T F F
F T T F F T T
F T F F F F T
F F T T F T T
F F F T F F T
When m is true, p is false, and r is false—the fourth row of the table—then the antecedent m
⋀ ~p will be true but the consequent false, resulting in an invalid conditional; every other
case gives a valid conditional.
If you want a real-life situation that could be modeled by (m ⋀ ~p) → r, consider this: let m =
we order meatballs, p = we order pasta, and r = Rob is happy. The statement (m ⋀ ~p) → r is
“if we order meatballs and don’t order pasta, then Rob is happy”. If m is true (we order
meatballs), p is false (we don’t order pasta), and r is false (Rob is not happy), then the
statement is false, because we satisfied the antecedent but Rob did not satisfy the consequent.
420
For any conditional, there are three related statements, the converse, the inverse, and the
contrapositive.
Related Statements
The original conditional is “if p, then q” p→q
The converse is “if q, then p” q→p
The inverse is “if not p, then not q” ~p → ~q
The contrapositive is “if not q, then not p” ~q → ~p
Example 23
Consider again the conditional “If it is raining, then there are clouds in the sky.” It seems
reasonable to assume that this is true.
The converse would be “If there are clouds in the sky, then it is raining.” This is not always
true.
The inverse would be “If it is not raining, then there are not clouds in the sky.” Likewise, this
is not always true.
The contrapositive would be “If there are not clouds in the sky, then it is not raining.” This
statement is true, and is equivalent to the original conditional.
Looking at truth tables, we can see that the original conditional and the contrapositive are
logically equivalent, and that the converse and inverse are logically equivalent.
Equivalent
Equivalence
A conditional statement and its contrapositive are logically equivalent.
The converse and inverse of a conditional statement are logically equivalent.
In other words, the original statement and the contrapositive must agree with each other; they
must both be true, or they must both be false. Similarly, the converse and the inverse must
agree with each other; they must both be true, or they must both be false.
Logic 421
Be aware that symbolic logic cannot represent the English language perfectly. For example,
we may need to change the verb tense to show that one thing occurred before another.
Example 24
Suppose this statement is true: “If I eat this giant cookie, then I will feel sick.” Which of the
following statements must also be true?
a. This is the converse, which is not necessarily true. I could feel sick for some other reason,
such as drinking sour milk.
b. This is the inverse, which is not necessarily true. Again, I could feel sick for some other
reason; avoiding the cookie doesn’t guarantee that I won’t feel sick.
c. This is the contrapositive, which is true, but we have to think somewhat backwards to
explain it. If I ate the cookie, I would feel sick, but since I don’t feel sick, I must not have
eaten the cookie.
Notice again that the original statement and the contrapositive have the same truth value
(both are true), and the converse and the inverse have the same truth value (both are false).
Try it Now 5
“If you microwave salmon in the staff kitchen, then I will be mad at you.” If this statement is
true, which of the following statements must also be true?
a. If you don’t microwave salmon in the staff kitchen, then I won’t be mad at you.
b. If I am not mad at you, then you didn’t microwave salmon in the staff kitchen.
c. If I am mad at you, then you microwaved salmon in the staff kitchen.
Consider the statement “If you park here, then you will get a ticket.” What set of conditions
would prove this statement false?
The first two statements are irrelevant because we don’t know what will happen if you park
somewhere else. The third statement, however contradicts the conditional statement “If you
park here, then you will get a ticket” because you parked here but didn’t get a ticket. This
example demonstrates a general rule; the negation of a conditional can be written as a
conjunction: “It is not the case that if you park here, then you will get a ticket” is equivalent
to “You park here and you do not get a ticket.”
422
~(p → q) is equivalent to p ⋀ ~q
Example 25
Which of the following statements is equivalent to the negation of “If you don’t grease the
pan, then the food will stick to it” ?
a. I didn’t grease the pan and the food didn’t stick to it.
b. I didn’t grease the pan and the food stuck to it.
c. I greased the pan and the food didn’t stick to it.
a. This is correct; it is the conjunction of the antecedent and the negation of the consequent.
To disprove that not greasing the pan will cause the food to stick, I have to not grease the pan
and have the food not stick.
b. This is essentially the original statement with no negation; the “if…then” has been
replaced by “and”.
c. This essentially agrees with the original statement and cannot disprove it.
Try it Now 6
“If you go swimming less than an hour after eating lunch, then you will get cramps.” Which
of the following statements is equivalent to the negation of this statement?
a. I went swimming more than an hour after eating lunch and I got cramps.
b. I went swimming less than an hour after eating lunch and I didn’t get cramps.
c. I went swimming more than an hour after eating lunch and I didn’t get cramps.
In everyday life, we often have a stronger meaning in mind when we use a conditional
statement. Consider “If you submit your hours today, then you will be paid next Friday.”
What the payroll rep really means is “If you submit your hours today, then you will be paid
next Friday, and if you don’t submit your hours today, then you won’t be paid next Friday.”
The conditional statement if t, then p also includes the inverse of the statement: if not t, then
not p. A more compact way to express this statement is “You will be paid next Friday if and
only if you submit your timesheet today.” A statement of this form is called a biconditional.
Biconditional
A biconditional is a logical conditional statement in which the antecedent and
consequent are interchangeable.
Notice that the fourth row, where both components are false, is true; if you don’t submit your
timesheet and you don’t get paid, the person from payroll told you the truth.
Example 26
Suppose this statement is true: “The garbage truck comes down my street if and only if it is
Thursday morning.” Which of the following statements could be true?
a. It is noon on Thursday and the garbage truck did not come down my street this morning.
b. It is Monday and the garbage truck is coming down my street.
c. It is Wednesday at 11:59PM and the garbage truck did not come down my street today.
a. This cannot be true. This is like the second row of the truth table; it is true that I just
experienced Thursday morning, but it is false that the garbage truck came.
b. This cannot be true. This is like the third row of the truth table; it is false that it is
Thursday, but it is true that the garbage truck came.
c. This could be true. This is like the fourth row of the truth table; it is false that it is
Thursday, but it is also false that the garbage truck came, so everything worked out like it
should.
Try it Now 7
Suppose this statement is true: “I wear my running shoes if and only if I am exercising.”
Determine whether each of the following statements must be true or false.
a. I am exercising and I am not wearing my running shoes.
b. I am wearing my running shoes and I am not exercising.
c. I am not exercising and I am not wearing my running shoes.
424
Example 27
Create a truth table for the statement (A ⋁ B) ↔ ~C
Whenever we have three component statements, we start by listing all the possible truth
value combinations for A, B, and C. After creating those three columns, we can create a
fourth column for the antecedent, A ⋁ B. Now we will temporarily ignore the column for C
and focus on A and B, writing the truth values for A ⋁ B.
A B C A B C A⋁B
T T T T T T T
T T F T T F T
T F T T F T T
T F F T F F T
F T T F T T T
F T F F T F T
F F T F F T F
F F F F F F F
Next we can create a column for the negation of C. (Ignore the A ⋁ B column and simply
negate the values in the C column.)
A B C A⋁B ~C
T T T T F
T T F T T
T F T T F
T F F T T
F T T T F
F T F T T
F F T F F
F F F F T
Finally, we find the truth values of (A ⋁ B) ↔ ~C. Remember, a biconditional is true when
the truth value of the two parts match, but it is false when the truth values do not match.
A B C A ⋁ B ~C (A ⋁ B) ↔ ~C
T T T T F F
T T F T T T
T F T T F F
T F F T T T
F T T T F F
F T F T T T
F F T F F T
F F F F T F
To illustrate this situation, suppose your boss needs you to do either project A or project B (or
both, if you have the time). If you do one of the projects, you will not get a crummy review
(C is for crummy). So (A ⋁ B) ↔ ~C means “You will not get a crummy review if and only
Logic 425
if you do project A or project B.” Looking at a few of the rows of the truth table, we can see
how this works out. In the first row, A, B, and C are all true: you did both projects and got a
crummy review, which is not what your boss told you would happen! That is why the final
result of the first row is false. In the fourth row, A is true, B is false, and C is false: you did
project A and did not get a crummy review. This is what your boss said would happen, so the
final result of this row is true. And in the eighth row, A, B, and C are all false: you didn’t do
either project and did not get a crummy review. This is not what your boss said would
happen, so the final result of this row is false. (Even though you may be happy that your boss
didn’t follow through on the threat, the truth table shows that your boss lied about what
would happen.)
De Morgan’s Laws
A contemporary of Boole’s, Augustus De Morgan, formalized two rules of logic that had
previously been known informally. They allow us to rewrite the negation of a conjunction as
a disjunction, and vice-versa.
For example, suppose you want to schedule a meeting with two colleagues at 4:30PM on
Friday, and you need both of them to be available at that time. What situation would make it
impossible to have the meeting? It is NOT the case that colleague a is available AND
colleague b is available: ~(a b). This situation is equivalent to either colleague a NOT
being available OR colleague b NOT being available: ~a ~b.
De Morgan’s Laws
The negation of a conjunction is equivalent to the disjunction of the negation of the
statements making up the conjunction. To negate an “and” statement, negate each part
and change the “and” to “or”.
~(p q) is equivalent to ~p ~q
The negation of a disjunction is equivalent to the conjunction of the negation of the
statements making up the disjunction. To negate an “or” statement, negate each part
and change the “or” to “and”.
~(p q) is equivalent to ~p ~q
Example 28
For Valentine’s Day, you did not get your sweetie flowers or candy: Which of the following
statements is logically equivalent?
a. You did not get them flowers or did not get them candy.
b. You did not get them flowers and did not get them candy.
c. You got them flowers or got them candy.
a. This statement does not go far enough; it leaves open the possibility that you got them one
of the two things.
b. This statement is equivalent to the original; ~(f c) is equivalent to ~f ~c.
c. This statement says that you got them something, but we know that you did not.
426
Try it Now 8
To serve as the President of the US, a person must have been born in the US, must be at least
35 years old, and must have lived in the US for at least 14 years. What minimum set of
conditions would disqualify someone from serving as President?
Arguments
A logical argument is a claim that a set of premises support a conclusion. There are two
general types of arguments: inductive and deductive arguments.
Argument types
An inductive argument uses a collection of specific examples as its premises and uses
them to propose a general conclusion.
A deductive argument uses a collection of general statements as its premises and uses
them to propose a specific situation as the conclusion.
Example 29
The argument “when I went to the store last week I forgot my purse, and when I went today I
forgot my purse. I always forget my purse when I go the store” is an inductive argument.
Notice that the premises are specific situations, while the conclusion is a general statement.
In this case, this is a fairly weak argument, since it is based on only two instances.
Example 30
The argument “every day for the past year, a plane flies over my house at 2:00 P.M. A plane
will fly over my house every day at 2:00 P.M.” is a stronger inductive argument, since it is
based on a larger set of evidence. While it is not necessarily true—the airline may have
cancelled its afternoon flight—it is probably a safe bet.
Logic 427
Many scientific theories, such as the big bang theory, can never be proven. Instead, they are
inductive arguments supported by a wide variety of evidence. Usually in science, an idea is
considered a hypothesis until it has been well tested, at which point it graduates to being
considered a theory. Common scientific theories, like Newton’s theory of gravity, have all
stood up to years of testing and evidence, though sometimes they need to be adjusted based
on new evidence, such as when Einstein proposed the theory of general relativity.
A deductive argument is more clearly valid or not, which makes it easier to evaluate.
We can interpret a deductive argument visually with an Euler diagram, which is essentially
the same thing as a Venn diagram. This can make it easier to determine whether the
argument is valid or invalid.
Example 31
Consider the deductive argument “All cats are mammals and a tiger is a cat, so a tiger is a
mammal.” Is this argument valid?
Both the premises are true. To see that the premises must Cats
logically lead to the conclusion, we can use a Venn
diagram. From the first premise, we draw the set of cats as a Tiger
subset of the set of mammals. From the second premise, we x
are told that a tiger is contained within the set of cats. From
that, we can see in the Venn diagram that the tiger must also
be inside the set of mammals, so the conclusion is valid.
428
Try it Now 9
Determine the validity of this argument:
Premise: All cats are scared of vacuum cleaners.
Premise: Max is a cat.
Conclusion: Max is scared of vacuum cleaners.
Example 32
Premise: All firefighters know CPR.
Premise: Jill knows CPR.
Conclusion: Jill is a firefighter.
Know CPR
From the first premise, we know that firefighters all lie
inside the set of those who know CPR. (Firefighters are a Jill x?
subset of people who know CPR.) From the second premise,
we know that Jill is a member of that larger set, but we do x?
not have enough information to know whether she also is a
member of the smaller subset that is firefighters. Firefighters
It is important to note that whether or not Jill is actually a firefighter is not important in
evaluating the validity of the argument; we are concerned with whether the premises are
enough to prove the conclusion.
Try it Now 10
Determine the validity of this argument:
Premise: All bicycles have two wheels.
Premise: This Harley-Davidson has two wheels.
Conclusion: This Harley-Davidson is a bicycle.
Logic 429
Try it Now 11
Determine the validity of this argument:
Premise: No cows are purple.
Premise: Fido is not a cow.
Conclusion: Fido is purple.
In addition to these categorical style premises of the form “all ___”, “some ____”, and “no
____”, it is also common to see premises that are conditionals.
Example 33
Premise: If you live in Seattle, you live in Washington.
Premise: Marcus does not live in Seattle. x?
Conclusion: Marcus does not live in Washington. Washington
Marcus x?
From the first premise, we know that the set of people who
live in Seattle is inside the set of those who live in
Washington. From the second premise, we know that
Marcus does not lie in the Seattle set, but we have Seattle
insufficient information to know whether Marcus lives in
Washington or not. This is an invalid argument.
Try it Now 12
Determine the validity of this argument:
Premise: If you have lipstick on your collar, then you are cheating on me.
Premise: If you are cheating on me, then I will divorce you.
Premise: You do not have lipstick on your collar.
Conclusion: I will not divorce you.
Arguments can also be analyzed using truth tables, although this can be a lot of work.
Example 34
Consider the argument
Premise: If you bought bread, then you went to the store.
Premise: You bought bread.
Conclusion: You went to the store.
While this example is fairly obviously a valid argument, we can analyze it using a truth table
by representing each of the premises symbolically. We can then form a conditional statement
showing that the premises together imply the conclusion. If the truth table is a tautology
(always true), then the argument is valid.
We’ll let b represent “you bought bread” and s represent “you went to the store”. Then the
argument becomes:
Premise: b→s
Premise: b
Conclusion: s
To test the validity, we look at whether the combination of both premises implies the
conclusion; is it true that [(b → s) ⋀ b] → s ?
b s b→s b s b→s (b → s) ⋀ b
T T T T T T T
T F F T F F F
F T T F T T F
F F T F F T F
b s b→s (b → s) ⋀ b [(b → s) ⋀ b] → s
T T T T T
T F F F T
F T T F T
F F T F T
Since the truth table for [(b → s) ⋀ b] → s is always true, this is a valid argument.
Try it Now 13
Determine whether the argument is valid:
Premise: If I have a shovel, I can dig a hole.
Premise: I dug a hole.
Conclusion: Therefore, I had a shovel.
Logic 431
Example 35
Premise: If I go to the mall, then I’ll buy new jeans.
Premise: If I buy new jeans, I’ll buy a shirt to go with it.
Conclusion: If I go to the mall, I’ll buy a shirt.
We can construct a truth table for [(m → j) ⋀ (j → s)] → (m → s). Try to recreate each step
and see how the truth table was constructed.
Example 36
Recall this argument from an earlier example:
Premise: If you bought bread, then you went to the store.
Premise: You bought bread.
Conclusion: You went to the store.
432
In symbolic form:
Premise: b→s
Premise: b
Conclusion: s
This argument has the structure described by the law of detachment. (The second premise
and the conclusion are simply the two parts of the first premise detached from each other.)
Instead of making a truth table, we can say that this argument is valid by stating that it
satisfies the law of detachment.
Notice that the second premise and the conclusion look like the contrapositive of the first
premise, ~q → ~p, but they have been detached. You can think of the law of contraposition
as a combination of the law of detachment and the fact that the contrapositive is logically
equivalent to the original statement.
Example 37
Premise: If I drop my phone into the swimming pool, my phone will be ruined.
Premise: My phone isn’t ruined.
Conclusion: I didn’t drop my phone into the swimming pool.
If we let d = I drop the phone in the pool and r = the phone is ruined, then we can represent
the argument this way:
Premise d→r
Premise ~r
Conclusion: ~d
The form of this argument matches what we need to invoke the law of contraposition, so it is
a valid argument.
Try it Now 14
Is this argument valid?
Premise: If you brushed your teeth before bed, then your toothbrush will be wet.
Premise: Your toothbrush is dry.
Conclusion: You didn’t brush your teeth before bed.
Logic 433
The earlier example about buying a shirt at the mall is an example illustrating the transitive
property. It describes a chain reaction: if the first thing happens, then the second thing
happens, and if the second thing happens, then the third thing happens. Therefore, if we want
to ignore the second thing, we can say that if the first thing happens, then we know the third
thing will happen. We don’t have to mention the part about buying jeans; we can simply say
that the first event leads to the final event. We could even have more than two premises; as
long as they form a chain reaction, the transitive property will give us a valid argument.
Example 38
Premise: If a soccer player commits a reckless foul, she will receive a yellow card.
Premise: If Hayley receives a yellow card, she will be suspended for the next match.
Conclusion: If Hayley commits a reckless foul, she will be suspended for the next match.
This argument has the exact structure required to use the transitive property, so it is a valid
argument.
Try it Now 15
Is this argument valid?
Premise: If the old lady swallows a fly, she will swallow a spider.
Premise: If the old lady swallows a spider, she will swallow a bird.
Premise: If the old lady swallows a bird, she will swallow a cat.
Premise: If the old lady swallows a cat, she will swallow a dog.
Premise: If the old lady swallows a dog, she will swallow a goat.
Premise: If the old lady swallows a goat, she will swallow a cow.
Premise: If the old lady swallows a cow, she will swallow a horse.
Premise: If the old lady swallows a horse, she will die, of course.
Conclusion: If the old lady swallows a fly, she will die, of course.
434
Disjunctive Syllogism
In a disjunctive syllogism, the premises consist of an or statement and the negation of
one of the options. The conclusion is the other option. The general form is:
Premise: p⋁q
Premise: ~p
Conclusion: q
The order of the two parts of the disjunction isn’t important. In other words, we could have
the premises p ⋁ q and ~q, and the conclusion p.
Example 39
Premise: I can either drive or take the train.
Premise: I refuse to drive.
Conclusion: I will take the train.
If we let d = I drive and t = I take the train, then the symbolic representation of the argument
is:
Premise d⋁t
Premise ~d
Conclusion: t
This argument is valid because it has the form of a disjunctive syllogism. I have two choices,
and one of them is not going to happen, so the other one must happen.
Try it Now 16
Is this argument valid?
Premise: Alison was required to write a 10-page paper or give a 5-minute speech.
Premise: Alison did not give a 5-minute speech.
Conclusion: Alison wrote a 10-page paper.
Keep in mind that, when you are determining the validity of an argument, you must assume
that the premises are true. If you don’t agree with one of the premises, you need to keep your
personal opinion out of it. Your job is to pretend that the premises are true and then
determine whether they force you to accept the conclusion. You may attack the premises in a
court of law or a political discussion, of course, but here we are focusing on the structure of
the arguments, not the truth of what they actually say.
Logic 435
We have just looked at four forms of valid arguments; there are two common forms that
represent invalid arguments, which are also called fallacies.
Notice that the second premise and the conclusion look like the converse of the first premise,
q → p, but they have been detached. The fallacy of the converse incorrectly tries to assert
that the converse of a statement is equivalent to that statement.
Example 40
Premise: If I drink coffee after noon, then I have a hard time falling asleep that night.
Premise: I had a hard time falling asleep last night.
Conclusion: I drank coffee after noon yesterday.
If we let c = I drink coffee after noon and h = I have a hard time falling asleep, then our
argument looks like this:
Premise c→h
Premise h
Conclusion: c
This argument uses converse reasoning, so it is an invalid argument. There could be plenty of
other reasons why I couldn’t fall asleep: I could be worried about money, my neighbors
might have been setting off fireworks, …
Try it Now 17
Is this argument valid?
Premise: If you pull that fire alarm, you will get in big trouble.
Premise: You got in big trouble.
Conclusion: You must have pulled the fire alarm.
436
Again, notice that the second premise and the conclusion look like the inverse of the first
premise, ~p → ~q, but they have been detached. The fallacy of the inverse incorrectly tries to
assert that the inverse of a statement is equivalent to that statement.
Example 41
Premise: If you listen to the Grateful Dead, then you are a hippie.
Premise: Sky doesn’t listen to the Grateful Dead.
Conclusion: Sky is not a hippie.
If we let g = listen to the Grateful Dead and h = is a hippie, then this is the argument:
Premise g→h
Premise ~g
Conclusion: ~h
This argument is invalid because it uses inverse reasoning. The first premise does not imply
that all hippies listen to the Grateful Dead; there could be some hippies who listen to Phish
instead.
Try it Now 18
Is this argument valid?
Premise: If a hockey player trips an opponent, he will be assessed a 2-minute penalty.
Premise: Alexei did not trip an opponent.
Conclusion: Alexei will not be assessed a 2-minute penalty.
Of course, arguments are not limited to these six basic forms; some arguments have more
premises, or premises that need to be rearranged before you can see what is really happening.
There are plenty of other forms of arguments that are invalid. If an argument doesn’t seem to
fit the pattern of any of these common forms, though, you may want to use a Venn diagram
or a truth table instead.
Logic 437
Lewis Carroll, author of Alice’s Adventures in Wonderland, was a math and logic teacher,
and wrote two books on logic. In them, he would propose premises as a puzzle, to be
connected using syllogisms. The following example is one such puzzle.
Example 42
Solve the puzzle. In other words, find a logical conclusion from these premises.
All babies are illogical.
Nobody is despised who can manage a crocodile.
Illogical persons are despised.
Writing the second premise correctly can be a challenge; it can be rephrased as “If you can
manage a crocodile, then you are not despised.”
Using the transitive property with the first and third premises, we can conclude that b → d;
that all babies are despised. Using the contrapositive of the second premise, d → ~m, we can
then use the transitive property with b → d to conclude that b → ~m; that babies cannot
manage crocodiles. While it is silly, this is a logical conclusion from the given premises.
Example 43
Premise: If I work hard, I’ll get a raise.
Premise: If I get a raise, I’ll buy a boat.
Conclusion: If I don’t buy a boat, I must not have worked hard.
If we let h = working hard, r = getting a raise, and b = buying a boat, then we can represent
our argument symbolically:
Premise h→r
Premise r→b
Conclusion: ~b → ~h
Using the transitive property with the two premises, we can conclude that h → b; if I work
hard, then I will buy a boat. When we learned about the contrapositive, we saw that the
conditional statement h → b is equivalent to ~b → ~h. Therefore, the conclusion is indeed a
logical syllogism derived from the premises.
Try it Now 19
Is this argument valid?
Premise: If I go to the party, I’ll be really tired tomorrow.
Premise: If I go to the party, I’ll get to see friends.
Conclusion: If I don’t see friends, I won’t be tired tomorrow.
438
Ad hominem
An ad hominem argument attacks the person making the argument, ignoring the
argument itself.
Example 44
“Jane says that whales aren’t fish, but she’s only in the second grade, so she can’t be right.”
Here the argument is attacking Jane, not the validity of her claim, so this is an ad hominem
argument.
Example 45
“Jane says that whales aren’t fish, but everyone knows that they’re really mammals. She’s so
stupid.”
This certainly isn’t very nice, but it is not ad hominem since a valid counterargument is made
along with the personal insult.
Appeal to ignorance
This type of argument assumes something it true because it hasn’t been proven false.
Example 46
“Nobody has proven that photo isn’t of Bigfoot, so it must be Bigfoot.”
Appeal to authority
These arguments attempt to use the authority of a person to prove a claim. While often
authority can provide strength to an argument, problems can occur when the person’s
opinion is not shared by other experts, or when the authority is irrelevant to the claim.
Example 47
“A diet high in bacon can be healthy; Doctor Atkins said so.”
Here, an appeal to the authority of a doctor is used for the argument. This generally would
provide strength to the argument, except that the opinion that eating a diet high in saturated
fat runs counter to general medical opinion. More supporting evidence would be needed to
justify this claim.
Logic 439
Example 48
“Jennifer Hudson lost weight with Weight Watchers, so their program must work.”
Here, there is an appeal to the authority of a celebrity. While her experience does provide
evidence, it provides no more than any other person’s experience would.
Appeal to consequence
An appeal to consequence concludes that a premise is true or false based on whether
the consequences are desirable or not.
Example 49
“Humans will travel faster than light: faster-than-light travel would be beneficial for space
travel.”
False dilemma
A false dilemma argument falsely frames an argument as an “either or” choice, without
allowing for additional options.
Example 50
“Either those lights in the sky were an airplane or aliens. There are no airplanes scheduled for
tonight, so it must be aliens.”
This argument ignores the possibility that the lights could be something other than an
airplane or aliens.
Circular reasoning
Circular reasoning is an argument that relies on the conclusion being true for the
premise to be true.
Example 51
“I shouldn’t have gotten a C in that class; I’m an A student!”
In this argument, the student is claiming that because they’re an A student, though shouldn’t
have gotten a C. But because they got a C, they’re not an A student.
Example 52
“Today I wore a red shirt, and my football team won! I need to wear a red shirt every time
they play to make sure they keep winning.”
440
Straw man
A straw man argument involves misrepresenting the argument in a less favorable way
to make it easier to attack.
Example 53
“Senator Jones has proposed reducing military funding by 10%. Apparently he wants to leave
us defenseless against attacks by terrorists”
Here the arguer has represented a 10% funding cut as equivalent to leaving us defenseless,
making it easier to attack Senator Jones’ position.
Example 54
“Months with high ice cream sales also have a high rate of deaths by drowning. Therefore,
ice cream must be causing people to drown.”
This argument is implying a causal relation, when really both are more likely dependent on
the weather; that ice cream and drowning are both more likely during warm summer months.
Try it Now 20
Identify the logical fallacy in each of the arguments
a. Only an untrustworthy person would run for office. The fact that politicians are
untrustworthy is proof of this.
b. Since the 1950s, both the atmospheric carbon dioxide level and obesity levels have
increased sharply. Hence, atmospheric carbon dioxide causes obesity.
c. The oven was working fine until you started using it, so you must have broken it.
d. You can’t give me a D in the class because I can’t afford to retake it.
e. The senator wants to increase support for food stamps. He wants to take the taxpayers’
hard-earned money and give it away to lazy people. This isn’t fair, so we shouldn’t do it.
It may be difficult to identify one particular fallacy for an argument. Consider this argument:
“Emma Watson says she’s a feminist, but she posed for these racy pictures. I’m a feminist,
and no self-respecting feminist would do that.” Could this be ad hominem, saying that Emma
Watson has no self-respect? Could it be appealing to authority because the person making the
argument claims to be a feminist? Could it be a false dilemma because the argument assumes
that a woman is either a feminist or not, with no gray area in between?
Logic 441
2. C ⋁ ~S
3.
A B ~A ~A ⋀ B
T T F F
T F F F
F T T T
F F T F
4.
A B ~A ~A ⋀ B ~B (~A ⋀ B) ⋁ ~B
T T F F F F
T F F F T T
F T T T F T
F F T F T T
6. Choice b is equivalent to the negation; it keeps the first part the same and negates the
second part.
8. Failing to meet just one of the three conditions is all it takes to be disqualified. A person is
disqualified if they were not born in the US, or are not at least 35 years old, or have not
lived in the US for at least 14 years. The key word here is “or” instead of “and”.
Max
x
442
15. This argument is valid by the Transitive Property, which can involve more than two
premises, as long as they continue the chain reaction. The premises f→s, s→b, b→c, c→d,
d→g, g→w, w→h, h→x can be reduced to f→x. (Because we had already used c and d,
we decided to use w for cow and x for death.) If the old lady swallows the fly, she will
eventually eat a horse and die.
This argument is invalid because it has the form of the Fallacy of the Converse. The young
rascal may have gotten in trouble for any number of reasons besides pulling the fire alarm.
This argument is invalid because it has the form of the Fallacy of the Inverse. Alexei may
have gotten a penalty for an infraction other than tripping.
We could try to rewrite the second premise using the contrapositive to state ~f → ~p, but
that does not allow us to form a syllogism. If I don’t see friends, then I didn’t go the party,
but that is not sufficient to claim I won’t be tired tomorrow. Maybe I stayed up all night
watching movies.
20.a. Circular
b. Correlation does not imply causation
c. Post hoc
d. Appeal to consequence
e. Straw man
Logic 445
Exercises
Boolean Logic
For questions 1-2, list the set of integers that satisfy the given conditions.
Quantified Statements
Truth Tables
5. Translate each statement from symbolic notation into English sentences. Let A represent
“Elvis is alive” and let G represent “Elvis gained weight”.
a. A ⋁ G
b. ~(A ⋀ G)
c. G → ~A
d. A ↔ ~G
6. A ⋀ ~B
7. ~(~A ⋁ B)
8. (A ⋀ B) → C
9. (A ⋁ B) → ~C
Questions 10-13: In this lesson, we have been studying the inclusive or, which allows both A
and B to be true. The exclusive or does not allow both to be true; it translates to “either A or
B, but not both.”
10. For each situation, decide whether the “or” is most likely exclusive or inclusive.
a. An entrée at a restaurant includes soup or a salad.
b. You should bring an umbrella or a raincoat with you.
c. We can keep driving on I-5 or get on I-405 at the next exit.
d. You should save this document on your computer or a flash drive.
446
13. Compare your answers for questions 11 and 12. Can you explain the similarities?
Conditional Statements
14. Consider the statement “If you are under age 17, then you cannot attend this movie.”
a. Write the converse.
b. Write the inverse.
c. Write the contrapositive.
15. Assume that the statement “If you swear, then you will get your mouth washed out with
soap” is true. Which of the following statements must also be true?
a. If you don’t swear, then you won’t get your mouth washed out with soap.
b. If you don’t get your mouth washed out with soap, then you didn’t swear.
c. If you get your mouth washed out with soap, then you swore.
16. If you don’t look both ways before crossing the street, then you will get hit by a car.
18. If you weren’t talking, then you wouldn’t have missed the instructions.
19. Assume that the biconditional statement “You will play in the game if and only if you
attend all practices this week” is true. Which of the following situations could happen?
a. You attended all practices this week and didn’t play in the game.
b. You didn’t attend all practices this week and played in the game.
c. You didn’t attend all practices this week and didn’t play in the game.
Logic 447
De Morgan’s Laws
For questions 20-21, use De Morgan’s Laws to rewrite each conjunction as a disjunction, or
each disjunction as a conjunction.
21. It is not the case that you need a dated receipt and your credit card to return this item.
22. Go back and look at the truth tables in Exercises 6 & 7. Explain why the results are
identical.
Deductive Arguments
For questions 23-28, use a Venn diagram or truth table or common form of an argument to
decide whether each argument is valid or invalid.
23. If a person is on this reality show, they must be self-absorbed. Laura is not self-absorbed.
Therefore, Laura cannot be on this reality show.
24. If you are a triathlete, then you have outstanding endurance. LeBron James is not a
triathlete. Therefore, LeBron does not have outstanding endurance.
25. Jamie must scrub the toilets or hose down the garbage cans. Jamie refuses to scrub the
toilets. Therefore, Jamie will hose down the garbage cans.
26. Some of these kids are rude. Jimmy is one of these kids. Therefore, Jimmy is rude!
27. Every student brought a pencil or a pen. Marcie brought a pencil. Therefore, Marcie did
not bring a pen.
Logical Fallacies
For questions 28-30, name the type of logical fallacy being used.
29. If you don’t want to drive from Boston to New York, then you will have to take the train.
30. New England Patriots quarterback Tom Brady likes his footballs slightly underinflated.
The “Cheatriots” have a history of bending or breaking the rules, so Brady must have told
the equipment manager to make sure that the footballs were underinflated.
31. Whenever our smoke detector beeps, my kids eat cereal for dinner. The loud beeping
sound must make them want to eat cereal for some reason.
448
CHAPTER OVERVIEW
2: Logic
2.1: Propositions
2.2: Conjunctions and Disjunctions
2.3: Implications
2.4: Biconditional Statements
2.5: Logical Equivalences
2.6: Logical Quantiers
This page titled 2: Logic is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Harris Kwong (OpenSUNY) .
1
2.1: Propositions
The rules of logic allow us to distinguish between valid and invalid arguments. Besides mathematics, logic has numerous
applications in computer science, including the design of computer circuits and the construction of computer programs. To analyze
whether a certain argument is valid, we first extract its syntax.
Example 2.1.1
Can you give another argument that uses the same format in the last example?
In mathematics, we are interested in statements that can be proved or disproved. We define a proposition (sometimes called a
statement, or an assertion) to be a sentence that is either true or false, but not both.
Example 2.1.2
Example 2.1.3
Example 2.1.4
Solution
a. This equation is not a statement because we cannot tell whether it is true or false unless we know the value of x . It is
true when x = 1 ; it is false for other x -values. Since the sentence is sometimes true and sometimes false, it cannot be a
statement.
2.1.1 https://math.libretexts.org/@go/page/8386
b. For the same reason, since x − y = y − x is sometimes true and sometimes false, it cannot be a statement.
c. This looks like a statement because it appears to be true all the time. Yet, this is not a statement, because we never say
what A represents. The claim is true if A is a real number, but it is not always true if A is a matrix1. Thus, it is not a
proposition.
Example 2.1.5
Although the sentence “x + 1 = 2 ” is not a statement, we can change it into a statement by adding some condition on x. For
instance, the following is a true statement:
For some real number x, we have x + 1 = 2 .
and the statement
For all real numbers x, we have x + 1 = 2 .
is false. The parts of these two statements that say “for some real number x” and “for all real numbers x” are called quantifiers.
We shall study them in Section 6.
Example \(\PageIndex{6}\label{eg:prop-06\)
Saying that
“A statement is not a proposition if we cannot decide whether it is true or false.”
is different from saying that
“A statement is not a proposition if we do not know
how to verify whether it is true or false.”
The more important issue is whether the truth value of the statement can be determined in theory. Consider the sentence
Every even integer greater than 2 can be written as the sum of two primes.
Nobody has ever proved or disproved this claim, so we do not know whether it is true or false, even though computational data
suggest it is true. Nevertheless, it is a proposition because it is either true or false but not both. It is impossible for this sentence
to be true sometimes, and false at other times. With the advancement of mathematics, someone may be able to either prove or
disprove it in the future. The example above is the famous Goldbach Conjecture, which dates back to 1742.
We usually use the lowercase letters p, q and r to represent propositions. This can be compared to using variables x, y and z to
denote real numbers. Since the truth values of p, q, and r vary, they are called propositional variables. A proposition has only two
possible values: it is either true or false. We often abbreviate these values as T and F, respectively.
Given a proposition p, we form another proposition by changing its truth value. The result is called the negation of p, and is
denoted ¬p or \altnegp, both of which are pronounced as “not p.” The similarity between the notations ¬p and −x is obvious.
We can also write the negation of p as p̄, which is pronounced as “p bar.” The truth value of p̄ is opposite of that of p. Hence, if p is
¯
¯ ¯
¯
true, then p̄ would be false; and if p is false, then p̄ would be true. We summarize these results in a truth table:
¯
¯ ¯
¯
¯
¯¯
p p
T F
F T
2.1.2 https://math.libretexts.org/@go/page/8386
Example 2.1.7
Answer
a. George W. Bush is not the president of the United States.
b. It is true that New York is the largest state in the United States.
c. The phrase “x is a real number” describes what kinds of numbers we are considering. The main part of the proposition
is the proclamation that x = 4 . Hence, we only need to negate “x = 4 ”. The answer is:
x is a real number such that x ≠ 4. (2.1.1)
Since we will be studying numbers throughout this course, it is convenient to introduce some notations to facilitate our discussion.
Let
Recall that a rational number is a number that can be expressed as a ratio of two integers. Hence, a rational number can be written
as m
n
for some integers m and n , where n ≠ 0 . If you use a word processor, and cannot find, for example, the symbol N, you may
use bold face N as a replacement.
We usually use uppercase letters such as A , B , C , S and T to represent sets, and denote their elements by the corresponding
lowercase letters a , b , c , s , and t , respectively. To indicate that b is an element of the set B , we adopt the notation
b ∈ B [pronounced as ``b belongs to B'']. (2.1.2)
In addition, if S is a set of numbers, and k is a number, we sometimes use the notation kS to indicate the set of numbers obtained
by multiplying k to every number in S .
2.1.3 https://math.libretexts.org/@go/page/8386
Example 2.1.8
The notation 2\Z denotes the set of all even integers. Take note that an even integer can be positive, negative, or even zero.
We can describe the effect of a logical operation by displaying a truth table which covers all possibilities (in terms of truth
values) involved in the operation.
The notations R, Q, Z, and N represent the set of real numbers, rational numbers, integers, and natural numbers (positive
integers), respectively.
If S denotes a set of numbers, S means the set of positive numbers in S , S means the set of negative numbers in S , and S
+ − ∗
Exercises 2.1.
Exercise 2.1.1
Indicate which of the following are propositions (assume that x and y are real numbers).
a. The integer 36 is even.
b. Is the integer 3 − 8 even?
15
f. 5 − 5 + 3 .
2
Exercise 2.1.2
f. 1.7 + .2 = 4.0 .
Exercise 2.1.3
Exercise 2.1.4
2.1.4 https://math.libretexts.org/@go/page/8386
d. This statement is both true and false.
Exercise 2.1.5
Exercise 2.1.6
c. 0 ∈ \N
d. π ∈ \R
e. ∈ \Q
4
f. 1.5 ∈ \Q
Exercise 2.1.7
Exercise 2.1.8
Exercise 2.1.9
Exercise 2.1.10
This page titled 2.1: Propositions is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Harris Kwong
(OpenSUNY) .
2.1.5 https://math.libretexts.org/@go/page/8386
2.2: Conjunctions and Disjunctions
Given two real numbers x and y , we can form a new number by means of addition, subtraction, multiplication, or division, denoted
x + y , x − y , x ⋅ y , and x/y, respectively. The symbols +, −, ⋅ , and / are binary operators because they all work on two
operands. In fact, the negative sign in −x can be regarded as a unary operator that changes the sign of x.
In a similar manner, from one or more logical statements, we can form a compound statement by joining them with logical
operators, which are also called logical connectives because they are used to connect logical statements. Obviously, negation is a
unary operation.
Since a compound statement is itself a statement, it is either true or false. Therefore, we define a logical operation by describing the
truth value of the resulting compound statement. The first two binary operations we shall study are conjunction and disjunction.
They perform the “and” and “or” operations, respectively.
p q p∧ q p∨ q
T T T T
T F F T
F T F T
F F F F
Example 2.2.1
Do not use mathematical notations as abbreviation in writing. For example, do not write “x ∧ y are real numbers” if you want
to say “x and y are real numbers.”
In fact, the phrase “x ∧ y are real numbers” is syntactically incorrect. Since ∧ is a binary logical operator, it is used to connect
two logical statements. Here, the “x” before ∧ is not a logical statement. Therefore we cannot write “x ∧ y are real numbers.”
Incidentally, the statement “x and y are real numbers” is actually a conjunction. It means “x is a real number and y is a real
number,” or symbolically,
(x ∈ R) ∧ (y ∈ R). (2.2.1)
Write “x and y are rational” as a conjunction, first in words, then in mathematical symbols.
Example 2.2.2
The statement “New York is the largest state in the United States and New York City is the state capital of New York” is
clearly a conjunction. A conjunction of two statements is true only when both statements are true. Since New York is not the
largest state in the United States, the conjunction is false.
In general, in a conjunction of two statements, if the first statement is false, no further consideration of the second statement is
necessary since we know the conjunction must be false. In computer science, this is referred to as the short circuit evaluation.
2.2.1 https://math.libretexts.org/@go/page/8387
Example 2.2.3
−− −−
The statement “√30 is greater than 6 or √30 is less than 5” can be expressed symbolically as
−− −−
(√30 > 6) ∨ (√30 < 5). (2.2.2)
−− −−
Both statements “ √30 > 6 ” and “
√30 < 5 ” are false. Hence, their disjunction is also false.
Example 2.2.4
Solution
−− −−
(a) Since √30 > 5 is true, but √30 > 7 is false, their conjunction is false.
−− −−
(b) Since √30 < 5 is false, and √30 > 7 is also false, their disjunction is false.
example 2.2.5
Solution
It means the conjunction “(0 ≤ x) ∧ (x ≤ 1) .” Hence, given a real number x , to test whether 0 ≤x ≤1 , we have to
check whether 0 ≤ x and x ≤ 1 .
Many students assume that they can negate “0 ≤ x ≤ 1 ” by reversing the signs. However, neither “0 ≥ x ≥ 1 ” nor “
0 > x > 1 ” is the correct negation. For example, what does “0 ≥ x ≥ 1 ” really mean? Actually, the statement “0 ≥ x ≥ 1 ” is
In the everyday usage of most languages, when we say “p or q,” we normally mean exclusive or, which means either p or q is true,
but not both. An example is “I either pass or fail this course,” which really means
Either I pass this course or I fail this course.
Sometimes, as illustrated in the statement
Either you pass this course, or I pass this course.
the connective “or” can be interpreted as an inclusive or. The actual meaning of “or” in human languages depends on the context.
In mathematics, however, “or” always means inclusive or.
2.2.2 https://math.libretexts.org/@go/page/8387
Summary and Review
The conjunction “p and q” is denoted “p ∧ q ”. It is true only when both p and q are true.
The disjunction “p or q” is denoted “p ∨ q ”. It is false only when both p and q are false.
The inequality “a < x < b ” is actually a conjunction, it means “(a < x) ∧ (x < b) ”.
Likewise, the phrase “x and y are rational” is also a conjunction, it means “x is rational and y is rational.” Symbolically, we can
write ”x ∈ Q ∧ y ∈ Q .”
Exercise 2.2.1
Exercise 2.2.2
Define the propositional variables p, q, and r as in Problem 1. Express, in words, the statements represented by the following
formulas:
p∨q
q∧r
(p ∧ q) ∨ r
¯¯
p̄ ∨r
Exercise 2.2.3
r : New York City will have more than 40 inches of snow in 2525.
The statement p is true, but the statement q is false. Represent each of the following statements by a formula. What are their
truth values if r is true? What if r is false?
Niagara Falls is in New York and New York City is the state capital of New York.
Niagara Falls is in New York or New York City is the state capital of New York.
Either Niagara Falls is in New York and New York City is the state capital of New York, or New York City will have more
than 40 inches of snow in 2525.
New York City is not the state capital of New York and New York City will have more than 40 inches of snow in 2525.
Exercise 2.2.4
2.2.3 https://math.libretexts.org/@go/page/8387
Exercise 2.2.5
Exercise 2.2.6
(b) p̄ ∨ q
¯
¯
(c) p ∧ q
¯¯¯¯¯¯¯¯¯
¯
Exercise 2.2.7
Exercise 2.2.8
In words, the inequality 0 < x < 1 means “x is between 0 and 1.” Its negation means x is outside this range. Hence, the
negation is “x ≤ 0 or x ≥ 1 .” Find the negation of the following inequalities:
(a) 0 ≤ x ≤ 4
(b) −2 < x ≤ 5
–
(c) 1.76 ≤ x < √5
Exercise 2.2.9
In volleyball it is important to know which team is serving, because a team scores a point only if that team is serving and wins
a volley. If the serving team loses the volley, then the other team gets to serve. Thus, to keep score in a volleyball game
between teams A and B , it may be useful to define propositional variables p and q, where p is true if team A is serving (hence
false if team B is serving); and q is true if team A wins the current volley (hence false if team B wins it).
Give a formula that is true if team A scores a point and is false otherwise.
Give a formula that is true if team B scores a point and is false otherwise.
Give a formula that is true if the serving team loses the current volley and is false otherwise.
Give a formula whose truth value determines whether the serving team will serve again.
Exercise 2.2.10
This page titled 2.2: Conjunctions and Disjunctions is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Harris
Kwong (OpenSUNY) .
2.2.4 https://math.libretexts.org/@go/page/8387
2.3: Implications
Most theorems in mathematics appear in the form of compound statements called conditional and biconditional statements. We shall study biconditional statement in the next section. Conditional
statements are also called implications.
An implication is the compound statement of the form “if p, then q.” It is denoted p ⇒ q , which is read as “p implies q.” It is false only when p is true and q is false, and is true in all other situations.
p q p ⇒ q
T T T
T F F
F T T
F F T
The statement p in an implication p ⇒ q is called its hypothesis, premise, or antecedent, and q the conclusion or consequence.
Implications come in many disguised forms. There are several alternatives for saying p ⇒ q . The most common ones are
p implies q,
p only if q,
q if p ,
q , provided that p .
Example 2.3.1
More generally,
If b 2
− 4ac > 0 , then the equation ax 2
+ bx + c = 0 has two distinct real solutions. In fact, ax 2
+ bx + c = a(x − r1 )(x − r2 ) , where r1 ≠ r2 are the two distinct roots.
If b 2
− 4ac = 0 , then the equation ax 2
+ bx + c = 0 has only one real solution r. In such an event, ax 2
+ bx + c = a(x − r)
2
. Consequently, we call r a repeated root.
If b 2
− 4ac = 0 , then the equation ax 2
+ bx + c = 0 has no real solution.
Use these results to determine how many solutions these equations have:
a. 4x + 12x + 9 = 0
2
b. 2x − 3x − 4 = 0
2
c. x + x = −1
2
Example 2.3.2
We have remarked earlier that many theorems in mathematics are in the form of implications. Here is an example:
If |r| < 1 , then 1 + r + r + r + ⋯ = Frac11 − r .
2 3
Example 2.3.3
If a father promises his kids, “If tomorrow is sunny, we will go to the beach,” the kids will take it as a true statement. Consequently, if they wake up the next morning and find it sunny outside,
they expect they will go to the beach. The father breaks his promise (hence making the implication false) only when it is sunny but he does not take his kids to the beach.
If it is cloudy outside the next morning, they do not know whether they will go to the beach, because no conclusion can be drawn from the implication (their father’s promise) if the weather is
bad. Nonetheless, they may still go to the beach, even if it rains! Since their father does not contradict his promise, the implication is still true.
Many students are bothered by the validity of an implication even when the hypothesis is false. It may help if we understand how we use an implication.
Solution
Assume we want to show that a certain statement q is true.
a. First, we find a result of the form p ⇒ q . If we cannot find one, we have to prove that p ⇒ q is true.
b. Next, show that the hypothesis p is fulfilled.
c. These two steps together allow us to draw the conclusion that q must be true.
Consequently, if p is false, we are not expected to use the implication p ⇒ q at all. Since we are not are going to use it, we can define its truth value to anything we like. Nonetheless, we have to
maintain [pg:consistence] consistency with other logical connectives. We will give a justification of our choice at the end of the next section.
Example 2.3.4
To show that “if x = 2 , then x = 4 ” is true, we need not worry about those x-values that are not equal to 2, because the implication is immediately true if x ≠ 2 . It suffices to assume that x = 2 ,
2
and try to prove that we will get x = 4 . Since we do have x = 4 when x = 2 , the validity of the implication is established.
2 2
2.3.1 https://math.libretexts.org/@go/page/8388
In general, to disprove an implication, it suffices to find a counterexample that makes the hypothesis true and the conclusion false.
Example 2.3.5
Although we said examples can be used to disprove a claim, examples alone can never be used as proofs. If you are asked to show that
2
if x > 2, then x > 4, (2.3.2)
you cannot prove it by checking just a few values of x, because you may find a counterexample after trying a few more calculations. Therefore, examples are only for illustrative purposes, they
are not acceptable as proofs.
Example 2.3.6
The statement
“If a triangle P QR is isosceles, then two of its angles have equal measure.”
takes the form of an implication p ⇒ q , where
p : The triangle P QR is isosceles
(2.3.3)
q : Two of the angles of the triangle P QR have equal measure
I
n this example, we have to rephrase the statements p and q, because each of them should be a stand-alone statement. If we leave q as “two of its angles have equal measure,” it is not clear what
“its” is referring to. In addition, it is a good habit to spell out the details. It helps us focus our attention on what we are investigating.
Example 2.3.7
The statement
“A square must also be a parallelogram.”
can be expressed as an implication: “if the quadrilateral P QRS is a square, then the quadrilateral P QRS is a parallelogram.”
Likewise, the statement
“All isosceles triangles have two equal angles.”
can be rephrased as “if the triangle P QR is isosceles, then the triangle P QR has two equal angles.” Since we have expressed the statement in the form of an implication, we no longer need to
include the word “all.”
Example 2.3.8
What does “p unless q” translate into, logically speaking? We know that p is true, provided that q does not happen. It means, in symbol, q ⇒ p . Therefore,
¯¯
The quadrilateral P QRS is not a square unless the quadrilateral P QRS is a parallelogram
is the same as saying
If a quadrilateral P QRS is not a parallelogram, then the quadrilateral P QRS is not a square.
Equivalently, “p unless q” means p̄ ⇒ q , because q is a necessary condition that prevents p from happening.
¯
¯
Among them, the contrapositive q ⇒ p is the most important one. We shall study it again in the next section.
¯¯ ¯
¯¯
Example 2.3.9
(2.3.4)
We can change the notation when we negate a statement. If it is appropriate, we may even rephrase a sentence to make the negation more readable.
Example 2.3.5
List the converse, inverse, and contrapositive of the statement “if p is prime, then √–
p is irrational.”
The inverse of an implication is seldom used in mathematics, so we will only study the truth values of the converse and contrapositive.
2.3.2 https://math.libretexts.org/@go/page/8388
p q p ⇒ q q ⇒ p q̄¯ ¯¯
p̄ q̄¯ ⇒ p̄
¯¯
T T T T F F T
T F F T T F F (2.3.5)
F T T F F T T
F F T T T T T
An implication and its contrapositive always have the same truth value, but this is not true for the converse. What this means is, even though we know p ⇒ q is true, there is no guarantee that q ⇒ p is
also true. This is an important observation, especially when we have a theorem stated in the form of an implication. So let us say it again:
The converse of a theorem in the form of an implication may not be true. (2.3.6)
Accordingly, if you only know that p ⇒ q is true, do not assume that its converse q ⇒ p is also true. Likewise, if you are asked to prove that p ⇒ q is true, do not attempt to prove q ⇒ p , because
these two implications are not the same.
Example 2.3.10
We know that p ⇒ q does not necessarily mean we also have q ⇒ p . This important observation explains the invalidity of the “proof” of 21 = 6 in Example [eg:wrongpf2].
21 = 6
6 = 21
27 = 27
The argument we use here consists of three equations, but they are not individual unrelated equations. They are connected by implication.
21 = 6
⇒ 6 = 21
⇒ 27 = 27
Since implications are not reversible, even though we do have 27 = 27 , we cannot use this fact to prove that 21 = 6 . After all, an implication is true if its hypothesis is false. Therefore, having a
true implication does not mean that its hypothesis must be true. In this example, the logic is sound, but it does not prove that 21 = 6 .
There are two other ways to describe an implication p ⇒ q in words. They are completely different from the ones we have seen thus far. They focus on whether we can tell one of the two components
p and q is true or false if we know the truth value of the other.
Example 2.3.11
If x = 1 , we must have x 2
=1 . So, knowing x = 1 is enough for us to conclude that x 2
=1 . We say that x = 1 is a sufficient condition for x 2
=1 .
If x = 1 , it is necessarily true that x = 1 , because, for example, it is impossible to have x = 2 . Nonetheless, knowing x
2 2 2
=1 alone is not enough for us to decide whether x = 1 , because x can
be −1. Therefore, x = 1 is not a sufficient condition for x = 1 . Instead, x = 1 is only a necessary condition for x = 1 .
2 2
Exercise 2.3.1
2.3.3 https://math.libretexts.org/@go/page/8388
d. It is not the case that if Sam had pizza last night, then Pat watched the news this morning.
e. Sam did not have pizza last night and Chris finished her homework implies that Pat watched the news this morning.
Exercise 2.3.2
Define the propositional variables as in Problem 1. Express in words the statements represented by the following formulas.
a. q ⇒ r
b. p ⇒ (q ∧ r)
c. p̄ ⇒ (q ∨ r)
¯
¯
d. r ⇒ (p ∨ q)
Exercise 2.3.3
r : New York City will have more than 40 inches of snow in 2525.
The statement p is true, and the statement q is false. Represent each of the following statements by a formula. What is their truth value if r is true? What if r is false?
a. If Niagara Falls is in New York, then New York City is the state capital of New York.
b. Niagara Falls is in New York only if New York City will have more than 40 inches of snow in 2525.
c. Niagara Falls is in New York or New York City is the state capital of New York implies that New York City will have more than 40 inches of snow in 2525.
d. For New York City to be the state capital of New York, it is necessary that New York City will have more than 40 inches of snow in 2525.e
e. For Niagara Falls to be in New York, it is sufficient that New York City will have more than 40 inches of snow in 2525.
Exercise 2.3.4
Exercise 2.3.5
Exercise 2.3.6
Exercise 2.3.7
Hint
To help you get started, fill in the blanks.]
(a)
\setlength{\arraycolsep}{3pt} \begin{array}[t]{|*{5}{c|}} \noalign{\vskip-9pt}\hline p & q & r & p\wedge q & (p\wedge q)\vee r \\ \hline \text{T} &\text{T} &\text{T} && \\ \text{T} &\text{T} &\text{F} && \\ \tex
(b)
\begin{array}[t]{|c|c|c|c|c|c|} \noalign{\vskip-9pt}\hline p & q & r & p\vee q & p\wedge r & (p\vee q)\Rightarrow(p\wedge r) \\ \hline \text{T} &\text{T} &\text{T} &&& \\ \text{T} &\text{T} &\text{F} &&& \\ \text
Exercise 2.3.8
b. (p ⇒ q) ∧ (p ⇒ q) ¯
¯¯
Exercise 2.3.9
2.3.4 https://math.libretexts.org/@go/page/8388
Exercise 2.3.10
Assume p ⇒ q is true.
a. If p is true, must q be true? Explain.
b. If p is false, must q be true? Explain.
c. If q is true, must p be false? Explain.
d. If q if false, must p be false? Explain.
This page titled 2.3: Implications is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Harris Kwong (OpenSUNY) .
2.3.5 https://math.libretexts.org/@go/page/8388
2.4: Biconditional Statements
The biconditional statement “p if and only if q,” denoted p ⇔ q , is true when both p and q carry the same truth value, and is false
otherwise. It is sometimes abbreviated as “p iff q.” Its truth table is depicted below.
p q p ⇔ q
T T T
T F F
F T F
F F T
Example 2.4.1
This explains why we call it a biconditional statement. A biconditional statement is often used to define a new concept.
Example 2.4.2
Since mq is an integer (because it is a product of two integers), by definition, mn is even. This shows that the product of any
integer with an even integer is always even.
Example 2.4.3
Connectives Priority
2.4.1 https://math.libretexts.org/@go/page/8389
Connectives Priority
¬ Highest
∨ ⋮
⇔ Lowest
This is the order in which the operations should be carried out if the logical expression is read from left to right. To override
the precedence, use parentheses.
Example 2.4.4
Operations Priority
− (Negative) Highest
Exponentiation ⋮
Multiplication/Division ⋮
Addition/Subtraction Lowest
y
For example, y z −3
≠ (yz)
−3
. To evaluate yz −3
, we have to perform exponentiation first. Hence, y z −3
=y⋅z
−3
=
z3
.
Another example: the notation means x raised to the power of , hence x ; it should not be interpreted as ,
3 3
2 3 2 8 2 3
x 2 =x (x )
because (x ) = x .
2 3 6
Example 2.4.5
p ⇒ (q ∧ q) ⇒ p. (2.4.6)
hands-on exercise2.4.2
p ⇒ q∧r (2.4.7)
to identify the proper procedure for evaluating its truth value. Construct its truth table.
to identify the proper procedure for evaluating its truth value. Construct its truth table.
We close this section with a justification of our choice in the truth value of p ⇒ q when p is false. The truth value of p ⇒ q is
obvious when p is true.
p q p ⇒ q
2.4.2 https://math.libretexts.org/@go/page/8389
p q p ⇒ q
T T T
T F F
F T ?
F F ?
We want to decide what are the best choices for the two missing values so that they are consistent with the other logical
connectives. Observe that if p ⇒ q is true, and q is false, then p must be false as well, because if p were true, with q being false,
then the implication p ⇒ q would have been false. For instance, if we promise
“If tomorrow is sunny, we will go to the beach”
but we do not go to the beach tomorrow, then we know tomorrow must not be sunny. This means the two statements p ⇒ q and
q̄ ⇒ p̄ should share the same truth value.
¯ ¯
¯
When both p and q are false, then both p and q are true. Hence q ⇒ p should be true, consequently so is p ⇒ q . Thus far, we have
¯
¯¯ ¯¯ ¯¯ ¯
¯¯
p q p ⇒ q
T T T
T F F
F T ?
F F T
If the last missing entry is F, the resulting truth table would be identical to that of p ⇔ q . To distinguish p ⇔ q from p ⇒ q , we
have to define p ⇒ q to be true in this case.
Example 2.4.1
Example 2.4.2
Define the propositional variables as in Problem 1. Express in words the statements represented by the following formulas:
(a) q ⇔ r & (b) p ⇔ (q ∧ r)
(c) p̄ ⇔ (q ∨ r) & (d) r ⇔ (p ∨ q)
¯
¯
2.4.3 https://math.libretexts.org/@go/page/8389
Example 2.4.3
r : New York City will have more than 40 inches of snow in 2525.
The statement p is true, and the statement q is false. Represent each of the following statements by a formula. What is their
truth value if r is true? What if r is false?
a. Niagara Falls is in New York if and only if New York City is the state capital of New York.
b. Niagara Falls is in New York iff New York City will have more than 40 inches of snow in 2525.
c. Niagara Falls is in New York or New York City is the state capital of New York if and only if New York City will have
more than 40 inches of snow in 2525.
Example 2.4.4
f. The sum of squares x + y > 1 iff both x and y are greater than 1.
2 2
Example 2.4.5
Determine the truth values of the following statements (assuming that x and y are real numbers):
a. The product xy = 0 if and only if either x = 0 or y = 0 .
b. The sum of squares x + y > 1 iff both x and y are greater than 1.
2 2
c. x − 4x + 3 − 0 ⇔ x = 3 .
2
d. x > y ⇔ x > y .
2 2
Example 2.4.6
Determine the truth values of the following statements (assuming that x and y are real numbers):
a. u is a vowel if and only if b is a consonant.
b. x + y = 0 if and only if x = 0 and y = 0 .
2 2
c. x − 4x + 4 = 0 if and only if x = 2 .
2
Example 2.4.7
We have seen that a number n is even if and only if n = 2q for some integer q. Accordingly, what can you say about an odd
number?
Example 2.4.8
We also say that an integer n is even if it is divisible by 2, hence it can be written as n = 2q for some integer q, where q
represents the quotient when n is divided by 2. Thus, n is even if it is a multiple of 2. What if the integer n is a multiple of 3?
What form must it take? What if n is not a multiple of 3?
2.4.4 https://math.libretexts.org/@go/page/8389
This page titled 2.4: Biconditional Statements is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Harris
Kwong (OpenSUNY) .
2.4.5 https://math.libretexts.org/@go/page/8389
2.5: Logical Equivalences
A tautology is a proposition that is always true, regardless of the truth values of the propositional variables it contains. A
proposition that is always false is called a contradiction. A proposition that is neither a tautology nor a contradiction is called a
contingency.
Example 2.5.1
T F T F
F T T F
In words, p ∨ p̄ says that either the statement p is true, or the statement p̄ is true (that is, p is false). This claim is always true.
¯
¯ ¯
¯
The compound statement p ∧ p claims that p is true, and at the same time,
¯
¯¯ ¯
¯
p
¯
is also true (which means p is false). This is
clearly impossible. Hence, p ∧ p must be false.
¯
¯¯
Example 2.5.2
Answer
We can use a truth table to verify the claim.
p q p ⇒ q q̄¯ ¯¯
p̄ q̄¯ ⇒ p̄
¯¯
(p ⇒ q) ⇔ (q̄¯ ⇒ p̄
¯¯
)
T T T T F F T
F T T F T T T
F F T T T T T
Note how we work on each component of the compound statement separately before putting them together to obtain the
final answer.
Example 2.5.3
Answer
Symbolically, the argument says
¯ ¯¯
[(p ∧ q) ⇒ r] ⇒ [ r̄ ⇒ (p̄ ∨ q̄¯)]. (2.5.1)
We want to show that it is a tautology. It is easy to verify with a truth table. We can also argue that this compound statement
is always true by showing that it can never be false.
Suppose, on the contrary, that ([eqn:tautology]) is false for some choices of p , q , and r . Then
¯¯ ¯
¯¯ ¯¯
(p ∧ q) ⇒ r must be true, and r ⇒ (p ∨ q ) must be false.
2.5.1 https://math.libretexts.org/@go/page/8390
They in turn imply that r is false, and both p̄ and q̄ are false; hence both p and q are true. This would make (p ∧ q) ⇒ r
¯
¯ ¯
false, contradicting the assumption that it is true. Thus, ([eqn:tautology]) cannot be false, it must be a tautology.
is a tautology.
Answer
We need eight combinations of truth values in p , q , and r . We list the truth values according to the following convention. In
the first column for the truth values of p , fill the upper half with T and the lower half with F. In the next column for the
truth values of q , repeat the same pattern, separately, with the upper half and the lower half. So we split the upper half of
the second column into two halves, fill the top half with T and the lower half with F. Likewise, split the lower half of the
second column into two halves, fill the top half with T and the lower half with F. Repeat the same pattern with the third
column for the truth values of r , and so on if we have more propositional variables.
Complete the following table: \[
¯ ¯¯
p q r p∧q (p ∧ q) ⇒ r r̄ p̄ q̄¯ ¯¯
p̄ ∨ q̄¯ ¯
r̄ ¯¯
⇒ (p̄ ∨ q̄¯) ¯
[(p ∧ q) ⇒ r] ⇒ [ r̄ ¯¯
⇒ (p̄ ∨ q̄¯)]
T T T
T T F
T F T
T F F (2.5.2)
F T T
F T F
F F T
F F F
\ \nonumber] Question: If there are four propositional variables in a proposition, how many rows are there in the truth
table?
Definition
Two logical formulas p and q are said to be logically equivalent, denoted
p ≡ q, (2.5.3)
if p ⇔ q is a tautology.
Note
Do not write p = q ; instead, write p ≡ q .
We are not saying that p is equal to q. Since p and q represent two different statements, they cannot be the same. What we are
saying is, they always produce the same truth value, regardless of the truth values of the underlying propositional variables. That is
why we write p ≡ q instead of p = q .
Example 2.5.4
p ⇔ q ≡ (p ⇒ q) ∧ (q ⇒ p),
2.5.2 https://math.libretexts.org/@go/page/8390
Example 2.5.5
b. p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r) . [equiv2]
Answer
The truth tables for (a) and (b) are depicted below.
¯¯ ¯¯
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
(2.5.4)
Example ([equiv1]) is an important result. It says that p ⇒ q is true when one of these two things happen: (i) when p is
false, (ii) otherwise (when p is true) q must be true.
b. p ∨ p ≡ p
¯
¯¯¯¯¯¯¯¯¯
¯
c. p ∧ q ≡ p̄ ∨ q̄
¯¯ ¯
d. p ⇔ q ≡ (p ⇒ q) ∧ (q ⇒ p)
Answer
We have set up the table for (a), and leave the rest to you.
p q p ⇒ q q̄¯ ¯¯
p̄ q̄¯ ⇒ p̄
¯¯
T T
T F
F T
F F
The logical connective exclusive or, denoted p ⊻ q , means either p or q but not both. Consequently,
¯¯¯¯¯¯¯¯¯¯¯¯¯
¯
p ⊻ q ≡ (p ∨ q) ∧ (p ∧ q) ≡ (p ∧ q̄¯) ∨ (p̄
¯¯
∧ q).
Properties of Logical Equivalence. Denote by T and F a tautology and a contradiction, respectively. We have the following
properties for any propositional variables p, q, and r.
1. Commutative properties: p ∨ q ≡ q ∨ p,
p ∧ q ≡ q ∧ p.
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r).
2.5.3 https://math.libretexts.org/@go/page/8390
3. Distributive laws: p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r),
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r).
4. Idempotent laws: p ∨ p ≡ p,
p ∧ p ≡ p.
¯¯¯¯¯¯¯¯¯
¯ ¯
¯¯ ¯¯
p ∧ q ≡ p ∨ q.
¯
¯¯
p∧p ≡ F.
7. Identity laws: p ∨ F ≡ p,
p ∧ T ≡ p.
p∧F ≡ F.
Be sure you memorize the last two equivalences, because we will use them frequently in the rest of the course.
Remark. These properties are not easy to recall. Instead of focusing on the symbolic formulas, try to understand their meanings.
Let us explain them in words, and compare them to similar operations on the real numbers,
1. Commutative properties: In short, they say that “the order of operation does not matter.” It does not matter which of the two
logical statements comes first, the result from conjunction and disjunction always produces the same truth value. Compare this
to addition of real numbers: x + y = y + x . Subtraction is not commutative, because it is not always true that x − y = y − x .
This explains why we have to make sure that an operation is commutative.
2. Associative properties: Roughly speaking, these properties also say that “the order of operation does not matter.” However,
there is a key difference between them and the commutative properties.
Commutative properties apply to operations on two logical statements, but associative properties involves three logical
statements. Since ∧ and ∨ are binary operations, we can only work on a pair of statements at a time. Given the three
statements p, q, and r, appearing in that order, which pair of statements should we operate on first? The answer is: it does
not matter. It is the order of grouping (hence the term associative) that does not matter in associative properties.
The important consequence of the associative property is: since it does not matter on which pair of statements we should
carry out the operation first, we can eliminate the parentheses and write, for example,
p∨q∨r
(5 − 7) − 4, or 5 − (7 − 4)?
Since they lead to different results, we have to be careful where to place the parentheses.
3. Distributive laws: When we mix two different operations on three logical statements, one of them has to work on a pair of
statements first, forming an “inner” operation. This is followed by the “outer” operation to complete the compound statement.
Distributive laws say that we can distribute the “outer” operation over the inner one.
4. Idempotent laws: When an operation is applied to a pair of identical logical statements, the result is the same logical statement.
Compare this to the equation x = x , where x is a real number. It is true only when x = 0 or x = 1 . But the logical
2
statement cannot be both true and false at the same time, hence p ∧ p is always false.
¯
¯¯
7. Identity laws: Compare them to the equation x ⋅ 1 = x : the value of x is unchanged after multiplying by 1. We call the number
1 the multiplicative identity. For logical operations, the identity for disjunction is F, and the identity for conjunction is T.
2.5.4 https://math.libretexts.org/@go/page/8390
8. Domination laws: Compare them to the equation x ⋅ 0 = 0 for real numbers: the result is always 0, regardless of the value x.
The “zero” for disjunction is T, and the “zero” for conjunction is F.
Example 2.5.6
Answer
The inequality 2 ≤ x ≤ 3 means
(2 ≤ x) ∧ (x ≤ 3). (2.5.5)
The inequality 2 ≤ x ≤ 3 yields a closed interval. Its negation yields two open intervals. Their graphical representations on
the real number line are depicted below.
Take note of the two endpoints 2 and 3. They change from inclusion to exclusion when we take negation.
Since 0 ≤ x ≤ 1 means “0 ≤ x and x ≤ 1 ,” its negation should be “0 > x or x > 1 ,” which is often written as “x < 0 or
x >1 .” Explain why it is inappropriate, and indeed incorrect, to write “0 > x > 1 .”
example 2.5.7
Expand (p ∧ q) ∨ (r ∧ s) .
Answer
Compare this problem to the expansion of (x + y)(u + v) . We use the distributive law twice to obtain
= xu + xv + yu + yv.
Let us follow the same procedure to expand (p ∧ q) ∨ (r ∧ s) . We need to apply the distributive law twice. The first time,
regard (r ∧ s) as a single statement, and distribute it over p ∧ q . In the second round, distribute p and q , separately, over
r ∧ s . The complete solution is shown below.
(p ∧ q) ∨ (r ∧ s) ≡ [p ∨ (r ∧ s)] ∧ [q ∨ (r ∧ s)]
≡ (p ∨ r) ∧ (p ∨ s) ∧ (q ∨ r) ∧ (q ∨ s).
(p ∧ q) ∨ (r ∧ s) ≡ [(p ∧ q) ∨ r] ∧ [(p ∧ q) ∨ s]
≡ (p ∨ r) ∧ (q ∨ r) ∧ (p ∨ s) ∧ (q ∨ s).
2.5.5 https://math.libretexts.org/@go/page/8390
hands-on exercise 2.5.5
Expand (p ∨ q) ∧ (r ∨ s) .
Example 2.5.8
is a tautology. We can use the properties of logical equivalence to show that this compound statement is logically equivalent to
T . This kind of proof is usually more difficult to follow, so it is a good idea to supply the explanation in each step. Here is a
complete proof:
(2.5.7)
This is precisely what we called the left-to-right method for proving an identity (in this case, a logical equivalence).
Example 2.5.9
Write p ⇒ q as a conjunction.
¯
¯¯¯¯¯¯¯¯¯¯¯
¯
Answer
It is important to remember that
¯
¯¯¯¯¯¯¯¯¯¯¯
¯
p ⇒ q ≢ q ⇒ p,
and
¯
¯¯¯¯¯¯¯¯¯¯¯
¯
¯¯
p ⇒ q ≢ p̄ ⇒ q̄¯
¯¯¯¯¯¯¯¯¯
¯
¯
¯¯¯¯¯¯¯¯¯¯¯
¯ ¯¯
¯ ¯¯
p ⇒ q ≡ p ∨ q ≡ p ∧ q.
Exercises 2.5
Exercise 2.5.1
Exercise 2.5.2
2.5.6 https://math.libretexts.org/@go/page/8390
Exercise 2.5.3
Construct a truth table for each formula below. Which ones are tautologies?
a. (p ∨ q) ⇒ p
¯
¯¯
b. (p ⇒ q) ∨ (p ⇒ q ) ¯¯
c. (p ⇒ q) ⇒ r
Exercise 2.5.4
¯
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
¯
c. ¯¯ ¯¯
(p ⇒ q ) ∧ (p ⇒ r) ≡ p ∧ (q ∨ r)
Answer
Add texts here. Do not delete this text first.
Exercise 2.5.5
Use only the properties of logical equivalences to verify (b) and (c) in Problem 4.
Exercise 2.5.6
Determine whether formulas u and v are logically equivalent (you may use truth tables or properties of logical equivalences).
¯¯ ¯
¯¯
u : (p ⇒ q) ∧ (p ⇒ q ) v : p
u : p ⇒ q v : q ⇒ p
u : p ⇔ q v : q ⇔ p
u : (p ⇒ q) ⇒ r v : p ⇒ (q ⇒ r)
Exercise 2.5.7
Exercise 2.5.8
2.5.7 https://math.libretexts.org/@go/page/8390
Exercise 2.5.9
b. (p ⇒ q) ∨ (p ⇒ q ) ≡ p ¯¯ ¯
¯¯
c. p ⇒ q ≡ q ⇒ p
Exercise 2.5.10
Exercise 2.5.11
b. If x ≤ 0 , then x ≤ 0 . 2
c. If x ≤ 0 , then x ≤ 0 .
2
d. If x ≯ 0 , then x ≯ 0 .
2
Exercise 2.5.12
b. (p ⇒ q̄ ) ∧ (p ∧ q)
¯
c. (p ⇒ q̄ ) ∧ q ¯
Exercise 2.5.13
¯
¯¯¯¯¯¯¯¯¯¯¯
¯
c. p ⇒ q
¯¯
Exercise 2.5.14
c. p ∧ (p̄ ∨ q)¯
¯
This page titled 2.5: Logical Equivalences is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Harris Kwong
(OpenSUNY) .
2.5.8 https://math.libretexts.org/@go/page/8390
2.6: Logical Quantiers
The expression
x >5
is neither true nor false. In fact, we cannot even determine its truth value unless we know the value of x. This is an example of a
propositional function, because it behaves like a function of x, it becomes a proposition when a specific value is assigned to x.
Propositional functions are also called predicates.
Example 2.6.1
p(x) : x > 5.
It is not a proposition because its truth value is undecidable, but p(6), p(3) and p(−1) are propositions.
Example 2.6.2
Define
q(x, y) : x + y = 1.
Answer
Both (a) and (b) are not propositions, because they contain at least one variable. Both (c) and (d) are propositions; q(1, 1) is
false, and q(5, −4) is true.
Determine the truth values of these statements, where q(x, y) is defined in Example 2.6.2.
a. q(5, −7)
b. q(−6, 7)
c. q(x + 1, −x)
Although a propositional function is not a proposition, we can form a proposition by means of quantification. The idea is to
specify whether the propositional function is true for all or for some values that the underlying variables can take on.
Definition
The universal quantification of p(x) is the proposition in any of the following forms:
p(x) is true for all values of x.
For all x, p(x).
For each x, p(x).
For every x, p(x).
Given any x, p(x).
2.6.1 https://math.libretexts.org/@go/page/8391
∀x p(x),
which is pronounced as
“for all x, p(x)”.
The symbol ∀ is called the universal quantifier, and can be extended to several variables.
Example 2.6.3
The statement
“For any real number x, we always have x 2
≥0 ”
is true. Symbolically, we can write
2 2
∀x ∈ R (x ≥ 0), or ∀x (x ∈ R ⇒ x ≥ 0). (2.6.1)
The second form is a bit wordy, but could be useful in some situations.
Example 2.6.4
The statement
∀x ∈ R (x > 5)
is false because x is not always greater than 5. To disprove a claim, it suffices to provide only one counterexample. We can use
x = 4 as a counterexample.
However, examples cannot be used to prove a universally quantified statement. Consider the statement
2
∀x ∈ R (x ≥ 0).
By direct calculations, one may demonstrate that x ≥ 0 is true for many x-values. But it does not prove that it is true for every
2
x, because there may be a counterexample that we have not found yet. We have to use mathematical and logical argument to
Example 2.6.5
The statement
“Every Discrete Mathematics student has taken Calculus I and Calculus II”
is clearly a universally quantified proposition. To express it in a logical formula, we can use an implication:
An alternative is to say
where S represents the set of all Discrete Mathematics students. Although the second form looks simpler, we must define what
S stands for.
Definition
The existential quantification of p(x) takes one of these forms:
There exists an x such that p(x).
For some x, p(x).
There is some x such that p(x).
We write, in symbol,
2.6.2 https://math.libretexts.org/@go/page/8391
∃x p(x),
which is pronounced as
“There exists x such that p(x).”
The symbol ∃ is called the existential quantifier. It can be extended to several variables.
Example 2.6.6
To prove that a statement of the form “∃x p(x)” is true, it suffices to find an example of x such that p(x) is true. Using this
guideline, can you determine whether these two propositions
a. ∃x ∈ R (x > 5)
b. ∃x ∈ R (√−x = 0)
are true?
Answer
a. True. For example: x = 6 .
b. True. For example: x = 0 .
Example 2.6.7
The proposition
“There exists a prime number x such that x + 2 is also prime”
is true. We call such a pair of primes twin primes.
Example 2.6.8
The proposition
“There exists a real number x such that x > 5 ”
can be expressed, symbolically, as
Notice that in an existential quantification, we use ∧ instead of ⇒ to specify that x is a real number.
The proposition
“The square of any real number is positive”
2.6.3 https://math.libretexts.org/@go/page/8391
is a universal quantification
“For any real number x, x 2
>0 .”
Is it true or false?
Example 2.6.9
When multiple quantifiers are present, the order in which they appear is important. Determine whether these two statements are
true or false.
a. ∀x ∈ Z ∃y ∈ R (xy < 1)
∗
b. ∃y ∈ R ∀x ∈ Z (xy < 1)
∗
Answer
a. To prove that the statement is true, we need to show that no matter what integer x we start with, we can always find a
nonzero real number y such that xy < 1 . For x ≤ 0 , we can pick y = 1 , which makes xy = x ≤ 0 < 1 . For x > 0 , let
y =
x+1
, then xy =
1 x
< 1 . This concludes the proof that the first statement is true.
x+1
b. Let y = 1 . Can we find an integer x such that xyNless1? Definitely! For example, we can set x = 2 . This
counterexample shows that the second statement is false.
Example 2.6.10
∀x ∈ Q ∀y ∉ Q (x + y is irrational).
Although this form looks complicated and seems difficult to understand (primarily because it is quite symbolic, hence appears
to be abstract and incomprehensible to many students), it provides an easy form for negation. See the discussion below.
The fact that an implication can be expressed as a universally quantified statement sounds familiar. See Example [eg:isostrig].
We shall learn several basic proof techniques in Chapter 3. Some of them require negating a logical statement. Since many
mathematical results are stated as quantified statements, it is necessary for us to learn how to negate a quantification. The rule is
rather simple. Interchange ∀ and ∃, and negate the statement that is being quantified. In other words,
¯
¯¯¯¯¯¯¯¯¯¯¯¯¯¯
¯ ¯¯¯¯¯¯¯¯
¯ ¯
¯¯¯¯¯¯¯¯¯¯¯¯¯¯
¯ ¯¯¯¯¯¯¯¯
¯
∀x p(x) ≡ ∃x p(x), and ∃x p(x) ≡ ∀x p(x).
If we have ∀x ∈ Z, we only change it to ∃x ∈ Z when we take negation. It should not be negated as ∃xNot ∈ Z . The reason is: we
are only negating the quantification, not the membership of x. In symbols, we write
¯
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
¯ ¯¯¯¯¯¯¯¯
¯
∀x ∈ Z p(x) ≡ ∃x ∈ Z p(x).
2.6.4 https://math.libretexts.org/@go/page/8391
The negation of “∃x ∈ Z p(x)” is obtained in a similar manner.
Example 2.6.11
We find
¯
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
∗¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
¯ ∗
∀x ∈ Z ∃y ∈ R (xy < 1) ≡ ∃x ∈ Z ∀y ∈ R (xy ≥ 1),
and
¯
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
∗¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
¯ ∗
∃y ∈ R ∀x ∈ Z (xy < 1) ≡ ∀y ∈ R ∃x ∈ Z (xy ≥ 1).
Example 2.6.12
The statement
“All real numbers x satisfy x 2
≥0 ”
can be written as, symbolically, ∀x ∈ R (x
2
≥ 0) . Its negation is ∃x ∈ R (x
2
< 0) . In words, it says “There exists a real
number x that satisfies x < 0 .”
2
Exercises
Exercise 2.6.1
p(n): n is prime
q(n): n is even
r(n): n > 2
2.6.5 https://math.libretexts.org/@go/page/8391
Exercise 2.6.2
Exercise 2.6.3
Exercise 2.6.4
Exercise 2.6.5
Exercise 2.6.6
Exercise 2.6.7
For each statement, (i) represent it as a formula, (ii) find the negation (in simplest form) of this formula, and (iii) express the
negation in words.
a. For all real numbers x and y , x + y = y + x .
b. For every positive real number x there exists a real number y such that y = x .
2
c. There exists a real number y such that, for every integer x, 2x + 1 > x y .
2 2
2.6.6 https://math.libretexts.org/@go/page/8391
Exercise 2.6.8
For each statement, (i) represent it as a formula, (ii) find the negation (in simplest form) of this formula, and (iii) express the
negation in words.
a. There exist rational numbers x and x such that x < x and x − x > x − x .
1 2 1 2
3
1 1
3
2 2
b. For all real numbers x and y there exists an integer z such that 2z = x + y .
c. For all real numbers x and x , if x + x − 2 = x + x − 2 , then x = x .
1 2
3
1 1
3
2 2 1 2
Exercise 2.6.9
Exercise 2.6.10
1. Some students may not be familiar with matrices. A matrix is rectangular array of numbers. Matrices are important tools in
mathematics. The product of two matrices of appropriate sizes is defined in a rather unusual way. It is the peculiar way that two
matrices are multiplied that makes matrices so useful in mathematics. The square of a matrix is of course the product of the
matrix with itself. It is well-defined only when the matrix is a square matrix. As it turns out, the order of multiplication of two
matrices is important. In other words, given any two matrices A and B , it is not always true that AB = BA .↩
This page titled 2.6: Logical Quantiers is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Harris Kwong
(OpenSUNY) .
2.6.7 https://math.libretexts.org/@go/page/8391
COURSE: BCA
SUBJECT: MATHEMATICS
SUBJECT CODE: UGCA-1901
SESSION: AUGUST-DECEMBER 2023
GJIMT,MOHALI
2. Make a truth table that has a column for each premise and a column
for the conclusion.
3. If the truth table has a row where the conclusion column is FALSE
while every premise column is TRUE, then the argument is INVALID.
Otherwise, the argument is VALID.
Example 1
Use a truth table to test the validity of the following argument.
A. Valid
B. Invalid
Step 1
Symbolise the argument.
Let p be the statement "You invest in the Gomermatic Corporation."
Let q be the statement "You get rich."
Step 2
Make a truth table having a column for each premise and for the
conclusion.
Step 3
Interpret the truth table.
Notice that in the third row, the conclusion is FALSE while both premises
are TRUE.
This tells us that the argument is INVALID.
Example 2
Use a truth table to test the validity of the following argument.
Step 1
Symbolise the argument.
Step 2
Make a truth table having a column for each premise and for the
conclusion.
Step 3
Interpret the truth table.
Notice that in this truth table, there is NO ROW in which conclusion is
FALSE while both premises are TRUE.
This tells us that the argument is VALID.
Example 3
Use a truth table to test the validity of the following argument.
If I enter the poodle den, then I will carry my electric poodle prod or my
can of mace.
I am carrying my electric poodle prod but not my can of mace.
Therefore, I will enter the poodle den.
A. Valid
B. Invalid
If I enter the poodle den, then I will carry my electric poodle prod or my
can of mace.
I am carrying my electric poodle prod but not my can of mace.
Therefore, I will enter the poodle den.
Example 4
Test the validity of the following argument.
I will buy a new goat or a used Yugo.
If I buy both a new goat and a used Yugo, I will need a loan.
I bought a used Yugo and I don't need a loan.
Therefore, I didn't buy a new goat.
A. Valid
B. Invalid
Example 5
Test the validity of the following argument.
Test the validity of the following argument, then click on the correct
answer.
Test the validity of the following argument, then click on the correct
answer.
p→q
∴p
This is not necessarily the only correct, consistent symbolization for the
argument, but it is the simplest.
Here is a truth table for the argument. The three columns in bold are the
important columns. An argument is INVALID if it is possible for the
conclusion to be false while every premise is true.
p→q q p
T T T T T
T F F F T
F T T T F
F F T F F
In the third row, the conclusion is false while every premise is true, so
the argument is invalid. This argument has a common form called
Fallacy of the Converse.
Note that we have re-written the argument, placing the major premise
first.
The correct answer is: Invalid
p→q
∴p
This is not necessarily the only correct, consistent symbolization
for the argument, but it is the simplest.
Here is a truth table for the argument. The three columns in bold
are the important columns. An argument is INVALID if it is possible
for the conclusion to be false while every premise is true.
p→q q p
T T T T T
T F F F T
F T T T F
F F T F F
In the third row, the conclusion is false while every premise is true,
so the argument is invalid. This argument has a common form
called Fallacy of the Converse.
EXERCISE 12.2
(i) 19 is not a prime number and all the angles of a triangle are equal.
(ii) 19 is a prime number or all the angles of a triangle are not equal
(iii) 19 is a prime number and all the angles of a triangle are equal
(iv) 11 is a prime number and all the sides of a rectangle are equal
(i) 4 + 7 = 12 (ii) What are you doing? (iii) 3n ≤ 81, n ∈ ℕ (iv) Peacock is our
national bird (v) How tall this mountain is!
5. Write the converse, inverse, and contrapositive of each of the following
implication.
(i) ( p ∧ q ) ¬( p ∨ q)
(ii) ( ( p ∨ q) ¬p ) → q
(iii) ( p → q ) ↔ (¬ p → q)
(iv) ( ( p → q ) ∧ (q → r))→ ( p → r)
8. Show that (i) ¬( p ∧ q) ≡ ¬p ∨¬q (ii) ¬( p → q) ≡ p ∧¬q .
13. Using truth table check whether the statements¬( p ∨ q ) ∨ (¬p ∧ q) and
¬p are logically equivalent.
14. Prove p → ( q → r) ≡ ( p ∧ q) → r without using truth table.
12. p → ( q → p) is a Tautology.
Propositional Equivalences
Def. A compound proposition that is always true, no matter what the truth
values of the (simple) propositions that occur in it, is called tautology. A
compound proposition that is always false, no matter what, is called a
contradiction. A proposition that is neither a tautology nor a contradiction
is called a contingency.
Note: Any equivalence termed a “law” will be proven by truth table, but
all others by proof (as we shall see next).
Equivalence Name
p T p Identity laws
p F p
p T T Domination laws
p F F
p p p Idempotent laws
p p p
p p Double negation law
p q q p Commutative laws
p q q p
( p q ) r p ( q r) Associative laws
(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 laws
(p q) p q
p p T Negation laws
p p F
(p q) p q Other useful logical equivalence
(p q) q p
Exercise 11: Without truth tables to show that an implication and it’s
contrapositive are logically equivalent.
Applications
In addition to providing a foundation for theorem proving, which we will
cover in this class, this algebraic look at logic can be studied further for the
purpose of discussion computer program correctness.