Lesson 4.1 Introduction To Logic

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 123

LESSON 4.

1
Introduction to

L OGIC
What is
L OGIC ?

Logic is the study of method and principles used


in distinguishing correct (good) from incorrect
(bad) arguments.
Statement and Sentences
A proposition or (a statement) is a declarative
sentence which is either true or false, but not
both.

The truth or falsity of a statement is called its


truth value.
Statement and Sentences

The truth value of a proposition is true, denoted


by T if it is a true statement, otherwise, the truth
value is false, denoted by F.
Statement and Sentences
Propositional variables are used to represent
propositions, usually denoted by small letters,
such as p, q, r, s and t.
Example:
p: Everyone should study logic.
p is the proposition “Everyone should study
Determine whether each of the following is a proposition or
not, if a proposition, give its truth value.

1. p: Manila is the capital city of the Philippines.


p is a true proposition
2. q: Find a number which divides your age.
q is not a proposition
3. r: Zero is a rational number.
r is a true proposition
4. s: Cats can fly.
s is a false proposition
Determine whether each of the following is a proposition or
not, if a proposition, give its truth value.

5. t: Where are you going?


t is not a proposition
6. : 6 is an even number
is true proposition
7. : 9 is a prime number
is a false proposition
Statement and Sentences

An open sentence contains one or more variables,


that is, it is either true or false depending on the value
of the placeholder.
CONSIDER THE FOLLOWING OPEN SENTENCES:

1.She was the first Miss Philippines.


2.x is less than 10
3.
4.
5. He was the father of problem solving.
Statement and Sentences
A closed sentence, on the other hand, is a mathematical
sentence that is known to be either true or false.

1. 9 is an odd number.
2. 4 + 4 = 8
3.
4.
5. The square root of 4 is 1.
Statement and Sentences
A compound proposition is a proposition formed from simple
propositions using logical connectors or some combinations of
logical connectors. Logical connectors involving propositions p
and/or q may be expressed as:

not p
if p then q
p and q
p if and only if q
p or q
Statement and Sentences
A proposition is simple if it cannot be broken down any further
into other component propositions.

Example:
For each of the propositions, determine whether it is a
simple or compound proposition. If it is compound
proposition, identify the simple components.
Simple or Compound Proposition?

: If you study hard, then you will get good grades.


• h : You study hard.
• g : You get good grades.
 : If h, then g.
Simple or Compound Proposition?

: Either logic is fun and interesting, or it is boring.


• f : Logic is fun
• i : Logic is interesting
• b : Logic is boring.
 : f and i, or b
QUANTIFIERS:

Quantifiers are words, expressions, or phrases that


point out the number of elements that a statement
relates to.

There are two types of quantifiers: universal and


existential quantifier.
UNIVERSAL QUANTIFIERS:

The universal quantifier, denoted by refers to the


phrase “for all’ or “for every” or “for each”.

Let P(y) be a formula defined on a set D. Then the


expression or y P(y) is read as “For each y in D, P(y)
is a true statement.
UNIVERSAL QUANTIFIERS:

The universal quantifier asserts that the formula holds


for any value of y (the value as being taken from some
given universe or the set of objects of interest).
Examples: Determine the truth value of the following statements.

Define R to be the set of real numbers, N the set of natural


numbers, and Z the set of integers.

1.
The statement is true since the square of any real number is
always nonnegative.
Examples: Determine the truth value of the following statements.

2.
The statement is false since 2 is a natural number and

3.
The statement is true since the real numbers are commutative
under addition.
EXISTENTIAL QUANTIFIERS:

The existential quantifier, denoted by refers to the phrase


“there exists” or “for at least one” or “for some”.

Let P(x) be a formula defined on a set D. Then the


expression or is read as “There exists y in D such that
P(y) is a true statement”.
EXISTENTIAL QUANTIFIERS:

The existential quantifier asserts that the formula holds


for at least one value of y (the value as being taken from
some given universe).
Examples: Determine the truth value of the following statements.

Define R to be the set of real numbers, N the set of natural


numbers, and Z the set of integers.

1.
The statement is true since if we choose then
Examples: Determine the truth value of the following statements.

2.
The statement is true since if we choose a natural number,
then .

