[Tex/LaTex] Writing a natural deduction proof in Latex

proof-package

I have checked the other questions, before anyone asks, but the style of proof appears to be subtly different and I would be expected to stick to the convention that I am using.

My question is how to create a proof in Latex like the one in the image attached:

proof of P ∨ ¬P

(Apologies for the lighting, it is late for me)

This is not a Fitch-style proof, as no indentation is present, or those bars. I could use ordered lists, but I am wondering if there is a package that allows me to auto-indent lines and the side-notes/operations as that can be fiddly with raw lists (although if anyone has any pointers on this I would be happy to hear them).

Any ideas? I am quite surprised I wasn't able to find any packages that use this kind of proof, it is the style used in Mendelson's Introduction to Mathematical Logic, so perhaps it is old-school. Appreciate any guidance people can provide.

Best Answer

Another solution, based on listliketab:

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{listliketab}

\begin{document}

\storestyleof{enumerate}
\begin{listliketab}%
\newcounter{tabenum}\setcounter{tabenum}{0}
\newcommand{\step}{\refstepcounter{tabenum}\thetabenum.}
\noindent \begin{tabular}{L >{$}l <{$}@{\hskip4em}l}
\multicolumn{2}{c}{$ \vdash P\lor\lnot P $} \\
\step & \lnot(P\land\lnot P) & Hyp \\
\step & P & {Hyp}\\
\step & P\lor\lnot P & 2, $\lor$-introduction \\
\step & \bot & 1, 3, contradiction \\
\step & \lnot P & 2, 4, negation-introduction \\
\step & P\lor\lnot P & 5, $\lor$-introduction \\
\step & \bot & 1, 6, contradiction \\
\step & \lnot\lnot(P\lor\lnot P) & 1, 7, negation-introduction \\
\step & P\lor\lnot P & 8, double negation elimination
\end{tabular}
\end{listliketab}

\end{document} 

enter image description here

Related Question