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

ELEMENTARY LOGIC

Teacher: AIROSAL
Course: Mathematics in the Modern World
LEARNING OBJECTIVES
 Discuss the language, symbols and conventions of
mathematics (K)
 Explain the nature of mathematics as a language (K)
(CO3)
 Perform operations on mathematical expressions correctly
(S) (CO5)
 Acknowledge that mathematics is a useful language (V)
(CO6)
What is Logic?

 A reasoning conducted or assessed according to strict


principles of validity.
 It refers to the science that studies the principles of
correct reasoning.

Example
All dogs have a good sense of smell. Volt is a dog.
Therefore, logic tells you that Volt has a good sense of
smell.
What is Logic?

 A reasoning conducted or assessed according to strict


principles of validity.
 It refers to the science that studies the principles of
correct reasoning.

Example
All squares are rectangles. All rectangles have four
sides. Logic, therefore, tells you that all squares have four
sides.
What is Logic?

 Mathematical logic is a subfield


of mathematics exploring the applications of
formal logic to mathematics. It bears close connections
to metamathematics, the foundations of mathematics,
and theoretical computer science.
Axiom

An axiom or postulate is a statement that is


taken to be true, to serve as a premise or
starting point for further reasoning and
arguments.
FALSE, TRUE, STATEMENTS

Axiom: False is the opposite to Truth.


 A statement is a description of something.

Examples of statements:
 Mapua University is in Manila.
 Bill Gates is the CEO of Apple Inc.
 Today is January 9, 2018.
 I’m lying to you.

 Questions: Which statements are True? False? Both?


Neither?
Propositions

A proposition (or statement) is a


declarative statement which is true or
false, but not both.
Propositions

EXAMPLES:
 The following are propositions:

Today is Monday.
You are a student.
An apple is a fruit.

 whereas the following are not:


How do you do?
3+5
Young, dumb and broke.
Examples of Propositions
NOT Propositions
PROPOSITIONAL LOGIC
 Truth value is the attribute assigned to a proposition in
respect of its truth or falsehood, which in classical logic
has only two possible values (true or false).
❖ If P is true, P is assigned the truth value 1.
❖ If P is false, P is assigned the truth value 0.

Example:
p = “Spiderman is real”-False (0)
q = “The list of Philippine presidents includes Elpidio
Quirino.”-True (1)
COMPOUND PROPOSITIONS
 In Propositional Logic, we assume a collection of atomic
propositions are given:
p, q, r, s, t, …
 Then we form compound propositions by using logical
connectives (logical operators) to form propositional
“molecules”.
 In other words, it is a word or symbol that joins two
sentences to produce a new one.
Summary Logical Connectives/Operators

Operator Symbol Usage


Negation  not
Conjunction  and, but
Disjunction  or
Exclusive or  xor
Conditional → if, then
only if
Biconditional  iff
Negation

Symbol Translation
Not P;
P It is not the case that P;
It is false that P;
It is not true that P
Conjunction
Symbol Translation
P and Q;
P moreover Q;
P although Q;
PQ P still Q;
P furthermore Q;
P also Q;
P nevertheless Q;
P however Q;
P yet Q;
P but Q
Example

Let P: Malaya is excellent.


Q: Malaya is virtuous.

1. PQ
2. P  Q
3. P  Q
4. P   Q
Disjunction

Symbol Translation

P or Q;
PQ P unless Q;
Example

Let P: 2 is prime.
Q: 2 is even.

1. PQ
2. P  Q
3. P  Q
4. P  Q
Conditional

Let P and Q be propositions. The


conditional statement or implication
" if P then Q " denoted by P  Q, is
the proposition whose truth value
depends on P and Q.
We call P the hypothesis or premise
and we call Q the conclusion.
Conditional

*Conditional synonyms:
There are many ways to express the
conditional statement p → q :
 If p then q.

 p implies q.

 If p, q.

 p only if q.

 p is sufficient for q.
Example

