0% found this document useful (0 votes)
27 views45 pages

5 - Logic

Uploaded by

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

5 - Logic

Uploaded by

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

Chapter 2:

Logic
Bart L. Acero Jr.

GEC 104 – Mathematics in the Modern World


Logic
Logic is a science of the necessary laws
of thought, without which no employment of the
understanding and the reason takes place.

-Immanuel Kant (1785)

GEC 104 – Mathematics in the Modern World


Applications of Logic
● Lawyers in making arguments and judgment
● Referees in sports in deciding a call in a
situation of a match
● Engineers in designing computers
● Mathematicians to solve problems and make
proof

GEC 104 – Mathematics in the Modern World


Logic Statements
and Quantifiers

GEC 104 – Mathematics in the Modern World


Statement
A statement, sometimes called a proposition, is a
declarative sentence that is either true or false,
but not both true and false.

GEC 104 – Mathematics in the Modern World


Determining Statements
Example:
1. Batangas is a province of the Philippines
2. People with ages from 21 to 59 years old cannot be
infected by COVID- 19 virus.
3. x + 1 = 5
4. Open the door
5. What is your mother’s name?
6. This is a false statement.
GEC 104 – Mathematics in the Modern World
Simple vs Compound Statement
● A simple statement is a statement that
conveys a single idea.
● A compound statement is a statement that
conveys two or more ideas.
● By connecting simple statements with
connectives creates a compound statement.

GEC 104 – Mathematics in the Modern World


Simple vs Compound Statement
Example:
1. I will play Mobile Legend Simple
2. I will go to school Simple
3. I will play Mobile Legend or I will go to school. Compound
4. I will play Mobile Legend and I will go to school.Compound

GEC 104 – Mathematics in the Modern World


Conventions in Logic
● Statements are usually represented by lower-case letter
such as p, q, r, and s.
● Connectives are represented as follows.
○ “and” – ∧
○ “or” – ∨
○ “if-then” – →
○ “if and only if” – ↔
○ “negation or not” – ~

GEC 104 – Mathematics in the Modern World


Negation
● Let p be a statement. The negation of p, denoted by ~p,
(read as “not p ”) is a statement that is false if p is true,
and it is true if p is false.
● Double negation, denoted as ~(~p) is the original
statement itself. In symbols, ~(~p) = p

GEC 104 – Mathematics in the Modern World


Negation Examples
Statement Negation
Rachel is a Blue Badge Rachel is not a Blue Badge
umpire in table tennis. umpire in table tennis.
The color of the roof is The color of the roof is not
green. green.
x≥4 x<4

GEC 104 – Mathematics in the Modern World


Translating Statements to Symbols
p: I will play tennis. q: I will go to school. r: I will not do my
assignment.
Statement Symbols
I will play tennis or go to school. p∨q
I will go to school and I will not play tennis. q ∧ ~p
If I will go to school then I will do my q → ~r
assignment
I will play table tennis if and only if I will not go p ↔ ~q
to school.

GEC 104 – Mathematics in the Modern World


Types of Compound Statements
A compound statement can be classified based on
connective used.
Statement Connective Symbolic form Type
p or q or p∨q Disjunction
p and q and p∧q Conjunction
If p then q if then p→q Conditional
p if and only if q if and only if p↔q Biconditional
not p not ~p Negation

GEC 104 – Mathematics in the Modern World


Remark
In some cases, the word “but” generally means the same as
“and”, and the phrase “neither A nor B” is translated as
”not A and not B”.

GEC 104 – Mathematics in the Modern World


Compound Statements and Grouping Symbols
Here are the rules in groupings:
● In symbolic form, the parentheses are used to indicate the simple
statements that are being grouped together.
● In sentence form, a comma is used to indicate which simple statements
are group together. That is, statements of the same side a comma are
group together.
Example

~p ∧ q -> Not p and q.

~(p ∧ q) -> Negation of the whole compound statement

GEC 104 – Mathematics in the Modern World


Remark
In translating compound statement in symbolic form to an
English sentence, the simple statements inside the
parentheses in the symbolic form will all be on the same
side of the comma that appears in the English sentence.

