LOGIC1-3_MASCI(1)

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

Symbolic Logic

RUEL CUETO

Centro Escolar University


LOGIC
What is Logic?

✓ The science or study of how to evaluate arguments &


reasoning.
✓ It differentiate correct reasoning from poor
reasoning.
✓ It is important in sense that it helps us to reason
correctly.

✓ The methods of reasoning.


Mathematical Logic
✓ Mathematical logic (or symbolic logic) is a branch
of mathematics with close connections to computer
science.
✓ Mathematical study of logic and the applications of
formal logic to other areas of mathematics.
✓ It also study the deductive formal proofs systems
and expressive formal systems.

Four Divisions:
Set Theory Recursion Theory
Proof Theory Model Theory
Aristotle (382-322 BC)

Aristotle is generally regarded as


the Father of Logic

The study started in the late 19th


century with the development of
axiomatic frameworks for analysis,
geometry and arithmetic.
Statement

A statement (or proposition) is a declarative


sentence which is either true or false, but not both.

The truth value of the statements is the truth and


falsity of the statement.
Example
Which of the following are statements?
1. Manila is the capital of the Philippines. Is true
A statement.

2. What day is it? It is a question


Not a statement.
3. Help me, please. It cannot be categorized as true or false.
Not a statement.

4. He is handsome. Is neither true nor false - “he” is not


specified.
Not a statement.
Ambiguous Statements

W: I am lying.

Although w is a declarative sentence,


.
it is not a proposition because it can
neither be true nor false. Suppose w
is true – that is, it is the case that I
am lying. Since I am lying, my
statement is not true, and so w must
be false.
Ambiguous Statements

1. Mathematics is fun.

2. Calculus is more interesting than Trigonometry.

3. It was hot in Manila.

4. Street vendors are poor.


Propositional Variable

A variable which used to represent a statement.

A formal propositional written using propositional logic


notation, p, q, and r are used to represent statements.
p1 : It is not the case that 2is a rational number.
p2: Either logic is fun and interesting, or it is boring.
p3 : If you study hard, then you will get good grades.
p4 : If you are more than 60 years old, then you are
entitled to a Senior Citizen’s card, and if you are
entitled to a Senior Citizen’s card, then you are more
than 60 years old.
Proposition Simple components Compound proposition

P1 r: 2 is a rational number. not r.

P2 f: Logic is fun.
i: Logic is interesting. f and i, or b.
b: Logic is boring

P3 h : You study hard. If h, then g.


g: You get good grades.

p4 d: You are more than 60 years (if d, then l) and (if l,


old. then d)
l: You are entitled to a Senior
citizen’s card.
Logical Connectives

Logical connectives are used to combine simple statements


which are referred as compound statements.

✓ A compound statement is a statement composed of two or


more simple statements connected by logical connectives

“or” “not” “if then”


“and” “exclusive-or.” “if and only if”

✓ A statement which is not compound is said to be simple


(also called atomic).
Logical operators
Given a proposition, its truth table show all its
possible truth values.

Example: Since a proposition has two possible


truth values, a proposition p would have the
following truth table.
p
T
F
• Logical true
The output value is always true, regardless of
the input value of p
Logical True
p T

T T

F T
Logical false
• The output value is never true: that is, always
false, regardless of the input value of p
Logical False
p F
T F
F F
• Logical identity
• Logical identity is an operation on one logical
value p, for which the output value remains p.
• The truth table for the logical identity
operator is as follows:
Logical Identity
p p
T T
F F
• Truth tables can also be used to display various combinations
of the truth values of two propositions p and q. The rows of
the table will correspond to each truth value combination of p
and q, so there will be 22 = 4 rows. The truth table for
propositions p and q are as follows.

p q

T T

T F

F T

F F
Similarly, suppose p, q, and r are propositions. Then the truth
table involving the given propositions has 23 = 8 rows., as
shown in the table below.

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
• In general, a truth table
involving n propositions has 2 n

rows.
Conjunction
The conjunction of the statement p and q is the compound
statement “p and q.”

Symbolically, p  q, where  is the symbol for “and.”

Property 1: If p is true and q is true, then p  q is true;


otherwise p  q is false. Meaning, the conjunction of
two statements is true only if each statement is true.

p q pq
T T T
T F F
F T F
F F F
Example

Determine the truth value of each of the following conjunction.

1. 2 + 6 = 9 and man is a mammal. False


False True

2. Manny Pacquiao is a boxing champion and Gloria False


Macapagal Arroyo is the first female Philippine
President.
3. Ferdinand Marcos is the only three-term Philippine True
President and Joseph Estrada is the only Philippine
President who resigns.
Example
• Let p and q be the following propositions.

p: Angels exist.
q: π > 3
Express the following conjunctions as English
sentences or in symbols, as the case maybe.
a. p ∧ q c. “Angels do not exist and π ≤ 3.”
b. p ∧ (∼q) d. “While angels do not exists, π > 3
Ans.
p ∧ q : “Angels exist and π > 3.”
p ∧ (∼q) : Angels exist and π ≤ 3.” or
“Angels exists, yet π ≤ 3.”

