]>
gitweb.michael.orlitzky.com - mjotex.git/blob - mjo-common.tex
2 % Only the most commonly-used macros. Needed by everything else.
5 % Place the argument in matching left/right parntheses.
6 \providecommand*
{\of}[1]{ \left(
{#1}\right)
}
8 % Group terms using parentheses.
9 \providecommand*
{\qty}[1]{ \left(
{#1}\right)
}
11 % Group terms using square brackets.
12 \providecommand*
{\sqty}[1]{ \left[{#1}\right] }
14 % Create a set from the given elements
15 \providecommand*
{\set}[1]{\left\lbrace{#1}\right\rbrace}
17 % A set comprehension, where the ``such that...'' bar is added
18 % automatically. The bar was chosen over a colon to avoid ambiguity
19 % with the L : V -> V notation. We can't leverage \set here because \middle
20 % needs \left and \right present.
21 \providecommand*
{\setc}[2]{\left\lbrace{#1}\
\middle|\
{#2} \right\rbrace}
24 \providecommand*
{\pair}[2]{ \left(
{#1},
{#2}\right)
}
27 \providecommand*
{\triple}[3]{ \left(
{#1},
{#2},
{#3}\right)
}
29 % The Cartesian product of two things.
30 \providecommand*
{\cartprod}[2]{ {#1}\times{#2} }
32 % The Cartesian product of three things.
33 \providecommand*
{\cartprodthree}[3]{ \cartprod{{#1}}{\cartprod{{#2}}{{#3}}} }
35 % The direct sum of two things.
36 \providecommand*
{\directsum}[2]{ {#1}\oplus{#2} }
38 % The factorial operator.
39 \providecommand*
{\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 \providecommand*
{\Nn}[1][n
]{
52 \mathbb{N
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
55 % The integral n-space, Z x Z x Z x ... x Z.
56 \providecommand*
{\Zn}[1][n
]{
57 \mathbb{Z
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
60 % The rational n-space, Q x Q x Q x ... x Q.
61 \providecommand*
{\Qn}[1][n
]{
62 \mathbb{Q
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
65 % The real n-space, R x R x R x ... x R.
66 \providecommand*
{\Rn}[1][n
]{
67 \mathbb{R
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
70 % The complex n-space, C x C x C x ... x C.
71 \providecommand*
{\Cn}[1][n
]{
72 \mathbb{C
}\if\detokenize{#1}\detokenize{1}{}\else^
{#1}\fi
77 % Basic set operations
80 % The union of its two arguments.
81 \providecommand*
{\union}[2]{ {#1} \cup {#2} }
83 % A three-argument union.
84 \providecommand*
{\unionthree}[3]{ \union{\union{#1}{#2}}{#3} }
86 % The intersection of its two arguments.
87 \providecommand*
{\intersect}[2]{ {#1} \cap {#2} }
89 % A three-argument intersection.
90 \providecommand*
{\intersectthree}[3]{ \intersect{\intersect{#1}{#2}}{#3} }
92 % An indexed arbitrary binary operation such as the union or
93 % intersection of an infinite number of sets. The first argument is
94 % the operator symbol to use, such as \cup for a union. The second
95 % argument is the lower index, for example k=1. The third argument is
96 % the upper index, such as \infty. Finally the fourth argument should
97 % contain the things (e.g. indexed sets) to be operated on.
98 \providecommand*
{\binopmany}[4]{
100 { \underset{#2}{\overset{#3}{#1}}{#4} }
101 { {#1}_
{#2}^
{#3}{#4} }
102 { {#1}_
{#2}^
{#3}{#4} }
103 { {#1}_
{#2}^
{#3}{#4} }
106 \providecommand*
{\unionmany}[3]{ \binopmany{\cup}{#1}{#2}{#3} }
107 \providecommand*
{\intersectmany}[3]{ \binopmany{\cap}{#1}{#2}{#3} }