Beginning Rigorous Mathematics/Basic Logic
In the previous chapter we made clear what a logical statement is. In this chapter we will define and derive rules for working with compound logical statements. The symbols used to combining statements are called "logical operators".
In this section the symbols P and Q denote any logical statements.
Contents |
[edit] Logical operators and Truth Tables
Truth tables are used in two ways. Firstly to define exactly what a certain compounded statement means, and secondly to derive the properties of more complicated compounded statements. Truth tables exhaust all possible combinations of the truth of falsehood of the constituent statements in the compounded statement to yield exactly under what combinations of truth and falsehood of the constituent statements, the compound statement is true or false.
[edit] Definitions
[edit] Not, Negation
We define the symbol "
" to mean "not". If P is a statement then
is also a statement. It inverts the truth or falsehood of logical statements. In other words, if the statement P is true, then the statement
is false and if P is false, then
is true. We call
the negation of P.
We rigorously define the symbol "
" by the following truth table
| P | ![]() |
|---|---|
| T | F |
| F | T |
Even though "not" simplest logical operator, the negation of statements is important when trying to prove that certain objects have or do not have certain properties. It makes the skill of being able to correctly negate statements an important one.
[edit] And, Conjunction
We define the symbol "
" to mean "and". If P and Q are statements then
is also a statement, is called the conjunction of P and Q, and it reads "P AND Q". The compound statement
is true only when both statements P and Q are true.
We rigorously define the symbol "
" by the following truth table
| P | Q | ![]() |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
[edit] Or, Disjunction
We define the symbol "
" to mean "or". If P and Q are statements then
is also a statement, is called the disjunction of P and Q, and it reads "P OR Q". The compound statement
is true only when either P or Q or both statements P and Q are true.
We rigorously define the symbol "
" by the following truth table
| P | Q | ![]() |
|---|---|---|
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | F |
[edit] If ... then, Implication
We define the symbol "
" to mean "implies". If P and Q are statements then
is also a statement and it reads "P IMPLIES Q" or also "IF P THEN Q". The compound statement
is false only when P is true and Q is false. We call P the hypothesis and Q the Conclusion of the implication.
We rigorously define the symbol "
" by the following truth table
| P | Q | ![]() |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
We call the statement "
" the converse of "
".
Logical implication plays an important role since most theorems take on the form of an implication.
[edit] If and only if, Equivalence
We define the symbol "
" to mean "if and only if". If P and Q are statements then
is also a statement and it reads "P is true if and only if Q is true".
We rigorously define the symbol "
" by the following truth table
| P | Q | ![]() |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | T |
[edit] Basic results
In this section we will prove some basic equivalences for compounded logical statements. We say that two (compound) statements are logically equivalent when written in the same truth table, their columns are identical. Knowing how to write statements into logically equivalent statements is very useful in the sense that a statement might be difficult to prove, yet a logically equivalent statement might be easier to prove.
[edit] Lemma 1 (DeMorgan's law, part 1)
is logically equivalent to 
Proof
| P | Q | ![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|---|---|
| T | T | T | F | F | F | F |
| T | F | F | T | F | T | T |
| F | T | F | T | T | F | T |
| F | F | F | T | T | T | T |
Since the columns for the compound statements are identical, they are logically equivalent. QED
Proving the following theorems are left as exercises.
[edit] Lemma 2 (DeMorgan's law, part 2)
is logically equivalent to 
[edit] Lemma 3
is logically equivalent to 
[edit] Lemma 4
is logically equivalent to 
[edit] Lemma 5
is logically equivalent to 
[edit] Lemma 6 (Contrapositive)
is logically equivalent to 
[edit] Lemma 7
is logically equivalent to 
[edit] Predicates and Quantifiers
A predicate is defined to be a function mapping any set into the set {T,F} where the symbols T and F mean 'true' and 'false' respectively. A predicate can be thought of a collection of statements, one for each element of the domain of the predicate.
For example, we may define the predicate
by P(x): = "x is an even integer". Instead of writing "P(5) = F" and "P(16) = T" we will say and write "P(5) is false" and "P(16) is true".
If
is a predicate, then the predicate
defined to be such that
is true exactly when P(x) is false and
is false exactly when P(x) is true, is called the negation of P.
There are two quantifiers denoted by the symbols "
" and "
" which read "for all" and "there exists" respectively.
Let
be a predicate and let B be any subset of A (subsets are discussed in the next section). Then
which reads "For all elements x contained in B, P(x) is true." is a statement, and is defined to be true exactly when P(x) is true for every element x contained in B.
Similarly,
which reads "There exists an element x contained in B such that P(x) is true." is a statement, and is defined to be true exactly when P(x) is true for at least one element x contained in B.
We define the negation of statements involving quantifiers as follows
and 
[edit] Logical rules of inferrence
Proving the truth of statements require knowledge of standard valid logical rules of inference, the most important of which are:
[edit] Adjunction
If P and Q are both true then so is 
[edit] Simplification
If
is true then P is true.
If
is true then Q is true.
[edit] Addition
If P is true then
is true (regardless of the truth or falsehood of Q).
[edit] Disjunctive syllogism
If
is true, and P is false then Q is true.
If
is true, and Q is false then P is true.
[edit] Modus Ponens
If
is true, and P is true, then Q is true.
[edit] Modus Tollens
If
is true, and Q is false, then P is false.
In a mathematical proof, these rules are usually not explicitly mentioned as they have become second nature to mature students and authors of mathematics. We will be very explicit and pedantic in the proofs of some results in the following chapters, so will mention them.
This page may need to be 