GEC 104 – Mathematics in the Modern World


Grouping Symbols Example
Let p, q, and r represent the following statements.
p : John’s playing style is the same as Lebron’s.
q : Hazel has straight hair.
r : John is a basketball player.
● (p ∧ q) → r
○ If John’s playing style is the same as Lebron’s and Hazel has
straight hair, then John is a basketball player.
● If John is not a basketball player or Hazel has a straight hair, then John’s
playing style is not the same as Lebron’s.
○ (~r ∨ q) → ~p

GEC 104 – Mathematics in the Modern World


Quantifiers
Existential Quantifiers
● Denoted by ∃, these are used as prefixes to assert the existence of
something. These include the word some, and the phrases there exists
and at least one.

Universal Quantifiers
● Denoted by ∀, these are used as prefixes to assert that every element of
a given set satisfies some conditions or to deny the existence of
something. These include the words all, every, none, and no.

GEC 104 – Mathematics in the Modern World


Examples
Determine which quantifier is used in the following
statements:
● Some coffee shops are open. Existential
● All players are nice people. Universal
● There exists an integer n such that 3n ≥ 120. Existential
● No even integers are divisible by 3 . Universal

GEC 104 – Mathematics in the Modern World


Negation of Quantifiers
Consider a statement regarding opening of a Coffee Shop.
Statement Negation
All X are Y Some X are not Y
No X are Y Some X are Y
Some X are Y No X are Y
Some X are not Y All X are Y

GEC 104 – Mathematics in the Modern World


Truth Value
The truth value of a simple statement is either true (T) or
false (F). The truth value of a compound statement
depends on the truth values of its simple statements and
its connectives.
Example:
Statement: The National hero of the Philippines is Dr.
Jose Rizal.
Truth Value: TRUE
GEC 104 – Mathematics in the Modern World
Truth Table
A truth table is a table that shows the truth value of a
compound statement for all possible truth values of its
simple statements.

GEC 104 – Mathematics in the Modern World


Negation
Consider the statement “It rains today.”

p ~p
T F
F T

GEC 104 – Mathematics in the Modern World


Conjunctions
Consider the statement “I will give you a chocolate and
a candy”
p q p∧
If at least one statement is false then the
q
conjunction is false, else true.
T T T
T F F
F T F
F F F
GEC 104 – Mathematics in the Modern World
Disjunctions
Consider the statement “I will give you a chocolate or a
candy”
p q p∨
If at least one statement is true then the
q
disjunction is true, else false.
T T T
T F T
F T T
F F F
GEC 104 – Mathematics in the Modern World
Example
Determine whether the statement is true or false.
● 3≥4 False
● Six is an even number and 3 is an odd number. True
● Eight is less than 5 or 2 is an even number. True
● The blackboard is black and it has white lines. False
● The blackboard is black or it has black lines. False

GEC 104 – Mathematics in the Modern World


Conditional Statement
Let p and q are simple statements. The statement of the
form p → q is called conditional statement. The
statement p is called antecedent and the statement q is
called the consequent.

Example: Antecedent
If you will use my calculator, then you will get a
high score in the Exam. Consequent
GEC 104 – Mathematics in the Modern World
Conditional Statement
Consider the statement “If you get a 1.0, then I'll give
you a dollar.”
p q p→q
T T T Only false, if the antecedent is true and the
T F F consequent is false, else true.

F T T
F F T

GEC 104 – Mathematics in the Modern World


Example
Determine whether the statement is true or false.
● If -3 is an integer, then 2 is a rational number. True
● If some students have dyed hair, then the school
restrictions is not implemented. False
● If all cats are black, then I am a millionaire. True

GEC 104 – Mathematics in the Modern World


Biconditional Statement
Consider the statement “The garbage truck comes down
my street if and only if it is Thursday morning”
p q p↔q
T T T True if both the antecedent and consequent
T F F are true or if both are false, else false.

F T F
F F T

GEC 104 – Mathematics in the Modern World


