Download Week 3: Logical Language

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of logic wikipedia , lookup

Axiom wikipedia , lookup

Intuitionistic logic wikipedia , lookup

Analytic–synthetic distinction wikipedia , lookup

Mathematical logic wikipedia , lookup

Jesús Mosterín wikipedia , lookup

Propositional calculus wikipedia , lookup

Tractatus Logico-Philosophicus wikipedia , lookup

Argument wikipedia , lookup

Inquiry wikipedia , lookup

Modal logic wikipedia , lookup

Meaning (philosophy of language) wikipedia , lookup

Indeterminacy (philosophy) wikipedia , lookup

Mathematical proof wikipedia , lookup

Theorem wikipedia , lookup

Foundations of mathematics wikipedia , lookup

Laws of Form wikipedia , lookup

Interpretation (logic) wikipedia , lookup

Syllogism wikipedia , lookup

Natural deduction wikipedia , lookup

Law of thought wikipedia , lookup

Falsifiability wikipedia , lookup

Catuṣkoṭi wikipedia , lookup

Truth-bearer wikipedia , lookup

Accessibility relation wikipedia , lookup

Principia Mathematica wikipedia , lookup

Transcript
Week 3: Logical Language
“Then you should say what you mean,” the March Hare went on.
“I do,” Alice hastily replied; “at least – at least I mean what I say – that’s the
same thing, you know.”
“Not the same thing a bit!” said the Hatter. “You might just as well say that ‘I
see what I eat’ is the same thing as ‘I eat what I see’!”
Lewis Carroll
Symbolic Logic
Before the development and widespread acceptance of symbols like +, −, ⋅, =, 0, and ², not
to mention variables like 𝑥, early mathematicians had to deal with statements that were
very hard to manipulate. This was the case until at least the 16th Century, when Robert
Recorde introduced the “equals” sign. Without these conveniences, a problem might read:
“Twice the square of a number, plus five, is the same as eleven times the number.” Could
you imagine using such a statement directly to determine that the number in question must
either be 1 or 5? On the other hand, we can work with the shorthand statement
“2𝑥 2 + 5 = 11𝑥” quite easily.
The symbols of arithmetic and algebra allow us to state general properties of numbers. For
example, the fact that multiplication “distributes over addition” can be written as follows:
“𝑥(𝑦 + 𝑧) = 𝑥𝑦 + 𝑥𝑧.” Imagine trying to explain this relatively simple fact, which applies to
any three numbers, without using any of the shorthand symbols used here.
Now, just as arithmetical and algebraic shorthand allows us to see more clearly into
relationships between numbers, logical shorthand can help clarify relationships between
mathematical statements. As a first example, it was noted before that most mathematical
propositions can be written in the form “If 𝑃1 , then 𝑃2 ,” with the symbols 𝑃1 and 𝑃2
representing two mathematical statements. A proposition of this form can be written in
shorthand as follows:
𝑃1 → 𝑃2
As we have seen (and will continue to see), it is often useful to consider the idea that a
statement is not true. A proposition of the form “𝑃 is not true” can be written in shorthand
as follows:
¬𝑃
For example, the proposition “if a positive whole number is even, then it is not odd” has the
following logical structure: 𝑃1 → ¬𝑃2 .
Week 3
Page 2
In mathematical statements, the words “and” and “or” often appear. A proposition of the
form “𝑃1 and 𝑃2 ” can be written in shorthand as follows:
𝑃1 ∧ 𝑃2
A proposition of the form “𝑃1 or 𝑃2 ” can be written in shorthand as follows:
𝑃1 ∨ 𝑃2
For example, the proposition “if 𝑎 is even and 𝑏 is odd, then 𝑎 + 𝑏 is odd” has the following
logical structure: (𝑃1 ∧ 𝑃2 ) → 𝑃3 . The proposition “if 𝑛 is a positive whole number, then 𝑛 is
even or 𝑛 is odd” has the following logical structure: 𝑃1 → (𝑃2 ∨ 𝑃3 ).
Mathematical English
It is vitally important at this stage to understand the exact meaning of the logical symbols
that have been introduced, and how they are connected to the English language, which is
usually less precise than it should be. In most settings, mathematical statements – including
most of those that we will prove – are written in plain English. We must be careful to
understand a given statement’s logical meaning before attempting to prove it. Also, it is
usually considered bad form to use logical symbols in a formal proof, so in order to avoid
confusing the reader (or even yourself), you must know how to express your logical
thoughts clearly in English.
A statement of the form 𝑃1 ∧ 𝑃2 can be expressed in English in the following ways, among
others:


