%%
%% This is file `cjwmath.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% cjw-latex.dtx  (with options: `math')
%% 
%%     Copyright (C) 1997 by:  Colin J. Wynne <cwynne@mts.jhu.edu>
%% 
%% This file is part of cjw-latex, a collection of package files for
%% LaTeX2e, written by Colin J. Wynne.  It may be freely distributed in
%% any form---electronic, physical, or otherwise---so long as the
%% distributor provides this file in its entirety (including this
%% copyright announcement) and charges no fee (except for reasonable
%% recompense for the duplication process).  Fair 'nough?
%% 
%% I would also prefer that the entire source file `cjw-latex.dtx',
%% together with `cjw-latex.ins', be propagated instead of any one
%% subfile.
%% 
%% Please feel free to improve on or alter any code herein as suits your
%% needs, and by all means notify me of any suggestions, improvements, or
%% requests.
%% 
%% This file is beer-ware.  If you use it and like it, then you should
%% buy me a beer if you ever meet me. :-)
%% 
%% RCS: $Id: cjw-latex.ins,v 1.3 1998/04/10 14:30:18 cwynne Exp $
%% 
\def\RCSinfo{$Id: cjw-latex.dtx,v 0.13 1998/09/01 15:54:20 cwynne Exp $}

\def\RCSsplit $#1: #2,v #3 #4 #5 #6 #7${
  \gdef\filename   {#2}
  \gdef\fileversion{#3}
  \gdef\filedate   {#4}
  \gdef\filetime   {#5}
  \gdef\fileauthor {#6}
  \gdef\filelocker {#7}}

\expandafter\RCSsplit\RCSinfo
%%
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cjwmath}
    [\filedate\space v\fileversion\space
     Math macros for LaTeX2e---CJW]
\newif \if@amsmath
\newif \if@derivatives
\newif \if@integrals
\newif \if@physics
\DeclareOption{amsmath}  {\@amsmathtrue}
\DeclareOption{derivs}   {\@derivativestrue}
\DeclareOption{integrals}{\@integralstrue}
\DeclareOption{physics}  {\@physicstrue}
\DeclareOption{units}{%
  \PackageWarning{cjwmath}%
    {Obsolete option \CurrentOption.  Use package `cjwunits' instead.}}
\DeclareOption*{%
  \PackageWarning{cjwmath}{Unknown option `\CurrentOption'}}
\ProcessOptions
\RequirePackage{cjwmacro}
\RequirePackage{amssymb}
\RequirePackage{amstext}
\RequirePackage{bbm}
\if@amsmath
  \RequirePackage{amsmath}
\fi
\DeclareRobustCommand{\NewMathOp}{%
  \@ifstar{\@makenewop{\displaylimits}}
          {\@makenewop{\nolimits}}}
\def\@makenewop#1{%
  \@ifnextchar [{\@@makenewop{#1}}
    {\@@makenewop{#1}[\operator@font]}}
\def\@@makenewop#1[#2]#3#4{%
  \DeclareRobustCommand{#3}{%
    \mathop{\kern\z@{#2{#4}}}#1}}
\swapdef{\epsilon}{\varepsilon}
\swapdef{\rho}{\varrho}
\swapdef{\nothing}{\varnothing}
\alias\leer\nothing
\alias\@@exists\exists
  \renewcommand{\exists}{\mathrel{\@@exists}}
\alias\@@forall\forall
  \renewcommand{\forall}{\mathrel{\@@forall}}
\newcommand{\st}{\mathrel{\ni}}
\newcommand{\WLOG}{Without loss of generality\xspace}
\newcommand{\Wlog}{without loss of generality\xspace}
\newcommand{\obda}{o.B.d.A.\xspace}
\newcommand{\fp}{floating-point\xspace}
\newcommand{\pneg}{\phantom{-}}
\newcommand{\peq}{\phantom{=}}
\newcommand{\anglebrackets}[1]{%
  \left\langle #1 \right\rangle}
\newcommand{\curlybrackets}[1]{%
  \left\{ #1 \right\}}
\newcommand{\squarebrackets}[1]{%
  \left[ #1 \right]}
\newcommand{\vertbrackets}[1]{%
  \left| #1 \right|}
\newcommand{\Vertbrackets}[1]{%
  \left\| #1 \right\|}
\newcommand{\noarg}{\,\cdot\,}
\newcommand{\ee}[1]{\times10^{#1}}
\newcommand{\half}{\sfrac12}
\newcommand{\ninfty}{-\infty}
\newcommand{\fcn}[2]{\colon{#1}\rightarrow{#2}}
  \newcommand{\mapping}[3]{{#1}\fkt{#2}{#3}}
\alias\fkt\fcn
\newcommand{\restr}[2][\big]{\kern -.1em #1|_{#2}}
\if@amsmath
  \realias\choose\binom
\else
  \renewcommand{\choose}[2]{{{#1}\atopwithdelims(){#2}}}
\fi
\newcommand{\mchoose}[2]{%
  \mathchoice%
   {\left(\kern-0.48em\choose{#1}{#2}\kern-0.48em\right)}
   {\left(\kern-0.30em
        \choose{\smash{#1}}{\smash{#2}}\kern-0.30em\right)}
   {\left(\kern-0.30em
        \choose{\smash{#1}}{\smash{#2}}\kern-0.30em\right)}
   {\left(\kern-0.30em
        \choose{\smash{#1}}{\smash{#2}}\kern-0.30em\right)}
  }
\newcommand{\Comb}[2]{%                         %   C
  {}_{#1}{\operator@font C}_{#2}}               % #1 #2
\newcommand{\Komb}[2]{%                         %          #2
  {\operator@font Ko}_{#1}^{#2}}                %        Ko
\newcommand{\Kombun}[2]{\Komb{#1,\neq}{#2}}     %          #1
\newcommand{\Perm}[2]{%                         %                #2
  {\operator@font Pe}_{#1}^{#2}}                %              Pe
\newcommand{\Permun}[2]{\Perm{#1,\neq}{#2}}     %                #1
\newcommand{\set}[3][|]{{%
  \newdimen\@tempdimd%
  \setbox0=\mathbox{#2}\@tempdima=\ht0 \@tempdimb=\dp0%
  \setbox0=\mathbox{#3}\@tempdimc=\ht0 \@tempdimd=\dp0%
  \ifdim\@tempdimc > \@tempdima
    \@tempdima=\@tempdimc
  \fi
  \ifdim\@tempdimd > \@tempdimb
    \@tempdimb=\@tempdimb
  \fi
  \def\@tempa{\vrule width0pt height\@tempdima depth\@tempdimb}
  \def\@tempb{#1}
  \ifx\@empty\@tempb
    \def\@tempb{.}
  \fi
  \left.\left\{ \@tempa{#2} \,\expandafter\right\@tempb\,{#3} \right\} }}
\alias\setl\set
\alias\setr\set
\newcommand{\lvl}[2][\alpha]{\Gamma\ssb{#2}\ssp{(#1)}}
\if@amsmath
  \newcommand{\fset}[1]{\Tilde{#1}}
\else
    \newcommand{\fset}[1]{\tilde{#1}}
\fi
\newcommand{\flvl}[2][\alpha]{\lvl[#1]{\fset{#2}}}
\alias\coll\mathcal
\alias\scomp\setminus
\alias\coset\backslash
\newcommand{\symmdiff}{%
  \mathbin{\text{\footnotesize$\bigtriangleup$}}}
\newcommand{\seq}    [1]   {\curlybrackets{#1}}
\newcommand{\inset}  [2][1]{\in\{ #1,\ldots,#2 \}}
\newcommand{\inrange}[2][1]{ = #1,\ldots,#2}
\if@derivatives
  \InputIfFileExists{cjwderiv.tex}{}{%
    \PackageWarning{cjwmath}{Option `cjwderiv.tex' not found.}
    \@@derivativesfalse}
\fi
\if@integrals
  \InputIfFileExists{cjwinteg.tex}{}{%
    \PackageWarning{cjwmath}{Option `cjwinteg.tex' not found.}
    \@@integralsfalse}
\fi
\alias\alg\mathbbm
\alias\field\mathbbm
\newcommand{\C}{\field{C}}      % Complex
\newcommand{\E}{\field{E}}      % Euclidean (also Evens)
\alias\latex@H\H                % Quaternions
  \renewcommand{\H}{\field{H}} %   (Hamiltonian field)
\newcommand{\N}{\field{N}} % Natural numbers
\newcommand{\Q}{\field{Q}} % Rationals
\newcommand{\R}{\field{R}} % Reals
\newcommand{\Z}{\field{Z}} % Integers
\newcommand{\pr}{\field{P}} % Primes
\NewMathOp           {\Aut}{Aut} % Automorphisms
\NewMathOp           {\End}{End} % Endomorphisms
\NewMathOp           {\GL}{GL} % General Linear
\NewMathOp           {\Inn}{Inn} % Inner products
\NewMathOp           {\Pin}{Pin} % Pin
\NewMathOp           {\SL}{SL} % Special Linear
\NewMathOp           {\SO}{SO} % Special Orthogonal
\NewMathOp           {\SU}{SU} % Special Unitary
\NewMathOp[\mathfrak]{\Sn}{S} % Symmetric
\NewMathOp           {\Spin}{Spin} % Spin
\NewMathOp           {\Sp}{Sp} % Symplectic
\NewMathOp           {\Unit}{U\kern 0pt}% Unitary
\NewMathOp           {\Orth}{O\kern 0pt}% Orthogonal
\NewMathOp[\mathfrak]{\slin}{sl}        % Tangent group to SL
\NewMathOp[\mathfrak]{\so}{o\kern 0pt}  % skew orthogonal
\NewMathOp[\mathfrak]{\sp}{sp}          % skew symplectic
\NewMathOp[\mathfrak]{\su}{u\kern 0pt}  % skew hermitian
\alias\mtx\mathcal
\newcommand{\nullmtx}{\mtx\Theta}
\newcommand{\mnorm}[1]{%
  \left\vert\kern-0.9pt\left\vert\kern-0.9pt\left\vert #1
    \right\vert\kern-0.9pt\right\vert\kern-0.9pt\right\vert}
\newcommand{\lie}[1]{\squarebrackets{#1}}
\NewMathOp{\Spur}{Spur}
\NewMathOp{\Tr}{Tr}
\NewMathOp{\Diag}{Diag}
\if@amsmath
  \newenvironment{arbmatrix}[2]%
    {\def\@tempa{#2}\left#1 \matrix}{\endmatrix \right\@tempa}
\else
  \newcommand{\arbmatrix}[3]{\left#1 \matrix{#2} \right#3}
  \providecommand{\bmatrix}[1]{\arbmatrix[{#1}]}
  \providecommand{\vmatrix}[1]{\arbmatrix|{#1}|}
\fi
\newlength{\numoffset}
{\setbox0=\hbox{$\Bigmathstrut$}
 \@tempdima=0.8\ht0\relax
 \global\numoffset\@tempdima}
\newcommand{\Number}[2][-\numoffset]{%
  \@tempdima=#1\relax
  \smash{\hbox{\raise\@tempdima\@bignumber{#2}}}}
\newcommand{\@bignumber}[1]{\hbox{\LARGE$#1$}}
\def\bignumber    #1{\multicolumn{2}{c}{\Number{#1}}}
\def\Bignumber[#1]#2{\multicolumn{2}{c}{\Number[#1]{#2}}}
\newcommand{\Zero}[1][-\numoffset]{\Number[#1]{0}}
\def\bigzero    {\bignumber{0}}
\def\Bigzero[#1]{\Bignumber[#1]{0}}
\if@amsmath
  \newcommand{\iidiagi}[4][-\numoffset]{%       % 2     0
    \begin{bmatrix}                             %   3
       #2 &        &    \Bigzero[#1] \\         %     .
          &     #3 &        &        \\         %       .
      \Bigzero[#1] & \ddots &        \\         %   0     4
          &        &        &    #4
    \end{bmatrix}}
  \newcommand{\idiagii}[4][-\numoffset]{%       % 2     0
    \begin{bmatrix}                             %   .
       #2 &        & \Bigzero[#1] \\            %     .
          & \ddots &     &        \\            %       3
      \Bigzero[#1] &  #3 &        \\            %   0     4
          &        &     &    #4
    \end{bmatrix}}
  \newcommand{\idiagi}[3][-1.2pt]{%             % 2     0
    \begin{bmatrix}                             %   .
       #2 &         \Bigzero[#1] \\             %     .
          & \ddots  &            \\             %       .
      \Bigzero[#1]  &    #3                     %   0     3
    \end{bmatrix}}
\else
  \newcommand{\iidiagi}[4][-\numoffset]{%       % 2     0
    \matrix{%                                   %   3
       #2 &        &    \Bigzero[#1] \\         %     .
          &     #3 &        &        \\         %       .
     \Bigzero[#1] & \ddots &        \\          %   0     4
          &        &        &    #4}}
  \newcommand{\idiagii}[4][-\numoffset]{%
    \pmatrix{%                                  % 2     0
       #2 &        & \Bigzero[#1] \\            %   .
          & \ddots &     &        \\            %     .
      \Bigzero[#1] &  #3 &        \\            %       3
          &        &     &    #4}}              %   0     4
                                  %
  \newcommand{\idiagi}[3][-1.2pt]{%             % 2     0
    \pmatrix{%                                  %   .
       #2 &         \Bigzero[#1] \\             %     .
          & \ddots  &            \\             %       .
      \Bigzero[#1]  &    #3}}                   %   0     3
\fi
\newcommand{\@trans}[2][]{^{#1\text{\normalfont\textsf{t}}#2}}
\newcommand{\trans} [1][]{\@trans[]{#1}}
\newcommand{\trinv}      {\@trans[-]{}}
\newcommand{\ct}[1]{\conj{#1}\trans}
\alias\sarvec\vec
\alias\arvec \overrightarrow
\renewcommand{\vec}[1]{\Mathbox{\boldmath}{#1}}
\if@amsmath
  \newcommand{\bvec}[1]{%
    \begin{bmatrix}#1\end{bmatrix}}
  \newcommand{\pvec}[1]{%
    \begin{pmatrix}#1\end{pmatrix}}
  \alias\brvec\bvec
  \alias\prvec\pvec
\else
  \newcommand{\bvec}[1]{\bmatrix{#1}}
  \newcommand{\pvec}[1]{\pmatrix{#1}}
\fi
\newcommand{\nullvec}{\vec{0}}
\newcommand{\dotp}[1]{\anglebrackets{#1}}
\newcommand{\vdotp}[1]{\@vdotp#1@@@}
\def\@vdotp #1,#2@@@{\dotp{\vec #1,\vec #2}}
\newcommand{\del}  {\vec\nabla}
\alias\@@div\div
\renewcommand{\div}{\del\dot}
\newcommand{\curl} {\del\cross}
\newcommand{\lapl} {\del^2}
\alias\huelle\squarebrackets
\newcommand{\by}{\mathord{\times}}
\alias\mal \times
\alias\cross \times
\alias\iso \simeq
\alias\nsubgrp \trianglelefteq
\realias\cong   \equiv
\alias\adj\leftrightarrow
\providecommand{\Box}{}
\renewcommand{\Box}{\mathbin{\square}}
\newcommand{\teilt}{\mathbin{|}}
  \alias\divides\teilt
\newcommand{\defeq}{\stackrel{\text{def}}{=}}
\newcommand{\uminus}{%
  \,\,{\mathbin{\cup\kern-.6em{\raise.05em%
  \hbox{-\negthinspace-\kern-.25em-}}}}\,\,}
\newcommand{\Uminus}{%
  \mathop{\bigcup\kern-0.9em{\raise.05em%
  \hbox{-\negthinspace-\kern-.25em-}}}}
\providecommand{\implies}{\;\Longrightarrow\;}
  \alias\then\implies
\if@amsmath
  \newcommand{\when}{\DOTSB \;\Longleftarrow \;}
\else
  \newcommand{\when}{\;\Longleftarrow \;}
\fi
\newcommand{\limplies}{\llap{$\implies$}\quad}
\newcommand{\sfrac}[2]{%
  \hbox{\kern 0.1em%
  \raise 0.5ex\hbox {\scriptsize$#1$}%
  \kern -0.1em $/$%
  \kern -0.15em%
  \lower 0.25ex\hbox {\scriptsize$#2$}}%
  \kern  0.2em}
\providecommand{\tfrac}{\sfrac}
\providecommand{\dfrac}[2]{{{#1}\over{#2}}}
\alias\sbar\bar
  \renewcommand{\bar}[1]{\overline{#1}}
\alias\stilde\tilde
  \alias\retilde\widetilde
\alias\shat\hat
  \realias\hat\widehat
\renewcommand{\Im}{%
  \mathop{\mathfrak{Im}}}
\renewcommand{\Re}{%
  \mathop{\mathfrak{Re}}}
\alias\conj  \bar
\newcommand{\inv}{^{-1}}
\@ifundefined{mathscript}
  {\newcommand{\Pow}{\raise 0.4ex\Mathbox{\Large}{\wp}}}
  {\NewMathOp[\mathscript]{\Pow}{P}}
\alias\Pot\Pow
\newcommand{\1}{\mathbbm{1}}
\alias\acos\arccos
\alias\asin\arcsin
\alias\atan\arctan
\alias\abs \vertbrackets
\alias\ord \abs
\alias\cyc \anglebrackets
\alias\norm\Vertbrackets
\newcommand{\dsum}{\mathop{\sum\sum}\limits}
\newcommand{\tsum}{\mathop{\sum\sum\sum}\limits}
\newcommand{\nsum}{\mathop{\sum\sum\cdots\sum}\limits}
\NewMathOp*{\ulim}{lim\raise0.4ex\mathbox{\mathord{\smash{\uparrow}}}}
\NewMathOp*{\dlim}{lim\raise0.4ex\mathbox{\mathord{\smash{\downarrow}}}}
\NewMathOp*{\argmax}{arg\,max}          % arg min
\NewMathOp*{\argmin}{arg\,min}          % arg min
\NewMathOp {\Aff}   {Aff}               % Affine hull
\NewMathOp {\Bild}  {Bild}              % Bild
\NewMathOp {\Cone}  {Cone}              % Cone
\NewMathOp {\Conv}  {Conv}              % Convex hull
\NewMathOp {\Core}  {Core}              % Fuzzy set core
\NewMathOp {\diam}  {diam}              % diameter
\NewMathOp {\dom}   {dom}               % Domain
\NewMathOp {\Epi}   {Epi}               % Epigraph
\NewMathOp*{\esssup}{ess\,sup}          % Essential supremum
\NewMathOp {\fl}    {fl}                % float-point
\NewMathOp {\ggT}   {ggT}               % ggT
\NewMathOp {\Grad}  {Grad}              % Grad
\NewMathOp {\Hypo}  {Hypo}              % Hypograph
\NewMathOp {\Int}   {Int}               % Interior
\NewMathOp {\Kern}  {Kern}              % Kernel
\NewMathOp {\kgV}   {kgV}               % kgV
\NewMathOp {\Lin}   {Lin}               % Linear hull
\NewMathOp {\lcm}   {lcm}               % LCM
\NewMathOp {\Ord}   {Ord}               % order
\NewMathOp {\proj}  {proj}              % Projection
\NewMathOp {\Rang}  {Rang}              % Rang
\NewMathOp {\range} {range}             % Range
\NewMathOp {\Rank}  {Rank}              % Rank
\NewMathOp {\rot}   {rot}               % Rotation
\NewMathOp {\Span}  {Span}              % Span
\NewMathOp {\val}   {val}               % value
\if@physics
  \InputIfFileExists{cjwphys.tex}{}{%
    \PackageWarning{cjwmath}{Option `cjwphys.tex' not found.}
    \@@physicsfalse}
\fi
\NewMathOp{\Prob} {P}                   % Probability operator
\NewMathOp{\Corr} {Corr}                % Correlation
\NewMathOp{\Cov}  {Cov}                 % Covariance
\NewMathOp{\Expct}{E}                   % Expectation
\NewMathOp{\SD}   {SD}                  % Standard Deviation.
\NewMathOp{\Var}  {Var}                 % Variance
\newcommand{\given}{\,|\,}
\alias\distrib\sim
\NewMathOp{\Bin} {Bin}                  % Binary dist.
  \newcommand{\Nbin}{-\!\Bin}           % Negative Binom.
\NewMathOp{\Exp} {Exp}                  % Exponential dist.
\NewMathOp{\Geom}{Geom}                 % Geometric dist.
\NewMathOp{\Norm}{Norm}                 % Normal dist.
\NewMathOp{\Poi} {Poi}                  % Poisson dist.
\NewMathOp{\Unif}{Unif}                 % Uniform dist.
\NewMathOp[\mathfrak]{\Ndens}{N}
\NewMathOp[\mathfrak]{\Ndist}{n}
\NewMathOp*{\@mapsto}{\mapstochar\rightarrow}
\newcommand{\@probconv}[1]{\mathrel{\@mapsto\limits^{1}}}
  \newcommand{\asconv}{\@probconv{a.s.}}        % Almost sure conv.
  \newcommand{\inprob}{\@probconv{P}}           % Conv. in probability
  \newcommand{\inlaw} {\@probconv{L}}           % Conv. in law
  \newcommand{\vague} {\@probconv{v}}           % Vague conv.
\endinput
%%
%% End of file `cjwmath.sty'.
