%=====================================================================================================================================
% Package akkmathset by Igor Akkerman (c) 2000, 2001, 2002, 2003, 2004, 2005
% Package providing utilities for typesetting mathematical sets.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License (latest version).
%
% The latest version of this license can be found at
%     http://www.latex-project.org/lppl.txt
%
% This file may only be distributed together with the full 'AkkTeX' bundle.
%=====================================================================================================================================
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{akkmathset}[2005/04/30 1.0.0 by Igor Akkerman (c) 2000, 2001, 2002, 2003, 2004 Package providing utilities for typesetting mathematical sets]
%=====================================================================================================================================

\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{amstext}
\RequirePackage{latexsym}
%-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
\newcommand   \NN                 {{\mathbb N}}
\newcommand   \NNN                {{\NN\minuszero}}
\newcommand   \RR                 {{\mathbb R}}
\newcommand   \RRm                {\RR^m}
\newcommand   \RRn                {\RR^n}
\newcommand   \QQ                 {{\mathbb Q}}
\newcommand   \ZZ                 {{\mathbb Z}}
\newcommand   \CC                 {{\mathbb C}}
\newcommand   \CCm                {\CC^m}
\newcommand   \CCn                {\CC^n}
\newcommand   \KK                 {{\mathbb K}}
\newcommand   \KKm                {\KK^m}
\newcommand   \KKn                {\KK^n}
\newcommand   \LL                 {{\mathbb L}}
\newcommand   \BB                 {{\mathcal B}}
\newcommand   \PP                 {{\mathcal P}}
\newcommand   \VV                 {{\mathcal V}}

\newcommand   \CCC                {{\mathcal C}}

\newcommand   \set[1]             {\{#1\}}
\newcommand   \Set[1]             {\openSet #1 \closeSet}
\newcommand   \openSet            {\!\left\{\left.}
\newcommand   \closeSet           {\right.\right\}\!}

\newcommand   \setcard[1]         {{\left| #1 \right|}}

% `such that' bar
\newcommand   \sth                {\,|\,}
\newcommand   \Sth                {\right| \left.}

\newcommand   \sm                 \setminus
\newcommand   \setcomp[1]         {{\overline{{#1}}}}
\newcommand   \C[1]               {{\setcomp{#1}}}

\newcommand   \zeroset            {{\set 0}}
\newcommand   \minuszero          {{\setminus\zeroset}}
\newcommand   \Minuszero          {{\!\setminus\!\zeroset}}
\newcommand   \mz                 \minuszero
\newcommand   \Mz                 \Minuszero
\newcommand   \pset[1]            {{\PP({#1})}}
\newcommand   \Pset[1]            {{\PP\({#1}\)}}

\newcommand   \Abb                {{\operatorname{Abb}}}
\newcommand   \mker               {{\operatorname{ker}}}
\newcommand   \Ker                {{\operatorname{Ker}}}
\newcommand   \Kern               {{\operatorname{Kern}}}
\newcommand   \Bild               {{\operatorname{Bild}}}
\renewcommand \Im                 {{\operatorname{Im}}}
\newcommand   \End                {{\operatorname{End}}}
\newcommand   \Eig                {{\operatorname{Eig}}}
\newcommand   \Hom                {{\operatorname{Hom}}}
\newcommand   \Mat                {{\operatorname{Mat}}}
\newcommand   \gl                 {{\operatorname{GL}}}
\newcommand   \GL                 {{\operatorname{GL}}}
\newcommand   \mspan[1][]         {{\operatorname{span}\ifset{#1}{\Set{#1}}}}
\newcommand   \Span [1][]         {{\operatorname{Span}\ifset{#1}{\Set{#1}}}}
\newcommand   \erz[1]             {\bigl[#1\bigr]}
\newcommand   \Erz[1]             {\left[#1\right]}

\newcommand   \closure[1]         {{\overline{{#1}}}}
\newcommand   \jset               {{\set{1,\dots,j}}}
\newcommand   \kset               {{\set{1,\dots,k}}}
\newcommand   \nset               {{\set{1,\dots,n}}}
\newcommand   \mset               {{\set{1,\dots,m}}}

% big set union with limits
\newcommand   \Bigcup[1]          {{\bigcup\limits_{#1}}}

% big set intersection with limits
\newcommand   \Bigcap[1]          {{\bigcap\limits_{#1}}}

% equivalence class
\newcommand   \equivclass[2][]    {{[{#2}]_{{#1}}}}
\newcommand   \eqclass[2][]       {{\equivclass{1}{2}}}

% quotient set
\newcommand   \quot[2]            {{{#1}/\!\raisebox{-.575ex}{\ensuremath{#2}}}}

% square set MxM
\newcommand   \sqset[1]           {#1 \times #1}
\newcommand   \sqseta             {\sqset A}
\newcommand   \sqsetb             {\sqset B}
\newcommand   \sqsetc             {\sqset C}
\newcommand   \sqsetcc            {\sqset \CC}
\newcommand   \sqseti             {\sqset I}
\newcommand   \sqsetkk            {\sqset \KK}
\newcommand   \sqsetm             {\sqset M}
\newcommand   \sqsetnn            {\sqset \NN}
\newcommand   \sqsetqq            {\sqset \QQ}
\newcommand   \sqsetr             {\sqset R}
\newcommand   \sqsetrr            {\sqset \RR}
\newcommand   \sqsets             {\sqset S}
\newcommand   \sqsett             {\sqset T}
\newcommand   \sqsetu             {\sqset U}
\newcommand   \sqsetv             {\sqset V}
\newcommand   \sqsetw             {\sqset W}
\newcommand   \sqsetx             {\sqset X}
\newcommand   \sqsety             {\sqset Y}
\newcommand   \sqsetz             {\sqset Z}
\newcommand   \sqsetzz            {\sqset \ZZ}

%------------------------------------------------------------------------------
% families
%------------------------------------------------------------------------------
\newcommand \family[3] {{{\({{#1}_{#2}}\)}_{{#2} \in {#3}}}}
\newcommand \ifam[1] {{\family{#1} i I}}

%------------------------------------------------------------------------------
% elements
%------------------------------------------------------------------------------
\newcommand     \nin        {{n\in\NN}}
\newcommand     \ninn       {{n\in\NNN}}
\newcommand     \kin        {{k\in\NN}}
\newcommand     \kinn       {{k\in\NNN}}
\newcommand     \ini        {{i\in I}}

