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

Chapter 2 - LOGIC

Logic 2.1 Statements and Connectives


 Logic is“the study of correct reasoning, especially
regarding making inferences.” Logic began as a
philosophical term and is now used in other
disciplines like math and computer science. 

Logic can include the act of reasoning by humans in order to form thoughts and opinions, as well
as classifications and judgments.
Logic can be defined as:
“The study of truths based completely on the meanings of the terms they contain.”
Logic is a process for making a conclusion and a tool you can use.
•The foundation of a logical argument is its proposition, or statement.
•The proposition is either accurate (true) or not accurate (false).
•Premises are the propositions used to build the argument.
•The argument is then built on premises.
•Then an inference is made from the premises.
•Finally, a conclusion is drawn.

Note: Proposition is a declarative/informative sentence


 
Some sample answers and instructor's comments for each.
1. The batter hit the baseball 502 feet into the center field bleachers.
This is a proposition. It is either true or false that the ball went 502 feet.
2. The teacher exclaimed, "Don't come into class late again!"
Instructor's comment:
This is a proposition. It is either true or false that the teacher made the statement.
3. Blue is my favorite color.
Instructor comments: Be careful about what you say is just an opinion. Can it be true or false that
the person's favorite color is blue? I think so. It may be that we have no other means of checking
the truth of the proposition than by person's own word, and, for all I know, the person could be
lying about their favorite color. None of those considerations change the fact that the statement is
either true or false.
4. Scientists have discovered the remains of a lost civilization on the floor of the Atlantic
Ocean.
Instructor's comments: This is a proposition. It's a false  proposition (as far as I know). A sentence
does not have to be true to be a proposition.
5. Wow! Did you see that baseball sail out of the park?
This is not a proposition. It is an exclamation and a question
6. I now pronounce you man and wife.
This is not a proposition,
Types of Logic With Examples

1. Informal logic is what’s typically used in daily reasoning. This is the reasoning and
arguments you make in your personal exchanges with others.

Premises: Nikki saw a black cat on her way to work. At work, Nikki got fired.
Conclusion: Black cats are bad luck.
Explanation: This is a big generalization and can’t be verified.

Premises: There is no evidence that penicillin is bad for you. I use penicillin without
any problems.
Conclusion: Penicillin is safe for everyone.
Explanation: The personal experience here or lack of knowledge isn’t verifiable.
2.  Formal logic, you use deductive reasoning and the premises must be true. You follow the premises
to reach a formal conclusion.

Premises: All spiders have eight legs. Black Widows are a type of spider.
Conclusion: Black Widows have eight legs.
Explanation: This argument isn’t controversial.

Premises: Bicycles have two wheels. Jan is riding a bicycle.


Conclusion: Jan is riding on two wheels.
Explanation: The premises are true and so is the conclusion.

3.Mathematical logic, you apply formal logic to math. This type of logic is part of the basis for the
logic used in computer sciences. Mathematical logic and symbolic logic are often used
interchangeably.
Statements and Connectives
Symbolic logic studies some parts and relationships of the natural language by representing them
with symbols. The main ingredients of symbolic logic are statements and connectives.

A statement is an assertion that can be either true or false.


Examples. It is sunny today.
Ms. W. will have a broader audience next month.

We typically represent simple statements using lower-case letters p, q, r, ...; for example s= Your
bicycle is slick; c= I like its color.

Connectives join simple statements into more complex statements, called compound statements.
The most common connectives and their symbols are:
and/but = ∧; or = ∨; if . . . , then =→ .

Example. Your bicycle is slick and I like its color = s ∧ c.


Compound Statements and Connective Notes
1. Express compound statements in symbolic form.
Simple statements convey one idea with no connecting words.
Compound statements combine two or more simple statements using connectives.
Connectives include words such as and, or, if......... then, and if and only if.

If p and q are two simple statements, then the compound statement “p and q” is symbolized by p
∧ q.

