]>
gitweb.michael.orlitzky.com - mjotex.git/blob - mjo-common.tex
aa7427fc96dbe46a0582a83de7c7e494e0a78f59
2 % Only the most commonly-used macros. Needed by everything else.
4 \ifx\havemjocommon\undefined
12 \ifx\bigtimes\undefined
13 \usepackage{mathtools
}
16 % Place the argument in matching left/right parentheses.
17 \newcommand*
{\of}[1]{ \left(
{#1}\right)
}
19 % Group terms using parentheses.
20 \newcommand*
{\qty}[1]{ \left(
{#1}\right)
}
22 % Group terms using square brackets.
23 \newcommand*
{\sqty}[1]{ \left[{#1}\right] }
25 % Create a set from the given elements
26 \newcommand*
{\set}[1]{\left\lbrace{#1}\right\rbrace}
28 % A set comprehension, where the ``such that...'' bar is added
29 % automatically. The bar was chosen over a colon to avoid ambiguity
30 % with the L : V -> V notation. We can't leverage \set here because \middle
31 % needs \left and \right present.
32 \newcommand*
{\setc}[2]{\left\lbrace{#1}\
\middle|\
{#2} \right\rbrace}
35 \newcommand*
{\pair}[2]{ \left(
{#1},
{#2}\right)
}
38 \newcommand*
{\triple}[3]{ \left(
{#1},
{#2},
{#3}\right)
}
40 % The Cartesian product of two things.
41 \newcommand*
{\cartprod}[2]{ {#1}\times{#2} }
43 % The Cartesian product of three things.
44 \newcommand*
{\cartprodthree}[3]{ \cartprod{{#1}}{\cartprod{{#2}}{{#3}}} }
46 % The direct sum of two things.
47 \newcommand*
{\directsum}[2]{ {#1}\oplus{#2} }
49 % The direct sum of three things.
50 \newcommand*
{\directsumthree}[3]{ \directsum{#1}{\directsum{#2}{#3}} }
52 % The factorial operator.
53 \newcommand*
{\factorial}[1]{ {#1}!
}
58 % All of the product spaces (for example, R^n) that follow default to
59 % an exponent of ``n'', but that exponent can be changed by providing
60 % it as an optional argument. If the exponent given is ``1'', then it
61 % will be omitted entirely.
64 % The natural n-space, N x N x N x ... x N.
65 \newcommand*
{\Nn}[1][n
]{
66 \mathbb{N
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
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 % The rational n-space, Q x Q x Q x ... x Q.
75 \newcommand*
{\Qn}[1][n
]{
76 \mathbb{Q
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
79 % The real n-space, R x R x R x ... x R.
80 \newcommand*
{\Rn}[1][n
]{
81 \mathbb{R
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
84 % The complex n-space, C x C x C x ... x C.
85 \newcommand*
{\Cn}[1][n
]{
86 \mathbb{C
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
89 % The space of real symmetric n-by-n matrices.
90 \newcommand*
{\Sn}[1][n
]{
91 \mathcal{S
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
94 % The space of complex Hermitian n-by-n matrices.
95 \newcommand*
{\Hn}[1][n
]{
96 \mathcal{H
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
100 % Basic set operations
103 % The union of its two arguments.
104 \newcommand*
{\union}[2]{ {#1}\cup{#2} }
106 % A three-argument union.
107 \newcommand*
{\unionthree}[3]{ \union{\union{#1}{#2}}{#3} }
109 % The intersection of its two arguments.
110 \newcommand*
{\intersect}[2]{ {#1}\cap{#2} }
112 % A three-argument intersection.
113 \newcommand*
{\intersectthree}[3]{ \intersect{\intersect{#1}{#2}}{#3} }
115 % An indexed arbitrary binary operation such as the union or
116 % intersection of an infinite number of sets. The first argument is
117 % the operator symbol to use, such as \cup for a union. The second
118 % argument is the lower index, for example k=1. The third argument is
119 % the upper index, such as \infty. Finally the fourth argument should
120 % contain the things (e.g. indexed sets) to be operated on.
121 \newcommand*
{\binopmany}[4]{
122 \mathchoice{ \underset{#2}{\overset{#3}{#1}}{#4} }
123 { {#1}_
{#2}^
{#3}{#4} }
124 { {#1}_
{#2}^
{#3}{#4} }
125 { {#1}_
{#2}^
{#3}{#4} }
128 \newcommand*
{\intersectmany}[3]{ \binopmany{\bigcap}{#1}{#2}{#3} }
129 \newcommand*
{\cartprodmany}[3]{ \binopmany{\bigtimes}{#1}{#2}{#3} }
130 \newcommand*
{\directsummany}[3]{ \binopmany{\bigoplus}{#1}{#2}{#3} }
131 \newcommand*
{\unionmany}[3]{ \binopmany{\bigcup}{#1}{#2}{#3} }
134 % The four standard (UNLESS YOU'RE FRENCH) types of intervals along
136 \newcommand*
{\intervaloo}[2]{ \left(
{#1},
{#2}\right)
} % open-open
137 \newcommand*
{\intervaloc}[2]{ \left(
{#1},
{#2}\right] } % open-closed
138 \newcommand*
{\intervalco}[2]{ \left[{#1},
{#2}\right)
} % closed-open
139 \newcommand*
{\intervalcc}[2]{ \left[{#1},
{#2}\right] } % closed-closed