3.
The statement is false since must be equal to to make the
equation true, and is not an integer.
B ASIC L OG ICAL O PE RAT O R S :
Given a proposition, its truth table shows all its possible truth
values.
A proposition p would have For proposition p and q, truth
the truth table. value would be: p q
p T T
T T F
F F T
F F

In general, a truth table involving n propositions has rows.


B ASIC L OG ICAL O PE RAT O R S :
Negation
s et p be a proposition. The negation of p, denoted by is the
L
proposition “It is not the case that p”, is read as “the negation of
p” or “not p”.
Definition: If p is true, then is false; and if p is false, then is true.

p
Truth Table for Negation T F
F T
B ASIC L OG ICAL O PE RAT O R S :
Examples: Write the negation of each of the following
statements.
1.Manila City is in the Philippines.
Negation: Manila is not in the Philippines.
2. Mary is a girl.
Negation: Mary is a boy.
3. The product of two odd integers is odd.
Negation: The product of two odd integers is even.
B ASIC L OG ICAL O PE RAT O R S :
Examples: Write the negation of each of the following
statements.
4. 3 times 7 = 20
Negation:
5. January has 31days
Negation: January does not have 31 days.
6. Eleven is not a prime number.
Negation: Eleven is a prime number.
B ASIC L OG ICAL O PE RAT O R S :
Conjunctio
ns
A compound statement formed by connecting two
propositions with the word “and’ is called a conjunction.
In symbols, it is written as “which is read as
B ASIC L OG ICAL O PE RAT O R S :
Conjunctions
Definition: If p and q are true, then is true; otherwise is false.
Truth Table of Conjunction
p q
T T T
T F F
F T F
F F F
B ASIC L OG ICAL O PE RAT O R S :
Examples: Determine the truth value of each the following
conjunctions.
1.Manny Pacquiao is a boxing champion and Catriona Gray is
Miss Universe 2018.

Answer: Since the propositions “Manny Pacquiao is a boxing champion”


and “Catriona Gray is Miss Universe 2018” are both true, thus the
conjunction is true.
B ASIC L OG ICAL O PE RAT O R S :
2. and 50 is divisible by 3.

Answer: Since “” is a true proposition and “50 is divisible by 3” is false,


the conjunction of the compound proposition is false.
B ASIC L OG ICAL O PE RAT O R S :
3. The earth is triangle and the moon is square.
(False)
4. Square has four sides and snakes are mammal.
(False)
5. and is an irrational number.
(True)
B ASIC L OG ICAL O PE RAT O R S :
Disjunction
s
A compound statement formed by connecting two statements with
the word “or” is called a disjunction. Symbolically, “which is read
as
B ASIC L OG ICAL O PE RAT O R S :
Disjunctions
Definition: If p and q are false, then is false; otherwise is true.
Truth Table of Disjunction
p q
T T T
T F T
F T T
F F F
B ASIC L OG ICAL O PE RAT O R S :
Examples: Determine the truth value of each the following
disjunctions.

1.Manila City is in the Philippines or China is in the Philippines.

Answer: Since the propositions “Manila City is in the Philippines” is true,


and “China is in the Philippines” is false, hence the disjunction of the
compound proposition is true.
B ASIC L OG ICAL O PE RAT O R S :
2. is a negative integer or is a positive integer.

Answer: Since the propositions “ is a negative integer” and is a


positive integer” are both false, thus the disjunction of the compound
proposition is false.
B ASIC L OG ICAL O PE RAT O R S :
3. Chocolate is sweet or today is Sunday.
(True)
4. Chicken is not a bird or the freezing point of water is 100.
(False)
5. October has 31 days or 2028 is a leap year.
(True)
B ASIC L OG ICAL O PE RAT O R S :
Conditional
Statement
A compound statement formed by connecting two statements with
the words “if…,then” is called a conditional. Symbolically,
“which is read as or “p implies q”.

The statement p is called the antecedent (or the hypothesis or


premise) and statement q is the consequent (or the conclusion) of
the conditional.
B ASIC L OG ICAL O PE RAT O R S :
Conditional
In this case, the resulting sentence is only false whenever the
Statement
antecedent is true and the consequent is false, and is true otherwise.
Truth Table of Conditional Statement
p q
T T T
T F F
F T T
F F T
Examples:
Construct the conditional statement and write its truth value.