In symbols, (∼ p) ∧ (∼q)
In symbols, (∼ p) ∧ q
In logic the statement is a conjunction
• In the example above, since proposition
q is true, the conjunction p ∧ q is true
when p is proven to be true. On the
other hand, both conjunctions p ∧ (∼q)
and (∼ p) ∧ (∼q) are false because one
of the conjunctions, namely ∼q, is false.
Tip
Based on the given example, do not
always use the word “and”. Words
like “but”, “ even though”, “yet”, and
“while” are also used to flag
conjunctions.
Consider the following sentences.
• Carlo is competitive and hardworking.
• Carlo is competitive but hardworking.
• Carlo is competitive yet hardworking.
• Although Carlo is competitive, he is
hardworking.
• While Carlo is competitive, he is hardworking.
• In ordinary language, these sentences have
subtle differences. However in logic, we are
only interested in whether the proposition is
true or not, and how the truth value of the
compound proposition ( a conjunction in this
case) depends on the truth value of its simple
components.
• Hence in logic, all these statements can be
represented by the conjunction p ∧ q , where

p : “Carlo is competitive”
q : “Carlo is hardworking”
Statement
The disjunction of the statement p, q is the compound
statement “p or q.”
Symbolically, p  q, where  is the symbol for “or.”

Property 2: If p is true or q is true or if both p and q are true,


then p  q is true; otherwise p  q is false. Meaning,
the disjunction of two statements is false only if
each statement is false.
p q pq
T T T
T F T
F T T
F F F
Example
Determine the truth value of each of the following disjunction.

1. 2 + 6 = 9 or Manny Pacquiao is a boxing champion. True


False True

2. Joseph Ejercito is the only Philippine President who True


resigns or Gloria Macapagal Arroyo is the first female
Philippine President.

3. Ferdinand Marcos is the only three-term Philippine True


President or man is a mammal.
Example
• Let p, q, and r be the following propositions.

p: Victor has a date with Liza.


q: Janree is sleeping.
r: Eumir is eating.
Express the following propositions in English or in
symbols as case maybe.
a. p∨q
b. q ∨ (∼r)
c. p ∨ (q ∨ r)
d. Either Victor has a date with Liza or Janree is sleeping,
or Eumir is eating.
Ans.
a. Victor has a date with Liza or Janree is sleeping.
b. Either Janree is sleeping ,or Eumir is not eating.
c. Either Victor has a date with Liza, or Janree is sleeping
or Eumir is eating.
d. (p ∨ q) ∨ r
• The propositions

p ∨ (q ∨ r) : Either Victor has a date with Liza, or Janree is


sleeping or Eumir is eating”

(p ∨ q) ∨ r : Either Victor has date with Liza or Janree is


sleeping, or Eumir is eating.

Notice that even as English they are very similar. They are
actually equivalent; and that is compound propositions are
logically equivalent.
Negation

The negation of the statement p is denoted by p, where  is


the symbol for “not.”

Property 3: If p is true, p is false. Meaning, the truth value of


the negation of a statement is always the reverse of
the truth value of the original statement.

p p
T F
F T
Negation
p ∼p

T F

F T

*the simplest logical operator.


* The truth table tells us that when p is true, its
negation is ∼p is false. On the other hand, when p is
false, the negation ∼p is true.
Example

The following are statements for p, find the corresponding p.

1. 3 + 5 = 8. 3 + 5  8.

2. Sofia is a girl. Sofia is a boy.

3. Achaiah is not here. Achaiah is here.


State the negation of the following.
x −1
n1 : p( x) = is a polynomial function.
x+2

x −1
p( x) =
∼n : It is not true that is a polynomial
x+2
x −1
function; or simply p( x) = x + 2 is not a polynomial
function.
Tip:
It is a common mistake to assume that the
proposition ∼p is automatically false. Just
because it involves a negation. However, ∼p
can be true – this happens when p is false.

Example: ∼n2 is true because n2 is false.


n4 : Everyone in Visayas speaks Cebuano.

∼n4: Not everyone in Visayas speaks Cebuano.


• Also note that negation ∼p is not necessarily
the complete opposite of p. For example, the
negation of the statement
• “Everyone in Visayas speaks Cebuano.” merely
states that there are Visayans who do not
speak Cebuano.
- the negation does not say that all Visayans
do not speak Cebuano.
Conditional

The conditional (or implication) of the statement p and q is the


compound statement “if p then q.”

Symbolically, p → q, where → is the symbol for “if then.” p is


called hypothesis (or antecedent or premise) and q is called
conclusion (or consequent or consequence).

Property 4: The conditional statement p q p→q


p → q is false only when p is true and T T T
q is false; otherwise p → q is true. T F F
Meaning p → q states that a true F T T
statement cannot imply a false F F T
statement.
• Example: Suppose Gina is G11 student.
P1: If Gina is in G11, then she is a SHS.
P2: If Gina is in G11, then she is working a
lawyer.
P3: If Gina has a degree in computer science,
then she believes in true love.
Example

