%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Style file for the description logic handbook specific macros
%%%
%%% Please USE THE MACROS instead of hardcoding in the LaTeX source.
%%%
%%% If you do not agree with the current implementation of a macro
%%% put a comment in the beginning of the file with the suggested replacement.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{xspace}
\RequirePackage{amssymb}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% ACRONYMS

\newcommand{\scname}[1]{\textsc{#1}}    % a (small) capitalized name
\newcommand{\calig}[1]{%                % calligraphic text
        \ensuremath{\mathcal{#1}}}

\newcommand{\set}[1]{\{ #1 \}}          % set
\newcommand{\card}[1]{|{#1}|}           % cardinality

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% SYSTEM NAMES

\newcommand{\Klone}{\scname{Kl-One}\xspace}    % GRAIL
\newcommand{\Grail}{\scname{Grail}\xspace}     % GRAIL
\newcommand{\Galen}{\scname{Galen}\xspace}     % GALEN
\newcommand{\Fact}{FaCT\xspace}                % FaCT
\newcommand{\Dlp}{DLP\xspace}                  % DLP
\newcommand{\Tsl}{\calig{TSL}\xspace}          % TSL
\newcommand{\Back}{\scname{Back}\xspace}       % BACK
\newcommand{\Classic}{\scname{Classic}\xspace} % CLASSIC
\newcommand{\Loom}{\scname{Loom}\xspace}       % LOOM
\newcommand{\Kris}{\scname{Kris}\xspace}       % KRIS
\newcommand{\Ksat}{\scname{Ksat}\xspace}       % KSAT
\newcommand{\Ksatc}{\scname{KSatC}\xspace}     % KSATC
\newcommand{\Crack}{\scname{Crack}\xspace}     % CRACK
\newcommand{\Ssat}{\scname{*SAT}\xspace}       % *SAT
\newcommand{\Ta}{\scname{TA}\xspace}           % TA

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% LANGUAGES and LOGICS

%%% AL-languages
\newcommand{\ALlang}[2]{\ensuremath{\mathcal{#1}#2}\xspace}

\newcommand{\FL}{\ALlang{FL}{}}
\newcommand{\FLm}{\ALlang{FL}{^-}}

\newcommand{\AL}{\ALlang{AL}{}}
\newcommand{\ALF}{\ALlang{ALF}{}}
\newcommand{\ALN}{\ALlang{ALN}{}}
\newcommand{\ALQ}{\ALlang{ALQ}{}}
\newcommand{\ALU}{\ALlang{ALU}{}}
\newcommand{\ALUN}{\ALlang{ALUN}{}}
\newcommand{\ALC}{\ALlang{ALC}{}}
\newcommand{\ALCN}{\ALlang{ALCN}{}}
\newcommand{\ALCF}{\ALlang{ALCF}{}}
\newcommand{\ALCQ}{\ALlang{ALCQ}{}}
\newcommand{\ALCK}{\ALlang{ALCK}{}}

%% AL-languages with inverse
\newcommand{\ALI}{\ALlang{ALI}{}}
\newcommand{\ALFI}{\ALlang{ALFI}{}}
\newcommand{\ALNI}{\ALlang{ALNI}{}}
\newcommand{\ALQI}{\ALlang{ALQI}{}}
\newcommand{\ALUI}{\ALlang{ALUI}{}}
\newcommand{\ALUNI}{\ALlang{ALUNI}{}}
\newcommand{\ALCI}{\ALlang{ALCI}{}}
\newcommand{\ALCNI}{\ALlang{ALCNI}{}}
\newcommand{\ALCFI}{\ALlang{ALCFI}{}}
\newcommand{\ALCQI}{\ALlang{ALCQI}{}}
\newcommand{\ALCQIreg}{\ALlang{ALCQI}{_{\mathit{reg}}}}

\newcommand{\ALCX}[1]{\ALlang{ALC#1}{}}         % the rest

%% AL-languages with additional features
\newcommand{\ALCp}{\ALlang{ALC}{_{+}}}                            % ALC_+
\newcommand{\ALCrp}{\ALlang{ALC}{_{R^{+}}}}                       % ALC_R+
\newcommand{\ALCHrp}{\ALlang{ALCH}{_{R^{+}}}}                     % ALCH_R+
\newcommand{\ALCop}{\ALlang{ALC}{_{\oplus}}}                      % ALC_o+
\newcommand{\ALCXp}[1]{\ALlang{ALC#1}{_{+}}}                      % ALCx_+
\newcommand{\ALCHfrp}{\ALlang{ALCH}{\textbf{\textit{f}}_{R^{+}}}} % ALCHf_R+

\newcommand{\ALCXY}[2]{\ALlang{ALC#1}{#2}}      % the rest
%%                                 % first arg are constructors (calligraphic)
%%                                 % second arg are additional stuff

%%% DLR and its variants
\newcommand{\DLR}{\ALlang{DLR}{}}
\newcommand{\DLRmu}{\ALlang{DLR}{_{\mu}}}
\newcommand{\DLRreg}{\ALlang{DLR}{_{\mathit{reg}}}}

%%% C and its variants
\newcommand{\C}{\ALlang{C}{}}
\newcommand{\CI}{\ALlang{CI}{}}
\newcommand{\CIF}{\ALlang{CIF}{}}
\newcommand{\CIN}{\ALlang{CIN}{}}
\newcommand{\CIQ}{\ALlang{CIQ}{}}

%%% Modal Logics
\newcommand{\KM}%                                   % Modal K
        {\ensuremath{\mathbf{K}}\xspace}%           % (N.B. \K is already used)
\newcommand{\KT}%                                   % Modal KT
        {\ensuremath{\mathbf{KT}}\xspace}
\newcommand{\Kfour}%                                % Modal K4
        {\ensuremath{\mathbf{K4}}\xspace}
\newcommand{\Sfour}%                                % Modal S4
        {\ensuremath{\mathbf{S4}}\xspace}
\newcommand{\Km}%                                   % Modal Km
        {\ensuremath{\KM_{\mathbf{m}}}\xspace}
\newcommand{\KTm}%                                  % Modal KTm
        {\ensuremath{\KT_{\mathbf{m}}}\xspace}
\newcommand{\Kfourm}%                               % Modal K4m
        {\ensuremath{\mathbf{K4}_{\mathbf{m}}}\xspace}
\newcommand{\Sfourm}%                               % Modal S4m
        {\ensuremath{\mathbf{S4}_{\mathbf{m}}}\xspace}

%%% PDL and its variants
\newcommand{\PDL}{\scname{pdl}\xspace}             % PDL
\newcommand{\DPDL}{\scname{dpdl}\xspace}           % deterministic PDL
\newcommand{\CPDL}{\emph{converse}-\PDL}           % converse-PDL
\newcommand{\DCPDL}{\emph{converse}-\DPDL}         % deterministic converse-PDL
\newcommand{\RPDL}{\emph{repeat}-\PDL}             % repeat-PDL

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% COMPLEXITY CLASSES

\newcommand{\NP}{\textsc{np}\xspace}
\newcommand{\coNP}{co\textsc{np}\xspace}
\newcommand{\SigmaPtwo}{\ensuremath{\Sigma^p_2}\xspace}
\newcommand{\PiPtwo}{\ensuremath{\Pi^p_2}\xspace}
\newcommand{\DeltaPtwo}{\ensuremath{\Delta^p_2}\xspace}
\newcommand{\SigmaPx}[1]{\ensuremath{\Sigma^p_{#1}}\xspace}
\newcommand{\PiPx}[1]{\ensuremath{\Pi^p_{#1}}\xspace}
\newcommand{\DeltaPx}[1]{\ensuremath{\Delta^p_{#1}}\xspace}
\newcommand{\PSPACE}{\textsc{pspace}\xspace}
\newcommand{\EXPTIME}{\textsc{exptime}\xspace}
\newcommand{\NEXPTIME}{\textsc{nexptime}\xspace}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% SEMANTICS

%% The following accept an optional parameter (to be put between [ and ])
%% to allow the use of an interpretation name different from \I.
%% If the optional parameter is missing the default interpretation is \I:
%%  e.g.,     $\Int{C}$     becomes $C^{\I}$
%%        but $\Int[\J]{C}$ becomes $C^{\J}$.

\newcommand{\I}{\mathcal{I}}           % interpretation (default to use)
\newcommand{\dom}[1][\I]{\Delta^{#1}}  % delta^I (domain of interpretation \I)
\newcommand{\Int}[2][\I]{#2^{#1}}      % #2^I    (interpretation function)
\newcommand{\inter}[1][\I]{(\dom[#1],\Int[#1]{\cdot})}   % (dom^I,.^I)

\newcommand{\tuple}[1]{\langle #1 \rangle}

\newcommand{\true}{\textbf{true}\xspace}
\newcommand{\false}{\textbf{false}\xspace}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% DL CONSTRUCTS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Abstract syntax for concepts, roles, knowledge bases

%%% Knowledge base
\newcommand{\K}{\mathcal{K}}                         % knowledge base (default)

%%% Knowledge base assertions
\newcommand{\Equiv}{\doteq}                          % equivalence assertion
\newcommand{\Implies}{\sqsubseteq}                   % inclusion assertion

%%% Subsumption
\newcommand{\IsSubs}{\sqsubseteq}          % is subsumed by
\newcommand{\Subs}{\sqsupseteq}                      % subsumes
\newcommand{\notIssub}{\mathrel{\not\sqsubseteq}}    % is not subsumed by
\newcommand{\notSubs}{\mathrel{\not\sqsupseteq}}     % not subsumes
\newcommand{\notEquiv}{\mathrel{\not\equiv}}         % is not equivalent


%%% Concept, role, etc. names
%%% we use mathit to ensure proper spacing of two or more capital letters in
%%% math mode

\newcommand{\CN}{\mathit{CN}}        % generic concept name
\newcommand{\RN}{\mathit{RN}}        % generic role name
\newcommand{\AN}{\mathit{AN}}        % generic attribute name
\newcommand{\IN}{\mathit{IN}}        % generic individual (name)
\newcommand{\AIN}{\mathit{AIN}}      % generic anonymous individual (name)
\newcommand{\DIN}{\mathit{DIN}}      % generic distinct individual (name)
\newcommand{\GN}{\mathit{GN}}        % generic group name

\newcommand{\Bot}{\ensuremath{\bot}}
\newcommand{\Top}{\ensuremath{\top}}

%%% Concept constructors

\newcommand{\And}{\ensuremath{\sqcap}}
\newcommand{\Or}{\ensuremath{\sqcup}}
\newcommand{\Not}{\ensuremath{\neg}}

\newcommand{\usome}[1]{\exists #1}
\newcommand{\undef}[1]{\uparrow #1}
\newcommand{\none}[1]{\uparrow #1}
\newcommand{\some}[2]{\ensuremath{\exists} #1 . #2}
\newcommand{\all}[2]{\ensuremath{\forall} #1 . #2}
\newcommand{\atleast}[2]{\mathopen{\geqslant} #1 #2}
\newcommand{\atmost}[2]{\mathopen{\leqslant} #1 #2}
\newcommand{\exactly}[2]{\mathopen{=} #1 #2}
\newcommand{\atleastq}[3]{\mathopen{\geqslant} #1 #2 . #3}
\newcommand{\atmostq}[3]{\mathopen{\leqslant} #1 #2 . #3}
\newcommand{\exactlyq}[3]{\mathopen{=} #1 #2 . #3}
%%\newcommand{\same}[2]{#1 = #2}
\newcommand{\notsame}[2]{#1 \neq #2}
\newcommand{\subs}[2]{#1 \subseteq #2}
\newcommand{\fills}[2]{#1 : #2}
\newcommand{\selects}[2]{#1 : #2}
\newcommand{\oneof}[1]{\set{#1}}

%%% Role constructors

\newcommand{\inv}[1]{#1^{-}}              % inverse role operator
\newcommand{\comp}{\circ}                 % compose role operator
\newcommand{\trans}[1]{#1^{+}}            % transitive role operator
\newcommand{\trr}[1]{#1^{*}}              % transitive-reflexive role operator
\newcommand{\restrict}[2]{#1\!\mid_{#2}}  % role restriction
\newcommand{\product}[2]{#1 \times #2}    % product
\newcommand{\id}[1]{\mathit{id}(#1)}      % identity relation


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Concrete syntax for concepts, roles, knowledge bases

\newcommand{\syntax}[1]{\mbox{{\tt #1}}}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "dlhb"
%%% End: 
