PropositionalLogic
PropositionalLogic
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 proposition is a collection of declarative statements that has either a truth value "true” or a truth
value "false". A propositional consists of propositional variables and connectives. We denote the
propositional variables by capital letters (A, B, etc). The connectives connect the propositional
variables.
"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
OR (∨)
AND (∧)
A B A∨B
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.
A B A∧B
Negation (¬) − The negation of a proposition A (written as ¬A) is false when A is true and is true when
A is false.
A ¬A
True False
False True
Implication / if-then (→) − An implication A→B is the proposition “if A, then B”. It is false if A is true
and B is false. The rest cases are true.
A B A→B
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.
A B A⇔B
A Tautology is a formula which is always true for every value of its propositional variables.
A B A→B (A → B) ∧ A [( A → B ) ∧ A] → B
Contradictions
A Contradiction is a formula which is always false for every value of its propositional variables.
A B A∨B ¬A ¬B (¬ A) ∧ ( ¬ B) (A ∨ B) ∧ [( ¬ A) ∧ (¬ B)]
A Contingency is a formula which has both some true and some false values for every value of its
propositional variables.
A B A∨B ¬A (A ∨ B) ∧ (¬ A)
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.
Testing by 2nd method (Bi-conditionality)
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.”
Converse − The converse of the conditional statement is computed by interchanging the hypothesis
and the conclusion. If the statement is “If p, then q”, the converse will be “If q, then p”. The converse
of p→q is q→p.
Example − The converse of "If you do your homework, you will not be punished" is "If you will not be
punished, you do your homework”.
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)