From 93c8209c75f02b41fe26c7d58dd7b8f8814051f0 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 1 Nov 2019 15:03:10 -0400 Subject: [PATCH] mjo-arrow: add the constant function \const. --- examples.tex | 5 +++-- mjo-arrow.tex | 12 ++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/examples.tex b/examples.tex index c1f3df1..9e376cc 100644 --- a/examples.tex +++ b/examples.tex @@ -53,8 +53,9 @@ \end{section} \begin{section}{Arrow} - The identity operator on $V$ is $\identity{V}$. The composition of - $f$ and $g$ is $\compose{f}{g}$. The inverse of $f$ is + The constant function that always returns $a$ is $\const{a}$. The + identity operator on $V$ is $\identity{V}$. The composition of $f$ + and $g$ is $\compose{f}{g}$. The inverse of $f$ is $\inverse{f}$. If $f$ is a function and $A$ is a subset of its domain, then the preimage under $f$ of $A$ is $\preimage{f}{A}$. \end{section} diff --git a/mjo-arrow.tex b/mjo-arrow.tex index 60530cb..9bf9dc5 100644 --- a/mjo-arrow.tex +++ b/mjo-arrow.tex @@ -11,6 +11,18 @@ \usepackage{amsopn} \fi + +% The constant function that always returns its argument. +\newcommand*{\const}[1]{\operatorname{const}_{{#1}}} + +\ifdefined\newglossaryentry + \newglossaryentry{const}{ + name={\ensuremath{\const{a}}}, + description={the constant function that always returns $a$}, + sort=c + } +\fi + % The identity operator/arrow on its argument. \newcommand*{\identity}[1]{ \operatorname{id}_{{#1}} } -- 2.44.2