]> gitweb.michael.orlitzky.com - mjotex.git/blob - mjo-arrow.tex
mjo-algebra.tex: fix glossary sorting of \variety
[mjotex.git] / mjo-arrow.tex
1 %
2 % Things dealing with arrows in a category. Or functions, basically.
3 %
4 \ifx\havemjoarrow\undefined
5 \def\havemjoarrow{1}
6
7
8 \input{mjo-common} % for \of, at least.
9
10 \ifx\operatorname\undefined
11 \usepackage{amsopn}
12 \fi
13
14
15 % The constant function that always returns its argument.
16 \newcommand*{\const}[1]{\operatorname{const}_{{#1}}}
17
18 \ifdefined\newglossaryentry
19 \newglossaryentry{const}{
20 name={\ensuremath{\const{a}}},
21 description={the constant function that always returns $a$},
22 sort=c
23 }
24 \fi
25
26 % The identity function/arrow on its argument.
27 \newcommand*{\identity}[1]{ \operatorname{id}_{{#1}} }
28
29 \ifdefined\newglossaryentry
30 \newglossaryentry{identity}{
31 name={\ensuremath{\identity{X}}},
32 description={the identity function or arrow on $X$},
33 sort=i
34 }
35 \fi
36
37 % The composition of two arrows/functions. For example, the
38 % composition of g with f is \compose{g}{f}\of{x} === g\of{f\of{x}}.
39 \newcommand*{\compose}[2]{ {#1}\circ{#2} }
40
41 % The inverse of an arrow, function, or whatever.
42 \newcommand*{\inverse}[1]{ #1^{-1} }
43
44 % The preimage of the second argument (a set) under the first (a function).
45 \newcommand*{\preimage}[2]{ #1^{-1}\of{#2} }
46
47
48 \fi