\newskip{\ruleskip}
\ruleskip=1em plus3.5cm minus .3em
\newcommand{\rules@endpar}{{\parfillskip0pt\linepenalty100\endgraf}}
\newenvironment{somerules}
	{\par\smallbreak\penalty500\noindent
         \upshape % because rules are often in a definition
	 \lineskip=5pt
	 \lineskiplimit\lineskip
         \linepenalty100
	 \dimen0=-\ruleskip
         \dimen0=\rightskip
         \rightskip=\dimen0
	 \advance\leftskip by\dimen0
	 \advance\rightskip by\dimen0
	 \def\\{\rules@endpar\noindent\ignorespaces}
         \let\par\ignorespaces
	 \ifdim\hfuzz<1.5pt \hfuzz1.5pt \fi
	 \ignorespaces}
	{\rules@endpar\aftergroup\noindent\aftergroup\ignorespaces}
\newcommand*{\ruleinject}[1]
        {\hskip\ruleskip\nobreak\hbox{#1}%
	 \nobreak\hskip\ruleskip\penalty0\hbox{}\nobreak
	 \ignorespaces}
\newcommand*{\arule}[3][]
	{\ruleinject{$\displaystyle{\vrule width0ptheight.1ex\premises{#2}\over
			            \vrule width0ptdepth1.8ex{#3}}
                     \ifx\arule#1\arule\else \,{\textstyle#1}\fi$}}
\newcommand{\premises}[1]
        {\vbox{\normalbaselines\lineskip.3ex
               \def\\{\cr}
               \halign{\hfil$##$\hfil\cr#1\cr}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                           %
% Tuborg braces (no, they are probably not called that in English)          %
%                                                                           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newenvironment{tuborg}
        {\relax
         \ifmmode\expandafter\hbox\fi\bgroup $
         \normalbaselines
         \def\\{\cr}
         \def\where{\crcr\egroup\egroup\egroup
                    \hbox\bgroup\space\space where
                        \vtop\bgroup\halign\bgroup $####$\hfil\cr}
         \left\{\vcenter\bgroup
                \bgroup\bgroup\halign\bgroup $##$\hfil\cr}
        {\crcr\egroup\egroup\egroup\egroup \right.
         \nulldelimiterspace0pt $\egroup}
