% \iffalse % % functan.dtx % Copyright 2004 Antoine Lejay % % This program is provided under the terms of the % LaTeX Project Public License distributed from CTAN % archives in directory macros/latex/base/lppl.txt. % % Author: Antoine Lejay % \fi % \CheckSum{360} %% \CharacterTable %% {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 %% 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 %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% % \iffalse %<*dtx> \ProvidesFile{functan.dtx} % %\ProvidesPackage{functan} %\ProvidesFile{functan.drv} % \fi % \ProvidesFile{functan.dtx}% [2004/07/03 v1.0 Macros for functional analysis] % \iffalse %<*driver> \documentclass[11pt]{ltxdoc} \usepackage{functan} \EnableCrossrefs \CodelineIndex \RecordChanges %%\OnlyDescription \begin{document} \DocInput{functan.dtx} \end{document} % % \fi % \def\docdate{July, 13 2004} % \DoNotIndex{\newcommand,\fi,\def,\else,\edef,\ifx,\let} % \DoNotIndex{\global,\NeedsTeXFormat,\;,\ProcessOptions,\ProvidesPackage} % \DoNotIndex{\PassOptionsToPackage} % \GetFileInfo{functan.dtx} % \MakeShortVerb{\"} % \DeleteShortVerb{\|} % \Macro{L2}{\mathrm{L}^2} % \Macro{H10}{\mathrm{H}^1_0} % \Macro{L2Om}{\m{L2}(\Omega)} % \Macro{H10Om}{\m{H10}(\Omega)} % \newnorm{aver}{\delonearg[#1]{#2}{\langle}{\rangle}} % \newconv{*L2Om}{\conv*{\star\text{-}\m{L2Om}}{#1}} % \newcommand{\itm}{\medskip\noindent The command \ignorespaces} % \newcommand{\itms}{\medskip\noindent The commands \ignorespaces} % \newenvironment{examplenotab}{\medskip\hrule\noindent\strut\ignorespaces}{\par\smallskip\hrule} % \newenvironment{example}{\medskip\hrule\noindent\begin{tabular}{@{\strut}l l}}{\end{tabular}\hrule} % \newcommand{\event}[2][auto]{\delonearg[#1]{#2}{\{}{\}}} % \let\package\textsf % \newcommand{\Nota}{\medskip\noindent\textit{Nota: }\ignorespaces} % % % \title{\package{functan}\thanks{Package version \fileversion{} of % \filedate{}.}\\ Macros for functional analysis and related domains} % \author{Antoine Lejay\\ % $<$\texttt{Antoine.Lejay@iecn.u-nancy.fr}$>$} % \date{\docdate\\ Printed on \today} % \maketitle % \section{Introduction} % % This package is designed especially for the people % working in domains of mathematics such % as functional analysis and PDE theory. Of course, % this package may be used in other domains. % % In functional analysis and PDE theory, one may face % a lot of names of spaces, sometimes depending % on one or more parameters, such as $\m{L2Om}$, $\m{H10Om}$, ... % Besides, one has to deal % with norms, convergence and scalar product % for each of these spaces. % As a control sequence, i.e., a \TeX{} command, consists only % of letters, using \TeX's standard macros is not convenient % for dealing with such spaces. Yet % composing each of these space names at each their % occurrence increases the risk of errors, % and tends to be tedious. % % Fortunately, \TeX{} provides some way to % create commands whose name may contain % arbitrary characters. We exploit this % possibility to deal with names of % functional spaces and related objects % (norms, convergence, ...). % % This package allows for example to typeset: % \begin{quote} % We denote by $\m{L2Om}$ the space of measurable % functions on $\Omega$ which are square integrable. % The associated norm $\norm{L2Om}{\cdot}$ is defined % by $\norm{L2Om}{f}=\left(\int_\Omega f(x)^2 dx\right)^{1/2}$ % and the corresponding scalar product is % $\scalprod{L2Om}{f}{g}=\int_\Omega f(x)g(x)dx$. % We write $f_n\conv{L2Om}{n\to\infty}f$ % if the sequence $(f_n)_n$ converges to $f$ in $\m{L2Om}$. % If for all $g\in\m{L2Om}$, $\scalprod{L2Om}{f_n}{g}$ % converges to $\scalprod{L2Om}{f}{g}$, then % we say that $(f_n)_n$ converges weakly to $f$ % in $\m{L2Om}$, and we write $f_n\wkconv{L2Om}{n\to\infty}f$. % \end{quote} % The code for this example is the following: % \begin{verbatim} % \Macro{L2Om}{\mathrm{L}^2(\Omega)} % % We denote by $\m{L2Om}$ the space of measurable % functions on $\Omega$ which are square integrable. % The associated norm $\norm{L2Om}{\cdot}$ is defined % by $\norm{L2Om}{f}=\left(\int_\Omega f(x)^2 dx\right)^{1/2}$ % and the corresponding scalar product is % $\scalprod{L2Om}{f}{g}=\int_\Omega f(x)g(x)dx$. % We write $f_n\conv{L2Om}{n\to\infty}f$ % if the sequence $(f_n)_n$ converges to $f$ in $\m{L2Om}$. % If for all $g\in\m{L2Om}$, $\scalprod{L2Om}{f_n}{g}$ % converges to $\scalprod{L2Om}{f}{g}$, then % we say that $(f_n)_n$ converges weakly to $f$ % in $\m{L2Om}$, and we write $f_n\wkconv{L2Om}{n\to\infty}f$. % \end{verbatim} % % \begin{center} % \fbox{\begin{minipage}{0.75\textwidth} This package % uses of some commands of the package % \package{amsmath} (some of these commands are available % only for version \textbf{2.0} or higher), which is then automatically % loaded. All the options of \package{amsmath} % may be defined as options of \package{functan}. % % Before using \package{functan}, % be sure you have a recent version of \package{amsmath} % installed in your computer. % \end{minipage}} % \end{center} % % \section{Loading the package} % % This package is loaded as any package by the command % "\usepackage". This package has no options, except % those of \package{amsmath} in order to avoir % an option clash. Thus, the possible options % are: % "leqno", % "intlimits", % "nointlimits", % "sumlimits", % "nosumlimits", % "namelimits", % "nonamelinits", % "reqno", % "centertags", % "tbtags", % "cmex10" and % "fleqn". % % \medskip % % \noindent\textbf{Incompatibilities : } This package % has no known incompatibilities with other packages. % % \section{The commands} % % \subsection{An alternative system of macros} % % This system consists in associating a sequence % of tokens to a name by the command "\Macro", % and call it later by the command "\m". % % % \itm "\Macro"\marg{name}\marg{expansion} % \DescribeMacro{\Macro} % associates the list of tokens \meta{expansion} % to the list of tokens % \meta{name}, which may contain any arbitrary % sequence of characters (except~"{", "}" and % active characters). This macro produces % a warning message ``The macro `\meta{name}' has % already been defined'' if \meta{name} already exists. % % \Nota The sequence \meta{name} may correspond to the control % sequence of a \TeX{} macro without creating interferences. % Internally, the system stores the expansion % of \meta{name} as the \TeX{} control sequence % "functan@macro@"\meta{name}. % % \itm "\m"\marg{name} gives the expansion corresponding % \DescribeMacro{\m} % to \meta{name} if a couple \meta{name} and \meta{expansion} % has already been defined by % "\Macro". Otherwise, an error message % ``The macro `\meta{name}' is not defined'' is produced. % The error message ``No macro's name given'' is % also produced if the argument is given, that is % if "\m{}" is encountered. % % % \begin{examplenotab} % "\Macro{L2Om}{\mathrm{L}^2(\Omega)}"\\ % "Denote by $\m{L2Om}$ the space of functions such that..."\\ % \hbox{}\quad % Denote by $\m{L2Om}$ the space of functions such that... % \end{examplenotab} % % \Nota A command "\mempty" % is also defined whose action is similar to % "\m", except that it does not produce % an error message if its argument is empty. % % \subsection{Norms} % % The command "\norm" allows to typeset % norms easily. % \begin{table} % \begin{center} % \begin{tabular}{l l l l l l} % \hline % (empty string) & \texttt{auto} & % \texttt{big} & \texttt{Big} & \texttt{bigg} & \texttt{Bigg}\\ % \hline % \end{tabular} % \caption{\label{table-1} Possible arguments for the size} % \end{center} % \end{table} % % \itm "\norm"\oarg{size}\marg{name}\marg{arg} % \DescribeMacro{\norm} % is roughly an equivalent to "\|"\meta{arg}"\|_{\m"\marg{name}"}" % but with a control on the size of the vertical bars. % If \meta{name} is empty, % then nothing is put in subscript. % The optional argument \meta{size} is one of the % element in Table~\ref{table-1}. % By default, \meta{size} is set to \texttt{auto}, % which is equivalent in using "\left\|"..."\right\|" % around \meta{arg}. % If \meta{size} is empty, that is when one call % "\norm[]{...}{...}", then the delimitor $\|$ % is used with its normal size. If \meta{size} is equal to % \texttt{big}, \texttt{Big}, \texttt{bigg} or \texttt{Bigg}, % then \meta{size} is inserted before the delimitors $\|$. % % \Nota If \meta{size} is not one of the elements of Table~\ref{table-1}, % the the normal size is used. % % \begin{example} % "\norm{}{f}" & $\norm{}{f}$\\ % "\norm{L2Om}{f}" & $\norm{L2Om}{f}$\\ % "\norm[Big]{L2Om}{f}" & $\norm[Big]{L2Om}{f}$\\ % "\norm{L2Om}{\frac{1}{f}}" & $\norm{L2Om}{\frac{1}{f}}$\\ % "\norm[]{L2Om}{\frac{1}{f}}" & $\norm[]{L2Om}{\frac{1}{f}}$\\ % \end{example} % % \itm "\norm*"\oarg{size}\marg{subscr}\marg{arg} % \DescribeMacro{\norm*} % works as "\norm", except that \meta{subscr} is not % one of the macro defined by "\Macro", % but any sequence of tokens which is put in subscript. % For example "\norm*{\infty}{f}" is equivalent % to "\norm{}{f}_{\infty}". % % \begin{example} % "\norm*{\infty}{f}" & $\norm*{\infty}{f}$\\ % "\norm*[Big]{\infty}{f}" & $\norm*[Big]{\infty}{f}$\\ % \end{example} % % \itm "\newnorm"\marg{name}\marg{expansion} % \DescribeMacro{\newnorm} % allows to override the behavior of the "\norm" macro. % Instead of using a "\|"..."\|" % structure, the user may for example use other delimitors. % Here \meta{name} is any sequence of tokens (except % "{", "}" and active characters), already % defined by "\Macro" or not. % The arguments "#1" (for the size) et "#2" (for the argument) may be % used in \meta{expansion}. The macros % "\casesize" and "\delonearg" (see Section~\ref{sub-macro} below) % may be used to create some new kind of norms. % % \newnorm{L2Om}{\delonearg[#1]{#2}{|}{|}} % \begin{example} % "\newnorm{L2Om}{\delonearg[#1]{#2}{|}{|}}" \\ % "\norm{L2Om}{f}" & $\norm{L2Om}{f}$\\ % "\norm[Big]{L2Om}{f}" & $\norm[Big]{L2Om}{f}$\\ % \end{example} % % \Nota It seems that some side effects % appear when "\newnorm" is used inside a group. % Hence, it is recommended to use this command % in the preamble. % % % % \subsection{Scalar products} % % Macros for scalar products are similar to % macros for the norms, except that two % argument are needed. % % \itm "\scalprod"\oarg{size}\marg{name}\marg{arg 1}\marg{arg 2} % \DescribeMacro{\scalprod} % creates roughly % "\langle"\meta{arg 1}","\meta{arg 2}"\rangle_{\m"\marg{name}"}". % The optional % \meta{size} argument shall be taken in Table~\ref{table-1}, % and acts as a modifier for the size of the brackets. % % \begin{example} % "\scalprod{}{f}{g}" & $\scalprod{}{f}{g}$\\ % "\scalprod{L2Om}{f}{g}" & $\scalprod{L2Om}{f}{g}$\\ % "\scalprod{L2Om}{f}{\frac{1}{g}}" & $\scalprod{L2Om}{f}{\frac{1}{g}}$\\ % "\scalprod[big]{L2Om}{f}{\frac{1}{g}}" & $\scalprod[big]{L2Om}{f}{\frac{1}{g}}$ % \end{example} % % \itm "\scalprod*"\oarg{size}\marg{subscr}\marg{arg 1}\marg{arg 2} % \DescribeMacro{\scalprod*} % acts like "\scalprod", except that \meta{subscr} is % not the name already defined by "\Macro", but % a sequence of tokens put in subscript after the closing % bracket. The rules are the same as for "\norm". % % \begin{example} % "\scalprod*{X,Y}{Ax}{y}" & $\scalprod*{X,Y}{Ax}{y}$\\ % "\scalprod*{X,Y}{B^{-1}x}{y}" & $\scalprod*{X,Y}{B^{-1}x}{y}$\\ % "\scalprod*[]{X,Y}{B^{-1}x}{y}" & $\scalprod*[]{X,Y}{B^{-1}x}{y}$ % \end{example} % % \itm "\newscalprod"\marg{name}\marg{expansion} % \DescribeMacro{\newscalprod} % allows to override the behavior of "\scalprod", % as for "\newnorm". Here, \meta{expansion} may % used the three arguments "#1" (for the optional size), % "#2" (\meta{arg 1}) and "#3" (\meta{arg 2}). % The command "\towarg" (see Section~\ref{sub-macro} below) % may be used to help the user to deal with new types % of scalar products. % % \newscalprod{L2}{\deltwoarg[#1]{#2}{#3}{(}{)}{|}} % \begin{examplenotab} % \noindent\strut"\newscalprod{L2Om}{\deltwoarg[#1]{#2}{#3}{(}{)}{|}}" % % \noindent\begin{tabular}{@{\strut} l l} % "\scalprod{L2}{f}{g}" & $\scalprod{L2}{f}{g}$ \\ % "\scalprod[Big]{L2}{f}{g}" & $\scalprod[Big]{L2}{f}{g}$\\ % "\scalprod[]{L2}{f^2}{g^2}" & $\scalprod[]{L2}{f^2}{g^2}$ % \end{tabular} % \end{examplenotab} % % \Nota It seems that some side effects % appear when "\newnorm" is used inside a group. % Hence, it is recommended to used this command % in the preamble. % % \subsection{Convergence} % The package \package{amsmath} provides a way % to create \emph{extensible arrows}, whose % size depends on the material put above and % below the arrow. % % \itm "\conv"\marg{name}\marg{below} % \DescribeMacro{\conv} % creates an extensible arrow by putting the % expansion of \meta{name} above the arrow, % and \meta{below} under the arrow. % This command uses the commands "\xrightarrow" of % \package{amsmath}. However, the "\xrightarrow" command % takes as an optional argument the material to be put % below. Here, it is a mandatory second argument. % % \begin{example} % "x_n\conv{}{} x" & $x_n\conv{}{} x$\\ % "f_n\conv{}{n\to\infty} f" & $f_n\conv{}{n\to\infty} f$\\ % "f_n\conv{L2Om}{n\to\infty} f" & $f_n\conv{L2Om}{n\to\infty} f$\\ % \end{example} % % \itm "\conv*"\marg{above}\marg{below} % \DescribeMacro{\conv*} % is similar to "\conv", except that both % \meta{above} and \meta{below} are lists of tokens % that are put respectively above and below the arrow. % % \begin{example} % "f_n\conv*{\text{uniformly}}{n\to\infty} f" & $f_n\conv*{\text{uniformly}}{n\to\infty} f$ % \end{example} % % \itm "\newconv"\marg{name}\marg{expansion} allows % \DescribeMacro{\newconv} % to override the behavior of "\conv"\marg{name}, % whether \meta{name} corresponds to a name % defined by "\Macro" or not. The token list % \meta{expansion} may use one argument "#1". % % \begin{examplenotab} % "\newconv{*L2Om}{\conv*{\star\text{-}\m{L2Om}}{#1}}"\\ % "f_n\conv{*L2Om}{n\to\infty} f" \quad $f_n\conv{*L2Om}{n\to\infty}f$\\ % \end{examplenotab} % % \itms "\leftconv"\marg{name}\marg{below} % \DescribeMacro{\leftconv} % \DescribeMacro{\leftconv*} %\\ and "\leftconv*"\marg{above}\marg{below} % act like "\conv" and "\conv*", except that % an arrow pointing to the left ($\leftconv{}{}$) is used instead % of an arrow pointing to the right ($\conv{}{}$). % % \itms "\leftrightconv"\marg{name}\marg{below} % \DescribeMacro{\leftrightconv} % \DescribeMacro{\leftrightconv*} % \\and "\leftrightconv*"\marg{above}\marg{below} % act like "\conv" and "\conv*", except that % an arrow pointing both to the left and to % the right ($\leftrightconv{}{}$) is used instead % of an arrow pointing to the right ($\conv{}{}$). % % % There are other commands similar to "\conv", % "\conv*", "\leftconv", "\leftconv*", % "\leftrightconv" and "\leftrightconv*" % that is with the same arguments, but with % different types of arrows. % % \itms "\wkconv", "\wkconv*", "\leftwkconv", % \DescribeMacro{\wkconv} % \DescribeMacro{\wkconv*} % \DescribeMacro{\leftwkconv} % \DescribeMacro{\leftwkconv*} % \DescribeMacro{\leftrightwkconv} % \DescribeMacro{\leftrightwkconv*} % "\leftwkconv*",\\ % "\leftrightwkconv" and "\leftrightwkconv*" % use $\wkconv{}{}$ instead of~$\conv{}{}$. Such an arrow % is generally used to denote \emph{weak convergence} % (hence the "wk"). % % \begin{example} % "f_n\wkconv{}{n\to\infty} f" & % $f_n\wkconv{}{n\to\infty} f$\\ % "f_n\wkconv{H10}{n\to\infty} f" & % $f_n\wkconv{H10}{n\to\infty} f$ % \end{example} % % \itms "\Conv", "\Conv*", "\Leftconv", "\Leftconv*", % \DescribeMacro{\Conv} % \DescribeMacro{\Conv*} % \DescribeMacro{\Leftconv} % \DescribeMacro{\Leftconv*} % \DescribeMacro{\Leftrightconv} % \DescribeMacro{\Leftrightconv*} % "\Leftrightconv" and "\Leftrightconv*" % use $\Conv{}{}$ instead of~$\conv{}{}$. % This may be used to denote convergence in % distribution in probability theory. % This could also be used for the implication % and equivalence symbols in logic. % \begin{examplenotab} % "\mu_n\Conv{}{n\to\infty} \mu" \quad % $\mu_n\Conv{}{n\to\infty} \mu$\\ % "x<0\Leftrightconv*{\text{Lemma 1.1}}{} f(x)\geq 0"\\ % \hbox{}\quad $x<0\Leftrightconv*{\text{Lemma 1.1}}{} f(x)\geq 0$ % \end{examplenotab} % % \subsection{Defining macros} % % \label{sub-macro} % % The package \package{functan} provides a few % macros to help the user to define its own % norms, scalar products, ... % % \itm "\delonearg"\oarg{size}\marg{arg}\marg{left del}\marg{right del} % \DescribeMacro{\delonearg} %\\ surrounds \meta{arg} the left delimitor % \meta{left del} and the right delimitor \meta{right del}. % The possible values of the optional argument \meta{size} (which is by % default set to "auto") are given in Table~\ref{table-1}. % \newcommand{\ket}[2][auto]{\delonearg[#1]{#2}{|}{\rangle}} % \newcommand{\bra}[2][auto]{\delonearg[#1]{#2}{\langle}{|}} % \begin{examplenotab} % "\newcommand{\event}[2][auto]{\delonearg[#1]{#2}{\{}{\}}}"\\ % "\event{1,\dotsc,\frac{1}{n}}"\\ % "\cup\event[]{\frac{1}{n^2},\dotsc,\frac{2}{n^2}}"\\ % \hbox{}\quad$\event{1,\dotsc,\frac{1}{n}}\cup\event[]{\frac{1}{n},\dotsc,\frac{2}{n}}$\\ % "\newcommand{\ket}[2][auto]{\delonearg[#1]{#2}{|}{\rangle}}"\\ % "\ket{Ax}" \quad $\ket{Ax}$\\ % "\newcommand{\bra}[2][auto]{\delonearg[#1]{#2}{\langle}{|}}"\\ % "\bra{Ax}" \quad $\bra{Ax}$ % \end{examplenotab} % % \itm "\deltwoarg"\oarg{size}\marg{arg 1}\marg{arg 2}... % \DescribeMacro{\deltwoarg} % \\...\marg{left del}\marg{right del}\marg{sep} % is similar to "\delonearg", except that it % separates \meta{arg 1} and \meta{arg 2} % by a separator \meta{sep.}. If % \meta{sep} is set to "|", then a vertical bar % is used, with an automatic adjustment to the size % of the delimitors. % % \newcommand{\set}[3][auto]{\deltwoarg[#1]{#2}{#3}{\{}{\}}{\,;\,}} % \newcommand{\braket}[3][auto]{\deltwoarg[#1]{#2}{#3}{\langle}{\rangle}{|}} % \begin{examplenotab} % "\newcommand{\set}[3][auto]{\deltwoarg[#1]{#2}{#3}{\{}{\}}{\,;\,}}"\\ % "\set{x\geq 0}{P(x)=0}" \quad $\set{x\geq 0}{P(x)=0}$\\ % "\newcommand{\braket}[3][auto]{%"\\ % "\deltwoarg[#1]{#2}{#3}{\langle}{\rangle}{|}}"\\ % "\braket{Ax}{y}" \quad $\braket{Ax}{y}$ % \end{examplenotab} % % \itm "\casesize"\marg{size}\marg{auto}\marg{empty}... % \DescribeMacro{\casesize} %\\...\marg{big}\marg{Big}\marg{bigg}\marg{Bigg} % takes \meta{size} in Table~\ref{table-1} % and executes \marg{empty} if \meta{size} is an empty % list of tokens, \meta{auto} if \meta{size} is "auto", % \meta{big} if \meta{size} is "big", ... % The error message ``Size argument `\meta{size}' of `casesize' not valid'' % is produced if \meta{size} is not in Table~\ref{table-1} % % \itm "\delcasesize"\marg{size}\marg{auto}\marg{empty}\marg{other} % \DescribeMacro{\delcasesize} % is similar to "\casesize", except that \meta{other} is % executed if \meta{size} is different from "auto" % or from an empty list of tokens. % % % \section{Examples} % % \subsection{Macros with arguments} % % It is possible to define a macro \meta{name} % such that "\m"\marg{name} accepts some arguments. % For that, it is sufficient % that it expands into a \TeX{} command % that accepts arguments. % % \newcommand{\evolution}[2]{\m{#1}(0,T;\m{#2})} % \Macro{L20T}{\evolution{L2}} % \begin{examplenotab} % "\newcommand{\evolution}[2]{\m{#1}(0,T;\m{#2})}"\\ % "\Macro{L20T}{\evolution{L2}}"\\ % "\m{L20T}{H10Om}\cap\m{L20T}{L2Om}"\quad % $\m{L20T}{H10Om}\cap\m{L20T}{L2Om}$ % \end{examplenotab} % % % \subsection{Matrix norms} %\newnorm{matrix}{\delcasesize{#1}% %{\left|\left|\left| #2\right|\right|\right|}% %{|||#2|||}% %{#1|#1|#1|#2 #1|#1|#1|}} % % A matrix norm with three bars may be % defined by %\begin{verbatim} %\newnorm{matrix}{\delcasesize{#1}% %{\left|\left|\left| #2\right|\right|\right|}% %{|||#2|||}% %{#1|#1|#1|#2 #1|#1|#1|}} %\end{verbatim} % so that % \begin{examplenotab} % "\norm{matrix}{A^2}\leq \norm{matrix}{A}^2"\quad % $\norm{matrix}{A^2}\leq \norm{matrix}{A}^2$\\ % "\norm[]{matrix}{A^2}\leq \norm{matrix}{A}^2"\quad % $\norm[]{matrix}{A^2}\leq \norm{matrix}{A}^2$ % \end{examplenotab} % % \subsection{Sets} % % An example of code for defining sets was given % with the documentation of "\deltwoarg". Here is % another possibility % \newcommand{\settwo}[3][auto]{\deltwoarg[#1]{#2\,}{\,#3}{\{}{\}}{|}} % \begin{examplenotab} % "\newcommand{\set}[3][auto]{%"\\ % "\deltwoarg[#1]{#2\,}{\,#3}{\{}{\}}{|}}"\\ % "\set{x>-1}{\frac{x}{1+x}\geq \frac{1}{2}}"\quad % $\displaystyle \settwo{x>-1}{\frac{x}{1+x}\geq \frac{1}{2}}$ % \end{examplenotab} % % \subsection{Duality products} % % The command "\casesize" may be used for defining % a duality product, which is a bit tricky since % we want the position of name of the dual space % to be adjusted to the size of the delimitors. % The command "\dual" defined by % %\newcommand{\dual}[5][auto]{ %\casesize{#1}{ %\left.\vphantom{\left\langle #4;#5\right\rangle}% %\right._{\m{#2}}\left.% %\left\langle #4;#5\right\rangle\right._{\m{#3}}}% %{{}_{\m{#2}}\langle #4;#5\rangle_{\m{#3}}}% %{\bigl._{\m{#2}}\bigl\langle #4;#5\bigr\rangle_{\m{#3}}}% %{\Bigl._{\m{#2}}\Bigl\langle #4;#5\Bigr\rangle_{\m{#3}}}% %{\biggl._{\m{#2}}\biggl\langle #4;#5\biggr\rangle_{\m{#3}}}% %{\Biggl._{\m{#2}}\Biggl\langle #4;#5\Biggr\rangle_{\m{#3}}}} % \begin{verbatim} %\newcommand{\dual}[5][auto]{ %\casesize{#1}{ %\left.\vphantom{\left\langle #4;#5\right\rangle}% %\right._{\m{#2}}\left.% %\left\langle #4;#5\right\rangle\right._{\m{#3}}}% %{{}_{\m{#2}}\langle #4;#5\rangle_{\m{#3}}}% %{\bigl._{\m{#2}}\bigl\langle #4;#5\bigr\rangle_{\m{#3}}}% %{\Bigl._{\m{#2}}\Bigl\langle #4;#5\Bigr\rangle_{\m{#3}}}% %{\biggl._{\m{#2}}\biggl\langle #4;#5\biggr\rangle_{\m{#3}}}% %{\Biggl._{\m{#2}}\Biggl\langle #4;#5\Biggr\rangle_{\m{#3}}}} % \end{verbatim} % may be used to produce % \Macro{H1}{\mathrm{H}^1} % \Macro{H-1}{\mathrm{H}^{-1}} % \begin{example} % "\Macro{H1}{\mathrm{H}^1}"\\ % "\Macro{H-1}{\mathrm{H}^{-1}}"\\ % "\dual{H-1}{H1}{f}{\frac{1}{g}}" & % $\dual{H-1}{H1}{f}{\frac{1}{g}}$\\ % "\dual[]{H-1}{H1}{f}{\frac{1}{g}}" & % $\dual[]{H-1}{H1}{f}{\frac{1}{g}}$\\ % "\dual[bigg]{H-1}{H1}{f}{\frac{1}{g}}" & % $\dual[bigg]{H-1}{H1}{f}{\frac{1}{g}}$ % \end{example} % % % % % \section{The code} % % \subsection{Package heading} % This package uses some code of the \package{amsmath} package. % All the options of \package{amsmath} may % be set as options of \package{functan} in % order to avoir an option clash. % \begin{macrocode} %<*package> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{functan}[2004/07/03 v1.0, Macros for functional analysis] \DeclareOption{leqno}{% \PassOptionsToPackage{leqno}{amsmath}} \DeclareOption{intlimits}{% \PassOptionsToPackage{intlimits}{amsmath}} \DeclareOption{nointlimits}{% \PassOptionsToPackage{leqno}{amsmath}} \DeclareOption{sumlimits}{% \PassOptionsToPackage{sumlimits}{amsmath}} \DeclareOption{nosumlimits}{% \PassOptionsToPackage{leqno}{amsmath}} \DeclareOption{namelimits}{% \PassOptionsToPackage{namelimits}{amsmath}} \DeclareOption{nonamelinits}{% \PassOptionsToPackage{nonamelinits}{amsmath}} \DeclareOption{reqno}{% \PassOptionsToPackage{reqno}{amsmath}} \DeclareOption{centertags}{% \PassOptionsToPackage{centertags}{amsmath}} \DeclareOption{tbtags}{% \PassOptionsToPackage{tbtags}{amsmath}} \DeclareOption{cmex10}{% \PassOptionsToPackage{cmex10}{amsmath}} \DeclareOption{fleqn}{% \PassOptionsToPackage{fleqn}{amsmath}} \ProcessOptions \RequirePackage{amsmath}[2000/01/01 v2.0] % \end{macrocode} % \subsection{Defining macros} % % \begin{macro}{\Macro} % This commands defines a new macro with % name \meta{name}, by creating % a \TeX{} command \verb+functan@macro@+\meta{name}. % A warning message is sent if \meta{name} has already % been defined. % \begin{macrocode} \newcommand{\Macro}[2]{\@ifundefined{functan@macro@#1}{}{% \PackageWarning{functan}{The macro '#1' has already been defined}} \@namedef{functan@macro@#1}{#2}} % \end{macrocode} % \end{macro} % \begin{macro}{\m} % \begin{macro}{\mempty} % This command allows to call the macro defined by \meta{name}. % An error message is sent if \meta{name} has not been % defined, or if no argument is given. % The macro \verb+\mempty+ provides no error % message is the argument is empty. It is used % to deal with \verb+\conv+ macros. % \begin{macrocode} \newcommand{\m}[1]{\@ifempty{#1}{% \PackageError{functan}{No macro's name given}{} }{% \@ifundefined{functan@macro@#1}{% \PackageError{functan}{The macro `#1' is not defined}{}}{% \@nameuse{functan@macro@#1}}}} \newcommand{\mempty}[1]{\@ifempty{#1}{}{% \@ifundefined{functan@macro@#1}{% \PackageError{functan}{The macro `#1' is not defined}{}}{% \@nameuse{functan@macro@#1}}}} % \end{macrocode} % \end{macro} % \end{macro} % % % \subsection{Dealing with size} % \begin{macro}{\functan@casesize} % \begin{macro}{\delcasesize} % The macro "\delcasesize" is an alias for "\functan@casesize". % These macros require four arguments. This first one % is the size among $\emptyset$ (empty argument for normal size) % \texttt{auto} and one of the delimitors possible % size (\texttt{big}, \texttt{Big}, \texttt{bigg}, \texttt{Bigg}). % It \texttt{auto} is detected, then the second argument % is executed. It no argument is given, then the third % argument is executed. Otherwise, the fourth argument % is executed. % Another macro, "\casesize" (see below), is intended % to execute a different code the the six distinct possibilities % ($\emptyset$, \texttt{auto}, % \texttt{big}, \texttt{Big}, \texttt{bigg}, \texttt{Bigg}). % \begin{macrocode} \global\def\functan@size@auto{auto} \newcommand{\functan@casesize}[4]{\def\functan@size{#1}% \ifx\functan@size\functan@size@auto #2\else% \@ifempty{#1}{#3}{#4}\fi} \let\delcasesize\functan@casesize % \end{macrocode} % \end{macro} % \end{macro} % \begin{macro}{\casesize} % The first argument is one of the delimitor's size % specification (\texttt{auto}, $\emptyset$, % \texttt{big}, \texttt{Big}, \texttt{bigg}, \texttt{Bigg}), % and the six others are the different codes % for each of the possible size in the order given just above. % \begin{macrocode} \global\def\functan@size@big{big} \global\def\functan@size@Big{Big} \global\def\functan@size@bigg{bigg} \global\def\functan@size@Bigg{Bigg} \newcommand{\casesize}[7]{% \def\functan@size{#1} \@ifempty{#1}{#3}{% \ifx\functan@size\functan@size@auto{#2}\else% \ifx\functan@size\functan@size@big{#4}\else% \ifx\functan@size\functan@size@Big{#5}\else% \ifx\functan@size\functan@size@bigg{#6}\else% \ifx\functan@size\functan@size@Bigg{#7}\else% \PackageError{functan}{Size argument `#1' of `casesize' not valid}% \fi\fi\fi\fi\fi}} % \end{macrocode} % \end{macro} % \begin{macro}{\delonearg} % \begin{macro}{\deltwoarg} % These two macros may be used for defining a pair % of delimitors with automatic or manual size adjustment. % % \Nota A "big-g-g" argument is transformed % into \TeX{} control sequence with the command % "\@nameuse". If the argument of \@nameuse % is not a control sequence for an already defined % control sequence, then "\@nameuse"\marg{...} % is transformed into an empty list. % \begin{macrocode} \newcommand{\delonearg}[4][auto]{% \functan@casesize{#1}{\left#3 #2 \right#4}{% #3 #2 #4}{\@nameuse{#1l}#3 #2 \@nameuse{#1r}#4}} \newcommand{\deltwoarg}[6][auto]{% \def\functan@vert@bar{|}% \edef\functan@arg@bar{#6}% \ifx\functan@arg@bar\functan@vert@bar% \functan@casesize{#1}{\left#4 #2\;\vrule\; #3\right#5}{% #4 #2\;\vert\;#3 #5}{% \@nameuse{#1l}#4 #2\;\@nameuse{#1}\vert\;#3 \@nameuse{#1r}#5} \else \functan@casesize{#1}{\left#4 #2 #6 #3 \right#5}{% #4 #2 #6 #3 #5}{% \@nameuse{#1l}#4 #2 #6 #3 \@nameuse{#1r}#5} \fi} % \end{macrocode} % \end{macro} % \end{macro} % \subsection{Norms} % \begin{macro}{\functan@norm} % This is the generic macro for the norms, which % uses double bars $\Vert$ as delimitors. % \begin{macrocode} \newcommand{\functan@norm}[3]{% \functan@casesize{#1}{\left\lVert #3\right\rVert% \@ifnotempty{#2}{_{#2}}}{% \lVert #3\rVert\@ifnotempty{#2}{_{#2}}}{% \@nameuse{#1l}\lVert #3\@nameuse{#1r}\rVert% \@ifnotempty{#2}{_{#2}}}} % \end{macrocode} % \end{macro} % \begin{macro}{\functan@starred@norm} % \begin{macro}{\functan@nonstarred@norm} % This two macros call the command % "\functan@norm" either with (non-starred form) % or without (starred form) expending the second % argument \meta{name} as the name of a macro defined by "\Macro". % Note that if the second argument is empty % in "\functan@nonstarred@norm", then % no error message is produced. This allows % to have a subscript just after the norm % such as in "\norm{}{f}_1" % without producing an error message % of type ``double subscript error''. Note % that the previous example may also be % written "\norm*{1}{f}". % For the non-starred version, % if a \TeX{} macro % "functan@named@norm@"\meta{name} % exists (which is defined by "\newnorm"), % then this macro is called instead % of \verb+\functan@norm+. % \begin{macrocode} \newcommand{\functan@starred@norm}[3][auto]{% \functan@norm{#1}{#2}{#3}} \newcommand{\functan@nonstarred@norm}[3][auto]{% \@ifundefined{functan@named@norm@#2}% {\@ifempty{#2}{\functan@norm{#1}{}{#3}}{% \functan@norm{#1}{\m{#2}}{#3}}}% {\@nameuse{functan@named@norm@#2}{#1}{#3}}} % \end{macrocode} % \end{macro} % \end{macro} % \begin{macro}{\newnorm} % This macro allows to override the % behavior of the "\norm" macro % by defining a \TeX{} command % "functan@named@norm@"\meta{name}. % \begin{macrocode} \newcommand{\newnorm}[1]{% \@namedef{functan@named@norm@#1}##1##2} % \end{macrocode} % \end{macro} % \begin{macro}{\norm} This macro is the %one which is finally used. The presence %of a star "*" is checked %and either "\functan@starred@norm" or %"\functan@nonstarred@norm" is called in %consequence. % \begin{macrocode} \newcommand{\norm}{\@ifstar{\functan@starred@norm}% {\functan@nonstarred@norm}} % \end{macrocode} % \end{macro} % % % \subsection{Convergence} % % \Nota It is for this set of macros that % the compatibility with version 2.0 of "amsmath" % or higher is important. % % \begin{macro}{\newconv} This macro % allows to override the behavior of the % \verb+\conv+ macro, by defining a % \TeX{} control sequence "functan@named@conv@"\meta{name}. % \begin{macrocode} \newcommand{\newconv}[1]{% \@namedef{functan@named@conv@#1}##1} % \end{macrocode} % \end{macro} % \begin{macro}{\conv} % This macros stands for the usual convergence % symbol ($\rightarrow$). The presence of a star % \verb+*+ is checked, and either % \verb+\functan@nonstarred@conv+ % or \verb+\functan@starred@conv+ is called in consequence. % If a \TeX{} command called % \verb+functan@named@conv@+\meta{name} exists, % where \meta{name} is the first argument of \verb+\conv+, % then this command is called instead of the others. % % The command \verb+\xrightarrow+ is defined % in the \package{amsmath} package. % \begin{macrocode} \newcommand{\conv}{% \@ifstar{\functan@starred@conv}{\functan@nonstarred@conv}} \newcommand{\functan@nonstarred@conv}[2]{% \@ifundefined{functan@named@conv@#1}% {\xrightarrow[#2]{\mempty{#1}}}{\@nameuse{functan@named@conv@#1}{#2}}} \newcommand{\functan@starred@conv}[2]{\xrightarrow[#2]{#1}} % \end{macrocode} % \end{macro} % \begin{macro}{\xleftrightglobalarrow} % \begin{macro}{\Xleftrightglobalarrow} % \begin{macro}{\Xrightglobalarrow} % \begin{macro}{\Xleftglobalarrow} % These commands are defined in a way similar to the % one in \verb+\xrightarrow+ in the package \package{amsmath}. % The first four arguments are lengths added on each % side of the argument. % \begin{macrocode} \newcommand{\xleftrightarrow}[2][]{% \ext@arrow 9999\leftrightarrowfill@{#1}{#2}} \newcommand{\Xrightarrow}[2][]{% \ext@arrow 0359\Rightarrowfill@{#1}{#2}} \newcommand{\Xleftarrow}[2][]{% \ext@arrow 3095\Leftarrowfill@{#1}{#2}} \newcommand{\Xleftrightarrow}[2][]{% \ext@arrow 9999\Leftrightarrowfill@{#1}{#2}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \begin{macro}{\leftconv} % \begin{macro}{\leftrightconv} % The commands \verb+\leftconv+ and \verb+\leftrightconv+ are defined % as the command \verb+\conv+, except that it % is not possible to override them (however, % any kind of arrow may be used with the command % \verb+\newconv+). % \begin{macrocode} \newcommand{\leftconv}{% \@ifstar{\functan@starred@leftconv}% {\functan@nonstarred@leftconv}} \newcommand{\functan@nonstarred@leftconv}[2]{% \xleftarrow[#2]{\mempty{#1}}} \newcommand{\functan@starred@leftconv}[2]{% \xleftarrow[#2]{#1}} \newcommand{\leftrightconv}{% \@ifstar{\functan@starred@leftrightconv}% {\functan@nonstarred@leftrightconv}} \newcommand{\functan@nonstarred@leftrightconv}[2]{% \xleftrightarrow[#2]{\mempty{#1}}} \newcommand{\functan@starred@leftrightconv}[2]{% \xleftrightarrow[#2]{#1}} % \end{macrocode} % \end{macro} % \end{macro} % \begin{macro}{\Conv} % \begin{macro}{\Leftconv} % \begin{macro}{\Leftrightconv} % These macros are defined like \verb+\conv+. % \begin{macrocode} \newcommand{\Conv}{% \@ifstar{\functan@starred@Conv}{\functan@nonstarred@Conv}} \newcommand{\functan@nonstarred@Conv}[2]{% \Xrightarrow[#2]{\mempty{#1}}} \newcommand{\functan@starred@Conv}[2]{% \Xrightarrow[#2]{#1}} \newcommand{\Leftconv}{% \@ifstar{\functan@starred@Leftconv}% {\functan@nonstarred@Leftconv}} \newcommand{\functan@nonstarred@Leftconv}[2]{% \Xleftarrow[#2]{\mempty{#1}}} \newcommand{\functan@starred@Leftconv}[2]{% \Xleftarrow[#2]{#1}} \newcommand{\Leftrightconv}{% \@ifstar{\functan@starred@Leftrightconv}% {\functan@nonstarred@Leftrightconv}} \newcommand{\functan@nonstarred@Leftrightconv}[2]{% \Xleftrightarrow[#2]{\mempty{#1}}} \newcommand{\functan@starred@Leftrightconv}[2]{% \Xleftrightarrow[#2]{#1}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \begin{macro}{\xrightharpoon} % \begin{macro}{\xleftharpoon} % \begin{macro}{\xleftrightharpoon} % This type of arrow behaves as the other ones, except % that an $\rightharpoonup$ is used at the end % of the arrow. % \begin{macrocode} \def\rightharpoonfill@{\arrowfill@\relbar\relbar\rightharpoonup} \newcommand{\xrightharpoon}[2][]% {\ext@arrow 0359\rightharpoonfill@{#1}{#2}} \def\leftharpoonfill@{\arrowfill@\leftharpoonup\relbar\relbar} \newcommand{\xleftharpoon}[2][]% {\ext@arrow 3095\leftharpoonfill@{#1}{#2}} \def\leftrightharpoonfill@% {\arrowfill@\leftharpoonup\relbar\rightharpoonup} \newcommand{\xleftrightharpoon}[2][]% {\ext@arrow 3095\leftrightharpoonfill@{#1}{#2}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \begin{macro}{\wkconv} % \begin{macro}{\leftwkconv} % \begin{macro}{\leftrightwkconv} % These macro may be used for the weak convergence. % Its definition is similar to the one of \verb+\conv+. % \begin{macrocode} \newcommand{\wkconv}{% \@ifstar{\functan@starred@wkconv}% {\functan@nonstarred@wkconv}} \newcommand{\functan@nonstarred@wkconv}[2]{% \xrightharpoon[#2]{\mempty{#1}}} \newcommand{\functan@starred@wkconv}[2]{% \xrightharpoon[#2]{#1}} \newcommand{\leftwkconv}{% \@ifstar{\functan@starred@leftwkconv}% {\functan@nonstarred@leftwkconv}} \newcommand{\functan@nonstarred@leftwkconv}[2]{% \xleftharpoon[#2]{\mempty{#1}}} \newcommand{\functan@starred@leftwkconv}[2]{% \xleftharpoon[#2]{#1}} \newcommand{\leftrightwkconv}{% \@ifstar{\functan@starred@leftrightwkconv}% {\functan@nonstarred@leftrightwkconv}} \newcommand{\functan@nonstarred@leftrightwkconv}[2]{% \xleftrightharpoon[#2]{\mempty{#1}}} \newcommand{\functan@starred@leftrightwkconv}[2]{% \xleftrightharpoon[#2]{#1}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % % \subsection{Scalar products} % % \begin{macro}{\scalprod} % \begin{macro}{\newscalprod} % The definition of the scalar product is % similar to the definition of norms. % \begin{macrocode} \newcommand{\scalprod}{\@ifstar{\functan@starred@scalprod}% {\functan@nonstarred@scalprod}} \newcommand{\functan@starred@scalprod}[4][auto]{ \deltwoarg[#1]{#3}{#4}{\langle}% {\rangle}{,}\@ifempty{#2}{}{_{#2}}} \newcommand{\functan@nonstarred@scalprod}[4][auto]{ \@ifundefined{functan@scalprod@named@#2}{ \deltwoarg[#1]{#3}{#4}{\langle}% {\rangle}{,}\@ifempty{#2}{}{_{\m{#2}}}}{% \@nameuse{functan@scalprod@named@#2}{#1}{#3}{#4}}} \newcommand{\newscalprod}[1]{% \@namedef{functan@scalprod@named@#1}##1##2##3} % % \end{macrocode} % \end{macro} % \end{macro} % \Finale % \setcounter{IndexColumns}{2} % \PrintIndex