答案1
在 LaTeX 中有几个可以绘制证明树的包,例如,,,bussproofs
。ebproof
这prftrees
是一个使用bussproofs
绘制证明树并cancel
削减其中一个假设的解决方案。
\documentclass[11pt]{article}
\usepackage{bussproofs}
\usepackage{cancel}
\begin{document}
\begin{prooftree}
\AxiomC{\qquad\textcircled{\scriptsize1}}
\noLine
\UnaryInfC{$\cancel\psi$}
\AxiomC{$\phi\wedge\psi$}
\RightLabel{($\wedge$E)}
\UnaryInfC{$\phi$}
\RightLabel{($\wedge$I).}
\insertBetweenHyps{\hskip2cm}
\BinaryInfC{$(\psi\wedge\phi)$}
\LeftLabel{\textcircled{\scriptsize 1}}
\RightLabel{($\rightarrow$I)}
\UnaryInfC{$(\psi\rightarrow(\psi\wedge\phi))$}
\end{prooftree}
\end{document}
导致
同样ebproof
的证明树可以用下面的代码实现
\documentclass[11pt]{article}
\usepackage{ebproof}
\usepackage{cancel}
\begin{document}
\begin{prooftree}[template=$\inserttext$]
\Hypo{\quad\textcircled{\scriptsize 1}}
\Infer[no rule]1{\cancel\psi}
\Hypo{(\phi\wedge\psi)}
\Infer1[($\wedge$E)]{\phi}
\Infer[separation=2cm]2[($\wedge$I)]{(\psi\wedge\phi)}
\Infer[left label=\textcircled{\scriptsize 1},
right label=($\rightarrow$I)]1{(\psi\rightarrow(\psi\wedge\phi))}
\end{prooftree}
\end{document}
答案2
bussproofs
在和的帮助下cancel
:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{bussproofs}
\usepackage{cancel}
\newcommand{\lto}{\mathbin{\to}}
\begin{document}
\begin{prooftree}
\renewcommand{\defaultHypSeparation}{\hspace{4em}}
\AxiomC{${\cancel{\psi}}^{\,\raisebox{\depth}{\textcircled{\footnotesize 1}}}$}
\AxiomC{$(\phi\land\psi)$}
\RightLabel{($\land\mathrm{E}$)}
\UnaryInfC{$\phi$}
\RightLabel{($\land\mathrm{I}$)}
\BinaryInfC{$(\psi\land\phi)$}
\LeftLabel{\textcircled{\footnotesize 1}}
\RightLabel{($\lto\mathrm{I}$)}
\UnaryInfC{$(\psi\lto(\psi\land\phi))$}
\end{prooftree}
\end{document}