From 6759e3a5bd5fd13bd239ee851c66d1eac83a7c1b Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 4 Nov 2019 08:59:15 -0500 Subject: [PATCH] mjo-common: prevent \Sn[1] and \Hn[1] from dropping their superscripts. This was a TODO item for a while; a standalone "S" or "H" doesn't have the same meaning as, say, a standalone \mathbb{R} does. The "n" doesn't indicate the arity of a Cartesian product, so for example S^2 isn't two copies of S^1. Dropping the superscript was therefore misleading (and nonstandard notation). --- TODO | 3 --- examples.tex | 6 +++++- mjo-common.tex | 19 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/TODO b/TODO index ddde006..a8ef5d8 100644 --- a/TODO +++ b/TODO @@ -1,4 +1 @@ 1. Move the set operations from mjo-common and mjo-misc into mjo-set. - -2. Having S^{n} or H^{n} reduce to simply "S" or "H" in the case where - n=1 doesn't make sense. diff --git a/examples.tex b/examples.tex index cd615de..a2e9cf3 100644 --- a/examples.tex +++ b/examples.tex @@ -117,7 +117,11 @@ superscript when that superscript would be one: $\Nn[1]$, $\Zn[1]$, $\Qn[1]$, $\Rn[1]$, $\Cn[1]$. However, if the superscript is (say) two, then it appears: $\Nn[2]$, $\Zn[2]$, - $\Qn[2]$, $\Rn[2]$, $\Cn[2]$. + $\Qn[2]$, $\Rn[2]$, $\Cn[2]$. Likewise we have the $n$-by-$n$ + real-symmetric and complex-Hermitian matrices $\Sn$ and $\Hn$ + respectively; however $\Sn[1]$ and $\Hn[1]$ do not automatically + simplify because the ``$n$'' does not indicate the arity of a + Cartesian product in this case. We also have a few basic set operations, for example the union of two or three sets: $\union{A}{B}$, $\unionthree{A}{B}{C}$. And of diff --git a/mjo-common.tex b/mjo-common.tex index a8d9aaa..5971547 100644 --- a/mjo-common.tex +++ b/mjo-common.tex @@ -138,11 +138,10 @@ \fi -% The space of real symmetric n-by-n matrices. -\newcommand*{\Sn}[1][n]{ - \mathcal{S}\if\detokenize{#1}\detokenize{1}{}\else^{#1}\fi -} - +% The space of real symmetric n-by-n matrices. Does not reduce to +% merely "S" when n=1 since S^{n} does not mean an n-fold cartesian +% product of S^{1}. +\newcommand*{\Sn}[1][n]{ \mathcal{S}^{#1} } \ifdefined\newglossaryentry \newglossaryentry{Sn}{ name={\ensuremath{\Sn}}, @@ -151,11 +150,10 @@ } \fi -% The space of complex Hermitian n-by-n matrices. -\newcommand*{\Hn}[1][n]{ - \mathcal{H}\if\detokenize{#1}\detokenize{1}{}\else^{#1}\fi -} - +% The space of complex Hermitian n-by-n matrices. Does not reduce to +% merely "H" when n=1 since H^{n} does not mean an n-fold cartesian +% product of H^{1}. +\newcommand*{\Hn}[1][n]{ \mathcal{H}^{#1} } \ifdefined\newglossaryentry \newglossaryentry{Hn}{ name={\ensuremath{\Hn}}, @@ -164,6 +162,7 @@ } \fi + % % Basic set operations % -- 2.43.2