Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
17 views

Module 1

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

Module 1

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

BMAT205L – Discrete Mathematics and Graph Theory

MODULE 1: MATHEMATICAL LOGIC

DR. PAVITHRA R.
52258
ASSISTANT PROFESSOR – SAS
r.pavithra@vit.ac.in
Discrete Mathematics
▪Discrete Mathematics deals with the study of Mathematical structures.
▪It deals with objects that can have distinct separate values. It is also called Decision
Mathematics or finite Mathematics.
▪It is the study of mathematical structures that are fundamentally discrete in nature and it does
not require the notion of continuity.
▪Objects that are studied in discrete mathematics are largely countable sets such as formal
languages, integers, finite graphs, and so on.
▪Due to its application in Computer Science, it has become popular in recent decades. It is used
in programming languages, software development, cryptography, algorithms etc.
▪Discrete Mathematics covers some important concepts such as set theory, graph theory, logic,
permutation and combination as well.
Mathematical Statements
Investigate!
While walking through a fictional forest, you encounter three trolls guarding a bridge. Each is
either a knight, who always tells the truth, or a knave, who always lies. The trolls will not let you
pass until you correctly identify each as either a knight or a knave. Each troll makes a single
statement:
Troll 1: If I am a knave, then there are exactly two knights here.
Troll 2: Troll 1 is lying.
Troll 3: Either we are all knaves or at least one of us is a knight.
Which troll is which?
Propositions
▪ A declarative sentence which is true or false, but not both, is called a proposition (or statement)
▪ Sentences which are exclamatory, interrogative or imperative in nature are not propositions
▪Lower case letters such as 𝑝, 𝑞, 𝑟, … are used to denote propositions
▪For example,
1. New Delhi is the capital city of India
2. How beautiful is Rose?
3. 2+2=3
4. What time is it?
5. 𝑥+𝑦=𝑧
6. Take a cup of coffee
(2), (4) and (6) are obviously not propositions as they are not declarative in nature
(1) and (3) are propositions, but (5) is not
Truth value of proposition
▪ If proposition is true, we say that the truth value of that proposition is true, denoted by 𝑇 or 1.
▪If the proposition is false, we say that the truth value of the proposition is false, denoted by 𝐹 or 0.

Atomic or Molecular propositions


