diff --git a/books/bookvol0.pamphlet b/books/bookvol0.pamphlet index 6e02085..b1befd4 100644 --- a/books/bookvol0.pamphlet +++ b/books/bookvol0.pamphlet @@ -92,15 +92,16 @@ % draw a box around a text block \newcommand\boxed[2]{% -\begin{center} -\begin{tabular}{|c|} -\hline -\begin{minipage}{#1} -\normalsize -{#2} -\end{minipage}\\ -\hline -\end{tabular} +\begin{center}% +\begin{tabular}{|c|}% +\hline% +\begin{minipage}{#1}% +\vskip 0.1cm% +\normalsize% +{#2}% +\end{minipage}\\% +\hline% +\end{tabular}% \end{center}} \newcommand{\optArg}[1]{{{\tt [}{#1}{\tt ]}}} @@ -110,6 +111,39 @@ \newcommand{\condata}[4]{{\bf #1} {\bf #2} {\bf #3} {\bf #4}} +\newdimen\xmpWidth \xmpWidth=29pc + +\def\Lisp{{Common LISP}} +\def\Language{{AXIOM}} +\def\axiom#1{{\frenchspacing\tt #1}} +\def\spad{\axiom} +\def\spadatt#1{{\tt #1}} +\def\spadref#1{Section \ref{#1} on page \pageref{#1}} +\def\spadignore#1{#1} + + +\def\axiomType#1{{\sf #1}} +\def\spadtype{\axiomType} + +\def\axiomOp#1{\index{library!operations!#1 @\begingroup \string\tt{} #1 \endgroup}``{\tt #1}''} +\def\spadop{\axiomOp} + +\def\axiomFun#1{{\bf #1}\index{library!operations!#1 @\begingroup \string\bf{} #1 \endgroup}} +\def\spadfun{\axiomFun} + +\def\spadgloss#1{\index{#1}{\it #1}} + +\def\eth#1{${\hbox{#1}\:}^{\hbox{\small\rm th}}$} + +\long\def\texht#1#2{#1} + +\def\simpleList{% +\begin{list}{}{\itemsep 2pt \topsep \parskip \parsep 0 +\leftmargin 1pc \partopsep 0 \parskip 0 +\if@twocolumn\else\linewidth\xmpWidth\fi}} + +\def\endsimpleList{\end{list}\vskip -\parskip} + \def\glossaryTerm#1{{\bf #1}\index{#1}} \def\glossaryTermNoIndex#1{{\bf #1}} \def\glossarySyntaxTerm#1{{\tt #1}\index{#1}} @@ -3796,7 +3830,6 @@ To interrupt an Axiom computation, hold down the \index{interrupt} the Axiom prompt. \boxed{4.6in}{ -\vskip 0.1cm To exit from Axiom, move to the console window, \index{stopping @{stopping Axiom}} type {\tt )quit} \index{exiting @{exiting Axiom}} at the input prompt and press the {\bf Enter} key. @@ -7397,7 +7430,6 @@ version of the constructor name. \boxed{4.6in}{ -\vskip 0.1cm Aside from allowing types to be written more concisely, abbreviations are used by Axiom to name various system files for constructors (such as library filenames, test input files and example files). Here are @@ -7491,7 +7523,6 @@ values that can be assigned to variables. A colon ``{\tt :}'' is always used after a variable or list of variables to be declared. \boxed{4.6in}{ -\vskip 0.1cm For a single variable, the syntax for declaration is \begin{center} {\it variableName $:$ typeOrMode} @@ -7628,7 +7659,6 @@ with \index{record!selector} a {\it selector}. Components can all belong to the same type or each can have a different type. \boxed{4.6in}{ -\vskip 0.1cm The syntax for writing a {\tt Record} type is \begin{center} {\tt Record($\hbox{\it selector}_{1}$:$\hbox{\it type}_{1}$, $\hbox{\it selector}_{2}$:$\hbox{\it type}_{2}$, \ldots, @@ -7819,7 +7849,6 @@ belongs to the {\tt Integer} branch, $x$ may be converted to an object of type {\tt Integer}. \boxed{4.6in}{ -\vskip 0.1cm The syntax for writing a {\tt Union} type without selectors is \begin{center} {\tt Union($\hbox{\it type}_{1}$, $\hbox{\it type}_{2}$, @@ -7971,7 +8000,6 @@ you can write {\tt Union} types \index{selector!union} with selectors. \index{union!selector} \boxed{4.6in}{ -\vskip 0.1cm The syntax for writing a {\tt Union} type with selectors is \begin{center} {\tt Union($\hbox{\it selector}_{1}$:$\hbox{\it type}_{1}$, @@ -8104,7 +8132,6 @@ allow. For {\tt Any}, anything that comes along can be accommodated. \label{ugTypesConvert} \boxed{4.6in}{ -\vskip 0.1cm Conversion is the process of changing an object of one type into an object of another type. The syntax for conversion is: $$ @@ -8544,7 +8571,6 @@ needing to convert the two integers into objects of the appropriate type. In these examples, ``/'' is written as an infix operator. \boxed{4.6in}{ -\vskip 0.1cm To use package calling with an infix operator, use the following syntax: $$(\ arg_1{\rm \ op\ }arg_2\ )\$type$$ } @@ -8559,7 +8585,6 @@ of {\rm Float} by AXIOM and then evaluated. The target type causes the ``+'' from {\tt Float} to be used. \boxed{4.6in}{ -\vskip 0.1cm For an operator written before its arguments, you must use parentheses around the arguments (even if there is only one), and follow the closing parenthesis by a ``\$'' and then the type. @@ -9442,7 +9467,6 @@ found, it looks in the system's directories, assuming you meant some input file that was provided with Axiom. \boxed{4.6in}{ -\vskip 0.1cm If you have the Axiom history facility turned on (which it is by default), you can save all the lines you have entered into the workspace by entering @@ -9975,7 +9999,6 @@ The ``{\tt :=}'' operator is the immediate {\it assignment} operator. variable. \index{immediate assignment} \boxed{4.6in}{ -\vskip 0.1cm The syntax for immediate assignment for a single variable is \begin{center} {\it variable} $:=$ {\it expression} @@ -10027,7 +10050,6 @@ assignment} delayed evaluation of the right-hand side and dependency checking. \boxed{4.6in}{ -\vskip 0.1cm The syntax for delayed assignment is \begin{center} {\it variable} $==$ {\it expression} @@ -10104,7 +10126,6 @@ expressions. Note that a {\it tuple} is a collection of things separated by commas, often surrounded by parentheses. \boxed{4.6in}{ -\vskip 0.1cm The syntax for multiple immediate assignments is \begin{center} {\tt ( $\hbox{\it var}_{1}$, $\hbox{\it var}_{2}$, \ldots, @@ -10181,7 +10202,6 @@ Only the first form is available if you are entering expressions directly to Axiom. Both forms are available in {\bf .input} files. \boxed{4.6in}{ -\vskip 0.1cm The syntax for a simple block of expressions entered interactively is \begin{center} {\tt ( $\hbox{\it expression}_{1}$; $\hbox{\it expression}_{2}$; \ldots; @@ -10345,7 +10365,6 @@ expression that evaluates to or is convertible to either {\tt true} or {\tt false}, that is, a {\tt Boolean}. \index{Boolean} \boxed{4.6in}{ -\vskip 0.1cm The syntax for conditional expressions is \begin{center} {\tt if\ }{\it predicate} @@ -10461,7 +10480,6 @@ keyword and return the unique value of {\tt Void}. Loops can contain inner loops to any depth. \boxed{4.6in}{ -\vskip 0.1cm The most basic loop is of the form \begin{center} {\tt repeat\ }{\it loopBody} @@ -10814,7 +10832,6 @@ immediately following the {\tt while} keyword. The predicate is tested evaluated whenever the predicates in a {\tt while} clause are all {\tt true}. \boxed{4.6in}{ -\vskip 0.1cm The syntax for a simple loop using {\tt while} is \begin{center} {\tt while} {\it predicate} {\tt repeat} {\it loopBody} @@ -10947,7 +10964,6 @@ present in addition to {\tt while} clauses. As with all other types of terminate the evaluation of the loop. \boxed{4.6in}{ -\vskip 0.1cm The syntax for a simple loop using {\tt for} is \begin{center} {\tt for} {\it iterator} {\tt repeat} {\it loopBody} @@ -11173,7 +11189,6 @@ such that $n$ is odd. \returnType{Type: Void} \boxed{4.6in}{ -\vskip 0.1cm A {\tt for} loop can also be written $$ {\rm for} {\it \ iterator\ } | {\it \ predicate\ } @@ -11217,7 +11232,6 @@ Sometimes you want to iterate across two lists in parallel, or perhaps you want to traverse a list while incrementing a variable. \boxed{4.6in}{ -\vskip 0.1cm The general syntax of a repeat loop is $$ iterator_1\ iterator_2\ \ldots\ iterator_N {\rm \ repeat\ } loopBody @@ -11422,7 +11436,6 @@ Here is the general rule. \index{collection} \boxed{4.6in}{ -\vskip 0.1cm The general syntax of a collection is \begin{center} {\tt [ {\it collectExpression} $\hbox{\it iterator}_{1}$ @@ -11868,7 +11881,6 @@ generalized abbreviation. You can only have one macro in your workspace with a given name, no matter how many arguments it has. \boxed{4.6in}{ -\vskip 0.1cm The two general forms for macros are \begin{center} {\tt macro} {\it name} {\tt ==} {\it body} \\ @@ -12076,7 +12088,6 @@ assigned to it. In this section we show how to declare a variable that refers to function objects. \boxed{4.6in}{ -\vskip 0.1cm A function is an object of type \begin{center} {\sf Source $\rightarrow$ Type} @@ -12111,7 +12122,6 @@ following declarations is acceptable. \returnType{Type: Void} \boxed{4.6in}{ -\vskip 0.1cm Functions can also be declared when they are being defined. The syntax for combined declaration/definition is: \begin{center} @@ -12538,7 +12548,6 @@ allows the execution of code that may involve objects whose types change. \boxed{4.6in}{ -\vskip 0.1cm If Axiom decides that it cannot compile the code, it issues a message stating the problem and then the following message: \begin{center} @@ -12754,7 +12763,6 @@ an earlier $\hbox{\it pred}_{j}$, the earlier piece is removed. Otherwise, the new piece is always added at the end. \boxed{4.6in}{ -\vskip 0.1cm If there are $n$ pieces to a function definition for $f$, the function defined $f$ is: \newline \hspace*{3pc} @@ -13037,7 +13045,6 @@ We also make {\bf f} and {\bf g} uncached. \end{verbatim} \boxed{4.6in}{ -\vskip 0.1cm Be careful about caching functions that have side effects. Such a function might destructively modify the elements of an array or issue a {\bf draw} command, for example. A function that you expect to @@ -13846,7 +13853,6 @@ or {\tt Vector} to hold the previously computed values? \label{ugUserAnon} \boxed{4.6in}{ -\vskip 0.1cm An {\it anonymous function} is a function that is \index{function!anonymous} defined \index{anonymous function} by giving a list of parameters, the ``maps-to'' compound @@ -14542,7 +14548,6 @@ right-hand side. To summarize: \boxed{4.6in}{ -\vskip 0.1cm To enter a single rule in Axiom, use the following syntax: \index{rule} \begin{center} {\tt rule {\it leftHandSide} == {\it rightHandSide}} @@ -14823,7 +14828,6 @@ $$ \returnType{Type: Expression Integer} \boxed{4.6in}{ -\vskip 0.1cm Summary of pattern variable adornments: \vskip .5\baselineskip \begin{tabular}{@{}ll} @@ -14918,7 +14922,6 @@ two-di\-men\-sion\-al graph is that of a curve defined by a function $y = f(x)$ over a finite interval of the $x$ axis. \boxed{4.6in}{ -\vskip 0.1cm The general format for drawing a function defined by a formula $f(x)$ is: \begin{center} {\tt draw(f(x), x = a..b, {\it options})} @@ -14994,7 +14997,6 @@ ranges over an interval $[a,b]$. The function {\bf curve} takes the two functions $f$ and $g$ as its parameters. \boxed{4.6in}{ -\vskip 0.1cm The general format for drawing a two-di\-men\-sion\-al plane curve defined by parametric formulas $x = f(t)$ and $y = g(t)$ is: \begin{center} @@ -15075,7 +15077,6 @@ ${\frac{\partial p}{\partial y}}(x,y)$ are not both zero. \index{non-singular curve} \boxed{4.6in}{ -\vskip 0.1cm The general format for drawing a non-singular solution curve given by a polynomial of the form $p(x,y) = 0$ is: \begin{center} @@ -16208,7 +16209,6 @@ The simplest three-di\-men\-sion\-al graph is that of a surface defined by a fun of two variables, $z = f(x,y)$. \boxed{4.6in}{ -\vskip 0.1cm The general format for drawing a surface defined by a formula $f(x,y)$ of two variables $x$ and $y$ is: % @@ -16262,7 +16262,6 @@ defined by the parametric equations for $x(t)$, $y(t)$, and $z(t)$ as a function of an independent variable $t$. \boxed{4.6in}{ -\vskip 0.1cm The general format for drawing a three-di\-men\-sion\-al space curve defined by parametric formulas $x = f(t)$, $y = g(t)$, and $z = h(t)$ is: @@ -16334,7 +16333,6 @@ $z(u,v)$ of two independent variables $u$ and $v$. \boxed{4.6in}{ -\vskip 0.1cm The general format for drawing a three-di\-men\-sion\-al graph defined by parametric formulas $x = f(u,v)$, $y = g(u,v)$, and $z = h(u,v)$ is: @@ -20710,7 +20708,6 @@ $$ \returnType{Type: UnivariatePuiseuxSeries(Expression Integer,x,0)} \boxed{4.6in}{ -\vskip 0.1cm \noindent {\bf Warning:} the type of the coefficients of a power series may affect the kind of computations that you can do with that series. @@ -21121,7 +21118,6 @@ $$ \returnType{Type: GeneralUnivariatePowerSeries(Expression Integer,x,0)} \boxed{4.6in}{ -\vskip 0.1cm The operation {\bf series} returns the most general type of infinite series. The user who is not interested in distinguishing @@ -21324,7 +21320,6 @@ $$ \returnType{Type: UnivariatePuiseuxSeries(Expression Integer,x,0)} \boxed{4.6in}{ -\vskip 0.1cm Axiom isn't sufficiently ``symbolic'' in the sense we might wish. It is an open problem to decide that ``x'' is the only surviving term. Two attacks on the problem might be: @@ -32785,7 +32780,6 @@ $$ \returnType{Type: Boolean} \boxed{4.6in}{ -\vskip 0.1cm Use the \spadfunFrom{zero?}{Integer} operation whenever you are testing any mathematical object for equality with zero. This is usually more efficient that using {\tt =} (think of matrices: it is @@ -42516,7 +42510,6 @@ $$ \returnType{Type: MultivariatePolynomial([a,b],Polynomial Integer)} \boxed{4.6in}{ -\vskip 0.1cm \noindent {\bf Restriction:} \begin{quotation}\noindent Axiom does not allow you to create types where @@ -49850,7 +49843,6 @@ polynomials in the single variable {\tt a1} whose coefficients are general polynomials with rational number coefficients. \boxed{4.6in}{ -\vskip 0.1cm \noindent {\bf Restriction:} \begin{quotation}\noindent Axiom does not allow you to create types where @@ -63585,6 +63577,7 @@ time this book was produced. Use the Browse facility (described in \sectionref{ugBrowse}) to get more information about these constructors. +\boxed{4.6in}{ This sample entry will help you read the following table: CategoryName{CategoryAbbreviation}:{$\hbox{{\sf Category}}_{1}$% @@ -63599,16 +63592,13 @@ CategoryAbbreviation & is the category abbreviation, e.g., {\sf COMRING}. \\ $\hbox{{\sf Category}}_{i}$ & is a category to which the category belongs. \\ $\hbox{{\rm op}}_{j}$ & is an operation exported by the category. \end{tabular} - +} \def\condata#1#2#3#4{{% \par\vskip 1pt% {\bf #2}\allowbreak\{{\tt #1}\}: {\sl #3} {\tt with }% {\rm #4}\par}} -% ---------------------------------------------------------------------- -\chapter{constructorListing} -% ---------------------------------------------------------------------- -% + \condata{ABELGRP}{AbelianGroup}{CancellationAbelianMonoid}{{\tt *} {\tt -}} % \condata{AMR}{AbelianMonoidRing}{Algebra BiModule CharacteristicNonZero CharacteristicZero CommutativeRing @@ -64058,6 +64048,7 @@ time this book was produced. Use the Browse facility (described in \sectionref{ugBrowse}) to get more information about these constructors. +\boxed{4.6in}{ This sample entry will help you read the following table: DomainName{DomainAbbreviation}:{$\hbox{{\sf Category}}_{1}$% @@ -64072,7 +64063,7 @@ DomainAbbreviation & is the domain abbreviation, e.g., {\sf INT}. \\ $\hbox{{\sf Category}}_{i}$ & is a category to which the domain belongs. \\ $\hbox{{\rm op}}_{j}$ & is an operation exported by the domain. \end{tabular} - +} % ---------------------------------------------------------------------- %\begin{constructorListing} @@ -65299,6 +65290,7 @@ time this book was produced. Use the Browse facility (described in \sectionref{ugBrowse}) to get more information about these constructors. +\boxed{5.0in}{ This sample entry will help you read the following table: PackageName{PackageAbbreviation}:{$\hbox{{\sf Category}}_{1}$% @@ -65313,7 +65305,7 @@ PackageAbbreviation & is the package abbreviation, e.g., {\sf PADEPAC}.\\ $\hbox{{\sf Category}}_{i}$ & is a category to which the package belongs. \\ $\hbox{{\rm op}}_{j}$ & is an operation exported by the package. \end{tabular} - +} % ---------------------------------------------------------------------- %\begin{constructorListing} @@ -66092,17 +66084,17 @@ in the input area on the main Browse menu and then click on %] \def\alt#1#2{{$\lbrace$#1$\mid$#2$\rbrace$}} \def\altx#1#2#3{{$\lbrace$#1$\mid$#2$\mid$#3$\rbrace$}} -\def\opt#1{{$\,\lbrack$#1$\rbrack$}} +\def\opt#1{{$\,[$#1$]$}} \def\bigLeftBrack{{\tt \[}} \def\bigRightBrack{{\tt \]}} \def\smallLeftBrack{{\tt \[}} \def\smallRightBrack{{\tt \]}} -\def\optinit#1{{$\lbrack$#1$\rbrack$}} -\def\optfirst#1{{\lbrack#1\rbrack}} +\def\optinit#1{{$[$#1$]$}} +\def\optfirst#1{{[#1]}} \def\from#1{{From {\bf #1}.}} \def\consultType#1{{Consult {\bf #1} using Browse for details.}} -\def\colx#1#2#3{{\lbrack#1,#2,\ldots,#3\rbrack}} -\def\col#1#2{{\lbrack#1,\ldots,\rbrack}} +\def\colx#1#2#3{{[#1,#2,\ldots,#3]}} +\def\col#1#2{{[#1,\ldots,]}} \def\code#1{{\tt #1}} \def\Unix{{\bf Unix}} \def\Script{IBM SCRIPT Formula Formatter} @@ -66141,12 +66133,16 @@ in the input area on the main Browse menu and then click on \par\vskip 4pt\optitle{#1}\nopagebreak\par\vskip -\parskip\vskip 2pt\nopagebreak\noindent% {\def\TYsize{\SMTYfont}#5}\par}} +\def\mathOrSpad#1{{$#1$}} +\def\smath#1{\mathOrSpad{#1}} +\def\twodim{two-di\-men\-sion\-al} +\def\threedim{three-di\-men\-sion\-al} \def\keydata#1#2#3#4#5{{\opdata{#1}{#2}{#3}{#4}{#5}}} \def\keyop#1{{{\large{$#1$}}}} \def\optitle#1{{\bf #1}} \def\opand{\optand} \def\optand{{\par\vskip -\parskip}} -\def\optinner#1{{\lbrack#1\rbrack}} +\def\optinner#1{{[#1]}} \def\opname#1{{\tt #1}} \def\opoption#1#2{{{\tt #1}$== #2$}} @@ -66159,9 +66155,13299 @@ in the input area on the main Browse menu and then click on %\input{oplist} \fussy -}\onecolumn +\keydata{\keyop{\#}aggregate}{1}{(\$)->NonNegativeInteger}{Aggregate} + {\smath{\# a} returns the number of items in \smath{a}. +} + +\keydata{x\keyop{**}y}{2}{(\$, \$)->\$}{ElementaryFunctionCategory} + {\smath{x**y} returns \smath{x} to the power \smath{y}. +Also, this operation returns, if \smath{x} is: +\begin{simpleList} +\item an equation: a new equation by raising both sides of \smath{x} to the power \smath{y}. +\item a float or small float: \smath{\mbox{\bf sign}\opLeftPren{}x\opRightPren{}}\smath{\mbox{\bf exp}\opLeftPren{}y \log(|x|)\opRightPren{}}. +\end{simpleList} +See also \axiomType{InputForm} and \axiomType{OutputForm}. +} + +\keydata{x\keyop{*}y}{2}{(Integer, \$)->\$}{AbelianGroup} + {\opkey{The binary operator \smath{*} denotes multiplication. +Its meaning depends on the type of its arguments:} +\begin{simpleList} +\item if \smath{x} and \smath{y} are members of a ring (more generally, a domain of +category \axiomType{SemiGroup}), \smath{x*y} returns the product of \smath{x} and \smath{y}. +\item if \smath{r} is an integer and \smath{x} is an element of a ring, or +if \smath{r} is a scalar and \smath{x} is a vector, matrix, or direct product: +\smath{r*x} returns the left multiplication of \smath{r} by \smath{x}. +More generally, if \smath{r} is an integer and \smath{x} is a +member of a domain of category \axiomType{AbelianMonoid}, +or \smath{r} is a member of domain \smath{R} and \smath{x} is a domain of category +\axiomType{Module(R)}, \axiomType{GradedModule}, or \axiomType{GradedAlgebra} +defined over \smath{R}, +\smath{r*x} returns the left multiplication of \smath{r} by \smath{x}. +Here \smath{x} can be a vector, a matrix, or a direct product. +Similarly, \smath{x*n} returns the right integer multiple of \smath{x}. +\item if \smath{a} and \smath{b} are monad elements, +the product of \smath{a} and \smath{b} (see \axiomType{Monad}). +\item if \smath{A} and \smath{B} are matrices, +returns the product of \smath{A} and \smath{B}. +If \smath{v} is a row vector, \smath{v*A} +returns the product of \smath{v} and \smath{A}. +If \smath{v} is column vector, \smath{A*v} +returns the product of \smath{A} with column vector \smath{v}. +In each case, the operation calls \spadfun{error} +if the dimensions are incompatible. +\item if \smath{s} is an integer or float and \smath{c} is a color, \smath{s*c} returns +the weighted shade scaled by \smath{s}. +\item if \smath{s} and \smath{t} are Cartesian tensors, +\smath{s*t} is the inner product of the tensors \smath{s} and \smath{t}. +This contracts the last index of \smath{s} with the first index of \smath{t}, +that is, +\smath{t*s = \mbox{\tt contract}(t, \mbox{\tt rank } t, s, 1)}, +\smath{t*s = \sum\nolimits_{k=1}^N{t([i_1, .., i_N, k]*s[k, j_1, .., j_M])}}. +\item if \smath{eq} is an equation, \smath{r*eq} +multiplies both sides of \smath{eq} by r. +\item if \smath{I} and \smath{J} are ideals, the product of ideals. +\item See also \axiomType{OutputForm}, \axiomType{Monad}, +\axiomType{LeftModule}, +\axiomType{RightModule}, and +\axiomType{FreeAbelianMonoidCategory}, +\end{simpleList} +See also \axiomType{InputForm} and \axiomType{OutputForm}. +} + +\keydata{x\keyop{+}y}{2}{(Integer, \$)->\$}{AbelianGroup} + {\opkey{The binary operator \smath{+} denotes addition. +Its meaning depends on the type of its arguments. +If \smath{x} and \smath{y} are:} +\begin{simpleList} +\item members of a ring (more generally, +of a domain of category \axiomType{AbelianSemiGroup}): +the sum of \smath{x} and \smath{y}. +\item matrices: +the matrix sum if \smath{x} and \smath{y} have the same dimensions, +and \spadfun{error} otherwise. +\item vectors: the component-wise sum if \smath{x} and \smath{y} have +the same length, and \spadfun{error} otherwise. +\item colors: a color which additively mixes colors \smath{x} and \smath{y}. +\item equations: an equation created by adding the respective left- and right-hand +sides of \smath{x} and \smath{y}. +\item elements of graded module or algebra: +the sum of \smath{x} and \smath{y} in the module of elements +of the same degree as \smath{x} and \smath{y}. +\item ideals: the ideal generated by the union of \smath{x} and \smath{y}. +\end{simpleList} +See also \axiomType{FreeAbelianMonoidCategory}, +\axiomType{InputForm} and \axiomType{OutputForm}. +} + + +\keydata{\optinit{x}\keyop{-}y}{1}{(\$)->\$}{AbelianGroup} + {\smath{- x} returns the negative (additive inverse) of \smath{x}, +where \smath{x} is a member of a ring +(more generally, a domain of category \axiomType{AbelianGroup}). +Also, \smath{x} may be a matrix, a vector, or a member of a graded module. + \newitem + \smath{x - y} returns \smath{x + (-y)}. + \newitem +See also \axiomType{CancellationAbelianMonoid} and \axiomType{OutputForm}. +} + + +\keydata{x\keyop{/}y}{2}{(\$, \$)->\$}{Group} +{\opkey{The binary operator \smath{/} generally denotes binary +division. +Its precise meaning, however, depends on the type of its arguments:} +\begin{simpleList} +\item \smath{x} and \smath{y} are elements of a group: multiplies \smath{x} by the inverse \smath{\mbox{\bf inv}\opLeftPren{}y\opRightPren{}} of \smath{y}. +\item \smath{x} and \smath{y} are elements of a field: divides \smath{x} by \smath{y}, calling +\spadfun{error} if \smath{y=0}. +\item \smath{x} is a matrix or a vector and \smath{y} is a scalar: divides each element of \smath{x} by \smath{y}. +\item \smath{x} and \smath{y} are floats or small floats: divides \smath{x} by \smath{y}. +\item \smath{x} and \smath{y} are fractions: returns the quotient as another fraction. +\item \smath{x} and \smath{y} are polynomials: returns the quotient +as a fraction of polynomials. +\end{simpleList} +See also \axiomType{AbelianMonoidRing}, \axiomType{InputForm} and \axiomType{OutputForm}. +} + + +\keydata{\keyop{0}}{0}{()->\$}{AbelianMonoid}{The additive +identity element for a ring (more generally, for an +\axiomType{AbelianMonoid}). +Also, for a graded module or algebra, the zero of degree 0 (see +\axiomType{GradedModule}). +See also \axiomType{InputForm}. +} + +\keydata{\keyop{1}}{0}{()->\$}{GradedAlgebra} +{The multiplicative identity element for a ring +(more generally, for a \axiomType{Monoid} and \axiomType{MonadWithUnit}). +or a graded algebra. +See also \axiomType{InputForm}. +} + +\keydata{x\keyop{<}y}{2}{(\$, \$)->Boolean}{OrderedSet} + {\opkey{The binary operator \smath{<} denotes the boolean-valued +``less than'' function. +Its meaning depends on the type of its arguments. +The operation \smath{x < y} for \smath{x} and \smath{y}:} +\begin{simpleList} +\item elements of a totally ordered set (such as integer and floating point numbers): +tests if \smath{x} is less than y. +\item sets: tests if all the elements of \smath{x} are also elements of y. +\item permutations: tests if \smath{x} is less than \smath{y}; +see \axiomType{Permutation} for details. +Note: this order relation is total if and only +if the underlying domain is of category \axiomType{Finite} or \axiomType{OrderedSet}. +\item permutation groups: tests if \smath{x} is a proper subgroup of y. +\item See also \axiomType{OutputForm}. +\end{simpleList} +} + +\keydata{x\keyop{=}y}{2}{(S, S)->\$}{Equation} + {\opkey{The meaning of binary operator \smath{x = y} +depends on the value expected of the operation. +If the value is expected to be:} +\begin{simpleList} +\item a boolean: \smath{x = y} tests that \smath{x} and \smath{y} are equal. +\item an equation: \smath{x = y} creates an equation. +\item See also \axiomType{OutputForm}. +\end{simpleList} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{abelianGroup}}\opLeftPren{}{\it listOfPositiveIntegers}\opRightPren{}% +}% +}% +{1}{(List(PositiveInteger))->PermutationGroup(Integer)}{PermutationGroupExamples} +{\smath{\mbox{\bf abelianGroup}\opLeftPren{}[p_1, \allowbreak{} \ldots, p_k]\opRightPren{}} constructs the abelian +group that is the direct product of cyclic groups with order +\smath{p_i}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{absolutelyIrreducible?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FunctionFieldCategory} +{\smath{\mbox{\bf absolutelyIrreducible?}\opLeftPren{}\opRightPren{}\$F} tests if the algebraic +function field \smath{F} +remains irreducible over the algebraic closure of the ground field. +\seeType{FunctionFieldCategory} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{abs}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->R}{ComplexCategory} + {\smath{\mbox{\bf abs}\opLeftPren{}x\opRightPren{}} returns the absolute value of \smath{x}, +an element of an \axiomType{OrderedRing} or a \axiomType{Complex}, \axiomType{Quaternion}, +or \axiomType{Octonion} value. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{acos}}\opLeftPren{}{\it expression}\opRightPren{}% +\opand \mbox{\axiomFun{acosIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, \mbox{\tt "failed"})}{PartialTranscendentalFunctions} +{\opkey{Argument \smath{x} can be a \axiomType{Complex}, \axiomType{Float}, \axiomType{DoubleFloat}, or + \axiomType{Expression} value or a series.} + \newitem\smath{\mbox{\bf acos}\opLeftPren{}x\opRightPren{}} returns the arccosine of \smath{x}. + \newitem\smath{\mbox{\bf acosIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf acos}\opLeftPren{}x\opRightPren{}} if possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{acosh}}\opLeftPren{}{\it expression}\opRightPren{}% +\opand \mbox{\axiomFun{acoshIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, \mbox{\tt "failed"})}{PartialTranscendentalFunctions} +{\opkey{Argument \smath{x} can be a \axiomType{Complex}, +\axiomType{Float}, \axiomType{DoubleFloat}, or +\axiomType{Expression} value or a series. +} +\newitem\smath{\mbox{\bf acosh}\opLeftPren{}x\opRightPren{}} returns the hyperbolic arccosine of +\smath{x}. + \newitem +\smath{\mbox{\bf acoshIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf acosh}\opLeftPren{}x\opRightPren{}} if possible, and +\mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{acoth}}\opLeftPren{}{\it expression}\opRightPren{}% +\opand \mbox{\axiomFun{acothIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, \mbox{\tt "failed"})}{PartialTranscendentalFunctions} + {\opkey{Argument \smath{x} can be a \axiomType{Complex}, \axiomType{Float}, \axiomType{DoubleFloat}, or + \axiomType{Expression} value or a series. } + \newitem\smath{\mbox{\bf acoth}\opLeftPren{}x\opRightPren{}} returns the hyperbolic arccotangent of \smath{x}. + \newitem + \smath{\mbox{\bf acothIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf acoth}\opLeftPren{}x\opRightPren{}} if possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{acot}}\opLeftPren{}{\it expression}\opRightPren{}% +\opand \mbox{\axiomFun{acotIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, \mbox{\tt "failed"})}{PartialTranscendentalFunctions} + {\opkey{Argument \smath{x} can be a \axiomType{Complex}, \axiomType{Float}, \axiomType{DoubleFloat}, or + \axiomType{Expression} value or a series. } + \newitem\smath{\mbox{\bf acot}\opLeftPren{}x\opRightPren{}} returns the arccotangent of \smath{x}. + \newitem +\smath{\mbox{\bf acotIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf acot}\opLeftPren{}x\opRightPren{}} if possible, and +\mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{acsch}}\opLeftPren{}{\it expression}\opRightPren{}% +\opand \mbox{\axiomFun{acschIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, \mbox{\tt "failed"})}{PartialTranscendentalFunctions} +{\opkey{Argument \smath{x} can be a \axiomType{Complex}, +\axiomType{Float}, \axiomType{DoubleFloat}, or +\axiomType{Expression} value or a series. +} +\newitem\smath{\mbox{\bf acsch}\opLeftPren{}x\opRightPren{}} returns the hyperbolic arccosecant of +\smath{x}. + \newitem +\smath{\mbox{\bf acschIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf acsch}\opLeftPren{}x\opRightPren{}} if possible, and +\mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{acsc}}\opLeftPren{}{\it expression}\opRightPren{}% +\opand \mbox{\axiomFun{acscIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, \mbox{\tt "failed"})}{PartialTranscendentalFunctions} + {\opkey{Argument \smath{x} can be a \axiomType{Complex}, \axiomType{Float}, \axiomType{DoubleFloat}, or + \axiomType{Expression} value or a series. } + \newitem\smath{\mbox{\bf acsc}\opLeftPren{}x\opRightPren{}} returns the arccosecant of \smath{x}. + \newitem + \smath{\mbox{\bf acscIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf acsc}\opLeftPren{}x\opRightPren{}} if possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{adaptive}}\opLeftPren{}{\it \opt{boolean}}\opRightPren{}% +}% +}% +{0}{()->Boolean}{GraphicsDefaults} + {\smath{\mbox{\bf adaptive}\opLeftPren{}\opRightPren{}} tests whether plotting will be done adaptively. + \newitem + \smath{\mbox{\bf adaptive}\opLeftPren{}true\opRightPren{}} turns adaptive plotting on; \smath{\mbox{\bf adaptive}\opLeftPren{}false\opRightPren{}} turns it off. + Note: this command can be expressed by the draw option \smath{adaptive == b}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{addmod}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{3}{(\$, \$, \$)->\$}{IntegerNumberSystem} +{\smath{\mbox{\bf addmod}\opLeftPren{}a, \allowbreak{} b, \allowbreak{} p\opRightPren{}}, $0\le a, b

1$, means $a+b \mod p$. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{airyAi}}\opLeftPren{}{\it complexDoubleFloat}\opRightPren{}% +\opand \mbox{\axiomFun{airyBi}}\opLeftPren{}{\it complexDoubleFloat}\opRightPren{}% +}% +}% +{1}{(Complex(DoubleFloat))->Complex(DoubleFloat)}{DoubleFloatSpecialFunctions} +{\smath{\mbox{\bf airyAi}\opLeftPren{}x\opRightPren{}} is the Airy function ${\rm Ai}(x)$ satisfying the +differential equation +${\rm Ai}''(x) - x {\rm Ai}(x) = 0$. +\newitem + \smath{\mbox{\bf airyBi}\opLeftPren{}x\opRightPren{}} is the Airy function ${\rm Bi}(x)$ satisfying the differential equation +${\rm Bi}''(x) - x {\rm Bi}(x) = 0$. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{Aleph}}\opLeftPren{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{1}{(NonNegativeInteger)->\$}{CardinalNumber} +{\smath{\mbox{\bf Aleph}\opLeftPren{}n\opRightPren{}} provides the named (infinite) cardinal number. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{algebraic?}}\opLeftPren{}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{ExtensionField} +{\smath{\mbox{\bf algebraic?}\opLeftPren{}a\opRightPren{}} tests whether an element \smath{a} is algebraic with respect to the ground field \smath{F}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{alphabetic}}\opLeftPren{}\opRightPren{}% +\opand \mbox{\axiomFun{alphabetic?}}\opLeftPren{}{\it character}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{Character} +{\smath{\mbox{\bf alphabetic}\opLeftPren{}\opRightPren{}} returns the class of all characters +\smath{ch} for which +\smath{\mbox{\bf alphabetic?}\opLeftPren{}ch\opRightPren{}} is \smath{true}. + \newitem +\smath{\mbox{\bf alphabetic?}\opLeftPren{}ch\opRightPren{}} tests if \smath{ch} is an alphabetic +character a$\ldots$z, A$\ldots$B. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{alphanumeric}}\opLeftPren{}\opRightPren{}% +\opand \mbox{\axiomFun{alphanumeric?}}\opLeftPren{}{\it character}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{Character} +{\smath{\mbox{\bf alphanumeric}\opLeftPren{}\opRightPren{}} returns the class of all characters \smath{ch} for which +\smath{\mbox{\bf alphanumeric?}\opLeftPren{}ch\opRightPren{}} is \smath{true}. + \newitem + \smath{\mbox{\bf alphanumeric?}\opLeftPren{}ch\opRightPren{}} tests if \smath{ch} is either an alphabetic character a$\ldots$z, A$\ldots$B or digit 0$\ldots$9. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{alternating}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{ I -> SPOL RN}{}{} + {\smath{\mbox{\bf alternating}\opLeftPren{}n\opRightPren{}} is the cycle index of the + alternating group of degree \smath{n}. +See \axiomType{CycleIndicators} for details. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{alternatingGroup}}\opLeftPren{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{1}{(List(Integer))->PermutationGroup(Integer)}{PermutationGroupExamples} +{\smath{\mbox{\bf alternatingGroup}\opLeftPren{}li\opRightPren{}} constructs the alternating group +acting on the integers in the list \smath{li}. +If \smath{n} is odd, the generators are in general the +\smath{(n-2)}-cycle \smath{(li.3, \ldots, li.n)} and the +3-cycle \smath{(li.1, li.2, li.3)}. +If \smath{n} is even, the generators are the product of the 2-cycle +\smath{(li.1, li.2)} with \smath{(n-2)}-cycle +\smath{(li.3, \ldots, li.n)} and the 3-cycle \smath{(li.1, li.2, li.3)}. +Duplicates in the list will be removed. +\newitem\smath{\mbox{\bf alternatingGroup}\opLeftPren{}n\opRightPren{}} constructs the alternating +group $A_n$ acting on the integers \smath{1, \ldots, n}. +If \smath{n} is odd, the generators are in general the +\smath{(n-2)}-cycle \smath{(3, \ldots, n)} and the 3-cycle \smath{(1, 2, 3)}. +If \smath{n} is even, the generators are the product of the 2-cycle +\smath{(1, 2)} with \smath{(n-2)}-cycle \smath{(3, \ldots, n)} and the 3-cycle +\smath{(1, 2, 3)} if \smath{n} is even. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{alternative?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf alternative?}\opLeftPren{}\opRightPren{}\$F} tests if $2 \mbox{\bf associator}(a, a, b) = 0 = +2 \mbox{\bf associator}(a, b, b)$ for all \smath{a}, \smath{b} in the algebra +\smath{F}. +Note: in general, +\smath{2 a=0} does not necessarily imply \smath{a=0}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{and}}\opLeftPren{}{\it boolean}, \allowbreak{}{\it boolean}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{BitAggregate} +{\smath{x \and y} returns the logical {\it and} of two +\axiomType{BitAggregate}s \smath{x} and \smath{y}. + \newitem +\smath{b_1 \and b_2} returns the logical {\it and} of Boolean +\smath{b_1} and \smath{b_2}. +\newitem\smath{si_1 \and si_2} returns the bit-by-bit logical {\it +and} of the small integers \smath{si_1} and \smath{si_2}. +\newitem See also \axiomType{OutputForm}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{approximants}}\opLeftPren{}{\it continuedFraction}\opRightPren{}% +}% +}% +{1}{(\$)->Stream(Fraction(R))}{ContinuedFraction} +{\smath{\mbox{\bf approximants}\opLeftPren{}cf\opRightPren{}} returns the stream of approximants of the +continued fraction \smath{cf}. +If the continued fraction is finite, then the stream will be +infinite and periodic with period 1.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{approximate}}\opLeftPren{}{\it series}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(\$, Expon)->Coef}{UnivariatePowerSeriesCategory} +{\smath{\mbox{\bf approximate}\opLeftPren{}s, \allowbreak{} r\opRightPren{}} returns a truncated power series as an +expression in the coefficient domain of the power series. +For example, if \smath{R} is \axiomType{Fraction Polynomial Integer} +and \smath{s} is a series over \smath{R}, then approximate(s, r) +returns the power series \smath{s} truncated after the exponent +\smath{r} term. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{approximate}}\opLeftPren{}{\it pAdicInteger}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(\$, Integer)->Integer}{PAdicIntegerCategory} +{\smath{\mbox{\bf approximate}\opLeftPren{}x, \allowbreak{} n\opRightPren{}}, \smath{x} a p-adic integer, returns an +integer \smath{y} such that \smath{y = x \mod p^n} when \smath{n} +is positive, and 0 otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{approxNthRoot}}\opLeftPren{}{\it integer}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(I, NonNegativeInteger)->I}{IntegerRoots} +{\smath{\mbox{\bf approxNthRoot}\opLeftPren{}n, \allowbreak{} p\opRightPren{}} returns an integer approximation +\smath{i} to \smath{n^{1/p}} such that \smath{-1 < i - n^{1/p} < +1}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{approxSqrt}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{2}{(I, NonNegativeInteger)->I}{IntegerRoots} +{\smath{\mbox{\bf approxSqrt}\opLeftPren{}n\opRightPren{}} returns an integer approximation \smath{i} +to \smath{\sqrt(n)} such that \smath{-1 < i - \sqrt(n) < 1}. +A variable precision Newton iteration is used with running time +\smath{O( \log(n)^2 )}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{areEquivalent?}}\opLeftPren{}{\it listOfMatrices}, \allowbreak{}{\it listOfMatrices}\allowbreak $\,[$ , \allowbreak{}{\it randomElements?}, \allowbreak{}{\it numberOfTries}$]$\opRightPren{}% +}% +}% +{4}{(List(Matrix(R)), List(Matrix(R)), Boolean, Integer)->Matrix(R)}{RepresentationPackage2} +{\smath{\mbox{\bf areEquivalent?}\opLeftPren{}lM, \allowbreak{} lM', \allowbreak{} b, \allowbreak{} numberOfTries\opRightPren{}} tests whether the +two lists of matrices, assumed of the same square shape, can be +simultaneously conjugated by a non-singular matrix. +If these matrices represent the same group generators, the +representations are equivalent. +The algorithm tries \smath{numberOfTries} times to create elements +in the generated algebras in the same fashion. +For details, consult HyperDoc. + \newitem + \smath{\mbox{\bf areEquivalent?}\opLeftPren{}aG0, \allowbreak{} aG1, \allowbreak{} numberOfTries\opRightPren{}} calls \smath{\mbox{\bf areEquivalent?}\opLeftPren{}aG0, \allowbreak{} aG1, \allowbreak{} true, \allowbreak{} 25\opRightPren{}}. + \newitem + \smath{\mbox{\bf areEquivalent?}\opLeftPren{}aG0, \allowbreak{} aG1\opRightPren{}} calls \smath{\mbox{\bf areEquivalent?}\opLeftPren{}aG0, \allowbreak{} aG1, \allowbreak{} true, \allowbreak{} 25\opRightPren{}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{argscript}}\opLeftPren{}{\it symbol}, \allowbreak{}{\it listOfOutputForms}\opRightPren{}% +}% +}% +{2}{(\$, List(OutputForm))->\$}{Symbol} +{\smath{\mbox{\bf argscript}\opLeftPren{}f, \allowbreak{} [o_1, \allowbreak{} \ldots, o_n]\opRightPren{}} returns a new symbol with \smath{f} with scripts +\smath{o_1, \ldots, o_n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{argument}}\opLeftPren{}{\it complexExpression}\opRightPren{}% +}% +}% +{1}{(\$)->R}{ComplexCategory} +{\smath{\mbox{\bf argument}\opLeftPren{}c\opRightPren{}} returns the angle made by complex expression \smath{c} with +the positive real axis. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{arity}}\opLeftPren{}{\it basicOperator}\opRightPren{}% +}% +}% +{1}{(\$)->Union(NonNegativeInteger, \mbox{\tt "failed"})}{BasicOperator} +{\smath{\mbox{\bf arity}\opLeftPren{}op\opRightPren{}} returns \smath{n} if \smath{op} is +\smath{n}-ary, and \mbox{\tt "failed"} if \smath{op} has arbitrary arity. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{asec}}\opLeftPren{}{\it expression}\opRightPren{}% +\opand \mbox{\axiomFun{asecIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, \mbox{\tt "failed"})}{PartialTranscendentalFunctions} +{\opkey{Argument \smath{x} can be a \axiomType{Complex}, +\axiomType{Float}, \axiomType{DoubleFloat}, or +\axiomType{Expression} value or a series.} +\newitem\smath{\mbox{\bf asec}\opLeftPren{}x\opRightPren{}} returns the arcsecant of \smath{x}. +\newitem\smath{\mbox{\bf asecIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf asec}\opLeftPren{}x\opRightPren{}} if possible, +and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{asech}}\opLeftPren{}{\it expression}\opRightPren{}% +\opand \mbox{\axiomFun{asechIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, \mbox{\tt "failed"})}{PartialTranscendentalFunctions} +{\opkey{Argument \smath{x} can be a \axiomType{Complex}, +\axiomType{Float}, \axiomType{DoubleFloat}, or +\axiomType{Expression} value or a series.} +\newitem +\smath{\mbox{\bf asech}\opLeftPren{}x\opRightPren{}} returns the hyperbolic arcsecant of \smath{x}. +\newitem +\smath{\mbox{\bf asechIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf asech}\opLeftPren{}x\opRightPren{}} if possible, and +\mbox{\tt "failed"} otherwise. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{asin}}\opLeftPren{}{\it expression}\opRightPren{}% +\opand \mbox{\axiomFun{asinIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, \mbox{\tt "failed"})}{PartialTranscendentalFunctions} +{\opkey{Argument \smath{x} can be a \axiomType{Complex}, +\axiomType{Float}, \axiomType{DoubleFloat}, or +\axiomType{Expression} value or a series. +} +\newitem\smath{\mbox{\bf asin}\opLeftPren{}x\opRightPren{}} returns the arcsine of \smath{x}. +\newitem\smath{\mbox{\bf asinIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf asin}\opLeftPren{}x\opRightPren{}} if possible, +and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{asinh}}\opLeftPren{}{\it expression}\opRightPren{}% +\opand \mbox{\axiomFun{asinhIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, \mbox{\tt "failed"})}{PartialTranscendentalFunctions} +{\opkey{Argument \smath{x} can be a \axiomType{Complex}, +\axiomType{Float}, \axiomType{DoubleFloat}, or +\axiomType{Expression} value or a series. +} +\newitem\smath{\mbox{\bf asinh}\opLeftPren{}x\opRightPren{}} returns the hyperbolic arcsine of +\smath{x}. +\newitem\smath{\mbox{\bf asinhIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf asinh}\opLeftPren{}x\opRightPren{}} if +possible, and \mbox{\tt "failed"} otherwise. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{assign}}\opLeftPren{}{\it outputForm}, \allowbreak{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} + {\smath{\mbox{\bf assign}\opLeftPren{}f, \allowbreak{} g\opRightPren{}} creates an \axiomType{OutputForm} object +for the assignment \smath{f {\tt :=} g}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{associates?}}\opLeftPren{}{\it element}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Boolean}{IntegralDomain} +{\smath{\mbox{\bf associates?}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} tests whether \smath{x} and \smath{y} are associates, that is, that +\smath{x} and \smath{y} differ by a unit factor. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{associative?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf associative?}\opLeftPren{}\opRightPren{}\$F} tests if multiplication in \smath{F} is associative, where +\smath{F} is a \axiomType{FiniteRankNonAssociativeAlgebra}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{associatorDependence}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->List(Vector(R))}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf associatorDependence}\opLeftPren{}\opRightPren{}\$F} computes associator identities for +\smath{F}. \consultType{FiniteRankNonAssociativeAlgebra}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{associator}}\opLeftPren{}{\it element}, \allowbreak{}{\it element}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{3}{(\$, \$, \$)->\$}{NonAssociativeRng} + {\smath{\mbox{\bf associator}\opLeftPren{}a, \allowbreak{} b, \allowbreak{} c\opRightPren{}} returns \smath{(ab)c-a(bc)}, +where \smath{a}, \smath{b}, and \smath{c} are all members of a domain of +category \axiomType{NonAssociateRng}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{assoc}}\opLeftPren{}{\it element}, \allowbreak{}{\it associationList}\opRightPren{}% +}% +}% +{2}{(Key, \$)->Union(Record(key:Key, entry:Entry), \mbox{\tt "failed"})}{AssociationListAggregate} +{\smath{\mbox{\bf assoc}\opLeftPren{}k, \allowbreak{} al\opRightPren{}} returns the element \smath{x} in the +\axiomType{AssociationList} \smath{al} +stored under key \smath{k}, or \mbox{\tt "failed"} if no such element exists. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{atan}}\opLeftPren{}{\it expression\opt{, phase}}\opRightPren{}% + \opand \mbox{\axiomFun{atanIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{ArcTrigonometricFunctionCategory} +{\opkey{Argument \smath{x} can be a \axiomType{Complex}, +\axiomType{Float}, \axiomType{DoubleFloat}, or +\axiomType{Expression} value or a series.} +\newitem\smath{\mbox{\bf atan}\opLeftPren{}x\opRightPren{}} returns the arctangent of \smath{x}. +\newitem\smath{\mbox{\bf atan}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} computes the arc tangent from \smath{x} +with phase \smath{y}. +\newitem\smath{\mbox{\bf atanIfCan}\opLeftPren{}x\opRightPren{}} returns the \smath{\mbox{\bf atan}\opLeftPren{}x\opRightPren{}} if +possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{atanh}}\opLeftPren{}{\it expression}\opRightPren{}% +\opand \mbox{\axiomFun{atanhIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, \mbox{\tt "failed"})}{PartialTranscendentalFunctions} +{\opkey{Argument \smath{x} can be a \axiomType{Complex}, +\axiomType{Float}, \axiomType{DoubleFloat}, or +\axiomType{Expression} value or a series.} +\newitem\smath{\mbox{\bf atanh}\opLeftPren{}x\opRightPren{}} returns the hyperbolic arctangent of +\smath{x}. +\newitem\smath{\mbox{\bf atanhIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf atanh}\opLeftPren{}x\opRightPren{}} if +possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{atom?}}\opLeftPren{}{\it sExpression}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{SExpressionCategory} +{\smath{\mbox{\bf atom?}\opLeftPren{}s\opRightPren{}} tests if \smath{x} is +atomic, where \smath{x} is an \axiomType{SExpression} or \axiomType{OutputForm}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{antiCommutator}}\opLeftPren{}{\it element}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{NonAssociativeRng} + {\smath{\mbox{\bf antiCommutator}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} returns \smath{x y + y x}, +where \smath{x} and \smath{y} are elements of a non-associative ring, +possibly without identity. \seeType{NonAssociativeRng}} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{antisymmetric?}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{MatrixCategory} +{\smath{\mbox{\bf antisymmetric?}\opLeftPren{}m\opRightPren{}} tests if the matrix \smath{m} is square +and antisymmetric, that is, \smath{m_{i, j} = -m_{j, i}} for all +\smath{i} and \smath{j}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{antisymmetricTensors}}\opLeftPren{}{\it matrices}, \allowbreak{}{\it positiveInteger}\opRightPren{}% +}% +}% +{2}{(List(Matrix(R)), PositiveInteger)->List(Matrix(R))}{RepresentationPackage1} + {\smath{\mbox{\bf antisymmetricTensors}\opLeftPren{}A, \allowbreak{} n\opRightPren{}}, +where \smath{A} is an \smath{m} by \smath{m} matrix, +returns a matrix obtained by applying to \smath{A} +the irreducible, polynomial representation of the +general linear group \smath{GL_m} corresponding to the +partition \smath{(1, 1, \ldots, 1, 0, 0, \ldots, 0)} of \smath{n}. +A call to \spadfun{error} occurs if \smath{n} is greater than \smath{m}. +Note: this corresponds to the symmetrization of the representation +with the sign +representation of the symmetric group \smath{S_n}. +The carrier spaces of the representation are the antisymmetric +tensors of the \smath{n}-fold tensor product. + \newitem\smath{\mbox{\bf antisymmetricTensors}\opLeftPren{}lA, \allowbreak{} n\opRightPren{}}, +where \smath{lA} is a list of \smath{m} by \smath{m} matrices, +similarly applies the representation of \smath{GL_m} to each matrix \smath{A} +of \smath{lA}, returning a list of matrices. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{any?}}\opLeftPren{}{\it predicate}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{((S)->Boolean, \$)->Boolean}{HomogeneousAggregate} +{\smath{\mbox{\bf any?}\opLeftPren{}pred, \allowbreak{} a\opRightPren{}} tests if predicate \smath{\mbox{\bf pred}\opLeftPren{}x\opRightPren{}} is \smath{true} for any element \smath{x} of aggregate \smath{a}. Note: for collections, \code{any?(p, u) = reduce(or, map(p, u), false, true)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{any}}\opLeftPren{}{\it type}, \allowbreak{}{\it object}\opRightPren{}% +}% +}% +{2}{(SExpression, None)->\$}{Any} +{\smath{\mbox{\bf any}\opLeftPren{}type, \allowbreak{} object\opRightPren{}} is a technical function for creating an \smath{object} of \axiomType{Any}. Argument \smath{type} is a \spadgloss{LISP} form for the \smath{type} of \smath{object}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{append}}\opLeftPren{}{\it list}, \allowbreak{}{\it list}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{List} +{\smath{\mbox{\bf append}\opLeftPren{}l_1, \allowbreak{} l_2\opRightPren{}} appends the elements of list \smath{l_1} +onto the front of +list \smath{l_2}. +See also \spadfun{concat}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{axesColorDefault}}\opLeftPren{}{\it \opt{palette}}\opRightPren{}% +}% +}% +{0}{()->Palette}{ViewDefaultsPackage} +{\smath{\mbox{\bf axesColorDefault}\opLeftPren{}p\opRightPren{}} sets the default color of the axes in a \twodim{} viewport to the palette \smath{p}. + \newitem + \smath{\mbox{\bf axesColorDefault}\opLeftPren{}\opRightPren{}} returns the default color of the axes in a \twodim{} viewport. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{back}}\opLeftPren{}{\it queue}\opRightPren{}% +}% +}% +{1}{(\$)->S}{QueueAggregate} +{\smath{\mbox{\bf back}\opLeftPren{}q\opRightPren{}} returns the element at the back of the queue, or calls +\spadfun{error} if \smath{q} is empty. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{bag}}\opLeftPren{}{\it \opt{bag}}\opRightPren{}% +}% +}% +{0}{()->\$}{BagAggregate} +{\smath{\mbox{\bf bag}\opLeftPren{}\colx{x}{y}{z}\opRightPren{}} creates a bag with elements \smath{x}, \smath{y}, $\ldots$, \smath{z}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{balancedBinaryTree}}\opLeftPren{}{\it nonNegativeInteger}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{0}{()->\$}{BagAggregate} + {\smath{\mbox{\bf balancedBinaryTree}\opLeftPren{}n, \allowbreak{} s\opRightPren{}} creates a balanced binary tree with +\smath{n} nodes, each with value \smath{s}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{base}}\opLeftPren{}{\it group}\opRightPren{}% +}% +}% +{0}{()->PositiveInteger}{FloatingPointSystem} +{\smath{\mbox{\bf base}\opLeftPren{}gp\opRightPren{}} returns a base for the group {\it gp}. \consultType{PermutationGroup} +} +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{basis}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Vector(\$)}{FiniteAlgebraicExtensionField} +{\smath{\mbox{\bf basis}\opLeftPren{}\opRightPren{}\$R} returns a fixed basis of \smath{R} +or a subspace of \smath{R}. +See \axiomType{FiniteAlgebraicExtensionField}, +\axiomType{FramedAlgebra}, +\axiomType{FramedNonAssociativeAlgebra} using HyperDoc for details. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{basisOfCenter}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->List(A)}{AlgebraPackage} +{\smath{\mbox{\bf basisOfCenter}\opLeftPren{}\opRightPren{}\$R} returns a basis of the space of all +\smath{x} in \smath{R} satisfying \smath{\mbox{\bf commutator}\opLeftPren{}x, a) = 0} and +\smath{\mbox{\bf associator}\opLeftPren{}x, \allowbreak{} a, \allowbreak{} b\opRightPren{}} = \smath{\mbox{\bf associator}\opLeftPren{}a, \allowbreak{} x, \allowbreak{} b\opRightPren{}} = \smath{\mbox{\bf associator}\opLeftPren{}a, \allowbreak{} b, \allowbreak{} x\opRightPren{}} = +0 for all \smath{a}, \smath{b} in \smath{R}. +Domain \smath{R} is a domain of category +\axiomType{FramedNonAssociativeAlgebra}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{basisOfCentroid}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->List(Matrix(R))}{AlgebraPackage} +{\smath{\mbox{\bf basisOfCentroid}\opLeftPren{}\opRightPren{}\$R} returns a basis of the centroid of +\smath{R}, that is, the endomorphism ring of \smath{R} considered as +\smath{(R, R)}-bimodule. +Domain \smath{R} is a domain of category +\axiomType{FramedNonAssociativeAlgebra}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{basisOfCommutingElements}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->List(A)}{AlgebraPackage} +{\smath{\mbox{\bf basisOfCommutingElements}\opLeftPren{}\opRightPren{}\$R} returns a basis of the space +of all \smath{x} of \smath{R} satisfying \smath{\mbox{\bf commutator}\opLeftPren{}x, \allowbreak{} a\opRightPren{}} = 0 +for all \smath{a} in \smath{R}. +Domain \smath{R} is a domain of category +\axiomType{FramedNonAssociativeAlgebra}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{basisOfLeftAnnihilator}}\opLeftPren{}{\it element}\opRightPren{}% + \opand \mbox{\axiomFun{basisOfRightAnnihilator}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(A)->List(A)}{AlgebraPackage} +{\opkey{These operations return a basis of the space of all +\smath{x} in \smath{R} of category +\axiomType{FramedNonAssociativeAlgebra}, satisfying} +\begin{simpleList} +\item\smath{\mbox{\bf basisOfLeftAnnihilator}\opLeftPren{}a\opRightPren{}}: \smath{0 = xa}. +\item\smath{\mbox{\bf basisOfRightAnnihilator}\opLeftPren{}a\opRightPren{}}: \smath{0 = ax}. +\end{simpleList} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{basisOfNucleus}}\opLeftPren{}\opRightPren{}% + \optand \mbox{\axiomFun{basisOfLeftNucleus}}\opLeftPren{}\opRightPren{}% + \optand \mbox{\axiomFun{basisOfMiddleNucleus}}\opLeftPren{}\opRightPren{}% + \opand \mbox{\axiomFun{basisOfRightNucleus}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->List(A)}{AlgebraPackage} +{\opkey{Each operation returns a basis of the space of all +\smath{x} of \smath{R}, a domain of category +\axiomType{FramedNonAssociativeAlgebra}, satisfying for all +\smath{a} and \smath{b}:} +\begin{simpleList} +\item \smath{\mbox{\bf basisOfNucleus}\opLeftPren{}\opRightPren{}\$R}: +\smath{\mbox{\bf associator}\opLeftPren{}x, \allowbreak{} a, \allowbreak{} b\opRightPren{}} = \smath{\mbox{\bf associator}\opLeftPren{}a, \allowbreak{} x, \allowbreak{} b\opRightPren{}} += \smath{\mbox{\bf associator}\opLeftPren{}a, \allowbreak{} b, \allowbreak{} x\opRightPren{}} = 0; +\item \smath{\mbox{\bf basisOfLeftNucleus}\opLeftPren{}\opRightPren{}\$R}: \smath{\mbox{\bf associator}\opLeftPren{}x, \allowbreak{} a, \allowbreak{} b\opRightPren{}} = 0; +\item \smath{\mbox{\bf basisOfMiddleNucleus}\opLeftPren{}\opRightPren{}\$R}: \smath{\mbox{\bf associator}\opLeftPren{}a, \allowbreak{} x, \allowbreak{} b\opRightPren{}} = 0; +\item \smath{\mbox{\bf basisOfRightNucleus}\opLeftPren{}\opRightPren{}\$R}: \smath{\mbox{\bf associator}\opLeftPren{}a, \allowbreak{} b, \allowbreak{} x\opRightPren{}} = 0. +\end{simpleList} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{basisOfLeftNucloid}}\opLeftPren{}\opRightPren{}% + \opand \mbox{\axiomFun{basisOfRightNucloid}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->List(Matrix(R))}{AlgebraPackage} +{\opkey{Each operation returns a basis of the space of +endomorphisms of \smath{R}, a domain of category +\axiomType{FramedNonAssociativeAlgebra}, considered as:} +\begin{simpleList} + \item\smath{\mbox{\bf basisOfLeftNucloid}\opLeftPren{}\opRightPren{}}: a right module. + \item\smath{\mbox{\bf basisOfRightNucloid}\opLeftPren{}\opRightPren{}}: a left module. +\end{simpleList} +Note: if \smath{R} has a unit, the left and right nucloid coincide with +the left and right nucleus. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{belong?}}\opLeftPren{}{\it operator}\opRightPren{}% +}% +}% +{1}{(BasicOperator)->Boolean}{ExpressionSpace} +{\smath{\mbox{\bf belong?}\opLeftPren{}op\opRightPren{}\$R} tests if \smath{op} is known as an +operator to \smath{R}. +For example, \smath{R} is an \axiomType{Expression} domain or +\axiomType{AlgebraicNumber}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{bernoulli}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(Integer)->Fraction(Integer)}{IntegerNumberTheoryFunctions} +{\smath{\mbox{\bf bernoulli}\opLeftPren{}n\opRightPren{}} returns the \eth{\smath{n}} Bernoulli +number, that is, \smath{B(n, 0)} where \smath{B(n, x)} is the +\eth{\smath{n}} Bernoulli polynomial. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{besselI}}\opLeftPren{}{\it complexDoubleFloat}, \allowbreak{}{\it complexDoubleFloat}\opRightPren{}% +\optand \mbox{\axiomFun{besselJ}}\opLeftPren{}{\it complexDoubleFloat}, \allowbreak{}{\it complexDoubleFloat}\opRightPren{}% +\optand \mbox{\axiomFun{besselK}}\opLeftPren{}{\it complexDoubleFloat}, \allowbreak{}{\it complexDoubleFloat}\opRightPren{}% +\opand \mbox{\axiomFun{besselY}}\opLeftPren{}{\it complexDoubleFloat}, \allowbreak{}{\it complexDoubleFloat}\opRightPren{}% +}% +}% +{2}{(Complex(DoubleFloat), Complex(DoubleFloat))->Complex(DoubleFloat)}{DoubleFloatSpecialFunctions} +{\smath{\mbox{\bf besselI}\opLeftPren{}v, \allowbreak{} x\opRightPren{}} is the modified Bessel function of the first +kind, \smath{I(v, x)}, satisfying the differential equation +\smath{x^2 {w''(x)} + x w'(x) - (x^2+v^2)w(x) = 0}. +\bigitem\smath{\mbox{\bf besselJ}\opLeftPren{}v, \allowbreak{} x\opRightPren{}} is the Bessel function of the second +kind, \smath{J(v, x)}, +satisfying the differential equation \smath{x^2 {w''(x)} + x w'(x) ++ (x^2-v^2)w(x) = 0}. +\bigitem\smath{\mbox{\bf besselK}\opLeftPren{}v, \allowbreak{} x\opRightPren{}} is the modified Bessel function of +the first kind, \smath{K(v, x)}, +satisfying the differential equation \smath{x^2 {w''(x)} + x w'(x) +- (x^2+v^2)w(x) = 0}. +Note: The default implementation uses the relation +\smath{K(v, x) = \pi/2(I(-v, x) - I(v, x))/\sin(v \pi)} +so is not valid for integer values of \smath{v}. +\bigitem\smath{\mbox{\bf besselY}\opLeftPren{}v, \allowbreak{} x\opRightPren{}} is the Bessel function of the second +kind, \smath{Y(v, x)}, +satisfying the differential equation \smath{x^2 {w''(x)} + x w'(x) ++ (x^2-v^2)w(x) = 0}. +Note: The default implementation uses the relation \smath{Y(v, x) = +(J(v, x) \cos(v \pi) - J(-v, x))/\sin(v \pi)} so is not valid for +integer values of \smath{v}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{Beta}}\opLeftPren{}{\it complexDoubleFloat}, \allowbreak{}{\it complexDoubleFloat}\opRightPren{}% +}% +}% +{2}{(Complex(DoubleFloat), Complex(DoubleFloat))->Complex(DoubleFloat)}{DoubleFloatSpecialFunctions} +{\smath{\mbox{\bf Beta}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} is the Euler beta function, \smath{B(x, y)}, defined by +\smath{\mbox{\bf Beta}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} $\int_0^1{t^{x-1}(1-t)^{y-1} dt}$. +Note: this function is defined by +\smath{\mbox{\bf Beta}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} $= {{\Gamma(x)\Gamma(y)} \over {\Gamma(x + y)}}$. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{binaryTournament}}\opLeftPren{}{\it listOfElements}\opRightPren{}% +}% +}% +{1}{(Fraction(Integer))->\$}{BinaryExpansion} +{\smath{\mbox{\bf binaryTournament}\opLeftPren{}ls\opRightPren{}} creates a +\axiomType{BinaryTournament} tree with the + elements of \smath{ls} as values at the nodes. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{binaryTree}}\opLeftPren{}{\it value}\opRightPren{}% +}% +}% +{1}{(Fraction(Integer))->\$}{BinaryExpansion} + {\smath{\mbox{\bf binaryTree}\opLeftPren{}x\opRightPren{}} creates a binary tree +consisting of one node for which the \spadfunFrom{value}{BinaryTree} is \smath{x} and +the \spadfun{left} and \spadfun{right} subtrees are empty. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{binary}}\opLeftPren{}{\it various}\opRightPren{}% +}% +}% +{1}{(Fraction(Integer))->\$}{BinaryExpansion} +{\smath{\mbox{\bf binary}\opLeftPren{}rn\opRightPren{}} converts rational number \smath{rn} to a binary expansion. + \newitem + \smath{\mbox{\bf binary}\opLeftPren{}op, \allowbreak{} [a_1, \allowbreak{} \ldots, a_n]\opRightPren{}} returns the input form + corresponding to \smath{a_1 {\rm op} \ldots op a_n}, where + \smath{op} and the \smath{a_i}'s are of type \axiomType{InputForm}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{binomial}}\opLeftPren{}{\it integerNumber}, \allowbreak{}{\it integerNumber}\opRightPren{}% +}% +}% +{2}{(I, I)->I}{IntegerCombinatoricFunctions} +{\smath{\mbox{\bf binomial}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} returns the binomial coefficient +\smath{C(x, y) = x!/(y! +(x-y)!)}, where \texht{$x \geq y \geq 0$}{x >= y >= 0}, +the number of combinations of \smath{x} objects taken +\smath{y} at a time. +Arguments \smath{x} and \smath{y} can come from any +\axiomType{Expression} or \axiomType{IntegerNumberSystem} domain. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{bipolar}}\opLeftPren{}{\it x}\opRightPren{}% + \opand \mbox{\axiomFun{bipolarCylindrical}}\opLeftPren{}{\it x}\opRightPren{}% +}% +}% +{1}{(R)->(Point(R))->Point(R)}{CoordinateSystems} +{\smath{\mbox{\bf bipolar}\opLeftPren{}a\opRightPren{}} returns a function for transforming bipolar +coordinates to +Cartesian coordinates; this function maps the +point \smath{(u, v)} to \smath{(x = a \sinh(v)/(\cosh(v)-\cos(u)), +y = a \sin(u)/(\cosh(v)-\cos(u)))}. + \newitem\smath{\mbox{\bf bipolarCylindrical}\opLeftPren{}a\opRightPren{}} returns a function for transforming +bipolar cylindrical coordinates to Cartesian coordinates; this function +maps the point \smath{(u, v, z)} to +\smath{(x = a \sinh(v)/(\cosh(v)-\cos(u)), y = a +\sin(u)/(\cosh(v)-\cos(u)), z)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{biRank}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(A)->NonNegativeInteger}{AlgebraPackage} + {\smath{\mbox{\bf biRank}\opLeftPren{}x\opRightPren{}\$R}, +where \smath{R} is a domain of +category \axiomType{FramedNonAssociativeAlgebra}, +returns the number of linearly independent elements +among \smath{x}, \smath{x b_i}, \smath{b_i x}, \smath{b_i x b_j}, \smath{i, j=1, \ldots, n}, +where \smath{b=[b_1, \ldots, b_n]} is the fixed basis for \smath{R}. +Note: if \smath{R} has a unit, then +\spadfunFrom{doubleRank}{AlgebraPackage}, +\spadfunFrom{weakBiRank}{AlgebraPackage} +and \spadfunFrom{biRank}{AlgebraPackage} coincide. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{bit?}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Boolean}{IntegerNumberSystem} +{\smath{\mbox{\bf bit?}\opLeftPren{}i, \allowbreak{} n\opRightPren{}} tests if the \eth{\smath{n}} bit of \smath{i} is a 1. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{bits}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->PositiveInteger}{FloatingPointSystem} +{\smath{\mbox{\bf bits}\opLeftPren{}\opRightPren{}} returns the precision of floats in +bits. Also see \spadfun{precision}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{blankSeparate}}\opLeftPren{}{\it listOfOutputForms}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf blankSeparate}\opLeftPren{}lo\opRightPren{}}, +where {\it lo} is a list of objects of type \axiomType{OutputForm} +(normally unexposed), +returns a single output form consisting of the elements +of {\it lo} separated by blanks. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{blue}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{Color}{\smath{\mbox{\bf blue}\opLeftPren{}\opRightPren{}} returns the +position of the blue hue from total hues.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{bottom!}}\opLeftPren{}{\it dequeue}\opRightPren{}% +}% +}% +{1}{(\$)->S}{DequeueAggregate} +{\smath{\mbox{\bf bottom!}\opLeftPren{}q\opRightPren{}} removes then returns the element at the bottom +(back) of the dequeue q. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{box}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(List(\$))->\$}{ExpressionSpace} +{\smath{\mbox{\bf box}\opLeftPren{}e\opRightPren{}}, where \smath{e} is an expression, returns +\smath{e} with a box around it that prevents \smath{e} from being +evaluated when operators are applied to it. +For example, \smath{\mbox{\bf log}\opLeftPren{}1\opRightPren{}} returns \smath{0}, but +\smath{\mbox{\bf log}\opLeftPren{}{\mbox{\bf box}}(1)\opRightPren{}} returns the formal kernel +\smath{\mbox{\bf log}\opLeftPren{}1\opRightPren{}}. +\newitem +\smath{\mbox{\bf box}\opLeftPren{}f_1, \allowbreak{} \ldots, f_n\opRightPren{}}, where the \smath{f_i} are +expressions, returns \smath{(f_1, \ldots, f_n)} with a box around +them that prevents the \smath{f_i} from being evaluated when +operators are applied to them, and makes them applicable to a +unary operator. +For example, \smath{\mbox{\bf atan}\opLeftPren{}{\mbox {\bf box}} [x, \allowbreak{} 2]\opRightPren{}} returns the +formal kernel \smath{\mbox{\bf atan}\opLeftPren{}x, \allowbreak{} 2\opRightPren{}}. +\newitem\smath{\mbox{\bf box}\opLeftPren{}o\opRightPren{}}, where \smath{o} is an object of type +\axiomType{OutputForm} (normally unexposed), returns an output +form enclosing \smath{o} in a box. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{brace}}\opLeftPren{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} + {\smath{\mbox{\bf brace}\opLeftPren{}o\opRightPren{}}, +where \smath{o} is an object of type \axiomType{OutputForm} +(normally unexposed), +returns an output form enclosing \smath{o} in braces. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{bracket}}\opLeftPren{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf bracket}\opLeftPren{}o\opRightPren{}}, where \smath{o} is an object of type +\axiomType{OutputForm} (normally unexposed), returns an output +form enclosing \smath{o} in brackets. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{branchPoint}}\opLeftPren{}{\it element}\opRightPren{}% + \opand \mbox{\axiomFun{branchPointAtInfinity?}}\opLeftPren{}\opRightPren{}% +}% +}% +{1}{(F)->Boolean}{FunctionFieldCategory} +{\smath{\mbox{\bf branchPoint?}\opLeftPren{}a\opRightPren{}\$F} tests if \smath{x = a} is a branch +point of the algebraic function field \smath{F}. +\newitem\smath{\mbox{\bf branchPointAtInfinity?}\opLeftPren{}\opRightPren{}\$F} tests if the +algebraic function field \smath{F} has a branch point at infinity. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{bright}}\opLeftPren{}{\it color}\opRightPren{}% +}% +}% +{1}{(Color)->\$}{Palette} +{\smath{\mbox{\bf bright}\opLeftPren{}c\opRightPren{}} sets the shade of a hue, \smath{c}, above dim +but below pastel. +\newitem +\smath{\mbox{\bf bright}\opLeftPren{}ls\opRightPren{}} sets the font property of a list of +strings \smath{ls} to bold-face type. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cap}}\opLeftPren{}{\it symmetricPolynomial}, \allowbreak{}{\it symmetricPolynomial}\opRightPren{}% +}% +}% +{ (SPOL RN, SPOL RN) -> RN}{}{} +{\smath{\mbox{\bf cap}\opLeftPren{}s_1, \allowbreak{} s_2\opRightPren{}}, introduced by Redfield, is the scalar +product of two cycle indices, where the \smath{s_i} are +\spadtype{SymmetricPolynomial}s with rational number coefficients. +See also \spadfun{cup}. See \spadtype{CycleIndicators} for details. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cardinality}}\opLeftPren{}{\it finiteSetAggregate}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{FiniteSetAggregate} +{\smath{\mbox{\bf cardinality}\opLeftPren{}u\opRightPren{}} returns the number of elements of +\smath{u}. +Note: \code{cardinality(u) = \#u}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{car}}\opLeftPren{}{\it sExpression}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{SExpressionCategory} +{\smath{\mbox{\bf car}\opLeftPren{}se\opRightPren{}} returns \smath{a_1} when \smath{se} is the +\axiomType{SExpression} object \smath{(a_1, \ldots, a_n)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cdr}}\opLeftPren{}{\it sExpression}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{SExpressionCategory} +{\smath{\mbox{\bf cdr}\opLeftPren{}se\opRightPren{}} returns \smath{(a_2, \ldots, a_n)} when \smath{se} +is the \axiomType{SExpression} object \smath{(a_1, \ldots, a_n)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{ceiling}}\opLeftPren{}{\it floatOrRationalNumber}\opRightPren{}% +}% +}% +{1}{(\$)->D}{QuotientFieldCategory} +{\opkey {Argument \smath{x} is a floating point number or fraction +of numbers.} +\newitem\smath{\mbox{\bf ceiling}\opLeftPren{}x\opRightPren{}} returns the smallest integral element +above \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{center}}\opLeftPren{}{\it stringsOrSeries}\opRightPren{}% +}% +}% +{1}{(\$)->Coef}{UnivariatePowerSeriesCategory} +{\smath{\mbox{\bf center}\opLeftPren{}s\opRightPren{}} returns the point about which the series +\smath{s} is expanded. +\newitem\smath{\mbox{\bf center}\opLeftPren{}ls, \allowbreak{} n, \allowbreak{} s\opRightPren{}} takes a list of strings \smath{ls}, +and centers them within a list of strings which is \smath{n} +characters long. +The remaining spaces are filled with strings composed of as many +repetitions as possible of the last string parameter \smath{s}. +\newitem\smath{\mbox{\bf center}\opLeftPren{}s_1, \allowbreak{} n, \allowbreak{} s_2\opRightPren{}} is equivalent to +\smath{\mbox{\bf center}\opLeftPren{}[ s_1], n, s_2\opRightPren{}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{char}}\opLeftPren{}{\it character}\opRightPren{}% +}% +}% +{1}{(Integer)->\$}{Character} +{\smath{\mbox{\bf char}\opLeftPren{}i\opRightPren{}} returns a \spadtype{Character} object with +integer code \smath{i}. +Note: {\bf ord(char({\it i})) \rm = \it i}. +\newitem +\smath{\mbox{\bf char}\opLeftPren{}s\opRightPren{}} returns the unique character of a string +\smath{s} of length one. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{characteristic}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->NonNegativeInteger}{NaiveRingInternalUseOnly} +{\smath{\mbox{\bf characteristic}\opLeftPren{}\opRightPren{}\$R} returns the characteristic of ring +\smath{R}: the smallest positive integer \smath{n} such that +\smath{nx=0} for all \smath{x} in the ring, or zero if no such +\smath{n} exists. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{characteristicPolynomial}}\opLeftPren{}{\it matrix\opt{, symbol}}\opRightPren{}% +}% +}% +{1}{(\$)->UP}{FiniteRankAlgebra} +{\smath{\mbox{\bf characteristicPolynomial}\opLeftPren{}a\opRightPren{}} returns the characteristic +polynomial of the regular representation of \smath{a} with respect +to any basis. +\newitem +\smath{\mbox{\bf characteristicPolynomial}\opLeftPren{}m\opRightPren{}} returns the +characteristic polynomial of the matrix \smath{m} expressed as +polynomial with a new symbol as variable. +\newitem +\smath{\mbox{\bf characteristicPolynomial}\opLeftPren{}m, \allowbreak{} sy\opRightPren{}} is similar except +that the resulting polynomial has variable \smath{sy}. +\newitem +\smath{\mbox{\bf characteristicPolynomial}\opLeftPren{}m, \allowbreak{} r\opRightPren{}}, where \smath{r} is +a member of the coefficient domain of matrix \smath{m}, evaluates +the characteristic polynomial at \smath{r}. +In particular, if \smath{r} is the polynomial \smath{'x}, then it +returns the characteristic polynomial expressed as a polynomial in +\smath{'x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{charClass}}\opLeftPren{}{\it strings}\opRightPren{}% +}% +}% +{1}{(List(Character))->\$}{CharacterClass} +{\smath{\mbox{\bf charClass}\opLeftPren{}s\opRightPren{}} creates a character class containing exactly +the characters given in the string \smath{s}. +\newitem +\smath{\mbox{\bf charClass}\opLeftPren{}ls\opRightPren{}} creates a character class which contains +exactly the characters given in the list \smath{ls} of strings. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{charthRoot}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Union(\$, "failed")}{PolynomialFactorizationExplicit} +{\smath{\mbox{\bf charthRoot}\opLeftPren{}r\opRightPren{}}, +where \smath{r} is an element of domain with \spadfun{characteristic} +$p \not= 0$, returns the \eth{\smath{p}} root of \smath{r}, or \mbox{\tt "failed"} if none exists in the domain. +\newitem\smath{\mbox{\bf charthRoot}\opLeftPren{}f\opRightPren{}\$R} takes the \eth{\smath{p}} root of finite field element \smath{f}, +where \smath{p} is the characteristic of the finite field \smath{R}. +Note: such a root is always defined in finite fields. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{chebyshevT}}\opLeftPren{}{\it positiveInteger}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(NonNegativeInteger, R)->R}{OrthogonalPolynomialFunctions} +{\smath{\mbox{\bf chebyshevT}\opLeftPren{}n, \allowbreak{} x\opRightPren{}} returns the \eth{\smath{n}} Chebyshev polynomial of the +first kind, \smath{T_n(x)}, defined by +\smath{(1-tx)/(1-2tx+t^2) = \sum\nolimits_{n=0}^\infty {T_n(x)\, t^n}}. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{children}}\opLeftPren{}{\it recursiveAggregate}\opRightPren{}% +}% +}% +{1}{(\$)->List(\$)}{RecursiveAggregate} +{\smath{\mbox{\bf children}\opLeftPren{}u\opRightPren{}} +returns a list of the children of aggregate \smath{u}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{chineseRemainder}}\opLeftPren{}{\it listOfElements}, \allowbreak{}{\it listOfModuli}\opRightPren{}% +\opand \mbox{\axiomFun{chineseRemainder}}\opLeftPren{}{\it integer}, \allowbreak{}{\it modulus}, \allowbreak{}{\it integer}, \allowbreak{}{\it modulus}\opRightPren{}% +}% +}% +{4}{(Integer, Integer, Integer, Integer)->Integer}{IntegerNumberTheoryFunctions} +{\smath{\mbox{\bf chineseRemainder}\opLeftPren{}lv, \allowbreak{} lm\opRightPren{}} where \smath{lv} is a list of +values \smath{[v_1, \ldots, v_n]} and \smath{lm} is a list of moduli +\smath{[m_1, \ldots, m_n]}, returns \smath{m} such that \smath{m = +n_i \bmod p_i}; the \smath{p_i} must be relatively prime. +\newitem\smath{\mbox{\bf chineseRemainder}\opLeftPren{}n_1, \allowbreak{} p_1, \allowbreak{} n_2, \allowbreak{} p_2\opRightPren{}} is equivalent to +\smath{\mbox{\bf chineseRemainder}\opLeftPren{}[n_1, \allowbreak{} n_2], \allowbreak{} [p_1, \allowbreak{} p_2]\opRightPren{}}, where all arguments +are integers. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{clearDenominator}}\opLeftPren{}{\it fraction}\opRightPren{}% +}% +}% +{1}{(A)->A}{CommonDenominator} +{\smath{\mbox{\bf clearDenominator}\opLeftPren{}\col{q_1}{q_n}\opRightPren{}} returns \smath{\col{p_1}{p_n}} +such that \smath{q_i = p_i/d} where \smath{d} is a common denominator for the \smath{q_i}'s. +\newitem\smath{\mbox{\bf clearDenominator}\opLeftPren{}A\opRightPren{}}, where \smath{A} is a matrix of fractions, +returns matrix \smath{B} such that \smath{A = B/d} where \smath{d} is a +common denominator for the elements of \smath{A}. +\newitem\smath{\mbox{\bf clearDenominator}\opLeftPren{}p\opRightPren{}} returns polynomial \smath{q} such that \smath{p = q/d} where \smath{d} is a common denominator for the coefficients of polynomial \smath{p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{clip}}\opLeftPren{}{\it rangeOrBoolean}\opRightPren{}% +}% +}% +{1}{(Boolean)->\$}{DrawOption} +{\smath{\mbox{\bf clip}\opLeftPren{}b\opRightPren{}} turns \twodim{} clipping on if \smath{b} is \smath{true}, and off if \smath{b} +is \smath{false}. \sayOption{clip}{b} +\newitem +\smath{\mbox{\bf clip}\opLeftPren{}[ a..b]\opRightPren{}} defines the range for user-defined clipping. +\sayOption{range}{[ a..b]} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{clipPointsDefault}}\opLeftPren{}{\it \opt{boolean}}\opRightPren{}% +}% +}% +{0}{()->Boolean}{GraphicsDefaults} +{\smath{\mbox{\bf clipPointsDefault}\opLeftPren{}\opRightPren{}} tests if automatic clipping is to be done. +\newitem\smath{\mbox{\bf clipPointsDefault}\opLeftPren{}b\opRightPren{}} turns on automatic clipping for \smath{b=true}, and +off if \smath{b=false}. \sayOption{clip}{b} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{close}}\opLeftPren{}{\it filename}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{FileCategory} +{\smath{\mbox{\bf close}\opLeftPren{}v\opRightPren{}} closes the viewport window of the given \twodim{} or +\threedim{} viewport \smath{v} and terminates the corresponding \Unix{} process. +Argument \smath{v} is a member of domain +\spadtype{TwoDimensionalViewport} or +\spadtype{ThreeDimensionalViewport}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{close!}}\opLeftPren{}{\it filename}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{FileCategory} +{\smath{\mbox{\bf close!}\opLeftPren{}fn\opRightPren{}} returns the file \smath{fn} closed to input and output.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{closedCurve?}}\opLeftPren{}{\it threeSpace}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{ThreeSpace} +{\smath{\mbox{\bf closedCurve?}\opLeftPren{}sp\opRightPren{}} tests if the \spadtype{ThreeSpace} object +\smath{sp} contains a single closed curve component. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{closedCurve}}\opLeftPren{}{\it listsOfPoints\opt{, listOfPoints}}\opRightPren{}% +}% +}% +{1}{(List(Point(R)))->\$}{ThreeSpace} +{\smath{\mbox{\bf closedCurve}\opLeftPren{}lpt\opRightPren{}} returns a \spadtype{ThreeSpace} object +containing a single closed curve described by the list of points \smath{lpt} of the form +$[ p_0, p_1, \ldots, p_n, p_0]$. +\newitem\smath{\mbox{\bf closedCurve}\opLeftPren{}sp\opRightPren{}} returns a closed curve as a list of points, where +\smath{sp} must be a \spadtype{ThreeSpace} object containing +a single closed curve. +\newitem\smath{\mbox{\bf closedCurve}\opLeftPren{}sp, \allowbreak{} lpt\opRightPren{}} returns \spadtype{ThreeSpace} object with +the closed curve denoted by \smath{lpt} added. Argument \smath{lpt} is a list of points +of the form $[ p_0, p_1, \ldots, p_n, p_0]$. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{coefficient}}\opLeftPren{}{\it polynomialOrSeries}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(\$, E)->R}{AbelianMonoidRing} +{\smath{\mbox{\bf coefficient}\opLeftPren{}p, \allowbreak{} n\opRightPren{}} extracts the coefficient of the monomial with exponent \smath{n} from polynomial \smath{p}, or returns zero if exponent is not present. +\newitem\smath{\mbox{\bf coefficient}\opLeftPren{}u, \allowbreak{} x, \allowbreak{} n\opRightPren{}} returns the coefficient of variable \smath{x} to the power +\smath{n} in \smath{u}, a multivariate polynomial or series. +\newitem\smath{\mbox{\bf coefficient}\opLeftPren{}u, \allowbreak{} \col{x_1}{x_k}, \col{n_1}{n_k}\opRightPren{}} +returns the coefficient of \smath{x_1^{n_1} \cdots x_k^{n_k}} in \smath{u}, +a multivariate series or polynomial. +\newitem Also defined for domain \spadtype{CliffordAlgebra} and categories +\spadtype{AbelianMonoidRing}, +\spadtype{FreeAbelianCategory}, +and \spadtype{MonogenicLinearOperator}. +\newitem +{\smath{\mbox{\bf coefficient}\opLeftPren{}s, \allowbreak{} n\opRightPren{}} returns the terms of total degree \smath{n} of series +\smath{s} as a polynomial. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{coefficients}}\opLeftPren{}{\it polynomialOrStream}\opRightPren{}% +}% +}% +{1}{(\$)->List(R)}{FiniteAbelianMonoidRing} +{\smath{\mbox{\bf coefficients}\opLeftPren{}p\opRightPren{}} returns the list of non-zero coefficients of polynomial \smath{p} +starting with the coefficient of the maximum degree. +\newitem\smath{\mbox{\bf coefficients}\opLeftPren{}s\opRightPren{}} returns a stream of coefficients \smath{[ a_0, a_1, a_2, \ldots]} +for the stream \smath{s}: +\smath{a_0 + a_1 x + a_2 x^2 + \cdots}. +Note: the entries of the stream may be zero.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{coerceImages}}\opLeftPren{}{\it listOfElements}\opRightPren{}% +}% +}% +{1}{(List(S))->\$}{Permutation} +{\smath{\mbox{\bf coerceImages}\opLeftPren{}ls\opRightPren{}} coerces the list \smath{ls} to a +permutation whose image is given by \smath{ls} and whose preimage +is fixed to be \smath{[ 1, \ldots, n]}. +Note: +\smath{\mbox{\bf coerceImages}\opLeftPren{}ls\opRightPren{}}=\smath{coercePreimagesImages([ +1, \ldots, n ], ls)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{coerceListOfPairs}}\opLeftPren{}{\it listOfPairsOfElements}\opRightPren{}% +}% +}% +{1}{(List(List(S)))->\$}{Permutation} +{\smath{\mbox{\bf coerceListOfPairs}\opLeftPren{}lls\opRightPren{}} coerces a list of pairs +\smath{lls} to a permutation, or calls +\smath{error} if not consistent, that is, the set of the first +elements coincides with the set of second elements. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{coercePreimagesImages}}\opLeftPren{}{\it listOfListOfElements}\opRightPren{}% +}% +}% +{1}{(List(List(S)))->\$}{Permutation} +{\smath{\mbox{\bf coercePreimagesImages}\opLeftPren{}lls\opRightPren{}} coerces the representation +\smath{lls} of a permutation as a list of preimages and images to +a permutation.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{coleman}}\opLeftPren{}{\it listOfIntegers}, \allowbreak{}{\it listOfIntegers}, \allowbreak{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{3}{(List(Integer), List(Integer), List(Integer))->Matrix(Integer)}{SymmetricGroupCombinatoricFunctions} +{\smath{\mbox{\bf coleman}\opLeftPren{}alpha, \allowbreak{} beta, \allowbreak{} pi\opRightPren{}} generates the Coleman-matrix of a +certain double coset of the symmetric group given by an +representing element \smath{pi} and \smath{alpha} and +\smath{beta}. +The matrix has nonnegative entries, row sums \smath{alpha} and +column sums \smath{beta}. +\seeDetails{SymmetricGroupCombinatoricFunctions}} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{color}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(Integer)->\$}{Color} +{\smath{\mbox{\bf color}\opLeftPren{}i\opRightPren{}} returns a color of the indicated hue \smath{i}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{colorDef}}\opLeftPren{}{\it viewPort}, \allowbreak{}{\it color}, \allowbreak{}{\it color}\opRightPren{}% +}% +}% +{1}{(Integer)->\$}{Color} +{\smath{\mbox{\bf colorDef}\opLeftPren{}v, \allowbreak{} c_1, \allowbreak{} c_2\opRightPren{}} sets the range of colors along the colormap so +that the lower end of the colormap is defined by +\smath{c_1} and the top end of the colormap is defined by \smath{c2} +for the given \threedim{} viewport \smath{v}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{colorFunction}}\opLeftPren{}{\it smallFloatFunction}\opRightPren{}% +}% +}% +{1}{((DoubleFloat)->DoubleFloat)->\$}{DrawOption} +{\smath{\mbox{\bf colorFunction}\opLeftPren{}fn\opRightPren{}} specifies the color for +three-dimensional plots. +Function \smath{fn} can take one to three \spadtype{DoubleFloat} +arguments and always returns a \spadtype{DoubleFloat} value. +If one argument, the color is based upon the \smath{z}-component +of plot. +If two arguments, the color is based on two parameter values. +If three arguments, the color is based on the \smath{x}, +\smath{y}, and \smath{z} components. +\sayOption{colorFunction}{fn} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{column}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it positiveInteger}\opRightPren{}% +}% +}% +{2}{(\$, Integer)->Col}{RectangularMatrixCategory} +{\smath{\mbox{\bf column}\opLeftPren{}M, \allowbreak{} j\opRightPren{}} returns the \eth{\smath{j}} column of the +matrix or \spadtype{TwoDimensionalArrayCategory} object \smath{M}, +or calls \spadfun{error} if the index is outside the proper range. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{commaSeparate}}\opLeftPren{}{\it listOfOutputForms}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf commaSeparate}\opLeftPren{}lo\opRightPren{}}, where \smath{lo} is a list of objects +of type \spadtype{OutputForm} (normally unexposed), returns an +output form which separates the elements of \smath{lo} by commas. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{commonDenominator}}\opLeftPren{}{\it fraction}\opRightPren{}% +}% +}% +{1}{(A)->R}{CommonDenominator} +{\smath{\mbox{\bf commonDenominator}\opLeftPren{}\col{q_1}{q_n}\opRightPren{}} returns a common +denominator for the \smath{q_i}'s. +\newitem\smath{\mbox{\bf commonDenominator}\opLeftPren{}A\opRightPren{}}, where \smath{A} is a matrix +of fractions, returns a common denominator for the elements of +\smath{A}. +\newitem\smath{\mbox{\bf commonDenominator}\opLeftPren{}p\opRightPren{}} returns a common denominator +for the coefficients of polynomial \smath{p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{commutative?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf commutative?}\opLeftPren{}\opRightPren{}\$R} tests if multiplication in the algebra \smath{R} is commutative. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{commutator}}\opLeftPren{}{\it groupElement}, \allowbreak{}{\it groupElement}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{Group} +{\smath{\mbox{\bf commutator}\opLeftPren{}p, \allowbreak{} q\opRightPren{}} computes \smath{\mbox{\bf inv}\opLeftPren{}p) * {\mbox {\bf inv}}(q) * p * q} where \smath{p} and +\smath{q} are members of a \spadtype{Group} domain. +\newitem +\smath{\mbox{\bf commutator}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns \smath{ab-ba} where \smath{a} +and \smath{b} are members of a \spadtype{NonAssociativeRing} domain. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{compactFraction}}\opLeftPren{}{\it partialFraction}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{PartialFraction} +{\smath{\mbox{\bf compactFraction}\opLeftPren{}u\opRightPren{}} normalizes the partial fraction \smath{u} to a compact representation where it has only one fractional term per prime in the denominator.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{comparison}}\opLeftPren{}{\it basicOperator}, \allowbreak{}{\it property}\opRightPren{}% +}% +}% +{2}{(\$, (\$, \$)->Boolean)->\$}{BasicOperator} +{\smath{\mbox{\bf comparison}\opLeftPren{}op, \allowbreak{} p\opRightPren{}} attaches \smath{p} +as the \mbox{\tt "\%less?"} property to \smath{op}. +If \smath{op1} and \smath{op2} have the same name, and one of them +has a \mbox{\tt "\%less?"} property \smath{p}, then \smath{p(op1, op2)} is +called to decide whether \smath{op1 < op2}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{compile}}\opLeftPren{}{\it symbol}, \allowbreak{}{\it listOfTypes}\opRightPren{}% +}% +}% +{ (Symbol, List $) -> Symbol}{}{} +{\smath{\mbox{\bf compile}\opLeftPren{}f, \allowbreak{} [T_1, \allowbreak{} \ldots, T_n]\opRightPren{}} forces the interpreter to compile +the function with name \smath{f} with signature \smath{(T_1, \ldots, T_n) -> T}, +where \smath{T} is a type determined by type analysis of the +function body of \smath{f}. +If the compilation is successful, the operation returns the name \smath{f}. +The operation calls \spadfun{error} if \smath{f} +is not defined beforehand in the interpreter, +or if the \smath{T_i}'s are not valid types, or if the compiler fails. +See also \spadfun{function}, +\spadfun{interpret}, \spadfun{lambda}, and \spadfun{compiledFunction}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{compiledFunction}}\opLeftPren{}{\it expression}, \allowbreak{}{\it symbol }\allowbreak $\,[$ , \allowbreak{}{\it symbol}$]$\opRightPren{}% +}% +}% +{ (S, SY) -> (D -> I)}{}{} +{\opkey{Argument \smath{expression} may be of any type that is +coercible to type \spadtype{InputForm} (most commonly used types). +These functions must be package called to define the type of the +function produced.} +\newitem +\smath{\mbox{\bf compiledFunction}\opLeftPren{}expr, \allowbreak{} x\opRightPren{}\$P}, where \smath{P} is +\spadtype{MakeUnaryCompiledFunction(E, S, T)}, returns an anonymous +function of type \smath{S}{T} defined by defined by \smath{x +\mapsto {\rm expr}}. +The anonymous function is compiled and directly applicable to +objects of type \smath{S}. +\newitem +\smath{\mbox{\bf compiledFunction}\opLeftPren{}expr, \allowbreak{} x, \allowbreak{} y\opRightPren{}\$P}, where \smath{P} is +\spadtype{MakeBinaryCompiledFunction(E, A, B, T)} returns an +anonymous function of type \spadsig{(A, B)}{T} defined by +\smath{(x, y) \mapsto {\rm expr}}. +The anonymous function is compiled and is then directly applicable +to objects of type \smath{(A, B)}. +\newitem +See also \spadfun{compile}, \spadfun{function}, and +\spadfun{lambda}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complement}}\opLeftPren{}{\it finiteSetElement}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{FiniteSetAggregate} +{\smath{\mbox{\bf complement}\opLeftPren{}u\opRightPren{}} returns the complement of the finite set \smath{u}, that is, the set of all values not in \smath{u}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complementaryBasis}}\opLeftPren{}{\it vector}\opRightPren{}% +}% +}% +{1}{(Vector(\$))->Vector(\$)}{FunctionFieldCategory} +{\smath{\mbox{\bf complementaryBasis}\opLeftPren{}b_1, \allowbreak{} \ldots, b_n\opRightPren{}} returns the complementary +basis \smath{(b_1^{'}, \ldots, b_n^{'})} of \smath{(b_1, \ldots, b_n)} for a domain of category \spadtype{FunctionFieldCategory}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complete}}\opLeftPren{}{\it streamOrInteger}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{LazyStreamAggregate} +{\smath{\mbox{\bf complete}\opLeftPren{}u\opRightPren{}} causes all terms of a stream or continued +fraction \smath{u} to be computed. +If not called on a finite stream or continued fraction, this +function will compute until interrupted. +\newitem +\smath{\mbox{\bf complete}\opLeftPren{}n\opRightPren{}} is the \eth{\smath{n}} complete +homogeneous symmetric function expressed in terms of power sums. +Alternatively, it is the cycle index of the symmetric group of +degree \smath{n}. +See \spadtype{CycleIndicators} for details. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{completeEchelonBasis}}\opLeftPren{}{\it vectorOfVectors}\opRightPren{}% +}% +}% +{1}{(Vector(Vector(R)))->Matrix(R)}{RepresentationPackage2} +{\smath{\mbox{\bf completeEchelonBasis}\opLeftPren{}vv\opRightPren{}} returns a completed basis from \smath{vv}, +a vector of vectors of domain elements. \seeDetails{RepresentationPackage2} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complex}}\opLeftPren{}{\it element}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(R, R)->\$}{ComplexCategory} +{\smath{\mbox{\bf complex}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} creates the complex expression \smath{x} + \%i*y.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complexEigenvalues}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it precision}\opRightPren{}% +}% +}% +{2}{(Matrix(Complex(Fraction(Integer))), Float)->List(Complex(Float))}{NumericComplexEigenPackage} +{\smath{\mbox{\bf complexEigenvalues}\opLeftPren{}m, \allowbreak{} eps\opRightPren{}} computes the eigenvalues of the matrix \smath{m} to precision \smath{eps}, chosen as a float or a rational number so as to agree with the type +of the coefficients of the matrix \smath{m}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complexEigenvectors}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it precision}\opRightPren{}% +}% +}% +{2}{(Matrix(Complex(Fraction(Integer))), Float)->List(Record(floatval:Complex(Float), floatmult:Integer, floatvect:List(Matrix(Complex(Float)))))}{NumericComplexEigenPackage} +{\smath{\mbox{\bf complexEigenvectors}\opLeftPren{}m, \allowbreak{} eps\opRightPren{}} (\smath{m}, a matrix) returns a list of records, +each containing a complex +eigenvalue, its algebraic multiplicity, and a list of associated eigenvectors. +All results are expressed as complex floats or rationals with precision \smath{eps}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complexElementary}}\opLeftPren{}{\it expression\opt{, symbol}}\opRightPren{}% +}% +}% +{1}{(F)->F}{TrigonometricManipulations} +{\smath{\mbox{\bf complexElementary}\opLeftPren{}e\opRightPren{}} rewrites \smath{e} in terms of the two fundamental complex transcendental elementary functions: \smath{log, exp}. +\newitem\smath{\mbox{\bf complexElementary}\opLeftPren{}e, \allowbreak{} x\opRightPren{}} does the same but only rewrites kernels of \smath{e} +involving \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complexExpand}}\opLeftPren{}{\it integrationResult}\opRightPren{}% +}% +}% +{1}{(IntegrationResult(F))->F}{IntegrationResultToFunction} +{\smath{\mbox{\bf complexExpand}\opLeftPren{}ir\opRightPren{}}, where \smath{ir} is an \spadtype{IntegrationResult}, returns the expanded complex function corresponding to \smath{ir}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complexIntegrate}}\opLeftPren{}{\it expression}, \allowbreak{}{\it variable}\opRightPren{}% +}% +}% +{2}{(F, Symbol)->F}{FunctionSpaceComplexIntegration} +{\smath{\mbox{\bf complexIntegrate}\opLeftPren{}f, \allowbreak{} x\opRightPren{}} returns $\int f(x)dx$ where \smath{x} is viewed as a complex variable. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complexLimit}}\opLeftPren{}{\it expression}, \allowbreak{}{\it equation}\opRightPren{}% +}% +}% +{2}{(Fraction(Polynomial(R)), Equation(Fraction(Polynomial(R))))->OnePointCompletion(Fraction(Polynomial(R)))}{RationalFunctionLimitPackage} +{\smath{\mbox{\bf complexLimit}\opLeftPren{}f(x), \allowbreak{} x = a\opRightPren{}} computes the complex limit of \smath{f} as its argument \smath{x} approaches \smath{a}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complexNormalize}}\opLeftPren{}{\it expression\opt{, symbol}}\opRightPren{}% +}% +}% +{1}{(F)->F}{TrigonometricManipulations} +{\smath{\mbox{\bf complexNormalize}\opLeftPren{}e\opRightPren{}} rewrites \smath{e} using the least possible number of complex independent kernels. +\newitem\smath{\mbox{\bf complexNormalize}\opLeftPren{}e, \allowbreak{} x\opRightPren{}} rewrites \smath{e} using the least possible number of complex independent kernels involving \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complexNumeric}}\opLeftPren{}{\it expression\opt{, positiveInteger}}\opRightPren{}% +}% +}% +{1}{(Expression(S))->Complex(Float)}{Numeric} +{\smath{\mbox{\bf complexNumeric}\opLeftPren{}u\opRightPren{}} returns a complex approximation of \smath{u}, +where \smath{u} is a polynomial or an expression. +\newitem\smath{\mbox{\bf complexNumeric}\opLeftPren{}u, \allowbreak{} n\opRightPren{}} does the same but requires accuracy to be up to +\smath{n} decimal places. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complexRoots}}\opLeftPren{}{\it rationalFunctions\opt{, options}}\opRightPren{}% +}% +}% +{2}{(Fraction(Polynomial(Complex(Fraction(Integer)))), Par)->List(Complex(Par))}{FloatingComplexPackage} +{\smath{\mbox{\bf complexRoots}\opLeftPren{}rf, \allowbreak{} eps\opRightPren{}} finds all the complex solutions of a +univariate rational function with rational number coefficients with +precision given by \smath{eps}. +The complex solutions are returned either +as rational numbers or floats depending on whether \smath{eps} +is a rational number or a float. +\newitem\smath{\mbox{\bf complexRoots}\opLeftPren{}lrf, \allowbreak{} lv, \allowbreak{} eps\opRightPren{}} similarly finds all the complex solutions +of a list of rational functions with rational number coefficients +with respect the variables appearing in \smath{lv}. +Solutions are computed to precision \smath{eps} and returned as +a list of values corresponding to the order of variables in \smath{lv}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complexSolve}}\opLeftPren{}{\it eq}, \allowbreak{}{\it x}\opRightPren{}% +}% +}% +{1}{(Equation(Expression(R)))->List(Equation(Expression(R)))}{TransSolvePackage} +{See \smath{\mbox{\bf solve}\opLeftPren{}u, \allowbreak{} v\opRightPren{}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{complexZeros}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it floatOrRationaNumber}\opRightPren{}% +}% +}% +{2}{(UP, Par)->List(Complex(Par))}{ComplexRootPackage} +{\smath{\mbox{\bf complexZeros}\opLeftPren{}poly, \allowbreak{} eps\opRightPren{}} finds the complex zeros of the +univariate polynomial \smath{poly} to precision \smath{eps}. +Solutions are returned either as complex floats or rationals +depending on the type of \smath{eps}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{components}}\opLeftPren{}{\it threeSpace}\opRightPren{}% +}% +}% +{1}{(\$)->List(\$)}{ThreeSpace} +{\smath{\mbox{\bf components}\opLeftPren{}sp\opRightPren{}} takes the \spadtype{ThreeSpace} object \smath{sp}, and returns +a list of \spadtype{ThreeSpace} objects, each having a single component. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{composite}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(List(\$))->\$}{ThreeSpace} +{\smath{\mbox{\bf composite}\opLeftPren{}p, \allowbreak{} q\opRightPren{}}, for polynomials \smath{p} and \smath{q}, +returns \smath{f} if \smath{p} = \smath{f(q)}, and \mbox{\tt "failed"} if no such \smath{f} exists. +\newitem +\smath{\mbox{\bf composite}\opLeftPren{}lsp\opRightPren{}}, where \smath{lsp} is a list +\smath{[ sp_1, sp_2, \ldots, sp_n]} of \spadtype{ThreeSpace} objects, +returns a single \spadtype{ThreeSpace} object containing +the union of all objects in the parameter list grouped as a single composite. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{composites}}\opLeftPren{}{\it threeSpace}\opRightPren{}% +}% +}% +{1}{(\$)->List(\$)}{ThreeSpace} +{\smath{\mbox{\bf composites}\opLeftPren{}sp\opRightPren{}} takes the \spadtype{ThreeSpace} object \smath{sp} +and returns a list of \spadtype{ThreeSpace} objects, one for each single composite +of \smath{sp}. If \smath{sp} has no defined composites (composites need to be explicitly created), the list returned is empty. Note that not all the components need to be part of a composite.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{concat}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it aggregate}\opRightPren{}% +\opand \mbox{\axiomFun{concat!}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{(\$, S)->\$}{ExtensibleLinearAggregate} +{\smath{\mbox{\bf concat}\opLeftPren{}u, \allowbreak{} x\opRightPren{}} returns list \smath{u} with additional element \smath{x} at the end. Note: equivalent to \smath{\mbox{\bf concat}\opLeftPren{}u, \allowbreak{} [ x]\opRightPren{}}. +\newitem\smath{\mbox{\bf concat}\opLeftPren{}u, \allowbreak{} v\opRightPren{}} returns an aggregate consisting of the elements of \smath{u} followed by the elements of \smath{v}. +\newitem\smath{\mbox{\bf concat}\opLeftPren{}u\opRightPren{}}, where \smath{u} is a list of aggregates \smath{[ a, b, $\ldots$, c]}, returns a single aggregate consisting of the elements of \smath{a} followed by those of \smath{b} followed $\ldots$ by the elements of \smath{c}. +\newitem\smath{\mbox{\bf concat!}\opLeftPren{}u, \allowbreak{} x\opRightPren{}}, where \smath{u} is extensible, destructively adds element \smath{x} to the end of aggregate \smath{u}; if \smath{u} is a stream, it must be finite. +\newitem\smath{\mbox{\bf concat!}\opLeftPren{}u, \allowbreak{} v\opRightPren{}} destructively appends \smath{v} to the end of \smath{u}; if +\smath{u} is a stream, it must be finite. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{conditionP}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(Matrix(\$))->Union(Vector(\$), "failed")}{FiniteFieldCategory} +{\smath{\mbox{\bf conditionP}\opLeftPren{}M\opRightPren{}}, given a matrix \smath{M} representing a +homogeneous system of equations over a field \smath{F} with +\spadfun{characteristic} \smath{p}, returns a non-zero vector +whose \eth{\smath{p}} power is a non-trivial solution to these +equations, or \mbox{\tt "failed"} if no such vector exists. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{conditionsForIdempotents}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->List(Polynomial(R))}{FramedNonAssociativeAlgebra} +{\smath{\mbox{\bf conditionsForIdempotents}\opLeftPren{}\opRightPren{}} +determines a complete list of polynomial equations for the +coefficients of idempotents with respect to the \smath{R}-module +basis. +\seeAlso{\spadtype{FramedNonAssociativeAlgebra} for an alternate +definition} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{conical}}\opLeftPren{}{\it smallFloat}, \allowbreak{}{\it smallFloat}\opRightPren{}% +}% +}% +{2}{(R, R)->(Point(R))->Point(R)}{CoordinateSystems} +{\smath{\mbox{\bf conical}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns a function of two parameters for +mapping conical coordinates to Cartesian coordinates. +The function maps the point \smath{(\lambda, \mu, \nu)} to \smath{x += \lambda\mu\nu/(ab)}, \smath{y = +\lambda/a\sqrt((mu^2-a^2)(\nu^2-a^2)/(a^2-b^2))}, \smath{z = +\lambda/b\sqrt((mu^2-b^2)(nu^2-b^2)/(b^2-a^2))}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{conjugate}}\opLeftPren{}{\it element\opt{, element}}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{ComplexCategory} +{\smath{\mbox{\bf conjugate}\opLeftPren{}u\opRightPren{}} returns the conjugate of a complex, +quaternion, or octonian expression \smath{u}. For example, if \smath{u} is the +complex expression \smath{x + \%i y}, \smath{\mbox{\bf conjugate}\opLeftPren{}u\opRightPren{}} +returns \smath{x - \% i y}. +\newitem\smath{\mbox{\bf conjugate}\opLeftPren{}pt\opRightPren{}} returns the conjugate of a partition \smath{pt}. +\seeType{PartitionsAndPermutations} +\newitem\smath{\mbox{\bf conjugate}\opLeftPren{}p, \allowbreak{} q\opRightPren{}} returns \smath{\mbox{\bf inv}\opLeftPren{}q) * p * q} +for elements \smath{p} and \smath{q} of a group. Note: this operation +is called {\it right action by conjugation}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{conjugates}}\opLeftPren{}{\it streamOfPartitions}\opRightPren{}% +}% +}% +{1}{(Stream(List(Integer)))->Stream(List(Integer))}{PartitionsAndPermutations} +{\smath{\mbox{\bf conjugates}\opLeftPren{}lp\opRightPren{}} is the stream of conjugates of a stream of +partitions \smath{lp}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{connect}}\opLeftPren{}{\it twoDimensionalViewport}, \allowbreak{}{\it positiveInteger}, \allowbreak{}{\it string}\opRightPren{}% +}% +}% +{3}{(Kernel(S))->Union(R, "failed")}{KernelFunctions2} +{\smath{\mbox{\bf connect}\opLeftPren{}v, \allowbreak{} n, \allowbreak{} s\opRightPren{}} displays the lines connecting the graph points in +field \smath{n} of the \twodim{} viewport \smath{v} if +\smath{s="on"}, +and does not display the lines if \smath{s="off"}. +} + + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{constant}}\opLeftPren{}{\it variableOrfunction}\opRightPren{}% + \optand \mbox{\axiomFun{constantLeft}}\opLeftPren{}{\it function}, \allowbreak{}{\it element}\opRightPren{}% + \opand \mbox{\axiomFun{constantRight}}\opLeftPren{}{\it function}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{ (()->C) -> (A ->C)}{}{} +{\opkey{These operations add an argument to a function +and must be package-called from package \smath{P} as indicated. +See also \spadfun{curry}, \spadfun{curryLeft}, and \spadfun{curryRight}.} +\newitem +\smath{\mbox{\bf constant}\opLeftPren{}f\opRightPren{}\$P} returns the function \smath{g} +such that \smath{g(a)= f()}, where +function \smath{f} has type +\spadsig{}{C} and \smath{a} has type \smath{A}. +The function must be package-called from +\smath{P =} \spadtype{MappingPackage2(A, C)}. +\newitem +\smath{\mbox{\bf constantRight}\opLeftPren{}f\opRightPren{}\$P} returns the function \smath{g} +such that \smath{g(a, b)= f(a)}, where function \smath{f} has +type \spadsig{A}{C} and \smath{b} has type \smath{B}. +This function must be package-called from +\smath{P =} \spadtype{MappingPackage3(A, B, C)}. +\newitem +\smath{\mbox{\bf constantLeft}\opLeftPren{}f\opRightPren{}\$P} returns the function \smath{g} +such that \smath{g(a, b)= f(b)}, where function \smath{f} has +type \spadsig{B}{C} and \smath{a} has type \smath{A}. +The function must be package-called from +\smath{P =} \spadtype{MappingPackage3(A, B, C)}. +\newitem +\smath{\mbox{\bf constant}\opLeftPren{}x\opRightPren{}} tells the pattern matcher that \smath{x} should match +the symbol \smath{'x} and no other quantity, or calls \spadfun{error} if \smath{x} is not a symbol. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{constantOperator}}\opLeftPren{}{\it property}\opRightPren{}% + \opand \mbox{\axiomFun{constantOpIfCan}}\opLeftPren{}{\it f}\opRightPren{}% +}% +}% +{1}{(BasicOperator)->Union(A, "failed")}{BasicOperatorFunctions1} +{\smath{\mbox{\bf constantOperator}\opLeftPren{}f\opRightPren{}} returns a nullary operator op such that \smath{op()} always evaluate to \smath{f}. +\newitem +\smath{\mbox{\bf constantOpIfCan}\opLeftPren{}op\opRightPren{}} returns \smath{f} if \smath{op} is the constant nullary operator always returning \smath{f}, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{construct}}\opLeftPren{}{\it element}, \allowbreak{}{\it ..}\opRightPren{}% +}% +}% +{1}{(List(S))->\$}{Collection} +{\smath{\mbox{\bf construct}\opLeftPren{}x, \allowbreak{} y, \allowbreak{} \ldots, z\opRightPren{}\$R} returns the collection of elements \smath{x, y, \ldots, z} from domain \smath{R} ordered as given. This is equivalently written +as \smath{[ x, y, \ldots, z]}. The qualification \smath{R} may be omitted for domains +of type \spadtype{List}. +Infinite tuples such as \smath{[ x_i \mbox{ \tt for } i \mbox{ \tt in } 1..]} are converted +to a \spadtype{Stream} object. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cons}}\opLeftPren{}{\it element}, \allowbreak{}{\it listOrStream}\opRightPren{}% +}% +}% +{2}{(S, \$)->\$}{List} +{\smath{\mbox{\bf cons}\opLeftPren{}x, \allowbreak{} u\opRightPren{}}, where u is a list or stream, +creates a new list or stream whose \spadfun{first} element is \smath{x} +and whose \spadfun{rest} is \smath{u}. Equivalent to \smath{\mbox{\bf concat}\opLeftPren{}x, \allowbreak{} u\opRightPren{}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{content}}\opLeftPren{}{\it polynomial\opt{, symbol}}\opRightPren{}% +}% +}% +{1}{(\$)->R}{FiniteAbelianMonoidRing} +{\smath{\mbox{\bf content}\opLeftPren{}p\opRightPren{}} returns the greatest common divisor (\spadfun{gcd}) of the coefficients of polynomial \smath{p}. +\newitem\smath{\mbox{\bf content}\opLeftPren{}p, \allowbreak{} v\opRightPren{}}, where \smath{p} is a multivariate polynomial type, returns +the \smath{gcd} of the coefficients of the polynomial \smath{p} viewed as a univariate polynomial with respect to the variable \smath{v}. +For example, if \smath{p = 7x^2y + 14xy^2}, the \smath{gcd} of the +coefficients with respect to \smath{x} is \smath{7y}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{continuedFraction}}\opLeftPren{}{\it fractionOrFloat\opt{, options}}\opRightPren{}% +}% +}% +{1}{(F)->ContinuedFraction(Integer)}{NumericContinuedFraction} +{\smath{\mbox{\bf continuedFraction}\opLeftPren{}f\opRightPren{}} converts the floating point number \smath{f} +to a reduced continued fraction. +\newitem\smath{\mbox{\bf continuedFraction}\opLeftPren{}r\opRightPren{}} converts the fraction +\smath{r} with components of type \smath{R} to a continued +fraction over \smath{R}. +\newitem\smath{\mbox{\bf continuedFraction}\opLeftPren{}r, \allowbreak{} s, \allowbreak{} s'\opRightPren{}}, where \smath{s} and +\smath{s'} are streams over +a domain \smath{R}, constructs a continued fraction in the +following way: if \smath{s = [ a1, a2, $\ldots$]} and +\smath{s' = [ b1, b2, $\ldots$]} then the result is the +continued fraction \smath{r + a1/(b1 + a2/(b2 + $\ldots$))}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{contract}}\opLeftPren{}{\it idealOrTensors\opt{, options}}\opRightPren{}% +}% +}% +{3}{(\$, Integer, Integer)->\$}{CartesianTensor} +{\smath{\mbox{\bf contract}\opLeftPren{}I, \allowbreak{} lvar\opRightPren{}} contracts the ideal \smath{I} to the +polynomial ring \smath{F[ lvar]}. +\newitem\smath{\mbox{\bf contract}\opLeftPren{}t, \allowbreak{} i, \allowbreak{} j\opRightPren{}} is the contraction of tensor +\smath{t} which sums along the \eth{\smath{i}} and \eth{\smath{j}} +indices. +For example, if \smath{r = contract(t, 1, 3)} for a rank 4 tensor +\smath{t}, then \smath{r} is the rank 2 \smath{(= 4 - 2)} tensor +given by \smath{r(i, j) = \sum\nolimits_{h=1}^{\rm dim}t(h, i, h, j)}. +\newitem\smath{\mbox{\bf contract}\opLeftPren{}t, \allowbreak{} i, \allowbreak{} s, \allowbreak{} j\opRightPren{}} is the inner product of tensors +\smath{s} and \smath{t} which sums along the \smath{k_1}st index +of \smath{t} and the \smath{k_2}st index of \smath{s}. +For example, if \smath{r = contract(s, 2, t, 1)} for rank 3 tensors +\smath{s} and \smath{t}, then \smath{r} is the rank 4 \smath{(= 3 ++ 3 - 2)} tensor given by \smath{r(i, j, k, l) = +\sum\nolimits_{h=1}^{\rm dim} s(i, h, j)t(h, k, l)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{contractSolve}}\opLeftPren{}{\it equation}, \allowbreak{}{\it symbol}\opRightPren{}% +}% +}% +{1}{(Equation(Expression(R)))->List(Equation(Expression(R)))}{TransSolvePackage} +{\smath{\mbox{\bf contractSolve}\opLeftPren{}eq, \allowbreak{} x\opRightPren{}} finds the solutions expressed in +terms of radicals of the equation of rational functions \smath{eq} +with respect to the symbol \smath{x}. +The result contains new symbols for common subexpressions in order +to reduce the size of the output. +Alternatively, an expression \smath{u} may be given for \smath{eq} +in which case the equation \smath{eq} is defined as \smath{u=0} +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{controlPanel}}\opLeftPren{}{\it viewport}, \allowbreak{}{\it string}\opRightPren{}% +}% +}% +{1}{(\$)->Stream(Fraction(R))}{ContinuedFraction} +{\smath{\mbox{\bf controlPanel}\opLeftPren{}v, \allowbreak{} s\opRightPren{}} displays the control panel of the given +\twodim{} or \threedim{} viewport \smath{v} if \smath{s = "on"}, +or hides the +control panel if \smath{s = "off"}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{convergents}}\opLeftPren{}{\it continuedFraction}\opRightPren{}% +}% +}% +{1}{(\$)->Stream(Fraction(R))}{ContinuedFraction} +{\smath{\mbox{\bf convergents}\opLeftPren{}cf\opRightPren{}} returns the stream of the convergents of +the continued fraction \smath{cf}. +If the continued fraction is finite, then the stream will be +finite.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{coordinate}}\opLeftPren{}{\it curveOrSurface}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(\$, NonNegativeInteger)->ComponentFunction}{ParametricPlaneCurve} +{\smath{\mbox{\bf coordinate}\opLeftPren{}u, \allowbreak{} n\opRightPren{}} returns the \eth{\smath{n}} +coordinate function for the curve or surface \smath{u}. +See \spadtype{ParametericPlaneCurve}, \spadtype{ParametricSpaceCurve}, +and \spadtype{ParametericSurface}, using HyperDoc. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{coordinates}}\opLeftPren{}{\it pointOrvector\opt{, basis}}\opRightPren{}% +}% +}% +{2}{(\$, Vector(\$))->Vector(R)}{FiniteRankAlgebra} +{\smath{\mbox{\bf coordinates}\opLeftPren{}pt\opRightPren{}} specifies a change of coordinate systems +of point \smath{pt}. +This option is expressed in the form \smath{coordinates == pt}. +\medbreak\opkey{The following operations return a matrix +representation of the coordinates of an argument vector \smath{v} +of the form \smath{[ v_1\ldots v_n]} with respect to +the basis a domain \smath{R}. +The coordinates of \smath{v_i} are contained in the +\eth{\smath{i}} row of the matrix returned.} +\newitem\smath{\mbox{\bf coordinates}\opLeftPren{}v{, b}\opRightPren{}} returns the matrix +representation with respect to the basis \smath{b} for vector +\smath{v} of elements from domain \smath{R} of category +\spadtype{FiniteRankNonAssociativeAlgebra} or +\spadtype{FiniteRankAlgebra}. +If a second argument is not given, the basis is taken to be the +fixed basis of \smath{R}. +\newitem\smath{\mbox{\bf coordinates}\opLeftPren{}v\opRightPren{}\$R}, returns a matrix representation +for \smath{v} with respect to a fixed basis for domain \smath{R} +of category \spadtype{FiniteAlgebraicExtensionField}, +\spadtype{FramedNonAssociativeAlgebra}, or +\spadtype{FramedAlgebra}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{copies}}\opLeftPren{}{\it integer}, \allowbreak{}{\it string}\opRightPren{}% +}% +}% +{2}{(Integer, String)->String}{DisplayPackage} +{\smath{\mbox{\bf copies}\opLeftPren{}n, \allowbreak{} s\opRightPren{}} returns +a string composed of \smath{n} copies of string \smath{s}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{copy}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{Aggregate} +{\smath{\mbox{\bf copy}\opLeftPren{}u\opRightPren{}} returns a top-level (non-recursive) copy of an aggregate \smath{u}. +Note: for lists, \code{copy(u) == [x for x in u]}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{copyInto!}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it aggregate}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{3}{(\$, \$, Integer)->\$}{FiniteLinearAggregate} +{\smath{\mbox{\bf copyInto!}\opLeftPren{}u, \allowbreak{} v, \allowbreak{} p\opRightPren{}} returns linear aggregate \smath{u} with +elements of \smath{u} replaced by the successive elements of \smath{v} +starting at index \smath{p}. +Arguments \smath{u} and \smath{v} can be elements of any \spadtype{FiniteLinearAggregate}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cos}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{cosIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{TrigonometricFunctionCategory} +{\opkey{Argument x can be a \spadtype{Complex}, \spadtype{Float}, +\spadtype{DoubleFloat}, or \spadtype{Expression} value or a series. +} \newitem\smath{\mbox{\bf cos}\opLeftPren{}x\opRightPren{}} returns the cosine of \smath{x}. +\newitem\smath{\mbox{\bf cosIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf cos}\opLeftPren{}x\opRightPren{}} if possible, +and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cos2sec}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf cos2sec}\opLeftPren{}e\opRightPren{}} converts every \smath{\mbox{\bf cos}\opLeftPren{}u\opRightPren{}} appearing in +\smath{e} into \smath{1/\sec(u)}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cosh2sech}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf cosh2sech}\opLeftPren{}e\opRightPren{}} converts every \smath{\mbox{\bf cosh}\opLeftPren{}u\opRightPren{}} appearing in +\smath{e} into \smath{1/\mbox{\rm sech}(u)}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cosh}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{coshIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{HyperbolicFunctionCategory} +{\opkey{Argument x can be a \spadtype{Complex}, \spadtype{Float}, +\spadtype{DoubleFloat}, or +\spadtype{Expression} value or a series. } +\newitem\smath{\mbox{\bf cosh}\opLeftPren{}x\opRightPren{}} returns the hyperbolic cosine of +\smath{x}. +\newitem\smath{\mbox{\bf coshIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf cosh}\opLeftPren{}x\opRightPren{}} if possible, +and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cot}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{TrigonometricFunctionCategory} +{\opkey{Argument x can be a \spadtype{Complex}, \spadtype{Float}, \spadtype{DoubleFloat}, or +\spadtype{Expression} value or a series. } +\newitem\smath{\mbox{\bf cot}\opLeftPren{}x\opRightPren{}} returns the cotangent of \smath{x}. +\newitem\smath{\mbox{\bf cotIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf cot}\opLeftPren{}x\opRightPren{}} if possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cot2tan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf cot2tan}\opLeftPren{}expression\opRightPren{}} converts every \smath{\cot(u)} +appearing in \smath{e} into \smath{1/\tan(u)}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cot2trig}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf cot2trig}\opLeftPren{}expression\opRightPren{}} converts every \smath{\cot(u)} +appearing in \smath{e} into \smath{\cos(u)/\sin(u)}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{coth}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{cothIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, "failed")}{PartialTranscendentalFunctions} +{\opkey{Argument x can be a \spadtype{Complex}, \spadtype{Float}, \spadtype{DoubleFloat}, or +\spadtype{Expression} value or a series. } +\newitem\smath{\mbox{\bf coth}\opLeftPren{}x\opRightPren{}} returns the hyperbolic cotangent of \smath{x}. +\newitem +\smath{\mbox{\bf cothIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf coth}\opLeftPren{}x\opRightPren{}} if possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{coth2tanh}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf coth2tanh}\opLeftPren{}expression\opRightPren{}} converts every \smath{\mbox{\rm +coth}(u)} appearing in \smath{e} into \smath{1/\mbox{\rm +tanh}(u)}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{coth2trigh}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf coth2trigh}\opLeftPren{}expression\opRightPren{}} converts every \smath{\mbox{\rm +coth}(u)} appearing in +\smath{e} into \smath{\mbox{\rm cosh}(u)/\mbox{\rm sinh}(u)}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{count}}\opLeftPren{}{\it predicate}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{((S)->Boolean, \$)->NonNegativeInteger}{HomogeneousAggregate} +{\smath{\mbox{\bf count}\opLeftPren{}pred, \allowbreak{} u\opRightPren{}} returns the number of elements \smath{x} in +\smath{u} such that \smath{\mbox{\bf pred}\opLeftPren{}x\opRightPren{}} is \smath{true}. +For collections, \code{count(p, u) = reduce(+, [1 for x in u | +p(x)], 0)}. +\newitem\smath{\mbox{\bf count}\opLeftPren{}x, \allowbreak{} u\opRightPren{}} returns the number of occurrences of +\smath{x} in \smath{u}. +For collections, \code{count(x, u) = reduce(+, [x=y for y in u], 0)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{countable?}}\opLeftPren{}{\it cardinal}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{CardinalNumber} +{\smath{\mbox{\bf countable?}\opLeftPren{}u\opRightPren{}} tests if the cardinal number \smath{u} is +countable, that is, if $u \le $\smath{Aleph 0}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{createThreeSpace}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{ThreeSpace} +{\smath{\mbox{\bf createThreeSpace}\opLeftPren{}\opRightPren{}}{\bf \$}\spadtype{ThreeSpace(R)} creates a +\spadtype{ThreeSpace} object capable of holding point, +curve, mesh components or any combination of the three. +The ring \smath{R} is usually \spadtype{DoubleFloat}. +If you do not package call this function, \spadtype{DoubleFloat} +is assumed. +\newitem\smath{\mbox{\bf createThreeSpace}\opLeftPren{}s\opRightPren{}} creates a \spadtype{ThreeSpace} +object containing objects pre-defined within some +\spadtype{SubSpace} \smath{s}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{createGenericMatrix}}\opLeftPren{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{1}{(NonNegativeInteger)->Matrix(Polynomial(R))}{RepresentationPackage1} +{\smath{\mbox{\bf createGenericMatrix}\opLeftPren{}n\opRightPren{}} creates a square matrix of +dimension \smath{n} whose entry at the \smath{i}-th row and +\smath{j}-th column is the indeterminate \smath{x_{i, j}} (double +subscripted). +\seeType{RepresentationPackage1}} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{createIrreduciblePoly}}\opLeftPren{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{0}{()->\$}{FiniteAlgebraicExtensionField} +{\smath{\mbox{\bf createIrreduciblePoly}\opLeftPren{}n\opRightPren{}}{\bf \$}\spadtype{FFPOLY(GF)} generates +a monic irreducible polynomial of degree \smath{n} over the finite field +\smath{GF}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{createNormalElement}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{FiniteAlgebraicExtensionField} +{\smath{\mbox{\bf createNormalElement}\opLeftPren{}\opRightPren{}\$F} computes a normal element over the ground field +of a finite algebraic extension field \smath{F}, that is, +an element \smath{a} such that \smath{a^{q^i}, 0 \leq i < {\mbox +{\bf extensionDegree}}()\$F} is an \smath{F}-basis, where +\smath{q} is the size of the ground field. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{createNormalPrimitivePoly}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{0}{()->\$}{FiniteAlgebraicExtensionField} +{\smath{\mbox{\bf createNormalPrimitivePoly}\opLeftPren{}n\opRightPren{}}{\bf \$}\spadtype{FFPOLY(GF)} +generates a normal and +primitive polynomial of degree \smath{n} over the field \smath{GF}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{createPrimitiveElement}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{FiniteFieldCategory} +{\smath{\mbox{\bf createPrimitiveElement}\opLeftPren{}\opRightPren{}\$F} computes a generator of the +(cyclic) multiplicative group of a finite +field \smath{F}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{createRandomElement}}\opLeftPren{}{\it listOfMatrices}, \allowbreak{}{\it matrix}\opRightPren{}% +}% +}% +{2}{(List(Matrix(R)), Matrix(R))->Matrix(R)}{RepresentationPackage2} +{\smath{\mbox{\bf createRandomElement}\opLeftPren{}lm, \allowbreak{} m\opRightPren{}} creates a random element of +the group algebra generated by \smath{lm}, where \smath{lm} is a +list of matrices and \smath{m} is a matrix. +\seeType{RepresentationPackage2} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{csc2sin}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf csc2sin}\opLeftPren{}expression\opRightPren{}} converts every \smath{\mbox{\bf csc}\opLeftPren{}u\opRightPren{}} +appearing in \smath{f} into \smath{1/{\tt sin}(u)}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{csch2sinh}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf csch2sinh}\opLeftPren{}expression\opRightPren{}} converts every \smath{\mbox{\bf csch}\opLeftPren{}u\opRightPren{}} +appearing in \smath{f} into \smath{1/{\sinh}(u)}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{csch}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{cschIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, "failed")}{PartialTranscendentalFunctions} +{\opkey{Argument x can be a \spadtype{Complex}, \spadtype{Float}, +\spadtype{DoubleFloat}, or +\spadtype{Expression} value or a series.} +\newitem\smath{\mbox{\bf csch}\opLeftPren{}x\opRightPren{}} returns the hyperbolic cosecant of \smath{x}. +\newitem\smath{\mbox{\bf cschIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf csch}\opLeftPren{}x\opRightPren{}} if possible, +and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cscIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, "failed")}{PartialTranscendentalFunctions} +{\opkey{Argument x can be a \spadtype{Complex}, \spadtype{Float}, +\spadtype{DoubleFloat}, or +\spadtype{Expression} value or a series. } +\newitem +\smath{\mbox{\bf csc}\opLeftPren{}x\opRightPren{}} returns the cosecant of \smath{x}. +\newitem +\smath{\mbox{\bf cscIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf csc}\opLeftPren{}x\opRightPren{}} if possible, +and \mbox{\tt "failed"} otherwise.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cup}}\opLeftPren{}{\it symmetricPolynomial}, \allowbreak{}{\it symmetricPolynomial}\opRightPren{}% +}% +}% +{ (SPOL RN, SPOL RN) -> SPOL RN}{}{} +{\smath{\mbox{\bf cup}\opLeftPren{}s_1, \allowbreak{} s_2\opRightPren{}}, introduced by Redfield, +is the scalar product of two cycle indices, where the +\smath{s_i} are of type \spadtype{SymmetricPolynomial} with +rational number coefficients. +See also \spadfun{cap}. See \spadtype{CycleIndicators} for details.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{curry}}\opLeftPren{}{\it function}\opRightPren{}% + \optand \mbox{\axiomFun{curryLeft}}\opLeftPren{}{\it function}, \allowbreak{}{\it element}\opRightPren{}% + \opand \mbox{\axiomFun{curryRight}}\opLeftPren{}{\it function}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{ ((A, B)->C, B) -> (A ->C)}{}{} +{\opkey{These functions drop an argument from a function.} +\newitem +\smath{\mbox{\bf curry}\opLeftPren{}f, \allowbreak{} a\opRightPren{}} returns the function \smath{g} +such that \smath{g()= f(a)}, where function \smath{f} has type +\spadsig{A}{C} and element \smath{a} has type \smath{A}. +\newitem +\smath{\mbox{\bf curryRight}\opLeftPren{}f, \allowbreak{} b\opRightPren{}} returns the function \smath{g} such that +\smath{g(a) = f(a, b)}, where function \smath{f} has type +\spadsig{(A, B)}{C} and element \smath{b} has type \smath{B}. +\newitem +\smath{\mbox{\bf curryLeft}\opLeftPren{}f, \allowbreak{} a\opRightPren{}} is the function \smath{g} +such that \smath{g(b) = f(a, b)}, where function \smath{f} has type +\spadsig{(A, B)}{C} and element \smath{a} has type \smath{A}. +\newitem +See also \spadfun{constant}, \spadfun{constantLeft}, and \spadfun{constantRight}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{curve}}\opLeftPren{}{\it listOfPoints\opt{, options}}\opRightPren{}% +}% +}% +{1}{(List(Point(R)))->\$}{ThreeSpace} +{\smath{\mbox{\bf curve}\opLeftPren{}[ p_0, p_1, $\ldots$, p_n]\opRightPren{}} creates a +space curve defined by the list of points \smath{p_0} through +\smath{p_n} and returns a \spadtype{ThreeSpace} object whose +component is the curve. +\newitem\smath{\mbox{\bf curve}\opLeftPren{}sp\opRightPren{}} checks to see if the +\spadtype{ThreeSpace} object \smath{sp} is composed of a single +curve defined by a list of points; if so, the list of points +defining the curve is returned. +Otherwise, the operation calls \spadfun{error}. +\newitem\smath{\mbox{\bf curve}\opLeftPren{}c_1, \allowbreak{} c_2\opRightPren{}} creates a plane curve from two +component functions \smath{c_1} and \smath{c_2}. +\seeType{ComponentFunction} +\newitem\smath{curve(sp, [ +[ p_0], [ p_1], $\ldots$, [ +p_n]])} adds a space curve defined by a list of points +\smath{p_0} through \smath{p_n} to a \spadtype{ThreeSpace} object +\smath{sp}. +Each \smath{p_i} is from a domain \smath{\mbox{\bf PointDomain}\opLeftPren{}m, \allowbreak{} R\opRightPren{}}, where +\smath{R} is the \spadtype{Ring} over which the point elements are +defined and \smath{m} is the dimension of the points. +\newitem \smath{\mbox{\bf curve}\opLeftPren{}s, \allowbreak{} [ p_0, p_1, $\ldots$, p_n]\opRightPren{}} adds +the space curve component designated by the list of points +\smath{p_0} through \smath{p_n} to the \spadtype{ThreeSpace} object +\smath{sp}. +\newline \smath{\mbox{\bf curve}\opLeftPren{}c_1, \allowbreak{} c_2, \allowbreak{} c_3\opRightPren{}} creates a space curve from +three component functions \smath{c_1}, \smath{c_2}, and +\smath{c_3}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{curve?}}\opLeftPren{}{\it threeSpace}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{ThreeSpace} +{\smath{\mbox{\bf curve?}\opLeftPren{}sp\opRightPren{}} tests if the \spadtype{ThreeSpace} object \smath{sp} contains +a single curve object. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{curveColor}}\opLeftPren{}{\it float}\opRightPren{}% +}% +}% +{1}{(Float)->\$}{DrawOption} +{\smath{\mbox{\bf curveColor}\opLeftPren{}p\opRightPren{}} specifies a color index for \twodim{} graph +curves from the palette \smath{p}. +This option is expressed in the form \smath{curveColor ==p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cycle}}\opLeftPren{}{\it listOfPermutations}\opRightPren{}% +}% +}% +{1}{(List(S))->\$}{PermutationCategory} +{\smath{\mbox{\bf cycle}\opLeftPren{}ls\opRightPren{}} converts a cycle \smath{ls}, a list with no repetitions, to +the permutation, which +maps \smath{ls.i} to \smath{ls.(i+1)} (index modulo the length of the list). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cycleEntry}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{UnaryRecursiveAggregate} +{\smath{\mbox{\bf cycleEntry}\opLeftPren{}u\opRightPren{}} returns the head of a top-level cycle +contained in aggregate \smath{u}, or \smath{\mbox{\bf empty}\opLeftPren{}\opRightPren{}} if none +exists. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cycleLength}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{UnaryRecursiveAggregate} +{\smath{\mbox{\bf cycleLength}\opLeftPren{}u\opRightPren{}} returns the length of a top-level cycle +contained in aggregate \smath{u}, or 0 if \smath{u} has no such +cycle.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cyclePartition}}\opLeftPren{}{\it permutation}\opRightPren{}% +}% +}% +{1}{(\$)->Partition}{Permutation} +{\smath{\mbox{\bf cyclePartition}\opLeftPren{}p\opRightPren{}} returns the cycle structure of a permutation \smath{p} including cycles of length 1. +The permutation is assumed to be a member of +\spadtype{Permutation(S)} where \smath{S} is a finite set.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cycleRagits}}\opLeftPren{}{\it radixExpansion}\opRightPren{}% +}% +}% +{1}{(\$)->List(Integer)}{RadixExpansion} +{\smath{\mbox{\bf cycleRagits}\opLeftPren{}rx\opRightPren{}} returns the cyclic part of the ragits of the fractional part of a radix expansion. For example, if \smath{x = 3/28 = 0.10 714285 714285 \ldots}, +then \code{cycleRagits(x) = [7, 1, 4, 2, 8, 5]}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cycleSplit!}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{UnaryRecursiveAggregate} +{\smath{\mbox{\bf cycleSplit!}\opLeftPren{}u\opRightPren{}} splits the recursive aggregate (for example, a list) \smath{u} into two +aggregates by dropping off the cycle. The value returned is the cycle entry, +or \smath{nil} if none exists. +For example, if \smath{w = {\mbox {\bf concat}}(u, v)} is the cyclic list where \smath{v} is the +head of the cycle, \smath{\mbox{\bf cycleSplit!}\opLeftPren{}w\opRightPren{}} will drop \smath{v} off \smath{w}. Thus +\smath{w} is destructively changed to \smath{u}, and \smath{v} +is returned. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cycles}}\opLeftPren{}{\it listOfListOfElements}\opRightPren{}% +}% +}% +{1}{(List(List(S)))->\$}{PermutationCategory} +{\smath{\mbox{\bf cycles}\opLeftPren{}lls\opRightPren{}} coerces a list of list of cycles \smath{lls} +to a permutation. +Each cycle, represented as a list \smath{ls} with no repetitions, +is coerced to the permutation, which maps \smath{ls.i} to +\smath{ls.(i+1)} (index modulo the length of the list). +These permutations are then multiplied. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cycleTail}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{UnaryRecursiveAggregate} +{\smath{\mbox{\bf cycleTail}\opLeftPren{}u\opRightPren{}} returns the last node in the cycle of +a recursive aggregate (for example, a list) \smath{u}, or empty if none exists. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cyclic}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{ I -> SPOL RN --cyclic group}{}{} +{\smath{\mbox{\bf cyclic}\opLeftPren{}n\opRightPren{}} returns the cycle index of the +cyclic group of degree \smath{n}. +\spadtype{CycleIndicators} for details. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cyclic?}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{RecursiveAggregate} +{\smath{\mbox{\bf cyclic?}\opLeftPren{}u\opRightPren{}} tests if +recursive aggregate (for example, a list) \smath{u} has a cycle. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cyclicGroup}}\opLeftPren{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{1}{(List(Integer))->PermutationGroup(Integer)}{PermutationGroupExamples} +{\smath{\mbox{\bf cyclicGroup}\opLeftPren{}[ i_1, \ldots, i_k]\opRightPren{}} constructs +the cyclic group of order \smath{k} acting on the list of integers +\smath{i_1}, \ldots, \smath{i_k}. +Note: duplicates in the list will be removed. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cyclicGroup}}\opLeftPren{}{\it positiveInteger}\opRightPren{}% +}% +}% +{1}{(PositiveInteger)->PermutationGroup(Integer)}{PermutationGroupExamples} +{\smath{\mbox{\bf cyclicGroup}\opLeftPren{}n\opRightPren{}} constructs the cyclic group of order +\smath{n} acting on the integers 1, \ldots, \smath{n}, \smath{n > +0}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cyclicSubmodule}}\opLeftPren{}{\it listOfMatrices}, \allowbreak{}{\it vector}\opRightPren{}% +}% +}% +{2}{(List(Matrix(R)), Vector(R))->Vector(Vector(R))}{RepresentationPackage2} +{\smath{\mbox{\bf cyclicSubmodule}\opLeftPren{}lm, \allowbreak{} v\opRightPren{}}, where \smath{lm} is a list of +\smath{n} by \smath{n} square matrices and \smath{v} is a vector +of size \smath{n}, generates a basis in echelon form. +\seeDetails{RepresentationPackage2}} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{cylindrical}}\opLeftPren{}{\it point}\opRightPren{}% +}% +}% +{1}{(Point(R))->Point(R)}{CoordinateSystems} +{\smath{\mbox{\bf cylindrical}\opLeftPren{}pt\opRightPren{}} transforms \smath{pt} from polar +coordinates to Cartesian coordinates, +by mapping the point \smath{(r, theta, z)} to +\smath{x = r \cos(theta)}, \smath{y = r \sin(theta)}, \smath{z}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{D}}\opLeftPren{}{\it expression\opt{, options}}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{DifferentialRing} +{\smath{\mbox{\bf D}\opLeftPren{}x\opRightPren{}} returns the derivative of \smath{x}. +This function is a simple differential operator where no variable +needs to be specified. +\newitem\smath{\mbox{\bf D}\opLeftPren{}x, \allowbreak{} [ s_1, \ldots s_n]\opRightPren{}} computes +successive partial derivatives, that is, \smath{D(\ldots {\bf +D}(x, s_1)\ldots, s_n)}. +\newitem\smath{\mbox{\bf D}\opLeftPren{}u, \allowbreak{} x\opRightPren{}} computes the partial derivative of +\smath{u} with respect to \smath{x}. +\newitem\smath{\mbox{\bf D}\opLeftPren{}u, \allowbreak{} deriv\optinner{, n}\opRightPren{}} differentiates \smath{u} +\smath{n} times using a derivation which extends \smath{deriv} on +\smath{R}. +Argument \smath{n} defaults to 1. +\newitem\smath{\mbox{\bf D}\opLeftPren{}p, \allowbreak{} d, \allowbreak{} x'\opRightPren{}} extends the \smath{R}-derivation +\smath{d} to an extension \smath{R} in \smath{R[ x]} +where \smath{Dx} is given by \smath{x'}, and returns \smath{Dp}. +\newitem\smath{D(x, [ s_1, \ldots, s_n], [ +n_1, \ldots, n_m])} computes multiple partial derivatives, +that is, \smath{\mbox{\bf D}\opLeftPren{}\ldots {\bf D}(x, s_1, n_1)\ldots, s_n, n_m\opRightPren{}}. +\newitem\smath{\mbox{\bf D}\opLeftPren{}u, \allowbreak{} x, \allowbreak{} n\opRightPren{}} computes multiple partial derivatives, +that is, \eth{\smath{n}} derivative of \smath{u} with respect to +\smath{x}. +\newitem \smath{\mbox{\bf D}\opLeftPren{}of\optinner{, n}\opRightPren{}}, where \smath{of} is an object +of type \spadtype{OutputForm} (normally unexposed), returns an +output form for the \eth{\smath{n}} derivative of \smath{f}, for +example, \smath{f'}, \smath{f''}}, \smath{f'''}, \smath{f^{{\tt +iv}}}, and so on. +\newitem \smath{\mbox{\bf D}\opLeftPren{}\opRightPren{}\$A} provides the operator corresponding to the +derivation in the differential ring \smath{A}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{dark}}\opLeftPren{}{\it color}\opRightPren{}% +}% +}% +{1}{(Color)->\$}{Palette} +{\smath{\mbox{\bf dark}\opLeftPren{}color\opRightPren{}} returns the shade of the indicated hue of \smath{color} to its lowest value. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{ddFact}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it primeInteger}\opRightPren{}% +}% +}% +{2}{(U, Integer)->List(Record(factor:U, degree:Integer))}{ModularDistinctDegreeFactorizer} +{\smath{\mbox{\bf ddFact}\opLeftPren{}q, \allowbreak{} p\opRightPren{}} computes a distinct degree factorization of the polynomial \smath{q} modulo the prime \smath{p}, that is, such that each factor is a product of irreducibles of the same degrees. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{decimal}}\opLeftPren{}{\it rationalNumber}\opRightPren{}% +}% +}% +{1}{(Fraction(Integer))->\$}{DecimalExpansion} +{\smath{\mbox{\bf decimal}\opLeftPren{}rn\opRightPren{}} converts a rational number \smath{rn} to a decimal expansion.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{declare}}\opLeftPren{}{\it listOfInputForms}\opRightPren{}% +}% +}% +{ List $ -> Symbol}{}{} +{\smath{\mbox{\bf declare}\opLeftPren{}t\opRightPren{}} returns a name f such that f has been +declared to the interpreter to be of type t, but has +not been assigned a value yet. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{decreasePrecision}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(Integer)->PositiveInteger}{FloatingPointSystem} +{\smath{\mbox{\bf decreasePrecision}\opLeftPren{}n\opRightPren{}\$R} decreases the current +\spadfunFrom{precision}{FloatingPointSystem} by \smath{n} decimal digits.} + + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{definingPolynomial}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->UP}{MonogenicAlgebra} +{\smath{\mbox{\bf definingPolynomial}\opLeftPren{}\opRightPren{}\$R} returns the minimal polynomial for +a \spadtype{MonogenicAlgebra} domain \smath{R}, that is, one which \smath{\mbox{\bf generator}\opLeftPren{}\opRightPren{}\$R} satisfies. +\newitem\smath{\mbox{\bf definingPolynomial}\opLeftPren{}x\opRightPren{}} returns an expression \smath{p} such that \smath{p(x) = 0}, where \smath{x} is an \spadtype{AlgebraicNumber} or an object of type \spadtype{Expression}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{degree}}\opLeftPren{}{\it polynomial\opt{, symbol}}\opRightPren{}% +}% +}% +{1}{(\$)->E}{AbelianMonoidRing} +{\opkey{The meaning of degree(u\optinner{, s}) depends on the type of \smath{u}.} +\begin{simpleList} +\item if \smath{u} is a polynomial: +\smath{\mbox{\bf degree}\opLeftPren{}u, \allowbreak{} x\opRightPren{}} returns the degree of polynomial \smath{u} with respect to the variable \smath{x}. +Similarly, \smath{\mbox{\bf degree}\opLeftPren{}u, \allowbreak{} lv\opRightPren{}}, where \smath{lv} is a list of variables, returns +a list of degrees of polynomial \smath{u} with respect to each of the variables +in \smath{lv}. +\item if \smath{u} +is an element of an \spadtype{AbelianMonoidRing} or +\spadtype{GradedModule} domain: +\smath{\mbox{\bf degree}\opLeftPren{}u\opRightPren{}} returns the maximum of the exponents of the terms of \smath{u}. +\item if \smath{u} is a series: +\smath{\mbox{\bf degree}\opLeftPren{}u\opRightPren{}} returns the degree of the leading term of \smath{u}. +\item if \smath{u} is an element of a domain of category \spadtype{ExtensionField}: \smath{\mbox{\bf degree}\opLeftPren{}u\opRightPren{}} +returns the degree of the minimal polynomial of \smath{u} if \smath{u} is algebraic +with respect to the +ground field \smath{F}, and {\tt \%infinity} otherwise. +\item if \smath{u} is a permutation: +\smath{\mbox{\bf degree}\opLeftPren{}u\opRightPren{}} returns the number of points moved by the permutation. +\item if \smath{u} is a permutation group: +\smath{\mbox{\bf degree}\opLeftPren{}u\opRightPren{}} returns the number of points moved by all permutations of the group \smath{u}. +\seeOther{\spadfun{degree}} +\end{simpleList} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{delete}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it integerOrSegment}\opRightPren{}% +}% +}% +{2}{(\$, Integer)->\$}{LinearAggregate} +{\smath{\mbox{\bf delete}\opLeftPren{}u, \allowbreak{} i\opRightPren{}} returns a copy of linear aggregate \smath{u} with +the \eth{\smath{i}} element deleted. Note: for lists, +\code{delete(a, i) == {\tt concat}(a(0..i-1), a(i + 1, ..))}. +\newitem\smath{\mbox{\bf delete}\opLeftPren{}u, \allowbreak{} i..j\opRightPren{}} returns a copy of \smath{u} with the \eth{\smath{i}} +through \eth{\smath{j}} element deleted. +Note: for lists, \code{delete(a, i..j) = concat(a(0..i-1), a(j+1..))}. +\newitem\smath{\mbox{\bf delete!}\opLeftPren{}u, \allowbreak{} i\opRightPren{}} destructively deletes the \eth{\smath{i}} element of \smath{u}. +\newitem\smath{\mbox{\bf delete!}\opLeftPren{}u, \allowbreak{} i..j\opRightPren{}} destructively deletes elements \smath{u}.\smath{i} through \smath{u}.\smath{j} of \smath{u}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{deleteProperty}}\opLeftPren{}{\it basicOperator}, \allowbreak{}{\it string}\opRightPren{}% +}% +}% +{2}{(\$, String)->\$}{BasicOperator} +{\smath{\mbox{\bf deleteProperty}\opLeftPren{}op, \allowbreak{} s\opRightPren{}} destructively removes property \smath{s} from \smath{op}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{denom}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{denominator}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->D}{QuotientFieldCategory} +{\opkey{Argument x can be from domain \spadtype{Fraction(R)} for some domain \smath{R}, or of type \spadtype{Expression}} +if the result is of type \smath{R}. +\newitem +\smath{\mbox{\bf denom}\opLeftPren{}x\opRightPren{}} returns the denominator of \smath{x} as an object +of domain \smath{R}; if \smath{x} is of type \spadtype{Expression}, it returns +an object of domain \spadtype{SMP(R, Kernel(Expression R))}. +\newitem +\smath{\mbox{\bf denominator}\opLeftPren{}x\opRightPren{}} returns the denominator of \smath{x} as an element +of \spadtype{Fraction(R)}; if \smath{x} is of type \spadtype{Expression}, +it returns an object of domain Expression(R). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{denominators}}\opLeftPren{}{\it fractionOrContinuedFraction}\opRightPren{}% +}% +}% +{1}{(\$)->Stream(R)}{ContinuedFraction} +{\smath{\mbox{\bf denominator}\opLeftPren{}frac\opRightPren{}} is the denominator of the fraction \smath{frac}. +\newitem\smath{\mbox{\bf denominators}\opLeftPren{}cf\opRightPren{}} returns the stream of +denominators of the approximants of the continued fraction +\smath{x}. +If the continued fraction is finite, then the stream will be +finite. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{depth}}\opLeftPren{}{\it stack}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{StackAggregate} +{\smath{\mbox{\bf depth}\opLeftPren{}st\opRightPren{}} returns the number of elements of stack +\smath{st}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{dequeue}}\opLeftPren{}{\it queue}\opRightPren{}% + \opand \mbox{\axiomFun{dequeue!}}\opLeftPren{}{\it queue}\opRightPren{}% +}% +}% +{1}{(\$)->S}{QueueAggregate} +{\smath{\mbox{\bf dequeue}\opLeftPren{}[ x, y, \ldots, z]\opRightPren{}} creates a +dequeue with first (top or front) element \smath{x}, second +element \smath{y}, \smath{\ldots}, and last (bottom or back) element +\smath{z}. +\newitem\smath{\mbox{\bf dequeue!}\opLeftPren{}q\opRightPren{}} destructively extracts the first (top) +element from queue \smath{q}. +The element previously second in the queue becomes the first +element. +A call to \spadfun{error} occurs if \smath{q} is empty. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{derivationCoordinates}}\opLeftPren{}{\it vectorOfElements}, \allowbreak{}{\it derivationFunction}\opRightPren{}% +}% +}% +{2}{(Vector(\$), (R)->R)->Matrix(R)}{MonogenicAlgebra} +{\smath{\mbox{\bf derivationCoordinates}\opLeftPren{}v, \allowbreak{} \quad{}'\opRightPren{}} returns a matrix \smath{M} such that \smath{v' = M v}. +Argument \smath{v} is a vector of elements from \smath{R}, a domain +of category \spadtype{MonogenicAlgebra} over a ring \smath{R}. +Argument \smath{'} is a derivation function defined on \smath{R}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{derivative}}\opLeftPren{}{\it basicOperator\opt{, property}}\opRightPren{}% +}% +}% +{1}{(BasicOperator)->Union(List((List(A))->A), "failed")}{BasicOperatorFunctions1} +{\smath{\mbox{\bf derivative}\opLeftPren{}op\opRightPren{}} returns the value of the \mbox{\tt "\%diff"} +property of \smath{op} if it has one, and \mbox{\tt "failed"} otherwise. +\newitem\smath{\mbox{\bf derivative}\opLeftPren{}op, \allowbreak{} dprop\opRightPren{}} attaches \smath{dprop} as the +\mbox{\tt "\%diff"} property of \smath{op}. +Note: if \smath{op} has a \mbox{\tt "\%diff"} property \smath{f}, then +applying a derivation \smath{D} to \smath{op}(a) returns +\smath{f(a) D(a)}. +Argument \smath{op} must be unary. +\newitem\smath{\mbox{\bf derivative}\opLeftPren{}op, \allowbreak{} [f_1, \allowbreak{} \ldots, f_n]\opRightPren{}} attaches +\smath{[ f_1, \ldots, f_n]} as the \mbox{\tt "\%diff"} property +of \smath{op}. +Note: if \smath{op} has such a \mbox{\tt "\%diff"} property, then applying +a derivation \smath{D} to \smath{op(a_1, \ldots, a_n)} returns +\smath{f_1(a_1, \ldots, a_n) D(a_1) + \cdots + fn(a_1, \ldots, a_n) +D(a_n)}. +\newitem\seeAlso{\smath{D}} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{destruct}}\opLeftPren{}{\it sExpression}\opRightPren{}% +}% +}% +{1}{(\$)->List(\$)}{SExpressionCategory} +{\smath{\mbox{\bf destruct}\opLeftPren{}se\opRightPren{}}, where \smath{se} is +the \smath{SExpression} \smath{(a_1, \ldots, a_n)}, returns the list +\smath{[ a_1, \ldots, a_n]}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{determinant}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->R}{MatrixCategory} +{\smath{\mbox{\bf determinant}\opLeftPren{}m\opRightPren{}} returns the determinant of the matrix \smath{m}, or calls +\spadfun{error} if the matrix is not square. +Note: the underlying coefficient domain of \smath{m} is assumed to +have a commutative \spadop{*}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{diagonal}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(List(R))->\$}{MatrixCategory} +{\smath{\mbox{\bf diagonal}\opLeftPren{}m\opRightPren{}}, where \smath{m} is a square matrix, returns a vector +consisting of the diagonal elements of \smath{m}. +\newitem +\smath{\mbox{\bf diagonal}\opLeftPren{}f\opRightPren{}}, +where \smath{f} is a function of type \spadsig{(A, A)}{T} +is the function \smath{g} +such that \smath{g(a) = f(a, a)}. +See \spadtype{MappingPackage} for related functions. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{diagonal?}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{MatrixCategory} +{\smath{\mbox{\bf diagonal?}\opLeftPren{}m\opRightPren{}} tests if the matrix +\smath{m} is square and diagonal.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{diagonalMatrix}}\opLeftPren{}{\it listOfElements}\opRightPren{}% +}% +}% +{1}{(List(R))->\$}{MatrixCategory} +{\smath{\mbox{\bf diagonalMatrix}\opLeftPren{}l\opRightPren{}}, +where \smath{l} is a list or vector of elements, returns a +(square) diagonal matrix with those +elements of \smath{l} on the diagonal. +\newitem\smath{\mbox{\bf diagonalMatrix}\opLeftPren{}[ m_1, \ldots, m_k]\opRightPren{}} +creates a block diagonal matrix \smath{M} with block matrices +\smath{m_1}, \ldots, \smath{m_k} down the diagonal, +with 0 block matrices elsewhere.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{diagonalProduct}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->R}{SquareMatrixCategory} +{\smath{\mbox{\bf diagonalProduct}\opLeftPren{}m\opRightPren{}} returns the product of the elements on the diagonal of the matrix \smath{m}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{dictionary}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{DictionaryOperations} +{\smath{\mbox{\bf dictionary}\opLeftPren{}\opRightPren{}}\$\smath{R} creates an empty dictionary of type \smath{R}. +\newitem\smath{\mbox{\bf dictionary}\opLeftPren{}[ x, y, \ldots, z]\opRightPren{}} creates a dictionary consisting of entries \smath{x, y, \ldots, z}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{difference}}\opLeftPren{}{\it setAggregate}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(\$, S)->\$}{SetAggregate} +{\smath{\mbox{\bf difference}\opLeftPren{}u, \allowbreak{} x\opRightPren{}} returns the set aggregate \smath{u} with element +\smath{x} removed. +\newitem\smath{\mbox{\bf difference}\opLeftPren{}u, \allowbreak{} v\opRightPren{}} returns the set aggregate \smath{w} consisting of elements in set aggregate \smath{u} but not in set aggregate \smath{v}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{differentialVariables}}\opLeftPren{}{\it differentialPolynomial}\opRightPren{}% +}% +}% +{1}{(\$)->List(S)}{DifferentialPolynomialCategory}{\smath{\mbox{\bf differentialVariables}\opLeftPren{}p\opRightPren{}} returns a list of differential indeterminates occurring in a differential polynomial \smath{p}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{differentiate}}\opLeftPren{}{\it expression\opt{, options}}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{DifferentialRing} +{See \spadfun{D}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{digamma}}\opLeftPren{}{\it complexDoubleFloat}\opRightPren{}% +}% +}% +{1}{(Complex(DoubleFloat))->Complex(DoubleFloat)}{DoubleFloatSpecialFunctions} +{\smath{\mbox{\bf digamma}\opLeftPren{}x\opRightPren{}} is the function, \smath{\psi(x)}, defined by +$\psi(x) = \Gamma'(x)/\Gamma(x).$ +Argument x is either a small float or a complex small float. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{digit}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{CharacterClass} +{\smath{\mbox{\bf digit}\opLeftPren{}\opRightPren{}} returns the class of all characters for which \spadfunFrom{digit?}{Character} is \smath{true}.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{digit?}}\opLeftPren{}{\it character}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{Character} +{\smath{\mbox{\bf digit?}\opLeftPren{}ch\opRightPren{}} tests if character \smath{c} is a digit character, that is, one of 0..9.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{digits}}\opLeftPren{}{\it \opt{positiveInteger}}\opRightPren{}% +}% +}% +{1}{(PositiveInteger)->PositiveInteger}{FloatingPointSystem} +{\smath{\mbox{\bf digits}\opLeftPren{}\opRightPren{}} returns the current precision of floats in +numbers of digits. +\newitem +\smath{\mbox{\bf digits}\opLeftPren{}n\opRightPren{}} set the +\spadfunFrom{precision}{FloatingPointSystem} of floats +to \smath{n} digits. +\newitem +\smath{\mbox{\bf digits}\opLeftPren{}x\opRightPren{}} returns a stream of \smath{p}-adic +digits of p-adic integer +\smath{n}. +\seeType{PAdicInteger} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{dihedral}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{ I -> SPOL RN --dihedral group}{}{} +{\smath{\mbox{\bf dihedral}\opLeftPren{}n\opRightPren{}} is the cycle index of the +dihedral group of degree \smath{n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{dihedralGroup}}\opLeftPren{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{1}{(List(Integer))->PermutationGroup(Integer)}{PermutationGroupExamples} +{\smath{\mbox{\bf dihedralGroup}\opLeftPren{}[ i_1, \ldots, i_k]\opRightPren{}} constructs +the dihedral group of order \smath{2k} acting on the integers +\smath{i_1}, \ldots, \smath{i_k}. Note: duplicates in the list will be removed. +\newitem\smath{\mbox{\bf dihedralGroup}\opLeftPren{}n\opRightPren{}} constructs the dihedral group of order \smath{2n} +acting on integers \smath{1, \ldots, n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{dilog}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{LiouvillianFunctionCategory} +{\smath{\mbox{\bf dilog}\opLeftPren{}x\opRightPren{}} returns the dilogarithm of \smath{x}, that is, \smath{\int {log(x) / (1 - x) dx}}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{dim}}\opLeftPren{}{\it color}\opRightPren{}% +}% +}% +{1}{(Color)->\$}{Palette} +{\smath{\mbox{\bf dim}\opLeftPren{}c\opRightPren{}} sets the shade of a hue \smath{c}, above dark but +below bright.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{dimension}}\opLeftPren{}{\it \opt{various}}\opRightPren{}% +}% +}% +{0}{()->CardinalNumber}{VectorSpace} +{\smath{\mbox{\bf dimension}\opLeftPren{}\opRightPren{}\$R} returns the dimensionality of the vector space +or rank of Lie algebra \smath{R}. +\newitem\smath{\mbox{\bf dimension}\opLeftPren{}I\opRightPren{}} gives the dimension of the ideal \smath{I}. +\newitem\smath{\mbox{\bf dimension}\opLeftPren{}s\opRightPren{}} returns the dimension of the point category \smath{s}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{dioSolve}}\opLeftPren{}{\it equation}\opRightPren{}% +}% +}% +{1}{(Equation(Expression(R)))->List(Equation(Expression(R)))}{TransSolvePackage} +{\smath{\mbox{\bf dioSolve}\opLeftPren{}eq\opRightPren{}} computes a basis of all minimal solutions +for a linear homomogeneous Diophantine equation \smath{eq}, then +all minimal solutions of the inhomogeneous equation. +Alternatively, an expression \smath{u} may be given for \smath{eq} in which case the equation +\smath{eq} is defined as \smath{u=0}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{directory}}\opLeftPren{}{\it filename}\opRightPren{}% +}% +}% +{1}{(\$)->String}{FileNameCategory} +{\smath{\mbox{\bf directory}\opLeftPren{}f\opRightPren{}} returns the directory part of the file name.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{directProduct}}\opLeftPren{}{\it vector}\opRightPren{}% +}% +}% +{1}{(Vector(R))->\$}{DirectProductCategory} +{\smath{\mbox{\bf directProduct}\opLeftPren{}v\opRightPren{}} converts the vector \smath{v} to become a direct product +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{discreteLog}}\opLeftPren{}{\it finiteFieldElement}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{FiniteFieldCategory} +{\smath{\mbox{\bf discreteLog}\opLeftPren{}a\opRightPren{}\$F} computes the discrete logarithm of \smath{a} with respect to \smath{\mbox{\bf primitiveElement}\opLeftPren{}\opRightPren{}\$F} of the field \smath{F}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{discreteLog}}\opLeftPren{}{\it finiteFieldElement}, \allowbreak{}{\it finiteFieldElement}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Union(NonNegativeInteger, "failed")}{FieldOfPrimeCharacteristic} +{\smath{\mbox{\bf discreteLog}\opLeftPren{}b, \allowbreak{} a\opRightPren{}} computes \smath{s} such that +\smath{b^s = a} if such an \smath{s} exists. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{discriminant}}\opLeftPren{}{\it polynomial\opt{, symbol}}\opRightPren{}% +}% +}% +{0}{()->R}{FramedAlgebra} +{\smath{\mbox{\bf discriminant}\opLeftPren{}p\optinner{, x}\opRightPren{}} returns the discriminant of the polynomial +\smath{p} with respect to the variable \smath{x}. +If \smath{x} is univariate, the second argument may be omitted. +\newitem\smath{\mbox{\bf discriminant}\opLeftPren{}\opRightPren{}\$R} +returns \smath{\mbox{\bf determinant}\opLeftPren{}{\mbox {\bf traceMatrix}}()\$R\opRightPren{}} of a +\spadtype{FramedAlgebra} domain \smath{R}. +\newitem\smath{\mbox{\bf discriminant}\opLeftPren{}[ v_1, .., v_n]\opRightPren{}} returns \smath{\mbox{\bf determinant}\opLeftPren{}traceMatrix([ v_1, .., v_n])\opRightPren{}} where the \smath{v_i} each have \smath{n} elements. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{display}}\opLeftPren{}{\it text\opt{, width}}\opRightPren{}% +}% +}% +{1}{(\$)->Void}{ScriptFormulaFormat} +{\smath{\mbox{\bf display}\opLeftPren{}t\optinner{, w}\opRightPren{}}, +where \smath{t} is either IBM SCRIPT Formula Format or \TeX{} text, +outputs \smath{t} so that each line has length \smath{\leq w}. +The default value of \smath{w} is that length set by +the system command \spadsyscom{)set output length}. +\newitem\smath{\mbox{\bf display}\opLeftPren{}op, \allowbreak{} f\opRightPren{}} attaches \smath{f} as the \mbox{\tt "\%display"} property +of \smath{op}. +\newitem +\smath{\mbox{\bf display}\opLeftPren{}op\opRightPren{}} returns the \mbox{\tt "\%display"} property of \smath{op} if it has one attached, and \mbox{\tt "failed"} otherwise. +\newitem Value \smath{f} either has type \spadsig{OutputForm}{OutputForm} +or else \spadsig{List(OutputForm)}{OutputForm}. +Argument \smath{op} must be unary. +Note: if \smath{op} has a \mbox{\tt "\%display"} property \smath{f} of the former type, +then \smath{op(a)} gets converted to \spadtype{OutputForm} as \smath{f(a)}. +If \smath{f} has the latter type, +then \smath{op(a_1, \ldots, a_n)} gets converted to +\spadtype{OutputForm} as \smath{f(a_1, \ldots, a_n)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{distance}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Integer}{RecursiveAggregate} +{\smath{\mbox{\bf distance}\opLeftPren{}u, \allowbreak{} v\opRightPren{}}, +where \smath{u} and \smath{v} +are recursive aggregates (for example, lists) +returns the path length (an integer) from node \smath{u} to \smath{v}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{distdfact}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it boolean}\opRightPren{}% +}% +}% +{2}{(FP, Boolean)->Record(cont:F, factors:List(Record(irr:FP, pow:Integer)))}{DistinctDegreeFactorize} +{\smath{\mbox{\bf distdfact}\opLeftPren{}p, \allowbreak{} squareFreeFlag\opRightPren{}} produces the complete +\typeout{check distdfact} +factorization of the polynomial \smath{p} returning an internal +data structure. +If argument \smath{squareFreeFlag} is \smath{true}, the polynomial +is assumed square free.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{distribute}}\opLeftPren{}{\it expression\opt{, f}}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{ExpressionSpace} +{\smath{\mbox{\bf distribute}\opLeftPren{}f\optinner{, g}\opRightPren{}} expands all the kernels in +\smath{f} that contain \smath{g} in their arguments and that are +formally enclosed by a \spadfunFrom{box}{ExpressionSpace} or a +\spadfunFrom{paren}{ExpressionSpace} expression. +By default, \smath{g} is the list of all kernels in \smath{f}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{divide}}\opLeftPren{}{\it element}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Record(quotient:\$, remainder:\$)}{EuclideanDomain} +{\smath{\mbox{\bf divide}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} divides \smath{x} by \smath{y} producing a +record containing a \smath{quotient} and \smath{remainder}, where +the remainder is smaller (see +\spadfunFrom{sizeLess?}{EuclideanDomain}) than the divisor +\smath{y}.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{divideExponents}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(\$, NonNegativeInteger)->Union(\$, "failed")}{UnivariatePolynomialCategory} +{\smath{\mbox{\bf divideExponents}\opLeftPren{}p, \allowbreak{} n\opRightPren{}} returns a new polynomial resulting +from dividing all exponents of the polynomial \smath{p} by the non +negative integer \smath{n}, or \mbox{\tt "failed"} if no exponent is +exactly divisible by \smath{n}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{divisors}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(Integer)->List(Integer)}{IntegerNumberTheoryFunctions} +{\smath{\mbox{\bf divisors}\opLeftPren{}i\opRightPren{}} returns a list of the divisors of integer +\smath{i}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{domain}}\opLeftPren{}{\it typeAnyObject}\opRightPren{}% +}% +}% +{1}{(\$)->SExpression}{Any} +{\smath{\mbox{\bf domain}\opLeftPren{}a\opRightPren{}} returns the type of the original object that +was converted to \spadtype{Any} +as object of type \spadtype{SExpression} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{domainOf}}\opLeftPren{}{\it typeAnyObject}\opRightPren{}% +}% +}% +{1}{(\$)->OutputForm}{Any} +{\smath{\mbox{\bf domainOf}\opLeftPren{}a\opRightPren{}} returns a printable form of the type of the +original type of \smath{a}, an object +of type \spadtype{Any}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{dot}}\opLeftPren{}{\it vector}, \allowbreak{}{\it vector}\opRightPren{}% +}% +}% +{2}{(\$, \$)->R}{DirectProductCategory} +{\smath{\mbox{\bf dot}\opLeftPren{}v_1, \allowbreak{} v_2\opRightPren{}} computes the inner product of the vectors +\smath{v_1} and \smath{v_2}, or calls \spadfun{error} if \smath{x} +and \smath{y} are not of the same length. +\newitem \smath{\mbox{\bf dot}\opLeftPren{}of\opRightPren{}}, where \smath{of} is an object of type +\spadtype{OutputForm} (normally unexposed), returns an output form +with one dot overhead\texht{ (\.{x})}{}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{doubleRank}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(A)->NonNegativeInteger}{AlgebraPackage} +{\smath{\mbox{\bf doubleRank}\opLeftPren{}x\opRightPren{}}, +where \smath{x} is an element of a domain \smath{R} +of category \spadtype{FramedNonAssociativeAlgebra}, +determines the number of linearly independent elements in +\smath{b_1 x}, \ldots, \smath{b_n x}, where \smath{b=[ b_1, \ldots, b_n]} is the +fixed basis for \smath{R}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{doublyTransitive?}}\opLeftPren{}\opRightPren{}% +}% +}% +{1}{(UP)->Boolean}{AlgFactor} +{\smath{\mbox{\bf doublyTransitive?}\opLeftPren{}p\opRightPren{}} +tests if polynomial \smath{p}, is irreducible over the field +\smath{K} generated by its coefficients, and if \smath{p(X)/(X - +a)} is irreducible over \smath{K(a)} where \smath{p(a) = 0}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{draw}}\opLeftPren{}{\it functionOrExpression}, \allowbreak{}{\it range}\allowbreak $\,[$ , \allowbreak{}{\it options}$]$\opRightPren{}% +}% +}% +{2}{((DoubleFloat)->DoubleFloat, Segment(Float))->TwoDimensionalViewport}{TopLevelDrawFunctionsForCompiledFunctions} +{\smath{f}, \smath{g}, and \smath{h} below denote user-defined +functions which map one or more \spadtype{DoubleFloat} values to a +\spadtype{DoubleFloat} value. +\bigitem\smath{\mbox{\bf draw}\opLeftPren{}f, \allowbreak{} a..b\opRightPren{}} draws the \twodim{} graph of \smath{y = f(x)} as \smath{x} ranges from \smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to +\smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}. +\bigitem\smath{\mbox{\bf draw}\opLeftPren{}curve(f, g), \allowbreak{} a..b\opRightPren{}} draws the \twodim{} graph of +the parametric curve \smath{x = f(t), y = g(t)} as \smath{t} +ranges from \smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}. +\bigitem\smath{\mbox{\bf draw}\opLeftPren{}f, \allowbreak{} a..b, \allowbreak{} c..d\opRightPren{}} draws the \threedim{} graph of +\smath{z = f(x, y)} as \smath{x} ranges from \smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to +\smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} and \smath{y} ranges from \smath{\mbox{\bf min}\opLeftPren{}c, \allowbreak{} d\opRightPren{}} to +\smath{\mbox{\bf max}\opLeftPren{}c, \allowbreak{} d\opRightPren{}}. +\bigitem\smath{\mbox{\bf draw}\opLeftPren{}curve(f, g, h), \allowbreak{} a..b\opRightPren{}} draws a \threedim{} graph +of the parametric curve \smath{x = f(t), y = g(t), z = h(t)} as +\smath{t} ranges from \smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}. +\bigitem\smath{\mbox{\bf draw}\opLeftPren{}surface(f, g, h), \allowbreak{} a..b, \allowbreak{} c..d\opRightPren{}} draws the +\threedim{} graph of the parametric +surface \smath{x = f(u, v)}, \smath{y = g(u, v)}, \smath{z = h(u, v)} as \smath{u} ranges from \smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} and \smath{v} ranges from \smath{\mbox{\bf min}\opLeftPren{}c, \allowbreak{} d\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}c, \allowbreak{} d\opRightPren{}}. +\medbreak\bigopkey{Arguments \smath{f}, \smath{g}, and \smath{h} +below +denote an \spadtype{Expression} involving the variables indicated as arguments. +For example, \smath{f(x, y)} denotes an expression involving the +variables \smath{x} +and \smath{y}.} +\bigitem\smath{\mbox{\bf draw}\opLeftPren{}f(x), \allowbreak{} x = a..b\opRightPren{}} draws the \twodim{} graph of +\smath{y = f(x)} as +\smath{x} ranges from \smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}. +\bigitem\smath{\mbox{\bf draw}\opLeftPren{}curve(f(t), g(t)), \allowbreak{} t = a..b\opRightPren{}} draws the \twodim{} graph of the +parametric curve \smath{x = f(t), y = g(t)} as \smath{t} ranges from \smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}. +\bigitem\smath{\mbox{\bf draw}\opLeftPren{}f(x, y), \allowbreak{} x = a..b, \allowbreak{} y = c..d\opRightPren{}} draws the +\threedim{} graph of \smath{z = f(x, y)} as \smath{x} ranges from +\smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} and \smath{y} ranges from +\smath{\mbox{\bf min}\opLeftPren{}c, \allowbreak{} d\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}c, \allowbreak{} d\opRightPren{}}. +\bigitem\smath{\mbox{\bf draw}\opLeftPren{}curve(f(t), g(t), h(t)), \allowbreak{} t = a..b\opRightPren{}} draws the +\threedim{} graph of the parametric curve \smath{x = f(t)}, +\smath{y = g(t)}, \smath{z = h(t)} as \smath{t} ranges from +\smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}. +\bigitem\smath{{\bf draw}(surface(f(u, v), g(u, v), h(u, v)), u = a..b, +v = c..d)} draws the \threedim{} graph of the parametric surface +\smath{x = f(u, v)}, \smath{y = g(u, v)}, \smath{z = h(u, v)} as +\smath{u} ranges from \smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} and +\smath{v} ranges from \smath{\mbox{\bf min}\opLeftPren{}c, \allowbreak{} d\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}c, \allowbreak{} d\opRightPren{}}. +\medbreak Each of the \spadfun{draw} operations optionally take +options given as +extra arguments. +\smallbreak\opoption{adaptive}{true} turns on adaptive plotting. +\smallbreak\opoption{clip}{true} turns on \twodim{} clipping. +\smallbreak\opoption{colorFunction}{f} specifies the color based +on a function. +\smallbreak\opoption{coordinates}{p} specifies a change of +coordinate systems of point \smath{p}: +\smath{bipolar}, +\smath{bipolarCylindrical}, +\smath{conical}, +\smath{elliptic}, +\smath{ellipticCylindrical}, +\smath{oblateSpheroidal}, +\smath{parabolic}, +\smath{parabolicCylindrical}, +\smath{paraboloidal}, +\smath{prolateSpheroidal}, +\smath{spherical}, and +\smath{toroidal} +\smallbreak\opoption{curveColor}{p} specifies a color index for \twodim{} graph curves from the pallete \smath{p}. +\smallbreak\opoption{pointColor}{p} specifies a color index for \twodim{} graph points +from the palette \smath{p}. +\smallbreak\opoption{range}{[ a..b]} provides a user-specified range +for implicit curve plots. +\smallbreak\opoption{space}{sp} adds the current graph to \spadtype{ThreeSpace} object +\smath{sp}. +\smallbreak\opoption{style}{s} specifies the drawing style in +which the graph will be plotted: \smath{wire}, \smath{solid}, +\smath{shade}, \smath{smooth}. +\smallbreak\opoption{title}{s} titles the graph with string \smath{s}. +\smallbreak\opoption{toScale}{true} causes the graph to be drawn to scale. +\smallbreak\opoption{tubePoints}{n} specifies the number of points \smath{n} defining +the circle which creates the tube around a \threedim{} curve. The default value is 6. +\smallbreak\opoption{tubeRadius}{r} specifies a \spadtype{Float} radius \smath{r} +for a tube plot around a \threedim{} curve. +\smallbreak\opoption{unit}{[ a, b]} marks off the units of a \twodim{} graph +in increments \smath{a} along the x-axis, \smath{b} along the y-axis. +\smallbreak\opoption{var1Steps}{n} indicates the number of subdivisions \smath{n} +of the first range variable. +\smallbreak\opoption{var2Steps}{n} indicates the number of +subdivisions \smath{n} +of the second range variable. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{drawToScale}}\opLeftPren{}{\optArg{boolean}}\opRightPren{}% +}% +}% +{0}{()->Boolean}{GraphicsDefaults} +{\smath{\mbox{\bf drawToScale}\opLeftPren{}\opRightPren{}} tests if plots are currently to be drawn to scale. +\newitem\ +\smath{\mbox{\bf drawToScale}\opLeftPren{}true\opRightPren{}} causes plots to be drawn to scale. +\smath{\mbox{\bf drawToScale}\opLeftPren{}false\opRightPren{}} causes plots to be drawn to fill up the +viewport window. +The default setting is \smath{false}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{duplicates}}\opLeftPren{}{\it dictionary}\opRightPren{}% +}% +}% +{1}{(\$)->List(Record(entry:S, count:NonNegativeInteger))}{MultiDictionary} +{\smath{\mbox{\bf duplicates}\opLeftPren{}d\opRightPren{}} returns a list of values which have +duplicates in \smath{d}} +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{Ei}}\opLeftPren{}{\it variable}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{LiouvillianFunctionCategory} +{\smath{\mbox{\bf Ei}\opLeftPren{}x\opRightPren{}} returns the exponential integral of \smath{x}: +\smath{\int exp(x)/x {\rm dx}}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{eigenMatrix}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(Matrix(Fraction(Polynomial(Fraction(Integer)))))->Union(Matrix(Expression(Fraction(Integer))), \mbox{\tt "failed"})}{RadicalEigenPackage} +{\smath{\mbox{\bf eigenMatrix}\opLeftPren{}A\opRightPren{}} returns the matrix \smath{B} such that +\smath{BA(\mbox{\bf inverse } B)} is diagonal, or \mbox{\tt +"failed"} if no such +\smath{B} exists.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{eigenvalues}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(Matrix(Fraction(Polynomial(Fraction(Integer)))))->List(Fraction(Polynomial(Fraction(Integer))))}{EigenPackage} +{\smath{\mbox{\bf eigenvalues}\opLeftPren{}A\opRightPren{}}, +where \smath{A} is a matrix with rational function coefficients, +returns the eigenvalues of the matrix \smath{A} +which are expressible as rational functions over the rational numbers.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{eigenvector}}\opLeftPren{}{\it eigenvalue}, \allowbreak{}{\it matrix}\opRightPren{}% +}% +}% +{2}{(Fraction(Polynomial(Fraction(Integer))), Matrix(Fraction(Polynomial(Fraction(Integer)))))->List(Matrix(Fraction(Polynomial(Fraction(Integer)))))}{EigenPackage} +{\smath{\mbox{\bf eigenvector}\opLeftPren{}eigval, \allowbreak{} A\opRightPren{}} returns the eigenvectors belonging +to the eigenvalue \smath{eigval} for the matrix \smath{A}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{eigenvectors}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(Matrix(Fraction(Polynomial(Fraction(Integer)))))->List(Union(Record(algrel:Fraction(Polynomial(Fraction(Integer))), algmult:Integer, algvec:List(Matrix(Fraction(Polynomial(Fraction(Integer)))))), Record(eigval:Fraction(Polynomial(Fraction(Integer))), eigmult:Integer, eigvec:List(Matrix(Fraction(Polynomial(Fraction(Integer))))))))}{EigenPackage} +{\smath{\mbox{\bf eigenvectors}\opLeftPren{}A\opRightPren{}} returns the eigenvalues and eigenvectors +for the matrix \smath{A}. +The rational eigenvalues and the corresponding eigenvectors are +explicitly computed. +The non-rational eigenvalues are defined via their minimal +polynomial. +Their corresponding eigenvectors are expressed in terms of a +``generic'' root of this polynomial.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{element?}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it ideal}\opRightPren{}% +}% +}% +{2}{(DPoly, \$)->Boolean}{PolynomialIdeals} +{\smath{\mbox{\bf element?}\opLeftPren{}f, \allowbreak{} I\opRightPren{}} tests if the polynomial \smath{f} belongs +to the ideal \smath{I}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{elementary}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{ I -> SPOL RN}{}{} +{\smath{\mbox{\bf elementary}\opLeftPren{}n\opRightPren{}} is the \eth{\smath{n}} elementary symmetric +function expressed in terms of power sums. +See \axiomType{CycleIndicators} for details. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{elliptic}}\opLeftPren{}{\it scaleFactor}\opRightPren{}% +}% +}% +{1}{(R)->(Point(R))->Point(R)}{CoordinateSystems} +{\smath{\mbox{\bf elliptic}\opLeftPren{}r\opRightPren{}} returns a function for transforming elliptic +coordinates to Cartesian coordinates. +The function returned will map the point \smath{(u, v)} to \smath{x += r \cosh(u) \cos(v)}, \smath{y = r \sinh(u) \sin(v)}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{ellipticCylindrical}}\opLeftPren{}{\it scaleFactor}\opRightPren{}% +}% +}% +{1}{(R)->(Point(R))->Point(R)}{CoordinateSystems} +{\smath{\mbox{\bf ellipticCylindrical}\opLeftPren{}r\opRightPren{}} returns a function for +transforming elliptic cylindrical coordinates to Cartesian +coordinates as a function of the scale factor \smath{r}. +The function returned will map the point \smath{(u, v, z)} to +\smath{x = r \cosh(u) \cos(v)}, \smath{y = r \sinh(u) \sin(v)}, +\smath{z}.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{elt}}\opLeftPren{}{\it structure}, \allowbreak{}{\it various}\allowbreak $\,[$ , \allowbreak{}{\it \ldots}$]$\opRightPren{}% +}% +}% +{1}{(\$)->R}{CartesianTensor} +{\opkey{\smath{\mbox{\bf elt}\opLeftPren{}u, \allowbreak{} v\opRightPren{}}, usually written as \smath{u.v} or +\smath{u(v)}, regards the structure \smath{u} as a function and +applies structure \smath{u} to argument \smath{v}. +Many types export \spadfun{elt} with multiple arguments; +\smath{\mbox{\bf elt}\opLeftPren{}u, \allowbreak{} v, \allowbreak{} w\ldots\opRightPren{}} is generally written +\smath{u(v, w\ldots)}. +The interpretation of \smath{u} depends on its type. +If \smath{u} is:} +\begin{simpleList} +\item an indexed aggregate such as a list, stream, vector, or string: +\smath{u.i}, \smath{1 \leq i \leq maxIndex(u)}, is equivalently +written \smath{u(i)} and +returns the \eth{\smath{i}} element of \smath{u}. +Also, \smath{u(i, y)} returns \smath{u(i)} if \smath{i} is an +appropriate index for +\smath{u}, and \smath{y} otherwise. +\item a linear aggregate: +\smath{u(i..j)} returns the aggregate of elements of \smath{u(k)} +for \smath{k=i, i+1, \ldots, j} +in that order. +\item a basic operator: \smath{u(x)} applies the unary operator +\smath{u} to \smath{x}; +similarly, \smath{u.[x_1, \ldots, x_n]} applies the \smath{n}-ary operator +\smath{u} to \smath{x_1, \ldots, x_n}. +Also, +\smath{u(x, y)}, \smath{u(x, y, z)}, and \smath{u(x, y, z, w)} respectively +apply the binary, ternary, or 4-ary operator \smath{u} to arguments. +\item a univariate polynomial or rational function: +\smath{u(y)} evaluates the rational function or polynomial with +the distinguished variable replaced by the value of \smath{y}; +this value may either be another rational function or polynomial +or a member of the underlying coefficient domain. +\item a list: \smath{u.first} is equivalent to \smath{\mbox{\bf first}\opLeftPren{}u\opRightPren{}} and returns +the first element of list \smath{u}. +Also, \smath{u.last} is equivalent to \smath{\mbox{\bf last}\opLeftPren{}u\opRightPren{}} and returns +the last element of +list \smath{u}. +Both of these call \spadfun{error} if \smath{u} is the empty list. +Similarly, \smath{u.rest} is equivalent to \smath{\mbox{\bf rest}\opLeftPren{}u\opRightPren{}} and +returns the list \smath{u} +beginning at its second element, or calls \spadfun{error} if \smath{u} has less than +two elements. +\item a library: +\smath{u(name)} returns the entry in the library stored under the +key \smath{name}. +\item a linear ordinary differential operator: +\smath{u(x)} applies the differential operator \smath{u} to the +value \smath{x}. +\item a matrix or two-dimensional array: +\smath{u(i, j\optinner{, x})}, \smath{1 \leq i \leq nrows(u), 1 \leq j \leq ncols(m)}, returns the +element in the \eth{\smath{i}} row and \eth{\smath{j}} column of the matrix \smath{m}. +If the indices are out of range and an extra argument \smath{x} is provided, +then \smath{x} is returned; otherwise, \spadfun{error} is called. +Also, \smath{u([i_1, \ldots, i_m], [j_1, \ldots, j_m])} returns +the \smath{m}-by-\smath{n} matrix consisting of elements \smath{u(i_k, j_l)} of \smath{u}. +\item a permutation group: +\smath{u(i)} returns the \smath{i}-th generator of the group \smath{u}. +\item a point: \smath{u.i} returns the \eth{\smath{i}} component of the point \smath{u}. +\item a rewrite rule: +\smath{u(f\optinner{, n})} applies rewrite rule \smath{u} to expression \smath{f} +at most \smath{n} times, where \smath{n=\infty} by default. +When the left-hand side of \smath{u} matches a subexpression of \smath{f}, +the subexpression is replaced by the right-hand side of \smath{u} producing a new \smath{f}. +After \smath{n} iterations or when no further match occurs, the transformed \smath{f} +is returned. +\item a ruleset: +\smath{u(f\optinner{, n})} applies ruleset \smath{u} to expression \smath{f} at most \smath{n} +times, where \smath{n=\infty} by default. +Similar to last case, except that on each iteration, each rule in the ruleset is +applied in turn in attempt to find a match. +\item an \axiomType{SExpression} \smath{(a_1, \ldots, a_n\quad{}.\quad{}b)} +(where \smath{b} denotes the \spadfun{cdr} of the last node): +\smath{u.i} returns \smath{a_i}; similarly +\smath{u.[i_1, \ldots, i_m]} returns \smath{(a_{i_1}, \ldots, a_{i_m})}. +\item a univariate series: +\smath{u(r)} returns the coefficient of the term of degree +\smath{r} in \smath{u}. +\item a symbol: \smath{u[a_1, \ldots, a_n]} returns \smath{u} +subscripted by \smath{a_1, \ldots, a_n}. +\item a cartesian tensor: +\smath{u(r)} gives a component of a rank 1 tensor; +\smath{u([i_1, \ldots, l_n])} gives a component of a rank \smath{n} tensor; +\smath{u()} gives the component of a rank 0 tensor. +Also: \smath{u(i, j)}, +\smath{u(i, j, k)}, +and \smath{u(i, j, k, l)} gives a component of a rank 2, 3, and 4 +tensors respectively. +\item See also \axiomType{QuadraticForm}, +\axiomType{FramedNonAssociativeAlgebra}, and +\axiomType{FunctionFieldCategory}. +\end{simpleList} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{empty}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{Aggregate} +{\smath{\mbox{\bf empty}\opLeftPren{}\opRightPren{}\$R} creates an aggregate of type \smath{R} with 0 +elements.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{empty?}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{Aggregate} +{\smath{\mbox{\bf empty?}\opLeftPren{}u\opRightPren{}} tests if aggregate \smath{u} has 0 elements.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{endOfFile?}}\opLeftPren{}{\it file}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{TextFile} +{\smath{\mbox{\bf endOfFile?}\opLeftPren{}f\opRightPren{}} tests whether the file \smath{f} is +positioned after the end of all text. +If the file is open for output, then this test always returns +\smath{true}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{enqueue!}}\opLeftPren{}{\it value}, \allowbreak{}{\it queue}\opRightPren{}% +}% +}% +{2}{(S, \$)->S}{QueueAggregate} +{\smath{\mbox{\bf enqueue!}\opLeftPren{}x, \allowbreak{} q\opRightPren{}} inserts \smath{x} into the queue \smath{q} +at the back end.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{enterPointData}}\opLeftPren{}{\it space}, \allowbreak{}{\it listOfPoints}\opRightPren{}% +}% +}% +{2}{(\$, List(Point(R)))->NonNegativeInteger}{ThreeSpace} +{\smath{\mbox{\bf enterPointData}\opLeftPren{}s, \allowbreak{} [p_0, \allowbreak{} p_1, \allowbreak{} \ldots, p_n]\opRightPren{}} adds a list of points +from \smath{p_0} through \smath{p_n} to the \axiomType{ThreeSpace} +\smath{s}, and returns the index of the start of the list.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{entry?}}\opLeftPren{}{\it value}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{(Entry, \$)->Boolean}{IndexedAggregate} +{\smath{\mbox{\bf entry?}\opLeftPren{}x, \allowbreak{} u\opRightPren{}}, +where \smath{u} is an indexed aggregate +(such as a list, vector, or string), +tests if \smath{x} equals \smath{u . i} for some index \smath{i}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{epilogue}}\opLeftPren{}{\it formattedObject}\opRightPren{}% +}% +}% +{1}{(\$)->List(String)}{ScriptFormulaFormat} +{\smath{\mbox{\bf epilogue}\opLeftPren{}t\opRightPren{}} extracts the epilogue section of an IBM +SCRIPT Formula Format or \TeX{} formatted object \smath{t}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{eq}}\opLeftPren{}{\it sExpression}, \allowbreak{}{\it sExpression}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Boolean}{SExpressionCategory} +{\smath{eq(s, t)}, for \axiomType{SExpression}s +\smath{s} and \smath{t} returns \smath{true} if EQ(\smath{s}, \smath{t}) +is \smath{true} in \Lisp{}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{eq?}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Boolean}{Aggregate} +{\smath{\mbox{\bf eq?}\opLeftPren{}u, \allowbreak{} v\opRightPren{}} tests if two aggregates \smath{u} and \smath{v} +are same objects +in the \Language{} store.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{equality}}\opLeftPren{}{\it operator}, \allowbreak{}{\it function}\opRightPren{}% +}% +}% +{2}{(\$, (\$, \$)->Boolean)->\$}{BasicOperator} +{\smath{\mbox{\bf equality}\opLeftPren{}op, \allowbreak{} f\opRightPren{}} attaches \smath{f} as the \mbox{\tt "\%equal?"} property to +\smath{op}. +Argument \smath{f} must be a boolean-valued ``equality'' function defined +on \axiomType{BasicOperator} objects. +If \smath{op1} and \smath{op2} have the same name, and one of them has +an \mbox{\tt "\%equal?"} property \smath{f}, then \smath{f(op1, op2)} is called to +decide whether \smath{op1} and \smath{op2} should be considered equal.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{equation}}\opLeftPren{}{\it expression}, \allowbreak{}{\it expression}\opRightPren{}% +}% +}% +{2}{(S, S)->\$}{Equation} +{\smath{\mbox{\bf equation}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} creates the equation \smath{a = b}. +\newitem\smath{\mbox{\bf equation}\opLeftPren{}v, \allowbreak{} a..b\opRightPren{}}, +also written: \smath{v=a..b}, +creates a segment binding value with variable \smath{v} and +segment \smath{a..b}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{erf}}\opLeftPren{}{\it variable}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{LiouvillianFunctionCategory} +{\smath{\mbox{\bf erf}\opLeftPren{}x\opRightPren{}} returns the error function of \smath{x}: +\smath{{2 \over \sqrt(\pi)}\int {exp^{-x^2} dx}}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{error}}\opLeftPren{}{\it string\opt{, string}}\opRightPren{}% +}% +}% +{1}{(List(String))->Exit}{ErrorFunctions} +{\smath{\mbox{\bf error}\opLeftPren{}msg\opRightPren{}} displays error message \smath{msg} and terminates. +Argument \smath{msg} is either a string or a list of strings. +\newitem\smath{\mbox{\bf error}\opLeftPren{}name, \allowbreak{} msg\opRightPren{}} is similar except that +the error message is preceded by a message saying that the +error occured in a function named \smath{name}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{euclideanGroebner}}\opLeftPren{}{\it ideal\opt{, string, string}}\opRightPren{}% +}% +}% +{1}{(List(Dpol))->List(Dpol)}{EuclideanGroebnerBasisPackage} +{\smath{\mbox{\bf euclideanGroebner}\opLeftPren{}lp\optinner{, "info", "redcrit}\opRightPren{}} computes a Gr\"obner basis for a polynomial ideal over a Euclidean domain generated by the list of polynomials \smath{lp}. +If the string \mbox{\tt "info"} is given as a second argument, +a summary is given of the critical pairs. +If the string \mbox{\tt "redcrit"} is given as a third argument, +the critical pairs are printed.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{euclideanNormalForm}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it groebnerBasis}\opRightPren{}% +}% +}% +{2}{(Dpol, List(Dpol))->Dpol}{EuclideanGroebnerBasisPackage} +{\smath{\mbox{\bf euclideanNormalForm}\opLeftPren{}poly, \allowbreak{} gb\opRightPren{}} reduces the polynomial +\smath{poly} modulo the precomputed Gr\"obner basis \smath{gb} +giving a canonical representative of the residue class.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{euclideanSize}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{EuclideanDomain} +{\smath{\mbox{\bf euclideanSize}\opLeftPren{}x\opRightPren{}} returns the Euclidean size of the +element \smath{x}, +or calls \spadfun{error} if \smath{x} is zero. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{eulerPhi}}\opLeftPren{}{\it positiveInteger}\opRightPren{}% +}% +}% +{1}{(Integer)->Integer}{IntegerNumberTheoryFunctions} +{\smath{\mbox{\bf eulerPhi}\opLeftPren{}n\opRightPren{}} returns the number of integers between 1 and +\smath{n} (including 1) which are relatively prime to \smath{n}. +This is the Euler phi function \smath{\phi(n)}, also called the +totient function.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{euler}}\opLeftPren{}{\it positiveInteger}\opRightPren{}% +}% +}% +{1}{(Integer)->Integer}{IntegerNumberTheoryFunctions} +{\smath{\mbox{\bf euler}\opLeftPren{}n\opRightPren{}} returns the \eth{\smath{n}} Euler number. +This is \smath{2^n E(n, 1/2)}, where \smath{E(n, x)} is the +\eth{\smath{n}} Euler polynomial.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{eval}}\opLeftPren{}{\it expression\opt{, options}}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{FunctionSpace} +{\opkey{Many domains have forms of the \spadfun{eval} +defined. Here are some the most common forms.} +\newitem +\smath{\mbox{\bf eval}\opLeftPren{}f\opRightPren{}} unquotes all the quoted operators in \smath{f}. +\newitem +\smath{\mbox{\bf eval}\opLeftPren{}f, \allowbreak{} x = v\opRightPren{}} replaces symbol or expression \smath{x} by +\smath{v} in \smath{f}; +if \smath{x} is an expression, it must be retractable to a single +\axiomType{Kernel}. +\newitem +\smath{\mbox{\bf eval}\opLeftPren{}f, \allowbreak{} [x_1 = v_1, \allowbreak{} \ldots, x_n = v_n]\opRightPren{}} returns \smath{f} +with symbols +or expressions \smath{x_i} +replaced by \smath{v_i} in parallel; +if \smath{x_i} is an expression, it must be retractable to a +single \axiomType{Kernel}. +\newitem +\smath{\mbox{\bf eval}\opLeftPren{}f, \allowbreak{} [x_1, \allowbreak{} \ldots, x_n]\opRightPren{}} unquotes all +the quoted operations in \smath{f} whose name is one of the \smath{x_i}.'s. +\newitem +\smath{\mbox{\bf eval}\opLeftPren{}f, \allowbreak{} x\opRightPren{}} unquotes all quoted operators in \smath{f} +whose name is \smath{x}. +\newitem +\smath{\mbox{\bf eval}\opLeftPren{}e, \allowbreak{} s, \allowbreak{} f\opRightPren{}} +replaces every subexpression of \smath{e} of the form +\smath{s(a_1, \dots, a_n)} by \smath{f(a_1, \ldots, a_n)}. +The function \smath{f} can have type +\spadsig{Expression}{Expression} if \smath{s} is a unary operator; +otherwise \smath{f} +must have signature \spadsig{List(Expression)}{Expression}. +\newitem +\smath{\mbox{\bf eval}\opLeftPren{}e, \allowbreak{} [s_1, \allowbreak{} \ldots, s_n], [f_1, \ldots, f_n]\opRightPren{}}, +replaces every subexpression of \smath{e} of the form +\smath{s_i(a_1, \dots, a_{n_i})} by \smath{f_i(a_1, \ldots, a_{n_i})}. +If all the \smath{s_i}'s are unary operators, the functions +\smath{f_i} can have signature \spadsig{Expression}{Expression}; +otherwise, the \smath{f_i} must have signature +\spadsig{List(Expression)}{Expression}. +\newitem +\smath{\mbox{\bf eval}\opLeftPren{}p, \allowbreak{} el\opRightPren{}}, where \smath{p} is a permutation, +returns the image of element {\it el} under \smath{p}. +\newitem +\smath{\mbox{\bf eval}\opLeftPren{}s\opRightPren{}}, where \spad{s} is of type \axiomType{SymmetricPolynomial} with +rational number coefficients, returns the sum of the coefficients of a cycle index. +See \axiomType{CycleIndicators} for details. +\newitem +\smath{\mbox{\bf eval}\opLeftPren{}f, \allowbreak{} s\opRightPren{}}, where \spad{s} is of type \axiomType{SymmetricPolynomial} +with rational number coefficients and \spad{f} is a function of type +\spadsig{Integer}{Algebra Fraction Integer}, +evaluates the cycle index s by applying +the function \spad{f} to each integer in a monomial partition, +forms their product and sums the results over all monomials. +See \axiomType{EvaluateCycleIndicators} for details. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{evaluate}}\opLeftPren{}{\it operator}, \allowbreak{}{\it function}\opRightPren{}% +}% +}% +{2}{(BasicOperator, (A)->A)->BasicOperator}{BasicOperatorFunctions1} +{\smath{\mbox{\bf evaluate}\opLeftPren{}op\opRightPren{}} returns the value of the \mbox{\tt "\%eval"} property +of \axiomType{BasicOperator} +object \smath{op} if it has one, and \mbox{\tt "failed"} otherwise. +\newitem +\smath{\mbox{\bf evaluate}\opLeftPren{}op, \allowbreak{} f\opRightPren{}} attaches \smath{f} as the \mbox{\tt "\%eval"} +property of \smath{op}. +If \smath{op} has an \mbox{\tt "\%eval"} property \smath{f}, then applying +\smath{op} to a +returns the result of \smath{f(a)}. +If \smath{f} takes a single argument, then +applying \smath{op} to a value \smath{a} returns the result \smath{f(a)}. +If \smath{f} takes a list of arguments, then +applying \smath{op} to \smath{a_1, \ldots, a_n} returns the +result of \smath{f(a_1, \ldots, a_n)}. +\newitem +Argument \smath{f} may also be an anonymous function of +the form \smath{u +-> g(u)}. In this case, +\smath{g} {\it must} be additive, +that is, \smath{g(a + b) = g(a) + g(b)} for any +\smath{a} and \smath{b} in \smath{R}. +This implies that \smath{g(n a) = n g(a)} for any \smath{a} +in \smath{R} and integer \smath{n > 0}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{even?}}\opLeftPren{}{\it integerNumber}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{IntegerNumberSystem} +{\smath{\mbox{\bf even?}\opLeftPren{}n\opRightPren{}} tests if integer \smath{n} is even. +\newitem +\smath{\mbox{\bf even?}\opLeftPren{}p\opRightPren{}} tests if permutation \smath{p} is an even +permutation, that is, that +the \smath{\mbox{\bf sign}\opLeftPren{}p) = 1}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{every?}}\opLeftPren{}{\it predicate}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{((S)->Boolean, \$)->Boolean}{HomogeneousAggregate} +{\smath{\mbox{\bf every?}\opLeftPren{}pred, \allowbreak{} u\opRightPren{}} tests if {\it pred(x)} is \smath{true} +for all elements \smath{x} of \smath{u}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{exists?}}\opLeftPren{}{\it file}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{FileNameCategory} +{\smath{\mbox{\bf exists?}\opLeftPren{}f\opRightPren{}} tests if the file \smath{f} exists in the file +system.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{exp}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{expIfCan}}\opLeftPren{}{\it x}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{ElementaryFunctionCategory} +{\smath{\mbox{\bf exp}\opLeftPren{}x\opRightPren{}} returns {\tt \%e} to the power \smath{x}. +\newitem +\smath{\mbox{\bf expIfCan}\opLeftPren{}z\opRightPren{}} returns exp(\smath{z}) if possible, and +\mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{exp1}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{Float} +{\smath{\mbox{\bf exp1}\opLeftPren{}\opRightPren{}\$R} returns exp 1: \smath{2.7182818284\ldots} either +a float or a small float according to whether \smath{R=} \axiomType{Float} +or \smath{R=} \axiomType{DoubleFloat}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{expand}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf expand}\opLeftPren{}f\opRightPren{}} performs the following expansions +on \axiomType{Expression} \smath{f:} +\begin{simpleList} +\item Logs of products are expanded into sums of logs. +\item Trigonometric and hyperbolic trigonometric functions of +sums are expanded into sums of products of trigonometric +and hyperbolic trigonometric functions. +\item Formal powers of the form \smath{(a/b)^c} are expanded into +\smath{a^c b^{(-c)}}. +\end{simpleList} +\newitem +\smath{\mbox{\bf expand}\opLeftPren{}ir\opRightPren{}}, +where \smath{ir} is an \axiomType{IntegrationResult}, +returns the list of possible real functions corresponding to \smath{ir}. +\newitem +\smath{\mbox{\bf expand}\opLeftPren{}lseg\opRightPren{}}, +where \smath{lseg} is a list of segments, returns a list with all segments +expanded. +For example, \code{expand [1..4, 7..9] = [1, 2, 3, 4, 7, 8, 9]}. +\newitem +\smath{\mbox{\bf expand}\opLeftPren{}l..h \mbox{ \tt by } k\opRightPren{}} returns +a list of explicit elements. +For example, \code{expand(1..5 by 2) = [1, 3, 5]}. +\newitem +\smath{\mbox{\bf expand}\opLeftPren{}f\opRightPren{}} returns an unfactored form of factored object \smath{f}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{expandLog}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf expandLog}\opLeftPren{}f\opRightPren{}} converts every \smath{\mbox{\bf log}\opLeftPren{}a/b\opRightPren{}} +appearing in \axiomType{Expression} \smath{f} into \smath{\log(a) - \log(b)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{expandPower}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf expandPower}\opLeftPren{}f\opRightPren{}} converts every power \smath{(a/b)^c} appearing +in \axiomType{Expression} \smath{f} into \smath{a^c b^{-c}}.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{explicitEntries?}}\opLeftPren{}{\it stream}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{LazyStreamAggregate} +{\smath{\mbox{\bf explicitEntries?}\opLeftPren{}s\opRightPren{}} tests if the stream \smath{s} has +explicitly computed entries. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{explicitlyEmpty?}}\opLeftPren{}{\it stream}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{LazyStreamAggregate} +{\smath{\mbox{\bf explicitlyEmpty?}\opLeftPren{}s\opRightPren{}} tests if the stream is an (explicitly) empty stream. +Note: this is a null test which will not cause lazy evaluation.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{explicitlyFinite?}}\opLeftPren{}{\it stream}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{StreamAggregate} +{\smath{\mbox{\bf explicitlyFinite?}\opLeftPren{}s\opRightPren{}} tests if the stream \smath{s} has a finite +number of elements. Note: for many datatypes, \code{explicitlyFinite?(s) = not possiblyInfinite?(s)}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{exponent}}\opLeftPren{}{\it floatOrFactored}\opRightPren{}% +}% +}% +{1}{(\$)->Integer}{FloatingPointSystem} +{\smath{\mbox{\bf exponent}\opLeftPren{}fl\opRightPren{}} returns the +\spadfunFrom{exponent}{FloatingPointSystem} part of +a float or small float \smath{fl}. +\newitem +\smath{\mbox{\bf exponent}\opLeftPren{}u\opRightPren{}}, where \smath{u} is a factored object, returns the +exponent of the +first factor of \smath{u}, or 0 if the factored object consists solely of a unit. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{expressIdealMember}}\opLeftPren{}{\it listOfIdeals}, \allowbreak{}{\it ideal}\opRightPren{}% +}% +}% +{2}{(List(\$), \$)->Union(List(\$), "failed")}{PrincipalIdealDomain} +{\smath{\mbox{\bf expressIdealMember}\opLeftPren{}[f_1, \allowbreak{} \ldots, f_n], h\opRightPren{}} returns a representation of ideal \smath{h} as a linear combination of the ideals \smath{f_i} or \mbox{\tt "failed"} if \smath{h} is not in the ideal generated by the \smath{f_i}.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{exptMod}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it nonNegativeInteger}, \allowbreak{}{\it polynomial}\allowbreak $\,[$ , \allowbreak{}{\it prime}$]$\opRightPren{}% +}% +}% +{3}{(FP, NonNegativeInteger, FP)->FP}{DistinctDegreeFactorize} +{\smath{\mbox{\bf exptMod}\opLeftPren{}u, \allowbreak{} k, \allowbreak{} v\optinner{, p}\opRightPren{}} +raises the polynomial \smath{u} to the \eth{\smath{k}} power modulo the polynomial \smath{v}. +If a prime \smath{p} is given, the power is also computed modulo that prime. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{exquo}}\opLeftPren{}{\it element}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(\$, R)->Union(\$, "failed")}{ComplexCategory} +{\smath{\mbox{\bf exquo}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} either returns an element \smath{c} such that +\smath{cb=a} or \mbox{\tt "failed"} if no such element can be found. +Values \smath{a} and \smath{b} are members of a domain of category +\axiomType{IntegralDomain}. +\newitem\smath{\mbox{\bf exquo}\opLeftPren{}A, \allowbreak{} r\opRightPren{}} returns the exact quotient of the +elements of matrix \smath{A} by +coefficient \smath{r}, or calls \spadfun{error} if this is not +possible. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{extend}}\opLeftPren{}{\it stream}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(\$, Integer)->\$}{LazyStreamAggregate} +{\smath{\mbox{\bf extend}\opLeftPren{}ps, \allowbreak{} n\opRightPren{}}, where \smath{ps} is a power series, +causes all terms of \smath{ps} of degree \smath{\leq n} to be computed. +\newitem\smath{\mbox{\bf extend}\opLeftPren{}st, \allowbreak{} n\opRightPren{}}, where \smath{st} is a stream, causes +entries +to be computed so that \smath{st} has at least \smath{n} +explicit entries, or so that all entries of \smath{st} are finite with +length \smath{\leq n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{extendedEuclidean}}\opLeftPren{}{\it element}, \allowbreak{}{\it element}\allowbreak $\,[$ , \allowbreak{}{\it element}$]$\opRightPren{}% +}% +}% +{2}{(\$, \$)->Record(coef1:\$, coef2:\$, generator:\$)}{EuclideanDomain} +{\opkey{Argments \smath{x}, \smath{y}, and \smath{z} are members +of a domain of category \axiomType{EuclideanDomain}.} +\newitem\smath{\mbox{\bf extendedEuclidean}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} returns a record +\smath{rec} containing three fields: \smath{coef1}, \smath{coef2}, +and \smath{generator} where \smath{rec.coef1*x+rec.coef2*y = +rec.generator} and \smath{rec.generator} is a \smath{gcd} of +\smath{x} and \smath{y}. +The \smath{gcd} is unique only up to associates if +\spadatt{canonicalUnitNormal} is not asserted. +Note: See \spadfun{principalIdeal} for a version of this operation +which accepts an arbitrary length list of arguments. +\newitem\smath{\mbox{\bf extendedEuclidean}\opLeftPren{}x, \allowbreak{} y, \allowbreak{} z\opRightPren{}} either returns a record +\smath{rec} of two fields \smath{coef1} and \smath{coef2} where +\smath{rec.coef1*x+rec.coef2*y=z}, and \mbox{\tt "failed"} if \smath{z} +cannot be expressed as such a linear combination of \smath{x} and +\smath{y}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{extendedIntegrate}}\opLeftPren{}{\it rationalFnct}, \allowbreak{}{\it symbol}, \allowbreak{}{\it rationalFnct}\opRightPren{}% +}% +}% +{3}{(Fraction(Polynomial(F)), Symbol, Fraction(Polynomial(F)))->Union(Record(ratpart:Fraction(Polynomial(F)), coeff:Fraction(Polynomial(F))), "failed")}{RationalFunctionIntegration} +{\smath{\mbox{\bf extendedIntegrate}\opLeftPren{}f, \allowbreak{} x, \allowbreak{} g\opRightPren{}} returns fractions \smath{[h, +c]} such that \smath{dc/dx = 0} and \smath{dh/dx = f - cg} if +\smath{(h, c)} exist, and \mbox{\tt "failed"} otherwise.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{extensionDegree}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->OnePointCompletion(PositiveInteger)}{ExtensionField} +{\smath{\mbox{\bf extensionDegree}\opLeftPren{}\opRightPren{}\$F} returns the degree of the field extension \smath{F} +if the extension is algebraic, and {\tt infinity} if it is not.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{extension}}\opLeftPren{}{\it filename}\opRightPren{}% +}% +}% +{1}{(\$)->String}{FileNameCategory} +{\smath{\mbox{\bf extension}\opLeftPren{}fn\opRightPren{}} returns the type part of the file name +\smath{fn} as a string.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{extract!}}\opLeftPren{}{\it bag}\opRightPren{}% +}% +}% +{1}{(\$)->S}{BagAggregate} +{\smath{\mbox{\bf extract!}\opLeftPren{}bg\opRightPren{}} destructively removes a (random) item from +bag \smath{bg}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{extractBottom!}}\opLeftPren{}{\it dequeue}\opRightPren{}% +}% +}% +{1}{(\$)->S}{DequeueAggregate} +{\smath{\mbox{\bf extractBottom!}\opLeftPren{}d\opRightPren{}} destructively extracts the bottom +(back) element from the dequeue \smath{d}, or calls +\spadfun{error} if \smath{d} is empty.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{extractTop!}}\opLeftPren{}{\it dequeue}\opRightPren{}% +}% +}% +{1}{(\$)->S}{DequeueAggregate} +{\smath{\mbox{\bf extractTop!}\opLeftPren{}d\opRightPren{}} destructively extracts the top (front) +element from the +dequeue \smath{d}, or calls \spadfun{error} if \smath{d} is empty.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{e}}\opLeftPren{}{\it positiveInteger}\opRightPren{}% +}% +}% +{1}{(PositiveInteger)->\$}{CliffordAlgebra} +{\smath{\mbox{\bf e}\opLeftPren{}n\opRightPren{}} produces the appropriate unit element of a +\axiomType{CliffordAlgebra}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{factor}}\opLeftPren{}{\it polynomial\opt{, numbers}}\opRightPren{}% +}% +}% +{1}{(\$)->Factored(\$)}{UniqueFactorizationDomain} +{\smath{\mbox{\bf factor}\opLeftPren{}x\opRightPren{}} returns the factorization of \smath{x} into +irreducibles, where \smath{x} is a member of any domain of +category \axiomType{UniqueFactorizationDomain}. +\newitem\smath{\mbox{\bf factor}\opLeftPren{}p, \allowbreak{} lan\opRightPren{}}, where \smath{p} is a polynomial +and \smath{lan} is a list of algebraic numbers, factors \smath{p} +over the extension generated by the algebraic numbers given by the +list \smath{lan}. +\newitem\smath{\mbox{\bf factor}\opLeftPren{}upoly, \allowbreak{} prime\opRightPren{}}, where \smath{upoly} is a +univariate polynomial and \smath{prime} is a prime integer, +returns the list of factors of \smath{upoly} modulo the integer +prime \smath{p}, or calls \spadfun{error} if \smath{upoly} is not +square-free modulo \smath{p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{factorFraction}}\opLeftPren{}{\it fraction}\opRightPren{}% +}% +}% +{1}{(Fraction(Polynomial(R)))->Fraction(Factored(Polynomial(R)))}{RationalFunctionFactorizer} +{\smath{\mbox{\bf factorFraction}\opLeftPren{}r\opRightPren{}} factors the numerator and the +denominator of the polynomial fraction \smath{r}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{factorGroebnerBasis}}\opLeftPren{}{\it listOfPolynomials\opt{, boolean}}\opRightPren{}% +}% +}% +{1}{(List(Dpol))->List(List(Dpol))}{GroebnerFactorizationPackage} +{\smath{\mbox{\bf factorGroebnerBasis}\opLeftPren{}basis\optinner{, flag}\opRightPren{}} checks +whether the \smath{basis} contains reducible polynomials and uses +these to split the \smath{basis}. +Information about partial results is given if a second argument of +\smath{true} is given. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{factorials}}\opLeftPren{}{\it expression\opt{, symbol}}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{CombinatorialOpsCategory} +{\smath{\mbox{\bf factorials}\opLeftPren{}f\optinner{, x}\opRightPren{}} rewrites the permutations and +binomials in \smath{f} in terms of factorials. +If a symbol \smath{x} is given as a second argument, +the operation rewrites only those terms involving \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{factorial}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(I)->I}{IntegerCombinatoricFunctions} +{\smath{\mbox{\bf factorial}\opLeftPren{}n\opRightPren{}}, where \smath{n} is an integer, returns the +integer value of \smath{n! += \prod\nolimits_1^n{i}}. +\newitem \smath{\mbox{\bf factorial}\opLeftPren{}n\opRightPren{}}, where n is an expression, returns a +formal expression denoting \smath{n!} Note: \smath{n! += n (n-1)!} when \smath{n > 0}; also, \smath{0! += 1}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{factorList}}\opLeftPren{}{\it factoredForm}\opRightPren{}% +}% +}% +{1}{(\$)->List(Record(flg:Union("nil", "sqfr", "irred", "prime"), fctr:R, xpnt:Integer))}{Factored} +{\smath{\mbox{\bf factorList}\opLeftPren{}f\opRightPren{}}, for a factored form \smath{f}, returns +list of records. +Each record corresponds to a factor of \smath{f} and has three +fields: \smath{flg}, \smath{fctr}, and \smath{xpnt}. +The \smath{fctr} lists the factor and \smath{xpnt}, the exponent. +The \smath{flg} is one of the strings: \mbox{\tt "nil"}, \mbox{\tt "sqfr"}, +\mbox{\tt "irred"}, or \mbox{\tt "prime"}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{factorPolynomial}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(SparseUnivariatePolynomial(\$))->Factored(SparseUnivariatePolynomial(\$))}{PolynomialFactorizationExplicit} +{\smath{\mbox{\bf factorPolynomial}\opLeftPren{}p\opRightPren{}} returns the factorization +of a sparse univariate polynomial \smath{p} as a factored form.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{factors}}\opLeftPren{}{\it factoredForm}\opRightPren{}% +}% +}% +{1}{(\$)->List(Record(factor:R, exponent:Integer))}{Factored} +{\smath{\mbox{\bf factors}\opLeftPren{}u\opRightPren{}} returns a list of the factors of a factored +form \smath{u} in a form as a list suitable for iteration. +Each element in the list is a record containing both a +\smath{factor} and \smath{exponent} field. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{factorsOfCyclicGroupSize}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->List(Record(factor:Integer, exponent:Integer))}{FiniteFieldCategory} +{\smath{\mbox{\bf factorsOfCyclicGroupSize}\opLeftPren{}\opRightPren{}} returns the factorization of +\smath{\mbox{\bf size}\opLeftPren{})-1}} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{factorSquareFreePolynomial}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(SparseUnivariatePolynomial(\$))->Factored(SparseUnivariatePolynomial(\$))}{PolynomialFactorizationExplicit} +{\smath{\mbox{\bf factorSquareFreePolynomial}\opLeftPren{}p\opRightPren{}} factors the univariate +polynomial \smath{p} into irreducibles, where \smath{p} is known to +be square free and primitive with respect to its main variable.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{fibonacci}}\opLeftPren{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{1}{(Integer)->Integer}{IntegerNumberTheoryFunctions} +{\smath{\mbox{\bf fibonacci}\opLeftPren{}n\opRightPren{}} returns the \eth{\smath{n}} Fibonacci +number. +The Fibonacci numbers \smath{F[n]} are defined by \smath{F[0] = +F[1] = 1} and \smath{F[n] = F[n-1] + F[n-2]}. +The algorithm has running time \smath{O(\log(n)^3)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{filename}}\opLeftPren{}{\it directory}, \allowbreak{}{\it name}, \allowbreak{}{\it extension}\opRightPren{}% +}% +}% +{3}{(String, String, String)->\$}{FileNameCategory} +{\smath{\mbox{\bf filename}\opLeftPren{}d, \allowbreak{} n, \allowbreak{} e\opRightPren{}} creates a file name with string +\smath{d} as its directory, string \smath{n} as its name and +string \smath{e} as its extension. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{fill!}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it value}\opRightPren{}% +}% +}% +{2}{(\$, Entry)->\$}{IndexedAggregate} +{\smath{\mbox{\bf fill!}\opLeftPren{}a, \allowbreak{} x\opRightPren{}} replaces each entry in aggregate \smath{a} by +\smath{x}. +The modified \smath{a} is returned. +If \smath{a} is a domain of category +\smath{TwoDimensionalArrayCategory} such as a matrix, +\smath{\mbox{\bf fill!}\opLeftPren{}a, \allowbreak{} x\opRightPren{}} sets every element of \smath{a} to \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{filterUntil}}\opLeftPren{}{\it predicate}, \allowbreak{}{\it stream}\opRightPren{}% +}% +}% +{2}{((S)->Boolean, \$)->\$}{InfiniteTuple} +{\smath{\mbox{\bf filterUntil}\opLeftPren{}p, \allowbreak{} s\opRightPren{}} returns \smath{[x_0, x_1, \ldots, x_n]}, +where stream \smath{s = [x_0, x_1, x_2, ..]} and \smath{n} is the smallest index +such that \smath{p(x_n) = true}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{filterWhile}}\opLeftPren{}{\it predicate}, \allowbreak{}{\it stream}\opRightPren{}% +}% +}% +{2}{((S)->Boolean, \$)->\$}{Stream} +{\smath{\mbox{\bf filterWhile}\opLeftPren{}pred, \allowbreak{} s\opRightPren{}} returns \smath{[x_0, x_1, \ldots, +x_{(n-1)}]} where +\smath{s = [x_0, x_1, x_2, ..]} and +\smath{n} is the smallest index such that \smath{p(x_n) = false}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{find}}\opLeftPren{}{\it predicate}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{((S)->Boolean, \$)->Union(S, "failed")}{Collection} +{\smath{\mbox{\bf find}\opLeftPren{}pred, \allowbreak{} u\opRightPren{}} returns the first \smath{x} in \smath{u} +such that \smath{\mbox{\bf pred}\opLeftPren{}x\opRightPren{}} is \smath{true}, and \mbox{\tt "failed"} +if no such \smath{x} exists.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{findCycle}}\opLeftPren{}{\it nonNegativeInteger}, \allowbreak{}{\it stream}\opRightPren{}% +}% +}% +{2}{(NonNegativeInteger, \$)->Record(cycle?:Boolean, prefix:NonNegativeInteger, period:NonNegativeInteger)}{Stream} +{\smath{\mbox{\bf findCycle}\opLeftPren{}n, \allowbreak{} st\opRightPren{}} determines if stream \smath{st} is +periodic within \smath{n} +terms. +The operation returns a record with three fields: \smath{cycle?}, +\smath{prefix}, and \smath{period}. +If \smath{cycle?} has value true, +\smath{period} denotes the period of the cycle, +and \smath{prefix} gives the number of terms in the stream before +the cycle begins. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{finite?}}\opLeftPren{}{\it cardinalNumber}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{CardinalNumber} +{\smath{\mbox{\bf finite?}\opLeftPren{}f\opRightPren{}} tests if expression f is finite. +\newitem +\smath{\mbox{\bf finite?}\opLeftPren{}a\opRightPren{}} tests if cardinal number \smath{a} is a +finite cardinal, that is, an integer. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{fintegrate}}\opLeftPren{}{\it taylorSeries}, \allowbreak{}{\it symbol}, \allowbreak{}{\it coefficient}\opRightPren{}% +}% +}% +{3}{(()->\$, Symbol, Coef)->\$}{TaylorSeries} +{\smath{\mbox{\bf fintegrate}\opLeftPren{}s, \allowbreak{} v, \allowbreak{} c\opRightPren{}} integrates the series \smath{s} with +respect to variable \smath{v} and having \smath{c} as the constant of integration. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{first}}\opLeftPren{}{\it aggregate\opt{, nonNegativeInteger}}\opRightPren{}% +}% +}% +{1}{(\$)->Entry}{IndexedAggregate} +{\smath{\mbox{\bf first}\opLeftPren{}u\opRightPren{}} returns the first element \smath{x} of aggregate \smath{u}. +\newitem\smath{\mbox{\bf first}\opLeftPren{}u, \allowbreak{} n\opRightPren{}} returns a copy of the first \smath{n} +elements of \smath{u}. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{fixedPoint}}\opLeftPren{}{\it function\opt{, positiveInteger}}\opRightPren{}% +}% +}% +{ (A->A) -> A}{}{} +{\smath{\mbox{\bf fixedPoint}\opLeftPren{}f\opRightPren{}}, +a function of type \spadsig{A}{A}, +is the fixed point of function \smath{f}. +That is, \smath{\mbox{\bf fixedPoint}\opLeftPren{}f) = f(\mbox{\bf fixedPoint}(f))}. +\newitem +\smath{\mbox{\bf fixedPoint}\opLeftPren{}f, \allowbreak{} n\opRightPren{}}, +where \smath{f} is a function of type \spadsig{List(A)}{List(A)} +and \smath{n} is a positive integer, is the fixed point of function +\smath{f} which is assumed to transform a list of length +\smath{n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{fixedPoints}}\opLeftPren{}{\it permutation}\opRightPren{}% +}% +}% +{1}{(\$)->Set(S)}{Permutation} +{\smath{\mbox{\bf fixedPoints}\opLeftPren{}p\opRightPren{}} returns the points fixed by the permutation \smath{p}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{flagFactor}}\opLeftPren{}{\it base}, \allowbreak{}{\it exponent}, \allowbreak{}{\it flag}\opRightPren{}% +}% +}% +{3}{(R, Integer, Union("nil", "sqfr", "irred", "prime"))->\$}{Factored} +{\smath{\mbox{\bf flagFactor}\opLeftPren{}base, \allowbreak{} exponent, \allowbreak{} flag\opRightPren{}} creates a factored object with a single factor whose \smath{base} is asserted to be properly described by the information \smath{flag}: +one of the strings \mbox{\tt "nil"}, \mbox{\tt "sqfr"}, \mbox{\tt "irred"}, and \mbox{\tt "prime"}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{flatten}}\opLeftPren{}{\it inputForm}\opRightPren{}% +}% +}% +{ $ -> $}{}{} +{\smath{\mbox{\bf flatten}\opLeftPren{}s\opRightPren{}} returns an input form corresponding to \smath{s} with +all the nested operations flattened to triples using new +local variables. +This operation is used to optimize compiled code. +} +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{flexible?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf flexible?}\opLeftPren{}\opRightPren{}\$R} tests if \smath{2 \mbox{\bf +associator}(a, b, a) = 0} +for all \smath{a}, \smath{b} in a domain \smath{R} +of category \axiomType{FiniteRankNonAssociativeAlgebra}. +Note: only this can be tested since, in general, it is not known +whether \smath{2a=0} implies \smath{a=0}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{flexibleArray}}\opLeftPren{}{\it listOfElements}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf flexibleArray}\opLeftPren{}ls\opRightPren{}} creates a flexible array from a list of +elements \smath{ls}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{float?}}\opLeftPren{}{\it sExpression}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{SExpressionCategory}{\smath{\mbox{\bf float?}\opLeftPren{}s\opRightPren{}} is \smath{true} if \smath{s} is an atom and belongs o \smath{Flt}.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{float}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}\allowbreak $\,[$ , \allowbreak{}{\it positiveinteger}$]$\opRightPren{}% +}% +}% +{2}{(Integer, Integer)->\$}{FloatingPointSystem} +{\smath{\mbox{\bf float}\opLeftPren{}a, \allowbreak{} e\opRightPren{}} returns \smath{a {\tt base()}^e} as a float. +\newitem\smath{\mbox{\bf float}\opLeftPren{}a, \allowbreak{} e, \allowbreak{} b\opRightPren{}} returns \smath{a b ^ e} as a float.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{floor}}\opLeftPren{}{\it rationalNumber}\opRightPren{}% +}% +}% +{1}{(\$)->D}{QuotientFieldCategory} +{\smath{\mbox{\bf floor}\opLeftPren{}fr\opRightPren{}}, +where \smath{fr} is a fraction, +returns the largest integral element below \smath{fr}. +\newitem \smath{\mbox{\bf floor}\opLeftPren{}fl\opRightPren{}}, where \smath{fl} is a float, +returns the largest integer \smath{<= fl}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{formula}}\opLeftPren{}{\it formulaFormat}\opRightPren{}% +}% +}% +{1}{(\$)->List(String)}{ScriptFormulaFormat} +{\smath{\mbox{\bf formula}\opLeftPren{}t\opRightPren{}} extracts the formula section of an IBM +SCRIPT Formula formatted object \smath{t}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{fractionPart}}\opLeftPren{}{\it fraction}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{QuotientFieldCategory} +{\smath{\mbox{\bf fractionPart}\opLeftPren{}x\opRightPren{}} returns the fractional part of \smath{x}. +Argument \smath{x} can be a fraction, a radix (binary, decimal, or +hexadecimal) expansion, or a float. +Note: \smath{x} = whole(\smath{x}) + fractionPart(\smath{x}). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{fractRadix}}\opLeftPren{}{\it listOfIntegers}, \allowbreak{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{2}{(List(Integer), List(Integer))->\$}{RadixExpansion} +{\smath{\mbox{\bf fractRadix}\opLeftPren{}pre, \allowbreak{} cyc\opRightPren{}} creates a fractional radix expansion +from a list of prefix ragits and a list of cyclic ragits. +For example, \smath{\mbox{\bf fractRadix}\opLeftPren{}[1], \allowbreak{} [6]\opRightPren{}} will return +\smath{0.16666666\ldots}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{fractRagits}}\opLeftPren{}{\it radixExpansion}\opRightPren{}% +}% +}% +{1}{(\$)->Stream(Integer)}{RadixExpansion} +{\smath{\mbox{\bf fractRagits}\opLeftPren{}rx\opRightPren{}} returns the ragits of the fractional +part of a radix expansion as a stream of integers.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{freeOf?}}\opLeftPren{}{\it expression}, \allowbreak{}{\it kernel}\opRightPren{}% +}% +}% +{2}{(\$, Symbol)->Boolean}{ExpressionSpace} +{\smath{\mbox{\bf freeOf?}\opLeftPren{}x, \allowbreak{} k\opRightPren{}} tests if expression \smath{x} does not +contain +any operator whose name is the symbol or kernel \smath{k}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{Frobenius}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{ExtensionField} +{\smath{\mbox{\bf Frobenius}\opLeftPren{}a\opRightPren{}\$F} returns \smath{a^q} where \smath{q} is +the \smath{\mbox{\bf size}\opLeftPren{}\opRightPren{}\$F} of extension field \smath{F}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{front}}\opLeftPren{}{\it queue}\opRightPren{}% +}% +}% +{1}{(\$)->S}{QueueAggregate} +{\smath{\mbox{\bf front}\opLeftPren{}q\opRightPren{}} returns the element at the front of the queue, or +calls \spadfun{error} if \smath{q} is empty.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{frst}}\opLeftPren{}{\it stream}\opRightPren{}% +}% +}% +{1}{(\$)->S}{LazyStreamAggregate} +{\smath{\mbox{\bf frst}\opLeftPren{}s\opRightPren{}} returns the first element of stream \smath{s}. +Warning: this function should only be called after a +\smath{empty?} test has been made since there is no error check.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{function}}\opLeftPren{}{\it expression}, \allowbreak{}{\it name}\allowbreak $\,[$ , \allowbreak{}{\it options}$]$\opRightPren{}% +}% +}% +{2}{(S, Symbol)->Symbol}{MakeFunction} +{\opkey{Most domains provide an operation which converts +objects to type \axiomType{InputForm}. +Argument \smath{e} below denotes an object from such a domain. +These operations create user-functions from already computed results.} +\newitem\smath{\mbox{\bf function}\opLeftPren{}e, \allowbreak{} f\opRightPren{}} creates a function \smath{f() == e}. +\newitem\smath{\mbox{\bf function}\opLeftPren{}e, \allowbreak{} f, \allowbreak{} [x_1, \allowbreak{} \ldots, x_n]\opRightPren{}} creates a function \smath{f(x_1, \ldots, x_n) == e}. +\newitem\smath{\mbox{\bf function}\opLeftPren{}e, \allowbreak{} f, \allowbreak{} x\opRightPren{}} creates a function \smath{f(x) == e}. +\newitem\smath{\mbox{\bf function}\opLeftPren{}e, \allowbreak{} f, \allowbreak{} x, \allowbreak{} y\opRightPren{}} creates a function \smath{f(x, y) == e}. +\newitem\smath{\mbox{\bf function}\opLeftPren{}expr, \allowbreak{} [x_1, \allowbreak{} \ldots, x_n], f\opRightPren{}}, +where \smath{expr} is an input form and +where \smath{f} and the \smath{x_i}'s are symbols, +returns the input form +corresponding to \smath{f(x_1, \ldots, x_n) == {\rm i}}. +See also \spadfun{unparse}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{Gamma}}\opLeftPren{}{\it smallFloat}\opRightPren{}% +}% +}% +{1}{(Complex(DoubleFloat))->Complex(DoubleFloat)}{DoubleFloatSpecialFunctions} +{\smath{\mbox{\bf Gamma}\opLeftPren{}x\opRightPren{}} is the Euler gamma function, \smath{\mbox{\bf Gamma}\opLeftPren{}x\opRightPren{}}, +defined by +\smath{\Gamma(x) = \int\nolimits_0^\infty {t^{(x-1)}*exp(-t) dt}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{gcdPolynomial}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it polynomial}\opRightPren{}% +}% +}% +{2}{(SparseUnivariatePolynomial(\$), SparseUnivariatePolynomial(\$))->SparseUnivariatePolynomial(\$)}{PolynomialFactorizationExplicit} +{\smath{\mbox{\bf gcdPolynomial}\opLeftPren{}p, \allowbreak{} q\opRightPren{}} returns the \spadfun{gcd} of the +univariate polynomials \smath{p} and \smath{q}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{gcd}}\opLeftPren{}{\it element\opt{, element, element}}\opRightPren{}% +}% +}% +{1}{(List(\$))->\$}{GcdDomain} +{\smath{\mbox{\bf gcd}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} returns the greatest common divisor of \smath{x} and \smath{y}. +Arguments \smath{x} and \smath{y} are elements of a domain of +category \smath{GcdDomain}. +\newitem\smath{\mbox{\bf gcd}\opLeftPren{}[x_1, \allowbreak{} \ldots, x_n]\opRightPren{}} returns the +common \smath{gcd} of the elements of the list of \smath{x_i}. +\newitem\smath{\mbox{\bf gcd}\opLeftPren{}p_1, \allowbreak{} p_2, \allowbreak{} prime\opRightPren{}} computes the \smath{gcd} of the univariate +polynomials \smath{p_1} and \smath{p_2} modulo the prime integer \smath{prime}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{generalizedContinuumHypothesisAssumed?}}\opLeftPren{}{\it \opt{bool}}\opRightPren{}% +}% +}% +{0}{()->Boolean}{CardinalNumber} +{\smath{\mbox{\bf generalizedContinuumHypothesisAssumed?}\opLeftPren{}\opRightPren{}} tests if the hypothesis is currently assumed. +\newitem +\smath{\mbox{\bf generalizedContinuumHypothesisAssumed}\opLeftPren{}bool\opRightPren{}} dictates +that the hypothesis is or is not to be assumed, according to +whether \smath{bool} is true or false.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{generalPosition}}\opLeftPren{}{\it ideal}, \allowbreak{}{\it listOfVariables}\opRightPren{}% +}% +}% +{2}{(\$, List(OrderedVariableList(vl)))->Record(mval:Matrix(F), invmval:Matrix(F), genIdeal:\$)}{PolynomialIdeals} +{\smath{\mbox{\bf generalPosition}\opLeftPren{}I, \allowbreak{} listvar\opRightPren{}} performs a random linear +transformation on the variables in \smath{listvar} and returns +the transformed ideal \smath{I} along with the change of basis matrix. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{generate}}\opLeftPren{}{\it function\opt{, element}}\opRightPren{}% +}% +}% +{1}{(()->S)->\$}{Stream} +{\smath{\mbox{\bf generate}\opLeftPren{}f\opRightPren{}}, +where \smath{f} is a function of no arguments, +creates an infinite stream all of whose elements are equal to +the value of \smath{f()}. Note: \smath{\mbox{\bf generate}\opLeftPren{}f) = [f(), f(), f(), \ldots]}. +\newitem\smath{\mbox{\bf generate}\opLeftPren{}f, \allowbreak{} x\opRightPren{}}, +where \smath{f} is a function of one argument, +creates an infinite stream whose first element is \smath{x} +and whose \eth{\smath{n}} element (\smath{n > 1}) is \smath{f} applied to the +previous element. +Note: \smath{\mbox{\bf generate}\opLeftPren{}f, x) = [x, f(x), f(f(x)), \ldots]}. +\newitem See also \axiomType{HallBasis}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{generator}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{FiniteAlgebraicExtensionField} +{\smath{\mbox{\bf generator}\opLeftPren{}\opRightPren{}\$R} returns a root of the defining polynomial +of a domain of category \axiomType{FiniteAlgebraicExtensionField} \smath{R}. +This element generates the field as an algebra over the ground field. +\newitem +See also \axiomType{MonogenicAlgebra} and \axiomType{FreeNilpotentLie}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{generators}}\opLeftPren{}{\it ideal}\opRightPren{}% +}% +}% +{1}{(\$)->List(DPoly)}{PolynomialIdeals} +{\smath{\mbox{\bf generators}\opLeftPren{}I\opRightPren{}} returns a list of generators for the ideal \smath{I}. +\newitem\smath{\mbox{\bf generators}\opLeftPren{}gp\opRightPren{}} returns the generators of a permutation +group {\it gp}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{genus}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->NonNegativeInteger}{FunctionFieldCategory} +{\smath{\mbox{\bf genus}\opLeftPren{}\opRightPren{}}{\bf \$}\smath{R} returns the genus of +the algebraic function field \smath{R}. +If \smath{R} has several +absolutely irreducible components, then the genus of one of them is +returned. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{getMultiplicationMatrix}}\opLeftPren{}\opRightPren{}% + \optand \mbox{\axiomFun{getMultiplicationTable}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Matrix(PrimeField(p))}{FiniteFieldNormalBasis} +{\smath{\mbox{\bf getMultiplicationMatrix}\opLeftPren{}\opRightPren{}\$R} returns a matrix multiplication table +for domain \axiomType{FiniteFieldNormalBasis(p, n)}, +a finite extension field of degree \smath{n} over the domain +\axiomType{PrimeField(p)} with \smath{p} elements. +Each element of the matrix is a member of the underlying prime field. +\newitem +\smath{\mbox{\bf getMultiplicationTable}\opLeftPren{}\opRightPren{}\$R} is similar except that the +multiplication table for the normal basis of the field +is represented by a vector of lists of records, each record +having two fields: \smath{value}, an element of the prime field over +which the domain is built, and \smath{index}, a small integer. +This table is used to perform multiplications between field elements. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{getVariableOrder}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Record(high:List(Symbol), low:List(Symbol))}{UserDefinedVariableOrdering} +{\smath{\mbox{\bf getVariableOrder}\opLeftPren{}\opRightPren{}} returns \smath{[[b_1, \ldots, b_m], +[a_1, \ldots, a_n]]} such that the ordering on the variables was given +by \smath{\mbox{\bf setVariableOrder}\opLeftPren{}[b_1, \allowbreak{} \ldots, b_m], [a_1, \ldots, a_n]\opRightPren{}}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{getZechTable}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->PrimitiveArray(SingleInteger)}{FiniteFieldCyclicGroup} +{\smath{\mbox{\bf getZechTable}\opLeftPren{}\opRightPren{}\$F} returns the Zech logarithm table of the +\index{Zech logarithm} +field +\smath{F} where \smath{F} is some domain +\axiomType{FiniteFieldCyclicGroup(p, extdeg)}. +This table is used to perform additions in the field quickly.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{gramschmidt}}\opLeftPren{}{\it listOfMatrices}\opRightPren{}% +}% +}% +{1}{(List(Matrix(Expression(Fraction(Integer)))))->List(Matrix(Expression(Fraction(Integer))))}{RadicalEigenPackage} +{\opkey{Argument \smath{lv} has the form of a list of matrices of +elements of type \axiomType{Expression}.} +\newitem +\smath{\mbox{\bf gramschmidt}\opLeftPren{}lv\opRightPren{}} converts the list of column vectors +\smath{lv} into a set of orthogonal column vectors of Euclidean +length 1 using the Gram-Schmidt algorithm. +\index{Gram-Schmidt algorithm} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{graphs}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{ I -> SPOL RN}{}{} +{\smath{\mbox{\bf graphs}\opLeftPren{}n\opRightPren{}} is the cycle index of the group induced on +the edges of a graph by applying the symmetric function to the +\smath{n} nodes. +See \axiomType{CycleIndicators} for details. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{green}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{Color} +{\smath{\mbox{\bf green}\opLeftPren{}\opRightPren{}} returns the position of the green hue from total hues.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{groebner}}\opLeftPren{}{\it listOfPolynomials}\opRightPren{}% +}% +}% +{1}{(List(Dpol))->List(Dpol)}{GroebnerPackage} +{\smath{\mbox{\bf groebner}\opLeftPren{}lp\opRightPren{}} computes a Gr\"obner basis for a polynomial +ideal generated by the list of polynomials \smath{lp}. +\newitem \smath{\mbox{\bf groebner}\opLeftPren{}I\opRightPren{}} returns a set of generators of ideal +\smath{I} that are a Gr\"obner basis for \smath{I}. +\newitem \smath{\mbox{\bf groebner}\opLeftPren{}lp, \allowbreak{} infoflag\opRightPren{}} computes a Gr\"obner basis +for a polynomial ideal generated by the list of polynomials +\smath{lp}. +Argument \smath{infoflag} is used to get information on the +computation. +If \smath{infoflag} is \mbox{\tt "info"}, then summary information is displayed for +each s-polynomial generated. +If \smath{infoflag} is \mbox{\tt "redcrit"}, the reduced critical pairs are +displayed. +To get the display of both kinds of information, use +\smath{\mbox{\bf groebner}\opLeftPren{}lp, \allowbreak{} "info", \allowbreak{} "redcrit"\opRightPren{}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{groebner?}}\opLeftPren{}{\it ideal}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{PolynomialIdeals} +{\smath{\mbox{\bf groebner?}\opLeftPren{}I\opRightPren{}} tests if the generators of the ideal +\smath{I} are a Gr\"obner basis.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{groebnerIdeal}}\opLeftPren{}{\it listOfPolynomials}\opRightPren{}% +}% +}% +{1}{(List(DPoly))->\$}{PolynomialIdeals} +{\smath{\mbox{\bf groebnerIdeal}\opLeftPren{}lp\opRightPren{}} constructs the ideal generated by the +list of +polynomials \smath{lp} assumed to be a Gr\"obner basis. +Note: this operation avoids a Gr\"obner basis computation.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{groebnerFactorize}}\opLeftPren{}{\it listOfPolynomials\opt{options}}\opRightPren{}% +}% +}% +{1}{(List(Dpol))->List(List(Dpol))}{GroebnerFactorizationPackage} +{\smath{\mbox{\bf groebnerFactorize}\opLeftPren{}lp\optinner{, bool}\opRightPren{}} returns +a list of list of polynomials, each inner list denoting a Gr\"obner basis. +The union of the solutions of the bases is the solution of the system of +equations given by \smath{lp}. +Information about partial results is printed if a +second argument is given with value \smath{true}. +\newitem +\smath{\mbox{\bf groebnerFactorize}\opLeftPren{}lp, \allowbreak{} nonZeroRestrictions\optinner{, bool}\opRightPren{}}, +where \smath{nonZeroRestrictions} is a list of polynomials, is similar. +Here, however, the solutions to the system of equations are computed +under the restriction that the polynomials in the second argument +do not vanish. +Information about partial results is printed if a +third argument with value \smath{true} is given. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{ground}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{ground?}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{FiniteAbelianMonoidRing} +{\smath{\mbox{\bf ground}\opLeftPren{}p\opRightPren{}} retracts expression polynomial \smath{p} to the coefficient ring, or +calls \spadfun{error} if such a retraction is not possible. +\newitem +\smath{\mbox{\bf ground?}\opLeftPren{}p\opRightPren{}} tests if an expression or polynomial \smath{p} is a member of the coefficient ring. +\seeAlso{\spadfun{ground?}} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{harmonic}}\opLeftPren{}{\it positiveInteger}\opRightPren{}% +}% +}% +{1}{(Integer)->Fraction(Integer)}{IntegerNumberTheoryFunctions} +{\smath{\mbox{\bf harmonic}\opLeftPren{}n\opRightPren{}} returns the \eth{\smath{n}} harmonic number, defined by +\smath{H[n] = \sum\nolimits_{k=1}^n {1/k}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{has}}\opLeftPren{}{\it domain}, \allowbreak{}{\it property}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf has}\opLeftPren{}R, \allowbreak{} prop\opRightPren{}} tests if domain \smath{R} has +property \smath{prop}. +Argument \smath{prop} is either a category, operation, an attribute, +or a combination of these. +For example, \code{Integer has Ring} +and \code{Integer has commutative("*")}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{has?}}\opLeftPren{}{\it operation}, \allowbreak{}{\it property}\opRightPren{}% +}% +}% +{2}{(\$, String)->Boolean}{BasicOperator} +{\smath{\mbox{\bf has?}\opLeftPren{}op, \allowbreak{} s\opRightPren{}} tests if property \smath{s} is attached to +\smath{op}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{hash}}\opLeftPren{}{\it number}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{IntegerNumberSystem} +{\smath{\mbox{\bf hash}\opLeftPren{}n\opRightPren{}} returns the hash code for \smath{n}, +an integer or a float.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{hasHi}}\opLeftPren{}{\it segment}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{UniversalSegment} +{\smath{\mbox{\bf hasHi}\opLeftPren{}seg\opRightPren{}} tests whether the segment \smath{seg} has an +upper bound. +For example, \smath{\mbox{\bf hasHi}\opLeftPren{}1..) = false}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{hasSolution?}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it vector}\opRightPren{}% +}% +}% +{2}{(M, Col)->Boolean}{LinearSystemMatrixPackage} +{\smath{\mbox{\bf hasSolution?}\opLeftPren{}A, \allowbreak{} B\opRightPren{}} tests if the linear system \smath{AX = B} has a solution, +where \smath{A} is a matrix and \smath{B} is a (column) vector.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{hconcat}}\opLeftPren{}{\it outputForms\opt{, outputForm}}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf hconcat}\opLeftPren{}o_1, \allowbreak{} o_2\opRightPren{}}, where \smath{o_1} and \smath{o_2} are +objects of type \axiomType{OutputForm} (normally unexposed), +returns an output form for the horizontal concatenation of forms +\smath{o_1} and \smath{o_2}. +\newitem +\smath{\mbox{\bf hconcat}\opLeftPren{}lof\opRightPren{}}, +where \smath{lof} is a list of objects of type +\axiomType{OutputForm} (normally unexposed), +returns an output form for the horizontal concatenation of the +elements of \smath{lof}. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{heap}}\opLeftPren{}{\it listOfElements}\opRightPren{}% +}% +}% +{2}{((S, S)->Boolean, V)->V}{FiniteLinearAggregateSort} +{\smath{\mbox{\bf heap}\opLeftPren{}ls\opRightPren{}} creates a \axiomType{Heap} of elements consisting +of the elements of \smath{ls}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{heapSort}}\opLeftPren{}{\it predicate}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{((S, S)->Boolean, V)->V}{FiniteLinearAggregateSort} +{\smath{\mbox{\bf heapSort}\opLeftPren{}pred, \allowbreak{} agg\opRightPren{}} sorts the aggregate agg with the +ordering function \smath{pred} using the heapsort algorithm.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{height}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{ExpressionSpace} +{\smath{\mbox{\bf height}\opLeftPren{}f\opRightPren{}}, where \smath{f} is an expression, returns the +highest nesting level appearing in \smath{f}. +Constants have height 0. +Symbols have height 1. +For any operator \smath{op} and expressions \smath{f_1}, \ldots, +\smath{f_n}, +\smath{op(f_1, \ldots, f_n)} has height equal to \smath{1 + +max(height(f_1), \ldots, height(f_n))}. +\newitem\smath{\mbox{\bf height}\opLeftPren{}d\opRightPren{}} returns the number of elements in +dequeue \smath{d}. +Note: \smath{\mbox{\bf height}\opLeftPren{}d) = \# d}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{hermiteH}}\opLeftPren{}{\it nonNegativeInteger}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(NonNegativeInteger, R)->R}{OrthogonalPolynomialFunctions} +{\smath{\mbox{\bf hermiteH}\opLeftPren{}n, \allowbreak{} x\opRightPren{}} is the \eth{\smath{n}} Hermite polynomial, +\smath{H[n](x)}, defined by +\smath{\mbox{\bf exp}\opLeftPren{}2 t x-t^2) = \sum\nolimits_{n=0}^\infty{H[n](x)t^n/n!}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{hexDigit}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{CharacterClass} +{\smath{\mbox{\bf hexDigit}\opLeftPren{}\opRightPren{}} returns the class of all characters for which +\spadfunFrom{hexDigit?}{Character} is \smath{true}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{hexDigit?}}\opLeftPren{}{\it character}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{Character} +{\smath{\mbox{\bf hexDigit?}\opLeftPren{}c\opRightPren{}} tests if \smath{c} is a hexadecimal numeral, +that is, one of 0..9, a..\smath{f} or A..\smath{F}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{hex}}\opLeftPren{}{\it rationalNumber}\opRightPren{}% +}% +}% +{1}{(Fraction(Integer))->\$}{HexadecimalExpansion} +{\smath{\mbox{\bf hex}\opLeftPren{}r\opRightPren{}} converts a rational number to a hexadecimal +expansion.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{hi}}\opLeftPren{}{\it segment}\opRightPren{}% +}% +}% +{1}{(\$)->S}{SegmentCategory} +{\smath{\mbox{\bf hi}\opLeftPren{}s\opRightPren{}} returns the second endpoint of segment \smath{s}. +For example, \smath{\mbox{\bf hi}\opLeftPren{}l..h) = h}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{horizConcat}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it matrix}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{MatrixCategory} +{\smath{\mbox{\bf horizConcat}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} horizontally concatenates two matrices +with an equal number of rows. +The entries of \smath{y} appear to the right of the entries of +\smath{x}. +The operation calls \spadfun{error} if the matrices do not have the same number of rows.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{htrigs}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf htrigs}\opLeftPren{}f\opRightPren{}} converts all the exponentials in expression \smath{f} into hyperbolic sines and cosines.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{hue}}\opLeftPren{}{\it palette}\opRightPren{}% +}% +}% +{1}{(\$)->Color}{Palette} +{\smath{\mbox{\bf hue}\opLeftPren{}p\opRightPren{}} returns the hue field of the indicated palette \smath{p}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{hue}}\opLeftPren{}{\it color}\opRightPren{}% +}% +}% +{1}{(\$)->Integer}{Color} +{\smath{\mbox{\bf hue}\opLeftPren{}c\opRightPren{}} returns the hue index of the indicated color \smath{c}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{hypergeometric0F1}}\opLeftPren{}{\it complexDF}, \allowbreak{}{\it complexSF}\opRightPren{}% +}% +}% +{2}{(Complex(DoubleFloat), Complex(DoubleFloat))->Complex(DoubleFloat)}{DoubleFloatSpecialFunctions} +{\smath{\mbox{\bf hypergeometric0F1}\opLeftPren{}c, \allowbreak{} z\opRightPren{}} is the hypergeometric function \smath{0F1(c; z)}. +Arguments \smath{c} and \smath{z} are both either small floats +or complex small floats.} +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{ideal}}\opLeftPren{}{\it polyList}\opRightPren{}% +}% +}% +{1}{(List(DPoly))->\$}{PolynomialIdeals} +{\smath{\mbox{\bf ideal}\opLeftPren{}polyList\opRightPren{}} constructs the ideal generated by the +list of polynomials \smath{polyList}. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{imag}}\opLeftPren{}{\it expression}\opRightPren{}% + \optand \mbox{\axiomFun{imagi}}\opLeftPren{}{\it quaternionOrOctonion}\opRightPren{}% + \opand \mbox{\axiomFun{imagI}}\opLeftPren{}{\it octonion}\opRightPren{}% +}% +}% +{1}{(\$)->R}{OctonionCategory} +{\smath{\mbox{\bf imag}\opLeftPren{}x\opRightPren{}} extracts the imaginary part of a complex value or +expression \smath{x}. +\newitem +\smath{\mbox{\bf imagI}\opLeftPren{}q\opRightPren{}} extracts the \smath{i} part of quaternion \smath{q}. +Similarly, operations \spadfun{imagJ}, +and \spadfun{imagK} are used to extract the \smath{j} and \smath{k} parts. +\newitem +\smath{\mbox{\bf imagi}\opLeftPren{}o\opRightPren{}} extracts the \smath{i} part of octonion \smath{o}. +Similarly, \spadfun{imagj}, \spadfun{imagk}, \spadfun{imagE}, +\spadfun{imagI}, \spadfun{imagJ}, and \spadfun{imagK} are used to extract other parts. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{implies}}\opLeftPren{}{\it boolean}, \allowbreak{}{\it boolean}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{Boolean} +{\smath{\mbox{\bf implies}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} tests if boolean value \smath{a} +implies boolean value \smath{b}. The +result is \smath{true} except when \smath{a} is \smath{true} +and \smath{b} is \smath{false}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{in?}}\opLeftPren{}{\it ideal}, \allowbreak{}{\it ideal}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Boolean}{PolynomialIdeals} +{\smath{\mbox{\bf in?}\opLeftPren{}I, \allowbreak{} J\opRightPren{}} tests if the ideal \smath{I} is contained in the ideal \smath{J}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{inHallBasis}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{4}{(Integer, Integer, Integer, Integer)->Boolean}{HallBasis} +{\smath{inHallBasis?(n, leftCandidate, rightCandidate, +left)} tests to see if a new element should be added to the +\smath{P}. +Hall basis being constructed. +The list \smath{[leftCandidate, wt, rightCandidate]} is included in +the basis if in the unique factorization of +\smath{rightCandidate}, we have left factor \smath{leftOfRight}, and +\smath{leftOfRight <= leftCandidate}} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{increasePrecision}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(Integer)->PositiveInteger}{FloatingPointSystem} +{\smath{\mbox{\bf increasePrecision}\opLeftPren{}n\opRightPren{}} +increases the current \spadfunFrom{precision}{FloatingPointSystem} +by \smath{n} decimal digits.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{index}}\opLeftPren{}{\it positiveInteger}\opRightPren{}% +}% +}% +{1}{(PositiveInteger)->\$}{Finite} +{\smath{\mbox{\bf index}\opLeftPren{}i\opRightPren{}} takes a positive integer \smath{i} less than or +equal to \smath{\mbox{\bf size}\opLeftPren{}\opRightPren{}} and +returns the \eth{\smath{i}} element of the set. +This operation establishes a bijection between +the elements of the finite set and \smath{1..{\mbox {\bf size}}()}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{index?}}\opLeftPren{}{\it index}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{(Index, \$)->Boolean}{IndexedAggregate} +{\smath{\mbox{\bf index?}\opLeftPren{}i, \allowbreak{} u\opRightPren{}} tests if \smath{i} is an index of +aggregate \smath{u}. +For example, \code{index?(2, [1, 2, 3])} is \smath{true} +but \code{index?(4, [1, 2, 3])} is \smath{false}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{infieldIntegrate}}\opLeftPren{}{\it rationalFunction}, \allowbreak{}{\it symbol}\opRightPren{}% +}% +}% +{2}{(Fraction(Polynomial(F)), Symbol)->Union(Fraction(Polynomial(F)), "failed")}{RationalFunctionIntegration} +{\smath{\mbox{\bf infieldIntegrate}\opLeftPren{}f, \allowbreak{} x\opRightPren{}}, +where \smath{f} is a fraction of polynomials, returns a fraction +\smath{g} such that \smath{{dg\over dx} = f} if \smath{g} exists, +and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{infinite?}}\opLeftPren{}{\it orderedCompletion}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{OrderedCompletion} +{\smath{\mbox{\bf infinite?}\opLeftPren{}x\opRightPren{}} tests if \smath{x} is infinite, +where \smath{x} is a member of the ordered +completion of a domain. +\seeType{OrderedCompletion}} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{infinity}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->OnePointCompletion(Integer)}{Infinity} +{\smath{\mbox{\bf infinity}\opLeftPren{}\opRightPren{}} returns \smath{infinity} +denoting \smath{+\infty} as a one point completion of the integers. +\seeType{OnePointCompletion} +See also \spadfun{minusInfinity} and \spadfun{plusInfinitity}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{infix}}\opLeftPren{}{\it outputForm}, \allowbreak{}{\it outputForms}\allowbreak $\,[$ , \allowbreak{}{\it OutputForm}$]$\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf infix}\opLeftPren{}o, \allowbreak{} lo\opRightPren{}}, +where \smath{o} is an object of type \spadtype{OutputForm} (normally unexposed) +and \smath{lo} is a list of objects of type \spadtype{OutputForm}, +creates a form depicting the \smath{n}ary application +of infix operation \smath{o} to a tuple of arguments \smath{lo}. +\newitem +\smath{\mbox{\bf infix}\opLeftPren{}o, \allowbreak{} a, \allowbreak{} b\opRightPren{}}, +where \smath{o}, \smath{a}, and \smath{b} are objects of type \spadtype{OutputForm} (normally unexposed), +creates an output form which displays as: \smath{a\ {\rm op}\ b}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{initial}}\opLeftPren{}{\it differentialPolynomial}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{DifferentialPolynomialCategory} +{\smath{\mbox{\bf initial}\opLeftPren{}p\opRightPren{}} returns the leading coefficient of +differential polynomial \smath{p} expressed as +a univariate polynomial in its leader.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{initializeGroupForWordProblem}}\opLeftPren{}{\it group\opt{, integer, integer}}\opRightPren{}% +}% +}% +{1}{(\$)->Void}{PermutationGroup} +{\smath{\mbox{\bf initializeGroupForWordProblem}\opLeftPren{}gp \optinner{, n, m}\opRightPren{}} +initializes the group {\it gp} for the word problem. +\seeDetails{PermutationGroup} +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{input}}\opLeftPren{}{\it operator\opt{, function}}\opRightPren{}% +}% +}% +{1}{(\$)->Union((List(InputForm))->InputForm, "failed")}{BasicOperator} +{\smath{\mbox{\bf input}\opLeftPren{}op\opRightPren{}} returns the \mbox{\tt "\%input"} property of \smath{op} +if it has one attached, and \mbox{\tt "failed"} otherwise. +\newitem +\smath{\mbox{\bf input}\opLeftPren{}op, \allowbreak{} f\opRightPren{}} attaches \smath{f} as the \mbox{\tt "\%input"} property +of \smath{op}. +If \smath{op} has a \mbox{\tt "\%input"} property \smath{f}, then \smath{op(a1, \ldots, an)} is +converted to InputForm using \smath{f(a1, \ldots, an)}. +Argument f must be a function with signature +\spadsig{List(InputForm)}{InputForm}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{inRadical?}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it ideal}\opRightPren{}% +}% +}% +{2}{(DPoly, \$)->Boolean}{PolynomialIdeals} +{\smath{\mbox{\bf inRadical?}\opLeftPren{}f, \allowbreak{} I\opRightPren{}} tests if some power of the polynomial \smath{f} belongs to the ideal \smath{I}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{insert}}\opLeftPren{}{\it x}, \allowbreak{}{\it aggregate}\allowbreak $\,[$ , \allowbreak{}{\it integer}$]$\opRightPren{}% +}% +}% +{3}{(S, \$, Integer)->\$}{LinearAggregate} +{\smath{\mbox{\bf insert}\opLeftPren{}x, \allowbreak{} u, \allowbreak{} i\opRightPren{}} returns a copy of \smath{u} having +\smath{x} as its \eth{\smath{i}} element. +\newitem\smath{\mbox{\bf insert}\opLeftPren{}v, \allowbreak{} u, \allowbreak{} k\opRightPren{}} returns a copy of \smath{u} having \smath{v} +inserted beginning at the \eth{\smath{i}} element. +\newitem +\smath{\mbox{\bf insert!}\opLeftPren{}x, \allowbreak{} u\opRightPren{}} destructively inserts item \smath{x} into +bag \smath{u}. +\newitem +\smath{\mbox{\bf insert!}\opLeftPren{}x, \allowbreak{} u\opRightPren{}} destructively inserts item \smath{x} as a +leaf into binary search +tree or binary tournament \spad{u}. +\newitem +\smath{\mbox{\bf insert!}\opLeftPren{}x, \allowbreak{} u, \allowbreak{} i\opRightPren{}} destructively inserts \smath{x} into +aggregate \smath{u} at position \smath{i}. +\newitem +\smath{\mbox{\bf insert!}\opLeftPren{}v, \allowbreak{} u, \allowbreak{} i\opRightPren{}} destructively inserts aggregate \smath{v} +into \smath{u} at position \smath{i}. +\newitem +\smath{\mbox{\bf insert!}\opLeftPren{}x, \allowbreak{} d, \allowbreak{} n\opRightPren{}} destructively inserts \smath{n} copies of +\smath{x} into dictionary \smath{d}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{insertBottom!}}\opLeftPren{}{\it element}, \allowbreak{}{\it queue}\opRightPren{}% +}% +}% +{2}{(S, \$)->S}{DequeueAggregate} +{\smath{\mbox{\bf insertBottom!}\opLeftPren{}x, \allowbreak{} d\opRightPren{}} destructively inserts \smath{x} into the dequeue \smath{d} at the bottom (back) of the dequeue. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{insertTop!}}\opLeftPren{}{\it element}, \allowbreak{}{\it dequeue}\opRightPren{}% +}% +}% +{2}{(S, \$)->S}{DequeueAggregate} +{\smath{\mbox{\bf insertTop!}\opLeftPren{}x, \allowbreak{} d\opRightPren{}} destructively inserts \smath{x} into the dequeue \smath{d} +at the top (front). The element previously at the top of the dequeue becomes the second in the dequeue, and so on. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{integer}}\opLeftPren{}{\it expression}\opRightPren{}% + \optand \mbox{\axiomFun{integer?}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{integerIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(S)->Boolean}{IntegerRetractions} +{\smath{\mbox{\bf integer}\opLeftPren{}x\opRightPren{}} returns \smath{x} as an integer, or calls \spadfun{error} +if this is not possible. +\newitem +\smath{\mbox{\bf integer?}\opLeftPren{}x\opRightPren{}} tests if expression \smath{x} is an integer. +\newitem +\smath{\mbox{\bf integerIfCan}\opLeftPren{}x\opRightPren{}} returns expression x as of type \spadtype{Integer} +or else \mbox{\tt "failed"} if it cannot. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{integerPart}}\opLeftPren{}{\it float}\opRightPren{}% +}% +}% +{1}{(\$)->Integer}{RealNumberSystem} +{\smath{\mbox{\bf integerPart}\opLeftPren{}fl\opRightPren{}} returns the integer part of the +mantissa of float \smath{fl}.} + + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{integral}}\opLeftPren{}{\it expression}, \allowbreak{}{\it symbol}\opRightPren{}% + \opand \mbox{\axiomFun{integral}}\opLeftPren{}{\it expression}, \allowbreak{}{\it segmentBinding}\opRightPren{}% +}% +}% +{2}{(\$, SegmentBinding(\$))->\$}{PrimitiveFunctionCategory} +{\smath{\mbox{\bf integral}\opLeftPren{}f, \allowbreak{} x\opRightPren{}} returns the formal integral \smath{\int {f dx}}. +\newitem +\smath{\mbox{\bf integral}\opLeftPren{}f, \allowbreak{} x = a..b\opRightPren{}} returns the formal definite integral +\smath{\int\nolimits_a^b{f(x) dx}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{integralBasis}}\opLeftPren{}\opRightPren{}% + \opand \mbox{\axiomFun{integralBasisAtInfinity}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Vector(\$)}{FunctionFieldCategory} +{\opkey{Domain \smath{F} is the domain of functions on a fixed curve. +\seeType{FunctionFieldCategory}} +\newitem\smath{\mbox{\bf integralBasisAtInfinity}\opLeftPren{}\opRightPren{}\$F} returns the local +integral basis at infinity. +\newitem\smath{\mbox{\bf integralBasis}\opLeftPren{}\opRightPren{}\$F} returns the integral basis for +the curve. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{integralCoordinates}}\opLeftPren{}{\it function}\opRightPren{}% +}% +}% +{1}{(\$)->Record(num:Vector(UP), den:UP)}{FunctionFieldCategory} +{\smath{\mbox{\bf integralCoordinates}\opLeftPren{}f\opRightPren{}}, +where \smath{f} is a function on a curve defined by domain \smath{F}, +returns the coordinates of \smath{f} with respect to the \smath{\mbox{\bf integralBasis}\opLeftPren{}\opRightPren{}\$F} +as polynomials \smath{A_i} together with a common denominator \smath{d}. +Specifically, the operation returns a record having selector +\smath{num} with value \smath{[A_1, \ldots, A_n]} and selector \smath{den} with +value \smath{d} such that +\smath{f = (A_1 w_1 +\ldots+ A_n w_n) / d} where \smath{(w_1, \ldots, w_n)} is the +integral basis. +\seeType{FunctionFieldCategory} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{integralDerivationMatrix}}\opLeftPren{}{\it function}\opRightPren{}% +}% +}% +{1}{((UP)->UP)->Record(num:Matrix(UP), den:UP)}{FunctionFieldCategory} +{\smath{\mbox{\bf integralDerivationMatrix}\opLeftPren{}d\opRightPren{}} extends the derivation \smath{d} and +returns the coordinates of the derivative of \smath{f} with respect to +the \smath{\mbox{\bf integralBasis}\opLeftPren{}\opRightPren{}\$F} as a matrix of polynomials and a common denominator \smath{Q}. +Specifically, the operation returns a record having selector +\smath{num} with value \smath{M} +and selector \smath{den} with value \smath{Q} such that +the \eth{\smath{i}} row of \smath{M} divided by \smath{Q} form the +coordinates of \smath{f} with respect to integral basis +\smath{(w1, \ldots, wn)}. +\seeType{FunctionFieldCategory} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{integralMatrix}}\opLeftPren{}\opRightPren{}% + \opand \mbox{\axiomFun{integralMatrixAtInfinity}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Matrix(Fraction(UP))}{FunctionFieldCategory} +{\opkey{Domain \smath{F} is a domain of functions on a fixed curve. These +operations return a matrix which transform the natural basis to an integral basis. +\seeType{FunctionFieldCategory} +} +\newitem +\smath{\mbox{\bf integralMatrix}\opLeftPren{}\opRightPren{}} returns \smath{M} such that +\smath{(w_1, \ldots, w_n) = M (1, y, \ldots, y^{n-1})}, +where \smath{(w_1, \ldots, w_n)} is the integral basis returned by +\smath{\mbox{\bf integralBasis}\opLeftPren{}\opRightPren{}\$F}. +\newitem +\smath{\mbox{\bf integralMatrixAtInfinity}\opLeftPren{}\opRightPren{}\$F} returns matrix \smath{M} +which transforms the natural basis +such that \smath{(v_1, \ldots, v_n) = M (1, y, \ldots, y^{n-1})} +where \smath{(v_1, \ldots, v_n)} is the local integral basis at +infinity returned by \smath{\mbox{\bf integralBasisAtInfinity}\opLeftPren{}\opRightPren{}\$F}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{integralRepresents}}\opLeftPren{}{\it vector}, \allowbreak{}{\it commonDenominator}\opRightPren{}% +}% +}% +{2}{(Vector(UP), UP)->\$}{FunctionFieldCategory} +{\smath{\mbox{\bf integralRepresents}\opLeftPren{}[A_1, \allowbreak{} \ldots, A_n], d\opRightPren{}} is the inverse +of the operation +\spadfunFrom{integralCoordinates}{FunctionFieldCategory} defined +for domain \smath{F}, a domain of functions on a fixed curve. Given +the coordinates as polynomials \smath{[A_1, \ldots, A_n]} over +a common denominator \smath{d}, this operation returns the function +represented as\smath{(A_1 w_1+\ldots+A_n w_n)/d} where +\smath{(w_1, \ldots, w_n)} is the integral basisreturned by +\smath{\mbox{\bf integralBasis}\opLeftPren{}\opRightPren{}\$F}.\seeType{FunctionFieldCategory}} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{integrate}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{integrate}}\opLeftPren{}{\it expression}, \allowbreak{}{\it variable }\allowbreak $\,[$ , \allowbreak{}{\it options}$]$\opRightPren{}% +}% +}% +{1}{(\$)->\$}{UnivariatePolynomialCategory} +{\smath{\mbox{\bf integrate}\opLeftPren{}f\opRightPren{}} returns the integral of a +univariate polynomial or power series \smath{f} with respect to +its distinguished variable. +\newitem\smath{\mbox{\bf integrate}\opLeftPren{}f, \allowbreak{} x\opRightPren{}} returns the integral of +\smath{f(x)dx}, where \smath{x} is viewed as a real variable. +\newitem\smath{\mbox{\bf integrate}\opLeftPren{}f, \allowbreak{} x = a..b\optinner{, "noPole"}\opRightPren{}} +returns the integral of \smath{f(x)dx} from \smath{a} to \smath{b}. +If it is not possible to check whether \smath{f} has a pole for +\smath{x} between \smath{a} and \smath{b}, then a third argument +\mbox{\tt "noPole"} will make this function assume that\smath{f} +has no such pole.This operation calls \spadfun{error} if \smath{f} +has a pole for \smath{x} between \smath{a} and \smath{b} or if +a third argument different from \mbox{\tt "noPole"} is given.} + + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{interpret}}\opLeftPren{}{\it inputForm}\opRightPren{}% +}% +}% +{ $ -> Any}{}{} +{\smath{\mbox{\bf interpret}\opLeftPren{}f\opRightPren{}} passes f of type \spadtype{InputForm} to the interpreter. +\newitem +\smath{\mbox{\bf interpret}\opLeftPren{}f\opRightPren{}\$P}, +where \smath{P} is the package \spadtype{InputFormFunctions1(R)} for +some type \spadtype{R}, +passes \smath{f} of type \spadtype{InputForm} to the interpreter, +and transforms the result into an object of type \smath{R}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{intersect}}\opLeftPren{}{\it elements\opt{, element}}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{SetAggregate} +{\smath{\mbox{\bf intersect}\opLeftPren{}li\opRightPren{}}, +where \smath{li} is a list of ideals, +computes the intersection of the list of ideals \smath{li}. +\newitem +\smath{\mbox{\bf intersect}\opLeftPren{}u, \allowbreak{} v\opRightPren{}}, +where \smath{u} and \smath{v} are sets, +returns the set \smath{w} consisting of elements common to both +sets \smath{u} and \smath{v}. +See also \axiomType{Multiset}. +\newitem +\smath{\mbox{\bf intersect}\opLeftPren{}I, \allowbreak{} J\opRightPren{}}, +where \smath{I} and \smath{J} are ideals, +computes the intersection of the ideals \smath{I} and \smath{J}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{inv}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{DivisionRing} +{\smath{\mbox{\bf inv}\opLeftPren{}x\opRightPren{}} returns the multiplicative inverse of \smath{x}, +where \smath{x} is an element of a domain of category \spadtype{Group} or +\spadtype{DivisionRing}, or calls \spadfun{error} if +\smath{x} is 0. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{inverse}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->Union(\$, "failed")}{MatrixCategory} +{\smath{\mbox{\bf inverse}\opLeftPren{}A\opRightPren{}} returns the inverse of the matrix \smath{A}, or +\mbox{\tt "failed"} if the matrix is not invertible, or calls \spadfun{error} if +the matrix is not square. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{inverseColeman}}\opLeftPren{}{\it listOfIntegers}, \allowbreak{}{\it listOfIntegers}, \allowbreak{}{\it matrix}\opRightPren{}% +}% +}% +{3}{(List(Integer), List(Integer), Matrix(Integer))->List(Integer)}{SymmetricGroupCombinatoricFunctions} +{\smath{\mbox{\bf inverseColeman}\opLeftPren{}alpha, \allowbreak{} beta, \allowbreak{} C\opRightPren{}} +returns the lexicographically smallest permutation in a +double coset of the symmetric group +corresponding to a non-negative Coleman-matrix. +\seeDetails{SymmetricGroupCombinatoricFunctions} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{inverseIntegralMatrix}}\opLeftPren{}\opRightPren{}% + \opand \mbox{\axiomFun{inverseIntegralMatrixAtInfinity}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Matrix(Fraction(UP))}{FunctionFieldCategory} +{\opkey{Domain \smath{F} is a domain of functions on a fixed +curve. +These operations return a matrix which transform an integral basis +to a natural basis. +\seeType{FunctionFieldCategory}} +\newitem\smath{\mbox{\bf inverseIntegralMatrix}\opLeftPren{}\opRightPren{}\$F} returns \smath{M} such +that \smath{M (w_1, \ldots, w_n) = (1, y, \ldots, y^{n-1})} where +\smath{(w_1, \ldots, w_n)} is the integral basis returned by +\smath{\mbox{\bf integralBasis}\opLeftPren{}\opRightPren{}\$F}. +See also \spadfunFrom{integralMatrix}{FunctionFieldCategory}. +\newitem \smath{\mbox{\bf inverseIntegralMatrixAtInfinity}\opLeftPren{}\opRightPren{}} returns +\smath{M} such that \smath{M (v_1, \ldots, v_n) = (1, y, \ldots, +y^(n-1))} where \smath{(v_1, \ldots, v_n)} is the local integral +basis at infinity returned by +\smath{\mbox{\bf integralBasisAtInfinity}\opLeftPren{}\opRightPren{}\$F}. +See also +\spadfunFrom{integralMatrixAtInfinity}{FunctionFieldCategory}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{inverseLaplace}}\opLeftPren{}{\it expression}, \allowbreak{}{\it symbol}, \allowbreak{}{\it symbol}\opRightPren{}% +}% +}% +{3}{(F, Symbol, Symbol)->Union(F, "failed")}{InverseLaplaceTransform} +{\smath{\mbox{\bf inverseLaplace}\opLeftPren{}f, \allowbreak{} s, \allowbreak{} t\opRightPren{}} returns the Inverse Laplace +transform of \smath{f(s)} using \smath{t} as the new variable, or +\mbox{\tt "failed"} if unable to find a closed form. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{invmod}}\opLeftPren{}{\it positiveInteger}, \allowbreak{}{\it positiveInteger}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{IntegerNumberSystem} +{\smath{\mbox{\bf invmod}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}, for relatively prime positive integers \smath{a} and \smath{b} +such that \smath{a < b}, returns \smath{1/a \mod b}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{iomode}}\opLeftPren{}{\it file}\opRightPren{}% +}% +}% +{1}{(\$)->String}{FileCategory} +{\smath{\mbox{\bf iomode}\opLeftPren{}f\opRightPren{}} returns the status of the file \smath{f} +as one of the following strings: {\tt "input", "output"} or {\tt "closed".} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{irreducible?}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(FP)->Boolean}{DistinctDegreeFactorize} +{\smath{\mbox{\bf irreducible?}\opLeftPren{}p\opRightPren{}} tests whether the polynomial \smath{p} is irreducible. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{irreducibleFactor}}\opLeftPren{}{\it element}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(R, Integer)->\$}{Factored} +{\smath{\mbox{\bf irreducibleFactor}\opLeftPren{}base, \allowbreak{} exponent\opRightPren{}} creates a factored +object with a single factor whose \smath{base} is asserted to be +irreducible (flag = \mbox{\tt "irred"}). +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{irreducibleRepresentation}}\opLeftPren{}{\it listOfIntegers\opt{, permutations}}\opRightPren{}% +}% +}% +{2}{(List(Integer), Permutation(Integer))->Matrix(Integer)}{irreducibleRepresentationPackage} +{\smath{\mbox{\bf irreducibleRepresentation}\opLeftPren{}lambda\optinner{, pi}\opRightPren{}} returns +a matrix giving the irreducible representation corresponding to +partition \smath{lambda}, represented as a list of integers, in +Young's natural form of the permutation \smath{pi} in the +symmetric group whose elements permute \smath{1, 2, \ldots, n}. +If a second argument is not given, the permutation is taken to be +the following two generators of the symmetric group, namely +\smath{(1 2)} (2-cycle) and \smath{(1 2 \ldots n)} +(\smath(n)-cycle). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{is?}}\opLeftPren{}{\it expression}, \allowbreak{}{\it pattern}\opRightPren{}% +}% +}% +{2}{(\$, BasicOperator)->Boolean}{ExpressionSpace} +{\smath{\mbox{\bf is?}\opLeftPren{}expr, \allowbreak{} pat\opRightPren{}} tests if the expression \smath{expr} matches the pattern \smath{pat}. +\newitem +\smath{\mbox{\bf is?}\opLeftPren{}expression, \allowbreak{} op\opRightPren{}} tests if \smath{expression} is a kernel and is its operator is op. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{isAbsolutelyIrreducible?}}\opLeftPren{}{\it listOfMatrices}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(List(Matrix(R)), Integer)->Boolean}{RepresentationPackage2} +{\smath{\mbox{\bf isAbsolutelyIrreducible?}\opLeftPren{}aG, \allowbreak{} numberOfTries\opRightPren{}} uses Norton's irreducibility +test to check for absolute irreduciblity. +\seeDetails{RepresentationPackage2} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{isExpt}}\opLeftPren{}{\it expression\opt{, operator}}\opRightPren{}% +}% +}% +{1}{(\$)->Union(Record(var:Kernel(\$), exponent:Integer), "failed")}{FunctionSpace} +{\smath{\mbox{\bf isExpt}\opLeftPren{}p\optinner{, op}\opRightPren{}} returns a record with two fields: +\smath{var} denoting a kernel \smath{x}, +and \smath{exponent} denoting an integer \smath{n}, +if expression \smath{p} +has the form \smath{p = x^n} and \smath{n \not= 0}. +If a second argument \smath{op} is given, +\smath{x} must have the form \smath{op(a)} for some \smath{a}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{isMult}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->Union(Record(coef:Integer, var:Kernel(\$)), "failed")}{FunctionSpace} +{\smath{\mbox{\bf isMult}\opLeftPren{}p\opRightPren{}} returns +a record with two fields: +\smath{coef} denoting an integer \smath{n}, +and \smath{var} denoting a kernel \smath{x}, +if \smath{p} has the form \smath{n * x} and \smath{n \not= 0}, +and \mbox{\tt "failed"} if this is not possible. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{isobaric?}}\opLeftPren{}{\it differentialPolynomial}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{DifferentialPolynomialCategory} +{\smath{\mbox{\bf isobaric?}\opLeftPren{}p\opRightPren{}} tests if every differential monomial appearing in the differential polynomial \smath{p} has the same weight.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{isPlus}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->Union(List(\$), "failed")}{FunctionSpace} +{\smath{\mbox{\bf isPlus}\opLeftPren{}p\opRightPren{}} returns \smath{[m_1, \ldots, m_n]} if +\smath{p} has the form \smath{m_1 +\ldots+ m_n} for \smath{n > 1} and \smath{m_i \not= 0}, +and \mbox{\tt "failed"} if this is not possible. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{isTimes}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->Union(List(\$), "failed")}{FunctionSpace} +{\smath{\mbox{\bf isTimes}\opLeftPren{}p\opRightPren{}} returns \smath{[a_1, \ldots, a_n]} if +\smath{p} has the form +\smath{a_1*\ldots*a_n} for \smath{n > 1} and \smath{m_i \not= 1}, +and \mbox{\tt "failed"} if this is not possible. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{Is}}\opLeftPren{}{\it subject}, \allowbreak{}{\it pattern}\opRightPren{}% +}% +}% +{2}{(List(Subject), Pat)->PatternMatchListResult(Base, Subject, List(Subject))}{PatternMatch} +{\smath{Is(expr, pat)} matches the pattern \smath{pat} on the +expression \smath{expr} and returns a list of matches \smath{[v_1 += e_1, \ldots, v_n = e_n]} or \mbox{\tt "failed"} if matching +fails. +An empty list is returned if either \smath{expr} is exactly equal +to \smath{pat} or if \smath{pat} does not match \smath{expr}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{jacobi}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(Integer, Integer)->Integer}{IntegerNumberTheoryFunctions} +{\smath{\mbox{\bf jacobi}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns the Jacobi symbol \smath{J(a/b)}. +\index{Jacobi symbol} +When \smath{b} is odd, \smath{J(a/b) = \prod\nolimits_{p \in +{\bf factors}(b)}{L(a/p)}}. +Note: by convention, 0 is returned if \smath{\mbox{\bf gcd}\opLeftPren{}a, b) \not= 1}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{jacobiIdentity?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf jacobiIdentity?}\opLeftPren{}\opRightPren{}} tests if \smath{(a b) c + (b c) a + (c a) b = 0} +for all \smath{a}, \smath{b}, \smath{c} in a domain +of \spadtype{FiniteRankNonAssociativeAlgebra}. For example, +this relation holds for crossed products of three-dimensional vectors. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{janko2}}\opLeftPren{}{\it \optinit{listOfIntegers}}\opRightPren{}% +}% +}% +{1}{(List(Integer))->PermutationGroup(Integer)}{PermutationGroupExamples} +{\smath{\mbox{\bf janko2}\opLeftPren{}\opRightPren{}} constructs the janko group acting on the integers \smath{1, \ldots, 100}. +\newitem +\smath{\mbox{\bf janko2}\opLeftPren{}\optinner{li}\opRightPren{}} constructs the janko group acting on the 100 integers given in the list \smath{li}. +The default value of \smath{li} is \smath{[1, \ldots, 100]}. +This operation removes duplicates in the list and calls +\spadfun{error} if \smath{li} does not have exactly 100 distinct entries. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{jordanAdmissible?}}\opLeftPren{}\opRightPren{}% + \opand \mbox{\axiomFun{jordanAlgebra?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf jordanAdmissible?}\opLeftPren{}\opRightPren{}\$F}, +where \smath{F} is a member of +\spadtype{FiniteRankNonAssociativeAlgebra(R)} over +a commutative ring \smath{R}, +tests if 2 is invertible +in \smath{R} and if the algebra defined +by \smath{\{a, b\}} defined by \smath{(1/2)(a b+b a)} is a Jordan algebra, that is, +satisfies the Jordan identity. +\newitem +\smath{\mbox{\bf jordanAlgebra?}\opLeftPren{}\opRightPren{}\$F} tests if the algebra is commutative, +that \smath{\mbox{\bf characteristic}\opLeftPren{})\$F \not= 2}, +and \smath{(a b) a^2 - a (b a^2) = 0} for all \smath{a} and \smath{b} +in the algebra (Jordan identity). Example: for every associative algebra +\smath{(A, +, @)}, you can construct a Jordan algebra \smath{(A, +, *)}, +where \smath{a*b := (a@b+b@a)/2}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{kernel}}\opLeftPren{}{\it operator}, \allowbreak{}{\it expression}\opRightPren{}% +}% +}% +{2}{(BasicOperator, \$)->\$}{ExpressionSpace} +{\smath{\mbox{\bf kernel}\opLeftPren{}op, \allowbreak{} x\opRightPren{}} constructs \smath{op}(\smath{x}) without evaluating it. +\newitem +\smath{\mbox{\bf kernel}\opLeftPren{}op, \allowbreak{} [f_1, \allowbreak{} \ldots, f_n]\opRightPren{}} constructs \smath{op(f1, \ldots, fn)} +without evaluating it. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{kernels}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->List(Kernel(\$))}{ExpressionSpace} +{\smath{\mbox{\bf kernels}\opLeftPren{}f\opRightPren{}} returns the list of all the top-level kernels appearing in +expression \smath{f}, +but not the ones appearing in the arguments of the top-level kernels. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{key?}}\opLeftPren{}{\it key}, \allowbreak{}{\it dictionary}\opRightPren{}% + \opand \mbox{\axiomFun{keys}}\opLeftPren{}{\it dictionary}\opRightPren{}% +}% +}% +{2}{(Key, \$)->Boolean}{KeyedDictionary} +{\smath{\mbox{\bf key?}\opLeftPren{}k, \allowbreak{} d\opRightPren{}} tests if \smath{k} is a key in dictionary \smath{d}. +Dictionary \smath{d} is an element of a domain of category +\spadtype{KeyedDictionary(K, E)}, where \smath{K} +and \smath{E} denote the domains of keys and entries. +\newitem +\smath{\mbox{\bf keys}\opLeftPren{}d\opRightPren{}} returns the list the keys in table \smath{d}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{kroneckerDelta}}\opLeftPren{}{\it [integer}, \allowbreak{}{\it integer]}\opRightPren{}% +}% +}% +{0}{()->\$}{CartesianTensor} +{\smath{\mbox{\bf kroneckerDelta}\opLeftPren{}\opRightPren{}} is the rank 2 tensor defined by +\smath{\mbox{\bf kroneckerDelta}\opLeftPren{}i, j) = 1} if \smath{i=j}, and 0 otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{label}}\opLeftPren{}{\it outputForm}, \allowbreak{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf label}\opLeftPren{}o_1, \allowbreak{} o_2\opRightPren{}}, where \smath{o_1} and \smath{o_2} are +objects of type \spadtype{OutputForm} (normally unexposed), +returns +an output form displaying equation \smath{o_2} with label +\smath{o_1}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{laguerreL}}\opLeftPren{}{\it nonNegativeInteger}, \allowbreak{}{\it x}\opRightPren{}% + \opand \mbox{\axiomFun{laguerreL}}\opLeftPren{}{\it nonNegativeInteger}, \allowbreak{}{\it nonNegativeInteger}, \allowbreak{}{\it x}\opRightPren{}% +}% +}% +{2}{(NonNegativeInteger, R)->R}{OrthogonalPolynomialFunctions} +{\smath{\mbox{\bf laguerreL}\opLeftPren{}n, \allowbreak{} x\opRightPren{}} is the \eth{\smath{n}} Laguerre +polynomial, \smath{L[n](x)}, defined by \smath{{exp({{-t +x}\over{1-t}})/(1-t)} = \sum\nolimits_{n=0}^\infty {L[n](x) +t^n/n!}}. +\newitem \smath{\mbox{\bf laguerreL}\opLeftPren{}m, \allowbreak{} n, \allowbreak{} x\opRightPren{}} is the associated Laguerre +polynomial, \smath{L_m[n](x)}, defined as the \eth{\smath{m}} +derivative of \smath{L[n](x)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{lambda}}\opLeftPren{}{\it inputForm}, \allowbreak{}{\it listOfSymbols}\opRightPren{}% +}% +}% +{ ($, List Symbol) -> $}{}{} +{\smath{\mbox{\bf lambda}\opLeftPren{}i, \allowbreak{} [x_1, \allowbreak{} \ldots x_n]\opRightPren{}} returns the input form +corresponding to \smath{(x_1, \ldots, x_n) \mapsto i} if \smath{n +> 1}. +See also \spadfun{compiledFunction}, \spadfun{flatten}, and \spadfun{unparse}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{laplace}}\opLeftPren{}{\it expression}, \allowbreak{}{\it symbol}, \allowbreak{}{\it symbol}\opRightPren{}% +}% +}% +{3}{(F, Symbol, Symbol)->F}{LaplaceTransform} +{\smath{\mbox{\bf laplace}\opLeftPren{}f, \allowbreak{} t, \allowbreak{} s\opRightPren{}} returns the Laplace transform of \smath{f(t)}, +defined by \smath{\int_{t=0}^\infty{exp(-s t)f(t) {\rm dt}}}. +If the transform cannot be computed, the +formal object \smath{\mbox{\bf laplace}\opLeftPren{}f, \allowbreak{} t, \allowbreak{} s\opRightPren{}} is returned. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{last}}\opLeftPren{}{\it indexedAggregate\opt{, nonNegativeInteger}}\opRightPren{}% +}% +}% +{1}{(\$)->S}{UnaryRecursiveAggregate} +{\smath{\mbox{\bf last}\opLeftPren{}u\opRightPren{}} returns the last element of \smath{u}. +\newitem +\smath{\mbox{\bf last}\opLeftPren{}u, \allowbreak{} n\opRightPren{}} returns a copy of the last \smath{n} (\smath{n +\geq 0}) elements +of \smath{u}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{laurent}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{laurentIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->ULS}{UnivariatePuiseuxSeriesConstructorCategory} +{\smath{\mbox{\bf laurent}\opLeftPren{}u\opRightPren{}} converts \smath{u} to a Laurent series, or +calls \spadfun{error} +if this is not possible. +\newitem +\smath{\mbox{\bf laurentIfCan}\opLeftPren{}u\opRightPren{}} converts the Puiseux series \smath{u} +to a Laurent series, or returns \mbox{\tt "failed"} if this is not possible. +\newitem +\smath{\mbox{\bf laurent}\opLeftPren{}f, \allowbreak{} x = a\opRightPren{}} expands the expression \smath{f} as a +Laurent series in powers of \smath{(x - a)}. +\newitem +\smath{\mbox{\bf laurent}\opLeftPren{}f, \allowbreak{} n\opRightPren{}} expands the expression \smath{f} as a Laurent series in +powers of \smath{x}; at least \smath{n} terms are computed. +\newitem +\smath{\mbox{\bf laurent}\opLeftPren{}n \mapsto a_n, x = a, n_0..\optinner{n_1}\opRightPren{}} returns +a Laurent series defined by +\smath{\sum\nolimits_{n = n_0}^{n_1}{a_n (x - a)^n}}, where +\smath{n_1} is \smath{\infty} by default. +\newitem +\smath{\mbox{\bf laurent}\opLeftPren{}a_n, \allowbreak{} n, \allowbreak{} x=a, \allowbreak{} n_0..\optinner{n_1}\opRightPren{}} returns +a Laurent series defined by +\smath{\sum\nolimits_{n=n_0}^{n_1}{a_n(x - a)^n}}, +where \smath{n_1} is \smath{\infty} by default. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{laurentRep}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->ULS}{UnivariatePuiseuxSeriesConstructorCategory} +{\smath{\mbox{\bf laurentRep}\opLeftPren{}f(x)\opRightPren{}} returns \smath{g(x)} +where the Puiseux series \smath{f(x) = g(x^r)} is represented by \smath{[r, g(x)]}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{lazy?}}\opLeftPren{}{\it stream}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{LazyStreamAggregate} +{\smath{\mbox{\bf lazy?}\opLeftPren{}s\opRightPren{}} tests +if the first node of the stream \smath{s} is a lazy evaluation mechanism which could produce an additional entry to \smath{s}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{lazyEvaluate}}\opLeftPren{}{\it stream}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{LazyStreamAggregate} +{\smath{\mbox{\bf lazyEvaluate}\opLeftPren{}s\opRightPren{}} causes one lazy evaluation of stream +\smath{s}. +Caution: \smath{s} must be a ``lazy node'' satisfying +\smath{\mbox{\bf lazy?}\opLeftPren{}s) = true}, as there is no error check. +A call to this function may or may not produce an explicit first +entry. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{lcm}}\opLeftPren{}{\it elements\opt{, element}}\opRightPren{}% +}% +}% +{1}{(List(\$))->\$}{GcdDomain} +{\smath{\mbox{\bf lcm}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} returns the least common multiple of \smath{x} and \smath{y}. +\newitem +\smath{\mbox{\bf lcm}\opLeftPren{}lx\opRightPren{}} returns the least common multiple of the elements of +the list \smath{lx}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{ldexquo}}\opLeftPren{}{\it lodOperator}, \allowbreak{}{\it lodOperator}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Union(\$, "failed")}{LinearOrdinaryDifferentialOperator} +{\smath{\mbox{\bf ldexquo}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns +\smath{q} such that \smath{a = b*q}, or \mbox{\tt "failed"} if no such \smath{q} exists. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftDivide}}\opLeftPren{}{\it lodOperator}, \allowbreak{}{\it lodOperator}\opRightPren{}% +\optand \mbox{\axiomFun{leftQuotient}}\opLeftPren{}{\it lodOperator}, \allowbreak{}{\it lodOperator}\opRightPren{}% +\opand \mbox{\axiomFun{leftRemainder}}\opLeftPren{}{\it lodOperator}, \allowbreak{}{\it lodOperator}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Record(quotient:\$, remainder:\$)}{LinearOrdinaryDifferentialOperator} +{\smath{\mbox{\bf leftDivide}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns +a record with two fields: ``quotient'' \smath{q} +and ``remainder'' \smath{r} +such that \smath{a = b q + r} and the degree of \smath{r} is less +than the degree of \smath{b}. +This operation is called ``left division.'' +Operation \smath{\mbox{\bf leftQuotient}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns \smath{q}, and +\smath{\mbox{\bf leftRemainder}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns \smath{r}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leader}}\opLeftPren{}{\it differentialPolynomial}\opRightPren{}% +}% +}% +{1}{(\$)->V}{DifferentialPolynomialCategory} +{\smath{\mbox{\bf leader}\opLeftPren{}p\opRightPren{}} returns the derivative of the highest rank +appearing in the differential polynomial \smath{p}, or +calls \spadfun{error} if \smath{p} is in the ground ring.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leadingCoefficient}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(\$)->R}{AbelianMonoidRing} +{\smath{\mbox{\bf leadingCoefficient}\opLeftPren{}p\opRightPren{}} returns the coefficient of the highest degree +term of polynomial \smath{p}. +See also \spadtype{IndexedDirectProductCategory} and +\spadtype{MonogenicLinearOperator}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leadingIdeal}}\opLeftPren{}{\it ideal}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{PolynomialIdeals} +{\smath{\mbox{\bf leadingIdeal}\opLeftPren{}I\opRightPren{}} is the ideal generated by the leading terms of the elements of the ideal \smath{I}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leadingMonomial}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{AbelianMonoidRing} +{\smath{\mbox{\bf leadingMonomial}\opLeftPren{}p\opRightPren{}} returns the monomial of polynomial \smath{p} with the highest degree. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leaf?}}\opLeftPren{}{\it aggregate}\opRightPren{}% +\optand \mbox{\axiomFun{leafValues}}\opLeftPren{}{\it aggregate}\opRightPren{}% +\opand \mbox{\axiomFun{leaves}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{RecursiveAggregate} +{\opkey{These operations apply to a recursive aggregate \smath{a}. +See, for example, +\spadtype{BinaryTree}.} +\newitem\smath{\mbox{\bf leaf?}\opLeftPren{}a\opRightPren{}} tests if \smath{a} is a terminal node. +\newitem\smath{\mbox{\bf leaves}\opLeftPren{}a\opRightPren{}} returns the list of values at the leaf nodes +in left-to-right order.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{left}}\opLeftPren{}{\it binaryRecursiveAggregate}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{BinaryRecursiveAggregate} +{\smath{\mbox{\bf left}\opLeftPren{}a\opRightPren{}} returns the left child of binary aggregate \smath{a}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftAlternative?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf leftAlternative?}\opLeftPren{}\opRightPren{}\$F}, +where \smath{F} is a domain of \spadtype{FiniteRankNonAssociativeAlgebra}, +tests if \smath{2*\mbox{\tt associator}(a, a, b) = 0} +for all \smath{a}, \smath{b} in \smath{F}. +Note: in general, you do not know whether \smath{2*a=0} implies \smath{a=0}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftCharacteristicPolynomial}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(\$)->SparseUnivariatePolynomial(R)}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf leftCharacteristicPolynomial}\opLeftPren{}p\opRightPren{}\$F} returns the +characteristic polynomial of the left regular representation of +\smath{p} of domain \smath{F} with respect to any basis. +Argument \smath{p} is a member of a domain of category +\spadtype{FiniteRankNonAssociativeAlgebra(R)} where \smath{R} is +a commutative ring. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftDiscriminant}}\opLeftPren{}{\it \optinit{listOfVectors}}\opRightPren{}% +}% +}% +{1}{(Vector(\$))->R}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf leftDiscriminant}\opLeftPren{}[v_1, \allowbreak{} \ldots, v_n]\opRightPren{}\$F} +where \smath{F} is a domain +of category \spadtype{FramedNonAssociativeAlgebra} over a +commutative ring \smath{R}, +returns the determinant +of the \smath{n}-by-\smath{n} matrix whose element at the +\eth{\smath{i}} row and \eth{\smath{j}} column is given by the +left trace of the product +\smath{v_i*v_j}. +Same as \spadfun{determinant}(\smath{\mbox{\bf leftTraceMatrix}\opLeftPren{}[v_1, \allowbreak{} \ldots, v_n]\opRightPren{}}). +If no argument is given, \smath{v_1, \ldots, v_n} are taken to +elements of the fixed \smath{R}-basis. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftGcd}}\opLeftPren{}{\it lodOperator}, \allowbreak{}{\it lodOperator}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{LinearOrdinaryDifferentialOperator} +{\smath{\mbox{\bf leftGcd}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} computes the value \smath{g} of highest degree such that +\smath{a = aa*g} and \smath{b = bb*g} for some values \smath{aa} and \smath{bb}. +The value \smath{g} is computed using left-division. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftLcm}}\opLeftPren{}{\it lodOperator}, \allowbreak{}{\it lodOperator}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{LinearOrdinaryDifferentialOperator} +{\smath{\mbox{\bf leftLcm}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} computes the value \smath{m} of lowest +degree such that \smath{m = a*aa = b*bb} for some values +\smath{aa} and \smath{bb}. +The value \smath{m} is computed using left-division. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftMinimalPolynomial}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->SparseUnivariatePolynomial(R)}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf leftMinimalPolynomial}\opLeftPren{}a\opRightPren{}} returns the polynomial +determined by the smallest non-trivial linear combination of left +powers of \smath{a}, an element of a domain of category +\spadtype{FiniteRankNonAssociativeAlgebra}. +Note: the polynomial has no a constant term because, in general, the +algebra has no unit. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftNorm}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->R}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf leftNorm}\opLeftPren{}a\opRightPren{}} returns the determinant of the left regular representation of \smath{a}, +an element of a domain of category \spadtype{FiniteRankNonAssociativeAlgebra}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftPower}}\opLeftPren{}{\it monad}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(\$, NonNegativeInteger)->\$}{MonadWithUnit} +{\smath{\mbox{\bf leftPower}\opLeftPren{}a, \allowbreak{} n\opRightPren{}} returns the \eth{\smath{n}} left power of monad \smath{a}, +that is, \smath{\mbox{\bf leftPower}\opLeftPren{}a, n) := a {\mbox{\bf leftPower}}(a, n-1)}. +If the monad has a unit then \smath{\mbox{\bf leftPower}\opLeftPren{}a, 0) := 1}. +Otherwise, define \smath{\mbox{\bf leftPower}\opLeftPren{}a, 1) = a} +See \spadtype{Monad} and \spadtype{MonadWithUnit} for details. +See also \spadfun{leftRecip}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftRankPolynomial}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->SparseUnivariatePolynomial(Polynomial(R))}{FramedNonAssociativeAlgebra} +{\smath{\mbox{\bf leftRankPolynomial}\opLeftPren{}\opRightPren{}\$F} calculates the left minimal +polynomial of a generic element of an algebra of domain \smath{F}, +a domain of category \spadtype{FramedNonAssociativeAlgebra} over a +commutative ring \smath{R}. +This generic element is an element of the algebra defined by the +same structural constants over the polynomial ring in symbolic +coefficients with respect to the fixed basis. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftRank}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(A)->NonNegativeInteger}{AlgebraPackage} +{\smath{\mbox{\bf leftRank}\opLeftPren{}x\opRightPren{}} returns the number of linearly independent +elements in \smath{x b_1}, \ldots, \smath{x b_n}, where +\smath{b=[b_1, \ldots, b_n]} is a basis. +Argument \smath{x} is an element of a domain of category +\spadtype{FramedNonAssociativeAlgebra} over a commutative ring +\smath{R}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftRecip}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Union(\$, "failed")}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf leftRecip}\opLeftPren{}a\opRightPren{}} returns an element that is a left inverse +of \smath{a}, or \mbox{\tt "failed"}, if there is no unit element, +such an element does not exist, or the left reciprocal cannot be +determined (see \spadatt{unitsKnown}).} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftRecip}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Union(\$, "failed")}{MonadWithUnit} +{\smath{\mbox{\bf leftRecip}\opLeftPren{}a\opRightPren{}} returns an element, which is a left inverse +of \smath{a}, or \mbox{\tt "failed"} if such an element doesn't +exist or cannot be determined (see +\spadatt{unitsKnown}). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftRegularRepresentation}}\opLeftPren{}{\it element\opt{, vectorOfElements}}\opRightPren{}% +}% +}% +{2}{(\$, Vector(\$))->Matrix(R)}{FiniteRankNonAssociativeAlgebra} +{\opkey{This operation is defined on a domain \smath{F} of +category \spadtype{NonAssociativeAlgebra}.} +\newline\smath{leftRegularRepresentation(a\optinner{, [v_1, +\ldots, v_n]})} returns the matrix of the linear map defined by +left multiplication by \smath{a} with respect to the basis +\smath{[v_1, \ldots, v_n]}. +If a second argument is missing, the basis is taken to be the +fixed basis for \smath{F}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftTraceMatrix}}\opLeftPren{}{\it \opt{vectorOfElements}}\opRightPren{}% +}% +}% +{1}{(Vector(\$))->Matrix(R)}{FiniteRankNonAssociativeAlgebra} +{\opkey{This operation is defined on a domain \smath{F} of category \spadtype{NonAssociativeAlgebra}.} +\newline\smath{\mbox{\bf leftTraceMatrix}\opLeftPren{}\optinner{v}\opRightPren{}}, where \smath{v} +is an optional vector \smath{[v_1, \ldots, v_n]}, returns +the \smath{n}-by-\smath{n} matrix \smath{M} such that +\smath{M_{i, j}} is the left +trace of the product \smath{v_i*v_j} of elements from the +basis \smath{[v_1, \ldots, v_n]}. +If the argument is missing, the basis is taken to be the fixed basis for \smath{F}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftTrace}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->R}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf leftTrace}\opLeftPren{}a\opRightPren{}} returns the trace of the left regular representation of \smath{a}, +an element of a domain of category \spadtype{FiniteRankNonAssociativeAlgebra}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftTrim}}\opLeftPren{}{\it string}, \allowbreak{}{\it various}\opRightPren{}% +}% +}% +{2}{(\$, Character)->\$}{StringAggregate} +{\smath{\mbox{\bf leftTrim}\opLeftPren{}s, \allowbreak{} c\opRightPren{}} returns string \smath{s} with all leading characters +\smath{c} deleted. For example, +\spadfun{leftTrim}{\tt (" abc ", " ")} returns {\tt "abc "}. +\newitem +\smath{\mbox{\bf leftTrim}\opLeftPren{}s, \allowbreak{} cc\opRightPren{}} returns \smath{s} with all leading characters in +\smath{cc} deleted. For example, \code{leftTrim("(abc)", charClass "()")} +returns \code{"abc"}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leftUnit}}\opLeftPren{}\opRightPren{}% + \opand \mbox{\axiomFun{leftUnits}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Union(Record(particular:\$, basis:List(\$)), "failed")}{FiniteRankNonAssociativeAlgebra} +{\opkey{These operations are defined on a domain \smath{F} of +category \spadtype{NonAssociativeAlgebra}.} +\newitem\smath{\mbox{\bf leftUnit}\opLeftPren{}\opRightPren{}\$F} returns a left unit of the algebra (not +necessarily unique), or \mbox{\tt "failed"} if there is none. +\newitem\smath{\mbox{\bf leftUnits}\opLeftPren{}\opRightPren{}\$F} returns the affine space of all +left units of an algebra \smath{F}, or \mbox{\tt "failed"} if +there is none, where \smath{F} is a domain of category +\spadtype{FiniteRankNonAssociativeAlgebra}. +The normal result is returned as a record with selector +\smath{particular} for an element of \smath{F}, and \smath{basis} +for a list of elements of \smath{F}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{legendreSymbol}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(Integer, Integer)->Integer}{IntegerNumberTheoryFunctions} +{\smath{\mbox{\bf legendreSymbol}\opLeftPren{}a, \allowbreak{} p\opRightPren{}} returns the Legendre symbol +\smath{L(a/p)}, \smath{L(a/p) = (-1)^{(p-1)/2} \mod p} for prime +\smath{p}. +This is 0 if \smath{a = 0}, 1 if \smath{a} is a quadratic residue +\smath{\mod p}, and \smath{-1} otherwise. +Note: because the primality test is expensive, use +\smath{\mbox{\bf jacobi}\opLeftPren{}a, \allowbreak{} p\opRightPren{}} if you know that \smath{p} is prime. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{LegendreP}}\opLeftPren{}{\it nonNegativeInteger}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(NonNegativeInteger, R)->R}{OrthogonalPolynomialFunctions} +{\smath{\mbox{\bf LegendreP}\opLeftPren{}n, \allowbreak{} x\opRightPren{}} is the \eth{\smath{n}} Legendre +polynomial, \smath{P[n](x)}, defined by \smath{{1\over +\sqrt(1-2xt+t^2)} ={ \sum\nolimits_{n=0}^\infty {P[n](x) t^n}}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{length}}\opLeftPren{}{\it various}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{IntegerNumberSystem} +{\smath{\mbox{\bf length}\opLeftPren{}a\opRightPren{}} returns the length of integer \smath{a} in digits.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{less?}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(\$, NonNegativeInteger)->Boolean}{Aggregate} +{\smath{\mbox{\bf less?}\opLeftPren{}u, \allowbreak{} n\opRightPren{}} tests if \smath{u} has less than \smath{n} elements. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{leviCivitaSymbol}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{CartesianTensor} +{\smath{\mbox{\bf leviCivitaSymbol}\opLeftPren{}\opRightPren{}} is the rank \smath{dim} tensor defined +by \smath{\mbox{\bf leviCivitaSymbol}\opLeftPren{})(i_1, \ldots i_{\rm dim})}, which is +\smath{+1}, \smath{-1} or \smath{0} according to whether the +permutation \smath{i_1, \ldots, i_{\rm dim}} is an even +permutation, an odd permutation, or not a permutation of +\smath{i_0, \ldots, i_0+{\rm dim}-1}, respectively, where +\smath{i_0} is the minimum index. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{lexGroebner}}\opLeftPren{}{\it listOfPolynomials}, \allowbreak{}{\it listOfSymbols}\opRightPren{}% +}% +}% +{2}{(List(Polynomial(F)), List(Symbol))->List(Polynomial(F))}{PolyGroebner} +{\smath{\mbox{\bf lexGroebner}\opLeftPren{}lp, \allowbreak{} lv\opRightPren{}} computes a Gr\"obner basis for the +list of polynomials \smath{lp} in lexicographic order. +The variables \smath{lv} are ordered by their position in the list +\smath{lp}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{lhs}}\opLeftPren{}{\it equationOrRewriteRule}\opRightPren{}% +}% +}% +{1}{(\$)->F}{RewriteRule} +{\smath{\mbox{\bf lhs}\opLeftPren{}x\opRightPren{}} returns the left hand side of an equation or rewrite-rule. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{library}}\opLeftPren{}{\it filename}\opRightPren{}% +}% +}% +{1}{(FileName)->\$}{Library} +{\smath{\mbox{\bf library}\opLeftPren{}name\opRightPren{}} creates a new library file with filename +\smath{name}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{lieAdmissible?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf lieAdmissible?}\opLeftPren{}\opRightPren{}\$F} tests if the algebra defined by the commutators +is a Lie algebra. +The domain \smath{F} is a member of the category +\spadtype{FiniteRankNonAssociativeAlgebra(R)}. +The property of anticommutativity follows from the definition. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{lieAlgebra?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf lieAlgebra?}\opLeftPren{}\opRightPren{}\$F} tests if the algebra of +\smath{F} +is anticommutative and +that the Jacobi identity \smath{(a*b)*c + (b*c)*a + (c*a)*b = 0} +is satisfied for all \smath{a}, \smath{b}, \smath{c} in \smath{F}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{light}}\opLeftPren{}{\it color}\opRightPren{}% +}% +}% +{1}{(Color)->\$}{Palette} +{\smath{\mbox{\bf light}\opLeftPren{}c\opRightPren{}} sets the shade of a hue \smath{c} to its highest value.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{limit}}\opLeftPren{}{\it expression}, \allowbreak{}{\it equation}\allowbreak $\,[$ , \allowbreak{}{\it direction}$]$\opRightPren{}% +}% +}% +{2}{(Fraction(Polynomial(R)), Equation(Fraction(Polynomial(R))))->Union(OrderedCompletion(Fraction(Polynomial(R))), Record(leftHandLimit:Union(OrderedCompletion(Fraction(Polynomial(R))), "failed"), rightHandLimit:Union(OrderedCompletion(Fraction(Polynomial(R))), "failed")), "failed")}{RationalFunctionLimitPackage} +{\smath{\mbox{\bf limit}\opLeftPren{}f(x), \allowbreak{} x = a\opRightPren{}} computes the real two-sided limit of \smath{f} as its argument \smath{x} approaches \smath{a}. +\newitem +\smath{\mbox{\bf limit}\opLeftPren{}f(x), \allowbreak{} x=a, \allowbreak{} "left"\opRightPren{}} computes the real limit of \smath{f} as its argument \smath{x} approaches \smath{a} from the left. +\newitem +\smath{\mbox{\bf limit}\opLeftPren{}f(x), \allowbreak{} x=a, \allowbreak{} "right"\opRightPren{}} computes the corresponding limit as \smath{x} approaches \smath{a} from the right. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{limitedIntegrate}}\opLeftPren{}{\it rationalFunction}, \allowbreak{}{\it symbol}, \allowbreak{}{\it listOfRationalFunctions}\opRightPren{}% +}% +}% +{3}{(Fraction(Polynomial(F)), Symbol, List(Fraction(Polynomial(F))))->Union(Record(mainpart:Fraction(Polynomial(F)), limitedlogs:List(Record(coeff:Fraction(Polynomial(F)), logand:Fraction(Polynomial(F))))), "failed")}{RationalFunctionIntegration} +{\smath{\mbox{\bf limitedIntegrate}\opLeftPren{}f, \allowbreak{} x, \allowbreak{} [g_1, \allowbreak{} \ldots, g_n]\opRightPren{}} returns +fractions \smath{[h, [c_i, g_i]]} such +that the \smath{g_i}'s are +among \smath{[g_1, \ldots, g_n]}, \smath{dc_i/dx = 0}, +and \smath{d(h + \sum\nolimits_i {c_i {\tt log} g_i})/dx = f} if +possible, \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{linearDependenceOverZ}}\opLeftPren{}{\it vector}\opRightPren{}% + \opand \mbox{\axiomFun{linearlyDependentOverZ?}}\opLeftPren{}{\it vector}\opRightPren{}% +}% +}% +{1}{(Vector(R))->Union(Vector(Integer), "failed")}{IntegerLinearDependence} +{\smath{\mbox{\bf linearlyDependenceOverZ}\opLeftPren{}[v_1, \allowbreak{} \ldots, v_n]\opRightPren{}} tests +if the elements \smath{v_i} of a ring (typically algebraic numbers or +\spadtype{Expression}s) are linearly dependent over the integers. +If so, the operation returns +\smath{[c_1, \ldots, c_n]} such that +\smath{c_1 v_1 + \cdots + c_n v_n = 0} (for which not all the +\smath{c_i}'s are 0). +If linearly independent over the integers, +\mbox{\tt "failed"} is returned. +\newline +\smath{\mbox{\bf linearlyDependentOverZ?}\opLeftPren{}[v1, \allowbreak{} \ldots, vn]\opRightPren{}} returns \smath{true} +if the \smath{vi}'s are linearly dependent over the integers, and \smath{false} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{lineColorDefault}}\opLeftPren{}{\it \opt{palette}}\opRightPren{}% +}% +}% +{0}{()->Palette}{ViewDefaultsPackage} +{\smath{\mbox{\bf lineColorDefault}\opLeftPren{}\opRightPren{}} returns the default color of lines +connecting points in a \twodim{} viewport. +\newline +\smath{\mbox{\bf lineColorDefault}\opLeftPren{}p\opRightPren{}} sets the default color of lines +connecting points in a \twodim{} viewport to the palette +\smath{p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{linSolve}}\opLeftPren{}{\it listOfPolynomials}, \allowbreak{}{\it listOfVariables}\opRightPren{}% +}% +}% +{2}{(List(P), List(OV))->Record(particular:Union(Vector(F), "failed"), basis:List(Vector(F)))}{LinearSystemPolynomialPackage} +{\smath{\mbox{\bf linSolve}\opLeftPren{}lp, \allowbreak{} lvar\opRightPren{}} finds the solutions of the linear system of polynomials \smath{lp} = 0 with respect to the list of symbols \smath{lvar}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{li}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{LiouvillianFunctionCategory} +{\smath{li(x)} returns the logarithmic integral of \smath{x} +defined by, \smath{\int {dx\over log(x)}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{list}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(S)->\$}{ListAggregate} +{\smath{\mbox{\bf list}\opLeftPren{}x\opRightPren{}} creates a list consisting of the one element \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{list?}}\opLeftPren{}{\it sExpression}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{SExpressionCategory} +{\smath{\mbox{\bf list?}\opLeftPren{}s\opRightPren{}} tests if \spadtype{SExpression} value \smath{s} +is a Lisp list, possibly the null list. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{listBranches}}\opLeftPren{}{\it listOfListsOfPoints}\opRightPren{}% +}% +}% +{1}{(\$)->List(List(Point(DoubleFloat)))}{PlottablePlaneCurveCategory} +{\smath{\mbox{\bf listBranches}\opLeftPren{}c\opRightPren{}} returns a list of lists of points +representing the branches of the curve \smath{c}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{listRepresentation}}\opLeftPren{}{\it permutation}\opRightPren{}% +}% +}% +{1}{(\$)->Record(preimage:List(S), image:List(S))}{Permutation} +{\smath{\mbox{\bf listRepresentation}\opLeftPren{}p\opRightPren{}} produces a representation {\it rep} +of the permutation \smath{p} as a list of preimages and images +\smath{i}, that is, permutation \smath{p} maps \smath{(rep.{\tt +preimage}).k} to \smath{(rep.{\tt image}).k} for all indices +\smath{k}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{listYoungTableaus}}\opLeftPren{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{1}{(List(Integer))->List(Matrix(Integer))}{SymmetricGroupCombinatoricFunctions} +{\smath{\mbox{\bf listYoungTableaus}\opLeftPren{}lambda\opRightPren{}}, where {\it lambda} is a proper +partition, generates the list of all standard tableaus of shape +{\it lambda} by means of lattice permutations. +The numbers of the lattice permutation are interpreted as column +labels. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{listOfComponents}}\opLeftPren{}{\it threeSpace}\opRightPren{}% +}% +}% +{1}{(\$)->List(List(List(Point(R))))}{ThreeSpace} +{\smath{\mbox{\bf listOfComponents}\opLeftPren{}sp\opRightPren{}} returns a list of list of list of points for threeSpace +object \smath{sp} assumed to be composed of a list of components, each a list of +curves, which in turn is each a list of points, +or calls \spadfun{error} if this is not possible. +} + +{\smath{\mbox{\bf listOfCurves}\opLeftPren{}sp\opRightPren{}} returns a list of list of subspace component properties +for threeSpace object \smath{sp} assumed to be a list of curves, each of which is +a list of subspace components, or calls \spadfun{error} if this is not possible. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{lo}}\opLeftPren{}{\it segment}\opRightPren{}% +}% +}% +{1}{(\$)->S}{SegmentCategory} +{\smath{\mbox{\bf lo}\opLeftPren{}s\opRightPren{}} returns the first endpoint of \smath{s}. +For example, \code{lo(l..h) = l}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{log}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{logIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, "failed")}{PartialTranscendentalFunctions} +{\smath{\mbox{\bf log}\opLeftPren{}x\opRightPren{}} returns the natural logarithm of \smath{x}. +\newitem +\smath{\mbox{\bf logIfCan}\opLeftPren{}z\opRightPren{}} returns \smath{\mbox{\bf log}\opLeftPren{}z\opRightPren{}} if possible, and +\mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{log2}}\opLeftPren{}{\it \opt{float}}\opRightPren{}% +}% +}% +{0}{()->\$}{Float} +{\smath{\mbox{\bf log2}\opLeftPren{}\opRightPren{}} returns \smath{ln(2) = 0.6931471805\ldots}. +\newitem +\smath{\mbox{\bf log2}\opLeftPren{}x\opRightPren{}} computes the base 2 logarithm for \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{log10}}\opLeftPren{}{\it \opt{float}}\opRightPren{}% +}% +}% +{0}{()->\$}{Float} +{\smath{\mbox{\bf log10}\opLeftPren{}\opRightPren{}} returns \smath{ln(10) = 2.3025809299\ldots}. +\newitem +\smath{\mbox{\bf log10}\opLeftPren{}x\opRightPren{}} computes the base 10 logarithm for \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{logGamma}}\opLeftPren{}{\it float}\opRightPren{}% +}% +}% +{1}{(Complex(DoubleFloat))->Complex(DoubleFloat)}{DoubleFloatSpecialFunctions} +{\smath{\mbox{\bf logGamma}\opLeftPren{}x\opRightPren{}} is the natural log of $\Gamma(x).$ +Note: this can often be computed even if $\Gamma(x)$ cannot. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{lowerCase}}\opLeftPren{}{\it \opt{string}}\opRightPren{}% + \opand \mbox{\axiomFun{lowerCase?}}\opLeftPren{}{\it character}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{Character} +{\smath{\mbox{\bf lowerCase}\opLeftPren{}\opRightPren{}} returns the class of all characters for which \spadfunFrom{lowerCase?}{Character} is \smath{true}. +\newitem +\smath{\mbox{\bf lowerCase}\opLeftPren{}c\opRightPren{}} +returns a corresponding lower case alphabetic character \smath{c} if +\smath{c} is an upper case alphabetic character, +and \smath{c} otherwise. +\newitem +\smath{\mbox{\bf lowerCase}\opLeftPren{}s\opRightPren{}} returns the string with all characters in lower case. +\newitem +\smath{\mbox{\bf lowerCase?}\opLeftPren{}c\opRightPren{}} tests if character \smath{c} is an lower case letter, that is, +one of \smath{a}\ldots\smath{z}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{listOfProperties}}\opLeftPren{}{\it threeSpace}\opRightPren{}% +}% +}% +{1}{(\$)->List(SubSpaceComponentProperty)}{ThreeSpace} +{\smath{\mbox{\bf listOfProperties}\opLeftPren{}sp\opRightPren{}} returns a list of subspace +component properties for \smath{sp} of type \spadtype{ThreeSpace}, +or calls \spadfun{error} if this is not possible. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{listOfPoints}}\opLeftPren{}{\it threeSpace}\opRightPren{}% +}% +}% +{1}{(\$)->List(Point(R))}{ThreeSpace} +{\smath{\mbox{\bf listOfPoints}\opLeftPren{}sp\opRightPren{}}, +where \smath{sp} is a \spadtype{ThreeSpace} object, +returns the list of points component contained in \smath{sp}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{mainKernel}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->Union(Kernel(\$), "failed")}{ExpressionSpace} +{\smath{\mbox{\bf mainKernel}\opLeftPren{}f\opRightPren{}} returns a kernel of \smath{f} with maximum +nesting level, or \mbox{\tt "failed"} if \smath{f} has no kernels +(that is, \smath{f} is a constant). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{mainVariable}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(\$)->Union(VarSet, "failed")}{PolynomialCategory} +{\smath{\mbox{\bf mainVariable}\opLeftPren{}u\opRightPren{}} returns the variable of highest ordering +that actually occurs in the polynomial \smath{p}, or \mbox{\tt +"failed"} if no variables are present. +Argument u can be either a polynomial or a rational function. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{makeFloatFunction}}\opLeftPren{}{\it expression}, \allowbreak{}{\it symbol}\allowbreak $\,[$ , \allowbreak{}{\it symbol}$]$\opRightPren{}% +}% +}% +{2}{(S, Symbol)->(DoubleFloat)->DoubleFloat}{MakeFloatCompiledFunction} +{\opkey{Argument \smath{expr} may be of any type that is coercible to +type \spadtype{InputForm} (objects of the most common types can +be so coerced).} +\newitem +\smath{\mbox{\bf makeFloatFunction}\opLeftPren{}expr, \allowbreak{} x\opRightPren{}} returns an anonymous function +of type \spadsig{Float}{Float} defined by +\smath{x \mapsto {\rm expr}}. +\newitem +\smath{\mbox{\bf makeFloatFunction}\opLeftPren{}expr, \allowbreak{} x, \allowbreak{} y\opRightPren{}} returns an anonymous function +of type \spadsig{(Float, Float)}{Float} defined by +\smath{(x, y) \mapsto {\rm expr}}. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{makeVariable}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(S)->(NonNegativeInteger)->\$}{DifferentialPolynomialCategory} +{\smath{\mbox{\bf makeVariable}\opLeftPren{}s\opRightPren{}}, where \smath{s} is a symbol, +differential indeterminate, or a differential polynomial, +returns a function \smath{f} defined on the non-negative integers +such that \smath{f(n)} +returns the \eth{\smath{n}} derivative of \smath{s}. +\newitem +\smath{\mbox{\bf makeVariable}\opLeftPren{}s, \allowbreak{} n\opRightPren{}} returns the \eth{\smath{n}} derivative of a +differential indeterminate \smath{s} as an algebraic indeterminate. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{makeObject}}\opLeftPren{}{\it functions}, \allowbreak{}{\it range}\allowbreak $\,[$ , \allowbreak{}{\it range}$]$\opRightPren{}% +}% +}% +{2}{(ParametricSpaceCurve((DoubleFloat)->DoubleFloat), Segment(Float))->ThreeSpace(DoubleFloat)}{TopLevelDrawFunctionsForCompiledFunctions} +{Arguments \smath{f}, \smath{g}, and \smath{h} appearing below +with arguments (for example, \smath{f(x, y)}) denote symbolic +expressions involving those arguments. +\largerbreak Arguments \smath{f}, \smath{g}, and \smath{h} +appearing below as symbols without arguments denote user-defined +functions which map one or more \spadtype{DoubleFloat} values to +\spadtype{DoubleFloat} values. +\largerbreak Values \smath{a}, \smath{b}, \smath{c}, and \smath{d} +denote numerical values. +\bigitem\smath{\mbox{\bf makeObject}\opLeftPren{}curve(f, g, h), \allowbreak{} a..b\opRightPren{}} returns the space +\smath{sp} of the domain \spadtype{ThreeSpace} with the addition +of the graph of the parametric curve \smath{x = f(t)}, \smath{y = +g(t)}, \smath{z = h(t)} as \smath{t} ranges from \smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} +to \smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}. +\bigitem\smath{\mbox{\bf makeObject}\opLeftPren{}curve(f(t), g(t), h(t)), \allowbreak{} t = a..b\opRightPren{}} +returns the space \smath{sp} of the domain \spadtype{ThreeSpace} +with the addition of the graph of the parametric curve \smath{x = +f(t)}, \smath{y = g(t)}, \smath{z = h(t)} as \smath{t} ranges from +\smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}. +\bigitem\smath{\mbox{\bf makeObject}\opLeftPren{}f, \allowbreak{} a..b, \allowbreak{} c..d\opRightPren{}} returns the space +\smath{sp} of the domain \spadtype{ThreeSpace} with the addition +of the graph of \smath{z = f(x, y)} as \smath{x} ranges from +\smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} and \smath{y} ranges from +\smath{\mbox{\bf min}\opLeftPren{}c, \allowbreak{} d\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}c, \allowbreak{} d\opRightPren{}}. +\bigitem\smath{\mbox{\bf makeObject}\opLeftPren{}f(x, y), \allowbreak{} x = a..b, \allowbreak{} y = c..d\opRightPren{}} returns +the space \smath{sp} of the domain \spadtype{ThreeSpace} with the +addition of the graph of \smath{z = f(x, y)} as \smath{x} ranges +from \smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} and \smath{y} ranges +from \smath{\mbox{\bf min}\opLeftPren{}c, \allowbreak{} d\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}c, \allowbreak{} d\opRightPren{}}. +\bigitem\smath{\mbox{\bf makeObject}\opLeftPren{}surface(f, g, h), \allowbreak{} a..b, \allowbreak{} c..d\opRightPren{}} returns +the space \smath{sp} of the domain \spadtype{ThreeSpace} with the +addition of the graph of the parametric surface \smath{x = f(u, +v)}, \smath{y = g(u, v)}, \smath{z = h(u, v)} as \smath{u} ranges +from \smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} and \smath{v} ranges +from \smath{\mbox{\bf min}\opLeftPren{}c, \allowbreak{} d\opRightPren{}} to \smath{\mbox{\bf max}\opLeftPren{}c, \allowbreak{} d\opRightPren{}}. +\bigitem \smath{makeObject(surface(f(u, v), g(u, v), h(u, v)), u = +a..b, v = c..d)} returns the space \smath{sp} of the domain +\spadtype{ThreeSpace} with the addition of the graph of the +parametric surface \smath{x = f(u, v)}, \smath{y = g(u, v)}, +\smath{z = h(u, v)} as \smath{u} ranges from \smath{\mbox{\bf min}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} to +\smath{\mbox{\bf max}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} and \smath{v} ranges from \smath{\mbox{\bf min}\opLeftPren{}c, \allowbreak{} d\opRightPren{}} to +\smath{\mbox{\bf max}\opLeftPren{}c, \allowbreak{} d\opRightPren{}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{makeYoungTableau}}\opLeftPren{}{\it listOfIntegers}, \allowbreak{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{2}{(List(Integer), List(Integer))->Matrix(Integer)}{SymmetricGroupCombinatoricFunctions} +{\smath{\mbox{\bf makeYoungTableau}\opLeftPren{}lambda, \allowbreak{} gitter\opRightPren{}} computes for a given +lattice permutation {\it gitter} and for an improper partition +{\it lambda} the corresponding standard tableau of shape {\it +lambda}. +See \spadfun{listYoungTableaus}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{mantissa}}\opLeftPren{}{\it float}\opRightPren{}% +}% +}% +{1}{(\$)->Integer}{FloatingPointSystem} +{\smath{\mbox{\bf mantissa}\opLeftPren{}x\opRightPren{}} returns the mantissa part of \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{map}}\opLeftPren{}{\it function}, \allowbreak{}{\it structure}\allowbreak $\,[$ , \allowbreak{}{\it structure}$]$\opRightPren{}% + \opand \mbox{\axiomFun{map!}}\opLeftPren{}{\it function}, \allowbreak{}{\it structure}\opRightPren{}% +}% +}% +{2}{((R)->R, \$)->\$}{AbelianMonoidRing} +{\smath{\mbox{\bf map}\opLeftPren{}fn, \allowbreak{} u\opRightPren{}} maps the one-argument function \smath{fn} onto +the components of a structure, returning a new structure. +Most structures allow \smath{f} to have different source and +target domains. +Specifically, the function \smath{f} is mapped onto the following +components of the structure as follows. +If \smath{u} is: \begin{simpleList} \item a series: the +coefficients of the series. +\item a polynomial: the coefficients of the non-zero monomials. +\item a direct product of elements: the elements. +\item an aggregate, tuple, table, or a matrix: all its elements. +\item an operation of the form \smath{op(a_1, \ldots, a_n)}: each +\smath{a_i}, returning \smath{op(f(a_1), \ldots, f(a_n))}. +\item a fraction: the numerator and denominator. +\item complex: the real and imaginary parts. +\item a quaternion or octonion: the real and all imaginary parts. +\item a finite or infinite series or stream: all the coefficients. +\item a factored object: onto all the factors. +\item a segment \smath{a..b} or a segment binding of the form +\smath{x=a..b}: each of the elements from \smath{a} to \smath{b}. +\item an equation: both sides of the equation. +\end{simpleList} \smath{\mbox{\bf map}\opLeftPren{}fn, \allowbreak{} u, \allowbreak{} v\opRightPren{}} maps the two argument +function \smath{fn} onto the components of a structure, returning +a new structure. +Arguments \smath{u} and \smath{v} can be matrices, finite +aggregates such as lists, tables, and vectors, and infinite +aggregates such as streams and series. +\bigitem \smath{\mbox{\bf map!}\opLeftPren{}f, \allowbreak{} u\opRightPren{}}, where \smath{u} is homogeneous +aggregate, destructively replaces each element \smath{x} of +\smath{u} by \smath{f(x)}. +\bigitem \seeAlso{\spadfun{match}} } + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{mapCoef}}\opLeftPren{}{\it function}, \allowbreak{}{\it freeAbelianMonoid}\opRightPren{}% + \opand \mbox{\axiomFun{mapGen}}\opLeftPren{}{\it function}, \allowbreak{}{\it freeAbelianMonoid}\opRightPren{}% +}% +}% +{2}{((E)->E, \$)->\$}{FreeAbelianMonoidCategory} +{\smath{\mbox{\bf mapCoeff}\opLeftPren{}f, \allowbreak{} m\opRightPren{}} maps unary function \smath{f} onto the +coefficients of a free abelian monoid of the form +\smath{e_1 a_1 +\ldots+ e_n a_n} returning +\smath{f(e_1) a_1 +\ldots+ f(e_n) a_n}. +\newitem\smath{\mbox{\bf mapGen}\opLeftPren{}fn, \allowbreak{} m\opRightPren{}} similarly returns +\smath{e_1 f(a_1) +\ldots+ e_n f(a_n)}. +\seeType{FreeAbelianMonoidCategory} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{mapDown!}}\opLeftPren{}{\it tree}, \allowbreak{}{\it value}, \allowbreak{}{\it function}\opRightPren{}% +}% +}% +{2}{((E)->E, \$)->\$}{FreeAbelianMonoidCategory} +{\opkey{These operations make a preorder traversal (node then +left branch +then right branch) of a tree \smath{t} of type +\spadtype{BalancedBinaryTree(S)}, destructively mapping values of +type \smath{S} from the root to the leaves of the tree, then +returning the modified tree as value; \smath{p} is a value of type +\smath{S}.} +\newitem\smath{\mbox{\bf mapDown!}\opLeftPren{}t, \allowbreak{} p, \allowbreak{} f\opRightPren{}}, where \smath{f} is a function +of type \spadsig{(S, S)}{S}, replaces the successive interior +nodes of \smath{t} as follows. +The root value \smath{x} is replaced by \smath{q = f(x, p)}. +Then \spadfun{mapDown!} is recursively applied to \smath{(l, q, +f)} and \smath{(r, q, f)} where \smath{l} and \smath{r} are +respectively the left and right subtrees of \smath{t}. +\newitem\smath{\mbox{\bf mapDown!}\opLeftPren{}t, \allowbreak{} p, \allowbreak{} f\opRightPren{}}, where \smath{f} is a function +of type \spadsig{(S, S, S)}{List S}, is similar. +The root value of \smath{t} is first replaced by \smath{p}. +Then \smath{f} is applied to three values: the value at the +current, left, and right node (in that order) to produce a list of +two values \spad{l} and \spad{r}, which are then passed +recursively as the second argument of \spadfun{mapDown!} to +the left and right subtrees. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{mapExponents}}\opLeftPren{}{\it function}, \allowbreak{}{\it polynomial}\opRightPren{}% +}% +}% +{2}{((E)->E, \$)->\$}{FiniteAbelianMonoidRing} +{\smath{\mbox{\bf mapExponents}\opLeftPren{}fn, \allowbreak{} u\opRightPren{}} maps function \smath{fn} onto the +exponents of the non-zero monomials of polynomial \smath{u}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{mapUp!}}\opLeftPren{}{\it \optinit{tree, }tree, function}\opRightPren{}% +}% +}% +{2}{((E)->E, \$)->\$}{FreeAbelianMonoidCategory} +{\opkey{These operations make an endorder traversal (left branch then +right branch then node) of a tree \smath{t} of type +\spadtype{BalancedBinaryTree(S)}, destructively mapping values of +type \smath{S} from the leaves to the root of the tree, then +returning the modified tree as value; \smath{p} is a value of type +\smath{S}.} +\newitem\smath{\mbox{\bf mapUp!}\opLeftPren{}t, \allowbreak{} f\opRightPren{}}, where \smath{f} has type +\spadsig{(S, S)}{S}, replaces the value at each interior node by +\smath{f(l, r)}, where \smath{l} and \smath{r} are the values at +the immediate left and right nodes. +\newitem\smath{\mbox{\bf mapUp!}\opLeftPren{}t, \allowbreak{} t_1, \allowbreak{} f\opRightPren{}} makes an endorder traversal of +both \smath{t} and \smath{t_1} (of identical shape) in parallel. +The value at each successive interior node of \smath{t} is +replaced by \smath{f(l, r, l_1, r_1)}, where \smath{l} and +\smath{r} are the values at the immediate left and right nodes of +\smath{t}, and \smath{l_1} and \smath{r_1} are corresponding +values of \smath{t_1}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{mask}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{IntegerNumberSystem} +{\smath{\mbox{\bf mask}\opLeftPren{}n\opRightPren{}} returns \smath{2^n-1} (an \smath{n}-bit mask). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{match?}}\opLeftPren{}{\it string}, \allowbreak{}{\it string}, \allowbreak{}{\it character}\opRightPren{}% +}% +}% +{3}{(\$, \$, Character)->Boolean}{StringAggregate} +{\smath{\mbox{\bf match?}\opLeftPren{}s, \allowbreak{} t, \allowbreak{} char\opRightPren{}} tests if \smath{s} matches \smath{t} except perhaps for multiple and consecutive occurrences of character \smath{char}. Typically \smath{char} is the blank character. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{match}}\opLeftPren{}{\it list}, \allowbreak{}{\it list}\allowbreak $\,[$ , \allowbreak{}{\it option}$]$\opRightPren{}% +}% +}% +{2}{(List(A), List(B))->(A)->B}{ListToMap} +{\smath{\mbox{\bf match}\opLeftPren{}la, \allowbreak{} lb\optinner{, u}\opRightPren{}}, +where \smath{la} and \smath{lb} are lists of equal length, +creates a function that can be used by \spadfun{map}. +The target of a source value \smath{x} in \smath{la} is the +value \smath{y} with the corresponding index in \smath{lb}. +Optional argument \smath{u} defines the target for a source +value \smath{a} which is not in \smath{la}. +If \smath{u} is a value of the source domain, then \smath{a} is replaced by \smath{u}, +which must be a member of \smath{la}. +If \smath{u} is a value of the target domain, the value returned by the map for +\smath{a} is \smath{u}. +If \smath{u} is a function \smath{f}, then the value returned is \smath{f(a)}. +If no third argument is given, an error occurs when such a \smath{a} is found. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{mathieu11}}\opLeftPren{}{\it \opt{listOfIntegers}}\opRightPren{}% + \optand \mbox{\axiomFun{mathieu12}}\opLeftPren{}{\it \opt{listOfIntegers}}\opRightPren{}% + \optand \mbox{\axiomFun{mathieu22}}\opLeftPren{}{\it \opt{listOfIntegers}}\opRightPren{}% + \optand \mbox{\axiomFun{mathieu23}}\opLeftPren{}{\it \opt{listOfIntegers}}\opRightPren{}% + \opand \mbox{\axiomFun{mathieu24}}\opLeftPren{}{\it \opt{listOfIntegers}}\opRightPren{}% +}% +}% +% +{0}{()->PermutationGroup(Integer)}{PermutationGroupExamples}{% +\smath{\mbox{\bf mathieu11}\opLeftPren{}\optinner{li}\opRightPren{}} constructs the +mathieu group acting on the eleven integers given in the list \smath{li}. +Duplicates +in the list will be removed and \spadfun{error} will be called +if \smath{li} has fewer or more than eleven different entries. +The default value of \smath{li} is \smath{[1, \ldots, 11]}. +Operations \smath{mathieu12}, +\smath{mathieu22}, and \smath{mathieu23} +and \smath{mathieu24} are similar. +These operations provide examples of permutation groups in \Language{}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{matrix}}\opLeftPren{}{\it listOfLists}\opRightPren{}% +}% +}% +{1}{(List(List(R)))->\$}{RectangularMatrixCategory} +{\smath{\mbox{\bf matrix}\opLeftPren{}l\opRightPren{}} converts the list of lists \smath{l} to a +matrix, where the list of lists is viewed as a list of the rows of +the matrix. +\newitem\smath{\mbox{\bf matrix}\opLeftPren{}llo\opRightPren{}}, +where \smath{llo} is a list of list of objects of type +\spadtype{OutputForm} (normally unexposed), +returns an output form displaying \smath{llo} as a matrix. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{max}}\opLeftPren{}{\it \opt{various}}\opRightPren{}% +}% +}% +{0}{()->\$}{SingleInteger} +{\smath{\mbox{\bf max}\opLeftPren{}\opRightPren{}} returns the largest small integer. +\newline\smath{\mbox{\bf max}\opLeftPren{}u\opRightPren{}} returns the largest element of aggregate +\smath{u}. +\newline\smath{\mbox{\bf max}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} returns the maximum of \smath{x} and +\smath{y} relative to a total ordering \axiomOp{<}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{maxColIndex}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->Integer}{RectangularMatrixCategory} +{\smath{\mbox{\bf maxColIndex}\opLeftPren{}m\opRightPren{}} returns the index of the last column of the matrix +or two-dimensional array \smath{m}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{maxIndex}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->Index}{IndexedAggregate} +{\smath{\mbox{\bf maxIndex}\opLeftPren{}u\opRightPren{}} returns the maximum index \smath{i} of indexed +aggregate \smath{u}. For most indexed aggregates (vectors, strings, lists), +\smath{\mbox{\bf maxIndex}\opLeftPren{}u\opRightPren{}} is equivalent to \smath{\# u.} +} + + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{maxRowIndex}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->Integer}{RectangularMatrixCategory} +{\smath{\mbox{\bf maxRowIndex}\opLeftPren{}m\opRightPren{}} returns the index of the ``last'' row of the matrix +or two-dimensional array \smath{m}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{meatAxe}}\opLeftPren{}{\it listOfListsOfMatrices \opt{, boolean, integer, integer}}\opRightPren{}% +}% +}% +{4}{(List(Matrix(R)), Boolean, Integer, Integer)->List(List(Matrix(R)))}{RepresentationPackage2} +{\smath{\mbox{\bf meatAxe}\opLeftPren{}aG \optinner{, randomElts, \allowbreak numOfTries, \allowbreak maxTests}\opRightPren{}} tries to +split the representation given by \smath{aG} and returns a 2-list of +representations. All matrices of argument \smath{aG} are assumed to be square and of equal size. +The default values of arguments \smath{randomElts}, +\smath{numOfTries} and \smath{maxTests} are \smath{false}, 25, and 7, respectively. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{member?}}\opLeftPren{}{\it element}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{(S, \$)->Boolean}{HomogeneousAggregate} +{\smath{\mbox{\bf member?}\opLeftPren{}x, \allowbreak{} u\opRightPren{}} tests if \smath{x} is a member of \smath{u}. +\newitem +\smath{\mbox{\bf member?}\opLeftPren{}pp, \allowbreak{} gp\opRightPren{}}, where \smath{pp} is a permutation and +\smath{gp} is a group, tests +whether {\it pp} is in the group {\it gp}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{merge}}\opLeftPren{}{\it various}\opRightPren{}% + \opand \mbox{\axiomFun{merge!}}\opLeftPren{}{\it various}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{ExtensibleLinearAggregate} +{\smath{\mbox{\bf merge}\opLeftPren{}[s1, \allowbreak{} s2, \allowbreak{} \ldots, sn]\opRightPren{}} will create a new +\spadtype{ThreeSpace} object that has the components of all the ones in +the list; groupings of components into composites are maintained. +\newitem +\smath{\mbox{\bf merge}\opLeftPren{}s1, \allowbreak{} s2\opRightPren{}} will create a new \spadtype{ThreeSpace} +object that +has the components of \smath{s1} and \smath{s2}; groupings +of components into composites are maintained. +\newitem +\smath{\mbox{\bf merge}\opLeftPren{}\optfirst{p, }a, b\opRightPren{}} returns an aggregate \smath{c} which +merges \smath{a} and \smath{b}. +The result is produced by examining each element \smath{x} of \smath{a} +and \smath{y} of \smath{b} successively. +If \smath{p(x, y)} is \smath{true}, then \smath{x} is inserted into the +result. +Otherwise \smath{y} is inserted. +If \smath{x} is chosen, the next element of \smath{a} is examined, and so on. +When all the elements of one aggregate are examined, the remaining elements of the other are appended. For example, \smath{\mbox{\bf merge}\opLeftPren{}<, \allowbreak{} [1, \allowbreak{} 3], \allowbreak{} [2, \allowbreak{} 7, \allowbreak{} 5]\opRightPren{}} returns \smath{[1, 2, 3, 7, 5]}. +By default, function \smath{p} is \smath{\leq}. +\newitem +\smath{\mbox{\bf merge!}\opLeftPren{}\optfirst{p}, u, v\opRightPren{}} destructively merges the elements \smath{u} and \smath{v} into +\smath{u} using comparison function \smath{p}. +Function \smath{p} is \smath{\leq} by default. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{mesh}}\opLeftPren{}{\it u\opt{, v, w, x}}\opRightPren{}% +}% +}% +{4}{(\$, List(List(List(R))), Boolean, Boolean)->\$}{ThreeSpace} +{\opkey{Argument \smath{sp} below is a \spadtype{ThreeSpace} +object \smath{sp}. +Argument \smath{lc} is a list of curves. +Each curve is either a list of points (objects of type +\spadtype{Point}) or else a list of lists of small floats.} +\newitem\smath{\mbox{\bf mesh}\opLeftPren{}lc\opRightPren{}} returns a \spadtype{ThreeSpace} object +defined by \smath{lc}. +\newitem\smath{\mbox{\bf mesh}\opLeftPren{}sp\opRightPren{}} returns the list of curves contained in +space \smath{sp}. +\newitem\smath{\mbox{\bf mesh}\opLeftPren{}\optfirst{sp, }, lc, close1, close2\opRightPren{}} adds the +list of curves \smath{lc} to the \spadtype{ThreeSpace} object +\smath{sp}. +Boolean arguments \smath{close1} and \smath{close2} tell how the +curves and surface are to be closed. +If \smath{close1} is \smath{true}, each individual curve will be +closed, that is, the last point of the list will be connected to +the first point. +If \smath{close2} is \smath{true}, the first and last curves are +regarded as boundaries and are connected. +By default, the argument \smath{sp} is empty. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{midpoints}}\opLeftPren{}{\it listOfIntervals}\opRightPren{}% +}% +}% +{1}{(List(Record(left:Fraction(Integer), right:Fraction(Integer))))->List(Fraction(Integer))}{RealZeroPackage} +{\opkey{These operations are defined on ``intervals'' represented +by records with keys \smath{right} and \smath{left}, and rational number values.} +\newitem\smath{\mbox{\bf midpoints}\opLeftPren{}isolist\opRightPren{}} returns the list of midpoints for the list of intervals \smath{isolist}. +\newitem\smath{\mbox{\bf midpoint}\opLeftPren{}int\opRightPren{}} returns the midpoint of the interval \smath{int}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{min}}\opLeftPren{}{\it \opt{u, v}}\opRightPren{}% +}% +}% +{0}{()->\$}{SingleInteger} +{\smath{\mbox{\bf min}\opLeftPren{}\opRightPren{}} returns the element of type \spadtype{SingleInteger}. +\newitem +\smath{\mbox{\bf min}\opLeftPren{}u\opRightPren{}} returns the smallest element of aggregate \smath{u}. +\newitem +\smath{\mbox{\bf min}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} returns the minimum of \smath{x} and \smath{y} relative to +total ordering \smath{<}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{minColIndex}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->Integer}{RectangularMatrixCategory} +{\smath{\mbox{\bf minColIndex}\opLeftPren{}m\opRightPren{}} returns the index of the ``first'' column +of the matrix +or two-dimensional array \smath{m}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{minimalPolynomial}}\opLeftPren{}{\it element}, \allowbreak{}{\it positiveInteger}\opRightPren{}% +}% +}% +{1}{(\$)->SparseUnivariatePolynomial(F)}{FiniteAlgebraicExtensionField} +{\smath{\mbox{\bf minimalPolynomial}\opLeftPren{}x\optinner{, n}\opRightPren{}} computes the minimal polynomial of \smath{x} over the field of extension degree \smath{n} over the ground field \smath{F}. +The default value of \smath{n} is 1. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{minimalPolynomial}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->UP}{FiniteRankAlgebra} +{\smath{\mbox{\bf minimalPolynomial}\opLeftPren{}a\opRightPren{}} returns the minimal polynomial of element \smath{a} +of a finite rank algebra. +\seeType{FiniteRankAlgebra} +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{minimumDegree}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it variable}\opRightPren{}% +}% +}% +{1}{(\$)->E}{FiniteAbelianMonoidRing} +{\smath{\mbox{\bf minimumDegree}\opLeftPren{}p, \allowbreak{} v\opRightPren{}} gives the minimum degree of polynomial \smath{p} with respect to \smath{v}, that is, viewed as a univariate polynomial in \smath{v}. +\newitem +\smath{\mbox{\bf minimumDegree}\opLeftPren{}p, \allowbreak{} lv\opRightPren{}} gives the list of minimum degrees of the polynomial \smath{p} with respect to each of the variables in the list \smath{lv}. +\newitem +\seeAlso{\spadtype{FiniteAbelianMonoidRing} and \spadtype{MonogenicLinearOperator}} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{minIndex}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->Index}{IndexedAggregate} +{\smath{\mbox{\bf minIndex}\opLeftPren{}aggregate\opRightPren{}} returns the minimum index \smath{i} of aggregate \smath{u}. +Note: the \axiomFun{minIndex} of most system-defined indexed aggregates is 1. +See also \spadtype{PointCategory}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{minordet}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->R}{MatrixCategory} +{\smath{\mbox{\bf minordet}\opLeftPren{}m\opRightPren{}} computes the determinant of the matrix \smath{m} using minors, +or calls \spadfun{error} if the matrix is not square. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{minPoly}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(Kernel(\$))->SparseUnivariatePolynomial(\$)}{ExpressionSpace} +{\smath{\mbox{\bf minPoly}\opLeftPren{}k\opRightPren{}} returns polynomial \smath{p} such that \smath{p(k) = 0}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{minRowIndex}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->Integer}{RectangularMatrixCategory} +{\smath{\mbox{\bf minRowIndex}\opLeftPren{}m\opRightPren{}} returns the index of the ``first'' row of the matrix +or two-dimensional array \smath{m}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{minusInfinity}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->OrderedCompletion(Integer)}{Infinity} +{\smath{\mbox{\bf minusInfinity}\opLeftPren{}\opRightPren{}} returns {\tt \%minusInfinity}, +the \Language{} name for \smath{-\infty}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{modifyPointData}}\opLeftPren{}{\it space}, \allowbreak{}{\it nonNegativeInteger}, \allowbreak{}{\it point}\opRightPren{}% +}% +}% +{3}{(\$, NonNegativeInteger, Point(R))->\$}{ThreeSpace} +{\smath{\mbox{\bf modifyPointData}\opLeftPren{}sp, \allowbreak{} i, \allowbreak{} p\opRightPren{}} changes the point at the indexed location \smath{i} in the \spadtype{ThreeSpace} object \smath{sp} to \smath{p}. +This operation is useful for making changes to existing data. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{moduloP}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(\$)->Integer}{PAdicIntegerCategory} +{\smath{\mbox{\bf moduloP}\opLeftPren{}x\opRightPren{}}, such that \smath{p = \mbox{\bf modulus}()}, + returns a, where \smath{x = a + b p} +where \smath{x} is a \smath{p}-adic integer. +\seeType{PAdicIntegerCategory} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{modulus}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Integer}{PAdicIntegerCategory} +{\smath{\mbox{\bf modulus}\opLeftPren{}\opRightPren{}\$R} returns the value of the modulus \smath{p} +of a p-adic integer domain \smath{R}. +\seeType{PAdicIntegerCategory} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{moebiusMu}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(Integer)->Integer}{IntegerNumberTheoryFunctions} +{\smath{\mbox{\bf moebiusMu}\opLeftPren{}n\opRightPren{}} returns the Moebius function \smath{\mu(n)}, +defined as \smath{-1}, \smath{0} or \smath{1} as +follows: \smath{\mu(n) = 0} if \smath{n} is divisible by a square +\smath{ > 1}, and \smath{(-1)^k} if \smath{n} is square-free and +has \smath{k} distinct prime divisors. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{monicDivide}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it polynomial}\allowbreak $\,[$ , \allowbreak{}{\it variable}$]$\opRightPren{}% +}% +}% +{2}{(\$, \$)->Record(quotient:\$, remainder:\$)}{UnivariatePolynomialCategory} +{\smath{\mbox{\bf monicDivide}\opLeftPren{}p, \allowbreak{} q\optinner{, v}\opRightPren{}} divides the polynomial +\smath{p} by the monic polynomial \smath{q}, returning the record +containing a \smath{quotient} and \smath{remainder}. +For multivariate polynomials, the polynomials are viewed as a +univariate polynomials in \smath{v}. +If \smath{p} and \smath{q} are univariate polynomials, then the +third argument may be omitted. +The operation calls \spadfun{error} if \smath{q} is not monic with +respect to \smath{v}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{monomial}}\opLeftPren{}{\it coefficient}, \allowbreak{}{\it exponent}\allowbreak $\,[$ , \allowbreak{}{\it option}$]$\opRightPren{}% +}% +}% +{2}{(R, E)->\$}{AbelianMonoidRing} +{\smath{\mbox{\bf monomial}\opLeftPren{}coef, \allowbreak{} exp\opRightPren{}} creates a term of +a univariate polynomial or series object from a coefficient \smath{coef} and +exponent \smath{exp}. The variable name must be given by context +(as through a declaration for the result). +\newitem +\smath{\mbox{\bf monomial}\opLeftPren{}c, \allowbreak{} [x_1, \allowbreak{} \ldots, x_k], [n_1, \ldots, n_k]\opRightPren{}} creates a term +\smath{c x_1^{n_1}\ldots x_k^{n_k}} +of a multivariate power series or polynomial +from coefficient \smath{c}, variables \smath{x_j} and exponents +\smath{n_j}. +\newitem +\smath{\mbox{\bf monomial}\opLeftPren{}c, \allowbreak{} x, \allowbreak{} n\opRightPren{}} creates a term \smath{c x^n} +of a polynomial or series +from a coefficient \smath{c}, variable \smath{x}, and exponent \smath{n}. +\newitem +\smath{\mbox{\bf monomial}\opLeftPren{}c, \allowbreak{} [n_1, \allowbreak{} \ldots, n_k]\opRightPren{}} +creates a \spadtype{CliffordAlgebra} element \smath{c e(n_1), \ldots, c e(n_k)} +from a coefficient \smath{c} and basis elements \smath{c(i_j)} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{monomial?}}\opLeftPren{}{\it polynomialOrSeries}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{AbelianMonoidRing} +{\smath{\mbox{\bf monomial?}\opLeftPren{}p\opRightPren{}} tests if polynomial or series \smath{p} is a +single monomial. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{monomials}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(\$)->List(\$)}{PolynomialCategory} +{\smath{\mbox{\bf monomials}\opLeftPren{}p\opRightPren{}} returns the list of non-zero monomials of +polynomial \smath{p}, +\smath{[a_1 X^{(1)}, \ldots, a_n X^{(n)}]}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{more?}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(\$, NonNegativeInteger)->Boolean}{Aggregate} +{\smath{\mbox{\bf more?}\opLeftPren{}u, \allowbreak{} n\opRightPren{}} +tests if \smath{u} has greater than \smath{n} elements. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{movedPoints}}\opLeftPren{}{\it permutation}\opRightPren{}% +}% +}% +{1}{(\$)->Set(S)}{Permutation} +{\smath{\mbox{\bf movedPoints}\opLeftPren{}p\opRightPren{}} returns the set of points moved by the permutation \smath{p}. +\newitem +\smath{\mbox{\bf movedPoints}\opLeftPren{}gp\opRightPren{}} returns the points moved by the group {\it gp}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{mulmod}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{3}{(\$, \$, \$)->\$}{IntegerNumberSystem} +{\smath{\mbox{\bf mulmod}\opLeftPren{}a, \allowbreak{} b, \allowbreak{} p\opRightPren{}}, where \smath{a}, +\smath{b} are non-negative integers both \smath{<} integer \smath{p}, +returns \smath{a b \mod p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{multiEuclidean}}\opLeftPren{}{\it listOfElements}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(List(\$), \$)->Union(List(\$), "failed")}{EuclideanDomain} +{\smath{\mbox{\bf multiEuclidean}\opLeftPren{}[f_1, \allowbreak{} \ldots, f_n], z\opRightPren{}} returns a list of +coefficients \smath{[a_1, \ldots, a_n]} +such that \smath{z/\prod_{i=1}^n f_i = \sum\nolimits_{j=1}^n +{a_j/f_j}}. +If no such list of coefficients exists, \mbox{\tt "failed"} is +returned. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{multinomial}}\opLeftPren{}{\it integer}, \allowbreak{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{2}{(I, List(I))->I}{IntegerCombinatoricFunctions} +{\smath{\mbox{\bf multinomial}\opLeftPren{}n, \allowbreak{} [m_1, \allowbreak{} m_2, \allowbreak{} \ldots, m_k]\opRightPren{}} returns the +multinomial coefficient \smath{n!/(m_1! +m_2! \ldots m_k!)}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{multiple}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{FunctionSpaceAssertions} +{\smath{\mbox{\bf multiple}\opLeftPren{}x\opRightPren{}} directs the pattern matcher that \smath{x} +should preferably match a multi-term quantity in a sum or product. +For matching on lists, multiple(\smath{x}) tells the pattern +matcher that \smath{x} should match a list instead of an element +of a list. +This operation calls \spadfun{error} if \smath{x} is not a symbol. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{multiplyCoefficients}}\opLeftPren{}{\it function}, \allowbreak{}{\it series}\opRightPren{}% +}% +}% +{2}{((Integer)->Coef, \$)->\$}{UnivariateTaylorSeriesCategory} +{\smath{\mbox{\bf multiplyCoefficients}\opLeftPren{}f, \allowbreak{} s\opRightPren{}} returns +\smath{\sum\nolimits_{n = 0}^\infty {f(n) a_n x^n}} where \smath{s} is the +series \smath{\sum\nolimits_{n = 0}^\infty{a_n x^n}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{multiplyExponents}}\opLeftPren{}{\it various}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(\$, NonNegativeInteger)->\$}{UnivariatePolynomialCategory} +{\smath{\mbox{\bf multiplyExponents}\opLeftPren{}p, \allowbreak{} n\opRightPren{}}, +where \smath{p} is a univariate polynomial or series, +returns a new polynomial +or series resulting from multiplying all exponents by the non +negative integer \smath{n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{multiset}}\opLeftPren{}{\it listOfElements}\opRightPren{}% +}% +}% +{2}{(SparseUnivariatePolynomial(R), VarSet)->\$}{PolynomialCategory} +{\smath{\mbox{\bf multiset}\opLeftPren{}ls\opRightPren{}} creates a multiset with elements from \smath{ls}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{multivariate}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it symbol}\opRightPren{}% +}% +}% +{2}{(SparseUnivariatePolynomial(R), VarSet)->\$}{PolynomialCategory} +{\smath{\mbox{\bf multivariate}\opLeftPren{}p, \allowbreak{} v\opRightPren{}} converts an anonymous univariate +polynomial \smath{p} to a polynomial in the variable \smath{v}. +} +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{name}}\opLeftPren{}{\it various}\opRightPren{}% +}% +}% +{1}{(\$)->String}{FileNameCategory} +{\smath{\mbox{\bf name}\opLeftPren{}f\opRightPren{}} returns the name part of the file name for file \smath{f}. +\newitem\smath{\mbox{\bf name}\opLeftPren{}op\opRightPren{}} returns the name of basic operator \smath{op}. +\newitem\smath{\mbox{\bf name}\opLeftPren{}s\opRightPren{}} returns symbol \smath{s} without its scripts. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nand}}\opLeftPren{}{\it boolean}, \allowbreak{}{\it boolean}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{BitAggregate} +{\smath{\mbox{\bf nand}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns the logical negation of +\smath{a} and \smath{b}, either booleans or bit aggregates. +Note: \smath{\mbox{\bf nand}\opLeftPren{}a, b) = true} if and only if one of +\smath{a} and \smath{b} is \smath{false}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nary?}}\opLeftPren{}{\it basicOperator}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{BasicOperator} +{\smath{\mbox{\bf nary?}\opLeftPren{}op\opRightPren{}} tests if \smath{op} accepts an arbitrary number +of arguments. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{ncols}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{RectangularMatrixCategory} +{\smath{\mbox{\bf ncols}\opLeftPren{}m\opRightPren{}} returns the number of columns in the matrix +or two-dimensional array \smath{m}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{new}}\opLeftPren{}{\it \opt{various}}\opRightPren{}% +}% +}% +{0}{()->\$}{ScriptFormulaFormat} +{\smath{\mbox{\bf new}\opLeftPren{}\opRightPren{}\$R} create a new object +of type \smath{R}. When \smath{R} is an aggregate, +\smath{new} creates an empty object. +Other variations are as follows: +\begin{simpleList} +\item\smath{\mbox{\bf new}\opLeftPren{}s\opRightPren{}}, where s is a symbol, +returns a new symbol whose name starts with \%\smath{s}. +\item\smath{\mbox{\bf new}\opLeftPren{}n, \allowbreak{} x\opRightPren{}} returns \smath{\mbox{\bf fill!}\opLeftPren{}new(n), \allowbreak{} x\opRightPren{}}, an +aggregate of \smath{n} elements, each with value \smath{x}. +\item\smath{\mbox{\bf new}\opLeftPren{}m, \allowbreak{} n, \allowbreak{} r\opRightPren{}\$R} creates an \smath{m}-by-\smath{n} array +or matrix of type \smath{R} all of whose entries are \smath{r}. +\item\smath{\mbox{\bf new}\opLeftPren{}d, \allowbreak{} pre, \allowbreak{} e\opRightPren{}}, +where \smath{d}, smath{pre}, and smath{e} are strings, +constructs the name of a new writable file with \smath{d} +as its directory, \smath{pre} as a prefix of its name and \smath{e} +as its extension. When \smath{d} or \smath{e} is the empty string, +a default is used. +The operation calls \spadfun{error} if a new file cannot be +written in the given directory. +\end{simpleList} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{newLine}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->String}{DisplayPackage} +{\smath{\mbox{\bf newLine}\opLeftPren{}\opRightPren{}} sends a new line command to output. +See \spadtype{DisplayPackage}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nextColeman}}\opLeftPren{}{\it listOfIntegers}, \allowbreak{}{\it listOfIntegers}, \allowbreak{}{\it matrix}\opRightPren{}% +}% +}% +{3}{(List(Integer), List(Integer), Matrix(Integer))->Matrix(Integer)}{SymmetricGroupCombinatoricFunctions} +{\smath{\mbox{\bf nextColeman}\opLeftPren{}alpha, \allowbreak{} beta, \allowbreak{} C\opRightPren{}} generates the next +Coleman-matrix of column sums +{\it alpha} and row sums {\it beta} according to the lexicographical +order from bottom-to-top. +The first Coleman matrix is created using \smath{C = {\bf new}(1, 1, 0)}. +Also, \smath{\mbox{\bf new}\opLeftPren{}1, \allowbreak{} 1, \allowbreak{} 0\opRightPren{}} indicates that \smath{C} is the last Coleman matrix. +See \spadtype{SymmetricGroupCombinatoricFunctions} for details. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nextLatticePermutation}}\opLeftPren{}{\it integers}, \allowbreak{}{\it integers}, \allowbreak{}{\it boolean}\opRightPren{}% +}% +}% +{3}{(List(Integer), List(Integer), Boolean)->List(Integer)}{SymmetricGroupCombinatoricFunctions} +{\smath{\mbox{\bf nextLatticePermutation}\opLeftPren{}lambda, \allowbreak{} lattP, \allowbreak{} constructNotFirst\opRightPren{}} +generates the +lattice permutation according to the proper partition \smath{lambda} succeeding +the lattice permutation \smath{lattP} in lexicographical order as +long as \smath{constructNotFirst} is \smath{true}. +If \smath{constructNotFirst} is \smath{false}, the first +lattice permutation is returned. The result \smath{nil} indicates that \smath{lattP} has no successor. +See \spadtype{SymmetricGroupCombinatoricFunctions} for details. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nextPartition}}\opLeftPren{}{\it vectorOfIntegers}, \allowbreak{}{\it vectorOfIntegers}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{3}{(List(Integer), Vector(Integer), Integer)->Vector(Integer)}{SymmetricGroupCombinatoricFunctions} +{\smath{\mbox{\bf nextPartition}\opLeftPren{}gamma, \allowbreak{} part, \allowbreak{} number\opRightPren{}} generates the partition of +\smath{number} which follows \smath{part} according to the +right-to-left lexicographical order. +The partition has the property that its components do not exceed +the corresponding components of \smath{gamma}. +the first partition is achieved by \smath{part={\tt []}}. +Also, {\tt []} indicates that \smath{part} is the last partition. +See \spadtype{SymmetricGroupCombinatoricFunctions} for details. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nextPrime}}\opLeftPren{}{\it positiveInteger}\opRightPren{}% +}% +}% +{1}{(I)->I}{IntegerPrimesPackage} +{\smath{\mbox{\bf nextPrime}\opLeftPren{}n\opRightPren{}} returns the smallest prime strictly larger +than \smath{n}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nil}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{List} +{\smath{\mbox{\bf nil}\opLeftPren{}\opRightPren{}\$R} returns the empty list of type \smath{R}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nilFactor}}\opLeftPren{}{\it element}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(R, Integer)->\$}{Factored} +{\smath{\mbox{\bf nilFactor}\opLeftPren{}base, \allowbreak{} exponent\opRightPren{}} creates a factored object with a single factor +with no information about the kind of \smath{base}. +See \spadtype{Factored} for details. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{node?}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Boolean}{RecursiveAggregate} +{\smath{\mbox{\bf node?}\opLeftPren{}u, \allowbreak{} v\opRightPren{}} tests if node \smath{u} is contained in node +\smath{v} (either as a child, a child of a child, etc.). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nodes}}\opLeftPren{}{\it recursiveAggregate}\opRightPren{}% +}% +}% +{1}{(\$)->List(\$)}{RecursiveAggregate} +{\smath{\mbox{\bf nodes}\opLeftPren{}a\opRightPren{}} returns a list of all the nodes of aggregate +\smath{a}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{noncommutativeJordanAlgebra?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf noncommutativeJordanAlgebra?}\opLeftPren{}\opRightPren{}\$F} tests if the algebra +\smath{F} is flexible and Jordan admissible. +See \spadtype{FiniteRankNonAssociativeAlgebra}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nor}}\opLeftPren{}{\it boolean}, \allowbreak{}{\it boolean}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{BitAggregate} +{\smath{\mbox{\bf nor}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns the logical \smath{nor} of booleans or +bit aggregates \smath{a} and \smath{b}. +Note: \smath{\mbox{\bf nor}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} = true if and only if both \smath{a} and +\smath{b} are \smath{false}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{norm}}\opLeftPren{}{\it element\opt{, option}}\opRightPren{}% +}% +}% +{1}{(\$)->R}{ComplexCategory} +{\smath{\mbox{\bf norm}\opLeftPren{}x\opRightPren{}} returns: +\begin{simpleList} +\item for complex \smath{x}: \smath{\mbox{\bf conjugate}\opLeftPren{}x\opRightPren{}} +. +\item for floats: the absolute value. +\item for quaternions or octonions: the sum of the squares of its coefficients. +\item for a domain of category \spadtype{FiniteRankAlgebra}: +the determinant of the regular representation of \smath{x} with respect to any basis. +\end{simpleList} +\smath{\mbox{\bf norm}\opLeftPren{}x\optinner{, p}\opRightPren{}}, where \smath{p} is a +positiveInteger and \smath{x} is +an element of a domain of category \spadtype{FiniteAlgebraExtensionField} +over ground field \smath{F}, +returns the norm of \smath{x} with respect to the field of extension +degree \smath{d} over the ground field of size. +The default value of \smath{p} is 1. +The operation calls \spadfun{error} if \smath{p} does not divide +the extension degree of \smath{x}. +Note: \smath{\mbox{\bf norm}\opLeftPren{}x, p) = \prod_{i=0}^{n/p} x^{q^{pi}}} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{normal?}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{FiniteAlgebraicExtensionField} +{\smath{\mbox{\bf normal?}\opLeftPren{}a\opRightPren{}}, +where \smath{a} is a member of a domain of category +\smath{FiniteAlgebraicExtensionField} over a field \smath{F}, +tests whether the element \smath{a} +is normal over the ground field \smath{F}, that is, if +\smath{a^{q^i}, 0 \leq i \leq {\bf extensionDegree}()-1} is an \smath{F}-basis, +where \smath{q = {\bf size}()}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{normalElement}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{FiniteAlgebraicExtensionField} +{\smath{\mbox{\bf normalElement}\opLeftPren{}\opRightPren{}\$R}, +where \smath{R} is a domain of category +\smath{FiniteAlgebraicExtensionField} over a field \smath{F}, +returns a element, normal over the ground field \smath{F}, +that is, \smath{a^{q^i}, 0 \leq i < {\bf extensionDegree}()} is an \smath{F}-basis, +where \smath{q = {\bf size}()}. +At the first call, the element is computed by +\spadfunFrom{createNormalElement}{FiniteAlgebraicExtensionField} +then cached in a global variable. +On subsequent calls, the element is retrieved by referencing the +global variable. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{normalForm}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it listOfpolynomials}\opRightPren{}% +}% +}% +{2}{(Dpol, List(Dpol))->Dpol}{GroebnerPackage} +{\smath{\mbox{\bf normalForm}\opLeftPren{}poly, \allowbreak{} gb\opRightPren{}} reduces the polynomial \smath{poly} +modulo the precomputed Gr\"obner basis \smath{gb} giving a +canonical representative of the residue class. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{normalise}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(Matrix(Expression(Fraction(Integer))))->Matrix(Expression(Fraction(Integer)))}{RadicalEigenPackage} +{\smath{\mbox{\bf normalise}\opLeftPren{}v\opRightPren{}} returns the column vector \smath{v} divided +by its Euclidean norm; when possible, the vector \smath{v} is +expressed in terms of radicals.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{normalize}}\opLeftPren{}{\it element \opt, option}\opRightPren{}% +}% +}% +{1}{(Matrix(Expression(Fraction(Integer))))->Matrix(Expression(Fraction(Integer)))}{RadicalEigenPackage} +{\smath{\mbox{\bf normalize}\opLeftPren{}flt\opRightPren{}} normalizes float \smath{flt} at current precision. +\newitem +\smath{\mbox{\bf normalize}\opLeftPren{}f\optinner{, x}\opRightPren{}} rewrites \smath{f} using the +least possible number of real algebraically independent kernels +involving symbol \smath{x}. +If no symbol \smath{x} is given, the operation +rewrites \smath{f} using the least possible number of real +algebraically independent kernels. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{normalizeAtInfinity}}\opLeftPren{}{\it vectorOfFunctions}\opRightPren{}% +}% +}% +{1}{(Vector(\$))->Vector(\$)}{FunctionFieldCategory} +{\smath{\mbox{\bf normalizeAtInfinity}\opLeftPren{}v\opRightPren{}} makes \smath{v} normal at infinity, +where +\smath{v} is a vector of functions defined on a curve. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{not}}\opLeftPren{}{\it boolean}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{Boolean} +{\smath{\mbox{\bf not}\opLeftPren{}n\opRightPren{}} returns the negation of boolean or bit aggregate +\smath{n}. +\newitem +\smath{\mbox{\bf not}\opLeftPren{}n\opRightPren{}} returns the bit-by-bit logical \smath{not} of the +small integer \smath{n}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nrows}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{RectangularMatrixCategory} +{\smath{\mbox{\bf nrows}\opLeftPren{}m\opRightPren{}} returns the number of rows in the matrix +or two-dimensional array \smath{m}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nthExponent}}\opLeftPren{}{\it factored}, \allowbreak{}{\it positiveInteger}\opRightPren{}% +}% +}% +{2}{(\$, Integer)->Integer}{Factored} +{\smath{\mbox{\bf nthExponent}\opLeftPren{}u, \allowbreak{} n\opRightPren{}} returns the exponent of +the \eth{\smath{n}} factor of \smath{u}, or 0 if \smath{u} has no +such factor. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nthFactor}}\opLeftPren{}{\it factor}, \allowbreak{}{\it positiveInteger}\opRightPren{}% +}% +}% +{2}{(\$, Integer)->R}{Factored} +{\smath{\mbox{\bf nthFactor}\opLeftPren{}u, \allowbreak{} n\opRightPren{}} returns the base of the \eth{\smath{n}} +factor of \smath{u}, or 1 if \smath{n} is not a valid index +for a factor. +If \smath{u} consists only of a unit, the unit is returned. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nthFlag}}\opLeftPren{}{\it factored}, \allowbreak{}{\it positiveInteger}\opRightPren{}% +}% +}% +{2}{(\$, Integer)->Union("nil", "sqfr", "irred", "prime")}{Factored} +{\smath{\mbox{\bf nthFlag}\opLeftPren{}u, \allowbreak{} n\opRightPren{}} returns the information flag of the +\eth{\smath{n}} factor of \smath{u}, \mbox{\tt "nil"} if \smath{n} is not a +valid index for a factor. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nthFractionalTerm}}\opLeftPren{}{\it partialFraction}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(\$, Integer)->\$}{PartialFraction} +{\smath{\mbox{\bf nthFractionalTerm}\opLeftPren{}p, \allowbreak{} n\opRightPren{}} extracts the \eth{\smath{n}} +fractional term from the partial fraction \smath{p}, or 0 if the +index \smath{n} is out of range. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nthRoot}}\opLeftPren{}{\it expression}, \allowbreak{}{\it integer}\opRightPren{}% + \opand \mbox{\axiomFun{nthRootIfCan}}\opLeftPren{}{\it expression}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(\$, Integer)->\$}{RadicalCategory} +{\opkey{Argument \smath{x} can be of type \spadtype{Expression}, +\spadtype{Complex}, \spadtype{Float} and \spadtype{DoubleFloat}, or +a series.} +\newitem \smath{\mbox{\bf nthRoot}\opLeftPren{}x, \allowbreak{} n\opRightPren{}} returns the \eth{\smath{n}} root of +\smath{x}. +If x is not an expression, the operation calls \spadfun{error} if +this is not possible. +\newitem \smath{\mbox{\bf nthRootIfCan}\opLeftPren{}z, \allowbreak{} n\opRightPren{}} returns the \eth{\smath{n}} +root of \smath{z} if possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{null?}}\opLeftPren{}{\it sExpression}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{SExpressionCategory} +{\smath{\mbox{\bf null?}\opLeftPren{}s\opRightPren{}} is \smath{true} if \smath{s} is the \spadtype{SExpression} +object \smath{()}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nullary}}\opLeftPren{}\opRightPren{}% +}% +}% +{ C -> (()->C)}{}{} +{\smath{\mbox{\bf nullary}\opLeftPren{}x\opRightPren{}}, where \smath{x} has type \smath{R}, returns a function +\smath{f} of type \spadsig{}{R} such that +such that \smath{f()} returns the value \smath{c}. +See also \spadfun{constant} for a similar operation. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nullary?}}\opLeftPren{}{\it basicOperator}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{BasicOperator} +{\smath{\mbox{\bf nullary?}\opLeftPren{}op\opRightPren{}} tests if basic operator \smath{op} is nullary. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nullity}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{MatrixCategory} +{\smath{\mbox{\bf nullity}\opLeftPren{}m\opRightPren{}} returns the dimension of the null space of the matrix \smath{m}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{nullSpace}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->List(Col)}{MatrixCategory} +{\smath{\mbox{\bf nullSpace}\opLeftPren{}m\opRightPren{}} returns a basis for the null space of the matrix \smath{m}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{numberOfComponents}}\opLeftPren{}{\it \opt{threeSpace}}\opRightPren{}% +}% +}% +{0}{()->NonNegativeInteger}{FunctionFieldCategory} +{\smath{\mbox{\bf numberOfComponents}\opLeftPren{}\opRightPren{}\$F} returns the number of absolutely irreducible components for +a domain \smath{F} of functions defined over a curve. +\newitem +\smath{\mbox{\bf numberOfComponents}\opLeftPren{}sp\opRightPren{}} returns the number of distinct +object components in the \spadtype{ThreeSpace} object \smath{s} +such as points, curves, and polygons. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{numberOfComputedEntries}}\opLeftPren{}{\it stream}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{LazyStreamAggregate} +{\smath{\mbox{\bf numberOfComputedEntries}\opLeftPren{}st\opRightPren{}} returns the number of explicitly computed entries of stream \smath{st}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{numberOfCycles}}\opLeftPren{}{\it permutation}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{Permutation} +{\smath{\mbox{\bf numberOfCycles}\opLeftPren{}p\opRightPren{}} returns the number of non-trivial cycles of the permutation \smath{p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{numberOfDivisors}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(Integer)->Integer}{IntegerNumberTheoryFunctions} +{\smath{\mbox{\bf numberOfDivisors}\opLeftPren{}n\opRightPren{}} returns the number of integers +between 1 and \smath{n} inclusive which divide \smath{n}. +The number of divisors of \smath{n} is often denoted by +\smath{\tau(n)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{numberOfFactors}}\opLeftPren{}{\it factored}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{Factored} +{\smath{\mbox{\bf numberOfFactors}\opLeftPren{}u\opRightPren{}} returns the number of factors in factored form \smath{u}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{numberOfFractionalTerms}}\opLeftPren{}{\it partialFraction}\opRightPren{}% +}% +}% +{1}{(\$)->Integer}{PartialFraction} +{\smath{\mbox{\bf numberOfFractionalTerms}\opLeftPren{}p\opRightPren{}} computes the number of +fractional terms in \smath{p}, or 0 if there is no fractional part. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{numberOfHues}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->PositiveInteger}{Color} +{\smath{\mbox{\bf numberOfHues}\opLeftPren{}\opRightPren{}} returns the number of total hues. +See also \spadfun{totalHues}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{numberOfImproperPartitions}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(Integer, Integer)->Integer}{SymmetricGroupCombinatoricFunctions} +{\smath{\mbox{\bf numberOfImproperPartitions}\opLeftPren{}n, \allowbreak{} m\opRightPren{}} computes the number of +partitions of the nonnegative integer \smath{n} in \smath{m} +nonnegative parts with regarding +the order (improper partitions). Example: +\code{numberOfImproperPartitions (3, 3)} is 10, since +\code{[0, 0, 3], [0, 1, 2], [0, 2, 1], [0, 3, 0], [1, 0, 2], [1, 1, 1], [1, 2, 0], [2, 0, 1], [2, 1, 0], [3, 0, 0]} +are the possibilities. Note: this operation has a recursive implementation. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{numberOfMonomials}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{FiniteAbelianMonoidRing} +{\smath{\mbox{\bf numberOfMonomials}\opLeftPren{}p\opRightPren{}} gives the number of non-zero monomials in polynomial \smath{p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{numer}}\opLeftPren{}{\it fraction}\opRightPren{}% + \opand \mbox{\axiomFun{numerator}}\opLeftPren{}{\it fraction}\opRightPren{}% +}% +}% +{1}{(\$)->D}{QuotientFieldCategory} +{\opkey{Argument x is from domain \spadtype{Fraction(R)} for some domain \smath{R}, +or of type \spadtype{Expression}} +\newitem +\smath{\mbox{\bf numer}\opLeftPren{}x\opRightPren{}} returns the numerator of \smath{x} as an object +of domain \smath{R}; if \smath{x} is of type \spadtype{Expression}, it returns +an object of domain \spadtype{SMP(D, Kernel(Expression R))}. +\newitem +\smath{\mbox{\bf numerator}\opLeftPren{}x\opRightPren{}} returns the numerator of \smath{x} as an element +of \spadtype{Fraction(R)}; if \smath{x} if of type \spadtype{Expression}, +it returns an object of domain \spadtype{Expression}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{numerators}}\opLeftPren{}{\it continuedFraction}\opRightPren{}% +}% +}% +{1}{(\$)->Stream(R)}{ContinuedFraction} +{\smath{\mbox{\bf numerators}\opLeftPren{}cf\opRightPren{}} returns the stream of numerators of the approximants of +the continued fraction \smath{cf}. +If the continued fraction is finite, then the stream will be finite. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{numeric}}\opLeftPren{}{\it expression\opt{, n}}\opRightPren{}% +}% +}% +{1}{(Expression(S))->Float}{Numeric} +{\smath{\mbox{\bf numeric}\opLeftPren{}x, \allowbreak{} n\opRightPren{}} returns a float approximation of expression \smath{x} +to \smath{n} decimal digits accurary. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{objectOf}}\opLeftPren{}{\it typeAnyObject}\opRightPren{}% +}% +}% +{1}{(\$)->OutputForm}{Any} +{\smath{\mbox{\bf objectOf}\opLeftPren{}a\opRightPren{}} returns a printable form of an object +of type \spadtype{Any}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{objects}}\opLeftPren{}{\it threeSpace}\opRightPren{}% +}% +}% +{1}{(\$)->Record(points:NonNegativeInteger, +curves:NonNegativeInteger, polygons:NonNegativeInteger, constructs:NonNegativeInteger)}{ThreeSpace} +{\smath{\mbox{\bf objects}\opLeftPren{}sp\opRightPren{}} returns the \spadtype{ThreeSpace} object \smath{sp}. +The result is returned as record with fields: +\smath{points}, the number of points; +\smath{curves}, the number of curves; +\smath{polygons}, the number of polygons; and +\smath{constructs}, the number of constructs. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{oblateSpheroidal}}\opLeftPren{}{\it function}\opRightPren{}% +}% +}% +{1}{(R)->(Point(R))->Point(R)}{CoordinateSystems} +{\smath{\mbox{\bf oblateSpheroidal}\opLeftPren{}a\opRightPren{}}, +where \smath{a} is a small float, returns a function to map the +point \smath{(\xi, \eta, \phi)} to cartesian coordinates +\smath{x = a sinh(\xi) sin(\eta) cos(\phi)}, \smath{y = a +sinh(\xi) sin(\eta) sin(\phi)}, \smath{z = a cosh(\xi) cos(\eta)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{octon}}\opLeftPren{}{\it element}, \allowbreak{}{\it element}\allowbreak $\,[$ , \allowbreak{}{\it elements}$]$\opRightPren{}% +}% +}% +{2}{(Quaternion(R), Quaternion(R)) +->\$}{Octonion} +{\smath{\mbox{\bf octon}\opLeftPren{}q_e, \allowbreak{} q_E\opRightPren{}} constructs an octonion +whose first 4 components are given by a quaternion \smath{q_e} and whose +last 4 components are given by a quaternion \smath{q_E}. +\newitem +\smath{\mbox{\bf octon}\opLeftPren{}r_e, \allowbreak{} r_i, \allowbreak{} r_j, \allowbreak{} r_k, \allowbreak{} r_E, \allowbreak{} r_I, \allowbreak{} r_J, \allowbreak{} r_K\opRightPren{}} constructs an octonion from scalars. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{odd?}}\opLeftPren{}{\it x}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{IntegerNumberSystem} +{\smath{\mbox{\bf odd?}\opLeftPren{}n\opRightPren{}} tests if integer \smath{n} is odd. +\newitem +\smath{\mbox{\bf odd?}\opLeftPren{}p\opRightPren{}} tests if \smath{p} is an odd permutation, that is, \smath{\mbox{\bf sign}\opLeftPren{}p\opRightPren{}} +is \smath{-1}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{oneDimensionalArray}}\opLeftPren{}{\it \optinit{integer, }elements}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{IntegerNumberSystem} +{\smath{\mbox{\bf oneDimensionalArray}\opLeftPren{}ls\opRightPren{}} creates a one-dimensional array consisting of +the elements of list \smath{ls}. +\newitem\smath{\mbox{\bf oneDimensionalArray}\opLeftPren{}n, \allowbreak{} s\opRightPren{}} creates a one-dimensional array of \smath{n} +elements, each with value \smath{s}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{one?}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{MonadWithUnit} +{\smath{\mbox{\bf one?}\opLeftPren{}a\opRightPren{}} tests whether \smath{a} is the unit 1. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{open}}\opLeftPren{}{\it file\opt{, string}}\opRightPren{}% +}% +}% +{1}{(Name)->\$}{FileCategory} +{\smath{\mbox{\bf open}\opLeftPren{}s\optinner{, mode}\opRightPren{}} returns the file \smath{s} open +in the indicated mode: \mbox{\tt "input"} or \mbox{\tt "output"}. +Argument \smath{mode} is \mbox{\tt "output"} by default. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{operator}}\opLeftPren{}{\it symbol\opt{, nonNegativeInteger}}\opRightPren{}% +}% +}% +{1}{(BasicOperator)->BasicOperator}{ExpressionSpace} +{\smath{\mbox{\bf operator}\opLeftPren{}f, \allowbreak{} n\opRightPren{}} makes \smath{f} into an \smath{n}-ary operator. +If the second argument \smath{n} is omitted, \smath{f} has +arbitary \spadgloss{arity}, that is, \smath{f} takes an arbitrary +number of arguments. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{operators}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->List(BasicOperator)}{ExpressionSpace} +{\smath{\mbox{\bf operators}\opLeftPren{}f\opRightPren{}} returns a list of all basic operators in \smath{f}, +regardless of level. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{optional}}\opLeftPren{}{\it symbol}\opRightPren{}% +}% +}% +{1}{(F)->F}{FunctionSpaceAssertions} +{\smath{\mbox{\bf optional}\opLeftPren{}x\opRightPren{}} tells the pattern matcher that \smath{x} can +match an identity (0 in a sum, 1 in a product or exponentiation), +or calls \spadfun{error} if \smath{x} is not a symbol. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{or}}\opLeftPren{}{\it boolean}, \allowbreak{}{\it boolean}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{BitAggregate} +{\smath{a \or b} returns the logical \smath{or} of booleans or bit aggregates \smath{a} and \smath{b}. +\newitem +\smath{n \or m} returns the bit-by-bit logical \smath{or} of the small integers \smath{n} and \smath{m}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{orbit}}\opLeftPren{}{\it group}, \allowbreak{}{\it elements}\opRightPren{}% +}% +}% +{2}{(\$, List(S))->Set(List(S))}{PermutationGroup} +{\smath{\mbox{\bf orbit}\opLeftPren{}gp, \allowbreak{} el\opRightPren{}} returns the orbit of the element \smath{el} under +the permutation group \smath{gp}, that is, the set of all points gained by applying each group element to \smath{el}. +\newitem +\smath{\mbox{\bf orbit}\opLeftPren{}gp, \allowbreak{} ls\opRightPren{}}, +where \smath{ls} is a list or +unordered set of elements, +returns the orbit of +\smath{ls} under the permutation group \smath{gp}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{orbits}}\opLeftPren{}{\it group}\opRightPren{}% +}% +}% +{1}{(\$)->Set(Set(S))}{PermutationGroup} +{\smath{\mbox{\bf orbits}\opLeftPren{}gp\opRightPren{}} returns the orbits of the permutation group \smath{gp}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{ord}}\opLeftPren{}{\it character}\opRightPren{}% +}% +}% +{1}{(\$)->Integer}{Character} +{\smath{\mbox{\bf ord}\opLeftPren{}c\opRightPren{}} returns an integer code corresponding to the +character \smath{c}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{order}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Integer}{FloatingPointSystem} +{\smath{\mbox{\bf order}\opLeftPren{}p\opRightPren{}} returns: +\begin{simpleList} +\item if \smath{p} is a float: the magnitude of \smath{p} +(Note: \smath{{\rm base}^{{\bf order}(x)} \leq |x| < base^{(1 + +{\bf order}(x))}}.) +\item if \smath{p} is a differential polynomial: +the maximum number of differentiations of a +differential indeterminate among all those appearing in \smath{p}. +\item if \smath{p} is a differential variable: +the number of differentiations of the differential indeterminate +appearing in \smath{p}. +\item if \smath{p} is an element of finite field: the order of an +element in the multiplicative group of the field (the function +calls \spadfun{error} if \smath{p} is 0). +\item if \smath{p} is a univariate power series: +the degree of the lowest order non-zero term in \smath{f}. +(A call to this operation results +in an infinite loop if \smath{f} has no non-zero terms.) +\item if \smath{p} is a \smath{q}-adic integer: the +exponent of the highest power of \smath{q} dividing \smath{p} +(see \spadtype{PAdicIntegerCategory}). +\item if \smath{p} is a permutation: the order of a permutation +\smath{p} as a group element. +\item if \smath{p} is permutation group: the order of the group. +\end{simpleList} +\smath{\mbox{\bf order}\opLeftPren{}p, \allowbreak{} q\opRightPren{}} returns the order of the differential +polynomial \smath{p} in differential indeterminate \smath{q}. +\newitem +\smath{\mbox{\bf order}\opLeftPren{}p, \allowbreak{} q\opRightPren{}} returns the order of multivariate series +\smath{p} +viewed as a series in \smath{q} +(this operation results in an infinite loop if \smath{f} has +no non-zero terms). +\newitem +\smath{\mbox{\bf order}\opLeftPren{}p, \allowbreak{} q\opRightPren{}} returns the largest \smath{n} such that +\smath{q^n} divides polynomial \smath{p}, that is, the order of +\smath{p(x)} at \smath{q(x)=0}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{orthonormalBasis}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(Matrix(Fraction(Polynomial(Fraction(Integer)))))->List(Matrix(Expression(Fraction(Integer))))}{RadicalEigenPackage} +{\smath{\mbox{\bf orthonormalBasis}\opLeftPren{}M\opRightPren{}} returns the orthogonal matrix +\smath{B} +such that \smath{B M B^{-1}} is diagonal, or +calls \spadfun{error} if \smath{M} is not a symmetric matrix. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{output}}\opLeftPren{}{\it x}\opRightPren{}% +}% +}% +{1}{(OutputForm)->Void}{OutputPackage} +{\smath{\mbox{\bf output}\opLeftPren{}x\opRightPren{}} displays \smath{x} on the ``algebra output'' stream +defined by \spadsyscom{)set output algebra}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{outputAsFortran}}\opLeftPren{}{\it outputForms}\opRightPren{}% +}% +}% +{1}{(List(OutputForm))->Void}{SpecialOutputPackage} +{\smath{\mbox{\bf outputAsFortran}\opLeftPren{}f\opRightPren{}} +outputs \spadtype{OutputForm} object \smath{f} in FORTRAN format +to the destination defined by +the system command \spadsyscom{)set output fortran}. +If \smath{f} is a list of \spadtype{OutputForm} objects, +each expression in \smath{f} is output in order. +\newitem +\smath{\mbox{\bf outputAsFortran}\opLeftPren{}s, \allowbreak{} f\opRightPren{}}, where \smath{s} is a string, +outputs \smath{s = f}, but is otherwise identical. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{outputAsTex}}\opLeftPren{}{\it outputForms}\opRightPren{}% +}% +}% +{1}{(List(OutputForm))->Void}{SpecialOutputPackage} +{\smath{\mbox{\bf outputAsTex}\opLeftPren{}f\opRightPren{}} +outputs \spadtype{OutputForm} object \smath{f} in +\TeX{} format +to the destination defined by +the system command \spadsyscom{)set output tex}. +If \smath{f} is a list of \spadtype{OutputForm} objects, +each expression in \smath{f} is output in order. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{outputFixed}}\opLeftPren{}{\it \opt{nonNegativeInteger}}\opRightPren{}% +}% +}% +{1}{(NonNegativeInteger)->Void}{Float} +{\smath{\mbox{\bf outputFixed}\opLeftPren{}\optinner{n}\opRightPren{}} sets the output mode of +floats to fixed point notation, +that is, as an integer, a decimal point, and a number of digits. +If \smath{n} is given, then +\smath{n} digits are displayed after the decimal point. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{outputFloating}}\opLeftPren{}{\it \opt{nonNegativeInteger}}\opRightPren{}% +}% +}% +{1}{(NonNegativeInteger)->Void}{Float} +{\smath{\mbox{\bf outputFloating}\opLeftPren{}\optinner{n}\opRightPren{}} sets the output mode to +floating (scientific) notation, +that is, +\smath{m 10^e} is displayed as \code{ +mEe}. +If \smath{n} is given, \smath{n} digits will be displayed after +the decimal point. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{outputForm}}\opLeftPren{}{\it various}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf outputForm}\opLeftPren{}x\opRightPren{}} creates an object of type +\spadtype{OutputForm} from \smath{x}, +an object of type \smath{Integer}, \smath{DoubleFloat}, +\smath{String}, or \smath{Symbol}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{outputGeneral}}\opLeftPren{}{\it \opt{nonNegativeInteger}}\opRightPren{}% +}% +}% +{0}{()->Void}{Float} +{\smath{\mbox{\bf outputGeneral}\opLeftPren{}\optinner{n}\opRightPren{}} sets the output +mode (default mode) to general notation, that is, numbers will be +displayed in either fixed or floating (scientific) notation +depending on the magnitude. +If \smath{n} is given, \smath{n} digits are displayed after +the decimal point. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{outputSpacing}}\opLeftPren{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{1}{(NonNegativeInteger)->Void}{Float} +{\smath{\mbox{\bf outputSpacing}\opLeftPren{}n\opRightPren{}} inserts a space after \smath{n} digits on output. +\smath{\mbox{\bf outputSpacing}\opLeftPren{}0\opRightPren{}} means no spaces are inserted. +By default, \smath{n = 10}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{over}}\opLeftPren{}{\it outputForm}, \allowbreak{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf over}\opLeftPren{}o_1, \allowbreak{} o_2\opRightPren{}}, +where \smath{o_1} and \smath{o_2} are objects of type \spadtype{OutputForm} (normally unexposed), +creates an output form for the vertical fraction of \smath{o_1} over \smath{o_2}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{overbar}}\opLeftPren{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf overbar}\opLeftPren{}o\opRightPren{}}, +where \smath{o} is an object of type \spadtype{OutputForm} (normally unexposed), +creates the output form \smath{o} with an overbar. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pack!}}\opLeftPren{}{\it file}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{KeyedAccessFile} +{\smath{\mbox{\bf pack!}\opLeftPren{}f\opRightPren{}} reorganizes the file \smath{f} on disk to recover unused space. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{packageCall}}\opLeftPren{}\opRightPren{}% +}% +}% +{ Symbol -> InputForm}{}{} +{\smath{\mbox{\bf packageCall}\opLeftPren{}f\opRightPren{}\$P}, +where \smath{P} is the package \spadtype{InputFormFunctions1(R)} for +some type \spadtype{R}, +returns the input form corresponding to f\$R. +See also \spadfun{interpret}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pade}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}, \allowbreak{}{\it series}\allowbreak $\,[$ , \allowbreak{}{\it series}$]$\opRightPren{}% +}% +}% +{3}{(NonNegativeInteger, NonNegativeInteger, UnivariateTaylorSeries(R, x, pt))->Union(Fraction(UnivariatePolynomial(x, R)), "failed")}{PadeApproximantPackage} +{\smath{\mbox{\bf pade}\opLeftPren{}nd, \allowbreak{} dd, \allowbreak{} s \optinner{, ds}\opRightPren{}} computes the quotient of +polynomials (if it exists) with numerator degree at most \smath{nd} +and denominator degree at most \smath{dd}. +If a single univariate Taylor series \smath{s} is given, the quotient +approximate must match the series \smath{s} to order \smath{nd + +dd}. +If two series \smath{s} and \smath{ds} are given, \smath{ns} is the +numerator series of the function and \smath{ds} is the denominator +series. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{padicFraction}}\opLeftPren{}{\it partialFraction}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{PartialFraction} +{\smath{\mbox{\bf padicFraction}\opLeftPren{}q\opRightPren{}} expands the fraction \smath{p}-adically in +the primes \smath{p} in the denominator of \smath{q}. +For example, \smath{\mbox{\bf padicFraction}\opLeftPren{}3/(2^2)) = 1/2 + 1/(2^2)}. +Use \spadfunFrom{compactFraction}{PartialFraction} to return to compact form. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pair?}}\opLeftPren{}{\it sExpression}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{SExpressionCategory} +{\smath{\mbox{\bf pair?}\opLeftPren{}s\opRightPren{}} tests if \smath{SExpression} object +is a non-null Lisp object. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{parabolic}}\opLeftPren{}{\it point}\opRightPren{}% +}% +}% +{1}{(Point(R))->Point(R)}{CoordinateSystems} +{\smath{\mbox{\bf parabolic}\opLeftPren{}pt\opRightPren{}} transforms \smath{pt} from parabolic +coordinates to Cartesian coordinates: the function produced will +map the point \smath{(u, v)} to \smath{x = 1/2 (u^2 - v^2)}, +\smath{y = u v}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{parabolicCylindrical}}\opLeftPren{}{\it point}\opRightPren{}% +}% +}% +{1}{(Point(R))->Point(R)}{CoordinateSystems} +{\smath{\mbox{\bf parabolicCylindrical}\opLeftPren{}pt\opRightPren{}} transforms \smath{pt} from +parabolic cylindrical coordinates to Cartesian coordinates: the +function produced will map the point \smath{(u, v, z)} to \smath{x = +1/2(u^2 - v^2)}, \smath{y = u v}, \smath{z}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{paraboloidal}}\opLeftPren{}{\it point}\opRightPren{}% +}% +}% +{1}{(Point(R))->Point(R)}{CoordinateSystems} +{\smath{\mbox{\bf paraboloidal}\opLeftPren{}pt\opRightPren{}} transforms \smath{pt} from paraboloidal +coordinates to Cartesian coordinates: the function produced will +map the point \smath{(u, v, phi)} to \smath{x = u v {\bf +cos}(\phi)}, \smath{y = u v {\bf sin}(\phi)}, \smath{z = 1/2 (u^2 +- v^2)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{paren}}\opLeftPren{}{\it expressions}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{ExpressionSpace} +{\smath{\mbox{\bf paren}\opLeftPren{}f\opRightPren{}} returns (\smath{f}) +unless \smath{f} is a list \smath{[f_1, \ldots, f_n]} in +which case it returns \smath{(f_1, \ldots, f_n)}. +This prevents \smath{f} or the constituent \smath{f_i} +from being evaluated when operators are applied to it. +For example, \code{log(1)} returns 0, but \code{log(paren 1)} +returns the formal kernel \code{log((1))}. +Also, {\bf atan}{\it ({\bf paren [}x, 2{\bf ]})} returns the formal kernel {\bf atan}{\it ((x, 2))}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{partialDenominators}}\opLeftPren{}{\it continuedFraction}\opRightPren{}% +}% +}% +{1}{(\$)->Stream(R)}{ContinuedFraction} +{\smath{\mbox{\bf partialDenominators}\opLeftPren{}x\opRightPren{}} extracts the denominators +in \smath{x}. +If \smath{x = {\mbox {\bf continuedFraction}}(b_0, [a_1, \ldots], [b_1, \ldots])}, +then \smath{\mbox{\bf partialDenominators}\opLeftPren{}x) = [b_1, b_2\ldots]}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{partialFraction}}\opLeftPren{}{\it element}, \allowbreak{}{\it factored}\opRightPren{}% +}% +}% +{2}{(R, Factored(R))->\$}{PartialFraction} +{\smath{\mbox{\bf partialFraction}\opLeftPren{}numer, \allowbreak{} denom\opRightPren{}} is the main function for +constructing partial fractions. +The second argument \smath{denom} is the denominator and should be +factored. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{partialNumerators}}\opLeftPren{}{\it continuedFraction}\opRightPren{}% +}% +}% +{1}{(\$)->Stream(R)}{ContinuedFraction} +{\smath{\mbox{\bf partialNumerators}\opLeftPren{}x\opRightPren{}} extracts the numerators in +\smath{x}, +if \smath{x = {\mbox {\bf continuedFraction}}(b_0, [a_1, \ldots], [b_1, \ldots], \ldots)}, +then \smath{\mbox{\bf partialNumerators}\opLeftPren{}x) = [a_1, \ldots]}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{partialQuotients}}\opLeftPren{}{\it continuedFraction}\opRightPren{}% +}% +}% +{1}{(\$)->Stream(R)}{ContinuedFraction} +{\smath{\mbox{\bf partialQuotients}\opLeftPren{}x\opRightPren{}} extracts the partial quotients in +\smath{x}, if +\smath{x = {\mbox {\bf continuedFraction}}(b_0, [a_1, \dots], [b_1, \ldots], \ldots)}, +then \smath{\mbox{\bf partialQuotients}\opLeftPren{}x) = [b_0, b_1, \ldots]}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{particularSolution}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it vector}\opRightPren{}% +}% +}% +{2}{(M, Col)->Union(Col, \mbox{\tt "failed"})}{LinearSystemMatrixPackage} +{\smath{\mbox{\bf aSolution}\opLeftPren{}M, \allowbreak{} v\opRightPren{}} finds a particular solution \smath{x} of the linear system \smath{Mx = v}. +The result \smath{x} is returned as a vector, or \mbox{\tt "failed"} if no solution exists. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{partition}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(I)->I}{IntegerCombinatoricFunctions} +{\smath{\mbox{\bf partition}\opLeftPren{}n\opRightPren{}} returns the number of partitions of the +integer \smath{n}. +This is the number of distinct ways that \smath{n} can be written +as a sum of positive integers. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{partitions}}\opLeftPren{}{\it integer\opt{, integer, integer}}\opRightPren{}% +}% +}% +{1}{(Integer)->Stream(List(Integer))}{PartitionsAndPermutations} +{\smath{\mbox{\bf partitions}\opLeftPren{}i, \allowbreak{} j\opRightPren{}} is the stream of all partitions whose +number of parts and largest part are no greater than \smath{i} and +\smath{j}. +\newitem +\smath{\mbox{\bf partitions}\opLeftPren{}n\opRightPren{}} is the stream of all partitions of integer +\smath{n}. +\newitem +\smath{\mbox{\bf partitions}\opLeftPren{}p, \allowbreak{} l, \allowbreak{} n\opRightPren{}} is the stream of partitions of \smath{n} +whose number of parts is no greater than \smath{p} and whose +largest part is no greater than \smath{l}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{parts}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->List(R)}{TwoDimensionalArrayCategory} +{\smath{\mbox{\bf parts}\opLeftPren{}u\opRightPren{}} returns a list of the consecutive elements of \smath{u}. +Note: if \smath{u} is a list, \smath{\mbox{\bf parts}\opLeftPren{}u) = u}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pastel}}\opLeftPren{}{\it color}\opRightPren{}% +}% +}% +{1}{(Color)->\$}{Palette} +{\smath{\mbox{\bf pastel}\opLeftPren{}c\opRightPren{}} sets the shade of a hue \smath{c} above ``bright'' but below ``light''. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pattern}}\opLeftPren{}{\it rewriteRule}\opRightPren{}% +}% +}% +{1}{(\$)->Pattern(Base)}{RewriteRule} +{\smath{\mbox{\bf pattern}\opLeftPren{}r\opRightPren{}} returns the pattern corresponding to the left hand +side of the rewrite rule \smath{r}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{patternMatch}}\opLeftPren{}{\it expression}, \allowbreak{}{\it expression}, \allowbreak{}{\it patternMatchResult}\opRightPren{}% +}% +}% +{3}{(\$, Pattern(S), PatternMatchResult(S, \$))->PatternMatchResult(S, \$)}{PatternMatchable} +{\smath{\mbox{\bf patternMatch}\opLeftPren{}expr, \allowbreak{} pat, \allowbreak{} res\opRightPren{}} matches the pattern \smath{pat} to the expression \smath{expr}. +The argument \smath{res} contains the variables of \smath{pat} +which are already matched and their matches. Initially, +\smath{res} is the result of \spadfun{new()}, an empty list of matches. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{perfectNthPower?}}\opLeftPren{}{\it integer}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(I, NonNegativeInteger)->Boolean}{IntegerRoots} +{\smath{\mbox{\bf perfectNthPower?}\opLeftPren{}n, \allowbreak{} r\opRightPren{}} tests if \smath{n} is an +\eth{\smath{r}} power. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{perfectNthRoot}}\opLeftPren{}{\it integer\opt{, nonNegativeInteger}}\opRightPren{}% +}% +}% +{2}{(I, NonNegativeInteger)->Union(I, "failed")}{IntegerRoots} +{\smath{\mbox{\bf perfectNthRoot}\opLeftPren{}n\opRightPren{}} returns a record +with fields ``base'' \smath{x} and +``exponent'' \smath{r} such that +\smath{n = x^r} and \smath{r} is the largest integer such +that \smath{n} is a perfect \eth{\smath{r}} power. +\newitem +\smath{\mbox{\bf perfectNthRoot}\opLeftPren{}n, \allowbreak{} r\opRightPren{}} returns the \eth{\smath{r}} root of +\smath{n} if \smath{n} is an \eth{\smath{r}} power, and \mbox{\tt "failed"} +otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{perfectSqrt}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(I)->Union(I, "failed")}{IntegerRoots} +{\smath{\mbox{\bf perfectSqrt}\opLeftPren{}n\opRightPren{}} returns the square root of \smath{n} if +\smath{n} is a perfect square, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{perfectSquare?}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(I)->Boolean}{IntegerRoots} +{\smath{\mbox{\bf perfectSquare?}\opLeftPren{}n\opRightPren{}} tests if \smath{n} is a perfect square. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{permanent}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(SquareMatrix(n, R))->R}{Permanent} +{\smath{\mbox{\bf permanent}\opLeftPren{}x\opRightPren{}} returns the permanent of a square matrix \smath{x}, +equivalent to the \spadfun{determinant} except that coefficients have no change of sign. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{permutation}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(I, I)->I}{IntegerCombinatoricFunctions} +{\smath{\mbox{\bf permutation}\opLeftPren{}n, \allowbreak{} m\opRightPren{}} returns the number of permutations of +\smath{n} objects taken \smath{m} at a time. +Note: \smath{\mbox{\bf permutation}\opLeftPren{}n, m) = n!/(n-m)!}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{permutationGroup}}\opLeftPren{}{\it listPermutations}\opRightPren{}% +}% +}% +{1}{(List(Permutation(S)))->\$}{PermutationGroup} +{\smath{\mbox{\bf permutationGroup}\opLeftPren{}ls\opRightPren{}} coerces a list of permutations \smath{ls} to the group generated by this list. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{permutationRepresentation}}\opLeftPren{}{\it permutations\opt{, n}}\opRightPren{}% +}% +}% +{1}{(List(Integer))->Matrix(Integer)}{RepresentationPackage1} +{\smath{\mbox{\bf permutationRepresentation}\opLeftPren{}pi, \allowbreak{} n\opRightPren{}} returns the matrix +\smath{\delta_{i, pi(i)}} (Kronecker delta) if the permutation +\smath{pi} is in list notation and permutes +\smath{{1, 2, \ldots, n}}. +Argument \smath{pi} may either be permutation or a list of +integers describing a permutation by list notation. +\newitem +\smath{\mbox{\bf permutationRepresentation}\opLeftPren{}[pi_1, \allowbreak{} \ldots, pi_k], n\opRightPren{}} returns +the list of matrices +\smath{[(\delta_{i, pi_1}(i)), \ldots, (\delta_{i, pi_k(i)})]} +(Kronecker delta) for permutations +\smath{pi_1}, \ldots, \smath{pi_k} of \smath{{1, 2, \ldots, n}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{permutations}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(Integer)->Stream(List(Integer))}{PartitionsAndPermutations} +{\smath{\mbox{\bf permutations}\opLeftPren{}n\opRightPren{}} returns the stream of permutations +formed from \smath{1, 2, \ldots, n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{physicalLength}}\opLeftPren{}{\it flexibleArray}\opRightPren{}% +\opand \mbox{\axiomFun{physicalLength!}}\opLeftPren{}{\it flexibleArray}, \allowbreak{}{\it positiveInteger}\opRightPren{}% +}% +}% +{1}{(Integer)->Stream(List(Integer))}{PartitionsAndPermutations} +{\opkey{These operations apply to a flexible array \smath{a} and concern the +``physical length'' of \smath{a}, the maximum number of elements that \smath{a} +can hold. +When a destructive operation (such as \spadfun{concat!}) is applied +that increases the number +of elements of \smath{a} beyond this number, new storage is allocated +(generally to be about 50\% larger than current storage allocation) +and the elements from the old storage are copied over to the new storage area.} + +\newitem\smath{\mbox{\bf physicalLength}\opLeftPren{}a\opRightPren{}} returns the physical length of \smath{a}. +\newitem\smath{\mbox{\bf physicalLength!}\opLeftPren{}a, \allowbreak{} n\opRightPren{}} causes +new storage to be allocated for the elements +of \smath{a} with a physical length of \smath{n}. The \spadfun{maxIndex} +elements from the old storage area are copied. +An \spadfun{error} is called if \smath{n} is less than \spadfun{maxIndex}\smath{(a)}.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pi}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{TranscendentalFunctionCategory} +{\smath{\mbox{\bf pi}\opLeftPren{}\opRightPren{}} returns \smath{\pi}, +also denoted by the special symbol \code{\%pi}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pile}}\opLeftPren{}{\it listOfOutputForms}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf pile}\opLeftPren{}lo\opRightPren{}}, +where \smath{lo} is a list of objects of type \spadtype{OutputForm} (normally unexposed), +creates the output form consisting of the elements of \smath{lo} displayed +as a pile, that is, each element begins on a new +line and is indented right to the same margin. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{plenaryPower}}\opLeftPren{}{\it element}, \allowbreak{}{\it positiveInteger}\opRightPren{}% +}% +}% +{2}{(\$, PositiveInteger)->\$}{NonAssociativeAlgebra} +{\opkey{Argument \smath{a} is a member of a domain of category \spadtype{NonAssociativeAlgebra}} +\newitem +\smath{\mbox{\bf plenaryPower}\opLeftPren{}a, \allowbreak{} n\opRightPren{}} is recursively defined to be +\smath{\mbox{\bf plenaryPower}\opLeftPren{}a, n-1) * {\bf plenaryPower}(a, n-1)} for \smath{n>1} and \smath{a} for \smath{n=1}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{plusInfinity}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->OrderedCompletion(Integer)}{Infinity} +{\smath{\mbox{\bf plusInfinity}\opLeftPren{}\opRightPren{}} returns the constant {\tt \%plusInfinity} +denoting $+\infty$. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{point}}\opLeftPren{}{\it u\opt{, option}}\opRightPren{}% +}% +}% +{1}{(List(R))->\$}{PointCategory} +{\smath{\mbox{\bf point}\opLeftPren{}p\opRightPren{}} returns a \spadtype{ThreeSpace} object which is composed of one component, the point \smath{p}. +\smath{\mbox{\bf point}\opLeftPren{}l\opRightPren{}} creates a point defined by a list \smath{l}. +\newitem +\newitem +\smath{\mbox{\bf point}\opLeftPren{}sp\opRightPren{}} checks to see if the \spadtype{ThreeSpace} +object \smath{sp} +is composed of only a single point and, if so, returns the point, or +calls \spadfun{error} if \smath{sp} has more than one point. +\newitem +\smath{\mbox{\bf point}\opLeftPren{}sp, \allowbreak{} l\opRightPren{}} adds a point component defined by a list +\smath{l} to the \spadtype{ThreeSpace} object \smath{sp}. +\newitem +\smath{\mbox{\bf point}\opLeftPren{}sp, \allowbreak{} i\opRightPren{}} adds a point component into a component +list of the \spadtype{ThreeSpace} object \smath{sp} at the index given by \smath{i}. +\newitem +\smath{\mbox{\bf point}\opLeftPren{}sp, \allowbreak{} p\opRightPren{}} adds a point component defined by the point \smath{p} +described as a list, to the \spadtype{ThreeSpace} object \smath{sp}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{point?}}\opLeftPren{}{\it space}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{ThreeSpace} +{\smath{\mbox{\bf point?}\opLeftPren{}sp\opRightPren{}} queries whether the \spadtype{ThreeSpace} object \smath{sp}, +is composed of a single component which is a point. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pointColor}}\opLeftPren{}{\it palette}\opRightPren{}% +}% +}% +{1}{(Float)->\$}{DrawOption} +{\smath{\mbox{\bf pointColor}\opLeftPren{}v\opRightPren{}} specifies a color \smath{v} for \twodim{} graph points. +This option is expressed in the form \code{pointColor == v} +in the \spadfun{draw} command. +Argument \smath{p} is either a palette or a float. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pointColorDefault}}\opLeftPren{}{\it \opt{palette}}\opRightPren{}% +}% +}% +{0}{()->Palette}{ViewDefaultsPackage} +{\smath{\mbox{\bf pointColorDefault}\opLeftPren{}\opRightPren{}} returns the default color of points in a \twodim{} viewport. +\newitem +\smath{\mbox{\bf pointColorDefault}\opLeftPren{}p\opRightPren{}} sets the default color of points in a \twodim{} viewport to the palette \smath{p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pointSizeDefault}}\opLeftPren{}{\it \opt{positiveInteger}}\opRightPren{}% +}% +}% +{0}{()->PositiveInteger}{ViewDefaultsPackage} +{\smath{\mbox{\bf pointSizeDefault}\opLeftPren{}\opRightPren{}} returns the default size of the points +in a \twodim{} viewport. +\newitem +\smath{\mbox{\bf pointSizeDefault}\opLeftPren{}i\opRightPren{}} sets the default size of the points in +a \twodim{} viewport to \smath{i}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{polarCoordinates}}\opLeftPren{}{\it x}\opRightPren{}% +}% +}% +{1}{(\$)->Record(r:R, phi:R)}{ComplexCategory} +{\smath{\mbox{\bf polarCoordinates}\opLeftPren{}x\opRightPren{}} returns +a record with components \smath{(r, \phi)} such that \smath{x = +re^{i\phi}.}} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{polar}}\opLeftPren{}{\it point}\opRightPren{}% +}% +}% +{1}{(Point(R))->Point(R)}{CoordinateSystems} +{\smath{\mbox{\bf polar}\opLeftPren{}pt\opRightPren{}} transforms point \smath{pt} from polar coordinates to +Cartesian coordinates. The function produced will map the point +\smath{(r, \theta)} to \smath{x = r {\bf cos}(\theta)} , \smath{y = r {\bf sin}(\theta)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pole?}}\opLeftPren{}{\it series}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{PowerSeriesCategory} +{\smath{\mbox{\bf pole?}\opLeftPren{}f\opRightPren{}} tests if the power series \smath{f} has a pole. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{polygamma}}\opLeftPren{}{\it k}, \allowbreak{}{\it x}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{SpecialFunctionCategory} +{\smath{\mbox{\bf polygamma}\opLeftPren{}k, \allowbreak{} x\opRightPren{}} is the \eth{\smath{k}} derivative of +\smath{\mbox{\bf digamma}\opLeftPren{}x\opRightPren{}}, often written \smath{\psi(k, x)} in the +literature. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{polygon}}\opLeftPren{}{\it \optinit{sp, }listOfPoints}\opRightPren{}% + \opand \mbox{\axiomFun{polygon?}}\opLeftPren{}{\it space}\opRightPren{}% +}% +}% +{1}{(List(Point(R)))->\$}{ThreeSpace} +{\smath{\mbox{\bf polygon}\opLeftPren{}\optfirst{sp, }lp\opRightPren{}} adds a polygon defined +by \smath{lp} to the \spadtype{ThreeSpace} object \smath{sp}. +Each \smath{lp} is either a list of points (objects of type \spadtype{Point}) +or else a list of small floats. +If \smath{sp} is omitted, it is understood to be empty. +\newitem +\smath{\mbox{\bf polygon}\opLeftPren{}sp\opRightPren{}} returns \spadtype{ThreeSpace} object \smath{sp} as a list +of polygons, or an error if \smath{sp} is not composed of a single polygon. +\newitem +\smath{\mbox{\bf polygon?}\opLeftPren{}sp\opRightPren{}} tests if the \spadtype{ThreeSpace} object \smath{sp} +contains a single polygon component. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{polynomial}}\opLeftPren{}{\it series}, \allowbreak{}{\it integer}\allowbreak $\,[$ , \allowbreak{}{\it integer}$]$\opRightPren{}% +}% +}% +{2}{(\$, NonNegativeInteger)->Polynomial(Coef)}{UnivariateTaylorSeriesCategory} +{\smath{\mbox{\bf polynomial}\opLeftPren{}s, \allowbreak{} k\opRightPren{}} returns a polynomial consisting of the +sum of all terms of +series \smath{s} of degree \smath{\leq k} and greater than or +equal to 0. +\newitem +\smath{\mbox{\bf polynomial}\opLeftPren{}s, \allowbreak{} k_1, \allowbreak{} k_2\opRightPren{}} returns a polynomial consisting of the sum +of all terms of Taylor series \smath{s} of degree \smath{d} +with \smath{0 \leq k_1 \leq d \leq k_2}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pop!}}\opLeftPren{}{\it stack}\opRightPren{}% +}% +}% +{1}{(\$)->S}{StackAggregate} +{\smath{\mbox{\bf pop!}\opLeftPren{}s\opRightPren{}} returns the top element \smath{x} +from stack \smath{s}, destructively removing it from \smath{s}, +or calls \spadfun{error} if \smath{s} is empty. +Note: Use \smath{\mbox{\bf top}\opLeftPren{}s\opRightPren{}} to obtain \smath{x} without removing it from \smath{s}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{position}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it aggregate}\allowbreak $\,[$ , \allowbreak{}{\it index}$]$\opRightPren{}% +}% +}% +{2}{(S, \$)->Integer}{FiniteLinearAggregate} +{\smath{\mbox{\bf position}\opLeftPren{}x, \allowbreak{} a\optinner{, n}\opRightPren{}} returns the index \smath{i} +of the first occurrence of \smath{x} in \smath{a} where \smath{i +\geq n}, and \smath{\mbox{\bf minIndex}\opLeftPren{}a) - 1} if no such \smath{x} is +found. +The default value of \smath{n} is 1. +\newitem \smath{\mbox{\bf position}\opLeftPren{}cc, \allowbreak{} t, \allowbreak{} i\opRightPren{}} returns the position \smath{j +>= i} in \smath{t} of the first character belonging to character +class \smath{cc}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{positive?}}\opLeftPren{}{\it orderedSetElement}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{OrderedRing} +{\smath{\mbox{\bf positive?}\opLeftPren{}x\opRightPren{}} tests if \smath{x} is strictly greater than 0. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{positiveRemainder}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{IntegerNumberSystem} +{\smath{\mbox{\bf positiveRemainder}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}, where \smath{b > 1}, yields +\smath{r} where \smath{0 \leq r < b} and \smath{r = a \rem b}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{possiblyInfinite?}}\opLeftPren{}{\it stream}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{StreamAggregate} +{\smath{\mbox{\bf possiblyInfinite?}\opLeftPren{}s\opRightPren{}} tests if the stream \smath{s} could +possibly have an infinite number of elements. +Note: for many datatypes, +\smath{\mbox{\bf possiblyInfinite?}\opLeftPren{}s\opRightPren{}} \smath{= \mbox{\bf not } \mbox{\bf explictlyFinite?}(s)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{postfix}}\opLeftPren{}{\it outputForm}, \allowbreak{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf postfix}\opLeftPren{}op, \allowbreak{} a\opRightPren{}}, +where \smath{op} and \smath{a} are objects of type +\spadtype{OutputForm} (normally unexposed), +creates an output form which prints as: \smath{a\quad{}{\rm op}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{powerAssociative?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FiniteRankNonAssociativeAlgebra} +{\smath{\mbox{\bf powerAssociative?}\opLeftPren{}\opRightPren{}\$F}, where \spad{F} is +a domain of category \spadtype{FiniteRankNonAssociativeAlgebra}, +tests if all subalgebras generated by +a single element are associative. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{powerSum}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{ I -> SPOL RN}{}{} +{\smath{\mbox{\bf powerSum}\opLeftPren{}n\opRightPren{}} is the \smath{n} th power sum symmetric +function. +See \spadtype{CycleIndicators} for details. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{powmod}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{3}{(\$, \$, \$)->\$}{IntegerNumberSystem} +{\smath{\mbox{\bf powmod}\opLeftPren{}a, \allowbreak{} b, \allowbreak{} p\opRightPren{}}, +where \smath{a} and \smath{b} are non-negative integers, each \smath{< p}, +returns \smath{a^b\mod p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{precision}}\opLeftPren{}{\it \opt{positiveInteger}}\opRightPren{}% +}% +}% +{0}{()->PositiveInteger}{FloatingPointSystem} +{\smath{\mbox{\bf precision}\opLeftPren{}\opRightPren{}} returns the precision of \spadtype{Float} values +in decimal digits. +\newitem +\smath{\mbox{\bf precision}\opLeftPren{}n\opRightPren{}} set the precision in the base to \smath{n} +decimal digits. +} +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{prefix}}\opLeftPren{}{\it outputForm}, \allowbreak{}{\it listOfOutputForms}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf prefix}\opLeftPren{}o, \allowbreak{} lo\opRightPren{}}, +where \smath{o} is an object of type \spadtype{OutputForm} (normally unexposed) +and \smath{lo} is a list of objects of type \spadtype{OutputForm}, +creates an output form depicting the \smath{n}ary prefix application +of \smath{o} to a tuple of arguments given by list \smath{lo}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{prefix?}}\opLeftPren{}{\it string}, \allowbreak{}{\it string}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Boolean}{StringAggregate} +{\smath{\mbox{\bf prefix?}\opLeftPren{}s, \allowbreak{} t\opRightPren{}} tests if the string \smath{s} is the initial +substring of \smath{t}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{prefixRagits}}\opLeftPren{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{1}{(\$)->List(Integer)}{RadixExpansion} +{\smath{\mbox{\bf prefixRagits}\opLeftPren{}rx\opRightPren{}} returns the non-cyclic part of the +ragits of the fractional part of a radix expansion. +For example, if \smath{x = 3/28 = 0.10 714285 714285 \ldots}, then +\smath{\mbox{\bf prefixRagits}\opLeftPren{}x)=[1, 0]}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{presub}}\opLeftPren{}{\it outputForm}, \allowbreak{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf presub}\opLeftPren{}o_1, \allowbreak{} o_2\opRightPren{}}, +where \smath{o_1} and \smath{o_2} are objects of type \spadtype{OutputForm} (normally unexposed), +creates an output form for \smath{o_1} presubscripted by \smath{o_2}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{presuper}}\opLeftPren{}{\it outputForm}, \allowbreak{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf presuper}\opLeftPren{}o_1, \allowbreak{} o_2\opRightPren{}}, +where \smath{o_1} and \smath{o_2} are objects of type \spadtype{OutputForm} (normally unexposed), +creates an output form for \smath{o_1} presuperscripted by \smath{o_2}. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{primaryDecomp}}\opLeftPren{}{\it ideal}\opRightPren{}% +}% +}% +{1}{(PolynomialIdeals(Fraction(Integer), DirectProduct(nv, NonNegativeInteger), vl, DistributedMultivariatePolynomial(vl, Fraction(Integer))))->List(PolynomialIdeals(Fraction(Integer), DirectProduct(nv, NonNegativeInteger), vl, DistributedMultivariatePolynomial(vl, Fraction(Integer))))}{IdealDecompositionPackage} +{\smath{\mbox{\bf primaryDecomp}\opLeftPren{}I\opRightPren{}} returns a list of primary ideals such +that their intersection is the ideal \smath{I}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{prime}}\opLeftPren{}{\it outputForm\opt{, positiveInteger}}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf prime}\opLeftPren{}o\optinner{, n}\opRightPren{}}, +where \smath{o} is an object of type \spadtype{OutputForm} (normally unexposed), +creates an output form for \smath{o} following by \smath{n} +primes (that is, a prime like `` ' ''). +By default, \smath{n = 1}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{prime?}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{UniqueFactorizationDomain} +{\smath{\mbox{\bf prime?}\opLeftPren{}x\opRightPren{}} tests if \smath{x} cannot be written as the +product of two non-units, that is, \smath{x} is an irreducible +element. +Argument \smath{x} may be an integer, a polynomial, an ideal, or, +in general, any element of a domain of category +\spadtype{UniqueFactorizationDomain}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{primeFactor}}\opLeftPren{}{\it element}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(R, Integer)->\$}{Factored} +{\smath{\mbox{\bf primeFactor}\opLeftPren{}base, \allowbreak{} exponent\opRightPren{}} creates a factored object with +a single factor whose \smath{base} is asserted to be prime (flag = +\mbox{\tt "prime"}). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{primeFrobenius}}\opLeftPren{}{\it finiteFieldElement\opt{, nonNegativeInteger}}\opRightPren{}% +}% +}% +{2}{(\$, NonNegativeInteger)->\$}{FieldOfPrimeCharacteristic} +{\opkey{Argument \smath{a} is a member of a domain of category +\spadtype{FieldOfPrimeCharacteristic(p)}.} +\newitem +\smath{\mbox{\bf primeFrobenius}\opLeftPren{}a\optinner{, s}\opRightPren{}} returns \smath{a^{p^s}}. +The default value of \smath{s} is 1. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{primes}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(I, I)->List(I)}{IntegerPrimesPackage} +{\smath{\mbox{\bf primes}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns a list of all primes \smath{p} with \smath{a \leq p \leq b}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{primitive?}}\opLeftPren{}{\it finiteFieldElement}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{FiniteFieldCategory} +{\smath{\mbox{\bf primitive?}\opLeftPren{}b\opRightPren{}} tests whether the element \smath{b} +of a finite field is a generator of the (cyclic) multiplicative group of the +field, that is, is a primitive element. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{primitiveElement}}\opLeftPren{}{\it expressions\opt{, expression}}\opRightPren{}% +}% +}% +{2}{(F, F)->Record(primelt:F, pol1:SparseUnivariatePolynomial(F), pol2:SparseUnivariatePolynomial(F), prim:SparseUnivariatePolynomial(F))}{FunctionSpacePrimitiveElement} +{\smath{\mbox{\bf primitiveElement}\opLeftPren{}a_1, \allowbreak{} a_2\opRightPren{}} returns a record with four +components: a primitive element \smath{a} with selector +\smath{primelt}, and three polynomials \smath{q_1}, \smath{q_2}, +and \smath{q} with selectors \smath{pol1}, \smath{pol2}, and +\smath{prim}. +The prime element \smath{a} is such that the algebraic extension +generated by \smath{a_1} and \smath{a_2} is the same as that +generated by \smath{a}, \smath{a_i = q_i(a)} and \smath{q(a) = 0}. +The minimal polynomial for \smath{a_2} may involve \smath{a_1}, but +the minimal polynomial for \smath{a_1} may not involve \smath{a_2}. +This operations uses \spadfun{resultant}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{primitiveMonomials}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(\$)->List(\$)}{PolynomialCategory} +{\smath{\mbox{\bf primitiveMonomials}\opLeftPren{}p\opRightPren{}} gives the list of monomials of the +polynomial \smath{p} with their coefficients removed. +Note: \smath{\mbox{\bf primitiveMonomials}\opLeftPren{}\sum {a_i X^{(i)}}) = [X^{(1)}, \ldots, X^{(n)}]}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{primitivePart}}\opLeftPren{}{\it polynomial\opt{, symbol}}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{FiniteAbelianMonoidRing} +{\smath{\mbox{\bf primitivePart}\opLeftPren{}p\optinner{, v}\opRightPren{}} returns +the unit normalized form of polynomial \smath{p} divided by the \spadfun{content} of \smath{p} with respect to variable \smath{v}. +If no \smath{v} is given, the content is removed with respect to all variables. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{principalIdeal}}\opLeftPren{}{\it listOfPolynomials}\opRightPren{}% +}% +}% +{1}{(List(\$))->Record(coef:List(\$), generator:\$)}{PrincipalIdealDomain} +{\smath{\mbox{\bf principalIdeal}\opLeftPren{}[f_1, \allowbreak{} \ldots, f_n]\opRightPren{}} returns a record whose +``generator'' component is a generator of the ideal generated by +\smath{[f_1, \ldots, f_n]} whose ``coef'' component is a list of +coefficients \smath{[c_1, \ldots, c_n]} such that +\smath{generator = \sum_i c_i \, f_i}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{print}}\opLeftPren{}{\it outputForm}\opRightPren{}% +}% +}% +{1}{(OutputForm)->Void}{PrintPackage} +{\smath{\mbox{\bf print}\opLeftPren{}o\opRightPren{}} writes the output form \smath{o} on standard +output using the two-dimensional formatter. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{product}}\opLeftPren{}{\it element}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{GradedAlgebra} +{\smath{\mbox{\bf product}\opLeftPren{}f(n), \allowbreak{} n = a..b\opRightPren{}} returns +\smath{\prod\nolimits_{n=a}^b{f(n)}} as a formal product. +\newitem\smath{\mbox{\bf product}\opLeftPren{}f(n), \allowbreak{} n\opRightPren{}} returns the formal product +\smath{P(n)} verifying \smath{{P(n+1)/P(n)} = f(n)}. +\newitem\smath{\mbox{\bf product}\opLeftPren{}s, \allowbreak{} t\opRightPren{}}, where \smath{s} and \smath{t} are +cartesian tensors, returns the outer product of \smath{s} and +\smath{t}. +For example, if \smath{r = {\bf product}(s, t)} for rank 2 tensors +\smath{s} and \smath{t}, then \smath{r} is a rank 4 tensor given +by \smath{r_{i, j, k, l} = s_{i, j} t_{k, l}}. +\newitem\smath{\mbox{\bf product}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}, where \smath{a} and \smath{b} are +elements of a graded algebra returns the degree-preserving linear +product. +See \spadtype{GradedAlgebra} for details.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{prolateSpheroidal}}\opLeftPren{}{\it smallFloat}\opRightPren{}% +}% +}% +{1}{(R)->(Point(R))->Point(R)}{CoordinateSystems} +{\smath{\mbox{\bf prolateSpheroidal}\opLeftPren{}a\opRightPren{}} returns a +function to transform prolate spheroidal coordinates to Cartesian coordinates. +This function will map the point +\smath{(\xi, \eta, \phi)} to +\smath{x = a {\rm sinh}(\xi) {\rm sin}(\eta) {\rm cos}(\phi)}, +\smath{y = a {\rm sinh}(\xi) {\rm sin}(\eta) {\rm sin}(\phi)}, +\smath{z = a {\rm cosh}(\xi) {\rm cos}(\eta)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{prologue}}\opLeftPren{}{\it text}\opRightPren{}% +}% +}% +{1}{(\$)->List(String)}{ScriptFormulaFormat} +{\smath{\mbox{\bf prologue}\opLeftPren{}t\opRightPren{}} extracts the prologue section of a +IBM SCRIPT Formula Formatter or \TeX{} formatted object \smath{t}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{properties}}\opLeftPren{}{\it basicOperator\opt{, prop}}\opRightPren{}% +}% +}% +{1}{(\$)->AssociationList(String, None)}{BasicOperator} +{\smath{\mbox{\bf properties}\opLeftPren{}op\opRightPren{}} returns the list of all the properties currently attached to \smath{op}. +\newitem +\smath{\mbox{\bf property}\opLeftPren{}op, \allowbreak{} s\opRightPren{}} returns the value of property \smath{s} if +it is attached to \smath{op}, and \mbox{\tt "failed"} otherwise. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pseudoDivide}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it polynomial}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Record(coef:R, quotient:\$, remainder:\$)}{UnivariatePolynomialCategory} +{\smath{\mbox{\bf pseudoDivide}\opLeftPren{}p, \allowbreak{} q\opRightPren{}} returns \smath{(c, q, r)}, when +\smath{p' := p \mbox{ \bf leadingCoefficient}(q)^{{\rm deg}(p) - {\rm +deg}(q) + 1}= c p} is pseudo right-divided by \smath{q}, that is, +\smath{p' = s q + r}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pseudoQuotient}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it polynomial}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{UnivariatePolynomialCategory} +{\smath{\mbox{\bf pseudoQuotient}\opLeftPren{}p, \allowbreak{} q\opRightPren{}} returns \smath{r}, the quotient when +\smath{p' := p {\rm leadingCoefficient}(q)^{{\rm deg} p - {\rm deg} q + 1}} +is pseudo right-divided by \smath{q}, that is, +\smath{p' = s q + r}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pseudoRemainder}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it polynomial}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{UnivariatePolynomialCategory} +{\smath{\mbox{\bf pseudoRemainder}\opLeftPren{}p, \allowbreak{} q\opRightPren{}} = \smath{r}, for polynomials +\smath{p} and \smath{q}, returns the remainder when +\smath{p' := p {\rm leadingCoefficient}(q)^{{\rm deg} p - {\rm deg} q + 1}} +is +pseudo right-divided by \smath{q}, that is, \smath{p' = s q + r}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{puiseux}}\opLeftPren{}{\it expression\opt{, options}}\opRightPren{}% +}% +}% +{1}{(FE)->Any}{ExpressionToUnivariatePowerSeries} +{\smath{\mbox{\bf puiseux}\opLeftPren{}f\opRightPren{}} returns a Puiseux expansion of the expression +\smath{f}. +Note: \smath{f} should have only one variable; the series will be +expanded in powers of that variable. +Also, if \smath{x} is a symbol, +\smath{\mbox{\bf puiseux}\opLeftPren{}x\opRightPren{}} returns \smath{x} as a Puiseux series. +\newitem +\smath{\mbox{\bf puiseux}\opLeftPren{}f, \allowbreak{} x = a\opRightPren{}} expands the expression \smath{f} as a +Puiseux series in powers of \smath{(x - a)}. +\newitem +\smath{\mbox{\bf puiseux}\opLeftPren{}f, \allowbreak{} n\opRightPren{}} returns a Puiseux expansion of the expression +\smath{f}. +Note: \smath{f} should have only one variable; the series will be +expanded in powers of that variable and terms will be computed up +to order at least \smath{n}. +\newitem +\smath{\mbox{\bf puiseux}\opLeftPren{}f, \allowbreak{} x = a, \allowbreak{} n\opRightPren{}} expands the expression \smath{f} as a +Puiseux series in powers of \smath{(x - a)}; terms will be +computed up to order at least \smath{n}. +\newitem +\smath{\mbox{\bf puiseux}\opLeftPren{}n {\tt +->} a(n), \allowbreak{} x = a, \allowbreak{} r_0.., \allowbreak{} r\opRightPren{}} returns +\smath{\sum\nolimits_{n = r_0, r_0 + r, r_0 + 2 r, \ldots} a(n) (x - a)^n}. +\newitem +\smath{\mbox{\bf puiseux}\opLeftPren{}a(n), \allowbreak{} n, \allowbreak{} x = a, \allowbreak{} r_0.., \allowbreak{} r\opRightPren{}} returns +\smath{\sum\nolimits_{n = r_0, r_0 + r, r_0 + 2 r, \ldots} a(n) (x - a)^n}. +\newitem Note: Each of the last two commands have alternate forms +whose third argument is the finite segment \smath{r_0..r_1} +producing a similar series with +a finite number of terms. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{push!}}\opLeftPren{}{\it element}, \allowbreak{}{\it stack}\opRightPren{}% +}% +}% +{2}{(S, \$)->S}{StackAggregate} +{\smath{\mbox{\bf push!}\opLeftPren{}x, \allowbreak{} s\opRightPren{}} pushes \smath{x} onto stack \smath{s}, that +is, destructively changing \smath{s} so as to have a new first +(top) element \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pushdown}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it symbol}\opRightPren{}% + \opand \mbox{\axiomFun{pushdterm}}\opLeftPren{}{\it monomial}, \allowbreak{}{\it symbol}\opRightPren{}% +}% +}% +{2}{(PRF, OV)->PRF}{MPolyCatRationalFunctionFactorizer} +{\smath{\mbox{\bf pushdown}\opLeftPren{}prf, \allowbreak{} var\opRightPren{}} pushes all top level occurences of the +variable \smath{var} into the coefficient domain for the +polynomial \smath{prf}. +\newitem\smath{\mbox{\bf pushdterm}\opLeftPren{}monom, \allowbreak{} var\opRightPren{}} pushes all top level +occurences of the variable \smath{var} into the coefficient domain +for the monomial \smath{monom}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pushucoef}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it variable}\opRightPren{}% +}% +}% +{2}{(SparseUnivariatePolynomial(Polynomial(R)), OV)->PRF}{MPolyCatRationalFunctionFactorizer} +{\smath{\mbox{\bf pushucoef}\opLeftPren{}upoly, \allowbreak{} var\opRightPren{}} converts the anonymous univariate +polynomial \smath{upoly} to a polynomial in \smath{var} over +rational functions.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pushuconst}}\opLeftPren{}{\it rationalFunction}, \allowbreak{}{\it variable}\opRightPren{}% +}% +}% +{2}{(Fraction(Polynomial(R)), OV)->PRF}{MPolyCatRationalFunctionFactorizer} +{\smath{\mbox{\bf pushuconst}\opLeftPren{}r, \allowbreak{} var\opRightPren{}} takes a rational function and raises +all occurences +of the variable \smath{var} to the polynomial level. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{pushup}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it variable}\opRightPren{}% +}% +}% +{2}{(PRF, OV)->PRF}{MPolyCatRationalFunctionFactorizer} +{\smath{\mbox{\bf pushup}\opLeftPren{}prf, \allowbreak{} var\opRightPren{}} raises all occurences of the variable +\smath{var} in the coefficients of the polynomial \smath{prf} back +to the polynomial level. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{qelt}}\opLeftPren{}{\it u\opt{, options}}\opRightPren{}% +}% +}% +{2}{(\$, Dom)->Im}{EltableAggregate} +{\smath{\mbox{\bf qelt}\opLeftPren{}u, \allowbreak{} p\optinner{, options}\opRightPren{}} is equivalent to +a corresponding \spadfun{elt} form except that it +performs no check that indicies are in range. +Use HyperDoc to discover if a given domain has this alternative operation. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{qsetelt!}}\opLeftPren{}{\it u}, \allowbreak{}{\it x}, \allowbreak{}{\it y}\allowbreak $\,[$ , \allowbreak{}{\it z}$]$\opRightPren{}% +}% +}% +{3}{(\$, Dom, Im)->Im}{EltableAggregate} +{\smath{\mbox{\bf qsetelt!}\opLeftPren{}u, \allowbreak{} x, \allowbreak{} y\optinner{, z}\opRightPren{}} is equivalent to +a corresponding \spadfun{setelt} form except that it +performs no check that indicies are in range. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{quadraticForm}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(SquareMatrix(n, K))->\$}{QuadraticForm} +{\smath{\mbox{\bf quadraticForm}\opLeftPren{}m\opRightPren{}} creates a quadratic form from a symmetric, square matrix \smath{m}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{quatern}}\opLeftPren{}{\it element}, \allowbreak{}{\it element}, \allowbreak{}{\it element}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{4}{(R, R, R, R)->\$}{QuaternionCategory} +{\smath{\mbox{\bf quatern}\opLeftPren{}r, \allowbreak{} i, \allowbreak{} j, \allowbreak{} k\opRightPren{}} constructs a quaternion from scalars. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{queue}}\opLeftPren{}{\it \opt{listOfElements}}\opRightPren{}% +}% +}% +{0}{()->\$}{QueueAggregate} +{\smath{\mbox{\bf queue}\opLeftPren{}\opRightPren{}}\$\smath{R} returns an empty queue of type +\smath{R}. +\newitem +\smath{\mbox{\bf queue}\opLeftPren{}[x, \allowbreak{} y, \allowbreak{} \ldots, z]\opRightPren{}} creates a queue with first (top) +element \smath{x}, second element \smath{y}, \ldots, and last +(bottom) element \smath{z}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{quickSort}}\opLeftPren{}{\it predicate}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{((S, S)->Boolean, V)->V}{FiniteLinearAggregateSort} +{\smath{\mbox{\bf quickSort}\opLeftPren{}f, \allowbreak{} agg\opRightPren{}} sorts the aggregate agg with the +ordering predicate \smath{f} using the quicksort algorithm. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{quo}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{NonNegativeInteger} +{\smath{a \quo b} returns the quotient of \smath{a} and \smath{b} +discarding the remainder.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{quoByVar}}\opLeftPren{}{\it series}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{UnivariateTaylorSeriesCategory} +{\smath{\mbox{\bf quoByVar}\opLeftPren{}a_0 + a_1 x + a_2 x^2 + \cdots\opRightPren{}} +returns \smath{a_1 + a_2 x + a_3 x^2 + \cdots} Thus, this function +subtracts the constant term and divides by the series variable. +This function is used when Laurent series are represented by a +Taylor series and an order. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{quote}}\opLeftPren{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf quote}\opLeftPren{}o\opRightPren{}}, where \smath{o} is an object of type +\spadtype{OutputForm} (normally unexposed), +creates an output form \smath{o} with a prefix quote. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{quotedOperators}}\opLeftPren{}{\it rewriteRule}\opRightPren{}% +}% +}% +{1}{(\$)->List(Symbol)}{RewriteRule} +{\smath{\mbox{\bf quotedOperators}\opLeftPren{}r\opRightPren{}}, where \smath{r} is a rewrite rule, +returns the list of operators on the right-hand side of \smath{r} +that are considered quoted, that is, they are not evaluated during +any rewrite, but applied formally to their arguments. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{quotient}}\opLeftPren{}{\it ideal}, \allowbreak{}{\it polynomial}\opRightPren{}% +}% +}% +{2}{(\$, DPoly)->\$}{PolynomialIdeals} +{\smath{\mbox{\bf quotient}\opLeftPren{}I, \allowbreak{} f\opRightPren{}} computes the quotient of the ideal +\smath{I} by the principal ideal generated by the polynomial +\smath{f}, \smath{(I:(f))}. +\newitem\smath{\mbox{\bf quotient}\opLeftPren{}I, \allowbreak{} J\opRightPren{}} computes the quotient of the ideals +\smath{I} and \smath{J}, \smath{(I:J)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{radical}}\opLeftPren{}{\it ideal}\opRightPren{}% +}% +}% +{1}{(PolynomialIdeals(Fraction(Integer), DirectProduct(nv, NonNegativeInteger), vl, DistributedMultivariatePolynomial(vl, Fraction(Integer))))->PolynomialIdeals(Fraction(Integer), DirectProduct(nv, NonNegativeInteger), vl, DistributedMultivariatePolynomial(vl, Fraction(Integer)))}{IdealDecompositionPackage} +{\smath{\mbox{\bf radical}\opLeftPren{}I\opRightPren{}} returns the radical of the ideal \smath{I}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{radicalEigenvalues}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(Matrix(Fraction(Polynomial(Fraction(Integer)))))->List(Expression(Fraction(Integer)))}{RadicalEigenPackage} +{\smath{\mbox{\bf radicalEigenvalues}\opLeftPren{}m\opRightPren{}} computes the eigenvalues of the +matrix \smath{m}; when possible, the eigenvalues are expressed in +terms of radicals. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{radicalEigenvectors}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(Matrix(Fraction(Polynomial(Fraction(Integer)))))->List(Record(radval:Expression(Fraction(Integer)), radmult:Integer, radvect:List(Matrix(Expression(Fraction(Integer))))))}{RadicalEigenPackage} +{\smath{\mbox{\bf radicalEigenvectors}\opLeftPren{}m\opRightPren{}} computes the eigenvalues and the +corresponding eigenvectors of the matrix \smath{m}; when possible, +values are expressed in terms of radicals. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{radicalEigenvector}}\opLeftPren{}{\it eigenvalue}, \allowbreak{}{\it matrix}\opRightPren{}% +}% +}% +{2}{(Expression(Fraction(Integer)), Matrix(Fraction(Polynomial(Fraction(Integer)))))->List(Matrix(Expression(Fraction(Integer))))}{RadicalEigenPackage} +{\smath{\mbox{\bf radicalEigenvector}\opLeftPren{}c, \allowbreak{} m\opRightPren{}} computes the +eigenvector(\smath{s}) of the matrix \smath{m} corresponding to +the eigenvalue \smath{c}; when possible, values are expressed in +terms of radicals. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{radicalOfLeftTraceForm}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->List(A)}{AlgebraPackage} +{\smath{\mbox{\bf radicalOfLeftTraceForm}\opLeftPren{}\opRightPren{}\$F} returns the basis for the +null space +of \smath{\mbox{\bf leftTraceMatrix}\opLeftPren{}\opRightPren{}\$F}, +where \smath{F} is a domain of category \spadtype{FramedNonAssociativeAlgebra}. +If the algebra is associative, alternative +or a Jordan algebra, +then this space equals the radical (maximal nil ideal) of the algebra. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{radicalRoots}}\opLeftPren{}{\it fractions}\opRightPren{}% +}% +}% +{2}{(Fraction(Polynomial(R)), Symbol)->List(Expression(R))}{RadicalSolvePackage} +{\smath{\mbox{\bf radicalRoots}\opLeftPren{}rf, \allowbreak{} v\opRightPren{}} finds the roots expressed in terms of +radicals of the rational function \smath{rf} with respect to the +symbol \smath{v}. +\newitem +\smath{\mbox{\bf radicalRoots}\opLeftPren{}lrf, \allowbreak{} lv\opRightPren{}} finds the roots expressed in terms of +radicals of the list of rational functions \smath{lrf} with +respect to the list of symbols \smath{lv}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{radicalSolve}}\opLeftPren{}{\it eq}, \allowbreak{}{\it x}\opRightPren{}% +}% +}% +{1}{(Equation(Expression(R)))->List(Equation(Expression(R)))}{TransSolvePackage}{See \smath{\mbox{\bf solve}\opLeftPren{}u, \allowbreak{} v\opRightPren{}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{radix}}\opLeftPren{}{\it rationalNumber}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(Fraction(Integer), Integer)->Any}{RadixUtilities} +{\smath{\mbox{\bf radix}\opLeftPren{}rn, \allowbreak{} b\opRightPren{}} converts rational number \smath{rn} to a +radix expansion in base \smath{b}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{ramified?}}\opLeftPren{}{\it polynomial}\opRightPren{}% + \opand \mbox{\axiomFun{ramifiedAtInfinity?}}\opLeftPren{}\opRightPren{}% +}% +}% +{1}{(UP)->Boolean}{FunctionFieldCategory} +{\opkey{Domain \smath{F} is a domain of functions on a fixed +curve.} +\newitem\smath{\mbox{\bf ramified?}\opLeftPren{}p\opRightPren{}\$F} tests whether \smath{p(x) = 0} is ramified. +\newitem\smath{\mbox{\bf ramifiedAtInfinity?}\opLeftPren{}\opRightPren{}} tests if infinity is +ramified. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{random}}\opLeftPren{}{\it \opt{u, v}}\opRightPren{}% +}% +}% +{0}{()->\$}{IntegerNumberSystem} +{\smath{\mbox{\bf random}\opLeftPren{}\opRightPren{}\$R} creates a random element from +domain \smath{D}. +\newitem +\smath{\mbox{\bf random}\opLeftPren{}gp\optinner{, i}\opRightPren{}} returns a random product +of maximal \smath{i} generators of the permutation group {\it gp}. +The value of \smath{i} is 20 by default. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{range}}\opLeftPren{}{\it listOfSegments}\opRightPren{}% +}% +}% +{1}{(List(Segment(Float)))->\$}{DrawOption} +{\smath{\mbox{\bf range}\opLeftPren{}ls\opRightPren{}}, +where \smath{ls} is a list of segments of the form +\smath{[a_1..b_1, \ldots, a_n..b_n]}, provides a user-specified range +for clipping +for the \spadfun{draw} command. +This command may also be +expressed locally to the +\spadfun{draw} command as the option \smath{range == ls}. +The values \smath{a_i} and \smath{b_i} are either given +as floats or rational numbers. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{ranges}}\opLeftPren{}{\it listOfSegments}\opRightPren{}% +}% +}% +{1}{(List(Segment(Float)))->\$}{DrawOption} +{\smath{\mbox{\bf ranges}\opLeftPren{}l\opRightPren{}} provides a list of user-specified ranges +for the \spadfun{draw} command. +This command may also be expressed as an option to the \spadfun{draw} +command in the form \smath{{\bf ranges} == l}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rank}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(M)->NonNegativeInteger}{MatrixLinearAlgebraFunctions} +{\smath{\mbox{\bf rank}\opLeftPren{}m\opRightPren{}} returns the rank of the matrix \smath{m}. Also: +\newitem +\smath{\mbox{\bf rank}\opLeftPren{}A, \allowbreak{} B\opRightPren{}} computes the rank of the complete matrix +\smath{(A|B)} of the linear system \smath{AX = B}. +\newitem +\smath{\mbox{\bf rank}\opLeftPren{}t\opRightPren{}}, +where \smath{t} is a +Cartesion tensor, +returns the tensorial rank of \smath{t} (that is, the number of +indices). +\seeAlso{ \spadtype{FiniteRankAlgebra} and +\spadtype{FiniteRankNonAssociativeAlgebra}} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rarrow}}\opLeftPren{}{\it outputForm}, \allowbreak{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf rarrow}\opLeftPren{}o_1, \allowbreak{} o_2\opRightPren{}}, +where \smath{o_1} and \smath{o_2} are objects of type +\spadtype{OutputForm} (normally unexposed), +creates a form for the mapping \smath{o_1 \rightarrow o_2}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{ratDenom}}\opLeftPren{}{\it expression\opt{, option}}\opRightPren{}% +}% +}% +{2}{(F, F)->F}{AlgebraicManipulations} +{\smath{\mbox{\bf ratDenom}\opLeftPren{}f\optinner{, u}\opRightPren{}} +rationalizes the denominators appearing in \smath{f}. +If no second argument is given, then all algebraic quantities +are moved into the numerators. +If the second argument is given as an algebraic kernel +\smath{a}, then \smath{a} is removed from the denominators. +Similarly, if \smath{u} is a list of algebraic kernels +\smath{[a_1, \ldots, a_n]}, the operation removes the +\smath{a_i}'s from the denominators in \smath{f}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rational?}}\opLeftPren{}{\it element}\opRightPren{}% + \optand \mbox{\axiomFun{rationalIfCan}}\opLeftPren{}{\it element}\opRightPren{}% + \opand \mbox{\axiomFun{rational}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{ComplexCategory} +{\smath{\mbox{\bf rational?}\opLeftPren{}x\opRightPren{}} tests if \smath{x} is a rational number, +that is, that it can be converted to type \spadtype{Fraction(Integer)}. +Specifically, if \smath{x} is complex, a quaternion, or an +octonion, it tests that all imaginary parts are 0. +\newitem +\smath{\mbox{\bf rationalIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{x} as a rational number +if possible, and \mbox{\tt "failed"} if it is not. +\newitem +\smath{\mbox{\bf rational}\opLeftPren{}x\opRightPren{}} returns \smath{x} as a rational number if +possible, and calls \spadfun{error} if it is not. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rationalApproximation}}\opLeftPren{}{\it float}, \allowbreak{}{\it nonNegativeInteger}\allowbreak $\,[$ , \allowbreak{}{\it positiveInteger}$]$\opRightPren{}% +}% +}% +{3}{(\$, NonNegativeInteger, NonNegativeInteger)->Fraction(Integer)}{Float} +{\smath{\mbox{\bf rationalApproximation}\opLeftPren{}f, \allowbreak{} n\optinner{, b}\opRightPren{}} computes a +rational approximation \smath{r} to \smath{f} with relative error +\smath{< b^{-n}}, that is \smath{|(r-f)/f| < b^{-n}}, for some +positive integer base \smath{b}. +By default, \smath{b = 10}. +The first argument \smath{f} is either a float or small float. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rationalFunction}}\opLeftPren{}{\it series}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{3}{(\$, Integer, Integer)->Fraction(Polynomial(Coef))}{UnivariateLaurentSeriesCategory} +{\smath{\mbox{\bf rationalFunction}\opLeftPren{}f, \allowbreak{} m, \allowbreak{} n\opRightPren{}} returns a rational function +consisting of the sum of all terms of \smath{f} of +degree \smath{d} with \smath{m \leq d \leq n}. +By default, \smath{n} is the maximum degree of \smath{f}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rationalPoint?}}\opLeftPren{}{\it value}, \allowbreak{}{\it value}\opRightPren{}% +}% +}% +{2}{(F, F)->Boolean}{FunctionFieldCategory} +{\smath{\mbox{\bf rationalPoint?}\opLeftPren{}a, \allowbreak{} b\opRightPren{}\$F} tests if +\smath{(x=a, y=b)} is on the curve +defining function field \smath{F}. +See \spadtype{FunctionFieldCategory}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rationalPoints}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->List(List(F))}{FunctionFieldCategory} +{\smath{\mbox{\bf rationalPoints}\opLeftPren{})\$} returns the list of all the +affine rational points on the curve +defining function field \smath{F}. +See \spadtype{FunctionFieldCategory}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rationalPower}}\opLeftPren{}{\it puiseuxSeries}\opRightPren{}% +}% +}% +{1}{(\$)->Fraction(Integer)}{UnivariatePuiseuxSeriesConstructorCategory} +{\smath{\mbox{\bf rationalPower}\opLeftPren{}f(x)\opRightPren{}} returns \smath{r} where the Puiseux series \smath{f(x) = g(x^r)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{ratPoly}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->SparseUnivariatePolynomial(F)}{AlgebraicManipulations} +{\smath{\mbox{\bf ratPoly}\opLeftPren{}f\opRightPren{}} returns a polynomial \smath{p} such that \smath{p} has no algebraic coefficients, and \smath{p(f) = 0}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rdexquo}}\opLeftPren{}{\it lodOperator}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Union(\$, "failed")}{LinearOrdinaryDifferentialOperator} +{\smath{\mbox{\bf rdexquo}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}, +where \smath{a} and \smath{b} are linear ordinary differential operators, +returns \smath{q} such that +\smath{a = bq}, or \mbox{\tt "failed"} if no such \smath{q} exists. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightDivide}}\opLeftPren{}{\it lodOperator}, \allowbreak{}{\it lodOperator}\opRightPren{}% +\optand \mbox{\axiomFun{rightQuotient}}\opLeftPren{}{\it lodOperator}, \allowbreak{}{\it lodOperator}\opRightPren{}% +\opand \mbox{\axiomFun{rightRemainder}}\opLeftPren{}{\it lodOperator}, \allowbreak{}{\it lodOperator}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Record(quotient:\$, remainder:\$)}{LinearOrdinaryDifferentialOperator} +{\smath{\mbox{\bf rightDivide}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns the pair \smath{q, r} such that +\smath{a = qb + r} and the degree of +\smath{r} is less than the degree of \smath{b}. +The pair is returned as a record with +fields \smath{quotient} and \smath{remainder}. +This process is called ``right division''. Also: +\smath{\mbox{\bf rightQuotient}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns only \smath{q}. +\smath{\mbox{\bf rightRemainder}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns only \smath{r}. + +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{read!}}\opLeftPren{}{\it file}\opRightPren{}% +\opand \mbox{\axiomFun{readIfCan!}}\opLeftPren{}{\it file}\opRightPren{}% +}% +}% +{1}{(\$)->S}{FileCategory} +{\smath{\mbox{\bf read!}\opLeftPren{}f\opRightPren{}} extracts a value from file \smath{f}. The state of \smath{f} is modified so a subsequent call to \spadfun{read!} will return the next element. +\newitem +\smath{\mbox{\bf readIfCan!}\opLeftPren{}f\opRightPren{}} returns a value from the file \smath{f} +or \mbox{\tt "failed"} if this is not possible (that is, +either \smath{f} is not open for reading, or \smath{f} is at the +end of the file). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{readable?}}\opLeftPren{}{\it file}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{FileNameCategory} +{\smath{\mbox{\bf readable?}\opLeftPren{}f\opRightPren{}} tests if the named file exists and can be opened for reading. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{readLine!}}\opLeftPren{}{\it file}\opRightPren{}% + \opand \mbox{\axiomFun{readLineIfCan!}}\opLeftPren{}{\it file}\opRightPren{}% +}% +}% +{1}{(\$)->String}{TextFile} +{\smath{\mbox{\bf readLineIfCan!}\opLeftPren{}f\opRightPren{}} returns a string of the contents +of a line from file \smath{f}, or \mbox{\tt "failed"} if this is not +possible (if +\smath{f} is not readable or is positioned at the end of file). +\newitem +\smath{\mbox{\bf readLine!}\opLeftPren{}f\opRightPren{}} returns a string of the contents of a line from the file \smath{f}, and calls \spadfun{error} if this is not possible. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{real}}\opLeftPren{}{\it x}\opRightPren{}% + \opand \mbox{\axiomFun{real?}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->R}{ComplexCategory} +{\smath{\mbox{\bf real}\opLeftPren{}x\opRightPren{}} returns real part of \smath{x}. +Argument \smath{x} can be an expression or a complex value, +quaternion, or octonion. +\newitem +\smath{\mbox{\bf real?}\opLeftPren{}f\opRightPren{}} tests if expression \smath{f = real(f)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{realEigenvectors}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it float}\opRightPren{}% +}% +}% +{2}{(Matrix(Fraction(Integer)), Par)->List(Record(outval:Par, outmult:Integer, outvect:List(Matrix(Par))))}{NumericRealEigenPackage} +{\smath{\mbox{\bf realEigenvectors}\opLeftPren{}m, \allowbreak{} eps\opRightPren{}} returns a list of records, each +containing a real eigenvalue, its algebraic multiplicity, and +a list of associated eigenvectors. +All these results are computed to precision \smath{eps} as floats +or rational numbers depending on the type of \smath{eps}. +Argument \smath{m} is a matrix of rational functions. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{realElementary}}\opLeftPren{}{\it expression\opt{, symbol}}\opRightPren{}% +}% +}% +{2}{(F, Symbol)->F}{ElementaryFunctionStructurePackage} +{\smath{\mbox{\bf realElementary}\opLeftPren{}f, \allowbreak{} sy\opRightPren{}} rewrites the kernels of \smath{f} +involving \smath{sy} in terms of the 4 fundamental real transcendental elementary functions: \smath{log, exp, tan, atan}. If \smath{sy} +is omitted, all kernels of \smath{f} are rewritten. + +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{realRoots}}\opLeftPren{}{\it rationalfunctions}, \allowbreak{}{\it v}\allowbreak $\,[$ , \allowbreak{}{\it w}$]$\opRightPren{}% +}% +}% +{3}{(List(Fraction(Polynomial(Fraction(Integer)))), List(Symbol), Par)->List(List(Par))}{FloatingRealPackage} +{\smath{\mbox{\bf realRoots}\opLeftPren{}rf, \allowbreak{} eps\opRightPren{}} finds the real zeros of a univariate rational function +\smath{rf} with precision given by eps. +\newitem +\smath{\mbox{\bf realRoots}\opLeftPren{}lp, \allowbreak{} lv, \allowbreak{} eps\opRightPren{}} computes the list of the real solutions of the list \smath{lp} of rational functions with rational coefficients with respect to the variables in \smath{lv}, with precision \smath{eps}. Each solution is expressed as a list of numbers in order corresponding to the variables in \smath{lv}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{realZeros}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it rationalNumber}\allowbreak $\,[$ , \allowbreak{}{\it option}$]$\opRightPren{}% +}% +}% +{2}{(Pol, Fraction(Integer))->List(Record(left:Fraction(Integer), right:Fraction(Integer)))}{RealZeroPackageQ} +{\smath{\mbox{\bf realZeros}\opLeftPren{}pol\opRightPren{}} returns a list of isolating intervals for all the real zeros of the univariate polynomial \smath{pol}. +\newitem +\smath{\mbox{\bf realZeros}\opLeftPren{}pol\optinner{, eps}\opRightPren{}} returns a list of intervals +of length less than the rational number \smath{eps} +for all the real roots of the polynomial \smath{pol}. +The default value of \smath{eps} is ???. +\newitem +\smath{\mbox{\bf realZeros}\opLeftPren{}pol, \allowbreak{} int\optinner{, eps}\opRightPren{}} returns a list of intervals of +length less than the rational number \smath{eps} for all the +real roots of the polynomial \smath{pol} +which lie in the interval expressed by the record \smath{int}. +The default value of \smath{eps} is ???. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{recip}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Union(\$, "failed")}{Monoid} +{\smath{\mbox{\bf recip}\opLeftPren{}x\opRightPren{}} returns the multiplicative inverse for \smath{x}, +or \mbox{\tt "failed"} if no inverse can be found. +\seeAlso{\spadtype{FiniteRankNonAssociativeAlgebra} and\spadtype{MonadWithUnit}} +} +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{recur}}\opLeftPren{}{\it function}\opRightPren{}% +}% +}% +{ ((NNI, A)->A) -> ((NNI, A)->A)}{}{} +{\smath{\mbox{\bf recur}\opLeftPren{}f\opRightPren{}}, +where \smath{f} is a function of type \spadsig{(NonNegativeInteger, R)}{R} +for some domain \smath{R}, +returns the function \smath{g} such that +\smath{g(n, x)= f(n, f(n-1, \ldots f(1, x)\ldots))}. +For related functions, see \spadtype{MappingPackage}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{red}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{Color} +{\smath{\mbox{\bf red}\opLeftPren{}\opRightPren{}} returns the position of the red hue from total hues. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{reduce}}\opLeftPren{}{\it op}, \allowbreak{}{\it aggregate}\allowbreak $\,[$ , \allowbreak{}{\it identity}, \allowbreak{}{\it element}$]$\opRightPren{}% +}% +}% +{2}{((S, S)->S, \$)->S}{Collection} +{\smath{\mbox{\bf reduce}\opLeftPren{}f, \allowbreak{} u\optinner{, ident, a}\opRightPren{}} reduces the binary +operation \smath{f} across \smath{u}. +For example, if \smath{u} is \smath{[x_1, x_2, \ldots, x_n]} then +\smath{\mbox{\bf reduce}\opLeftPren{}f, \allowbreak{} u\opRightPren{}} returns \smath{f(\ldots f(x_1, x_2), \ldots, x_n)}. +\medbreak +An optional identity element of \smath{f} +provided as a third argument affects the result +if \smath{u} has less than two elements. +If \smath{u} is empty, the third argument is +returned if given, and a call to \spadfun{error} occurs +otherwise. +If \smath{u} has one element and the third argument is +given, the value returned is \smath{f(ident, x_1)}. +Otherwise \smath{x_1} is returned. +Thus both \smath{\mbox{\bf reduce}\opLeftPren{}+, \allowbreak{} u\opRightPren{}} and \smath{\mbox{\bf reduce}\opLeftPren{}+, \allowbreak{} u, \allowbreak{} 0\opRightPren{}} +return \smath{\sum\nolimits_{i=1}^n{x_i}}. +Similarly, \smath{\mbox{\bf reduce}\opLeftPren{}*, \allowbreak{} u\opRightPren{}} and \smath{\mbox{\bf reduce}\opLeftPren{}*, \allowbreak{} u, \allowbreak{} 1\opRightPren{}} +return \smath{\prod\nolimits_{i=1}^n{x_i}}. +\medbreak +An optional fourth argument \smath{z} acts as an +``absorbing element''. +\smath{\mbox{\bf reduce}\opLeftPren{}f, \allowbreak{} u, \allowbreak{} x, \allowbreak{} z\opRightPren{}} reduces the binary operation \smath{f} across \smath{u}, +stopping when an ``absorbing element'' \smath{z} is encountered. +For example \smath{\mbox{\bf reduce}\opLeftPren{}or, \allowbreak{} u, \allowbreak{} false, \allowbreak{} true\opRightPren{}} will +stop iterating across \smath{u} returning +\smath{true} as soon as an \smath{x_i = true} is found. +Note: if \smath{u} has one element \smath{x}, +\smath{\mbox{\bf reduce}\opLeftPren{}f, \allowbreak{} u\opRightPren{}} returns \smath{x}, or calls \spadfun{error} if \smath{u} is empty. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{reduceBasisAtInfinity}}\opLeftPren{}{\it basis}\opRightPren{}% +}% +}% +{1}{(Vector(\$))->Vector(\$)}{FunctionFieldCategory} +{\smath{\mbox{\bf reduceBasisAtInfinity}\opLeftPren{}b_1, \allowbreak{} \ldots, b_n\opRightPren{}}, +where the \smath{b_i} are functions on a fixed curve, +returns \smath{(x^i \, b_j)} for all +\smath{i}, \smath{j} such that \smath{x^i \, b_j} is locally +integral at infinity. +\seeType{FunctionFieldCategory} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{reducedContinuedFraction}}\opLeftPren{}{\it element}, \allowbreak{}{\it stream}\opRightPren{}% +}% +}% +{2}{(R, Stream(R))->\$}{ContinuedFraction} +{\smath{\mbox{\bf reducedContinuedFraction}\opLeftPren{}b_0, \allowbreak{} b\opRightPren{}} returns a +continued fraction constructed as follows. +If \smath{b = [b_1, b_2, \ldots]} then the result +is the continued fraction \smath{b_0 + 1/(b_1 + 1/(b_2 + \cdots))}. +That is, the result is the same as +\smath{\mbox{\bf continuedFraction}\opLeftPren{}b_0, \allowbreak{} [1, \allowbreak{} 1, \allowbreak{} 1, \allowbreak{} \ldots], [b_1, b_2, b_3, \ldots]\opRightPren{}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{reducedForm}}\opLeftPren{}{\it continuedFraction}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{ContinuedFraction} +{\smath{\mbox{\bf reducedForm}\opLeftPren{}x\opRightPren{}} puts the continued fraction \smath{x} +in reduced form, that is, the function returns an +equivalent continued fraction of the +form \smath{\mbox{\bf continuedFraction}\opLeftPren{}b_0, \allowbreak{} [1, \allowbreak{} 1, \allowbreak{} 1, \allowbreak{} \ldots], [b_1, b_2, b_3, \ldots]\opRightPren{}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{reducedSystem}}\opLeftPren{}{\it matrix\opt{, vector}}\opRightPren{}% +}% +}% +{1}{(Matrix(\$))->Matrix(R)}{LinearlyExplicitRingOver} +{\smath{\mbox{\bf reducedSystem}\opLeftPren{}A, \allowbreak{} v\opRightPren{}} returns a matrix \smath{B} such that \smath{A x = v} and \smath{B x = v} have the same solutions. +By default, \smath{v = 0}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{reductum}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{AbelianMonoidRing} +{\smath{\mbox{\bf reductum}\opLeftPren{}p\opRightPren{}} returns polynomial \smath{p} minus its leading +monomial, or zero if handed the zero element. +\seeAlso{\spadtype{IndexedDirectProdcutCategory} and \spadtype{MonogenicLinearOperator}} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{refine}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it interval}, \allowbreak{}{\it precision}\opRightPren{}% +}% +}% +{3}{(Pol, Record(left:Fraction(Integer), right:Fraction(Integer)), Fraction(Integer))->Record(left:Fraction(Integer), right:Fraction(Integer))}{RealZeroPackageQ} +{\smath{\mbox{\bf refine}\opLeftPren{}pol, \allowbreak{} int, \allowbreak{} tolerance\opRightPren{}} refines the interval \smath{int} containing exactly one root of the univariate polynomial \smath{pol} to size less than +the indicated \smath{tolerance}. +Argument \smath{int} is an interval denoted by a record with +selectors \smath{left} and \smath{right}, each with rational number values. +The tolerance is either a rational number or another interval. +In the latter case, \mbox{\tt "failed"} is returned if no such +isolating interval exists. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{regularRepresentation}}\opLeftPren{}{\it element}, \allowbreak{}{\it basis}\opRightPren{}% +}% +}% +{2}{(\$, Vector(\$))->Matrix(R)}{FiniteRankAlgebra} +{\smath{\mbox{\bf regularRepresentation}\opLeftPren{}a, \allowbreak{} basis\opRightPren{}} returns the matrix of the linear map defined by left multiplication by \smath{a} with respect to basis \smath{basis}. +Element \smath{a} is a complex element or +an element of a domain \smath{R} of category +\spadtype{FramedAlgebra}. +The second argument may be omitted when a fixed basis is defined for \smath{R}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{reindex}}\opLeftPren{}{\it cartesianTensor}, \allowbreak{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{2}{(\$, List(Integer))->\$}{CartesianTensor} +{\smath{\mbox{\bf reindex}\opLeftPren{}t, \allowbreak{} [i_1, \allowbreak{} \ldots, i_{\rm dim}]\opRightPren{}} permutes the indices of +cartesian tensor \smath{t}. +For example, if \smath{r = {\bf reindex}(t, [4, 1, 2, 3])} for a rank 4 +tensor \smath{t}, then \smath{r} is the rank 4 tensor +given by \smath{r(i, j, k, l) = t(l, i, j, k)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{relationsIdeal}}\opLeftPren{}{\it listOfPolynomials}\opRightPren{}% +}% +}% +{1}{(List(DPoly))->SuchThat(List(Polynomial(F)), List(Equation(Polynomial(F))))}{PolynomialIdeals} +{\smath{\mbox{\bf relationsIdeal}\opLeftPren{}polyList\opRightPren{}} returns the ideal of relations among the polynomials in \smath{polyList}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{relerror}}\opLeftPren{}{\it float}, \allowbreak{}{\it float}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Integer}{Float} +{\smath{\mbox{\bf relerror}\opLeftPren{}x, \allowbreak{} y\opRightPren{}}, +where \smath{x} and \smath{y} are floats, +computes the absolute value of \smath{x - y} divided by \smath{y}, +when \smath{y \not= 0}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rem}}\opLeftPren{}{\it element}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{NonNegativeInteger} +{\smath{a \rem b} returns the remainder of \smath{a} and \smath{b}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{remove}}\opLeftPren{}{\it predicate}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{((S)->Boolean, \$)->\$}{ExtensibleLinearAggregate} +{\opkey{Argument \smath{u} is any extensible aggregate such as a list.} +\newitem +\smath{\mbox{\bf remove}\opLeftPren{}pred, \allowbreak{} u\opRightPren{}} returns a copy of \smath{u} removing all elements \smath{x} such that \smath{p(x)} is \smath{true}. +Argument \smath{u} may be any homogeneous aggregate including +infinite streams. +Note: for lists and streams, \code{remove(p, u) == [x for x in u | not p(x)]}. +\newitem +\smath{\mbox{\bf remove!}\opLeftPren{}pred, \allowbreak{} u\opRightPren{}} destructively removes all elements \smath{x} of \smath{u} such that \smath{\mbox{\bf pred}\opLeftPren{}x\opRightPren{}} is \smath{true}. +The value of \smath{u} after all such elements are removed is returned. +\newitem +\smath{\mbox{\bf remove!}\opLeftPren{}x, \allowbreak{} u\opRightPren{}} destructively removes all values \smath{x} from \smath{u}. +\newitem +\smath{\mbox{\bf remove!}\opLeftPren{}k, \allowbreak{} t\opRightPren{}}, +where \smath{t} is a keyed dictionary, +searches the table \smath{t} for the key \smath{k}, +removing and returning the entry if there. +If \smath{t} has no such key, it returns \mbox{\tt "failed"}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{removeCoshSq}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf removeCoshSq}\opLeftPren{}f\opRightPren{}} converts every \smath{\cosh(u)^2} +appearing in \smath{f} into \smath{1 - \sinh(x)^2}, and also reduces higher powers of \smath{\mbox{\bf cosh}\opLeftPren{}u\opRightPren{}} with that formula. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{removeDuplicates}}\opLeftPren{}{\it aggregate}\opRightPren{}% + \opand \mbox{\axiomFun{removeDuplicates!}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{Collection} +{\smath{\mbox{\bf removeDuplicates}\opLeftPren{}u\opRightPren{}} returns a copy of \smath{u} with all duplicates removed. +\newitem +\smath{\mbox{\bf removeDuplicates!}\opLeftPren{}u\opRightPren{}} destructively removes duplicates from \smath{u}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{removeSinhSq}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf removeSinhSq}\opLeftPren{}f\opRightPren{}} converts every \smath{\sinh(u)^2} +appearing in \smath{f} into \smath{1 - \cosh(x)^2}, and also reduces higher powers of \smath{\mbox{\bf sinh}\opLeftPren{}u\opRightPren{}} with that formula. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{removeSinSq}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf removeSinSq}\opLeftPren{}f\opRightPren{}} converts every \smath{\sin(u)^2} +appearing in \smath{f} into \smath{1 - \cos(x)^2}, and also reduces higher powers of \smath{\mbox{\bf sin}\opLeftPren{}u\opRightPren{}} with that formula. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{removeZeroes}}\opLeftPren{}{\it \optinit{integer, }laurentSeries}\opRightPren{}% +}% +}% +{2}{(Integer, \$)->\$}{UnivariateLaurentSeriesConstructorCategory} +{\smath{\mbox{\bf removeZeroes}\opLeftPren{}\optfirst{n, }f(x)\opRightPren{}} +removes up to \smath{n} leading zeroes from the Laurent series \smath{f(x)}. +If no integer \smath{n} is given, all leading zeroes are removed. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{reopen!}}\opLeftPren{}{\it file}, \allowbreak{}{\it string}\opRightPren{}% +}% +}% +{2}{(\$, String)->\$}{FileCategory} +{\smath{\mbox{\bf reopen!}\opLeftPren{}f, \allowbreak{} mode\opRightPren{}} returns a file \smath{f} +reopened for operation in the indicated mode: \mbox{\tt "input"} or \mbox{\tt "output"}. +For example, +\smath{\mbox{\bf reopen!}\opLeftPren{}f, \allowbreak{} \mbox{\tt "input"}\opRightPren{}} will reopen the file \smath{f} for input. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{repeating}}\opLeftPren{}{\it listOfElements\opt{, stream}}\opRightPren{}% + \opand \mbox{\axiomFun{repeating?}}\opLeftPren{}{\it stream}\opRightPren{}% +}% +}% +{1}{(List(S))->\$}{Stream} +{\smath{\mbox{\bf repeating}\opLeftPren{}l\opRightPren{}} is a repeating stream whose period is the list \smath{l}. +\newitem +\smath{\mbox{\bf repeating?}\opLeftPren{}l, \allowbreak{} s\opRightPren{}} tests if a stream \smath{s} is periodic +with period \smath{l}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{replace}}\opLeftPren{}{\it string}, \allowbreak{}{\it segment}, \allowbreak{}{\it string}\opRightPren{}% +}% +}% +{3}{(\$, UniversalSegment(Integer), \$)->\$}{StringAggregate} +{\smath{\mbox{\bf replace}\opLeftPren{}s, \allowbreak{} i..j, \allowbreak{} t\opRightPren{}} replaces the substring \smath{s(i..j)} +of \smath{s} by string \smath{t}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{represents}}\opLeftPren{}{\it listOfElements\opt{, listOfBasisElements}}\opRightPren{}% +}% +}% +{2}{(Vector(R), Vector(\$))->\$}{FiniteRankAlgebra} +{\smath{\mbox{\bf represents}\opLeftPren{}[a^1, \allowbreak{} .., \allowbreak{} a^n]\optinner{, [v^1, .., v^n]}\opRightPren{}} +returns \smath{a^1 v^1 + \cdots + a^n v^n}. +Arguments \smath{v_i} are elements of a domain of +category \spadtype{FiniteRankAlgebra} or +\spadtype{FiniteRankNonAssociativeAlgebra} built over a ring \smath{R}. +The \smath{a_i} are elements of \smath{R}. +In a framed algebra or finite algebra extension field domain +with a fixed basis, \smath{[v_1, \ldots, v_n]} defaults +to the elements of the fixed basis. +See \spadtype{FramedAlgebra}, \spadtype{FramedNonAssociateAlgebra}, +and \spadtype{FiniteAlgebraicExtensionField}. +\newitem +\seeAlso{ \spadtype{FunctionFieldCategory}} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{resetNew}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Void}{Symbol} +{\smath{\mbox{\bf resetNew}\opLeftPren{}\opRightPren{}} resets the internal counter that \smath{\mbox{\bf new}\opLeftPren{}\opRightPren{}} uses. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{resetVariableOrder}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Void}{UserDefinedVariableOrdering} +{\smath{\mbox{\bf resetVariableOrder}\opLeftPren{}\opRightPren{}} cancels any previous use of \spadfun{setVariableOrder} +and returns to the default system ordering. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rest}}\opLeftPren{}{\it aggregate\opt{, nonNegativeInteger}}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{UnaryRecursiveAggregate} +{\smath{\mbox{\bf rest}\opLeftPren{}u\opRightPren{}} returns an aggregate consisting of all but the first element of \smath{u} (equivalently, the next node of \smath{u}). +\newitem +\smath{\mbox{\bf rest}\opLeftPren{}u, \allowbreak{} n\opRightPren{}} returns the \eth{\smath{n}} node of \smath{u}. +Note: \smath{\mbox{\bf rest}\opLeftPren{}u, 0) = u}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{resultant}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it polynoial}\allowbreak $\,[$ , \allowbreak{}{\it variable}$]$\opRightPren{}% +}% +}% +{3}{(\$, \$, VarSet)->\$}{PolynomialCategory} +{\smath{\mbox{\bf resultant}\opLeftPren{}p, \allowbreak{} q, \allowbreak{} v\opRightPren{}} returns the resultant of the polynomials \smath{p} and \smath{q} with respect to the variable \smath{v}. +If \smath{p} and \smath{q} are univariate polynomials, the +variable \smath{v} defaults to the unique variable. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{retract}}\opLeftPren{}{\it element}\opRightPren{}% + \opand \mbox{\axiomFun{retractIfCan}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Union(S, "failed")}{RetractableTo} +{\smath{\mbox{\bf retractIfCan}\opLeftPren{}a\opRightPren{}}\smath{@S} returns \smath{a} as an object +of type \smath{S}, or \mbox{\tt "failed"} if this is not possible. +\newitem +\smath{\mbox{\bf retract}\opLeftPren{}a\opRightPren{}}\smath{@S} transforms \smath{a} into an element of \smath{S}, +or calls \spadfun{error} if this is not possible. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{retractable?}}\opLeftPren{}{\it typeAnyObject}\opRightPren{}% +}% +}% +{1}{(Any)->Boolean}{AnyFunctions1} +{\smath{\mbox{\bf retractable?}\opLeftPren{}a\opRightPren{}\$S} tests if object \smath{a} +of type \spadtype{Any} can be converted into an object of type \smath{S}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{reverse}}\opLeftPren{}{\it linearAggregate}\opRightPren{}% + \opand \mbox{\axiomFun{reverse!}}\opLeftPren{}{\it linearAggregate}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{FiniteLinearAggregate} +{\smath{\mbox{\bf reverse}\opLeftPren{}a\opRightPren{}} returns a copy of linear aggregate \smath{a} with elements in reverse order. +\newitem +\smath{\mbox{\bf reverse!}\opLeftPren{}a\opRightPren{}} destructively puts the elements of +linear aggregate \smath{a} in reverse order. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightGcd}}\opLeftPren{}{\it lodOperator}, \allowbreak{}{\it lodOperator}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{LinearOrdinaryDifferentialOperator} +{\smath{\mbox{\bf rightGcd}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}, +where \smath{a} and \smath{b} are linear ordinary differential operators, +computes the value \smath{g} of highest degree such that +\smath{a = g*aa} and \smath{b = g*bb} for some values \smath{aa} +and \smath{bb}. The value \smath{g} is computed using right-division. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rhs}}\opLeftPren{}{\it rewriteRuleOrEquation}\opRightPren{}% +}% +}% +{1}{(\$)->F}{RewriteRule} +{\smath{\mbox{\bf rhs}\opLeftPren{}u\opRightPren{}} returns the right-hand side of the rewrite rule +or equation \smath{u}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{right}}\opLeftPren{}{\it binaryRecursiveAggregate}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{BinaryRecursiveAggregate} +{\smath{\mbox{\bf right}\opLeftPren{}a\opRightPren{}} returns the right child. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightAlternative?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{FiniteRankNonAssociativeAlgebra} +{See \spadfun{leftAlternative?}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightCharacteristicPolynomial}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->SparseUnivariatePolynomial(R)}{FiniteRankNonAssociativeAlgebra} +{See \spadfun{leftCharacteristicPolynomial}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightDiscriminant}}\opLeftPren{}{\it basis}\opRightPren{}% +}% +}% +{0}{()->R}{FramedNonAssociativeAlgebra} +{See \spadfun{leftDiscriminant}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightMinimalPolynomial}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->SparseUnivariatePolynomial(R)}{FiniteRankNonAssociativeAlgebra} +{See \spadfun{leftMinimalPolynomial}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightNorm}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->R}{FiniteRankNonAssociativeAlgebra} +{See \spadfun{leftNorm}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightPower}}\opLeftPren{}{\it monad}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(\$, NonNegativeInteger)->\$}{MonadWithUnit} +{See \spadfun{rightPower}.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightRankPolynomial}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->SparseUnivariatePolynomial(Polynomial(R))}{FramedNonAssociativeAlgebra} +{See \spadfun{leftRankPolynomial}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightRank}}\opLeftPren{}{\it basis}\opRightPren{}% +}% +}% +{1}{(A)->NonNegativeInteger}{AlgebraPackage} +{See \spadfun{leftRank}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightRecip}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Union(\$, "failed")}{MonadWithUnit} +{See \spadfun{leftRecip}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightRegularRepresentation}}\opLeftPren{}{\it element\opt{, basis}}\opRightPren{}% +}% +}% +{1}{(\$)->Matrix(R)}{FramedNonAssociativeAlgebra} +{See \spadfun{leftRegularRepresentation}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightTraceMatrix}}\opLeftPren{}{\it \opt{basis}}\opRightPren{}% +}% +}% +{1}{(Vector(\$))->Matrix(R)}{FiniteRankNonAssociativeAlgebra} +{See \spadfun{leftTraceMatrix}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightTrim}}\opLeftPren{}{\it string}, \allowbreak{}{\it various}\opRightPren{}% +}% +}% +{2}{(\$, Character)->\$}{StringAggregate} +{See \spadfun{leftTrim}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightUnits}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Union(\$, "failed")}{FiniteRankNonAssociativeAlgebra} +{See \spadfun{leftUnits}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rischNormalize}}\opLeftPren{}{\it expression}, \allowbreak{}{\it x}\opRightPren{}% +}% +}% +{2}{(F, Symbol)->Record(func:F, kers:List(Kernel(F)), vals:List(F))}{ElementaryFunctionStructurePackage} +{\smath{\mbox{\bf rischNormalize}\opLeftPren{}f, \allowbreak{} x\opRightPren{}} returns \smath{[g, [k_1, \ldots, +k_n], [h_1, \ldots, h_n]]} such that \smath{g = {\bf normalize}(f, +x)} and each \smath{k_i} was rewritten as \smath{h_i} during the +normalization. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rightLcm}}\opLeftPren{}{\it lodOperator}, \allowbreak{}{\it lodOperator}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{LinearOrdinaryDifferentialOperator} +{\smath{\mbox{\bf rightLcm}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}, +where \smath{a} and \smath{b} are linear ordinary differential operators, +computes the value \smath{m} of lowest degree such that \smath{m = aa*a = bb*b} +for some values \smath{aa} and \smath{bb}. The value \smath{m} is computed using right-division. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{roman}}\opLeftPren{}{\it integerOrSymbol}\opRightPren{}% +}% +}% +{1}{(Integer)->\$}{RomanNumeral} +{\smath{\mbox{\bf roman}\opLeftPren{}x\opRightPren{}} creates a roman numeral for integer or symbol \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{romberg}}\opLeftPren{}{\it floatFunction}, \allowbreak{}{\it fourFloats}, \allowbreak{}{\it threeIntegers}\opRightPren{}% +\optand \mbox{\axiomFun{rombergOpen}}\opLeftPren{}{\it floatFunction}, \allowbreak{}{\it fourFloats}, \allowbreak{}{\it twoIntegers}\opRightPren{}% + \opand \mbox{\axiomFun{rombergClose}}\opLeftPren{}{\it floatFunction}, \allowbreak{}{\it fourFloats}, \allowbreak{}{\it twoIntegers}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf romberg}\opLeftPren{}fn, \allowbreak{} a, \allowbreak{} b, \allowbreak{} epsrel, \allowbreak{} epsabs, \allowbreak{} nmin, \allowbreak{} nmax, \allowbreak{} nint\opRightPren{}} +uses an adaptive romberg method to numerically integrate function +\smath{fn} over the closed interval from \smath{a} to \smath{b}, +with relative accuracy \smath{epsrel} and absolute accuracy +\smath{epsabs}; +the refinement levels for the checking of convergence +vary from \smath{nmin} to \smath{nmax}. +The method is called ``adaptive'' since it requires an additional +parameter \smath{nint} giving the number of subintervals over which +the integrator independently applies the convergence criteria using +\smath{nmin} and \smath{nmax}. +This is useful when a large number of points are needed only +in a small fraction of the entire interval. +Parameter \smath{fn} is a function of type \spadsig{Float}{Float}; +\smath{a}, \smath{b}, \smath{epsrel}, and \smath{epsabs} are floats; +\smath{nmin}, \smath{nmax}, and \smath{nint} are integers. +The operation returns a record containing: +{\tt value}, an estimate of the integral; +{\tt error}, an estimate of the error in the computation; +{\tt totalpts}, the total integral number of +function evaluations, and +{\tt success}, a boolean value that is \smath{true} if +the integral was computed within the user specified error criterion. +See \spadtype{NumericalQuadrature} for details. +\bigitem\smath{\mbox{\bf rombergClosed}\opLeftPren{}fn, \allowbreak{} a, \allowbreak{} b, \allowbreak{} epsrel, \allowbreak{} epsabs, \allowbreak{} nmin, \allowbreak{} nmax\opRightPren{}} +similarly uses the +Romberg method to numerically integrate function \smath{fn} +over the closed interval \smath{a} to \smath{b}, +but is not adaptive. +\bigitem\smath{\mbox{\bf rombergOpen}\opLeftPren{}fn, \allowbreak{} a, \allowbreak{} b, \allowbreak{} epsrel, \allowbreak{} epsabs, \allowbreak{} nmin, \allowbreak{} nmax\opRightPren{}} is similar +to \spadfun{rombergClosed}, except that it +integrates function \smath{fn} over +the open interval from \smath{a} to \smath{b}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{root}}\opLeftPren{}{\it outputForm\opt{, positiveInteger}}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf root}\opLeftPren{}o\optinner{, n}\opRightPren{}}, +where \smath{o} and \smath{n} are objects of type +\spadtype{OutputForm} (normally unexposed), +creates an output form for the \eth{\smath{n}} root of the form \smath{o}. +By default, \smath{n = 2}. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rootOfIrreduciblePoly}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(SparseUnivariatePolynomial(GF))->F}{FiniteFieldPolynomialPackage2} +{\smath{\mbox{\bf rootOfIrreduciblePoly}\opLeftPren{}f\opRightPren{}} computes one root of the monic, +irreducible polynomial \smath{f}, whose degree must divide the +extension degree of \smath{F} over \smath{GF}. +That is, \smath{f} splits into linear factors over \smath{F}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rootOf}}\opLeftPren{}{\it polynomial\opt{, variable}}\opRightPren{}% +}% +}% +{1}{(Polynomial(\$))->\$}{AlgebraicallyClosedField} +{\smath{\mbox{\bf rootOf}\opLeftPren{}p\optinner{, y}\opRightPren{}} returns \smath{y} such that +\smath{p(y) = 0}. +The object returned displays as \smath{'y}. +The second argument may be omitted when \smath{p} is a polynomial in a unique +variable \smath{y}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rootSimp}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{AlgebraicManipulations} +{\smath{\mbox{\bf rootSimp}\opLeftPren{}f\opRightPren{}} transforms every radical of the form +\smath{(a b^{q n+r})^{1/n}} +appearing in expression \smath{f} into \smath{b^q (a b^r)^{1/n}}. +This transformation is not in general valid for all complex numbers \smath{b}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rootsOf}}\opLeftPren{}{\it polynomialOrExpression \opt{, symbol}}\opRightPren{}% +}% +}% +{2}{(SparseUnivariatePolynomial(\$), Symbol)->List(\$)}{AlgebraicallyClosedField} +{\smath{\mbox{\bf rootsOf}\opLeftPren{}p \optinner{, y}\opRightPren{}} returns +the value of \smath{[y_1, \ldots, y_n]} such that \smath{p(y_i) = 0}. +The \smath{y_i} are symbols of the form \%\smath{y} with a suffix number +which are bound in the interpreter to respective root values. +Argument \smath{p} is either an expression or a polynomial. +Argument \smath{y} may be omitted in which case \smath{p} must contain +exactly one symbol. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rootSplit}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{AlgebraicManipulations} +{\smath{\mbox{\bf rootSplit}\opLeftPren{}f\opRightPren{}} transforms every radical of the form +\smath{(a/b)^{1/n}} appearing in \smath{f} into \smath{a^{1/n} / +b^{1/n}}. +This transformation is +not in general valid for all complex numbers \smath{a} and \smath{b}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rotate!}}\opLeftPren{}{\it queue}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{QueueAggregate} +{\smath{\mbox{\bf rotate!}\opLeftPren{}q\opRightPren{}} rotates queue \smath{q} so that the element at +the front of the queue goes to the back of the queue. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{round}}\opLeftPren{}{\it float}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{RealNumberSystem} +{\smath{\mbox{\bf round}\opLeftPren{}x\opRightPren{}} computes the integer closest to \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{row}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it positiveInteger}\opRightPren{}% +}% +}% +{2}{(\$, Integer)->Row}{RectangularMatrixCategory} +{\smath{\mbox{\bf row}\opLeftPren{}m, \allowbreak{} i\opRightPren{}} returns the \eth{\smath{i}} row of the matrix +or +two-dimensional array \smath{m}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rowEchelon}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{MatrixCategory} +{\smath{\mbox{\bf rowEchelon}\opLeftPren{}m\opRightPren{}} returns the row echelon form of the matrix +\smath{m}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rst}}\opLeftPren{}{\it stream}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{LazyStreamAggregate} +{\smath{\mbox{\bf rst}\opLeftPren{}s\opRightPren{}} returns a pointer to the next node of stream +\smath{s}. +Caution: this function should only be called after a +\axiomFun{empty?} test returns +\smath{true} since no error check is performed. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rubiksGroup}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->PermutationGroup(Integer)}{PermutationGroupExamples} +{\smath{\mbox{\bf rubiksGroup}\opLeftPren{}\opRightPren{}} constructs the permutation group representing Rubic's Cube +acting on integers \smath{10i+j} for +\smath{1 \leq i \leq 6, 1 \leq j \leq 8}. +The faces of Rubik's Cube are labelled: Front, Right, Up, Down, Left, Back and numbered from 1 to 6. +The pieces on each face (except the unmoveable center piece) are clockwise numbered +from 1 to 8 starting with the piece in the upper left corner. +The moves of the cube are represented as permutations on these pieces, +represented as a two digit integer \smath{ij} where \smath{i} is the number of the face +and \smath{j} is the number of the piece on this face. +The remaining ambiguities are resolved by looking at the 6 generators +representing 90-degree turns of the faces. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rule}}\opLeftPren{}{\it various}\opRightPren{}% +}% +}% +{2}{(F, F)->\$}{RewriteRule} +{See \spadref{ugUserRules}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rules}}\opLeftPren{}{\it ruleset}\opRightPren{}% +}% +}% +{1}{(\$)->List(RewriteRule(Base, R, F))}{Ruleset} +{\smath{\mbox{\bf rules}\opLeftPren{}r\opRightPren{}} returns the list of rewrite rules contained in ruleset \smath{r}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{ruleset}}\opLeftPren{}{\it listOfRules}\opRightPren{}% +}% +}% +{1}{(List(RewriteRule(Base, R, F)))->\$}{Ruleset} +{\smath{\mbox{\bf ruleset}\opLeftPren{}[r1, \allowbreak{} \ldots, rn]\opRightPren{}} creates a ruleset +from a list of rewrite rules \smath{r_1}, \ldots, \smath{r_n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{rungaKutta}}\opLeftPren{}{\it vector}, \allowbreak{}{\it integer}, \allowbreak{}{\it fourFloats}, \allowbreak{}{\it integer}, \allowbreak{}{\it function}\opRightPren{}% +\opand \mbox{\axiomFun{rungaKuttaFixed}}\opLeftPren{}{\it vector}, \allowbreak{}{\it integer}, \allowbreak{}{\it float}, \allowbreak{}{\it float}, \allowbreak{}{\it integer}, \allowbreak{}{\it function}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf rungaKutta}\opLeftPren{}y, \allowbreak{} n, \allowbreak{} a, \allowbreak{} b, \allowbreak{} eps, \allowbreak{} h, \allowbreak{} ncalls, \allowbreak{} derivs\opRightPren{}} +uses a \smath{4}--th order Runga-Kutta method to numerically +integrate the ordinary differential equation $dy/dx = f(y, x)$ from \smath{x_1} to \smath{x_2}, +where \smath{y} is an \smath{n}--vector of +\smath{n} variables. +Initial and final values are provided by solution vector \smath{y}. +The local truncation error is kept within \smath{eps} by changing +the local step size. +Argument \smath{h} is a trial step size and +\smath{ncalls} is the maximum number of single steps the integrator is +allowed to take. +Argument \smath{derivs} +is a +function of type \spadsig{(Vector Float, Vector Float, Float)}{Void}, +which computes the right-hand side of the ordinary differential +equation, then replaces the elements of the first argument +by updated elements. +\bigitem\smath{\mbox{\bf rungaKuttaFixed}\opLeftPren{}y, \allowbreak{} n, \allowbreak{} x_1, \allowbreak{} x_2, \allowbreak{} ns, \allowbreak{} derivs\opRightPren{}} is similar to +\spadfun{rungaKutta} except that it uses \smath{ns} fixed +steps to integrate the solution vector \smath{y} +from \smath{x_1} to \smath{x_2}, returning the values +in \smath{y}. +} +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{saturate}}\opLeftPren{}{\it ideal}, \allowbreak{}{\it polynomial}\allowbreak $\,[$ , \allowbreak{}{\it listOfVariables}$]$\opRightPren{}% +}% +}% +{2}{(\$, DPoly)->\$}{PolynomialIdeals} +{\smath{\mbox{\bf saturate}\opLeftPren{}I, \allowbreak{} f\optinner{, lvar}\opRightPren{}} is the saturation of the +ideal \smath{I} with respect to the multiplicative set generated +by the polynomial \smath{f} in the variables given by +\smath{lvar}, a list of variables. +Argument \smath{lvar} may be omitted in which case \smath{lvar} is +taken to be the list of all variables appearing in \smath{f}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{say}}\opLeftPren{}{\it strings}\opRightPren{}% +}% +}% +{1}{(List(String))->Void}{DisplayPackage} +{\smath{\mbox{\bf say}\opLeftPren{}u\opRightPren{}} sends a string or a list of strings \smath{u} to +output. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sayLength}}\opLeftPren{}{\it listOfStrings}\opRightPren{}% +}% +}% +{1}{(List(String))->Integer}{DisplayPackage} +{\smath{\mbox{\bf sayLength}\opLeftPren{}ls\opRightPren{}} returns the total number of characters +in the list of strings \smath{ls}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{scalarMatrix}}\opLeftPren{}{\it scalar\opt{, dimension}}\opRightPren{}% +}% +}% +{1}{(R)->\$}{SquareMatrixCategory} +{\smath{\mbox{\bf scalarMatrix}\opLeftPren{}r\optinner{, n}\opRightPren{}} returns an +\smath{n}-by-\smath{n} matrix with +scalar \smath{r} on the diagonal and zero elsewhere. +The dimension may be omitted if the result is to be an object +of type \smath{\mbox{\bf SquareMatrix}\opLeftPren{}n, \allowbreak{} R\opRightPren{}} for some \smath{n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{scan}}\opLeftPren{}{\it binaryFunction}, \allowbreak{}{\it aggregate}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{3}{((S, R)->R, A, R)->B}{FiniteLinearAggregateFunctions2} +{\smath{\mbox{\bf scan}\opLeftPren{}f, \allowbreak{} a, \allowbreak{} r\opRightPren{}} successively applies \smath{\mbox{\bf reduce}\opLeftPren{}f, \allowbreak{} x, \allowbreak{} r\opRightPren{}} to +more and more leading sub-aggregates \smath{x} of aggregrate \smath{a}. +More precisely, if \smath{a} is \smath{[a1, a2, \ldots]}, then +\smath{\mbox{\bf scan}\opLeftPren{}f, \allowbreak{} a, \allowbreak{} r\opRightPren{}} returns +\smath{[reduce(f, [a1], r), reduce(f, [a1, a2], r), \ldots]}. +Argument \smath{a} can be any linear aggregate including streams. +For example, if \smath{a} is a list or an infinite stream of the form \smath{[x_1, x_2, \ldots]}, +then \code{scan(+, a, 0)} returns a list or stream +of the form \smath{[x_1, x_1 + x_2, \ldots]}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{scanOneDimSubspaces}}\opLeftPren{}{\it listOfVectors}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(List(Vector(R)), Integer)->Vector(R)}{RepresentationPackage2} +{\smath{\mbox{\bf scanOneDimSubspaces}\opLeftPren{}basis, \allowbreak{} n\opRightPren{}} gives a canonical +representative of the \eth{\smath{n}} +one-dimensional subspace of the vector space generated by the elements of +\smath{basis}. +Consult \spadtype{RepresentationPackage2} using details. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{script}}\opLeftPren{}{\it symbol}, \allowbreak{}{\it listOfListsOfOutputForms}\opRightPren{}% +}% +}% +{2}{(\$, List(List(OutputForm)))->\$}{Symbol} +{\smath{\mbox{\bf script}\opLeftPren{}sy, \allowbreak{} [a, \allowbreak{} b, \allowbreak{} c, \allowbreak{} d, \allowbreak{} e]\opRightPren{}} returns \smath{sy} with +subscripts +\smath{a}, superscripts \smath{b}, pre-superscripts \smath{c}, +pre-subscripts \smath{d}, and argument-scripts \smath{e}. +Omitted components are taken to be empty. +For example, \smath{\mbox{\bf script}\opLeftPren{}s, \allowbreak{} {\tt [}a, \allowbreak{} b, \allowbreak{} c{\tt ]}\opRightPren{}} is equivalent +to \smath{\mbox{\bf script}\opLeftPren{}s, \allowbreak{} {\tt [}a, \allowbreak{} b, \allowbreak{} c, \allowbreak{} {\tt []}, \allowbreak{} {\tt []]}\opRightPren{}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{scripted?}}\opLeftPren{}{\it symbol}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{Symbol} +{\smath{\mbox{\bf scripted?}\opLeftPren{}sy\opRightPren{}} tests if \smath{sy} has been given any scripts. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{scripts}}\opLeftPren{}{\it symbolOrOutputForm\opt{, listOfOutputForms}}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf scripts}\opLeftPren{}o, \allowbreak{} lo\opRightPren{}}, +where \smath{o} is an object of type \spadtype{OutputForm} (normally unexposed) +and \smath{lo} is a list \smath{[sub, super, presuper, presub]} +of four objects +of type \spadtype{OutputForm} (normally unexposed), +creates a form for \smath{o} with scripts on all four corners. +\newline\smath{\mbox{\bf scripts}\opLeftPren{}s\opRightPren{}} returns all the scripts of \smath{s} as a record with +selectors \smath{sub}, \smath{sup}, \smath{presup}, \smath{presub}, and \smath{args}, +each with a list of output forms as a value. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{search}}\opLeftPren{}{\it key}, \allowbreak{}{\it table}\opRightPren{}% +}% +}% +{2}{(Key, \$)->Union(Entry, "failed")}{KeyedDictionary} +{\smath{\mbox{\bf search}\opLeftPren{}k, \allowbreak{} t\opRightPren{}} searches the table \smath{t} for the key +\smath{k}, +returning the entry stored in \smath{t} for key \smath{k}, +or \mbox{\tt "failed"} if \smath{t} has no such key. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sec}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{secIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, "failed")}{PartialTranscendentalFunctions} +{\smath{\mbox{\bf sec}\opLeftPren{}x\opRightPren{}} returns the secant of \smath{x}. +\newitem +\smath{\mbox{\bf secIfCan}\opLeftPren{}z\opRightPren{}} returns \smath{\mbox{\bf sec}\opLeftPren{}z\opRightPren{}} if possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sec2cos}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf sec2cos}\opLeftPren{}f\opRightPren{}} converts every \smath{\mbox{\bf sec}\opLeftPren{}u\opRightPren{}} appearing in \smath{f} into \smath{1/{\rm cos}(u)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sech}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{sechIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, "failed")}{PartialTranscendentalFunctions} +{\smath{\mbox{\bf sech}\opLeftPren{}x\opRightPren{}} returns the hyperbolic secant of \smath{x}. +\newitem +\smath{\mbox{\bf sechIfCan}\opLeftPren{}z\opRightPren{}} returns \smath{\mbox{\bf sech}\opLeftPren{}z\opRightPren{}} if possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sech2cosh}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf sech2cosh}\opLeftPren{}f\opRightPren{}} converts every \smath{\mbox{\bf sech}\opLeftPren{}u\opRightPren{}} appearing in \smath{f} into \smath{1/{\rm cosh}(u)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{second}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->S}{UnaryRecursiveAggregate} +{\smath{\mbox{\bf second}\opLeftPren{}u\opRightPren{}} returns the second element of recursive aggregate \smath{u}. +Note: \smath{\mbox{\bf second}\opLeftPren{}u) = {\bf first}({\bf rest}(u))}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{segment}}\opLeftPren{}{\it integer\opt{, integer}}\opRightPren{}% +}% +}% +{1}{(S)->\$}{UniversalSegment} +{\smath{\mbox{\bf segment}\opLeftPren{}i\optinner{, j}\opRightPren{}} returns +the segment \smath{i..j}. +If not qualified by a {\bf by} clause, this notation for +integers \smath{i} and \smath{j} +denotes the tuple of integers \smath{i}, \smath{i+1}, \ldots, \smath{j}. +When \smath{j} is omitted, \smath{\mbox{\bf segment}\opLeftPren{}i\opRightPren{}} +denotes the half open segment +\smath{i..}, that is, a segment with no upper bound. +\newline +\smath{\mbox{\bf segment}\opLeftPren{}x = bd\opRightPren{}}, +where \smath{bd} is a binding, returns \smath{bd}. +For example, \smath{\mbox{\bf segment}\opLeftPren{}x = a..b\opRightPren{}} returns +\smath{a..b}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{select}}\opLeftPren{}{\it pred}, \allowbreak{}{\it aggregate}\opRightPren{}% + \opand \mbox{\axiomFun{select!}}\opLeftPren{}{\it pred}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{((S)->Boolean, \$)->\$}{Collection} +{\smath{\mbox{\bf select}\opLeftPren{}p, \allowbreak{} u\opRightPren{}} returns a copy of \smath{u} containing only +those elements \smath{x} such that \smath{p(x)} is \smath{true}. +For a list \smath{l}, \smath{select(p, l) == [x {\mbox{ \tt for } +} x {\mbox{ \tt in }} l {\tt |} p(x)]}. +Argument \smath{u} may be any finite aggregate or infinite stream. +\newitem \smath{\mbox{\bf select!}\opLeftPren{}p, \allowbreak{} u\opRightPren{}} destructively changes \smath{u} by +keeping only values \smath{x} such that \smath{p(x)} is true. +Argument \smath{u} can be any extensible linear aggregate or +dictionary. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{semicolonSeparate}}\opLeftPren{}{\it listOfOutputForms}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf semicolonSeparate}\opLeftPren{}lo\opRightPren{}}, where \smath{lo} is a list of +objects of type \spadtype{OutputForm} (normally unexposed), +returns an output form which separates the elements of \smath{lo} +by semicolons. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{separant}}\opLeftPren{}{\it differentialPolynomial}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{DifferentialPolynomialCategory} +{\smath{\mbox{\bf separant}\opLeftPren{}polynomial\opRightPren{}} returns the partial derivative of +the differential polynomial \smath{p} with respect to its leader. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{separate}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it polynomial}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Record(primePart:\$, commonPart:\$)}{UnivariatePolynomialCategory} +{\smath{\mbox{\bf separate}\opLeftPren{}p, \allowbreak{} q\opRightPren{}} returns \spad({a, b)} such that polynomial +\smath{p = a b} and \smath{a} is relatively prime to \smath{q}. +The result produced is a record with selectors \smath{primePart} +and \smath{commonPart} +with value \smath{a} and \smath{b} respectively. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{separateDegrees}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(FP)->List(Record(deg:NonNegativeInteger, prod:FP))}{DistinctDegreeFactorize} +{\smath{\mbox{\bf separateDegrees}\opLeftPren{}p\opRightPren{}} splits the polynomial \smath{p} into factors. +Each factor is a record with selector \smath{deg}, +a non-negative integer, and \smath{prod}, a product of irreducible polynomials +of degree \smath{deg}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{separateFactors}}\opLeftPren{}{\it listOfRecords}, \allowbreak{}{\it polynomial}\opRightPren{}% +}% +}% +{2}{(List(Record(deg:NonNegativeInteger, prod:FP)), FP)->List(FP)}{DistinctDegreeFactorize} +{\smath{\mbox{\bf separateFactors}\opLeftPren{}lfact, \allowbreak{} p\opRightPren{}} takes the list produced by +\spadfunFrom{separateDegrees}{DistinctDegreeFactorization} along +with the original polynomial \smath{p}, and produces the complete list of factors. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{separateFactors}}\opLeftPren{}{\it listOfRecords}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(List(Record(factor:U, degree:Integer)), Integer)->List(U)}{ModularDistinctDegreeFactorizer} +{\smath{\mbox{\bf separateFactors}\opLeftPren{}ddl, \allowbreak{} p\opRightPren{}} refines the distinct degree factorization produced by \spadfunFrom{ddFact}{ModularDistinctDegreeFactorizer} to give a complete list of factors. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sequences}}\opLeftPren{}{\it listOfIntegers}\opRightPren{}% +\opand \mbox{\axiomFun{sequences}}\opLeftPren{}{\it listOfIntegers}, \allowbreak{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{2}{(List(Integer), List(Integer))->Stream(List(Integer))}{PartitionsAndPermutations} +{\smath{\mbox{\bf sequences}\opLeftPren{}[l_0, \allowbreak{} l_1, \allowbreak{} l_2, \allowbreak{} .., \allowbreak{} l_n]\opRightPren{}} is the set of all sequences +formed from \smath{l_0} 0's, \smath{l_1} 1's, \smath{l_2} 2's, \ldots, \smath{l_n} \smath{n}'s. +\newitem +\smath{\mbox{\bf sequences}\opLeftPren{}l1, \allowbreak{} l2\opRightPren{}} is the stream of all sequences that can be composed from +the multiset defined from two lists of integers \smath{l1} and \smath{l2}. +For example, the pair \smath{([1, 2, 4], [2, 3, 5])} represents multiset +with 1 \smath{2}, 2 \smath{3}'s, and 4 \smath{5}'s. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{series}}\opLeftPren{}{\it specifications\opt{, \ldots}}\opRightPren{}% +}% +}% +{1}{(Stream(Coef))->\$}{UnivariateTaylorSeriesCategory} +{\smath{\mbox{\bf series}\opLeftPren{}expression\opRightPren{}} returns a series expansion of the expression \smath{f}. +Note: \smath{f} must have only one variable. The series will be expanded in powers +of that variable. +\newitem +\smath{\mbox{\bf series}\opLeftPren{}sy\opRightPren{}}, where \smath{sy} is a symbol, returns \smath{sy} as a series. +\newitem +\smath{\mbox{\bf series}\opLeftPren{}st\opRightPren{}}, +where \smath{t} is a stream \smath{[a_0, a_1, a_2, \ldots]} of coefficients \smath{a_i} +from some ring, +creates the Taylor series \smath{a_0 + a_1 x + a_2 x^2 +\ldots}. +Also, if \smath{st} is a stream of elements of type \spadtype{Record(k:NonNegativeInteger, c:R)}, +where \smath{k} denotes an exponent and \smath{c}, a non-zero coefficient from some ring \smath{R}, +it creates a stream of non-zero terms. +The terms in \smath{st} must be ordered by increasing order of exponents. +\newitem +\smath{\mbox{\bf series}\opLeftPren{}f, \allowbreak{} x = a\optinner{, n}\opRightPren{}} expands the expression \smath{f} as a +series in powers of \smath{(x - a)} with \smath{n} terms. +If \smath{n} is missing, the number of terms is governed by +the value set by the system command \spadsyscom{)set streams calculate}. +\newitem +\smath{\mbox{\bf series}\opLeftPren{}f, \allowbreak{} n\opRightPren{}} returns a series expansion of the expression +\smath{f}. +Note: \smath{f} should have only one variable; the series will be +expanded in powers of that variable and terms will be computed up +to order at least \smath{n}. +\newitem +\smath{\mbox{\bf series}\opLeftPren{}i {\tt +->} a(i), \allowbreak{} x = a, \allowbreak{} m..\optinner{n, k}\opRightPren{}} creates the series +\smath{\sum\nolimits_{i = m..n {\ \tt by \ } k}{a(i) (x - a)^i}}. +Here \smath{m}, \smath{n}, and \smath{k} are rational numbers. +Upper-limit \smath{n} and stepsize \smath{k} are optional and have default values +\smath{n = \infty} and \smath{k = 1}. +\newitem +\smath{\mbox{\bf series}\opLeftPren{}a(i), \allowbreak{} i, \allowbreak{} x=a, \allowbreak{} m..\optinner{n, k}\opRightPren{}} returns +\smath{\sum\nolimits_{i = m..n {\bf by} k}{a(n) (x - a)^n}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{seriesSolve}}\opLeftPren{}{\it eq}, \allowbreak{}{\it y}, \allowbreak{}{\it x}, \allowbreak{}{\it c}\opRightPren{}% +}% +}% +{1}{(Equation(Expression(R)))->List(Equation(Expression(R)))}{TransSolvePackage} +{\bigopkey{\smath{eq} denotes an equation to be solved; +alternatively, an expression \smath{u} may be given for \smath{eq} in which case the equation +\smath{eq} is defined as \smath{u=0}. +\largerbreak\smath{leq} denotes a list \smath{[ eq_1\ldots eq_n]} of equations; alternatively, +a list of expressions \smath{[ u_1\ldots u_n]} +may be given of \smath{leq} in which case the equations \smath{eq_i} are +defined by \smath{u_i=0}. +} +\bigitem\smath{\mbox{\bf seriesSolve}\opLeftPren{}eq, \allowbreak{} y, \allowbreak{} x=a, \allowbreak{} \optinner{y(a)=}b\opRightPren{}} returns a Taylor series solution of +\smath{eq} around \smath{x=a} with initial condition \smath{y(a)=b}. +Note: \smath{eq} must be of the form +\smath{f(x, y)y'(x) + g(x, y) = h(x, y)}. +\bigitem\smath{\mbox{\bf seriesSolve}\opLeftPren{}eq, \allowbreak{} y, \allowbreak{} x=a, \allowbreak{} [ b_0, \ldots, b_{(n-1)}]\opRightPren{}} returns +a Taylor series solution of \smath{eq} around \smath{x=a} with initial conditions +\smath{y(a)=b_0}, +\smath{y'(a)=b_1}, +$\ldots$ +\smath{y^{(n-1)}(a)=b_{(n-1)}}. +Equation \smath{eq} must be of the form +\smath{f(x, y, y', \ldots, y^{(n-1)})*y^{(n)}(x)+ +g(x, y, x', \ldots, y^{(n-1)}) = h(x, y, y', \ldots, y^{(n-1)})}. +\bigitem\smath{seriesSolve(leq, [ y_1, \ldots, y_n], x = +a, [ y_1(a)=b_1, \ldots, y_n(a)=b_n])} returns a Taylor +series +solution of the equations \smath{eq_i} around \smath{x = a} +with initial conditions \smath{y_i(a)=b_i}. +Note: each \smath{eq_i} must be of the form +\smath{f_i(x, y_1, y_2, \ldots, y_n)y_1'(x) + +g_i(x, y_1, y_2, \ldots, y_n) = h(x, y_1, y_2, \ldots, y_n)}. +\bigitem\smath{seriesSolve(leq, [ y_1, \ldots, y_n], x = +a, [ b_1, \ldots, b_n])} is equivalent to the same +command with +fourth argument \smath{[ y_1(a)=b_1, \ldots, y_n(a)=b_n]}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setchildren!}}\opLeftPren{}{\it recursiveAggregate}\opRightPren{}% +}% +}% +{2}{(\$, List(\$))->\$}{RecursiveAggregate} +{\smath{\mbox{\bf setchildren!}\opLeftPren{}u, \allowbreak{} v\opRightPren{}} replaces the current children of node +\smath{u} with the members of \smath{v} in left-to-right order. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setColumn!}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{3}{(\$, Integer, Col)->\$}{TwoDimensionalArrayCategory} +{\smath{\mbox{\bf setColumn!}\opLeftPren{}m, \allowbreak{} j, \allowbreak{} v\opRightPren{}} sets the \eth{\smath{j}} column of +matrix or two-dimensional array \smath{m} to \smath{v}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setDifference}}\opLeftPren{}{\it list}, \allowbreak{}{\it list}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{List} +{\smath{\mbox{\bf setDifference}\opLeftPren{}l_1, \allowbreak{} l_2\opRightPren{}} returns a list of the elements of \smath{l_1} that are +not also in \smath{l_2}. +The order of elements in the resulting list is unspecified. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setelt}}\opLeftPren{}{\it structure}, \allowbreak{}{\it index}, \allowbreak{}{\it value}\allowbreak $\,[$ , \allowbreak{}{\it option}$]$\opRightPren{}% +}% +}% +{3}{(\$, Dom, Im)->Im}{EltableAggregate} +{\smath{\mbox{\bf setelt}\opLeftPren{}u, \allowbreak{} x, \allowbreak{} y\opRightPren{}}, also written \smath{u.x := y}, +sets the image of \smath{x} to be \smath{y} under \smath{u}, +regarded as a function mapping values from the domain of \smath{x} to +the domain of \smath{y}. Specifically, if \smath{u} is: +\begin{simpleList} +\item a list: \smath{u.first := x} is equivalent to +\smath{\mbox{\bf setfirst!}\opLeftPren{}u, \allowbreak{} x\opRightPren{}}. +Also, +\smath{u.rest := x} is equivalent to \smath{\mbox{\bf setrest!}\opLeftPren{}u, \allowbreak{} x\opRightPren{}}, and +\smath{u.last := x} is equivalent to \smath{\mbox{\bf setlast!}\opLeftPren{}u, \allowbreak{} x\opRightPren{}}. +\item a linear aggregate, +\smath{u(i..j) := x} destructively replaces each element in the +segment \smath{u(i..j)} by \smath{x}. The value \smath{x} is returned. +Note: This function has the same effect as \code{for k in i..j repeat u.k := x; x}. +The length of \smath{u} is unchanged. +\item a recursive aggregate, +\smath{u.value := x} is equivalent to \smath{\mbox{\bf setvalue!}\opLeftPren{}u, \allowbreak{} x\opRightPren{}} and sets the value part of node \spad{u} to \spad{x}. +Also, if \spad{u} is a \spadtype{BinaryTreeAggregate}, +\smath{u.left := x} is equivalent to \smath{\mbox{\bf setleft!}\opLeftPren{}u, \allowbreak{} x\opRightPren{}} and sets the left child +of \spad{u} to \spad{x}. Simiarly, +\smath{u.right := x} is equivalent to \smath{\mbox{\bf setright!}\opLeftPren{}u, \allowbreak{} x\opRightPren{}}. +See also \spadfun{setchildren!}. +\item a table of category TableAggregate(Key, Entry): +u(k) := e is equivalent to \smath{({\bf insert}([k, e], t); e)}, where \smath{k} is +a key and \smath{e} is an entry. +\item a library: +\smath{u.k := v} saves the value \smath{v} in the library \smath{u}, so that +it can later be extracted by \smath{u.k}. +\end{simpleList} +\smath{\mbox{\bf setelt}\opLeftPren{}u, \allowbreak{} i, \allowbreak{} j, \allowbreak{} r\opRightPren{}}, also written, \smath{u(i, j) := r}, sets +the element in the +\eth{\smath{i}} row and \eth{\smath{j}} column of matrix or +two-dimensional array \smath{u} +to \smath{r}. +\newitem +\smath{\mbox{\bf setelt}\opLeftPren{}u, \allowbreak{} rowList, \allowbreak{} colList, \allowbreak{} r\opRightPren{}}, +also written \smath{u([i_1, i_2, \ldots, i_m], [j_1, j_2, \ldots, j_n]) := r}, +where \smath{u} is a matrix or two-dimensional array and +\smath{r} is another \smath{m} by \smath{n} matrix or array, +destructively alters the matrix \smath{u}: +the \smath{x_{i_k, j_l}} is set to \smath{r(k, l)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setEpilogue!}}\opLeftPren{}{\it formattedObject}, \allowbreak{}{\it listOfStrings}\opRightPren{}% +}% +}% +{2}{(\$, List(String))->List(String)}{ScriptFormulaFormat} +{\smath{\mbox{\bf setEpilogue!}\opLeftPren{}t, \allowbreak{} strings\opRightPren{}} sets the epilogue section of a +formatted object \smath{t} to \smath{strings}. +Argument \smath{t} is either an IBM SCRIPT Formula Formatted or \TeX{} formatted object. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setfirst!}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it value}\opRightPren{}% +}% +}% +{2}{(\$, S)->S}{UnaryRecursiveAggregate} +{\smath{\mbox{\bf setfirst!}\opLeftPren{}a, \allowbreak{} x\opRightPren{}} destructively changes the first element of recursive +aggregate \smath{a} to \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setFormula!}}\opLeftPren{}{\it formattedObject}, \allowbreak{}{\it listOfStrings}\opRightPren{}% +}% +}% +{2}{(\$, List(String))->List(String)}{ScriptFormulaFormat} {\smath{\mbox{\bf setFormula!}\opLeftPren{}t, \allowbreak{} strings\opRightPren{}} sets the formula section of a formatted object \smath{t} to \smath{strings}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setIntersection}}\opLeftPren{}{\it list}, \allowbreak{}{\it list}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{List} +{\smath{\mbox{\bf setIntersection}\opLeftPren{}l_1, \allowbreak{} l_2\opRightPren{}} returns a list of the elements that lists \smath{l_1} +and \smath{l_2} have in common. The order of elements in the resulting list is unspecified. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setlast!}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it value}\opRightPren{}% +}% +}% +{2}{(\$, S)->S}{UnaryRecursiveAggregate} +{\smath{\mbox{\bf setlast!}\opLeftPren{}u, \allowbreak{} x\opRightPren{}} destructively changes the last element of +\smath{u} to \smath{x}. +Note: \smath{u.last := x} is equivalent. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setleaves!}}\opLeftPren{}{\it balancedBinaryTree}, \allowbreak{}{\it listOfElements}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{BinaryRecursiveAggregate} +{\smath{\mbox{\bf setleaves!}\opLeftPren{}t, \allowbreak{} ls\opRightPren{}} sets the leaves of balanced binary tree +\smath{t} in left-to-right order to the elements of \smath{ls}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setleft!}}\opLeftPren{}{\it binaryRecursiveAggregate}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{BinaryRecursiveAggregate} +{\smath{\mbox{\bf setleft!}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} sets the left child of \smath{a} to be +\smath{b}. +} + + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setPrologue!}}\opLeftPren{}{\it formattedObject}, \allowbreak{}{\it listOfStrings}\opRightPren{}% +}% +}% +{2}{(\$, List(String))->List(String)}{ScriptFormulaFormat} +{\smath{\mbox{\bf setPrologue!}\opLeftPren{}t, \allowbreak{} strings\opRightPren{}} sets the prologue section of a formatted object \smath{t} to \smath{strings}. +Argument \smath{t} is either an IBM SCRIPT Formula Formatted or \TeX{} formatted object. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setProperties!}}\opLeftPren{}{\it basicOperator}, \allowbreak{}{\it associationList}\opRightPren{}% +}% +}% +{2}{(\$, AssociationList(String, None))->\$}{BasicOperator} +{\smath{\mbox{\bf setProperties!}\opLeftPren{}op, \allowbreak{} al\opRightPren{}} sets the property list of basic operator \smath{op} to +association list \smath{l}. +Note: argument \smath{op} is modified ``in place'', that is, no copy is made. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setProperty!}}\opLeftPren{}{\it basicOperator}, \allowbreak{}{\it string}, \allowbreak{}{\it value}\opRightPren{}% +}% +}% +{3}{(\$, String, None)->\$}{BasicOperator} +{\smath{\mbox{\bf setProperty!}\opLeftPren{}op, \allowbreak{} s, \allowbreak{} v\opRightPren{}} attaches property \smath{s} to +\smath{op}, and sets its value to \smath{v}. +Argument \smath{op} is modified ``in place'', that is, +no copy is made. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setrest!}}\opLeftPren{}{\it aggregate\optinit{, integer}, aggregate}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{UnaryRecursiveAggregate} +{\opkey{Arguments \smath{u} and \smath{v} are finite or infinite aggregates of the same type.} +\newitem +\smath{\mbox{\bf setrest!}\opLeftPren{}u, \allowbreak{} v\opRightPren{}} destructively changes the rest of \smath{u} to \smath{v}. +\newitem +\smath{\mbox{\bf setrest!}\opLeftPren{}x, \allowbreak{} n, \allowbreak{} y\opRightPren{}} destructively changes \smath{x} +so that \smath{\mbox{\bf rest}\opLeftPren{}x, \allowbreak{} n\opRightPren{}}, that is, \smath{x} after the \eth{\smath{n}} element, equals \smath{y}. +The function will expand cycles if necessary. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setright!}}\opLeftPren{}{\it binaryRecursiveAggregate}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{BinaryRecursiveAggregate} +{\smath{\mbox{\bf setright!}\opLeftPren{}a, \allowbreak{} x\opRightPren{}} sets the right child of \smath{t} to be +\smath{x}.} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setRow!}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it integer}, \allowbreak{}{\it row}\opRightPren{}% +}% +}% +{3}{(\$, Integer, Row)->\$}{TwoDimensionalArrayCategory} +{\smath{\mbox{\bf setRow!}\opLeftPren{}m, \allowbreak{} i, \allowbreak{} v\opRightPren{}} sets the \eth{\smath{i}} row of matrix or +two-dimensional array \smath{m} to \smath{v}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setsubMatrix!}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}, \allowbreak{}{\it matrix}\opRightPren{}% +}% +}% +{4}{(\$, Integer, Integer, \$)->\$}{MatrixCategory} +{\smath{\mbox{\bf setsubMatrix}\opLeftPren{}x, \allowbreak{} i_1, \allowbreak{} j_1, \allowbreak{} y\opRightPren{}} destructively alters the matrix \smath{x}. +Here \smath{x(i, j)} is set to \smath{y(i-i_1+1, j-j_1+1)} for +\smath{i = i_1, \ldots, i_1-1+{\bf nrows}(y)} +and \smath{j = j_1, \ldots, j_1-1+{\bf ncols}(y)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setTex!}}\opLeftPren{}{\it text}, \allowbreak{}{\it listOfStrings}\opRightPren{}% +}% +}% +{2}{(\$, List(String))->List(String)}{TexFormat} +{\smath{\mbox{\bf setTex!}\opLeftPren{}t, \allowbreak{} strings\opRightPren{}} sets the TeX section of a TeX form +\smath{t} to \smath{strings}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setUnion}}\opLeftPren{}{\it list}, \allowbreak{}{\it list}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{List} +{\smath{\mbox{\bf setUnion}\opLeftPren{}l_1, \allowbreak{} l_2\opRightPren{}} appends the two lists \smath{l_1} and +\smath{l_2}, then removes all duplicates. +The order of elements in the resulting list is unspecified. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setvalue!}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it value}\opRightPren{}% +}% +}% +{2}{(\$, S)->S}{RecursiveAggregate} +{\smath{\mbox{\bf setvalue!}\opLeftPren{}u, \allowbreak{} x\opRightPren{}} destructively changes the value of node \smath{u} to \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{setVariableOrder}}\opLeftPren{}{\it listOfSymbols\opt{, listOfSymbols}}\opRightPren{}% +}% +}% +{1}{(List(Symbol))->Void}{UserDefinedVariableOrdering} +{\smath{\mbox{\bf setVariableOrder}\opLeftPren{}[a_1, \allowbreak{} \ldots, a_m], [b_1, \ldots, b_n]\opRightPren{}} defines an ordering +on the variables given by \smath{a_1 > a_2 > \ldots > a_m >} other variables +\smath{b_1 > b_2 > \ldots > b_n}. +\newitem +\smath{\mbox{\bf setVariableOrder}\opLeftPren{}[a1, \allowbreak{} \ldots, an]\opRightPren{}} defines an ordering given by +\smath{a_1 > a_2 > \ldots > a_n >} all +other variables. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sFunction}}\opLeftPren{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{L I -> SPOL RN}{}{} +{\smath{\mbox{\bf sFunction}\opLeftPren{}li\opRightPren{}} is the S-function of the partition given by list of +linteger \smath{li}, +expressed in terms of power sum symmetric functions. +See \spadtype{CycleIndicators} for details. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{shade}}\opLeftPren{}{\it palette}\opRightPren{}% +}% +}% +{1}{(\$)->Integer}{Palette} +{\smath{\mbox{\bf shade}\opLeftPren{}p\opRightPren{}} returns the shade index of the indicated palette \smath{p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{shellSort}}\opLeftPren{}{\it sortingFunction}, \allowbreak{}{\it aggregate}\opRightPren{}% +}% +}% +{2}{((S, S)->Boolean, V)->V}{FiniteLinearAggregateSort} +{\smath{\mbox{\bf shellSort}\opLeftPren{}f, \allowbreak{} a\opRightPren{}} sorts the aggregate \smath{a} +using the shellSort algorithm with sorting function \smath{f}. +Aggregate \smath{a} can be any finite linear aggregate which is +mutable (for example, +lists, vectors, and strings). +The sorting function \smath{f} has type \spadsig{(R, R)}{Boolean} where +\smath{R} is the domain of the elements of \smath{a}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{shift}}\opLeftPren{}{\it integerNumber}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{IntegerNumberSystem} +{\smath{\mbox{\bf shift}\opLeftPren{}a, \allowbreak{} i\opRightPren{}} shifts integer number or float \smath{a} by \smath{i} digits. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{showAll?}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Boolean}{Stream} +{\smath{\mbox{\bf showAll?}\opLeftPren{}\opRightPren{}} tests if all computed entries of streams will be displayed +according to system command \spadsyscom{)set streams showall}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{showAllElements}}\opLeftPren{}{\it stream}\opRightPren{}% +}% +}% +{1}{(\$)->OutputForm}{Stream} +{\smath{\mbox{\bf showAllElements}\opLeftPren{}s\opRightPren{}} creates an output form displaying all the already +computed elements of stream \smath{s}. This command will not result in any +further computation of elements of \smath{s}. Also, the command has no effect +if the user has previously entered \spadsyscom{)set streams showall true}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{showTypeInOutput}}\opLeftPren{}{\it boolean}\opRightPren{}% +}% +}% +{1}{(Boolean)->String}{Any} +{\smath{\mbox{\bf showTypeInOutput}\opLeftPren{}bool\opRightPren{}} affects the way objects of \spadtype{Any} +are displayed. If \smath{bool} is \smath{true}, the type of the original object +that was converted to \spadtype{Any} will be printed. If \smath{bool} is \smath{false}, +it will not be printed. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{shrinkable}}\opLeftPren{}{\it boolean}\opRightPren{}% +}% +}% +{1}{(Boolean)->String}{Any} +{\smath{\mbox{\bf shrinkable}\opLeftPren{}b\opRightPren{}\$R} tells \Language{} that flexible arrays of domain \smath{R} +are or are not allowed to shrink (reduce their \spadfun{physicalLength}) +according to whether \smath{b} is \smath{true} or \smath{false}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{shufflein}}\opLeftPren{}{\it listOfIntegers}, \allowbreak{}{\it streamOfListsOfIntegers}\opRightPren{}% +}% +}% +{2}{(List(Integer), Stream(List(Integer)))->Stream(List(Integer))}{PartitionsAndPermutations} +{\smath{\mbox{\bf shufflein}\opLeftPren{}li, \allowbreak{} sli\opRightPren{}} maps \smath{\mbox{\bf shuffle}\opLeftPren{}li, \allowbreak{} u\opRightPren{}} onto all members \smath{u} +of \smath{sli}, concatenating the results. +See \spadtype{PartitionsAndPermutations}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{shuffle}}\opLeftPren{}{\it listOfIntegers}, \allowbreak{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{2}{(List(Integer), List(Integer))->Stream(List(Integer))}{PartitionsAndPermutations} +{\smath{\mbox{\bf shuffle}\opLeftPren{}l1, \allowbreak{} l2\opRightPren{}} forms the stream +of all shuffles of \smath{l1} and \smath{l2}, that is, all sequences that can +be formed from merging \smath{l1} and \smath{l2}. +See \spadtype{PartitionsAndPermutations}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sign}}\opLeftPren{}{\it various\opt{, \ldots}}\opRightPren{}% +}% +}% +{4}{(Fraction(Polynomial(R)), Symbol, Fraction(Polynomial(R)), String)->Union(Integer, "failed")}{RationalFunctionSign} +{\smath{\mbox{\bf sign}\opLeftPren{}x\opRightPren{}}, where \smath{x} is an element of an ordered ring, +returns 1 if \smath{x} is positive, \smath{-1} if \smath{x} is negative, 0 if \smath{x} equals 0. +\newitem +\smath{\mbox{\bf sign}\opLeftPren{}p\opRightPren{}}, where \smath{p} is a permutation, returns +\smath{1}, if \smath{p} is an even permutation, or \smath{-1}, if it is odd. +\newitem +\smath{\mbox{\bf sign}\opLeftPren{}f, \allowbreak{} x, \allowbreak{} a, \allowbreak{} s\opRightPren{}} returns the sign of rational function \smath{f} as +symbol \smath{x} nears \smath{a}, +a real value represented by either a rational function or one of the +values {\tt \%plusInfinity} +or {\tt \%minusInfinity}. +If \smath{s} is: +\begin{simpleList} +\item the string {\tt "left"}: from the left (below). +\item the string {\tt "right}: from the right (above). +\item not given: from both sides if \smath{a} is finite. +\end{simpleList} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{simplify}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf simplify}\opLeftPren{}f\opRightPren{}} performs the following simplifications on \smath{f:} +\begin{simpleList} +\item rewrites trigs and hyperbolic trigs in terms of \smath{sin}, +\smath{cos}, \smath{sinh}, \smath{cosh}. +\item rewrites \smath{sin^2} and \smath{sinh^2} in terms of \smath{cos} and \smath{cosh}. +\item rewrites \smath{e^a e^b} as \smath{e^{a+b}}. +\end{simpleList} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{simplifyExp}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf simplifyExp}\opLeftPren{}f\opRightPren{}} converts every product \smath{e^a +e^b} appearing in \smath{f} into \smath{e^{a+b}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{simpson}}\opLeftPren{}{\it floatFunction}, \allowbreak{}{\it fourFloats}, \allowbreak{}{\it threeIntegers}\opRightPren{}% +\optand \mbox{\axiomFun{simpsonClosed}}\opLeftPren{}{\it floatFunction}, \allowbreak{}{\it fourFloats}, \allowbreak{}{\it twoIntegers}\opRightPren{}% +\opand \mbox{\axiomFun{simpsonOpen}}\opLeftPren{}{\it floatFunction}, \allowbreak{}{\it fourFloats}, \allowbreak{}{\it twoIntegers}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf simpson}\opLeftPren{}fn, \allowbreak{} a, \allowbreak{} b, \allowbreak{} epsrel, \allowbreak{} epsabs, \allowbreak{} nmin, \allowbreak{} nmax, \allowbreak{} nint\opRightPren{}} uses the +adaptive simpson method to numerically integrate function \smath{fn} +over the closed interval from \smath{a} to \smath{b}, with relative +accuracy \smath{epsrel} and absolute accuracy \smath{epsabs}; +the refinement levels for the checking of convergence +vary from \smath{nmin} to \smath{nmax}. +The method is called ``adaptive'' since it requires an additional +parameter \smath{nint} giving the number of subintervals over which +the integrator independently applies the convergence criteria using +\smath{nmin} and \smath{nmax}. +This is useful when a large number of points are needed only +in a small fraction of the entire interval. +Parameter \smath{fn} is a function of type \spadsig{Float}{Float}; +\smath{a}, \smath{b}, \smath{epsrel}, and \smath{epsabs} are floats; +\smath{nmin}, \smath{nmax}, and \smath{nint} are integers. +The operation returns a record containing: +{\tt value}, an estimate of the integral; +{\tt error}, an estimate of the error in the computation; +{\tt totalpts}, the total integral number of +function evaluations, and +{\tt success}, a boolean value which is \smath{true} if +the integral was computed within the user specified error criterion. +See \spadtype{NumericalQuadrature} for details. +\bigitem\smath{\mbox{\bf simpsonClosed}\opLeftPren{}fn, \allowbreak{} a, \allowbreak{} b, \allowbreak{} epsrel, \allowbreak{} epsabs, \allowbreak{} nmin, \allowbreak{} nmax\opRightPren{}} similarly uses +the Simpson method to numerically integrate function \smath{fn} +\index{Simpson's method} +over the closed interval \smath{a} to \smath{b}, +but is not adaptive. +\bigitem\smath{\mbox{\bf simpsonOpen}\opLeftPren{}fn, \allowbreak{} a, \allowbreak{} b, \allowbreak{} epsrel, \allowbreak{} epsabs, \allowbreak{} nmin, \allowbreak{} nmax\opRightPren{}} is similar +to \spadfun{simpsonClosed}, except that it +integrates function \smath{fn} over +the open interval from \smath{a} to \smath{b}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sin}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, "failed")}{PartialTranscendentalFunctions} +{\opkey{Argument x can be a \spadtype{Complex}, \spadtype{Float}, \spadtype{DoubleFloat}, or +\spadtype{Expression} value or a series. } +\newitem +\smath{\mbox{\bf sin}\opLeftPren{}x\opRightPren{}} returns the sine of \smath{x} if possible, and +calls \spadfun{error} otherwise. +\newitem +\smath{\mbox{\bf sinIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf sin}\opLeftPren{}x\opRightPren{}} if possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sin2csc}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf sin2csc}\opLeftPren{}f\opRightPren{}} converts every \smath{\mbox{\bf sin}\opLeftPren{}u\opRightPren{}} appearing in \smath{f} into \smath{1/{\rm csc}(u)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{singular?}}\opLeftPren{}{\it polynomialOrFunctionField}\opRightPren{}% + \opand \mbox{\axiomFun{singularAtInfinity?}}\opLeftPren{}\opRightPren{}% +}% +}% +{1}{(F)->Boolean}{FunctionFieldCategory} +{\smath{\mbox{\bf singular?}\opLeftPren{}p\opRightPren{}} tests whether \smath{p(x) = 0} is singular. +\newitem +\smath{\mbox{\bf singular?}\opLeftPren{}a\opRightPren{}\$F} tests if \smath{x = a} is a singularity of the +algebraic function field \smath{F} (a domain of \spadtype{FunctionFieldCategory}). +\newitem +\smath{\mbox{\bf singularAtInfinity?}\opLeftPren{}\opRightPren{}\$F} tests if the +algebraic function field \smath{F} has a singularity at infinity. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sinh}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{sinhIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, "failed")}{PartialTranscendentalFunctions} +{\opkey{Argument x can be a \spadtype{Complex}, \spadtype{Float}, \spadtype{DoubleFloat}, or +\spadtype{Expression} value or a series. } +\newitem +\smath{\mbox{\bf sinh}\opLeftPren{}x\opRightPren{}} returns the hyperbolic sine of \smath{x} if possible, +and calls \spadfun{error} otherwise. +\newitem +\smath{\mbox{\bf sinhIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf sinh}\opLeftPren{}x\opRightPren{}} if possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sinh2csch}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf sinh2csch}\opLeftPren{}f\opRightPren{}} converts every \smath{\mbox{\bf sinh}\opLeftPren{}u\opRightPren{}} appearing in \smath{f} into \smath{1/{\rm csch}(u)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{size}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->NonNegativeInteger}{Finite} +{\smath{\mbox{\bf size}\opLeftPren{}\opRightPren{}\$F} returns the number of elements in the domain of +category \spadtype{Finite}. By definition, each such domain must have +a finite number of elements. +\seeAlso{\spadtype{FreeAbelianMonoidCategory}} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{size?}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(\$, NonNegativeInteger)->Boolean}{Aggregate} +{\smath{\mbox{\bf size?}\opLeftPren{}a, \allowbreak{} n\opRightPren{}} tests if aggregate \smath{a} has exactly \smath{n} elements. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sizeLess?}}\opLeftPren{}{\it element}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Boolean}{EuclideanDomain} +{\smath{\mbox{\bf sizeLess?}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} tests whether \smath{x} is strictly smaller than \smath{y} with respect to the \spadfunFrom{euclideanSize}{EuclideanDomain}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sizeMultiplication}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->NonNegativeInteger}{FiniteFieldNormalBasis} +{\smath{\mbox{\bf sizeMultiplication}\opLeftPren{}\opRightPren{}\$F} returns the number of entries in the +multiplication table of the field. +Note: The time of multiplication of field elements depends on this size. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{skewSFunction}}\opLeftPren{}{\it listOfIntegers}, \allowbreak{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{(L I, L I) -> SPOL RN}{}{} +{\smath{\mbox{\bf skewSFunction}\opLeftPren{}li_1, \allowbreak{} li_2\opRightPren{}} is the S-function +of the partition difference \smath{li_1 - li_2}, +expressed in terms of power sum symmetric functions. +See \spadtype{CycleIndicators} for details. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{solve}}\opLeftPren{}{\it u}, \allowbreak{}{\it v}\allowbreak $\,[$ , \allowbreak{}{\it w}$]$\opRightPren{}% +}% +}% +{1}{(Equation(Expression(R)))->List(Equation(Expression(R)))}{TransSolvePackage} +{\bigopkey{\smath{eq} denotes an equation to be solved; alternatively, +an expression \smath{u} may be given for \smath{eq} in which case the equation +\smath{eq} is defined as \smath{u=0}. +\largerbreak\smath{leq} denotes a list \smath{[ eq_1\ldots eq_n]} of equations; alternatively, +a list of expressions \smath{[ u_1\ldots u_n]} +may be given for \smath{leq} in which case the equations \smath{eq_i} are +defined by \smath{u_i=0}. +\largerbreak\smath{epsilon} is either a rational number or a float. +} +\bigitem\smath{\mbox{\bf complexSolve}\opLeftPren{}eq, \allowbreak{} epsilon\opRightPren{}} finds all the real solutions +to precision \smath{epsilon} +of the univariate equation \smath{eq} of rational functions with +respect to the unique variable appearing in \smath{eq}. +The complex solutions are either expressed +as rational numbers or floats depending on the type of \smath{epsilon}. +\bigitem\smath{\mbox{\bf complexSolve}\opLeftPren{}[ eq_1\ldots eq_n], epsilon\opRightPren{}} +computes the real solutions to precision \smath{epsilon} of a system of +equations \smath{eq_i} involving rational functions. +The complex solutions are either expressed +as rational numbers or floats depending on the type of \smath{epsilon}. +\bigitem\smath{\mbox{\bf radicalSolve}\opLeftPren{}eq\optinner{, x}\opRightPren{}} finds solutions expressed in terms of +radicals of the equation +\smath{eq} involving rational functions. +Solutions will be found with respect to a \spadtype{Symbol} +given as a second argument to the operation. +This second argument may be omitted when +\smath{eq} contains a unique symbol. +\bigitem\smath{\mbox{\bf radicalSolve}\opLeftPren{}leq{, lv}\opRightPren{}} finds solutions +expressed in terms of radicals of the system +of equations \smath{leq} involving rational functions. +Solutions are found with respect to a list \smath{lv} of \spadtype{Symbol}s, +or with respect to all variables appearing in the equations, +if no second argument is given. +\bigitem\smath{\mbox{\bf solve}\opLeftPren{}eq\optinner{, x}\opRightPren{}} finds exact symbolic solutions to equation +\smath{eq} involving either +rational functions or expressions of type \spadtype{Expression(R)}. +Solutions will be found with respect to a \spadtype{Symbol} +given as a second argument to the operation. +The second argument may be omitted when +\smath{eq} contains a unique symbol. +\bigitem\smath{\mbox{\bf solve}\opLeftPren{}leq{, lv}\opRightPren{}} finds exact solutions +to a system of equations \smath{leq} involving rational functions or expressions +of type \smath{\mbox{\bf Expression}\opLeftPren{}R\opRightPren{}}. +Solutions are found with respect to a list of \smath{lv} of \spadtype{Symbol}s, +or with respect to all variables appearing in the equations +if no second argument is given. +\bigitem\smath{\mbox{\bf solve}\opLeftPren{}eq, \allowbreak{} epsilon\opRightPren{}} finds all the real solutions +to precision \smath{epsilon} +of the univariate equation \smath{eq} of rational functions with +respect to the unique variable appearing in \smath{eq}. +The real solutions are either expressed +as rational numbers or floats depending on the type of \smath{epsilon}. +\bigitem\smath{\mbox{\bf solve}\opLeftPren{}[ eq_1\ldots eq_n], epsilon\opRightPren{}} +computes the real solutions to precision \smath{epsilon} of a system of +equations \smath{eq_i} involving rational functions. +The real solutions are either expressed +as rational numbers or floats depending on the type of \smath{epsilon}. +\bigitem\smath{\mbox{\bf solve}\opLeftPren{}M, \allowbreak{} v\opRightPren{}}, where \smath{M} is a matrix and +\smath{v} is a \spadtype{Vector} of coefficients, finds a particular +solution of the system \smath{Mx=v} and a basis of the associated homogeneous system +\smath{MX=0}. +\bigitem\smath{\mbox{\bf solve}\opLeftPren{}eq, \allowbreak{} y, \allowbreak{} x=a, \allowbreak{} [ y_0\ldots y_m]\opRightPren{}} returns either +the solution of the initial value problem \smath{eq}, +\smath{y(a) = y_0}, \smath{y'(a)=a_1}, \smath{\ldots} or +\mbox{\tt "failed"} if no solution can be found. +Note: an error occurs if the equation \smath{eq} is not a linear +ordinary equation or of the form \smath{dy/dx = f(x, y)}. +\bigitem\smath{\mbox{\bf solve}\opLeftPren{}eq, \allowbreak{} y, \allowbreak{} x\opRightPren{}} returns either a solution of the +ordinary diffential equation \smath{eq} or \mbox{\tt "failed"} if no +non-trivial solution can be found. If \smath{eq} is a linear ordinary +differential equation, a solution is of the form +\smath{[ h, [ b_1, \ldots, ]]} where \smath{h} +is a particular solution and \smath{[ b_1, \ldots, b_m]} are +linearly independent solutions of the associated homogeneous equation +\smath{f(x, y) = 0}. The value returned is a basis for the solution +of the homogeneous equation which are found (note: this is not +always a full basis). +\bigitem See also +\spadfun{dioSolve}, +\spadfun{contractSolve}, +\spadfun{polSolve}, +\spadfun{seriesSolve}, +\spadfun{linSolve}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{solveLinearlyOverQ}}\opLeftPren{}{\it vector}\opRightPren{}% +}% +}% +{2}{(Vector(R), R)->Union(Vector(Fraction(Integer)), "failed")}{IntegerLinearDependence} +{\smath{\mbox{\bf solveLinearlyOverQ}\opLeftPren{}[v_1, \allowbreak{} \ldots, v_n], u\opRightPren{}} returns \smath{[c_1, \ldots, c_n]} such that +\smath{c_1v_1 + \cdots + c_n v_n = u}, or \mbox{\tt "failed"} if no such +rational numbers \smath{c_i} exist. +The elements of the \smath{v_i} and \smath{u} can +be from any extension ring with an explicit linear +dependence test, for example, +expressions, complex values, polynomials, rational functions, or exact numbers. +See \spadtype{LinearExplicitRingOver}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{solveLinearPolynomialEquation}}\opLeftPren{}{\it listOfPolys}, \allowbreak{}{\it poly}\opRightPren{}% +}% +}% +{2}{(List(SparseUnivariatePolynomial(\$)), SparseUnivariatePolynomial(\$))->Union(List(SparseUnivariatePolynomial(\$)), "failed")}{PolynomialFactorizationExplicit} +{\smath{\mbox{\bf solveLinearPolynomialEquation}\opLeftPren{}[f_1, \allowbreak{} \ldots, f_n], g\opRightPren{}}, +where \smath{g} is a polynomial and the \smath{f_i} are polynomials relatively prime to +one another, +returns a list of polynomials \smath{a_i} such that \smath{g/{\prod_i{f_i}} = \sum_i{ai/fi}}, +or \mbox{\tt "failed"} if no such list of \smath{a_i}'s exists. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sort}}\opLeftPren{}{\it \optinit{predicate, }aggregate}\opRightPren{}% + \opand \mbox{\axiomFun{sort!}}\opLeftPren{}{\it \optinit{predicate, }aggregate}\opRightPren{}% +}% +}% +{2}{((S, S)->Boolean, \$)->\$}{FiniteLinearAggregate} +{\smath{\mbox{\bf sort}\opLeftPren{}\optfirst{p, }a\opRightPren{}} returns a copy of +\smath{a} sorted using total ordering predicate \smath{p}. +\newitem +\smath{\mbox{\bf sort!}\opLeftPren{}\optfirst{p, }u\opRightPren{}} returns \smath{u} destructively changed with its +elements ordered by comparison function \smath{p}. +\newitem +By default, \smath{p} is the operation \smath{\leq}. +Thus both \smath{\mbox{\bf sort}\opLeftPren{}u\opRightPren{}} and \smath{\mbox{\bf sort!}\opLeftPren{}u\opRightPren{}} returns \smath{u} with +its elements in ascending order. +\newitem +Also: \smath{\mbox{\bf sort}\opLeftPren{}lp\opRightPren{}} sorts a list of permutations {\it lp} +according to cycle structure, first according to the length of cycles, +second, if \smath{S} has \spadtype{Finite} or \smath{S} has \spadtype{OrderedSet}, +according to lexicographical order of entries in cycles of equal length. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{spherical}}\opLeftPren{}{\it point}\opRightPren{}% +}% +}% +{1}{(Point(R))->Point(R)}{CoordinateSystems} +{\smath{\mbox{\bf spherical}\opLeftPren{}pt\opRightPren{}} transforms point \smath{pt} from spherical coordinates to +Cartesian coordinates, mapping \smath{(r, \theta, \phi)} to +\smath{x = r \sin(\phi) \cos(\theta)}, \smath{y = r \sin(\phi) +\sin(\theta)}, \smath{z = r \cos(\phi)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{split}}\opLeftPren{}{\it element}, \allowbreak{}{\it binarySearchTree}\opRightPren{}% +}% +}% +{2}{(\$, Integer)->\$}{UnaryRecursiveAggregate} +{\smath{\mbox{\bf split}\opLeftPren{}x, \allowbreak{} t\opRightPren{}} splits binary search tree \smath{t} into two components, returning a +record of two components: +\smath{less}, a binary search tree whose components are all +less than x; and, +\smath{greater}, a binary search tree with all the rest of the components of \spad{t}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{split!}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(\$, Integer)->\$}{UnaryRecursiveAggregate} +{\smath{\mbox{\bf split!}\opLeftPren{}u, \allowbreak{} n\opRightPren{}} splits \smath{u} into two aggregates: +the first consisting of \smath{v}, the first \smath{n} +elements of \smath{u}, and \smath{w} consisting of all the rest. +The value of \smath{w} is returned. +Thus \smath{v = {\bf first}(u, n)} and \smath{w := {\bf rest}(u, n)}. +Note: afterwards \smath{\mbox{\bf rest}\opLeftPren{}u, \allowbreak{} n\opRightPren{}} returns \smath{\mbox{\bf empty}\opLeftPren{}\opRightPren{}}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{splitDenominator}}\opLeftPren{}{\it listOfFractions}\opRightPren{}% +}% +}% +{1}{(A)->Record(num:A, den:R)}{CommonDenominator} +{\smath{\mbox{\bf splitDenominator}\opLeftPren{}u\opRightPren{}}, +where \smath{u} is a list of fractions +\smath{[q_1, \ldots, q_n]}, returns \smath{[[p_1, \ldots, p_n], d]} such that +\smath{q_i = p_i/d} and \smath{d} is a common denominator for the \smath{q_i}'s. +Similarly, the function is defined for a matrix (respectively, a polynomial) +\smath{u} in which case the \smath{q_i} are the elements of (respectively, the coefficients of) +\smath{u}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sqfrFactor}}\opLeftPren{}{\it element}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(R, Integer)->\$}{Factored} +{\smath{\mbox{\bf sqfrFactor}\opLeftPren{}base, \allowbreak{} exponent\opRightPren{}} creates a factored object with +a single factor whose \smath{base} is asserted to be square-free +(flag = {\tt "sqfr"}). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sqrt}}\opLeftPren{}{\it expression\opt{, option}}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{RadicalCategory} +{\smath{\mbox{\bf sqrt}\opLeftPren{}x\opRightPren{}} returns the square root of \smath{x}. +\newitem +\smath{\mbox{\bf sqrt}\opLeftPren{}x, \allowbreak{} y\opRightPren{}}, where \smath{x} and +\smath{y} are \smath{p}-adic integers, returns a square root of \smath{x} where +argument \smath{y} is a square root of \smath{x \mod p}. +See also \spadtype{PAdicIntegerCategory}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{square?}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{MatrixCategory} +{\smath{\mbox{\bf square?}\opLeftPren{}m\opRightPren{}} tests if \smath{m} is a square matrix. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{squareFree}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Factored(\$)}{UniqueFactorizationDomain} +{\smath{\mbox{\bf squareFree}\opLeftPren{}x\opRightPren{}} returns the square-free factorization of \smath{x}, +that is, such that the factors are pairwise relatively prime and each has multiple prime factors. +Argument \smath{x} can be a member of any domain of +category \spadtype{UniqueFactorizationDomain} such as a polynomial or integer. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{squareFreePart}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{PolynomialCategory} +{\smath{\mbox{\bf squareFreePart}\opLeftPren{}p\opRightPren{}} returns product of all the prime factors of +\smath{p} each taken with multiplicity one. +Argument \smath{p} can be a member of any domain of +category \spadtype{UniqueFactorizationDomain} such as a polynomial or integer. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{squareFreePolynomial}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(SparseUnivariatePolynomial(\$))->Factored(SparseUnivariatePolynomial(\$))}{PolynomialFactorizationExplicit} +{\smath{\mbox{\bf squareFreePolynomial}\opLeftPren{}p\opRightPren{}} returns the square-free factorization of the univariate polynomial \smath{p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{squareTop}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{MatrixCategory} +{\smath{\mbox{\bf squareTop}\opLeftPren{}A\opRightPren{}} returns an \smath{n}-by-\smath{n} matrix +consisting of the first \smath{n} rows of the +\smath{m}-by-\smath{n} matrix \smath{A}. +The operation calls \spadfun{error} if \smath{m < n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{stack}}\opLeftPren{}{\it list}\opRightPren{}% +}% +}% +{1}{(List(S))->\$}{StackAggregate} +{\smath{\mbox{\bf stack}\opLeftPren{}[x, \allowbreak{} y, \allowbreak{} \ldots, z]\opRightPren{}} creates a stack with first (top) +element \smath{x}, second element \smath{y}, \ldots, and last +element \smath{z}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{standardBasisOfCyclicSubmodule}}\opLeftPren{}{\it listOfMatrices}, \allowbreak{}{\it vector}\opRightPren{}% +}% +}% +{2}{(List(Matrix(R)), Vector(R))->Matrix(R)}{RepresentationPackage2} +{\smath{\mbox{\bf standardBasisOfCyclicSubmodule}\opLeftPren{}lm, \allowbreak{} v\opRightPren{}} returns a matrix +representation of cyclic submodule over a ring \smath{R}, where +\smath{lm} is a list of matrices and \smath{v} is a vector, +such that the non-zero column vectors are an \smath{R}-basis +for \smath{A v}. +\seeType{RepresentationPackage2} +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{stirling1}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% + \opand \mbox{\axiomFun{stirling2}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(I, I)->I}{IntegerCombinatoricFunctions} +{\smath{\mbox{\bf stirling1}\opLeftPren{}n, \allowbreak{} m\opRightPren{}} returns the Stirling number of the first kind. +\newitem +\smath{\mbox{\bf stirling2}\opLeftPren{}n, \allowbreak{} m\opRightPren{}} returns the Stirling number of the second kind. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{string?}}\opLeftPren{}{\it various}\opRightPren{}% + \opand \mbox{\axiomFun{string}}\opLeftPren{}{\it sExpression}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{SExpressionCategory} +{\smath{\mbox{\bf string?}\opLeftPren{}s\opRightPren{}} tests if \spadtype{SExpression} object \smath{s} is a string. +\newitem +\smath{\mbox{\bf string}\opLeftPren{}s\opRightPren{}} converts the symbol \smath{s} to a string. +An \spadfun{error} is called if the symbol is subscripted. +\newitem +\smath{\mbox{\bf string}\opLeftPren{}s\opRightPren{}} returns \spadtype{SExpression} object \smath{s} as +an element of \spadtype{String} if possible, +and otherwise calls \spadfun{error}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{strongGenerators}}\opLeftPren{}{\it listOfPermutations}\opRightPren{}% +}% +}% +{1}{(\$)->List(Permutation(S))}{PermutationGroup} +{\smath{\mbox{\bf strongGenerators}\opLeftPren{}gp\opRightPren{}} returns strong generators for the permutation +group {\it gp}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{structuralConstants}}\opLeftPren{}{\it basis}\opRightPren{}% +}% +}% +{0}{()->Vector(Matrix(R))}{FramedNonAssociativeAlgebra} +{\smath{\mbox{\bf structuralConstants}\opLeftPren{}basis\opRightPren{}} calculates the structural constants +\smath{[(\gamma_{i, j, k}) {\ \tt for\ } k {\ \tt in\ } 1..rank()\$R]} +of a domain \smath{R} of category \spadtype{FramedNonAssociativeAlgebra} over a ring \smath{R}, +defined by: +\smath{v_i v_j = \gamma_{i, j, 1} v_1 + \cdots + \gamma_{i, j, n} v_n}, +where \smath{v_1}, \ldots, \smath{v_n} is the fixed \smath{R}-module basis. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{style}}\opLeftPren{}{\it string}\opRightPren{}% +}% +}% +{1}{(String)->\$}{DrawOption} +{\smath{\mbox{\bf style}\opLeftPren{}s\opRightPren{}} specifies the drawing style in which the graph +will be plotted by the indicated string \smath{s}. +This option is expressed in the form \code{style == s}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sub}}\opLeftPren{}{\it outputForm}, \allowbreak{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf sub}\opLeftPren{}o_1, \allowbreak{} o_2\opRightPren{}}, +where \smath{o_1} and \smath{o_2} are objects of type +\spadtype{OutputForm} (normally unexposed), +creates an output form for \smath{o_1} subscripted by \smath{o_2}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{subMatrix}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{5}{(\$, Integer, Integer, Integer, Integer)->\$}{MatrixCategory} +{\smath{\mbox{\bf subMatrix}\opLeftPren{}m, \allowbreak{} i_1, \allowbreak{} i_2, \allowbreak{} j_1, \allowbreak{} j_2\opRightPren{}} extracts the submatrix \smath{[m(i, j)]} where the index +\smath{i} ranges from \smath{i_1} to \smath{i_2} and +the index \smath{j} ranges from \smath{j_1} to \smath{j_2}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{submod}}\opLeftPren{}{\it integerNumber}, \allowbreak{}{\it integerNumber}, \allowbreak{}{\it integerNumber}\opRightPren{}% +}% +}% +{3}{(\$, \$, \$)->\$}{IntegerNumberSystem} +{\smath{\mbox{\bf submod}\opLeftPren{}a, \allowbreak{} b, \allowbreak{} p\opRightPren{}}, where \smath{0 \leq a < b < p > 1}, returns \smath{a-b\mod p}, +for integer numbers \smath{a}, \smath{b} and \smath{p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{subResultantGcd}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it polynomial}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{UnivariatePolynomialCategory} +{\smath{\mbox{\bf subResultantGcd}\opLeftPren{}p, \allowbreak{} q\opRightPren{}} computes the \smath{gcd} of the polynomials \smath{p} and \smath{q} using the SubResultant \smath{GCD} algorithm. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{subscript}}\opLeftPren{}{\it symbol}, \allowbreak{}{\it listOfOutputForms}\opRightPren{}% +}% +}% +{2}{(\$, List(OutputForm))->\$}{Symbol} +{\smath{\mbox{\bf subscript}\opLeftPren{}s, \allowbreak{} [a1, \allowbreak{} \ldots, an]\opRightPren{}} returns symbol \smath{s} subscripted by output forms +\smath{a_1, \ldots, a_n} as a symbol. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{subset}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{3}{(Integer, Integer, Integer)->List(Integer)}{SymmetricGroupCombinatoricFunctions} +{\smath{\mbox{\bf subSet}\opLeftPren{}n, \allowbreak{} m, \allowbreak{} k\opRightPren{}} calculates the \eth{\smath{k}} \smath{m}-subset of the set +\smath{0, 1, \ldots, (n-1)} in the lexicographic order considered as a decreasing map from +\smath{0, \ldots, (m-1)} into \smath{0, \ldots, (n-1)}. +See \spadtype{SymmetricGroupCombinatoricFunctions}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{subset?}}\opLeftPren{}{\it set}, \allowbreak{}{\it set}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Boolean}{SetAggregate} +{\smath{\mbox{\bf subset?}\opLeftPren{}u, \allowbreak{} v\opRightPren{}} tests if set \smath{u} is a subset of set \smath{v}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{subspace}}\opLeftPren{}{\it threeSpace}\opRightPren{}% +}% +}% +{1}{(\$)->SubSpace(3, R)}{ThreeSpace} +{\smath{\mbox{\bf subspace}\opLeftPren{}s\opRightPren{}} returns the space component which holds all the point +information in the \spadtype{ThreeSpace} object \smath{s}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{substring?}}\opLeftPren{}{\it string}, \allowbreak{}{\it string}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{3}{(\$, \$, Integer)->Boolean}{StringAggregate} +{\smath{\mbox{\bf substring?}\opLeftPren{}s, \allowbreak{} t, \allowbreak{} i\opRightPren{}} tests if \smath{s} is a substring of \smath{t} +beginning at index \smath{i}. Note: \code{substring?(s, t, 0) = prefix?(s, t)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{subst}}\opLeftPren{}{\it expression}, \allowbreak{}{\it equations}\opRightPren{}% +}% +}% +{2}{(\$, Equation(\$))->\$}{ExpressionSpace} +{\smath{\mbox{\bf subst}\opLeftPren{}f, \allowbreak{} k = g\opRightPren{}} formally replaces the kernel \smath{k} by \smath{g} in \smath{f}. +\newitem +\smath{\mbox{\bf subst}\opLeftPren{}f, \allowbreak{} [k_1 = g_1, \allowbreak{} \ldots, k_n = g_n]\opRightPren{}} formally replaces the kernels +\smath{k_1}, \ldots, \smath{k_n} by \smath{g_1}, \ldots, \smath{g_n} in \smath{f}. +\newitem +\smath{\mbox{\bf subst}\opLeftPren{}f, \allowbreak{} [k_1, \allowbreak{} \ldots, k_n], [g_1, \ldots, g_n]\opRightPren{}} formally replaces kernels +\smath{k_i} by \smath{g_i} in \smath{f}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{suchThat}}\opLeftPren{}{\it symbol}, \allowbreak{}{\it predicates}\opRightPren{}% +}% +}% +{2}{(Symbol, List((D)->Boolean))->Expression(Integer)}{AttachPredicates} +{\smath{\mbox{\bf suchThat}\opLeftPren{}sy, \allowbreak{} pred\opRightPren{}} attaches the predicate \smath{pred} to symbol \smath{sy}. +Argument \smath{pred} may also be a list \smath{[p_1, \ldots, p_n]} +of predicates \smath{p_i}. In this case, +the predicate \smath{pred} attached to \smath{sy} +is \smath{p_1 \and \ldots \and p_n}. +\newitem +\smath{\mbox{\bf suchThat}\opLeftPren{}r, \allowbreak{} [a_1, \allowbreak{} \ldots, a_n], f\opRightPren{}} returns the rewrite rule \smath{r} with the +predicate \smath{f(a1, \ldots, an)} attached to it. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{suffix?}}\opLeftPren{}{\it string}, \allowbreak{}{\it string}\opRightPren{}% +}% +}% +{2}{(\$, \$)->Boolean}{StringAggregate} +{\smath{\mbox{\bf suffix?}\opLeftPren{}s, \allowbreak{} t\opRightPren{}} tests if the string \smath{s} is the final substring of \smath{t}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sum}}\opLeftPren{}{\it rationalFunction}, \allowbreak{}{\it symbolOrSegmentBinding}\opRightPren{}% +}% +}% +{2}{(Fraction(Polynomial(R)), Symbol)->Union(Fraction(Polynomial(R)), Expression(R))}{RationalFunctionSum} +{\smath{\mbox{\bf sum}\opLeftPren{}a(n), \allowbreak{} n\opRightPren{}}, +where \smath{a(n)} is an rational function or expression involving +the symbol \smath{n}, +returns the indefinite sum \smath{A} of \smath{a} with respect +to upward difference on \smath{n}, that is, \smath{A(n+1) - A(n) = a(n)}. +\newitem +\smath{\mbox{\bf sum}\opLeftPren{}f(n), \allowbreak{} n = a..b\opRightPren{}}, where +\smath{f(n)}, \smath{a}, and \smath{b} are rational functions (or polynomials), +computes and returns the sum \smath{f(a) + f(a+1) + \cdots + f(b)} as a rational function +(or polynomial). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{summation}}\opLeftPren{}{\it expression}, \allowbreak{}{\it segmentBinding}\opRightPren{}% +}% +}% +{2}{(\$, SegmentBinding(\$))->\$}{CombinatorialOpsCategory} +{\smath{\mbox{\bf summation}\opLeftPren{}f, \allowbreak{} n = a..b\opRightPren{}} returns the formal sum \smath{\sum_{n=a}^b f(n)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sumOfDivisors}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(Integer)->Integer}{IntegerNumberTheoryFunctions} +{\smath{\mbox{\bf sumOfDivisors}\opLeftPren{}n\opRightPren{}} returns the sum of the integers between 1 and +integer \smath{n} (inclusive) which divide \smath{n}. +This sum is often denoted in the literature by \smath{\sigma(n)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sumOfKthPowerDivisors}}\opLeftPren{}{\it integer}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(Integer, NonNegativeInteger)->Integer}{IntegerNumberTheoryFunctions} +{\smath{\mbox{\bf sumOfKthPowerDivisors}\opLeftPren{}n, \allowbreak{} k\opRightPren{}} returns the sum of the +\eth{\smath{k}} powers of the integers between 1 and \smath{n} (inclusive) which divide \smath{n}. +This sum is often denoted in the literature by \smath{\sigma_k(n)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sumSquares}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(Integer)->List(Integer)}{GaussianFactorizationPackage} +{\smath{\mbox{\bf sumSquares}\opLeftPren{}p\opRightPren{}} returns the list \smath{[a, b]} such that +\smath{a^2+b^2} is equal to the integer prime \smath{p}, and +calls \spadfun{error} if this is not possible. +It will succeed if \smath{p} is 2 or congruent to \smath{1 \mod 4}. +} + + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{sup}}\opLeftPren{}{\it element}, \allowbreak{}{\it element}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{OrderedAbelianMonoidSup} +{\smath{\mbox{\bf sup}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} returns the least element from which both \smath{x} and \smath{y} can be subtracted. +The purpose of \spadfun{sup} is to act as a supremum with +respect to the partial order imposed by the \smath{-} operation on the domain. +See \spadtype{OrderedAbelianMonoidSup} for details. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{super}}\opLeftPren{}{\it outputForm}, \allowbreak{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf super}\opLeftPren{}o_1, \allowbreak{} o_2\opRightPren{}}, +where \smath{o_1} and \smath{o_2} are objects of type \spadtype{OutputForm} (normally unexposed), +creates an output form for \smath{o_1} superscripted by \smath{o_2}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{superscript}}\opLeftPren{}{\it symbol}, \allowbreak{}{\it listOfOutputForms}\opRightPren{}% +}% +}% +{2}{(\$, List(OutputForm))->\$}{Symbol} +{\smath{\mbox{\bf superscript}\opLeftPren{}s, \allowbreak{} [a_1, \allowbreak{} \ldots, a_n]\opRightPren{}} returns symbol \smath{s} superscripted by +output forms \smath{[a_1, \ldots, a_n]}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{supersub}}\opLeftPren{}{\it outputForm}, \allowbreak{}{\it listOfOutputForms}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf supersub}\opLeftPren{}o, \allowbreak{} lo\opRightPren{}}, +where \smath{o} is an object of type \spadtype{OutputForm} +(normally unexposed) +and \smath{lo} is a list of output forms of the form +\smath{[sub_1, super_1, sub_2, super_2, \ldots, sub_n, super_n]} +creates an output form with each subscript aligned under each superscript. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{surface}}\opLeftPren{}{\it function}, \allowbreak{}{\it function}, \allowbreak{}{\it function}\opRightPren{}% +}% +}% +{3}{(ComponentFunction, ComponentFunction, ComponentFunction)->\$}{ParametricSurface} +{\smath{\mbox{\bf surface}\opLeftPren{}c_1, \allowbreak{} c_2, \allowbreak{} c_3\opRightPren{}} creates a surface from three parametric component functions +\smath{c_1}, \smath{c_2}, and \smath{c_3}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{swap!}}\opLeftPren{}{\it aggregate}, \allowbreak{}{\it index}, \allowbreak{}{\it index}\opRightPren{}% +}% +}% +{3}{(\$, Index, Index)->Void}{IndexedAggregate} +{\smath{\mbox{\bf swap!}\opLeftPren{}u, \allowbreak{} i, \allowbreak{} j\opRightPren{}} interchanges elements \smath{i} and \smath{j} of aggregate \smath{u}. No meaningful value is returned. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{swapColumns!}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{3}{(\$, Integer, Integer)->\$}{MatrixCategory} +{\smath{\mbox{\bf swapColumns!}\opLeftPren{}m, \allowbreak{} i, \allowbreak{} j\opRightPren{}} interchanges the \eth{\smath{i}} and \eth{\smath{j}} columns of \smath{m} +returning \smath{m} which is destructively altered. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{swapRows!}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{3}{(\$, Integer, Integer)->\$}{MatrixCategory} +{\smath{\mbox{\bf swapRows!}\opLeftPren{}m, \allowbreak{} i, \allowbreak{} j\opRightPren{}} interchanges the \eth{\smath{i}} and \eth{\smath{j}} rows of \smath{m}, +returning \smath{m} which is destructively altered. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{symbol?}}\opLeftPren{}{\it sExpression}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{SExpressionCategory} +{\smath{\mbox{\bf symbol?}\opLeftPren{}s\opRightPren{}} tests if \spadtype{SExpression} object \smath{s} +is a symbol. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{symbol}}\opLeftPren{}{\it sExpression}\opRightPren{}% +}% +}% +{1}{(\$)->Sym}{SExpressionCategory} +{\smath{\mbox{\bf symbol}\opLeftPren{}s\opRightPren{}} returns \smath{s} as an element of type \spadtype{Symbol}, +or calls \spadfun{error} if this is not possible. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{symmetric?}}\opLeftPren{}{\it matrix}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{MatrixCategory} +{\smath{\mbox{\bf symmetric?}\opLeftPren{}m\opRightPren{}} tests if the matrix \smath{m} is square and symmetric, +that is, if each \smath{m(i, j) = m(j, i)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{symmetricDifference}}\opLeftPren{}{\it set}, \allowbreak{}{\it set}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{SetAggregate} +{\smath{\mbox{\bf symmetricDifference}\opLeftPren{}u, \allowbreak{} v\opRightPren{}} returns the set aggregate of +elements \smath{x} which are members of set aggregate \smath{u} or +set aggregate \smath{v} but not both. +If \smath{u} and \smath{v} have no elements in common, +\smath{\mbox{\bf symmetricDifference}\opLeftPren{}u, \allowbreak{} v\opRightPren{}} returns a copy of \smath{u}. +Note: \smath{symmetricDifference(u, v) = {\bf union}({\bf +difference}(u, v), {\bf difference}(v, u))} +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{symmetricGroup}}\opLeftPren{}{\it integers}\opRightPren{}% +}% +}% +{1}{(List(Integer))->PermutationGroup(Integer)}{PermutationGroupExamples} +{\smath{\mbox{\bf symmetricGroup}\opLeftPren{}n\opRightPren{}} constructs the symmetric group \smath{S_n} acting on the +integers 1, \ldots, \smath{n}. +The generators are the \smath{n}-cycle \smath{(1, \ldots, n)} and the 2-cycle \smath{(1, 2)}. +\newitem +\smath{\mbox{\bf symmetricGroup}\opLeftPren{}li\opRightPren{}}, where \smath{li} is a list of integers, +constructs the symmetric group acting on the +integers in the list \smath{li}. +The generators are the cycle given by \smath{li} and +the 2-cycle \smath{(li(1), li(2))}. +Duplicates in the list will be removed. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{symmetricRemainder}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{IntegerNumberSystem} +{\smath{\mbox{\bf symmetricRemainder}\opLeftPren{}a, \allowbreak{} b\opRightPren{}}, where \smath{b > 1}, yields +\smath{r} where \smath{ -b/2 \leq r < b/2}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{symmetricTensors}}\opLeftPren{}{\it matrices}, \allowbreak{}{\it positiveInteger}\opRightPren{}% +}% +}% +{2}{(List(Matrix(R)), PositiveInteger)->List(Matrix(R))}{RepresentationPackage1} +{\smath{\mbox{\bf symmetricTensors}\opLeftPren{}la, \allowbreak{} n\opRightPren{}}, where \smath{la} is a list +\smath{[a_1, \ldots, a_k]} of \smath{m}-by-\smath{m} square +matrices, applies to each matrix \smath{a_i}, the irreducible, +polynomial representation of the general linear group \smath{GL_m} +corresponding to the partition \smath{(n, 0, \ldots, 0)} of +\smath{n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{systemCommand}}\opLeftPren{}{\it string}\opRightPren{}% +}% +}% +{1}{(String)->Void}{MoreSystemCommands} +{\smath{\mbox{\bf systemCommand}\opLeftPren{}cmd\opRightPren{}} takes the string \smath{cmd} and +passes it to the runtime environment for execution as a system +command. +Although various things may be printed, no usable value is +returned. +} +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tableau}}\opLeftPren{}{\it listOfListOfElements}\opRightPren{}% +}% +}% +{1}{(List(List(S)))->\$}{Tableau} +{\smath{\mbox{\bf tableau}\opLeftPren{}ll\opRightPren{}} converts a list of lists \smath{ll} to an object +of type \spadtype{Tableau}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tableForDiscreteLogarithm}}\opLeftPren{}{\it integer}\opRightPren{}% +}% +}% +{1}{(Integer)->Table(PositiveInteger, NonNegativeInteger)}{FiniteFieldCategory} +{\smath{\mbox{\bf tableForDiscreteLogarithm}\opLeftPren{}n\opRightPren{}} returns a table of the +discrete logarithms of \smath{a^0} up to \smath{a^{n-1}} which, +when called with the key \smath{\mbox{\bf lookup}\opLeftPren{}a^i\opRightPren{}}, returns \smath{i} for +\smath{i} in \smath{0..n-1} for a finite field. +This operation calls \spadfun{error} if +not called for prime divisors of order of multiplicative group.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{table}}\opLeftPren{}{\it \opt{listOfRecords}}\opRightPren{}% +}% +}% +{1}{(List(Record(key:Key, entry:Entry)))->\$}{TableAggregate} +{\smath{\mbox{\bf table}\opLeftPren{}[p_1, \allowbreak{} p_2, \allowbreak{} \ldots, p_n]\opRightPren{}} creates a table with keys of +type \smath{Key} and entries of type \smath{Entry}. +Each pair \smath{p_i} is a record with selectors \smath{key} and +\smath{entry} with values from the corresponding domains +\smath{Key} and \smath{Entry}. +\newitem +\smath{\mbox{\bf table}\opLeftPren{}\opRightPren{}\$T} creates a empty table of domain \smath{T} +of category \spadtype{TableAggregate}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tail}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{UnaryRecursiveAggregate} +{\smath{\mbox{\bf tail}\opLeftPren{}a\opRightPren{}} returns the last node of recursive aggregate \smath{a}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tan}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{tanIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, "failed")}{PartialTranscendentalFunctions} +{\opkey{Argument x can be a \spadtype{Complex}, \spadtype{Float}, +\spadtype{DoubleFloat}, or +\spadtype{Expression} value or a series. } +\newitem +\smath{\mbox{\bf tan}\opLeftPren{}x\opRightPren{}} returns the tangent of \smath{x}. +\newitem +\smath{\mbox{\bf tanIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf tan}\opLeftPren{}x\opRightPren{}} if possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tan2cot}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf tan2cot}\opLeftPren{}f\opRightPren{}} converts every \smath{\mbox{\bf tan}\opLeftPren{}u\opRightPren{}} appearing in \smath{f} into \smath{1/{\rm cot}(u)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tan2trig}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf tan2trig}\opLeftPren{}f\opRightPren{}} converts every \smath{\mbox{\bf tan}\opLeftPren{}u\opRightPren{}} appearing in \smath{f} into \smath{\mbox{\bf sin}\opLeftPren{}u)/{\rm cos}(u)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tanh}}\opLeftPren{}{\it expression}\opRightPren{}% + \opand \mbox{\axiomFun{tanhIfCan}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(K)->Union(K, "failed")}{PartialTranscendentalFunctions} +{\opkey{Argument x can be a \spadtype{Complex}, \spadtype{Float}, \spadtype{DoubleFloat}, or +\spadtype{Expression} value or a series. } +\newitem +\smath{\mbox{\bf tanh}\opLeftPren{}x\opRightPren{}} returns the hyperbolic tangent of \smath{x}. +\newitem +\smath{\mbox{\bf tanhIfCan}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf tanh}\opLeftPren{}x\opRightPren{}} if possible, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tanh2coth}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf tanh2coth}\opLeftPren{}f\opRightPren{}} converts every \smath{\mbox{\bf tanh}\opLeftPren{}u\opRightPren{}} appearing in \smath{f} into \smath{1/{\rm coth}(u)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tanh2trigh}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TranscendentalManipulations} +{\smath{\mbox{\bf tanh2trigh}\opLeftPren{}f\opRightPren{}} converts every \smath{\mbox{\bf tanh}\opLeftPren{}u\opRightPren{}} appearing in \smath{f} into \smath{\mbox{\bf sinh}\opLeftPren{}u)/{\rm cosh}(u)}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{taylor}}\opLeftPren{}{\it various}, \allowbreak{}{\it ..}\opRightPren{}% +}% +}% +{1}{(\$)->UTS}{UnivariateLaurentSeriesConstructorCategory} +{\smath{\mbox{\bf taylor}\opLeftPren{}u\opRightPren{}} converts the Laurent series \smath{u(x)} to a Taylor series if possible, +and if not, calls \spadfun{error}. +\newitem +\smath{\mbox{\bf taylor}\opLeftPren{}f\opRightPren{}} converts the expression \smath{f} into a +Taylor expansion of the expression \smath{f}. +Note: \smath{f} must have only one variable. +\newitem +\smath{\mbox{\bf taylor}\opLeftPren{}sy\opRightPren{}}, where \smath{sy} is a symbol, returns \smath{sy} as a Taylor series. +\newitem +\smath{\mbox{\bf taylor}\opLeftPren{}n +-> a(n), \allowbreak{} x = a\opRightPren{}} returns \smath{\sum_{n = 0 \ldots} +a(n)(x-a)^n)}. +\newitem +\smath{\mbox{\bf taylor}\opLeftPren{}f, \allowbreak{} x = a\optinner{, n}\opRightPren{}} expands the expression \smath{f} as a +series in powers of \smath{(x - a)} with \smath{n} terms. +If \smath{n} is missing, the number of terms is governed by +the value set by the system command \spadsyscom{)set streams calculate}. +\newitem +\smath{\mbox{\bf taylor}\opLeftPren{}i +-> a(i), \allowbreak{} x = a, \allowbreak{} m..\optinner{n, k}\opRightPren{}} creates the +Taylor series +\smath{\sum\nolimits_{i = m..n {\ \tt by\ } k}{a(i) (x-a)^i}}. +Here \smath{m}, \smath{n} and \smath{k} are integers. +Upper-limit \smath{n} and stepsize \smath{k} are optional and have default values +\smath{n = \infty} and \smath{k = 1}. +\newitem +\smath{\mbox{\bf taylor}\opLeftPren{}a(i), \allowbreak{} i, \allowbreak{} x=a, \allowbreak{} m..\optinner{n, k}\opRightPren{}} returns +\smath{\sum\nolimits_{i = m..n {\bf by} k}{a(n) (x - a)^n}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{taylorIfCan}}\opLeftPren{}{\it laurentSeries}\opRightPren{}% +}% +}% +{1}{(\$)->Union(UTS, "failed")}{UnivariateLaurentSeriesConstructorCategory} +{\smath{\mbox{\bf taylorIfCan}\opLeftPren{}f(x)\opRightPren{}} converts the Laurent series +\smath{f(x)} to a Taylor series if possible, and returns +\mbox{\tt "failed"} if this is not possible. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{taylorRep}}\opLeftPren{}{\it laurentSeries}\opRightPren{}% +}% +}% +{1}{(\$)->UTS}{UnivariateLaurentSeriesConstructorCategory} +{\smath{\mbox{\bf taylorRep}\opLeftPren{}f(x)\opRightPren{}} returns \smath{g(x)}, where \smath{f = +x^n g(x)} is represented by \smath{[n, g(x)]}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tensorProduct}}\opLeftPren{}{\it listOfMatrices\opt{, listOfMatrices}}\opRightPren{}% +}% +}% +{2}{(List(Matrix(R)), List(Matrix(R)))->List(Matrix(R))}{RepresentationPackage1} +{\smath{\mbox{\bf tensorProduct}\opLeftPren{}[a_1, \allowbreak{} \ldots, a_k]\optinner{, [b_1, \ldots, b_k]}\opRightPren{}} +calculates the list of Kronecker products of the matrices +\smath{a_i} and \smath{b_i} for +\smath{1 \leq i \leq k}. +If a second argument is missing, the \smath{b_i} is defined as the corresponding \smath{a_i}. +Also, \smath{\mbox{\bf tensorProduct}\opLeftPren{}m\opRightPren{}}, where \smath{m} is a matrix, +is defined as \smath{\mbox{\bf tensorProduct}\opLeftPren{}[m], \allowbreak{} [m]\opRightPren{}}. +Note: If each list of matrices corresponds to a group representation +(representation of generators) of one group, then +these matrices correspond to the tensor product of the two representations. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{terms}}\opLeftPren{}{\it various}\opRightPren{}% +}% +}% +{1}{(\$)->List(Record(gen:S, exp:E))}{FreeAbelianMonoidCategory} +{\smath{\mbox{\bf terms}\opLeftPren{}s\opRightPren{}} returns a stream of the non-zero terms +of series \smath{s}. +Each term is returned as a record with selectors +\smath{k} and \smath{c}, which correspond to the +exponent and coefficient, respectively. +The terms are ordered by increasing order of exponents. +\newline +\smath{\mbox{\bf terms}\opLeftPren{}m\opRightPren{}}, +where \smath{m} is a free abelian monoid of the form +\smath{e_1 a_1 + \cdots + e_n a_n}, +returns \smath{[[a_1, e_1], \ldots, [a_n, e_n]]}. +See \spadtype{FreeAbelianMonoidCategory}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tex}}\opLeftPren{}{\it formattedObject}\opRightPren{}% +}% +}% +{1}{(\$)->List(String)}{TexFormat} +{\smath{\mbox{\bf tex}\opLeftPren{}t\opRightPren{}} extracts the TeX section of a TeX formatted object \smath{t}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{third}}\opLeftPren{}{\it aggregate}\opRightPren{}% +}% +}% +{1}{(\$)->S}{UnaryRecursiveAggregate} +{\smath{\mbox{\bf third}\opLeftPren{}u\opRightPren{}} returns the third element of a recursive aggregate \smath{u}. +Note: \smath{\mbox{\bf third}\opLeftPren{}u) = first(rest(rest(u)))}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{title}}\opLeftPren{}{\it string}\opRightPren{}% +}% +}% +{1}{(String)->\$}{DrawOption} +{\smath{\mbox{\bf title}\opLeftPren{}s\opRightPren{}} specifies string \smath{s} as the title for a plot. +This option is expressed as a option to the \spadfun{draw} command in the +form \code{title == s}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{top}}\opLeftPren{}{\it stack}\opRightPren{}% + \opand \mbox{\axiomFun{top!}}\opLeftPren{}{\it dequeue}\opRightPren{}% +}% +}% +{1}{(\$)->S}{StackAggregate} +{\smath{\mbox{\bf top}\opLeftPren{}s\opRightPren{}} returns the top element \smath{x} from \smath{s}. +\newitem +\smath{\mbox{\bf top!}\opLeftPren{}d\opRightPren{}} returns the element at the top (front) of the dequeue. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{toroidal}}\opLeftPren{}{\it value}\opRightPren{}% +}% +}% +{1}{(R)->(Point(R))->Point(R)}{CoordinateSystems} +{\smath{\mbox{\bf toroidal}\opLeftPren{}element\opRightPren{}} transforms from toroidal coordinates to Cartesian coordinates: +\smath{\mbox{\bf toroidal}\opLeftPren{}a\opRightPren{}} is a function that maps the point \smath{(u, v, \phi)} to +\smath{x = a{\sinh}(v){\cos}(\phi)/({\cosh}(v)-{\cos}(u))}, +\smath{y = a{\sinh}(v){\sin}(\phi)/({\cosh}(v)-{\cos}(u))}, +\smath{z = a{\sin}(u)/({\cosh}(v)-{\cos}(u))}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{toScale}}\opLeftPren{}{\it boolean}\opRightPren{}% +}% +}% +{1}{(Boolean)->\$}{DrawOption} +{\smath{\mbox{\bf toScale}\opLeftPren{}b\opRightPren{}} specifies whether or not a plot is to be drawn +to scale. +This command may be expressed as an option to the +\spadfun{draw} command in the form \smath{toScale == b}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{totalDegree}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it listOfVariables}\opRightPren{}% +}% +}% +{2}{(\$, List(VarSet))->NonNegativeInteger}{PolynomialCategory} +{\smath{\mbox{\bf totalDegree}\opLeftPren{}p\optinner{, lv}\opRightPren{}} returns the maximum sum +(over all monomials of polynomial \smath{p}) +of the variables in the list \smath{lv}. +If a second argument is missing, \smath{lv} is defined +to be all the variables appearing in \smath{p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{totalfract}}\opLeftPren{}{\it polynomial}\opRightPren{}% +}% +}% +{1}{(PRF)->Record(sup:Polynomial(R), inf:Polynomial(R))}{MPolyCatRationalFunctionFactorizer} +{\smath{\mbox{\bf totalfract}\opLeftPren{}prf\opRightPren{}} takes a polynomial whose coefficients are +themselves fractions of polynomials and returns a record +containing the numerator and denominator resulting from putting +\smath{prf} over a common denominator. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{totalGroebner}}\opLeftPren{}{\it listOfPolynomials}, \allowbreak{}{\it listOfVariables}\opRightPren{}% +}% +}% +{2}{(List(Polynomial(F)), List(Symbol))->List(Polynomial(F))}{PolyGroebner} +{\smath{\mbox{\bf totalGroebner}\opLeftPren{}lp, \allowbreak{} lv\opRightPren{}} computes the Gr\"obner basis for the +\index{Groebner basis@{Gr\protect\"{o}bner basis}} +list of polynomials \smath{lp} with the terms ordered first by +\index{basis!Groebner@{Gr\protect\"{o}bner}} +total degree and then refined by reverse lexicographic ordering. +The variables are ordered by their position in the list +\smath{lv}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tower}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->List(Kernel(\$))}{ExpressionSpace} +{\smath{\mbox{\bf tower}\opLeftPren{}f\opRightPren{}} returns all the kernels appearing in \smath{f}, regardless of level.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{trace}}\opLeftPren{}{\it various}, \allowbreak{}{\it ..}\opRightPren{}% +}% +}% +{1}{(\$)->R}{SquareMatrixCategory} +{\smath{\mbox{\bf trace}\opLeftPren{}m\opRightPren{}} returns the trace of the matrix \smath{m}, that is, the +sum of its diagonal elements. +\newitem\smath{\mbox{\bf trace}\opLeftPren{}a\opRightPren{}} returns the trace of the regular +representation of \smath{a}, +an element of an algebra of finite rank. +See \spadtype{FiniteRankAlgebra}. +\newitem\smath{\mbox{\bf trace}\opLeftPren{}a\optinner{, d}\opRightPren{}}, +where \smath{a} is an element of a finite algebraic extension field, +computes the trace of \smath{a} with respect to the field of +extension degree \smath{d} +over the ground field of size \smath{q}. +This operation calls \spadfun{error} if +\smath{d} does not divide the extension degree of \smath{a}. +The default value of \smath{d} is 1. +Note: \smath{\mbox{\bf trace}\opLeftPren{}a, d) = \sum_{i=0}^{n/d} a^{q^{d i}}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{traceMatrix}}\opLeftPren{}{\it \opt{basis}}\opRightPren{}% +}% +}% +{1}{(Vector(\$))->Matrix(R)}{FiniteRankAlgebra} +{\smath{\mbox{\bf traceMatrix}\opLeftPren{}[v1, \allowbreak{} .., \allowbreak{} vn]\opRightPren{}} is the \smath{n}-by-\smath{n} +matrix +whose \smath{i}, \smath{j} element is \smath{Tr(v_i v_j)}. +If no argument is given, the \smath{v_i} are assumed to be elements +of the fixed basis. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tracePowMod}}\opLeftPren{}{\it poly}, \allowbreak{}{\it nonNegativeInteger}, \allowbreak{}{\it poly}\opRightPren{}% +}% +}% +{3}{(FP, NonNegativeInteger, FP)->FP}{DistinctDegreeFactorize} +{\smath{\mbox{\bf tracePowMod}\opLeftPren{}u, \allowbreak{} k, \allowbreak{} v\opRightPren{}} returns \smath{\sum\nolimits_{i=0}^k +{u^{2^i}}}, all computed modulo the polynomial \smath{v}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{transcendenceDegree}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->NonNegativeInteger}{ExtensionField} +{\smath{\mbox{\bf transcendenceDegree}\opLeftPren{}\opRightPren{}\$F} returns the transcendence degree +of the field extension +\smath{F}, or 0 if the extension is algebraic. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{transcendent?}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{ExtensionField} +{\smath{\mbox{\bf transcendent?}\opLeftPren{}a\opRightPren{}} tests whether an element \smath{a} of +a domain that is an extension field over a ground field \smath{F} +is transcendent +with respect to \smath{F}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{transpose}}\opLeftPren{}{\it matrix\opt{, options}}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{MatrixCategory} +{\smath{\mbox{\bf transpose}\opLeftPren{}m\opRightPren{}} returns the transpose of the matrix \smath{m}. +\newitem +\smath{\mbox{\bf transpose}\opLeftPren{}t\optinner{, i, j}\opRightPren{}} exchanges the \eth{\smath{i}} +and \eth{\smath{j}} indices of \smath{t}. +For example, if \smath{r = {\bf transpose}(t, 2, 3)} for a rank four +tensor \smath{t}, then \smath{r} is the rank four tensor given by +\smath{r(i, j, k, l) = t(i, k, j, l)}. +If \smath{i} and \smath{j} are not given, they are assumed the +first and last index of \smath{t}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tree}}\opLeftPren{}{\it value\opt{, listOfChildren}}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{MatrixCategory} +{\smath{\mbox{\bf tree}\opLeftPren{}x, \allowbreak{} ls\opRightPren{}} creates an element of \spadtype{Tree} with +value \smath{x} at the root node, and immediate children \spad{ls} +in left-to-right order. +\newitem +\smath{\mbox{\bf tree}\opLeftPren{}x\opRightPren{}} is equivalent to \smath{\mbox{\bf tree}\opLeftPren{}x, \allowbreak{} []\$List(S)\opRightPren{}} where +\spad{x} has type \spad{S}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{trapezoidal}}\opLeftPren{}{\it floatFunction}, \allowbreak{}{\it fourFloats}, \allowbreak{}{\it threeIntegers}\opRightPren{}% +\optand \mbox{\axiomFun{trapezoidalClosed}}\opLeftPren{}{\it floatFunction}, \allowbreak{}{\it fourFloats}, \allowbreak{}{\it twoIntegers}\opRightPren{}% +\opand \mbox{\axiomFun{trapezoidalOpen}}\opLeftPren{}{\it floatFunction}, \allowbreak{}{\it fourFloats}, \allowbreak{}{\it twoIntegers}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf trapezoidal}\opLeftPren{}fn, \allowbreak{} a, \allowbreak{} b, \allowbreak{} epsrel, \allowbreak{} epsabs, \allowbreak{} nmin, \allowbreak{} nmax, \allowbreak{} nint\opRightPren{}} +uses the adaptive trapezoidal method to numerically integrate +function \smath{fn} over the closed interval from \smath{a} to +\smath{b}, with relative accuracy \smath{epsrel} and absolute +accuracy \smath{epsabs}, where the refinement levels for the +checking of convergence vary from \smath{nmin} to \smath{nmax}. +The method is called ``adaptive'' since it requires an additional +parameter \smath{nint} giving the number of subintervals over +which the integrator independently applies the convergence +criteria using \smath{nmin} and \smath{nmax}; this is useful when +a large number of points are needed only in a small fraction of +the entire interval. +Parameter \smath{fn} is a function of type \spadsig{Float}{Float}; +\smath{a}, \smath{b}, \smath{epsrel}, and \smath{epsabs} are +floats; \smath{nmin}, \smath{nmax}, and \smath{nint} are integers. +The operation returns a record containing: {\tt value}, an +estimate of the integral; {\tt error}, an estimate of the error in +the computation; {\tt totalpts}, the total integral number of +function evaluations, and {\tt success}, a boolean value that is +\smath{true} if the integral was computed within the user +specified error criterion. +See \spadtype{NumericalQuadrature} for details. +\bigitem\smath{trapezoidalClosed(fn, a, b, epsrel, epsabs, nmin, +nmax)} similarly uses the trapezoidal method to numerically +\index{trapezoidal method} +integrate function \smath{fn} over the closed interval \smath{a} +to \smath{b}, but is not adaptive. +\bigitem\smath{trapezoidalOpen(fn, a, b, epsrel, epsabs, nmin, +nmax)} is similar to \spadfun{trapezoidalClosed}, except that +it integrates function \smath{fn} over the open interval from +\smath{a} to \smath{b}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{triangularSystems}}\opLeftPren{}{\it listOfFractions}, \allowbreak{}{\it listOfSymbols}\opRightPren{}% +}% +}% +{2}{(List(Fraction(Polynomial(R))), List(Symbol))->List(List(Polynomial(R)))}{SystemSolvePackage} +{\smath{\mbox{\bf triangularSystems}\opLeftPren{}lf, \allowbreak{} lv\opRightPren{}} solves the system of equations +defined by +\smath{lf} with respect to the list of symbols \smath{lv}; the +system of equations is obtaining by equating to zero the list of +rational functions \smath{lf}. +The result is a list of solutions where each solution is expressed +as a ``reduced'' triangular system of polynomials. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{trigs}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(F)->F}{TrigonometricManipulations} +{\smath{\mbox{\bf trigs}\opLeftPren{}f\opRightPren{}} rewrites all the complex logs and exponentials +appearing in \smath{f} in terms of trigonometric functions. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{trim}}\opLeftPren{}{\it string}, \allowbreak{}{\it characterOrCharacterClass}\opRightPren{}% +}% +}% +{2}{(\$, Character)->\$}{StringAggregate} +{\smath{\mbox{\bf trim}\opLeftPren{}s, \allowbreak{} c\opRightPren{}} returns \smath{s} with all characters \smath{c} +deleted from right and left ends. +For example, \code{trim(" abc ", char " ")} returns +\code{"abc"}. +Argument \smath{c} may also be a character class, in which case +\smath{s} is returned with all characters in \smath{cc} deleted +from right and left ends. +For example, \code{trim("(abc)", charClass "()")} returns +\spad{"abc"}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{truncate}}\opLeftPren{}{\it various\opt{, options}}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{RealNumberSystem} +{\smath{\mbox{\bf truncate}\opLeftPren{}x\opRightPren{}} returns the integer between \smath{x} and 0 +closest to \smath{x}. +\newitem +\smath{\mbox{\bf truncate}\opLeftPren{}f, \allowbreak{} m\optinner{, n}\opRightPren{}} returns a (finite) power series +consisting of the sum of all terms of \smath{f} of degree +\smath{d} with \smath{n \leq d \leq m}. +Upper bound \smath{m} is \smath{\infty} by default. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tubePoints}}\opLeftPren{}{\it positiveInteger}\opRightPren{}% +}% +}% +{1}{(PositiveInteger)->\$}{DrawOption} +{\smath{\mbox{\bf tubePoints}\opLeftPren{}n\opRightPren{}} specifies the number of points, \smath{n}, +defining the circle that creates the tube around a \threedim{} +curve. +The default is 6. +This option is expressed in the form \code{tubePoints == n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tubePointsDefault}}\opLeftPren{}{\it \opt{positiveInteger}}\opRightPren{}% +}% +}% +{1}{(PositiveInteger)->PositiveInteger}{ViewDefaultsPackage} +{\smath{\mbox{\bf tubePointsDefault}\opLeftPren{}i\opRightPren{}} sets the number of points to use +when creating the circle to be used in creating a \threedim{} tube +plot to \smath{i}. +\newitem +\smath{\mbox{\bf tubePointsDefault}\opLeftPren{}\opRightPren{}} returns the number of points to be +used when creating the circle to be used in creating a \threedim{} +tube plot. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tubeRadius}}\opLeftPren{}{\it float}\opRightPren{}% +}% +}% +{1}{(Float)->\$}{DrawOption} +{\smath{\mbox{\bf tubeRadius}\opLeftPren{}r\opRightPren{}} specifies a radius \smath{r} for a tube +plot around a \threedim{} curve. +This operation may be expressed as an option +to the \spadfun{draw} command in the form \code{tubeRadius == r}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{tubeRadiusDefault}}\opLeftPren{}{\it \opt{float}}\opRightPren{}% +}% +}% +{0}{()->DoubleFloat}{ViewDefaultsPackage} +{\smath{\mbox{\bf tubeRadiusDefault}\opLeftPren{}r\opRightPren{}} sets the default radius for a +\threedim{} tube plot to \smath{r}. +\newitem +\smath{\mbox{\bf tubeRadiusDefault}\opLeftPren{}\opRightPren{}} returns the radius used for a +\threedim{} tube plot. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{twist}}\opLeftPren{}\opRightPren{}% +}% +}% +{ ((A, B)->C) -> ((B, A)->C)}{}{} +{\smath{\mbox{\bf twist}\opLeftPren{}f\opRightPren{}}, +where \smath{f} is a function of type \smath{(A, B)}{C}, +is the function \smath{g} such that \smath{g(a, b)= f(b, a)}. +See \spadtype{MappingPackage} for related functions. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{unary?}}\opLeftPren{}{\it basicOperator}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{BasicOperator} +{\smath{\mbox{\bf unary?}\opLeftPren{}op\opRightPren{}} tests if basic operator \smath{op} is unary, +that is, takes exactly one argument. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{union}}\opLeftPren{}{\it set}, \allowbreak{}{\it elementOrSet}\opRightPren{}% +}% +}% +{2}{(\$, S)->\$}{SetAggregate} +{\smath{\mbox{\bf union}\opLeftPren{}u, \allowbreak{} x\opRightPren{}} returns the set aggregate \smath{u} with the +element \smath{x} added. +If \smath{u} already contains \smath{x}, \smath{\mbox{\bf union}\opLeftPren{}u, \allowbreak{} x\opRightPren{}} +returns a copy of \smath{x}. +\newitem +\smath{\mbox{\bf union}\opLeftPren{}u, \allowbreak{} v\opRightPren{}} returns the set aggregate of elements that are +members of either set aggregate \smath{u} or \smath{v}. +See also \axiomType{Multiset}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{unit}}\opLeftPren{}{\it \opt{various}}\opRightPren{}% +}% +}% +{1}{(\$)->R}{Factored} +{\smath{\mbox{\bf unit}\opLeftPren{}\opRightPren{}} returns a unit of the algebra (necessarily +unique), or \mbox{\tt "failed"} if there is none. +\newitem +\smath{\mbox{\bf unit}\opLeftPren{}u\opRightPren{}} extracts the unit part of the factored object +\smath{u}. +\newitem +\smath{\mbox{\bf unit}\opLeftPren{}l\opRightPren{}} marks off the units on a viewport according to +the indicated list \smath{l}. +This option is expressed in the draw command in the form +\smath{{\tt unit ==} [f_1, f_2]}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{unit?}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{IntegralDomain} +{\smath{\mbox{\bf unit?}\opLeftPren{}x\opRightPren{}} tests whether \smath{x} is a unit, that is, if +\smath{x} is invertible. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{unitCanonical}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{IntegralDomain} +{\smath{\mbox{\bf unitCanonical}\opLeftPren{}x\opRightPren{}} returns \smath{\mbox{\bf unitNormal}\opLeftPren{}x).{canonical}}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{unitNormalize}}\opLeftPren{}{\it factored}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{Factored} +{\smath{\mbox{\bf unitNormalize}\opLeftPren{}u\opRightPren{}} normalizes the unit part of the +factorization. +For example, when working with factored integers, this operation +ensures that the bases are all positive integers. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{unitNormal}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Record(unit:\$, canonical:\$, associate:\$)}{IntegralDomain} +{\smath{\mbox{\bf unitNormal}\opLeftPren{}x\opRightPren{}} tries to choose a canonical element from +the associate class of \smath{x}. +If successful, it returns a record with three components +``unit'', ``canonical'' and ``associate''. +The attribute \spadatt{canonicalUnitNormal}, if asserted, means +that the ``canonical'' element is the same across all associates +of \smath{x}. +If \smath{\mbox{\bf unitNormal}\opLeftPren{}x) = [u, c, a]} then \smath{ux = c}, +\smath{au = 1}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{unitsColorDefault}}\opLeftPren{}{\it \opt{palette}}\opRightPren{}% +}% +}% +{0}{()->Palette}{ViewDefaultsPackage} +{\smath{\mbox{\bf unitsColorDefault}\opLeftPren{}p\opRightPren{}} sets the default color of the unit +ticks in a \twodim{} viewport to the palette \smath{p}. +\newitem +\smath{\mbox{\bf unitsColorDefault}\opLeftPren{}\opRightPren{}} returns the default color of the unit +ticks in a \twodim{} viewport. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{unitVector}}\opLeftPren{}{\it positiveInteger}\opRightPren{}% +}% +}% +{1}{(PositiveInteger)->\$}{DirectProductCategory} +{\smath{\mbox{\bf unitVector}\opLeftPren{}n\opRightPren{}} produces a vector with 1 in position +\smath{n} and zero elsewhere. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{univariate}}\opLeftPren{}{\it polynomial\opt{, variable}}\opRightPren{}% +}% +}% +{1}{(\$)->SparseUnivariatePolynomial(R)}{PolynomialCategory} +{\smath{\mbox{\bf univariate}\opLeftPren{}p\optinner{, v}\opRightPren{}} converts the multivariate +polynomial \smath{p} into a univariate polynomial in \smath{v} +whose coefficients are multivariate polynomials in all the other +variables. +If \smath{v} is omitted, then \smath{p} must involve exactly one variable. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{universe}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{FiniteSetAggregate} +{\smath{\mbox{\bf universe}\opLeftPren{}\opRightPren{}}\$\smath{R} returns the universal set for +finite set aggregate \smath{R}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{unparse}}\opLeftPren{}{\it inputForm}\opRightPren{}% +}% +}% +{ $ -> String}{}{} +{\smath{\mbox{\bf unparse}\opLeftPren{}f\opRightPren{}} returns a string \smath{s} such that the parser +would transform \smath{s} to \smath{f}, or +calls \spadfun{error} if \smath{f} is +not the parsed form of a string. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{unrankImproperPartitions0}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{3}{(Integer, Integer, Integer)->List(Integer)}{SymmetricGroupCombinatoricFunctions} +{\smath{\mbox{\bf unrankImproperPartitions0}\opLeftPren{}n, \allowbreak{} m, \allowbreak{} k\opRightPren{}} computes the +\eth{\smath{k}} improper partition of nonnegative \smath{n} in +\smath{m} nonnegative parts in reverse lexicographical order. +Example: \smath{ [0, 0, 3] < [0, 1, 2] < [0, 2, 1] < [0, 3, 0] < [1, 0, 2] < +[1, 1, 1] < [1, 2, 0] < [2, 0, 1] < [2, 1, 0] < [3, 0, 0]}. +The operation calls \spadfun{error} if \smath{k} is negative or +too big. +Note: counting of subtrees is done by +\spadfunFrom{numberOfImproperPartitions}{SymmetricGroupCombinatoricFunctions}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{unrankImproperPartitions1}}\opLeftPren{}{\it integer}, \allowbreak{}{\it integer}, \allowbreak{}{\it integer}\opRightPren{}% +}% +}% +{3}{(Integer, Integer, Integer)->List(Integer)}{SymmetricGroupCombinatoricFunctions} +{\smath{\mbox{\bf unrankImproperPartitions1}\opLeftPren{}n, \allowbreak{} m, \allowbreak{} k\opRightPren{}} computes the +\eth{\smath{k}} improper partition of nonnegative \smath{n} in at most +\smath{m} nonnegative parts ordered as follows: first, in reverse +lexicographical order according to their non-zero parts, then +according to their positions (\spadignore{i.e.} +lexicographical order using \smath{subSet}: \smath{[3, 0, 0] < [0, 3, 0] +< [0, 0, 3] < [2, 1, 0] < [2, 0, 1] < [0, 2, 1] < [1, 2, 0] < [1, 0, 2] < +[0, 1, 2] < [1, 1, 1]}). +Note: counting of subtrees is done by +\spadfun{numberOfImproperPartitionsInternal}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{unravel}}\opLeftPren{}{\it listOfElement}\opRightPren{}% +}% +}% +{1}{(List(R))->\$}{CartesianTensor} +{\smath{\mbox{\bf unravel}\opLeftPren{}t\opRightPren{}} produces a tensor from a list of components such that +\smath{\mbox{\bf unravel}\opLeftPren{}{\bf ravel}(t)) = t}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{upperCase}}\opLeftPren{}{\it string}\opRightPren{}% + \optand \mbox{\axiomFun{upperCase?}}\opLeftPren{}{\it string}\opRightPren{}% + \opand \mbox{\axiomFun{upperCase!}}\opLeftPren{}{\it string}\opRightPren{}% +}% +}% +{1}{(\$)->\$}{StringAggregate} +{\smath{\mbox{\bf upperCase!}\opLeftPren{}s\opRightPren{}} destructively replaces the alphabetic +characters in \smath{s} by upper case characters. +\newitem +\smath{\mbox{\bf upperCase}\opLeftPren{}\opRightPren{}} returns the class of all characters for which +\spadfunFrom{upperCase?}{Character} is \smath{true}. +\newitem +\smath{\mbox{\bf upperCase}\opLeftPren{}c\opRightPren{}} converts a lower case letter +\smath{c} to the corresponding upper case letter. +If \smath{c} is not a lower case letter, then it is returned +unchanged. +\newitem +\smath{\mbox{\bf upperCase}\opLeftPren{}s\opRightPren{}} returns the string with all characters in +upper case. +\newitem +\smath{\mbox{\bf upperCase?}\opLeftPren{}c\opRightPren{}} tests if \smath{c} is an upper case letter, +that is, one of A..\smath{Z}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{validExponential}}\opLeftPren{}{\it listOfKernels}, \allowbreak{}{\it expression}, \allowbreak{}{\it symbol}\opRightPren{}% +}% +}% +{3}{(List(Kernel(F)), F, Symbol)->Union(F, "failed")}{ElementaryFunctionStructurePackage} +{\smath{\mbox{\bf validExponential}\opLeftPren{}[k_1, \allowbreak{} \ldots, k_n], f, x\opRightPren{}} returns \smath{g} +if \smath{\mbox{\bf exp}\opLeftPren{}f)=g} and \smath{g} involves only +\smath{k_1\ldots{}k_n}, and \mbox{\tt "failed"} otherwise. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{value}}\opLeftPren{}{\it recursiveAggregate}\opRightPren{}% +}% +}% +{1}{(\$)->S}{RecursiveAggregate} +{\smath{\mbox{\bf value}\opLeftPren{}a\opRightPren{}} returns the ``value'' part of a recursive +aggregate \spad{a}, typically the root of tree. +See, for example, \spadtype{BinaryTree}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{var1Steps}}\opLeftPren{}{\it positiveInteger}\opRightPren{}% +}% +}% +{1}{(PositiveInteger)->\$}{DrawOption} +{\smath{\mbox{\bf var1Steps}\opLeftPren{}n\opRightPren{}} indicates the number of subdivisions +\smath{n} of the first range variable. +This command may be expressed as an option +to the \spadfun{draw} command in the form \smath{{\bf var1Steps}== n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{var1StepsDefault}}\opLeftPren{}{\it \opt{positiveInteger}}\opRightPren{}% +}% +}% +{0}{()->PositiveInteger}{ViewDefaultsPackage} +{\smath{\mbox{\bf var1StepsDefault}\opLeftPren{}\opRightPren{}} returns the current setting for the +number of steps to take when creating a \threedim{} mesh in the +direction of the first defined free variable (a free variable is +considered defined when its range is specified (that is, +\smath{x=0}..10)). +\newitem +\smath{\mbox{\bf var1StepsDefault}\opLeftPren{}i\opRightPren{}} sets the number of steps to take when +creating a \threedim{} mesh in the direction of the first defined +free variable to \smath{i} (a free variable is considered defined +when its range is specified (that is, \smath{x=0}..10)). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{var2Steps}}\opLeftPren{}{\it positiveInteger}\opRightPren{}% +}% +}% +{1}{(PositiveInteger)->\$}{DrawOption} +{\smath{\mbox{\bf var2Steps}\opLeftPren{}n\opRightPren{}} indicates the number of subdivisions, +\smath{n}, of the second range variable. +This option is expressed in the form \smath{{\bf var2Steps} == n}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{var2StepsDefault}}\opLeftPren{}{\it \opt{positiveInteger}}\opRightPren{}% +}% +}% +{()->PositiveInteger}{ViewDefaultsPackage} +{\smath{\mbox{\bf var2StepsDefault}\opLeftPren{}\opRightPren{}} is the current setting for the number +of steps to take when creating a \threedim{} mesh in the direction +of the first defined free variable (a free variable is considered +defined when its range is specified (that is, \smath{x=0}..10)). +\newitem +\smath{\mbox{\bf var2StepsDefault}\opLeftPren{}i\opRightPren{}} sets the number of steps to take when +creating a \threedim{} mesh in the direction of the first defined +free variable to \smath{i} (a free variable is considered defined +when its range is specified (that is, \smath{x=0}..10)). +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{variable}}\opLeftPren{}{\it various}\opRightPren{}% +}% +}% +{1}{(\$)->Symbol}{UnivariatePowerSeriesCategory} +{\smath{\mbox{\bf variable}\opLeftPren{}f\opRightPren{}} returns the (unique) power series variable of +the power series \smath{f}. +\newitem +\smath{\mbox{\bf variable}\opLeftPren{}segb\opRightPren{}} returns the variable from the left hand +side of the \spadtype{SegmentBinding} \smath{segb}. +For example, if \smath{segb} is \smath{v=a..b}, then +\smath{\mbox{\bf variable}\opLeftPren{}segb\opRightPren{}} returns \smath{v}. +\newitem +\smath{\mbox{\bf variable}\opLeftPren{}v\opRightPren{}} returns \smath{s} if \smath{v} is any +derivative of the differential indeterminate \smath{s}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{variables}}\opLeftPren{}{\it expression}\opRightPren{}% +}% +}% +{1}{(\$)->List(Symbol)}{FunctionSpace} +{\smath{\mbox{\bf variables}\opLeftPren{}f\opRightPren{}} returns the list of all the variables of +expression, polynomial, rational function, or power series \smath{f}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{vconcat}}\opLeftPren{}{\it outputForms\opt{, OutputForm} (normally unexposed)}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf vconcat}\opLeftPren{}o_1, \allowbreak{} o_2\opRightPren{}}, where \smath{o_1} and \smath{o_2} are +objects of type \spadtype{OutputForm} (normally unexposed), +returns an output form for the vertical concatenation of forms +\smath{o_1} and \smath{o_2}. +\newitem +\smath{\mbox{\bf vconcat}\opLeftPren{}lo\opRightPren{}}, where \smath{lo} is a list of objects of type +\spadtype{OutputForm} (normally unexposed), returns an output form +for the vertical concatenation of the elements of \smath{lo}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{vector}}\opLeftPren{}{\it listOfElements}\opRightPren{}% +}% +}% +{1}{(List(R))->\$}{Vector} +{\smath{\mbox{\bf vector}\opLeftPren{}l\opRightPren{}} converts the list \smath{l} to a vector. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{vectorise}}\opLeftPren{}{\it polynomial}, \allowbreak{}{\it nonNegativeInteger}\opRightPren{}% +}% +}% +{2}{(\$, NonNegativeInteger)->Vector(R)}{UnivariatePolynomialCategory} +{\smath{\mbox{\bf vectorise}\opLeftPren{}p, \allowbreak{} n\opRightPren{}} returns \smath{[a_0, \ldots, a_{n-1}]} +where \smath{p = a_0 + a_1 x + \cdots + a_{n-1} x^{n-1}} + higher +order terms. +The degree of polynomial \smath{p} can be different from +\smath{n-1}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{vertConcat}}\opLeftPren{}{\it matrix}, \allowbreak{}{\it matrix}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{MatrixCategory} +{\smath{\mbox{\bf vertConcat}\opLeftPren{}x, \allowbreak{} y\opRightPren{}} vertically concatenates two matrices with an +equal number of columns. +The entries of \smath{y} appear below the entries of \smath{x}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{viewDefaults}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->Void}{ViewDefaultsPackage} +{\smath{\mbox{\bf viewDefaults}\opLeftPren{}\opRightPren{}} resets all the default graphics settings. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{viewPosDefault}}\opLeftPren{}{\it \opt{listOfNonNegativeIntegers}}\opRightPren{}% +}% +}% +{1}{(List(NonNegativeInteger))->List(NonNegativeInteger)}{ViewDefaultsPackage} +{\smath{\mbox{\bf viewPosDefault}\opLeftPren{}[x, \allowbreak{} y]\opRightPren{}} sets the default \smath{X} and +\smath{Y} position of a viewport window. +Unless overridden explicitly, newly created viewports will have the +\smath{X} and \smath{Y} coordinates \smath{x}, \smath{y}. +\newitem +\smath{\mbox{\bf viewPosDefault}\opLeftPren{}\opRightPren{}} returns the default \smath{X} and +\smath{Y} position of a viewport window unless overridden +explicitly, newly created viewports will have these \smath{X} and +\smath{Y} coordinate. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{viewSizeDefault}}\opLeftPren{}{\it \opt{listOfPositiveIntegers}}\opRightPren{}% +}% +}% +{1}{(List(PositiveInteger))->List(PositiveInteger)}{ViewDefaultsPackage} +{\smath{\mbox{\bf viewSizeDefault}\opLeftPren{}[w, \allowbreak{} h]\opRightPren{}} sets the default viewport width to \smath{w} and height to \smath{h}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{viewWriteAvailable}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->List(String)}{ViewDefaultsPackage} +{\smath{\mbox{\bf viewWriteAvailable}\opLeftPren{}\opRightPren{}} returns a list of available methods for writing, such as BITMAP, POSTSCRIPT, etc. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{viewWriteDefault}}\opLeftPren{}{\it listOfStrings}\opRightPren{}% +}% +}% +{0}{()->List(String)}{ViewDefaultsPackage} +{\smath{\mbox{\bf viewWriteDefault}\opLeftPren{}\opRightPren{}} returns the list of things to write in +a viewport data file; a viewAlone file is always generated. +\newitem +\smath{\mbox{\bf viewWriteDefault}\opLeftPren{}l\opRightPren{}} sets the default list of things to +write in a viewport data file to the strings in \smath{l}; a +viewAlone file is always generated. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{void}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{Void} +{\smath{\mbox{\bf void}\opLeftPren{}\opRightPren{}} produces a void object. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{weakBiRank}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(A)->NonNegativeInteger}{AlgebraPackage} +{\smath{\mbox{\bf weakBiRank}\opLeftPren{}x\opRightPren{}} determines the number of linearly +independent elements in the \smath{b_i x b_j}, \smath{i, j=1, +\ldots, n}, where \smath{b=[b_1, \ldots, b_n]} is the fixed basis of +a domain of category \spadtype{FramedNonAssociativeAlgebra}.} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{weight}}\opLeftPren{}{\it u}\opRightPren{}% +}% +}% +{1}{(\$)->NonNegativeInteger}{DifferentialPolynomialCategory} +{\smath{\mbox{\bf weight}\opLeftPren{}u\opRightPren{}} returns +\begin{simpleList} +\item if u is a differential polynomial: the maximum weight of all +differential monomials appearing in the differential polynomial +\smath{u}. +\item if u is a derivative: +the weight of the derivative \smath{u}. +\item if u is a basic operator: the weight attached to \smath{u}. +\end{simpleList} +\smath{\mbox{\bf weight}\opLeftPren{}p, \allowbreak{} s\opRightPren{}} returns the maximum weight of all differential monomials appearing in the differential polynomial \smath{p} when \smath{p} is viewed as a differential polynomial in the differential indeterminate \smath{s} alone. +\newitem +\smath{\mbox{\bf weight}\opLeftPren{}op, \allowbreak{} n\opRightPren{}} attaches the weight \smath{n} to \smath{op}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{weights}}\opLeftPren{}{\it differentialPolynomial}, \allowbreak{}{\it differentialIndeterminated}\opRightPren{}% +}% +}% +{2}{(\$, S)->List(NonNegativeInteger)}{DifferentialPolynomialCategory} +{\smath{\mbox{\bf weights}\opLeftPren{}p, \allowbreak{} s\opRightPren{}} returns a list of weights of differential +monomials appearing in the differential polynomial \smath{p} when +\smath{p} is viewed as a differential polynomial in the +differential indeterminate \smath{s} alone. +If \smath{s} is missing, a list of weights of differential +monomials appearing in differential polynomial \smath{p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{whatInfinity}}\opLeftPren{}{\it orderedCompletion}\opRightPren{}% +}% +}% +{1}{(\$)->SingleInteger}{OrderedCompletion} +{\smath{\mbox{\bf whatInfinity}\opLeftPren{}x\opRightPren{}} returns 0 if \smath{x} is finite, 1 if +\smath{x} is \smath{\infty}, and \smath{-1} if \smath{x} is +\smath{-\infty}. +} + + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{wholePart}}\opLeftPren{}{\it various}\opRightPren{}% +}% +}% +{1}{(\$)->R}{ContinuedFraction} +{\smath{\mbox{\bf wholePart}\opLeftPren{}x\opRightPren{}} returns the whole part of the fraction +\smath{x}, that is, +the truncated quotient of the numerator by the denominator. +\newitem +\smath{\mbox{\bf wholePart}\opLeftPren{}x\opRightPren{}} extracts the whole part of \smath{x}. +That is, +if \smath{x = {\bf continuedFraction}(b_0, [a_1, a_2, \ldots], [b_1, b_2, \ldots])}, +then \smath{\mbox{\bf wholePart}\opLeftPren{}x) = b_0}. +\newitem +\smath{\mbox{\bf wholePart}\opLeftPren{}p\opRightPren{}} extracts the whole part of the partial +fraction \smath{p}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{wholeRadix}}\opLeftPren{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{1}{(List(Integer))->\$}{RadixExpansion} +{\smath{\mbox{\bf wholeRadix}\opLeftPren{}l\opRightPren{}} creates an integral radix expansion from a +list of ragits. +For example, \smath{\mbox{\bf wholeRadix}\opLeftPren{}[1, \allowbreak{} 3, \allowbreak{} 4]\opRightPren{}} returns \smath{134}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{wholeRagits}}\opLeftPren{}{\it listOfIntegers}\opRightPren{}% +}% +}% +{1}{(\$)->List(Integer)}{RadixExpansion} +{\smath{\mbox{\bf wholeRagits}\opLeftPren{}rx\opRightPren{}} returns the ragits of the integer part of +a radix expansion. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{wordInGenerators}}\opLeftPren{}{\it permutation}, \allowbreak{}{\it permutationGroup}\opRightPren{}% +}% +}% +{2}{(Permutation(S), \$)->List(NonNegativeInteger)}{PermutationGroup} +{\smath{\mbox{\bf wordInGenerators}\opLeftPren{}p, \allowbreak{} gp\opRightPren{}} returns the word for the +permutation \smath{p} in the original generators of the +permutation group {\it gp}, represented by the indices of the +list, given by \spadfun{generators}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{wordInStrongGenerators}}\opLeftPren{}{\it permutation}, \allowbreak{}{\it permutationGroup}\opRightPren{}% +}% +}% +{2}{(Permutation(S), \$)->List(NonNegativeInteger)}{PermutationGroup} +{\smath{\mbox{\bf wordInStrongGenerators}\opLeftPren{}p, \allowbreak{} gp\opRightPren{}} returns the word for the +permutation \smath{p} in the strong generators of the permutation +group {\it gp}, represented by the indices of the list, given by +\spadfun{strongGenerators}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{wordsForStrongGenerators}}\opLeftPren{}{\it listOfListsOfIntegers}\opRightPren{}% +}% +}% +{1}{(\$)->List(List(NonNegativeInteger))}{PermutationGroup} +{\smath{\mbox{\bf wordsForStrongGenerators}\opLeftPren{}gp\opRightPren{}} returns the words for the +strong generators +of the permutation group {\it gp} in the original generators of {\it gp}, +represented by their indices in the list of nonnegative integers, +given by \spadfun{generators}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{wreath}}\opLeftPren{}{\it symmetricPolynomial}, \allowbreak{}{\it symmetricPolynomial}\opRightPren{}% +}% +}% +{ (SPOL RN, SPOL RN) -> SPOL RN}{}{} +{\smath{\mbox{\bf wreath}\opLeftPren{}s_1, \allowbreak{} s_2\opRightPren{}} is the cycle index of the wreath product +of the two groups whose cycle indices are \smath{s_1} and +\smath{s_2}, symmetric polynomials with rational number +coefficients. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{writable?}}\opLeftPren{}{\it file}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{FileNameCategory} +{\smath{\mbox{\bf writable?}\opLeftPren{}f\opRightPren{}} tests if the named file can be opened for +writing. +The named file need not already exist. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{write!}}\opLeftPren{}{\it file}, \allowbreak{}{\it value}\opRightPren{}% +}% +}% +{2}{(\$, S)->S}{FileCategory} +{\smath{\mbox{\bf write!}\opLeftPren{}f, \allowbreak{} s\opRightPren{}} puts the value \smath{s} into the file \smath{f}. +The state of \smath{f} is modified so that subsequent +calls to {\bf write!} will append values to the end of the +file. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{writeLine!}}\opLeftPren{}{\it textfile\opt{, string}}\opRightPren{}% +}% +}% +{1}{(\$)->String}{TextFile} +{\smath{\mbox{\bf writeLine!}\opLeftPren{}f\opRightPren{}} finishes the current line in the file +\smath{f}. +An empty string is returned. +The call \smath{\mbox{\bf writeLine!}\opLeftPren{}f\opRightPren{}} is equivalent to +\smath{\mbox{\bf writeLine!}\opLeftPren{}f, \allowbreak{} {\tt ""}\opRightPren{}}. +\newitem +\smath{\mbox{\bf writeLine!}\opLeftPren{}f, \allowbreak{} s\opRightPren{}} writes the contents of the string +\smath{s} and finishes the current line in the file \smath{f}. +The value of \smath{s} is returned. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{xor}}\opLeftPren{}{\it boolean}, \allowbreak{}{\it boolean}\opRightPren{}% +}% +}% +{2}{(\$, \$)->\$}{BitAggregate} +{\smath{\mbox{\bf xor}\opLeftPren{}a, \allowbreak{} b\opRightPren{}} returns the logical {\it exclusive-or} of +booleans or bit aggregates \smath{a} and \smath{b}. +\newitem +\smath{\mbox{\bf xor}\opLeftPren{}n, \allowbreak{} m\opRightPren{}} returns the bit-by-bit logical {\it xor} of the +small integers \smath{n} and \smath{m}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{xRange}}\opLeftPren{}{\it curve}\opRightPren{}% +}% +}% +{1}{(\$)->Segment(DoubleFloat)}{PlottablePlaneCurveCategory} +{\smath{\mbox{\bf xRange}\opLeftPren{}c\opRightPren{}} returns the range of the \smath{x}-coordinates +of the points on the curve \smath{c}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{yCoordinates}}\opLeftPren{}{\it function}\opRightPren{}% +}% +}% +{1}{(\$)->Record(num:Vector(UP), den:UP)}{FunctionFieldCategory} +{\smath{\mbox{\bf yCoordinates}\opLeftPren{}f\opRightPren{}}, +where \smath{f} is a function defined over a curve, +returns the coordinates of \smath{f} with +respect to the natural basis for the curve. +Specifically, the operation returns +\smath{[[a_1, \ldots, a_n], d]} such that \smath{f = (a_1 +\ldots+ a_n y^{n-1}) / d}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{yellow}}\opLeftPren{}\opRightPren{}% +}% +}% +{0}{()->\$}{Color} +{\smath{\mbox{\bf yellow}\opLeftPren{}\opRightPren{}} returns the position of the yellow hue from +total hues. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{youngGroup}}\opLeftPren{}{\it various}\opRightPren{}% +}% +}% +{1}{(List(Integer))->PermutationGroup(Integer)}{PermutationGroupExamples} +{\smath{\mbox{\bf youngGroup}\opLeftPren{}[n_1, \allowbreak{} \ldots, n_k]\opRightPren{}} constructs the direct +product of the +symmetric groups \smath{Sn_1}, \ldots, \smath{Sn_k}. +\newitem +\smath{\mbox{\bf youngGroup}\opLeftPren{}lambda\opRightPren{}} constructs the direct product of the +symmetric groups given by the parts of the partition {\it lambda}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{yRange}}\opLeftPren{}{\it curve}\opRightPren{}% +}% +}% +{1}{(\$)->Segment(DoubleFloat)}{PlottablePlaneCurveCategory} +{\smath{\mbox{\bf yRange}\opLeftPren{}c\opRightPren{}} returns the range of the \smath{y}-coordinates +of the points on the curve \smath{c}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{zag}}\opLeftPren{}{\it outputForm}, \allowbreak{}{\it outputForm}\opRightPren{}% +}% +}% +{}{}{} +{\smath{\mbox{\bf zag}\opLeftPren{}o_1, \allowbreak{} o_2\opRightPren{}}, +where \smath{o_1} and \smath{o_2} are objects of type \spadtype{OutputForm} (normally unexposed), +return an output form displaying +the continued fraction form for \smath{o_2} over \smath{o_1}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{zero}}\opLeftPren{}{\it nonNegativeInteger\opt{, nonNegativeInteger}}\opRightPren{}% +}% +}% +{1}{(NonNegativeInteger)->\$}{VectorCategory} +{\smath{\mbox{\bf zero}\opLeftPren{}n\opRightPren{}} creates a zero vector of length \smath{n}. +\newitem +\smath{\mbox{\bf zero}\opLeftPren{}m, \allowbreak{} n\opRightPren{}} returns an \smath{m}-by-\smath{n} zero matrix. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{zero?}}\opLeftPren{}{\it element}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{AbelianMonoid} +{\smath{\mbox{\bf zero?}\opLeftPren{}x\opRightPren{}} tests if \smath{x} is equal to 0. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{zeroDim?}}\opLeftPren{}{\it ideal}\opRightPren{}% +}% +}% +{1}{(\$)->Boolean}{PolynomialIdeals} +{\smath{\mbox{\bf zeroDim?}\opLeftPren{}I\opRightPren{}} tests if the ideal \smath{I} is zero +dimensional, that is, all its associated primes are maximal. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{zeroDimPrimary?}}\opLeftPren{}{\it ideal}\opRightPren{}% +}% +}% +{1}{(PolynomialIdeals(Fraction(Integer), DirectProduct(nv, NonNegativeInteger), vl, DistributedMultivariatePolynomial(vl, Fraction(Integer))))->Boolean}{IdealDecompositionPackage} +{\smath{\mbox{\bf zeroDimPrimary?}\opLeftPren{}I\opRightPren{}} tests if the ideal \smath{I} is +0-dimensional primary. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{zeroDimPrime?}}\opLeftPren{}{\it ideal}\opRightPren{}% +}% +}% +{1}{(PolynomialIdeals(Fraction(Integer), DirectProduct(nv, NonNegativeInteger), vl, DistributedMultivariatePolynomial(vl, Fraction(Integer))))->Boolean}{IdealDecompositionPackage} +{\smath{\mbox{\bf zeroDimPrime?}\opLeftPren{}I\opRightPren{}} tests if the ideal \smath{I} is a +0-dimensional prime. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{zeroOf}}\opLeftPren{}{\it polynomial\opt{, symbol}}\opRightPren{}% +}% +}% +{2}{(SparseUnivariatePolynomial(\$), Symbol)->\$}{AlgebraicallyClosedField} +{\smath{\mbox{\bf zeroOf}\opLeftPren{}p\optinner{, y}\opRightPren{}} returns \smath{y} such that +\smath{p(y) = 0}. +If possible, \smath{y} is expressed in terms of radicals. +Otherwise it is an implicit algebraic quantity that displays as \smath{'y}. +If no second argument is given, then \smath{p} must have a unique +variable \smath{y}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{zerosOf}}\opLeftPren{}{\it polynomial\opt{, symbol}}\opRightPren{}% +}% +}% +{1}{(Polynomial(\$))->List(\$)}{AlgebraicallyClosedField} +{\smath{\mbox{\bf zerosOf}\opLeftPren{}p, \allowbreak{} y\opRightPren{}} returns \smath{[y_1, \ldots, y_n]} such +that \smath{p(y_i) = 0}. +The \smath{y_i}'s are expressed in radicals if possible. +Otherwise they are implicit algebraic quantities that display as +\smath{y_i}. +The returned symbols \smath{y_1}, \ldots, \smath{y_n} are bound in +the interpreter to respective root values. +If no second argument is given, then \smath{p} must have a unique +variable \smath{y}. +} + +% ---------------------------------------------------------------------- +\opdata{{\mbox{\axiomFun{zRange}}\opLeftPren{}{\it curve}\opRightPren{}% +}% +}% +{1}{(\$)->Segment(DoubleFloat)}{PlottableSpaceCurveCategory} +{\smath{\mbox{\bf zRange}\opLeftPren{}c\opRightPren{}} returns the range of the \smath{z}-coordinates +of the points on the curve \smath{c}. +} +}\onecolumn \setcounter{chapter}{5} % Appendix F \chapter{Programs for AXIOM Images} diff --git a/changelog b/changelog index e37949b..a7723f5 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +20120121 tpd src/axiom-website/patches.html 20120121.01.tpd.patch +20120121 tpd src/doc/axiom.sty fix comments +20120121 tpd src/scripts/tex/axiom.sty fix comments +20120121 tpd books/bookvol0.pamphlet add Appendix E 20120119 tpd src/axiom-website/patches.html 20120119.01.tpd.patch 20120119 tpd books/bookvolbib add wei-jiang reference 20120118 tpd src/axiom-website/patches.html 20120118.01.tpd.patch diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 57ecad7..7530067 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3767,5 +3767,7 @@ src/input/i2e.input demo InputForm to Expression(Integer)
src/input/pasta.input graphics test cases
20120119.01.tpd.patch books/bookvolbib add wei-jiang reference
+20120121.01.tpd.patch +books/bookvol0.pamphlet add Appendix E
diff --git a/src/doc/axiom.sty.pamphlet b/src/doc/axiom.sty.pamphlet index 8909aa6..4cb9235 100644 --- a/src/doc/axiom.sty.pamphlet +++ b/src/doc/axiom.sty.pamphlet @@ -246,7 +246,7 @@ %% uses marks a special variable use %% <>= -\newcommand{\uses}[2]{% e.g. \calls{thisfunc}{specialvar} +\newcommand{\uses}[2]{% e.g. \uses{thisfunc}{specialvar} [#2 p\pageref{#2}]\\% \index{#2!{usedby #1}}% \index{#1!{uses #2}}}% @@ -258,7 +258,7 @@ %% if the called function starts with dollar we need to fake it %% <>= -\newcommand{\callsdollar}[2]{% e.g. \calls{thisfunc}{thatfunc} +\newcommand{\callsdollar}[2]{% e.g. \callsdollar{thisfunc}{thatfunc} [\$#2 p\pageref{#2}]\\% \index{\$#2!{calledby \$#1}}% \index{#1!{calls \$#2}}} @@ -270,7 +270,7 @@ %% if the special variable starts with dollar we need to fake it %% <>= -\newcommand{\usesdollar}[2]{% e.g. \calls{thisfunc}{specialvar} +\newcommand{\usesdollar}[2]{% e.g. \usesdollar{thisfunc}{specialvar} [\$#2 p\pageref{#2}]\\% \index{\${#2}!{usedby #1}}% \index{#1!{uses \${#2}}}} diff --git a/src/scripts/tex/axiom.sty b/src/scripts/tex/axiom.sty index 2b98c05..2b415a2 100644 --- a/src/scripts/tex/axiom.sty +++ b/src/scripts/tex/axiom.sty @@ -91,15 +91,15 @@ [#2 p\pageref{#2}]\\% \index{catches!#1}% \index{#1!catches}} -\newcommand{\uses}[2]{% e.g. \calls{thisfunc}{specialvar} +\newcommand{\uses}[2]{% e.g. \uses{thisfunc}{specialvar} [#2 p\pageref{#2}]\\% \index{#2!{usedby #1}}% \index{#1!{uses #2}}}% -\newcommand{\callsdollar}[2]{% e.g. \calls{thisfunc}{thatfunc} +\newcommand{\callsdollar}[2]{% e.g. \callsdollar{thisfunc}{thatfunc} [\$#2 p\pageref{#2}]\\% \index{\$#2!{calledby \$#1}}% \index{#1!{calls \$#2}}} -\newcommand{\usesdollar}[2]{% e.g. \calls{thisfunc}{specialvar} +\newcommand{\usesdollar}[2]{% e.g. \usesdollar{thisfunc}{specialvar} [\$#2 p\pageref{#2}]\\% \index{\${#2}!{usedby #1}}% \index{#1!{uses \${#2}}}}