(resolved) A conditional independence symbol that looks good with \mid?

Warning! This question is based on a mistake! Do not waste time on it!

Please note: this question arose from a mistake that I made. There is no need for an answer. The bounty will most likely not be awarded to anyone. I would delete it but I can't since it has (very good) answers. I am extremely sorry for the time people have put into writing answers as a result of my mistake.

I had made a file to test the various ways of writing a conditional independence symbol in LaTeX. Since one of those involves including the MnSymbol package, I had included that package. But this package redefines some of the math symbols, and \perp in particular, which made me think that all the solutions looked kind of stupid. But in fact they do not. The "usual" way of writing a conditional independence symbol, by doing \perp\!\!\!\perp, looks just fine as long as you don't include MnSymbol.

Below is my original question text, for reference.

I would like to typeset some expressions involving conditional independence. Here is an example of what I'm aiming for (from Judea Pearl's classic text on causality): In this question and its answer, three ways to generate this symbol are given. The first two are based on \perp:

\newcommand\ci{\perp\!\!\!\perp}

\newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}} % symbols-a4, p.106
\def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}

The third is the command \upmodels in the MnSymbol package. Here is what the three methods look like in practice: To my eyes none of these look great. The problem is that \perp and \upmodels are designed for use in mathematical logic expressions, and haven't been designed to look harmonious with the \mid character. The top of the vertical lines is not level with the top of the \mid character, and I think this makes the symbol look too small.

I tried making my own conditional independence sign using |s and an underline, like this: (I'm sure this is not the best way to get the height of the underline right, but it seems to work.)

\newcommand\bigCI{\mathop{\underline{\raisebox{0pt}[0pt][1pt]{$\;||\;$}}}} But it looks silly having it extend so far below the baseline. So my question is, how can I achieve something like this, but where the horizontal line is level with the letters' baseline (or possibly slightly below it), and the top of the vertical lines are level with the top of the \mid?

It's desirable to avoid extra packages as much as possible, because I hope a good solution to this can become somewhat "standard", at least for those using the Computer Modern fonts. If it's not possible to do it with standard commands then I guess I could try to draw it in Tikz, but that seems like overkill.

• Sorry, I don't understand your need. When I used \mathbin{\perp\kern-11mu\perp} in plain TeX with Computer Modern then the result is optically optimal: petr.olsak.net/pperp.png . The double perp is larger than in your second picture in your post. I don't understand why. May be your picture isn't correct. Of course, the \mid operator is more tall than double perp, but this is an intend because the \mid intersects baseline and it respects math axis. And you rejected such similar double perp in out post. – wipet Apr 11 '15 at 10:55
• @wipet you are entirely correct - the question was based on a mistake that I had made. (See the edited question for details.) I am terribly sorry for wasting people's time with it. – Nathaniel Apr 12 '15 at 6:27 Code:

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}

\newcommand{\bigCI}{\mathrel{\text{\scalebox{1.07}{$\perp\mkern-10mu\perp$}}}}

\begin{document}

$A \bigCI B_{A \bigCI B_{A \bigCI B}}$

\end{document}

Here is a not so elegant solution:

\documentclass{article}
\usepackage{amsmath,amssymb,graphicx}
\newcommand*{\bigCI}{%
\mathrel{\text{%
{\rotatebox[origin=c]{90}{\resizebox{2.25ex}{1.65ex}{$\vDash$}}}%
}}%
}
\begin{document}
$\fboxsep=-0.9pt\fbox{ A \bigCI B \mid C  }$
$A \bigCI B \mid C$
$A \bigCI B_{\bigCI B \mid C_{\bigCI B \mid C}}$
\end{document} Another attempt with tikz:

\documentclass{article}
\usepackage{amsmath,tikz}
\newcommand*{\bigCI}{%
\mathrel{\text{%
{\begin{tikzpicture}[baseline = {(0,0)}]%
\draw[line width = 0.1ex] (0,0) -- (0,1.7ex);
\draw[line width = 0.1ex] (0.3ex,0) -- (0.3ex,1.7ex);
\draw[line width = 0.1ex] (-0.8ex,0) -- (1.1ex,0);
\end{tikzpicture}%
}%
}}%
}
\begin{document}
$\fboxsep=-0.9pt\fbox{ A \bigCI B \mid C  }$
$A \bigCI B \mid C$
$A \bigCI B_{\bigCI B \mid C_{\bigCI B \mid C}}$
\end{document} You do not need use \newcommand. Your symbol is part of the packages txfonts and pxfonts.

You must insert in the preamble:

\usepackage{txfonts} % https://www.ctan.org/tex-archive/fonts/txfonts

And insert in the text:

\textit{\textbf{Symmetry:}} $(X \Perp Y | Z) \Rightarrow (Y \Perp X | Z)$.

\textit{\textbf{Decomposition:}} $(X \Perp YW | Z) \Rightarrow (X \Perp Y | Z)$.

\textit{\textbf{Weak union:}} $(X \Perp YW | Z) \Rightarrow (X \Perp Y | ZW)$.

The result is: 