▪ Propositions which do not contain any of the logical operators or connectives are called atomic
(primary or primitive) propositions
▪Many mathematical statements which can be constructed by combining one or more atomic
statements using connectives are called molecular or compound propositions
▪ The truth value of a compound proposition depends on those of sub-propositions and the way in
which they are combined using connectives
▪The area of logic that deals with propositions is called propositional logic or propositional calculus
Connectives
▪When 𝑝 and 𝑞 are any two propositions, the proposition “𝑝 𝑎𝑛𝑑 𝑞“ denoted by 𝒑 ∧ 𝒒 and called the
conjunction of 𝑝 and 𝑞 is defined as the compound proposition that is true when both 𝑝 and 𝑞 are
true and is false otherwise.
▪The proposition "𝑝 𝑜𝑟 𝑞“ denoted by 𝒑 ∨ 𝒒 and called the disjunction of 𝑝 and 𝑞 is defined as the
compound proposition that is false when both 𝑝 and 𝑞 are false and is true otherwise.
▪Given any proposition, 𝑝, another proposition formed by writing “It is not the case that” or “It is false
that” before 𝑝 or by inserting the word ‘not’ suitably in 𝑝 is called the negation of 𝑝 and denoted by
¬𝑝 (read as ‘not p’). ¬𝑝 is also denoted as 𝑝′ , 𝑝ҧ and ~𝑝. If 𝑝 is true, then ~𝑝 is false and vice versa.
▪Example for negation: 𝑝: New Delhi is in India, then ~𝑝 is one of the following statements
▪ it is not the case that New Delhi is in India
▪It is false that New Delhi is in India
▪New Delhi is not in India
Order of Precedence for Logical Connectives
We will generally use parentheses to specify the order in which logical operators in a compound
propositions are to be applied
For example, (𝑝 ∨ 𝑞) ∧ (~𝑟) is the conjunction of 𝑝 ∨ 𝑞 and ~𝑟. However to avoid the use of an
excessive number of parentheses, we adopt an order of precedence for the logical operators,
given as follows:
1. The negation operator has precedence over all other logical operators. Thus ~𝑝 ∧ 𝑞 means
(~𝑝) ∧ 𝑞 not ~(𝑝 ∧ 𝑞)
2. The conjunction operator has precedence over the disjunction operator. Thus 𝑝 ∧ 𝑞 ∨ 𝑟
means (𝑝 ∧ 𝑞) ∨ 𝑟, but not 𝑝 ∧ (𝑞 ∨ 𝑟)
3. The conditional and biconditional operators → and ⟷ have lower precedence than other
operators. Among them → has precedence over ⟷
Conditional Propositions
• If 𝑝 and 𝑞 are propositions, the compound proposition “𝒊𝒇 𝒑, 𝒕𝒉𝒆𝒏 𝒒”, that is denoted by 𝒑 → 𝒒 is
called a conditional proposition, which is false when 𝒑 is true and 𝒒 is false and true otherwise.
•If this condition proposition, 𝒑 is called the hypothesis or premise and 𝒒 is called the conclusion or
consequence.
•The alternative terminologies use to express 𝑝 → 𝑞 are the following:
1. 𝑝 implies 𝑞
2. 𝑝 only if 𝑞
3. 𝑞 if 𝑝 𝑜𝑟 𝑞 when 𝑝
4. 𝑞 follows from 𝑝
5. 𝑝 is sufficient for 𝑞 or a sufficient condition for 𝑞 is 𝑝
6. 𝑞 is necessary for 𝑝 or a necessary condition for 𝑝 is 𝑞
Biconditional proposition
•If 𝑝 and 𝑞 are propositions, the compound proposition “p if and only if q”, that is denoted by
𝒑 𝒒 is called a biconditional proposition, which is true when 𝑝 and 𝑞 have the same truth
values and is false otherwise.
• It is easily verified that 𝑝 𝑞 is true when both the conditionals 𝑝 → 𝑞 and 𝑞 → 𝑝 are true.
This is the reason for the symbol which is combination of → and ⟵.
•Alternatively, 𝑝 ⟷ 𝑞 is also expressed as ‘𝑝 𝑖𝑓𝑓 𝑞’ and 𝑝 is necessary and sufficient for 𝑞
Tautology and Contradiction
▪ A compound proposition 𝑃 = 𝑃 𝑝1 , 𝑝2 , … 𝑝𝑛 where 𝑝1 , 𝑝2 , … , 𝑝𝑛 are variables (elemental
propositions), is called a tautology, if it is true for every truth assignment for 𝑝1 , 𝑝2 , … , 𝑝𝑛 .
▪𝑃 is contradiction, if it is false for every truth assignment for 𝑝1 , 𝑝2 , … , 𝑝𝑛 .
▪For example, 𝑝 ∨ ~𝑝 is a tautology, whereas 𝑝 ∧ ~𝑝 is a contradiction
▪Note:
▪The negation of a tautology is a contradiction and the negation of a contradiction is a tautology.
▪If 𝑃 = 𝑃 𝑝1 , 𝑝2 , … 𝑝𝑛 is a tautology, then 𝑃 = 𝑃 𝑞1 , 𝑞2 , … , 𝑞𝑛 is also a tautology, where
𝑞1 , 𝑞2 , … , 𝑞𝑛 are any set of propositions. This is known as the principle o substitution. For
example 𝑝 ∨ ~𝑝 is a tautology, 𝑝 ∨ 𝑞 ∧ 𝑟 ∨ ~((𝑝 ∨ 𝑞) ∧ 𝑟) is also a tautology.
▪If a proposition is neither a tautology not a contradiction it is called a contingency
Problems
Construct a truth table for each of the following compound propositions:
1. 𝑝∨𝑞 → 𝑝∧𝑞
2. 𝑝 → 𝑞 → (𝑞 → 𝑝)
3. (𝑞 → ~𝑝) (𝑝 𝑞)
4. (𝑝 𝑞) ( 𝑝 ∧ 𝑞 ∨ ~𝑝 ∧ ~𝑞 )
5. (~𝑝 ~𝑞) (𝑝 𝑞)
Problems
Construct a truth table for each of the following compound propositions. Determine which of the
following propositions are tautologies, contradictions and Contingency using truth table.
1. 𝑝→ 𝑞→𝑟 → 𝑝→𝑞 → 𝑝→𝑟
2. ~ 𝑝∨ 𝑞∧𝑟 ⟷ 𝑝∨𝑞 ∧ 𝑝→𝑟
3. ~𝑝 ⟷ ~𝑞 ⟷ 𝑞 ⟷ 𝑟
4. (𝑝 → 𝑞 → 𝑠 ) ∧ (~𝑟 ∨ 𝑝) ∧ 𝑞
5. 𝑝→𝑞 →𝑟 →𝑠
6. ~𝑝 ∧ 𝑝 → 𝑞 → ~𝑝
7. 𝑝→𝑞 ∧ 𝑞→𝑟 → (𝑝 → 𝑟)
8. ~ 𝑞 →𝑟 ∧𝑟∧ 𝑝→𝑞
9. 𝑝∨𝑞 ∧ 𝑝 →𝑟 ∧ 𝑞 →𝑟 →𝑟
Equivalence of Propositions
• Two compound propositions 𝐴(𝑝1 , 𝑝2 , … , 𝑝𝑛 ) and 𝐵(𝑝1 , 𝑝2 , … , 𝑝𝑛 ) are said to be logically
equivalent or simply equivalent, if they have identical truth tables.
•If truth value of 𝐴 is equal to the truth value of 𝐵 for every one of the 𝟐𝒏 possible sets of truth
values assigned to 𝑝1 , 𝑝2 , … , 𝑝𝑛
•The equivalence of two propositions 𝐴 and 𝐵 is denoted as 𝑨 ⟺ 𝑩 or 𝑨 ≡ 𝑩 which is read as ‘A
is equivalent to B’ (⟺ or ≡ is not connective).
•For example, let us consider the truth tables of ~(𝑝 ∨ 𝑞) and ~𝑝 ∧ ~𝑞. The finial columns in the
truth tables are identical. Hence,~(𝑝 ∨ 𝑞) ≡ ~𝑝 ∧ ~𝑞.
•Note: 𝐴 ⟷ 𝐵 is tautology. When 𝐴 and 𝐵 are equivalent. Conversely, A and B are equivalent,
when 𝐴 ⟷ 𝐵 is tautology.
• 𝑝 ⟶ 𝑞 ≡ (~𝑝 ∨ 𝑞), since 𝑝 ⟶ 𝑞 ⟷ (~𝑝 ∨ 𝑞) is a tautology.
Duality Law
• The dual of a compound proposition that contains only the logical operators ∨, ∧ and ~ is the
proposition obtained by replacing each ∨ by ∧, each ∧ by ∨, each 𝑇 by 𝐹 and each 𝐹 by 𝑇 are
special variables representing compound propositions that are tautologies and contradictions
respectively.
•The dual of a proposition 𝐴 is denoted by 𝐴∗ .
•Duality Theorem: If 𝐴 𝑝1 , 𝑝2 , … , 𝑝𝑛 ≡ 𝐵 𝑝1 , 𝑝2 , … , 𝑝𝑛 , where 𝐴 and 𝐵 are compound
propositions, then 𝐴∗ (𝑝1 , 𝑝2 , … , 𝑝𝑛 ) ≡ 𝐵∗ (𝑝1 , 𝑝2 , … , 𝑝𝑛 ).
•De Morgan’s Law: ~ 𝑝 ∨ 𝑞 = ~𝑝 ∧ ~𝑞, 𝑝 ∨ 𝑞 = ~(~𝑝 ∧ ~𝑞), 𝑝 ∧ 𝑞 = ~(~𝑝 ∨ ~𝑞)
•~ 𝐴 𝑝1 , 𝑝2 , … , 𝑝𝑛 = 𝐴∗ (𝑝1 , 𝑝2 , … , 𝑝𝑛 )
Algebra of Prepositions
•A proposition in a compound proposition can be replaced by one that is equivalent to it without changing
the truth value of the compound proposition.
•By this, new equivalents (or laws) can be constructed
•For example, we have proved that 𝑝 → 𝑞 ≡ ~𝑝 ∨ 𝑞.
•Using this equivalence, we get another equivalence 𝑝 → 𝑞 → 𝑟 ≡ 𝑝 → (~𝑞 ∨ 𝑟)
Sl. No. Name of the law Primal form Dual form
1. Idempotent Law 𝑝∨𝑝≡𝑝 𝑝∧𝑝 ≡𝑝
2. Identity Law 𝑝∨𝐹 ≡𝑝 𝑝∧𝑇 ≡𝑝
3. Dominant Law 𝑝∨𝑇 ≡𝑇 𝑝∧𝐹 ≡𝐹
4. Complement Law 𝑝 ∨ ~𝑝 ≡ 𝑇 𝑝 ∧ ~𝑝 ≡ 𝐹
5. Commutative Law 𝑝∨𝑞 ≡𝑞∨𝑝 𝑝∧𝑞 ≡𝑞∧𝑝
6. Associative Law (𝑝 ∨ 𝑞) ∨ 𝑟 ≡ 𝑝 ∨ (𝑞 ∨ 𝑟) (𝑝 ∧ 𝑞) ∧ 𝑟 ≡ 𝑝 ∧ (𝑞 ∧ 𝑟)
7. Distribution Law 𝑝 ∨ (𝑞 ∧ 𝑟) ≡ (𝑝 ∨ 𝑞) ∧ (𝑝 ∨ 𝑟) 𝑝 ∧ (𝑞 ∨ 𝑟) ≡ (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟)
8. Absorption Law 𝑝∨ 𝑝∧𝑞 ≡𝑝 𝑝∧ 𝑝∨𝑞 ≡𝑝
9. De Morgan’s Law ~ 𝑝 ∨ 𝑞 ≡ ~𝑝 ∧ ~𝑞 ~ 𝑝 ∧ 𝑞 ≡ ~𝑝 ∨ ~𝑞
Equivalences involving conditionals
1. 𝑝 → 𝑞 ≡ ~𝑝 ∨ 𝑞
2. 𝑝 → 𝑞 ≡ ~𝑞 → ~𝑝
3. 𝑝 ∨ 𝑞 ≡ ~𝑝 → 𝑞
4. 𝑝 ∧ 𝑞 ≡ ~ 𝑝 → ~𝑞
5. ~ 𝑝 → 𝑞 ≡ 𝑝 ∧ ~𝑞
6. 𝑝 →𝑞 ∧ 𝑝 →𝑟 ≡𝑝 → 𝑞∧𝑟
7. 𝑝 →𝑟 ∧ 𝑞 →𝑟 ≡ 𝑝∨𝑞 →𝑟
8. 𝑝 →𝑞 ∨ 𝑝 →𝑟 ≡𝑝 → 𝑞∨𝑟
9. 𝑝 →𝑟 ∨ 𝑞 →𝑟 ≡ 𝑝∧𝑞 →𝑟
Equivalences involving biconditionals
1. 𝑝 ⟷ 𝑞 ≡ 𝑝 → 𝑞 ∧ 𝑞 → 𝑝
2. 𝑝 ⟷ 𝑞 ≡ ~𝑝 ⟷ ~𝑞
3. 𝑝 ⟷ 𝑞 ≡ p ∧ 𝑞 ∨ ~𝑝 ∧ ~𝑞
4. ~ 𝑝 ⟷ 𝑞 ≡ 𝑝 ⟷ ~𝑞
Tautological Implication
•A compound proposition 𝐴(𝑝1 , 𝑝2 , … , 𝑝𝑛 ) is said to tautologically imply or simply imply the
compound proposition 𝐵(𝑝1 , 𝑝2 , … , 𝑝𝑛 ), if 𝑩 is true whenever 𝑨 is true or equivalently if and
only if 𝑨 → 𝑩 is tautology. This is denoted by 𝐴 ⇒ 𝐵 , read as "𝐴 𝑖𝑚𝑝𝑙𝑖𝑒𝑠 𝐵“
•⇒ is not a connective and 𝐴 ⇒ 𝐵 is not a proposition
•For example, 𝑝 ⇒ 𝑝 ∨ 𝑞, 𝑝 ∨ 𝑞 is true whenever 𝑝 is true and that 𝑝 → (𝑝 ∨ 𝑞) is a tautology.
•Implications:
1. 𝑝∧𝑞 ⇒𝑝
2. 𝑝∧𝑞 ⇒𝑞
3. 𝑝⇒𝑝∨𝑞
4. ~𝑝 ⇒ 𝑝 → 𝑞
5. 𝑞⇒𝑝→𝑞
6. ~ 𝑝→𝑞 ⇒𝑝
7. ~ 𝑝 → 𝑞 ⇒ ~𝑞
8. 𝑝∧ 𝑝→𝑞 ⇒𝑞
9. ~𝑞 ∧ 𝑝 → 𝑞 ⇒ ~𝑝
10. ~𝑝 ∧ 𝑝 ∨ 𝑞 ⇒ 𝑞
11. 𝑝 → 𝑞 ∧ 𝑞 → 𝑟 ⇒ 𝑝 → 𝑟
12. 𝑝 ∨ 𝑞 ∧ 𝑝 → 𝑟 ∧ 𝑞 → 𝑟 ⇒ 𝑟
Problem 1: Without using truth table, prove the following: (~𝑝 ∨ 𝑞) ∧ (𝑝 ∧ (𝑝 ∧ 𝑞)) ≡ 𝑝 ∧ 𝑞
Proof:
(~𝑝 ∨ 𝑞) ∧ (𝑝 ∧ (𝑝 ∧ 𝑞)) ≡ (~𝑝 ∨ 𝑞) ∧ ((𝑝 ∧ 𝑝) ∧ 𝑞) , by associative law
≡ (~𝑝 ∨ 𝑞) ∧ (𝑝 ∧ 𝑞) by idempotent law
≡ (𝑝 ∧ 𝑞) ∧ (~𝑝 ∨ 𝑞), by commutative law
≡ ( 𝑝 ∧ 𝑞 ∧ ~𝑝) ∨ ( 𝑝 ∧ 𝑞 ∧ 𝑞), by distributive law
≡ (~𝑝 ∧ 𝑝 ∧ 𝑞 ) ∨ ( 𝑝 ∧ 𝑞 ∧ 𝑞), by commutative law
≡ ((~𝑝 ∧ 𝑝) ∧ 𝑞) ∨ (𝑝 ∧ 𝑞 ∧ 𝑞 ), by associative law
≡ (𝐹 ∧ 𝑞) ∨ (𝑝 ∧ 𝑞), by complement and idempotent law
≡ 𝐹 ∨ (𝑝 ∧ 𝑞), by dominant law
≡ 𝑝 ∧ 𝑞, by dominant law
Problem 2: Without using truth table, prove the following: 𝑝 → 𝑞 → 𝑝 ≡ ~𝑝 → (𝑝 → 𝑞)
Proof:
L.H.S 𝑝 → 𝑞 → 𝑝 ≡ ~𝑝 ∨ 𝑞 → 𝑝
≡ ~𝑝 ∨ ~𝑞 ∨ 𝑝
≡ ~𝑝 ∨ (𝑝 ∨ ~𝑞)
≡ (~𝑝 ∨ 𝑝) ∨ 𝑞
≡ 𝑇∨𝑞
≡𝑇
R.H.S ~𝑝 → 𝑝 → 𝑞 ≡ 𝑝 ∨ (𝑝 → 𝑞)
≡ 𝑝 ∨ (~𝑝 ∨ 𝑞)
≡ (~𝑝 ∨ 𝑝) ∨ 𝑞
≡ 𝑇∨𝑞
≡𝑇
L.H.S=R.H.S
Hence Proved
Problem 3: Without using truth table, prove the following: ~ 𝑝 ⟷ 𝑞 ≡ 𝑝 ∨ 𝑞 ∧ ~(𝑝 ∨ 𝑞) ≡ (𝑝 ∧ ~𝑞) ∨ (~𝑝 ∧ 𝑞)
Proof:
L.H.S : ~ 𝑝 ⟷ 𝑞 ≡ ~((𝑝 → 𝑞) ∧ (𝑞 → 𝑝))
≡ ~((~𝑝 ∨ 𝑞) ∧ (~𝑞 ∨ 𝑝))
≡ ~(((~𝑝 ∨ 𝑞) ∧ ~𝑞)) ∨ ((~𝑝 ∨ 𝑞) ∧ 𝑝))) , by distribution law
≡ ~(( ~𝑝 ∧ ~𝑞 ∨ 𝑞 ∧ ~𝑞 ) ∨ ((~𝑝 ∧ 𝑝) ∨ (𝑞 ∧ 𝑝))), by distribution law
≡ ~( ~𝑝 ∧ ~𝑞 ∨ 𝐹 ∨ (𝐹 ∨ (𝑞 ∧ 𝑝)))
≡ ~((~𝑝 ∧ ~𝑞) ∨ (𝑞 ∧ 𝑝)), by identity law
≡ ~(~(𝑝 ∨ 𝑞) ∨ (𝑞 ∧ 𝑝)), by De Morgan’s law
≡ 𝑝 ∨ 𝑞 ∧ ~ 𝑞 ∧ 𝑝 , by De Morgan’s law
≡ 𝑝 ∨ 𝑞 ∧ ~𝑞 ∨ ~𝑝 , by De Morgan’s law
≡ ( 𝑝 ∨ 𝑞 ∧ ~𝑞) ∨ ((𝑝 ∨ 𝑞) ∧ ~𝑝), by distribution law
≡ ((𝑝 ∧ ~𝑞) ∨ (𝑞 ∧ ~𝑞)) ∨ ((𝑝 ∧ ~𝑝) ∨ (𝑞 ∧ ~𝑝)), by distribution law
≡ ((𝑝 ∧ ~𝑞) ∨ 𝐹) ∨ (𝐹 ∨ (𝑞 ∧ ~𝑝))
≡ 𝑝 ∧ ~𝑞 ∨ (𝑞 ∧ ~𝑝), by identity law
≡ 𝑝 ∧ ~𝑞 ∨ (~𝑝 ∧ 𝑞), by commutative law
Problem 4: Without constructing the truth tables, prove the following:
(i) ~𝑝 → 𝑞 → 𝑟 ≡ 𝑞 → (𝑝 ∨ 𝑟)
(ii) 𝑝 → 𝑞 → 𝑟 ≡ 𝑝 → ~𝑞 ∨ 𝑟 ≡ 𝑝 ∧ 𝑞 → 𝑟
(iii) ( 𝑝 ∨ 𝑞 ∧ ~ ~𝑝 ∧ ~𝑞 ∨ ~𝑟 ) ∨ (~𝑝 ∧ ~𝑞) ∨ (~𝑝 ∧ ~𝑟) is a tautology
Solution:
𝑖 ~𝑝 → 𝑞 → 𝑟 ≡ 𝑝 ∨ 𝑞 → 𝑟
≡ 𝑝 ∨ (~𝑞 ∨ 𝑟)
≡ (𝑝 ∨ ~𝑞) ∨ 𝑟, by associative law
≡ (~𝑞 ∨ 𝑝) ∨ 𝑟, by commutative law
≡ ~𝑞 ∨ 𝑝 ∨ 𝑟 , by associative law
≡ 𝑞 → (𝑝 ∨ 𝑟)
𝑖𝑖 𝑝 → 𝑞 → 𝑟 ≡ 𝑝 → ~𝑞 ∨ 𝑟 ≡ 𝑝 ∧ 𝑞 → 𝑟
Solution
𝑝 → 𝑞 → 𝑟 ≡ ~𝑝 ∨ 𝑞 → 𝑟
≡ ~𝑝 ∨ ~𝑞 ∨ 𝑟
≡ (~𝑝 ∨ ~𝑞) ∨ 𝑟, by associative law
≡ ~ 𝑝 ∧ 𝑞 ∨ 𝑟, by De Morgan’s law
≡ 𝑝∧𝑞 →𝑟
𝑖𝑖𝑖 ( 𝑝 ∨ 𝑞 ∧ ~ ~𝑝 ∧ ~𝑞 ∨ ~𝑟 ) ∨ (~𝑝 ∧ ~𝑞) ∨ (~𝑝 ∧ ~𝑟) is a tautology
( 𝑝 ∨ 𝑞 ∧ ~ ~𝑝 ∧ ~𝑞 ∨ ~𝑟 ) ∨ (~𝑝 ∧ ~𝑞) ∨ (~𝑝 ∧ ~𝑟)

