CHAPTER 2-
THE NATURE OF LOGIC
Copyright : CNE
Mathematics in the Modern World
What we will do in this Chapter.
• We will study the nature and concept of logic as a tool to prove results.
• We will write compound propositions using the language of logic
• We will analyze and explore various types of statements and the
conditions under which they are true.
• We will explore equivalent forms of statements, including those of the
conditional form “if …then…”.
• We will use truth tables to determine whether propositions are
tautologies, contradictions, or contingencies.
• We will use the rules of inferences to determine the validity of arguments.
• We will use different proof techniques to prove the validity of arguments.
The Nature of Logic
Essential Question
• What is the role of logic in
Mathematics?
Mathematics Logic or Propositional Calculus
• Logic is commonly known as the science of
reasoning.
• Mathematical reasoning and arguments are based
on the rules of logic.
• It is a branch of pure mathematics whose goal is
the discovery of valid arguments about
propositions.
• It is sometimes called Mathematical Logic- the
discipline that considers the methods of reasoning.
• It provides the rules and techniques for
determining whether an argument is valid or not.
• To be specific in Mathematics, we use Logic or
logical reasoning to prove theorems.
Propositions
• A proposition is a meaningful declarative
sentence that is either True or False, but not both.
• Examples: Consider the following statements.
• A: 4 is an integer.
• B: is an integer.
• C: Batman is left-handed.
• D: Dynamite is dangerous.
• E: Elephants have wings.
• Each of these statements is a declarative
sentence. Sentences (A) and (D) are True, while
(B), (C), and (E) are False. Hence, they are
propositions.
Propositions
• A proposition is a declarative sentence that
can be classified as true or false, but not
both. Thus, one of the values “truth” or
“falsity” that is assigned to a proposition is
called its “truth value”.
• Abbreviate “truth” to T or 1 and write p is
T (or p is 1); otherwise, say the (logical)
truth value of p is false and write p is F (or p
is 0).
Propositions
Consider the following. Are they
Propositions? Why?
P : How are you?
Q: the square of an integer X
R : Study your lessons every day!
Now, Try these! Which are propositions?
• Consider the following
statements.
p: 5 is less than 3.
q: 7 is an even integer.
r: Every even integer greater
than 4 is a sum of two
odd primes.
s: Will you go?
t: Enjoy the lovely weather!
The Negation of a Proposition
• The negation of a proposition, p,
is the proposition not p. It is
denoted by ~p or . The truth table
of not p is given in the following
table.
P
T or 1 F or 0
F or 0 T or 1
Compound Propositions
• New propositions called compound
propositions or propositional
functions can be obtained from old
ones by using symbolic connectives
or logical operators.
• The propositions that form
propositional functions are called
propositional variables.
Truth Tables
• A truth table displays the
relationships between the truth
values of the propositions.
• The number of statements in the
truth table is where is the number
of propositional variables in the
compound propositions.
Conjunction
• Let p and q be propositions.
The conjunction of p and q,
written as , is the statement
formed by joining statements p
and q using the word “and”.
The statement is true if both p
and q are true; otherwise is
false.
Truth Table: Conjunction
p q
1 1 1
1 0 0
0 1 0
0 0 0
Disjunction
Let p and q be propositions. The
disjunction of p or q, written as ,
is the statement formed by
joining statements p and q using
the word “or”. The statement is
true if at least one of the
statements p or q is true.
Truth Table: Disjunction
p q
1 1 1
1 0 1
0 1 1
0 0 0
Implication or Conditional
• Two statements are connected by “if…
then” to form a new statement.
• The statement , read as “p implies q” or
“p is sufficient for q” or “q if p” or “q
whenever p” is the condition.
• The implication is considered false
when p is true and q is false; otherwise,
it is considered true. p is called the
hypothesis and q is called the
conclusion.
•
Truth Table: Implication
p q
1 1 1
1 0 0
0 1 1
0 0 1
Exclusive Or
• Let p and q be two
propositions. The exclusive or
of p and q; denoted p q, is the
proposition that is true when
exactly one of p and q is true
and is false otherwise.
Truth Table: Exclusive Or
p q
1 1 0
1 0 1
0 1 1
0 0 0
NAND and NOR
Let p and q be two propositions.
• The proposition p NAND q,
written as (Sheffer stroke) is
true when either p or q , or both,
are false; and it is false when both
p and q are true.
• The proposition p NOR q, written
as (Pierce Arrow), is true when
both p and q are false and it is
false otherwise.
Truth Tables: NAND and NOR
p q p q
1 1 0 1 1 0
1 0 1 1 0 0
0 1 1 0 1 0
0 0 1 0 0 1
Now, try constructing the truth table for these.
1. Show that is logically equivalent to
2. Show that is logically equivalent to .
3. Use truth table to verify the
associative law for propositions p, q
and r.
4. Use truth table to verify the
distributive law,
Converse, Inverse, and Contrapositive
Let p and q be statements.
1. The statement is called the converse of
the implication .
2. The statement is called the inverse of
the implication
3. The statement is called the
contrapositive of the implication .
Biimplication or Logically Equivalent
• Let p and q be statements.
The statement “p if and only if q”, written as
pis called the biimplication , or
biconditional, of statements p and q.
• The statement may also be read as
“p is necessary and sufficient for q”
“q is necessary and sufficient for p”
”q if and only if p”
“q when and only when p”
• The statement is considered true when p and
q have the same truth values.
Truth Table: Biimplication or Logically
Equivalent
p q
1 1 1
1 0 0
0 1 0
0 0 1
Tautology, Contradiction, and Contingency
• A compound proposition that is always
true, no matter what the truth values of the
propositions that occur in it, is called a
tautology.
• A compound proposition that is always
false is called a contradiction.
• A compound proposition that is neither a
tautology nor a contradiction is called a
contingency.
Tautology, Contradiction, and Contingency
• A compound proposition that is always
true, no matter what the truth values of
the propositions that occur in it, is called
a tautology.
• A compound proposition that is always
false is called a contradiction
• A compound proposition that is neither a
tautology nor a contradiction is called a
contingency.
• To avoid the use of so many parentheses in a
compound proposition when no confusion
should arise, we adopt the following
conventions.
1. We omit the outer pair of parentheses in
a compound proposition or statement
formula. For example, we write ~p for
(~p).
2. If there is any compound propositions of
the form , we write it as
• In a statement formula or
compound
highest
propositions without
parentheses that second highest
contains logical third highest
connectives, the
logical connectives fourth highest
are evaluated in the
fifth highest
following order; i.e.
the precedence of sixth highest
logical connective is | seventh highest
given in the table. eighth highest
Now try these!
• Determine whether the following
compound propositions or statement
formulas are tautologies, contradictions or
contingencies:
1. [(
2. [(
Logical Equivalences
• p q by definition means that p q
is a tautology.
• Furthermore, the bicon-ditional is
true exactly when the truth values
of p and of q are identical.
• So, if the last columns of truth
tables of p and of q are identical,
the bicon-ditional join of both is a
tautology.
Logical Equivalences
Commutative laws
Associative laws
Distributive laws
Absorption laws
Idempotent laws
Double Negation
De Morgan’s laws
Valid Arguments
• In logic and philosophy, an
argument is a series of
statements typically used to
persuade someone of
something or to present
reasons for accepting a
conclusion.
Rules of Inferences
Rule of Inference Tautology Name
p
pq [p (p q)] r Modus ponens
q
¬q
p q [¬q (pq)]¬p Modus tollens
¬p
pq [(p q) (qr)]
qr Hypothetical
pr (p r) syllogism
pq [(p q) ¬p]q Disjunctive
¬p syllogism
q
p p ( p q) Addition
pq
Rules of Inferences
Rule of Inference Tautology Name
pq
p (p q) p Simplification
p
q [(p)(q)] (p q) Conjunction
pq
pq [(p q) (¬p r]
¬p r Resolution
qr (q r)
p q) (r s) [(p q) (r s)] Constructive
pr dilemma
qs (p r) (q s)
(p q) (r s) [(p q) (r s)] Destructive
¬q ¬s dilemma
¬p ¬r (¬q¬s) (¬p-r)
Example of Valid Argument
• Determine if the following argument is valid.
• The truth table is shown below.
• The truth table shows that is a tautology. Hence, the argument
is valid.
T T T T T
T F F F T
F T F F T
F F F F T
Formal Proofs of the Validity of Arguments
• If arguments contain more than three
different simple statements as
components, it is unwieldy to construct
truth tables especially when the number of
propositional variables involved in the
argument is more than 3.
• A more convenient method of establishing
the validity of some arguments is to
deduce their conclusions from their
premises by a sequence of shorter, more
elementary arguments that are already
known to be valid.
Formal Proofs of the Validity of Arguments
Consider the following argument:
If horses fly or cows eat artichokes, then the mosquito is
the national bird. If the mosquito is the national bird, then
peanut butter tastes good on hot dogs. But peanut butters
tastes terrible on hotdogs. Therefore, cows don’t eat
artichokes.
Let F: denotes the proposition “horses fly”
A: denotes the proposition “cows eat
artichokes”;
M: denotes the proposition “the mosquito
is the national bird”
P: denotes the proposition “peanut
butter tastes good on hotdogs”.
Formal Proofs of the Validity of Arguments
Consider the following argument:
If horses fly or cows eat artichokes, then the mosquito is the
national bird. If the mosquito is the national bird, then peanut
butter tastes good on hot dogs. But peanut butters tastes
terrible on hotdogs. Therefore, cows don’t eat artichokes.
Let F: denotes the proposition “horses fly”
A: denotes the proposition “cows eat
artichokes”;
M: denotes the proposition “the mosquito
is the national bird”
P: denotes the proposition “peanut butter
tastes good on hotdogs”.
Formal Proofs of the Validity of Arguments
The argument can be
represented as:
1. (F A) M
2. M P
3. ¬P ¬A
Fallacies
• In logic, a fallacy is an error in reasoning
that results in an invalid argument.
• These are the Fallacy of Affirming the
Consequent and the Fallacy of Denying
the Antecedent.
• These are Invalid argument format and
bear resemblance to the Valid
Arguments Modus Ponens and Modus
Tollens.
Conditional Proof
• Given an argument whose conclusion is
a conditional statement, a proof of its
validity, using the rule of Conditional
proof is constructed by assuming the
antecedent of its conclusion as an
additional premise, and then deducing
the consequent of its conclusion by a
sequence of elementary valid
arguments.
Example of Conditional Proof
Consider the argument.
Construct a conditional proof of
its validity.
/
Example of Conditional Proof
Statements Justification
1 Premise
2 / Premise
3 Conditional Proof
4 3, Addition
5 1, 4, Modus Ponens
6 5, Commutative law
7 6, Simplification
8 7, Addition
9 2, 8, Modus Ponens
Indirect Proof
• The method of Indirect Proof is often
called the method of proof y reduction ad
absurdum or reduces to an absurdity.
• An indirect proof of validity for a given
argument is constructed by assuming, as
an additional premise, the negation of its
conclusion, and then deriving an explicit
contradictions from the augmented set of
premises.
Example of Indirect Proof
Consider the following argument.
Construct an indirect proof of its
validity.
Example of Indirect Proof
Statements Justification
1 Premise
2 Premise
3 / Premise
4 Indirect Proof
5 2, 4, Modus Tollens
6 5, De Morgan’s law
7 6, Commutative
8 7, Simplification
9 3, 8, Disjunctive Syllogism
10 1, 9, Modus Ponens
11 10, Simplification
12 6, Simplification
13 11, 12, Conjunction
Now try this!
• If either Algebra or Geometry is required, then all
students will study Mathematics. Algebra is required and
Trigonometry is required. Therefore, all students will
study Mathematics.
• Use A: Algebra is required.
G: Geometry is required.
T: Trigonometry is required.
M: All students study Mathematics.
• Write this argument in propositional form.
• Determine if this argument is valid using
truth table.
• Construct a formal proof if it is valid.