GEC14 Lesson04 Logic Handout
GEC14 Lesson04 Logic Handout
o
This lesson contains 8 pages (including this cover page) and this has an activity with 9 problems
with subquestions. Check to see if any of the pages is missing. Enter all requested information on
the top portion of the last page.
The first few pages contains lesson discussion about the topic and towards the end, several exercises
cil
which needs to be answered are provided. Unlike with the examinations, you may use your books,
notes, or any calculator on answering this activity.
Logic
Contents
1 Review of Propositional Logic 2
1.1 Connectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.1 Truth Table of the Connectives . . . . . . . . . . . . . . . . . . . . . . . . . . 2
o
1.2 Important Tautologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
cil
2.1.2 ∀ universal quantifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.3 ∃! for one and only one . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Alternation of Quantifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Negation of Quantifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 Set Operations 4
3.1 Venn Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Properties of Set Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4 Activity Worksheet 7
Lu
Logic
Contents
1.1 Connectives
Connectives Notation in Maths
and ∧
or ∨ ”Inclusive or”
not ¬ Sometimes denoted ∼
implies → if/then; called implication ⇒
if and only if ↔ Called equivalence ⇔
1.1.1 Truth Table of the Connectives
Let P, Q be propositions:
GEC 14 (MMW) Lesson 04 - Page 3 of 8 First Semester 2020 – 2021
o
1.2 Important Tautologies
(P → Q) ↔ (¬P ∨ Q)
(P ↔ Q) ↔ [(P → Q) ∧ (Q → P )]
cil
¬(P ∧ Q) ↔ (¬P ∨ ¬Q)
¬(P ∨ Q) ↔ (¬P ∧ ¬Q) } De Morgan Laws
Less obvious: One connective called the sheffer stroke P|Q (which stands for ”not both P and
Q” or ”P nand Q”) can be used to represent all of ¬, ∧, ∨, →, ↔ since ¬P ↔ P|P and P ∨
Q ↔ (P|P) | (Q|Q).
Recall if P→Q is a given implication, Q→P is called the converse or P→Q. ¬Q → ¬P.
Lu
2 Predicate logic and Quantifiers
Task: Understand enough predicate logic to make sense of quantified statements.
In predicate logic, propositions depend on variable x, y, z, so their truth value may change de-
pending on which values these variables assume: P (x), Q(x, y), R(x, y, z)
o
¬(∀xP (x)) ↔ ∃x¬P (x)
3 Set Operations
Task: Understand how to represent sets by Venn diagrams. Understand set union, intersection,
cil
complement and difference.
Definition: Let A, B be sets. A is a subset of B. If all elements of A are elements of B, i.e.
∀x(x ∈ A → x ∈ B). We denote that A is a subset of B by A ⊆ B
Example: N ⊆ Z
Definition: Let A, B be sets. A is a proper subset of B if A ⊆ B ∧ A 6= B, i.e. A ⊆ B ∧ ∃x ∈
Bs.t.x ∈
/ A.
A proper subset is always a subset, but a subset is not always a proper subset.
Lu
Notation: A ⊂ B
Example: N ⊂ Z since ∃ − 1 ∈ N
NB: ∀A a set ∅ ⊆ A
Recall: B ⊆ C means ∀x(x ∈ B → x ∈ C), but ∅ has no elements so in ∅ ⊆ A the quantifier
∀ operates on a domain with no elements. Clearly, we need to give meaning to ∃ and ∀ on
empty sets.
Boolean Convention
∀ is true on the empty set
∃ is false on the empty set } Consistent with common sense
JA
A B A B
o
AC
cil
A B A B
A∩B A∪B
Lu
A B A B
A\B B\A
JA
GEC 14 (MMW) Lesson 04 - Page 6 of 8 First Semester 2020 – 2021
o
As a result, various properties of set operations become obvious:
• Commutativity
cil
– A∩B =B∩A
– A∪B =B∪A
• Associativity
– (A ∪ B) ∪ C = A ∪ (B ∪ C)
– (A ∩ B) ∩ C = A ∩ (B ∩ C)
• Distributivity
Lu
– A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
– A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ B)
– (A ∩ B)C = AC ∪ B C
– (A ∪ B)C = AC ∩ B C
– (AC )C = A
JA
NB: An involution is a map such that applying it twice gives the identity. Familiar examples:
reflecting across the x-axis, the y-axis, or the origin in the plane.
• Transitivity of Inclusion
– A⊆B∧B ⊆C →A⊆C
– A=B ↔A⊆C ∧B ⊆A
– A 6= B ↔ (A\B) ∪ (B\A) 6= 0
GEC 14 (MMW) Lesson 04 - Page 7 of 8 First Semester 2020 – 2021
4 Activity Worksheet
Mathematics of Language and Symbols
Logic
Name: Signature:
Course: Date:
1. (20 points) Determine whether each of the sentences below is a proposition (P) or not(N).
o
1. All multiples of 3 are odd numbers.
2. x is an integer number.
3. Draw the graph of function f .
cil
4. Seven is less than −7.
5. 5 < 25
6. February 25, 2020 is a holiday.
7. The sum of two prime numbers is even.
8. 33 + 33 + 33 = 34
9. Where do broken hearts go?
10. Every decimal number is a rational number.
Lu
2. (10 points) Let p and q be the propositions ”The teacher is attending a meeting
today.” and ”We do have a class.” respectively. Express each of these compound
propositions as an English sentence.
1. ¬p
2. ¬q → p
JA
3. ¬p ↔ q
4. q ∨ p
5. q → ¬p
GEC 14 (MMW) Lesson 04 - Page 8 of 8 First Semester 2020 – 2021
Watch the YouTube video thru this link for more discussion on Converse, Inverse and Contra-
positive: Converse, Inverse, & Contrapositive - Conditional & Biconditional Statements, Logic,
Geometry
Let p, q and r be the propositions
p : You pass the midterm exam;
q : You do every class activity in the course ; and
r : You pass MMW
Write these propositions in symbols using p, q and r and logical connectives.
o
3. (3 points) You pass MMW, but you do not do every exercises in the class.
4. (3 points) You pass the midterm exam, you do every class activity in the class and you pass
cil
MMW.
5. (3 points) To pass MMW, it is necessary for you to pass the midterm exam
6. (3 points) You pass the midterm exam, but you do not do every class activity in the class,
nevertheless you pass MMW.
Lu
7. (3 points) You do not pass MMW, because you do not pass the midterm exam and you do not
do every class activity.
Inverse:
JA
Contrapositive:
9. (9 points) Ensuring that your products are of good quality implies that you will have a high
amount of sales and profit.
Converse:
Inverse:
Contrapositive: