# QED placement with prooftree package

I am using Paul Taylor’s prooftree package to typeset natural-deduction proof trees.

When a proof ends with a proof tree, how can one obtain the correct placement for the QED symbol? For instance the MWE below, by placing \qedhere at the end and beginning of any of the last three lines before \end{proof}, and varying the order of the \using and \justifies commands, I was able to obtain all the following placements for the QED mark:

• horizontally flush to right margin, but below end of proof tree (as with no \qedhere);
• horizontally flush to right margin, but vertically aligned to middle of proof tree;
• in last line of proof tree, immediately adjacent to end of last formula;
• in last line of proof tree, immediately adjacent to beginning of last formula.

but not the desired one

• vertically, flush with last line of proof tree; horizontally, flush to right margin.

Has anyone encountered/solved similar problems?

\documentclass{amsart}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\usepackage{prooftree}
\begin{document}

\begin{theorem}
Equality is transitive.
\end{theorem}
\begin{proof}
$\begin{prooftree} \[ \justifies \thickness=0.08em t = t \using{\scriptstyle{refl}}$
t = s
\using{\scriptstyle{subst}}
\justifies \thickness=0.08em
s = t
\end{prooftree}
\]
\end{proof}

\end{document}

• I don't have the prooftree package. Have you tried \qedhere just before closing the last displayed equation?
– user10274
Oct 15, 2014 at 12:34

Define a bprooftree environment that sets the reference point of the proof tree at the bottom rather than at the center.

\documentclass{amsart}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}

\newenvironment{bprooftree}

\begin{document}

\begin{theorem}
Equality is transitive.
\end{theorem}

\begin{proof}
$\begin{bprooftree} \[ \justifies \thickness=0.08em t = t \using{\scriptstyle\mathit{refl}}$