Logic Study Mat
Logic Study Mat
Mathematical Logic
Introduction
Logic is the basis on which all the sentences are built. The mathematical theory of logic is
called symbolic logic. This algebraic way of studying the arguments was developed by the
English Mathematician George Boole in the 19th century.
Propositions
A declarative sentence (or assertion) which is either true or false, but not both, is called a
proposition (or statement). The sentences which are interrogative, exclamatory or
imperative in nature are not propositions. Propositions are denoted by the letters p, q, r
etc. If the proposition is true we give it a truth value T (or 1) otherwise F (or 0).
Examples
For example, let us consider the following sentences:
1. p: “It is raining today”. This statement is a declared statement and so it is a
proposition. It may be true or false.
2. q: “Who is there?” This statement is an interrogative statement and not declarative
in nature as it is neither true nor false. So, it is not a proposition.
3. r: “a+b=3”. This statement is not a proposition since it is not true if a=1, b=4 and it
is not false if a=1.5, b=1.5.
4. p: “Kolkata is the capital of West Bengal”. This statement is a proposition because
it is a declared statement which is true.
5. q: “Get out from here”. This statement is not a declarative statement. So, it is not a
proposition.
6. r: “2+2=3”. This statement is a proposition which is false.
Exercise:
Identify which of the following statements are propositions:
(i) 2026 is a leap year (ii) Sun rises in the west.
(iii) P(x): x+6=7 (iv) P(5): 5+6=2
(v) Apples are oranges (vi) Grapes are black
(vii) Two and two makes 4 (viii) x>10
(ix) Open the door (x) Are you tired?
2. q:”distance travelled by an object is the product of its speed and time”. This
proposition is true. So, the truth value of q is T or 1.
The symbols p,q,r,...etc. are also known as propositional variables since they take two
different values T or F. The field of logic that deals with propositions is called
propositional logic or propositional calculus.
The propositions which do not contain any logical operators or connectives (to be
introduced in the next section) are called simple (primary or atomic) propositions. The
mathematical statements constructed by connecting one or more simple propositions are
called compound (molecular or complex) propositions.
Truth Table
The table which displays all the truth vales assumed by proposition is known as truth table.
For example for the proposition p the truth table is
p
T
F
In particular, truth tables can be used to show whether a propositional expression is true
for all legitimate input values, that is, logically valid.
Logical connectives
Conjunction (AND).
Let p and q are two propositions, then the proposition “p and q” is called conjunction of
p and q. It is denoted by p ∧ q (read as p and q). This is a compound proposition which
is true when both p and q are true (T) and is false (F) otherwise. It is notable that
conjunction has the same properties as intersection.
3
Examples Let p:” It is raining”, q: “It is cold” be two propositions”. Then the conjunction
of p and q is p ∧ q: “It is raining and cold”.
p q p∧q
T T T
T F F
F T F
F F F
The statements (1) and (3) are true (T) but the statements (2) and (4) are false (F)
Disjunction (OR).
Let p and q are two propositions, then the proposition “p or q” is called disjunction of p
and q. It is denoted by p˅q (read as p or q). This is a compound proposition which is true
when both p and q are false (F) and is true (T) otherwise. Disjunction has the same
property as union. It is also called ‘inclusive or’.
Examples Let p: “Shyam is tall”, q: “Shyam is intelligent” be two propositions. Then the
disjunction of p and q is p ˅ q: “Shyam is tall or he is intelligent”.
p q p˅q
T T T
T F F
F T F
F F F
4
The statements (1), (2) and (3) are true (T) but the statement (4) is false (F)
Negation (NOT)
Given any proposition p, another proposition formed by writing “It is not the case that”
or “It is false that” before p or by inserting the word ‘not’ suitably in p is called negation
of p. It is denoted by ∼ p (or, ¬p) (read as not p). This is a compound proposition which
is true (T) when p is true and false (F) when p is false.
Examples Let p:” It is hot today” be any proposition, then∼ p is any one of the following
statements.
1. It is not the case that today is hot
2. It is false that today is hot
3. It is not hot today
p ∼p
T F
F T
Note: ∼ (∼p) p
Implication (Conditional)
Let p and q are two propositions, then the proposition “if p then q” is called conditional
or implication proposition of p and q. It is denoted by p → q or p ⇒ q (read as p
implies q). The statement p is called the antecedent or premise or hypothesis and the
statement q is called consequent or conclusion. This is a compound proposition which is
false when p is true (T) and q is false (F) and true (T) otherwise.
5
Examples Let p: “Rahim works hard”, q: “Rahim comes first in Examination” be two
propositions. Then the implication of p and q is
p → q: “If Rahim works hard then he comes first in Examination”.
P q p →q
T T T
T F F
F T T
F F T
Let p and q are two propositions, then the proposition “p if and only if q” or “ if p then q
and if q then p” is called biconditional proposition of p and q. It is denoted by p ↔ q
(read as p if and only if q). This is a compound proposition which is true when p and q
has the same truth values and is false otherwise.
It can be easily verified that p ↔ q is true when both the conditionals p→q and p→q
are true. So, the symbol ↔ is a combination of the symbols → and
Alternatively, p↔ q is also expressed as “p iff q” and “p is necessary and sufficient for q”.
i.e., p ↔ q is (p → q) ∧ (q→ p)
Examples Let p: “ Birds fly” and q: “Sky is clear” be two propositions. Then the
biconditional of p and q is
6
p ↔ q: “Birds fly if and only if the sky is clear” or “If the birds fly then the sky is clear
and if the sky is clear then the birds fly”.
The truth table of p ↔ q is
p q p ↔q
T T T
T F F
F T F
F F T
p q q→p
T T T
T F T
F T F
F F T
7
Inverse
To form the inverse of the conditional statement, we must take the negation of both the
hypothesis p and the conclusion q.
The inverse of “If it rains then the boys cancel school” is “If it does not rain, then the
boys do not cancel school”. The inverse of p → q is symbolically written as ∼p→∼q.
p q ∼p→∼q
T T T
T F T
F T F
F F T
Contrapositive
To form the contrapositive of the conditional statement, we must interchange the
hypothesis p and the conclusion q of the inverse statement.
The contrapositive of "If it rains, then the boys cancel school" is "If they do not cancel
school, then it does not rain." The contrapositive of p → q is symbolically written as
∼q→∼p.
p q ∼q→∼p
T T T
T F F
F T T
F F T
Examples Given any conditional statement p → q, the three related statements can be
written as follows:
Examples Given any conditional statement p → q, the three related statements can be
written as follows:
Statement: If two angles are congruent, then they have the same measure.
Converse: If two angles have the same measure, then they are congruent.
Inverse: If two angles are not congruent, then they do not have the same measure.
Contrapositive: If two angles do not have the same measure, then they are not congruent.
Note: If a statement is true, then the contrapositive is also logically true. If the converse is
true, then the inverse is also logically true.
Exercise:
Operator Precedence
¬ 1
∧ 2
˅ 3
→ 4
↔ 5
p q ∼p ∼p ∧ q ∼(∼p ∧ q)
T T F F T
T F F F T
F T T T F
F F T F T
Note: The number of rows in a truth table of a propositional statement is 2n where n is the
number of variables in the propositional statement. For example in the above truth table
of the propositional formula P = f (p, q)= ∼(∼p ∧ q), the number rows is 22 = 4, since, the
formula contains two variables p and [Link] the truth table of the propositional statement p
∧ (∼q) ˅ r → p there are 23 = 8 rows, since, the formula contains three variables p, q and
r.
Logical Equivalence
Two compound propositions P = f1 (p, q, r,...) and Q = f2 (p, q, r,...) are said to be logically
equivalent or simply equivalent, if they have identical truth values, viz. if the truth value of
P is equal to the truth value of Q for every one of the 2n possible sets of truth values
assigned for p, q, r,...This equivalence is denoted by
P Q (read as P is equivalent to Q).
10
p q p→q p q ∼p ∼p ∨ q
and
T T T T T F T
T F F T F F F
F T T F T T T
F F T F F T T
We find that the final columns in the truth tables of the statements p → q and
∼ p ∨ q are identical.
Hence, p → q ∼p ∨ q.
Note: The symbol is not a connective.
Principal of Duality
The dual of a compound proposition that contains only the logical operators ˅, ˄ and ∼
is the proposition obtained by replacing each ˅ by ˄, each ˄ by ˅, each T by F and each
F by T, where F and T are special variables representing compound propositions that are
tautologies and contradictions respectively. The dual of the proposition P is denoted by
P*.
If P (p, q, r,...) Q( p, q, r,...), where P and Q are compound propositions, then P* (p,
q, r,...) Q*( p, q, r,...).
Algebra of Propositions
For any propositions p, q, r the logical connectives ˄, ˅, ∼ obey the laws of Algebra as
shown in the following table
2. Identity law p˅ F p p ˄ T p
11
3. Dominant law p˅ T T p ˄ F F
4. Complement law p ˅ ∼p T p ˄ ∼p F
For any propositions p, q, r the equivalences involving conditional ‘→’ are shown in the
following table
Equivalences involving Conditionals
Sl No. Equivalences
1. p→q ∼p ˅ q
2 p→q ∼q →∼p
3 p ˅q ∼p →q
4 p ˄ q ∼ (p → ∼ q)
5 ∼ (p → q) p ˄ ∼ q
6 (p → q) ˄ ( p → r) p → (q ˄ r)
7 (p → r) ˄ (q→ r) (p ˅ q) → r
8 (p → q) ˅ ( p → r) p → (q ˅ r)
9 (p → r) ˅ (q→ r) (p ˄ q) → r
12
For any propositions p, q, r the equivalences involving Biconditional ‘↔’ are shown in
the following table
Sl No. Equivalences
1. p ↔ q (p → q) ˄ ( q → p)
2
p↔ q ∼p↔∼q
3
p ↔ q (p ˄ q) ˅ ( ∼ p ˄ ∼ q)
4
∼ (p ↔ q) p ↔ ∼ q
p ˄ (q ˅ r) (p ˄ q ) ˅ (p ˄ r)
p ˄ (q ˅ r)
p q r q˅r p ˄ (q ˅ r)
T T T T T
T T F T T
T F T T T
T F F F F
F T T T F
F T F T F
F F T T F
F F F F F
13
(p ˄ q) ˅ (p ˄ r)
p q r p˄q p˄r (p ˄ q ) ˅ (p ˄ r)
T T T T T T
T T F T F T
T F T F T T
T F F F F F
F T T F F F
F T F F F F
F F T F F F
F F F F F
From the above tables we see that the two propositional statements p ˄ (q ˅ r) and (p ˄ q
) ˅ (p ˄ r) have the same truth tables. Hence,
p ˄ (q ˅ r) (p ˄ q ) ˅ (p ˄ r)
∼ (p ˅ q)
p q p˅q ∼ (p ˅q)
T T T F
T F T F
F T T F
F F F T
∼p˄∼q
p q ∼p ∼q ∼p˄∼q
14
T T F F F
T F F T F
F T T F F
F F T T T
From the above tables we see that the two propositional statements ∼ (p ˄ q) and ∼ p ˄
∼ q have the same truth tables. Hence,
∼ (p ˅ q) ∼ p ˄ ∼ q
p→q
p q p →q
T T T
T F F
F T T
F F T
∼p˅q
p q ∼p ∼p ˅ q
T T F T
T F F F
F T T T
F F T T
From the above tables we see that the two propositional statements p → q and ∼ p ˅ q
have the same truth tables. Hence,
∼ (p ˅ q) ∼ p ˄ ∼ q
p ↔ q (p → q) ˄ ( q → p)
p↔q
P q p↔q
T T T
T F F
F T F
F F T
(p → q) ˄ ( q → p)
p q p→ q→p (p → q) ˄ ( q → p)
q
T T T T T
T F F T F
F T T F F
F F T T T
From the above tables we see that the two propositional statements p ↔ q and (p → q) ˄
( q → p) have the same truth tables. Hence,
p ↔ q (p → q) ˄ ( q → p)
Solved Problems
Problem 1: Let p:’Today is Sunday’ and q: ‘It is hot’ be two propositions. Write the
sentences which describe the compound propositions
(i)q ˄∼ p
(ii)∼ (p ˅ q)
16
(iii)p ˅ q
Problem 2: Let p:’He is intelligent’ and q: ‘He is fat’ be two propositions. Write each of
the following statements in logical form using the simple propositions p and q.
Solution. (i) q ˄ ∼ p
(ii) ∼q ˄ ∼ p
(iii) p ˅ q
(iv). ∼ (p ˅ q)
(v). ∼ (∼q ˅∼ p)
(vi) p → q
Problem 3: Let p:’I get a Bachelors degree in Science’, q: ‘I get a job’ and r:’I go to USA’
be three propositions. Write each of the following statements in logical form using the
simple propositions p, q and r. Write the statements corresponding to the following
compound propositions
(i). ∼q →(r ˄ p)
(ii) (p ˅ q) ↔r
(iii)(p˄ ∼ q) →∼r
17
Solution. (i) If I do not get a job then I go to USA and get a bachelors degree in Science
(ii) I get a Bachelors degree in Science or I get a job if and only if I go to USA
(iii) If I get a Bachelors degree in Science and I do not get a job then I do not go to USA
Problem 5: Construct the truth table for each of the following compound propositions:
(i) (p ˅ q) → (p ˄ q)
(ii) (p → q) → (q → p)
(iii) (q → ∼ p) ↔ (p ↔ q)
(iv) (p → q) ↔ (∼q → ∼p)
p q p˅q p˄q (p ˅ q) → (p ˄ q)
T T T T T
T F T F F
F T T F F
F F F F T
p q p→ q→ (p → q) → (q → p)
q p
18
T T T T T
T F F T T
F T T F F
F F T T T
p q ∼p q→∼p p↔q (q → ∼ p) ↔ (p ↔ q)
T T F F T F
T F F T F F
F T T T F F
F F T T T T
T T F F T T T
T F F T F F T
F T T F T T T
F F T T T T T
(i) p ˄ (q ˄ r)
(ii) ∼p ˅ ∼q
(iii)(p ˄ ∼ q) ˅ (∼p ˄ q)
Problem 7: Construct the truth table for each of the following compound propositions:
Solution. (i) In the compound proposition (p→ ( q → r)) → ((p → q) →( p → r)) three
simple propositions p, q and r are involved. So, there must be 23 = 8 rows in the truth
table.
p q r q ˄ r p˅ ( q ˄ r ) ∼a p˅q p→r (p ˅ q) ˄ ( p → r) ∼a ↔b
a b
T T T T T F T T T F
T T F F T F T F F T
T F T F T F T T T F
T F F F T F T F F T
F T T T T F T T T F
F T F F F T T T T T
F F T F F T F T F F
F F F F F T F T F F
20
p q r ∼r p ˄ q (p ˄ q) ˅ ∼r p˄ q) ˅ ∼(r)) ↔ p
T T T F T T T
T T F T T T T
T F T F F F F
T F F T F T T
F T T F F F T
F T F T F T F
F F T F F F T
F F F T F T F
p q r s p→q (p → q) → r (p → q) → r) →s
T 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 T
T F T T F T T
T F T F F T F
T F F T F T T
T F F F F T F
F T T T T T T
F T T F T T F
F T F T T F T
F T F F T F T
F F T T T T T
F F T F T T F
F F F T T F T
F F F F T F T
Note: Every combination of the truth values of every component is chosen according to
some rules. In the first column of the truth table corresponding to the first component,
1 1
we have taken 2 n entries each equal to T, followed by 2 n entries each equal to F.
2 2
1
In the second column corresponding to the second component 2n entries each equal
4
21
1 n 1
to T have been taken, followed by 2 F’s and again followed by 2n T’s and again
4 4
1 n 1
2 F’s. In the third column corresponding to the third component 2n T’s and again
4 8
1 n
2 F’s will be alternatively written starting with T’s and so on.
8
Problem 8: Write the converse, inverse and contrapositive of the following statements
p: It is raining
q: I feel cold
The Contrapositive of the statement is ‘∼q →∼p’: If tomorrow is not Thursday, then
today is not Independence day”
(i) p → (q ˅ r) (p → q) ˅ (p → r)
(ii) p ˄( (∼q ˅ r) ˄(∼r ˅ q)) p˄ (q↔ r)
p q r q˅r p → (q ˅ r)
T T T T T
T T F T T
T F T T T
T F F F F
F T T T T
F T F T T
F F T T T
F F F F T
p q r p→q p→ r (p → q) ˅ (p → r)
T T T T T T
T T F T F T
T F T T T T
T F F F F F
F T T T T T
F T F T T T
F F T T T T
F F F F T T
p→ (q ˅ r) (p → q) ˅ (p → r)
T T T F F T T T T
T T F F T F T F F
T F T T F T F F F
T F F T T T T T T
F T T F F T T T F
F T F F T F T F F
F F T T F T F F F
F F F T T T T T F
p q r q↔r p ˄ (q↔ r)
T T T T T
T T F F F
T F T F F
T F F T T
F T T T F
F T F F F
F F T F F
F F F T F
Since the truth tables of p ˄ ((∼q ˅ r) ˄ (∼r ˅ q)) and p ˄ (q ↔ r) are identical so
p ˄( (∼q ˅ r) ˄(∼r ˅ q)) p˄ (q↔ r)
p ˄ q, by dominant law
Also R.H.S= p ˄ q
(ii) L.H.S = p → (q → p)
∼p ˅ (q → p) [as p → q ∼p ˅ q]
∼p ˅ (∼ q ˅ p) [as p → q ∼p ˅ q)]
∼q ˅ T, by complement law
T, by dominant law
Also, R.H.S = ∼p → ( p → q)
∼p ˅ (p → q) [as p → q ∼p ˅ q]
∼p ˅ (∼p ˅ q) [as p → q ∼p ˅ q]
T ˅ q, by complement law
25
T, by dominant law
p → ( q → p) ∼p → ( p → q)
(iii) L.H.S = ∼ (p ↔ q)
by distributive law
by distributive law
∼ (p ↔ q) (p˅ q) ˄∼ (p ˄ q) (p ˄∼ q) ˅ (∼p ˄ q)
26
(iv) R.H.S = (p → q) ˅ (p → r)
(p → q) ˅ (p → r)
p → (q ˅ r) [as p → q ∼p ˅ q]
L.H.S = p → (q ˅ r)
p → (q ˅ r) (p → q) ˅ (p → r)
(i) (p ˄ q) → (p ˅ q) is a tautology
(ii) ∼ (p ˅ q) ˅ (∼p ˄ q) ˅ p is a tautology
(iii) ∼((p ˅ (∼p ˄ q)) ˅ (∼q ˄ p)) ˄ q is a contradiction
T ˅ T, by complement law
T
Hence, (p ˄ q) → (p ˅ q) is a tautology
(∼ p ˄ T) ˅ p , by complement law
∼ p ˅ p, by identity law
T, by complement law
(iii)∼ ((p ˅ (∼p ˅ q)) ˅ (∼q ˄ p)) ˄ q ∼ ((p ˅ ∼p) ˅ q)) ˅ (∼q ˄ p)) ˄ q,
by associative law
by complement law
by identity law
∼( T) ˄ (p˅q)) ˄q ,
F , by dominant law
p q ∼p ∼p˄q (∼p˄q) ˅p
T T F F T
T F F F T
F T T T T
F F T F F
p q ∼p ∼p˅q
T T F T
T F F F
F T T T
F F T T
Exercises
1. Consider the following propositions:
p: Rita is rich
q: Hema is poor
q: He is brave
(i) p˅q
(ii) ∼ (p˅q)
(iii) ∼ p˄∼q
(iv) ∼ (p˅∼q)
(i) p→q
(ii) ∼p→(q˅r)
30
(iii) p↔q
(i) p˅q
(ii) ∼p→q
(iii) p↔r
(i) ∼p˄∼q
(ii) p→q
(iii) p↔q
10. Construct the truth table for each of the following compound propositions:
(i) (p ˄ q) → (p ˅q)
(ii) (p → q) ↔ (∼q →∼p)
(iii) (p → q) ˅ (∼p → q)
(iv) (p → q) ˄ (∼p → q)
(v) (p ↔ q) ˅ (∼p ↔ q)
(vi) (∼p˄ (∼q ˄ r)) ˅(q ˄ r) ˅(p ˄ r)
(vii) (p → q) ˄ (q → r) → (p → r)
(viii) (p ↔ q) ˅ (∼q ↔ r)
11. Prove the following equivalences:
(i) ∼ (p → q) p ˄ ∼q
(ii) ( p ˄ q) ˅ (p ˄∼q) p
(iii) ( p ˅ q) ˄ (p ˅∼q) p
(iv) ∼ (p ↔ q) (p ˄ ∼q) ˅(∼p ˄ q)
(v) (p → q) ˄ (p → r) p → (q ˄ r)
(vi) p ˄ ((∼q ˅ r) ˄ (∼r ˅ q)) p ˄ ( q ↔ r)
Answers
1 (i) p ˄ ∼q
(i) ∼p ˄ ∼q
(ii) ∼p ˄ q
(iv) p ˄ ∼q
(v)∼ (p ˄ ∼q)
(vi)(∼p) ˅q
(vii)∼p ˅ q
2. (i) p ˄ q
(ii) q ˅(∼q ˄ p)
(iii)p˅∼q
3.(i) p ˄ q
32
(ii) ∼p ˄ q
(iii) ∼q ˄ p
(iv) ∼p ˄∼q
(v) p ˅ q
(iii)Everyone has either visited New Delhi or has not visited any part of India
triangle.
2 2 2
Inverse: If ABC is not a right angled triangle, then AB + BC AC
2 2 2
Contrapositive: If AB + BC AC , the triangle ABC is not a right angled
triangle.
Inverse:If I do not study hard, then I will not pass in the Examination
Contrapositive: If I do not pass in the Examination, then I will not study hard
34
The statement “x is greater than 6” has two parts. The first part, the variable x, is the
subject of the statement. The second part “ is greater than 6”, which refers to the property
which a subject can have, is called the predicate. Thus, in a sentence, the word (or set of
words) which describe the nature or properties of a subject is the predicate.
The statement “x is greater than 6” can be denoted by the notation P(x), where P
denotes the predicate “is greater than” and x is the variable. P(x) is called the propositional
function at x. Once a value has been assigned to the variable x, the statement P(x) becomes
a proposition and assumes truth values.
For example, the truth value of P (10) ( 10 > 6) and P(3) ( 3 > 6) are True (T) and
False (F) respectively.
The set of all possible values that may be substituted in place of the variables of a
proposition function is called domain (Universe of discourse) of the proposition function.
Here, A is the universe of discourse. Here, P(1) and P(3) are false (F) while P(10) and
P(12) are true (T).
Example Let us consider the proposition “Nilanjan is a doctor”. Then, the propositional
function P(x) is “x is a doctor”. Here, P is the proposition “Nilanjan” and the predicate is
“is a doctor”. The domain or Universe of discourse is “the set of all human beings”.
Example Let us consider the proposition function P(x, y) which states “x2+y2 = 5”. The
proposition function is defined for two variables x, y. P(1, 2) is true (T) but P(1, 3) is false
(F). The Universe of discourse of P(x, y) is R R, where R is the set of all real numbers.
Quantifiers
We have seen that a proposition can be created from a propositional function P(x) by
assigning particular value to the variable x. Quantification is the process of creating a
proposition from a proposition function. There are two types of quantifications, namely,
Universal quantification and Existential quantification.
• Universal Quantification
The universal quantification of the proposition function P(x) is the proposition “P(x) is
true for all values of x in the domain”. This quantification is denoted by x, P(x).The
symbol is called the Universal quantifier.
Example Let P(x) be the propositional function “x + 3 < 14”. Let the domain be A = {1,
3, 5, 7, 9, 11, 13, 15}. Then, the Universal quantification is “x + 3 < 14” x {1, 3, 5, 7,
9, 11, 13, 15}. The proposition x, P(x) is false (F), since the values 11, 13, 14 do not
satisfy the relation “x + 3 < 14”.
But, if the domain is taken A = {1, 3, 5, 6, 7, 9}, then x, P(x) will be true.
Example Let P(x) be the propositional function “x >3”. Let the domain be A: “set of all
real numbers”. Then, the Universal quantification x, P (x) is “x >3 is true for all values
of x”. Obviously the proposition x, P(x) is false (F), since x >3 is not true for x = 2.
36
Example Let P(x) be the propositional function “x is mortal”. Let the domain be A: “set
of all human beings”. Then the Universal quantification is ”All human beings are mortal”.
Obviously the proposition x, P(x) is true (T).
Example Let P(x) be the propositional function “x is a good batsman” where the domain
A is “set of all students in a class”. Then the Universal quantification x, P(x) is the
statement “Every student in the class is a good batsman”.
• Existential quantification
The Existential quantification of the propositional function P(x) is the proposition “There
exists a value of x in the domain for which P(x) is true”. This quantification is denoted by
x, P(x). The symbol is called the Existential quantifier.
Example Let P(x) be the propositional function “x + 3 < 14”. Let the domain be A = {1,
3, 5, 7, 9, 11, 13, 15}. Then, the Existential quantification x, P(x) is “there exists a value
of x for which x + 3 < 14 is true”. Obviously the proposition x, P(x) is true (T).
But, if the domain is taken A = {11, 13, 15}, then x, P(x) will be false (F), since there is
no value of x for which “x + 3 < 14” is true.
Example Let P(x) be the propositional function “x >3”. Let the domain be A: “set of all
real numbers”. Then, the Existential quantification x, P(x) is “there exists a value of x
for which x >3 is true”. Obviously the proposition x, P(x) is true (T), since x >3 is true
for x = 4.
Example Let P(x) be the propositional function “x is a good batsman” where the domain
A is “ set of all students in a class”. Then the existential quantification x, P(x) is the
statement “there exists a student in the class who is a good batsman”.
Example Let P(x) be the propositional function “x + 5 = x”. Let the domain be A: “set of
all real numbers”. Then, the Existential quantification x, P(x) is “there exists a value of
x for which x + 5 = 5 is true”. Obviously the proposition x, P(x) is false (F), since there
is no real value which satisfies the relation x +5 = x.
logic” or equivalently “there is a student in the class who has not studied mathematical
logic” which is denoted by x, ∼P(x). Thus, we can write
Similarly, x, P(x) means that “there is a student in the class who has studied mathematical
logic”. The negation of this statement is “Every student in the class has not studied
mathematical logic” which is denoted by x, ∼P(x). Thus we can write
Solution: (i) Some men can run faster than some women
(ii) All women are more intelligent than some men
(iii) All animals live in forest
(iv) Some students do not pass in the semester examination
x ∼P(x) ˅ y ∼Q(y)
38
x ∼P(x) ˄ y ∼Q(y)
x ∼P(x) ˅ y ∼Q(y))
x ∼P(x) ˅ y ∼Q(y) ,
(v) ∼ ( x A) (x+6=25)
x A∼(x + 6) = 25
( x A)(x + 6) 25
( x A) (x 25)
Solved Problems
Problem 1: State which rule of inference is used in the argument
(i) It is below freezing now. Therefore, it is either below freezing or raining now.
(ii) If today is Sunday then we will not go to office. If we do not go to office
today, then we will go to a long drive. Therefore, if today is Sunday then we
will go for a long drive.
(iii) Either Heera is a good boy or Sanjay is a good boy. Heera is not a good boy,
therefore, Sanjay is good boy.
39
(iv) If a polygon is a square then it has four sides. If a polygon has four sides,
then it has three angles. Therefore, if a polygon is a square, then it has three
angles.
(v) Bula is an excellent swimmer. If Bula is an excellent swimmer, then she can
work as a lifeguard. Therefore, Bula can work as a lifeguard.
(vi) If I run fast, then I will be champion in the race. I do not become champion
in the race. Therefore, I do not run fast.
q: It is raining now.
Therefore, p→ p ˅q
p: today is Sunday
In symbolic form
p→q
q→r
p → r
Hence, (p → q) ˄ ( q → r) → p → r is a tautology. This follows from the rule
“Hypothetical Syllogism”.
p: Heera is a good
q: Sanjay is a good
In symbolic form
p ˅q
∼p
q
40
p: polygon is a square
In symbolic form
p→q
q→r
p → r
In symbolic form
p
p →q
q
p: I run fast
In symbolic form
p →q
∼q
41
∼p
Hence, (p→q) ˄ ∼q → ∼p is a tautology. This follows from the rule “Modus
tollens”.
Problem 2: Prove the validity of the following argument using truth tables
“If it rains, then it will be cold. If it is cold, then I shall stay at home. Sine, it rains
therefore, I shall stay at home”.
p: It rains
q: It will be cold
We see all the truth values of (( p → q) ˄ (q → r) ˄ p)) → r are “T”. So, this is a valid
argument
Problem 3: Prove the validity of the following argument using truth tables
“If 6 is even and 2 does not divide 7. Either 5 is not prime or 2 divides 7. But 5 is prime,
therefore, 6 is odd.
p: 6 is even
q: 2 divides 7
r: 5 it prime
We see all the truth values of ((p→∼q) ˄ (∼r ˅ q) ˄ r)) →∼p are “T”. So, this is a valid
argument
Problem 4: Prove the validity of the following argument using truth tables
“If I drive to work then I will arrive in time. I do not drive to work. Therefore, I will not
arrive in time”.
p: I drive to work
p q ∼p ∼q p→q (p → q) ˄ ∼p (p → q) ˄ ∼p →∼q
T T F F T F T
T F F T F F T
F T T F T T F
F F T T T T T
We see all the truth values of (p → q) ˄ ∼p → ∼q are not “T”. So, this is an invalid
argument.
Now, the following sequence of elementary arguments is used to prove the validity of the
given argument:
Now, the following sequence of elementary arguments is used to prove the validity of the
given argument:
Problem 7: Prove the validity of the following arguments without using truth tables:
(i) p ˅ q, ∼p − q
(ii) p, p → q, q → r − r
(iii) p, q, (p ˄ q) →r − r
(iv) p, (p ˄∼q) →∼ p − p → q
Now, the following sequence of elementary arguments is used to prove the validity of the
given argument:
Solution (ii): p, p → q, q → r − r
Now, the following sequence of elementary arguments is used to prove the validity of the
given argument:
Solution (iii): p, q, (p ˄ q) → r − r
46
Now, the following sequence of elementary arguments is used to prove the validity of the
given argument:
Now, the following sequence of elementary arguments is used to prove the validity of the
given argument:
Problem 8: Prove the validity of the following argument without using truth tables
“If it does not rain or if there is no traffic dislocation, then the sports day will be held and
the cultural programme will go on. If the sports day is held, the trophy will be awarded.
The trophy was not awarded. Therefore it rained”
47
p: It rains
Now, the following sequence of elementary arguments is used to prove the validity of the
given argument:
Problem 9: Prove the validity of the following argument without using truth tables
“Either I will pass the examination, or, will not graduate. If I do not graduate, I will go to
USA. I failed; therefore I will go to USA”.
q: I will graduate
r: I will go to USA
Now, the following sequence of elementary arguments is used to prove the validity of the
given argument:
Problem 10: Prove the validity of the following argument without using truth tables
49
“If I study, then I will pass examination. If I do not go to picnic, then I will study. But I
failed examination. Therefore, I went to picnic.”
p: I will study
r: I go to picnic
Now, the following sequence of elementary arguments is used to prove the validity of the
given argument:
Problem 11: Prove the validity of the following “Famous Socrates argument” which is
given by:
x: Socrates
P(x): x is a man
H(x): x is mortal
Now, the following sequence of elementary arguments is used to prove the validity of the
given argument:
p: Socrates
q: Man
r: Mortal
In symbolic form
Problem 13: Show that the conclusion x(P(x) →∼Q(x)) follows from the premises
Problem 15: Find the truth value of x, P(x) where P(x) is the statement “x2<50” and the
domain is the set {1, 2, 3, 4, 5}
So, x2<50 hold for all values of x in the set {1, 2, 3, 4, 5}. Hence, the Universal quantifier
x, P(x) is true.
Problem 16: Find the truth value of x, P(x) where P(x) is the statement “2x+1<10” and
the domain is the set {0, 2, 3, 5}
x=2, 2(2)+1=5<10,
x=3, 2(3)+1=7<10,
x=5, 2(5)+1=11>10
Problem 17: Find the truth value of the existential quantification of x, P(x), where P(x)
is the statement “x2>30” and the domain is the set {0, 1, 2,3,4,5, 6,7,8}
Solution: We have that x=0, 1, 2,3,4,5 satisfy the relation x2>30. Hence, there exists a
value of x in the domain for which x2>30 hold.
Problem 18: Find the truth value of the Universal quantifier of the propositional function
P(x, y) stating “x2+y2>10” and the domain is the set {1, 2,3}
Solution: The statement P(x, y): “x2+y2<20” contains two variables x, y. When the variables
take values from the domain {1, 2, 3}, we have
So, P(x, y): “x2+y2<20” hold for all values of x in the set {1, 2, 3}.
Problem 19: Le P(x, y) states that “x2>y+2” where the domain is the set S= {1, 2, 3}. Find
the truth value of the quantifier x, y P(x, y).
Now, only for x= 3 in the domain S= {1, 2, 3}, the relation “x2>y+2” hold, which is x2=32
=9> 3, 4, 5.
Hence, there exists one value of x (x =3) for which x2>y+2 hold y
Problem 20: Le P(x, y) states that “x2+y2 < 15” where the domain is the set S= {1, 2, 3}.
Find the truth value of the quantifier x, y P(x, y).
Thus, there exists a value of y for which x2+y2 < 15 hold for all values of x.
Problem 21: Determine the truth value of the quantifier x, P(x), where P(x) is the
statement “x2-2x+7=0” and set of real numbers is the Universe of discourse.
x2-2x+7=0
2 4 − 4 1 7
or, x=
2
2 − 24
or, x=
2
or, x =1 i 6
Problem 22: If P(x, y) symbolizes the statement “x likes y”, where the Universe of
discourse for both x and y consists of all people in the world. Translate the following
English sentences into logical expressions:
(iii)Even if, (iii) is the same as (ii), the stress is on the existence of somebody “y” whom
all “x” like. Hence, y, x P(x, y).
55
(iv)Nobody likes everybody that is there is not one who likes everybody. Hence, ∼
x, y P(x, y)
x ∼ y P(x, y)
x y ∼P(x, y)
(v)The sentence means that there is somebody whom everyone does not like.
Hence, ∼ x y P(x, y)
x ∼ y P(x, y)
x y ∼P(x, y)
Problem 23: Express each of the following statements using mathematical and logical
operations, predicates and quantifiers, where the universe of discourse consists of all
students of computer science / mathematics honours course.
Solution (i): Let P(x) be the statement “x needs a course in mathematics”, where the
Universe of discourse consists of all computer science honours students. Then the
mathematical statement is x P(x)
(ii)Let P(x) be the statement “x owns a personal computer”, where the Universe of
discourse consists of all students in the class. Then the mathematical statement is x P(x)
(iii)Let P(x, y) be the statement “x has taken y”, where the Universe of x consists of all
students in the class and that of y consists of all mathematics courses. Then the
mathematical statement is x y P(x, y)
(iv)Let P(x, y) be the statement “x has taken y”, where the Universe of x consists of all
students in the class and that of y consists of all mathematical courses. Then the
mathematical statement is x y P(x, y)
Problem 24: Express the negations of the following statements using quantifiers and in
English:
56
(i) If the teacher is absent, then some students do not keep quiet
(ii) All the students keep quiet and the teacher is present
(iii) Some of the students do not keep quiet or the teacher is absent
(iv) No one has done every problem in the exercise.
Solution (i): Let P represents the teacher in the class and Q(x) represents “x keeps
quiet”. Then the given statement is
P˅∼ x Q (x)
∼ (P˅∼ x Q (x))
∼ P˄ x Q (x)
That is the teacher is absent and all the students keep quiet.
(ii) Let P represent the teacher in the class and Q(x) represents “x keeps quiet”. Then
the given statement is
x Q (x) ˄P
∼ ( x Q (x) ˄P)
∼ x Q (x) ˅∼P
x ∼Q (x) ˅∼P
(iii) Let P represent the teacher in the class and Q(x) represents “x keeps quiet”. Then
the given statement is
x∼ Q (x) ˅∼P
∼ x Q (x) ˅∼P
∼ (∼ x Q (x) ˅∼P)
57
x Q (x) ˄P
That is all the students keep quiet and the teacher is present
( ∼ x) ( D (x, y))
(x) y D (x, y)
x y z ∼P(x, y ,z)
x y, ∼P(x, y)
y x z, ∼P(x, y, z)
x y, ∼(P(x) ˅ Q(y))
x y, (∼P(x) ˄∼Q(y))
x y, ∼( P(x) ˄ Q(y))
x y, (∼ P(x) ˅∼Q(y))
Problem 27: Give a direct proof of the statement “The Square of an even integer is an
even integer”.
Solution: Let p and q be two simple propositions. Let x be an even integers, then
q: x is even integer
x2=(2n)2
= 4n2
= 2(2n2)
Therefore, p is true and p → q is true, we conclude that q is true by the rule of “Modus
ponens”.
Problem 28: Give an indirect proof of the statement “If 3n + 2 is odd, then n is odd”.
p: 3n + 2 is odd
q: n is odd
⇒ n =2t, t Z
Consider
3n + 2 = 3(2t) + 2
= 6t +2
= 2(3t +1)
This is even
⇒ 3n + 2 is even
⇒∼p holds.
p: 3n + 2 is odd
q: n is odd
= 6t + 2
= 2(3t + 1)
Problem 29: Prove the validity of the following argument using indirect method
Now, the following sequence of elementary arguments is used to give the result:
This shows that our assumption that ∼ ( x (P (x))˅ ( x Q (x)) is true is actually false.
This contradiction proves that
x (P (x)˅ Q (x)) ⇒( x (P (x))˅ ( x Q (x))
61
Problem 30: Prove the validity of the following argument using indirect method
Now, the following sequence of elementary arguments is used to give the result:
This shows that our assumption that ∼( zQ (z)) is true is actually false. This contradiction
proves that
x (P (x) → Q (x)) ˄ yP (y) ⇒ zQ (z)
Exercises
1. State which rule of inference is used in the argument
62
(vii) Kangaroos live in Australia and are marsupials. Therefore, Kangaroos are
marsupials.
(viii) Covid 19 is a Pandamic and originated from china. Therefore, Covid 19 is
originated from China
(ix) Hema is a very good dancer. If Hema is a very good dancer, then she can
work as a dance trainer. Therefore, Hema can work as a dance trainer.
(x) Aloke will work at a computer company this winter. Therefore, this winter
Aloke will work at a computer company or he will be a beach bum.
(xi) If I work all night on my lessons, then I can answer all the questions. If I
answer all the questions, I will have better knowledge. Therefore, if I work
all night on my lessons, then I will have better knowledge
(xii) Either today I will go to cinema or I will go to shopping mall. I will not go to
cinema today, therefore I will go to shopping mall.
(i) If today is Sunday, then yesterday was Saturday. Yesterday was Saturday, Therefore,
today is Sunday”.
(ii) If a man is married then he is unhappy. If a man is unhappy then he dies young.
Therefore, married man dies young.
(iii) Every living thing is a plant or an animal. My cat is alive and it is not a plant. All
animals have hearts. Therefore my cat has a heart.
(iv) All integers are rational numbers. Some integers are powers of 2. Therefore,
some rational numbers are powers of 2.
(v) If I like Propositional logic, then I will study. Either I study or I get less marks.
Therefore, if I get less marks, I do not like Propositional logic
(vi) If the wages increase, then there will be inflation. The cost of living will decrease
if there is no inflation. Therefore, if wages will increase then the cost of living
will not decrease.
2. Prove the validity of the following arguments without using truth tables
(i) p, q, − (p˅r) ˄q
(ii) p→q, p˄r − q
(iii) (p→q) ˄(r→s), (p˅r) ˄(q˅r) − q˅s
(iv) (p˄q) ˅( r→s), t→r, ∼ (p˄q) − t→s
63
3. Prove the validity of the following argument without using truth tables
(i) Either I will get good marks or I will not graduate. If I did not graduate, I
will go to Europe. I got good marks. Therefore, I will not go to Europe.
(ii) If the market is free, then there is no inflation. If there is no inflation, then
there are price controls. Since, there are price controls; therefore, the market
is free.
(iii) One student in Computer class knows how to write programs in C++.
Everyone who knows how to write programs in C++ can get a high-paid job.
Therefore, someone in this class can get a high- paid job
(iv) Everyone who eats some vegetables daily are healthy. Jaya is not healthy.
Therefore, Jaya does not eat vegetables daily.
(v) A student in this class has not read the book. Everyone in this class passed
the first examination. Therefore someone who passed the first examination
has not read the book.
(vi) No man is an island. Manhattan is an island. Therefore, Manhattan is not a
man.
4. Express each of the following statements using mathematical and logical operations,
predicates and quantifiers, where the universe of discourse consists of all students
of a school.
(i) There is a student in the school who can speak English and who knows
Bengali
(ii) No student in the school can speak English or knows Bengali
(iii) There is a student in the school who can speak English but who does not
know Bengali.
(iv) All the students in the school can speak English as well as know Bengali
5. Let P(x) be the statement “x can speak English”, Q(x) be the statement “x knows
Bengali”, where the universe of discourse consists of all students of a school.
Translate the following English sentences into logical expressions:
6. Let P(x) be the statement “x is a shark”, Q(x) be the statement “x is a fish” and R(x)
be “ x lives in water”, where the universe of discourse consists of all animals.
Translate the following English sentences into logical expressions:
(i) x (∼ R(x))
(ii) x ( Q(x) ˄∼P(x))
(iii) x ( P(x) ˄R(x)) →Q(x)
(iv) x ( P(x) ˄Q(x)) →R(x)
8. Determine the truth value of each of the following statements where A = {1, 2, 3,
4, 5, 6} is the Universe of discourse.
(i) x (x + 3 = 12)
(ii) x (x + 3 < 12)
(iii) x (x + 3 < 6)
(iv) x (x + 3 8)
(v) x (x2 - 9 = 0)
9. Determine the truth value of each of the following statements where A = {1, 2, 3} is
the Universe of discourse.
65
(i) x, y, x2 < y + 1
(ii) x, y, x2 + y2< 12
10. Determine the truth value of each of the following statements where A = {1, 2,3, ...,
9, 10} is the Universe of discourse.
11. Determine the truth value of each of the following statements where the set of all
numbers is the Universe of discourse
(i) x P(x) where P(x) is “x2 = xn”
(ii) x P(x) where P(x) is “2x = xn”
(iii) x P(x) where P(x) is “x2 -4= 0”
12. Express the negation of the statement using quantifiers and in English:
Answers
(ii) valid
(iii)valid
(iv)valid
(v)not valid
2 (i) valid
(ii) valid
(iii)valid
(iv)valid
67
(v) valid
(vi) valid
3 (i) valid
(ii) valid
(iii)valid
(iv)valid
3. (i) Every student of the school either can speak English or know Bengali
(ii) There is a student who cannot speak English and also do not know Bengali.
(iii)No student in the school can speak English and knows Bengali
(iv)All the students in the school can speak English but do not know Bengali
5. (i) False
(ii)True
(iii)True
(iv)False
68
(v)True
8. (i) True
(ii) True
9. (i) True
(ii) False
10.(i) False
(ii) True
(iii)True
∼( x y,
13.(i) x y, P(x, y)