X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mjotex.git;a=blobdiff_plain;f=mjo-set.tex;h=4177f5aae68e5103624821d64b202a3f04ff7348;hp=6addd605537bcbb696e502347072613a25faa090;hb=HEAD;hpb=83458c3f65b80a7897ced0553804b38f4872fcb6 diff --git a/mjo-set.tex b/mjo-set.tex index 6addd60..66cd56b 100644 --- a/mjo-set.tex +++ b/mjo-set.tex @@ -4,15 +4,74 @@ \ifx\havemjoset\undefined \def\havemjoset{1} +\input{mjo-common} % binopmany +\input{mjo-font} % amsfonts and \mathpzc \ifx\operatorname\undefined \usepackage{amsopn} \fi +\ifx\bigtimes\undefined + \usepackage{mathtools} +\fi + +% Create a set from the given elements +\newcommand*{\set}[1]{\left\lbrace{#1}\right\rbrace} + +% A set comprehension, where the ``such that...'' bar is added +% automatically. The bar was chosen over a colon to avoid ambiguity +% with the L : V -> V notation. We can't leverage \set here because \middle +% needs \left and \right present. +\newcommand*{\setc}[2]{\left\lbrace{#1}\ \middle|\ {#2}\right\rbrace} + + % The cardinality of a set. The |X| notation conflicts with the % absolute value, and the meaning of card(X) is clear at once, so we % prefer the latter. -\newcommand*{\card}[1]{ \operatorname{card} \of{{#1}} } +\newcommand*{\card}[1]{ \operatorname{card}\of{{#1}} } + + +% The powerset of (that is, the set of all subsets of) its argument. +\newcommand*{\powerset}[1]{\mathpzc{P}\of{{#1}}} +\ifdefined\newglossaryentry + \newglossaryentry{powerset}{ + name={\ensuremath{\powerset{X}}}, + description={the ``powerset,'' or set of all subsets of $X$}, + sort=p + } +\fi + + +% +% Basic set operations +% + +% The union of its two arguments. +\newcommand*{\union}[2]{ {#1}\cup{#2} } + +% A three-argument union. +\newcommand*{\unionthree}[3]{ \union{\union{#1}{#2}}{#3} } + +% The indexed union of many things. +\newcommand*{\unionmany}[3]{ \binopmany{\bigcup}{#1}{#2}{#3} } + +% The intersection of its two arguments. +\newcommand*{\intersect}[2]{ {#1}\cap{#2} } + +% A three-argument intersection. +\newcommand*{\intersectthree}[3]{ \intersect{\intersect{#1}{#2}}{#3} } + +% The indexed intersection of many things. +\newcommand*{\intersectmany}[3]{ \binopmany{\bigcap}{#1}{#2}{#3} } + +% The Cartesian product of two things. +\newcommand*{\cartprod}[2]{ {#1}\times{#2} } + +% The Cartesian product of three things. +\newcommand*{\cartprodthree}[3]{ \cartprod{{#1}}{\cartprod{{#2}}{{#3}}} } + +% The indexed Cartesian product of many things. +\newcommand*{\cartprodmany}[3]{ \binopmany{\bigtimes}{#1}{#2}{#3} } \fi