0% found this document useful (0 votes)
8 views

Module 6 Mathematical Logic

Uploaded by

AJ Soriano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Module 6 Mathematical Logic

Uploaded by

AJ Soriano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Module 6: Mathematical Logic

Introduction
Logic is the study of the principles of correct reasoning. It helps us to differentiate
correct reasoning from poor reasoning. Logic allows us to determine the validity of
arguments in and out of mathematics. It illustrates the importance of precision and
conciseness of the language of mathematics.
Learning Outcomes
At the end of this module, the students should be able to:
a. Translate English sentences into logical sentences;
b. Create a truth table of a given logical proposition;
c. Identify the given proposition whether it is tautology, contingency, or
contradiction; and
d. Apply artificial intelligence in mathematical logic.

For more information, copy


the link or scan the QR code:
https://www.geeksforgeeks.or
g/proposition-logic/
What is Mathematical Logic?
Logic is the basis of all mathematical reasoning, and of all automated reasoning.
The rules of logic specify the meaning of mathematical statements. These rules help us
understand and reason with statements such as,
∃x such that x ≠a2+b2, where ∈x, a, b ∈ Z.
Which in Simple English means “There exists an integer that is not the sum of two
squares”. Importance of Mathematical Logic The rules of logic give precise meaning to
mathematical statements. These rules are used to distinguish between valid and invalid
mathematical arguments. Apart from its importance in understanding mathematical
reasoning, logic has numerous applications in Computer Science, varying from design of
digital circuits to the construction of computer programs and verification of correctness
of programs.
I. Statement or Proposition
A proposition is the basic building block of logic. It is defined as a declarative
sentence that is either True or False, but not both. 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.

131
For Example,
1. The sun rises in the East and sets in the West.
2. 1 + 1 = 2
3. 'b' is a vowel.
All of the above sentences are propositions, where the first two are Valid(True)
and the third one is Invalid(False). Some sentences that do not have a truth value or may
have more than one truth value are not propositions. For Example,
1. What time is it?
2. Go out and play.
3. x + 1 = 2.
The above sentences are not propositions as the first two do not have a truth value,
and the third one may be true or false. To represent propositions, propositional variables
are used. By Convention, these variables are represented by small alphabets such as p, q,
r, s. The area of logic which deals with propositions is called propositional calculus or
propositional logic. It also includes producing new propositions using existing ones.
Propositions constructed using one or more propositions are called compound
propositions. The propositions are combined together using Logical Connectives or
Logical Operators.

Examples

Statements Explanations
1. San Fernando City is the Capital of La Proposition because it has a truth value
Union. (TRUE).
2. Cielo is beautiful and sexy. Not proposition because it neither true nor
false.
3. Where are you going? Not proposition because it is interrogative.
4. Please give me some water. Not proposition because it is imperative.
5. Mt. Apo is the tallest mountain in the Not Proposition because it neither true nor
Philippines. false.
6. 1+1=2 Proposition because the sentence has a
truth value (TRUE).
7. x>5 if x=3. Proposition because the sentence has a
truth value (FALSE).
Copy the link to see the solution:
https://poe.com/s/u7iZlK2FCVrFxMjnfx3c
Remark: If a proposition is true, then we say its truth value is TRUE, and if a proposition
is false, we say its truth value is FALSE.

132
II. Truth Table
Since we need to know the truth value of a proposition in all possible scenarios,
we consider all the possible combinations of the propositions which are joined together
by Logical Connectives to form the given compound proposition. This compilation of all
possible scenarios in a tabular format is called a truth table.
1. Negation – If p is a proposition, then the negation of p is denoted by ¬p , which
when translated to simple English means- “It is not the case that p ” or simply
“not p ”. The truth value of ¬p is the opposite of the truth value of p . The truth
table of ¬p is,

Truth Table for Negation


