mjo-hurwitz.tex: new file for Hurwitz algebras (quaternions and octonions).
[mjotex.git] / examples.tex
1 \documentclass{report}
2
3 % Setting hypertexnames=false forces hyperref to use a consistent
4 % internal counter for proposition/equation references rather than
5 % being clever, which doesn't work after we reset those counters.
6 \usepackage[hypertexnames=false]{hyperref}
7 \hypersetup{
8 colorlinks=true,
9 linkcolor=blue,
10 citecolor=blue
11 }
12
13 % We have to load this after hyperref, so that links work, but before
14 % mjotex so that mjotex knows to define its glossary entries.
15 \usepackage[nonumberlist]{glossaries}
16 \makenoidxglossaries{}
17
18 % If you want an index, we can do that too. You'll need to define
19 % the "INDICES" variable in the GNUmakefile, though.
20 \usepackage{makeidx}
21 \makeindex
22
23 \usepackage{mjotex}
24 \usepackage{mathtools}
25
26 \begin{document}
27
28 \begin{section}{Algebra}
29 If $R$ is a commutative ring\index{commutative ring}, then
30 $\polyring{R}{X,Y,Z}$ is a multivariate polynomial ring with
31 indeterminates $X$, $Y$, and $Z$, and coefficients in $R$. If $R$
32 is a moreover an integral domain, then its fraction field is
33 $\Frac{R}$. If $x,y,z \in R$, then $\ideal{\set{x,y,z}}$ is the
34 ideal generated by $\set{x,y,z}$, which is defined to be the
35 smallest ideal in $R$ containing that set. Likewise, if we are in
36 an algebra $\mathcal{A}$ and if $x,y,z \in \mathcal{A}$, then
37 $\alg{\set{x,y,z}}$ is the smallest subalgebra of $\mathcal{A}$
38 containing the set $\set{x,y,z}$.
39
40 If $R$ has a multiplicative identity (that is, a unit) element,
41 then that element is denoted by $\unit{R}$. Its additive identity
42 element is $\zero{R}$.
43 \end{section}
44
45 \begin{section}{Algorithm}
46 An example of an algorithm (bogosort) environment.
47
48 \begin{algorithm}[H]
49 \caption{Sort a list of numbers}
50 \begin{algorithmic}
51 \Require{A list of numbers $L$}
52 \Ensure{A new, sorted copy $M$ of the list $L$}
53
54 \State{$M \gets L$}
55
56 \While{$M$ is not sorted}
57 \State{Rearrange $M$ randomly}
58 \EndWhile{}
59
60 \Return{$M$}
61 \end{algorithmic}
62 \end{algorithm}
63 \end{section}
64
65 \begin{section}{Arrow}
66 The constant function that always returns $a$ is $\const{a}$. The
67 identity operator on $V$ is $\identity{V}$. The composition of $f$
68 and $g$ is $\compose{f}{g}$. The inverse of $f$ is
69 $\inverse{f}$. If $f$ is a function and $A$ is a subset of its
70 domain, then the preimage under $f$ of $A$ is $\preimage{f}{A}$.
71 \end{section}
72
73 \begin{section}{Calculus}
74 The gradient of $f : \Rn \rightarrow \Rn[1]$ is $\gradient{f} :
75 \Rn \rightarrow \Rn$.
76 \end{section}
77
78 \begin{section}{Common}
79 The function $f$ applied to $x$ is $f\of{x}$, and the restriction
80 of $f$ to a subset $X$ of its domain is $\restrict{f}{X}$. We can
81 group terms like $a + \qty{b - c}$ or $a + \qty{b - \sqty{c -
82 d}}$. The tuples go up to seven, for now:
83 %
84 \begin{itemize}
85 \begin{item}
86 Pair: $\pair{1}{2}$,
87 \end{item}
88 \begin{item}
89 Triple: $\triple{1}{2}{3}$,
90 \end{item}
91 \begin{item}
92 Quadruple: $\quadruple{1}{2}{3}{4}$,
93 \end{item}
94 \begin{item}
95 Qintuple: $\quintuple{1}{2}{3}{4}{5}$,
96 \end{item}
97 \begin{item}
98 Sextuple: $\sextuple{1}{2}{3}{4}{5}{6}$,
99 \end{item}
100 \begin{item}
101 Septuple: $\septuple{1}{2}{3}{4}{5}{6}{7}$.
102 \end{item}
103 \end{itemize}
104 %
105 The factorial of the number $10$ is $\factorial{10}$, and the
106 least common multiple of $4$ and $6$ is $\lcm{\set{4,6}} =
107 12$.
108
109 The direct sum of $V$ and $W$ is $\directsum{V}{W}$. Or three
110 things, $\directsumthree{U}{V}{W}$. How about more things? Like
111 $\directsummany{k=1}{\infty}{V_{k}}$. Those direct sums
112 adapt nicely to display equations:
113 %
114 \begin{equation*}
115 \directsummany{k=1}{\infty}{V_{k}} \ne \emptyset.
116 \end{equation*}
117 %
118 Here are a few common tuple spaces that should not have a
119 superscript when that superscript would be one: $\Nn[1]$,
120 $\Zn[1]$, $\Qn[1]$, $\Rn[1]$, $\Cn[1]$. However, if the
121 superscript is (say) two, then it appears: $\Nn[2]$, $\Zn[2]$,
122 $\Qn[2]$, $\Rn[2]$, $\Cn[2]$. The symbols $\Fn[1]$, $\Fn[2]$,
123 et cetera, are available for use with a generic field.
124
125 Finally, we have the four standard types of intervals in $\Rn[1]$,
126 %
127 \begin{align*}
128 \intervaloo{a}{b} &= \setc{ x \in \Rn[1]}{ a < x < b },\\
129 \intervaloc{a}{b} &= \setc{ x \in \Rn[1]}{ a < x \le b },\\
130 \intervalco{a}{b} &= \setc{ x \in \Rn[1]}{ a \le x < b }, \text{ and }\\
131 \intervalcc{a}{b} &= \setc{ x \in \Rn[1]}{ a \le x \le b }.
132 \end{align*}
133 \end{section}
134
135 \begin{section}{Complex}
136 We sometimes want to conjugate complex numbers like
137 $\compconj{a+bi} = a - bi$.
138 \end{section}
139
140 \begin{section}{Cone}
141 The dual cone of $K$ is $\dual{K}$. Some familiar symmetric cones
142 are $\Rnplus$, $\Lnplus$, $\Snplus$, and $\Hnplus$. If cones
143 $K_{1}$ and $K_{2}$ are given, we can define $\posops{K_{1}}$,
144 $\posops[K_{2}]{K_{1}}$, $\Sof{K_{1}}$, $\Zof{K_{1}}$,
145 $\LL{K_{1}}$, and $\lyapunovrank{K_{1}}$. We can also define $x
146 \gecone_{K} y$, $x \gtcone_{K} y$, $x \lecone_{K} y$, and $x
147 \ltcone_{K} y$ with respect to a cone $K$.
148 \end{section}
149
150 \begin{section}{Convex}
151 The conic hull of a set $X$ is $\cone{X}$; its affine hull is
152 $\aff{X}$, and its convex hull is $\conv{X}$. If $K$ is a cone,
153 then its lineality space is $\linspace{K}$, its lineality is
154 $\lin{K}$, and its extreme directions are $\Ext{K}$. The fact that
155 $F$ is a face of $K$ is denoted by $F \faceof K$; if $F$ is a
156 proper face, then we write $F \properfaceof K$.
157 \end{section}
158
159 \begin{section}{Euclidean Jordan algebras}
160 The Jordan product of $x$ and $y$ in some Euclidean Jordan algebra
161 is $\jp{x}{y}$.
162 \end{section}
163
164 \begin{section}{Font}
165 We can write things like Carathéodory and Güler and
166 $\mathbb{R}$. The PostScript Zapf Chancery font is also available
167 in both upper- and lower-case:
168 %
169 \begin{itemize}
170 \begin{item}$\mathpzc{abcdefghijklmnopqrstuvwxyz}$\end{item}
171 \begin{item}$\mathpzc{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\end{item}
172 \end{itemize}
173 \end{section}
174
175 \begin{section}{Hurwitz}
176 Here lies the Hurwitz algebras, like the quaternions
177 $\quaternions$ and octonions $\octonions$.
178 \end{section}
179
180 \begin{section}{Linear algebra}
181 The absolute value of $x$ is $\abs{x}$, or its norm is
182 $\norm{x}$. The inner product of $x$ and $y$ is $\ip{x}{y}$ and
183 their tensor product is $\tp{x}{y}$. The Kronecker product of
184 matrices $A$ and $B$ is $\kp{A}{B}$. The adjoint of the operator
185 $L$ is $\adjoint{L}$, or if it's a matrix, then its transpose is
186 $\transpose{L}$. Its trace is $\trace{L}$, and its spectrum---the
187 set of its eigenvalues---is $\spectrum{L}$. Another
188 matrix-specific concept is the Moore-Penrose pseudoinverse of $L$,
189 denoted by $\pseudoinverse{L}$. Finally, the rank of a matrix $L$
190 is $\rank{L}$. As far as matrix spaces go, we have the $n$-by-$n$
191 real-symmetric and complex-Hermitian matrices $\Sn$ and $\Hn$
192 respectively; however $\Sn[1]$ and $\Hn[1]$ do not automatically
193 simplify because the ``$n$'' does not indicate the arity of a
194 Cartesian product in this case. A handy way to represent the
195 matrix $A \in \Rn[n \times n]$ whose only non-zero entries are on
196 the diagonal is $\diag{\colvec{A_{11},A_{22},\ldots,A_{nn}}}$.
197
198 The span of a set $X$ is $\spanof{X}$, and its codimension is
199 $\codim{X}$. The projection of $X$ onto $V$ is $\proj{V}{X}$. The
200 automorphism group of $X$ is $\Aut{X}$, and its Lie algebra is
201 $\Lie{X}$. We can write a column vector $x \coloneqq
202 \colvec{x_{1},x_{2},x_{3},x_{4}}$ and turn it into a $2 \times 2$
203 matrix with $\matricize{x}$. To recover the vector, we use
204 $\vectorize{\matricize{x}}$.
205
206 The set of all bounded linear operators from $V$ to $W$ is
207 $\boundedops[W]{V}$. If $W = V$, then we write $\boundedops{V}$
208 instead.
209
210 If you want to solve a system of equations, try Cramer's
211 rule~\cite{ehrenborg}. Or at least the reduced row-echelon form of
212 the matrix, $\rref{A}$.
213
214 The direct sum of $V$ and $W$ is $\directsum{V}{W}$, of course,
215 but what if $W = V^{\perp}$? Then we wish to indicate that fact by
216 writing $\directsumperp{V}{W}$. That operator should survive a
217 display equation, too, and the weight of the circle should match
218 that of the usual direct sum operator.
219 %
220 \begin{align*}
221 Z = \directsumperp{V}{W}\\
222 \oplus \oplusperp \oplus \oplusperp
223 \end{align*}
224 %
225 Its form should also survive in different font sizes\ldots
226 \Large
227 \begin{align*}
228 Z = \directsumperp{V}{W}\\
229 \oplus \oplusperp \oplus \oplusperp
230 \end{align*}
231 \Huge
232 \begin{align*}
233 Z = \directsumperp{V}{W}\\
234 \oplus \oplusperp \oplus \oplusperp
235 \end{align*}
236 \normalsize
237 \end{section}
238
239 \begin{section}{Listing}
240 Here's an interactive SageMath prompt:
241
242 \begin{tcblisting}{listing only,
243 colback=codebg,
244 coltext=codefg,
245 listing options={language=sage,style=sage}}
246 sage: K = Cone([ (1,0), (0,1) ])
247 sage: K.positive_operator_gens()
248 [
249 [1 0] [0 1] [0 0] [0 0]
250 [0 0], [0 0], [1 0], [0 1]
251 ]
252 \end{tcblisting}
253
254 However, the smart way to display a SageMath listing is to load it
255 from an external file (under the ``listings'' subdirectory):
256
257 \sagelisting{example}
258
259 Keeping the listings in separate files makes it easy for the build
260 system to test them.
261 \end{section}
262
263 \begin{section}{Proof by cases}
264
265 \begin{proposition}
266 There are two cases in the following proof.
267
268 \begin{proof}
269 The result should be self-evident once we have considered the
270 following two cases.
271 \begin{pcases}
272 \begin{case}[first case]
273 Nothing happens in the first case.
274 \end{case}
275 \begin{case}[second case]
276 The same thing happens in the second case.
277 \end{case}
278 \end{pcases}
279
280 You see?
281 \end{proof}
282 \end{proposition}
283
284 Here's another one.
285
286 \renewcommand{\baselinestretch}{2}
287 \begin{proposition}
288 Cases should display intelligently even when the document is
289 double-spaced.
290
291 \begin{proof}
292 Here we go again.
293
294 \begin{pcases}
295 \begin{case}[first case]
296 Nothing happens in the first case.
297 \end{case}
298 \begin{case}[second case]
299 The same thing happens in the second case.
300 \end{case}
301 \end{pcases}
302
303 Now it's over.
304 \end{proof}
305 \end{proposition}
306 \renewcommand{\baselinestretch}{1}
307 \end{section}
308
309 \begin{section}{Set theory}
310 Here's a set $\set{1,2,3} = \setc{n \in \Nn[1]}{ n \le 3 }$. The
311 cardinality of the set $X \coloneqq \set{1,2,3}$ is $\card{X} =
312 3$, and its powerset is $\powerset{X}$.
313
314 We also have a few basic set operations, for example the union of
315 two or three sets: $\union{A}{B}$, $\unionthree{A}{B}{C}$. And of
316 course with union comes intersection: $\intersect{A}{B}$,
317 $\intersectthree{A}{B}{C}$. The Cartesian product of two sets $A$
318 and $B$ is there too: $\cartprod{A}{B}$. If we take the product
319 with $C$ as well, then we obtain $\cartprodthree{A}{B}{C}$.
320
321 We can also take an arbitrary (indexed) union, intersection, or
322 Cartesian product of things, like
323 $\unionmany{k=1}{\infty}{A_{k}}$,
324 $\intersectmany{k=1}{\infty}{B_{k}}$, or
325 $\cartprodmany{k=1}{\infty}{C_{k}}$. The best part about those is
326 that they do the right thing in a display equation:
327 %
328 \begin{equation*}
329 \unionmany{k=1}{\infty}{A_{k}}
330 \ne
331 \intersectmany{k=1}{\infty}{B_{k}}
332 \ne
333 \cartprodmany{k=1}{\infty}{C_{k}}.
334 \end{equation*}
335 %
336 \end{section}
337
338 \begin{section}{Theorems}
339 \begin{corollary}
340 The
341 \end{corollary}
342
343 \begin{lemma}
344 quick
345 \end{lemma}
346
347 \begin{proposition}
348 brown
349 \end{proposition}
350
351 \begin{theorem}
352 fox
353 \end{theorem}
354
355 \begin{exercise}
356 jumps
357 \end{exercise}
358
359 \begin{definition}
360 quod
361 \end{definition}
362
363 \begin{example}
364 erat
365 \end{example}
366
367 \begin{remark}
368 demonstradum.
369 \end{remark}
370 \end{section}
371
372 \begin{section}{Theorems (starred)}
373 \begin{corollary*}
374 The
375 \end{corollary*}
376
377 \begin{lemma*}
378 quick
379 \end{lemma*}
380
381 \begin{proposition*}
382 brown
383 \end{proposition*}
384
385 \begin{theorem*}
386 fox
387 \end{theorem*}
388
389 \begin{exercise*}
390 jumps
391 \end{exercise*}
392
393 \begin{definition*}
394 quod
395 \end{definition*}
396
397 \begin{example*}
398 erat
399 \end{example*}
400
401 \begin{remark*}
402 demonstradum.
403 \end{remark*}
404 \end{section}
405
406 \begin{section}{Topology}
407 The interior of a set $X$ is $\interior{X}$. Its closure is
408 $\closure{X}$ and its boundary is $\boundary{X}$.
409 \end{section}
410
411 \setlength{\glslistdottedwidth}{.3\linewidth}
412 \setglossarystyle{listdotted}
413 \glsaddall{}
414 \printnoidxglossaries{}
415
416 \bibliographystyle{mjo}
417 \bibliography{local-references}
418
419 \printindex
420 \end{document}