[Tex/LaTex] array within frac, using nath package

arraysfractionsmath-mode

I use the nath package to get automatically-sized delimiters, but it breaks having a \begin{array}{…}…\end{array} within a \frac{}{} (simply removing the \usepackage{nath} below fixes the example, but I need nath for other stuff).

\documentclass{article}
\usepackage{nath}
\begin{document}
\begin{equation}
  \begin{array}{c}a\\b\\c\end{array}% This works
  \frac{numerator}{denominator}% This works
  % I want to put the array at the numerator's place
  \frac{\begin{array}{c}a\\b\\c\end{array}}{denominator}% This fails
\end{equation}
\end{document}

I'm trying to do this to typeset some simple natural deduction proofs (one or several hypotheses followed by a horizontal line, then one or several conclusions), but packages like bussproofs.sty are clearly overkill (I don't need to typeset full proofs, just a single deduction rule). While \frac{}{} is semantically incorrect for this use, it is simple and gives the visual result I need.

Edit: The error message is ERROR: LaTeX Error: Environment ARRAY undefined.

Best Answer

For some reason, nath uses \uppercase when working on fractions (I've not checked the details, but the error message is about ARRAY being undefined).

This hack seems to work:

\documentclass{article}
\usepackage{nath}
\newenvironment{ARRAY}[2][c]{\lowercase{\array[#1]{#2}}}{\endarray}

\begin{document}
\begin{equation}
  \begin{array}{c}a\\b\\c\end{array}\quad
  \frac{numerator}{denominator}\quad
  \frac{\begin{array}{c}a\\b\\c\end{array}}{denominator}
\end{equation}
\end{document}

enter image description here


A less hackish way is to hide array:

\newcommand{\morelines}[1]{\begin{array}{c}#1\end{array}}

and

\begin{equation}
\frac{\morelines{a\\b\\c}}{denominator}
\end{equation}

or even

\newcommand{\morelines}[1]{\begin{array}{c}#1\end{array}}
\newcommand{\deduction}[2]{\frac{\morelines{#1}}{\morelines{#2}}}

and inputting your deduction as

\begin{equation}
\deduction{a\\b\\c}{denominator}
\end{equation}

I'm more convinced about not using nath.