0% found this document useful (0 votes)
3 views32 pages

Lesson-10-Logic

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 32

Logic

Logic

Introduction
This chapter shows how to encode information in the form of logical sentences; it
shows how to reason with information in this form; and it provides an overview
of logic technology and its applications - in mathematics, science, engineering,
business, law, and so forth.
Logic

Topic 1- Logic statements and quantifiers


The Meaning of Logic
• the word logic was introduced by Zeno and it is derived from the Greek word
logike which means “systematized and intelligible”.
• Logike is closely related to logos, the Greek word for “thought, reason, and
discourse.”
• Literally, logic is a systematized study of matters pertaining to thought and
discourse.

Formal Definition of Logic


• Logic is defined as the science and art of correct thinking/reasoning.
Logic
Topic 1- Logic statements and quantifiers
HISTORY
Gottfried Wilhelm Leibniz (1646-1716). The first mathematician to make a serious
study of symbolic logic. Leibniz tried to advance the study of logic from a
philosophical subject to a formal mathematical subject.
Augustus De Morgan (1806-1871) and George Boole (1815-1864) contributed to
the advancement of symbolic logic as a mathematical discipline. Boole published
The Mathematical Analysis of Logic in 1848 and An Investigation of the Laws of
Thought in 1854.
Logic
Topic 1- Logic statements and quantifiers
Logic Statements
Definition. A statement is a declarative sentence that is either true or false, but
not both true and false.
Example 1.
Identify Statements
1. Manila is the capital of Philippines.
2. How are you?
3. 99 + 2 is a prime number.
4. x + 1 = 5.
Logic
Topic 1- Logic statements and quantifiers
Logic Statements
Solution.
1. Manila is the capital of the Philippines, so this statement is true and it is a
statement.
2. The sentence, “how are you” is a question; it is not a declarative sentence.
Thus, it is not statement.
3. You may not know whether 99 + 2 is a prime number, however you know that
is a whole number larger than 1, so it is either a prime or not a prime number.
The sentence is ether true or false not both true or false. Hence, it is a
statement.
4. x + 1 = 5 is a statement called an open statement. It is true for x = 4 but false for
any other number. For any given value of x, it is true or false but not both.
Logic
Topic 1- Logic statements and quantifiers
Simple and Compound Statements
Definition. A simple statement is a statement that conveys a single idea. A
compound statement is a statement that conveys two or more ideas.
Note: Connecting statements with words and phrases such as and, or, if…then and
if and only if creates a compound statement.
Logic
Topic 1- Logic statements and quantifiers
Simple and Compound Statements
Example 2.
1. Ariela is beautiful. (simple)
2. Ariela is beautiful and sexy. (compound)
Logic
Topic 1- Logic statements and quantifiers
Truth Value and Truth Tables
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 value of the statements and its
connectives.
A truth table is a table the shows the truth value of a compound statement for all
possible truth values of its simple statements.
Illustration.
The negation of the statement, “Today is Tuesday.” is the statement “Today is not
Tuesday.” p ∼p
If the statement is false, then its negation is true. T F
F T
Truth Table
Logic
Topic 1- Logic statements and quantifiers
Example 3.
Write the negation of a statement.
1. Sharon Cuneta is an actress.
2. Tomorrow is a not a rainy day.
3. I eat banana.
Solution.
1. Sharon Cuneta is not an actress.
2. Tomorrow is a rainy day?
3. I don’t eat banana.
Logic
Topic 1- Logic statements and quantifiers
Example 4.
Consider the following 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 a basketball game or I am going to a movie.
d. If it is raining, then I am not going to the basketball game.
Logic
Topic 1- Logic statements and quantifiers
Solution. Consider the following statements.
a. p ∧ q p: Today is Friday.
b. ∼ q ∧ r q: It is raining.
c. ∼ s ∨ r r: I am going to a movie.
d. q → s 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 a basketball game or I am going to a movie.
d. If it is raining, then I am not going to the basketball game.
Logic
Topic 1- Logic statements and quantifiers
Example 5.
Translate compound statements
Let p, q, and r represents the following:
p: You get a promotion
q: You complete the training.
r: You will receive a bonus.
a. Write (p ∧ q) → r 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.
Logic
Topic 1- Logic statements and quantifiers
Solution:
a. If you get a promotion and you complete the training, then you will receive a
bonus.
b. ∼ q → (∼ p ∧∼ r)
Let p, q, and r represents the following:
p: You get a promotion
q: You complete the training.
r: You will receive a bonus.

