BIT1105 2 Math Logic
BIT1105 2 Math Logic
Philemon Bariyo
Copyright 2023 ©, ISBAT University, All rights reserved.
Math Logic
2
Topics
Propositional Logic
Basic logical connectives
Truth Tables
Logical equivalences
Examples of Variables:
p: "The sky is blue."
q: "it is hot outside"
Examples of Connectives:
NOT: "It is not the case that the sky is blue."
AND: "The sky is blue AND it is hot outside."
OR: "Either the sky is blue OR it is hot outside (or
both)."
IF-THEN: "If the sky is blue, then it is hot outside."
IF AND ONLY IF: "The sky is blue if and only if it is
hot outside."
© ISBAT UNIVERSITY – 2023 5/6/2023
Logical connectives
7
Examples
2) q: "2 + 2 = 5."
¬q: "2 + 2 ≠ 5."
3) r: "Today is Friday."
¬r: "Today is not Friday."
© ISBAT UNIVERSITY – 2023 5/6/2023
Truth table for Connective NOT (¬p)
8
Let p represent a proposition that can be either true (T) or false (F). The
¬p column shows the output of applying the NOT connective to the
proposition p.
p ¬p
T F
F T
NOT connective works by negating the truth value of a proposition. It shows
that if p is true, then ¬p is false, and if p is false, then ¬p is true. This is the
basic principle of the NOT connective, and it is a fundamental concept in
propositional logic.
Note: One criticism of the truth table for Connective OR is that it is sometimes
insufficient to represent the nuances of natural language. In some cases, the word
"or" in natural language can indicate an exclusive disjunction.
In an exclusive disjunction only one of the two options can be true.
For example, "You can have either a salad or a sandwich for lunch, but not both."
The exclusive or (xor) of two propositions, p and q, is a logical connective that is
true only when exactly one of the two propositions is true, and false otherwise. The
exclusive or is often symbolized as ⊕. p q p⊕q
F F T
Truth Table
F T T
T F T
T T F
© ISBAT UNIVERSITY – 2023 5/6/2023
Conditional connective (→)
13
p q p↔q
T T T
T F F
F T F
F F T
The statement "p if and only if q" means that p is true if and only if q is true,
which can be broken down into two separate implications: if p is true, then q
must also be true, and if q is true, then p must also be true. Hence;
raining.
The inverse is; if it is not raining, then the home team
Example:
Given that p → q is logically equivalent to ¬p ∨ q, show
that ¬(p → q )is logically equivalent to p ∧ ¬ q
Thank you