The compound statement formed by connecting statements with the word and is called a
conjunction. The symbol for and is ˄.
Let p and q represent the following simple statements:
p: It is after 5 P.M.
q: They are working.
Write each compound statement below in symbolic form:
p ∧ q a. It is after 5 P.M. and p ∧ ~q b. It is after 5 P.M.
they are working they are not working.
Or Statements
Disjunction is a compound statement formed using the inclusive or
represented by the symbol v . Thus, “ p or q or both” is symbolized by p v q.
Here is an example of Translating from English to Symbolic Form:
Let p and q represent the following simple statements:
p: The bill receives majority approval.
q: The bill becomes a law.
Write each compound statement below in symbolic form:
p ∨ q a. The bill receives majority approval or the bill becomes a law.
p ∨ ~q b. The bill receives majority approval or the bill does not become a law.
If-Then Statements
The compound statement “If p, then q is symbolized by p → q.
This is called a __conditional__ statement.
The statement before the → is called the antecedent.
The statement after the → is called the consequent.
Here are examples of writing if-then statements in symbolic form:
Let p and q represent the following simple statements:
p: A person is a father.
q: A person is a male.
Write each compound statement below in symbolic form:
p → q a. If a person is a father, then that person is a male.
Both the conditional and converse statements must be true to produce a biconditional
statement:
•Conditional: If I have a triangle, then my polygon has only three sides. (true)
•Converse: If my polygon has only three sides, then I have a triangle. (true)
Since both statements are true, we can write two biconditional statements:
1.I have a triangle if and only if my polygon has only three sides. (true)
2.My polygon has only three sides if and only if I have a triangle. (true)
Read as equivalent
2. Express symbolic statements with and without parentheses in English.

Here are examples of symbolic statements in English.


Let p and q represent the following simple statements:
p: She is wealthy.
q: She is happy.

Write each of the following symbolic statements in words:


