Logic New-1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

INTRODUCTION

TO LOGIC
LOGIC

 Logic – science of correct reasoning


Logic
Main goal: use logic to analyze arguments
(claims) to see if they are valid or invalid.
This is useful for math theory, but also in the
real world any time someone is trying to
convince you of something.

To analyze an argument, we break it down


into smaller pieces: statements, logical
connectives and quantifiers.
Uses of logic

 Lawyers and judges – communicate effectively,


construct valid arguments, analyze legal
contracts, make decisions
 Programmers – design computer software
 Electrical engineers – design circuits for smart
phones
 Mathematicians – solve problems, prove
theorems
Historical Background

 Gottfried Wilhelm Leibnitz (1646-1716)


 Augustus de Morgan (1806-1871)
 George Boole (1815-1864)
 Charles Dodgson (1832-1898) – known as
Lewis Carroll
Everyday Language

Do we have a test today? – Question


Close the door – Command
Math is a useful subject – Opinion
CPU is an educational institution - Statement
Statement

 A declarative sentence that is either


true or false, (but not both at the same
time).
Determine whether each sentence is a
statement.

a. Boracay Island is in the province of


Iloilo.
b. How are you?
c. 2 is a prime number.
d. x+1 = 5
Simple Statement

 A statement that conveys a single idea.

Examples
Two is an even number.
Two is a prime number.
Compound Statement

A statement consists of simple


statements combined using logical
connectives like and, or, not, if…then.
Examples
Two is an even prime number.
I will study my lesson in GE Math or I
will fail in this subject.
Let p and q be two simple statements
Connective Symbol Compound Symbolic Form Type of
Statement of the Compound Compound
Statement Statement

or  p or q pq Disjunction

and
 p and q pq Conjunction

If…then  p if q pq Conditional

If and only

if and pq Biconditional
if only if q

 not p p Negation
not not q q
Example 1

Let p = Hacksaw Ridge depicts a true story.


q = Hacksaw Ridge is a beautiful movie.

Write the following compound statements .


a. d.
b. e. p
c. f. q
Example 2
Consider the following simple statements:
p: Today is Friday.
q: It is raining.
r: I am going to a movie.
s: I am not going to the basketball game.

Write the following compound statements in symbolic form.


a. Today is Friday and it is raining.
b. It is not raining and I am going to a movie.
c. I am going to the basketball game or I am going to a movie.
d. If it is raining, then I am not going to the basketball game.
•P ^ q
Example 3 •q v r
•~p ~r

Consider the following statements


p: It is raining
q: The streets are flooded.
r: There is heavy traffic.
Translate the following in symbolic form.
a. It is raining and the streets are flooded.
b. The streets are flooded or there is heavy traffic.
c. If it is not raining, then there is no heavy traffic.
Example 4

 Translate Symbolic Statements


p: The game will be played in Atlanta.
q: The game will be shown on CBS.
r: The game will not be shown on ESPN.
s: The Mets are favored to win.
Write each of the following symbolic statements in words.
a) q ^ p b) ~ r ^ s c) s ~p
Check your progress 4

 e: All men are created equal.


 t: I am trading places.
 a: I get Abe’s place.
 g: I get George’s place.
Translate:
a. e^ ~t b. a V ~t c. e t
d. t g
Compound Statements and
Grouping Symbols
Symbolic form The parentheses indicate
that:
𝑝 ∧ (𝑞 ∨∼ 𝑟) 𝑞 and ∼ 𝑟 are grouped
together
𝑝∧𝑞 ∨𝑟 𝑝 and 𝑞 are grouped together

𝑝 ∧∼ 𝑞 → 𝑟 ∨ 𝑠 𝑝 and ∼ 𝑞 are grouped


together
𝑟 and 𝑠 are also grouped
together
Translating Compound Statements

Let p, q, and r represent the following:


p: You get a promotion.
q: You complete the training.
r: You will receive a bonus.
a. Write 𝑝 ∧ 𝑞 → 𝑟 as an English sentence.
b. Write “If you do not complete the training,
then you will not get a promotion and you
will not receive a bonus.” in symbolic form.
Example

Let p, q, and r represent the following:


p: Kesha’s singing style is similar to Uffie’s.
q: Kesha has messy hair.
r: Kesha is a rapper.
a. Write 𝑝 ∧ 𝑞 → 𝑟 as an English sentence.
b. Write “If Kesha is not a rapper, then Kesha
does not have messy hair and Kesha’s singing
style is not similar to Uffie’s.” in symbolic form.
 Kesha’s singing style is similar to
