Propositional Calculus
Propositional Calculus
Propositional Calculus
MATHEMATICAL FOUNDATIONS OF
COMPUTER SCIENCE M.E.(ITE) SEM-I
PROPOSITIONAL CALCULUS
➢LOGICAL EQUIVALENCES
➢NORMAL FORMS
➢THEORY OF INFERENCE
Note : When we combine any two sentences to form a conjunction or disjunction, there
is no requirement that the two sentences be related in content or subject matter.
PROPOSITIONAL CALCULUS
• Conditional Proposition (Implication):
If 𝑝 𝑎𝑛𝑑 𝑞 𝑎𝑟𝑒 propositions , the compound proposition “𝐼𝑓 𝑝 𝑡ℎ𝑒𝑛 𝑞" 𝑑𝑒𝑛𝑜𝑡𝑒𝑑 𝑏𝑦
𝑝 → 𝑞 𝑜𝑟 𝑝 ⇒ 𝑞 is called a conditional proposition.
The conditional proposition 𝑝 → 𝑞 is false only when 𝑝 is true and 𝑞 𝑖𝑠 𝑓𝑎𝑙𝑠𝑒,
𝑎𝑛𝑑 𝑡𝑟𝑢𝑒 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒.
• 𝑝 𝑖𝑠 𝑐𝑎𝑙𝑙𝑒𝑑 𝑎𝑛𝑡𝑒𝑐𝑒𝑑𝑒𝑛𝑡 𝑜𝑟 ℎ𝑦𝑝𝑜𝑡ℎ𝑒𝑠𝑖𝑠 𝑎𝑛𝑑 𝑞 𝑖𝑠 𝑐𝑎𝑙𝑙𝑒𝑑 𝑐𝑜𝑛𝑠𝑒𝑞𝑢𝑒𝑛𝑡
𝑜𝑟 𝑐𝑜𝑛𝑐𝑙𝑢𝑠𝑖𝑜𝑛.
Examples:
𝑝: I am elected 𝑞: 𝐼 𝑤𝑖𝑙𝑙 𝑙𝑜𝑤𝑒𝑟 𝑡𝑎𝑥𝑒𝑠.
𝑝 ⟶ 𝑞: 𝐼𝑓 𝐼 𝑎𝑚 𝑒𝑙𝑒𝑐𝑡𝑒𝑑 , 𝑡ℎ𝑒𝑛 𝐼 𝑤𝑖𝑙𝑙 𝑙𝑜𝑤𝑒𝑟 𝑡𝑎𝑥𝑒𝑠.
• Related Implications:
Consider the conditional 𝑝 ⟶ 𝑞.
i) 𝑞 ⟶ 𝑝 𝑖𝑠 𝑐𝑎𝑙𝑙𝑒𝑑 𝑐𝑜𝑛𝑣𝑒𝑟𝑠𝑒 𝑜𝑓 𝑝 ⟶ 𝑞.
ii) ~𝑞 ⟶ ~𝑝 𝑖𝑠 𝑐𝑎𝑙𝑙𝑒𝑑 𝑡ℎ𝑒 𝑐𝑜𝑛𝑡𝑟𝑎𝑝𝑜𝑠𝑖𝑡𝑖𝑣𝑒 𝑜𝑓 𝑝 ⟶ 𝑞.
iii) ~𝑝 ⟶ ~𝑞 𝑖𝑠 𝑐𝑎𝑙𝑙𝑒𝑑 𝑡ℎ𝑒 𝑖𝑛𝑣𝑒𝑟𝑠𝑒 𝑜𝑓𝑝 ⟶ 𝑞
PROPOSITIONAL CALCULUS
• Biconditional:
If 𝑝 and 𝑞 𝑎𝑟𝑒 𝑝𝑟𝑜𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛𝑠 , 𝑡ℎ𝑒 𝑐𝑜𝑚𝑝𝑜𝑢𝑛𝑑 𝑝𝑟𝑜𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛
"𝑝 , 𝑖𝑓 𝑎𝑛𝑑 𝑜𝑛𝑙𝑦 𝑖𝑓, 𝑞“ denoted by 𝑝 ⟷ 𝑞 𝑜𝑟 𝑝 ⟺ 𝑞 𝑖𝑠 𝑐𝑎𝑙𝑙𝑒𝑑
𝑏𝑖𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛𝑎𝑙 𝑝𝑟𝑜𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛. The biconditional 𝑝 ⟷ 𝑞 is true when both
𝑝 𝑎𝑛𝑑 𝑞 𝑎𝑟𝑒 𝑡𝑟𝑢𝑒 𝑜𝑟 𝑏𝑜𝑡ℎ 𝑝 𝑎𝑛𝑑 𝑞 𝑎𝑟𝑒 𝑓𝑎𝑙𝑠𝑒.
• Examples:
𝑝: 𝐻𝑒 𝑠𝑤𝑖𝑚𝑠 𝑞: 𝑇ℎ𝑒 𝑤𝑎𝑡𝑒𝑟 𝑖𝑠 𝑤𝑎𝑟𝑚.
𝑝 ⟷ 𝑞: 𝐻𝑒 𝑠𝑤𝑖𝑚𝑠 𝑖𝑓 𝑎𝑛𝑑 𝑜𝑛𝑙𝑦 𝑖𝑓 𝑡ℎ𝑒 𝑤𝑎𝑡𝑒𝑟 𝑖𝑠 𝑤𝑎𝑟𝑚.
• The connective “If and only if” can also be read as
𝑝 𝑖𝑠 𝑛𝑒𝑐𝑒𝑠𝑠𝑎𝑟𝑦 𝑎𝑛𝑑 𝑠𝑢𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡 𝑓𝑜𝑟 𝑞.
• The Precedence of connectives: The order is ~, ∧ , ∨ , ⟶ , ⟷.
PROPOSITIONAL CALCULUS
Truth table: A truth table is a table that shows the truth value of a
compound proposition for all possible cases.
Negation:
2. (𝑝 ∧ 𝑞) ∨∼ 𝑞 ≡ 𝑝 ∨∼ 𝑞
Proof: L.H.S = (𝑝 ∧ 𝑞) ∨∼ 𝑞 ≡ (𝑝 ∨∼ 𝑞) ∧ (𝑞 ∨∼ 𝑞)
≡ (𝑝 ∨∼ 𝑞) ∧ 𝑇
≡ 𝑝 ∨∼ 𝑞 = 𝑅. 𝐻. 𝑆
PROPOSITIONAL CALCULUS
3.∼ 𝑝 ∧ 𝑞 → ∼ 𝑝 ∨ ∼ 𝑝 ∨ 𝑞 ≡∼ 𝑝 ∨ 𝑞
Solution: ∼ 𝑝 ∧ 𝑞 → ∼ 𝑝 ∨ ∼ 𝑝 ∨ 𝑞
≡∼ 𝑝 ∧ 𝑞 → ∼ 𝑝 ∨∼ 𝑝 ∨ 𝑞
≡∼ 𝑝 ∧ 𝑞 → ∼ 𝑝 ∨ 𝑞
≡∼∼ 𝑝 ∧ 𝑞 ∨ ∼ 𝑝 ∨ 𝑞
≡ 𝑝∧𝑞 ∨ ∼𝑝∨𝑞
≡ [ 𝑝 ∧ 𝑞 ∨∼ 𝑝] ∨ 𝑞
≡ [ 𝑝 ∨∼ 𝑝 ∧ 𝑞 ∨∼ 𝑝 ] ∨ 𝑞
≡ [𝑇 ∧ 𝑞 ∨∼ 𝑝 ] ∨ 𝑞
≡ 𝑞 ∨∼ 𝑝 ∨ 𝑞
≡ ∼𝑝∨𝑞 ∨𝑞
≡∼ 𝑝 ∨ q ∨ 𝑞 ≡∼ 𝑝 ∨ 𝑞
PROPOSITIONAL CALCULUS
4. 𝑝 ∨ 𝑞 ∧ ∼ 𝑝 ∧ ∼ 𝑝 ∧ 𝑞 ≡∼ 𝑝 ∧ 𝑞
Solution: 𝑝 ∨ 𝑞 ∧ ∼ 𝑝 ∧ ∼ 𝑝 ∧ 𝑞
≡ 𝑝 ∨ 𝑞 ∧ ( ∼ 𝑝 ∧∼ 𝑝) ∧ 𝑞
≡ 𝑝∨𝑞 ∧ ∼𝑝∧𝑞
≡ [ 𝑝 ∨ 𝑞 ∧∼ 𝑝] ∧ 𝑞
≡ [ 𝑝 ∧∼ 𝑝 ∨ 𝑞 ∧∼ 𝑝 ] ∧ 𝑞
≡ 𝐹 ∨ 𝑞 ∧∼ 𝑝 ∧ 𝑞
≡ (𝑞 ∧∼ 𝑝) ∧ 𝑞
≡ (∼ 𝑝 ∧ 𝑞) ∧ 𝑞
≡∼𝑝∧ 𝑞∧q
≡∼ 𝑝 ∧ 𝑞
PROPOSITIONAL CALCULUS
5. 𝑞 ∨ 𝑝 ∧∼ 𝑞 ∨ ∼ 𝑝 ∧∼ 𝑞 ≡ 𝑇
Solution: 𝑞 ∨ 𝑝 ∧∼ 𝑞 ∨ ∼ 𝑝 ∧∼ 𝑞 ≡ 𝑞 ∨ 𝑝 ∨∼ 𝑝 ∧∼ 𝑞
≡ 𝑞 ∨ 𝑇 ∧∼ 𝑞
≡ 𝑞 ∨∼ 𝑞 ≡ 𝑇
6. 𝑝 → 𝑞 ∨ 𝑟 ≡ 𝑝 → 𝑞 ∨ 𝑝 → 𝑟
Solution: 𝑝 → 𝑞 ∨ 𝑝 → 𝑟 ≡ ∼ 𝑝 ∨ 𝑞 ∨ ∼ 𝑝 ∨ 𝑟
≡∼ 𝑝 ∨ ∼ 𝑝 ∨ 𝑞 ∨ 𝑟
≡ ∼ 𝑝 ∨∼ 𝑝 ∨ 𝑞 ∨ 𝑟
≡∼ 𝑝 ∨ 𝑞 ∨ 𝑟
≡𝑝→ 𝑞∨𝑟
PROPOSITIONAL CALCULUS
7. ∼ 𝑝 ∧ ∼ 𝑞 ∧ 𝑟 ∨ 𝑞 ∧ 𝑟 ∨ 𝑝 ∧ 𝑟 ≡ 𝑟
Solution: ∼ 𝑝 ∧ ∼ 𝑞 ∧ 𝑟 ∨ 𝑞 ∧ 𝑟 ∨ 𝑝 ∧ 𝑟
≡ ∼ 𝑝 ∧∼ 𝑞 ∧ 𝑟 ∨ 𝑞 ∧ 𝑟 ∨ 𝑝 ∧ 𝑟
≡ ∼ 𝑝 ∧∼ 𝑞 ∧ 𝑟 ∨ 𝑞 ∨ 𝑝 ∧ 𝑟
≡ ∼ 𝑝∨𝑞 ∧𝑟 ∨ 𝑝∨𝑞 ∧𝑟
≡ ∼ 𝑝∨𝑞 ∨ 𝑝∨𝑞 ∧𝑟
≡𝑇∧𝑟
≡𝑟
• Duality: Two formulas 𝑃 𝑎𝑛𝑑 𝑃∗ are called duals of each other if either can be
obtained by interchanging ∧ 𝑏𝑦 ∨ ,∨ 𝑏𝑦 ∧ , 𝑇 𝑏𝑦 𝐹 𝑎𝑛𝑑 𝐹 𝑏𝑦 𝑇.
• Duality principle: If two statement formulas are equivalent then their duals are
equivalent.
PROPOSITIONAL CALCULUS
Normal Forms:
Definition : A conjunction of propositions and their negations is called a
fundamental conjunction or elementary product.
Ex. 𝑝 , ~𝑝 , 𝑝 ∧ 𝑞 , ∼ 𝑝 ∧ 𝑞 , ∼ 𝑝 ∧∼ 𝑞 , 𝑝 ∧∼ 𝑞 𝑒𝑡𝑐.
Definition:A disjunction of propositions and their negations is called
fundamental disjunction or elementary sum.
Ex. . 𝑝 , ~𝑝 , 𝑝 ∨ 𝑞 , ∼ 𝑝 ∨ 𝑞 , ∼ 𝑝 ∨∼ 𝑞 , 𝑝 ∨∼ 𝑞 𝑒𝑡𝑐.
Note: The words “product” and “sum” is used in place of the connectives
conjunction and disjunction.
PROPOSITIONAL CALCULUS
• Disjunctive Normal form(Sum of products): A statement form which is a
disjunction of fundamental conjunctions is called disjunctive normal form (dnf)
Ex. 𝑝 ∨ 𝑞 ∧ 𝑟 , 𝑝 ∧ 𝑞 ∨ ∼ 𝑞 ∧ 𝑟
2) 𝑝 ∨ ∼ 𝑝 → 𝑞 ∨ 𝑞 →∼ 𝑟 ≡ 𝑝 ∨ ∼ 𝑝 → 𝑞 ∨∼ 𝑞 ∨∼ 𝑟
≡ 𝑝 ∨ 𝑝 ∨ 𝑞 ∨∼ 𝑞 ∨∼ 𝑟
≡ 𝑝 ∨ 𝑝 ∨ 𝑞 ∨∼ 𝑞 ∨∼ 𝑟
≡ 𝑝 ∨ 𝑞 ∨∼ 𝑞 ∨∼ 𝑟______dnf
PROPOSITIONAL CALCULUS
3) 𝑝 → 𝑝 → 𝑞 ∧∼ ∼ 𝑞 ∨∼ 𝑝 ≡𝑝→ ∼𝑝∨𝑞 ∧ 𝑞∧𝑝
≡∼ 𝑝 ∨ ∼𝑝∨𝑞 ∧ 𝑝∧𝑞
≡∼ 𝑝 ∨ ∼ 𝑝 ∨ 𝑞 ∧ 𝑝 ∧ 𝑞
≡∼ 𝑝 ∨ ∼ 𝑝 ∧ 𝑝 ∨ 𝑞 ∧ 𝑝 ∧ 𝑞
≡∼ 𝑝 ∨ 𝐹 ∨ 𝑝 ∧ 𝑞 ∧ 𝑞
≡∼ 𝑝 ∨ 𝑝 ∧ 𝑞
≡∼ 𝑝 ∨ (𝑝 ∧ 𝑞) ______dnf
PROPOSITIONAL CALCULUS
Obtain the conjunctive normal form of
1. 𝑝 ∧ (𝑝 → 𝑞) ≡ 𝑝 ∧ (∼ 𝑝 ∨ 𝑞)_________𝑐𝑛𝑓
2. 𝑞 ∨ 𝑝 ∧ 𝑞 ∧∼ 𝑝 ∨ 𝑟 ∧ 𝑞 ≡ 𝑞 ∨ 𝑝 ∧ 𝑞 ∧ ∼ 𝑝 ∨ 𝑟 ∨∼ 𝑞
≡ 𝑞 ∧ ∼ 𝑝 ∧∼ 𝑟 ∨∼ 𝑞
≡ 𝑞 ∧ ∼ 𝑝 ∨∼ 𝑞 ∧ ∼ 𝑟 ∨∼ 𝑞
≡ 𝑞 ∧ (∼ 𝑝 ∨∼ 𝑞) ∧ (∼ 𝑟 ∨∼ 𝑞) ____𝑐𝑛𝑓
PROPOSITIONAL CALCULUS
• Minterms : Let p and q be two propositional variables. Then 𝑝 ∧ 𝑞 , 𝑝 ∧∼ 𝑞 , ∼ 𝑝 ∧∼
𝑞 , ∼ 𝑝 ∧ 𝑞 𝑎𝑟𝑒 𝑐𝑎𝑙𝑙𝑒𝑑 𝑚𝑖𝑛𝑡𝑒𝑟𝑚𝑠 𝑜𝑓 𝑝 𝑎𝑛𝑑 𝑞.
The number of minterms for n variables is 2𝑛 . If p is T, we take p and if p
is F then we take ∼ 𝑝.
• Maxterms : Let p and q be two propositional variables. Then 𝑝 ∨ 𝑞 , 𝑝 ∨∼ 𝑞 , ∼ 𝑝 ∨
𝑞 , ∼ 𝑝 ∨∼ 𝑞 𝑎𝑟𝑒 𝑐𝑎𝑙𝑙𝑒𝑑 𝑚𝑎𝑥𝑡𝑒𝑟𝑚𝑠 𝑜𝑓 𝑝 𝑎𝑛𝑑 𝑞.
The number of maxterms for n variables is 2𝑛 . If p is T , we take ∼ 𝑝, if p is F we take p.
P q Minterms Maxterms
T T 𝑝∧𝑞 ∼ 𝑝 ∨∼ 𝑞
T F 𝑝 ∧∼ 𝑞 ∼𝑝∨𝑞
F T ∼𝑝∧𝑞 𝑝 ∨∼ 𝑞
F F ∼ 𝑝 ∧∼ 𝑞 𝑝∨𝑞
PROPOSITIONAL CALCULUS
• Principal disjunctive normal form (Sum of minterms): A statement form
consisting of disjunction of minterms only is called Principal disjunctive normal
form.
• Procedure to find principal disjunctive normal form.
1. Using truth table: Construct the truth table for the given proposition. Form a
minterm for the combination of variables for which the proposition is T. Take
disjunction of above minterms.
2. Without constructing the truth tables:
i) Express the given proposition is disjunctive normal form.
ii) Introduce the missing variable 𝑥 in each fundamental conjunction using
∧ (𝑥 ∨∼ x)
iii) Apply distributive law and simplify.
PROPOSITIONAL CALCULUS
• Obtain the principal disjunctive normal form of
1) 𝑝 → 𝑞
Solution: By using truth table:
𝑝 → 𝑞 ≡ 𝑝 ∧ 𝑞 ∨ ∼ 𝑝 ∧ 𝑞 ∨ ∼ 𝑝 ∧∼ 𝑞
PROPOSITIONAL CALCULUS
Without using truth table:
𝑝 → 𝑞 ≡∼ 𝑝 ∨ 𝑞
≡ ∼ 𝑝 ∧ 𝑞 ∨∼ 𝑞 ∨ 𝑞 ∧ 𝑝 ∨∼ 𝑝
≡ ∼ 𝑝 ∧ 𝑞 ∨ ∼ 𝑝 ∧∼ 𝑞 ∨ 𝑞 ∧ 𝑝 ∨ 𝑞 ∧∼ 𝑝
≡ (𝑝 ∧ 𝑞) ∨ (∼ 𝑝 ∧ 𝑞) ∨ (∼ 𝑝 ∧∼ 𝑞)
2) 𝑝 ∧∼ 𝑞 ∧∼ 𝑟 ∨ 𝑞 ∧ 𝑟 ≡ 𝑝 ∧∼ 𝑞 ∧∼ 𝑟 ∨ 𝑞 ∧ 𝑟 ∧ 𝑝 ∨∼ 𝑝
≡ 𝑝 ∧∼ 𝑞 ∧∼ 𝑟 ∨ 𝑞 ∧ 𝑟 ∧ 𝑝 ∨ 𝑞 ∧ 𝑟 ∧∼ 𝑝
≡ (𝑝 ∧∼ 𝑞 ∼ 𝑟) ∨ (𝑝 ∧ 𝑞 ∧ 𝑟) ∨ (∼ 𝑝 ∧ 𝑞 ∧ 𝑟)
PROPOSITIONAL CALCULUS
• Principal conjunctive normal form(Product of maxterms):A statement form
consisting of conjunction of maxterms is called principal conjunctive normal
form.
• Procedure to obtain principal conjunctive normal form:
1. Using Truth table : Construct the truth table for the given proposition.
Form a maxterm for the combination of variables for which the
proposition is F. Take conjunction of above maxterms.
2. Without constructing the truth tables:
i) Express the given proposition is conjunctive normal form.
ii) Introduce the missing variable 𝑥 in each fundamental disjunction by using
∨ (𝑥 ∧∼ x)
iii) Apply distributive law and simplify.
PROPOSITIONAL CALCULUS
1. Obtain the Principal conjunctive normal form of 𝑝 ∨∼ 𝑞 → 𝑟.
• 𝑝 ∨∼ 𝑞 → 𝑟 ≡ (∼ 𝑝 ∨∼ q ∨ 𝑟) ∧ (∼ 𝑝 ∨ q ∨ 𝑟) ∧ (𝑝 ∨ q ∨ 𝑟)
PROPOSITIONAL CALCULUS
2) ∼ 𝑝 → 𝑟 ∧ 𝑞 → 𝑝 ≡ 𝑝 ∨ 𝑟 ∧ ∼ 𝑞 ∨ 𝑝
≡ 𝑝 ∨ 𝑟 ∨ 𝑞 ∧∼ 𝑞 ∧ ∼ 𝑞 ∨ 𝑝 ∨ 𝑟 ∧∼ 𝑟
≡ (𝑝 ∨ 𝑟 ∨ 𝑞) ∧ (𝑝 ∨ 𝑟 ∨∼ 𝑞) ∧ (∼ 𝑞 ∨ 𝑝 ∨ 𝑟) ∧ (∼ 𝑞 ∨ 𝑝 ∨∼ 𝑟)
≡ (𝑝 ∨ 𝑞 ∨ 𝑟) ∧ (𝑝 ∨∼ 𝑞 ∨ 𝑟) ∧ (𝑝 ∨∼ 𝑞 ∨∼ 𝑟)________𝑝𝑐𝑛𝑓
3) 𝑝 ∧ 𝑞 ∨ ∼ 𝑝 ∧ 𝑞 ∨ 𝑞 ∧ 𝑟 ≡ 𝑝 ∨∼ 𝑝 ∧ 𝑞 ∧ 𝑞 ∧ 𝑟
≡ 𝑇∧𝑞 ∨ 𝑞∧𝑟
≡𝑞∨ 𝑞∧𝑟
≡𝑞
≡ 𝑞 ∨ 𝑝 ∧∼ 𝑝 ∨ 𝑟 ∧∼ 𝑟
≡ 𝑞 ∨ 𝑝 ∧ 𝑞 ∨∼ 𝑝 ∨ 𝑟 ∧∼ 𝑟
≡ 𝑞 ∨ 𝑝 ∨ 𝑟 ∧ 𝑞 ∨ 𝑝 ∨∼ 𝑟 ∧ 𝑞 ∨∼ 𝑝 ∨ 𝑟 ∧ 𝑞 ∨∼ 𝑝 ∨∼ 𝑟
≡ (𝑝 ∨ 𝑞 ∨ 𝑟) ∧ (𝑝 ∨ 𝑞 ∨∼ 𝑟) ∧ (∼ 𝑝 ∨ 𝑞 ∨ 𝑟) ∧ (∼ 𝑝 ∨ 𝑞 ∨∼ 𝑟)
PROPOSITIONAL CALCULUS
• Logic in proof (Theory of inference)
A theorem is a proposition that can be proved to be true.
An argument that establishes the truth of a theorem is called a proof.
• An argument is a sequence of statements or propositions. All statements
except the final one is called premises(or assumptions or hypothesis). The
final statement is called a conclusion.
4. ∼𝑠 Given premise
6. ∼ 𝑝 ∨∼ 𝑞 𝐷𝑒 − 𝑀𝑜𝑟𝑔𝑎𝑛′ 𝑠 𝐿𝑎𝑤
4. ∼ 𝑠 →∼ 𝑝 ∧ 𝑞 𝑐𝑜𝑛𝑡𝑎𝑝𝑜𝑠𝑖𝑡𝑖𝑣𝑒 𝑜𝑓 3
5. ∼ 𝑠 →∼ 𝑝 ∨∼ 𝑞 𝐷𝑒 − 𝑀𝑜𝑟𝑔𝑎𝑛′ 𝑠 𝐿𝑎𝑤
4. ∼𝑞 Given premise