Lecture 3: equality, existential quantification, unique existence [01AH]
- September 23, 2026
- Marcelo Fiore, Jon Sterling
These lecture notes were prepared by Jon Sterling using Marcelo Fiore’s lectures as source material. Any mistakes were introduced by Jon Sterling. Generative AI was not used to write these lecture notes.
Understanding equality [01AB]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
The rules of equality [01AC]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
Many of you are already confident in working with equality. There are only a few rules of equality from which all others follow:
- Reflexivity: All individuals are equal to themselves: \forall x:\tau \mathpunct {.} x = x.
- Transport: If a property holds of one individual, then it holds of any equal individual: \forall x,y:\tau \mathpunct {.} x=y\implies (P(x) \implies P(y))
The transport rule is sometimes called the indiscernibility of identicals.
Warning What types of things can be equal? [01AD]
- September 22, 2026
- Jon Sterling
An equation a=b only makes sense if a and b are the same kind of thing. Something like 5 = \{6\} is not a mathematical statement (it is “not even wrong”) whereas 5=6 is a (false) mathematical statement.
(As before, 5 = \{6\} is nonetheless a statement of formal set theory, and maybe even a true statement under certain encodings of numbers as sets; but it is not a meaningful statement of mathematics. In this course, we are careful to distinguish mathematics as it is conducted by mathematicians from the encoding of mathematics in a variety of historical formalisms such as formal set theory. You need to get comfortable with the former, but we do not care if you are facile with the latter.)
Working with equality [01AE]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
We do not expect you to use the rules of equality explicitly when you are giving proofs; these are “foundational” in the sense that everything concerning equality can be deduced from them, but a proper proof does not belabour these points except where it adds clarity. You will mainly use the properties of equality that you are already familiar with; it is instructive to prove a few of them for yourself by reducing them to the rules, however. As you can see below, it is a little tricky.
Theorem Equality is symmetric [01AF]
- September 22, 2026
- Jon Sterling
If x=y then y=x.
Proof.
- September 22, 2026
- Jon Sterling
We fix individuals x,y:\tau such that x=y. We will emply the transport rule of equality with the following predicate P on individuals of type \tau : P(z) \coloneqq (x=z\to z=x)
The transport rule says that P(x) \implies P(y). First we note that our goal is literaly P(y), so we may use this implication by proving the antecedent P(x). The antecedent P(x) is the following statement, by definition, which is trivially true:
x=x\to x=xEquality is transitive [01AG]
- September 22, 2026
- Jon Sterling
The equality predicate is transitive in the sense that the following statement holds: \forall x,y,z:\tau \mathpunct {.} x=y\implies (y=z \implies x = z)
Proof.
- September 22, 2026
- Jon Sterling
We fix x,y,z:\tau such that x=y to prove that y=z\implies x=z. We will use the transport rule on the assumption x=y with the following predicate P on individuals of type \tau :
P(u) \coloneqq u=z\implies x=zTransport of P along x=y says that P(x) \implies P(y). We note that P(y) is literally our goal. Using this implication, therefore, it suffices to prove P(x) which unravels to x=z\implies x=z which is trivially true.
Understanding existential quantification [01AO]
- September 23, 2026
- Marcelo Fiore, Jon Sterling
Existential statements take the following form:
There exists an individual x of [some type] for [some predicate] holds.
Instead of “there exists” you may also see “for some”, or any number of other equivalent phrasings. Given a predicate P on individuals of type \tau , we write \exists x:\tau \mathpunct {.} P(x) to mean “There exists some x of type \tau such that P(x) holds. In this notation, x is a bound variable (a placeholder); please recall Anatomy of a universal quantification to understand how binding of placeholders works.
Example The Pigeonhole Principle [01AP]
- September 24, 2026
- Marcelo Fiore, Jon Sterling
Let n be a positive integer. If n+1 letters are put in n pigeonholes then there will be a pigeonhole with more than one letter.
See if you can translate the above into mathematical symbols using \forall , \exists , =, and \implies . Then click here to see a possible solution.
\forall n:\mathbb {N}^+\mathpunct {.} \forall p:\mathbb {N}^n\mathpunct {.} n+1={\textstyle \sum }_{i=0}^{n-1}p_i \implies \exists i:\{0\ldots {n-1}\}\mathpunct {.} p_i>1 In the above, p is a vector that represents the number of letters in each of the n pigeonholes.Theorem Intermediate value theorem [01AQ]
- September 24, 2026
- Marcelo Fiore, Jon Sterling
Let f be a real-valued continuous function on an interval [a,b]. For every y in between f(a) and f(b), there exists some c in between a and b such that f(c) = y.
Try to translate the above into mathematical symbols using \forall , \exists , and =. Then click here to reveal one possible answer.
\forall a,b:\mathbb {R}\mathpunct {.} \forall f\colon [a,b]\to \mathbb {R}\mathpunct {.} \forall y:[f(a),f(b)]\mathpunct {.} \exists c:[a,b]\mathpunct {.} f(c)=yIntuition.
- September 24, 2026
- Marcelo Fiore, Jon Sterling
How to prove an existentially quantified statement [01AR]
- September 24, 2026
- Marcelo Fiore, Jon Sterling
To prove a goal of the form \exists x:\tau \mathpunct {.} P(x)\text {,} we must find a witness: that is, an individual w of type \tau for which we expect that P(w) will hold, and then we prove that P(w) holds.
Existential instantiation in written proofs [01AS]
- September 24, 2026
- Marcelo Fiore, Jon Sterling
If your goal is of the form \exists x:\tau \mathpunct {.} P(x) and you are ready to prove it, you might consider the following template:
We must exhibit some x:\tau such that P(x) holds; to that end, consider x \coloneqq \textit {[some appropriate element]}. It remains to show that [\textit {some approriate element}] satisfies P: [now prove it].
Proposition [01AT]
- September 24, 2026
- Marcelo Fiore, Jon Sterling
For every positive integer k, there exist natural numbers i and j such that 4k= i^2-j^2.
Translate the above into mathematical symbols using \forall , \exists , and =. Once you’ve made an attempt, click here to reveal a possible solution.
\forall k:\mathbb {Z}^+\mathpunct {.} \exists i:\mathbb {N}\mathpunct {.} \exists j:\mathbb {N}\mathpunct {.} 4k=i^2-j^2We may also write the following for short:
\forall k:\mathbb {Z}^+\mathpunct {.} \exists i,j:\mathbb {N}\mathpunct {.} 4k=i^2-j^2Scratch work.
- September 24, 2026
- Marcelo Fiore, Jon Sterling
We will try to get an intuition by looking for a pattern.
| k | i | j |
|---|---|---|
| 1 | 2 | 0 |
| 2 | 3 | 1 |
| 3 | 4 | 2 |
| \vdots | ||
| n | n+1 | n-1 |
| \vdots |
Try to transform the scratch reasoning above into a proper written proof; once you have made an attempt, you may click here to reveal a possible proof.
Proof.
- September 24, 2026
- Marcelo Fiore, Jon Sterling
Let k be a positive integer. We need to choose naturals i and j such that 4k=i^2-j^2. To that end, consider i\coloneqq k+1 and j\coloneqq k-1. Then,
\begin {aligned} i^2-j^2 &= (k+1)^2 - (k-1)^2\\ &= (k^2 + 2k +1) - (k^2 - 2k + 1)\\ &= k^2 + 2k + 1 - k^2 + 2k - 1\\ &= 4k\text {.} \end {aligned}We are done.
As you can see, sometimes you need to do a bit of scratch work before you can know how to proceed in a proof. The written proof in the end does not always include all the thinking that led to the good choices you have made; a great proof will make your choices seem inevitable, but in number theory that is not as often possible as one might desire.
Proposition [01AU]
- September 24, 2026
- Marcelo Fiore, Jon Sterling
For every positive integer n, there exists a natural number l such that 2^l \leq n < 2^{l+1}.
In other words:
\forall n:\mathbb {Z}^+\mathpunct {.} \exists l:\mathbb {N}\mathpunct {.} 2^l \leq n < 2^{l+1}Proof.
- September 24, 2026
- Marcelo Fiore, Jon Sterling
Let n be a positive integer. We note that n = 2^{\log _2 n}, so our goal is equivalently to find some l:\mathbb {N} such that 2^l\leq 2^{\log _2n}<2^{l+1}. Because the exponential function is strictly increasing, it suffices to find some l:\mathbb {N} such that l\leq \log _2n <{l+1}.
To that end, we consider l\coloneqq \lfloor \log _2n\rfloor , i.e. the floor of \log _2n. Clearly we have \lfloor \log _2n\rfloor \leq \log _2n; to check that \log _2 n < \lfloor \log _2n\rfloor +1, we note that the difference \log _2n - \lfloor \log _2n\rfloor must be strictly smaller than 1.
How to use an existential assumption [01AV]
- September 24, 2026
- Marcelo Fiore, Jon Sterling
To use an assumption of the form \exists x:\tau \mathpunct {.} P(x), we may assume a new individual x':\tau such that P(x') holds.
(Above, if we did not already have any assumptions named “x”, we could have used x instead of x'. Otherwise, we use a different name to avoid shadowing of variables.)
We have already been covertly used used existential existential assumptions in our proposition on parity in terms of congruence! Now we are making it official.
Theorem Divisibility is transitive [01AW]
- September 24, 2026
- Marcelo Fiore, Jon Sterling
For all integers l, m, and n, if l\mid m and m\mid n then l\mid n.
In other words:
\forall l,m,n:\mathbb {Z}\mathpunct {.} (l\mid m) \land (m \mid n) \implies (l\mid n)Try to give your own proof! After you have made an attempt, you may click here to reveal a possible proof.
Proof.
- September 24, 2026
- Marcelo Fiore, Jon Sterling
Let l, m, and n be integers, and assume l\mid m and m\mid n; in other words, we have the following assumptions:
- \exists i:\mathbb {Z}\mathpunct {.} il = m
- \exists j:\mathbb {Z}\mathpunct {.} jm = n
Using our first assumption, we assume some i':\mathbb {Z} such that i'l=m, and using the second assumption, we assume some j':\mathbb {Z} such that j'm=n. Using these assumed equations, we may rewrite our goal l\mid n as follows:
l\mid n \Longleftrightarrow l\mid j'm \Longleftrightarrow l\mid j'i'lOur goal is then to exhibit some k:\mathbb {Z} such that kl = j'i'l. Choosing k \coloneqq j'i', we immediately have kl = j'i'l so we are done.
Hint Existentials: use before you prove [01AX]
- September 24, 2026
- Jon Sterling
As you may have seen in the proof of Theorem [01AW], it can matter in what order you use existential assumptions and prove existential goals. If you start proving the goal too early, you won't have enough assumptions to make progress! A rule of thumb is, you might as well use existential assumptions immediately once you have them, but you should delay proving existential goals for as long as you can.
Understanding unique existence [01AY]
- September 24, 2026
- Marcelo Fiore, Jon Sterling
We now have all the ingredients needs to explain unique existence, which combines existential quantification, universal quantification, bi-implication, and equality.
In mathematics, it is very common to say something like “There exists a unique [thing] satisfying [predicate]”. This bit of mathematical jargon means that not only does there exist a [thing] satisfying [predicate], but that any other [thing] that satisfies [predicate] is equal to this first one. In other words, there is exactly one individual satisfying [predicate].
Unique existence is written with the following “bang” notation: \exists ! x:\tau \mathpunct {.} P(x)
Unique existence can be phrased in terms of our other logical constructs in several equivalent ways:
\begin {aligned} &\exists ! x:\tau \mathpunct {.} P(x) \\ &\quad \Longleftrightarrow (\exists x:\tau \mathpunct {.} P(x)) \land (\forall y,z:\tau \mathpunct {.} (P(y)\land P(z) \implies y =z)) \\ &\quad \Longleftrightarrow \exists x:\tau \mathpunct {.} ( \forall y:\tau \mathpunct {.} (P(y)\implies y=x) ) \\ &\quad \Longleftrightarrow \exists x:\tau \mathpunct {.} \forall y:\tau \mathpunct {.} P(y) \Longleftrightarrow y=x \end {aligned}We commonly use the first one above because it allows us to separately prove existence and uniqueness (it is helpful when different parts of your proof can be made less dependent on each other).
Here is an example of a property uniquely determining an individual.
Example Congruence strictly below the modulus is equality [01AZ]
- September 25, 2026
- Marcelo Fiore, Jon Sterling
The congruence property modulo m uniquely characterises the natural numbers from 0 to m-1.
Interpretation.
- September 25, 2026
- Marcelo Fiore, Jon Sterling
The statement above may seem a little opaque, but you will encounter such things in mathematics. Let’s break it down.
What the statement above is saying might be rephrased more explicitly as follows:
For any n:\mathbb {Z} there exists a unique z\in \{0\ldots m-1\} such that n\equiv z \mod m.
Symbolically:
\forall n:\mathbb {Z}\mathpunct {.} \exists ! z:\{0\ldots m-1\}\mathpunct {.} (n\equiv z \mod m)Proposition [01B0]
- September 25, 2026
- Marcelo Fiore, Jon Sterling
Let m be a positive integer and let n be an integer. Define P to the following predicate on the integers: P(z) \coloneqq 0 \leq z <m \land (z \equiv n \mod m)\text {.} Then we have: \forall x,y:\mathbb {Z} \mathpunct {.} P(x) \land P(y) \implies x = y
Proof.
- September 25, 2026
- Marcelo Fiore, Jon Sterling
Let m,n,x,y be integers with m positive. We further assume the following:
- 0\leq x < m
- 0\leq y < m
- x\equiv n \mod m
- y\equiv n \mod m
Because congruence is transitive (prove that for yourself as an exercise), we furthermore have x\equiv y \mod m, and hence we may assume some k:\mathbb {Z} such that km=x-y. Because 0\leq x,y<m we have km=x-y<m; this can only happen if k\leq 0. By the same token, we have -km = y-x < m, which can only happen if -k\leq 0. Therefore we have 0=x-y and hence x=y.
Corollary Proof of Example [01AZ] [01B1]
- September 25, 2026
- Jon Sterling
We must prove the following:
\forall n:\mathbb {Z}\mathpunct {.} \exists ! z:\{0\ldots m - 1\}\mathpunct {.} (n\equiv z \mod m)Fixing an integer n, it suffices to prove that (1) there exists some z in \{0\ldots m-1\} congruent to n modulo m, and (2) that z is unique with this property.
For the first part, we note that the remainder of n\div m satisfies the desired property. For the second part, recall that Proposition [01B0] says precisely that any two x,y\in \{0\ldots m-1\} that are congruent to n modulo m are equal.