MAT137/Unit 01
Unit 01 · Term 1

Logic, Sets, Definitions & Proofs

Before any calculus, MAT137 teaches the language: how to read a precise statement, how quantifiers work, and how to prove things. This is the foundation every later unit is written in — invest here.

By the end you can
Why it matters & where it comes from
Why it exists

Mathematics is the one field that claims certainty. A proof is how a result becomes true forever — not just "true in every case we checked." Precise language and quantifiers exist so a statement cannot be quietly reinterpreted when that would be convenient.

In the real world

This is the logic that runs computers: Boolean algebra in every circuit, the conditions in every program, database queries, type systems, and the formal verification that proves aircraft and chip designs correct. Theorem provers and AI reasoning run on it too.

Story & open questions

Boole turned logic into algebra in 1854; Cantor built a theory of infinite sets so radical that Hilbert called it "a paradise." Then Russell found a paradox — the set of all sets that do not contain themselves — that broke it, and in 1931 Gödel proved that every consistent, effectively axiomatized formal system rich enough to express arithmetic contains statements it can neither prove nor disprove. The field's biggest open question, P vs NP — is finding an answer as easy as checking one? — carries a one-million-dollar prize.

How to learn this unit

The goal is not to memorize symbols. The goal is to translate between English, formal logic, and proof structure without changing the meaning. For each new statement, do three passes: identify the quantifiers, identify the main implication or equation, then decide what a proof would need to start with and what it must end by showing.

Reading routine
For a $\forall$ statement, imagine an adversary hands you an arbitrary object. Your proof must work for that object without assuming it is special.
For an $\exists$ statement, your job is to build or name one object and verify it has the required property.
For $P\Rightarrow Q$, write "Assume $P$" at the top of the scratch work and "$Q$" as the target at the bottom. The proof is the bridge between them.

What a complete proof contains

A proof should make the logical source of every line visible. MAT137 proofs do not need to be long, but they do need to say what is arbitrary, what is assumed, what definition is being used, and where the conclusion has been reached.

Statements and quantifiers

A statement is a sentence that is either true or false. Most interesting statements use quantifiers: "for all" ($\forall$) and "there exists" ($\exists$).

Definition Universal & existential

$\forall x\in S,\ P(x)$ means $P(x)$ is true for every $x$ in $S$. $\exists x\in S,\ P(x)$ means $P(x)$ is true for at least one $x$ in $S$.

Order matters. $\forall x\,\exists y$ and $\exists y\,\forall x$ usually say different things. "For every $x$ there is a $y$ with $y>x$" is true for $\mathbb{R}$; "there is a $y$ greater than every $x$" is false.

Negation

To negate a quantified statement, flip each quantifier and negate the inside.

Rule Negating quantifiers

$\neg(\forall x,\,P(x))\equiv \exists x,\,\neg P(x)$  and  $\neg(\exists x,\,P(x))\equiv \forall x,\,\neg P(x).$

Example

Negate: "for every $\varepsilon>0$ there exists $n\in\mathbb{N}$ with $\tfrac1n<\varepsilon$."

Flip both quantifiers and negate the inequality:
"there exists $\varepsilon>0$ such that for all $n\in\mathbb{N}$, $\tfrac1n\ge\varepsilon$."

Implication, converse, contrapositive

Definition Implication

$P\Rightarrow Q$ ("if $P$ then $Q$") is false only when $P$ is true and $Q$ is false. Its contrapositive is $\neg Q\Rightarrow\neg P$; its converse is $Q\Rightarrow P$.

An implication and its contrapositive are always logically equivalent — that is what makes proof by contrapositive valid. The converse is a different claim and may be false. In $P\Rightarrow Q$, $P$ is sufficient for $Q$, while $Q$ is necessary for $P$.

$P$$Q$$P\Rightarrow Q$$\neg Q\Rightarrow\neg P$
TTTT
TFFF
FTTT
FFTT
Why is a false hypothesis allowed? An implication promises what happens when $P$ holds. If $P$ is false, there is no broken promise, so $P\Rightarrow Q$ is true regardless of $Q$.

The proof methods

Four tools cover almost everything in MAT137.

Choosing a proof route

Start from the logical shape of the claim, then choose the route that gives you useful information to work with.

$P\Rightarrow Q$Assume $P$; try a direct proof first.
→
Is $\neg Q$ more concrete?Prove $\neg Q\Rightarrow\neg P$ instead.
"No such object exists"Assume one exists and seek a contradiction.
→
Claim for every integer $n$Look for a base case and an induction step.
Example Contrapositive

