I'm trying to typeset some axiomatic logic proofs in list form. I have tried to define a new environment such that I could combine the proof
environment of the amsthm
package with a table, resulting in the ugly picture underneath.
What I would like to achieve is that the lines of the proof are automatically numbered (I've tried to do that with a counter), that they have the same indentation as an enumeration, that the descriptions are nicely aligned (that's why I tried to use a table) and that the QED symbol is placed properly.
How can I do that?
\documentclass{article}
\usepackage{array,amsthm,amssymb,amsmath}
\newcounter{rowcount}
\newenvironment{listproof}
{\setcounter{rowcount}{0}
\begin{proof}\mbox{}\\\\
\begin{tabular}{@{\stepcounter{rowcount}(\alph{rowcount})\hspace*{\tabcolsep}}ll}}
{\end{tabular}\end{proof}}
\newtheorem{thm}{Theorem}
\newcommand{\necc}{\ensuremath{\mathbin{\Box}}}
\newcommand{\limpl}{\ensuremath{\mathbin{\rightarrow}}}
\newcommand{\theo}{\ensuremath{\mathrel{\vdash}}}
\begin{document}
\begin{thm}
$\theo\phi\limpl\psi \implies \theo\necc\phi\limpl\necc\psi$.
\end{thm}
\begin{listproof}
$\phi\limpl\psi$ & given\\
$\necc(\phi\limpl\psi)$ & N, a\\
$\necc(\phi\limpl \psi)\limpl(\necc \phi\limpl\necc\psi)$ & $[\phi/p, \psi/q]\,$K\\
$\necc{\phi}\limpl\necc{\psi}$ & MP, b, c\\
\end{listproof}
\end{document}