2 % Only the most commonly-used macros. Needed by everything else.
4 \ifx\havemjocommon\undefined
11 % Place the argument in matching left/right parentheses.
12 \newcommand*
{\of}[1]{ \left(
{#1}\right)
}
14 % Group terms using parentheses.
15 \newcommand*
{\qty}[1]{ \left(
{#1}\right)
}
17 % Group terms using square brackets.
18 \newcommand*
{\sqty}[1]{ \left[{#1}\right] }
21 \newcommand*
{\pair}[2]{ \left(
{#1},
{#2}\right)
}
24 \newcommand*
{\triple}[3]{ \left(
{#1},
{#2},
{#3}\right)
}
26 % A four-tuple of things.
27 \newcommand*
{\quadruple}[4]{ \left(
{#1},
{#2},
{#3},
{#4}\right)
}
29 % A five-tuple of things.
30 \newcommand*
{\quintuple}[5]{ \left(
{#1},
{#2},
{#3},
{#4},
{#5}\right)
}
32 % A six-tuple of things.
33 \newcommand*
{\sextuple}[6]{ \left(
{#1},
{#2},
{#3},
{#4},
{#5},
{#6}\right)
}
35 % A seven-tuple of things.
36 \newcommand*
{\septuple}[7]{ \left(
{#1},
{#2},
{#3},
{#4},
{#5},
{#6},
{#7}\right)
}
38 % The direct sum of two things.
39 \newcommand*
{\directsum}[2]{ {#1}\oplus{#2} }
41 % The direct sum of three things.
42 \newcommand*
{\directsumthree}[3]{ \directsum{#1}{\directsum{#2}{#3}} }
44 % The factorial operator.
45 \newcommand*
{\factorial}[1]{ {#1}!
}
50 % All of the product spaces (for example, R^n) that follow default to
51 % an exponent of ``n'', but that exponent can be changed by providing
52 % it as an optional argument. If the exponent given is ``1'', then it
53 % will be omitted entirely.
56 % The natural n-space, N x N x N x ... x N.
57 \newcommand*
{\Nn}[1][n
]{
58 \mathbb{N
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
61 \ifdefined\newglossaryentry
63 name=
{\ensuremath{\Nn[1]}},
64 description=
{the set of natural numbers
},
69 % The integral n-space, Z x Z x Z x ... x Z.
70 \newcommand*
{\Zn}[1][n
]{
71 \mathbb{Z
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
74 \ifdefined\newglossaryentry
76 name=
{\ensuremath{\Zn[1]}},
77 description=
{the ring of integers
},
82 % The rational n-space, Q x Q x Q x ... x Q.
83 \newcommand*
{\Qn}[1][n
]{
84 \mathbb{Q
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
87 \ifdefined\newglossaryentry
89 name=
{\ensuremath{\Qn[1]}},
90 description=
{the field of rational numbers
},
95 % The real n-space, R x R x R x ... x R.
96 \newcommand*
{\Rn}[1][n
]{
97 \mathbb{R
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
100 \ifdefined\newglossaryentry
101 \newglossaryentry{R
}{
102 name=
{\ensuremath{\Rn[1]}},
103 description=
{the field of real numbers
},
109 % The complex n-space, C x C x C x ... x C.
110 \newcommand*
{\Cn}[1][n
]{
111 \mathbb{C
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
114 \ifdefined\newglossaryentry
115 \newglossaryentry{C
}{
116 name=
{\ensuremath{\Cn[1]}},
117 description=
{the field of complex numbers
},
123 % An indexed arbitrary binary operation such as the union or
124 % intersection of an infinite number of sets. The first argument is
125 % the operator symbol to use, such as \cup for a union. The second
126 % argument is the lower index, for example k=1. The third argument is
127 % the upper index, such as \infty. Finally the fourth argument should
128 % contain the things (e.g. indexed sets) to be operated on.
129 \newcommand*
{\binopmany}[4]{
130 \mathchoice{ \underset{#2}{\overset{#3}{#1}}{#4} }
131 { {#1}_
{#2}^
{#3}{#4} }
132 { {#1}_
{#2}^
{#3}{#4} }
133 { {#1}_
{#2}^
{#3}{#4} }
137 \newcommand*
{\directsummany}[3]{ \binopmany{\bigoplus}{#1}{#2}{#3} }
140 % The four standard (UNLESS YOU'RE FRENCH) types of intervals along
142 \newcommand*
{\intervaloo}[2]{ \left(
{#1},
{#2}\right)
} % open-open
143 \newcommand*
{\intervaloc}[2]{ \left(
{#1},
{#2}\right] } % open-closed
144 \newcommand*
{\intervalco}[2]{ \left[{#1},
{#2}\right)
} % closed-open
145 \newcommand*
{\intervalcc}[2]{ \left[{#1},
{#2}\right] } % closed-closed