2021-10-08 09:41:15 +02:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Copyright © 2021 Maximilian Keßler
|
|
|
|
%
|
|
|
|
% Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
% of this software and associated documentation files (the “Software”), to deal
|
|
|
|
% in the Software without restriction, including without limitation the rights
|
|
|
|
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
% copies of the Software, and to permit persons to whom the Software is
|
|
|
|
% furnished to do so, subject to the following conditions:
|
|
|
|
% The above copyright notice and this permission notice shall be included in all
|
|
|
|
% copies or substantial portions of the Software.
|
|
|
|
%
|
|
|
|
% THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
% SOFTWARE.
|
|
|
|
%
|
|
|
|
% This LaTeX package is free software and distributed under the MIT License. You
|
|
|
|
% may use it freely for your purposes. The latest version of the package can be
|
|
|
|
% obtained via GitHub under
|
|
|
|
% https://github.com/kesslermaximilian/LatexPackages
|
|
|
|
% For further information see the url above.
|
|
|
|
% Reportings of bugs, suggestions and improvements are welcome, see the README
|
|
|
|
% at the Git repository for further information.
|
|
|
|
%
|
|
|
|
% This package has been generated by PyTeX, available at
|
|
|
|
% https://github.com/kesslermaximilian/PyTeX
|
|
|
|
% and built from source file 'mathop.pysty'.
|
|
|
|
% It is STRONGLY DISCOURAGED to edit this source file directly, since local
|
|
|
|
% changes will not be versioned by Git and overwritten by the next build. Always
|
|
|
|
% edit the source file and build the package again.
|
|
|
|
%
|
|
|
|
% Build details:
|
2021-10-16 09:03:42 +02:00
|
|
|
% Build time: 2021/10/16 07:03
|
2021-10-10 14:02:03 +02:00
|
|
|
% PyTeX version: v1.0.0-3 (commit 4409c94)
|
2021-10-16 09:03:42 +02:00
|
|
|
% LatexPackages version: v2.2.0-7 (commit fbd489a)
|
2021-10-08 09:41:15 +02:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
2021-10-16 09:03:42 +02:00
|
|
|
\ProvidesPackage{mkessler-mathop}[2021/10/16 - Math Operator Package]
|
2021-10-08 09:41:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
%Provides some commonly used Operators used in the write-ups of my lecture notes
|
|
|
|
|
|
|
|
\RequirePackage{xkeyval}
|
|
|
|
|
|
|
|
\newif\ifmkessler@mathop@english\mkessler@mathop@englishtrue
|
|
|
|
\DeclareOptionX{german}{\mkessler@mathop@englishfalse}
|
|
|
|
\DeclareOptionX{ngerman}{\mkessler@mathop@englishfalse}
|
|
|
|
\DeclareOptionX{english}{\mkessler@mathop@englishtrue}
|
|
|
|
|
|
|
|
\DeclareOptionX*{\PackageWarning{mkessler-mathop}{Unknown '\CurrentOption'}}
|
2021-10-10 14:02:03 +02:00
|
|
|
\ProcessOptionsX*\relax
|
2021-10-08 09:41:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
%%%%%Package dependencies
|
|
|
|
\RequirePackage{amsmath}
|
|
|
|
\RequirePackage{bbm}
|
|
|
|
\RequirePackage{mathtools}
|
|
|
|
|
|
|
|
%%%%Different types of operator wrappers:
|
|
|
|
|
|
|
|
% For simple math operators that are just to be printed as their name
|
|
|
|
\newcommand\DeclareSimpleMathOperator[1]{
|
|
|
|
\expandafter\providecommand\csname #1\endcsname{\operatorname{#1}}
|
|
|
|
}
|
|
|
|
|
|
|
|
%%%For distributions
|
|
|
|
%Introduce synonym for \operatorname
|
|
|
|
\newcommand\mkessler@mathop@distribution[1]{\operatorname{#1}}
|
|
|
|
%Easily declare new distributions
|
|
|
|
\newcommand\DeclareDistribution[1]{\expandafter\def\csname #1\endcsname{\mkessler@mathop@distribution{#1}}}
|
|
|
|
|
|
|
|
%%%For categories
|
|
|
|
%Introduce synonym for \operatorname
|
|
|
|
\newcommand\mkessler@mathop@category[1]{\operatorname{\textbf{#1}}}
|
|
|
|
%Easily declare new categories
|
|
|
|
\newcommand\DeclareCategory[1]{\expandafter\def\csname #1\endcsname{\mkessler@mathop@category{#1}}}
|
|
|
|
|
|
|
|
|
|
|
|
%%%%%%%%%%% Operators
|
|
|
|
%Basic commands
|
|
|
|
\DeclareSimpleMathOperator{id}
|
|
|
|
\DeclareSimpleMathOperator{im}
|
|
|
|
\DeclareSimpleMathOperator{Bild}
|
|
|
|
\DeclareSimpleMathOperator{dom}
|
|
|
|
\DeclareSimpleMathOperator{Span}
|
|
|
|
\DeclareSimpleMathOperator{Aut}
|
|
|
|
\DeclareMathOperator{\rhs}{RHS} %Right hand side of equation
|
|
|
|
\DeclareMathOperator{\lhs}{LHS} %Left hand side of equation
|
|
|
|
|
|
|
|
%%Provide \ggT \gcd \kgV \lcm for 'greatest common denominator' and 'least common multiple'
|
|
|
|
% \ggT und \gcd, as well as \kgV and \lcm are synonyms and language-aware, so that
|
|
|
|
% e.g. when the german language option is loaded, even
|
|
|
|
% \lcm would print 'kgV'
|
|
|
|
% The starred versions of the four commands will ignore the language option and print their
|
|
|
|
% exact names (without the *, of course)
|
|
|
|
\DeclareMathOperator{\@mkessler@mathop@ggT}{ggT}
|
|
|
|
\DeclareMathOperator{\@@mkessler@mathop@ggT}{\if@mkessler@mathop@english gcd\else ggT\fi}
|
|
|
|
\def\ggT{\@ifstar\@mkessler@mathop@ggT\@@mkessler@mathop@ggT}
|
|
|
|
|
|
|
|
\DeclareMathOperator{\@mkessler@mathop@gcd}{gcd}
|
|
|
|
\DeclareMathOperator{\@@mkessler@mathop@gcd}{\if@mkessler@mathop@english gcd\else ggT\fi}
|
|
|
|
\def\gcd{\@ifstar\@mkessler@mathop@gcd\@@mkessler@mathop@gcd}
|
|
|
|
|
|
|
|
\DeclareMathOperator{\@mkessler@mathop@kgV}{kgV}
|
|
|
|
\DeclareMathOperator{\@@mkessler@mathop@kgV}{\if@mkessler@mathop@english lcm\else kgV\fi}
|
|
|
|
\def\kgV{\@ifstar\@mkessler@mathop@kgV\@@mkessler@mathop@kgV}
|
|
|
|
|
|
|
|
\DeclareMathOperator{\@mkessler@mathop@lcm}{lcm}
|
|
|
|
\DeclareMathOperator{\@@mkessler@mathop@lcm}{\if@mkessler@mathop@english lcm\else kgV\fi}
|
|
|
|
\def\lcm{\@ifstar\@mkessler@mathop@lcm\@@mkessler@mathop@lcm}
|
|
|
|
|
|
|
|
%Complex numbers
|
|
|
|
\DeclareMathOperator{\mkessler@mathop@impart}{Im}
|
|
|
|
\renewcommand\Im\mkessler@mathop@impart
|
|
|
|
\DeclareMathOperator{\mkessler@mathop@repart}{Re}
|
|
|
|
\renewcommand\Re\mkessler@mathop@repart
|
|
|
|
|
|
|
|
%Linear Algebra
|
|
|
|
\DeclareSimpleMathOperator{Sym}
|
|
|
|
\DeclareSimpleMathOperator{supp}
|
|
|
|
\DeclareSimpleMathOperator{sgn}
|
|
|
|
\DeclareSimpleMathOperator{coker}
|
|
|
|
\DeclareSimpleMathOperator{rank}
|
|
|
|
\DeclareSimpleMathOperator{Mat}
|
|
|
|
\DeclareSimpleMathOperator{ev}
|
|
|
|
|
|
|
|
%Algebra
|
|
|
|
\DeclareSimpleMathOperator{Quot}
|
|
|
|
\DeclareSimpleMathOperator{Gal}
|
|
|
|
\DeclareSimpleMathOperator{Ext}
|
|
|
|
\DeclareSimpleMathOperator{Tor}
|
|
|
|
\DeclareSimpleMathOperator{MaxSpec}
|
|
|
|
\DeclareSimpleMathOperator{Sh}
|
|
|
|
\DeclareSimpleMathOperator{Proj}
|
|
|
|
\DeclareSimpleMathOperator{QCoh}
|
|
|
|
\DeclareSimpleMathOperator{MaxSpec}
|
|
|
|
\DeclareSimpleMathOperator{Fun}
|
2021-10-14 08:56:19 +02:00
|
|
|
\DeclareMathOperator{\Nil}{\mathcal{N}il}
|
2021-10-08 09:41:15 +02:00
|
|
|
\DeclareMathOperator{\PreSh}{Pre-Sh}
|
|
|
|
\newcommand{\tensor}{\otimes} %Synonym for tensoring
|
|
|
|
|
|
|
|
%Analysis
|
|
|
|
\DeclareSimpleMathOperator{dx}
|
|
|
|
\DeclareSimpleMathOperator{dy}
|
|
|
|
\DeclareSimpleMathOperator{dz}
|
|
|
|
\DeclareSimpleMathOperator{dt}
|
|
|
|
|
|
|
|
%Sets
|
|
|
|
\DeclareSimpleMathOperator{conv}
|
|
|
|
\DeclareSimpleMathOperator{dist}
|
|
|
|
\DeclareSimpleMathOperator{diam}
|
|
|
|
|
|
|
|
%%Stochastic (Algorithmische Mathematik II)
|
|
|
|
\DeclareDistribution{Bin}
|
|
|
|
\DeclareDistribution{Ber}
|
|
|
|
\DeclareDistribution{Geo}
|
|
|
|
\DeclareDistribution{Poi}
|
|
|
|
\DeclareDistribution{Unif}
|
|
|
|
\DeclareDistribution{Var}
|
|
|
|
\DeclareDistribution{Cov}
|
|
|
|
|
|
|
|
%Topology
|
|
|
|
\DeclareSimpleMathOperator{pr}
|
|
|
|
\def\twedge{\vee} % Semantically correct macros for wedge product
|
|
|
|
\def\tsmash{\wedge} % Semantically correct macro for smash product
|
|
|
|
|
|
|
|
%Category Theory
|
|
|
|
\DeclareSimpleMathOperator{Ob}
|
|
|
|
\DeclareSimpleMathOperator{Hom}
|
|
|
|
\DeclareSimpleMathOperator{Mor}
|
|
|
|
\DeclareSimpleMathOperator{End}
|
|
|
|
\DeclareSimpleMathOperator{colim}
|
|
|
|
|
|
|
|
%Categories
|
|
|
|
\DeclareCategory{Top}
|
|
|
|
\DeclareCategory{hTop}
|
|
|
|
\DeclareCategory{Set}
|
|
|
|
\DeclareCategory{CHaus}
|
|
|
|
\DeclareCategory{Grp}
|
|
|
|
\DeclareCategory{Ab}
|
|
|
|
\DeclareCategory{CRing}
|
|
|
|
\DeclareCategory{Vect}
|
|
|
|
\DeclareCategory{Fin}
|
|
|
|
\DeclareCategory{Ab}
|
|
|
|
\DeclareCategory{Cat}
|
|
|
|
|
|
|
|
%Set theory
|
|
|
|
\DeclareSimpleMathOperator{card}
|
|
|
|
\DeclareSimpleMathOperator{Cd}
|
|
|
|
\DeclareSimpleMathOperator{Ord}
|
|
|
|
\DeclareSimpleMathOperator{otp}
|
|
|
|
\DeclareSimpleMathOperator{Card}
|
|
|
|
|
|
|
|
%%Galoiskohomologie
|
|
|
|
\DeclareSimpleMathOperator{Br}
|
|
|
|
\DeclareSimpleMathOperator{EXT}
|
|
|
|
\DeclareSimpleMathOperator{Ind}
|
|
|
|
\DeclareSimpleMathOperator{char}
|
|
|
|
\DeclareSimpleMathOperator{res}
|
|
|
|
\DeclareSimpleMathOperator{inf}
|
|
|
|
\DeclareSimpleMathOperator{cov}
|
|
|
|
\newcommand{\del}{\partial} % Semantically correct operator for boundary maps
|
|
|
|
|
|
|
|
% Characteristic function
|
|
|
|
\newcommand*{\cfun}{\ensuremath{\mathbbm{1}}}
|
|
|
|
\newcommand*{\One}{\cfun}
|
|
|
|
|
|
|
|
%Paired Delimiters
|
|
|
|
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
|
|
|
|
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
|
|
|
|
|
|
|
|
%Norm and absolute value
|
|
|
|
%Make them scaling by default and have \abs*{} as the non-scaling version of the command
|
|
|
|
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
|
|
|
|
\let\oldabs\abs
|
|
|
|
\def\abs{\@ifstar{\oldabs}{\oldabs*}}
|
|
|
|
|
|
|
|
\DeclarePairedDelimiter\norm{\lVert}{\rVert}
|
|
|
|
\let\oldnorm\norm
|
|
|
|
\def\norm{\@ifstar{\oldnorm}{\oldnorm*}}
|
2021-10-10 14:02:03 +02:00
|
|
|
|
|
|
|
\DeclareMathOperator{\amalgprod}{\star}
|