From 51342007222ccf90f7bccc20feca6d0fa7590729 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Fri, 21 Feb 2025 02:25:44 -0800 Subject: [PATCH] auto-update(nvim): 2025-02-21 02:25:44 --- .../by-course/math-8/course-notes/main.typ | 9 +- documents/by-course/math-8/pset-5/main.typ | 838 ++++++++---------- documents/flake.lock | 38 +- 3 files changed, 404 insertions(+), 481 deletions(-) diff --git a/documents/by-course/math-8/course-notes/main.typ b/documents/by-course/math-8/course-notes/main.typ index 3767471..7c65073 100644 --- a/documents/by-course/math-8/course-notes/main.typ +++ b/documents/by-course/math-8/course-notes/main.typ @@ -127,9 +127,9 @@ middle_, these comprise the axioms of a system of propositional logic. + $or$ connects the smallest propositions surrounding it. ] -= Notes on Logic and Proofs, 1.2 += Lecture #datetime(day: 8, month: 1, year: 2025).display() -_Prototypical example for this section:_ If $sin pi = 1$, then $6$ is prime. +== More propositional forms #definition[ For a *antedecent* $P$ and *consequent* $Q$, the *conditional sentence* $P => @@ -143,9 +143,6 @@ Q$ is the proposition "If $P$, then $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* @@ -996,7 +993,7 @@ 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 + equivalence classes under $R$. The *canonical map* is $ f : A -> A\/R, f(x) = overline(x), forall x in A diff --git a/documents/by-course/math-8/pset-5/main.typ b/documents/by-course/math-8/pset-5/main.typ index 318844b..03749d4 100644 --- a/documents/by-course/math-8/pset-5/main.typ +++ b/documents/by-course/math-8/pset-5/main.typ @@ -10,7 +10,7 @@ #show heading.where(level: 2): it => [#it.body.] #show heading.where(level: 3): it => [#it.body.] -#set par(first-line-indent: 0pt, spacing: 1em) +#set par(spacing: 1em) Problems: @@ -19,8 +19,6 @@ Problems: 2.5: \#1abc, 3, 10 -#outline() - = 2.4 == 4 @@ -228,43 +226,69 @@ If a set $A$ has $n$ elements, then $cal(P) (A)$ has $2^n$ elements. Ok now let's do it the annoying way. - #mitext(` -Base Case ($n=0$). \\ -If $A$ has $0$ elements, then $A = \varnothing$. Its power set is -\[ -\mathcal{P}(A) = \{\varnothing\}, -\] -which has exactly one element. Hence -\[ -|\mathcal{P}(A)| = 1 = 2^0. -\] -So the statement holds for $n=0$. + Consider the set with $0$ elements, $X = {}$. Then $cal(P)(X) = {emptyset}$ + so indeed it has cardinality $2^0 = 1$. Otherwise suppose that any set $X$ + with $n$ elements indeed has $|cal(P)(X)| = 2^n$. -Now proceed by induction. Assume the statement is true for some integer $k \ge -0$. That is, suppose that for any set $A$ with $k$ elements, we have -\[ -|\mathcal{P}(A)| = 2^k. -\] + Then, consider a set $Y$ of $n+1$ elements. For each subset of $cal(P)(Y)$, + we choose an arbitrary element $k in Y$, and define $Z := Y backslash {k}$. + Note that $Z$ has $n$ elements so our inductive hypothesis says it has $2^n$ + elements. We seek to show that this implies $cal(P)(Y)$ has $2^(n+1)$ + elements. -Let $B$ be a set with $k+1$ elements. Choose one element $x \in B$, and let $A = B \setminus \{x\}$. Then $A$ has $k$ elements. By the inductive hypothesis, -\[ -|\mathcal{P}(A)| = 2^k. -\] -Now observe that any subset of $B$ is either: -\begin{itemize} -\item A subset of $A$ (does not contain $x$), or -\item Of the form $S \cup \{x\}$ where $S \subseteq A$ (does contain $x$). -\end{itemize} -Thus every subset of $A$ gives rise to exactly one subset of $B$ that excludes $x$, and exactly one subset of $B$ that includes $x$. Therefore, -\[ -|\mathcal{P}(B)| = |\mathcal{P}(A)| + |\mathcal{P}(A)| -= 2^k + 2^k -= 2 \cdot 2^k -= 2^{k+1}. -\] + Every subset of $Y$ in $cal(P)(Y)$ satisfies the following: either the subset + does not contain $k$ and so it's also a subset of $Z$, or its only difference + from a subset of $Z$ is the addition of $k$. -Since $B$ was any set with $k+1$ elements, the statement holds for $k+1$. By the principle of mathematical induction, the proof is complete. -`) + Therefore, for each subset of $Z$, we can introduce $k$, and it's still a + subset of $Y$, and in fact completes $cal(P)(Y)$ from $cal(P)(Z)$, due to our + previous assertion. So for each element in $cal(P)(Z)$, there is one + additional element in $cal(P)(Y)$. In other words, + $ + |cal(P)(Z)| dot 2 = |cal(P)(Y)| + $ + Recall our inductive hypothesis states $|cal(P)(Z)| = 2^n$ because $Z$ has + $n$ elements, so $|cal(P)(X)| = 2 dot |cal(P)(Z)| = 2^(n+1)$, completing our + induction. Therefore for any arbitrary set $X$ with $n$ elements, its power + set $cal(P)(X)$ has $2^n$ elements. + + // #mitext(` + // Base Case ($n=0$). \\ + // If $A$ has $0$ elements, then $A = \varnothing$. Its power set is + // \[ + // \mathcal{P}(A) = \{\varnothing\}, + // \] + // which has exactly one element. Hence + // \[ + // |\mathcal{P}(A)| = 1 = 2^0. + // \] + // So the statement holds for $n=0$. + // + // Now proceed by induction. Assume the statement is true for some integer $k \ge + // 0$. That is, suppose that for any set $A$ with $k$ elements, we have + // \[ + // |\mathcal{P}(A)| = 2^k. + // \] + // + // Let $B$ be a set with $k+1$ elements. Choose one element $x \in B$, and let $A = B \setminus \{x\}$. Then $A$ has $k$ elements. By the inductive hypothesis, + // \[ + // |\mathcal{P}(A)| = 2^k. + // \] + // Now observe that any subset of $B$ is either: + // \begin{itemize} + // \item A subset of $A$ (does not contain $x$), or + // \item Of the form $S \cup \{x\}$ where $S \subseteq A$ (does contain $x$). + // \end{itemize} + // Thus every subset of $A$ gives rise to exactly one subset of $B$ that excludes $x$, and exactly one subset of $B$ that includes $x$. Therefore, + // \[ + // |\mathcal{P}(B)| = |\mathcal{P}(A)| + |\mathcal{P}(A)| + // = 2^k + 2^k + // = 2 \cdot 2^k + // = 2^{k+1}. + // \] + // + // Since $B$ was any set with $k+1$ elements, the statement holds for $k+1$. By the principle of mathematical induction, the proof is complete. + // `) ] @@ -272,224 +296,261 @@ Since $B$ was any set with $k+1$ elements, the statement holds for $k+1$. By the === c -#mitext(` -Let \( n = 5 \). Then: -\[ -(5+1)! = 6! = 720 \quad\text{and}\quad 2^{5+3} = 2^8 = 256. -\] -Since \( 720 > 256 \), the inequality holds for \( n = 5 \). +$(n+1)! > 2^(n+3)$ for all $n >= 5$. -Assume that for some natural number \( n \ge 5 \) the inequality holds for all integers \( m \) with \( 5 \le m \le n \). In particular, assume -\[ -(n+1)! > 2^{n+3}. -\] -We must show that -\[ -(n+2)! > 2^{(n+1)+3} = 2^{n+4}. -\] +Consider $n = 5$. Then $6! > 2^(8)$. Now proceed by induction. Suppose that +$(n+1)! > 2^(n + 3)$. -Starting with the left-hand side, we have: -\[ -(n+2)! = (n+2)(n+1)!. -\] -Using the inductive hypothesis, -\[ -(n+2)! > (n+2) \cdot 2^{n+3}. -\] -Since \( n \ge 5 \), it follows that \( n+2 \ge 7 \). Therefore, -\[ -(n+2) \cdot 2^{n+3} \ge 7 \cdot 2^{n+3}. -\] -But clearly, -\[ -7 \cdot 2^{n+3} > 2 \cdot 2^{n+3} = 2^{n+4}. -\] -Thus, -\[ -(n+2)! > 2^{n+4}, -\] -which completes the inductive step. +Then $(n + 1 + 1)! > 2^(n+3 + 1)$ so $(n + 2)(n+1)! > 2 dot 2^(n + 3)$. We note +that $n+2$ is always at least $2$, so this is true by our inductive hypothesis. -By the generalized principle of mathematical induction, the inequality -\[ -(n+1)! > 2^{n+3} -\] -holds for all natural numbers \( n \ge 5 \). +If we consider $n = 1$, then $2! < 2^(4)$ so the PMI does not hold for all $NN$. -The inequality is stated to hold for all \( n \ge 5 \). However, for \( n < 5 \) the inequality fails. For instance, when \( n = 4 \): -\[ -(4+1)! = 5! = 120 \quad\text{and}\quad 2^{4+3} = 2^7 = 128. -\] -Since \( 120 \) is not greater than \( 128 \), the inequality is false for \( n = 4 \). -`) +// #mitext(` +// Let \( n = 5 \). Then: +// \[ +// (5+1)! = 6! = 720 \quad\text{and}\quad 2^{5+3} = 2^8 = 256. +// \] +// Since \( 720 > 256 \), the inequality holds for \( n = 5 \). +// +// Assume that for some natural number \( n \ge 5 \) the inequality holds for all integers \( m \) with \( 5 \le m \le n \). In particular, assume +// \[ +// (n+1)! > 2^{n+3}. +// \] +// We must show that +// \[ +// (n+2)! > 2^{(n+1)+3} = 2^{n+4}. +// \] +// +// Starting with the left-hand side, we have: +// \[ +// (n+2)! = (n+2)(n+1)!. +// \] +// Using the inductive hypothesis, +// \[ +// (n+2)! > (n+2) \cdot 2^{n+3}. +// \] +// Since \( n \ge 5 \), it follows that \( n+2 \ge 7 \). Therefore, +// \[ +// (n+2) \cdot 2^{n+3} \ge 7 \cdot 2^{n+3}. +// \] +// But clearly, +// \[ +// 7 \cdot 2^{n+3} > 2 \cdot 2^{n+3} = 2^{n+4}. +// \] +// Thus, +// \[ +// (n+2)! > 2^{n+4}, +// \] +// which completes the inductive step. +// +// By the generalized principle of mathematical induction, the inequality +// \[ +// (n+1)! > 2^{n+3} +// \] +// holds for all natural numbers \( n \ge 5 \). +// +// The inequality is stated to hold for all \( n \ge 5 \). However, for \( n < 5 \) the inequality fails. For instance, when \( n = 4 \): +// \[ +// (4+1)! = 5! = 120 \quad\text{and}\quad 2^{4+3} = 2^7 = 128. +// \] +// Since \( 120 \) is not greater than \( 128 \), the inequality is false for \( n = 4 \). +// `) === e -#mitext(` -Let \( n = 4 \). Then: -\[ -4! = 24 \quad\text{and}\quad 3 \times 4 = 12. -\] -Since \( 24 > 12 \), the inequality holds for \( n = 4 \). +$(n! > 3n)$ for all $n >= 4$. -Assume that for some natural number \( n \ge 4 \) the inequality holds for all integers \( m \) with \( 4 \le m \le n \). In particular, assume that -\[ -n! > 3n. -\] -We must show that -\[ -(n+1)! > 3(n+1). -\] +Consider $n = 4$. Then $4! > 3(4)$. Suppose $(n! > 3n)$. Then +$ + (n+1)! > 3(n+1) \ + (n+1)n! > 3n + 3 +$ +Assume $n >= 4$. Then the above statement holds true for any $n$. So we +conclude the statement is always true for $n >= 4$. -Starting with the left-hand side: -\[ -(n+1)! = (n+1) \cdot n!. -\] -By the inductive hypothesis, we have: -\[ -(n+1)! > (n+1) \cdot 3n. -\] -Since \( n \ge 4 \) (so \( n \ge 2 \)), it follows that: -\[ -(n+1) \cdot 3n \ge 3(n+1). -\] -To see this, note that for \( n \ge 2 \) we have: -\[ -3n(n+1) = 3(n+1)n > 3(n+1), -\] -because \( n > 1 \). Therefore, -\[ -(n+1)! > 3(n+1), -\] -which completes the inductive step. - -By the generalized principle of mathematical induction, the inequality -\[ -n! > 3n -\] -holds for all natural numbers \( n \ge 4 \). - -The claim is that \( n! > 3n \) for all \( n \ge 4 \). However, for some smaller natural numbers the inequality is false. For instance, when \( n = 3 \): -\[ -3! = 6 \quad\text{and}\quad 3 \times 3 = 9. -\] -`) +// #mitext(` +// Let \( n = 4 \). Then: +// \[ +// 4! = 24 \quad\text{and}\quad 3 \times 4 = 12. +// \] +// Since \( 24 > 12 \), the inequality holds for \( n = 4 \). +// +// Assume that for some natural number \( n \ge 4 \) the inequality holds for all integers \( m \) with \( 4 \le m \le n \). In particular, assume that +// \[ +// n! > 3n. +// \] +// We must show that +// \[ +// (n+1)! > 3(n+1). +// \] +// +// Starting with the left-hand side: +// \[ +// (n+1)! = (n+1) \cdot n!. +// \] +// By the inductive hypothesis, we have: +// \[ +// (n+1)! > (n+1) \cdot 3n. +// \] +// Since \( n \ge 4 \) (so \( n \ge 2 \)), it follows that: +// \[ +// (n+1) \cdot 3n \ge 3(n+1). +// \] +// To see this, note that for \( n \ge 2 \) we have: +// \[ +// 3n(n+1) = 3(n+1)n > 3(n+1), +// \] +// because \( n > 1 \). Therefore, +// \[ +// (n+1)! > 3(n+1), +// \] +// which completes the inductive step. +// +// By the generalized principle of mathematical induction, the inequality +// \[ +// n! > 3n +// \] +// holds for all natural numbers \( n \ge 4 \). +// +// The claim is that \( n! > 3n \) for all \( n \ge 4 \). However, for some smaller natural numbers the inequality is false. For instance, when \( n = 3 \): +// \[ +// 3! = 6 \quad\text{and}\quad 3 \times 3 = 9. +// \] +// `) == 7 === a -#mitext(` -Let \(\{A_i : i \in \mathbb{N}\}\) be an indexed family of sets. Then for every natural number \( n\ge1 \), -\[ -\left(\bigcup_{i=1}^{n} A_i\right)^c = \bigcap_{i=1}^{n} A_i^c -\] -and -\[ -\left(\bigcap_{i=1}^{n} A_i\right)^c = \bigcup_{i=1}^{n} A_i^c. -\] +$ + (sect.big^n_(i=1) A_i)^c = union.big^n_(i=1) A_i^c +$ -For \( n=1 \), we have -\[ -\left(\bigcup_{i=1}^{1} A_i\right)^c = A_1^c \quad \text{and} \quad \bigcap_{i=1}^{1} A_i^c = A_1^c. -\] -Thus, the identity holds for \( n=1 \). +First consider $sect.big^n_(i=1) A_i$. Let $X := sect.big^n_(i=1) A_i$. +Then $x in X$ if and only if $x in A_i$ for every $A_i$. -Assume that for some \( n \ge 1 \) the statement holds; that is, assume -\[ -\left(\bigcup_{i=1}^{n} A_i\right)^c = \bigcap_{i=1}^{n} A_i^c. -\] -We need to show that -\[ -\left(\bigcup_{i=1}^{n+1} A_i\right)^c = \bigcap_{i=1}^{n+1} A_i^c. -\] +Now consider $Y := (sect.big^n_(i=1) A_i)^c$. Then $y in Y$ if and only if $y +in.not X$, that is, if and only there exists some $A_i$ such that $y in.not +A_i$. Now let $Z := union.big^n_(i=1) A_i^c$. Every element $z in Z$ is in some +$A^c _i$, that is, $z in Z$ if and only if there exists some $A_i$ such that $z +in.not A_i$. Now note this is actually precisely the definition of $Y$. Hence +$Z = Y$. -Notice that -\[ -\bigcup_{i=1}^{n+1} A_i = \left(\bigcup_{i=1}^{n} A_i\right) \cup A_{n+1}. -\] -Taking the complement of both sides, and using De Morgan's Law for two sets, we obtain: -\[ -\left(\bigcup_{i=1}^{n+1} A_i\right)^c = \left(\left(\bigcup_{i=1}^{n} A_i\right) \cup A_{n+1}\right)^c = \left(\bigcup_{i=1}^{n} A_i\right)^c \cap A_{n+1}^c. -\] -By the induction hypothesis, -\[ -\left(\bigcup_{i=1}^{n} A_i\right)^c = \bigcap_{i=1}^{n} A_i^c. -\] -Thus, we have: -\[ -\left(\bigcup_{i=1}^{n+1} A_i\right)^c = \left(\bigcap_{i=1}^{n} A_i^c\right) \cap A_{n+1}^c = \bigcap_{i=1}^{n+1} A_i^c. -\] - -This completes the inductive step. - -By the PMI, we conclude that for every natural number \( n\ge1 \), -\[ -\left(\bigcup_{i=1}^{n} A_i\right)^c = \bigcap_{i=1}^{n} A_i^c. -\] - -Thus, De Morgan's Laws hold for any indexed family \(\{A_i : i \in \mathbb{N}\}\). -`) +// #mitext(` +// Let \(\{A_i : i \in \mathbb{N}\}\) be an indexed family of sets. Then for every natural number \( n\ge1 \), +// \[ +// \left(\bigcup_{i=1}^{n} A_i\right)^c = \bigcap_{i=1}^{n} A_i^c +// \] +// and +// \[ +// \left(\bigcap_{i=1}^{n} A_i\right)^c = \bigcup_{i=1}^{n} A_i^c. +// \] +// +// For \( n=1 \), we have +// \[ +// \left(\bigcup_{i=1}^{1} A_i\right)^c = A_1^c \quad \text{and} \quad \bigcap_{i=1}^{1} A_i^c = A_1^c. +// \] +// Thus, the identity holds for \( n=1 \). +// +// Assume that for some \( n \ge 1 \) the statement holds; that is, assume +// \[ +// \left(\bigcup_{i=1}^{n} A_i\right)^c = \bigcap_{i=1}^{n} A_i^c. +// \] +// We need to show that +// \[ +// \left(\bigcup_{i=1}^{n+1} A_i\right)^c = \bigcap_{i=1}^{n+1} A_i^c. +// \] +// +// Notice that +// \[ +// \bigcup_{i=1}^{n+1} A_i = \left(\bigcup_{i=1}^{n} A_i\right) \cup A_{n+1}. +// \] +// Taking the complement of both sides, and using De Morgan's Law for two sets, we obtain: +// \[ +// \left(\bigcup_{i=1}^{n+1} A_i\right)^c = \left(\left(\bigcup_{i=1}^{n} A_i\right) \cup A_{n+1}\right)^c = \left(\bigcup_{i=1}^{n} A_i\right)^c \cap A_{n+1}^c. +// \] +// By the induction hypothesis, +// \[ +// \left(\bigcup_{i=1}^{n} A_i\right)^c = \bigcap_{i=1}^{n} A_i^c. +// \] +// Thus, we have: +// \[ +// \left(\bigcup_{i=1}^{n+1} A_i\right)^c = \left(\bigcap_{i=1}^{n} A_i^c\right) \cap A_{n+1}^c = \bigcap_{i=1}^{n+1} A_i^c. +// \] +// +// This completes the inductive step. +// +// By the PMI, we conclude that for every natural number \( n\ge1 \), +// \[ +// \left(\bigcup_{i=1}^{n} A_i\right)^c = \bigcap_{i=1}^{n} A_i^c. +// \] +// +// Thus, De Morgan's Laws hold for any indexed family \(\{A_i : i \in \mathbb{N}\}\). +// `) == 9 -#mitext(` -Given \(n\) points \(P_1, P_2, \dots, P_n\) in a plane with no three collinear, the number of line segments joining every pair of points is -\[ -\frac{n^2 - n}{2}. -\] +Suppose there was one point. Then there would be $(1^2 - 1)/2 = 0$ line +segments which is correct. Now we proceed by induction. Suppose that for +$n$ points, the number of line segments joining all pairs of points are $(n^2 - +n)/2$. Now introduce an additional point such that there are $n+1$ points. For +each of the previous $n$ points, we draw a line connecting it to the newly +added point. So we introduce $n$ additional lines. Therefore we have +$ + (n^2 - n) / 2 + n +$ +lines, which we can rewrite +$ + (n^2 + n) / 2 = ((n+1)^2 - (n+1)) / 2 +$ +So we conclude that our hypothesis holds for $n+1$ points and therefore holds +for all $n in NN$ points. -For \(n=2\), there is exactly 1 line segment joining the two points. The formula gives -\[ -\frac{2^2 - 2}{2} = \frac{4-2}{2} = 1. -\] -So the statement holds for \(n=2\). - -Assume that for some \(n \ge 2\), the number of line segments joining \(n\) points is -\[ -\frac{n^2 - n}{2}. -\] -Now consider \(n+1\) points. When we add a new point \(P_{n+1}\), this new point can be connected to each of the \(n\) existing points, thereby adding \(n\) new segments. Hence, the total number of segments becomes -\[ -\frac{n^2 - n}{2} + n. -\] -Simplify the expression: -\[ -\frac{n^2 - n}{2} + n = \frac{n^2 - n + 2n}{2} = \frac{n^2 + n}{2} = \frac{n(n+1)}{2}. -\] -Therefore, by the PMI, the number of line segments joining all pairs of \(n\) points is -\[ -\frac{n^2 - n}{2} -\] -for all \(n \ge 2\). -`) +// #mitext(` +// Given \(n\) points \(P_1, P_2, \dots, P_n\) in a plane with no three collinear, the number of line segments joining every pair of points is +// \[ +// \frac{n^2 - n}{2}. +// \] +// +// For \(n=2\), there is exactly 1 line segment joining the two points. The formula gives +// \[ +// \frac{2^2 - 2}{2} = \frac{4-2}{2} = 1. +// \] +// So the statement holds for \(n=2\). +// +// Assume that for some \(n \ge 2\), the number of line segments joining \(n\) points is +// \[ +// \frac{n^2 - n}{2}. +// \] +// Now consider \(n+1\) points. When we add a new point \(P_{n+1}\), this new point can be connected to each of the \(n\) existing points, thereby adding \(n\) new segments. Hence, the total number of segments becomes +// \[ +// \frac{n^2 - n}{2} + n. +// \] +// Simplify the expression: +// \[ +// \frac{n^2 - n}{2} + n = \frac{n^2 - n + 2n}{2} = \frac{n^2 + n}{2} = \frac{n(n+1)}{2}. +// \] +// Therefore, by the PMI, the number of line segments joining all pairs of \(n\) points is +// \[ +// \frac{n^2 - n}{2} +// \] +// for all \(n \ge 2\). +// `) == 10 -#mitext(` -The Tower of Hanoi problem with \( n \) disks can be solved in exactly \( 2^n - 1 \) moves. - -For \( n = 1 \): -There is only one disk, and it can be moved directly from the source peg to the destination peg in one move. -Since \( 2^1 - 1 = 1 \), the statement holds for \( n = 1 \). - -Assume that for some \( k \ge 1 \) the Tower of Hanoi with \( k \) disks can be solved in \( 2^k - 1 \) moves (this is the inductive hypothesis). We now show that a Tower of Hanoi with \( k+1 \) disks can be solved in \( 2^{k+1} - 1 \) moves. - -1. Move the top \( k \) disks from the source peg to the auxiliary peg. - By the inductive hypothesis, this takes \( 2^k - 1 \) moves. -2. Move the largest disk (the \((k+1)^\text{th}\) disk) from the source peg to the destination peg. - This requires 1 move. -3. Move the \( k \) disks from the auxiliary peg to the destination peg. - Again by the inductive hypothesis, this requires \( 2^k - 1 \) moves. - -\[ -\text{Total Moves} = (2^k - 1) + 1 + (2^k - 1) = 2 \cdot 2^k - 1 = 2^{k+1} - 1. -\] - -This completes the inductive step. - -By the PMI, the Tower of Hanoi with \( n \) disks can be solved in \( 2^n - 1 \) moves. -`) +First, note that with 1 disk, it takes $2^1 - 1 = 1$ moves to solve the puzzle. +Now suppose that for $n$ disks, it takes $2^n - 1$ moves to solve. We proceed +by induction on $n+1$ disks. First, ignore the disk at the very bottom of the +stack, such that our situation is equivalent to when there are $n$ disks +(because any disk can be stacked on top of the largest disk, our set of +possible moves is unchanged from $n$ disks). Then we can move each of these +disks to another peg in $2^n - 1$ moves. Now move the largest disk, which now +no more disks above it, to the other free peg. Now we again can ignore the +largest disk and move our $n$ disks on top of the largest disk in $2^n - 1$ +moves. So it took us a total of $2 dot (2^n - 1) + 1$ moves to move the entire +stack to another peg, or $2^(n+1) - 1$ moves. == 12 @@ -522,48 +583,20 @@ is no reason why this should hold true for all $NN$. === a -#mitext(` -Every natural number \( n \ge 11 \) can be written in the form -\[ -n = 2s + 5t, -\] -for some nonnegative integers \( s \) and \( t \). +Every natural number greater than or equal to 11 can be written in the form $2s ++ 5t$ for some naturals $s$ and $t$. -We verify the statement for the initial numbers: -- \( n = 11 \): \( 11 = 2\cdot 3 + 5\cdot 1 \) -- \( n = 12 \): \( 12 = 2\cdot 1 + 5\cdot 2 \) -- \( n = 13 \): \( 13 = 2\cdot 4 + 5\cdot 1 \) -- \( n = 14 \): \( 14 = 2\cdot 2 + 5\cdot 2 \) -- \( n = 15 \): \( 15 = 2\cdot 5 + 5\cdot 1 \) +First, we see that $11 = 2(3) + 5(1)$, $12 = 2(2) + 5(2)$, $13 = 2(4) + 5(1)$, +$14 = 2(2) + 5(2)$. Now suppose that we can write all naturals up to $11 <= k +<= n$ as $2s + 5t$ for naturals $s,t$. Note that we have shown naturals from 11 +to 15 can be written in the $2s + 5t$ form. Then we note $n >= 15$ iff. $n - 4 >= 11$, +and $n - 4$ is covered +by our inductive hypothesis, so we can write +$ + n + 1 = (n - 4) + 4 + 1 = 2s + 5t + 5 = 2s + 5(t + 1) +$ +So indeed $n+1$ can be written as $2s + 5t$ for some naturals $s, t$. -Thus, the claim holds for all \( 11 \le n \le 15 \). - -Assume as the induction hypothesis that for every integer \( m \) with \( 11 \le m < n \) (where \( n \ge 16 \)) there exist nonnegative integers \( s \) and \( t \) such that -\[ -m = 2s + 5t. -\] - -Since \( n \ge 16 \), notice that: -\[ -n - 2 \ge 14. -\] -Because \( n-2 \) is at least 11 (indeed, \( n-2 \ge 14 \)), the induction hypothesis applies. Therefore, there exist nonnegative integers \( s \) and \( t \) such that: -\[ -n - 2 = 2s + 5t. -\] - -Then, -\[ -n = (n - 2) + 2 = 2s + 5t + 2 = 2(s + 1) + 5t. -\] -If we set \( s' = s + 1 \) (which is clearly a nonnegative integer), we obtain: -\[ -n = 2s' + 5t. -\] -Thus, \( n \) can be written in the desired form. - -By the PCI, every natural number \( n \ge 11 \) can be written as \( 2s + 5t \) for some nonnegative integers \( s \) and \( t \). -`) === b @@ -573,55 +606,32 @@ Every natural number \( n > 22 \) (i.e. every \( n \ge 23 \)) can be written in n = 3s + 4t, \] with integers \( s \ge 3 \) and \( t \ge 2 \). - -We prove the statement by complete (strong) induction. - -We explicitly verify the claim for a few numbers: -- For \( n = 23 \): - \( 23 = 3 \cdot 5 + 4 \cdot 2 \) (here, \( s = 5 \ge 3 \) and \( t = 2 \ge 2 \)). -- For \( n = 24 \): - \( 24 = 3 \cdot 4 + 4 \cdot 3 \) (here, \( s = 4 \ge 3 \) and \( t = 3 \ge 2 \)). -- For \( n = 25 \): - \( 25 = 3 \cdot 3 + 4 \cdot 4 \) (here, \( s = 3 \ge 3 \) and \( t = 4 \ge 2 \)). - -Thus, the statement holds for \( n = 23, 24, 25 \). - -Assume that for every integer \( m \) with \( 23 \le m \le n \) (where \( n \ge 25 \)), there exist integers \( s \ge 3 \) and \( t \ge 2 \) such that -\[ -m = 3s + 4t. -\] - -The number \( n+1 \) can also be written in the form -\[ -n+1 = 3s' + 4t', -\] -with \( s' \ge 3 \) and \( t' \ge 2 \). - -Since \( n \ge 25 \), observe that -\[ -n+1 - 3 = n-2 \ge 23. -\] -By the inductive hypothesis, there exist integers \( s \ge 3 \) and \( t \ge 2 \) such that -\[ -n-2 = 3s + 4t. -\] -Then -\[ -n+1 = (n-2) + 3 = 3s + 4t + 3 = 3(s+1) + 4t. -\] -Define \( s' = s+1 \) (so that \( s' \ge 3+1 = 4 \ge 3 \)) and let \( t' = t \) (which satisfies \( t' \ge 2 \)). This shows that -\[ -n+1 = 3s' + 4t', -\] -with the required conditions. - -By the PCI, every natural number \( n > 22 \) (i.e. \( n \ge 23 \)) can be written in the form -\[ -n = 3s + 4t, -\] -where \( s \ge 3 \) and \( t \ge 2 \) are integers. `) +#proof[ + First, let's consider a few base cases. + $ + 23 &= 3(5) + 4(2) \ + 24 &= 3(4) + 4(3) \ + 25 &= 3(3) + 4(4) \ + $ + So for 23, 24, and 25, we can write them in the form $3s + 4t$ such that $s + >= 3$ and $t >= 2$. Now we proceed by strong + induction. Suppose that any natural $23 <= k <= n$ can be written as $k = 3s + + 4t$ for $t >= 2$ and $s >= 3$. Note that when $n >= 26$, $n - 3 >= 23$ + (otherwise, it's already covered in our base case and we are done). Then we + can assume $n-3$ is always covered by the inductive hypothesis and can be + written in the desired form $3s + 4t$. Now we seek to show that this implies + $n+1$ can also be written in this form. + $ + (n+1) = (n-3) + 4 = 3s + 4t + 4 = 3s + 4(t+1) + $ + And $s >= 3$, $t + 1 >= 2$. So indeed any natural number greater than 22 can + be written as $3s + 4t$ for some naturals $t >= 2$ and $s >= 3$. +] + + + === c #mitext(` @@ -630,66 +640,32 @@ Every natural number \( n > 33 \) (i.e. every \( n \ge 34 \)) can be written in n = 4s + 5t, \] where \( s \) and \( t \) are integers with \( s \ge 3 \) and \( t \ge 2 \). - -We prove the statement by complete induction. - -We verify the claim for the first four numbers: - -- \( n = 34 \): - \( 34 = 4\cdot 6 + 5\cdot 2 \) - (Here, \( s = 6 \ge 3 \) and \( t = 2 \ge 2 \).) - -- \( n = 35 \): - \( 35 = 4\cdot 5 + 5\cdot 3 \) - (Here, \( s = 5 \ge 3 \) and \( t = 3 \ge 2 \).) - -- \( n = 36 \): - \( 36 = 4\cdot 4 + 5\cdot 4 \) - (Here, \( s = 4 \ge 3 \) and \( t = 4 \ge 2 \).) - -- \( n = 37 \): - \( 37 = 4\cdot 3 + 5\cdot 5 \) - (Here, \( s = 3 \ge 3 \) and \( t = 5 \ge 2 \).) - -Thus, the statement holds for \( n = 34, 35, 36, \) and \( 37 \). - -Inductive Hypothesis: -Assume that for every integer \( m \) with \( 34 \le m \le n \) (where \( n \ge 37 \)) there exist integers \( s \ge 3 \) and \( t \ge 2 \) such that -\[ -m = 4s + 5t. -\] - -The number \( n+1 \) can also be written in the form -\[ -n+1 = 4s' + 5t', -\] -with \( s' \ge 3 \) and \( t' \ge 2 \). - -Since \( n \ge 37 \), we have: -\[ -n+1 - 4 = n - 3 \ge 37 - 3 = 34. -\] -Thus, \( n-3 \) is at least 34, and by the inductive hypothesis, there exist integers \( s \ge 3 \) and \( t \ge 2 \) such that -\[ -n - 3 = 4s + 5t. -\] -Then, -\[ -n+1 = (n-3) + 4 = 4s + 5t + 4 = 4(s+1) + 5t. -\] -Define \( s' = s+1 \) and \( t' = t \). Since \( s \ge 3 \), it follows that \( s' \ge 4 \ge 3 \), and \( t' = t \ge 2 \). Thus, we obtain the required representation: -\[ -n+1 = 4s' + 5t', -\] -with \( s' \ge 3 \) and \( t' \ge 2 \). - -By the PCI, every natural number \( n > 33 \) (i.e. \( n \ge 34 \)) can be written in the form -\[ -n = 4s + 5t, -\] -where \( s \ge 3 \) and \( t \ge 2 \) are integers. `) +#proof[ + We seek to show the proposition. We first show a few base cases, for $n = 34, +35, 36$. + $ + 34 &= 4(6) + 5(2) \ + 35 &= 4(5) + 5(3) \ + 36 &= 4(4) + 5(4) + $ + Now we state our inductive hypothesis. Suppose that for some natural $n$, $34 + <= k <= n$ can be written in the form $k = 4s + 5t$, for some integral $s >= + 3$ and $t >= 2$. Then we proceed by strong induction. Note that if $n >= 37$, + then $n - 3 >= 34$ so $n - 3$ is covered by our inductive hypothesis + (otherwise $n$ would be covered by one of our base cases and we are done). So + $n-3$ can be written in the desired $4s + 5t$ form. Now we seek to show that + this implies $n+1$ can also be written in the desired form. + + $ + n + 1 = (n - 3) + 4 = 4s + 5t + 4 = 4(s+1) + 5t + $ + $s+1 >= 3$ because $s >= 3$ and $t >= 2$ is still true. So indeed $n+1$ can + be written in the desired form. By strong induction, every natural $n >= 34$ + can be written as $n = 4s + 5t$ for some integral $s >= 3$ and $t >= 2$. +] + == 3 #mitext(` @@ -701,90 +677,40 @@ Then for all natural numbers \( n \), \[ a_n = 2^n. \] - -We will prove by complete (strong) induction that for every natural number \( n \), the equality -\[ -a_n = 2^n -\] -holds. - -- For \( n = 1 \): - \[ - a_1 = 2 = 2^1. - \] -- For \( n = 2 \): - \[ - a_2 = 4 = 2^2. - \] - -Thus, the statement is true for \( n = 1 \) and \( n = 2 \). - -Inductive Hypothesis: -Assume that for all natural numbers \( j \) with \( 1 \le j \le n \) (for some \( n \ge 2 \)), we have -\[ -a_j = 2^j. -\] - -We need to show that \( a_{n+1} = 2^{n+1} \). - -Notice that if \( n \ge 2 \), we can apply the recurrence relation with \( j = n-1 \) (since \( n-1 \ge 1 \)): -\[ -a_{(n-1)+2} = a_{n+1} = 5a_n - 6a_{n-1}. -\] -By the inductive hypothesis, we know: -\[ -a_n = 2^n \quad \text{and} \quad a_{n-1} = 2^{n-1}. -\] -Thus, -\[ -a_{n+1} = 5(2^n) - 6(2^{n-1}). -\] -Factor \(2^{n-1}\) from the right-hand side: -\[ -a_{n+1} = 2^{n-1}\Bigl(5\cdot 2 - 6\Bigr) = 2^{n-1}(10-6) = 2^{n-1} \cdot 4 = 2^{n+1}. -\] - -By the PCI, the equality -\[ -a_n = 2^n -\] -holds for all natural numbers \( n \), completing the proof. `) +#proof[ + + We already have bases cases for $n = 1$ and $n = 2$, so we just need to show + assume the inductive hypothesis for $n > 2$. Note that when $n > 2$, + $a_(n+1)$ + is + $ + a_(n+1) = 5a_(n) - 6a_(n-1) + $ + + Suppose that all $a_k$ such that $3 <= k <= n$ are given by $a_k = 2^k$. We + seek to show that $n+1$ is also given by this equation. + + Because $a_n$ and $a_(n-1)$ are included in our inductive hypothesis, + we have + $ + a_(n+1) = 5(2^n) - 6(2^(n-1) = 5(2^n) - 3(2^n) = 2^(n+1) + $ + Therefore indeed $a_(n+1)$ is given by $2^(n+1)$ which satisfies our + proposition and so it is true for all natural numbers. +] + == 10 #mitext(` Every nonempty subset \( S \) of \(\mathbb{Z}^-\) (the set of negative integers) has a largest element. - -Let \( S \subseteq \mathbb{Z}^- \) be nonempty. Define the set -\[ -T = \{ -s : s \in S \}. -\] -Since every element \( s \) in \( S \) is negative, each \( -s \) is a positive integer. Hence, \( T \) is a nonempty subset of the positive integers \(\mathbb{N}\). - -By the well-ordering principle of \(\mathbb{N}\), the set \( T \) has a least element, say \( m \). Thus, -\[ -m \in T \quad \text{and} \quad m \le t \quad \text{for all } t \in T. -\] - -Since \( m \in T \), there exists an element \( s_0 \in S \) such that -\[ -m = -s_0. -\] - -We now claim that \( s_0 \) is the largest element of \( S \). To see this, let \( s \) be any element of \( S \). Then \(-s \in T\), and by the minimality of \( m \) we have -\[ -m \le -s. -\] -Substituting \( m = -s_0 \), we obtain -\[ --s_0 \le -s. -\] -Multiplying both sides by \(-1\) (which reverses the inequality) gives -\[ -s_0 \ge s. -\] -Since \( s \) was an arbitrary element of \( S \), it follows that \( s_0 \) is an upper bound of \( S \) and, being an element of \( S \), is the largest element of \( S \). - -Thus, every nonempty subset of \(\mathbb{Z}^-\) has a largest element. `) + +#proof[ + We construct a new set, $S' = {-x | x in S}$. Then we note that $S'$ is a set + of positive integers, and in fact $S' subset.eq NN$. By the well ordering + principle, $S'$ always has a least element. Call this least element $k in + S'$. $k$ is the least element in $S'$ if and only if $-k$ is the greatest + element in $S$. Thus, $S$ always has a largest element. +] diff --git a/documents/flake.lock b/documents/flake.lock index f2046c2..a673cf9 100644 --- a/documents/flake.lock +++ b/documents/flake.lock @@ -5,11 +5,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1736143030, - "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=", + "lastModified": 1738453229, + "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de", + "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", "type": "github" }, "original": { @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1736012469, - "narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=", + "lastModified": 1739866667, + "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d", + "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680", "type": "github" }, "original": { @@ -36,14 +36,14 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1735774519, - "narHash": "sha256-CewEm1o2eVAnoqb6Ml+Qi9Gg/EfNAxbRx1lANGVyoLI=", + "lastModified": 1738452942, + "narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz" } }, "root": { @@ -62,11 +62,11 @@ ] }, "locked": { - "lastModified": 1735930054, - "narHash": "sha256-30Q6QmUHT/RBoPrrGfSNE9mjub3qLHJ0IDPUxuyHDAQ=", + "lastModified": 1738982361, + "narHash": "sha256-QWDOo/+9pGu63knSlrhPiESSC+Ij/QYckC3yH8QPK4k=", "owner": "loqusion", "repo": "typix", - "rev": "29144f9e4131628afb800cc54806da1a702f7c80", + "rev": "bdb42d3e9a8722768e2168e31077129207870f92", "type": "github" }, "original": { @@ -78,11 +78,11 @@ "typst-packages": { "flake": false, "locked": { - "lastModified": 1736182943, - "narHash": "sha256-w8acKWK2aKkCsaOJcR9GLtkrsPJxDrrPN/77h1OkhuM=", + "lastModified": 1740119901, + "narHash": "sha256-VzjqNki0yam7wrKbNkgMdyKyChEYBo0vjK0gwJZCFs4=", "owner": "typst", "repo": "packages", - "rev": "820818337a0f2a27dfc880f5ed96634914ed592f", + "rev": "92ae895b0076ac5d12ca81665b2af56f628b09f0", "type": "github" }, "original": { @@ -93,11 +93,11 @@ }, "zen-typ": { "locked": { - "lastModified": 1737198395, - "narHash": "sha256-V3runX3cITanGPVF/Sfjak2/FNs6DuAwayQ44Iedal8=", + "lastModified": 1740095364, + "narHash": "sha256-czzheiWIwJeze1aAzLmOgh+y9RoG8Qyzeicn1fd0ESY=", "owner": "youwen5", "repo": "zen.typ", - "rev": "3564895682f394f3c9be291332cc19c6ab695a60", + "rev": "d761990a004ad8dee8fc642a03fd4f11348a5fe2", "type": "github" }, "original": {