“𝑃1 and 𝑃2 ”
“𝑃1 , and also 𝑃2 ”


“Both 𝑃1 and 𝑃2 ”
“𝑃1 , but 𝑃2 ”
It may seem strange that, logically, “and” means the same thing as “but.” An example of this
is “Bob is old, but he has a full head of hair.” Clearly this statement carries the same raw
information as “Bob is old and he has a full head of hair.” In English, we often use “but” to
express an “and” statement that is surprising or unusual in some way. Also note that when
we wish to express a statement of the form ¬𝑃1 ∧ ¬𝑃2 in English, we usually say “Neither 𝑃1
nor 𝑃2 .”
A statement of the form 𝑃1 ∨ 𝑃2 can be expressed in English in the following ways, among
others:

“𝑃1 or 𝑃2 ”

“Either 𝑃1 or 𝑃2 ”
The word “or” is often used in English to express a mutually exclusive situation (a
dichotomy). For example, “Clean your room or you’re grounded” does not usually signify
that you might clean your room and still be grounded. However, in mathematical writing,
Week 3
Page 3
the word “or” should never carry with it any sense of exclusivity. For example, in
mathematics, if we say a whole number is “either even or odd,” we are not automatically
ruling out the possibility that it might be both. This is often a major point of confusion for
students reading mathematics! Remember that we proved earlier that every positive whole
number is either even or odd, and in an entirely separate proof, we saw that no positive
whole number is both even and odd.
A statement of the form ¬𝑃 is called the negation1 of 𝑃. The statement ¬𝑃 can be expressed
in the following ways, among others:


“Not 𝑃”
“𝑃 is false”

“It is not the case that 𝑃”
It is most common in English for a negation like ¬𝑃 to be expressed in a way that depends
on the nature of the statement 𝑃, usually in the most useful way possible. For example, if 𝑃
is the statement “𝑥 is even,” we could think of ¬𝑃 as “𝑥 is not even,” or as “it is not the case
that 𝑥 is even,” but it is probably most useful to think of ¬𝑃 as “𝑥 is odd.”
There are other subtleties involved with negations in English, especially when desires are
being expressed. For example, one might think that the negation of “I want you to go to the
party tonight” is “I do not want you to go to the party tonight.” However, in everyday
English this phrase usually carries the same meaning as “I want you to not go to the party
tonight,” which is not a correct negation of the original statement. Fortunately, since
desires generally do not enter into the logic of mathematics, this level of imprecision is
mostly avoided.
A good way to think about a negation is that a statement and its negation cannot both be
true, and they cannot both be false.
A statement of the form 𝑃1 → 𝑃2 is called a conditional2 or an implication. This statement
can be expressed in the following ways, among others:





“If 𝑃1 , then 𝑃2 ”
“𝑃2 if 𝑃1 ”
“𝑃2 when 𝑃1 ”
“𝑃2 whenever 𝑃1 ”
“𝑃1 implies 𝑃2 ”





