Chapter2 Logic-290510 013028
Chapter2 Logic-290510 013028
Chapter2 Logic-290510 013028
Logic (from Classical Greek λόγος logos; meaning word, thought, idea, argument,
account, reason, or principle) is the study of the principles of valid inference and
demonstration.
A statements or proposition is declarative sentence that either true or false, but not both.
b) 2 + 3 = 5.
d) Excuse me please!
e) 3 – x = 5.
Compound propositions can be formed by combining statements with and, or, not,
implies, if and only if and other similar words.
Instead of using words to connect propositions we shall use the following symbols:
Example: Write each of the following statements in terms of p, q and r and logical
connectives.
1 SBMA 3024/NS/Jan 09
a) I dream of home only if I am awake.
d) If I am not awake or I am not work hard, then I will not dream a home.
c) If I have enough money, then I will buy a car and I will buy a house.
2 SBMA 3024/NS/Jan 09
We use the truth tables to show the truth values of the five basic compound propositions.
T is use for TRUE and F is use for FALSE.
Logical Negation
p ¬p
F T
T F
Logical conjunction is an operation on two logical values, typically the values of two
propositions, that produces a value of true if and only if both of its operands are true.
Logical Conjunction
p q p ∧ q
T T T
T F F
F T F
F F F
Logical disjunction is an operation on two logical values, typically the values of two
propositions, that produces a value of false if and only if both of its operands are false.
3 SBMA 3024/NS/Jan 09
The truth table for p OR q (also written as p ∨ q, p || q, or p + q) is as follows:
Logical Disjunction
p q p ∨ q
T T T
T F T
F T T
F F F
Logical implication and the material conditional are both associated with an operation on two
logical values, typically the values of two propositions, that produces a value of false just in the
singular case the first operand is true and the second operand is false.
The truth table associated with the material conditional not p or q (symbolized as p → q) and
the logical implication p implies q is as follows:
Logical Implication
p q p→q
T T T
T F F
F T T
F F T
4 SBMA 3024/NS/Jan 09
Logical equality (also known as biconditional) is an operation on two logical values,
typically the values of two propositions, that produces a value of true if and only if both
operands are false or both operands are true.
Logical Equality
p q p↔ q
T T T
T F F
F T F
F F T
a) ¬( p ∨ q )
b) p ∧ ( p → q )
c) p ↔ (q ∧ p)
( p ∧ ¬q) → ¬( p → q)
( p ∨ q) → r ; (¬p ∧ ¬q ) ∨ r
5 SBMA 3024/NS/Jan 09
A tautology's negation is a contradiction, a propositional formula that is false regardless
of the truth values of its propositional variables. Such. Conversely, a contradiction's
negation is a tautology.
a) p ∧ ¬p
b) (p ∧ q) ↔ (q ∧ p)
c) p ∧ q ∧ r
6 SBMA 3024/NS/Jan 09
Bivalence
≡ F
¬T
¬F ≡ T
Involution ¬¬p ≡ p
∨ p
p ≡ p
Idempotence
p ∧ p ≡ p
p ∧ T ≡ p
Identity
p∨ F ≡ p
Conditional Identity
p→q ≡ ¬ p∨ q
p∧¬p ≡ F
Excluded Middle
p ∨ ¬p ≡ T
p ∧ (p ∨ q) ≡ p
Absorption
p ∨ (p ∧q) ≡ p
p ∨ q ≡ q ∨ p
Commutativity
p ∧ q ≡ q ∧ p
¬(p ∨ q) ≡ ¬p ∧ ¬q
DeMorgan's
¬(p ∧ q) ≡ ¬p ∨ ¬q
p ∨ (q ∨ r) ≡ (p ∨ q) ∨ r
Associativity
p ∧ (q ∧ r) ≡ (p ∧ q) ∧ r
p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
Distributivity
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧r)
p ∨ T ≡ T
*Dominant
p ∧ F ≡ F
a) ( p ∨ q ) ∧ ¬(¬p ∨ q)
b) (a → b) ∧ (a → ¬b)
7 SBMA 3024/NS/Jan 09
Example 2: Prove the following propositions are equivalent
a) { p∨ (p → q) }↔ T
b) { ¬ ¬
[ ( p ∨ q ) ∧ r ] ∨ ¬q } ↔T
( p ∧ ¬q) → ¬( p → q)
Example 2: Show that the following pairs are equivalent by using laws of logic:
a) { ( p ∨ q) → r } ↔ { (¬p ∧ ¬q) ∨ r }
b) ¬ ¬{ [ ( p ∨ q) ∧ r ] ∨ ¬q } ↔{q ∧r }
8 SBMA 3024/NS/Jan 09
They can also be viewed as relations holding between premises and conclusions, whereby
the conclusion is said to be inferable (or derivable or deducible) from the premises.
I. Modus ponens
Modus ponens is a very common rule of inference, and takes the following form:
Modus Tollens is the formal name for indirect proof or proof by contraposition
(contrapositive inference). It can also be referred to as denying the consequent.
Example:
9 SBMA 3024/NS/Jan 09
In logical operator notation:
P or Q
Not P
Therefore, Q _¬
q
Note that the disjunctive syllogism works whether 'or' is considered 'exclusive' or
'inclusive' disjunction. See below for the definitions of these terms.
Here is an example:
Example:
a) If there is a gas in the car, then I will go to the store. If I go to the store, then I will
get a soda. I do not get a soda.
b) I get A’s or I get rich. If I get A’s, my best friend will buy me a present. If I get
rich, I will always give present to my friend. I didn’t get rich.
c) I get A’s or I get rich. If I get A’s, my best friend will buy me a present. If I get
rich, I will always give present to my friend. My friend didn’t buy me a present.
10 SBMA 3024/NS/Jan 09