8 \begin{section
}{Algorithm
}
9 An example of an algorithm (bogosort) environment.
12 \caption{Sort a list of numbers
}
14 \Require{A list of numbers $L$
}
15 \Ensure{A new, sorted copy $M$ of the list $L$
}
19 \While{$M$ is not sorted
}
20 \State{Rearrange $M$ randomly
}
28 \begin{section
}{Arrow
}
29 The identity operator on $V$ is $
\identity{V
}$. The composition of
30 $f$ and $g$ is $
\compose{f
}{g
}$. The inverse of $f$ is
31 $
\inverse{f
}$. If $f$ is a function and $A$ is a subset of its
32 domain, then the preimage under $f$ of $A$ is $
\preimage{f
}{A
}$.
35 \begin{section
}{Common
}
36 The function $f$ applied to $x$ is $f
\of{x
}$. We can group terms
37 like $a +
\qty{b - c
}$ or $a +
\qty{b -
\sqty{c - d
}}$. Here's a
38 set $
\set{1,
2,
3} =
\setc{n
\in \Nn[1]}{ n
\le 3 }$. Here's a pair
39 of things $
\pair{1}{2}$ or a triple of them $
\triple{1}{2}{3}$,
40 and the factorial of the number $
10$ is $
\factorial{10}$.
42 The Cartesian product of two sets $A$ and $B$ is
43 $
\cartprod{A
}{B
}$; if we take the product with $C$ as well, then
44 we obtain $
\cartprodthree{A
}{B
}{C
}$. The direct sum of $V$ and $W$
45 is $
\directsum{V
}{W
}$. Or three things,
46 $
\directsumthree{U
}{V
}{W
}$. How about more things? Like
47 $
\directsummany{k=
1}{\infty}{V_
{k
}} \ne
48 \cartprodmany{k=
1}{\infty}{V_
{k
}}$. Those direct sums and
49 cartesian products adapt nicely to display equations:
52 \directsummany{k=
1}{\infty}{V_
{k
}} \ne \cartprodmany{k=
1}{\infty}{V_
{k
}}.
54 Here are a few common tuple spaces that should not have a
55 superscript when that superscript would be one: $
\Nn[1]$,
56 $
\Zn[1]$, $
\Qn[1]$, $
\Rn[1]$, $
\Cn[1]$. However, if the
57 superscript is (say) two, then it appears: $
\Nn[2]$, $
\Zn[2]$,
58 $
\Qn[2]$, $
\Rn[2]$, $
\Cn[2]$.
60 We also have a few basic set operations, for example the union of
61 two or three sets: $
\union{A
}{B
}$, $
\unionthree{A
}{B
}{C
}$. And of
62 course with union comes intersection: $
\intersect{A
}{B
}$,
63 $
\intersectthree{A
}{B
}{C
}$. We can also take an arbitrary
64 (indexed) union and intersections of things, like
65 $
\unionmany{k=
1}{\infty}{A_
{k
}}$ or
66 $
\intersectmany{k=
1}{\infty}{B_
{k
}}$. The best part about those
67 is that they do the right thing in a display equation:
70 \unionmany{k=
1}{\infty}{A_
{k
}} =
\intersectmany{k=
1}{\infty}{B_
{k
}}
73 Finally, we have the four standard types of intervals in $
\Rn[1]$,
76 \intervaloo{a
}{b
} &=
\setc{ x
\in \Rn[1]}{ a < x < b
},\\
77 \intervaloc{a
}{b
} &=
\setc{ x
\in \Rn[1]}{ a < x
\le b
},\\
78 \intervalco{a
}{b
} &=
\setc{ x
\in \Rn[1]}{ a
\le x < b
},
\text{ and
}\\
79 \intervalcc{a
}{b
} &=
\setc{ x
\in \Rn[1]}{ a
\le x
\le b
}.
84 The dual cone of $K$ is $
\dual{K
}$. Some familiar symmetric cones
85 are $
\Rnplus$, $
\Lnplus$, $
\Snplus$, and $
\Hnplus$. If cones
86 $K_
{1}$ and $K_
{2}$ are given, we can define $
\posops{K_
{1}}$,
87 $
\posops[K_
{2}]{K_
{1}}$, $
\Sof{K_
{1}}$, $
\Zof{K_
{1}}$,
88 $
\LL{K_
{1}}$, and $
\lyapunovrank{K_
{1}}$. We can also define $x
89 \gecone_{K
} y$, $x
\gtcone_{K
} y$, $x
\lecone_{K
} y$, and $x
90 \ltcone_{K
} y$ with respect to a cone $K$.
93 \begin{section
}{Convex
}
94 The conic hull of a set $X$ is $
\cone{X
}$; its affine hull is
95 $
\aff{X
}$, and its convex hull is $
\conv{X
}$. If $K$ is a cone,
96 then its lineality space is $
\linspace{K
}$, its lineality is
97 $
\lin{K
}$, and its extreme directions are $
\Ext{K
}$.
100 \begin{section
}{Font
}
101 We can write things like Carathéodory and Güler and $
\mathbb{R
}$.
104 \begin{section
}{Linear algebra
}
105 The absolute value of $x$ is $
\abs{x
}$, or its norm is
106 $
\norm{x
}$. The inner product of $x$ and $y$ is $
\ip{x
}{y
}$ and
107 their tensor product is $
\tp{x
}{y
}$. The Kronecker product of
108 matrices $A$ and $B$ is $
\kp{A
}{B
}$. The adjoint of the operator
109 $L$ is $
\adjoint{L
}$, or if it's a matrix, then its transpose is
110 $
\transpose{L
}$. Its trace is $
\trace{L
}$. Another matrix-specific
111 concept is the Moore-Penrose pseudoinverse of $L$, denoted by
114 The span of a set $X$ is $
\spanof{X
}$, and its codimension is
115 $
\codim{X
}$. The projection of $X$ onto $V$ is $
\proj{V
}{X
}$. The
116 automorphism group of $X$ is $
\Aut{X
}$, and its Lie algebra is
117 $
\Lie{X
}$. We can write a column vector $x
\coloneqq
118 \colvec{x_
{1},x_
{2},x_
{3},x_
{4}}$ and turn it into a $
2 \times 2$
119 matrix with $
\matricize{x
}$. To recover the vector, we use
120 $
\vectorize{\matricize{x
}}$.
122 The set of all bounded linear operators from $V$ to $W$ is
123 $
\boundedops[W
]{V
}$. If $W = V$, then we write $
\boundedops{V
}$
126 The direct sum of $V$ and $W$ is $
\directsum{V
}{W
}$, of course,
127 but what if $W = V^
{\perp}$? Then we wish to indicate that fact by
128 writing $
\directsumperp{V
}{W
}$. That operator should survive a
129 display equation, too, and the weight of the circle should match
130 that of the usual direct sum operator.
133 Z =
\directsumperp{V
}{W
}\\
134 \oplus \oplusperp \oplus \oplusperp
137 Its form should also survive in different font sizes...
140 Z =
\directsumperp{V
}{W
}\\
141 \oplus \oplusperp \oplus \oplusperp
145 Z =
\directsumperp{V
}{W
}\\
146 \oplus \oplusperp \oplus \oplusperp
151 \begin{section
}{Listing
}
152 Here's an interactive sage prompt:
154 \begin{tcblisting
}{listing only,
157 listing options=
{language=sage,style=sage
}}
158 sage: K = Cone(
[ (
1,
0), (
0,
1)
])
159 sage: K.positive_operator_gens()
161 [1 0] [0 1] [0 0] [0 0]
162 [0 0],
[0 0],
[1 0],
[0 1]
167 \begin{section
}{Miscellaneous
}
168 The cardinality of the set $X
\coloneqq \set{1,
2,
3}$ is $
\card{X
}
172 \begin{section
}{Proof by cases
}
175 There are two cases in the following proof.
178 The result should be self-evident once we have considered the
181 \begin{case
}[first case
]
182 Nothing happens in the first case.
184 \begin{case
}[second case
]
185 The same thing happens in the second case.
195 \renewcommand{\baselinestretch}{2}
197 Cases should display intelligently even when the
document is
204 \begin{case
}[first case
]
205 Nothing happens in the first case.
207 \begin{case
}[second case
]
208 The same thing happens in the second case.
215 \renewcommand{\baselinestretch}{1}
218 \begin{section
}{Theorems
}
248 \begin{section
}{Theorems (starred)
}
278 \begin{section
}{Topology
}
279 The interior of a set $X$ is $
\interior{X
}$. Its closure is
280 $
\closure{X
}$ and its boundary is $
\boundary{X
}$.