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