2. Propositional Logic
Proposition : Proposition is a statement
which is either true or false but not both. It
is a declarative statement.
It is usually denoted by lower case letters p,
q, r, s, t etc.They are called Boolean variable
or logic variable.
For example :
"Man is Mortal", it returns truth value “TRUE”
"12 + 9 = 3 – 2", it returns truth value “FALSE
3. Compound proposition
A compound proposition is formed by composition of two
or more propositions called components or sub-
propositions.
For example :
1. Rishabh is intelligent and he studies hard.
2. Sky is blue and clouds are white.
Here first statement contain two propositions ‘‘Rishabh is
intelligent’’ and ‘‘he studies hard’’ whereas second
statement contain propositions ‘‘sky is blue’’ and ‘‘clouds
are white’’. As both statements are formed using two
propositions. So they are compound propositions.
4. Compound Propositions
The words or phrases used to form
compound proposition are called logical
connectives.
The following are the logical connectives:
Negation (not) p
Conjunction (and) p q
Disjunction (or) p q
Conditional p q
Biconditional p q
5. 5
Truth tables
Since we need to know the truth value of a
proposition in all possible scenarios, we
consider all the possible combinations of
the propositions which are joined together
by Logical Connectives to form the given
compound proposition. This compilation of
all possible scenarios in a tabular format is
called a truth table.
A truth table is a table that shows the truth
value of a compound proposition for all
possible cases.
6. Propositions and their negations
If p is a proposition then negation of p
is a proposition which is true when p
is false and false when p is true. It is
denoted by ~ p or ¬ p .
Examples
p: It is raining. ∼ p: It is not raining.
p: 3+2=5. ∼ p: 3+2≠5.
Negation
p ∼p
T F
F T
7. 7
Conjunctions
Consider two propositions, p and q
Conjunction (“and”): p Λ q
It is a bright and windy day.
The day has to be both bright and windy.
Example :
p : Ram is healthy.
q : He has blue eyes.
p Λ q : Ram is healthy and he has blue eyes.
Conjunction (“and”)
p q p Λ q
F F F
F T F
T F F
T T T
8. 8
Disjunctions
Consider two propositions, p and q
Disjunction (“or”): p V q
To ride the bus you must have a ticket or hold a
pass.
•One of the two conditions (“have a ticket” or “hold
a pass”) suffices. (Though both could be true.)
Example :
p : Ram will go to Delhi.
q : Ram will go to Calcutta.
p V q : Ram will go to Delhi or Calcutta.
Disjunction (“or”)
p q p V q
F F F
F T T
T F T
T T T
9. Logical equivalence
Two statements are logically equivalent
if and only if they have identical truth
tables.
The simplest example is ∼(∼p) ≡ p.
p ∼p ∼(p)
F T F
T F T
10. Algebra of Propositions
Proposition satisfies various laws which are useful
in simplifying complex expressions.
These laws are listed as :
1. Identity laws :
a. p T ≡ p
˄
b. p F ≡ p
˅
2. Domination laws:
c. p F ≡ F
˄
d. p T ≡ T
˅
3. Idempotent laws :
e. p p
˅ ≡ p
f. p p
˄ ≡ p
11. Algebra of Propositions
4. Commutative laws :
a. p q
˅ ≡ q p
˅
b. p q
˄ ≡ q p
˄
5. Associative laws :
c. (p q) r
˅ ˅ ≡ p (q r)
˅ ˅
d. (p q) r
˄ ˄ ≡ p (q r)
˄ ˄
6. Distributive laws :
e. p (q r) ≡ (p q) (p r)
˅ ˄ ˅ ˄ ˅
f. p (q r) ≡ (p q) (p r)
˄ ˅ ˄ ˅ ˄
7. Absorption laws :
g. p (p q) ≡ p
˅ ˄
h. p (p q) ≡ p
˄ ˅
12. Algebra of Propositions
8. Complement laws :
a. p ~P ≡ T
˅
b. p ~p ≡ F
˄
c. ~T ≡ F
d. ~F ≡ T
8. Involution law :
e. ~(~p) ≡ p
9. De Morgan's laws :
f. ~ (p q) ≡ ~p ~q
˅ ˄
g. ~ (p q) ≡ ~p ~q
˄ ˅
13. 13
Conditional Proposition
If p and q are proposition, the compound proposition
“if p then q” denoted by p → q is called conditional
Proposition.
The proposition p is called antecedent or
hypothesis, and the proposition q is called the
consequent or conclusion.
The only circumstances under which p → q is false
when p is true and q is false.
Example: If tomorrow is Sunday then today is
Saturday
p:Tomorrow is Sunday
q:Today is Saturday
14. 14
Truth table for Conditional Proposition
The connectives if _____ then ca be read as:
p is sufficient for q.
p only if q
p is necessary for q
q if p
p is consequence of q
Conditional
p q p → q
T F F
T T T
F F T
F T T
15. An equivalent for Conditional
Is there an expression that is equivalent to p →
q?
Implication
p q p → q
F F T
F T T
T F F
T T T
p q ∼p
∼p V
q
F F T T
F T T T
T F F F
T T F T
Consider the
proposition
∼p V q
16. 16
Variations on a proposition
Given a proposition p → q, there are other
propositions that can be stated.
◦ Example: If it rains then the crop will grow.
◦ p: It rains
◦ q: The crop will grow
Converse: q → p
◦ Example: If the crop grow, then there has been rain
Contrapositive: ¬q → ¬p
◦ Example: If the crops do not grow, then there has been
no rain.
Inverse: ¬p → ¬q
◦ Example: If it does not rain then the crop will not grow
.
17. 17
Variations on a proposition
A conditional proposition and its converse or inverse are
not logically equivalent.
But a conditional proposition and its contrapositive are
logically equivalent.
~ q → ~ p ≡ p → q
Conditional
p q ~p ~q
~q →
~p
p → q
T T F F T T
T F F T F F
F T T F T T
F F T T T T
18. 18
Biconditional Proposition
If p and q are proposition , then the
compound proposition p if and only if
q ,denoted by p q, is called
biconditional Propositional.
The biconditional proposition p q can
be stated as “ p is necessary and
sufficient condition for q”, “p iff q”.
Example:
1. He swims if and only if the water is warm.
2. Sales of house falls if and only if interest
rate rises.
19. 19
Biconditional Proposition
The truth table of p q is as follows:
It may be noted p q is true when
both p and q are true or both p and q
are false
Biconditional
p q p q
T T T
T F F
F T F
F F T
20. 20
Other derived connectives
NAND: It means negation of conjunction of two
statements .
If p and q are two proposition , the NAND of p
and q is false when both p and q are true
otherwise
It is denoted by p ↑ q
p ↑ q ≡∼(p q)
˄
NAND
p q p ↑ q
T T F
T F T
F T T
F F T
21. 21
Other derived connectives
NOR: It means negation of disjunction of two
statements.
If p and q are two proposition , the NAND of p
and q is true when both p and q are false
otherwise
It is denoted by p ↓ q
p ↓ q ≡∼(p q)
˅
NAND
p q p ↑ q
T T F
T F T
F T T
F F T
22. 22
Other derived connectives
XOR (Exclusive OR): If p and q are two
proposition , the XOR of p and q, denoted by p
⊕ q is true when exactly one of p and q is true.
It is denoted by p ⊕ q
XOR
p q p ⊕ q
T T F
T F T
F T T
F F F
23. Well formed formula
Well formed formula is an expression
which consist of variables, parenthesis ad
connective symbols, braces and square
brackets to avoid the ambiguity.
Logical statements are also represented in
well defined form using parenthesis
according to priority of operations.
24. Well formed formula
To generate well formed formula recursively, following
rules are used :
i. An atomic statement P is a well formed formula.
ii. If P is well formed formula then ~ P is also a well formed.
iii. If P and Q are well formed formulae then (P˅Q), (P˄Q),
(P→Q) and (P↔Q) are also well formed formulae.
iv. A statement consists of variables, parenthesis and
connectives is recursively well formed formula iff it can
be obtained by applying the above three rules.
For example :
1. (P → (P ˅ Q)) is a well formed formula.
2. (P ˄ Q) → (˅ R) is not a well formed formula.
25. Principle of Duality
Two formulas A1 and A2 are said to be
duals of each other if either one can be
obtained from the other by replacing ˄
(AND) by ˅ (OR) and vice versa.
Also if formula contains T(True)
and F(False), then we replace T
by F and vice versa.
Example The dual of (A
− ˄ B ) ˅ C is (A
˅ B) ˄ C
26. Normal Forms
We can convert any proposition in two
normal forms −
Disjunctive Normal Form (DNF)
Conjunctive Normal Form (CNF)
Principal Disjunctive Normal Form
(PDNF)
Principal Conjunctive Normal Form
(PCNF)
27. Disjunctive Normal Form
A compound statement is in conjunctive
normal form if it is obtained by operating OR
among variables (negation of variables
included) connected with ANDs. In terms of
set operations, it is a compound statement
obtained by Union among variables
connected with Intersections.
Examples
p (q r) and p (
∨ ∧ ∨ ~ q r) are in DNF,
∧
but p (q r) is not a DNF.
∧ ∨
28. Method to construct DNF
Construct a truth table for the proposition.
Use the rows of the truth table where the
proposition is True to construct minterms
◦ If the variable is true, use the propositional
variable in the minterm
◦ If a variable is false, use the negation of the
variable in the minterm
Connect the minterms with ’s.
29. 29
Disjunctive normal form (DNF)
p q p q
→
T T T
T F F
F T T
F F T
pq
pq
p
q
pq (pq) (
pq)
(
p
q)
OR
30. Conjunctive Normal Form
A compound statement is in conjunctive
normal form if it is obtained by operating
AND among variables (negation of variables
included) connected with ORs. In terms of set
operations, it is a compound statement
obtained by Intersection among variables
connected with Unions.
Examples
(A B) (A C) (B C D)
∨ ∧ ∨ ∧ ∨ ∨
(P Q) (Q R)
∪ ∩ ∪
31. Tautology
Tautology is defined as a compound
proposition that is always true for all
possible truth values of its propositional
variables and it contains T in last column of
its truth table.
Propositions like,
i. The doctor is either male or female.
ii. Either it is raining or not.
are always true and are tautologies.
33. Tautology
Check whether the given propositions
are contradiction.
1. ∼ (p q) q
˅ ˄
2. p → ( p q)
˅
34. Contradiction :
Contradiction is defined as a compound
proposition that is always false for all
possible truth values of its propositional
variables and it contains F in last column of
its truth table.
Propositions like,
i. x is even and x is odd number.
ii. Tom is good boy and Tom is bad boy.
are always false and are contradiction.
35. Contradiction :
For Example:
p (q ∼p)
˄ ˅
Since the truth value is FALSE for all possible
values, so the proposition is a Contradiction.
p Q ∼p q p
˅∼ p˄(q p)
˅∼
T T F F F
T F F F F
F T T T F
F F T F F
36. Contradiction :
Check whether the given propositions
are contradiction.
1. ∼ (p q) q
˅ ˄
2. p → ( p q)
˅
37. Contingency
A Contingency is a formula which has
both some true and some false values for
every value of its propositional variables.
A proposition that is neither a tautology
nor contradiction is called a contingency.
38. Satisfiability :
A compound statement formula A (P1 ,
P2 , ... Pn ) is said to be satisfiable, if it has
the truth value T for at least one
combination of truth value of P1 , P2 ,.... Pn .
39. Satisfiability :
Example Prove (A B) (¬A) is satisfiable
− ∨ ∧
The truth table is as follows −
As we can see at least one value of (A B) (¬A) is “True” , it is a
∨ ∧
satisfiablity.
40. 40
What is an argument?
A sequence of statements the ends with a
conclusion.
(Not the common language usage of a debate or dispute.)
Structure of an argument
Statement 1 (p1)
Statement 2 (p2)
...
Statement n (pn)
Statement n+1 (conclusion)
premises
or
antecedents
41. 41
Example
Premises
“If you have a current password, you can log
onto the computer network.”
“You have a current password.”
Conclusion
“Therefore, you can log onto the computer
network.”
43. 43
Valid arguments
An argument is valid if and only if it is
impossible for all the premises to be
true and the conclusion to be false.
How do we show that an argument is
valid?
We can use a truth table, or
We can show that (p1 Λ p2 Λ ... Λ pn → pn+1) is
a tautology using some rules of inference.
44. 44
Rules of Inference
The rules of Inference are criteria for
determining the validity of an argument.
Any conclusion which is arrived by
following the rules is called a valid
conclusion, and the argument is called valid
argument.
45. 45
Why use rules of inference?
Constructing a truth table is time consuming!
If we have n propositions, what is the size of the
truth table? 2n
, which means that the table
doubles in size with every proposition.
Two propositions are
involved in an implication,
therefore the truth table
has 22
= 4 rows.
Implication
p q p → q
F F T
F T T
T F F
T T T