Lecture 3
Lecture 3
Logic
Def: There are two important quantifiers that are often used in mathematics.
These quantifiers just give a more compact way of writing statements, for example,
1
∃x ∈ N, s.t. ∈ N.
x
is a more compact way to say the statement “There exists an element of the natural
numbers, x, such that its reciprocal, x1 , is also a natural number.” Similarly,
∀x ∈ R, x2 > 0.
says, “For every element x of the real numbers, x2 > 0.”
Ex: Determine the truth values of the above statements. The first is true because of
x = 1 and the second is false because x = 0.
We have the following examples of converting english sentences to quantifiers.
Ex:
to be the logical conjunction of all the statements Pi , i.e. the statement that is only
true if every statement Pi is true. Similarly, we define
_
Pi ,
i∈Λ
to be the logical disjunction of all the statements Pi , i.e. the statement that is true
if at least one of the Pi are true.
Note Given a finite index set, i.e. Λ = {1, 2, . . . , n},
^ n
^
Pi = Pi = P1 ∧ P2 ∧ · · · ∧ Pn .
i∈Λ i=1
Similarly,
_ n
_
Pi = Pi = P1 ∨ P2 ∨ · · · ∨ Pn .
i∈Λ i=1
Negating Quantifiers
From our rules of negation from earlier and what we showed immediately above, it is
easy to see what the negation of our quantifiers are.
Let P (x) be a statement for each variable, x in some set S. Then
!
^ _
¬(∀x ∈ S, P (x)) = ¬ P (x) = ¬P (x) = ∃x ∈ S, ¬P (x).
x∈S x∈S
3
Similarly,
!
_ ^
¬(∃x ∈ S, P (x)) = ¬ P (x) = ¬P (x) = ∀x ∈ S, ¬P (x).
x∈S x∈S
From this we see that the negation of a universal quantifier is in general an existential
quantifier, and vice–versa.
Note:
• When trying to disprove a ‘for every’ statement, because of the above you
only need to assure the existence of one counterexample.
• When trying to disprove a ‘there exists’ statement life is a little harder. Be-
cause of the above, to disprove the statements you must assure the negation
happens for every possible case.
Ex: We first translate the statement “For all real numbers x, x3 = x.” into our new
language involving quantifiers.
∀x ∈ R, x3 6= x.
¬(∀x ∈ R, x3 6= x) ⇐⇒ ∃x ∈ R, x3 = x.
∃z ∈ Z, ¬(n is even)
c). “For every real number x, there is a real number y for which y 3 = x”
∀x ∈ R, ∃y ∈ R, y 3 = x
∀a, b ∈ Q, ab ∈ Q
And now their negations (do note that as all of the prior statements above are true,
thus all of these negations will be false)
4
a).
∃n ∈ Z, ¬(n is odd) ∧ ¬(n is even)
or equivalently
∃n ∈ Z, (n is odd) ∧ (n is even)
b).
∀z ∈ Z, (n is even)
c).
∃x ∈ R, ∀y ∈ R, y 3 6= x
d).
∃a, b ∈ Q, ab ∈
/Q
•
∀x ∈ R, ∃y ∈ R, y 3 = x
•
∃y ∈ R, ∀x ∈ R, y 3 = x
The first says “For every real number x, there is a real number y for which y 3 = x”
(and is true) whereas the second says “There is a real number y, such that y 3 = x for
all real numbers x” (which is clearly false)
Note: Just to make this clear. When P and Q are statements that depend on a
variable x and you are given the implication statement
P (x) =⇒ Q(x)
This is equivalent shorthand to saying
∀x ∈ X, P (x) =⇒ Q(x)
Ex: Let us convert more statements from english into quatifier form
• We say f is continuous at a, if for any > 0, there is a delta δ > 0 such that
|x − a| < δ implies |f (x) − f (a)| < .
∀ > 0, ∃δ > 0, ∀x ∈ X, (|x − a| < δ) =⇒ (|f (x) − f (a)| < )
5
For practice we will negate the statement of continuity, however to do so we will need
to make use of something I snuck in earlier, which is negating implications. If we use
that P =⇒ Q is logically equivalent to ¬P ∨ Q, then we have
¬(P =⇒ Q) ⇐⇒ (P ∧ ¬Q)
For more practice, let us find the negation of the principle of mathematical induction.
Let us first find what ¬ PMI is. Using the statement formulation of PMI.
¬[(P (1) ∧ (P (n) =⇒ P (n + 1))) =⇒ (∀m ∈ N, P (m)).] ⇐⇒
¬[¬(P (1) ∧ (P (n) =⇒ P (n + 1))) ∨ (∀m ∈ N, P (m))] ⇐⇒
P (1) ∧ (P (n) =⇒ P (n + 1)) ∧ ¬(∀m ∈ N, P (m)) ⇐⇒
P (1) ∧ (P (n) =⇒ P (n + 1)) ∧ (∃m ∈ N, ¬P (m))
Logical Inference
Logical inference is the process of deducing the truth of a third statement given that
two prior statements are true. Notationally this appears as writing two statements
in a row, followed by a line, and then the statement that is deduced. For example
A
B
A∧B
6
There are three rules that are used commonly in logical arguments
(1) Modus Ponens: Saying the statement P =⇒ Q is true tells you nothing about
the truth of P and Q seperately, however, knowing this statement is true and
P is true allows you to deduce P , i.e.
P =⇒ Q
P
Q
(2) Modus Tollens: This is modus ponens using that an implication and it’s con-
trapositive have equivalent truth values
P =⇒ Q
¬Q
¬P
(3) Elimination: this uses that a logical disjunction is only false when both state-
ments are false
P ∨Q
¬P
Q