mjo-hurwitz.tex: new file for Hurwitz algebras (quaternions and octonions).
[mjotex.git] / mjo-common.tex
1 %
2 % Only the most commonly-used macros. Needed by everything else.
3 %
4 \ifx\havemjocommon\undefined
5 \def\havemjocommon{1}
6
7 \ifx\mathbb\undefined
8 \usepackage{amsfonts}
9 \fi
10
11 \ifx\restriction\undefined
12 \usepackage{amssymb}
13 \fi
14
15 % Place the argument in matching left/right parentheses.
16 \newcommand*{\of}[1]{ \left({#1}\right) }
17
18 % Group terms using parentheses.
19 \newcommand*{\qty}[1]{ \left({#1}\right) }
20
21 % Group terms using square brackets.
22 \newcommand*{\sqty}[1]{ \left[{#1}\right] }
23
24 % A pair of things.
25 \newcommand*{\pair}[2]{ \left({#1},{#2}\right) }
26
27 % A triple of things.
28 \newcommand*{\triple}[3]{ \left({#1},{#2},{#3}\right) }
29
30 % A four-tuple of things.
31 \newcommand*{\quadruple}[4]{ \left({#1},{#2},{#3},{#4}\right) }
32
33 % A five-tuple of things.
34 \newcommand*{\quintuple}[5]{ \left({#1},{#2},{#3},{#4},{#5}\right) }
35
36 % A six-tuple of things.
37 \newcommand*{\sextuple}[6]{ \left({#1},{#2},{#3},{#4},{#5},{#6}\right) }
38
39 % A seven-tuple of things.
40 \newcommand*{\septuple}[7]{ \left({#1},{#2},{#3},{#4},{#5},{#6},{#7}\right) }
41
42 % The "least common multiple of" function. Takes a nonempty set of
43 % things that can be multiplied and ordered as its argument. Name
44 % chosen for synergy with \gcd, which *does* exist already.
45 \newcommand*{\lcm}[1]{ \operatorname{lcm}\of{{#1}} }
46 \ifdefined\newglossaryentry
47 \newglossaryentry{lcm}{
48 name={\ensuremath{\lcm{X}}},
49 description={the least common multiple of the elements of $X$},
50 sort=l
51 }
52 \fi
53
54 % The factorial operator.
55 \newcommand*{\factorial}[1]{ {#1}! }
56
57 % Restrict the first argument (a function) to the second argument (a
58 % subset of that functions domain). Abused for polynomials to specify
59 % an associated function with a particular domain (also its codomain,
60 % in the case of univariate polynomials).
61 \newcommand*{\restrict}[2]{{#1}{\restriction}_{#2}}
62 \ifdefined\newglossaryentry
63 \newglossaryentry{restriction}{
64 name={\ensuremath{\restrict{f}{X}}},
65 description={the restriction of $f$ to $X$},
66 sort=r
67 }
68 \fi
69
70 %
71 % Product spaces
72 %
73 % All of the product spaces (for example, R^n) that follow default to
74 % an exponent of ``n'', but that exponent can be changed by providing
75 % it as an optional argument. If the exponent given is ``1'', then it
76 % will be omitted entirely.
77 %
78
79 % The natural n-space, N x N x N x ... x N.
80 \newcommand*{\Nn}[1][n]{
81 \mathbb{N}\if\detokenize{#1}\detokenize{1}{}\else^{#1}\fi
82 }
83
84 \ifdefined\newglossaryentry
85 \newglossaryentry{N}{
86 name={\ensuremath{\Nn[1]}},
87 description={the set of natural numbers},
88 sort=N
89 }
90 \fi
91
92 % The integral n-space, Z x Z x Z x ... x Z.
93 \newcommand*{\Zn}[1][n]{
94 \mathbb{Z}\if\detokenize{#1}\detokenize{1}{}\else^{#1}\fi
95 }
96
97 \ifdefined\newglossaryentry
98 \newglossaryentry{Z}{
99 name={\ensuremath{\Zn[1]}},
100 description={the ring of integers},
101 sort=Z
102 }
103 \fi
104
105 % The rational n-space, Q x Q x Q x ... x Q.
106 \newcommand*{\Qn}[1][n]{
107 \mathbb{Q}\if\detokenize{#1}\detokenize{1}{}\else^{#1}\fi
108 }
109
110 \ifdefined\newglossaryentry
111 \newglossaryentry{Q}{
112 name={\ensuremath{\Qn[1]}},
113 description={the field of rational numbers},
114 sort=Q
115 }
116 \fi
117
118 % The real n-space, R x R x R x ... x R.
119 \newcommand*{\Rn}[1][n]{
120 \mathbb{R}\if\detokenize{#1}\detokenize{1}{}\else^{#1}\fi
121 }
122
123 \ifdefined\newglossaryentry
124 \newglossaryentry{R}{
125 name={\ensuremath{\Rn[1]}},
126 description={the field of real numbers},
127 sort=R
128 }
129 \fi
130
131
132 % The complex n-space, C x C x C x ... x C.
133 \newcommand*{\Cn}[1][n]{
134 \mathbb{C}\if\detokenize{#1}\detokenize{1}{}\else^{#1}\fi
135 }
136
137 \ifdefined\newglossaryentry
138 \newglossaryentry{C}{
139 name={\ensuremath{\Cn[1]}},
140 description={the field of complex numbers},
141 sort=C
142 }
143 \fi
144
145 % The n-dimensional product space of a generic field F.
146 \newcommand*{\Fn}[1][n]{
147 \mathbb{F}\if\detokenize{#1}\detokenize{1}{}\else^{#1}\fi
148 }
149
150 \ifdefined\newglossaryentry
151 \newglossaryentry{F}{
152 name={\ensuremath{\Fn[1]}},
153 description={a generic field},
154 sort=F
155 }
156 \fi
157
158
159 % An indexed arbitrary binary operation such as the union or
160 % intersection of an infinite number of sets. The first argument is
161 % the operator symbol to use, such as \cup for a union. The second
162 % argument is the lower index, for example k=1. The third argument is
163 % the upper index, such as \infty. Finally the fourth argument should
164 % contain the things (e.g. indexed sets) to be operated on.
165 \newcommand*{\binopmany}[4]{
166 \mathchoice{ \underset{#2}{\overset{#3}{#1}}{#4} }
167 { {#1}_{#2}^{#3}{#4} }
168 { {#1}_{#2}^{#3}{#4} }
169 { {#1}_{#2}^{#3}{#4} }
170 }
171
172
173 % The four standard (UNLESS YOU'RE FRENCH) types of intervals along
174 % the real line.
175 \newcommand*{\intervaloo}[2]{ \left({#1},{#2}\right) } % open-open
176 \newcommand*{\intervaloc}[2]{ \left({#1},{#2}\right] } % open-closed
177 \newcommand*{\intervalco}[2]{ \left[{#1},{#2}\right) } % closed-open
178 \newcommand*{\intervalcc}[2]{ \left[{#1},{#2}\right] } % closed-closed
179
180
181 \fi