Claim: for every integer $n$, if $n^2$ is even then $n$ is even.

Contrapositive: if $n$ is odd then $n^2$ is odd.
Write $n=2k+1$. Then $n^2=4k^2+4k+1=2(2k^2+2k)+1$, which is odd. Done.
Example Contradiction

Claim: $\sqrt2$ is irrational.

Suppose $\sqrt2=p/q$ in lowest terms. Then $p^2=2q^2$, so $p^2$ is even. By the contrapositive result above, $p$ is even; write $p=2r$. Substitution gives $q^2=2r^2$, so the same result shows $q$ is even.
Both even contradicts "lowest terms." So no such fraction exists.

Definitions and biconditionals

A definition usually has two directions. Saying "$n$ is even if and only if there exists $k\in\mathbb Z$ such that $n=2k$" means both implications hold. You may unfold a definition during a proof, but you may not replace a theorem by an informal picture of what it ought to mean.

Definition If and only if

$P\Longleftrightarrow Q$ means $(P\Rightarrow Q)\land(Q\Rightarrow P)$. To prove it, clearly prove both directions.

Example Using a definition

For integers $m,n$, if $m$ and $n$ are even, then $m+n$ is even.

Since $m,n$ are even, there are $r,s\in\mathbb Z$ with $m=2r$ and $n=2s$. Therefore $m+n=2(r+s)$, and $r+s\in\mathbb Z$. By the definition, $m+n$ is even.

Induction

Principle Mathematical induction

If $P(1)$ holds, and $P(k)\Rightarrow P(k+1)$ for every $k\in\mathbb N$, then $P(n)$ holds for all $n\in\mathbb{N}$. If the claim starts at another integer $n_0$, use $P(n_0)$ as the base case.

Example

Prove $1+2+\cdots+n=\dfrac{n(n+1)}{2}$.

Base: $n=1$ gives $1=\tfrac{1\cdot2}{2}$. ✓
Step: assume it for $k$. Then $1+\cdots+k+(k+1)=\tfrac{k(k+1)}{2}+(k+1)=\tfrac{(k+1)(k+2)}{2}.$ ✓

Sets and notation

Set-builder $\{x\in S: P(x)\}$, union $\cup$, intersection $\cap$, subset $\subseteq$, and the number systems $\mathbb{N}\subset\mathbb{Z}\subset \mathbb{Q}\subset\mathbb{R}$. Absolute value $|x|$ and the triangle inequality $|a+b|\le|a|+|b|$ appear constantly from Unit 2 on.

Proof pattern Set equality

To prove $A=B$, prove both inclusions: take an arbitrary $x\in A$ and show $x\in B$; then take an arbitrary $x\in B$ and show $x\in A$.

Example De Morgan's law for sets

For complements relative to a universe $U$, $(A\cup B)^c=A^c\cap B^c$.

$x\in(A\cup B)^c\Longleftrightarrow x\notin A\cup B \Longleftrightarrow (x\notin A\text{ and }x\notin B) \Longleftrightarrow x\in A^c\cap B^c$.
Common pitfalls

• Proving the converse by accident. Check direction.
• Forgetting that a single counterexample kills a $\forall$ statement, while one example proves an $\exists$ statement.
• Assuming the conclusion somewhere in the proof; every step must follow from hypotheses, definitions, or earlier results.
• In induction, skipping the base case or not actually using the hypothesis in the step.

Practice

Problems adapted from the MAT137 question bank by Alfonso Gracia-Saz, used under CC BY-SA 4.0. Write full solutions before opening the answer.

Practice 1 · Sets

Write the set $E$ of even integers in set-builder notation. Is it $\{n\in\mathbb{Z}:\forall a\in\mathbb{Z},\,n=2a\}$ or $\{n\in\mathbb{Z}:\exists a\in\mathbb{Z}\text{ s.t. }n=2a\}$?

Answer
The second: $E=\{n\in\mathbb{Z}:\exists a\in\mathbb{Z}\text{ s.t. }n=2a\}$. The $\forall$ version is empty — no single $n$ equals $2a$ for every $a$.
Practice 2 · Quantifiers

Let $f$ have domain $D$. Write the formal definition of "$f$ is one-to-one," then write its negation.

