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}$.
+ $\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
+ are 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*}
+ %
\end{section}
\begin{section}{Cone}
% A three-argument intersection.
\providecommand*{\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
+% argument is the lower index, for example k=1. The third argument is
+% the upper index, such as \infty. Finally the fourth argument should
+% contain the things (e.g. indexed sets) to be operated on.
+\providecommand*{\binopmany}[4]{
+ \mathchoice
+ { \underset{#2}{\overset{#3}{#1}}{#4} }
+ { {#1}_{#2}^{#3}{#4} }
+ { {#1}_{#2}^{#3}{#4} }
+ { {#1}_{#2}^{#3}{#4} }
+}
+
+\providecommand*{\unionmany}[3]{ \binopmany{\cup}{#1}{#2}{#3} }
+\providecommand*{\intersectmany}[3]{ \binopmany{\cap}{#1}{#2}{#3} }