Chapter 2 Math Logic Lecture On MMW
Chapter 2 Math Logic Lecture On MMW
2.1 LOGIC
It Is a science that deals with the principles and criteria of validity of inference and
demonstration.
It is a method of reasoning that involves a series of statements, each of which must be true if
the statement before it is true.
It is the science of correct reasoning; science which describes relationships among
propositions in terms of implication, contradiction, contrariety, conversion, etc.
It is a science of correct reasoning; science which describes relationships among
propositions in terms of implication, contradiction, contrariety, conversion, etc.
2.2 Some Mathematician who contributed to the development of Logic:
Gottfried Wilhelm Leibniz (1646–1716) was one of the first mathematicians
to make a serious study of symbolic logic. He tried to advance the study of logic
from a merely philosophical subject to a formal mathematical subject. He never
completely achieved this goal; however, several mathematicians, such as
Augustus De Morgan (1806–1871) and George Boole (1815–1864),
contributed to the advancement of symbolic logic as a mathematical discipline.
2.3 PROPOSITION
It is the basic building blocks of logic.
It is a declarative sentence or statement that is either true or false but not both true and
false.
Opinions are avoided in Logic, Mathematics and Science, because they can be true for
some people and false for others.
Commands and questions are not considered propositions
Can be represented by propositional variables such as P, Q, R, S, p, q, r and s.
The Truth Value of a proposition is True (denoted as T) if it is a true statement, and
False (denoted as F) if it is a false statement
2.4 CONNECTIVES
The following connectives are generally used in propositional logic:
Connective Symbolic Form Statement Type of Statement
not ∼p or ⌐p not P negation
and pâq p and q conjunction
or pãq P or q disjunction
If p then q P
If…then p→q conditional
implies q
If and only if p↔q P if and only if biconditional
SIMPLE STATEMENT is a statement that conveys a single idea or simple facts about the world.
Example 1: P: Willy has an expensive yacht.
Q: Today is Monday.
R: Avatar was not selected as best picture at the 82nd Academy Awards
ceremony.
2.6 NEGATION OF A STATEMENT is the exact opposite of a statement; it is false when the
original is true and true when the original is false.
The negation of statement P is denoted by ∼P or ¬ P Example 2:
The following are negation of the above statements P, Q and R:
∼P: Willy does not have an expensive yacht.
∼Q: Today is not Monday
∼R: Avatar was selected as best picture at the 82nd Academy Awards ceremony.
Take Note:
a. The negation of a statement involving <all=, <every= and <none= is a statement
which will involve <There is at least one=.
Example 3: M: All mammals require sleep.
∼M: There is at least one mammal that does not require sleep.
b. The negation of a statement involving <some= will involve some variety of <none=.
Example 4: N: Some children fear the dark.
∼N: No child fears the dark.
Example 5: Identify the following sentences as statements or not statement. Give the negation of each
statement in the second column of the table 2.1
Table 2.1
Table 2.1
Statement If statement, give the negation.
1. The moon is full tonight. The moon is not full tonight.
2. All horses are mammals. At least one horse is not a mammal.
3. Buy me a milk tea. Not a statement, it is a Command.
4. There are 12 kinds of amino acid There are not exactly 12 kinds of amino acid.
5. Fibbonacci was genius. This is an opinion.
(Assuming love is well-defined) No Pirate loves other
6. Some pirates love other pirates.
pirates.
7. Titanic is the world’s largest cruise ship Titanic is not the world’s largest cruise ship.
8. Granite is not a metamorphic rock. Granite is a metamorphic rock.
9. Every day there is much work to be done. There is at least one day that there is not much work to
be done.
10. FPJ was a good actor. This is an opinion.
a. A negation symbol will only apply to the statement which immediately comes after it.
b. Negation of Compound Statement, P 𝖠 Q is ∼ P ã∼ Q
DISJUNCTION
It Is a compound sentence formed by using the word <or= to join two simple sentences.
P or Q is expressed in symbols <P 𝗏 Q=
A disjunction is true if either statement is true or if both statements are true
and the only way that it is false is if both halves are false.
The negation of disjunction P 𝗏 Q is ∼P â ∼Q
Example 9: a. P: The clock is slow.
Q: The time is correct.
P 𝗏 Q: The time is slow, or the time is correct.
c. A: It is cold outside.
B: It is snowing.
A 𝗏 B: It is either cold outside or it is snowing.
1. ¬(𝑝â𝑞) ≡ ¬𝑝 ã ¬𝑞
2. ¬(𝑝ã𝑞) ≡ ¬𝑝 â¬𝑞
From the previous example of conjunction,
∼ (P 𝖠 Q): It is not true that both Today is Friday, and It is not raining.
This statement is also equivalent to:
∼P ã ∼Q: Today is not Friday or It is raining.
From the previous example of disjunction,
∼ (A ã B): It is not the case that it is either cold outside or snowing.
The above statement is equivalent to,
∼A â ∼B: It is not cold outside, and it is not snowing.
~P ã~Q : Kyla does not have a cellphone or Jerome does not have a
laptop computer.
b.) ∼ (P 𝗏 Q) ≡ ∼P 𝖠 ∼Q
∼P 𝖠 ∼Q: Kyla does not have a cellphone and Jerome does not have a
laptop computer.
Example 13b: Express the following P and Q in equivalent negation form.
P: I am rich
Q: I am happy.
∼ (P 𝖠 Q) ≡ ∼P 𝗏 ∼Q
∼ (P 𝗏 Q) ≡ ∼P 𝖠 ∼Q
1. The truth value of a simple statement is either true (T) or false (F).
2. The truth value of a compound statement depends on the truth values of its simple
statements and its connectives.
Example 10: Suppose statement A, B and F are true and statements C, D and E are false. Find the truth
value (true or false) of the ff.
STATEMENTS TRUTH VALUE STATEMENTS TRUTH VALUE
1. A 𝖠 C 6. ∼B 𝖠 D
2. (∼B) 𝗏 (∼F) 7. ∼ (B 𝖠 D)
3. A 𝖠 B 8. (A 𝗏 B) 𝖠 C
4. E 𝗏 F 9. A 𝗏 (B 𝖠 C)
5. (A 𝖠 B) 𝗏 C 10. (E 𝗏 F) 𝖠 ∼D
Given Statement
P Q
T T
T F
F T
F F
Note 1: With two statements P and Q, there are four possibilities: both could be true, both could be false,
one of the statements could be true and the other is false and vice versa.
Note 2: The number of rows of the truth table can be verified by the formula 2n where n is the number
of statements. So, for the above truth table with n = 2 has 22 = 4 rows.
THE TRUTH TABLE OF COMPOUND STATEMENTS
TABLE 2.3
Conjunction Disjunction Negation
P Q P𝖠Q P𝗏Q ∼P ∼P𝖠Q ∼ (P𝖠 Q) ∼ (P 𝗏 Q)
T T T T F F f f
T F F T F F t f
F T F T T T t f
F F F F T F t t
The first two columns of table 2.3, shows the four possibilities for statements P and Q, there are four
possibilities, that both P and Q could be true, both could be false, P could be true and Q is false, or P
could be false and Q is true.
In the third column shows a conjunction P 𝖠 Q, is true only if and only if both P and Q are true, the rest of
the possibilities are false.
In the fourth column shows a disjunction P 𝗏 Q, is true if either statement is true or if both
statements are true and the only way that it is false is if both halves are false.
The negation of P, ∼P is false when the original is true and true when the original is false as shown in
column 5.
The possibilities in columns 6 to 8 can be based on the possibilities in the previous columns and is left as
an exercise.
a. ∼ (∼P 𝗏 Q) 𝗏 Q
b. (P𝖠∼Q) 𝗏 (∼P 𝗏 Q)
Solution:
a. The Truth Table for ∼ (∼P 𝗏 Q) 𝗏 Q is constructed in table 2.4,
Table 2.4
A ∼A ∼∼A
T F T
F T F
Example 13: Show that ∼ (P 𝗏 ∼Q) and ∼ P 𝖠 Q are equivalent statements. Solution: The
statement ∼ (P 𝗏 ∼Q) is shown in table 2.7 and ∼ P 𝖠 Q in table 2.8,
Table 2.7
P Q ∼ (P 𝗏 ∼ Q)
T T F T T F
T F F T T T
F T T F F F
F F F F T T
Table 2.8
P Q ∼p 𝖠 Q
T T F F T
T F F F F
F T T T T
F F T F F
Example 14: Use the truth table to prove that A 𝗏∼ A is a tautology. Solution:
Table2.9 illustrates A 𝗏∼ A.
Table 2.9
A ∼A A 𝗏 ∼A
T F T
F T T
P Q P→Q
T T T
T F F
F T T
F F T
Note: The only way the statement P → Q could be false is if P is true, but Q is false.
Example 17: For each of the following conditional statements, state the hypothesis, the conclusion and
whether the conditional statement is true.
a. If 7 is an even number, then 7 can be divided evenly by 2.
Answer: The hypothesis 7 is an even number, and the conclusion is 7 can be divided evenly by
2. This statement is true because the hypothesis is false.
b. If 7 is a prime number, then 9 is a prime number.
Answer: This conditional statement is not true (false) because the hypothesis is true and the conclusion
is false.
c. If water boils at 100°C, then granite is a metamorphic rock.
Answer: Logically, the statement is true because the two parts are both true. This statement does not say
that granite is a metamorphic rock because water boils at 100°C, only that if the first part is true then the
second part will also be true.
d. If I receive my check tomorrow, then I will pay the ₱1,000.00 that I owe you.
Example 18: Use the truth table to prove that conditional statement P → Q is logically equivalent to ∼P
𝗏 Q.
Solution: Table 2.10 illustrates the answer to this problem.
Solution: The table below shows P → Q ≡ ∼P 𝗏 Q.
Table 2.11
P Q P→Q ∼P ∼P 𝗏 Q
T T T F T
T F F F F
F T T T T
F F T T T
Therefore, P → Q ≡∼P 𝗏 Q.
Example 18: Write each of the following in its equivalent disjunctive form, (∼P 𝗏 Q).
a. If I could play the guitar, then I would join the band.
Answer: I cannot play the guitar, or I would join the band.
b. If Daniel cannot play, then his team will lose. Answer:
Daniel can play, or his team will lose.
c. If I am rich then I am happy.
Transforming Simple Statement into If-then form, then identify the hypothesis and
conclusion.
Example 18a. Good citizens obey rules and regulation.
Answer: If they obey rules and regulations, then they are good citizens.
H: They obey rules and regulations. C:
They are good citizens.
Example 18b: The sum of the measures of complementary angles is 90°.
Answer: If the sum of the measures is 90°, then they are complementary angle.
H: The sum of the measures is 90°. C:
They are complementary angles.
Simple rule for transforming statements which start with <all=,
All Xs are Ys.
If it is an X, then it is a Y.
Example 18c: All squares are rectangle.
If a figure is a square, then it is a rectangle.
Example 18 d: All paintings by Juan Luna are valuable.
T F T
F T F
F F T
LAW OF CONTRAPOSITION
A conditional may always be replaced by its contrapositive without having its truth
value affected.
Example 20: Find the converse, inverse and contrapositive of the given statement.
If you are ten years old, then you cannot legally drive a car.
Answer: Converse: If you cannot legally drive a car, then you are ten years old. (This
statement is false because it is not true in every instance.)
Contrapositive: If you can legally drive a car, then you are not ten years old. (This
statement is true no matter to whom you refer just as the original statement)
Inverse: If you are not ten years old, then you can legally drive a car.
Table 2.12
TRUTH TABLE FOR BICONDITIONAL STATEMENT
P Q P↔Q
T T T
T F F
F T F
F F T
A biconditional statement is defined to be true whenever both parts have the same
truth value.
In the truth table above, p q is true when p and q have the same truth values, (i.e.,
when either both are true, or both are false.)
Equivalent Statements:
P ↔ Q ≡ [ (P → Q) 𝖠 (Q → P)]
Proof: P ↔ Q ≡ [ (P → Q) 𝖠 (Q → P)]
1. P ↔∼ Q 2. ∼R ↔ ∼ P
Solution:
1. She will go on vacation iff she can take the train.
2. She can get a loan iff she will not go on vacation.
a. x + 4 = 7 if and only if x = 3
Solution: Both equations are true when x = 3 and both are false when x ≠ 3. Both equations have the same
truth value for any given value of x, so this is a true statement.
b. x2 = 36 if and only if x = 6.
Solution: If x = -6, the first equation is true and the second equation is false, thus this is a false statement.
It can be solved by using deductive reasoning and a chart that enable us to display the given
information in visual manner.
Example 23: Each of the four neighbors, Sean, Marie, Sarah and Brian has a different occupation
(editor, banker, chef or dentist). From the following clues, determine the occupation of each neighbor.
a. Maria gets home from work after the banker but before the dentist.
b. Sarah, who is the last to get home from work, is not the editor.
c. The dentist and Sarah leave for work at the same time.
d. The banker lives next door to Brian.
Solution:
From clue 1, Maria is not the banker or the dentist. In the chart that follows, write X1 (stands
for ruled out by clue 1) in the Banker and the Dentist columns of Maria’s row,
From clue 2, Sarah is not the editor, so we put X2 (ruled out by clue 2)in the Editor column of
Sarah’s row. We know from clue 1 that the banker is not the last to get home and from clue 2, Sarah is the
last to get home, therefore Sarah is not the banker, then mark X2 is Sarah’s banker column of Sarah’s
row.
From clue 3, Sarah is not the dentist. Write X3 for this condition. There are now Xs for three of the four
occupations in Sarah’s row; therefore, Sarah must be the chef. Place a √ in that box. Since Sarah is the
chef, none of the other three people can be the chef. Write X3 for these conditions. There are now Xs for
the three of the four occupations in Maria’s row; therefore, Maria must be the editor. Insert a √ to indicate
that Maria is the editor and write X3 to indicate that neither Sean nor Brian is the editor.
From clue 4, Brian is not the banker. Write X4 for this condition. Since there are three Xs in the Banker
column, Sean must be the banker. Place a √ in that box. Write X4 in that box. Since there are 3 Xs in the
Dentist column, Brian must be the Dentist. Place a √ in that box.
The final answer: Sean is the banker, Maria is the editor, Sarah is the chef and Brian is
the dentist.
1. Let p: 5 + 3 = 8; q: 15 – 8 = 7
V. How many different truth possibilities are there with three statements A, B and C. List them.
VI. How many truth possibilities are there with a.) 4 statements, b.) 5 statements and c. n
statements
VII. Use truth table to prove that A 𝖠 (B 𝗏 C) ≡ (A 𝖠 B).
VIII.Find the converse, inverse and contrapositive, given the following statements.
If the temperature drops below freezing point, then the rain will turn to snow.
IX. For each of the conditional statements, state the negation, contrapositive and converse.
Negation:
Contrapositive:
Converse:
Negation:the mickey mouse is president and and the moon is not made of green cheese
Contrapositive: if the moon is made of gereen cheese then the michkey mouse is not president
Converse:
i
XI. Use De Morgan’s laws to write the given statement in an equivalent form.
XIII.Write each symbolic statement in words, given the statements p, q, r, s, t and u. p: The
1. 𝑝â~𝑞 2. 𝑟ã𝑠 3. 𝑟 → ~𝑠 4. 𝑝 → 𝑟 5. 𝑠 ↔ ~𝑟
XIV. Brianna, Ryan, Tyler and Ashley were recently elected as the new class officers (president, vice
president, secretary and treasurer) of the sophomore class at Summit College. From the following clues,
determine which position each holds.
a. Ashley is younger than the president but older than the treasurer.
b. Brianna and the secretary are both the same age, and they are the youngest members of the group.
c. Tyler and the secretary are next door neighbors.
XV. There are three people (Alex, Ben and Cody), one of whom is a knight, one a knave, and one a spy.
The knight always tells the truth, the knave always lies, and the spy can either lie or tell the truth. Alex
says: <Cody is a knave.= Ben says: <Alex is a knight.= Cody says: <I am the spy.= Who is the knight,
who the knave, and who the spy?