# prooftree from bussproofs package inside “cases” environment

I am using bussproofs package to provide some type proofs. According to bussproofs manual, it is impossible to use prooftree inside math mode. However, I would like to insert prooftree in the cases environment. If there are any tricks I can do to overcome this?

The minimal working example:

\documentclass{article}
\usepackage{amssymb,amsmath}
\usepackage{bussproofs}
\begin{document}
$\epsilon= \begin{cases} \AxiomC{\alpha} \UnaryInfC{\beta} \DisplayProof %\begin{prooftree} %\AxiomC{\alpha} %\AxiomC{\beta} %\BinaryInfC{\gamma} %\end{prooftree} \end{cases}$
\end{document}


I want the commented section to compile as well.

-
Welcome to TeX.sx! –  Peter Jansson Mar 11 '13 at 20:20

## 1 Answer

While using bussproofs may simplify logical proofs as a standalone environment, you have to treat it with care when things become more complex. In general, if you're able to box and store the content, you can always use the box inside your more complex structure.

However, an alternative is to avoid the bussproofs package altogether, and stick to traditional array constructions to match your logic expressions:

\documentclass{article}
\usepackage{amssymb,amsmath}% http://ctan.org/pkg/{amssymb,amsmath}
\usepackage{bussproofs,varwidth}% http://ctan.org/pkg/{bussproofs,varwidth}
\newsavebox{\mypt}
\begin{document}
\begin{lrbox}{\mypt}% Store prooftree in \mypt
\begin{varwidth}{\linewidth}
\begin{prooftree}
\AxiomC{$\alpha$}
\AxiomC{$\beta$}
\BinaryInfC{$\gamma$}
\end{prooftree}
\end{varwidth}
\end{lrbox}

$\epsilon = \begin{cases} \AxiomC{\alpha} \UnaryInfC{\beta} \DisplayProof & \text{ if x} \\ \usebox{\mypt} & \text{ if y} \end{cases}$

\hrulefill

$\epsilon = \left\{\begin{array}{@{}l@{}l@{}} \dfrac{~\alpha~}{\beta} & \text{ if x} \\ \dfrac{~\alpha \qquad \beta~}{\gamma} & \text{ if y} \end{array}\right.$
\end{document}


At this point it's a case of playing around with the spacing, although the output is very similar in structure to that of bussproofs.

-
Thanks! This is quite helpful. –  Pavel Zaichenkov Mar 12 '13 at 11:06