P: I buy a notebook.
Q: I get a free pencil.
a. If I buy a notebook then I get a free pencil.
b. If I buy a notebook then I don’t get a free
pencil.
c. If I don’t buy a notebook then I get a free
pencil.
d. If I don’t buy a notebook then I don’t get a
free pencil.
Example

“If I get my salary today, then I treat you to


dinner.”

a. If I get my salary today and then, I treat you to


dinner.
b. If I get my salary today and then, I don’t treat you to
dinner.
c. If I don’t get my salary today and then, I treat you to
dinner just the same.
d. If I don’t get my salary today and then I don’t treat
you to dinner.
23
Biconditional

Let P and Q be propositions. The


biconditional statement
" P if and only if Q ", denoted by
P  Q, is the proposition whose
truth value depends on P and Q.
Biconditional

Symbol Translation

P if and only if Q;
P is equivalent to Q;
PQ
P is a necessary and sufficient
condition for Q;
PROPOSITIONS (Logical Operators)

Examples:
p = “Aling Bebang only goes out with girls.”
q = “Aling Bebang goes with Pepay.”
r = “Pepay is a girl.”
Determine the English statement of the ff.
1. r
= “Pepay is not a girl.”
2. pq
= “Aling Bebang only goes out with girls and goes with
Pepay.”
PROPOSITIONS (Logical Operators)

Examples:
p = “Aling Bebang only goes out with girls.”
q = “Aling Bebang goes with Pepay.”
r = “Pepay is a girl.”
3. pq →r
= “If Aling Bebang only goes out with girls and goes
with Pepay, then Pepay is a girl.”
Truth Table

A truth table is a mathematical table showing how


the truth or falsity of a proposition varies with that of its
components.

Example:
PROPOSITIONS (Logical Operators)

p p a) Negation:
 interpreted intuitively as being true
F T
when p is false , and false when p is
T F true
Example:
p : “23 = 15 +7”
 p happens to be false, so p is true.

 So p has the boolean value true


whenever evaluated.
PROPOSITIONS (Logical Operators)

b) Conjunction:
 Conjunction is supposed to encapsulate what happens

when we use the word “and” in English.


 for “p and q ” to be true, it must be the case that
BOTH p is true, as well as q.
 If one of these is false, then the compound statement is

false as well.
p q pq
T T T
T F F
F T F
F F F
PROPOSITIONS (Logical Operators)

c) Disjunction
 The use of the connective “or” in a disjunction

corresponds to one of the two ways the


word “or” is used in English, namely, as an
INCLUSIVE OR. A disjunction is true when at
least one of the two propositions is true.
Example p q p q
 Students who have taken Math005 or
T T T
T F T
Math011 can take Math 140.
F T T
F F F
PROPOSITIONS (Logical Operators)

all true = Tautology


Examples all false = Contradiction
mixed = Contigency
Find the truth table of
1. p ∨¬(p ∧ q)

2. (¬p ∧ q) ∨ (p ∧ ¬ q)
PROPOSITIONS (Logical Operators)

d) Exclusive-Or: p q p q
When the EXCLUSIVE “OR” is used to T T F
connect the propositions p and q, the T F T
proposition “p or q (but not both)” is obtained. F T T
F F F

 Example:
The entrée is served with soup or salad.
 Most restaurants definitely don’t allow you to
get both soup and salad so that the
statement is false when both soup and salad
is served.
PROPOSITIONS (Logical Operators)
PROPOSITIONS (Logical Operators)

p q p →q e) Conditional (Implication):
T T T  It’s only partly similar to the English
T F F usage of “if, then” or “implies”.
F T T
 DEF: p → q is true if q is true, or if p is
F F T
false. In the final case (p is true while q
is false) p → q is false.

Example:
 If I am elected, then I will lower taxes.
PROPOSITIONS (Logical Operators)

f) Bi-Conditional (or double implication)


 For p  q to be true, p and q must have the same
truth value. Else, p  q is false:

p q pq
T T T
T F F
F T F
F F T
PROPOSITIONS (Logical Operators)

Examples
Find the truth table of

(a) (¬q → p)  p

(b) p  q → r ∧ ¬q

(c) [¬(p ∧ q) ∨ r]  (p → q)

You might also like