No history yet

Logic and Proofs

The Language of Logic

In mathematics, we need to be precise. We can't rely on ambiguity or nuance. To achieve this precision, we use logic. The basic building block of logic is the proposition, a statement that is definitively either true or false, but not both. It's a simple, powerful idea.

"The sky is blue" is a proposition. It's a statement that's either true or false.

"What time is it?" is not a proposition. It's a question, not a statement with a truth value.

"This statement is false" is also not a proposition. It's a paradox; if it's true, it's false, and if it's false, it's true.

We often represent propositions with lowercase letters like pp and qq. For example, we could set:

pp: "It is raining." qq: "I will take an umbrella."

These are simple statements. The real power of logic comes from connecting them to form more complex ideas.

Connecting Ideas

We link propositions together using logical connectives. Think of them as the conjunctions and operators of our logical language. There are five basic connectives you'll need to know. We can explore how they work using truth tables, which show the truth value of a compound statement for every possible combination of truth values of its simple components.

ConnectiveSymbolNameMeaning
NOT¬¬NegationThe opposite truth value. "It is not raining."
ANDConjunctionTrue only if both propositions are true. "It is raining and I will take an umbrella."
ORDisjunctionTrue if at least one proposition is true. "It is raining or I will take an umbrella."
IF...THENImplicationFalse only when the first proposition is true and the second is false. "If it is raining, then I will take an umbrella."
IF AND ONLY IFBiconditionalTrue only if both propositions have the same truth value. "I will take an umbrella if and only if it is raining."

Here are the truth tables for these connectives. Let's use T for True and F for False.

pq¬pp ∧ qp ∨ qp → qp ↔ q
TTFTTTT
TFFFTFF
FTTFTTF
FFTFFTT

The implication (pqp → q) can seem a bit strange at first. The only time it's false is when you have a true premise leading to a false conclusion. If the premise (pp) is false, the implication is considered true regardless of the conclusion. This is called vacuous truth. For example, the statement "If the moon is made of cheese, then I am a billionaire" is logically true, because the premise is false.

Building an Argument

Understanding propositions and connectives is the first step. The next is using them to build unshakable arguments. In mathematics, this is called a proof. A proof is a sequence of logical steps that demonstrates a statement is always true. There are several powerful techniques for constructing proofs.

Learn to write clear, logical proofs using given information, definitions, and theorems.

Let's start with the most straightforward method.

Direct Proof To prove a statement of the form pqp → q, you assume pp is true and use a series of logical deductions to show that qq must also be true.

Let's prove the statement: "If nn is an even integer, then n2n^2 is an even integer."

First, we identify our propositions. pp: "nn is an even integer." qq: "n2n^2 is an even integer."

Now, we follow the steps for a direct proof:

  1. Assume pp is true. Assume nn is an even integer.
  2. Use definitions. By the definition of an even integer, we know that n=2kn = 2k for some integer kk.
  3. Perform algebraic manipulation. Now we look at n2n^2:
n2=(2k)2=4k2n^2 = (2k)^2 = 4k^2
  1. Show qq is true. We can rewrite the result as:
n2=2(2k2)n^2 = 2(2k^2)

Since kk is an integer, 2k22k^2 is also an integer. This means n2n^2 is 2 times some integer, which is the definition of an even number. We have successfully shown that if pp is true, qq must be true.

Proof by Contradiction To prove a proposition pp, you assume its negation, ¬p¬p, is true. Then you show that this assumption leads to a logical contradiction (something that is always false, like xextand¬xx ext{ and } ¬x). If the assumption leads to a contradiction, the assumption must be false, and therefore the original proposition pp must be true.

This is a powerful technique for when a direct path is hard to find. Let's use it to prove: "There is no largest integer."

  1. State the proposition. Let pp be "There is no largest integer."
  2. Assume the negation is true. Assume ¬p¬p is true, which means "There is a largest integer." Let's call this integer NN.
  3. Work towards a contradiction. If NN is the largest integer, then every other integer must be less than or equal to NN. But consider the number M=N+1M = N + 1. Since NN is an integer, N+1N+1 is also an integer. We also know that N+1>NN+1 > N. So, M>NM > N.
  4. State the contradiction. We have found an integer MM that is larger than NN. This contradicts our assumption that NN is the largest integer. Our assumption must be false.
  5. Conclude the original proposition is true. Since the assumption "There is a largest integer" leads to a contradiction, it must be false. Therefore, the original statement, "There is no largest integer," must be true.
Lesson image

The Domino Effect

Some statements involve all positive integers. For example, how would you prove that the sum of the first nn positive integers is always equal to n(n+1)/2n(n+1)/2? You could check it for n=1n=1, n=2n=2, and n=3n=3, but that doesn't prove it for all integers. For this, we use a special proof technique.

Mathematical Induction This is a technique used to prove a statement, P(n)P(n), is true for all positive integers nn. It's like knocking over an infinite line of dominoes. You need to do two things:

  1. Knock over the first domino (the Base Case).
  2. Show that if any one domino falls, it will knock over the next one (the Inductive Step).

Let's prove the statement P(n)P(n): The sum of the first nn positive integers is given by the formula:

1+2+3++n=n(n+1)21 + 2 + 3 + \dots + n = \frac{n(n+1)}{2}

1. Base Case: We prove the statement is true for the first integer, n=1n=1. The sum is just 1. Let's check the formula:

1(1+1)2=1(2)2=1\frac{1(1+1)}{2} = \frac{1(2)}{2} = 1

The formula holds for n=1n=1. The first domino has fallen.

2. Inductive Step: We must show that if the statement is true for any arbitrary positive integer kk, then it must also be true for the next integer, k+1k+1. In other words, we must prove that P(k)P(k+1)P(k) → P(k+1).

First, we assume P(k)P(k) is true. This is our inductive hypothesis.

1+2++k=k(k+1)21 + 2 + \dots + k = \frac{k(k+1)}{2}

Now, we need to prove that P(k+1)P(k+1) is true. We want to show:

1+2++k+(k+1)=(k+1)((k+1)+1)21 + 2 + \dots + k + (k+1) = \frac{(k+1)((k+1)+1)}{2}

Let's start with the left side of the equation. We can use our inductive hypothesis to substitute the sum up to kk.

1+2++kThis is k(k+1)2+(k+1)\underbrace{1 + 2 + \dots + k}_{\text{This is } \frac{k(k+1)}{2}} + (k+1)

Now, we substitute and simplify:

k(k+1)2+(k+1)=k(k+1)+2(k+1)2=(k+1)(k+2)2=(k+1)((k+1)+1)2\begin{aligned} \frac{k(k+1)}{2} + (k+1) & = \frac{k(k+1) + 2(k+1)}{2} \\ & = \frac{(k+1)(k+2)}{2} \\ & = \frac{(k+1)((k+1)+1)}{2} \end{aligned}

This is exactly the right side of the equation for P(k+1)P(k+1). We have shown that if the formula works for kk, it must work for k+1k+1. We've shown that each domino knocks over the next.

Since we've proven the base case and the inductive step, we can conclude by mathematical induction that the formula is true for all positive integers nn.

Quiz Questions 1/5

Which of the following is a proposition?

Quiz Questions 2/5

Consider the logical implication "If the moon is made of cheese, then pigs can fly." According to the rules of logic, is this statement true or false?

Logic and proofs are the bedrock of discrete mathematics. They provide the tools to build, understand, and verify the complex systems you'll encounter next.