%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% complexity - a LaTeX package that defines commands to typeset
% Computational Complexity Classes such as $\P$ and $\NP$ (as well
% as hundreds of others).  It also offers several options including
% which font classes are typeset in and how many are defined (all
% of them or just the basic, most commonly used ones).
%
% Written by Chris Bourke <cbourke@cse.unl.edu>
%
% No dependencies other than the standard ifthen package.
% See complexity.pdf for full documentation
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Changes made (.75 -> .76)
%   -Fixed a spacing bug that may cause extra spaces when not in math
%    mode. Thanks to Nicolas Markey
%  Changes made (.50 -> .75)
%   -Fixed a few misc. bugs
%   -Added negative kerning for \BPPpath, \FPTnu, \FPTsu, \QMIPle, \QMIPne, \XPuniform
%   -Added more {} brackets to all commands using sub/super scripts to ensure
%    proper behavior when they are used as super/subscripts themselves.
%   -Raised the hyphen and added kerning for all classes with hyphens adjoining capital
%    letters
%   -Made a few new internal commands (\complexity@possiblymakesmaller and
%    \complexity@fontcommand) to support a new option: small which typesets
%    classes in inline and display modes a point smaller than the default text
%    size.  Special thanks to Till Tantau for the suggestions and code
%   -Defined separate commands \lang and \func for languages and function classes with
%    full options.
%   -Updated Documentation
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NeedsTeXFormat{LaTeX2e} %
\ProvidesPackage{complexity}[3/22/05 \space v0.75]

% Require Packages
%\RequirePackage{keyval}[1997/11/10]
\RequirePackage{ifthen}

