Discrete Mathematics - Propositional Logic, Rules of Inference, Predicate Logic
Discrete Mathematics - Propositional Logic, Rules of Inference, Predicate Logic
The rules of mathematical logic specify methods of reasoning mathematical statements. Greek
philosopher, Aristotle, was the pioneer of logical reasoning. Logical reasoning provides the
theoretical base for many areas of mathematics and consequently computer science. It has
many practical applications in computer science like design of computing machines, artificial
intelligence, definition of data structures for programming languages etc.
Propositional Logic is concerned with statements to which the truth values, “true” and
“false”, can be assigned. The purpose is to analyze these statements either individually or in a
composite manner.
"A is less than 2". It is because unless we give a specific value of A, we cannot say
whether the statement is true or false.
Connectives
In propositional logic generally we use five connectives which are −
OR (∨)
AND (∧)
AND (∧ ) − The AND operation of two propositions A and B (written as A ∧ B) is true if both
the propositional variable A and B is true.
If and only if (⇔) − A ⇔ B is bi-conditional logical connective which is true when p and q
are same, i.e. both are false or both are true.
Tautologies
A Tautology is a formula which is always true for every value of its propositional variables.
Contradictions
A Contradiction is a formula which is always false for every value of its propositional variables.
Contingency
A Contingency is a formula which has both some true and some false values for every value of
its propositional variables.
As we can see every value of (A ∨ B) ∧ (¬A) has both “True” and “False”, it is a contingency.
Propositional Equivalences
Two statements X and Y are logically equivalent if any of the following two conditions hold −
The truth tables of each statement have the same truth values.
Here, we can see the truth values of ¬(A ∨ B)and[(¬A) ∧ (¬B)] are same, hence the
statements are equivalent.
Hypothesis, p
Conclusion, q
Example of Conditional Statement − “If you do your homework, you will not be punished.”
Here, "you do your homework" is the hypothesis, p, and "you will not be punished" is the
conclusion, q.
Inverse − An inverse of the conditional statement is the negation of both the hypothesis and
the conclusion. If the statement is “If p, then q”, the inverse will be “If not p, then not q”.
Thus the inverse of p → q is ¬p → ¬q.
Example − The inverse of “If you do your homework, you will not be punished” is “If you do
not do your homework, you will be punished.”
Example − The Contra-positive of " If you do your homework, you will not be punished” is "If
you are punished, you did not do your homework”.
Duality Principle
Duality principle states that for any true statement, the dual statement obtained by
interchanging unions into intersections (and vice versa) and interchanging Universal set into
Null set (and vice versa) is also true. If dual of any statement is the statement itself, it is said
self-dual statement.
Normal Forms
We can convert any proposition in two normal forms −
Examples
(A ∨ B) ∧ (A ∨ C ) ∧ (B ∨ C ∨ D)
(P ∪ Q) ∩ (Q ∪ R)
Examples
(A ∧ B) ∨ (A ∧ C ) ∨ (B ∧ C ∧ D)
(P ∩ Q) ∪ (Q ∩ R)
Discrete Mathematics - Rules of Inference
To deduce new statements from the statements whose truth that we already know, Rules of
Inference are used.
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.
Addition
If P is a premise, we can use Addition rule to derive P ∨ Q.
∴ P ∨ Q
Example
Therefore − "Either he studies very hard Or he is a very bad student." Here Q is the
proposition “he is a very bad student”.
Conjunction
If P and Q are two premises, we can use Conjunction rule to derive P ∧ Q.
∴ P ∧ Q
Example
Therefore − "He studies very hard and he is the best boy in the class"
Simplification
If P ∧ Q is a premise, we can use Simplification rule to derive P.
P ∧ Q
∴ P
Example
"He studies very hard and he is the best boy in the class", P ∧ Q
Modus Ponens
If P and P → Q are two premises, we can use Modus Ponens to derive Q.
P → Q
∴ Q
Example
Modus Tollens
If P → Q and ¬Q are two premises, we can use Modus Tollens to derive ¬P .
P → Q
¬Q
∴ ¬P
Example
"If you have a password, then you can log on to facebook", P → Q
Disjunctive Syllogism
If ¬P and P ∨ Q are two premises, we can use Disjunctive Syllogism to derive Q.
¬P
P ∨ Q
∴ Q
Example
Hypothetical Syllogism
If P → Q and Q → R are two premises, we can use Hypothetical Syllogism to derive
P → R
P → Q
Q → R
∴ P → R
Example
Constructive Dilemma
If (P → Q) ∧ (R → S) and P ∨ R are two premises, we can use constructive dilemma to
derive Q ∨ S .
(P → Q) ∧ (R → S )
P ∨ R
∴ Q ∨ S
Example
Destructive Dilemma
If (P → Q) ∧ (R → S) and ¬Q ∨ ¬S are two premises, we can use destructive dilemma to
derive ¬P ∨ ¬R .
(P → Q) ∧ (R → S )
¬Q ∨ ¬S
∴ ¬P ∨ ¬R
Example
Predicate Logic deals with predicates, which are propositions containing variables.
Quantifiers
The variable of predicates is quantified by quantifiers. There are two types of quantifier in
predicate logic − Universal Quantifier and Existential Quantifier.
Universal Quantifier
Universal quantifier states that the statements within its scope are true for every value of the
specific variable. It is denoted by the symbol ∀.
Existential Quantifier
Existential quantifier states that the statements within its scope are true for some values of
the specific variable. It is denoted by the symbol ∃.
Example − "Some people are dishonest" can be transformed into the propositional form
∃xP (x) where P(x) is the predicate which denotes x is dishonest and the universe of
Nested Quantifiers
If we use a quantifier that appears within the scope of another quantifier, it is called nested
quantifier.
Example