| 1 |
\def\fileversion{1.05} |
| 2 |
\def\filedate{2005/03/19} |
| 3 |
% \iffalse meta-comment |
| 4 |
% |
| 5 |
% This file can be redistributed and/or modified under the terms of |
| 6 |
% the LaTeX Project Public License from CTAN archives, as described at |
| 7 |
% http://www.latex-project.org/lppl.txt. Either LPPL Version 1.3 or, |
| 8 |
% at your option, any later version. |
| 9 |
% |
| 10 |
% \fi |
| 11 |
% |
| 12 |
% \CheckSum{423} |
| 13 |
%% \CharacterTable |
| 14 |
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
| 15 |
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
| 16 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 17 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 18 |
%% Dollar \$ Percent \% Ampersand \& |
| 19 |
%% Acute accent \' Left paren \( Right paren \) |
| 20 |
%% Asterisk \* Plus \+ Comma \, |
| 21 |
%% Minus \- Point \. Solidus \/ |
| 22 |
%% Colon \: Semicolon \; Less than \< |
| 23 |
%% Equals \= Greater than \> Question mark \? |
| 24 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 25 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 26 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 27 |
%% Right brace \} Tilde \~} |
| 28 |
%% |
| 29 |
% |
| 30 |
% \iffalse |
| 31 |
%% |
| 32 |
%% Source File: galois.dtx |
| 33 |
%% Copyright 1994 1998 1999 2006 [email protected] |
| 34 |
%% |
| 35 |
% |
| 36 |
%<*dtx> |
| 37 |
\ProvidesFile{galois.dtx} |
| 38 |
%</dtx> |
| 39 |
%<package>\NeedsTeXFormat{LaTeX2e} |
| 40 |
%<package>\ProvidesPackage{galois} |
| 41 |
% \begin{macrocode} |
| 42 |
%<*driver> |
| 43 |
\documentclass{ltxdoc} |
| 44 |
% \end{macrocode} |
| 45 |
% |
| 46 |
% We don't want everything to appear in the index. |
| 47 |
% \begin{macrocode} |
| 48 |
\DoNotIndex{\,,\:,\ ,\hfill,\hskip,\hspace} |
| 49 |
\DoNotIndex{\@ifundefined,\@tempdima,\@tempdimb,\@tempdimc} |
| 50 |
\DoNotIndex{\DoNotIndex,\NeedsTeXFormat,\ifx,\else,\fi,\ifdim,\fi,\endtrivlist} |
| 51 |
\DoNotIndex{\addtolength,\divide,\circ,\cleaders,\ensuremath} |
| 52 |
\DoNotIndex{\begin,\end,\bgroup,\egroup,\begingroup,\endgroup} |
| 53 |
\DoNotIndex{\catcode,\noexpand,\protect,\string,\space,\put,\equiv} |
| 54 |
\DoNotIndex{\filedate,\filename,\fileversion,\ProcessOptions} |
| 55 |
\DoNotIndex{\hbox,\raisebox,\rlap,\llap,\relax,\rule,\smash} |
| 56 |
\DoNotIndex{\let,\def,\newcommand,\newenvironment,\DeclareOption} |
| 57 |
\DoNotIndex{\m@th,\mathchoice,\mathord,\mathrel,\max,\mkern,\newlength} |
| 58 |
\DoNotIndex{\setlength,\settodepth,\settoheight,\settowidth} |
| 59 |
\DoNotIndex{\tiny,\scriptstyle,\scriptscriptstyle,\undefined} |
| 60 |
\DoNotIndex{\leftarrow,\rightarrow,\longleftarrow,\longrightarrow} |
| 61 |
\makeatother |
| 62 |
% |
| 63 |
\CodelineNumbered |
| 64 |
\CodelineIndex |
| 65 |
\EnableCrossrefs |
| 66 |
\RecordChanges |
| 67 |
% |
| 68 |
\usepackage[color]{galois} |
| 69 |
\begin{document} |
| 70 |
\DocInput{galois.dtx} |
| 71 |
\PrintIndex |
| 72 |
\PrintChanges |
| 73 |
\end{document} |
| 74 |
%</driver> |
| 75 |
% \end{macrocode} |
| 76 |
% \fi |
| 77 |
% \ProvidesFile{galois.dtx} |
| 78 |
[\filedate\space v\fileversion, Galois connections, [email protected]] |
| 79 |
% |
| 80 |
% |
| 81 |
% \changes{v0.00}{1996/11/25}% |
| 82 |
% {Initial version for LaTeX 2.09} |
| 83 |
% \changes{v1.00}{1997/05/19}% |
| 84 |
% {Adapted to LaTeX2e} |
| 85 |
% \changes{v1.01}{1998/10/19}% |
| 86 |
% {Check "\textbackslash comp" is not already defined (as in "mathtime.sty")} |
| 87 |
% \changes{v1.02}{1998/11/13}% |
| 88 |
% {Rewritting of extendable arrows using the TeX book left/right arrowfill |
| 89 |
% p. 357. Added and renamed style parameters ("\textbackslash GaloisSep" now |
| 90 |
% "\textbackslash GaloisArrowTagSep")} |
| 91 |
% \changes{v1.03}{1999/04/02}% |
| 92 |
% {Renamed internal macros to avoid interferences with other packages |
| 93 |
% "\textbackslash rightarrowfill" $\rightarrow$ "\textbackslash @GALOISrightarrowfill" |
| 94 |
% "\textbackslash leftarrowfill" $\rightarrow$ "\textbackslash @GALOISleftarrowfill"} |
| 95 |
% \changes{v1.04}{1999/05/01}% |
| 96 |
% {\LaTeX{} package file documentation} |
| 97 |
% \changes{v1.05}{2005/03/19}% |
| 98 |
% {Added color option} |
| 99 |
% |
| 100 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 101 |
% |
| 102 |
% \title{The \textsf{galois} package\thanks{This file |
| 103 |
% has version number \fileversion, last |
| 104 |
% revised \filedate.}} |
| 105 |
% \author{Patrick Cousot\\ |
| 106 |
% \texttt{[email protected]}} |
| 107 |
% |
| 108 |
% \date{\filedate} |
| 109 |
% |
| 110 |
% \maketitle |
| 111 |
% |
| 112 |
% ^^A x |
| 113 |
% ^^A \mor{x} = |-------> total morphism |
| 114 |
% ^^A |
| 115 |
% \newcommand{\mor}[1]{\mathrel{\raisebox{-0.1ex}^^A fix heigt of 2nd parameter of stackrel |
| 116 |
% {$\stackrel{\hbox{$\scriptscriptstyle #1$}}{\raisebox{0pt}[0.5ex][0pt]^^A fix height of 1st parameter of stackrel |
| 117 |
% {$\longmapsto$}}$}}} |
| 118 |
% |
| 119 |
% \section{Introduction} |
| 120 |
% |
| 121 |
% This |galois| package introduces two-dimensional notations for |
| 122 |
% Galois connections. |
| 123 |
% |
| 124 |
% \section{Detailled explanations on Galois connections} |
| 125 |
% |
| 126 |
% If $(L$, ${\leq})$ and $(M$, ${\sqsubseteq})$ are posets, $\alpha\in |
| 127 |
% L\mapsto M$, $\gamma\in M\mapsto L$ and $\forall x\in L, y\in M$: |
| 128 |
% $\alpha(x)\sqsubseteq y$ $\iff$ $x\leq\gamma(y)$ then the pair |
| 129 |
% $\langle \alpha$, $\gamma\rangle$ is a {\em Galois connection}, |
| 130 |
% written |\galois{\alpha}{\gamma}|: |
| 131 |
% \DescribeMacro{\galois} |
| 132 |
% \begin{displaymath} |
| 133 |
% (L,\,{\leq})\galois{\alpha}{\gamma}(M,\,{\sqsubseteq}) |
| 134 |
% \end{displaymath} |
| 135 |
% In a Galois connection, $\alpha$ is onto if and only if $\gamma$ is |
| 136 |
% one-to-one if and only if $\alpha \comp \gamma$ = 1 (where ${\comp}$ |
| 137 |
% is the functional composition and 1 the identity), written |
| 138 |
% |\galoiS{\alpha}{\gamma}|: |
| 139 |
% \DescribeMacro{\galoiS} |
| 140 |
% \begin{displaymath} |
| 141 |
% (L,\,{\leq})\galoiS{\alpha}{\gamma}(M,\,{\sqsubseteq}) |
| 142 |
% \end{displaymath} |
| 143 |
% $\alpha$ is one-to-one if and only if $\gamma$ is onto |
| 144 |
% if and only if $\gamma\comp\alpha$ = 1, written |
| 145 |
% |\Galois{\alpha}{\gamma}|: |
| 146 |
% \DescribeMacro{\Galois} |
| 147 |
% \begin{displaymath} |
| 148 |
% (L,\,{\leq})\Galois{\alpha}{\gamma}(M,\,{\sqsubseteq}) |
| 149 |
% \end{displaymath} |
| 150 |
% For a bijection, we write |
| 151 |
% |\GaloiS{\alpha}{\gamma}|: |
| 152 |
% \DescribeMacro{\GaloiS} |
| 153 |
% \begin{displaymath} |
| 154 |
% (L,\,{\leq})\GaloiS{\alpha}{\gamma}(M,\,{\sqsubseteq}) |
| 155 |
% \end{displaymath} |
| 156 |
% The surjection on the quotient of $M$ by the equivalence relation |
| 157 |
% $x\equiv y$ defined by $\gamma(x)=\gamma(y)$ is denoted |
| 158 |
% |\galoiSr{\alpha}{\gamma}|: |
| 159 |
% \DescribeMacro{\galoiSr} |
| 160 |
% \begin{displaymath} |
| 161 |
% (L,\,{\leq})\galoiSr{\alpha}{\gamma}(M,\,{\sqsubseteq}) |
| 162 |
% \end{displaymath} |
| 163 |
% The composition of Galois connections: |
| 164 |
% \begin{displaymath} |
| 165 |
% (L,\,{\leq})\galois{\alpha_1}{\gamma_1}(M,\,{\sqsubseteq}) |
| 166 |
% \quad{\rm and}\quad |
| 167 |
% (M,\,{\sqsubseteq})\galois{\alpha_2}{\gamma_2}(N,\,{\preceq}) |
| 168 |
% \end{displaymath} |
| 169 |
% is a Galois connection (the composition $\comp$ of functions is |
| 170 |
% |\comp|): |
| 171 |
% \DescribeMacro{\comp} |
| 172 |
% \begin{displaymath} |
| 173 |
% (L,\,{\leq})\galois{\alpha_2\comp\alpha_1}{\gamma_1\comp\gamma_2}(N,\,{\preceq}) |
| 174 |
% \end{displaymath} |
| 175 |
% Galois connections |
| 176 |
% $(L,\,{\leq})\galois{\alpha}{\gamma}(M,\,\sqsubseteq)$ can be lifted |
| 177 |
% from sets of properties to sets of monotone functions: |
| 178 |
% \begin{displaymath} |
| 179 |
% (L\mor{m}L,\,{\leq})\galois{\lambda{\varphi}\cdot{\alpha\comp\varphi\comp\gamma}}{\lambda{\phi}\cdot{\gamma\comp\phi\comp\alpha}}(M\mor{m}M,\,{\sqsubseteq}) |
| 180 |
% \end{displaymath} |
| 181 |
% where the ordering on functions is pointwise that is |
| 182 |
% $\varphi\preceq\phi$ if and only if $\forall |
| 183 |
% x:\varphi(x)\preceq\phi(x)$. Observe that the length of the arrows |
| 184 |
% stretches automatically to the appropriate width. |
| 185 |
% |
| 186 |
% \section{Package options} |
| 187 |
% |
| 188 |
% \begin{macro}{color} |
| 189 |
% The \texttt{color} option is required for colored Galois |
| 190 |
% connections is in |
| 191 |
% \begin{center} |
| 192 |
% \begin{tabular}{cc} |
| 193 |
% |\galois[red]{\alpha}{\gamma}| & |
| 194 |
% $\galois[red]{\alpha}{\gamma}$,\\[1ex] |
| 195 |
% |\Galois{\alpha}[blue]{\gamma}| & |
| 196 |
% $\Galois{\alpha}[blue]{\gamma}$,\\[1ex] |
| 197 |
% |\GaloiS[red]{\alpha}[blue]{\gamma}| & |
| 198 |
% $\GaloiS[red]{\alpha}[blue]{\gamma}$,\\[1ex] |
| 199 |
% |\galoiSr[red]{\alpha}[blue]{\gamma}| & |
| 200 |
% $\galoiSr[red]{\alpha}[blue]{\gamma}$, or\\[1ex] |
| 201 |
% |\comp[red]| & $\comp[red]$\ . |
| 202 |
% \end{tabular} |
| 203 |
% \end{center} |
| 204 |
% Without '|color|' option, these colors are ignored. |
| 205 |
% \begin{macro}{\@GALOIScolor} |
| 206 |
% |\@GALOIScolor| is |\color| with the |color| option and later |
| 207 |
% defined as |\relax| in absence of |color| option. |
| 208 |
% \begin{macrocode} |
| 209 |
\DeclareOption{color}{% |
| 210 |
\def\@GALOIScolor{\color}} |
| 211 |
% \end{macrocode} |
| 212 |
% |
| 213 |
% \begin{macrocode} |
| 214 |
\ProcessOptions |
| 215 |
% \end{macrocode} |
| 216 |
% \end{macro} |
| 217 |
% \end{macro} |
| 218 |
% |
| 219 |
% \section{Style parameters} |
| 220 |
% |
| 221 |
% You can use Galois connections in any size (footnotes, transparencies, |
| 222 |
% etc.) : |
| 223 |
% {\tiny tiny $L\galois{\alpha}{\gamma}M$}, |
| 224 |
% {\scriptsize scriptsize $L\galois{\alpha}{\gamma}M$}, |
| 225 |
% {\footnotesize footnotesize $L\galois{\alpha}{\gamma}M$}, |
| 226 |
% {\small small $L\galois{\alpha}{\gamma}M$}, |
| 227 |
% {\normalsize normalsize $L\galois{\alpha}{\gamma}M$}, |
| 228 |
% {\large large $L\galois{\alpha}{\gamma}M$}, |
| 229 |
% {\Large Large $L\galois{\alpha}{\gamma}M$}, |
| 230 |
% {\LARGE LARGE $L\galois{\alpha}{\gamma}M$}, |
| 231 |
% {\huge huge $L\galois{\alpha}{\gamma}M$}, |
| 232 |
% {\Huge Huge $L\galois{\alpha}{\gamma}M$}. |
| 233 |
% Observe that in $\GaloiS{\rule{3cm}{1cm}}{\rule{0.5cm}{1cm}}$ the |
| 234 |
% width of arrows and height of enclosing box are automatically adjusted |
| 235 |
% according to the size of $\alpha$ and $\gamma$. You can adjust the |
| 236 |
% following parameters: |
| 237 |
% \DescribeMacro{\GaloisStyle} |
| 238 |
% \begin{description} |
| 239 |
% \item[]|\GaloisStyle| : style of upper and lower tags |
| 240 |
% (|\scripstyle | by default); |
| 241 |
% \end{description} |
| 242 |
% \DescribeMacro{\GaloisArrowThickness} |
| 243 |
% \begin{description} |
| 244 |
% \item[]|\GaloisArrowThickness| : thickness of the arrow stems |
| 245 |
% \footnote{stem is ``tige'' in french.}; |
| 246 |
% (|0.1ex| by default); |
| 247 |
% \end{description} |
| 248 |
% \DescribeMacro{\GaloisArrowsSep} |
| 249 |
% \begin{description} |
| 250 |
% \item[]|\GaloisArrowsSep| : distance between the arrows |
| 251 |
% (|0.2ex| by default); |
| 252 |
% \end{description} |
| 253 |
% \DescribeMacro{\GaloisArrowTagSep} |
| 254 |
% \begin{description} |
| 255 |
% \item[]|\GaloisArrowTagSep| : distance between arrows and tags |
| 256 |
% (|0.5ex| by default). |
| 257 |
% \end{description} |
| 258 |
% For example with: |
| 259 |
% \begin{quote} |
| 260 |
% |\renewcommand{\GaloisArrowsSep}{1cm}|\\ |
| 261 |
% |\renewcommand{\GaloisArrowTagSep}{0pt}| |
| 262 |
% \end{quote} |
| 263 |
% we get |
| 264 |
% \renewcommand{\GaloisArrowsSep}{1cm}\renewcommand{\GaloisArrowTagSep}{0pt} |
| 265 |
% $\GaloiS{\rule{3cm}{1cm}}{\rule{0.5cm}{1cm}}$ while with: |
| 266 |
% \begin{quote} |
| 267 |
% |\renewcommand{\GaloisArrowsSep}{0pt}|\\ |
| 268 |
% |\renewcommand{\GaloisArrowTagSep}{5mm}| |
| 269 |
% \end{quote} |
| 270 |
% we get \renewcommand{\GaloisArrowsSep}{0pt}\renewcommand{\GaloisArrowTagSep}{5mm} |
| 271 |
% $\GaloiS{\rule{3cm}{1cm}}{\rule{0.5cm}{1cm}}$ and with |
| 272 |
% \begin{quote} |
| 273 |
% |\renewcommand{\GaloisArrowsSep}{0pt}|\\ |
| 274 |
% |\renewcommand{\GaloisArrowTagSep}{0pt}| |
| 275 |
% \end{quote} |
| 276 |
% we get |
| 277 |
% \renewcommand{\GaloisArrowsSep}{0pt}\renewcommand{\GaloisArrowTagSep}{0pt} |
| 278 |
% $\GaloiS{\rule{3cm}{1cm}}{\rule{0.5cm}{1cm}}$. |
| 279 |
% |
| 280 |
% \StopEventually{} |
| 281 |
% |
| 282 |
% \section{Implementation} |
| 283 |
% \begin{macrocode} |
| 284 |
%<*package> |
| 285 |
% \end{macrocode} |
| 286 |
% |
| 287 |
% Require |color| package for '|color|' option else coloring is ignored. |
| 288 |
% \begin{macrocode} |
| 289 |
\ifx\@GALOIScolor\undefined |
| 290 |
\def\@GALOIScolor#1{\relax}% |
| 291 |
\else |
| 292 |
\RequirePackage{color}% |
| 293 |
\fi |
| 294 |
% \end{macrocode} |
| 295 |
% |
| 296 |
% ^^A Reset style parameters to default |
| 297 |
% \renewcommand{\GaloisStyle}{\scriptstyle}% |
| 298 |
% \renewcommand{\GaloisArrowThickness}{0.1ex}% |
| 299 |
% \renewcommand{\GaloisArrowsSep}{0.2ex}% |
| 300 |
% \renewcommand{\GaloisArrowTagSep}{0.5ex}% |
| 301 |
% \begin{macro}{\comp} |
| 302 |
% \begin{macro}{\@GALOIScomp} |
| 303 |
% Define functional composition $f\comp g(x)$ is $f(g(x))$ (if not |
| 304 |
% already defined e.g.\ as in |mathtime.sty|). |\comp[color]| will |
| 305 |
% draw in color (black by default). |
| 306 |
% \begin{macrocode} |
| 307 |
\@ifundefined{comp}{% |
| 308 |
% Scan the optional color argument |
| 309 |
\newcommand{\comp}{\@ifnextchar[{\@GALOIScomp}{\@GALOIScomp[black]}}% |
| 310 |
% Defined the colored functional composition \@GALOIScomp[color] |
| 311 |
\def\@GALOIScomp[#1]{\mathchoice |
| 312 |
{\mathrel{\raisebox{0.2ex}{$\@GALOIScolor{#1}\scriptstyle\circ$}}}% |
| 313 |
{\mathrel{\raisebox{0.2ex}{$\@GALOIScolor{#1}\scriptstyle\circ$}}}% |
| 314 |
{\mathrel{\raisebox{0.1ex}{$\@GALOIScolor{#1}\scriptscriptstyle\circ$}}}% |
| 315 |
{\mathrel{\raisebox{0.1ex}{$\@GALOIScolor{#1}\scriptscriptstyle\circ$}}}}% |
| 316 |
}{}% |
| 317 |
% \end{macrocode} |
| 318 |
% \end{macro} |
| 319 |
% \end{macro} |
| 320 |
% |
| 321 |
% Style commands: |
| 322 |
% \begin{macro}{\GaloisStyle} |
| 323 |
% Style of $a$ and $b$ in $\galois{a}{b}$, $\Galois{a}{b}$, $\galoiS{a}{b}$ or |
| 324 |
% $\GaloiS{a}{b}$: |
| 325 |
% \begin{macrocode} |
| 326 |
\newcommand{\GaloisStyle}{\scriptstyle}% |
| 327 |
% \end{macrocode} |
| 328 |
% \end{macro} |
| 329 |
% |
| 330 |
% \begin{macro}{\GaloisArrowThickness} |
| 331 |
% Thickness of the arrow stems (0.1ex by default): |
| 332 |
% \begin{macrocode} |
| 333 |
\newcommand{\GaloisArrowThickness}{0.1ex}% |
| 334 |
% \end{macrocode} |
| 335 |
% \end{macro} |
| 336 |
% |
| 337 |
% \begin{macro}{\GaloisArrowsSep} |
| 338 |
% Distance between the lower and upper arrows (0.2ex by default): |
| 339 |
% \begin{macrocode} |
| 340 |
\newcommand{\GaloisArrowsSep}{0.2ex}% |
| 341 |
% \end{macrocode} |
| 342 |
% \end{macro} |
| 343 |
% |
| 344 |
% \begin{macro}{\GaloisArrowTagSep} |
| 345 |
% Distance between the lower arrow and the top of $a$ and the |
| 346 |
% top-arrow and the bottom of $b$ (0.5ex by default) |
| 347 |
% \begin{macrocode} |
| 348 |
\newcommand{\GaloisArrowTagSep}{0.5ex}% |
| 349 |
% \end{macrocode} |
| 350 |
% \end{macro} |
| 351 |
% |
| 352 |
% \begin{macro}{\@GALOISalphadepth} |
| 353 |
% \begin{macro}{\@GALOISalphaheight} |
| 354 |
% \begin{macro}{\@GALOISgammadepth} |
| 355 |
% \begin{macro}{\@GALOISwidth} |
| 356 |
% \begin{macro}{\@GALOISheight} |
| 357 |
% \begin{macro}{\@GALOISdepth} |
| 358 |
% \begin{macro}{\@GALOIStotalheight} |
| 359 |
% \begin{macro}{\@GALOISGap} |
| 360 |
% \begin{macro}{\@GALOISalphaarrowwidth} |
| 361 |
% \begin{macro}{\@GALOISalphaarrowhalfheight} |
| 362 |
% \begin{macro}{\@GALOISgammaarrowwidth} |
| 363 |
% \begin{macro}{\@GALOISgammaarrowhalfheight} |
| 364 |
% Auxiliary lengths: |
| 365 |
% \begin{macrocode}{} |
| 366 |
\newlength{\@GALOISalphadepth}% |
| 367 |
\newlength{\@GALOISalphaheight}% |
| 368 |
\newlength{\@GALOISgammadepth}% |
| 369 |
\newlength{\@GALOISwidth}% |
| 370 |
\newlength{\@GALOISheight}% |
| 371 |
\newlength{\@GALOISdepth}% |
| 372 |
\newlength{\@GALOIStotalheight}% |
| 373 |
\newlength{\@GALOISGap}% |
| 374 |
\newlength{\@GALOISalphaarrowwidth}% |
| 375 |
\newlength{\@GALOISalphaarrowhalfheight}% |
| 376 |
\newlength{\@GALOISgammaarrowwidth}% |
| 377 |
\newlength{\@GALOISgammaarrowhalfheight}% |
| 378 |
% \end{macrocode} |
| 379 |
% \end{macro} |
| 380 |
% \end{macro} |
| 381 |
% \end{macro} |
| 382 |
% \end{macro} |
| 383 |
% \end{macro} |
| 384 |
% \end{macro} |
| 385 |
% \end{macro} |
| 386 |
% \end{macro} |
| 387 |
% \end{macro} |
| 388 |
% \end{macro} |
| 389 |
% \end{macro} |
| 390 |
% \end{macro} |
| 391 |
% |
| 392 |
% \begin{macro}{\Galois@put} |
| 393 |
% |\Galois@put(x,y-d){text}| puts text at coordinates $(x,y-d)$, in |
| 394 |
% a box of size 0\texttt{pt} $\times$ 0\texttt{pt}: |
| 395 |
% \begin{macrocode} |
| 396 |
\def\Galois@put(#1,#2-#3)#4{\rlap{\smash{\hskip#1\setlength{\@tempdimc}{#2}% |
| 397 |
\addtolength{\@tempdimc}{-#3}\raisebox{\@tempdimc}{#4}}}}% |
| 398 |
% \end{macrocode} |
| 399 |
% \end{macro} |
| 400 |
% |
| 401 |
% \begin{macro}{\@GALOISrightarrowfill} |
| 402 |
% |\@GALOISrightarrowfill{\rightarrow}|, see \TeX book p.\ 357. |
| 403 |
% \begin{macrocode} |
| 404 |
\def\@GALOISrightarrowfill#1{$\m@th \smash- \mkern-7mu% |
| 405 |
\cleaders\hbox{$\mkern-2mu \smash- \mkern-2mu$}\hfill% |
| 406 |
\mkern-7mu \mathord{#1}$}% |
| 407 |
% \end{macrocode} |
| 408 |
% \end{macro} |
| 409 |
% |
| 410 |
% \begin{macro}{\@GALOISleftarrowfill} |
| 411 |
% |\@GALOISleftarrowfill{\leftarrow}|, see \TeX book p.\ 357. |
| 412 |
% \begin{macrocode} |
| 413 |
\def\@GALOISleftarrowfill#1{$\m@th \mathord{#1} \mkern-7mu% |
| 414 |
\cleaders\hbox{$\mkern-2mu \smash- \mkern-2mu$}\hfill% |
| 415 |
\mkern-7mu \smash-$}% |
| 416 |
% \end{macrocode} |
| 417 |
% \end{macro} |
| 418 |
% |
| 419 |
% Stacking $a$, the arrows and $g$ in $\galois{a}{g}$: |
| 420 |
% \begin{macro}{\@GALOIS} |
| 421 |
% \begin{macro}{\@GALOISca} |
| 422 |
% \begin{macro}{\@GALOISca} |
| 423 |
% |\@GALOIS{-->}{<--}{a}{g}| constructs $\galois{a}{g}$. |
| 424 |
% |\@GALOIS{-->}{<--}[colora]{a}{g}|, |
| 425 |
% |\@GALOIS{-->}{<--}{a}[colorg]{g}| and |
| 426 |
% |\@GALOIS{-->}{<--}[colora]{a}[colorg]{g}| |
| 427 |
% add colors |colora| for the $a$-arrow and |colorg| for |
| 428 |
% the$ g$ arrow. |
| 429 |
% \begin{macrocode} |
| 430 |
% First, scan the alpha color optional argument (black |
| 431 |
% otherwise) |
| 432 |
\def\@GALOIS#1#2{\@ifnextchar[{\@GALOISca{#1}{#2}}{\@GALOISca{#1}{#2}[black]}}% |
| 433 |
% Second scan the gamma color optional argument (black |
| 434 |
% otherwise) |
| 435 |
\def\@GALOISca#1#2[#3]#4{\@ifnextchar[{\@GALOIScacg{#1}{#2}[#3]{#4}}% |
| 436 |
{\@GALOIScacg{#1}{#2}[#3]{#4}[black]}}% |
| 437 |
% Finally \@GALOIScacg{-->}{<--}[colora]{a}[colorg]{g} stacks $a$, |
| 438 |
% the arrows and $g$ in $\galois{a}{g}$, using colors with the |
| 439 |
% 'color' option. |
| 440 |
\def\@GALOIScacg#1#2[#3]#4[#5]#6{% |
| 441 |
\ensuremath{\mathrel{% |
| 442 |
\def\@GALOISalphatag{\ $\@GALOIScolor{#3}\GaloisStyle#4$\ }% |
| 443 |
\def\@GALOISgammatag{\ $\@GALOIScolor{#5}\GaloisStyle#6$\ }% |
| 444 |
% compute width of alpha/lower and gamma/upper arrows |
| 445 |
\settowidth{\@GALOISalphaarrowwidth}{$\mathord{#1}$}% |
| 446 |
\settowidth{\@GALOISgammaarrowwidth}{$\mathord{#2}$}% |
| 447 |
% compute width of the picture \@GALOISwidth |
| 448 |
\ifdim\@GALOISalphaarrowwidth>\@GALOISgammaarrowwidth% |
| 449 |
\settowidth{\@tempdima}{\hbox{\hspace*{\@GALOISalphaarrowwidth}\@GALOISalphatag}}% |
| 450 |
\settowidth{\@tempdimb}{\hbox{\hspace*{\@GALOISalphaarrowwidth}\@GALOISgammatag}}% |
| 451 |
\else% |
| 452 |
\settowidth{\@tempdima}{\hbox{\hspace*{\@GALOISgammaarrowwidth}\@GALOISalphatag}}% |
| 453 |
\settowidth{\@tempdimb}{\hbox{\hspace*{\@GALOISgammaarrowwidth}\@GALOISgammatag}}% |
| 454 |
\fi% |
| 455 |
\ifdim\@tempdima>\@tempdimb% |
| 456 |
\setlength{\@GALOISwidth}{\@tempdima}% |
| 457 |
\else% |
| 458 |
\setlength{\@GALOISwidth}{\@tempdimb}% |
| 459 |
\fi% |
| 460 |
\def\@GALOISrightarrow{\hbox to\@GALOISwidth |
| 461 |
{\@GALOIScolor{#3}\@GALOISrightarrowfill{#1}}}% |
| 462 |
\def\@GALOISleftarrow{\hbox to\@GALOISwidth |
| 463 |
{\@GALOIScolor{#5}\@GALOISleftarrowfill{#2}}}% |
| 464 |
% compute half height of alpha/lower arrow |
| 465 |
\settodepth{\@GALOISalphaarrowhalfheight}{$\mathord{#1}$}% |
| 466 |
\settoheight{\@tempdima}{$\mathord{#1}$}% |
| 467 |
\addtolength{\@GALOISalphaarrowhalfheight}{\@tempdima}% |
| 468 |
\divide \@GALOISalphaarrowhalfheight by 2% |
| 469 |
% compute half height of gamma/upper arrow |
| 470 |
\settodepth{\@GALOISgammaarrowhalfheight}{$\mathord{#2}$}% |
| 471 |
\settoheight{\@tempdima}{$\mathord{#2}$}% |
| 472 |
\addtolength{\@GALOISgammaarrowhalfheight}{\@tempdima}% |
| 473 |
\divide \@GALOISgammaarrowhalfheight by 2% |
| 474 |
% compute the distance between the two arrows \@GALOISGap = |
| 475 |
% \max(\@GALOISalphaarrowhalfheight, |
| 476 |
% \@GALOISgammaarrowhalfheight)+\GaloisArrowsSep |
| 477 |
\ifdim\@GALOISalphaarrowhalfheight>\@GALOISgammaarrowhalfheight% |
| 478 |
\setlength{\@GALOISGap}{\@GALOISalphaarrowhalfheight}% |
| 479 |
\else% |
| 480 |
\addtolength{\@GALOISGap}{\@GALOISgammaarrowhalfheight}% |
| 481 |
\fi% |
| 482 |
\addtolength{\@GALOISGap}{\GaloisArrowsSep}% |
| 483 |
% lift from the stems thickness |
| 484 |
\addtolength{\@GALOISGap}{\GaloisArrowThickness }% |
| 485 |
\addtolength{\@GALOISGap}{\GaloisArrowThickness }% |
| 486 |
% compute height \@GALOISheight depth \@GALOISdepth |
| 487 |
% and total height \@GALOIStotalheight of the picture |
| 488 |
\settodepth{\@GALOISalphadepth}{\@GALOISalphatag}% |
| 489 |
\settoheight{\@GALOISalphaheight}{\@GALOISalphatag}% |
| 490 |
\settodepth{\@GALOISgammadepth}{\@GALOISgammatag}% |
| 491 |
% compute depth \@GALOISdepth of the picture |
| 492 |
% \@GALOISdepth = \@GALOISalphadepth |
| 493 |
% + \@GALOISalphaheight % vertical size of alpha tag |
| 494 |
% + \GaloisArrowTagSep % between top of tag and arrow |
| 495 |
\setlength{\@GALOISdepth}{\@GALOISalphadepth}% |
| 496 |
\addtolength{\@GALOISdepth}{\@GALOISalphaheight}% |
| 497 |
\addtolength{\@GALOISdepth}{\GaloisArrowTagSep}% |
| 498 |
% lift from the stem thickness |
| 499 |
\addtolength{\@GALOISdepth}{-\GaloisArrowThickness }% |
| 500 |
% compute height \@GALOISheight of the picture |
| 501 |
\setlength{\@GALOISheight}{\@GALOISGap}% |
| 502 |
\addtolength{\@GALOISheight}{\GaloisArrowTagSep}% |
| 503 |
\addtolength{\@GALOISheight}{\@GALOISgammadepth}% |
| 504 |
\settoheight{\@tempdima}{\@GALOISgammatag}% |
| 505 |
\addtolength{\@GALOISheight}{\@tempdima}% |
| 506 |
% compute total height \@GALOIStotalheight of the picture |
| 507 |
% \@GALOIStotalheight = \@GALOISdepth + \@GALOISheight |
| 508 |
\setlength{\@GALOIStotalheight}{\@GALOISdepth}% |
| 509 |
\addtolength{\@GALOIStotalheight}{\@GALOISheight}% |
| 510 |
% put alpha arrow |
| 511 |
\Galois@put(0pt,0pt-\@GALOISalphaarrowhalfheight){\@GALOISrightarrow}% |
| 512 |
% put gamma arrow |
| 513 |
\Galois@put(0pt,\@GALOISGap-\@GALOISalphaarrowhalfheight){\@GALOISleftarrow}% |
| 514 |
% put alpha |
| 515 |
\setlength{\@tempdima}{\@GALOISwidth}% |
| 516 |
\settowidth{\@tempdimb}{\@GALOISalphatag}% |
| 517 |
\addtolength{\@tempdima}{-\@tempdimb}% |
| 518 |
\divide\@tempdima by 2% |
| 519 |
\Galois@put(\@tempdima,\@GALOISalphadepth-\@GALOISdepth){\@GALOISalphatag}% |
| 520 |
% put gamma |
| 521 |
\setlength{\@tempdima}{\@GALOISwidth}% |
| 522 |
\settowidth{\@tempdimb}{\@GALOISgammatag}% |
| 523 |
\addtolength{\@tempdima}{-\@tempdimb}% |
| 524 |
\divide\@tempdima by 2% |
| 525 |
\setlength{\@tempdimb}{\@GALOISalphadepth}% |
| 526 |
\addtolength{\@tempdimb}{\@GALOISalphaheight}% |
| 527 |
\addtolength{\@tempdimb}{\GaloisArrowTagSep}% |
| 528 |
\addtolength{\@tempdimb}{\GaloisArrowTagSep}% |
| 529 |
\addtolength{\@tempdimb}{\@GALOISGap}% |
| 530 |
\addtolength{\@tempdimb}{\@GALOISgammadepth}% |
| 531 |
\Galois@put(\@tempdima,\@tempdimb-\@GALOISdepth){\@GALOISgammatag}% |
| 532 |
\rule[-\@GALOISdepth]{0pt}{\@GALOIStotalheight}% set depth and height |
| 533 |
\hspace*{\@GALOISwidth}% set width |
| 534 |
}}}% |
| 535 |
% \end{macrocode} |
| 536 |
% \end{macro} |
| 537 |
% \end{macro} |
| 538 |
% \end{macro} |
| 539 |
% |
| 540 |
% \begin{macro}{\galois} |
| 541 |
% |\galois{a}{g}| is $\galois{a}{g}$. |
| 542 |
% \begin{macrocode} |
| 543 |
\newcommand{\galois}{\@GALOIS{\rightarrow}{\leftarrow}}% |
| 544 |
% \end{macrocode} |
| 545 |
% \end{macro} |
| 546 |
% |
| 547 |
% \begin{macro}{\galoiS} |
| 548 |
% |\galoiS{a}{g}| is $\galoiS{a}{g}$ ($a$ onto, $g$ one-to-one, $a |
| 549 |
% \comp g = 1$): |
| 550 |
% \begin{macrocode} |
| 551 |
\def\@GALOISmytwoheadrightarrow{\rlap{$\:\,{\rightarrow}$}{\longrightarrow}}% |
| 552 |
\def\@GALOIStwoheadrightarrow{\protect\@GALOISmytwoheadrightarrow}% |
| 553 |
\newcommand{\galoiS}{\@GALOIS{\@GALOIStwoheadrightarrow}{\leftarrow}}% |
| 554 |
% \end{macrocode} |
| 555 |
% \end{macro} |
| 556 |
% |
| 557 |
% \begin{macro}{\galoiSr} |
| 558 |
% |\galoiSr{a}{g}| is $\galoiSr{a}{g}$. |
| 559 |
% \begin{macrocode} |
| 560 |
\def\@GALOISmytwoheadrightarrowreduc{\rlap{\smash{\hskip1ex\raisebox{0.815ex}% |
| 561 |
{\tiny$\equiv$}}}\rlap{$\:\,{\rightarrow}$}{\longrightarrow}}% |
| 562 |
\def\@GALOIStwoheadrightarrowreduc{\protect\@GALOISmytwoheadrightarrowreduc}% |
| 563 |
\newcommand{\galoiSr}{\@GALOIS{\@GALOIStwoheadrightarrowreduc}{\leftarrow}}% |
| 564 |
% \end{macrocode} |
| 565 |
% \end{macro} |
| 566 |
% |
| 567 |
% \begin{macro}{\Galois} |
| 568 |
% |\Galois{a}{g}| is $\Galois{a}{g}$ ($a$ one-to-one, $g$ onto, $g |
| 569 |
% \comp a = 1$): |
| 570 |
% \begin{macrocode} |
| 571 |
\def\@GALOISmytwoheadleftarrow{\rlap{$\:{\leftarrow}$}{\longleftarrow}}% |
| 572 |
\def\@GALOIStwoheadleftarrow{\protect\@GALOISmytwoheadleftarrow}% |
| 573 |
\newcommand{\Galois}{\@GALOIS{\rightarrow}{\@GALOIStwoheadleftarrow}}% |
| 574 |
% \end{macrocode} |
| 575 |
% \end{macro} |
| 576 |
% |
| 577 |
% \begin{macro}{\GaloiS} |
| 578 |
% |\GaloiS{a}{g}| is $\GaloiS{a}{g}$ ($a$ bijective with inverse $g$). |
| 579 |
% \begin{macrocode} |
| 580 |
\newcommand{\GaloiS}{\@GALOIS% |
| 581 |
{\@GALOIStwoheadrightarrow}{\@GALOISmytwoheadleftarrow}}% |
| 582 |
% \end{macrocode} |
| 583 |
% \end{macro} |
| 584 |
% |
| 585 |
% \begin{macrocode} |
| 586 |
%</package> |
| 587 |
% \end{macrocode} |
| 588 |
% |
| 589 |
% \Finale |
| 590 |
% |
| 591 |
\endinput |