Example
Suppose this statement is true: “I wear my running shoes if
and only if I am exercising.” Determine whether each of the
following statements must be true or false.
● I am exercising and I am not wearing my running shoes. False
● I am wearing my running shoes and I am not exercising. False
● I am not exercising and I am not wearing my running True
shoes.

GEC 104 – Mathematics in the Modern World


Truth Tables for Compound Statements
In computing the truth values of compound statements,
the rule is like those used to evaluate algebraic
expressions. First, evaluate the expressions within the
inner most parentheses, then evaluate the expressions
within the next inner most set of parentheses, and so
forth until you have the truth values for the complete
expression.

GEC 104 – Mathematics in the Modern World


Example
Construct the truth table of the statement:
(p ∨ q) ∧ (~q ∧ p)
p q ~q p∨q ~q ∧ p (p ∨ q) ∧ (~q ∧ p)
T T F T F F
T F T T T T
F T F T F F
F F T F F F

GEC 104 – Mathematics in the Modern World


Example
p q r p∨q (p ∨ q) ∧
Construct the r
truth table of the T T T T T
T T F T F
statement: (p ∨
T F T T T
q) ∧ r T F F T F
F T T T T
F T F T F
F F T F F
F F F F F

GEC 104 – Mathematics in the Modern World


Logically Equivalent Statements
Let p and q are two statements. Then p and q are said to
be logically equivalent (or simply equivalent), denoted
by p ≡ q, if they both have the same truth values for all
possible truth values of their simple statements.

GEC 104 – Mathematics in the Modern World


Example
Show equivalence of ~(p ∧ q) and (~p ∨ ~q)
p q ~p ~q p∧q ~(p ∨ q ) ~p ∨ ~q
T T F F T F F
T F F T F T T
F T T F F T T
F F T T F T T

GEC 104 – Mathematics in the Modern World


De Morgan’s Law
De Morgan’s Law states that the negation of the conjunction
statement is equivalent to the disjunction of the negation of each
simple statement. And, the negation of the disjunctive statement is
equivalent to the conjunction of the negation of each simple
statement.
That is,
~(p ∧ q) ≡ (~p ∨ ~q)
~(p ∨ q) ≡ (~p ∧ ~q)

GEC 104 – Mathematics in the Modern World


Example
Write the given statement in an equivalent form.
● It is not true that, he passed the examination or he played
basketball.
○ He did not pass the examination and he did not play
basketball
● I did not pass the test and I did not complete the course.
○ It is not true that, I passed the test or I completed the
course.

GEC 104 – Mathematics in the Modern World


Equivalent Forms of Conditional and Biconditional
Statements

The equivalent forms of conditional and biconditional statements


are given below
● Conditional: p → q ≡ ~p ∨ q
● Biconditional: p ↔ q ≡ (p → q) ∧ (q → p)

GEC 104 – Mathematics in the Modern World


Example
Write the given statement in disjunctive form.
● If I pass the try-out, then I will be a varsity player.
○ I cannot pass the try-out or I will be a varsity player.
● If there is no vaccine for COVID-19, then classes in the public
schools will be blended learning.
○ There is a vaccine for COVID-19 or classes in the public
schools will be blended learning.

GEC 104 – Mathematics in the Modern World


Some Equivalent Statements

GEC 104 – Mathematics in the Modern World


Tautology and Contradictions
A tautology is a statement whose truth value is always true
regardless of the truth values of its individual simple statements.
A statement which is a tautology is called tautological statement.

A contradiction is a statement whose truth value is always false


regardless of the truth values of the individual simple statements
that is a contradiction is a contradictory statement.

GEC 104 – Mathematics in the Modern World


Example
Prove that p ∨ ~p is a tautology.

p ~p p ∨ ~p
T F T
F T T

GEC 104 – Mathematics in the Modern World


Example
Prove that p ∧ ~p is a contradiction.

p ~p p ∧ ~p
T F F
F T F

GEC 104 – Mathematics in the Modern World


Next Up
● Basic Statistical Concepts
● Measures of Central Tendency
● Measures of Variation
● Measures of Relative Position

GEC 104 – Mathematics in the Modern World

You might also like