[Tex/LaTex] wedge and vee like triangle symbols used as operator

symbols

Is there a mathmode command for these two symbols:

enter image description here

enter image description here

?

Their size and usage is going to be those of \wedge and \vee so they should match.

Best Answer

Picture mode to the rescue!

\documentclass{article}
\usepackage{pict2e}

\makeatletter
\newcommand{\cwedge}{\mathbin{\mathpalette\do@cwedge\relax}}
\newcommand{\do@cwedge}[2]{%
    \sbox\z@{$#1\m@th\wedge$}%
    \dimen@=\ht\z@
    \unitlength=.005\wd\z@
    \count@=\dimen@ 
    \divide\count@\unitlength
    \begin{picture}(200,\count@)
    \roundjoin
    \polygon(25,0)(100,\count@)(175,0)
    \end{picture}%
}
\newcommand{\cvee}{\mathbin{\mathpalette\do@cvee\relax}}
\newcommand{\do@cvee}[2]{%
    \sbox\z@{$#1\m@th\vee$}%
    \dimen@=\ht\z@
    \unitlength=.005\wd\z@
    \count@=\dimen@ 
    \divide\count@\unitlength
    \begin{picture}(200,\count@)
    \roundjoin
    \polygon(25,\count@)(100,0)(175,\count@)
    \end{picture}%
}
\makeatother

\begin{document}

$A\wedge B\cwedge C_{\wedge\cwedge}$

$A\vee B \cvee C_{\vee\cvee}$

\end{document}

enter image description here

I measure the \vee and \wedge symbol (at the current size), then build the symbol with \polygon. Note that \vee and \wedge have small sidebearings, that I computed by eye to be 1/8 of the total width. (I checked the figure by superimposing the two symbols.)


Improved version

\documentclass{article}
\usepackage{pict2e}

\makeatletter
\newcommand{\cveewedge@measure}[2]{%
  \sbox\z@{$#1\m@th#2$}%
  \dimen@=1.05\ht\z@
  \unitlength=.005\wd\z@
  \count@=\dimen@ 
  \divide\count@\unitlength
  \ifx#1\scriptstyle
    \linethickness{0.8\@wholewidth}%
  \else
    \ifx#1\scriptscriptstyle
      \linethickness{0.65\@wholewidth}%
    \fi
  \fi
}

\newcommand{\cwedge}{\mathbin{\mathpalette\do@cwedge\relax}}
\newcommand{\do@cwedge}[2]{%
  \cveewedge@measure{#1}{\wedge}
  \begin{picture}(200,\count@)
  \roundjoin
  \polygon(25,0)(100,\count@)(175,0)
  \end{picture}%
}
\newcommand{\cvee}{\mathbin{\mathpalette\do@cvee\relax}}
\newcommand{\do@cvee}[2]{%
  \cveewedge@measure{#1}{\vee}
  \begin{picture}(200,\count@)
  \roundjoin
  \polygon(25,\count@)(100,0)(175,\count@)
  \end{picture}%
}
\makeatother

\begin{document}

$A\wedge B\cwedge C_{\wedge\cwedge_{\wedge\cwedge}}$

$A\vee B \cvee C_{\vee\cvee_{\vee\cvee}}$

\end{document}

enter image description here

Now working also with \boldmath and even \bm

\documentclass{article}
\usepackage{pict2e,pdftexcmds,bm}

\makeatletter
\newcommand{\cveewedge@measure}[2]{%
  \sbox\z@{$#1\m@th#2$}%
  \dimen@=1.05\ht\z@
  \unitlength=.005\wd\z@
  \count@=\dimen@ 
  \divide\count@\unitlength
  \ifx#1\scriptstyle
    \linethickness{0.8\@wholewidth}%
  \else
    \ifx#1\scriptscriptstyle
      \linethickness{0.65\@wholewidth}%
    \fi
  \fi
  \ifnum\pdf@strcmp{\math@version}{bold}=\z@
    \linethickness{1.5\@wholewidth}
  \fi
}

\newcommand{\cwedge}{\mathbin{\mathpalette\do@cwedge\relax}}
\newcommand{\do@cwedge}[2]{%
  \cveewedge@measure{#1}{\wedge}
  \begin{picture}(200,\count@)
  \roundjoin
  \polygon(25,0)(100,\count@)(175,0)
  \end{picture}%
}
\newcommand{\cvee}{\mathbin{\mathpalette\do@cvee\relax}}
\newcommand{\do@cvee}[2]{%
  \cveewedge@measure{#1}{\vee}
  \begin{picture}(200,\count@)
  \roundjoin
  \polygon(25,\count@)(100,0)(175,\count@)
  \end{picture}%
}
\makeatother

\begin{document}

$A\bm{\cwedge}B$

$A\wedge B\cwedge C_{\wedge\cwedge_{\wedge\cwedge}}$

$A\vee B \cvee C_{\vee\cvee_{\vee\cvee}}$

\boldmath

$A\wedge B\cwedge C_{\wedge\cwedge_{\wedge\cwedge}}$

$A\vee B \cvee C_{\vee\cvee_{\vee\cvee}}$

\end{document}

enter image description here