% Declare internal commands
\newcommand\complexity@possiblymakesmaller[1]{#1} % default: do nothing
\newcommand\complexity@fontcommand{\mathsf} % default: do noting
\newcommand{\ComplexityFont}[1]{%
{\ensuremath{\complexity@possiblymakesmaller{\complexity@fontcommand{#1}}}}%extra {} makes everyone happy.
}

\newcommand{\lang}[1]{{\ensuremath{\mathsf{#1}}}}
\newcommand{\func}[1]{{\ensuremath{\mathsf{#1}}}}

\newboolean{complexity@fullmode} %
\setboolean{complexity@fullmode}{true}
\DeclareOption{full}{%
  \setboolean{complexity@fullmode}{true}%
} %
\DeclareOption{basic}{%
  \setboolean{complexity@fullmode}{false}%
} %

%%Begin Till Here
%\DeclareOption{roman}{\renewcommand{\complexity@fontcommand{\mathrm}}}
%\DeclareOption{bold}{\renewcommand{\complexity@fontcommand{\mathbf}}}
%...

\DeclareOption{sanserif}{
  \renewcommand{\complexity@fontcommand}{\mathsf}
  %old: \renewcommand{\ComplexityFont}[1]{{\ensuremath{\mathsf{#1}}}}
  \renewcommand{\lang}[1]{{\ensuremath{\mathsf{#1}}}}
  \renewcommand{\func}[1]{{\ensuremath{\mathsf{#1}}}}
}

\DeclareOption{roman}{
  \renewcommand{\complexity@fontcommand}{\mathrm}
  %old: \renewcommand{\ComplexityFont}[1]{{\ensuremath{\mathrm{#1}}}}
  \renewcommand{\lang}[1]{{\ensuremath{\mathrm{#1}}}}
  \renewcommand{\func}[1]{{\ensuremath{\mathrm{#1}}}}
}

\DeclareOption{bold}{
  \renewcommand{\complexity@fontcommand}{\mathbf}
  %old: \renewcommand{\ComplexityFont}[1]{{\hbox{\ensuremath{\mathbf{#1}}}}}
  \renewcommand{\lang}[1]{{\ensuremath{\mathbf{#1}}}}
  \renewcommand{\func}[1]{{\ensuremath{\mathbf{#1}}}}
}

\DeclareOption{typewriter}{
  \renewcommand{\complexity@fontcommand}{\mathtt}
  %old: \renewcommand{\ComplexityFont}[1]{{\ensuremath{\mathtt{#1}}}}
  \renewcommand{\lang}[1]{{\ensuremath{\mathtt{#1}}}}
  \renewcommand{\func}[1]{{\ensuremath{\mathtt{#1}}}}
}

\DeclareOption{italic}{
  \renewcommand{\complexity@fontcommand}{\mathit}
  %old: \renewcommand{\ComplexityFont}[1]{{\ensuremath{\mathit{#1}}}}
  \renewcommand{\lang}[1]{{\ensuremath{\mathit{#1}}}}
  \renewcommand{\func}[1]{{\ensuremath{\mathit{#1}}}}
}

\DeclareOption{caps}{
  \renewcommand{\complexity@fontcommand}{\textsc}
  %old: \renewcommand{\ComplexityFont}[1]{{\ensuremath{\textsc{#1}}}}
  \renewcommand{\lang}[1]{{\ensuremath{\textsc{#1}}}}
  \renewcommand{\func}[1]{{\ensuremath{\textsc{#1}}}}
}

\DeclareOption{slant}{
  \renewcommand{\complexity@fontcommand}{\textsl}
  %old: \renewcommand{\ComplexityFont}[1]{{\ensuremath{\textsl{#1}}}}
  \renewcommand{\lang}[1]{{\ensuremath{\textsl{#1}}}}
  \renewcommand{\func}[1]{{\ensuremath{\textsl{#1}}}}
}

% Independent classfonts:
\DeclareOption{classfont=sanserif}{
  \renewcommand{\complexity@fontcommand}{\mathsf}
  %old: \renewcommand{\ComplexityFont}[1]{{\ensuremath{\mathsf{#1}}}}
}
\DeclareOption{classfont=roman}{
  \renewcommand{\complexity@fontcommand}{\mathrm}
  %\renewcommand{\ComplexityFont}[1]{{\ensuremath{\mathrm{#1}}}}
}
\DeclareOption{classfont=bold}{
  \renewcommand{\complexity@fontcommand}{\mathbf}
  %\renewcommand{\ComplexityFont}[1]{{\ensuremath{\mathbf{#1}}}}
}
\DeclareOption{classfont=typewriter}{
  \renewcommand{\complexity@fontcommand}{\mathtt}
  %\renewcommand{\ComplexityFont}[1]{{\ensuremath{\mathtt{#1}}}}
}
\DeclareOption{classfont=italic}{
  \renewcommand{\complexity@fontcommand}{\mathit}
  %\renewcommand{\ComplexityFont}[1]{{\ensuremath{\mathit{#1}}}}
}
\DeclareOption{classfont=caps}{
  \renewcommand{\complexity@fontcommand}{\textsc}
  %\renewcommand{\ComplexityFont}[1]{{\ensuremath{\textsc{#1}}}}
}
\DeclareOption{classfont=slant}{
  \renewcommand{\complexity@fontcommand}{\textsl}
  %\renewcommand{\ComplexityFont}[1]{{\ensuremath{\textsl{#1}}}}
}

% Independent langfonts:
\DeclareOption{langfont=sanserif}{
  \renewcommand{\lang}[1]{{\ensuremath{\mathsf{#1}}}}
}
\DeclareOption{langfont=roman}{
  \renewcommand{\lang}[1]{{\ensuremath{\mathrm{#1}}}}
}
\DeclareOption{langfont=bold}{
  \renewcommand{\lang}[1]{{\ensuremath{\mathbf{#1}}}}
}
\DeclareOption{langfont=typewriter}{
  \renewcommand{\lang}[1]{{\ensuremath{\mathtt{#1}}}}
}
\DeclareOption{langfont=italic}{
  \renewcommand{\lang}[1]{{\ensuremath{\mathit{#1}}}}
}
\DeclareOption{langfont=caps}{
  \renewcommand{\lang}[1]{{\ensuremath{\textsc{#1}}}}
}
\DeclareOption{langfont=slant}{
  \renewcommand{\lang}[1]{{\ensuremath{\textsl{#1}}}}
}

% If I were to use keyval:
%\define@key{funcfont}{sanserif}{
%  \renewcommand{\func}[1]{{\ensuremath{\mathsf{#1}}}}
%}

% Independent funcfonts:
\DeclareOption{funcfont=sanserif}{
  \renewcommand{\func}[1]{{\ensuremath{\mathsf{#1}}}}
}
\DeclareOption{funcfont=roman}{
  \renewcommand{\func}[1]{{\ensuremath{\mathrm{#1}}}}
}
\DeclareOption{funcfont=bold}{
  \renewcommand{\func}[1]{{\ensuremath{\mathbf{#1}}}}
}
\DeclareOption{funcfont=typewriter}{
  \renewcommand{\func}[1]{{\ensuremath{\mathtt{#1}}}}
}
\DeclareOption{funcfont=italic}{
  \renewcommand{\func}[1]{{\ensuremath{\mathit{#1}}}}
}
\DeclareOption{funcfont=caps}{
  \renewcommand{\func}[1]{{\ensuremath{\textsc{#1}}}}
}
\DeclareOption{funcfont=slant}{
  \renewcommand{\func}[1]{{\ensuremath{\textsl{#1}}}}
}


% Till Tantau's Code for the small option:
\DeclareOption{small}{

\newcommand\complexity@reducesize{%
  \ifx\@currsize\normalsize%
    \small%
  \else\ifx\@currsize\small%
    \footnotesize%
  \else\ifx\@currsize\large%
    \normalsize%
  \fi\fi\fi%
}

\renewcommand\complexity@possiblymakesmaller[1]{%
  \mathchoice%
  {\hbox{\complexity@reducesize$#1$}}% display
  {\hbox{\complexity@reducesize$#1$}}% normal
  {#1}%subscript
  {#1}%subsubscript (I think)
}

}


\DeclareOption*{
\PackageWarning{complexity}{Unknown option `\CurrentOption'. Using default `sanserif', and `full'} %
\renewcommand{\ComplexityFont}[1]{{\ensuremath{\mathsf{#1}}}}
\renewcommand{\lang}[1]{{\ensuremath{\mathsf{#1}}}}
\setboolean{complexity@fullmode}{true}
}

\ProcessOptions

% Define some internal commands
% such as a standard kerning value for several commands
\newcommand{\complexity@kern}{{\kern-.10em}} % note: more {} don't seem to matter, good
\newcommand{\complexity@hyphen}{ %
\lower-.12em\hbox{\textrm{-}} %
}

\newcommand{\complexity@hyphenleft}{\kern-.075em\textrm{-}}
\newcommand{\complexity@hyphenright}{\textrm{-}\kern-.05em}

% Define some useful commands to append to other classes

\newcommand{\co}[1]{\ComplexityFont{co}#1}
\newcommand{\parity}{\oplus}

% Define some general functions
\newcommand{\llog}{\func{log}}
\newcommand{\poly}{\func{poly}}
\newcommand{\polylog}{\func{polylog}}
\newcommand{\qpoly}{\func{qpoly}}
\newcommand{\qlog}{\func{qlog}}
\newcommand{\MOD}{\func{MOD}}
\newcommand{\Mod}{\func{Mod}}

% Define Common Sets/Languages
\newcommand{\CVP}{\lang{CVP}}
\newcommand{\SAT}{\lang{SAT}}
\newcommand{\MaxSAT}{\lang{MaxSAT}}


% We redefine 4 commands inside of Latex, but preserve them for usage

\let\defaultL\L
\renewcommand{\L}{\ComplexityFont{L}}
\let\defaultP\P
\renewcommand{\P}{\ComplexityFont{P}}
\let\defaultS\S
\renewcommand{\S}{\ComplexityFont{S}}

% Major Classes listed in Alphabetical order

%%%%%%% Standard Classes

% A
\newcommand{\AC}{\ComplexityFont{AC}}
\newcommand{\ACC}{\ComplexityFont{ACC}}
\newcommand{\AH}{\ComplexityFont{AH}}
\newcommand{\AL}{\ComplexityFont{AL}}
\newcommand{\coAM}{\ComplexityFont{coAM}}
\newcommand{\AM}{\ComplexityFont{AM}}
\newcommand{\AMEXP}{\ComplexityFont{AM\complexity@hyphen EXP}}
\newcommand{\AP}{\ComplexityFont{AP}}

% B
\newcommand{\BH}{\ComplexityFont{BH}}
\newcommand{\BPE}{\ComplexityFont{BPE}}
\newcommand{\BPEE}{\ComplexityFont{BPEE}}
\newcommand{\BPP}{\ComplexityFont{BPP}}
\newcommand{\coBPP}{\ComplexityFont{coBPP}}
\newcommand{\BPSPACE}{\ComplexityFont{BPSPACE}}
\newcommand{\BPTIME}{\ComplexityFont{BPTIME}}
\newcommand{\BQP}{\ComplexityFont{BQP}}
\newcommand{\BQTIME}{\ComplexityFont{BQTIME}}

% C
\newcommand{\cc}{\ComplexityFont{cc}}
\newcommand{\C}{\ComplexityFont{C}} %This isn't a class, but used for \C_{=}\AnotherClass
\newcommand{\CeL}{\ComplexityFont{C}_{=}\ComplexityFont{L}} %C_=L
\newcommand{\CeP}{\ComplexityFont{C}_{=}\ComplexityFont{P}} %C_=P
\newcommand{\coCeP}{\ComplexityFont{coC}_{=}\ComplexityFont{P}} %C_=P
\newcommand{\CFL}{\ComplexityFont{CFL}}
\newcommand{\CH}{\ComplexityFont{CH}}
\newcommand{\CkP}{\ComplexityFont{C}_{\ComplexityFont{k}}\ComplexityFont{P}} %C_kP
\newcommand{\CSIZE}{\ComplexityFont{CSIZE}}

% D
\newcommand{\DET}{\ComplexityFont{DET}}
\newcommand{\DSPACE}{\ComplexityFont{DSPACE}}
\newcommand{\DTIME}{\ComplexityFont{DTIME}}
\newcommand{\DTISP}{\ComplexityFont{DTISP}}

% E
\newcommand{\E}{\ComplexityFont{E}}
\newcommand{\EE}{\ComplexityFont{EE}}
\newcommand{\EESPACE}{\ComplexityFont{EESPACE}}
\newcommand{\EEXP}{\ComplexityFont{EEXP}}
\newcommand{\EH}{\ComplexityFont{EH}}
\newcommand{\EEE}{\ComplexityFont{EEE}}
\newcommand{\EPTAS}{\ComplexityFont{EPTAS}}
\newcommand{\ESPACE}{\ComplexityFont{ESPACE}}
\newcommand{\EXP}{\ComplexityFont{EXP}}
\newcommand{\EXPSPACE}{\ComplexityFont{EXPSPACE}}

% F
\newcommand{\FNL}{\ComplexityFont{FNL}}
\newcommand{\FNP}{\ComplexityFont{FNP}}
\newcommand{\FP}{\ComplexityFont{FP}}
\newcommand{\FPRAS}{\ComplexityFont{FPRAS}}
\newcommand{\FQMA}{\ComplexityFont{FQMA}}

% G
\newcommand{\GA}{\ComplexityFont{GA}}
\newcommand{\Gap}{\ComplexityFont{Gap}}
\newcommand{\GapAC}{\ComplexityFont{GapAC}}
\newcommand{\GapL}{\ComplexityFont{GapL}}
\newcommand{\GapP}{\ComplexityFont{GapP}}
\newcommand{\GI}{\ComplexityFont{GI}}

% H
\newcommand{\Heur}{\ComplexityFont{Heur}}
\newcommand{\HSPACE}{\ComplexityFont{HSPACE}}
\newcommand{\HeurBPP}{\ComplexityFont{HeurBPP}}
\newcommand{\HeurBPTIME}{\ComplexityFont{HeurBPTIME}}

% I
\newcommand{\IP}{\ComplexityFont{IP}}

% J

% K
\newcommand{\K}{\ComplexityFont{K}}
\newcommand{\KT}{\ComplexityFont{KT}}

% L
\newcommand{\LIN}{\ComplexityFont{LIN}}
\newcommand{\LogFew}{\ComplexityFont{LogFew}}
\newcommand{\LogFewNL}{\ComplexityFont{LogFewNL}}

% M
\newcommand{\MA}{\ComplexityFont{MA}}
\newcommand{\coMA}{\ComplexityFont{coMA}}
\newcommand{\MAC}{\ComplexityFont{MAC}}
\newcommand{\MAE}{\ComplexityFont{MA\complexity@hyphen E}}
\newcommand{\MAEXP}{\ComplexityFont{MA\complexity@hyphen EXP}}
\newcommand{\mAL}{\ComplexityFont{mAL}}
\newcommand{\MaxNP}{\ComplexityFont{MaxNP}}
\newcommand{\MaxPB}{\ComplexityFont{MaxPB}}
\newcommand{\MaxSNP}{\ComplexityFont{MaxSNP}}
\newcommand{\MinPB}{\ComplexityFont{MinPB}}
\newcommand{\MIP}{\ComplexityFont{MIP}}
\newcommand{\mL}{\ComplexityFont{mL}}
\newcommand{\mNC}{\ComplexityFont{mNC}}
\newcommand{\mcoNL}{\ComplexityFont{comNL}}
\newcommand{\mNL}{\ComplexityFont{mNL}}
\newcommand{\mNP}{\ComplexityFont{mNP}}
\newcommand{\ModkL}{{\ComplexityFont{Mod}_k\ComplexityFont{L}}}
\newcommand{\ModkP}{{\ComplexityFont{Mod}_k\ComplexityFont{P}}}
\newcommand{\ModP}{\ComplexityFont{ModP}}
\newcommand{\mP}{\ComplexityFont{mP}}
\newcommand{\MP}{\ComplexityFont{MP}}
\newcommand{\MPC}{\ComplexityFont{MPC}}
\newcommand{\mTC}{\ComplexityFont{mTC}}

% N
\newcommand{\NC}{\ComplexityFont{NC}}
\newcommand{\coNE}{\ComplexityFont{coNE}}
\newcommand{\NE}{\ComplexityFont{NE}}
\newcommand{\NEE}{\ComplexityFont{NEE}}
\newcommand{\NEEE}{\ComplexityFont{NEEE}}
\newcommand{\NEEXP}{\ComplexityFont{NEEXP}}
\newcommand{\coNEXP}{\ComplexityFont{coNEXP}}
\newcommand{\NEXP}{\ComplexityFont{NEXP}}
\newcommand{\coNL}{\ComplexityFont{coNL}}
\newcommand{\NL}{\ComplexityFont{NL}}
\newcommand{\NLIN}{\ComplexityFont{NLIN}}
\newcommand{\coNP}{\ComplexityFont{coNP}}
\newcommand{\NP}{\ComplexityFont{NP}}
\newcommand{\NPC}{\ComplexityFont{NPC}}
\newcommand{\NPI}{\ComplexityFont{NPI}}
\newcommand{\NPSPACE}{\ComplexityFont{NPSPACE}}
\newcommand{\coNQP}{\ComplexityFont{coNQP}}
\newcommand{\NQP}{\ComplexityFont{NQP}}
\newcommand{\NSPACE}{\ComplexityFont{NSPACE}}
\newcommand{\NTIME}{\ComplexityFont{NTIME}}

% O
\newcommand{\Opt}{\ComplexityFont{Opt}}
\newcommand{\OptP}{\Opt\P}

% P
\newcommand{\PAC}{\ComplexityFont{PAC}}
\newcommand{\PCD}{\ComplexityFont{PCD}}
\newcommand{\PCP}{\ComplexityFont{PCP}}
\newcommand{\Ppoly}{\P/\poly}
\newcommand{\PH}{\ComplexityFont{PH}}
\newcommand{\PEXP}{\ComplexityFont{PEXP}}
\newcommand{\PL}{\ComplexityFont{PL}}
\newcommand{\PP}{\ComplexityFont{PP}}
\newcommand{\PPSPACE}{\ComplexityFont{PPSPACE}}
\newcommand{\p}{\ComplexityFont{p}}
\newcommand{\Promise}{\ComplexityFont{Promise}}
\newcommand{\PromiseBPP}{\ComplexityFont{PromiseBPP}}
\newcommand{\PromiseBQP}{\ComplexityFont{PromiseBQP}}
\newcommand{\PromiseP}{\ComplexityFont{PromiseP}}
\newcommand{\PromiseRP}{\ComplexityFont{PromiseRP}}
\newcommand{\PrSPACE}{\ComplexityFont{PrSPACE}}
\newcommand{\PSPACE}{\ComplexityFont{PSPACE}}
\newcommand{\PT}{\ComplexityFont{PT}}
\newcommand{\PTAS}{\ComplexityFont{PTAS}}
\newcommand{\PTWK}{\ComplexityFont{PT/WK}}

% Q
\newcommand{\QAC}{\ComplexityFont{QAC}}
\newcommand{\QACC}{\ComplexityFont{QACC}}
\newcommand{\QAM}{\ComplexityFont{QAM}}
\newcommand{\QCFL}{\ComplexityFont{QCFL}}
\newcommand{\QCMA}{\ComplexityFont{QCMA}}
\newcommand{\QH}{\ComplexityFont{QH}}
\newcommand{\QIP}{\ComplexityFont{QIP}}
\newcommand{\QMA}{\ComplexityFont{QMA}}
\newcommand{\QMAM}{\ComplexityFont{QMAM}}
\newcommand{\QMIP}{\ComplexityFont{QMIP}}
\newcommand{\QNC}{\ComplexityFont{QNC}}
\newcommand{\QP}{\ComplexityFont{QP}}
\newcommand{\QPSPACE}{\ComplexityFont{QPSPACE}}

% R
\newcommand{\R}{\ComplexityFont{R}}
\newcommand{\coRE}{\ComplexityFont{coRE}}
\newcommand{\RE}{\ComplexityFont{RE}}
\newcommand{\REG}{\ComplexityFont{REG}}
\newcommand{\RL}{\ComplexityFont{RL}}
\newcommand{\coRNC}{\ComplexityFont{coRNC}}
\newcommand{\RNC}{\ComplexityFont{RNC}}
\newcommand{\coRP}{\ComplexityFont{coRP}}
\newcommand{\RP}{\ComplexityFont{RP}}
\newcommand{\RSPACE}{\ComplexityFont{RSPACE}}

% S
\newcommand{\SAC}{\ComplexityFont{SAC}}
\newcommand{\SC}{\ComplexityFont{SC}}
\newcommand{\SE}{\ComplexityFont{SE}}
\newcommand{\SEH}{\ComplexityFont{SEH}}
\newcommand{\SKC}{\ComplexityFont{SKC}}
\newcommand{\SIZE}{\ComplexityFont{SIZE}}
\newcommand{\SPACE}{\ComplexityFont{SPACE}}
\newcommand{\SL}{\ComplexityFont{SL}}
\newcommand{\coSL}{\ComplexityFont{coSL}}
\newcommand{\SPARSE}{\ComplexityFont{SPARSE}}
\newcommand{\SPL}{\ComplexityFont{SPL}}
\newcommand{\SPP}{\ComplexityFont{SPP}}
\newcommand{\SUBEXP}{\ComplexityFont{SUBEXP}}
\newcommand{\SZK}{\ComplexityFont{SZK}}

% T
\newcommand{\TC}{\ComplexityFont{TC}}

% U
\newcommand{\coUP}{\ComplexityFont{coUP}}
\newcommand{\UP}{\ComplexityFont{UP}}

% V

% W
\newcommand{\W}{\ComplexityFont{W}}

% X
\newcommand{\ZPE}{\ComplexityFont{ZPE}}
\newcommand{\ZPP}{\ComplexityFont{ZPP}}
\newcommand{\ZPTIME}{\ComplexityFont{ZPTIME}}

%%%%%%% Extended Classes
\ifthenelse{\boolean{complexity@fullmode}}{ %THEN we do ALL the classes

% A
\newcommand{\A}{\ComplexityFont{A}}
\newcommand{\AlgP}{\ComplexityFont{AlgP}}
\newcommand{\Amp}{\ComplexityFont{Amp}}
\newcommand{\AmpMP}{\ComplexityFont{AmpMP}}
\newcommand{\AmpPBQP}{\ComplexityFont{AmpPBQP}}
\newcommand{\APP}{\ComplexityFont{APP}}
\newcommand{\APX}{\ComplexityFont{APX}}
\newcommand{\AUCSPACE}{\ComplexityFont{AUC\complexity@hyphen SPACE}}
\newcommand{\AuxPDA}{\ComplexityFont{AuxPDA}}
\newcommand{\AVBPP}{\ComplexityFont{AVBPP}}
\newcommand{\AvE}{\ComplexityFont{AvE}}
\newcommand{\AvP}{\ComplexityFont{AvP}}
\newcommand{\AW}{\ComplexityFont{AW}}
\newcommand{\AWPP}{\ComplexityFont{AWPP}}

% B
\newcommand{\betaP}{\beta\ComplexityFont{P}}
\newcommand{\BP}{\ComplexityFont{BP}}

\newcommand{\BPPpath}{{\ComplexityFont{BPP}_{\complexity@kern\ComplexityFont{path}}}}

\newcommand{\BPHSPACE}{{\ComplexityFont{BP_{H}SPACE}}}
\newcommand{\BPL}{\ComplexityFont{BPL}}
\newcommand{\BPPOBDD}{\ComplexityFont{BPP\complexity@hyphen OBDD}}
\newcommand{\BPQP}{\ComplexityFont{BPQP}}
\newcommand{\kBQBP}{k\complexity@hyphenright\ComplexityFont{BQBP}}
\newcommand{\BQNC}{\ComplexityFont{BQNC}}
\newcommand{\BQNP}{\ComplexityFont{BQNP}}
\newcommand{\BQPOBDD}{\ComplexityFont{BQP\complexity@hyphen OBDD}}
\newcommand{\kBWBP}{k\complexity@hyphenright\ComplexityFont{BWBP}}

% C
%\newcommand{\Check}{\ComplexityFont{Check}}  this has conflicts with amsmath
\newcommand{\CLOG}{\ComplexityFont{CLOG}}
\newcommand{\CNP}{\ComplexityFont{CNP}}
\newcommand{\cofrIP}{\ComplexityFont{cofrIP}}
\newcommand{\Coh}{\ComplexityFont{Coh}}
\newcommand{\compIP}{\ComplexityFont{compIP}}
\newcommand{\compNP}{\ComplexityFont{compNP}}
\newcommand{\coUCC}{\ComplexityFont{coUCC}}
\newcommand{\CP}{\ComplexityFont{CP}}
\newcommand{\CSL}{\ComplexityFont{CSL}}
\newcommand{\CZK}{\ComplexityFont{CZK}}

% D
\newcommand{\D}{\ComplexityFont{D}}
\newcommand{\DCFL}{\ComplexityFont{DCFL}}
\newcommand{\DiffAC}{\ComplexityFont{DiffAC}}
\newcommand{\DisNP}{\ComplexityFont{DisNP}}
\newcommand{\DistNP}{\ComplexityFont{DistNP}}
\newcommand{\DP}{\ComplexityFont{DP}}
\newcommand{\DQP}{\ComplexityFont{DQP}}
\newcommand{\Dyn}{\ComplexityFont{Dyn}}
\newcommand{\DynFO}{\ComplexityFont{Dyn\complexity@hyphenright FO}}

% E
\newcommand{\EL}{\ComplexityFont{EL}}
\newcommand{\ELEMENTARY}{\ComplexityFont{ELEMENTARY}}
\newcommand{\ELkP}{{\ComplexityFont{EL}_{k}\ComplexityFont{P}}}
\newcommand{\kEQBP}{k\complexity@hyphenright\ComplexityFont{EQBP}}
\newcommand{\EQP}{\ComplexityFont{EQP}}
\newcommand{\EQTIME}{\ComplexityFont{EQTIME}}
\newcommand{\EQBP}{\ComplexityFont{EQBP}}
\newcommand{\ExistsBPP}{\ComplexityFont{ExistsBPP}}
\newcommand{\ExistsNISZK}{\ComplexityFont{ExistsNISZK}}


% F
\newcommand{\FBQP}{\ComplexityFont{FBQP}}
\newcommand{\Few}{\ComplexityFont{Few}}
\newcommand{\FewP}{\ComplexityFont{FewP}}
\newcommand{\FH}{\ComplexityFont{FH}}
\newcommand{\FO}{\ComplexityFont{FO}}
\newcommand{\FOLL}{\ComplexityFont{FOLL}}
\newcommand{\FPR}{\ComplexityFont{FPR}}
\newcommand{\FPT}{\ComplexityFont{FPT}}
\newcommand{\FPTAS}{\ComplexityFont{FPTAS}}
\newcommand{\FPTnu}{{\ComplexityFont{FPT}_{\complexity@kern\ComplexityFont{nu}}}}
\newcommand{\FPTsu}{{\ComplexityFont{FPT}_{\complexity@kern\ComplexityFont{su}}}}
\newcommand{\frIP}{\ComplexityFont{frIP}}
\newcommand{\FTAPE}{\ComplexityFont{F\complexity@hyphen TAPE}}
\newcommand{\FTIME}{\ComplexityFont{F\complexity@hyphen TIME}}

%G
\newcommand{\G}{\ComplexityFont{G}}
\newcommand{\GANSPACE}{\ComplexityFont{GAN\complexity@hyphen SPACE}}
\newcommand{\GC}{\ComplexityFont{GC}}
\newcommand{\GCSL}{\ComplexityFont{GCSL}}
\newcommand{\GPCD}{\ComplexityFont{GPCD}}

% H
\newcommand{\HkP}{{\ComplexityFont{H}_k\ComplexityFont{P}}}
\newcommand{\HVSZK}{\ComplexityFont{HVSZK}}

% I
\newcommand{\IC}{\ComplexityFont{IC}}
\newcommand{\IPP}{\ComplexityFont{IPP}}

% J
% What?  No "J" classes?

% K

% L
\newcommand{\LkP}{{\ComplexityFont{L}_k\ComplexityFont{P}}}
\newcommand{\LOGCFL}{\ComplexityFont{LOGCFL}}
\newcommand{\LOGNP}{\ComplexityFont{LOGNP}}
\newcommand{\LOGSNP}{\ComplexityFont{LOGSNP}}
\newcommand{\LWPP}{\ComplexityFont{LWPP}}

% M
\newcommand{\M}{\ComplexityFont{M}}
\newcommand{\ModZkL}{{\ComplexityFont{ModZ}_k\ComplexityFont{L}}}
\newcommand{\MkP}{{\ComplexityFont{(M}_k\ComplexityFont{)P}}}

% N
\newcommand{\NAuxPDA}{\ComplexityFont{NAuxPDA}}
\newcommand{\NIPZK}{\ComplexityFont{NIPZK}}
\newcommand{\NIQPZK}{\ComplexityFont{NIQPZK}}
\newcommand{\NIQSZK}{\ComplexityFont{NIQSZK}}
\newcommand{\NISZK}{\ComplexityFont{NISZK}}
\newcommand{\NLOG}{\ComplexityFont{NLOG}}
\newcommand{\NPMV}{\ComplexityFont{NPMV}}
\newcommand{\NPMVsel}{\ComplexityFont{NPMV\complexity@hyphenleft sel}}
\newcommand{\NPO}{\ComplexityFont{NPO}}
\newcommand{\NPOPB}{\ComplexityFont{NPOPB}}
\newcommand{\NPSV}{\ComplexityFont{NPSV}}
\newcommand{\NPSVsel}{\ComplexityFont{NPSV\complexity@hyphenleft sel}} %don't use a \complexity@hyphen here, it looks bad
\newcommand{\NT}{\ComplexityFont{NT}}

% O
\newcommand{\OBDD}{\ComplexityFont{OBDD}}
\newcommand{\OCQ}{\ComplexityFont{OCQ}}

% P
\newcommand{\PBP}{\ComplexityFont{PBP}}
\newcommand{\kPBP}{k\complexity@hyphenright\ComplexityFont{PBP}} %don't use a \complexity@hyphen here, it looks bad
\newcommand{\Pclose}{\ComplexityFont{P\complexity@hyphenleft close}}
\newcommand{\PermUP}{\ComplexityFont{PermUP}}
\newcommand{\PF}{\ComplexityFont{PF}}
\newcommand{\PFCHK}{\ComplexityFont{PFCHK}}
\newcommand{\PhP}{\ComplexityFont{PhP}}
\newcommand{\PINC}{\ComplexityFont{PINC}}
\newcommand{\PIO}{\ComplexityFont{PIO}}
\newcommand{\PKC}{\ComplexityFont{PKC}}
\newcommand{\PLF}{\ComplexityFont{PL}}
\newcommand{\PLL}{\ComplexityFont{PLL}}
\newcommand{\PLS}{\ComplexityFont{PLS}}
\newcommand{\POBDD}{\ComplexityFont{P\complexity@hyphen OBDD}}
\newcommand{\PODN}{\ComplexityFont{PODN}}
\newcommand{\polyL}{\ComplexityFont{polyL}}
\newcommand{\PostBQP}{\ComplexityFont{PostBQP}}
\newcommand{\PPA}{\ComplexityFont{PPA}}
\newcommand{\PPAD}{\ComplexityFont{PPAD}}
\newcommand{\PPADS}{\ComplexityFont{PPADS}}
\newcommand{\PPP}{\ComplexityFont{PPP}}
\newcommand{\PQUERY}{\ComplexityFont{PQUERY}}
\newcommand{\PR}{\ComplexityFont{PR}}
\newcommand{\PrHSPACE}{{\ComplexityFont{Pr}_{\ComplexityFont{H}}\ComplexityFont{SPACE}}}
\newcommand{\promiseBPP}{\ComplexityFont{promiseBPP}}
\newcommand{\promiseBQP}{\ComplexityFont{promiseBQP}}
\newcommand{\promiseP}{\ComplexityFont{promiseP}}
\newcommand{\promiseRP}{\ComplexityFont{promiseRP}}
\newcommand{\PSel}{\ComplexityFont{P\complexity@hyphen Sel}}
\newcommand{\PSK}{\ComplexityFont{PSK}}
\newcommand{\PTAPE}{\ComplexityFont{PTAPE}}
\newcommand{\PZK}{\ComplexityFont{PZK}}

% Q
\newcommand{\QPLIN}{\ComplexityFont{QPLIN}}
\newcommand{\Qpoly}{\ComplexityFont{Qpoly}}
\newcommand{\QMIPle}{{\ComplexityFont{QMIP}_{\complexity@kern\ComplexityFont{le}}}}
\newcommand{\QMIPne}{{\ComplexityFont{QMIP}_{\complexity@kern\ComplexityFont{ne}}}}
\newcommand{\QSZK}{\ComplexityFont{QSZK}}

% R
\newcommand{\RevSPACE}{\ComplexityFont{RevSPACE}}
\newcommand{\RHL}{{\ComplexityFont{R}_{\ComplexityFont{H}}\ComplexityFont{L}}}
\newcommand{\RHSPACE}{{\ComplexityFont{R}_{\ComplexityFont{H}}\ComplexityFont{SPACE}}}
\newcommand{\RNP}{\ComplexityFont{RNP}}
\newcommand{\RPP}{\ComplexityFont{RPP}}

% S
\newcommand{\SAPTIME}{\ComplexityFont{SAPTIME}}
\newcommand{\SBP}{\ComplexityFont{SBP}}
\newcommand{\Sel}{\ComplexityFont{Sel}}
\newcommand{\SelfNP}{\ComplexityFont{SelfNP}}
\newcommand{\SF}{\ComplexityFont{SF}}
\newcommand{\SLICEWISEPSPACE}{\ComplexityFont{SLICEWISEPSPACE}}
\newcommand{\SNP}{\ComplexityFont{SNP}}
\newcommand{\SOE}{\ComplexityFont{SO\complexity@hyphen E}}
\newcommand{\SP}{\ComplexityFont{SP}}
\newcommand{\spanP}{\ComplexityFont{span}\complexity@hyphenright\ComplexityFont{P}}
\newcommand{\symP}{\ComplexityFont{symP}}

% T
\newcommand{\TALLY}{\ComplexityFont{TALLY}}
\newcommand{\TFNP}{\ComplexityFont{TFNP}}
\newcommand{\ThC}{\ComplexityFont{ThC}}
\newcommand{\TreeBQP}{\ComplexityFont{TreeBQP}}
\newcommand{\TREEREGULAR}{\ComplexityFont{TREE\complexity@hyphen REGULAR}}

%U
\newcommand{\UAP}{\ComplexityFont{UAP}}
\newcommand{\UCC}{\ComplexityFont{UCC}}
\newcommand{\UL}{\ComplexityFont{UL}}
\newcommand{\UE}{\ComplexityFont{UE}}
\newcommand{\US}{\ComplexityFont{US}}

% V
\newcommand{\VNC}{\ComplexityFont{VNC}}
\newcommand{\VNP}{\ComplexityFont{VNP}}
\newcommand{\VP}{\ComplexityFont{VP}}
\newcommand{\VQP}{\ComplexityFont{VQP}}

% W
\newcommand{\WAPP}{\ComplexityFont{WAPP}}
\newcommand{\WPP}{\ComplexityFont{WPP}}

% X
\newcommand{\XORMIP}{{\ComplexityFont{XOR\complexity@hyphen MIP}^*[2,1]}}
\newcommand{\XP}{\ComplexityFont{XP}}
\newcommand{\XPuniform}{{\ComplexityFont{XP}_{\complexity@kern\ComplexityFont{uniform}}}}

% Y
\newcommand{\YACC}{\ComplexityFont{YACC}}

% Z

% We now include the user defined commands which must be in a file named
% mycomplexity
% We use this convention because the primitive \input may load packages
% more than once, leading to unnecessary redefinitions and strange results

}{}

\InputIfFileExists{mycomplexity.sty}{}{\PackageWarning{complexity}{User Defined Commands file `mycomplexity.sty' not found, it will not be loaded.}}