1.The antecedent, p, is “A square is a quadrilateral”. And the


consequent, q, is “A square has four sides.”

Answer: If a square is a quadrilateral, then a square has four


sides.
(True because p and q are true)
Examples:
Construct the conditional statement and write its truth value.

2. The antecedent, p, is “Vinegar is sweet ” and the


consequent, q, is “Sugar is sour.”

Answer: If vinegar is sweet, then sugar is sour.


(True because p and q are false)
Examples:
Construct the conditional statement and write its truth value.

3.The antecedent, p, is “I am studying hard”. And the


consequent, q, is “I will not get good grades.”

Answer: If I am studying hard, then I will not get good


grades.
(False because p is true and q is false)
B ASIC L OG ICAL O PE RAT O R S :
Conditional
Statement
Each of the following phrases is equivalent to the conditional

If p, then q. Not p unless q.


q follows from p. p only if q.
p implies q. q if p.
q whenever p. Whenever p, q
q is necessary for p. p is sufficient for q.
B ASIC L OG ICAL O PE RAT O R S :
Biconditional
Statement
A compound statement formed by connecting two statements with
the words “if and only if” is called a biconditional. Symbolically,
“which is read as .

The biconditional statement is actually formed by the conjunction


of the conditional statements and
B ASIC L OG ICAL O PE RAT O R S :
Biconditional
Statement
In this case, the resulting sentence is true whenever the antecedent
p as well as the consequent q have the same truth values and false
otherwise.
p q
T T T
Truth Table of Biconditional Statement T F F
F T F
F F T
Examples:
Construct the biconditional statement and write its truth
value.
1.The antecedent, p, is “17 is a prime number”. And the
consequent, q, is “17 is not an integer”

Answer: 17 is a prime number if and only if 17 is not an


integer.
(False because p is true and q is false)
Examples:
Construct the biconditional statement and write its truth
value.
2. The antecedent, p, is “Fishes live in the moon”. And the
consequent, q, is “Birds can fly”.

Answer: Fishes live in the moon if and only if birds can fly.
(False because p is false and q is true)
Examples:
Construct the biconditional statement and write its truth
value.
3. The antecedent, p, is “I am breathing”. And the
consequent, q, is “I am alive”

Answer: I am breathing if and only if I am alive .


(True because p and q are true)
B ASIC L OG ICAL O PE RAT O R S :
Exclusive-or
The exclusive-or of the proposition p and q is the
compound proposition “p exclusive-or q”.
Symbolically, p ⊕ q, where ⊕ the symbol for
“exclusive-or”.
B ASIC L OG ICAL O PE RAT O R S :
Exclusive-or
Definition: If p and q are true or both false, then p ⊕ q is false; if p
and q have opposite truth values, then p ⊕ q is true.

p q
T T F
Truth Table of Exclusive-or Statement T F T
F T T
F F F
Examples of exclusive-or

1. You passed or you failed.”


2. Lights are switched on or lights are switched off.
3. She is single or she has a love life.
4. It is daytime or nighttime.
5. The sun rises or the sun sets.
Determine if the statement is true or false.
1. Coconut provides shelter and sun gives light.

TRUE FALSE
Determine if the statement is true or false.
2. Manny Pacquiao is a boxer if and only if
December is a summer month in the
Philippines.

TRUE FALSE
Determine if the statement is true or false.
3. Cigarette smoking causes cancer or Filipino is
the universal language, and Asia is a continent.

TRUE FALSE
Determine if the statement is true or false.
4. If ice cream is sweet, then cake is bitter.

TRUE FALSE
Determine if the statement is true or false.
5. Success follows from being hardworking.

TRUE FALSE
B ASIC L OG ICAL O PE RATO R S :
Operator Word/s Symbol Truth Value (Technique)
Negation
Conjunction
Disjunction
Conditional
Biconditional
Exclusive-or
Determine if the statement is true or false.
1. Today is Sunday and it is raining.
2. 2016 is a leap year.
3. If March is the third calendar month, then one foot
has 12 inches.
4. February has 29 days whenever 2020 is a leap year.
5. The boiling point of water is or the freezing point is
100 .
6. 20 is divisible by 2 if and only if 20 is even.
CONSTRUCTING TRUTH TABLES