a. Write (p ∧ q) → r 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.
Logic
Topic 1- Logic statements and quantifiers
Let p and q be propositions. The
conjunction of p and q, denoted by
p∧q, is the proposition “p and q".
The conjunction p∧q is true when
both p and q are true, and is false
otherwise.

Let p and q be propositions. The


disjunction of p and q, denoted by
p∨q, is the proposition “p or q".
The disjunction p∨q is true if at
least one of p and q is true;
otherwise p∨q is false.
Logic
Topic 1- Logic statements and quantifiers
Example 6.
Determine the truth value of the statement.
a. 7 ≥ 5.
b. 5 is a whole number and an even number.
c. 2 is a prime number and an even number.
Solution.
a. True
b. False
c. True
Logic
Topic 2 - Truth tables, Equivalent Statements and Tautologies
Truth Tables
Example 1.
Construct a table for ∼ (∼ p ∨ q) ∨ q

https://www.youtube.com/watch?v=RaQnrIq5z4k
Logic
Topic 2 - Truth tables, Equivalent Statements and Tautologies
Definition. A tautology is a statement that is always true. A self-contradiction is a
statement that is always false.
Example.
Show that p ∨( ∼ p ∨ q) is tautology.
Logic
Topic 3 - Conditional, Biconditional and related statements
Conditional Statements
Conditional statements can be written in if p, then q form or in if p, q form.
Examples:
• If we order pizza, then we can have it delivered.
• If you go to the movie, you will not be able to meet us for dinner.
• If n is a prime number greater than 2, then n is an odd number.
In any conditional statement represented by “If p, then q” or by “If p, q,” the p
statement is called the antecedent/premise and the q statement is called the
consequent/conclusion.
Logic
Topic 3 - Conditional, Biconditional and related statements
Conditional Statements
Example: Identify the antecedent and consequent in the following statements.
a. If our school was this nice, I would go there more than once a week.
b. If you don’t stop and look around once in a while, you could miss it.
c. If you strike me down, I shall become more powerful than you can possibly imagine.
Solution:
a. Antecedent: our school was this nice
Consequent: I would go there more than once a week
b. Antecedent: you don’t stop and look around once in a while
Consequent: you could miss it
c. Antecedent: you strike me down
Consequent: I shall become more powerful than you can possibly imagine
Logic
Topic 3 - Conditional, Biconditional and related statements
Conditional Statements
✓ “If p, then q,” can be written using the arrow notation p→q. The arrow
notation is read as “If p, then q” or p implies q.
✓ p→q is FALSE only when the premise p is true and the conclusion q is false.
Otherwise, it is true.

