Horizontal lines in \sqcup and \sqcap

I have a paper which uses the following operators for widening and narrowing respectively:

How can I re-produce these operators for my own work? I presume, I could just draw a horizontal line within \sqcup and \sqcap, but how?

Alternatively, do you know any package that provides these operators? I tried http://detexify.kirelabs.org/ and searched the internet, but found none.

• IIRC, there must be a duplicate somewhere (but hiding from my eyes for now). – user11232 Sep 30 '14 at 15:33
• @HarishKumar -- i think this is the one you are thinking of: Create symbol out of given symbols with same line width (but what does it mean? if a published citation can be found, it can be submitted to unicode for consideration.) – barbara beeton Sep 30 '14 at 16:04
• @barbarabeeton These operators are used in CS denote widening and narrowing in abstract interpretation. They are rather unusual, though, Nabla and Delta are more common. However, I prefer them since they nicely match the standard join/meet operators for lattices, which are closely related to widening/narrowing. – lunaryorn Oct 1 '14 at 9:29
• @lunaryorn -- do you know of any published article or book (an arXiv example should suffice) where these are used in such a context? that would be compelling evidence for unicode acceptance; i am (still) the designated representative from the stix project to unicode, and will be happy to convey the request provided i can meet their requirement for a published reference. – barbara beeton Oct 1 '14 at 12:27

Here's a version that works across math styles. EDITED to keep the same vertical height as the original elements

\documentclass{article}
\usepackage{scalerel}
\def\widen{\mathrel{\ThisStyle{\stretchrel*{\ooalign{%
\raise0.2\LMex\hbox{$\SavedStyle\sqcup$}\cr%
\raise-0.2\LMex\hbox{$\SavedStyle\sqcup$}}}{\sqcup}}}}
\def\narrow{\mathrel{\ThisStyle{\stretchrel*{\ooalign{%
\raise0.2\LMex\hbox{$\SavedStyle\sqcap$}\cr%
\raise-0.2\LMex\hbox{$\SavedStyle\sqcap$}}}{\sqcap}}}}
\begin{document}
$a \widen b \quad\scriptstyle a \widen b \quad\scriptscriptstyle a \widen b$

$a \narrow b \quad\scriptstyle a \narrow b \quad\scriptscriptstyle a \narrow b$
\end{document}

• Nice, thank you. Is there a way, though, to make this new operator have the same dimensions as the standard \sqcup and \sqcap? – lunaryorn Sep 30 '14 at 18:05
• @lunaryorn Please see revision to see if that suits. – Steven B. Segletes Sep 30 '14 at 18:20
• Awesome, it absolutely does. You saved my life! :) – lunaryorn Sep 30 '14 at 18:25