Understanding negation [01BN]
- September 29, 2026
- Marcelo Fiore, Jon Sterling
Negations are statements of the form “not P”. You will see many ways of phrasing negative statements:
- “P is false”
- “P is not the case”
- “It is not the case that P holds”
- “P is absurd”
- “P leads to absurdity”
- “P leads to contradiction”
- “P is contradictory”
- \lnot P
The meaning of \lnot P is simply that P implies falsehood.
Observation [01BP]
- September 29, 2026
- Jon Sterling
For any statement P, we have \lnot P if and only if P\Longleftrightarrow \bot .
Proof.
- September 29, 2026
- Jon Sterling
Because \lnot P is defined to be P\implies \bot , we may clearly deduce \lnot P from the bi-implication P\Longleftrightarrow \bot . Conversely, assume \lnot P; to prove P\Longleftrightarrow \bot it suffices to prove \bot \implies P, which is the principle of explosion: from \bot anything follows.
Derived rules proving and using for negations [01BQ]
- September 29, 2026
- Jon Sterling
From Observation [01BP] we obtain basic rules for proving negations and for using assumptions of negation as a special case of the rules for proving and using implications and falsehood.
- To prove a negation \lnot P, assume P and prove \bot .
- To use an assumption \lnot P to prove Q, simply prove P.
The derived rules for proving negations and using negated assumptions are fundamental, but we can establish some very convenient identities (bi-implications) that will make negation easier to use in practice.
Identities involving negation; the law of the excluded middle [01BR]
- September 29, 2026
- Marcelo Fiore, Jon Sterling
We have the following bi-implications for statements involving negation; you may use these to simplify your goals or your assumptions at will.
The following are the constructive laws of negation:
\begin {aligned} \lnot (\exists x:\tau \mathpunct {.} P(x)) &\Longleftrightarrow \forall x:\tau \mathpunct {.} P(x) \\ \lnot (P\lor Q) &\Longleftrightarrow \lnot P\land \lnot Q \\ \lnot (P\Longleftrightarrow Q) &\Longleftrightarrow (P \Longleftrightarrow \lnot Q) \end {aligned}The first two above are called De Morgan laws. You can prove these identities (and you should!) using nothing more than the basic laws of existential quantification, universal quantification, disjunction, biimplication, and negation.
Classical logic supports the following additional laws, which can be proved if you additionally assume the law of the excluded middle, i.e. P\lor \lnot P:
\begin {aligned} \lnot \forall x:\tau \mathpunct {.} P(x) &\Longleftrightarrow \exists x:\tau \mathpunct {.} \lnot P(x) \\ \lnot (P\land Q) &\Longleftrightarrow \lnot P \lor \lnot Q \\ \lnot \lnot P &\Longleftrightarrow P \end {aligned}The first two identities above are also called De Morgan laws. The third identity is called double negation elimination.
In this course, we do freely use the law of the excluded middle, but students tend to overuse it; if you find yourself using it, you should pause and take note. Often there is a simpler and more elegant constructive proof of a statement that avoids P\lor \lnot P.
Theorem Contrapositive of implication [01BS]
- September 29, 2026
- Marcelo Fiore, Jon Sterling
For all statements P and Q, we have (P\implies Q) \implies (\lnot Q \implies \lnot P)\text {.}
Try this one yourself first before clicking here to reveal a proof.
Proof.
- September 29, 2026
- Marcelo Fiore, Jon Sterling
Assume P\implies Q and \lnot Q; to prove \lnot P, we assume P and need to prove \bot . Using our negated assumption \lnot Q it suffices to prove Q. To that end we use our assumption P\implies Q with our other assumption P.
The contrapositive identity [01BU]
- September 29, 2026
- Marcelo Fiore, Jon Sterling
For all statements P and Q we have (P \implies Q) \Longleftrightarrow (\lnot Q \implies \lnot P)\text {.}
Try this one yourself before clicking here to reveal a proof.
Proof.
- September 29, 2026
- Marcelo Fiore, Jon Sterling
One direction is already proved in Theorem [01BS]. It remains to show that \lnot Q \implies \lnot P implies P\implies Q.
We assume \lnot Q\implies \lnot P and P, and our goal is to prove Q. By double negation elimination it suffices to prove \lnot \lnot Q. We assume \lnot Q, and our goal is to prove \bot ; then we use our assumption \lnot Q\implies \lnot P to deduce \lnot P, which we use with our assumption P to reach a contradiction.
We are almost in a position that we can prove the irrationality of \sqrt 2. We will need a lemma first.
Lemma Rationals in terms of proper fractions [01BV]
- September 29, 2026
- Marcelo Fiore, Jon Sterling
A positive real number x is rational if and only if there exist positive integers m,n such that x=m/n and there exists no prime p dividing both m and n.
Interpretation.
- September 29, 2026
- Marcelo Fiore, Jon Sterling
The statement is rendered symbolically as follows:
If we knew how to compute greatest common divisors, we could give a very direct and constructive proof. For the sake of the game, however, we will give a proof by contradiction.
Proof.
- September 29, 2026
- Marcelo Fiore, Jon Sterling
We fix a positive real number x. The backward direction holds trivially, so we only need to prove the forwards direction.
To that end, we assume that x is rational, i.e. that there are some integers a_0,b_0 such that x=a_0/b_0; because x is positive, we may assume without generality that a_0,b_0 are both positive.
We wish to prove \exists m,n:\mathbb {Z}^+\mathpunct {.} x=m/n \land \lnot \exists p:\mathbb {Z}\mathpunct {.} \mathsf {isPrime}(p)\land p \mid m \land p \mid n\text {,} and by double negation elimination it suffices to prove \lnot \lnot \exists m,n:\mathbb {Z}^+\mathpunct {.} x=m/n \land \lnot \exists p:\mathbb {Z}\mathpunct {.} \mathsf {isPrime}(p)\land p \mid m \land p \mid n\text {,} which we may calculate using the classical negation identities in the following way:
\begin {aligned} & \lnot \lnot \exists m,n:\mathbb {Z}^+\mathpunct {.} x=m/n \land \lnot \exists p:\mathbb {Z}\mathpunct {.} \mathsf {isPrime}(p)\land p \mid m \land p \mid n \\ &\Longleftrightarrow \lnot \forall m,n:\mathbb {Z}^+\mathpunct {.} x\not = m/n \lor \exists p:\mathbb {Z}\mathpunct {.} \mathsf {isPrime}(p)\land p \mid m \land p \mid n \\ &\Longleftrightarrow \lnot \forall m,n:\mathbb {Z}^+\mathpunct {.} x= m/n \implies \exists p:\mathbb {Z}\mathpunct {.} \mathsf {isPrime}(p)\land p \mid m \land p \mid n \end {aligned}To prove this negation, we therefore assume that for any representation of x by a positive fraction m/n there exists a prime dividing both m and n, and we must now prove \bot .
We consider in particular the fractional representation x=a_0/b_0 that we started with; from this we may assume some prime p_0 such that both p_0\mid a_0 and p_0\mid b_0. Hence we may assume integers a_1, b_1 such that a_0 = p_0 a_1 and b_0 = p_0 b_1.
x = \frac {a_0}{b_0} = \frac {p_0a_1}{p_0b_1} = \frac {a_1}{b_1}Iterating this process any number of times, say l, we have a = p_0 \ldots p_l a_{l+1} and b = p_0\cdots p_lb_{l+1}. If we choose l \coloneqq \lfloor \log _2 a_0\rfloor we would have a_0 = p_0\cdots p_1 a_{l+1} \geq 2^{l+1} > a_0 because all the primes p_i are at least 2 by definition. Of course, a_0>a_0 is contradictory so we are done.
Remark. But which fraction? [01EA]
- September 29, 2026
- Marcelo Fiore, Jon Sterling
The proof we have given above is extremely classical. First of all, we admittedly used the classical negation identities. Mathematicians are not afraid of using these axioms, but it is worth considering whether a simpler and more concrete proof is available. The proof that we have given above contains no hint whatsoever of the specific representation x=m/n that we should obtain for a rational number x; later on, we will learn how to use Euclid’s algorithm to give a direct and constructive argument that explicitly finds co-prime m,n such that x=m/n.
Lemma Squaring preserves and reflects evenness [01BW]
- September 29, 2026
- Marcelo Fiore, Jon Sterling
An integer is even if and only if its square is even.
Proof.
- September 29, 2026
- Marcelo Fiore, Jon Sterling
In the forward direction, to show \mathsf {isEven}(n)\implies \mathsf {isEven}(n^2) we use the fact that even numbers are closed under multiplication (which you may check for yourself as an exercise.)
In the backward direction, suppose that n^2 is even. To show that n is even is equivalent to showing that n is not odd. Therefore, we assume that n is odd and attempt to derive a contradiction. It would be enough to show that n^2 is odd.
To that end, since we assumed n is odd, we may find some integer k with n = 2k+1. Now we calculate the square:
n^2 = (2k+1)^2 = 4k^2 + 4k +1 = 2(2k^2 + 2k) + 1Hence n^2 is odd, and we are done.
Theorem Irrationality of \sqrt 2 [01BT]
- September 29, 2026
- Marcelo Fiore, Jon Sterling
The real number \sqrt 2 is irrational.
Proof.
- September 29, 2026
- Marcelo Fiore, Jon Sterling
We are asked to show \lnot (\mathsf {isRational}(\sqrt 2)). To that end, we assume that \sqrt 2 is rational, and we must prove \bot .
By Lemma [01BV], we may assume a fractional representation \sqrt 2 = m/n for some positive m,n with no prime factors in common. To get a contradiction, we are going to show that under the assumptions m and n are actually both even and therefore both divisible by 2, a prime. First we calculate:
\begin {aligned} \sqrt 2 &= \frac {m}{n} \\ 2 &= \frac {m^2}{n^2} \\ 2n^2 &= m^2 \end {aligned}It follows that m^2 is even; because squaring reflects evenness, m is even.
Because 2n^2 = m^2 and m^2 is even, we have some integer l with m = 2l. Therefore:
2n^2 = m^2 = (2l)^2 = 4l^2Hence we have n^2 = 2l^2, so n^2 is even and by another application of the lemma we conclude that n is even too.
Therefore, m and n are both divisible by the prime 2, which contradicts our assumption that m and n share no prime factors in common.