From 4febc3ad82bc8ac73e660c484e105835feb1ed84 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 4 Nov 2019 09:26:24 -0500 Subject: [PATCH] mjo-set: adopt basic set operations from mjo-common. --- examples.tex | 55 +++++++++++++++++++++++++++----------------------- mjo-common.tex | 31 ++-------------------------- mjo-set.tex | 39 +++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 54 deletions(-) diff --git a/examples.tex b/examples.tex index e11815e..f922d65 100644 --- a/examples.tex +++ b/examples.tex @@ -100,39 +100,21 @@ % The factorial of the number $10$ is $\factorial{10}$. - The Cartesian product of two sets $A$ and $B$ is - $\cartprod{A}{B}$; if we take the product with $C$ as well, then - we obtain $\cartprodthree{A}{B}{C}$. The direct sum of $V$ and $W$ - is $\directsum{V}{W}$. Or three things, - $\directsumthree{U}{V}{W}$. How about more things? Like - $\directsummany{k=1}{\infty}{V_{k}} \ne - \cartprodmany{k=1}{\infty}{V_{k}}$. Those direct sums and - cartesian products adapt nicely to display equations: + The direct sum of $V$ and $W$ is $\directsum{V}{W}$. Or three + things, $\directsumthree{U}{V}{W}$. How about more things? Like + $\directsummany{k=1}{\infty}{V_{k}}$. Those direct sums + adapt nicely to display equations: % \begin{equation*} - \directsummany{k=1}{\infty}{V_{k}} \ne \cartprodmany{k=1}{\infty}{V_{k}}. + \directsummany{k=1}{\infty}{V_{k}} \ne \emptyset. \end{equation*} % Here are a few common tuple spaces that should not have a superscript when that superscript would be one: $\Nn[1]$, $\Zn[1]$, $\Qn[1]$, $\Rn[1]$, $\Cn[1]$. However, if the superscript is (say) two, then it appears: $\Nn[2]$, $\Zn[2]$, - $\Qn[2]$, $\Rn[2]$, $\Cn[2]$. - - We also have a few basic set operations, for example the union of - two or three sets: $\union{A}{B}$, $\unionthree{A}{B}{C}$. And of - course with union comes intersection: $\intersect{A}{B}$, - $\intersectthree{A}{B}{C}$. We can also take an arbitrary - (indexed) union and intersections of things, like - $\unionmany{k=1}{\infty}{A_{k}}$ or - $\intersectmany{k=1}{\infty}{B_{k}}$. The best part about those - is that they do the right thing in a display equation: - % - \begin{equation*} - \unionmany{k=1}{\infty}{A_{k}} = \intersectmany{k=1}{\infty}{B_{k}} - \end{equation*} - % - Finally, we have the four standard types of intervals in $\Rn[1]$, + $\Qn[2]$, $\Rn[2]$, $\Cn[2]$. Finally, we have the four standard + types of intervals in $\Rn[1]$, % \begin{align*} \intervaloo{a}{b} &= \setc{ x \in \Rn[1]}{ a < x < b },\\ @@ -310,6 +292,29 @@ \begin{section}{Set theory} The cardinality of the set $X \coloneqq \set{1,2,3}$ is $\card{X} = 3$, and its powerset is $\powerset{X}$. + + We also have a few basic set operations, for example the union of + two or three sets: $\union{A}{B}$, $\unionthree{A}{B}{C}$. And of + course with union comes intersection: $\intersect{A}{B}$, + $\intersectthree{A}{B}{C}$. The Cartesian product of two sets $A$ + and $B$ is there too: $\cartprod{A}{B}$. If we take the product + with $C$ as well, then we obtain $\cartprodthree{A}{B}{C}$. + + We can also take an arbitrary (indexed) union, intersection, or + Cartesian product of things, like + $\unionmany{k=1}{\infty}{A_{k}}$, + $\intersectmany{k=1}{\infty}{B_{k}}$, or + $\cartprodmany{k=1}{\infty}{C_{k}}$. The best part about those is + that they do the right thing in a display equation: + % + \begin{equation*} + \unionmany{k=1}{\infty}{A_{k}} + \ne + \intersectmany{k=1}{\infty}{B_{k}} + \ne + \cartprodmany{k=1}{\infty}{C_{k}}. + \end{equation*} + % \end{section} \begin{section}{Theorems} diff --git a/mjo-common.tex b/mjo-common.tex index 2785d73..0fcc2aa 100644 --- a/mjo-common.tex +++ b/mjo-common.tex @@ -8,10 +8,6 @@ \usepackage{amsfonts} \fi -\ifx\bigtimes\undefined - \usepackage{mathtools} -\fi - % Place the argument in matching left/right parentheses. \newcommand*{\of}[1]{ \left({#1}\right) } @@ -48,12 +44,6 @@ % A seven-tuple of things. \newcommand*{\septuple}[7]{ \left({#1},{#2},{#3},{#4},{#5},{#6},{#7}\right) } -% 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 direct sum of two things. \newcommand*{\directsum}[2]{ {#1}\oplus{#2} } @@ -139,22 +129,6 @@ \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 intersection of its two arguments. -\newcommand*{\intersect}[2]{ {#1}\cap{#2} } - -% A three-argument intersection. -\newcommand*{\intersectthree}[3]{ \intersect{\intersect{#1}{#2}}{#3} } - % An indexed arbitrary binary operation such as the union or % intersection of an infinite number of sets. The first argument is % the operator symbol to use, such as \cup for a union. The second @@ -168,10 +142,9 @@ { {#1}_{#2}^{#3}{#4} } } -\newcommand*{\intersectmany}[3]{ \binopmany{\bigcap}{#1}{#2}{#3} } -\newcommand*{\cartprodmany}[3]{ \binopmany{\bigtimes}{#1}{#2}{#3} } + \newcommand*{\directsummany}[3]{ \binopmany{\bigoplus}{#1}{#2}{#3} } -\newcommand*{\unionmany}[3]{ \binopmany{\bigcup}{#1}{#2}{#3} } + % The four standard (UNLESS YOU'RE FRENCH) types of intervals along % the real line. diff --git a/mjo-set.tex b/mjo-set.tex index 23ea691..2134e64 100644 --- a/mjo-set.tex +++ b/mjo-set.tex @@ -4,18 +4,25 @@ \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 + + % 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}} } +% The powerset of (that is, the set of all subsets of) its argument. \newcommand*{\powerset}[1]{\mathpzc{P}\of{{#1}}} \ifdefined\newglossaryentry \newglossaryentry{powerset}{ @@ -26,4 +33,36 @@ \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 -- 2.44.2