Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
\def\defded#1#2{\expandafter\def\csname ded-#1\endcsname{#2}}
\def\ifdedundefined#1{\expandafter\ifx\csname ded-#1\endcsname\relax}
\def\ded#1{\ifdedundefined{#1}
    \errmessage{UNDEFINED DEDUCTION: #1}
  \else
    \csname ded-#1\endcsname
  \fi
}
\def\defdiag#1#2{\expandafter\def\csname diag-#1\endcsname{#2}}
\def\ifdiagundefined#1{\expandafter\ifx\csname diag-#1\endcsname\relax}
\def\diag#1{\ifdiagundefined{#1}
    \errmessage{UNDEFINED DIAGRAM: #1}
  \else
    \bfig\csname diag-#1\endcsname\efig
  \fi
}

% After loading diagxy, to make `\to' be an arrow
%
\def\diagxyto{\ifnextchar/{\toop}{\toop/>/}}
\def\mon{\diagxyto/ >->/}
\def\epi{\diagxyto/->>/}
\def\toleft{\diagxyto/<-/}
\def\monleft{\diagxyto/<-< /}
\def\epileft{\diagxyto/<<-/}
\def\to{\rightarrow}

\def\ton#1{\overset{#1}{\to}}
\def\ito{\hookrightarrow}
\def\tnto{\ton{\bullet}}
\def\funto{\Rightarrow}
\def\bij{\leftrightarrow}
\def\mto{{\mapsto}}