Propositions
Propositions
Logic
1.1. Proposition
• Any statement which can be said to be either True or False is a proposition.
1
2/17/2023
• For example, “Today is Monday and today is not a holiday”. This compound
proposition can be represented as “p ∧ ¬q” where p: Today is Sunday, q: Today is a
Prepared by: Dr. Adeel Hashmi, MSIT
holiday.
2
2/17/2023
1.4. Implication/Bi-implication
• p→q denotes if p is true then q is true (but if q is true p may or may not be true).
• For example, “If today is Sunday then today is a holiday”. (If today is a holiday then it
may or may not be Sunday as it can be a Saturday or a gazette holiday, etc).
• The proposition on the left is called “hypothesis” and the proposition on the right is
called as “conclusion”.
• For example, “If today is Saturday then tomorrow is Sunday”. (If we know tomorrow
is Sunday then we can also conclude today is Saturday).
3
2/17/2023
• p if and only if q
• p iff q
4
2/17/2023
Answer
• I → (C ∨ ¬F)
i. Q ↔ (R ∧ ¬P)
ii. ¬(R ∨ Q)
Prepared by: Dr. Adeel Hashmi, MSIT
Answer
5
2/17/2023
• Inverse of p→q : ¬p → ¬q
• Contrapositive of p→q : ¬q → ¬p
Answer
T T F F T T T
T F T F F F F
F T F T T T T
F F T T T T T
6
2/17/2023
2.3. Tautologies
• A logical expression is said to be a tautology if it is always true.
• A logical expression is said to be a contradiction if it is always false.
• A logical expression is said to be a contingency if it can be either T or F.
Prepared by: Dr. Adeel Hashmi, MSIT
• The dual of a compound proposition that contains only the logical operators
¬, ∨, and ∧ is the compound proposition obtained by replacing each ∨ by ∧,
each ∧ by ∨, each T by F, and each F by T.
7
2/17/2023
Example
• Show that [(p→q)∧(q→r)]→(p→r) is a tautology by rules of propositions.
Answer
• [(p→q)∧(q→r)]→(p→r)
• [(¬p∨q)∧(¬q∨r)]→(¬p∨r)
• ¬[(¬p∨q)∧(¬q∨r)]∨(¬p∨r)
• [(p∧¬q)∨q]∧[(p∧¬q)∨¬r]∨(¬p∨r)
• [(p∨q)∧(¬q∨q)]∧ [(p∨¬r)∧(¬q∨¬r)]∨(¬p∨r)
• [(p∨q)∧T]∧ [(p∨¬r)∧(¬q∨¬r)]∨(¬p∨r)
• [(p∨q)∧(p∨¬r)∧(¬q∨¬r)]∨(¬p∨r)
• [(p∨q)∨(¬p∨r)]∧[(p∨¬r)∨(¬p∨r)]∧[(¬q∨¬r)∨(¬p∨r)]
• [T∨q∨r]∧[T∨T]∧[¬p∨¬q∨T] ≡ T ∧ T ∧ T ≡ T
Hypothetical Syllogism [(p→q) ∧ (q→r)] → (p→r) If today is Sunday then today is holiday.
If today is holiday then I will watch a movie.
So, if today is Sunday then I will watch a movie.
8
2/17/2023
3.2. Fallacies
Name Representation Example Why
incorrect?
Denying the [(p→q) ∧ ¬p] → ¬q If today is Sunday then today is a holiday. It can be a Saturday
Today is not Sunday. holiday or a gazetted
hypothesis So, today is not a holiday. holiday.
Affirming the [(p→q) ∧ q] → p If today is Sunday then today is a holiday. It can be a Saturday
Today is a holiday. holiday or a gazetted
conclusion
Example-1
• Test the validity of the following argument.
• If two sides of a triangle are equal then the opposite angles are equal.
Answer
• Let p: two sides of a triangle are equal, q: the opposite angles are equal.
9
2/17/2023
Example-2
Determine whether the following arguments are valid or invalid.
• If I read the newspaper in the kitchen, my glasses would be on the kitchen table.
• Let, p: I read the newspaper in the kitchen, q: my glasses would be on the kitchen table.
• This is the fallacy of denying the hypothesis. Hence, the given conclusion is incorrect.
Example-3
Q4. Given that T→(M∨E), S →¬E, T∧S prove M.
Answer
T∧S can be simplified as T, S. So, we get the following facts:
i. T→(M∨E) ii. S →¬E iii. T iv. S
Applying modus ponens on T→(M∨E) and T, we get
Prepared by: Dr. Adeel Hashmi, MSIT
v. M∨E
Applying modus ponens on S →¬E and S, we get
vi. ¬E
Applying disjunctive syllogism on M∨E and ¬E, we get
vii. M
10
2/17/2023
Example-4
Q5. Show that the hypothesis “It is not sunny this afternoon and it is colder than
yesterday”, “We will go swimming only if it is sunny”, “If we do not go swimming then we
will take a canoe trip”, and “If we take a canoe trip then we will be home by sunset” lead to
the conclusion “We will be home be sunset”.
Answer
p: It is sunny this afternoon, q: It is colder than yesterday
11
2/17/2023
Example
• Find CNF and then DNF of [p ∧ (¬q ∧ r)] ∨ ¬r.
• Answer
• (p ∧ ¬q ∧ r) ∨ ¬r
12
2/17/2023
Example
• Obtain PCNF and PDNF for p→(q∧r).
• Answer.
• p→(q∧r) ≡ ¬p∨(q∧r)
≡ [(¬p∧q)∨(¬p∧¬q)] ∨ [(q∧r∧p)∨(q∧r∧¬p)]
≡ [[(¬p∧q)∨(¬p∧¬q)]∧(r∨¬r)] ∨ [(q∧r∧p)∨(q∧r∧¬p)]
≡ (¬p∧q∧r)∨(¬p∧q∧¬r)∨(¬p∧¬q∧r)∨(¬p∧¬q∧¬r) ∨ [(q∧r∧p)∨(q∧r∧¬p)]
13