“𝑃2 follows from 𝑃1 ”
“𝑃1 is sufficient for 𝑃2 ”
“𝑃1 only if 𝑃2 ”
“𝑃1 only when 𝑃2 ”
“𝑃2 is necessary for 𝑃1 ”
The word “implies” has a much stronger meaning in mathematics than in everyday speech.
When we say “𝑃1 implies 𝑃2 ,” we mean that 𝑃2 must be true if 𝑃1 is. Words like “implies”
and “is sufficient” do not always express the same certainty in everyday English as in
mathematics. “If” statements in everyday English can also carry a slightly different meaning
than the symbolic logic of 𝑃1 → 𝑃2 . For example, in everyday speech, the statement “If you
1
2
The negation of 𝑃 is sometimes also written as ~𝑃.
The conditional 𝑃1 → 𝑃2 is sometimes also written as 𝑃1 ⇒ 𝑃2 .
Week 3
Page 4
clean your room, then you can go to the movie” usually also means “If you do not clean your
room, then you cannot go to the movie.” Conditional statements in mathematics should
never be assumed to carry this kind of extra meaning. For example, the statement “if a
number is both large and prime, then it is odd” does not also mean “if a number is not both
large and prime, then it is not odd.”
There are more subtle ways that conditionals are often expressed in English. One example
is the statement “Humans are primates.” This statement means that if 𝑥 is a human, then 𝑥
is a primate. It does not mean that if 𝑥 is a primate, then 𝑥 is a human. Another example is
“Only humans drive cars.” This means to say that if 𝑥 drives a car, then 𝑥 is a human. It does
not mean that every human drives a car, but rather that every driver is human.
Exercise 1: Use the symbols of logic to give the logical structure of the proposition “If 𝑥 is a
positive whole number, then it is not both even and odd.”
Exercise 2: Use the symbols of logic to give the logical structure of the proposition “If 𝑥 is
not a whole number, then it is neither even nor odd.”
Exercise 3: Use the symbols of logic to give the logical structure of the proposition “If 𝑎 ⋅ 𝑏
is odd, then both 𝑎 and 𝑏 are odd.”
Exercise 4: Rewrite each of the following statements, without using logical symbols, in the
form “If …, then …”:
(a) In order for you to get a refund, it is necessary that you have your receipt.
(b) To judge someone’s mathematical experience, it is sufficient to ask them what the
symbol “𝜕” stands for.
(c) You are legally driving in Pennsylvania only if you are 16 years old.
(d) Stephen King is fun to read if you like horror stories.
Conditionals and Biconditionals
For any conditional statement 𝑃1 → 𝑃2 ,



The contrapositive is ¬𝑃2 → ¬𝑃1.
The converse is 𝑃2 → 𝑃1 .
The inverse is ¬𝑃1 → ¬𝑃2 .
We have seen before that a conditional statement and its contrapositive are logically
equivalent. We have also seen that a conditional statement and its converse are not
logically equivalent. In other words, when a conditional statement is true, its contrapositive
must be true; and when a conditional statement is false, its contrapositive must be false;
Week 3
Page 5
but the converse of a conditional statement may be true or false regardless of whether the
original conditional is true or false.
Exercise 5: Is a conditional statement logically equivalent to its inverse? Justify your
answer.
Exercise 6: What previous example demonstrated that a conditional statement and its
converse are not logically equivalent?
Exercise 7: Write the contrapositive of each of the following statements, without using
logical symbols:
(a) We will go if you go.
(b) If a quadrilateral is square, it has four equal sides and four equal angles.
(c) If a triangle has either two equal sides or two equal angles, then the triangle is
isosceles.
It is not uncommon in mathematics that a conditional statement and its converse might
both be true. For example, if a whole number is even, then it is not odd, and if a whole
number is not odd, then it is even. A more concise way to say this is “A whole number is
even if and only if it is not odd.” The phrase “if and only if” comes up so frequently in
mathematics that it is often shortened to the word “iff.”
Remember that “𝑃1 if 𝑃2 ” can be written symbolically as 𝑃2 → 𝑃1 , and “𝑃1 only if 𝑃2 ” can be
written as 𝑃1 → 𝑃2 . For this reason, a proposition of the form “𝑃1 if and only if 𝑃2 ” can be
written in shorthand as follows:
𝑃1 ↔ 𝑃2
A statement of the form 𝑃1 ↔ 𝑃2 is called a biconditional3. This statement can be expressed
in the following ways, among others:



“𝑃1 if and only if 𝑃2 ”
“𝑃1 iff 𝑃2 ”
“𝑃1 is necessary and sufficient for 𝑃2 ”


