Chapter 0: Logic and Proofs |
---|
Mathematics makes precise use of language in stating and proving its results. We use the English language to express our ideas and arguments, though we give some common English words a more precise meaning so as to make them unambiguous. Good mathematical writing consists of complete sentences, allowing for the fact that symbols stand for words. For example, `A = B.' is a sentence in which the subject is A, the verb is `equals' and the object is B.
In mathematics, we tend to use more complicated and compound expressions than we do in everyday language, so this chapter explains some methods for dealing with these expressions. We also introduce the more common types of mathematical reasoning we use in proofs.
Logic is the study of correct reasoning. The rules of logic give precise meaning to mathematical statements and allow us to make correct arguments about these statements.
For example,
However the following sentences are not statements.
Propositional logic is that part of logic that deals with combining statements using connectives such as AND, OR, NOT, or implies. We use these connectives in everyday English, but in mathematics and computer science we tend to use them in more complex combinations. We (and the computers) need to know precisely what these combinations mean. For example, the Principle of Mathematical Induction says that: If P(1) is true and P(k+1) is true whenever P(k) is true, then P(n) is true for all positive integers n.
We can always combine any two statements using AND to form a third statement. For example
P OR Q is called the disjunction of P and Q. The statement P OR Q will be TRUE if either P is TRUE or Q is TRUE, or both are TRUE.
We can define these relationships in the following truth tables, in which T stands for TRUE and F stands for FALSE.
|
|
In everyday English, the word `or' can be used in two different ways. Consider the meaning of `or' in the following two sentences.
Every statement has a negation. For example, if P is the statement `3 + 2 = 6.' then its negation is `It is not true that 3 + 2 = 6.' or more simply `3 + 2 not= 6.' In mathematics, we are always using conditional statements such as `If x > 2 then x 2 > 4.' or biconditional statements such as `x y = 0 if and only if x = 0 or y = 0.'
|
|
|
The negation of the statement P is denoted by NOT P.
If P and Q are two statements, the conditional statement `If P then Q' is denoted by P => Q and is defined by the truth table above. This is sometimes expressed as `P implies Q' or `Q whenever P.'
The biconditional statement `P if and only if Q' is denoted by P <=> Q. The expression "if and only if" is used so often in mathematics that it is often abbreviated as "iff". If P <=> Q is TRUE, then P and Q have the same truth values and we say that P and Q are equivalent statements.
The conditional is an extension of everyday English usage, but it has some unusual consequences because P => Q is always true if P is false. For example, `If 5 > 7 then 2 + 2 = 3.' is a true statement.
This example shows that `P if and only if Q' has the same meaning as the statement `(If P then Q) and (if Q then P).'
Solution.
P | Q | P => Q | Q => P | (P => Q) AND (Q => P) | P <=> Q |
---|---|---|---|---|---|
T T F F | T F T F | T F T T | T T F T | T F F T | T F F T |
The square box symbol denotes the end of a proof or solution.
Solution.
P | Q | P AND Q | NOT (P AND Q) |
---|---|---|---|
T T F F | T F T F | T F F F | F T T T |
P | Q | NOT P | NOT Q | (NOT P) OR (NOT Q) |
---|---|---|---|---|
T T F F | T F T F | F F T T | F T F T | F T T T |
Solution.
P | Q | P => Q | NOT P | Q OR NOT P |
---|---|---|---|---|
T T F F | T F T F | T F T T | F F T T | T F T T |
Alternative Notations for Connectives | ||
---|---|---|
Connective | Propositional Logic | C and Java syntax |
AND OR NOT => <=> |
V ¬ or ~ -> <-> | && || ! |