auto-update(nvim): 2025-01-18 01:37:05
This commit is contained in:
parent
bd81364613
commit
80f2ad51b6
3 changed files with 150 additions and 1 deletions
|
@ -465,7 +465,7 @@ $ exists x in U, P(x) $
|
|||
#exercise[
|
||||
Prove that between any two rational numbers $x$ and $y$ there is another
|
||||
rational number $z$.
|
||||
]
|
||||
]<rational-between>
|
||||
|
||||
== Solutions
|
||||
|
||||
|
@ -484,3 +484,78 @@ 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$.
|
||||
]
|
||||
|
|
37
documents/by-course/pstat-120a/hw1/main.typ
Normal file
37
documents/by-course/pstat-120a/hw1/main.typ
Normal file
|
@ -0,0 +1,37 @@
|
|||
#import "@youwen/zen:0.1.0": *
|
||||
#import "@preview/ctheorems:1.1.3": *
|
||||
|
||||
#show: zen.with(
|
||||
title: "Homework 1",
|
||||
author: "Youwen Wu",
|
||||
date: "Winter 2025",
|
||||
)
|
||||
|
||||
1. #[
|
||||
#set enum(numbering: "a)", spacing: 2em)
|
||||
|
||||
+ #[
|
||||
We know that $B$ and $B'$ are disjoint. That is, $B sect B' =
|
||||
emptyset$. Additionally,
|
||||
$
|
||||
E = (A sect B) subset B \
|
||||
F = (A sect B') subset B' \
|
||||
$
|
||||
Then we note
|
||||
$
|
||||
forall x in E, x in B, x in.not B' \
|
||||
forall y in F, y in B, y in.not B'
|
||||
$
|
||||
So clearly $E$ and $F$ have no common elements, and
|
||||
$
|
||||
E sect F = emptyset
|
||||
$
|
||||
]
|
||||
|
||||
+ #[
|
||||
$
|
||||
E union F &= (A sect B) union (A sect B') \
|
||||
&=
|
||||
$
|
||||
]
|
||||
]
|
37
documents/by-course/pstat-120a/hw1/package.nix
Normal file
37
documents/by-course/pstat-120a/hw1/package.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
pkgs,
|
||||
typstPackagesCache,
|
||||
typixLib,
|
||||
cleanTypstSource,
|
||||
flakeSelf,
|
||||
...
|
||||
}:
|
||||
let
|
||||
src = cleanTypstSource ./.;
|
||||
commonArgs = {
|
||||
typstSource = "main.typ";
|
||||
|
||||
fontPaths = [
|
||||
# Add paths to fonts here
|
||||
# "${pkgs.roboto}/share/fonts/truetype"
|
||||
];
|
||||
|
||||
virtualPaths = [
|
||||
# Add paths that must be locally accessible to typst here
|
||||
# {
|
||||
# dest = "icons";
|
||||
# src = "${inputs.font-awesome}/svgs/regular";
|
||||
# }
|
||||
];
|
||||
|
||||
XDG_CACHE_HOME = typstPackagesCache;
|
||||
SOURCE_DATE_EPOCH = builtins.toString flakeSelf.lastModified;
|
||||
};
|
||||
|
||||
in
|
||||
typixLib.buildTypstProject (
|
||||
commonArgs
|
||||
// {
|
||||
inherit src;
|
||||
}
|
||||
)
|
Loading…
Reference in a new issue