%%
%%  File: uwbgeom.sty
%%
%%  Author: Krzysztof Pra\.zmowski and Mariusz \.Zynel
%%
%%  Description: LaTeX package providing macros specific for geometry.
%%
%%  Create date: Feb 12, 2000
%%
%%  Last modified: May 17, 2014
%%
%%
%%  Copyright (c) 2000-2002 Krzysztof Prazmowski <krzypraz@math.uwb.edu.pl>
%%      and Mariusz Zynel <mariusz@math.uwb.edu.pl>.
%%
%%  This  software  is  FREE.  You can use  and/or  redistribute  it for any
%%  purpose in either,  modified, or unmodified form, under the terms of the
%%  GNU General Public License as published by the Free Software Foundation.
%%
%%  The above copyright notice and this permission  notice shall be included
%%  in all copies or substantial portions of this software.
%%
%%  THIS  SOFTWARE IS PROVIDED AS IS AND COME WITH NO WARRANTY  OF ANY KIND,
%%  EITHER  EXPRESSED OR IMPLIED.  IN NO EVENT WILL THE COPYRIGHT  HOLDER BE
%%  LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE.
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{uwbgeom}[2014/05/17 v0.19 UwB Geometry Package]
\typeout{UwB Geometry Package v0.19 <2014/05/17> (KP&MZ)}

\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{math}}

\ExecuteOptions{regquant}
\ProcessOptions\relax
\RequirePackage{math}[2000/05/17 v3.3]

\newbox\@tmpboxa
\newbox\@tmpboxb

% General operators
\DeclareMathOperator{\Af}{Af}
\DeclareMathOperator{\Between}{\mathbf{B}}
\DeclareMathOperator{\Closure}{\mathbf{Cl}}
\DeclareMathOperator{\Comp}{Comp}
\DeclareMathOperator{\Cone}{\Lambda}
\DeclareMathOperator{\Cotrace}{Ctr}
\DeclareMathOperator{\Cylinder}{C}
\DeclareMathOperator{\Dil}{Dil}
\DeclareMathOperator{\Horizon}{\mathbf{H}}
\DeclareMathOperator{\Iz}{Iz}
\DeclareMathOperator{\Izt}{Izt}
\DeclareMathOperator{\Quadric}{Q}
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\Trace}{Trc}

