[Tex/LaTex] the difference between \lnot and \neg

math-modesymbols

As the title states, what is the difference between \lnot and \neg? The output seems the same to me but I want to know if they are the exact same thing, both semantically and as code definition.

\documentclass[border=1pt]{standalone}
\begin{document}
\(\lnot a \, \neg a\)
\end{document}

example

Best Answer

For your disappointment, none. They are the same.

If you run

\documentclass{standalone}
\begin{document}
\(\show\lnot a \, \show\neg a\)
\end{document}

you'll get:

> \lnot=\mathchar"23A.
l.3 \(\show\lnot
                 a \, \show\neg a\)
? 
> \neg=\mathchar"23A.
l.3 \(\show\lnot a \, \show\neg
                                a\)

which shows that both are \mathchar"23A.


In fact, in plain.tex one finds:

\mathchardef\neg="023A \let\lnot=\neg

The same appears for other symbols as well:

\mathchardef\wedge="225E \let\land=\wedge
\mathchardef\vee="225F \let\lor=\vee
\def\neq{\not=} \let\ne=\neq
\mathchardef\leq="3214 \let\le=\leq
\mathchardef\geq="3215 \let\ge=\geq
\mathchardef\ni="3233 \let\owns=\ni
\mathchardef\leftarrow="3220 \let\gets=\leftarrow
\mathchardef\rightarrow="3221 \let\to=\rightarrow

My guess for the reason of this is that in different fields of applications these symbols get different names, so they have different names to make their utilization more intuitive.


In LaTeX, what happens is basically the same, but with a few more bells and whistles:

\DeclareMathSymbol{\neg}{\mathord}{symbols}{"3A}
    \let\lnot=\neg

This can be found in fontmath.ltx (loaded by latex.ltx).