%% This is pi.sty by Boris 'pi' Piwinger, University of Vienna.
%% Contact me by e-mail: 3.14@piology.org

\message{****This is pi's style as of 2004/02/17.***************************************}
\ProvidesPackage{pi}[2004/02/17]
\NeedsTeXFormat{LaTeX2e}[1996/06/01]
\newif\ifde

%% Options are used for ntheorem.sty only.
\DeclareOption{german}{\detrue}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{ntheorem}}
\ProcessOptions

%% Include other packages.
\RequirePackage{amsmath}[1996/11/01]
\RequirePackage{latexsym}[1995/11/28]
\RequirePackage{amssymb}[1995/02/01]
\RequirePackage{makeidx}[1995/04/19]
\RequirePackage[amsmath,thmmarks]{ntheorem}[1999/08/05]
\ifde
  \RequirePackage{german}[1996/05/01]
\fi

%% Here we go.
\sloppy
\frenchspacing

%% Definition of space between paragraphs and indentation.
\parskip=.45\baselineskip plus .05\baselineskip minus .02\baselineskip
\parindent=0pt

%% Space around displayed formulae.
\renewcommand\normalsize{%
   \@setfontsize\normalsize\@xipt{13.6}%
   \abovedisplayskip \parskip
   \abovedisplayshortskip 0pt plus3pt
   \belowdisplayshortskip 6.5pt plus3.5pt minus3pt
   \belowdisplayskip \abovedisplayskip
   \jot 0pt}

%% Some penalties against widows and clubs
\raggedbottom
\clubpenalty            =   10000
\widowpenalty           =   10000
\displaywidowpenalty    =   10000