Answer
One-to-one: $\forall x_1,x_2\in D,\ f(x_1)=f(x_2)\Rightarrow x_1=x_2$. Negation: $\exists x_1,x_2\in D$ with $x_1\ne x_2$ and $f(x_1)=f(x_2)$.
Practice 3 · Negation

Negate: "If a student in this class has a brother, then they also have a sister."

Answer
"There is a student in this class who has a brother but no sister." Recall $\neg(P\Rightarrow Q)$ is $P\land\neg Q$.
Practice 4 · Contrapositive

Which are equivalent to "Every Canadian man likes hockey"? (a) If a man is Canadian, he likes hockey. (b) If a man likes hockey, he is Canadian. (c) If a man does not like hockey, he is not Canadian.

Answer
(a) and (c). (a) restates it; (c) is its contrapositive. (b) is the converse, which is not equivalent.
Practice 5 · Direct proof

Prove that $f(x)=3x+2$, with domain $\mathbb{R}$, is one-to-one.

Solution
Suppose $f(x_1)=f(x_2)$. Then $3x_1+2=3x_2+2$, so $3x_1=3x_2$, hence $x_1=x_2$.
Practice 6 · Disproof

Prove that $f(x)=x^2$, with domain $\mathbb{R}$, is not one-to-one.

Solution
Take $x_1=1$ and $x_2=-1$. Then $x_1\ne x_2$ but $f(1)=1=f(-1)$. A single counterexample settles a $\forall$ claim.
Practice 7 · Theorem

Prove: if $f$ is strictly increasing on $D$, then $f$ is one-to-one on $D$.

Solution
Let $x_1,x_2\in D$ with $x_1\ne x_2$; without loss of generality $x_1<x_2$. Since $f$ is strictly increasing, $f(x_1)<f(x_2)$, so $f(x_1)\ne f(x_2)$. Hence $f$ is one-to-one.
Practice 8 · Induction logic

$S_n$ depends on an integer $n\ge1$. Which guarantee $S_n$ for all $n\ge1$? (a) $S_3$ and $\forall n\ge1,\,S_n\Rightarrow S_{n+1}$. (b) $S_1$ and $\forall n\ge1,\,S_n\Rightarrow S_{n+1}$. (c) $S_1$ and $\forall n\ge1,\,S_{n+1}\Rightarrow S_n$.

Answer
Only (b). (a) reaches just $n\ge3$; (c) propagates downward from $S_1$, proving nothing above $1$.

Expanded topic checklist

Course coverage. This unit is part of the complete MAT137 topic map. It should cover the following items before you move on:

Textbook/source alignment

Use the Alfonso Gracia-Saz MAT137 materials as the primary local spine, with the current UofT single-variable calculus topic split as the completeness check. The added items are original study prompts, not copied textbook exercises.

Core theorem map

The proof spine is: parse the claim, choose the proof form, state the assumptions explicitly, and close the quantifiers in the same order they were opened.

Study routine. Before leaving this unit, rewrite every theorem from later calculus units in if-then form and identify which proof method its standard proof uses.

Deep practice extensions

Use these after the main practice set. They are designed to force definition-level reasoning, theorem selection, and mixed application rather than routine calculation only.

Extension 1 · Negation drill

Negate: "For every $\epsilon>0$ there is $\delta>0$ such that if $0<|x-a|<\delta$, then $|f(x)-L|<\epsilon$."

Guide
A correct negation is: there exists $\epsilon>0$ such that for every $\delta>0$, there exists $x$ with $0<|x-a|<\delta$ and $|f(x)-L|\ge\epsilon$.
Extension 2 · Induction

Prove by induction that $1+3+5+\cdots+(2n-1)=n^2$ for every $n\ge1$.

Guide
Base case $n=1$ is true. If the sum through $2n-1$ is $n^2$, then adding $2(n+1)-1=2n+1$ gives $n^2+2n+1=(n+1)^2$.
Extension 3 · Set equality

Prove $A\cap(B\cup C)=(A\cap B)\cup(A\cap C)$ by element chasing.

Guide
Show both inclusions. If $x$ is in the left side, then $x\in A$ and $x\in B$ or $x\in C$, so $x$ is in one of the two right-side intersections. Reverse the argument for the other inclusion.
Extension 4 · Counterexample

Disprove the statement: if $A\cup B=A\cup C$, then $B=C$.

Guide
Let $A=\{1\}$, $B=\{2\}$, and $C=\{1,2\}$. Then $A\cup B=A\cup C=\{1,2\}$ but $B e C$.