Group C(Logic)[1]
Group C(Logic)[1]
(Negation), OR (Disjunction), AND (Conjunction), Exclusive OR(XOR), IMPLICATION (If p then q) and BI-
IMPLICATION (If and only if) and their Truth Tables; Truth value of a proposition, Truth tables of expressions
involving more than one logical connective; Tautology, logical consequence, logical equivalence, contradiction.
Logic is a study of a chain of reasoning and consistency of assumptions. In logic we are not concerned with the
contents of an argument, rather we are concerned only with the form of an argument.
For example, consider the two arguments: (𝑖) All men are mortal. Socrates is a man. Hence, Socrates is mortal;
(𝑖𝑖) All dogs like bones. Diki is a dog. Hence, Diki likes bones.
Greek philosopher, Aristotle (384 – 322 BCE) was the pioneer of logical reasoning. Logical reasoning is used in
many disciplines to provide valid results.
Propositions or Statements: A declarative sentence (or assertion) which is either true or false, but not both, is
called a proposition (or statement). The sentences which are interrogative, exclamatory or imperative in nature
are not propositions. Since a question, a command or order and an exclamation asserts nothing and therefore
they are not propositions. Propositions are denoted by the letters 𝑝, 𝑞, 𝑟 𝑒𝑡𝑐. If the proposition is true we give it
a truth value 𝑇 (or 1) otherwise 𝐹 (or 0). Propositions are the building blocks of our reasoning.
𝑒. 𝑔. , (𝑖) 𝑝: “It is raining today”. This statement is a declared statement and so it is a proposition. It may be true
or false.
(𝑖𝑖) 𝑞: “What is your name?” This statement is an interrogative statement and not declarative in nature as it is
neither true nor false. So, it is not a proposition.
(𝑖𝑖𝑖) 𝑟: “𝑎 + 𝑏 = 3”. This statement is not a proposition since it is not true if 𝑎 = 1, 𝑏 = 4 and it is not false if
𝑎 = 1.5, 𝑏 = 1.5.
(𝑖𝑣) 𝑝: “Kolkata is the capital of West Bengal”. This statement is a proposition because it is a declared statement
which is true.
(𝑣) 𝑞: “Take a cup of tea”. This is a command statement and is not a declarative statement. So, it is not a
proposition.
(𝑣𝑖𝑖) 𝑝: “Oh my God!”. This is an exclamatory statement and so, it is not a proposition.
Generally, there are four types of logic, such as, Informal logic, Formal logic, Symbolic logic and Mathematical
logic.
Propositional Logic: Propositional logic or calculus is a branch of Mathematical logic which studies the logical
relationships between propositions (or statements) taken as a whole and connected via logical connectives
(logical operators).
1
Mathematical logic: Mathematical logic is a part of the basis for the logic used in computer sciences.
Truth value of a proposition: A proposition has two possible values 𝑇𝑟𝑢𝑒 (𝑇) or 𝐹𝑎𝑙𝑠𝑒 (𝐹). This means that if a
proposition is true, then the truth value of that proposition is true, denoted by 𝑇 or 1. If the proposition is false,
the truth value is said to be false, denoted by 𝐹 or 0.
𝑒. 𝑔. Let us consider the following propositions: (𝑖) 𝑝: 3 + 8 = 12. This proposition is false.so, 𝑝 takes the truth
value 𝐹 or 0; (𝑖𝑖) 𝑞: "𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑡𝑟𝑎𝑣𝑒𝑙𝑙𝑒𝑑 𝑏𝑦 𝑎 𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒 𝑖𝑠 𝑡ℎ𝑒 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑜𝑓 𝑖𝑡𝑠 𝑠𝑝𝑒𝑒𝑑 𝑎𝑛𝑑 𝑡𝑖𝑚𝑒". This proposition is
true. So, the truth value of 𝑞 is 𝑇 or 1.
The symbols 𝑝, 𝑞, 𝑟, … 𝑒𝑡𝑐. are also known as propositional variables since they take two different values 𝑇 or 𝐹.
The field of logic that deals with propositions is called propositional logic or propositional calculus.
The propositions which do not contain any logical operators or connectives are called simple propositions. The
mathematical statements constructed by connecting one or more simple propositions with logical operators are
called compound (molecular or complex) propositions.
Truth Table: Truth table is an array on which all possible truth values of compound statements are displayed.
𝑝
𝑇
𝐹
Logical connectives: Simple propositions may be combined or modified in various ways to form new propositions.
Different connectives or operators are used to connect these propositions. The five common Logical Connectives
or Operators are: (𝑖) Logical Conjunction (𝑨𝑵𝑫), (𝑖𝑖) Logical Disjunction – Inclusive 𝑶𝑹 and Exclusive 𝑶𝑹, (𝑖𝑖𝑖)
Logical Negation (𝑵𝑶𝑻), (𝑖𝑣) Logical Implication (𝑪𝒐𝒏𝒅𝒊𝒕𝒊𝒐𝒏𝒂𝒍), (𝑣) Logical Biconditional
(𝑫𝒐𝒖𝒃𝒍𝒆 𝑰𝒎𝒑𝒍𝒊𝒄𝒂𝒕𝒊𝒐𝒏).
Conjunction (logical AND): Let 𝑝 and 𝑞 are two propositions, then the proposition "𝑝 𝑎𝑛𝑑 𝑞" is called conjunction
of 𝑝 and 𝑞. It is denoted by 𝑝 ∧ 𝑞 (read as 𝑝 and 𝑞). The word “but” may be used instead of “and” for a
conjunction in a compound statement.
Truth table
𝑝 𝑞 𝑝∧𝑞
𝑇 𝑇 𝑇
𝑇 𝐹 𝐹
𝐹 𝑇 𝐹
𝐹 𝐹 𝐹
Disjunction (logical OR): Inclusive OR: Let 𝑝 and 𝑞 be two propositions, then the proposition "𝑝 𝑜𝑟 𝑞" is called
disjunction of 𝑝 and 𝑞. It is denoted by 𝑝 ∨ 𝑞 (read as 𝑝 or 𝑞).
2
Then the disjunction of 𝑝 and 𝑞 is 𝑝 ∨ 𝑞: "𝑆ℎ𝑦𝑎𝑚 𝑖𝑠 𝑡𝑎𝑙𝑙 𝑜𝑟 ℎ𝑒 𝑖𝑠 𝑖𝑛𝑡𝑒𝑙𝑙𝑖𝑔𝑒𝑛𝑡".
Truth table
𝑝 𝑞 𝑝∨𝑞
𝑇 𝑇 𝑇
𝑇 𝐹 𝑇
𝐹 𝑇 𝑇
𝐹 𝐹 𝐹
Exclusive OR: Let 𝑝 and 𝑞 be two propositions, then the proposition "𝑝 𝑜𝑟 𝑞" is called exclusive disjunction of 𝑝
and 𝑞 if it is true when exactly one of 𝑝 and 𝑞 are true (𝑇), otherwise it is false. It is denoted by 𝑝⨁𝑞.
Truth table
𝑝 𝑞 𝑝⨁𝑞
𝑇 𝑇 𝐹
𝑇 𝐹 𝑇
𝐹 𝑇 𝑇
𝐹 𝐹 𝐹
Negation (NOT): Given any proposition 𝑝, another proposition formed by writing “It is not the case that” is
denoted by ∼ 𝑝 𝑜𝑟 ¬𝑝 (read as not 𝑝).
𝑒. 𝑔. Let 𝑝: "𝐼𝑡 𝑖𝑠 ℎ𝑜𝑡 𝑡𝑜𝑑𝑎𝑦" be any proposition, then ~𝑝 is "𝐼𝑡 𝑖𝑠 𝑛𝑜𝑡 ℎ𝑜𝑡 𝑡𝑜𝑑𝑎𝑦" or
"𝐼𝑡 𝑖𝑠 𝑛𝑜𝑡 𝑡ℎ𝑒 𝑐𝑎𝑠𝑒 𝑡ℎ𝑎𝑡 𝑡𝑜𝑑𝑎𝑦 𝑖𝑠 ℎ𝑜𝑡".
Truth table
𝑝 ~𝑝
𝑇 𝐹
𝐹 𝑇
For any proposition 𝑝, negation of a negation is the affirmation. So, ~(~𝑝) ≡ 𝑝.
Implication (Conditional): Let 𝑝 and 𝑞 are two propositions, then the proposition "𝑖𝑓 𝑝 𝑡ℎ𝑒𝑛 𝑞" is called
conditional or implication proposition of 𝑝 and 𝑞. It is denoted by 𝑝 → 𝑞 𝑜𝑟 𝑝 ⇒ 𝑞 (read as 𝑝 implies 𝑞). The
statement 𝒑 is called antecedent or premise or hypothesis and the statement 𝒒 is called consequent or
conclution.
𝑒. 𝑔. Let 𝑝: ”𝑅𝑎𝑚 𝑤𝑜𝑟𝑘𝑠 ℎ𝑎𝑟𝑑" , 𝑞: ”𝑅𝑎𝑚 𝑐𝑜𝑚𝑒𝑠 𝑓𝑖𝑟𝑠𝑡 𝑖𝑛 𝐸𝑥𝑎𝑚𝑖𝑛𝑎𝑡𝑖𝑜𝑛” be two propositions.
Then the implication of 𝑝 and 𝑞 is 𝑝 → 𝑞: "𝐼𝑓 𝑅𝑎𝑚 𝑤𝑜𝑟𝑘𝑠 ℎ𝑎𝑟𝑑 𝑡ℎ𝑒𝑛 ℎ𝑒 𝑐𝑜𝑚𝑒𝑠 𝑓𝑖𝑟𝑠𝑡 𝑖𝑛 𝐸𝑥𝑎𝑚𝑖𝑛𝑎𝑡𝑖𝑜𝑛".
Truth table
Then the biconditional of 𝑝 and 𝑞 is 𝑝 ↔ 𝑞: "𝐵𝑖𝑟𝑑𝑠 𝑓𝑙𝑦 𝑖𝑓 𝑎𝑛𝑑 𝑜𝑛𝑙𝑦 𝑖𝑓 𝑡ℎ𝑒 𝑠𝑘𝑦 𝑖𝑠 𝑐𝑙𝑒𝑎𝑟".
Note: 𝒑 ↔ 𝒒 is (𝒑 → 𝒒) ∧ (𝒒 → 𝒑)
Truth table
𝑝 𝑞 𝑝↔𝑞
𝑇 𝑇 𝑇
𝑇 𝐹 𝐹
𝐹 𝑇 𝐹
𝐹 𝐹 𝑇
Converse, Inverse and Contrapositive: Given an if-then statement “if 𝑝 then 𝑞”, we can create three related
statements: (𝑖) Converse (𝑞 → 𝑝), (𝑖𝑖) Inverse (~𝑝 → ~𝑞), (𝑖𝑖𝑖) Contrapositive (~𝑞 → ~𝑝).
Truth table for Converse Truth table for Inverse Truth table for Contrapositive
𝑝 𝑞 𝑞→𝑝 𝑝 𝑞 ~𝑝 → ~𝑞 𝑝 𝑞 ~𝑞 → ~𝑝
𝑇 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝐹 𝑇 𝑇 𝐹 𝑇 𝑇 𝐹 𝐹
𝐹 𝑇 𝐹 𝐹 𝑇 𝐹 𝐹 𝑇 𝑇
𝐹 𝐹 𝑇 𝐹 𝐹 𝑇 𝐹 𝐹 𝑇
Note: The inverse and converse of a conditional statement are logically equivalent to each other.
𝑒. 𝑔. Given any conditional statement 𝑝 → 𝑞, the three related statement can be written as follows:
Here, 𝑝: If 𝑥 is positive, 𝑞: 𝑥 ≠ 0.
𝑝 𝑞 ~𝑝 ~𝑝 ∧ 𝑞 ~(~𝑝 ∧ 𝑞)
𝑇 𝑇 𝐹 𝐹 𝑇
𝑇 𝐹 𝐹 𝐹 𝑇
𝐹 𝑇 𝑇 𝑇 𝐹
𝐹 𝐹 𝑇 𝐹 𝑇
4
𝑝 𝑞 𝑟 ~𝑞 𝑝 ∧ (∼ 𝑞) 𝑝 ∧ (∼ 𝑞) ∨ 𝑟 𝑝 ∧ (∼ 𝑞) ∨ 𝑟 → 𝑝
𝑇 𝑇 𝑇 𝐹 𝐹 𝑇 𝑇
𝑇 𝑇 𝐹 𝐹 𝐹 𝐹 𝑇
𝑇 𝐹 𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝐹 𝐹 𝑇 𝑇 𝑇 𝑇
𝐹 𝑇 𝑇 𝐹 𝐹 𝑇 𝐹
𝐹 𝑇 𝐹 𝐹 𝐹 𝐹 𝑇
𝐹 𝐹 𝑇 𝑇 𝐹 𝑇 𝐹
𝐹 𝐹 𝐹 𝑇 𝐹 𝐹 𝑇
Note: The number of rows in a truth table of a propositional statement is 2 , where 𝑛 is the number of variables
𝑛
Principal of Duality: The dual of a compound proposition that contains the logical operators ∨, ∧ and 𝑇, 𝐹 is the
proposition obtained by replacing each ∨ by ∧, each ∧ by ∨, each 𝑇 by 𝐹 and each 𝐹 by 𝑇. The dual of the
proposition 𝑃 is denoted by 𝑃∗ 𝑒. 𝑔. The dual of ∼ 𝑝 ∧ 𝑞 is ∼ 𝑝 ∨ 𝑞.
Precedence rule of logical operators: While calculating the truth value of compound propositions involving more
than one logical operator, the rule of operator precedence is used. This is the ordering of logical operators
named as “the rule of precedence”. This rule is applied to the formula of propositions that has no parenthesis.
The order of precedence is shown in the following table:
Operator Precedence
∼ 1
∧ 2
∨ 3
→ 4
↔ 5
𝑒. 𝑔. Find the truth value of 𝑝 → 𝑞 ∧∼ 𝑟 ↔ 𝑟 ∨ 𝑞.
Truth table
𝑝 𝑞 𝑟 ∼𝑟 𝑞 ∧ (∼ 𝑟) 𝑟 ∨ 𝑞 𝑝 → (𝑞 ∧ (∼ 𝑟)) 𝑝 → (𝑞 ∧ (∼ 𝑟)) ↔ (𝑟 ∨ 𝑞)
𝑇 𝑇 𝑇 𝐹 𝐹 𝑇 𝐹 𝐹
𝑇 𝑇 𝐹 𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝐹 𝑇 𝐹 𝐹 𝑇 𝐹 𝐹
𝑇 𝐹 𝐹 𝑇 𝐹 𝐹 𝐹 𝑇
𝐹 𝑇 𝑇 𝐹 𝐹 𝑇 𝑇 𝑇
𝐹 𝑇 𝐹 𝑇 𝑇 𝑇 𝑇 𝑇
𝐹 𝐹 𝑇 𝐹 𝐹 𝑇 𝑇 𝑇
𝐹 𝐹 𝐹 𝑇 𝐹 𝐹 𝑇 𝐹
Example. 1. Let 𝑝: “Today is Sunday” and 𝑞: “It is hot” be two propositions. Write the sentences which describe
the compound propositions (𝑖) 𝑞 ∧∼ 𝑝; (𝑖𝑖) ∼ (𝑝 ∨ 𝑞); (𝑖𝑖𝑖) 𝑝 ∨ 𝑞.
5
Example. 2. Find a propositional formula that represents the following propositions: “If I win the lottery or pass
the examination, then I am happy”.
Solution: Let us consider the proposition 𝑝: I win the lottery; 𝑞: I pass the examination; 𝑟: I am happy
Example. 3. Let 𝑝: “He is intelligent” and 𝑞: “He is fat” be two propositions. Write each of the following
statements in logical form using the simple propositions 𝑝 and 𝑞.
(𝑖) He is fat but not intelligent; (𝑖𝑖) He is neither fat nor intelligent; (𝑖𝑖𝑖) He is intelligent or he is fat; (𝑖𝑣) It is
not true that he is intelligent or he is fat; (𝑣) It is not true that he is neither fat nor intelligent; (𝑣𝑖) If he is
intelligent then he is fat.
Example. 4. Let 𝑝: “I get a Bachelor’s degree in Science”, 𝑞: “I get a job” and 𝑟: “I go to USA” be three
propositions. Write each of the following statements corresponding to the following compound propositions in
logical form (using the simple propositions 𝑝, 𝑞 and 𝑟).
Solution: (𝑖) If I do not get a job then I go to USA and get a Bachelor’s degree in Science; (𝑖𝑖) I get a Bachelor’s
degree in Science or I get a job if and only if I go to USA; (𝑖𝑖𝑖) If I get a Bachelor’s degree in Science and I do
not get a job then I do not go to USA.
Example. 5. What is symbolic logic? Write the following statements using symbolic logic: If the barometer falls,
then either it will rain or it will snow.
Solution: The use of symbols to denote propositions, terms and relations in order to assists reasoning is called
Symbolic logic. It is a way to represent logical expressions by using symbols and variables in place of natural
language, such as English or any other language, in order to remove vagueness in concept.
Example. 6. Write down the negation of the statements for each of the following: (𝑖) No one wants to buy my
bag; (𝑖𝑖) Every even integer greater than 2 is not prime; (𝑖𝑖𝑖) Some people have no ideas; (𝑖𝑣) He swims if and
only if the water is warm; (𝑣) Kolkata is a city; (𝑣𝑖) Every odd integer is divisible by 3.
Solution: (𝑖) Someone wants to buy my bag; (𝑖𝑖) Some even integer greater than 2 is not prime; (𝑖𝑖𝑖) All people
have ideas; (𝑖𝑣) He swims and the water is not warm or the water is warm and he does not swim; (𝑣) Kolkata is
not a city; (𝑣𝑖) Some odd integer is divisible by 3.
Example. 7. If 𝑝 is true and 𝑞 is false, then find the truth value of (𝑝 ∧ 𝑞) → (𝑝 ∨ 𝑞).
6
Example. 8. Construct the truth table for each of the following compound propositions:
(𝑖) (𝑝 → 𝑞) → (𝑞 → 𝑝); (𝑖𝑖) (𝑝 → 𝑞) ↔ (~𝑞 → ~𝑝); (𝑖𝑖𝑖) ~(𝑝 ∨∼ 𝑞) → ~𝑝; (𝑖𝑣) ((~𝑝 → 𝑞) ∧ (𝑟 → 𝑞)) ↔ (~𝑞 ∨ 𝑟)
𝑝 𝑞 𝑝→𝑞 𝑞→𝑝 (𝑝 → 𝑞) → (𝑞 → 𝑝)
𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝐹 𝐹 𝑇 𝑇
𝐹 𝑇 𝑇 𝐹 𝐹
𝐹 𝐹 𝑇 𝑇 𝑇
(𝑖𝑖) Truth table for (𝑝 → 𝑞) ↔ (~𝑞 → ~𝑝)
𝑝 𝑞 ~𝑝 ~𝑞 𝑝 ∨∼ 𝑞 ∼ (𝑝 ∨∼ 𝑞) ~(𝑝 ∨∼ 𝑞) → ~𝑝
𝑇 𝑇 𝐹 𝐹 𝑇 𝐹 𝑇
𝑇 𝐹 𝐹 𝑇 𝑇 𝐹 𝑇
𝐹 𝑇 𝑇 𝐹 𝐹 𝑇 𝑇
𝐹 𝐹 𝑇 𝑇 𝑇 𝐹 𝑇
(𝑖𝑣) Truth table for ((~𝑝 → 𝑞) ∧ (𝑟 → 𝑞)) ↔ (~𝑞 ∨ 𝑟)
Example. 10. Construct the truth table for each of the following compound propositions:
(𝑖) (𝑝 → (𝑞 → 𝑟)) → ((𝑝 → 𝑞) → (𝑝 → 𝑟)); (𝑖𝑖) ((𝑝 ∧ 𝑞) ∨∼ 𝑟 ↔ 𝑝); (𝑖𝑖𝑖) (𝑝 ↔ 𝑞) ∨ (∼ 𝑞 ↔ 𝑟).
7
𝑝 𝑞 𝑟 𝑝→𝑞 𝑝→𝑟 𝑞→𝑟 𝑝 → (𝑞 → 𝑟) ≡ 𝑎 (𝑝 → 𝑞) → (𝑝 → 𝑟) ≡ 𝑏 𝑎→𝑏
𝑇 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝑇 𝐹 𝑇 𝐹 𝐹 𝐹 𝐹 𝑇
𝑇 𝐹 𝑇 𝐹 𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝐹 𝐹 𝐹 𝐹 𝑇 𝑇 𝑇 𝑇
𝐹 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇
𝐹 𝑇 𝐹 𝑇 𝑇 𝐹 𝑇 𝑇 𝑇
𝐹 𝐹 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇
𝐹 𝐹 𝐹 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇
(𝑖𝑖) Truth table for ((𝑝 ∧ 𝑞) ∨∼ 𝑟 ↔ 𝑝)
𝑝 𝑞 𝑟 ~𝑟 𝑝 ∧ 𝑞 (𝑝 ∧ 𝑞) ∼ 𝑟 ((𝑝 ∧ 𝑞) ∨∼ 𝑟 ↔ 𝑝)
𝑇 𝑇 𝑇 𝐹 𝑇 𝑇 𝑇
𝑇 𝑇 𝐹 𝑇 𝑇 𝑇 𝑇
𝑇 𝐹 𝑇 𝐹 𝐹 𝐹 𝐹
𝑇 𝐹 𝐹 𝑇 𝐹 𝑇 𝑇
𝐹 𝑇 𝑇 𝐹 𝐹 𝐹 𝑇
𝐹 𝑇 𝐹 𝑇 𝐹 𝑇 𝐹
𝐹 𝐹 𝑇 𝐹 𝐹 𝐹 𝑇
𝐹 𝐹 𝐹 𝑇 𝐹 𝑇 𝐹
(𝐼𝐼𝐼) Truth table for (𝑝 ↔ 𝑞) ∨ (∼ 𝑞 ↔ 𝑟) is
𝑝 𝑞 𝑟 ~𝑞 𝑝↔𝑞 ~𝑞 ↔ 𝑟 (𝑝 ↔ 𝑞) ∨ (∼ 𝑞 ↔ 𝑟)
𝑇 𝑇 𝑇 𝐹 𝑇 𝐹 𝑇
𝑇 𝑇 𝐹 𝐹 𝑇 𝑇 𝑇
𝑇 𝐹 𝑇 𝑇 𝐹 𝑇 𝑇
𝑇 𝐹 𝐹 𝑇 𝐹 𝐹 𝐹
𝐹 𝑇 𝑇 𝐹 𝐹 𝐹 𝐹
𝐹 𝑇 𝐹 𝐹 𝐹 𝑇 𝑇
𝐹 𝐹 𝑇 𝑇 𝑇 𝑇 𝑇
𝐹 𝐹 𝐹 𝑇 𝑇 𝐹 𝑇
Example. 11. The inverse of the statement formula (~𝑟 → 𝑠) is
Solution: The inverse of (~𝑟 → 𝑠) is ~(~𝑟) → ~𝑠 ≡ 𝑟 → ~𝑠. Hence, option (𝑖) is correct.
Example. 12. Write the converse, inverse and contrapositive of the following statements: (𝑖) If it is raining, then I
will take coffee; (𝑖𝑖) If it rains, there is cloud in the sky.
Solution: (𝑖) Let us consider the statements - 𝑝: It is raining, 𝑞: I will take coffee.
The inverse of the statement is (~𝑝 → ~𝑞): If it is not raining, then I will not take coffee.
The contrapositive of the statement is (~𝑞 → ~𝑝): If I do not take coffee, then it is not raining.
(𝑖𝑖) Let us consider the statements - 𝑝: It rains, 𝑞: There is cloud in the sky.
The converse of the statement is (𝑞 → 𝑝): If there is cloud in the sky, then it rains.
The inverse of the statement is (~𝑝 → ~𝑞): If it does not rain, then there is no cloud in the sky.
8
The contrapositive of the statement is (~𝑞 → ~𝑝): If there is no cloud in the sky, then it does not rain.
Example. 13. Let 𝑝 be a proposition “He is strong” and 𝑞 be a proposition “He is short”. Then the symbolic form
of the statement “He is strong and short” is
Solution: (𝑖𝑖𝑖) 𝑝 ∧ 𝑞.
Example. 17. Let 𝑝 and 𝑞 be the propositions “She is beautiful” and “She is fair” respectively. Then the sentence
“It is false that she is beautiful and she is not fair” is
Example. 18. The negation of the statement “No one wants to buy my apartment” is
(𝑎) all want to buy my apartment (𝑏) someone wants to buy my apartment
(𝑐) everyone wants to buy my apartment (𝑑) none of these.
Solution: (𝑎) ∼ 𝑝 ∧∼ 𝑞.
Example. 20. ∼ (∼ 𝑝 ∨∼ 𝑞) ≡
Solution: (𝑐) 𝑝 ∧ 𝑞.
9
(𝑎) 𝑝 (𝑏) ∼ 𝑝 (𝑐) Tautology (𝑑) Contradiction.
Solution: (𝑎) 𝑝.
Example. 22. 𝑝 ∨ (𝑝 ∧ 𝑞) ≡
Solution: (𝑎) 𝑝.
Example. 23. If the truth value of 𝑝 and 𝑞 are 𝑇 and 𝐹 respectively then the truth value of ∼ 𝑝 → ~𝑞 is
Solution: (𝑏) 𝑇.
Example. 24. 𝑝 → 𝑞 ≡
Solution: (𝑐) ∼ 𝑝 ∨ 𝑞 .
Example. 25. If the truth value of 𝑝 and 𝑞 are 𝐹 and 𝐹 respectively then the truth value of 𝑝 → ~𝑞 is
Solution: (𝑎) 𝐹.
Example. 26. If the truth value of 𝑝 and 𝑞 are 𝐹 and 𝑇 respectively then the truth value of 𝑝 ↔ 𝑞 is
Solution: (𝑏) 𝐹.
Solution: (𝑐) 𝑞 → 𝑝 .
Example. 28. If 𝑓(𝑝, 𝑞) = ~𝑝 ∧∼ 𝑞 then the truth value of 𝑓 for the truth value 𝑝 = 𝑇, 𝑞 = 𝐹 is
Solution: (𝑎) 𝐹.
10
Solution: (𝑐) 𝑝 → ~𝑞.
Solution: (𝑐) 𝑞 → 𝑝.
Example. 32. “If 𝑋 then 𝑌 unless 𝑍” is represented by which of the following formulas in propositional logic?
Solution: (𝑎) (𝑋 ∧∼ 𝑍) → 𝑌.
(𝑎) (𝑖) only (𝑏) (𝑖) and (𝑖𝑣) only (𝑐) (𝑖𝑖) only (𝑑) (𝑖𝑖) and (𝑖𝑖𝑖) only.
Solution: (𝑑) 𝑞.
Solution: (𝑎) 𝑇.
Tautology: Tautology is a propositional statement form in which all the substitution instances must be true.
Hence, a propositional statement 𝑃 = 𝑓(𝑝, 𝑞, 𝑟, … ) is known to be a tautology if it is true for every truth
assignment for 𝑝, 𝑞, 𝑟, …. This means that in the truth table of the formula every entry in the last column will be
True (𝑇). 𝑒. 𝑔., Consider the propositional statement 𝑓(𝑝, 𝑞) = 𝑝 → (𝑝 ∨ 𝑞).
𝑝 𝑞 𝑝∨𝑞 𝑝 → (𝑝 ∨ 𝑞)
𝑇 𝑇 𝑇 𝑇
𝑇 𝐹 𝑇 𝑇
𝐹 𝑇 𝑇 𝑇
𝐹 𝐹 𝐹 𝑇
So, 𝑓(𝑝, 𝑞) = 𝑝 → ∨ 𝑞) is a tautology.
(𝑝
11
Contradictions: Contradiction is a propositional statement form all of whose substitution instances are false.
Hence, a propositional formula 𝑃 = 𝑓(𝑝, 𝑞, 𝑟, … ) is known to be a contradiction or self-contradictory, if it is False
for every truth assignment for 𝑝, 𝑞, 𝑟, …. This means that in the truth table of the formula every entry in the last
column will be False (𝐹). 𝑒. 𝑔., Consider the propositional statement 𝑓(𝑝, 𝑞) = (𝑝 ∧ 𝑞) ∧∼ (𝑝 ∨ 𝑞) .
Logical Equivalence: Two compound propositions 𝑃 = 𝑓1 (𝑝, 𝑞, 𝑟, … ) and 𝑄 = 𝑓2 (𝑝, 𝑞, 𝑟, … ) are said to be logically
equivalent or simply equivalent, if they have identical truth values, 𝑣𝑖𝑧. if the truth value of 𝑃 is equal to the
truth value of 𝑄 for every one of the 2𝑛 possible sets of truth values assigned for 𝑝, 𝑞, 𝑟, … This equivalence is
denoted by 𝑃 ≡ 𝑄 (read as 𝑃 is equivalent to 𝑄). 𝑒. 𝑔., Consider the propositional statements 𝑝 → 𝑞 and ∼ 𝑝 ∨ 𝑞.
𝑝 𝑞 𝑝→𝑞 𝑝 𝑞 ~𝑝 ∼𝑝∨𝑞
𝑇 𝑇 𝑇 𝑇 𝑇 𝐹 𝑇
𝑇 𝐹 𝐹 𝑇 𝐹 𝐹 𝐹
𝐹 𝑇 𝑇 𝐹 𝑇 𝑇 𝑇
𝐹 𝐹 𝑇 𝐹 𝐹 𝑇 𝑇
We find that the final columns in the truth tables of the statements 𝑝 → 𝑞 and ∼ 𝑝 ∨ 𝑞 are identical. Hence,
𝑝 → 𝑞 ≡∼ 𝑝 ∨ 𝑞.
Example. 37. Using truth table verify the distributive law: 𝑝 ∧ (𝑞 ∨ 𝑟) = (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟).
𝑝 𝑞 𝑟 𝑞∨𝑟 𝑝 ∧ (𝑞 ∨ 𝑟)
𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝑇 𝐹 𝑇 𝑇
𝑇 𝐹 𝑇 𝑇 𝑇
𝑇 𝐹 𝐹 𝐹 𝐹
𝐹 𝑇 𝑇 𝑇 𝐹
𝐹 𝑇 𝐹 𝑇 𝐹
𝐹 𝐹 𝑇 𝑇 𝐹
𝐹 𝐹 𝐹 𝐹 𝐹
12
Truth table for (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟) is
𝑝 𝑞 𝑟 𝑝∧𝑞 𝑝∧𝑟 (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟)
𝑇 𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝑇 𝐹 𝑇 𝐹 𝑇
𝑇 𝐹 𝑇 𝐹 𝑇 𝑇
𝑇 𝐹 𝐹 𝐹 𝐹 𝐹
𝐹 𝑇 𝑇 𝐹 𝐹 𝐹
𝐹 𝑇 𝐹 𝐹 𝐹 𝐹
𝐹 𝐹 𝑇 𝐹 𝐹 𝐹
𝐹 𝐹 𝐹 𝐹 𝐹 𝐹
Example. 38. Determine which of the following compound propositions are tautologies and which of them are
contradictions using truth tables: (𝑖) ∼ 𝑝 → (𝑝 → 𝑞); (𝑖𝑖) (𝑝 ∨ 𝑞) ∧ (∼ 𝑝 ∧∼ 𝑞); (𝑖𝑖𝑖) ∼ (𝑞 → 𝑟) ∧ 𝑟 ∧ (𝑝 → 𝑞).
From the truth table we find that the compound proposition for ∼ 𝑝 → (𝑝 → 𝑞) assumes only the truth values
𝑇. So, it is a tautology.
𝑝 𝑞 ~𝑝 ∼𝑞 𝑝∨𝑞 (∼ 𝑝 ∧∼ 𝑞) (𝑝 ∨ 𝑞) ∧ (∼ 𝑝 ∧∼ 𝑞)
𝑇 𝑇 𝐹 𝐹 𝑇 𝐹 𝐹
𝑇 𝐹 𝐹 𝑇 𝑇 𝐹 𝐹
𝐹 𝑇 𝑇 𝐹 𝑇 𝐹 𝐹
𝐹 𝐹 𝑇 𝑇 𝐹 𝑇 𝐹
From the truth table we find that the compound proposition for (𝑝 ∨ 𝑞) ∧ (∼ 𝑝 ∧∼ 𝑞) assumes only the truth
values 𝐹. So, it is a contradiction.
𝑝 𝑞 𝑟 𝑝 → 𝑞 𝑞 → 𝑟 ∼ (𝑞 → 𝑟) ∼ (𝑞 → 𝑟) ∧ 𝑟 ∼ (𝑞 → 𝑟) ∧ 𝑟 ∧ (𝑝 → 𝑞)
𝑇 𝑇 𝑇 𝑇 𝑇 𝐹 𝐹 𝐹
𝑇 𝑇 𝐹 𝑇 𝐹 𝑇 𝐹 𝐹
𝑇 𝐹 𝑇 𝐹 𝑇 𝐹 𝐹 𝐹
𝑇 𝐹 𝐹 𝐹 𝑇 𝐹 𝐹 𝐹
𝐹 𝑇 𝑇 𝑇 𝑇 𝐹 𝐹 𝐹
𝐹 𝑇 𝐹 𝑇 𝐹 𝑇 𝐹 𝐹
𝐹 𝐹 𝑇 𝑇 𝑇 𝐹 𝐹 𝐹
𝐹 𝐹 𝐹 𝑇 𝑇 𝐹 𝐹 𝐹
From the truth table we find that the compound proposition for ∼ (𝑞 → 𝑟) ∧ 𝑟 ∧ (𝑝 → 𝑞) assumes only the
truth values 𝐹. So, it is a contradiction.
Example. 39. Which one of the following well-formed formulas is not a tautology: (𝑖) 𝑝 ∨∼ 𝑝; (𝑖𝑖) 𝑝 ∨∼ (∼ 𝑝);
(𝑖𝑖𝑖) ∼ (𝑝 → 𝑝); (𝑖𝑣) 𝑞 → 𝑝 ∨ 𝑞.
13
Solution: (𝑖𝑖𝑖) ∼ (𝑝 → 𝑝) ≡∼ (∼ 𝑝 ∨ 𝑝) ≡∼ (𝑇) (𝐶𝑜𝑚𝑝𝑙𝑒𝑚𝑒𝑛𝑡 𝑙𝑎𝑤) ≡ 𝐹 is a contradiction.
From the truth table we find that the compound proposition for 𝑝 → (𝑞 → (𝑝 ∧ 𝑞)assumes only the truth values
𝑇. So, it is a tautology.
Example. 41. Show that the compound proposition (𝑝 → 𝑞) → (𝑝 ∧ 𝑞) is contingency using truth table.
𝑝 𝑞 𝑝→𝑞 𝑝∧𝑞 (𝑝 → 𝑞) → (𝑝 ∧ 𝑞)
𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝐹 𝐹 𝐹 𝑇
𝐹 𝑇 𝑇 𝐹 𝐹
𝐹 𝐹 𝑇 𝐹 𝐹
From the truth table we find that the compound proposition (𝑝 → 𝑞) → (𝑝 ∧ 𝑞) is a contingency, since the truth
table assumes true (𝑇) and false (𝐹) both depending on the truth values of the variables.
𝑝 𝑞 𝑟 𝑞∨𝑟 𝑝 → (𝑞 ∨ 𝑟)
𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝑇 𝐹 𝑇 𝑇
𝑇 𝐹 𝑇 𝑇 𝑇
𝑇 𝐹 𝐹 𝐹 𝐹
𝐹 𝑇 𝑇 𝑇 𝑇
𝐹 𝑇 𝐹 𝑇 𝑇
𝐹 𝐹 𝑇 𝑇 𝑇
𝐹 𝐹 𝐹 𝐹 𝑇
Truth table for (𝑝 → 𝑞) ∨ (𝑝 → 𝑟) is
𝑝 𝑞 𝑟 𝑝→𝑞 𝑝→𝑟 (𝑝 → 𝑞) ∨ (𝑝 → 𝑟)
𝑇 𝑇 𝑇 𝑇 𝑇 𝑇
𝑇 𝑇 𝐹 𝑇 𝐹 𝑇
𝑇 𝐹 𝑇 𝐹 𝑇 𝑇
𝑇 𝐹 𝐹 𝐹 𝐹 𝐹
𝐹 𝑇 𝑇 𝑇 𝑇 𝑇
𝐹 𝑇 𝐹 𝑇 𝑇 𝑇
𝐹 𝐹 𝑇 𝑇 𝑇 𝑇
𝐹 𝐹 𝐹 𝑇 𝑇 𝑇
Since the truth tables of 𝑝 → ∨ 𝑟) and
(𝑞 (𝑝 → 𝑞) ∨ (𝑝 → 𝑟) are identical, so, 𝑝 → (𝑞 ∨ 𝑟) ≡ (𝑝 → 𝑞) ∨ (𝑝 → 𝑟).
15