From 16277f17cbd1a3c797d13cc2724784eedc207f22 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 21 Sep 2016 13:01:46 -0400 Subject: [PATCH] Add arbitrary indexed union/intersection (and examples) to mjo-common. --- examples.tex | 11 ++++++++++- mjo-common.tex | 17 +++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/examples.tex b/examples.tex index c87f59b..ee04096 100644 --- a/examples.tex +++ b/examples.tex @@ -51,7 +51,16 @@ 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} diff --git a/mjo-common.tex b/mjo-common.tex index b269417..f96528e 100644 --- a/mjo-common.tex +++ b/mjo-common.tex @@ -88,3 +88,20 @@ % 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} } -- 2.44.2