4

I want to put a proof inside a proof using bussproofs. The following code produces exactly what I want.

\documentclass{amsart}
\usepackage{bussproofs}
\newcommand{\VDots}{\vphantom{\int^0}\smash[t]{\vdots}}

\begin{document}

\begin{center}
\hspace{17mm}
$\left(
        \AxiomC{$(A)$}
        \noLine
        \UnaryInfC{$\VDots$}
        \noLine
        \UnaryInfC{$B$}
    \DisplayProof
\right)$
\end{center}
\vspace{-2mm}
\begin{center}
        \AxiomC{$A\to B$}
        \AxiomC{\mbox{}}
        \noLine
        \UnaryInfC{$\VDots$}
        \noLine
        \UnaryInfC{$C$}
        \BinaryInfC{$C$}
    \DisplayProof
\end{center}

\end{document}

But obviously that's not ideal. What I want is to be able to take this chunk of code:

$\left(
        \AxiomC{$(A)$}
        \noLine
        \UnaryInfC{$\VDots$}
        \noLine
        \UnaryInfC{$B$}
    \DisplayProof
\right)$

And shove it into where I currently have a \mbox{} in the second proof. But that gets me an error.

Sebastiano
  • 54,118
  • 1
    Would you be interested in a solution using an alternative package (mathpartir)? – Bordaigorl Mar 24 '17 at 22:24
  • Yes! Sorry, I didn't make that explicit in my question. i suppose a bussproofs solution would be preferred, since I already know the syntax, but if you know of a way easier way to do things, I'd be happy to hear of it! – underwhelmer Mar 25 '17 at 15:42

1 Answers1

5

It seems that busproofs does not support nesting of proofs. However, you can save the inner proof into a box and then use the box inside the outer proof.

enter image description here

\documentclass{amsart}
\usepackage{bussproofs}
\newcommand{\VDots}{\vphantom{\int^0}\smash[t]{\vdots}}
\begin{document}

\newsavebox\InnerProof
\sbox\InnerProof{$\left(
        \AxiomC{$(A)$}
        \noLine
        \UnaryInfC{$\VDots$}
        \noLine
        \UnaryInfC{$B$}
    \DisplayProof
\right)$%
}

\begin{center}
        \AxiomC{$A\to B$}
        \AxiomC{\usebox\InnerProof}
        \noLine
        \UnaryInfC{$\VDots$}
        \noLine
        \UnaryInfC{$C$}
        \BinaryInfC{$C$}
    \DisplayProof
\end{center}

\end{document}
gernot
  • 49,614
  • This is great, and not at all odious! I'll wait a few days to encourage other answers, but this is really quite good. – underwhelmer Mar 25 '17 at 15:43
  • 2
    @Shay My answers are never odious ;-) Using an sbox is a general trick (maybe already a method) to reduce interference between some inner and outer typesetting. – gernot Mar 25 '17 at 15:47
  • @gernot Can we use the same approach to have nesting of tikzmatrices (or are there any hidden issues) ? (I have heard using positioning and fit libraries is better; still I would like multiple ways) – Cyriac Antony Jul 11 '19 at 08:40
  • @CyriacAntony No idea, try it ... – gernot Jul 11 '19 at 08:44