In the statement “If vinegar is sweet, then sugar is sour.”

The antecedent is “vinegar is sweet,” and

the consequent is “sugar is sour.”


Example

Obtain the truth value of each of the following conditional


statements.
1. If vinegar is sweet, then sugar is sour. True
False False

2. 2 + 5 = 7 is a sufficient condition for 5 + 6 = 1. False


True False

3. 14 – 8 = 4 is a necessary condition that 6  3 = 2. True


False True
Biconditional
The biconditional of the statement p and q is the compound
statement “p if and only if q.”

Symbolically, p  q, where  is the symbol for “if and only if.”

Property 5: If p and q are true or both false, then p  q is true;


if p and q have opposite truth values, then p  q is
false.

p q pq
T T T
T F F
F T F
F F T
Example
Determine the truth values of each of the following
biconditional statements.

1. 2 + 8 = 10 if and only if 6 – 3 = 3. True


True True

2. Manila is the capital of the Philippines is equivalent False


to fish live in moon.

3. 8 – 2 = 5 is a necessary and sufficient for 4 + 2 = 7. True


Exclusive-Or
The exclusive-or of the statement p and q is the compound
statement “p exclusive or q.”

Symbolically, p  q, where  is the symbol for “exclusive or.”

Property 6: 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 pq
T T F
T F T
F T T
F F F
Example
“Sofia will take her lunch in Batangas or she will have it in
Singapore.”

Case 1: Sofia cannot have her lunch in Batangas and at False


the same time in do it in Singapore,”

Case 2: If Sofia will have her lunch in Batangas or in True


Singapore, meaning she can only have it in one
location given a single schedule.

Case 3: If she ought to decide to have her lunch False


elsewhere (neither in Batangas nor in Singapore).
Example

Construct the truth table for each of the following statements.

1. p  q

2. p → (p  q)

3. (p  q)  (p  q)

4. (p → q)  (q  r)
Solution

1. p  q

p q p q p  q
T T F F F
T F F T T
F T T F T
F F T T T
Solution

2. p → (p  q)

p q q p  q p → (p  q)
T T F F F
T F T T T
F T F T T
F F T F T
Solution

3. (p  q)  (p  q)

p q p p  q q p  q (p  q)  (p  q)
T T F F F F F
T F F F T T T
F T T T F F T
F F T F T F F
Solution

4. (p → q)  (q  r)

p q r p→q r q  r (p → q)  (q  r)
T T T T F F T
T T F T T T T
T F T F F F F
T F F F T F F
F T T T F F T
F T F T T T T
F F T T F F T
F F F T T F T
Classes of Compound Statements

Tautology is a compound statement that is true for all possible


combinations of the truth values of the propositional variables
(also called logically true).

Contradiction is a compound statement that is false for all


possible combinations of the truth values of its propositional
variables (also called logically false or absurdity).

Contingency is a compound statement that can be either true


or false, depending on the truth values of the propositional
variables are neither a tautology nor a contradiction.
Example

1. (p  q) → q

p q p p  q (p  q) → q
T T F F T
T F F F T
F T T T T
F F T F T

Since all the truth values of the compound statement


(p  q) → q are true, thus it is a tautology.
Example

2. (p → q)  (p → q)

p q p→q q p → q (p → q)  (p → q)
T T T F F F
T F F T T F
F T T F T T
F F T T T T

Note that the truth values of the statement


(p → q)  (p → q) are combinations of true and false,
therefore the compound statement is a contingency.
Example

3. (p  q)  (p → q)

p q p p  q p→q (p  q)  (p → q)
T T F T T F
T F F F F F
F T T T T F
F F T T T F

Observed that all the truth values of the compound


statement are false, thus it is a contradiction.
Logical Equivalent

Two statements are said to be logically equivalent (or


equivalent) if they have the same truth value for every row
of the truth table, that is if x  y is a tautology. Symbolically,
x  y.
Laws of logical Equivalence
Laws Logical Equivalence
Commutative pqqp
pqqp
Associative p  (q  r)  (p  q)  r
p  (q  r)  (p  q)  r
Distributive p  (q  r)  (p  q)  (p  r)
p  (q  r)  (p  q)  (p  r)
Identity ptp
pFp
Inverse p  p  F
p  p  t
Laws of logical Equivalence
Laws Logical Equivalence
Double Negation (p)  p
Idempotent ppp
ppp
De Morgan’s (p  q)  p  q
(p q)  p  q
Universal Bound pFF
ptt
Absorption p  (p  q)  p
p  (p  q)  p
Laws of logical Equivalence

Laws Logical Equivalence


Additional logical equivalences are as follows:
Exportation Law (p  q) → r  p → (q → r)
Contrapositive p → q  q → p
ReductioAd Absurdum p → q  (p  q) → F
Equivalence p  q  (p → q)  (q → p)
p  q  (p  q)  (p  q)

Implication p → q  p  q

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy