I have an equation environment which contains a number of named rules. I would like to give these rules labels and have a command which refers to the name of the rule. This should work with the hyperref package; ideally also with the \autoref command.
MWE:
\documentclass{scrartcl}
\usepackage{amsmath}
\usepackage{proof}
\usepackage{hyperref}
\newcommand{\rulelabel}[2]{#2}
\newcommand{\ruleref}[1]{#1}
\begin{document}
\begin{equation}
\infer[\rulelabel{rule:conjI}{\mathrm{ConjI}}]
{A \land B}
{A & B}
\qquad
\infer[\rulelabel{rule:conjE}{\mathrm{ConjE}}]
{C}
{A \land B & A \implies B \implies C}
\end{equation}
Note that the rules \ruleref{rule:conjI} and \ruleref{rule:conjE} are complementary.
\end{document}
The \rulelabel command should create a label and display the text in the second argument. The \ruleref command should provide a link to the label and display the text in the second argument of \rulelabel. It would be nice if \autoref{rule:conjI} worked and displayed "Rule #2".
This question is similar to "Refer to the "name" of an equation, while a List of Equations is generated using these names", except that the solutions there do not work with the hyperref package.

\autoref{test}in your example created the text "Rule 1" instead of "Equation 1". This goes away if I change theequationenvironment toalign. – cebewee Jul 08 '15 at 08:42