[Tex/LaTex] Undefined Control Sequence using align*

alignerrorsundefined

I'm trying to create a pdf of formulas for a class I'm taking. I have many code snippets as follows, one of which I've presented as a subset of my document below:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{proof, environ, array}
\begin{document}

\section{Propositional Logic}

\subsection{Introduction of $\wedge$}
    \begin{align*}
      \infer[\rulename{\wedge_i}]
      {\alpha \wedge \beta}
      {\alpha && \beta}
    \end{align*}
    (If you have derived $\alpha$ and $\beta$, then you can conclude $\alpha \wedge \beta$.)
\end{document}

On every single instance of an equation formatted as above, I get an error on the \end{align*} line. The error is shown below:

! Undefined control sequence.
<recently read> \rulename 

l.21     \end{align*}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

For the most part, I have one equation per subsection, as above. If I have more than one equation per subsection, I get this error on all the \end{align*} commands within a subsection.

Thanks in advance for any help.

EDIT: It seems that \rulename is a rule specified by the professor whose equations I copied, but it is not defined within the source file I copied from. The effect I'm trying to achieve looks as follows: Desired effect of my command

Any tips as to how I can achieve this are appreciated!

Best Answer

Since no definition of \rulename is provided, it's hard to guess. However, I can reproduce the output with a “dummy” definition for it, so it possibly is just for markup (and good for possible redefinitions).

\documentclass{article}

\usepackage{amsmath}
\usepackage{proof}

\newcommand{\rulename}[1]{#1}

\begin{document}

\section{Propositional Logic}

\subsection{Introduction of $\wedge$}
\begin{equation*}
 \infer[\rulename{\wedge_i}]
   {\alpha \wedge \beta}
   {\alpha && \beta}
\end{equation*}
(If you have derived $\alpha$ and $\beta$, then
you can conclude $\alpha \wedge \beta$.)

\end{document}

I have minimized the example; don't use align* as a surrogate for equation* when there is just one line.

enter image description here