auto-update(nvim): 2025-01-22 03:26:59
This commit is contained in:
parent
7000b98f73
commit
f27dad47c8
4 changed files with 485 additions and 0 deletions
444
documents/by-course/math-8/pset-2/main.typ
Normal file
444
documents/by-course/math-8/pset-2/main.typ
Normal file
|
@ -0,0 +1,444 @@
|
||||||
|
#import "@youwen/zen:0.1.0": *
|
||||||
|
|
||||||
|
#show: zen.with(
|
||||||
|
title: "Homework 2",
|
||||||
|
author: "Youwen Wu",
|
||||||
|
)
|
||||||
|
|
||||||
|
#set heading(
|
||||||
|
numbering: (
|
||||||
|
num => {
|
||||||
|
return "1." + str(num)
|
||||||
|
}
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
#set par(first-line-indent: 0pt, spacing: 1em)
|
||||||
|
|
||||||
|
Problems:
|
||||||
|
|
||||||
|
1.3: \#1fgjkLmp, 2fgjkLmp, 6, 8, 9, 10, 13
|
||||||
|
|
||||||
|
1.4: \#5cdghi, 6bd, 7defghijk, 8, 9a (use any proof method, not necessarily proof by working backward), 11bcd
|
||||||
|
|
||||||
|
*1.3*
|
||||||
|
|
||||||
|
1f.
|
||||||
|
|
||||||
|
Let $H(p)$ be true if a person is honest and false otherwise.
|
||||||
|
|
||||||
|
$ ((forall x)H(x)) or ((forall x)(not H(x))) $
|
||||||
|
|
||||||
|
1g.
|
||||||
|
|
||||||
|
Again let $H(p)$ be true if a person is honest and false otherwise.
|
||||||
|
|
||||||
|
$ (exists x)(exists y)(H(x) and not H(y)) $
|
||||||
|
|
||||||
|
1j.
|
||||||
|
|
||||||
|
$ (forall x)(exists y)(x > y) $
|
||||||
|
|
||||||
|
1k.
|
||||||
|
|
||||||
|
$ (exists.not x)(forall y)(x > y) $
|
||||||
|
|
||||||
|
1L.
|
||||||
|
|
||||||
|
$ (x in ZZ)(y in ZZ)(y > x)(exists z in RR)(x < z < y) $
|
||||||
|
|
||||||
|
1m.
|
||||||
|
|
||||||
|
$ (exists x in ZZ^+)(exists.not y in ZZ^+)(y < x) $
|
||||||
|
|
||||||
|
1p.
|
||||||
|
|
||||||
|
$ (forall x)(x > 0)(exists y)(2^y = x) $
|
||||||
|
|
||||||
|
2f.
|
||||||
|
|
||||||
|
Let $H(p)$ be true if a person is honest and false otherwise.
|
||||||
|
|
||||||
|
$ (exists x)(exists y)(H(x) and not H(y)) $
|
||||||
|
|
||||||
|
In English: Some people are honest and some people are not honest.
|
||||||
|
|
||||||
|
2g.
|
||||||
|
|
||||||
|
Let $H(p)$ be true if a person is honest and false otherwise.
|
||||||
|
|
||||||
|
$ ((forall x)H(x)) or ((forall x)(not H(x))) $
|
||||||
|
|
||||||
|
In English: all people are honest or no one is honest.
|
||||||
|
|
||||||
|
2j.
|
||||||
|
|
||||||
|
|
||||||
|
$ (exists x)(forall y) not (x > y) $
|
||||||
|
|
||||||
|
2k.
|
||||||
|
|
||||||
|
$ (forall x)(exists y)(y > x) $
|
||||||
|
|
||||||
|
2L.
|
||||||
|
|
||||||
|
$ (exists x in ZZ)(exists y in ZZ)(forall z)((z > x) and (z > y)) $
|
||||||
|
|
||||||
|
2m.
|
||||||
|
|
||||||
|
$ (forall x in ZZ^+)(exists y in ZZ^+)(y < x) $
|
||||||
|
|
||||||
|
2p.
|
||||||
|
|
||||||
|
$ (exists x)(x > 0)(forall y) not (2^y = x) $
|
||||||
|
|
||||||
|
6a.
|
||||||
|
|
||||||
|
$T$, $U$, $V$.
|
||||||
|
|
||||||
|
6b.
|
||||||
|
|
||||||
|
$T$ only.
|
||||||
|
|
||||||
|
6c.
|
||||||
|
|
||||||
|
$T$, $U$, $V$.
|
||||||
|
|
||||||
|
6d.
|
||||||
|
|
||||||
|
$T$ only.
|
||||||
|
|
||||||
|
8a. False. Consider $x = -10$.
|
||||||
|
|
||||||
|
8b. True.
|
||||||
|
|
||||||
|
8c. True.
|
||||||
|
|
||||||
|
8d. True.
|
||||||
|
|
||||||
|
8e. False.
|
||||||
|
|
||||||
|
8f. True.
|
||||||
|
|
||||||
|
8g. True.
|
||||||
|
|
||||||
|
8h. True.
|
||||||
|
|
||||||
|
8i. True ($x=0)$.
|
||||||
|
|
||||||
|
8j. False.
|
||||||
|
|
||||||
|
8k. False.
|
||||||
|
|
||||||
|
8L. True.
|
||||||
|
|
||||||
|
9a. All natural numbers are at least one.
|
||||||
|
|
||||||
|
9b. There is exactly one and only one real number that is both greater than or
|
||||||
|
equal to 0 and less than or equal to 0.
|
||||||
|
|
||||||
|
9c. All natural numbers are prime, and if they are not two then they are odd.
|
||||||
|
|
||||||
|
9d. There is one and only one real number that is $e$ raised to the power of
|
||||||
|
one.
|
||||||
|
|
||||||
|
9e. There is no real number such that its square is negative.
|
||||||
|
|
||||||
|
9f. There is a unique real number that is the square root of 0.
|
||||||
|
|
||||||
|
9g. Any odd natural number is also odd when squared.
|
||||||
|
|
||||||
|
10a. True.
|
||||||
|
|
||||||
|
10b. False.
|
||||||
|
|
||||||
|
10c. False.
|
||||||
|
|
||||||
|
10d. False.
|
||||||
|
|
||||||
|
10e. True ($x=0$).
|
||||||
|
|
||||||
|
10f. False.
|
||||||
|
|
||||||
|
10g. True.
|
||||||
|
|
||||||
|
10h. False.
|
||||||
|
|
||||||
|
10i. False.
|
||||||
|
|
||||||
|
10j. True.
|
||||||
|
|
||||||
|
10k. False.
|
||||||
|
|
||||||
|
\13. (b), (c)
|
||||||
|
|
||||||
|
*1.4*
|
||||||
|
|
||||||
|
5c. If $x$ and $y$ are even, then $x y$ is divisible by 4.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
$
|
||||||
|
exists j,k in ZZ, x = 2j, y = 2k \
|
||||||
|
x y = 4 j k
|
||||||
|
$
|
||||||
|
|
||||||
|
Clearly $x y$ has $4$ in its factors and so $x y | 4$.
|
||||||
|
]
|
||||||
|
|
||||||
|
5d.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
$
|
||||||
|
exists j,k in ZZ, x = 2j, y = 2k \
|
||||||
|
3x - 5y = 6j - 10k = 2(3j - 5k) = 2n, n in ZZ
|
||||||
|
$
|
||||||
|
]
|
||||||
|
|
||||||
|
5e.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
$
|
||||||
|
exists j,k in ZZ, x = (2j + 1), y = (2k + 1) \
|
||||||
|
x + y = 2j + 1 + 2k + 1 = 2(j + k + 1) = 2n, n in ZZ
|
||||||
|
$
|
||||||
|
]
|
||||||
|
|
||||||
|
5f.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
$
|
||||||
|
exists j,k in ZZ, x = (2j + 1), y = (2k + 1) \
|
||||||
|
3x - 5y = 6j + 3 - 10k - 5 = 2(3j-5k-1) = 2n, n in ZZ
|
||||||
|
$
|
||||||
|
]
|
||||||
|
|
||||||
|
5g.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
$
|
||||||
|
exists j,k in ZZ, x = (2j + 1), y = (2k + 1) \
|
||||||
|
x y = (2j + 1)(2k + 1) &= 4 j k + 2j + 2k + 1 \
|
||||||
|
= 2(2 j k + j + k) + 1 &= 2n + 1, n in ZZ
|
||||||
|
$
|
||||||
|
]
|
||||||
|
|
||||||
|
5i.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
If one of $x$, $y$, and $z$ are odd, then let there be $i,j,k in ZZ$, such
|
||||||
|
that for the two even terms are represented as $2i$ and $2j$, and the single
|
||||||
|
odd term represented as $2k + 1$. Then clearly
|
||||||
|
$
|
||||||
|
x + y + z = 2i + 2j + 2k + 1 = 2(i + j + k) + 1 = 2n + 1, n in ZZ
|
||||||
|
$
|
||||||
|
]
|
||||||
|
|
||||||
|
6b.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
Start by rewriting
|
||||||
|
$
|
||||||
|
|b - a| = |-(a - b)|
|
||||||
|
$
|
||||||
|
|
||||||
|
But by the definition of the absolute value,
|
||||||
|
$ |-(a - b)| = |a-b| $
|
||||||
|
So indeed
|
||||||
|
$ |a - b| = |b - a| $
|
||||||
|
]
|
||||||
|
|
||||||
|
6d.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
In the case where $a$ and $b$ are positive or zero the two sides are equal.
|
||||||
|
$
|
||||||
|
|a + b| <= |a| + |b|
|
||||||
|
$
|
||||||
|
Otherwise, consider if $a$ is positive, $b$ is negative. We replace all
|
||||||
|
occurrences of $b$ with $-|b|$.
|
||||||
|
|
||||||
|
$
|
||||||
|
|a - |b|| <= |a| + |-|b|| \
|
||||||
|
|a - |b|| <= |a| + |b|
|
||||||
|
$
|
||||||
|
|
||||||
|
Clearly for any $b$ the left side is strictly lower than the right. Repeat
|
||||||
|
this exact for $a$ is negative.
|
||||||
|
]
|
||||||
|
|
||||||
|
7d.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
Consider two cases, $a$ is even and $a$ is odd. First assume $a$ is even:
|
||||||
|
$
|
||||||
|
exists k in ZZ, a = 2k \
|
||||||
|
2k(2k+1) = 4k^2 + 2k = 2(k^2 + 1) = 2n, n in ZZ
|
||||||
|
$
|
||||||
|
Then assume $a$ is odd:
|
||||||
|
$
|
||||||
|
exists k in ZZ, a = 2k + 1 \
|
||||||
|
2k(2k+1+1) = 4k^2 + 4k = 2(k^2 + 2) = 2n, n in ZZ
|
||||||
|
$
|
||||||
|
]
|
||||||
|
|
||||||
|
7e.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
If $1 | a$, then we can find some $k in ZZ$ such that $1k = a$. Such a $k$ is
|
||||||
|
$a$, because $1 dot a = a$. Therefore $1 | a$.
|
||||||
|
]
|
||||||
|
|
||||||
|
7f.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
If $a | a$, we can find some $k in ZZ$ such that $a k = a$. Such a $k$ is $1$,
|
||||||
|
because $a dot 1 = a$. Therefore $a | a$.
|
||||||
|
]
|
||||||
|
|
||||||
|
7g.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
If $a | b$, then there is a $k in ZZ$ such that $a k = b$. So $a = b/k$. If
|
||||||
|
$k = 1$, then $b/k = b$. Otherwise for $k > 0$ or $k < 0$ $b/k$ is less than
|
||||||
|
$b$. So $b/k = a <= b$.
|
||||||
|
]
|
||||||
|
|
||||||
|
7h.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
Since $a | b$, we know $exists k in ZZ, k a = b$. We also know
|
||||||
|
that
|
||||||
|
$ (exists j in ZZ) (j a = b c) => (a | b c) $
|
||||||
|
|
||||||
|
We can find $j$:
|
||||||
|
$
|
||||||
|
j a = b c \
|
||||||
|
j cancel(a) = k cancel(a) c \
|
||||||
|
j = k c
|
||||||
|
$
|
||||||
|
|
||||||
|
Therefore $a | b c$.
|
||||||
|
]
|
||||||
|
|
||||||
|
7i.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
Suppose that $a = b = 1$ was not the case. Then either $a$ or $b$ must be
|
||||||
|
greater than 1, or both $a$ and $b$ are greater than 1.
|
||||||
|
|
||||||
|
If $a > 1$ and $b = 1$, then $a b = a$. But is not 1, and $a b = 1$, so there
|
||||||
|
is a contradiction.
|
||||||
|
|
||||||
|
Repeat the same argument for $b >1$, $a = 1$.
|
||||||
|
|
||||||
|
In the case that both $a > 1$ and $b > 1$, $a b > 1$. Again, $a b = 1$ so
|
||||||
|
this cannot be true.
|
||||||
|
|
||||||
|
There are no cases where $a$ and $b$ can be anything other than 1,
|
||||||
|
so $a = b = 1$.
|
||||||
|
]
|
||||||
|
|
||||||
|
7j.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
If $a | b$ then $exists k in ZZ, k a = b$. If $b | a$ then $exists j in ZZ, j
|
||||||
|
b = a$.
|
||||||
|
|
||||||
|
$
|
||||||
|
k j cancel(b) = cancel(b) \
|
||||||
|
k j = 1
|
||||||
|
$
|
||||||
|
|
||||||
|
By the fact proven above in Problem 7i, this implies $k = j = 1$.
|
||||||
|
|
||||||
|
So $1 a = b => a = b$.
|
||||||
|
]
|
||||||
|
|
||||||
|
7k.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
$
|
||||||
|
a | b => exists k in ZZ, k a = b \
|
||||||
|
c | d => exists j in ZZ, j c = d \
|
||||||
|
$
|
||||||
|
|
||||||
|
Multiply the equations together:
|
||||||
|
|
||||||
|
$ k j a c = b d $
|
||||||
|
|
||||||
|
If $exists n in ZZ, n a c = b d$, then $a c | b d$. We see that $n = k j$.
|
||||||
|
Therefore $a c$ indeed divides $b d$.
|
||||||
|
]
|
||||||
|
|
||||||
|
8a.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
Consider the case where $n$ is even. Then $exists k in ZZ, n = 2k$.
|
||||||
|
|
||||||
|
$
|
||||||
|
n^2 + n + 3 &= (2k)^2 + 2k + 3 \
|
||||||
|
= 4k^2 + 2k + 3 &= 2(2k^2 + k + 1) + 1 = 2m + 1, m in ZZ
|
||||||
|
$
|
||||||
|
|
||||||
|
Consider the case where $n$ is odd. Then $exists k in ZZ, n = 2k + 1$.
|
||||||
|
|
||||||
|
$
|
||||||
|
n^2 + n + 3 &= (2k+1)^2 + 2k+1 + 3 \
|
||||||
|
= 4k^2 + 6k + 5 &= 2(2k^2 + 3k + 2) + 1 = 2m + 1, m in ZZ
|
||||||
|
$
|
||||||
|
|
||||||
|
So in both cases $n^2 + n + 3$ is odd.
|
||||||
|
]
|
||||||
|
|
||||||
|
8b.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
First we rewrite $n^2 + n + 3$.
|
||||||
|
|
||||||
|
$
|
||||||
|
n^2 + n + 3 = n(n + 1) + 3
|
||||||
|
$
|
||||||
|
|
||||||
|
By 7(d), we know that $n(n+1)$ is even $forall n$. Then by 5(h) we can take
|
||||||
|
$x := n(n+1)$ and $y := 3$. Since $x$ is even, $y$ is odd, $x + y$ is odd. So
|
||||||
|
$n^2 + n + 3$ is odd.
|
||||||
|
]
|
||||||
|
|
||||||
|
9a.
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
In the case of $x=0$ and $y=0$ we trivially have $0 >= 0$. Otherwise,
|
||||||
|
|
||||||
|
$
|
||||||
|
(x+y) / 2 &>= sqrt(x y) \
|
||||||
|
x+y &>= 2sqrt(x y) \
|
||||||
|
(x+y)^2 &>= 4x y \
|
||||||
|
x^2 + 2 x y + y^2 &>= 4 x y \
|
||||||
|
x^2 - 2 x y + y^2 &>= 0
|
||||||
|
$
|
||||||
|
|
||||||
|
THIS IS WRONG FIX IT!!!
|
||||||
|
|
||||||
|
You can think of $x^2 - 2 x y + y^2$ as quadratic with $y$ as a constant. For
|
||||||
|
all possible values of $y$ the equation is nonnegative (since the absolute
|
||||||
|
minimum occurs at the vertex). Therefore the inequality holds true.
|
||||||
|
]
|
||||||
|
|
||||||
|
11b.
|
||||||
|
|
||||||
|
Grade: C.
|
||||||
|
|
||||||
|
The assertions that $exists q, b = a q$ and $exists q, c = a q$ are essentially
|
||||||
|
correct but these $q$ are not the same. This can be corrected fairly
|
||||||
|
straightforwardly by replacing one of the $q$ with another variable serving the
|
||||||
|
same purpose, then proceeding.
|
||||||
|
|
||||||
|
11c.
|
||||||
|
|
||||||
|
Grade: A.
|
||||||
|
|
||||||
|
11d.
|
||||||
|
|
||||||
|
Grade: F.
|
||||||
|
|
||||||
|
This only shows $m "is odd" => m^2 "is odd"$, when the claim is the other way around. The converse is not automatically true.
|
37
documents/by-course/math-8/pset-2/package.nix
Normal file
37
documents/by-course/math-8/pset-2/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;
|
||||||
|
}
|
||||||
|
)
|
|
@ -771,3 +771,7 @@ us generalize to more than two colors.
|
||||||
|
|
||||||
Both approaches given the same answer.
|
Both approaches given the same answer.
|
||||||
]
|
]
|
||||||
|
|
||||||
|
= Discussion section #datetime(day: 22, month: 1, year: 2025).display()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue