561 lines
15 KiB
Text
561 lines
15 KiB
Text
#import "@youwen/zen:0.1.0": *
|
|
|
|
#show: zen.with(
|
|
title: "Math 8 Course Notes",
|
|
author: "Youwen Wu",
|
|
date: "Winter 2025",
|
|
subtitle: [Taught by Matt Porter],
|
|
abstract: [
|
|
In the broad light of day mathematicians check their equations and their
|
|
proofs, leaving no stone unturned in their search for rigour. But, at night,
|
|
under the full moon, they dream, they float among the stars and wonder at the
|
|
miracle of the heavens. They are inspired. Without dreams there is no art, no
|
|
mathematics, no life.
|
|
#align(end, [-- Michael Atiyah])
|
|
],
|
|
)
|
|
|
|
#outline()
|
|
|
|
= Introduction
|
|
|
|
Math 8 is an introductory course on mathematical logic and the methods of
|
|
proof. In general it will be quite trivial for anyone somewhat familiar with
|
|
competition mathematics or proofs. If you are at UCSB, I highly recommend you
|
|
take this course as soon as possible to unlock the rest of the higher
|
|
mathematics offerings here (which are much more interesting).
|
|
|
|
= Course Logistics
|
|
|
|
Everything in this section is information only valid for the Winter 2025 quarter with Professor Porter.
|
|
|
|
The textbook for the course is _Smith, Eggen, Andre. A Transition to Advanced
|
|
Mathematics. 8th ed_. #smallcaps[isbn:] `978-1-285-46326-1`. Chapters 1-5 will
|
|
be covered.
|
|
|
|
Lecture meets every M-W-F from 12:00 -- 12:50 in Phelps 1444. Recitation meets
|
|
M-W from 7:00 -- 7:50 in HSSB 1236.
|
|
|
|
== Homework
|
|
|
|
Homework is from textbook and is worth 30% of the grade, due on Gradescope.
|
|
Homework is due every W at 11:59 PM. LaTeX is recommended for typesetting but
|
|
of course we will be using Typst, the superior typesetting software for
|
|
mathematics.
|
|
|
|
Section and problem numbers should be clearly labeled and problems should be
|
|
done on a single column.
|
|
|
|
The lowest homework score will be dropped.
|
|
|
|
== Exams
|
|
|
|
Each exam is 20% of the grade. The final exam will replace the lowest of the
|
|
first two exam scores if it is higher.
|
|
|
|
= Lecture #datetime(year: 2025, month: 1, day: 6).display()
|
|
|
|
|
|
== Trivial preliminaries
|
|
|
|
Definitions barely worth considering. Included purely for posterity.
|
|
|
|
#definition("Proposition")[
|
|
A proposition is a sentence which is either true or false.
|
|
]
|
|
|
|
#example("Primes")[
|
|
The numbers 5 and 7 are prime.
|
|
]
|
|
|
|
#example("Not a proposition")[
|
|
$x^2 + 6x + 8 = 0$
|
|
]
|
|
|
|
Propositions may be stated in the formalism of mathematics using connectives,
|
|
as *propositional forms*.
|
|
|
|
#definition("Propositional forms")[
|
|
Let $P$ and $Q$ be propositions. Then:
|
|
|
|
+ The conjunction of $P$ and $Q$ is written $P and Q$ ($P$ and $Q$).
|
|
+ The disjunction of $P$ and $Q$ is written $P or Q$ ($P$ or $Q$) (here "or" is the inclusive or).
|
|
+ The negation of $P$ is written $not P$.
|
|
]
|
|
|
|
#definition("Tautology")[
|
|
A propositional form for which all of its values are true. In other words, a statement which is always true.
|
|
]
|
|
|
|
#definition("Contradiction")[
|
|
A propositional form for which all of its values are false. In other words, a statement which is always false.
|
|
]
|
|
|
|
#problem[Prove that $(P or Q) or (not P and not Q)$ is a tautology][
|
|
Trivial, omitted.
|
|
]
|
|
|
|
#example[Several denials of the statement "integer $n$ is even"][
|
|
- It is not the case that integer $n$ is even.
|
|
- Integer $n$ is not even.
|
|
- $n != 2m, forall m in ZZ$
|
|
- $n = 2m + 1, exists m in ZZ$
|
|
]
|
|
|
|
DeMorgan's Laws tell us how to distribute logical connectives across
|
|
parentheses.
|
|
|
|
#fact[DeMorgan's Laws][
|
|
+ $not (P or Q) = not P and not Q$
|
|
+ $not (P and Q) = not P or not Q$
|
|
]
|
|
|
|
#proof[
|
|
Trivially, by completing a truth table.
|
|
]
|
|
|
|
Also, propositional forms obey commutative, associative, distributive laws,
|
|
which can be trivially obtained from symbolic manipulations and will not be
|
|
restated. Together with the double negation law and the _law of the excluded
|
|
middle_, these comprise the axioms of a system of propositional logic.
|
|
|
|
#fact[
|
|
We abbreviate propositional forms by eliding parentheses, according to the rules:
|
|
|
|
+ $not$ is applied to the smallest proposition following it.
|
|
+ $and$ connects the smallest propositions surrounding it.
|
|
+ $or$ connects the smallest propositions surrounding it.
|
|
]
|
|
|
|
= Notes on Logic and Proofs, 1.2
|
|
|
|
_Prototypical example for this section:_ If $sin pi = 1$, then $6$ is prime.
|
|
|
|
#definition[
|
|
For a *antedecent* $P$ and *consequent* $Q$, the *conditional sentence* $P =>
|
|
Q$ is the proposition "If $P$, then $Q$."
|
|
]
|
|
|
|
#remark[
|
|
The statement $P => Q$ states $P$ _implies_ $Q$ and is only false if $P$ is
|
|
true and $Q$ is false, since this is the only case where $P$ did not imply $Q$.
|
|
]
|
|
|
|
A conditional may be true even when the antedecent and consequent are unrelated.
|
|
|
|
= Lecture #datetime(day: 8, month: 1, year: 2025).display()
|
|
|
|
== More propositional forms
|
|
|
|
#definition[
|
|
Let $P$ and $Q$ be propositions. The *biconditional sentence*
|
|
$ P <=> Q $
|
|
is true exactly when $P$ and $Q$ are both true or both false.
|
|
]
|
|
|
|
#example[Ways of stating $P <=> Q$][
|
|
- $P$ if and only if $Q$
|
|
- $P$ iff. $Q$
|
|
- $P$ is equivalent to $Q$
|
|
]
|
|
|
|
#exercise[
|
|
Translate each statement into symbols, where $a$ is a fixed real number.
|
|
|
|
+ $a > 5$ is sufficient for $a > 3$
|
|
+ $a > 3$ is necessary for $a > 5$
|
|
+ $a > 5$ only if $a > 3$
|
|
+ $|a| = -a$ whenever $a < 0$
|
|
+ $|a| = 2$ is necessary and sufficient for $a^2 = 4$
|
|
]
|
|
|
|
#definition[
|
|
#set enum(numbering: "a.")
|
|
Let $P$ and $Q$ be propositions.
|
|
|
|
+ The converse of $P => Q$ is $Q => P$
|
|
+ The contrapositive of $P => Q$ is $not Q => not P$
|
|
]
|
|
|
|
#theorem[
|
|
Let $P$ and $Q$ be propositions. Then:
|
|
]
|
|
|
|
#example[
|
|
If $f(x)$ is differentiable at $x = a$, then $f(x)$ is continuous at $x = a$.
|
|
|
|
$ P => Q $
|
|
|
|
+ $not Q => not P$: if $f$ is not continuous at $x=a$, then $f$ is not differentiable at $x = a$.
|
|
|
|
+ $Q => P$: if $f$ is continuous at $x = a$, then $f$ is diffferentiable at $x = a$.
|
|
]
|
|
|
|
#fact[
|
|
We apply our new logical connectives in the following order: $not, and, or, => , <=>$
|
|
]
|
|
|
|
#example[
|
|
Include parentheses to clarify the expression.
|
|
|
|
$ P or Q => not R <=> S and T $
|
|
]
|
|
|
|
#theorem[
|
|
#set enum(numbering: "a.")
|
|
For propositions $P$, $Q$, and $R$, the following are equivalent:
|
|
|
|
+ $P => Q "and" not P or Q$
|
|
+ $P <=> Q "and" (P => Q) and (Q => P)$
|
|
+ $not (P => Q) "and" P and not Q$
|
|
+ $not (P and Q) "and" P => not Q$
|
|
+ $not (P and Q) "and" Q => not P$
|
|
+ $P => (Q => R) "and" (P and Q) => R$
|
|
+ $P => (Q and R) "and" (P => Q) and (P => R)$
|
|
+ $(P or Q) => R "and" (P => R) and (Q => R)$
|
|
]
|
|
|
|
== Quantified statements
|
|
|
|
#definition[
|
|
A *predicate* or *open sentence* is a sentence involving one or more variables.
|
|
]
|
|
|
|
#example[
|
|
Consider the open sentence $P(x,y): x^2 + y^2 = 25$. Write a true and a false proposition.
|
|
|
|
$
|
|
P(3,-4) &: 3^2 + (-4)^2 = 25 &"(true)" \
|
|
P(2,0) &: 2^2 + 0^2 = 25 &"(false)" \
|
|
$
|
|
]
|
|
|
|
|
|
#definition[
|
|
The *universe* is the set of all objects available for substitution into an open sentence. Denoted $U$.
|
|
]
|
|
|
|
#definition[
|
|
A *truth set* is all objects in $U$ that make an open sentence true.
|
|
]
|
|
|
|
#example[
|
|
Let the universe be the set of all real numbers for the open sentence $P(x) : x^2 + x = 6$. Find the truth set.
|
|
|
|
$
|
|
U = RR \
|
|
"truth set:" {2,-3}
|
|
$
|
|
]
|
|
|
|
#definition[
|
|
Let $P(x)$ be an open sentence with variable $x$.
|
|
|
|
The *universal quantifier* is the sentence
|
|
|
|
$ forall x in U, P(x) $
|
|
|
|
The *existential quantifier* is the sentence:
|
|
$ exists x in U, P(x) $
|
|
|
|
The *unique existence quantifier* is the sentence
|
|
$ exists! x in U, P(x) $
|
|
]
|
|
|
|
#example[
|
|
Let the universe be the set of all real numbers and consider the open sentence
|
|
$ P(x) : x^2 + 1 >= 0 $
|
|
Consider the quantified sentence $forall x in U,P(x)$. Then
|
|
$ forall x in RR, x^2 + 1 >= 0 $
|
|
is a true statement.
|
|
|
|
However, if instead $U = CC$, then the sentence is false.
|
|
]
|
|
|
|
#example[
|
|
Let the universe be the set of all real numbers and consider the open sentence
|
|
|
|
$
|
|
Q(x) "where" x in ZZ \
|
|
R(x) "is a perfect square" \
|
|
$
|
|
Consider the quantified sentence
|
|
$ exists Q(x), R(x) $
|
|
]
|
|
|
|
#example[
|
|
Let the universe be the set of all real numbers and consider the open sentence
|
|
|
|
$ P(x,y) : y = x^3 + 4 $
|
|
|
|
Consider the quantified sentence
|
|
|
|
$ forall y in U, exists! x in U, P(x,y) $
|
|
|
|
It is true because $P(x,y)$ is injective (one-to-one).
|
|
]
|
|
|
|
= Missed a bunch of lecture :(
|
|
|
|
Probably not any important content, though.
|
|
|
|
= Lecture #datetime(day: 17, month: 1, year: 2025).display()
|
|
|
|
== Proof of a biconditional statement
|
|
|
|
To prove a biconditional statement of the form $P <=> Q$, we need to show
|
|
$ P => Q and Q => P $
|
|
|
|
#theorem("Fundamental Theorem of Arithmetic")[
|
|
$forall x in ZZ, x > 1$, $x$ can be written as a product of prime factors.
|
|
Additionally, these prime factors are unique, i.e. there is only one set of
|
|
prime factors that uniquely factorizes $x$. Hence it is sometimes called the
|
|
_unique factorization theorem_ or the _prime factorization theorem_.
|
|
]
|
|
|
|
#example[
|
|
Assume $p$ is prime. Then $p | b$ iff $p | b^2$.
|
|
|
|
#proof[
|
|
First let us show $p | b => p | b^2$. We know $b$ can be written as the
|
|
product of the prime $p$ and some other integer $n$.
|
|
$ b = p n $
|
|
Then
|
|
$ b^2 = p^2 n^2 $
|
|
which implies $p$ is a factor of and divides $b^2$. So,
|
|
$ p | b => p | b^2 $
|
|
|
|
Now let us show the converse, i.e. $p | b^2 => p | b$.
|
|
|
|
By the unique factorization theorem, $b^2$ can be written as a unique
|
|
product of primes, one of which is $p$. But we also know $b^2 = b dot b$
|
|
and so at least one $b$ must have a prime factor $p$. But $b$ has unique
|
|
prime factors (again by the same theorem) so $b$ always has a prime factor
|
|
$p$. Hence,
|
|
$ p | b^2 => p | b $
|
|
]
|
|
]
|
|
|
|
== Proof by contradiction
|
|
|
|
#definition[
|
|
A proof by contradiction of the statement $P$ proceeds by assuming $not P$,
|
|
then showing that this fact leads to a contradiction.
|
|
|
|
A proof by contradiction of $P => Q$ proceeds by assuming $P and not Q$, then
|
|
showing a contradiction, forcing that $P$ indeed implies $Q$.
|
|
]
|
|
|
|
#definition[
|
|
A real number $x in RR$ is called rational iff
|
|
$ exists p,q in ZZ, x = p / q $
|
|
]
|
|
|
|
#definition[
|
|
$x$ is irrational if it is not rational.
|
|
]
|
|
|
|
#example[
|
|
Prove that if $x$ is rational and $y$ is irrational, then $2x - y$ is irrational.
|
|
|
|
#proof[
|
|
Suppose that $x$ is rational and $y$ is irrational but $2x - y$ is
|
|
rational. Then $x = a / b$ and $2x - y = c/d$ where $a,b,c,d in ZZ$ and $b
|
|
!= 0, d != 0$.
|
|
|
|
Then
|
|
$
|
|
2a / b - y &= c / d \
|
|
y &= (2a) / b - c / d \
|
|
y = (2a d - b c) / (b d) &= m / n
|
|
$
|
|
which implies $y = m/n$ and therefore we have a contradiction. So $2x - y$
|
|
is irrational.
|
|
]
|
|
]
|
|
|
|
#fact[$sqrt(2)$ is irrational.]
|
|
|
|
The proof of this fact generalizes nicely to show that the square root of any
|
|
non-perfect square is irrational.
|
|
|
|
#example[
|
|
Prove that $sqrt(6)$ is irrational.
|
|
|
|
#proof[
|
|
Seeking a contradiction, suppose $sqrt(6)$ is rational. Then $sqrt(6) =
|
|
a/b, exists a,b in ZZ$ with $b != 0$.
|
|
|
|
|
|
Then
|
|
$ a^2 = 6b^2 = 3 (2b^2) $
|
|
Since $a^2 = a dot a$, $a$ has $j = 0,1,2, ...$ factors of $3$ in its
|
|
unique prime factorization, then $a^2$ has $2j$ factors of $3$, which is to
|
|
say that $a^2$ has an even $hash$ factors of 3.
|
|
|
|
Similarly, $b^2$ has an even $hash$ of 3, say $2k$, where $k = 0, 1, 2,
|
|
...$. Then $3(2b^2)$ has $2k + 1$ $hash$ factors of 3, an odd amount.
|
|
|
|
But $a^2$ = $3(b^2)$ so they must have the same factors, a contradiction.
|
|
Therefore $sqrt(6)$ must be irrational.
|
|
]
|
|
]
|
|
|
|
#exercise[
|
|
Prove that $sqrt(2)$ is irrational using the method above.
|
|
]
|
|
|
|
#exercise[
|
|
Show that $sqrt(15)$ is irrational.
|
|
]
|
|
|
|
#problem("Euclid's Theorem")[
|
|
Show that there are an infinite amount of prime numbers.
|
|
]<euclid>
|
|
|
|
#problem[
|
|
Show that in general, given any integer $n$ that is not a perfect square,
|
|
i.e. $ exists.not a in ZZ, n = a^2 $ $sqrt(n)$ is irrational.
|
|
]<perfectsquare>
|
|
|
|
== Proofs involving quantifiers
|
|
|
|
Many of our proofs up to this point have been of the form
|
|
$ forall x in U, P(x) => Q(x) $
|
|
|
|
To prove a statement of this form,
|
|
|
|
+ Let $x in U$.
|
|
+ Assume $P(x)$.
|
|
+ Show $Q(x)$.
|
|
+ Conclude $forall x in U, P(x) => Q(x)$.
|
|
|
|
#example[
|
|
Prove that $forall x,y in ZZ$, $2x + 14y != 3$.
|
|
|
|
#proof[
|
|
Seeking a contradiction, suppose instead $2x + 14y = 3$. Then
|
|
$2x $ is even, and $14y = 2(7y)$ is even, and therefore $2x + 14y$ is even.
|
|
But $3$ is odd, so they cannot be equal.
|
|
|
|
Alternatively simply write
|
|
$ x + 7y = 1.5 $
|
|
but the ring of $ZZ$ is closed under addition so we have a contradiction.
|
|
]
|
|
]
|
|
|
|
To prove a statement of the form
|
|
|
|
$ exists x in U, P(x) $
|
|
|
|
+ Find at least one $x in U$ that makes $P(x)$ true.
|
|
+ Conclude $exists x in U, P(x)$.
|
|
|
|
#example[
|
|
Prove that there is a natural number $N$ such that for all natural numbers $n > N$,
|
|
$ 1 / n < 0.02 $
|
|
We want $1/n < 0.02$, so the idea is to play around with this statement. Taking reciprocals,
|
|
$ n > 50 $
|
|
#proof[
|
|
Let $N = 50$. Then $n in NN$ and $n > N = 50$,
|
|
$ 1 / n < 1 / 50 = 0.02 $
|
|
]
|
|
]
|
|
|
|
#exercise[
|
|
Prove that between any two rational numbers $x$ and $y$ there is another
|
|
rational number $z$.
|
|
]<rational-between>
|
|
|
|
== Solutions
|
|
|
|
Solutions to selected problems and exercises.
|
|
|
|
#linebreak()
|
|
|
|
*@euclid.* We begin by considering primes $p_1, p_2, ..., p_n$. Let $P = p_1 dot p_2 dot ... dot p_n$. Then let $q = P + 1$.
|
|
|
|
Then if $q$ is prime, we have an additional prime not in the original list.
|
|
|
|
Otherwise, $q$ is not prime and we have a unique prime factorization of $q$.
|
|
Without loss of generality, take one such prime to be $p_k$. $p_k$ cannot be in
|
|
the original list $p_1, p_2, ..., p_n$.
|
|
|
|
If $p_k$ were in the original list, then since $P$ is divisible by $p_k$, and $P
|
|
+ 1$ is also divisible by $p_k$, 1 must be divisible by $p_k$ which is
|
|
impossible. So $p_k$ is a new prime.
|
|
|
|
For completeness, let's finish the proof explicitly. Start with primes $p_1$,
|
|
$p_2$. The method above implies the existence of another prime, which we denote
|
|
$p_3$. Repeat this to find additional primes $p_(k+1)$.
|
|
|
|
*@perfectsquare.* This is a generalization of the proof $sqrt(6)$ is
|
|
irrational. Seeking a contradiction, suppose $sqrt(a)$ is irrational.
|
|
|
|
$
|
|
exists p,q in ZZ, sqrt(a) = p / q \
|
|
p^2 = a q^2
|
|
$
|
|
|
|
Then by the fundamental theorem of arithmetic,
|
|
|
|
$ a = b_1 dot b_2 dot ... dot b_n $
|
|
|
|
where $b_i$ is prime.
|
|
|
|
$ p^2 = (Pi^n_(i=1) b_1) dot q^2 $
|
|
|
|
Notice all $b_i$ are unique (again by the same theorem) and without loss of
|
|
generality, choose a $b_k$, $1 <= k <= n$.
|
|
|
|
Then $p$ has $j = 1,2,...$ $hash$ of $b_k$ in its factors. Then $p^2$ has $2j$
|
|
$hash$ of $b_k$. Similarly, $q$ has $L = 1,2,...$ $hash$ of $b_k$, and $q^2$
|
|
has $2L$. Then $(Pi ^n _(i=1)) q^2$ has $2L + 1$ $hash$ of $b_k$. But
|
|
|
|
$ p^2 = (Pi^n_(i=1)) q^2 $
|
|
|
|
and by unique factorization they must have the same $hash$ of the prime factor $b_k$, so $sqrt(a)$ is irrational.
|
|
|
|
Note that if $a$ was a perfect square, TODO
|
|
|
|
*@rational-between.* Effectively we are asked to show that given $x,y in QQ$,
|
|
where $x < y$, $exists z in QQ$ such that $x < z < y$.
|
|
|
|
First, let us take the difference between $x$ and $y$.
|
|
|
|
$
|
|
exists a,b in ZZ \
|
|
x = a / b \
|
|
y = c / d \
|
|
y - x = (b c - a d) / (b d)
|
|
$
|
|
|
|
So we know that
|
|
|
|
$
|
|
y = x + (b c - a d) / (b d)
|
|
$
|
|
|
|
We see that if we can find any nonzero integer less than $(b c - a d)/(b d)$,
|
|
adding it to $x$ gives us the number between $x$ and $y$ we desire. One option is
|
|
|
|
$
|
|
(b c - a d) / (b d + 1) < (b c - a d) / (b d) \
|
|
x < x + (b c - a d) / (b d + 1) < x + (b c - a d) / (b d) = y \
|
|
$
|
|
|
|
So one such $z$ is
|
|
|
|
$ z = x + (b c - a d) / (b d + 1) $
|
|
|
|
#remark[
|
|
There is a minor hole in this proof, if $b d + 1 = 0$, $z$ is undefined. We
|
|
can easily avoid this by replacing all instances of $b d + 1$ with, say, $b d
|
|
+ 2$, when $b d + 1 = 0$.
|
|
]
|
|
|
|
#remark[
|
|
A much easier and less roundabout proof is to take
|
|
$ z = (x + y) / 2 $
|
|
Then $(x + y)/2$ is obviously rational and strictly between $x$ and $y$.
|
|
]
|