A truth table is a mathematical table used to determine if


a compound statement is true or false.

In general, a truth table involving n propositions


has rows.
CONSTRUCTING TRUTH TABLES
Construct the truth table of the
following:
CONSTRUCTING TRUTH TABLES
𝑝 ˅ 𝑞
CONSTRUCTING TRUTH TABLES
𝑝 ˅ 𝑞
p q
T T F T
T F T T
F T F F
F F T T
CONSTRUCTING TRUTH TABLES
2.
CONSTRUCTING TRUTH TABLES
2.

p q
T T F T
T F F F
F T T F
F F T T
CONSTRUCTING TRUTH TABLES
3.
CONSTRUCTING TRUTH TABLES
p q r
3.
T T T T F F
T T F T T T
T F T T F F
T F F T T T
F T T T F F
F T F T T T
F F T F F F
F F F F T F
TAUTOLOGY, CONTRADICTION &
CONTINGENCY

Tautolog
y
A compound statement that is always true, regardless
of the truth values of its components, is called a
tautology.
TAUTOLOGY, CONTRADICTION &
CONTINGENCY

Tautolog
yhe proposition
T is a tautology as the following table illustrates.
p
T F T
F T T

Also, the statement is a tautology since it is always true.


TAUTOLOGY, CONTRADICTION &
CONTINGENCY

Contradiction

A contradiction is a compound proposition that is always


false.
TAUTOLOGY, CONTRADICTION &
CONTINGENCY

Contradiction
The proposition is a contradiction as the following table illustrates.
p
T F F
F T F

Also, the statement is a contradiction since it is always false.


TAUTOLOGY, CONTRADICTION &
CONTINGENCY

Contingency
A contingency is neither a tautology nor a contradiction.

Example:

The statement is a contingency.


CONSTRUCT A TRUTH TABLE AND DETERMINE IF THE
FOLLOWING IS A TAUTOLOGY, CONTRADICTION OR
CONTINGENCY.

1.
1.
p q
T T
T F
F T
F F

Therefore, is a tautology.
1.
p q
T T T F T
T F F T T
F T F T T
F F F T T

Therefore, is a tautology.
2.
p q
T T
T F
F T
F F

Therefore,is a contradiction.
2.
p q
T T F F T F
T F T T F F
F T F F F F
F F T F F F

Therefore,is a contradiction.
3. (𝑝 ˅~𝑝) ˄ 𝑞
p q
T T
T F
F T
F F

Therefore, (𝑝 ˅~𝑝) ˄ 𝑞 is a contingency


3. (𝑝 ˅~𝑝) ˄ 𝑞
p q ~𝑝 (𝑝 ˅~𝑝) (𝑝 ˅~𝑝) ˄ 𝑞
T T F T T
T F F T F
F T T T T
F F T T F

Therefore, (𝑝 ˅~𝑝) ˄ 𝑞 is a contingency


4. (~𝑝 ˄~𝑞) →(𝑟˄~𝑞)
p q r
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
4. (~𝑝 ˄~𝑞) →(𝑟˄~𝑞) is a contingency
p q r ~𝑝 ~𝑞 (~𝑝 ˄~𝑞) (𝑟˄~𝑞) (~𝑝 ˄~𝑞) →(𝑟˄~𝑞)
T T T F F F F T
T T F F F F F T
T F T F T F T T
T F F F T F F T
F T T T F F F T
F T F T F F F T
F F T T T T T T
F F F T T T F F
EQUIVALENT STATEMENTS

Equivalent statements, denoted by , are statements whose


truth values is always either both true or both false
whenever they have identical truth tables.
EQUIVALENT STATEMENTS
Example:

p q
T T T F F T
T F F T F F
F T T F T T
F F T T T T
EQUIVALENT STATEMENTS
Another example: Determine if each of the following is
equivalent by constructing their truth tables.

1. and
EQUIVALENT STATEMENTS
( 𝑝˄ 𝑞 ) 𝑎𝑛𝑑 𝑝˅ 𝑞
p q
T T
T F
F T
F F
EQUIVALENT STATEMENTS
( 𝑝˄ 𝑞 ) 𝑎𝑛𝑑 𝑝˅ 𝑞
p q
T T T F F F F
T F F T F T T
F T F T T F T
F F F T T T T