≡ 𝑝∨𝑞 ∧~ ~ 𝑝∨ 𝑞∧𝑟 ∨ ~ 𝑝 ∨ 𝑞 ∨ ~(𝑝 ∧ 𝑟), by De Morgan’s law

≡ 𝑝∨𝑞 ∧ 𝑝∨ 𝑞∧𝑟 ∨ ~ 𝑝 ∨ 𝑞 ∨ ~(𝑝 ∧ 𝑟)

≡ 𝑝∨𝑞 ∧ 𝑝∨𝑞 ∧ 𝑝∨𝑟 ∨ (~ 𝑝 ∨ 𝑞 ∨ ~(𝑝 ∧ 𝑟)), by distributive law


≡ ((𝑝 ∨ 𝑞) ∧ (𝑝 ∨ 𝑟)) ∨ (~((𝑝 ∨ 𝑞) ∧ (𝑝 ∧ 𝑟))), by idempotent law and De Morgan’s law
≡𝑇
Problem 5: Prove the following equivalences by proving the equivalences of the duals:
𝑖 ~((~𝑝 ∧ 𝑞) ∨ (~𝑝 ∧ ~𝑞)) ∨ (𝑝 ∧ 𝑞) ≡ 𝑝
𝑖𝑖 𝑝 ∨ 𝑞 → 𝑟 ≡ (𝑝 → 𝑟) ∧ (𝑞 → 𝑟)

𝑖𝑖𝑖 𝑝∧ 𝑝⟷𝑞 →𝑞≡𝑇


Solution:
𝑖 ~((~𝑝 ∧ 𝑞) ∨ (~𝑝 ∧ ~𝑞)) ∨ (𝑝 ∧ 𝑞) ≡ 𝑝
The dual of the given equivalence is
~((~𝑝 ∨ 𝑞) ∧ (~𝑝 ∨ ~𝑞)) ∧ (𝑝 ∨ 𝑞) ≡ 𝑝
Proof: L.H.S: ~((~𝑝 ∨ 𝑞) ∧ (~𝑝 ∨ ~𝑞)) ∧ (𝑝 ∨ 𝑞)
≡~ ~𝑝 ∨ 𝑞 ∧ ~𝑞 ∧ (𝑝 ∨ 𝑞), by distribution law

≡~ ~𝑝 ∨ 𝐹 ∧ 𝑝∨𝑞
≡ ~(~𝑝) ∧ (𝑝 ∨ 𝑞), by identity law
≡𝑝∧ 𝑝∨𝑞
≡ 𝑝, by absorption law
𝑖𝑖 𝑝 ∨ 𝑞 → 𝑟 ≡ (𝑝 → 𝑟) ∧ (𝑞 → 𝑟)
Solution
𝑝 ∨ 𝑞 → 𝑟 ≡ (𝑝 → 𝑟) ∧ (𝑞 → 𝑟)
⇒ ~(𝑝 ∨ 𝑞) ∨ 𝑟 ≡ (~𝑝 ∨ 𝑟) ∧ (~𝑞 ∨ 𝑟)
The dual of equivalence is ~(𝑝 ∧ 𝑞) ∧ 𝑟 ≡ (~𝑝 ∧ 𝑟) ∨ (~𝑞 ∧ 𝑟)
Proof:
L.H.S ≡ ~(𝑝 ∧ 𝑞) ∧ 𝑟
≡ ~𝑝 ∨ ~𝑞 ∧ r, by De Morgan’s Law
≡ ~𝑝 ∧ 𝑟 ∨ (~𝑞 ∧ 𝑟), by distribution law
Hence Proved
(iii) 𝑝 ∧ 𝑝 ⟷ 𝑞 →𝑞≡𝑇
Solution:
𝑝∧ 𝑝⟷𝑞 →𝑞≡𝑇

⇒ 𝑝∧ 𝑝→𝑞 ∧ 𝑞→𝑝 →𝑞≡𝑇

⇒ 𝑝∧ ~𝑝 ∨ 𝑞 ∧ ~𝑞 ∨ 𝑝 →𝑞≡𝑇

⇒~ 𝑝∧ ~𝑝 ∨ 𝑞 ∧ ~𝑞 ∨ 𝑝 ∨𝑞 ≡ 𝑇

Dual of this~ 𝑝 ∨ ~𝑝 ∧ 𝑞 ∨ ~𝑞 ∧ 𝑝 ∧𝑞 ≡𝐹
L.H.S ≡ ~ (𝑝 ∨ ~𝑝 ∧ 𝑞 ) ∨ ~𝑞 ∧ 𝑝 ∧ 𝑞, by associative law

≡ ~(( 𝑝 ∨ ~𝑝 ∧ 𝑝 ∨ 𝑞 ) ∨ (~𝑞 ∧ 𝑝)) ∧ 𝑞, by distributive law


≡ ~((𝑇 ∧ (𝑝 ∨ 𝑞)) ∨ (~𝑞 ∧ 𝑝)) ∧ 𝑞
≡ ~((𝑝 ∨ 𝑞) ∨ (~𝑞 ∧ 𝑝)) ∧ 𝑞, by identity law
≡ ~(((𝑝 ∨ 𝑞) ∨ ~𝑞) ∧ ((𝑝 ∨ 𝑞) ∨ 𝑝)) ∧ 𝑞, by distributive law
≡ ~( 𝑝 ∨ 𝑇 ∧ (𝑝 ∨ 𝑞)) ∧ 𝑞, by idempotent and complemen law
≡ ~(𝑇 ∧ (𝑝 ∨ 𝑞)) ∧ 𝑞, identity law
≡ ~(𝑝 ∨ 𝑞) ∧ 𝑞
≡ (~𝑝 ∧ ~𝑞) ∧ 𝑞
≡ ~𝑝 ∧ 𝐹
≡𝐹
Problem 6: Prove the following implications by using the truth tables:
(i) 𝑝 → 𝑝 → 𝑟 ⇒ 𝑝 → 𝑞 → 𝑝 → 𝑟
(ii) 𝑝 → 𝑞 → 𝑠 ∧ ~𝑟 ∨ 𝑝 ∧ 𝑞 ⇒ 𝑟 → 𝑠
W.K.T 𝐴 ⇒ 𝐵, if and only if 𝐴 → 𝐵 tautology.
Problem 7: Prove the following implications without using truth tables:
(i) 𝑝 ∨ 𝑞 ∧ 𝑝 → 𝑟 ∧ 𝑞 → 𝑟 ⇒ 𝑟
(ii) 𝑝 ∨ ~𝑝 → 𝑞 → 𝑝 ∨ ~𝑝 → 𝑟 ⇒ 𝑞 → 𝑟
Normal Forms
• To determine whether a given compound proposition 𝐴 𝑝1 , 𝑝2 , … , 𝑝𝑛 is a tautology or a
contradictor or at least satisfiable and whether two given compound propositions
𝐴(𝑝1 , 𝑝2 , … , 𝑝𝑛 ) and 𝐵 𝑝1 , 𝑝2 , … , 𝑝𝑛 are equivalent, we have to construct truth tables and
compare them
• 𝐴(𝑝1 , 𝑝2 , … , 𝑝𝑛 ) is said to be satisfiable, if it has the truth value 𝑻 for at least one combination
of the truth value of 𝑝1 , 𝑝2 , … , 𝑝𝑛 of primary propositions.
•But the construction of truth table may not be practical, when the number of primary
propositions 𝑝1 , 𝑝2 , … , 𝑝𝑛 increases. A better method is to reduce 𝑨 and 𝑩 to some standard
forms, called normal forms and use them for deciding the nature of 𝐴 or 𝐵 and for comparing 𝐴
and 𝐵.
•There are two types of normal forms – disjunctive normal form and conjunctive normal form
•We shall use the ‘word’ product in place of ‘conjunction’ and ‘sum’ in place ‘disjunction’ hereafter
Disjunctive and Conjunctive Normal
▪A product of the variables and their negations is called an elementary product
▪Similarly, a sum of the variables and their negations is called an elementary sum.
▪For example, 𝑝, ~𝑝, 𝑝 ∧ ~𝑝, ~𝑝 ∧ 𝑞, 𝑝 ∧ ~𝑞 and ~𝑝 ∧ ~𝑞 are some elementary products in 2
variables
▪𝑞, ~𝑞, 𝑝 ∨ 𝑞, 𝑝 ∨ ~𝑞, ~𝑝 ∨ ~𝑞 are some elementary products in 2 variables.
▪A compound proposition which consists of a sum of elementary product and which is
equivalent to a given proposition is called a disjunctive normal form(DNF) of given proposition
▪A formula which consists of a product of elementary sums and which is equivalent to a given
formula is called conjunctive normal form (CNF) of the given formula.
Find the disjunctive normal forms of the following statements:
(i) ~(~(𝑝 ⟷ 𝑞) ∧ 𝑟)
(ii) 𝑝 ∨ ~𝑝 → 𝑞 ∨ 𝑞 → ~𝑟
(iii) 𝑝 ∨ ~ 𝑞 ∧ 𝑟 ∨ 𝑝 → 𝑞
(iv) (𝑝 ∧ ~(𝑞 ∨ 𝑟)) ∨ (((𝑝 ∧ 𝑞) ∨ ~𝑟) ∧ 𝑝)
Solution
𝑖 ~ ~ 𝑝 ⟷𝑞 ∧𝑟 ≡~ ~ 𝑝 →𝑞 ∧ 𝑞 →𝑝 ∧𝑟
≡ ~ ~ 𝑝 ∧ 𝑞 ∨ ~𝑝 ∧ ~𝑞 ∧𝑟
≡ ~ ~𝑝 ∨ ~𝑞 ∧ ~ ~𝑝 ∧ ~𝑞 ∧ 𝑟
≡ ~ ~𝑝 ∨ ~𝑞 ∧ 𝑝 ∨ 𝑞 ∧ 𝑟
≡ ~ ~𝑝 ∨ ~𝑞 ∨ ~ 𝑝 ∨ 𝑞 ∨ ~𝑟
≡ 𝑝 ∧ 𝑞 ∨ ~𝑝 ∧ ~𝑞 ∨ ~𝑟
(ii) 𝑝 ∨ ~𝑝 → 𝑞 ∨ 𝑞 → ~𝑟

Solution

𝑝 ∨ ~𝑝 → 𝑞 ∨ 𝑞 → ~𝑟 ≡ 𝑝 ∨ (𝑝 ∨ (𝑞 ∨ (𝑞 → ~𝑟)))

≡ 𝑝 ∨ 𝑝 ∨ 𝑞 ∨ ~𝑞 ∨ ~𝑟