Uffie’s and has messy hair then
she is a rapper.
 ~r → (~q ∧ ~p)
Quantifiers and Negation

 Existential quantifiers – some, there


exists, at least one
 Universal quantifiers – none, no, all, every
Statement Negation
All x are y. Some x are not y.
No x are y. Some x are y.
Some x are not y. All x are y.
Some x are y. No x are y.
Statements

 The negation of a statement must


have the opposite truth value to
the original statement
Example

Write a negation of each of the following


statements.
a. Some airports are open.
b. All movies are worth the price of
admission.
c. No odd numbers are divisible by 2.
a. No airports are open.
b. Not some movies are worth the price of admission.
c. Some odd numbers are divisible by 2.
CONDITIONAL STATEMENTS

 Can be written in “if p, then q” form or


in “if p, q” form.
 p statement called the antecedent
 q statement called the consequent
 Can be written using the arrow notation 𝑝 → 𝑞
read as ‘if p, then q” or ‘p implies q”
“Life moves pretty fast. If you don’t stop and look around once in a while,
you could miss it.” – Ferris Bueller’s Day Off
Example
Identify the antecedent and consequent in the following
statements.
1. If our school was this nice, I would go there more than
once a week.
–The Basketball Diaries
2. If you don’t get in that plane, you’ll regret it.
–Casablanca
3. If you strike me down, I shall become more powerful than
you can possibly imagine.
–Obi-Wan Kenobi, Star Wars, Episode IV, A New Hope
Check Your Progress

Identify the antecedent and consequent in


each of the following conditional statements.
1. If I study for at least 6 hours, then I will
get an A on the test.
2. If I get the job, I will buy a new car.
3. If you can dream it, you can do it.
The Conditional Statement
(Implication) ( p  q)
 Equivalent forms of 𝑝 → 𝑞.
“If p, then q” “q, if p”
“p implies q” “q when p”
“If p, q” “q whenever p”
“p is sufficient for q” “q is necessary for p”
“p only if q” “q follows from p
“q provided that p” “Every p is a q”
“a sufficient condition for q is p”
“a necessary condition for p is q”
Example

 Write each of the following in “If p, then q”


form.
1. The number is an even number provided
that it is divisible by 2.
2. Today is Friday, only if yesterday was
Thursday.
3. Every square is a rectangle.
The Converse, the Inverse, and
the Contrapositive

Statement related to the Conditional


Statement:
 The converse of 𝑝 → 𝑞 is 𝑞 → 𝑝.
 The inverse of 𝑝 → 𝑞 is ~𝑝 → ~𝑞.
 The contrapositive of 𝑝 → 𝑞 is ~𝑞 → ~𝑝.
Example

Write the converse, inverse and


contrapositive of the following conditional
statements.
1. If I get the job, then I will rent the
apartment.
2. If we have a quiz today, then we will not
have a quiz tomorrow.
p. 68

 1. If a quadrilateral is not a
rectangle, then it is not a square.
 2. If yesterday is not Wednesday,
then tomorrow is not Friday.
Biconditional Statements

 The statement 𝑝 → 𝑞 ⋀ 𝑞 → 𝑝 is called


a biconditional and is denoted by 𝑝 ↔ 𝑞,
which is read as “p if and only if q”.
Example

Let p, q, and r represent the following


p: She will go on vacation.
q: She cannot take the train.
r: She cannot get a loan.
Write the following symbolic statements in words.
1. 𝑝 ↔ ~𝑟
2. 𝑝 ↔ ~𝑞
3. ~𝑟 ↔ ~𝑝
Truth Tables

 A logical statement may either be true or false.


 If the statement is true, then the truth value
corresponding to the statement is true denoted by
the letter T.
 If it is false, the statement has a value denoted by
F.
 The truth table is a summary of all possible truth
values of a statement.
Examples:

 A. Assertion B. Negation
p p ~𝒑
T T F
F F T
C. Conjunction D. Disjunction

p q p^q p q pvq
T T T T T T
T F F T F T
F T F F T T
F F F F F F
E. Conditional F. Biconditional

p q p→q p q p↔q
T T T T T T
T F F T F F
F T T F T F
F F T F F T
Note: An easy way to construct the truth table is to assign a value “1” to the
truth and a value “0” to the false value. The connective ^ is equivalent to
multiplication while the v is equivalent addition. “1 + 1 = 1”
p.67. If p is false and q is true, what are the truth
values of the given statements?

 4. (p v q)
 5. (-p) ^ (-q)

You might also like