Hence,
EQUIVALENT STATEMENTS
2.
p q
T T
T F
F T
F F

Hence,
EQUIVALENT STATEMENTS
2.
p q
T T T F F F F
T F T F F T F
F T T F T F F
F F F T T T T

Hence,
EQUIVALENT STATEMENTS
3.
p q
T T
T F
F T
F F

Hence,
EQUIVALENT STATEMENTS
3.
p q
T T T F T
T F F F F
F T T T T
F F T T T

Hence,
EQUIVALENT STATEMENTS
4. and
p q
T T
T F
F T
F F
Hence,
EQUIVALENT STATEMENTS
4. and
p q
T T T T T T
T F F T F F
F T T F F F
F F T T T T
Hence,
FORMS OF CONDITIONAL PROPOSITIONS

Given propositions and . There are three propositions that we can


derive from the conditional , namely, its
1. converse:
2. Contrapositive:
3. Inverse:
FORMS OF CONDITIONAL PROPOSITIONS

Truth table:
FORMS OF CONDITIONAL PROPOSITIONS
Consider the following true conditional:
"If today is Saturday, then it is a weekend."
State its (a) converse, (b) contrapositive, and (c) inverse, and determine
whether each statement is true.
Solution:
(a) Converse: "If today is a weekend, then it is Saturday."
(b) Contrapositive: "If today is not a weekend, then it is not Saturday."
(c) Inverse: "If today is not Saturday, then it is not a weekend."
Symbolic Arguments
An argument is an assertion that a given series of , called
premises yields (has a consequence) another statement Q,
called the conclusion. The premises are intended to
demonstrate or at least provide some evidences for the
conclusion.
Symbolic Arguments
Example:
Some of the following are arguments. Identify their
premises and conclusions.

1. He’s a Libra, since he was born in the last week of


September.
Answer:
Premise: He was born in the last week of September.
Symbolic Arguments
2. He was breathing and therefore alive.
Answer:
Premise: He was breathing.
Conclusion: He was alive.
Symbolic Arguments
3. Can I go now?
Answer: Not an argument

4. Nikki is my niece because her mother is my younger


sister.
Answer:
Premise: Her mother is my younger sister.
Conclusion: Nikki is my niece.
Symbolic Arguments
The premise indicators, an The conclusion indicators, an
expression prefixed to a expression prefixed to a sentence to
sentence to indicate that it states indicate that it states a conclusion.
a premise.
therefore consequently
for It is a fact that
thus then
since As shown by the
hence implies
given that fact that
so
For the reason that Granted that
VALID OR NOT?
If I will study for the examination, then I will get a passing score.
I studied for the examination.
Therefore, I got a passing score.

If I will study for the examination, then I will get a passing score.
I got a passing score.
Therefore, I studied for the examination.
Valid Arguments
An argument is said to be valid when all the
premises are true it forces the conclusion to be
true. An argument which is not valid is called
an invalid argument or fallacy.
Valid Arguments
Theorem: The argument consisting of the premises ,
and conclusion Q is valid if and only if the
proposition is a tautology.
List of SomeValid Arguments
1. Law of Detachment (also called modus ponens)
Symbolically, the argument is written:
Premise 1:
Premise 2: ____
1. Law of Detachment (also called modus ponens)
[(𝑝 →𝑞)˄ 𝑝 ]→𝑞
p q
T T T T T
T F F F T
F T T F T
F F T F T
The truth table above shows that we have a valid argument, since the
compound statement is a tautology.
List of SomeValid Arguments
2. Law of Contraposition (also called modus tollens)
Symbolically, the argument is written:
Premise 1:
Premise 2: ____
2. Law of Contraposition (also called modus tollens)
[(𝑝 →𝑞)˄ 𝑞]→ 𝑝

T T T F F F T
T F F T F F T
F T T F F T T
F F T T T T T
The truth table above shows that we have a valid argument, since the
compound statement is a tautology.
List of SomeValid Arguments
3. Law of Syllogism
Symbolically, the argument is written:
Premise 1:
Premise 2: ____
3. Law of Syllogism