≡ 𝑝 ∨ 𝑝 ∨ 𝑞 ∨ ~𝑞 ∨ ~𝑟
≡𝑇
Since we want it as DNF
≡ 𝑝 ∨ 𝑝 ∨ 𝑞 ∨ ~𝑞 ∨ ~𝑟
≡ 𝑝 ∨ 𝑞 ∨ ~𝑞 ∨ ~𝑟
Find the conjunction normal forms of the following statements:
𝑖 𝑝∧~ 𝑞∧𝑟 ∨ 𝑝→𝑞
𝑖𝑖 𝑞 ∨ 𝑝 ∧ 𝑞 ∧ ~((𝑝 ∨ 𝑟) ∧ 𝑞)
𝑖𝑖𝑖 (𝑝 ∧ ~(𝑞 ∧ 𝑟)) ∨ (𝑝 → 𝑞)
Solution
𝑖 𝑝∧~ 𝑞∧𝑟 ∨ 𝑝 → 𝑞 ≡ (𝑝 ∧ (~𝑞 ∨ ~𝑟)) ∨ (~𝑝 ∨ 𝑞)
≡ 𝑝 ∧ ~𝑞 ∨ 𝑝 ∧ ~𝑟 ∨ ~𝑝 ∨ 𝑞
≡ 𝑝 ∨ 𝑝 ∧ 𝑝 ∨ ~𝑟 ∧ ~𝑞 ∨ 𝑝 ∧ ~𝑞 ∨ ~𝑟 ∨ ~𝑝 ∨ 𝑞
≡ 𝑝 ∨ 𝑝 ∧ 𝑝 ∨ ~𝑟 ∧ ~𝑞 ∨ 𝑝 ∧ ~𝑞 ∨ ~𝑟 ∨ ~𝑝 ∨ 𝑞
≡ 𝑝 ∧ 𝑝 ∨ ~𝑟 ∧ 𝑝 ∨ ~𝑞 ∧ ~𝑞 ∨ 𝑞 ∨ ~𝑝 ∨ ~𝑟
≡ 𝑝 ∧ 𝑝 ∨ ~𝑟 ∧ 𝑝 ∨ ~𝑞 ∧ 𝑇 ∨ ~𝑝 ∨ ~𝑟
≡ 𝑝 ∧ 𝑝 ∨ ~𝑟 ∧ 𝑝 ∨ ~𝑞
(ii) 𝑞 ∨ 𝑝 ∧ 𝑞 ∧ ~((𝑝 ∨ 𝑟) ∧ 𝑞) ≡ 𝑞 ∧ ~((𝑝 ∨ 𝑟) ∧ 𝑞), by absorption law
≡ 𝑞 ∧ ~((𝑝 ∨ 𝑟) ∧ 𝑞)
≡ 𝑞 ∧ ~ 𝑝 ∨ 𝑟 ∨ ~𝑞
≡𝑞∧ ~𝑝 ∧ ~𝑟 ∨ ~𝑞
≡ 𝑞 ∧ (~𝑝 ∨ ~𝑞) ∧ (~𝑟 ∨ ~𝑞)
Principal disjunctive and principal conjunctive normal forms
• Given a number of variables, the product (or conjunctions) in which each variable or its
negation, but not both occurs only once are called the minterms. For two variable 𝑝 and 𝑞, the
possible minterms are 𝑝 ∧ 𝑞, 𝑝 ∧ ~𝑞, ~𝑝 ∧ q and ~𝑝 ∧ ~𝑞
•We note that there are 2𝑛 minterms for n variables.
•Given a number of variables, the sum in which each variable or its negation but not both
occurs only once are called maxterms. Maxterms are simply the duals of minterms
•The formula consisting of disjunctions of minterms in the variables only and equivalent to a
given formula is known as its principal disjunctive normal form (PDNF) or its sum of products
canonical form of the given formula.
•Similarly, a formula consisting of conjunction of maxterms in the variables only and equivalent
to given formula is known as its principal conjunctive normal form (PCNF) or its product of sums
canonical form.
•In order to obtain a DNF of the formula by using the procedure given above. To get the minterms
in the disjunctions, the missing factors are introduced through the complement law (𝑝 ∨ ~𝑝 =
𝑇) and then applying the distributive law.
•Identical minterms appearing in the disjunctions are then deleted, as 𝑝 ∨ 𝑝 = 𝑝.
•A similar procedure with necessary modifications is adopted to get PCNF of a formula.
•In order to verify whether two given formulas are equivalent, we may obtain either PDNF or
PCNF of both the formulas and compare them.
Without constructing the truth tables, find the principal disjunctive normal forms of the following statements:
𝑖 ~𝑝 → 𝑞 ∧ 𝑞 ⟷ 𝑝
𝑖𝑖 𝑝 ∧ 𝑞 ∨ ~𝑝 ∧ 𝑞 ∨ 𝑞 ∧ 𝑟
𝑖𝑖𝑖 𝑝 ∧ ~(𝑞 ∧ 𝑟) ∨ (𝑝 → 𝑞)
𝑖𝑣 𝑞 ∨ 𝑝 ∧ 𝑟 ∧ ~((𝑝 ∨ 𝑟) ∧ 𝑞)
Solution:
𝑖 ~𝑝 → 𝑞 ∧ 𝑞 ⟷ 𝑝 ≡ 𝑝 ∨ 𝑞 ∧ 𝑞 ∧ 𝑝 ∨ ~𝑞 ∧ ~𝑝
≡ (𝑝 ∨ 𝑞) ∧ ((𝑝 ∧ 𝑞) ∨ ~(𝑝 ∨ 𝑞))
≡ ( 𝑝 ∨ 𝑞 ∧ 𝑝 ∧ 𝑞 ) ∨ ((𝑝 ∨ 𝑞) ∧ ~(𝑝 ∨ 𝑞))
≡ (𝑝 ∨ 𝑞) ∧ (𝑝 ∧ 𝑞) ∨ 𝐹
≡ (𝑝 ∧ (𝑝 ∧ 𝑞)) ∨ (𝑞 ∧ (𝑝 ∧ 𝑞))
≡ 𝑝∧𝑞 ∨ 𝑝∧𝑞
≡𝑝∧𝑞
𝑖𝑖𝑖 𝑝 ∧ ~ 𝑞 ∧ 𝑟 ∨ 𝑝 → 𝑞 ≡ (𝑝 ∧ (~𝑞 ∨ ~𝑟)) ∨ (~𝑝 ∨ 𝑞)
≡ 𝑝 ∧ ~𝑞 ∨ 𝑝 ∧ ~𝑟 ∨ ~𝑝 ∨ 𝑞
≡ (𝑝 ∧ ~𝑞) ∨ (𝑝 ∧ ~𝑟) ∨ (~𝑝 ∧ 𝒒 ∨ ~𝒒 ) ∨ (𝑞 ∧ (𝒑 ∨ ~𝒑))
≡ (𝑝 ∧ ~𝑞) ∨ (𝑝 ∧ ~𝑟) ∨ (~𝑝 ∧ 𝑞 ∨ ~𝑞 ) ∨ (𝑞 ∧ (𝑝 ∨ ~𝑝))
≡ 𝑝 ∧ ~𝑞 ∨ 𝑝 ∧ ~𝑟 ∨ ~𝒑 ∧ 𝒒 ∨ ~𝑝 ∧ ~𝑞 ∨ 𝑞 ∧ 𝑝 ∨ 𝒒 ∧ ~𝒑
≡ (𝑝 ∧ ~𝑞) ∨ (𝑝 ∧ ~𝑟) ∨ (~𝑝 ∧ 𝑞) ∨ (~𝑝 ∧ ~𝑞) ∨ (𝑞 ∧ 𝑝)
≡ ((𝑝 ∧ ~𝑞) ∧ (𝒓 ∨ ~𝒓)) ∨ ( 𝑝 ∧ ~𝑟 ∧ (𝒒 ∨ ~𝒒)) ∨ ( ~𝑝 ∧ 𝑞 ∧ 𝒓 ∨ ~𝒓 ) ∨ ( ~𝑝 ∧ ~𝑞 ∧ (𝒓 ∨ ~𝒓)) ∨
((𝑞 ∧ 𝑝) ∧ (𝒓 ∨ ~𝒓))
≡ (𝑝 ∧ ~𝑞 ∧ 𝑟) ∨ (𝑝 ∧ ~𝑞 ∧ ~𝑟) ∨ (𝑝 ∧ ~𝑟 ∧ 𝑞) ∨ (𝑝 ∧ ~𝑟 ∧ ~𝑞) ∨ (~𝑝 ∧ 𝑞 ∧ 𝑟) ∨ (~𝑝 ∧ 𝑞 ∧ ~𝑟) ∨
(~𝑝 ∧ ~𝑞 ∧ 𝑟) ∨ (~𝑝 ∧ ~𝑞 ∧ ~𝑟) ∨ (𝑞 ∧ 𝑝 ∧ 𝑟) ∨ (𝑞 ∧ 𝑝 ∧ ~𝑟)
≡ (𝑝 ∧ ~𝑞 ∧ 𝑟) ∨ (𝒑 ∧ ~𝒒 ∧ ~𝒓) ∨ (𝒑 ∧ 𝒒 ∧ ~𝒓) ∨ (𝒑 ∧ ~𝒒 ∧ ~𝒓) ∨ (~𝑝 ∧ 𝑞 ∧ 𝑟) ∨ (~𝑝 ∧ 𝑞 ∧ ~𝑟) ∨
(~𝑝 ∧ ~𝑞 ∧ 𝑟) ∨ (~𝑝 ∧ ~𝑞 ∧ ~𝑟) ∨ (𝑝 ∧ 𝑞 ∧ 𝑟) ∨ (𝒑 ∧ 𝒒 ∧ ~𝒓)
≡ (𝑝 ∧ ~𝑞 ∧ 𝑟) ∨ (𝑝 ∧ ~𝑞 ∧ ~𝑟) ∨ (𝑝 ∧ ~𝑞 ∧ ~𝑟) ∨ (~𝑝 ∧ 𝑞 ∧ 𝑟) ∨ (~𝑝 ∧ 𝑞 ∧ ~𝑟) ∨ (~𝑝 ∧ ~𝑞 ∧ 𝑟) ∨
(~𝑝 ∧ ~𝑞 ∧ ~𝑟) ∨ (𝑝 ∧ 𝑞 ∧ 𝑟)
𝑖𝑣 𝑞 ∨ 𝑝 ∧ 𝑟 ∧ ~( 𝑝 ∨ 𝑟 ∧ 𝑞)
≡ 𝑞∨ 𝑝∧𝑟 ∧ ~ 𝑝 ∨ 𝑟 ∨ ~𝑞
≡ 𝑞∨ 𝑝∧𝑟 ∧ ~𝑝 ∧ ~𝑟 ∨ ~𝑞
≡ (𝑞 ∧ ~𝑝 ∧ ~𝑟 ) ∨ ( 𝑝 ∧ 𝑟 ∧ (~𝑝 ∧ ~𝑟)) ∨ (𝑞 ∧ ~𝑞) ∨ ((𝑝 ∧ 𝑟) ∧ ~𝑞)
≡ ~𝑝 ∧ 𝑞 ∧ ~𝑟 ∨ 𝑝 ∧ ~𝑝 ∧ 𝑟 ∧ ~𝑟 ∨ 𝐹 ∨ 𝑝 ∧ ~𝑞 ∧ 𝑟
≡ ~𝑝 ∧ 𝑞 ∧ ~𝑟 ∨ 𝐹 ∨ 𝐹 ∨ 𝑝 ∧ ~𝑞 ∧ 𝑟
≡ ~𝑝 ∧ 𝑞 ∧ ~𝑟 ∨ 𝑝 ∧ ~𝑞 ∧ 𝑟
Without constructing the truth tables, find the principal conjunctive normal forms of the following statements:
𝑖 (𝑝 ∧ 𝑞) ∨ (~𝑝 ∧ 𝑞 ∧ 𝑟)
𝑖𝑖 𝑝 ∨ 𝑞 ∧ 𝑟 ∨ ~𝑝 ∧ 𝑞 ∨ ~𝑟
(𝑖𝑖𝑖)(𝑝 ∨ ~(𝑞 ∨ 𝑟)) ∨ (((𝑝 ∧ 𝑞) ∧ ~𝑟) ∧ 𝑝)

𝑖𝑣 𝑝 → 𝑞 ∧ 𝑟 ∧ ~𝑝 → ~𝑞 ∧ ~𝑟
Solution:

𝑖 𝑝 ∧ 𝑞 ∨ ~𝑝 ∧ 𝑞 ∧ 𝑟 ≡ 𝑝 ∧ 𝑞 ∨ ~𝑝 ∧ 𝑝∧𝑞 ∨𝑞 ∧ 𝑝∧𝑞 ∨𝑟

