The mathlib package^{∗}

Andrew D. Lewis

1998/06/16

1 What is mathlib and how do I use it?

I have found the need for many specialised mathematical symbols and tasks which L^{A}TEX can provide for me. For convenience, I have made these into a L^{A}TEX 2ε package which I distribute under the name mathlib.

• To load mathlib you, as usual load it with the \usepackage command.

• mathlib comes with options [leqno] and [reqno] depending on whether you want left or right equation numbering.

• mathlib comes with the option [subsetswitch]. By selecting this option, typing \subset gives ⊆ and typing \subsetneq gives ⊂. (These are usually \subseteq and \subset, respectively.)

• mathlib has an option [pdflatex] which can be set if you are using pdflatex. This will ensure that inappropriate fonts are not loaded.

• The packages amsmath, amssymb, mathrsfs, derivs, maps, intervals are

required by mathlib. The last two are part of the mathlib bundle. mathrsfs is a font package, giving a nice script font. If you don’t want to be bother with this, you may simply euscript which is the AMS script font. In this case you should also remove the line loading eucal since this makes the AMS script font the caligraphic font as well. And you don’t want your script font and your caligraphic font agreeing now, do you? If you do not have mathrsfs package, then no harm will befall you.

2 mathlib features and implementation

It is convenient to describe the features along with the macros themselves. So first we need to do the preliminary stuff like load the required packages and get all the options figured out.

1 ⟨∗package⟩

∗This file has version number v1.1e, last revised 1998/06/16.

 2 \@ifundefined{@ADL@@usepdflatex}{\def\@ADL@@usepdflatex{\z@}}{}
 3 \def\@ADL@@subsetswitch{\z@}
 4 \DeclareOption{reqno}{\def\@ADL@@reqn{\@ne}}
 5 \DeclareOption{leqno}{\def\@ADL@@reqn{\z@}}
 6 \DeclareOption{pdflatex}{\def\@ADL@@usepdflatex{\@ne}}
 7 \DeclareOption{subsetswitch}{\def\@ADL@@subsetswitch{\@ne}}
 8 \ExecuteOptions{reqno}
 9 \ProcessOptions
10 \@ifundefined{beamer@version}{
11 \ifnum\@ADL@@reqn=\@ne
12 \PackageWarning{mathlib}{Using right equation numbers}
13 \RequirePackage[reqno,centertags]{amsmath}
14 \else
15 \PackageWarning{mathlib}{Using left equation numbers}
16 \RequirePackage[leqno,centertags]{amsmath}
17 \fi
18 \RequirePackage[psamsfonts]{amssymb}
19 }{}
20 \RequirePackage{derivs,maps,intervals}
21 % ADL: I will restore this when Type1 bbm fonts are available!
22 %\ifnum\@ADL@@usepdflatex=\z@
23 %  \IfFileExists{bbm.sty}{\RequirePackage{bbm}\let\mathbb\mathbbm}{}
24 %\fi
25 \IfFileExists{mathrsfs.sty}{\RequirePackage{mathrsfs}}{}
26 \@ifundefined{mathscr}{\let\mathscr\mathrsfs}{}
27 \RequirePackage[mathcal]{eucal}
28 \ifnum\@ADL@@subsetswitch=\@ne
29 \let\subsetneq\subset
30 \let\subset\subseteq
31 \let\supsetneq\supset
32 \let\supset\supseteq
33 \fi

We now break down the features of mathlib into parts.

2.1 Symbols

mathlib defines the basic rings and fields of the applied sciences. These are decreed to be the real numbers (\real), the complex numbers (\complex), the integers (\integer), the rational numbers (\rational), the natural numbers (\natural), and the whole numbers (enatural). The extended real numbers, i.e., the real numbers along with ∞ and −∞, are denoted by \ereal. For real numbers you can specify positive, nonnegative, negative, nonpositive, and nonzero numbers

by \realp, \realnn, \realn, \realnp, and \realnz, respectively. The same

notation holds for rational numbers, the integers, and the extended reals. These will all appear in the blackboard bold font that you are using. Please note that \natural is an existing L^{A}TEX command which gets overridden! Also note that the commands \Re and \Im are overwritten from their default ugliness to something more tasteful.

35 \newcommand\real{\mathbb{R}}
36 \newcommand\ereal{\overline{\real}}
37 \newcommand\erealp{\ereal_{>0}}
38 \newcommand\erealnn{\ereal_{\ge0}}
39 \newcommand\realp{\real_{>0}}
40 \newcommand\realnn{\real_{\ge0}}
41 \newcommand\realn{\real_{<0}}
42 \newcommand\realnp{\real_{\le0}}
43 \newcommand\realnz{\real^*}
44 \newcommand\complex{\mathbb{C}}
45 \newcommand\complexp{\mathbb{C}_{>0}}
46 \newcommand\complexnn{\mathbb{C}_{\ge0}}
47 \newcommand\complexn{\mathbb{C}_{<0}}
48 \newcommand\complexnp{\mathbb{C}_{\le0}}
49 \newcommand\integer{\mathbb{Z}}
50 \newcommand\integerp{\integer_{>0}}
51 \newcommand\integernn{\integer_{\ge0}}
52 \newcommand\integern{\integer_{<0}}
53 \newcommand\integernp{\integer_{\le0}}
54 \newcommand\rational{\mathbb{Q}}
55 \newcommand\rationalp{\rational_{>0}}
56 \newcommand\rationalnn{\rational_{\ge0}}
57 \newcommand\rationaln{\rational_{<0}}
58 \newcommand\rationalnp{\rational_{\le0}}
59 \newcommand\rationalnz{\rational^*}
60 \PackageWarning{mathlib}{Redefining \string\natural}
61 \renewcommand\natural{\mathbb{N}}
62 \newcommand\enatural{\natural_0}
63 \PackageWarning{mathlib}{Redefining \string\Re and \string\Im}
64 \renewcommand\Re{\operatorname{Re}}
65 \renewcommand\Im{\operatorname{Im}}
66 \newcommand\imag{\textup{i}}
67 \newcommand\eul{\textup{e}}

Some basic manifolds are also defined by mathlib; namely the spheres (\sphere) and tori (\torus). These are simply blackboard bold “S” and “T”.

68 \newcommand\sphere{\mathbb{S}}
69 \newcommand\torus{\mathbb{T}}

I make frequent use of \scirc as the symbol for composition of maps. I find \circ is too big.

70 \newcommand\scirc{\raise1pt\hbox{$\,\scriptstyle\circ\,$}}
71 \newcommand\sscirc{\hbox{$\,\scriptscriptstyle\circ\,$}}

Here are the floor and ceiling commands.

72 \newcommand\floor[1]{\lfloor#1\rfloor}
73 \newcommand\ceiling[1]{\lceil#1\rceil}

74 %

75 % Here are a few binary operations.  |\eqdef| I use when I am

76 % defining something to be equal to something else.  The symbols
77 % |\disjointunion| and |\transverse| do as you expect if you are familiar
78 % with these symbols.  The macros |\osubset|, |\osubseteq|, and |\osubsetneq|
79 % I use for denoting open subsets (the usual subset symbol with a circle
80 % inside).
81 %    \begin{macrocode}

82

83 \newcommand\eqdef{\triangleq}
84 \newcommand\disjointunion{{\displaystyle\overset{\sscirc}{\cup}}}
85 \newcommand\bigdisjointunion{{\displaystyle\overset{\sscirc}{\bigcup}}}
86 \newcommand\transverse{\mathbin{\pitchfork\kern-0.855em\raise0.45em\hbox{--}
87 \kern 0.37em}}
88 \newcommand\osubset{%
89 \mbox{$\subset\kern-1.0em\lower0.02em\hbox{\scirc}\kern0.35em$}}
90 \newcommand\osubseteq{%
91 \mbox{$\subseteq\kern-1.0em\raise0.09em\hbox{\scirc}\kern0.35em$}}
92 \newcommand\osubsetneq{%
93 \mbox{$\subsetneq\kern-1.0em\raise0.09em\hbox{\scirc}\kern0.35em$}}

2.2 Delimiters

I use all kinds of delimiters and they all have certain features. If you use them in their basic form (with none of the prefixes which you will soon see) they will come in the basic size. If you use the prefix “a” then they are delimited with TEX’s \left and \right and so are automatically scaled. Sometimes this does not work and so one wants to specify \big, \Big, \bigg, or \Bigg versions manually. As you can see for yourself, this is possible. As well as the usual “big” versions, each delimiter type also has a “normal” version if you want to force L^{A}TEX into doing that.

First is the single bar norm:

94

95 \newcommand\slnorm{\lvert}
96 \newcommand\srnorm{\rvert}
97 \newcommand\snorm[1]{\slnorm #1\srnorm}
98 \newcommand\asnorm[1]{\left\slnorm #1\right\srnorm}
99 \newcommand\normalsnorm[1]{\vert#1\vert}
100 \newcommand\bigsnorm[1]{\bigl\lvert #1\bigr\rvert}
101 \newcommand\Bigsnorm[1]{\Bigl\lvert #1\Bigr\rvert}
102 \newcommand\biggsnorm[1]{\biggl\lvert #1\biggr\rvert}
103 \newcommand\Biggsnorm[1]{\Biggl\lvert #1\Biggr\rvert}

Next comes the double bar norm:

104

105 \newcommand\dlnorm{\lVert}
106 \newcommand\drnorm{\rVert}
107 \newcommand\dnorm[1]{\dlnorm #1\drnorm}
108 \newcommand\adnorm[1]{\left\dlnorm #1\right\drnorm}
109 \newcommand\normaldnorm[1]{\dlnorm#1\drnorm}
110 \newcommand\bigdnorm[1]{\bigl\lVert #1\bigr\rVert}

111 \newcommand\Bigdnorm[1]{\Bigl\lVert #1\Bigr\rVert}
112 \newcommand\biggdnorm[1]{\biggl\lVert #1\biggr\rVert}
113 \newcommand\Biggdnorm[1]{\Biggl\lVert #1\Biggr\rVert}

Also, the unbelievably exciting triple bar norm:

114

115 \newcommand\tlnorm{\left|\!\left|\!\left|}
116 \newcommand\trnorm{\right|\!\right|\!\right|}
117 \newcommand\tnorm[1]{|\!|\!|#1|\!|\!|}
118 \newcommand\atnorm[1]{\tlnorm#1\trnorm}
119 \newcommand\normaltnorm[1]{|\!|\!|#1|\!|\!|}
120 \newcommand\bigtnorm[1]{\bigl|\!\bigl|\!\bigl|#1\bigr|\!\bigr|\!\bigr|}
121 \newcommand\Bigtnorm[1]{\Bigl|\!\Bigl|\!\Bigl|#1\Bigr|\!\Bigr|\!\Bigr|}
122 \newcommand\biggtnorm[1]{\biggl|\!\biggl|\!\biggl|#1\biggr|\!\biggr|\!\biggr|}
123 \newcommand\Biggtnorm[1]{\Biggl|\!\Biggl|\!\Biggl|#1\Biggr|\!\Biggr|\!\Biggr|}

Sometimes angled brackets are what you want:

124

125 \newcommand\angbrack[1]{\langle#1\rangle}
126 \newcommand\aangbrack[1]{\left<#1\right>}
127 \newcommand\normalangbrack[1]{\langle#1\rangle}
128 \newcommand\bigangbrack[1]{\big\langle#1\big\rangle}
129 \newcommand\Bigangbrack[1]{\Big\langle#1\Big\rangle}
130 \newcommand\biggangbrack[1]{\bigg\langle#1\bigg\rangle}
131 \newcommand\Biggangbrack[1]{\Bigg\langle#1\Bigg\rangle}

\setdef This one is a bit nonstandard. This is used for defining subsets of a set. The usage is

\setdef{thing you’re defining}{defining relations}

Note that the object being defined is used to determine the size of the “such that” bar.

132

133 \newcommand\setdef[2]{\{#1\;|\enspace#2\}}
134 \newcommand\asetdef[2]{\left\{\left.#1\;\right|\enspace#2\right\}}
135 \newcommand\normalsetdef[2]{\{#1\;|\enspace#2\}}
136 \newcommand\bigsetdef[2]{\big\{#1\;\big|\enspace#2\big\}}
137 \newcommand\Bigsetdef[2]{\Big\{#1\;\Big|\enspace#2\Big\}}
138 \newcommand\biggsetdef[2]{\bigg\{#1\;\bigg|\enspace#2\bigg\}}
139 \newcommand\Biggsetdef[2]{\Bigg\{#1\;\Bigg|\enspace#2\Bigg\}}

140

141 \newcommand\ifam[1]{(#1)}
142 \newcommand\bigifam[1]{\bigl(#1\bigr)}
143 \newcommand\Bigifam[1]{\Bigl(#1\Bigr)}
144 \newcommand\biggifam[1]{\biggl(#1\biggr)}
145 \newcommand\Biggifam[1]{\Biggl(#1\Biggr)}

146

147 \newcommand\mset[1]{\{#1\}}
148 \newcommand\bigmset[1]{\bigl\{#1\bigr\}}
149 \newcommand\Bigmset[1]{\Bigl\{#1\Bigr\}}

150 \newcommand\biggmset[1]{\biggl\{#1\biggr\}}
151 \newcommand\Biggmset[1]{\Biggl\{#1\Biggr\}}

\inprod means inner product:

152

153 \newcommand\inprod[2]{\langle#1,#2\rangle}
154 \newcommand\ainprod[2]{\left<#1,#2\right>}
155 \newcommand\normalinprod[2]{\langle#1,#2\rangle}
156 \newcommand\biginprod[2]{\big\langle#1,#2\big\rangle}
157 \newcommand\Biginprod[2]{\Big\langle#1,#2\Big\rangle}
158 \newcommand\bigginprod[2]{\bigg\langle#1,#2\bigg\rangle}
159 \newcommand\Bigginprod[2]{\Bigg\langle#1,#2\Bigg\rangle}

\natpair means the natural pairing between a dual vector and a vector. Not a very sharp notational divide here with the inner product (a semi-colon rather than a comma), but it works for me.

160

161 \newcommand\natpair[2]{\langle#1;#2\rangle}
162 \newcommand\anatpair[2]{\left<#1;#2\right>}
163 \newcommand\normalnatpair[2]{\langle#1;#2\rangle}
164 \newcommand\bignatpair[2]{\big\langle#1;#2\big\rangle}
165 \newcommand\Bignatpair[2]{\Big\langle#1;#2\Big\rangle}
166 \newcommand\biggnatpair[2]{\bigg\langle#1;#2\bigg\rangle}
167 \newcommand\Biggnatpair[2]{\Bigg\langle#1;#2\Bigg\rangle}

My beloved symmetric product. Probably useless to the other five billion inhabitants of the planet. And adding to the inner product-natural pairing notational subtlety to boot!

168

169 \newcommand\symprod[2]{\langle#1:#2\rangle}
170 \newcommand\asymprod[2]{\left<#1:#2\right>}
171 \newcommand\normalsymprod[2]{\langle#1:#2\rangle}
172 \newcommand\bigsymprod[2]{\big\langle#1:#2\big\rangle}
173 \newcommand\Bigsymprod[2]{\Big\langle#1:#2\Big\rangle}
174 \newcommand\biggsymprod[2]{\bigg\langle#1:#2\bigg\rangle}
175 \newcommand\Biggsymprod[2]{\Bigg\langle#1:#2\Bigg\rangle}

\vecspan This one is unusual too. I use it to write the linear span of a set over a ring which may or may not be specified. The usage is

\vecspan[ring over which span is taken]{set of elements}

The usual L^{A}TEX optional argument convention is used.

176

177 \newcommand\vecspan{\@ifnextchar[{\@ADL@normalvecspan}
178 {\@ADL@@normalvecspan}}
179 \newcommand\avecspan{\@ifnextchar[{\@ADL@vecspan}{\@ADL@@vecspan}}
180 \def\@ADL@vecspan[#1]#2{\operatorname{span}_{#1}\left(#2\right)}
181 \newcommand\@ADL@@vecspan[1]{\operatorname{span}\left(#1\right)}
182 \newcommand\normalvecspan{\@ifnextchar[{\@ADL@normalvecspan}
183 {\@ADL@@normalvecspan}}

184 \def\@ADL@normalvecspan[#1]#2{\operatorname{span}_{#1}(#2)}
185 \newcommand\@ADL@@normalvecspan[1]{\operatorname{span}(#1)}
186 \newcommand\bigvecspan{\@ifnextchar[{\@ADL@bigvecspan}{\@ADL@@bigvecspan}}
187 \def\@ADL@bigvecspan[#1]#2{\operatorname{span}_{#1}\bigl(#2\bigr)}
188 \newcommand\@ADL@@bigvecspan[1]{\operatorname{span}\bigl(#1\bigr)}
189 \newcommand\Bigvecspan{\@ifnextchar[{\@ADL@Bigvecspan}{\@ADL@@Bigvecspan}}
190 \def\@ADL@Bigvecspan[#1]#2{\operatorname{span}_{#1}\Bigl(#2\Bigr)}
191 \newcommand\@ADL@@Bigvecspan[1]{\operatorname{span}\Bigl(#1\Bigr)}
192 \newcommand\biggvecspan{\@ifnextchar[{\@ADL@biggvecspan}{\@ADL@@biggvecspan}}
193 \def\@ADL@biggvecspan[#1]#2{\operatorname{span}_{#1}\biggl(#2\biggr)}
194 \newcommand\@ADL@@biggvecspan[1]{\operatorname{span}\biggl(#1\biggr)}
195 \newcommand\Biggvecspan{\@ifnextchar[{\@ADL@Biggvecspan}{\@ADL@@Biggvecspan}}
196 \def\@ADL@Biggvecspan[#1]#2{\operatorname{span}_{#1}\Biggl(#2\Biggr)}
197 \newcommand\@ADL@@Biggvecspan[1]{\operatorname{span}\Biggl(#1\Biggr)}

2.3 Algebra, especially Lie

Here’s some special notation I have for some algebraic conventions.

First some simple things: the dual of a vector space (\dual{space}); the algebraic dual of a vector space (\algdual{space});the symmetric algebra of a vector space (\Symalg[point]{space}); the alternating algebra of a vector space (\Altalg[point]{space}). I have optional base point arguments for \Symalg and \Altalg in case I need to use them for tangent spaces. If you want the dual of the dual, use \dual*. Similarly, use \algdual* if you want the algebraic dual of the algebraic dual.

198

199 \newcommand\Aut{\mathupper{Aut}}
200 \newcommand\End{\mathupper{End}}
201 \newcommand\Hom{\mathupper{Hom}}
202 \newcommand\dual{\@ifstar{\@ADL@ddual}{\@ADL@dual}}
203 \newcommand\@ADL@ddual[1]{#1^{**}}
204 \newcommand\@ADL@dual[1]{#1^*}
205 \newcommand\algdual{\@ifstar{\@ADL@algddual}{\@ADL@algdual}}
206 \newcommand\@ADL@algddual[1]{#1''}
207 \newcommand\@ADL@algdual[1]{#1'}

208 %

209 \newcommand\Symalg{\@ifstar{\@ADL@symalgs}{\@ADL@symalgns}}
210 \newcommand\@ADL@symalgns{\@ifnextchar[{\@ADL@symalg}{\@ADL@@symalg}}
211 \def\@ADL@symalg[#1]#2{\@ADL@tsymalgsym^{#1}(#2)}
212 \newcommand\@ADL@@symalg[1]{\@ADL@tsymalgsym(#1)}
213 \newcommand\@ADL@symalgs{\@ifnextchar[{\@ADL@ksymalgs}{\@ADL@noksymalgs}}
214 \def\@ADL@ksymalgs[#1]#2{\@ADL@symalgsym^{#1}(#2)}
215 \newcommand\@ADL@noksymalgs[1]{\@ADL@symalgsym(#1)}
216 \newcommand\pSymalg{\@ifnextchar[{\@ADL@psymalg}{\@ADL@@psymalg}}
217 \def\@ADL@psymalg[#1]#2{\@ADL@symalgsym_{#1}(#2)}
218 \newcommand\@ADL@@psymalg[1]{\@ADL@symalgsym^+(#1)}

219 %

220 \newcommand\Altalg{\@ifstar{\@ADL@altalgs}{\@ADL@altalgns}}
221 \newcommand\@ADL@altalgns{\@ifnextchar[{\@ADL@altalg}{\@ADL@@altalg}}

222 \def\@ADL@altalg[#1]#2{{\@ADL@taltalgsym^{#1}}(#2)}
223 \newcommand\@ADL@@altalg[1]{\@ADL@taltalgsym(#1)}
224 \newcommand\@ADL@altalgs{\@ifnextchar[{\@ADL@kaltalgs}{\@ADL@nokaltalgs}}
225 \def\@ADL@kaltalgs[#1]#2{{\@ADL@altalgsym^{#1}}(#2)}
226 \newcommand\@ADL@nokaltalgs[1]{\@ADL@altalgsym(#1)}

227 %

228 \newcommand\Symalgsymbol[1]{\def\@ADL@symalgsym{#1}}
229 \newcommand\TSymalgsymbol[1]{\def\@ADL@tsymalgsym{#1}}
230 \newcommand\Altalgsymbol[1]{\def\@ADL@altalgsym{#1}}
231 \newcommand\TAltalgsymbol[1]{\def\@ADL@taltalgsym{#1}}
232 \Symalgsymbol{\mathupper{S}}
233 \TSymalgsymbol{\mathupper{TS}}
234 \Altalgsymbol{{\textstyle\bigwedge@}}
235 \TAltalgsymbol{\mathupper{T}{\textstyle\bigwedge@}}

I do things frequently with Lie groups and Lie algebras and so have some macros for common examples of these. First I have some generic notation \Lie{space} for Lie groups and \lie{space} for Lie algebras.

236

237 \newcommand\Lie[1]{\textit{\uppercase{#1}}}
238 \newcommand\lie[1]{\mathfrak{\lowercase{#1}}}

Now for the common Lie groups and Lie algebras. These are

Name  Group macro Algebra macro
General linear  \GL[n]{field}  \gl[n]{field}
Special linear  \SL[n]{field}  \sl[n]{field}
Orthogonal  \O[point]{n}   \o[point]{n}
Special orthogonal \SO{n}        \so{n}
Unitary  \U[point]{n}   \un[point]{n}
Special unitary  \SU{n}        \su{n}
Euclidean  \E{n}         \e{n}
Special Euclidean \SE{n}        \se{n}
Symplectic  \Sp[n]{field}  \sp[n]{field}

Note the occasional optional arguments for dimensions. For example, one could go \GL[n]{\real} for the usual general linear group in n dimensions over the reals, or one could go \GL{V} for the general linear group of a vector space V. For the orthogonal group the optional argument is for a base point for when I am talking about the bundle of orthonormal frames. I also have \Gal for the Galilean group, and \gal for its Lie algebra.

239

240 \newcommand\GL{\@ifnextchar[{\@ADL@GL}{\@ADL@@GL}}
241 \def\@ADL@GL[#1]#2{\Lie{GL}(#1;#2)}
242 \newcommand\@ADL@@GL[1]{\Lie{GL}(#1)}
243 \newcommand\SL{\@ifnextchar[{\@ADL@SL}{\@ADL@@SL}}
244 \def\@ADL@SL[#1]#2{\Lie{SL}(#1;#2)}
245 \newcommand\@ADL@@SL[1]{\Lie{SL}(#1)}
246 \PackageWarning{mathlib}{Redefining \string\O}
247 \AtBeginDocument{

248 \renewcommand\O{\@ifnextchar[{\@ADL@Oarg}{\@ADL@O}}
249 \newcommand\@ADL@O[1]{\Lie{O}(#1)}
250 \def\@ADL@Oarg[#1]#2{\Lie{O}_{#1}(#2)}

251 }

252 \newcommand\SO[1]{\Lie{SO}(#1)}
253 \newcommand\U{\@ifnextchar[{\@ADL@Uarg}{\@ADL@U}}
254 \newcommand\@ADL@U[1]{\Lie{U}(#1)}
255 \def\@ADL@Oarg[#1]#2{\Lie{U}_{#1}(#2)}
256 \newcommand\SU[1]{\Lie{SU}(#1)}
257 \newcommand\E[1]{\Lie{E}(#1)}
258 \newcommand\SE[1]{\Lie{SE}(#1)}
259 \@ifundefined{Sp}{
260 \PackageWarning{mathlib}{Redefining \string\Sp}
261 \newcommand\Sp{\@ifnextchar[{\@ADL@Sp}{\@ADL@@Sp}}}
262 {\renewcommand\Sp{\@ifnextchar[{\@ADL@Sp}{\@ADL@@Sp}}}
263 \def\@ADL@Sp[#1]#2{\Lie{S\lowercase{p}}(#1;#2)}
264 \newcommand\@ADL@@Sp[1]{\Lie{S\lowercase{p}}(#1)}

265

266 \newcommand\gl{\@ifnextchar[{\@ADL@gl}{\@ADL@@gl}}
267 \def\@ADL@gl[#1]#2{\lie{gl}(#1;#2)}
268 \newcommand\@ADL@@gl[1]{\lie{gl}(#1)}
269 \PackageWarning{mathlib}{Redefining \string\sl}
270 \renewcommand\sl{\@ifnextchar[{\@ADL@sl}{\@ADL@@sl}}
271 \def\@ADL@sl[#1]#2{\lie{sl}(#1;#2)}
272 \newcommand\@ADL@@sl[1]{\lie{sl}(#1)}
273 \PackageWarning{mathlib}{Redefining \string\o}
274 \renewcommand\o{\@ifnextchar[{\@ADL@oarg}{\@ADL@o}}
275 \newcommand\@ADL@o[1]{\lie{o}(#1)}
276 \def\@ADL@oarg[#1]#2{\lie{o}_{#1}(#2)}
277 \newcommand\so[1]{\lie{so}(#1)}
278 \newcommand\un{\@ifnextchar[{\@ADL@uarg}{\@ADL@u}}
279 \newcommand\@ADL@u[1]{\lie{u}(#1)}
280 \def\@ADL@uarg[#1]#2{\lie{u}_{#1}(#2)}
281 \newcommand\su[1]{\lie{su}(#1)}
282 \newcommand\e[1]{\lie{e}(#1)}
283 \newcommand\se[1]{\lie{se}(#1)}
284 \PackageWarning{mathlib}{Redefining \string\sp}
285 \renewcommand\sp{\@ifnextchar[{\@ADL@sp}{\@ADL@@sp}}
286 \def\@ADL@sp[#1]#2{\lie{sp}(#1;#2)}
287 \newcommand\@ADL@@sp[1]{\lie{sp}(#1)}
288 \newcommand\Gal{\Lie{G\lowercase{al}}}
289 \newcommand\gal{\lie{gal}}

For the semi-direct product of G and N I use G\semiprod N which gives G⋉N.

290

291 \newcommand\semiprod{\ltimes}

I also have define the adjoint representation of the group and the algebra as \Ad and \ad, respectively.

292

293 \newcommand\Ad{\operatorname{Ad}}
294 \newcommand\ad{\operatorname{ad}}

2.4 Differential Calculus

For local computations on manifolds, I use the following symbols. I use \lin to denote sets of linear mappings. Type \lin[k]{E_{1}}{E_{2}} for the k multilinear mappings from E_{1} to E_{2}. Use \symlin for symmetric multilinear mappings and \altlin for alternating multilinear mappings. Type \linder[r]{function} for the rth derivative of a function between Banach spaces. For the partial derivatives on products use \plinder[r]{component}{function}. When dealing with local representatives of anything (maps, vector fields, etc.) use \locrep[chart]{object}.

295

296 \newcommand\lin{\@ifnextchar[{\@ADL@klinmap}{\@ADL@linmap}}
297 \def\@ADL@klinmap[#1]#2#3{\def\@tempa{#3}%
298 \ifx\@tempa\@empty\mathupper{L}^{#1}(#2;#2)\else%
299 \mathupper{L}^{#1}(#2;#3)\fi}
300 \def\@ADL@linmap#1#2{\def\@tempa{#2}\ifx\@tempa\@empty\mathupper{L}(#1;#1)\else
301 \mathupper{L}(#1;#2)\fi}
302 \newcommand\symlin{\@ifnextchar[{\@ADL@ksymlinmap}{\@ADL@symlinmap}}
303 \def\@ADL@ksymlinmap[#1]#2#3{\def\@tempa{#3}\ifx\@tempa\@empty
304 \subscr{\mathupper{L}}{sym}^{#1}(#2;#2)\else%
305 \subscr{\mathupper{L}}{sym}^{#1}(#2;#3)\fi}
306 \def\@ADL@symlinmap#1#2{\def\@tempa{#2}%
307 \ifx\@tempa\@empty\subscr{\mathupper{L}}{sym}(#1;#1)\else
308 \subscr{\mathupper{L}}{sym}(#1;#2)\fi}
309 \newcommand\altlin{\@ifnextchar[{\@ADL@kaltlinmap}{\@ADL@altlinmap}}
310 \def\@ADL@kaltlinmap[#1]#2#3{\def\@tempa{#3}\ifx\@tempa\@empty
311 \subscr{\mathupper{L}}{alt}^{#1}(#2;#2)\else%
312 \subscr{\mathupper{L}}{alt}^{#1}(#2;#3)\fi}
313 \def\@ADL@altlinmap#1#2{\def\@tempa{#2}%
314 \ifx\@tempa\@empty\subscr{\mathupper{L}}{alt}(#1;#1)\else
315 \subscr{\mathupper{L}}{alt}(#1;#2)\fi}
316 \newcommand\linder{\@ifnextchar[{\@ADL@rlinder}{\@ADL@linder}}
317 \def\@ADL@rlinder[#1]#2{\boldsymbol{D}^{#1}#2}
318 \newcommand\@ADL@linder[1]{\boldsymbol{D}#1}
319 \newcommand\plinder{\@ifnextchar[{\@ADL@rplinder}{\@ADL@plinder}}
320 \def\@ADL@rplinder[#1]#2#3{\boldsymbol{D}^{#1}_{#2}#3}
321 \newcommand\@ADL@plinder[2]{\boldsymbol{D}_{#1}#2}
322 \newcommand\locrep{\@ifnextchar[{\@ADL@clocrep}{\@ADL@locrep}}
323 \def\@ADL@clocrep[#1]#2{\boldsymbol{#2}_{#1}}
324 \newcommand\@ADL@locrep[1]{\boldsymbol{#1}}

2.5 Bundles of all sorts

I use a lot of differential geometric notation and so I have special notation for the standard (and perhaps some not so standard) bundles from differential geometry.

All of these allow an optional argument for a base point. I will only illustrate its use with the tangent bundle. It is the same for all others.

Let is begin with the tangent bundle (\tb[point]{manifold}) and its projection (\tbproj{manifold}):

325

326 \newcommand\man[1]{#1}
327 \newcommand\tb{\@ifnextchar[{\@ADL@tbarg}{\@ADL@tb}}
328 \def\@ADL@tbarg[#1]#2{\man{T}_{#1}#2}
329 \newcommand\@ADL@tb[1]{\man{T}#1}
330 \newcommand\tbproj[1]{\pi_{\tb{#1}}}

Next is the cotangent bundle (\ctb{manifold}) and its projection (\ctbproj{manifold}):

331

332 \newcommand\ctb{\@ifnextchar[{\@ADL@ctbarg}{\@ADL@ctb}}
333 \def\@ADL@ctbarg[#1]#2{\man{T}^*_{#1}#2}
334 \newcommand\@ADL@ctb[1]{\man{T}^*#1}
335 \newcommand\ctbproj[1]{\pi_{\ctb{#1}}}

I have notation for the double tangent bundle (\ttb{manifold}):

336

337 \newcommand\ttb{\@ifnextchar[{\@ADL@ttbarg}{\@ADL@ttb}}
338 \def\@ADL@ttbarg[#1]#2{\man{T}_{#1}\man{T}#2}
339 \newcommand\@ADL@ttb[1]{\man{TT}#1}

I use fibre bundles with their vertical bundles (\vb{bundle}):

340

341 \newcommand\vb{\@ifnextchar[{\@ADL@vbarg}{\@ADL@vb}}
342 \def\@ADL@vbarg[#1]#2{\man{V}_{#1}#2}
343 \newcommand\@ADL@vb[1]{\man{V}#1}

Here’s some notation for the dual of a vertical bundle (\cvb{bundle}):

344

345 \newcommand\cvb{\@ifnextchar[{\@ADL@cvbarg}{\@ADL@cvb}}
346 \def\@ADL@cvbarg[#1]#2{\man{V}^*_{#1}#2}
347 \newcommand\@ADL@cvb[1]{\man{V}^*#1}

Horizontal bundles (\hb{bundle}) are also useful to me:

348

349 \newcommand\hb{\@ifnextchar[{\@ADL@hbarg}{\@ADL@hb}}
350 \def\@ADL@hbarg[#1]#2{\man{H}_{#1}#2}
351 \newcommand\@ADL@hb[1]{\man{H}#1}

Here’s some notation for the dual of a horizontal bundle (\chb{bundle}):

352

353 \newcommand\chb{\@ifnextchar[{\@ADL@chbarg}{\@ADL@chb}}
354 \def\@ADL@chbarg[#1]#2{\man{H}^*_{#1}#2}
355 \newcommand\@ADL@chb[1]{\man{H}^*#1}

And how about some normal bundle (\nb{bundle}) action:

356

357 \newcommand\nb{\@ifnextchar[{\@ADL@nbarg}{\@ADL@nb}}
358 \def\@ADL@nbarg[#1]#2{\man{N}_{#1}#2}
359 \newcommand\@ADL@nb[1]{\man{N}#1}

\tensor And the (r, s) tensors on a bundle. The usage here is

\tensor[r,s]{bundle or manifold}

360

361 \newcommand\tensor{\@ifstar{\@ADL@tensors}{\@ADL@tensorns}}
362 \newcommand\@ADL@tensorns{\@ifnextchar[{\@ADL@rstensor}{\@ADL@tensor}}
363 \def\@ADL@rstensor[#1,#2]#3{\@ifnextchar[{\@ADL@rstensorbase{#1}{#2}{#3}}
364 {\@ADL@rstensornobase{#1}{#2}{#3}}}
365 \def\@ADL@rstensorbase#1#2#3[#4]{\@ADL@tensorsym^{#1}_{#2}(#3)_{#4}}
366 \newcommand\@ADL@rstensornobase[3]{\@ADL@tensorsym^{#1}_{#2}(#3)}
367 \newcommand\@ADL@tensor[1]{\@ifnextchar[{\@ADL@tensorbase{#1}}
368 {\@ADL@tensornobase{#1}}}
369 \def\@ADL@tensorbase#1[#2]{\@ADL@tensorsym(#1)_{#2}}
370 \newcommand\@ADL@tensornobase[1]{\@ADL@tensorsym(#1)}
371 \newcommand\@ADL@tensors{\@ifnextchar[{\@ADL@ktensors}{\@ADL@noktensors}}
372 \def\@ADL@ktensors[#1]#2{\@ADL@tensorsym^{#1}(#2)}
373 \newcommand\@ADL@noktensors[1]{\@ADL@tensorsym(#1)}
374 \newcommand\tensorsymbol[1]{\def\@ADL@tensorsym{#1}}
375 \tensorsymbol{\mathupper{T}}

\jet I use jet bundles occasionally. Here’s some notation for the jets to and from \cojet the real numbers to a manifold. The usage is

      \jet{m}{M}

for the m-jets into M and

      \cojet{M}

for the jets from M. There is no base point specification here as the notation is different. I use \jet{2}{M}_{t,q}, for example.

376

377 \newcommand\jet[2]{J^{#1}(\real,#2)}
378 \newcommand\cojet[1]{J^1(#1,\real)}

2.6 Sections of those bundles

Well, I may as well have some notation for taking sections of the bundles I use. I generally use the notation where the sections of a bundle involve a script like version of the bundle.

First is the basic macro. Typing \sections[r]{E} will give the sections of a vector bundle E. If you want the local sections with domain U type \sections[r]{E}[U]. Use \zsec{E} for the zero section of E.

379

380 \newcommand\sinfty{{\raise0.1em\hbox{$\scriptscriptstyle\infty$}}}
381 \newcommand\sections{\@ifnextchar[{\@ADL@rsections}{\@ADL@sections}}
382 \def\@ADL@rsections[#1]#2{\@ifnextchar[{\@ADL@rlocsections{#1}{#2}}%
383 {\@ADL@rglobsections{#1}{#2}}}
384 \def\@ADL@rlocsections#1#2[#3]{\Gamma^{#1}_{#3}(#2)}

385 \newcommand\@ADL@rglobsections[2]{\Gamma^{#1}(#2)}
386 \newcommand\@ADL@sections[1]{\@ifnextchar[{\@ADL@locsections{#1}}
387 {\@ADL@globsections{#1}}}
388 \def\@ADL@locsections#1[#2]{\Gamma^\sinfty_{#2}(#1)}
389 \newcommand\@ADL@globsections[1]{\Gamma^\sinfty(#1)}
390 \newcommand\zsec[1]{Z(#1)}

Now a few standard objects. \vfld{M} gives the vector fields on a manifold M. \forms[k]{M} gives the k-forms on M. \tensorf[r, s]{M} gives the tensor fields of type (r, s) on M. \func[r]{M} gives the C^{r} functions on M (i.e., sections of the trivial line bundle). I also include in this section \mappings[r]{M}{N} which are the C^{r} mappings from M to N. And this seems like as good a place as any to define the \graph of a mapping…

391

392 \newcommand\vfld[1]{\mathscr{T}(#1)}
393 \newcommand\forms{\@ifnextchar[{\@ADL@kform}{\@ADL@form}}
394 \def\@ADL@kform[#1]#2{\ifx#11{\mathscr{T}^*(#2)}\else{\Omega_{#1}(#2)}\fi}
395 \newcommand\@ADL@form[1]{\Omega(#1)}
396 \newcommand\tensorf{\@ifnextchar[{\@ADL@rstensorf}{\@ADL@tensorf}}
397 \def\@ADL@rstensorf[#1,#2]#3{\mathscr{T}^{#1}_{#2}(#3)}
398 \newcommand\@ADL@tensorf[1]{\mathscr{T}(#1)}
399 \newcommand\func{\@ifnextchar[{\@ADL@crfuncs}{\@ADL@cinftyfuncs}}
400 \def\@ADL@crfuncs[#1]#2{C^{#1}(#2)}
401 \newcommand\@ADL@cinftyfuncs[1]{C^\sinfty(#1)}
402 \newcommand\mappings{\@ifnextchar[{\@ADL@crmappings}{\@ADL@cinftymappings}}
403 \def\@ADL@crmappings[#1]#2#3{C^{#1}(#2,#3)}
404 \newcommand\@ADL@cinftymappings[2]{C^\sinfty(#1,#2)}
405 \newcommand\graph[1]{\Gamma(#1)}

2.7 Operations on tensors

Tensors of which ever type are meant to be differentiated, etc. Here are some of the usual operations: exterior derivative for forms (\der); interior product of a form α with a vector field X (\intprod{X}{α}); the Lie derivative of a tensor t with respect to a vector field X (\lieder{X}{t}); the gradient of a function (\grad{f}). I also use the macro \d which takes one argument. This is for writing tensors in coordinates: e.g., \d{x}\otimes\d{y} gives dx ⊗ dy.

406

407 \newcommand\der{\boldsymbol{d}}
408 \newcommand\intprod[2]{#1\hook\,#2}
409 \newcommand\hook{\mathbin{\hbox{\vrule height .5pt width 3.5pt depth 0pt
410 \vrule height 6pt width .5pt depth 0pt}}}
411 \newcommand\lieder[2]{\def\@tempa{#2}\ifx\@tempa\@empty%
412 \boldsymbol{\mathscr{L}}_{#1}\else\boldsymbol{\mathscr{L}}_{#1}#2\fi}
413 \newcommand\grad[1]{\operatorname{grad}#1}
414 \PackageWarning{mathlib}{Redefining \string\d}
415 \renewcommand\d[1]{{\normalfont\textrm{d}}#1}
416 \newcommand\Hess{\operatorname{Hess}}

I also include in this section my macros for differentiating maps. \tf[point]{map}[r] is the basic derivative thought of as a map between rth tangent bundles. Sometimes one can define its dual \ctf[point]{map}.

For maps between fibred manifolds, one also has the vertical derivative: \vf[point]{map}[r].

417

418 \newcommand\tf{\@ifnextchar[{\@ADL@tfarg}{\@ADL@tf}}
419 \def\@ADL@tfarg[#1]#2{\@ifnextchar[{\@ADL@@tfargr{#1}{#2}}
420 {\@ADL@@tfarg{#1}{#2}}}
421 \def\@ADL@@tfargr#1#2[#3]{T^{#3}_{#1}#2}
422 \newcommand\@ADL@@tfarg[2]{T_{#1}#2}
423 \newcommand\@ADL@tf[1]{\@ifnextchar[{\@ADL@@tfr{#1}}{\@ADL@@tf{#1}}}
424 \def\@ADL@@tfr#1[#2]{T^{#2}#1}
425 \newcommand\@ADL@@tf[1]{T#1}
426 \newcommand\ctf{\@ifnextchar[{\@ADL@ctfarg}{\@ADL@ctf}}
427 \def\@ADL@ctfarg[#1]#2{T^*_{#1}#2}
428 \newcommand\@ADL@ctf[1]{T^*#1}
429 \newcommand\vf{\@ifnextchar[{\@ADL@vfarg}{\@ADL@vf}}
430 \def\@ADL@vfarg[#1]#2{V_{#1}#2}
431 \newcommand\@ADL@vf[1]{V#1}

2.8 New operators

The L^{A}TEX macros supported by AMS supports new “operators.” I use a few of these, some pretty much standard, others being particular to things I find myself frequently doing. First the common ones. These describe properties of maps or sets, typically.

432

433 \newcommand\range{\operatorname{range}}
434 \newcommand\image{\operatorname{image}}
435 \newcommand\supp{\operatorname{supp}}
436 \newcommand\affhull{\operatorname{aff}}
437 \newcommand\cohull{\operatorname{conv}}
438 \newcommand\colin{\operatorname{lin}}
439 \newcommand\coker{\operatorname{coker}}
440 \newcommand\id{\operatorname{id}}
441 \newcommand\rank{\operatorname{rank}}
442 \newcommand\codim{\operatorname{codim}}
443 \newcommand\boundary{\operatorname{bd}}
444 \newcommand\interior{\operatorname{int}}
445 \newcommand\closure{\operatorname{cl}}
446 \newcommand\derived{\operatorname{der}}
447 \newcommand\tr{\operatorname{tr}}
448 \newcommand\ver{\operatorname{ver}}
449 \newcommand\hor{\operatorname{hor}}
450 \newcommand\GCD{\operatorname{GCD}}
451 \newcommand\LCM{\operatorname{LCM}}
452 \newcommand\subscr[2]{#1_{\textup{#2}}}

453 \newcommand\supscr[2]{#1^{\textup{#2}}}

I use \ann(set) for the set of dual vectors which annihilate a some vectors and \coann(set) for the set of vectors annihilated by a set of dual vectors.

454

455 \newcommand\ann{\operatorname{ann}}
456 \newcommand\coann{\operatorname{coann}}

\verlift Now some things I do with bundles — vertical and horizontal lifting. The \horlift usages are

      \verlift[point]{vector}
      \horlift[point]{vector}

I have also used just plain \lift although I am shying away from it lately.

457

458 \newcommand\lift{\operatorname{lift}}
459 \newcommand\verlift{\@ifnextchar[{\@ADL@verliftpoint}{\@ADL@verlift}}
460 \def\@ADL@verliftpoint[#1]{\operatorname{vlft}_{#1}}
461 \newcommand\@ADL@verlift{\operatorname{vlft}}
462 \newcommand\horlift{\@ifnextchar[{\@ADL@horliftpoint}{\@ADL@horlift}}
463 \def\@ADL@horliftpoint[#1]{\operatorname{hlft}_{#1}}
464 \newcommand\@ADL@horlift{\operatorname{hlft}}

465

466 ⟨/package⟩