𝒑 ¬𝒑
T F
F T
Example, the negation of “It is raining today”, is “It is not the case that is raining
today” or simply “It is not raining today”.
2. Conjunction – For any two propositions p and q , their conjunction is denoted by p
∧ q , which means “p and q ”. The conjunction p ∧ q is True when both p and q are
True, otherwise False. The truth table of p ∧ q is,
Truth Table for Conjunction
p q 𝒑∧𝒒
T T T
T F F
F T F
F F F
Example, the conjunction of the propositions p - “Today is Friday” and q - “It is
raining today”, p ∧ q is “Today is Friday and it is raining today”. This proposition is true
only on rainy Fridays and is false on any other rainy day or on Fridays when it does not
rain.
3. Disjunction – For any two propositions p and q , their disjunction is denoted by p
∨ q , which means “p or q ”. The disjunction p ∨ q is True when either p or q is True,
otherwise False. The truth table of p ∨ q is,
Truth Table for Disjunction
p q 𝑝∨𝑞
T T T
T F T
F T T
F F F
Example, the disjunction of the propositions p - “Today is Friday” and q - “It is
raining today”, p ∨ q is “Today is Friday or it is raining today”. This proposition is true on
any day that is a Friday or a rainy day(including rainy Fridays) and is false on any day
other than Friday when it also does not rain.

133
4. Exclusive Or – For any two propositions p and q , their exclusive or is denoted by p
⊕ q , which means “either p or q but not both”. The exclusive or p ⊕ q is True
when either p or q is True, and False when both are true, or both are false. The
truth table of p ⊕ q is,
Truth Table for Exclusive Or
p q 𝑝⊕𝑞
T T F
T F T
F T T
F F F
Example, The exclusive or of the propositions p - “Today is Friday” and q - “It is
raining today”, p ⊕ q is “Either today is Friday or it is raining today, but not both”. This
proposition is true on any day that is a Friday or a rainy day(not including rainy Fridays)
and is false on any day other than Friday when it does not rain or rainy Fridays.
5. Implication – For any two propositions p and q , the statement “if p then q ” is
called an implication and it is denoted by p → q . In the implication p → q , p is
called the hypothesis or antecedent or premise and q is called
the conclusion or consequence. The implication is p → q is also called
a conditional statement. The implication is false when p is true, and q is false
otherwise it is true. The truth table of p → q is,
Truth Table for Implication
p q 𝑝→𝑞
T T T
T F F
F T T
F F T
Example, “If it is Friday then it is raining today” is a proposition which is of the
form p → q . The above proposition is true if it is not Friday(premise is false) or if it is
Friday and it is raining, and it is false when it is Friday, but it is not raining.
6. Biconditional or Double Implication – For any two propositions p and q , the
statement “p if and only if(iff) q ” is called a biconditional and it is denoted by p ↔
q . The statement p ↔ q is also called a bi implication. p ↔ q has the same truth
value as (p → q)∧(q → p) The implication is true when p and q have same truth
values and is false otherwise. The truth table of p ↔ q is,
Truth Table for Biconditional
p q 𝑝↔𝑞
T T T
T F F
F T F
F F T
Some other common ways of expressing p ↔ q are,
"p is necessary and sufficient for q" " if p then q, and conversely ""p if q"

134
Example, “It is raining today if and only if it is Friday today.” is a proposition which
is of the form p ↔ q . The above proposition is true if it is not Friday and it is not raining
or if it is Friday and it is raining, and it is false when it is not Friday or it is not raining.
Examples
Construct the truth table for each of the following statements.
1. ¬𝑝 ∨ ¬𝑞
p Q ¬𝒑 ¬𝒒 ¬𝒑 ∨ ¬𝒒
T T F F F
T F F T T
F T T F T
F F T T T

Copy the link to see the solution:


https://poe.com/s/IuqytfCKKekZdIQVEbKj
2. (¬𝑝 ∧ 𝑞) ∨ (𝑝 ∧ ¬𝑞)
p q ¬𝒑 ¬𝒒 ¬𝒑 ∧ 𝒒 𝒑 ∧ ¬𝒒 (¬𝒑 ∧ 𝒒) ∨ (𝒑 ∧ ¬𝒒)
T T F F F F F
T F F T F T T
F T T F T F T
F F T T F F F
Copy the link to see the solution:
https://poe.com/s/bhQAfXxdELEKtk2Z1mVu
III. Logical Equivalence
If the truth tables for two statements are identical, then the two statements are said to be
logically equivalent, and we denote this by ⇔ or ≡.
1. Show that ¬(𝑝 ∧ 𝑞) is equivalent to ( ¬𝑝 ∨ ¬ 𝑞).

Copy the link to see the solution:


https://poe.com/s/wYGwrVw8XkoNzWBuqLdE

2. Show that ( 𝑝 ⇒ 𝑞) is equivalent to (¬ 𝑝 ∨ 𝑞).

Copy the link to see the solution:


https://poe.com/s/kgJOS2QI2XE71vm3JOvM
3. Is 𝑟 ∧ (𝑝 ∧ 𝑞) equivalent to (𝑟 ∧ 𝑝) ∨ (𝑟 ∧ 𝑞)?

Copy the link to see the solution:


https://poe.com/s/gpR7pjboEmSXtNZsTqHM

135
IV. Tautologies, Contradictions and Contingencies
For more
A statement is called, information, copy
the link or scan
1. Tautology – A proposition, which is always true, the QR code:
is called a tautology. https://www.geeksforge
2. Contradiction – A proposition, which is always eks.org/mathematical-
false, is called a contradiction. logic-propositional-
3. Contingency – A proposition that is neither a equivalences/?ref=lbp
tautology nor a contradiction is called a
contingency.

Examples
Which of the fallowing forms are tautology, contradiction, or
contingency?
i. 𝑝∨∼𝑝

ii. ∼ 𝑝 ⇒ ∼ 𝑞

iii. 𝑝 ∧∼ 𝑝

iv. [𝑝 ⇒ (𝑞 ∧∼ 𝑞)] ⇒∼ 𝑝

Copy the link to see the solution:


https://poe.com/s/OIS9jJiXMIFHgCAnGbpj

V. Translate the following into logical expressions.


1. You can access the Internet from campus only if you are an Info Tech student or
you are a freshman.

Solution:
Let p be the proposition “You can access the Internet from campus.”
q be the proposition “You are an Info Tech student.”
r be the proposition “You are a freshman.”
Therefore, 𝒑 → (𝒒 ∨ 𝒓).

Copy the link to see the solution:


https://poe.com/s/hHpVJNHCkoQthztLFeBh

136
2. You cannot access the Internet if you are a sophomore unless you are an Info tech
student.

Solution:
Let p be the proposition “You are sophomore.”
q be the proposition “You can access the Internet.”
r be the proposition “You are an Info tech student.”
Therefore, ¬[𝒑 → (¬𝒒)] → 𝒓.

Copy the link to see the solution:


https://poe.com/s/UguxlhHnllrbe0uvDarC

VI. Converse, Inverse and Contrapositive


For every implication or conditional statement, you can construct its converse, inverse
and contrapositive.
Suppose we have the following statements for P and Q.
P: It rains.
Q: They can cancel school.
The implication, converse, inverse, and contrapositive will be written in the
following forms.
Implication: 𝑷 → 𝑸
If it rains, then they can cancel school.
Converse: 𝑸 → 𝑷
If they cancel school then it rains.
Inverse: ¬𝑷 → ¬𝑸
If it does not rain then they do not cancel school.
Contrapositive: ¬𝑸 → ¬𝑷
If they do not cancel school, then it does not rain.

Copy the link to see the solution:


https://poe.com/s/E7I5YmMkfMA0Xygdl80f