≡ 𝑝 ∨ ~𝑝 ∧ 𝑞 ∨ ~𝑝 ∧ 𝑝 ∨ 𝑞 ∧ 𝑞 ∨ 𝑞 ∧ 𝑝 ∨ 𝑟 ∧ 𝑞 ∨ 𝑟
≡ 𝑇 ∧ 𝑞 ∨ ~𝑝 ∧ 𝑝 ∨ 𝑞 ∧ 𝑞 ∧ 𝑝 ∨ 𝑟 ∧ 𝑞 ∨ 𝑟

≡ ~𝑝 ∨ 𝑞 ∨ 𝑟 ∧ ~𝑟 ∧ 𝑝 ∨ 𝑞 ∨ 𝑟 ∧ ~𝑟 ∧ 𝑞 ∨ 𝑝 ∧ ~𝑝 ∧ 𝑝 ∨ 𝑟 ∨ 𝑞 ∧ ~𝑞 ∧ 𝑞 ∨ 𝑟 ∨ 𝑝 ∧ ~𝑝

≡ (~𝑝 ∨ 𝑞 ∨ 𝑟) ∧ (~𝑝 ∨ 𝑞 ∨ ~𝑟) ∧ (𝑝 ∨ 𝑞 ∨ 𝑟) ∧ (𝑝 ∨ 𝑞 ∨ ~𝑟) ∧ ( 𝑞 ∨ 𝑝 ∨ (𝑟 ∧ ~𝑟)) ∧ ( 𝑞 ∨ ~𝑝 ∨ 𝑟 ∧ ~𝑟 ) ∧ (𝑝 ∨


𝑞 ∨ 𝑟) ∧ (𝑝 ∨ ~𝑞 ∨ 𝑟) ∧ (𝑝 ∨ 𝑞 ∨ 𝑟) ∧ (~𝑝 ∨ 𝑞 ∨ 𝑟)
≡ (~𝑝 ∨ 𝑞 ∨ 𝑟) ∧ (~𝑝 ∨ 𝑞 ∨ ~𝑟) ∧ (𝑝 ∨ 𝑞 ∨ 𝑟) ∧ (𝑝 ∨ 𝑞 ∨ ~𝑟) ∧ 𝑝 ∨ 𝑞 ∨ 𝑟 ∧ 𝑝 ∨ 𝑞 ∨ ~𝑟 ∧ ~𝑝 ∨ 𝑞 ∨ 𝑟 ∧ (~𝑝 ∨ 𝑞 ∨
~𝑟) ∧ (𝑝 ∨ 𝑞 ∨ 𝑟) ∧ (𝑝 ∨ ~𝑞 ∨ 𝑟) ∧ (𝑝 ∨ 𝑞 ∨ 𝑟) ∧ (~𝑝 ∨ 𝑞 ∨ 𝑟)
≡ (~𝑝 ∨ 𝑞 ∨ 𝑟) ∧ (~𝑝 ∨ 𝑞 ∨ ~𝑟) ∧ (𝑝 ∨ 𝑞 ∨ 𝑟) ∧ (𝑝 ∨ 𝑞 ∨ ~𝑟) ∧ (𝑝 ∨ ~𝑞 ∨ 𝑟)
Theory of Inference
Introduction:
•Inference theory is concerned with the inferring of a conclusion from certain hypothesis or basic
assumptions, called premises, by applying certain principles of reasoning called rules of
inference.
•When a conclusion derived from a set of premises by using rules of inference, the process of such
derivation is called a formal proof.
•The rules of inference are only means used to draw a conclusion from a set of premises in a
finite sequence of steps called arguments.
•These rules will be given in terms of statement formulas rather than in terms of any specific
statements or their truth values.
•Any conclusion which is arrived at the following these rules is called a valid conclusion and the
argument is called a valid argument.
•The actual truth value of the premises and that of the conclusion do not play any part in the
determination of the validity of the argument.
Truth table technique
•When 𝐴 and 𝐵 are two statement formulas, the 𝐵 is said to (logically) follow 𝐴 or 𝐵 is a valid
conclusion of the premise 𝐴, if 𝐴 → 𝐵 is a tautology, viz., 𝐴 ⇒ 𝐵.
•Extending, a conclusion 𝐶 is said to follow from a set of premises 𝐻1 , 𝐻2 , … , 𝐻𝑛 , if
𝐻1 ∧ 𝐻2 ∧ ⋯ ∧ 𝐻𝑛 ⇒ 𝐶
•If a set of premises and a conclusion are given, it is possible to determine whether the conclusion
follows from the premises by constructing relevant truth tables, as explained in the following
example. This method is known as truth table technique.
𝑝 𝑞 ~𝑝 𝑝∨𝑞 𝑝→𝑞
•Example, let us consider
T T F T T
•𝑯𝟏 : ~𝒑, 𝑯𝟐 : 𝒑 ∨ 𝒒, 𝑪: 𝒒
T F F T F
•𝐻1 and 𝐻2 are true only in the third row,
F T T T T
•in which case 𝐶 is also true. Hence (i) is valid
F F T F T
•𝐻1 : 𝑝 → 𝑞, 𝐻2 : 𝑞, 𝐶: 𝑝
•𝐻1 and 𝐻2 are true in the first and third rows, but 𝐶 is not true in the third row. Hence (ii) is not a
valid conclusion
Rules of Inference
• Before we give the frequently used rules of inference in the form of tautologies in a table, we
state two basic rules of inference called rules P and T.
•Rule P: A premise may be introduced at any step in the derivation
•Rule T: A formula 𝑆 may be introduced in the derivation, if 𝑆 is tautologically implied by one or
more preceding formulas in the derivation.
What are Rules of Inference for?

•Mathematical logic is often used for logical proofs. Proofs are valid arguments that determine
the truth values of mathematical statements.
•An argument is a sequence of statements.
•The last statement is the conclusion and all its preceding statements are called premises (or
hypothesis). The symbol “∴”, (read therefore) is placed before the conclusion.
•A valid argument is one where the conclusion follows from the truth values of the premises.
•Rules of Inference provide the templates or guidelines for constructing valid arguments from the
statements that we already have.
Rules of Inference
Rule in tautological form Name of the rule
𝑝 ∧ 𝑞 → 𝑝 (𝑝 ∧ 𝑞 ⇒ 𝑝) Simplification
𝑝 ∧ 𝑞 → 𝑞(𝑝 ∧ 𝑞 ⇒ 𝑞)
𝑝 → (𝑝 ∨ 𝑞) Addition
𝑞 → (𝑝 ∧ 𝑞)
𝑝 ∧ 𝑞 → 𝑝∧𝑞 Conjunction
𝑝∧ 𝑝→𝑞 →𝑞 Modus Ponens
~𝑞 ∧ 𝑝 → 𝑞 → ~𝑟 Modus tollens
𝑝→𝑞 ∧ 𝑞→𝑟 → 𝑝→𝑟 Hypothetical Syllogism
𝑝 ∨ 𝑞 ∧ ~𝑝 → 𝑞 Disjunctive Syllogism
𝑝 ∨ 𝑞 ∧ ~𝑝 ∨ 𝑟 → 𝑞∨𝑟 Resolution
𝑝∨𝑟 ∧ 𝑝→𝑟 ∧ 𝑞 →𝑟 →𝑟 Dilemma
Rules of Inference
Rule Tautology Name of the rule
𝑃→𝑞 ( 𝑝 → 𝑞) ∧ 𝑝 ⇒ 𝑞 Modus Ponens
𝑞 (Law of Detachment)
----------
∴𝑞
𝑃→𝑞 𝑝 → 𝑞 ∧ ~𝑞 ⇒ (~𝑝) Modus tollens
~𝑞
----------
∴ ~𝑝
𝑃→𝑞 𝑝 → 𝑞 ∧ 𝑞 → 𝑟 ⇒ (𝑝 → 𝑟) Hypothetical Syllogism
𝑞→𝑟 (Transititvity)
----------
∴𝑝→𝑟
𝑝∨𝑞 𝑝 ∨ 𝑞 ∧ ~𝑝 ⇒ 𝑞 Disjuntive Syllogism
~𝑝
---------
∴𝑞
Rules of Inference
Rule Tautology Name of the rule
𝑝 𝑝⇒𝑝∨𝑞 Addition
----------
∴𝑝∨𝑞
𝑝∧𝑞 𝑝 ∧ 𝑞 ⇒ (𝑝) Simplification
----------
∴𝑝
𝑝 𝑝 ∧ 𝑞 ⇒𝑝∧𝑞 Conjunction
𝑞
----------
∴𝑝∧𝑞
𝑝∨𝑞 𝑝 ∨ 𝑞 ∧ (~𝑝 ∨ 𝑟) ⇒ (𝑞 ∨ 𝑟) Resolution
~𝑝 ∨ 𝑟
---------
∴𝑞∨𝑟
Rules of Inference
Rule Tautology Name of the rule
(𝑝 → 𝑞) ∧ (𝑟 → 𝑠) (𝑝 → 𝑞) ∧ (𝑟 → 𝑠) ∧ Destructive Dilemma
~𝑞 ∨ ~𝑠 ~𝑞 ∨ ~𝑠 ⇒ ~𝑝 ∨ ~𝑟
--------------------------
∴ ~𝑝 ∨ ~𝑟
(𝑝 → 𝑞) ∧ (𝑟 → 𝑠) (𝑝 → 𝑞) ∧ (𝑟 → 𝑠) ∧ Constructive Dilemma
p∨𝑟 𝑝∨r ⇒q∨𝑠
--------------------------
∴𝑞∨𝑠
Examples:
Addition:
Let 𝑃 be the proposition, “He studies very hard” is true
Therefore – “Either he studies very hard or not he is a very bad student”. Here Q is the proposition “he is a very
bad student” P ∨ 𝑄
Conjunction:
Let 𝑃 – “He studies very hard”, 𝑄 – “He is the best boy in the class”
Therefore – “He studies very hard and he is the best boy in the class” 𝑃 ∧ 𝑄
Simplification:
“He studies very hard and he is the best boy in the class” 𝑃 ∧ 𝑄
Therefore – “He studies very hard” 𝑃
Modus Ponens:
“If you have a password, then you can log on to facebook” 𝑃 → 𝑄
“You have a password”, 𝑃
Therefore – “You can log on to facebook”
Modus Tollens:
“If you have a password, then you can log on to facebook”, 𝑃 → 𝑄
“You cannot log on to facebook” ~𝑄
Therefore – “You do not have password” ~𝑃
Disjunctive Syllogism:
“The ice cream is not vanilla flavored”, ~𝑃
“The ice cream is either vanilla flavored or chocolate flavored” 𝑃 ∨ 𝑄
Therfore – “The ice cream is chocolate flavored” 𝑄
Hypothetical Syllogism:
“If it rains, I shall not go to school” 𝑃 → 𝑄
“If I don’t go to school, I won’t need to do homework” 𝑄 → 𝑅
Therefore - “If it rains, I won’t need to do homework” 𝑃 → 𝑅
Constructive Dilemma:
“If it rains, I will take a leave” 𝑃 → 𝑄
“If it is hot outside, I will go for a shower” 𝑅 → 𝑆
“Either it will rain or it is hot outside” 𝑃 ∨ 𝑅
Therefore – “I will take a leave or I will go for a shower” 𝑄 ∨ 𝑆
Destructive Dilemma:
“If it rains, I will take a leave” 𝑃 → 𝑄
“If it is hot outside, I will go for a shower” 𝑅 → 𝑆
“Either it will not take a leave or I will not go for a shower” ~Q∨ ~𝑆
Therefore – “Either It does not rain or it is not hot outside” ~𝑃 ∨ ~𝑅
Form of Argument
• When a set of given statements constitute a valid argument, the argument form will be presented as in the following
example:
• “If it rains heavily, then traveling will be difficult”.
• “If students arrive on time, then travelling was not difficult”.
• “They arrived on time. Therefore, it did not rain heavily”

Let the statements be defined as follows:


• 𝑝: It rains heavily
• 𝑞: Travelling is difficult
• 𝑟: Students arrived on time
Now, we have to show that the premises 𝑝 → 𝑞, 𝑟 → ~𝑞 and 𝑟 lead to the conclusion ~𝑝.
The form of argument given as follows show that the premises lead to the conclusion
Step No. Statement Reason
1. 𝑝→𝑞 Rule 𝑃
2. ~𝑞 → ~𝑝 T, contrapositive of 1
3. 𝑟 → ~𝑞 Rule 𝑃
4. 𝑟 → ~𝑝 T, step 2, 3 and hypothetical syllogism
Rule 𝑃
5. 𝑟 Rule 𝑃
6. ~𝑟 T, steps 4, 5 and modus ponen
Rule CP or Rule of Conditional proof
In addition to the two basic rules of inference 𝑃 and 𝑇. We have one more basic rule called
𝑅𝑢𝑙𝑒 𝐶𝑃
If a formula 𝑠 can be derived from another formula 𝑟 and a set of premises, then the statement
(𝑟 → 𝑠) can be derived from the set of premises alone.
The rule 𝐶𝑃 follows from the equivalence
𝑝 ∧ 𝑟 → 𝑠 ≡ 𝑝 → (𝑟 → 𝑠)
Note:
If the conclusion is of the form 𝑟 → 𝑠, we will take 𝑟 as an additional premise and derive 𝑆 using
the given premises and 𝑟
Inconsistent Premises
A set of premises 𝐻1 , H2 , … , Hn is said to be inconsistent, if their conjunction implies a
contradiction
𝑣𝑖𝑧. If 𝐻1 ∧ 𝐻2 ∧ ⋯ ∧ 𝐻𝑛 ⇒ 𝑅 ∧ ~𝑅 for some formula 𝑅.
A set of premises is said to be consistent, if it is not inconsistent.
Indirect Method of Proof
The notion of inconsistency is used to derive a proof at times. This procedure is called the
indirect method of proof or proof by contradiction or reduction and absurdum.
In order to show that a conclusion 𝐶 follows from the premises 𝐻1 , 𝐻2 , … , 𝐻𝑛 by this method, we
assume that 𝐶 is false and include ~𝐶 as an additional premise
If the new set of premises is inconsistent leading to a contradiction, then the assumption that
~𝐶 is true. Thus 𝐶 follows from 𝐻1 , 𝐻2 , … , 𝐻𝑛
For example, we prove that the premises ~𝑞, 𝑝 → 𝑞 result in the conclusion ~𝑝 by the indirect
method of proof.
We now include ~(~𝑝) as an additional premises. The argument form is given:
Step No. Statement Reason
1. ~(~𝑝) C
2. 𝑝 T, double negation,1
3. 𝑝→𝑞 𝐶
4. ~𝑞 → ~𝑝 T, Contrapostive, 3
5. ~𝑞 𝐶
6. ~𝑝 T, Modus ponens, 4, 5
7. 𝑝 ∧ ~𝑝 𝑇, Conjunction, 2, 6

Thus the inclusion of ~𝐶 leads to a contradiction. Hence ~𝑞, 𝑝 → 𝑞 ⇒ ~𝑝


Problem:
1. Find whether the conclusion 𝐶 follows from the premises 𝐻1 , 𝐻2 , 𝐻3 in the following cases, using
truth table technique:
𝑖 𝐻1 : ~𝑝, 𝐻2 : 𝑝 ∨ 𝑝, C: p ∧ 𝑞
𝑖𝑖 𝐻1 : 𝑝 ∨ 𝑞, 𝐻2 : 𝑝 → 𝑟, 𝐻3 : 𝑞 → 𝑟, 𝐶: 𝑟
Solution
(i) 𝑝 𝑞 𝐻1 ≡ ~𝑝 𝐻2 ≡ 𝑝 ∨ 𝑞 𝐻1 ∧ 𝐻2 𝐶 ≡𝑝∧𝑞
T T F T F T
T F F T F F
F T T T T F
F F T F F F

𝐻1 and 𝐻2 and hence 𝐻1 ∧ 𝐻2 are true in the third row, in which 𝐶 is false.
Hence 𝐶 does not follow from 𝐻1 and 𝐻2
(ii) 𝐻1 : 𝑝 ∨ 𝑞, 𝐻2 : 𝑝 → 𝑟, 𝐻3 : 𝑞 → 𝑟, 𝐶: 𝑟

𝑝 𝑞 𝑟 𝐻1 ≡ 𝑝 ∨ 𝑞 𝐻2 ≡ 𝑝 → 𝑟 𝐻3 ≡ 𝑞 → 𝑟 𝐻1 ∧ 𝐻2 ∧ 𝐻3
T T T T T T T
T T F T F F F
T F T T T T T
T F F T F T F
F T T T T T T
F T F T T F F
F F T F T T F
F F F F T T F

𝐻1 ∧ 𝐻2 ∧ 𝐻3 are true in first, third and fifth rows in which 𝑟 is also true
Hence 𝐶 follows from 𝐻1 , 𝐻2 and 𝐻3
2. Show that (𝑡 ∧ 𝑠) can be derived form the premises 𝑝 → 𝑞, 𝑞 → ~𝑟, 𝑟, 𝑝 ∨ (𝑡 ∧ 𝑠).
Solution:
Step No. Statement Reason
1. 𝑝→𝑞 Rule P
2. 𝑞 → ~𝑟 Rule P
3. 𝑝 → ~𝑟 𝑇, 1, 2 and Hypothetical Syllogism
4. 𝑟 → ~𝑝 T, 3 and Contrapositive (𝑝 → 𝑞 ≡ ~𝑞 → ~𝑝)
5. r Rule P
6. ~𝑝 𝑇, 4, 5 and Modus ponens
7. 𝑝 ∨ (𝑡 ∧ 𝑠) Rule P
8. 𝑡∧𝑠 𝑇, 6, 7 and Disjunctive Syllogism
3. Show that (𝑎 ∨ 𝑏) follows logically from the premises 𝑝 ∨ 𝑞 , 𝑝 ∨ 𝑞 → ~𝑟, ~𝑟 → (𝑠 ∧ ~𝑡)
and 𝑠 ∧ ~𝑡 → (𝑎 ∨ 𝑏).
Solution
Step No. Statement Reason
1. 𝑝 ∨ 𝑞 → ~𝑟 Rule P
2. ~𝑟 → (𝑠 ∧ ~𝑡) Rule P
3. 𝑝 ∨ 𝑞 → (𝑠 ∧ ~𝑡) T, 1, 2 and Hypothetical Syllogism
4. 𝑝∨𝑞 Rule P
5. 𝑠 ∧ ~𝑡 T, 3, 4 and Modus Ponen
6. 𝑆 ∧ ~𝑡 → (𝑎 ∨ 𝑏) Rule P
7. 𝑎∨𝑏 T, 5, 6 and Modus Ponen
4. Show that 𝑝 → 𝑞 ∧ 𝑟 → 𝑠 , 𝑞 → 𝑡 ∧ 𝑠 → 𝑢 , ~(𝑡 ∧ 𝑢) and 𝑝 → 𝑟 ⇒ ~𝑝.
Solution: Step No. Statement Reason
1. (𝑝 → 𝑞) ∧ (𝑟 → 𝑠) Rule P
2. 𝑝→𝑞 T, 1 and simplification
3. 𝑟→𝑠 T, 1 and simplification
4. (𝑞 → 𝑡) ∧ (𝑠 → 𝑢) Rule P
5. 𝑞→𝑡 T, 1 and simplification
6. 𝑠→𝑢 T, 1 and simplification
7. 𝑝→𝑡 T, 2, 5 and hypothetical syllogism
8. 𝑟→𝑢 T, 3, 6 and hypothetical syllogism
9. 𝑝→𝑟 Rule P
10 𝑝→𝑢 T, 9, 8 and Hypothetical syllogism
11. ~𝑡 → ~𝑝 T, 7 and contrapositive
12. ~𝑢 → ~𝑝 T, 10and contrapositive
13. ~𝑡 ∨ ~𝑢 → ~𝑝 T, 11, 12 and 𝑎 → 𝑏 , 𝑐 → 𝑏 ⇒ 𝑎 ∨ 𝑏 → 𝑏
14. ~ 𝑡 ∧ 𝑢 → ~𝑝 T, 13 and De Morgan’s Las
15. ~(𝑡 ∧ 𝑢) Rule P
16. ~𝑝 T, 14, 15 and Modus Ponens
Homework
5. Show that 𝑎 → 𝑏 ∧ 𝑎 → 𝑐 , ~ 𝑏 ∧ 𝑐 , 𝑑 ∨ 𝑎 ⇒ 𝑑
6. Give a direct proof for the implication 𝑝 → 𝑞 → 𝑠 , ~𝑟 ∨ 𝑝 , 𝑞 ⇒ (𝑟 → 𝑠)
Solution
Step No. Statement Reason
1. (~𝑟 ∨ 𝑝) Rule P
2. 𝑟→𝑝 T, 1 and equivalence of (1)
3. 𝑝 → (𝑞 → 𝑠) Rule P
4. 𝑟 → (𝑞 → 𝑠) T, 2, 3 and hypothetical syllogism
5. ~𝑟 ∨ (~𝑞 ∨ 𝑠) T, 4 and equivalence of (4)
6. 𝑞 Rule P
7. 𝑞 ∧ (~𝑟 ∨ ~𝑞 ∨ 𝑠) T, 5, 6 and Conjunction
8. 𝑞 ∧ (~𝑟 ∨ 𝑠) T, 7, 8 and negation and domination laws
9. ~𝑟 ∨ 𝑠 T, 8 and simplification
10. 𝑟→𝑠 T, 9 and equivalence of (9)
7. Derive 𝑝 → (𝑞 → 𝑠) using the CP-rule (if necessary) form the premises 𝑝 → (𝑞 → 𝑟) and
𝑞 → (𝑟 → 𝑠)
Solution:
We shall assume 𝑝 as an additional premise. Using 𝑝 and the two given premises, we will derive
(𝑞 → 𝑠). Then, by CP-rule, 𝑝 → (𝑞 → 𝑠) is deemed to have been derived from the two given
premises.
Step No. Statement Reason
1. 𝑝 P (additional)
2. 𝑝 → (𝑞 → 𝑟) P
3. 𝑞→𝑟 T, 1, 2 and Modus Ponens
4. ~𝑞 ∨ 𝑟 T, 3 and equivalence of (3)
5. 𝑞 → (𝑟 → 𝑠) P
6. ~𝑞 ∨ (𝑟 → 𝑆) T, 5 and equivalence of (5)
7. ~𝑞 ∨ (𝑟 ∧ (𝑟 → 𝑆)) T, 4, 6 and distributive law
8. ~𝑞 ∨ 𝑠 T, 7 and modus ponens
9. 𝑞→s T, 8 and equivalence of (8)
10. 𝑝 → (𝑞 → 𝑠) T, 9 and CP-rule
8. Use the indirect method to show that 𝑟 → ~𝑞, 𝑟 ∨ 𝑠, 𝑠 → ~𝑞, 𝑝 → 𝑞 ⇒ ~p
Solution:
To use indirect method, we will include ~ ~𝑝 ≡ 𝑝 as an additional premise and prove a
contradiction.

Step No. Statement Reason


1. 𝑝 P
2. 𝑝→𝑞 P
3. 𝑞 T, 1, 2 and Modus Ponens
4. 𝑟 → ~𝑞 P
5. 𝑠 → ~𝑞 P
6. 𝑟 ∨ 𝑠 → ~𝑞 T, 4, 5 and equivalence
7. 𝑟∨𝑠 P
8. ~𝑞 T, 6, 7 and Modus Ponens
9. 𝑞 ∧ ~𝑞 T, 3, 8 and Conjunction
10. 𝐹 T, 9 and negation law
9. Show that 𝑏 can be derived from the premises 𝑎 → 𝑏, 𝑐 → 𝑏, 𝑑 → (𝑎 ∨ 𝑐), 𝑑 by the indirect
method.
Solution:
Let us include ~𝑏 as an additional premise and prove a contradiction

Step No. Statement Reason


1. 𝑎→𝑏 P
2. 𝑐→𝑏 P
3. 𝑎∨𝑐 →𝑏 T, 1, 2 and Equivalence
4. 𝑑 → (𝑎 ∨ 𝑐) P
5. 𝑑→𝑏 T, 3, 4 and hypothetical syllogism
6. 𝑑 P
7. 𝑏 T, 5, 6 and modus ponens
8. ~𝑏 P (additional)
9. 𝑏 ∧ ~𝑏 T, 7, 8 and conjunction
10. F T, 9 and negation law
10. Using indirect method of proof, derive 𝑝 → ~𝑠 from the premises 𝑝 → 𝑞 ∨ 𝑟 , 𝑞 → ~𝑝,
𝑠 → ~𝑟, 𝑝.
Solution: Let us include ~(𝑝 → ~𝑠) as an additional premise and prove a contradiction.
~ 𝑝 → ~𝑠 ≡ ~(~𝑝 ∨ ~𝑠) ≡ 𝑝 ∧ 𝑠
Step No. Statement Reason
1. 𝑝 → (𝑞 ∨ 𝑟) P (additional)
2. 𝑝 P
3. (𝑞 ∨ 𝑟) T, 1, 2 and Modus ponens
4. 𝑝∧𝑠 P (additional)
5. 𝑠 T, 4 and simplification
6. 𝑠 → ~𝑟 P
7. ~𝑟 T, 5, 6 and modus ponens
8. 𝑞 T, 3, 7 and disjunctive syllogism
9. 𝑞 → ~𝑝 P
10. ~𝑝 T, 8, 9 and modus ponens
11. 𝑝 ∧ ~𝑝 T, 2, 10 and conjunction
12. F T, 11 and negation law
11. Prove the premises 𝑝 → 𝑞, 𝑞 → 𝑟, 𝑠 → ~𝑟 and 𝑞 ∧ 𝑠 are inconsistent.
Solution:
If we derive a contradiction by using the given premises, it means that they are inconsistent.
Step No. Statement Reason
1. 𝑝→𝑞 P
2. 𝑞→𝑟 P
3. 𝑝→𝑟 T, 1, 2 and hypothetical syllogism
4. 𝑠 → ~𝑟 P
5. 𝑟 → ~𝑠 T, 4 and contradiction
6. q → ~𝑠 T, 2, 5 and hypothetical syllogism
7. ~𝑞 ∨ ~𝑠 T, 6 and equivalence of (6)
8. ~(𝑞 ∧ 𝑠) T, 7 and De Morgan’s law
9. 𝑞∧𝑠 P
10. 𝑞 ∧ 𝑠 ∧ ~(𝑞 ∧ 𝑠) T, 8, 9 and conjunction
11. F T, 10 and negation law
Hence the given premises are inconsistent
12. Prove the premises 𝑎 → 𝑏 → 𝑐 , 𝑑 → 𝑏 ∧ ~𝑐 and 𝑎 ∧ 𝑑 are inconsistent.
Solution
Step No. Statement Reason
1. 𝑎∧𝑑 P
2. 𝑎 T, 1 and simplification
3. 𝑑 T, 1 and simplification
4. 𝑎 → (𝑏 → 𝑐) P
5. 𝑏→𝑐 T, 2, 4, and modus ponens
6. ~𝑏 ∨ 𝑐 T, 5 and equivalence of (5)
7. 𝑑 → (𝑏 ∧ ~𝑐) P
8. ~ 𝑏 ∧ ~𝑐 → ~𝑑 T, 7 and contrapositive
9. ~𝑏 ∧ 𝑐 → ~𝑑 T, 8 and equivalence
10. ~𝑑 T, 6, 9 and modus ponens
11. 𝑑 ∧ ~𝑑 T, 1, 10 and conjunction
12. F T, 11 and negation law

Hence the given premises are inconsistent


13. Construct an argument to show that the following premises imply the conclusion “it rained”.
“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” and “The
trophy was not awarded”
Solution:
Let us symbolize the statement as follows:
𝑝: It rains
𝑞: There is traffic dislocation
𝑟: sports day will be held
𝑠: Cultural programme will go on
𝑡: the trophy will be awarded
Then we have to prove that ~𝑝 ∨ ~𝑞 → 𝑟 ∧ 𝑠, 𝑟 → 𝑡, ~𝑡 ⇒ 𝑝
Step No. Statement Reason
1. ~𝑝 ∨ ~𝑞 → 𝑟 ∧ 𝑠 P
2. (~𝑝 → (𝑟 ∧ 𝑠)) ∧ (~𝑞 → (𝑟 ∧ 𝑠)) T, 1 and equivalence 𝑎 ∨ 𝑏 → 𝑐 ≡ (𝑎 → 𝑐) ∧ (𝑏 → 𝑐)
3. (~𝑝 → (𝑟 ∧ 𝑠)) T, 1 and simplification
4. ~ 𝑟∧𝑠 →𝑝 T, 3 and contrapositive of (3)
5. 𝑟→𝑡 P
6. ~𝑡 → ~𝑟 T, 5 and contrapositive of (5)
7. ~𝑡 P
8. ~𝑟 T, 6, 7 and modus ponens
9. ~𝑟 ∨ ~𝑠 T, 8 and addition
10. ~(𝑟 ∧ 𝑠) T, 9 and De Morgan’s law
11. 𝑝 T, 4, 10 and modus ponens
14. Show that the following set of premises is inconsistent:
If Ram gets his degree, he will go for a job.
If he goes for a job, he will get married soon
If he goes for higher study, he will not get married
Rama gets his degree and goes for higher study.
Solution:
Let the statement be symbolized as follows:
𝑝: Rama gets his degree
𝑞: He will go for a job
𝑟: He will get married soon
𝑠: He goes for higher study
Then prove that 𝑝 → 𝑞, 𝑞 → 𝑟, 𝑠 → ~𝑟, 𝑝 ∧ 𝑠 are inconsistent
Predicate Calculus or Predicate Logic
• In mathematics and computer programs, we encounter statements involving variable such as "𝑥 > 10“ ,
"𝑥 = 𝑦 + 5“ and "𝑥 + 𝑦 = 𝑧“. These statements are neither true or false, when the values of the variables are not
specified.
• The statement "𝑥 is greater than 10” has 2 parts. The first part, the variable 𝒙, is the subject of the statement. The
second part “ is greater than 10”, which refers to a property that the subject can have, is called the predicate.
• We can denote the statement "𝑥 is greater than 10” by the notation 𝑃(𝑥), where 𝑃 denotes the predicate “is greater
than 10” and 𝑥 is the variable. 𝑃 𝑥 is called the propositional function at 𝑥.
• Once a value has been assigned to the variable 𝑥, the statement 𝑃(𝑥) becomes a proposition and has a truth value.
• For example, the truth value of 𝑃 15 {≡ 15 > 10} and 𝑃 5 {≡ 5 > 10} are T and F respectively.
• The statement "𝑥 = 𝑦 + 5“ and "𝑥 + 𝑦 = 𝑧“ will be denoted by 𝑃(𝑥, 𝑦) and 𝑃(𝑥, 𝑦, 𝑧) respectively.
• The logic based on the analysis of predicates in any statement is called predicate logic or predicate calculus
Quantifiers
• Many mathematical statements assert that a property is true for all values of a variable in a
particular domain, called the universe of discourse.
•Such a statement is expressed using a universal quantification. The universal quantification of
𝑃(𝑥) is the statement.
•"𝑃(𝑥) is true for all values of 𝑥 is the universe of discourse” and is denoted by the notation
𝑥 𝑃(𝑥) or ∀ 𝑥𝑃 𝑥 .
•The proposition 𝑥 𝑃 𝑥 or ∀ 𝑥𝑃 𝑥 is read as “for all 𝑥, 𝑃(𝑥)” or “for every 𝑥, 𝑃(𝑥)”.
•The symbol ∀ is called the universal quantifier.
Existential Quantifier
•The existential quantification of 𝑃(𝑥) is the proposition
•“There exists at least one 𝑥 (or an 𝑥) such that 𝑃(𝑥) is true” and is denoted by the notation
∃𝑥𝑃 𝑥 .
•The symbol ∃ is called existential quantifier.
•The proposition ∃𝑥𝑃(𝑥) is read as “For some 𝑥, 𝑃(𝑥)“
Negation of a Quantified Expression
•If 𝑃 𝑥 is the statement "𝑥 has studied computer programming”, then ∀𝑥𝑃(𝑥) means that
“every student (in the class) has studied computer programming”.
•The negation of this statement is “It is not the case that every student in the class has studied
computer programming” or equivalently “There is a student in the class who has not studied
computer programming” which is denoted by ∃𝑥~𝑃(𝑥).
•Thus, we see that ~ ∀𝑥𝑃 𝑥 ≡ ∃𝑥~(𝑃(𝑥))
•Similarly, ∃𝑥𝑃(𝑥) means that “There is a student in the class who has studied computer
programming “The negation of this statement is “Every student in this class has not studied
computer programming”, which is denoted by ∀𝑥 ~𝑃(𝑥). Thus we get
•~(∃𝑥 𝑃(𝑥)) ≡ ∀𝑥(~𝑃(𝑥))
• Further we note that ~ ∀𝑥𝑃(𝑥) is true, when there is an 𝑥 for which 𝑃(𝑥) is false and false
when 𝑃(𝑥) is true for every 𝑥, since
~ ∀𝑥𝑃 𝑥 ≡ ∃𝑥 ~𝑃 𝑥 ≡ ~𝑃 𝑥1 ∨ ~𝑃 𝑥2 ∨ ⋯ ∨ ~𝑃(𝑥𝑛 )
•~ ∃𝑥𝑃(𝑥) is true, when 𝑃(𝑥) is false for every 𝑥 and false when there is an 𝑥 for which 𝑃(𝑥) is
true,
~ ∃𝑥𝑃 𝑥 ≡ ∀𝑥 ~𝑃 𝑥 ≡ ~𝑃 𝑥1 ∧ ~𝑃 𝑥2 ∧ ⋯ ∧ ~P(xn )
Nested (More than one) Quantifiers
There are situation when quantifiers occur in combinations in respect of 1-place or 𝑛-place
predicate formulas (i.e., propositional functions containing 1 or 𝑛 variables). For example let us
consider a 2-place predicate formula 𝑃(𝑥, 𝑦)
Now, ∀𝑥 ∀𝑦 𝑃(𝑥, 𝑦) ≡ ∀𝑥[∀𝑦 𝑃(𝑥, 𝑦)] ≡ ∀𝑦[∀𝑥 𝑃(𝑥, 𝑦)] ----- (1)
And ∃𝑥 ∃𝑦 𝑃(𝑥, 𝑦) ≡ ∃𝑥[∃𝑦 𝑃(𝑥𝑦)] ≡ ∃𝑦[∃𝑥 𝑃(𝑥, 𝑦)] ------(2)
From the meaning of quantifiers and by (1) and (2), the following simplifications hold good:
∀𝑥 ∀𝑦 𝑃 𝑥, 𝑦 ⇒ ∃𝑦 ∀𝑥 𝑃 𝑥, 𝑦 ⇒ ∀𝑥 ∃𝑦 𝑃(𝑥, 𝑦)
∀𝑦 ∀𝑥 𝑃 𝑥, 𝑦 ⇒ ∃𝑥 ∀𝑦 𝑃 𝑥, 𝑦 ⇒ ∀𝑦 ∃𝑥 𝑃(𝑥, 𝑦)
Free and Bound Variables
•When a quantifier is used on a variable 𝒙 or when we have to assign a value to this variable to
get a proposition. The occurrence of the variable is said to be bound or the variable is said to be
a bound variable.
•An occurrence of a variable that is not bound by a quantifier or that is set equal to a particular
value is said to be free.
•The part of the logical expression or predicate formula to which a quantifier is applied is called
the scope of the quantifier.
Examples
Predicate formula Bound Variable and Scope Free Variable
∀𝑥 𝑃(𝑥, 𝑦) 𝑥: 𝑃(𝑥, 𝑦) 𝑦
∀𝑥 (𝑃 𝑥 → 𝑄(𝑥)) 𝑥: 𝑃 𝑥 → 𝑄(𝑥) -
∀𝑥 (𝑃 𝑥 → 𝐸 𝑦 𝑄(𝑥, 𝑦)) 𝑥: 𝑃 𝑥 → 𝐸 𝑦 𝑄(𝑥, 𝑦) -
𝑦: 𝑄(𝑥, 𝑦)
∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 ∨ ∀𝑦 𝑅(𝑦) 𝑥: 𝑃 𝑥 ∧ 𝑄(𝑥) -
𝑦: 𝑅(𝑦)
∃𝑥 𝑃 𝑥 ∧ 𝑄(𝑥) First 𝑥: 𝑃(𝑥) Second 𝑥
Valid Formulas and Equivalences
•Let 𝐴 and 𝐵 be any two predicate formulas defined over a common universe of discourse 𝐸.
•When each of the variables appearing in 𝑨 and 𝑩 is replaced by any element (object name) of the
universe 𝑬, if the resulting statements have the same truth values, then 𝑨 and 𝑩 are said to be
equivalent to each other over 𝐸 and denoted as 𝐴 ≡ 𝐵 or 𝐴 ⟺ 𝐵 over E.
•If 𝐸 is arbitrary, we simply say that 𝐴 and 𝐵 are equivalent and denote it as A ≡ 𝐵 or 𝐴 ⟺ 𝐵.
•Generally, logically valid formulas in predicate calculus can be obtained form tautologies of
propositional calculus by replacing primary propositions such as 𝑝, 𝑞, 𝑟 by propositional functions.
•For example, 𝑝 ∨ ~𝑝 ≡ 𝑇 and (𝑝 → 𝑞) ⟷ (~𝑝 ∨ 𝑞) ≡ 𝑇 are tautologies in statement calculus.
•If we replace 𝑝 by ∀𝑅(𝑥) and 𝑞 by ∃𝑥 𝑆(𝑥) in the above, we get the following valid formulas in
predicate calculus
• ∀𝑥 𝑅 𝑥 ∨ (~∀𝑥 𝑅 𝑥 ) ≡ 𝑇
• ∀𝑥 𝑅 𝑥 → ∃𝑥 𝑆 𝑥 ⟷ ((~∀𝑥 𝑅(𝑥)) ∨ ∃𝑥 𝑆(𝑥)) ≡ 𝑇
More generally, all the implications and equivalences of the statement calculus can also be
considered as implications and equivalences of the predicate calculus if we replace elementary
statements by primary predicate formulas. For example,
From ~ ~𝑝 ⟺ 𝑝, we get ~(~𝑃(𝑥)) ≡ 𝑃(𝑥) -----(1)
From 𝑝 ∧ 𝑞 ≡ 𝑞 ∧ 𝑝, we get 𝑃(𝑥) ∧ 𝑄(𝑥, 𝑦) ≡ 𝑄(𝑥, 𝑦) ∧ 𝑃(𝑥) -----(2)
From 𝑝 → 𝑞 ≡ ~𝑝 ∨ 𝑞, we get 𝑃 𝑥 → 𝑄 𝑥 ≡ ~𝑃(𝑥) ∨ 𝑄(𝑥) -----(3)
(1), (2) and (3) are some examples for valid formulas in predicate calculus.
Apart from the types of valid formulas given above, there are other valid formulas also which
involve quantifiers.
Such valid formulas are obtained by using the inference theory of predicate logic.
Inference Theory or Predicate Calculus
Derivations of formal proof in predicate calculus are done mostly in the same way as in
statement calculus, using implications and equivalences, provided that the statement formulas
are replaced by predicate formulas.
Also the three basic rules P, T and CP of inference theory used in statement calculus can also be
used in predicate calculus. Moreover, the indirect method of proof can also be used in predicate
calculus
Apart from the above rules of inference, we require certain additional rules to deal with
predicate formulas involving quantifiers. If it becomes necessary to eliminate quantifiers during
the course of derivation. We require two rules of specification, called 𝑈𝑆 and 𝐸𝑆 rules.
Once the quantifiers are eliminated, the derivation is similar to that in statement calculus. If it
becomes necessary to quantify the desired conclusion.
We require two rules of generalisation, called UG and EG rules.
Rule US: Universal Specification is the rule of inference which states that one can conclude that
𝑷(𝒄) is true, if ∀ 𝒙 𝑷(𝒙) is true, where 𝒄 is an arbitrary member of the universe of discourse.
This rule is also called the universal instantiation
Rule ES: Existential Specification is the rule which allows us to conclude that 𝑷(𝒄) is true, if
∃𝒙 𝑷 𝒙 is true, where 𝒄 is not an arbitrary member of the universe, but one for which 𝑷(𝒄) is
true. Usually we will not known what 𝑐 is but know that it exists. Since it exists, we may call it 𝑐.
This rule is also called the existential instantiation.
Rule UG: Universal Generalisation is the rule which states that ∀𝒙 𝑷(𝒙) is true, if 𝑷(𝒄) is true,
where 𝒄 is an arbitrary member (not a specific member) or the universe of discourse
Rule EG: Existential Generalisation is the rule that is used to conclude that ∃𝒙 𝑷(𝒙) is true
when 𝑷(𝒄) is true, where 𝒄 is a particular member of the universe of discourse.
Example: Let us consider the following “Famous Socrates argument” which is given by:
All men are mortal
Socrates is a man.
Therefore Socrates is a mortal
Solution:
𝐻(𝑥): 𝑥 is a man
𝑀 𝑥 : 𝑥 is a mortal
𝑠: Socrates
With these symbolic notations, the problem becomes

