]> gitweb.michael.orlitzky.com - mjotex.git/commitdiff
Add arbitrary indexed union/intersection (and examples) to mjo-common.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 21 Sep 2016 17:01:46 +0000 (13:01 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 21 Sep 2016 17:01:46 +0000 (13:01 -0400)
examples.tex
mjo-common.tex

index c87f59bdc792d78d7d5e88e0158510616bf63b56..ee0409699b5a5041fe833e90dac720b8223d04f1 100644 (file)
     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}
index b269417749dcf12738b968645a0083c7aa033ed2..f96528eac1acc710babe3ec790219d5babfab4bd 100644 (file)
 
 % 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} }