% % prftree.sty % by Marco Benini - 19th June 2019 % v1.6 % % A package to typeset natural deduction proofs, or sequent proofs, or % tableau proofs % % This package is distributed under the GNU General Public License % \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{prftree}[2019/06/19 Natural Deduction Proofs] % Package options: deactivated by default \newif\ifprf@NDOption\prf@NDOptionfalse \newif\ifprf@SEQOption\prf@SEQOptionfalse \newif\ifprfIMPOption\prfIMPOptionfalse \newif\ifprf@EQOption\prf@EQOptionfalse \newif\ifprf@MLOption\prf@MLOptionfalse \newif\ifprf@MLnodefOption\prf@MLnodefOptionfalse % but the STRUT and STRUTlabel are on by default \newif\ifprfSTRUToption\prfSTRUToptiontrue \newif\ifprfSTRUTlabeloption\prfSTRUTlabeloptiontrue \DeclareOption{ND}{\prf@NDOptiontrue} \DeclareOption{SEQ}{\prf@SEQOptiontrue} \DeclareOption{IMP}{\prfIMPOptiontrue} \DeclareOption{EQ}{\prf@EQOptiontrue} \DeclareOption{ML}{\prf@MLOptiontrue} \DeclareOption{MLnodef}{\prf@MLnodefOptiontrue} \DeclareOption{Strut}{\prfSTRUToptionfalse} \DeclareOption{StrutLabel}{\prfSTRUTlabeloptionfalse} \ProcessOptions\relax %-------------------------------------------------------------------- % A proof tree is composed by a generic cell: % A1 A2 A3 % ---------- R % C % We call A1, A2, A3. ... assumptions, C the conclusion and R the rule % name. The line dividing the assumptions from the conclusion is % called the proof line. A proof tree with no assumptions is an axiom. % An assumption which is not a proof tree is a pure assumption. % % A proof tree is typeset by % \prftree[]...[] % {}...{} % {} % The possible options are: % r : the first argument after the options is the rule % name, typeset in text mode % rule : synonym for 'r' % by rule : synonym for 'r' % by : synonym for 'r' % right : synonym for 'r' % l : the first argument after the options is the rule % label, typeset in text mode; if there is also a % rule name, the label is the second argument % label : synonym for 'l' % left : synonym for 'l' % straight : the proof line will be a solid line (default) % straight line : synonym for 'l' % straightline : synonym for 'l' % dotted : the proof line will be a dotted line % dotted line : synonym for 'dotted' % dottedline : synonym for 'dotted' % dashed : the proof line will be a dashed line % dashed line : synonym for 'dashed' % dashedline : synonym for 'dashed' % f : the proof line will be fancy % fancy : synonym for 'f' % fancy line : synonym for 'f' % fancyline : synonym for 'f' % s : the proof line will be single, not double (default) % single : synonym for 's' % single line : synonym for 's' % singleline : synonym for 's' % d : the proof line will be double, not single % double : synonym for 'd' % double line : synonym for 'd' % doubleline : synonym for 'd' % noline : suppresses the proof line (prevails over all other % line options) % summary : renders the proof line as the summary symbol % (prevails over all other line options except % noline) % % The format of options is [,...,]; it is correct to have % empty options. Options are parsed left-to-right: in case of % conflicting options, the latest prevails. % % If present, the rule name is typeset in text style, while the % conclusion and the assumptions are typeset in display math mode. % The result is a box with the correct height and width, whose % conclusion is aligned with the current baseline. % % Notice that the conclusion must be present, while the assumptions % may be absent. % % If there are no assumptions, i.e., if the proof tree represents an % axiom, you may use the following commands: % \prfaxiom{} % \prfbyaxiom{