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 factorial operator.
39 \newcommand*
{\factorial}[1]{ {#1}!
}
44 % All of the product spaces (for example, R^n) that follow default to
45 % an exponent of ``n'', but that exponent can be changed by providing
46 % it as an optional argument. If the exponent given is ``1'', then it
47 % will be omitted entirely.
50 % The natural n-space, N x N x N x ... x N.
51 \newcommand*
{\Nn}[1][n
]{
52 \mathbb{N
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
55 \ifdefined\newglossaryentry
57 name=
{\ensuremath{\Nn[1]}},
58 description=
{the set of natural numbers
},
63 % The integral n-space, Z x Z x Z x ... x Z.
64 \newcommand*
{\Zn}[1][n
]{
65 \mathbb{Z
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
68 \ifdefined\newglossaryentry
70 name=
{\ensuremath{\Zn[1]}},
71 description=
{the ring of integers
},
76 % The rational n-space, Q x Q x Q x ... x Q.
77 \newcommand*
{\Qn}[1][n
]{
78 \mathbb{Q
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
81 \ifdefined\newglossaryentry
83 name=
{\ensuremath{\Qn[1]}},
84 description=
{the field of rational numbers
},
89 % The real n-space, R x R x R x ... x R.
90 \newcommand*
{\Rn}[1][n
]{
91 \mathbb{R
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
94 \ifdefined\newglossaryentry
96 name=
{\ensuremath{\Rn[1]}},
97 description=
{the field of real numbers
},
103 % The complex n-space, C x C x C x ... x C.
104 \newcommand*
{\Cn}[1][n
]{
105 \mathbb{C
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
108 \ifdefined\newglossaryentry
109 \newglossaryentry{C
}{
110 name=
{\ensuremath{\Cn[1]}},
111 description=
{the field of complex numbers
},
117 % An indexed arbitrary binary operation such as the union or
118 % intersection of an infinite number of sets. The first argument is
119 % the operator symbol to use, such as \cup for a union. The second
120 % argument is the lower index, for example k=1. The third argument is
121 % the upper index, such as \infty. Finally the fourth argument should
122 % contain the things (e.g. indexed sets) to be operated on.
123 \newcommand*
{\binopmany}[4]{
124 \mathchoice{ \underset{#2}{\overset{#3}{#1}}{#4} }
125 { {#1}_
{#2}^
{#3}{#4} }
126 { {#1}_
{#2}^
{#3}{#4} }
127 { {#1}_
{#2}^
{#3}{#4} }
131 % The four standard (UNLESS YOU'RE FRENCH) types of intervals along
133 \newcommand*
{\intervaloo}[2]{ \left(
{#1},
{#2}\right)
} % open-open
134 \newcommand*
{\intervaloc}[2]{ \left(
{#1},
{#2}\right] } % open-closed
135 \newcommand*
{\intervalco}[2]{ \left[{#1},
{#2}\right)
} % closed-open
136 \newcommand*
{\intervalcc}[2]{ \left[{#1},
{#2}\right] } % closed-closed