p q p→q
T T T
T F F
F T T
F F T
Truth Table
Logic
Topic 3 - Conditional, Biconditional and related statements
Conditional Statements
Examples:
a) If 1 + 1 = 2, then June 26, 2020 is a Friday.
The statements 1 + 1 = 2 and June 26, 2020 is a Friday are BOTH TRUE.
Therefore, the truth value of this conditional is TRUE.
b) If the sun is bigger than the moon then June 30, 2020 is a Thursday.
The premise if TRUE, but the conclusion is False. Therefore, the truth value of
this conditional is FALSE
Example: Determine the truth value of each of the following.
a) If 2 is an integer, then 2 is a rational number.
b) If 3 is a negative number, then 5 > 7.
c) If 5 > 3, then 2 + 7 = 4.
Logic
Topic 3 - Conditional, Biconditional and related statements
Conditional Statements
Solution:
a) If 2 is an integer, then 2 is a rational number…Because the conclusion is true, this
is a true statement.
b) If 3 is a negative number, then 5 > 7…Because the premise is false, this is a true
statement.
c) If 5 > 3, then 2 + 7 = 4…Because the premise is true and the conclusion is false,
this is a false statement.
Truth Table for the Conditional
Logic
Topic 3 - Conditional, Biconditional and related statements
An Equivalent Form of the Conditional
The conditional p→q is equivalent to the disjunction ~p∨q.
p→q ≡ ~p∨q
Example: Write each of the following in its equivalent disjunctive form.
If I could play the guitar, I would join the band.
If David Beckham cannot play, then his team will lose.
Solution:
I cannot play the guitar or I would join the band.
David Beckham can play or his team will lose.
Logic
Topic 3 - Conditional, Biconditional and related statements
The Negation of the Conditional
~(p→q) ≡ p∧~q
Example: Write the negation of each conditional statement.
a. If they pay me the money, I will sign the contract.
b. If the lines are parallel, then they do not intersect.
Solution:
a. They paid me the money and I did not sign the contract.
b. The lines are parallel and they intersect.
Logic
Topic 3 - Conditional, Biconditional and related statements
THE BICONDITIONAL
The statement (p→q)∧(q→p) is called biconditional is denoted by p⟷q, which is
read as “p if and only if q.
✓ p⟷q≡[(p→q)∧(q→p)]
✓ p⟷q is true if p and q have the SAME TRUTH VALUE.
Let's look at more examples of the biconditional.
Example
Given: a: x + 2 = 7
b: x = 5
Problem: Write a⟷b as a sentence. Then determine its truth values a ⟷ b.
Logic
Topic 3 - Conditional, Biconditional and related statements
THE BICONDITIONAL
Solution: The biconditional a, b represents the sentence: "x + 2 = 7 if and only if x =
5." When x = 5, both a and b are true. When x ≠ 5, both a and b are false. A
biconditional statement is defined to be true whenever both parts have the same
truth value. Accordingly, the truth values of a, b are listed in the table below.
Truth Table for the Biconditional
Logic
Topic 3 - Conditional, Biconditional and related statements
THE BICONDITIONAL
Example: State whether each biconditional is true or false.
a. x + 4 = 7 if and only if x = 3.
b. x2 = 36 if and only if x = 6.
SOLUTION:
a. Both equations are true when x = 3, and both are false when x ≠ 3.
Both equations have the same truth value for any value of x, so this is a true
statement.
b. If x = -6, the first equation is true and the second equation is false. Thus, this is a
false statement.
Logic
Topic 3 - Conditional, Biconditional and related statements
EQUIVALENT FORMS OF THE CONDITIONAL
Every conditional statement can be stated in many equivalent forms. It is not even
necessary to state the antecedent before the consequent. For instance, the
conditional
“If I live in Boston, then I must live in Massachusetts” can also be stated as
“I must live in Massachusetts, if I live in Boston”.
Logic
Topic 3 - Conditional, Biconditional and related statements
EQUIVALENT FORMS OF THE CONDITIONAL
Example: Write each of the following in “If p, then q” form.
a. The number is an even number provided that it is divisible by 2.
b. Today is Friday, only if yesterday was Thursday.
Solution:
a. If it is divisible by 2, then the number is an even number.
b. If today is Friday, then yesterday was Thursday,
Logic
Topic 3 - Conditional, Biconditional and related statements
ARGUMENTS AND A VALID ARGUMENT
An argument consists of a set of statements called premises and another statement
called the conclusion. An argument is valid if the conclusion is true whenever all
the premises are assumed to be true. An argument is invalid if it is not a valid
argument.
✓ In the argument about Aristotle, the two premises and the conclusion are
shown below.
✓ It is customary to place a horizontal line between the premises and the
conclusion.
First premise: If Aristotle was human, then Aristotle was mortal.
Second premise: Aristotle was human.
Conclusion: Therefore, Aristotle was mortal.
Logic
Topic 3 - Conditional, Biconditional and related statements
ARGUMENTS AND A VALID ARGUMENT
Arguments can be written in symbolic form. For instance, if we let h represent the
statement “Aristotle was human” and m represent the statement “Aristotle was
mortal,” then the argument can be expressed as
h→𝑚
h
∴𝑚

You might also like