Unit-2 - Propositional Logic and Predicate Logic
Unit-2 - Propositional Logic and Predicate Logic
GTU # 3140708
Unit-2
Propositional logic
&
Predicate logic
Unit-2
For example:
Statements
Statements
The first type includes primitive(simple) The second type are obtained from primitive
sentences denoted by capital letters ones by using certain symbols, connectives,
A, B, C, … , P, Q, . etc.. and parentheses, to join primitive sentences.
“𝐧 is an even number”
“𝐧 is an even number or odd number”
“𝐧 is an odd number”
“𝟏 + 𝟏𝟎𝟏 = 𝟏𝟏𝟎”
It has truth value false.
Connectives Conjunction(∧)
Disjunction(˅)
Connectives
Truth value of P ∧ Q is T whenever Conjunction(∧)
both P and Q are T otherwise F.
Connectives Conjunction(∧)
Truth value of P ∨ Q is F whenever both P and Q are F otherwise T.
So, the symbolic form of the given statement is conjunction(∧) of the statements
P and Q.
Connectives
Conjunction (∧) connect with “and”
Hence, symbolic form of the given statement is
Disjunction (∨) connect with “or”
Negation𝑷 (ℸ)
∧ gives
𝑸 opposite case
ℸ𝑷 ∧ 𝑸
Hence, symbolic form of the given statement is ℸ𝐏 ∧ 𝐐.
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 14
Method 1 ⟹ Example 4(continue)
Que: Consider the statements P ∶ Mark is rich. and Q ∶ Mark is happy. Write the
following statement in symbolic form.
(b) Mark is rich or unhappy.
Sol:
Here, the statement indicates that “Mark is rich or Mark is unhappy”.
Now, “Mark is rich.” can be symbolized by P itself.
Also, “Mark is unhappy.” can be symbolized by opposite of Q i.e.ℸQ.
“Mark is rich or Mark is unhappy”
𝑷 ∨ ℸ𝑸
Hence, symbolic form of the given statement is 𝑷 ∨ ℸ𝑸.
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 15
Method 1 ⟹ Example 4(continue)
Que: Consider the statements P ∶ Mark is rich. and Q ∶ Mark is happy. Write the
following statement in symbolic form.
(c) Mark is neither rich nor happy.
Sol:
Here, the statement indicates that “Mark is not rich and Mark is not happy”.
Now, “Mark is not rich.” can be symbolized by opposite of P i.e.ℸP.
Also, “Mark is not happy.” can be symbolized by opposite of Q i.e.ℸQ.
“Mark is not rich and Mark is not happy”
ℸ𝑷 ∧ ℸ𝑸
Hence, symbolic form of the given statement is ℸ𝑷 ∧ ℸ𝑸.
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 16
Method 1 ⟹ Example 4(continue)
Que: Consider the statements P ∶ Mark is rich. and Q ∶ Mark is happy. Write the
following statement in symbolic form.
(d) Mark is poor or he is both rich and unhappy.
Sol:
Here, the statement indicates that “Mark is poor or Mark is rich as well as
unhappy.”.
Now, “Mark is poor.” can be symbolized by opposite of P i.e. ℸP.
Also, second part “Mark is both rich and unhappy.” can be represented by
connecting “Mark is rich.” and “Mark is unhappy.” by connective conjunction i.e.
P ∧ ℸQ.
So, the symbolic form of given statement is disjunction(∨) of both part.
Hence, symbolic form of the given statement is ℸ𝐏 ∨ 𝐏 ∧ ℸ𝐐 .
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 17
So, statement formulas are formulas formed by connecting the
statements by connectives(negation, conjunction or disjunction).
Statement
formulas
ℸ𝐏 ℸ𝐐 𝐏 ∧ ℸ𝐐
𝐏∨𝐐 𝐏∧𝐐 𝐏 ∧ 𝐐 ∨ ℸ𝐐
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 18
Method 1 ⟹ Example 5
Que: Construct the truth table for the statement formula P ∨ ℸQ.
Sol: The truth table for the formula P ∨ ℸQ is as follows.
𝐏 𝐐 ℸ𝐐 𝐏 ∨ ℸ𝐐
T T F T
T F T T
F T F F
F F T T
∨ (both 𝐅 then truth
ℸ(opposite 𝐅 otherwise
value) 𝐓)
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 19
Method 1 ⟹ Example 7
Que: Construct the truth table for P ∨ (Q ∧ R). ∨ (both 𝐓
∧ 𝐅 then 𝐅 otherwise 𝐓)
𝐓 otherwise 𝐅)
Sol: The truth table for the formula P ∨ (Q ∧ R) is as follows.
𝐏 𝐐 𝐑 𝐐∧𝐑 𝐏 ∨ (𝐐 ∧ 𝐑)
T T T T T
T T F F T
T F T F T
T F F F T
F T T T T
F T F F F
F F T F F
F F F F F
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 20
Method 1 ⟹ Example 9(b)
Que: Given the truth values of P and Q as T and those of R and S as F, find the truth
Que: value for the formula P ∧ Q ∧ R ∨ ℸ P ∨ Q ∧ R ∨ S .
Sol:
Here, we are given the truth values of P and Q as T and those of R and S as F.
Substituting theses truth values in given formula, we get,
𝐏∧ 𝐐∧𝐑 ∨ℸ 𝐏∨𝐐 ∧ 𝐑∨𝐒
= T∧ T∧F ∨ℸ T∨T ∧ F∨F
∧ (both 𝐓 then 𝐓 otherwise 𝐅)
= T ∧ (F)
F ∨ ℸ T ∧ (F)
F
∨ (both 𝐅 then 𝐅 otherwise 𝐓)
= F ∨ℸ F
ℸ(opposite truth value)
= F ∨ T
= T
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 21
Conditional(→)
If P and Q are any two statements, then the statement P → Q which
is read as “If P, then Q” is called a conditional statement.
P ∶ Jerry takes Calculus. Q ∶ Ken takes Sociology. R ∶ Larry will take English.
𝑷 ∨ 𝑸 → 𝐑
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 24
Method 1 ⟹ Example 12
Que: Construct the truth table for (P → Q) ∧ (Q → P).
Sol: The truth table for the formula (P → Q) ∧ (Q → P) is as follows.
Tautology
In truth table, if all truth values are false then statement formula
is called contradiction.
For example: Consider the formula ℸP ∨ P.
Truth table: 𝐏 ℸ𝐏 𝐏 ∨ ℸ𝐏
𝐓 𝐅 𝐓
𝐅 𝐓 𝐓
The statement formula ℸP ∨ P is a tautology.
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 29
Method 2 ⟹ Example 1
Que: Check whether the given formulas are well-formed formulas. Also, indicate
Que: which ones are tautologies or contradictions.
(a) P → P ∨ Q
Sol:
Here, given formula is a well-formed formula.
To check whether formula is tautology or contradiction, we will construct truth
table of given formula.
𝐏 𝐐 𝐏∨𝐐 𝐏→ 𝐏∨𝐐
T T T T
T F T T
F T T T
F F F T
Here, all truth
𝐏→ values
𝐏∨𝐐 istrue
are∨ a condition
in the “ if 𝐏 column
final is true then
of truth is true”.
𝐏 ∨ 𝐐table.
(both 𝐅 then 𝐅 otherwise 𝐓)
(whenever condition break value is 𝐅 otherwise 𝐓)
Hence, P → P ∨ Q is a tautology.
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 31
Method 2 ⟹ Example 1(continue)
Que: Check whether the given formulas are well-formed formulas. Also, indicate
Que: which ones are tautologies or contradictions.
b P → ℸP → ℸP
Sol:
Here, given formula is a well-formed formula.
To check whether formula is tautology or contradiction, we will construct truth
table of given formula.
The truth table for the formula P → ℸP → ℸP is as follows.
Home work
Here, all truth values are true in the final column of truth table.
Hence, P → ℸP → ℸP is a tautology.
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 32
Method 2 ⟹ Example 1(continue)
Que: Check whether the given formulas are well-formed formulas. Also, indicate
Que: which ones are tautologies or contradictions.
(c) ℸQ ∧ P ∧ Q
Sol:
Here, given formula is a well-formed formula.
To check whether formula is tautology or contradiction, we will construct truth
table of given formula.
𝐏 𝐐 ℸ𝐐 ℸ𝐐 ∧ 𝐏 ℸ𝐐 ∧ 𝐏 ∧ 𝐐
T T F F F
T F T T F
F T F F F
F F T F F
∧ (both 𝐓 then
ℸ(opposite
Here, all truth values are false in the truth
final value)of truth
otherwise
𝐓column 𝐅) table.
Hence, ℸQ ∧ P ∧ Q is a contradiction.
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 34
Method 2 ⟹ Example 1(continue)
Que: Check whether the given formulas are well-formed formulas. Also, indicate
Que: which ones are tautologies or contradictions.
(d) ( P → Q → R → P→Q → P→R
(e) ℸ𝑃 → 𝑄 → 𝑄 → 𝑃 )
Sol:
Here, given formula (d) is not a well-formed formula.
Tautological
implications
It is denoted by P ⇒ Q and read as “P implies Q”.
Here, “→” is a conditional operator.
For example: Consider the formula P → Q.
𝐏 𝐐 𝐏→𝐐 So, the formula P → Q
Truth table:
is not a tautology.
𝐓 𝐓 𝐓
𝐓 𝐅 𝐅 Hence, we can say that
P⇏ Q
𝐅 𝐓 𝐓
𝐅 𝐅 𝐓
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 37
Method 2 ⟹ Example 3(b)
Que: Check the implication P ⇒ Q → P
Sol: The truth table for the formula P → Q → P is as follows.
𝐏 𝐐 𝐐→𝐏 𝐏→ 𝐐→𝐏
T T T T
T F T T
F T F T
F F T T
Here, all truth values are true in the final column of truth table.
𝐏 → 𝐐𝐐→→𝐏𝐏 is a condition “ if 𝐐
𝐏 is true then 𝐏𝐐is→true”.
𝐏 is true”.
Hence, P → (whenever is a tautology.
Q → P condition i.e. Pis⇒
break value Q ⟶ P𝐓).
𝐅 otherwise
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 38
If the truth values of P is equal to the truth values of Q, then P
and Q are said to be equivalent.
Equivalence
formulas
It is denoted by P ⇔ Q.
Properties: 1 If P ⇔ Q then Q ⇔ P.(symmetric property)
2 If P ⇔ Q and Q ⇔ R then P ⇔ R.(transitive property)
Duality
law
The connectives ∧ and ∨ are also called duals of each
other.
Also, if the formula contain truth values then we will replace
T by F and F by T to obtain dual.
For example:
The dual of 𝐏 ∨ 𝐐 ∧ 𝐑 is 𝐏∧𝐐 ∨𝐑
∗ De Morgan's laws
Hence, ℸA P, Q, R ⇔ A ℸP, ℸQ, ℸR .
ℸ 𝐀 ∧ 𝐁 = ℸ𝐀 ∨ ℸ𝐁
ℸ 𝐀 ∨ 𝐁 = ℸ𝐀 ∧ ℸ𝐁
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 42
How to find dnf(disjunctive normal form)?
Que: Find the dnf of P → Q ∧ Q → P .
Sol:
𝐏 𝐐 𝐏→𝐐 𝐐→𝐏 𝐏→𝐐 ∧ 𝐐→𝐏
T T T T T
T F F T F
F T T F F
F F T T T
Hence, required dnf is 𝐏 ∧ 𝐐 ∨ ℸ𝐏 ∧ ℸ𝐐
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 43
How to find cnf(conjunctive normal form)?
Que: Find the cnf of P → Q ∧ Q → P .
Sol:
𝐏 𝐐 𝐏→𝐐 𝐐→𝐏 𝐏→𝐐 ∧ 𝐐→𝐏
T T T T T
T F F T F
F T T F F
F F T T T
Hence, required cnf is ℸ𝐏 ∨
∧𝐐 ∧ 𝐏∨
∧ ℸ𝐐
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 44
Method 2 ⟹ Example(GTU)(4-marks)
Que: Obtain the dnf of the form P → Q ∧ ℸP ∧ Q .
Sol: Truth table for P → Q ∧ ℸP ∧ Q is as follows.
𝐏 𝐐 𝐏→𝐐 ℸ𝐏 ℸ𝐏 ∧ 𝐐 𝐏 → 𝐐 ∧ ℸ𝐏 ∧ 𝐐
T T T F F F
T F F F F F
F T T T T T
F F T T F F
Hence, required dnf is ℸ𝐏 ∧ 𝐐
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 45
Method 2 ⟹ Example(GTU)(4-marks)
Que: Obtain the dnf of the form ℸ P → Q ∧ R .
Sol: Truth table for ℸ P → Q ∧ R is as follows.
P Q R 𝐐∧𝐑 𝐏 → (𝐐 ∧ 𝐑) ℸ 𝐏→ 𝐐∧𝐑
T T T T T F
T T F F F T
T F T F F T
T F F F F T
F T T T T F
F T F F T F
F F T F T F
F F F F T F
Hence, required dnf is
𝐏 ∧ 𝐐 ∧ ℸ𝐑 ∨ 𝐏 ∧ ℸ𝐐 ∧ 𝐑 ∨ 𝐏 ∧ ℸ𝐐 ∧ ℸ𝐑
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 46
Predicate
Statement function
Quantifiers
Free & bound variables
The universe of discourse
This part “is a bachelor” is called a predicate.
Symbolize “is a bachelor” by B, “John” by j, and “Smith” by s.
Let us consider two statements.
𝐁 𝐣 ∶ John is a bachelor. 𝐁 𝐬 ∶ Smith is a bachelor.
Predicate
𝐆 𝐣𝟏 , 𝐣𝟐 ∶ Jack is taller than Jill.
∃𝐳 𝐏(𝐳)
𝐏 𝐅 𝐱, 𝐳𝐳) ∧ 𝐌(𝐳,
𝐳 ∧ 𝐅(𝐱, 𝐌 𝐳, 𝐲)
𝐲
Thus, the statement formula is ∃z P z ∧ F x, z ∧ M z, y .
# 3140708 (DM) Unit 2 – Propositional logic & Predicate logic 52
Method 3 ⟹ Example 2
Que: Symbolize the expression “All the world loves a lover.”.
Sol: The statement means that “All the persons loves a lover.”.
Here, we symbolize “all” by quantifier “(∀x)” or “(x)”.
Now, we have three predicate “x is a person”, “x is lover” and “x loves y”.
𝐌 𝐱 ∶ 𝐱 is a person. 𝐆 𝐱 ∶ 𝐱 is a lover. 𝐑 𝐱 , 𝐲 ∶ 𝐱 loves 𝐲.
If we denote x as a person and y as a lover, then expression looks like,
For all 𝐱, if 𝐱 is a person, for all 𝐲, if 𝐲 is a person and a lover, then 𝐱 loves 𝐲.
∀𝐱 𝐌 𝐱 → ∀𝐲 𝐌 𝐲 ∧ 𝐆 𝐲 → 𝐑(𝐱 , 𝐲)
Thus, the statement formula is (∀x)M(x) → ∀y M y ∧ G y → R(x, y).
First three occurrence of x are bound. But, last occurrence of x in Q(x) is free.
Here, the scope of quantifier x is P x ∧ ∃x Q x .
While, the scope of ∃x is Q x , and the scope of x is P x .
First three occurrence of x are bound. But, last occurrence of x in S(x) is free.