Basic Logical Operators
Basic Logical Operators
Basic Logical Operators
Outline
Negations
Conjunctions
Disjunctions
Conditional Statement
Tautologies and Contradictions
Biconditional and Equivalent Statements
Negations
p ~p
T F
F T
Example:
Write the negation of each of the following statements.
p q ~p ~p ꓥ q
T T
T F
F T
F F
Example:
Construct the truth table of the following:
1. ~p ꓥ q
p q ~p ~p ꓥ q
T T F F
T F F F
F T T T
F F T F
Example:
Construct the truth table of the following:
2. ~(p ꓥ q) ꓥ (~r)
p q r pꓥq ~(p ꓥ q) ~r ~(p ꓥ q) ꓥ (~r)
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
Example:
Construct the truth table of the following:
2. ~(p ꓥ q) ꓥ (~r)
p q r pꓥq ~(p ꓥ q) ~r ~(p ꓥ q) ꓥ (~r)
T T T T
T T F T
T F T F
T F F F
F T T F
F T F F
F F T F
F F F F
Example:
Construct the truth table of the following:
2. ~(p ꓥ q) ꓥ (~r)
p q r pꓥq ~(p ꓥ q) ~r ~(p ꓥ q) ꓥ (~r)
T T T T F
T T F T F
T F T F T
T F F F T
F T T F T
F T F F T
F F T F T
F F F F T
Example:
Construct the truth table of the following:
2. ~(p ꓥ q) ꓥ (~r)
p q r pꓥq ~(p ꓥ q) ~r ~(p ꓥ q) ꓥ (~r)
T T T T F F
T T F T F T
T F T F T F
T F F F T T
F T T F T F
F T F F T T
F F T F T F
F F F F T T
Example:
Construct the truth table of the following:
2. ~(p ꓥ q) ꓥ (~r)
p q r pꓥq ~(p ꓥ q) ~r ~(p ꓥ q) ꓥ (~r)
T T T T F F F
T T F T F T F
T F T F T F F
T F F F T T T
F T T F T F F
F T F F T T T
F F T F T F F
F F F F T T T
Tautologies and Contradictions
p ~p p ꓦ ~p
T F T
F T T
Example
:
The proposition p ꓥ ~p is a contradiction as the following table illustrates. The last
column of the table is always false F.
p ~p p Λ ~p
T F F
F T F
Biconditional Statements
• A compound statement formed by connecting two statements with the words “if
and only if” is called a biconditional.
• Symbolically, “p↔q” which is read as “p if and only if q.”
• In this case, the resulting sentence is true whenever the antecedent p as well as
the consequent q have the same truth values and false otherwise.
Biconditional Statements
• A compound statement formed by connecting two statements with the words “if
and only if” is called a biconditional.
• Symbolically, “p↔q” which is read as “p if and only if q.”
• In this case, the resulting sentence is true whenever the antecedent p as well as
the consequent q have the same truth values and false otherwise.
p q p↔q
T T T
T F F
F T F
F F T
Equivalent Statements
Denoted by ≡ are statements whose truth values are either both true or
both false or whenever they have identical truth tables. Hence,
biconditional statements which has a true truth value are called
equivalences.
Example 1
p q p→q ~q ~p ~q → ~p
T T
T F
F T
F F
Example
Prove that p → q is equivalent to ~q → ~p
p q p→q ~q ~p ~q → ~p
T T T
T F F
F T T
F F T
Example
Prove that p → q is equivalent to ~q → ~p
p q p→q ~q ~p ~q → ~p
T T T F
T F F T
F T T F
F F T T
Example
Prove that p → q is equivalent to ~q → ~p
p q p→q ~q ~p ~q → ~p
T T T F F
T F F T F
F T T F T
F F T T T
Example
Prove that p → q is equivalent to ~q → ~p
p q p→q ~q ~p ~q → ~p
T T T F F T
T F F T F F
F T T F T T
F F T T T T
Example
Prove that p → q is equivalent to ~q → ~p
p q p→q ~q ~p ~q → ~p
T T T F F T
T F F T F F
F T T F T T
F F T T T T
Example
Prove that p → q is equivalent to ~q → ~p
p q p→q ~q ~p ~q → ~p
T T T F F T
T F F T F F
F T T F T T
F F T T T T
Therefore, p → q is equivalent to ~q → ~p
Example 2
T T
T F
F T
F F
Example 2
Prove that (p → q) Λ (q → p) is equivalent to p ↔ q
T T T
T F F
F T T
F F T
Example 2
Prove that (p → q) Λ (q → p) is equivalent to p ↔ q
T T T T
T F F T
F T T F
F F T T
Example 2
Prove that (p → q) Λ (q → p) is equivalent to p ↔ q
T T T T T
T F F T F
F T T F F
F F T T T
Example 2
Prove that (p → q) Λ (q → p) is equivalent to p ↔ q
T T T T T T
T F F T F F
F T T F F F
F F T T T T
Example 2
Prove that (p → q) Λ (q → p) is equivalent to p ↔ q
T T T T T T
T F F T F F
F T T F F F
F F T T T T
Example 2
Prove that (p → q) Λ (q → p) is equivalent to p ↔ q
T T T T T T
T F F T F F
F T T F F F
F F T T T T
Therefore, (p → q) Λ (q → p) is equivalent to p ↔ q