T T T T T T T T
T T F T F F F T
T F T F T F T T
T F F F T F F T
F T T T T T T T
F T F T F F T T
F F T T T T T T
F F F T T T T T

The truth table above shows that we have a valid argument, since the
compound statement is a tautology.
List of SomeValid Arguments
4. Rule of Disjunctive Syllogism
Symbolically, the argument is written:
Premise 1:
Premise 2: ____
4. Rule of Disjunctive Syllogism
[(𝑝 ˅𝑞)˄ 𝑝 ]→ 𝑞

T T T F F T
T F T F F T
F T T T T T
F F F T F T
The truth table above shows that we have a valid argument, since the
compound statement is a tautology.
List of SomeValid Arguments
Example: Consider the following arguments. Verify if it is valid
or invalid. Identify the valid argument used.

a. If Mark finishes his homework, then he can watch a movie.


Mark finishes his homework.
Therefore, Mark can watch a movie.

Let p be “Mark finishes his homework”, and q be “ Mark can


watch a movie.’ Clearly, by Law of Detachment, this argument is
valid.
List of SomeValid Arguments
Example: Consider the following arguments. Verify if it is valid
or invalid. Identify the valid argument used.

b. If Mark finishes his homework, then he can watch a movie.


Mark cannot watch a movie.
Therefore, Mark did not finish his homework.

Let p be “Mark finishes his homework”, and q be “ Mark can


watch a movie.’ Clearly, by Law of Contraposition, this argument
is valid.
List of SomeValid Arguments
Example: Consider the following arguments. Verify if it is valid or
invalid. Identify the valid argument used.

c. If it rains today, I will wear my rain jacket.


If I will wear my rain jacket, I will keep dry.
Therefore, if it rains today, I will keep dry.

Let p be “It rains today”, and q be “ I will wear my rain jacket.” and r
be “I will keep dry”. Clearly, by Law of Syllogism, this argument is
valid.
List of SomeValid Arguments
d. Gregorio’s pencil is in his bag or it is on his table.
Gregorio’s pencil is not in his bag.
Therefore, Gregorio’s pencil is on his table.

Let p be “Gregorio’s pencil is in his bag”, and q be “It is on his


table.”

Clearly, by Rule of Disjunctive Syllogism, this argument is valid.


List of SomeValid Arguments
e. If Mark finishes his homework, then he can watch a movie.
Mark watches a movie
Therefore, he finishes his homework.

Let p be “Mark finishes his homework”, and q be “ Mark can


watch a movie.”
List of SomeValid Arguments
Truth Table of :
p q
T T
T F
F T
F F

Using the truth table the argument is invalid.


List of SomeValid Arguments
Truth Table:
p q
T T T T T
T F F F T
F T T T F
F F T F T

Using the truth table the argument is invalid.


List of SomeValid Arguments
f. If Mark finishes his homework, then he can watch a movie.
If he watches a movie, then he will buy pack of popcorn.
If Mark finishes his homework, then he will buy a pack of
popcorn.

Let p be “Mark finishes his homework”, and q be “ Mark can watch


a movie.” and r be “Mark will buy a pack of popcorn.”
Clearly, by Law of Syllogism, this argument is valid.
Rules of Inferences

Law of Detachment
(Modus Ponens)

Law of Contraposition
(Modus Tollens)

Law of Syllogism

Rule of Disjunctive
Syllogism
Consider each of the following argument. Identify the form of
valid argument that establishes its validity.

1. If 3+4=7, then 8+3=11.


8+3≠1.
Therefore, 3+4≠7.

Law of Contraposition
Consider each of the following argument. Identify the form of
valid argument that establishes its validity.

2. If company loan interest rates drops, then


employees will apply for a loan.
Company loan interest rates drops.
Therefore, employees will apply for a loan.

Law of Detachment
Consider each of the following argument. Identify the form of
valid argument that establishes its validity.

3. If 6 is an even number, then 17 is an odd number.


If 17 is an odd number, then is an irrational number.
Therefore, if 6 is an even number, then is an irrational
number.

Law of Syllogism
Consider each of the following argument. Identify the form of
valid argument that establishes its validity.

4. 3 is a prime number or 4 is a composite number.


3 is not a prime number.
Therefore, 4 is a composite number.

Rule of Disjunctive Syllogism

You might also like