# How to create a custom negation symbol with double lines

I'm trying to create a negation symbol with two upper lines, like this example I found in a paper (regular negation for comparison):

Detexify didn't know the symbol and I even looked through the comprehensive symbol list, but wasn't able to find anything. Any help on how to find/create this symbol would be greatly appreciated!

• By the way, make sure you have the cm-super fonts installed. It looks as if your example is falling back to pixelated METAFONT. – Davislor Mar 28 at 4:29

You can superimpose \neg to a clipped (and lowered) version thereof.

\documentclass{article}
\usepackage{trimclip}

\makeatletter
\newcommand{\dneg}{\mathord{\vphantom{\neg}\mathpalette\dneg@\relax}}
\newcommand{\dneg@}[2]{%
\ooalign{%
$\m@th#1\neg$\cr
\raisebox{0.8\height}{\clipbox{0pt {0.6\height} 0pt 0pt}{$\m@th#1\neg$}}\cr
}%
}
\makeatother

\begin{document}

$\neg\varphi$ $\dneg\varphi$

$\dneg\varphi\scriptstyle\dneg\varphi\scriptscriptstyle\dneg\varphi$

\Large
$\dneg\varphi\scriptstyle\dneg\varphi\scriptscriptstyle\dneg\varphi$

\end{document}


\documentclass{article}
\usepackage{amsmath}
\makeatletter
% based on https://tex.stackexchange.com/a/110981
\providecommand*{\dneg}{%
\mathord{%
\mathpalette\@dneg{}%
}%
}
\newcommand*{\@dneg}[2]{%
\ooalign{%
$\m@th#1\neg$\cr
\sbox0{$#1\neg$}%
\dimen@=0.4\ht0%
\hidewidth\raise\dimen@\box0\hidewidth
}%
}
\makeatother
\begin{document}
\parindent0pt
$\neg$ $\dneg$\par
\bigskip
{\large $\neg$ $\dneg$}\par
\bigskip
{\Huge $\neg$ $\dneg$}\par
\end{document}


Edit: changed to \mathord, see comment by Bernard.

• Isn't \neg a mathord? – Bernard Mar 27 at 20:55
• According to the comprehensive list of symbols \invneg is a binary relation, so it would be odd if \neg was different, wouldn't it? – user238301 Mar 27 at 20:58
• That's strange. In the list of mathabx glyphs,\neg is mathord (it is a unary operator, as far as I know). – Bernard Mar 27 at 21:01
• Please have look at p. 51 of symbols-a4.pdf. (I am not saying that you are wrong but if you are right then symbols-a4.pdf has an issue. Anyway, this is a simple change in the above code.) – user238301 Mar 27 at 21:16
• By curiosity, I also checked with MnSymbol, which has a different author, and \neg is also mathord. This being said, I have have no idea whatt \invneg is used for. – Bernard Mar 27 at 21:31

\documentclass[a4paper,12pt]{article}
\newcommand{\rrc}{\mathrel{\rotatebox{90}{$\rrfloor$}}}
\newcommand{\rfl}{\mathrel{\rotatebox{90}{$\rfloor$}}}
$\rrc\varphi$; $\rfl \varphi$.
`