4

When writing on paper or on blackboard, I usually denote an ascending union by \bigcup with an upwards arrow at the end of the right prong. Likewise, I denote a descending intersection by \bigcap with a downwards arrow at the end of the right prong. Are these symbols included in any standard packages? If not, how can I define them?

MWE:

\documentclass{article} 
\begin{document}
    \[
        (0,1)=\bigcup_n \left[\frac1n, 1-\frac1n\right]
    \]
\[
    \{0\}=\bigcap_n \left(-\frac1n,\frac1n\right)
\]

\end{document}

tomasz
  • 825

2 Answers2

6
\documentclass{article}
\usepackage{stackengine,amsmath}
\stackMath
\DeclareMathOperator*\dcap{{\stackinset{r}{-1.02ex}{c}{-1.9pt}{\downarrow}
  {\bigcap}\mkern2mu}}
\DeclareMathOperator*\acup{{\stackinset{r}{-1.02ex}{c}{1.9pt}{\uparrow}
  {\bigcup}\mkern2mu}}
\begin{document}
    \[
        (0,1)=\acup_n \left[\frac1n, 1-\frac1n\right]
    \]

    \[
        \{0\}=\dcap_n \left(-\frac1n,\frac1n\right)
    \]
\end{document}

enter image description here

If you were always to be using it in \displaystyle, one could adapt to it:

\documentclass{article}
\usepackage{stackengine,amsmath}
\stackMath
\DeclareMathOperator*\dcap{{\stackinset{r}{-1ex}{c}{-3.1pt}{\downarrow}
  {\displaystyle\bigcap}\mkern2mu}}
\DeclareMathOperator*\acup{{\stackinset{r}{-1ex}{c}{3.1pt}{\uparrow}
  {\displaystyle\bigcup}\mkern2mu}}
\begin{document}
    \[
        (0,1)=\acup_n \left[\frac1n, 1-\frac1n\right]
    \]
\[
    \{0\}=\dcap_n \left(-\frac1n,\frac1n\right)
\]

\end{document}

enter image description here

  • 1
    Very very nice....They are perfects. – Sebastiano Aug 19 '20 at 12:23
  • @tomasz It works for me...stackengine 2017/02/13 v4.01, using pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 2.9.7300 64-bit). See https://ctan.org/pkg/stackengine for latest version. – Steven B. Segletes Aug 19 '20 at 13:34
  • @StevenB.Segletes: I had a broken miktex installation. Fixing it now, should be okay. Still, I guess this is not going to work on arXiv for a while. :( – tomasz Aug 19 '20 at 13:54
4

The symbols look much more like U-turns on a road sign, to be honest.

\documentclass{article}
\usepackage{amsmath}

\makeatletter \DeclareRobustCommand{\ubigcup}{\DOTSB\mathop{,\ubigcup@,}\slimits@} \DeclareRobustCommand{\dbigcap}{\DOTSB\mathop{,\dbigcap@,}\slimits@}

\newcommand{\ubigcup@}{\mathpalette\ubigcup@@\relax} \newcommand{\ubigcup@@}[2]{% \begingroup \sbox\z@{$\m@th#1\bigcup$}% \sbox\tw@{$\m@th#1\uparrow$}% \copy\z@ \mkern-6.3mu\ifx#1\scriptscriptstyle\mkern0.3mu\fi \dimen@=\dimexpr\ht\z@-\ht\tw@ \ifx#1\displaystyle\else \ifx#1\scriptscriptstyle\advance\dimen@ 0.5pt\else \advance\dimen@ 1pt \fi\fi \raisebox{\dimen@}[0pt][0pt]{\rlap{\copy\tw@}}% \mkern6.3mu\ifx#1\scriptscriptstyle\mkern-0.3mu\fi \endgroup } \newcommand{\dbigcap@}{\mathpalette\dbigcap@@\relax} \newcommand{\dbigcap@@}[2]{% \begingroup \sbox\z@{$\m@th#1\bigcap$}% \sbox\tw@{$\m@th#1\downarrow$}% \copy\z@ \mkern-6.3mu\ifx#1\scriptscriptstyle\mkern0.3mu\fi \dimen@=\dimexpr\dp\z@-\dp\tw@ \ifx#1\displaystyle\else \ifx#1\scriptscriptstyle\advance\dimen@ 0.5pt\else \advance\dimen@ 1pt \fi\fi \raisebox{-\dimen@}[0pt][0pt]{\rlap{\copy\tw@}}% \mkern6.3mu\ifx#1\scriptscriptstyle\mkern-0.3mu\fi \endgroup }

\makeatother

\begin{document}

$\displaystyle\ubigcup_{n=1}^{\infty} A_n$ $\displaystyle\bigcup_{n=1}^{\infty} A_n$

$\displaystyle\bigcup_{n=1}^{\infty} A_n$

\bigskip

$\textstyle\ubigcup_{n=1}^{\infty} A_n$ $\scriptstyle\ubigcup_{n=1}^{\infty} A_n$ $\scriptscriptstyle\ubigcup_{n=1}^{\infty} A_n$

\bigskip

$\displaystyle\dbigcap_{n=1}^{\infty} B_n$ $\displaystyle\bigcap_{n=1}^{\infty} B_n$

$\displaystyle\bigcap_{n=1}^{\infty} B_n$

\bigskip

$\textstyle\dbigcap_{n=1}^{\infty} B_n$ $\scriptstyle\dbigcap_{n=1}^{\infty} B_n$ $\scriptscriptstyle\dbigcap_{n=1}^{\infty} B_n$

\end{document}

enter image description here

egreg
  • 1,121,712
  • Thanks! Small issue: in the displaystyle version, the alignment of $\infty$ and $n=1$ are a bit misaligned. – tomasz Aug 19 '20 at 16:26
  • @tomasz That's an optical effect due to the arrow. If you check the picture, you'll see that the infinity symbols are perfectly aligned with each other. To be honest, I'll restrain from using such symbols. – egreg Aug 19 '20 at 16:45
  • My point is that I think it would look better with the symbols aligned with the cup/cap, not the whole symbol including the arrow. – tomasz Aug 19 '20 at 16:54
  • 1
    @tomasz I don't understand: the subscripts and superscripts are in the same exact position with or without the arrow. – egreg Aug 19 '20 at 17:22
  • In the third line from the bottom, on the right, the middle of the $\infty$ sign is right above the top of the cap, and on the left, it is shifted towards the right. – tomasz Aug 19 '20 at 17:24
  • @tomasz OK, now I see. I'll fix in a few minutes. – egreg Aug 19 '20 at 17:27
  • Thanks a lot!!! – tomasz Aug 19 '20 at 18:07