[Tex/LaTex] Writing the Existential Quantifier with Lower and Upper Limits

math-operatorspositioning

When I write $$\sum_{i=1}^{n} x_{i}$$ I obtain indices which are below and above the symbol. I want to write the existential quantifier with this same formatting, but when I try to do so, it appears as $$\exists_{i=1}^{n} x_{i}$$ with the indices written to the right of the symbol on the bottom and top, respectively. Is there any way to change this so that I have a big $\exists$ symbol where the $\Sigma$ is?

Best Answer

Here is a solution which is similar in spirit to Mico's earlier answer, condensed into a few lines of code. This requires amsmath.sty and scalefnt.sty. (Thanks to egreg for remarking on multiple improvements to the original answer; I've condensed it further based on his remarks.)

\newcommand\ScaleExists[1]{\vcenter{\hbox{\scalefont{#1}$\exists$}}}

\DeclareMathOperator*\bigexists{%
  \vphantom\sum
  \mathchoice{\ScaleExists{2}}{\ScaleExists{1.4}}{\ScaleExists{1}}{\ScaleExists{0.75}}}

The choices of font size were achieved by experimentation, and should be adequate for normalsized Computer Modern at 10pt to 12pt. Minor tweaking may be necessary for other typefaces. Because other font sizes (such as \Large and \footnotesize) are achieved by scaling up the size of normal characters, this should also work in other font sizes up to the limits of \scalefont to change the character size (up to about \LARGE at 11pt).

The parameters were chosen to achieve as similar an appearance as possible to the size and alignment of \sum in each context (displaystyle, textstyle, scriptstyle, and scriptscritstyle), with the same default behaviour of \limits and \nolimits in each context. In particular, the \vphantom\sum at the beginning of \bigexists is used to achieve precisely the same vertical spacing of the limits from the \exists symbol, as the limits would otherwise be closer to the symbol than they should be. Here is how it looks at 10pt:

Example presentation of <code>\bigexists</code> macro

This same code should be similarly generalized to any symbol of a similar height and depth (e.g. \forall).

It should be easy to tweak the results to obtain better tuning for other fonts or point sizes; additional refinements (or defining a custom character with \METAFONT) may be necessary to obtain a more robust solution.