diff --git a/documents/by-course/math-8/course-notes/main.typ b/documents/by-course/math-8/course-notes/main.typ index bdf19c2..0233bad 100644 --- a/documents/by-course/math-8/course-notes/main.typ +++ b/documents/by-course/math-8/course-notes/main.typ @@ -955,9 +955,10 @@ times B$, which has 6 elements. $A$ and $B$ admit $2^6 = 64$ distinct ] #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)}$. + A function $f : A -> B$ is called a *map/mapping*. $A$ is the *domain*, $B$ + is the *codomain*. + + If $B = A$, then we say $f$ is a function on $A$. ] More terminology. Let $f : A -> B$, $(a,b) in f$, $f(x) = y$. Then @@ -965,6 +966,8 @@ 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$ +- When $(x,y) in f$, we write $y = f(x)$. The *range* of $f$ $"Rng"(f) = {y in + B : (exists x in A)(f(x) = y)}$. #fact[ $f : A -> B = g : C -> D$ if and only if $f subset.eq g$ and $g subset.eq f$. @@ -1008,6 +1011,84 @@ iota$ which is an inclusion function $iota' : A -> C$. overline(2)$, and so on. So $f$ is not _one-to-one_. ] +Two functions $f$ and $g$ are equal if and only if +1. $"Dom"(f) = "Dom"(g)$ +2. $forall x in "Dom"(f)$, $f(x) = g(x)$ + +#proof[ + Suppose $x in "Dom"(f)$. Then $(x,y) in f$ for some $y$, and because $f = g$, we have $(x,y) in g$. Therefore $x in "Dom"(g)$. This shows $"Dom"(f) subset.eq "Dom"(g)$. Similarly, we show that $"Dom"(g) subset.eq "Dom"(f)$. Therefore $"Dom"(g) = "Dom"(f)$. + + Suppose that $x in "Dom"(f)$. Then for some $y$, we have $(x,y) in f$. Because $f = g$, $(x,y) in g$. Therefore $f(x) = y = g(x)$. +] + +#definition[ + A function $x$ with domain $NN$ is called an infinite sequence, or simply a + sequence. The image of $n$ is written $x_n$ and called the $n$th term of the + sequence. +] + += Modular arithmetic + +We discuss the arithmetic of congruence classes. + +For a fixed natural number $m$, we may define the relation of congruence modulo $m$ on $ZZ$ as +$ + a = b (mod m) "if" m | b - a +$ +#fact[ + The only possible remainders when an integer is divided by $m$ are + $0,1,2...,m-1$, so there are $m$ congruence classes $mod m$. We call $ZZ_m$ + the set of integers modulo $m$. +] + +For each natural number $m$, it is possible to do arithmetic with numbers in $ZZ_m$ using addition and multiplication that depends on the modulus $m$. + +#example[ + Think of 5 and 3 as the representatives of the equivalence classes $overline(5) + overline(3)$, then the sum of those classes is the class containing $5 + 3$. That is $overline(2)$ in $ZZ_6$. +] + +#definition[ + The sum of $overline(x)$ and $overline(y)$ in $ZZ_m$ is + $ + overline(x) + overline(y) = overline(x+y) + $ +] + +#definition[ + The product of $overline(x)$ and $overline(y)$ in $ZZ_m$ is + $ + overline(x) dot overline(y) = overline(x dot y) + $ +] + +#theorem[ + Let $m$ be a positive integer and $a$, $b$, $c$, and $d$ be integers. If $a = c ("mod" m)$ and $b = d ("mod" m)$, then $a + b = c + d ("mod" m)$. +] + +#theorem[ + Let $m$ be a positive integer and $a$, $b$, $c$, and $d$ be integers. If $a = c ("mod" m)$ and $b = d ("mod" m)$, then $a dot b = c dot d ("mod" m)$. +] + +#theorem[ + Let $m$ be a positive composite integer. Then there exist nonzero equivalence classes $overline(x)$ and $overline(y)$ in $ZZ_m$ such that $overline(x) overline(y) = 0$. +] + +#proof[ + $m$ is composite so $m = x y$ for integers $x$ and $y$, let $x$ and $y$ be positive, nonzero and less than $m$, then neither $overline(x)$ nor $overline(y)$ are zero but $x y = m$, so $x y = 0$. +] + +#theorem[ + Let $p$ be a prime. Whenever $overline(x) overline(y) = overline(0)$ in $ZZ_p$, then either $overline(x) = overline(0)$ or $overline(y) = overline(0)$. +] + +#proof[ + Let $overline(x)$ and $overline(y)$ be elements of $ZZ_p$, and suppose $overline(x) overline(y) = overline(0)$. Then $x y = 0 (mod p)$. Therefore $p | x y$. By Euclid's Lemma, either $p | x$ or $p | y$. Thus either $x = 0 (mod p)$ or $y = 0 (mod p)$. Therefore the theorem is true. +] + +#theorem[Cancellation law for $ZZ_p$][ + Let $p$ be prime. If $x y = x z$ in $ZZ_p$ and $x !=0$, then $y = z$. +] + == Logistics: exam 2 - One non-proof free response on set operations and families (2.2-2.3, $union$, @@ -1020,7 +1101,10 @@ iota$ which is an inclusion function $iota' : A -> C$. - T/F questions - Extra credit question + = Solutions to selected exercises and problems +in fact the real numbers are uncountable +[9:42 PM] Solutions to selected problems and exercises. diff --git a/documents/by-course/math-8/pset-7/main.typ b/documents/by-course/math-8/pset-7/main.typ new file mode 100644 index 0000000..8da5254 --- /dev/null +++ b/documents/by-course/math-8/pset-7/main.typ @@ -0,0 +1,273 @@ +#import "@youwen/zen:0.1.0": * +#import "@preview/mitex:0.2.5": * + +#show: zen.with( + title: "Homework 7", + author: "Youwen Wu", +) + +#set heading(numbering: none) +#show heading.where(level: 2): it => [#it.body.] +#show heading.where(level: 3): it => [#it.body.] + +#set par(first-line-indent: 0pt, spacing: 1em) + +Problems: + +3.2: \#9cd, 10ac, 16a + +3.4: \#1, 7ad, 11ac + +4.1: \#1cef, 2, 3b, 4d, 7, 9, 12b, 13, 16, 17ab, 18ab + +#outline() + += 3.2 + +== 9 + +=== c + +$ + overline(0) = {...,0,1,2,3...} = ZZ +$ + +=== d + +$ + &overline(0) = {...,-7,0,7,14,...} \ + &overline(1) = {...,-8,-1,1,8,15,...} \ + &overline(2) = {...,-9,-2,2,9,16,...} \ + &overline(3) = {...,-10,-3,3,10,17,...} \ + &overline(4) = {...,-11,-4,4,11,18,...} \ + &overline(5) = {...,-12,-5,5,12,19,...} \ + &overline(6) = {...,-13,-6,6,13,20,...} \ +$ + +== 10 + +=== a + +5 and -5. + +=== c + +14 and -10 + +== 16 + +=== a + +$ 6 equiv 1 space (mod 5)$, but $6 equiv 6 space (mod 10)$. + += 3.4 + +== 1 + +=== a + +$6 + 6 equiv 5$ + +=== b + +$5 dot 4 equiv 6$ + +=== c + +$3 dot 3 + 5 dot 2 equiv 5$ + +=== d + +$2 dot 4 + 3 dot 5 equiv 2$ + +=== e + +$5 dot 1 + 3 dot 2 equiv 4$ + +=== f + +$0 dot 3 + 2 dot 4 equiv 1$ + +== 7 + +=== a + +$(238 + 496 - 44) mod 9 = 6$ + +=== d + +$317 dot 403 mod 9 = 5$ + +== 11 + +=== a + +No + +=== c + +Yes + += 4.1 + +== 1 + +=== c + +It is a function. Domain: ${1,2}$, codomain: ${1,2}$. + +=== e + +No. + +=== f + +No. + +== 2 + +It fails the "vertical line test" when graphed. + +Consider the input 1 so $f(1) = plus.minus sqrt(1)$. Then $f(1) = 1$ and $f(1) = -1$, so it relates 1 to multiple distinct values. Therefore it is not a function. + +== 3 + +=== b + +- Domain: $RR$ +- Range: $y >= 5$, $y in RR$ +- Another codomain: $RR^+$ (positive real numbers) + +== 4 + +=== d + +Domain: ${-2}$ + +== 7 + +#proof[ + Now we show the converse. Suppose the conditions hold, that is, + 1. $"Dom"(f) = "Dom"(g)$ + 2. $forall x in "Dom"(f)$, $f(x) = g(x)$ + + For any $(x,y) in f$, $y = f(x)$. Then by (1) $x$ is in the domain of $g$. + By (2), $g(x) = f(x) = y$, so $(x,y) in g$. So $f subset.eq g$. Repeat an + identical reasoning showing $g subset.eq f$. Therefore $f = g$. +] + +== 9 + +=== a + +$chi_A (1) = 1$ + +=== b + +$chi_A (3) = 0$ + +=== c + +$chi_A (pi) = 0$ + +=== d + +$chi_A (2) - chi_A (0.2) = 1$ + +== 12 + +=== b + +- 1st term: 0 +- 5th term: 4 +- 10th term: 11 + +== 13 + +=== a + +$f(3) = 3$ + +=== b + +0 + +=== c + +3 + +=== d + +${x : x - 1 | 6 = 0}$ + +== 16 + +=== a + +$"Rng"(pi_1) = {a in A : exists b in B "such that" (a,b) in S}$ + +=== b + + +$"Rng"(pi_1) = {b in B : exists a in A "such that" (a,b) in S}$ + +== 17 + +=== a + +There are $n^m$ functions. + +=== b + + +There are $m n$ functions. + +== 18 + +=== a + +#mitext(` +Let $f: A \to B$ be a function and define the relation $T$ on $A$ by +\[ +x \,T\, y \quad \Longleftrightarrow \quad f(x) = f(y). +\] +We must show that $T$ is reflexive, symmetric, and transitive. + +For any $x \in A$, we have $f(x) = f(x)$. Hence, +\[ +x \,T\, x, +\] +so $T$ is reflexive. + +Suppose $x \,T\, y$. By definition, this means $f(x) = f(y)$. Since equality in $B$ is symmetric, we also have $f(y) = f(x)$. Therefore, +\[ +y \,T\, x, +\] +so $T$ is symmetric. + +Suppose $x \,T\, y$ and $y \,T\, z$. Then $f(x) = f(y)$ and $f(y) = f(z)$. By transitivity of equality in $B$, $f(x) = f(z)$. Hence, +\[ +x \,T\, z, +\] +so $T$ is transitive. + +Since $T$ is reflexive, symmetric, and transitive, it is an equivalence relation on $A$. +`) + +=== b + +#mitext(` +We want to describe the equivalence classes of $0$, $2$, and $4$ under the relation $x \,T\, y$ if and only if $x^2 = y^2$. + +\[ +[0] = \{y \in \mathbb{R}: y^2 = 0^2\} = \{0\}. +\] + +\[ +[2] = \{y \in \mathbb{R}: y^2 = 2^2\} = \{2, -2\}. +\] + +\[ +[4] = \{y \in \mathbb{R}: y^2 = 4^2\} = \{4, -4\}. +\] +`) diff --git a/documents/by-course/math-8/pset-7/package.nix b/documents/by-course/math-8/pset-7/package.nix new file mode 100644 index 0000000..7879e7e --- /dev/null +++ b/documents/by-course/math-8/pset-7/package.nix @@ -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; + } +)