[Tex/LaTex] nother symbol that is slightly different from \forall (likewise for \exists)

amssymbmath-modemath-operatorssymbols

What

Is there a symbol that is slightly different from $\forall$ (e.g. having a second line from upper left to lower middle)? It should obviously mean "for all" but be sufficiently different to not be mistaken for $\forall$.

Similarly, is there a slightly different symbol than $\exists$ (e.g. with two lines downward)?

Why

I need two different symbols to differentiate whether I'm in some formal logic or on the meta level (talking about the logic). Currently I use "f.a." and "ex.", but I think it's easier to grasp complex descriptions if quantifiers stand out.

Where

I looked in amssymb and http://www.math.union.edu/~dpvc/jsmath/symbols/welcome.html, but didn't find a suitable symbol.

Best Answer

The example defines \eexists and \fforall with the additional lines as requested in the question.

  • \eexists: The symbol \eexists is composed of \exists and the vertical line | to get a line with a matching line thickness. The vertical line is scaled to the right height. This vertical scaling does not change the horizontal line width. Finally the line is moved to the right position.

  • \fforall: The trick with the vertical line cannot be uses, because the angle is not known exactly. Also the angle depends on the font size. The angle can be estimated from the width and height of the symbol. For this symbol TikZ is used and the line width is guessed from the width of \forall.

Update:

  • Decreased distance between the two lines.
  • I have removed the case for \scriptscriptstyle, because the symbols have larger side bearings that would need to be compensated. But probably the symbols are not needed at such sizes anyway.
  • Of course, the "magic numbers" depend on the used font. A different font might need different settings.

Example file:

\documentclass{article}
\usepackage{graphicx}
\usepackage{tikz}

\makeatletter
\newcommand*{\eexists}{%
  {\mathpalette\eexistsAux{}}%
}
\newcommand*{\eexistsAux}[2]{%
  \exists
  \sbox0{$\m@th#1\exists$}%
  \sbox2{\raisebox{\depth}{$\m@th#1|$}}%
  \kern-.5\wd2 %
  \resizebox{\width}{\ht0}{\copy2}%
  \kern-.25\wd2 %
}
\newcommand*{\fforall}{%
  {\mathpalette\fforallAux{}}%
}
\newcommand*{\fforallAuxx}[1]{%
  \sbox0{$\m@th#1\forall$}%
  \sbox2{%
    \rlap{%
      \raisebox{\depth}{$\m@th#1\backslash$}%
    }%
    \kern\ht0 %
  }%
  \sbox2{\resizebox{\ht2}{\height}{\copy2}}%
  \sbox2{\resizebox{!}{\ht0}{\copy2}}%
  \wd2=0pt %
  \copy2
  \forall
}
\newsavebox\forallBox
\newdimen\forallLineWidth
\newdimen\forallSep
\newcommand*{\fforallAux}[1]{%
  \sbox\forallBox{$\m@th#1\forall$}%
  \setlength{\forallLineWidth}{.06\wd\forallBox}%
  \setlength{\forallSep}{.09\wd\forallBox}%
  \tikz[
    inner sep=0pt,
    line cap=round,
    line width=\forallLineWidth,
  ]
  \draw
    (0,0) node (A) {\copy\forallBox}
    (A.south) ++(-\forallSep-\forallLineWidth,.4\forallLineWidth)
    coordinate (A1)
    (A.north west) ++(-\forallSep,-\forallLineWidth)
    coordinate (A2)
    (A1) -- (A2)
  ;%
}
\makeatother   

\begin{document}
\setlength{\fboxsep}{0pt}
\renewcommand*{\arraystretch}{1.5}
\begin{tabular}{cc}
  \fbox{$\forall$} & \fbox{$\exists$}\\
  \fbox{$\fforall$} & \fbox{$\eexists$}\\
  $\forall^\forall$ & $\exists^\exists$ \\
  $\fforall^\fforall$ & $\eexists^\eexists$\\
\end{tabular}
\end{document}

Result

Related Question