137
Assessment Task
I. Determine whether each of the sentences below is a proposition or not.
Explain your answer.
Statements Answers
1. All multiples of 5 are odd numbers.
2. x is a real number.
3. Sketch the graph of f.
4. Five is greater than 4.
5. -1<0
6. The sun is shining.
7. The sum of two prime numbers is even.
8. 3+4=7
9. It rained in Manila on October 30, 1999.
10. x + y >10
11. Is it raining?
12. Come to class!
13. n is a prime number.
14. The moon is made of green cheese.
15. All even numbers are multiples of 2.

II. State whether or not the following are propositions. In case of a proposition,
indicate if it is true or false.
Statements Answers
1. All perfect squares are even numbers.
2. Every decimal number is a rational number.
3. The summation ∑100 𝑖=1 𝑖
4. Either x is divisible by 3 or it is not.
5. If 2x+7=x then x=-7.
6. 12𝑒 𝑥
7. {𝑥: 𝑥 ∈ ℕ}
8. The sum of two real numbers is a real number.
9. The function F
10. The sine function is an odd function.

III. Construct truth table for the following logical formulas. Determine whether
they are tautology, a contradiction, or a contingency.

1. (𝑝 ↔ 𝑞) → (¬𝑝 ↔ 𝑞)

2. (𝑝 ↔ 𝑞) ∨ (¬𝑝 ↔ ¬𝑟)

3. [(𝑝 ∨ ¬𝑞) ∧ ¬𝑟] ∧ ¬(𝑝 ∨ 𝑞)

4. [(𝑝 ∨ 𝑟) ∧ (𝑝 → 𝑠)] ∨ (𝑝 ↔ 𝑞)

138
IV. Show that the following pairs of statements are logically equivalent.

1. (𝑝 ⇒ 𝑞), (∼ 𝑞 ⇒ ~𝑝)

2. [(~𝑝 ∧ ~𝑞) ⇒ ~𝑟], 𝑟 ⇒(𝑞 ∨ 𝑝)

V. Let p, q and r be the propositions.


p: You get a 95 on the final examination.
q: You do every exercise in the class.
r: You get a 95 in MMW.
Write these propositions in symbols using p, q and r logical connectives.
1. You get a 95 in MMW, but you do not do every exercise in the class.

2. You get a 95 on the final examination, you do every exercise in the class, and you
get 95 in MMW.

3. To get a 95 on the final examination, it is necessary for you to get 95 on the final
examination.

4. You get a 95 on the final examination, but you do not do every exercise in the
class, nevertheless you get a 95 in MMW.

5. Getting a 95 on the final examination and doing every exercise in the class is
sufficient for getting a 95 in MMW.

139
VI. State the converse, inverse and contrapositive of the following propositions.
Statements Converse Inverse Contrapositive
1. If you will review
your lessons,
then you will
pass MMW.

2. Faye will attend


the party only if
Joyce will
accompany her.

3. The boat will


sink if it is
overloaded.

4. Ensuring that
your products
are of good
quality implies
you will have a
high amount of
sales and profit.

5. I attend my class
whenever there
is a quiz.

140
References
Auflrann, R.N., Lockwood J.S., Nation, R.D., and Clegg,D.K., 2013 Cengage Learning:
Mathematical

Claude-3-Haiku 1. San Fernando City is the Capital of La Union. Proposition because it


has a truth value (TRUE). 2. Cielo is beautiful and sexy. Not proposition because it
neither true nor false. (n.d.). Poe. https://poe.com/s/u7iZlK2FCVrFxMjnfx3c

Excursions, 14"’ Edition Epp, S.S., 2011 Brooks/Cole, Cengage Learning: Discrete
Mathematics: An

G. (2023, September 14). Propositional Equivalences. Geeks for Geeks.


https://www.geeksforgeeks.org/mathematical-logic-propositional-
equivalences/?ref=lbp
Introduction to Mathematical Reasoning, 1" Edition Reyes.N. Sr., 2018 Rex Book Store,
Inc.: Mathematics in the Modern World

1.1 Logical Operations. (n.d.).


https://www.whitman.edu/mathematics/higher_math_online/section01.01.html

141

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy