Lesson 2
Lesson 2
PROPOSITION
A Proposition or a statement or logical sentence is a declarative sentence which is either
true or false.
Propositional Variables
The lower-case letters p, q, r is used to represent propositions
The first proposition has the truth value of "true" and the second "false".
But "Close the door", and "Is it hot outside?" are not propositions.
Also "x is greater than 2", where x is a variable representing a number, is not a
proposition, because unless a specific value is given to x we cannot say whether it is true
or false, nor do we know what x represents.
COMPOUND STATEMENTS
Statements or propositional variables can be combined by means of logical connectives
(operators) to form a single statement called compound statements.
~ Not Negation
∧ And Conjunction
∨ Or Disjunction
T F
F T
2. Conjunction: If p, q are two statements, then "p and q" is a compound statement,
denoted by p ∧ q and referred as the conjunction of p and q. The conjunction of p and q
is true only when both p and q are true. Otherwise, it is false.
Example: Xylee is tall AND slim.
p q p∧q
T T T
T F F
F T F
F F F
3. Disjunction: If p, q are two statements, then "p or q" is a compound statement,
denoted by p ∨ q and referred to as the disjunction of p and q. The disjunction of p and
q is true whenever at least one of the two statements is true, and it is false only when
both p and q are false.
Example: Xylee is beautiful OR wise.
p q p∨q
T T T
T F T
F T T
F F F
4. Implication / if-then (⟶): An implication or conditional p⟶q is the proposition
"if p, then q." It is false if p is true and q is false. The rest cases are true.
Example:
• If this car costs less than $10000, then Xyvier will buy it.
• If a = b and b = c, then a = c.
• If I get money, then I will purchase a computer.
p q p⟶q
T T T
T F F
F T T
F F T
Examples:
p→q
• That Xylee is smart is sufficient for Xylee to be honest.
• “Xylee is honest” if “Xylee is smart”.
q→p
• That Xylee is smart is necessary for Xylee to be honest.
• “Xylee is honest” only if “Xylee is smart”.
p q p⇔q
T T T
T F F
F T F
F F T
DERIVED CONNECTORS
p q AND OR NAND NOR XOR Conditional Bi-conditional
(∧) (∨) (~∧) (~∨) (⊕) (⇒) (⇔)
T T T T F F F T T
T F F T T F T F F
F T F T T F T T F
F F F F T T F T T
AND & NAND Operation
From the table, you can see, for AND operation, the output is True only if both the input
values are true, else the output will be false. The AND operator is denoted by the
symbol (∧).
Whereas the negation of AND operation gives the output result for NAND and is indicated
as (~∧).
XOR Operation
The logical operation exclusive disjunction, also called exclusive or (symbolized XOR,
EOR, EXOR, ⊻ or ⊕, is a type of logical disjunction on two operands that results in a value
of true if exactly one of the operands has a value of true.
p q p⊕q
T T F
T F T
F T T
F F F
Example1: Write the truth table for the following given statement:(p ∨ q) ∧ (~p ⇒ q).
Solution: Given, (p ∨ q) ∧ (~p ⇒ q)
p q p∨q ~p ~p ⇒ q (p ∨ q) ∧ (~p ⇒ q)
T T T F T T
T F T F T T
F T T T T T
F F F T F F
T T F F F F F F
T F T T F T F T
F T T F T F T T
F F F T T F F F
VARIATIONS IN CONDITIONAL STATEMENT
• Contrapositive: The proposition ~q→~p is called contrapositive of p →q.
• Converse: The proposition q→p is called the converse of p →q.
• Inverse: The proposition ~p→~q is called the inverse of p →q.
Example1: Show that p →q and its contrapositive ~q→~p are logically equivalent.
Solution: Construct the truth table for both the propositions:
p q ~p ~q p →q ~q→~p
T T F F T T
T F F T F F
F T T F T T
F F T T T T
Example2: Show that proposition q→p, and ~p→~q is not equivalent to p →q.
Solution: Construct the truth table for all the above propositions:
p q ~p ~q p →q q→p ~p→~q
T T F F T T T
T F F T F T T
F T T F T F F
F F T T T T T
As, the values of p →q in a table is not equal to q→p and ~p→~q as in fig. So, both of
them are not equal to p →q, but they are themselves logically equivalent.
Associative (p ∨ q) ∨ r ≅ p∨ (q ∨ r) (p ∧ q) ∧ r ≅ p ∧ (q ∧ r)
laws
Distributive p ∨ (q ∧ r) ≅ (p ∨ q) ∧ (p ∨ r) p ∧ (q ∨ r) ≅ (p ∧ q) ∨ (p ∧ r)
laws
Involution ¬¬p ≅ p
laws
Complement p ∨ ¬p ≅ T p ∧ ¬p ≅ T
laws
T T F F F T F
T F F T T F T
F T T F T F T
F F T T T F T
The tautology can be described as a compound statement, which always generates the
truth value. The individual part of the statement does not affect the truth value of the
tautology. The tautologies can be easily translated into mathematical expressions from
the ordinary language by using logical symbols.
Example:
My dad gives me 1000 pesos, or my dad will not give me 1000 pesos.
To understand this example, we will take:
p = My dad gives me 1000 pesos
~p = My dad will not give me dad
The logical operator "OR" is used to generate the above two individual statements,
which is indicated with the help of symbol "∨". So, these statements can be written in
the following form: p ∨ ~p
Now we have to determine whether the above two given statements generate a valid
answer.
Case 1: My dad gives me 1000 pesos. Here, the true value is generated by the first
statement, and the false value is generated by the second statement. With the help of
'OR' operator, the given statement is connected. That's why it will generate a truth
statement.
Case 2: My dad will not give me 1000 pesos. Here, the false value is generated by the
first statement, and the true value is generated by the second statement. That's why it
will generate a true statement.
Now we will describe this statement by the truth table, which is described as follows:
p = My dad gives ~p = My dad will not p ∨ ~p (My dad gives me 1000 pesos or
me 1000 pesos give me 1000 pesos My dad will not give me 1000 pesos)
T F T
F T T
Hence, the last column of the above table is true for all the values. That's why we can
say that the given statement is a tautology.
p q p∨q p ⇒ (p ∨ q)
T T T T
T F T T
F T T T
F F F T
With the help of above table, we can see that the truth value of p ⇒ (p ∨ q) is true for
all the individual statements. That's why this statement is a tautology.
A ~A B ~A ∧ B A∨B ~ (A ∨ B) ~A ∧ B ⇒ ~(A ∨ B)
T F T F T F T
T F F F T F T
F T T T T F F
F T F F F T T
With the help of above table, we can see that the truth value of ~A ∧ B ⇒ ~(A ∨ B) is
true for all the individual statements. That's why this statement is a tautology.
T T T F F T T
T F F T F F T
F T T F T T T
F F T T T T T
As the final column contains all T's, so it is a tautology.
CONTRADICTION
A statement that is always false is known as a contradiction.
Example: Show that the statement p ∧∼p is a contradiction.
Solution:
p ∼p p ∧∼p
T F F
F T F
Since, the last column contains all F's, so it's a contradiction.
CONTINGENCY
A statement that can be either true or false depending on the truth values of its
variables is called a contingency.
p q p →q p∧q (p →q)⟶ (p∧q )
T T T T T
T F F F T
F T T F F
F F T F F