Skip to main content

Section 2.1 Formal Logic

Subsection 2.1.1 Terminology

The concept of true and false are undefined terms.

Definition 2.1.1. Statement.

An expression is a statement if and only if it is either true or false.

The following are statements. “The sky is blue.” “George Washington was the first president of the United States.” The following are not statements. “Hello.” “Study hard.” “Is that true?” For convenience letters, such as A and B, are used to refer to statements. 0 represents false and 1 represents true.

Statements can be modified and combined. Figure 2.1.2 gives the definitions for some of these logic operations. A truth table is a notation for listing all possible inputs to a statement and the resulting truth or lack thereof. Below are truth tables defining the basic logic operations.

And
A B A and B
0 0 0
0 1 0
1 0 0
1 1 1
Or
A B A or B
0 0 0
0 1 1
1 0 1
1 1 1
Not
A not A
0 1
If
A B If A, then B
0 0 1
0 1 1
1 0 0
1 1 1
Figure 2.1.2. Definition of Logic Operations

For convenience the following symbols are used for these operations. As with arithmetic operations there is an order of operations. Figure 2.1.3 lists the operators in first to last order.

highest not \(\neg\)
and \(\wedge\)
or \(\vee\)
lowest if \(\rightarrow\)
Figure 2.1.3. Logic Order of Operations

Subsection 2.1.2 Practice

Checkpoint 2.1.4.

Complete the following truth tables.

\(A\) \(B\) \(A \rightarrow B\)
0 0
0 1
1 0
1 1
\(A\) \(B\) \(B \rightarrow A\)
0 0
0 1
1 0
1 1
\(A\) \(B\) \(\neg A\) \((\neg A) \rightarrow B\)
0 0
0 1
1 0
1 1
\(A\) \(B\) \(\neg B\) \((\neg B) \rightarrow A\)
0 0
0 1
1 0
1 1
\(A\) \(B\) \(\neg A\) \((\neg A) \vee B\)
0 0
0 1
1 0
1 1
\(A\) \(B\) \(\neg A\) \(\neg B\) \((\neg B) \rightarrow (\neg A)\)
0 0
0 1
1 0
1 1
Checkpoint 2.1.5.

Complete the following truth table.

\(A\) \(B\) \(C\) \(\neg B\) \(A \wedge B\) \(\neg B \wedge C\) \((A \wedge B) \vee (\neg B \wedge C)\)

Two, possibly compound, statements A and B are considered to be equivalent if they have the same truth value for all inputs. This is denoted \(A \leftrightarrow B.\) Figure 2.1.6 and Figure 2.1.7 provides truth tables that show two pairs of equivalent statements known as DeMorgan's Laws.

\(A\) \(B\) \(A \wedge B\) \(\neg (A \wedge B)\) \(\neg A\) \(\neg B\) \(\neg A \vee \neg B\) \(\neg (A \wedge B) \leftrightarrow \neg A \vee \neg B\)
0 0 0 1 1 1 1 1
0 1 0 1 1 0 1 1
1 0 0 1 0 1 1 1
1 1 1 0 0 0 0 1
Figure 2.1.6. DeMorgan's Law (and)
\(A\) \(B\) \(A \vee B\) \(\neg (A \vee B)\) \(\neg A\) \(\neg B\) \(\neg A \wedge \neg B\) \(\neg (A \vee B) \leftrightarrow \neg A \wedge \neg B\)
0 0 0 1 1 1 1 1
0 1 1 0 1 0 0 1
1 0 1 0 0 1 0 1
1 1 1 0 0 0 0 1
Figure 2.1.7. DeMorgan's Law (or)
Example 2.1.8. DeMorgan's Law.

Consider the statement: Guido likes to hike and cycle. Under what conditions is this statement false?

Solution

We want the negation. DeMorgan's Law tells us the negation is: Guido dislikes hiking or Guido dislikes cycling. This matches our expectation that a statement is false if any part of it is false.