Math LOGIC
Prepared by:
Ma. Nelia B. Abiera-Soriano, MAEd
The invention of logic is attributed to the ff:
Aristotle (384-322 BC) , a Greek philosopher
George Boole (1815-1864) wrote the Laws of Thought
where logic was developed into an abstract
mathematical system like algebra.
Augustus de Morgan (1806 - 1871), founded symbolic
logic.
Logic and Propositions
Logic
- is the formal systematic study of the principles of valid inference and
correct reasoning.
- is a discipline that deals with the study of reasoning. It provides rules
and techniques for determining whether a given argument is valid or
not.
The rules of logic are used in many areas, particularly in mathematics.
Logical methods are used to prove theorems or to distinguish
between valid and invalid mathematical arguments. It is also
essential in computer science in verifying the correctness of
programs.
A proposition is any declarative sentence that is either true or false,
but not both.
The truth value of a proposition is true, denoted
by T ( or 1), if it is a true proposition and false,
denoted by F (or 0), if it is a false proposition.
Example: Which of the following are propositions?
a. Today is Monday.
b. Did you buy the textbook?
c. 13 + 17 = 40
d. Take your medicine.
e. There are eight planets in the solar system.
f. 23 – x = 11
Logical Connectives
A proposition is said to be atomic if it cannot be
further subdivided. Atomic propositions may be
combined to form compound propositions. Atomic
propositions are usually denoted by lowercase
letters p, q, r etc.
Compound propositions are formed by combining
one or more atomic propositions using logical
connectives or logical operators used in logic. These
are the negation, conjunction, disjunction,
conditional and biconditional.
Negation
The negation of a proposition p, denoted by
~p (read as “not p”), is the statement
“It is not the case that p”. The truth value
of ~p is the opposite of the truth value of p.
Conjunction
The conjunction of two propositions 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
Disjunction
The disjunction of two propositions p and q,
denoted by p v q, is the proposition
“p or q”. The disjunction p v q is false when
both p and q are false and is true otherwise.
Exclusive or
The exclusive or of propositions p and q,
denoted by p⊙q, is the proposition that is
true when exactly one of p and q is true and
is false otherwise.
Conditional
The conditional statement (also called
implication) p→q is a proposition
“if p then q”. The conditional statement
p→q is false when p is true and q is false, and
true otherwise. In the statement p→q , p is
called the hypothesis(or antecedent or premise)
and q is called the conclusion (or
consequent).
Biconditional
The biconditional statement p↔q is the
proposition “p if and only if q”. The
biconditional statement p↔q is true when p
and q have the same truth values, and is false
otherwise.
Example: Let p: John learns math logic.
q: John will get a good grade.
Write: a. p →q
b. q↔p
c.~p →~q
d. ~q↔~p
Example
Let p: You pass the final examination.
q: You do every exercise in class.
r: You pass this course.
a. You pass the final exam and this course.
b. You pass this course but you do not do every exercise
in class.
c. If you either do every exercise in class or pass the
final examination you will pass this course.
d. You will pass this course if and only you both do
exercise in class and pass the final exam.
e. You wont pass this course if you neither pass the final
exam nor do every exercise in class.
Symbol Operator Words commonly used
Negation not
~
ˆ Conjuction and
ˇ Disjunction or
→
Conditional If - then
↔
Biconditional If and only if
Truth Tables for Compound Propositions
Logical Equivalences
Compound propositions that have the same
truth values in all possible cases are called
logically equivalent.
Definition
The propositions p and q are called
logically equivalent if p q is a tautology.
The notation p q denotes that p and q
are logically equivalent.
Illustration1
Show that p q and p q are logically
equivalent.
p q pq p pq (pq) (pq)
T T T F T T
T F F F F T
F T T T T T
F F T T T T
Illustration 2
Show that the statements “ If you study hard and attend every
meeting then you get a good grade” and “ If you do not get a
good grade then you either do not study hard or you do not
attend every meeting” are logically equivalent.
Let p : You study hard.
q : You attend every meeting.
r : You get a good grade.
(p q) r
If you study hard and attend every
meeting then you get a good grade.
r ( p q)
If you do not get a good grade then you
either do not study hard or you do not
attend every meeting.
p q r p q r pq 1r p r2
q
1 2
T T T F F F T T F T
T T F F F T T F F F
T F T F T F F T T T
T F F F T T F T T T
F T T T F F F T T T
F T F T F T F T T T
F F T T T F F T T T
F F F T T T F T T T
There are three related conditional statements
that can be derived from a given conditional.
These are the converse, inverse, and
contrapositive.
Given a conditional statement p→q , then the
i. converse is defined as ; q→p
ii. inverse is defined as ; ~p→~q ; and
iii. contrapositive is defined as ~q→~p
The Converse and the Inverse
• The converse of p q is q p.
• The inverse of p q is p q.
converses
pq qp
converses
p q q p
The Converse and the Inverse
• The converse of p q is q p.
• The inverse of p q is p q.
converses
pq qp
inverses inverses
converses
p q q p
The Converse and the Inverse
• The converse of p q is q p.
• The inverse of p q is p q.
converses
pq qp
inverses contra positives inverses
converses
p q q p
RULES OF REPLACEMENT
The rules of replacement tell us that any
logically equivalent expression can replace
each other wherever they occur.
Let p, q and r represent propositions.
The rules of replacement are as follows.
Equivalence Name
pTp
pFp Identity Laws
p p F
pTT
Domination Laws
pFF
ppp
Idempotent Laws
ppp
(p) p
Double Negation
pqqp
Commutative Laws
pq qp
(p q) r p (q r)
Associative Laws
(p q) r p (q r)
p (q r) (p q) (p r)
Distributive Laws
p (q r) (p q) (p r)
(p q) p q
De Morgan’s Laws
(p q) p q
(p q) p q
Material Implication
(p q) (p q) (q p)
Material Equivalence
p (p q) p
Absorption
p (p q) p
Example
1. Show that [ p (p q) ] and p q are
logically equivalent.
2. Show that q [(p q) (p q)] p q.
Show that q [(p q) (p q)] p q.