Argument in Discrete Mathematics
Alternatively, is there a package just for this?
Yes, I believe ebproof really fits the bill.
\documentclass{article}
\usepackage{ebproof}
\usepackage{mathtools}
\usepackage{amssymb}
\begin{document}
\begin{prooftree}
\hypo{&P(1)}
\infer[no rule]1{&P(2)}
\infer[no rule]1{&\forall n \in \mathbf{N} ((P(n) \land P(n+1) \implies P(n+2))}
\infer1{& \therefore \forall n \in \mathbf{N} (P(n))}
\end{prooftree}
\end{document}
The &
character is here to tune the alignment, there is no need to explicitly declare the math. environment, and the package is flexible enough to accommodate multiple variations.
As a side note, you can get the therefore symbol using other techniques.
Since all material is in math mode, you should use an array
environment, with a single column of type l
, instead of a tabular
environment.
\documentclass{article}
\usepackage{amssymb,booktabs}
\let\implies\Rightarrow % ? -- maybe '\rightarrow'?
\newcommand\N{\mathbb{N}}
\begin{document}
\noindent
$\begin{array}{@{}l@{}} % "@{}" suppresses whitespace padding
P(1) \\
P(2) \\
\forall n \in \N \bigl((P(n) \land P(n+1) \implies P(n+2)\bigr) \\
\midrule % for a well-spaced horizontal rule
\therefore\forall n \in \N (P(n))
\end{array}$
\end{document}
Almost the same solution, but in display mode. I suggest using booktabs
for horizontal rules, so you have a better vertical spacing:
\documentclass{article}
\usepackage{mathtools, amssymb}%
\usepackage{booktabs}
\newcommand\NN{\mathbf{N}}
\begin{document}
\[ \begin{array}{l}
P(1) \\
P(1) \\
\forall n \in \NN,\bigl(P(n) \land P(n+1) \implies P(n+2)\bigr) \\
\midrule
\therefore\forall n \in \NN (P(n))
\end{array} \]
\end{document}