]> gitweb.michael.orlitzky.com - mjotex.git/blob - mjo-set.tex
mjo-set: adopt basic set operations from mjo-common.
[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
19 % The cardinality of a set. The |X| notation conflicts with the
20 % absolute value, and the meaning of card(X) is clear at once, so we
21 % prefer the latter.
22 \newcommand*{\card}[1]{ \operatorname{card}\of{{#1}} }
23
24
25 % The powerset of (that is, the set of all subsets of) its argument.
26 \newcommand*{\powerset}[1]{\mathpzc{P}\of{{#1}}}
27 \ifdefined\newglossaryentry
28 \newglossaryentry{powerset}{
29 name={\ensuremath{\powerset{X}}},
30 description={the ``powerset,'' or set of all subsets of $X$},
31 sort=p
32 }
33 \fi
34
35
36 %
37 % Basic set operations
38 %
39
40 % The union of its two arguments.
41 \newcommand*{\union}[2]{ {#1}\cup{#2} }
42
43 % A three-argument union.
44 \newcommand*{\unionthree}[3]{ \union{\union{#1}{#2}}{#3} }
45
46 % The indexed union of many things.
47 \newcommand*{\unionmany}[3]{ \binopmany{\bigcup}{#1}{#2}{#3} }
48
49 % The intersection of its two arguments.
50 \newcommand*{\intersect}[2]{ {#1}\cap{#2} }
51
52 % A three-argument intersection.
53 \newcommand*{\intersectthree}[3]{ \intersect{\intersect{#1}{#2}}{#3} }
54
55 % The indexed intersection of many things.
56 \newcommand*{\intersectmany}[3]{ \binopmany{\bigcap}{#1}{#2}{#3} }
57
58 % The Cartesian product of two things.
59 \newcommand*{\cartprod}[2]{ {#1}\times{#2} }
60
61 % The Cartesian product of three things.
62 \newcommand*{\cartprodthree}[3]{ \cartprod{{#1}}{\cartprod{{#2}}{{#3}}} }
63
64 % The indexed Cartesian product of many things.
65 \newcommand*{\cartprodmany}[3]{ \binopmany{\bigtimes}{#1}{#2}{#3} }
66
67
68 \fi