Module 3
Propositional Logic
Prepositional Logic – Definition
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.
Some examples of Propositions are given below −
- "Man is Mortal", it returns truth value “TRUE”
- "12 + 9 = 3 – 2", it returns truth value “FALSE”
In propositional logic generally we use five connectives which are −
- OR (∨∨)
- AND (∧∧)
- Negation/ NOT (¬¬)
- Implication / if-then (→→)
- If and only if (⇔⇔).
OR (∨) − The OR operation of two propositions A and B (written as A∨BA∨B) is true if at least any of the propositional variable A or B is true.
The truth table is as follows −
A | B | A ∨ B |
True | True | True |
True | False | True |
False | True | True |
False | False | False |
AND (∧) − The AND operation of two propositions A and B (written as A∧BA∧B) is true if both the propositional variable A and B is true.
The truth table is as follows −
A | B | A ∧ B |
True | True | True |
True | False | False |
False | True | False |
False | False | False |
Negation (¬) − The negation of a proposition A (written as ¬A¬A) is false when A is true and is true when A is false.
The truth table is as follows −
A | ~ A |
True | False |
False | True |
Implication / if-then (→→) − An implication A→BA→B is the proposition “if A, then B”. It is false if A is true and B is false. The rest cases are true.
The truth table is as follows −
A | B | A → B |
True | True | True |
True | False | False |
False | True | True |
False | False | True |
If and only if (⇔⇔) − A⇔BA⇔B is bi-conditional logical connective which is true when p and q are same, i.e. both are false or both are true.
The truth table is as follows −
A | B | A ⇔ B |
True | True | True |
True | False | False |
False | True | False |
False | False | True |
3.3.1 Tautologies
A Tautology is a formula which is always true for every value of its propositional variables.
Example − Prove [(A→B)∧A]→B[(A→B)∧A]→B is a tautology
The truth table is as follows −
A | B | A → B | (A → B) ∧ A | [( A → B ) ∧ A] → B |
True | True | True | True | True |
True | False | False | False | True |
False | True | True | False | True |
False | False | True | False | True |
As we can see every value of [(A→B)∧A]→B[(A→B)∧A]→B is "True", it is a tautology.
3.3.2 Contradictions
A Contradiction is a formula which is always false for every value of its propositional variables.
Example − Prove (A ∨ B) ∧ [(~ A) ∧ (~ B)]is a contradiction
The truth table is as follows −
A | B | A ∨ B | ~ A | ~ B | (~A) ∧ ( ~B) | (A ∨ B) ∧ [(~ A) ∧ (~ B)] |
True | True | True | False | False | False | False |
True | False | True | False | True | False | False |
False | True | True | True | False | False | False |
False | False | False | True | True | True | False |
As we can see every value of (A∨B)∧[(~A)∧(~B)](A∨B)∧[(~A)∧(~B)] is “False”, it is a contradiction.
3.3.3 Contingency
A Contingency is a formula which has both some true and some false values for every value of its propositional variables.
Example − Prove (A∨B)∧(~A)(A∨B)∧(~A) a contingency
The truth table is as follows −
A | B | A ∨ B | ~ A | (A ∨ B) ∧ (~ A) |
True | True | True | False | False |
True | False | True | False | False |
False | True | True | True | True |
False | False | False | True | False |
As we can see every value of (A∨B)∧(~A)(A∨B)∧(~A) has both “True” and “False”, it is a contingency.
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.
- The bi-conditional statement X⇔YX⇔Y is a tautology.
Example − Prove (A∨B)and [(~ A) ∧ (~ B)] are equivalent
Testing by 1st method (Matching truth table)
A | B | A ∨ B | ~ (A ∨ B) | ~ A | ~B | [(~ A) ∧ (~ B)] |
True | True | True | False | False | False | False |
True | False | True | False | False | True | False |
False | True | True | False | True | False | False |
False | False | False | True | True | True | True |
Here, we can see the truth values of ~(A∨B) and [(~A) ∧(~B)]~(A∨B)and[(~A)∧(~B)] are same, hence the statements are equivalent.
Testing by 2nd method (Bi-conditionality)
A | B | ~ (A ∨ B) | [(~ A) ∧ (~ B)] | [~ (A ∨ B)] ⇔ [(~ A ) ∧ (~ B)] |
True | True | False | False | True |
True | False | False | False | True |
False | True | False | False | True |
False | False | True | True | True |
As [¬(A∨B)] ⇔[(¬A) ∧(¬B)][¬(A∨B)]⇔[(¬A)∧(¬B)] is a tautology, the statements are equivalent.
Inverse, Converse, and Contra-positive
Implication / if-then (→) (→) is also called a conditional statement. It has two parts −
- Hypothesis, p
- Conclusion, q
As mentioned earlier, it is denoted as p→qp→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 p→q is ~p→~ q ~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→qp→q is q→p 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”.
Contra-positive − The contra-positive of the conditional is computed by interchanging the hypothesis and the conclusion of the inverse statement. If the statement is “If p, then q”, the contra-positive will be “If not q, then not p”. The contra-positive of p→q p→q is ¬q→~p~q→~p.
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 states that for any true statement, the dual statement obtained by interchanging unions into intersections 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.
Example − The dual of (A∩B)∪C(A∩B)∪C is (A∪B)∩C(A∪B)∩C
Normal Forms
We can convert any proposition in two normal forms −
- Conjunctive normal form
- Disjunctive normal form
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)(A∨B)∧(A∨C)∧(B∨C∨D)
- (P∪Q)∩(Q∪R)(P∪Q)∩(Q∪R)
Disjunctive Normal Form
A compound statement is in disjunctive 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
- (A∧B) ∨(A∧C) ∨(B∧C∧D) (A∧B) ∨(A∧C) ∨(B∧C∧D)
A predicate is an expression of one or more variables defined on some specific domain. A predicate with variables can be made a proposition by either assigning a value to the variable or by quantifying the variable.
The following are some examples of predicates −
- Let E(x, y) denote "x = y"
- Let X(a, b, c) denote "a + b + c = 0"
- Let M(x, y) denote "x is married to y"
Quantifiers provide a notation that allows us to quantify (count) how many objects in the universe of discourse satisfy the given predicate.
• Universal Quantifier ∀ - For all elements
• Existential Quantifier ∃ - There exists an element De Morgan’s Law for Quantifiers
• ¬∀xP(x) ≡ ∃x¬P(x)
• ¬∃xP(x) ≡ ∀x¬P(x)
Let P(x) be the statement “x spends more than five hours every weekday in class,” where the domain for x consists of all students. Express each of these quantifications in English.
a) ∃xP(x) There exists a student who spends more than five hours every weekday in class.
b) ∀xP(x) Every student spends more than five hours every weekday in class.
c) ∃x¬P(x) There exists a student who does not spend more than five hours every weekday in class.
d) ∀x¬P(x) No student spends more than five hours every weekday in class.
Write the following English sentences in symbolic form-
- If it rains, then I will stay at home.
Solution: We have-
- The given sentence is- “If it rains, then I will stay at home.”
- This sentence is of the form- “If p then q”.
So, the symbolic form is p → q where-
p : It rains
q : I will stay at home
2. If a = b and b = c then a = c.
Solution: We have-
- The given sentence is- “If a = b and b = c then a = c.”
- This sentence is of the form- “If p then q”.
So, the symbolic form is (p ∧ q) → r where-
p : a = b
q : b = c
r : a = c
3. Either today is Sunday or Monday.
Solution : We have-
- The given sentence is- “Either today is Sunday or Monday.”
- It can be re-written as- “Today is Sunday or Monday.”
So, the symbolic form is p ∨ q where-
p : Today is Sunday
q : Today is Monday
Q. Identify which of the following statements are propositions-
4.France is a country.
5.2020 will be a leap year.
6. Sun rises in the west.
Solution : 4.Proposition (True)
5. Proposition (True)
6. Proposition (False)