∀𝑥 𝐻 𝑥 →𝑀 𝑥 ∧𝐻 𝑠 ⇒𝑀 𝑠
The derivation of the proof is as follows:
Step No. Statement Reason
1 ∀𝑥 (𝐻 𝑥 → 𝑀(𝑥)) 𝑃
2 𝐻 𝑆 → 𝑀(𝑆) 𝑈𝑆 , 2
3 𝐻(𝑆) P
4 𝑀(𝑆) T, 2, 3, Modus Ponen
15. Express each of the following statements using mathematical and logical operations,
predicates and quantifiers, where the universe of discourse consists of all computer science
students/ mathematics courses.
(a) Every computer science students need a course in mathematics
(b) There is a student in this class who owns a personal computer
(c) Every student in this class has taken at least one mathematics course
(d) There is a student in this class who has taken at least one mathematics course
Solution:
(a) Let 𝑀(𝑥) ≡ ′𝑥 needs a course in mathematics’, where the universe of discourse consists of all
computer science students. Then ∀𝑥 𝑀(𝑥)
(b) Let 𝑃 𝑥 ≡′ 𝑥 owns a personal computer’, where the universe consists of all students in this
class, then ∃𝑥 𝑃(𝑥)
(c) Let 𝑄 𝑥, 𝑦 ≡ ′𝑥 has taken 𝑦 ′ , where the universe of 𝑥 consists of all students in this class
and that of 𝑦 consists of all mathematics courses. Then ∀𝑥 ∃𝑦 𝑄 𝑥, 𝑦
(d) Using the same assumptions as in (c), we have ∃𝑥 ∃𝑦 𝑄 𝑥, 𝑦
16. Show that the premises “one student in the class knows how to write programs in JAVA” and
“Everyone who knows how to write programs in JAVA can get a high-paying job” imply the
conclusion “someone in this class can get a high-paying job”.
Solution:
Let 𝐶(𝑥) represent “x is in this class”
𝐽(𝑥) represent “x knowns JAVA Programming”
𝐻(𝑥) represent “x can get a high paying job”
Then the given premises are ∃𝑥 (𝐶(𝑥) ∧ 𝐽(𝑥)) and ∀𝑥 (𝐽 𝑥 → (𝐻(𝑥))). The conclusion is
∃𝑥 𝐶 𝑥 ∧ 𝐻 𝑥
Step No. Statement Reason
1. ∃𝑥 (𝐶(𝑥) ∧ 𝐽(𝑥)) P
2. C(𝑎) ∧ 𝐽 𝑎 ES and 1
3. 𝐶(𝑎) T, 2 and simplification
4. 𝐽(𝑎) T, 2 and simplification
5. ∀𝑥 (𝐽 𝑥 → (𝐻(𝑥))) P
6. 𝐽 𝑎 → 𝐻(𝑎) US and 5
7. 𝐻(𝑎) T, 4 and 6, Modus ponens
8. 𝐶(𝑎) ∧ 𝐻(𝑎) T, 3, 7 and Conjunction
9. ∃𝑥 (𝐶(𝑥) ∧ 𝐻(𝑥)) EG and 8
17. Express the negations of the following statements using quantifiers and English:
(a) If the teacher is absent, then some students do not keep quiet.
(b) All the students keep quiet and the teacher is present
(c) Some of the students do not keep quiet or the teacher is absent
(d) No one has done every problem in the exercise.
Solution:
(a) Let T represent the presence of the teacher and Q(x) represent “x” keeps quiet
Then the given statement ~𝑇 → ∃𝑥 ~𝑄 𝑥 ≡ ~𝑇 → ~∀𝑥 𝑄 𝑥 ≡ 𝑇 ∨ ~∀𝑥 𝑄 𝑥
Negation: ~ 𝑇 ∨ ~∀𝑥 𝑄 𝑥 ≡ ~𝑇 ∧ ∀𝑥 𝑄 𝑥
i.e The teacher is absent and all the students keep quiet.
(b) All the students keep quiet and the teacher is present
∀𝑥 𝑄 𝑥 ∧ 𝑇
The negation is ~ ∀𝑥 𝑄 𝑥 ∧ 𝑇 ≡ ∃𝑥 ~𝑄 𝑥 ∨ ~𝑇
i.e. some of the students do not keep quiet or teacher is absent
(c) Some of the students do not keep quiet or teacher is absent: ∃𝑥 ~𝑄 𝑥 ∨ ~𝑇
Negation :∀𝑥 𝑄 𝑥 ∧ 𝑇 => All the students keep quiet and the teacher is present
(d) No one has done every problem in the exercise.
Let 𝐷(𝑥, 𝑦) represent 𝑥 has done problem 𝑦
The given statement is ~∃𝑥 ∀𝑦 𝐷 𝑥, 𝑦
Negation: ~( ~∃𝑥 ∀𝑦 𝐷 𝑥, 𝑦 ) ≡ ∃𝑥 ∀y D(x, y)
Some one has done every problem in the exercise
Tutorial Problems
1. Prove that 𝐻1 : ~𝑞, 𝐻2 : 𝑝 → 𝑞, 𝐶: ~𝑝
2. Prove that 𝑝 ∨ 𝑞, 𝑝 → 𝑟, 𝑞 → 𝑠 ⇒ 𝑠 ∨ 𝑟 using direct method
3. Prove that 𝑝 → 𝑞, 𝑞 → 𝑟, ~ 𝑝 ∧ 𝑟 , 𝑝 ∨ 𝑟 ⇒ 𝑟 using indirect method
4. Prove the following by using the CP rule 𝑝 ∨ 𝑞 → 𝑟 ⇒ 𝑝 ∧ 𝑞 → 𝑟
5. Prove that ∀𝑥 𝑃 𝑥 → 𝑄 𝑦 ∧ 𝑅 𝑥 , ∃𝑥 𝑃 𝑥 ⇒ 𝑄(𝑦) ∧ ∃𝑥(𝑃(𝑥) ∧ 𝑅(𝑥))
6. Prove the implication ∀𝑥 𝑃 𝑥 → 𝑄 𝑥 , ∀𝑥 𝑅 𝑥 → ~𝑄 𝑥 ⇒ ∀𝑥 𝑅 𝑥 → ~𝑃 𝑥
7. Show that ∀𝑥 𝑃 𝑥 ∨ 𝑄 𝑥 ⇒ ∀𝑥 𝑃 𝑥 ∨ ∃𝑥 𝑄(𝑥) using the indirect method.
8. If A(x): x is animal, B(x): x is black and C(x): x is a cat, translate the following in words:
(a) ∀𝑥 [𝑐 𝑥 → 𝐴(𝑥)] (b) ∃𝑥 𝑐 𝑥 ∧ 𝐵 𝑥

You might also like