“𝑃1 is equivalent to 𝑃2 ”
“If 𝑃1 or 𝑃2 , then both”
Exercise 8: The most common way to prove a biconditional statement 𝑃1 ↔ 𝑃2 is to prove
the statement 𝑃1 → 𝑃2 , and also separately prove the statement 𝑃2 → 𝑃1 . We have done this
before. Find a biconditional statement we have proved in this way, and write that
statement in the form “… if and only if ….”
3
The biconditional 𝑃1 ↔ 𝑃2 is sometimes also written as 𝑃1 ⇔ 𝑃2 or 𝑃1 ≡ 𝑃2 .
Week 3
Page 6
Laws of Logic
There are a handful of mostly basic “laws” of logic that we will use in proving mathematical
truths. One of the laws of logic that we have frequently seen is that a conditional statement
and its contrapositive are always equivalent. Another law is that if we can derive a
contradiction from any statement, then the statement must not be true. Note that each of
these laws has expanded our options for how we might compose proofs.
Another law of logic that we have not thought much about, but that is obviously true, is that
the negation of the negation of a statement is the same as the original statement itself. That
is, ¬(¬ 𝑃) is equivalent to 𝑃. In other words, to say “it is not the case that 𝑃 is false” is the
same as saying “𝑃 is true.”
Two very handy laws of logic that are slightly less obvious are known as “DeMorgan’s
laws.” Symbolically, they are the following:


¬(𝑃1 ∨ 𝑃2 ) is equivalent to (¬𝑃1 ) ∧ (¬𝑃2 )
¬(𝑃1 ∧ 𝑃2 ) is equivalent to (¬𝑃1 ) ∨ (¬𝑃2 )
DeMorgan’s laws are immensely useful in proving certain mathematical truths. For
example, one previous exercise asked you to prove a proposition of the form “If 𝑃1 , then 𝑃2
and 𝑃3 .” The contrapositive of this proposition is “If 𝑃2 and 𝑃3 are not both true, then 𝑃1 is
not true.” A simpler way to say this is “If 𝑃2 is not true or 𝑃3 is not true, then 𝑃1 is not true.”
This leads us to the following proof strategy for this particular proposition structure.
Proposition: 𝑃1 → (𝑃2 ∧ 𝑃3 )
Proof outline: Suppose either ¬𝑃2 or ¬𝑃3 . If ¬𝑃2 , then … … …. Therefore ¬𝑃1 . On
the other hand, if ¬𝑃3 , then … … …. Therefore ¬𝑃1 . In either case, ¬𝑃1 , so by
contraposition, 𝑃1 → (𝑃2 ∧ 𝑃3 ). ∎
Exercise 9: One of DeMorgan’s laws can be expressed in English as follows:
Saying “Neither of the statements 𝑃1 or 𝑃2 is true” is the same as saying
“The statements 𝑃1 and 𝑃2 are both false.”
Express the other law in English as clearly as you can.
Exercise 10: Write an outline for a proof by contradiction of a proposition of the form
𝑃1 → (𝑃2 ∨ 𝑃3 ).
Exercise 11: Yet another law of logic is that a statement of the form “Either 𝑃1 is true, or
both 𝑃2 and 𝑃3 are true” is equivalent to the statement “Either 𝑃1 or 𝑃2 is true, and
either 𝑃1 or 𝑃3 is true.” Or symbolically, the statement 𝑃1 ∨ (𝑃2 ∧ 𝑃3 ) is equivalent to
(𝑃1 ∨ 𝑃2 ) ∧ (𝑃1 ∨ 𝑃3 ). Now, find a similar law about a statement of the form 𝑃1 ∧ (𝑃2 ∨ 𝑃3 ).
Write the statement 𝑃1 ∧ (𝑃2 ∨ 𝑃3 ) in clear English, and a write the equivalent statement in
both English and in logical symbols.
Week 3
Page 7
Exercise 12: Consider the mathematical statement “𝑥 is a multiple of 2 and a multiple of 3
or a multiple of 5.” This statement does not have a clear, definite meaning. Describe two
different possible interpretations of this statement. Find a number 𝑥 for which one of your
interpretations is true while the other interpretation is false.