%% Definition of theorem-like-environments.
%% \enspace between theorem header and body.
\newtheoremstyle{piplain}%
  {\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\enskip]}%
  {\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\ (##3)\enskip]}
\newtheoremstyle{pinonumber}%
  {\item[\theorem@headerfont\hskip \labelsep ##1\enskip]}%
  {\item[\theorem@headerfont\hskip \labelsep ##1\ (##3)\enskip]}

%% Definition of theorem-like-environments.
\theoremstyle{piplain}
\newtheorem{Lem}{Lemma}
\newtheorem{Prop}[Lem]{Proposition}
\ifde
  \newtheorem{Cor}[Lem]{Korollar}
  \newtheorem{Rem}[Lem]{Bermerkung}
  \newtheorem{Theorem}[Lem]{Satz}
\else
  \newtheorem{Cor}[Lem]{Corollary}
  \newtheorem{Rem}[Lem]{Remark}
  \newtheorem{Theorem}[Lem]{Theorem}
\fi

%% The following theorem-like-environments' bodies are normal text.
\theorembodyfont{\rm}
\newtheorem{Def}[Lem]{Definition}

%% The proof-environment.
\theoremsymbol{$\dashv$}
\theoremstyle{pinonumber}
\ifde
  \newtheorem{Pf}{Beweis}
\else
  \newtheorem{Pf}{Proof}
\fi

%% Define end-of-marks for single use by \qed in a theorem-like-environment.
\qedsymbol{\ensuremath{\dashv}}

%% For German.
\ifde  
  \renewcommand\contentsname{Inhalt}
\fi


%% Definition of some additional logical expressions.
\def\card#1{\overline{\overline{#1}}}
\def\cl#1{{\rm cl}^{#1}_M}
\def\ring{\mathbin{\circ}}
\def\conf{\nolinebreak\!\!\upharpoonright\nolinebreak\!}
\def\defed{\mathclose{\downarrow}}
\def\dom{\mathop{\rm dom}}
\def\id{\mbox{\rm id}}
\DeclareMathSymbol{\in}{\mathbin}{symbols}{"32}
\def\iff{\mathrel{\Leftrightarrow}}
\def\lGoedel{\ulcorner\mkern-2mu}
\def\ltomegato{{^{<\omega}}}
\def\embeds{\lhook\joinrel\longrightarrow}
\DeclareMathSymbol{\land}{\mathrel}{symbols}{"5E}
\DeclareMathSymbol{\lnot}{\mathrel}{symbols}{"3A}
\DeclareMathSymbol{\lor}{\mathrel}{symbols}{"5F}
\def\lub{\mathop{\rm lub}}
\def\morasssymbol{\mathchoice
 {\text{\rm\small{\raisebox{.073em}{---}\negthickspace 3}}}%
 {\text{\rm\small{\raisebox{.073em}{---}\negthickspace 3}}}%
 {\text{\rm\scriptsize{\raisebox{.073em}{---}\negthickspace 3}}}%
 {\text{\rm\tiny{\raisebox{.073em}{---}\negthickspace 3}}}%
}
\def\morass{\mathrel{\morasssymbol}}
\DeclareMathSymbol{\insymbol}{\mathrel}{symbols}{"32}
\def\nin{\mathbin{\not\insymbol}}
\def\occ{\mathop{\rm occ}}
\def\On{{\rm On}}
\def\otp{\mathop{\rm otp}}
\def\phi{\varphi}
\def\range{\mathop{\rm range}}
\def\reg{\mathop{\rm reg}}
\def\rGoedel{\mkern-2mu\urcorner}
\def\rk{\mathop{\rm rk}}
\def\Sat{\mathop{\rm Sat}}
%% The following \set is due to Colin Bailey http://www.mcs.vuw.ac.nz/people/Colin-Bailey.shtml
  \def\twoSet#1#2{\left\{\vphantom{#2}#1\thinspace\right|\nolinebreak[3]%
    \left.#2\vphantom{#1}\right\}}
  \def\oneSet#1{\left\lbrace#1\right\rbrace}
  \newif\if@nstr\def\setstrfalse{\let\if@nstr=\iffalse}\def\setstrtrue{\let\if@nstr=\iftrue}
  \def\@nstr#1#2{
    \def\@@nstr##1#1##2##3\@@nstr{\ifx\@nstr##2\setstrfalse\else\setstrtrue\fi}
    \@@nstr#2#1\@nstr\@@nstr}
  \def\@separate#1|#2@{\setFront{#1}\setBack{#2}}
  \def\lb#1\rb{\@nstr|{#1}\if@nstr\@separate#1@\twoSet{\@setFront}{\@setBack}
    \else\@separate|{#1}@\oneSet{\@setBack}\fi}
  \def\setFront#1{\def\@setFront{#1}}
  \def\setBack#1{\def\@setBack{#1}}
\def\set#1{\lb{#1}\rb}
\def\submodel{\mathrel{\preceq}}
\def\theta{\vartheta}
\def\tl{\mathrel{\widetilde<}}
\def\tleq{\mathrel{\widetilde\leq}}
\def\tg{\mathrel{\widetilde>}}
\def\tgeq{\mathrel{\widetilde\geq}}
\def\undefed{\mathclose{\uparrow}}
\newcommand{\xleftrightarrow}[2][]{%
  \mathrel{\mathop{%
    \setbox\z@\vbox{\m@th
      \hbox{$\scriptstyle\;\;{#1}\;\;$}%
      \hbox{$\m@th\scriptstyle\;\;{#2}\;\;$}%
    }%
    \hbox to\ifdim\wd\z@>\minaw@\wd\z@\else\minaw@\fi{%
      \leftrightarrowfill@\displaystyle}}%
  \limits^{#2}\@ifnotempty{#1}{_{#1}}}%
}
\def\zerosharp{0^\sharp}

%% Redefine section-counter.
%% (start at 0 and show only first order numbers in table of contents)
\setcounter{section}{-1}
\setcounter{secnumdepth}{1}

%% Redefine appearance of enumerate environments.
\def\@listI{\leftmargin\leftmargini \topsep\z@ \parsep\parskip \itemsep\z@}
\let\@listi\@listI
\@listi
\renewcommand{\theenumi}{\roman{enumi})}
\renewcommand{\labelenumi}{\theenumi}
\renewcommand{\theenumii}{(\alph{enumii})}
\renewcommand{\labelenumii}{\theenumii}
\renewcommand\p@enumii{}
\renewcommand{\theenumiii}{\roman{enumiii}}
\renewcommand{\labelenumiii}{\theenumiii.}
\renewcommand\p@enumiii{}

%% Create an index.
\makeindex

%% End of pi.sty.
\message{****This was pi's style.******************************************************}
\endinput
