auto-update(nvim): 2025-02-19 13:40:36
Some checks are pending
Deploy Quartz site to GitHub Pages using Nix / build (push) Waiting to run
Deploy Quartz site to GitHub Pages using Nix / deploy (push) Blocked by required conditions

This commit is contained in:
Youwen Wu 2025-02-19 13:40:36 -08:00
parent bceed18c04
commit 69878532bb
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

View file

@ -596,101 +596,10 @@ emptyset$. But $b in emptyset$ is a contradiction by its definition.
$
]
= Solutions to selected exercises and problems
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,c,d 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$.
]
= Induction
== Weak and strong
Induction is a way to prove that a statement is true for all $NN$. Formally, it
is introduced like this: say you have a set $S subset.eq NN$ such that $1 in
S$. Then, if $n in S => n + 1 in S$, $S = NN$. Usually we plug $n$ into a
@ -839,7 +748,9 @@ We demonstrate the WOP in an alternative proof of
]
]
== Relations, partitions
= Relations, partitions
== Basic notions
#definition[
A relation on a set $A$ is a set of ordered pairs $(a,b)$ where $a,b in A$. A
@ -1007,3 +918,199 @@ nonempty subsets of $A$ whose union is $A$.
A = union.big_(x in A) overline(x)
$
]
= Lecture #datetime(day: 19, year: 2025, month: 2).display()
== Functions
Let $A$ and $B$ be sets. A relation $R$ from $A$ to $B$ is a subset $R subset.eq A times B$.
#definition[
A *function* $f$ from $A$ to $B$ relates each element of $"Dom"(R)$ to to exactly
one element of $"Rng"(R)$.
]
#fact[
A function from $A$ to $B$ is written
$
f : A -> B
$
]
#fact[
$
(x,y) in f <=> f(x) = y <=> x f y
$
]
We say $f : A -> A$ is a function on $A$.
#example[
Let $A = {1,2,3}$, $B = {x,y}$. A relation from $A$ to $B$ is a subset of $A
times B$, which has 6 elements. $A$ and $B$ admit $2^6 = 64$ distinct
relations.
When asking about functions instead, we note that $f$ admits either $(1, x)$
or $(1, y)$, but not both and so on. So there are $2^3 = 8$ distinct
functions.
]
#definition[
A function $f : A -> B$ is called a *map/mapping*. $A$ is the *domain*, $B$ is
the *codomain*. The *range* of $f$ $"Rng"(f) = {y in B : (exists x in A)(f(x) =
y)}$.
]
More terminology. Let $f : A -> B$, $(a,b) in f$, $f(x) = y$. Then
- $y$ is the *value* of $f$ at $x$
- $y$ is the *image* of $x$ under $f$
- $x$ is the *preimage* of $y$ under $f$
#fact[
$f : A -> B = g : C -> D$ if and only if $f subset.eq g$ and $g subset.eq f$.
]
#theorem[
$f : A -> B = g : C -> D$ if and only if
1. $"Dom"(f) = "Dom"(g), ($A = C$)$
2. $f(x) = g(x)$, $forall x in A = C$
]
#definition[
The *identity function* on $A$, $I_A : A -> A$ is defined by $I_A (x) = x, forall x in A$.
]
#definition[
If $A subset.eq B$, the *inclusion function* $i : A -> B$ is defined by
$
i(x) = x, forall x in A
$
Sometimes it is written $iota : A arrow.r.hook B$.
]
Why consider the inclusion function rather than simply the identity on $A$? Say
we have $iota : A -> B$ and $g : B -> C$. Then we can compose these $g compose
iota$ which is an inclusion function $iota' : A -> C$.
#definition[
Let $R$ be an equivalence relation on $A$. Recall $A\/R$ is the set of all
equivalence classes. The *canonical map* is
$
f : A -> A\/R, f(x) = overline(x), forall x in A
$
]
#example[
Consider the canonical map $f : ZZ - >ZZ_3 = {overline(0), overline(1),
overline(2)}$, $f(x) = overline(x)$. Then $f(2) = overline(2)$, $f(8) =
overline(2)$, and so on. So $f$ is not _one-to-one_.
]
== Logistics: exam 2
- One non-proof free response on set operations and families (2.2-2.3, $union$,
$sect$, etc)
- 4 proof based questions
- Set operations/families (2.2-2.3)
- Principle of mathematical induction, but no complete induction or WOP (2.4)
- Relations. $"Dom"(R)$, $"Rng"(R)$, etc. (3.1-3.2)
- Equivalence relations (3.3)
- T/F questions
- Extra credit question
= Solutions to selected exercises and problems
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,c,d 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$.
]