Lecture 2: conjunction, divisibility, congruence, universal quantification [019Y]
- September 22, 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.
Divisibility [01G0]
- November 9, 2026
- with contributions from Jon Sterling, Marcelo Fiore
Definition Divisibility [01A0]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
Let d and n be integers. We say that d divides n and write d \mid n, whenever there exists some integer k such that k\cdot d= n.
Notational comment: The “pipe” or “bar” in this notation is not an operation on integers like plus and times: it is a predicate, a property that a pair of integers may or may not satisfy.
Other terminology: other terminologies for the notation d\mid n are “d is a factor of n” and “n is divisible by d” and “n is a multiple of d”. You may find one or more of these terminologies less confusing.
Example [01A1]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
The statement 2 \mid 4 is true, whereas 4\mid 2 is not.
Proof.
- September 22, 2026
- Marcelo Fiore, Jon Sterling
We have 2\cdot 2 = 4 but there is no integer k such that k\cdot 4 = 2.
Understanding conjunction [01AI]
- September 23, 2026
- Marcelo Fiore, Jon Sterling
Conjunctive statements are of the form P\ \textbf {and}\ Q\text {,} which holds if and only if both P and Q hold. Symbolically, we may write P\land Q to mean the same thing.
How to prove a conjunctive statement [01AJ]
- September 23, 2026
- Marcelo Fiore, Jon Sterling
To prove a goal of the form P\land Q, we first prove P and then we prove Q.
In other words, when your goal is a conjunction, you make progress by splitting your goal into two goals. The old assumptions are copied into each of the two goals, but as the subproofs evolve you may get multiple goals with different assumptions.
Scratch work for multiple goals [01AL]
- September 23, 2026
- Marcelo Fiore, Jon Sterling
In our previous illustrations of scratch work, we have been able to maintain a simple two-column layout: assumptions on the left, goal on the right. With conjunction in play, we now will have to consider multiple goals, each with different sets of assumptions. The tabular notation we’ve used so far is not really suitable for this scenario, so I will show you a hierarchical notation.
The idea is to write an outline, where on each line you indicate three things: the current assumptions, the current goal, and the step that you will take. Here is an example:
- Assumptions: NoneGoal: P \implies (Q\implies (P\land Q))Step: Assume P.
- Assumptions: PGoal: Q\implies (P\land Q)Step: Assume Q.
- Assumptions: P, QGoal: P\land QStep: Split the goal.
- Assumptions: P, QGoal: PStep: Use the assumption P.
- Assumptions: P, QGoal: noneStep: We are done.
- Assumptions: P, QGoal: QStep: Use the assumption Q.
- Assumptions: P, QGoal: noneStep: We are done.
Logicians have developed more succinct notations for proofs involving multiple goals. We will not teach it in this course, but here is an example (“sequent calculus”):
\dfrac { \dfrac { \dfrac { \dfrac {}{ P,Q \vdash P } \textit {assumption} \quad \dfrac {}{ P,Q \vdash Q }\textit {assumption} }{ P,Q \vdash P \land Q }\textit {split} }{ P\vdash Q\implies (P \land Q) }\textit {assume $Q$} }{ \cdot \vdash P\implies (Q\implies (P \land Q)) }\textit {assume $P$}How to split your goal in a written proof [01AK]
- September 23, 2026
- Marcelo Fiore, Jon Sterling
You should say what you are doing when you write the proof! If your goal is P\land Q, your proof at that point might look somehting like this:
Firstly, we prove P; [blah blah blah].
Secondly, we prove Q; [blah blah blah].
Returning to our scratchwork example, we would give a proper proof of P \implies (Q\implies (P \land Q)) as follows:
Proof.
- September 23, 2026
- Marcelo Fiore, Jon Sterling
We assume P and Q to prove P and Q. Firstly, we prove P by noting that it is one of our assumptions. Secondly, we prove Q in the same way.
Of course, the example above is a little silly because nobody would write so much detail for something so trivial. But it is good to practice being detailed at first, so that you do not get lost (or lose your reader) when you encounter an actually difficult proof.
Example Bi-implication [019W]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
Sometimes theorems may be stated in the form
P is equivalent to Q.
This means that P implies Q and Q implies P; in other words, it the bi-implication of P and Q is the conjunction of P\implies Q and Q\implies P. This kind of statement can be written in a variety of ways that you must become comfortable with; for example:
- P implies Q and vice versa.
- Q implies P and vice versa.
- P holds if and only if Q holds.
- P iff Q.
- P \Longleftrightarrow Q.
- P = Q.
If you see “iff”, you must read it out loud as “if and only if”. In reality this abbreviation saves very little space and it is more clear to just write out what is meant explicitly.
Here is an example of proving a bi-implication:
Proposition Squaring preserves and reflects evenness [019X]
- September 22, 2026
Suppose that n is an integer. Then n is even if and only if n^2 is even.
Proof.
- September 22, 2026
Let n be an integer. To show that n is even if and only if n^2 is even, we prove both implications.
Try to provide details of the forward and backword directions of the proof. Once you’ve given it an honest try, click this text to expand the proof.
- In the forward direction, we assume that n is even and must prove that n^2 is even. Every factor of n is also a factor of n^2, so we certainly have 2\mid n^2.
- In the reverse direction, we assume that n^2 is even and we must prove that n is even. Being even is the same as being not odd, so we have assumed that n^2 is not odd and we must show that n is not odd. Assume for the sake of contradiction that n is odd, so that we have n = 2\cdot k + 1 for some integer k. Then n^2 = (2k + 1)^2 = 4k^2 + 4k + 1 = 2(k^2+2k)+1 which is odd, but this contradicts our assumption that n^2 is not odd.
How to use a conjunctive statement [01AM]
- September 23, 2026
- with contributions from Jon Sterling, Marcelo Fiore
To use an assumption of the form P\land Q, you may treat it as two separate assumptions P and Q. We consider an example involving divisibility.
Theorem [01AN]
- September 23, 2026
- Marcelo Fiore, Jon Sterling
For every integer n, we have that 6 \mid n if and only if 2\mid n and 3\mid n.
Interpretation.
- September 23, 2026
- Marcelo Fiore, Jon Sterling
The statement of this theorem is slightly ambiguous: does it mean \forall n:\mathbb {Z}\mathpunct {.} 6\mid n \Longleftrightarrow (2\mid n \land 3\mid n) or does it mean \forall n:\mathbb {Z}\mathpunct {.} (6\mid n \Longleftrightarrow 2\mid n) \land 3\mid n\text {?}
The way we generally decide on what someone means is by assuming good faith on their part, i.e. that they aren’t intentionally trying to waste our time. The first statement looks likely to be true and the second statement looks likely to be false. Because of this, we infer that if someone really meant to refer to the second interpretation, they would have been more careful to make it explicit.
Proof.
- September 23, 2026
- Marcelo Fiore, Jon Sterling
Fixing n:\mathbb {Z}, we must show that 6\mid n if and only if both 2\mid n and 3 \mid n.
- In the forward direction, we assume 6\mid n to prove 2\mid n and 3\mid n. Firstly, we note from our assumption 6\mid n that we have some k:\mathbb {Z} such that 6k = n. Therefore, it suffices to prove 2\mid 6k and 3\mid 6k, both of which are trivial.
- In the backward direction, we assume both 2\mid n and 3\mid n, from which we obtain integers i and j such that 2i = 3j = n. We need to show that 6\mid n; to find a k such that 6k=n, we consider the following calculation: 6(i-j) = 3(2i) - 2(3j) = 3n - 2n = n Hence, setting k = i - j, we deduce 6 \mid n.
Divisibility and congruence [019Z]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
Definition Congruence [01A2]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
Fix a positive integer m. For integers a and b, we say that a is congruent to b modulo m, and write a \equiv b \mod m, to mean that m \mid (a-b).
In other words, two integers are congruent modulo m when their difference is divisible by m.
Example [01A3]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
Three illustrative examples of congruence:
- 18 \equiv 2 \mod 4, because 18-2 = 16 and 4\mid 16.
- 2\equiv -2 \mod 4, because 2-(-2) = 4 and 4\mid 4.
- 18\equiv -2\mod 4, because 18-(-2)=20 and 4 \mid 20.
The notion of congruence vastly generalises that of parity (even/oddness):
Proposition Parity in terms of congruence [01A4]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
For every integer n,
- n is even if and only if n\equiv 0\mod 2;
- n is odd if and only if n\equiv 1\mod 2.
Proof.
- September 22, 2026
- Marcelo Fiore, Jon Sterling
Prove this as homework. You may check your work after your attempt by clicking this text.
- n\equiv 0\mod 2 holds if and only if 2\mid n by definition, because n-0=n. It therefore suffices to show that n is even/non-odd if and only if n is divisible by 2. This may be shown by induction on n, which we will learn how to argue properly later in the course (but which you may already know how to do).
- n\equiv 1\mod 2 holds, by definition, if and only if 2\mid n-1, which is the same as to say that there exists some integer k such that 2k = n-1. This is equivalent to 2k+1=n, which is precisely the statement that n is odd.
Understanding universal quantification [01A5]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
Another important kind of complex statement used in mathematics is the universally quantified statement. To understand these, we must graps how to prove universal quantified statements as goals, and make good use of them as assumptions.
A universally quantified statement takes the following form:
For all individuals x of [some type], the [some predicate] holds of x.
The type of individual being quantified over is important; in discrete mathematics, one is often quantifying over integers or over vertices of a given graph, or even over all finite automata.
Anatomy of a universal quantification [01A6]
- September 22, 2026
- Jon Sterling
A universal quantification can be written symbolically as follows:
\forall x:\tau \mathpunct {.} P(x)In the above, x is a placeholder variable that is bound by the quantifier \forall : if the symbol x already referred something outside the quantifier, the x on the inside is understood to take precedence over it. This is like variable shadowing in your favorite programming language. Because x is just a placeholder, the two statements \forall x:\tau \mathpunct {.} P(x) and \forall y:\tau \mathpunct {.} P(y) are literally identical.
\tau refers to the type of thing being quantified over. For example, it might be the set of integers \mathbb {Z}.
For this universal quantification to actually be a mathematical statement, it must be the case that P(x) is the sort of thing you can say about things of type \tau . If that fails, the expression \forall x:\tau \mathpunct {.} P(x) fails to mean anything at all: it is “not even wrong”. It is not the sort of thing that can be right or wrong.
So, for example, \forall x:\mathbb {Z}\mathpunct {.} x > 0 is a meaningful (but false) statement, whereas \forall x:\mathbb {Z}\mathpunct {.} \pi \in x would be a meaningless expression because integers don’t contain things; they are just integers. (It is a statement of formal set theory, however: remember that set theory is not the same thing as mathematics, but rather a tool for modelling certain aspects of mathematical reasoning that was developed in a bygone era when doubt had been cast on the validity of mathematical reasoning.)
Example Universal quantification in the wild [01A7]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
We have already seen several examples of universal quantification.
- Closure of oddness under multiplication
- Square root reflects rationality
- Squaring preserves and reflects evenness
- Parity in terms of congruence
In fact, any statement that begins with something like “Let x be an integer” or “Fix a real number x” is a universally quantified statement. We have been implicitly using the rules of universal quantification without even knowing it; now we will make those rules explicit.
How to prove a universally quantified statement [01A8]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
To prove a goal of the form \forall x:\tau \mathpunct {.} P(x) we let x stand for an individual of type \tau and then we try to prove P(x).
Previously, said that in the course of a proof you should keep track of your current assumptions and your current goals at all times. We have been a little sloppy about the differences between assumptions take the form of statements (like Q) and assumptions that introduce placeholders standing for new individuals (like x:\mathbb {Z}). From now on, you should keep track of both kinds of assumption.
How to use a universally quantified statement [01AA]
- September 22, 2026
- Jon Sterling
If you have an assumption like \forall x:\tau \mathpunct {.} P(x), then you may pick (yourself!) some individual t of type \tau and conclude P(t).
This is called universal instantiation.
If your goal was some Q that is not literaly of the form P(t) for some t:\tau , have no fear: if you know which t you are going to want to use, then you may work as follows:
To prove Q assuming \forall x:\tau \mathpunct {.} P(x), having chosen some t:\tau , it suffices to prove that P(t) implies Q.
Now we will see an example that involves proving and using universally quantified statements.
Proposition Interaction between congruence and multiplication [01A9]
- September 22, 2026
- Marcelo Fiore, Jon Sterling
Fix a positive integer m. For integers a and b, we have that a \equiv b\mod m if and only if for all positive integers n we have that n\cdot a \equiv n\cdot b \mod n\cdot m.
Exegesis.
- September 22, 2026
- Marcelo Fiore, Jon Sterling
First of all, it is instructive to understand how the informal mathematical language of the proposition’s statement maps onto the more formal notions of universal quantification and bi-implication that we are learning.
- “Fix a positive integer m…” is a universal quantification over the collection of positive integers, and might be written \forall m:\mathbb {Z}^+.
- “For all integers a and b…” This is a pair of universal quantifications over the integers, and might be written \forall a,b:\mathbb {Z}.
- “…we have a\equiv b\mod m if and only if for all positive integers n we have n\cdot a\equiv n\cdot b \mod n\cdot m” is a bi-implication between a simple statement and a universally quantified statement, and it can be written like so: (a\equiv b\mod m) \Longleftrightarrow \forall n:\mathbb {Z}^+\mathpunct {.} n\cdot a \equiv n\cdot b \mod n\cdot m
So, in whole, the entire proposition may be written symbolically as follows:
\forall m:\mathbb {Z}^+\mathpunct {.} \forall a,b:\mathbb {Z}\mathpunct {.} (a\equiv b\mod m) \Longleftrightarrow \forall n:\mathbb {Z}^+\mathpunct {.} n\cdot a \equiv n\cdot b \mod n\cdot mProof.
- September 22, 2026
- Marcelo Fiore, Jon Sterling
Let m be a positive integer, and let a and b be arbitrary integers. We prove the bi-implication in either direction below..
- In the forward direction, we assume a\equiv b\mod m and fix positive n to show that n\cdot a \equiv n\cdot b \mod n\cdot m\text {.} Unravelling the definition of congruence, this is to say that n\cdot m \mid (n\cdot a - n\cdot b) or equivalently n\cdot m \mid n\cdot (a - b)\text {.} By our assumption a\equiv b \mod m we have some integer k such that m\cdot k = a - b, and so our goal may be rewritten as n\cdot m \mid n \cdot m \cdot k, which is immediate.
- In the backward direction, we assume that for all positive n we have n\cdot a \equiv n\cdot b \mod n\cdot m, and we must show that a\equiv b\mod m. We instantiate our assumption by choosing n to be 1, from which we may deduce 1\cdot a \equiv 1\cdot b \mod 1\cdot n, which is equivalent to our goal by the unit law of multiplication.