% General notations
\def\Points{\mathrm{S}}
\def\Lines{\mathcal{L}}
\let\Inc\mid
\let\NInc\nmid
\let\Coll\sim
\def\NColl{\not\sim}
\let\Connect\simeq
\def\NConnect{\mathrel{\not\simeq}}
\def\LineOn(#1,#2){\overline{#1, #2\strut}}
\def\InDir{\mathbin{\ast}}

% Affine space
\def\AffineSpSymb{\mathbf{A}}
\let\AffineSp\AffineSpSymb

% Projective space
\def\ProjectiveSpSymb{\mathbf{P}}
\let\ProjectiveSp\ProjectiveSpSymb

% Space of pencils
\def\SpPencils(#1,#2){\ensuremath{\ProjectiveSpSymb_{#1}(#2)}}
\def\SpPencilsPoints(#1,#2){\ensuremath{\Sub_{#1}(#2)}}
\def\SpPencilsLines(#1,#2){\ensuremath{{\mathcal{P}_{#1}(#2)}}}
\def\SpPencilsSig(#1,#2){%
    \ensuremath{\bstruct{%
        \SpPencilsPoints(#1,#2),
	\SpPencilsLines(#1,#2)}}}
\def\PencilSymb{\mathbf{p}}
\def\Pencil(#1,#2){\mathop{\PencilSymb}(#1, #2)}
\def\Seg(#1,#2,#3){\ensuremath{\seg{#1}{#2}_{#3}}}
\def\Stars{\mathcal{S}}
\def\Tops{\mathcal{T}}
\def\StarOf{\mathop{\boldsymbol{S}}}
\def\TopOf{\mathop{\boldsymbol{T}}}

% Grassmann space
\def\GrassmannSpSymb{\mathbf{G}}
\def\GrassmannSp(#1,#2,#3){\ensuremath{\GrassmannSpSymb_{#1, #2}(#3)}}
\def\GrassmannSpPoints(#1,#2){\ensuremath{\Sub_{#1}(#2)}}
\def\GrassmannSpLines(#1,#2){\ensuremath{\Sub_{#1}(#2)}}
\def\GrassmannSpSig(#1,#2,#3){%
    \ensuremath{\bstruct{%
        \GrassmannSpPoints(#1,#3),
	\GrassmannSpLines(#2,#3)}}}

% Spine space
\def\SpineSp(#1,#2,#3,#4){\ensuremath{\AffineSpSymb_{#1, #2}(#3, #4)}}
\def\SpineSpPoints(#1,#2,#3){\ensuremath{\mathcal{F}_{#1, #2}(#3)}}
\def\SpineSpLines(#1,#2,#3){\ensuremath{\mathcal{G}_{#1, #2}(#3)}}
\def\SpineSpSig(#1,#2,#3,#4){%
    \ensuremath{\bstruct{%
        \SpineSpPoints(#1,#2,#4),
	\SpineSpLines(#1,#2,#4)}}}
\let\SpineSpPar\parallel
\def\SpineSpExtSig(#1,#2,#3,#4){%
    \ensuremath{\bstruct{%
        \SpineSpPoints(#1,#2,#4),
	\SpineSpLines(#1,#2,#4),
	\SpineSpPar}}}
\def\SpinePencil{\mathop{\widehat{\PencilSymb}}}
\def\SpineSeg(#1,#2){\Seg(#1,#2,\mathcal{F})}

\def\aColl{\mathrel{\Coll^\alpha}}
\def\oColl{\mathrel{\Coll^\omega}}
\def\tColl{\mathrel{\Coll^\tau}}
\def\sColl{\mathrel{\Coll^\sigma}}

\def\@aLinesx{\Lines^\alpha}
\def\@oLinesx{\Lines^\omega}
\def\@sLinesx{\Lines^\sigma}
\def\@ProjLinesx{\Lines}
\def\@AffineLinesx{\mathcal{A}}

\def\@aLinesy(#1,#2,#3){\@aLinesx_{#1, #2}(#3)}
\def\@oLinesy(#1,#2,#3){\@oLinesx_{#1, #2}(#3)}
\def\@sLinesy(#1,#2,#3){\@sLinesx_{#1, #2}(#3)}
\def\@ProjLinesy(#1,#2,#3){\@ProjLinesx_{#1, #2}(#3)}
\def\@AffineLinesy(#1,#2,#3){\@AffineLinesx_{#1, #2}(#3)}

\def\aLines{\@ifnextchar({\@aLinesy}{\@aLinesx}}
\def\oLines{\@ifnextchar({\@oLinesy}{\@oLinesx}}
\def\sLines{\@ifnextchar({\@sLinesy}{\@sLinesx}}
\def\ProjLines{\@ifnextchar({\@ProjLinesy}{\@ProjLinesx}}
\def\AffineLines{\@ifnextchar({\@AffineLinesy}{\@AffineLinesx}}
\let\AfLines\AffineLines

\def\Complete(#1){\ensuremath{\overline{#1}}}
\def\Improper(#1){\ensuremath{#1^\infty}}

\def\aStars(#1,#2,#3){\Stars^\alpha_{#1, #2}(#3)}
\def\oStars(#1,#2,#3){\Stars^\omega_{#1, #2}(#3)}
\def\aTops(#1,#2,#3){\Tops^\alpha_{#1, #2}(#3)}
\def\oTops(#1,#2,#3){\Tops^\omega_{#1, #2}(#3)}
\let\StarsOut\aStars \let\StarsIn\oStars
\let\TopsOut\aTops \let\TopsIn\oTops

\def\aConnect{\@ifnextchar*{\mathrel{\Connect^\alpha_\ast}\@gobble}{\mathrel{\Connect^\alpha}}}
\def\oConnect{\@ifnextchar*{\mathrel{\Connect^\omega_\ast}\@gobble}{\mathrel{\Connect^\omega}}}
\def\tConnect{\mathrel{\Connect^\tau}}
\def\sConnect{\@ifnextchar*{\mathrel{\Connect^\sigma_\ast}\@gobble}{\mathrel{\Connect^\sigma}}}

\def\aComp{\Comp^\alpha}
\def\oComp{\Comp^\omega}
\def\tComp{\Comp^\tau}
\def\sComp{\Comp^\sigma}
\let\CompOut\aComp \let\CompIn\oComp \let\DublComp\tComp

\def\WhiteDiamondSymb{\mathchoice%
  {\scriptstyle\lozenge}{\scriptstyle\lozenge}%
  {\scriptscriptstyle\lozenge}{\scriptscriptstyle\lozenge}}
\def\BlackDiamondSymb{\mathchoice%
  {\scriptstyle\blacklozenge}{\scriptstyle\blacklozenge}%
  {\scriptscriptstyle\blacklozenge}{\scriptscriptstyle\blacklozenge}}
\def\WhiteDiamond{\mathrel{\WhiteDiamondSymb}}
\def\BlackDiamond{\mathrel{\BlackDiamondSymb}}

\def\WDiamParallelSymb{{\parallel_{\mkern-2mu\WhiteDiamondSymb}}}
\def\NWDiamParallelSymb{{\nparallel_{\mkern-2mu\WhiteDiamondSymb}}}
\def\WDiamParallel{\mathrel{\WDiamParallelSymb}}
\def\NWDiamParallel{\mathrel{\NWDiamParallelSymb}}

\def\BDiamParallelSymb{{\parallel_{\mkern-2mu\BlackDiamondSymb}}}
\def\NBDiamParallelSymb{{\nparallel_{\mkern-2mu\BlackDiamondSymb}}}
\def\BDiamParallel{\mathrel{\BDiamParallelSymb}}
\def\NBDiamParallel{\mathrel{\NBDiamParallelSymb}}

\let\DiamParallelSymb\BDiamParallelSymb
\let\DiamParallel\BDiamParallel
\let\NDiamParallel\NBDiamParallel

\def\DiamImproper(#1){\ensuremath{#1^{\BlackDiamondSymb}}}

\def\NatHorizon{\mathop{\Horizon^\infty}}
\def\DiamHorizon{\mathop{\Horizon^{\BlackDiamondSymb}}}
\def\NatClosure{\ensuremath{\mathop{\Closure^\infty}}}
\def\DiamClosure{\ensuremath{\mathop{\Closure^{\BlackDiamondSymb}}}}

\def\InDiamDir{\mathbin{\ast_{\BlackDiamondSymb}}}

\def\MapTrace(#1){{#1}_\mathrm{Trc}}
\def\MapCotrace(#1){{#1}_\mathrm{Ctr}}
\def\MapEx(#1){{#1}_\mathrm{Ex}}

% Miscelanea
\newcommand*{\OrtCom}[2]{#1^{\bot_{#2}}}
\newcommand*{\DblOrtCom}[2]{#1^{\bot_{#2}\bot_{#2}}}

\def\DQuotForm#1#2{#1\mkern-3mu\lower.52ex\hbox{$\scriptstyle/%
  \mkern-1.5mu\lower.4ex\hbox{$\scriptstyle#2$}$}}
\def\SQuotForm#1#2{\scriptstyle#1\mkern-3mu\lower.4ex\hbox{$\scriptscriptstyle/%
  \mkern-2mu\lower.3ex\hbox{$\scriptscriptstyle#2$}$}}
\newcommand*{\QuotForm}[2]{{\ensuremath{%
  \mathchoice{\DQuotForm{#1}{#2}}{\DQuotForm{#1}{#2}}%
    {\SQuotForm{#1}{#2}}{\SQuotForm{#1}{#2}}}}}

\newcommand*\ladhere{\mathrel{\vartriangleleft\mid}}
\newcommand*\radhere{\mathrel{\mid\vartriangleright}}
\newcommand*\adhere{\mathrel{\vartriangleleft\mid\vartriangleright}}
\newcommand*\udhere{\mathrel{\vartriangleleft!\vartriangleright}}

\def\@tarrow#1#2#3{\mathrel{%
   \baselineskip\normalbaselineskip \lineskip\normallineskip%
   \lineskiplimit\lineskip%
   \setbox\@tmpboxa=\hbox{$#1\rightarrow$}
   \setbox\@tmpboxb=\hbox to 0.85\wd\@tmpboxa{\hfil$#1\vert$\hfil}
   \raise#2ex\vbox{\box\@tmpboxa\kern#3\ht\@tmpboxb\box\@tmpboxb}}}
\def\dtarrow{\@tarrow\displaystyle{.3}{-1}}
\def\starrow{\@tarrow\scriptstyle{.2}{-1.6}}
\def\sstarrow{\@tarrow\scriptscriptstyle{.15}{-2.3}}
\def\bfdtarrow{\@tarrow{\displaystyle\boldsymbol}{.3}{-1}}
\def\bfstarrow{\@tarrow{\scriptstyle\boldsymbol}{.2}{-1.6}}
\def\bfsstarrow{\@tarrow{\scriptscriptstyle\boldsymbol}{.15}{-2.3}}

\newcommand{\tarrow}{\mathchoice%
   {\dtarrow}{\dtarrow}{\starrow}{\sstarrow}}
\newcommand{\bftarrow}{\mathchoice%
   {\bfdtarrow}{\bfdtarrow}{\bfstarrow}{\bfsstarrow}}

\def\dprojsign{%
   \baselineskip\normalbaselineskip \lineskip\normallineskip
   \lineskiplimit\lineskip
   \setbox\@tmpboxa=\hbox{$\scriptstyle\circ$}%
   \vcenter{%
     \kern-1.6ex\hbox to\wd\@tmpboxa{$\mkern-1.2mu\scriptscriptstyle\top$\hss}%
     \kern-1.8ex\hbox to\wd\@tmpboxa{\hfill$\scriptstyle\vert$\hfill}%
     \kern-1.3ex\hbox to\wd\@tmpboxa{\hfill$\scriptstyle\downarrow$\hfill}%
     \kern-4.2ex\box\@tmpboxa}\leavevmode\boxz@}
\def\tprojsign{%
   \baselineskip\normalbaselineskip \lineskip\normallineskip
   \lineskiplimit\lineskip
   \setbox\@tmpboxa=\hbox{$\scriptscriptstyle\circ$}%
   \null\,\vcenter{%
     \kern-1.3ex\hbox to\wd\@tmpboxa{$\mkern-1.6mu\scriptscriptstyle\top$\hss}%
     \kern-2ex\hbox to\wd\@tmpboxa{\hfill$\scriptscriptstyle\vert$\hfill}%
     \kern-1.8ex\hbox to\wd\@tmpboxa{\hfill$\scriptscriptstyle\downarrow$\hfill}%
     \kern-4ex\box\@tmpboxa}\leavevmode\boxz@}
\def\dprojarg#1#2#3{\null\,\vcenter{
  \baselineskip6pt \lineskip1.5pt \lineskiplimit\lineskip
     \hbox{$\scriptstyle#1$}%
     \hbox{$\scriptstyle#2$}%
     \hbox{$\scriptstyle#3$}}}
\def\tprojarg#1#2#3{\null\,\vcenter{
  \baselineskip5pt \lineskip1.5pt \lineskiplimit\lineskip
     \hbox{$\scriptscriptstyle#1$}%
     \hbox{$\scriptscriptstyle#2$}%
     \hbox{$\scriptscriptstyle#3$}}}
\def\dproj(#1,#2,#3){\mathop{\dprojsign\kern-.2ex\dprojarg{#1}{#2}{#3}}}
\def\tproj(#1,#2,#3){\mathop{\tprojsign\kern-.2ex\tprojarg{#1}{#2}{#3}}}
\def\proj(#1,#2,#3){{\ensuremath{%
  \mathchoice{\dproj({#1},{#2},{#3})}{\tproj({#1},{#2},{#3})}%
    {\tproj({#1},{#2},{#3})}{\tproj({#1},{#2},{#3})}}}}

\endinput
%%
%% End of file `uwbgeom.sty'.
