-
Notifications
You must be signed in to change notification settings - Fork 0
/
HRGettingStarted2.tex
370 lines (317 loc) Β· 13.2 KB
/
HRGettingStarted2.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
% Created 2022-12-18 Sun 22:13
% Intended LaTeX compiler: pdflatex
\documentclass[american]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{tikz}
\usepackage{tikz}
\usepackage{commath}
\usepackage{pgfplots}
\usepackage{sansmath}
\usepackage{mathtools}
\date{}
\title{Haskell Road; Getting Started Part 2}
\hypersetup{
pdfauthor={},
pdftitle={Haskell Road; Getting Started Part 2},
pdfkeywords={},
pdfsubject={},
pdfcreator={Emacs 28.2 (Org mode 9.6)},
pdflang={English}}
\begin{document}
\maketitle
\section*{Getting started part 2}
\label{sec:org7bfc1b4}
\section*{Monday at the library part 2}
\label{sec:org71987b3}
\subsection*{Breaktime}
\label{sec:org4fec33f}
The von der Surwitzes pop over to the student center cafe for a break.
They grab a large mineral water, a brand they knew in Germany, and Ute
has packed some \emph{Vollkornbrot} sandwiches of hummus and cucumber. They
sit at a table and pour the water and pass around out the sandwiches.
ππ±π’: All right, so I
emailed the professor about a couple of questions from that first
chapter of \emph{The Haskell Road}, and she replied saying, first, she's
happy we're tackling the material early. And she mentioned some
resources --- a few texts she has on reserve at the library. \\[0pt]
ππ΄π’: Sort of like, I'm
not going to give you the answers. I'm going to point you in the right
direction. What books are they? \\[0pt]
[murmurs of acknowledgement] \\[0pt]
ππ±π’: Math. Upper level
college texts. Abstract algebra and number theory. \\[0pt]
ππ΄π’: I've heard
computer science has all these higher math concepts, but then you
don't go as far as a math major does. \\[0pt]
[silence, eating and drinking] \\[0pt]
ππ΄π’: [continuing] I
guess you're just supposed to learn as much as you can. But like she
said at the open house, a computer scientist is really an \emph{applied}
mathematician. \\[0pt]
[murmurs of agreement] \\[0pt]
ππ―π°π²π©π: And the math is
the hardest part for incoming CS students, those first four semesters,
ergo, that's what we're emphasizing it in this course. \\[0pt]
[nods of agreement then silence as they eat and drink] \\[0pt]
ππ―π°π²π©π: [continuing] So
no hand-waving. And she doesn't have a set amount she wants us to get
through. The course is open-ended. I just find that amazing. \\[0pt]
[murmurs of agreement] \\[0pt]
ππ΄π’: But I'm sure we'll
need to keep moving and not be laggards about it. \\[0pt]
[murmurs of agreement] \\[0pt]
ππ―π°π²π©π: A whole year,
the whole school year. Her sabbatical ends next summer, but I'm pretty
sure I'll want to continue. I don't know if I want to be a computer
scientist or software engineer, but learning this can't hurt. \\[0pt]
ππ±π’: I guess you could
say Novalis is sort of an open \emph{Gynmasium}. \\[0pt]
[soft laughter] \\[0pt]
ππ΄π’: And what happens
afterward? They definitely want you to just keep going at the U. Which
I wouldn't mind at all. \\[0pt]
[looks about the table] \\[0pt]
ππ±π’: Yes, and lots of
people just drift into a half-and-half situation where there taking
courses over at the U. \\[0pt]
ππ―π°π²π©π: Well, Father
has tenure now. But I don't know if Mutti can go on working from
here. [shrugging and sighing] Anyway, I guess you two will cross that
bridge before I will. \\[0pt]
ππ±π’: [laughing] Hardly!
You're right there with us in everything we're doing this coming year.
\subsection*{Divided by}
\label{sec:orgce0892d}
Back at the library study room they've checked out the reserved books
and are looking through sections of those that deal with the basic
theory of division.
ππ±π’: [reading from the
Divisibility section of \emph{Proofs, A Long-Form Mathematical
Textbook}\footnote{\emph{\href{https://longformmath.com/proofs-home}{Proofs; A Long-Form Mathematics Textbook}} by Jay Cummings}] All right, so Professor Chandra wants us to
understand divisibility before we go to \emph{greatest common divisor}, and
before we talk about primes. She said, You have to know all of the
implications of ``divided by'' before you can advance. And like it's
saying in here, [reading] you could just say, \emph{\(a\) divides \(b\) if
\(\frac{a}{b}\) is an integer}. \\[0pt]
[Ursula and Uwe read the section from a second copy] \\[0pt]
ππ±π’: [continuing] But
we don't want that definition, we want \emph{this} definition [getting up
and writing on the board]
\begin{align}
\exists \: k \in \mathbb{Z},\; a \neq 0, \;\;a \mid b \;\; \text{if} \;\; b = a \cdot k
\end{align}
ππ±π’: [continuing] The
symbol \(a \mid b\:\) means \(a\) divides \(b\) for some \(k\) where \(b = a \cdot
k\;\) and \(a\) is not equal to zero. [pausing] Right, all that makes
sense. So basically, this turns the whole question of divisibility
into finding a proper integer value for \(k\:\) to \emph{multiply} with . Now
we have a math-formalist way of seeing divisibility. \\[0pt]
[murmurs of approval] \\[0pt]
ππ΄π’: I like how he says
good definitions don't just fall out of the sky. \\[0pt]
[murmurs of agreement] \\[0pt]
ππ―π°π²π©π: Then the
examples, like \(2 \mid 14\) is true because \(14 = 2 \cdot 7\:\), in other
words we've found a whole number integer, \(k = 7\:\) and we're
happy. \\[0pt]
ππ±π’: Again, we've
turned division into an issue of true-false logic and
multiplication. [writing on the board] So \(7 \mid 23\) doesn't work
because we have no solution for \(7k = 23\;\). \\[0pt]
ππ΄π’: And look at that
last one where it's \(a \mid 0\;\). That's true, for a non-zero \(a\)
since we can say \(0 = a \cdot 0\) is always true for any \(a\) as long as \(k
= 0\;\). \\[0pt]
[murmurs of agreement] \\[0pt]
ππ±π’: And like he says
we're not supposed to look at \(2 \mid 14\) and just say it \emph{equals}
\(7\;\). It's not supposed to be seen as a calculation, it's a logic
\emph{expression} that is true or false --- for some value \(k\:\). \\[0pt]
ππ΄π’: Right. We're in
the world of logic now, not grade school arithmetic. So everything has
to be reexplained and reworked. \\[0pt]
[murmurs of agreement] \\[0pt]
ππ±π’: Good, now he's
talking about the \emph{transitive} property of divisibility. It is a
\emph{proposition}, which is a type of theorem, and that means it comes
with a proof. [writing on the board] Here it is in the compact math
logic form
\begin{align*}
a, b, c \in \mathbb{Z},\;\; a \mid b \;\land\; b \mid c \implies a \mid c
\end{align*}
ππ±π’: [continuing] And
then he goes on to prove it by saying assume the \emph{if} part, the \(a
\mid b \;\land\; b \mid c\:\) part is true, that means the \emph{then} part, the
\(a \mid c\) part is true. So [writing]
\begin{align*}
b &= a \cdot s \\[.4em]
c &= b \cdot t
\end{align*}
ππ±π’: [continuing] for
some integers \(s\) and \(t\;\). And now [writing]
\begin{align*}
c &= b \cdot t \\[.4em]
&= (a \cdot s) \cdot t \\[.4em]
&= a \cdot (s \cdot t) \quad\quad \ldots \; \text{associativity}
\end{align*}
ππ±π’: [continuing] So
since we have the form \(c = a \cdot (s \cdot t)\) where we assumed \(s\) and \(t\)
are integers, and that's the basic form of divisibility, so yes, \(a
\mid c\) since we've shown \(c = a \cdot k\) where \(k = (s \cdot t)\:\). \\[0pt]
ππ―π°π²π©π: Good. Let's
switch over to this other book [she picks up a Springer Verlag
book\footnote{\emph{\href{https://www.google.com/books/edition/The\_Whole\_Truth\_About\_Whole\_Numbers/ahUGswEACAAJ?hl=en}{The Whole Truth About Whole Numbers}} by Sylvia Forman and
Agnes M. Rash;} and pages through it] Ah, in this book there's a section
called \emph{Divisors and the Greatest Common Divisor}. [paging to section,
reading] Oh, here's one, \emph{Determine whether true or false} [writing on
the board]
\begin{align*}
2 \mid (6n + 4)
\end{align*}
ππ΄π’: Interesting. So
writing it in the divisibility way [gets up and writes on the board]
\begin{align*}
(6n + 4) = 2k
\end{align*}
ππ΄π’: So before we freak
out and get lost, let's just notice that [writing]
\begin{align}
2(3n + 4) &= 2k \\[.4em]
3n + 4 &= k
\end{align}
ππ΄π’: [continuing] I'd
say we don't need to go any further with this. \(2 \mid (6n + 4)\) is
true --- which means it's got solutions --- because \(2\) will go into
\((6n + 4)\) for whatever \(n\) wants to be. \\[0pt]
ππ±π’: And this whole
formal divisibility thing helps because if you just saw this one day
[writing on the board]
\begin{align}
\frac{(6n + 4)}{2} = 3n + 2
\end{align}
ππ±π’: [continuing]
you've now got a second way to see the idea that the equation is true
for any \(n\), that it's dependent on \(n\;\). \\[0pt]
ππ―π°π²π©π: [looking
ironically] Thanks, Uwe, Ute, for keeping it real. \\[0pt]
[laughter] \\[0pt]
ππ±π’: [reading text] All
right, we have this example [writing on board]
\begin{align*}
0 \mid 11
\end{align*}
ππ±π’: [continuing] which
is false because there can't be any \(k\) where \(k \cdot 0\) equals
\(11\;\). Agreed? \\[0pt]
[nods of agreement] \\[0pt]
ππ±π’: [continuing] All
right, how about this?
\begin{quote}
Prove that if \(\,a \mid b\) then \(-\, a \mid b\)
\end{quote}
ππ―π°π²π©π: Let's just
logic it out [getting up and writing on the board]
\begin{align*}
b & = a \cdot k \\[.4em]
b &= (-a) \cdot (-k) \\[.4em]
b &= - (a) \cdot (k) \\[.4em]
b &= - a \cdot k
\end{align*}
then
\begin{align*}
- a \mid b \quad \text{for some}\; k \in \mathbb{Z}
\end{align*}
ππ―π°π²π©π: [continuing] So
\(k\) by virtue of being an integer, which can be either positive or
negative, we've derived \(-\, a \mid b\) from \(a \mid b\;\). \\[0pt]
[silence while the others study the board] \\[0pt]
ππ΄π’: Hold it. I'm not
sure we've got the spirit of this, quite. \\[0pt]
ππ―π°π²π©π: How so? \\[0pt]
ππ΄π’: [going to the
board] We need to make sure we understand this as [writing] \((-a) \mid
b\;\) and not as \(-(a \mid b)\:\), right? \\[0pt]
[murmurs of agreement] \\[0pt]
ππ΄π’: So that means
we've got [writing] \(b = (-a)(-k)\) as the only possible solution to
keep that \(b\) positive. And I don't think you meant to factor out
\(-1\:\) like you did. So \(k\) must be negative to go with the \(-a\:\),
which then gives positive \(b\;\). That's what is meant, I think. Yes,
\(k\) being an integer allows this. But again, we're dealing with a
multiplicative relationship, we're not doing division. And I'm sure
we'll find out why this is so important in a while. \\[0pt]
ππ―π°π²π©π: Oh, I think
that was in here. [pulling a large-format book from her messenger
bag\footnote{\emph{\href{http://illustratedtheoryofnumbers.com/}{An Illustrated Theory of Numbers}} by Martin H. Weissman.} and pages to tabbed page]. Right, and he shows that \(0 \mid
0\:\), that zero divides zero, is true --- because [writing on board]
\(0 = 0 \cdot k\:\), meaning \(k\) can be anything and the expression remains
true. [reading further] And he's calling \(k\) the \emph{accessory
number}. [reading further] So his wording is the integers \(x\) that
satisfy \(7 \mid x\) are \(x = 7 \cdot k\) --- and that will be the arithmetic
progression of the multiples of \(7\:\). They're evenly
spaced. Good. And there's this [going to the board and writing] \\[0pt]
\begin{quote}
Plot the integers \(x\) which satisfy \(5 \mid (x - 2)\)
\end{quote}
ππ±π’: [going to the
board and writing] So if that's to be true then we've got \(x - 2 =
5k\:\), and that means for the multiples of \(5\:\), the \emph{set} of
integers \(x\) must keep \(x - 2\) multiples of \(5\) also. So for example
\begin{align*}
-3 - 2 &= 5 \cdot -1 \\[.4em]
2 - 2 &= 5 \cdot 0 \\[.4em]
7 - 2 &= 5 \cdot 1 \\[.4em]
12 - 2 &= 5 \cdot 2 \\[.4em]
\ldots
\end{align*}
ππ±π’: [continuing] And
the so-called \emph{geometric} view of this set of \$x\$s would be a number
line with points [writing on the board]
\begin{center}
\includesvg[width=.9\linewidth]{images/testsine1}
\end{center}
\begin{center}
\includesvg[width=.9\linewidth]{tikztest3}
\end{center}
\begin{center}
\includesvg[width=.9\linewidth]{tikztest2}
\end{center}
\begin{center}
\includesvg[width=.9\linewidth]{tikztest4}
\end{center}
\begin{center}
\includesvg[width=.9\linewidth]{tikztest5a}
\end{center}
\begin{center}
\includesvg[width=.9\linewidth]{tikztest5b}
\end{center}
\begin{center}
\includesvg[width=.9\linewidth]{tikztest5c}
\end{center}
ππ΄π’: Good. gold
standard for figuring out lowest common denominator. \\[0pt]
ππ―π°π²π©π: I'd say so, but
now we need to see how Haskell does it internally, and how \emph{The
Haskell Road\ldots{}} does it and stop being amateurs. \\[0pt]
[laughter] \\[0pt]
ππ΄π’: I feel like you
and the professor are like very strong bakers kneading and kneading
and kneading my brain [demonstrates with imaginary brain-dough] \\[0pt]
[laughter] \\[0pt]
ππ΄π’: No, this had
really worked out, you, Ursula, racing ahead with the Haskell. And I
going ahead with the set theory, and you, Ute, going on ahead with the
math logic. I mean, we're definitely making progress. It's just that
we have so much to learn! \\[0pt]
[affirmations]
\end{document}