% LAST EDIT: Thu Aug 21 23:36:05 1997 by Peter Pepper (basti!pepper) 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% A LaTeX2e style for TeXing programs
%
% by P. Pepper
%
% (Note: This package is almost completely written in TeX!)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{symbols}[1996/03/03 TU Berlin program package (v 0.1)]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Compatibility with [german]{babel]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                  %
\def\@@RestoreDBQut{\relax}
\ifcat\noexpand"\noexpand~\relax\gdef\@@RestoreDBQut{\catcode`\"=13}\fi%
\catcode`\"=12%      % set " to other
%                                                  %
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                  %
% Options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newif\if@AmsWanted
\newif\if@SuppressSymbols
%
\DeclareOption{ams}{\@AmsWantedtrue}
\DeclareOption{suppress}{\@SuppressSymbolstrue}
\ProcessOptions
\relax
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Load other packages
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\RequirePackage{scanner}
%
\if@AmsWanted
   \RequirePackage{amssymb}
\fi
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Some self-designed symbols
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\@SymDiff{\mathbin{%
\hbox to 1em{\hfill$-\kern-.51em\raise.9ex\hbox{.}$\hfill}}}

\newbox\@@Box%
\setbox\@@Box=\hbox{%
\unitlength0.065em%
\begin{picture}(10,10)%
\put(00,00){\line(1,0){10}}%
\put(10,00){\line(0,1){10}}%
\put(10,10){\line(-1,0){10}}%
\put(00,10){\line(0,-1){10}}%
\end{picture}%
}%
%
\def\@Diamond{\hbox{%
\unitlength0.075em%
\begin{picture}(10,10)%
\thicklines%
\put(05,00){\line(1,1){05}}%
\put(10,05){\line(-1,1){05}}%
\put(05,10){\line(-1,-1){05}}%
\put(00,05){\line(1,-1){05}}%
\end{picture}%
}}%
%
\newbox\@@BoxBar%
\setbox\@@BoxBar=\hbox{\hss%
\unitlength0.065em%
\begin{picture}(10,10)%
\put(00,00){\line(1,0){10}}%
\put(10,00){\line(0,1){10}}%
\put(10,10){\line(-1,0){10}}%
\put(00,10){\line(0,-1){10}}%
\put(05,00){\line(0,1){10}}%
\end{picture}%
\hss}%
%
\newbox\@@BoxMinus%
\setbox\@@BoxMinus=\hbox{%
\unitlength0.065em%
\begin{picture}(10,10)%
\put(00,00){\line(1,0){10}}%
\put(10,00){\line(0,1){10}}%
\put(10,10){\line(-1,0){10}}%
\put(00,10){\line(0,-1){10}}%
\put(00,05){\line(1,0){10}}%
\end{picture}%
}%
%
\newbox\@@BoxPlus%
\setbox\@@BoxPlus=\hbox{%
\unitlength0.065em%
\begin{picture}(10,10)%
\put(00,00){\line(1,0){10}}%
\put(10,00){\line(0,1){10}}%
\put(10,10){\line(-1,0){10}}%
\put(00,10){\line(0,-1){10}}%
\put(05,00){\line(0,1){10}}%
\put(00,05){\line(1,0){10}}%
\end{picture}%
}%
%
\newbox\@@BoxTimes%
\setbox\@@BoxTimes=\hbox{%
\unitlength0.065em%
\begin{picture}(10,10)%
\put(00,00){\line(1,0){10}}%
\put(10,00){\line(0,1){10}}%
\put(10,10){\line(-1,0){10}}%
\put(00,10){\line(0,-1){10}}%
\put(05,05){\makebox(0,0){$\times$}}
\end{picture}%
}%
%
\newbox\@@BoxDot%
\setbox\@@BoxDot=\hbox{%
\unitlength0.065em%
\begin{picture}(10,10)%
\put(00,00){\line(1,0){10}}%
\put(10,00){\line(0,1){10}}%
\put(10,10){\line(-1,0){10}}%
\put(00,10){\line(0,-1){10}}%
\put(05,05){\makebox(0,0){.}}%
\end{picture}%
}%
%%
\def\@SemOpen{\hbox to 0.8em{\hfill$[$\kern-.15em$[$\hfill}}

\def\@SemClose{\hbox to 0.8em{\hfill$]$\kern-.15em$]$\hfill}}
%
\def\@Concat{\mathbin{\hbox to 1em{\hfill%
\unitlength0.07em%
\begin{picture}(10,8)%
%\thicklines%
\put(0,4){\line(1,0){3.8}}%
\put(6.2,4){\line(1,0){3.8}}%
\put(3.9,0){\line(0,1){8}}%
\put(6.1,0){\line(0,1){8}}%
\end{picture}%
\hfill}}}%

\def\@SlashBackslash{\wedge}%
\def\@Slash{/}%
%
\def\@Compose{\mathbin{\raisebox{1pt}{$\scriptstyle{\circ}$}}}%
%
\def\@Disjoint{\mathbin{\mbox{$\not$\hspace{0.5pt}$\cap$}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Some special characters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\def\@Ampersand{\char`\&}
\def\@At{\char`\@}
\def\@Backslash{\char`\\}
\def\@Dollar{\char`\$}
\def\@DoubleQuote{\char`\"}     % this is tricky with the babel-style
\def\@Hashmark{\char`\#}
\def\@Percent{\char`\%}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Naming those self-designed symbols
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\let\Ampersand=\@Ampersand
\let\At=\@At
\def\Backslash{\texttt{\@Backslash}}
\let\Dollar=\@Dollar
\def\DoubleQuote{\texttt{\@DoubleQuote}}
\let\Hashmark=\@Hashmark
\let\Percent=\@Percent

\let\Compose=\@Compose
\let\Disjoint=\@Disjoint

\def\SymDiff{{$\@SymDiff$}}

\def\Box{\copy\@@Box}
\def\Diamond{\@Diamond}
\def\BoxBar{\copy\@@BoxBar}
\def\BoxMinus{\copy\@@BoxMinus}
\def\BoxPlus{\copy\@@BoxPlus}
\def\BoxTimes{\copy\@@BoxTimes}
\def\BoxDot{\copy\@@BoxDot}

\def\SemOpen{\@SemOpen}
\def\SemClose{\@SemClose}

\def\Concat{\hbox{$\@Concat$}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% The special symbols
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                    %
{\catcode`\_=12%                            % other character
 \catcode`\^=12%                            % other character
\gdef\SetAllSymbols{%                                 %
%
% test, whether amssymb.sty is loaded
%
  \newif\if@AmsSymb
  \expandafter\ifx\csname lozenge\endcsname\relax\@AmsSymbfalse%
  \else\@AmsSymbtrue\fi
%Relations
  \SetSymbol{=<}{\leq}
  \SetSymbol{>=}{\geq}
  \SetSymbol{<<}{\ll}
  \SetSymbol{>>}{\gg}
  \SetAmsSymbol{<.}{\lessdot}{\mathrel{<\hskip-0.6em\cdot}}
  \SetAmsSymbol{>.}{\gtrdot}{\mathrel{\cdot\hskip-0.6em>}}
  \SetAmsSymbol{.>}{\gtrdot}{\mathrel{\cdot\hskip-0.6em>}}
  \SetSymbol{=.}{\doteq}
  \SetAmsSymbol{/<}{\nless}{\not<}
  \SetAmsSymbol{/>}{\ngtr}{\not>}
  \SetAmsSymbol{/=<}{\nleq}{\not\leq}
  \SetAmsSymbol{/>=}{\ngeq}{\not\geq}
  \SetSymbol{/=}{\neq}
  \SetSymbol{===}{\equiv}
  \SetSymbol{=/=}{\not\equiv}
% Arrows
  \SetSymbol{=>}{\Rightarrow}
  \SetSymbol{<=}{\Leftarrow}
  \SetSymbol{<=>}{\Leftrightarrow}
  \SetSymbol{==>}{\Longrightarrow}
  \SetSymbol{<==}{\Longleftarrow}
  \SetSymbol{<==>}{\Longleftrightarrow}
  \SetSymbol{->}{\rightarrow}
  \SetSymbol{<-}{\leftarrow}
  \SetSymbol{<->}{\leftrightarrow}
  \SetSymbol{-->}{\longrightarrow}
  \SetSymbol{<--}{\longleftarrow}
  \SetSymbol{<-->}{\longleftrightarrow}
  \SetSymbol{|->}{\mapsto}
  \SetSymbol{|-->}{\longmapsto}
  \SetAmsSymbol{>->}{\rightarrowtail}{%
\mathbin{\raise0.18ex\hbox{$\scriptstyle>$}%
\hskip-0.4em-\hskip-0.75em\raise0.18ex\hbox{$\scriptstyle>$}}}
  \SetAmsSymbol{<-<}{\leftarrowtail}{%
\mathbin{\raise0.18ex\hbox{$\scriptstyle<$}%
\hskip-0.75em-\hskip-0.4em\raise0.18ex\hbox{$\scriptstyle<$}}}
  \SetAmsSymbol{->>}{\twoheadrightarrow}{%
\mathbin{-\hskip-0.45em\raise0.28ex\hbox{$\scriptscriptstyle>\hskip-0.3em>$}}}
  \SetAmsSymbol{<<-}{\twoheadleftarrow}{%
\mathbin{\raise0.28ex\hbox{$\scriptscriptstyle<\hskip-0.3em<$}\hskip-0.45em-}}
  \SetSymbol{|-}{\vdash}
  \SetSymbol{|=}{\models\hskip0.1em}
%Boxes and Circles
  \SetAmsSymbol{[]}{\hskip0.1em\square\hskip0.1em}{%
                    \hskip0.1em\copy\@@Box\hskip0.1em}
  \SetAmsSymbol{<>}{\hskip0.1em\lozenge\hskip0.1em}{%
                    \hskip0.1em\Diamond\hskip0.1em}
  \SetSymbol{<|}{\triangleleft}
  \SetSymbol{|>}{\triangleright}
  \SetSymbol{[|]}{\mathbin{\copy\@@BoxBar}}
  \SetAmsSymbol{[-]}{\boxminus}{\mathbin{\copy\@@BoxMinus}}
  \SetAmsSymbol{[+]}{\boxplus}{\mathbin{\copy\@@BoxPlus}}
  \SetAmsSymbol{[*]}{\boxtimes}{\mathbin{\copy\@@BoxTimes}}
  \SetAmsSymbol{[.]}{\boxdot}{\mathbin{\copy\@@BoxDot}}
% Brackets
  \SetSymbol{|[}{\@SemOpen}
  \SetSymbol{]|}{\@SemClose}
  \SetSymbol{||}{\parallel}
% Diverse
  \SetSymbol{/}{\@Slash}   % see above
  \SetSymbol{-;}{\neg\hskip0.1em}
  \SetSymbol{-:-}{\div}
  \SetSymbol{-.}{\mathbin{\@SymDiff}}
  \SetSymbol{:}{\mathpunct{\,:\,}}
  \SetSymbol{...}{\ldots}
  \SetSymbol{"}{\texttt{"}}             % may not work with babel-style
  \SetSymbol{'}{\sp{\prime}}
  \SetSymbol{**}{\times}
  \SetSymbol{><}{\times}
  \SetSymbol{+-}{\pm}
  \SetSymbol{++}{\mathbin{\@Concat}}
  \SetSymbol{::}{\texttt{\upshape:\hskip-0.2em:}}
% using ^ and _
  \SetSymbol{_}{\mathbin{\,\Identifier{\char"5F}\,}}
  \SetSymbol{^}{\Identifier{\char"5E}}
  \SetSymbol{^^}{\Identifier{\char"5E\char"5E}}
  \SetSymbol{|_|}{\sqcup}
  \SetSymbol{_|_}{\bot}
  \SetSymbol{|^}{\uparrow}
% using \
  \SetMacro{\/}{\vee}
%some additional macros
  \SetMacro{\All}{\forall\,}
  \SetMacro{\Ex}{\exists\,}
  \SetMacro{\A}{\forall\,}
  \SetMacro{\E}{\exists\,}
%
  \SetMacro{\U}{\cup}
  \SetMacro{\I}{\cap}
%
  \SetMacro{\o}{\@Compose}
%
  \SetMacro{\\}{\lambda\hskip0.1em}
%
  \SetMacro{\<}{\langle}
  \SetMacro{\>}{\rangle}
%
  \SetAmsSymbol{BB}{\mathbb{B}}{\texttt{I\kern-0.2emB}}
  \SetAmsSymbol{NN}{\mathbb{N}}{\texttt{I\kern-0.2emN}}
  \SetAmsSymbol{RR}{\mathbb{R}}{\texttt{I\kern-0.2emR}}
  \SetAmsSymbol{ZZ}{\mathbb{Z}}{\texttt{Z\kern-0.3emZ}}
  \SetAmsSymbol{QQ}{\mathbb{Q}}{\texttt{I\kern-0.5emQ}}
  \SetAmsSymbol{VV}{\mathbb{V}}{\texttt{V\kern-0.4emV}}
%
}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Setting the symbols with \SetAllSymbols
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\if@SuppressSymbols%
   \relax%
\else%
   \SetAllSymbols%
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                             %
\@@RestoreDBQut%                                              %
%                                                             %
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% End of file "symbols.sty"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



