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