a. ~(p ∧ q)
a. She is not wealthy and she is not happy.
b. It is not true that she is wealthy and happy.
b. ~p ∧ q
She is not wealthy and she is happy.
c. ~(p ∨ q)
She is neither wealthy nor happy. (Literally, it is not true that she is either wealthy or
happy.
Let p, q, and r represent the following simple statements:
p: A student misses lecture.
q: A student studies.
r: A student fails.

Write each of these symbolic statements in words:


a. (q ∧ ~ p) →~ r
If a student studies and does not miss lecture, then the student does not fail.

b. q ∧ (~p → ~r)
A student studies, and if the student does not miss lecture, then the student does

not fail.
Let p, q, and r represent the following simple statements.
p: I fail the course.
q: I study hard.
r: I pass the final.

Write each compound statement in symbolic form:

a. I do not fail the course if and only if I study hard and I pass the final.
~p ↔ (q ∧ r )

b. I do not fail the course if and only if I study hard, and I pass the final.
(~p ↔ q) ∧ r
Write each compound statement below in symbolic form:
I do not fail the course if and only if I study hard and I pass the final.
p: I fail the course.
q: I study hard.
r: I pass the final.

I do not fail the course iff I study hard, and I pass the final.
In this statement, the comma indicates the grouping, so it is not necessary to apply the
dominance of connectives. The symbolic form of the statement is (~p ↔ q) ∧ r .
January 19,2021
Biconditional statements are conditional statements that are true if the statement is still true when
the antecedent and consequent are reversed.
The compound statement “p if and only if q” (abbreviated as iff ) is symbolized by p ↔ q.

Conditional: Converse:

Biconditionals:
A person is unmarried male if and only if that person is a bachelor.
A person is a bachelor if and only if that person is an unmarried male.
Determine the proposition. LOGICAL OPERATORS

1. Manila is the capital of the 1. Negation


Philippines. 2. Conjunction
2. 1 + 1 = 2 3. Disjunction
3. The earth is spherical.
4. What is your name? 4. Conditional Statements
5. Read this carefully. 5. Biconditional Statements
6. Kindly close the door.
7. x + y = z.
RACTICE EXERCISES:

Using the sentence variables (p, q, and r) and the logic symbols (~, ^, and v ), rewrite the following symbolically.

a. I can study and go to parties every night.


p   q

b. I am hungry but not thirsty.


p   ~q.

c. The baby is either hungry or thirsty.


p   q

d. The weather is neither hot nor cold.


~(p   q) = (~P) v (~q)  Note: this was corrected from the original.

e. I can study hard, or I can go to parties, but I cannot study hard and go to parties.
(p   q)   ~(p   q)
Truth Values and Truth Tables
Every logical statement, simple or compound, is either true or false. We say that the truth value
of a statement is true (represented by the letter T) when the statement is true, and false
(represented by the letter F) when the statement is false.

Example.
If p is I play the piano is false, and q is I study logic is true, then the conjunction p ∧ q is
I play the piano and study logic is a false statement. A truth table summarizes all possible
truth values of a statement.
The truth table for the negation, whose
truth values are always the opposite as those
of the original statement:
p ~q while the statement p ∨ q (disjunction) is false
only when p and q are both false.
T F
F T p q pvq
T T T
p ∧ q (conjunction) is true only when p and T F T
q are both true. F T T
p q p^q F F F
T T T
T F F
F T F
F F F
Example.

Construct the truth table for the compound statement ~ (p ∨ q) ∧ q. p q p^q


T T T
We will first break down this statement in
T F F
components of increasing complexity: F T F
the simple statements: F F F
p q pvq ~ (p ∨ q) ~ (p ∨ q) ∧
• p and q q
• The disjunction p ∨ q
T T T F F
• Its negation ~(p ∨ q) T F T F F
• The statement ~ (p ∨ q) ∧ p F T T F F
We will create one column for F F F this
Negate T F
each of these components:
Fill in the missing values in the following truth table:

p q ~p ~q p ∧ ~q ( ~p) ∨ q [p ∧ ~q] ∨ [(~p) ∨


q]
T T F F F T T
T F F T T F T
F T T F F T T
F F T T F T T
Here's the table for logical implication:
A tautology is a formula which is "always true" --- that is, it is true for every
assignment of truth value to its simple components. You can think of a tautology
as a rule of logic.
Example.  If or : both F = F, the rest
Show that  is a tautology. are T
Construct the truth table for   and If and: both T = T, the
show that the formula is always true. rest are F
If P Q : both T & both
F =T
If diff. follow the Q
If Q P& diff. follow P

The truth table is a


tautology for the given
To get the no. of rows use 2n, statement.
n is for no of statements
1. Use a truth table to determine whether the given statement ( p v~ p ) is a tautology.
2 n = 4 rows
p ~q pv~q
The truth table is a tautology for the given statement
T F T
F T T

2.
q r ~q (q ^ r) ~ (q ^ r) ~(q ^r) ^~q q v [~(q ^ r) ^~q]

T T F T F F T
T F F F T F T
F T T F T T T
F F T F T T T
Either it brings the tears into their eyes, or else it doesn’t.
p = It brings tears into their eyes
~p = or else it doesn’t
Construct the truth table and find out if this is tautology
(in symbols : p v ~p)

P ~p p v ~p

T F T

F T T
which says that any statement of the form pv ~p is atautology.
Construct the truth table for the statement p v ~(p ^ q) and show that
this statement is a tautology.

p q P^q ~(p^q) Pv ~(p^q)

T T

T F
Contradictions are statements that are always true
The expression A and ~A is a contradiction.
I don’t believe in reincarnation, but I did in my past life.

Complete the following truth table for the statement p ^ ~(p v q) and show that this
statement is a contradiction.
p q Pvq ~(p v q) P ^ ~ (p v q)

T T

T F

F T

F F
Logical equivalence- two statements are logically equivalent when their truth
tables are identical.
Example: If the price is right, then I will buy this.
The price is not right or I will buy this.
Any two statements of the form p v q are logically equivalent.

p q p ~p q vq
T T T F T T
T F F F F F
F T T T T T
F F T T F T
The third and last columns (set in boldface) are identical, showing that the two
statements have identical truth values regardless of their contents, and thus are
logically equivalent.
Logical equivalence of related conditionals
From the truth table we deduce two important observations:
P q p→q q →p ~p ~q ~p → ~q ~q → ~p

T T T T F F T T
T F F T F T T F
F T T F T F F T
The
F conditionalF p → q and its
T converse qT→ p are not T
logically equivalent.
T T T

Example. The statements If you are Michael Jordans, then you eat Wheaties and
If you eat Wheaties, then you are Michael Jordan do not have the same meaning!

The conditional p → q and its contrapositive (¬q) → ¬p are logically equivalent.


Example. If Mr. X is the murderer, then his right index finger is missing and If his right
index finger is not missing, then Mr. X is not the murderer have the same logical content.

Note. We also observe that the converse q → p and the inverse (¬p) → ¬q are logically
equivalent statements. This should be no surprise since they are the contrapositives of
each other. (See exercise 1.)
Exercises:
1. Determine whether the following pairs of statements are logically equivalent:
(a) p ∨ (p ∧ q) and p.
(b) ¬(p ∨ q) and (¬p) ∨ ¬q.
(c) ¬(p → q) and (¬p) → ¬q.
2.Show that p ∧ (q ∨ r) is logically equivalent to (p ∧ q) ∨ (p ∧ r).

3. Use a truth table to verify the following logical equivalences:


(a) p ∨ q = q ∨ p. (Commutative Law for disjunction.)
(b) p ∧ q = q ∧ p. (Commutative Law for conjunction.)
Truth Values and Truth Tabled

Click icon to add picture Click icon to add picture


Good Day!

See You When?

You might also like