mjo-hurwitz.tex: new file for Hurwitz algebras (quaternions and octonions).
[mjotex.git] / mjo-set.tex
1 %
2 % Things that fit absolutely nowhere else.
3 %
4 \ifx\havemjoset\undefined
5 \def\havemjoset{1}
6
7 \input{mjo-common} % binopmany
8 \input{mjo-font} % amsfonts and \mathpzc
9
10 \ifx\operatorname\undefined
11 \usepackage{amsopn}
12 \fi
13
14 \ifx\bigtimes\undefined
15 \usepackage{mathtools}
16 \fi
17
18 % Create a set from the given elements
19 \newcommand*{\set}[1]{\left\lbrace{#1}\right\rbrace}
20
21 % A set comprehension, where the ``such that...'' bar is added
22 % automatically. The bar was chosen over a colon to avoid ambiguity
23 % with the L : V -> V notation. We can't leverage \set here because \middle
24 % needs \left and \right present.
25 \newcommand*{\setc}[2]{\left\lbrace{#1}\ \middle|\ {#2} \right\rbrace}
26
27
28 % The cardinality of a set. The |X| notation conflicts with the
29 % absolute value, and the meaning of card(X) is clear at once, so we
30 % prefer the latter.
31 \newcommand*{\card}[1]{ \operatorname{card}\of{{#1}} }
32
33
34 % The powerset of (that is, the set of all subsets of) its argument.
35 \newcommand*{\powerset}[1]{\mathpzc{P}\of{{#1}}}
36 \ifdefined\newglossaryentry
37 \newglossaryentry{powerset}{
38 name={\ensuremath{\powerset{X}}},
39 description={the ``powerset,'' or set of all subsets of $X$},
40 sort=p
41 }
42 \fi
43
44
45 %
46 % Basic set operations
47 %
48
49 % The union of its two arguments.
50 \newcommand*{\union}[2]{ {#1}\cup{#2} }
51
52 % A three-argument union.
53 \newcommand*{\unionthree}[3]{ \union{\union{#1}{#2}}{#3} }
54
55 % The indexed union of many things.
56 \newcommand*{\unionmany}[3]{ \binopmany{\bigcup}{#1}{#2}{#3} }
57
58 % The intersection of its two arguments.
59 \newcommand*{\intersect}[2]{ {#1}\cap{#2} }
60
61 % A three-argument intersection.
62 \newcommand*{\intersectthree}[3]{ \intersect{\intersect{#1}{#2}}{#3} }
63
64 % The indexed intersection of many things.
65 \newcommand*{\intersectmany}[3]{ \binopmany{\bigcap}{#1}{#2}{#3} }
66
67 % The Cartesian product of two things.
68 \newcommand*{\cartprod}[2]{ {#1}\times{#2} }
69
70 % The Cartesian product of three things.
71 \newcommand*{\cartprodthree}[3]{ \cartprod{{#1}}{\cartprod{{#2}}{{#3}}} }
72
73 % The indexed Cartesian product of many things.
74 \newcommand*{\cartprodmany}[3]{ \binopmany{\bigtimes}{#1}{#2}{#3} }
75
76
77 \fi