2

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}
  • I hope to remember well. IMHO the symbols with the arrows not exist. I think that they should be created. – Sebastiano Aug 19 at 11:51
  • 1
    Unrelated but do not use the minimal class for MWEs: despite the name it is not suited. Use article instead. – campa Aug 19 at 12:02
  • 1
  • @campa: Still, wouldn't standalone be better than article? Or does it have similar problems? – tomasz Aug 19 at 14:11
  • standalone loads article (unless you choose a different class with the appropriate option). – campa Aug 19 at 14:14
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

| improve this answer | |
  • 1
    Very very nice....They are perfects. – Sebastiano Aug 19 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 ctan.org/pkg/stackengine for latest version. – Steven B. Segletes Aug 19 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 at 13:54
3

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

| improve this answer | |
  • Thanks! Small issue: in the displaystyle version, the alignment of $\infty$ and $n=1$ are a bit misaligned. – tomasz Aug 19 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 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 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 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 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.