diff --git a/books/Makefile.pamphlet b/books/Makefile.pamphlet index 621d35f..b8b8dd5 100644 --- a/books/Makefile.pamphlet +++ b/books/Makefile.pamphlet @@ -24,9 +24,9 @@ RM=rm -f BOOKS=${PDF}/bookvol0.pdf ${PDF}/bookvol1.pdf ${PDF}/bookvol2.pdf \ ${PDF}/bookvol3.pdf ${PDF}/bookvol4.pdf ${PDF}/bookvol5.pdf \ - ${PDF}/bookvol6.pdf ${PDF}/bookvol7.pdf ${PDF}/bookvol8.pdf \ - ${PDF}/bookvol9.pdf ${PDF}/bookvol10.pdf ${PDF}/bookvol11.pdf \ - ${PDF}/bookvol12.pdf + ${PDF}/bookvol6.pdf ${PDF}/bookvol7.pdf ${PDF}/bookvol7.1.pdf \ + ${PDF}/bookvol8.pdf ${PDF}/bookvol9.pdf ${PDF}/bookvol10.pdf \ + ${PDF}/bookvol11.pdf ${PDF}/bookvol12.pdf all: ${PDF}/axiom.sty ${BOOKS} ${PDF}/toc.pdf @@ -43,6 +43,7 @@ ${PDF}/%.pdf: ${IN}/%.pamphlet ${LATEX} $*.tex >/dev/null ; \ ${DVIPDFM} $*.dvi 2>/dev/null ; \ ${RM} $*.aux $*.dvi $*.log $*.ps $*.idx $*.tex $*.pamphlet ; \ + ${RM} $*.ilg $*.ind ; \ else \ ${RM} $*.toc ; \ ${LATEX} $*.tex >${TMP}/trace ; \ @@ -51,6 +52,7 @@ ${PDF}/%.pdf: ${IN}/%.pamphlet ${LATEX} $*.tex >${TMP}/trace ; \ ${DVIPDFM} $*.dvi 2>${TMP}/trace ; \ ${RM} $*.aux $*.dvi $*.log $*.ps $*.idx $*.tex $*.pamphlet ; \ + ${RM} $*.ilg $*.ind ; \ fi ) @ @@ -98,6 +100,8 @@ ${PDF}/toc.pdf: ${BOOKS} echo "{\\bf Volume ~ 5}: Axiom {\\sl Interpreter}\\\\" >>toc.toc ; \ echo "{\\bf Volume ~ 6}: Axiom {\\sl Command}\\\\" >>toc.toc ; \ echo "{\\bf Volume ~ 7}: Axiom {\\sl Hyperdoc}\\\\" >>toc.toc ; \ + echo \ + "{\\bf Volume ~ 7.1}: Axiom {\\sl Hyperdoc Pages}\\\\" >>toc.toc ; \ echo "{\\bf Volume ~ 8}: Axiom {\\sl Graphics}\\\\" >>toc.toc ; \ echo "{\\bf Volume ~ 9}: Axiom {\\sl Compiler}\\\\" >>toc.toc ; \ echo "{\\bf Volume 10}: Axiom {\\sl Algebra}\\\\" >>toc.toc ; \ @@ -138,6 +142,10 @@ ${PDF}/toc.pdf: ${BOOKS} <> >toc.toc ; \ echo "\\newpage" >>toc.toc ; \ + echo "\\section*{Volume 7.1: Axiom Hyperdoc}" >>toc.toc ; \ +<> + >toc.toc ; \ + echo "\\newpage" >>toc.toc ; \ echo "\\section*{Volume 8: Axiom Graphics}" >>toc.toc ; \ <> >toc.toc ; \ diff --git a/books/bookvol7.1.pamphlet b/books/bookvol7.1.pamphlet index f96b45b..9a42fbb 100644 --- a/books/bookvol7.1.pamphlet +++ b/books/bookvol7.1.pamphlet @@ -4,6 +4,32 @@ \usepackage{makeidx} \makeindex \usepackage{graphicx} +%% +%% pagehead consolidates standard page indexing +%% +\newcommand{\pagehead}[3]{% e.g. \pagehead{page}{file.ht}{title} +\subsection{#3}% +\label{#1} +\index{pages!#1!#2}% +\index{#1!#2!pages}% +\index{#2!pages!#1}} +%% +%% pagepic adds an image and an index entry +%% +\newcommand{\pagepic}[2]{% e.g. \pagepic{pathandfile}{indexname} +\includegraphics[scale=.5]{#1}% +\index{images!#2}} +%% +%% pageto is a forward link to a referenced page +%% +\newcommand{\pageto}[2]{% e.g. \pageto{linkstring}{pagename} +\ \\${\bf\Rightarrow{}}${``#1''} (#2) \ref{#2} on page~\pageref{#2}} +%% +%% pageback is a backward link to a referencing page +%% +\newcommand{\pagefrom}[2]{% e.g. \pagefrom{linkstring}{pagename} +\ \\${\bf\Leftarrow{}}${``#1''} (#2) \ref{#2} on page~\pageref{#2}} +%% \begin{document} \begin{titlepage} \center{\includegraphics{ps/axiomfront.ps}} @@ -203,26 +229,15 @@ November 10, 2003 ((iHy)) \setcounter{chapter}{0} % Chapter 1 \chapter{Release Notes} \section{releasenotes.ht} -\subsection{What's New in Axiom} -\label{releaseNotes} -\includegraphics[scale=.5]{ps/v71releasenotes.eps} -\index{images!releasenotes} - -Called from ``Root Page'' (RootPage) \ref{RootPage} on page~\pageref{RootPage} -\begin{itemize} -\item ``Online information'' (onlineInformation) \ref{onlineInformation} -on page~\pageref{onlineInformation} -\item ``May 2008'' (may2008) \ref{may2008} on page~\pageref{may2008} -\item ``March 2008'' (march2008) \ref{march2008} on page~\pageref{march2008} -\item ``January 2008'' (january2008) \ref{january2008} on -page~\pageref{january2008} -\item ``November 2007'' (november2007) \ref{november2007} on -page~\pageref{november2007} -\item ``February 2005'' (feb2005) \ref{feb2005} on page~\pageref{feb2005} -\end{itemize} -\index{pages!releaseNotes!releasenotes.ht} -\index{releasenotes.ht!pages!releaseNotes} -\index{releaseNotes!releasenotes.ht!pages} +\pagehead{releaseNotes}{releasenotes.ht}{What is new in Axiom} +\pagepic{ps/v71releasenotes.eps}{releasenotes} +\pagefrom{Root Page}{RootPage} +\pageto{Online information}{onlineInformation} +\pageto{May 2008}{may2008} +\pageto{March 2008}{march2008} +\pageto{January 2008}{january2008} +\pageto{November 2007}{november2007} +\pageto{February 2005}{feb2005} <>= \begin{page}{releaseNotes}{0. What's New in Axiom} \beginscroll @@ -239,11 +254,7 @@ page~\pageref{november2007} \end{page} @ -\subsection{Online Information} -\label{onlineInformation} -\index{pages!onlineInformation!releasenotes.ht} -\index{releasenotes.ht!pages!onlineInformation} -\index{onlineInformation!releasenotes.ht!pages} +\pagehead{onlineInformation}{releasenotes.ht}{Online Information} <>= \begin{page}{onlineInformation}{Online information} \beginscroll @@ -256,11 +267,7 @@ Axiom information can be found online at \end{page} @ -\subsection{May 27, 2008 Release Notes} -\label{may2008} -\index{pages!may2008!releasenotes.ht} -\index{releasenotes.ht!pages!may2008} -\index{may2008!releasenotes.ht!pages} +\pagehead{may2008}{releasenotes.ht}{May 27, 2008 Release Notes} <>= \begin{page}{may2008}{May 27, 2008 Release Notes} \beginscroll @@ -301,11 +308,7 @@ PORTING \end{page} @ -\subsection{March 25, 2008 Release Notes} -\label{march2008} -\index{pages!march2008!releasenotes.ht} -\index{releasenotes.ht!pages!march2008} -\index{march2008!releasenotes.ht!pages} +\pagehead{march2008}{releasenotes.ht}{March 25, 2008 Release Notes} <>= \begin{page}{march2008}{March 25, 2008 Release Notes} \beginscroll @@ -400,11 +403,7 @@ o Complex Gamma, logGamma, and log(Gamma) have additional tests and \end{page} @ -\subsection{January 25, 2008 Release Notes} -\label{january2008} -\index{pages!january2008!releasenotes.ht} -\index{releasenotes.ht!pages!january2008} -\index{january2008!releasenotes.ht!pages} +\pagehead{january2008}{releasenotes.ht}{January 25, 2008 Release Notes} <>= \begin{page}{january2008}{January 25, 2008 Release Notes} \beginscroll @@ -660,11 +659,7 @@ Patches released \end{page} @ -\subsection{November 23, 2007 Release Notes} -\label{november2007} -\index{pages!november2007!releasenotes.ht} -\index{releasenotes.ht!pages!november2007} -\index{november2007!releasenotes.ht!pages} +\pagehead{november2007}{releasenotes.ht}{November 23, 2007 Release Notes} <>= \begin{page}{november2007}{November 23, 2007 Release Notes} \beginscroll @@ -852,11 +847,7 @@ ADD )HELP FACILITY \end{page} @ -\subsection{Feature Complete Release Feb 2005} -\label{feb2005} -\index{pages!feb2005!releasenotes.ht} -\index{releasenotes.ht!pages!feb2005} -\index{feb2005!releasenotes.ht!pages} +\pagehead{feb2005}{releasenotes.ht}{Feature Complete Release Feb 2005} <>= \begin{page}{feb2005}{Feature Complete Release Feb 2005} \beginscroll @@ -1346,16 +1337,11 @@ of operations defined by \spadtype{#1}.} \newcommand{\localinfo}{} @ -\section{Special Hyperdoc pages} -\subsection{Not Connected to Axiom} -\label{SpadNotConnectedPage} -\index{pages!SpadNotConnectedPage!util.ht} -\index{util.ht!pages!SpadNotConnectedPage} -\index{SpadNotConnectedPage!util.ht!pages} +\pagehead{SpadNotConnectedPage}{util.ht}{Not Connected to Axiom} <>= \begin{page}{SpadNotConnectedPage}{Not Connected to Axiom} \beginscroll -\HyperName{} isn't connected to Axiom, therefore cannot execute +Hyperdoc isn't connected to Axiom, therefore cannot execute the button you pressed. % \GoBackToWork{} @@ -1363,15 +1349,11 @@ the button you pressed. \end{page} @ -\subsection{Do You Really Want to Exit?} -\label{ProtectedQuitPage} -\index{pages!ProtectedQuitPage!util.ht} -\index{util.ht!pages!ProtectedQuitPage} -\index{ProtectedQuitPage!util.ht!pages} +\pagehead{ProtectedQuitPage}{util.ht}{Do You Really Want to Exit?} <>= \begin{page}{ProtectedQuitPage}{Do You Really Want to Exit?} \beginscroll -{Click again on \ \ExitButton{QuitPage} \ to terminate \HyperName{}.} +{Click again on \ \ExitButton{QuitPage} \ to terminate Hyperdoc.} \vspace{1}\newline \centerline{OR} \GoBackToWork{} @@ -1380,26 +1362,18 @@ the button you pressed. \end{page} @ -\subsection{Missing Page} -\label{UnknownPage} -\index{pages!UnknownPage!util.ht} -\index{util.ht!pages!UnknownPage} -\index{UnknownPage!util.ht!pages} +\pagehead{UnknownPage}{util.ht}{Missing Page} <>= \begin{page}{UnknownPage}{Missing Page} \beginscroll \pp -The page you requested was not found in the \HyperName{} database. +The page you requested was not found in the Hyperdoc database. \GoBackToWork{} \endscroll \end{page} @ -\subsection{Something is Wrong} -\label{ErrorPage} -\index{pages!ErrorPage!util.ht} -\index{util.ht!pages!ErrorPage} -\index{ErrorPage!util.ht!pages} +\pagehead{ErrorPage}{util.ht}{Something is Wrong} <>= \begin{page}{ErrorPage}{Something is Wrong} \beginscroll @@ -1410,11 +1384,7 @@ The page you requested was not found in the \HyperName{} database. \end{page} @ -\subsection{Sorry!} -\label{Unlinked} -\index{pages!Unlinked!util.ht} -\index{util.ht!pages!Unlinked} -\index{Unlinked!util.ht!pages} +\pagehead{Unlinked}{util.ht}{Sorry!} <>= \begin{page}{Unlinked}{Sorry!} \beginscroll @@ -1428,31 +1398,18 @@ The page you requested was not found in the \HyperName{} database. \chapter{Hyperdoc pages} The hyperdoc pages can be viewed as a forest of rooted pages. The main routine in hypertex will look for a page called ``RootPage''. -See RootPage \ref{RootPage} on page~\pageref{RootPage} +\pagefrom{Root Page}{RootPage} \section{rootpage.ht} -\subsection{Axiom HyperDoc Top Level} -\label{RootPage} -\includegraphics[scale=.5]{ps/v71rootpage.eps} -\index{images!rootpage} -\begin{itemize} -\item ``Basic Commands'' (BasicCommand) -\ref{BasicCommand} on page~\pageref{BasicCommand} -\item ``Reference'' (TopReferencePage) \ref{TopReferencePage} -on page~\pageref{TopReferencePage} -\item ``Topics'' (TopicPage) \ref{TopicPage} on page~\pageref{TopicPage} -\item ``Browse'' (Man0Page) \ref{Man0Page} on page~\pageref{Man0Page} -\item ``Examples'' (TopExamplePage) -\ref{TopExamplePage} on page~\pageref{TopExamplePage} -\item ``Settings'' (TopSettingsPage) -\ref{TopSettingsPage} on page~\pageref{TopSettingsPage} -\item ``About Axiom'' (RootPageLogo) -\ref{RootPageLogo} on page~\pageref{RootPageLogo} -\item ``What's New'' (releaseNotes) -\ref{releaseNotes} on page~\pageref{releaseNotes} -\end{itemize} -\index{pages!RootPage!rootpage.ht} -\index{rootpage.ht!pages!RootPage} -\index{RootPage!rootpage.ht!pages} +\pagehead{RootPage}{rootpage.ht}{Axiom HyperDoc Top Level} +\pagepic{ps/v71rootpage.eps}{rootpage} +\pageto{Basic Commands}{BasicCommand} +\pageto{Reference}{TopReferencePage} +\pageto{Topics}{TopicPage} +\pageto{Browse}{Man0Page} +\pageto{Examples}{TopExamplePage} +\pageto{Settings}{TopSettingsPage} +\pageto{About Axiom}{RootPageLogo} +\pageto{What's New}{releaseNotes} <>= \begin{page}{RootPage}{Axiom HyperDoc Top Level} \beginscroll @@ -1508,16 +1465,10 @@ What would you like to do? \end{page} @ -\subsection{Axiom -- The Scientific Computation System} -\label{RootPageLogo} -\includegraphics[scale=.5]{ps/v71rootpagelogo.eps} -\index{images!rootpagelogo} - -Called from ``Root Page'' (RootPage) -\ref{RootPage} on page~\pageref{RootPage} -\index{pages!RootPageLogo!rootpage.ht} -\index{rootpage.ht!pages!RootPageLogo} -\index{RootPageLogo!rootpage.ht!pages} +\pagehead{RootPageLogo}{rootpage.ht} +{Axiom -- The Scientific Computation System} +\pagepic{ps/v71rootpagelogo.eps}{rootpagelogo} +\pagefrom{Root Page}{RootPage} <>= \begin{page}{RootPageLogo}{Axiom -- The Scientific Computation System} \beginscroll @@ -1539,21 +1490,11 @@ Heights, New York, USA. \end{page} @ -\subsection{System Commands} -\label{TopSettingsPage} -\includegraphics[scale=.5]{ps/v71topsettingspage.eps} -\index{images!topsettingspage} - -Called from ``Root Page'' (RootPage) \ref{RootPage} on -page~\pageref{RootPage} - -See ``Commands'' (ugSysCmdPage) -\ref{ugSysCmdPage} on page~\pageref{ugSysCmdPage} - -The ``Settings'' link is implemented in lisp. -\index{pages!TopSettingsPage!rootpage.ht} -\index{rootpage.ht!pages!TopSettingsPage} -\index{TopSettingsPage!rootpage.ht!pages} +\pagehead{TopSettingsPage}{rootpage.ht}{System Commands} +\pagepic{ps/v71topsettingspage.eps}{topsettingspage} +\pagefrom{Root Page}{RootPage} +\pageto{Commands}{ugSysCmdPage} +\newline{}The ``Settings'' link is implemented in lisp. <>= \begin{page}{TopSettingsPage}{System Commands} \beginscroll @@ -1571,24 +1512,12 @@ management and change Axiom system variables. \end{page} @ -\subsection{Axiom Examples} -\label{TopExamplePage} -\includegraphics[scale=.5]{ps/v71topexamplepage.eps} -\index{images!topexamplepage} - -Called from ``Root Page'' (RootPage) \ref{RootPage} on -page~\pageref{RootPage} -\begin{itemize} -\item ``Graphics'' (GraphicsExamplePage) \ref{GraphicsExamplePage} on -page~\pageref{GraphicsExamplePage}. -\item ``Domains'' (ExamplesExposedPage) \ref{ExamplesExposedPage} on -page~\pageref{ExamplesExposedPage} -\item ``Operations'' (ExampleCoverPage) \ref{ExampleCoverPage} on -page~\pageref{ExampleCoverPage} -\end{itemize} -\index{pages!TopExamplePage!rootpage.ht} -\index{rootpage.ht!pages!TopExamplePage} -\index{TopExamplePage!rootpage.ht!pages} +\pagehead{TopExamplePage}{rootpage.ht}{Axiom Examples} +\pagepic{ps/v71topexamplepage.eps}{topexamplepage} +\pagefrom{Root Page}{RootPage} +\pageto{Graphics}{GraphicsExamplePage} +\pageto{Domains}{ExamplesExposedPage} +\pageto{Operations}{ExampleCoverPage} <>= \begin{page}{TopExamplePage}{Axiom Examples} \beginscroll @@ -1618,38 +1547,20 @@ What would you like to see? \end{page} @ -\subsection{Axiom Reference} -\label{TopReferencePage} -\includegraphics[scale=.5]{ps/v71topreferencepage.eps} -\index{images!topreferencepage} - -Called from ``Root Page'' (RootPage) \ref{RootPage} on -page~\pageref{RootPage} -\begin{itemize} -\item ``this font'' (YouTriedIt) \ref{YouTriedIt} on -page~\pageref{YouTriedIt} -\item ``What's New'' (ugWhatsNewTwoTwoPage) \ref{ugWhatsNewTwoTwoPage} on -page~\pageref{ugWhatsNewTwoTwoPage} -\item ``Axiom Book'' (UsersGuidePage) \ref{UsersGuidePage} on -page~\pageref{UsersGuidePage} -\item ``NAG Library'' (FoundationLibraryDocPage) -\ref{FoundationLibraryDocPage} on -page~\pageref{FoundationLibraryDocPage} -\item ``Topics'' (TopicPage) \ref{TopicPage} on page~\pageref{TopicPage} -\item ``Language'' (ugLangPage) \ref{ugLangPage} on page~\pageref{ugLangPage} -\item ``Examples'' (ExamplesExposedPage) \ref{ExamplesExposedPage} on -page~\pageref{ExamplesExposedPage} -\item ``Commands'' (ugSysCmdPage) -\ref{ugSysCmdPage} on page~\pageref{ugSysCmdPage} -\item ``Glossary'' (GlossaryPage) -\ref{GlossaryPage} on page~\pageref{GlossaryPage} -\item ``HyperDoc'' (HTXTopPage) \ref{HTXTopPage} on page~\pageref{HTXTopPage} -\item ``Search'' (RefSearchPage) -\ref{RefSearchPage} on page~\pageref{RefSearchPage} -\end{itemize} -\index{pages!TopReferencePage!rootpage.ht} -\index{rootpage.ht!pages!TopReferencePage} -\index{TopReferencePage!rootpage.ht!pages} +\pagehead{TopReferencePage}{rootpage.ht}{Axiom Reference} +\pagepic{ps/v71topreferencepage.eps}{topreferencepage} +\pagefrom{Root Page}{RootPage} +\pageto{this font}{YouTriedIt} +\pageto{What's New}{ugWhatsNewTwoTwoPage} +\pageto{Axiom Book}{UsersGuidePage} +\pageto{NAG Library}{FoundationLibraryDocPage} +\pageto{Topics}{TopicPage} +\pageto{Language}{ugLangPage} +\pageto{Examples}{ExamplesExposedPage} +\pageto{Commands}{ugSysCmdPage} +\pageto{Glossary}{GlossaryPage} +\pageto{HyperDoc}{HTXTopPage} +\pageto{Search}{RefSearchPage} <>= \begin{page}{TopReferencePage}{Axiom Reference} \newline @@ -1691,8 +1602,8 @@ any word in \downlink{this font}{YouTriedIt} and click the left mouse button. \menumemolink{Glossary}{GlossaryPage}\tab{12} A glossary of Axiom terms. -\menumemolink{\HyperName{}}{HTXTopPage} -\tab{12} How to write your own \HyperName{} pages. +\menumemolink{Hyperdoc}{HTXTopPage} +\tab{12} How to write your own Hyperdoc pages. \menumemolink{Search}{RefSearchPage} \tab{12} Reference pages for occurrences of a string. @@ -1702,17 +1613,9 @@ A glossary of Axiom terms. \end{page} @ -\subsection{NAG Documentation} -\label{FoundationLibraryDocPage} -\includegraphics[scale=.5]{ps/v71foundationlibrarydocpage.eps} -\index{images!foundationlibrarydocpage} - -Called from ``Reference'' (TopReferencePage) -\ref{TopReferencePage} on page~\pageref{TopReferencePage} - -\index{pages!FoundationLibraryDocPage!rootpage.ht} -\index{rootpage.ht!pages!FoundationLibraryDocPage} -\index{FoundationLibraryDocPage!rootpage.ht!pages} +\pagehead{FoundationLibraryDocPage}{rootpage.ht}{NAG Documentation} +\pagepic{ps/v71foundationlibrarydocpage.eps}{foundationlibrarydocpage} +\pagefrom{Reference}{TopReferencePage} <>= \begin{page}{FoundationLibraryDocPage}{NAG Documentation} \begin{scroll} @@ -1964,23 +1867,11 @@ Called from ``Reference'' (TopReferencePage) @ \section{algebra.ht} -@ -\subsection{Abstract Algebra} -\label{AlgebraPage} -\includegraphics[scale=.5]{ps/v71algebrapage.eps} -\index{images!algebrapage} - -Called from ``Topics'' (TopicPage) \ref{TopicPage} on -page~\pageref{TopicPage} -\begin{itemize} -\item ``Number Theory'' (NumberTheoryPage)\\ -\ref{NumberTheoryPage} on page~\pageref{NumberTheoryPage} -\item ``Group Theory'' (GroupTheoryPage)\\ -\ref{GroupTheoryPage} on page~\pageref{GroupTheoryPage} -\end{itemize} -\index{pages!AlgebraPage!algebra.ht} -\index{algebra.ht!pages!AlgebraPage} -\index{AlgebraPage!algebra.ht!pages} +\pagehead{AlgebraPage}{algebra.ht}{Abstract Algebra} +\pagepic{ps/v71algebrapage.eps}{algebrapage} +\pagefrom{Topics}{TopicPage} +\pageto{Number Theory}{NumberTheoryPage} +\pageto{Group Theory}{GroupTheoryPage} <>= \begin{page}{AlgebraPage}{Abstract Algebra} \beginscroll @@ -2000,18 +1891,9 @@ Permutation groups; representation theory. \end{page} @ -\subsection{Number Theory} -\label{NumberTheoryPage} -\begin{itemize} -\item ugProblemGaloisPage \ref{ugProblemGaloisPage} on -page~\pageref{ugProblemGaloisPage} -\item IntegerNumberTheoryFunctionsXmpPage \\ -\ref{IntegerNumberTheoryFunctionsXmpPage} on\\ -page~\pageref{IntegerNumberTheoryFunctionsXmpPage} -\end{itemize} -\index{pages!NumberTheoryPage!algebra.ht} -\index{algebra.ht!pages!NumberTheoryPage} -\index{NumberTheoryPage!algebra.ht!pages} +\pagehead{NumberTheoryPage}{algebra.ht}{Number Theory} +\pageto{notitle}{ugProblemGaloisPage} +\pageto{notitle}{IntNumberTheoryFnsXmpPage} <>= \begin{page}{NumberTheoryPage}{Number Theory} \beginscroll @@ -2021,7 +1903,7 @@ facilities. \menulink{Galois Groups}{ugProblemGaloisPage} \newline Computation of Galois groups using factorizations over number fields. \menulink{Number Theory Functions} -{IntegerNumberTheoryFunctionsXmpPage}\newline +{IntNumberTheoryFnsXmpPage}\newline Some functions of interest to number theorists. \endmenu \endscroll @@ -2030,20 +1912,9 @@ Some functions of interest to number theorists. @ \section{alist.ht} -<>= -\newcommand{\AssociationListXmpTitle}{AssociationList} -\newcommand{\AssociationListXmpNumber}{9.1} - -@ -\subsection{AssociationList} -\label{AssociationListXmpPage} -\begin{itemize} -\item TableXmpPage \ref{TableXmpPage} on page~\pageref{TableXmpPage} -\item ListXmpPage \ref{ListXmpPage} on page~\pageref{ListXmpPage} -\end{itemize} -\index{pages!AssociationListXmpPage!alist.ht} -\index{alist.ht!pages!AssociationListXmpPage} -\index{AssociationListXmpPage!alist.ht!pages} +\pagehead{AssociationListXmpPage}{alist.ht}{AssociationList} +\pageto{notitle}{TableXmpPage} +\pageto{notitle}{ListXmpPage} <>= \begin{page}{AssociationListXmpPage}{AssociationList} \beginscroll @@ -2127,22 +1998,9 @@ see \downlink{`List'}{ListXmpPage}\ignore{List}. @ \section{array1.ht} -<>= -\newcommand{\OneDimensionalArrayXmpTitle}{OneDimensionalArray} -\newcommand{\OneDimensionalArrayXmpNumber}{9.57} - -@ -\subsection{OneDimensionalArray} -\label{OneDimensionalArrayXmpPage} -\begin{itemize} -\item VectorXmpPage \ref{VectorXmpPage} on -page~\pageref{VectorXmpPage} -\item FlexibleArrayXmpPage \ref{FlexibleArrayXmpPage} on -page~\pageref{FlexibleArrayXmpPage} -\end{itemize} -\index{pages!OneDimensionalArrayXmpPage!array1.ht} -\index{array1.ht!pages!OneDimensionalArrayXmpPage} -\index{OneDimensionalArrayXmpPage!array1.ht!pages} +\pagehead{OneDimensionalArrayXmpPage}{array1.ht}{OneDimensionalArray} +\pageto{notitle}{VectorXmpPage} +\pageto{notitle}{FlexibleArrayXmpPage} <>= \begin{page}{OneDimensionalArrayXmpPage}{OneDimensionalArray} \beginscroll @@ -2215,24 +2073,10 @@ Replace the first 5 elements of \spad{a} with those of \spad{b}. @ \section{array2.ht} -<>= -\newcommand{\TwoDimensionalArrayXmpTitle}{TwoDimensionalArray} -\newcommand{\TwoDimensionalArrayXmpNumber}{9.82} - -@ -\subsection{TwoDimensionalArray} -\label{TwoDimensionalArrayXmpPage} -\begin{itemize} -\item ugTypesAnyNonePage \ref{ugTypesAnyNonePage} on -page~\pageref{ugTypesAnyNonePage} -\item MatrixXmpPage \ref{MatrixXmpPage} on -page~\pageref{MatrixXmpPage} -\item OneDimensionalArrayXmpPage \ref{OneDimensionalArrayXmpPage} on -page~\pageref{OneDimensionalArrayXmpPage} -\end{itemize} -\index{pages!TwoDimensionalArrayXmpPage!array2.ht} -\index{array2.ht!pages!TwoDimensionalArrayXmpPage} -\index{TwoDimensionalArrayXmpPage!array2.ht!pages} +\pagehead{TwoDimensionalArrayXmpPage}{array2.ht}{TwoDimensionalArray} +\pageto{notitle}{ugTypesAnyNonePage} +\pageto{notitle}{MatrixXmpPage} +\pageto{notitle}{OneDimensionalArrayXmpPage} <>= \begin{page}{TwoDimensionalArrayXmpPage}{TwoDimensionalArray} \beginscroll @@ -2399,19 +2243,11 @@ For information on related topics, see @ \section{basic.ht} -\subsection{Basic Commands} -\label{BasicCommand} -\includegraphics[scale=.5]{ps/v71basiccommand.eps} -\index{images!basiccommand} - -Called from ``Root Page'' (RootPage) \ref{RootPage} on page~\pageref{RootPage} - -See Calculus \ref{Calculus} on page~\pageref{Calculus}. - -The other links on the page call lisp code. -\index{pages!BasicCommand!basic.ht} -\index{basic.ht!pages!BasicCommand} -\index{BasicCommand!basic.ht!pages} +\pagehead{BasicCommand}{basic.ht}{Basic Commands} +\pagepic{ps/v71basiccommand.eps}{basiccommand} +\pagefrom{Root Page}{RootPage} +\pageto{Calculus}{Calculus} +\newline{}The other links on the page call lisp code. \index{Function!bcMatrix} \index{bcMatrix Function} \index{Function!bcExpand} @@ -2444,16 +2280,9 @@ The other links on the page call lisp code. \end{page} @ -\subsection{Calculus} -\label{Calculus} -\includegraphics[scale=.5]{ps/v71calculus.eps} -\index{images!calculus} - -Called from ``Basic Commands'' \ref{BasicCommand} on -page~\pageref{BasicCommand} -\index{pages!Calculus!basic.ht} -\index{basic.ht!pages!Calculus} -\index{Calculus!basic.ht!pages} +\pagehead{Calculus}{basic.ht}{Calculus} +\pagepic{ps/v71calculus.eps}{calculus} +\pagefrom{Basic Commands}{BasicCommand} \index{Function!bcDifferentiate} \index{bcDifferentiate Function} \index{Function!bcIndefiniteIntegral} @@ -2485,16 +2314,7 @@ What would you like to do? @ \section{bbtree.ht} -<>= -\newcommand{\BalancedBinaryTreeXmpTitle}{BalancedBinaryTree} -\newcommand{\BalancedBinaryTreeXmpNumber}{9.2} - -@ -\subsection{BalancedBinaryTree} -\label{BalancedBinaryTreeXmpPage} -\index{pages!BalancedBinaryTreeXmpPage!bbtree.ht} -\index{bbtree.ht!pages!BalancedBinaryTreeXmpPage} -\index{BalancedBinaryTreeXmpPage!bbtree.ht!pages} +\pagehead{BalancedBinaryTreeXmpPage}{bbtree.ht}{BalancedBinaryTree} <>= \begin{page}{BalancedBinaryTreeXmpPage}{BalancedBinaryTree} \beginscroll @@ -2598,23 +2418,10 @@ answer for \texht{$12^2$}{12**2}. @ \section{binary.ht} -% !! DO NOT MODIFY THIS FILE BY HAND !! Created by ht.awk. -<>= -\newcommand{\BinaryExpansionXmpTitle}{BinaryExpansion} -\newcommand{\BinaryExpansionXmpNumber}{9.4} - -@ -\subsection{BinaryExpansion} -\label{BinaryExpansionXmpPage} -\begin{itemize} -\item DecimalExpansionXmpPage\\ -\ref{DecimalExpansionXmpPage} on page~\pageref{DecimalExpansionXmpPage} -\item RadixExpansionXmpPage\\ -\ref{RadixExpansionXmpPage} on page~\pageref{RadixExpansionXmpPage} -\end{itemize} -\index{pages!BinaryExpansionXmpPage!binary.ht} -\index{binary.ht!pages!BinaryExpansionXmpPage} -\index{BinaryExpansionXmpPage!binary.ht!pages} +\pagehead{BinaryExpansionXmpPage}{binary.ht}{BinaryExpansion} +\pageto{notitle}{DecimalExpansionXmpPage} +\pageto{notitle}{RadixExpansionXmpPage} +\pageto{notitle}{HexExpansionXmpPage} <>= \begin{page}{BinaryExpansionXmpPage}{BinaryExpansion} \beginscroll @@ -2625,7 +2432,7 @@ be obtained by converting the value to \spadtype{RadixExpansion(2)}. More examples of expansions are available in \downlink{`DecimalExpansion'}{DecimalExpansionXmpPage} \ignore{DecimalExpansion}, -\downlink{`HexadecimalExpansion'}{HexadecimalExpansionXmpPage} +\downlink{`HexadecimalExpansion'}{HexExpansionXmpPage} \ignore{HexadecimalExpansion}, and \downlink{`RadixExpansion'}{RadixExpansionXmpPage}\ignore{RadixExpansion}. @@ -2669,11 +2476,7 @@ These numbers are bona fide algebraic objects. @ \section{bmcat.ht} -\subsection{Bit Map Catalog} -\label{BitMaps} -\index{pages!BitMaps!bmcat.ht} -\index{bmcat.ht!pages!BitMaps} -\index{BitMaps!bmcat.ht!pages} +\pagehead{BitMaps}{bmcat.ht}{Bit Map Catalog} <>= \begin{page}{BitMaps}{Bit Map Catalog} \beginscroll @@ -2740,16 +2543,7 @@ These numbers are bona fide algebraic objects. @ \section{bop.ht} -<>= -\newcommand{\BasicOperatorXmpTitle}{BasicOperator} -\newcommand{\BasicOperatorXmpNumber}{9.3} - -@ -\subsection{BasicOperator} -\label{BasicOperatorXmpPage} -\index{pages!BasicOperatorXmpPage!bop.ht} -\index{bop.ht!pages!BasicOperatorXmpPage} -\index{BasicOperatorXmpPage!bop.ht!pages} +\pagehead{BasicOperatorXmpPage}{bop.ht}{BasicOperator} <>= \begin{page}{BasicOperatorXmpPage}{BasicOperator} \beginscroll @@ -2893,16 +2687,7 @@ remove a property. % @ \section{bstree.ht} -<>= -\newcommand{\BinarySearchTreeXmpTitle}{BinarySearchTree} -\newcommand{\BinarySearchTreeXmpNumber}{9.5} - -@ -\subsection{BinarySearchTree} -\label{BinarySearchTreeXmpPage} -\index{pages!BinarySearchTreeXmpPage!bstree.ht} -\index{bstree.ht!pages!BinarySearchTreeXmpPage} -\index{BinarySearchTreeXmpPage!bstree.ht!pages} +\pagehead{BinarySearchTreeXmpPage}{bstree.ht}{BinarySearchTree} <>= \begin{page}{BinarySearchTreeXmpPage}{BinarySearchTree} \beginscroll @@ -3002,16 +2787,7 @@ Have Axiom check that these are equal. @ \section{card.ht} -<>= -\newcommand{\CardinalNumberXmpTitle}{CardinalNumber} -\newcommand{\CardinalNumberXmpNumber}{9.6} - -@ -\subsection{CardinalNumber} -\label{CardinalNumberXmpPage} -\index{pages!CardinalNumberXmpPage!card.ht} -\index{card.ht!pages!CardinalNumberXmpPage} -\index{CardinalNumberXmpPage!card.ht!pages} +\pagehead{CardinalNumberXmpPage}{card.ht}{CardinalNumber} <>= \begin{page}{CardinalNumberXmpPage}{CardinalNumber} \beginscroll @@ -3163,16 +2939,7 @@ generalized continuum hypothesis in this way. @ \section{carten.ht} -<>= -\newcommand{\CartesianTensorXmpTitle}{CartesianTensor} -\newcommand{\CartesianTensorXmpNumber}{9.7} - -@ -\subsection{CartesianTensor} -\label{CartesianTensorXmpPage} -\index{pages!CartesianTensorXmpPage!carten.ht} -\index{carten.ht!pages!CartesianTensorXmpPage} -\index{CartesianTensorXmpPage!carten.ht!pages} +\pagehead{CartesianTensorXmpPage}{carten.ht}{CartesianTensor} <>= \begin{page}{CartesianTensorXmpPage}{CartesianTensor} \beginscroll @@ -3199,7 +2966,6 @@ integers, with indices starting at 1. } \subsubsection{Forming tensors} - \labelSpace{2pc} \xtc{ Scalars can be converted to tensors of rank zero. @@ -3491,7 +3257,8 @@ delta(i,j) = | \xtc{ This can be used to reindex via contraction. }{ -\spadpaste{contract(Tmn, 2, delta, 1) = reindex(Tmn, [1,3,4,2]) \free{Tmn delta}} +\spadpaste{contract(Tmn, 2, delta, 1) = reindex(Tmn, [1,3,4,2]) +\free{Tmn delta}} } \xtc{ @@ -3583,16 +3350,7 @@ on the basis of this interpretation. @ \section{cclass.ht} -<>= -\newcommand{\CharacterClassXmpTitle}{CharacterClass} -\newcommand{\CharacterClassXmpNumber}{9.9} - -@ -\subsection{CharacterClass} -\label{CharacterClassXmpPage} -\index{pages!CharacterClassXmpPage!cclass.ht} -\index{cclass.ht!pages!CharacterClassXmpPage} -\index{CharacterClassXmpPage!cclass.ht!pages} +\pagehead{CharacterClassXmpPage}{cclass.ht}{CharacterClass} <>= \begin{page}{CharacterClassXmpPage}{CharacterClass} \beginscroll @@ -3686,22 +3444,9 @@ For more information on related topics, see @ \section{char.ht} -<>= -\newcommand{\CharacterXmpTitle}{Character} -\newcommand{\CharacterXmpNumber}{9.8} - -@ -\subsection{Character} -\label{CharacterXmpPage} -\begin{itemize} -\item CharacterClassXmpPage \ref{CharacterClassXmpPage} on -page~\pageref{CharacterClassXmpPage} -\item StringXmpPage \ref{StringXmpPage} on -page~\pageref{StringXmpPage} -\end{itemize} -\index{pages!CharacterXmpPage!char.ht} -\index{char.ht!pages!CharacterXmpPage} -\index{CharacterXmpPage!char.ht!pages} +\pagehead{CharacterXmpPage}{char.ht}{Character} +\pageto{notitle}{CharacterClassXmpPage} +\pageto{notitle}{StringXmpPage} <>= \begin{page}{CharacterXmpPage}{Character} \beginscroll @@ -3715,7 +3460,8 @@ and \downlink{`String'}{StringXmpPage}\ignore{String}. \xtc{ Characters can be obtained using \spadtype{String} notation. }{ -\spadpaste{chars := [char "a", char "A", char "X", char "8", char "+"] \bound{chars}} +\spadpaste{chars := [char "a", char "A", char "X", char "8", char "+"] +\bound{chars}} } \xtc{ Certain characters are available by name. @@ -3791,26 +3537,11 @@ belong to certain families. % @ -\section{clif.ht} -\newcommand{\CliffordAlgebraXmpTitle}{CliffordAlgebra} -\newcommand{\CliffordAlgebraXmpNumber}{9.10} - -@ -\subsection{CliffordAlgebra} -\label{CliffordAlgebraXmpPage} -\begin{itemize} -\item ugxCliffordComplexPage \ref{ugxCliffordComplexPage} on -page~\pageref{ugxCliffordComplexPage} -\item ugxCliffordQuaternPage \ref{ugxCliffordQuaternPage} on -page~\pageref{ugxCliffordQuaternPage} -\item ugxCliffordExteriorPage \ref{ugxCliffordExteriorPage} on -page~\pageref{ugxCliffordExteriorPage} -\item ugxCliffordDiracPage \ref{ugxCliffordDiracPage} on -page~\pageref{ugxCliffordDiracPage} -\end{itemize} -\index{pages!CliffordAlgebraXmpPage!clif.ht} -\index{clif.ht!pages!CliffordAlgebraXmpPage} -\index{CliffordAlgebraXmpPage!clif.ht!pages} +\pagehead{CliffordAlgebraXmpPage}{clif.ht}{CliffordAlgebra} +\pageto{notitle}{ugxCliffordComplexPage} +\pageto{notitle}{ugxCliffordQuaternPage} +\pageto{notitle}{ugxCliffordExteriorPage} +\pageto{notitle}{ugxCliffordDiracPage} <>= \begin{page}{CliffordAlgebraXmpPage}{CliffordAlgebra} \beginscroll @@ -3854,20 +3585,12 @@ exterior algebras and spin algebras. \end{page} @ -<>= -\newcommand{\ugxCliffordComplexTitle} +\pagehead{ugxCliffordComplexPage}{clif.ht} {The Complex Numbers as a Clifford Algebra} -\newcommand{\ugxCliffordComplexNumber}{9.10.1.} - -@ -\subsection{The Complex Numbers as a Clifford Algebra} -\label{ugxCliffordComplexPage} -See ComplexXmpPage \ref{ComplexXmpPage} on page~\pageref{ComplexXmpPage} -\index{pages!ugxCliffordComplexPage!clif.ht} -\index{clif.ht!pages!ugxCliffordComplexPage} -\index{ugxCliffordComplexPage!clif.ht!pages} +\pageto{notitle}{ComplexXmpPage} <>= -\begin{page}{ugxCliffordComplexPage}{The Complex Numbers as a Clifford Algebra} +\begin{page}{ugxCliffordComplexPage} +{The Complex Numbers as a Clifford Algebra} \beginscroll \labelSpace{5pc} @@ -3885,7 +3608,8 @@ We use this matrix for the quadratic form. \xtc{ We get complex arithmetic by using this domain. }{ -\spadpaste{C := CliffordAlgebra(1, K, quadraticForm m) \free{K m}\bound{C}} +\spadpaste{C := CliffordAlgebra(1, K, quadraticForm m) \free{K m} +\bound{C}} } \xtc{ Here is \spad{i}, the usual square root of \spad{-1.} @@ -3914,19 +3638,9 @@ implementing complex numbers. \end{page} @ -<>= -\newcommand{\ugxCliffordQuaternTitle} +\pagehead{ugxCliffordQuaternPage}{clif.ht} {The Quaternion Numbers as a Clifford Algebra} -\newcommand{\ugxCliffordQuaternNumber}{9.10.2.} - -@ -\subsection{The Quaternion Numbers as a Clifford Algebra} -\label{ugxCliffordQuaternPage} -See QuaternionXmpPage \ref{QuaternionXmpPage} on -page~\pageref{QuaternionXmpPage} -\index{pages!ugxCliffordQuaternPage!clif.ht} -\index{clif.ht!pages!ugxCliffordQuaternPage} -\index{ugxCliffordQuaternPage!clif.ht!pages} +\pageto{notitle}{QuaternionXmpPage} <>= \begin{page}{ugxCliffordQuaternPage} {The Quaternion Numbers as a Clifford Algebra} @@ -3991,16 +3705,8 @@ implementing quaternions. \end{page} @ -<>= -\newcommand{\ugxCliffordExteriorTitle}{The Exterior Algebra on a Three Space} -\newcommand{\ugxCliffordExteriorNumber}{9.10.3.} - -@ -\subsection{The Exterior Algebra on a Three Space} -\label{ugxCliffordExteriorPage} -\index{pages!ugxCliffordExteriorPage!clif.ht} -\index{clif.ht!pages!ugxCliffordExteriorPage} -\index{ugxCliffordExteriorPage!clif.ht!pages} +\pagehead{ugxCliffordExteriorPage}{clif.ht} +{The Exterior Algebra on a Three Space} <>= \begin{page}{ugxCliffordExteriorPage}{The Exterior Algebra on a Three Space} \beginscroll @@ -4016,7 +3722,8 @@ integer coefficients. If we chose the three by three zero quadratic form, we obtain the exterior algebra on \spad{e(1),e(2),e(3)}. }{ -\spadpaste{Ext := CliffordAlgebra(3, K, quadraticForm 0) \bound{Ext}\free{K}} +\spadpaste{Ext := CliffordAlgebra(3, K, quadraticForm 0) \bound{Ext} +\free{K}} } \xtc{ This is a three dimensional vector algebra. @@ -4068,16 +3775,7 @@ The vector cross product is then given by this. \end{page} @ -<>= -\newcommand{\ugxCliffordDiracTitle}{The Dirac Spin Algebra} -\newcommand{\ugxCliffordDiracNumber}{9.10.4.} - -@ -\subsection{The Dirac Spin Algebra} -\label{ugxCliffordDiracPage} -\index{pages!ugxCliffordDiracPage!clif.ht} -\index{clif.ht!pages!ugxCliffordDiracPage} -\index{ugxCliffordDiracPage!clif.ht!pages} +\pagehead{ugxCliffordDiracPage}{clif.ht}{The Dirac Spin Algebra} <>= \begin{page}{ugxCliffordDiracPage}{The Dirac Spin Algebra} \beginscroll @@ -4093,7 +3791,8 @@ In this section we will work over the field of rational numbers. \xtc{ We define the quadratic form to be the Minkowski space-time metric. }{ -\spadpaste{g := matrix [[1,0,0,0], [0,-1,0,0], [0,0,-1,0], [0,0,0,-1]] \bound{g}} +\spadpaste{g := matrix [[1,0,0,0], [0,-1,0,0], [0,0,-1,0], [0,0,0,-1]] +\bound{g}} } \xtc{ We obtain the Dirac spin algebra @@ -4139,22 +3838,9 @@ for t in 1..4]) \bound{lhs}\free{g gam m n r s}} @ \section{complex.ht} -<>= -\newcommand{\ComplexXmpTitle}{Complex} -\newcommand{\ComplexXmpNumber}{9.11} - -@ -\subsection{Complex} -\label{ComplexXmpPage} -\begin{itemize} -\item ugProblemNumericPage \ref{ugProblemNumericPage} on -page~\pageref{ugProblemNumericPage} -\item ugTypesConvertPage \ref{ugTypesConvertPage} on -page~\pageref{ugTypesConvertPage} -\end{itemize} -\index{pages!ComplexXmpPage!complex.ht} -\index{complex.ht!pages!ComplexXmpPage} -\index{ComplexXmpPage!complex.ht!pages} +\pagehead{ComplexXmpPage}{complex.ht}{Complex} +\pageto{notitle}{ugProblemNumericPage} +\pageto{notitle}{ugTypesConvertPage} <>= \begin{page}{ComplexXmpPage}{Complex} \beginscroll @@ -4257,17 +3943,8 @@ You can \spadfunFrom{factor}{Complex} Gaussian integers. @ \section{contfrac.ht} -<>= -\newcommand{\ContinuedFractionXmpTitle}{ContinuedFraction} -\newcommand{\ContinuedFractionXmpNumber}{9.12} - -@ -\subsection{ContinuedFraction} -\label{ContinuedFractionXmpPage} -See StreamXmpPage \ref{StreamXmpPage} on page~\pageref{StreamXmpPage} -\index{pages!ContinuedFractionXmpPage!contfrac.ht} -\index{contfrac.ht!pages!ContinuedFractionXmpPage} -\index{ContinuedFractionXmpPage!contfrac.ht!pages} +\pagehead{ContinuedFractionXmpPage}{contfrac.ht}{ContinuedFraction} +\pageto{notitle}{StreamXmpPage} <>= \begin{page}{ContinuedFractionXmpPage}{ContinuedFraction} \beginscroll @@ -4320,11 +3997,10 @@ This display is a compact form of the bulkier 4 \end{verbatim} } -You can write any rational number in a similar form. -The fraction will be finite and you can always take the ``numerators'' to -be \spad{1}. -That is, any rational number can be written as a simple, finite continued -fraction of the form +You can write any rational number in a similar form. The fraction +will be finite and you can always take the ``numerators'' to be +\spad{1}. That is, any rational number can be written as a simple, +finite continued fraction of the form \texht{\narrowDisplay{% a_1 + {\displaystyle 1 \over {\displaystyle a_2 + {1 \over {\displaystyle @@ -4348,8 +4024,9 @@ a_{n-1} + {1 \over a_n}}}}}}}}% \end{verbatim} } \xtc{ -The \texht{$a_i$}{\spad{a(i)}} are called partial quotients and the operation -\spadfunFrom{partialQuotients}{ContinuedFraction} creates a stream of them. +The \texht{$a_i$}{\spad{a(i)}} are called partial quotients and the +operation \spadfunFrom{partialQuotients}{ContinuedFraction} creates a +stream of them. }{ \spadpaste{partialQuotients c \free{c}} } @@ -4428,17 +4105,19 @@ New Mathematical Library, (New York: Random House, 1963), pp. 134--139.} \xtc{ -By looking at the above expansion, we see that the whole part is \spad{0} -and the numerators are all equal to \spad{1}. -This constructs the stream of denominators. +By looking at the above expansion, we see that the whole part is +\spad{0} and the numerators are all equal to \spad{1}. This +constructs the stream of denominators. }{ -\spadpaste{dens:Stream Integer := cons(1,generate((x+->x+4),6)) \bound{dens}} +\spadpaste{dens:Stream Integer := cons(1,generate((x+->x+4),6)) +\bound{dens}} } \xtc{ Therefore this is the continued fraction expansion for \texht{$(e - 1) / 2$}{\spad{(e-1)/2}}. }{ -\spadpaste{cf := continuedFraction(0,repeating [1],dens) \free{dens}\bound{cf}} +\spadpaste{cf := continuedFraction(0,repeating [1],dens) +\free{dens}\bound{cf}} } \xtc{ These are the rational number convergents. @@ -4494,7 +4173,8 @@ Let's use this expansion to compute rational and floating point approximations for \texht{$\pi$}{\spad{pi}}. }{ \spadpaste{ -cf := continuedFraction(1,[(2*i+1)**2 for i in 0..],repeating [2])\bound{cf1}} +cf := continuedFraction(1,[(2*i+1)**2 for i in 0..],repeating [2]) +\bound{cf1}} } \xtc{ }{ @@ -4523,11 +4203,13 @@ Here is an expansion for a quotient of Gaussian integers. This is an expansion for a quotient of polynomials in one variable with rational number coefficients. }{ -\spadpaste{r : Fraction UnivariatePolynomial(x,Fraction Integer) \bound{rdec}} +\spadpaste{r : Fraction UnivariatePolynomial(x,Fraction Integer) +\bound{rdec}} } \xtc{ }{ -\spadpaste{r := ((x - 1) * (x - 2)) / ((x-3) * (x-4)) \free{rdec}\bound{r}} +\spadpaste{r := ((x - 1) * (x - 2)) / ((x-3) * (x-4)) \free{rdec} +\bound{r}} } \xtc{ }{ @@ -4566,33 +4248,24 @@ is the expansion of \texht{$\sqrt{11}$}{the square root of \spad{11}}. @ \section{cphelp.ht} -\subsection{Control Panel Bits} -\label{CPHelp} -\index{pages!CPHelp!cphelp.ht} -\index{cphelp.ht!pages!CPHelp} -\index{CPHelp!cphelp.ht!pages} +\pagehead{CPHelp}{cphelp.ht}{Control Panel Bits} <>= \begin{page}{CPHelp}{Control Panel Bits} \beginscroll -Here are some stuff from a Three Dimensional Viewport's Control Panel \newline +Here are some stuff from a Three Dimensional Viewport's Control Panel +\newline Main Control Panel: \newline \newline -%% -%% These things were generated from the file helpCP3D.dat -%% -%% The help comments are hokey and are not the intended -%% format. -%% - Rotate: \helpbit{rotate3D} Zoom: \helpbit{zoom3D} Translate up/down left/right in the window: \helpbit{translate3D} Changing the color of the rendered surface: \helpbit{color3D} Turn the axes on and off: \helpbit{axes3D} Display surface as a transparent wire mesh: \helpbit{transparent3D} -Display surface with hidden surface removed and the core dumped: \helpbit{opaque3D} +Display surface with hidden surface removed and the core dumped: +\helpbit{opaque3D} Display rendered surface: \helpbit{render3D} Show region within which the function is defined: \helpbit{region3D} Change position of light source: \helpbit{lighting3D} @@ -4610,16 +4283,7 @@ Close the viewport: \helpbit{close3D} @ \section{cycles.ht} -<>= -\newcommand{\CycleIndicatorsXmpTitle}{CycleIndicators} -\newcommand{\CycleIndicatorsXmpNumber}{9.13} - -@ -\subsection{CycleIndicators} -\label{CycleIndicatorsXmpPage} -\index{pages!CycleIndicatorsXmpPage!cycles.ht} -\index{cycles.ht!pages!CycleIndicatorsXmpPage} -\index{CycleIndicatorsXmpPage!cycles.ht!pages} +\pagehead{CycleIndicatorsXmpPage}{cycles.ht}{CycleIndicators} <>= \begin{page}{CycleIndicatorsXmpPage}{CycleIndicators} \beginscroll @@ -4749,22 +4413,26 @@ Here are the number of 6-pairs, first from \spad{a a a b b c,} second from \spad{d d e e f g.} }{ -\spadpaste{cap(complete 3*complete 2*complete 1,complete 2**2*complete 1**2)} +\spadpaste{cap(complete 3*complete 2*complete 1, +complete 2**2*complete 1**2)} } \xtc{ Here it is again, but with no equal pairs. }{ -\spadpaste{cap(elementary 3*elementary 2*elementary 1,complete 2**2*complete 1**2)} +\spadpaste{cap(elementary 3*elementary 2*elementary 1, +complete 2**2*complete 1**2)} } \xtc{ }{ -\spadpaste{cap(complete 3*complete 2*complete 1,elementary 2**2*elementary 1**2)} +\spadpaste{cap(complete 3*complete 2*complete 1, +elementary 2**2*elementary 1**2)} } \xtc{ The number of 6-triples, first from \spad{a a a b b c,} second from \spad{d d e e f g,} third from \spad{h h i i j j.} }{ -\spadpaste{eval(cup(complete 3*complete 2*complete 1, cup(complete 2**2*complete 1**2,complete 2**3)))} +\spadpaste{eval(cup(complete 3*complete 2*complete 1, +cup(complete 2**2*complete 1**2,complete 2**3)))} } \xtc{ The cycle index of vertices of a square is dihedral 4. @@ -4873,14 +4541,14 @@ and \spad{n} edges. \spadpaste{eval(ZeroOrOne, graphs 5) \free{zo}} } \xtc{ -The coefficient of \texht{$x^n$}{\spad{x**n}} is the number of necklaces with -\spad{n} red beads and \spad{n-8} green beads. +The coefficient of \texht{$x^n$}{\spad{x**n}} is the number of +necklaces with \spad{n} red beads and \spad{n-8} green beads. }{ \spadpaste{eval(ZeroOrOne,dihedral 8) \free{zo}} } \xtc{ -The coefficient of \texht{$x^n$}{\spad{x**n}} is the number of partitions of -\spad{n} into 4 or fewer parts. +The coefficient of \texht{$x^n$}{\spad{x**n}} is the number of +partitions of \spad{n} into 4 or fewer parts. }{ \spadpaste{eval(Integers,complete 4) \free{i}} } @@ -4977,23 +4645,16 @@ The smallest is @ \section{coverex.ht} -\subsection{Examples Of Axiom Commands} -DO NOT EDIT! Created by ex2ht. -\begin{itemize} -\item Menuexdiff \ref{Menuexdiff} on page~\pageref{Menuexdiff} -\item Menuexint \ref{Menuexint} on page~\pageref{Menuexint} -\item Menuexlap \ref{Menuexlap} on page~\pageref{Menuexlap} -\item Menuexlimit \ref{Menuexlimit} on page~\pageref{Menuexlimit} -\item Menuexmatrix \ref{Menuexmatrix} on page~\pageref{Menuexmatrix} -\item Menuexplot2d \ref{Menuexplot2d} on page~\pageref{Menuexplot2d} -\item Menuexplot3d \ref{Menuexplot3d} on page~\pageref{Menuexplot3d} -\item Menuexseries \ref{Menuexseries} on page~\pageref{Menuexseries} -\item Menuexsum \ref{Menuexsum} on page~\pageref{Menuexsum} -\end{itemize} -\label{ExampleCoverPage} -\index{pages!ExampleCoverPage!coverex.ht} -\index{coverex.ht!pages!ExampleCoverPage} -\index{ExampleCoverPage!coverex.ht!pages} +\pagehead{ExampleCoverPage}{coverex.ht}{Examples Of Axiom Commands} +\pageto{notitle}{Menuexdiff} +\pageto{notitle}{Menuexint} +\pageto{notitle}{Menuexlap} +\pageto{notitle}{Menuexlimit} +\pageto{notitle}{Menuexmatrix} +\pageto{notitle}{Menuexplot2d} +\pageto{notitle}{Menuexplot3d} +\pageto{notitle}{Menuexseries} +\pageto{notitle}{Menuexsum} <>= \begin{page}{ExampleCoverPage}{Examples Of Axiom Commands} \beginscroll\table{ @@ -5009,29 +4670,20 @@ DO NOT EDIT! Created by ex2ht. }\endscroll\end{page} @ -\subsection{Differentiation} -\label{Menuexdiff} -\begin{itemize} -\item ExDiffBasic \ref{ExDiffBasic} on page~\pageref{ExDiffBasic} -\item ExDiffSeveralVariables \ref{ExDiffSeveralVariables} on -page~\pageref{ExDiffSeveralVariables} -\item ExDiffHigherOrder \ref{ExDiffHigherOrder} on -page~\pageref{ExDiffHigherOrder} -\item ExDiffMultipleI \ref{ExDiffMultipleI} on page~\pageref{ExDiffMultipleI} -\item ExDiffMultipleII \ref{ExDiffMultipleII} on -page~\pageref{ExDiffMultipleII} -\item ExDiffFormalIntegral \ref{ExDiffFormalIntegral} on -page~\pageref{ExDiffFormalIntegral} -\end{itemize} -\index{pages!Menuexdiff!coverex.ht} -\index{coverex.ht!pages!Menuexdiff} -\index{Menuexdiff!coverex.ht!pages} +\pagehead{Menuexdiff}{coverex.ht}{Differentiation} +\pageto{notitle}{ExDiffBasic} +\pageto{notitle}{ExDiffSeveralVariables} +\pageto{notitle}{ExDiffHigherOrder} +\pageto{notitle}{ExDiffMultipleI} +\pageto{notitle}{ExDiffMultipleII} +\pageto{notitle}{ExDiffFormalIntegral} <>= \begin{page}{Menuexdiff}{Differentiation} \beginscroll\beginmenu \menudownlink{Computing Derivatives}{ExDiffBasic} \spadpaste{differentiate(sin(x) * exp(x**2),x)} -\menudownlink{Derivatives of Functions of Several Variables}{ExDiffSeveralVariables} +\menudownlink{Derivatives of Functions of Several Variables} +{ExDiffSeveralVariables} \spadpaste{differentiate(sin(x) * tan(y)/(x**2 + y**2),x)} \spadpaste{differentiate(sin(x) * tan(y)/(x**2 + y**2),y)} \menudownlink{Derivatives of Higher Order}{ExDiffHigherOrder} @@ -5041,37 +4693,24 @@ page~\pageref{ExDiffFormalIntegral} \spadpaste{differentiate(sin(x)/(x**2 + y**2),[x,y,y])} \menudownlink{Multiple Derivatives II}{ExDiffMultipleII} \spadpaste{differentiate(cos(z)/(x**2 + y**3),[x,y,z],[1,2,3])} -\menudownlink{Derivatives of Functions Involving Formal Integrals}{ExDiffFormalIntegral} +\menudownlink{Derivatives of Functions Involving Formal Integrals} +{ExDiffFormalIntegral} \spadpaste{f := integrate(sqrt(1 + t**3),t) \bound{f}} \spadpaste{differentiate(f,t) \free{f}} \spadpaste{differentiate(f * t**2,t) \free{f}} \endmenu\endscroll\end{page} @ -\subsection{Integration} -\label{Menuexint} -\begin{itemize} -\item ExIntRationalFunction \ref{ExIntRationalFunction} on -page~\pageref{ExIntRationalFunction} -\item ExIntRationalWithRealParameter \ref{ExIntRationalWithRealParameter} on -page~\pageref{ExIntRationalWithRealParameter} -\item ExIntRationalWithComplexParameter -\ref{ExIntRationalWithComplexParameter} on -page~\pageref{ExIntRationalWithComplexParameter} -\item ExIntTwoSimilarIntegrands \ref{ExIntTwoSimilarIntegrands} on -page~\pageref{ExIntTwoSimilarIntegrands} -\item ExIntNoSolution \ref{ExIntNoSolution} on page~\pageref{ExIntNoSolution} -\item ExIntTrig \ref{ExIntTrig} on page~\pageref{ExIntTrig} -\item ExIntAlgebraicRelation \ref{ExIntAlgebraicRelation} on -page~\pageref{ExIntAlgebraicRelation} -\item ExIntRadicalOfTranscendental \ref{ExIntRadicalOfTranscendental} on -page~\pageref{ExIntRadicalOfTranscendental} -\item ExIntNonElementary \ref{ExIntNonElementary} on -page~\pageref{ExIntNonElementary} -\end{itemize} -\index{pages!Menuexint!coverex.ht} -\index{coverex.ht!pages!Menuexint} -\index{Menuexint!coverex.ht!pages} +\pagehead{Menuexint}{coverex.ht}{Integration} +\pageto{notitle}{ExIntRationalFunction} +\pageto{notitle}{ExIntRationalWithRealParameter} +\pageto{notitle}{ExIntRationalWithComplexParameter} +\pageto{notitle}{ExIntTwoSimilarIntegrands} +\pageto{notitle}{ExIntNoSolution} +\pageto{notitle}{ExIntTrig} +\pageto{notitle}{ExIntAlgebraicRelation} +\pageto{notitle}{ExIntRadicalOfTranscendental} +\pageto{notitle}{ExIntNonElementary} <>= \begin{page}{Menuexint}{Integration} \beginscroll\beginmenu @@ -5079,48 +4718,53 @@ page~\pageref{ExIntNonElementary} \spadpaste{integrate((x**2+2*x+1)/((x+1)**6+1),x)} \spadpaste{integrate(1/(x**3+x+1),x) \bound{i}} \spadpaste{definingPolynomial(tower(\%).2::EXPR INT) \free{i}} -\menudownlink{Integral of a Rational Function with a Real Parameter}{ExIntRationalWithRealParameter} +\menudownlink{Integral of a Rational Function with a Real Parameter} +{ExIntRationalWithRealParameter} \spadpaste{integrate(1/(x**2 + a),x)} -\menudownlink{Integral of a Rational Function with a Complex Parameter}{ExIntRationalWithComplexParameter} +\menudownlink{Integral of a Rational Function with a Complex Parameter} +{ExIntRationalWithComplexParameter} \spadpaste{complexIntegrate(1/(x**2 + a),x)} -\menudownlink{Two Similar Integrands Producing Very Different Results}{ExIntTwoSimilarIntegrands} +\menudownlink{Two Similar Integrands Producing Very Different Results} +{ExIntTwoSimilarIntegrands} \spadpaste{integrate(x**3 / (a+b*x)**(1/3),x)} \spadpaste{integrate(1 / (x**3 * (a+b*x)**(1/3)),x)} \menudownlink{An Integral Which Does Not Exist}{ExIntNoSolution} \spadpaste{integrate(log(1 + sqrt(a*x + b)) / x,x)} \menudownlink{A Trigonometric Function of a Quadratic}{ExIntTrig} -\spadpaste{integrate((sinh(1+sqrt(x+b))+2*sqrt(x+b))/(sqrt(x+b)*(x+cosh(1+sqrt(x+b)))),x)} -\menudownlink{Integrating a Function with a Hidden Algebraic Relation}{ExIntAlgebraicRelation} +\spadpaste{integrate((sinh(1+sqrt(x+b))+2*sqrt(x+b))/ +(sqrt(x+b)*(x+cosh(1+sqrt(x+b)))),x)} +\menudownlink{Integrating a Function with a Hidden Algebraic Relation} +{ExIntAlgebraicRelation} \spadpaste{integrate(tan(atan(x)/3),x)} -\menudownlink{Details for integrating a function wiht a Hidden Algebraic Relation}{ExIntAlgebraicRelationExplain} -\menudownlink{An Integral Involving a Root of a Transcendental Function}{ExIntRadicalOfTranscendental} +\menudownlink +{Details for integrating a function with a Hidden Algebraic Relation} +{ExIntAlgebraicRelationExplain} +\menudownlink{An Integral Involving a Root of a Transcendental Function} +{ExIntRadicalOfTranscendental} \spadpaste{integrate((x + 1) / (x * (x + log x)**(3/2)),x)} \menudownlink{An Integral of a Non-elementary Function}{ExIntNonElementary} -\spadpaste{integrate(exp(-x**2) * erf(x) / (erf(x)**3 - erf(x)**2 - erf(x) + 1),x)} +\spadpaste{integrate(exp(-x**2) * erf(x) / +(erf(x)**3 - erf(x)**2 - erf(x) + 1),x)} \endmenu\endscroll\end{page} @ -\subsection{Laplace Transforms} -\label{Menuexlap} -\begin{itemize} -\item ExLapSimplePole \ref{ExLapSimplePole} on page~\pageref{ExLapSimplePole} -\item ExLapTrigTrigh \ref{ExLapTrigTrigh} on page~\pageref{ExLapTrigTrigh} -\item ExLapDefInt \ref{ExLapDefInt} on page~\pageref{ExLapDefInt} -\item ExLapExpExp \ref{ExLapExpExp} on page~\pageref{ExLapExpExp} -\item ExLapSpecial1 \ref{ExLapSpecial1} on page~\pageref{ExLapSpecial1} -\item ExLapSpecial2 \ref{ExLapSpecial2} on page~\pageref{ExLapSpecial2} -\end{itemize} -\index{pages!Menuexlap!coverex.ht} -\index{coverex.ht!pages!Menuexlap} -\index{Menuexlap!coverex.ht!pages} +\pagehead{Menuexlap}{coverex.ht}{Laplace Transforms} +\pageto{notitle}{ExLapSimplePole} +\pageto{notitle}{ExLapTrigTrigh} +\pageto{notitle}{ExLapDefInt} +\pageto{notitle}{ExLapExpExp} +\pageto{notitle}{ExLapSpecial1} +\pageto{notitle}{ExLapSpecial2} <>= \begin{page}{Menuexlap}{Laplace Transforms} \beginscroll\beginmenu \menudownlink{Laplace transform with a single pole}{ExLapSimplePole} \spadpaste{laplace(t**4 * exp(-a*t) / factorial(4), t, s)} -\menudownlink{Laplace transform of a trigonometric function}{ExLapTrigTrigh} +\menudownlink{Laplace transform of a trigonometric function} +{ExLapTrigTrigh} \spadpaste{laplace(sin(a*t) * cosh(a*t) - cos(a*t) * sinh(a*t), t, s)} -\menudownlink{Laplace transform requiring a definite integration}{ExLapDefInt} +\menudownlink{Laplace transform requiring a definite integration} +{ExLapDefInt} \spadpaste{laplace(2/t * (1 - cos(a*t)), t, s)} \menudownlink{Laplace transform of exponentials}{ExLapExpExp} \spadpaste{laplace((exp(a*t) - exp(b*t))/t, t, s)} @@ -5131,23 +4775,14 @@ page~\pageref{ExIntNonElementary} \endmenu\endscroll\end{page} @ -\subsection{Limits} -\label{Menuexlimit} -\begin{itemize} -\item ExLimitBasic \ref{ExLimitBasic} on page~\pageref{ExLimitBasic} -\item ExLimitParameter \ref{ExLimitParameter} on -page~\pageref{ExLimitParameter} -\item ExLimitOneSided \ref{ExLimitOneSided} on page~\pageref{ExLimitOneSided} -\item ExLimitTwoSided \ref{ExLimitTwoSided} on page~\pageref{ExLimitTwoSided} -\item ExLimitInfinite \ref{ExLimitInfinite} on page~\pageref{ExLimitInfinite} -\item ExLimitRealComplex \ref{ExLimitRealComplex} on -page~\pageref{ExLimitRealComplex} -\item ExLimitComplexInfinite \ref{ExLimitComplexInfinite} on -page~\pageref{ExLimitComplexInfinite} -\end{itemize} -\index{pages!Menuexlimit!coverex.ht} -\index{coverex.ht!pages!Menuexlimit} -\index{Menuexlimit!coverex.ht!pages} +\pagehead{Menuexlimit}{coverex.ht}{Limits} +\pageto{notitle}{ExLimitBasic} +\pageto{notitle}{ExLimitParameter} +\pageto{notitle}{ExLimitOneSided} +\pageto{notitle}{ExLimitTwoSided} +\pageto{notitle}{ExLimitInfinite} +\pageto{notitle}{ExLimitRealComplex} +\pageto{notitle}{ExLimitComplexInfinite} <>= \begin{page}{Menuexlimit}{Limits} \beginscroll\beginmenu @@ -5174,26 +4809,18 @@ page~\pageref{ExLimitComplexInfinite} \endmenu\endscroll\end{page} @ -\subsection{Matrices} -\label{Menuexmatrix} -\begin{itemize} -\item ExMatrixBasicFunction \ref{ExMatrixBasicFunction} on -page~\pageref{ExMatrixBasicFunction} -\item ExConstructMatrix \ref{ExConstructMatrix} on -page~\pageref{ExConstructMatrix} -\item ExTraceMatrix \ref{ExTraceMatrix} on page~\pageref{ExTraceMatrix} -\item ExDeterminantMatrix \ref{ExDeterminantMatrix} on -page~\pageref{ExDeterminantMatrix} -\item ExInverseMatrix \ref{ExInverseMatrix} on page~\pageref{ExInverseMatrix} -\item ExRankMatrix \ref{ExRankMatrix} on page~\pageref{ExRankMatrix} -\end{itemize} -\index{pages!Menuexmatrix!coverex.ht} -\index{coverex.ht!pages!Menuexmatrix} -\index{Menuexmatrix!coverex.ht!pages} +\pagehead{Menuexmatrix}{coverex.ht}{Matrices} +\pageto{notitle}{ExMatrixBasicFunction} +\pageto{notitle}{ExConstructMatrix} +\pageto{notitle}{ExTraceMatrix} +\pageto{notitle}{ExDeterminantMatrix} +\pageto{notitle}{ExInverseMatrix} +\pageto{notitle}{ExRankMatrix} <>= \begin{page}{Menuexmatrix}{Matrices} \beginscroll\beginmenu -\menudownlink{Basic Arithmetic Operations on Matrices}{ExMatrixBasicFunction} +\menudownlink{Basic Arithmetic Operations on Matrices} +{ExMatrixBasicFunction} \spadpaste{m1 := matrix([[1,-2,1],[4,2,-4]]) \bound{m1}} \spadpaste{m2 := matrix([[1,0,2],[20,30,10],[0,200,100]]) \bound{m2}} \spadpaste{m3 := matrix([[1,2,3],[2,4,6]]) \bound{m3}} @@ -5204,15 +4831,21 @@ page~\pageref{ExDeterminantMatrix} \spadpaste{m3 *vector([1,0,1]) \free{m3}} \menudownlink{Constructing new Matrices}{ExConstructMatrix} \spadpaste{diagonalMatrix([1,2,3,2,1])} -\spadpaste{subMatrix(matrix([[0,1,2,3,4],[5,6,7,8,9],[10,11,12,13,14]]), 1,3,2,4)} -\spadpaste{horizConcat(matrix([[1,2,3],[6,7,8]]),matrix([[11,12,13],[55,77,88]])) } -\spadpaste{vertConcat(matrix([[1,2,3],[6,7,8]]),matrix([[11,12,13],[55,77,88]])) } +\spadpaste{subMatrix(matrix([[0,1,2,3,4],[5,6,7,8,9],[10,11,12,13,14]]), +1,3,2,4)} +\spadpaste{horizConcat(matrix([[1,2,3],[6,7,8]]), +matrix([[11,12,13],[55,77,88]])) } +\spadpaste{vertConcat(matrix([[1,2,3],[6,7,8]]), +matrix([[11,12,13],[55,77,88]])) } \spadpaste{b:=matrix([[0,1,2,3,4],[5,6,7,8,9],[10,11,12,13,14]]) \bound{b}} \spadpaste{setsubMatrix!(b,1,1,transpose(subMatrix(b,1,3,1,3)))\free{b}} \menudownlink{Trace of a Matrix}{ExTraceMatrix} -\spadpaste{trace( matrix([[1,x,x**2,x**3],[1,y,y**2,y**3],[1,z,z**2,z**3],[1,u,u**2,u**3]]) )} +\spadpaste{trace( +matrix([[1,x,x**2,x**3],[1,y,y**2,y**3], +[1,z,z**2,z**3],[1,u,u**2,u**3]]) )} \menudownlink{Determinant of a Matrix}{ExDeterminantMatrix} -\spadpaste{determinant(matrix([[1,2,3,4],[2,3,2,5],[3,4,5,6],[4,1,6,7]]))} +\spadpaste{ +determinant(matrix([[1,2,3,4],[2,3,2,5],[3,4,5,6],[4,1,6,7]]))} \menudownlink{Inverse of a Matrix}{ExInverseMatrix} \spadpaste{inverse(matrix([[1,2,1],[-2,3,4],[-1,5,6]])) } \menudownlink{Rank of a Matrix}{ExRankMatrix} @@ -5220,20 +4853,11 @@ page~\pageref{ExDeterminantMatrix} \endmenu\endscroll\end{page} @ -\subsection{2-D Graphics} -\label{Menuexplot2d} -\begin{itemize} -\item ExPlot2DFunctions \ref{ExPlot2DFunctions} on -page~\pageref{ExPlot2DFunctions} -\item ExPlot2DParametric \ref{ExPlot2DParametric} on -page~\pageref{ExPlot2DParametric} -\item ExPlot2DPolar \ref{ExPlot2DPolar} on page~\pageref{ExPlot2DPolar} -\item ExPlot2DAlgebraic \ref{ExPlot2DAlgebraic} on -page~\pageref{ExPlot2DAlgebraic} -\end{itemize} -\index{pages!Menuexplot2d!coverex.ht} -\index{coverex.ht!pages!Menuexplot2d} -\index{Menuexplot2d!coverex.ht!pages} +\pagehead{Menuexplot2d}{coverex.ht}{2-D Graphics} +\pageto{notitle}{ExPlot2DFunctions} +\pageto{notitle}{ExPlot2DParametric} +\pageto{notitle}{ExPlot2DPolar} +\pageto{notitle}{ExPlot2DAlgebraic} <>= \begin{page}{Menuexplot2d}{2-D Graphics} \beginscroll\beginmenu @@ -5248,26 +4872,18 @@ page~\pageref{ExPlot2DAlgebraic} \endmenu\endscroll\end{page} @ -\subsection{3-D Graphics} -\label{Menuexplot3d} -\begin{itemize} -\item ExPlot3DFunctions \ref{ExPlot3DFunctions} on -page~\pageref{ExPlot3DFunctions} -\item ExPlot3DParametricSurface \ref{ExPlot3DParametricSurface} on -page~\pageref{ExPlot3DParametricSurface} -\item ExPlot3DParametricCurve \ref{ExPlot3DParametricCurve} on -page~\pageref{ExPlot3DParametricCurve} -\end{itemize} -\index{pages!Menuexplot3d!coverex.ht} -\index{coverex.ht!pages!Menuexplot3d} -\index{Menuexplot3d!coverex.ht!pages} +\pagehead{Menuexplot3d}{coverex.ht}{3-D Graphics} +\pageto{notitle}{ExPlot3DFunctions} +\pageto{notitle}{ExPlot3DParametricSurface} +\pageto{notitle}{ExPlot3DParametricCurve} <>= \begin{page}{Menuexplot3d}{3-D Graphics} \beginscroll\beginmenu \menudownlink{Plotting Functions of Two Variables}{ExPlot3DFunctions} \graphpaste{draw(cos(x*y),x = -3..3,y = -3..3)} \menudownlink{Plotting Parametric Surfaces}{ExPlot3DParametricSurface} -\graphpaste{draw(surface(5*sin(u)*cos(v),4*sin(u)*sin(v),3*cos(u)),u=0..\%pi,v=0..2*\%pi)} +\graphpaste{draw(surface(5*sin(u)*cos(v),4*sin(u)*sin(v),3*cos(u)), +u=0..\%pi,v=0..2*\%pi)} \graphpaste{draw(surface(u*cos(v),u*sin(v),u),u=0..4,v=0..2*\%pi)} \menudownlink{Plotting Parametric Curves}{ExPlot3DParametricCurve} \graphpaste{draw(curve(cos(t),sin(t),t),t=0..6)} @@ -5275,20 +4891,11 @@ page~\pageref{ExPlot3DParametricCurve} \endmenu\endscroll\end{page} @ -\subsection{Series} -\label{Menuexseries} -\begin{itemize} -\item ExSeriesConvert \ref{ExSeriesConvert} on page~\pageref{ExSeriesConvert} -\item ExSeriesManipulate \ref{ExSeriesManipulate} on -page~\pageref{ExSeriesManipulate} -\item ExSeriesFunctions \ref{ExSeriesFunctions} on -page~\pageref{ExSeriesFunctions} -\item ExSeriesSubstitution \ref{ExSeriesSubstitution} on -page~\pageref{ExSeriesSubstitution} -\end{itemize} -\index{pages!Menuexseries!coverex.ht} -\index{coverex.ht!pages!Menuexseries} -\index{Menuexseries!coverex.ht!pages} +\pagehead{Menuexseries}{coverex.ht}{Series} +\pageto{notitle}{ExSeriesConvert} +\pageto{notitle}{ExSeriesManipulate} +\pageto{notitle}{ExSeriesFunctions} +\pageto{notitle}{ExSeriesSubstitution} <>= \begin{page}{Menuexseries}{Series} \beginscroll\beginmenu @@ -5302,31 +4909,22 @@ page~\pageref{ExSeriesSubstitution} \spadpaste{f := series(1/(1-x),x = 0) \bound{f1}} \spadpaste{g := log(f) \free{f1} \bound{g}} \spadpaste{exp(g) \free{g}} -\menudownlink{Substituting Numerical Values in Power Series}{ExSeriesSubstitution} +\menudownlink{Substituting Numerical Values in Power Series} +{ExSeriesSubstitution} \spadpaste{f := taylor(exp(x)) \bound{f2}} \spadpaste{eval(f,1.0) \free{f2}} \endmenu\endscroll\end{page} @ -\subsection{Summations} -\label{Menuexsum} -\begin{itemize} -\item ExSumListEntriesI \ref{ExSumListEntriesI} on -page~\pageref{ExSumListEntriesI} -\item ExSumListEntriesII \ref{ExSumListEntriesII} on -page~\pageref{ExSumListEntriesII} -\item ExSumApproximateE \ref{ExSumApproximateE} on -page~\pageref{ExSumApproximateE} -\item ExSumClosedForm \ref{ExSumClosedForm} on page~\pageref{ExSumClosedForm} -\item ExSumCubes \ref{ExSumCubes} on page~\pageref{ExSumCubes} -\item ExSumPolynomial \ref{ExSumPolynomial} on page~\pageref{ExSumPolynomial} -\item ExSumGeneralFunction \ref{ExSumGeneralFunction} on -page~\pageref{ExSumGeneralFunction} -\item ExSumInfinite \ref{ExSumInfinite} on page~\pageref{ExSumInfinite} -\end{itemize} -\index{pages!Menuexsum!coverex.ht} -\index{coverex.ht!pages!Menuexsum} -\index{Menuexsum!coverex.ht!pages} +\pagehead{Menuexsum}{coverex.ht}{Summations} +\pageto{notitle}{ExSumListEntriesI} +\pageto{notitle}{ExSumListEntriesII} +\pageto{notitle}{ExSumApproximateE} +\pageto{notitle}{ExSumClosedForm} +\pageto{notitle}{ExSumCubes} +\pageto{notitle}{ExSumPolynomial} +\pageto{notitle}{ExSumGeneralFunction} +\pageto{notitle}{ExSumInfinite} <>= \begin{page}{Menuexsum}{Summations} \beginscroll\beginmenu @@ -5355,24 +4953,10 @@ page~\pageref{ExSumGeneralFunction} @ \section{decimal.ht} -<>= -\newcommand{\DecimalExpansionXmpTitle}{DecimalExpansion} -\newcommand{\DecimalExpansionXmpNumber}{9.15} - -@ -\subsection{Decimal Expansion} -\label{DecimalExpansionXmpPage} -\begin{itemize} -\item BinaryExpansionXmpPage \ref{BinaryExpansionXmpPage} on -page~\pageref{BinaryExpansionXmpPage} -\item HexadecimalExpansionXmpPage \ref{HexadecimalExpansionXmpPage} on -page~\pageref{HexadecimalExpansionXmpPage} -\item RadixExpansionXmpPage \ref{RadixExpansionXmpPage} on -page~\pageref{RadixExpansionXmpPage} -\end{itemize} -\index{pages!DecimalExpansionXmpPage!decimal.ht} -\index{decimal.ht!pages!DecimalExpansionXmpPage} -\index{DecimalExpansionXmpPage!decimal.ht!pages} +\pagehead{DecimalExpansionXmpPage}{decimal.ht}{Decimal Expansion} +\pageto{notitle}{BinaryExpansionXmpPage} +\pageto{notitle}{HexExpansionXmpPage} +\pageto{notitle}{RadixExpansionXmpPage} <>= \begin{page}{DecimalExpansionXmpPage}{Decimal Expansion} \beginscroll @@ -5382,8 +4966,10 @@ All rationals have repeating decimal expansions. Operations to access the individual digits of a decimal expansion can be obtained by converting the value to \spadtype{RadixExpansion(10)}. More examples of expansions are available in -\downlink{`BinaryExpansion'}{BinaryExpansionXmpPage}\ignore{BinaryExpansion}, -\downlink{`HexadecimalExpansion'}{HexadecimalExpansionXmpPage}\ignore{HexadecimalExpansion}, and +\downlink{`BinaryExpansion'}{BinaryExpansionXmpPage} +\ignore{BinaryExpansion}, +\downlink{`HexadecimalExpansion'}{HexExpansionXmpPage} +\ignore{HexadecimalExpansion}, and \downlink{`RadixExpansion'}{RadixExpansionXmpPage}\ignore{RadixExpansion}. \showBlurb{DecimalExpansion} @@ -5411,7 +4997,8 @@ or very long. \xtc{ These numbers are bona fide algebraic objects. }{ -\spadpaste{p := decimal(1/4)*x**2 + decimal(2/3)*x + decimal(4/9) \bound{p}} +\spadpaste{p := decimal(1/4)*x**2 + decimal(2/3)*x + decimal(4/9) +\bound{p}} } \xtc{ }{ @@ -5427,23 +5014,15 @@ These numbers are bona fide algebraic objects. @ \section{derham.ht} -<>= -\newcommand{\DeRhamComplexXmpTitle}{DeRhamComplex} -\newcommand{\DeRhamComplexXmpNumber}{9.14} -@ -\subsection{DeRhamComplex} -\label{DeRhamComplexXmpPage} -\index{pages!DeRhamComplexXmpPage!derham.ht} -\index{derham.ht!pages!DeRhamComplexXmpPage} -\index{DeRhamComplexXmpPage!derham.ht!pages} +\pagehead{DeRhamComplexXmpPage}{derham.ht}{DeRhamComplex} <>= \begin{page}{DeRhamComplexXmpPage}{DeRhamComplex} \beginscroll The domain constructor \spadtype{DeRhamComplex} creates the class of differential forms of arbitrary degree over a coefficient ring. -The De Rham complex constructor takes two arguments: a ring, \spad{coefRing,} -and a list of coordinate variables. +The De Rham complex constructor takes two arguments: a ring, +\spad{coefRing,} and a list of coordinate variables. \xtc{ This is the ring of coefficients. @@ -5459,7 +5038,8 @@ These are the coordinate variables. This is the De Rham complex of Euclidean three-space using coordinates \spad{x, y} and \spad{z.} }{ -\spadpaste{der := DERHAM(coefRing,lv) \free{coefRing}\free{lv}\bound{der}} +\spadpaste{der := DERHAM(coefRing,lv) \free{coefRing}\free{lv} +\bound{der}} } This complex allows us to describe differential forms having @@ -5505,16 +5085,19 @@ the multiplicative basis elements for the exterior algebra over \spad{R}. \xtc{ This is an alternative way to give the above assignments. }{ -\spadpaste{[dx,dy,dz] := [generator(i)\$der for i in 1..3] \free{der}\bound{dxyz}} +\spadpaste{[dx,dy,dz] := [generator(i)\$der for i in 1..3] \free{der} +\bound{dxyz}} } \xtc{ Now we define some one-forms. }{ -\spadpaste{alpha : der := f*dx + g*dy + h*dz \bound{alpha}\free{der f g h dxyz}} +\spadpaste{alpha : der := f*dx + g*dy + h*dz \bound{alpha} +\free{der f g h dxyz}} } \xtc{ }{ -\spadpaste{beta : der := cos(tan(x*y*z)+x*y*z)*dx + x*dy \bound{beta}\free{der f g h dxyz}} +\spadpaste{beta : der := cos(tan(x*y*z)+x*y*z)*dx + x*dy +\bound{beta}\free{der f g h dxyz}} } \xtc{ A well-known theorem states that the composition of @@ -5543,10 +5126,13 @@ D(a*b) = D(a)*b + (-1)**degree(a)*a*D(b) \xtc{ We try this for the one-forms \spad{alpha} and \spad{beta}. }{ -\spadpaste{exteriorDifferential(gamma) - (exteriorDifferential(alpha)*beta - alpha * exteriorDifferential(beta)) \free{alpha beta gamma}} +\spadpaste{exteriorDifferential(gamma) - +(exteriorDifferential(alpha)*beta - alpha * exteriorDifferential(beta)) +\free{alpha beta gamma}} } \xtc{ -Now we define some ``basic operators'' (see \downlink{`Operator'}{OperatorXmpPage}\ignore{Operator}). +Now we define some ``basic operators'' (see +\downlink{`Operator'}{OperatorXmpPage}\ignore{Operator}). }{ \spadpaste{a : BOP := operator('a) \bound{ao}} } @@ -5562,11 +5148,13 @@ Now we define some ``basic operators'' (see \downlink{`Operator'}{OperatorXmpPag We also define some indeterminate one- and two-forms using these operators. }{ -\spadpaste{sigma := a(x,y,z) * dx + b(x,y,z) * dy + c(x,y,z) * dz \bound{sigma}\free{ao bo co dxyz}} +\spadpaste{sigma := a(x,y,z) * dx + b(x,y,z) * dy + c(x,y,z) * dz +\bound{sigma}\free{ao bo co dxyz}} } \xtc{ }{ -\spadpaste{theta := a(x,y,z) * dx * dy + b(x,y,z) * dx * dz + c(x,y,z) * dy * dz \bound{theta}\free{ao bo co dxyz}} +\spadpaste{theta := a(x,y,z) * dx * dy + b(x,y,z) * dx * +dz + c(x,y,z) * dy * dz \bound{theta}\free{ao bo co dxyz}} } \xtc{ @@ -5603,7 +5191,8 @@ multiply the function by ``one.'' A current limitation of Axiom forces you to write functions with more than four arguments using square brackets in this way. }{ -\spadpaste{h1 : der := a([x,y,x,t,x,z,y,r,u,x]) * one \free{der one ao}\bound{h1}} +\spadpaste{h1 : der := a([x,y,x,t,x,z,y,r,u,x]) * one +\free{der one ao}\bound{h1}} } \xtc{ @@ -5638,24 +5227,10 @@ consists of the eight forms: \spad{1}, \spad{dx}, \spad{dy}, \spad{dz}, @ \section{dfloat.ht} -<>= -\newcommand{\DoubleFloatXmpTitle}{DoubleFloat} -\newcommand{\DoubleFloatXmpNumber}{9.17} - -@ -\subsection{DoubleFloat} -\label{DoubleFloatXmpPage} -\begin{itemize} -\item ugGraphPage \ref{ugGraphPage} on -page~\pageref{ugGraphPage} -\item ugProblemNumericPage \ref{ugProblemNumericPage} on -page~\pageref{ugProblemNumericPage} -\item FloatXmpPage \ref{FloatXmpPage} on -page~\pageref{FloatXmpPage} -\end{itemize} -\index{pages!DoubleFloatXmpPage!dfloat.ht} -\index{dfloat.ht!pages!DoubleFloatXmpPage} -\index{DoubleFloatXmpPage!dfloat.ht!pages} +\pagehead{DoubleFloatXmpPage}{dfloat.ht}{DoubleFloat} +\pageto{notitle}{ugGraphPage} +\pageto{notitle}{ugProblemNumericPage} +\pageto{notitle}{FloatXmpPage} <>= \begin{page}{DoubleFloatXmpPage}{DoubleFloat} \beginscroll @@ -5681,7 +5256,7 @@ twenty to two hundred times more time than hardware floating point. The usual arithmetic and elementary functions are available for \spadtype{DoubleFloat}. Use \spadsys{)show DoubleFloat} to get a list of operations or -the \HyperName{} \Browse{} facility to get more extensive +the Hyperdoc \Browse{} facility to get more extensive documentation about \spadtype{DoubleFloat}. \xtc{ @@ -5751,8 +5326,10 @@ By far, the most common usage of \spadtype{DoubleFloat} is for functions to be graphed. For more information about Axiom's numerical and graphical facilities, see -\downlink{``\ugGraphTitle''}{ugGraphPage} in Section \ugGraphNumber\ignore{ugGraph}, -\downlink{``\ugProblemNumericTitle''}{ugProblemNumericPage} in Section \ugProblemNumericNumber\ignore{ugProblemNumeric}, and +\downlink{``\ugGraphTitle''}{ugGraphPage} in Section \ugGraphNumber +\ignore{ugGraph}, +\downlink{``\ugProblemNumericTitle''}{ugProblemNumericPage} in +Section \ugProblemNumericNumber\ignore{ugProblemNumeric}, and \downlink{`Float'}{FloatXmpPage}\ignore{Float}. \endscroll \autobuttons @@ -5760,39 +5337,24 @@ facilities, see @ \section{dmp.ht} +\pagehead{DistributedMultivariatePolyXmpPage}{dmp.ht} +{DistributedMultivariatePoly} +\pageto{notitle}{ugIntroVariablesPage} +\pageto{notitle}{ugTypesConvertPage} +\pageto{notitle}{PolynomialXmpPage} +\pageto{notitle}{UnivariatePolyXmpPage} +\pageto{notitle}{MultivariatePolyXmpPage} <>= -\newcommand{\DistributedMultivariatePolynomialXmpTitle} -{DistributedMultivariatePolynomial} -\newcommand{\DistributedMultivariatePolynomialXmpNumber}{9.16} -@ -\subsection{DistributedMultivariatePolynomial} -\label{DistributedMultivariatePolynomialXmpPage} -\begin{itemize} -\item ugIntroVariablesPage \ref{ugIntroVariablesPage} on -page~\pageref{ugIntroVariablesPage} -\item ugTypesConvertPage \ref{ugTypesConvertPage} on -page~\pageref{ugTypesConvertPage} -\item PolynomialXmpPage \ref{PolynomialXmpPage} on -page~\pageref{PolynomialXmpPage} -\item UnivariatePolynomialXmpPage \ref{UnivariatePolynomialXmpPage} on -page~\pageref{UnivariatePolynomialXmpPage} -\item MultivariatePolynomialXmpPage \ref{MultivariatePolynomialXmpPage} on -page~\pageref{MultivariatePolynomialXmpPage} -\end{itemize} -\index{pages!DistributedMultivariatePolynomialXmpPage!dmp.ht} -\index{dmp.ht!pages!DistributedMultivariatePolynomialXmpPage} -\index{DistributedMultivariatePolynomialXmpPage!dmp.ht!pages} -<>= -\begin{page}{DistributedMultivariatePolynomialXmpPage} -{DistributedMultivariatePolynomial} +\begin{page}{DistributedMultivariatePolyXmpPage} +{DistributedMultivariatePoly} \beginscroll \texht{\hyphenation{ Homo-gen-eous-Dis-tributed-Multi-var-i-ate-Pol-y-nomial }}{} -\spadtype{DistributedMultivariatePolynomial} and -\spadtype{HomogeneousDistributedMultivariatePolynomial}, abbreviated +\spadtype{DistributedMultivariatePoly} and +\spadtype{HomogeneousDistributedMultivariatePoly}, abbreviated \spadtype{DMP} and \spadtype{HDMP}, respectively, are very similar to \spadtype{MultivariatePolynomial} except that they are represented and displayed in a non-recursive manner. @@ -5838,7 +5400,7 @@ when we use the \spadtype{HDMP} polynomials, as expected. \spadpaste{groebner [n1,n2,n3] \free{n}} } -\spadtype{GeneralDistributedMultivariatePolynomial} is somewhat +\spadtype{GeneralDistributedMultivariatePoly} is somewhat more flexible in the sense that as well as accepting a list of variables to specify the variable ordering, it also takes a predicate on exponent vectors to specify the term ordering. @@ -5854,12 +5416,12 @@ in Section \ugIntroVariablesNumber\ignore{ugIntroVariables}, \downlink{``\ugTypesConvertTitle''}{ugTypesConvertPage} in Section \ugTypesConvertNumber\ignore{ugTypesConvert}, \downlink{`Polynomial'}{PolynomialXmpPage}\ignore{Polynomial}, -\downlink{`UnivariatePolynomial'}{UnivariatePolynomialXmpPage} +\downlink{`UnivariatePolynomial'}{UnivariatePolyXmpPage} \ignore{UnivariatePolynomial}, and -\downlink{`MultivariatePolynomial'}{MultivariatePolynomialXmpPage} +\downlink{`MultivariatePolynomial'}{MultivariatePolyXmpPage} \ignore{MultivariatePolynomial}. % -\showBlurb{DistributedMultivariatePolynomial} +\showBlurb{DistributedMultivariatePoly} \endscroll \autobuttons \end{page} @@ -5867,16 +5429,7 @@ in Section \ugTypesConvertNumber\ignore{ugTypesConvert}, @ \section{eq.ht} -<>= -\newcommand{\EquationXmpTitle}{Equation} -\newcommand{\EquationXmpNumber}{9.19} - -@ -\subsection{Equation} -\label{EquationXmpPage} -\index{pages!EquationXmpPage!eq.ht} -\index{eq.ht!pages!EquationXmpPage} -\index{EquationXmpPage!eq.ht!pages} +\pagehead{EquationXmpPage}{eq.ht}{Equation} <>= \begin{page}{EquationXmpPage}{Equation} \beginscroll @@ -5957,16 +5510,8 @@ all one has to do is ask! @ \section{eqtbl.ht} -<>= -\newcommand{\EqTableXmpTitle}{EqTable} -\newcommand{\EqTableXmpNumber}{9.18} -@ -\subsection{EqTable} -\label{EqTableXmpPage} -See TableXmpPage \ref{TableXmpPage} on page~\pageref{TableXmpPage} -\index{pages!EqTableXmpPage!eqtbl.ht} -\index{eqtbl.ht!pages!EqTableXmpPage} -\index{EqTableXmpPage!eqtbl.ht!pages} +\pagehead{EqTableXmpPage}{eqtbl.ht}{EqTable} +\pageto{notitle}{TableXmpPage} <>= \begin{page}{EqTableXmpPage}{EqTable} \beginscroll @@ -6017,11 +5562,7 @@ can be stored under each. @ \section{evalex.ht} -\subsection{Example of Standard Evaluation} -\label{PrefixEval} -\index{pages!PrefixEval!evalex.ht} -\index{evalex.ht!pages!PrefixEval} -\index{PrefixEval!evalex.ht!pages} +\pagehead{PrefixEval}{evalex.ht}{Example of Standard Evaluation} <>= \begin{page}{PrefixEval}{Example of Standard Evaluation} \beginscroll @@ -6059,11 +5600,7 @@ Try it: \autobuttons\end{page} @ -\subsection{Example of Standard Evaluation} -\label{InfixEval} -\index{pages!InfixEval!evalex.ht} -\index{evalex.ht!pages!InfixEval} -\index{InfixEval!evalex.ht!pages} +\pagehead{InfixEval}{evalex.ht}{Example of Standard Evaluation} <>= \begin{page}{InfixEval}{Example of Standard Evaluation} \beginscroll @@ -6072,7 +5609,8 @@ infix operator {\em op} with operands {\em a} and {\em b} by the example: {\em 2 + 3.4}. The evaluation steps are as follows: \vspace{1}\newline -1.\tab{3}{\em a} and {\em b} are evaluated, each producing a value and a type. +1.\tab{3}{\em a} and {\em b} are evaluated, each producing +a value and a type. \newline\tab{3}{\em Example:} {\em 2} evaluates to {\em 2} of type \spadtype{Integer}; {\em 3.4} evaluates to {\em 3.4} of type \spadtype{Float}. @@ -6105,28 +5643,21 @@ Try it: @ \section{exdiff.ht} -\subsection{Computing Derivatives} -\label{ExDiffBasic} -\index{pages!ExDiffBasic!exdiff.ht} -\index{exdiff.ht!pages!ExDiffBasic} -\index{ExDiffBasic!exdiff.ht!pages} +\pagehead{ExDiffBasic}{exdiff.ht}{Computing Derivatives} <>= \begin{page}{ExDiffBasic}{Computing Derivatives} \beginscroll To compute a derivative, you must specify an expression and a variable of differentiation. -For example, to compute the derivative of {\em sin(x) * exp(x**2)} with respect to the -variable {\em x}, issue the following command: +For example, to compute the derivative of {\em sin(x) * exp(x**2)} +with respect to the variable {\em x}, issue the following command: \spadpaste{differentiate(sin(x) * exp(x**2),x)} \endscroll \autobuttons\end{page} @ -\subsection{Derivatives of Functions of Several Variables} -\label{ExDiffSeveralVariables} -\index{pages!ExDiffSeveralVariables!exdiff.ht} -\index{exdiff.ht!pages!ExDiffSeveralVariables} -\index{ExDiffSeveralVariables!exdiff.ht!pages} +\pagehead{ExDiffSeveralVariables}{exdiff.ht} +{Derivatives of Functions of Several Variables} <>= \begin{page}{ExDiffSeveralVariables} {Derivatives of Functions of Several Variables} @@ -6140,11 +5671,7 @@ For example: \autobuttons\end{page} @ -\subsection{Derivatives of Higher Order} -\label{ExDiffHigherOrder} -\index{pages!ExDiffHigherOrder!exdiff.ht} -\index{exdiff.ht!pages!ExDiffHigherOrder} -\index{ExDiffHigherOrder!exdiff.ht!pages} +\pagehead{ExDiffHigherOrder}{exdiff.ht}{Derivatives of Higher Order} <>= \begin{page}{ExDiffHigherOrder}{Derivatives of Higher Order} \beginscroll @@ -6157,21 +5684,18 @@ following command: \autobuttons\end{page} @ -\subsection{Multiple Derivatives I} -\label{ExDiffMultipleI} -\index{pages!ExDiffMultipleI!exdiff.ht} -\index{exdiff.ht!pages!ExDiffMultipleI} -\index{ExDiffMultipleI!exdiff.ht!pages} +\pagehead{ExDiffMultipleI}{exdiff.ht}{Multiple Derivatives I} <>= \begin{page}{ExDiffMultipleI}{Multiple Derivatives I} \beginscroll -When given a function of several variables, you may take derivatives repeatedly -and with respect to different variables. -The following command differentiates the function {\em sin(x)/(x**2 + y**2)} -first with respect to {\em x} and then with respect to {\em y}: +When given a function of several variables, you may take derivatives +repeatedly and with respect to different variables. +The following command differentiates the function +{\em sin(x)/(x**2 + y**2)} first with respect to {\em x} and then with +respect to {\em y}: \spadpaste{differentiate(sin(x)/(x**2 + y**2),[x,y])} -As you can see, we first specify the function and then a list of the variables -of differentiation. +As you can see, we first specify the function and then a list of +the variables of differentiation. Variables may appear on the list more than once. For example, the following command differentiates the same function with respect to {\em x} and then twice with respect to {\em y}. @@ -6180,30 +5704,23 @@ respect to {\em x} and then twice with respect to {\em y}. \autobuttons\end{page} @ -\subsection{Multiple Derivatives II} -\label{ExDiffMultipleII} -\index{pages!ExDiffMultipleII!exdiff.ht} -\index{exdiff.ht!pages!ExDiffMultipleII} -\index{ExDiffMultipleII!exdiff.ht!pages} +\pagehead{ExDiffMultipleII}{exdiff.ht}{Multiple Derivatives II} <>= \begin{page}{ExDiffMultipleII}{Multiple Derivatives II} \beginscroll -You may also compute multiple derivatives by specifying a list of variables -together with a list of multiplicities. +You may also compute multiple derivatives by specifying a list of +variables together with a list of multiplicities. For example, to differentiate {\em cos(z)/(x**2 + y**3)} -first with respect to {\em x}, -then twice with respect to {\em y}, then three times with respect to {\em z}, +first with respect to {\em x}, then twice with respect to {\em y}, +then three times with respect to {\em z}, issue the following command: \spadpaste{differentiate(cos(z)/(x**2 + y**3),[x,y,z],[1,2,3])} \endscroll \autobuttons\end{page} @ -\subsection{Derivatives of Functions Involving Formal Integrals} -\label{ExDiffFormalIntegral} -\index{pages!ExDiffFormalIntegral!exdiff.ht} -\index{exdiff.ht!pages!ExDiffFormalIntegral} -\index{ExDiffFormalIntegral!exdiff.ht!pages} +\pagehead{ExDiffFormalIntegral}{exdiff.ht} +{Derivatives of Functions Involving Formal Integrals} <>= \begin{page}{ExDiffFormalIntegral} {Derivatives of Functions Involving Formal Integrals} @@ -6220,19 +5737,9 @@ combination with other functions: \autobuttons\end{page} @ -\section{exit.ht} -\newcommand{\ExitXmpTitle}{Exit} -\newcommand{\ExitXmpNumber}{9.20} - -@ -\subsection{Exit} -\label{ExitXmpPage} -\index{pages!ExitXmpPage!exit.ht} -\index{exit.ht!pages!ExitXmpPage} -\index{ExitXmpPage!exit.ht!pages} +\pagehead{ExitXmpPage}{exit.ht}{Exit} <>= \begin{page}{ExitXmpPage}{Exit} -% ===================================================================== \beginscroll A function that does not return directly to its caller has @@ -6245,8 +5752,8 @@ Instead, it causes a return to top-level. \spadpaste{n := 0 \bound{n}} } \xtc{ -The function \userfun{gasp} is given return type \spadtype{Exit} since it is -guaranteed never to return a value to its caller. +The function \userfun{gasp} is given return type \spadtype{Exit} since +it is guaranteed never to return a value to its caller. }{ \begin{spadsrc}[\bound{gasp}\free{n}] gasp(): Exit == @@ -6256,8 +5763,8 @@ gasp(): Exit == \end{spadsrc} } \xtc{ -The return type of \userfun{half} is determined by resolving the types of -the two branches of the \spad{if}. +The return type of \userfun{half} is determined by resolving the +types of the two branches of the \spad{if}. }{ \begin{spadsrc}[\bound{half}\free{gasp}] half(k) == @@ -6267,8 +5774,8 @@ half(k) == } \xtc{ Because -\userfun{gasp} has the return type \spadtype{Exit}, -the type of \spad{if} in \userfun{half} is resolved to be \spadtype{Integer}. +\userfun{gasp} has the return type \spadtype{Exit}, the type of +\spad{if} in \userfun{half} is resolved to be \spadtype{Integer}. }{ \spadpaste{half 4 \free{half}\bound{app1}} } @@ -6282,7 +5789,9 @@ the type of \spad{if} in \userfun{half} is resolved to be \spadtype{Integer}. } For functions which return no value at all, use \spadtype{Void}. -See \downlink{``\ugUserTitle''}{ugUserPage} in Section \ugUserNumber\ignore{ugUser} and \downlink{`Void'}{VoidXmpPage}\ignore{Void} for more information. +See \downlink{``\ugUserTitle''}{ugUserPage} in +Section \ugUserNumber\ignore{ugUser} and +\downlink{`Void'}{VoidXmpPage}\ignore{Void} for more information. % \showBlurb{Exit} \endscroll @@ -6291,11 +5800,7 @@ See \downlink{``\ugUserTitle''}{ugUserPage} in Section \ugUserNumber\ignore{ugUs @ \section{exlap.ht} -\subsection{Laplace transform with a single pole} -\label{ExLapSimplePole} -\index{pages!ExLapSimplePole!exlap.ht} -\index{exlap.ht!pages!ExLapSimplePole} -\index{ExLapSimplePole!exlap.ht!pages} +\pagehead{ExLapSimplePole}{exlap.ht}{Laplace transform with a single pole} <>= \begin{page}{ExLapSimplePole}{Laplace transform with a single pole} \beginscroll @@ -6307,11 +5812,8 @@ answer. \autobuttons\end{page} @ -\subsection{Laplace transform of a trigonometric function} -\label{ExLapTrigTrigh} -\index{pages!ExLapTrigTrigh!exlap.ht} -\index{exlap.ht!pages!ExLapTrigTrigh} -\index{ExLapTrigTrigh!exlap.ht!pages} +\pagehead{ExLapTrigTrigh}{exlap.ht} +{Laplace transform of a trigonometric function} <>= \begin{page}{ExLapTrigTrigh}{Laplace transform of a trigonometric function} \beginscroll @@ -6323,28 +5825,22 @@ logarithms. \autobuttons\end{page} @ -\subsection{Laplace transform requiring a definite integration} -\label{ExLapDefInt} -\index{pages!ExLapDefInt!exlap.ht} -\index{exlap.ht!pages!ExLapDefInt} -\index{ExLapDefInt!exlap.ht!pages} +\pagehead{ExLapDefInt}{exlap.ht} +{Laplace transform requiring a definite integration} <>= -\begin{page}{ExLapDefInt}{Laplace transform requiring a definite integration} +\begin{page}{ExLapDefInt} +{Laplace transform requiring a definite integration} \beginscroll -When powers of t appear in the denominator, computing the laplace transform -requires integrating the result of another laplace transform between a -symbol and infinity. We use the full power of Axiom's integrator -in such cases. +When powers of t appear in the denominator, computing the laplace +transform requires integrating the result of another laplace +transform between a symbol and infinity. We use the full power of +Axiom's integrator in such cases. \spadpaste{laplace(2/t * (1 - cos(a*t)), t, s)} \endscroll \autobuttons\end{page} @ -\subsection{Laplace transform of exponentials} -\label{ExLapExpExp} -\index{pages!ExLapExpExp!exlap.ht} -\index{exlap.ht!pages!ExLapExpExp} -\index{ExLapExpExp!exlap.ht!pages} +\pagehead{ExLapExpExp}{exlap.ht}{Laplace transform of exponentials} <>= \begin{page}{ExLapExpExp}{Laplace transform of exponentials} \beginscroll @@ -6355,26 +5851,20 @@ integrate the result of another laplace transform. \autobuttons\end{page} @ -\subsection{Laplace transform of an exponential integral} -\label{ExLapSpecial1} -\index{pages!ExLapSpecial1!exlap.ht} -\index{exlap.ht!pages!ExLapSpecial1} -\index{ExLapSpecial1!exlap.ht!pages} +\pagehead{ExLapSpecial1}{exlap.ht} +{Laplace transform of an exponential integral} <>= -\begin{page}{ExLapSpecial1}{Laplace transform of an exponential integral} -We can handle some restricted cases of special functions, linear exponential -integrals among them. +\begin{page}{ExLapSpecial1} +{Laplace transform of an exponential integral} +We can handle some restricted cases of special functions, +linear exponential integrals among them. \beginscroll \spadpaste{laplace(exp(a*t+b)*Ei(c*t), t, s)} \endscroll \autobuttons\end{page} @ -\subsection{Laplace transform of special functions} -\label{ExLapSpecial2} -\index{pages!ExLapSpecial2!exlap.ht} -\index{exlap.ht!pages!ExLapSpecial2} -\index{ExLapSpecial2!exlap.ht!pages} +\pagehead{ExLapSpecial2}{exlap.ht}{Laplace transform of special functions} <>= \begin{page}{ExLapSpecial2}{Laplace transform of special functions} \beginscroll @@ -6385,11 +5875,7 @@ An example with some interesting special functions. @ \section{exint.ht} -\subsection{Integral of a Rational Function} -\label{ExIntRationalFunction} -\index{pages!ExIntRationalFunction!exint.ht} -\index{exint.ht!pages!ExIntRationalFunction} -\index{ExIntRationalFunction!exint.ht!pages} +\pagehead{ExIntRationalFunction}{exint.ht}{Integral of a Rational Function} <>= \begin{page}{ExIntRationalFunction}{Integral of a Rational Function} \beginscroll @@ -6416,11 +5902,8 @@ algebraic number from the expression and displays its defining polynomial. \autobuttons\end{page} @ -\subsection{Integral of a Rational Function with a Real Parameter} -\label{ExIntRationalWithRealParameter} -\index{pages!ExIntRationalWithRealParameter!exint.ht} -\index{exint.ht!pages!ExIntRationalWithRealParameter} -\index{ExIntRationalWithRealParameter!exint.ht!pages} +\pagehead{ExIntRationalWithRealParameter}{exint.ht} +{Integral of a Rational Function with a Real Parameter} <>= \begin{page}{ExIntRationalWithRealParameter} {Integral of a Rational Function with a Real Parameter} @@ -6434,11 +5917,8 @@ The integrate command generally assumes that all parameters are real. \autobuttons\end{page} @ -\subsection{Integral of a Rational Function with a Complex Parameter} -\label{ExIntRationalWithComplexParameter} -\index{pages!ExIntRationalWithComplexParameter!exint.ht} -\index{exint.ht!pages!ExIntRationalWithComplexParameter} -\index{ExIntRationalWithComplexParameter!exint.ht!pages} +\pagehead{ExIntRationalWithComplexParameter}{exint.ht} +{Integral of a Rational Function with a Complex Parameter} <>= \begin{page}{ExIntRationalWithComplexParameter} {Integral of a Rational Function with a Complex Parameter} @@ -6452,11 +5932,8 @@ this answer by prepending the word `complex' to the command name: \autobuttons\end{page} @ -\subsection{Two Similar Integrands Producing Very Different Results} -\label{ExIntTwoSimilarIntegrands} -\index{pages!ExIntTwoSimilarIntegrands!exint.ht} -\index{exint.ht!pages!ExIntTwoSimilarIntegrands} -\index{ExIntTwoSimilarIntegrands!exint.ht!pages} +\pagehead{ExIntTwoSimilarIntegrands}{exint.ht} +{Two Similar Integrands Producing Very Different Results} <>= \begin{page}{ExIntTwoSimilarIntegrands} {Two Similar Integrands Producing Very Different Results} @@ -6475,11 +5952,7 @@ find a solution: \autobuttons\end{page} @ -\subsection{An Integral Which Does Not Exist} -\label{ExIntNoSolution} -\index{pages!ExIntNoSolution!exint.ht} -\index{exint.ht!pages!ExIntNoSolution} -\index{ExIntNoSolution!exint.ht!pages} +\pagehead{ExIntNoSolution}{exint.ht}{An Integral Which Does Not Exist} <>= \begin{page}{ExIntNoSolution}{An Integral Which Does Not Exist} \beginscroll @@ -6510,30 +5983,23 @@ that no answer exists as an elementary function. \end{verbatim} @ -\subsection{A Trigonometric Function of a Quadratic} -\label{ExIntTrig} -\index{pages!ExIntTrig!exint.ht} -\index{exint.ht!pages!ExIntTrig} -\index{ExIntTrig!exint.ht!pages} +\pagehead{ExIntTrig}{exint.ht}{A Trigonometric Function of a Quadratic} <>= \begin{page}{ExIntTrig}{A Trigonometric Function of a Quadratic} \beginscroll Axiom can handle complicated mixed functions way beyond what you can find in tables: -\spadpaste{integrate((sinh(1+sqrt(x+b))+2*sqrt(x+b))/(sqrt(x+b)*(x+cosh(1+sqrt(x+b)))),x)} +\spadpaste{integrate((sinh(1+sqrt(x+b))+2*sqrt(x+b))/ +(sqrt(x+b)*(x+cosh(1+sqrt(x+b)))),x)} Whenever possible, Axiom tries to express the answer using the functions present in the integrand. \endscroll \autobuttons\end{page} @ -\subsection{Integrating a Function with a Hidden Algebraic Relation} -\label{ExIntAlgebraicRelation} -See ExIntAlgebraicRelationExplain \ref{ExIntAlgebraicRelationExplain} -on page~\pageref{ExIntAlgebraicRelationExplain} -\index{pages!ExIntAlgebraicRelation!exint.ht} -\index{exint.ht!pages!ExIntAlgebraicRelation} -\index{ExIntAlgebraicRelation!exint.ht!pages} +\pagehead{ExIntAlgebraicRelation}{exint.ht} +{Integrating a Function with a Hidden Algebraic Relation} +\pageto{notitle}{ExIntAlgebraicRelationExplain} <>= \begin{page}{ExIntAlgebraicRelation} {Integrating a Function with a Hidden Algebraic Relation} @@ -6548,11 +6014,8 @@ for correctly integrating this function. \autobuttons\end{page} @ -\subsection{Details for integrating a function with a Hidden Algebraic Relation} -\label{ExIntAlgebraicRelationExplain} -\index{pages!ExIntAlgebraicRelationExplain!exint.ht} -\index{exint.ht!pages!ExIntAlgebraicRelationExplain} -\index{ExIntAlgebraicRelationExplain!exint.ht!pages} +\pagehead{ExIntAlgebraicRelationExplain}{exint.ht} +{Details for integrating a function with a Hidden Algebraic Relation} <>= \begin{page}{ExIntAlgebraicRelationExplain} {Details for integrating a function with a Hidden Algebraic Relation} @@ -6573,19 +6036,18 @@ satisfying the algebraic relation: \centerline{{\em (8log(3g**2-1) - 3g**2 + 18xg + 15)/18}} \item 4. Replace {\em g} by the initial {\em f} to produce the final result: -\centerline{{\em (8log(3tan(atan(x/3))**2-1) - 3tan(atan(x/3))**2 - 18xtan(atan(x/3) + 16)/18)}} +\centerline{{\em (8log(3tan(atan(x/3))**2-1) - 3tan(atan(x/3))**2 - +18xtan(atan(x/3) + 16)/18)}} \enditems \endscroll \autobuttons\end{page} @ -\subsection{An Integral Involving a Root of a Transcendental Function} -\label{ExIntRadicalOfTranscendental} -\index{pages!ExIntRadicalOfTranscendental!exint.ht} -\index{exint.ht!pages!ExIntRadicalOfTranscendental} -\index{ExIntRadicalOfTranscendental!exint.ht!pages} +\pagehead{ExIntRadicalOfTranscendental}{exint.ht} +{An Integral Involving a Root of a Transcendental Function} <>= -\begin{page}{ExIntRadicalOfTranscendental}{An Integral Involving a Root of a Transcendental Function} +\begin{page}{ExIntRadicalOfTranscendental} +{An Integral Involving a Root of a Transcendental Function} \beginscroll This is an example of a mixed function where the algebraic layer is over the transcendental one. @@ -6594,31 +6056,23 @@ the algebraic layer is over the transcendental one. \autobuttons\end{page} @ -\subsection{An Integral of a Non-elementary Function} -\label{ExIntNonElementary} -\index{pages!ExIntNonElementary!exint.ht} -\index{exint.ht!pages!ExIntNonElementary} -\index{ExIntNonElementary!exint.ht!pages} +\pagehead{ExIntNonElementary}{exint.ht} +{An Integral of a Non-elementary Function} <>= \begin{page}{ExIntNonElementary}{An Integral of a Non-elementary Function} \beginscroll While incomplete for non-elementary functions, Axiom can handle some of them: -\spadpaste{integrate(exp(-x**2) * erf(x) / (erf(x)**3 - erf(x)**2 - erf(x) + 1),x)} +\spadpaste{integrate(exp(-x**2) * erf(x) / +(erf(x)**3 - erf(x)**2 - erf(x) + 1),x)} \endscroll \autobuttons\end{page} @ \section{exlimit.ht} -\subsection{Computing Limits} -\label{ExLimitBasic} -\begin{itemize} -\item ExLimitTwoSided \ref{ExLimitTwoSided} on page~\pageref{ExLimitTwoSided} -\item ExLimitOneSided \ref{ExLimitOneSided} on page~\pageref{ExLimitOneSided} -\end{itemize} -\index{pages!ExLimitBasic!exlimit.ht} -\index{exlimit.ht!pages!ExLimitBasic} -\index{ExLimitBasic!exlimit.ht!pages} +\pagehead{ExLimitBasic}{exlimit.ht}{Computing Limits} +\pageto{notitle}{ExLimitTwoSided} +\pageto{notitle}{ExLimitOneSided} <>= \begin{page}{ExLimitBasic}{Computing Limits} \beginscroll @@ -6638,11 +6092,7 @@ wish to ask for a one-sided limit. \autobuttons\end{page} @ -\subsection{Limits of Functions with Parameters} -\label{ExLimitParameter} -\index{pages!ExLimitParameter!exlimit.ht} -\index{exlimit.ht!pages!ExLimitParameter} -\index{ExLimitParameter!exlimit.ht!pages} +\pagehead{ExLimitParameter}{exlimit.ht}{Limits of Functions with Parameters} <>= \begin{page}{ExLimitParameter}{Limits of Functions with Parameters} \beginscroll @@ -6655,11 +6105,7 @@ Here's an example: \autobuttons\end{page} @ -\subsection{One-sided Limits} -\label{ExLimitOneSided} -\index{pages!ExLimitOneSided!exlimit.ht} -\index{exlimit.ht!pages!ExLimitOneSided} -\index{ExLimitOneSided!exlimit.ht!pages} +\pagehead{ExLimitOneSided}{exlimit.ht}{One-sided Limits} <>= \begin{page}{ExLimitOneSided}{One-sided Limits} \beginscroll @@ -6682,11 +6128,7 @@ will indicate when you try to take a two-sided limit: \autobuttons\end{page} @ -\subsection{Two-sided Limits} -\label{ExLimitTwoSided} -\index{pages!ExLimitTwoSided!exlimit.ht} -\index{exlimit.ht!pages!ExLimitTwoSided} -\index{ExLimitTwoSided!exlimit.ht!pages} +\pagehead{ExLimitTwoSided}{exlimit.ht}{Two-sided Limits} <>= \begin{page}{ExLimitTwoSided}{Two-sided Limits} \beginscroll @@ -6711,29 +6153,21 @@ Here's another example, this time using a more complicated function: \autobuttons\end{page} @ -\subsection{Limits at Infinity} -\label{ExLimitInfinite} -\index{pages!ExLimitInfinite!exlimit.ht} -\index{exlimit.ht!pages!ExLimitInfinite} -\index{ExLimitInfinite!exlimit.ht!pages} +\pagehead{ExLimitInfinite}{exlimit.ht}{Limits at Infinity} <>= \begin{page}{ExLimitInfinite}{Limits at Infinity} \beginscroll You can compute limits at infinity by passing either 'plus infinity' or 'minus infinity' as the third argument of the function \spadfun{limit}. -To do this, use the constants \spad{\%plusInfinity} and \spad{\%minusInfinity}. -Here are two examples: +To do this, use the constants \spad{\%plusInfinity} and +\spad{\%minusInfinity}. Here are two examples: \spadpaste{limit(sqrt(3*x**2 + 1)/(5*x),x = \%plusInfinity)} \spadpaste{limit(sqrt(3*x**2 + 1)/(5*x),x = \%minusInfinity)} \endscroll \autobuttons\end{page} @ -\subsection{Real Limits vs. Complex Limits} -\label{ExLimitRealComplex} -\index{pages!ExLimitRealComplex!exlimit.ht} -\index{exlimit.ht!pages!ExLimitRealComplex} -\index{ExLimitRealComplex!exlimit.ht!pages} +\pagehead{ExLimitRealComplex}{exlimit.ht}{Real Limits vs. Complex Limits} <>= \begin{page}{ExLimitRealComplex}{Real Limits vs. Complex Limits} \beginscroll @@ -6755,11 +6189,7 @@ Axiom indicates this when we call the function \spadfun{complexLimit}: \autobuttons\end{page} @ -\subsection{Complex Limits at Infinity} -\label{ExLimitComplexInfinite} -\index{pages!ExLimitComplexInfinite!exlimit.ht} -\index{exlimit.ht!pages!ExLimitComplexInfinite} -\index{ExLimitComplexInfinite!exlimit.ht!pages} +\pagehead{ExLimitComplexInfinite}{exlimit.ht}{Complex Limits at Infinity} <>= \begin{page}{ExLimitComplexInfinite}{Complex Limits at Infinity} \beginscroll @@ -6780,18 +6210,16 @@ For example: @ \section{exmatrix.ht} -\subsection{Basic Arithmetic Operations on Matrices} -\label{ExMatrixBasicFunction} -\index{pages!ExMatrixBasicFunction!exmatrix.ht} -\index{exmatrix.ht!pages!ExMatrixBasicFunction} -\index{ExMatrixBasicFunction!exmatrix.ht!pages} +\pagehead{ExMatrixBasicFunction}{exmatrix.ht} +{Basic Arithmetic Operations on Matrices} <>= -\begin{page}{ExMatrixBasicFunction}{Basic Arithmetic Operations on Matrices} +\begin{page}{ExMatrixBasicFunction} +{Basic Arithmetic Operations on Matrices} \beginscroll You can create a matrix using the function \spadfun{matrix}. -The function takes a list of lists of elements of the ring and produces a -matrix whose \spad{i}th row contains the elements of the \spad{i}th list. -For example: +The function takes a list of lists of elements of the ring and +produces a matrix whose \spad{i}th row contains the elements of +the \spad{i}th list. For example: \spadpaste{m1 := matrix([[1,-2,1],[4,2,-4]]) \bound{m1}} \spadpaste{m2 := matrix([[1,0,2],[20,30,10],[0,200,100]]) \bound{m2}} \spadpaste{m3 := matrix([[1,2,3],[2,4,6]]) \bound{m3}} @@ -6809,11 +6237,7 @@ Axiom to perform an operation - otherwise an error message will occur. \autobuttons\end{page} @ -\subsection{Constructing new Matrices} -\label{ExConstructMatrix} -\index{pages!ExConstructMatrix!exmatrix.ht} -\index{exmatrix.ht!pages!ExConstructMatrix} -\index{ExConstructMatrix!exmatrix.ht!pages} +\pagehead{ExConstructMatrix}{exmatrix.ht}{Constructing new Matrices} <>= \begin{page}{ExConstructMatrix}{Constructing new Matrices} \beginscroll @@ -6830,19 +6254,23 @@ The function \spadfun{subMatrix}(\spad{a},\spad{i},\spad{j},\spad{k},\spad{l}) constructs a new matrix consisting of rows \spad{i} through \spad{j} and columns \spad{k} through \spad{l} of \spad{a} , inclusive. -\spadpaste{subMatrix(matrix([[0,1,2,3,4],[5,6,7,8,9],[10,11,12,13,14]]), 1,3,2,4)} +\spadpaste{subMatrix(matrix([[0,1,2,3,4],[5,6,7,8,9],[10,11,12,13,14]]), +1,3,2,4)} The functions \spadfun{horizConcat} and \spadfun{vertConcat} concatenate matrices horizontally and vertically, respectively. -\spadpaste{horizConcat(matrix([[1,2,3],[6,7,8]]),matrix([[11,12,13],[55,77,88]])) } -\spadpaste{vertConcat(matrix([[1,2,3],[6,7,8]]),matrix([[11,12,13],[55,77,88]])) } +\spadpaste{horizConcat(matrix([[1,2,3],[6,7,8]]), +matrix([[11,12,13],[55,77,88]])) } +\spadpaste{vertConcat(matrix([[1,2,3],[6,7,8]]), +matrix([[11,12,13],[55,77,88]])) } The function \spadfunX{setsubMatrix}(\spad{a},\spad{i},\spad{k},\spad{b}) replaces the submatrix of \spad{a} -starting at row \spad{i} and column \spad{k} with the elements of the matrix i\spad{b}. +starting at row \spad{i} and column \spad{k} with the elements of the +matrix i\spad{b}. \spadpaste{b:=matrix([[0,1,2,3,4],[5,6,7,8,9],[10,11,12,13,14]]) \bound{b}} \spadpaste{setsubMatrix!(b,1,1,transpose(subMatrix(b,1,3,1,3)))\free{b}} changes the submatrix of \spad{b} consisting of the first 3 rows and columns @@ -6851,43 +6279,33 @@ to its transpose. \autobuttons\end{page} @ -\subsection{Trace of a Matrix} -\label{ExTraceMatrix} -\index{pages!ExTraceMatrix!exmatrix.ht} -\index{exmatrix.ht!pages!ExTraceMatrix} -\index{ExTraceMatrix!exmatrix.ht!pages} +\pagehead{ExTraceMatrix}{exmatrix.ht}{Trace of a Matrix} <>= \begin{page}{ExTraceMatrix}{Trace of a Matrix} \beginscroll If you have a square matrix, then you can compute its `trace'. -The function \spadfun{trace} computes the sum of all elements on the diagonal -of a matrix. +The function \spadfun{trace} computes the sum of all elements +on the diagonal of a matrix. For example `trace' for a four by four Vandermonde matrix. -\spadpaste{trace( matrix([[1,x,x**2,x**3],[1,y,y**2,y**3],[1,z,z**2,z**3],[1,u,u**2,u**3]]) )} +\spadpaste{trace( matrix([[1,x,x**2,x**3],[1,y,y**2,y**3], +[1,z,z**2,z**3],[1,u,u**2,u**3]]) )} \endscroll \autobuttons\end{page} @ -\subsection{Determinant of a Matrix} -\label{ExDeterminantMatrix} -\index{pages!ExDeterminantMatrix!exmatrix.ht} -\index{exmatrix.ht!pages!ExDeterminantMatrix} -\index{ExDeterminantMatrix!exmatrix.ht!pages} +\pagehead{ExDeterminantMatrix}{exmatrix.ht}{Determinant of a Matrix} <>= \begin{page}{ExDeterminantMatrix}{Determinant of a Matrix} \beginscroll -The function \spadfun{determinant} computes the determinant of a matrix over a -commutative ring, that is a ring whose multiplication is commutative. +The function \spadfun{determinant} computes the determinant of a matrix +over a commutative ring, that is a ring whose multiplication is +commutative. \spadpaste{determinant(matrix([[1,2,3,4],[2,3,2,5],[3,4,5,6],[4,1,6,7]]))} \endscroll \autobuttons\end{page} @ -\subsection{Inverse of a Matrix} -\label{ExInverseMatrix} -\index{pages!ExInverseMatrix!exmatrix.ht} -\index{exmatrix.ht!pages!ExInverseMatrix} -\index{ExInverseMatrix!exmatrix.ht!pages} +\pagehead{ExInverseMatrix}{exmatrix.ht}{Inverse of a Matrix} <>= \begin{page}{ExInverseMatrix}{Inverse of a Matrix} \beginscroll @@ -6898,11 +6316,7 @@ The function \spadfun{inverse} computes the inverse of a square matrix. \autobuttons\end{page} @ -\subsection{Rank of a Matrix} -\label{ExRankMatrix} -\index{pages!ExRankMatrix!exmatrix.ht} -\index{exmatrix.ht!pages!ExRankMatrix} -\index{ExRankMatrix!exmatrix.ht!pages} +\pagehead{ExRankMatrix}{exmatrix.ht}{Rank of a Matrix} <>= \begin{page}{ExRankMatrix}{Rank of a Matrix} \beginscroll @@ -6913,32 +6327,14 @@ The function \spadfun{rank} gives you the rank of a matrix: @ \section{expr.ht} -<>= -\newcommand{\ExpressionXmpTitle}{Expression} -\newcommand{\ExpressionXmpNumber}{9.21} - -@ -\subsection{Expression} -\label{ExpressionXmpPage} -\begin{itemize} -\item KernelXmpPage \ref{KernelXmpPage} on -page~\pageref{KernelXmpPage} -\item ugIntroCalcDerivPage \ref{ugIntroCalcDerivPage} on -page~\pageref{ugIntroCalcDerivPage} -\item ugIntroCalcLimitsPage \ref{ugIntroCalcLimitsPage} on -page~\pageref{ugIntroCalcLimitsPage} -\item ugIntroSeriesPage \ref{ugIntroSeriesPage} on -page~\pageref{ugIntroSeriesPage} -\item ugProblemDEQPage \ref{ugProblemDEQPage} on -page~\pageref{ugProblemDEQPage} -\item ugProblemIntegrationPage \ref{ugProblemIntegrationPage} on -page~\pageref{ugProblemIntegrationPage} -\item ugUserRulesPage \ref{ugUserRulesPage} on -page~\pageref{ugUserRulesPage} -\end{itemize} -\index{pages!ExpressionXmpPage!expr.ht} -\index{expr.ht!pages!ExpressionXmpPage} -\index{ExpressionXmpPage!expr.ht!pages} +\pagehead{ExpressionXmpPage}{expr.ht}{Expression} +\pageto{notitle}{KernelXmpPage} +\pageto{notitle}{ugIntroCalcDerivPage} +\pageto{notitle}{ugIntroCalcLimitsPage} +\pageto{notitle}{ugIntroSeriesPage} +\pageto{notitle}{ugProblemDEQPage} +\pageto{notitle}{ugProblemIntegrationPage} +\pageto{notitle}{ugUserRulesPage} <>= \begin{page}{ExpressionXmpPage}{Expression} \beginscroll @@ -7028,7 +6424,7 @@ the structure of \axiomType{Expression} is recursive. demonstrates how to extract the kernels in an expression. -Use the \HyperName{} Browse facility to see what operations are +Use the Hyperdoc Browse facility to see what operations are applicable to expression. At the time of this writing, there were 262 operations with 147 distinct name in \axiomType{Expression Integer}. @@ -7134,7 +6530,8 @@ use \axiomFun{simplify}. }{ \spadpaste{simplify \% \free{tan6}} } -See \downlink{``\ugUserRulesTitle''}{ugUserRulesPage} in Section \ugUserRulesNumber\ignore{ugUserRules} +See \downlink{``\ugUserRulesTitle''}{ugUserRulesPage} in +Section \ugUserRulesNumber\ignore{ugUserRules} for examples of how to write your own rewrite rules for expressions. @@ -7145,11 +6542,7 @@ expressions. @ \section{explot2d.ht} -\subsection{Plotting Functions of One Variable} -\label{ExPlot2DFunctions} -\index{pages!ExPlot2DFunctions!explot2d.ht} -\index{explot2d.ht!pages!ExPlot2DFunctions} -\index{ExPlot2DFunctions!explot2d.ht!pages} +\pagehead{ExPlot2DFunctions}{explot2d.ht}{Plotting Functions of One Variable} <>= \begin{page}{ExPlot2DFunctions}{Plotting Functions of One Variable} \beginscroll @@ -7160,11 +6553,7 @@ interval on which it is to be plotted. \autobuttons\end{page} @ -\subsection{Plotting Parametric Curves} -\label{ExPlot2DParametric} -\index{pages!ExPlot2DParametric!explot2d.ht} -\index{explot2d.ht!pages!ExPlot2DParametric} -\index{ExPlot2DParametric!explot2d.ht!pages} +\pagehead{ExPlot2DParametric}{explot2d.ht}{Plotting Parametric Curves} <>= \begin{page}{ExPlot2DParametric}{Plotting Parametric Curves} \beginscroll @@ -7178,11 +6567,7 @@ the interval over which {\em t} is to range. \autobuttons\end{page} @ -\subsection{Plotting Using Polar Coordinates} -\label{ExPlot2DPolar} -\index{pages!ExPlot2DPolar!explot2d.ht} -\index{explot2d.ht!pages!ExPlot2DPolar} -\index{ExPlot2DPolar!explot2d.ht!pages} +\pagehead{ExPlot2DPolar}{explot2d.ht}{Plotting Using Polar Coordinates} <>= \begin{page}{ExPlot2DPolar}{Plotting Using Polar Coordinates} \beginscroll @@ -7196,17 +6581,13 @@ interval over which {\em theta} is to range. \autobuttons\end{page} @ -\subsection{Plotting Plane Algebraic Curves} -\label{ExPlot2DAlgebraic} -\index{pages!ExPlot2DAlgebraic!explot2d.ht} -\index{explot2d.ht!pages!ExPlot2DAlgebraic} -\index{ExPlot2DAlgebraic!explot2d.ht!pages} +\pagehead{ExPlot2DAlgebraic}{explot2d.ht}{Plotting Plane Algebraic Curves} <>= \begin{page}{ExPlot2DAlgebraic}{Plotting Plane Algebraic Curves} \beginscroll Axiom can also plot plane algebraic curves (i.e. curves defined by -an equation {\em f(x,y) = 0}) provided that the curve is non-singular in the -region to be sketched. +an equation {\em f(x,y) = 0}) provided that the curve is non-singular +in the region to be sketched. Here's an example: \graphpaste{draw(y**2 + y - (x**3 - x) = 0, x, y, range == [-2..2,-2..1])} Here the region of the sketch is {\em -2 <= x <= 2, -2 <= y <= 1}. @@ -7215,16 +6596,12 @@ Here the region of the sketch is {\em -2 <= x <= 2, -2 <= y <= 1}. @ \section{explot3d.ht} -\subsection{Plotting Functions of Two Variables} -\label{ExPlot3DFunctions} -\index{pages!ExPlot3DFunctions!explot3d.ht} -\index{explot3d.ht!pages!ExPlot3DFunctions} -\index{ExPlot3DFunctions!explot3d.ht!pages} +\pagehead{ExPlot3DFunctions}{explot3d.ht}{Plotting Functions of Two Variables} <>= \begin{page}{ExPlot3DFunctions}{Plotting Functions of Two Variables} \beginscroll -To plot a function {\em z = f(x,y)}, you need only specify the function and the -intervals over which the dependent variables will range. +To plot a function {\em z = f(x,y)}, you need only specify the function +and the intervals over which the dependent variables will range. For example, here's how you plot the function {\em z = cos(x*y)} as the variables {\em x} and {\em y} both range between -3 and 3: \graphpaste{draw(cos(x*y),x = -3..3,y = -3..3)} @@ -7232,11 +6609,8 @@ variables {\em x} and {\em y} both range between -3 and 3: \autobuttons\end{page} @ -\subsection{Plotting Parametric Surfaces} -\label{ExPlot3DParametricSurface} -\index{pages!ExPlot3DParametricSurface!explot3d.ht} -\index{explot3d.ht!pages!ExPlot3DParametricSurface} -\index{ExPlot3DParametricSurface!explot3d.ht!pages} +\pagehead{ExPlot3DParametricSurface}{explot3d.ht} +{Plotting Parametric Surfaces} <>= \begin{page}{ExPlot3DParametricSurface}{Plotting Parametric Surfaces} \beginscroll @@ -7247,18 +6621,15 @@ as arguments of the function `surface', then give the intervals over which {\em u} and {\em v} are to range. With parametric surfaces, we can create some interesting graphs. Here's an egg: -\graphpaste{draw(surface(5*sin(u)*cos(v),4*sin(u)*sin(v),3*cos(u)),u=0..\%pi,v=0..2*\%pi)} +\graphpaste{draw(surface(5*sin(u)*cos(v),4*sin(u)*sin(v),3*cos(u)), +u=0..\%pi,v=0..2*\%pi)} Here's a cone: \graphpaste{draw(surface(u*cos(v),u*sin(v),u),u=0..4,v=0..2*\%pi)} \endscroll \autobuttons\end{page} @ -\subsection{Plotting Parametric Curves} -\label{ExPlot3DParametricCurve} -\index{pages!ExPlot3DParametricCurve!explot3d.ht} -\index{explot3d.ht!pages!ExPlot3DParametricCurve} -\index{ExPlot3DParametricCurve!explot3d.ht!pages} +\pagehead{ExPlot3DParametricCurve}{explot3d.ht}{Plotting Parametric Curves} <>= \begin{page}{ExPlot3DParametricCurve}{Plotting Parametric Curves} \beginscroll @@ -7276,11 +6647,7 @@ Here is the {\em twisted cubic curve}: @ \section{expose.ht} -\subsection{Exposure} -\label{helpExpose} -\index{pages!helpExpose!expose.ht} -\index{expose.ht!pages!helpExpose} -\index{helpExpose!expose.ht!pages} +\pagehead{helpExpose}{expose.ht}{Exposure} <>= \begin{page}{helpExpose}{Exposure} \beginscroll @@ -7305,18 +6672,15 @@ only that segment for your use. Additional Information: \beginmenu \menulink{What}{ExposureDef}\tab{8}What is an exposure group? -\menulink{System}{ExposureSystem}\tab{8}What exposure groups are system defined? +\menulink{System}{ExposureSystem}\tab{8}What exposure groups are +system defined? % \menulink{User}{ExposureUser}\tab{8}How can I define my own? \menulink{Details}{ExposureDetails}\tab{8}Some details on exposure \endmenu \end{page} @ -\subsection{System Defined Exposure Groups} -\label{ExposureSystem} -\index{pages!ExposureSystem!expose.ht} -\index{expose.ht!pages!ExposureSystem} -\index{ExposureSystem!expose.ht!pages} +\pagehead{ExposureSystem}{expose.ht}{System Defined Exposure Groups} <>= \begin{page}{ExposureSystem}{System Defined Exposure Groups} \beginscroll @@ -7334,7 +6698,7 @@ Seven exposure groups are system-defined:\beginmenu \endmenu \par When you first use Axiom, the {\em current} exposure group is -set to {\em basic} and {\em naglink}. Using \HyperName{} or the system command +set to {\em basic} and {\em naglink}. Using Hyperdoc or the system command {\em expose}, you may change the current exposure group by adding or dropping constructors or by setting {\em current} @@ -7348,11 +6712,7 @@ Additional Information: \end{page} @ -\subsection{What is an Exposure Group?} -\label{ExposureDef} -\index{pages!ExposureDef!expose.ht} -\index{expose.ht!pages!ExposureDef} -\index{ExposureDef!expose.ht!pages} +\pagehead{ExposureDef}{expose.ht}{What is an Exposure Group?} <>= \begin{page}{ExposureDef}{What is an Exposure Group?} \beginscroll @@ -7362,40 +6722,42 @@ Those constructors on the list are exposed; those not on the list are not exposed. The library contains 4 kinds of constructors intuitively described as follows: \beginmenu -\item\menuitemstyle{}{\em domain}\tab{10}Describes computational objects and functions defined on these objects -\item\menuitemstyle{}{\em package}\tab{10}Describes functions which will work over a variety of domains +\item\menuitemstyle{}{\em domain}\tab{10}Describes computational objects +and functions defined on these objects +\item\menuitemstyle{}{\em package}\tab{10}Describes functions which will +work over a variety of domains \item\menuitemstyle{}{\em category}\tab{10}Names a set of operations -\item\menuitemstyle{}{\em default}\tab{10}Provides default functions for a cateogry +\item\menuitemstyle{}{\em default}\tab{10}Provides default functions for +a cateogry \endmenu An exposure group is defined by three lists: \beginmenu -\item\menuitemstyle{}{\em groups}\tab{13}A list of other (more basic) groups -\item\menuitemstyle{}{\em additions}\tab{13}A list of explicit constructors to be included -\item\menuitemstyle{}{\em subtractions}\tab{13}A list of explicit constructors to be dropped +\item\menuitemstyle{}{\em groups} +\tab{13}A list of other (more basic) groups +\item\menuitemstyle{}{\em additions} +\tab{13}A list of explicit constructors to be included +\item\menuitemstyle{}{\em subtractions} +\tab{13}A list of explicit constructors to be dropped \endmenu You can define your own exposure groups: give them names and define the three above lists to be anything you like. -Using \HyperName{}, you can conveniently edit your exposure groups, +Using Hyperdoc, you can conveniently edit your exposure groups, install them as the {\em current} exposure, and so on. \endscroll \end{page} @ -\subsection{Details on Exposure} -\label{ExposureDetails} -\index{pages!ExposureDetails!expose.ht} -\index{expose.ht!pages!ExposureDetails} -\index{ExposureDetails!expose.ht!pages} +\pagehead{ExposureDetails}{expose.ht}{Details on Exposure} <>= \begin{page}{ExposureDetails}{Details on Exposure} \beginscroll -Exposure is generally defined by the set of domain and package constructors -you want to have available. -Category and default constructors are generally implied. -A category constructor is exposed if mentioned by {\em any} other constructor -(including another category). -A default constructor is exposed if its corresponding category constructor is exposed. +Exposure is generally defined by the set of domain and package +constructors you want to have available. Category and default +constructors are generally implied. A category constructor is exposed +if mentioned by {\em any} other constructor (including another +category). A default constructor is exposed if its corresponding +category constructor is exposed. \par If you explicitly add a domain or package constructor, its name will be put in an {\em Additions} list. @@ -7404,9 +6766,9 @@ any category explicity exported by that domain or package. If that category has a corresponding default constructor, that default constructor will also be added as well. \par -If you like, you can explicitly drop a constructor. -Any such name is added to the {\em Subtractions} list. -The system will drop this name from the {\em Additions} list if it appears. +If you like, you can explicitly drop a constructor. Any such name is +added to the {\em Subtractions} list. The system will drop this name +from the {\em Additions} list if it appears. \par If the package or domain takes arguments from an unexported domain or declares that its arguments can come from a domain @@ -7417,11 +6779,7 @@ will {\em not} be added. @ \section{exseries.ht} -\subsection{Converting Expressions to Series} -\label{ExSeriesConvert} -\index{pages!ExSeriesConvert!exseries.ht} -\index{exseries.ht!pages!ExSeriesConvert} -\index{ExSeriesConvert!exseries.ht!pages} +\pagehead{ExSeriesConvert}{exseries.ht}{Converting Expressions to Series} <>= \begin{page}{ExSeriesConvert}{Converting Expressions to Series} \beginscroll @@ -7429,8 +6787,8 @@ You can convert a functional expression to a power series by using the function 'series'. Here's an example: \spadpaste{series(sin(a*x),x = 0)} -This causes {\em sin(a*x)} to be expanded in powers of {\em (x - 0)}, that is, in powers -of {\em x}. +This causes {\em sin(a*x)} to be expanded in powers of {\em (x - 0)}, +that is, in powers of {\em x}. You can have {\em sin(a*x)} expanded in powers of {\em (a - \%pi/4)} by issuing the following command: \spadpaste{series(sin(a*x),a = \%pi/4)} @@ -7438,16 +6796,12 @@ issuing the following command: \autobuttons\end{page} @ -\subsection{Manipulating Power Series} -\label{ExSeriesManipulate} -\index{pages!ExSeriesManipulate!exseries.ht} -\index{exseries.ht!pages!ExSeriesManipulate} -\index{ExSeriesManipulate!exseries.ht!pages} +\pagehead{ExSeriesManipulate}{exseries.ht}{Manipulating Power Series} <>= \begin{page}{ExSeriesManipulate}{Manipulating Power Series} \beginscroll -Once you have created a power series, you can perform arithmetic operations -on that series. +Once you have created a power series, you can perform arithmetic +operations on that series. First compute the Taylor expansion of {\em 1/(1-x)}: \spadpaste{f := series(1/(1-x),x = 0) \bound{f}} Now compute the square of that series: @@ -7457,11 +6811,7 @@ It's as easy as 1, 2, 3,... \autobuttons\end{page} @ -\subsection{Functions on Power Series} -\label{ExSeriesFunctions} -\index{pages!ExSeriesFunctions!exseries.ht} -\index{exseries.ht!pages!ExSeriesFunctions} -\index{ExSeriesFunctions!exseries.ht!pages} +\pagehead{ExSeriesFunctions}{exseries.ht}{Functions on Power Series} <>= \begin{page}{ExSeriesFunctions}{Functions on Power Series} \beginscroll @@ -7479,11 +6829,8 @@ and then apply these functions to the series: \autobuttons\end{page} @ -\subsection{Substituting Numerical Values in Power Series} -\label{ExSeriesSubstitution} -\index{pages!ExSeriesSubstitution!exseries.ht} -\index{exseries.ht!pages!ExSeriesSubstitution} -\index{ExSeriesSubstitution!exseries.ht!pages} +\pagehead{ExSeriesSubstitution}{exseries.ht} +{Substituting Numerical Values in Power Series} <>= \begin{page}{ExSeriesSubstitution} {Substituting Numerical Values in Power Series} @@ -7502,11 +6849,7 @@ You get a sequence of partial sums. @ \section{exsum.ht} -\subsection{Summing the Entries of a List I} -\label{ExSumListEntriesI} -\index{pages!ExSumListEntriesI!exsum.ht} -\index{exsum.ht!pages!ExSumListEntriesI} -\index{ExSumListEntriesI!exsum.ht!pages} +\pagehead{ExSumListEntriesI}{exsum.ht}{Summing the Entries of a List I} <>= \begin{page}{ExSumListEntriesI}{Summing the Entries of a List I} \beginscroll @@ -7521,11 +6864,7 @@ For example, the following command will sum the integers from 1 to 15: \autobuttons\end{page} @ -\subsection{Summing the Entries of a List II} -\label{ExSumListEntriesII} -\index{pages!ExSumListEntriesII!exsum.ht} -\index{exsum.ht!pages!ExSumListEntriesII} -\index{ExSumListEntriesII!exsum.ht!pages} +\pagehead{ExSumListEntriesII}{exsum.ht}{Summing the Entries of a List II} <>= \begin{page}{ExSumListEntriesII}{Summing the Entries of a List II} \beginscroll @@ -7540,11 +6879,7 @@ You can also compute the sum of the entries of this list: \autobuttons\end{page} @ -\subsection{Approximating $e$} -\label{ExSumApproximateE} -\index{pages!ExSumApproximateE!exsum.ht} -\index{exsum.ht!pages!ExSumApproximateE} -\index{ExSumApproximateE!exsum.ht!pages} +\pagehead{ExSumApproximateE}{exsum.ht}{Approximating $e$} <>= \begin{page}{ExSumApproximateE}{Approximating e} \beginscroll @@ -7555,11 +6890,7 @@ entries of the following list: \autobuttons\end{page} @ -\subsection{Closed Form Summations} -\label{ExSumClosedForm} -\index{pages!ExSumClosedForm!exsum.ht} -\index{exsum.ht!pages!ExSumClosedForm} -\index{ExSumClosedForm!exsum.ht!pages} +\pagehead{ExSumClosedForm}{exsum.ht}{Closed Form Summations} <>= \begin{page}{ExSumClosedForm}{Closed Form Summations} \beginscroll @@ -7581,11 +6912,7 @@ for {\em a} and {\em b} in our formula: \autobuttons\end{page} @ -\subsection{Sums of Cubes} -\label{ExSumCubes} -\index{pages!ExSumCubes!exsum.ht} -\index{exsum.ht!pages!ExSumCubes} -\index{ExSumCubes!exsum.ht!pages} +\pagehead{ExSumCubes}{exsum.ht}{Sums of Cubes} <>= \begin{page}{ExSumCubes}{Sums of Cubes} \beginscroll @@ -7599,11 +6926,7 @@ The answers are the same. \autobuttons\end{page} @ -\subsection{Sums of Polynomials} -\label{ExSumPolynomial} -\index{pages!ExSumPolynomial!exsum.ht} -\index{exsum.ht!pages!ExSumPolynomial} -\index{ExSumPolynomial!exsum.ht!pages} +\pagehead{ExSumPolynomial}{exsum.ht}{Sums of Polynomials} <>= \begin{page}{ExSumPolynomial}{Sums of Polynomials} \beginscroll @@ -7629,11 +6952,7 @@ one with parameters. %\autobuttons\end{page} \end{verbatim} -\subsection{Sums of General Functions} -\label{ExSumGeneralFunction} -\index{pages!ExSumGeneralFunction!exsum.ht} -\index{exsum.ht!pages!ExSumGeneralFunction} -\index{ExSumGeneralFunction!exsum.ht!pages} +\pagehead{ExSumGeneralFunction}{exsum.ht}{Sums of General Functions} <>= \begin{page}{ExSumGeneralFunction}{Sums of General Functions} \beginscroll @@ -7646,12 +6965,8 @@ Here's an example: \autobuttons\end{page} @ -\subsection{Infinite Sums} -\label{ExSumInfinite} +\pagehead{ExSumInfinite}{exsum.ht}{Infinite Sums} Provide a package for infinite sums -\index{pages!ExSumInfinite!exsum.ht} -\index{exsum.ht!pages!ExSumInfinite} -\index{ExSumInfinite!exsum.ht!pages} <>= \begin{page}{ExSumInfinite}{Infinite Sums} \beginscroll @@ -7667,22 +6982,9 @@ Use {\em \%plusInfinity} to denote `plus infinity'. @ \section{farray.ht} -<>= -\newcommand{\FlexibleArrayXmpTitle}{FlexibleArray} -\newcommand{\FlexibleArrayXmpNumber}{9.26} - -@ -\subsection{FlexibleArray} -\label{FlexibleArrayXmpPage} -\begin{itemize} -\item OneDimensionalArrayXmpPage \ref{OneDimensionalArrayXmpPage} on -page~\pageref{OneDimensionalArrayXmpPage} -\item VectorXmpPage \ref{VectorXmpPage} on -page~\pageref{VectorXmpPage} -\end{itemize} -\index{pages!FlexibleArrayXmpPage!farray.ht} -\index{farray.ht!pages!FlexibleArrayXmpPage} -\index{FlexibleArrayXmpPage!farray.ht!pages} +\pagehead{FlexibleArrayXmpPage}{farray.ht}{FlexibleArray} +\pageto{notitle}{OneDimensionalArrayXmpPage} +\pageto{notitle}{VectorXmpPage} <>= \begin{page}{FlexibleArrayXmpPage}{FlexibleArray} \beginscroll @@ -7807,26 +7109,11 @@ The previous value is returned. @ \section{file.ht} -<>= -\newcommand{\FileXmpTitle}{File} -\newcommand{\FileXmpNumber}{9.24} - -@ -\subsection{File} -\label{FileXmpPage} -\begin{itemize} -\item TextFileXmpPage \ref{TextFileXmpPage} on -page~\pageref{TextFileXmpPage} -\item KeyedAccessFileXmpPage \ref{KeyedAccessFileXmpPage} on -page~\pageref{KeyedAccessFileXmpPage} -\item LibraryXmpPage \ref{LibraryXmpPage} on -page~\pageref{LibraryXmpPage} -\item FileNameXmpPage \ref{FileNameXmpPage} on -page~\pageref{FileNameXmpPage} -\end{itemize} -\index{pages!FileXmpPage!file.ht} -\index{file.ht!pages!FileXmpPage} -\index{FileXmpPage!file.ht!pages} +\pagehead{FileXmpPage}{file.ht}{File} +\pageto{notitle}{TextFileXmpPage} +\pageto{notitle}{KeyedAccessFileXmpPage} +\pageto{notitle}{LibraryXmpPage} +\pageto{notitle}{FileNameXmpPage} <>= \begin{page}{FileXmpPage}{File} \beginscroll @@ -7837,7 +7124,8 @@ write values of type \spad{S} in files. Before working with a file, it must be made accessible to Axiom with the \spadfunFrom{open}{File} operation. }{ -\spadpaste{ifile:File List Integer:=open("/tmp/jazz1","output") \bound{ifile}} +\spadpaste{ifile:File List Integer:=open("/tmp/jazz1","output") +\bound{ifile}} } The \spadfunFrom{open}{File} function arguments are a \spadtype{FileName} and a \spadtype{String} specifying the mode. @@ -7847,8 +7135,8 @@ The mode must be one of \spad{"input"} or \spad{"output"}. If it is not specified, \spad{"input"} is assumed. Once the file has been opened, you can read or write data. \xtc{ -The operations \spadfunFromX{read}{File} and \spadfunFromX{write}{File} are -provided. +The operations \spadfunFromX{read}{File} and \spadfunFromX{write}{File} +are provided. }{ \spadpaste{write!(ifile, [-1,2,3]) \free{ifile}\bound{ifile1}} } @@ -7916,7 +7204,8 @@ saved. For more information on related topics, see \downlink{`TextFile'}{TextFileXmpPage}\ignore{TextFile}, -\downlink{`KeyedAccessFile'}{KeyedAccessFileXmpPage}\ignore{KeyedAccessFile}, +\downlink{`KeyedAccessFile'}{KeyedAccessFileXmpPage} +\ignore{KeyedAccessFile}, \downlink{`Library'}{LibraryXmpPage}\ignore{Library}, and \downlink{`FileName'}{FileNameXmpPage}\ignore{FileName}. \showBlurb{File} @@ -7926,32 +7215,14 @@ For more information on related topics, see @ \section{float.ht} -<>= -\newcommand{\FloatXmpTitle}{Float} -\newcommand{\FloatXmpNumber}{9.27} - -@ -\subsection{Float} -\label{FloatXmpPage} -\begin{itemize} -\item ugGraphPage \ref{ugGraphPage} on -page~\pageref{ugGraphPage} -\item ugProblemNumericPage \ref{ugProblemNumericPage} on -page~\pageref{ugProblemNumericPage} -\item DoubleFloatXmpPage \ref{DoubleFloatXmpPage} on -page~\pageref{DoubleFloatXmpPage} -\item ugxFloatIntroPage \ref{ugxFloatIntroPage} on -page~\pageref{ugxFloatIntroPage} -\item ugxFloatConvertPage \ref{ugxFloatConvertPage} on -page~\pageref{ugxFloatConvertPage} -\item ugxFloatOutputPage \ref{ugxFloatOutputPage} on -page~\pageref{ugxFloatOutputPage} -\item ugxFloatHilbertPage \ref{ugxFloatHilbertPage} on -page~\pageref{ugxFloatHilbertPage} -\end{itemize} -\index{pages!FloatXmpPage!float.ht} -\index{float.ht!pages!FloatXmpPage} -\index{FloatXmpPage!float.ht!pages} +\pagehead{FloatXmpPage}{float.ht}{Float} +\pageto{notitle}{ugGraphPage} +\pageto{notitle}{ugProblemNumericPage} +\pageto{notitle}{DoubleFloatXmpPage} +\pageto{notitle}{ugxFloatIntroPage} +\pageto{notitle}{ugxFloatConvertPage} +\pageto{notitle}{ugxFloatOutputPage} +\pageto{notitle}{ugxFloatHilbertPage} <>= \begin{page}{FloatXmpPage}{Float} \beginscroll @@ -7994,16 +7265,7 @@ Section \ugProblemNumericNumber\ignore{ugProblemNumeric}, and \end{page} @ -<>= -\newcommand{\ugxFloatIntroTitle}{Introduction to Float} -\newcommand{\ugxFloatIntroNumber}{9.27.1.} - -@ -\subsection{Introduction to Float} -\label{ugxFloatIntroPage} -\index{pages!ugxFloatIntroPage!float.ht} -\index{float.ht!pages!ugxFloatIntroPage} -\index{ugxFloatIntroPage!float.ht!pages} +\pagehead{ugxFloatIntroPage}{float.ht}{Introduction to Float} <>= \begin{page}{ugxFloatIntroPage}{Introduction to Float} \beginscroll @@ -8038,18 +7300,8 @@ numbers. \end{page} @ -<>= -\newcommand{\ugxFloatConvertTitle}{Conversion Functions} -\newcommand{\ugxFloatConvertNumber}{9.27.2.} - -@ -\subsection{Conversion Functions} -\label{ugxFloatConvertPage} -See ugTypesConvertPage \ref{ugTypesConvertPage} on -page~/pageref{ugTypesConvertPage} -\index{pages!ugxFloatConvertPage!float.ht} -\index{float.ht!pages!ugxFloatConvertPage} -\index{ugxFloatConvertPage!float.ht!pages} +\pagehead{ugxFloatConvertPage}{float.ht}{Conversion Functions} +\pageto{notitle}{ugTypesConvertPage} <>= \begin{page}{ugxFloatConvertPage}{Conversion Functions} \beginscroll @@ -8059,8 +7311,8 @@ page~/pageref{ugTypesConvertPage} You can use conversion (\downlink{``\ugTypesConvertTitle''}{ugTypesConvertPage} in Section \ugTypesConvertNumber\ignore{ugTypesConvert}) -to go back and forth between \spadtype{Integer}, \spadtype{Fraction Integer} -and \spadtype{Float}, as appropriate. +to go back and forth between \spadtype{Integer}, +\spadtype{Fraction Integer} and \spadtype{Float}, as appropriate. }{ \spadpaste{i := 3 :: Float \bound{i}} } @@ -8158,16 +7410,8 @@ general, be represented exactly. \autobuttons \end{page} -<>= -\newcommand{\ugxFloatOutputTitle}{Output Functions} -\newcommand{\ugxFloatOutputNumber}{9.27.3.} - @ -\subsection{Output Functions} -\label{ugxFloatOutputPage} -\index{pages!ugxFloatOutputPage!float.ht} -\index{float.ht!pages!ugxFloatOutputPage} -\index{ugxFloatOutputPage!float.ht!pages} +\pagehead{ugxFloatOutputPage}{float.ht}{Output Functions} <>= \begin{page}{ugxFloatOutputPage}{Output Functions} \beginscroll @@ -8231,16 +7475,8 @@ This resets the output printing to the default behavior. \end{page} @ -<>= -\newcommand{\ugxFloatHilbertTitle}{An Example: Determinant of a Hilbert Matrix} -\newcommand{\ugxFloatHilbertNumber}{9.27.4.} - -@ -\subsection{An Example: Determinant of a Hilbert Matrix} -\label{ugxFloatHilbertPage} -\index{pages!ugxFloatHilbertPage!float.ht} -\index{float.ht!pages!ugxFloatHilbertPage} -\index{ugxFloatHilbertPage!float.ht!pages} +\pagehead{ugxFloatHilbertPage}{float.ht} +{An Example: Determinant of a Hilbert Matrix} <>= \begin{page}{ugxFloatHilbertPage}{An Example: Determinant of a Hilbert Matrix} \beginscroll @@ -8255,7 +7491,8 @@ The \eth{\spad{(i,j)}} entry of a Hilbert matrix is given by First do the computation using rational numbers to obtain the exact result. }{ -\spadpaste{a: Matrix Fraction Integer := matrix [[1/(i+j+1) for j in 0..9] for i in 0..9] \bound{a}} +\spadpaste{a: Matrix Fraction Integer := +matrix [[1/(i+j+1) for j in 0..9] for i in 0..9] \bound{a}} } \xtc{ This version of \spadfunFrom{determinant}{Matrix} uses Gaussian @@ -8271,7 +7508,8 @@ elimination. Now use hardware floats. Note that a semicolon (;) is used to prevent the display of the matrix. }{ -\spadpaste{b: Matrix DoubleFloat := matrix [[1/(i+j+1\$DoubleFloat) for j in 0..9] for i in 0..9]; \bound{b}} +\spadpaste{b: Matrix DoubleFloat := +matrix [[1/(i+j+1\$DoubleFloat) for j in 0..9] for i in 0..9]; \bound{b}} } \xtc{ The result given by hardware floats is correct only to four significant @@ -8288,7 +7526,9 @@ Now repeat the computation at a higher precision using \spadtype{Float}. } \xtc{ }{ -\spadpaste{c: Matrix Float := matrix [[1/(i+j+1\$Float) for j in 0..9] for i in 0..9]; \free{d40} \bound{c}} +\spadpaste{c: Matrix Float := +matrix [[1/(i+j+1\$Float) for j in 0..9] for i in 0..9]; +\free{d40} \bound{c}} } \xtc{ }{ @@ -8305,16 +7545,7 @@ Reset \spadfunFrom{digits}{Float} to its default value. @ \section{fname.ht} -<>= -\newcommand{\FileNameXmpTitle}{FileName} -\newcommand{\FileNameXmpNumber}{9.25} - -@ -\subsection{FileName} -\label{FileNameXmpPage} -\index{pages!FileNameXmpPage!fname.ht} -\index{fname.ht!pages!FileNameXmpPage} -\index{FileNameXmpPage!fname.ht!pages} +\pagehead{FileNameXmpPage}{fname.ht}{FileName} <>= \begin{page}{FileNameXmpPage}{FileName} \beginscroll @@ -8363,7 +7594,8 @@ extension \spad{"INPUT"}. \xtc{ It is possible to create a filename from its parts. }{ -\spadpaste{fn := filename("/u/smwatt/work", "fname", "input") \free{fndecl}\bound{fn1}} +\spadpaste{fn := filename("/u/smwatt/work", "fname", "input") +\free{fndecl}\bound{fn1}} } \xtc{ When writing programs, it is helpful to refer to directories via @@ -8373,7 +7605,8 @@ variables. } \xtc{ }{ -\spadpaste{fn := filename(objdir, "table", "spad") \free{fndecl,objdir}\bound{fn2}} +\spadpaste{fn := filename(objdir, "table", "spad") +\free{fndecl,objdir}\bound{fn2}} } \xtc{ If the directory or the extension is given as an empty string, then @@ -8391,8 +7624,8 @@ the named file exists. \spadpaste{exists? "/etc/passwd"} } \xtc{ -The operation \spadfunFrom{readable?}{FileName} tells whether the named file -can be read. If the file does not exist, then it cannot be read. +The operation \spadfunFrom{readable?}{FileName} tells whether the named +file can be read. If the file does not exist, then it cannot be read. }{ \spadpaste{readable? "/etc/passwd"} } @@ -8443,28 +7676,12 @@ with the given extension, and the same defaults are used. @ \section{fr.ht} -<>= -\newcommand{\FactoredXmpTitle}{Factored} -\newcommand{\FactoredXmpNumber}{9.22} - -@ -\subsection{Factored} -\label{FactoredXmpPage} -\begin{itemize} -\item ugxFactoredDecompPage \ref{ugxFactoredDecompPage} on -page~\pageref{ugxFactoredDecompPage} -\item ugxFactoredExpandPage \ref{ugxFactoredExpandPage} on -page~\pageref{ugxFactoredExpandPage} -\item ugxFactoredArithPage \ref{ugxFactoredArithPage} on -page~\pageref{ugxFactoredArithPage} -\item ugxFactoredNewPage \ref{ugxFactoredNewPage} on -page~\pageref{ugxFactoredNewPage} -\item ugxFactoredVarPage \ref{ugxFactoredVarPage} on -page~\pageref{ugxFactoredVarPage} -\end{itemize} -\index{pages!FactoredXmpPage!fr.ht} -\index{fr.ht!pages!FactoredXmpPage} -\index{FactoredXmpPage!fr.ht!pages} +\pagehead{FactoredXmpPage}{fr.ht}{Factored} +\pageto{notitle}{ugxFactoredDecompPage} +\pageto{notitle}{ugxFactoredExpandPage} +\pageto{notitle}{ugxFactoredArithPage} +\pageto{notitle}{ugxFactoredNewPage} +\pageto{notitle}{ugxFactoredVarPage} <>= \begin{page}{FactoredXmpPage}{Factored} \beginscroll @@ -8506,16 +7723,7 @@ multiplication order. \end{page} @ -<>= -\newcommand{\ugxFactoredDecompTitle}{Decomposing Factored Objects} -\newcommand{\ugxFactoredDecompNumber}{9.22.1.} - -@ -\subsection{Decomposing Factored Objects} -\label{ugxFactoredDecompPage} -\index{pages!ugxFactoredDecompPage!fr.ht} -\index{fr.ht!pages!ugxFactoredDecompPage} -\index{ugxFactoredDecompPage!fr.ht!pages} +\pagehead{ugxFactoredDecompPage}{fr.ht}{Decomposing Factored Objects} <>= \begin{page}{ugxFactoredDecompPage}{Decomposing Factored Objects} \beginscroll @@ -8575,17 +7783,7 @@ Neither of these operations returns the unit. \end{page} @ -<>= -\newcommand{\ugxFactoredExpandTitle}{Expanding Factored Objects} -\newcommand{\ugxFactoredExpandNumber}{9.22.2.} - -@ -@ -\subsection{Expanding Factored Objects} -\label{ugxFactoredExpandPage} -\index{pages!ugxFactoredExpandPage!fr.ht} -\index{fr.ht!pages!ugxFactoredExpandPage} -\index{ugxFactoredExpandPage!fr.ht!pages} +\pagehead{ugxFactoredExpandPage}{fr.ht}{Expanding Factored Objects} <>= \begin{page}{ugxFactoredExpandPage}{Expanding Factored Objects} \beginscroll @@ -8614,16 +7812,7 @@ but with multiplicity one, you could do it this way. \end{page} @ -<>= -\newcommand{\ugxFactoredArithTitle}{Arithmetic with Factored Objects} -\newcommand{\ugxFactoredArithNumber}{9.22.3.} - -@ -\subsection{Arithmetic with Factored Objects} -\label{ugxFactoredArithPage} -\index{pages!ugxFactoredArithPage!fr.ht} -\index{fr.ht!pages!ugxFactoredArithPage} -\index{ugxFactoredArithPage!fr.ht!pages} +\pagehead{ugxFactoredArithPage}{fr.ht}{Arithmetic with Factored Objects} <>= \begin{page}{ugxFactoredArithPage}{Arithmetic with Factored Objects} \beginscroll @@ -8704,25 +7893,15 @@ in Section \ugTypesPkgCallNumber\ignore{ugTypesPkgCall}). \end{page} @ -<>= -\newcommand{\ugxFactoredNewTitle}{Creating New Factored Objects} -\newcommand{\ugxFactoredNewNumber}{9.22.4.} - -@ -\subsection{Creating New Factored Objects} -\label{ugxFactoredNewPage} -See FactoredFunctionsTwoXmpPage \ref{FactoredFunctionsTwoXmpPage} on -page~\pageref{FactoredFunctionsTwoXmpPage} -\index{pages!ugxFactoredNewPage!fr.ht} -\index{fr.ht!pages!ugxFactoredNewPage} -\index{ugxFactoredNewPage!fr.ht!pages} +\pagehead{ugxFactoredNewPage}{fr.ht}{Creating New Factored Objects} +\pageto{notitle}{FactoredFnsTwoXmpPage} <>= \begin{page}{ugxFactoredNewPage}{Creating New Factored Objects} \beginscroll The \spadfunFrom{map}{Factored} operation is used to iterate across the unit and bases of a factored object. -See \downlink{`FactoredFunctions2'}{FactoredFunctionsTwoXmpPage} +See \downlink{`FactoredFunctions2'}{FactoredFnsTwoXmpPage} \ignore{FactoredFunctions2} for a discussion of \spadfunFrom{map}{Factored}. @@ -8773,19 +7952,9 @@ returned by \spadfunFrom{factorList}{Factored}. \end{page} @ -<>= -\newcommand{\ugxFactoredVarTitle}{Factored Objects with Variables} -\newcommand{\ugxFactoredVarNumber}{9.22.5.} - -@ -\subsection{Factored Objects with Variables} -\label{ugxFactoredVarPage} -\index{pages!ugxFactoredVarPage!fr.ht} -\index{fr.ht!pages!ugxFactoredVarPage} -\index{ugxFactoredVarPage!fr.ht!pages} +\pagehead{ugxFactoredVarPage}{fr.ht}{Factored Objects with Variables} <>= \begin{page}{ugxFactoredVarPage}{Factored Objects with Variables} -% ===================================================================== \beginscroll \labelSpace{4pc} @@ -8793,7 +7962,8 @@ returned by \spadfunFrom{factorList}{Factored}. Some of the operations available for polynomials are also available for factored polynomials. }{ -\spadpaste{p := (4*x*x-12*x+9)*y*y + (4*x*x-12*x+9)*y + 28*x*x - 84*x + 63 \bound{p}} +\spadpaste{p := (4*x*x-12*x+9)*y*y + (4*x*x-12*x+9)*y + 28*x*x - 84*x + 63 +\bound{p}} } \xtc{ }{ @@ -8818,24 +7988,11 @@ You can differentiate with respect to a variable. @ \section{fr2.ht} +\pagehead{FactoredFnsTwoXmpPage}{fr2.ht}{FactoredFunctions2} +\pageto{notitle}{FactoredXmpPage} +\pageto{notitle}{ugProblemGaloisPage} <>= -\newcommand{\FactoredFunctionsTwoXmpTitle}{FactoredFunctions2} -\newcommand{\FactoredFunctionsTwoXmpNumber}{9.23} - -@ -\subsection{FactoredFunctions2} -\label{FactoredFunctionsTwoXmpPage} -\begin{itemize} -\item FactoredXmpPage \ref{FactoredXmpPage} on -page~\pageref{FactoredXmpPage} -\item ugProblemGaloisPage \ref{ugProblemGaloisPage} on -page~\pageref{ugProblemGaloisPage} -\end{itemize} -\index{pages!FactoredFunctionsTwoXmpPage!fr2.ht} -\index{fr2.ht!pages!FactoredFunctionsTwoXmpPage} -\index{FactoredFunctionsTwoXmpPage!fr2.ht!pages} -<>= -\begin{page}{FactoredFunctionsTwoXmpPage}{FactoredFunctions2} +\begin{page}{FactoredFnsTwoXmpPage}{FactoredFunctions2} \beginscroll The \spadtype{FactoredFunctions2} package implements one operation, @@ -8873,8 +8030,8 @@ be using factored objects of two different types. } It is important to note that both versions of \spadfunFrom{map}{FactoredFunctions2} -destroy any information known about the bases (the fact that they are prime, -for instance). +destroy any information known about the bases (the fact that +they are prime, for instance). \xtc{ The flags for each base are set to ``nil'' in the object returned by \spadfunFrom{map}{FactoredFunctions2}. @@ -8892,22 +8049,9 @@ Section \ugProblemGaloisNumber\ignore{ugProblemGalois}. @ \section{frac.ht} -<>= -\newcommand{\FractionXmpTitle}{Fraction} -\newcommand{\FractionXmpNumber}{9.28} - -@ -\subsection{Fraction} -\label{FractionXmpPage} -\begin{itemize} -\item ContinuedFractionXmpPage \ref{ContinuedFractionXmpPage} on -page~\pageref{ContinuedFractionXmpPage} -\item PartialFractionXmpPage \ref{PartialFractionXmpPage} on -page~\pageref{PartialFractionXmpPage} -\end{itemize} -\index{pages!FractionXmpPage!frac.ht} -\index{frac.ht!pages!FractionXmpPage} -\index{FractionXmpPage!frac.ht!pages} +\pagehead{FractionXmpPage}{frac.ht}{Fraction} +\pageto{notitle}{ContinuedFractionXmpPage} +\pageto{notitle}{PartialFractionXmpPage} <>= \begin{page}{FractionXmpPage}{Fraction} \beginscroll @@ -9007,24 +8151,14 @@ in Section \ugTypesConvertNumber\ignore{ugTypesConvert}. @ \section{fparfrac.ht} +\pagehead{FullPartialFracExpansionXmpPage}{fparfrac.ht} +{FullPartialFracExpansion} +\pageto{notitle}{PartialFractionXmpPage} <>= -\newcommand{\FullPartialFractionExpansionXmpTitle} -{FullPartialFractionExpansion} -\newcommand{\FullPartialFractionExpansionXmpNumber}{9.29} - -@ -\subsection{FullPartialFractionExpansion} -\label{FullPartialFractionExpansionXmpPage} -See PartialFractionXmpPage \ref{PartialFractionXmpPage} on -page~\pageref{PartialFractionXmpPage} -\index{pages!FullPartialFractionExpansionXmpPage!fparfrac.ht} -\index{fparfrac.ht!pages!FullPartialFractionExpansionXmpPage} -\index{FullPartialFractionExpansionXmpPage!fparfrac.ht!pages} -<>= -\begin{page}{FullPartialFractionExpansionXmpPage}{FullPartialFractionExpansion} +\begin{page}{FullPartialFracExpansionXmpPage}{FullPartialFracExpansion} \beginscroll -The domain \spadtype{FullPartialFractionExpansion} implements +The domain \spadtype{FullPartialFracExpansion} implements factor-free conversion of quotients to full partial fractions. \xtc{ @@ -9039,9 +8173,9 @@ Here is a simple-looking rational function. \spadpaste{f : Fx := 36 / (x**5-2*x**4-2*x**3+4*x**2+x-2) \bound{f}\free{Fx}} } \xtc{ -We use \spadfunFrom{fullPartialFraction}{FullPartialFractionExpansion} +We use \spadfunFrom{fullPartialFraction}{FullPartialFracExpansion} to convert it to an object of type -\spadtype{FullPartialFractionExpansion}. +\spadtype{FullPartialFracExpansion}. }{ \spadpaste{g := fullPartialFraction f \bound{g}\free{f}} } @@ -9068,7 +8202,8 @@ We can check that the two forms represent the same function. \xtc{ Here are some examples that are more complicated. }{ -\spadpaste{f : Fx := (x**5 * (x-1)) / ((x**2 + x + 1)**2 * (x-2)**3) \free{Fx}\bound{f2}} +\spadpaste{f : Fx := (x**5 * (x-1)) / ((x**2 + x + 1)**2 * (x-2)**3) +\free{Fx}\bound{f2}} } \xtc{ }{ @@ -9080,7 +8215,8 @@ Here are some examples that are more complicated. } \xtc{ }{ -\spadpaste{f : Fx := (2*x**7-7*x**5+26*x**3+8*x) / (x**8-5*x**6+6*x**4+4*x**2-8) \free{Fx}\bound{f3}} +\spadpaste{f : Fx := (2*x**7-7*x**5+26*x**3+8*x) / +(x**8-5*x**6+6*x**4+4*x**2-8) \free{Fx}\bound{f3}} } \xtc{ }{ @@ -9092,7 +8228,11 @@ Here are some examples that are more complicated. } \xtc{ }{ -\spadpaste{f:Fx := x**3 / (x**21 + 2*x**20 + 4*x**19 + 7*x**18 + 10*x**17 + 17*x**16 + 22*x**15 + 30*x**14 + 36*x**13 + 40*x**12 + 47*x**11 + 46*x**10 + 49*x**9 + 43*x**8 + 38*x**7 + 32*x**6 + 23*x**5 + 19*x**4 + 10*x**3 + 7*x**2 + 2*x + 1)\free{Fx}\bound{f4}} +\spadpaste{f:Fx := x**3 / +(x**21 + 2*x**20 + 4*x**19 + 7*x**18 + 10*x**17 + 17*x**16 + +22*x**15 + 30*x**14 + 36*x**13 + 40*x**12 + 47*x**11 + 46*x**10 + +49*x**9 + 43*x**8 + 38*x**7 + 32*x**6 + 23*x**5 + 19*x**4 + +10*x**3 + 7*x**2 + 2*x + 1)\free{Fx}\bound{f4}} } \xtc{ }{ @@ -9118,29 +8258,15 @@ decompositions. @ \section{function.ht} -\subsection{Functions in Axiom} -\label{FunctionPage} -\includegraphics[scale=.5]{ps/v71functionpage.eps} -\index{images!functionpage} - -Called from ``Topics'' (TopicPage) \ref{TopicPage} on page~\pageref{TopicPage} -\begin{itemize} -\item ``Rational Functions'' (RationalFunctionPage) -\ref{RationalFunctionPage} on page~\pageref{RationalFunctionPage} -\item ``Algebraic Functions'' (AlgebraicFunctionPage) -\ref{AlgebraicFunctionPage} on page~\pageref{AlgebraicFunctionPage} -\item ``Elementary Functions'' (ElementaryFunctionPage) -\ref{ElementaryFunctionPage} on page~\pageref{ElementaryFunctionPage} -\item ``Simplification'' (FunctionSimplificationPage) -\ref{FunctionSimplificationPage} on page~\pageref{FunctionSimplificationPage} -\item ``Pattern Matching'' (ugUserRulesPage) -\ref{ugUserRulesPage} on page~\pageref{ugUserRulesPage} -\item ``Operator Algebra'' (OperatorXmpPage) -\ref{OperatorXmpPage} on page~\pageref{OperatorXmpPage} -\end{itemize} -\index{pages!FunctionPage!function.ht} -\index{function.ht!pages!FunctionPage} -\index{FunctionPage!function.ht!pages} +\pagehead{FunctionPage}{function.ht}{Functions in Axiom} +\pagepic{ps/v71functionpage.eps}{functionpage} +\pagefrom{Topics}{TopicPage} +\pageto{Rational Functions}{RationalFunctionPage} +\pageto{Algebraic Functions}{AlgebraicFunctionPage} +\pageto{Elementary Functions}{ElementaryFunctionPage} +\pageto{Simplification}{FunctionSimplificationPage} +\pageto{Pattern Matching}{ugUserRulesPage} +\pageto{Operator Algebra}{OperatorXmpPage} <>= \begin{page}{FunctionPage}{Functions in Axiom} % @@ -9177,11 +8303,7 @@ The operator algebra facility. \autobuttons \end{page} @ -\subsection{Rational Functions} -\label{RationalFunctionPage} -\index{pages!RationalFunctionPage!function.ht} -\index{function.ht!pages!RationalFunctionPage} -\index{RationalFunctionPage!function.ht!pages} +\pagehead{RationalFunctionPage}{function.ht}{Rational Functions} <>= \begin{page}{RationalFunctionPage}{Rational Functions} \beginscroll @@ -9208,11 +8330,7 @@ similar to the one for polynomials: \end{page} @ -\subsection{Algebraic Functions} -\label{AlgebraicFunctionPage} -\index{pages!AlgebraicFunctionPage!function.ht} -\index{function.ht!pages!AlgebraicFunctionPage} -\index{AlgebraicFunctionPage!function.ht!pages} +\pagehead{AlgebraicFunctionPage}{function.ht}{Algebraic Functions} <>= \begin{page}{AlgebraicFunctionPage}{Algebraic Functions} \beginscroll @@ -9235,39 +8353,32 @@ calculations: \spadpaste{(y + 1) ** 3\free{y}} But denominators, are not automatically rationalized: \spadpaste{g := inv f\bound{g}\free{y}} -Use \spadfun{ratDenom} to remove the algebraic quantities from the denominator: +Use \spadfun{ratDenom} to remove the algebraic quantities +from the denominator: \spadpaste{ratDenom g\free{g}} \endscroll \autobuttons \end{page} @ -\subsection{Elementary Functions} -\label{ElementaryFunctionPage} -\index{pages!ElementaryFunctionPage!function.ht} -\index{function.ht!pages!ElementaryFunctionPage} -\index{ElementaryFunctionPage!function.ht!pages} +\pagehead{ElementaryFunctionPage}{function.ht}{Elementary Functions} <>= \begin{page}{ElementaryFunctionPage}{Elementary Functions} \beginscroll Axiom has most of the usual functions from calculus built-in: \spadpaste{f := x * log y * sin(1/(x+y))\bound{f}} -You can substitute values or another elementary functions for the variables -with the function \spadfun{eval}: +You can substitute values or another elementary functions for +the variables with the function \spadfun{eval}: \spadpaste{eval(f, [x = y, y = x])\free{f}} -As you can see, the substitutions are made 'in parallel' as in the case -of polynomials. It's also possible to substitute expressions for kernels -instead of variables: +As you can see, the substitutions are made 'in parallel' as in the +case of polynomials. It's also possible to substitute expressions +for kernels instead of variables: \spadpaste{eval(f, log y = acosh(x + sqrt y))\free{f}} \endscroll \autobuttons \end{page} @ -\subsection{Simplification} -\label{FunctionSimplificationPage} -See ugUserRulesPage \ref{ugUserRulesPage} on page~\pageref{ugUserRulesPage} -\index{pages!FunctionSimplificationPage!function.ht} -\index{function.ht!pages!FunctionSimplificationPage} -\index{FunctionSimplificationPage!function.ht!pages} +\pagehead{FunctionSimplificationPage}{function.ht}{Simplification} +\pageto{notitle}{ugUserRulesPage} <>= \begin{page}{FunctionSimplificationPage}{Simplification} \beginscroll @@ -9276,7 +8387,8 @@ different times, so Axiom offers a large number of `simplification' functions. The most common one, which performs the usual trigonometric simplifications is \spadfun{simplify}: -\spadpaste{f := cos(x)/sec(x) * log(sin(x)**2/(cos(x)**2+sin(x)**2)) \bound{f}} +\spadpaste{f := cos(x)/sec(x) * log(sin(x)**2/(cos(x)**2+sin(x)**2)) +\bound{f}} \spadpaste{g := simplify f\bound{g}\free{f}} If the result of \spadfun{simplify} is not satisfactory, specific transformations are available. @@ -9327,19 +8439,11 @@ matcher}{ugUserRulesPage}. @ \section{gbf.ht} +\pagehead{GroebnerFactorizationPkgXmpPage}{gbf.ht} +{GroebnerFactorizationPkg} <>= -\newcommand{\GroebnerFactorizationPackageXmpTitle}{GroebnerFactorizationPackage} -\newcommand{\GroebnerFactorizationPackageXmpNumber}{9.31} - -@ -\subsection{GroebnerFactorizationPackage} -\label{GroebnerFactorizationPackageXmpPage} -\index{pages!GroebnerFactorizationPackageXmpPage!gbf.ht} -\index{gbf.ht!pages!GroebnerFactorizationPackageXmpPage} -\index{GroebnerFactorizationPackageXmpPage!gbf.ht!pages} -<>= -\begin{page}{GroebnerFactorizationPackageXmpPage}{GroebnerFactorizationPackage} -% ===================================================================== +\begin{page}{GroebnerFactorizationPkgXmpPage} +{GroebnerFactorizationPkg} \beginscroll %% J. Grabmeier 26 04 91 Solving systems of polynomial equations with the @@ -9356,8 +8460,8 @@ Since Axiom has an excellent polynomial factorization algorithm, it is very natural to combine the \texht{Gr\"{o}bner}{Groebner} and factorization algorithms. -\spadtype{GroebnerFactorizationPackage} exports the -\axiomFunFrom{groebnerFactorize}{GroebnerFactorizationPackage} +\spadtype{GroebnerFactorizationPkg} exports the +\axiomFunFrom{groebnerFactorize}{GroebnerFactorizationPkg} operation which implements a modified \texht{Gr\"{o}bner}{Groebner} basis algorithm. In this algorithm, each polynomial that is to be put into the @@ -9384,13 +8488,15 @@ immediate neighbours is 1. We will denote the distances to the other three carbon atoms by \smath{x}, \smath{y} and \smath{z}. -\texht{A.~Dress}{A. Dress} developed a theory to decide whether a set of points %% reference? -and distances between them can be realized in an \smath{n}-dimensional space. -Here, of course, we have \smath{n = 3}. +\texht{A.~Dress}{A. Dress} developed a theory to decide whether a set +of points and distances between them can be realized in an +\smath{n}-dimensional space. Here, of course, we have \smath{n = 3}. \xtc{ }{ -\spadpaste{mfzn : SQMATRIX(6,DMP([x,y,z],Fraction INT)) := [[0,1,1,1,1,1], [1,0,1,8/3,x,8/3], [1,1,0,1,8/3,y], [1,8/3,1,0,1,8/3], [1,x,8/3,1,0,1], [1,8/3,y,8/3,1,0]] \bound{mfzn}} +\spadpaste{mfzn : SQMATRIX(6,DMP([x,y,z],Fraction INT)) := +[[0,1,1,1,1,1], [1,0,1,8/3,x,8/3], [1,1,0,1,8/3,y], [1,8/3,1,0,1,8/3], +[1,x,8/3,1,0,1], [1,8/3,y,8/3,1,0]] \bound{mfzn}} } \xtc{ For the cyclohexan, the distances have to satisfy this equation. @@ -9401,7 +8507,8 @@ For the cyclohexan, the distances have to satisfy this equation. They also must satisfy the equations given by cyclic shifts of the indeterminates. }{ -\spadpaste{groebnerFactorize [eq, eval(eq, [x,y,z], [y,z,x]), eval(eq, [x,y,z], [z,x,y])] \free{eq}} +\spadpaste{groebnerFactorize [eq, eval(eq, [x,y,z], [y,z,x]), +eval(eq, [x,y,z], [z,x,y])] \free{eq}} } The union of the solutions of this list is the @@ -9415,12 +8522,12 @@ which means that we have a solution space given by one parameter. This gives the ``chair'' form of the cyclohexan. The parameter describes the angle of the ``back of the chair.'' -\axiomFunFrom{groebnerFactorize}{GroebnerFactorizationPackage} +\axiomFunFrom{groebnerFactorize}{GroebnerFactorizationPkg} has an optional \axiomType{Boolean}-valued second argument. When it is \spad{true} partial results are displayed, since it may happen that the calculation does not terminate in a reasonable time. -See the source code for \spadtype{GroebnerFactorizationPackage} +See the source code for \spadtype{GroebnerFactorizationPkg} in {\bf groebf\spadFileExt{}} for more details about the algorithms used. \endscroll @@ -9429,16 +8536,9 @@ used. @ \section{gloss.ht} -\subsection{Glossary} -\label{GlossaryPage} -\includegraphics[scale=.5]{ps/v71glossary.eps} -\index{images!glossary} - -Called from ``Reference'' (TopReferencePage) -\ref{TopReferencePage} on page~\pageref{TopReferencePage} -\index{pages!GlossaryPage!gloss.ht} -\index{gloss.ht!pages!GlossaryPage} -\index{GlossaryPage!gloss.ht!pages} +\pagehead{GlossaryPage}{gloss.ht}{Glossary} +\pagepic{ps/v71glossary.eps}{glossary} +\pagefrom{Reference}{TopReferencePage} <>= \begin{page}{GlossaryPage}{G l o s s a r y} \beginscroll\beginmenu\item\newline{\em \menuitemstyle{}}{\em !}\space{} @@ -9967,7 +9067,7 @@ category \spadtype{LinearAggregate}). in the Axiom language. Infix operators have a relative \spadgloss{precedence}. \item\newline{\em \menuitemstyle{}}{\em input area}\space{} -a rectangular area on a \HyperName{} screen into which users can enter text. +a rectangular area on a Hyperdoc screen into which users can enter text. \item\newline{\em \menuitemstyle{}}{\em instantiate}\space{} to build a \spadgloss{category},{} \spadgloss{domain},{} or \spadgloss{package} at run-time @@ -10316,7 +9416,7 @@ an error-checking which can be done only when the program receives user input; for example,{} confirming that a value is in the proper range for a computation. \item\newline{\em \menuitemstyle{}}{\em search string}\space{} -a string entered into an \spadgloss{input area} on a \HyperName{} screen +a string entered into an \spadgloss{input area} on a Hyperdoc screen \item\newline{\em \menuitemstyle{}}{\em selector}\space{} an identifier used to address a component value of a gloss{Record} datatype. \item\newline{\em \menuitemstyle{}}{\em semantics}\space{} @@ -10489,26 +9589,13 @@ for glossary entry matching \inputstring{pattern}{24}{*}\end{page} @ \section{graphics.ht} -\subsection{Graphics} -\label{GraphicsPage} -\includegraphics[scale=.5]{ps/v71graphicspage.eps} -\index{images!graphicspage} - -Called from ``Topics'' (TopicPage) \ref{TopicPage} on page~\pageref{TopicPage} -\begin{itemize} -\item ``Examples'' (GraphicsExamplePage) -\ref{GraphicsExamplePage} on page~\pageref{GraphicsExamplePage} -\item ``2D Graphics'' (TwoDimensionalGraphicsPage) -\ref{TwoDimensionalGraphicsPage} on page~\pageref{TwoDimensionalGraphicsPage} -\item ``3D Graphics'' (ThreeDimensionalGraphicsPage) -\ref{ThreeDimensionalGraphicsPage} on -page~\pageref{ThreeDimensionalGraphicsPage} -\item ``Viewports'' (ViewportPage) -\ref{ViewportPage} on page~\pageref{ViewportPage} -\end{itemize} -\index{pages!GraphicsPage!graphics.ht} -\index{graphics.ht!pages!GraphicsPage} -\index{GraphicsPage!graphics.ht!pages} +\pagehead{GraphicsPage}{graphics.ht}{Graphics} +\pagepic{ps/v71graphicspage.eps}{graphicspage} +\pagefrom{Topics}{TopicPage} +\pageto{Examples}{GraphicsExamplePage} +\pageto{2D Graphics}{TwoDimensionalGraphicsPage} +\pageto{3D Graphics}{ThreeDimensionalGraphicsPage} +\pageto{Viewports}{ViewportPage} <>= \begin{page}{GraphicsPage}{Graphics} Axiom can plot curves and surfaces of @@ -10529,30 +9616,14 @@ Customize graphics using Viewports \autobuttons \end{page} @ -\subsection{Graphics Examples} -\label{GraphicsExamplePage} -\begin{itemize} -\item AssortedGraphicsExamplePage \ref{AssortedGraphicsExamplePage} on -page~\pageref{AssortedGraphicsExamplePage} -\item ThreeDimensionalGraphicsExamplePage -\ref{ThreeDimensionalGraphicsExamplePage} on -page~\pageref{ThreeDimensionalGraphicsExamplePage} -\item OneVariableGraphicsExamplePage -\ref{OneVariableGraphicsExamplePage} on -page~\pageref{OneVariableGraphicsExamplePage} -\item PolarGraphicsExamplePage \ref{PolarGraphicsExamplePage} on -page~\pageref{PolarGraphicsExamplePage} -\item ParametricCurveGraphicsExamplePage -\ref{ParametricCurveGraphicsExamplePage} on -page~\ref{ParametricCurveGraphicsExamplePage} -\item ImplicitCurveGraphicsExamplePage \ref{ImplicitCurveGraphicsExamplePage} -on page~\pageref{ImplicitCurveGraphicsExamplePage} -\item ListPointsGraphicsExamplePage \ref{ListPointsGraphicsExamplePage} -on page~\pageref{ListPointsGraphicsExamplePage} -\end{itemize} -\index{pages!GraphicsExamplePage!graphics.ht} -\index{graphics.ht!pages!GraphicsExamplePage} -\index{GraphicsExamplePage!graphics.ht!pages} +\pagehead{GraphicsExamplePage}{graphics.ht}{Graphics Examples} +\pageto{notitle}{AssortedGraphicsExamplePage} +\pageto{notitle}{ThreeDimensionalGraphicsExamplePage} +\pageto{notitle}{OneVariableGraphicsExamplePage} +\pageto{notitle}{PolarGraphicsExamplePage} +\pageto{notitle}{ParametricCurveGraphicsExamplePage} +\pageto{notitle}{ImplicitCurveGraphicsExamplePage} +\pageto{notitle}{ListPointsGraphicsExamplePage} <>= \begin{page}{GraphicsExamplePage}{Graphics Examples} \beginscroll @@ -10561,9 +9632,11 @@ Choose a specific type of graph or choose Assorted Examples. \beginmenu \menulink{Assorted Examples}{AssortedGraphicsExamplePage} \newline Examples of each type of Axiom graphics. -\menulink{Three Dimensional Graphics}{ThreeDimensionalGraphicsExamplePage} \newline +\menulink{Three Dimensional Graphics} +{ThreeDimensionalGraphicsExamplePage} \newline Plot parametrically defined surfaces of three functions. -\menulink{Functions of One Variable}{OneVariableGraphicsExamplePage} \newline +\menulink{Functions of One Variable}{OneVariableGraphicsExamplePage} +\newline Plot curves defined by an equation y = f(x). \menulink{Parametric Curves}{ParametricCurveGraphicsExamplePage} \newline Plot curves defined by parametric equations x = f(t), y = g(t). @@ -10582,11 +9655,7 @@ Plot lists of points in the (x,y)-plane. \autobuttons \end{page} @ -\subsection{Assorted Graphics Examples} -\label{AssortedGraphicsExamplePage} -\index{pages!AssortedGraphicsExamplePage!graphics.ht} -\index{graphics.ht!pages!AssortedGraphicsExamplePage} -\index{AssortedGraphicsExamplePage!graphics.ht!pages} +\pagehead{AssortedGraphicsExamplePage}{graphics.ht}{Assorted Graphics Examples} <>= \begin{page}{AssortedGraphicsExamplePage}{Assorted Graphics Examples} \beginscroll @@ -10596,33 +9665,41 @@ Function of two variables: z = f(x,y). Function of one variable: y = f(x). \graphpaste{draw(sin tan x - tan sin x,x = 0..6) \bound{example2} } Plane parametric curve: x = f(t), y = g(t). -\graphpaste{draw(curve(sin(t)*sin(2*t), sin(3*t)*sin(4*t)), t = 0..2*\%pi) \bound{example3}} +\graphpaste{draw(curve(sin(t)*sin(2*t), sin(3*t)*sin(4*t)), t = 0..2*\%pi) +\bound{example3}} Space parametric curve: x = f(t), y = g(t), z = h(t). -\graphpaste{draw(curve(sin(t)*sin(2*t), sin(3*t)*sin(4*t), sin(5*t)*sin(6*t)), t = 0..2*\%pi) \bound{example4}} +\graphpaste{draw(curve(sin(t)*sin(2*t), sin(3*t)*sin(4*t), +sin(5*t)*sin(6*t)), t = 0..2*\%pi) \bound{example4}} Polar coordinates: r = f(theta). -\graphpaste{draw(sin(17*t), t = 0..2*\%pi, coordinates == polar) \bound{example5}} +\graphpaste{draw(sin(17*t), t = 0..2*\%pi, coordinates == polar) +\bound{example5}} Implicit curves: p(x,y) = 0. -\graphpaste{draw(y**2 + y = x**3 - x, x, y,range == \[-2..2,-2..1\]) \bound{example6}} +\graphpaste{draw(y**2 + y = x**3 - x, x, y,range == \[-2..2,-2..1\]) +\bound{example6}} Run all examples. \spadpaste{All \free{example1 example2 example3 example4 example5 example6}} \endscroll \autobuttons \end{page} @ -\subsection{Three Dimensional Graphics} -\label{ThreeDimensionalGraphicsExamplePage} -\index{pages!ThreeDimensionalGraphicsExamplePage!graphics.ht} -\index{graphics.ht!pages!ThreeDimensionalGraphicsExamplePage} -\index{ThreeDimensionalGraphicsExamplePage!graphics.ht!pages} +\pagehead{ThreeDimensionalGraphicsExamplePage}{graphics.ht} +{Three Dimensional Graphics} <>= -\begin{page}{ThreeDimensionalGraphicsExamplePage}{Three Dimensional Graphics} -Plots of parametric surfaces defined by functions f(u,v), g(u,v), and h(u,v). -Choose a particular example or choose 'All' to see all the examples. +\begin{page}{ThreeDimensionalGraphicsExamplePage} +{Three Dimensional Graphics} +Plots of parametric surfaces defined by functions f(u,v), g(u,v), +and h(u,v). Choose a particular example or choose 'All' to see +all the examples. \beginscroll Pear Surface. -\graphpaste{draw(surface((1+exp(-100*u*u))*sin(\%pi*u)*sin(\%pi*v), (1+exp(-100*u*u))*sin(\%pi*u)*cos(\%pi*v), (1+exp(-100*u*u))*cos(\%pi*u)), u=0..1, v=0..2, title=="Pear") \bound{example1}} +\graphpaste{draw(surface((1+exp(-100*u*u))*sin(\%pi*u)*sin(\%pi*v), +(1+exp(-100*u*u))*sin(\%pi*u)*cos(\%pi*v), +(1+exp(-100*u*u))*cos(\%pi*u)), u=0..1, v=0..2, title=="Pear") +\bound{example1}} Trigonometric Screw. -\graphpaste{draw(surface(x*cos(y),x*sin(y),y*cos(x)), x=-4..4, y=0..2*\%pi, var1Steps==40, var2Steps==40, title=="Trig Screw") \bound{example2}} +\graphpaste{draw(surface(x*cos(y),x*sin(y),y*cos(x)), +x=-4..4, y=0..2*\%pi, var1Steps==40, var2Steps==40, +title=="Trig Screw") \bound{example2}} Etruscan Venus. \newline (click on the draw button to execute this example) \spadpaste{a := 1.3 * cos(2*x) * cos(y) + sin(y) * cos(x)\bound{a}} @@ -10631,27 +9708,31 @@ Etruscan Venus. \newline \newline \spadpaste{c := 2.5 * cos(y) \bound{c}} \newline -\graphpaste{draw(surface(a,b,c), x=0..\%pi, y=-\%pi..\%pi, var1Steps==40, var2Steps==40, title=="Etruscan Venus") \free{a b c} \bound{example3}} +\graphpaste{draw(surface(a,b,c), x=0..\%pi, y=-\%pi..\%pi, +var1Steps==40, var2Steps==40, title=="Etruscan Venus") +\free{a b c} \bound{example3}} Banchoff Klein Bottle. \newline (click on the draw button to execute this example) -\spadpaste{f:=cos(x)*(cos(x/2)*(sqrt(2) + cos(y))+(sin(x/2)*sin(y)*cos(y)))\bound{f}} +\spadpaste{f:=cos(x)*(cos(x/2)*(sqrt(2) + cos(y))+ +(sin(x/2)*sin(y)*cos(y)))\bound{f}} \newline -\spadpaste{g:=sin(x)*(cos(x/2)*(sqrt(2) + cos(y))+(sin(x/2)*sin(y)*cos(y)))\bound{g}} +\spadpaste{g:=sin(x)*(cos(x/2)*(sqrt(2) + cos(y))+ +(sin(x/2)*sin(y)*cos(y)))\bound{g}} \newline -\spadpaste{h:=-sin(x/2)*(sqrt(2)+cos(y)) + cos(x/2)*sin(y)*cos(y) \bound{h}} +\spadpaste{h:=-sin(x/2)*(sqrt(2)+cos(y)) + +cos(x/2)*sin(y)*cos(y) \bound{h}} \newline -\graphpaste{draw(surface(f,g,h), x=0..4*\%pi, y=0..2*\%pi, var1Steps==50, var2Steps==50, title=="Banchoff Klein Bottle") \free{f g h} \bound{example4}} +\graphpaste{draw(surface(f,g,h), x=0..4*\%pi, +y=0..2*\%pi, var1Steps==50, var2Steps==50, +title=="Banchoff Klein Bottle") \free{f g h} \bound{example4}} \newline \spadpaste{All \free{example1 example2 example3 example4}} \endscroll \autobuttons \end{page} @ -\subsection{Functions of One Variable} -\label{OneVariableGraphicsExamplePage} -\index{pages!OneVariableGraphicsExamplePage!graphics.ht} -\index{graphics.ht!pages!OneVariableGraphicsExamplePage} -\index{OneVariableGraphicsExamplePage!graphics.ht!pages} +\pagehead{OneVariableGraphicsExamplePage}{graphics.ht} +{Functions of One Variable} <>= \begin{page}{OneVariableGraphicsExamplePage}{Functions of One Variable} \beginscroll @@ -10670,36 +9751,33 @@ Choose a particular example or choose 'All' to see all the examples. \autobuttons \end{page} @ -\subsection{Parametric Curves} -\label{ParametricCurveGraphicsExamplePage} -\index{pages!ParametricCurveGraphicsExamplePage!graphics.ht} -\index{graphics.ht!pages!ParametricCurveGraphicsExamplePage} -\index{ParametricCurveGraphicsExamplePage!graphics.ht!pages} +\pagehead{ParametricCurveGraphicsExamplePage}{graphics.ht} +{Parametric Curves} <>= \begin{page}{ParametricCurveGraphicsExamplePage}{Parametric Curves} Plots of parametric curves x = f(t), y = g(t). Pick a particular example or choose 'All' to see all the examples. \beginscroll The Lemniscate of Bernoulli. -\graphpaste{draw(curve(cos(t/(1+sin(t)**2)), sin(t)*cos(t)/(1+sin(t)**2)), t = -\%pi..\%pi) \bound{example1}} +\graphpaste{draw(curve(cos(t/(1+sin(t)**2)), +sin(t)*cos(t)/(1+sin(t)**2)), t = -\%pi..\%pi) \bound{example1}} Lissajous curve. -\graphpaste{draw(curve(9*sin(3*t/4), 8*sin(t)), t = -4*\%pi..4*\%pi) \bound{example2}} +\graphpaste{draw(curve(9*sin(3*t/4), 8*sin(t)), +t = -4*\%pi..4*\%pi) \bound{example2}} A gnarly closed curve. -\graphpaste{draw(curve(sin(t)*sin(2*t)*sin(3*t), sin(4*t)*sin(5*t)*sin(6*t)),t = 0..2*\%pi) +\graphpaste{draw(curve(sin(t)*sin(2*t)*sin(3*t), +sin(4*t)*sin(5*t)*sin(6*t)),t = 0..2*\%pi) \bound{example3}} Another closed curve. -\graphpaste{draw(curve(cos(4*t)*cos(7*t), cos(4*t)*sin(7*t)), t = 0..2*\%pi) \bound{example4}} +\graphpaste{draw(curve(cos(4*t)*cos(7*t), cos(4*t)*sin(7*t)), +t = 0..2*\%pi) \bound{example4}} Run all examples on this page. \spadpaste{All \free{example1 example2 example3 example4}} \endscroll \autobuttons \end{page} @ -\subsection{Polar Coordinates} -\label{PolarGraphicsExamplePage} -\index{pages!PolarGraphicsExamplePage!graphics.ht} -\index{graphics.ht!pages!PolarGraphicsExamplePage} -\index{PolarGraphicsExamplePage!graphics.ht!pages} +\pagehead{PolarGraphicsExamplePage}{graphics.ht}{Polar Coordinates} <>= \begin{page}{PolarGraphicsExamplePage}{Polar Coordinates} Plots of curves given by an equation in polar coordinates, r = f(theta). @@ -10710,9 +9788,11 @@ A Circle. A Spiral. \graphpaste{draw(t,t = 0..100, coordinates == polar) \bound{example2} } A Petal Curve. -\graphpaste{draw(sin(4*t), t = 0..2*\%pi, coordinates == polar) \bound{example3} } +\graphpaste{draw(sin(4*t), t = 0..2*\%pi, coordinates == polar) +\bound{example3} } A Limacon. -\graphpaste{draw(2 + 3 * sin t, t = 0..2*\%pi, coordinates == polar) \bound{example4} } +\graphpaste{draw(2 + 3 * sin t, t = 0..2*\%pi, coordinates == polar) +\bound{example4} } Run all examples on this page. \spadpaste{All \free{ %example1 @@ -10721,11 +9801,7 @@ example2 example3 example4}} \autobuttons \end{page} @ -\subsection{Implicit Curves} -\label{ImplicitCurveGraphicsExamplePage} -\index{pages!ImplicitCurveGraphicsExamplePage!graphics.ht} -\index{graphics.ht!pages!ImplicitCurveGraphicsExamplePage} -\index{ImplicitCurveGraphicsExamplePage!graphics.ht!pages} +\pagehead{ImplicitCurveGraphicsExamplePage}{graphics.ht}{Implicit Curves} <>= \begin{page}{ImplicitCurveGraphicsExamplePage}{Implicit Curves} Non-singular curves defined by a polynomial equation p(x,y) = 0 @@ -10733,34 +9809,37 @@ in a rectangular region in the plane. Pick a particular example or choose 'All' to see all the examples. \beginscroll A Conic Section (Hyperbola). -\graphpaste{draw(x * y = 1, x, y, range == \[-3..3, -3..3\]) \bound{example1} } +\graphpaste{draw(x * y = 1, x, y, range == \[-3..3, -3..3\]) +\bound{example1} } An Elliptic Curve. -\graphpaste{draw(y**2 + y = x**3 - x, x, y, range == \[-2..2, -2..1\]) \bound{example2} } +\graphpaste{draw(y**2 + y = x**3 - x, x, y, +range == \[-2..2, -2..1\]) \bound{example2} } Cartesian Ovals. -\spadpaste{p := ((x**2 + y**2 + 1) - 8*x)**2 - (8*(x**2 + y**2 + 1) - 4*x - 1) \bound{p} } -\graphpaste{draw(p = 0, x, y, range == \[-1..11, -7..7\], title == "Cartesian Ovals") \free{p} \bound{example3} } +\spadpaste{p := ((x**2 + y**2 + 1) - 8*x)**2 - +(8*(x**2 + y**2 + 1) - 4*x - 1) \bound{p} } +\graphpaste{draw(p = 0, x, y, range == \[-1..11, -7..7\], +title == "Cartesian Ovals") \free{p} \bound{example3} } Cassinian Ovals: two loops. -\spadpaste{q := (x**2 + y**2 + 7**2)**2 - (6**4 + 4*7**2*x**2) \bound{q} } -\graphpaste{draw(q = 0, x, y, range == \[-10..10, -4..4\], title == "Cassinian oval with two loops") \free{q} \bound{example4} } +\spadpaste{q := (x**2 + y**2 + 7**2)**2 - (6**4 + 4*7**2*x**2) +\bound{q} } +\graphpaste{draw(q = 0, x, y, range == \[-10..10, -4..4\], +title == "Cassinian oval with two loops") \free{q} \bound{example4} } Run all examples on this page. \spadpaste{All \free{example1 example2 example3 example4}} \endscroll \autobuttons \end{page} @ -\subsection{Lists of Points} -\label{ListPointsGraphicsExamplePage} -\index{pages!ListPointsGraphicsExamplePage!graphics.ht} -\index{graphics.ht!pages!ListPointsGraphicsExamplePage} -\index{ListPointsGraphicsExamplePage!graphics.ht!pages} +\pagehead{ListPointsGraphicsExamplePage}{graphics.ht}{Lists of Points} <>= \begin{page}{ListPointsGraphicsExamplePage}{Lists of Points} Axiom has the ability to create lists of points in a two dimensional -graphics viewport. This is done by utilizing the \spadtype{GraphImage} and -\spadtype{TwoDimensionalViewport} domain facilities. +graphics viewport. This is done by utilizing the \spadtype{GraphImage} +and \spadtype{TwoDimensionalViewport} domain facilities. \beginscroll \indent{5}\newline -{\em NOTE: It is only necessary to click on the makeViewport2D command button to plot this curve example}. +{\em NOTE: It is only necessary to click on the makeViewport2D +command button to plot this curve example}. \indent{0}\newline \spadpaste{p1 := point [1::SF,1::SF]\$(Point SF) \bound{p1}} \newline @@ -10786,7 +9865,9 @@ graphics viewport. This is done by utilizing the \spadtype{GraphImage} and \newline \spadpaste{p12 := point [.75::SF,.25::SF]\$(Point SF) \bound{p12}} \newline -\spadpaste{llp := [[p1,p2],[p2,p3],[p3,p4],[p4,p1],[p5,p6],[p6,p7],[p7,p8],[p8,p5],[p9,p10],[p10,p11],[p11,p12],[p12,p9]] \bound{llp} \free{p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12}} +\spadpaste{llp := [[p1,p2],[p2,p3],[p3,p4],[p4,p1],[p5,p6],[p6,p7], +[p7,p8],[p8,p5],[p9,p10],[p10,p11],[p11,p12],[p12,p9]] \bound{llp} +\free{p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12}} \newline \spadpaste{size1 := 6::PositiveInteger \bound{size1}} \newline @@ -10794,7 +9875,9 @@ graphics viewport. This is done by utilizing the \spadtype{GraphImage} and \newline \spadpaste{size3 := 10::PositiveInteger \bound{size3}} \newline -\spadpaste{lsize := [size1, size1, size1, size1, size2, size2, size2, size2, size3, size3, size3, size3] \bound{lsize} \free{size1 size2 size3}} +\spadpaste{lsize := [size1, size1, size1, size1, size2, size2, +size2, size2, size3, size3, size3, size3] \bound{lsize} +\free{size1 size2 size3}} \newline \spadpaste{pc1 := pastel red() \bound{pc1}} \newline @@ -10802,36 +9885,32 @@ graphics viewport. This is done by utilizing the \spadtype{GraphImage} and \newline \spadpaste{pc3 := pastel yellow() \bound{pc3}} \newline -\spadpaste{lpc := [pc1, pc1, pc1, pc1, pc2, pc2, pc2, pc2, pc3, pc3, pc3, pc3] \bound{lpc} \free{pc1 pc2 pc3}} +\spadpaste{lpc := [pc1, pc1, pc1, pc1, pc2, pc2, pc2, pc2, pc3, +pc3, pc3, pc3] \bound{lpc} \free{pc1 pc2 pc3}} \newline -\spadpaste{lc := [pastel blue(), light yellow(), dim green(), bright red(), light green(), dim yellow(), bright blue(), dark red(), pastel red(), light blue(), dim green(), light yellow()] \bound{lc}} +\spadpaste{lc := [pastel blue(), light yellow(), dim green(), +bright red(), light green(), dim yellow(), bright blue(), +dark red(), pastel red(), light blue(), dim green(), +light yellow()] \bound{lc}} \newline -\spadpaste{g := makeGraphImage(llp,lpc,lc,lsize)\$GRIMAGE \bound{g} \free{llp lpc lc lsize}} +\spadpaste{g := makeGraphImage(llp,lpc,lc,lsize)\$GRIMAGE +\bound{g} \free{llp lpc lc lsize}} \newline \graphpaste{makeViewport2D(g,[title("Lines")])\$VIEW2D \free{g}} -The \spadfun{makeViewport2D} command takes a list of options as a parameter -in this example. The string "Lines" is designated as the viewport's title. +The \spadfun{makeViewport2D} command takes a list of options +as a parameter in this example. The string "Lines" is designated +as the viewport's title. \endscroll \autobuttons \end{page} @ -\subsection{Three Dimensional Graphing} -\label{ThreeDimensionalGraphicsPage} -\begin{itemize} -\item TwoVariableGraphicsPage \ref{TwoVariableGraphicsPage} on -page~\pageref{TwoVariableGraphicsPage} -\item SpaceCurveGraphicsPage \ref{SpaceCurveGraphicsPage} on -page~\pageref{SpaceCurveGraphicsPage} -\item ParametricTubeGraphicsPage \ref{ParametricTubeGraphicsPage} on -page~\pageref{ParametricTubeGraphicsPage} -\item ParametricSurfaceGraphicsPage \ref{ParametricSurfaceGraphicsPage} on -page~\pageref{ParametricSurfaceGraphicsPage} -\item ugGraphThreeDBuildPage \ref{ugGraphThreeDBuildPage} on -page~\pageref{ugGraphThreeDBuildPage} -\end{itemize} -\index{pages!ThreeDimensionalGraphicsPage!graphics.ht} -\index{graphics.ht!pages!ThreeDimensionalGraphicsPage} -\index{ThreeDimensionalGraphicsPage!graphics.ht!pages} +\pagehead{ThreeDimensionalGraphicsPage}{graphics.ht} +{Three Dimensional Graphing} +\pageto{notitle}{TwoVariableGraphicsPage} +\pageto{notitle}{SpaceCurveGraphicsPage} +\pageto{notitle}{ParametricTubeGraphicsPage} +\pageto{notitle}{ParametricSurfaceGraphicsPage} +\pageto{notitle}{ugGraphThreeDBuildPage} <>= \begin{page}{ThreeDimensionalGraphicsPage}{Three Dimensional Graphing} \beginscroll @@ -10851,39 +9930,37 @@ Create objects constructed from geometric primitives. \autobuttons \end{page} @ -\subsection{Functions of Two Variables} -\label{TwoVariableGraphicsPage} -\index{pages!TwoVariableGraphicsPage!graphics.ht} -\index{graphics.ht!pages!TwoVariableGraphicsPage} -\index{TwoVariableGraphicsPage!graphics.ht!pages} +\pagehead{TwoVariableGraphicsPage}{graphics.ht}{Functions of Two Variables} <>= \begin{page}{TwoVariableGraphicsPage}{Functions of Two Variables} \beginscroll -This page describes the plotting of surfaces defined by an equation -of two variables, z = f(x,y), for which the ranges of x and y are explicitly -defined. The basic draw command for this function utilizes either the -uncompiled function or compiled function format. The general format for an -uncompiled function is: + +This page describes the plotting of surfaces defined by an equation of +two variables, z = f(x,y), for which the ranges of x and y are +explicitly defined. The basic draw command for this function utilizes +either the uncompiled function or compiled function format. The +general format for an uncompiled function is: \indent{5}\newline {\em draw(f(x,y), x = a..b, y = c..d)} \indent{0}\newline -where a..b and c..d are segments defining the intervals [a,b] and [c,d] over -which the variables x and y span. In this case the function is not compiled -until the draw command is executed. Here is an example: +where a..b and c..d are segments defining the intervals [a,b] and +[c,d] over which the variables x and y span. In this case the +function is not compiled until the draw command is executed. Here is +an example: \graphpaste{draw(cos(x*y),x=-3..3,y=-3..3)} In the case of a compiled function, the function is named and compiled -independently. This is useful if you intend to use a function often, or -if the function is long and complex. The following line shows a function -whose parameters are of the type Small Float. The function is compiled and -stored by Axiom when it is entered. +independently. This is useful if you intend to use a function often, +or if the function is long and complex. The following line shows a +function whose parameters are of the type Small Float. The function is +compiled and stored by Axiom when it is entered. \indent{5}\newline -{\em NOTE: It is only necessary to click on the draw command button to plot -this example}. +{\em NOTE: It is only necessary to click on the draw command button to +plot this example}. \indent{0}\newline \spadpaste{f(x:SF,y:SF):SF == sin(x)*cos(y) \bound{f}} \newline -Once the function is compiled the draw command only needs the name of the -function to execute. Here is a compiled function example: +Once the function is compiled the draw command only needs the name +of the function to execute. Here is a compiled function example: \graphpaste{draw(f,-\%pi..\%pi,-\%pi..\%pi) \free{f}} Note that the parameter ranges do not take the variable names as in the case of uncompiled functions. The variables are entered in the order in @@ -10894,68 +9971,62 @@ y-variable. \autobuttons \end{page} @ -\subsection{Parametric Space Curves} -\label{SpaceCurveGraphicsPage} -\index{pages!SpaceCurveGraphicsPage!graphics.ht} -\index{graphics.ht!pages!SpaceCurveGraphicsPage} -\index{SpaceCurveGraphicsPage!graphics.ht!pages} +\pagehead{SpaceCurveGraphicsPage}{graphics.ht}{Parametric Space Curves} <>= \begin{page}{SpaceCurveGraphicsPage}{Parametric Space Curves} \beginscroll This page describes the plotting in three dimensional space of a curve -defined by the parametric equations x = f(t), y = g(t), z = h(t), where -f, g, and h are functions of the parameter t which ranges over a specified -interval. The basic draw command for this function utilizes either the -uncompiled functions or compiled functions format and uses the \spadfun{curve} -command to specify the three functions for the x, y, and z components of -the curve. The general format for uncompiled functions is: +defined by the parametric equations x = f(t), y = g(t), z = h(t), +where f, g, and h are functions of the parameter t which ranges over a +specified interval. The basic draw command for this function utilizes +either the uncompiled functions or compiled functions format and uses +the \spadfun{curve} command to specify the three functions for the x, +y, and z components of the curve. The general format for uncompiled +functions is: \indent{5}\newline {\em draw(curve(f(t),g(t),h(t)), t = a..b)} \indent{0}\newline where a..b is the segment defining the interval [a,b] over which the -parameter t ranges. In this case the functions are not compiled until the -draw command is executed. Here is an example: +parameter t ranges. In this case the functions are not compiled until +the draw command is executed. Here is an example: \graphpaste{draw(curve(cos(t),sin(t),t), t=-12..12)} -In the case of compiled functions, the functions are named and compiled -independently. This is useful if you intend to use the functions often, or -if the functions are long and complex. The following lines show functions -whose parameters are of the type Small Float. The functions are compiled and -stored by Axiom when entered. +In the case of compiled functions, the functions are named and +compiled independently. This is useful if you intend to use the +functions often, or if the functions are long and complex. The +following lines show functions whose parameters are of the type Small +Float. The functions are compiled and stored by Axiom when entered. \indent{5}\newline -{\em NOTE: It is only necessary to click on the draw command button to plot -this example}. +{\em NOTE: It is only necessary to click on the draw command button to +plot this example}. \indent{0}\newline \spadpaste{i1(t:SF):SF == sin(t)*cos(3*t/5) \bound{i1}} \spadpaste{i2(t:SF):SF == cos(t)*cos(3*t/5) \bound{i2}} \spadpaste{i3(t:SF):SF == cos(t)*sin(3*t/5) \bound{i3}} -Once the functions are compiled the draw command only needs the names of -the functions to execute. Here is a compiled functions example: +Once the functions are compiled the draw command only needs the names +of the functions to execute. Here is a compiled functions example: \graphpaste{draw(curve(i1,i2,i3),0..15*\%pi) \free{i1 i2 i3}} -Note that the parameter range does not take the variable name as in the -case of uncompiled functions. It is understood that the indicated range -applies to the parameter of the functions, which in this case is t. +Note that the parameter range does not take the variable name as in +the case of uncompiled functions. It is understood that the indicated +range applies to the parameter of the functions, which in this case is t. \endscroll \autobuttons \end{page} @ -\subsection{Parametric Tube Plots} -\label{ParametricTubeGraphicsPage} -\index{pages!ParametricTubeGraphicsPage!graphics.ht} -\index{graphics.ht!pages!ParametricTubeGraphicsPage} -\index{ParametricTubeGraphicsPage!graphics.ht!pages} +\pagehead{ParametricTubeGraphicsPage}{graphics.ht}{Parametric Tube Plots} <>= \begin{page}{ParametricTubeGraphicsPage}{Parametric Tube Plots} \beginscroll This page describes the plotting in three dimensional space of a tube -around a parametric space curve defined by the parametric equations +around a parametric space curve defined by the parametric equations x = f(t), y = g(t), z = h(t), where f, g, and h are functions of the -parameter t which ranges over a specified interval. The basic draw command -for this function utilizes either the uncompiled functions or compiled -functions format and uses the \spadfun{curve} command to specify the three -functions for the x, y, and z components of the curve. This uses the same -format as that for space curves except that it requires a specification for -the radius of the tube. If the radius of the tube is 0, then the result is -the space curve itself. The general format for uncompiled functions is: +parameter t which ranges over a specified interval. The basic draw +command for this function utilizes either the uncompiled functions or +compiled functions format and uses the \spadfun{curve} command to +specify the three functions for the x, y, and z components of the +curve. This uses the same format as that for space curves except that +it requires a specification for the radius of the tube. If the radius +of the tube is 0, then the result is the space curve itself. The +general format for uncompiled functions is: \indent{5}\newline {\em draw(curve(f(t),g(t),h(t)), t = a..b, tubeRadius == r)} \indent{0}\newline @@ -10963,15 +10034,16 @@ where a..b is the segment defining the interval [a,b] over which the parameter t ranges, and the tubeRadius is indicated by the variable r. In this case the functions are not compiled until the draw command is executed. Here is an example: -\graphpaste{draw(curve(sin(t)*cos(3*t/5), cos(t)*cos(3*t/5), cos(t)*sin(3*t/5)), t=0..15*\%pi,tubeRadius == .15)} -In the case of compiled functions, the functions are named and compiled -independently. This is useful if you intend to use the functions often, or -if the functions are long and complex. The following lines show functions -whose parameters are of the type Small Float. The functions are compiled and -stored by Axiom when entered. +\graphpaste{draw(curve(sin(t)*cos(3*t/5), cos(t)*cos(3*t/5), +cos(t)*sin(3*t/5)), t=0..15*\%pi,tubeRadius == .15)} +In the case of compiled functions, the functions are named and +compiled independently. This is useful if you intend to use the +functions often, or if the functions are long and complex. The +following lines show functions whose parameters are of the type Small +Float. The functions are compiled and stored by Axiom when entered. \indent{5}\newline -{\em NOTE: It is only necessary to click on the draw command button to plot -this example}. +{\em NOTE: It is only necessary to click on the draw command button to +plot this example}. \indent{0}\newline \spadpaste{t1(t:SF):SF == 4/(2-sin(3*t))*cos(2*t) \bound{t1}} \newline @@ -10979,140 +10051,146 @@ this example}. \newline \spadpaste{t3(t:SF):SF == 4/(2-sin(3*t))*cos(3*t) \bound{t3}} \newline -Once the function is compiled the draw command only needs the names of the -functions to execute. Here is a compiled functions example of a trefoil knot: -\graphpaste{draw(curve(t1,t2,t3),0..2*\%pi,tubeRadius == .2) \free{t1 t2 t3}} -Note that the parameter range does not take the variable name as in the -case of uncompiled functions. It is understood that the indicated range -applies to the parameter of the functions, which in this case is t. -Typically, the radius of the tube should be set between 0 and 1. A radius -of less than 0 results in it's positive counterpart and a radius of greater -than one causes self intersection. +Once the function is compiled the draw command only needs the names of +the functions to execute. Here is a compiled functions example of a +trefoil knot: +\graphpaste{draw(curve(t1,t2,t3),0..2*\%pi,tubeRadius == .2) +\free{t1 t2 t3}} +Note that the parameter range does not take the variable name as in +the case of uncompiled functions. It is understood that the indicated +range applies to the parameter of the functions, which in this case is +t. Typically, the radius of the tube should be set between 0 and 1. +A radius of less than 0 results in it's positive counterpart and a +radius of greater than one causes self intersection. \endscroll \autobuttons \end{page} @ -\subsection{Parametric Surfaces} -\label{ParametricSurfaceGraphicsPage} -\index{pages!ParametricSurfaceGraphicsPage!graphics.ht} -\index{graphics.ht!pages!ParametricSurfaceGraphicsPage} -\index{ParametricSurfaceGraphicsPage!graphics.ht!pages} +\pagehead{ParametricSurfaceGraphicsPage}{graphics.ht}{Parametric Surfaces} <>= \begin{page}{ParametricSurfaceGraphicsPage}{Parametric Surfaces} \beginscroll -Graphing a surface defined by x = f(u,v), y = g(u,v), z = h(u,v). \newline -This page describes the plotting of surfaces defined by the parametric -equations of two variables, x = f(u,v), y = g(u,v), and z = h(u,v), -for which the ranges of u and v are explicitly defined. The basic draw -command for this function utilizes either the uncompiled function or -compiled function format and uses the \spadfun{surface} command to specify the -three functions for the x, y and z components of the surface. The general -format for uncompiled functions is: +Graphing a surface defined by x = f(u,v), y = g(u,v), z = h(u,v). +\newline This page describes the plotting of surfaces defined +by the parametric equations of two variables, x = f(u,v), y = g(u,v), +and z = h(u,v), for which the ranges of u and v are explicitly +defined. The basic draw command for this function utilizes either the +uncompiled function or compiled function format and uses the +\spadfun{surface} command to specify the three functions for the x, y +and z components of the surface. The general format for uncompiled +functions is: \indent{5}\newline {\em draw(surface(f(u,v),g(u,v),h(u,v)), u = a..b, v = c..d)} \indent{0}\newline -where a..b and c..d are segments defining the intervals [a,b] and [c,d] over -which the parameters u and v span. In this case the functions are not -compiled until the draw command is executed. Here is an example of a -surface plotted using the parabolic cylindrical coordinate system option: -\graphpaste{draw(surface(u*cos(v), u*sin(v),v*cos(u)),u=-4..4,v=0..2*\%pi, - coordinates== parabolicCylindrical)} -In the case of compiled functions, the functions are named and compiled -independently. This is useful if you intend to use the functions often, or -if the functions are long and complex. The following lines show functions -whose parameters are of the type Small Float. The functions are compiled and -stored by Axiom when entered. +where a..b and c..d are segments defining the intervals [a,b] and +[c,d] over which the parameters u and v span. In this case the +functions are not compiled until the draw command is executed. Here +is an example of a surface plotted using the parabolic cylindrical +coordinate system option: +\graphpaste{draw(surface(u*cos(v), u*sin(v),v*cos(u)), +u=-4..4,v=0..2*\%pi, coordinates== parabolicCylindrical)} +In the case of compiled functions, the functions are named and +compiled independently. This is useful if you intend to use the +functions often, or if the functions are long and complex. The +following lines show functions whose parameters are of the type Small +Float. The functions are compiled and stored by Axiom when entered. \indent{5}\newline -{\em NOTE: It is only necessary to click on the draw command button to plot -this example}. +{\em NOTE: It is only necessary to click on the draw command button to +plot this example}. \indent{0}\newline \spadpaste{n1(u:SF,v:SF):SF == u*cos(v) \bound{n1}} \newline \spadpaste{n2(u:SF,v:SF):SF == u*sin(v) \bound{n2}} \newline \spadpaste{n3(u:SF,v:SF):SF == u \bound{n3}} -Once the function is compiled the draw command only needs the names of the -functions to execute. Here is a compiled functions example plotted using -the toroidal coordinate system option: \newline +Once the function is compiled the draw command only needs the names of +the functions to execute. Here is a compiled functions example +plotted using the toroidal coordinate system option: \newline \graphpaste{draw(surface(n1,n2,n3), 1.0..4.0, 1.0..4*\%pi, coordinates == toroidal(1\$SF)) \free{n1 n2 n3}} -Note that the parameter ranges do not take the variable names as in the -case of uncompiled functions. The variables are entered in the order in -which they are defined in the function specification. In this case the -first range specifies the u-variable and the second range specifies the -v-variable. +Note that the parameter ranges do not take the variable names as in +the case of uncompiled functions. The variables are entered in the +order in which they are defined in the function specification. In +this case the first range specifies the u-variable and the second +range specifies the v-variable. \endscroll \autobuttons \end{page} @ -\subsection{Building 3D Objects} -\label{3DObjectGraphicsPage} -\index{pages!3DObjectGraphicsPage!graphics.ht} -\index{graphics.ht!pages!3DObjectGraphicsPage} -\index{3DObjectGraphicsPage!graphics.ht!pages} +\pagehead{3DObjectGraphicsPage}{graphics.ht}{Building 3D Objects} <>= \begin{page}{3DObjectGraphicsPage}{Building 3D Objects} \beginscroll -This page describes the Axiom facilities for creating three dimensional -objects constructed from geometric primitives. The Axiom operation -\spadfun{create3Space()} creates a space to which points, curves, and -polygons can be added using the operations from the \spadtype{ThreeSpace} -domain. The contents of this space can then be displayed in a viewport -using the \spadfun{makeViewport3D()} command. It will be necessary to -have these operations exposed in order to use them. \indent{5}\newline -{\em NOTE: It is only necessary to click on the makeViewport3D command button -to plot this curve example}. +This page describes the Axiom facilities for creating three +dimensional objects constructed from geometric primitives. The Axiom +operation \spadfun{create3Space()} creates a space to which points, +curves, and polygons can be added using the operations from the +\spadtype{ThreeSpace} domain. The contents of this space can then be +displayed in a viewport using the \spadfun{makeViewport3D()} command. +It will be necessary to have these operations exposed in order to use +them. \indent{5}\newline {\em NOTE: It is only necessary to click on +the makeViewport3D command button to plot this curve example}. \indent{0}\newline Initially, the space which will hold the objects must be defined and compiled, as in the following example: \spadpaste{space := create3Space()\$(ThreeSpace SF) \bound{space}} -Now objects can be sent to this {\em space} as per the operations allowed by -the \spadtype{ThreeSpace} domain. The following examples place curves into +Now objects can be sent to this {\em space} as per the operations +allowed by the \spadtype{ThreeSpace} domain. The following examples +place curves into {\em space}. -\spadpaste{curve(space,[[0,20,20],[0,20,30],[0,30,30],[0,30,100], [0,20,100],[0,20,110],[0,50,110],[0,50,100],[0,40,100], [0,40,30],[0,50,30],[0,50,20],[0,20,20]]) \bound{curveI}} +\spadpaste{curve(space,[[0,20,20],[0,20,30],[0,30,30],[0,30,100], +[0,20,100],[0,20,110],[0,50,110],[0,50,100],[0,40,100], [0,40,30], +[0,50,30],[0,50,20],[0,20,20]]) \bound{curveI}} \newline -\spadpaste{curve(space,[[0,80,20],[0,70,20],[0,70,110],[0,110,110], [0,120,100],[0,120,70],[0,115,65],[0,120,60],[0,120,30], [0,110,20],[0,80,20],[0,80,30],[0,105,30],[0,110,35]]) \bound{curveB1}} +\spadpaste{curve(space,[[0,80,20],[0,70,20],[0,70,110],[0,110,110], +[0,120,100],[0,120,70],[0,115,65],[0,120,60],[0,120,30], [0,110,20], +[0,80,20],[0,80,30],[0,105,30],[0,110,35]]) \bound{curveB1}} \newline -\spadpaste{curve(space,[[0,110,35],[0,110,55],[0,105,60],[0,80,60],[0,80,70], [0,105,70],[0,110,75],[0,110,95],[0,105,100],[0,80,100], [0,80,30]]) \bound{curveB2}} +\spadpaste{curve(space,[[0,110,35],[0,110,55],[0,105,60],[0,80,60], +[0,80,70], [0,105,70],[0,110,75],[0,110,95],[0,105,100],[0,80,100], +[0,80,30]]) \bound{curveB2}} \newline -\spadpaste{closedCurve(space,[[0,140,20],[0,140,110],[0,150,110],[0,170,50], [0,190,110],[0,200,110],[0,200,20],[0,190,20],[0,190,75], [0,175,35],[0,165,35],[0,150,75],[0,150,20]]) \bound{curveM}} -\spadpaste{closedCurve(space,[[200,0,20], [200,0,110], [185,0,110], [160,0,45], [160,0,110], [150,0,110], [150,0,20], [165,0,20], [190,0,85], [190,0,20]]) \bound{curveN}} -\spadpaste{closedCurve(space,[[140,0,20], [120,0,110], [110,0,110], [90,0,20], [100,0,20], [108,0,50], [123,0,50], [121,0,60], [110,0,60], [115,0,90], [130,0,20]]) \bound{curveA}} -\spadpaste{closedCurve(space,[[80,0,30], [80,0,100], [70,0,110], [40,0,110], [30,0,100], [30,0,90], [40,0,90], [40,0,95], [45,0,100], [65,0,100], [70,0,95], [70,0,35], [65,0,30], [45,0,30], [40,0,35], [40,0,60], [50,0,60], [50,0,70], [30,0,70], [30,0,30], [40,0,20], [70,0,20]]) \bound{curveG}} -Once {\em space} contains the desired elements a viewport is created and -displayed with the following command: -\graphpaste{makeViewport3D(space,[title("Curves")])\$VIEW3D \free{space curveI curveB1 curveB2 curveM curveN curveA curveG}} -The parameters for \spadfun{makeViewport3D()} in this example are {\em space}, -which is the name of the three dimensional space that was defined, and a -string, "curve", which is the title for the viewport. The tailing string -{\em \$VIEW3D} exposes the command \spadfun{makeViewport3D()} from the domain +\spadpaste{closedCurve(space,[[0,140,20],[0,140,110],[0,150,110], +[0,170,50], [0,190,110],[0,200,110],[0,200,20],[0,190,20],[0,190,75], +[0,175,35],[0,165,35],[0,150,75],[0,150,20]]) \bound{curveM}} +\spadpaste{closedCurve(space,[[200,0,20], [200,0,110], [185,0,110], +[160,0,45], [160,0,110], [150,0,110], [150,0,20], [165,0,20], +[190,0,85], [190,0,20]]) \bound{curveN}} +\spadpaste{closedCurve(space,[[140,0,20], [120,0,110], [110,0,110], +[90,0,20], [100,0,20], [108,0,50], [123,0,50], [121,0,60], +[110,0,60], [115,0,90], [130,0,20]]) \bound{curveA}} +\spadpaste{closedCurve(space,[[80,0,30], [80,0,100], [70,0,110], +[40,0,110], [30,0,100], [30,0,90], [40,0,90], [40,0,95], +[45,0,100], [65,0,100], [70,0,95], [70,0,35], [65,0,30], +[45,0,30], [40,0,35], [40,0,60], [50,0,60], [50,0,70], +[30,0,70], [30,0,30], [40,0,20], [70,0,20]]) \bound{curveG}} +Once {\em space} contains the desired elements a viewport is created +and displayed with the following command: +\graphpaste{makeViewport3D(space,[title("Curves")])\$VIEW3D +\free{space curveI curveB1 curveB2 curveM curveN curveA curveG}} +The parameters for \spadfun{makeViewport3D()} in this example are {\em +space}, which is the name of the three dimensional space that was +defined, and a string, "curve", which is the title for the viewport. +The tailing string {\em \$VIEW3D} exposes the command +\spadfun{makeViewport3D()} from the domain \spadtype{ThreeDimensionalViewport} if these commands are unexposed. \endscroll \autobuttons \end{page} @ -\subsection{Two Dimensional Graphics} -\label{TwoDimensionalGraphicsPage} -\begin{itemize} -\item OneVariableGraphicsPage \ref{OneVariableGraphicsPage} on -page~\pageref{OneVariableGraphicsPage} -\item ParametricCurveGraphicsPage \ref{ParametricCurveGraphicsPage} on -page~\pageref{ParametricCurveGraphicsPage} -\item PolarGraphicsPage \ref{PolarGraphicsPage} on -page~\pageref{PolarGraphicsPage} -\item ImplicitCurveGraphicsPage \ref{ImplicitCurveGraphicsPage} on -page~\pageref{ImplicitCurveGraphicsPage} -\item ListPointsGraphicsPage \ref{ListPointsGraphicsPage} on -page~\pageref{ListPointsGraphicsPage} -\end{itemize} -\index{pages!TwoDimensionalGraphicsPage!graphics.ht} -\index{graphics.ht!pages!TwoDimensionalGraphicsPage} -\index{TwoDimensionalGraphicsPage!graphics.ht!pages} +\pagehead{TwoDimensionalGraphicsPage}{graphics.ht} +{Two Dimensional Graphics} +\pageto{notitle}{OneVariableGraphicsPage} +\pageto{notitle}{ParametricCurveGraphicsPage} +\pageto{notitle}{PolarGraphicsPage} +\pageto{notitle}{ImplicitCurveGraphicsPage} +\pageto{notitle}{ListPointsGraphicsPage} <>= \begin{page}{TwoDimensionalGraphicsPage}{Two Dimensional Graphics} \beginscroll \beginmenu -\menulink{Functions of One Variable}{OneVariableGraphicsPage} \newline +\menulink{Functions of One Variable}{OneVariableGraphicsPage} +\newline Plot curves defined by an equation y = f(x). \menulink{Parametric Curves}{ParametricCurveGraphicsPage} \newline Plot curves defined by parametric equations x = f(t), y = g(t). @@ -11131,11 +10209,7 @@ Plot lists of points in the (x,y)-plane. \autobuttons \end{page} @ -\subsection{Functions of One Variable} -\label{OneVariableGraphicsPage} -\index{pages!OneVariableGraphicsPage!graphics.ht} -\index{graphics.ht!pages!OneVariableGraphicsPage} -\index{OneVariableGraphicsPage!graphics.ht!pages} +\pagehead{OneVariableGraphicsPage}{graphics.ht}{Functions of One Variable} <>= \begin{page}{OneVariableGraphicsPage}{Functions of One Variable} \beginscroll @@ -11144,17 +10218,17 @@ As an example, let's take the function y = sin(tan(x)) - tan(sin(x)) on the interval [0,6]. Here is the simplest command that will do this: \graphpaste{draw(sin(tan(x)) - tan(sin(x)),x = 0..6)} -Notice that Axiom compiled a function before the graph was put -on the screen. -The expression sin(tan(x)) - tan(sin(x)) was converted to a compiled -function so that it's value for various values of x could be computed -quickly and efficiently. -Let's graph the same function on a different interval and this time -we'll give the graph a title. -The title is a String, which is an optional argument of the command 'draw'. -\graphpaste{draw(sin(tan(x)) - tan(sin(x)),x = 10..16,title == "y = sin tan x - tan sin x")} -Once again the expression sin(tan(x)) - tan(sin(x)) was converted to a -compiled function before any points were computed. +Notice that Axiom compiled a function before the graph was put on the +screen. The expression sin(tan(x)) - tan(sin(x)) was converted to a +compiled function so that it's value for various values of x could be +computed quickly and efficiently. Let's graph the same function on a +different interval and this time we'll give the graph a title. The +title is a String, which is an optional argument of the command +'draw'. +\graphpaste{draw(sin(tan(x)) - tan(sin(x)),x = 10..16, +title == "y = sin tan x - tan sin x")} +Once again the expression sin(tan(x)) - tan(sin(x)) was +converted to a compiled function before any points were computed. If you want to graph the same function on a number of intervals, it's a good idea to write down a function definition so that the function only has to be compiled once. @@ -11171,19 +10245,16 @@ within the viewport title window will be clipped. \autobuttons \end{page} @ -\subsection{Parametric Curves} -\label{ParametricCurveGraphicsPage} -\index{pages!ParametricCurveGraphicsPage!graphics.ht} -\index{graphics.ht!pages!ParametricCurveGraphicsPage} -\index{ParametricCurveGraphicsPage!graphics.ht!pages} +\pagehead{ParametricCurveGraphicsPage}{graphics.ht}{Parametric Curves} <>= \begin{page}{ParametricCurveGraphicsPage}{Parametric Curves} \beginscroll -One way of producing interesting curves is by using parametric equations. -Let x = f(t) and y = g(t) for two functions f and g as the parameter -t ranges over an interval \[a,b\]. +One way of producing interesting curves is by using parametric +equations. Let x = f(t) and y = g(t) for two functions f and g as the +parameter t ranges over an interval \[a,b\]. Here's an example: -\graphpaste{draw(curve(sin(t)*sin(2*t)*sin(3*t), sin(4*t)*sin(5*t)*sin(6*t)), t = 0..2*\%pi)} +\graphpaste{draw(curve(sin(t)*sin(2*t)*sin(3*t), +sin(4*t)*sin(5*t)*sin(6*t)), t = 0..2*\%pi)} Here 0..2*\%pi represents the interval over which the variable t ranges. In the case of parametric curves, Axiom will compile two functions, one for each of the functions f and g. @@ -11191,11 +10262,12 @@ You may also put a title on a graph. The title may be an arbitrary string and is an optional argument to the command 'draw'. For example: -\graphpaste{draw(curve(cos(t), sin(t)), t = 0..2*\%pi, title == "The Unit Circle")} -If you plan on plotting x = f(t), y = g(t) as t ranges over several intervals, -you may want to define functions f and g, so that they need not be -recompiled every time you create a new graph. -Here's an example: +\graphpaste{draw(curve(cos(t), sin(t)), t = 0..2*\%pi, +title == "The Unit Circle")} +If you plan on plotting x = f(t), y = g(t) as t ranges over several +intervals, you may want to define functions f and g, so that they need +not be recompiled every time you create a new graph. Here's an +example: \spadpaste{f(t:SF):SF == sin(3*t/4) \bound{f}} \newline \spadpaste{g(t:SF):SF == sin(t) \bound{g}} @@ -11205,16 +10277,13 @@ Here's an example: \graphpaste{draw(curve(f,g) ,\%pi..2*\%pi) \free{f g}} \newline \graphpaste{draw(curve(f,g), -4*\%pi..4*\%pi) \free{f g}} -These examples show how the curve changes as the range of parameter t varies. +These examples show how the curve changes as the range of +parameter t varies. \endscroll \autobuttons \end{page} @ -\subsection{Polar Coordinates} -\label{PolarGraphicsPage} -\index{pages!PolarGraphicsPage!graphics.ht} -\index{graphics.ht!pages!PolarGraphicsPage} -\index{PolarGraphicsPage!graphics.ht!pages} +\pagehead{PolarGraphicsPage}{graphics.ht}{Polar Coordinates} <>= \begin{page}{PolarGraphicsPage}{Polar Coordinates} \beginscroll @@ -11225,9 +10294,11 @@ y = f(theta) * sin(theta) as theta ranges over the same interval. You may create such curves using the command 'draw', with the optional argument 'coordinates == polar'. Here are some examples: -\graphpaste{draw(1,t = 0..2*\%pi,coordinates == polar, title == "The Unit Circle")} +\graphpaste{draw(1,t = 0..2*\%pi,coordinates == polar, +title == "The Unit Circle")} \newline -\graphpaste{draw(sin(17*t), t = 0..2*\%pi, coordinates == polar, title == "A Petal Curve")} +\graphpaste{draw(sin(17*t), t = 0..2*\%pi, coordinates == polar, +title == "A Petal Curve")} %When you don't specify an interval, Axiom will assume that you %mean 0..2*\%pi. You may also define your own functions, when you plan on plotting the @@ -11243,11 +10314,7 @@ pages for the \spadtype{CoordinateSystems} domain. \autobuttons \end{page} @ -\subsection{Implicit Curves} -\label{ImplicitCurveGraphicsPage} -\index{pages!ImplicitCurveGraphicsPage!graphics.ht} -\index{graphics.ht!pages!ImplicitCurveGraphicsPage} -\index{ImplicitCurveGraphicsPage!graphics.ht!pages} +\pagehead{ImplicitCurveGraphicsPage}{graphics.ht}{Implicit Curves} <>= \begin{page}{ImplicitCurveGraphicsPage}{Implicit Curves} \beginscroll @@ -11263,34 +10330,33 @@ dp/dx(a,b) and dp/dy(a,b) are not both zero. We require that the polynomial have rational or integral coefficients. Here is a Cartesian ovals algebraic curve example: (click on the draw button to execute this example) -\spadpaste{p := ((x**2 + y**2 + 1) - 8*x)**2 - (8*(x**2 + y**2 + 1) - 4*x - 1) \bound{p} } -\graphpaste{draw(p = 0, x, y, range == \[-1..11, -7..7\], title == "Cartesian Ovals") \free{p}} -{\em A range must be declared for each variable specified in the algebraic -curve equation}. +\spadpaste{p := ((x**2 + y**2 + 1) - 8*x)**2 - +(8*(x**2 + y**2 + 1) - 4*x - 1) \bound{p} } +\graphpaste{draw(p = 0, x, y, range == \[-1..11, -7..7\], +title == "Cartesian Ovals") \free{p}} +{\em A range must be declared for each variable specified in the +algebraic curve equation}. \endscroll \autobuttons \end{page} @ -\subsection{Lists of Points} -\label{ListPointsGraphicsPage} -\index{pages!ListPointsGraphicsPage!graphics.ht} -\index{graphics.ht!pages!ListPointsGraphicsPage} -\index{ListPointsGraphicsPage!graphics.ht!pages} +\pagehead{ListPointsGraphicsPage}{graphics.ht}{Lists of Points} <>= \begin{page}{ListPointsGraphicsPage}{Lists of Points} \beginscroll Axiom has the ability to create lists of points in a two dimensional -graphics viewport. This is done by utilizing the \spadtype{GraphImage} and -\spadtype{TwoDimensionalViewport} domain facilities. +graphics viewport. This is done by utilizing the \spadtype{GraphImage} +and \spadtype{TwoDimensionalViewport} domain facilities. \indent{5}\newline -{\em NOTE: It is only necessary to click on the makeViewport2D command button -to plot this curve example}. +{\em NOTE: It is only necessary to click on the makeViewport2D command +button to plot this curve example}. \indent{0}\newline -In this example, the \spadfun{makeGraphImage} command takes a list of lists of -points parameter, a list of colors for each point in the graph, a list of -colors for each line in the graph, and a list of numbers which indicate the -size of each point in the graph. The following lines create list of lists of -points which can be read be made into two dimensional graph images. +In this example, the \spadfun{makeGraphImage} command takes a list of +lists of points parameter, a list of colors for each point in the +graph, a list of colors for each line in the graph, and a list of +numbers which indicate the size of each point in the graph. The +following lines create list of lists of points which can be read be +made into two dimensional graph images. \spadpaste{p1 := point [1::SF,1::SF]\$(Point SF) \bound{p1}} \newline \spadpaste{p2 := point [0::SF,1::SF]\$(Point SF) \bound{p2}} @@ -11315,17 +10381,21 @@ points which can be read be made into two dimensional graph images. \newline \spadpaste{p12 := point [.75::SF,.25::SF]\$(Point SF) \bound{p12}} \newline -\spadpaste{llp := [[p1,p2],[p2,p3],[p3,p4],[p4,p1],[p5,p6],[p6,p7],[p7,p8],[p8,p5],[p9,p10],[p10,p11],[p11,p12],[p12,p9]] \bound{llp} \free{p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12}} +\spadpaste{llp := [[p1,p2],[p2,p3],[p3,p4],[p4,p1],[p5,p6],[p6,p7], +[p7,p8],[p8,p5],[p9,p10],[p10,p11],[p11,p12],[p12,p9]] \bound{llp} +\free{p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12}} \newline -These lines set the point color and size, and the line color for all components -of the graph. +These lines set the point color and size, and the line color for +all components of the graph. \spadpaste{size1 := 6::PositiveInteger \bound{size1}} \newline \spadpaste{size2 := 8::PositiveInteger \bound{size2}} \newline \spadpaste{size3 := 10::PositiveInteger \bound{size3}} \newline -\spadpaste{lsize := [size1, size1, size1, size1, size2, size2, size2, size2, size3, size3, size3, size3] \bound{lsize} \free{size1 size2 size3}} +\spadpaste{lsize := [size1, size1, size1, size1, size2, size2, size2, +size2, size3, size3, size3, size3] \bound{lsize} +\free{size1 size2 size3}} \newline \spadpaste{pc1 := pastel red() \bound{pc1}} \newline @@ -11333,35 +10403,36 @@ of the graph. \newline \spadpaste{pc3 := pastel yellow() \bound{pc3}} \newline -\spadpaste{lpc := [pc1, pc1, pc1, pc1, pc2, pc2, pc2, pc2, pc3, pc3, pc3, pc3] \bound{lpc} \free{pc1 pc2 pc3}} +\spadpaste{lpc := [pc1, pc1, pc1, pc1, pc2, pc2, pc2, pc2, pc3, pc3, +pc3, pc3] \bound{lpc} \free{pc1 pc2 pc3}} \newline -\spadpaste{lc := [pastel blue(), light yellow(), dim green(), bright red(), light green(), dim yellow(), bright blue(), dark red(), pastel red(), light blue(), dim green(), light yellow()] \bound{lc}} +\spadpaste{lc := [pastel blue(), light yellow(), dim green(), +bright red(), light green(), dim yellow(), bright blue(), +dark red(), pastel red(), light blue(), dim green(), +light yellow()] \bound{lc}} \newline Now the graph image is created and named according to the component -specifications indicated above. The \spadfun{makeViewport2D} command then -creates a two dimensional viewport for this graph according to the list of -options specified within the brackets. -\spadpaste{g := makeGraphImage(llp,lpc,lc,lsize)\$GRIMAGE \bound{g} \free{llp lpc lc lsize}} +specifications indicated above. The \spadfun{makeViewport2D} command +then creates a two dimensional viewport for this graph according to +the list of options specified within the brackets. +\spadpaste{g := makeGraphImage(llp,lpc,lc,lsize)\$GRIMAGE \bound{g} +\free{llp lpc lc lsize}} \newline \graphpaste{makeViewport2D(g,[title("Lines")])\$VIEW2D \free{g}} -The \spadfun{makeViewport2D} command takes a list of options as a parameter. -In this example the string "Lines" is designated as the viewport's title. +The \spadfun{makeViewport2D} command takes a list of options as a +parameter. In this example the string "Lines" is designated as the +viewport's title. \endscroll \autobuttons \end{page} @ - -\subsection{Stand-alone Viewport} -\label{ViewportPage} -\index{pages!ViewportPage!graphics.ht} -\index{graphics.ht!pages!ViewportPage} -\index{ViewportPage!graphics.ht!pages} +\pagehead{ViewportPage}{graphics.ht}{Stand-alone Viewport} <>= \begin{page}{ViewportPage}{Stand-alone Viewport} \beginscroll -To get a viewport on a \HyperName{} page, you first need to +To get a viewport on a Hyperdoc page, you first need to create one in Axiom and write it out to a -file that \HyperName{} can call up. \newline +file that Hyperdoc can call up. \newline For example, here we draw a saddle function and assign the result to the variable \spad{v}: \newline @@ -11369,20 +10440,19 @@ the result to the variable \spad{v}: \newline Now that we've created the viewport, we want to write the data out to a file. \newline -To do this, we use the \spadfunFrom{write}{ThreeDimensionalViewport} command which takes -the following arguments: the viewport to write out, -the title of the file to write it out to, and an optional -argument telling the write command what type (or types) of -data you want to write in additional to the one Axiom will -always write out. The optional argument could be -a string, like "pixmap", or a list of strings, like \["postscript","pixmap"\]. -\HyperName{} needs a "pixmap" data type to include a graph in a page -so in this case, we write the viewport and tell it to -also write a "pixmap" file, as well: +To do this, we use the \spadfunFrom{write}{ThreeDimensionalViewport} +command which takes the following arguments: the viewport to write +out, the title of the file to write it out to, and an optional +argument telling the write command what type (or types) of data you +want to write in additional to the one Axiom will always write +out. The optional argument could be a string, like "pixmap", or a list +of strings, like \["postscript","pixmap"\]. Hyperdoc needs a +"pixmap" data type to include a graph in a page so in this case, we +write the viewport and tell it to also write a "pixmap" file, as well: \newline \spadpaste{write(v,"saddle","pixmap") \free{v}} \newline -Now we want to put this viewport into a \HyperName{} page. +Now we want to put this viewport into a Hyperdoc page. Say you've created a viewport and written it out to a file called "/tmp/mobius". (Axiom actually tags a ".view" at the end of a viewport data file to @@ -11393,7 +10463,7 @@ since Axiom will always automatically add on a {\bf Including Viewports} \newline To put a viewport in a -\HyperName{} page, include the following line in your \HyperName{} +Hyperdoc page, include the following line in your Hyperdoc source code: \newline \space{5}\\viewport\{/tmp/mobius\} \newline You will get this on your page: \newline @@ -11432,7 +10502,8 @@ to the above commands: \newline \centerline{\\axiomviewport\{vA\} for \\viewport\{vA\}} \centerline{\\axiomviewportbutton\{vB\} for \\viewportbutton\{vB\}} -\centerline{\\axiomviewportasbutton\{vC\} for \\viewportasbutton\{vC\}} \newline +\centerline{\\axiomviewportasbutton\{vC\} for \\viewportasbutton\{vC\}} +\newline All these macros really do is include some path that indicates where Axiom stores the viewports. @@ -11442,19 +10513,10 @@ indicates where Axiom stores the viewports. @ \section{grpthry.ht} -\subsection{Group Theory} -\label{GroupTheoryPage} -\begin{itemize} -\item InfoGroupTheoryPage \ref{InfoGroupTheoryPage} on -page~\pageref{InfoGroupTheoryPage} -\item InfoRepTheoryPage \ref{InfoRepTheoryPage} on -page~\pageref{InfoRepTheoryPage} -\item RepA6Page \ref{RepA6Page} on -page~\pageref{RepA6Page} -\end{itemize} -\index{pages!GroupTheoryPage!grpthry.ht} -\index{grpthry.ht!pages!GroupTheoryPage} -\index{GroupTheoryPage!grpthry.ht!pages} +\pagehead{GroupTheoryPage}{grpthry.ht}{Group Theory} +\pageto{notitle}{InfoGroupTheoryPage} +\pageto{notitle}{InfoRepTheoryPage} +\pageto{notitle}{RepA6Page} <>= \begin{page}{GroupTheoryPage}{Group Theory} % authors: H. Gollan, J. Grabmeier, August 1989 @@ -11474,48 +10536,51 @@ groups and do representation theory. %Working with subgroups of a symmetric group. %\menulink{Permutation Group Examples}{PermutationGroupExampleXmpPage} -%Working with permutation groups, predefined in the system as Rubik's group. +%Working with permutation groups, predefined in the system as Rubik's +%group. \menulink{Info on Representation Theory}{InfoRepTheoryPage} -%\menulink{Irreducible Representations of Symmetric Groups}{IrrRepSymNatXmpPage} +%\menulink{Irreducible Representations of Symmetric Groups} +%{IrrRepSymNatXmpPage} %Alfred Young's natural form for these representations. -%\menulink{Representations of Higher Degree}{RepresentationPackage1XmpPage} +%\menulink{Representations of Higher Degree} +%{RepresentationPackage1XmpPage} %Constructing new representations by symmetric and antisymmetric %tensors. -%\menulink{Decomposing Representations}{RepresentationPackage2XmpPage} +%\menulink{Decomposing Representations} +%{RepresentationPackage2XmpPage} %Parker's `Meat-Axe', working in prime characteristics. \menulink{Representations of \texht{$A_6$}{A6}}{RepA6Page} -The irreducible representations of the alternating group \texht{$A_6$}{A6} over fields -of characteristic 2. +The irreducible representations of the alternating group +\texht{$A_6$}{A6} over fields of characteristic 2. \endmenu \endscroll \autobuttons \end{page} @ -\subsection{Representations of $A_6$ A6} -\label{RepA6Page} -\index{pages!RepA6Page!grpthry.ht} -\index{grpthry.ht!pages!RepA6Page} -\index{RepA6Page!grpthry.ht!pages} +\pagehead{RepA6Page}{grpthry.ht}{Representations of $A_6$ A6} <>= \begin{page}{RepA6Page}{Representations of \texht{$A_6$}{A6}} % author: J. Grabmeier, 08/08/89 \beginscroll In what follows you'll see how to use Axiom to get all the irreducible -representations of the alternating group \texht{$A_6$}{A6} over the field with two -elements (GF 2). -First, we generate \texht{$A_6$}{A6} by a three-cycle: x = (1,2,3) -and a 5-cycle: y = (2,3,4,5,6). Next we have Axiom calculate -the permutation representation over the integers and over GF 2: -\spadpaste{genA6 : LIST PERM INT := [cycle [1,2,3],cycle [2,3,4,5,6]] \bound{genA6}} -\spadpaste{pRA6 := permutationRepresentation (genA6, 6) \bound{pRA6} \free{genA6} +representations of the alternating group \texht{$A_6$}{A6} over the +field with two elements (GF 2). First, we generate \texht{$A_6$}{A6} +by a three-cycle: x = (1,2,3) and a 5-cycle: y = (2,3,4,5,6). Next we +have Axiom calculate the permutation representation over the integers +and over GF 2: +\spadpaste{genA6 : LIST PERM INT := [cycle [1,2,3],cycle [2,3,4,5,6]] +\bound{genA6}} +\spadpaste{pRA6 := permutationRepresentation (genA6, 6) \bound{pRA6} +\free{genA6} } Now we apply Parker's 'Meat-Axe' and split it: -\spadpaste{sp0 := meatAxe (pRA6::(LIST MATRIX PF 2)) \free{pRA6} \bound{sp0}} +\spadpaste{sp0 := meatAxe (pRA6::(LIST MATRIX PF 2)) \free{pRA6} +\bound{sp0}} We have found the trivial module as a quotient module and a 5-dimensional sub-module. Try to split again: @@ -11523,15 +10588,17 @@ Try to split again: and we find a 4-dimensional sub-module and the trivial one again. Now we can test if this representaton is absolutely irreducible: \spadpaste{isAbsolutelyIrreducible? sp1.2 } -and we see that this 4-dimensional representation is absolutely irreducible. -So, we have found a second irreducible representation. -Now, we construct a representation by reducing an irreducible one -of the symmetric group S_6 over the integers mod 2. -We take the one labelled by the partition [2,2,1,1] and -restrict it to \texht{$A_6$}{A6}: -\spadpaste{d2211 := irreducibleRepresentation ([2,2,1,1],genA6) \bound{d2211} } +and we see that this 4-dimensional representation is absolutely +irreducible. So, we have found a second irreducible representation. +Now, we construct a representation by reducing an irreducible one of +the symmetric group S_6 over the integers mod 2. We take the one +labelled by the partition [2,2,1,1] and restrict it to +\texht{$A_6$}{A6}: +\spadpaste{d2211 := irreducibleRepresentation ([2,2,1,1],genA6) +\bound{d2211} } Now split it: -\spadpaste{d2211m2 := d2211:: (LIST MATRIX PF 2); sp2 := meatAxe d2211m2 \free{d2211} +\spadpaste{d2211m2 := d2211:: (LIST MATRIX PF 2); +sp2 := meatAxe d2211m2 \free{d2211} \bound{sp2}} This gave both a five and a four dimensional representation. Now we take the 4-dimensional one @@ -11542,8 +10609,10 @@ The two 4-dimensional representations are not equivalent: So we have found a third irreducible representation. Now we construct a new representation using the tensor product and try to split it: -\spadpaste{dA6d16 := tensorProduct(sp1.2,sp2.1); meatAxe dA6d16 \bound{dA6d16}} -The representation is irreducible, but it may be not absolutely irreducible. +\spadpaste{dA6d16 := tensorProduct(sp1.2,sp2.1); +meatAxe dA6d16 \bound{dA6d16}} +The representation is irreducible, but it may be not +absolutely irreducible. \spadpaste{isAbsolutelyIrreducible? dA6d16} So let's try the same procedure over the field with 4 elements: \spadpaste{sp3 := meatAxe (dA6d16 :: (LIST MATRIX FF(2,2))) \bound{sp3}} @@ -11553,7 +10622,8 @@ Both are absolutely irreducible... \spadpaste{isAbsolutelyIrreducible? sp3.2} and they are not equivalent: \spadpaste{areEquivalent? (sp3.1,sp3.2)} -So we have found five absolutely irreducible representations of \texht{$A_6$}{A6} +So we have found five absolutely irreducible representations +of \texht{$A_6$}{A6} in characteristic 2. General theory now tells us that there are no more irreducible ones. Here, for future reference are all the absolutely irreducible 2-modular @@ -11570,90 +10640,80 @@ representations of \texht{$A_6$}{A6} over GF 2 \autobuttons \end{page} @ -\subsection{Representation Theory} -\label{InfoRepTheoryPage} -\index{pages!InfoRepTheoryPage!grpthry.ht} -\index{grpthry.ht!pages!InfoRepTheoryPage} -\index{InfoRepTheoryPage!grpthry.ht!pages} +\pagehead{InfoRepTheoryPage}{grpthry.ht}{Representation Theory} <>= \begin{page}{InfoRepTheoryPage}{Representation Theory} \beginscroll \horizontalline Representation theory for finite groups studies finite groups by -embedding them in a general linear group over a field or an -integral domain. -Hence, we are representing each element of the group by -an invertible matrix. -Two matrix representations of a given group are equivalent, if, by changing the -basis of the underlying -space, you can go from one to the other. When you change bases, you -transform the matrices that are the images of elements by -conjugating them by an invertible matrix. +embedding them in a general linear group over a field or an integral +domain. Hence, we are representing each element of the group by an +invertible matrix. Two matrix representations of a given group are +equivalent, if, by changing the basis of the underlying space, you can +go from one to the other. When you change bases, you transform the +matrices that are the images of elements by conjugating them by an +invertible matrix. \newline \newline -If we can find a subspace which is fixed under the image -of the group, then there exists a `base change' after which all the representing - matrices -are in upper triangular block form. The block matrices on -the main diagonal give a new representation of the group of lower degree. -Such a representation is said to be `reducible'. +If we can find a subspace which is fixed under the image of the group, +then there exists a `base change' after which all the representing +matrices are in upper triangular block form. The block matrices on +the main diagonal give a new representation of the group of lower +degree. Such a representation is said to be `reducible'. \newline \beginmenu -%\menulink{Irreducible Representations of Symmetric Groups}{IrrRepSymNatXmpPage} +%\menulink{Irreducible Representations of Symmetric Groups} +%{IrrRepSymNatXmpPage} %Alfred Young's natural form for these representations. -%\menulink{Representations of Higher Degree}{RepresentationPackage1XmpPage} +%\menulink{Representations of Higher Degree} +%{RepresentationPackage1XmpPage} %Constructing new representations by symmetric and antisymmetric %tensors. -%\menulink{Decomposing Representations}{RepresentationPackage2XmpPage} +%\menulink{Decomposing Representations} +%{RepresentationPackage2XmpPage} %Parker's `Meat-Axe', working in prime characteristics. \menulink{Representations of \texht{$A_6$}{A6}}{RepA6Page} -The irreducible representations of the alternating group \texht{$A_6$}{A6} over fields -of characteristic 2. +The irreducible representations of the alternating group +\texht{$A_6$}{A6} over fields of characteristic 2. \endmenu \endscroll \autobuttons \end{page} @ -\subsection{Group Theory} -\label{InfoGroupTheoryPage} -\index{pages!InfoGroupTheoryPage!grpthry.ht} -\index{grpthry.ht!pages!InfoGroupTheoryPage} -\index{InfoGroupTheoryPage!grpthry.ht!pages} +\pagehead{InfoGroupTheoryPage}{grpthry.ht}{Group Theory} <>= \begin{page}{InfoGroupTheoryPage}{Group Theory} %% %% Johannes Grabmeier 03/02/90 %% \beginscroll -A {\it group} is a set G together with an associative operation -* satisfying the axioms of existence -of a unit element and an inverse of every element of the group. -The Axiom category \spadtype{Group} represents this setting. -Many data structures in Axiom are groups and therefore there -is a large variety of examples as fields and polynomials, -although the main interest there is not the group structure. +A {\it group} is a set G together with an associative operation * +satisfying the axioms of existence of a unit element and an inverse of +every element of the group. The Axiom category \spadtype{Group} +represents this setting. Many data structures in Axiom are groups and +therefore there is a large variety of examples as fields and +polynomials, although the main interest there is not the group +structure. To work with and in groups in a concrete manner some way of -representing groups has to be chosen. A group can be given -as a list of generators and a set of relations. If there -are no relations, then we have a {\it free group}, realized -in the domain \spadtype{FreeMonoid} which won't be discussed here. -We consider {\it permutation groups}, where a group -is realized as a subgroup of the symmetric group of a set, i.e. -the group of all bijections of a set, the operation being the -composition of maps. -Indeed, every group can be realized this way, although -this may not be practical. - -Furthermore group elements can be given as invertible matrices. -The group operation is reflected by matrix multiplication. -More precise in representation theory group homomophisms -from a group to general linear groups are contructed. -Some algorithms are implemented in Axiom. +representing groups has to be chosen. A group can be given as a list +of generators and a set of relations. If there are no relations, then +we have a {\it free group}, realized in the domain +\spadtype{FreeMonoid} which won't be discussed here. We consider {\it +permutation groups}, where a group is realized as a subgroup of the +symmetric group of a set, i.e. the group of all bijections of a set, +the operation being the composition of maps. Indeed, every group can +be realized this way, although this may not be practical. + +Furthermore group elements can be given as invertible matrices. The +group operation is reflected by matrix multiplication. More precise +in representation theory group homomophisms from a group to general +linear groups are contructed. Some algorithms are implemented in +Axiom. \newline %\beginmenu %\menulink{Permutation}{PermutationXmpPage} @@ -11662,48 +10722,40 @@ Some algorithms are implemented in Axiom. %\menulink{Permutation Groups}{PermutationGroupXmpPage} %Working with subgroups of a symmetric group. -%\menulink{Permutation Group Examples}{PermutationGroupExampleXmpPage} -%Working with permutation groups, predefined in the system as Rubik's group. +%\menulink{Permutation Group Examples} +%{PermutationGroupExampleXmpPage} +%Working with permutation groups, predefined +in the system as Rubik's group. %\endmenu \endscroll \autobuttons \end{page} - @ \section{gstbl.ht} -<>= -\newcommand{\GeneralSparseTableXmpTitle}{GeneralSparseTable} -\newcommand{\GeneralSparseTableXmpNumber}{9.30} - -@ -\subsection{GeneralSparseTable} -\label{GeneralSparseTableXmpPage} -See TableXmpPage \ref{TableXmpPage} on page~\pageref{TableXmpPage} -\index{pages!GeneralSparseTableXmpPage!gstbl.ht} -\index{gstbl.ht!pages!GeneralSparseTableXmpPage} -\index{GeneralSparseTableXmpPage!gstbl.ht!pages} +\pagehead{GeneralSparseTableXmpPage}{gstbl.ht}{GeneralSparseTable} +\pageto{notitle}{TableXmpPage} <>= \begin{page}{GeneralSparseTableXmpPage}{GeneralSparseTable} \beginscroll -Sometimes when working with tables there is a natural value to use -as the entry in all but a few cases. -The \spadtype{GeneralSparseTable} constructor can be used to provide any -table type with a default value for entries. -See \downlink{`Table'}{TableXmpPage}\ignore{Table} -for general information about tables. +Sometimes when working with tables there is a natural value to use as +the entry in all but a few cases. The \spadtype{GeneralSparseTable} +constructor can be used to provide any table type with a default value +for entries. See \downlink{`Table'}{TableXmpPage}\ignore{Table} for +general information about tables. \showBlurb{GeneralSparseTable} -Suppose we launched a fund-raising campaign to raise fifty thousand dollars. -To record the contributions, we want a table with strings as keys -(for the names) and integer entries (for the amount). -In a data base of cash contributions, unless someone -has been explicitly entered, it is reasonable to assume they have made -a zero dollar contribution. +Suppose we launched a fund-raising campaign to raise fifty thousand +dollars. To record the contributions, we want a table with strings as +keys (for the names) and integer entries (for the amount). In a data +base of cash contributions, unless someone has been explicitly +entered, it is reasonable to assume they have made a zero dollar +contribution. \xtc{ This creates a keyed access file with default entry \spad{0}. }{ -\spadpaste{patrons: GeneralSparseTable(String, Integer, KeyedAccessFile(Integer), 0) := table() ; \bound{patrons}} +\spadpaste{patrons: GeneralSparseTable(String, Integer, +KeyedAccessFile(Integer), 0) := table() ; \bound{patrons}} } \xtc{ Now \spad{patrons} can be used just as any other table. @@ -11740,31 +10792,18 @@ So the project is cancelled and we can delete the data base: @ \section{heap.ht} -<>= -\newcommand{\HeapXmpTitle}{Heap} -\newcommand{\HeapXmpNumber}{9.32} - -@ -\subsection{Heap} -\label{HeapXmpPage} -See FlexibleArrayXmpPage \ref{FlexibleArrayXmpPage} -on page~\pageref{FlexibleArrayXmpPage} -\index{pages!HeapXmpPage!heap.ht} -\index{heap.ht!pages!HeapXmpPage} -\index{HeapXmpPage!heap.ht!pages} +\pagehead{HeapXmpPage}{heap.ht}{Heap} +\pageto{notitle}{FlexibleArrayXmpPage} <>= \begin{page}{HeapXmpPage}{Heap} \beginscroll -The domain \spadtype{Heap(S)} implements a priority queue of -objects of type \spad{S} such that -the operation \spadfunX{extract} removes and returns -the maximum element. -The implementation represents heaps as flexible arrays -(see \downlink{`FlexibleArray'}{FlexibleArrayXmpPage}\ignore{FlexibleArray}). -The representation and algorithms give complexity -of \texht{$O(\log(n))$}{O(log n)} for insertion and extractions, -and \texht{$O(n)$}{O(n)} for construction. - +The domain \spadtype{Heap(S)} implements a priority queue of objects +of type \spad{S} such that the operation \spadfunX{extract} removes +and returns the maximum element. The implementation represents heaps +as flexible arrays (see \downlink{`FlexibleArray'}{FlexibleArrayXmpPage} +\ignore{FlexibleArray}). The representation and algorithms give +complexity of \texht{$O(\log(n))$}{O(log n)} for insertion and +extractions, and \texht{$O(n)$}{O(n)} for construction. \xtc{ Create a heap of six elements. }{ @@ -11797,7 +10836,8 @@ until none are left, collecting the elements in a list. Another way to produce the same result is by defining a \userfun{heapsort} function. }{ -\spadpaste{heapsort(x) == (empty? x => []; cons(extract!(x),heapsort x))\bound{f}} +\spadpaste{heapsort(x) == (empty? x => []; cons(extract!(x),heapsort x)) +\bound{f}} } \xtc{ Create another sample heap. @@ -11815,37 +10855,26 @@ Apply \spadfun{heapsort} to present elements in order. @ \section{hexadec.ht} +\pagehead{HexExpansionXmpPage}{hexadec.ht}{HexadecimalExpansion} +\pageto{notitle}{DecimalExpansionXmpPage} +\pageto{notitle}{BinaryExpansionXmpPage} +\pageto{notitle}{RadixExpansionXmpPage} <>= -\newcommand{\HexadecimalExpansionXmpTitle}{HexadecimalExpansion} -\newcommand{\HexadecimalExpansionXmpNumber}{9.33} - -@ -\subsection{HexadecimalExpansion} -\label{HexadecimalExpansionXmpPage} -\begin{itemize} -\item DecimalExpansionXmpPage \ref{DecimalExpansionXmpPage} on -page~\pageref{DecimalExpansionXmpPage} -\item BinaryExpansionXmpPage \ref{BinaryExpansionXmpPage} on -page~\pageref{BinaryExpansionXmpPage} -\item RadixExpansionXmpPage \ref{RadixExpansionXmpPage} on -page~\pageref{RadixExpansionXmpPage} -\end{itemize} -\index{pages!HexadecimalExpansionXmpPage!hexadec.ht} -\index{hexadec.ht!pages!HexadecimalExpansionXmpPage} -\index{HexadecimalExpansionXmpPage!hexadec.ht!pages} -<>= -\begin{page}{HexadecimalExpansionXmpPage}{HexadecimalExpansion} +\begin{page}{HexExpansionXmpPage}{HexadecimalExpansion} \beginscroll -All rationals have repeating hexadecimal expansions. -The operation \spadfunFrom{hex}{HexadecimalExpansion} returns these -expansions of type \spadtype{HexadecimalExpansion}. -Operations to access the individual numerals of a hexadecimal expansion can -be obtained by converting the value to \spadtype{RadixExpansion(16)}. -More examples of expansions are available in the -\downlink{`DecimalExpansion'}{DecimalExpansionXmpPage}\ignore{DecimalExpansion}, -\downlink{`BinaryExpansion'}{BinaryExpansionXmpPage}\ignore{BinaryExpansion}, and -\downlink{`RadixExpansion'}{RadixExpansionXmpPage}\ignore{RadixExpansion}. +All rationals have repeating hexadecimal expansions. The operation +\spadfunFrom{hex}{HexadecimalExpansion} returns these expansions of +type \spadtype{HexadecimalExpansion}. Operations to access the +individual numerals of a hexadecimal expansion can be obtained by +converting the value to \spadtype{RadixExpansion(16)}. More examples +of expansions are available in the +\downlink{`DecimalExpansion'}{DecimalExpansionXmpPage} +\ignore{DecimalExpansion}, +\downlink{`BinaryExpansion'}{BinaryExpansionXmpPage} +\ignore{BinaryExpansion}, and +\downlink{`RadixExpansion'}{RadixExpansionXmpPage} +\ignore{RadixExpansion}. \showBlurb{HexadecimalExpansion} @@ -11888,80 +10917,56 @@ These numbers are bona fide algebraic objects. @ \section{int.ht} -<>= -\newcommand{\IntegerXmpTitle}{Integer} -\newcommand{\IntegerXmpNumber}{9.34} - -@ -\subsection{Integer} -\label{IntegerXmpPage} -\begin{itemize} -\item ugIntroNumbersPage\\ -\ref{ugIntroNumbersPage} on page~\pageref{ugIntroNumbersPage} -\item IntegerNumberTheoryFunctionsXmpPage \\ -\ref{IntegerNumberTheoryFunctionsXmpPage} on -page~\pageref{IntegerNumberTheoryFunctionsXmpPage} -\item DecimalExpansionXmpPage \\ -\ref{DecimalExpansionXmpPage} on page~\pageref{DecimalExpansionXmpPage} -\item BinaryExpansionXmpPage \\ -\ref{BinaryExpansionXmpPage} on page~\pageref{BinaryExpansionXmpPage} -\item HexadecimalExpansionXmpPage \\ -\ref{HexadecimalExpansionXmpPage} on page~\pageref{HexadecimalExpansionXmpPage} -\item RadixExpansionXmpPage\\ -\ref{RadixExpansionXmpPage} on page~\pageref{RadixExpansionXmpPage} -\item ugxIntegerBasicPage \\ -\ref{ugxIntegerBasicPage} on page~\pageref{ugxIntegerBasicPage} -\item ugxIntegerPrimesPage \\ -\ref{ugxIntegerPrimesPage} on page~\pageref{ugxIntegerPrimesPage} -\item ugxIntegerNTPage \\ -\ref{ugxIntegerNTPage} on page~\pageref{ugxIntegerNTPage} -\end{itemize} -\index{pages!IntegerXmpPage!int.ht} -\index{int.ht!pages!IntegerXmpPage} -\index{IntegerXmpPage!int.ht!pages} +\pagehead{IntegerXmpPage}{int.ht}{Integer} +\pageto{notitle}{ugIntroNumbersPage} +\pageto{notitle}{IntNumberTheoryFnsXmpPage} +\pageto{notitle}{DecimalExpansionXmpPage} +\pageto{notitle}{BinaryExpansionXmpPage} +\pageto{notitle}{HexExpansionXmpPage} +\pageto{notitle}{RadixExpansionXmpPage} +\pageto{notitle}{ugxIntegerBasicPage} +\pageto{notitle}{ugxIntegerPrimesPage} +\pageto{notitle}{ugxIntegerNTPage} <>= \begin{page}{IntegerXmpPage}{Integer} \beginscroll -Axiom provides many operations for manipulating arbitrary -precision integers. -In this section we will show some of those that come from \spadtype{Integer} -itself plus some that are implemented in other packages. -More examples of using integers are in the following sections: -\downlink{``\ugIntroNumbersTitle''}{ugIntroNumbersPage} in section \ugIntroNumbersNumber -\downlink{`IntegerNumberTheoryFunctions'}{IntegerNumberTheoryFunctionsXmpPage}\ignore{IntegerNumberTheoryFunctions}, -\downlink{`DecimalExpansion'}{DecimalExpansionXmpPage}\ignore{DecimalExpansion}, -\downlink{`BinaryExpansion'}{BinaryExpansionXmpPage}\ignore{BinaryExpansion}, -\downlink{`HexadecimalExpansion'}{HexadecimalExpansionXmpPage}\ignore{HexadecimalExpansion}, and -\downlink{`RadixExpansion'}{RadixExpansionXmpPage}\ignore{RadixExpansion}. + +Axiom provides many operations for manipulating arbitrary precision +integers. In this section we will show some of those that come from +\spadtype{Integer} itself plus some that are implemented in other +packages. More examples of using integers are in the following +sections: +\downlink{``\ugIntroNumbersTitle''}{ugIntroNumbersPage} in section +\ugIntroNumbersNumber +\downlink{`IntegerNumberTheoryFunctions'} +{IntNumberTheoryFnsXmpPage} +\ignore{IntegerNumberTheoryFunctions}, +\downlink{`DecimalExpansion'}{DecimalExpansionXmpPage} +\ignore{DecimalExpansion}, +\downlink{`BinaryExpansion'}{BinaryExpansionXmpPage} +\ignore{BinaryExpansion}, +\downlink{`HexadecimalExpansion'}{HexExpansionXmpPage} +\ignore{HexadecimalExpansion}, +and +\downlink{`RadixExpansion'}{RadixExpansionXmpPage} +\ignore{RadixExpansion}. \beginmenu \menudownlink{{9.34.1. Basic Functions}}{ugxIntegerBasicPage} - \menudownlink{{9.34.2. Primes and Factorization}}{ugxIntegerPrimesPage} - \menudownlink{{9.34.3. Some Number Theoretic Functions}}{ugxIntegerNTPage} + \menudownlink{{9.34.2. Primes and Factorization}} + {ugxIntegerPrimesPage} + \menudownlink{{9.34.3. Some Number Theoretic Functions}} + {ugxIntegerNTPage} \endmenu \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugxIntegerBasicTitle}{Basic Functions} -\newcommand{\ugxIntegerBasicNumber}{9.34.1.} - -@ -\subsection{Basic Functions} -\label{ugxIntegerBasicPage} -\begin{itemize} -\item FractionXmpPage \ref{FractionXmpPage} on -page~\pageref{FractionXmpPage} -\item ugTypesUnionsPage \ref{ugTypesUnionsPage} on -page~\pageref{ugTypesUnionsPage} -\item ugTypesRecordsPage \ref{ugTypesRecordsPage} on -page~\pageref{ugTypesRecordsPage} -\end{itemize} -\index{pages!ugxIntegerBasicPage!int.ht} -\index{int.ht!pages!ugxIntegerBasicPage} -\index{ugxIntegerBasicPage!int.ht!pages} +\pagehead{ugxIntegerBasicPage}{int.ht}{Basic Functions} +\pageto{notitle}{FractionXmpPage} +\pageto{notitle}{ugTypesUnionsPage} +\pageto{notitle}{ugTypesRecordsPage} <>= \begin{page}{ugxIntegerBasicPage}{Basic Functions} \beginscroll @@ -11987,8 +10992,8 @@ First of all, there is the absolute value function. \spadpaste{abs(x) \free{x}} } \xtc{ -The \spadfunFrom{sign}{Integer} operation returns \spad{-1} if its argument -is negative, \spad{0} if zero and \spad{1} if positive. +The \spadfunFrom{sign}{Integer} operation returns \spad{-1} if its +argument is negative, \spad{0} if zero and \spad{1} if positive. }{ \spadpaste{sign(x) \free{x}} } @@ -12027,13 +11032,13 @@ This is the recommended way of determining whether an integer is zero. } \beginImportant -Use the \spadfunFrom{zero?}{Integer} operation whenever you are testing any -mathematical object for equality with zero. -This is usually more efficient that using \spadop{=} (think of matrices: -it is easier to tell if a matrix is zero by just checking term by term -than constructing another ``zero'' matrix and comparing the two -matrices term by term) and also avoids the problem that \spadop{=} is -usually used for creating equations. +Use the \spadfunFrom{zero?}{Integer} operation whenever you are +testing any mathematical object for equality with zero. This is +usually more efficient that using \spadop{=} (think of matrices: it is +easier to tell if a matrix is zero by just checking term by term than +constructing another ``zero'' matrix and comparing the two matrices +term by term) and also avoids the problem that \spadop{=} is usually +used for creating equations. \endImportant \xtc{ @@ -12053,9 +11058,8 @@ It says that you want a \spadtype{Boolean} (\spad{true} or \xtc{ The operations \spadfunFrom{odd?}{Integer} and -\spadfunFrom{even?}{Integer} determine whether an integer is odd or even, -respectively. -They each return a \spadtype{Boolean} object. +\spadfunFrom{even?}{Integer} determine whether an integer is odd or +even, respectively. They each return a \spadtype{Boolean} object. }{ \spadpaste{odd?(x) \free{x}} } @@ -12064,8 +11068,8 @@ They each return a \spadtype{Boolean} object. \spadpaste{even?(x) \free{x}} } \xtc{ -The operation \spadfunFrom{gcd}{Integer} computes the greatest common divisor of -two integers. +The operation \spadfunFrom{gcd}{Integer} computes the greatest common +divisor of two integers. }{ \spadpaste{gcd(56788,43688)} } @@ -12159,22 +11163,9 @@ Records are discussed in detail in \end{page} @ -<>= -\newcommand{\ugxIntegerPrimesTitle}{Primes and Factorization} -\newcommand{\ugxIntegerPrimesNumber}{9.34.2.} - -@ -\subsection{Primes and Factorization} -\label{ugxIntegerPrimesPage} -\begin{itemize} -\item FactoredXmpPage \ref{FactoredXmpPage} on -page~\pageref{FactoredXmpPage} -\item ComplexXmpPage \ref{ComplexXmpPage} on -page~\pageref{ComplexXmpPage} -\end{itemize} -\index{pages!ugxIntegerPrimesPage!int.ht} -\index{int.ht!pages!ugxIntegerPrimesPage} -\index{ugxIntegerPrimesPage!int.ht!pages} +\pagehead{ugxIntegerPrimesPage}{int.ht}{Primes and Factorization} +\pageto{notitle}{FactoredXmpPage} +\pageto{notitle}{ComplexXmpPage} <>= \begin{page}{ugxIntegerPrimesPage}{Primes and Factorization} \beginscroll @@ -12191,8 +11182,8 @@ manipulation of factored objects. } \xtc{ -The operation \spadfunFrom{prime?}{Integer} returns \spad{true} or \spad{false} depending -on whether its argument is a prime. +The operation \spadfunFrom{prime?}{Integer} returns \spad{true} or +\spad{false} depending on whether its argument is a prime. }{ \spadpaste{prime? 7} } @@ -12232,23 +11223,14 @@ See \downlink{`Complex'}{ComplexXmpPage}\ignore{Complex} for more details. \end{page} @ -<>= -\newcommand{\ugxIntegerNTTitle}{Some Number Theoretic Functions} -\newcommand{\ugxIntegerNTNumber}{9.34.3.} - -@ -\subsection{Some Number Theoretic Functions} -\label{ugxIntegerNTPage} -\index{pages!ugxIntegerNTPage!int.ht} -\index{int.ht!pages!ugxIntegerNTPage} -\index{ugxIntegerNTPage!int.ht!pages} +\pagehead{ugxIntegerNTPage}{int.ht}{Some Number Theoretic Functions} <>= \begin{page}{ugxIntegerNTPage}{Some Number Theoretic Functions} \beginscroll Axiom provides several number theoretic operations for integers. More examples are in \downlink{`IntegerNumberTheoryFunctions'} -{IntegerNumberTheoryFunctionsXmpPage}\ignore{IntegerNumberTheoryFunctions}. +{IntNumberTheoryFnsXmpPage}\ignore{IntegerNumberTheoryFunctions}. \labelSpace{1pc} \xtc{ @@ -12323,26 +11305,18 @@ Roman numerals. @ \section{intheory.ht} -<>= -\newcommand{\IntegerNumberTheoryFunctionsXmpTitle} +\pagehead{IntNumberTheoryFnsXmpPage}{intheory.ht} {IntegerNumberTheoryFunctions} -\newcommand{\IntegerNumberTheoryFunctionsXmpNumber}{9.36} - -@ -\subsection{IntegerNumberTheoryFunctions} -\label{IntegerNumberTheoryFunctionsXmpPage} -\index{pages!IntegerNumberTheoryFunctionsXmpPage!intheory.ht} -\index{intheory.ht!pages!IntegerNumberTheoryFunctionsXmpPage} -\index{IntegerNumberTheoryFunctionsXmpPage!intheory.ht!pages} <>= -\begin{page}{IntegerNumberTheoryFunctionsXmpPage}{IntegerNumberTheoryFunctions} +\begin{page}{IntNumberTheoryFnsXmpPage} +{IntegerNumberTheoryFunctions} \beginscroll -The \spadtype{IntegerNumberTheoryFunctions} package contains a variety of -operations of interest to number theorists. -Many of these operations deal with divisibility properties of integers. -(Recall that an integer \spad{a} divides an integer \spad{b} if there is -an integer \spad{c} such that \spad{b = a * c}.) +The \spadtype{IntegerNumberTheoryFunctions} package contains a variety +of operations of interest to number theorists. Many of these +operations deal with divisibility properties of integers. (Recall +that an integer \spad{a} divides an integer \spad{b} if there is an +integer \spad{c} such that \spad{b = a * c}.) \xtc{ The operation \spadfunFrom{divisors}{IntegerNumberTheoryFunctions} @@ -12382,7 +11356,8 @@ In Axiom, you can simply call the operations The key is that \spad{d(n)} and \spad{\texht{$\sigma$}{sigma}(n)} are ``multiplicative functions.'' -This means that when \spad{n} and \spad{m} are relatively prime, that is, when +This means that when \spad{n} and \spad{m} are relatively prime, +that is, when \spad{n} and \spad{m} have no prime factor in common, then \spad{d(nm) = d(n) d(m)} and \spad{\texht{$\sigma$}{sigma}(nm) = \texht{$\sigma$}{sigma}(n) @@ -12391,8 +11366,9 @@ Note that these functions are trivial to compute when \spad{n} is a prime power and are computed for general \spad{n} from the prime factorization of \spad{n}. Other examples of multiplicative functions are -\spad{\texht{$\sigma_k$}{sigma_k}(n)}, the sum of the \eth{\spad{k}} powers of -the divisors of \spad{n} and \texht{$\varphi(n)$}{\spad{phi(n)}}, the +\spad{\texht{$\sigma_k$}{sigma_k}(n)}, the sum of the \eth{\spad{k}} +powers of the divisors of \spad{n} and +\texht{$\varphi(n)$}{\spad{phi(n)}}, the number of integers between 1 and \spad{n} which are prime to \spad{n}. The corresponding Axiom operations are called \spadfunFrom{sumOfKthPowerDivisors}{IntegerNumberTheoryFunctions} and @@ -12431,7 +11407,8 @@ Thus, if you sum \spad{\texht{$\mu$}{mu}(d) \texht{$\cdot$}{*} d(n/d)} over the positive divisors \spad{d} of \spad{n}, you should always get \spad{1}. }{ -\spadpaste{f1(n) == reduce(+,[moebiusMu(d) * numberOfDivisors(quo(n,d)) for d in divisors(n)]) \bound{f1}} +\spadpaste{f1(n) == reduce(+,[moebiusMu(d) * numberOfDivisors(quo(n,d)) +for d in divisors(n)]) \bound{f1}} } \xtc{ }{ @@ -12442,12 +11419,14 @@ over the positive divisors \spadpaste{f1(846) \free{f1}} } \xtc{ -Similarly, when \spad{f(n) = n}, then \spad{F(n) = \texht{$\sigma$}{sigma}(n)}. +Similarly, +when \spad{f(n) = n}, then \spad{F(n) = \texht{$\sigma$}{sigma}(n)}. Thus, if you sum \spad{\texht{$\mu$}{mu}(d) \texht{$\cdot$}{*} \texht{$\sigma$}{sigma}(n/d)} over the positive divisors \spad{d} of \spad{n}, you should always get \spad{n}. }{ -\spadpaste{f2(n) == reduce(+,[moebiusMu(d) * sumOfDivisors(quo(n,d)) for d in divisors(n)]) \bound{f2}} +\spadpaste{f2(n) == reduce(+,[moebiusMu(d) * sumOfDivisors(quo(n,d)) +for d in divisors(n)]) \bound{f2}} } \xtc{ }{ @@ -12474,7 +11453,8 @@ computes the \eth{\spad{n}} Fibonacci number. \xtc{ Fibonacci numbers can also be expressed as sums of binomial coefficients. }{ -\spadpaste{fib(n) == reduce(+,[binomial(n-1-k,k) for k in 0..quo(n-1,2)]) \bound{fib}} +\spadpaste{fib(n) == reduce(+,[binomial(n-1-k,k) +for k in 0..quo(n-1,2)]) \bound{fib}} } \xtc{ }{ @@ -12522,7 +11502,8 @@ imaginary quadratic fields from a standard class number formula. This function computes the class number of the imaginary quadratic field with discriminant \spad{d}. }{ -\spadpaste{h(d) == quo(reduce(+, [jacobi(d,k) for k in 1..quo(-d, 2)]), 2 - jacobi(d,2)) \bound{h}} +\spadpaste{h(d) == quo(reduce(+, [jacobi(d,k) for k in 1..quo(-d, 2)]), +2 - jacobi(d,2)) \bound{h}} } \xtc{ }{ @@ -12543,48 +11524,32 @@ quadratic field with discriminant \spad{d}. @ \section{kafile.ht} -<>= -\newcommand{\KeyedAccessFileXmpTitle}{KeyedAccessFile} -\newcommand{\KeyedAccessFileXmpNumber}{9.38} - -@ -\subsection{KeyedAccessFile} -\label{KeyedAccessFileXmpPage} -\begin{itemize} -\item FileXmpPage \ref{FileXmpPage} on -page~\pageref{FileXmpPage} -\item TextFileXmpPage \ref{TextFileXmpPage} on -page~\pageref{TextFileXmpPage} -\item LibraryXmpPage \ref{LibraryXmpPage} on -page~\pageref{LibraryXmpPage} -\end{itemize} -\index{pages!KeyedAccessFileXmpPage!kafile.ht} -\index{kafile.ht!pages!KeyedAccessFileXmpPage} -\index{KeyedAccessFileXmpPage!kafile.ht!pages} +\pagehead{KeyedAccessFileXmpPage}{kafile.ht}{KeyedAccessFile} +\pageto{notitle}{FileXmpPage} +\pageto{notitle}{TextFileXmpPage} +\pageto{notitle}{LibraryXmpPage} <>= \begin{page}{KeyedAccessFileXmpPage}{KeyedAccessFile} \beginscroll -The domain \spadtype{KeyedAccessFile(S)} provides files which can be used as -associative tables. -Data values are stored in these files and can be retrieved according to -their keys. -The keys must be strings so this type behaves very much like the -\spadtype{StringTable(S)} domain. -The difference is that keyed access files reside in secondary storage while -string tables are kept in memory. -For more information on table-oriented operations, see the description of -\spadtype{Table}. +The domain \spadtype{KeyedAccessFile(S)} provides files which can be +used as associative tables. Data values are stored in these files and +can be retrieved according to their keys. The keys must be strings so +this type behaves very much like the \spadtype{StringTable(S)} domain. +The difference is that keyed access files reside in secondary storage +while string tables are kept in memory. For more information on +table-oriented operations, see the description of \spadtype{Table}. \xtc{ Before a keyed access file can be used, it must first be opened. A new file can be created by opening it for output. }{ -\spadpaste{ey: KeyedAccessFile(Integer) := open("/tmp/editor.year", "output") \bound{ey}} +\spadpaste{ey: KeyedAccessFile(Integer) := +open("/tmp/editor.year", "output") \bound{ey}} } \xtc{ -Just as for vectors, tables or lists, values are saved in a keyed access file -by setting elements. +Just as for vectors, tables or lists, values are saved in a keyed +access file by setting elements. }{ \spadpaste{ey."Char" := 1986 \free{ey}\bound{eya}} } @@ -12610,8 +11575,8 @@ Values are retrieved using application, in any of its syntactic forms. \spadpaste{ey "Char" \free{eya}} } \xtc{ -Attempting to retrieve a non-existent element in this way causes an error. -If it is not known whether a key exists, you should use the +Attempting to retrieve a non-existent element in this way causes an +error. If it is not known whether a key exists, you should use the \spadfunFrom{search}{KeyedAccessFile} operation. }{ \spadpaste{search("Char", ey) \free{eya,eyb,eyc}\bound{eyaa}} @@ -12626,8 +11591,8 @@ When an entry is no longer needed, it can be removed from the file. \spadpaste{remove!("Char", ey) \free{eyaa}\bound{eybb}} } \xtc{ -The \spadfunFrom{keys}{KeyedAccessFile} operation returns a list of all the -keys for a given file. +The \spadfunFrom{keys}{KeyedAccessFile} operation returns a list of +all the keys for a given file. }{ \spadpaste{keys ey \free{eybb}} } @@ -12657,26 +11622,26 @@ If many items are to be added to a file at the same time, then it is more efficient to use the \spadfunFromX{write}{KeyedAccessFile} operation. }{ -\spadpaste{write!(ey, ["van Hulzen", 1983]\$KE) \bound{eyccA}\free{eycc}} +\spadpaste{write!(ey, ["van Hulzen", 1983]\$KE) \bound{eyccA}\free{eycc}} } \xtc{ }{ -\spadpaste{write!(ey, ["Calmet", 1982]\$KE) \bound{eyccB}\free{eycc}} +\spadpaste{write!(ey, ["Calmet", 1982]\$KE) \bound{eyccB}\free{eycc}} } \xtc{ }{ -\spadpaste{write!(ey, ["Wang", 1981]\$KE) \bound{eyccC}\free{eycc}} +\spadpaste{write!(ey, ["Wang", 1981]\$KE) \bound{eyccC}\free{eycc}} } \xtc{ }{ \spadpaste{close! ey \free{eyccA,eyccB,eyccC}\bound{eydd}} } \xtc{ -The \spadfunFromX{read}{KeyedAccessFile} operation is also available from -the file view, but it returns elements in a random order. -It is generally clearer and more efficient to use the -\spadfunFrom{keys}{KeyedAccessFile} operation and to extract elements by -key. +The \spadfunFromX{read}{KeyedAccessFile} operation is also available +from the file view, but it returns elements in a random order. It is +generally clearer and more efficient to use the +\spadfunFrom{keys}{KeyedAccessFile} operation and to extract elements +by key. }{ \spadpaste{keys ey \free{eydd}} } @@ -12701,35 +11666,21 @@ For more information on related topics, see @ \section{kernel.ht} -<>= -\newcommand{\KernelXmpTitle}{Kernel} -\newcommand{\KernelXmpNumber}{9.37} - -@ -\subsection{Kernel} -\label{KernelXmpPage} -\begin{itemize} -\item BasicOperatorXmpPage \ref{BasicOperatorXmpPage} on -page~\pageref{BasicOperatorXmpPage} -\item ExpressionXmpPage \ref{ExpressionXmpPage} on -page~\pageref{ExpressionXmpPage} -\end{itemize} -\index{pages!KernelXmpPage!kernel.ht} -\index{kernel.ht!pages!KernelXmpPage} -\index{KernelXmpPage!kernel.ht!pages} +\pagehead{KernelXmpPage}{kernel.ht}{Kernel} +\pageto{notitle}{BasicOperatorXmpPage} +\pageto{notitle}{ExpressionXmpPage} <>= \begin{page}{KernelXmpPage}{Kernel} \beginscroll -A {\it kernel} is a symbolic function application (such as -\spad{sin(x + y)}) or a symbol (such as \spad{x}). -More precisely, a non-symbol kernel over a set {\it S} is an operator applied -to a given list of arguments from {\it S}. -The operator has type \axiomType{BasicOperator} -(see -\downlink{`BasicOperator'}{BasicOperatorXmpPage}\ignore{BasicOperator}) -and the kernel object is usually part of -an expression object (see +A {\it kernel} is a symbolic function application (such as +\spad{sin(x + y)}) or a symbol (such as \spad{x}). +More precisely, a non-symbol +kernel over a set {\it S} is an operator applied to a given list of +arguments from {\it S}. The operator has type +\axiomType{BasicOperator} (see +\downlink{`BasicOperator'}{BasicOperatorXmpPage}\ignore{BasicOperator}) +and the kernel object is usually part of an expression object (see \downlink{`Expression'}{ExpressionXmpPage}\ignore{Expression}). Kernels are created implicitly for you when you @@ -12804,12 +11755,11 @@ The operator has type \axiomType{BasicOperator}. \spadpaste{operator mainKernel(sin cos (tan x + sin x))} } \xtc{ -Use the \axiomFunFrom{name}{Kernel} operation to extract the name of the -operator component of the kernel. -The name has type \axiomType{Symbol}. -This is really just a shortcut for a two-step process of extracting the -operator and then calling \axiomFunFrom{name}{BasicOperator} on the -operator. +Use the \axiomFunFrom{name}{Kernel} operation to extract the name of +the operator component of the kernel. The name has type +\axiomType{Symbol}. This is really just a shortcut for a two-step +process of extracting the operator and then calling +\axiomFunFrom{name}{BasicOperator} on the operator. }{ \spadpaste{name mainKernel(sin cos (tan x + sin x))} } @@ -12860,33 +11810,22 @@ take apart expression objects. @ \section{lazm3pk.ht} -<>= -\newcommand{\LazardSetSolvingPackageXmpTitle}{LazardSetSolvingPackage} -\newcommand{\LazardSetSolvingPackageXmpNumber}{9.40} - -@ -\subsection{LazardSetSolvingPackage} -\label{LazardSetSolvingPackageXmpPage} -\index{pages!LazardSetSolvingPackageXmpPage!lazm3pk.ht} -\index{lazm3pk.ht!pages!LazardSetSolvingPackageXmpPage} -\index{LazardSetSolvingPackageXmpPage!lazm3pk.ht!pages} +\pagehead{LazardSetSolvingPackageXmpPage}{lazm3pk.ht} +{LazardSetSolvingPackage} <>= \begin{page}{LazardSetSolvingPackageXmpPage}{LazardSetSolvingPackage} \beginscroll -The \spadtype{LazardSetSolvingPackage} package constructor solves -polynomial systems by means of Lazard triangular sets. -However one condition is relaxed: -Regular triangular sets whose saturated ideals have positive dimension -are not necessarily normalized. - -The decompositions are computed in two steps. -First the algorithm of Moreno Maza (implemented in -the \spadtype{RegularTriangularSet} domain constructor) -is called. -Then the resulting decompositions are converted into lists -of square-free regular triangular sets -and the redundant components are removed. -Moreover, zero-dimensional regular triangular sets are normalized. +The \spadtype{LazardSetSolvingPackage} package constructor solves +polynomial systems by means of Lazard triangular sets. However one +condition is relaxed: Regular triangular sets whose saturated ideals +have positive dimension are not necessarily normalized. + +The decompositions are computed in two steps. First the algorithm of +Moreno Maza (implemented in the \spadtype{RegularTriangularSet} domain +constructor) is called. Then the resulting decompositions are +converted into lists of square-free regular triangular sets and the +redundant components are removed. Moreover, zero-dimensional regular +triangular sets are normalized. Note that the way of understanding triangular decompositions is detailed in the example of the \spadtype{RegularTriangularSet} @@ -12900,20 +11839,25 @@ it must belong to the category \spadtype{OrderedAbelianMonoidSup}. the third one, {\bf V}, is the ordered set of variables; it must belong to the category \spadtype{OrderedSet}. The fourth one is the polynomial ring; -it must belong to the category \spadtype{RecursivePolynomialCategory(R,E,V)}. -The fifth one is a domain of the category \spadtype{RegularTriangularSetCategory(R,E,V,P)} -and the last one is a domain of the category \spadtype{SquareFreeRegularTriangularSetCategory(R,E,V,P)}. -The abbreviation for \spadtype{LazardSetSolvingPackage} is \spad{LAZM3PK}. - -{\bf N.B.} For the purpose of solving zero-dimensional algebraic systems, -see also \spadtype{LexTriangularPackage} and \spadtype{ZeroDimensionalSolvePackage}. +it must belong to the category +\spadtype{RecursivePolynomialCategory(R,E,V)}. +The fifth one is a domain of the category +\spadtype{RegularTriangularSetCategory(R,E,V,P)} +and the last one is a domain of the category +\spadtype{SquareFreeRegularTriangularSetCategory(R,E,V,P)}. +The abbreviation for \spadtype{LazardSetSolvingPackage} is +\spad{LAZM3PK}. + +{\bf N.B.} For the purpose of solving zero-dimensional algebraic +systems, see also \spadtype{LexTriangularPackage} and +\spadtype{ZeroDimensionalSolvePackage}. These packages are easier to call than \spad{LAZM3PK}. Moreover, the \spadtype{ZeroDimensionalSolvePackage} package provides operations to compute either the complex roots or the real roots. -We illustrate now the use of the \spadtype{LazardSetSolvingPackage} package -constructor with two examples (Butcher and Vermeer). +We illustrate now the use of the \spadtype{LazardSetSolvingPackage} +package constructor with two examples (Butcher and Vermeer). \xtc{ @@ -12984,52 +11928,69 @@ Let the variables be polynomial. \xtc{ Now call the \spadtype{RegularTriangularSet} domain constructor. }{ -\spadpaste{T := REGSET(R,E,V,P) \free{R} \free{E} \free{V} \free{P} \bound{T} } +\spadpaste{T := REGSET(R,E,V,P) \free{R} \free{E} \free{V} +\free{P} \bound{T} } } \xtc{ Define a polynomial system (the Butcher example). }{ -\spadpaste{p0 := b1 + y + z - t - w \free{b1} \free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{p0}} +\spadpaste{p0 := b1 + y + z - t - w \free{b1} \free{x} \free{y} +\free{z} \free{t} \free{u} \free{v} \free{w} \bound{p0}} } \xtc{ }{ -\spadpaste{p1 := 2*z*u + 2*y*v + 2*t*w - 2*w**2 - w - 1 \free{b1} \free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{p1}} +\spadpaste{p1 := 2*z*u + 2*y*v + 2*t*w - 2*w**2 - w - 1 \free{b1} +\free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{p1}} } \xtc{ }{ -\spadpaste{p2 := 3*z*u**2 + 3*y*v**2 - 3*t*w**2 + 3*w**3 + 3*w**2 - t + 4*w \free{b1} \free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{p2}} +\spadpaste{p2 := 3*z*u**2 + 3*y*v**2 - 3*t*w**2 + 3*w**3 + +3*w**2 - t + 4*w \free{b1} \free{x} \free{y} \free{z} \free{t} +\free{u} \free{v} \free{w} \bound{p2}} } \xtc{ }{ -\spadpaste{p3 := 6*x*z*v - 6*t*w**2 + 6*w**3 - 3*t*w + 6*w**2 - t + 4*w \free{b1} \free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{p3}} +\spadpaste{p3 := 6*x*z*v - 6*t*w**2 + 6*w**3 - 3*t*w + +6*w**2 - t + 4*w \free{b1} \free{x} \free{y} \free{z} +\free{t} \free{u} \free{v} \free{w} \bound{p3}} } \xtc{ }{ -\spadpaste{p4 := 4*z*u**3+ 4*y*v**3+ 4*t*w**3- 4*w**4 - 6*w**3+ 4*t*w- 10*w**2- w- 1 \free{b1} \free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{p4}} +\spadpaste{p4 := 4*z*u**3+ 4*y*v**3+ 4*t*w**3- 4*w**4 - +6*w**3+ 4*t*w- 10*w**2- w- 1 \free{b1} \free{x} \free{y} +\free{z} \free{t} \free{u} \free{v} \free{w} \bound{p4}} } \xtc{ }{ -\spadpaste{p5 := 8*x*z*u*v +8*t*w**3 -8*w**4 +4*t*w**2 -12*w**3 +4*t*w -14*w**2 -3*w -1 \free{b1} \free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{p5}} +\spadpaste{p5 := 8*x*z*u*v +8*t*w**3 -8*w**4 +4*t*w**2 - +12*w**3 +4*t*w -14*w**2 -3*w -1 \free{b1} \free{x} \free{y} +\free{z} \free{t} \free{u} \free{v} \free{w} \bound{p5}} } \xtc{ }{ -\spadpaste{p6 := 12*x*z*v**2+12*t*w**3 -12*w**4 +12*t*w**2 -18*w**3 +8*t*w -14*w**2 -w -1 \free{b1} \free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{p6}} +\spadpaste{p6 := 12*x*z*v**2+12*t*w**3 -12*w**4 +12*t*w**2 - +18*w**3 +8*t*w -14*w**2 -w -1 \free{b1} \free{x} \free{y} +\free{z} \free{t} \free{u} \free{v} \free{w} \bound{p6}} } \xtc{ }{ -\spadpaste{p7 := -24*t*w**3 + 24*w**4 - 24*t*w**2 + 36*w**3 - 8*t*w + 26*w**2 + 7*w + 1 \free{b1} \free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{p7}} +\spadpaste{p7 := -24*t*w**3 + 24*w**4 - 24*t*w**2 + 36*w**3 - +8*t*w + 26*w**2 + 7*w + 1 \free{b1} \free{x} \free{y} \free{z} +\free{t} \free{u} \free{v} \free{w} \bound{p7}} } \xtc{ }{ -\spadpaste{lp := [p0, p1, p2, p3, p4, p5, p6, p7] \free{p0} \free{p1} \free{p2} \free{p3} \free{p4} \free{p5} \free{p6} \free{p7} \bound{lp}} +\spadpaste{lp := [p0, p1, p2, p3, p4, p5, p6, p7] \free{p0} +\free{p1} \free{p2} \free{p3} \free{p4} \free{p5} \free{p6} +\free{p7} \bound{lp}} } \xtc{ -First of all, let us solve this system in the sense of Lazard by means of the \spadtype{REGSET} -constructor: +First of all, let us solve this system in the sense of Lazard +by means of the \spadtype{REGSET} constructor: }{ -\spadpaste{lts := zeroSetSplit(lp,false)$T \free{lp} \free{T} \bound{lts}} +\spadpaste{lts := zeroSetSplit(lp,false)$T\free{lp}\free{T}\bound{lts}} } \xtc{ @@ -13044,15 +12005,18 @@ However, the last one, which has dimension zero, can be simplified by using Lazard triangular sets. \xtc{ -Thus we call the \spadtype{SquareFreeRegularTriangularSet} domain constructor, +Thus we call the \spadtype{SquareFreeRegularTriangularSet} domain +constructor, }{ -\spadpaste{ST := SREGSET(R,E,V,P) \free{R} \free{E} \free{V} \free{P} \bound{ST} } +\spadpaste{ST := SREGSET(R,E,V,P) \free{R} \free{E} \free{V} +\free{P} \bound{ST} } } \xtc{ and set the \spadtype{LAZM3PK} package constructor to our situation. }{ -\spadpaste{pack := LAZM3PK(R,E,V,P,T,ST) \free{R} \free{E} \free{V} \free{P} \free{T} \free{ST} \bound{pack} } +\spadpaste{pack := LAZM3PK(R,E,V,P,T,ST) \free{R} \free{E} +\free{V} \free{P} \free{T} \free{ST} \bound{pack} } } \xtc{ @@ -13070,23 +12034,30 @@ for this system. \xtc{ Define the polynomial system. }{ -\spadpaste{f0 := (w - v) ** 2 + (u - t) ** 2 - 1 \free{b1} \free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{f0}} +\spadpaste{f0 := (w - v) ** 2 + (u - t) ** 2 - 1 \free{b1} \free{x} +\free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{f0}} } \xtc{ }{ -\spadpaste{f1 := t ** 2 - v ** 3 \free{b1} \free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{f1}} +\spadpaste{f1 := t ** 2 - v ** 3 \free{b1} \free{x} \free{y} \free{z} +\free{t} \free{u} \free{v} \free{w} \bound{f1}} } \xtc{ }{ -\spadpaste{f2 := 2 * t * (w - v) + 3 * v ** 2 * (u - t) \free{b1} \free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{f2}} +\spadpaste{f2 := 2 * t * (w - v) + 3 * v ** 2 * (u - t) \free{b1} +\free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} +\bound{f2}} } \xtc{ }{ -\spadpaste{f3 := (3 * z * v ** 2 - 1) * (2 * z * t - 1) \free{b1} \free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} \bound{f3}} +\spadpaste{f3 := (3 * z * v ** 2 - 1) * (2 * z * t - 1) \free{b1} +\free{x} \free{y} \free{z} \free{t} \free{u} \free{v} \free{w} +\bound{f3}} } \xtc{ }{ -\spadpaste{lf := [f0, f1, f2, f3] \free{f0} \free{f1} \free{f2} \free{f3} \bound{lf}} +\spadpaste{lf := [f0, f1, f2, f3] \free{f0} \free{f1} \free{f2} +\free{f3} \bound{lf}} } @@ -13098,12 +12069,10 @@ constructor: \spadpaste{zeroSetSplit(lf,true)$T \free{lf} \free{T}} } -We have obtained one regular chain (i.e. regular triangular set) with -dimension 1. -This set is in fact a characterist set of the (radical of) of the ideal -generated by the input system {\bf lf}. -Thus we have only the {\em generic points} of the variety associated -with {\bf lf} +We have obtained one regular chain (i.e. regular triangular set) with +dimension 1. This set is in fact a characterist set of the (radical +of) of the ideal generated by the input system {\bf lf}. Thus we have +only the {\em generic points} of the variety associated with {\bf lf} (for the elimination ordering given by {\bf ls}). So let us get now a full description of this variety. @@ -13115,16 +12084,15 @@ constructor: \spadpaste{zeroSetSplit(lf,false)$T \free{lf} \free{T}} } -We retrieve our regular chain of dimension 1 and we get three regular chains -of dimension 0 corresponding to the {\em degenerated cases}. -We want now to simplify these zero-dimensional regular chains -by using Lazard triangular sets. -Moreover, this will allow us to prove that the above decomposition has -no redundant component. -{\bf N.B.} Generally, decompositions computed by the \spadtype{REGSET} -constructor do not have redundant components. -However, to be sure that no redundant component occurs one needs to use -the \spadtype{SREGSET} or \spadtype{LAZM3PK} constructors. +We retrieve our regular chain of dimension 1 and we get three regular +chains of dimension 0 corresponding to the {\em degenerated cases}. +We want now to simplify these zero-dimensional regular chains by using +Lazard triangular sets. Moreover, this will allow us to prove that +the above decomposition has no redundant component. {\bf N.B.} +Generally, decompositions computed by the \spadtype{REGSET} +constructor do not have redundant components. However, to be sure +that no redundant component occurs one needs to use the +\spadtype{SREGSET} or \spadtype{LAZM3PK} constructors. \xtc{ So let us solve the input system in the sense of Lazard by means of @@ -13132,11 +12100,12 @@ the \spadtype{LAZM3PK} constructor: }{ \spadpaste{zeroSetSplit(lf,false)$pack \free{lf} \free{pack}} } -Due to square-free factorization, we obtained now four zero-dimensional -regular chains. -Moreover, each of them is normalized (the initials are constant). -Note that these zero-dimensional components may be investigated further -with the \spadtype{ZeroDimensionalSolvePackage} package constructor. + +Due to square-free factorization, we obtained now four +zero-dimensional regular chains. Moreover, each of them is normalized +(the initials are constant). Note that these zero-dimensional +components may be investigated further with the +\spadtype{ZeroDimensionalSolvePackage} package constructor. \endscroll \autobuttons @@ -13144,19 +12113,9 @@ with the \spadtype{ZeroDimensionalSolvePackage} package constructor. @ \section{lexp.ht} -<>= -\newcommand{\LieExponentialsXmpTitle}{LieExponentials} -\newcommand{\LieExponentialsXmpNumber}{9.42} - -@ -\subsection{LieExponentials} -\label{LieExponentialsXmpPage} -\index{pages!LieExponentialsXmpPage!lexp.ht} -\index{lexp.ht!pages!LieExponentialsXmpPage} -\index{LieExponentialsXmpPage!lexp.ht!pages} +\pagehead{LieExponentialsXmpPage}{lexp.ht}{LieExponentials} <>= \begin{page}{LieExponentialsXmpPage}{LieExponentials} -% ===================================================================== \beginscroll \xtc{ }{ @@ -13174,25 +12133,30 @@ Declarations of domains } \xtc{ }{ -\spadpaste{ group := LieExponentials(Symbol, coef, 3) \free{coef} \bound{group}} +\spadpaste{ group := LieExponentials(Symbol, coef, 3) +\free{coef} \bound{group}} } \xtc{ }{ -\spadpaste{ lpoly := LiePolynomial(Symbol, coef) \free{coef} \bound{lpoly}} +\spadpaste{ lpoly := LiePolynomial(Symbol, coef) +\free{coef} \bound{lpoly}} } \xtc{ }{ -\spadpaste{ poly := XPBWPolynomial(Symbol, coef) \free{coef} \bound{poly}} +\spadpaste{ poly := XPBWPolynomial(Symbol, coef) +\free{coef} \bound{poly}} } Calculations \xtc{ }{ -\spadpaste{ ea := exp(a::lpoly)$group \free{a} \free{lpoly} \free{group} \bound{ea}} +\spadpaste{ ea := exp(a::lpoly)$group \free{a} \free{lpoly} +\free{group} \bound{ea}} } \xtc{ }{ -\spadpaste{ eb := exp(b::lpoly)$group \free{b} \free{lpoly} \free{group} \bound{eb}} +\spadpaste{ eb := exp(b::lpoly)$group \free{b} \free{lpoly} +\free{group} \bound{eb}} } \xtc{ }{ @@ -13222,104 +12186,84 @@ Calculations @ \section{lextripk.ht} +\pagehead{LexTriangularPkgXmpPage}{lextripk.ht}{LexTriangularPackage} <>= -\newcommand{\LexTriangularPackageXmpTitle}{LexTriangularPackage} -\newcommand{\LexTriangularPackageXmpNumber}{9.39} - -@ -\subsection{LexTriangularPackage} -\label{LexTriangularPackageXmpPage} -\index{pages!LexTriangularPackageXmpPage!lextripk.ht} -\index{lextripk.ht!pages!LexTriangularPackageXmpPage} -\index{LexTriangularPackageXmpPage!lextripk.ht!pages} -<>= -\begin{page}{LexTriangularPackageXmpPage}{LexTriangularPackage} +\begin{page}{LexTriangularPkgXmpPage}{LexTriangularPackage} \beginscroll The \spadtype{LexTriangularPackage} package constructor provides an implementation of the {\em lexTriangular} algorithm (D. Lazard "Solving Zero-dimensional Algebraic Systems", J. of Symbol. Comput., 1992). -This algorithm decomposes a zero-dimensional variety into zero-sets of regular -triangular sets. -Thus the input system must have a finite number of complex solutions. -Moreover, this system needs to be a lexicographical Groebner basis. - -This package takes two arguments: -the coefficient-ring {\bf R} of the polynomials, -which must be a \spadtype{GcdDomain} -and their set of variables given by {\bf ls} a \spadtype{List Symbol}. -The type of the input polynomials must be -\spadtype{NewSparseMultivariatePolynomial(R,V)} -where {\bf V} is \spadtype{OrderedVariableList(ls)}. -The abbreviation for \spadtype{LexTriangularPackage} is \spadtype{LEXTRIPK}. -The main operations are \axiomOpFrom{lexTriangular}{LexTriangularPackage} -and \axiomOpFrom{squareFreeLexTriangular}{LexTriangularPackage}. -The later provide decompositions by means of -square-free regular triangular sets, -built with the \spadtype{SREGSET} constructor, -whereas the former uses the \spadtype{REGSET} constructor. -Note that these constructors also implement another algorithm -for solving algebraic systems by means of regular triangular sets; -in that case no computations of Groebner bases are needed and the input -system may have any dimension (i.e. it may have an infinite number -of solutions). - -The implementation of the {\em lexTriangular} algorithm -provided in the \spadtype{LexTriangularPackage} constructor -differs from that reported in "Computations of gcd over -algebraic towers of simple extensions" by M. Moreno Maza and R. Rioboo -(in proceedings of AAECC11, Paris, 1995). -Indeed, the \axiomOpFrom{squareFreeLexTriangular}{LexTriangularPackage} -operation -removes all multiplicities of the solutions (i.e. the computed solutions -are pairwise different) and the -\axiomOpFrom{lexTriangular}{LexTriangularPackage} -operation may keep some multiplicities; -this latter operation runs generally faster -than the former. - -The interest of the {\em lexTriangular} algorithm is due -to the following experimental remark. -For some examples, a triangular decomposition -of a zero-dimensional variety can be computed faster -via a lexicographical Groebner basis computation than -by using a direct method (like that of \spadtype{SREGSET} -and \spadtype{REGSET}). -This happens typically when the total degree of the system -relies essentially on its smallest variable (like in the -{\em Katsura} systems). -When this is not the case, the direct method may give better timings -(like in the {\em Rose} system). - -Of course, the direct method can also be applied to a +This algorithm decomposes a zero-dimensional variety into zero-sets of +regular triangular sets. Thus the input system must have a finite +number of complex solutions. Moreover, this system needs to be a lexicographical Groebner basis. -However, the {\em lexTriangular} algorithm takes advantage -of the structure of this basis and avoids many unnecessary + +This package takes two arguments: the coefficient-ring {\bf R} of the +polynomials, which must be a \spadtype{GcdDomain} and their set of +variables given by {\bf ls} a \spadtype{List Symbol}. The type of the +input polynomials must be +\spadtype{NewSparseMultivariatePolynomial(R,V)} where {\bf V} is +\spadtype{OrderedVariableList(ls)}. The abbreviation for +\spadtype{LexTriangularPackage} is \spadtype{LEXTRIPK}. The main +operations are \axiomOpFrom{lexTriangular}{LexTriangularPackage} and +\axiomOpFrom{squareFreeLexTriangular}{LexTriangularPackage}. The +later provide decompositions by means of square-free regular +triangular sets, built with the \spadtype{SREGSET} constructor, +whereas the former uses the \spadtype{REGSET} constructor. Note that +these constructors also implement another algorithm for solving +algebraic systems by means of regular triangular sets; in that case no +computations of Groebner bases are needed and the input system may +have any dimension (i.e. it may have an infinite number of solutions). + +The implementation of the {\em lexTriangular} algorithm provided in +the \spadtype{LexTriangularPackage} constructor differs from that +reported in "Computations of gcd over algebraic towers of simple +extensions" by M. Moreno Maza and R. Rioboo (in proceedings of +AAECC11, Paris, 1995). Indeed, the +\axiomOpFrom{squareFreeLexTriangular}{LexTriangularPackage} operation +removes all multiplicities of the solutions (i.e. the computed +solutions are pairwise different) and the +\axiomOpFrom{lexTriangular}{LexTriangularPackage} operation may keep +some multiplicities; this latter operation runs generally faster than +the former. + +The interest of the {\em lexTriangular} algorithm is due to the +following experimental remark. For some examples, a triangular +decomposition of a zero-dimensional variety can be computed faster via +a lexicographical Groebner basis computation than by using a direct +method (like that of \spadtype{SREGSET} and \spadtype{REGSET}). This +happens typically when the total degree of the system relies +essentially on its smallest variable (like in the {\em Katsura} +systems). When this is not the case, the direct method may give +better timings (like in the {\em Rose} system). + +Of course, the direct method can also be applied to a lexicographical +Groebner basis. However, the {\em lexTriangular} algorithm takes +advantage of the structure of this basis and avoids many unnecessary computations which are performed by the direct method. -For this purpose of solving algebraic systems with a -finite number of solutions, -see also the \spadtype{ZeroDimensionalSolvePackage}. -It allows to use both strategies (the lexTriangular algorithm and the direct -method) for computing either the complex or real roots of a system. +For this purpose of solving algebraic systems with a finite number of +solutions, see also the \spadtype{ZeroDimensionalSolvePackage}. It +allows to use both strategies (the lexTriangular algorithm and the +direct method) for computing either the complex or real roots of a +system. Note that the way of understanding triangular decompositions is detailed in the example of the \spadtype{RegularTriangularSet} constructor. -Since the \spadtype{LEXTRIPK} package constructor is limited -to zero-dimensional systems, it provides a -\axiomOpFrom{zeroDimensional?}{LexTriangularPackage} -operation to check whether this requirement holds. -There is also a \axiomOpFrom{groebner}{LexTriangularPackage} -operation to compute the lexicographical Groebner basis -of a set of polynomials with type -\spadtype{NewSparseMultivariatePolynomial(R,V)}. -The elimination ordering is that given by {\bf ls} -(the greatest variable being the first element of {\bf ls}). -This basis is computed by the {\em FLGM} algorithm -(Faugere et al. "Efficient Computation of Zero-Dimensional Groebner Bases by - Change of Ordering" , J. of Symbol. Comput., 1993) +Since the \spadtype{LEXTRIPK} package constructor is limited to +zero-dimensional systems, it provides a +\axiomOpFrom{zeroDimensional?}{LexTriangularPackage} operation to +check whether this requirement holds. There is also a +\axiomOpFrom{groebner}{LexTriangularPackage} operation to compute the +lexicographical Groebner basis of a set of polynomials with type +\spadtype{NewSparseMultivariatePolynomial(R,V)}. The elimination +ordering is that given by {\bf ls} (the greatest variable being the +first element of {\bf ls}). This basis is computed by the {\em FLGM} +algorithm (Faugere et al. "Efficient Computation of Zero-Dimensional +Groebner Bases by Change of Ordering" , J. of Symbol. Comput., 1993) implemented in the \spadtype{LinGroebnerPackage} package constructor. Once a lexicographical Groebner basis is computed, then one can call the operations @@ -13327,8 +12271,8 @@ then one can call the operations and \axiomOpFrom{squareFreeLexTriangular}{LexTriangularPackage}. Note that these operations admit an optional argument to produce normalized triangular sets. -There is also a \axiomOpFrom{zeroSetSplit}{LexTriangularPackage} operation -which does all the job from the input system; +There is also a \axiomOpFrom{zeroSetSplit}{LexTriangularPackage} +operation which does all the job from the input system; an error is produced if this system is not zero-dimensional. Let us illustrate the facilities of the \spadtype{LEXTRIPK} constructor @@ -13360,19 +12304,23 @@ Define the polynomials. } \xtc{ }{ -\spadpaste{p2: P := a*b*c*d*e +a*b*c*d*f +a*b*c*e*f +a*b*d*e*f +a*c*d*e*f +b*c*d*e*f \free{P} \bound{p2}} +\spadpaste{p2: P := a*b*c*d*e +a*b*c*d*f +a*b*c*e*f +a*b*d*e*f + +a*c*d*e*f +b*c*d*e*f \free{P} \bound{p2}} } \xtc{ }{ -\spadpaste{p3: P := a*b*c*d + a*b*c*f + a*b*e*f + a*d*e*f + b*c*d*e + c*d*e*f \free{P} \bound{p3}} +\spadpaste{p3: P := a*b*c*d + a*b*c*f + a*b*e*f + a*d*e*f + +b*c*d*e + c*d*e*f \free{P} \bound{p3}} } \xtc{ }{ -\spadpaste{p4: P := a*b*c + a*b*f + a*e*f + b*c*d + c*d*e + d*e*f \free{P} \bound{p4}} +\spadpaste{p4: P := a*b*c + a*b*f + a*e*f + b*c*d + c*d*e + d*e*f +\free{P} \bound{p4}} } \xtc{ }{ -\spadpaste{p5: P := a*b + a*f + b*c + c*d + d*e + e*f \free{P} \bound{p5}} +\spadpaste{p5: P := a*b + a*f + b*c + c*d + d*e + e*f \free{P} +\bound{p5}} } \xtc{ }{ @@ -13380,50 +12328,60 @@ Define the polynomials. } \xtc{ }{ -\spadpaste{lp := [p1, p2, p3, p4, p5, p6] \free{p1} \free{p2} \free{p3} \free{p4} \free{p5} \free{p6} \bound{lp}} +\spadpaste{lp := [p1, p2, p3, p4, p5, p6] \free{p1} \free{p2} +\free{p3} \free{p4} \free{p5} \free{p6} \bound{lp}} } \xtc{ Now call \spadtype{LEXTRIPK} . }{ -\spadpaste{lextripack := LEXTRIPK(R,ls) \free{R} \free{ls} \bound{lextripack}} +\spadpaste{lextripack := LEXTRIPK(R,ls) \free{R} \free{ls} +\bound{lextripack}} } \xtc{ Compute the lexicographical Groebner basis of the system. This may take between 5 minutes and one hour, depending on your machine. }{ -\spadpaste{lg := groebner(lp)$lextripack \free{lp} \free{lextripack} \bound{lg}} +\spadpaste{lg := groebner(lp)$lextripack \free{lp} +\free{lextripack} \bound{lg}} } \xtc{ Apply lexTriangular to compute a decomposition into regular triangular sets. This should not take more than 5 seconds. }{ -\spadpaste{lexTriangular(lg,false)$lextripack \free{lg} \free{lextripack}} +\spadpaste{lexTriangular(lg,false)$lextripack \free{lg} +\free{lextripack}} } Note that the first set of the decomposition is normalized (all initials are integer numbers) but not the second one (normalized triangular sets are defined in the -description of the \spadtype{NormalizedTriangularSetCategory} constructor). +description of the \spadtype{NormalizedTriangularSetCategory} +constructor). \xtc{ So apply now lexTriangular to produce normalized triangular sets. }{ -\spadpaste{lts := lexTriangular(lg,true)$lextripack \free{lg} \free{lextripack} \bound{lts}} +\spadpaste{lts := lexTriangular(lg,true)$lextripack \free{lg} +\free{lextripack} \bound{lts}} } \xtc{ We check that all initials are constant. }{ -\spadpaste{[[init(p) for p in (ts :: List(P))] for ts in lts] \free{lts}} +\spadpaste{[[init(p) for p in (ts :: List(P))] for ts in lts] +\free{lts}} } -Note that each triangular set in {\bf lts} is a lexicographical Groebner basis. +Note that each triangular set in {\bf lts} is a lexicographical +Groebner basis. Recall that a point belongs to the variety associated with {\bf lp} if and only if -it belongs to that associated with one triangular set {\bf ts} in {\bf lts}. +it belongs to that associated with one triangular set {\bf ts} +in {\bf lts}. By running the \axiomOpFrom{squareFreeLexTriangular}{LexTriangularPackage} operation, we retrieve the above decomposition. \xtc{ }{ -\spadpaste{squareFreeLexTriangular(lg,true)$lextripack \free{lg} \free{lextripack}} +\spadpaste{squareFreeLexTriangular(lg,true)$lextripack \free{lg} +\free{lextripack}} } Thus the solutions given by {\bf lts} are pairwise different. \xtc{ @@ -13437,47 +12395,50 @@ using the \spadtype{ZeroDimensionalSolvePackage}. \xtc{ This requires to add an extra variable (smaller than the others) as follows. }{ -\spadpaste{ls2 : List Symbol := concat(ls,new()$Symbol) \free{ls} \bound{ls2}} +\spadpaste{ls2 : List Symbol := concat(ls,new()$Symbol) \free{ls} +\bound{ls2}} } \xtc{ Then we call the package. }{ -\spadpaste{zdpack := ZDSOLVE(R,ls,ls2) \free{R} \free{ls} \free{ls2} \bound{zdpack}} +\spadpaste{zdpack := ZDSOLVE(R,ls,ls2) \free{R} \free{ls} +\free{ls2} \bound{zdpack}} } \xtc{ -We compute a univariate representation of the variety associated with the input -system as follows. +We compute a univariate representation of the variety associated with +the input system as follows. }{ -\spadpaste{concat [univariateSolve(ts)$zdpack for ts in lts] \free{lts} \free{zdpack}} +\spadpaste{concat [univariateSolve(ts)$zdpack for ts in lts] +\free{lts} \free{zdpack}} } Since the \axiomOpFrom{univariateSolve}{ZeroDimensionalSolvePackage} operation may split a regular set, it returns a list. This explains the use of \axiomOpFrom{concat}{List}. -Look at the last item of the result. It consists of two parts. -For any complex root {\bf ?} of the univariate polynomial in the first part, -we get a tuple of -univariate polynomials (in {\bf a}, ..., {\bf f} respectively) -by replacing {\bf \%A} by {\bf ?} in the second part. -Each of these tuples {\bf t} -describes a point of the variety associated with {\bf lp} -by equaling to zero the polynomials in {\bf t}. - -Note that the way of reading these univariate representations is explained also -in the example illustrating the +Look at the last item of the result. It consists of two parts. For +any complex root {\bf ?} of the univariate polynomial in the first +part, we get a tuple of univariate polynomials (in {\bf a}, ..., +{\bf f} respectively) by replacing {\bf \%A} by {\bf ?} in the second +part. Each of these tuples {\bf t} describes a point of the variety +associated with {\bf lp} by equaling to zero the polynomials in +{\bf t}. + +Note that the way of reading these univariate representations is +explained also in the example illustrating the \spadtype{ZeroDimensionalSolvePackage} constructor. \xtc{ Now, we compute the points of the variety with real coordinates. }{ -\spadpaste{concat [realSolve(ts)$zdpack for ts in lts] \free{lts} \free{zdpack}} +\spadpaste{concat [realSolve(ts)$zdpack for ts in lts] \free{lts} +\free{zdpack}} } -We obtain 24 points given by lists of elements in the \spadtype{RealClosure} -of \spadtype{Fraction} of {\bf R}. +We obtain 24 points given by lists of elements in the +\spadtype{RealClosure} of \spadtype{Fraction} of {\bf R}. In each list, the first value corresponds to the indeterminate {\bf f}, the second to {\bf e} and so on. See \spadtype{ZeroDimensionalSolvePackage} to learn more about @@ -13489,33 +12450,18 @@ the \axiomOpFrom{realSolve}{ZeroDimensionalSolvePackage} operation. @ \section{lib.ht} -<>= -\newcommand{\LibraryXmpTitle}{Library} -\newcommand{\LibraryXmpNumber}{9.41} - -@ -\subsection{Library} -\label{LibraryXmpPage} -\begin{itemize} -\item FileXmpPage \ref{FileXmpPage} on -page~\pageref{FileXmpPage} -\item TextFileXmpPage \ref{TextFileXmpPage} on -page~\pageref{TextFileXmpPage} -\item KeyedAccessFileXmpPage \ref{KeyedAccessFileXmpPage} on -page~\pageref{KeyedAccessFileXmpPage} -\end{itemize} -\index{pages!LibraryXmpPage!lib.ht} -\index{lib.ht!pages!LibraryXmpPage} -\index{LibraryXmpPage!lib.ht!pages} +\pagehead{LibraryXmpPage}{lib.ht}{Library} +\pageto{notitle}{FileXmpPage} +\pageto{notitle}{TextFileXmpPage} +\pageto{notitle}{KeyedAccessFileXmpPage} <>= \begin{page}{LibraryXmpPage}{Library} \beginscroll The \spadtype{Library} domain provides a simple way to store Axiom -values in a file. -This domain is similar to \spadtype{KeyedAccessFile} but fewer declarations -are needed and items of different types can be saved together in the same -file. +values in a file. This domain is similar to +\spadtype{KeyedAccessFile} but fewer declarations are needed and items +of different types can be saved together in the same file. \xtc{ To create a library, you supply a file name. @@ -13562,7 +12508,8 @@ file system. For more information on related topics, see \downlink{`File'}{FileXmpPage}\ignore{File}, \downlink{`TextFile'}{TextFileXmpPage}\ignore{TextFile}, and -\downlink{`KeyedAccessFile'}{KeyedAccessFileXmpPage}\ignore{KeyedAccessFile}. +\downlink{`KeyedAccessFile'}{KeyedAccessFileXmpPage} +\ignore{KeyedAccessFile}. \showBlurb{Library} \endscroll \autobuttons @@ -13571,74 +12518,48 @@ For more information on related topics, see @ \section{link.ht} -\subsection{The Axiom Link to NAG Software} -\begin{itemize} -\item nagLinkIntroPage \ref{nagLinkIntroPage} on -page~\pageref{nagLinkIntroPage} -\item htxl1 \ref{htxl1} on -page~\pageref{htxl1} -\item FoundationLibraryDocPage \ref{FoundationLibraryDocPage} on -page~\pageref{FoundationLibraryDocPage} -\end{itemize} -\label{htxl} -\index{pages!htxl!link.ht} -\index{link.ht!pages!htxl} -\index{htxl!link.ht!pages} +\pagehead{htxl}{link.ht}{The Axiom Link to NAG Software} +\pageto{notitle}{nagLinkIntroPage} +\pageto{notitle}{htxl1} +\pageto{notitle}{FoundationLibraryDocPage} <>= \begin{page}{htxl}{The Axiom Link to NAG Software} \beginscroll \beginmenu -\item \menumemolink{Introduction to the NAG Library Link}{nagLinkIntroPage} +\item \menumemolink{Introduction to the NAG Library Link} +{nagLinkIntroPage} \menumemolink{Access the Link from HyperDoc}{htxl1} -\menulispmemolink{Browser pages for individual routines}{(|kSearch| "Nag*")} +\menulispmemolink{Browser pages for individual routines} +{(|kSearch| "Nag*")} \menumemolink{NAG Library Documentation}{FoundationLibraryDocPage} \endmenu \endscroll \end{page} @ -\subsection{Use of the Link from HyperDoc} -\label{htxl1} -\begin{itemize} -\item c02 \ref{c02} on -page~\pageref{c02} -\item c05 \ref{c05} on -page~\pageref{c05} -\item c06 \ref{c06} on -page~\pageref{c06} -\item d01 \ref{d01} on -page~\pageref{d01} -\item d02 \ref{d02} on -page~\pageref{d02} -\item d03 \ref{d03} on -page~\pageref{d03} -\item e01 \ref{e01} on -page~\pageref{e01} -\item e02 \ref{e02} on -page~\pageref{e02} -\item e04 \ref{e04} on -page~\pageref{e04} -\item f01 \ref{f01} on -page~\pageref{f01} -\item f02 \ref{f02} on -page~\pageref{f02} -\item f04 \ref{f04} on -page~\pageref{f04} -\item f07 \ref{f07} on -page~\pageref{f07} -\item s \ref{s} on -page~\pageref{s} -\end{itemize} -\index{pages!htxl1!link.ht} -\index{link.ht!pages!htxl1} -\index{htxl1!link.ht!pages} +\pagehead{htxl1}{link.ht}{Use of the Link from HyperDoc} +\pageto{notitle}{c02} +\pageto{notitle}{c05} +\pageto{notitle}{c06} +\pageto{notitle}{d01} +\pageto{notitle}{d02} +\pageto{notitle}{d03} +\pageto{notitle}{e01} +\pageto{notitle}{e02} +\pageto{notitle}{e04} +\pageto{notitle}{f01} +\pageto{notitle}{f02} +\pageto{notitle}{f04} +\pageto{notitle}{f07} +\pageto{notitle}{s} <>= \begin{page}{htxl1}{Use of the Link from HyperDoc} Click on the chapter of routines that you would like to use. \beginscroll \beginmenu \menumemolink{C02}{c02}\tab{8} Zeros of Polynomials -\menumemolink{C05}{c05}\tab{8} Roots of One or More Transcendental Equations +\menumemolink{C05}{c05}\tab{8} +Roots of One or More Transcendental Equations \menumemolink{C06}{c06}\tab{8} Summation of Series \menumemolink{D01}{d01}\tab{8} Quadrature \menumemolink{D02}{d02}\tab{8} Ordinary Differential Equations @@ -13656,15 +12577,8 @@ Click on the chapter of routines that you would like to use. \end{page} @ -\subsection{C02 Zeros of Polynomials} -\label{c02} -\begin{itemize} -\item manpageXXc02 \ref{manpageXXc02} on -page~\pageref{manpageXXc02} -\end{itemize} -\index{pages!c02!link.ht} -\index{link.ht!pages!c02} -\index{c02!link.ht!pages} +\pagehead{c02}{link.ht}{C02 Zeros of Polynomials} +\pageto{notitle}{manpageXXc02} <>= \begin{page}{c02}{C02 Zeros of Polynomials} \beginscroll @@ -13672,9 +12586,11 @@ page~\pageref{manpageXXc02} \newline \beginmenu \item Read -\menuwindowlink{Foundation Library Chapter c02 Manual Page}{manpageXXc02} +\menuwindowlink{Foundation Library Chapter c02 Manual Page} +{manpageXXc02} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagPolynomialRootsPackage")}\tab{10} through this chapter +\menulispwindowlink{Browse}{(|kSearch| "NagPolynomialRootsPackage")} +\tab{10} through this chapter \item or use the routines: \menulispdownlink{C02AFF}{(|c02aff|)}\space{} \tab{10} All zeros of a complex polynomial @@ -13686,15 +12602,9 @@ page~\pageref{manpageXXc02} \end{page} @ -\subsection{C05 Roots of One or More Transcendental Equations} -\label{c05} -\begin{itemize} -\item manpageXXc05 \ref{manpageXXc05} on -page~\pageref{manpageXXc05} -\end{itemize} -\index{pages!c05!link.ht} -\index{link.ht!pages!c05} -\index{c05!link.ht!pages} +\pagehead{c05}{link.ht} +{C05 Roots of One or More Transcendental Equations} +\pageto{notitle}{manpageXXc05} <>= \begin{page}{c05}{C05 Roots of One or More Transcendental Equations} \beginscroll @@ -13702,31 +12612,29 @@ page~\pageref{manpageXXc05} \newline \beginmenu \item Read -\menuwindowlink{Foundation Library Chapter c05 Manual Page}{manpageXXc05} +\menuwindowlink{Foundation Library Chapter c05 Manual Page} +{manpageXXc05} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagRootFindingPackage")}\tab{10} through this chapter +\menulispwindowlink{Browse}{(|kSearch| "NagRootFindingPackage")} +\tab{10} through this chapter \item or use the routines: \menulispdownlink{C05ADF}{(|c05adf|)}\space{} -\tab{10} Zero of continuous function in given interval, Bus and Dekker algorithm +\tab{10} Zero of continuous function in given interval, +Bus and Dekker algorithm \menulispdownlink{C05NBF}{(|c05nbf|)}\space{} -\tab{10} Solution of system of nonlinear equations using function values only +\tab{10} Solution of system of nonlinear equations using +function values only \menulispdownlink{C05PBF}{(|c05pbf|)}\space{} -\tab{10} Solution of system of nonlinear equations using 1st derivatives +\tab{10} Solution of system of nonlinear equations using +1st derivatives \endmenu \endscroll \autobuttons \end{page} @ -\subsection{C06 Summation of Series} -\label{c06} -\begin{itemize} -\item manpageXXc06 \ref{manpageXXc06} on -page~\pageref{manpageXXc06} -\end{itemize} -\index{pages!c06!link.ht} -\index{link.ht!pages!c06} -\index{c06!link.ht!pages} +\pagehead{c06}{link.ht}{C06 Summation of Series} +\pageto{notitle}{manpageXXc06} <>= \begin{page}{c06}{C06 Summation of Series} \beginscroll @@ -13734,18 +12642,24 @@ page~\pageref{manpageXXc06} \newline \beginmenu \item Read -\menuwindowlink{Foundation Library Chapter c06 Manual Page}{manpageXXc06} +\menuwindowlink{Foundation Library Chapter c06 Manual Page} +{manpageXXc06} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagSeriesSummationPackage")}\tab{10} through this chapter +\menulispwindowlink{Browse}{(|kSearch| "NagSeriesSummationPackage")} +\tab{10} through this chapter \item or use the routines: \menulispdownlink{C06EAF}{(|c06eaf|)}\space{} -\tab{10} Single 1-D real discrete Fourier transform, no extra workspace +\tab{10} Single 1-D real discrete Fourier transform, no extra +workspace \menulispdownlink{C06EBF}{(|c06ebf|)}\space{} -\tab{10} Single 1-D Hermitian discrete Fourier transform, no extra workspace +\tab{10} Single 1-D Hermitian discrete Fourier transform, no +extra workspace \menulispdownlink{C06ECF}{(|c06ecf|)}\space{} -\tab{10} Single 1-D complex discrete Fourier transform, no extra workspace +\tab{10} Single 1-D complex discrete Fourier transform, no +extra workspace \menulispdownlink{C06EKF}{(|c06ekf|)}\space{} -\tab{10} Circular convolution or correlation of two real vectors, no extra +\tab{10} Circular convolution or correlation of two real +vectors, no extra workspace \menulispdownlink{C06FPF}{(|c06fpf|)}\space{} \tab{10} Multiple 1-D real discrete Fourier transforms @@ -13769,15 +12683,8 @@ workspace \end{page} @ -\subsection{D01 Quadrature} -\label{d01} -\begin{itemize} -\item manpageXXd01 \ref{manpageXXd01} on -page~\pageref{manpageXXd01} -\end{itemize} -\index{pages!d01!link.ht} -\index{link.ht!pages!d01} -\index{d01!link.ht!pages} +\pagehead{d01}{link.ht}{D01 Quadrature} +\pageto{notitle}{manpageXXd01} <>= \begin{page}{d01}{D01 Quadrature} \beginscroll @@ -13785,15 +12692,19 @@ page~\pageref{manpageXXd01} \newline \beginmenu \item Read -\menuwindowlink{Foundation Library Chapter d01 Manual Page}{manpageXXd01} +\menuwindowlink{Foundation Library Chapter d01 Manual Page} +{manpageXXd01} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagIntegrationPackage")}\tab{10} through this chapter +\menulispwindowlink{Browse}{(|kSearch| "NagIntegrationPackage")} +\tab{10} through this chapter \item or use the routines: \menulispdownlink{D01AJF}{(|d01ajf|)}\space{} -\tab{10} 1-D quadrature, adaptive, finite interval, strategy due to Plessens +\tab{10} 1-D quadrature, adaptive, finite interval, strategy +due to Plessens and de Doncker, allowing for badly-behaved integrands \menulispdownlink{D01AKF}{(|d01akf|)}\space{} -\tab{10} 1-D quadrature, adaptive, finite interval, method suitable for +\tab{10} 1-D quadrature, adaptive, finite interval, method +suitable for oscillating functions \menulispdownlink{D01ALF}{(|d01alf|)}\space{} \tab{10} 1-D quadrature, adaptive, finite interval, allowing for @@ -13810,33 +12721,31 @@ with end point singularities of algebraico-logarithmic type \tab{10} 1-D quadrature, adaptive, finite interval, weight function 1/(x-c), Cauchy principle value (Hilbert transform) \menulispdownlink{D01ASF}{(|d01asf|)}\space{} -\tab{10} 1-D quadrature, adaptive, semi-infinite interval, weight function +\tab{10} 1-D quadrature, adaptive, semi-infinite interval, +weight function cos(\omega x) or sin(\omega x) \menulispdownlink{D01BBF}{(|d01bbf|)}\space{} -\tab{10} Pre-computed weights and abscissae for Gaussian quadrature rules, +\tab{10} Pre-computed weights and abscissae for Gaussian +quadrature rules, restricted choice of rule \menulispdownlink{D01FCF}{(|d01fcf|)}\space{} -\tab{10} Multi-dimensional adaptive quadrature over hyper-rectangle +\tab{10} Multi-dimensional adaptive quadrature over +hyper-rectangle \menulispdownlink{D01GAF}{(|d01gaf|)}\space{} -\tab{10} 1-D quadrature, integration of function defined by data values, +\tab{10} 1-D quadrature, integration of function defined +by data values, Gill-Miller method \menulispdownlink{D01GBF}{(|d01gbf|)}\space{} -\tab{10} Multi-dimensional quadrature over hyper-rectangle, Monte Carlo method +\tab{10} Multi-dimensional quadrature over hyper-rectangle, +Monte Carlo method \endmenu \endscroll \autobuttons \end{page} @ -\subsection{D02 Ordinary Differential Equations} -\label{d02} -\begin{itemize} -\item manpageXXd02 \ref{manpageXXd02} on -page~\pageref{manpageXXd02} -\end{itemize} -\index{pages!d02!link.ht} -\index{link.ht!pages!d02} -\index{d02!link.ht!pages} +\pagehead{d02}{link.ht}{D02 Ordinary Differential Equations} +\pageto{notitle}{manpageXXd02} <>= \begin{page}{d02}{D02 Ordinary Differential Equations} \beginscroll @@ -13844,9 +12753,12 @@ page~\pageref{manpageXXd02} \newline \beginmenu \item Read -\menuwindowlink{Foundation Library Chapter d02 Manual Page}{manpageXXd02} +\menuwindowlink{Foundation Library Chapter d02 Manual Page} +{manpageXXd02} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagOrdinaryDifferentialEquationsPackage")}\tab{10} through this chapter +\menulispwindowlink{Browse} +{(|kSearch| "NagOrdinaryDifferentialEquationsPackage")} +\tab{10} through this chapter \item or use the routines: \menulispdownlink{D02BBF}{(|d02bbf|)}\space{} \tab{10} ODEs, IVP, Runge-Kutta-Merson method, over a range, @@ -13855,39 +12767,34 @@ intermediate output \tab{10} ODEs, IVP, Runge-Kutta-Merson method, until function of solution is zero \menulispdownlink{D02CJF}{(|d02cjf|)}\space{} -\tab{10} ODEs, IVP, Adams method, until function of solution is zero, +\tab{10} ODEs, IVP, Adams method, until function of solution +is zero, intermediate output \menulispdownlink{D02EJF}{(|d02ejf|)}\space{} -\tab{10} ODEs, stiff IVP, BDF method, until function of solution is zero, +\tab{10} ODEs, stiff IVP, BDF method, until function of solution +is zero, intermediate output \menulispdownlink{D02GAF}{(|d02gaf|)}\space{} -\tab{10} ODEs, boundary value problem, finite difference technique with -deferred correction, simple nonlinear problem +\tab{10} ODEs, boundary value problem, finite difference technique +with deferred correction, simple nonlinear problem \menulispdownlink{D02GBF}{(|d02gbf|)}\space{} -\tab{10} ODEs, boundary value problem, finite difference technique with -deferred correction, general nonlinear problem +\tab{10} ODEs, boundary value problem, finite difference technique +with deferred correction, general nonlinear problem \menulispdownlink{D02KEF}{(|d02kef|)}\space{} \tab{10} 2nd order Sturm-Liouville problem, regular/singular system, finite/infinite range, eigenvalue and eigenfunction, user-specified break-points \menulispdownlink{D02RAF}{(|d02raf|)}\space{} -\tab{10} ODEs, general nonlinear boundary value problem, finite difference -technique with deferred correction, continuation facility +\tab{10} ODEs, general nonlinear boundary value problem, finite +difference technique with deferred correction, continuation facility \endmenu \endscroll \autobuttons \end{page} @ -\subsection{D03 Partial Differential Equations} -\label{d03} -\begin{itemize} -\item manpageXXd03 \ref{manpageXXd03} on -page~\pageref{manpageXXd03} -\end{itemize} -\index{pages!d03!link.ht} -\index{link.ht!pages!d03} -\index{d03!link.ht!pages} +\pagehead{d03}{link.ht}{D03 Partial Differential Equations} +\pageto{notitle}{manpageXXd03} <>= \begin{page}{d03}{D03 Partial Differential Equations} \beginscroll @@ -13895,13 +12802,16 @@ page~\pageref{manpageXXd03} \newline \beginmenu \item Read -\menuwindowlink{Foundation Library Chapter d03 Manual Page}{manpageXXd03} +\menuwindowlink{Foundation Library Chapter d03 Manual Page} +{manpageXXd03} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagPartialDifferentialEquationsPackage")}\tab{10} through this chapter +\menulispwindowlink{Browse} +{(|kSearch| "NagPartialDifferentialEquationsPackage")} +\tab{10} through this chapter \item or use the routines: \menulispdownlink{D03EDF}{(|d03edf|)}\space{} -\tab{10} Elliptic PDE, solution of finite difference equations by a multigrid -technique +\tab{10} Elliptic PDE, solution of finite difference equations +by a multigrid technique \menulispdownlink{D03EEF}{(|d03eef|)}\space{} \tab{10} Discretize a 2nd order elliptic PDE on a rectangle \menulispdownlink{D03FAF}{(|d03faf|)}\space{} @@ -13912,26 +12822,23 @@ technique \end{page} @ -\subsection{E01 Interpolation} -\label{e01} -\begin{itemize} -\item manpageXXe01 \ref{manpageXXe01} on page~\pageref{manpageXXe01} -\end{itemize} -\index{pages!e01!link.ht} -\index{link.ht!pages!e01} -\index{e01!link.ht!pages} +\pagehead{e01}{link.ht}{E01 Interpolation} +\pageto{notitle}{manpageXXe01} <>= \begin{page}{e01}{E01 Interpolation} \beginscroll \centerline{What would you like to do?} \beginmenu \item Read -\menuwindowlink{Foundation Library Chapter e01 Manual Page}{manpageXXe01} +\menuwindowlink{Foundation Library Chapter e01 Manual Page} +{manpageXXe01} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagInterpolationPackage")}\tab{10} through this chapter +\menulispwindowlink{Browse}{(|kSearch| "NagInterpolationPackage")} +\tab{10} through this chapter \item or use the routines: \menulispdownlink{E01BAF}{(|e01baf|)}\space{} -\tab{10} Interpolating functions, cubic spline interpolant, one variable +\tab{10} Interpolating functions, cubic spline interpolant, +one variable \menulispdownlink{E01BEF}{(|e01bef|)}\space{} \tab{10} Interpolating functions, monotonicity-preserving, piecewise cubic Hermite, one variable @@ -13948,51 +12855,53 @@ integral, one variable \tab{10} Interpolating functions, fitting bicubic spline, data on a rectangular grid \menulispdownlink{E01SAF}{(|e01saf|)}\space{} -\tab{10} Interpolating functions, method of Renka and Cline, two variables +\tab{10} Interpolating functions, method of Renka and Cline, +two variables \menulispdownlink{E01SEF}{(|e01sef|)}\space{} -\tab{10} Interpolating functions, modified Shepherd's method, two variables +\tab{10} Interpolating functions, modified Shepherd's method, +two variables \endmenu \endscroll \autobuttons \end{page} @ -\subsection{E02 Curve and Surface Fitting} -\label{e02} -\begin{itemize} -\item manpageXXe02 \ref{manpageXXe02} on -page~\pageref{manpageXXe02} -\end{itemize} -\index{pages!e02!link.ht} -\index{link.ht!pages!e02} -\index{e02!link.ht!pages} +\pagehead{e02}{link.ht}{E02 Curve and Surface Fitting} +\pageto{notitle}{manpageXXe02} <>= \begin{page}{e02}{E02 Curve and Surface Fitting} \beginscroll \centerline{What would you like to do?} \beginmenu \item Read -\menuwindowlink{Foundation Library Chapter e02 Manual Page}{manpageXXe02} +\menuwindowlink{Foundation Library Chapter e02 Manual Page} +{manpageXXe02} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagFittingPackage")}\tab{10} through this chapter +\menulispwindowlink{Browse}{(|kSearch| "NagFittingPackage")} +\tab{10} through this chapter \item or use the routines: \menulispdownlink{E02ADF}{(|e02adf|)}\space{} -\tab{10} Least-squares curve fit, by polynomials, arbitrary data points +\tab{10} Least-squares curve fit, by polynomials, arbitrary +data points \menulispdownlink{E02AEF}{(|e02aef|)}\space{} -\tab{10} Evaluation of fitted polynomial in one variable from Chebyshev series +\tab{10} Evaluation of fitted polynomial in one variable from +Chebyshev series form (simplified parameter list) \menulispdownlink{E02AGF}{(|e02agf|)}\space{} -\tab{10} Least-squares polynomial fit, values and derivatives may be +\tab{10} Least-squares polynomial fit, values and derivatives +may be constrained, arbitrary data points \menulispdownlink{E02AHF}{(|e02ahf|)}\space{} \tab{10} Derivative of fitted polynomial in Chebyshev series form \menulispdownlink{E02AJF}{(|e02ajf|)}\space{} \tab{10} Integral of fitted polynomial in Chebyshev series form \menulispdownlink{E02AKF}{(|e02akf|)}\space{} -\tab{10} Evaluation of fitted polynomial in one variable, from Chebyshev +\tab{10} Evaluation of fitted polynomial in one variable, from +Chebyshev series form \menulispdownlink{E02BAF}{(|e02baf|)}\space{} -\tab{10} Least-squares curve cubic spline fit (including interpolation) +\tab{10} Least-squares curve cubic spline fit (including +interpolation) \menulispdownlink{E02BBF}{(|e02bbf|)}\space{} \tab{10} Evaluation of fitted cubic spline, function only \menulispdownlink{E02BCF}{(|e02bcf|)}\space{} @@ -14004,11 +12913,11 @@ series form \menulispdownlink{E02DAF}{(|e02daf|)}\space{} \tab{10} Least-squares surface fit, bicubic splines \menulispdownlink{E02DCF}{(|e02dcf|)}\space{} -\tab{10} Least-squares surface fit by bicubic splines with automatic knot -placement, data on a rectangular grid +\tab{10} Least-squares surface fit by bicubic splines with automatic +knot placement, data on a rectangular grid \menulispdownlink{E02DDF}{(|e02ddf|)}\space{} -\tab{10} Least-squares surface fit by bicubic splines with automatic knot -placement, scattered data +\tab{10} Least-squares surface fit by bicubic splines with automatic +knot placement, scattered data \menulispdownlink{E02DEF}{(|e02def|)}\space{} \tab{10} Evaluation of a fitted bicubic spline at a vector of points \menulispdownlink{E02DFF}{(|e02dff|)}\space{} @@ -14023,15 +12932,8 @@ placement, scattered data \end{page} @ -\subsection{E04 Minimizing or Maximizing a Function} -\label{e04} -\begin{itemize} -\item manpageXXe04 \ref{manpageXXe04} on -page~\pageref{manpageXXe04} -\end{itemize} -\index{pages!e04!link.ht} -\index{link.ht!pages!e04} -\index{e04!link.ht!pages} +\pagehead{e04}{link.ht}{E04 Minimizing or Maximizing a Function} +\pageto{notitle}{manpageXXe04} <>= \begin{page}{e04}{E04 Minimizing or Maximizing a Function} \beginscroll @@ -14039,29 +12941,32 @@ page~\pageref{manpageXXe04} \newline \beginmenu \item Read -\menuwindowlink{Foundation Library Chapter e04 Manual Page}{manpageXXe04} +\menuwindowlink{Foundation Library Chapter e04 Manual Page} +{manpageXXe04} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagOptimisationPackage")}\tab{10} through this chapter +\menulispwindowlink{Browse}{(|kSearch| "NagOptimisationPackage")} +\tab{10} through this chapter \item or use the routines: \menulispdownlink{E04DGF}{(|e04dgf|)}\space{} -\tab{10} Unconstrained minimum, pre-conditioned conjugate gradient algorithm, -function of several variables using 1st derivatives +\tab{10} Unconstrained minimum, pre-conditioned conjugate gradient +algorithm, function of several variables using 1st derivatives \menulispdownlink{E04FDF}{(|e04fdf|)}\space{} -\tab{10} Unconstrained minimum of a sum of squares, combined Gauss-Newton -and modified Newton algorithm using function values only +\tab{10} Unconstrained minimum of a sum of squares, combined +Gauss-Newton and modified Newton algorithm using function values only \menulispdownlink{E04GCF}{(|e04gcf|)}\space{} -\tab{10} Unconstrained minimum, of a sum of squares, combined Gauss-Newton -and modified Newton algorithm using 1st derivatives +\tab{10} Unconstrained minimum, of a sum of squares, combined +Gauss-Newton and modified Newton algorithm using 1st derivatives \menulispdownlink{E04JAF}{(|e04jaf|)}\space{} -\tab{10} Minimum, function of several variables, quasi-Newton algorithm, -simple bounds, using function values only +\tab{10} Minimum, function of several variables, quasi-Newton +algorithm, simple bounds, using function values only \menulispdownlink{E04MBF}{(|e04mbf|)}\space{} \tab{10} Linear programming problem \menulispdownlink{E04NAF}{(|e04naf|)}\space{} \tab{10} Quadratic programming problem \menulispdownlink{E04UCF}{(|e04ucf|)}\space{} \tab{10} Minimum, function of several variables, sequential QP method, -nonlinear constraints, using function values and optionally 1st derivatives +nonlinear constraints, using function values and optionally 1st +derivatives \menulispdownlink{E04YCF}{(|e04ycf|)}\space{} \tab{10} Covariance matrix for non-linear least-squares problem \endmenu @@ -14070,33 +12975,28 @@ nonlinear constraints, using function values and optionally 1st derivatives \end{page} @ -\subsection{F01 Matrix Operations - Including Inversion} -\label{f01} -\begin{itemize} -\item manpageXXf \ref{manpageXXf} on -page~\pageref{manpageXXf} -\item manpageXXf01 \ref{manpageXXf01} on -page~\pageref{manpageXXf01} -\end{itemize} -\index{pages!f01!link.ht} -\index{link.ht!pages!f01} -\index{f01!link.ht!pages} +\pagehead{f01}{link.ht}{F01 Matrix Operations - Including Inversion} +\pageto{notitle}{manpageXXf} +\pageto{notitle}{manpageXXf01} <>= \begin{page}{f01}{F01 Matrix Operations - Including Inversion} \beginscroll \centerline{What would you like to do?} \beginmenu \item Read -\menuwindowlink{Foundation Library Chapter f Manual Page}{manpageXXf} -\menuwindowlink{Foundation Library Chapter f01 Manual Page}{manpageXXf01} +\menuwindowlink{Foundation Library Chapter f Manual Page} +{manpageXXf} +\menuwindowlink{Foundation Library Chapter f01 Manual Page} +{manpageXXf01} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagMatrixOperationsPackage")}\tab{10} through this chapter +\menulispwindowlink{Browse}{(|kSearch| "NagMatrixOperationsPackage")} +\tab{10} through this chapter \item or use the routines: \menulispdownlink{F01BRF}{(|f01brf|)}\space{} \tab{10} {\it LU} factorization of real sparse matrix \menulispdownlink{F01BSF}{(|f01bsf|)}\space{} -\tab{10} {\it LU} factorization of real sparse matrix with known sparsity -pattern +\tab{10} {\it LU} factorization of real sparse matrix with known +sparsity pattern \menulispdownlink{F01MAF}{(|f01maf|)}\space{} \tab{10} \htbitmap{llt} factorization of real sparse symmetric positive-definite matrix @@ -14127,17 +13027,9 @@ after factorization by F01RCF \end{page} @ -\subsection{F02 Eigenvalues and Eigenvectors} -\label{f02} -\begin{itemize} -\item manpageXXf \ref{manpageXXf} on -page~\pageref{manpageXXf} -\item manpageXXf02 \ref{manpageXXf02} on -page~\pageref{manpageXXf02} -\end{itemize} -\index{pages!f02!link.ht} -\index{link.ht!pages!f02} -\index{f02!link.ht!pages} +\pagehead{f02}{link.ht}{F02 Eigenvalues and Eigenvectors} +\pageto{notitle}{manpageXXf} +\pageto{notitle}{manpageXXf02} <>= \begin{page}{f02}{F02 Eigenvalues and Eigenvectors} \beginscroll @@ -14145,21 +13037,24 @@ page~\pageref{manpageXXf02} \beginmenu \item Read \menuwindowlink{Foundation Library Chapter f Manual Page}{manpageXXf} -\menuwindowlink{Foundation Library Chapter f02 Manual Page}{manpageXXf02} +\menuwindowlink{Foundation Library Chapter f02 Manual Page} +{manpageXXf02} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagEigenPackage")}\tab{10} through this chapter +\menulispwindowlink{Browse}{(|kSearch| "NagEigenPackage")} +\tab{10} through this chapter \item or use the routines: \menulispdownlink{F02AAF}{(|f02aaf|)}\space{} \tab{10} All eigenvalues of real symmetric matrix (Black box) \menulispdownlink{F02ABF}{(|f02abf|)}\space{} -\tab{10} All eigenvalues and eigenvectors of real symmetric matrix (Black box) +\tab{10} All eigenvalues and eigenvectors of real symmetric +matrix (Black box) \menulispdownlink{F02ADF}{(|f02adf|)}\space{} \tab{10} All eigenvalues of generalized real eigenproblem of the form Ax = \lambda Bx where A and B are symmetric and B is positive definite \menulispdownlink{F02AEF}{(|f02aef|)}\space{} -\tab{10} All eigenvalues and eigenvectors of generalized real eigenproblem -of the form Ax = \lambda Bx where A and B are symmetric and B is positive -definite +\tab{10} All eigenvalues and eigenvectors of generalized real +eigenproblem of the form Ax = \lambda Bx where A and B are symmetric +and B is positive definite \menulispdownlink{F02AFF}{(|f02aff|)}\space{} \tab{10} All eigenvalues of real matrix (Black box) \menulispdownlink{F02AGF}{(|f02agf|)}\space{} @@ -14167,7 +13062,8 @@ definite \menulispdownlink{F02AJF}{(|f02ajf|)}\space{} \tab{10} All eigenvalues of complex matrix (Black box) \menulispdownlink{F02AKF}{(|f02akf|)}\space{} -\tab{10} All eigenvalues and eigenvectors of complex matrix (Black box) +\tab{10} All eigenvalues and eigenvectors of complex matrix +(Black box) \menulispdownlink{F02AWF}{(|f02awf|)}\space{} \tab{10} All eigenvalues of complex Hermitian matrix (Black box) \menulispdownlink{F02AXF}{(|f02axf|)}\space{} @@ -14192,50 +13088,49 @@ eigenproblem \end{page} @ -\subsection{F04 Simultaneous Linear Equations} -\label{f04} -\begin{itemize} -\item manpageXXf \ref{manpageXXf} on -page~\pageref{manpageXXf} -\item manpageXXf04 \ref{manpageXXf04} on -page~\pageref{manpageXXf04} -\end{itemize} -\index{pages!f04!link.ht} -\index{link.ht!pages!f04} -\index{f04!link.ht!pages} +\pagehead{f04}{link.ht}{F04 Simultaneous Linear Equations} +\pageto{notitle}{manpageXXf} +\pageto{notitle}{manpageXXf04} <>= \begin{page}{f04}{F04 Simultaneous Linear Equations} \beginscroll \centerline{What would you like to do?} \beginmenu \item Read -\menuwindowlink{Foundation Library Chapter f Manual Page}{manpageXXf} -\menuwindowlink{Foundation Library Chapter f04 Manual Page}{manpageXXf04} +\menuwindowlink{Foundation Library Chapter f Manual Page} +{manpageXXf} +\menuwindowlink{Foundation Library Chapter f04 Manual Page} +{manpageXXf04} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagLinearEquationSolvingPackage")}\tab{10} through this chapter +\menulispwindowlink{Browse} +{(|kSearch| "NagLinearEquationSolvingPackage")}\tab{10} through +this chapter \item or use the routines: \menulispdownlink{F04ADF}{(|f04adf|)}\space{} -\tab{10} Solution of complex simultaneous linear equations, with multiple -right-hand sides (Black box) +\tab{10} Solution of complex simultaneous linear equations, with +multiple right-hand sides (Black box) \menulispdownlink{F04ARF}{(|f04arf|)}\space{} -\tab{10} Solution of real simultaneous linear equations, one right-hand side +\tab{10} Solution of real simultaneous linear equations, one +right-hand side (Black box) \menulispdownlink{F04ASF}{(|f04asf|)}\space{} -\tab{10} Solution of real symmetric positive-definite simultaneous linear -equations, one right-hand side using iterative refinement (Black box) +\tab{10} Solution of real symmetric positive-definite simultaneous +linear equations, one right-hand side using iterative refinement +(Black box) \menulispdownlink{F04ATF}{(|f04atf|)}\space{} -\tab{10} Solution of real simultaneous linear equations, one right-hand side +\tab{10} Solution of real simultaneous linear equations, one +right-hand side using iterative refinement (Black box) \menulispdownlink{F04AXF}{(|f04axf|)}\space{} -\tab{10} Approximate solution of real sparse simultaneous linear equations -(coefficient matrix already factorized by F01BRF or F01BSF) +\tab{10} Approximate solution of real sparse simultaneous linear +equations (coefficient matrix already factorized by F01BRF or F01BSF) \menulispdownlink{F04FAF}{(|f04faf|)}\space{} \tab{10} Solution of real symmetric positive-definite tridiagonal simultaneous linear equations, one right-hand side (Black box) \menulispdownlink{F04JGF}{(|f04jgf|)}\space{} -\tab{10} Least-squares (if rank = n) or minimal least-squares (if rank < n) -solution of m real equations in n unknowns, rank \htbitmap{less=} n, - m \htbitmap{great=} n +\tab{10} Least-squares (if rank = n) or minimal least-squares +(if rank < n) solution of m real equations in n unknowns, rank +\htbitmap{less=} n, m \htbitmap{great=} n \menulispdownlink{F04MAF}{(|f04maf|)}\space{} \tab{10} Real sparse symmetric positive-definite simultaneous linear equations(coefficient matrix already factorized) @@ -14254,17 +13149,9 @@ in {\it n} unknowns \end{page} @ -\subsection{F07 Linear Equations (LAPACK)} -\label{f07} -\begin{itemize} -\item manpageXXf \ref{manpageXXf} on -page~\pageref{manpageXXf} -\item manpageXXf07 \ref{manpageXXf07} on -page~\pageref{manpageXXf07} -\end{itemize} -\index{pages!f07!link.ht} -\index{link.ht!pages!f07} -\index{f07!link.ht!pages} +\pagehead{f07}{link.ht}{F07 Linear Equations (LAPACK)} +\pageto{notitle}{manpageXXf} +\pageto{notitle}{manpageXXf07} <>= \begin{page}{f07}{F07 Linear Equations (LAPACK)} \beginscroll @@ -14274,36 +13161,30 @@ page~\pageref{manpageXXf07} \menuwindowlink{Foundation Library Chapter f Manual Page}{manpageXXf} \menuwindowlink{Foundation Library Chapter f07 Manual Page}{manpageXXf07} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagLapack")}\tab{10} through this chapter +\menulispwindowlink{Browse} +{(|kSearch| "NagLapack")}\tab{10} through this chapter \item or use the routines: \menulispdownlink{F07ADF}{(|f07adf|)}\space{} -\tab{10} (DGETRF) {\it LU} factorization of real {\it m} by {\it n} matrix +\tab{10} (DGETRF) {\it LU} factorization of real +{\it m} by {\it n} matrix \menulispdownlink{F07AEF}{(|f07aef|)}\space{} -\tab{10} (DGETRS) Solution of real system of linear equations, multiple -right hand sides, matrix factorized by F07ADF +\tab{10} (DGETRS) Solution of real system of linear equations, +multiple right hand sides, matrix factorized by F07ADF \menulispdownlink{F07FDF}{(|f07fdf|)}\space{} -\tab{10} (DPOTRF) Cholesky factorization of real symmetric positive-definite -matrix +\tab{10} (DPOTRF) Cholesky factorization of real symmetric +positive-definite matrix \menulispdownlink{F07FEF}{(|f07fef|)}\space{} -\tab{10} (DPOTRS) Solution of real symmetric positive-definite system of -linear equations, multiple right-hand sides, matrix already factorized by -F07FDF +\tab{10} (DPOTRS) Solution of real symmetric positive-definite +system of linear equations, multiple right-hand sides, matrix +already factorized by F07FDF \endmenu \endscroll \autobuttons \end{page} - @ -\subsection{S \space{2} Approximations of Special Functions} -\label{s} -\begin{itemize} -\item manpageXXs \ref{manpageXXs} on -page~\pageref{manpageXXs} -\end{itemize} -\index{pages!s!link.ht} -\index{link.ht!pages!s} -\index{s!link.ht!pages} +\pagehead{s}{link.ht}{S \space{2} Approximations of Special Functions} +\pageto{notitle}{manpageXXs} <>= \begin{page}{s}{S \space{2} Approximations of Special Functions} \beginscroll @@ -14312,7 +13193,8 @@ page~\pageref{manpageXXs} \item Read \menuwindowlink{Foundation Library Chapter s Manual Page}{manpageXXs} \item or -\menulispwindowlink{Browse}{(|kSearch| "NagSpecialFunctionsPackage")}\tab{10} through this chapter +\menulispwindowlink{Browse}{(|kSearch| "NagSpecialFunctionsPackage")} +\tab{10} through this chapter \item or use the routines: \menulispdownlink{S01EAF}{(|s01eaf|)}\space{} \tab{10} Complex exponential {\em exp(z)} @@ -14407,28 +13289,12 @@ complex z, v = 0,1,2,... \newline @ \section{list.ht} -<>= -\newcommand{\ListXmpTitle}{List} -\newcommand{\ListXmpNumber}{9.47} - -@ -\subsection{List} -\label{ListXmpPage} -\begin{itemize} -\item ugxListCreatePage \ref{ugxListCreatePage} on -page~\pageref{ugxListCreatePage} -\item ugxListAccessPage \ref{ugxListAccessPage} on -page~\pageref{ugxListAccessPage} -\item ugxListChangePage \ref{ugxListChangePage} on -page~\pageref{ugxListChangePage} -\item ugxListOtherPage \ref{ugxListOtherPage} on -page~\pageref{ugxListOtherPage} -\item ugxListDotPage \ref{ugxListDotPage} on -page~\pageref{ugxListDotPage} -\end{itemize} -\index{pages!ListXmpPage!list.ht} -\index{list.ht!pages!ListXmpPage} -\index{ListXmpPage!list.ht!pages} +\pagehead{ListXmpPage}{list.ht}{List} +\pageto{notitle}{ugxListCreatePage} +\pageto{notitle}{ugxListAccessPage} +\pageto{notitle}{ugxListChangePage} +\pageto{notitle}{ugxListOtherPage} +\pageto{notitle}{ugxListDotPage} <>= \begin{page}{ListXmpPage}{List} \beginscroll @@ -14457,16 +13323,7 @@ You can have lists of any type of Axiom object. \end{page} @ -<>= -\newcommand{\ugxListCreateTitle}{Creating Lists} -\newcommand{\ugxListCreateNumber}{9.47.1.} - -@ -\subsection{Creating Lists} -\label{ugxListCreatePage} -\index{pages!ugxListCreatePage!list.ht} -\index{list.ht!pages!ugxListCreatePage} -\index{ugxListCreatePage!list.ht!pages} +\pagehead{ugxListCreatePage}{list.ht}{Creating Lists} <>= \begin{page}{ugxListCreatePage}{Creating Lists} \beginscroll @@ -14511,16 +13368,7 @@ list. \end{page} @ -<>= -\newcommand{\ugxListAccessTitle}{Accessing List Elements} -\newcommand{\ugxListAccessNumber}{9.47.2.} - -@ -\subsection{Accessing List Elements} -\label{ugxListAccessPage} -\index{pages!ugxListAccessPage!list.ht} -\index{list.ht!pages!ugxListAccessPage} -\index{ugxListAccessPage!list.ht!pages} +\pagehead{ugxListAccessPage}{list.ht}{Accessing List Elements} <>= \begin{page}{ugxListAccessPage}{Accessing List Elements} \beginscroll @@ -14533,8 +13381,8 @@ To determine whether a list has any elements, use the operation \spadpaste{empty? [x+1]} } \xtc{ -Alternatively, equality with the list constant \spadfunFrom{nil}{List} can -be tested. +Alternatively, equality with the list constant \spadfunFrom{nil}{List} +can be tested. }{ \spadpaste{([] = nil)@Boolean} } @@ -14607,16 +13455,7 @@ extracts the element from the list. \end{page} @ -<>= -\newcommand{\ugxListChangeTitle}{Changing List Elements} -\newcommand{\ugxListChangeNumber}{9.47.3.} - -@ -\subsection{Changing List Elements} -\label{ugxListChangePage} -\index{pages!ugxListChangePage!list.ht} -\index{list.ht!pages!ugxListChangePage} -\index{ugxListChangePage!list.ht!pages} +\pagehead{ugxListChangePage}{list.ht}{Changing List Elements} <>= \begin{page}{ugxListChangePage}{Changing List Elements} \beginscroll @@ -14682,16 +13521,7 @@ It changed too! \end{page} @ -<>= -\newcommand{\ugxListOtherTitle}{Other Functions} -\newcommand{\ugxListOtherNumber}{9.47.4.} - -@ -\subsection{Other Functions} -\label{ugxListOtherPage} -\index{pages!ugxListOtherPage!list.ht} -\index{list.ht!pages!ugxListOtherPage} -\index{ugxListOtherPage!list.ht!pages} +\pagehead{ugxListOtherPage}{list.ht}{Other Functions} <>= \begin{page}{ugxListOtherPage}{Other Functions} \beginscroll @@ -14742,16 +13572,7 @@ list \spad{k}.\footnote{\spad{reverse(rest(reverse(k)))} works.} \end{page} @ -<>= -\newcommand{\ugxListDotTitle}{Dot, Dot} -\newcommand{\ugxListDotNumber}{9.47.5.} - -@ -\subsection{Dot, Dot} -\label{ugxListDotPage} -\index{pages!ugxListDotPage!list.ht} -\index{list.ht!pages!ugxListDotPage} -\index{ugxListDotPage!list.ht!pages} +\pagehead{ugxListDotPage}{list.ht}{Dot, Dot} <>= \begin{page}{ugxListDotPage}{Dot, Dot} \beginscroll @@ -14792,27 +13613,17 @@ See \downlink{`Stream'}{StreamXmpPage}\ignore{Stream} for more information. @ \section{lodo.ht} -<>= -\newcommand{\LinearOrdinaryDifferentialOperatorXmpTitle}{LinearOrdinaryDifferentialOperator} -\newcommand{\LinearOrdinaryDifferentialOperatorXmpNumber}{9.44} - -@ -\subsection{LinearOrdinaryDifferentialOperator} -\label{LinearOrdinaryDifferentialOperatorXmpPage} -See ugxLinearOrdinaryDifferentialOperatorSeriesPage -\ref{ugxLinearOrdinaryDifferentialOperatorSeriesPage} on -page~\pageref{ugxLinearOrdinaryDifferentialOperatorSeriesPage} -\index{pages!LinearOrdinaryDifferentialOperatorXmpPage!lodo.ht} -\index{lodo.ht!pages!LinearOrdinaryDifferentialOperatorXmpPage} -\index{LinearOrdinaryDifferentialOperatorXmpPage!lodo.ht!pages} +\pagehead{LinearOrdinaryDifferentialOperatorXmpPage}{lodo.ht} +{LinearOrdinaryDifferentialOperator} +\pageto{notitle}{ugxLinearOrdinaryDifferentialOperatorSeriesPage} <>= \begin{page}{LinearOrdinaryDifferentialOperatorXmpPage} {LinearOrdinaryDifferentialOperator} \beginscroll -\spadtype{LinearOrdinaryDifferentialOperator(A, diff)} is the domain of linear -ordinary differential operators with coefficients in a ring -\spad{A} with a given derivation. +\spadtype{LinearOrdinaryDifferentialOperator(A, diff)} is the +domain of linear ordinary differential operators with coefficients +in a ring \spad{A} with a given derivation. %This includes the cases of operators which are polynomials in \spad{D} %acting upon scalar or vector expressions of a single variable. %The coefficients of the operator polynomials can be integers, rational @@ -14820,7 +13631,7 @@ ordinary differential operators with coefficients in a ring \showBlurb{LinearOrdinaryDifferentialOperator} \beginmenu - \menudownlink{{9.44.1. Differential Operators with Series Coefficients}} +menudownlink{{9.44.1. Differential Operators with Series Coefficients}} {ugxLinearOrdinaryDifferentialOperatorSeriesPage} \endmenu \endscroll @@ -14828,16 +13639,8 @@ ordinary differential operators with coefficients in a ring \end{page} @ -<>= -\newcommand{\ugxLinearOrdinaryDifferentialOperatorSeriesTitle}{Differential Operators with Series Coefficients} -\newcommand{\ugxLinearOrdinaryDifferentialOperatorSeriesNumber}{9.44.1.} - -@ -\subsection{Differential Operators with Series Coefficients} -\label{ugxLinearOrdinaryDifferentialOperatorSeriesPage} -\index{pages!ugxLinearOrdinaryDifferentialOperatorSeriesPage!lodo.ht} -\index{lodo.ht!pages!ugxLinearOrdinaryDifferentialOperatorSeriesPage} -\index{ugxLinearOrdinaryDifferentialOperatorSeriesPage!lodo.ht!pages} +\pagehead{ugxLinearOrdinaryDifferentialOperatorSeriesPage}{lodo.ht} +{Differential Operators with Series Coefficients} <>= \begin{page}{ugxLinearOrdinaryDifferentialOperatorSeriesPage} {Differential Operators with Series Coefficients} @@ -14845,7 +13648,8 @@ ordinary differential operators with coefficients in a ring \noindent {\bf Problem:} -Find the first few coefficients of \spad{exp(x)/x**i} of \spad{Dop phi} where +Find the first few coefficients of \spad{exp(x)/x**i} of \spad{Dop phi} +where \begin{verbatim} Dop := D**3 + G/x**2 * D + H/x**3 - 1 phi := sum(s[i]*exp(x)/x**i, i = 0..) @@ -14873,7 +13677,8 @@ Now define the differential operator \spad{Dop}. } \xtc{ }{ -\spadpaste{phi == reduce(+,[subscript(s,[i])*exp(x)/x**i for i in 0..n]) \bound{phi}} +\spadpaste{phi == reduce(+,[subscript(s,[i])*exp(x)/x**i for i in 0..n]) +\bound{phi}} } \xtc{ }{ @@ -14893,11 +13698,13 @@ Now define the differential operator \spad{Dop}. } \xtc{ }{ -\spadpaste{pans1 == [coefficient(pans, (n+3-i) :: NNI) for i in 2..n+1] \bound{pans1}\free{pans}} +\spadpaste{pans1 == [coefficient(pans, (n+3-i) :: NNI) for i in 2..n+1] +\bound{pans1}\free{pans}} } \xtc{ }{ -\spadpaste{leq == solve(pans1,[subscript(s,[i]) for i in 1..n]) \bound{leq}\free{pans1}} +\spadpaste{leq == solve(pans1,[subscript(s,[i]) for i in 1..n]) +\bound{leq}\free{pans1}} } \xtc{ Evaluate this for several values of \spad{n}. @@ -14927,27 +13734,17 @@ Evaluate this for several values of \spad{n}. @ \section{lodo1.ht} -<>= -\newcommand{\LinearOrdinaryDifferentialOperatorOneXmpTitle}{LinearOrdinaryDifferentialOperator1} -\newcommand{\LinearOrdinaryDifferentialOperatorOneXmpNumber}{9.45} - -@ -\subsection{LinearOrdinaryDifferentialOperator1} -\label{LinearOrdinaryDifferentialOperatorOneXmpPage} -See ugxLinearOrdinaryDifferentialOperatorOneRatPage -\ref{ugxLinearOrdinaryDifferentialOperatorOneRatPage} on -page~\pageref{ugxLinearOrdinaryDifferentialOperatorOneRatPage} -\index{pages!LinearOrdinaryDifferentialOperatorOneXmpPage!lodo1.ht} -\index{lodo1.ht!pages!LinearOrdinaryDifferentialOperatorOneXmpPage} -\index{LinearOrdinaryDifferentialOperatorOneXmpPage!lodo1.ht!pages} +\pagehead{LinearOrdinaryDifferentialOperatorOneXmpPage}{lodo1.ht} +{LinearOrdinaryDifferentialOperator1} +\pageto{notitle}{ugxLinearOrdinaryDifferentialOperatorOneRatPage} <>= \begin{page}{LinearOrdinaryDifferentialOperatorOneXmpPage} {LinearOrdinaryDifferentialOperator1} \beginscroll -\spadtype{LinearOrdinaryDifferentialOperator1(A)} is the domain of linear -ordinary differential operators with coefficients in the differential ring -\spad{A}. +\spadtype{LinearOrdinaryDifferentialOperator1(A)} is the domain of +linear ordinary differential operators with coefficients in the +differential ring \spad{A}. %This includes the cases of operators which are polynomials in \spad{D} %acting upon scalar or vector expressions of a single variable. %The coefficients of the operator polynomials can be integers, rational @@ -14963,16 +13760,9 @@ ordinary differential operators with coefficients in the differential ring \autobuttons \end{page} -<>= -\newcommand{\ugxLinearOrdinaryDifferentialOperatorOneRatTitle}{Differential Operators with Rational Function Coefficients} -\newcommand{\ugxLinearOrdinaryDifferentialOperatorOneRatNumber}{9.45.1.} - @ -\subsection{Differential Operators with Rational Function Coefficients} -\label{ugxLinearOrdinaryDifferentialOperatorOneRatPage} -\index{pages!ugxLinearOrdinaryDifferentialOperatorOneRatPage!lodo1.ht} -\index{lodo1.ht!pages!ugxLinearOrdinaryDifferentialOperatorOneRatPage} -\index{ugxLinearOrdinaryDifferentialOperatorOneRatPage!lodo1.ht!pages} +\pagehead{ugxLinearOrdinaryDifferentialOperatorOneRatPage}{lodo1.ht} +{Differential Operators with Rational Function Coefficients} <>= \begin{page}{ugxLinearOrdinaryDifferentialOperatorOneRatPage} {Differential Operators with Rational Function Coefficients} @@ -15019,10 +13809,10 @@ not commutative. \spadpaste{(a*b - b*a) p \free{a b p}} } -When the coefficients of operator polynomials come from a field, as in this -case, it is possible to define operator division. -Division on the left and division on the right yield different results when -the multiplication is non-commutative. +When the coefficients of operator polynomials come from a field, as in +this case, it is possible to define operator division. Division on +the left and division on the right yield different results when the +multiplication is non-commutative. The results of \spadfunFrom{leftDivide}{LinearOrdinaryDifferentialOperator1} and @@ -15033,7 +13823,8 @@ quotient-remainder pairs satisfying: \newline \spad{rightDivide(a,b) = [q, r]} such that \spad{a = q*b + r} \newline % \xtc{ -In both cases, the \spadfunFrom{degree}{LinearOrdinaryDifferentialOperator1} +In both cases, the +\spadfunFrom{degree}{LinearOrdinaryDifferentialOperator1} of the remainder, \spad{r}, is less than the degree of \spad{b}. }{ @@ -15077,7 +13868,8 @@ are also available. \xtc{ For exact division, the operations \spadfunFrom{leftExactQuotient}{LinearOrdinaryDifferentialOperator1} and -\spadfunFrom{rightExactQuotient}{LinearOrdinaryDifferentialOperator1} are supplied. +\spadfunFrom{rightExactQuotient}{LinearOrdinaryDifferentialOperator1} +are supplied. These return the quotient but only if the remainder is zero. The call \spad{rightExactQuotient(a,b)} would yield an error. }{ @@ -15085,11 +13877,14 @@ The call \spad{rightExactQuotient(a,b)} would yield an error. } \xtc{ -The division operations allow the computation of left and right greatest -common divisors (\spadfunFrom{leftGcd}{LinearOrdinaryDifferentialOperator1} and -\spadfunFrom{rightGcd}{LinearOrdinaryDifferentialOperator1}) via remainder -sequences, and consequently the computation of left and right least common -multiples (\spadfunFrom{rightLcm}{LinearOrdinaryDifferentialOperator1} and +The division operations allow the computation of left and right +greatest common divisors +(\spadfunFrom{leftGcd}{LinearOrdinaryDifferentialOperator1} and +\spadfunFrom{rightGcd}{LinearOrdinaryDifferentialOperator1}) via +remainder sequences, and consequently the computation of left and +right least common +multiples (\spadfunFrom{rightLcm}{LinearOrdinaryDifferentialOperator1} +and \spadfunFrom{leftLcm}{LinearOrdinaryDifferentialOperator1}). }{ \spadpaste{e := leftGcd(a,b) \bound{e}\free{a b}} @@ -15128,63 +13923,42 @@ is not necessarily divisible from both sides. @ \section{lodo2.ht} +\pagehead{LinearODEOperatorTwoXmpPage}{lodo2.ht} +{LinearOrdinaryDifferentialOperator2} +\pageto{notitle}{ugxLinearODEOperatorTwoConstPage} +\pageto{notitle}{ugxLinearODEOperatorTwoMatrixPage} <>= -\newcommand{\LinearOrdinaryDifferentialOperatorTwoXmpTitle}{LinearOrdinaryDifferentialOperator2} -\newcommand{\LinearOrdinaryDifferentialOperatorTwoXmpNumber}{9.46} - -@ -\subsection{LinearOrdinaryDifferentialOperator2} -\label{LinearOrdinaryDifferentialOperatorTwoXmpPage} -\begin{itemize} -\item ugxLinearOrdinaryDifferentialOperatorTwoConstPage -\ref{ugxLinearOrdinaryDifferentialOperatorTwoConstPage} on -page~\pageref{ugxLinearOrdinaryDifferentialOperatorTwoConstPage} -\item ugxLinearOrdinaryDifferentialOperatorTwoMatrixPage -\ref{ugxLinearOrdinaryDifferentialOperatorTwoMatrixPage} on -page~\pageref{ugxLinearOrdinaryDifferentialOperatorTwoMatrixPage} -\end{itemize} -\index{pages!LinearOrdinaryDifferentialOperatorTwoXmpPage!lodo2.ht} -\index{lodo2.ht!pages!LinearOrdinaryDifferentialOperatorTwoXmpPage} -\index{LinearOrdinaryDifferentialOperatorTwoXmpPage!lodo2.ht!pages} -<>= -\begin{page}{LinearOrdinaryDifferentialOperatorTwoXmpPage} +\begin{page}{LinearODEOperatorTwoXmpPage} {LinearOrdinaryDifferentialOperator2} \beginscroll -\spadtype{LinearOrdinaryDifferentialOperator2(A, M)} is the domain of linear -ordinary differential operators with coefficients in the differential ring -\spad{A} and operating on \spad{M}, an \spad{A}-module. -This includes the cases of operators which are polynomials in \spad{D} -acting upon scalar or vector expressions of a single variable. -The coefficients of the operator polynomials can be integers, rational -functions, matrices or elements of other domains. +\spadtype{LinearOrdinaryDifferentialOperator2(A, M)} is the domain of +linear ordinary differential operators with coefficients in the +differential ring \spad{A} and operating on \spad{M}, an +\spad{A}-module. This includes the cases of operators which are +polynomials in \spad{D} acting upon scalar or vector expressions of a +single variable. The coefficients of the operator polynomials can be +integers, rational functions, matrices or elements of other domains. \showBlurb{LinearOrdinaryDifferentialOperator2} \beginmenu \menudownlink{ {9.46.1. Differential Operators with Constant Coefficients}} -{ugxLinearOrdinaryDifferentialOperatorTwoConstPage} +{ugxLinearODEOperatorTwoConstPage} \menudownlink{ -{9.46.2. Differential Operators with Matrix Coefficients Operating on Vectors}} -{ugxLinearOrdinaryDifferentialOperatorTwoMatrixPage} +{9.46.2. +Differential Operators with Matrix Coefficients Operating on Vectors}} +{ugxLinearODEOperatorTwoMatrixPage} \endmenu \endscroll \autobuttons \end{page} @ +\pagehead{ugxLinearODEOperatorTwoConstPage}{lodo2.ht} +{Differential Operators with Constant Coefficients} <>= -\newcommand{\ugxLinearOrdinaryDifferentialOperatorTwoConstTitle}{Differential Operators with Constant Coefficients} -\newcommand{\ugxLinearOrdinaryDifferentialOperatorTwoConstNumber}{9.46.1.} - -@ -\subsection{Differential Operators with Constant Coefficients} -\label{ugxLinearOrdinaryDifferentialOperatorTwoConstPage} -\index{pages!ugxLinearOrdinaryDifferentialOperatorTwoConstPage!lodo2.ht} -\index{lodo2.ht!pages!ugxLinearOrdinaryDifferentialOperatorTwoConstPage} -\index{ugxLinearOrdinaryDifferentialOperatorTwoConstPage!lodo2.ht!pages} -<>= -\begin{page}{ugxLinearOrdinaryDifferentialOperatorTwoConstPage} +\begin{page}{ugxLinearODEOperatorTwoConstPage} {Differential Operators with Constant Coefficients} \beginscroll @@ -15253,18 +14027,10 @@ Finally, note that operator expressions may be applied directly. \end{page} @ +\pagehead{ugxLinearODEOperatorTwoMatrixPage}{lodo2.ht} +{Differential Operators with Matrix Coefficients Operating on Vectors} <>= -\newcommand{\ugxLinearOrdinaryDifferentialOperatorTwoMatrixTitle}{Differential Operators with Matrix Coefficients Operating on Vectors} -\newcommand{\ugxLinearOrdinaryDifferentialOperatorTwoMatrixNumber}{9.46.2.} - -@ -\subsection{Differential Operators with Matrix Coefficients Operating on Vectors} -\label{ugxLinearOrdinaryDifferentialOperatorTwoMatrixPage} -\index{pages!ugxLinearOrdinaryDifferentialOperatorTwoMatrixPage!lodo2.ht} -\index{lodo2.ht!pages!ugxLinearOrdinaryDifferentialOperatorTwoMatrixPage} -\index{ugxLinearOrdinaryDifferentialOperatorTwoMatrixPage!lodo2.ht!pages} -<>= -\begin{page}{ugxLinearOrdinaryDifferentialOperatorTwoMatrixPage} +\begin{page}{ugxLinearODEOperatorTwoMatrixPage} {Differential Operators with Matrix Coefficients Operating on Vectors} \beginscroll @@ -15303,11 +14069,13 @@ The operators act on the vectors considered as a \spad{Mat}-module. The matrix \spad{m} is used as a coefficient and the vectors \spad{p} and \spad{q} are operated upon. }{ -\spadpaste{m:Mat := matrix [[x**2,1,0],[1,x**4,0],[0,0,4*x**2]]\free{Mat}\bound{m}} +\spadpaste{m:Mat := matrix [[x**2,1,0],[1,x**4,0],[0,0,4*x**2]] +\free{Mat}\bound{m}} } \xtc{ }{ -\spadpaste{p:Vect := directProduct [3*x**2+1,2*x,7*x**3+2*x]\free{Vect}\bound{p}} +\spadpaste{p:Vect := directProduct [3*x**2+1,2*x,7*x**3+2*x] +\free{Vect}\bound{p}} } \xtc{ }{ @@ -15349,19 +14117,9 @@ These operators can be applied to vector values. @ \section{lpoly.ht} -<>= -\newcommand{\LiePolynomialXmpTitle}{LiePolynomial} -\newcommand{\LiePolynomialXmpNumber}{9.43} - -@ -\subsection{LiePolynomial} -\label{LiePolynomialXmpPage} -\index{pages!LiePolynomialXmpPage!lpoly.ht} -\index{lpoly.ht!pages!LiePolynomialXmpPage} -\index{LiePolynomialXmpPage!lpoly.ht!pages} +\pagehead{LiePolynomialXmpPage}{lpoly.ht}{LiePolynomial} <>= \begin{page}{LiePolynomialXmpPage}{LiePolynomial} -% ===================================================================== \beginscroll Declaration of domains \xtc{ @@ -15417,11 +14175,13 @@ Initialisation \xtc{ All the Lyndon words of order 4 }{ -\spadpaste{liste : List Lword := LyndonWordsList([a,b], 4) \free{a} \free{b} \free{Lword} \bound{liste}} +\spadpaste{liste : List Lword := LyndonWordsList([a,b], 4) \free{a} +\free{b} \free{Lword} \bound{liste}} } \xtc{ }{ -\spadpaste{r: Lpoly := p + q + 3*LiePoly(liste.4)$Lpoly \bound{r} \free{Lpoly} \free{p} \free{q} \free{liste}} +\spadpaste{r: Lpoly := p + q + 3*LiePoly(liste.4)$Lpoly \bound{r} +\free{Lpoly} \free{p} \free{q} \free{liste}} } \xtc{ }{ @@ -15429,7 +14189,8 @@ All the Lyndon words of order 4 } \xtc{ }{ -\spadpaste{t:Lpoly := s + 2*LiePoly(liste.3) - 5*LiePoly(liste.5) \bound{t} \free{Lpoly} \free{s} \free{liste} } +\spadpaste{t:Lpoly := s + 2*LiePoly(liste.3) - 5*LiePoly(liste.5) +\bound{t} \free{Lpoly} \free{s} \free{liste} } } \xtc{ }{ @@ -15443,7 +14204,9 @@ All the Lyndon words of order 4 Jacobi Relation \xtc{ }{ -\spadpaste{Jacobi(p: Lpoly, q: Lpoly, r: Lpoly): Lpoly == [[p,q]$Lpoly, r] + [[q,r]$Lpoly, p] + [[r,p]$Lpoly, q] \free{Lpoly} \bound{J}} +\spadpaste{Jacobi(p: Lpoly, q: Lpoly, r: Lpoly): +Lpoly == [[p,q]$Lpoly, r] + [[q,r]$Lpoly, p] + +[[r,p]$Lpoly, q] \free{Lpoly} \bound{J}} } Tests @@ -15475,11 +14238,13 @@ Evaluation } \xtc{ }{ -\spadpaste{r1: Lpoly := eval(r, [a,b,c], [bb, cc, aa])$Lpoly \free{rr a b c aa bb cc Lpoly} \bound{r1}} +\spadpaste{r1: Lpoly := eval(r, [a,b,c], [bb, cc, aa])$Lpoly +\free{rr a b c aa bb cc Lpoly} \bound{r1}} } \xtc{ }{ -\spadpaste{r2: Lpoly := eval(r, [a,b,c], [cc, aa, bb])$Lpoly \free{rr a b c cc bb aa Lpoly} \bound{r2}} +\spadpaste{r2: Lpoly := eval(r, [a,b,c], [cc, aa, bb])$Lpoly +\free{rr a b c cc bb aa Lpoly} \bound{r2}} } \xtc{ }{ @@ -15493,16 +14258,7 @@ Evaluation @ \section{lword.ht} -<>= -\newcommand{\LyndonWordXmpTitle}{LyndonWord} -\newcommand{\LyndonWordXmpNumber}{9.48} - -@ -\subsection{LyndonWord} -\label{LyndonWordXmpPage} -\index{pages!LyndonWordXmpPage!lword.ht} -\index{lword.ht!pages!LyndonWordXmpPage} -\index{LyndonWordXmpPage!lword.ht!pages} +\pagehead{LyndonWordXmpPage}{lword.ht}{LyndonWord} <>= \begin{page}{LyndonWordXmpPage}{LyndonWord} \beginscroll @@ -15534,17 +14290,20 @@ Initialisations \xtc{ All Lyndon words of with a, b, c to order 3 }{ -\spadpaste{LyndonWordsList1([a,b,c],3)$lword \free{lword} \free{a} \free{b} \free{c} } +\spadpaste{LyndonWordsList1([a,b,c],3)$lword \free{lword} \free{a} +\free{b} \free{c} } } \xtc{ All Lyndon words of with a, b, c to order 3 in flat list }{ -\spadpaste{LyndonWordsList([a,b,c],3)$lword \free{a} \free{b} \free{c} \free{lword}} +\spadpaste{LyndonWordsList([a,b,c],3)$lword \free{a} \free{b} +\free{c} \free{lword}} } \xtc{ All Lyndon words of with a, b to order 5 }{ -\spadpaste{lw := LyndonWordsList([a,b],5)$lword \free{a} \free{b} \free{lword} \bound{lw}} +\spadpaste{lw := LyndonWordsList([a,b],5)$lword \free{a} \free{b} +\free{lword} \bound{lw}} } \xtc{ }{ @@ -15608,16 +14367,7 @@ Checks and coercions @ \section{magma.ht} -<>= -\newcommand{\MagmaXmpTitle}{Magma} -\newcommand{\MagmaXmpNumber}{9.49} - -@ -\subsection{Magma} -\label{MagmaXmpPage} -\index{pages!MagmaXmpPage!magma.ht} -\index{magma.ht!pages!MagmaXmpPage} -\index{MagmaXmpPage!magma.ht!pages} +\pagehead{MagmaXmpPage}{magma.ht}{Magma} <>= \begin{page}{MagmaXmpPage}{Magma} \beginscroll @@ -15727,18 +14477,10 @@ Check ordering @ \section{man0.ht} -\subsection{Reference Search} -\label{RefSearchPage} -\includegraphics[scale=.5]{ps/v71refsearchpage.eps} -\index{images!refsearchpage} - -Called from ``Reference'' (TopReferencePage) -\ref{TopReferencePage} on page~\pageref{TopReferencePage} - -See ``Search'' (ugSysCmdPage) \ref{ugSysCmdPage} on page~\pageref{ugSysCmdPage} -\index{pages!RefSearchPage!man0.ht} -\index{man0.ht!pages!RefSearchPage} -\index{RefSearchPage!man0.ht!pages} +\pagehead{RefSearchPage}{man0.ht}{Reference Search} +\pagepic{ps/v71refsearchpage.eps}{refsearchpage} +\pagefrom{Reference}{TopReferencePage} +\pageto{Search}{ugSysCmdPage} <>= \begin{page}{RefSearchPage}{Reference Search} \beginscroll @@ -15754,18 +14496,10 @@ Enter search string : \end{page} @ -\subsection{Axiom Browser} -\label{Man0Page} -\includegraphics[scale=.5]{ps/v71man0page.eps} -\index{images!man0page} - -Called from ``Root Page'' (RootPage) \ref{RootPage} on page~\pageref{RootPage} - -See ``Commands'' (ugSysCmdPage) -\ref{ugSysCmdPage} on page~\pageref{ugSysCmdPage} -\index{pages!Man0Page!man0.ht} -\index{man0.ht!pages!Man0Page} -\index{Man0Page!man0.ht!pages} +\pagehead{Man0Page}{man0.ht}{Axiom Browser} +\pagepic{ps/v71man0page.eps}{man0page} +\pagefrom{Root Page}{RootPage} +\pageto{Commands}{ugSysCmdPage} <>= \begin{page}{Man0Page}{A x i o m \ B r o w s e r} @@ -15801,7 +14535,8 @@ Enter search string (use {\em *} for wild card unless counter-indicated): \horizontalline \menuunixlink{Reference} {htsearch "\stringvalue{pattern}"} - \tab{15} Search Reference documentation ({\em *} wild card is not accepted). + \tab{15} Search Reference documentation ({\em *} wild card +is not accepted). \menumemolink{Commands}{ugSysCmdPage} \tab{15} View system command documentation. \endmenu @@ -15810,19 +14545,17 @@ Enter search string (use {\em *} for wild card unless counter-indicated): \end{page} @ -\subsection{The Hyperdoc Browse Facility} -\label{BROWSEhelp} -\index{pages!BROWSEhelp!man0.ht} -\index{man0.ht!pages!BROWSEhelp} -\index{BROWSEhelp!man0.ht!pages} +\pagehead{BROWSEhelp}{man0.ht}{The Hyperdoc Browse Facility} <>= \begin{page}{BROWSEhelp}{The Hyperdoc Browse Facility} \beginscroll \beginmenu - \menudownlink{{The Front Page: Searching the Library}}{ugBrowseStartPage} + \menudownlink{{The Front Page: Searching the Library}} +{ugBrowseStartPage} \menudownlink{{The Constructor Page}}{ugBrowseDomainPage} - \menudownlink{{Miscellaneous Features of Browse}}{ugBrowseMiscellaneousFeaturesPage} + \menudownlink{{Miscellaneous Features of Browse}} +{ugBrowseMiscellaneousFeaturesPage} \endmenu \endscroll \newline @@ -15830,11 +14563,7 @@ Enter search string (use {\em *} for wild card unless counter-indicated): @ \section{mapping.ht} -\subsection{Domain {\bf Mapping(T,S,...)}} -\label{DomainMapping} -\index{pages!DomainMapping!mapping.ht} -\index{mapping.ht!pages!DomainMapping} -\index{DomainMapping!mapping.ht!pages} +\pagehead{DomainMapping}{mapping.ht}{Domain {\bf Mapping(T,S,...)}} <>= \begin{page}{DomainMapping}{Domain {\em Mapping(T,S,...)}} \beginscroll @@ -15860,11 +14589,8 @@ This constructor is a primitive in Axiom. \endscroll\end{page} @ -\subsection{Domain Constructor {\bf Mapping}} -\label{MappingDescription} -\index{pages!MappingDescription!mapping.ht} -\index{mapping.ht!pages!MappingDescription} -\index{MappingDescription!mapping.ht!pages} +\pagehead{MappingDescription}{mapping.ht} +{Domain Constructor {\bf Mapping}} <>= \begin{page}{MappingDescription}{Domain Constructor {\em Mapping}} \beginscroll @@ -15893,16 +14619,7 @@ defined in the Axiom language. @ \section{mappkg1.ht} -<>= -\newcommand{\MappingPackageOneXmpTitle}{MappingPackage1} -\newcommand{\MappingPackageOneXmpNumber}{9.51} - -@ -\subsection{MappingPackage1} -\label{MappingPackageOneXmpPage} -\index{pages!MappingPackageOneXmpPage!mappkg1.ht} -\index{mappkg1.ht!pages!MappingPackageOneXmpPage} -\index{MappingPackageOneXmpPage!mappkg1.ht!pages} +\pagehead{MappingPackageOneXmpPage}{mappkg1.ht}{MappingPackage1} <>= \begin{page}{MappingPackageOneXmpPage}{MappingPackage1} \beginscroll @@ -15947,7 +14664,8 @@ The \spadfunFrom{curryRight}{MappingPackage3} operation creates a unary function from a binary one by providing a constant argument on the right. }{ -\spadpaste{square:= curryRight(power, 2) \free{squaredec poswer}\bound{square}} +\spadpaste{square:= curryRight(power, 2) \free{squaredec poswer} +\bound{square}} } \xtc{ Likewise, the @@ -15962,16 +14680,19 @@ The \spadfunFrom{constantRight}{MappingPackage3} operation creates \spad{constantRight(f)} is the function \spad{g} such that \spad{g(a,b)= f(a).} }{ -\spadpaste{squirrel:= constantRight(square)\$MAPPKG3(FRAC INT,FRAC INT,FRAC INT) \free{square}\bound{squirrel}} +\spadpaste{squirrel:= constantRight(square)\$MAPPKG3(FRAC INT, +FRAC INT,FRAC INT) \free{square}\bound{squirrel}} } \xtc{ Likewise, -\spad{constantLeft(f)} is the function \spad{g} such that \spad{g(a,b)= f(b).} +\spad{constantLeft(f)} is the function \spad{g} such that +\spad{g(a,b)= f(b).} }{ \spadpaste{squirrel(1/2, 1/3) \free{squirrel}} } \xtc{ -The \spadfunFrom{curry}{MappingPackage2} operation makes a unary function nullary. +The \spadfunFrom{curry}{MappingPackage2} operation makes a +unary function nullary. }{ \spadpaste{sixteen := curry(square, 4/1) \free{square}\bound{sixteen}} } @@ -16057,7 +14778,8 @@ By currying over the argument we get a function with private state. } \xtc{ }{ -\spadpaste{fibs := curry(shiftfib, fibinit) \free{shiftfib fibinit}\bound{fibs}} +\spadpaste{fibs := curry(shiftfib, fibinit) +\free{shiftfib fibinit}\bound{fibs}} } \xtc{ }{ @@ -16069,16 +14791,7 @@ By currying over the argument we get a function with private state. @ \section{mset.ht} -<>= -\newcommand{\MultiSetXmpTitle}{MultiSet} -\newcommand{\MultiSetXmpNumber}{9.53} - -@ -\subsection{MultiSet} -\label{MultiSetXmpPage} -\index{pages!MultiSetXmpPage!mset.ht} -\index{mset.ht!pages!MultiSetXmpPage} -\index{MultiSetXmpPage!mset.ht!pages} +\pagehead{MultiSetXmpPage}{mset.ht}{MultiSet} <>= \begin{page}{MultiSetXmpPage}{MultiSet} \beginscroll @@ -16160,7 +14873,8 @@ the \spadfun{intersect} equals the \spadfun{union} of the elements. \xtc{ Check some inclusion relations. }{ -\spadpaste{t1 := multiset [1,2,2,3]; [t1 < t, t1 < s, t < s, t1 <= s]\free{t s2}} +\spadpaste{t1 := multiset [1,2,2,3]; [t1 < t, t1 < s, t < s, t1 <= s] +\free{t s2}} } \endscroll \autobuttons @@ -16168,22 +14882,9 @@ Check some inclusion relations. @ \section{matrix.ht} -<>= -\newcommand{\MatrixXmpTitle}{Matrix} -\newcommand{\MatrixXmpNumber}{9.52} - -@ -\subsection{Matrix} -\label{MatrixXmpPage} -\begin{itemize} -\item ugxMatrixCreatePage \ref{ugxMatrixCreatePage} on -page~\pageref{ugxMatrixCreatePage} -\item ugxMatrixOpsPage \ref{ugxMatrixOpsPage} on -page~\pageref{ugxMatrixOpsPage} -\end{itemize} -\index{pages!MatrixXmpPage!matrix.ht} -\index{matrix.ht!pages!MatrixXmpPage} -\index{MatrixXmpPage!matrix.ht!pages} +\pagehead{MatrixXmpPage}{matrix.ht}{Matrix} +\pageto{notitle}{ugxMatrixCreatePage} +\pageto{notitle}{ugxMatrixOpsPage} <>= \begin{page}{MatrixXmpPage}{Matrix} \beginscroll @@ -16202,16 +14903,7 @@ that the entries for \spadtype{Matrix} must belong to a \spadtype{Ring}. \end{page} @ -<>= -\newcommand{\ugxMatrixCreateTitle}{Creating Matrices} -\newcommand{\ugxMatrixCreateNumber}{9.52.1.} - -@ -\subsection{Creating Matrices} -\label{ugxMatrixCreatePage} -\index{pages!ugxMatrixCreatePage!matrix.ht} -\index{matrix.ht!pages!ugxMatrixCreatePage} -\index{ugxMatrixCreatePage!matrix.ht!pages} +\pagehead{ugxMatrixCreatePage}{matrix.ht}{Creating Matrices} <>= \begin{page}{ugxMatrixCreatePage}{Creating Matrices} \beginscroll @@ -16347,8 +15039,8 @@ The two matrices must have the same number of columns. % \xtc{ The operation -\spadfunFrom{transpose}{Matrix} is used to create a new matrix by reflection -across the main diagonal. +\spadfunFrom{transpose}{Matrix} is used to create a new matrix by +reflection across the main diagonal. }{ \spadpaste{transpose vab \free{vab}} } @@ -16358,32 +15050,14 @@ across the main diagonal. \end{page} @ -<>= -\newcommand{\ugxMatrixOpsTitle}{Operations on Matrices} -\newcommand{\ugxMatrixOpsNumber}{9.52.2.} - -@ -\subsection{Operations on Matrices} -\label{ugxMatrixOpsPage} -\begin{itemize} -\item ugIntroTwoDimPage \ref{ugIntroTwoDimPage} on -page~\pageref{ugIntroTwoDimPage} -\item ugProblemEigenPage \ref{ugProblemEigenPage} on -page~\pageref{ugProblemEigenPage} -\item ugxFloatHilbertPage \ref{ugxFloatHilbertPage} on -page~\pageref{ugxFloatHilbertPage} -\item PermanentXmpPage \ref{PermanentXmpPage} on -page~\pageref{PermanentXmpPage} -\item VectorXmpPage \ref{VectorXmpPage} on -page~\pageref{VectorXmpPage} -\item OneDimensionalArrayXmpPage \ref{OneDimensionalArrayXmpPage} on -page~\pageref{OneDimensionalArrayXmpPage} -\item TwoDimensionalArrayXmpPage \ref{TwoDimensionalArrayXmpPage} on -page~\pageref{TwoDimensionalArrayXmpPage} -\end{itemize} -\index{pages!ugxMatrixOpsPage!matrix.ht} -\index{matrix.ht!pages!ugxMatrixOpsPage} -\index{ugxMatrixOpsPage!matrix.ht!pages} +\pagehead{ugxMatrixOpsPage}{matrix.ht}{Operations on Matrices} +\pageto{notitle}{ugIntroTwoDimPage} +\pageto{notitle}{ugProblemEigenPage} +\pageto{notitle}{ugxFloatHilbertPage} +\pageto{notitle}{PermanentXmpPage} +\pageto{notitle}{VectorXmpPage} +\pageto{notitle}{OneDimensionalArrayXmpPage} +\pageto{notitle}{TwoDimensionalArrayXmpPage} <>= \begin{page}{ugxMatrixOpsPage}{Operations on Matrices} \beginscroll @@ -16441,7 +15115,8 @@ the matrix is invertible, and returns \spad{"failed"} if not. \xtc{ This Hilbert matrix is invertible. }{ -\spadpaste{hilb := matrix([[1/(i + j) for i in 1..3] for j in 1..3]) \bound{hilb}} +\spadpaste{hilb := matrix([[1/(i + j) for i in 1..3] for j in 1..3]) +\bound{hilb}} } \xtc{ }{ @@ -16450,7 +15125,8 @@ This Hilbert matrix is invertible. \xtc{ This matrix is not invertible. }{ -\spadpaste{mm := matrix([[1,2,3,4], [5,6,7,8], [9,10,11,12], [13,14,15,16]]) \bound{mm}} +\spadpaste{mm := matrix([[1,2,3,4], [5,6,7,8], [9,10,11,12], +[13,14,15,16]]) \bound{mm}} } \xtc{ }{ @@ -16460,7 +15136,8 @@ This matrix is not invertible. The operation \spadfunFrom{determinant}{Matrix} computes the determinant of a matrix {Operations on Matrices} -provided that the entries of the matrix belong to a \spadtype{CommutativeRing}. +provided that the entries of the matrix belong to a +\spadtype{CommutativeRing}. \xtc{ The above matrix \spad{mm} is not invertible and, hence, must have determinant \spad{0}. @@ -16469,7 +15146,8 @@ determinant \spad{0}. } \xtc{ The operation -\spadfunFrom{trace}{SquareMatrix} computes the trace of a {\em square} matrix. +\spadfunFrom{trace}{SquareMatrix} computes the trace of a {\em square} +matrix. {Operations on Matrices} }{ \spadpaste{trace(mm) \free{mm}} @@ -16491,7 +15169,8 @@ a matrix: the dimension of its null space. \xtc{ The operation \spadfunFrom{nullSpace}{Matrix} returns a list containing a basis for the null space of a matrix. -Note that the nullity is the number of elements in a basis for the null space. +Note that the nullity is the number of elements in a basis for the null +space. }{ \spadpaste{nullSpace(mm) \free{mm}} } @@ -16507,13 +15186,18 @@ is also two. } For more information on related topics, see -\downlink{``\ugIntroTwoDimTitle''}{ugIntroTwoDimPage} in Section \ugIntroTwoDimNumber\ignore{ugIntroTwoDim}, -\downlink{``\ugProblemEigenTitle''}{ugProblemEigenPage} in Section \ugProblemEigenNumber\ignore{ugProblemEigen}, -\downlink{``\ugxFloatHilbertTitle''}{ugxFloatHilbertPage} in Section \ugxFloatHilbertNumber\ignore{ugxFloatHilbert}, +\downlink{``\ugIntroTwoDimTitle''}{ugIntroTwoDimPage} in +Section \ugIntroTwoDimNumber\ignore{ugIntroTwoDim}, +\downlink{``\ugProblemEigenTitle''}{ugProblemEigenPage} in +Section \ugProblemEigenNumber\ignore{ugProblemEigen}, +\downlink{``\ugxFloatHilbertTitle''}{ugxFloatHilbertPage} in +Section \ugxFloatHilbertNumber\ignore{ugxFloatHilbert}, \downlink{`Permanent'}{PermanentXmpPage}\ignore{Permanent}, \downlink{`Vector'}{VectorXmpPage}\ignore{Vector}, -\downlink{`OneDimensionalArray'}{OneDimensionalArrayXmpPage}\ignore{OneDimensionalArray}, and -\downlink{`TwoDimensionalArray'}{TwoDimensionalArrayXmpPage}\ignore{TwoDimensionalArray}. +\downlink{`OneDimensionalArray'}{OneDimensionalArrayXmpPage} +\ignore{OneDimensionalArray}, and +\downlink{`TwoDimensionalArray'}{TwoDimensionalArrayXmpPage} +\ignore{TwoDimensionalArray}. % \showBlurb{Matrix} \endscroll @@ -16522,17 +15206,8 @@ For more information on related topics, see @ \section{mkfunc.ht} -<>= -\newcommand{\MakeFunctionXmpTitle}{MakeFunction} -\newcommand{\MakeFunctionXmpNumber}{9.50} - -@ -\subsection{MakeFunction} -\label{MakeFunctionXmpPage} -See ugUserMakePage \ref{ugUserMakePage} on page~\pageref{ugUserMakePage} -\index{pages!MakeFunctionXmpPage!mkfunc.ht} -\index{mkfunc.ht!pages!MakeFunctionXmpPage} -\index{MakeFunctionXmpPage!mkfunc.ht!pages} +\pagehead{MakeFunctionXmpPage}{mkfunc.ht}{MakeFunction} +\pageto{notitle}{ugUserMakePage} <>= \begin{page}{MakeFunctionXmpPage}{MakeFunction} \beginscroll @@ -16546,7 +15221,8 @@ and that you now want to tabulate the numerical values of \spad{f} for \spad{x} between \spad{-1} and \spad{+1} with increment \spad{0.1}. }{ -\spadpaste{expr := (x - exp x + 1)**2 * (sin(x**2) * x + 1)**3 \bound{expr}} +\spadpaste{expr := (x - exp x + 1)**2 * (sin(x**2) * x + 1)**3 +\bound{expr}} } % You could, of course, use the function @@ -16616,26 +15292,13 @@ in Section \ugUserMakeNumber\ignore{ugUserMake}. @ \section{mpoly.ht} +\pagehead{MultivariatePolyXmpPage}{mpoly.ht} +{MultivariatePolynomial} +\pageto{notitle}{PolynomialXmpPage} +\pageto{notitle}{UnivariatePolyXmpPage} +\pageto{notitle}{DistributedMultivariatePolyXmpPage} <>= -\newcommand{\MultivariatePolynomialXmpTitle}{MultivariatePolynomial} -\newcommand{\MultivariatePolynomialXmpNumber}{9.54} - -@ -\subsection{MultivariatePolynomial} -\label{MultivariatePolynomialXmpPage} -\begin{itemize} -\item PolynomialXmpPage \ref{PolynomialXmpPage} on -page~\pageref{PolynomialXmpPage} -\item UnivariatePolynomialXmpPage \ref{UnivariatePolynomialXmpPage} on -page~\pageref{UnivariatePolynomialXmpPage} -\item DistributedMultivariatePolynomialXmpPage \ref{DistributedMultivariatePolynomialXmpPage} on -page~\pageref{DistributedMultivariatePolynomialXmpPage} -\end{itemize} -\index{pages!MultivariatePolynomialXmpPage!mpoly.ht} -\index{mpoly.ht!pages!MultivariatePolynomialXmpPage} -\index{MultivariatePolynomialXmpPage!mpoly.ht!pages} -<>= -\begin{page}{MultivariatePolynomialXmpPage}{MultivariatePolynomial} +\begin{page}{MultivariatePolyXmpPage}{MultivariatePolynomial} \beginscroll The domain constructor \spadtype{MultivariatePolynomial} is similar to @@ -16730,8 +15393,11 @@ manipulation and display of expressions via its conversion facility. For more information on related topics, see \downlink{`Polynomial'}{PolynomialXmpPage}\ignore{Polynomial}, -\downlink{`UnivariatePolynomial'}{UnivariatePolynomialXmpPage}\ignore{UnivariatePolynomial}, and -\downlink{`DistributedMultivariatePolynomial'}{DistributedMultivariatePolynomialXmpPage}\ignore{DistributedMultivariatePolynomial}. +\downlink{`UnivariatePolynomial'}{UnivariatePolyXmpPage} +\ignore{UnivariatePolynomial}, and +\downlink{`DistributedMultivariatePoly'} +{DistributedMultivariatePolyXmpPage} +\ignore{DistributedMultivariatePoly}. \showBlurb{MultivariatePolynomial} \endscroll \autobuttons @@ -16739,11 +15405,7 @@ For more information on related topics, see @ \section{newuser.ht} -\subsection{No More Help :-(} -\label{NoMoreHelpPage} -\index{pages!NoMoreHelpPage!newuser.ht} -\index{newuser.ht!pages!NoMoreHelpPage} -\index{NoMoreHelpPage!newuser.ht!pages} +\pagehead{NoMoreHelpPage}{newuser.ht}{No More Help :-(} <>= \begin{page}{NoMoreHelpPage}{No More Help :-(} \beginscroll\vspace{2} @@ -16753,16 +15415,9 @@ For more information on related topics, see \end{page} @ -\subsection{You Tried It!} -\label{YouTriedIt} -\includegraphics[scale=.5]{ps/v71youtriedit.eps} -\index{images!youtriedit} - -Called from ``Reference'' (TopReferencePage) -\ref{TopReferencePage} on page~\pageref{TopReferencePage} -\index{pages!YouTriedIt!newuser.ht} -\index{newuser.ht!pages!YouTriedIt} -\index{YouTriedIt!newuser.ht!pages} +\pagehead{YouTriedIt}{newuser.ht}{You Tried It!} +\pagepic{ps/v71youtriedit.eps}{youtriedit} +\pagefrom{Reference}{TopReferencePage} <>= \begin{page}{YouTriedIt}{You Tried It!} \beginscroll @@ -16772,16 +15427,7 @@ Called from ``Reference'' (TopReferencePage) @ \section{none.ht} -<>= -\newcommand{\NoneXmpTitle}{None} -\newcommand{\NoneXmpNumber}{9.55} - -@ -\subsection{None} -\label{NoneXmpPage} -\index{pages!NoneXmpPage!none.ht} -\index{none.ht!pages!NoneXmpPage} -\index{NoneXmpPage!none.ht!pages} +\pagehead{NoneXmpPage}{none.ht}{None} <>= \begin{page}{NoneXmpPage}{None} \beginscroll @@ -16812,61 +15458,27 @@ type directly, such as \spadtype{List NonNegativeInteger}, do it this way. @ \section{numbers.ht} -\subsection{Axiom Number Types} -\label{NumberPage} -\includegraphics[scale=.5]{ps/v71numberpage.eps} -\index{images!numberpage} - -Called from ``Topics'' (TopicPage) \ref{TopicPage} on page~\pageref{TopicPage} -\begin{itemize} -\item ``Integers'' (IntegerPage) \ref{IntegerPage} on -page~\pageref{IntegerPage} -\item ``Fractions'' (FractionPage) \ref{FractionPage} on -page~\pageref{FractionPage} -\item ``Machine Floats'' (DoubleFloatXmpPage) \ref{DoubleFloatXmpPage} on -page~\pageref{DoubleFloatXmpPage} -\item ``Real Numbers'' (FloatXmpPage) \ref{FloatXmpPage} on -page~\pageref{FloatXmpPage} -\item ``Complex Numbers'' (ComplexXmpPage) \ref{ComplexXmpPage} on -page~\pageref{ComplexXmpPage} -\item ``Finite Fields'' (ugProblemFinitePage) \ref{ugProblemFinitePage} on -page~\pageref{ugProblemFinitePage} -\item ``Numeric Functions'' (ugProblemNumericPage) -\ref{ugProblemNumericPage} on -page~\pageref{ugProblemNumericPage} -\item ``Cardinal Numbers'' (CardinalNumberXmpPage) -\ref{CardinalNumberXmpPage} on -page~\pageref{CardinalNumberXmpPage} -\item ``Machine-sized Integers'' (SingleIntegerXmpPage) -\ref{SingleIntegerXmpPage} on -page~\pageref{SingleIntegerXmpPage} -\item ``Roman Numerals'' (RomanNumeralXmpPage) \ref{RomanNumeralXmpPage} on -page~\pageref{RomanNumeralXmpPage} -\item ``Continued Fractions'' (ContinuedFractionXmpPage) -\ref{ContinuedFractionXmpPage} on -page~\pageref{ContinuedFractionXmpPage} -\item ``Partial Fractions'' (PartialFractionXmpPage) -\ref{PartialFractionXmpPage} on -page~\pageref{PartialFractionXmpPage} -\item ``Quaternions'' (QuaternionXmpPage) \ref{QuaternionXmpPage} on -page~\pageref{QuaternionXmpPage} -\item ``Octonions'' (OctonionXmpPage) \ref{OctonionXmpPage} on -page~\pageref{OctonionXmpPage} -\item ``Repeating Decimals'' (DecimalExpansionXmpPage) -\ref{DecimalExpansionXmpPage} on -page~\pageref{DecimalExpansionXmpPage} -\item ``Repeating Binary Expansions'' (BinaryExpansionXmpPage) -\ref{BinaryExpansionXmpPage} on -page~\pageref{BinaryExpansionXmpPage} -\item ``Repeating Hexadecimal Expansions'' (HexadecimalExpansionXmpPage) -\ref{HexadecimalExpansionXmpPage} on -page~\pageref{HexadecimalExpansionXmpPage} -\item ``Expansions in other Bases '' (RadixExpansionXmpPage) -\ref{RadixExpansionXmpPage} on page~\pageref{RadixExpansionXmpPage} -\end{itemize} -\index{pages!NumberPage!numbers.ht} -\index{numbers.ht!pages!NumberPage} -\index{NumberPage!numbers.ht!pages} +\pagehead{NumberPage}{numbers.ht}{Axiom Number Types} +\pagepic{ps/v71numberpage.eps}{numberpage} +\pagefrom{Topics}{TopicPage} +\pageto{Integers}{IntegerPage} +\pageto{Fractions}{FractionPage} +\pageto{Machine Floats}{DoubleFloatXmpPage} +\pageto{Real Numbers}{FloatXmpPage} +\pageto{Complex Numbers}{ComplexXmpPage} +\pageto{Finite Fields}{ugProblemFinitePage} +\pageto{Numeric Functions}{ugProblemNumericPage} +\pageto{Cardinal Numbers}{CardinalNumberXmpPage} +\pageto{Machine-sized Integers}{SingleIntegerXmpPage} +\pageto{Roman Numerals}{RomanNumeralXmpPage} +\pageto{Continued Fractions}{ContinuedFractionXmpPage} +\pageto{Partial Fractions}{PartialFractionXmpPage} +\pageto{Quaternions}{QuaternionXmpPage} +\pageto{Octonions}{OctonionXmpPage} +\pageto{Repeating Decimals}{DecimalExpansionXmpPage} +\pageto{Repeating Binary Expansions}{BinaryExpansionXmpPage} +\pageto{Repeating Hexadecimal Expansions}{HexExpansionXmpPage} +\pageto{Expansions in other Bases}{RadixExpansionXmpPage} <>= \begin{page}{NumberPage}{Axiom Number Types} \beginscroll @@ -16905,7 +15517,7 @@ Additional Topics \menulink{Octonions}{OctonionXmpPage} \menulink{Repeating Decimals}{DecimalExpansionXmpPage} \menulink{Repeating Binary Expansions}{BinaryExpansionXmpPage} -\menulink{Repeating Hexadecimal Expansions}{HexadecimalExpansionXmpPage} +\menulink{Repeating Hexadecimal Expansions}{HexExpansionXmpPage} \menulink{Expansions in other Bases}{RadixExpansionXmpPage} \endmenu @@ -16915,17 +15527,9 @@ Additional Topics \end{page} @ -\subsection{Fraction} -\label{FractionPage} -\begin{itemize} -\item RationalNumberPage \ref{RationalNumberPage} on -page~\pageref{RationalNumberPage} -\item FractionXmpPage \ref{FractionXmpPage} on -page~\pageref{FractionXmpPage} -\end{itemize} -\index{pages!FractionPage!numbers.ht} -\index{numbers.ht!pages!FractionPage} -\index{FractionPage!numbers.ht!pages} +\pagehead{FractionPage}{numbers.ht}{Fraction} +\pageto{notitle}{RationalNumberPage} +\pageto{notitle}{FractionXmpPage} <>= \begin{page}{FractionPage}{Fractions} @@ -16954,11 +15558,7 @@ Quotients over an arbitrary integral domain \end{page} @ -\subsection{Rational Number} -\label{RationalNumberPage} -\index{pages!RationalNumberPage!numbers.ht} -\index{numbers.ht!pages!RationalNumberPage} -\index{RationalNumberPage!numbers.ht!pages} +\pagehead{RationalNumberPage}{numbers.ht}{Rational Number} <>= \begin{page}{RationalNumberPage}{Rational Numbers} \beginscroll @@ -16984,24 +15584,12 @@ command: \end{page} @ -\subsection{Integers} -\label{IntegerPage} -\begin{itemize} -\item IntegerXmpPage \ref{IntegerXmpPage} on -page~\pageref{IntegerXmpPage} -\item ugxIntegerPrimesPage \ref{ugxIntegerPrimesPage} on -page~\pageref{ugxIntegerPrimesPage} -\item IntegerNumberTheoryFunctionsXmpPage -\ref{IntegerNumberTheoryFunctionsXmpPage} on -page~\pageref{IntegerNumberTheoryFunctionsXmpPage} -\item IntegerExamplePage \ref{IntegerExamplePage} on -page~\pageref{IntegerExamplePage} -\item IntegerProblemPage \ref{IntegerProblemPage} on -page~\pageref{IntegerProblemPage} -\end{itemize} -\index{pages!IntegerPage!numbers.ht} -\index{numbers.ht!pages!IntegerPage} -\index{IntegerPage!numbers.ht!pages} +\pagehead{IntegerPage}{numbers.ht}{Integers} +\pageto{notitle}{IntegerXmpPage} +\pageto{notitle}{ugxIntegerPrimesPage} +\pageto{notitle}{IntNumberTheoryFnsXmpPage} +\pageto{notitle}{IntegerExamplePage} +\pageto{notitle}{IntegerProblemPage} <>= \begin{page}{IntegerPage}{Integers} \beginscroll @@ -17028,7 +15616,7 @@ General information and examples of integers. \menulink{Factorization}{ugxIntegerPrimesPage} \tab{16} Primes and factorization. -\menulink{Functions}{IntegerNumberTheoryFunctionsXmpPage} \tab{16} +\menulink{Functions}{IntNumberTheoryFnsXmpPage} \tab{16} Number theoretic functions. \menulink{Examples}{IntegerExamplePage} \tab{16} @@ -17043,15 +15631,8 @@ Problems from number theory. \end{page} @ -\subsection{Integer Examples} -\label{IntegerExamplePage} -\begin{itemize} -\item IntegerExampleProofPage \ref{IntegerExampleProofPage} on -page~\pageref{IntegerExampleProofPage} -\end{itemize} -\index{pages!IntegerExamplePage!numbers.ht} -\index{numbers.ht!pages!IntegerExamplePage} -\index{IntegerExamplePage!numbers.ht!pages} +\pagehead{IntegerExamplePage}{numbers.ht}{Integer Examples} +\pageto{notitle}{IntegerExampleProofPage} <>= \begin{page}{IntegerExamplePage}{Integer Examples} \beginscroll @@ -17077,11 +15658,7 @@ Obviously, Fermat didn't have access to Axiom! \end{page} @ -\subsection{Integer Example Proof} -\label{IntegerExampleProofPage} -\index{pages!IntegerExampleProofPage!numbers.ht} -\index{numbers.ht!pages!IntegerExampleProofPage} -\index{IntegerExampleProofPage!numbers.ht!pages} +\pagehead{IntegerExampleProofPage}{numbers.ht}{Integer Example Proof} <>= \begin{page}{IntegerExampleProofPage}{Integer Example Proof} \beginscroll @@ -17103,19 +15680,10 @@ QED \end{page} @ -\subsection{Integer Problems} -\label{IntegerProblemPage} -\begin{itemize} -\item IntegerProblemProofPage \ref{IntegerProblemProofPage} on -page~\pageref{IntegerProblemProofPage} -\item IntegerProblemAnswerPage1 \ref{IntegerProblemAnswerPage1} on -page~\pageref{IntegerProblemAnswerPage1} -\item IntegerProblemAnswerPage2 \ref{IntegerProblemAnswerPage2} on -page~\pageref{IntegerProblemAnswerPage2} -\end{itemize} -\index{pages!IntegerProblemPage!numbers.ht} -\index{numbers.ht!pages!IntegerProblemPage} -\index{IntegerProblemPage!numbers.ht!pages} +\pagehead{IntegerProblemPage}{numbers.ht}{Integer Problems} +\pageto{notitle}{IntegerProblemProofPage} +\pageto{notitle}{IntegerProblemAnswerPage1} +\pageto{notitle}{IntegerProblemAnswerPage2} <>= \begin{page}{IntegerProblemPage}{Integer Problems} \beginscroll @@ -17134,11 +15702,7 @@ Problem \#2: Find the smallest positive integer \spad{n} such that \end{page} @ -\subsection{Integer Problem Proof} -\label{IntegerProblemProofPage} -\index{pages!IntegerProblemProofPage!numbers.ht} -\index{numbers.ht!pages!IntegerProblemProofPage} -\index{IntegerProblemProofPage!numbers.ht!pages} +\pagehead{IntegerProblemProofPage}{numbers.ht}{Integer Problem Proof} <>= \begin{page}{IntegerProblemProofPage}{Integer Problem Proof} \beginscroll @@ -17158,11 +15722,7 @@ QED \end{page} @ -\subsection{Solution to Problem \#1} -\label{IntegerProblemAnswerPage1} -\index{pages!IntegerProblemAnswerPage1!numbers.ht} -\index{numbers.ht!pages!IntegerProblemAnswerPage1} -\index{IntegerProblemAnswerPage1!numbers.ht!pages} +\pagehead{IntegerProblemAnswerPage1}{numbers.ht}{Solution to Problem \#1} <>= \begin{page}{IntegerProblemAnswerPage1}{Solution to Problem \#1} \beginscroll @@ -17181,7 +15741,8 @@ facility. (A stream is essentially an infinite sequence.) First, we create a stream consisting of the positive integers: \spadpaste{ints := [n for n in 1..] \bound{ints}} Now, we create a stream consisting of the primes: -\spadpaste{primes := [x for x in ints | prime? x] \bound{primes} \free{ints}} +\spadpaste{primes := [x for x in ints | prime? x] \bound{primes} +\free{ints}} Here's the 25th prime: \spadpaste{primes.25 \free{primes}} Next, create the stream of numbers of the form 2**p - 1 with p prime: @@ -17203,11 +15764,7 @@ is composite: \end{page} @ -\subsection{Solution to Problem \#2} -\label{IntegerProblemAnswerPage2} -\index{pages!IntegerProblemAnswerPage2!numbers.ht} -\index{numbers.ht!pages!IntegerProblemAnswerPage2} -\index{IntegerProblemAnswerPage2!numbers.ht!pages} +\pagehead{IntegerProblemAnswerPage2}{numbers.ht}{Solution to Problem \#2} <>= \begin{page}{IntegerProblemAnswerPage2}{Solution to Problem \#2} \beginscroll @@ -17228,18 +15785,8 @@ n**n - n + 41 is not prime. @ \section{oct.ht} -<>= -\newcommand{\OctonionXmpTitle}{Octonion} -\newcommand{\OctonionXmpNumber}{9.56} - -@ -\subsection{Octonion} -\label{OctonionXmpPage} -See QuaternionXmpPage \ref{QuaternionXmpPage} on -page~\pageref{QuaternionXmpPage} -\index{pages!OctonionXmpPage!oct.ht} -\index{oct.ht!pages!OctonionXmpPage} -\index{OctonionXmpPage!oct.ht!pages} +\pagehead{OctonionXmpPage}{oct.ht}{Octonion} +\pageto{notitle}{QuaternionXmpPage} <>= \begin{page}{OctonionXmpPage}{Octonion} \beginscroll @@ -17265,14 +15812,16 @@ give eight components to construct an octonion. \xtc{ Or you can use two quaternions to create an octonion. }{ -\spadpaste{oci3 := octon(quatern(-7,-12,3,-10), quatern(5,6,9,0)) \bound{oci3}} +\spadpaste{oci3 := octon(quatern(-7,-12,3,-10), quatern(5,6,9,0)) +\bound{oci3}} } % % \xtc{ You can easily demonstrate the non-associativity of multiplication. }{ -\spadpaste{(oci1 * oci2) * oci3 - oci1 * (oci2 * oci3) \free{oci1 oci2 oci3}} +\spadpaste{(oci1 * oci2) * oci3 - oci1 * (oci2 * oci3) +\free{oci1 oci2 oci3}} } % As with the quaternions, we have a real part, the imaginary @@ -17292,7 +15841,8 @@ the coefficient of the basis element for a given octonion. %\spadfunFrom{imagJ}{Octonion}, and %\spadfunFrom{imagK}{Octonion}. }{ -\spadpaste{[real oci1, imagi oci1, imagj oci1, imagk oci1, imagE oci1, imagI oci1, imagJ oci1, imagK oci1] \free{oci1}} +\spadpaste{[real oci1, imagi oci1, imagj oci1, imagk oci1, imagE oci1, +imagI oci1, imagJ oci1, imagK oci1] \free{oci1}} } % A basis with respect to the @@ -17305,11 +15855,13 @@ We do this in Axiom by simply changing the ground ring from \spadtype{Integer} to \spadtype{Polynomial Integer}. }{ -\spadpaste{q : Quaternion Polynomial Integer := quatern(q1, qi, qj, qk) \bound{q}} +\spadpaste{q : Quaternion Polynomial Integer := quatern(q1, qi, qj, qk) +\bound{q}} } \xtc{ }{ -\spadpaste{E : Octonion Polynomial Integer:= octon(0,0,0,0,1,0,0,0) \bound{E}} +\spadpaste{E : Octonion Polynomial Integer:= octon(0,0,0,0,1,0,0,0) +\bound{E}} } % \xtc{ @@ -17335,7 +15887,8 @@ Finally, we check that the \spadfunFrom{norm}{Octonion}, defined as the sum of the squares of the coefficients, is a multiplicative map. }{ -\spadpaste{o : Octonion Polynomial Integer := octon(o1, oi, oj, ok, oE, oI, oJ, oK) \bound{o}} +\spadpaste{o : Octonion Polynomial Integer := octon(o1, oi, oj, ok, oE, +oI, oJ, oK) \bound{o}} } \xtc{ }{ @@ -17343,7 +15896,8 @@ is a multiplicative map. } \xtc{ }{ -\spadpaste{p : Octonion Polynomial Integer := octon(p1, pi, pj, pk, pE, pI, pJ, pK) \bound{p}} +\spadpaste{p : Octonion Polynomial Integer := octon(p1, pi, pj, pk, pE, +pI, pJ, pK) \bound{p}} } \xtc{ Since the result is \spad{0}, the norm is multiplicative. @@ -17357,56 +15911,42 @@ Since the result is \spad{0}, the norm is multiplicative. @ \section{odpol.ht} -<>= -\newcommand{\OrderlyDifferentialPolynomialXmpTitle} +\pagehead{OrderlyDifferentialPolyXmpPage}{odpol.ht} {OrderlyDifferentialPolynomial} -\newcommand{\OrderlyDifferentialPolynomialXmpNumber}{9.60} - -@ -\subsection{OrderlyDifferentialPolynomial} -\label{OrderlyDifferentialPolynomialXmpPage} -\index{pages!OrderlyDifferentialPolynomialXmpPage!odpol.ht} -\index{odpol.ht!pages!OrderlyDifferentialPolynomialXmpPage} -\index{OrderlyDifferentialPolynomialXmpPage!odpol.ht!pages} <>= -\begin{page}{OrderlyDifferentialPolynomialXmpPage} +\begin{page}{OrderlyDifferentialPolyXmpPage} {OrderlyDifferentialPolynomial} \beginscroll -Many systems of differential equations may be transformed to equivalent -systems of ordinary differential equations where the equations are -expressed polynomially in terms of the unknown functions. -In Axiom, the domain constructors -\spadtype{OrderlyDifferentialPolynomial} -(abbreviated \spadtype{ODPOL}) and -\spadtype{SequentialDifferentialPolynomial} (abbreviation -\spadtype{SDPOL}) implement two domains of ordinary differential -polynomials over any differential ring. -In the simplest case, this differential ring is usually either the ring of -integers, or the field of rational numbers. -However, Axiom can handle ordinary differential polynomials over a -field of rational functions in a single indeterminate. +Many systems of differential equations may be transformed to +equivalent systems of ordinary differential equations where the +equations are expressed polynomially in terms of the unknown +functions. In Axiom, the domain constructors +\spadtype{OrderlyDifferentialPolynomial} (abbreviated +\spadtype{ODPOL}) and \spadtype{SequentialDifferentialPolynomial} +(abbreviation \spadtype{SDPOL}) implement two domains of ordinary +differential polynomials over any differential ring. In the simplest +case, this differential ring is usually either the ring of integers, +or the field of rational numbers. However, Axiom can handle ordinary +differential polynomials over a field of rational functions in a +single indeterminate. The two domains \spadtype{ODPOL} and \spadtype{SDPOL} are almost -identical, the only difference being the choice of a different ranking, -which is an ordering of the derivatives of the indeterminates. -The first domain uses an orderly ranking, that is, derivatives of higher -order are ranked higher, and derivatives of the same order are ranked -alphabetically. -The second domain uses a sequential ranking, where derivatives are ordered -first alphabetically by the differential indeterminates, and then by -order. -A more general domain constructor, +identical, the only difference being the choice of a different +ranking, which is an ordering of the derivatives of the +indeterminates. The first domain uses an orderly ranking, that is, +derivatives of higher order are ranked higher, and derivatives of the +same order are ranked alphabetically. The second domain uses a +sequential ranking, where derivatives are ordered first alphabetically +by the differential indeterminates, and then by order. A more general +domain constructor, \spadtype{DifferentialSparseMultivariatePolynomial} (abbreviation \spadtype{DSMP}) allows both a user-provided list of differential -indeterminates as well as a user-defined ranking. -We shall illustrate \spadtype{ODPOL(FRAC INT)}, which constructs a domain -of ordinary differential polynomials in an arbitrary number of -differential indeterminates with rational numbers as coefficients. -\xtc{ -}{ -\spadpaste{dpol:= ODPOL(FRAC INT) \bound{dpol}} -} +indeterminates as well as a user-defined ranking. We shall illustrate +\spadtype{ODPOL(FRAC INT)}, which constructs a domain of ordinary +differential polynomials in an arbitrary number of differential +indeterminates with rational numbers as coefficients. \xtc{ }{ +\spadpaste{dpol:= ODPOL(FRAC INT) \bound{dpol}} } \xtc{ A differential indeterminate \spad{w} may be viewed as an infinite @@ -17487,15 +16027,16 @@ in a specified differential indeterminate. } \xtc{ The operation -\spadfunFrom{differentialVariables}{OrderlyDifferentialPolynomial} returns -a list of differential indeterminates occurring in a differential -polynomial. +\spadfunFrom{differentialVariables}{OrderlyDifferentialPolynomial} +returns a list of differential indeterminates occurring in a +differential polynomial. }{ \spadpaste{differentialVariables(g) \free{g}} } \xtc{ -The operation \spadfunFrom{degree}{OrderlyDifferentialPolynomial} returns -the degree, or the degree in the differential indeterminate specified. +The operation \spadfunFrom{degree}{OrderlyDifferentialPolynomial} +returns the degree, or the degree in the differential indeterminate +specified. }{ \spadpaste{degree(g) \free{g}} } @@ -17504,10 +16045,10 @@ the degree, or the degree in the differential indeterminate specified. \spadpaste{degree(g, 'w) \free{g}} } \xtc{ -The operation \spadfunFrom{weights}{OrderlyDifferentialPolynomial} returns -a list of weights of differential monomials appearing in differential -polynomial, or a list of weights in a specified differential -indeterminate. +The operation \spadfunFrom{weights}{OrderlyDifferentialPolynomial} +returns a list of weights of differential monomials appearing in +differential polynomial, or a list of weights in a specified +differential indeterminate. }{ \spadpaste{weights(g) \free{g}} } @@ -17530,12 +16071,11 @@ differential monomials appearing in it are equal. } \xtc{ To substitute {\em differentially}, use -\spadfunFrom{eval}{OrderlyDifferentialPolynomial}. -Note that we must coerce \spad{'w} to \spadtype{Symbol}, since in -\spadtype{ODPOL}, differential indeterminates belong to the domain -\spadtype{Symbol}. -Compare this result to the next, which substitutes {\em algebraically} (no -substitution is done since \spad{w.0} does not appear in \spad{g}). +\spadfunFrom{eval}{OrderlyDifferentialPolynomial}. Note that we must +coerce \spad{'w} to \spadtype{Symbol}, since in \spadtype{ODPOL}, +differential indeterminates belong to the domain \spadtype{Symbol}. +Compare this result to the next, which substitutes {\em algebraically} +(no substitution is done since \spad{w.0} does not appear in \spad{g}). }{ \spadpaste{eval(g,['w::Symbol],[f]) \free{f}\free{g}} } @@ -17572,24 +16112,23 @@ derivative of the differential indeterminates that occurs. \spadpaste{lg:=leader(g) \free{g}\bound{lg}} } \xtc{ -The operation \spadfunFrom{separant}{OrderlyDifferentialPolynomial} returns -the separant of a differential polynomial, which is the partial derivative -with respect to the leader. +The operation \spadfunFrom{separant}{OrderlyDifferentialPolynomial} +returns the separant of a differential polynomial, which is the +partial derivative with respect to the leader. }{ \spadpaste{sg:=separant(g) \free{g}\bound{sg}} } \xtc{ -The operation \spadfunFrom{initial}{OrderlyDifferentialPolynomial} returns -the initial, which is the leading coefficient when the given differential -polynomial is expressed as a polynomial in the leader. +The operation \spadfunFrom{initial}{OrderlyDifferentialPolynomial} +returns the initial, which is the leading coefficient when the given +differential polynomial is expressed as a polynomial in the leader. }{ \spadpaste{ig:=initial(g) \free{g}\bound{ig}} } \xtc{ -Using these three operations, it is possible to reduce \spad{f} modulo the -differential ideal generated by \spad{g}. -The general scheme is to first reduce the order, then reduce the degree in -the leader. +Using these three operations, it is possible to reduce \spad{f} modulo +the differential ideal generated by \spad{g}. The general scheme is +to first reduce the order, then reduce the degree in the leader. First, eliminate \spad{z.3} using the derivative of \spad{g}. }{ \spadpaste{g1 := D g \free{g}\bound{g1}} @@ -17607,21 +16146,24 @@ Differentiate \spad{f} partially with respect to this leader. \xtc{ Compute the partial remainder of \spad{f} with respect to \spad{g}. }{ -\spadpaste{prf:=sg * f- pdf * g1 \free{f}\free{sg}\free{pdf}\free{g1}\bound{prf}} +\spadpaste{prf:=sg * f- pdf * g1 \free{f}\free{sg}\free{pdf} +\free{g1}\bound{prf}} } \xtc{ Note that high powers of \spad{lg} still appear in \spad{prf}. Compute the leading coefficient of \spad{prf} as a polynomial in the leader of \spad{g}. }{ -\spadpaste{lcf:=leadingCoefficient univariate(prf, lg) \free{prf}\free{lg}\bound{lcf}} +\spadpaste{lcf:=leadingCoefficient univariate(prf, lg) +\free{prf}\free{lg}\bound{lcf}} } \xtc{ Finally, continue eliminating the high powers of \spad{lg} appearing in \spad{prf} to obtain the (pseudo) remainder of \spad{f} modulo \spad{g} and its derivatives. }{ -\spadpaste{ig * prf - lcf * g * lg \free{ig}\free{prf}\free{lcf}\free{g}\free{lg}} +\spadpaste{ig * prf - lcf * g * lg \free{ig}\free{prf} +\free{lcf}\free{g}\free{lg}} } \showBlurb{OrderlyDifferentialPolyomial} \showBlurb{SequentialDifferentialPolynomial} @@ -17631,24 +16173,15 @@ and its derivatives. @ \section{op.ht} +\pagehead{OperatorXmpPage}{op.ht}{Operator} <>= -\newcommand{\OperatorXmpTitle}{Operator} -\newcommand{\OperatorXmpNumber}{9.58} - -@ -\subsection{Operator} -\label{OperatorXmpPage} -\index{pages!OperatorXmpPage!alist.ht} -\index{alist.ht!pages!OperatorXmpPage} -\index{OperatorXmpPage!alist.ht!pages} -<>= \begin{page}{OperatorXmpPage}{Operator} \beginscroll -Given any ring \spad{R}, the ring of the \spadtype{Integer}-linear operators -over \spad{R} is called \spadtype{Operator(R)}. -To create an operator over \spad{R}, first create a basic operator using the -operation \spadfun{operator}, and then convert it to \spadtype{Operator(R)} -for the \spad{R} you want. +Given any ring \spad{R}, the ring of the \spadtype{Integer}-linear +operators over \spad{R} is called \spadtype{Operator(R)}. To create +an operator over \spad{R}, first create a basic operator using the +operation \spadfun{operator}, and then convert it to +\spadtype{Operator(R)} for the \spad{R} you want. % \xtc{ We choose \spad{R} to be the two by two matrices over the integers. @@ -17661,8 +16194,9 @@ Create the operator \spad{tilde} on \spad{R}. \spadpaste{t := operator("tilde") :: OP(R) \free{r}\bound{t}} } % -Since \spadtype{Operator} is unexposed we must either package-call operations -from it, or expose it explicitly. For convenience we will do the latter. +Since \spadtype{Operator} is unexposed we must either package-call +operations from it, or expose it explicitly. For convenience we will +do the latter. % \noOutputXtc{ Expose \spad{Operator}. @@ -17784,7 +16318,8 @@ Now attach the map to it. This is the differential equation satisfied by the \spad{n}-th Legendre polynomial. }{ -\spadpaste{E n == (1 - x**2) * dx**2 - 2 * x * dx + n*(n+1) \free{edx}\bound{E}} +\spadpaste{E n == (1 - x**2) * dx**2 - 2 * x * dx + n*(n+1) +\free{edx}\bound{E}} } \xtc{ Now we verify this for \spad{n = 15}. @@ -17808,16 +16343,7 @@ Here is the evaluation. @ \section{ovar.ht} -<>= -\newcommand{\OrderedVariableListXmpTitle}{OrderedVariableList} -\newcommand{\OrderedVariableListXmpNumber}{9.59} - -@ -\subsection{OrderedVariableList} -\label{OrderedVariableListXmpPage} -\index{pages!OrderedVariableListXmpPage!ovar.ht} -\index{ovar.ht!pages!OrderedVariableListXmpPage} -\index{OrderedVariableListXmpPage!ovar.ht!pages} +\pagehead{OrderedVariableListXmpPage}{ovar.ht}{OrderedVariableList} <>= \begin{page}{OrderedVariableListXmpPage}{OrderedVariableList} \beginscroll @@ -17857,16 +16383,7 @@ Check that the ordering is right @ \section{perman.ht} -<>= -\newcommand{\PermanentXmpTitle}{Permanent} -\newcommand{\PermanentXmpNumber}{9.62} - -@ -\subsection{Permanent} -\label{PermanentXmpPage} -\index{pages!PermanentXmpPage!perman.ht} -\index{perman.ht!pages!PermanentXmpPage} -\index{PermanentXmpPage!perman.ht!pages} +\pagehead{PermanentXmpPage}{perman.ht}{Permanent} <>= \begin{page}{PermanentXmpPage}{Permanent} \beginscroll @@ -17880,16 +16397,16 @@ otherwise. This function is much more difficult to compute efficiently than the \spadfunFrom{determinant}{Matrix}. An example of the use of \spadfunFrom{permanent}{Permanent} is the -calculation of the \eth{\spad{n}} derangement number, defined to be the number -of different possibilities for \spad{n} couples to dance but never with -their own spouse. +calculation of the \eth{\spad{n}} derangement number, defined to be +the number of different possibilities for \spad{n} couples to dance +but never with their own spouse. \xtc{ Consider an \spad{n} by \spad{n} matrix with entries \spad{0} on the diagonal and \spad{1} elsewhere. -Think of the rows as one-half of each couple (for example, the males) and the -columns the other half. -The permanent of such a matrix gives the desired derangement number. +Think of the rows as one-half of each couple (for example, the males) +and the columns the other half. The permanent of such a matrix gives +the desired derangement number. }{ \begin{spadsrc}[\bound{kn}] kn n == @@ -17914,48 +16431,34 @@ Here are some derangement numbers, which you see grow quite fast. @ \section{pfr.ht} -<>= -\newcommand{\PartialFractionXmpTitle}{PartialFraction} -\newcommand{\PartialFractionXmpNumber}{9.61} - -@ -\subsection{PartialFraction} -\label{PartialFractionXmpPage} -See FullPartialFractionExpansionXmpPage -\ref{FullPartialFractionExpansionXmpPage} on -page~\pageref{FullPartialFractionExpansionXmpPage} -\index{pages!PartialFractionXmpPage!pfr.ht} -\index{pfr.ht!pages!PartialFractionXmpPage} -\index{PartialFractionXmpPage!pfr.ht!pages} +\pagehead{PartialFractionXmpPage}{pfr.ht}{PartialFraction} +\pageto{notitle}{FullPartialFracExpansionXmpPage} <>= \begin{page}{PartialFractionXmpPage}{PartialFraction} \beginscroll -A {\it partial fraction} is a decomposition of a quotient into -a sum +A {\it partial fraction} is a decomposition of a quotient into a sum of quotients where the denominators of the summands are powers of -primes.\footnote{Most people first encounter partial fractions when they -are learning integral calculus. -For a technical discussion of partial fractions, see, for example, Lang's {\it -Algebra.}} For example, the rational number \spad{1/6} is decomposed into -\spad{1/2 -1/3}. -You can compute partial fractions of quotients of objects from domains -belonging to the category \spadtype{EuclideanDomain}. -For example, \spadtype{Integer}, \spadtype{Complex Integer}, and +primes.\footnote{Most people first encounter partial fractions when +they are learning integral calculus. For a technical discussion of +partial fractions, see, for example, Lang's {\it Algebra.}} For +example, the rational number \spad{1/6} is decomposed into +\spad{1/2-1/3}. You can compute partial fractions of quotients of +objects from domains belonging to the category +\spadtype{EuclideanDomain}. For +example, \spadtype{Integer}, \spadtype{Complex Integer}, and \spadtype{UnivariatePolynomial(x, Fraction Integer)} all belong to -\spadtype{EuclideanDomain}. -In the examples following, we demonstrate how to decompose quotients of -each of these kinds of object into partial fractions. -Issue the system command -\spadcmd{)show PartialFraction} -to display the full list of operations defined by \spadtype{PartialFraction}. +\spadtype{EuclideanDomain}. In the examples following, we demonstrate +how to decompose quotients of each of these kinds of object into +partial fractions. Issue the system command \spadcmd{)show +PartialFraction} to display the full list of operations defined by +\spadtype{PartialFraction}. -It is necessary that we know how to factor the denominator when we want to -compute a partial fraction. -Although the interpreter can often do this automatically, it may be -necessary for you to include a call to \spadfun{factor}. -In these examples, it is not necessary to factor the -denominators explicitly. +It is necessary that we know how to factor the denominator when we +want to compute a partial fraction. Although the interpreter can +often do this automatically, it may be necessary for you to include a +call to \spadfun{factor}. In these examples, it is not necessary to +factor the denominators explicitly. % \xtc{ The main operation for computing partial fractions is called @@ -17997,10 +16500,9 @@ In this example, the whole part is just \spad{0}. \spadpaste{numberOfFractionalTerms(f) \free{f}} } \xtc{ -The operation -\spadfunFrom{nthFractionalTerm}{PartialFraction} returns the individual terms in the -decomposition. -Notice that the object returned is a partial fraction itself. +The operation \spadfunFrom{nthFractionalTerm}{PartialFraction} returns +the individual terms in the decomposition. Notice that the object +returned is a partial fraction itself. \spadfunFrom{firstNumer}{PartialFraction} and \spadfunFrom{firstDenom}{PartialFraction} extract the numerator and denominator of the first term of the fraction. @@ -18011,7 +16513,8 @@ denominator of the first term of the fraction. % \xtc{ -Given two gaussian integers (see \downlink{`Complex'}{ComplexXmpPage}\ignore{Complex}), you can +Given two gaussian integers (see +\downlink{`Complex'}{ComplexXmpPage}\ignore{Complex}), you can decompose their quotient into a partial fraction. }{ \spadpaste{partialFraction(1,- 13 + 14 * \%i) \bound{prev2}} @@ -18037,9 +16540,11 @@ The polynomials in this object have type % \xtc{ We use the \spadfunFrom{primeFactor}{Factored} operation (see -\downlink{`Factored'}{FactoredXmpPage}\ignore{Factored}) to create the denominator in factored form directly. +\downlink{`Factored'}{FactoredXmpPage} +\ignore{Factored}) to create the denominator in factored form directly. }{ -\spadpaste{u : FR UP(x, FRAC INT) := reduce(*,[primeFactor(x+i,i) for i in 1..4]) \bound{u}} +\spadpaste{u : FR UP(x, FRAC INT) := reduce(*,[primeFactor(x+i,i) +for i in 1..4]) \bound{u}} } % % @@ -18053,7 +16558,9 @@ These are the compact and expanded partial fractions for the quotient. \spadpaste{padicFraction \% \free{prev3}} } -All see \downlink{`FullPartialFractionExpansion'}{FullPartialFractionExpansionXmpPage}\ignore{FullPartialFractionExpansion} for examples of +All see \downlink{`FullPartialFracExpansion'} +{FullPartialFracExpansionXmpPage} +\ignore{FullPartialFracExpansion} for examples of factor-free conversion of quotients to full partial fractions. \endscroll \autobuttons @@ -18061,30 +16568,15 @@ factor-free conversion of quotients to full partial fractions. @ \section{poly.ht} -\subsection{Polynomials} -\label{PolynomialPage} -\includegraphics[scale=.5]{ps/v71polynomialpage.eps} -\index{images!polynomialpage} - -Called from ``Topics'' (TopicPage) \ref{TopicPage} on page~\pageref{TopicPage} -\begin{itemize} -\item ``Basic Functions'' (PolynomialBasicPage) \ref{PolynomialBasicPage} on -page~\pageref{PolynomialBasicPage} -\item ``Substitutions'' (PolynomialSubstitutionPage) -\ref{PolynomialSubstitutionPage} on -page~\pageref{PolynomialSubstitutionPage} -\item ``Factorizations'' (ugProblemFactorPage) \ref{ugProblemFactorPage} on -page~\pageref{ugProblemFactorPage} -\item ``GCDs and Friends'' (PolynomialGCDPage) \ref{PolynomialGCDPage} on -page~\pageref{PolynomialGCDPage} -\item ``Roots'' (PolynomialRootPage) \ref{PolynomialRootPage} on -page~\pageref{PolynomialRootPage} -\item ``Specific Types'' (PolynomialTypesPage) \ref{PolynomialTypesPage} on -page~\pageref{PolynomialTypesPage} -\end{itemize} -\index{pages!PolynomialPage!poly.ht} -\index{poly.ht!pages!PolynomialPage} -\index{PolynomialPage!poly.ht!pages} +\pagehead{PolynomialPage}{poly.ht}{Polynomials} +\pagepic{ps/v71polynomialpage.eps}{polynomialpage} +\pagefrom{Topics}{TopicPage} +\pageto{Basic Functions}{PolynomialBasicPage} +\pageto{Substitutions}{PolynomialSubstitutionPage} +\pageto{Factorizations}{ugProblemFactorPage} +\pageto{GCDs and Friends}{PolynomialGCDPage} +\pageto{Roots}{PolynomialRootPage} +\pageto{Specific Types}{PolynomialTypesPage} <>= \begin{page}{PolynomialPage}{Polynomials} \beginscroll @@ -18107,22 +16599,20 @@ More specific information. \end{page} @ -\subsection{The Specific Polynomial Types} -\label{PolynomialTypesPage} -\index{pages!PolynomialTypesPage!poly.ht} -\index{poly.ht!pages!PolynomialTypesPage} -\index{PolynomialTypesPage!poly.ht!pages} +\pagehead{PolynomialTypesPage}{poly.ht}{The Specific Polynomial Types} <>= \begin{page}{PolynomialTypesPage}{The Specific Polynomial Types} \beginscroll \beginmenu \menulink{Polynomial}{PolynomialXmpPage} \newline The general type. -\menulink{UnivariatePolynomial}{UnivariatePolynomialXmpPage} \newline +\menulink{UnivariatePolynomial}{UnivariatePolyXmpPage} \newline One variable polynomials. -\menulink{MultivariatePolynomial}{MultivariatePolynomialXmpPage} \newline +\menulink{MultivariatePolynomial}{MultivariatePolyXmpPage} +\newline Multiple variable polynomials, recursive structure. -\menulink{DistributedMultivariatePolynomial}{DistributedMultivariatePolynomialXmpPage} +\menulink{DistributedMultivariatePoly} +{DistributedMultivariatePolyXmpPage} \newline Multiple variable polynomials, non-recursive structure. \endmenu @@ -18131,18 +16621,15 @@ Multiple variable polynomials, non-recursive structure. \end{page} @ -\subsection{Basic Operations On Polynomials} -\label{PolynomialBasicPage} -\index{pages!PolynomialBasicPage!poly.ht} -\index{poly.ht!pages!PolynomialBasicPage} -\index{PolynomialBasicPage!poly.ht!pages} +\pagehead{PolynomialBasicPage}{poly.ht}{Basic Operations On Polynomials} <>= \begin{page}{PolynomialBasicPage}{Basic Operations On Polynomials} \beginscroll You create polynomials using the usual operations of \spadopFrom{+}{Polynomial}, \spadopFrom{-}{Polynomial}, \spadopFrom{*}{Polynomial} -(for multiplication), and \spadopFrom{**}{Polynomial} (for exponentiation). +(for multiplication), and +\spadopFrom{**}{Polynomial} (for exponentiation). Here are two examples: \newline \spadpaste{p := a*x**2 + b*x*y + c*y**2 \bound{p}} \spadpaste{q := 13*x**2 + 3*z \bound{q}} @@ -18192,11 +16679,8 @@ in the polynomial \spad{r(x,y)}. \end{page} @ -\subsection{Polynomial Evaluation and Substitution} -\label{PolynomialSubstitutionPage} -\index{pages!PolynomialSubstitutionPage!poly.ht} -\index{poly.ht!pages!PolynomialSubstitutionPage} -\index{PolynomialSubstitutionPage!poly.ht!pages} +\pagehead{PolynomialSubstitutionPage}{poly.ht} +{Polynomial Evaluation and Substitution} <>= \begin{page}{PolynomialSubstitutionPage} {Polynomial Evaluation and Substitution} @@ -18229,24 +16713,20 @@ variables: \end{page} @ -\subsection{Greatest Common Divisors, Resultants, and Discriminants} -\label{PolynomialGCDPage} -\index{pages!PolynomialGCDPage!poly.ht} -\index{poly.ht!pages!PolynomialGCDPage} -\index{PolynomialGCDPage!poly.ht!pages} +\pagehead{PolynomialGCDPage}{poly.ht} +{Greatest Common Divisors, Resultants, and Discriminants} <>= \begin{page}{PolynomialGCDPage} {Greatest Common Divisors, Resultants, and Discriminants} \beginscroll -You can compute the greatest common divisor of two polynomials using the -function \spadfun{gcd}. +You can compute the greatest common divisor of two polynomials using +the function \spadfun{gcd}. Here's an example: \spadpaste{p := 3*x**8 + 2*x**7 + 6*x**2 + 7*x + 2 \bound{p}} \spadpaste{q := 2*x**13 + 9*x**7 + 2*x**6 + 10*x + 5 \bound{q}} \spadpaste{gcd(p,q) \free{p q}} -You could -also see that \spad{p} and \spad{q} have a factor in common by using the -function \spadfun{resultant}: +You could also see that \spad{p} and \spad{q} have a factor in +common by using the function \spadfun{resultant}: \spadpaste{resultant(p,q,x) \free{p q}} The resultant of two polynomials vanishes precisely when they have a factor in common. @@ -18259,11 +16739,7 @@ polynomials could have involved variables other than x.) \end{page} @ -\subsection{Roots of Polynomials} -\label{PolynomialRootPage} -\index{pages!PolynomialRootPage!poly.ht} -\index{poly.ht!pages!PolynomialRootPage} -\index{PolynomialRootPage!poly.ht!pages} +\pagehead{PolynomialRootPage}{poly.ht}{Roots of Polynomials} <>= \begin{page}{PolynomialRootPage}{Roots of Polynomials} \beginscroll @@ -18274,10 +16750,12 @@ Working with a single root of a polynomial. \menulink{Using All Roots of a Polynomial}{ugxProblemSymRootAllPage} \newline Working with all the roots of a polynomial. -\menulink{Solution of a Single Polynomial Equation}{ugxProblemOnePolPage} +\menulink{Solution of a Single Polynomial Equation} +{ugxProblemOnePolPage} \newline Finding the roots of one polynomial. -\menulink{Solution of Systems of Polynomial Equations}{ugxProblemPolSysPage} +\menulink{Solution of Systems of Polynomial Equations} +{ugxProblemPolSysPage} \newline Finding the roots of a system of polynomials. \endmenu @@ -18287,33 +16765,18 @@ Finding the roots of a system of polynomials. @ \section{poly1.ht} -<>= -\newcommand{\PolynomialXmpTitle}{Polynomial} -\newcommand{\PolynomialXmpNumber}{9.63} - -@ -\subsection{Polynomial} -\label{PolynomialXmpPage} -\begin{itemize} -\item DistributedMultivariatePolynomialXmpPage \ref{DistributedMultivariatePolynomialXmpPage} on -page~\pageref{DistributedMultivariatePolynomialXmpPage} -\item MultivariatePolynomialXmpPage \ref{MultivariatePolynomialXmpPage} on -page~\pageref{MultivariatePolynomialXmpPage} -\item UnivariatePolynomialXmpPage \ref{UnivariatePolynomialXmpPage} on -page~\pageref{UnivariatePolynomialXmpPage} -\item FactoredXmpPage \ref{FactoredXmpPage} on -page~\pageref{FactoredXmpPage} -\item ugProblemFactorPage \ref{ugProblemFactorPage} on -page~\pageref{ugProblemFactorPage} -\end{itemize} -\index{pages!PolynomialXmpPage!poly1.ht} -\index{poly1.ht!pages!PolynomialXmpPage} -\index{PolynomialXmpPage!poly1.ht!pages} +\pagehead{PolynomialXmpPage}{poly1.ht}{Polynomial} +\pageto{notitle}{DistributedMultivariatePolyXmpPage} +\pageto{notitle}{MultivariatePolyXmpPage} +\pageto{notitle}{UnivariatePolyXmpPage} +\pageto{notitle}{FactoredXmpPage} +\pageto{notitle}{ugProblemFactorPage} <>= \begin{page}{PolynomialXmpPage}{Polynomial} \beginscroll -The domain constructor \spadtype{Polynomial} (abbreviation: \spadtype{POLY}) +The domain constructor \spadtype{Polynomial} +(abbreviation: \spadtype{POLY}) provides polynomials with an arbitrary number of unspecified variables. @@ -18330,8 +16793,8 @@ Here the coefficients have type \spadtype{Float}. \spadpaste{z - 2.3} } \xtc{ -And here we have a polynomial in two variables with coefficients which -have type \spadtype{Fraction Integer}. +And here we have a polynomial in two variables with coefficients +which have type \spadtype{Fraction Integer}. }{ \spadpaste{y**2 - z + 3/4} } @@ -18352,11 +16815,11 @@ coefficients. In fact, you really don't need to worry about the representation unless you are working on an advanced application where it is critical. The polynomial types created from -\spadtype{DistributedMultivariatePolynomial} and -\spadtype{NewDistributedMultivariatePolynomial} (discussed in -\downlink{`DistributedMultivariatePolynomial'} -{DistributedMultivariatePolynomialXmpPage} -\ignore{DistributedMultivariatePolynomial}) are stored and displayed in a +\spadtype{DistributedMultivariatePoly} and +\spadtype{NewDistributedMultivariatePoly} (discussed in +\downlink{`DistributedMultivariatePoly'} +{DistributedMultivariatePolyXmpPage} +\ignore{DistributedMultivariatePoly}) are stored and displayed in a non-recursive manner. \xtc{ You see a ``flat'' display of the above @@ -18385,15 +16848,15 @@ The fully factored form can be recovered by using }{ \spadpaste{factor(q) \free{q}} } -This is the same name used for the operation to factor integers. -Such reuse of names is called \spadglos{overloading} and makes it much easier -to think of solving problems in general ways. -Axiom facilities for factoring polynomials created with -\spadtype{Polynomial} are currently restricted to -the integer and rational number coefficient cases. -There are more complete facilities for factoring univariate polynomials: -see \downlink{``\ugProblemFactorTitle''}{ugProblemFactorPage} -in Section \ugProblemFactorNumber\ignore{ugProblemFactor}. +This is the same name used for the operation to factor integers. Such +reuse of names is called \spadglos{overloading} and makes it much +easier to think of solving problems in general ways. Axiom facilities +for factoring polynomials created with \spadtype{Polynomial} are +currently restricted to the integer and rational number coefficient +cases. There are more complete facilities for factoring univariate +polynomials: see +\downlink{``\ugProblemFactorTitle''}{ugProblemFactorPage} in Section +\ugProblemFactorNumber\ignore{ugProblemFactor}. \xtc{ The standard arithmetic operations are available for polynomials. @@ -18414,7 +16877,8 @@ We factor the gcd to show this relationship better. \spadpaste{factor \% \free{prev4}} } \xtc{ -The least common multiple is computed by using \spadfunFrom{lcm}{Polynomial}. +The least common multiple is computed by using +\spadfunFrom{lcm}{Polynomial}. }{ \spadpaste{lcm(p,q) \free{p q}} } @@ -18512,8 +16976,8 @@ The total degree of a polynomial is returned by } \xtc{ -It is often convenient to think of a polynomial as a leading monomial plus -the remaining terms. +It is often convenient to think of a polynomial as a leading monomial +plus the remaining terms. }{ \spadpaste{leadingMonomial p \free{p}} } @@ -18538,8 +17002,8 @@ This is extracted by using \spadpaste{leadingCoefficient p \free{p}} } \xtc{ -The operation \spadfunFrom{eval}{Polynomial} is used to substitute a value -for a variable in a polynomial. +The operation \spadfunFrom{eval}{Polynomial} is used to substitute a +value for a variable in a polynomial. }{ \spadpaste{p \free{p}} } @@ -18646,9 +17110,13 @@ map the \spadfun{numeric} operation on the coefficients of the polynomial. } For more information on related topics, see -\downlink{`UnivariatePolynomial'}{UnivariatePolynomialXmpPage}\ignore{UnivariatePolynomial}, -\downlink{`MultivariatePolynomial'}{MultivariatePolynomialXmpPage}\ignore{MultivariatePolynomial}, and -\downlink{`DistributedMultivariatePolynomial'}{DistributedMultivariatePolynomialXmpPage}\ignore{DistributedMultivariatePolynomial}. +\downlink{`UnivariatePolynomial'}{UnivariatePolyXmpPage} +\ignore{UnivariatePolynomial}, +\downlink{`MultivariatePolynomial'}{MultivariatePolyXmpPage} +\ignore{MultivariatePolynomial}, and +\downlink{`DistributedMultivariatePoly'} +{DistributedMultivariatePolyXmpPage} +\ignore{DistributedMultivariatePoly}. You can also issue the system command \spadcmd{)show Polynomial} to display the full list of operations defined by @@ -18659,19 +17127,9 @@ to display the full list of operations defined by @ \section{quat.ht} -<>= -\newcommand{\QuaternionXmpTitle}{Quaternion} -\newcommand{\QuaternionXmpNumber}{9.64} - -@ -\subsection{Quaternion} -\label{QuaternionXmpPage} -\index{pages!QuaternionXmpPage!quat.ht} -\index{quat.ht!pages!QuaternionXmpPage} -\index{QuaternionXmpPage!quat.ht!pages} +\pagehead{QuaternionXmpPage}{quat.ht}{Quaternion} <>= \begin{page}{QuaternionXmpPage}{Quaternion} -% ===================================================================== \beginscroll The domain constructor \spadtype{Quaternion} implements quaternions over commutative rings. @@ -18721,7 +17179,8 @@ In general, multiplication is not commutative. There are no predefined constants for the imaginary \spad{i, j}, and \spad{k} parts, but you can easily define them. }{ -\spadpaste{i:=quatern(0,1,0,0); j:=quatern(0,0,1,0); k:=quatern(0,0,0,1) \bound{i j k}} +\spadpaste{i:=quatern(0,1,0,0); j:=quatern(0,0,1,0); +k:=quatern(0,0,0,1) \bound{i j k}} } \xtc{ These satisfy the normal identities. @@ -18747,24 +17206,10 @@ The norm is the quaternion times its conjugate. @ \section{radix.ht} -<>= -\newcommand{\RadixExpansionXmpTitle}{RadixExpansion} -\newcommand{\RadixExpansionXmpNumber}{9.65} - -@ -\subsection{RadixExpansion} -\label{RadixExpansionXmpPage} -\begin{itemize} -\item HexadecimalExpansionXmpPage \ref{HexadecimalExpansionXmpPage} on -page~\pageref{HexadecimalExpansionXmpPage} -\item DecimalExpansionXmpPage \ref{DecimalExpansionXmpPage} on -page~\pageref{DecimalExpansionXmpPage} -\item BinaryExpansionXmpPage \ref{BinaryExpansionXmpPage} on -page~\pageref{BinaryExpansionXmpPage} -\end{itemize} -\index{pages!RadixExpansionXmpPage!radix.ht} -\index{radix.ht!pages!RadixExpansionXmpPage} -\index{RadixExpansionXmpPage!radix.ht!pages} +\pagehead{RadixExpansionXmpPage}{radix.ht}{RadixExpansion} +\pageto{notitle}{HexExpansionXmpPage} +\pageto{notitle}{DecimalExpansionXmpPage} +\pageto{notitle}{BinaryExpansionXmpPage} <>= \begin{page}{RadixExpansionXmpPage}{RadixExpansion} \beginscroll @@ -18824,13 +17269,14 @@ Here is a rational number in base \spad{8}. \spadpaste{a := (76543/210)::RadixExpansion(8) \bound{a}} } \xtc{ -The operation \spadfunFrom{wholeRagits}{RadixExpansion} returns a list of the -ragits for the integral part of the number. +The operation \spadfunFrom{wholeRagits}{RadixExpansion} returns a +list of the ragits for the integral part of the number. }{ \spadpaste{w := wholeRagits a \free{a}\bound{w}} } \xtc{ -The operations \spadfunFrom{prefixRagits}{RadixExpansion} and \spadfunFrom{cycleRagits}{RadixExpansion} +The operations \spadfunFrom{prefixRagits}{RadixExpansion} and +\spadfunFrom{cycleRagits}{RadixExpansion} return lists of the initial and repeating ragits in the fractional part of the number. }{ @@ -18846,7 +17292,8 @@ whole, prefix and cycle parts. The declaration is necessary to let Axiom know the base of the ragits. }{ -\spadpaste{u:RadixExpansion(8):=wholeRadix(w)+fractRadix(f0,f1) \free{w f0 f1}\bound{u}} +\spadpaste{u:RadixExpansion(8):=wholeRadix(w)+fractRadix(f0,f1) +\free{w f0 f1}\bound{u}} } \xtc{ If there is no repeating part, then the list \spad{[0]} should be used. @@ -18868,9 +17315,12 @@ Of course, it's possible to recover the fraction representation: \showBlurb{RadixExpansion} More examples of expansions are available in -\downlink{`DecimalExpansion'}{DecimalExpansionXmpPage}\ignore{DecimalExpansion}, -\downlink{`BinaryExpansion'}{BinaryExpansionXmpPage}\ignore{BinaryExpansion}, and -\downlink{`HexadecimalExpansion'}{HexadecimalExpansionXmpPage}\ignore{HexadecimalExpansion}. +\downlink{`DecimalExpansion'}{DecimalExpansionXmpPage} +\ignore{DecimalExpansion}, +\downlink{`BinaryExpansion'}{BinaryExpansionXmpPage} +\ignore{BinaryExpansion}, and +\downlink{`HexadecimalExpansion'}{HexExpansionXmpPage} +\ignore{HexadecimalExpansion}. \endscroll \autobuttons \end{page} @@ -18878,16 +17328,7 @@ More examples of expansions are available in @ \section{reclos.ht} -<>= -\newcommand{\RealClosureXmpTitle}{RealClosure} -\newcommand{\RealClosureXmpNumber}{9.66} - -@ -\subsection{RealClosure} -\label{RealClosureXmpPage} -\index{pages!RealClosureXmpPage!reclos.ht} -\index{reclos.ht!pages!RealClosureXmpPage} -\index{RealClosureXmpPage!reclos.ht!pages} +\pagehead{RealClosureXmpPage}{reclos.ht}{RealClosure} <>= \begin{page}{RealClosureXmpPage}{RealClosure} \beginscroll @@ -18897,39 +17338,37 @@ Renaud Rioboo (Renaud.Rioboo@lip6.fr) consists of different packages, categories and domains : \begin{items} -\item The package \axiomType{RealPolynomialUtilitiesPackage} which needs -a \axiomType{Field} {\em F} and a -\axiomType{UnivariatePolynomialCategory} domain with coefficients in {\em F}. -It computes some -simple functions such as Sturm and Sylvester sequences -(\axiomOpFrom{sturmSequence}{RealPolynomialUtilitiesPackage}, +\item The package \axiomType{RealPolynomialUtilitiesPackage} which +needs a \axiomType{Field} {\em F} and a +\axiomType{UnivariatePolynomialCategory} domain with coefficients in +{\em F}. It computes some simple functions such as Sturm and +Sylvester sequences +(\axiomOpFrom{sturmSequence}{RealPolynomialUtilitiesPackage}, \axiomOpFrom{sylvesterSequence}{RealPolynomialUtilitiesPackage}). -\item The category \axiomType{RealRootCharacterizationCategory} provides -abstract -functions to work with "real roots" of univariate polynomials. These -resemble variables with some functionality needed to compute important -operations. - -\item The category \axiomType{RealClosedField} provides common operations -available over -real closed fiels. These include finding all the roots of a univariate -polynomial, taking square (and higher) roots, ... - -\item The domain \axiomType{RightOpenIntervalRootCharacterization} is the -main code that -provides the functionality of \axiomType{RealRootCharacterizationCategory} -for the case -of archimedean fields. Abstract roots are encoded with a left closed right -open interval containing the root together with a defining polynomial for the -root. - -\item The \axiomType{RealClosure} domain is the end-user code. It provides -usual arithmetic -with real algebraic numbers, along with the functionality of a real closed -field. It also provides functions to approximate a real algebraic number by an -element of the base field. This approximation may either be absolute -(\axiomOpFrom{approximate}{RealClosure}) or relative +\item The category \axiomType{RealRootCharacterizationCategory} +provides abstract functions to work with "real roots" of univariate +polynomials. These resemble variables with some functionality needed +to compute important operations. + +\item The category \axiomType{RealClosedField} provides common +operations available over real closed fiels. These include finding all +the roots of a univariate polynomial, taking square (and higher) +roots, ... + +\item The domain \axiomType{RightOpenIntervalRootCharacterization} is +the main code that provides the functionality of +\axiomType{RealRootCharacterizationCategory} for the case of +archimedean fields. Abstract roots are encoded with a left closed +right open interval containing the root together with a defining +polynomial for the root. + +\item The \axiomType{RealClosure} domain is the end-user code. It +provides usual arithmetic with real algebraic numbers, along with the +functionality of a real closed field. It also provides functions to +approximate a real algebraic number by an element of the base +field. This approximation may either be absolute +(\axiomOpFrom{approximate}{RealClosure}) or relative (\axiomOpFrom{relativeApprox}{RealClosure}). @@ -18937,33 +17376,33 @@ element of the base field. This approximation may either be absolute \centerline{CAVEATS} -Since real algebraic expressions are stored as depending on "real roots" which -are managed like variables, there is an ordering on these. This ordering is -dynamical in the sense that any new algebraic takes precedence over older -ones. In particular every creation function raises a new "real root". This has -the effect that when you type something like -\spad{sqrt(2) + sqrt(2)} you have two -new variables which happen to be equal. To avoid this name the expression such -as in \spad{s2 := sqrt(2) ; s2 + s2} +Since real algebraic expressions are stored as depending on "real +roots" which are managed like variables, there is an ordering on +these. This ordering is dynamical in the sense that any new algebraic +takes precedence over older ones. In particular every creation +function raises a new "real root". This has the effect that when you +type something like \spad{sqrt(2) + sqrt(2)} you have two new +variables which happen to be equal. To avoid this name the expression +such as in \spad{s2 := sqrt(2) ; s2 + s2} -Also note that computing times depend strongly on the ordering you implicitly -provide. Please provide algebraics in the order -which seems most natural to you. +Also note that computing times depend strongly on the ordering you +implicitly provide. Please provide algebraics in the order which seems +most natural to you. \centerline{LIMITATIONS} -This packages uses -algorithms which are published in [1] and [2] which are based on field -arithmetics, in particular for polynomial gcd related algorithms. This can be -quite slow for high degree polynomials and subresultants methods usually work -best. Beta versions of the package try to use these techniques in a better -way and work significantly faster. These are mostly based on unpublished -algorithms and cannot be distributed. Please contact the author if you have a +This packages uses algorithms which are published in [1] and [2] which +are based on field arithmetics, in particular for polynomial gcd +related algorithms. This can be quite slow for high degree polynomials +and subresultants methods usually work best. Beta versions of the +package try to use these techniques in a better way and work +significantly faster. These are mostly based on unpublished algorithms +and cannot be distributed. Please contact the author if you have a particular problem to solve or want to use these versions. Be aware that approximations behave as post-processing and that all -computations are done exactly. They can thus be quite time consuming when -depending on several "real roots". +computations are done exactly. They can thus be quite time consuming +when depending on several "real roots". \centerline{REFERENCES} @@ -18988,12 +17427,14 @@ rational numbers. Some simple signs for square roots, these correspond to an extension of degree 16 of the rational numbers. Examples provided by J. Abbot. }{ -\spadpaste{fourSquares(a:Ran,b:Ran,c:Ran,d:Ran):Ran == sqrt(a)+sqrt(b) - sqrt(c)-sqrt(d) \free{Ran} \bound{fs}} +\spadpaste{fourSquares(a:Ran,b:Ran,c:Ran,d:Ran):Ran == sqrt(a)+sqrt(b) - +sqrt(c)-sqrt(d) \free{Ran} \bound{fs}} } \xtc{ These produce values very close to zero. }{ -\spadpaste{squareDiff1 := fourSquares(73,548,60,586) \free{fs}\bound{sd1}} +\spadpaste{squareDiff1 := fourSquares(73,548,60,586) \free{fs} +\bound{sd1}} } \xtc{ }{ @@ -19005,7 +17446,8 @@ These produce values very close to zero. } \xtc{ }{ -\spadpaste{squareDiff2 := fourSquares(165,778,86,990) \free{fs}\bound{sd2}} +\spadpaste{squareDiff2 := fourSquares(165,778,86,990) \free{fs} +\bound{sd2}} } \xtc{ }{ @@ -19017,7 +17459,8 @@ These produce values very close to zero. } \xtc{ }{ -\spadpaste{squareDiff3 := fourSquares(217,708,226,692) \free{fs}\bound{sd3}} +\spadpaste{squareDiff3 := fourSquares(217,708,226,692) \free{fs} +\bound{sd3}} } \xtc{ }{ @@ -19029,7 +17472,8 @@ These produce values very close to zero. } \xtc{ }{ -\spadpaste{squareDiff4 := fourSquares(155,836,162,820) \free{fs}\bound{sd4}} +\spadpaste{squareDiff4 := fourSquares(155,836,162,820) +\free{fs}\bound{sd4}} } \xtc{ }{ @@ -19041,7 +17485,8 @@ These produce values very close to zero. } \xtc{ }{ -\spadpaste{squareDiff5 := fourSquares(591,772,552,818) \free{fs}\bound{sd5}} +\spadpaste{squareDiff5 := fourSquares(591,772,552,818) +\free{fs}\bound{sd5}} } \xtc{ }{ @@ -19053,7 +17498,8 @@ These produce values very close to zero. } \xtc{ }{ -\spadpaste{squareDiff6 := fourSquares(434,1053,412,1088) \free{fs}\bound{sd6}} +\spadpaste{squareDiff6 := fourSquares(434,1053,412,1088) +\free{fs}\bound{sd6}} } \xtc{ }{ @@ -19065,7 +17511,8 @@ These produce values very close to zero. } \xtc{ }{ -\spadpaste{squareDiff7 := fourSquares(514,1049,446,1152) \free{fs}\bound{sd7}} +\spadpaste{squareDiff7 := fourSquares(514,1049,446,1152) +\free{fs}\bound{sd7}} } \xtc{ }{ @@ -19077,7 +17524,8 @@ These produce values very close to zero. } \xtc{ }{ -\spadpaste{squareDiff8 := fourSquares(190,1751,208,1698) \free{fs}\bound{sd8}} +\spadpaste{squareDiff8 := fourSquares(190,1751,208,1698) +\free{fs}\bound{sd8}} } \xtc{ }{ @@ -19116,11 +17564,13 @@ Check the sum and product A more complicated test that involve an extension of degree 256. This is a way of checking nested radical identities. }{ -\spadpaste{(s2, s5, s10) := (sqrt(2)$Ran, sqrt(5)$Ran, sqrt(10)$Ran) \free{Ran}\bound{s2}\bound{s5}\bound{s10}} +\spadpaste{(s2, s5, s10) := (sqrt(2)$Ran, sqrt(5)$Ran, sqrt(10)$Ran) +\free{Ran}\bound{s2}\bound{s5}\bound{s10}} } \xtc{ }{ -\spadpaste{eq1:=sqrt(s10+3)*sqrt(s5+2) - sqrt(s10-3)*sqrt(s5-2) = sqrt(10*s2+10) \free{s2}\free{s5}\free{s10}\bound{eq1}} +\spadpaste{eq1:=sqrt(s10+3)*sqrt(s5+2) - sqrt(s10-3)*sqrt(s5-2) = +sqrt(10*s2+10) \free{s2}\free{s5}\free{s10}\bound{eq1}} } \xtc{ }{ @@ -19128,7 +17578,8 @@ This is a way of checking nested radical identities. } \xtc{ }{ -\spadpaste{eq2:=sqrt(s5+2)*sqrt(s2+1) - sqrt(s5-2)*sqrt(s2-1) = sqrt(2*s10+2)\free{s2}\free{s5}\free{s10}\bound{eq2}} +\spadpaste{eq2:=sqrt(s5+2)*sqrt(s2+1) - sqrt(s5-2)*sqrt(s2-1) = +sqrt(2*s10+2)\free{s2}\free{s5}\free{s10}\bound{eq2}} } \xtc{ }{ @@ -19159,7 +17610,8 @@ This should be null \xtc{ A quartic polynomial }{ -\spadpaste{pol : UP(x,Ran) := x**4+(7/3)*x**2+30*x-(100/3) \free{Ran} \bound{pol}} +\spadpaste{pol : UP(x,Ran) := x**4+(7/3)*x**2+30*x-(100/3) +\free{Ran} \bound{pol}} } \xtc{ Add some cubic roots @@ -19219,7 +17671,8 @@ The last one is due to Ramanujan. } \xtc{ }{ -\spadpaste{dst2:=sqrt(5+2*s6)+sqrt(5-2*s6) = 2*s3 \free{s6}\free{s3}\bound{dst2}} +\spadpaste{dst2:=sqrt(5+2*s6)+sqrt(5-2*s6) = 2*s3 +\free{s6}\free{s3}\bound{dst2}} } \xtc{ }{ @@ -19231,7 +17684,8 @@ The last one is due to Ramanujan. } \xtc{ }{ -\spadpaste{dst4:=sqrt(16-2*s29+2*sqrt(55-10*s29)) = sqrt(22+2*s5)-sqrt(11+2*s29)+s5 \free{s29}\free{s5}\bound{dst4}} +\spadpaste{dst4:=sqrt(16-2*s29+2*sqrt(55-10*s29)) = +sqrt(22+2*s5)-sqrt(11+2*s29)+s5 \free{s29}\free{s5}\bound{dst4}} } \xtc{ }{ @@ -19239,7 +17693,8 @@ The last one is due to Ramanujan. } \xtc{ }{ -\spadpaste{dst6:=sqrt((112+70*s2)+(46+34*s2)*s5) = (5+4*s2)+(3+s2)*s5 \free{s2}\free{s5}\bound{dst6}} +\spadpaste{dst6:=sqrt((112+70*s2)+(46+34*s2)*s5) = +(5+4*s2)+(3+s2)*s5 \free{s2}\free{s5}\bound{dst6}} } \xtc{ }{ @@ -19263,7 +17718,8 @@ The last one is due to Ramanujan. } \xtc{ }{ -\spadpaste{dst5:=sqrt((f32-f27,3)) = f25*(1+f3-f3**2)\free{f32}\free{f27}\free{f25}\free{f3}\bound{dst5}} +\spadpaste{dst5:=sqrt((f32-f27,3)) = f25*(1+f3-f3**2) +\free{f32}\free{f27}\free{f25}\free{f3}\bound{dst5}} } \xtc{ }{ @@ -19276,11 +17732,7 @@ The last one is due to Ramanujan. @ \section{record.ht} -\subsection{Domain {\bf Record(a:A,...,b:B)}} -\label{DomainRecord} -\index{pages!DomainRecord!record.ht} -\index{record.ht!pages!DomainRecord} -\index{DomainRecord!record.ht!pages} +\pagehead{DomainRecord}{record.ht}{Domain {\bf Record(a:A,...,b:B)}} <>= \begin{page}{DomainRecord}{Domain {\em Record(a:A,...,b:B)}} \beginscroll @@ -19295,21 +17747,22 @@ The last one is due to Ramanujan. This constructor is a primitive in Axiom. \newline \beginmenu -\item\menulispdownlink{Description}{(|dbSpecialDescription| '|Record|)}\tab{15}General description -\item\menulispdownlink{Operations}{(|dbSpecialOperations| '|Record|)}\tab{15}All exported operations of {\em Record(a:A,b:B)} -%\item\menudownlink{Examples} {RecordExamples} \tab{15}Examples illustrating use -%\item\menudownlink{Exports} {RecordExports} \tab{15}Explicit categories and operations +\item\menulispdownlink{Description} +{(|dbSpecialDescription| '|Record|)}\tab{15}General description +\item\menulispdownlink{Operations} +{(|dbSpecialOperations| '|Record|)} +\tab{15}All exported operations of {\em Record(a:A,b:B)} +%\item\menudownlink{Examples} {RecordExamples} +\tab{15}Examples illustrating use +%\item\menudownlink{Exports} {RecordExports} +\tab{15}Explicit categories and operations \endmenu \vspace{1}\newline The selectors {\em a,...,b} of a \spad{Record} type must be distinct. \endscroll\end{page} @ -\subsection{Domain Constructor {\bf Record}} -\label{RecordDescription} -\index{pages!RecordDescription!record.ht} -\index{record.ht!pages!RecordDescription} -\index{RecordDescription!record.ht!pages} +\pagehead{RecordDescription}{record.ht}{Domain Constructor {\bf Record}} <>= \begin{page}{RecordDescription}{Domain Constructor {\em Record}} \beginscroll @@ -19331,7 +17784,8 @@ as described below. {\em Record(a:A,b:B)} is used to create the class of pairs of objects made up of a value of type {\em A} selected by the symbol {\em a} and a value of type {\em B} selected by the symbol {\em b}. -In general, the {\em Record} constructor can take any number of arguments and thus can +In general, the {\em Record} constructor can take any +number of arguments and thus can be used to create aggregates of heterogeneous components of arbitrary size selectable by name. {\em Record} is a primitive domain of Axiom which cannot be @@ -19342,41 +17796,30 @@ defined in the Axiom language. @ \section{regset.ht} -<>= -\newcommand{\RegularTriangularSetXmpTitle}{RegularTriangularSet} -\newcommand{\RegularTriangularSetXmpNumber}{9.67} - -@ -\subsection{RegularTriangularSet} -\label{RegularTriangularSetXmpPage} -\index{pages!RegularTriangularSetXmpPage!regset.ht} -\index{regset.ht!pages!RegularTriangularSetXmpPage} -\index{RegularTriangularSetXmpPage!regset.ht!pages} +\pagehead{RegularTriangularSetXmpPage}{regset.ht}{RegularTriangularSet} <>= \begin{page}{RegularTriangularSetXmpPage}{RegularTriangularSet} \beginscroll The \spadtype{RegularTriangularSet} domain constructor implements -regular triangular sets. -These particular triangular sets were introduced by M. Kalkbrener (1991) -in his PhD Thesis under the name regular chains. -Regular chains and their related concepts are presented in -the paper "On the Theories of Triangular sets" By P. Aubry, D. Lazard -and M. Moreno Maza (to appear in the Journal of Symbolic Computation). -The \spadtype{RegularTriangularSet} -constructor also provides a new method (by the third author) -for solving polynomial system by means of regular chains. -This method has two ways of solving. -One has the same specifications as Kalkbrener's algorithm (1991) -and the other is closer to Lazard's method (Discr. App. Math, 1991). -Moreover, this new method removes redundant component from the -decompositions when this is not {\em too expensive}. -This is always the case with square-free regular chains. +regular triangular sets. These particular triangular sets were +introduced by M. Kalkbrener (1991) in his PhD Thesis under the name +regular chains. Regular chains and their related concepts are +presented in the paper "On the Theories of Triangular sets" By +P. Aubry, D. Lazard and M. Moreno Maza (to appear in the Journal of +Symbolic Computation). The \spadtype{RegularTriangularSet} +constructor also provides a new method (by the third author) for +solving polynomial system by means of regular chains. This method has +two ways of solving. One has the same specifications as Kalkbrener's +algorithm (1991) and the other is closer to Lazard's method +(Discr. App. Math, 1991). Moreover, this new method removes redundant +component from the decompositions when this is not {\em too +expensive}. This is always the case with square-free regular chains. So if you want to obtain decompositions without redundant components -just use the \spadtype{SquareFreeRegularTriangularSet} domain constructor -or the \spadtype{LazardSetSolvingPackage} package constructor. -See also the \spadtype{LexTriangularPackage} and -\spadtype{ZeroDimensionalSolvePackage} for the case of -algebraic systems with a finite number of (complex) solutions. +just use the \spadtype{SquareFreeRegularTriangularSet} domain +constructor or the \spadtype{LazardSetSolvingPackage} package +constructor. See also the \spadtype{LexTriangularPackage} and +\spadtype{ZeroDimensionalSolvePackage} for the case of algebraic +systems with a finite number of (complex) solutions. One of the main features of regular triangular sets is that they naturally define towers of simple extensions of a field. @@ -19384,29 +17827,26 @@ This allows to perform with multivariate polynomials the same kind of operations as one can do in an \spadtype{EuclideanDomain}. The \spadtype{RegularTriangularSet} constructor takes four arguments. -The first one, {\bf R}, is the coefficient ring of the polynomials; -it must belong to the category \spadtype{GcdDomain}. -The second one, {\bf E}, is the exponent monoid of the polynomials; -it must belong to the category \spadtype{OrderedAbelianMonoidSup}. -the third one, {\bf V}, is the ordered set of variables; -it must belong to the category \spadtype{OrderedSet}. -The last one is the polynomial ring; -it must belong to the category \spadtype{RecursivePolynomialCategory(R,E,V)}. +The first one, {\bf R}, is the coefficient ring of the polynomials; it +must belong to the category \spadtype{GcdDomain}. The second one, +{\bf E}, is the exponent monoid of the polynomials; it must belong to +the category \spadtype{OrderedAbelianMonoidSup}. the third one, {\bf +V}, is the ordered set of variables; it must belong to the category +\spadtype{OrderedSet}. The last one is the polynomial ring; it must +belong to the category \spadtype{RecursivePolynomialCategory(R,E,V)}. The abbreviation for \spadtype{RegularTriangularSet} is -\spadtype{REGSET}. -See also the constructor \spadtype{RegularChain} which only takes -two arguments, the coefficient ring and the ordered set of variables; -in that case, polynomials are necessarily built with the -\spadtype{NewSparseMultivariatePolynomial} domain constructor. +\spadtype{REGSET}. See also the constructor \spadtype{RegularChain} +which only takes two arguments, the coefficient ring and the ordered +set of variables; in that case, polynomials are necessarily built with +the \spadtype{NewSparseMultivariatePolynomial} domain constructor. We shall explain now how to use the constructor \spadtype{REGSET} and how to read the decomposition of a polynomial system by means of regular sets. -Let us give some examples. -We start with an easy one (Donati-Traverso) -in order to understand the two ways of -solving polynomial systems provided by the \spadtype{REGSET} constructor. +Let us give some examples. We start with an easy one +(Donati-Traverso) in order to understand the two ways of solving +polynomial systems provided by the \spadtype{REGSET} constructor. \xtc{ Define the coefficient ring. }{ @@ -19452,7 +17892,8 @@ Let the variables be polynomial. \xtc{ Now call the \spadtype{RegularTriangularSet} domain constructor. }{ -\spadpaste{T := REGSET(R,E,V,P) \free{R} \free{E} \free{V} \free{P} \bound{T} } +\spadpaste{T := REGSET(R,E,V,P) \free{R} \free{E} +\free{V} \free{P} \bound{T} } } \xtc{ Define a polynomial system. @@ -19486,32 +17927,28 @@ We can see that the first decomposition is a subset of the second. So how can both be correct ? Recall first that polynomials from a domain of the category -\spadtype{RecursivePolynomialCategory} are regarded -as univariate polynomials in their main variable. -For instance the second polynomial in the first set -of each decomposition has main variable {\bf y} -and its initial (i.e. its leading coefficient w.r.t. its main +\spadtype{RecursivePolynomialCategory} are regarded as univariate +polynomials in their main variable. For instance the second +polynomial in the first set of each decomposition has main variable +{\bf y} and its initial (i.e. its leading coefficient w.r.t. its main variable) is {\bf t z}. -Now let us explain how to read the second decomposition. -Note that the non-constant initials of the first set are -\texht{$t^4-t$}{{\bf t^4 - t}} and \texht{$t z$}{{\bf t z}}. -Then the solutions described by this first set are the common -zeros of its polynomials that do not cancel the polynomials -\texht{$t^4-t$}{{\bf t^4 - t}} and \texht{$ty z$}{{\bf t z}}. -Now the solutions of the input system {\bf lp} satisfying -these equations are described by the second and the third -sets of the decomposition. -Thus, in some sense, they can be considered as degenerated -solutions. -The solutions given by the first set are called the generic -points of the system; they give the general form of the -solutions. -The first decomposition only provides these generic points. -This latter decomposition is useful when they are many degenerated -solutions (which is sometimes hard to compute) and when -one is only interested in general informations, like -the dimension of the input system. +Now let us explain how to read the second decomposition. Note that +the non-constant initials of the first set are \texht{$t^4-t$}{{\bf +t^4 - t}} and \texht{$t z$}{{\bf t z}}. Then the solutions described +by this first set are the common zeros of its polynomials that do not +cancel the polynomials \texht{$t^4-t$}{{\bf t^4 - t}} and +\texht{$ty z$}{{\bf t z}}. +Now the solutions of the input system {\bf lp} +satisfying these equations are described by the second and the third +sets of the decomposition. Thus, in some sense, they can be +considered as degenerated solutions. The solutions given by the first +set are called the generic points of the system; they give the general +form of the solutions. The first decomposition only provides these +generic points. This latter decomposition is useful when they are +many degenerated solutions (which is sometimes hard to compute) and +when one is only interested in general informations, like the +dimension of the input system. \xtc{ We can get the dimensions of each component @@ -19574,23 +18011,30 @@ we shall see with this second example (Caprasse). \xtc{ Define a polynomial system. }{ -\spadpaste{f1 := y**2*z+2*x*y*t-2*x-z \free{z} \free{x} \free{y} \free{t} \bound{f1}} +\spadpaste{f1 := y**2*z+2*x*y*t-2*x-z \free{z} \free{x} +\free{y} \free{t} \bound{f1}} } \xtc{ }{ -\spadpaste{f2 := -x**3*z+ 4*x*y**2*z+ 4*x**2*y*t+ 2*y**3*t+ 4*x**2- 10*y**2+ 4*x*z- 10*y*t+ 2 \free{z} \free{x} \free{y} \free{t} \bound{f2}} +\spadpaste{f2 := -x**3*z+ 4*x*y**2*z+ 4*x**2*y*t+ 2*y**3*t+ +4*x**2- 10*y**2+ 4*x*z- 10*y*t+ 2 \free{z} \free{x} \free{y} +\free{t} \bound{f2}} } \xtc{ }{ -\spadpaste{f3 := 2*y*z*t+x*t**2-x-2*z \free{z} \free{x} \free{y} \free{t} \bound{f3}} +\spadpaste{f3 := 2*y*z*t+x*t**2-x-2*z \free{z} \free{x} \free{y} +\free{t} \bound{f3}} } \xtc{ }{ -\spadpaste{f4 := -x*z**3+ 4*y*z**2*t+ 4*x*z*t**2+ 2*y*t**3+ 4*x*z+ 4*z**2-10*y*t- 10*t**2+2 \free{z} \free{x} \free{y} \free{t} \bound{f4}} +\spadpaste{f4 := -x*z**3+ 4*y*z**2*t+ 4*x*z*t**2+ 2*y*t**3+ +4*x*z+ 4*z**2-10*y*t- 10*t**2+2 \free{z} \free{x} \free{y} +\free{t} \bound{f4}} } \xtc{ }{ -\spadpaste{lf := [f1, f2, f3, f4] \free{f1} \free{f2} \free{f3} \free{f4} \bound{lf}} +\spadpaste{lf := [f1, f2, f3, f4] \free{f1} \free{f2} +\free{f3} \free{f4} \bound{lf}} } \xtc{ @@ -19601,7 +18045,8 @@ First of all, let us solve this system in the sense of Kalkbrener. \xtc{ And now in the sense of Lazard (or Wu and other authors). }{ -\spadpaste{lts2 := zeroSetSplit(lf,false)$T \free{lf} \free{T} \bound{lts2}} +\spadpaste{lts2 := zeroSetSplit(lf,false)$T \free{lf} +\free{T} \bound{lts2}} } Up to the ordering of the components, both decompositions are identical. @@ -19615,7 +18060,8 @@ Let us check that each component has a finite number of solutions. \xtc{ Let us count the degrees of each component, }{ -\spadpaste{degrees := [degree(ts) for ts in lts2] \free{lts2} \bound{degrees}} +\spadpaste{degrees := [degree(ts) for ts in lts2] +\free{lts2} \bound{degrees}} } \xtc{ and compute their sum. @@ -19636,41 +18082,30 @@ argument must be present). This second option allows you to get some information during the computations. -Therefore, we need to understand a little what is -going on during the computations. -An important feature of the algorithm is that -the intermediate computations are managed in some sense -like the processes of a Unix system. -Indeed, each intermediate computation may generate -other intermediate computations and the management -of all these computations is a crucial task for -the efficiency. -Thus any intermediate computation may be suspended, -killed or resumed, depending on algebraic considerations -that determine priorities for these processes. -The goal is of course to go as fast as possible -towards the final decomposition which means to avoid -as much as possible unnecessary computations. - -To follow the computations, one needs to set to -\spad{true} the second argument. -Then a lot of numbers and letters are displayed. -Between a \spad{[} and a \spad{]} one has -the state of the processes at a given time. -Just after \spad{[} one can see the number of -processes. -Then each process is represented by two numbers -between \spad{<} and \spad{>}. -A process consists of a list of polynomial {\bf ps} -and a triangular set {\bf ts}; its goal is to compute -the common zeros of {\bf ps} that belong to the -regular-zeros set of {\bf ts}. -After the processes, the number between pipes -gives the total number of polynomials -in all the sets \spad{ps}. -Finally, the number between braces gives the number -of components of a decomposition that are already -computed. This number may decrease. +Therefore, we need to understand a little what is going on during the +computations. An important feature of the algorithm is that the +intermediate computations are managed in some sense like the processes +of a Unix system. Indeed, each intermediate computation may generate +other intermediate computations and the management of all these +computations is a crucial task for the efficiency. Thus any +intermediate computation may be suspended, killed or resumed, +depending on algebraic considerations that determine priorities for +these processes. The goal is of course to go as fast as possible +towards the final decomposition which means to avoid as much as +possible unnecessary computations. + +To follow the computations, one needs to set to \spad{true} the second +argument. Then a lot of numbers and letters are displayed. Between a +\spad{[} and a \spad{]} one has the state of the processes at a given +time. Just after \spad{[} one can see the number of processes. Then +each process is represented by two numbers between \spad{<} and +\spad{>}. A process consists of a list of polynomial {\bf ps} and a +triangular set {\bf ts}; its goal is to compute the common zeros of +{\bf ps} that belong to the regular-zeros set of {\bf ts}. After the +processes, the number between pipes gives the total number of +polynomials in all the sets \spad{ps}. Finally, the number between +braces gives the number of components of a decomposition that are +already computed. This number may decrease. Let us take a third example (Czapor-Geddes-Wang) to see how these informations are displayed. @@ -19682,26 +18117,36 @@ Define a polynomial system. } \xtc{ }{ -\spadpaste{q1 := 2*(u-1)**2+ 2*(x-z*x+z**2)+ y**2*(x-1)**2- 2*u*x+ 2*y*t*(1-x)*(x-z)+ 2*u*z*t*(t-y)+ u**2*t**2*(1-2*z)+ 2*u*t**2*(z-x)+ 2*u*t*y*(z-1)+ 2*u*z*x*(y+1)+ (u**2-2*u)*z**2*t**2+ 2*u**2*z**2+ 4*u*(1-u)*z+ t**2*(z-x)**2 \free{z} \free{x} \free{y} \free{t} \free{u} \bound{q1}} +\spadpaste{q1 := 2*(u-1)**2+ 2*(x-z*x+z**2)+ y**2*(x-1)**2- +2*u*x+ 2*y*t*(1-x)*(x-z)+ 2*u*z*t*(t-y)+ u**2*t**2*(1-2*z)+ +2*u*t**2*(z-x)+ 2*u*t*y*(z-1)+ 2*u*z*x*(y+1)+ +(u**2-2*u)*z**2*t**2+ 2*u**2*z**2+ 4*u*(1-u)*z+ t**2*(z-x)**2 +\free{z} \free{x} \free{y} \free{t} \free{u} \bound{q1}} } \xtc{ }{ -\spadpaste{q2 := t*(2*z+1)*(x-z)+ y*(z+2)*(1-x)+ u*(u-2)*t+ u*(1-2*u)*z*t+ u*y*(x+u-z*x-1)+ u*(u+1)*z**2*t \free{z} \free{x} \free{y} \free{t} \free{u} \bound{q2}} +\spadpaste{q2 := t*(2*z+1)*(x-z)+ y*(z+2)*(1-x)+ u*(u-2)*t+ +u*(1-2*u)*z*t+ u*y*(x+u-z*x-1)+ u*(u+1)*z**2*t \free{z} +\free{x} \free{y} \free{t} \free{u} \bound{q2}} } \xtc{ }{ -\spadpaste{q3 := -u**2*(z-1)**2+ 2*z*(z-x)-2*(x-1) \free{z} \free{x} \free{y} \free{t} \free{u} \bound{q3}} +\spadpaste{q3 := -u**2*(z-1)**2+ 2*z*(z-x)-2*(x-1) \free{z} +\free{x} \free{y} \free{t} \free{u} \bound{q3}} } \xtc{ }{ -\spadpaste{q4 := u**2+4*(z-x**2)+3*y**2*(x-1)**2- 3*t**2*(z-x)**2 +3*u**2*t**2*(z-1)**2+u**2*z*(z-2)+6*u*t*y*(z+x+z*x-1) \free{z} \free{x} \free{y} \free{t} \free{u} \bound{q4}} +\spadpaste{q4 := u**2+4*(z-x**2)+3*y**2*(x-1)**2- +3*t**2*(z-x)**2 +3*u**2*t**2*(z-1)**2+u**2*z*(z-2)+ +6*u*t*y*(z+x+z*x-1) \free{z} \free{x} \free{y} \free{t} +\free{u} \bound{q4}} } \xtc{ }{ -\spadpaste{lq := [q1, q2, q3, q4] \free{q1} \free{q2} \free{q3} \free{q4} \bound{lq}} +\spadpaste{lq := [q1, q2, q3, q4] \free{q1} \free{q2} +\free{q3} \free{q4} \bound{lq}} } - \xtc{ Let us try the information option. N.B. The timing should be between 1 and 10 minutes, depending on your machine. @@ -19709,66 +18154,59 @@ N.B. The timing should be between 1 and 10 minutes, depending on your machine. \spadpaste{zeroSetSplit(lq,true,true)$T \free{lq} \free{T}} } -Between a sequence of processes, thus between a \spad{]} and a \spad{[} -you can see capital letters \spad{W, G, I} and lower case letters -\spad{i, w}. Each time a capital letter appears a non-trivial computation -has be performed and its result is put in a hash-table. -Each time a lower case letter appears a needed result has been -found in an hash-table. -The use of these hash-tables generally speed up the computations. -However, on very large systems, it may happen that these hash-tables -become too big to be handle by your Axiom configuration. -Then in these exceptional cases, you may prefer getting a result -(even if it takes a long time) than getting nothing. -Hence you need to know how to prevent the \spadtype{RSEGSET} constructor -from using these hash-tables. -In that case you will be using the \spadfun{zeroSetSplit} with five arguments. -The first one is the input system {\bf lp} as above. -The second one is a boolean value \spad{hash?} which is \spad{true} -iff you want to use hash-tables. -The third one is boolean value \spad{clos?} which is \spad{true} -iff you want to solve your system in the sense of Kalkbrener, -the other way remaining that of Lazard. -The fourth argument is boolean value \spad{info?} which is \spad{true} -iff you want to display information during the computations. -The last one is boolean value \spad{prep?} which is \spad{true} -iff you want to use some heuristics that are performed on the -input system before starting the real algorithm. -The value of this flag is \spad{true} when you are using \spadfun{zeroSetSplit} -with less than five arguments. -Note that there is no available signature for \spadfun{zeroSetSplit} with +Between a sequence of processes, thus between a \spad{]} and a +\spad{[} you can see capital letters \spad{W, G, I} and lower case +letters \spad{i, w}. Each time a capital letter appears a non-trivial +computation has be performed and its result is put in a hash-table. +Each time a lower case letter appears a needed result has been found +in an hash-table. The use of these hash-tables generally speed up the +computations. However, on very large systems, it may happen that +these hash-tables become too big to be handle by your Axiom +configuration. Then in these exceptional cases, you may prefer +getting a result (even if it takes a long time) than getting nothing. +Hence you need to know how to prevent the \spadtype{RSEGSET} +constructor from using these hash-tables. In that case you will be +using the \spadfun{zeroSetSplit} with five arguments. The first one +is the input system {\bf lp} as above. The second one is a boolean +value \spad{hash?} which is \spad{true} iff you want to use +hash-tables. The third one is boolean value \spad{clos?} which is +\spad{true} iff you want to solve your system in the sense of +Kalkbrener, the other way remaining that of Lazard. The fourth +argument is boolean value \spad{info?} which is \spad{true} iff you +want to display information during the computations. The last one is +boolean value \spad{prep?} which is \spad{true} iff you want to use +some heuristics that are performed on the input system before starting +the real algorithm. The value of this flag is \spad{true} when you +are using \spadfun{zeroSetSplit} with less than five arguments. Note +that there is no available signature for \spadfun{zeroSetSplit} with four arguments. -We finish this section by some remarks about both ways of -solving, in the sense of Kalkbrener or in the sense of Lazard. -For problems with a finite number of solutions, there are -theoretically equivalent and the resulting decompositions -are identical, up to the ordering of the components. -However, when solving in the sense of Lazard, the algorithm -behaves differently. -In that case, it becomes more incremental than in the sense -of Kalkbrener. That means the polynomials of the input system -are considered one after another whereas in the sense of Kalkbrener -the input system is treated more globally. - -This makes an important difference in positive dimension. -Indeed when solving in the sense of Kalkbrener, the -{\em Primeidealkettensatz} of Krull is used. -That means any regular triangular containing more polynomials -than the input system can be deleted. -This is not possible when solving in the sense of Lazard. -This explains why Kalkbrener's decompositions -usually contain less components than those of Lazard. -However, it may happen with some examples that the incremental process -(that cannot be used when solving in the sense of Kalkbrener) -provide a more efficient way of solving than the global one -even if the {\em Primeidealkettensatz} is used. -Thus just try both, with the various options, before concluding -that you cannot solve your favorite system with \spadfun{zeroSetSplit}. -There exist more options at the development level that are not -currently available in this public version. -So you are welcome to contact {\em marc@nag.co.uk} for more -information and help. +We finish this section by some remarks about both ways of solving, in +the sense of Kalkbrener or in the sense of Lazard. For problems with +a finite number of solutions, there are theoretically equivalent and +the resulting decompositions are identical, up to the ordering of the +components. However, when solving in the sense of Lazard, the +algorithm behaves differently. In that case, it becomes more +incremental than in the sense of Kalkbrener. That means the +polynomials of the input system are considered one after another +whereas in the sense of Kalkbrener the input system is treated more +globally. + +This makes an important difference in positive dimension. Indeed when +solving in the sense of Kalkbrener, the {\em Primeidealkettensatz} of +Krull is used. That means any regular triangular containing more +polynomials than the input system can be deleted. This is not +possible when solving in the sense of Lazard. This explains why +Kalkbrener's decompositions usually contain less components than those +of Lazard. However, it may happen with some examples that the +incremental process (that cannot be used when solving in the sense of +Kalkbrener) provide a more efficient way of solving than the global +one even if the {\em Primeidealkettensatz} is used. Thus just try +both, with the various options, before concluding that you cannot +solve your favorite system with \spadfun{zeroSetSplit}. There exist +more options at the development level that are not currently available +in this public version. So you are welcome to contact {\em +marc@nag.co.uk} for more information and help. \endscroll \autobuttons @@ -19776,16 +18214,7 @@ information and help. @ \section{roman.ht} -<>= -\newcommand{\RomanNumeralXmpTitle}{RomanNumeral} -\newcommand{\RomanNumeralXmpNumber}{9.68} - -@ -\subsection{RomanNumeral} -\label{RomanNumeralXmpPage} -\index{pages!RomanNumeralXmpPage!roman.ht} -\index{roman.ht!pages!RomanNumeralXmpPage} -\index{RomanNumeralXmpPage!roman.ht!pages} +\pagehead{RomanNumeralXmpPage}{roman.ht}{RomanNumeral} <>= \begin{page}{RomanNumeralXmpPage}{RomanNumeral} \beginscroll @@ -19834,10 +18263,12 @@ denominators, as this matrix Hilberticus illustrates. } \xtc{ }{ -\spadpaste{m := matrix [[1/(i + j) for i in 1..3] for j in 1..3] \free{m} \bound{m1}} +\spadpaste{m := matrix [[1/(i + j) for i in 1..3] for j in 1..3] +\free{m} \bound{m1}} } \xtc{ -Note that the inverse of the matrix has integral \spadtype{ROMAN} entries. +Note that the inverse of the matrix has integral \spadtype{ROMAN} +entries. }{ \spadpaste{inverse m \free{m1}} } @@ -19864,22 +18295,9 @@ to display the full list of operations defined by @ \section{seg.ht} -<>= -\newcommand{\SegmentXmpTitle}{Segment} -\newcommand{\SegmentXmpNumber}{9.69} - -@ -\subsection{Segment} -\label{SegmentXmpPage} -\begin{itemize} -\item SegmentBindingXmpPage \ref{SegmentBindingXmpPage} on -page~\pageref{SegmentBindingXmpPage} -\item UniversalSegmentXmpPage \ref{UniversalSegmentXmpPage} on -page~\pageref{UniversalSegmentXmpPage} -\end{itemize} -\index{pages!SegmentXmpPage!seg.ht} -\index{seg.ht!pages!SegmentXmpPage} -\index{SegmentXmpPage!seg.ht!pages} +\pagehead{SegmentXmpPage}{seg.ht}{Segment} +\pageto{notitle}{SegmentBindingXmpPage} +\pageto{notitle}{UniversalSegmentXmpPage} <>= \begin{page}{SegmentXmpPage}{Segment} \beginscroll @@ -19914,7 +18332,8 @@ An increment can be specified using the ``\spad{by}'' construct. \spadpaste{t := 10..3 by -2 \bound{t}} } \xtc{ -This part can be obtained using the \spadfunFrom{incr}{Segment} function. +This part can be obtained using the \spadfunFrom{incr}{Segment} +function. }{ \spadpaste{incr s \free{s}} } @@ -19955,8 +18374,8 @@ to appending lists obtained by expanding each segment individually. } For more information on related topics, see -\downlink{`SegmentBinding'}{SegmentBindingXmpPage}\ignore{SegmentBinding} and -\downlink{`UniversalSegment'}{UniversalSegmentXmpPage} +\downlink{`SegmentBinding'}{SegmentBindingXmpPage}\ignore{SegmentBinding} +and \downlink{`UniversalSegment'}{UniversalSegmentXmpPage} \ignore{UniversalSegment}. % \showBlurb{Segment} @@ -19966,22 +18385,9 @@ For more information on related topics, see @ \section{segbind.ht} -<>= -\newcommand{\SegmentBindingXmpTitle}{SegmentBinding} -\newcommand{\SegmentBindingXmpNumber}{9.70} - -@ -\subsection{SegmentBinding} -\label{SegmentBindingXmpPage} -\begin{itemize} -\item SegmentXmpPage \ref{SegmentXmpPage} on -page~\pageref{SegmentXmpPage} -\item UniversalSegmentXmpPage \ref{UniversalSegmentXmpPage} on -page~\pageref{UniversalSegmentXmpPage} -\end{itemize} -\index{pages!SegmentBindingXmpPage!segbind.ht} -\index{segbind.ht!pages!SegmentBindingXmpPage} -\index{SegmentBindingXmpPage!segbind.ht!pages} +\pagehead{SegmentBindingXmpPage}{segbind.ht}{SegmentBinding} +\pageto{notitle}{SegmentXmpPage} +\pageto{notitle}{UniversalSegmentXmpPage} <>= \begin{page}{SegmentBindingXmpPage}{SegmentBinding} \beginscroll @@ -20035,17 +18441,8 @@ For more information on related topics, see @ \section{set.ht} -<>= -\newcommand{\SetXmpTitle}{Set} -\newcommand{\SetXmpNumber}{9.71} - -@ -\subsection{Set} -\label{SetXmpPage} -See ListXmpPage \ref{ListXmpPage} on page~\pageref{ListXmpPage} -\index{pages!SetXmpPage!set.ht} -\index{set.ht!pages!SetXmpPage} -\index{SetXmpPage!set.ht!pages} +\pagehead{SetXmpPage}{page.ht}{Set} +\pageto{notitle}{ListXmpPage} <>= \begin{page}{SetXmpPage}{Set} \beginscroll @@ -20100,8 +18497,8 @@ Set membership is tested using the \spadfunFrom{member?}{Set} operation. \spadpaste{member?((y+1)*(y-1), s) \free{s}} } \xtc{ -The \spadfunFrom{subset?}{Set} function determines whether one set is a subset -of another. +The \spadfunFrom{subset?}{Set} function determines whether one set +is a subset of another. }{ \spadpaste{subset?(i, s) \free{i s}} } @@ -20116,7 +18513,8 @@ defined. This finds the set of all multiplicative generators of \spadtype{PrimeField 11}---the integers mod \spad{11.} }{ -\spadpaste{gs := set [g for i in 1..11 | primitive?(g := i::PF 11)] \bound{gs}} +\spadpaste{gs := set [g for i in 1..11 | primitive?(g := i::PF 11)] +\bound{gs}} } \xtc{ The following values are not generators. @@ -20133,7 +18531,8 @@ There are two ways to do this: \spadpaste{a := set [i**2 for i in 1..5] \bound{a}} } \xtc{ -One is to view a set as a data structure and to apply updating operations. +One is to view a set as a data structure and to apply updating +operations. }{ \spadpaste{insert!(32, a) \free{a}\bound{ainsert}} } @@ -20174,41 +18573,26 @@ For more information about lists, see @ \section{sint.ht} -<>= -\newcommand{\SingleIntegerXmpTitle}{SingleInteger} -\newcommand{\SingleIntegerXmpNumber}{9.72} - -@ -\subsection{SingleInteger} -\label{SingleIntegerXmpPage} -\begin{itemize} -\item ugTypesDeclarePage \ref{ugTypesDeclarePage} on -page~\pageref{ugTypesDeclarePage} -\item ugTypesPkgCallPage \ref{ugTypesPkgCallPage} on -page~\pageref{ugTypesPkgCallPage} -\item ugBrowsePage \ref{ugBrowsePage} on -page~\pageref{ugBrowsePage} -\end{itemize} -\index{pages!SingleIntegerXmpPage!sint.ht} -\index{sint.ht!pages!SingleIntegerXmpPage} -\index{SingleIntegerXmpPage!sint.ht!pages} +\pagehead{SingleIntegerXmpPage}{sint.ht}{SingleInteger} +\pageto{notitle}{ugTypesDeclarePage} +\pageto{notitle}{ugTypesPkgCallPage} +\pageto{notitle}{ugBrowsePage} <>= \begin{page}{SingleIntegerXmpPage}{SingleInteger} \beginscroll -The \axiomType{SingleInteger} domain is intended to provide support -in Axiom for machine integer arithmetic. -It is generally much faster than (bignum) \axiomType{Integer} arithmetic -but suffers from a limited range of values. -Since Axiom can be implemented on top of various -dialects of Lisp, the actual representation of small integers -may not correspond exactly to the host machines integer representation. +The \axiomType{SingleInteger} domain is intended to provide support in +Axiom for machine integer arithmetic. It is generally much faster +than (bignum) \axiomType{Integer} arithmetic but suffers from a +limited range of values. Since Axiom can be implemented on top of +various dialects of Lisp, the actual representation of small integers +may not correspond exactly to the host machines integer +representation. -In the CCL implementation of Axiom (Release 2.1 onwards) the underlying -representation of \axiomType{SingleInteger} -is the same as \axiomType{Integer}. -The underlying Lisp primitives treat machine-word sized computations -specially. +In the CCL implementation of Axiom (Release 2.1 onwards) the +underlying representation of \axiomType{SingleInteger} is the same as +\axiomType{Integer}. The underlying Lisp primitives treat +machine-word sized computations specially. \xtc{ You can discover the minimum and maximum values in your implementation @@ -20288,7 +18672,7 @@ if negative. Many other operations are available for small integers, including many of those provided for \axiomType{Integer}. -To see the other operations, use the Browse \HyperName{} facility +To see the other operations, use the Browse Hyperdoc facility (\downlink{``\ugBrowseTitle''}{ugBrowsePage} in Section \ugBrowseNumber\ignore{ugBrowse}). \showBlurb{SingleInteger}. @@ -20298,39 +18682,24 @@ To see the other operations, use the Browse \HyperName{} facility @ \section{sqmatrix.ht} +\pagehead{SqMatrixXmpPage}{sqmatrix.ht}{SquareMatrix} +\pageto{notitle}{MatrixXmpPage} +\pageto{notitle}{ugTypesWritingModesPage} +\pageto{notitle}{ugTypesExposePage} <>= -\newcommand{\SquareMatrixXmpTitle}{SquareMatrix} -\newcommand{\SquareMatrixXmpNumber}{9.74} - -@ -\subsection{SquareMatrix} -\label{SquareMatrixXmpPage} -\begin{itemize} -\item MatrixXmpPage \ref{MatrixXmpPage} on -page~\pageref{MatrixXmpPage} -\item ugTypesWritingModesPage \ref{ugTypesWritingModesPage} on -page~\pageref{ugTypesWritingModesPage} -\item ugTypesExposePage \ref{ugTypesExposePage} on -page~\pageref{ugTypesExposePage} -\end{itemize} -\index{pages!SquareMatrixXmpPage!sqmatrix.ht} -\index{sqmatrix.ht!pages!SquareMatrixXmpPage} -\index{SquareMatrixXmpPage!sqmatrix.ht!pages} -<>= -\begin{page}{SquareMatrixXmpPage}{SquareMatrix} +\begin{page}{SqMatrixXmpPage}{SquareMatrix} \beginscroll -The top level matrix type in Axiom is \spadtype{Matrix} -(see \downlink{`Matrix'}{MatrixXmpPage}\ignore{Matrix}), which -provides basic arithmetic and linear algebra functions. -However, since the matrices can be of any size it is not true that any pair -can be added or multiplied. -Thus \spadtype{Matrix} has little algebraic structure. +The top level matrix type in Axiom is \spadtype{Matrix} (see +\downlink{`Matrix'}{MatrixXmpPage}\ignore{Matrix}), which provides +basic arithmetic and linear algebra functions. However, since the +matrices can be of any size it is not true that any pair can be added +or multiplied. Thus \spadtype{Matrix} has little algebraic structure. -Sometimes you want to use matrices as coefficients for polynomials -or in other algebraic contexts. In this case, \spadtype{SquareMatrix} -should be used. The domain \spadtype{SquareMatrix(n,R)} gives the ring of -\spad{n} by \spad{n} square matrices over \spad{R}. +Sometimes you want to use matrices as coefficients for polynomials or +in other algebraic contexts. In this case, \spadtype{SquareMatrix} +should be used. The domain \spadtype{SquareMatrix(n,R)} gives the +ring of \spad{n} by \spad{n} square matrices over \spad{R}. \xtc{ Since \spadtype{SquareMatrix} is not normally exposed at the top level, @@ -20362,7 +18731,8 @@ Or you can construct a polynomial with square matrix coefficients. \spadpaste{p := (x + m)**2 \free{m}\bound{p}} } \xtc{ -This value can be converted to a square matrix with polynomial coefficients. +This value can be converted to a square matrix with polynomial +coefficients. }{ \spadpaste{p::SquareMatrix(2, ?) \free{p}} } @@ -20380,75 +18750,61 @@ in Section \ugTypesExposeNumber\ignore{ugTypesExpose}, and @ \section{sregset.ht} +\pagehead{SqFreeRegTriangSetXmpPage}{sregset.ht} +{SquareFreeRegularTriangularSet} <>= -\newcommand{\SquareFreeRegularTriangularSetXmpTitle}{SquareFreeRegularTriangularSet} -\newcommand{\SquareFreeRegularTriangularSetXmpNumber}{9.75} - -@ -\subsection{SquareFreeRegularTriangularSet} -\label{SquareFreeRegularTriangularSetXmpPage} -\index{pages!SquareFreeRegularTriangularSetXmpPage!sregset.ht} -\index{sregset.ht!pages!SquareFreeRegularTriangularSetXmpPage} -\index{SquareFreeRegularTriangularSetXmpPage!sregset.ht!pages} -<>= -\begin{page}{SquareFreeRegularTriangularSetXmpPage} +\begin{page}{SqFreeRegTriangSetXmpPage} {SquareFreeRegularTriangularSet} \beginscroll -The \spadtype{SquareFreeRegularTriangularSet} domain constructor implements -square-free regular triangular sets. -See the \spadtype{RegularTriangularSet} domain constructor -for general regular triangular sets. -Let {\em T} be a regular triangular set consisting of polynomials -{\em t1, ..., tm} ordered by increasing main variables. -The regular triangular set {\em T} is square-free if {\em T} -is empty or if {\em t1, ..., tm-1} is square-free and if -the polynomial {\em tm} is square-free as -a univariate polynomial with coefficients in the tower -of simple extensions associated with {\em t1, ..., tm-1}. - -The main interest of square-free regular triangular sets -is that their associated towers of simple extensions -are product of fields. -Consequently, the saturated ideal of a square-free regular triangular set -is radical. -This property simplifies some of the operations related -to regular triangular sets. -However, building square-free regular triangular sets -is generally more expensive than building + +The \spadtype{SquareFreeRegularTriangularSet} domain constructor +implements square-free regular triangular sets. See the +\spadtype{RegularTriangularSet} domain constructor for general regular +triangular sets. Let {\em T} be a regular triangular set consisting +of polynomials {\em t1, ..., tm} ordered by increasing main variables. +The regular triangular set {\em T} is square-free if {\em T} is empty +or if {\em t1, ..., tm-1} is square-free and if the polynomial {\em +tm} is square-free as a univariate polynomial with coefficients in the +tower of simple extensions associated with {\em t1, ..., tm-1}. + +The main interest of square-free regular triangular sets is that their +associated towers of simple extensions are product of fields. +Consequently, the saturated ideal of a square-free regular triangular +set is radical. This property simplifies some of the operations +related to regular triangular sets. However, building square-free +regular triangular sets is generally more expensive than building general regular triangular sets. -As the \spadtype{RegularTriangularSet} domain constructor, -the \spadtype{SquareFreeRegularTriangularSet} -domain constructor also implements -a method for solving polynomial systems by means of regular triangular sets. -This is in fact the same method with some adaptations to take into -account the fact that the computed regular chains are square-free. -Note that it is also possible to pass from a decomposition -into general regular triangular sets to a decomposition into -square-free regular triangular sets. -This conversion is used internally by the -\spadtype{LazardSetSolvingPackage} package constructor. - -{\bf N.B.} When solving polynomial systems with the -\spadtype{SquareFreeRegularTriangularSet} domain constructor -or the \spadtype{LazardSetSolvingPackage} package constructor, -decompositions have no redundant components. -See also \spadtype{LexTriangularPackage} and -\spadtype{ZeroDimensionalSolvePackage} for the case of -algebraic systems with a finite number of (complex) solutions. +As the \spadtype{RegularTriangularSet} domain constructor, the +\spadtype{SquareFreeRegularTriangularSet} domain constructor also +implements a method for solving polynomial systems by means of regular +triangular sets. This is in fact the same method with some +adaptations to take into account the fact that the computed regular +chains are square-free. Note that it is also possible to pass from a +decomposition into general regular triangular sets to a decomposition +into square-free regular triangular sets. This conversion is used +internally by the \spadtype{LazardSetSolvingPackage} package +constructor. + +{\bf N.B.} When solving polynomial systems with the +\spadtype{SquareFreeRegularTriangularSet} domain constructor or the +\spadtype{LazardSetSolvingPackage} package constructor, decompositions +have no redundant components. See also +\spadtype{LexTriangularPackage} and +\spadtype{ZeroDimensionalSolvePackage} for the case of algebraic +systems with a finite number of (complex) solutions. We shall explain now how to use the constructor \spadtype{SquareFreeRegularTriangularSet}. -This constructor takes four arguments. -The first one, {\bf R}, is the coefficient ring of the polynomials; -it must belong to the category \spadtype{GcdDomain}. -The second one, {\bf E}, is the exponent monoid of the polynomials; -it must belong to the category \spadtype{OrderedAbelianMonoidSup}. -the third one, {\bf V}, is the ordered set of variables; -it must belong to the category \spadtype{OrderedSet}. -The last one is the polynomial ring; -it must belong to the category \spadtype{RecursivePolynomialCategory(R,E,V)}. +This constructor takes four arguments. The first one, {\bf R}, is the +coefficient ring of the polynomials; it must belong to the category +\spadtype{GcdDomain}. The second one, {\bf E}, is the exponent monoid +of the polynomials; it must belong to the category +\spadtype{OrderedAbelianMonoidSup}. the third one, {\bf V}, is the +ordered set of variables; it must belong to the category +\spadtype{OrderedSet}. The last one is the polynomial ring; it must +belong to the category \spadtype{RecursivePolynomialCategory(R,E,V)}. The abbreviation for \spadtype{SquareFreeRegularTriangularSet} is \spadtype{SREGSET}. @@ -20501,14 +18857,17 @@ Let the variables be polynomial. \spadpaste{t: P := 't \free{P} \bound{t}} } \xtc{ -Now call the \spadtype{SquareFreeRegularTriangularSet} domain constructor. +Now call the \spadtype{SquareFreeRegularTriangularSet} domain +constructor. }{ -\spadpaste{ST := SREGSET(R,E,V,P) \free{R} \free{E} \free{V} \free{P} \bound{ST} } +\spadpaste{ST := SREGSET(R,E,V,P) \free{R} \free{E} \free{V} +\free{P} \bound{ST} } } \xtc{ Define a polynomial system. }{ -\spadpaste{p1 := x ** 31 - x ** 6 - x - y \free{x} \free{y} \bound{p1}} +\spadpaste{p1 := x ** 31 - x ** 6 - x - y \free{x} \free{y} +\bound{p1}} } \xtc{ }{ @@ -20520,7 +18879,8 @@ Define a polynomial system. } \xtc{ }{ -\spadpaste{lp := [p1, p2, p3] \free{p1} \free{p2} \free{p3} \bound{lp}} +\spadpaste{lp := [p1, p2, p3] \free{p1} \free{p2} \free{p3} +\bound{lp}} } \xtc{ @@ -20531,22 +18891,28 @@ First of all, let us solve this system in the sense of Kalkbrener. \xtc{ And now in the sense of Lazard (or Wu and other authors). }{ -\spadpaste{zeroSetSplit(lp,false)$ST \free{lp} \free{ST} \bound{lts}} +\spadpaste{zeroSetSplit(lp,false)$ST \free{lp} \free{ST} +\bound{lts}} } -Now to see the difference with the \spadtype{RegularTriangularSet} domain constructor, +Now to see the difference with the \spadtype{RegularTriangularSet} +domain constructor, \xtc{ we define: }{ -\spadpaste{T := REGSET(R,E,V,P) \free{R} \free{E} \free{V} \free{P} \bound{T} } +\spadpaste{T := REGSET(R,E,V,P) \free{R} \free{E} \free{V} +\free{P} \bound{T} } } \xtc{ and compute: }{ -\spadpaste{lts := zeroSetSplit(lp,false)$T \free{lp} \free{T} \bound{lts}} +\spadpaste{lts := zeroSetSplit(lp,false)$T \free{lp} +\free{T} \bound{lts}} } -If you look at the second set in both decompositions in the sense of Lazard, -you will see that the polynomial with main variable {\bf y} is not the same. + +If you look at the second set in both decompositions in the sense of +Lazard, you will see that the polynomial with main variable {\bf y} is +not the same. Let us understand what has happened. \xtc{ @@ -20560,16 +18926,19 @@ We define: } \xtc{ }{ -\spadpaste{tower := collectUnder(ts,'y)$T \free{ts} \free{y} \free{T} \bound{tower}} +\spadpaste{tower := collectUnder(ts,'y)$T \free{ts} \free{y} +\free{T} \bound{tower}} } \xtc{ }{ -\spadpaste{pack := RegularTriangularSetGcdPackage(R,E,V,P,T) \free{R} \free{E} \free{V} \free{P} \free{T} \bound{pack}} +\spadpaste{pack := RegularTriangularSetGcdPackage(R,E,V,P,T) +\free{R} \free{E} \free{V} \free{P} \free{T} \bound{pack}} } \xtc{ Then we compute: }{ -\spadpaste{toseSquareFreePart(pol,tower)$pack \free{pol} \free{tower} \free{pack}} +\spadpaste{toseSquareFreePart(pol,tower)$pack \free{pol} +\free{tower} \free{pack}} } \endscroll \autobuttons @@ -20577,22 +18946,9 @@ Then we compute: @ \section{stbl.ht} -<>= -\newcommand{\SparseTableXmpTitle}{SparseTable} -\newcommand{\SparseTableXmpNumber}{9.73} - -@ -\subsection{SparseTable} -\label{SparseTableXmpPage} -\begin{itemize} -\item TableXmpPage \ref{TableXmpPage} on -page~\pageref{TableXmpPage} -\item GeneralSparseTableXmpPage \ref{GeneralSparseTableXmpPage} on -page~\pageref{GeneralSparseTableXmpPage} -\end{itemize} -\index{pages!SparseTableXmpPage!stbl.ht} -\index{stbl.ht!pages!SparseTableXmpPage} -\index{SparseTableXmpPage!stbl.ht!pages} +\pagehead{SparseTableXmpPage}{stbl.ht}{SparseTable} +\pageto{notitle}{TableXmpPage} +\pageto{notitle}{GeneralSparseTableXmpPage} <>= \begin{page}{SparseTableXmpPage}{SparseTable} \beginscroll @@ -20604,7 +18960,8 @@ Here we create a table to save strings under integer keys. The value \spad{"Try again!"} is returned if no other value has been stored for a key. }{ -\spadpaste{t: SparseTable(Integer, String, "Try again!") := table() \bound{t}} +\spadpaste{t: SparseTable(Integer, String, "Try again!") := table() +\bound{t}} } \xtc{ Entries can be stored in the table. @@ -20637,8 +18994,8 @@ functions can be used. \spadpaste{entries t \free{t1 t2}} } If a specific table representation -is required, the \spadtype{GeneralSparseTable} constructor should be used. -The domain \spadtype{SparseTable(K, E, dflt)} is equivalent to +is required, the \spadtype{GeneralSparseTable} constructor should be +used. The domain \spadtype{SparseTable(K, E, dflt)} is equivalent to \spadtype{GeneralSparseTable(K,E, Table(K,E), dflt)}. For more information, see \downlink{`Table'}{TableXmpPage}\ignore{Table} and @@ -20651,26 +19008,11 @@ For more information, see @ \section{stream.ht} -<>= -\newcommand{\StreamXmpTitle}{Stream} -\newcommand{\StreamXmpNumber}{9.76} - -@ -\subsection{Stream} -\label{StreamXmpPage} -\begin{itemize} -\item ugLangItsPage \ref{ugLangItsPage} on -page~\pageref{ugLangItsPage} -\item ugProblemSeriesPage \ref{ugProblemSeriesPage} on -page~\pageref{ugProblemSeriesPage} -\item ContinuedFractionXmpPage \ref{ContinuedFractionXmpPage} on -page~\pageref{ContinuedFractionXmpPage} -\item ListXmpPage \ref{ListXmpPage} on -page~\pageref{ListXmpPage} -\end{itemize} -\index{pages!StreamXmpPage!stream.ht} -\index{stream.ht!pages!StreamXmpPage} -\index{StreamXmpPage!stream.ht!pages} +\pagehead{StreamXmpPage}{stream.ht}{Stream} +\pageto{notitle}{ugLangItsPage} +\pageto{notitle}{ugProblemSeriesPage} +\pageto{notitle}{ContinuedFractionXmpPage} +\pageto{notitle}{ListXmpPage} <>= \begin{page}{StreamXmpPage}{Stream} \beginscroll @@ -20689,7 +19031,8 @@ This number may be changed to something else by the system command For the display purposes of this book, we have chosen a smaller value. \xtc{ More generally, you can construct a stream by specifying its initial -value and a function which, when given an element, creates the next element. +value and a function which, when given an element, creates the next +element. }{ \spadpaste{f : List INT -> List INT \bound{fdec}} } @@ -20702,8 +19045,9 @@ value and a function which, when given an element, creates the next element. \spadpaste{fibs := [i.2 for i in [generate(f,[1,1])]] \bound{fibs}\free{f}} } \xtc{ -You can create the stream of odd non-negative integers by either filtering -them from the integers, or by evaluating an expression for each integer. +You can create the stream of odd non-negative integers by either +filtering them from the integers, or by evaluating an expression for +each integer. }{ \spadpaste{[i for i in ints | odd? i] \free{ints}} } @@ -20761,22 +19105,9 @@ in Section \ugProblemSeriesNumber\ignore{ugProblemSeries}, @ \section{string.ht} -<>= -\newcommand{\StringXmpTitle}{String} -\newcommand{\StringXmpNumber}{9.77} - -@ -\subsection{String} -\label{StringXmpPage} -\begin{itemize} -\item CharacterXmpPage \ref{CharacterXmpPage} on -page~\pageref{CharacterXmpPage} -\item CharacterClassXmpPage \ref{CharacterClassXmpPage} on -page~\pageref{CharacterClassXmpPage} -\end{itemize} -\index{pages!StringXmpPage!string.ht} -\index{string.ht!pages!StringXmpPage} -\index{StringXmpPage!string.ht!pages} +\pagehead{StringXmpPage}{string.ht}{String} +\pageto{notitle}{CharacterXmpPage} +\pageto{notitle}{CharacterClassXmpPage} <>= \begin{page}{StringXmpPage}{String} \beginscroll @@ -20806,10 +19137,10 @@ an extra underscore. \spadpaste{saw := "She saw exactly one underscore: __." \bound{saw}} } \xtc{ -It is also possible to use \spadfunFrom{new}{String} to create a string of any size -filled with a given character. -Since there are many \spadfun{new} functions -it is necessary to indicate the desired type. +It is also possible to use \spadfunFrom{new}{String} to create a +string of any size filled with a given character. Since there are +many \spadfun{new} functions it is necessary to indicate the desired +type. }{ \spadpaste{gasp: String := new(32, char "x") \bound{gasp}} } @@ -20819,8 +19150,9 @@ The length of a string is given by \spadopFrom{\#}{List}. \spadpaste{\#gasp \free{gasp}} } \xtc{ -Indexing operations allow characters to be extracted or replaced in strings. -For any string \spad{s}, indices lie in the range \spad{1..\#s}. +Indexing operations allow characters to be extracted or replaced in +strings. For any string \spad{s}, +indices lie in the range \spad{1..\#s}. }{ \spadpaste{hello.2 \free{hello}} } @@ -20842,13 +19174,14 @@ before any updating operations are used. } \xtc{ }{ -\spadpaste{hullo.2 := char "u"; [hello, hullo] \free{hullo0 hello}\bound{hullo}} +\spadpaste{hullo.2 := char "u"; [hello, hullo] \free{hullo0 hello} +\bound{hullo}} } \xtc{ Operations are provided to split and join strings. -The \spadfunFrom{concat}{String} operation allows several strings to be joined -together. +The \spadfunFrom{concat}{String} operation allows several strings +to be joined together. }{ \spadpaste{saidsaw := concat ["alpha","---","omega"] \bound{saidsaw}} } @@ -20873,8 +19206,8 @@ Substrings are obtained by giving an index range. \spadpaste{hello(8..) \free{hello}} } \xtc{ -A string can be split into several substrings by giving a separation character -or character class. +A string can be split into several substrings by giving a +separation character or character class. }{ \spadpaste{split(hello, char " ") \free{hello}} } @@ -20887,9 +19220,9 @@ or character class. \spadpaste{split(saidsaw, other) \free{saidsaw other}} } \xtc{ -Unwanted characters can be trimmed from the beginning or end of a string -using the operations \spadfunFrom{trim}{String}, \spadfunFrom{leftTrim}{String} -and \spadfunFrom{rightTrim}{String}. +Unwanted characters can be trimmed from the beginning or end of a +string using the operations \spadfunFrom{trim}{String}, +\spadfunFrom{leftTrim}{String} and \spadfunFrom{rightTrim}{String}. }{ \spadpaste{trim ("\#\# ++ relax ++ \#\#", char "\#")} } @@ -20958,10 +19291,10 @@ position. } \xtc{ -A number of \spadfunFrom{position}{String} functions locate things in strings. -If the first argument to position is a string, then \spad{position(s,t,i)} -finds the location of \spad{s} as a substring of \spad{t} starting the -search at position \spad{i}. +A number of \spadfunFrom{position}{String} functions locate things in +strings. If the first argument to position is a string, then +\spad{position(s,t,i)} finds the location of \spad{s} as a substring +of \spad{t} starting the search at position \spad{i}. }{ \spadpaste{n := position("nd", "underground", 1) \bound{n}} } @@ -20992,17 +19325,8 @@ a different first argument is used. @ \section{strtbl.ht} -<>= -\newcommand{\StringTableXmpTitle}{StringTable} -\newcommand{\StringTableXmpNumber}{9.78} - -@ -\subsection{StringTable} -\label{StringTableXmpPage} -See TableXmpPage \ref{TableXmpPage} on page~\pageref{TableXmpPage} -\index{pages!StringTableXmpPage!strtbl.ht} -\index{strtbl.ht!pages!StringTableXmpPage} -\index{StringTableXmpPage!strtbl.ht!pages} +\pagehead{StringTableXmpPage}{strtbl.ht}{StringTable} +\pageto{notitle}{TableXmpPage} <>= \begin{page}{StringTableXmpPage}{StringTable} \beginscroll @@ -21041,16 +19365,7 @@ for s in split("My name is Ian Watt.",char " ") @ \section{symbol.ht} -<>= -\newcommand{\SymbolXmpTitle}{Symbol} -\newcommand{\SymbolXmpNumber}{9.79} - -@ -\subsection{Symbol} -\label{SymbolXmpPage} -\index{pages!SymbolXmpPage!symbol.ht} -\index{symbol.ht!pages!SymbolXmpPage} -\index{SymbolXmpPage!symbol.ht!pages} +\pagehead{SymbolXmpPage}{symbol.ht}{Symbol} <>= \begin{page}{SymbolXmpPage}{Symbol} \beginscroll @@ -21176,7 +19491,8 @@ This operation takes an argument which is a list containing, in this order, lists of subscripts, superscripts, presuperscripts, presubscripts and arguments to a symbol. }{ -\spadpaste{M := script(Mammoth, [[i,j],[k,l],[0,1],[2],[u,v,w]]) \bound{M}} +\spadpaste{M := script(Mammoth, [[i,j],[k,l],[0,1],[2],[u,v,w]]) +\bound{M}} } \xtc{ }{ @@ -21197,37 +19513,20 @@ If trailing lists of scripts are omitted, they are assumed to be empty. @ \section{table.ht} -<>= -\newcommand{\TableXmpTitle}{Table} -\newcommand{\TableXmpNumber}{9.80} - -@ -\subsection{Table} -\label{TableXmpPage} -\begin{itemize} -\item AssociationListXmpPage \ref{AssociationListXmpPage} on -page~\pageref{AssociationListXmpPage} -\item EqTableXmpPage \ref{EqTableXmpPage} on -page~\pageref{EqTableXmpPage} -\item StringTableXmpPage \ref{StringTableXmpPage} on -page~\pageref{StringTableXmpPage} -\item SparseTableXmpPage \ref{SparseTableXmpPage} on -page~\pageref{SparseTableXmpPage} -\item KeyedAccessFileXmpPage \ref{KeyedAccessFileXmpPage} on -page~\pageref{KeyedAccessFileXmpPage} -\end{itemize} -\index{pages!TableXmpPage!table.ht} -\index{table.ht!pages!TableXmpPage} -\index{TableXmpPage!table.ht!pages} +\pagehead{TableXmpPage}{table.ht}{Table} +\pageto{notitle}{AssociationListXmpPage} +\pageto{notitle}{EqTableXmpPage} +\pageto{notitle}{StringTableXmpPage} +\pageto{notitle}{SparseTableXmpPage} +\pageto{notitle}{KeyedAccessFileXmpPage} <>= \begin{page}{TableXmpPage}{Table} \beginscroll -The \spadtype{Table} constructor provides a general structure -for associative storage. -This type provides hash tables in which data objects -can be saved according to keys of any type. -For a given table, specific types must be chosen for the keys and entries. +The \spadtype{Table} constructor provides a general structure for +associative storage. This type provides hash tables in which data +objects can be saved according to keys of any type. For a given +table, specific types must be chosen for the keys and entries. \xtc{ In this example the keys to the table are polynomials with @@ -21237,7 +19536,8 @@ The entries in the table are strings. \spadpaste{t: Table(Polynomial Integer, String) := table() \bound{t}} } \xtc{ -To save an entry in the table, the \spadfunFrom{setelt}{Table} operation is used. +To save an entry in the table, the \spadfunFrom{setelt}{Table} +operation is used. This can be called directly, giving the table a key and an entry. }{ \spadpaste{setelt(t, x**2 - 1, "Easy to factor") \bound{p1}\free{t}} @@ -21342,31 +19642,34 @@ Other table types are provided to support various needs. \indent{4} \beginitems \item[-] \spadtype{AssociationList} gives a list with a table view. -This allows new entries to be appended onto the front of the list -to cover up old entries. -This is useful when table entries need to be stacked or when -frequent list traversals are required. -See -\downlink{`AssociationList'}{AssociationListXmpPage}\ignore{AssociationList} -for more information. +This allows new entries to be appended onto the front of the list to +cover up old entries. This is useful when table entries need to be +stacked or when frequent list traversals are required. See +\downlink{`AssociationList'}{AssociationListXmpPage} +\ignore{AssociationList} for more information. + \item[-] \spadtype{EqTable} gives tables in which keys are considered equal only when they are in fact the same instance of a structure. -See \downlink{`EqTable'}{EqTableXmpPage}\ignore{EqTable} for more information. -\item[-] \spadtype{StringTable} should be used when the keys are known to -be strings. +See \downlink{`EqTable'}{EqTableXmpPage}\ignore{EqTable} for more +information. + +\item[-] \spadtype{StringTable} should be used when the keys are known +to be strings. See \downlink{`StringTable'}{StringTableXmpPage}\ignore{StringTable} for more information. -\item[-] \spadtype{SparseTable} provides tables with default -entries, so -lookup never fails. The \spadtype{GeneralSparseTable} constructor -can be used to make any table type behave this way. -See \downlink{`SparseTable'}{SparseTableXmpPage}\ignore{SparseTable} -for more information. -\item[-] \spadtype{KeyedAccessFile} allows values to be saved in a file, -accessed as a table. -See -\downlink{`KeyedAccessFile'}{KeyedAccessFileXmpPage}\ignore{KeyedAccessFile} + +\item[-] \spadtype{SparseTable} provides tables with default entries, +so lookup never fails. The \spadtype{GeneralSparseTable} constructor +can be used to make any table type behave this way. See +\downlink{`SparseTable'}{SparseTableXmpPage}\ignore{SparseTable} for +more information. + +\item[-] \spadtype{KeyedAccessFile} allows values to be saved in a +file, accessed as a table. See +\downlink{`KeyedAccessFile'}{KeyedAccessFileXmpPage} +\ignore{KeyedAccessFile} for more information. + \enditems \indent{0} % @@ -21377,24 +19680,10 @@ for more information. @ \section{textfile.ht} -<>= -\newcommand{\TextFileXmpTitle}{TextFile} -\newcommand{\TextFileXmpNumber}{9.81} - -@ -\subsection{TextFile} -\label{TextFileXmpPage} -\begin{itemize} -\item FileXmpPage \ref{FileXmpPage} on -page~\pageref{FileXmpPage} -\item KeyedAccessFileXmpPage \ref{KeyedAccessFileXmpPage} on -page~\pageref{KeyedAccessFileXmpPage} -\item LibraryXmpPage \ref{LibraryXmpPage} on -page~\pageref{LibraryXmpPage} -\end{itemize} -\index{pages!TextFileXmpPage!textfile.ht} -\index{textfile.ht!pages!TextFileXmpPage} -\index{TextFileXmpPage!textfile.ht!pages} +\pagehead{TextFileXmpPage}{textfile.ht}{TextFile} +\pageto{notitle}{FileXmpPage} +\pageto{notitle}{KeyedAccessFileXmpPage} +\pageto{notitle}{LibraryXmpPage} <>= \begin{page}{TextFileXmpPage}{TextFile} \beginscroll @@ -21469,7 +19758,8 @@ Finally, clean up. For more information on related topics, see \downlink{`File'}{FileXmpPage}\ignore{File}, -\downlink{`KeyedAccessFile'}{KeyedAccessFileXmpPage}\ignore{KeyedAccessFile}, and +\downlink{`KeyedAccessFile'}{KeyedAccessFileXmpPage} +\ignore{KeyedAccessFile}, and \downlink{`Library'}{LibraryXmpPage}\ignore{Library}. \showBlurb{TextFile} \endscroll @@ -21479,35 +19769,18 @@ For more information on related topics, see @ \section{topics.ht} -\subsection{Axiom Topics} -\label{TopicPage} -\includegraphics[scale=.5]{ps/v71topicpage.eps} -\index{images!topics} - -Called from ``Root Page'' (RootPage) \ref{RootPage} on page~\pageref{RootPage} - -Called from ``Reference'' (TopReferencePage) -\ref{TopReferencePage} on page~\pageref{TopReferencePage} -\begin{itemize} -\item ``Numbers'' (NumberPage) \ref{NumberPage} on page~\pageref{NumberPage} -\item ``Polynomials'' (PolynomialPage) -\ref{PolynomialPage} on page~\pageref{PolynomialPage} -\item ``Functions'' (FunctionPage) -\ref{FunctionPage} on page~\pageref{FunctionPage} -\item ``Solving Equations'' (EquationPage) -\ref{EquationPage} on page~\pageref{EquationPage} -\item ``Calculus'' (CalculusPage) -\ref{CalculusPage} on page~\pageref{CalculusPage} -\item ``Linear Algebra'' (LinAlgPage) -\ref{LinAlgPage} on page~\pageref{LinAlgPage} -\item ``Graphics'' (GraphicsPage) -\ref{GraphicsPage} on page~\pageref{GraphicsPage} -\item ``Algebra'' (AlgebraPage) -\ref{AlgebraPage} on page~\pageref{AlgebraPage} -\end{itemize} -\index{pages!TopicPage!topics.ht} -\index{topics.ht!pages!TopicPage} -\index{TopicPage!topics.ht!pages} +\pagehead{TopicPage}{page.ht}{Axiom Topics} +\pagepic{ps/v71topicpage.eps}{topics} +\pagefrom{Root Page}{RootPage} +\pagefrom{Reference}{TopReferencePage} +\pageto{Numbers}{NumberPage} +\pageto{Polynomials}{PolynomialPage} +\pageto{Functions}{FunctionPage} +\pageto{Solving Equations}{EquationPage} +\pageto{Calculus}{CalculusPage} +\pageto{Linear Algebra}{LinAlgPage} +\pageto{Graphics}{GraphicsPage} +\pageto{Algebra}{AlgebraPage} <>= \begin{page}{TopicPage}{Axiom Topics} \beginscroll @@ -21545,39 +19818,26 @@ Axiom's abstract algebra facilities \end{page} @ -\subsection{Solving Equations} -\label{EquationPage} -\includegraphics[scale=.5]{ps/v71equationpage.eps} -\index{images!equationpage} - -Called from ``Topics'' (TopicPage) \ref{TopicPage} on page~\pageref{TopicPage} -\begin{itemize} -\item ``Solution of Systems of Linear Equations''\\ -(ugxProblemLinSysPage) \ref{ugxProblemLinSysPage} on -page~\pageref{ugxProblemLinSysPage} -\item ``Solution of a Single Polynomial Equation''\\ -(ugxProblemOnePolPage) \ref{ugxProblemOnePolPage} on -page~\pageref{ugxProblemOnePolPage} -\item ``Solution of Systems of Polynomial Equations''\\ -(ugxProblemPolSysPage) \ref{ugxProblemPolSysPage} on -page~\pageref{ugxProblemPolSysPage} -\item ``Solution of Differential Equations''\\ -(ugProblemDEQPage) \ref{ugProblemDEQPage} on -page~\pageref{ugProblemDEQPage} -\end{itemize} -\index{pages!EquationPage!topics.ht} -\index{topics.ht!pages!EquationPage} -\index{EquationPage!topics.ht!pages} +\pagehead{EquationPage}{topics.ht}{Solving Equations} +\pagepic{ps/v71equationpage.eps}{equationpage} +\pagefrom{Topics}{TopicPage} +\pageto{Sol...Systems of Linear Equations}{ugxProblemLinSysPage} +\pageto{Sol...Single Polynomial Equation}{ugxProblemOnePolPage} +\pageto{Sol...Systems of Polynomial Equations}{ugxProblemPolSysPage} +\pageto{Sol...Differential Equations}{ugProblemDEQPage} <>= \begin{page}{EquationPage}{Solving Equations} \beginscroll Axiom lets you solve equations of various types: \beginmenu - \menulink{Solution of Systems of Linear Equations}{ugxProblemLinSysPage} + \menulink{Solution of Systems of Linear Equations} +{ugxProblemLinSysPage} \newline Solve systems of linear equations. - \menulink{Solution of a Single Polynomial Equation}{ugxProblemOnePolPage} + \menulink{Solution of a Single Polynomial Equation} +{ugxProblemOnePolPage} \newline Find roots of polynomials. - \menulink{Solution of Systems of Polynomial Equations}{ugxProblemPolSysPage} + \menulink{Solution of Systems of Polynomial Equations} +{ugxProblemPolSysPage} \newline Solve systems of polynomial equations. \menulink{Solution of Differential Equations}{ugProblemDEQPage} \newline Closed form and series solutions of differential equations. @@ -21587,39 +19847,20 @@ Axiom lets you solve equations of various types: \end{page} @ -\subsection{Linear Algebra} -\label{LinAlgPage} -\includegraphics[scale=.5]{ps/v71linalgpage.eps} -\index{images!linalgpage} - -Called from ``Topics'' (TopicPage) \ref{TopicPage} on page~\pageref{TopicPage} -\begin{itemize} -\item ``Introduction'' (ugIntroTwoDimPage) -\ref{ugIntroTwoDimPage} on page~\pageref{ugIntroTwoDimPage} -\item ``Creating Matrices'' (ugxMatrixCreatePage) -\ref{ugxMatrixCreatePage} on page~\pageref{ugxMatrixCreatePage} -\item ``Operations on Matrices'' (ugxMatrixOpsPage) -\ref{ugxMatrixOpsPage} on page~\pageref{ugxMatrixOpsPage} -\item ``Eigenvalues and Eigenvectors'' (ugProblemEigenPage) -\ref{ugProblemEigenPage} on page~\pageref{ugProblemEigenPage} -\item ``Example: Determinant of a Hilbert Matrix'' (ugxFloatHilbertPage) -\ref{ugxFloatHilbertPage} on page~\pageref{ugxFloatHilbertPage} -\item ``Computing the Permanent'' (PermanentXmpPage) -\ref{PermanentXmpPage} on page~\pageref{PermanentXmpPage} -\item ``Working with Vectors'' (VectorXmpPage) -\ref{VectorXmpPage} on page~\pageref{VectorXmpPage} -\item ``Working with Square Matrices'' (SquareMatrixXmpPage) -\ref{SquareMatrixXmpPage} on page~\pageref{SquareMatrixXmpPage} -\item ``Working with One-dimensional Arrays'' (OneDimensionalArrayXmpPage) -\ref{OneDimensionalArrayXmpPage} on page~\pageref{OneDimensionalArrayXmpPage} -\item ``Working with Two-dimensional Arrays'' (TwoDimensionalArrayXmpPage) -\ref{TwoDimensionalArrayXmpPage} on page~\pageref{TwoDimensionalArrayXmpPage} -\item ``Conversion (Polynomials of Matrices)'' (ugTypesConvertPage) -\ref{ugTypesConvertPage} on page~\pageref{ugTypesConvertPage} -\end{itemize} -\index{pages!LinAlgPage!topics.ht} -\index{topics.ht!pages!LinAlgPage} -\index{LinAlgPage!topics.ht!pages} +\pagehead{LinAlgPage}{topics.ht}{Linear Algebra} +\pagepic{ps/v71linalgpage.eps}{linalgpage} +\pagefrom{Topics}{TopicPage} +\pageto{Introduction}{ugIntroTwoDimPage} +\pageto{Creating Matrices}{ugxMatrixCreatePage} +\pageto{Operations on Matrices}{ugxMatrixOpsPage} +\pageto{Eigenvalues and Eigenvectors}{ugProblemEigenPage} +\pageto{Example: Determinant of a Hilbert Matrix}{ugxFloatHilbertPage} +\pageto{Computing the Permanent}{PermanentXmpPage} +\pageto{Working with Vectors}{VectorXmpPage} +\pageto{Working with Square Matrices}{SqMatrixXmpPage} +\pageto{Working with One-dimensional Arrays}{OneDimensionalArrayXmpPage} +\pageto{Working with Two-dimensional Arrays}{TwoDimensionalArrayXmpPage} +\pageto{Conversion (Polynomials of Matrices)}{ugTypesConvertPage} <>= \begin{page}{LinAlgPage}{Linear Algebra} \beginscroll @@ -21651,7 +19892,7 @@ Additional Topics: \menulink{Example: Determinant of a Hilbert Matrix}{ugxFloatHilbertPage} \menulink{Computing the Permanent}{PermanentXmpPage} \menulink{Working with Vectors}{VectorXmpPage} -\menulink{Working with Square Matrices}{SquareMatrixXmpPage} +\menulink{Working with Square Matrices}{SqMatrixXmpPage} \menulink{Working with One-Dimensional Arrays}{OneDimensionalArrayXmpPage} \menulink{Working with Two-Dimensional Arrays}{TwoDimensionalArrayXmpPage} \menulink{Conversion (Polynomials of Matrices)}{ugTypesConvertPage} @@ -21661,32 +19902,16 @@ Additional Topics: \end{page} @ -\subsection{Calculus} -\label{CalculusPage} -\includegraphics[scale=.5]{ps/v71calculuspage.eps} -\index{images!calculuspage} - -Called from ``Topics'' (TopicPage) \ref{TopicPage} on page~\pageref{TopicPage} -\begin{itemize} -\item ``Limits'' (ugProblemLimitsPage) \ref{ugProblemLimitsPage} on -page~\pageref{ugProblemLimitsPage} -\item ``Derivatives'' (ugIntroCalcDerivPage) \ref{ugIntroCalcDerivPage} on -page~\pageref{ugIntroCalcDerivPage} -\item ``Integrals'' (ugIntroIntegratePage) \ref{ugIntroIntegratePage} on -page~\pageref{ugIntroIntegratePage} -\item ``More Integrals'' (ugProblemIntegrationPage) -\ref{ugProblemIntegrationPage} on -page~\pageref{ugProblemIntegrationPage} -\item ``Laplace'' (ugProblemLaplacePage) \ref{ugProblemLaplacePage} on -page~\pageref{ugProblemLaplacePage} -\item ``Series'' (ugProblemSeriesPage)n \ref{ugProblemSeriesPage} on -page~\pageref{ugProblemSeriesPage} -\item ``Differential Eqns'' (ugProblemDEQPage) \ref{ugProblemDEQPage} on -page~\pageref{ugProblemDEQPage} -\end{itemize} -\index{pages!CalculusPage!topics.ht} -\index{topics.ht!pages!CalculusPage} -\index{CalculusPage!topics.ht!pages} +\pagehead{CalculusPage}{topics.ht}{Calculus} +\pagepic{ps/v71calculuspage.eps}{calculuspage} +\pagefrom{Topics}{TopicPage} +\pageto{Limits}{ugProblemLimitsPage} +\pageto{Derivatives}{ugIntroCalcDerivPage} +\pageto{Integrals}{ugIntroIntegratePage} +\pageto{More Integrals}{ugProblemIntegrationPage} +\pageto{Laplace}{ugProblemLaplacePage} +\pageto{Series}{ugProblemSeriesPage} +\pageto{Differential Eqns}{ugProblemDEQPage} <>= \begin{page}{CalculusPage}{Calculus} \beginscroll @@ -21711,12 +19936,7 @@ Solve differential equations. @ \section{type.ht} -@ -\subsection{Category {\bf Type}} -\label{CategoryType} -\index{pages!CategoryType!type.ht} -\index{type.ht!pages!CategoryType} -\index{CategoryType!type.ht!pages} +\pagehead{CategoryType}{type.ht}{Category {\bf Type}} <>= \begin{page}{CategoryType}{Category {\em Type}} \beginscroll @@ -21733,11 +19953,7 @@ and \spadtype{Aggregate}, the category of all data structures. @ \section{union.ht} -\subsection{Domain {\bf Union(a:A,...,b:B)}} -\label{DomainUnion} -\index{pages!DomainUnion!union.ht} -\index{union.ht!pages!DomainUnion} -\index{DomainUnion!union.ht!pages} +\pagehead{DomainUnion}{union.ht}{Domain {\bf Union(a:A,...,b:B)}} <>= \begin{page}{DomainUnion}{Domain {\em Union(a:A,...,b:B)}} \beginscroll @@ -21752,23 +19968,25 @@ and \spadtype{Aggregate}, the category of all data structures. This constructor is a primitive in Axiom. \newline \beginmenu -\item\menulispdownlink{Description}{(|dbSpecialDescription| '|Union|)) }\tab{15}General description -\item\menulispdownlink{Operations}{(|dbSpecialOperations| '|Union|)}\tab{15}All exported operations of \spad{Union(a:A,b:B)} -%\item\menudownlink{Examples} {UnionExamples} \tab{15}Examples illustrating use -\item\menulispdownlink{Exports}{(|dbSpecialExports| '|Union|)}\tab{15}Explicit categories and operations +\item\menulispdownlink{Description} +{(|dbSpecialDescription| '|Union|)) }\tab{15}General description +\item\menulispdownlink{Operations} +{(|dbSpecialOperations| '|Union|)} +\tab{15}All exported operations of \spad{Union(a:A,b:B)} +%\item\menudownlink{Examples} {UnionExamples} +\tab{15}Examples illustrating use +\item\menulispdownlink{Exports}{(|dbSpecialExports| '|Union|)} +\tab{15}Explicit categories and operations \endmenu \vspace{1}\newline In this tagged \spad{Union}, tags \spad{a,...,b} must be distinct. \newline -For an alternate "untagged" form of \spad{Union}, see \downlink{Union(A,B)}{UntaggedUnion}. +For an alternate "untagged" form of \spad{Union}, see +\downlink{Union(A,B)}{UntaggedUnion}. \endscroll\end{page} @ -\subsection{Domain Constructor {\bf Union}} -\label{UnionDescription} -\index{pages!UnionDescription!union.ht} -\index{union.ht!pages!UnionDescription} -\index{UnionDescription!union.ht!pages} +\pagehead{UnionDescription}{union.ht}{Domain Constructor {\bf Union}} <>= \begin{page}{UnionDescription}{Domain Constructor {\em Union}} \beginscroll @@ -21798,11 +20016,7 @@ defined in the Axiom language. \endscroll\end{page} @ -\subsection{Domain {\bf Union(A,...,B)}} -\label{UntaggedUnion} -\index{pages!UntaggedUnion!union.ht} -\index{union.ht!pages!UntaggedUnion} -\index{UntaggedUnion!union.ht!pages} +\pagehead{UntaggedUnion}{union.ht}{Domain {\bf Union(A,...,B)}} <>= \begin{page}{UntaggedUnion}{Domain {\em Union(A,...,B)}} \beginscroll @@ -21815,21 +20029,23 @@ defined in the Axiom language. \spad{Union} is a primitive constructor in Axiom. \newline \beginmenu -\item\menulispdownlink{Description}{(|dbSpecialDescription| '|UntaggedUnion|)) }\tab{15}General description -\item\menulispdownlink{Operations}{(|dbSpecialOperations| '|UntaggedUnion|)}\tab{15}All exported operations of \spad{Union(A,B)} -%\item\menudownlink{Examples} {UTUnionExamples} \tab{15}Examples illustrating use -%\item\menudownlink{Exports} {UTUnionExports} \tab{15}Explicit categories and operations +\item\menulispdownlink{Description} +{(|dbSpecialDescription| '|UntaggedUnion|)) }\tab{15}General description +\item\menulispdownlink{Operations} +{(|dbSpecialOperations| '|UntaggedUnion|)} +\tab{15}All exported operations of \spad{Union(A,B)} +%\item\menudownlink{Examples} {UTUnionExamples} +\tab{15}Examples illustrating use +%\item\menudownlink{Exports} {UTUnionExports} +\tab{15}Explicit categories and operations \endmenu \vspace{1}\newline -In this untagged form of \spad{Union}, domains \spad{A,...,B} must be distinct. +In this untagged form of \spad{Union}, domains \spad{A,...,B} +must be distinct. \endscroll\end{page} @ -\subsection{Domain Constructor {\bf Union}} -\label{UTUnionDescription} -\index{pages!UTUnionDescription!union.ht} -\index{union.ht!pages!UTUnionDescription} -\index{UTUnionDescription!union.ht!pages} +\pagehead{UTUnionDescription}{union.ht}{Domain Constructor {\bf Union}} <>= \begin{page}{UTUnionDescription}{Domain Constructor {\em Union}} \beginscroll @@ -21852,26 +20068,11 @@ defined in the Axiom language. @ \section{uniseg.ht} -<>= -\newcommand{\UniversalSegmentXmpTitle}{UniversalSegment} -\newcommand{\UniversalSegmentXmpNumber}{9.84} - -@ -\subsection{UniversalSegment} -\label{UniversalSegmentXmpPage} -\begin{itemize} -\item SegmentXmpPage \ref{SegmentXmpPage} on -page~\pageref{SegmentXmpPage} -\item SegmentBindingXmpPage \ref{SegmentBindingXmpPage} on -page~\pageref{SegmentBindingXmpPage} -\item ListXmpPage \ref{ListXmpPage} on -page~\pageref{ListXmpPage} -\item StreamXmpPage \ref{StreamXmpPage} on -page~\pageref{StreamXmpPage} -\end{itemize} -\index{pages!UniversalSegmentXmpPage!uniseg.ht} -\index{uniseg.ht!pages!UniversalSegmentXmpPage} -\index{UniversalSegmentXmpPage!uniseg.ht!pages} +\pagehead{UniversalSegmentXmpPage}{uniseg.ht}{UniversalSegment} +\pageto{notitle}{SegmentXmpPage} +\pageto{notitle}{SegmentBindingXmpPage} +\pageto{notitle}{ListXmpPage} +\pageto{notitle}{StreamXmpPage} <>= \begin{page}{UniversalSegmentXmpPage}{UniversalSegment} \beginscroll @@ -21936,41 +20137,24 @@ For more information on related topics, see @ \section{up.ht} +\pagehead{UnivariatePolyXmpPage}{up.ht}{UnivariatePolynomial} +\pageto{notitle}{ugProblemFactorPage} +\pageto{notitle}{ugIntroVariablesPage} +\pageto{notitle}{ugTypesConvertPage} +\pageto{notitle}{PolynomialXmpPage} +\pageto{notitle}{MultivariatePolyXmpPage} +\pageto{notitle}{DistributedMultivariatePolyXmpPage} <>= -\newcommand{\UnivariatePolynomialXmpTitle}{UnivariatePolynomial} -\newcommand{\UnivariatePolynomialXmpNumber}{9.83} - -@ -\subsection{UnivariatePolynomial} -\label{UnivariatePolynomialXmpPage} -\begin{itemize} -\item ugProblemFactorPage \ref{ugProblemFactorPage} on -page~\pageref{ugProblemFactorPage} -\item ugIntroVariablesPage \ref{ugIntroVariablesPage} on -page~\pageref{ugIntroVariablesPage} -\item ugTypesConvertPage \ref{ugTypesConvertPage} on -page~\pageref{ugTypesConvertPage} -\item PolynomialXmpPage \ref{PolynomialXmpPage} on -page~\pageref{PolynomialXmpPage} -\item MultivariatePolynomialXmpPage \ref{MultivariatePolynomialXmpPage} on -page~\pageref{MultivariatePolynomialXmpPage} -\item DistributedMultivariatePolynomialXmpPage \ref{DistributedMultivariatePolynomialXmpPage} on -page~\pageref{DistributedMultivariatePolynomialXmpPage} -\end{itemize} -\index{pages!UnivariatePolynomialXmpPage!up.ht} -\index{up.ht!pages!UnivariatePolynomialXmpPage} -\index{UnivariatePolynomialXmpPage!up.ht!pages} -<>= -\begin{page}{UnivariatePolynomialXmpPage}{UnivariatePolynomial} +\begin{page}{UnivariatePolyXmpPage}{UnivariatePolynomial} \beginscroll The domain constructor \spadtype{UnivariatePolynomial} (abbreviated \spadtype{UP}) creates domains of univariate polynomials in a specified variable. For example, the domain -\spadtype{UP(a1,POLY FRAC INT)} provides polynomials in the single variable -\spad{a1} whose coefficients are general polynomials with rational -number coefficients. +\spadtype{UP(a1,POLY FRAC INT)} provides polynomials in the single +variable \spad{a1} whose coefficients are general polynomials with +rational number coefficients. \beginImportant \noindent {\bf Restriction:} @@ -22222,11 +20406,11 @@ Section \ugIntroVariablesNumber\ignore{ugIntroVariables}, \downlink{``\ugTypesConvertTitle''}{ugTypesConvertPage} in Section \ugTypesConvertNumber\ignore{ugTypesConvert}, \downlink{`Polynomial'}{PolynomialXmpPage}\ignore{Polynomial}, -\downlink{`MultivariatePolynomial'}{MultivariatePolynomialXmpPage} +\downlink{`MultivariatePolynomial'}{MultivariatePolyXmpPage} \ignore{MultivariatePolynomial}, and -\downlink{`DistributedMultivariatePolynomial'} -{DistributedMultivariatePolynomialXmpPage} -\ignore{DistributedMultivariatePolynomial}. +\downlink{`DistributedMultivariatePoly'} +{DistributedMultivariatePolyXmpPage} +\ignore{DistributedMultivariatePoly}. % \showBlurb{UnivariatePolynomial} \endscroll @@ -22235,67 +20419,41 @@ Section \ugTypesConvertNumber\ignore{ugTypesConvert}, @ \section{vector.ht} -<>= -\newcommand{\VectorXmpTitle}{Vector} -\newcommand{\VectorXmpNumber}{9.85} - -@ -\subsection{Vector} -\label{VectorXmpPage} -\begin{itemize} -\item OneDimensionalArrayXmpPage \ref{OneDimensionalArrayXmpPage} on -page~\pageref{OneDimensionalArrayXmpPage} -\item ListXmpPage \ref{ListXmpPage} on -page~\pageref{ListXmpPage} -\item MatrixXmpPage \ref{MatrixXmpPage} on -page~\pageref{MatrixXmpPage} -\item OneDimensionalArrayXmpPage \ref{OneDimensionalArrayXmpPage} on -page~\pageref{OneDimensionalArrayXmpPage} -\item SetXmpPage \ref{SetXmpPage} on -page~\pageref{SetXmpPage} -\item TableXmpPage \ref{TableXmpPage} on -page~\pageref{TableXmpPage} -\item TwoDimensionalArrayXmpPage \ref{TwoDimensionalArrayXmpPage} on -page~\pageref{TwoDimensionalArrayXmpPage} -\end{itemize} -\index{pages!VectorXmpPage!vector.ht} -\index{vector.ht!pages!VectorXmpPage} -\index{VectorXmpPage!vector.ht!pages} +\pagehead{VectorXmpPage}{vector.ht}{Vector} +\pageto{notitle}{OneDimensionalArrayXmpPage} +\pageto{notitle}{ListXmpPage} +\pageto{notitle}{MatrixXmpPage} +\pageto{notitle}{OneDimensionalArrayXmpPage} +\pageto{notitle}{SetXmpPage} +\pageto{notitle}{TableXmpPage} +\pageto{notitle}{TwoDimensionalArrayXmpPage} <>= \begin{page}{VectorXmpPage}{Vector} \beginscroll -The \spadtype{Vector} domain is used for storing data in a one-dimensional -indexed data structure. -A vector is a homogeneous data structure in that all the components of the -vector must belong to the same Axiom domain. -Each vector has a fixed length specified by the user; vectors are not -extensible. -This domain is similar to the \spadtype{OneDimensionalArray} domain, -except that when the components of a \spadtype{Vector} belong to a -\spadtype{Ring}, arithmetic operations are provided. -For more examples of operations that are defined for both -\spadtype{Vector} and \spadtype{OneDimensionalArray}, see -\downlink{`OneDimensionalArray'}{OneDimensionalArrayXmpPage} +The \spadtype{Vector} domain is used for storing data in a +one-dimensional indexed data structure. A vector is a homogeneous +data structure in that all the components of the vector must belong to +the same Axiom domain. Each vector has a fixed length specified by +the user; vectors are not extensible. This domain is similar to the +\spadtype{OneDimensionalArray} domain, except that when the components +of a \spadtype{Vector} belong to a \spadtype{Ring}, arithmetic +operations are provided. For more examples of operations that are +defined for both \spadtype{Vector} and \spadtype{OneDimensionalArray}, +see \downlink{`OneDimensionalArray'}{OneDimensionalArrayXmpPage} \ignore{OneDimensionalArray}. -As with the \spadtype{OneDimensionalArray} domain, a \spadtype{Vector} can -be created by calling the operation \spadfunFrom{new}{Vector}, its components -can be accessed by calling the operations \spadfunFrom{elt}{Vector} and -\spadfunFrom{qelt}{Vector}, and its components can be reset by calling the -operations \spadfunFrom{setelt}{Vector} and -\spadfunFromX{qsetelt}{Vector}. -\xtc{ -This creates a vector of integers of length -\spad{5} all of whose components are \spad{12}. -}{ -\spadpaste{u : VECTOR INT := new(5,12) \bound{u}} -} -\xtc{ -This is how you create a vector from a list of its components. -}{ -\spadpaste{v : VECTOR INT := vector([1,2,3,4,5]) \bound{v}} -} +As with the \spadtype{OneDimensionalArray} domain, a \spadtype{Vector} +can be created by calling the operation \spadfunFrom{new}{Vector}, its +components can be accessed by calling the operations +\spadfunFrom{elt}{Vector} and \spadfunFrom{qelt}{Vector}, and its +components can be reset by calling the operations +\spadfunFrom{setelt}{Vector} and \spadfunFromX{qsetelt}{Vector}. +\xtc{ This creates a vector of integers of length \spad{5} all of +whose components are \spad{12}. }{ \spadpaste{u : VECTOR INT := +new(5,12) \bound{u}} } \xtc{ This is how you create a vector from a +list of its components. }{ \spadpaste{v : VECTOR INT := +vector([1,2,3,4,5]) \bound{v}} } \xtc{ Indexing for vectors begins at \spad{1}. @@ -22319,12 +20477,11 @@ It is the same as if you had typed \spad{setelt(v,3,99)}. \spadpaste{v.3 := 99 \free{v}\bound{vdelta}} } \xtc{ -Now look at \spad{v} to see the change. -You can -use \spadfunFrom{qelt}{Vector} and \spadfunFromX{qsetelt}{Vector} (instead +Now look at \spad{v} to see the change. You can use +\spadfunFrom{qelt}{Vector} and \spadfunFromX{qsetelt}{Vector} (instead of \spadfunFrom{elt}{Vector} and \spadfunFrom{setelt}{Vector}, -respectively) but {\it only} when you know that the index is within the valid -range. +respectively) but {\it only} when you know that the index is within +the valid range. }{ \spadpaste{v \free{vdelta}} } @@ -22360,10 +20517,12 @@ For more information about other aggregate domains, see the following: \downlink{`List'}{ListXmpPage}\ignore{List}, \downlink{`Matrix'}{MatrixXmpPage}\ignore{Matrix}, -\downlink{`OneDimensionalArray'}{OneDimensionalArrayXmpPage}\ignore{OneDimensionalArray}, +\downlink{`OneDimensionalArray'}{OneDimensionalArrayXmpPage} +\ignore{OneDimensionalArray}, \downlink{`Set'}{SetXmpPage}\ignore{Set}, \downlink{`Table'}{TableXmpPage}\ignore{Table}, and -\downlink{`TwoDimensionalArray'}{TwoDimensionalArrayXmpPage}\ignore{TwoDimensionalArray}. +\downlink{`TwoDimensionalArray'}{TwoDimensionalArrayXmpPage} +\ignore{TwoDimensionalArray}. Issue the system command \spadcmd{)show Vector} to display the full list of operations defined by \spadtype{Vector}. @@ -22375,27 +20534,18 @@ to display the full list of operations defined by @ \section{void.ht} -<>= -\newcommand{\VoidXmpTitle}{Void} -\newcommand{\VoidXmpNumber}{9.86} - -@ -\subsection{Void} -\label{VoidXmpPage} -\index{pages!VoidXmpPage!void.ht} -\index{void.ht!pages!VoidXmpPage} -\index{VoidXmpPage!void.ht!pages} +\pagehead{VoidXmpPage}{void.ht}{Void} <>= \begin{page}{VoidXmpPage}{Void} \beginscroll -When an expression is not in a value context, it is given type \spadtype{Void}. -For example, in the expression +When an expression is not in a value context, it is given +type \spadtype{Void}. For example, in the expression \begin{verbatim} r := (a; b; if c then d else e; f) \end{verbatim} -values are used only from the subexpressions \spad{c} and \spad{f}: all -others are thrown away. +values are used only from the subexpressions \spad{c} and \spad{f}: +all others are thrown away. The subexpressions \spad{a}, \spad{b}, \spad{d} and \spad{e} are evaluated for side-effects only and have type \spadtype{Void}. There is a unique value of type \spadtype{Void}. @@ -22437,34 +20587,23 @@ Once a value has been converted to \spadtype{Void}, it cannot be recovered. @ \section{wutset.ht} -<>= -\newcommand{\WuWenTsunTriangularSetXmpTitle}{WuWenTsunTriangularSet} -\newcommand{\WuWenTsunTriangularSetXmpNumber}{9.87} - -@ -\subsection{WuWenTsunTriangularSet} -\label{WuWenTsunTriangularSetXmpPage} -\index{pages!WuWenTsunTriangularSetXmpPage!wutset.ht} -\index{wutset.ht!pages!WuWenTsunTriangularSetXmpPage} -\index{WuWenTsunTriangularSetXmpPage!wutset.ht!pages} +\pagehead{WuWenTsunTriangularSetXmpPage}{wutset.ht}{WuWenTsunTriangularSet} <>= \begin{page}{WuWenTsunTriangularSetXmpPage}{WuWenTsunTriangularSet} \beginscroll The \spadtype{WuWenTsunTriangularSet} domain constructor implements -the characteristic set method of Wu Wen Tsun. -This algorithm computes a list of triangular sets from a list -of polynomials such that the algebraic variety defined by the -given list of polynomials decomposes into the union of the regular-zero sets -of the computed triangular sets. -The constructor takes four arguments. -The first one, {\bf R}, is the coefficient ring of the polynomials; -it must belong to the category \spadtype{IntegralDomain}. -The second one, {\bf E}, is the exponent monoid of the polynomials; -it must belong to the category \spadtype{OrderedAbelianMonoidSup}. -The third one, {\bf V}, is the ordered set of variables; -it must belong to the category \spadtype{OrderedSet}. -The last one is the polynomial ring; -it must belong to the category \spadtype{RecursivePolynomialCategory(R,E,V)}. +the characteristic set method of Wu Wen Tsun. This algorithm computes +a list of triangular sets from a list of polynomials such that the +algebraic variety defined by the given list of polynomials decomposes +into the union of the regular-zero sets of the computed triangular +sets. The constructor takes four arguments. The first one, {\bf R}, +is the coefficient ring of the polynomials; it must belong to the +category \spadtype{IntegralDomain}. The second one, {\bf E}, is the +exponent monoid of the polynomials; it must belong to the category +\spadtype{OrderedAbelianMonoidSup}. The third one, {\bf V}, is the +ordered set of variables; it must belong to the category +\spadtype{OrderedSet}. The last one is the polynomial ring; it must +belong to the category \spadtype{RecursivePolynomialCategory(R,E,V)}. The abbreviation for \spadtype{WuWenTsunTriangularSet} is \spadtype{WUTSET}. @@ -22515,7 +20654,8 @@ Let the variables be polynomial. \xtc{ Now call the \spadtype{WuWenTsunTriangularSet} domain constructor. }{ -\spadpaste{T := WUTSET(R,E,V,P) \free{R} \free{E} \free{V} \free{P} \bound{T} } +\spadpaste{T := WUTSET(R,E,V,P) \free{R} \free{E} \free{V} +\free{P} \bound{T} } } \xtc{ Define a polynomial system. @@ -22546,26 +20686,24 @@ Solve the system. } -The \spadtype{RegularTriangularSet} and -\spadtype{SquareFreeRegularTriangularSet} domain constructors, -and the \spadtype{LazardSetSolvingPackage}, -\spadtype{SquareFreeRegularTriangularSet} -and \spadtype{ZeroDimensionalSolvePackage} package constructors -also provide operations to compute triangular -decompositions of algebraic varieties. -These five constructor use a special kind of -characteristic sets, called regular triangular sets. -These special characteristic sets have better -properties than the general ones. +The \spadtype{RegularTriangularSet} and +\spadtype{SquareFreeRegularTriangularSet} domain constructors, and the +\spadtype{LazardSetSolvingPackage}, +\spadtype{SquareFreeRegularTriangularSet} and +\spadtype{ZeroDimensionalSolvePackage} package constructors also +provide operations to compute triangular decompositions of algebraic +varieties. These five constructor use a special kind of +characteristic sets, called regular triangular sets. These special +characteristic sets have better properties than the general ones. Regular triangular sets and their related concepts are presented in the paper "On the Theories of Triangular sets" By P. Aubry, D. Lazard and M. Moreno Maza (to appear in the Journal of Symbolic Computation). -The decomposition algorithm (due to the third author) available in the -four above constructors provide generally better timings than -the characteristic set method. -In fact, the \spadtype{WUTSET} constructor remains interesting -for the purpose of manipulating characteristic sets whereas -the other constructors are more convenient for solving polynomial systems. +The decomposition algorithm (due to the third author) available in the +four above constructors provide generally better timings than the +characteristic set method. In fact, the \spadtype{WUTSET} constructor +remains interesting for the purpose of manipulating characteristic +sets whereas the other constructors are more convenient for solving +polynomial systems. Note that the way of understanding triangular decompositions is detailed in the example of the \spadtype{RegularTriangularSet} @@ -22576,301 +20714,105 @@ constructor. @ \section{xmpexp.ht} -<>= -\newcommand{\ExamplesExposedTitle}{Some Examples of Domains and Packages} -\newcommand{\ExamplesExposedNumber}{9.} - -@ -\subsection{Some Examples of Domains and Packages} -\label{ExamplesExposedPage} -\includegraphics[scale=.5]{ps/v71examplesexposedpage.eps} -\index{images!examplesexposedpage} - -Called from ``Reference'' (TopReferencePage) -\ref{TopReferencePage} on page~\pageref{TopReferencePage} -\begin{itemize} -\item ``AssociationList'' (AssociationListXmpPage) -\ref{AssociationListXmpPage} on -page~\pageref{AssociationListXmpPage} -\item ``BalancedBinaryTree'' (BalancedBinaryTreeXmpPage) -\ref{BalancedBinaryTreeXmpPage} on -page~\pageref{BalancedBinaryTreeXmpPage} -\item ``BasicOperator'' (BasicOperatorXmpPage) -\ref{BasicOperatorXmpPage} on -page~\pageref{BasicOperatorXmpPage} -\item ``BinaryExpansion'' (BinaryExpansionXmpPage) -\ref{BinaryExpansionXmpPage} on -page~\pageref{BinaryExpansionXmpPage} -\item ``BinarySearchTree'' (BinarySearchTreeXmpPage) -\ref{BinarySearchTreeXmpPage} on -page~\pageref{BinarySearchTreeXmpPage} -\item ``CardinalNumber'' (CardinalNumberXmpPage) -\ref{CardinalNumberXmpPage} on -page~\pageref{CardinalNumberXmpPage} -\item ``CartesianTensor'' (CartesianTensorXmpPage) -\ref{CartesianTensorXmpPage} on -page~\pageref{CartesianTensorXmpPage} -\item ``Character'' (CharacterXmpPage) -\ref{CharacterXmpPage} on -page~\pageref{CharacterXmpPage} -\item ``CharacterClass'' (CharacterClassXmpPage) -\ref{CharacterClassXmpPage} on -page~\pageref{CharacterClassXmpPage} -\item ``CliffordAlgebra'' (CliffordAlgebraXmpPage) -\ref{CliffordAlgebraXmpPage} on -page~\pageref{CliffordAlgebraXmpPage} -\item ``Complex'' (ComplexXmpPage) -\ref{ComplexXmpPage} on -page~\pageref{ComplexXmpPage} -\item ``ContinuedFraction'' (ContinuedFractionXmpPage) -\ref{ContinuedFractionXmpPage} on -page~\pageref{ContinuedFractionXmpPage} -\item ``CycleIndicators'' (CycleIndicatorsXmpPage) -\ref{CycleIndicatorsXmpPage} on -page~\pageref{CycleIndicatorsXmpPage} -\item ``DeRhamComplex'' (DeRhamComplexXmpPage) -\ref{DeRhamComplexXmpPage} on -page~\pageref{DeRhamComplexXmpPage} -\item ``DecimalExpansion'' (DecimalExpansionXmpPage) -\ref{DecimalExpansionXmpPage} on -page~\pageref{DecimalExpansionXmpPage} -\item ``DistributedMultivariatePolynomial'' -(DistributedMultivariatePolynomialXmpPage) -\ref{DistributedMultivariatePolynomialXmpPage} on -page~\pageref{DistributedMultivariatePolynomialXmpPage} -\item ``DoubleFloat'' (DoubleFloatXmpPage) -\ref{DoubleFloatXmpPage} on -page~\pageref{DoubleFloatXmpPage} -\item ``EqTable'' (EqTableXmpPage) -\ref{EqTableXmpPage} on -page~\pageref{EqTableXmpPage} -\item ``Equation'' (EquationXmpPage) -\ref{EquationXmpPage} on -page~\pageref{EquationXmpPage} -\item ``Exit'' (ExitXmpPage) -\ref{ExitXmpPage} on -page~\pageref{ExitXmpPage} -\item ``Expression'' (ExpressionXmpPage) -\ref{ExpressionXmpPage} on -page~\pageref{ExpressionXmpPage} -\item ``Factored'' (FactoredXmpPage) -\ref{FactoredXmpPage} on -page~\pageref{FactoredXmpPage} -\item ``FactoredFunctionsTwo'' (FactoredFunctionsTwoXmpPage) -\ref{FactoredFunctionsTwoXmpPage} on -page~\pageref{FactoredFunctionsTwoXmpPage} -\item ``File'' (FileXmpPage) -\ref{FileXmpPage} on -page~\pageref{FileXmpPage} -\item ``FileName'' (FileNameXmpPage) -\ref{FileNameXmpPage} on -page~\pageref{FileNameXmpPage} -\item ``FlexibleArray'' (FlexibleArrayXmpPage) -\ref{FlexibleArrayXmpPage} on -page~\pageref{FlexibleArrayXmpPage} -\item ``Float'' (FloatXmpPage) -\ref{FloatXmpPage} on -page~\pageref{FloatXmpPage} -\item ``Fraction'' (FractionXmpPage) -\ref{FractionXmpPage} on -page~\pageref{FractionXmpPage} -\item ``FullPartialFractionExpansion'' (FullPartialFractionExpansionXmpPage) -\ref{FullPartialFractionExpansionXmpPage} on -page~\pageref{FullPartialFractionExpansionXmpPage} -\item ``GeneralSparseTable'' (GeneralSparseTableXmpPage) -\ref{GeneralSparseTableXmpPage} on -page~\pageref{GeneralSparseTableXmpPage} -\item ``GroebnerFactorizationPackage'' (GroebnerFactorizationPackageXmpPage) -\ref{GroebnerFactorizationPackageXmpPage} on -page~\pageref{GroebnerFactorizationPackageXmpPage} -\item ``Heap'' (HeapXmpPage) -\ref{HeapXmpPage} on -page~\pageref{HeapXmpPage} -\item ``HexadecimalExpansion'' (HexadecimalExpansionXmpPage) -\ref{HexadecimalExpansionXmpPage} on -page~\pageref{HexadecimalExpansionXmpPage} -\item ``Integer'' (IntegerXmpPage) -\ref{IntegerXmpPage} on -page~\pageref{IntegerXmpPage} -\item ``IntegerLinearDependence'' (IntegerLinearDependenceXmpPage) -\ref{IntegerLinearDependenceXmpPage} on -page~\pageref{IntegerLinearDependenceXmpPage} -\item ``IntegerNumberTheoryFunctions'' (IntegerNumberTheoryFunctionsXmpPage) -\ref{IntegerNumberTheoryFunctionsXmpPage} on -page~\pageref{IntegerNumberTheoryFunctionsXmpPage} -\item ``Kernel'' (KernelXmpPage) -\ref{KernelXmpPage} on -page~\pageref{KernelXmpPage} -\item ``KeyedAccessFile'' (KeyedAccessFileXmpPage) -\ref{KeyedAccessFileXmpPage} on -page~\pageref{KeyedAccessFileXmpPage} -\item ``LexTriangularPackage'' (LexTriangularPackageXmpPage) -\ref{LexTriangularPackageXmpPage} on -page~\pageref{LexTriangularPackageXmpPage} -\item ``LazardSetSolvingPackage'' (LazardSetSolvingPackageXmpPage) -\ref{LazardSetSolvingPackageXmpPage} on -page~\pageref{LazardSetSolvingPackageXmpPage} -\item ``Library'' (LibraryXmpPage) -\ref{LibraryXmpPage} on -page~\pageref{LibraryXmpPage} -\item ``LieExponentials'' (LieExponentialsXmpPage) -\ref{LieExponentialsXmpPage} on -page~\pageref{LieExponentialsXmpPage} -\item ``LiePolynomial'' (LiePolynomialXmpPage) -\ref{LiePolynomialXmpPage} on -page~\pageref{LiePolynomialXmpPage} -\item ``LinearOrdinaryDifferentialOperator'' -(LinearOrdinaryDifferentialOperatorXmpPage) -\ref{LinearOrdinaryDifferentialOperatorXmpPage} on -page~\pageref{LinearOrdinaryDifferentialOperatorXmpPage} -\item ``LinearOrdinaryDifferentialOperatorOne'' -(LinearOrdinaryDifferentialOperatorOneXmpPage) -\ref{LinearOrdinaryDifferentialOperatorOneXmpPage} on -page~\pageref{LinearOrdinaryDifferentialOperatorOneXmpPage} -\item ``LinearOrdinaryDifferentialOperatorTwo'' -(LinearOrdinaryDifferentialOperatorTwoXmpPage) -\ref{LinearOrdinaryDifferentialOperatorTwoXmpPage} on -page~\pageref{LinearOrdinaryDifferentialOperatorTwoXmpPage} -\item ``List'' (ListXmpPage) -\ref{ListXmpPage} on -page~\pageref{ListXmpPage} -\item ``LyndonWord'' (LyndonWordXmpPage) -\ref{LyndonWordXmpPage} on -page~\pageref{LyndonWordXmpPage} -\item ``Magma'' (MagmaXmpPage) -\ref{MagmaXmpPage} on -page~\pageref{MagmaXmpPage} -\item ``MakeFunction'' (MakeFunctionXmpPage) -\ref{MakeFunctionXmpPage} on -page~\pageref{MakeFunctionXmpPage} -\item ``MappingPackageOne'' (MappingPackageOneXmpPage) -\ref{MappingPackageOneXmpPage} on -page~\pageref{MappingPackageOneXmpPage} -\item ``Matrix'' (MatrixXmpPage) -\ref{MatrixXmpPage} on -page~\pageref{MatrixXmpPage} -\item ``MultiSet'' (MultiSetXmpPage) -\ref{MultiSetXmpPage} on -page~\pageref{MultiSetXmpPage} -\item ``MultivariatePolynomial'' (MultivariatePolynomialXmpPage) -\ref{MultivariatePolynomialXmpPage} on -page~\pageref{MultivariatePolynomialXmpPage} -\item ``None'' (NoneXmpPage) -\ref{NoneXmpPage} on -page~\pageref{NoneXmpPage} -\item ``Octonion'' (OctonionXmpPage) -\ref{OctonionXmpPage} on -page~\pageref{OctonionXmpPage} -\item ``OneDimensionalArray'' (OneDimensionalArrayXmpPage) -\ref{OneDimensionalArrayXmpPage} on -page~\pageref{OneDimensionalArrayXmpPage} -\item ``Operator'' (OperatorXmpPage) -\ref{OperatorXmpPage} on -page~\pageref{OperatorXmpPage} -\item ``OrderedVariableList'' (OrderedVariableListXmpPage) -\ref{OrderedVariableListXmpPage} on -page~\pageref{OrderedVariableListXmpPage} -\item ``OrderlyDifferentialPolynomial'' (OrderlyDifferentialPolynomialXmpPage) -\ref{OrderlyDifferentialPolynomialXmpPage} on -page~\pageref{OrderlyDifferentialPolynomialXmpPage} -\item ``PartialFraction'' (PartialFractionXmpPage) -\ref{PartialFractionXmpPage} on -page~\pageref{PartialFractionXmpPage} -\item ``Permanent'' (PermanentXmpPage) -\ref{PermanentXmpPage} on -page~\pageref{PermanentXmpPage} -\item ``Polynomial'' (PolynomialXmpPage) -\ref{PolynomialXmpPage} on -page~\pageref{PolynomialXmpPage} -\item ``Quaternion'' (QuaternionXmpPage) -\ref{QuaternionXmpPage} on -page~\pageref{QuaternionXmpPage} -\item ``RadixExpansion'' (RadixExpansionXmpPage) -\ref{RadixExpansionXmpPage} on -page~\pageref{RadixExpansionXmpPage} -\item ``RealClosure'' (RealClosureXmpPage) -\ref{RealClosureXmpPage} on -page~\pageref{RealClosureXmpPage} -\item ``RegularTriangularSet'' (RegularTriangularSetXmpPage) -\ref{RegularTriangularSetXmpPage} on -page~\pageref{RegularTriangularSetXmpPage} -\item ``RomanNumeral'' (RomanNumeralXmpPage) -\ref{RomanNumeralXmpPage} on -page~\pageref{RomanNumeralXmpPage} -\item ``Segment'' (SegmentXmpPage) -\ref{SegmentXmpPage} on -page~\pageref{SegmentXmpPage} -\item ``SegmentBinding'' (SegmentBindingXmpPage) -\ref{SegmentBindingXmpPage} on -page~\pageref{SegmentBindingXmpPage} -\item ``Set'' (SetXmpPage) -\ref{SetXmpPage} on -page~\pageref{SetXmpPage} -\item ``SingleInteger'' (SingleIntegerXmpPage) -\ref{SingleIntegerXmpPage} on -page~\pageref{SingleIntegerXmpPage} -\item ``SparseTable'' (SparseTableXmpPage) -\ref{SparseTableXmpPage} on -page~\pageref{SparseTableXmpPage} -\item ``SquareMatrix'' (SquareMatrixXmpPage) -\ref{SquareMatrixXmpPage} on -page~\pageref{SquareMatrixXmpPage} -\item ``SquareFreeRegularTriangularSet'' -(SquareFreeRegularTriangularSetXmpPage) -\ref{SquareFreeRegularTriangularSetXmpPage} on -page~\pageref{SquareFreeRegularTriangularSetXmpPage} -\item ``Stream'' (StreamXmpPage) -\ref{StreamXmpPage} on -page~\pageref{StreamXmpPage} -\item ``String'' (StringXmpPage) -\ref{StringXmpPage} on -page~\pageref{StringXmpPage} -\item ``StringTable'' (StringTableXmpPage) -\ref{StringTableXmpPage} on -page~\pageref{StringTableXmpPage} -\item ``Symbol'' (SymbolXmpPage) -\ref{SymbolXmpPage} on -page~\pageref{SymbolXmpPage} -\item ``Table'' (TableXmpPage) -\ref{TableXmpPage} on -page~\pageref{TableXmpPage} -\item ``TextFile'' (TextFileXmpPage) -\ref{TextFileXmpPage} on -page~\pageref{TextFileXmpPage} -\item ``TwoDimensionalArray'' (TwoDimensionalArrayXmpPage) -\ref{TwoDimensionalArrayXmpPage} on -page~\pageref{TwoDimensionalArrayXmpPage} -\item ``UnivariatePolynomial'' (UnivariatePolynomialXmpPage) -\ref{UnivariatePolynomialXmpPage} on -page~\pageref{UnivariatePolynomialXmpPage} -\item ``UniversalSegment'' (UniversalSegmentXmpPage) -\ref{UniversalSegmentXmpPage} on -page~\pageref{UniversalSegmentXmpPage} -\item ``Vector'' (VectorXmpPage) -\ref{VectorXmpPage} on -page~\pageref{VectorXmpPage} -\item ``Void'' (VoidXmpPage) -\ref{VoidXmpPage} on -page~\pageref{VoidXmpPage} -\item ``WuWenTsunTriangularSet'' (WuWenTsunTriangularSetXmpPage) -\ref{WuWenTsunTriangularSetXmpPage} on -page~\pageref{WuWenTsunTriangularSetXmpPage} -\item ``XPBWPolynomial'' (XPBWPolynomialXmpPage) -\ref{XPBWPolynomialXmpPage} on -page~\pageref{XPBWPolynomialXmpPage} -\item ``XPolynomial'' (XPolynomialXmpPage) -\ref{XPolynomialXmpPage} on -page~\pageref{XPolynomialXmpPage} -\item ``XPolynomialRing'' (XPolynomialRingXmpPage) -\ref{XPolynomialRingXmpPage} on -page~\pageref{XPolynomialRingXmpPage} -\item ``ZeroDimensionalSolvePackage'' (ZeroDimensionalSolvePackageXmpPage) -\ref{ZeroDimensionalSolvePackageXmpPage} on -page~\pageref{ZeroDimensionalSolvePackageXmpPage} -\end{itemize} -\index{pages!ExamplesExposedPage!xmpexp.ht} -\index{xmpexp.ht!pages!ExamplesExposedPage} -\index{ExamplesExposedPage!xmpexp.ht!pages} +\pagehead{ExamplesExposedPage}{xmpexp.ht} +{Some Examples of Domains and Packages} +\pagepic{ps/v71examplesexposedpage.eps}{examplesexposedpage} +\pagefrom{Reference}{TopReferencePage} +\pageto{AssociationList}{AssociationListXmpPage} +\pageto{BalancedBinaryTree}{BalancedBinaryTreeXmpPage} +\pageto{BasicOperator}{BasicOperatorXmpPage} +\pageto{BinaryExpansion}{BinaryExpansionXmpPage} +\pageto{BinarySearchTree}{BinarySearchTreeXmpPage} +\pageto{CardinalNumber}{CardinalNumberXmpPage} +\pageto{CartesianTensor}{CartesianTensorXmpPage} +\pageto{Character}{CharacterXmpPage} +\pageto{CharacterClass}{CharacterClassXmpPage} +\pageto{CliffordAlgebra}{CliffordAlgebraXmpPage} +\pageto{Complex}{ComplexXmpPage} +\pageto{ContinuedFraction}{ContinuedFractionXmpPage} +\pageto{CycleIndicators}{CycleIndicatorsXmpPage} +\pageto{DeRhamComplex}{DeRhamComplexXmpPage} +\pageto{DecimalExpansion}{DecimalExpansionXmpPage} +\pageto{DistributedMultivariatePoly} +{DistributedMultivariatePolyXmpPage} +\pageto{DoubleFloat}{DoubleFloatXmpPage} +\pageto{EqTable}{EqTableXmpPage} +\pageto{Equation}{EquationXmpPage} +\pageto{Exit}{ExitXmpPage} +\pageto{Expression}{ExpressionXmpPage} +\pageto{Factored}{FactoredXmpPage} +\pageto{FactoredFunctionsTwo}{FactoredFnsTwoXmpPage} +\pageto{File}{FileXmpPage} +\pageto{FileName}{FileNameXmpPage} +\pageto{FlexibleArray}{FlexibleArrayXmpPage} +\pageto{Float}{FloatXmpPage} +\pageto{Fraction}{FractionXmpPage} +\pageto{FullPartialFracExpansion}{FullPartialFracExpansionXmpPage} +\pageto{GeneralSparseTable}{GeneralSparseTableXmpPage} +\pageto{GroebnerFactorizationPkg}{GroebnerFactorizationPkgXmpPage} +\pageto{Heap}{HeapXmpPage} +\pageto{HexadecimalExpansion}{HexExpansionXmpPage} +\pageto{Integer}{IntegerXmpPage} +\pageto{IntegerLinearDependence}{IntegerLinearDependenceXmpPage} +\pageto{IntegerNumberTheoryFunctions}{IntNumberTheoryFnsXmpPage} +\pageto{Kernel}{KernelXmpPage} +\pageto{KeyedAccessFile}{KeyedAccessFileXmpPage} +\pageto{LexTriangularPackage}{LexTriangularPkgXmpPage} +\pageto{LazardSetSolvingPackage}{LazardSetSolvingPackageXmpPage} +\pageto{Library}{LibraryXmpPage} +\pageto{LieExponentials}{LieExponentialsXmpPage} +\pageto{LiePolynomial}{LiePolynomialXmpPage} +\pageto{LinearOrdinaryDifferentialOperator} +{LinearOrdinaryDifferentialOperatorXmpPage} +\pageto{LinearOrdinaryDifferentialOperatorOne} +{LinearOrdinaryDifferentialOperatorOneXmpPage} +\pageto{LinearODEOperatorTwo} +{LinearODEOperatorTwoXmpPage} +\pageto{List}{ListXmpPage} +\pageto{LyndonWord}{LyndonWordXmpPage} +\pageto{Magma}{MagmaXmpPage} +\pageto{MakeFunction}{MakeFunctionXmpPage} +\pageto{MappingPackageOne}{MappingPackageOneXmpPage} +\pageto{Matrix}{MatrixXmpPage} +\pageto{MultiSet}{MultiSetXmpPage} +\pageto{MultivariatePolynomial}{MultivariatePolyXmpPage} +\pageto{None}{NoneXmpPage} +\pageto{Octonion}{OctonionXmpPage} +\pageto{OneDimensionalArray}{OneDimensionalArrayXmpPage} +\pageto{Operator}{OperatorXmpPage} +\pageto{OrderedVariableList}{OrderedVariableListXmpPage} +\pageto{OrderlyDifferentialPolynomial}{OrderlyDifferentialPolyXmpPage} +\pageto{PartialFraction}{PartialFractionXmpPage} +\pageto{Permanent}{PermanentXmpPage} +\pageto{Polynomial}{PolynomialXmpPage} +\pageto{Quaternion}{QuaternionXmpPage} +\pageto{RadixExpansion}{RadixExpansionXmpPage} +\pageto{RealClosure}{RealClosureXmpPage} +\pageto{RegularTriangularSet}{RegularTriangularSetXmpPage} +\pageto{RomanNumeral}{RomanNumeralXmpPage} +\pageto{Segment}{SegmentXmpPage} +\pageto{SegmentBinding}{SegmentBindingXmpPage} +\pageto{Set}{SetXmpPage} +\pageto{SingleInteger}{SingleIntegerXmpPage} +\pageto{SparseTable}{SparseTableXmpPage} +\pageto{SquareMatrix}{SqMatrixXmpPage} +\pageto{SquareFreeRegularTriangularSet}{SqFreeRegTriangSetXmpPage} +\pageto{Stream}{StreamXmpPage} +\pageto{String}{StringXmpPage} +\pageto{StringTable}{StringTableXmpPage} +\pageto{Symbol}{SymbolXmpPage} +\pageto{Table}{TableXmpPage} +\pageto{TextFile}{TextFileXmpPage} +\pageto{TwoDimensionalArray}{TwoDimensionalArrayXmpPage} +\pageto{UnivariatePolynomial}{UnivariatePolyXmpPage} +\pageto{UniversalSegment}{UniversalSegmentXmpPage} +\pageto{Vector}{VectorXmpPage} +\pageto{Void}{VoidXmpPage} +\pageto{WuWenTsunTriangularSet}{WuWenTsunTriangularSetXmpPage} +\pageto{XPBWPolynomial}{XPBWPolynomialXmpPage} +\pageto{XPolynomial}{XPolynomialXmpPage} +\pageto{XPolynomialRing}{XPolynomialRingXmpPage} +\pageto{ZeroDimensionalSolvePackage}{ZeroDimSolvePkgXmpPage} <>= \begin{page}{ExamplesExposedPage}{Some Examples of Domains and Packages} This is a menu of examples of some domains and packages. @@ -22892,37 +20834,44 @@ Click on any item below to see that section. { \downlink{CycleIndicators}{CycleIndicatorsXmpPage} } { \downlink{DeRhamComplex}{DeRhamComplexXmpPage} } { \downlink{DecimalExpansion}{DecimalExpansionXmpPage} } -{ \downlink{DistributedMultivariatePolynomial}{DistributedMultivariatePolynomialXmpPage} } +{ \downlink{DistributedMultivariatePoly} +{DistributedMultivariatePolyXmpPage} } { \downlink{DoubleFloat}{DoubleFloatXmpPage} } { \downlink{EqTable}{EqTableXmpPage} } { \downlink{Equation}{EquationXmpPage} } { \downlink{Exit}{ExitXmpPage} } { \downlink{Expression}{ExpressionXmpPage} } { \downlink{Factored}{FactoredXmpPage} } -{ \downlink{FactoredFunctions2}{FactoredFunctionsTwoXmpPage} } +{ \downlink{FactoredFunctions2}{FactoredFnsTwoXmpPage} } { \downlink{File}{FileXmpPage} } { \downlink{FileName}{FileNameXmpPage} } { \downlink{FlexibleArray}{FlexibleArrayXmpPage} } { \downlink{Float}{FloatXmpPage} } { \downlink{Fraction}{FractionXmpPage} } -{ \downlink{FullPartialFractionExpansion}{FullPartialFractionExpansionXmpPage} } +{ \downlink{FullPartialFracExpansion} +{FullPartialFracExpansionXmpPage} } { \downlink{GeneralSparseTable}{GeneralSparseTableXmpPage} } -{ \downlink{GroebnerFactorizationPackage}{GroebnerFactorizationPackageXmpPage} } +{ \downlink{GroebnerFactorizationPkg} +{GroebnerFactorizationPkgXmpPage} } { \downlink{Heap}{HeapXmpPage} } -{ \downlink{HexadecimalExpansion}{HexadecimalExpansionXmpPage} } +{ \downlink{HexadecimalExpansion}{HexExpansionXmpPage} } { \downlink{Integer}{IntegerXmpPage} } { \downlink{IntegerLinearDependence}{IntegerLinearDependenceXmpPage} } -{ \downlink{IntegerNumberTheoryFunctions}{IntegerNumberTheoryFunctionsXmpPage} } +{ \downlink{IntegerNumberTheoryFunctions} +{IntNumberTheoryFnsXmpPage} } { \downlink{Kernel}{KernelXmpPage} } { \downlink{KeyedAccessFile}{KeyedAccessFileXmpPage} } -{ \downlink{LexTriangularPackage}{LexTriangularPackageXmpPage} } +{ \downlink{LexTriangularPackage}{LexTriangularPkgXmpPage} } { \downlink{LazardSetSolvingPackage}{LazardSetSolvingPackageXmpPage} } { \downlink{Library}{LibraryXmpPage} } { \downlink{LieExponentials}{LieExponentialsXmpPage} } { \downlink{LiePolynomial}{LiePolynomialXmpPage} } -{ \downlink{LinearOrdinaryDifferentialOperator}{LinearOrdinaryDifferentialOperatorXmpPage} } -{ \downlink{LinearOrdinaryDifferentialOperator1}{LinearOrdinaryDifferentialOperatorOneXmpPage} } -{ \downlink{LinearOrdinaryDifferentialOperator2}{LinearOrdinaryDifferentialOperatorTwoXmpPage} } +{ \downlink{LinearOrdinaryDifferentialOperator} +{LinearOrdinaryDifferentialOperatorXmpPage} } +{ \downlink{LinearOrdinaryDifferentialOperator1} +{LinearOrdinaryDifferentialOperatorOneXmpPage} } +{ \downlink{LinearOrdinaryDifferentialOperator2} +{LinearODEOperatorTwoXmpPage} } { \downlink{List}{ListXmpPage} } { \downlink{LyndonWord}{LyndonWordXmpPage} } { \downlink{Magma}{MagmaXmpPage} } @@ -22930,13 +20879,14 @@ Click on any item below to see that section. { \downlink{MappingPackage1}{MappingPackageOneXmpPage} } { \downlink{Matrix}{MatrixXmpPage} } { \downlink{MultiSet}{MultiSetXmpPage} } -{ \downlink{MultivariatePolynomial}{MultivariatePolynomialXmpPage} } +{ \downlink{MultivariatePolynomial}{MultivariatePolyXmpPage} } { \downlink{None}{NoneXmpPage} } { \downlink{Octonion}{OctonionXmpPage} } { \downlink{OneDimensionalArray}{OneDimensionalArrayXmpPage} } { \downlink{Operator}{OperatorXmpPage} } { \downlink{OrderedVariableList}{OrderedVariableListXmpPage} } -{ \downlink{OrderlyDifferentialPolynomial}{OrderlyDifferentialPolynomialXmpPage} } +{ \downlink{OrderlyDifferentialPolynomial} +{OrderlyDifferentialPolyXmpPage} } { \downlink{PartialFraction}{PartialFractionXmpPage} } { \downlink{Permanent}{PermanentXmpPage} } { \downlink{Polynomial}{PolynomialXmpPage} } @@ -22950,8 +20900,9 @@ Click on any item below to see that section. { \downlink{Set}{SetXmpPage} } { \downlink{SingleInteger}{SingleIntegerXmpPage} } { \downlink{SparseTable}{SparseTableXmpPage} } -{ \downlink{SquareMatrix}{SquareMatrixXmpPage} } -{ \downlink{SquareFreeRegularTriangularSet}{SquareFreeRegularTriangularSetXmpPage} } +{ \downlink{SquareMatrix}{SqMatrixXmpPage} } +{ \downlink{SquareFreeRegularTriangularSet} +{SqFreeRegTriangSetXmpPage} } { \downlink{Stream}{StreamXmpPage} } { \downlink{String}{StringXmpPage} } { \downlink{StringTable}{StringTableXmpPage} } @@ -22959,7 +20910,7 @@ Click on any item below to see that section. { \downlink{Table}{TableXmpPage} } { \downlink{TextFile}{TextFileXmpPage} } { \downlink{TwoDimensionalArray}{TwoDimensionalArrayXmpPage} } -{ \downlink{UnivariatePolynomial}{UnivariatePolynomialXmpPage} } +{ \downlink{UnivariatePolynomial}{UnivariatePolyXmpPage} } { \downlink{UniversalSegment}{UniversalSegmentXmpPage} } { \downlink{Vector}{VectorXmpPage} } { \downlink{Void}{VoidXmpPage} } @@ -22967,7 +20918,8 @@ Click on any item below to see that section. { \downlink{XPBWPolynomial}{XPBWPolynomialXmpPage} } { \downlink{XPolynomial}{XPolynomialXmpPage} } { \downlink{XPolynomialRing}{XPolynomialRingXmpPage} } -{ \downlink{ZeroDimensionalSolvePackage}{ZeroDimensionalSolvePackageXmpPage} } +{ \downlink{ZeroDimensionalSolvePackage} +{ZeroDimSolvePkgXmpPage} } } \endscroll \autobuttons @@ -22975,16 +20927,7 @@ Click on any item below to see that section. @ \section{xpbwpoly.ht} -<>= -\newcommand{\XPBWPolynomialXmpTitle}{XPBWPolynomial} -\newcommand{\XPBWPolynomialXmpNumber}{9.88} - -@ -\subsection{XPBWPolynomial} -\label{XPBWPolynomialXmpPage} -\index{pages!XPBWPolynomialXmpPage!xpbwpoly.ht} -\index{xpbwpoly.ht!pages!XPBWPolynomialXmpPage} -\index{XPBWPolynomialXmpPage!xpbwpoly.ht!pages} +\pagehead{XPBWPolynomialXmpPage}{xpbwpoly.ht}{XPBWPolynomial} <>= \begin{page}{XPBWPolynomialXmpPage}{XPBWPolynomial} \beginscroll @@ -23015,11 +20958,13 @@ Initialisations } \xtc{ }{ -\spadpaste{dpoly := XDistributedPolynomial(Symbol, RN) \bound{dpoly} \free{RN}} +\spadpaste{dpoly := XDistributedPolynomial(Symbol, RN) \bound{dpoly} +\free{RN}} } \xtc{ }{ -\spadpaste{rpoly := XRecursivePolynomial(Symbol, RN) \bound{rpoly} \free{RN}} +\spadpaste{rpoly := XRecursivePolynomial(Symbol, RN) \bound{rpoly} +\free{RN}} } \xtc{ }{ @@ -23031,7 +20976,8 @@ Initialisations } \xtc{ }{ -\spadpaste{liste : List lword := LyndonWordsList([a,b], 6) \bound{liste} \free{lword a b }} +\spadpaste{liste : List lword := LyndonWordsList([a,b], 6) +\bound{liste} \free{lword a b }} } Let's make some polynomials @@ -23122,7 +21068,8 @@ Calculations with verification in \axiomType{XDistributedPolynomial}. } \xtc{ }{ -\spadpaste{lpd : dpoly := lpd1 * lpd2 - lpd2 * lpd1 \free{dpoly lpd1 lpd2} \bound{lpd}} +\spadpaste{lpd : dpoly := lpd1 * lpd2 - lpd2 * lpd1 +\free{dpoly lpd1 lpd2} \bound{lpd}} } \xtc{ }{ @@ -23160,17 +21107,8 @@ Calculations with verification in \axiomType{XRecursivePolynomial}. @ \section{xpoly.ht} +\pagehead{XPolynomialXmpPage}{xpoly.ht}{XPolynomial} <>= -\newcommand{\XPolynomialXmpTitle}{XPolynomial} -\newcommand{\XPolynomialXmpNumber}{9.89} - -@ -\subsection{XPolynomial} -\label{XPolynomialXmpPage} -\index{pages!XPolynomialXmpPage!xpoly.ht.ht} -\index{xpoly.ht.ht!pages!XPolynomialXmpPage} -\index{XPolynomialXmpPage!xpoly.ht.ht!pages} -<>= \begin{page}{XPolynomialXmpPage}{XPolynomial} \beginscroll The \spadtype{XPolynomial} domain constructor implements @@ -23191,7 +21129,8 @@ Other constructors like \spadtype{XPolynomialRing}, implement multivariate polynomials in non-commutative variables. -We illustrate now some of the facilities of the \spadtype{XPOLY} domain constructor. +We illustrate now some of the facilities of the \spadtype{XPOLY} +domain constructor. \xtc{ @@ -23285,16 +21224,7 @@ and the shuffle-product of {\bf pr} by {\bf r}: @ \section{xpr.ht} -<>= -\newcommand{\XPolynomialRingXmpTitle}{XPolynomialRing} -\newcommand{\XPolynomialRingXmpNumber}{9.90} - -@ -\subsection{XPolynomialRing} -\label{XPolynomialRingXmpPage} -\index{pages!XPolynomialRingXmpPage!xpr.ht} -\index{xpr.ht!pages!XPolynomialRingXmpPage} -\index{XPolynomialRingXmpPage!xpr.ht!pages} +\pagehead{XPolynomialRingXmpPage}{xpr.ht}{XPolynomialRing} <>= \begin{page}{XPolynomialRingXmpPage}{XPolynomialRing} \beginscroll @@ -23318,7 +21248,8 @@ Other constructors like \spadtype{XPolynomial}, implement multivariate polynomials in non-commutative variables. -We illustrate now some of the facilities of the \spadtype{XPR} domain constructor. +We illustrate now some of the facilities of the \spadtype{XPR} domain +constructor. \xtc{ Define the free ordered monoid generated by the symbols. @@ -23382,7 +21313,8 @@ and the linear combinations of words with these matrices as coefficients. \xtc{ Define a first matrix, }{ -\spadpaste{m1:M := matrix [[i*j**2 for i in 1..2] for j in 1..2] \free{M} \bound{m1}} +\spadpaste{m1:M := matrix [[i*j**2 for i in 1..2] for j in 1..2] +\free{M} \bound{m1}} } \xtc{ @@ -23400,7 +21332,8 @@ and a third one. \xtc{ Define a polynomial, }{ -\spadpaste{pm:poly1 := m1*x + m2*y + m3*z - 2/3 \free{poly1} \free{m1} \free{m2} \free{m3} \bound{pm}} +\spadpaste{pm:poly1 := m1*x + m2*y + m3*z - 2/3 \free{poly1} +\free{m1} \free{m2} \free{m3} \bound{pm}} } @@ -23422,76 +21355,62 @@ and the following power. @ \section{zdsolve.ht} +\pagehead{ZeroDimSolvePkgXmpPage}{zdsolve.ht} +{ZeroDimensionalSolvePackage} <>= -\newcommand{\ZeroDimensionalSolvePackageXmpTitle}{ZeroDimensionalSolvePackage} -\newcommand{\ZeroDimensionalSolvePackageXmpNumber}{9.91} - -@ -\subsection{ZeroDimensionalSolvePackage} -\label{ZeroDimensionalSolvePackageXmpPage} -\index{pages!ZeroDimensionalSolvePackageXmpPage!zdsolve.ht} -\index{zdsolve.ht!pages!ZeroDimensionalSolvePackageXmpPage} -\index{ZeroDimensionalSolvePackageXmpPage!zdsolve.ht!pages} -<>= -\begin{page}{ZeroDimensionalSolvePackageXmpPage}{ZeroDimensionalSolvePackage} -\beginscroll -The \spadtype{ZeroDimensionalSolvePackage} package constructor -provides operations for computing symbolically the complex or real roots of -zero-dimensional algebraic systems. - -The package provides {\bf no} multiplicity information (i.e. some returned -roots may be double or higher) but only distinct roots are returned. - -Complex roots are given by means of univariate representations -of irreducible regular chains. -These representations are computed by the -\axiomOpFrom{univariateSolve}{ZeroDimensionalSolvePackage} -operation (by calling the -\spadtype{InternalRationalUnivariateRepresentationPackage} -package constructor which does the job). - -Real roots are given by means of tuples -of coordinates lying in the \spadtype{RealClosure} of the coefficient ring. -They are computed by the \axiomOpFrom{realSolve}{ZeroDimensionalSolvePackage} -and \axiomOpFrom{positiveSolve}{ZeroDimensionalSolvePackage} operations. -The former computes all the solutions of the input system with real coordinates -whereas the later concentrate -on the solutions with (strictly) positive coordinates. -In both cases, the computations -are performed by the \spadtype{RealClosure} constructor. - -Both computations of complex roots -and real roots rely on triangular decompositions. -These decompositions can be computed in two different ways. -First, by a applying the \axiomOpFrom{zeroSetSplit}{RegularTriangularSet} -operation from the \spadtype{REGSET} domain constructor. -In that case, no Groebner bases are computed. -This strategy is used by default. -Secondly, by applying the \axiomOpFrom{zeroSetSplit}{LexTriangularPackage} -from \spadtype{LEXTRIPK}. -To use this later strategy with the operations +\begin{page}{ZeroDimSolvePkgXmpPage}{ZeroDimensionalSolvePackage} +\beginscroll +The \spadtype{ZeroDimensionalSolvePackage} package constructor +provides operations for computing symbolically the complex or real +roots of zero-dimensional algebraic systems. + +The package provides {\bf no} multiplicity information (i.e. some +returned roots may be double or higher) but only distinct roots are +returned. + +Complex roots are given by means of univariate representations of +irreducible regular chains. These representations are computed by the +\axiomOpFrom{univariateSolve}{ZeroDimensionalSolvePackage} operation +(by calling the +\spadtype{InternalRationalUnivariateRepresentationPackage} package +constructor which does the job). + +Real roots are given by means of tuples of coordinates lying in the +\spadtype{RealClosure} of the coefficient ring. They are computed by +the \axiomOpFrom{realSolve}{ZeroDimensionalSolvePackage} and +\axiomOpFrom{positiveSolve}{ZeroDimensionalSolvePackage} operations. +The former computes all the solutions of the input system with real +coordinates whereas the later concentrate on the solutions with +(strictly) positive coordinates. In both cases, the computations are +performed by the \spadtype{RealClosure} constructor. + +Both computations of complex roots and real roots rely on triangular +decompositions. These decompositions can be computed in two different +ways. First, by a applying the +\axiomOpFrom{zeroSetSplit}{RegularTriangularSet} operation from the +\spadtype{REGSET} domain constructor. In that case, no Groebner bases +are computed. This strategy is used by default. Secondly, by +applying the \axiomOpFrom{zeroSetSplit}{LexTriangularPackage} from +\spadtype{LEXTRIPK}. To use this later strategy with the operations \axiomOpFrom{univariateSolve}{ZeroDimensionalSolvePackage}, -\axiomOpFrom{realSolve}{ZeroDimensionalSolvePackage} -and \axiomOpFrom{positiveSolve}{ZeroDimensionalSolvePackage} -one just needs to use an extra boolean argument. +\axiomOpFrom{realSolve}{ZeroDimensionalSolvePackage} and +\axiomOpFrom{positiveSolve}{ZeroDimensionalSolvePackage} one just +needs to use an extra boolean argument. Note that the way of understanding triangular decompositions is detailed in the example of the \spadtype{RegularTriangularSet} constructor. -The \spadtype{ZeroDimensionalSolvePackage} constructor takes three arguments. -The first one {\bf R} is the coefficient ring; -it must belong to the categories -\spadtype{OrderedRing}, \spadtype{EuclideanDomain}, -\spadtype{CharacteristicZero} -and \spadtype{RealConstant}. -This means essentially that {\bf R} is \spadtype{Integer} or -\spadtype{Fraction(Integer)}. -The second argument {\bf ls} is the list of variables involved -in the systems to solve. -The third one MUST BE {\bf concat(ls,s)} where -{\bf s} is an additional symbol used for the univariate representations. -The abbreviation for \spadtype{ZeroDimensionalSolvePackage} is +The \spadtype{ZeroDimensionalSolvePackage} constructor takes three +arguments. The first one {\bf R} is the coefficient ring; it must +belong to the categories \spadtype{OrderedRing}, +\spadtype{EuclideanDomain}, \spadtype{CharacteristicZero} and +\spadtype{RealConstant}. This means essentially that {\bf R} is +\spadtype{Integer} or \spadtype{Fraction(Integer)}. The second +argument {\bf ls} is the list of variables involved in the systems to +solve. The third one MUST BE {\bf concat(ls,s)} where {\bf s} is an +additional symbol used for the univariate representations. The +abbreviation for \spadtype{ZeroDimensionalSolvePackage} is \spadtype{ZDSOLVE}. We illustrate now how to use the constructor \spadtype{ZDSOLVE} @@ -23521,21 +21440,25 @@ and: \xtc{ Call the package: }{ -\spadpaste{pack := ZDSOLVE(R,ls,ls2) \free{ls} \free{ls2} \free{R} \bound{pack}} +\spadpaste{pack := ZDSOLVE(R,ls,ls2) \free{ls} \free{ls2} +\free{R} \bound{pack}} } \xtc{ Define a polynomial system (Arnborg-Lazard) }{ -\spadpaste{p1 := x**2*y*z + x*y**2*z + x*y*z**2 + x*y*z + x*y + x*z + y*z \bound{p1}} +\spadpaste{p1 := x**2*y*z + x*y**2*z + x*y*z**2 + x*y*z + +x*y + x*z + y*z \bound{p1}} } \xtc{ }{ -\spadpaste{p2 := x**2*y**2*z + x*y**2*z**2 + x**2*y*z + x*y*z + y*z + x + z \bound{p2}} +\spadpaste{p2 := x**2*y**2*z + x*y**2*z**2 + x**2*y*z + +x*y*z + y*z + x + z \bound{p2}} } \xtc{ }{ -\spadpaste{p3 := x**2*y**2*z**2 + x**2*y**2*z + x*y**2*z + x*y*z + x*z + z + 1 \bound{p3}} +\spadpaste{p3 := x**2*y**2*z**2 + x**2*y**2*z + x*y**2*z + +x*y*z + x*z + z + 1 \bound{p3}} } \xtc{ }{ @@ -23560,33 +21483,29 @@ Then we compute a univariate representation of this regular chain. \spadpaste{univariateSolve(lp)$pack \free{lp} \free{pack}} } -We see that the zeros of our regular chain are split into three components. -This is due to the use of univariate polynomial factorization. - -Each of these components consist of two parts. -The first one is an irreducible univariate polynomial {\bf p(?)} which defines -a simple algebraic extension of the field of fractions of {\bf R}. -The second one consists of multivariate polynomials {\bf pol1(x,\%A)}, -{\bf pol2(y,\%A)} and {\bf pol3(z,\%A)}. -Each of these polynomials involve two variables: one is an indeterminate -{\bf x}, {\bf y} or {\bf z} -of the input system {\bf lp} and the -other is {\bf \%A} which represents any root of {\bf p(?)}. -Recall that this {\bf \%A} is the last element of the third parameter of -\spadtype{ZDSOLVE}. -Thus any complex root {\bf ?} of {\bf p(?)} -leads to a solution of the input system {\bf lp} -by replacing {\bf \%A} by this {\bf ?} in {\bf pol1(x,\%A)}, -{\bf pol2(y,\%A)} and {\bf pol3(z,\%A)}. -Note that the polynomials {\bf pol1(x,\%A)}, -{\bf pol2(y,\%A)} and {\bf pol3(z,\%A)} have degree one -w.r.t. {\bf x}, {\bf y} or {\bf z} respectively. -This is always the case for all univariate representations. -Hence the operation {\bf univariateSolve} replaces a -system of multivariate polynomials by a list of univariate -polynomials, what justifies its name. -Another example of univariate representations illustrates -the \spadtype{LexTriangularPackage} package constructor. +We see that the zeros of our regular chain are split into three +components. This is due to the use of univariate polynomial +factorization. + +Each of these components consist of two parts. The first one is an +irreducible univariate polynomial {\bf p(?)} which defines a simple +algebraic extension of the field of fractions of {\bf R}. The second +one consists of multivariate polynomials {\bf pol1(x,\%A)}, {\bf +pol2(y,\%A)} and {\bf pol3(z,\%A)}. Each of these polynomials involve +two variables: one is an indeterminate {\bf x}, {\bf y} or {\bf z} of +the input system {\bf lp} and the other is {\bf \%A} which represents +any root of {\bf p(?)}. Recall that this {\bf \%A} is the last +element of the third parameter of \spadtype{ZDSOLVE}. Thus any +complex root {\bf ?} of {\bf p(?)} leads to a solution of the input +system {\bf lp} by replacing {\bf \%A} by this {\bf ?} in +{\bf pol1(x,\%A)}, {\bf pol2(y,\%A)} and {\bf pol3(z,\%A)}. Note that +the polynomials {\bf pol1(x,\%A)}, {\bf pol2(y,\%A)} and {\bf pol3(z,\%A)} +have degree one w.r.t. {\bf x}, {\bf y} or {\bf z} respectively. This +is always the case for all univariate representations. Hence the +operation {\bf univariateSolve} replaces a system of multivariate +polynomials by a list of univariate polynomials, what justifies its +name. Another example of univariate representations illustrates the +\spadtype{LexTriangularPackage} package constructor. \xtc{ We now compute the solutions with real coordinates: @@ -23600,31 +21519,35 @@ The number of real solutions for the input system is: \spadpaste{\# lr \free{lr}} } -Each of these real solutions is given by a -list of elements in \spadtype{RealClosure(R)}. -In these 8 lists, the first element is a value of {\bf z}, -the second of {\bf y} and the last of {\bf x}. -This is logical since by setting the list of variables of the package -to {\bf [x,y,z,t]} we mean that the elimination ordering on the -variables is {\bf t < z < y < x }. -Note that each system treated by the \spadtype{ZDSOLVE} package constructor -needs only to be zero-dimensional w.r.t. the variables involved in the system it-self -and not necessarily w.r.t. all the variables used to define the package. +Each of these real solutions is given by a list of elements in +\spadtype{RealClosure(R)}. In these 8 lists, the first element is a +value of {\bf z}, the second of {\bf y} and the last of {\bf x}. This +is logical since by setting the list of variables of the package to +{\bf [x,y,z,t]} we mean that the elimination ordering on the variables +is {\bf t < z < y < x }. Note that each system treated by the +\spadtype{ZDSOLVE} package constructor needs only to be +zero-dimensional w.r.t. the variables involved in the system it-self +and not necessarily w.r.t. all the variables used to define the +package. \xtc{ We can approximate these real numbers as follows. -This computation takes between 30 sec. and 5 min, depending on your machine. +This computation takes between 30 sec. and 5 min, depending on your +machine. }{ -\spadpaste{[[approximate(r,1/1000000) for r in point] for point in lr] \free{lr}} +\spadpaste{[[approximate(r,1/1000000) for r in point] for point in lr] +\free{lr}} } \xtc{ -We can also concentrate on the solutions with real (strictly) positive coordinates: +We can also concentrate on the solutions with real (strictly) +positive coordinates: }{ \spadpaste{lpr := positiveSolve(lp)$pack \free{lp} \free{pack} \bound{lpr}} } -Thus we have checked that the input system has no solution with strictly positive coordinates. +Thus we have checked that the input system has no solution with +strictly positive coordinates. \xtc{ @@ -23646,7 +21569,8 @@ Let us define another polynomial system ({\em L-3}). } \xtc{ }{ -\spadpaste{lf := [f0, f1, f2, f3] \free{f0} \free{f1} \free{f2} \free{f3} \bound{lf}} +\spadpaste{lf := [f0, f1, f2, f3] \free{f0} \free{f1} \free{f2} +\free{f3} \bound{lf}} } @@ -23695,13 +21619,16 @@ Another example of computation of real solutions illustrates the \spadtype{LexTriangularPackage} package constructor. \xtc{ -We concentrate now on the solutions with real (strictly) positive coordinates: +We concentrate now on the solutions with real (strictly) positive +coordinates: }{ -\spadpaste{lpr2 := positiveSolve(lf)$pack \free{lf} \free{pack} \bound{lpr2}} +\spadpaste{lpr2 := positiveSolve(lf)$pack \free{lf} \free{pack} +\bound{lpr2}} } \xtc{ -Finally, we approximate the coordinates of this point with 20 exact digits: +Finally, we approximate the coordinates of this point with 20 exact +digits: }{ \spadpaste{[approximate(r,1/10**21)::Float for r in lpr2.1] \free{lpr2}} } @@ -23711,16 +21638,8 @@ Finally, we approximate the coordinates of this point with 20 exact digits: @ \section{zlindep.ht} -<>= -\newcommand{\IntegerLinearDependenceXmpTitle}{IntegerLinearDependence} -\newcommand{\IntegerLinearDependenceXmpNumber}{9.35} - -@ -\subsection{IntegerLinearDependence} -\label{IntegerLinearDependenceXmpPage} -\index{pages!IntegerLinearDependenceXmpPage!zlindep.ht} -\index{zlindep.ht!pages!IntegerLinearDependenceXmpPage} -\index{IntegerLinearDependenceXmpPage!zlindep.ht!pages} +\pagehead{IntegerLinearDependenceXmpPage}{zlindep.ht} +{IntegerLinearDependence} <>= \begin{page}{IntegerLinearDependenceXmpPage}{IntegerLinearDependence} \beginscroll @@ -23751,15 +21670,18 @@ Consider the domain of two by two square matrices with integer entries. \xtc{ Now create three such matrices. }{ -\spadpaste{m1: M := squareMatrix matrix [[1, 2], [0, -1]] \free{M}\bound{m1}} +\spadpaste{m1: M := squareMatrix matrix [[1, 2], [0, -1]] +\free{M}\bound{m1}} } \xtc{ }{ -\spadpaste{m2: M := squareMatrix matrix [[2, 3], [1, -2]] \free{M}\bound{m2}} +\spadpaste{m2: M := squareMatrix matrix [[2, 3], [1, -2]] +\free{M}\bound{m2}} } \xtc{ }{ -\spadpaste{m3: M := squareMatrix matrix [[3, 4], [2, -3]] \free{M}\bound{m3}} +\spadpaste{m3: M := squareMatrix matrix [[3, 4], [2, -3]] +\free{M}\bound{m3}} } % % @@ -23775,7 +21697,8 @@ dependent over the integers. Since they are linearly dependent, you can ask for the dependence relation. }{ -\spadpaste{c := linearDependenceOverZ vector [m1, m2, m3] \free{m1 m2 m3}\bound{c}} +\spadpaste{c := linearDependenceOverZ vector [m1, m2, m3] +\free{m1 m2 m3}\bound{c}} } % % @@ -23802,62 +21725,28 @@ To express a given element in terms of other elements, use the operation @ \chapter{Users Guide Pages (ug.ht)} -DO NOT MODIFY THIS FILE BY HAND !! Created by chapmenu.awk. -\section{Users Guide} -\label{UsersGuidePage} -\includegraphics[scale=.5]{ps/v71usersguidepage.eps} -\index{images!usersguidepage} - -Called from ``Reference'' (TopReferencePage) -\ref{TopReferencePage} on page~\pageref{TopReferencePage} -\begin{itemize} -\item ``What's New in Axiom Version May 2008''\\ -(ugWhatsNewTwoTwoPage) \ref{ugWhatsNewTwoTwoPage} on -page~\pageref{ugWhatsNewTwoTwoPage} -\item ``An Overview of Axiom''\\ -(ugIntroPage) \ref{ugIntroPage} on page~\pageref{ugIntroPage} -\item ``Using Types and Modes''\\ -(ugTypesPage) \ref{ugTypesPage} on page~\pageref{ugTypesPage} -\item ``Using HyperDoc''\\ -(ugHyperPage) \ref{ugHyperPage} on page~\pageref{ugHyperPage} -\item ``Input Files and Output Styles''\\ -(ugInOutPage) \ref{ugInOutPage} on page~\pageref{ugInOutPage} -\item ``Introduction to the Axiom Interactive Language''\\ -(ugLangPage) \ref{ugLangPage} on page~\pageref{ugLangPage} -\item ``User-Defined Functions, Macros and Rules''\\ -(ugUserPage) \ref{ugUserPage} on page~\pageref{ugUserPage} -\item ``Graphics''\\ -(ugGraphPage) \ref{ugGraphPage} on page~\pageref{ugGraphPage} -\item ``Advanced Problem Solving''\\ -(ugProblemPage) \ref{ugProblemPage} on page~\pageref{ugProblemPage} -\item ``Some Examples for Domains and Packages''\\ -(ExamplesExposedPage) \ref{ExamplesExposedPage} on -page~\pageref{ExamplesExposedPage} -\item ``Interactive Programming''\\ -(ugIntProgPage) \ref{ugIntProgPage} on page~\pageref{ugIntProgPage} -\item ``Packages''\\ -(ugPackagesPage) \ref{ugPackagesPage} on page~\pageref{ugPackagesPage} -\item ``Categories''\\ -(ugCategoriesPage) \ref{ugCategoriesPage} on -page~\pageref{ugCategoriesPage} -\item ``Domains''\\ -(ugDomainsPage) \ref{ugDomainsPage} on page~\pageref{ugDomainsPage} -\item ``Browse''\\ -(ugBrowsePage) \ref{ugBrowsePage} on page~\pageref{ugBrowsePage} -\item ``What's New in Axiom Version 2.0''\\ -(ugWhatsNewPage) \ref{ugWhatsNewPage} on page~\pageref{ugWhatsNewPage} -\item ``Axiom System Commands''\\ -(ugSysCmdPage) \ref{ugSysCmdPage} on page~\pageref{ugSysCmdPage} -\item ``Programs for Axiom Images''\\ -(ugAppGraphicsPage) \ref{ugAppGraphicsPage} on -page~\pageref{ugAppGraphicsPage} -\item ``Glossary''\\ -(GlossaryPage) \ref{GlossaryPage} on -page~\pageref{GlossaryPage} -\end{itemize} -\index{pages!UsersGuidePage!ug.ht} -\index{ug.ht!pages!UsersGuidePage} -\index{UsersGuidePage!ug.ht!pages} +\pagehead{UsersGuidePage}{page.ht}{Users Guide} +\pagepic{ps/v71usersguidepage.eps}{usersguidepage} +\pagefrom{Reference}{TopReferencePage} +\pageto{What's New in Axiom Version May 2008}{ugWhatsNewTwoTwoPage} +\pageto{An Overview of Axiom}{ugIntroPage} +\pageto{Using Types and Modes}{ugTypesPage} +\pageto{Using HyperDoc}{ugHyperPage} +\pageto{Input Files and Output Styles}{ugInOutPage} +\pageto{Introduction to the Axiom Interactive Language}{ugLangPage} +\pageto{User-Defined Functions, ...}{ugUserPage} +\pageto{Graphics}{ugGraphPage} +\pageto{Advanced Problem Solving}{ugProblemPage} +\pageto{Some Examples for Domains and Packages}{ExamplesExposedPage} +\pageto{Interactive Programming}{ugIntProgPage} +\pageto{Packages}{ugPackagesPage} +\pageto{Categories}{ugCategoriesPage} +\pageto{Domains}{ugDomainsPage} +\pageto{Browse}{ugBrowsePage} +\pageto{What's New in Axiom Version 2.0}{ugWhatsNewPage} +\pageto{Axiom System Commands}{ugSysCmdPage} +\pageto{Programs for Axiom Images}{ugAppGraphicsPage} +\pageto{Glossary}{GlossaryPage} <>= \begin{page}{UsersGuidePage}{Users Guide} This is the table of contents for the Users Guide. @@ -23865,7 +21754,8 @@ Click on any item below to see that section. \beginscroll \indent{3} \beginmenu -\menudownlink{{0. What's New in Axiom Version May 2008}}{ugWhatsNewTwoTwoPage} +\menudownlink{{0. What's New in Axiom Version May 2008}} +{ugWhatsNewTwoTwoPage} \endmenu \indent{0} Part I. Basic Features of Axiom @@ -23873,9 +21763,10 @@ Part I. Basic Features of Axiom \beginmenu \menudownlink{{1. An Overview of Axiom}}{ugIntroPage} \menudownlink{{2. Using Types and Modes}}{ugTypesPage} -\menudownlink{{3. Using \HyperName{}}}{ugHyperPage} +\menudownlink{{3. Using Hyperdoc}}{ugHyperPage} \menudownlink{{4. Input Files and Output Styles}}{ugInOutPage} -\menudownlink{{5. Introduction to the Axiom Interactive Language}}{ugLangPage} +\menudownlink{{5. Introduction to the Axiom Interactive Language}} +{ugLangPage} \menudownlink{{6. User-Defined Functions, Macros and Rules}}{ugUserPage} \menudownlink{{7. Graphics}}{ugGraphPage} \endmenu @@ -23884,7 +21775,8 @@ Part II. Advanced Problem Solving and Examples \indent{3} \beginmenu \menudownlink{{8. Advanced Problem Solving}}{ugProblemPage} -\menudownlink{{9. Some Examples for Domains and Packages}}{ExamplesExposedPage} +\menudownlink{{9. Some Examples for Domains and Packages}} +{ExamplesExposedPage} \endmenu \indent{0} Part III. Advanced Programming in Axiom @@ -23912,43 +21804,22 @@ Appendices. @ \chapter{Users Guide Chapter 0 (ug00.ht)} -<>= -\newcommand{\ugWhatsNewTwoTwoTitle}{What's New in Axiom Version 2.2} -\newcommand{\ugWhatsNewTwoTwoNumber}{0.} - -@ -\section{What's New in Axiom Version May 2008} -\label{ugWhatsNewTwoTwoPage} +\pagehead{ugWhatsNewTwoTwoPage}{ug00.ht} +{What's New for May 2008} No image here because the page changes every release. - -Called from ``Reference'' (TopReferencePage) -\ref{TopReferencePage} on page~\pageref{TopReferencePage} -\begin{itemize} -\item ``Aldor compiler - Enhancements and Additions''\\ -(ugTwoTwoAldorPage) \ref{ugTwoTwoAldorPage} on -page~\pageref{ugTwoTwoAldorPage} -\item ``New polynomial domains and algorithms''\\ -(ugTwoTwoPolynomialsPage) \ref{ugTwoTwoPolynomialsPage} on -page~\pageref{ugTwoTwoPolynomialsPage} -\item ``Enhancements to HyperDoc and Graphics''\\ -(ugTwoTwoHyperdocPage) \ref{ugTwoTwoHyperdocPage} on -page~\pageref{ugTwoTwoHyperdocPage} -\item ``Enhancements to NAGLink''\\ -(ugTwoTwoNAGLinkPage) \ref{ugTwoTwoNAGLinkPage} on -page~\pageref{ugTwoTwoNAGLinkPage} -\item ``Enhancements to the Lisp system''\\ -(ugTwoTwoCCLPage) \ref{ugTwoTwoCCLPage} on -page~\pageref{ugTwoTwoCCLPage} -\end{itemize} -\index{pages!ugWhatsNewTwoTwoPage!ug00.ht} -\index{ug00.ht!pages!ugWhatsNewTwoTwoPage} -\index{ugWhatsNewTwoTwoPage!ug00.ht!pages} +\pagefrom{Reference}{TopReferencePage} +\pageto{Aldor compiler - Enhancements and Additions}{ugTwoTwoAldorPage} +\pageto{New polynomial domains and algorithms}{ugTwoTwoPolynomialsPage} +\pageto{Enhancements to Hyperdoc...}{ugTwoTwoHyperdocPage} +\pageto{Enhancements to NAGLink}{ugTwoTwoNAGLinkPage} +\pageto{Enhancements to the Lisp system}{ugTwoTwoCCLPage} <>= -\begin{page}{ugWhatsNewTwoTwoPage}{0. What's New in Axiom Version May 2008} +\begin{page}{ugWhatsNewTwoTwoPage} +{0. What's New for May 2008} \beginscroll \beginmenu - \menudownlink{{0.1. \axiomxl{} compiler - Enhancements and Additions}} + \menudownlink{{0.1. Aldor compiler - Enhancements and Additions}} {ugTwoTwoAldorPage} \menudownlink{{0.2. New polynomial domains and algorithms}} {ugTwoTwoPolynomialsPage} @@ -23962,23 +21833,15 @@ page~\pageref{ugTwoTwoCCLPage} \end{page} @ +\pagehead{ugTwoTwoAldorPage}{ug00.ht} +{Aldor compiler - Enhancements and Additions} <>= -\newcommand{\ugTwoTwoAldorTitle}{\axiomxl{} compiler - Enhancements and Additions} -\newcommand{\ugTwoTwoAldorNumber}{0.1.} - -@ -\section{Aldor compiler - Enhancements and Additions} -\label{ugTwoTwoAldorPage} -\index{pages!ugTwoTwoAldorPage!ug00.ht} -\index{ug00.ht!pages!ugTwoTwoAldorPage} -\index{ugTwoTwoAldorPage!ug00.ht!pages} -<>= -\begin{page}{ugTwoTwoAldorPage}{0.1. \axiomxl{} compiler - Enhancements and Additions} +\begin{page}{ugTwoTwoAldorPage}{0.1. Aldor compiler - Enhancements and Additions} \beginscroll -Numerous bug fixes and improvements have been implemented in version 1.1.12 -of \axiomxl{} which is included in this release. You may also notice the name -{\it Aldor} being used when referring to \axiomxl{}. +Numerous bug fixes and improvements have been implemented in version +1.1.12 of Aldor which is included in this release. You may also +notice the name {\it Aldor} being used when referring to The format of {\bf .ao} files has changed somewhat so you need to recompile your {\bf .as} source files. @@ -24013,13 +21876,14 @@ and linker will respect the IEEE standard by enabling the appropriate options through {\bf unicl}. See BasicIeeeControlPackage (26.7) in the on-line guide. -Special runtime libraries ({\bf libfoam-gmp.a}) have been prepared to enable -a drop-in replacement of Aldor's big-integer arithmetic with the GNU gmp -big-integer library. The executable script {\bf axiomxl.gmp} (in the same place -as {\bf axiomxl}) expects the {\bf GmpDir} environment variable to be set -to the directory where a compiled GNU gmp library resides ({\bf libgmp.a}) and -arranges for the appropriate libraries to be linked in when generating -a stand-alone executable. +Special runtime libraries ({\bf libfoam-gmp.a}) have been prepared to +enable a drop-in replacement of Aldor's big-integer arithmetic with +the GNU gmp big-integer library. The executable script +{\bf axiomxl.gmp} (in the same place as {\bf axiomxl}) expects the +{\bf GmpDir} environment variable to be set to the directory where a +compiled GNU gmp library resides ({\bf libgmp.a}) and arranges for the +appropriate libraries to be linked in when generating a stand-alone +executable. The language-defined type TrailingArray has been introduced. See TrailingArray (13.7) in the on-line guide. @@ -24034,81 +21898,70 @@ guide. \end{page} @ +\pagehead{ugTwoTwoPolynomialsPage}{ug00.ht} +{New polynomial domains and algorithms} <>= -\newcommand{\ugTwoTwoPolynomialsTitle}{New polynomial domains and algorithms} -\newcommand{\ugTwoTwoPolynomialsNumber}{0.2.} - -@ -\section{New polynomial domains and algorithms} -\label{ugTwoTwoPolynomialsPage} -\index{pages!ugTwoTwoPolynomialsPage!ug00.ht} -\index{ug00.ht!pages!ugTwoTwoPolynomialsPage} -\index{ugTwoTwoPolynomialsPage!ug00.ht!pages} -<>= -\begin{page}{ugTwoTwoPolynomialsPage}{0.2. New polynomial domains and algorithms} +\begin{page}{ugTwoTwoPolynomialsPage} +{0.2. New polynomial domains and algorithms} \beginscroll -Univariate polynomial factorisation over the integers has been -enhanced by updates to the \spadtype{GaloisGroupFactorizer} type -and friends from Frederic Lehobey (Frederic.Lehobey@lifl.fr, University of +Univariate polynomial factorisation over the integers has been +enhanced by updates to the \spadtype{GaloisGroupFactorizer} type and +friends from Frederic Lehobey (Frederic.Lehobey@lifl.fr, University of Lille I, France). -The package constructor \spadtype{PseudoRemainderSequence} -provides efficient algorithms by Lionel Ducos -(Lionel.Ducos@mathlabo.univ-poitiers.fr, University of Poitiers, France) -for computing sub-resultants. -This leads to a speed up in many places in Axiom where -sub-resultants are computed (polynomial system solving, -algebraic factorization, integration). - -Based on this package, the domain constructor -\spadtype{NewSparseUnivariatePolynomial} -extends the constructor \spadtype{SparseUnivariatePolynomial}. -In a similar way, the \spadtype{NewSparseMultivariatePolynomial} extends -the constructor \spadtype{SparseUnivariatePolynomial}; -it also provides some additional operations related -to polynomial system solving by means of triangular sets. - -Several domain constructors implement -regular triangular sets (or regular chains). -Among them \spadtype{RegularTriangularSet} -and \spadtype{SquareFreeRegularTriangularSet}. -They also implement an algorithm by Marc Moreno Maza (marc@nag.co.uk, NAG) -for computing triangular decompositions of polynomial systems. -This method is refined in the package \spadtype{LazardSetSolvingPackage} -in order to produce decompositions by means of Lazard triangular sets. -For the case of polynomial systems with finitely many solutions, -these decompositions can also be computed by -the package \spadtype{LexTriangularPackage}. +The package constructor \spadtype{PseudoRemainderSequence} provides +efficient algorithms by Lionel Ducos +(Lionel.Ducos@mathlabo.univ-poitiers.fr, University of Poitiers, +France) for computing sub-resultants. This leads to a speed up in +many places in Axiom where sub-resultants are computed (polynomial +system solving, algebraic factorization, integration). + +Based on this package, the domain constructor +\spadtype{NewSparseUnivariatePolynomial} extends the constructor +\spadtype{SparseUnivariatePolynomial}. In a similar way, the +\spadtype{NewSparseMultivariatePolynomial} extends the constructor +\spadtype{SparseUnivariatePolynomial}; it also provides some +additional operations related to polynomial system solving by means of +triangular sets. + +Several domain constructors implement regular triangular sets (or +regular chains). Among them \spadtype{RegularTriangularSet} and +\spadtype{SquareFreeRegularTriangularSet}. They also implement an +algorithm by Marc Moreno Maza (marc@nag.co.uk, NAG) for computing +triangular decompositions of polynomial systems. This method is +refined in the package \spadtype{LazardSetSolvingPackage} in order to +produce decompositions by means of Lazard triangular sets. For the +case of polynomial systems with finitely many solutions, these +decompositions can also be computed by the package +\spadtype{LexTriangularPackage}. The domain constructor \spadtype{RealClosure} by Renaud Rioboo -(Renaud.Rioboo@lip6.fr, University of Paris 6, France) -provides the real closure of an ordered field. -The implementation is based on interval arithmetic. -Moreover, the design of this constructor and its related -packages allows an easy use of other codings for real algebraic numbers. - -Based on triangular decompositions and the \spadtype{RealClosure} constructor, -the package \spadtype{ZeroDimensionalSolvePackage} -provides operations for computing symbolically the real or complex roots -of polynomial systems with finitely many solutions. - -Polynomial arithmetic with non-commutative variables -has been improved too by a contribution of Michel Petitot -(Michel.Petitot@lifl.fr, University of Lille I, France). -The domain constructors \spadtype{XRecursivePolynomial} -and \spadtype{XDistributedPolynomial} provide -recursive and distributed representations for these polynomials. -They are the non-commutative equivalents for -the \spadtype{SparseMultivariatePolynomial} -and \spadtype{DistributedMultivariatePolynomial} constructors. -The constructor \spadtype{LiePolynomial} implement Lie -polynomials in the Lyndon basis. -The constructor \spadtype{XPBWPolynomial} manage polynomials -with non-commutative variables in -the \texht{Poincar\'e}{Poincare\space{-1}'}-Birkhoff-Witt basis from the Lyndon basis. -This allows to compute in the Lie Group associated with a -free nilpotent Lie algebra by using the \spadtype{LieExponentials} +(Renaud.Rioboo@lip6.fr, University of Paris 6, France) provides the +real closure of an ordered field. The implementation is based on +interval arithmetic. Moreover, the design of this constructor and its +related packages allows an easy use of other codings for real +algebraic numbers. + +Based on triangular decompositions and the \spadtype{RealClosure} +constructor, the package \spadtype{ZeroDimensionalSolvePackage} +provides operations for computing symbolically the real or complex +roots of polynomial systems with finitely many solutions. + +Polynomial arithmetic with non-commutative variables has been improved +too by a contribution of Michel Petitot (Michel.Petitot@lifl.fr, +University of Lille I, France). The domain constructors +\spadtype{XRecursivePolynomial} and \spadtype{XDistributedPolynomial} +provide recursive and distributed representations for these +polynomials. They are the non-commutative equivalents for the +\spadtype{SparseMultivariatePolynomial} and +\spadtype{DistributedMultivariatePoly} constructors. The +constructor \spadtype{LiePolynomial} implement Lie polynomials in the +Lyndon basis. The constructor \spadtype{XPBWPolynomial} manage +polynomials with non-commutative variables in the +\texht{Poincar\'e}{Poincare\space{-1}'}-Birkhoff-Witt basis from the +Lyndon basis. This allows to compute in the Lie Group associated with +a free nilpotent Lie algebra by using the \spadtype{LieExponentials} domain constructor. \endscroll @@ -24116,63 +21969,40 @@ domain constructor. \end{page} @ +\pagehead{ugTwoTwoHyperdocPage}{ug00.ht} +{Enhancements to HyperDoc and Graphics} <>= -\newcommand{\ugTwoTwoHyperdocTitle}{Enhancements to HyperDoc and Graphics} -\newcommand{\ugTwoTwoHyperdocNumber}{0.3.} - -@ -\section{Enhancements to HyperDoc and Graphics} -\label{ugTwoTwoHyperdocPage} -\index{pages!ugTwoTwoHyperdocPage!ug00.ht} -\index{ug00.ht!pages!ugTwoTwoHyperdocPage} -\index{ugTwoTwoHyperdocPage!ug00.ht!pages} -<>= -\begin{page}{ugTwoTwoHyperdocPage}{0.3. Enhancements to HyperDoc and Graphics} +\begin{page}{ugTwoTwoHyperdocPage} +{0.3. Enhancements to HyperDoc and Graphics} \beginscroll -From this version of Axiom onwards, the pixmap format used to save graphics -images in color and to display them in HyperDoc has been changed to the -industry-standard XPM format. See {\tt ftp://koala.inria.fr/pub/xpm}. +From this version of Axiom onwards, the pixmap format used to save +graphics images in color and to display them in HyperDoc has been +changed to the industry-standard XPM format. See +{\tt http://koala.ilog.fr/ftp/pub/xpm}. \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugTwoTwoNAGLinkTitle}{Enhancements to NAGLink} -\newcommand{\ugTwoTwoNAGLinkNumber}{0.4.} - -@ -\section{Enhancements to NAGLink} -\label{ugTwoTwoNAGLinkPage} -\index{pages!ugTwoTwoNAGLinkPage!ug00.ht} -\index{ug00.ht!pages!ugTwoTwoNAGLinkPage} -\index{ugTwoTwoNAGLinkPage!ug00.ht!pages} +\pagehead{ugTwoTwoNAGLinkPage}{ug00.ht}{Enhancements to NAGLink} <>= \begin{page}{ugTwoTwoNAGLinkPage}{0.4. Enhancements to NAGLink} \beginscroll -This version of Axiom incorporates the Axiom/NAG Numerical Analyst (ANNA) -software developed in the University of Bath. ANNA is an expert system which -uses Axiom algebra functionality in choosing the most appropriate NAG Fortran Library -routine for a particular problem. Documentation is provided on-line on the main HyperDoc page. +This version of Axiom incorporates the Axiom/NAG Numerical Analyst +(ANNA) software developed in the University of Bath. ANNA is an expert +system which uses Axiom algebra functionality in choosing the most +appropriate NAG Fortran Library routine for a particular +problem. Documentation is provided on-line on the main HyperDoc page. \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugTwoTwoCCLTitle}{Enhancements to the Lisp system} -\newcommand{\ugTwoTwoCCLNumber}{0.5.} - -@ -\section{Enhancements to the Lisp system} -\label{ugTwoTwoCCLPage} -\index{pages!ugTwoTwoCCLPage!ug00.ht} -\index{ug00.ht!pages!ugTwoTwoCCLPage} -\index{ugTwoTwoCCLPage!ug00.ht!pages} +\pagehead{ugTwoTwoCCLPage}{ug00.ht}{Enhancements to the Lisp system} <>= \begin{page}{ugTwoTwoCCLPage}{0.5. Enhancements to the Lisp system} \beginscroll @@ -24425,70 +22255,37 @@ of exported functions, an encoded signature and numerical index. @ \chapter{Users Guide Chapter 1 (ug01.ht)} -<>= -\newcommand{\ugIntroTitle}{An Overview of Axiom} -\newcommand{\ugIntroNumber}{1.} - -@ -\section{An Overview of Axiom} -\label{ugIntroPage} -\begin{itemize} -\item ugIntroTypoPage \ref{ugIntroTypoPage} on -page~\pageref{ugIntroTypoPage} -\item ugIntroStartPage \ref{ugIntroStartPage} on -page~\pageref{ugIntroStartPage} -\item ugIntroTypoPage \ref{ugIntroTypoPage} on -page~\pageref{ugIntroTypoPage} -\item ugIntroExpressionsPage \ref{ugIntroExpressionsPage} on -page~\pageref{ugIntroExpressionsPage} -\item ugIntroGraphicsPage \ref{ugIntroGraphicsPage} on -page~\pageref{ugIntroGraphicsPage} -\item ugIntroNumbersPage \ref{ugIntroNumbersPage} on -page~\pageref{ugIntroNumbersPage} -\item ugIntroCollectPage \ref{ugIntroCollectPage} on -page~\pageref{ugIntroCollectPage} -\item ugIntroTwoDimPage \ref{ugIntroTwoDimPage} on -page~\pageref{ugIntroTwoDimPage} -\item ugIntroYouPage \ref{ugIntroYouPage} on -page~\pageref{ugIntroYouPage} -\item ugIntroVariablesPage \ref{ugIntroVariablesPage} on -page~\pageref{ugIntroVariablesPage} -\item ugIntroCalcLimitsPage \ref{ugIntroCalcLimitsPage} on -page~\pageref{ugIntroCalcLimitsPage} -\item ugIntroSeriesPage \ref{ugIntroSeriesPage} on -page~\pageref{ugIntroSeriesPage} -\item ugIntroCalcDerivPage \ref{ugIntroCalcDerivPage} on -page~\pageref{ugIntroCalcDerivPage} -\item ugIntroIntegratePage \ref{ugIntroIntegratePage} on -page~\pageref{ugIntroIntegratePage} -\item ugIntroDiffEqnsPage \ref{ugIntroDiffEqnsPage} on -page~\pageref{ugIntroDiffEqnsPage} -\item ugIntroSolutionPage \ref{ugIntroSolutionPage} on -page~\pageref{ugIntroSolutionPage} -\item ugIntroSysCmmandsPage \ref{ugIntroSysCmmandsPage} on -page~\pageref{ugIntroSysCmmandsPage} -\end{itemize} -\index{pages!ugIntroPage!ug01.ht} -\index{ug01.ht!pages!ugIntroPage} -\index{ugIntroPage!ug01.ht!pages} +\pagehead{ugIntroPage}{ug01.ht}{An Overview of Axiom} +\pageto{notitle}{ugIntroTypoPage} +\pageto{notitle}{ugIntroStartPage} +\pageto{notitle}{ugIntroTypoPage} +\pageto{notitle}{ugIntroExpressionsPage} +\pageto{notitle}{ugIntroGraphicsPage} +\pageto{notitle}{ugIntroNumbersPage} +\pageto{notitle}{ugIntroCollectPage} +\pageto{notitle}{ugIntroTwoDimPage} +\pageto{notitle}{ugIntroYouPage} +\pageto{notitle}{ugIntroVariablesPage} +\pageto{notitle}{ugIntroCalcLimitsPage} +\pageto{notitle}{ugIntroSeriesPage} +\pageto{notitle}{ugIntroCalcDerivPage} +\pageto{notitle}{ugIntroIntegratePage} +\pageto{notitle}{ugIntroDiffEqnsPage} +\pageto{notitle}{ugIntroSolutionPage} +\pageto{notitle}{ugIntroSysCmmandsPage} <>= \begin{page}{ugIntroPage}{1. An Overview of Axiom} \beginscroll -Welcome to the Axiom environment for interactive computation -and problem solving. -Consider this chapter a brief, whirlwind tour of the Axiom -world. -We introduce you to Axiom's graphics and the Axiom -language. -Then we give a sampling of the large variety of facilities -in the Axiom system, ranging from the various kinds of -numbers, to data types (like lists, arrays, and sets) and -mathematical objects (like matrices, integrals, and differential -equations). -We conclude with the discussion of system commands and an -interactive ``undo.'' +Welcome to the Axiom environment for interactive computation and +problem solving. Consider this chapter a brief, whirlwind tour of the +Axiom world. We introduce you to Axiom's graphics and the Axiom +language. Then we give a sampling of the large variety of facilities +in the Axiom system, ranging from the various kinds of numbers, to +data types (like lists, arrays, and sets) and mathematical objects +(like matrices, integrals, and differential equations). We conclude +with the discussion of system commands and an interactive ``undo.'' Before embarking on the tour, we need to brief those readers working interactively with Axiom on some details. @@ -24519,66 +22316,45 @@ Section \ugIntroTypoNumber\ignore{ugIntroTypo}. \end{page} @ -<>= -\newcommand{\ugIntroStartTitle}{Starting Up and Winding Down} -\newcommand{\ugIntroStartNumber}{1.1.} - -@ -\section{Starting Up and Winding Down} -\label{ugIntroStartPage} -\begin{itemize} -\item ugHyperPage \ref{ugHyperPage} on -page~\pageref{ugHyperPage} -\item ugSysCmdPage \ref{ugSysCmdPage} on -page~\pageref{ugSysCmdPage} -\item ugAvailCLEFPage \ref{ugAvailCLEFPage} on -page~\pageref{ugAvailCLEFPage} -\end{itemize} -\index{pages!ugIntroStartPage!ug01.ht} -\index{ug01.ht!pages!ugIntroStartPage} -\index{ugIntroStartPage!ug01.ht!pages} +\pagehead{ugIntroStartPage}{ug01.ht}{Starting Up and Winding Down} +\pageto{notitle}{ugHyperPage} +\pageto{notitle}{ugSysCmdPage} +\pageto{notitle}{ugAvailCLEFPage} <>= \begin{page}{ugIntroStartPage}{1.1. Starting Up and Winding Down} \beginscroll -You need to know how to start the Axiom system and how to stop it. -We assume that Axiom has been correctly installed on your -machine (as described in another Axiom document). +You need to know how to start the Axiom system and how to stop it. +We assume that Axiom has been correctly installed on your machine (as +described in another Axiom document). -To begin using Axiom, issue the command {\bf axiom} to the -operating system shell. -There is a brief pause, some start-up messages, and then one -or more windows appear. +To begin using Axiom, issue the command {\bf axiom} to the operating +system shell. There is a brief pause, some start-up messages, and +then one or more windows appear. -If you are not running Axiom under the X Window System, there is -only one window (the console). -At the lower left of the screen there is a prompt that -looks like +If you are not running Axiom under the X Window System, there is only +one window (the console). At the lower left of the screen there is a +prompt that looks like \begin{verbatim} (1) -> \end{verbatim} -%%--> do you want to talk about equation numbers on the right, etc. + When you want to enter input to Axiom, you do so on the same line -after the prompt. -The ``1'' in ``(1)'' is the computation step number and is incremented -after you enter Axiom statements. -Note, however, that a system command -such as \spadsys{)clear all} -may change the step number in other ways. -We talk about step numbers more when we discuss system commands -and the workspace history facility. +after the prompt. The ``1'' in ``(1)'' is the computation step number +and is incremented after you enter Axiom statements. Note, however, +that a system command such as \spadsys{)clear all} may change the step +number in other ways. We talk about step numbers more when we discuss +system commands and the workspace history facility. If you are running Axiom under the X Window System, there may be two -windows: the console window (as just described) and the \HyperName{} -main menu. -\HyperName{} is a multiple-window hypertext system that lets you -view Axiom documentation and examples on-line, -execute Axiom expressions, and generate graphics. -If you are in a graphical windowing environment, -it is usually started automatically when Axiom begins. -If it is not running, issue \spadsys{)hd} to start it. -We discuss the basics of \HyperName{} in -\downlink{``\ugHyperTitle''}{ugHyperPage} in Chapter +windows: the console window (as just described) and the Hyperdoc main +menu. Hyperdoc is a multiple-window hypertext system that lets you +view Axiom documentation and examples on-line, execute Axiom +expressions, and generate graphics. If you are in a graphical +windowing environment, it is usually started automatically when Axiom +begins. If it is not running, issue \spadsys{)hd} to start it. We +discuss the basics of Hyperdoc in +\downlink{``\ugHyperTitle''}{ugHyperPage} in Chapter \ugHyperNumber\ignore{ugHyper}. To interrupt an Axiom computation, hold down the @@ -24587,29 +22363,28 @@ To interrupt an Axiom computation, hold down the This brings you back to the Axiom prompt. \beginImportant -To exit from Axiom, move to the console window, -type \spadsys{)quit} -at the input prompt and press the \texht{\fbox{\bf Enter}}{{\bf Enter}} key. -You will probably be prompted with the following message: -\centerline{{Please enter {\bf y} or {\bf yes} if you really want to leave the }} -\centerline{{interactive environment and return to the operating system}} -You should respond {\bf yes}, for example, to exit Axiom. + +To exit from Axiom, move to the console window, type \spadsys{)quit} +at the input prompt and press the \texht{\fbox{\bf Enter}} +{{\bf Enter}} key. You will probably be prompted with the following +message: \centerline{{Please enter {\bf y} or {\bf yes} if you really +want to leave the }} \centerline{{interactive environment and return +to the operating system}} You should respond {\bf yes}, for example, +to exit Axiom. \endImportant -We are purposely vague in describing exactly what your screen -looks like or what messages Axiom displays. -Axiom runs on a number of different machines, operating -systems and window environments, and these differences all affect -the physical look of the system. -You can also change the way that Axiom behaves via -\spadgloss{system commands} described later in this chapter and in -\downlink{``\ugSysCmdTitle''}{ugSysCmdPage} -in Appendix \ugSysCmdNumber\ignore{ugSysCmd}. -System commands are special commands, like \spadcmd{)set}, that begin -with a closing parenthesis and are used to change your -environment. -For example, you can set a system variable so that you are not -prompted for confirmation when you want to leave Axiom. +We are purposely vague in describing exactly what your screen looks +like or what messages Axiom displays. Axiom runs on a number of +different machines, operating systems and window environments, and +these differences all affect the physical look of the system. You can +also change the way that Axiom behaves via \spadgloss{system commands} +described later in this chapter and in +\downlink{``\ugSysCmdTitle''}{ugSysCmdPage} in Appendix +\ugSysCmdNumber\ignore{ugSysCmd}. System commands are special +commands, like \spadcmd{)set}, that begin with a closing parenthesis +and are used to change your environment. For example, you can set a +system variable so that you are not prompted for confirmation when you +want to leave Axiom. \beginmenu \menudownlink{{1.1.1. \Clef{}}}{ugAvailCLEFPage} @@ -24619,54 +22394,36 @@ prompted for confirmation when you want to leave Axiom. \end{page} @ -<>= -\newcommand{\ugAvailCLEFTitle}{\Clef{}} -\newcommand{\ugAvailCLEFNumber}{1.1.1.} - -@ -\section{Clef} -\label{ugAvailCLEFPage} -\index{pages!ugAvailCLEFPage!ug01.ht} -\index{ug01.ht!pages!ugAvailCLEFPage} -\index{ugAvailCLEFPage!ug01.ht!pages} +\pagehead{ugAvailCLEFPage}{ug01.ht}{Clef} <>= \begin{page}{ugAvailCLEFPage}{1.1.1. \Clef{}} \beginscroll % -If you are using Axiom under the X Window System, the -\Clef{} command line editor is probably available and installed. -With this editor you can recall previous lines with the up and -down arrow keys\texht{ (\fbox{$\uparrow$} and -\fbox{$\downarrow$})}{}. -To move forward and backward on a line, use the right and -left arrows\texht{ (\fbox{$\rightarrow$} and -\fbox{$\leftarrow$})}{}. -You can use the -\texht{\fbox{\bf Insert}}{{\bf Insert}} -key to toggle insert mode on or off. -When you are in insert mode, -the cursor appears as a large block and if you type -anything, the characters are inserted into the line without -deleting the previous ones. -If you press the -\texht{\fbox{\bf Home}}{{\bf Home}} -key, the cursor moves to the beginning of the line and if you press the -\texht{\fbox{\bf End}}{{\bf End}} -key, the cursor moves to the end of the line. -Pressing -\texht{\fbox{\bf Ctrl}--\fbox{\bf End}}{{\bf Ctrl-End}} +If you are using Axiom under the X Window System, the \Clef{} command +line editor is probably available and installed. With this editor you +can recall previous lines with the up and down arrow keys\texht{ +(\fbox{$\uparrow$} and \fbox{$\downarrow$})}{}. To move forward and +backward on a line, use the right and left arrows +\texht{(\fbox{$\rightarrow$} and \fbox{$\leftarrow$})}{}. You can use the +\texht{\fbox{\bf Insert}}{{\bf Insert}} key to toggle insert mode on +or off. When you are in insert mode, the cursor appears as a large +block and if you type anything, the characters are inserted into the +line without deleting the previous ones. + +If you press the \texht{\fbox{\bf Home}}{{\bf Home}} key, the cursor +moves to the beginning of the line and if you press the +\texht{\fbox{\bf End}}{{\bf End}} key, the cursor moves to the end of +the line. Pressing +\texht{\fbox{\bf Ctrl}--\fbox{\bf End}}{{\bf Ctrl-End}} deletes all the text from the cursor to the end of the line. -\Clef{} also provides Axiom operation name completion for -a limited set of operations. -If you enter a few letters and then press the -\texht{\fbox{\bf Tab}}{{\bf Tab}} key, -\Clef{} tries to use those letters as the prefix of an Axiom -operation name. -If a name appears and it is not what you want, press -\texht{\fbox{\bf Tab}}{{\bf Tab}} again -to see another name. +\Clef{} also provides Axiom operation name completion for a limited +set of operations. If you enter a few letters and then press the +\texht{\fbox{\bf Tab}}{{\bf Tab}} key, \Clef{} tries to use those +letters as the prefix of an Axiom operation name. If a name appears +and it is not what you want, press \texht{\fbox{\bf Tab}}{{\bf Tab}} +again to see another name. You are ready to begin your journey into the world of Axiom. Proceed to the first stop. @@ -24676,16 +22433,7 @@ Proceed to the first stop. \end{page} @ -<>= -\newcommand{\ugIntroTypoTitle}{Typographic Conventions} -\newcommand{\ugIntroTypoNumber}{1.2.} - -@ -\section{Typographic Conventions} -\label{ugIntroTypoPage} -\index{pages!ugIntroTypoPage!ug01.ht} -\index{ug01.ht!pages!ugIntroTypoPage} -\index{ugIntroTypoPage!ug01.ht!pages} +\pagehead{ugIntroTypoPage}{ug01.ht}{Typographic Conventions} <>= \begin{page}{ugIntroTypoPage}{1.2. Typographic Conventions} \beginscroll @@ -24696,9 +22444,11 @@ In this book we have followed these typographical conventions: % \item[-] Categories, domains and packages are displayed in \texht{a sans-serif typeface:}{this font:} -\axiomType{Ring}, \axiomType{Integer}, \axiomType{DiophantineSolutionPackage}. +\axiomType{Ring}, \axiomType{Integer}, +\axiomType{DiophantineSolutionPackage}. % -\item[-] Prefix operators, infix operators, and punctuation symbols in the Axiom +\item[-] Prefix operators, infix operators, and +punctuation symbols in the Axiom language are displayed in the text like this: \axiomOp{+}, \axiomSyntax{\$}, \axiomSyntax{+->}. % @@ -24709,7 +22459,7 @@ language are displayed in the text like this: \item[-] For clarity of presentation, \TeX{} is often used to format expressions\texht{: $g(x)=x^2+1.$}{.} % -\item[-] Function names and \HyperName{} button names +\item[-] Function names and Hyperdoc button names are displayed in the text in \texht{a bold typeface:}{this font:} \axiomFun{factor}, \axiomFun{integrate}, {\bf Lighting}. @@ -24732,56 +22482,36 @@ appear. \end{page} @ -<>= -\newcommand{\ugIntroExpressionsTitle}{The Axiom Language} -\newcommand{\ugIntroExpressionsNumber}{1.3.} - -@ -\section{The Axiom Language} -\label{ugIntroExpressionsPage} -\begin{itemize} -\item ugIntroArithmeticPage \ref{ugIntroArithmeticPage} on -page~\pageref{ugIntroArithmeticPage} -\item ugIntroPreviousPage \ref{ugIntroPreviousPage} on -page~\pageref{ugIntroPreviousPage} -\item ugIntroTypesPage \ref{ugIntroTypesPage} on -page~\pageref{ugIntroTypesPage} -\item ugIntroAssignPage \ref{ugIntroAssignPage} on -page~\pageref{ugIntroAssignPage} -\item ugIntroConversionPage \ref{ugIntroConversionPage} on -page~\pageref{ugIntroConversionPage} -\item ugIntroCallFunPage \ref{ugIntroCallFunPage} on -page~\pageref{ugIntroCallFunPage} -\item ugIntroMacrosPage \ref{ugIntroMacrosPage} on -page~\pageref{ugIntroMacrosPage} -\item ugIntroLongPage \ref{ugIntroLongPage} on -page~\pageref{ugIntroLongPage} -\item ugIntroCommentsPage \ref{ugIntroCommentsPage} on -page~\pageref{ugIntroCommentsPage} -\end{itemize} -\index{pages!ugIntroExpressionsPage!ug01.ht} -\index{ug01.ht!pages!ugIntroExpressionsPage} -\index{ugIntroExpressionsPage!ug01.ht!pages} +\pagehead{ugIntroExpressionsPage}{ug01.ht}{The Axiom Language} +\pageto{notitle}{ugIntroArithmeticPage} +\pageto{notitle}{ugIntroPreviousPage} +\pageto{notitle}{ugIntroTypesPage} +\pageto{notitle}{ugIntroAssignPage} +\pageto{notitle}{ugIntroConversionPage} +\pageto{notitle}{ugIntroCallFunPage} +\pageto{notitle}{ugIntroMacrosPage} +\pageto{notitle}{ugIntroLongPage} +\pageto{notitle}{ugIntroCommentsPage} <>= \begin{page}{ugIntroExpressionsPage}{1.3. The Axiom Language} \beginscroll % -The Axiom language is a rich language for performing -interactive computations and for building components of the -Axiom library. -Here we present only some basic aspects of the language that you -need to know for the rest of this chapter. -Our discussion here is intentionally informal, with details -unveiled on an ``as needed'' basis. -For more information on a particular construct, we suggest you +The Axiom language is a rich language for performing interactive +computations and for building components of the Axiom library. Here +we present only some basic aspects of the language that you need to +know for the rest of this chapter. Our discussion here is +intentionally informal, with details unveiled on an ``as needed'' +basis. For more information on a particular construct, we suggest you consult the index at the back of the book. \beginmenu \menudownlink{{1.3.1. Arithmetic Expressions}}{ugIntroArithmeticPage} \menudownlink{{1.3.2. Previous Results}}{ugIntroPreviousPage} \menudownlink{{1.3.3. Some Types}}{ugIntroTypesPage} - \menudownlink{{1.3.4. Symbols, Variables, Assignments, and Declarations}}{ugIntroAssignPage} + \menudownlink{ +{1.3.4. Symbols, Variables, Assignments, and Declarations}} +{ugIntroAssignPage} \menudownlink{{1.3.5. Conversion}}{ugIntroConversionPage} \menudownlink{{1.3.6. Calling Functions}}{ugIntroCallFunPage} \menudownlink{{1.3.7. Some Predefined Macros}}{ugIntroMacrosPage} @@ -24793,31 +22523,19 @@ consult the index at the back of the book. \end{page} @ -<>= -\newcommand{\ugIntroArithmeticTitle}{Arithmetic Expressions} -\newcommand{\ugIntroArithmeticNumber}{1.3.1.} - -@ -\section{Arithmetic Expressions} -\label{ugIntroArithmeticPage} -\index{pages!ugIntroArithmeticPage!ug01.ht} -\index{ug01.ht!pages!ugIntroArithmeticPage} -\index{ugIntroArithmeticPage!ug01.ht!pages} +\pagehead{ugIntroArithmeticPage}{ug01.ht}{Arithmetic Expressions} <>= \begin{page}{ugIntroArithmeticPage}{1.3.1. Arithmetic Expressions} \beginscroll For arithmetic expressions, use the \spadop{+} and \spadop{-} -\spadglossSee{operators}{operator} as in mathematics. -Use \spadop{*} for multiplication, and \spadop{**} for -exponentiation. -To create a fraction, use \spadop{/}. -When an expression contains several operators, those of highest -\spadgloss{precedence} are evaluated first. -For arithmetic operators, \spadop{**} has highest precedence, -\spadop{*} and \spadop{/} have the next highest -precedence, and \spadop{+} and \spadop{-} have the lowest -precedence. +\spadglossSee{operators}{operator} as in mathematics. Use \spadop{*} +for multiplication, and \spadop{**} for exponentiation. To create a +fraction, use \spadop{/}. When an expression contains several +operators, those of highest \spadgloss{precedence} are evaluated +first. For arithmetic operators, \spadop{**} has highest precedence, +\spadop{*} and \spadop{/} have the next highest precedence, and +\spadop{+} and \spadop{-} have the lowest precedence. \xtc{ Axiom puts implicit parentheses around operations of higher @@ -24843,16 +22561,7 @@ right, from inside out). \end{page} @ -<>= -\newcommand{\ugIntroPreviousTitle}{Previous Results} -\newcommand{\ugIntroPreviousNumber}{1.3.2.} - -@ -\section{Previous Results} -\label{ugIntroPreviousPage} -\index{pages!ugIntroPreviousPage!ug01.ht} -\index{ug01.ht!pages!ugIntroPreviousPage} -\index{ugIntroPreviousPage!ug01.ht!pages} +\pagehead{ugIntroPreviousPage}{ug01.ht}{Previous Results} <>= \begin{page}{ugIntroPreviousPage}{1.3.2. Previous Results} \beginscroll @@ -24892,20 +22601,8 @@ This is the result from step number 1. \end{page} @ -<>= -\newcommand{\ugIntroTypesTitle}{Some Types} -\newcommand{\ugIntroTypesNumber}{1.3.3.} - -@ -\section{Some Types} -\label{ugIntroTypesPage} -\begin{itemize} -\item ugTypesPage \ref{ugTypesPage} on -page~\pageref{ugTypesPage} -\end{itemize} -\index{pages!ugIntroTypesPage!ug01.ht} -\index{ug01.ht!pages!ugIntroTypesPage} -\index{ugIntroTypesPage!ug01.ht!pages} +\pagehead{ugIntroTypesPage}{ug01.ht}{Some Types} +\pageto{notitle}{ugTypesPage} <>= \begin{page}{ugIntroTypesPage}{1.3.3. Some Types} \beginscroll @@ -24947,20 +22644,9 @@ Here a negative integer exponent produces a fraction. \end{page} @ -<>= -\newcommand{\ugIntroAssignTitle}{Symbols, Variables, Assignments, and Declarations} -\newcommand{\ugIntroAssignNumber}{1.3.4.} - -@ -\section{Symbols, Variables, Assignments, and Declarations} -\label{ugIntroAssignPage} -\begin{itemize} -\item ugLangAssignPage \ref{ugLangAssignPage} on -page~\pageref{ugLangAssignPage} -\end{itemize} -\index{pages!ugIntroAssignPage!ug01.ht} -\index{ug01.ht!pages!ugIntroAssignPage} -\index{ugIntroAssignPage!ug01.ht!pages} +\pagehead{ugIntroAssignPage}{ug01.ht} +{Symbols, Variables, Assignments, and Declarations} +\pageto{notitle}{ugLangAssignPage} <>= \begin{page}{ugIntroAssignPage} {1.3.4. Symbols, Variables, Assignments, and Declarations} @@ -24976,25 +22662,22 @@ entering this polynomial. }{ \spadpaste{(x - y*z)**2} } -A symbol has a name beginning with an uppercase or lowercase alphabetic -character, \axiomSyntax{\%}, or \axiomSyntax{!}. + +A symbol has a name beginning with an uppercase or lowercase +alphabetic character, \axiomSyntax{\%}, or \axiomSyntax{!}. Successive characters (if any) can be any of the above, digits, or -\axiomSyntax{?}. -Case is distinguished: the symbol \axiom{points} is different -from the symbol \axiom{Points}. - -A symbol can also be used in Axiom as a \spadgloss{variable}. -A variable refers to a value. -To \spadglossSee{assign}{assignment} -a value to a variable, -the operator \axiomSyntax{:=} -is used.\footnote{Axiom actually has two forms of assignment: -{\it immediate} assignment, as discussed here, -and {\it delayed assignment}. See -\downlink{``\ugLangAssignTitle''}{ugLangAssignPage} -in Section \ugLangAssignNumber\ignore{ugLangAssign} for details.} -A variable initially has no restrictions on the kinds of -values to which it can refer. +\axiomSyntax{?}. Case is distinguished: the symbol \axiom{points} is +different from the symbol \axiom{Points}. + +A symbol can also be used in Axiom as a \spadgloss{variable}. A +variable refers to a value. To \spadglossSee{assign}{assignment} a +value to a variable, the operator \axiomSyntax{:=} is +used.\footnote{Axiom actually has two forms of assignment: {\it +immediate} assignment, as discussed here, and {\it delayed +assignment}. See \downlink{``\ugLangAssignTitle''}{ugLangAssignPage} +in Section \ugLangAssignNumber\ignore{ugLangAssign} for details.} A +variable initially has no restrictions on the kinds of values to which +it can refer. \xtc{ This assignment gives the value \axiom{4} (an integer) to @@ -25089,33 +22772,20 @@ We try to point out the location of such trouble spots. \end{page} @ -<>= -\newcommand{\ugIntroConversionTitle}{Conversion} -\newcommand{\ugIntroConversionNumber}{1.3.5.} - -@ -\section{Conversion} -\label{ugIntroConversionPage} -\begin{itemize} -\item ugTypesConvertPage \ref{ugTypesConvertPage} on -page~\pageref{ugTypesConvertPage} -\end{itemize} -\index{pages!ugIntroConversionPage!ug01.ht} -\index{ug01.ht!pages!ugIntroConversionPage} -\index{ugIntroConversionPage!ug01.ht!pages} +\pagehead{ugIntroConversionPage}{ug01.ht}{Conversion} +\pageto{notitle}{ugTypesConvertPage} <>= \begin{page}{ugIntroConversionPage}{1.3.5. Conversion} \beginscroll Objects of one type can usually be ``converted'' to objects of several -other types. -To \spadglossSee{convert}{conversion} -an object to a new type, use the \axiomSyntax{::} infix -operator.\footnote{Conversion is discussed in detail in -\downlink{``\ugTypesConvertTitle''}{ugTypesConvertPage} -in Section \ugTypesConvertNumber\ignore{ugTypesConvert}.} -For example, to display an object, it is necessary to -convert the object to type \spadtype{OutputForm}. +other types. To \spadglossSee{convert}{conversion} an object to a new +type, use the \axiomSyntax{::} infix operator.\footnote{Conversion is +discussed in detail in +\downlink{``\ugTypesConvertTitle''}{ugTypesConvertPage} in Section +\ugTypesConvertNumber\ignore{ugTypesConvert}.} For example, to +display an object, it is necessary to convert the object to type +\spadtype{OutputForm}. \xtc{ This produces a polynomial with rational number coefficients. @@ -25138,16 +22808,7 @@ Others conversions must be explicitly requested. \end{page} @ -<>= -\newcommand{\ugIntroCallFunTitle}{Calling Functions} -\newcommand{\ugIntroCallFunNumber}{1.3.6.} - -@ -\section{Calling Functions} -\label{ugIntroCallFunPage} -\index{pages!ugIntroCallFunPage!ug01.ht} -\index{ug01.ht!pages!ugIntroCallFunPage} -\index{ugIntroCallFunPage!ug01.ht!pages} +\pagehead{ugIntroCallFunPage}{ug01.ht}{Calling Functions} <>= \begin{page}{ugIntroCallFunPage}{1.3.6. Calling Functions} \beginscroll @@ -25208,20 +22869,8 @@ operations are provided for efficiency reasons. \end{page} @ -<>= -\newcommand{\ugIntroMacrosTitle}{Some Predefined Macros} -\newcommand{\ugIntroMacrosNumber}{1.3.7.} - -@ -\section{Some Predefined Macros} -\label{ugIntroMacrosPage} -\begin{itemize} -\item ugUserMacrosPage \ref{ugUserMacrosPage} on -page~\pageref{ugUserMacrosPage} -\end{itemize} -\index{pages!ugIntroMacrosPage!ug01.ht} -\index{ug01.ht!pages!ugIntroMacrosPage} -\index{ugIntroMacrosPage!ug01.ht!pages} +\pagehead{ugIntroMacrosPage}{ug01.ht}{Some Predefined Macros} +\pageto{notitle}{ugUserMacrosPage} <>= \begin{page}{ugIntroMacrosPage}{1.3.7. Some Predefined Macros} \beginscroll @@ -25236,8 +22885,8 @@ Macros are names \texht{ \centerline{{\begin{tabular}{ll}}} -\centerline{{\spadgloss{\%i} & The square root of -1. }} -\centerline{{\spadgloss{\%e} & The base of the natural logarithm. }} +\centerline{{\spadgloss{\%i} & The square root of -1. }} +\centerline{{\spadgloss{\%e} & The base of the natural logarithm. }} \centerline{{\spadgloss{\%pi} & $\pi$. }} \centerline{{\spadgloss{\%infinity} & $\infty$. }} \centerline{{\spadgloss{\%plusInfinity} & $+\infty$. }} @@ -25246,8 +22895,8 @@ Macros are names }{ \indent{0} \beginitems -\item[\axiomSyntax{\%i}] \tab{17} The square root of -1. -\item[\axiomSyntax{\%e}] \tab{17} The base of the natural logarithm. +\item[\axiomSyntax{\%i}] \tab{17} The square root of -1. +\item[\axiomSyntax{\%e}] \tab{17} The base of the natural logarithm. \item[\axiomSyntax{\%pi}] \tab{17} Pi. \item[\axiomSyntax{\%infinity}] \tab{17} Infinity. \item[\axiomSyntax{\%plusInfinity}] \tab{17} Plus infinity. @@ -25264,22 +22913,9 @@ Macros are names \end{page} @ -<>= -\newcommand{\ugIntroLongTitle}{Long Lines} -\newcommand{\ugIntroLongNumber}{1.3.8.} - -@ -\section{Long Lines} -\label{ugIntroLongPage} -\begin{itemize} -\item ugInOutInPage \ref{ugInOutInPage} on -page~\pageref{ugInOutInPage} -\item ugLangBlocksPage \ref{ugLangBlocksPage} on -page~\pageref{ugLangBlocksPage} -\end{itemize} -\index{pages!ugIntroLongPage!ug01.ht} -\index{ug01.ht!pages!ugIntroLongPage} -\index{ugIntroLongPage!ug01.ht!pages} +\pagehead{ugIntroLongPage}{ug01.ht}{Long Lines} +\pageto{notitle}{ugInOutInPage} +\pageto{notitle}{ugLangBlocksPage} <>= \begin{page}{ugIntroLongPage}{1.3.8. Long Lines} \beginscroll @@ -25316,16 +22952,7 @@ in Section \ugLangBlocksNumber\ignore{ugLangBlocks}). \end{page} @ -<>= -\newcommand{\ugIntroCommentsTitle}{Comments} -\newcommand{\ugIntroCommentsNumber}{1.3.9.} - -@ -\section{Comments} -\label{ugIntroCommentsPage} -\index{pages!ugIntroCommentsPage!ug01.ht} -\index{ug01.ht!pages!ugIntroCommentsPage} -\index{ugIntroCommentsPage!ug01.ht!pages} +\pagehead{ugIntroCommentsPage}{ug01.ht}{Comments} <>= \begin{page}{ugIntroCommentsPage}{1.3.9. Comments} \beginscroll @@ -25348,44 +22975,29 @@ other than starting each line with \axiomSyntax{--} or \end{page} @ -<>= -\newcommand{\ugIntroGraphicsTitle}{Graphics} -\newcommand{\ugIntroGraphicsNumber}{1.4.} - -@ -\section{Graphics} -\label{ugIntroGraphicsPage} -\begin{itemize} -\item ugProblemNumericPage \ref{ugProblemNumericPage} on -page~\pageref{ugProblemNumericPage} -\item ugAppGraphicsPage \ref{ugAppGraphicsPage} on -page~\pageref{ugAppGraphicsPage} -\item ugGraphPage \ref{ugGraphPage} on -page~\pageref{ugGraphPage} -\end{itemize} -\index{pages!ugIntroGraphicsPage!ug01.ht} -\index{ug01.ht!pages!ugIntroGraphicsPage} -\index{ugIntroGraphicsPage!ug01.ht!pages} +\pagehead{ugIntroGraphicsPage}{ug01.ht}{Graphics} +\pageto{notitle}{ugProblemNumericPage} +\pageto{notitle}{ugAppGraphicsPage} +\pageto{notitle}{ugGraphPage} <>= \begin{page}{ugIntroGraphicsPage}{1.4. Graphics} \beginscroll % -Axiom has a two- and three-dimensional drawing and rendering -package that allows you to draw, shade, color, rotate, translate, map, -clip, scale and combine graphic output of Axiom computations. -The graphics interface is capable of plotting functions of one or more -variables and plotting parametric surfaces. -Once the graphics figure appears in a window, -move your mouse to the window and click. -A control panel appears immediately and allows you to -interactively transform the object. +Axiom has a two- and three-dimensional drawing and rendering package +that allows you to draw, shade, color, rotate, translate, map, clip, +scale and combine graphic output of Axiom computations. The graphics +interface is capable of plotting functions of one or more variables +and plotting parametric surfaces. Once the graphics figure appears in +a window, move your mouse to the window and click. A control panel +appears immediately and allows you to interactively transform the +object. \psXtc{ -This is an example of Axiom's two-dimensional plotting. -From the 2D Control Panel you can rescale the plot, turn axes and units -on and off and save the image, among other things. -This PostScript image was produced by clicking on the +This is an example of Axiom's two-dimensional plotting. From the 2D +Control Panel you can rescale the plot, turn axes and units on and off +and save the image, among other things. This PostScript image was +produced by clicking on the \texht{\fbox{\bf PS}}{{\bf PS}} 2D Control Panel button. }{ \graphpaste{draw(cos(5*t/8), t=0..16*\%pi, coordinates==polar)} @@ -25394,20 +23006,19 @@ This PostScript image was produced by clicking on the } \psXtc{ -This is an example of Axiom's three-dimensional plotting. -It is a monochrome graph of the complex arctangent -function. -The image displayed was rotated and had the ``shade'' and ``outline'' -display options set from the 3D Control Panel. -The PostScript output was produced by clicking on the -\texht{\fbox{\bf save}}{{\bf save}} 3D Control Panel button and then -clicking on the \texht{\fbox{\bf PS}}{{\bf PS}} button. -See \downlink{``\ugProblemNumericTitle''}{ugProblemNumericPage} -in Section \ugProblemNumericNumber\ignore{ugProblemNumeric} for -more details and examples -of Axiom's numeric and graphics capabilities. -}{ -\graphpaste{draw((x,y) +-> real atan complex(x,y), -\%pi..\%pi, -\%pi..\%pi, colorFunction == (x,y) +-> argument atan complex(x,y))} +This is an example of Axiom's three-dimensional plotting. It is a +monochrome graph of the complex arctangent function. The image +displayed was rotated and had the ``shade'' and ``outline'' display +options set from the 3D Control Panel. The PostScript output was +produced by clicking on the \texht{\fbox{\bf save}}{{\bf save}} 3D +Control Panel button and then clicking on the \texht{\fbox{\bf +PS}}{{\bf PS}} button. See +\downlink{``\ugProblemNumericTitle''}{ugProblemNumericPage} in Section +\ugProblemNumericNumber\ignore{ugProblemNumeric} for more details and +examples of Axiom's numeric and graphics capabilities. +}{ +\graphpaste{draw((x,y) +-> real atan complex(x,y), -\%pi..\%pi, +-\%pi..\%pi, colorFunction == (x,y) +-> argument atan complex(x,y))} }{ \epsffile[72 72 285 285]{../ps/atan-1.ps} } @@ -25420,8 +23031,8 @@ produced these figures, see in Appendix \ugAppGraphicsNumber\ignore{ugAppGraphics}. PostScript output is available so that Axiom images can be -printed.\footnote{PostScript is a trademark of Adobe Systems Incorporated, -registered in the United States.} +printed.\footnote{PostScript is a trademark of Adobe Systems +Incorporated, registered in the United States.} See \downlink{``\ugGraphTitle''}{ugGraphPage} in Chapter \ugGraphNumber\ignore{ugGraph} for more examples and details about using @@ -25432,34 +23043,15 @@ Axiom's graphics facilities. \end{page} @ -<>= -\newcommand{\ugIntroNumbersTitle}{Numbers} -\newcommand{\ugIntroNumbersNumber}{1.5.} - -@ -\section{Numbers} -\label{ugIntroNumbersPage} -\begin{itemize} -\item FloatXmpPage \ref{FloatXmpPage} on -page~\pageref{FloatXmpPage} -\item DoubleFloatXmpPage \ref{DoubleFloatXmpPage} on -page~\pageref{DoubleFloatXmpPage} -\item ComplexXmpPage \ref{ComplexXmpPage} on -page~\pageref{ComplexXmpPage} -\item DecimalExpansionXmpPage \ref{DecimalExpansionXmpPage} on -page~\pageref{DecimalExpansionXmpPage} -\item ContinuedFractionXmpPage \ref{ContinuedFractionXmpPage} on -page~\pageref{ContinuedFractionXmpPage} -\item PartialFractionXmpPage \ref{PartialFractionXmpPage} on -page~\pageref{PartialFractionXmpPage} -\item RadixExpansionXmpPage \ref{RadixExpansionXmpPage} on -page~\pageref{RadixExpansionXmpPage} -\item ugxProblemFinitePrimePage \ref{ugxProblemFinitePrimePage} on -page~\pageref{ugxProblemFinitePrimePage} -\end{itemize} -\index{pages!ugIntroNumbersPage!ug01.ht} -\index{ug01.ht!pages!ugIntroNumbersPage} -\index{ugIntroNumbersPage!ug01.ht!pages} +\pagehead{ugIntroNumbersPage}{ug01.ht}{Numbers} +\pageto{notitle}{FloatXmpPage} +\pageto{notitle}{DoubleFloatXmpPage} +\pageto{notitle}{ComplexXmpPage} +\pageto{notitle}{DecimalExpansionXmpPage} +\pageto{notitle}{ContinuedFractionXmpPage} +\pageto{notitle}{PartialFractionXmpPage} +\pageto{notitle}{RadixExpansionXmpPage} +\pageto{notitle}{ugxProblemFinitePrimePage} <>= \begin{page}{ugIntroNumbersPage}{1.5. Numbers} \beginscroll @@ -25479,7 +23071,8 @@ Integer arithmetic is always exact. \xtc{ Integers can be represented in factored form. }{ -\spadpaste{factor 643238070748569023720594412551704344145570763243 \bound{ex1}} +\spadpaste{factor 643238070748569023720594412551704344145570763243 +\bound{ex1}} } \xtc{ Results stay factored when you do arithmetic. @@ -25501,7 +23094,8 @@ Roman numerals are also available for those special occasions. \xtc{ Rational number arithmetic is also exact. }{ -\spadpaste{r := 10 + 9/2 + 8/3 + 7/4 + 6/5 + 5/6 + 4/7 + 3/8 + 2/9\bound{r}} +\spadpaste{r := 10 + 9/2 + 8/3 + 7/4 + 6/5 + 5/6 + 4/7 + 3/8 + 2/9 +\bound{r}} } \xtc{ To factor fractions, you have to @@ -25621,14 +23215,16 @@ compact \ldots } \xtc{ or expanded format (see -\downlink{`PartialFraction'}{PartialFractionXmpPage}\ignore{PartialFraction}). +\downlink{`PartialFraction'}{PartialFractionXmpPage} +\ignore{PartialFraction}). }{ \spadpaste{padicFraction(\%) \free{partfrac}} } \xtc{ Like integers, bases (radices) other than ten can be used for rational numbers (see -\downlink{`RadixExpansion'}{RadixExpansionXmpPage}\ignore{RadixExpansion}). +\downlink{`RadixExpansion'}{RadixExpansionXmpPage} +\ignore{RadixExpansion}). Here we use base eight. }{ \spadpaste{radix(4/7, 8)\bound{rad}} @@ -25720,7 +23316,8 @@ But we need to rationalize the denominator again. Types \spadtype{Quaternion} and \spadtype{Octonion} are also available. Multiplication of quaternions is non-commutative, as expected. }{ -\spadpaste{q:=quatern(1,2,3,4)*quatern(5,6,7,8) - quatern(5,6,7,8)*quatern(1,2,3,4)} +\spadpaste{q:=quatern(1,2,3,4)*quatern(5,6,7,8) - +quatern(5,6,7,8)*quatern(1,2,3,4)} } \endscroll @@ -25728,58 +23325,27 @@ Multiplication of quaternions is non-commutative, as expected. \end{page} @ -<>= -\newcommand{\ugIntroCollectTitle}{Data Structures} -\newcommand{\ugIntroCollectNumber}{1.6.} - -@ -\section{Data Structures} -\label{ugIntroCollectPage} -\begin{itemize} -\item ListXmpPage \ref{ListXmpPage} on -page~\pageref{ListXmpPage} -\item ugLangItsPage \ref{ugLangItsPage} on -page~\pageref{ugLangItsPage} -\item StreamXmpPage \ref{StreamXmpPage} on -page~\pageref{StreamXmpPage} -\item ugLangItsPage \ref{ugLangItsPage} on -page~\pageref{ugLangItsPage} -\item OneDimensionalArrayXmpPage \ref{OneDimensionalArrayXmpPage} on -page~\pageref{OneDimensionalArrayXmpPage} -\item FlexibleArrayXmpPage \ref{FlexibleArrayXmpPage} on -page~\pageref{FlexibleArrayXmpPage} -\item HeapXmpPage \ref{HeapXmpPage} on -page~\pageref{HeapXmpPage} -\item BinarySearchTreeXmpPage \ref{BinarySearchTreeXmpPage} on -page~\pageref{BinarySearchTreeXmpPage} -\item BalancedBinaryTreeXmpPage \ref{BalancedBinaryTreeXmpPage} on -page~\pageref{BalancedBinaryTreeXmpPage} -\item SetXmpPage \ref{SetXmpPage} on -page~\pageref{SetXmpPage} -\item MultiSetXmpPage \ref{MultiSetXmpPage} on -page~\pageref{MultiSetXmpPage} -\item AssociationListXmpPage \ref{AssociationListXmpPage} on -page~\pageref{AssociationListXmpPage} -\item KeyedAccessFileXmpPage \ref{KeyedAccessFileXmpPage} on -page~\pageref{KeyedAccessFileXmpPage} -\item LibraryXmpPage \ref{LibraryXmpPage} on -page~\pageref{LibraryXmpPage} -\item SparseTableXmpPage \ref{SparseTableXmpPage} on -page~\pageref{SparseTableXmpPage} -\item StringTableXmpPage \ref{StringTableXmpPage} on -page~\pageref{StringTableXmpPage} -\item TableXmpPage \ref{TableXmpPage} on -page~\pageref{TableXmpPage} -\item ugTypesRecordsPage \ref{ugTypesRecordsPage} on -page~\pageref{ugTypesRecordsPage} -\item ugTypesUnionsPage \ref{ugTypesUnionsPage} on -page~\pageref{ugTypesUnionsPage} -\item ugDomainsPage \ref{ugDomainsPage} on -page~\pageref{ugDomainsPage} -\end{itemize} -\index{pages!ugIntroCollectPage!ug01.ht} -\index{ug01.ht!pages!ugIntroCollectPage} -\index{ugIntroCollectPage!ug01.ht!pages} +\pagehead{ugIntroCollectPage}{ug01.ht}{Data Structures} +\pageto{notitle}{ListXmpPage} +\pageto{notitle}{ugLangItsPage} +\pageto{notitle}{StreamXmpPage} +\pageto{notitle}{ugLangItsPage} +\pageto{notitle}{OneDimensionalArrayXmpPage} +\pageto{notitle}{FlexibleArrayXmpPage} +\pageto{notitle}{HeapXmpPage} +\pageto{notitle}{BinarySearchTreeXmpPage} +\pageto{notitle}{BalancedBinaryTreeXmpPage} +\pageto{notitle}{SetXmpPage} +\pageto{notitle}{MultiSetXmpPage} +\pageto{notitle}{AssociationListXmpPage} +\pageto{notitle}{KeyedAccessFileXmpPage} +\pageto{notitle}{LibraryXmpPage} +\pageto{notitle}{SparseTableXmpPage} +\pageto{notitle}{StringTableXmpPage} +\pageto{notitle}{TableXmpPage} +\pageto{notitle}{ugTypesRecordsPage} +\pageto{notitle}{ugTypesUnionsPage} +\pageto{notitle}{ugDomainsPage} <>= \begin{page}{ugIntroCollectPage}{1.6. Data Structures} \beginscroll @@ -25985,14 +23551,13 @@ as a list in the order they were extracted. \spadpaste{[extract!(h) while not empty?(h)]\free{h}} } -A \spadgloss{binary tree} is a ``tree'' with at most two branches -per node: it is either empty, or else is a node consisting of a -value, and a left and right subtree (again, binary trees).\footnote{Example of binary tree types are -\spadtype{BinarySearchTree} (see +A \spadgloss{binary tree} is a ``tree'' with at most two branches per +node: it is either empty, or else is a node consisting of a value, and +a left and right subtree (again, binary trees).\footnote{Example of +binary tree types are \spadtype{BinarySearchTree} (see \downlink{`BinarySearchTree'}{BinarySearchTreeXmpPage} -\ignore{BinarySearchTree}, -\spadtype{PendantTree}, \spadtype{TournamentTree}, -and \spadtype{BalancedBinaryTree} (see +\ignore{BinarySearchTree}, \spadtype{PendantTree}, +\spadtype{TournamentTree}, and \spadtype{BalancedBinaryTree} (see \downlink{`BalancedBinaryTree'}{BalancedBinaryTreeXmpPage} \ignore{BalancedBinaryTree}).} @@ -26044,11 +23609,14 @@ A \spadgloss{table} is conceptually a set of ``key--value'' pairs and is a generalization of a multiset.\footnote{For examples of tables, see \spadtype{AssociationList} ( -\downlink{`AssociationList'}{AssociationListXmpPage}\ignore{AssociationList}), +\downlink{`AssociationList'}{AssociationListXmpPage} +\ignore{AssociationList}), \spadtype{HashTable}, \spadtype{KeyedAccessFile} ( -\downlink{`KeyedAccessFile'}{KeyedAccessFileXmpPage}\ignore{KeyedAccessFile}), -\spadtype{Library} (\downlink{`Library'}{LibraryXmpPage}\ignore{Library}), +\downlink{`KeyedAccessFile'}{KeyedAccessFileXmpPage} +\ignore{KeyedAccessFile}), +\spadtype{Library} (\downlink{`Library'}{LibraryXmpPage} +\ignore{Library}), \spadtype{SparseTable} ( \downlink{`SparseTable'}{SparseTableXmpPage}\ignore{SparseTable}), \spadtype{StringTable} ( @@ -26079,14 +23647,16 @@ First, let \smath{n} be the value of \axiomFun{search}\smath{(k,t)}. Then, if \smath{n} has the value \smath{"failed"}, return the value \smath{1}; otherwise return \smath{n + 1}.'' }{ -\spadpaste{howMany(k) == (n:=search(k,t); n case "failed" => 1; n+1)\bound{how}} +\spadpaste{howMany(k) == (n:=search(k,t); n case "failed" => 1; n+1) +\bound{how}} } \xtc{ Run through the primes to create the table, then print the table. The expression \axiom{t.m := howMany(m)} updates the value in table \axiom{t} stored under key \axiom{m}. }{ -\spadpaste{for p in primes(2,1000) repeat (m:= p rem 5; t.m:= howMany(m)); t\free{how t}} +\spadpaste{for p in primes(2,1000) repeat (m:= p rem 5; t.m:= howMany(m)); +t\free{how t}} } A {\it record} @@ -26146,46 +23716,26 @@ to obtaining good performance. \end{page} @ -<>= -\newcommand{\ugIntroTwoDimTitle}{Expanding to Higher Dimensions} -\newcommand{\ugIntroTwoDimNumber}{1.7.} - -@ -\section{Expanding to Higher Dimensions} -\label{ugIntroTwoDimPage} -\begin{itemize} -\item TwoDimensionalArrayXmpPage \ref{TwoDimensionalArrayXmpPage} on -page~\pageref{TwoDimensionalArrayXmpPage} -\item MatrixXmpPage \ref{MatrixXmpPage} on -page~\pageref{MatrixXmpPage} -\item PermanentXmpPage \ref{PermanentXmpPage} on -page~\pageref{PermanentXmpPage} -\item SquareMatrixXmpPage \ref{SquareMatrixXmpPage} on -page~\pageref{SquareMatrixXmpPage} -\item VectorXmpPage \ref{VectorXmpPage} on -page~\pageref{VectorXmpPage} -\item ugProblemEigenPage \ref{ugProblemEigenPage} on -page~\pageref{ugProblemEigenPage} -\item ugProblemLinPolEqnPage \ref{ugProblemLinPolEqnPage} on -page~\pageref{ugProblemLinPolEqnPage} -\item ugLangItsPage \ref{ugLangItsPage} on -page~\pageref{ugLangItsPage} -\end{itemize} -\index{pages!ugIntroTwoDimPage!ug01.ht} -\index{ug01.ht!pages!ugIntroTwoDimPage} -\index{ugIntroTwoDimPage!ug01.ht!pages} +\pagehead{ugIntroTwoDimPage}{ug01.ht}{Expanding to Higher Dimensions} +\pageto{notitle}{TwoDimensionalArrayXmpPage} +\pageto{notitle}{MatrixXmpPage} +\pageto{notitle}{PermanentXmpPage} +\pageto{notitle}{SqMatrixXmpPage} +\pageto{notitle}{VectorXmpPage} +\pageto{notitle}{ugProblemEigenPage} +\pageto{notitle}{ugProblemLinPolEqnPage} +\pageto{notitle}{ugLangItsPage} <>= \begin{page}{ugIntroTwoDimPage}{1.7. Expanding to Higher Dimensions} \beginscroll % To get higher dimensional aggregates, you can create one-dimensional -aggregates with elements that are themselves -aggregates, for example, lists of lists, one-dimensional arrays of -lists of multisets, and so on. -For applications requiring two-dimensional homogeneous aggregates, -you will likely find {\it two-dimensional arrays} -and {\it matrices} most useful. +aggregates with elements that are themselves aggregates, for example, +lists of lists, one-dimensional arrays of lists of multisets, and so +on. For applications requiring two-dimensional homogeneous +aggregates, you will likely find {\it two-dimensional arrays} and {\it +matrices} most useful. The entries in \spadtype{TwoDimensionalArray} and \spadtype{Matrix} objects @@ -26202,7 +23752,7 @@ Because of this, we limit our discussion here to For more information about Axiom's linear algebra facilities, see \downlink{`Matrix'}{MatrixXmpPage}\ignore{Matrix}, \downlink{`Permanent'}{PermanentXmpPage}\ignore{Permanent}, -\downlink{`SquareMatrix'}{SquareMatrixXmpPage}\ignore{SquareMatrix}, +\downlink{`SquareMatrix'}{SqMatrixXmpPage}\ignore{SquareMatrix}, \downlink{`Vector'}{VectorXmpPage}\ignore{Vector}, \downlink{``\ugProblemEigenTitle''}{ugProblemEigenPage} in Section \ugProblemEigenNumber\ignore{ugProblemEigen} @@ -26225,7 +23775,8 @@ The ``collections'' construct (see in Section \ugLangItsNumber\ignore{ugLangIts}) is useful for creating matrices whose entries are given by formulas. }{ -\spadpaste{matrix([[1/(i + j - x) for i in 1..4] for j in 1..4]) \bound{hilb}} +\spadpaste{matrix([[1/(i + j - x) for i in 1..4] for j in 1..4]) +\bound{hilb}} } \xtc{ Let \axiom{vm} denote the three by three Vandermonde matrix. @@ -26259,55 +23810,36 @@ You can perform operations such as \end{page} @ -<>= -\newcommand{\ugIntroYouTitle}{Writing Your Own Functions} -\newcommand{\ugIntroYouNumber}{1.8.} - -@ -\section{Writing Your Own Functions} -\label{ugIntroYouPage} -\begin{itemize} -\item ugUserPage \ref{ugUserPage} on -page~\pageref{ugUserPage} -\item ugInOutInPage \ref{ugInOutInPage} on -page~\pageref{ugInOutInPage} -\end{itemize} -\index{pages!ugIntroYouPage!ug01.ht} -\index{ug01.ht!pages!ugIntroYouPage} -\index{ugIntroYouPage!ug01.ht!pages} +\pagehead{ugIntroYouPage}{ug01.ht}{Writing Your Own Functions} +\pageto{notitle}{ugUserPage} +\pageto{notitle}{ugInOutInPage} <>= \begin{page}{ugIntroYouPage}{1.8. Writing Your Own Functions} \beginscroll % -Axiom provides you with a very large library of predefined -operations and objects to compute with. -You can use the Axiom library of constructors to create new -objects dynamically of quite arbitrary complexity. -For example, you can make lists of matrices of fractions of -polynomials with complex floating point numbers as coefficients. -Moreover, the library provides a wealth of operations that allow -you to create and manipulate these objects. +Axiom provides you with a very large library of predefined operations +and objects to compute with. You can use the Axiom library of +constructors to create new objects dynamically of quite arbitrary +complexity. For example, you can make lists of matrices of fractions +of polynomials with complex floating point numbers as coefficients. +Moreover, the library provides a wealth of operations that allow you +to create and manipulate these objects. -For many applications, -you need to interact with the interpreter and write some -Axiom programs to tackle your application. -Axiom allows you to write functions interactively, -thereby effectively extending the system library. -Here we give a few simple examples, leaving the details to -\downlink{``\ugUserTitle''}{ugUserPage} in -Chapter \ugUserNumber\ignore{ugUser}. +For many applications, you need to interact with the interpreter and +write some Axiom programs to tackle your application. Axiom allows +you to write functions interactively, thereby effectively extending +the system library. Here we give a few simple examples, leaving the +details to \downlink{``\ugUserTitle''}{ugUserPage} in Chapter +\ugUserNumber\ignore{ugUser}. We begin by looking at several ways that you can define the -``factorial'' function in Axiom. -The first way is to give a -piece-wise definition of the function. -This method is best for a general recurrence -relation since the pieces are gathered together and compiled into -an efficient iterative function. -Furthermore, enough previously computed values are automatically -saved so that a subsequent call to the function can pick up from -where it left off. +``factorial'' function in Axiom. The first way is to give a +piece-wise definition of the function. This method is best for a +general recurrence relation since the pieces are gathered together and +compiled into an efficient iterative function. Furthermore, enough +previously computed values are automatically saved so that a +subsequent call to the function can pick up from where it left off. \xtc{ Define the value of \userfun{fact} at \axiom{0}. @@ -26455,7 +23987,8 @@ of expressions and for defining new functions by rules. For example, suppose that you want to apply regularly a transformation that groups together products of radicals: \texht{$$\sqrt{a}\:\sqrt{b} \mapsto \sqrt{ab}, \quad -(\forall a)(\forall b)$$}{\axiom{sqrt(a) * sqrt(b) by sqrt(a*b)} for any \axiom{a} and \axiom{b}} +(\forall a)(\forall b)$$} +{\axiom{sqrt(a) * sqrt(b) by sqrt(a*b)} for any \axiom{a} and \axiom{b}} Note that such a transformation is not generally correct. Axiom never uses it automatically. @@ -26481,16 +24014,7 @@ The rule \end{page} @ -<>= -\newcommand{\ugIntroVariablesTitle}{Polynomials} -\newcommand{\ugIntroVariablesNumber}{1.9.} - -@ -\section{Polynomials} -\label{ugIntroVariablesPage} -\index{pages!ugIntroVariablesPage!ug01.ht} -\index{ug01.ht!pages!ugIntroVariablesPage} -\index{ugIntroVariablesPage!ug01.ht!pages} +\pagehead{ugIntroVariablesPage}{ug01.ht}{Polynomials} <>= \begin{page}{ugIntroVariablesPage}{1.9. Polynomials} \beginscroll @@ -26544,7 +24068,7 @@ ordering in the explicit list. } \xtc{ The constructor -\spadtype{DistributedMultivariatePolynomial} provides +\spadtype{DistributedMultivariatePoly} provides polynomials in one or more specified variables with the monomials ordered lexicographically. }{ @@ -26552,15 +24076,15 @@ ordered lexicographically. } \xtc{ The constructor -\spadtype{HomogeneousDistributedMultivariatePolynomial} is similar except that -the monomials are ordered by total order refined by reverse -lexicographic order. +\spadtype{HomogeneousDistributedMultivariatePoly} is similar +except that the monomials are ordered by total order refined by +reverse lexicographic order. }{ \spadpaste{m :: HDMP([y,x],INT) \free{m}} } More generally, the domain constructor -\spadtype{GeneralDistributedMultivariatePolynomial} allows the +\spadtype{GeneralDistributedMultivariatePoly} allows the user to provide an arbitrary predicate to define his own term ordering. These last three constructors are typically used in \texht{Gr\"{o}bner}{Groebner} basis @@ -26572,20 +24096,8 @@ wanted and the term ordering is critical for controlling the computation. \end{page} @ -<>= -\newcommand{\ugIntroCalcLimitsTitle}{Limits} -\newcommand{\ugIntroCalcLimitsNumber}{1.10.} - -@ -\section{Limits} -\label{ugIntroCalcLimitsPage} -\begin{itemize} -\item ugProblemLimitsPage \ref{ugProblemLimitsPage} on -page~\pageref{ugProblemLimitsPage} -\end{itemize} -\index{pages!ugIntroCalcLimitsPage!ug01.ht} -\index{ug01.ht!pages!ugIntroCalcLimitsPage} -\index{ugIntroCalcLimitsPage!ug01.ht!pages} +\pagehead{ugIntroCalcLimitsPage}{ug01.ht}{Limits} +\pageto{notitle}{ugProblemLimitsPage} <>= \begin{page}{ugIntroCalcLimitsPage}{1.10. Limits} \beginscroll @@ -26624,9 +24136,9 @@ denote $\infty$ and $-\infty$.}{} \spadpaste{limit(h,x=\%plusInfinity) \free{h}} } \xtc{ -A function can be defined on both sides of a particular value, but -may tend to different limits as its variable approaches that value from the -left and from the right. +A function can be defined on both sides of a particular value, but may +tend to different limits as its variable approaches that value from +the left and from the right. }{ \spadpaste{limit(sqrt(y**2)/y,y = 0)} } @@ -26637,10 +24149,11 @@ tends to \axiom{0}. \spadpaste{limit(exp(-1/x**2),x = 0)} } \xtc{ -However, if \axiom{x} is allowed to approach \axiom{0} along any path in the -complex plane, the limiting value of \axiom{exp(-1/x**2)} depends on the -path taken because the function has an essential singularity at \axiom{x=0}. -This is reflected in the error message returned by the function. +However, if \axiom{x} is allowed to approach \axiom{0} along any path +in the complex plane, the limiting value of \axiom{exp(-1/x**2)} +depends on the path taken because the function has an essential +singularity at \axiom{x=0}. This is reflected in the error message +returned by the function. }{ \spadpaste{complexLimit(exp(-1/x**2),x = 0)} } @@ -26650,20 +24163,8 @@ This is reflected in the error message returned by the function. \end{page} @ -<>= -\newcommand{\ugIntroSeriesTitle}{Series} -\newcommand{\ugIntroSeriesNumber}{1.11.} - -@ -\section{Series} -\label{ugIntroSeriesPage} -\begin{itemize} -\item ugProblemSeriesPage \ref{ugProblemSeriesPage} on -page~\pageref{ugProblemSeriesPage} -\end{itemize} -\index{pages!ugIntroSeriesPage!ug01.ht} -\index{ug01.ht!pages!ugIntroSeriesPage} -\index{ugIntroSeriesPage!ug01.ht!pages} +\pagehead{ugIntroSeriesPage}{ug01.ht}{Series} +\pageto{notitle}{ugProblemSeriesPage} <>= \begin{page}{ugIntroSeriesPage}{1.11. Series} \beginscroll @@ -26704,7 +24205,8 @@ computes the \eth{\axiom{n}} coefficient. (Recall that the \axiomSyntax{+->} is an infix operator meaning ``maps to.'') }{ -\spadpaste{series(n +-> (-1)**((3*n - 4)/6)/factorial(n - 1/3),x = 0,4/3..,2)} +\spadpaste{ +series(n +-> (-1)**((3*n - 4)/6)/factorial(n - 1/3),x = 0,4/3..,2)} } \xtc{ Once you have created a power series, you can perform arithmetic operations @@ -26752,16 +24254,7 @@ As you see, you get a sequence of partial sums. \end{page} @ -<>= -\newcommand{\ugIntroCalcDerivTitle}{Derivatives} -\newcommand{\ugIntroCalcDerivNumber}{1.12.} - -@ -\section{Derivatives} -\label{ugIntroCalcDerivPage} -\index{pages!ugIntroCalcDerivPage!ug01.ht} -\index{ug01.ht!pages!ugIntroCalcDerivPage} -\index{ugIntroCalcDerivPage!ug01.ht!pages} +\pagehead{ugIntroCalcDerivPage}{ug01.ht}{Derivatives} <>= \begin{page}{ugIntroCalcDerivPage}{1.12. Derivatives} \beginscroll @@ -26818,25 +24311,27 @@ functions of \axiom{z}. Start by declaring that \axiom{F}, \axiom{x}, and \axiom{y} are operators. }{ -\spadpaste{F := operator 'F; x := operator 'x; y := operator 'y\bound{F x y}} +\spadpaste{ +F := operator 'F; x := operator 'x; y := operator 'y\bound{F x y}} } \xtc{ You can use \axiom{F}, \axiom{x}, and \axiom{y} in expressions. }{ -\spadpaste{a := F(x z, y z, z**2) + x y(z+1) \bound{a}\free{F}\free{x}\free{y}} +\spadpaste{ +a := F(x z, y z, z**2) + x y(z+1) \bound{a}\free{F}\free{x}\free{y}} } \xtc{ -Differentiate formally with respect to \axiom{z}. -The formal derivatives appearing in \axiom{dadz} are not just formal symbols, -but do represent the derivatives of \axiom{x}, \axiom{y}, and \axiom{F}. +Differentiate formally with respect to \axiom{z}. The formal +derivatives appearing in \axiom{dadz} are not just formal symbols, but +do represent the derivatives of \axiom{x}, \axiom{y}, and \axiom{F}. }{ \spadpaste{dadz := D(a, z)\bound{da}\free{a}} } \xtc{ -You can evaluate the above for particular functional -values of \axiom{F}, \axiom{x}, and \axiom{y}. -If \axiom{x(z)} is \axiom{exp(z)} and \axiom{y(z)} is \axiom{log(z+1)}, then -this evaluates \axiom{dadz}. +You can evaluate the above for particular functional values of +\axiom{F}, \axiom{x}, and \axiom{y}. If \axiom{x(z)} is +\axiom{exp(z)} and \axiom{y(z)} is \axiom{log(z+1)}, then this +evaluates \axiom{dadz}. }{ \spadpaste{eval(eval(dadz, 'x, z +-> exp z), 'y, z +-> log(z+1))\free{da}} } @@ -26856,20 +24351,8 @@ then differentiating. \end{page} @ -<>= -\newcommand{\ugIntroIntegrateTitle}{Integration} -\newcommand{\ugIntroIntegrateNumber}{1.13.} - -@ -\section{Integration} -\label{ugIntroIntegratePage} -\begin{itemize} -\item ugProblemIntegrationPage \ref{ugProblemIntegrationPage} on -page~\pageref{ugProblemIntegrationPage} -\end{itemize} -\index{pages!ugIntroIntegratePage!ug01.ht} -\index{ug01.ht!pages!ugIntroIntegratePage} -\index{ugIntroIntegratePage!ug01.ht!pages} +\pagehead{ugIntroIntegratePage}{ug01.ht}{Integration} +\pageto{notitle}{ugProblemIntegrationPage} <>= \begin{page}{ugIntroIntegratePage}{1.13. Integration} \beginscroll @@ -26877,9 +24360,8 @@ page~\pageref{ugProblemIntegrationPage} Axiom has extensive library facilities for integration. -The first example is the integration of a fraction with -denominator that factors into a quadratic and a quartic -irreducible polynomial. +The first example is the integration of a fraction with denominator +that factors into a quadratic and a quartic irreducible polynomial. The usual partial fraction approach used by most other computer algebra systems either fails or introduces expensive unneeded algebraic numbers. @@ -26906,18 +24388,16 @@ The only exception is when the integrand has complex valued quantities. \xtc{ -If the parameter is complex instead of real, then the notion of sign is -undefined and there is a unique answer. -You can request this answer by ``prepending'' the word ``complex'' to the -command name: +If the parameter is complex instead of real, then the notion of sign +is undefined and there is a unique answer. You can request this +answer by ``prepending'' the word ``complex'' to the command name: }{ \spadpaste{complexIntegrate(1/(x**2 + a),x)} } -The following two examples illustrate the limitations of -table-based approaches. -The two integrands are very similar, but the answer to one of them -requires the addition of two new algebraic numbers. +The following two examples illustrate the limitations of table-based +approaches. The two integrands are very similar, but the answer to +one of them requires the addition of two new algebraic numbers. \xtc{ This one is the easy one. @@ -26935,12 +24415,10 @@ find a solution. } Some computer algebra systems use heuristics or table-driven -approaches to integration. -When these systems cannot determine the answer to an integration -problem, they reply ``I don't know.'' Axiom uses a -algorithm for integration. -that conclusively proves that an integral cannot be expressed in -terms of elementary functions. +approaches to integration. When these systems cannot determine the +answer to an integration problem, they reply ``I don't know.'' Axiom +uses a algorithm for integration. that conclusively proves that an +integral cannot be expressed in terms of elementary functions. \xtc{ When Axiom returns an integral sign, it has proved @@ -26954,7 +24432,8 @@ can find in tables. Whenever possible, Axiom tries to express the answer using the functions present in the integrand. }{ -\spadpaste{integrate((sinh(1+sqrt(x+b))+2*sqrt(x+b)) / (sqrt(x+b) * (x + cosh(1+sqrt(x + b)))), x)} +\spadpaste{integrate((sinh(1+sqrt(x+b))+2*sqrt(x+b)) / +(sqrt(x+b) * (x + cosh(1+sqrt(x + b)))), x)} } \xtc{ A strong structure-checking algorithm in Axiom finds hidden algebraic @@ -26973,7 +24452,8 @@ Here are the details: If \texht{$x=\tan t$}{\axiom{x=tan(t)}} and \texht{$g=\tan (t/3)$}{\axiom{g=tan(t/3)}} then the following algebraic relation is true: -\texht{$${g^3-3xg^2-3g+x=0}$$}{\centerline{\axiom{g**3 - 3*x*g**2 - 3*g + x = 0}}} +\texht{$${g^3-3xg^2-3g+x=0}$$} +{\centerline{\axiom{g**3 - 3*x*g**2 - 3*g + x = 0}}} \item[2. ] Integrate \axiom{g} using this algebraic relation; this produces: \texht{$${% @@ -27000,7 +24480,8 @@ the algebraic layer is over the transcendental one. While incomplete for non-elementary functions, Axiom can handle some of them. }{ -\spadpaste{integrate(exp(-x**2) * erf(x) / (erf(x)**3 - erf(x)**2 - erf(x) + 1),x)} +\spadpaste{integrate(exp(-x**2) * erf(x) / +(erf(x)**3 - erf(x)**2 - erf(x) + 1),x)} } More examples of Axiom's integration capabilities are discussed in @@ -27012,16 +24493,7 @@ in Section \ugProblemIntegrationNumber\ignore{ugProblemIntegration}. \end{page} @ -<>= -\newcommand{\ugIntroDiffEqnsTitle}{Differential Equations} -\newcommand{\ugIntroDiffEqnsNumber}{1.14.} - -@ -\section{Differential Equations} -\label{ugIntroDiffEqnsPage} -\index{pages!ugIntroDiffEqnsPage!ug01.ht} -\index{ug01.ht!pages!ugIntroDiffEqnsPage} -\index{ugIntroDiffEqnsPage!ug01.ht!pages} +\pagehead{ugIntroDiffEqnsPage}{ug01.ht}{Differential Equations} <>= \begin{page}{ugIntroDiffEqnsPage}{1.14. Differential Equations} \beginscroll @@ -27039,7 +24511,8 @@ Let \axiom{y} be the unknown function in terms of \axiom{x}. \xtc{ Here we solve a third order equation with polynomial coefficients. }{ -\spadpaste{deq := x**3 * D(y x, x, 3) + x**2 * D(y x, x, 2) - 2 * x * D(y x, x) + 2 * y x = 2 * x**4 \bound{e3}\free{y}} +\spadpaste{deq := x**3 * D(y x, x, 3) + x**2 * D(y x, x, 2) - 2 * +x * D(y x, x) + 2 * y x = 2 * x**4 \bound{e3}\free{y}} } \xtc{ }{ @@ -27048,7 +24521,9 @@ Here we solve a third order equation with polynomial coefficients. \xtc{ Here we find all the algebraic function solutions of the equation. }{ -\spadpaste{deq := (x**2 + 1) * D(y x, x, 2) + 3 * x * D(y x, x) + y x = 0 \bound{e5}\free{y}} +\spadpaste{ +deq := (x**2 + 1) * D(y x, x, 2) + 3 * x * D(y x, x) + y x = 0 +\bound{e5}\free{y}} } \xtc{ }{ @@ -27064,7 +24539,8 @@ This example has solutions whose logarithmic derivative is an algebraic function of degree two. }{ -\spadpaste{eq := 2*x**3 * D(y x,x,2) + 3*x**2 * D(y x,x) - 2 * y x\bound{eq}\free{y}} +\spadpaste{eq := 2*x**3 * D(y x,x,2) + 3*x**2 * D(y x,x) - 2 * y x +\bound{eq}\free{y}} } \xtc{ }{ @@ -27074,7 +24550,8 @@ degree two. \xtc{ Here's another differential equation to solve. }{ -\spadpaste{deq := D(y x, x) = y(x) / (x + y(x) * log y x) \bound{deqi}\free{y}} +\spadpaste{deq := D(y x, x) = y(x) / (x + y(x) * log y x) +\bound{deqi}\free{y}} } \xtc{ }{ @@ -27108,7 +24585,8 @@ Notice that since we give the unknowns in the order \axiom{[x, y]}, the answer is a list of two series in the order \axiom{[series for x(t), series for y(t)]}. }{ -\spadpaste{seriesSolve([eq2, eq1], [x, y], t = 0, [y(0) = 1, x(0) = 0])\free{x}\free{y}\free{eq1}\free{eq2}} +\spadpaste{seriesSolve([eq2, eq1], [x, y], t = 0, +[y(0) = 1, x(0) = 0])\free{x}\free{y}\free{eq1}\free{eq2}} } \endscroll @@ -27116,16 +24594,7 @@ order \axiom{[x, y]}, the answer is a list of two series in the order \end{page} @ -<>= -\newcommand{\ugIntroSolutionTitle}{Solution of Equations} -\newcommand{\ugIntroSolutionNumber}{1.15.} - -@ -\section{Solution of Equations} -\label{ugIntroSolutionPage} -\index{pages!ugIntroSolutionPage!ug01.ht} -\index{ug01.ht!pages!ugIntroSolutionPage} -\index{ugIntroSolutionPage!ug01.ht!pages} +\pagehead{ugIntroSolutionPage}{ug01.ht}{Solution of Equations} <>= \begin{page}{ugIntroSolutionPage}{1.15. Solution of Equations} \beginscroll @@ -27166,19 +24635,19 @@ a solution in radicals, try \spadfun{radicalSolve}. }{ \spadpaste{radicalSolve(S(a),[x,y])\free{S1}} } -For systems of equations with symbolic coefficients, you can -apply \spadfun{solve}, listing the variables that you want -Axiom to solve for. -For polynomial equations, a solution cannot usually be expressed -solely in terms of the other variables. -Instead, the solution is presented as a ``triangular'' system of -equations, where each polynomial has coefficients involving -only the succeeding variables. This is analogous to converting a linear system -of equations to ``triangular form''. +For systems of equations with symbolic coefficients, you can apply +\spadfun{solve}, listing the variables that you want Axiom to solve +for. For polynomial equations, a solution cannot usually be expressed +solely in terms of the other variables. Instead, the solution is +presented as a ``triangular'' system of equations, where each +polynomial has coefficients involving only the succeeding +variables. This is analogous to converting a linear system of +equations to ``triangular form''. \xtc{ A system of three equations in five variables. }{ -\spadpaste{eqns := [x**2 - y + z,x**2*z + x**4 - b*y, y**2 *z - a - b*x]\bound{e}} +\spadpaste{eqns := [x**2 - y + z,x**2*z + x**4 - b*y, y**2 *z - a - b*x] +\bound{e}} } \xtc{ Solve the system for unknowns \smath{[x,y,z]}, @@ -27191,56 +24660,39 @@ reducing the solution to triangular form. \end{page} @ -<>= -\newcommand{\ugIntroSysCmmandsTitle}{System Commands} -\newcommand{\ugIntroSysCmmandsNumber}{1.16.} - -@ -\section{System Commands} -\label{ugIntroSysCmmandsPage} -\begin{itemize} -\item ugSysCmdPage \ref{ugSysCmdPage} on -page~\pageref{ugSysCmdPage} -\end{itemize} -\index{pages!ugIntroSysCmmandsPage!ug01.ht} -\index{ug01.ht!pages!ugIntroSysCmmandsPage} -\index{ugIntroSysCmmandsPage!ug01.ht!pages} +\pagehead{ugIntroSysCmmandsPage}{ug01.ht}{System Commands} +\pageto{notitle}{ugSysCmdPage} <>= \begin{page}{ugIntroSysCmmandsPage}{1.16. System Commands} \beginscroll % -We conclude our tour of Axiom with a brief discussion -of \spadgloss{system commands}. -System commands are special statements that start with a -closing parenthesis (\axiomSyntax{)}). They are used to control or -display your Axiom environment, start the \HyperName{} -system, issue operating system commands and leave Axiom. -For example, \spadsys{)system} is used -to issue commands to the operating system from Axiom. -Here is a brief description of some of these commands. +We conclude our tour of Axiom with a brief discussion of +\spadgloss{system commands}. System commands are special statements +that start with a closing parenthesis (\axiomSyntax{)}). They are used +to control or display your Axiom environment, start the Hyperdoc +system, issue operating system commands and leave Axiom. For example, +\spadsys{)system} is used to issue commands to the operating system +from Axiom. Here is a brief description of some of these commands. For more information on specific commands, see -\downlink{``\ugSysCmdTitle''}{ugSysCmdPage} -in Appendix \ugSysCmdNumber\ignore{ugSysCmd}. +\downlink{``\ugSysCmdTitle''}{ugSysCmdPage} in Appendix +\ugSysCmdNumber\ignore{ugSysCmd}. Perhaps the most important user command is the \spadsys{)clear all} -command that initializes your environment. -Every section and subsection in this book has an invisible -\spadsys{)clear all} that is read prior to the examples given in -the section. -\spadsys{)clear all} gives you a fresh, empty environment with no -user variables defined and the step number reset to \axiom{1}. -The \spadsys{)clear} command can also be used to selectively clear -values and properties of system variables. - -Another useful system command is \spadsys{)read}. -A preferred way to develop an application in Axiom is to put -your interactive commands into a file, say {\bf my.input} file. -To get Axiom to read this file, you use the system command -\spadsys{)read my.input}. -If you need to make changes to your approach or definitions, go -into your favorite editor, change {\bf my.input}, then -\spadsys{)read my.input} again. +command that initializes your environment. Every section and +subsection in this book has an invisible \spadsys{)clear all} that is +read prior to the examples given in the section. \spadsys{)clear all} +gives you a fresh, empty environment with no user variables defined +and the step number reset to \axiom{1}. The \spadsys{)clear} command +can also be used to selectively clear values and properties of system +variables. + +Another useful system command is \spadsys{)read}. A preferred way to +develop an application in Axiom is to put your interactive commands +into a file, say {\bf my.input} file. To get Axiom to read this file, +you use the system command \spadsys{)read my.input}. If you need to +make changes to your approach or definitions, go into your favorite +editor, change {\bf my.input}, then \spadsys{)read my.input} again. Other system commands include: \spadsys{)history}, to display previous input and/or output lines; \spadsys{)display}, to display @@ -27264,18 +24716,16 @@ another, to find the best way to approach an application. For this, you will find the \spadgloss{undo} facility of Axiom helpful. -System command \spadsys{)undo n} means ``undo back to step \axiom{n}''; it -restores the values of user variables to those that existed -immediately after input expression \axiom{n} was evaluated. +System command \spadsys{)undo n} means ``undo back to step +\axiom{n}''; it restores the values of user variables to those that +existed immediately after input expression \axiom{n} was evaluated. Similarly, \spadsys{)undo -n} undoes changes caused by the last -\axiom{n} input expressions. -Once you have done an \spadsys{)undo}, -you can continue on from there, or make a change and -{\bf redo} all your input expressions from the point -of the \spadsys{)undo} forward. +\axiom{n} input expressions. Once you have done an \spadsys{)undo}, +you can continue on from there, or make a change and {\bf redo} all +your input expressions from the point of the \spadsys{)undo} forward. The \spadsys{)undo} is completely general: it changes the environment -like any user expression. -Thus you can \spadsys{)undo} any previous undo. +like any user expression. Thus you can \spadsys{)undo} any previous +undo. Here is a sample dialogue between user and Axiom. \xtc{ @@ -27329,12 +24779,11 @@ the environment to that immediately after \axiom{(4)}.'' } After you have gone off on several tangents, then backtracked to -previous points in your conversation using \spadsys{)undo}, you -might want to save all the ``correct'' input commands you issued, -disregarding those undone. -The system command \spadsys{)history )write mynew.input} writes a -clean straight-line program onto the file {\bf mynew.input} on -your disk. +previous points in your conversation using \spadsys{)undo}, you might +want to save all the ``correct'' input commands you issued, +disregarding those undone. The system command \spadsys{)history +)write mynew.input} writes a clean straight-line program onto the file +{\bf mynew.input} on your disk. This concludes your tour of Axiom. To disembark, issue the system command \spadsys{)quit} to leave Axiom @@ -27345,57 +24794,32 @@ and return to the operating system. % @ \chapter{Users Guide Chapter 2 (ug02.ht)} -<>= -\newcommand{\ugTypesTitle}{Using Types and Modes} -\newcommand{\ugTypesNumber}{2.} - -@ -\section{Using Types and Modes} -\label{ugTypesPage} -\begin{itemize} -\item ugTypesBasicPage \ref{ugTypesBasicPage} on -page~\pageref{ugTypesBasicPage} -\item ugTypesWritingPage \ref{ugTypesWritingPage} on -page~\pageref{ugTypesWritingPage} -\item ugTypesDeclarePage \ref{ugTypesDeclarePage} on -page~\pageref{ugTypesDeclarePage} -\item ugTypesRecordsPage \ref{ugTypesRecordsPage} on -page~\pageref{ugTypesRecordsPage} -\item ugTypesUnionsPage \ref{ugTypesUnionsPage} on -page~\pageref{ugTypesUnionsPage} -\item ugTypesAnyNonePage \ref{ugTypesAnyNonePage} on -page~\pageref{ugTypesAnyNonePage} -\item ugTypesConvertPage \ref{ugTypesConvertPage} on -page~\pageref{ugTypesConvertPage} -\item ugTypesSubdomainsPage \ref{ugTypesSubdomainsPage} on -page~\pageref{ugTypesSubdomainsPage} -\item ugTypesPkgCallPage \ref{ugTypesPkgCallPage} on -page~\pageref{ugTypesPkgCallPage} -\item ugTypesResolvePage \ref{ugTypesResolvePage} on -page~\pageref{ugTypesResolvePage} -\item ugTypesExposePage \ref{ugTypesExposePage} on -page~\pageref{ugTypesExposePage} -\item ugAvailSnoopPage \ref{ugAvailSnoopPage} on -page~\pageref{ugAvailSnoopPage} -\end{itemize} -\index{pages!ugTypesPage!ug02.ht} -\index{ug02.ht!pages!ugTypesPage} -\index{ugTypesPage!ug02.ht!pages} +\pagehead{ugTypesPage}{ug02.ht}{Using Types and Modes} +\pageto{notitle}{ugTypesBasicPage} +\pageto{notitle}{ugTypesWritingPage} +\pageto{notitle}{ugTypesDeclarePage} +\pageto{notitle}{ugTypesRecordsPage} +\pageto{notitle}{ugTypesUnionsPage} +\pageto{notitle}{ugTypesAnyNonePage} +\pageto{notitle}{ugTypesConvertPage} +\pageto{notitle}{ugTypesSubdomainsPage} +\pageto{notitle}{ugTypesPkgCallPage} +\pageto{notitle}{ugTypesResolvePage} +\pageto{notitle}{ugTypesExposePage} +\pageto{notitle}{ugAvailSnoopPage} <>= \begin{page}{ugTypesPage}{2. Using Types and Modes} \beginscroll In this chapter we look at the key notion of \spadgloss{type} and its -generalization \spadgloss{mode}. -We show that every Axiom object has a type that -determines what you can do with the object. -In particular, we explain how to use types to call specific functions -from particular parts of the library and how types and modes can be used -to create new objects from old. -We also look at \pspadtype{Record} and \pspadtype{Union} types and -the special type \axiomType{Any}. -Finally, we give you an idea of how Axiom manipulates types and -modes internally to resolve ambiguities. +generalization \spadgloss{mode}. We show that every Axiom object has +a type that determines what you can do with the object. In +particular, we explain how to use types to call specific functions +from particular parts of the library and how types and modes can be +used to create new objects from old. We also look at +\pspadtype{Record} and \pspadtype{Union} types and the special type +\axiomType{Any}. Finally, we give you an idea of how Axiom +manipulates types and modes internally to resolve ambiguities. \beginmenu \menudownlink{{2.1. The Basic Idea}}{ugTypesBasicPage} @@ -27406,9 +24830,11 @@ modes internally to resolve ambiguities. \menudownlink{{2.6. The ``Any'' Domain}}{ugTypesAnyNonePage} \menudownlink{{2.7. Conversion}}{ugTypesConvertPage} \menudownlink{{2.8. Subdomains Again}}{ugTypesSubdomainsPage} - \menudownlink{{2.9. Package Calling and Target Types}}{ugTypesPkgCallPage} + \menudownlink{{2.9. Package Calling and Target Types}} +{ugTypesPkgCallPage} \menudownlink{{2.10. Resolving Types}}{ugTypesResolvePage} - \menudownlink{{2.11. Exposing Domains and Packages}}{ugTypesExposePage} + \menudownlink{{2.11. Exposing Domains and Packages}} +{ugTypesExposePage} \menudownlink{{2.12. Commands for Snooping}}{ugAvailSnoopPage} \endmenu \endscroll @@ -27416,20 +24842,8 @@ modes internally to resolve ambiguities. \end{page} @ -<>= -\newcommand{\ugTypesBasicTitle}{The Basic Idea} -\newcommand{\ugTypesBasicNumber}{2.1.} - -@ -\section{The Basic Idea} -\label{ugTypesBasicPage} -\begin{itemize} -\item ugTypesBasicDomainConsPage \ref{ugTypesBasicDomainConsPage} on -page~\pageref{ugTypesBasicDomainConsPage} -\end{itemize} -\index{pages!ugTypesBasicPage!ug02.ht} -\index{ug02.ht!pages!ugTypesBasicPage} -\index{ugTypesBasicPage!ug02.ht!pages} +\pagehead{ugTypesBasicPage}{ug02.ht}{The Basic Idea} +\pageto{notitle}{ugTypesBasicDomainConsPage} <>= \begin{page}{ugTypesBasicPage}{2.1. The Basic Idea} \beginscroll @@ -27441,24 +24855,22 @@ objects such as points and graphic images. Functions are objects too. Axiom organizes objects using the notion of \spadglossSee{domain of -computation}{domain}, or simply \spadgloss{domain}. -Each domain denotes a class of objects. -The class of objects it denotes is usually given by the name of the -domain: \axiomType{Integer} for the integers, \axiomType{Float} for -floating-point numbers, and so on. -The convention is that the first letter of a domain name is capitalized. -Similarly, the domain \axiomType{Polynomial(Integer)} denotes ``polynomials -with integer coefficients.'' -Also, \axiomType{Matrix(Float)} denotes ``matrices with floating-point +computation}{domain}, or simply \spadgloss{domain}. Each domain +denotes a class of objects. The class of objects it denotes is +usually given by the name of the domain: \axiomType{Integer} for the +integers, \axiomType{Float} for floating-point numbers, and so on. +The convention is that the first letter of a domain name is +capitalized. Similarly, the domain \axiomType{Polynomial(Integer)} +denotes ``polynomials with integer coefficients.'' Also, +\axiomType{Matrix(Float)} denotes ``matrices with floating-point entries.'' -Every basic Axiom object belongs to a unique domain. -The integer \axiom{3} belongs to the domain \axiomType{Integer} and -the polynomial \axiom{x + 3} belongs to the domain -\axiomType{Polynomial(Integer)}. -The domain of an object is also called its \spadgloss{type}. -Thus we speak of ``the type \axiomType{Integer}'' -and ``the type \axiomType{Polynomial(Integer)}.'' +Every basic Axiom object belongs to a unique domain. The integer +\axiom{3} belongs to the domain \axiomType{Integer} and the polynomial +\axiom{x + 3} belongs to the domain \axiomType{Polynomial(Integer)}. +The domain of an object is also called its \spadgloss{type}. Thus we +speak of ``the type \axiomType{Integer}'' and ``the type +\axiomType{Polynomial(Integer)}.'' \xtc{ After an Axiom computation, the type is displayed toward the @@ -27488,40 +24900,34 @@ simpler type if it is necessary. \spadpaste{factorial(\%) \free{three}} } \xtc{ -When you issue a positive number, the type \axiomType{PositiveInteger} is -printed. -Surely, \axiom{3} also has type \axiomType{Integer}! -The curious reader may now have two questions. -First, is the type of an object not unique? -Second, how is \axiomType{PositiveInteger} related to \axiomType{Integer}? -Read on! +When you issue a positive number, the type \axiomType{PositiveInteger} +is printed. Surely, \axiom{3} also has type \axiomType{Integer}! The +curious reader may now have two questions. First, is the type of an +object not unique? Second, how is \axiomType{PositiveInteger} related +to \axiomType{Integer}? Read on! }{ \spadpaste{3} } Any domain can be refined to a \spadgloss{subdomain} by a membership -\spadgloss{predicate}.\footnote{A predicate is a function that, -when applied to an object of the domain, returns either -\axiom{true} or \axiom{false}.} -For example, the domain \axiomType{Integer} can be refined to the -subdomain \axiomType{PositiveInteger}, the set of integers -\axiom{x} such that \axiom{x > 0}, by giving the Axiom -predicate \axiom{x +-> x > 0}. -Similarly, Axiom can define subdomains such as ``the -subdomain of diagonal matrices,'' ``the subdomain of lists of length -two,'' ``the subdomain of monic irreducible polynomials in -\axiom{x},'' and so on. -Trivially, any domain is a subdomain of itself. +\spadgloss{predicate}.\footnote{A predicate is a function that, when +applied to an object of the domain, returns either \axiom{true} or +\axiom{false}.} For example, the domain \axiomType{Integer} can be +refined to the subdomain \axiomType{PositiveInteger}, the set of +integers \axiom{x} such that \axiom{x > 0}, by giving the Axiom +predicate \axiom{x +-> x > 0}. Similarly, Axiom can define subdomains +such as ``the subdomain of diagonal matrices,'' ``the subdomain of +lists of length two,'' ``the subdomain of monic irreducible +polynomials in \axiom{x},'' and so on. Trivially, any domain is a +subdomain of itself. While an object belongs to a unique domain, it can belong to any -number of subdomains. -Any subdomain of the domain of an object can be used as the -{\it type} of that object. -The type of \axiom{3} is indeed both \axiomType{Integer} and -\axiomType{PositiveInteger} as well as any other subdomain of -integer whose predicate is satisfied, such as ``the prime -integers,'' ``the odd positive integers between 3 and 17,'' and so -on. +number of subdomains. Any subdomain of the domain of an object can be +used as the {\it type} of that object. The type of \axiom{3} is +indeed both \axiomType{Integer} and \axiomType{PositiveInteger} as +well as any other subdomain of integer whose predicate is satisfied, +such as ``the prime integers,'' ``the odd positive integers between 3 +and 17,'' and so on. \beginmenu \menudownlink{{2.1.1. Domain Constructors}}{ugTypesBasicDomainConsPage} @@ -27531,95 +24937,70 @@ on. \end{page} @ -<>= -\newcommand{\ugTypesBasicDomainConsTitle}{Domain Constructors} -\newcommand{\ugTypesBasicDomainConsNumber}{2.1.1.} - -@ -\section{Domain Constructors} -\label{ugTypesBasicDomainConsPage} -\begin{itemize} -\item ugCategoriesPage \ref{ugCategoriesPage} on -page~\pageref{ugCategoriesPage} -\item ugTypesConvertPage \ref{ugTypesConvertPage} on -page~\pageref{ugTypesConvertPage} -\end{itemize} -\index{pages!ugTypesBasicDomainConsPage!ug02.ht} -\index{ug02.ht!pages!ugTypesBasicDomainConsPage} -\index{ugTypesBasicDomainConsPage!ug02.ht!pages} +\pagehead{ugTypesBasicDomainConsPage}{ug02.ht}{Domain Constructors} +\pageto{notitle}{ugCategoriesPage} +\pageto{notitle}{ugTypesConvertPage} <>= \begin{page}{ugTypesBasicDomainConsPage}{2.1.1. Domain Constructors} \beginscroll -In Axiom, domains are objects. -You can create them, pass them to functions, and, as we'll see later, test -them for certain properties. +In Axiom, domains are objects. You can create them, pass them to +functions, and, as we'll see later, test them for certain properties. In Axiom, you ask for a value of a function by applying its name to a set of arguments. \xtc{ -To ask for ``the factorial of 7'' you enter this expression to -Axiom. -This applies the function \axiom{factorial} to the value \axiom{7} -to compute the result. +To ask for ``the factorial of 7'' you enter this expression to Axiom. +This applies the function \axiom{factorial} to the value \axiom{7} to +compute the result. }{ \spadpaste{factorial(7)} } \xtc{ Enter the type \axiomType{Polynomial (Integer)} as an expression to -Axiom. -This looks much like a function call as well. -It is! -The result is appropriately stated to be of type -\axiomType{Domain}, which +Axiom. This looks much like a function call as well. It is! The +result is appropriately stated to be of type \axiomType{Domain}, which according to our usual convention, denotes the class of all domains. }{ \spadpaste{Polynomial(Integer)} } The most basic operation involving domains is that of building a new -domain from a given one. -To create the domain of ``polynomials over the integers,'' Axiom -applies the function \axiomType{Polynomial} to the domain -\axiomType{Integer}. -A function like \axiomType{Polynomial} is called a \spadgloss{domain -constructor} or, -more simply, a -\spadgloss{constructor}. -A domain constructor is a function that creates a domain. -An argument to a domain constructor can be another domain or, in general, -an arbitrary kind of object. +domain from a given one. To create the domain of ``polynomials over +the integers,'' Axiom applies the function \axiomType{Polynomial} to +the domain \axiomType{Integer}. A function like +\axiomType{Polynomial} is called a \spadgloss{domain constructor} or, +more simply, a \spadgloss{constructor}. A domain constructor is a +function that creates a domain. An argument to a domain constructor +can be another domain or, in general, an arbitrary kind of object. \axiomType{Polynomial} takes a single domain argument while -\axiomType{SquareMatrix} takes a positive integer as an argument -to give its dimension and -a domain argument to give the type of its components. +\axiomType{SquareMatrix} takes a positive integer as an argument to +give its dimension and a domain argument to give the type of its +components. What kinds of domains can you use as the argument to \axiomType{Polynomial} or \axiomType{SquareMatrix} or -\axiomType{List}? -Well, the first two are mathematical in nature. -You want to be able to perform algebraic operations like -\axiomOp{+} and \axiomOp{*} on polynomials and square matrices, -and operations such as \axiomFun{determinant} on square matrices. -So you want to allow polynomials of integers {\it and} polynomials -of square matrices with complex number coefficients and, in -general, anything that ``makes sense.'' At the same time, you -don't want Axiom to be able to build nonsense domains such -as ``polynomials of strings!'' - -In contrast to algebraic structures, data structures can hold any -kind of object. -Operations on lists such as \axiomFunFrom{insert}{List}, +\axiomType{List}? Well, the first two are mathematical in nature. +You want to be able to perform algebraic operations like \axiomOp{+} +and \axiomOp{*} on polynomials and square matrices, and operations +such as \axiomFun{determinant} on square matrices. So you want to +allow polynomials of integers {\it and} polynomials of square matrices +with complex number coefficients and, in general, anything that +``makes sense.'' At the same time, you don't want Axiom to be able to +build nonsense domains such as ``polynomials of strings!'' + +In contrast to algebraic structures, data structures can hold any kind +of object. Operations on lists such as \axiomFunFrom{insert}{List}, \axiomFunFrom{delete}{List}, and \axiomFunFrom{concat}{List} just manipulate the list itself without changing or operating on its -elements. -Thus you can build \axiomType{List} over almost any datatype, -including itself. +elements. Thus you can build \axiomType{List} over almost any +datatype, including itself. \xtc{ Create a complicated algebraic domain. }{ -\spadpaste{List (List (Matrix (Polynomial (Complex (Fraction (Integer))))))} +\spadpaste{ +List (List (Matrix (Polynomial (Complex (Fraction (Integer))))))} } \xtc{ Try to create a meaningless domain. @@ -27633,33 +25014,31 @@ As domains are objects, they too have a domain. The domain of a domain is a category. A category is simply a type whose members are domains. -A common algebraic category is \axiomType{Ring}, the class of all domains -that are ``rings.'' -A ring is an algebraic structure with constants \axiom{0} and \axiom{1} and -operations \axiomOpFrom{+}{Ring}, \axiomOpFrom{-}{Ring}, and -\axiomOpFrom{*}{Ring}. -These operations are assumed ``closed'' with respect to the domain, -meaning that they take two objects of the domain and produce a result -object also in the domain. -The operations are understood to satisfy certain ``axioms,'' certain -mathematical principles providing the algebraic foundation for rings. -For example, the {\it additive inverse axiom} for rings states: -\centerline{{Every element \axiom{x} has an additive inverse \axiom{y} such}} -\centerline{{that \axiom{x + y = 0}.}} -The prototypical example of a domain that is a ring is the integers. -Keep them in mind whenever we mention \axiomType{Ring}. +A common algebraic category is \axiomType{Ring}, the class of all +domains that are ``rings.'' A ring is an algebraic structure with +constants \axiom{0} and \axiom{1} and operations +\axiomOpFrom{+}{Ring}, \axiomOpFrom{-}{Ring}, and +\axiomOpFrom{*}{Ring}. These operations are assumed ``closed'' with +respect to the domain, meaning that they take two objects of the +domain and produce a result object also in the domain. The operations +are understood to satisfy certain ``axioms,'' certain mathematical +principles providing the algebraic foundation for rings. For example, +the {\it additive inverse axiom} for rings states: \centerline{{Every +element \axiom{x} has an additive inverse \axiom{y} such}} +\centerline{{that \axiom{x + y = 0}.}} The prototypical example of a +domain that is a ring is the integers. Keep them in mind whenever we +mention \axiomType{Ring}. Many algebraic domain constructors such as \axiomType{Complex}, -\axiomType{Polynomial}, \axiomType{Fraction}, take rings as -arguments and return rings as values. -You can use the infix operator ``\axiom{has}'' -\spadkey{has} -to ask a domain if it belongs to a particular category. +\axiomType{Polynomial}, \axiomType{Fraction}, take rings as arguments +and return rings as values. You can use the infix operator +``\axiom{has}'' \spadkey{has} to ask a domain if it belongs to a +particular category. \xtc{ -All numerical types are rings. -Domain constructor \axiomType{Polynomial} builds ``the ring of polynomials -over any other ring.'' +All numerical types are rings. Domain constructor +\axiomType{Polynomial} builds ``the ring of polynomials over any other +ring.'' }{ \spadpaste{Polynomial(Integer) has Ring} } @@ -27669,10 +25048,10 @@ Constructor \axiomType{List} never produces a ring. \spadpaste{List(Integer) has Ring} } \xtc{ -The constructor \axiomType{Matrix(R)} builds ``the domain of all matrices -over the ring \axiom{R}.'' This domain is never a ring since the operations -\axiomSyntax{+}, \axiomSyntax{-}, and \axiomSyntax{*} on matrices of arbitrary -shapes are undefined. +The constructor \axiomType{Matrix(R)} builds ``the domain of all +matrices over the ring \axiom{R}.'' This domain is never a ring since +the operations \axiomSyntax{+}, \axiomSyntax{-}, and \axiomSyntax{*} +on matrices of arbitrary shapes are undefined. }{ \spadpaste{Matrix(Integer) has Ring} } @@ -27690,24 +25069,23 @@ For any positive integer \axiom{n}, it builds ``the ring of \axiom{n} by } Another common category is \axiomType{Field}, the class of all fields. -A field is a ring with additional operations. -For example, a field has commutative multiplication and -a closed operation \axiomOpFrom{/}{Field} for the -division of two elements. -\axiomType{Integer} is not a field since, for example, \axiom{3/2} does not -have an integer result. -The prototypical example of a field is the rational numbers, that is, the -domain \axiomType{Fraction(Integer)}. -In general, the constructor \axiomType{Fraction} takes a ring as an -argument and returns a field.\footnote{Actually, -the argument domain must have some additional -properties so as to belong to category \axiomType{IntegralDomain}.} -Other domain constructors, such as \axiomType{Complex}, build fields only if -their argument domain is a field. - -\xtc{ -The complex integers (often called the ``Gaussian integers'') do not form -a field. +A field is a ring with additional operations. For example, a field +has commutative multiplication and a closed operation +\axiomOpFrom{/}{Field} for the division of two elements. +\axiomType{Integer} is not a field since, for example, \axiom{3/2} +does not have an integer result. The prototypical example of a field +is the rational numbers, that is, the domain +\axiomType{Fraction(Integer)}. In general, the constructor +\axiomType{Fraction} takes a ring as an argument and returns a +field.\footnote{Actually, the argument domain must have some +additional properties so as to belong to category +\axiomType{IntegralDomain}.} Other domain constructors, such as +\axiomType{Complex}, build fields only if their argument domain is a +field. + +\xtc{ +The complex integers (often called the ``Gaussian integers'') do not +form a field. }{ \spadpaste{Complex(Integer) has Field} } @@ -27717,22 +25095,21 @@ But fractions of complex integers do. \spadpaste{Fraction(Complex(Integer)) has Field} } \xtc{ -The algebraically equivalent domain of complex rational numbers is a field -since domain constructor \axiomType{Complex} produces a field whenever its -argument is a field. +The algebraically equivalent domain of complex rational numbers is a +field since domain constructor \axiomType{Complex} produces a field +whenever its argument is a field. }{ \spadpaste{Complex(Fraction(Integer)) has Field} } -The most basic category is \axiomType{Type}. -It denotes the class of all domains and -subdomains.\footnote{\axiomType{Type} does not denote the class of -all types. -The type of all categories is \axiomType{Category}. -The type of \axiomType{Type} itself is undefined.} -Domain constructor \axiomType{List} is able to build ``lists of -elements from domain \axiom{D}'' for arbitrary \axiom{D} simply by -requiring that \axiom{D} belong to category \axiomType{Type}. +The most basic category is \axiomType{Type}. It denotes the class of +all domains and subdomains.\footnote{\axiomType{Type} does not denote +the class of all types. The type of all categories is +\axiomType{Category}. The type of \axiomType{Type} itself is +undefined.} Domain constructor \axiomType{List} is able to build +``lists of elements from domain \axiom{D}'' for arbitrary \axiom{D} +simply by requiring that \axiom{D} belong to category +\axiomType{Type}. Now, you may ask, what exactly is a category? Like domains, categories can be defined in the Axiom language. @@ -27749,37 +25126,35 @@ the domains of this class support \enditems \indent{0} % -This last component is a new idea. -And it is key to the design of Axiom! -Because categories can extend one another, they form hierarchies. -\texht{Detailed charts showing the category hierarchies in Axiom are -displayed in the endpages of this book. -There you see that all categories are extensions of \axiomType{Type} and that + +This last component is a new idea. And it is key to the design of +Axiom! Because categories can extend one another, they form +hierarchies. \texht{Detailed charts showing the category hierarchies +in Axiom are displayed in the endpages of this book. There you see +that all categories are extensions of \axiomType{Type} and that \axiomType{Field} is an extension of \axiomType{Ring}.}{} The operations supported by the domains of a category are called the \spadglossSee{exports}{export} of that category because these are the -operations made available for system-wide use. -The exports of a domain of a given category are not only the ones -explicitly mentioned by the category. -Since a category extends other categories, the operations of these other -categories---and all categories these other categories extend---are also -exported by the domains. - -For example, polynomial domains belong to \axiomType{PolynomialCategory}. -This category explicitly mentions some twenty-nine -operations on polynomials, but it -extends eleven other categories (including \axiomType{Ring}). -As a result, the current system has over one hundred operations on polynomials. - -If a domain belongs to a category that extends, say, \axiomType{Ring}, it -is convenient to say that the domain exports \axiomType{Ring}. -The name of the category thus provides a convenient shorthand for the list -of operations exported by the category. -Rather than listing operations such as \axiomOpFrom{+}{Ring} and -\axiomOpFrom{*}{Ring} of \axiomType{Ring} each time they are needed, the -definition of a type simply asserts that it exports category -\axiomType{Ring}. +operations made available for system-wide use. The exports of a +domain of a given category are not only the ones explicitly mentioned +by the category. Since a category extends other categories, the +operations of these other categories---and all categories these other +categories extend---are also exported by the domains. + +For example, polynomial domains belong to +\axiomType{PolynomialCategory}. This category explicitly mentions +some twenty-nine operations on polynomials, but it extends eleven +other categories (including \axiomType{Ring}). As a result, the +current system has over one hundred operations on polynomials. + +If a domain belongs to a category that extends, say, \axiomType{Ring}, +it is convenient to say that the domain exports \axiomType{Ring}. The +name of the category thus provides a convenient shorthand for the list +of operations exported by the category. Rather than listing +operations such as \axiomOpFrom{+}{Ring} and \axiomOpFrom{*}{Ring} of +\axiomType{Ring} each time they are needed, the definition of a type +simply asserts that it exports category \axiomType{Ring}. The category name, however, is more than a shorthand. The name \axiomType{Ring}, in fact, implies that the operations exported by @@ -27788,26 +25163,21 @@ rings are required to satisfy a set of ``axioms'' associated with the name but important feature distinguishes Axiom from other abstract datatype designs.} -Why is it not correct to assume that some type is a ring if it exports all -of the operations of \axiomType{Ring}? -Here is why. -Some languages such as {\bf APL} -denote the \axiomType{Boolean} constants \axiom{true} and -\axiom{false} by the integers \axiom{1} and \axiom{0} +Why is it not correct to assume that some type is a ring if it exports +all of the operations of \axiomType{Ring}? Here is why. Some +languages such as {\bf APL} denote the \axiomType{Boolean} constants +\axiom{true} and \axiom{false} by the integers \axiom{1} and \axiom{0} respectively, then use \axiomOp{+} and \axiomOp{*} to denote the -logical operators \axiomFun{or} and \axiomFun{and}. -But with these definitions -\axiomType{Boolean} is not a ring since the additive inverse -axiom is violated.\footnote{There is no inverse element \axiom{a} -such that \axiom{1 + a = 0}, or, in the usual terms: \axiom{true -or a = false}.} -This alternative definition of \axiomType{Boolean} can be easily -and correctly implemented in Axiom, since -\axiomType{Boolean} simply does not assert that it is of category -\axiomType{Ring}. -This prevents the system from building meaningless domains such as -\axiomType{Polynomial(Boolean)} and then wrongfully applying -algorithms that presume that the ring axioms hold. +logical operators \axiomFun{or} and \axiomFun{and}. But with these +definitions \axiomType{Boolean} is not a ring since the additive +inverse axiom is violated.\footnote{There is no inverse element +\axiom{a} such that \axiom{1 + a = 0}, or, in the usual terms: +\axiom{true or a = false}.} This alternative definition of +\axiomType{Boolean} can be easily and correctly implemented in Axiom, +since \axiomType{Boolean} simply does not assert that it is of +category \axiomType{Ring}. This prevents the system from building +meaningless domains such as \axiomType{Polynomial(Boolean)} and then +wrongfully applying algorithms that presume that the ring axioms hold. Enough on categories. To learn more about them, see @@ -27815,56 +25185,48 @@ Enough on categories. To learn more about them, see in Chapter \ugCategoriesNumber\ignore{ugCategories}. We now return to our discussion of domains. -Domains \spadgloss{export} a set of operations to make them -available for system-wide use. -\axiomType{Integer}, for example, exports the operations -\axiomOpFrom{+}{Integer} and \axiomOpFrom{=}{Integer} given by -the \spadglossSee{signatures}{signature} -\axiomOpFrom{+}{Integer}: \spadsig{(Integer,Integer)}{Integer} and -\axiomOpFrom{=}{Integer}: \spadsig{(Integer,Integer)}{Boolean}, -respectively. -Each of these operations takes two \axiomType{Integer} arguments. -The \axiomOpFrom{+}{Integer} operation also returns an \axiomType{Integer} but -\axiomOpFrom{=}{Integer} returns a \axiomType{Boolean}: \axiom{true} or -\axiom{false}. -The operations exported by a domain usually manipulate objects of -the domain---but not always. - -The operations of a domain may actually take as arguments, and return as -values, objects from any domain. -For example, \axiomType{Fraction (Integer)} exports the operations -\axiomOpFrom{/}{Fraction}: \spadsig{(Integer,Integer)}{Fraction(Integer)} -and \axiomFunFrom{characteristic}{Fraction}: +Domains \spadgloss{export} a set of operations to make them available +for system-wide use. \axiomType{Integer}, for example, exports the +operations \axiomOpFrom{+}{Integer} and \axiomOpFrom{=}{Integer} given +by the \spadglossSee{signatures}{signature} \axiomOpFrom{+}{Integer}: +\spadsig{(Integer,Integer)}{Integer} and \axiomOpFrom{=}{Integer}: +\spadsig{(Integer,Integer)}{Boolean}, respectively. Each of these +operations takes two \axiomType{Integer} arguments. The +\axiomOpFrom{+}{Integer} operation also returns an \axiomType{Integer} +but \axiomOpFrom{=}{Integer} returns a \axiomType{Boolean}: +\axiom{true} or \axiom{false}. The operations exported by a domain +usually manipulate objects of the domain---but not always. + +The operations of a domain may actually take as arguments, and return +as values, objects from any domain. For example, \axiomType{Fraction +(Integer)} exports the operations \axiomOpFrom{/}{Fraction}: +\spadsig{(Integer,Integer)}{Fraction(Integer)} and +\axiomFunFrom{characteristic}{Fraction}: \spadsig{}{NonNegativeInteger}. -Suppose all operations of a domain take as arguments and return -as values, only objects from {\it other} domains. -This kind of domain -is what Axiom calls a \spadgloss{package}. - -A package does not designate a class of objects at all. -Rather, a package is just a collection of operations. -Actually the bulk of the Axiom library of algorithms consists -of packages. -The facilities for factorization; integration; solution of linear, -polynomial, and differential equations; computation of limits; and so -on, are all defined in packages. -Domains needed by algorithms can be passed to a package as arguments or -used by name if they are not ``variable.'' -Packages are useful for defining operations that convert objects of one -type to another, particularly when these types have different -parameterizations. -As an example, the package \axiomType{PolynomialFunction2(R,S)} defines -operations that convert polynomials over a domain \axiom{R} to polynomials -over \axiom{S}. -To convert an object from \axiomType{Polynomial(Integer)} to +Suppose all operations of a domain take as arguments and return as +values, only objects from {\it other} domains. This kind of domain is +what Axiom calls a \spadgloss{package}. + +A package does not designate a class of objects at all. Rather, a +package is just a collection of operations. Actually the bulk of the +Axiom library of algorithms consists of packages. The facilities for +factorization; integration; solution of linear, polynomial, and +differential equations; computation of limits; and so on, are all +defined in packages. Domains needed by algorithms can be passed to a +package as arguments or used by name if they are not ``variable.'' +Packages are useful for defining operations that convert objects of +one type to another, particularly when these types have different +parameterizations. As an example, the package +\axiomType{PolynomialFunction2(R,S)} defines operations that convert +polynomials over a domain \axiom{R} to polynomials over \axiom{S}. To +convert an object from \axiomType{Polynomial(Integer)} to \axiomType{Polynomial(Float)}, Axiom builds the package \axiomType{PolynomialFunctions2(Integer,Float)} in order to create the -required conversion function. -(This happens ``behind the scenes'' for you: see -\downlink{``\ugTypesConvertTitle''}{ugTypesConvertPage} -in Section \ugTypesConvertNumber\ignore{ugTypesConvert} -for details on how to convert objects.) +required conversion function. (This happens ``behind the scenes'' for +you: see \downlink{``\ugTypesConvertTitle''}{ugTypesConvertPage} in +Section \ugTypesConvertNumber\ignore{ugTypesConvert} for details on +how to convert objects.) Axiom categories, domains and packages and all their contained functions are written in the Axiom programming language and have @@ -27878,52 +25240,30 @@ their functions and how to write your own functions. \end{page} @ -<>= -\newcommand{\ugTypesWritingTitle}{Writing Types and Modes} -\newcommand{\ugTypesWritingNumber}{2.2.} - -@ -\section{Writing Types and Modes} -\label{ugTypesWritingPage} -\begin{itemize} -\item ugTypesBasicPage \ref{ugTypesBasicPage} on -page~\pageref{ugTypesBasicPage} -\item ugTypesDeclarePage \ref{ugTypesDeclarePage} on -page~\pageref{ugTypesDeclarePage} -\item ugTypesConvertPage \ref{ugTypesConvertPage} on -page~\pageref{ugTypesConvertPage} -\item ugTypesPkgCallPage \ref{ugTypesPkgCallPage} on -page~\pageref{ugTypesPkgCallPage} -\item ugTypesWritingZeroPage \ref{ugTypesWritingZeroPage} on -page~\pageref{ugTypesWritingZeroPage} -\item ugTypesWritingOnePage \ref{ugTypesWritingOnePage} on -page~\pageref{ugTypesWritingOnePage} -\item ugTypesWritingMorePage \ref{ugTypesWritingMorePage} on -page~\pageref{ugTypesWritingMorePage} -\item ugTypesWritingModesPage \ref{ugTypesWritingModesPage} on -page~\pageref{ugTypesWritingModesPage} -\item ugTypesWritingAbbrPage \ref{ugTypesWritingAbbrPage} on -page~\pageref{ugTypesWritingAbbrPage} -\end{itemize} -\index{pages!ugTypesWritingPage!ug02.ht} -\index{ug02.ht!pages!ugTypesWritingPage} -\index{ugTypesWritingPage!ug02.ht!pages} +\pagehead{ugTypesWritingPage}{ug02.ht}{Writing Types and Modes} +\pageto{notitle}{ugTypesBasicPage} +\pageto{notitle}{ugTypesDeclarePage} +\pageto{notitle}{ugTypesConvertPage} +\pageto{notitle}{ugTypesPkgCallPage} +\pageto{notitle}{ugTypesWritingZeroPage} +\pageto{notitle}{ugTypesWritingOnePage} +\pageto{notitle}{ugTypesWritingMorePage} +\pageto{notitle}{ugTypesWritingModesPage} +\pageto{notitle}{ugTypesWritingAbbrPage} <>= \begin{page}{ugTypesWritingPage}{2.2. Writing Types and Modes} \beginscroll % We have already seen in \texht{the last -section}{\downlink{``\ugTypesBasicTitle''}{ugTypesBasicPage} -in Section \ugTypesBasicNumber\ignore{ugTypesBasic}} several examples of types. -Most of these examples had either no arguments (for example, +section}{\downlink{``\ugTypesBasicTitle''}{ugTypesBasicPage} in +Section \ugTypesBasicNumber\ignore{ugTypesBasic}} several examples of +types. Most of these examples had either no arguments (for example, \axiomType{Integer}) or one argument (for example, -\axiomType{Polynomial (Integer)}). -In this section we give details about writing arbitrary types. -We then define \spadglossSee{modes}{mode} and discuss how to write -them. -We conclude the section with a discussion on constructor -abbreviations. +\axiomType{Polynomial (Integer)}). In this section we give details +about writing arbitrary types. We then define +\spadglossSee{modes}{mode} and discuss how to write them. We conclude +the section with a discussion on constructor abbreviations. \xtc{ When might you need to write a type or mode? @@ -27970,16 +25310,7 @@ in Section \ugTypesPkgCallNumber\ignore{ugTypesPkgCall}). \end{page} @ -<>= -\newcommand{\ugTypesWritingZeroTitle}{Types with No Arguments} -\newcommand{\ugTypesWritingZeroNumber}{2.2.1.} - -@ -\section{Types with No Arguments} -\label{ugTypesWritingZeroPage} -\index{pages!ugTypesWritingZeroPage!ug02.ht} -\index{ug02.ht!pages!ugTypesWritingZeroPage} -\index{ugTypesWritingZeroPage!ug02.ht!pages} +\pagehead{ugTypesWritingZeroPage}{ug02.ht}{Types with No Arguments} <>= \begin{page}{ugTypesWritingZeroPage}{2.2.1. Types with No Arguments} \beginscroll @@ -27989,16 +25320,24 @@ with or without trailing opening and closing parentheses (\axiomSyntax{()}). \texht{ \centerline{{\begin{tabular}{ccc}}} -\centerline{{\axiomType{Boolean()} is the same as \axiomType{Boolean} & \quad &}} -\centerline{{\axiomType{Integer()} is the same as \axiomType{Integer} }} -\centerline{{\axiomType{String()} is the same as \axiomType{String} & \quad &}} -\centerline{{\axiomType{Void()} is the same as \axiomType{Void} }} +\centerline{{\axiomType{Boolean()} +is the same as \axiomType{Boolean} & \quad &}} +\centerline{{\axiomType{Integer()} +is the same as \axiomType{Integer} }} +\centerline{{\axiomType{String()} +is the same as \axiomType{String} & \quad &}} +\centerline{{\axiomType{Void()} +is the same as \axiomType{Void} }} \centerline{{\end{tabular}}} }{ -\centerline{{\axiomType{Boolean()} is the same as \axiomType{Boolean} }} -\centerline{{\axiomType{Integer()} is the same as \axiomType{Integer} }} -\centerline{{\axiomType{String()} is the same as \axiomType{String} }} -\centerline{{\axiomType{Void()} is the same as \axiomType{Void} }} +\centerline{{\axiomType{Boolean()} +is the same as \axiomType{Boolean} }} +\centerline{{\axiomType{Integer()} +is the same as \axiomType{Integer} }} +\centerline{{\axiomType{String()} +is the same as \axiomType{String} }} +\centerline{{\axiomType{Void()} +is the same as \axiomType{Void} }} and so on. } It is customary to omit the parentheses. @@ -28008,36 +25347,21 @@ It is customary to omit the parentheses. \end{page} @ -<>= -\newcommand{\ugTypesWritingOneTitle}{Types with One Argument} -\newcommand{\ugTypesWritingOneNumber}{2.2.2.} - -@ -\section{Types with One Argument} -\label{ugTypesWritingOnePage} -\begin{itemize} -\item ugTypesPkgCallPage \ref{ugTypesPkgCallPage} on -page~\pageref{ugTypesPkgCallPage} -\end{itemize} -\index{pages!ugTypesWritingOnePage!ug02.ht} -\index{ug02.ht!pages!ugTypesWritingOnePage} -\index{ugTypesWritingOnePage!ug02.ht!pages} +\pagehead{ugTypesWritingOnePage}{ug02.ht}{Types with One Argument} +\pageto{notitle}{ugTypesPkgCallPage} <>= \begin{page}{ugTypesWritingOnePage}{2.2.2. Types with One Argument} \beginscroll -A constructor with one argument can frequently be -written with no -parentheses. -Types nest from right to left so that \axiomType{Complex Fraction -Polynomial Integer} is the same as -\axiomType{Complex (Fraction (Polynomial (Integer)))}. -You need to use parentheses to force the application of a constructor -to the correct argument, but you need not use any more than is -necessary to remove ambiguities. +A constructor with one argument can frequently be written with no +parentheses. Types nest from right to left so that \axiomType{Complex +Fraction Polynomial Integer} is the same as \axiomType{Complex +(Fraction (Polynomial (Integer)))}. You need to use parentheses to +force the application of a constructor to the correct argument, but +you need not use any more than is necessary to remove ambiguities. -Here are some guidelines for using parentheses (they are possibly slightly -more restrictive than they need to be). +Here are some guidelines for using parentheses (they are possibly +slightly more restrictive than they need to be). \xtc{ If the argument is an expression like \axiom{2 + 3} then you must enclose the argument in parentheses. @@ -28087,18 +25411,11 @@ then the parentheses can usually be omitted. \end{page} @ +\pagehead{ugTypesWritingMorePage}{ug02.ht} +{Types with More Than One Argument} <>= -\newcommand{\ugTypesWritingMoreTitle}{Types with More Than One Argument} -\newcommand{\ugTypesWritingMoreNumber}{2.2.3.} - -@ -\section{Types with More Than One Argument} -\label{ugTypesWritingMorePage} -\index{pages!ugTypesWritingMorePage!ug02.ht} -\index{ug02.ht!pages!ugTypesWritingMorePage} -\index{ugTypesWritingMorePage!ug02.ht!pages} -<>= -\begin{page}{ugTypesWritingMorePage}{2.2.3. Types with More Than One Argument} +\begin{page}{ugTypesWritingMorePage} +{2.2.3. Types with More Than One Argument} \beginscroll If a constructor @@ -28115,22 +25432,9 @@ Some examples are \end{page} @ -<>= -\newcommand{\ugTypesWritingModesTitle}{Modes} -\newcommand{\ugTypesWritingModesNumber}{2.2.4.} - -@ -\section{Modes} -\label{ugTypesWritingModesPage} -\begin{itemize} -\item ugTypesDeclarePage \ref{ugTypesDeclarePage} on -page~\pageref{ugTypesDeclarePage} -\item ugTypesConvertPage \ref{ugTypesConvertPage} on -page~\pageref{ugTypesConvertPage} -\end{itemize} -\index{pages!ugTypesWritingModesPage!ug02.ht} -\index{ug02.ht!pages!ugTypesWritingModesPage} -\index{ugTypesWritingModesPage!ug02.ht!pages} +\pagehead{ugTypesWritingModesPage}{ug02.ht}{Modes} +\pageto{notitle}{ugTypesDeclarePage} +\pageto{notitle}{ugTypesConvertPage} <>= \begin{page}{ugTypesWritingModesPage}{2.2.4. Modes} \beginscroll @@ -28156,18 +25460,17 @@ For example, the following are all modes. \centerline{{\axiomType{Integer} }} \centerline{{\axiomType{OneDimensionalArray(Float)}}} } -As is evident from these examples, a mode is a type with a -part that is not specified (indicated by a question mark). -Only one \axiomSyntax{?} is allowed per mode and it must appear in the -most deeply nested argument that is a type. Thus -\nonLibAxiomType{?(Integer)}, -\nonLibAxiomType{Matrix(? (Polynomial))}, -\nonLibAxiomType{SquareMatrix(?, Integer)} and -\nonLibAxiomType{SquareMatrix(?, ?)} are all invalid. -The question mark must take the place of a domain, not data (for example, -the integer that is the dimension of a square matrix). -This rules out, for example, the two \axiomType{SquareMatrix} -expressions. + +As is evident from these examples, a mode is a type with a part that +is not specified (indicated by a question mark). Only one +\axiomSyntax{?} is allowed per mode and it must appear in the most +deeply nested argument that is a type. Thus +\nonLibAxiomType{?(Integer)}, \nonLibAxiomType{Matrix(? +(Polynomial))}, \nonLibAxiomType{SquareMatrix(?, Integer)} and +\nonLibAxiomType{SquareMatrix(?, ?)} are all invalid. The question +mark must take the place of a domain, not data (for example, the +integer that is the dimension of a square matrix). This rules out, +for example, the two \axiomType{SquareMatrix} expressions. Modes can be used for declarations (\downlink{``\ugTypesDeclareTitle''}{ugTypesDeclarePage} @@ -28183,29 +25486,15 @@ type information. \end{page} @ -<>= -\newcommand{\ugTypesWritingAbbrTitle}{Abbreviations} -\newcommand{\ugTypesWritingAbbrNumber}{2.2.5.} - -@ -\section{Abbreviations} -\label{ugTypesWritingAbbrPage} -\begin{itemize} -\item ugSysCmdwhatPage \ref{ugSysCmdwhatPage} on -page~\pageref{ugSysCmdwhatPage} -\end{itemize} -\index{pages!ugTypesWritingAbbrPage!ug02.ht} -\index{ug02.ht!pages!ugTypesWritingAbbrPage} -\index{ugTypesWritingAbbrPage!ug02.ht!pages} +\pagehead{ugTypesWritingAbbrPage}{ug02.ht}{Abbreviations} +\pageto{notitle}{ugSysCmdwhatPage} <>= \begin{page}{ugTypesWritingAbbrPage}{2.2.5. Abbreviations} \beginscroll -Every constructor has an abbreviation that -you can freely -substitute for the constructor name. -In some cases, the abbreviation is nothing more than the -capitalized version of the constructor name. +Every constructor has an abbreviation that you can freely substitute +for the constructor name. In some cases, the abbreviation is nothing +more than the capitalized version of the constructor name. \beginImportant Aside from allowing types to be written more concisely, @@ -28243,14 +25532,13 @@ same as \axiomType{Fraction Complex Integer} }} \centerline{{\axiomType{FRAC(COMPLEX(INT))} is the same as \axiomType{FRAC(Complex Integer)} }} -There are several ways of finding the names of constructors and -their abbreviations. -For a specific constructor, use \spadcmd{)abbreviation query}. -You can also use the \spadcmd{)what} system command to see the names -and abbreviations of constructors. -For more information about \spadcmd{)what}, see -\downlink{``\ugSysCmdwhatTitle''}{ugSysCmdwhatPage} -in Section \ugSysCmdwhatNumber\ignore{ugSysCmdwhat}. +There are several ways of finding the names of constructors and their +abbreviations. For a specific constructor, use \spadcmd{)abbreviation +query}. You can also use the \spadcmd{)what} system command to see +the names and abbreviations of constructors. For more information +about \spadcmd{)what}, see +\downlink{``\ugSysCmdwhatTitle''}{ugSysCmdwhatPage} in Section +\ugSysCmdwhatNumber\ignore{ugSysCmdwhat}. \xtc{ \spadcmd{)abbreviation query} can be abbreviated (no pun intended) to \spadcmd{)abb q}. @@ -28276,24 +25564,11 @@ Issue this to see all packages whose names contain the string ``ode''. \end{page} @ -<>= -\newcommand{\ugTypesDeclareTitle}{Declarations} -\newcommand{\ugTypesDeclareNumber}{2.3.} - -@ -\section{Declarations} -\label{ugTypesDeclarePage} -\begin{itemize} -\item ugLangAssignPage \ref{ugLangAssignPage} on -page~\pageref{ugLangAssignPage} -\item ugUserDeclarePage \ref{ugUserDeclarePage} on -page~\pageref{ugUserDeclarePage} -\item ugTypesConvertPageugIntroAssignPage \ref{ugTypesConvertPageugIntroAssignPage} on -page~\pageref{ugTypesConvertPageugIntroAssignPage} -\end{itemize} -\index{pages!ugTypesDeclarePage!ug02.ht} -\index{ug02.ht!pages!ugTypesDeclarePage} -\index{ugTypesDeclarePage!ug02.ht!pages} +\pagehead{ugTypesDeclarePage}{ug02.ht}{Declarations} +\pageto{notitle}{ugLangAssignPage} +\pageto{notitle}{ugUserDeclarePage} +\pageto{notitle}{ugTypesConvertPage} +\pageto{notitle}{ugIntroAssignPage} <>= \begin{page}{ugTypesDeclarePage}{2.3. Declarations} \beginscroll @@ -28304,10 +25579,11 @@ A colon (\axiomSyntax{:}) is always used after a variable or list of variables to be declared. \beginImportant -For a single variable, the syntax for declaration is -\centerline{{{\it variableName \axiom{:} typeOrMode}}} -For multiple variables, the syntax is -\centerline{{{\tt (\subscriptIt{variableName}{1}, \subscriptIt{variableName}{2}, \ldots \subscriptIt{variableName}{N}): {\it typeOrMode}}}} +For a single variable, the syntax for declaration is \centerline{{{\it +variableName \axiom{:} typeOrMode}}} For multiple variables, the +syntax is \centerline{{{\tt (\subscriptIt{variableName}{1}, +\subscriptIt{variableName}{2}, \ldots \subscriptIt{variableName}{N}): +{\it typeOrMode}}}} \endImportant You can always combine a declaration with an assignment. @@ -28392,7 +25668,8 @@ This is a complex object with polynomial real and imaginary parts. This is a polynomial with complex integer coefficients. The objects are convertible from one to the other. See \downlink{``\ugTypesConvertTitle''}{ugTypesConvertPage} -in Section \ugTypesConvertNumber\ignore{ugTypesConvert} for more information. +in Section \ugTypesConvertNumber\ignore{ugTypesConvert} for more +information. }{ \spadpaste{g : POLY COMPLEX ? := (x + y*\%i)**2} } @@ -28402,16 +25679,7 @@ in Section \ugTypesConvertNumber\ignore{ugTypesConvert} for more information. \end{page} @ -<>= -\newcommand{\ugTypesRecordsTitle}{Records} -\newcommand{\ugTypesRecordsNumber}{2.4.} - -@ -\section{Records} -\label{ugTypesRecordsPage} -\index{pages!ugTypesRecordsPage!ug02.ht} -\index{ug02.ht!pages!ugTypesRecordsPage} -\index{ugTypesRecordsPage!ug02.ht!pages} +\pagehead{ugTypesRecordsPage}{ug02.ht}{Records} <>= \begin{page}{ugTypesRecordsPage}{2.4. Records} \beginscroll @@ -28420,24 +25688,25 @@ A \pspadtype{Record} is an object composed of one or more other objects, each of which is referenced with a \spadgloss{selector}. -Components can all belong to the same type or each can have a different type. +Components can all belong to the same type or each can have a different +type. \beginImportant -The syntax for writing a \pspadtype{Record} type is -\centerline{{{\tt Record(\subscriptIt{selector}{1}:\subscriptIt{type}{1}, \subscriptIt{selector}{2}:\subscriptIt{type}{2}, \ldots, \subscriptIt{selector}{N}:\subscriptIt{type}{N})}}} -You must be careful if a selector has the same name as a variable in the -workspace. -If this occurs, precede the selector name by a single +The syntax for writing a \pspadtype{Record} type is \centerline{{{\tt +Record(\subscriptIt{selector}{1}:\subscriptIt{type}{1}, +\subscriptIt{selector}{2}:\subscriptIt{type}{2}, \ldots, +\subscriptIt{selector}{N}:\subscriptIt{type}{N})}}} You must be +careful if a selector has the same name as a variable in the +workspace. If this occurs, precede the selector name by a single quote. \endImportant -Record components are implicitly ordered. -All the components of a record can -be set at once by assigning the record a -bracketed \spadgloss{tuple} of values of the proper length -(for example, \axiom{r : Record(a: Integer, b: String) := [1, "two"]}). -To access a component of a record \axiom{r}, -write the name \axiom{r}, followed by a period, followed by a selector. +Record components are implicitly ordered. All the components of a +record can be set at once by assigning the record a bracketed +\spadgloss{tuple} of values of the proper length (for example, +\axiom{r : Record(a: Integer, b: String) := [1, "two"]}). To access a +component of a record \axiom{r}, write the name \axiom{r}, followed by +a period, followed by a selector. % \xtc{ @@ -28492,7 +25761,8 @@ has two components: a string, to be accessed via \axiom{name}, and an integer, to be accessed via \axiom{birthdayMonth}. }{ -\spadpaste{bd : Record(name : String, birthdayMonth : Integer) \bound{bddec}} +\spadpaste{bd : Record(name : String, birthdayMonth : Integer) +\bound{bddec}} } \xtc{ You must initially set the value of the entire \pspadtype{Record} @@ -28509,7 +25779,8 @@ Once set, you can change any of the individual components. Records may be nested and the selector names can be shared at different levels. }{ -\spadpaste{r : Record(a : Record(b: Integer, c: Integer), b: Integer) \bound{rdec}} +\spadpaste{r : Record(a : Record(b: Integer, c: Integer), b: Integer) +\bound{rdec}} } \xtc{ The record \axiom{r} has a \axiom{b} selector at two different levels. @@ -28518,7 +25789,8 @@ Here is an initial value for \axiom{r}. \spadpaste{r := [[1,2],3] \bound{r}\free{rdec}} } \xtc{ -This extracts the \axiom{b} component from the \axiom{a} component of \axiom{r}. +This extracts the \axiom{b} component from the \axiom{a} component of +\axiom{r}. }{ \spadpaste{r.a.b \free{r}} } @@ -28556,22 +25828,9 @@ Look at \axiom{r} to make sure it was modified. \end{page} @ -<>= -\newcommand{\ugTypesUnionsTitle}{Unions} -\newcommand{\ugTypesUnionsNumber}{2.5.} - -@ -\section{Unions} -\label{ugTypesUnionsPage} -\begin{itemize} -\item ugTypesUnionsWOSelPage \ref{ugTypesUnionsWOSelPage} on -page~\pageref{ugTypesUnionsWOSelPage} -\item ugTypesUnionsWSelPage \ref{ugTypesUnionsWSelPage} on -page~\pageref{ugTypesUnionsWSelPage} -\end{itemize} -\index{pages!ugTypesUnionsPage!ug02.ht} -\index{ug02.ht!pages!ugTypesUnionsPage} -\index{ugTypesUnionsPage!ug02.ht!pages} +\pagehead{ugTypesUnionsPage}{ug02.ht}{Unions} +\pageto{notitle}{ugTypesUnionsWOSelPage} +\pageto{notitle}{ugTypesUnionsWSelPage} <>= \begin{page}{ugTypesUnionsPage}{2.5. Unions} \beginscroll @@ -28582,24 +25841,15 @@ Two versions of unions are available, one with selectors (like records) and one without. \beginmenu - \menudownlink{{2.5.1. Unions Without Selectors}}{ugTypesUnionsWOSelPage} - \menudownlink{{2.5.2. Unions With Selectors}}{ugTypesUnionsWSelPage} +\menudownlink{{2.5.1. Unions Without Selectors}}{ugTypesUnionsWOSelPage} +\menudownlink{{2.5.2. Unions With Selectors}}{ugTypesUnionsWSelPage} \endmenu \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugTypesUnionsWOSelTitle}{Unions Without Selectors} -\newcommand{\ugTypesUnionsWOSelNumber}{2.5.1.} - -@ -\section{Unions Without Selectors} -\label{ugTypesUnionsWOSelPage} -\index{pages!ugTypesUnionsWOSelPage!ug02.ht} -\index{ug02.ht!pages!ugTypesUnionsWOSelPage} -\index{ugTypesUnionsWOSelPage!ug02.ht!pages} +\pagehead{ugTypesUnionsWOSelPage}{ug02.ht}{Unions Without Selectors} <>= \begin{page}{ugTypesUnionsWOSelPage}{2.5.1. Unions Without Selectors} \beginscroll @@ -28618,8 +25868,9 @@ may be converted to an object of type \axiomType{Integer}.} \beginImportant The syntax for writing a \pspadtype{Union} type without selectors is -\centerline{{{\tt Union(\subscriptIt{type}{1}, \subscriptIt{type}{2}, \ldots, \subscriptIt{type}{N})}}} -The types in a union without selectors must be distinct. +\centerline{{{\tt Union(\subscriptIt{type}{1}, \subscriptIt{type}{2}, +\ldots, \subscriptIt{type}{N})}}} The types in a union without +selectors must be distinct. \endImportant It is possible to create unions like @@ -28669,14 +25920,13 @@ There are two things of interest about this particular example to which we would like to draw your attention. \indent{4} \beginitems -% -\item[1. ] Axiom normally converts a result to the target value -before passing it to the function. -If we left the declaration information out of this function definition -then the \axiom{sayBranch} call would have been attempted with an -\axiomType{Integer} rather than a \pspadtype{Union}, and an error would have -resulted. -% + +\item[1. ] Axiom normally converts a result to the target value before +passing it to the function. If we left the declaration information +out of this function definition then the \axiom{sayBranch} call would +have been attempted with an \axiomType{Integer} rather than a +\pspadtype{Union}, and an error would have resulted. + \item[2. ] The types in a \pspadtype{Union} are searched in the order given. So if the type were given as @@ -28755,22 +26005,9 @@ Here the retraction fails. \end{page} @ -<>= -\newcommand{\ugTypesUnionsWSelTitle}{Unions With Selectors} -\newcommand{\ugTypesUnionsWSelNumber}{2.5.2.} - -@ -\section{Unions With Selectors} -\label{ugTypesUnionsWSelPage} -\begin{itemize} -\item ugTypesRecordsPage \ref{ugTypesRecordsPage} on -page~\pageref{ugTypesRecordsPage} -\item ugTypesUnionsWOSelPage \ref{ugTypesUnionsWOSelPage} on -page~\pageref{ugTypesUnionsWOSelPage} -\end{itemize} -\index{pages!ugTypesUnionsWSelPage!ug02.ht} -\index{ug02.ht!pages!ugTypesUnionsWSelPage} -\index{ugTypesUnionsWSelPage!ug02.ht!pages} +\pagehead{ugTypesUnionsWSelPage}{ug02.ht}{Unions With Selectors} +\pageto{notitle}{ugTypesRecordsPage} +\pageto{notitle}{ugTypesUnionsWOSelPage} <>= \begin{page}{ugTypesUnionsWSelPage}{2.5.2. Unions With Selectors} \beginscroll @@ -28783,27 +26020,25 @@ with selectors. \beginImportant The syntax for writing a \pspadtype{Union} type with selectors is -\centerline{{{\tt Union(\subscriptIt{selector}{1}:\subscriptIt{type}{1}, \subscriptIt{selector}{2}:\subscriptIt{type}{2}, \ldots, \subscriptIt{selector}{N}:\subscriptIt{type}{N})}}} -You must be careful if a selector has the same name as a variable in the -workspace. -If this occurs, precede the selector name by a single -quote. -It is an error to use a selector that does not correspond to the branch of -the \pspadtype{Union} in which the element actually lies. +\centerline{{{\tt +Union(\subscriptIt{selector}{1}:\subscriptIt{type}{1}, +\subscriptIt{selector}{2}:\subscriptIt{type}{2}, \ldots, +\subscriptIt{selector}{N}:\subscriptIt{type}{N})}}} You must be +careful if a selector has the same name as a variable in the +workspace. If this occurs, precede the selector name by a single +quote. It is an error to use a selector that does not correspond to +the branch of the \pspadtype{Union} in which the element actually +lies. \endImportant -Be sure to understand the difference between records and unions -with selectors. -Records can have more than one component and the selectors are -used to refer to the components. -Unions always have one component but the type of that one -component can vary. -An object of type \pspadtype{Record(a: Integer, b: Float, c: -String)} contains an integer {\it and} a float {\it and} a -string. -An object of type \pspadtype{Union(a: Integer, b: Float, c: -String)} contains an integer {\it or} a float {\it or} a -string. +Be sure to understand the difference between records and unions with +selectors. Records can have more than one component and the selectors +are used to refer to the components. Unions always have one component +but the type of that one component can vary. An object of type +\pspadtype{Record(a: Integer, b: Float, c: String)} contains an +integer {\it and} a float {\it and} a string. An object of type +\pspadtype{Union(a: Integer, b: Float, c: String)} contains an integer +{\it or} a float {\it or} a string. Here is a version of the \userfun{sayBranch} function (cf. \downlink{``\ugTypesUnionsWOSelTitle''}{ugTypesUnionsWOSelPage} @@ -28854,16 +26089,7 @@ To access the element in a particular branch, use the selector. \end{page} @ -<>= -\newcommand{\ugTypesAnyNoneTitle}{The ``Any'' Domain} -\newcommand{\ugTypesAnyNoneNumber}{2.6.} - -@ -\section{The ``Any'' Domain} -\label{ugTypesAnyNonePage} -\index{pages!ugTypesAnyNonePage!ug02.ht} -\index{ug02.ht!pages!ugTypesAnyNonePage} -\index{ugTypesAnyNonePage!ug02.ht!pages} +\pagehead{ugTypesAnyNonePage}{ug02.ht}{The ``Any'' Domain} <>= \begin{page}{ugTypesAnyNonePage}{2.6. The ``Any'' Domain} \beginscroll @@ -28926,20 +26152,8 @@ object of type \axiomType{Any} internally looks like \end{page} @ -<>= -\newcommand{\ugTypesConvertTitle}{Conversion} -\newcommand{\ugTypesConvertNumber}{2.7.} - -@ -\section{Conversion} -\label{ugTypesConvertPage} -\begin{itemize} -\item ugTypesBasicPage \ref{ugTypesBasicPage} on -page~\pageref{ugTypesBasicPage} -\end{itemize} -\index{pages!ugTypesConvertPage!ug02.ht} -\index{ug02.ht!pages!ugTypesConvertPage} -\index{ugTypesConvertPage!ug02.ht!pages} +\pagehead{ugTypesConvertPage}{ug02.ht}{Conversion} +\pageto{notitle}{ugTypesBasicPage} <>= \begin{page}{ugTypesConvertPage}{2.7. Conversion} \beginscroll @@ -28977,33 +26191,38 @@ By now you will be quite familiar with what types and modes look like. It is useful to think of a type or mode as a pattern for what you want the result to be. \xtc{ -Let's start with a square matrix of polynomials with complex rational number -coefficients. +Let's start with a square matrix of polynomials with complex rational +number coefficients. }{ \spadpaste{m : SquareMatrix(2,POLY COMPLEX FRAC INT) \bound{mdec}} } \xtc{ }{ -\spadpaste{m := matrix [[x-3/4*\%i,z*y**2+1/2],[3/7*\%i*y**4 - x,12-\%i*9/5]] \bound{m}\free{mdec}} +\spadpaste{ +m := matrix [[x-3/4*\%i,z*y**2+1/2],[3/7*\%i*y**4 - x,12-\%i*9/5]] +\bound{m}\free{mdec}} } \xtc{ We first want to interchange the \axiomType{Complex} and \axiomType{Fraction} layers. We do the conversion by doing the interchange in the type expression. }{ -\spadpaste{m1 := m :: SquareMatrix(2,POLY FRAC COMPLEX INT) \free{m}\bound{m1}} +\spadpaste{m1 := m :: SquareMatrix(2,POLY FRAC COMPLEX INT) +\free{m}\bound{m1}} } \xtc{ Interchange the \axiomType{Polynomial} and the \axiomType{Fraction} levels. }{ -\spadpaste{m2 := m1 :: SquareMatrix(2,FRAC POLY COMPLEX INT) \free{m1}\bound{m2}} +\spadpaste{m2 := m1 :: SquareMatrix(2,FRAC POLY COMPLEX INT) +\free{m1}\bound{m2}} } \xtc{ Interchange the \axiomType{Polynomial} and the \axiomType{Complex} levels. }{ -\spadpaste{m3 := m2 :: SquareMatrix(2,FRAC COMPLEX POLY INT) \free{m2}\bound{m3}} +\spadpaste{m3 := m2 :: SquareMatrix(2,FRAC COMPLEX POLY INT) +\free{m2}\bound{m3}} } All the entries have changed types, although in comparing the @@ -29068,16 +26287,7 @@ of the matrices to be fractions. \end{page} @ -<>= -\newcommand{\ugTypesSubdomainsTitle}{Subdomains Again} -\newcommand{\ugTypesSubdomainsNumber}{2.8.} - -@ -\section{Subdomains Again} -\label{ugTypesSubdomainsPage} -\index{pages!ugTypesSubdomainsPage!ug02.ht} -\index{ug02.ht!pages!ugTypesSubdomainsPage} -\index{ugTypesSubdomainsPage!ug02.ht!pages} +\pagehead{ugTypesSubdomainsPage}{ug02.ht}{Subdomains Again} <>= \begin{page}{ugTypesSubdomainsPage}{2.8. Subdomains Again} \beginscroll @@ -29095,21 +26305,19 @@ consisting of Every domain is a subdomain of itself, trivially satisfying the membership test: \axiom{true}. -Currently, there are only two system-defined subdomains in Axiom that receive -substantial use. -\axiomType{PositiveInteger} and +Currently, there are only two system-defined subdomains in Axiom that +receive substantial use. \axiomType{PositiveInteger} and \axiomType{NonNegativeInteger} are subdomains of \axiomType{Integer}. An element \axiom{x} of \axiomType{NonNegativeInteger} is an integer -that is greater than or equal to zero, that is, satisfies -\axiom{x >= 0.} -An element \axiom{x} of \axiomType{PositiveInteger} is a nonnegative integer -that is, in fact, greater than zero, that is, satisfies \axiom{x > 0.} -Not all operations from \axiomType{Integer} are available for these -subdomains. -For example, negation and subtraction are not provided since the subdomains -are not closed under those operations. -When you use an integer in an expression, Axiom assigns to it the -type that is the most specific subdomain whose predicate is satisfied. +that is greater than or equal to zero, that is, satisfies \axiom{x >= +0.} An element \axiom{x} of \axiomType{PositiveInteger} is a +nonnegative integer that is, in fact, greater than zero, that is, +satisfies \axiom{x > 0.} Not all operations from \axiomType{Integer} +are available for these subdomains. For example, negation and +subtraction are not provided since the subdomains are not closed under +those operations. When you use an integer in an expression, Axiom +assigns to it the type that is the most specific subdomain whose +predicate is satisfied. \xtc{ This is a positive integer. }{ @@ -29141,16 +26349,15 @@ specific subdomain. \spadpaste{x : NonNegativeInteger := 5} } -When necessary, Axiom converts an integer object into one belonging -to a less specific subdomain. -For example, in \axiom{3-2}, the arguments to \axiomOpFrom{-}{Integer} are both -elements of \axiomType{PositiveInteger}, but this type does not provide -a subtraction operation. -Neither does \axiomType{NonNegativeInteger}, so \axiom{3} and \axiom{2} -are viewed as elements of \axiomType{Integer}, where their difference -can be calculated. -The result is \axiom{1}, which Axiom then automatically assigns -the type \axiomType{PositiveInteger}. +When necessary, Axiom converts an integer object into one belonging to +a less specific subdomain. For example, in \axiom{3-2}, the arguments +to \axiomOpFrom{-}{Integer} are both elements of +\axiomType{PositiveInteger}, but this type does not provide a +subtraction operation. Neither does \axiomType{NonNegativeInteger}, +so \axiom{3} and \axiom{2} are viewed as elements of +\axiomType{Integer}, where their difference can be calculated. The +result is \axiom{1}, which Axiom then automatically assigns the type +\axiomType{PositiveInteger}. \xtc{ Certain operations are very sensitive to the subdomains to which their @@ -29222,22 +26429,9 @@ Axiom trusts you that the value is of the specified type. \end{page} @ -<>= -\newcommand{\ugTypesPkgCallTitle}{Package Calling and Target Types} -\newcommand{\ugTypesPkgCallNumber}{2.9.} - -@ -\section{Package Calling and Target Types} -\label{ugTypesPkgCallPage} -\begin{itemize} -\item ugTypesDeclarePage \ref{ugTypesDeclarePage} on -page~\pageref{ugTypesDeclarePage} -\item ugUserUsePage \ref{ugUserUsePage} on -page~\pageref{ugUserUsePage} -\end{itemize} -\index{pages!ugTypesPkgCallPage!ug02.ht} -\index{ug02.ht!pages!ugTypesPkgCallPage} -\index{ugTypesPkgCallPage!ug02.ht!pages} +\pagehead{ugTypesPkgCallPage}{ug02.ht}{Package Calling and Target Types} +\pageto{notitle}{ugTypesDeclarePage} +\pageto{notitle}{ugUserUsePage} <>= \begin{page}{ugTypesPkgCallPage}{2.9. Package Calling and Target Types} \beginscroll @@ -29288,28 +26482,29 @@ infix operator. \beginImportant To use package calling with an infix operator, use the following syntax: -\centerline{{{\tt ( \subscriptIt{arg}{1} {\it op} \subscriptIt{arg}{1} )\${\it type} }}} +\centerline{{{\tt ( \subscriptIt{arg}{1} {\it op} +\subscriptIt{arg}{1} )\${\it type} }}} \endImportant -We used, for example, \axiom{(2/3)\$Float}. -The expression \axiom{2 + 3 + 4} is equivalent to \axiom{(2+3) + 4.} -Therefore in the expression -\axiom{(2 + 3 + 4)\$Float} the second -\axiomOp{+} comes from the \axiomType{Float} domain. -Can you guess whether the first \axiomOp{+} comes from -\axiomType{Integer} or \axiomType{Float}?\footnote{\axiomType{Float}, -because the package call causes Axiom to convert -\axiom{(2 + 3)} and \axiom{4} to type \axiomType{Float}. -Before the sum is converted, it is given a target type (see below) of -\axiomType{Float} by Axiom and then evaluated. -The target type causes the \axiomOp{+} from \axiomType{Float} to be used.} +We used, for example, \axiom{(2/3)\$Float}. The expression \axiom{2 + +3 + 4} is equivalent to \axiom{(2+3) + 4.} Therefore in the +expression \axiom{(2 + 3 + 4)\$Float} the second \axiomOp{+} comes +from the \axiomType{Float} domain. Can you guess whether the first +\axiomOp{+} comes from \axiomType{Integer} or +\axiomType{Float}?\footnote{\axiomType{Float}, because the package +call causes Axiom to convert \axiom{(2 + 3)} and \axiom{4} to type +\axiomType{Float}. Before the sum is converted, it is given a target +type (see below) of \axiomType{Float} by Axiom and then evaluated. +The target type causes the \axiomOp{+} from \axiomType{Float} to be +used.} \beginImportant 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 \axiomSyntax{\$} and then the type. -\centerline{{{\tt {\it fun} ( \subscriptIt{arg}{1}, \subscriptIt{arg}{1}, \ldots, \subscriptIt{arg}{N} )\${\it type}}}} +\centerline{{{\tt {\it fun} ( \subscriptIt{arg}{1}, +\subscriptIt{arg}{1}, \ldots, \subscriptIt{arg}{N} )\${\it type}}}} \endImportant For example, to call the ``minimum'' function from \axiomType{DoubleFloat} @@ -29435,16 +26630,7 @@ We can just say this. \end{page} @ -<>= -\newcommand{\ugTypesResolveTitle}{Resolving Types} -\newcommand{\ugTypesResolveNumber}{2.10.} - -@ -\section{Resolving Types} -\label{ugTypesResolvePage} -\index{pages!ugTypesResolvePage!ug02.ht} -\index{ug02.ht!pages!ugTypesResolvePage} -\index{ugTypesResolvePage!ug02.ht!pages} +\pagehead{ugTypesResolvePage}{ug02.ht}{Resolving Types} <>= \begin{page}{ugTypesResolvePage}{2.10. Resolving Types} \beginscroll @@ -29481,8 +26667,8 @@ In this example, the common type is \axiomType{Polynomial(Integer)}. \xtc{ Once this is determined, both parts are converted into polynomials, -and the addition operation from \axiomType{Polynomial(Integer)} is used to -get the answer. +and the addition operation from \axiomType{Polynomial(Integer)} is used +to get the answer. }{ \spadpaste{x + 1} } @@ -29519,24 +26705,10 @@ little help to analyze quickly and perform your computations. \end{page} @ -<>= -\newcommand{\ugTypesExposeTitle}{Exposing Domains and Packages} -\newcommand{\ugTypesExposeNumber}{2.11.} - -@ -\section{Exposing Domains and Packages} -\label{ugTypesExposePage} -\begin{itemize} -\item ugTypesPkgCallPage \ref{ugTypesPkgCallPage} on -page~\pageref{ugTypesPkgCallPage} -\item ugUserTrianglePage \ref{ugUserTrianglePage} on -page~\pageref{ugUserTrianglePage} -\item ugSysCmdframePage \ref{ugSysCmdframePage} on -page~\pageref{ugSysCmdframePage} -\end{itemize} -\index{pages!ugTypesExposePage!ug02.ht} -\index{ug02.ht!pages!ugTypesExposePage} -\index{ugTypesExposePage!ug02.ht!pages} +\pagehead{ugTypesExposePage}{ug02.ht}{Exposing Domains and Packages} +\pageto{notitle}{ugTypesPkgCallPage} +\pageto{notitle}{ugUserTrianglePage} +\pageto{notitle}{ugSysCmdframePage} <>= \begin{page}{ugTypesExposePage}{2.11. Exposing Domains and Packages} \beginscroll @@ -29608,110 +26780,76 @@ There are other groups in {\bf exposed.lsp} but initially only the constructors in exposure groups ``basic'' ``categories'' ``naglink'' and ``anna'' are exposed. -As an interactive user of Axiom, you do not need to modify -this file. -Instead, use \spadcmd{)set expose} to expose, hide or query the exposure -status of an individual constructor or exposure group. -The reason for having exposure groups is to be able to expose or hide -multiple constructors with a single command. -For example, you might group together into exposure group ``quantum'' a -number of domains and packages useful for quantum mechanical computations. -These probably should not be available to every user, but you want an easy -way to make the whole collection visible to Axiom when it is looking -for operations to apply. - -If you wanted to hide all the basic constructors available by default, you -would issue \spadcmd{)set expose drop group basic}. -If, however, you discover that you have hidden all the basic constructors, -you should issue \spadcmd{)set expose add group basic} to restore your +As an interactive user of Axiom, you do not need to modify this file. +Instead, use \spadcmd{)set expose} to expose, hide or query the +exposure status of an individual constructor or exposure group. The +reason for having exposure groups is to be able to expose or hide +multiple constructors with a single command. For example, you might +group together into exposure group ``quantum'' a number of domains and +packages useful for quantum mechanical computations. These probably +should not be available to every user, but you want an easy way to +make the whole collection visible to Axiom when it is looking for +operations to apply. + +If you wanted to hide all the basic constructors available by default, +you would issue \spadcmd{)set expose drop group basic}. If, however, +you discover that you have hidden all the basic constructors, you +should issue \spadcmd{)set expose add group basic} to restore your default environment. It is more likely that you would want to expose or hide individual -constructors. -In \downlink{``\ugUserTriangleTitle''}{ugUserTrianglePage} -in Section \ugUserTriangleNumber\ignore{ugUserTriangle} we -use several operations from -\axiomType{OutputForm}, a domain usually hidden. -To avoid package calling every operation from \axiomType{OutputForm}, we -expose the domain and let Axiom conclude that those operations should -be used. -Use \spadcmd{)set expose add constructor} and \spadcmd{)set expose drop -constructor} to expose and hide a constructor, respectively. -You should use the constructor name, not the abbreviation. -The \spadcmd{)set expose} command guides you through these options. - -If you expose a previously hidden constructor, Axiom -exhibits new behavior (that was your intention) though you might not -expect the results that you get. -\axiomType{OutputForm} is, in fact, one of the worst offenders in this -regard. -This domain is meant to be used by other domains for creating a -structure that Axiom knows how to display. -It has functions like \axiomOpFrom{+}{OutputForm} that form output -representations rather than do mathematical calculations. -Because of the order in which Axiom looks at constructors -when it is deciding what operation to apply, \axiomType{OutputForm} -might be used instead of what you expect. -\xtc{ -This is a polynomial. -}{ -\spadpaste{x + x} -} -\xtc{ -Expose \axiomType{OutputForm}. -}{ -\spadpaste{)set expose add constructor OutputForm \bound{setexposeadd}} -} -\xtc{ -This is what we get when \axiomType{OutputForm} is automatically -available. -}{ -\spadpaste{x + x \free{setexposeadd}} -} -\xtc{ -Hide \axiomType{OutputForm} so we don't run into problems -with any later examples! -}{ -\spadpaste{)set expose drop constructor OutputForm \bound{setexposedrop}} -} - -Finally, exposure is done on a frame-by-frame basis. -A \spadgloss{frame} (see -\downlink{``\ugSysCmdframeTitle''}{ugSysCmdframePage} -in Section \ugSysCmdframeNumber\ignore{ugSysCmdframe}) -is one of possibly several -logical Axiom workspaces within a physical one, each having -its own environment (for example, variables and function definitions). -If you have several Axiom workspace windows on your screen, they -are all different frames, automatically created for you by \HyperName{}. -Frames can be manually created, made active and destroyed by the -\spadcmd{)frame} system command. -They do not share exposure information, so you need to use -\spadcmd{)set expose} in each one to add or drop constructors from view. +constructors. In +\downlink{``\ugUserTriangleTitle''}{ugUserTrianglePage} in Section +\ugUserTriangleNumber\ignore{ugUserTriangle} we use several operations +from \axiomType{OutputForm}, a domain usually hidden. To avoid +package calling every operation from \axiomType{OutputForm}, we expose +the domain and let Axiom conclude that those operations should be +used. Use \spadcmd{)set expose add constructor} and \spadcmd{)set +expose drop constructor} to expose and hide a constructor, +respectively. You should use the constructor name, not the +abbreviation. The \spadcmd{)set expose} command guides you through +these options. + +If you expose a previously hidden constructor, Axiom exhibits new +behavior (that was your intention) though you might not expect the +results that you get. \axiomType{OutputForm} is, in fact, one of the +worst offenders in this regard. This domain is meant to be used by +other domains for creating a structure that Axiom knows how to +display. It has functions like \axiomOpFrom{+}{OutputForm} that form +output representations rather than do mathematical calculations. +Because of the order in which Axiom looks at constructors when it is +deciding what operation to apply, \axiomType{OutputForm} might be used +instead of what you expect. \xtc{ This is a polynomial. }{ +\spadpaste{x + x} } \xtc{ Expose \axiomType{OutputForm}. }{ +\spadpaste{)set expose add constructor OutputForm +\bound{setexposeadd}} } \xtc{ This is what we get when +\axiomType{OutputForm} is automatically available. }{ \spadpaste{x + +x \free{setexposeadd}} } \xtc{ Hide \axiomType{OutputForm} so we don't +run into problems with any later examples! }{ \spadpaste{)set expose +drop constructor OutputForm \bound{setexposedrop}} } + +Finally, exposure is done on a frame-by-frame basis. A +\spadgloss{frame} (see +\downlink{``\ugSysCmdframeTitle''}{ugSysCmdframePage} in Section +\ugSysCmdframeNumber\ignore{ugSysCmdframe}) is one of possibly several +logical Axiom workspaces within a physical one, each having its own +environment (for example, variables and function definitions). If you +have several Axiom workspace windows on your screen, they are all +different frames, automatically created for you by Hyperdoc. Frames +can be manually created, made active and destroyed by the +\spadcmd{)frame} system command. They do not share exposure +information, so you need to use \spadcmd{)set expose} in each one to +add or drop constructors from view. \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugAvailSnoopTitle}{Commands for Snooping} -\newcommand{\ugAvailSnoopNumber}{2.12.} - -@ -\section{Commands for Snooping} -\label{ugAvailSnoopPage} -\begin{itemize} -\item ugBrowsePage \ref{ugBrowsePage} on -page~\pageref{ugBrowsePage} -\item ComplexXmpPage \ref{ComplexXmpPage} on -page~\pageref{ComplexXmpPage} -\item ugUserDeclarePage \ref{ugUserDeclarePage} on -page~\pageref{ugUserDeclarePage} -\end{itemize} -\index{pages!ugAvailSnoopPage!ug02.ht} -\index{ug02.ht!pages!ugAvailSnoopPage} -\index{ugAvailSnoopPage!ug02.ht!pages} +\pagehead{ugAvailSnoopPage}{ug02.ht}{Commands for Snooping} +\pageto{notitle}{ugBrowsePage} +\pageto{notitle}{ComplexXmpPage} +\pageto{notitle}{ugUserDeclarePage} <>= \begin{page}{ugAvailSnoopPage}{2.12. Commands for Snooping} \beginscroll @@ -29720,7 +26858,7 @@ To conclude this chapter, we introduce you to some system commands that you can use for getting more information about domains, packages, categories, and operations. The most powerful Axiom facility for getting information about -constructors and operations is the \Browse{} component of \HyperName{}. +constructors and operations is the \Browse{} component of Hyperdoc. This is discussed in \downlink{``\ugBrowseTitle''}{ugBrowsePage} in Chapter \ugBrowseNumber\ignore{ugBrowse}. @@ -29787,46 +26925,26 @@ for more information on function types. @ \chapter{Users Guide Chapter 3 (ug03.ht)} +\pagehead{ugHyperPage}{ug03.ht}{Using Hyperdoc} +\pageto{notitle}{YouTriedIt} +\pageto{notitle}{ugHyperHeadingsPage} +\pageto{notitle}{ugHyperKeysPage} +\pageto{notitle}{ugHyperScrollPage} +\pageto{notitle}{ugHyperInputPage} +\pageto{notitle}{ugHyperButtonsPage} +\pageto{notitle}{ugHyperSearchPage} +\pageto{notitle}{ugHyperExamplePage} +\pageto{notitle}{ugHyperResourcesPage} <>= -\newcommand{\ugHyperTitle}{Using \HyperName{}} -\newcommand{\ugHyperNumber}{3.} - -@ -\section{Using \HyperName{}} -\label{ugHyperPage} -\begin{itemize} -\item YouTriedIt \ref{YouTriedIt} on -page~\pageref{YouTriedIt} -\item ugHyperHeadingsPage \ref{ugHyperHeadingsPage} on -page~\pageref{ugHyperHeadingsPage} -\item ugHyperKeysPage \ref{ugHyperKeysPage} on -page~\pageref{ugHyperKeysPage} -\item ugHyperScrollPage \ref{ugHyperScrollPage} on -page~\pageref{ugHyperScrollPage} -\item ugHyperInputPage \ref{ugHyperInputPage} on -page~\pageref{ugHyperInputPage} -\item ugHyperButtonsPage \ref{ugHyperButtonsPage} on -page~\pageref{ugHyperButtonsPage} -\item ugHyperSearchPage \ref{ugHyperSearchPage} on -page~\pageref{ugHyperSearchPage} -\item ugHyperExamplePage \ref{ugHyperExamplePage} on -page~\pageref{ugHyperExamplePage} -\item ugHyperResourcesPage \ref{ugHyperResourcesPage} on -page~\pageref{ugHyperResourcesPage} -\end{itemize} -\index{pages!ugHyperPage!ug03.ht} -\index{ug03.ht!pages!ugHyperPage} -\index{ugHyperPage!ug03.ht!pages} -<>= -\begin{page}{ugHyperPage}{3. Using \HyperName{}} +\begin{page}{ugHyperPage}{3. Using Hyperdoc} \beginscroll -\HyperName{} is the gateway to Axiom. +Hyperdoc is the gateway to Axiom. It's both an on-line tutorial and an on-line reference manual. It also enables you to use Axiom simply by using the mouse and filling in templates. -\HyperName{} is available to you if you are running Axiom under the +Hyperdoc is available to you if you are running Axiom under the X Window System. Pages usually have active areas, marked in @@ -29838,7 +26956,7 @@ When you click on an active area, you move to the linked page. \texht{}{Try clicking \downlink{here}{YouTriedIt} now.} We suggest that you learn more about other features of -\HyperName{} by clicking on an active area in the menu below. +Hyperdoc by clicking on an active area in the menu below. \beginmenu \menudownlink{{3.1. Headings}}{ugHyperHeadingsPage} @@ -29848,23 +26966,15 @@ We suggest that you learn more about other features of \menudownlink{{3.5. Radio Buttons and Toggles}}{ugHyperButtonsPage} \menudownlink{{3.6. Search Strings}}{ugHyperSearchPage} \menudownlink{{3.7. Example Pages}}{ugHyperExamplePage} - \menudownlink{{3.8. X Window Resources for \HyperName{}}}{ugHyperResourcesPage} + \menudownlink{{3.8. X Window Resources for Hyperdoc}} + {ugHyperResourcesPage} \endmenu \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugHyperHeadingsTitle}{Headings} -\newcommand{\ugHyperHeadingsNumber}{3.1.} - -@ -\section{Headings} -\label{ugHyperHeadingsPage} -\index{pages!ugHyperHeadingsPage!ug03.ht} -\index{ug03.ht!pages!ugHyperHeadingsPage} -\index{ugHyperHeadingsPage!ug03.ht!pages} +\pagehead{ugHyperHeadingsPage}{ug03.ht}{Headings} <>= \begin{page}{ugHyperHeadingsPage}{3.1. Headings} \beginscroll @@ -29877,7 +26987,7 @@ This is what they mean: \item[\StdHelpButton{}] Click on this to get help. The button only appears if there is specific help for the page you are viewing. -You can get {\it general} help for \HyperName{} by clicking the help +You can get {\it general} help for Hyperdoc by clicking the help button on the home page. \item[\UpButton{}] Click here to go back one page. @@ -29886,18 +26996,17 @@ then take off in a new direction. \item[\ReturnButton{}] Go back to the home page, that is, the page on which you started. -Use \HyperName{} to explore, to make forays into new topics. +Use Hyperdoc to explore, to make forays into new topics. Don't worry about how to get back. -\HyperName{} remembers where you came from. +Hyperdoc remembers where you came from. Just click on this button to return. -\item[\StdExitButton{}] From the root window (the one that is displayed when -you start the system) this button leaves the \HyperName{} program, and it -must be restarted if you want to use it again. -From any other \HyperName{} window, it just makes that one window go away. -You {\it must} use this button to get rid of a window. -If you use the window manager ``Close'' button, then all of \HyperName{} -goes away. +\item[\StdExitButton{}] From the root window (the one that is +displayed when you start the system) this button leaves the Hyperdoc +program, and it must be restarted if you want to use it again. From +any other Hyperdoc window, it just makes that one window go away. You +{\it must} use this button to get rid of a window. If you use the +window manager ``Close'' button, then all of Hyperdoc goes away. \enditems \indent{0} % @@ -29910,28 +27019,15 @@ For example, there is no \ReturnButton{} button on the top-level menu. \end{page} @ -<>= -\newcommand{\ugHyperKeysTitle}{Key Definitions} -\newcommand{\ugHyperKeysNumber}{3.2.} - -@ -\section{Key Definitions} -\label{ugHyperKeysPage} -\begin{itemize} -\item ugHyperScrollPage \ref{ugHyperScrollPage} on -page~\pageref{ugHyperScrollPage} -\item ugHyperInputPage \ref{ugHyperInputPage} on -page~\pageref{ugHyperInputPage} -\end{itemize} -\index{pages!ugHyperKeysPage!ug03.ht} -\index{ug03.ht!pages!ugHyperKeysPage} -\index{ugHyperKeysPage!ug03.ht!pages} +\pagehead{ugHyperKeysPage}{ug03.ht}{Key Definitions} +\pageto{notitle}{ugHyperScrollPage} +\pageto{notitle}{ugHyperInputPage} <>= \begin{page}{ugHyperKeysPage}{3.2. Key Definitions} \beginscroll The following keyboard definitions are in effect throughout -\HyperName{}. +Hyperdoc. See \downlink{``\ugHyperScrollTitle''}{ugHyperScrollPage} in Section \ugHyperScrollNumber\ignore{ugHyperScroll} and \downlink{``\ugHyperInputTitle''}{ugHyperInputPage} @@ -29942,9 +27038,9 @@ for some contextual key definitions. \beginitems \item[F1] Display the main help page. \item[F3] Same as \StdExitButton{}, makes the window go away if you are -not at the top-level window or quits the \HyperName{} facility if you are +not at the top-level window or quits the Hyperdoc facility if you are at the top-level. -\item[F5] Rereads the \HyperName{} database, if necessary (for system +\item[F5] Rereads the Hyperdoc database, if necessary (for system developers). \item[F9] Displays this information about key definitions. \item[F12] Same as {\bf F3}. @@ -29960,24 +27056,11 @@ developers). \end{page} @ -<>= -\newcommand{\ugHyperScrollTitle}{Scroll Bars} -\newcommand{\ugHyperScrollNumber}{3.3.} - -@ -\section{Scroll Bars} -\label{ugHyperScrollPage} -\begin{itemize} -\item ugHyperInputPage \ref{ugHyperInputPage} on -page~\pageref{ugHyperInputPage} -\end{itemize} -\index{pages!ugHyperScrollPage!ug03.ht} -\index{ug03.ht!pages!ugHyperScrollPage} -\index{ugHyperScrollPage!ug03.ht!pages} +\pagehead{ugHyperScrollPage}{ug03.ht}{Scroll Bars} +\pageto{notitle}{ugHyperInputPage} <>= \begin{page}{ugHyperScrollPage}{3.3. Scroll Bars} \beginscroll -% Whenever there is too much text to fit on a page, a {\it scroll bar} automatically appears along the right side. @@ -29999,24 +27082,24 @@ Move the mouse to the ``up-arrow'' at the top of the scroll bar and click. The aperture moves up one line each time you click. -Next move the mouse to any position along the middle of the scroll bar and -click. -\HyperName{} attempts to move the top of the aperture to this point in -the text. +Next move the mouse to any position along the middle of the scroll bar +and click. Hyperdoc attempts to move the top of the aperture to this +point in the text. -You cannot make the aperture go off the bottom edge. -When the aperture is about half the size of text, the lowest you can move -the aperture is halfway down. +You cannot make the aperture go off the bottom edge. When the +aperture is about half the size of text, the lowest you can move the +aperture is halfway down. To move up or down one screen at a time, use the -\texht{\fbox{\bf PageUp}}{{\bf PageUp}} and \texht{\fbox{\bf PageDown}}{{\bf -PageDown}} keys on your keyboard. -They move the visible part of the region up and down one page each time you -press them. +\texht{\fbox{\bf PageUp}}{{\bf PageUp}} and +\texht{\fbox{\bf PageDown}}{{\bf PageDown}} keys on your keyboard. +They move the visible part of the region up and down one page each +time you press them. -If the \HyperName{} page does not contain an input area +If the Hyperdoc page does not contain an input area (see \downlink{``\ugHyperInputTitle''}{ugHyperInputPage} -in Section \ugHyperInputNumber\ignore{ugHyperInput}), you can also use the +in Section \ugHyperInputNumber\ignore{ugHyperInput}), +you can also use the \texht{\fbox{\bf Home}}{{\bf Home}} and \texht{\fbox{$\uparrow$}}{up} and \texht{\fbox{$\downarrow$}}{down} arrow keys to navigate. @@ -30031,16 +27114,7 @@ and down one line at a time, respectively. \end{page} @ -<>= -\newcommand{\ugHyperInputTitle}{Input Areas} -\newcommand{\ugHyperInputNumber}{3.4.} - -@ -\section{Input Areas} -\label{ugHyperInputPage} -\index{pages!ugHyperInputPage!ug03.ht} -\index{ug03.ht!pages!ugHyperInputPage} -\index{ugHyperInputPage!ug03.ht!pages} +\pagehead{ugHyperInputPage}{ug03.ht}{Input Areas} <>= \begin{page}{ugHyperInputPage}{3.4. Input Areas} \beginscroll @@ -30048,11 +27122,12 @@ and down one line at a time, respectively. Input areas are boxes where you can put data. Here is one: \centerline{\inputstring{one}{40}{some text}} -\newline As you can see, the input area has some initial text {\it some text} +\newline +As you can see, the input area has some initial text {\it some text} followed by an underscore cursor (the character {\it _}). To enter characters, first -move your mouse cursor to somewhere within the \HyperName{} page. +move your mouse cursor to somewhere within the Hyperdoc page. Characters that you type are inserted in front of the underscore. This means that when you type characters at your keyboard, they go into this first input area. @@ -30097,16 +27172,7 @@ As you can see, the underscore cursor moves to that window. \end{page} @ -<>= -\newcommand{\ugHyperButtonsTitle}{Radio Buttons and Toggles} -\newcommand{\ugHyperButtonsNumber}{3.5.} - -@ -\section{Radio Buttons and Toggles} -\label{ugHyperButtonsPage} -\index{pages!ugHyperButtonsPage!ug03.ht} -\index{ug03.ht!pages!ugHyperButtonsPage} -\index{ugHyperButtonsPage!ug03.ht!pages} +\pagehead{ugHyperButtonsPage}{ug03.ht}{Radio Buttons and Toggles} <>= \begin{page}{ugHyperButtonsPage}{3.5. Radio Buttons and Toggles} \beginscroll @@ -30124,8 +27190,8 @@ Here are three radio buttons: \newline Once you have selected a button, it appears to be inverted and contains a checkmark. -To change the selection, move the cursor with the mouse to a different radio -button and click. +To change the selection, move the cursor with the mouse to a +different radio button and click. \texht{}{Try it now.} A toggle is an independent button that displays some on/off @@ -30137,11 +27203,14 @@ When ``off'', the button is raised. Unlike radio buttons, you can set a group of them any way you like. Here are three: \centerline{ -{\em\inputbox[1]{one}{\htbmfile{pick}}{\htbmfile{unpick}}\space{}\ First one} +{\em\inputbox[1]{one}{\htbmfile{pick}}{\htbmfile{unpick}}\space{} +\ First one} \space{3} -{\em\inputbox[0]{two}{\htbmfile{pick}}{\htbmfile{unpick}}\space{}\ Second one} +{\em\inputbox[0]{two}{\htbmfile{pick}}{\htbmfile{unpick}}\space{} +\ Second one} \space{3} -{\em\inputbox[1]{three}{\htbmfile{pick}}{\htbmfile{unpick}}\space{}\ Third one} +{\em\inputbox[1]{three}{\htbmfile{pick}}{\htbmfile{unpick}}\space{} +\ Third one} } \newline To change toggle the selection, move the cursor with the mouse @@ -30152,33 +27221,22 @@ to the button and click. \end{page} @ -<>= -\newcommand{\ugHyperSearchTitle}{Search Strings} -\newcommand{\ugHyperSearchNumber}{3.6.} - -@ -\section{Search Strings} -\label{ugHyperSearchPage} -\begin{itemize} -\item ugLogicalSearchesPage \ref{ugLogicalSearchesPage} on -page~\pageref{ugLogicalSearchesPage} -\end{itemize} -\index{pages!ugHyperSearchPage!ug03.ht} -\index{ug03.ht!pages!ugHyperSearchPage} -\index{ugHyperSearchPage!ug03.ht!pages} +\pagehead{ugHyperSearchPage}{ug03.ht}{Search Strings} +\pageto{notitle}{ugLogicalSearchesPage} <>= \begin{page}{ugHyperSearchPage}{3.6. Search Strings} \beginscroll % A {\it search string} is used for searching some database. To learn about search strings, we suggest that -you bring up the \HyperName{} glossary. -To do this from the top-level page of \HyperName{}: +you bring up the Hyperdoc glossary. +To do this from the top-level page of Hyperdoc: \indent{4} \beginitems \item[1. ] Click on \windowlink{Reference}{TopReferencePage}, bringing up the Axiom Reference page. -\item[2. ] Click on \windowlink{Glossary}{GlossaryPage}, bringing up the glossary. +\item[2. ] Click on \windowlink{Glossary}{GlossaryPage}, +bringing up the glossary. \texht{}{(You can also just click on the word ``Glossary'' in the last sentence.)} \enditems @@ -30197,26 +27255,23 @@ Enter the word {\tt operation} into the input area above then click on As you can see, {\tt operation} matches only one entry, namely with {\tt operation} itself. -Normally matching is insensitive to whether the alphabetic characters of your -search string are in uppercase or lowercase. -Thus {\tt operation} and {\tt OperAtion} both have the same effect. -%If you prefer that matching be case-sensitive, issue the command +Normally matching is insensitive to whether the alphabetic characters +of your search string are in uppercase or lowercase. Thus {\tt +operation} and {\tt OperAtion} both have the same effect. %If you +prefer that matching be case-sensitive, issue the command %\spadsys{set HHyperName mixedCase} command to the interpreter. -You will very often want to use the wildcard \spadSyntax{*} in your search -string so as to match multiple entries in the list. -The search key \spadSyntax{*} matches every entry in the list. -You can also use \spadSyntax{*} anywhere within a search string to match an -arbitrary substring. -Try {\tt cat*} for example: -enter {\tt cat*} into the input area and click on {\bf Search}. -This matches several entries. +You will very often want to use the wildcard \spadSyntax{*} in your +search string so as to match multiple entries in the list. The search +key \spadSyntax{*} matches every entry in the list. You can also use +\spadSyntax{*} anywhere within a search string to match an arbitrary +substring. Try {\tt cat*} for example: enter {\tt cat*} into the +input area and click on {\bf Search}. This matches several entries. You use any number of wildcards in a search string as long as they are -not adjacent. -Try search strings such as {\tt *dom*}. -As you see, this search string matches {\tt domain}, {\tt domain -constructor}, {\tt subdomain}, and so on. +not adjacent. Try search strings such as {\tt *dom*}. As you see, +this search string matches {\tt domain}, {\tt domain constructor}, +{\tt subdomain}, and so on. \beginmenu \menudownlink{{3.6.1. Logical Searches}}{ugLogicalSearchesPage} @@ -30226,16 +27281,7 @@ constructor}, {\tt subdomain}, and so on. \end{page} @ -<>= -\newcommand{\ugLogicalSearchesTitle}{Logical Searches} -\newcommand{\ugLogicalSearchesNumber}{3.6.1.} - -@ -\section{Logical Searches} -\label{ugLogicalSearchesPage} -\index{pages!ugLogicalSearchesPage!ug03.ht} -\index{ug03.ht!pages!ugLogicalSearchesPage} -\index{ugLogicalSearchesPage!ug03.ht!pages} +\pagehead{ugLogicalSearchesPage}{ug03.ht}{Logical Searches} <>= \begin{page}{ugLogicalSearchesPage}{3.6.1. Logical Searches} \beginscroll @@ -30266,16 +27312,7 @@ is a valid expression. \end{page} @ -<>= -\newcommand{\ugHyperExampleTitle}{Example Pages} -\newcommand{\ugHyperExampleNumber}{3.7.} - -@ -\section{Example Pages} -\label{ugHyperExamplePage} -\index{pages!ugHyperExamplePage!ug03.ht} -\index{ug03.ht!pages!ugHyperExamplePage} -\index{ugHyperExamplePage!ug03.ht!pages} +\pagehead{ugHyperExamplePage}{ug03.ht}{Example Pages} <>= \begin{page}{ugHyperExamplePage}{3.7. Example Pages} \beginscroll @@ -30295,10 +27332,10 @@ disappears. Maybe you would like to run an example? To do so, just click on any part of its text! When you do, the example line is copied into a new interactive -Axiom buffer for this \HyperName{} page. +Axiom buffer for this Hyperdoc page. Sometimes one example line cannot be run before you run an earlier one. -Don't worry---\HyperName{} automatically runs all the necessary +Don't worry---Hyperdoc automatically runs all the necessary lines in the right order! For instance, the second example line above refers to \spad{a} which is assigned in the first example line. @@ -30307,7 +27344,7 @@ Axiom first issues the first line (to assign \spad{a}), then the second (to do the computation using \spad{a}). The new interactive Axiom buffer disappears when you leave -\HyperName{}. +Hyperdoc. If you want to get rid of it beforehand, use the {\bf Cancel} button of the X Window manager or issue the Axiom system command \spadsys{)close.} @@ -30317,21 +27354,12 @@ or issue the Axiom system command \spadsys{)close.} \end{page} @ +\pagehead{ugHyperResourcesPage}{ug03.ht}{X Window Resources for Hyperdoc} <>= -\newcommand{\ugHyperResourcesTitle}{X Window Resources for \HyperName{}} -\newcommand{\ugHyperResourcesNumber}{3.8.} - -@ -\section{X Window Resources for \HyperName{}} -\label{ugHyperResourcesPage} -\index{pages!ugHyperResourcesPage!ug03.ht} -\index{ug03.ht!pages!ugHyperResourcesPage} -\index{ugHyperResourcesPage!ug03.ht!pages} -<>= -\begin{page}{ugHyperResourcesPage}{3.8. X Window Resources for \HyperName{}} +\begin{page}{ugHyperResourcesPage}{3.8. X Window Resources for Hyperdoc} \beginscroll % -You can control the appearance of \HyperName{} while running under Version 11 +You can control the appearance of Hyperdoc while running under Version 11 of the X Window System by placing the following resources in the file {\bf .Xdefaults} in your home directory. In what follows, {\it font} is any valid X11 font name @@ -30346,9 +27374,9 @@ This is the standard text font. \xdefault{Rom14} \item[{\tt Axiom.hyperdoc.RmColor:} {\it color}] \ \newline This is the standard text color. \xdefault{black} \item[{\tt Axiom.hyperdoc.ActiveFont:} {\it font}] \ \newline -This is the font used for \HyperName{} link buttons. \xdefault{Bld14} +This is the font used for Hyperdoc link buttons. \xdefault{Bld14} \item[{\tt Axiom.hyperdoc.ActiveColor:} {\it color}] \ \newline -This is the color used for \HyperName{} link buttons. \xdefault{black} +This is the color used for Hyperdoc link buttons. \xdefault{black} \item[{\tt Axiom.hyperdoc.AxiomFont:} {\it font}] \ \newline This is the font used for active Axiom commands.\footnote{ This was called {\tt Axiom.hyperdoc.SpadFont} in early versions @@ -30364,10 +27392,10 @@ This is the font used for bold face. \xdefault{Bld14} \item[{\tt Axiom.hyperdoc.BoldColor:} {\it color}] \ \newline This is the color used for bold face. \xdefault{black} \item[{\tt Axiom.hyperdoc.TtFont:} {\it font}] \ \newline -This is the font used for Axiom output in \HyperName{}. +This is the font used for Axiom output in Hyperdoc. This font must be fixed-width. \xdefault{Rom14} \item[{\tt Axiom.hyperdoc.TtColor:} {\it color}] \ \newline -This is the color used for Axiom output in \HyperName{}. +This is the color used for Axiom output in Hyperdoc. \xdefault{black} \item[{\tt Axiom.hyperdoc.EmphasizeFont:} {\it font}] \ \newline This is the font used for italics. \xdefault{Itl14} @@ -30392,32 +27420,14 @@ This is the color used for the background of all windows. \end{page} @ \chapter{Users Guide Chapter 4 (ug04.ht)} -<>= -\newcommand{\ugInOutTitle}{Input Files and Output Styles} -\newcommand{\ugInOutNumber}{4.} - -@ -\section{Input Files and Output Styles} -\label{ugInOutPage} -\begin{itemize} -\item ugInOutInPage \ref{ugInOutInPage} on -page~\pageref{ugInOutInPage} -\item ugInOutSpadprofPage \ref{ugInOutSpadprofPage} on -page~\pageref{ugInOutSpadprofPage} -\item ugInOutOutPage \ref{ugInOutOutPage} on -page~\pageref{ugInOutOutPage} -\item ugInOutAlgebraPage \ref{ugInOutAlgebraPage} on -page~\pageref{ugInOutAlgebraPage} -\item ugInOutTeXPage \ref{ugInOutTeXPage} on -page~\pageref{ugInOutTeXPage} -\item ugInOutScriptPage \ref{ugInOutScriptPage} on -page~\pageref{ugInOutScriptPage} -\item ugInOutFortranPage \ref{ugInOutFortranPage} on -page~\pageref{ugInOutFortranPage} -\end{itemize} -\index{pages!ugInOutPage!ug04.ht} -\index{ug04.ht!pages!ugInOutPage} -\index{ugInOutPage!ug04.ht!pages} +\pagehead{ugInOutPage}{ug04.ht}{Input Files and Output Styles} +\pageto{notitle}{ugInOutInPage} +\pageto{notitle}{ugInOutSpadprofPage} +\pageto{notitle}{ugInOutOutPage} +\pageto{notitle}{ugInOutAlgebraPage} +\pageto{notitle}{ugInOutTeXPage} +\pageto{notitle}{ugInOutScriptPage} +\pageto{notitle}{ugInOutFortranPage} <>= \begin{page}{ugInOutPage}{4. Input Files and Output Styles} \beginscroll @@ -30452,20 +27462,8 @@ that the correct output is shown in the text. \end{page} @ -<>= -\newcommand{\ugInOutInTitle}{Input Files} -\newcommand{\ugInOutInNumber}{4.1.} - -@ -\section{Input Files} -\label{ugInOutInPage} -\begin{itemize} -\item ugLangBlocksPage \ref{ugLangBlocksPage} on -page~\pageref{ugLangBlocksPage} -\end{itemize} -\index{pages!ugInOutInPage!ug04.ht} -\index{ug04.ht!pages!ugInOutInPage} -\index{ugInOutInPage!ug04.ht!pages} +\pagehead{ugInOutInPage}{ug04.ht}{Input Files} +\pageto{notitle}{ugLangBlocksPage} <>= \begin{page}{ugInOutInPage}{4.1. Input Files} \beginscroll @@ -30502,8 +27500,8 @@ Axiom looks in your current working directory for input files that are not qualified by a directory name. Typically, this directory is the directory from which you invoked Axiom. -To change the current working directory, use the \spadcmd{)cd} system command. -The command \spadsys{)cd} by itself shows the current +To change the current working directory, use the \spadcmd{)cd} system +command. The command \spadsys{)cd} by itself shows the current working directory. To change it to @@ -30540,22 +27538,13 @@ into {\it blocks.} \end{page} @ +\pagehead{ugInOutSpadprofPage}{ug04.ht}{The .axiom.input File} <>= -\newcommand{\ugInOutSpadprofTitle}{The axiom.input File} -\newcommand{\ugInOutSpadprofNumber}{4.2.} - -@ -\section{The axiom.input File} -\label{ugInOutSpadprofPage} -\index{pages!ugInOutSpadprofPage!ug04.ht} -\index{ug04.ht!pages!ugInOutSpadprofPage} -\index{ugInOutSpadprofPage!ug04.ht!pages} -<>= -\begin{page}{ugInOutSpadprofPage}{4.2. The axiom.input File} +\begin{page}{ugInOutSpadprofPage}{4.2. The .axiom.input File} \beginscroll When Axiom starts up, it tries to read the input file -{\bf axiom.input} from your home +{\bf .axiom.input} from your home directory. It there is no {\bf axiom.input} in your home directory, it reads the copy located in its own {\bf src/input} directory. @@ -30582,7 +27571,7 @@ system command \spadsys{)pquit} always prompts you for confirmation.} To see the other system variables you can set, issue \spadsys{)set} -or use the \HyperName{} {\bf Settings} facility to view and change +or use the Hyperdoc {\bf Settings} facility to view and change Axiom system variables. \endscroll @@ -30590,16 +27579,7 @@ Axiom system variables. \end{page} @ -<>= -\newcommand{\ugInOutOutTitle}{Common Features of Using Output Formats} -\newcommand{\ugInOutOutNumber}{4.3.} - -@ -\section{Common Features of Using Output Formats} -\label{ugInOutOutPage} -\index{pages!ugInOutOutPage!ug04.ht} -\index{ug04.ht!pages!ugInOutOutPage} -\index{ugInOutOutPage!ug04.ht!pages} +\pagehead{ugInOutOutPage}{ug04.ht}{Common Features of Using Output Formats} <>= \begin{page}{ugInOutOutPage}{4.3. Common Features of Using Output Formats} \beginscroll @@ -30688,19 +27668,11 @@ change the FORTRAN line length from its default value of \spad{72}. \end{page} @ -<>= -\newcommand{\ugInOutAlgebraTitle}{Monospace Two-Dimensional Mathematical Format} -\newcommand{\ugInOutAlgebraNumber}{4.4.} - -@ -\section{Monospace Two-Dimensional Mathematical Format} -\label{ugInOutAlgebraPage} -\index{pages!ugInOutAlgebraPage!ug04.ht} -\index{ug04.ht!pages!ugInOutAlgebraPage} -\index{ugInOutAlgebraPage!ug04.ht!pages} +\pagehead{ugInOutAlgebraPage}{ug04.ht} +{Monospace 2D Mathematical Format} <>= \begin{page}{ugInOutAlgebraPage} -{4.4. Monospace Two-Dimensional Mathematical Format} +{4.4. Monospace 2D Mathematical Format} \beginscroll This is the default output format for Axiom. @@ -30714,7 +27686,7 @@ If it is not, issue this. } \noOutputXtc{ Since the printed version of this book -(as opposed to the \HyperName{} version) +(as opposed to the Hyperdoc version) shows output produced by the \texht{\TeX}{TeX}{} output formatter, let us temporarily turn off @@ -30725,7 +27697,8 @@ let us temporarily turn off \xtc{ Here is an example of what it looks like. }{ -\spadpaste{matrix [[i*x**i + j*\%i*y**j for i in 1..2] for j in 3..4] \free{algon texoff}} +\spadpaste{matrix [[i*x**i + j*\%i*y**j for i in 1..2] for j in 3..4] +\free{algon texoff}} } \noOutputXtc{ Issue this to turn off this kind of formatting. @@ -30752,16 +27725,7 @@ to get better looking output. \end{page} @ -<>= -\newcommand{\ugInOutTeXTitle}{TeX Format} -\newcommand{\ugInOutTeXNumber}{4.5.} - -@ -\section{TeX Format} -\label{ugInOutTeXPage} -\index{pages!ugInOutTeXPage!ug04.ht} -\index{ug04.ht!pages!ugInOutTeXPage} -\index{ugInOutTeXPage!ug04.ht!pages} +\pagehead{ugInOutTeXPage}{ug04.ht}{TeX Format} <>= \begin{page}{ugInOutTeXPage}{4.5. TeX Format} \beginscroll @@ -30819,16 +27783,7 @@ are all standard except for the following definitions: \end{page} @ -<>= -\newcommand{\ugInOutScriptTitle}{IBM Script Formula Format} -\newcommand{\ugInOutScriptNumber}{4.6.} - -@ -\section{IBM Script Formula Format} -\label{ugInOutScriptPage} -\index{pages!ugInOutScriptPage!ug04.ht} -\index{ug04.ht!pages!ugInOutScriptPage} -\index{ugInOutScriptPage!ug04.ht!pages} +\pagehead{ugInOutScriptPage}{ug04.ht}{IBM Script Formula Format} <>= \begin{page}{ugInOutScriptPage}{4.6. IBM Script Formula Format} \beginscroll @@ -30866,71 +27821,41 @@ To turn IBM Script Formula Format output formatting off, issue this. \end{page} @ -<>= -\newcommand{\ugInOutFortranTitle}{FORTRAN Format} -\newcommand{\ugInOutFortranNumber}{4.7.} - -@ -\section{FORTRAN Format} -\label{ugInOutFortranPage} -\index{pages!ugInOutFortranPage!ug04.ht} -\index{ug04.ht!pages!ugInOutFortranPage} -\index{ugInOutFortranPage!ug04.ht!pages} +\pagehead{ugInOutFortranPage}{ug04.ht}{FORTRAN Format} <>= \begin{page}{ugInOutFortranPage}{4.7. FORTRAN Format} \beginscroll In addition to turning FORTRAN output on and off and stating where the output should be placed, there are many options that control the -appearance of the generated code. -In this section we describe some of the basic options. -Issue \spadcmd{)set fortran} to see a full list with their current -settings. - -The output FORTRAN expression usually begins in column 7. -If the expression needs more than one line, the ampersand character -\spadSyntax{\&} is used in column 6. -Since some versions of FORTRAN have restrictions on the number of lines -per statement, Axiom breaks long expressions into segments with -a maximum of 1320 characters (20 lines of 66 characters) per segment. -If you want to change this, say, to 660 characters, -issue the system command -\spadcmd{)set fortran explength 660}. -You can turn off the line breaking by issuing -\spadcmd{)set fortran segment off}. -Various code optimization levels are available. -% -\noOutputXtc{ -FORTRAN output is produced after you issue this. -}{ -\spadpaste{)set output fortran on \bound{forton}} -} -\noOutputXtc{ -For the initial examples, we set the optimization level to 0, which is the -lowest level. -}{ -\spadpaste{)set fortran optlevel 0 \bound{opt0}\free{forton}} -} -\noOutputXtc{ -The output is usually in columns 7 through 72, although fewer columns -are used in the following examples so that the output -fits nicely on the page. -}{ -\spadpaste{)set fortran fortlength 60} -} -\xtc{ -By default, the output goes to the screen and is displayed -before the standard Axiom two-dimensional output. -In this example, an -assignment to the variable \spad{R1} was generated because this is -the result of step 1. -}{ -\spadpaste{(x+y)**3 \free{opt0}} -} -\xtc{ -Here is an example that illustrates the line breaking. -}{ -\spadpaste{(x+y+z)**3 \free{opt0}} +appearance of the generated code. In this section we describe some of +the basic options. Issue \spadcmd{)set fortran} to see a full list +with their current settings. + +The output FORTRAN expression usually begins in column 7. If the +expression needs more than one line, the ampersand character +\spadSyntax{\&} is used in column 6. Since some versions of FORTRAN +have restrictions on the number of lines per statement, Axiom breaks +long expressions into segments with a maximum of 1320 characters (20 +lines of 66 characters) per segment. If you want to change this, say, +to 660 characters, issue the system command \spadcmd{)set fortran +explength 660}. You can turn off the line breaking by issuing +\spadcmd{)set fortran segment off}. Various code optimization levels +are available. % \noOutputXtc{ FORTRAN output is produced after you +issue this. }{ \spadpaste{)set output fortran on \bound{forton}} } +\noOutputXtc{ For the initial examples, we set the optimization level +to 0, which is the lowest level. }{ \spadpaste{)set fortran optlevel +0 \bound{opt0}\free{forton}} } \noOutputXtc{ The output is usually in +columns 7 through 72, although fewer columns are used in the following +examples so that the output fits nicely on the page. }{ +\spadpaste{)set fortran fortlength 60} } \xtc{ By default, the output +goes to the screen and is displayed before the standard Axiom +two-dimensional output. In this example, an assignment to the +variable \spad{R1} was generated because this is the result of step 1. +}{ \spadpaste{(x+y)**3 \free{opt0}} } + +\xtc{ Here is an example that illustrates the line breaking. } +{ \spadpaste{(x+y+z)**3 \free{opt0}} } Note in the above examples that integers are generally converted to @@ -31043,41 +27968,17 @@ Look at the code generated for the matrix again. \end{page} @ \chapter{Users Guide Chapter 5 (ug05.ht)} -<>= -\newcommand{\ugLangTitle}{Introduction to the Axiom Interactive Language} -\newcommand{\ugLangNumber}{5.} - -@ -\section{Introduction to the Axiom Interactive Language} -\label{ugLangPage} -\includegraphics[scale=.5]{ps/v71uglangpage.eps} -\index{images!uglangpage} - -Called from ``Reference'' (TopReferencePage) -\ref{TopReferencePage} on page~\pageref{TopReferencePage} -\begin{itemize} -\item ``Immediate and Delayed Assignments''\\ -(ugLangAssignPage) \ref{ugLangAssignPage} on -page~\pageref{ugLangAssignPage} -\item ``Blocks''\\ -(ugLangBlocksPage) \ref{ugLangBlocksPage} on -page~\pageref{ugLangBlocksPage} -\item ``if-then-else''\\ -(ugLangIfPage) \ref{ugLangIfPage} on -page~\pageref{ugLangIfPage} -\item ``Loops''\\ -(ugLangLoopsPage) \ref{ugLangLoopsPage} on -page~\pageref{ugLangLoopsPage} -\item ``Creating Lists and Streams with Iterators''\\ -(ugLangItsPage) \ref{ugLangItsPage} on -page~\pageref{ugLangItsPage} -\item ``An Example: Streams of Primes''\\ -(ugLangStreamsPrimesPage) \ref{ugLangStreamsPrimesPage} on -page~\pageref{ugLangStreamsPrimesPage} -\end{itemize} -\index{pages!ugLangPage!ug05.ht} -\index{ug05.ht!pages!ugLangPage} -\index{ugLangPage!ug05.ht!pages} +\pagehead{ugLangPage}{ug05.ht} +{Introduction to the Axiom Interactive Language} +\pagepic{ps/v71uglangpage.eps}{uglangpage} +\pagefrom{Reference}{TopReferencePage} +\pageto{Immediate and Delayed Assignments} +{ugLangAssignPage} +\pageto{Blocks}{ugLangBlocksPage} +\pageto{if-then-else}{ugLangIfPage} +\pageto{Loops}{ugLangLoopsPage} +\pageto{Creating Lists and Streams with Iterators}{ugLangItsPage} +\pageto{An Example: Streams of Primes}{ugLangStreamsPrimesPage} <>= \begin{page}{ugLangPage}{5. Introduction to the Axiom Interactive Language} \beginscroll @@ -31092,7 +27993,8 @@ We suggest you first read the boxed material in each section and then proceed to a more thorough reading of the chapter. \beginmenu - \menudownlink{{5.1. Immediate and Delayed Assignments}}{ugLangAssignPage} + \menudownlink{{5.1. Immediate and Delayed Assignments}} + {ugLangAssignPage} \menudownlink{{5.2. Blocks}}{ugLangBlocksPage} \menudownlink{{5.3. if-then-else}}{ugLangIfPage} \menudownlink{{5.4. Loops}}{ugLangLoopsPage} @@ -31106,20 +28008,8 @@ proceed to a more thorough reading of the chapter. \end{page} @ -<>= -\newcommand{\ugLangAssignTitle}{Immediate and Delayed Assignments} -\newcommand{\ugLangAssignNumber}{5.1.} - -@ -\section{Immediate and Delayed Assignments} -\label{ugLangAssignPage} -\begin{itemize} -\item ugUserDelayPage \ref{ugUserDelayPage} on -page~\pageref{ugUserDelayPage} -\end{itemize} -\index{pages!ugLangAssignPage!ug05.ht} -\index{ug05.ht!pages!ugLangAssignPage} -\index{ugLangAssignPage!ug05.ht!pages} +\pagehead{ugLangAssignPage}{ug05.ht}{Immediate and Delayed Assignments} +\pageto{notitle}{ugUserDelayPage} <>= \begin{page}{ugLangAssignPage}{5.1. Immediate and Delayed Assignments} \beginscroll @@ -31144,7 +28034,8 @@ Use it to associate a value with a variable. \beginImportant The syntax for immediate assignment for a single variable is \centerline{{{\it variable} \axiom{:=} {\it expression}}} -The value returned by an immediate assignment is the value of {\it expression}. +The value returned by an immediate assignment is the value of +{\it expression}. \endImportant \xtc{ @@ -31156,8 +28047,8 @@ yielding \axiom{1}. This value is then assigned to \axiom{a}. \xtc{ The right-hand side of the expression is evaluated, yielding \axiom{1}. This value is then assigned to \axiom{b}. -Thus \axiom{a} and \axiom{b} both have the value \axiom{1} after the sequence -of assignments. +Thus \axiom{a} and \axiom{b} both have the value \axiom{1} after +the sequence of assignments. }{ \spadpaste{b := a \free{a}\bound{b}} } @@ -31192,8 +28083,8 @@ The value returned by a delayed assignment is \void{}. \endImportant \xtc{ -Using \axiom{a} and \axiom{b} as above, these are the corresponding delayed -assignments. +Using \axiom{a} and \axiom{b} as above, these are the corresponding +delayed assignments. }{ \spadpaste{a == 1 \bound{ad}} } @@ -31239,7 +28130,9 @@ surrounded by parentheses.} \beginImportant The syntax for multiple immediate assignments is -\centerline{{{\tt ( \subscriptIt{var}{1}, \subscriptIt{var}{2}, \ldots, \subscriptIt{var}{N} ) := ( \subscriptIt{expr}{1}, \subscriptIt{expr}{2}, \ldots, \subscriptIt{expr}{N} ) }}} +\centerline{{{\tt ( \subscriptIt{var}{1}, \subscriptIt{var}{2}, +\ldots, \subscriptIt{var}{N} ) := ( \subscriptIt{expr}{1}, +\subscriptIt{expr}{2}, \ldots, \subscriptIt{expr}{N} ) }}} The value returned by an immediate assignment is the value of \subscriptIt{expr}{N}. \endImportant @@ -31282,20 +28175,8 @@ user functions of no arguments. \end{page} @ -<>= -\newcommand{\ugLangBlocksTitle}{Blocks} -\newcommand{\ugLangBlocksNumber}{5.2.} - -@ -\section{Blocks} -\label{ugLangBlocksPage} -\begin{itemize} -\item ugLangIfPage \ref{ugLangIfPage} on -page~\pageref{ugLangIfPage} -\end{itemize} -\index{pages!ugLangBlocksPage!ug05.ht} -\index{ug05.ht!pages!ugLangBlocksPage} -\index{ugLangBlocksPage!ug05.ht!pages} +\pagehead{ugLangBlocksPage}{ug05.ht}{Blocks} +\pageto{notitle}{ugLangIfPage} <>= \begin{page}{ugLangBlocksPage}{5.2. Blocks} \beginscroll @@ -31328,8 +28209,9 @@ A block can be constructed in two ways: \beginitems \item[1. ] the expressions can be separated by semicolons and the resulting expression surrounded by parentheses, and -\item[2. ] the expressions can be written on succeeding lines with each line -indented the same number of spaces (which must be greater than zero). +\item[2. ] the expressions can be written on succeeding lines with +each line indented the same number of spaces (which must be greater +than zero). A block entered in this form is called a \spadgloss{pile}. \enditems @@ -31340,7 +28222,8 @@ Both forms are available in {\bf .input} files. \beginImportant The syntax for a simple block of expressions entered interactively is -\centerline{{{\tt ( \subscriptIt{expression}{1}; \subscriptIt{expression}{2}; \ldots; \subscriptIt{expression}{N} )}}} +\centerline{{{\tt ( \subscriptIt{expression}{1}; +\subscriptIt{expression}{2}; \ldots; \subscriptIt{expression}{N} )}}} The value returned by a block is the value of an \axiomSyntax{=>} expression, or \subscriptIt{expression}{N} if no \axiomSyntax{=>} is encountered. @@ -31348,7 +28231,8 @@ if no \axiomSyntax{=>} is encountered. In {\bf .input} files, blocks can also be written using \spadglossSee{piles}{pile}. -The examples throughout this book are assumed to come from {\bf .input} files. +The examples throughout this book are assumed to come from +{\bf .input} files. \xtc{ In this example, we assign a rational number to \axiom{a} using a block @@ -31444,7 +28328,8 @@ if h > 3.1 then \xtc{ Blocks can be nested. }{ -\spadpaste{a := (b := factorial(12); c := (d := eulerPhi(22); factorial(d));b+c)} +\spadpaste{ +a := (b := factorial(12); c := (d := eulerPhi(22); factorial(d));b+c)} } \xtc{ This is the pile version of the last block. @@ -31477,22 +28362,9 @@ a := \end{page} @ -<>= -\newcommand{\ugLangIfTitle}{if-then-else} -\newcommand{\ugLangIfNumber}{5.3.} - -@ -\section{if-then-else} -\label{ugLangIfPage} -\begin{itemize} -\item ugTypesResolvePage \ref{ugTypesResolvePage} on -page~\pageref{ugTypesResolvePage} -\item ugTypesPkgCallPage \ref{ugTypesPkgCallPage} on -page~\pageref{ugTypesPkgCallPage} -\end{itemize} -\index{pages!ugLangIfPage!ug05.ht} -\index{ug05.ht!pages!ugLangIfPage} -\index{ugLangIfPage!ug05.ht!pages} +\pagehead{ugLangIfPage}{ug05.ht}{if-then-else} +\pageto{notitle}{ugTypesResolvePage} +\pageto{notitle}{ugTypesPkgCallPage} <>= \begin{page}{ugLangIfPage}{5.3. if-then-else} \beginscroll @@ -31504,19 +28376,18 @@ conditional expressions. The \axiom{else} part of the conditional is optional. The expression between the \axiom{if} and \axiom{then} keywords is a -\spadgloss{predicate}: an expression that evaluates to or is convertible to -either {\tt true} or {\tt false}, that is, +\spadgloss{predicate}: an expression that evaluates to or is +convertible to either {\tt true} or {\tt false}, that is, a \axiomType{Boolean}. -\beginImportant -The syntax for conditional expressions is -\centerline{{{\tt if {\it predicate} then \subscriptIt{expression}{1} else \subscriptIt{expression}{2}}}} -where the \axiom{else} \subscriptIt{\it expression}{2} part is optional. -The value returned from a conditional expression is -\subscriptIt{\it expression}{1} if the predicate evaluates to \axiom{true} -and \subscriptIt{\it expression}{2} otherwise. -If no \axiom{else} clause is given, the value is always \void{}. -\endImportant +\beginImportant The syntax for conditional expressions is +\centerline{{{\tt if {\it predicate} then \subscriptIt{expression}{1} +else \subscriptIt{expression}{2}}}} where the \axiom{else} +\subscriptIt{\it expression}{2} part is optional. The value returned +from a conditional expression is \subscriptIt{\it expression}{1} if +the predicate evaluates to \axiom{true} and \subscriptIt{\it +expression}{2} otherwise. If no \axiom{else} clause is given, the +value is always \void{}. \endImportant An \axiom{if-then-else} expression always returns a value. If the @@ -31534,7 +28405,8 @@ By default, the equal sign \spadopFrom{=}{Equation} creates an equation. \xtc{ This is an equation. -In particular, it is an object of type \axiomType{Equation Polynomial Integer}. +In particular, it is an object of type +\axiomType{Equation Polynomial Integer}. }{ \spadpaste{x + 1 = y} } @@ -31551,10 +28423,10 @@ See \downlink{``\ugTypesPkgCallTitle''}{ugTypesPkgCallPage} in Section The compound symbol meaning ``not equal'' in Axiom is ``\texht{$\sim =$}{\axiom{~=}}''. -This can be used directly without a package call or a target specification. -The expression -\axiom{a} \texht{$\sim =$}{\axiom{~=}} \axiom{b} is directly translated into -\axiom{not (a = b)}. +This can be used directly without a package call or a target +specification. The expression +\axiom{a} \texht{$\sim =$}{\axiom{~=}} \axiom{b} is directly +translated into \axiom{not (a = b)}. Many other functions have return values of type \axiomType{Boolean}. These include \axiom{<}, \axiom{<=}, \axiom{>}, @@ -31622,46 +28494,21 @@ a := \end{page} @ -<>= -\newcommand{\ugLangLoopsTitle}{Loops} -\newcommand{\ugLangLoopsNumber}{5.4.} - -@ -\section{Loops} -\label{ugLangLoopsPage} -\begin{itemize} -\item ugLangLoopsCompIntPage \ref{ugLangLoopsCompIntPage} on -page~\pageref{ugLangLoopsCompIntPage} -\item ugLangLoopsReturnPage \ref{ugLangLoopsReturnPage} on -page~\pageref{ugLangLoopsReturnPage} -\item ugLangLoopsBreakPage \ref{ugLangLoopsBreakPage} on -page~\pageref{ugLangLoopsBreakPage} -\item ugLangLoopsBreakVsPage \ref{ugLangLoopsBreakVsPage} on -page~\pageref{ugLangLoopsBreakVsPage} -\item ugLangLoopsBreakMorePage \ref{ugLangLoopsBreakMorePage} on -page~\pageref{ugLangLoopsBreakMorePage} -\item ugLangLoopsIteratePage \ref{ugLangLoopsIteratePage} on -page~\pageref{ugLangLoopsIteratePage} -\item ugLangLoopsWhilePage \ref{ugLangLoopsWhilePage} on -page~\pageref{ugLangLoopsWhilePage} -\item ugLangLoopsForInPage \ref{ugLangLoopsForInPage} on -page~\pageref{ugLangLoopsForInPage} -\item ugLangLoopsForInNMPage \ref{ugLangLoopsForInNMPage} on -page~\pageref{ugLangLoopsForInNMPage} -\item ugLangLoopsForInNMSPage \ref{ugLangLoopsForInNMSPage} on -page~\pageref{ugLangLoopsForInNMSPage} -\item ugLangLoopsForInNPage \ref{ugLangLoopsForInNPage} on -page~\pageref{ugLangLoopsForInNPage} -\item ugLangLoopsForInXLPage \ref{ugLangLoopsForInXLPage} on -page~\pageref{ugLangLoopsForInXLPage} -\item ugLangLoopsForInPredPage \ref{ugLangLoopsForInPredPage} on -page~\pageref{ugLangLoopsForInPredPage} -\item ugLangLoopsParPage \ref{ugLangLoopsParPage} on -page~\pageref{ugLangLoopsParPage} -\end{itemize} -\index{pages!ugLangLoopsPage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsPage} -\index{ugLangLoopsPage!ug05.ht!pages} +\pagehead{ugLangLoopsPage}{ug05.ht}{Loops} +\pageto{notitle}{ugLangLoopsCompIntPage} +\pageto{notitle}{ugLangLoopsReturnPage} +\pageto{notitle}{ugLangLoopsBreakPage} +\pageto{notitle}{ugLangLoopsBreakVsPage} +\pageto{notitle}{ugLangLoopsBreakMorePage} +\pageto{notitle}{ugLangLoopsIteratePage} +\pageto{notitle}{ugLangLoopsWhilePage} +\pageto{notitle}{ugLangLoopsForInPage} +\pageto{notitle}{ugLangLoopsForInNMPage} +\pageto{notitle}{ugLangLoopsForInNMSPage} +\pageto{notitle}{ugLangLoopsForInNPage} +\pageto{notitle}{ugLangLoopsForInXLPage} +\pageto{notitle}{ugLangLoopsForInPredPage} +\pageto{notitle}{ugLangLoopsParPage} <>= \begin{page}{ugLangLoopsPage}{5.4. Loops} \beginscroll @@ -31675,8 +28522,8 @@ Loops can contain inner loops to any depth. \beginImportant The most basic loop is of the form \centerline{{\axiom{repeat} {\it loopBody}}} -Unless {\it loopBody} contains a \axiom{break} or \axiom{return} expression, -the loop repeats forever. +Unless {\it loopBody} contains a \axiom{break} or \axiom{return} +expression, the loop repeats forever. The value returned by the loop is \void{}. \endImportant @@ -31687,15 +28534,19 @@ The value returned by the loop is \void{}. \menudownlink{{5.4.3. break in Loops}}{ugLangLoopsBreakPage} \menudownlink{{5.4.4. break vs. {\tt =>} in Loop Bodies}} {ugLangLoopsBreakVsPage} - \menudownlink{{5.4.5. More Examples of break}}{ugLangLoopsBreakMorePage} + \menudownlink{{5.4.5. More Examples of break}} +{ugLangLoopsBreakMorePage} \menudownlink{{5.4.6. iterate in Loops}}{ugLangLoopsIteratePage} \menudownlink{{5.4.7. while Loops}}{ugLangLoopsWhilePage} \menudownlink{{5.4.8. for Loops}}{ugLangLoopsForInPage} - \menudownlink{{5.4.9. for i in n..m repeat}}{ugLangLoopsForInNMPage} - \menudownlink{{5.4.10. for i in n..m by s repeat}}{ugLangLoopsForInNMSPage} + \menudownlink{{5.4.9. for i in n..m repeat}} +{ugLangLoopsForInNMPage} + \menudownlink{{5.4.10. for i in n..m by s repeat}} +{ugLangLoopsForInNMSPage} \menudownlink{{5.4.11. for i in n.. repeat}}{ugLangLoopsForInNPage} \menudownlink{{5.4.12. for x in l repeat}}{ugLangLoopsForInXLPage} - \menudownlink{{5.4.13. ``Such that'' Predicates}}{ugLangLoopsForInPredPage} + \menudownlink{{5.4.13. ``Such that'' Predicates}} +{ugLangLoopsForInPredPage} \menudownlink{{5.4.14. Parallel Iteration}}{ugLangLoopsParPage} \endmenu \endscroll @@ -31703,22 +28554,12 @@ The value returned by the loop is \void{}. \end{page} @ +\pagehead{ugLangLoopsCompIntPage}{ug05.ht} +{Compiling vs. Interpreting Loops} +\pageto{notitle}{ugUserCompIntPage} <>= -\newcommand{\ugLangLoopsCompIntTitle}{Compiling vs. Interpreting Loops} -\newcommand{\ugLangLoopsCompIntNumber}{5.4.1.} - -@ -\section{Compiling vs. Interpreting Loops} -\label{ugLangLoopsCompIntPage} -\begin{itemize} -\item ugUserCompIntPage \ref{ugUserCompIntPage} on -page~\pageref{ugUserCompIntPage} -\end{itemize} -\index{pages!ugLangLoopsCompIntPage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsCompIntPage} -\index{ugLangLoopsCompIntPage!ug05.ht!pages} -<>= -\begin{page}{ugLangLoopsCompIntPage}{5.4.1. Compiling vs. Interpreting Loops} +\begin{page}{ugLangLoopsCompIntPage} +{5.4.1. Compiling vs. Interpreting Loops} \beginscroll Axiom tries to determine completely the type of every @@ -31729,7 +28570,8 @@ This translation is called \spadglossSee{compilation}{compiler}. If Axiom decides that it cannot compile the loop, it issues a message stating the problem and then the following message: % -\centerline{{{\bf We will attempt to step through and interpret the code.}}} +\centerline{ +{{\bf We will attempt to step through and interpret the code.}}} % It is still possible that Axiom can evaluate the loop but in \spadgloss{interpret-code mode}. @@ -31743,20 +28585,8 @@ of compiling versus interpreting functions. \end{page} @ -<>= -\newcommand{\ugLangLoopsReturnTitle}{return in Loops} -\newcommand{\ugLangLoopsReturnNumber}{5.4.2.} - -@ -\section{return in Loops} -\label{ugLangLoopsReturnPage} -\begin{itemize} -\item ugUserBlocksPage \ref{ugUserBlocksPage} on -page~\pageref{ugUserBlocksPage} -\end{itemize} -\index{pages!ugLangLoopsReturnPage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsReturnPage} -\index{ugLangLoopsReturnPage!ug05.ht!pages} +\pagehead{ugLangLoopsReturnPage}{ug05.ht}{return in Loops} +\pageto{notitle}{ugUserBlocksPage} <>= \begin{page}{ugLangLoopsReturnPage}{5.4.2. return in Loops} \beginscroll @@ -31838,20 +28668,8 @@ for more information. \end{page} @ -<>= -\newcommand{\ugLangLoopsBreakTitle}{break in Loops} -\newcommand{\ugLangLoopsBreakNumber}{5.4.3.} - -@ -\section{break in Loops} -\label{ugLangLoopsBreakPage} -\begin{itemize} -\item ugLangLoopsReturnPage \ref{ugLangLoopsReturnPage} on -page~\pageref{ugLangLoopsReturnPage} -\end{itemize} -\index{pages!ugLangLoopsBreakPage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsBreakPage} -\index{ugLangLoopsBreakPage!ug05.ht!pages} +\pagehead{ugLangLoopsBreakPage}{ug05.ht}{break in Loops} +\pageto{notitle}{ugLangLoopsReturnPage} <>= \begin{page}{ugLangLoopsBreakPage}{5.4.3. break in Loops} \beginscroll @@ -31917,18 +28735,11 @@ repeat \end{page} @ +\pagehead{ugLangLoopsBreakVsPage}{ug05.ht} +{break vs. {\tt =>} in Loop Bodies} <>= -\newcommand{\ugLangLoopsBreakVsTitle}{break vs. {\tt =>} in Loop Bodies} -\newcommand{\ugLangLoopsBreakVsNumber}{5.4.4.} - -@ -\section{break vs. {\tt =>} in Loop Bodies} -\label{ugLangLoopsBreakVsPage} -\index{pages!ugLangLoopsBreakVsPage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsBreakVsPage} -\index{ugLangLoopsBreakVsPage!ug05.ht!pages} -<>= -\begin{page}{ugLangLoopsBreakVsPage}{5.4.4. break vs. {\tt =>} in Loop Bodies} +\begin{page}{ugLangLoopsBreakVsPage} +{5.4.4. break vs. {\tt =>} in Loop Bodies} \beginscroll Compare the following two loops: @@ -31964,20 +28775,8 @@ lets you simulate the action of \axiom{break}. \end{page} @ -<>= -\newcommand{\ugLangLoopsBreakMoreTitle}{More Examples of break} -\newcommand{\ugLangLoopsBreakMoreNumber}{5.4.5.} - -@ -\section{More Examples of break} -\label{ugLangLoopsBreakMorePage} -\begin{itemize} -\item ugLangLoopsForInPage \ref{ugLangLoopsForInPage} on -page~\pageref{ugLangLoopsForInPage} -\end{itemize} -\index{pages!ugLangLoopsBreakMorePage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsBreakMorePage} -\index{ugLangLoopsBreakMorePage!ug05.ht!pages} +\pagehead{ugLangLoopsBreakMorePage}{ug05.ht}{More Examples of break} +\pageto{notitle}{ugLangLoopsForInPage} <>= \begin{page}{ugLangLoopsBreakMorePage}{5.4.5. More Examples of break} \beginscroll @@ -32055,7 +28854,9 @@ Look at the value of \axiom{f}. Finally, we show an example of nested loops. First define a four by four matrix. }{ -\spadpaste{m := matrix [[21,37,53,14], [8,-24,22,-16], [2,10,15,14], [26,33,55,-13]] \bound{m2}} +\spadpaste{m := +matrix [[21,37,53,14], [8,-24,22,-16], [2,10,15,14], +[26,33,55,-13]] \bound{m2}} } \xtc{ Next, set row counter \axiom{r} and column counter \axiom{c} to @@ -32069,7 +28870,8 @@ variables rather than global workspace variables. Also, let \axiom{lastrow} and \axiom{lastcol} be the final row and column index. }{ -\spadpaste{(lastrow, lastcol) := (nrows(m), ncols(m)) \bound{lastrow}\bound{lastcol}\free{m2}} +\spadpaste{(lastrow, lastcol) := (nrows(m), ncols(m)) +\bound{lastrow}\bound{lastcol}\free{m2}} } % \xtc{ @@ -32101,16 +28903,7 @@ repeat \end{page} @ -<>= -\newcommand{\ugLangLoopsIterateTitle}{iterate in Loops} -\newcommand{\ugLangLoopsIterateNumber}{5.4.6.} - -@ -\section{iterate in Loops} -\label{ugLangLoopsIteratePage} -\index{pages!ugLangLoopsIteratePage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsIteratePage} -\index{ugLangLoopsIteratePage!ug05.ht!pages} +\pagehead{ugLangLoopsIteratePage}{ug05.ht}{iterate in Loops} <>= \begin{page}{ugLangLoopsIteratePage}{5.4.6. iterate in Loops} \beginscroll @@ -32140,16 +28933,7 @@ repeat \end{page} @ -<>= -\newcommand{\ugLangLoopsWhileTitle}{while Loops} -\newcommand{\ugLangLoopsWhileNumber}{5.4.7.} - -@ -\section{while Loops} -\label{ugLangLoopsWhilePage} -\index{pages!ugLangLoopsWhilePage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsWhilePage} -\index{ugLangLoopsWhilePage!ug05.ht!pages} +\pagehead{ugLangLoopsWhilePage}{ug05.ht}{while Loops} <>= \begin{page}{ugLangLoopsWhilePage}{5.4.7. while Loops} \beginscroll @@ -32209,8 +28993,9 @@ while x < 4 and y < 10 repeat \end{spadsrc} } \xtc{ -A \axiom{break} expression can be included in a loop body to terminate a -loop even if the predicate in any \axiom{while} clauses are not \axiom{false}. +A \axiom{break} expression can be included in a loop body to terminate +a loop even if the predicate in any \axiom{while} clauses are not +\axiom{false}. }{ \spadpaste{(x, y) := (1, 1) \bound{x1}\bound{y1}} } @@ -32230,7 +29015,8 @@ while x < 4 while y < 10 repeat Here's a different version of the nested loops that looked for the first negative element in a matrix. }{ -\spadpaste{m := matrix [[21,37,53,14], [8,-24,22,-16], [2,10,15,14], [26,33,55,-13]] \bound{m2}} +\spadpaste{m := matrix [[21,37,53,14], [8,-24,22,-16], [2,10,15,14], +[26,33,55,-13]] \bound{m2}} } \xtc{ Initialized the row index to \axiom{1} and @@ -32242,7 +29028,8 @@ local variables. } \xtc{ }{ -\spadpaste{(lastrow, lastcol) := (nrows(m), ncols(m)) \bound{lastrow}\bound{lastcol}\free{m2}} +\spadpaste{(lastrow, lastcol) := (nrows(m), ncols(m)) +\bound{lastrow}\bound{lastcol}\free{m2}} } % \xtc{ @@ -32266,16 +29053,7 @@ while r <= lastrow repeat \end{page} @ -<>= -\newcommand{\ugLangLoopsForInTitle}{for Loops} -\newcommand{\ugLangLoopsForInNumber}{5.4.8.} - -@ -\section{for Loops} -\label{ugLangLoopsForInPage} -\index{pages!ugLangLoopsForInPage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsForInPage} -\index{ugLangLoopsForInPage!ug05.ht!pages} +\pagehead{ugLangLoopsForInPage}{ug05.ht}{for Loops} <>= \begin{page}{ugLangLoopsForInPage}{5.4.8. for Loops} \beginscroll @@ -32302,8 +29080,8 @@ The {\it iterator} has several forms. Each form has an end test which is evaluated before {\it loopBody} is evaluated. A \axiom{for} loop terminates immediately when the end test -succeeds (evaluates to \axiom{true}) or when a \axiom{break} or \axiom{return} -expression is evaluated in {\it loopBody}. +succeeds (evaluates to \axiom{true}) or when a \axiom{break} or +\axiom{return} expression is evaluated in {\it loopBody}. The value returned by the loop is \void{}. \endImportant @@ -32312,20 +29090,8 @@ The value returned by the loop is \void{}. \end{page} @ -<>= -\newcommand{\ugLangLoopsForInNMTitle}{for i in n..m repeat} -\newcommand{\ugLangLoopsForInNMNumber}{5.4.9.} - -@ -\section{for i in n..m repeat} -\label{ugLangLoopsForInNMPage} -\begin{itemize} -\item SegmentXmpPage \ref{SegmentXmpPage} on -page~\pageref{SegmentXmpPage} -\end{itemize} -\index{pages!ugLangLoopsForInNMPage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsForInNMPage} -\index{ugLangLoopsForInNMPage!ug05.ht!pages} +\pagehead{ugLangLoopsForInNMPage}{ug05.ht}{for i in n..m repeat} +\pageto{notitle}{SegmentXmpPage} <>= \begin{page}{ugLangLoopsForInNMPage}{5.4.9. for i in n..m repeat} \beginscroll @@ -32363,7 +29129,8 @@ Here is a sample list. \spadpaste{a := [1,2,3] \bound{a}} } \xtc{ -Iterate across this list, using \axiomSyntax{.} to access the elements of a list and +Iterate across this list, +using \axiomSyntax{.} to access the elements of a list and the \axiomFun{\#} operation to count its elements. }{ \spadpaste{for i in 1..\#a repeat output(a.i) \free{a}} @@ -32403,16 +29170,7 @@ for more information about segments. \end{page} @ -<>= -\newcommand{\ugLangLoopsForInNMSTitle}{for i in n..m by s repeat} -\newcommand{\ugLangLoopsForInNMSNumber}{5.4.10.} - -@ -\section{for i in n..m by s repeat} -\label{ugLangLoopsForInNMSPage} -\index{pages!ugLangLoopsForInNMSPage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsForInNMSPage} -\index{ugLangLoopsForInNMSPage!ug05.ht!pages} +\pagehead{ugLangLoopsForInNMSPage}{ug05.ht}{for i in n..m by s repeat} <>= \begin{page}{ugLangLoopsForInNMSPage}{5.4.10. for i in n..m by s repeat} \beginscroll @@ -32446,16 +29204,7 @@ Use this to display the numbers in reverse order. \end{page} @ -<>= -\newcommand{\ugLangLoopsForInNTitle}{for i in n.. repeat} -\newcommand{\ugLangLoopsForInNNumber}{5.4.11.} - -@ -\section{for i in n.. repeat} -\label{ugLangLoopsForInNPage} -\index{pages!ugLangLoopsForInNPage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsForInNPage} -\index{ugLangLoopsForInNPage!ug05.ht!pages} +\pagehead{ugLangLoopsForInNPage}{ug05.ht}{for i in n.. repeat} <>= \begin{page}{ugLangLoopsForInNPage}{5.4.11. for i in n.. repeat} \beginscroll @@ -32481,16 +29230,7 @@ and less than the first prime greater than \axiom{15}. \end{page} @ -<>= -\newcommand{\ugLangLoopsForInXLTitle}{for x in l repeat} -\newcommand{\ugLangLoopsForInXLNumber}{5.4.12.} - -@ -\section{for x in l repeat} -\label{ugLangLoopsForInXLPage} -\index{pages!ugLangLoopsForInXLPage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsForInXLPage} -\index{ugLangLoopsForInXLPage!ug05.ht!pages} +\pagehead{ugLangLoopsForInXLPage}{ug05.ht}{for x in l repeat} <>= \begin{page}{ugLangLoopsForInXLPage}{5.4.12. for x in l repeat} \beginscroll @@ -32546,16 +29286,7 @@ This displays each of the factors of \axiom{2400000}. \end{page} @ -<>= -\newcommand{\ugLangLoopsForInPredTitle}{``Such that'' Predicates} -\newcommand{\ugLangLoopsForInPredNumber}{5.4.13.} - -@ -\section{``Such that'' Predicates} -\label{ugLangLoopsForInPredPage} -\index{pages!ugLangLoopsForInPredPage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsForInPredPage} -\index{ugLangLoopsForInPredPage!ug05.ht!pages} +\pagehead{ugLangLoopsForInPredPage}{ug05.ht}{``Such that'' Predicates} <>= \begin{page}{ugLangLoopsForInPredPage}{5.4.13. ``Such that'' Predicates} \beginscroll @@ -32576,10 +29307,12 @@ such that \axiom{n} is odd. \beginImportant A \axiom{for} loop can also be written -\centerline{{\axiom{for} {\it iterator} \axiom{|} {\it predicate} \axiom{repeat} {\it loopBody}}} +\centerline{{\axiom{for} {\it iterator} \axiom{|} {\it predicate} +\axiom{repeat} {\it loopBody}}} which is equivalent to: \centerline{{\axiom{for} {\it iterator} \axiom{repeat if}}} -\centerline{{{\it predicate} \axiom{then} {\it loopBody} \axiom{else} \axiom{iterate}}} +\centerline{{{\it predicate} \axiom{then} {\it loopBody} \axiom{else} +\axiom{iterate}}} \endImportant The predicate need not refer only to the variable in the \axiom{for} clause: @@ -32601,20 +29334,8 @@ for i in 1..50 repeat \end{page} @ -<>= -\newcommand{\ugLangLoopsParTitle}{Parallel Iteration} -\newcommand{\ugLangLoopsParNumber}{5.4.14.} - -@ -\section{Parallel Iteration} -\label{ugLangLoopsParPage} -\begin{itemize} -\item ugLangLoopsForInPredPage \ref{ugLangLoopsForInPredPage} on -page~\pageref{ugLangLoopsForInPredPage} -\end{itemize} -\index{pages!ugLangLoopsParPage!ug05.ht} -\index{ug05.ht!pages!ugLangLoopsParPage} -\index{ugLangLoopsParPage!ug05.ht!pages} +\pagehead{ugLangLoopsParPage}{ug05.ht}{Parallel Iteration} +\pageto{notitle}{ugLangLoopsForInPredPage} <>= \begin{page}{ugLangLoopsParPage}{5.4.14. Parallel Iteration} \beginscroll @@ -32631,7 +29352,8 @@ you want to traverse a list while incrementing a variable. \beginImportant The general syntax of a repeat loop is -\centerline{{{\tt \subscriptIt{iterator}{1} \subscriptIt{iterator}{2} \ldots \subscriptIt{iterator}{N} repeat {\it loopBody}}}} +\centerline{{{\tt \subscriptIt{iterator}{1} \subscriptIt{iterator}{2} +\ldots \subscriptIt{iterator}{N} repeat {\it loopBody}}}} where each {\it iterator} is either a \axiom{for} or a \axiom{while} clause. The loop terminates immediately when the end test of any {\it iterator} succeeds or when a \axiom{break} or \axiom{return} expression is evaluated @@ -32687,7 +29409,8 @@ The initial sum. Here looping stops when the list \axiom{l} is exhausted, even though the \axiom{for i in 0..} specifies no terminating condition. }{ -\spadpaste{for i in 0.. for x in l repeat sum := i * x \bound{doit1}\free{sum1 l1}} +\spadpaste{ +for i in 0.. for x in l repeat sum := i * x \bound{doit1}\free{sum1 l1}} } \xtc{ Display this weighted sum. @@ -32713,9 +29436,7 @@ for i in 1..10 | odd? (i+j) repeat -- wrong, j not defined output [i,j] \end{verbatim} -%>% ********************************************************************* %>\head{subsection}{Mixing Loop Modifiers}{ugLangLoopsMix} -%>% ********************************************************************* \xtc{ This example shows that it is possible to mix several of the @@ -32749,24 +29470,10 @@ or any \axiom{for} clause to the left. \end{page} @ -<>= -\newcommand{\ugLangItsTitle}{Creating Lists and Streams with Iterators} -\newcommand{\ugLangItsNumber}{5.5.} - -@ -\section{Creating Lists and Streams with Iterators} -\label{ugLangItsPage} -\begin{itemize} -\item ugLangLoopsPage \ref{ugLangLoopsPage} on -page~\pageref{ugLangLoopsPage} -\item ListXmpPage \ref{ListXmpPage} on -page~\pageref{ListXmpPage} -\item StreamXmpPage \ref{StreamXmpPage} on -page~\pageref{StreamXmpPage} -\end{itemize} -\index{pages!ugLangItsPage!ug05.ht} -\index{ug05.ht!pages!ugLangItsPage} -\index{ugLangItsPage!ug05.ht!pages} +\pagehead{ugLangItsPage}{ug05.ht}{Creating Lists and Streams with Iterators} +\pageto{notitle}{ugLangLoopsPage} +\pageto{notitle}{ListXmpPage} +\pageto{notitle}{StreamXmpPage} <>= \begin{page}{ugLangItsPage}{5.5. Creating Lists and Streams with Iterators} \beginscroll @@ -32820,7 +29527,8 @@ Here is the general rule. \beginImportant The general syntax of a collection is -\centerline{{{\tt [ {\it collectExpression} \subscriptIt{iterator}{1} \subscriptIt{iterator}{2} \ldots \subscriptIt{iterator}{N} ]}}} +\centerline{{{\tt [ {\it collectExpression} \subscriptIt{iterator}{1} +\subscriptIt{iterator}{2} \ldots \subscriptIt{iterator}{N} ]}}} where each \subscriptIt{iterator}{i} is either a \axiom{for} or a \axiom{while} clause. The loop terminates immediately when the end test of any @@ -32876,7 +29584,8 @@ Iteration stops if the end of a list or stream is reached. As with loops, you can combine these modifiers to make very complicated conditions. }{ -\spadpaste{[[[i,j] for i in 10..15 | prime? i] for j in 17..22 | j = squareFreePart j]} +\spadpaste{[[[i,j] for i in 10..15 | prime? i] +for j in 17..22 | j = squareFreePart j]} } See \downlink{`List'}{ListXmpPage}\ignore{List} and @@ -32889,26 +29598,16 @@ manipulating lists and streams, respectively. \end{page} @ -<>= -\newcommand{\ugLangStreamsPrimesTitle}{An Example: Streams of Primes} -\newcommand{\ugLangStreamsPrimesNumber}{5.6.} - -@ -\section{An Example: Streams of Primes} -\label{ugLangStreamsPrimesPage} -\index{pages!ugLangStreamsPrimesPage!ug05.ht} -\index{ug05.ht!pages!ugLangStreamsPrimesPage} -\index{ugLangStreamsPrimesPage!ug05.ht!pages} +\pagehead{ugLangStreamsPrimesPage}{ug05.ht}{An Example: Streams of Primes} <>= \begin{page}{ugLangStreamsPrimesPage}{5.6. An Example: Streams of Primes} \beginscroll -We conclude this chapter with an example of the creation and manipulation -of infinite streams of prime integers. -This might be useful for experiments with numbers or other applications -where you are using sequences of primes over and over again. -As for all streams, the stream of primes is only computed as far out as you -need. +We conclude this chapter with an example of the creation and +manipulation of infinite streams of prime integers. This might be +useful for experiments with numbers or other applications where you +are using sequences of primes over and over again. As for all +streams, the stream of primes is only computed as far out as you need. Once computed, however, all the primes up to that point are saved for future reference. @@ -32916,8 +29615,8 @@ Two useful operations provided by the Axiom library are \axiomFunFrom{prime?}{IntegerPrimesPackage} and \axiomFunFrom{nextPrime}{IntegerPrimesPackage}. A straight-forward way to create a stream of -prime numbers is to start with the stream of positive integers \axiom{[2,..]} and -filter out those that are prime. +prime numbers is to start with the stream of positive integers +\axiom{[2,..]} and filter out those that are prime. \xtc{ Create a stream of primes. }{ @@ -32940,7 +29639,8 @@ generate an infinite stream of primes. Once the stream is generated, you might only be interested in primes starting at a particular value. }{ -\spadpaste{smallPrimes := [p for p in primes | p > 1000] \bound{smallPrimes}} +\spadpaste{smallPrimes := [p for p in primes | p > 1000] +\bound{smallPrimes}} } \xtc{ Here are the first 11 primes greater than 1000. @@ -32970,7 +29670,8 @@ avoid the call to \axiomFunFrom{prime?}{IntegerPrimesPackage} by using a double iteration. This time we'll just generate a stream of the first of the twin primes. }{ -\spadpaste{firstOfTwins:= [p for p in primes for q in rest primes | q=p+2]} +\spadpaste{ +firstOfTwins:= [p for p in primes for q in rest primes | q=p+2]} } Let's try to compute the infinite stream of triplet primes, @@ -32984,20 +29685,17 @@ This time however, put a semicolon at the end of the line. Put a semicolon at the end so that no elements are computed. }{ -\spadpaste{firstTriplets := [p for p in firstOfTwins for q in rest firstOfTwins | q = p+2];} +\spadpaste{firstTriplets := +[p for p in firstOfTwins for q in rest firstOfTwins | q = p+2];} } -What happened? -As you know, by default -Axiom displays the first ten -elements of a stream when you first display it. -And, therefore, it needs to compute them! -If you want {\it no} elements computed, just terminate the expression by a -semicolon (\axiomSyntax{;}).\footnote{ +What happened? As you know, by default Axiom displays the first ten +elements of a stream when you first display it. And, therefore, it +needs to compute them! If you want {\it no} elements computed, just +terminate the expression by a semicolon (\axiomSyntax{;}).\footnote{ Why does this happen? The semi-colon prevents the display of the -result of evaluating the expression. -Since no stream elements are needed for display (or anything else, so far), -none are computed. +result of evaluating the expression. Since no stream elements are +needed for display (or anything else, so far), none are computed. } \xtc{ @@ -33041,94 +29739,44 @@ How big is the \eth{\axiom{2045}} prime? \spadpaste{primes.2045} } -What you have learned is that there are no triplet primes between 5 and -17837. -Although this result is well known (some might even say trivial), there -are many experiments you could make where the result is not known. -What you see here is a paradigm for testing of hypotheses. -Here our hypothesis could have been: ``there is more than one triplet -prime.'' -We have tested this hypothesis for 17837 cases. -With streams, you can let your machine run, interrupt it to see how far -it has progressed, -then start it up and let it continue from where it left off. - -%> RDJ note to RSS: -%> Expressions not statements or lines-- -%> By an expression I mean any syntactically correct program fragment. -%> Everything in Axiom is an expression since every fragment has a value and a type. -%> In most languages including LISP, a "statement" is different from an expression: -%> it is executed for side-effect only and an error is incurred if you assign it a value. -%> This "gimmick" takes care of incomplete expressions such as "if x > 0 then y" in blocks. -%> In LISP, "u := (if x > 0 then y)" is illegal but in Axiom it is legal. -%> Also, in Axiom the value of a repeat loop is void even though you might be -%> be able to prove that it always returns a valid value (you have an example of this)! -%> This will be considered a bug not a feature. But it is how things stand. -%> In any case---this point should be in a box somewhere since it is key -%> to a user's understanding to the language. I am not sure where. You only -%> gain an appreciation for it after are awhile in chapter 5. +What you have learned is that there are no triplet primes between 5 +and 17837. Although this result is well known (some might even say +trivial), there are many experiments you could make where the result +is not known. What you see here is a paradigm for testing of +hypotheses. Here our hypothesis could have been: ``there is more than +one triplet prime.'' We have tested this hypothesis for 17837 cases. +With streams, you can let your machine run, interrupt it to see how +far it has progressed, then start it up and let it continue from where +it left off. + \endscroll \autobuttons \end{page} @ \chapter{Users Guide Chapter 6 (ug06.ht)} -<>= -\newcommand{\pred}[1]{\subscriptIt{pred}{#1}} -\newcommand{\expr}[1]{\subscriptIt{expression}{#1}} -\newcommand{\ugUserTitle}{User-Defined Functions, Macros and Rules} -\newcommand{\ugUserNumber}{6.} - -@ -\section{User-Defined Functions, Macros and Rules} -\label{ugUserPage} -\begin{itemize} -\item ugUserFunMacPage \ref{ugUserFunMacPage} on -page~\pageref{ugUserFunMacPage} -\item ugUserMacrosPage \ref{ugUserMacrosPage} on -page~\pageref{ugUserMacrosPage} -\item ugUserIntroPage \ref{ugUserIntroPage} on -page~\pageref{ugUserIntroPage} -\item ugUserDeclarePage \ref{ugUserDeclarePage} on -page~\pageref{ugUserDeclarePage} -\item ugUserOnePage \ref{ugUserOnePage} on -page~\pageref{ugUserOnePage} -\item ugUserDecUndecPage \ref{ugUserDecUndecPage} on -page~\pageref{ugUserDecUndecPage} -\item ugUserDecOpersPage \ref{ugUserDecOpersPage} on -page~\pageref{ugUserDecOpersPage} -\item ugUserDelayPage \ref{ugUserDelayPage} on -page~\pageref{ugUserDelayPage} -\item ugUserUsePage \ref{ugUserUsePage} on -page~\pageref{ugUserUsePage} -\item ugUserCompIntPage \ref{ugUserCompIntPage} on -page~\pageref{ugUserCompIntPage} -\item ugUserPiecePage \ref{ugUserPiecePage} on -page~\pageref{ugUserPiecePage} -\item ugUserCachePage \ref{ugUserCachePage} on -page~\pageref{ugUserCachePage} -\item ugUserRecurPage \ref{ugUserRecurPage} on -page~\pageref{ugUserRecurPage} -\item ugUserMakePage \ref{ugUserMakePage} on -page~\pageref{ugUserMakePage} -\item ugUserBlocksPage \ref{ugUserBlocksPage} on -page~\pageref{ugUserBlocksPage} -\item ugUserFreeLocalPage \ref{ugUserFreeLocalPage} on -page~\pageref{ugUserFreeLocalPage} -\item ugUserAnonPage \ref{ugUserAnonPage} on -page~\pageref{ugUserAnonPage} -\item ugUserDatabasePage \ref{ugUserDatabasePage} on -page~\pageref{ugUserDatabasePage} -\item ugUserTrianglePage \ref{ugUserTrianglePage} on -page~\pageref{ugUserTrianglePage} -\item ugUserPalPage \ref{ugUserPalPage} on -page~\pageref{ugUserPalPage} -\item ugUserRulesPage \ref{ugUserRulesPage} on -page~\pageref{ugUserRulesPage} -\end{itemize} -\index{pages!ugUserPage!ug06.ht} -\index{ug06.ht!pages!ugUserPage} -\index{ugUserPage!ug06.ht!pages} +\pagehead{ugUserPage}{ug06.ht}{User-Defined Functions, Macros and Rules} +\pageto{notitle}{ugUserFunMacPage} +\pageto{notitle}{ugUserMacrosPage} +\pageto{notitle}{ugUserIntroPage} +\pageto{notitle}{ugUserDeclarePage} +\pageto{notitle}{ugUserOnePage} +\pageto{notitle}{ugUserDecUndecPage} +\pageto{notitle}{ugUserDecOpersPage} +\pageto{notitle}{ugUserDelayPage} +\pageto{notitle}{ugUserUsePage} +\pageto{notitle}{ugUserCompIntPage} +\pageto{notitle}{ugUserPiecePage} +\pageto{notitle}{ugUserCachePage} +\pageto{notitle}{ugUserRecurPage} +\pageto{notitle}{ugUserMakePage} +\pageto{notitle}{ugUserBlocksPage} +\pageto{notitle}{ugUserFreeLocalPage} +\pageto{notitle}{ugUserAnonPage} +\pageto{notitle}{ugUserDatabasePage} +\pageto{notitle}{ugUserTrianglePage} +\pageto{notitle}{ugUserPalPage} +\pageto{notitle}{ugUserRulesPage} <>= \begin{page}{ugUserPage}{6. User-Defined Functions, Macros and Rules} \beginscroll @@ -33143,25 +29791,35 @@ piles. \menudownlink{{6.1. Functions vs. Macros}}{ugUserFunMacPage} \menudownlink{{6.2. Macros}}{ugUserMacrosPage} \menudownlink{{6.3. Introduction to Functions}}{ugUserIntroPage} - \menudownlink{{6.4. Declaring the Type of Functions}}{ugUserDeclarePage} + \menudownlink{{6.4. Declaring the Type of Functions}} +{ugUserDeclarePage} \menudownlink{{6.5. One-Line Functions}}{ugUserOnePage} - \menudownlink{{6.6. Declared vs. Undeclared Functions}}{ugUserDecUndecPage} + \menudownlink{{6.6. Declared vs. Undeclared Functions}} +{ugUserDecUndecPage} \menudownlink{{6.7. Functions vs. Operations}}{ugUserDecOpersPage} - \menudownlink{{6.8. Delayed Assignments vs. Functions with No Arguments}} + \menudownlink{ +{6.8. Delayed Assignments vs. Functions with No Arguments}} {ugUserDelayPage} \menudownlink{{6.9. How Axiom Determines What Function to Use}} {ugUserUsePage} - \menudownlink{{6.10. Compiling vs. Interpreting}}{ugUserCompIntPage} - \menudownlink{{6.11. Piece-Wise Function Definitions}}{ugUserPiecePage} - \menudownlink{{6.12. Caching Previously Computed Results}}{ugUserCachePage} + \menudownlink{{6.10. Compiling vs. Interpreting}} +{ugUserCompIntPage} + \menudownlink{{6.11. Piece-Wise Function Definitions}} +{ugUserPiecePage} + \menudownlink{{6.12. Caching Previously Computed Results}} +{ugUserCachePage} \menudownlink{{6.13. Recurrence Relations}}{ugUserRecurPage} - \menudownlink{{6.14. Making Functions from Objects}}{ugUserMakePage} - \menudownlink{{6.15. Functions Defined with Blocks}}{ugUserBlocksPage} + \menudownlink{{6.14. Making Functions from Objects}} +{ugUserMakePage} + \menudownlink{{6.15. Functions Defined with Blocks}} +{ugUserBlocksPage} \menudownlink{{6.16. Free and Local Variables}}{ugUserFreeLocalPage} \menudownlink{{6.17. Anonymous Functions}}{ugUserAnonPage} \menudownlink{{6.18. Example: A Database}}{ugUserDatabasePage} - \menudownlink{{6.19. Example: A Famous Triangle}}{ugUserTrianglePage} - \menudownlink{{6.20. Example: Testing for Palindromes}}{ugUserPalPage} + \menudownlink{{6.19. Example: A Famous Triangle}} +{ugUserTrianglePage} + \menudownlink{{6.20. Example: Testing for Palindromes}} +{ugUserPalPage} \menudownlink{{6.21. Rules and Pattern Matching}}{ugUserRulesPage} \endmenu \endscroll @@ -33169,24 +29827,10 @@ piles. \end{page} @ -<>= -\newcommand{\ugUserFunMacTitle}{Functions vs. Macros} -\newcommand{\ugUserFunMacNumber}{6.1.} - -@ -\section{Functions vs. Macros} -\label{ugUserFunMacPage} -\begin{itemize} -\item ugUserAnonPage \ref{ugUserAnonPage} on -page~\pageref{ugUserAnonPage} -\item ExitXmpPage \ref{ExitXmpPage} on -page~\pageref{ExitXmpPage} -\item VoidXmpPage \ref{VoidXmpPage} on -page~\pageref{VoidXmpPage} -\end{itemize} -\index{pages!ugUserFunMacPage!ug06.ht} -\index{ug06.ht!pages!ugUserFunMacPage} -\index{ugUserFunMacPage!ug06.ht!pages} +\pagehead{ugUserFunMacPage}{ug06.ht}{Functions vs. Macros} +\pageto{notitle}{ugUserAnonPage} +\pageto{notitle}{ExitXmpPage} +\pageto{notitle}{VoidXmpPage} <>= \begin{page}{ugUserFunMacPage}{6.1. Functions vs. Macros} \beginscroll @@ -33221,16 +29865,14 @@ of a computation, but not always (for example, see They may also read data from your keyboard, move information from one place to another, or format and display results on your screen. -In Axiom, as in mathematics, functions -are usually \spadglossSee{parameterized}{parameterized form}. -Each time you {\it call} (some people say \spadgloss{apply} or -\spadglossSee{invoke}{invocation}) a function, you give -values to the parameters (variables). -Such a value is called an \spadgloss{argument} of -the function. -Axiom uses the arguments for the computation. -In this way you get different results depending on what you ``feed'' the -function. +In Axiom, as in mathematics, functions are usually +\spadglossSee{parameterized}{parameterized form}. Each time you {\it +call} (some people say \spadgloss{apply} or +\spadglossSee{invoke}{invocation}) a function, you give values to the +parameters (variables). Such a value is called an +\spadgloss{argument} of the function. Axiom uses the arguments for +the computation. In this way you get different results depending on +what you ``feed'' the function. Functions can have local variables or refer to global variables in the workspace. @@ -33238,28 +29880,18 @@ Axiom can often \spadglossSee{compile}{compiler} functions so that they execute very efficiently. Functions can be passed as arguments to other functions. -Macros are textual substitutions. -They are used to clarify the meaning of constants or expressions and to be -templates for frequently used expressions. -Macros can be parameterized but they are not objects that can be passed as -arguments to functions. -In effect, macros are extensions to the Axiom expression parser. +Macros are textual substitutions. They are used to clarify the +meaning of constants or expressions and to be templates for frequently +used expressions. Macros can be parameterized but they are not +objects that can be passed as arguments to functions. In effect, +macros are extensions to the Axiom expression parser. \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugUserMacrosTitle}{Macros} -\newcommand{\ugUserMacrosNumber}{6.2.} - -@ -\section{Macros} -\label{ugUserMacrosPage} -\index{pages!ugUserMacrosPage!ug06.ht} -\index{ug06.ht!pages!ugUserMacrosPage} -\index{ugUserMacrosPage!ug06.ht!pages} +\pagehead{ugUserMacrosPage}{ug06.ht}{Macros} <>= \begin{page}{ugUserMacrosPage}{6.2. Macros} \beginscroll @@ -33323,7 +29955,8 @@ defined in terms of \axiom{ff}. \xtc{ The body of a macro can be a block. }{ -\spadpaste{macro next == (past := present; present := future; future := past + present) \bound{next}} +\spadpaste{macro next == (past := present; present := future; +future := past + present) \bound{next}} } \xtc{ Before entering \axiom{next}, we need @@ -33382,22 +30015,9 @@ use the library operation \axiomFun{fibonacci}. \end{page} @ -<>= -\newcommand{\ugUserIntroTitle}{Introduction to Functions} -\newcommand{\ugUserIntroNumber}{6.3.} - -@ -\section{Introduction to Functions} -\label{ugUserIntroPage} -\begin{itemize} -\item ugTypesPkgCallPage \ref{ugTypesPkgCallPage} on -page~\pageref{ugTypesPkgCallPage} -\item ugUserAnonPage \ref{ugUserAnonPage} on -page~\pageref{ugUserAnonPage} -\end{itemize} -\index{pages!ugUserIntroPage!ug06.ht} -\index{ug06.ht!pages!ugUserIntroPage} -\index{ugUserIntroPage!ug06.ht!pages} +\pagehead{ugUserIntroPage}{ug06.ht}{Introduction to Functions} +\pageto{notitle}{ugTypesPkgCallPage} +\pageto{notitle}{ugUserAnonPage} <>= \begin{page}{ugUserIntroPage}{6.3. Introduction to Functions} \beginscroll @@ -33492,20 +30112,8 @@ but with different functions. \end{page} @ -<>= -\newcommand{\ugUserDeclareTitle}{Declaring the Type of Functions} -\newcommand{\ugUserDeclareNumber}{6.4.} - -@ -\section{Declaring the Type of Functions} -\label{ugUserDeclarePage} -\begin{itemize} -\item ugTypesDeclarePage \ref{ugTypesDeclarePage} on -page~\pageref{ugTypesDeclarePage} -\end{itemize} -\index{pages!ugUserDeclarePage!ug06.ht} -\index{ug06.ht!pages!ugUserDeclarePage} -\index{ugUserDeclarePage!ug06.ht!pages} +\pagehead{ugUserDeclarePage}{ug06.ht}{Declaring the Type of Functions} +\pageto{notitle}{ugTypesDeclarePage} <>= \begin{page}{ugUserDeclarePage}{6.4. Declaring the Type of Functions} \beginscroll @@ -33562,7 +30170,10 @@ of the following declarations is acceptable. \beginImportant Functions can also be declared when they are being defined. The syntax for combined declaration/definition is: -\centerline{{\frenchspacing{\tt {\it functionName}(\subscriptIt{parm}{1}: \subscriptIt{parmType}{1}, \ldots, \subscriptIt{parm}{N}: \subscriptIt{parmType}{N}): {\it functionReturnType}}}} +\centerline{{\frenchspacing{\tt {\it functionName}( +\subscriptIt{parm}{1}: \subscriptIt{parmType}{1}, \ldots, +\subscriptIt{parm}{N}: \subscriptIt{parmType}{N}): +{\it functionReturnType}}}} \endImportant The following definition fragments show how this can be done for @@ -33585,16 +30196,7 @@ in Section \ugTypesDeclareNumber\ignore{ugTypesDeclare}. \end{page} @ -<>= -\newcommand{\ugUserOneTitle}{One-Line Functions} -\newcommand{\ugUserOneNumber}{6.5.} - -@ -\section{One-Line Functions} -\label{ugUserOnePage} -\index{pages!ugUserOnePage!ug06.ht} -\index{ug06.ht!pages!ugUserOnePage} -\index{ugUserOnePage!ug06.ht!pages} +\pagehead{ugUserOnePage}{ug06.ht}{One-Line Functions} <>= \begin{page}{ugUserOnePage}{6.5. One-Line Functions} \beginscroll @@ -33642,13 +30244,15 @@ Generate a stream of Mersenne numbers. Create a stream of those values of \axiom{i} such that \axiom{mersenne(i)} is prime. }{ -\spadpaste{mersenneIndex := [n for n in 1.. | prime?(mersenne(n))] \bound{mersenneIndex}\free{mersenne}} +\spadpaste{mersenneIndex := [n for n in 1.. | prime?(mersenne(n))] +\bound{mersenneIndex}\free{mersenne}} } \xtc{ Finally, write a function that returns the \eth{\axiom{n}} Mersenne prime. }{ -\spadpaste{mersennePrime n == mersenne mersenneIndex(n) \free{mersenne mersenneIndex}\bound{mersennePrime}} +\spadpaste{mersennePrime n == mersenne mersenneIndex(n) +\free{mersenne mersenneIndex}\bound{mersennePrime}} } \xtc{ }{ @@ -33660,20 +30264,8 @@ prime. \end{page} @ -<>= -\newcommand{\ugUserDecUndecTitle}{Declared vs. Undeclared Functions} -\newcommand{\ugUserDecUndecNumber}{6.6.} - -@ -\section{Declared vs. Undeclared Functions} -\label{ugUserDecUndecPage} -\begin{itemize} -\item ugCategoriesPage \ref{ugCategoriesPage} on -page~\pageref{ugCategoriesPage} -\end{itemize} -\index{pages!ugUserDecUndecPage!ug06.ht} -\index{ug06.ht!pages!ugUserDecUndecPage} -\index{ugUserDecUndecPage!ug06.ht!pages} +\pagehead{ugUserDecUndecPage}{ug06.ht}{Declared vs. Undeclared Functions} +\pageto{notitle}{ugCategoriesPage} <>= \begin{page}{ugUserDecUndecPage}{6.6. Declared vs. Undeclared Functions} \beginscroll @@ -33738,26 +30330,11 @@ Axiom has a formal idea of categories for what ``makes sense.'' \end{page} @ -<>= -\newcommand{\ugUserDecOpersTitle}{Functions vs. Operations} -\newcommand{\ugUserDecOpersNumber}{6.7.} - -@ -\section{Functions vs. Operations} -\label{ugUserDecOpersPage} -\begin{itemize} -\item MappingPackageOneXmpPage \ref{MappingPackageOneXmpPage} on -page~\pageref{MappingPackageOneXmpPage} -\item ugPackagesAbstractPage \ref{ugPackagesAbstractPage} on -page~\pageref{ugPackagesAbstractPage} -\item ugPackagesPage \ref{ugPackagesPage} on -page~\pageref{ugPackagesPage} -\item ugCategoriesPage \ref{ugCategoriesPage} on -page~\pageref{ugCategoriesPage} -\end{itemize} -\index{pages!ugUserDecOpersPage!ug06.ht} -\index{ug06.ht!pages!ugUserDecOpersPage} -\index{ugUserDecOpersPage!ug06.ht!pages} +\pagehead{ugUserDecOpersPage}{ug06.ht}{Functions vs. Operations} +\pageto{notitle}{MappingPackageOneXmpPage} +\pageto{notitle}{ugPackagesAbstractPage} +\pageto{notitle}{ugPackagesPage} +\pageto{notitle}{ugCategoriesPage} <>= \begin{page}{ugUserDecOpersPage}{6.7. Functions vs. Operations} \beginscroll @@ -33771,64 +30348,47 @@ Yet, we often seem to use the term \spadgloss{operation} and function interchangeably in Axiom. What is the distinction? -First consider values and types associated with some variable \axiom{n} in -your workspace. -You can make the declaration \axiom{n : Integer}, then assign \axiom{n} an -integer value. -You then speak of the integer \axiom{n}. -However, note that the integer is not the name \axiom{n} itself, but -the value that you assign to \axiom{n}. - -Similarly, you can declare a variable \axiom{f} in your workspace to have -type \spadsig{Integer}{Integer}, then assign \axiom{f}, through a definition -or an assignment of an anonymous function. -You then speak of the function \axiom{f}. -However, the function is not \axiom{f}, but the value that you -assign to \axiom{f}. +First consider values and types associated with some variable +\axiom{n} in your workspace. You can make the declaration \axiom{n : +Integer}, then assign \axiom{n} an integer value. You then speak of +the integer \axiom{n}. However, note that the integer is not the name +\axiom{n} itself, but the value that you assign to \axiom{n}. + +Similarly, you can declare a variable \axiom{f} in your workspace to +have type \spadsig{Integer}{Integer}, then assign \axiom{f}, through a +definition or an assignment of an anonymous function. You then speak +of the function \axiom{f}. However, the function is not \axiom{f}, +but the value that you assign to \axiom{f}. A function is a value, in fact, some machine code for doing something. -Doing what? -Well, performing some \spadgloss{operation}. -Formally, an operation consists of the constituent parts of \axiom{f} in your -workspace, excluding the value; thus an operation has a name and a type. -An operation is what domains and packages export. -Thus \axiomType{Ring} exports one operation \axiomOp{+}. -Every ring also exports this operation. -Also, the author of every ring in the system is obliged under contract -(see \downlink{``\ugPackagesAbstractTitle''}{ugPackagesAbstractPage} -in Section \ugPackagesAbstractNumber\ignore{ugPackagesAbstract}) -to provide an implementation for this operation. - -This chapter is all about functions---how you create them interactively and -how you apply them to meet your needs. -In \downlink{``\ugPackagesTitle''}{ugPackagesPage} in -Chapter \ugPackagesNumber\ignore{ugPackages} you will -learn how to create them for the -Axiom library. -Then in \downlink{``\ugCategoriesTitle''}{ugCategoriesPage} -in Chapter \ugCategoriesNumber\ignore{ugCategories}, you will -learn about categories and -exported operations. +Doing what? Well, performing some \spadgloss{operation}. Formally, +an operation consists of the constituent parts of \axiom{f} in your +workspace, excluding the value; thus an operation has a name and a +type. An operation is what domains and packages export. Thus +\axiomType{Ring} exports one operation \axiomOp{+}. Every ring also +exports this operation. Also, the author of every ring in the system +is obliged under contract (see +\downlink{``\ugPackagesAbstractTitle''}{ugPackagesAbstractPage} in +Section \ugPackagesAbstractNumber\ignore{ugPackagesAbstract}) to +provide an implementation for this operation. + +This chapter is all about functions---how you create them +interactively and how you apply them to meet your needs. In +\downlink{``\ugPackagesTitle''}{ugPackagesPage} in Chapter +\ugPackagesNumber\ignore{ugPackages} you will learn how to create them +for the Axiom library. Then in +\downlink{``\ugCategoriesTitle''}{ugCategoriesPage} in Chapter +\ugCategoriesNumber\ignore{ugCategories}, you will learn about +categories and exported operations. \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugUserDelayTitle}{Delayed Assignments vs. Functions with No Arguments} -\newcommand{\ugUserDelayNumber}{6.8.} - -@ -\section{Delayed Assignments vs. Functions with No Arguments} -\label{ugUserDelayPage} -\begin{itemize} -\item ugLangAssignPage \ref{ugLangAssignPage} on -page~\pageref{ugLangAssignPage} -\end{itemize} -\index{pages!ugUserDelayPage!ug06.ht} -\index{ug06.ht!pages!ugUserDelayPage} -\index{ugUserDelayPage!ug06.ht!pages} +\pagehead{ugUserDelayPage}{ug06.ht} +{Delayed Assignments vs. Functions with No Arguments} +\pageto{notitle}{ugLangAssignPage} <>= \begin{page}{ugUserDelayPage} {6.8. Delayed Assignments vs. Functions with No Arguments} @@ -33863,7 +30423,8 @@ If you omit the parentheses, you just get the function definition. \spadpaste{sin24 \free{sin24}} } \xtc{ -You do not use the parentheses \axiomSyntax{()} in a delayed assignment\ldots +You do not use the parentheses \axiomSyntax{()} in a +delayed assignment\ldots }{ \spadpaste{cos24 == cos(24.0) \bound{cos24}} } @@ -33873,43 +30434,30 @@ nor in the evaluation. \spadpaste{cos24 \free{cos24}} } The only syntactic difference between delayed assignments -and nullary functions is that you use \axiomSyntax{()} in the latter case. +and nullary functions is that you use \axiomSyntax{()} +in the latter case. \endscroll \autobuttons \end{page} @ +\pagehead{ugUserUsePage}{ug06.ht}{How Axiom Determines What Function to Use} +\pageto{notitle}{ugTypesPkgCallPage} +\pageto{notitle}{ugTypesResolvePage} <>= -\newcommand{\ugUserUseTitle}{How Axiom Determines What Function to Use} -\newcommand{\ugUserUseNumber}{6.9.} - -@ -\section{How Axiom Determines What Function to Use} -\label{ugUserUsePage} -\begin{itemize} -\item ugTypesPkgCallPage \ref{ugTypesPkgCallPage} on -page~\pageref{ugTypesPkgCallPage} -\item ugTypesResolvePage \ref{ugTypesResolvePage} on -page~\pageref{ugTypesResolvePage} -\end{itemize} -\index{pages!ugUserUsePage!ug06.ht} -\index{ug06.ht!pages!ugUserUsePage} -\index{ugUserUsePage!ug06.ht!pages} -<>= -\begin{page}{ugUserUsePage}{6.9. How Axiom Determines What Function to Use} +\begin{page}{ugUserUsePage} +{6.9. How Axiom Determines What Function to Use} \beginscroll -What happens if you define a function that has the same name as a library -function? -Well, if your function has the same name and number of arguments (we -sometimes say \spadgloss{arity}) as another function -in the library, then your function covers up the library function. -If you want then to call the library function, you will have to package-call -it. -Axiom can use both the functions you write and those that come -from the library. -Let's do a simple example to illustrate this. +What happens if you define a function that has the same name as a +library function? Well, if your function has the same name and number +of arguments (we sometimes say \spadgloss{arity}) as another function +in the library, then your function covers up the library function. If +you want then to call the library function, you will have to +package-call it. Axiom can use both the functions you write and those +that come from the library. Let's do a simple example to illustrate +this. \xtc{ Suppose you (wrongly!) define \userfun{sin} in this way. }{ @@ -33980,15 +30528,15 @@ It is found for arguments of type \axiomType{Integer}. \item[7. ] The \axiom{2} and \axiom{3} are converted to objects of type \axiomType{Integer} (this is trivial) and \axiomOp{/} is applied, creating an object of type \axiomType{Fraction(Integer)}. -\item[8. ] No \axiomOp{+} for arguments of types \axiomType{Variable(x)} and -\axiomType{Fraction(Integer)} are found in either domain. +\item[8. ] No \axiomOp{+} for arguments of types \axiomType{Variable(x)} +and \axiomType{Fraction(Integer)} are found in either domain. \item[9. ] Axiom resolves (see \downlink{``\ugTypesResolveTitle''}{ugTypesResolvePage} in Section \ugTypesResolveNumber\ignore{ugTypesResolve}) the types and gets \axiomType{Polynomial (Fraction (Integer))}. -\item[10. ] The \axiom{x} and the \axiom{2/3} are converted to objects of this -type and \axiomOp{+} is applied, yielding the answer, an object of type -\axiomType{Polynomial (Fraction (Integer))}. +\item[10. ] The \axiom{x} and the \axiom{2/3} are converted to objects +of this type and \axiomOp{+} is applied, yielding the answer, an object +of type \axiomType{Polynomial (Fraction (Integer))}. \enditems \indent{0} @@ -33997,49 +30545,34 @@ type and \axiomOp{+} is applied, yielding the answer, an object of type \end{page} @ -<>= -\newcommand{\ugUserCompIntTitle}{Compiling vs. Interpreting} -\newcommand{\ugUserCompIntNumber}{6.10.} - -@ -\section{Compiling vs. Interpreting} -\label{ugUserCompIntPage} -\begin{itemize} -\item ugTypesSubdomainsPage \ref{ugTypesSubdomainsPage} on -page~\pageref{ugTypesSubdomainsPage} -\end{itemize} -\index{pages!ugUserCompIntPage!ug06.ht} -\index{ug06.ht!pages!ugUserCompIntPage} -\index{ugUserCompIntPage!ug06.ht!pages} +\pagehead{ugUserCompIntPage}{ug06.ht}{Compiling vs. Interpreting} +\pageto{notitle}{ugTypesSubdomainsPage} <>= \begin{page}{ugUserCompIntPage}{6.10. Compiling vs. Interpreting} \beginscroll When possible, Axiom completely determines the type of every object in -a function, then translates the function definition to \Lisp{} or -to machine code (see next section). -This translation, -called \spadglossSee{compilation}{compiler}, happens the first time you call -the function and results in a computational delay. -Subsequent function calls with the same argument types use the compiled -version of the code without delay. - -If Axiom cannot determine the type of everything, the -function may still be executed -but -in \spadglossSee{interpret-code mode}{interpreter} : -each statement in the function is analyzed and executed as the control -flow indicates. -This process is slower than executing a compiled function, but it -allows the execution of code that may involve objects whose types -change. +a function, then translates the function definition to \Lisp{} or to +machine code (see next section). This translation, called +\spadglossSee{compilation}{compiler}, happens the first time you call +the function and results in a computational delay. Subsequent +function calls with the same argument types use the compiled version +of the code without delay. + +If Axiom cannot determine the type of everything, the function may +still be executed but in \spadglossSee{interpret-code +mode}{interpreter} : each statement in the function is analyzed and +executed as the control flow indicates. This process is slower than +executing a compiled function, but it allows the execution of code +that may involve objects whose types change. \beginImportant If Axiom decides that it cannot compile the code, it issues a message stating the problem and then the following message: % -\centerline{{{\bf We will attempt to step through and interpret the code.}}} +\centerline{ +{{\bf We will attempt to step through and interpret the code.}}} % This is not a time to panic. Rather, it just means that what you gave to Axiom @@ -34074,28 +30607,25 @@ for var in ['x,'y,'z] repeat \end{spadsrc} } -Sometimes you can help a function to compile by using an extra conversion -or by using \axiom{pretend}. -\spadkey{pretend} -See \downlink{``\ugTypesSubdomainsTitle''}{ugTypesSubdomainsPage} -in Section \ugTypesSubdomainsNumber\ignore{ugTypesSubdomains} for details. +Sometimes you can help a function to compile by using an extra +conversion or by using \axiom{pretend}. \spadkey{pretend} See +\downlink{``\ugTypesSubdomainsTitle''}{ugTypesSubdomainsPage} in +Section \ugTypesSubdomainsNumber\ignore{ugTypesSubdomains} for +details. When a function is compilable, you have the choice of whether it is -compiled to \Lisp{} and then interpreted by the \Lisp{} -interpreter or then further compiled from \Lisp{} to machine code. -The option is controlled via \spadcmd{)set functions compile}. -Issue \spadcmd{)set functions compile on} to compile all the way to -machine code. -With -the default setting \spadcmd{)set functions compile off}, -Axiom has its \Lisp{} code interpreted -because the overhead of further compilation is larger than the run-time -of most of the functions our users have defined. -You may find that selectively turning this option on and off will -give you the best performance in your particular application. -For example, if you are writing functions for graphics applications -where hundreds of points are being computed, it is almost certainly true -that you will get the best performance by issuing +compiled to \Lisp{} and then interpreted by the \Lisp{} interpreter or +then further compiled from \Lisp{} to machine code. The option is +controlled via \spadcmd{)set functions compile}. Issue \spadcmd{)set +functions compile on} to compile all the way to machine code. With +the default setting \spadcmd{)set functions compile off}, Axiom has +its \Lisp{} code interpreted because the overhead of further +compilation is larger than the run-time of most of the functions our +users have defined. You may find that selectively turning this option +on and off will give you the best performance in your particular +application. For example, if you are writing functions for graphics +applications where hundreds of points are being computed, it is almost +certainly true that you will get the best performance by issuing \spadcmd{)set functions compile on}. \endscroll @@ -34103,36 +30633,23 @@ that you will get the best performance by issuing \end{page} @ -<>= -\newcommand{\ugUserPieceTitle}{Piece-Wise Function Definitions} -\newcommand{\ugUserPieceNumber}{6.11.} - -@ -\section{Piece-Wise Function Definitions} -\label{ugUserPiecePage} -\begin{itemize} -\item ugUserPieceBasicPage \ref{ugUserPieceBasicPage} on -page~\pageref{ugUserPieceBasicPage} -\item ugUserPiecePickingPage \ref{ugUserPiecePickingPage} on -page~\pageref{ugUserPiecePickingPage} -\item ugUserPiecePredPage \ref{ugUserPiecePredPage} on -page~\pageref{ugUserPiecePredPage} -\end{itemize} -\index{pages!ugUserPiecePage!ug06.ht} -\index{ug06.ht!pages!ugUserPiecePage} -\index{ugUserPiecePage!ug06.ht!pages} +\pagehead{ugUserPiecePage}{ug06.ht}{Piece-Wise Function Definitions} +\pageto{notitle}{ugUserPieceBasicPage} +\pageto{notitle}{ugUserPiecePickingPage} +\pageto{notitle}{ugUserPiecePredPage} <>= \begin{page}{ugUserPiecePage}{6.11. Piece-Wise Function Definitions} \beginscroll -To move beyond functions defined in one line, we introduce in this section -functions that are defined piece-by-piece. -That is, we say ``use this definition when the argument is such-and-such and -use this other definition when the argument is that-and-that.'' +To move beyond functions defined in one line, we introduce in this +section functions that are defined piece-by-piece. That is, we say +``use this definition when the argument is such-and-such and use this +other definition when the argument is that-and-that.'' \beginmenu \menudownlink{{6.11.1. A Basic Example}}{ugUserPieceBasicPage} - \menudownlink{{6.11.2. Picking Up the Pieces}}{ugUserPiecePickingPage} + \menudownlink{{6.11.2. Picking Up the Pieces}} +{ugUserPiecePickingPage} \menudownlink{{6.11.3. Predicates}}{ugUserPiecePredPage} \endmenu \endscroll @@ -34140,16 +30657,7 @@ use this other definition when the argument is that-and-that.'' \end{page} @ -<>= -\newcommand{\ugUserPieceBasicTitle}{A Basic Example} -\newcommand{\ugUserPieceBasicNumber}{6.11.1.} - -@ -\section{A Basic Example} -\label{ugUserPieceBasicPage} -\index{pages!ugUserPieceBasicPage!ug06.ht} -\index{ug06.ht!pages!ugUserPieceBasicPage} -\index{ugUserPieceBasicPage!ug06.ht!pages} +\pagehead{ugUserPieceBasicPage}{ug06.ht}{A Basic Example} <>= \begin{page}{ugUserPieceBasicPage}{6.11.1. A Basic Example} \beginscroll @@ -34174,20 +30682,6 @@ The vertical bar \axiomSyntax{|} means }{ \spadpaste{fact(n | n > 0) == n * fact(n - 1) \free{fact0}\bound{factn}} } -%>> am moving this back -%The vertical bar \axiomSyntax{|} is read as ``such that'' and so -%\index{such that} -%the second line means that that part of the definition for \userfun{fact} -%is for any \axiom{n} such that \axiom{n} is greater than 0. -%In fact, the first line is really just a shorthand expression for -%\axiom{fact(n | n = 0) == 1}. -%>> prefer scratching next 4 lines -%We are implicitly using a \spadgloss{predicate} with a \axiomSyntax{|} in -%this line (see \downlink{``\ugUserPiecePredTitle''}{ugUserPiecePredPage} -%in Section \ugUserPiecePredNumber\ignore{ugUserPiecePred} for more -%on predicates). -%So this piece of the function is applicable to all (the not so many!) -%values of \axiom{n} that are equal to zero. \xtc{ What is the value for \axiom{n = 3}? }{ @@ -34207,7 +30701,9 @@ Here is the value for \axiom{n = 0}. \xtc{ Give an error message if \axiom{n < 0}. }{ -\spadpaste{facto(n | n < 0) == error "arguments to facto must be non-negative" \free{facto0}\bound{factop}} +\spadpaste{facto(n | n < 0) == +error "arguments to facto must be non-negative" +\free{facto0}\bound{factop}} } \xtc{ Here is the value otherwise. @@ -34231,18 +30727,17 @@ use \spadsys{)display value}. \spadpaste{)display value facto \free{facton}} } -In general a {\it piece-wise definition} of a function consists of two or -more parts. -Each part gives a ``piece'' of the entire definition. -Axiom collects the pieces of a function as you enter them. -When you ask for a value of the function, it then ``glues'' -the pieces together to form a function. +In general a {\it piece-wise definition} of a function consists of two +or more parts. Each part gives a ``piece'' of the entire definition. +Axiom collects the pieces of a function as you enter them. When you +ask for a value of the function, it then ``glues'' the pieces together +to form a function. -The two piece-wise definitions for the factorial function -are examples of recursive functions, that is, functions that -are defined in terms of themselves. -Here is an interesting doubly-recursive function. -This function returns the value \axiom{11} for all positive integer arguments. +The two piece-wise definitions for the factorial function are examples +of recursive functions, that is, functions that are defined in terms +of themselves. Here is an interesting doubly-recursive function. +This function returns the value \axiom{11} for all positive integer +arguments. \xtc{ Here is the first of two pieces. }{ @@ -34274,33 +30769,19 @@ What is the Axiom's definition of \axiom{eleven}? \end{page} @ -<>= -\newcommand{\ugUserPiecePickingTitle}{Picking Up the Pieces} -\newcommand{\ugUserPiecePickingNumber}{6.11.2.} - -@ -\section{Picking Up the Pieces} -\label{ugUserPiecePickingPage} -\begin{itemize} -\item ugUserPieceBasicPage \ref{ugUserPieceBasicPage} on -page~\pageref{ugUserPieceBasicPage} -\end{itemize} -\index{pages!ugUserPiecePickingPage!ug06.ht} -\index{ug06.ht!pages!ugUserPiecePickingPage} -\index{ugUserPiecePickingPage!ug06.ht!pages} +\pagehead{ugUserPiecePickingPage}{ug06.ht}{Picking Up the Pieces} +\pageto{notitle}{ugUserPieceBasicPage} <>= \begin{page}{ugUserPiecePickingPage}{6.11.2. Picking Up the Pieces} \beginscroll Here are the details about how Axiom creates a function from its -pieces. -Axiom converts the \eth{\axiom{i}} piece of a function definition into a -conditional expression of the form: \axiom{if} \pred{i} \axiom{then} -\expr{i}. -If any new piece has a \pred{i} that is identical\footnote{after all -variables are uniformly named} to an earlier \pred{j}, the earlier piece is -removed. -Otherwise, the new piece is always added at the end. +pieces. Axiom converts the \eth{\axiom{i}} piece of a function +definition into a conditional expression of the form: \axiom{if} +\pred{i} \axiom{then} \expr{i}. If any new piece has a \pred{i} that +is identical\footnote{after all variables are uniformly named} to an +earlier \pred{j}, the earlier piece is removed. Otherwise, the new +piece is always added at the end. \beginImportant If there are \axiom{n} pieces to a function definition for \axiom{f}, @@ -34317,10 +30798,10 @@ the function defined \axiom{f} is: \newline \endImportant You can give definitions of any number of mutually recursive function -definitions, piece-wise or otherwise. -No computation is done until you ask for a value. -When you do ask for a value, all the relevant definitions are gathered, -analyzed, and translated into separate functions and compiled. +definitions, piece-wise or otherwise. No computation is done until +you ask for a value. When you do ask for a value, all the relevant +definitions are gathered, analyzed, and translated into separate +functions and compiled. \xtc{ Let's recall the definition of \userfun{eleven} from @@ -34336,9 +30817,8 @@ in Section \ugUserPieceBasicNumber\ignore{ugUserPieceBasic}}. } A similar doubly-recursive function below produces \axiom{-11} for all -negative positive integers. -If you haven't worked out why or how \userfun{eleven} works, -the structure of this definition gives a clue. +negative positive integers. If you haven't worked out why or how +\userfun{eleven} works, the structure of this definition gives a clue. \xtc{ This definition we write as a block. }{ @@ -34358,7 +30838,8 @@ Since \axiom{11 - 11 = 0}, we define \axiom{s(0)} to be \axiom{1}. \xtc{ And the general term. }{ -\spadpaste{s(n) == (eleven(n) + minusEleven(n))/n\bound{rf3}\free{rf2 rf1 ff1}} +\spadpaste{s(n) == (eleven(n) + minusEleven(n))/n +\bound{rf3}\free{rf2 rf1 ff1}} } \xtc{ What are the first ten values of \axiom{s}? @@ -34367,13 +30848,12 @@ What are the first ten values of \axiom{s}? } %% interpreter puts the rule at the end - should fix Axiom can create infinite streams in the positive direction (for -example, for index values \axiom{0,1, \ldots}) or negative direction (for -example, for index values \axiom{0,-1,-2, \ldots}). -Here we would like a stream of values of \axiom{s(n)} that is infinite in -both directions. -The function \axiom{t(n)} below returns the \eth{\axiom{n}} term of the infinite -stream \axiom{[s(0), s(1), s(-1), s(2), s(-2), \ldots].} -Its definition has three pieces. +example, for index values \axiom{0,1, \ldots}) or negative direction +(for example, for index values \axiom{0,-1,-2, \ldots}). Here we +would like a stream of values of \axiom{s(n)} that is infinite in both +directions. The function \axiom{t(n)} below returns the +\eth{\axiom{n}} term of the infinite stream \axiom{[s(0), s(1), s(-1), +s(2), s(-2), \ldots].} Its definition has three pieces. \xtc{ Define the initial term. }{ @@ -34422,21 +30902,8 @@ Check it at \axiom{n= 100}. \end{page} @ -<>= -\newcommand{\ugUserPiecePredTitle}{Predicates} -\newcommand{\ugUserPiecePredNumber}{6.11.3.} - -@ -\section{Predicates} -\label{ugUserPiecePredPage} -\begin{itemize} -\item ugUserPieceBasicPage \ref{ugUserPieceBasicPage} on -page~\pageref{ugUserPieceBasicPage} -ugLangItsPage -\end{itemize} -\index{pages!ugUserPiecePredPage!ug06.ht} -\index{ug06.ht!pages!ugUserPiecePredPage} -\index{ugUserPiecePredPage!ug06.ht!pages} +\pagehead{ugUserPiecePredPage}{ug06.ht}{Predicates} +\pageto{notitle}{ugUserPieceBasicPage} <>= \begin{page}{ugUserPiecePredPage}{6.11.3. Predicates} \beginscroll @@ -34470,14 +30937,13 @@ Try it out. } Explicit predicates tell Axiom that the given function definition -piece is to be applied if the predicate evaluates to {\tt true} for the -arguments to the function. -You can use such ``constant'' arguments for integers, -strings, and quoted symbols. -The \axiomType{Boolean} values \axiom{true} and \axiom{false} can also be used -if qualified with ``\spad{@}'' or ``\spad{\$}'' and \axiomType{Boolean}. -The following are all valid function definition fragments using -constant arguments. +piece is to be applied if the predicate evaluates to {\tt true} for +the arguments to the function. You can use such ``constant'' +arguments for integers, strings, and quoted symbols. The +\axiomType{Boolean} values \axiom{true} and \axiom{false} can also be +used if qualified with ``\spad{@}'' or ``\spad{\$}'' and +\axiomType{Boolean}. The following are all valid function definition +fragments using constant arguments. \begin{verbatim} a(1) == ... b("unramified") == ... @@ -34485,12 +30951,11 @@ c('untested) == ... d(true@Boolean) == ... \end{verbatim} -If a function has more than one argument, -each argument can have its own predicate. -However, if a predicate involves two or more arguments, it must be given -{\it after} all the arguments mentioned in the predicate have been given. -You are always safe to give -a single predicate at the end of the argument list. +If a function has more than one argument, each argument can have its +own predicate. However, if a predicate involves two or more +arguments, it must be given {\it after} all the arguments mentioned in +the predicate have been given. You are always safe to give a single +predicate at the end of the argument list. \xtc{ A function involving predicates on two arguments. }{ @@ -34518,52 +30983,31 @@ Try it out. \spadpaste{[inFirstHalfQuadrant(i,3) for i in 1..5]\bound{ifq1b}} } -{\bf Remark:} Very old versions of Axiom allowed predicates -to be given after a {\tt when} keyword as in -{\tt inFirstHalfQuadrant(x ,y) == true when x >0 and y < x}. -This is no longer supported, is WRONG, and will cause a syntax -error or strange behavior. - \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugUserCacheTitle}{Caching Previously Computed Results} -\newcommand{\ugUserCacheNumber}{6.12.} - -@ -\section{Caching Previously Computed Results} -\label{ugUserCachePage} -\begin{itemize} -\item ugUserFreeLocalPage \ref{ugUserFreeLocalPage} on -page~\pageref{ugUserFreeLocalPage} -\end{itemize} -\index{pages!ugUserCachePage!ug06.ht} -\index{ug06.ht!pages!ugUserCachePage} -\index{ugUserCachePage!ug06.ht!pages} +\pagehead{ugUserCachePage}{ug06.ht}{Caching Previously Computed Results} +\pageto{notitle}{ugUserFreeLocalPage} <>= \begin{page}{ugUserCachePage}{6.12. Caching Previously Computed Results} \beginscroll -By default, Axiom does not save the values of any function. -You can cause it to save values and not to recompute unnecessarily -by using \spadcmd{)set functions cache}. -This should be used before the functions are defined or, at least, before -they are executed. -The word following ``cache'' should be \axiom{0} to turn off -caching, a positive integer \axiom{n} to save the last \axiom{n} -computed values or ``all'' to save all computed values. -If you then give a list of names of functions, the caching -only affects those functions. -Use no list of names or ``all'' when you want to define the default -behavior for functions not specifically mentioned in other -\spadcmd{)set functions cache} statements. -If you give no list of names, all functions will have the caching behavior. -If you explicitly turn on caching for one or more names, you must -explicitly turn off caching for those names when you want to stop -saving their values. +By default, Axiom does not save the values of any function. You can +cause it to save values and not to recompute unnecessarily by using +\spadcmd{)set functions cache}. This should be used before the +functions are defined or, at least, before they are executed. The +word following ``cache'' should be \axiom{0} to turn off caching, a +positive integer \axiom{n} to save the last \axiom{n} computed values +or ``all'' to save all computed values. If you then give a list of +names of functions, the caching only affects those functions. Use no +list of names or ``all'' when you want to define the default behavior +for functions not specifically mentioned in other \spadcmd{)set +functions cache} statements. If you give no list of names, all +functions will have the caching behavior. If you explicitly turn on +caching for one or more names, you must explicitly turn off caching +for those names when you want to stop saving their values. \xtc{ This causes the functions \userfun{f} and \userfun{g} to have @@ -34588,8 +31032,8 @@ default. \spadpaste{)set functions cache all} } \xtc{ -This causes all functions that have not been specifically cached in some way -to have no computed values saved. +This causes all functions that have not been specifically cached in +some way to have no computed values saved. }{ \spadpaste{)set functions cache 0} } @@ -34600,14 +31044,12 @@ We also make \userfun{f} and \userfun{g} uncached. } \beginImportant -Be careful about caching functions that have -\spadglossSee{side effects}{side effect}. -Such a function might destructively modify the elements of an array or -issue a \axiomFun{draw} command, for example. +Be careful about caching functions that have \spadglossSee{side +effects}{side effect}. Such a function might destructively modify the +elements of an array or issue a \axiomFun{draw} command, for example. A function that you expect to execute every time it is called should -not be cached. -Also, it is highly unlikely that a function with no arguments should -be cached. +not be cached. Also, it is highly unlikely that a function with no +arguments should be cached. \endImportant You should also be careful about caching functions that depend on @@ -34621,22 +31063,9 @@ for an example. \end{page} @ -<>= -\newcommand{\ugUserRecurTitle}{Recurrence Relations} -\newcommand{\ugUserRecurNumber}{6.13.} - -@ -\section{Recurrence Relations} -\label{ugUserRecurPage} -\begin{itemize} -\item ugUserFreeLocalPage \ref{ugUserFreeLocalPage} on -page~\pageref{ugUserFreeLocalPage} -\item ugUserCachePage \ref{ugUserCachePage} on -page~\pageref{ugUserCachePage} -\end{itemize} -\index{pages!ugUserRecurPage!ug06.ht} -\index{ug06.ht!pages!ugUserRecurPage} -\index{ugUserRecurPage!ug06.ht!pages} +\pagehead{ugUserRecurPage}{ug06.ht}{Recurrence Relations} +\pageto{notitle}{ugUserFreeLocalPage} +\pageto{notitle}{ugUserCachePage} <>= \begin{page}{ugUserRecurPage}{6.13. Recurrence Relations} \beginscroll @@ -34651,15 +31080,12 @@ fact(0) == 1 fact(n | n > 0) == n * fact(n-1) \end{verbatim} -The value of -\axiom{fact(10)} depends on the value of \axiom{fact(9)}, \axiom{fact(9)} -on \axiom{fact(8)}, and so on. -Because it depends on only one previous value, it is usually called a -{\it first order recurrence relation.} -You can easily imagine a function based on two, three or more previous -values. -The Fibonacci numbers are probably the most famous function defined by a -second order recurrence relation. +The value of \axiom{fact(10)} depends on the value of \axiom{fact(9)}, +\axiom{fact(9)} on \axiom{fact(8)}, and so on. Because it depends on +only one previous value, it is usually called a {\it first order +recurrence relation.} You can easily imagine a function based on two, +three or more previous values. The Fibonacci numbers are probably the +most famous function defined by a second order recurrence relation. \xtc{ The library function \axiomFun{fibonacci} computes Fibonacci numbers. It is obviously optimized for speed. @@ -34683,40 +31109,34 @@ Fibonacci numbers ourselves using a piece-wise definition. As defined, this recurrence relation is obviously doubly-recursive. To compute \axiom{fib(10)}, we need to compute \axiom{fib(9)} and -\axiom{fib(8)}. -And to \axiom{fib(9)}, we need to compute \axiom{fib(8)} and -\axiom{fib(7)}. -And so on. -It seems that to compute \axiom{fib(10)} we need to compute -\axiom{fib(9)} once, \axiom{fib(8)} twice, \axiom{fib(7)} three times. -Look familiar? -The number of function calls needed to compute {\it any} second order +\axiom{fib(8)}. And to \axiom{fib(9)}, we need to compute +\axiom{fib(8)} and \axiom{fib(7)}. And so on. It seems that to +compute \axiom{fib(10)} we need to compute \axiom{fib(9)} once, +\axiom{fib(8)} twice, \axiom{fib(7)} three times. Look familiar? The +number of function calls needed to compute {\it any} second order recurrence relation in the obvious way is exactly \axiom{fib(n)}. -These numbers grow! -For example, if Axiom actually did this, then \axiom{fib(500)} -requires more than \texht{$10^{104}$}{\axiom{10**104}} function calls. -And, given all this, our definition of \userfun{fib} obviously could not be -used to calculate the five-hundredth Fibonacci number. +These numbers grow! For example, if Axiom actually did this, then +\axiom{fib(500)} requires more than +\texht{$10^{104}$}{\axiom{10**104}} function calls. And, given all +this, our definition of \userfun{fib} obviously could not be used to +calculate the five-hundredth Fibonacci number. \xtc{ Let's try it anyway. }{ \spadpaste{fib(500) \free{fibn}} } -Since this takes a short time to compute, it obviously didn't do -as many as \texht{$10^{104}$}{\axiom{10**104}} operations! -By default, Axiom transforms any recurrence relation it recognizes -into an iteration. -Iterations are efficient. -To compute the value of the \eth{\axiom{n}} -term of a recurrence relation using an iteration requires only -\axiom{n} function calls.\footnote{If -you compare the speed of our \userfun{fib} function -to the library function, our version is still slower. -This is because the library -\axiomFunFrom{fibonacci}{IntegerNumberTheoryFunctions} -uses a ``powering algorithm'' with a computing time -proportional to \texht{$\log^3(n)$}{\axiom{log(n)**3}} to compute +Since this takes a short time to compute, it obviously didn't do as +many as \texht{$10^{104}$}{\axiom{10**104}} operations! By default, +Axiom transforms any recurrence relation it recognizes into an +iteration. Iterations are efficient. To compute the value of the +\eth{\axiom{n}} term of a recurrence relation using an iteration +requires only \axiom{n} function calls.\footnote{If you compare the +speed of our \userfun{fib} function to the library function, our +version is still slower. This is because the library +\axiomFunFrom{fibonacci}{IntegerNumberTheoryFunctions} uses a +``powering algorithm'' with a computing time proportional to +\texht{$\log^3(n)$}{\axiom{log(n)**3}} to compute \axiom{fibonacci(n).}} To turn off this special recurrence relation compilation, issue @@ -34768,20 +31188,8 @@ Compute the Legendre polynomial of degree \axiom{6.} \end{page} @ -<>= -\newcommand{\ugUserMakeTitle}{Making Functions from Objects} -\newcommand{\ugUserMakeNumber}{6.14.} - -@ -\section{Making Functions from Objects} -\label{ugUserMakePage} -\begin{itemize} -\item MakeFunctionXmpPage \ref{MakeFunctionXmpPage} on -page~\pageref{MakeFunctionXmpPage} -\end{itemize} -\index{pages!ugUserMakePage!ug06.ht} -\index{ug06.ht!pages!ugUserMakePage} -\index{ugUserMakePage!ug06.ht!pages} +\pagehead{ugUserMakePage}{ug06.ht}{Making Functions from Objects} +\pageto{notitle}{MakeFunctionXmpPage} <>= \begin{page}{ugUserMakePage}{6.14. Making Functions from Objects} \beginscroll @@ -34900,58 +31308,38 @@ issue the declaration {\it before} the function is created. }{ \spadpaste{g \free{g}} } -It is an error to use \axiom{g} without the quote in the -penultimate expression since \axiom{g} had been declared but did not have -a value. -Similarly, since it is common to overuse variable names like \axiom{x}, -\axiom{y}, and so on, -you avoid problems if you always quote the variable names -for \axiomFun{function}. -In general, -if \axiom{x} has a value and you use \axiom{x} without a quote in a call to -\axiomFun{function}, then -Axiom does not know what you are trying to do. - -What kind of object is allowable as the first argument to \axiomFun{function}? -Let's use the \Browse{} facility of \HyperName{} to find out. -At the main \Browse{} menu, enter the string {\tt function} and then -click on {\bf Operations.} -The exposed operations called \axiomFun{function} all take an object -whose type belongs to category \axiomType{ConvertibleTo InputForm}. -What domains are those? -Go back to the main \Browse{} menu, erase {\tt function}, -enter {\tt ConvertibleTo} in the -input area, and click on {\bf categories} on the {\bf Constructors} line. -At the bottom of the page, enter {\tt InputForm} in the input area -following {\bf S =}. -Click on {\bf Cross Reference} and then on {\bf Domains}. -The list you see contains over forty domains that belong to the -category \axiomType{ConvertibleTo InputForm}. -Thus you can use \axiomFun{function} for \axiomType{Integer}, -\axiomType{Float}, -\axiomType{String}, -\axiomType{Complex}, -\axiomType{Expression}, and so on. +It is an error to use \axiom{g} without the quote in the penultimate +expression since \axiom{g} had been declared but did not have a value. +Similarly, since it is common to overuse variable names like +\axiom{x}, \axiom{y}, and so on, you avoid problems if you always +quote the variable names for \axiomFun{function}. In general, if +\axiom{x} has a value and you use \axiom{x} without a quote in a call +to \axiomFun{function}, then Axiom does not know what you are trying +to do. + +What kind of object is allowable as the first argument to +\axiomFun{function}? Let's use the \Browse{} facility of Hyperdoc to +find out. At the main \Browse{} menu, enter the string {\tt function} +and then click on {\bf Operations.} The exposed operations called +\axiomFun{function} all take an object whose type belongs to category +\axiomType{ConvertibleTo InputForm}. What domains are those? Go back +to the main \Browse{} menu, erase {\tt function}, enter {\tt +ConvertibleTo} in the input area, and click on {\bf categories} on the +{\bf Constructors} line. At the bottom of the page, enter {\tt +InputForm} in the input area following {\bf S =}. Click on {\bf Cross +Reference} and then on {\bf Domains}. The list you see contains over +forty domains that belong to the category \axiomType{ConvertibleTo +InputForm}. Thus you can use \axiomFun{function} for +\axiomType{Integer}, \axiomType{Float}, \axiomType{String}, +\axiomType{Complex}, \axiomType{Expression}, and so on. \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugUserBlocksTitle}{Functions Defined with Blocks} -\newcommand{\ugUserBlocksNumber}{6.15.} - -@ -\section{Functions Defined with Blocks} -\label{ugUserBlocksPage} -\begin{itemize} -\item ugLangBlocksPage \ref{ugLangBlocksPage} on -page~\pageref{ugLangBlocksPage} -\end{itemize} -\index{pages!ugUserBlocksPage!ug06.ht} -\index{ug06.ht!pages!ugUserBlocksPage} -\index{ugUserBlocksPage!ug06.ht!pages} +\pagehead{ugUserBlocksPage}{ug06.ht}{Functions Defined with Blocks} +\pageto{notitle}{ugLangBlocksPage} <>= \begin{page}{ugUserBlocksPage}{6.15. Functions Defined with Blocks} \beginscroll @@ -35056,9 +31444,6 @@ As with our bubble sort, this is a destructive function. Neither of the above functions is efficient for sorting large lists since they reference elements by asking for the \eth{\axiom{j}} element of the structure \axiom{m}. -%For lists, compute \axiom{m.(j+1) = rest(m,j).first}, and thus, starting at -%the first node of \axiom{m}, walk down to the \eth{\axiom{j}} node, then call -%\axiomFun{first}. \xtc{ Here is a more efficient bubble sort for lists. @@ -35088,54 +31473,38 @@ This definition is both recursive and iterative, and is tricky! Unless you are {\it really} curious about this definition, we suggest you skip immediately to the next section. -Here are the key points in the definition. -First notice that if you are sorting a list with less than two elements, -there is nothing to do: just return the list. -This definition returns immediately if there are zero elements, and skips -the entire \axiom{while} loop if there is just one element. +Here are the key points in the definition. First notice that if you +are sorting a list with less than two elements, there is nothing to +do: just return the list. This definition returns immediately if +there are zero elements, and skips the entire \axiom{while} loop if +there is just one element. -The second point to realize is that on each outer iteration, the bubble sort -ensures that the minimum element is propagated leftmost. +The second point to realize is that on each outer iteration, the +bubble sort ensures that the minimum element is propagated leftmost. Each iteration of the \axiom{while} loop calls \userfun{bubbleSort2} -recursively to sort all but the first element. -When finished, the minimum element is either in the first or second position. -The conditional expression ensures that it comes first. -If it is in the second, then a swap occurs. -In any case, the \axiomFun{rest} of the original list must be updated to hold -the result of the recursive call. +recursively to sort all but the first element. When finished, the +minimum element is either in the first or second position. The +conditional expression ensures that it comes first. If it is in the +second, then a swap occurs. In any case, the \axiomFun{rest} of the +original list must be updated to hold the result of the recursive +call. \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugUserFreeLocalTitle}{Free and Local Variables} -\newcommand{\ugUserFreeLocalNumber}{6.16.} - -@ -\section{Free and Local Variables} -\label{ugUserFreeLocalPage} -\begin{itemize} -\item ugUserCachePage \ref{ugUserCachePage} on -page~\pageref{ugUserCachePage} -\item ugUserRecurPage \ref{ugUserRecurPage} on -page~\pageref{ugUserRecurPage} -\end{itemize} -\index{pages!ugUserFreeLocalPage!ug06.ht} -\index{ug06.ht!pages!ugUserFreeLocalPage} -\index{ugUserFreeLocalPage!ug06.ht!pages} +\pagehead{ugUserFreeLocalPage}{ug06.ht}{Free and Local Variables} +\pageto{notitle}{ugUserCachePage} +\pageto{notitle}{ugUserRecurPage} <>= \begin{page}{ugUserFreeLocalPage}{6.16. Free and Local Variables} \beginscroll When you want to refer to a variable that is not local to your -function, use a ``\axiom{free}'' declaration. -\spadkey{free} -Variables declared to be \axiom{free} -are assumed to be defined globally -in the -workspace. +function, use a ``\axiom{free}'' declaration. \spadkey{free} +Variables declared to be \axiom{free} are assumed to be defined +globally in the workspace. \labelSpace{1pc} \xtc{ @@ -35203,10 +31572,10 @@ Well, Axiom decides on this basis: \item[1. ] Axiom scans your function line-by-line, from top-to-bottom. The right-hand side of an assignment is looked at before the left-hand side. -\item[2. ] If \axiom{x} is referenced before it is assigned a value, it is a -\axiom{free} (global) variable. -\item[3. ] If \axiom{x} is assigned a value before it is referenced, it is a -\axiom{local} variable. +\item[2. ] If \axiom{x} is referenced before it is assigned a value, +it is a \axiom{free} (global) variable. +\item[3. ] If \axiom{x} is assigned a value before it is referenced, +it is a \axiom{local} variable. \enditems \indent{0} @@ -35236,27 +31605,22 @@ How about this one? \spadpaste{[a, b] \free{hhh}} } -What happened? -In the first line of the function body for \axiom{h}, \axiom{a} is -referenced on the right-hand side of the assignment. -Thus \axiom{a} is a free variable. -The variable \axiom{b} is not referenced in that line, but it is -assigned a value. -Thus \axiom{b} is a local variable and is given the value -\axiom{a + 1 = 2}. -In the second line, the free variable \axiom{a} is assigned the value -\axiom{b + a}which equals \axiom{2 + 1 = 3.} -This is the value returned by the function. -Since \axiom{a} was free in \userfun{h}, the global variable \axiom{a} -has value \axiom{3.} -Since \axiom{b} was local in \userfun{h}, the global variable \axiom{b} -is unchanged---it still has the value \axiom{1.} +What happened? In the first line of the function body for \axiom{h}, +\axiom{a} is referenced on the right-hand side of the assignment. +Thus \axiom{a} is a free variable. The variable \axiom{b} is not +referenced in that line, but it is assigned a value. Thus \axiom{b} +is a local variable and is given the value \axiom{a + 1 = 2}. In the +second line, the free variable \axiom{a} is assigned the value +\axiom{b + a}which equals \axiom{2 + 1 = 3.} This is the value +returned by the function. Since \axiom{a} was free in \userfun{h}, +the global variable \axiom{a} has value \axiom{3.} Since \axiom{b} +was local in \userfun{h}, the global variable \axiom{b} is +unchanged---it still has the value \axiom{1.} It is good programming practice always to declare global variables. -However, by far the most common situation is to have local variables in -your functions. -No declaration is needed for this situation, but be sure to -initialize their values. +However, by far the most common situation is to have local variables +in your functions. No declaration is needed for this situation, but +be sure to initialize their values. Be careful if you use free variables and you cache the value of your function (see \downlink{``\ugUserCacheTitle''}{ugUserCachePage} @@ -35273,7 +31637,8 @@ Turn on caching for \userfun{p}. \xtc{ Define \userfun{p} to depend on the free variable \axiom{N}. }{ -\spadpaste{p(i,x) == ( free N; reduce( + , [ (x-i)**n for n in 1..N ] ) ) \free{pcache}\bound{pdef}} +\spadpaste{p(i,x) == ( free N; +reduce( + , [ (x-i)**n for n in 1..N ] ) ) \free{pcache}\bound{pdef}} } \xtc{ Set the value of \axiom{N}. @@ -35304,8 +31669,8 @@ Turn off caching for \userfun{p}. } Axiom does not allow {\it fluid variables}, that is, variables -\spadglossSee{bound}{binding} by a function \spad{f} that can be referenced by -functions called by \spad{f}. +\spadglossSee{bound}{binding} by a function \spad{f} that can be +referenced by functions called by \spad{f}. Values are passed to functions by \spadgloss{reference}: a pointer to the value is passed rather than a copy of the value or a pointer to @@ -35390,9 +31755,11 @@ What is the 1000th Fibonacci number? As an exercise, we suggest you write a function in an iterative style that computes the value of the recurrence relation -\texht{$p(n) = p(n-1) - 2 \, p(n-2) + 4 \, p(n-3)$}{\axiom{p(n) = p(n-1) - 2*p(n-2) + 4*p(n-3)}} +\texht{$p(n) = p(n-1) - 2 \, p(n-2) + 4 \, p(n-3)$} +{\axiom{p(n) = p(n-1) - 2*p(n-2) + 4*p(n-3)}} having the initial values -\texht{$p(1) = 1,\, p(2) = 3 \hbox{ and } p(3) = 9.$}{\axiom{p(1) = 1, p(2) = 3 {\rm and} p(3) = 9.}} +\texht{$p(1) = 1,\, p(2) = 3 \hbox{ and } p(3) = 9.$} +{\axiom{p(1) = 1, p(2) = 3 {\rm and} p(3) = 9.}} How would you write the function using an element \axiomType{OneDimensionalArray} or \axiomType{Vector} to hold the previously computed values? @@ -35402,22 +31769,9 @@ to hold the previously computed values? \end{page} @ -<>= -\newcommand{\ugUserAnonTitle}{Anonymous Functions} -\newcommand{\ugUserAnonNumber}{6.17.} - -@ -\section{Anonymous Functions} -\label{ugUserAnonPage} -\begin{itemize} -\item ugUserAnonExampPage \ref{ugUserAnonExampPage} on -page~\pageref{ugUserAnonExampPage} -\item ugUserAnonDeclarePage \ref{ugUserAnonDeclarePage} on -page~\pageref{ugUserAnonDeclarePage} -\end{itemize} -\index{pages!ugUserAnonPage!ug06.ht} -\index{ug06.ht!pages!ugUserAnonPage} -\index{ugUserAnonPage!ug06.ht!pages} +\pagehead{ugUserAnonPage}{ug06.ht}{Anonymous Functions} +\pageto{notitle}{ugUserAnonExampPage} +\pageto{notitle}{ugUserAnonDeclarePage} <>= \begin{page}{ugUserAnonPage}{6.17. Anonymous Functions} \beginscroll @@ -35431,7 +31785,8 @@ $\mapsto$)}{}, and by an expression involving the parameters, the evaluation of which determines the return value of the function. -\centerline{{{\tt ( \subscriptIt{parm}{1}, \subscriptIt{parm}{2}, \ldots, \subscriptIt{parm}{N} ) +-> {\it expression}}}} +\centerline{{{\tt ( \subscriptIt{parm}{1}, \subscriptIt{parm}{2}, +\ldots, \subscriptIt{parm}{N} ) +-> {\it expression}}}} \endImportant You can apply an anonymous function in several ways. @@ -35441,10 +31796,10 @@ You can apply an anonymous function in several ways. directly followed by a list of arguments. \item[2. ] Assign the anonymous function to a variable and then use the variable name when you would normally use a function name. -\item[3. ] Use \axiomSyntax{==} to use the anonymous function definition as -the arguments and body of a regular function definition. -\item[4. ] Have a named function contain a declared anonymous function and -use the result returned by the named function. +\item[3. ] Use \axiomSyntax{==} to use the anonymous function +definition as the arguments and body of a regular function definition. +\item[4. ] Have a named function contain a declared anonymous function +and use the result returned by the named function. \enditems \indent{0} @@ -35458,16 +31813,7 @@ use the result returned by the named function. \end{page} @ -<>= -\newcommand{\ugUserAnonExampTitle}{Some Examples} -\newcommand{\ugUserAnonExampNumber}{6.17.1.} - -@ -\section{Some Examples} -\label{ugUserAnonExampPage} -\index{pages!ugUserAnonExampPage!ug06.ht} -\index{ug06.ht!pages!ugUserAnonExampPage} -\index{ugUserAnonExampPage!ug06.ht!pages} +\pagehead{ugUserAnonExampPage}{ug06.ht}{Some Examples} <>= \begin{page}{ugUserAnonExampPage}{6.17.1. Some Examples} \beginscroll @@ -35501,7 +31847,8 @@ We use the above function to ``sort'' a list of integers. } \xtc{ -This function returns \axiom{1} if \axiom{i + j} is even, \axiom{-1} otherwise. +This function returns \axiom{1} if \axiom{i + j} is even, +\axiom{-1} otherwise. }{ \spadpaste{ev := ( (i,j) +-> if even?(i+j) then 1 else -1) \bound{ev}} } @@ -35536,16 +31883,7 @@ The one you use is a matter of taste. \end{page} @ -<>= -\newcommand{\ugUserAnonDeclareTitle}{Declaring Anonymous Functions} -\newcommand{\ugUserAnonDeclareNumber}{6.17.2.} - -@ -\section{Declaring Anonymous Functions} -\label{ugUserAnonDeclarePage} -\index{pages!ugUserAnonDeclarePage!ug06.ht} -\index{ug06.ht!pages!ugUserAnonDeclarePage} -\index{ugUserAnonDeclarePage!ug06.ht!pages} +\pagehead{ugUserAnonDeclarePage}{ug06.ht}{Declaring Anonymous Functions} <>= \begin{page}{ugUserAnonDeclarePage}{6.17.2. Declaring Anonymous Functions} \beginscroll @@ -35642,16 +31980,7 @@ anonymous function must be declared. \end{page} @ -<>= -\newcommand{\ugUserDatabaseTitle}{Example: A Database} -\newcommand{\ugUserDatabaseNumber}{6.18.} - -@ -\section{Example: A Database} -\label{ugUserDatabasePage} -\index{pages!ugUserDatabasePage!ug06.ht} -\index{ug06.ht!pages!ugUserDatabasePage} -\index{ugUserDatabasePage!ug06.ht!pages} +\pagehead{ugUserDatabasePage}{ug06.ht}{Example: A Database} <>= \begin{page}{ugUserDatabasePage}{6.18. Example: A Database} \beginscroll @@ -35671,7 +32000,8 @@ Each piece \axiom{children(x) == y} means ``the children of \axiom{x} are \axiom{y}''. }{ -\spadpaste{children("richard") == ["douglas","daniel","susan"]\free{d1}\bound{d2}} +\spadpaste{children("richard") == ["douglas","daniel","susan"] +\free{d1}\bound{d2}} } \xtc{ This family tree thus spans four generations. @@ -35712,7 +32042,8 @@ The grandchildren of \axiom{x} are the people \axiom{y} such that \axiom{x} is a grandparent of \axiom{y}. }{ -\spadpaste{grandchildren(x) == [y for y in people | grandParentOf(y) = x]\free{d7}\bound{d8}} +\spadpaste{grandchildren(x) == [y for y in people | grandParentOf(y) = x] +\free{d7}\bound{d8}} } \xtc{ Suppose you want to make a list of all great-grandparents. @@ -35765,20 +32096,8 @@ Who are the great-grandparents? \end{page} @ -<>= -\newcommand{\ugUserTriangleTitle}{Example: A Famous Triangle} -\newcommand{\ugUserTriangleNumber}{6.19.} - -@ -\section{Example: A Famous Triangle} -\label{ugUserTrianglePage} -\begin{itemize} -\item ugTypesExposePage \ref{ugTypesExposePage} on -page~\pageref{ugTypesExposePage} -\end{itemize} -\index{pages!ugUserTrianglePage!ug06.ht} -\index{ug06.ht!pages!ugUserTrianglePage} -\index{ugUserTrianglePage!ug06.ht!pages} +\pagehead{ugUserTrianglePage}{ug06.ht}{Example: A Famous Triangle} +\pageto{notitle}{ugTypesExposePage} <>= \begin{page}{ugUserTrianglePage}{6.19. Example: A Famous Triangle} \beginscroll @@ -35826,21 +32145,24 @@ let's write a couple of one-liners to display it. \xtc{ First, define a function that gives the \eth{\axiom{n}} row. }{ -\spadpaste{pascalRow(n) == [pascal(i,n) for i in 1..n] \bound{pascalRow}\free{pas3}} +\spadpaste{pascalRow(n) == [pascal(i,n) for i in 1..n] +\bound{pascalRow}\free{pas3}} } \xtc{ Next, we write the function \userfun{displayRow} to display the row, separating entries by blanks and centering. }{ -\spadpaste{displayRow(n) == output center blankSeparate pascalRow(n) \free{pascalRow}\bound{displayRow}\free{expose}} +\spadpaste{displayRow(n) == output center blankSeparate pascalRow(n) +\free{pascalRow}\bound{displayRow}\free{expose}} } % Here we have used three output operations. Operation \axiomFunFrom{output}{OutputForm} displays the printable form of objects on the screen, \axiomFunFrom{center}{OutputForm} centers a printable form in the -width of the screen, and \axiomFunFrom{blankSeparate}{OutputForm} takes a list of -printable forms and inserts a blank between successive elements. +width of the screen, and \axiomFunFrom{blankSeparate}{OutputForm} +takes a list of printable forms and inserts a blank between +successive elements. \xtc{ Look at the result. }{ @@ -35855,13 +32177,15 @@ To fix this misalignment, we go back and redefine \userfun{pascalRow} to right adjust the entries within the triangle within a width of four characters. }{ -\spadpaste{pascalRow(n) == [right(pascal(i,n),4) for i in 1..n] \bound{pascalRow2}} +\spadpaste{pascalRow(n) == [right(pascal(i,n),4) for i in 1..n] +\bound{pascalRow2}} } % \xtc{ Finally let's look at our purely reformatted triangle. }{ -\spadpaste{for i in 1..7 repeat displayRow i \free{pascalRow2}\free{displayRow}} +\spadpaste{for i in 1..7 repeat displayRow i \free{pascalRow2} +\free{displayRow}} } \xtc{ Unexpose \axiomType{OutputForm} so we don't get unexpected @@ -35875,32 +32199,20 @@ results later. \end{page} @ -<>= -\newcommand{\ugUserPalTitle}{Example: Testing for Palindromes} -\newcommand{\ugUserPalNumber}{6.20.} - -@ -\section{Example: Testing for Palindromes} -\label{ugUserPalPage} -\begin{itemize} -\item ugUserTrianglePage \ref{ugUserTrianglePage} on -page~\pageref{ugUserTrianglePage} -\end{itemize} -\index{pages!ugUserPalPage!ug06.ht} -\index{ug06.ht!pages!ugUserPalPage} -\index{ugUserPalPage!ug06.ht!pages} +\pagehead{ugUserPalPage}{ug06.ht}{Example: Testing for Palindromes} +\pageto{notitle}{ugUserTrianglePage} <>= \begin{page}{ugUserPalPage}{6.20. Example: Testing for Palindromes} \beginscroll -In this section we define a function \userfun{pal?} that tests whether its -argument is a {\it palindrome}, that is, something that reads the same -backwards and forwards. -For example, the string ``Madam I'm Adam'' is a palindrome (excluding blanks -and punctuation) and so is the number \axiom{123454321.} -The definition works for any datatype that has \axiom{n} components that -are accessed by the indices \axiom{1\ldots n}. +In this section we define a function \userfun{pal?} that tests whether +its argument is a {\it palindrome}, that is, something that reads the +same backwards and forwards. For example, the string ``Madam I'm +Adam'' is a palindrome (excluding blanks and punctuation) and so is +the number \axiom{123454321.} The definition works for any datatype +that has \axiom{n} components that are accessed by the indices +\axiom{1\ldots n}. \xtc{ Here is the definition for \userfun{pal?}. @@ -35951,7 +32263,8 @@ To use \userfun{pal?} on an integer, first convert it to a string. Compute an infinite stream of decimal numbers, each of which is an obvious palindrome. }{ -\spadpaste{ones := [reduce(+,[10**j for j in 0..i]) for i in 1..]\free{pal palAux}\bound{pal5}} +\spadpaste{ones := [reduce(+,[10**j for j in 0..i]) for i in 1..] +\free{pal palAux}\bound{pal5}} } \xtc{ How about their squares? @@ -35969,16 +32282,7 @@ Well, let's test them all! \end{page} @ -<>= -\newcommand{\ugUserRulesTitle}{Rules and Pattern Matching} -\newcommand{\ugUserRulesNumber}{6.21.} - -@ -\section{Rules and Pattern Matching} -\label{ugUserRulesPage} -\index{pages!ugUserRulesPage!ug06.ht} -\index{ug06.ht!pages!ugUserRulesPage} -\index{ugUserRulesPage!ug06.ht!pages} +\pagehead{ugUserRulesPage}{ug06.ht}{Rules and Pattern Matching} <>= \begin{page}{ugUserRulesPage}{6.21. Rules and Pattern Matching} \beginscroll @@ -36041,23 +32345,20 @@ On the other hand, variables do not stand for themselves. Rather, a variable denotes a {\it pattern variable} that is free to match any expression whatsoever. -When a rewrite rule is applied, a process called -\spadgloss{pattern matching} goes to work by systematically -scanning -the subexpressions of the argument. -When a subexpression is found that ``matches'' the pattern, the subexpression -is replaced by the right-hand side of the rule. -The details of what happens will be covered later. - -The customary Axiom notation for patterns is actually a shorthand for a -longer, more general notation. -Pattern variables can be made explicit by using a percent -(\axiomSyntax{\%}) as the first character of the variable name. -To say that a name stands for itself, you can prefix that name with a quote -operator (\axiomSyntax{'}). -Although the current Axiom parser does not let you quote an operation -name, this more general notation gives you an alternate way of giving the same -rewrite rule: +When a rewrite rule is applied, a process called \spadgloss{pattern +matching} goes to work by systematically scanning the subexpressions +of the argument. When a subexpression is found that ``matches'' the +pattern, the subexpression is replaced by the right-hand side of the +rule. The details of what happens will be covered later. + +The customary Axiom notation for patterns is actually a shorthand for +a longer, more general notation. Pattern variables can be made +explicit by using a percent (\axiomSyntax{\%}) as the first character +of the variable name. To say that a name stands for itself, you can +prefix that name with a quote operator (\axiomSyntax{'}). Although +the current Axiom parser does not let you quote an operation name, +this more general notation gives you an alternate way of giving the +same rewrite rule: \begin{verbatim} rule log(%x) + log(%y) == log(x * y) \end{verbatim} @@ -36088,18 +32389,16 @@ The rule is an object of type \axiomType{RewriteRule} that can be assigned to a variable and applied to expressions to transform them. \endImportant -Rewrite rules can be collected -into rulesets so that a set of rules can be applied at once. -Here is another simplification rule for logarithms. -\texht{\narrowDisplay{y \log(x) = \log(x^y) \quad\forall \, x \hbox{\ and\ } y.}}{ -\axiom{y * log(x) == log(x ** y)} for any \axiom{x} and \axiom{y}.} -If instead of giving a single rule following the reserved word \axiom{rule} -you give a ``pile'' of rules, you create -what is called a {\it ruleset.} -Like rules, rulesets are objects in Axiom and -can be assigned to variables. -You will find it useful to group commonly used rules into input files, and read -them in as needed. +Rewrite rules can be collected into rulesets so that a set of rules +can be applied at once. Here is another simplification rule for +logarithms. \texht{\narrowDisplay{y \log(x) = \log(x^y) \quad\forall +\, x \hbox{\ and\ } y.}}{ \axiom{y * log(x) == log(x ** y)} for any +\axiom{x} and \axiom{y}.} If instead of giving a single rule +following the reserved word \axiom{rule} you give a ``pile'' of rules, +you create what is called a {\it ruleset.} Like rules, rulesets are +objects in Axiom and can be assigned to variables. You will find it +useful to group commonly used rules into input files, and read them in +as needed. \xtc{ Create a ruleset named \axiom{logrules}. }{ @@ -36120,19 +32419,18 @@ Apply the ruleset \userfun{logrules} to \axiom{f}. \spadpaste{logrules f \free{f1}\free{logrules}} } -We have allowed pattern variables to match arbitrary expressions in the -above examples. -Often you want a variable only to match expressions -satisfying some predicate. -For example, we may want to apply the transformation -\texht{\narrowDisplay{y \log(x) = \log(x^y)}}{\axiom{y * log(x) == log(x ** y)}} -only when \axiom{y} is an integer. +We have allowed pattern variables to match arbitrary expressions in +the above examples. Often you want a variable only to match +expressions satisfying some predicate. For example, we may want to +apply the transformation \texht{\narrowDisplay{y \log(x) = +\log(x^y)}}{\axiom{y * log(x) == log(x ** y)}} only when \axiom{y} is +an integer. % -The way to restrict a pattern variable \axiom{y} by a predicate \axiom{f(y)} -is by using a vertical bar \axiomSyntax{|}, which means ``such that,'' in -much the same way it is used in function definitions. -You do this only once, but at the earliest -(meaning deepest and leftmost) part of the pattern. +The way to restrict a pattern variable \axiom{y} by a predicate +\axiom{f(y)} is by using a vertical bar \axiomSyntax{|}, which means +``such that,'' in much the same way it is used in function +definitions. You do this only once, but at the earliest (meaning +deepest and leftmost) part of the pattern. \xtc{ This restricts the logarithmic rule to create integer exponents only. }{ @@ -36159,7 +32457,9 @@ Here we use \spadfun{integer} because \spad{n} has type \spadtype{Expression Integer} but \spadfun{even?} is an operation defined on integers. }{ -\spadpaste{evenRule := rule cos(x)**(n | integer? n and even? integer n)==(1-sin(x)**2)**(n/2) \bound{evenRule}} +\spadpaste{ +evenRule := rule cos(x)**(n | integer? n and even? integer n)== +(1-sin(x)**2)**(n/2) \bound{evenRule}} } \xtc{ Here is the application of the rule. @@ -36179,20 +32479,21 @@ sinCosProducts == rule } \xtc{ }{ -\spadpaste{g := sin(a)*sin(b) + cos(b)*cos(a) + sin(2*a)*cos(2*a) \bound{g}} +\spadpaste{g := sin(a)*sin(b) + cos(b)*cos(a) + sin(2*a)*cos(2*a) +\bound{g}} } \xtc{ }{ \spadpaste{sinCosProducts g \free{sinCosProducts g}} } -Another qualification you will often want to use is to allow a pattern to -match an identity element. -Using the pattern \axiom{x + y}, for example, neither \axiom{x} nor \axiom{y} -matches the expression \axiom{0}. -Similarly, if a pattern contains a product \axiom{x*y} or an exponentiation -\axiom{x**y}, then neither \axiom{x} or \axiom{y} matches \axiom{1}. -% +Another qualification you will often want to use is to allow a pattern +to match an identity element. Using the pattern \axiom{x + y}, for +example, neither \axiom{x} nor \axiom{y} matches the expression +\axiom{0}. Similarly, if a pattern contains a product \axiom{x*y} or +an exponentiation \axiom{x**y}, then neither \axiom{x} or \axiom{y} +matches \axiom{1}. + \xtc{ If identical elements were matched, pattern matching would generally loop. Here is an expansion rule for exponentials. @@ -36205,27 +32506,26 @@ This rule would cause infinite rewriting on this if either \axiom{a} or }{ \spadpaste{exprule exp x \free{exprule}} } -% + There are occasions when you do want a pattern variable in a sum or -product to match \axiom{0} or \axiom{1}. -If so, prefix its name -with a \axiomSyntax{?} whenever it appears in a left-hand side of a rule. +product to match \axiom{0} or \axiom{1}. If so, prefix its name with +a \axiomSyntax{?} whenever it appears in a left-hand side of a rule. For example, consider the following rule for the exponential integral: -\texht{\narrowDisplay{\int \left(\frac{y+e^x}{x}\right)\: dx = \int \frac{y}{x}\: dx + \hbox{\rm Ei}(x) -\quad\forall \, x \hbox{\ and\ } y.}}{ -\axiom{integral((y + exp x)/x, x) == integral(y/x, x) + Ei x} -for any \axiom{x} and \axiom{y}.} -This rule is valid for \axiom{y = 0}. -One solution is to create a \axiomType{Ruleset} with two -rules, one with and one without \axiom{y}. -A better solution is to use an ``optional'' pattern variable. -% +\texht{\narrowDisplay{\int \left(\frac{y+e^x}{x}\right)\: dx = \int +\frac{y}{x}\: dx + \hbox{\rm Ei}(x) \quad\forall \, x \hbox{\ and\ } +y.}}{ \axiom{integral((y + exp x)/x, x) == integral(y/x, x) + Ei x} +for any \axiom{x} and \axiom{y}.} This rule is valid for \axiom{y = +0}. One solution is to create a \axiomType{Ruleset} with two rules, +one with and one without \axiom{y}. A better solution is to use an +``optional'' pattern variable. + \xtc{ Define rule \axiom{eirule} with a pattern variable \axiom{?y} to indicate that an expression may or may not occur. }{ -\spadpaste{eirule := rule integral((?y + exp x)/x,x) == integral(y/x,x) + Ei x \bound{eirule}} +\spadpaste{eirule := rule integral((?y + exp x)/x,x) == +integral(y/x,x) + Ei x \bound{eirule}} } \xtc{ Apply rule \axiom{eirule} to an integral without this term. @@ -36238,18 +32538,18 @@ Apply rule \axiom{eirule} to an integral with this term. \spadpaste{eirule integral(sin u + exp u/u, u) \free{eirule}} } -Here is one final adornment you will find useful. -When matching a pattern of the form \axiom{x + y} to an expression containing a -long sum of the form \axiom{a +\ldots+ b}, there is no way to predict in -advance which subset of the sum matches \axiom{x} and which matches -\axiom{y}. -Aside from efficiency, this is generally unimportant since the rule holds for -any possible combination of matches for \axiom{x} and \axiom{y}. -In some situations, however, you may want to say which pattern variable is a sum -(or product) of several terms, and which should match only a single term. -To do this, put a prefix colon \axiomSyntax{:} before the pattern variable -that you want to match multiple terms. -% +Here is one final adornment you will find useful. When matching a +pattern of the form \axiom{x + y} to an expression containing a long +sum of the form \axiom{a +\ldots+ b}, there is no way to predict in +advance which subset of the sum matches \axiom{x} and which matches +\axiom{y}. Aside from efficiency, this is generally unimportant since +the rule holds for any possible combination of matches for \axiom{x} +and \axiom{y}. In some situations, however, you may want to say which +pattern variable is a sum (or product) of several terms, and which +should match only a single term. To do this, put a prefix colon +\axiomSyntax{:} before the pattern variable that you want to match +multiple terms. + \xtc{ The remaining rules involve operators \axiom{u} and \axiom{v}. }{ @@ -36292,22 +32592,20 @@ certain classes of problems, namely, those that involve transformations of one form to another and back. However, it is important to recognize its limitations. -First, pattern matching slows down as the number of rules you have to apply -increases. -Thus it is good practice to organize the sets of rules you use optimally so -that irrelevant rules are never included. +First, pattern matching slows down as the number of rules you have to +apply increases. Thus it is good practice to organize the sets of +rules you use optimally so that irrelevant rules are never included. Second, careless use of pattern matching can lead to wrong answers. You should avoid using pattern matching to handle hidden algebraic -relationships that can go undetected by other programs. -As a simple example, a symbol such as ``J'' can easily be used to represent -the square root of \axiom{-1} or some other important algebraic quantity. -Many algorithms branch on whether an expression is zero or not, then divide by -that expression if it is not. -If you fail to simplify an expression involving powers of -\axiom{J} to \axiom{-1,} -algorithms may incorrectly assume an expression is non-zero, take a wrong -branch, and produce a meaningless result. +relationships that can go undetected by other programs. As a simple +example, a symbol such as ``J'' can easily be used to represent the +square root of \axiom{-1} or some other important algebraic quantity. +Many algorithms branch on whether an expression is zero or not, then +divide by that expression if it is not. If you fail to simplify an +expression involving powers of \axiom{J} to \axiom{-1,} algorithms may +incorrectly assume an expression is non-zero, take a wrong branch, and +produce a meaningless result. Pattern matching should also not be used as a substitute for a domain. In Axiom, objects of one domain are transformed to objects of other @@ -36328,46 +32626,32 @@ or by building a new domain of objects for your application. \newcommand{\argDef}[1]{{\tt ({#1})}} \newcommand{\funSyntax}[2]{\axiomFun{#1}{\tt ({\small\it{#2}})}} \newcommand{\funArgs}[1]{{\tt ({\small\it {#1}})}\newline} -\newcommand{\ugGraphTitle}{Graphics} -\newcommand{\ugGraphNumber}{7.} - -@ -\section{Graphics} -\label{ugGraphPage} -\begin{itemize} -\item ugGraphTwoDPage \ref{ugGraphTwoDPage} on -page~\pageref{ugGraphTwoDPage} -\item ugGraphThreeDPage \ref{ugGraphThreeDPage} on -page~\pageref{ugGraphThreeDPage} -\end{itemize} -\index{pages!ugGraphPage!ug07.ht} -\index{ug07.ht!pages!ugGraphPage} -\index{ugGraphPage!ug07.ht!pages} + +@ +\pagehead{ugGraphPage}{ug07.ht}{Graphics} +\pageto{notitle}{ugGraphTwoDPage} +\pageto{notitle}{ugGraphThreeDPage} <>= \begin{page}{ugGraphPage}{7. Graphics} \beginscroll % -This chapter shows how to use the Axiom graphics facilities -under the X Window System. -Axiom has \twodim{} and \threedim{} drawing and rendering -packages that allow the drawing, coloring, transforming, mapping, -clipping, and combining of graphic output from Axiom -computations. -This facility is particularly useful for investigating problems in -areas such as topology. -The graphics package is capable of plotting functions of one or -more variables or plotting parametric surfaces and curves. -Various coordinate systems are also available, such as polar and -spherical. +This chapter shows how to use the Axiom graphics facilities under the +X Window System. Axiom has \twodim{} and \threedim{} drawing and +rendering packages that allow the drawing, coloring, transforming, +mapping, clipping, and combining of graphic output from Axiom +computations. This facility is particularly useful for investigating +problems in areas such as topology. The graphics package is capable +of plotting functions of one or more variables or plotting parametric +surfaces and curves. Various coordinate systems are also available, +such as polar and spherical. -A graph is displayed in a viewport window and it has a -control-panel that uses interactive mouse commands. -PostScript and other output forms are available so that Axiom -images can be printed or used by other programs.\footnote{PostScript -is a trademark of Adobe Systems Incorporated, registered in the United -States.} +A graph is displayed in a viewport window and it has a control-panel +that uses interactive mouse commands. PostScript and other output +forms are available so that Axiom images can be printed or used by +other programs.\footnote{PostScript is a trademark of Adobe Systems +Incorporated, registered in the United States.} \beginmenu \menudownlink{{7.1. Two-Dimensional Graphics}}{ugGraphTwoDPage} @@ -36378,38 +32662,17 @@ States.} \end{page} @ -<>= -\newcommand{\ugGraphTwoDTitle}{Two-Dimensional Graphics} -\newcommand{\ugGraphTwoDNumber}{7.1.} - -@ -\section{Two-Dimensional Graphics} -\label{ugGraphTwoDPage} -\begin{itemize} -\item ugGraphTwoDPlotPage \ref{ugGraphTwoDPlotPage} on -page~\pageref{ugGraphTwoDPlotPage} -\item ugGraphTwoDParPage \ref{ugGraphTwoDParPage} on -page~\pageref{ugGraphTwoDParPage} -\item ugGraphTwoDPlanePage \ref{ugGraphTwoDPlanePage} on -page~\pageref{ugGraphTwoDPlanePage} -\item ugGraphTwoDOptionsPage \ref{ugGraphTwoDOptionsPage} on -page~\pageref{ugGraphTwoDOptionsPage} -\item ugGraphColorPage \ref{ugGraphColorPage} on -page~\pageref{ugGraphColorPage} -\item ugGraphColorPalettePage \ref{ugGraphColorPalettePage} on -page~\pageref{ugGraphColorPalettePage} -\item ugGraphTwoDControlPage \ref{ugGraphTwoDControlPage} on -page~\pageref{ugGraphTwoDControlPage} -\item ugGraphTwoDopsPage \ref{ugGraphTwoDopsPage} on -page~\pageref{ugGraphTwoDopsPage} -\item ugGraphTwoDbuildPage \ref{ugGraphTwoDbuildPage} on -page~\pageref{ugGraphTwoDbuildPage} -\item ugGraphTwoDappendPage \ref{ugGraphTwoDappendPage} on -page~\pageref{ugGraphTwoDappendPage} -\end{itemize} -\index{pages!ugGraphTwoDPage!ug07.ht} -\index{ug07.ht!pages!ugGraphTwoDPage} -\index{ugGraphTwoDPage!ug07.ht!pages} +\pagehead{ugGraphTwoDPage}{ug07.ht}{Two-Dimensional Graphics} +\pageto{notitle}{ugGraphTwoDPlotPage} +\pageto{notitle}{ugGraphTwoDParPage} +\pageto{notitle}{ugGraphTwoDPlanePage} +\pageto{notitle}{ugGraphTwoDOptionsPage} +\pageto{notitle}{ugGraphColorPage} +\pageto{notitle}{ugGraphColorPalettePage} +\pageto{notitle}{ugGraphTwoDControlPage} +\pageto{notitle}{ugGraphTwoDopsPage} +\pageto{notitle}{ugGraphTwoDbuildPage} +\pageto{notitle}{ugGraphTwoDappendPage} <>= \begin{page}{ugGraphTwoDPage}{7.1. Two-Dimensional Graphics} \beginscroll @@ -36435,50 +32698,41 @@ calculating points in the polar coordinate system or changing the size of the graph viewport window. \beginmenu - \menudownlink{{7.1.1. Plotting Two-Dimensional Functions of One Variable}} +\menudownlink{{7.1.1. Plotting Two-Dimensional Functions of One Variable}} {ugGraphTwoDPlotPage} - \menudownlink{{7.1.2. Plotting Two-Dimensional Parametric Plane Curves}} +\menudownlink{{7.1.2. Plotting Two-Dimensional Parametric Plane Curves}} {ugGraphTwoDParPage} - \menudownlink{{7.1.3. Plotting Plane Algebraic Curves}} +\menudownlink{{7.1.3. Plotting Plane Algebraic Curves}} {ugGraphTwoDPlanePage} - \menudownlink{{7.1.4. Two-Dimensional Options}}{ugGraphTwoDOptionsPage} - \menudownlink{{7.1.5. Color}}{ugGraphColorPage} - \menudownlink{{7.1.6. Palette}}{ugGraphColorPalettePage} - \menudownlink{{7.1.7. Two-Dimensional Control-Panel}} +\menudownlink{{7.1.4. Two-Dimensional Options}}{ugGraphTwoDOptionsPage} +\menudownlink{{7.1.5. Color}}{ugGraphColorPage} +\menudownlink{{7.1.6. Palette}}{ugGraphColorPalettePage} +\menudownlink{{7.1.7. Two-Dimensional Control-Panel}} {ugGraphTwoDControlPage} - \menudownlink{{7.1.8. Operations for Two-Dimensional Graphics}} +\menudownlink{{7.1.8. Operations for Two-Dimensional Graphics}} {ugGraphTwoDopsPage} - \menudownlink{{7.1.9. Addendum: Building Two-Dimensional Graphs}} +\menudownlink{{7.1.9. Addendum: Building Two-Dimensional Graphs}} {ugGraphTwoDbuildPage} - \menudownlink{ -{7.1.10. Addendum: Appending a Graph to a Viewport Window Containing a Graph}} -{ugGraphTwoDappendPage} +\menudownlink{ +{7.1.10. Addendum: Appending a Graph to a Viewport Window +Containing a Graph}}{ugGraphTwoDappendPage} \endmenu \endscroll \autobuttons \end{page} @ +\pagehead{ugGraphTwoDPlotPage}{ug07.ht} +{Plotting Two-Dimensional Functions of One Variable} +\pageto{notitle}{ugGraphTwoDOptionsPage} <>= -\newcommand{\ugGraphTwoDPlotTitle}{Plotting Two-Dimensional Functions of One Variable} -\newcommand{\ugGraphTwoDPlotNumber}{7.1.1.} - -@ -\section{Plotting Two-Dimensional Functions of One Variable} -\label{ugGraphTwoDPlotPage} -\begin{itemize} -\item ugGraphTwoDOptionsPage \ref{ugGraphTwoDOptionsPage} on -page~\pageref{ugGraphTwoDOptionsPage} -\end{itemize} -\index{pages!ugGraphTwoDPlotPage!ug07.ht} -\index{ug07.ht!pages!ugGraphTwoDPlotPage} -\index{ugGraphTwoDPlotPage!ug07.ht!pages} -<>= -\begin{page}{ugGraphTwoDPlotPage}{7.1.1. Plotting Two-Dimensional Functions of One Variable} +\begin{page}{ugGraphTwoDPlotPage} +{7.1.1. Plotting Two-Dimensional Functions of One Variable} \beginscroll -The first kind of \twodim{} graph is that of a curve defined by a function -\axiom{y = f(x)} over a finite interval of the \axiom{x} axis. +The first kind of \twodim{} graph is that of a curve defined by a +function \axiom{y = f(x)} over a finite interval of the \axiom{x} +axis. % \beginImportant @@ -36495,10 +32749,10 @@ An alternative format involving functions \axiom{f} and \axiom{g} is also available. \endImportant -A simple way to plot a function is to use a formula. -The first argument is the formula. -For the second argument, write the name of the independent variable (here, \axiom{x}), -followed by an \spadSyntax{=}, and the range of values. +A simple way to plot a function is to use a formula. The first +argument is the formula. For the second argument, write the name of +the independent variable (here, \axiom{x}), followed by an +\spadSyntax{=}, and the range of values. \psXtc{ Display this formula over the range @@ -36549,23 +32803,12 @@ and the second is just the range with no independent variable. \end{page} @ -<>= -\newcommand{\ugGraphTwoDParTitle}{Plotting Two-Dimensional Parametric Plane Curves} -\newcommand{\ugGraphTwoDParNumber}{7.1.2.} - -@ -\section{Plotting Two-Dimensional Parametric Plane Curves} -\label{ugGraphTwoDParPage} -\begin{itemize} -\item ugGraphThreeDOptionsPage \ref{ugGraphThreeDOptionsPage} on -page~\pageref{ugGraphThreeDOptionsPage} -\end{itemize} -\index{pages!ugGraphTwoDParPage!ug07.ht} -\index{ug07.ht!pages!ugGraphTwoDParPage} -\index{ugGraphTwoDParPage!ug07.ht!pages} +\pagehead{ugGraphTwoDParPage}{ug07.ht} +{Plotting 2D Parametric Plane Curves} +\pageto{notitle}{ugGraphThreeDOptionsPage} <>= \begin{page}{ugGraphTwoDParPage} -{7.1.2. Plotting Two-Dimensional Parametric Plane Curves} +{7.1.2. Plotting 2D Parametric Plane Curves} \beginscroll The second kind of \twodim{} graph is that of @@ -36597,7 +32840,8 @@ Define a parametric curve using a range involving For parametric curves, Axiom compiles two functions, one for each of the functions \axiom{f} and \axiom{g}. }{ -\graphpaste{draw(curve(sin(t)*sin(2*t)*sin(3*t), sin(4*t)*sin(5*t)*sin(6*t)), t = 0..2*\%pi)} +\graphpaste{draw(curve(sin(t)*sin(2*t)*sin(3*t), +sin(4*t)*sin(5*t)*sin(6*t)), t = 0..2*\%pi)} }{ \epsffile[0 0 295 295]{../ps/2dppca.ps} } @@ -36656,20 +32900,8 @@ the first function specified in \axiomFun{curve}. \end{page} @ -<>= -\newcommand{\ugGraphTwoDPlaneTitle}{Plotting Plane Algebraic Curves} -\newcommand{\ugGraphTwoDPlaneNumber}{7.1.3.} - -@ -\section{Plotting Plane Algebraic Curves} -\label{ugGraphTwoDPlanePage} -\begin{itemize} -\item ugGraphTwoDOptionsPage \ref{ugGraphTwoDOptionsPage} on -page~\pageref{ugGraphTwoDOptionsPage} -\end{itemize} -\index{pages!ugGraphTwoDPlanePage!ug07.ht} -\index{ug07.ht!pages!ugGraphTwoDPlanePage} -\index{ugGraphTwoDPlanePage!ug07.ht!pages} +\pagehead{ugGraphTwoDPlanePage}{ug07.ht}{Plotting Plane Algebraic Curves} +\pageto{notitle}{ugGraphTwoDOptionsPage} <>= \begin{page}{ugGraphTwoDPlanePage}{7.1.3. Plotting Plane Algebraic Curves} \beginscroll @@ -36692,7 +32924,8 @@ are not both zero. The general format for drawing a non-singular solution curve given by a polynomial of the form \axiom{p(x,y) = 0} is: % -\centerline{{{\tt draw(p(x,y) = 0, x, y, range == [a..b, c..d], {\it options})}}} +\centerline{{{\tt draw(p(x,y) = 0, x, y, range == [a..b, c..d], +{\it options})}}} where the second and third arguments name the first and second independent variables of \axiom{p}. A {\tt range} option is always given to designate a bounding @@ -36708,7 +32941,8 @@ may be given. We require that the polynomial has rational or integral coefficients. Here is an algebraic curve example (``Cartesian ovals''): }{ -\spadpaste{p := ((x**2 + y**2 + 1) - 8*x)**2 - (8*(x**2 + y**2 + 1)-4*x-1) \bound{p}} +\spadpaste{p := ((x**2 + y**2 + 1) - 8*x)**2 - +(8*(x**2 + y**2 + 1)-4*x-1) \bound{p}} } \psXtc{ @@ -36725,26 +32959,11 @@ The first argument is always expressed as an equation of the form \end{page} @ -<>= -\newcommand{\ugGraphTwoDOptionsTitle}{Two-Dimensional Options} -\newcommand{\ugGraphTwoDOptionsNumber}{7.1.4.} - -@ -\section{Two-Dimensional Options} -\label{ugGraphTwoDOptionsPage} -\begin{itemize} -\item ugGraphColorPage \ref{ugGraphColorPage} on -page~\pageref{ugGraphColorPage} -\item ugGraphColorPalettePage \ref{ugGraphColorPalettePage} on -page~\pageref{ugGraphColorPalettePage} -\item ugGraphColorPage \ref{ugGraphColorPage} on -page~\pageref{ugGraphColorPage} -\item ugGraphColorPalettePage \ref{ugGraphColorPalettePage} on -page~\pageref{ugGraphColorPalettePage} -\end{itemize} -\index{pages!ugGraphTwoDOptionsPage!ug07.ht} -\index{ug07.ht!pages!ugGraphTwoDOptionsPage} -\index{ugGraphTwoDOptionsPage!ug07.ht!pages} +\pagehead{ugGraphTwoDOptionsPage}{ug07.ht}{Two-Dimensional Options} +\pageto{notitle}{ugGraphColorPage} +\pageto{notitle}{ugGraphColorPalettePage} +\pageto{notitle}{ugGraphColorPage} +\pageto{notitle}{ugGraphColorPalettePage} <>= \begin{page}{ugGraphTwoDOptionsPage}{7.1.4. Two-Dimensional Options} \beginscroll @@ -36803,14 +33022,15 @@ Option {\tt clip} with a range sets point clipping of a graph within the ranges specified in the list \axiom{[x range,y range]}. If only one range is specified, clipping applies to the y-axis. }{ -\graphpaste{draw(sec(x),x=-2*\%pi..2*\%pi, clip == [-2*\%pi..2*\%pi,-\%pi..\%pi], unit == [1.0,1.0])} +\graphpaste{draw(sec(x),x=-2*\%pi..2*\%pi, +clip == [-2*\%pi..2*\%pi,-\%pi..\%pi], unit == [1.0,1.0])} }{ \epsffile[0 0 295 295]{../ps/2doptcpr.ps} } % \psXtc{ -Option {\tt curveColor} sets the color of the graph curves or lines to be the -indicated palette color +Option {\tt curveColor} sets the color of the graph curves or +lines to be the indicated palette color (see \downlink{``\ugGraphColorTitle''}{ugGraphColorPage} in Section \ugGraphColorNumber\ignore{ugGraphColor} and \downlink{``\ugGraphColorPaletteTitle''}{ugGraphColorPalettePage} @@ -36839,7 +33059,8 @@ in Section \ugGraphColorPaletteNumber\ignore{ugGraphColorPalette}). Option {\tt unit} sets the intervals at which the axis units are plotted according to the indicated steps [\axiom{x} interval, \axiom{y} interval]. }{ -\graphpaste{draw(curve(9*sin(3*t/4),8*sin(t)), t = -4*\%pi..4*\%pi, unit == [2.0,1.0])} +\graphpaste{draw(curve(9*sin(3*t/4),8*sin(t)), +t = -4*\%pi..4*\%pi, unit == [2.0,1.0])} }{ \epsffile[0 0 295 295]{../ps/2doptut.ps} } @@ -36850,7 +33071,8 @@ Option {\tt range} sets the range of variables in a graph to be within the ranges for solving plane algebraic curve plots. }{ -\graphpaste{draw(y**2 + y - (x**3 - x) = 0, x, y, range == [-2..2,-2..1], unit==[1.0,1.0])} +\graphpaste{draw(y**2 + y - (x**3 - x) = 0, x, y, +range == [-2..2,-2..1], unit==[1.0,1.0])} }{ \epsffile[0 0 295 295]{../ps/2doptrga.ps} } @@ -36859,7 +33081,8 @@ for solving plane algebraic curve plots. \psXtc{ A second example of a solution plot. }{ -\graphpaste{draw(x**2 + y**2 = 1, x, y, range == [-3/2..3/2,-3/2..3/2], unit==[0.5,0.5])} +\graphpaste{draw(x**2 + y**2 = 1, x, y, +range == [-3/2..3/2,-3/2..3/2], unit==[0.5,0.5])} }{ \epsffile[0 0 295 295]{../ps/2doptrgb.ps} } @@ -36870,7 +33093,9 @@ Option \axiom{coordinates} indicates the coordinate system in which the graph is plotted. The default is to use the Cartesian coordinate system. -For more details, see \downlink{``\ugGraphCoordTitle''}{ugGraphCoordPage} in Section \ugGraphCoordNumber\ignore{ugGraphCoord} \texht{.}{or +For more details, see +\downlink{``\ugGraphCoordTitle''}{ugGraphCoordPage} in +Section \ugGraphCoordNumber\ignore{ugGraphCoord} \texht{.}{or \axiomType{CoordinateSystems}.} }{ \graphpaste{draw(curve(sin(5*t),t),t=0..2*\%pi, coordinates == polar)} @@ -36883,32 +33108,18 @@ For more details, see \downlink{``\ugGraphCoordTitle''}{ugGraphCoordPage} in Sec \end{page} @ -<>= -\newcommand{\ugGraphColorTitle}{Color} -\newcommand{\ugGraphColorNumber}{7.1.5.} - -@ -\section{Color} -\label{ugGraphColorPage} -\index{pages!ugGraphColorPage!ug07.ht} -\index{ug07.ht!pages!ugGraphColorPage} -\index{ugGraphColorPage!ug07.ht!pages} +\pagehead{ugGraphColorPage}{ug07.ht}{Color} <>= \begin{page}{ugGraphColorPage}{7.1.5. Color} \beginscroll -The domain \axiomType{Color} -provides operations for manipulating -colors in \twodim{} graphs. -Colors are objects of \axiomType{Color}. -Each color has a {\it hue} and a {\it weight}. -Hues are represented by integers that range from \axiom{1} to the -\axiomFunFrom{numberOfHues()}{Color}, normally -\axiom{27}. -%\footnote{Use \axiomFun{colorDef} to -%change these values to any range you want for a given \threedim{} viewport} -Weights are floats and have the value \axiom{1.0} by default. -% +The domain \axiomType{Color} provides operations for manipulating +colors in \twodim{} graphs. Colors are objects of \axiomType{Color}. +Each color has a {\it hue} and a {\it weight}. Hues are represented +by integers that range from \axiom{1} to the +\axiomFunFrom{numberOfHues()}{Color}, normally \axiom{27}. Weights +are floats and have the value \axiom{1.0} by default. + \indent{0} \beginitems % @@ -36962,22 +33173,14 @@ Use the {\tt curveColor} option for curves. \end{page} @ -<>= -\newcommand{\ugGraphColorPaletteTitle}{Palette} -\newcommand{\ugGraphColorPaletteNumber}{7.1.6.} - -@ -\section{Palette} -\label{ugGraphColorPalettePage} -\index{pages!ugGraphColorPalettePage!ug07.ht} -\index{ug07.ht!pages!ugGraphColorPalettePage} -\index{ugGraphColorPalettePage!ug07.ht!pages} +\pagehead{ugGraphColorPalettePage}{ug07.ht}{Palette} <>= \begin{page}{ugGraphColorPalettePage}{7.1.6. Palette} \beginscroll Domain \axiomType{Palette} is the domain of shades of colors: -\axiomFun{dark}, \axiomFun{dim}, \axiomFun{bright}, \axiomFun{pastel}, and \axiomFun{light}, +\axiomFun{dark}, \axiomFun{dim}, \axiomFun{bright}, +\axiomFun{pastel}, and \axiomFun{light}, designated by the integers \axiom{1} through \axiom{5}, respectively. \xtc{ Colors are normally ``bright.'' @@ -37013,16 +33216,7 @@ Palettes can be used in specifying colors in \twodim{} graphs. \end{page} @ -<>= -\newcommand{\ugGraphTwoDControlTitle}{Two-Dimensional Control-Panel} -\newcommand{\ugGraphTwoDControlNumber}{7.1.7.} - -@ -\section{Two-Dimensional Control-Panel} -\label{ugGraphTwoDControlPage} -\index{pages!ugGraphTwoDControlPage!ug07.ht} -\index{ug07.ht!pages!ugGraphTwoDControlPage} -\index{ugGraphTwoDControlPage!ug07.ht!pages} +\pagehead{ugGraphTwoDControlPage}{ug07.ht}{Two-Dimensional Control-Panel} <>= \begin{page}{ugGraphTwoDControlPage}{7.1.7. Two-Dimensional Control-Panel} \beginscroll @@ -37035,83 +33229,82 @@ current state of the graph. \subsubsection{Transformations} -Object transformations are executed from the control-panel by mouse-activated -potentiometer windows. +Object transformations are executed from the control-panel by +mouse-activated potentiometer windows. % \indent{0} \beginitems -% -\item[Scale:] To scale a graph, click on a mouse button -within the {\bf Scale} window in the upper left corner of the control-panel. -The axes along which the scaling is to occur are indicated by setting the -toggles above the arrow. -With {\tt X On} and {\tt Y On} appearing, both axes are selected and scaling -is uniform. -If either is not selected, for example, if {\tt X Off} appears, scaling is -non-uniform. -% -\item[Translate:] To translate a graph, click the mouse in the -{\bf Translate} window in the direction you wish the graph to move. -This window is located in the upper right corner of the control-panel. -Along the top of the {\bf Translate} window are two buttons for selecting -the direction of translation. -Translation along both coordinate axes results when {\tt X On} and {\tt Y -On} appear or along one axis when one is on, for example, {\tt X On} and -{\tt Y Off} appear. + +\item[Scale:] To scale a graph, click on a mouse button within the +{\bf Scale} window in the upper left corner of the control-panel. The +axes along which the scaling is to occur are indicated by setting the +toggles above the arrow. With {\tt X On} and {\tt Y On} appearing, +both axes are selected and scaling is uniform. If either is not +selected, for example, if {\tt X Off} appears, scaling is non-uniform. + +\item[Translate:] To translate a graph, click the mouse in the {\bf +Translate} window in the direction you wish the graph to move. This +window is located in the upper right corner of the control-panel. +Along the top of the {\bf Translate} window are two buttons for +selecting the direction of translation. Translation along both +coordinate axes results when {\tt X On} and {\tt Y On} appear or along +one axis when one is on, for example, {\tt X On} and {\tt Y Off} +appear. \enditems \indent{0} \subsubsection{Messages} The window directly below the transformation potentiometer windows is -used to display system messages relating to the viewport and the control-panel. -The following format is displayed: \newline -% -\centerline{{[scaleX, scaleY] \axiom{>}graph\axiom{<} [translateX, translateY] \newline}} +used to display system messages relating to the viewport and the +control-panel. The following format is displayed: \newline + +\centerline{{[scaleX, scaleY] \axiom{>} +graph\axiom{<} [translateX, translateY] \newline}} The two values to the left show the scale factor along the {\tt X} and -{\tt Y} coordinate axes. The two values to the right show the distance of -translation from the center in the {\tt X} and {\tt Y} directions. The number -in the center shows which graph in the viewport this data pertains to. -When multiple graphs exist in the same viewport, -the graph must be selected (see ``Multiple Graphs,'' below) in -order for its transformation data to be shown, otherwise the number -is 1. +{\tt Y} coordinate axes. The two values to the right show the +distance of translation from the center in the {\tt X} and {\tt Y} +directions. The number in the center shows which graph in the +viewport this data pertains to. When multiple graphs exist in the +same viewport, the graph must be selected (see ``Multiple Graphs,'' +below) in order for its transformation data to be shown, otherwise the +number is 1. \subsubsection{Multiple Graphs} -The {\bf Graphs} window contains buttons that allow the placement -of \twodim{} graphs into one of nine available slots in any other -\twodim{} viewport. -In the center of the window are numeral buttons from one to nine -that show whether a graph is displayed in the viewport. -Below each number button is a button showing whether a graph -that is present is selected for application of some -transformation. -When the caret symbol is displayed, then the graph in that slot -will be manipulated. -Initially, the graph for which the viewport is created occupies -the first slot, is displayed, and is selected. -% +The {\bf Graphs} window contains buttons that allow the placement of +\twodim{} graphs into one of nine available slots in any other +\twodim{} viewport. In the center of the window are numeral buttons +from one to nine that show whether a graph is displayed in the +viewport. Below each number button is a button showing whether a +graph that is present is selected for application of some +transformation. When the caret symbol is displayed, then the graph in +that slot will be manipulated. Initially, the graph for which the +viewport is created occupies the first slot, is displayed, and is +selected. + % \indent{0} \beginitems -% -\item[Clear:] The {\bf Clear} button deselects every viewport graph slot. -A graph slot is reselected by selecting the button below its number. -% -\item[Query:] The {\bf Query} button is used to display the scale and -translate data for the indicated graph. When this button is selected the -message ``Click on the graph to query'' appears. Select a slot -number button from the {\bf Graphs} window. The scaling factor and translation -offset of the graph are then displayed in the message window. -% -\item[Pick:] The {\bf Pick} button is used to select a graph -to be placed or dropped into the indicated viewport. When this button is -selected, the message ``Click on the graph to pick'' appears. -Click on the slot with the graph number of the desired -graph. The graph information is held waiting for -you to execute a {\bf Drop} in some other graph. -% + +\item[Clear:] The {\bf Clear} button deselects every viewport graph +slot. A graph slot is reselected by selecting the button below its +number. + +\item[Query:] The {\bf Query} button is used to display the scale and +translate data for the indicated graph. When this button is selected +the message ``Click on the graph to query'' appears. Select a slot +number button from the {\bf Graphs} window. The scaling factor and +translation offset of the graph are then displayed in the message +window. + +\item[Pick:] The {\bf Pick} button is used to select a graph to be +placed or dropped into the indicated viewport. When this button is +selected, the message ``Click on the graph to pick'' appears. Click +on the slot with the graph number of the desired graph. The graph +information is held waiting for you to execute a {\bf Drop} in some +other graph. + \item[Drop:] Once a graph has been picked up using the {\bf Pick} button, the {\bf Drop} button places it into a new viewport slot. The message ``Click on the graph to drop'' appears in the message @@ -37162,16 +33355,8 @@ session should be terminated. \end{page} @ -<>= -\newcommand{\ugGraphTwoDopsTitle}{Operations for Two-Dimensional Graphics} -\newcommand{\ugGraphTwoDopsNumber}{7.1.8.} - -@ -\section{Operations for Two-Dimensional Graphics} -\label{ugGraphTwoDopsPage} -\index{pages!ugGraphTwoDopsPage!ug07.ht} -\index{ug07.ht!pages!ugGraphTwoDopsPage} -\index{ugGraphTwoDopsPage!ug07.ht!pages} +\pagehead{ugGraphTwoDopsPage}{ug07.ht} +{Operations for Two-Dimensional Graphics} <>= \begin{page}{ugGraphTwoDopsPage} {7.1.8. Operations for Two-Dimensional Graphics} @@ -37193,11 +33378,11 @@ parentheses immediately following the name. \item[\axiomFun{adaptive}]\funArgs{\optArg{boolean\argDef{true}}} sets or indicates whether graphs are plotted according to the adaptive refinement algorithm. -% -\item[\axiomFun{axesColorDefault}]\funArgs{\optArg{color\argDef{dark blue()}}} -sets or indicates the default color of the -axes in a \twodim{} graph viewport. -% + +\item[\axiomFun{axesColorDefault}]\funArgs{\optArg{color\argDef{dark +blue()}}} sets or indicates the default color of the axes in a +\twodim{} graph viewport. + \item[\axiomFun{clipPointsDefault}]\funArgs{\optArg{boolean\argDef{false}}} sets or indicates whether point clipping is @@ -37207,11 +33392,11 @@ to be applied as the default for graph plots. sets or indicates whether the plot of a graph is ``to scale'' or uses the entire viewport space as the default. -% -\item[\axiomFun{lineColorDefault}]\funArgs{\optArg{color\argDef{pastel yellow()}}} -sets or indicates the default color of the -lines or curves in a \twodim{} graph viewport. -% + +\item[\axiomFun{lineColorDefault}]\funArgs{\optArg{color\argDef{pastel +yellow()}}} sets or indicates the default color of the lines or curves +in a \twodim{} graph viewport. + \item[\axiomFun{maxPoints}]\funArgs{\optArg{integer\argDef{500}}} sets or indicates the default maximum number of @@ -37220,11 +33405,11 @@ possible points to be used when constructing a \twodim{} graph. \item[\axiomFun{minPoints}]\funArgs{\optArg{integer\argDef{21}}} sets or indicates the default minimum number of possible points to be used when constructing a \twodim{} graph. -% -\item[\axiomFun{pointColorDefault}]\funArgs{\optArg{color\argDef{bright red()}}} -sets or indicates the default color of the -points in a \twodim{} graph viewport. -% + +\item[\axiomFun{pointColorDefault}]\funArgs{\optArg{color\argDef{bright +red()}}} sets or indicates the default color of the points in a +\twodim{} graph viewport. + \item[\axiomFun{pointSizeDefault}]\funArgs{\optArg{integer\argDef{5}}} sets or indicates the default size of the dot used to plot points in a \twodim{} graph. @@ -37233,51 +33418,51 @@ dot used to plot points in a \twodim{} graph. sets or indicates the default screen resolution constant used in setting the computation limit of adaptively generated curve plots. -% -\item[\axiomFun{unitsColorDefault}]\funArgs{\optArg{color\argDef{dim green()}}} -sets or indicates the default color of the -unit labels in a \twodim{} graph viewport. -% + +\item[\axiomFun{unitsColorDefault}]\funArgs{\optArg{color\argDef{dim +green()}}} sets or indicates the default color of the unit labels in a +\twodim{} graph viewport. + \item[\axiomFun{viewDefaults}]\funArgs{} resets the default settings for the following attributes: point color, line color, axes color, units color, point size, viewport upper left-hand corner position, and the viewport size. -% + \item[\axiomFun{viewPosDefault}]\funArgs{\optArg{list\argDef{[100,100]}}} -sets or indicates the default position of the -upper left-hand corner of a \twodim{} viewport, relative to the -display root window. -The upper left-hand corner of the display is considered to be at the -(0, 0) position. -% +sets or indicates the default position of the upper left-hand corner +of a \twodim{} viewport, relative to the display root window. The +upper left-hand corner of the display is considered to be at the (0, +0) position. + \item[\axiomFun{viewSizeDefault}]\funArgs{\optArg{list\argDef{[200,200]}}} -sets or -indicates the default size in which two -dimensional viewport windows are shown. -It is defined by a width and then a height. -% +sets or indicates the default size in which two dimensional viewport +windows are shown. It is defined by a width and then a height. + \item[\axiomFun{viewWriteAvailable}]\funArgs{\optArg{list\argDef{["pixmap", -"bitmap", "postscript", \"image"}}} -indicates the possible file types -that can be created with the \axiomFunFrom{write}{TwoDimensionalViewport} function. -% +"bitmap", "postscript", \"image"}}} indicates the possible file types +that can be created with the +\axiomFunFrom{write}{TwoDimensionalViewport} function. + \item[\axiomFun{viewWriteDefault}] \funArgs{\optArg{list\argDef{[]}}} sets or indicates the default types of files, in addition to the {\bf data} file, that are created when a \axiomFun{write} function is executed on a viewport. -% -\item[\axiomFun{units}]\funArgs{viewport, integer\argDef{1}, string\argDef{"off"}} -turns the units on or off for the graph with index {\it integer}. -% -\item[\axiomFun{axes}]\funArgs{viewport, integer\argDef{1}, string\argDef{"on"}} + +\item[\axiomFun{units}]\funArgs{viewport, integer\argDef{1}, +string\argDef{"off"}} turns the units on or off for the graph with +index {\it integer}. + +\item[\axiomFun{axes}] +\funArgs{viewport, integer\argDef{1}, string\argDef{"on"}} turns the axes on or off for the graph with index {\it integer}. % \item[\axiomFun{close}]\funArgs{viewport} closes {\it viewport}. % -\item[\axiomFun{connect}]\funArgs{viewport, integer\argDef{1}, string\argDef{"on"}} +\item[\axiomFun{connect}] +\funArgs{viewport, integer\argDef{1}, string\argDef{"on"}} declares whether lines connecting the points are displayed or not. % @@ -37311,11 +33496,13 @@ upper left-hand corner of {\it viewport} is at the position {\it (x,y)}. returns a list of all the \axiomType{DrawOption}s used by {\it viewport}. % -\item[\axiomFun{points}]\funArgs{viewport, integer\argDef{1}, string\argDef{"on"}} +\item[\axiomFun{points}] +\funArgs{viewport, integer\argDef{1}, string\argDef{"on"}} specifies whether the graph points for graph {\it integer} are to be displayed or not. % -\item[\axiomFun{region}]\funArgs{viewport, integer\argDef{1}, string\argDef{"off"}} +\item[\axiomFun{region}] +\funArgs{viewport, integer\argDef{1}, string\argDef{"off"}} declares whether graph {\it integer} is or is not to be displayed with a bounding rectangle. % @@ -37326,12 +33513,15 @@ resets all the properties of {\it viewport}. \subscriptText{integer}{width}, \subscriptText{integer}{height}} resizes {\it viewport} with a new {\it width} and {\it height}. % -\item[\axiomFun{scale}]\funArgs{viewport, \subscriptText{integer}{n}\argDef{1}, -\subscriptText{integer}{x}\argDef{0.9}, \subscriptText{integer}{y}\argDef{0.9}} +\item[\axiomFun{scale}]\ +funArgs{viewport, \subscriptText{integer}{n}\argDef{1}, +\subscriptText{integer}{x} +\argDef{0.9}, \subscriptText{integer}{y}\argDef{0.9}} scales values for the {\it x} and {\it y} coordinates of graph {\it n}. % -\item[\axiomFun{show}]\funArgs{viewport, \subscriptText{integer}{n}\argDef{1}, +\item[\axiomFun{show}] +\funArgs{viewport, \subscriptText{integer}{n}\argDef{1}, string\argDef{"on"}} indicates if graph {\it n} is shown or not. % @@ -37340,15 +33530,21 @@ designates the title for {\it viewport}. % \item[\axiomFun{translate}]\funArgs{viewport, \subscriptText{integer}{n}\argDef{1}, -\subscriptText{float}{x}\argDef{0.0}, \subscriptText{float}{y}\argDef{0.0}} -causes graph {\it n} to be moved {\it x} and {\it y} units in the respective directions. +\subscriptText{float}{x} +\argDef{0.0}, \subscriptText{float}{y}\argDef{0.0}} +causes graph {\it n} to be moved {\it x} +and {\it y} units in the respective directions. % -\item[\axiomFun{write}]\funArgs{viewport, \subscriptText{string}{directory}, +\item[\axiomFun{write}]\funArgs{viewport, +\subscriptText{string}{directory}, \optArg{strings}} -if no third argument is given, writes the {\bf data} file onto the directory +if no third argument is given, writes the +{\bf data} file onto the directory with extension {\bf data}. -The third argument can be a single string or a list of strings with some or -all the entries {\tt "pixmap"}, {\tt "bitmap"}, {\tt "postscript"}, and +The third argument can be a single string +or a list of strings with some or +all the entries {\tt "pixmap"}, {\tt "bitmap"}, +{\tt "postscript"}, and {\tt "image"}. \enditems \indent{0} @@ -37359,16 +33555,8 @@ all the entries {\tt "pixmap"}, {\tt "bitmap"}, {\tt "postscript"}, and \end{page} @ -<>= -\newcommand{\ugGraphTwoDbuildTitle}{Addendum: Building Two-Dimensional Graphs} -\newcommand{\ugGraphTwoDbuildNumber}{7.1.9.} - -@ -\section{Addendum: Building Two-Dimensional Graphs} -\label{ugGraphTwoDbuildPage} -\index{pages!ugGraphTwoDbuildPage!ug07.ht} -\index{ug07.ht!pages!ugGraphTwoDbuildPage} -\index{ugGraphTwoDbuildPage!ug07.ht!pages} +\pagehead{ugGraphTwoDbuildPage}{ug07.ht} +{Addendum: Building Two-Dimensional Graphs} <>= \begin{page}{ugGraphTwoDbuildPage} {7.1.9. Addendum: Building Two-Dimensional Graphs} @@ -37380,16 +33568,16 @@ of points from a file. \subsubsection{Creating a Two-Dimensional Viewport from a List of Points} -Axiom creates lists of points in a \twodim{} viewport by utilizing -the \axiomType{GraphImage} and \axiomType{TwoDimensionalViewport} domains. +Axiom creates lists of points in a \twodim{} viewport by utilizing the +\axiomType{GraphImage} and \axiomType{TwoDimensionalViewport} domains. In this example, the \axiomFunFrom{makeGraphImage}{GraphImage} -function takes a list of lists of points parameter, a list of colors for -each point in the graph, a list of colors for each line in the graph, and -a list of sizes for each point in the graph. -% +function takes a list of lists of points parameter, a list of colors +for each point in the graph, a list of colors for each line in the +graph, and a list of sizes for each point in the graph. + \xtc{ -The following expressions create a list of lists of points which will be read -by Axiom and made into a \twodim{} viewport. +The following expressions create a list of lists of points which will +be read by Axiom and made into a \twodim{} viewport. }{ \spadpaste{p1 := point [1,1]\$(Point DFLOAT) \bound{p1}} } @@ -37440,7 +33628,9 @@ by Axiom and made into a \twodim{} viewport. \xtc{ Finally, here is the list. }{ -\spadpaste{llp := [[p1,p2], [p2,p3], [p3,p4], [p4,p1], [p5,p6], [p6,p7], [p7,p8], [p8,p5], [p9,p10], [p10,p11], [p11,p12], [p12,p9]] \free{p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12} \bound{llp}} +\spadpaste{llp := [[p1,p2], [p2,p3], [p3,p4], [p4,p1], [p5,p6], [p6,p7], +[p7,p8], [p8,p5], [p9,p10], [p10,p11], [p11,p12], [p12,p9]] +\free{p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12} \bound{llp}} } \xtc{ Now we set the point sizes for all components of the graph. @@ -37460,7 +33650,8 @@ Now we set the point sizes for all components of the graph. } \xtc{ }{ -\spadpaste{lsize := [size1, size1, size1, size1, size2, size2, size2, size2, size3, size3, size3, size3] \bound{lsize} \free{size1 size2 size3}} +\spadpaste{lsize := [size1, size1, size1, size1, size2, size2, size2, +size2, size3, size3, size3, size3] \bound{lsize} \free{size1 size2 size3}} } \xtc{ Here are the colors for the points. @@ -37477,18 +33668,23 @@ Here are the colors for the points. } \xtc{ }{ -\spadpaste{lpc := [pc1, pc1, pc1, pc1, pc2, pc2, pc2, pc2, pc3, pc3, pc3, pc3] \free{pc1 pc2 pc3} \bound{lpc}} +\spadpaste{lpc := [pc1, pc1, pc1, pc1, pc2, pc2, pc2, pc2, pc3, pc3, +pc3, pc3] \free{pc1 pc2 pc3} \bound{lpc}} } \xtc{ Here are the colors for the lines. }{ -\spadpaste{lc := [pastel blue(), light yellow(), dim green(), bright red(), light green(), dim yellow(), bright blue(), dark red(), pastel red(), light blue(), dim green(), light yellow()] \bound{lc}} +\spadpaste{lc := [pastel blue(), light yellow(), dim green(), +bright red(), light green(), dim yellow(), bright blue(), +dark red(), pastel red(), light blue(), dim green(), +light yellow()] \bound{lc}} } \xtc{ Now the \axiomType{GraphImage} is created according to the component specifications indicated above. }{ -\spadpaste{g := makeGraphImage(llp,lpc,lc,lsize)\$GRIMAGE \bound{g} \free{llp lpc lc lsize}} +\spadpaste{g := makeGraphImage(llp,lpc,lc,lsize)\$GRIMAGE +\bound{g} \free{llp lpc lc lsize}} } \psXtc{ The \axiomFunFrom{makeViewport2D}{TwoDimensionalViewport} function now @@ -37501,9 +33697,10 @@ list of options specified within the brackets. } %See Figure #.#. \xtc{ -This example demonstrates the use of the \axiomType{GraphImage} functions -\axiomFunFrom{component}{GraphImage} and \axiomFunFrom{appendPoint}{GraphImage} -in adding points to an empty \axiomType{GraphImage}. +This example demonstrates the use of the \axiomType{GraphImage} +functions \axiomFunFrom{component}{GraphImage} and +\axiomFunFrom{appendPoint}{GraphImage} in adding points to an empty +\axiomType{GraphImage}. }{ \spadpaste{)clear all \bound{clearAll}} } @@ -37566,11 +33763,13 @@ Here is the graph. %See Figure #.#. % \xtc{ -A list of points can also be made into a \axiomType{GraphImage} by using -the operation \axiomFunFrom{coerce}{GraphImage}. It is equivalent to adding -each point to \axiom{g2} using \axiomFunFrom{component}{GraphImage}. +A list of points can also be made into a \axiomType{GraphImage} by +using the operation \axiomFunFrom{coerce}{GraphImage}. It is +equivalent to adding each point to \axiom{g2} using +\axiomFunFrom{component}{GraphImage}. }{ -\spadpaste{g2 := coerce([[p1],[p2],[p3],[p4],[p5]])\$GRIMAGE \free{Sp1 Sp2 Sp3 Sp4 Sp5} \bound{Sg2}} +\spadpaste{g2 := coerce([[p1],[p2],[p3],[p4],[p5]])\$GRIMAGE +\free{Sp1 Sp2 Sp3 Sp4 Sp5} \bound{Sg2}} } \xtc{ Now, create an empty \axiomType{TwoDimensionalViewport}. @@ -37596,13 +33795,14 @@ Take a look. %See Figure #.#. -\subsubsection{Creating a Two-Dimensional Viewport of a List of Points from a File} +\subsubsection{Creating a Two-Dimensional Viewport of a +List of Points from a File} -The following three functions read a list of points from a -file and then draw the points and the connecting lines. The -points are stored in the file in readable form as floating point numbers -(specifically, \axiomType{DoubleFloat} values) as an alternating -stream of \axiom{x}- and \axiom{y}-values. For example, +The following three functions read a list of points from a file and +then draw the points and the connecting lines. The points are stored +in the file in readable form as floating point numbers (specifically, +\axiomType{DoubleFloat} values) as an alternating stream of \axiom{x}- +and \axiom{y}-values. For example, \begin{verbatim} 0.0 0.0 1.0 1.0 2.0 4.0 3.0 9.0 4.0 16.0 5.0 25.0 @@ -37614,14 +33814,16 @@ stream of \axiom{x}- and \axiom{y}-values. For example, {\tt 1.\ \ \ drawPoints(lp:List\ Point\ DoubleFloat):VIEW2D\ ==}\newline {\tt 2.\ \ \ \ \ g\ :=\ graphImage()\$GRIMAGE}\newline {\tt 3.\ \ \ \ \ for\ p\ in\ lp\ repeat}\newline -{\tt 4.\ \ \ \ \ \ \ component(g,p,pointColorDefault(),lineColorDefault(),}\newline +{\tt 4.\ \ \ \ \ \ \ +component(g,p,pointColorDefault(),lineColorDefault(),}\newline {\tt 5.\ \ \ \ \ \ \ \ \ pointSizeDefault())}\newline {\tt 6.\ \ \ \ \ gi\ :=\ makeGraphImage(g)\$GRIMAGE}\newline {\tt 7.\ \ \ \ \ makeViewport2D(gi,[title("Points")])\$VIEW2D}\newline {\tt 8.\ \ \ }\newline {\tt 9.\ \ \ drawLines(lp:List\ Point\ DoubleFloat):VIEW2D\ ==}\newline {\tt 10.\ \ \ \ g\ :=\ graphImage()\$GRIMAGE}\newline -{\tt 11.\ \ \ \ component(g,\ lp,\ pointColorDefault(),\ lineColorDefault(),}\newline +{\tt 11.\ \ \ \ +component(g,\ lp,\ pointColorDefault(),\ lineColorDefault(),}\newline {\tt 12.\ \ \ \ \ \ pointSizeDefault())\$GRIMAGE}\newline {\tt 13.\ \ \ \ gi\ :=\ makeGraphImage(g)\$GRIMAGE}\newline {\tt 14.\ \ \ \ makeViewport2D(gi,[title("Points")])\$VIEW2D}\newline @@ -37629,9 +33831,11 @@ stream of \axiom{x}- and \axiom{y}-values. For example, {\tt 16.\ \ plotData2D(name,\ title)\ ==}\newline {\tt 17.\ \ \ \ f:File(DFLOAT)\ :=\ open(name,"input")}\newline {\tt 18.\ \ \ \ lp:LIST(Point\ DFLOAT)\ :=\ empty()}\newline -{\tt 19.\ \ \ \ while\ ((x\ :=\ readIfCan!(f))\ case\ DFLOAT)\ repeat}\newline +{\tt 19.\ \ \ \ +while\ ((x\ :=\ readIfCan!(f))\ case\ DFLOAT)\ repeat}\newline {\tt 20.\ \ \ \ \ \ y\ :\ DFLOAT\ :=\ read!(f)}\newline -{\tt 21.\ \ \ \ \ \ lp\ :=\ cons(point\ [x,y]\$(Point\ DFLOAT),\ lp)}\newline +{\tt 21.\ \ \ \ \ \ +lp\ :=\ cons(point\ [x,y]\$(Point\ DFLOAT),\ lp)}\newline {\tt 22.\ \ \ \ \ \ lp}\newline {\tt 23.\ \ \ \ close!(f)}\newline {\tt 24.\ \ \ \ drawPoints(lp)}\newline @@ -37651,25 +33855,18 @@ the point data is in the file \axiom{"file.data"}. \end{page} @ -<>= -\newcommand{\ugGraphTwoDappendTitle}{Addendum: Appending a Graph to a Viewport Window Containing a Graph} -\newcommand{\ugGraphTwoDappendNumber}{7.1.10.} - -@ -\section{Addendum: Appending a Graph to a Viewport Window Containing a Graph} -\label{ugGraphTwoDappendPage} -\index{pages!ugGraphTwoDappendPage!ug07.ht} -\index{ug07.ht!pages!ugGraphTwoDappendPage} -\index{ugGraphTwoDappendPage!ug07.ht!pages} +\pagehead{ugGraphTwoDappendPage}{ug07.ht} +{Addendum: Appending a Graph to a Viewport Window Containing a Graph} <>= \begin{page}{ugGraphTwoDappendPage} -{7.1.10. Addendum: Appending a Graph to a Viewport Window Containing a Graph} +{7.1.10. Addendum: Appending a Graph to a Viewport +Window Containing a Graph} \beginscroll -This section demonstrates how to append a \twodim{} graph to a viewport -already containing other graphs. -The default \axiomFun{draw} command places a graph into the first -\axiomType{GraphImage} slot position of the \axiomType{TwoDimensionalViewport}. +This section demonstrates how to append a \twodim{} graph to a +viewport already containing other graphs. The default \axiomFun{draw} +command places a graph into the first \axiomType{GraphImage} slot +position of the \axiomType{TwoDimensionalViewport}. \xtc{ This graph is in the first slot in its viewport. @@ -37679,12 +33876,13 @@ This graph is in the first slot in its viewport. \xtc{ So is this graph. }{ -\spadpaste{v2 := draw(cos(x),x=0..2*\%pi, curveColor==light red()) \bound{v2}} +\spadpaste{v2 := draw(cos(x),x=0..2*\%pi, curveColor==light red()) +\bound{v2}} } \xtc{ The operation \axiomFunFrom{getGraph}{TwoDimensionalViewport} -retrieves the \axiomType{GraphImage} \axiom{g1} from the first slot position -in the viewport \axiom{v1}. +retrieves the \axiomType{GraphImage} \axiom{g1} from the first slot +position in the viewport \axiom{v1}. }{ \spadpaste{g1 := getGraph(v1,1) \bound{g1}\free{v1}} } @@ -37710,40 +33908,18 @@ Display the new \axiomType{TwoDimensionalViewport} containing both graphs. \end{page} @ -<>= -\newcommand{\ugGraphThreeDTitle}{Three-Dimensional Graphics} -\newcommand{\ugGraphThreeDNumber}{7.2.} - -@ -\section{Three-Dimensional Graphics} -\label{ugGraphThreeDPage} -\begin{itemize} -\item ugGraphThreeDPlotPage \ref{ugGraphThreeDPlotPage} on -page~\pageref{ugGraphThreeDPlotPage} -\item ugGraphThreeDParmPage \ref{ugGraphThreeDParmPage} on -page~\pageref{ugGraphThreeDParmPage} -\item ugGraphThreeDParPage \ref{ugGraphThreeDParPage} on -page~\pageref{ugGraphThreeDParPage} -\item ugGraphThreeDOptionsPage \ref{ugGraphThreeDOptionsPage} on -page~\pageref{ugGraphThreeDOptionsPage} -\item ugGraphMakeObjectPage \ref{ugGraphMakeObjectPage} on -page~\pageref{ugGraphMakeObjectPage} -\item ugGraphThreeDBuildPage \ref{ugGraphThreeDBuildPage} on -page~\pageref{ugGraphThreeDBuildPage} -\item ugGraphCoordPage \ref{ugGraphCoordPage} on -page~\pageref{ugGraphCoordPage} -\item ugGraphClipPage \ref{ugGraphClipPage} on -page~\pageref{ugGraphClipPage} -\item ugGraphThreeDControlPage \ref{ugGraphThreeDControlPage} on -page~\pageref{ugGraphThreeDControlPage} -\item ugGraphThreeDopsPage \ref{ugGraphThreeDopsPage} on -page~\pageref{ugGraphThreeDopsPage} -\item ugXdefaultsPage \ref{ugXdefaultsPage} on -page~\pageref{ugXdefaultsPage} -\end{itemize} -\index{pages!ugGraphThreeDPage!ug07.ht} -\index{ug07.ht!pages!ugGraphThreeDPage} -\index{ugGraphThreeDPage!ug07.ht!pages} +\pagehead{ugGraphThreeDPage}{ug07.ht}{Three-Dimensional Graphics} +\pageto{notitle}{ugGraphThreeDPlotPage} +\pageto{notitle}{ugGraphThreeDParmPage} +\pageto{notitle}{ugGraphThreeDParPage} +\pageto{notitle}{ugGraphThreeDOptionsPage} +\pageto{notitle}{ugGraphMakeObjectPage} +\pageto{notitle}{ugGraphThreeDBuildPage} +\pageto{notitle}{ugGraphCoordPage} +\pageto{notitle}{ugGraphClipPage} +\pageto{notitle}{ugGraphThreeDControlPage} +\pageto{notitle}{ugGraphThreeDopsPage} +\pageto{notitle}{ugXdefaultsPage} <>= \begin{page}{ugGraphThreeDPage}{7.2. Three-Dimensional Graphics} \beginscroll @@ -37774,38 +33950,34 @@ of a surface. \menudownlink{ {7.2.3. Plotting Three-Dimensional Parametric Surfaces}} {ugGraphThreeDParPage} - \menudownlink{{7.2.4. Three-Dimensional Options}}{ugGraphThreeDOptionsPage} - \menudownlink{{7.2.5. The makeObject Command}}{ugGraphMakeObjectPage} + \menudownlink{ +{7.2.4. Three-Dimensional Options}}{ugGraphThreeDOptionsPage} + \menudownlink{ +{7.2.5. The makeObject Command}}{ugGraphMakeObjectPage} \menudownlink{ {7.2.6. Building Three-Dimensional Objects From Primitives}} {ugGraphThreeDBuildPage} - \menudownlink{{7.2.7. Coordinate System Transformations}}{ugGraphCoordPage} - \menudownlink{{7.2.8. Three-Dimensional Clipping}}{ugGraphClipPage} - \menudownlink{{7.2.9. Three-Dimensional Control-Panel}} + \menudownlink{ +{7.2.7. Coordinate System Transformations}}{ugGraphCoordPage} + \menudownlink{ +{7.2.8. Three-Dimensional Clipping}}{ugGraphClipPage} + \menudownlink{ +{7.2.9. Three-Dimensional Control-Panel}} {ugGraphThreeDControlPage} - \menudownlink{{7.2.10. Operations for Three-Dimensional Graphics}} + \menudownlink{ +{7.2.10. Operations for Three-Dimensional Graphics}} {ugGraphThreeDopsPage} - \menudownlink{{7.2.11. Customization using .Xdefaults}}{ugXdefaultsPage} + \menudownlink{ +{7.2.11. Customization using .Xdefaults}}{ugXdefaultsPage} \endmenu \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugGraphThreeDPlotTitle}{Plotting Three-Dimensional Functions of Two Variables} -\newcommand{\ugGraphThreeDPlotNumber}{7.2.1.} - -@ -\section{Plotting Three-Dimensional Functions of Two Variables} -\label{ugGraphThreeDPlotPage} -\begin{itemize} -\item ugGraphThreeDOptionsPage \ref{ugGraphThreeDOptionsPage} on -page~\pageref{ugGraphThreeDOptionsPage} -\end{itemize} -\index{pages!ugGraphThreeDPlotPage!ug07.ht} -\index{ug07.ht!pages!ugGraphThreeDPlotPage} -\index{ugGraphThreeDPlotPage!ug07.ht!pages} +\pagehead{ugGraphThreeDPlotPage}{ug07.ht} +{Plotting Three-Dimensional Functions of Two Variables} +\pageto{notitle}{ugGraphThreeDOptionsPage} <>= \begin{page}{ugGraphThreeDPlotPage} {7.2.1. Plotting Three-Dimensional Functions of Two Variables} @@ -37814,11 +33986,12 @@ page~\pageref{ugGraphThreeDOptionsPage} The simplest \threedim{} graph is that of a surface defined by a function of two variables, \axiom{z = f(x,y)}. -% + \beginImportant -The general format for drawing a surface defined by a formula \axiom{f(x,y)} -of two variables \axiom{x} and \axiom{y} is: -% + +The general format for drawing a surface defined by a formula +\axiom{f(x,y)} of two variables \axiom{x} and \axiom{y} is: + \centerline{{{\tt draw(f(x,y), x = a..b, y = c..d, {\it options})}}} where \axiom{a..b} and \axiom{c..d} define the range of \axiom{x} and \axiom{y}, and where {\it options} prescribes zero or more @@ -37868,20 +34041,9 @@ default title. \end{page} @ -<>= -\newcommand{\ugGraphThreeDParmTitle}{Plotting Three-Dimensional Parametric Space Curves} -\newcommand{\ugGraphThreeDParmNumber}{7.2.2.} - -@ -\section{Plotting Three-Dimensional Parametric Space Curves} -\label{ugGraphThreeDParmPage} -\begin{itemize} -\item ugGraphThreeDOptionsPage \ref{ugGraphThreeDOptionsPage} on -page~\pageref{ugGraphThreeDOptionsPage} -\end{itemize} -\index{pages!ugGraphThreeDParmPage!ug07.ht} -\index{ug07.ht!pages!ugGraphThreeDParmPage} -\index{ugGraphThreeDParmPage!ug07.ht!pages} +\pagehead{ugGraphThreeDParmPage}{ug07.ht} +{Plotting Three-Dimensional Parametric Space Curves} +\pageto{notitle}{ugGraphThreeDOptionsPage} <>= \begin{page}{ugGraphThreeDParmPage} {7.2.2. Plotting Three-Dimensional Parametric Space Curves} @@ -37951,25 +34113,13 @@ Again, Axiom supplies a default title. \end{page} @ -<>= -\newcommand{\ugGraphThreeDParTitle}{Plotting Three-Dimensional Parametric Surfaces} -\newcommand{\ugGraphThreeDParNumber}{7.2.3.} - -@ -\section{Plotting Three-Dimensional Parametric Surfaces} -\label{ugGraphThreeDParPage} -\begin{itemize} -\item ugGraphThreeDOptionsPage \ref{ugGraphThreeDOptionsPage} on -page~\pageref{ugGraphThreeDOptionsPage} -\item ugGraphCoordPage \ref{ugGraphCoordPage} on -page~\pageref{ugGraphCoordPage} -\end{itemize} -\index{pages!ugGraphThreeDParPage!ug07.ht} -\index{ug07.ht!pages!ugGraphThreeDParPage} -\index{ugGraphThreeDParPage!ug07.ht!pages} +\pagehead{ugGraphThreeDParPage}{ug07.ht} +{Plotting 3D Parametric Surfaces} +\pageto{notitle}{ugGraphThreeDOptionsPage} +\pageto{notitle}{ugGraphCoordPage} <>= \begin{page}{ugGraphThreeDParPage} -{7.2.3. Plotting Three-Dimensional Parametric Surfaces} +{7.2.3. Plotting 3D Parametric Surfaces} \beginscroll A third kind of \threedim{} graph is a surface defined by @@ -37982,7 +34132,8 @@ The general format for drawing a \threedim{} graph defined by parametric formulas \axiom{x = f(u,v)}, \axiom{y = g(u,v)}, and \axiom{z = h(u,v)} is: % -\centerline{{{\tt draw(surface(f(u,v),g(u,v),h(u,v)), u = a..b, v = c..d, {\it options})}}} +\centerline{{{\tt draw(surface(f(u,v),g(u,v),h(u,v)), +u = a..b, v = c..d, {\it options})}}} where \axiom{a..b} and \axiom{c..d} define the range of the independent variables \axiom{u} and \axiom{v}, and where {\it options} prescribes zero or more options as described in @@ -38003,7 +34154,8 @@ here as parabolic cylindrical coordinates (see \downlink{``\ugGraphCoordTitle''}{ugGraphCoordPage} in Section \ugGraphCoordNumber\ignore{ugGraphCoord}). }{ -\graphpaste{draw(surface(u*cos(v), u*sin(v), v*cos(u)), u=-4..4, v=0..\%pi, coordinates== parabolicCylindrical)} +\graphpaste{draw(surface(u*cos(v), u*sin(v), v*cos(u)), +u=-4..4, v=0..\%pi, coordinates== parabolicCylindrical)} }{ \epsffile[0 0 295 295]{../ps/3dpsa.ps} } @@ -38041,7 +34193,8 @@ produces a \axiomType{DoubleFloat}. Draw the surface by referencing the function names, this time choosing the toroidal coordinate system. }{ -\graphpaste{draw(surface(n1,n2,n3), 1..4, 1..2*\%pi, coordinates == toroidal(1\$DFLOAT)) \free{n1 n2 n3}} +\graphpaste{draw(surface(n1,n2,n3), 1..4, 1..2*\%pi, +coordinates == toroidal(1\$DFLOAT)) \free{n1 n2 n3}} }{ \epsffile[0 0 295 295]{../ps/3dpsb.ps} } @@ -38051,27 +34204,15 @@ choosing the toroidal coordinate system. \end{page} @ -<>= -\newcommand{\ugGraphThreeDOptionsTitle}{Three-Dimensional Options} -\newcommand{\ugGraphThreeDOptionsNumber}{7.2.4.} - -@ -\section{Three-Dimensional Options} -\label{ugGraphThreeDOptionsPage} -\begin{itemize} -\item ugGraphCoordPage \ref{ugGraphCoordPage} on -page~\pageref{ugGraphCoordPage} -\end{itemize} -\index{pages!ugGraphThreeDOptionsPage!ug07.ht} -\index{ug07.ht!pages!ugGraphThreeDOptionsPage} -\index{ugGraphThreeDOptionsPage!ug07.ht!pages} +\pagehead{ugGraphThreeDOptionsPage}{ug07.ht}{Three-Dimensional Options} +\pageto{notitle}{ugGraphCoordPage} <>= \begin{page}{ugGraphThreeDOptionsPage}{7.2.4. Three-Dimensional Options} \beginscroll -The \axiomFun{draw} commands optionally take an optional list of options such -as {\tt coordinates} as shown in the last example. -Each option is given by the syntax: \axiom{name} {\tt ==} \axiom{value}. +The \axiomFun{draw} commands optionally take an optional list of +options such as {\tt coordinates} as shown in the last example. Each +option is given by the syntax: \axiom{name} {\tt ==} \axiom{value}. Here is a list of the available options in the order that they are described below: @@ -38092,7 +34233,8 @@ the graph. The choices are {\tt "wireMesh"}, {\tt "solid"}, {\tt "shade"}, and {\tt "smooth"}. }{ -\graphpaste{draw(cos(x*y),x=-3..3,y=-3..3, style=="smooth", title=="Smooth Option")} +\graphpaste{draw(cos(x*y),x=-3..3,y=-3..3, style=="smooth", +title=="Smooth Option")} }{ \epsffile[0 0 295 295]{../ps/3doptsty.ps} } @@ -38114,7 +34256,8 @@ value of the parametric variable specified for a tube plot. } \psXtc{ }{ -\graphpaste{draw(curve(sin(t), cos(t),0), t=0..2*\%pi, tubeRadius == .3, colorFunction == color1) \free{colorFxn1}} +\graphpaste{draw(curve(sin(t), cos(t),0), t=0..2*\%pi, +tubeRadius == .3, colorFunction == color1) \free{colorFxn1}} }{ \epsffile[0 0 295 295]{../ps/3doptcf1.ps} } @@ -38128,7 +34271,8 @@ values of the independent variables. \psXtc{ Use the option {\tt colorFunction} for special coloring. }{ -\graphpaste{draw(cos(u*v), u=-3..3, v=-3..3, colorFunction == color2) \free{colorFxn2}} +\graphpaste{draw(cos(u*v), u=-3..3, v=-3..3, +colorFunction == color2) \free{colorFxn2}} }{ \epsffile[0 0 295 295]{../ps/3doptcf2.ps} } @@ -38141,7 +34285,8 @@ color also depends on the value of the function. } \psXtc{ }{ -\graphpaste{draw(cos(x*y), x=-3..3, y=-3..3, colorFunction == color3) \free{colorFxn3}} +\graphpaste{draw(cos(x*y), x=-3..3, y=-3..3, colorFunction == color3) +\free{colorFxn3}} }{ \epsffile[0 0 295 295]{../ps/3doptcf3.ps} } @@ -38161,7 +34306,8 @@ in Section \ugGraphCoordNumber\ignore{ugGraphCoord}. Use the spherical coordinate system. }{ -\graphpaste{draw(m, 0..2*\%pi,0..\%pi, coordinates == spherical, style=="shade") \free{m}} +\graphpaste{draw(m, 0..2*\%pi,0..\%pi, coordinates == spherical, +style=="shade") \free{m}} }{ \epsffile[0 0 295 295]{../ps/3doptcrd.ps} } @@ -38174,7 +34320,8 @@ shape of this cross section. The {\tt tubeRadius} option specifies the radius of the tube that encircles the specified space curve. }{ -\graphpaste{draw(curve(sin(t),cos(t),0),t=0..2*\%pi, style=="shade", tubeRadius == .3)} +\graphpaste{draw(curve(sin(t),cos(t),0),t=0..2*\%pi, style=="shade", +tubeRadius == .3)} }{ \epsffile[0 0 295 295]{../ps/3doptrad.ps} } @@ -38186,7 +34333,8 @@ defining the polygon that is used to create a tube around the specified space curve. The larger this number is, the more cylindrical the tube becomes. }{ -\graphpaste{draw(curve(sin(t), cos(t), 0), t=0..2*\%pi, style=="shade", tubeRadius == .25, tubePoints == 3)} +\graphpaste{draw(curve(sin(t), cos(t), 0), t=0..2*\%pi, style=="shade", +tubeRadius == .25, tubePoints == 3)} }{ \epsffile[0 0 295 295]{../ps/3doptpts.ps} } @@ -38199,7 +34347,8 @@ Options \axiomFunFrom{var1Steps}{DrawOption} and which the grid defining a surface plot is subdivided with respect to the first and second parameters of the surface function(s). }{ -\graphpaste{draw(cos(x*y),x=-3..3,y=-3..3, style=="shade", var1Steps == 30, var2Steps == 30)} +\graphpaste{draw(cos(x*y),x=-3..3,y=-3..3, style=="shade", var1Steps == 30, +var2Steps == 30)} }{ \epsffile[0 0 295 295]{../ps/3doptvb.ps} } @@ -38226,7 +34375,8 @@ Add a graph to this three-space object. The new graph destructively inserts the graph into \axiom{s}. }{ -\graphpaste{draw(m,0..\%pi,0..2*\%pi, coordinates == spherical, space == s) \free{s m}} +\graphpaste{ +draw(m,0..\%pi,0..2*\%pi, coordinates == spherical, space == s) \free{s m}} }{ \epsffile[0 0 295 295]{../ps/3dmult1a.ps} } @@ -38235,12 +34385,14 @@ into \axiom{s}. \psXtc{ Add a second graph to \axiom{s}. }{ -\graphpaste{v := draw(curve(1.5*sin(t), 1.5*cos(t),0), t=0..2*\%pi, tubeRadius == .25, space == s) \free{s} \bound{v}} +\graphpaste{v := draw(curve(1.5*sin(t), 1.5*cos(t),0), t=0..2*\%pi, +tubeRadius == .25, space == s) \free{s} \bound{v}} }{ \epsffile[0 0 295 295]{../ps/3dmult1b.ps} } % -A three-space object can also be obtained from an existing \threedim{} viewport +A three-space object can also be obtained from an existing +\threedim{} viewport using the \axiomFunFrom{subspace}{ThreeSpace} command. You can then use \axiomFun{makeViewport3D} to create a viewport window. \xtc{ @@ -38264,16 +34416,7 @@ Create a viewport window from a three-space object. \end{page} @ -<>= -\newcommand{\ugGraphMakeObjectTitle}{The makeObject Command} -\newcommand{\ugGraphMakeObjectNumber}{7.2.5.} - -@ -\section{The makeObject Command} -\label{ugGraphMakeObjectPage} -\index{pages!ugGraphMakeObjectPage!ug07.ht} -\index{ug07.ht!pages!ugGraphMakeObjectPage} -\index{ugGraphMakeObjectPage!ug07.ht!pages} +\pagehead{ugGraphMakeObjectPage}{ug07.ht}{The makeObject Command} <>= \begin{page}{ugGraphMakeObjectPage}{7.2.5. The makeObject Command} \beginscroll @@ -38297,12 +34440,14 @@ Do the last example a new way. First use \axiomFun{makeObject} to create a three-space object \axiom{sph}. }{ -\spadpaste{sph := makeObject(m, 0..\%pi, 0..2*\%pi, coordinates==spherical)\bound{sph}\free{m}} +\spadpaste{sph := makeObject(m, 0..\%pi, 0..2*\%pi, +coordinates==spherical)\bound{sph}\free{m}} } \noOutputXtc{ Add a second object to \axiom{sph}. }{ -\spadpaste{makeObject(curve(1.5*sin(t), 1.5*cos(t), 0), t=0..2*\%pi, space == sph, tubeRadius == .25) \free{sph}\bound{v1}} +\spadpaste{makeObject(curve(1.5*sin(t), 1.5*cos(t), 0), +t=0..2*\%pi, space == sph, tubeRadius == .25) \free{sph}\bound{v1}} } \noOutputXtc{ Create and display a viewport @@ -38322,19 +34467,11 @@ previously generated before including it in a command line. \end{page} @ -<>= -\newcommand{\ugGraphThreeDBuildTitle}{Building Three-Dimensional Objects From Primitives} -\newcommand{\ugGraphThreeDBuildNumber}{7.2.6.} - -@ -\section{Building Three-Dimensional Objects From Primitives} -\label{ugGraphThreeDBuildPage} -\index{pages!ugGraphThreeDBuildPage!ug07.ht} -\index{ug07.ht!pages!ugGraphThreeDBuildPage} -\index{ugGraphThreeDBuildPage!ug07.ht!pages} +\pagehead{ugGraphThreeDBuildPage}{ug07.ht} +{Building 3D Objects From Primitives} <>= \begin{page}{ugGraphThreeDBuildPage} -{7.2.6. Building Three-Dimensional Objects From Primitives} +{7.2.6. Building 3D Objects From Primitives} \beginscroll Rather than using the \axiomFun{draw} and \axiomFun{makeObject} commands, @@ -38359,42 +34496,63 @@ The following examples place curves into \axiom{space}. \xtc{ Add these eight curves to the space. }{ -\spadpaste{closedCurve(space,[[0,30,20], [0,30,30], [0,40,30], [0,40,100], [0,30,100],[0,30,110], [0,60,110], [0,60,100], [0,50,100], [0,50,30], [0,60,30], [0,60,20]]) \bound{curve1} \free{space}} +\spadpaste{closedCurve(space,[[0,30,20], [0,30,30], [0,40,30], +[0,40,100], [0,30,100],[0,30,110], [0,60,110], [0,60,100], +[0,50,100], [0,50,30], [0,60,30], [0,60,20]]) \bound{curve1} +\free{space}} } \xtc{ }{ -\spadpaste{closedCurve(space,[[80,0,30], [80,0,100], [70,0,110], [40,0,110], [30,0,100], [30,0,90], [40,0,90], [40,0,95], [45,0,100], [65,0,100], [70,0,95], [70,0,35]]) \bound{curve2} \free{space}} +\spadpaste{closedCurve(space,[[80,0,30], [80,0,100], [70,0,110], +[40,0,110], [30,0,100], [30,0,90], [40,0,90], [40,0,95], +[45,0,100], [65,0,100], [70,0,95], [70,0,35]]) \bound{curve2} +\free{space}} } \xtc{ }{ -\spadpaste{closedCurve(space,[[70,0,35], [65,0,30], [45,0,30], [40,0,35], [40,0,60], [50,0,60], [50,0,70], [30,0,70], [30,0,30], [40,0,20], [70,0,20], [80,0,30]]) \bound{curve3} \free{space}} +\spadpaste{closedCurve(space,[[70,0,35], [65,0,30], [45,0,30], +[40,0,35], [40,0,60], [50,0,60], [50,0,70], [30,0,70], [30,0,30], +[40,0,20], [70,0,20], [80,0,30]]) \bound{curve3} \free{space}} } \xtc{ }{ -\spadpaste{closedCurve(space,[[0,70,20], [0,70,110], [0,110,110], [0,120,100], [0,120,70], [0,115,65], [0,120,60], [0,120,30], [0,110,20], [0,80,20], [0,80,30], [0,80,20]]) \bound{curve4} \free{space}} +\spadpaste{closedCurve(space,[[0,70,20], [0,70,110], [0,110,110], +[0,120,100], [0,120,70], [0,115,65], [0,120,60], [0,120,30], +[0,110,20], [0,80,20], [0,80,30], [0,80,20]]) \bound{curve4} \free{space}} } \xtc{ }{ -\spadpaste{closedCurve(space,[[0,105,30], [0,110,35], [0,110,55], [0,105,60], [0,80,60], [0,80,70], [0,105,70], [0,110,75], [0,110,95], [0,105,100], [0,80,100], [0,80,20], [0,80,30]]) \bound{curve5} \free{space}} +\spadpaste{closedCurve(space,[[0,105,30], [0,110,35], [0,110,55], +[0,105,60], [0,80,60], [0,80,70], [0,105,70], [0,110,75], +[0,110,95], [0,105,100], [0,80,100], [0,80,20], [0,80,30]]) +\bound{curve5} \free{space}} } \xtc{ }{ -\spadpaste{closedCurve(space,[[140,0,20], [140,0,110], [130,0,110], [90,0,20], [101,0,20],[114,0,50], [130,0,50], [130,0,60], [119,0,60], [130,0,85], [130,0,20]]) \bound{curve6} \free{space}} +\spadpaste{closedCurve(space,[[140,0,20], [140,0,110], [130,0,110], +[90,0,20], [101,0,20],[114,0,50], [130,0,50], [130,0,60], [119,0,60], +[130,0,85], [130,0,20]]) \bound{curve6} \free{space}} } \xtc{ }{ -\spadpaste{closedCurve(space,[[0,140,20], [0,140,110], [0,150,110], [0,170,50], [0,190,110], [0,200,110], [0,200,20], [0,190,20], [0,190,75], [0,175,35], [0,165,35],[0,150,75], [0,150,20]]) \bound{curve7} \free{space}} +\spadpaste{closedCurve(space,[[0,140,20], [0,140,110], [0,150,110], +[0,170,50], [0,190,110], [0,200,110], [0,200,20], [0,190,20], +[0,190,75], [0,175,35], [0,165,35],[0,150,75], [0,150,20]]) +\bound{curve7} \free{space}} } \xtc{ }{ -\spadpaste{closedCurve(space,[[200,0,20], [200,0,110], [189,0,110], [160,0,45], [160,0,110], [150,0,110], [150,0,20], [161,0,20], [190,0,85], [190,0,20]]) \bound{curve8} \free{space}} +\spadpaste{closedCurve(space,[[200,0,20], [200,0,110], [189,0,110], +[160,0,45], [160,0,110], [150,0,110], [150,0,20], [161,0,20], +[190,0,85], [190,0,20]]) \bound{curve8} \free{space}} } \psXtc{ Create and display the viewport using \axiomFun{makeViewport3D}. Options may also be given but here are displayed as a list with values enclosed in parentheses. }{ -\graphpaste{makeViewport3D(space, title == "Letters") \free{space curve1 curve2 curve3 curve4 curve5 curve6 curve7 curve8}} +\graphpaste{makeViewport3D(space, title == "Letters") +\free{space curve1 curve2 curve3 curve4 curve5 curve6 curve7 curve8}} }{ \epsffile[0 0 295 295]{../ps/3dbuilda.ps} } @@ -38424,35 +34582,43 @@ give \axiomType{DoubleFloat} values \axiom{+1} and \axiom{-1} names. \xtc{ Define the vertices of the cube. }{ -\spadpaste{a := point [x,x,y,1::DFLOAT]\$(Point DFLOAT) \bound{a} \free{x y}} +\spadpaste{a := point [x,x,y,1::DFLOAT]\$(Point DFLOAT) \bound{a} +\free{x y}} } \xtc{ }{ -\spadpaste{b := point [y,x,y,4::DFLOAT]\$(Point DFLOAT) \bound{b} \free{x y}} +\spadpaste{b := point [y,x,y,4::DFLOAT]\$(Point DFLOAT) \bound{b} +\free{x y}} } \xtc{ }{ -\spadpaste{c := point [y,x,x,8::DFLOAT]\$(Point DFLOAT) \bound{c} \free{x y}} +\spadpaste{c := point [y,x,x,8::DFLOAT]\$(Point DFLOAT) \bound{c} +\free{x y}} } \xtc{ }{ -\spadpaste{d := point [x,x,x,12::DFLOAT]\$(Point DFLOAT) \bound{d} \free{x y}} +\spadpaste{d := point [x,x,x,12::DFLOAT]\$(Point DFLOAT) \bound{d} +\free{x y}} } \xtc{ }{ -\spadpaste{e := point [x,y,y,16::DFLOAT]\$(Point DFLOAT) \bound{e} \free{x y}} +\spadpaste{e := point [x,y,y,16::DFLOAT]\$(Point DFLOAT) \bound{e} +\free{x y}} } \xtc{ }{ -\spadpaste{f := point [y,y,y,20::DFLOAT]\$(Point DFLOAT) \bound{f} \free{x y}} +\spadpaste{f := point [y,y,y,20::DFLOAT]\$(Point DFLOAT) \bound{f} +\free{x y}} } \xtc{ }{ -\spadpaste{g := point [y,y,x,24::DFLOAT]\$(Point DFLOAT) \bound{g} \free{x y}} +\spadpaste{g := point [y,y,x,24::DFLOAT]\$(Point DFLOAT) \bound{g} +\free{x y}} } \xtc{ }{ -\spadpaste{h := point [x,y,x,27::DFLOAT]\$(Point DFLOAT) \bound{h} \free{x y}} +\spadpaste{h := point [x,y,x,27::DFLOAT]\$(Point DFLOAT) \bound{h} +\free{x y}} } \xtc{ Add the faces of the cube as polygons to the space using a @@ -38483,7 +34649,8 @@ consistent orientation. \psXtc{ Create and display the viewport. }{ -\graphpaste{makeViewport3D(spaceC, title == "Cube") \free{pol1 pol2 pol3 pol4 pol5 pol6}} +\graphpaste{makeViewport3D(spaceC, title == "Cube") +\free{pol1 pol2 pol3 pol4 pol5 pol6}} }{ \epsffile[0 0 295 295]{../ps/3dbuildb.ps} } @@ -38493,25 +34660,16 @@ Create and display the viewport. \end{page} @ -<>= -\newcommand{\ugGraphCoordTitle}{Coordinate System Transformations} -\newcommand{\ugGraphCoordNumber}{7.2.7.} - -@ -\section{Coordinate System Transformations} -\label{ugGraphCoordPage} -\index{pages!ugGraphCoordPage!ug07.ht} -\index{ug07.ht!pages!ugGraphCoordPage} -\index{ugGraphCoordPage!ug07.ht!pages} +\pagehead{ugGraphCoordPage}{ug07.ht}{Coordinate System Transformations} <>= \begin{page}{ugGraphCoordPage}{7.2.7. Coordinate System Transformations} \beginscroll -The \axiomType{CoordinateSystems} package provides coordinate transformation -functions that map a given data point from the coordinate system specified -into the Cartesian coordinate system. -The default coordinate system, given a triplet \axiom{(f(u,v), u, v)}, assumes -that \axiom{z = f(u, v)}, \axiom{x = u} and \axiom{y = v}, +The \axiomType{CoordinateSystems} package provides coordinate +transformation functions that map a given data point from the +coordinate system specified into the Cartesian coordinate system. The +default coordinate system, given a triplet \axiom{(f(u,v), u, v)}, +assumes that \axiom{z = f(u, v)}, \axiom{x = u} and \axiom{y = v}, that is, reads the coordinates in \axiom{(z, x, y)} order. \xtc{ @@ -38527,18 +34685,18 @@ Graph plotted in default coordinate system. \epsffile[0 0 295 295]{../ps/defcoord.ps} } -The \axiom{z} coordinate comes first since the first argument of -the \axiomFun{draw} command gives its values. -In general, the coordinate systems Axiom provides, or any -that you make up, must provide a map to an \axiom{(x, y, z)} triplet in -order to be compatible with the -\axiomFunFrom{coordinates}{DrawOption} \axiomType{DrawOption}. -Here is an example. +The \axiom{z} coordinate comes first since the first argument of the +\axiomFun{draw} command gives its values. In general, the coordinate +systems Axiom provides, or any that you make up, must provide a map to +an \axiom{(x, y, z)} triplet in order to be compatible with the +\axiomFunFrom{coordinates}{DrawOption} \axiomType{DrawOption}. Here +is an example. \xtc{ Define the identity function. }{ -\spadpaste{cartesian(point:Point DFLOAT):Point DFLOAT == point \bound{cart}} +\spadpaste{cartesian(point:Point DFLOAT):Point DFLOAT == point +\bound{cart}} } \psXtc{ Pass \axiom{cartesian} as the \axiomFunFrom{coordinates}{DrawOption} @@ -38550,13 +34708,11 @@ parameter to the \axiomFun{draw} command. } % -What happened? -The option {\tt coordinates == cartesian} directs Axiom to -treat the dependent variable \axiom{m} defined by -\texht{$m=u^2$}{m=u**2} as the \axiom{x} coordinate. -Thus the triplet of values \axiom{(m, u, v)} is transformed to -coordinates \axiom{(x, y, z)} and so we get the graph of -\texht{$x=y^2$}{x=y**2}. +What happened? The option {\tt coordinates == cartesian} directs +Axiom to treat the dependent variable \axiom{m} defined by +\texht{$m=u^2$}{m=u**2} as the \axiom{x} coordinate. Thus the triplet +of values \axiom{(m, u, v)} is transformed to coordinates +\axiom{(x, y, z)} and so we get the graph of \texht{$x=y^2$}{x=y**2}. Here is another example. The \axiomFunFrom{cylindrical}{CoordinateSystems} transform takes @@ -38583,12 +34739,11 @@ Graph plotted in cylindrical coordinates. \epsffile[0 0 295 295]{../ps/cylcoord.ps} } -Suppose you would like to specify \smath{z} as a function of -\smath{r} and \texht{$\theta$}{\axiom{theta}} instead of just -\smath{r}? -Well, you still can use the \axiomFun{cylindrical} Axiom -transformation but we have to reorder the triplet before -passing it to the transformation. +Suppose you would like to specify \smath{z} as a function of \smath{r} +and \texht{$\theta$}{\axiom{theta}} instead of just \smath{r}? Well, +you still can use the \axiomFun{cylindrical} Axiom transformation but +we have to reorder the triplet before passing it to the +transformation. \xtc{ First, let's create a point to @@ -38608,7 +34763,9 @@ and third elements move forward and the color element does not change. \xtc{ Define a function \userfun{reorder} to reorder the point elements. }{ -\spadpaste{reorder(p:Point DFLOAT):Point DFLOAT == point[p.2, p.3, p.1, p.4] \bound{freo}} +\spadpaste{ +reorder(p:Point DFLOAT):Point DFLOAT == point[p.2, p.3, p.1, p.4] +\bound{freo}} } \xtc{ The function moves the second and third elements @@ -38621,7 +34778,9 @@ The function \userfun{newmap} converts our reordered version of the cylindrical coordinate system to the standard \texht{$(x,y,z)$}{\axiom{(x,y,z)}} Cartesian system. }{ -\spadpaste{newmap(pt:Point DFLOAT):Point DFLOAT == cylindrical(reorder pt) \free{freo} \bound{fnewmap}} +\spadpaste{ +newmap(pt:Point DFLOAT):Point DFLOAT == cylindrical(reorder pt) +\free{freo} \bound{fnewmap}} } \xtc{ }{ @@ -38629,8 +34788,8 @@ the cylindrical coordinate system to the standard } % \psXtc{ -Graph the same function \axiom{f} using the coordinate mapping of the function -\axiom{newmap}, so it is now interpreted as +Graph the same function \axiom{f} using the coordinate mapping +of the function \axiom{newmap}, so it is now interpreted as \texht{$z=3$}{\axiom{z = 3}}: }{ \graphpaste{draw(f,0..3,0..2*\%pi,coordinates==newmap) \free{f new}} @@ -38666,16 +34825,7 @@ to get more information. \end{page} @ -<>= -\newcommand{\ugGraphClipTitle}{Three-Dimensional Clipping} -\newcommand{\ugGraphClipNumber}{7.2.8.} - -@ -\section{Three-Dimensional Clipping} -\label{ugGraphClipPage} -\index{pages!ugGraphClipPage!ug07.ht} -\index{ug07.ht!pages!ugGraphClipPage} -\index{ugGraphClipPage!ug07.ht!pages} +\pagehead{ugGraphClipPage}{ug07.ht}{Three-Dimensional Clipping} <>= \begin{page}{ugGraphClipPage}{7.2.8. Three-Dimensional Clipping} \beginscroll @@ -38697,7 +34847,8 @@ gamma(x,y) == Here is an example that clips the gamma function in order to eliminate the extreme divergence it creates. }{ -\graphpaste{draw(gamma,-\%pi..\%pi,-\%pi..\%pi,var1Steps==50,var2Steps==50) \free{g}} +\graphpaste{ +draw(gamma,-\%pi..\%pi,-\%pi..\%pi,var1Steps==50,var2Steps==50) \free{g}} }{ \epsffile[0 0 295 295]{../ps/clipgamma.ps} } @@ -38707,24 +34858,15 @@ the gamma function in order to eliminate the extreme divergence it creates. \end{page} @ +\pagehead{ugGraphThreeDControlPage}{ug07.ht} +{Three-Dimensional Control-Panel} <>= -\newcommand{\ugGraphThreeDControlTitle}{Three-Dimensional Control-Panel} -\newcommand{\ugGraphThreeDControlNumber}{7.2.9.} - -@ -\section{Three-Dimensional Control-Panel} -\label{ugGraphThreeDControlPage} -\index{pages!ugGraphThreeDControlPage!ug07.ht} -\index{ug07.ht!pages!ugGraphThreeDControlPage} -\index{ugGraphThreeDControlPage!ug07.ht!pages} -<>= -\begin{page}{ugGraphThreeDControlPage}{7.2.9. Three-Dimensional Control-Panel} +\begin{page}{ugGraphThreeDControlPage} +{7.2.9. Three-Dimensional Control-Panel} \beginscroll -Once you have created a viewport, move your mouse to the viewport -and click with your left mouse button. -This displays a control-panel on the side of the viewport -that is closest to where you clicked. - +Once you have created a viewport, move your mouse to the viewport and +click with your left mouse button. This displays a control-panel on +the side of the viewport that is closest to where you clicked. \subsubsection{Transformations} @@ -38752,11 +34894,11 @@ pattern for black and white. % \indent{0} \beginitems -% -\item[origin:] The {\bf origin} button indicates that the -rotation is to occur with respect to the origin of the viewing space, that is + +\item[origin:] The {\bf origin} button indicates that the rotation is +to occur with respect to the origin of the viewing space, that is indicated by the axes. -% + \item[object:] The {\bf object} button indicates that the rotation is to occur with respect to the center of volume of the object, independent of the axes' origin position. @@ -38778,49 +34920,45 @@ black and white. % \item[uniform:] Uniform scaling along the {\tt x}, {\tt y} and {\tt z} axes occurs when all the axes buttons are selected. -% -\item[non-uniform:] If any of the axes buttons are -not selected, non-uniform scaling occurs, that is, scaling occurs only in the + +\item[non-uniform:] If any of the axes buttons are not selected, +non-uniform scaling occurs, that is, scaling occurs only in the direction of the axes that are selected. \enditems \indent{0} -% -\item[Translate:] Translation occurs by indicating with the mouse in the -{\bf Translate} window the direction you want the graph to move. -This window is located in the upper right corner of the -control-panel and contains a potentiometer with crossed arrows -pointing up, down, left and right. -Along the top of the {\bf Translate} window are three buttons -({\bf XY}, -{\bf XZ}, and {\bf YZ}) indicating the three orthographic projection planes. -Each orientates the group as a view into that plane. -Any translation of the graph occurs only along this plane. + +\item[Translate:] Translation occurs by indicating with the mouse in +the {\bf Translate} window the direction you want the graph to move. +This window is located in the upper right corner of the control-panel +and contains a potentiometer with crossed arrows pointing up, down, +left and right. Along the top of the {\bf Translate} window are three +buttons ({\bf XY}, {\bf XZ}, and {\bf YZ}) indicating the three +orthographic projection planes. Each orientates the group as a view +into that plane. Any translation of the graph occurs only along this +plane. \enditems \indent{0} \subsubsection{Messages} -The window directly below the potentiometer windows for transformations is -used to display system messages relating to the viewport, the control-panel -and the current graph displaying status. +The window directly below the potentiometer windows for +transformations is used to display system messages relating to the +viewport, the control-panel and the current graph displaying status. \subsubsection{Colormap} Directly below the message window is the colormap range indicator -window. -The Axiom Colormap shows a sampling of the spectrum from -which hues can be drawn to represent the colors of a surface. -The Colormap is composed of five shades for each of the hues along -this spectrum. -By moving the markers above and below the Colormap, the range of -hues that are used to color the existing surface are set. -The bottom marker shows the hue for the low end of the color range -and the top marker shows the hue for the upper end of the range. -Setting the bottom and top markers at the same hue results in -monochromatic smooth shading of the graph when {\bf Smooth} mode is selected. -At each end of the Colormap are {\bf +} and {\bf -} buttons. -When clicked on, these increment or decrement the top or bottom -marker. +window. The Axiom Colormap shows a sampling of the spectrum from +which hues can be drawn to represent the colors of a surface. The +Colormap is composed of five shades for each of the hues along this +spectrum. By moving the markers above and below the Colormap, the +range of hues that are used to color the existing surface are set. +The bottom marker shows the hue for the low end of the color range and +the top marker shows the hue for the upper end of the range. Setting +the bottom and top markers at the same hue results in monochromatic +smooth shading of the graph when {\bf Smooth} mode is selected. At +each end of the Colormap are {\bf +} and {\bf -} buttons. When +clicked on, these increment or decrement the top or bottom marker. \subsubsection{Buttons} @@ -38838,14 +34976,13 @@ Here is a list of their functions. % \indent{0} \beginitems -% -\item[Wire] displays surface and tube plots as a -wireframe image in a single color (blue) with no hidden surfaces removed, -or displays space curve plots in colors based upon their parametric variables. -This is the fastest mode for displaying a graph. -This is very useful when you + +\item[Wire] displays surface and tube plots as a wireframe image in a +single color (blue) with no hidden surfaces removed, or displays space +curve plots in colors based upon their parametric variables. This is +the fastest mode for displaying a graph. This is very useful when you want to find a good orientation of your graph. -% + \item[Solid] displays the graph with hidden surfaces removed, drawing each polygon beginning with the furthest from the viewer. @@ -38877,44 +35014,40 @@ the renderer reverts to the color dithering method until a sufficient color supply is available. For this reason, it may not be possible to render multiple Phong smooth shaded graphs at the same time on some systems. -% -\item[Bounds] encloses the entire volume of the -viewgraph within a bounding box, or removes the box if previously selected. -The region that encloses the entire volume of the viewport graph is displayed. -% + +\item[Bounds] encloses the entire volume of the viewgraph within a +bounding box, or removes the box if previously selected. The region +that encloses the entire volume of the viewport graph is displayed. + \item[Axes] displays Cartesian coordinate axes of the space, or turns them off if previously selected. -% -\item[Outline] causes -quadrilateral polygons forming the graph surface to be outlined in black when -the graph is displayed in {\bf Shade} mode. -% + +\item[Outline] causes quadrilateral polygons forming the graph surface +to be outlined in black when the graph is displayed in {\bf Shade} +mode. + \item[BW] converts a color viewport to black and white, or vice-versa. -When this button is selected the -control-panel and viewport switch to an immutable colormap composed of a range -of grey scale patterns or tiles that are used wherever shading is necessary. -% +When this button is selected the control-panel and viewport switch to +an immutable colormap composed of a range of grey scale patterns or +tiles that are used wherever shading is necessary. + \item[Light] takes you to a control-panel described below. % \item[ViewVolume] takes you to another control-panel as described below. -% -\item[Save] creates a menu of the possible file types that can -be written using the control-panel. -The {\bf Exit} button leaves the save menu. -The {\bf Pixmap} button writes an Axiom pixmap of -the current viewport contents. The file is called {\bf axiom3D.pixmap} and is -located in the directory from which Axiom or {\bf viewalone} was -started. -The {\bf PS} button writes the current viewport contents to -PostScript output rather than to the viewport window. -By default the file is called {\bf axiom3D.ps}; however, if a file -name is specified in the user's {\bf .Xdefaults} file it is -used. -The file is placed in the directory from which the Axiom or -{\bf viewalone} session was begun. -See also the \axiomFunFrom{write}{ThreeDimensionalViewport} -function. -% + +\item[Save] creates a menu of the possible file types that can be +written using the control-panel. The {\bf Exit} button leaves the +save menu. The {\bf Pixmap} button writes an Axiom pixmap of the +current viewport contents. The file is called {\bf axiom3D.pixmap} +and is located in the directory from which Axiom or {\bf viewalone} +was started. The {\bf PS} button writes the current viewport contents +to PostScript output rather than to the viewport window. By default +the file is called {\bf axiom3D.ps}; however, if a file name is +specified in the user's {\bf .Xdefaults} file it is used. The file is +placed in the directory from which the Axiom or {\bf viewalone} +session was begun. See also the +\axiomFunFrom{write}{ThreeDimensionalViewport} function. + \item[Reset] returns the object transformation characteristics back to their initial states. % @@ -38928,18 +35061,6 @@ session should be terminated. \subsubsection{Light} -% -%>>>\begin{texonly} -% -%>>>\begin{figure}[htbp] -%>>>\begin{picture}(183,252)(-125,0) -%>>>\special{psfile=../ps/3dlight.ps} -%>>>\end{picture} -%>>>\caption{Three-Dimensional Lighting Panel.} -%>>>\end{figure} -%>>>\end{texonly} -% - The {\bf Light} button changes the control-panel into the {\bf Lighting Control-Panel}. At the top of this panel, the three axes are shown with the same orientation as the object. A light vector from @@ -38981,50 +35102,32 @@ At the bottom of the viewing panel is an {\bf Abort} button that cancels any changes to the viewing volume that were made and a {\it Return} button that carries out the current set of viewing changes to the graph. -% -%>>>\begin{texonly} -% -%>>>\begin{figure}[htbp] -%>>>\begin{picture}(183,252)(-125,0) -%>>>\special{psfile=../ps/3dvolume.ps} -%>>>\end{picture} -%>>>\caption{Three-Dimensional Volume Panel.} -%>>>\end{figure} -%>>>\end{texonly} -% + \indent{0} \beginitems -% -\item[Eye Reference:] At the top of this panel is the -{\bf Eye Reference} window. -It shows a planar projection of the viewing pyramid from the eye -of the viewer relative to the location of the object. -This has a bounding region represented by the rectangle on the -left. -Below the object rectangle is the {\bf Hither} window. -By moving the slider in this window the hither clipping plane sets -the front of the view volume. -As a result of this depth clipping all points of the object closer -to the eye than this hither plane are not shown. -The {\bf Eye Distance} slider to the right of the {\bf Hither} + +\item[Eye Reference:] At the top of this panel is the {\bf Eye +Reference} window. It shows a planar projection of the viewing +pyramid from the eye of the viewer relative to the location of the +object. This has a bounding region represented by the rectangle on +the left. Below the object rectangle is the {\bf Hither} window. By +moving the slider in this window the hither clipping plane sets the +front of the view volume. As a result of this depth clipping all +points of the object closer to the eye than this hither plane are not +shown. The {\bf Eye Distance} slider to the right of the {\bf Hither} slider is used to change the degree of perspective in the image. -% -\item[Clip Volume:] The {\bf Clip Volume} window is at the -bottom of the {\bf Viewing Volume Panel}. -On the right is a {\bf Settings} menu. -In this menu are buttons to select viewing attributes. + +\item[Clip Volume:] The {\bf Clip Volume} window is at the bottom of +the {\bf Viewing Volume Panel}. On the right is a {\bf Settings} +menu. In this menu are buttons to select viewing attributes. Selecting the {\bf Perspective} button computes the image using -perspective projection. -The {\bf Show Region} button indicates whether the clipping region -of the -volume is to be drawn in the viewport and the {\bf Clipping On} -button shows whether the view volume clipping is to be in effect -when the image -is drawn. -The left side of the {\bf Clip Volume} window shows the clipping -boundary of the graph. -Moving the knobs along the {\bf X}, {\bf Y}, and {\bf Z} sliders -adjusts the volume of the clipping region accordingly. +perspective projection. The {\bf Show Region} button indicates +whether the clipping region of the volume is to be drawn in the +viewport and the {\bf Clipping On} button shows whether the view +volume clipping is to be in effect when the image is drawn. The left +side of the {\bf Clip Volume} window shows the clipping boundary of +the graph. Moving the knobs along the {\bf X}, {\bf Y}, and {\bf Z} +sliders adjusts the volume of the clipping region accordingly. \enditems \indent{0} @@ -39033,28 +35136,19 @@ adjusts the volume of the clipping region accordingly. \end{page} @ -<>= -\newcommand{\ugGraphThreeDopsTitle}{Operations for Three-Dimensional Graphics} -\newcommand{\ugGraphThreeDopsNumber}{7.2.10.} - -@ -\section{Operations for Three-Dimensional Graphics} -\label{ugGraphThreeDopsPage} -\index{pages!ugGraphThreeDopsPage!ug07.ht} -\index{ug07.ht!pages!ugGraphThreeDopsPage} -\index{ugGraphThreeDopsPage!ug07.ht!pages} +\pagehead{ugGraphThreeDopsPage}{ug07.ht} +{Operations for Three-Dimensional Graphics} <>= \begin{page}{ugGraphThreeDopsPage} {7.2.10. Operations for Three-Dimensional Graphics} \beginscroll -Here is a summary of useful Axiom operations for \threedim{} -graphics. -Each operation name is followed by a list of arguments. -Each argument is written as a variable informally named according -to the type of the argument (for example, {\it integer}). -If appropriate, a default value for an argument is given in -parentheses immediately following the name. +Here is a summary of useful Axiom operations for \threedim{} graphics. +Each operation name is followed by a list of arguments. Each argument +is written as a variable informally named according to the type of the +argument (for example, {\it integer}). If appropriate, a default +value for an argument is given in parentheses immediately following +the name. % \texht{\bgroup\hbadness = 10001\sloppy}{} @@ -39155,8 +35249,10 @@ values for a viewport. % \item[\axiomFun{rotate}]\funArgs{viewport, -\subscriptText{number}{\texht{$\theta$}{\axiom{theta}}}\argDef{viewThetaDefault}, -\subscriptText{number}{\texht{$\phi$}{\axiom{phi}}}\argDef{viewPhiDefault}} +\subscriptText{number}{\texht{$\theta$}{\axiom{theta}}} +\argDef{viewThetaDefault}, +\subscriptText{number}{\texht{$\phi$}{\axiom{phi}}} +\argDef{viewPhiDefault}} rotates the viewport by rotation angles for longitude ({\it \texht{$\theta$}{\axiom{theta}}}) and latitude ({\it \texht{$\phi$}{\axiom{phi}}}). @@ -39206,8 +35302,8 @@ title {\it string}. \item[\axiomFun{translate}]\funArgs{viewport, \subscriptText{float}{x}\argDef{viewDeltaXDefault}, \subscriptText{float}{y}\argDef{viewDeltaYDefault}} -translates -the object horizontally and vertically relative to the center of the viewport. +translates the object horizontally and vertically +relative to the center of the viewport. % \item[\axiomFun{intensity}]\funArgs{viewport,float\argDef{1.0}} @@ -39250,15 +35346,18 @@ viewport upper left-hand corner position, and the viewport size. % \item[\axiomFun{viewDeltaXDefault}]\funArgs{\optArg{float\argDef{0}}} resets the default horizontal offset -from the center of the viewport, or returns the current default offset if no argument is given. +from the center of the viewport, or returns the +current default offset if no argument is given. % \item[\axiomFun{viewDeltaYDefault}]\funArgs{\optArg{float\argDef{0}}} resets the default vertical offset -from the center of the viewport, or returns the current default offset if no argument is given. +from the center of the viewport, or returns the +current default offset if no argument is given. % -\item[\axiomFun{viewPhiDefault}]\funArgs{\optArg{float\argDef{-\texht{$\pi$}{{\it pi}}/4}}} +\item[\axiomFun{viewPhiDefault}]\funArgs{\optArg{float +\argDef{-\texht{$\pi$}{{\it pi}}/4}}} resets the default latitudinal view angle, or returns the current default angle if no argument is given. \texht{$\phi$}{{\it phi}} is set to this value. @@ -39297,17 +35396,20 @@ sets or indicates the width and height dimensions of a viewport. % -\item[\axiomFun{viewThetaDefault}]\funArgs{\optArg{float\argDef{\texht{$\pi$}{{\it pi}}/4}}} +\item[\axiomFun{viewThetaDefault}] +\funArgs{\optArg{float\argDef{\texht{$\pi$}{{\it pi}}/4}}} resets the default longitudinal view angle, or returns the current default angle if no argument is given. When a parameter is specified, the default longitudinal view angle \texht{$\theta$}{{\it theta}} is set to this value. % -\item[\axiomFun{viewWriteAvailable}]\funArgs{\optArg{list\argDef{["pixmap", +\item[\axiomFun{viewWriteAvailable}] +\funArgs{\optArg{list\argDef{["pixmap", "bitmap", "postscript", "image"}}} indicates the possible file types -that can be created with the \axiomFunFrom{write}{ThreeDimensionalViewport} function. +that can be created with the +\axiomFunFrom{write}{ThreeDimensionalViewport} function. % \item[\axiomFun{viewWriteDefault}]\funArgs{\optArg{list\argDef{[]}}} @@ -39342,16 +35444,7 @@ specifies the scaling factor. \end{page} @ -<>= -\newcommand{\ugXdefaultsTitle}{Customization using .Xdefaults} -\newcommand{\ugXdefaultsNumber}{7.2.11.} - -@ -\section{Customization using .Xdefaults} -\label{ugXdefaultsPage} -\index{pages!ugXdefaultsPage!ug07.ht} -\index{ug07.ht!pages!ugXdefaultsPage} -\index{ugXdefaultsPage!ug07.ht!pages} +\pagehead{ugXdefaultsPage}{ug07.ht}{Customization using .Xdefaults} <>= \begin{page}{ugXdefaultsPage}{7.2.11. Customization using .Xdefaults} \beginscroll @@ -39401,11 +35494,12 @@ white background. % \item[{\tt Axiom.3D.lightingFont:\ \it font}] \quad (3D only) \newline This indicates which font type is used for the {\bf x}, -{\bf y}, and {\bf z} labels of the two lighting axes potentiometers, and for -the {\bf Intensity} title on the lighting control-panel. +{\bf y}, and {\bf z} labels of the two lighting axes potentiometers, +and for the {\bf Intensity} title on the lighting control-panel. \xdefault{Rom10} % -\item[{\tt Axiom.2D.messageFont, Axiom.3D.messageFont:\ \it font}] \ \newline +\item[ +{\tt Axiom.2D.messageFont, Axiom.3D.messageFont:\ \it font}] \ \newline These indicate the font type to be used for the text in the control-panel message window. \xdefault{Rom14} @@ -39461,46 +35555,21 @@ This indicates which font type is used for the {\bf x}, @ \chapter{Users Guide Chapter 8 (ug08.ht)} -<>= -\newcommand{\ugProblemTitle}{Advanced Problem Solving} -\newcommand{\ugProblemNumber}{8.} - -@ -\section{Advanced Problem Solving} -\label{ugProblemPage} -\begin{itemize} -\item ugProblemNumericPage \ref{ugProblemNumericPage} on -page~\pageref{ugProblemNumericPage} -\item ugProblemFactorPage \ref{ugProblemFactorPage} on -page~\pageref{ugProblemFactorPage} -\item ugProblemSymRootPage \ref{ugProblemSymRootPage} on -page~\pageref{ugProblemSymRootPage} -\item ugProblemEigenPage \ref{ugProblemEigenPage} on -page~\pageref{ugProblemEigenPage} -\item ugProblemLinPolEqnPage \ref{ugProblemLinPolEqnPage} on -page~\pageref{ugProblemLinPolEqnPage} -\item ugProblemLimitsPage \ref{ugProblemLimitsPage} on -page~\pageref{ugProblemLimitsPage} -\item ugProblemLaplacePage \ref{ugProblemLaplacePage} on -page~\pageref{ugProblemLaplacePage} -\item ugProblemIntegrationPage \ref{ugProblemIntegrationPage} on -page~\pageref{ugProblemIntegrationPage} -\item ugProblemSeriesPage \ref{ugProblemSeriesPage} on -page~\pageref{ugProblemSeriesPage} -\item ugProblemDEQPage \ref{ugProblemDEQPage} on -page~\pageref{ugProblemDEQPage} -\item ugProblemFinitePage \ref{ugProblemFinitePage} on -page~\pageref{ugProblemFinitePage} -\item ugProblemIdealPage \ref{ugProblemIdealPage} on -page~\pageref{ugProblemIdealPage} -\item ugProblemGaloisPage \ref{ugProblemGaloisPage} on -page~\pageref{ugProblemGaloisPage} -\item ugProblemGeneticPage \ref{ugProblemGeneticPage} on -page~\pageref{ugProblemGeneticPage} -\end{itemize} -\index{pages!ugProblemPage!ug08.ht} -\index{ug08.ht!pages!ugProblemPage} -\index{ugProblemPage!ug08.ht!pages} +\pagehead{ugProblemPage}{ug08.ht}{Advanced Problem Solving} +\pageto{notitle}{ugProblemNumericPage} +\pageto{notitle}{ugProblemFactorPage} +\pageto{notitle}{ugProblemSymRootPage} +\pageto{notitle}{ugProblemEigenPage} +\pageto{notitle}{ugProblemLinPolEqnPage} +\pageto{notitle}{ugProblemLimitsPage} +\pageto{notitle}{ugProblemLaplacePage} +\pageto{notitle}{ugProblemIntegrationPage} +\pageto{notitle}{ugProblemSeriesPage} +\pageto{notitle}{ugProblemDEQPage} +\pageto{notitle}{ugProblemFinitePage} +\pageto{notitle}{ugProblemIdealPage} +\pageto{notitle}{ugProblemGaloisPage} +\pageto{notitle}{ugProblemGeneticPage} <>= \begin{page}{ugProblemPage}{8. Advanced Problem Solving} \beginscroll @@ -39509,23 +35578,34 @@ In this chapter we describe techniques useful in solving advanced problems with Axiom. \beginmenu - \menudownlink{{8.1. Numeric Functions}}{ugProblemNumericPage} - \menudownlink{{8.2. Polynomial Factorization}}{ugProblemFactorPage} + \menudownlink{{8.1. Numeric Functions}} +{ugProblemNumericPage} + \menudownlink{{8.2. Polynomial Factorization}} +{ugProblemFactorPage} \menudownlink{{8.3. Manipulating Symbolic Roots of a Polynomial}} {ugProblemSymRootPage} \menudownlink{{8.4. Computation of Eigenvalues and Eigenvectors}} {ugProblemEigenPage} \menudownlink{{8.5. Solution of Linear and Polynomial Equations}} {ugProblemLinPolEqnPage} - \menudownlink{{8.6. Limits}}{ugProblemLimitsPage} - \menudownlink{{8.7. Laplace Transforms}}{ugProblemLaplacePage} - \menudownlink{{8.8. Integration}}{ugProblemIntegrationPage} - \menudownlink{{8.9. Working with Power Series}}{ugProblemSeriesPage} - \menudownlink{{8.10. Solution of Differential Equations}}{ugProblemDEQPage} - \menudownlink{{8.11. Finite Fields}}{ugProblemFinitePage} - \menudownlink{{8.12. Primary Decomposition of Ideals}}{ugProblemIdealPage} - \menudownlink{{8.13. Computation of Galois Groups}}{ugProblemGaloisPage} - \menudownlink{{8.14. Non-Associative Algebras and Modelling Genetic Laws}} + \menudownlink{{8.6. Limits}} +{ugProblemLimitsPage} + \menudownlink{{8.7. Laplace Transforms}} +{ugProblemLaplacePage} + \menudownlink{{8.8. Integration}} +{ugProblemIntegrationPage} + \menudownlink{{8.9. Working with Power Series}} +{ugProblemSeriesPage} + \menudownlink{{8.10. Solution of Differential Equations}} +{ugProblemDEQPage} + \menudownlink{{8.11. Finite Fields}} +{ugProblemFinitePage} + \menudownlink{{8.12. Primary Decomposition of Ideals}} +{ugProblemIdealPage} + \menudownlink{{8.13. Computation of Galois Groups}} +{ugProblemGaloisPage} + \menudownlink{ +{8.14. Non-Associative Algebras and Modelling Genetic Laws}} {ugProblemGeneticPage} \endmenu \endscroll @@ -39533,24 +35613,10 @@ with Axiom. \end{page} @ -<>= -\newcommand{\ugProblemNumericTitle}{Numeric Functions} -\newcommand{\ugProblemNumericNumber}{8.1.} - -@ -\section{Numeric Functions} -\label{ugProblemNumericPage} -\begin{itemize} -\item ugIntroPage \ref{ugIntroPage} on -page~\pageref{ugIntroPage} -\item FloatXmpPage \ref{FloatXmpPage} on -page~\pageref{FloatXmpPage} -\item DoubleFloatXmpPage \ref{DoubleFloatXmpPage} on -page~\pageref{DoubleFloatXmpPage} -\end{itemize} -\index{pages!ugProblemNumericPage!ug08.ht} -\index{ug08.ht!pages!ugProblemNumericPage} -\index{ugProblemNumericPage!ug08.ht!pages} +\pagehead{ugProblemNumericPage}{ug08.ht}{Numeric Functions} +\pageto{notitle}{ugIntroPage} +\pageto{notitle}{FloatXmpPage} +\pageto{notitle}{DoubleFloatXmpPage} <>= \begin{page}{ugProblemNumericPage}{8.1. Numeric Functions} \beginscroll @@ -39558,24 +35624,21 @@ page~\pageref{DoubleFloatXmpPage} Axiom provides two basic floating-point types: \axiomType{Float} and \axiomType{DoubleFloat}. This section describes how to use numerical operations defined on these types and the related complex types. -% -As we mentioned in \downlink{``\ugIntroTitle''}{ugIntroPage} in -Chapter \ugIntroNumber\ignore{ugIntro}, the \axiomType{Float} type -is a software -implementation of floating-point numbers in which the exponent and the -significand may have any number of digits. -See \downlink{`Float'}{FloatXmpPage}\ignore{Float} for detailed -information about this domain. -The \axiomType{DoubleFloat} (see -\downlink{`DoubleFloat'}{DoubleFloatXmpPage}\ignore{DoubleFloat}) -is usually a hardware -implementation of floating point numbers, corresponding to machine double -precision. -The types \axiomType{Complex Float} and \axiomType{Complex DoubleFloat} are -the corresponding software implementations of complex floating-point numbers. -In this section the term {\it floating-point type} means any of these -four types. -% + +As we mentioned in \downlink{``\ugIntroTitle''}{ugIntroPage} in +Chapter \ugIntroNumber\ignore{ugIntro}, the \axiomType{Float} type is +a software implementation of floating-point numbers in which the +exponent and the significand may have any number of digits. See +\downlink{`Float'}{FloatXmpPage}\ignore{Float} for detailed +information about this domain. The \axiomType{DoubleFloat} (see +\downlink{`DoubleFloat'}{DoubleFloatXmpPage}\ignore{DoubleFloat}) is +usually a hardware implementation of floating point numbers, +corresponding to machine double precision. The types +\axiomType{Complex Float} and \axiomType{Complex DoubleFloat} are the +corresponding software implementations of complex floating-point +numbers. In this section the term {\it floating-point type} means any +of these four types. + The floating-point types implement the basic elementary functions. These include (where \axiomSyntax{\$} means \axiomType{DoubleFloat}, @@ -39585,11 +35648,16 @@ These include (where \axiomSyntax{\$} means \noindent \axiomFun{exp}, \axiomFun{log}: \axiom{\$ -> \$} \newline -\axiomFun{sin}, \axiomFun{cos}, \axiomFun{tan}, \axiomFun{cot}, \axiomFun{sec}, \axiomFun{csc}: \axiom{\$ -> \$} \newline -\axiomFun{sin}, \axiomFun{cos}, \axiomFun{tan}, \axiomFun{cot}, \axiomFun{sec}, \axiomFun{csc}: \axiom{\$ -> \$} \newline -\axiomFun{asin}, \axiomFun{acos}, \axiomFun{atan}, \axiomFun{acot}, \axiomFun{asec}, \axiomFun{acsc}: \axiom{\$ -> \$} \newline -\axiomFun{sinh}, \axiomFun{cosh}, \axiomFun{tanh}, \axiomFun{coth}, \axiomFun{sech}, \axiomFun{csch}: \axiom{\$ -> \$} \newline -\axiomFun{asinh}, \axiomFun{acosh}, \axiomFun{atanh}, \axiomFun{acoth}, \axiomFun{asech}, \axiomFun{acsch}: \axiom{\$ -> \$} \newline +\axiomFun{sin}, \axiomFun{cos}, \axiomFun{tan}, \axiomFun{cot}, +\axiomFun{sec}, \axiomFun{csc}: \axiom{\$ -> \$} \newline +\axiomFun{sin}, \axiomFun{cos}, \axiomFun{tan}, \axiomFun{cot}, +\axiomFun{sec}, \axiomFun{csc}: \axiom{\$ -> \$} \newline +\axiomFun{asin}, \axiomFun{acos}, \axiomFun{atan}, \axiomFun{acot}, +\axiomFun{asec}, \axiomFun{acsc}: \axiom{\$ -> \$} \newline +\axiomFun{sinh}, \axiomFun{cosh}, \axiomFun{tanh}, \axiomFun{coth}, +\axiomFun{sech}, \axiomFun{csch}: \axiom{\$ -> \$} \newline +\axiomFun{asinh}, \axiomFun{acosh}, \axiomFun{atanh}, \axiomFun{acoth}, +\axiomFun{asech}, \axiomFun{acsch}: \axiom{\$ -> \$} \newline \axiomFun{pi}: \axiom{() -> \$} \newline \axiomFun{sqrt}: \axiom{\$ -> \$} \newline \axiomFun{nthRoot}: \axiom{(\$, Integer) -> \$} \newline @@ -39608,8 +35676,8 @@ This includes cases such as \axiom{asin(1.2)}, \axiom{log(-3.2)}, % \xtc{ The default floating-point type is \axiomType{Float} so to evaluate -functions using \axiomType{Float} or \axiomType{Complex Float}, just use -normal decimal notation. +functions using \axiomType{Float} or \axiomType{Complex Float}, just +use normal decimal notation. }{ \spadpaste{exp(3.1)} } @@ -39628,23 +35696,25 @@ a declaration or conversion is required. }{ \spadpaste{exp(3.1::DFLOAT + 4.5::DFLOAT * \%i)} } -% + A number of special functions are provided by the package \axiomType{DoubleFloatSpecialFunctions} for the machine-precision -floating-point types. -The special functions provided are listed below, where \axiom{F} stands for -the types \axiomType{DoubleFloat} and \axiomType{Complex DoubleFloat}. -The real versions of the functions yield an error if the result is not real. +floating-point types. The special functions provided are listed +below, where \axiom{F} stands for the types \axiomType{DoubleFloat} +and \axiomType{Complex DoubleFloat}. The real versions of the +functions yield an error if the result is not real. \noindent \axiomFun{Gamma}: \axiom{F -> F}\hfill\newline \axiom{Gamma(z)} is the Euler gamma function, \texht{$\Gamma(z)$}{\axiom{Gamma(z)}}, defined by - \texht{\narrowDisplay{\Gamma(z) = \int_{0}^{\infty} t^{z-1} e^{-t} dt.}% + \texht{ +\narrowDisplay{\Gamma(z) = \int_{0}^{\infty} t^{z-1} e^{-t} dt.}% }{ \newline -\centerline{{\axiom{Gamma(z) = integrate(t**(z-1)*exp(-t), t=0..\%infinity).}}} +\centerline{{ +\axiom{Gamma(z) = integrate(t**(z-1)*exp(-t), t=0..\%infinity).}}} } \noindent @@ -39654,10 +35724,12 @@ The real versions of the functions yield an error if the result is not real. \texht{\narrowDisplay{B(u,v) = \int_{0}^{1} t^{u-1} (1-t)^{v-1} dt.}% }{ \newline -\centerline{{ \axiom{Beta(u,v) = integrate(t**(u-1)*(1-t)**(b-1), t=0..1).}}} +\centerline{{ +\axiom{Beta(u,v) = integrate(t**(u-1)*(1-t)**(b-1), t=0..1).}}} } This is related to \texht{$\Gamma(z)$}{\axiom{Gamma(z)}} by - \texht{\narrowDisplay{B(u,v) = \frac{\Gamma(u) \Gamma(v)}{\Gamma(u + v)}.}% + \texht{\narrowDisplay{B(u,v) = +\frac{\Gamma(u) \Gamma(v)}{\Gamma(u + v)}.}% }{ \newline \centerline{{ \axiom{Beta(u,v) = Gamma(u)*Gamma(v)/Gamma(u + v).}}} @@ -39667,7 +35739,8 @@ The real versions of the functions yield an error if the result is not real. \axiomFun{logGamma}: \axiom{F -> F}\hfill\newline \axiom{logGamma(z)} is the natural logarithm of \texht{$\Gamma(z)$}{\axiom{Gamma(z)}}. - This can often be computed even if \texht{$\Gamma(z)$}{\axiom{Gamma(z)}} + This can often be computed even if +\texht{$\Gamma(z)$}{\axiom{Gamma(z)}} cannot. % @@ -39682,9 +35755,11 @@ is the function \texht{$\psi(z)$}{\axiom{psi(z)}}, }% \noindent -\axiomFun{polygamma}: \axiom{(NonNegativeInteger, F) -> F}\hfill\newline +\axiomFun{polygamma}: +\axiom{(NonNegativeInteger, F) -> F}\hfill\newline \axiom{polygamma(n, z)} is the \eth{\axiom{n}} derivative of - \texht{$\psi(z)$}{\axiom{digamma(z)}}\texht{, written $\psi^{(n)}(z)$}{}. + \texht{$\psi(z)$}{ +\axiom{digamma(z)}}\texht{, written $\psi^{(n)}(z)$}{}. \noindent \axiomFun{besselJ}: \axiom{(F,F) -> F}\hfill\newline @@ -39704,10 +35779,12 @@ is the function \texht{$\psi(z)$}{\axiom{psi(z)}}, This function satisfies the same differential equation as \axiomFun{besselJ}. The implementation simply uses the relation - \texht{\narrowDisplay{Y_\nu (z) = \frac{J_\nu (z) \cos(\nu \pi) - J_{-\nu} (z)}{\sin(\nu \pi)}.}% + \texht{\narrowDisplay{Y_\nu (z) = +\frac{J_\nu (z) \cos(\nu \pi) - J_{-\nu} (z)}{\sin(\nu \pi)}.}% }{ \newline -\centerline{{ \axiom{Y(v,z) = (J(v,z)*cos(v*\%pi) - J(-v,z))/sin(v*\%pi).}}} +\centerline{{ \axiom{Y(v,z) = +(J(v,z)*cos(v*\%pi) - J(-v,z))/sin(v*\%pi).}}} }% \noindent @@ -39718,19 +35795,24 @@ is the function \texht{$\psi(z)$}{\axiom{psi(z)}}, \texht{\narrowDisplay{z^2 w''(z) + z w'(z) - (z^2+\nu^2)w(z) = 0.}% }{ \newline -\centerline{{ \axiom{z**2 * w''(z) + z * w'(z) - (z**2+v**2)*w(z) = 0.}}} +\centerline{{ +\axiom{z**2 * w''(z) + z * w'(z) - (z**2+v**2)*w(z) = 0.}}} }% \noindent \axiomFun{besselK}: \axiom{(F,F) -> F}\hfill\newline - \axiom{besselK(v,z)} is the modified Bessel function of the second kind, + \axiom{besselK(v,z)} is the modified Bessel +function of the second kind, \texht{$K_\nu (z)$}{\axiom{K(v,z)}}. - This function satisfies the same differential equation as \axiomFun{besselI}. + This function satisfies the same differential +equation as \axiomFun{besselI}. The implementation simply uses the relation - \texht{\narrowDisplay{K_\nu (z) = \pi \frac{I_{-\nu} (z) - I_{\nu} (z)}{2 \sin(\nu \pi)}.}% + \texht{\narrowDisplay{K_\nu (z) = +\pi \frac{I_{-\nu} (z) - I_{\nu} (z)}{2 \sin(\nu \pi)}.}% }{ \newline -\centerline{{ \axiom{K(v,z) = \%pi*(I(v,z) - I(-v,z))/(2*sin(v*\%pi)).}}} +\centerline{{ \axiom{K(v,z) = +\%pi*(I(v,z) - I(-v,z))/(2*sin(v*\%pi)).}}} } \noindent @@ -39739,21 +35821,29 @@ is the function \texht{$\psi(z)$}{\axiom{psi(z)}}, This function satisfies the differential equation \texht{$w''(z) - z w(z) = 0.$}{\axiom{w''(z) - z * w(z) = 0.}} The implementation simply uses the relation - \texht{\narrowDisplay{Ai(-z) = \frac{1}{3}\sqrt{z} ( J_{-1/3} (\frac{2}{3}z^{3/2}) + J_{1/3} (\frac{2}{3}z^{3/2}) ).}% + \texht{\narrowDisplay{Ai(-z) = +\frac{1}{3}\sqrt{z} ( J_{-1/3} +(\frac{2}{3}z^{3/2}) + J_{1/3} (\frac{2}{3}z^{3/2}) ).}% }{ \newline -\centerline{{ \axiom{Ai(-z) = 1/3 * sqrt(z) * (J(-1/3, 2/3*z**(3/2)) + J(1/3, 2/3*z**(3/2)) ).}}} +\centerline{{ \axiom{Ai(-z) = +1/3 * sqrt(z) * (J(-1/3, 2/3*z**(3/2)) + J(1/3, 2/3*z**(3/2)) ).}}} }% \noindent \axiomFun{airyBi}: \axiom{F -> F}\hfill\newline - \axiom{airyBi(z)} is the Airy function \texht{$Bi(z)$}{\axiom{Bi(z)}}. - This function satisfies the same differential equation as \axiomFun{airyAi}. + \axiom{airyBi(z)} is the Airy function +\texht{$Bi(z)$}{\axiom{Bi(z)}}. + This function satisfies the same differential +equation as \axiomFun{airyAi}. The implementation simply uses the relation - \texht{\narrowDisplay{Bi(-z) = \frac{1}{3}\sqrt{3 z} ( J_{-1/3} (\frac{2}{3}z^{3/2}) - J_{1/3} (\frac{2}{3}z^{3/2}) ).}% + \texht{\narrowDisplay{Bi(-z) = +\frac{1}{3}\sqrt{3 z} ( J_{-1/3} +(\frac{2}{3}z^{3/2}) - J_{1/3} (\frac{2}{3}z^{3/2}) ).}% }{ \newline -\centerline{{ \axiom{Bi(-z) = 1/3 *sqrt(3*z) * (J(-1/3, 2/3*z**(3/2)) - J(1/3, 2/3*z**(3/2)) ).}}} +\centerline{{ \axiom{Bi(-z) = 1/3 *sqrt(3*z) * +(J(-1/3, 2/3*z**(3/2)) - J(1/3, 2/3*z**(3/2)) ).}}} } \noindent @@ -39762,8 +35852,8 @@ is the function \texht{$\psi(z)$}{\axiom{psi(z)}}, \texht{${}_0 F_1 ( ; c; z)$}{\axiom{0F1(; c; z)}}.% \xtc{ -The above special functions are defined only for small floating-point types. -If you give \axiomType{Float} arguments, they are converted to +The above special functions are defined only for small floating-point +types. If you give \axiomType{Float} arguments, they are converted to \axiomType{DoubleFloat} by Axiom. }{ \spadpaste{Gamma(0.5)**2} @@ -39772,82 +35862,98 @@ If you give \axiomType{Float} arguments, they are converted to }{ \spadpaste{a := 2.1; b := 1.1; besselI(a + \%i*b, b*a + 1)} } -% -A number of additional operations may be used to compute numerical values. -These are special polynomial functions that can be evaluated for values in -any commutative ring \axiom{R}, and in particular for values in any -floating-point type. -The following operations are provided by the package -\axiomType{OrthogonalPolynomialFunctions}: + +A number of additional operations may be used to compute numerical +values. These are special polynomial functions that can be evaluated +for values in any commutative ring \axiom{R}, and in particular for +values in any floating-point type. The following operations are +provided by the package \axiomType{OrthogonalPolynomialFunctions}: \noindent -\axiomFun{chebyshevT}: \axiom{(NonNegativeInteger, R) -> R}\hbox{}\hfill\newline - \axiom{chebyshevT(n,z)} is the \eth{\axiom{n}} Chebyshev polynomial of the first +\axiomFun{chebyshevT}: +\axiom{(NonNegativeInteger, R) -> R}\hbox{}\hfill\newline + \axiom{chebyshevT(n,z)} is the \eth{\axiom{n}} +Chebyshev polynomial of the first kind, \texht{$T_n (z)$}{\axiom{T[n](z)}}. These are defined by - \texht{\narrowDisplay{\frac{1-t z}{1-2 t z+t^2} = \sum_{n=0}^{\infty} T_n (z) t^n.}% + \texht{\narrowDisplay{\frac{1-t z}{1-2 t z+t^2} = +\sum_{n=0}^{\infty} T_n (z) t^n.}% }{ \newline -\centerline{{ \axiom{(1-t*z)/(1-2*t*z+t**2) = sum(T[n](z) *t**n, n = 0..).}}} +\centerline{{ \axiom{(1-t*z)/(1-2*t*z+t**2) = +sum(T[n](z) *t**n, n = 0..).}}} }% \noindent -\axiomFun{chebyshevU}: \axiom{(NonNegativeInteger, R) -> R}\hbox{}\hfill\newline - \axiom{chebyshevU(n,z)} is the \eth{\axiom{n}} Chebyshev polynomial of the second +\axiomFun{chebyshevU}: \axiom{(NonNegativeInteger, R) -> R} +\hbox{}\hfill\newline + \axiom{chebyshevU(n,z)} is the \eth{\axiom{n}} +Chebyshev polynomial of the second kind, \texht{$U_n (z)$}{\axiom{U[n](z)}}. These are defined by - \texht{\narrowDisplay{\frac{1}{1-2 t z+t^2} = \sum_{n=0}^{\infty} U_n (z) t^n.}% + \texht{\narrowDisplay{\frac{1}{1-2 t z+t^2} = +\sum_{n=0}^{\infty} U_n (z) t^n.}% }{ \newline \centerline{{ \axiom{1/(1-2*t*z+t**2) = sum(U[n](z) *t**n, n = 0..).}}} }% \noindent -\axiomFun{hermiteH}: \axiom{(NonNegativeInteger, R) -> R}\hbox{}\hfill\newline +\axiomFun{hermiteH}: \axiom{(NonNegativeInteger, R) -> R} +\hbox{}\hfill\newline \axiom{hermiteH(n,z)} is the \eth{\axiom{n}} Hermite polynomial, \texht{$H_n (z)$}{\axiom{H[n](z)}}. These are defined by - \texht{\narrowDisplay{e^{2 t z - t^2} = \sum_{n=0}^{\infty} H_n (z) \frac{t^n}{n!}.}% + \texht{\narrowDisplay{e^{2 t z - t^2} = +\sum_{n=0}^{\infty} H_n (z) \frac{t^n}{n!}.}% }{ \newline \centerline{{ \axiom{exp(2*t*z-t**2) = sum(H[n](z)*t**n/n!, n = 0..).}}} }% \noindent -\axiomFun{laguerreL}: \axiom{(NonNegativeInteger, R) -> R}\hbox{}\hfill\newline +\axiomFun{laguerreL}: \axiom{(NonNegativeInteger, R) -> R} +\hbox{}\hfill\newline \axiom{laguerreL(n,z)} is the \eth{\axiom{n}} Laguerre polynomial, \texht{$L_n (z)$}{\axiom{L[n](z)}}. These are defined by - \texht{\narrowDisplay{\frac{e^{-\frac{t z}{1-t}}}{1-t} = \sum_{n=0}^{\infty} L_n (z) \frac{t^n}{n!}.}% + \texht{\narrowDisplay{\frac{e^{-\frac{t z}{1-t}}}{1-t} = +\sum_{n=0}^{\infty} L_n (z) \frac{t^n}{n!}.}% }{ \newline -\centerline{{ \axiom{exp(-t*z/(1-t))/(1-t) = sum(L[n](z)*t**n/n!, n = 0..).}}} +\centerline{{ \axiom{exp(-t*z/(1-t))/(1-t) = +sum(L[n](z)*t**n/n!, n = 0..).}}} }% \noindent -\axiomFun{laguerreL}: \axiom{(NonNegativeInteger, NonNegativeInteger, R) -> R}\hbox{}\hfill\newline +\axiomFun{laguerreL}: +\axiom{(NonNegativeInteger, NonNegativeInteger, R) -> R}\hbox{}\hfill\newline \axiom{laguerreL(m,n,z)} is the associated Laguerre polynomial, \texht{$L^m_n (z)$}{\axiom{L[n](z)}}. - This is the \eth{\axiom{m}} derivative of \texht{$L_n (z)$}{\axiom{L[n](z)}}. + This is the +\eth{\axiom{m}} derivative of \texht{$L_n (z)$}{\axiom{L[n](z)}}. \noindent -\axiomFun{legendreP}: \axiom{(NonNegativeInteger, R) -> R}\hbox{}\hfill\newline +\axiomFun{legendreP}: +\axiom{(NonNegativeInteger, R) -> R}\hbox{}\hfill\newline \axiom{legendreP(n,z)} is the \eth{\axiom{n}} Legendre polynomial, \texht{$P_n (z)$}{\axiom{P[n](z)}}. These are defined by - \texht{\narrowDisplay{\frac{1}{\sqrt{1-2 t z+t^2}} = \sum_{n=0}^{\infty} P_n (z) t^n.}% + \texht{\narrowDisplay{ +\frac{1}{\sqrt{1-2 t z+t^2}} = \sum_{n=0}^{\infty} P_n (z) t^n.}% }{ \newline -\centerline{{ \axiom{1/sqrt(1-2*z*t+t**2) = sum(P[n](z)*t**n, n = 0..).}}} +\centerline{{ \axiom{1/sqrt(1-2*z*t+t**2) = +sum(P[n](z)*t**n, n = 0..).}}} }% % \xtc{ -These operations require non-negative integers for the indices, but otherwise -the argument can be given as desired. +These operations require non-negative integers for the indices, +but otherwise the argument can be given as desired. }{ \spadpaste{[chebyshevT(i, z) for i in 0..5]} } \xtc{ -The expression \axiom{chebyshevT(n,z)} evaluates to the \eth{\axiom{n}} Chebyshev -polynomial of the first kind. +The expression \axiom{chebyshevT(n,z)} evaluates to the +\eth{\axiom{n}} Chebyshev polynomial of the first kind. }{ \spadpaste{chebyshevT(3, 5.0 + 6.0*\%i)} } @@ -39856,8 +35962,8 @@ polynomial of the first kind. \spadpaste{chebyshevT(3, 5.0::DoubleFloat)} } \xtc{ -The expression \axiom{chebyshevU(n,z)} evaluates to the \eth{\axiom{n}} Chebyshev -polynomial of the second kind. +The expression \axiom{chebyshevU(n,z)} evaluates to the +\eth{\axiom{n}} Chebyshev polynomial of the second kind. }{ \spadpaste{[chebyshevU(i, z) for i in 0..5]} } @@ -39866,8 +35972,8 @@ polynomial of the second kind. \spadpaste{chebyshevU(3, 0.2)} } \xtc{ -The expression \axiom{hermiteH(n,z)} evaluates to the \eth{\axiom{n}} Hermite -polynomial. +The expression \axiom{hermiteH(n,z)} evaluates to the +\eth{\axiom{n}} Hermite polynomial. }{ \spadpaste{[hermiteH(i, z) for i in 0..5]} } @@ -39876,8 +35982,8 @@ polynomial. \spadpaste{hermiteH(100, 1.0)} } \xtc{ -The expression \axiom{laguerreL(n,z)} evaluates to the \eth{\axiom{n}} Laguerre -polynomial. +The expression \axiom{laguerreL(n,z)} evaluates to the +\eth{\axiom{n}} Laguerre polynomial. }{ \spadpaste{[laguerreL(i, z) for i in 0..4]} } @@ -39895,7 +36001,8 @@ polynomial. } \xtc{ The expression -\axiom{legendreP(n,z)} evaluates to the \eth{\axiom{n}} Legendre polynomial, +\axiom{legendreP(n,z)} evaluates to the +\eth{\axiom{n}} Legendre polynomial, }{ \spadpaste{[legendreP(i,z) for i in 0..5]} } @@ -39910,27 +36017,34 @@ The following operations are provided by the package \axiomType{NumberTheoreticPolynomialFunctions}. \noindent -\axiomFun{bernoulliB}: \axiom{(NonNegativeInteger, R) -> R} \hbox{}\hfill\newline +\axiomFun{bernoulliB}: \axiom{(NonNegativeInteger, R) -> R} +\hbox{}\hfill\newline \axiom{bernoulliB(n,z)} is the \eth{\axiom{n}} Bernoulli polynomial, \texht{$B_n (z)$}{\axiom{B[n](z)}}. These are defined by - \texht{\narrowDisplay{\frac{t e^{z t}}{e^t - 1} = \sum_{n=0}^{\infty} B_n (z) \frac{t^n}{n!}.} + \texht{\narrowDisplay{\frac{t e^{z t}}{e^t - 1} = +\sum_{n=0}^{\infty} B_n (z) \frac{t^n}{n!}.} }{ \newline -\centerline{{ \axiom{t*exp(z*t)/(exp t - 1) = sum(B[n](z)*t**n/n! for n - 0..)}}} +\centerline{{ \axiom{t*exp(z*t)/(exp t - 1) = +sum(B[n](z)*t**n/n! for n - 0..)}}} }% \noindent -\axiomFun{eulerE}: \axiom{(NonNegativeInteger, R) -> R} \hbox{}\hfill\newline +\axiomFun{eulerE}: \axiom{(NonNegativeInteger, R) -> R} +\hbox{}\hfill\newline \axiom{eulerE(n,z)} is the \eth{\axiom{n}} Euler polynomial, \texht{$E_n (z)$}{\axiom{E[n](z)}}. These are defined by - \texht{\narrowDisplay{\frac{2 e^{z t}}{e^t + 1} = \sum_{n=0}^{\infty} E_n (z) \frac{t^n}{n!}.}% + \texht{\narrowDisplay{\frac{2 e^{z t}}{e^t + 1} = +\sum_{n=0}^{\infty} E_n (z) \frac{t^n}{n!}.}% }{ \newline -\centerline{{ \axiom{2*exp(z*t)/(exp t + 1) = sum(E[n](z)*t**n/n! for n - 0..)}}} +\centerline{{ \axiom{2*exp(z*t)/(exp t + 1) = +sum(E[n](z)*t**n/n! for n - 0..)}}} }% \noindent -\axiomFun{cyclotomic}: \axiom{(NonNegativeInteger, R) -> R}\hbox{}\hfill\newline +\axiomFun{cyclotomic}: \axiom{(NonNegativeInteger, R) -> R} +\hbox{}\hfill\newline \axiom{cyclotomic(n,z)} is the \eth{\axiom{n}} cyclotomic polynomial \texht{$\Phi_n (z)$}{\axiom{phi(n,z)}}. This is the polynomial whose roots are precisely the primitive \eth{\axiom{n}} roots of unity. @@ -39938,8 +36052,8 @@ The following operations are provided by the package \texht{$\phi(n)$}{\axiom{phi(n)}}. \xtc{ -The expression \axiom{bernoulliB(n,z)} evaluates to the \eth{\axiom{n}} Bernoulli -polynomial. +The expression \axiom{bernoulliB(n,z)} evaluates to the +\eth{\axiom{n}} Bernoulli polynomial. }{ \spadpaste{bernoulliB(3, z)} } @@ -39959,7 +36073,8 @@ The expression } \xtc{ The expression -\axiom{cyclotomic(n,z)} evaluates to the \eth{\axiom{n}} cyclotomic polynomial. +\axiom{cyclotomic(n,z)} evaluates to the +\eth{\axiom{n}} cyclotomic polynomial. }{ \spadpaste{cyclotomic(3, z)} } @@ -39974,13 +36089,17 @@ It is necessary to use the \axiomFun{draw} operations that operate on functions rather than expressions. \psXtc{ -This is the complex exponential function\texht{ (rotated interactively).}{.} -When this is displayed in color, the height is the value of the real part of -the function and the color is the imaginary part. -Red indicates large negative imaginary values, green indicates imaginary -values near zero and blue/violet indicates large positive imaginary values. -}{ -\graphpaste{draw((x,y)+-> real exp complex(x,y), -2..2, -2*\%pi..2*\%pi, colorFunction == (x, y) +-> imag exp complex(x,y), title=="exp(x+\%i*y)", style=="smooth")} +This is the complex exponential function\texht{ (rotated +interactively).}{.} When this is displayed in color, the height is +the value of the real part of the function and the color is the +imaginary part. Red indicates large negative imaginary values, green +indicates imaginary values near zero and blue/violet indicates large +positive imaginary values. +}{ +\graphpaste{draw((x,y)+-> real exp complex(x,y), -2..2, +-2*\%pi..2*\%pi, colorFunction == +(x, y) +-> imag exp complex(x,y), +title=="exp(x+\%i*y)", style=="smooth")} }{ \epsffile[0 0 295 295]{../ps/compexp.ps} } @@ -39992,7 +36111,10 @@ the color indicates the function value's phase. The position of the branch cuts are clearly visible and one can see that the function is real only for a real argument. }{ -\graphpaste{vp := draw((x,y) +-> real atan complex(x,y), -\%pi..\%pi, -\%pi..\%pi, colorFunction==(x,y) +->argument atan complex(x,y), title=="atan(x+\%i*y)", style=="shade"); rotate(vp,-160,-45); vp} +\graphpaste{vp := draw((x,y) +-> real atan complex(x,y), +-\%pi..\%pi, -\%pi..\%pi, colorFunction== +(x,y) +->argument atan complex(x,y), +title=="atan(x+\%i*y)", style=="shade"); rotate(vp,-160,-45); vp} }{ \epsffile[0 0 295 295]{../ps/compatan.ps} } @@ -40000,7 +36122,10 @@ see that the function is real only for a real argument. \psXtc{ This is the complex Gamma function. }{ -\graphpaste{draw((x,y) +-> max(min(real Gamma complex(x,y),4),-4), -\%pi..\%pi, -\%pi..\%pi, style=="shade", colorFunction == (x,y) +-> argument Gamma complex(x,y), title == "Gamma(x+\%i*y)", var1Steps == 50, var2Steps== 50)} +\graphpaste{draw((x,y) +-> max(min(real Gamma complex(x,y),4),-4), +-\%pi..\%pi, -\%pi..\%pi, style=="shade", colorFunction == +(x,y) +-> argument Gamma complex(x,y), +title == "Gamma(x+\%i*y)", var1Steps == 50, var2Steps== 50)} }{ \epsffile[0 0 295 295]{../ps/compgamm.ps} } @@ -40008,7 +36133,8 @@ This is the complex Gamma function. \psXtc{ This shows the real Beta function near the origin. }{ -\graphpaste{draw(Beta(x,y)/100, x=-1.6..1.7, y = -1.6..1.7, style=="shade", title=="Beta(x,y)", var1Steps==40, var2Steps==40)} +\graphpaste{draw(Beta(x,y)/100, x=-1.6..1.7, y = -1.6..1.7, +style=="shade", title=="Beta(x,y)", var1Steps==40, var2Steps==40)} }{ \epsffile[0 0 295 295]{../ps/realbeta.ps} } @@ -40018,7 +36144,9 @@ This is the Bessel function \texht{$J_\alpha (x)$}{\axiom{J(alpha,x)}} for index \texht{$\alpha$}{\axiom{alpha}} in the range \axiom{-6..4} and argument \texht{$x$}{\axiom{x}} in the range \axiom{2..14}. }{ -\graphpaste{draw((alpha,x) +-> min(max(besselJ(alpha, x+8), -6), 6), -6..4, -6..6, title=="besselJ(alpha,x)", style=="shade", var1Steps==40, var2Steps==40)} +\graphpaste{draw((alpha,x) +-> min(max(besselJ(alpha, x+8), -6), 6), +-6..4, -6..6, title=="besselJ(alpha,x)", style=="shade", +var1Steps==40, var2Steps==40)} }{ \epsffile[0 0 295 295]{../ps/bessel.ps} } @@ -40026,7 +36154,8 @@ argument \texht{$x$}{\axiom{x}} in the range \axiom{2..14}. \psXtc{ This is the modified Bessel function \texht{$I_\alpha (x)$}{\axiom{I(alpha,x)}} -evaluated for various real values of the index \texht{$\alpha$}{\axiom{alpha}} +evaluated for various real values of the index +\texht{$\alpha$}{\axiom{alpha}} and fixed argument \texht{$x = 5$}{\axiom{x = 5}}. }{ \graphpaste{draw(besselI(alpha, 5), alpha = -12..12, unit==[5,20])} @@ -40037,9 +36166,13 @@ and fixed argument \texht{$x = 5$}{\axiom{x = 5}}. \psXtc{ This is similar to the last example except the index \texht{$\alpha$}{\axiom{alpha}} -takes on complex values in a \axiom{6 x 6} rectangle centered on the origin. +takes on complex values in a \axiom{6 x 6} rectangle +centered on the origin. }{ -\graphpaste{draw((x,y) +-> real besselI(complex(x/20, y/20),5), -60..60, -60..60, colorFunction == (x,y)+-> argument besselI(complex(x/20,y/20),5), title=="besselI(x+i*y,5)", style=="shade")} +\graphpaste{draw((x,y) +-> real besselI(complex(x/20, y/20),5), +-60..60, -60..60, colorFunction == +(x,y)+-> argument besselI(complex(x/20,y/20),5), +title=="besselI(x+i*y,5)", style=="shade")} }{ \epsffile[0 0 295 295]{../ps/modbessc.ps} } @@ -40049,26 +36182,11 @@ takes on complex values in a \axiom{6 x 6} rectangle centered on the origin. \end{page} @ -<>= -\newcommand{\ugProblemFactorTitle}{Polynomial Factorization} -\newcommand{\ugProblemFactorNumber}{8.2.} - -@ -\section{Polynomial Factorization} -\label{ugProblemFactorPage} -\begin{itemize} -\item ugProblemFactorIntRatPage \ref{ugProblemFactorIntRatPage} on -page~\pageref{ugProblemFactorIntRatPage} -\item ugProblemFactorFFPage \ref{ugProblemFactorFFPage} on -page~\pageref{ugProblemFactorFFPage} -\item ugProblemFactorAlgPage \ref{ugProblemFactorAlgPage} on -page~\pageref{ugProblemFactorAlgPage} -\item ugProblemFactorRatFunPage \ref{ugProblemFactorRatFunPage} on -page~\pageref{ugProblemFactorRatFunPage} -\end{itemize} -\index{pages!ugProblemFactorPage!ug08.ht} -\index{ug08.ht!pages!ugProblemFactorPage} -\index{ugProblemFactorPage!ug08.ht!pages} +\pagehead{ugProblemFactorPage}{ug08.ht}{Polynomial Factorization} +\pageto{notitle}{ugProblemFactorIntRatPage} +\pageto{notitle}{ugProblemFactorFFPage} +\pageto{notitle}{ugProblemFactorAlgPage} +\pageto{notitle}{ugProblemFactorRatFunPage} <>= \begin{page}{ugProblemFactorPage}{8.2. Polynomial Factorization} \beginscroll @@ -40093,16 +36211,8 @@ Here are some examples. \end{page} @ -<>= -\newcommand{\ugProblemFactorIntRatTitle}{Integer and Rational Number Coefficients} -\newcommand{\ugProblemFactorIntRatNumber}{8.2.1.} - -@ -\section{Integer and Rational Number Coefficients} -\label{ugProblemFactorIntRatPage} -\index{pages!ugProblemFactorIntRatPage!ug08.ht} -\index{ug08.ht!pages!ugProblemFactorIntRatPage} -\index{ugProblemFactorIntRatPage!ug08.ht!pages} +\pagehead{ugProblemFactorIntRatPage}{ug08.ht} +{Integer and Rational Number Coefficients} <>= \begin{page}{ugProblemFactorIntRatPage} {8.2.1. Integer and Rational Number Coefficients} @@ -40135,20 +36245,8 @@ rational number coefficients. \end{page} @ -<>= -\newcommand{\ugProblemFactorFFTitle}{Finite Field Coefficients} -\newcommand{\ugProblemFactorFFNumber}{8.2.2.} - -@ -\section{Finite Field Coefficients} -\label{ugProblemFactorFFPage} -\begin{itemize} -\item ugProblemFinitePage \ref{ugProblemFinitePage} on -page~\pageref{ugProblemFinitePage} -\end{itemize} -\index{pages!ugProblemFactorFFPage!ug08.ht} -\index{ug08.ht!pages!ugProblemFactorFFPage} -\index{ugProblemFactorFFPage!ug08.ht!pages} +\pagehead{ugProblemFactorFFPage}{ug08.ht}{Finite Field Coefficients} +\pageto{notitle}{ugProblemFinitePage} <>= \begin{page}{ugProblemFactorFFPage}{8.2.2. Finite Field Coefficients} \beginscroll @@ -40168,10 +36266,10 @@ extensions of these fields. \spadpaste{factor u \free{u}} } \xtc{ -Convert this to have coefficients in the finite -field with \texht{$19^3$}{\axiom{19**3}} elements. -See \downlink{``\ugProblemFiniteTitle''}{ugProblemFinitePage} -in Section \ugProblemFiniteNumber\ignore{ugProblemFinite} for more information +Convert this to have coefficients in the finite field with +\texht{$19^3$}{\axiom{19**3}} elements. See +\downlink{``\ugProblemFiniteTitle''}{ugProblemFinitePage} in Section +\ugProblemFiniteNumber\ignore{ugProblemFinite} for more information about finite fields. }{ \spadpaste{factor(u :: POLY FFX(PF 19,3)) \free{u}} @@ -40183,16 +36281,8 @@ about finite fields. \end{page} @ -<>= -\newcommand{\ugProblemFactorAlgTitle}{Simple Algebraic Extension Field Coefficients} -\newcommand{\ugProblemFactorAlgNumber}{8.2.3.} - -@ -\section{Simple Algebraic Extension Field Coefficients} -\label{ugProblemFactorAlgPage} -\index{pages!ugProblemFactorAlgPage!ug08.ht} -\index{ug08.ht!pages!ugProblemFactorAlgPage} -\index{ugProblemFactorAlgPage!ug08.ht!pages} +\pagehead{ugProblemFactorAlgPage}{ug08.ht} +{Simple Algebraic Extension Field Coefficients} <>= \begin{page}{ugProblemFactorAlgPage} {8.2.3. Simple Algebraic Extension Field Coefficients} @@ -40209,7 +36299,8 @@ Here, \axiom{aa} and \axiom{bb} are symbolic roots of polynomials. } \xtc{ }{ -\spadpaste{p:=(x**3+aa**2*x+y)*(aa*x**2+aa*x+aa*y**2)**2 \free{aa}\bound{p}} +\spadpaste{p:=(x**3+aa**2*x+y)*(aa*x**2+aa*x+aa*y**2)**2 +\free{aa}\bound{p}} } \xtc{ Note that the second argument to factor can be a list of @@ -40253,24 +36344,17 @@ and \axiom{bb} to the rational numbers. \end{page} @ +\pagehead{ugProblemFactorRatFunPage}{ug08.ht} +{Factoring Rational Functions} <>= -\newcommand{\ugProblemFactorRatFunTitle}{Factoring Rational Functions} -\newcommand{\ugProblemFactorRatFunNumber}{8.2.4.} - -@ -\section{Factoring Rational Functions} -\label{ugProblemFactorRatFunPage} -\index{pages!ugProblemFactorRatFunPage!ug08.ht} -\index{ug08.ht!pages!ugProblemFactorRatFunPage} -\index{ugProblemFactorRatFunPage!ug08.ht!pages} -<>= -\begin{page}{ugProblemFactorRatFunPage}{8.2.4. Factoring Rational Functions} +\begin{page}{ugProblemFactorRatFunPage} +{8.2.4. Factoring Rational Functions} \beginscroll -Since fractions of polynomials form a field, every element (other than zero) -divides any other, so there is no useful notion of irreducible factors. -Thus the \axiomFun{factor} operation is not very useful for fractions -of polynomials. +Since fractions of polynomials form a field, every element (other than +zero) divides any other, so there is no useful notion of irreducible +factors. Thus the \axiomFun{factor} operation is not very useful for +fractions of polynomials. \xtc{ There is, instead, a specific operation \axiomFun{factorFraction} @@ -40292,26 +36376,12 @@ to the numerator and denominator. \end{page} @ -<>= -\newcommand{\ugProblemSymRootTitle}{Manipulating Symbolic Roots of a Polynomial} -\newcommand{\ugProblemSymRootNumber}{8.3.} - -@ -\section{Manipulating Symbolic Roots of a Polynomial} -\label{ugProblemSymRootPage} -\begin{itemize} -\item ugxProblemOnePolPage \ref{ugxProblemOnePolPage} on -page~\pageref{ugxProblemOnePolPage} -\item ugxProblemPolSysPage \ref{ugxProblemPolSysPage} on -page~\pageref{ugxProblemPolSysPage} -\item ugxProblemSymRootOnePage \ref{ugxProblemSymRootOnePage} on -page~\pageref{ugxProblemSymRootOnePage} -\item ugxProblemSymRootAllPage \ref{ugxProblemSymRootAllPage} on -page~\pageref{ugxProblemSymRootAllPage} -\end{itemize} -\index{pages!ugProblemSymRootPage!ug08.ht} -\index{ug08.ht!pages!ugProblemSymRootPage} -\index{ugProblemSymRootPage!ug08.ht!pages} +\pagehead{ugProblemSymRootPage}{ug08.ht} +{Manipulating Symbolic Roots of a Polynomial} +\pageto{notitle}{ugxProblemOnePolPage} +\pageto{notitle}{ugxProblemPolSysPage} +\pageto{notitle}{ugxProblemSymRootOnePage} +\pageto{notitle}{ugxProblemSymRootAllPage} <>= \begin{page}{ugProblemSymRootPage} {8.3. Manipulating Symbolic Roots of a Polynomial} @@ -40339,18 +36409,11 @@ polynomials. \end{page} @ +\pagehead{ugxProblemSymRootOnePage}{ug08.ht} +{Using a Single Root of a Polynomial} <>= -\newcommand{\ugxProblemSymRootOneTitle}{Using a Single Root of a Polynomial} -\newcommand{\ugxProblemSymRootOneNumber}{8.3.1.} - -@ -\section{Using a Single Root of a Polynomial} -\label{ugxProblemSymRootOnePage} -\index{pages!ugxProblemSymRootOnePage!ug08.ht} -\index{ug08.ht!pages!ugxProblemSymRootOnePage} -\index{ugxProblemSymRootOnePage!ug08.ht!pages} -<>= -\begin{page}{ugxProblemSymRootOnePage}{8.3.1. Using a Single Root of a Polynomial} +\begin{page}{ugxProblemSymRootOnePage} +{8.3.1. Using a Single Root of a Polynomial} \beginscroll Use \axiomFun{rootOf} to get a symbolic root of a polynomial: @@ -40408,22 +36471,12 @@ except that it may express the root using radicals in some cases. \end{page} @ +\pagehead{ugxProblemSymRootAllPage}{ug08.ht} +{Using All Roots of a Polynomial} +\pageto{notitle}{ugxProblemOnePolPage} <>= -\newcommand{\ugxProblemSymRootAllTitle}{Using All Roots of a Polynomial} -\newcommand{\ugxProblemSymRootAllNumber}{8.3.2.} - -@ -\section{Using All Roots of a Polynomial} -\label{ugxProblemSymRootAllPage} -\begin{itemize} -\item ugxProblemOnePolPage \ref{ugxProblemOnePolPage} on -page~\pageref{ugxProblemOnePolPage} -\end{itemize} -\index{pages!ugxProblemSymRootAllPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemSymRootAllPage} -\index{ugxProblemSymRootAllPage!ug08.ht!pages} -<>= -\begin{page}{ugxProblemSymRootAllPage}{8.3.2. Using All Roots of a Polynomial} +\begin{page}{ugxProblemSymRootAllPage} +{8.3.2. Using All Roots of a Polynomial} \beginscroll Use \axiomFun{rootsOf} to get all symbolic roots of a polynomial: @@ -40439,8 +36492,8 @@ Compute all the roots of \axiom{x**4 + 1}. \spadpaste{l := rootsOf(x**4+1,x) \bound{l}} } \xtc{ -As a side effect, the variables \axiom{\%x0, \%x1} and \axiom{\%x2} are bound -to the first three roots of \axiom{x**4+1}. +As a side effect, the variables \axiom{\%x0, \%x1} and \axiom{\%x2} +are bound to the first three roots of \axiom{x**4+1}. }{ \spadpaste{\%x0**5 \free{l}} } @@ -40477,12 +36530,11 @@ its trace and norm. \xtc{ Corresponding to the pair of operations \axiomFun{rootOf}/\axiomFun{zeroOf} in -\downlink{``\ugxProblemOnePolTitle''}{ugxProblemOnePolPage} in -Section \ugxProblemOnePolNumber\ignore{ugxProblemOnePol}, there is -an operation \axiomFun{zerosOf} that, like \axiomFun{rootsOf}, -computes all the roots -of a given polynomial, but which expresses some of them in terms of -radicals. +\downlink{``\ugxProblemOnePolTitle''}{ugxProblemOnePolPage} in Section +\ugxProblemOnePolNumber\ignore{ugxProblemOnePol}, there is an +operation \axiomFun{zerosOf} that, like \axiomFun{rootsOf}, computes +all the roots of a given polynomial, but which expresses some of them +in terms of radicals. }{ \spadpaste{zerosOf(y**4+1,y) \bound{z}} } @@ -40499,16 +36551,8 @@ The other three roots are expressed in radicals. \end{page} @ -<>= -\newcommand{\ugProblemEigenTitle}{Computation of Eigenvalues and Eigenvectors} -\newcommand{\ugProblemEigenNumber}{8.4.} - -@ -\section{Computation of Eigenvalues and Eigenvectors} -\label{ugProblemEigenPage} -\index{pages!ugProblemEigenPage!ug08.ht} -\index{ug08.ht!pages!ugProblemEigenPage} -\index{ugProblemEigenPage!ug08.ht!pages} +\pagehead{ugProblemEigenPage}{ug08.ht} +{Computation of Eigenvalues and Eigenvectors} <>= \begin{page}{ugProblemEigenPage} {8.4. Computation of Eigenvalues and Eigenvectors} @@ -40534,14 +36578,14 @@ use the operation \axiomFun{eigenvalues}. \spadpaste{leig := eigenvalues(m1) \free{m1} \bound{leig}} } \xtc{ -Given an explicit eigenvalue, \axiomFun{eigenvector} computes the eigenvectors -corresponding to it. +Given an explicit eigenvalue, \axiomFun{eigenvector} computes the +eigenvectors corresponding to it. }{ \spadpaste{eigenvector(first(leig),m1) \free{m1 leig}} } -The operation \axiomFun{eigenvectors} returns a list of pairs of values and -vectors. When an eigenvalue is rational, Axiom gives you +The operation \axiomFun{eigenvectors} returns a list of pairs of values +and vectors. When an eigenvalue is rational, Axiom gives you the value explicitly; otherwise, its minimal polynomial is given, (the polynomial of lowest degree with the eigenvalues as roots), together with a parametric representation of the eigenvector using the @@ -40566,28 +36610,28 @@ in terms of radicals. } Alternatively, Axiom can compute real or complex approximations to the -eigenvectors and eigenvalues using the operations \axiomFun{realEigenvectors} -or \axiomFun{complexEigenvectors}. -They each take an additional argument \texht{$\epsilon$}{\axiom{epsilon}} -to specify the ``precision'' required. -In the real case, this means that each approximation will be within +eigenvectors and eigenvalues using the operations +\axiomFun{realEigenvectors} or \axiomFun{complexEigenvectors}. They +each take an additional argument \texht{$\epsilon$}{\axiom{epsilon}} +to specify the ``precision'' required. In the real case, this means +that each approximation will be within \texht{$\pm\epsilon$}{plus or +minus \axiom{epsilon}} of the actual result. In the complex case, +this means that each approximation will be within \texht{$\pm\epsilon$}{plus or minus \axiom{epsilon}} of the actual -result. -In the complex case, this means that each approximation will be within -\texht{$\pm\epsilon$}{plus or minus \axiom{epsilon}} of the actual result -in each of the real and imaginary parts. +result in each of the real and imaginary parts. \xtc{ -The precision can be specified as a \axiomType{Float} if the results are -desired in floating-point notation, or as \axiomType{Fraction Integer} if the -results are to be expressed using rational (or complex rational) numbers. +The precision can be specified as a \axiomType{Float} if the results +are desired in floating-point notation, or as \axiomType{Fraction +Integer} if the results are to be expressed using rational (or complex +rational) numbers. }{ \spadpaste{realEigenvectors(m1,1/1000) \free{m1}} } \xtc{ -If an \axiom{n} by \axiom{n} matrix has \axiom{n} distinct eigenvalues (and -therefore \axiom{n} eigenvectors) the operation \axiomFun{eigenMatrix} -gives you a matrix of the eigenvectors. +If an \axiom{n} by \axiom{n} matrix has \axiom{n} distinct eigenvalues +(and therefore \axiom{n} eigenvectors) the operation +\axiomFun{eigenMatrix} gives you a matrix of the eigenvectors. }{ \spadpaste{eigenMatrix(m1) \free{m1}} } @@ -40618,26 +36662,12 @@ has a basis of orthonormal eigenvectors, then \end{page} @ -<>= -\newcommand{\ugProblemLinPolEqnTitle}{Solution of Linear and Polynomial Equations} -\newcommand{\ugProblemLinPolEqnNumber}{8.5.} - -@ -\section{Solution of Linear and Polynomial Equations} -\label{ugProblemLinPolEqnPage} -\begin{itemize} -\item ugProblemDEQPage \ref{ugProblemDEQPage} on -page~\pageref{ugProblemDEQPage} -\item ugxProblemLinSysPage \ref{ugxProblemLinSysPage} on -page~\pageref{ugxProblemLinSysPage} -\item ugxProblemOnePolPage \ref{ugxProblemOnePolPage} on -page~\pageref{ugxProblemOnePolPage} -\item ugxProblemPolSysPage \ref{ugxProblemPolSysPage} on -page~\pageref{ugxProblemPolSysPage} -\end{itemize} -\index{pages!ugProblemLinPolEqnPage!ug08.ht} -\index{ug08.ht!pages!ugProblemLinPolEqnPage} -\index{ugProblemLinPolEqnPage!ug08.ht!pages} +\pagehead{ugProblemLinPolEqnPage}{ug08.ht} +{Solution of Linear and Polynomial Equations} +\pageto{notitle}{ugProblemDEQPage} +\pageto{notitle}{ugxProblemLinSysPage} +\pageto{notitle}{ugxProblemOnePolPage} +\pageto{notitle}{ugxProblemPolSysPage} <>= \begin{page}{ugProblemLinPolEqnPage} {8.5. Solution of Linear and Polynomial Equations} @@ -40663,25 +36693,19 @@ Section \ugProblemDEQNumber\ignore{ugProblemDEQ}. \end{page} @ +\pagehead{ugxProblemLinSysPage}{ug08.ht} +{Solution of Systems of Linear Equations} <>= -\newcommand{\ugxProblemLinSysTitle}{Solution of Systems of Linear Equations} -\newcommand{\ugxProblemLinSysNumber}{8.5.1.} - -@ -\section{Solution of Systems of Linear Equations} -\label{ugxProblemLinSysPage} -\index{pages!ugxProblemLinSysPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemLinSysPage} -\index{ugxProblemLinSysPage!ug08.ht!pages} -<>= -\begin{page}{ugxProblemLinSysPage}{8.5.1. Solution of Systems of Linear Equations} +\begin{page}{ugxProblemLinSysPage} +{8.5.1. Solution of Systems of Linear Equations} \beginscroll -You can use the operation \axiomFun{solve} to solve systems of linear equations. +You can use the operation \axiomFun{solve} to solve systems of linear +equations. -The operation \axiomFun{solve} takes two arguments, the list of equations and the -list of the unknowns to be solved for. -A system of linear equations need not have a unique solution. +The operation \axiomFun{solve} takes two arguments, the list of +equations and the list of the unknowns to be solved for. A system of +linear equations need not have a unique solution. \xtc{ To solve the linear system: @@ -40780,24 +36804,17 @@ these vectors form a basis for the solution space. \end{page} @ +\pagehead{ugxProblemOnePolPage}{ug08.ht} +{Solution of a Single Polynomial Equation} <>= -\newcommand{\ugxProblemOnePolTitle}{Solution of a Single Polynomial Equation} -\newcommand{\ugxProblemOnePolNumber}{8.5.2.} - -@ -\section{Solution of a Single Polynomial Equation} -\label{ugxProblemOnePolPage} -\index{pages!ugxProblemOnePolPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemOnePolPage} -\index{ugxProblemOnePolPage!ug08.ht!pages} -<>= -\begin{page}{ugxProblemOnePolPage}{8.5.2. Solution of a Single Polynomial Equation} +\begin{page}{ugxProblemOnePolPage} +{8.5.2. Solution of a Single Polynomial Equation} \beginscroll -Axiom can solve polynomial equations producing either approximate -or exact solutions. -Exact solutions are either members of the ground -field or can be presented symbolically as roots of irreducible polynomials. +Axiom can solve polynomial equations producing either approximate or +exact solutions. Exact solutions are either members of the ground +field or can be presented symbolically as roots of irreducible +polynomials. \xtc{ This returns the one rational root along with an irreducible @@ -40868,20 +36885,9 @@ Solutions where the denominator vanishes are discarded. \end{page} @ -<>= -\newcommand{\ugxProblemPolSysTitle}{Solution of Systems of Polynomial Equations} -\newcommand{\ugxProblemPolSysNumber}{8.5.3.} - -@ -\section{Solution of Systems of Polynomial Equations} -\label{ugxProblemPolSysPage} -\begin{itemize} -\item ugxProblemOnePolPage \ref{ugxProblemOnePolPage} on -page~\pageref{ugxProblemOnePolPage} -\end{itemize} -\index{pages!ugxProblemPolSysPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemPolSysPage} -\index{ugxProblemPolSysPage!ug08.ht!pages} +\pagehead{ugxProblemPolSysPage}{ug08.ht} +{Solution of Systems of Polynomial Equations} +\pageto{notitle}{ugxProblemOnePolPage} <>= \begin{page}{ugxProblemPolSysPage} {8.5.3. Solution of Systems of Polynomial Equations} @@ -40975,16 +36981,7 @@ discarded. \end{page} @ -<>= -\newcommand{\ugProblemLimitsTitle}{Limits} -\newcommand{\ugProblemLimitsNumber}{8.6.} - -@ -\section{Limits} -\label{ugProblemLimitsPage} -\index{pages!ugProblemLimitsPage!ug08.ht} -\index{ug08.ht!pages!ugProblemLimitsPage} -\index{ugProblemLimitsPage!ug08.ht!pages} +\pagehead{ugProblemLimitsPage}{ug08.ht}{Limits} <>= \begin{page}{ugProblemLimitsPage}{8.6. Limits} \beginscroll @@ -41003,12 +37000,10 @@ of \axiom{(x**2 - 3*x + 2)/(x**2 - 1)} as \axiom{x} approaches \axiom{1}.} \spadpaste{limit((x**2 - 3*x + 2)/(x**2 - 1),x = 1)} } -Sometimes the limit when approached from the left is different from the -limit from the right and, in this case, you may wish to ask for a -one-sided limit. -Also, -if you have a function that is only defined on one side of a particular value, -you can compute a one-sided limit. +Sometimes the limit when approached from the left is different from +the limit from the right and, in this case, you may wish to ask for a +one-sided limit. Also, if you have a function that is only defined on +one side of a particular value, you can compute a one-sided limit. \xtc{ The function \axiom{log(x)} is only defined to the right of zero, @@ -41061,7 +37056,8 @@ You can compute limits at infinity by passing either \texht{$+\infty$ or $-\infty$}{``plus infinity'' or ``minus infinity''} as the third argument of \axiomFun{limit}. \xtc{ -To do this, use the constants \axiom{\%plusInfinity} and \axiom{\%minusInfinity}. +To do this, use the constants +\axiom{\%plusInfinity} and \axiom{\%minusInfinity}. }{ \spadpaste{limit(sqrt(3*x**2 + 1)/(5*x),x = \%plusInfinity)} } @@ -41080,29 +37076,29 @@ As you can see, the limit is expressed in terms of the parameters. When you use \axiomFun{limit}, you are taking the limit of a real function of a real variable. \xtc{ -When you compute this, -Axiom returns \axiom{0} because, as a function of a real variable, -\axiom{sin(1/z)} is always between \axiom{-1} and \axiom{1}, so \axiom{z * sin(1/z)} -tends to \axiom{0} as \axiom{z} tends to \axiom{0}. +When you compute this, Axiom returns \axiom{0} because, as a function +of a real variable, \axiom{sin(1/z)} is always between \axiom{-1} and +\axiom{1}, so \axiom{z * sin(1/z)} tends to \axiom{0} as \axiom{z} +tends to \axiom{0}. }{ \spadpaste{limit(z * sin(1/z),z = 0)} } -However, as a function of a {\it complex} variable, \axiom{sin(1/z)} is badly -behaved near \axiom{0} (one says that \axiom{sin(1/z)} has an +However, as a function of a {\it complex} variable, \axiom{sin(1/z)} +is badly behaved near \axiom{0} (one says that \axiom{sin(1/z)} has an {\it essential singularity} at \axiom{z = 0}). \xtc{ When viewed as a function of a complex variable, \axiom{z * sin(1/z)} -does not approach any limit as \axiom{z} tends to \axiom{0} in the complex plane. -Axiom indicates this when we call \axiomFun{complexLimit}. +does not approach any limit as \axiom{z} tends to \axiom{0} in the +complex plane. Axiom indicates this when we call +\axiomFun{complexLimit}. }{ \spadpaste{complexLimit(z * sin(1/z),z = 0)} } -%% This is used in chapter 1 - -You can also take complex limits at infinity, that is, limits of a function of -\axiom{z} as \axiom{z} approaches infinity on the Riemann sphere. -Use the symbol \axiom{\%infinity} to denote ``complex infinity.'' +You can also take complex limits at infinity, that is, limits of a +function of \axiom{z} as \axiom{z} approaches infinity on the Riemann +sphere. Use the symbol \axiom{\%infinity} to denote ``complex +infinity.'' \xtc{ As above, to compute complex limits rather than real limits, use \axiomFun{complexLimit}. @@ -41127,16 +37123,7 @@ But this limit does not. \end{page} @ -<>= -\newcommand{\ugProblemLaplaceTitle}{Laplace Transforms} -\newcommand{\ugProblemLaplaceNumber}{8.7.} - -@ -\section{Laplace Transforms} -\label{ugProblemLaplacePage} -\index{pages!ugProblemLaplacePage!ug08.ht} -\index{ug08.ht!pages!ugProblemLaplacePage} -\index{ugProblemLaplacePage!ug08.ht!pages} +\pagehead{ugProblemLaplacePage}{ug08.ht}{Laplace Transforms} <>= \begin{page}{ugProblemLaplacePage}{8.7. Laplace Transforms} \beginscroll @@ -41191,20 +37178,8 @@ it keeps it as a formal transform in the answer. \end{page} @ -<>= -\newcommand{\ugProblemIntegrationTitle}{Integration} -\newcommand{\ugProblemIntegrationNumber}{8.8.} - -@ -\section{Integration} -\label{ugProblemIntegrationPage} -\begin{itemize} -\item ugxProblemSymRootAllPage \ref{ugxProblemSymRootAllPage} on -page~\pageref{ugxProblemSymRootAllPage} -\end{itemize} -\index{pages!ugProblemIntegrationPage!ug08.ht} -\index{ug08.ht!pages!ugProblemIntegrationPage} -\index{ugProblemIntegrationPage!ug08.ht!pages} +\pagehead{ugProblemIntegrationPage}{ug08.ht}{Integration} +\pageto{notitle}{ugxProblemSymRootAllPage} <>= \begin{page}{ugProblemIntegrationPage}{8.8. Integration} \beginscroll @@ -41286,13 +37261,14 @@ To see how to work with these strange generated symbols (such as \downlink{``\ugxProblemSymRootAllTitle''}{ugxProblemSymRootAllPage} in Section \ugxProblemSymRootAllNumber\ignore{ugxProblemSymRootAll}. -Definite integration is the process of computing the area between -the \axiom{x}-axis and the curve of a function \axiom{f(x)}. -The fundamental theorem of calculus states that if \axiom{f} is -continuous on an interval \axiom{a..b} and if there exists a function \axiom{g} +Definite integration is the process of computing the area between the +\axiom{x}-axis and the curve of a function \axiom{f(x)}. The +fundamental theorem of calculus states that if \axiom{f} is continuous +on an interval \axiom{a..b} and if there exists a function \axiom{g} that is differentiable on \axiom{a..b} and such that \axiom{D(g, x)} -is equal to \axiom{f}, then the definite integral of \axiom{f} -for \axiom{x} in the interval \axiom{a..b} is equal to \axiom{g(b) - g(a)}. +is equal to \axiom{f}, then the definite integral of \axiom{f} for +\axiom{x} in the interval \axiom{a..b} is equal to \axiom{g(b) - +g(a)}. \xtc{ The package \axiomType{RationalFunctionDefiniteIntegration} provides @@ -41341,36 +37317,16 @@ The value here is, of course, incorrect if \axiom{sqrt(a)} is between \end{page} @ -<>= -\newcommand{\ugProblemSeriesTitle}{Working with Power Series} -\newcommand{\ugProblemSeriesNumber}{8.9.} - -@ -\section{Working with Power Series} -\label{ugProblemSeriesPage} -\begin{itemize} -\item ugxProblemDEQSeriesPage \ref{ugxProblemDEQSeriesPage} on -page~\pageref{ugxProblemDEQSeriesPage} -\item ugxProblemSeriesCreatePage \ref{ugxProblemSeriesCreatePage} on -page~\pageref{ugxProblemSeriesCreatePage} -\item ugxProblemSeriesCoefficientsPage \ref{ugxProblemSeriesCoefficientsPage} on -page~\pageref{ugxProblemSeriesCoefficientsPage} -\item ugxProblemSeriesArithmeticPage \ref{ugxProblemSeriesArithmeticPage} on -page~\pageref{ugxProblemSeriesArithmeticPage} -\item ugxProblemSeriesFunctionsPage \ref{ugxProblemSeriesFunctionsPage} on -page~\pageref{ugxProblemSeriesFunctionsPage} -\item ugxProblemSeriesConversionsPage \ref{ugxProblemSeriesConversionsPage} on -page~\pageref{ugxProblemSeriesConversionsPage} -\item ugxProblemSeriesFormulaPage \ref{ugxProblemSeriesFormulaPage} on -page~\pageref{ugxProblemSeriesFormulaPage} -\item ugxProblemSeriesSubstitutePage \ref{ugxProblemSeriesSubstitutePage} on -page~\pageref{ugxProblemSeriesSubstitutePage} -\item ugxProblemSeriesBernoulliPage \ref{ugxProblemSeriesBernoulliPage} on -page~\pageref{ugxProblemSeriesBernoulliPage} -\end{itemize} -\index{pages!ugProblemSeriesPage!ug08.ht} -\index{ug08.ht!pages!ugProblemSeriesPage} -\index{ugProblemSeriesPage!ug08.ht!pages} +\pagehead{ugProblemSeriesPage}{ug08.ht}{Working with Power Series} +\pageto{notitle}{ugxProblemDEQSeriesPage} +\pageto{notitle}{ugxProblemSeriesCreatePage} +\pageto{notitle}{ugxProblemSeriesCoefficientsPage} +\pageto{notitle}{ugxProblemSeriesArithmeticPage} +\pageto{notitle}{ugxProblemSeriesFunctionsPage} +\pageto{notitle}{ugxProblemSeriesConversionsPage} +\pageto{notitle}{ugxProblemSeriesFormulaPage} +\pageto{notitle}{ugxProblemSeriesSubstitutePage} +\pageto{notitle}{ugxProblemSeriesBernoulliPage} <>= \begin{page}{ugProblemSeriesPage}{8.9. Working with Power Series} \beginscroll @@ -41399,21 +37355,21 @@ power series, see Section \ugxProblemDEQSeriesNumber\ignore{ugxProblemDEQSeries}. \beginmenu - \menudownlink{{8.9.1. Creation of Power Series}} + \menudownlink{{8.9.1. Creation of Power Series}} {ugxProblemSeriesCreatePage} - \menudownlink{{8.9.2. Coefficients of Power Series}} + \menudownlink{{8.9.2. Coefficients of Power Series}} {ugxProblemSeriesCoefficientsPage} - \menudownlink{{8.9.3. Power Series Arithmetic}} + \menudownlink{{8.9.3. Power Series Arithmetic}} {ugxProblemSeriesArithmeticPage} - \menudownlink{{8.9.4. Functions on Power Series}} + \menudownlink{{8.9.4. Functions on Power Series}} {ugxProblemSeriesFunctionsPage} - \menudownlink{{8.9.5. Converting to Power Series}} + \menudownlink{{8.9.5. Converting to Power Series}} {ugxProblemSeriesConversionsPage} - \menudownlink{{8.9.6. Power Series from Formulas}} + \menudownlink{{8.9.6. Power Series from Formulas}} {ugxProblemSeriesFormulaPage} - \menudownlink{{8.9.7. Substituting Numerical Values in Power Series}} + \menudownlink{{8.9.7. Substituting Numerical Values in Power Series}} {ugxProblemSeriesSubstitutePage} - \menudownlink{{8.9.8. Example: Bernoulli Polynomials and Sums of Powers}} + \menudownlink{{8.9.8. Example: Bernoulli Polynomials and Sums of Powers}} {ugxProblemSeriesBernoulliPage} \endmenu \endscroll @@ -41421,26 +37377,11 @@ Section \ugxProblemDEQSeriesNumber\ignore{ugxProblemDEQSeries}. \end{page} @ -<>= -\newcommand{\ugxProblemSeriesCreateTitle}{Creation of Power Series} -\newcommand{\ugxProblemSeriesCreateNumber}{8.9.1.} - -@ -\section{Creation of Power Series} -\label{ugxProblemSeriesCreatePage} -\begin{itemize} -\item ugxProblemSeriesConversionsPage \ref{ugxProblemSeriesConversionsPage} on -page~\pageref{ugxProblemSeriesConversionsPage} -\item ugTypesDeclarePage \ref{ugTypesDeclarePage} on -page~\pageref{ugTypesDeclarePage} -\item ugxProblemSeriesFunctionsPage \ref{ugxProblemSeriesFunctionsPage} on -page~\pageref{ugxProblemSeriesFunctionsPage} -\item ugxProblemSeriesFormulaPage \ref{ugxProblemSeriesFormulaPage} on -page~\pageref{ugxProblemSeriesFormulaPage} -\end{itemize} -\index{pages!ugxProblemSeriesCreatePage!ug08.ht} -\index{ug08.ht!pages!ugxProblemSeriesCreatePage} -\index{ugxProblemSeriesCreatePage!ug08.ht!pages} +\pagehead{ugxProblemSeriesCreatePage}{ug08.ht}{Creation of Power Series} +\pageto{notitle}{ugxProblemSeriesConversionsPage} +\pageto{notitle}{ugTypesDeclarePage} +\pageto{notitle}{ugxProblemSeriesFunctionsPage} +\pageto{notitle}{ugxProblemSeriesFormulaPage} <>= \begin{page}{ugxProblemSeriesCreatePage}{8.9.1. Creation of Power Series} \beginscroll @@ -41500,13 +37441,16 @@ You normally accomplish this via a type declaration (see \downlink{``\ugTypesDeclareTitle''}{ugTypesDeclarePage} in Section \ugTypesDeclareNumber\ignore{ugTypesDeclare}). See -\downlink{``\ugxProblemSeriesFunctionsTitle''}{ugxProblemSeriesFunctionsPage} -in Section \ugxProblemSeriesFunctionsNumber\ignore{ugxProblemSeriesFunctions} +\downlink{``\ugxProblemSeriesFunctionsTitle''} +{ugxProblemSeriesFunctionsPage} +in Section \ugxProblemSeriesFunctionsNumber +\ignore{ugxProblemSeriesFunctions} for some warnings about working with declared series. \xtc{ We declare that \axiom{y} is a one-variable Taylor series -(\axiomType{UTS} is the abbreviation for \axiomType{UnivariateTaylorSeries}) +(\axiomType{UTS} is the abbreviation for +\axiomType{UnivariateTaylorSeries}) in the variable \axiom{z} with \axiomType{FLOAT} (that is, floating-point) coefficients, centered about \axiom{0.} Then, by assignment, we obtain the Taylor expansion of @@ -41536,18 +37480,11 @@ This is the Taylor expansion of \axiom{exp(w)} at \axiom{w = 0}. \end{page} @ +\pagehead{ugxProblemSeriesCoefficientsPage}{ug08.ht} +{Coefficients of Power Series} <>= -\newcommand{\ugxProblemSeriesCoefficientsTitle}{Coefficients of Power Series} -\newcommand{\ugxProblemSeriesCoefficientsNumber}{8.9.2.} - -@ -\section{Coefficients of Power Series} -\label{ugxProblemSeriesCoefficientsPage} -\index{pages!ugxProblemSeriesCoefficientsPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemSeriesCoefficientsPage} -\index{ugxProblemSeriesCoefficientsPage!ug08.ht!pages} -<>= -\begin{page}{ugxProblemSeriesCoefficientsPage}{8.9.2. Coefficients of Power Series} +\begin{page}{ugxProblemSeriesCoefficientsPage} +{8.9.2. Coefficients of Power Series} \beginscroll You can extract any coefficient from a power series---even one @@ -41593,18 +37530,11 @@ have all been computed. \end{page} @ +\pagehead{ugxProblemSeriesArithmeticPage}{ug08.ht} +{Power Series Arithmetic} <>= -\newcommand{\ugxProblemSeriesArithmeticTitle}{Power Series Arithmetic} -\newcommand{\ugxProblemSeriesArithmeticNumber}{8.9.3.} - -@ -\section{Power Series Arithmetic} -\label{ugxProblemSeriesArithmeticPage} -\index{pages!ugxProblemSeriesArithmeticPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemSeriesArithmeticPage} -\index{ugxProblemSeriesArithmeticPage!ug08.ht!pages} -<>= -\begin{page}{ugxProblemSeriesArithmeticPage}{8.9.3. Power Series Arithmetic} +\begin{page}{ugxProblemSeriesArithmeticPage} +{8.9.3. Power Series Arithmetic} \beginscroll You can manipulate power series using the usual arithmetic operations @@ -41625,7 +37555,8 @@ The results of these operations are also power series. \spadpaste{(3 + x) / (1 + 7*x)} } \xtc{ -You can also compute \axiom{f(x) ** g(x)}, where \axiom{f(x)} and \axiom{g(x)} +You can also compute \axiom{f(x) ** g(x)}, where +\axiom{f(x)} and \axiom{g(x)} are two power series. }{ \spadpaste{base := 1 / (1 - x) \free{x} \bound{base}} @@ -41646,23 +37577,17 @@ are two power series. \end{page} @ +\pagehead{ugxProblemSeriesFunctionsPage}{ug08.ht} +{Functions on Power Series} <>= -\newcommand{\ugxProblemSeriesFunctionsTitle}{Functions on Power Series} -\newcommand{\ugxProblemSeriesFunctionsNumber}{8.9.4.} - -@ -\section{Functions on Power Series} -\label{ugxProblemSeriesFunctionsPage} -\index{pages!ugxProblemSeriesFunctionsPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemSeriesFunctionsPage} -\index{ugxProblemSeriesFunctionsPage!ug08.ht!pages} -<>= -\begin{page}{ugxProblemSeriesFunctionsPage}{8.9.4. Functions on Power Series} +\begin{page}{ugxProblemSeriesFunctionsPage} +{8.9.4. Functions on Power Series} \beginscroll Once you have created a power series, you can apply transcendental functions -(for example, \axiomFun{exp}, \axiomFun{log}, \axiomFun{sin}, \axiomFun{tan}, +(for example, \axiomFun{exp}, \axiomFun{log}, +\axiomFun{sin}, \axiomFun{tan}, \axiomFun{cosh}, etc.) to it. \labelSpace{1pc} @@ -41752,12 +37677,12 @@ then the constant coefficient of the result would be Therefore, evaluating \axiom{exp(2 + tan(y))} would generate an error message. -If you want to compute the Taylor expansion of \axiom{exp(2 + tan(y))}, you must -ensure that the coefficient domain has an operation \axiomFun{exp} defined -for it. -An example of such a domain is \axiomType{Expression Integer}, the type -of formal functional expressions over the integers. -% +If you want to compute the Taylor expansion of \axiom{exp(2 + +tan(y))}, you must ensure that the coefficient domain has an operation +\axiomFun{exp} defined for it. An example of such a domain is +\axiomType{Expression Integer}, the type of formal functional +expressions over the integers. + \xtc{ When working with coefficients of this type, }{ @@ -41789,16 +37714,8 @@ are using the variable \axiom{w} instead of \axiom{z}. \end{page} @ -<>= -\newcommand{\ugxProblemSeriesConversionsTitle}{Converting to Power Series} -\newcommand{\ugxProblemSeriesConversionsNumber}{8.9.5.} - -@ -\section{Converting to Power Series} -\label{ugxProblemSeriesConversionsPage} -\index{pages!ugxProblemSeriesConversionsPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemSeriesConversionsPage} -\index{ugxProblemSeriesConversionsPage!ug08.ht!pages} +\pagehead{ugxProblemSeriesConversionsPage}{ug08.ht} +{Converting to Power Series} <>= \begin{page}{ugxProblemSeriesConversionsPage} {8.9.5. Converting to Power Series} @@ -41843,8 +37760,8 @@ or as a Taylor series in \axiom{y}. } \xtc{ A more interesting function is -\texht{${\displaystyle t e^{x t}} \over {\displaystyle e^t - 1}$}{(t * -\%e**(x*t))/(\%e**t - 1)}. +\texht{${\displaystyle t e^{x t}} \over +{\displaystyle e^t - 1}$}{(t * \%e**(x*t))/(\%e**t - 1)}. When we expand this function as a Taylor series in \axiom{t} the \eth{\axiom{n}} order coefficient is the \eth{\axiom{n}} Bernoulli polynomial @@ -41881,13 +37798,12 @@ You get the desired series expansion by issuing this. \spadpaste{laurent(x/log(x),x = 1)} } -Similarly, a series with terms of fractional degree is neither a Taylor -series nor a Laurent series. -Such a series is called a -{\it Puiseux series}. -The expression \axiom{laurent(sqrt(sec(x)),x = 3 * \%pi/2)} -results in an error message -because the series expansion about this point has terms of fractional degree. +Similarly, a series with terms of fractional degree is neither a +Taylor series nor a Laurent series. Such a series is called a {\it +Puiseux series}. The expression \axiom{laurent(sqrt(sec(x)),x = 3 * +\%pi/2)} results in an error message because the series expansion +about this point has terms of fractional degree. + \xtc{ However, this command produces what you want. }{ @@ -41895,11 +37811,11 @@ However, this command produces what you want. } Finally, consider the case of functions that do not have Puiseux -expansions about certain points. -An example of this is \texht{$x^x$}{\axiom{x^x}} about \axiom{x = 0}. -\axiom{puiseux(x**x,x=0)} -produces an error message because of the +expansions about certain points. An example of this is +\texht{$x^x$}{\axiom{x^x}} about \axiom{x = 0}. +\axiom{puiseux(x**x,x=0)} produces an error message because of the type of singularity of the function at \axiom{x = 0}. + \xtc{ The general function \axiomFun{series} can be used in this case. Notice that the series returned is not, strictly speaking, a power series @@ -41921,41 +37837,26 @@ exclusively. \end{page} @ +\pagehead{ugxProblemSeriesFormulaPage}{ug08.ht} +{Power Series from Formulas} +\pageto{notitle}{ugxProblemSeriesConversionsPage} +\pageto{notitle}{ugUserAnonPage} +\pageto{notitle}{ugxProblemSeriesConversionsPage} <>= -\newcommand{\ugxProblemSeriesFormulaTitle}{Power Series from Formulas} -\newcommand{\ugxProblemSeriesFormulaNumber}{8.9.6.} - -@ -\section{Power Series from Formulas} -\label{ugxProblemSeriesFormulaPage} -\begin{itemize} -\item ugxProblemSeriesConversionsPage \ref{ugxProblemSeriesConversionsPage} on -page~\pageref{ugxProblemSeriesConversionsPage} -\item ugUserAnonPage \ref{ugUserAnonPage} on -page~\pageref{ugUserAnonPage} -\item ugxProblemSeriesConversionsPage \ref{ugxProblemSeriesConversionsPage} on -page~\pageref{ugxProblemSeriesConversionsPage} -\end{itemize} -\index{pages!ugxProblemSeriesFormulaPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemSeriesFormulaPage} -\index{ugxProblemSeriesFormulaPage!ug08.ht!pages} -<>= -\begin{page}{ugxProblemSeriesFormulaPage}{8.9.6. Power Series from Formulas} +\begin{page}{ugxProblemSeriesFormulaPage} +{8.9.6. Power Series from Formulas} \beginscroll The \axiomType{GenerateUnivariatePowerSeries} package enables you to -create power series from explicit formulas for their -\eth{\axiom{n}} coefficients. -In what follows, we construct series expansions for certain -transcendental functions by giving formulas for their -coefficients. -You can also compute such series expansions directly simply by -specifying the function and the point about which the series is to -be expanded. -See +create power series from explicit formulas for their \eth{\axiom{n}} +coefficients. In what follows, we construct series expansions for +certain transcendental functions by giving formulas for their +coefficients. You can also compute such series expansions directly +simply by specifying the function and the point about which the series +is to be expanded. See \downlink{``\ugxProblemSeriesConversionsTitle''} -{ugxProblemSeriesConversionsPage} in Section -\ugxProblemSeriesConversionsNumber\ignore{ugxProblemSeriesConversions} +{ugxProblemSeriesConversionsPage} in Section +\ugxProblemSeriesConversionsNumber\ignore{ugxProblemSeriesConversions} for more information. Consider the Taylor expansion of \texht{$e^x$}{\axiom{\%e**x}} @@ -41980,20 +37881,20 @@ This is how you create this series in Axiom. } The first argument specifies a formula for the \eth{\axiom{n}} -coefficient by giving a function that maps \axiom{n} to -\axiom{1/n!}. +coefficient by giving a function that maps \axiom{n} to \axiom{1/n!}. The second argument specifies that the series is to be expanded in -powers of \axiom{(x - 0)}, that is, in powers of \axiom{x}. -Since we did not specify an initial degree, the first term in the -series was the term of degree 0 (the constant term). -Note that the formula was given as an anonymous function. -These are discussed in \downlink{``\ugUserAnonTitle''}{ugUserAnonPage} -in Section \ugUserAnonNumber\ignore{ugUserAnon}. +powers of \axiom{(x - 0)}, that is, in powers of \axiom{x}. Since we +did not specify an initial degree, the first term in the series was +the term of degree 0 (the constant term). Note that the formula was +given as an anonymous function. These are discussed in +\downlink{``\ugUserAnonTitle''}{ugUserAnonPage} in Section +\ugUserAnonNumber\ignore{ugUserAnon}. Consider the Taylor expansion of \axiom{log x} about \axiom{x = 1}: \texht{\narrowDisplay{% \begin{array}{ccl} -\log(x) &=& \displaystyle (x - 1) - \frac{(x - 1)^2}{2} + \frac{(x - 1)^3}{3} - \cdots \\ \\ +\log(x) &=& \displaystyle (x - 1) - \frac{(x - 1)^2}{2} + +\frac{(x - 1)^3}{3} - \cdots \\ \\ &=& \displaystyle\sum_{n = 1}^\infty (-1)^{n-1} \frac{(x - 1)^n}{n} \end{array}}% }{ @@ -42025,14 +37926,11 @@ Here every other coefficient is zero and we would like to give an explicit formula only for the odd Taylor coefficients. % \xtc{ -This is one way to do it. -The third argument, \axiom{1..}, specifies that the first term to be computed -is the term of degree 1. -The fourth argument, \axiom{2}, specifies that we -increment by \axiom{2} to find the degrees of -subsequent terms, that is, the next -term -is of degree \axiom{1 + 2}, the next of degree \axiom{1 + 2 + 2}, etc. +This is one way to do it. The third argument, \axiom{1..}, specifies +that the first term to be computed is the term of degree 1. The +fourth argument, \axiom{2}, specifies that we increment by \axiom{2} +to find the degrees of subsequent terms, that is, the next term is of +degree \axiom{1 + 2}, the next of degree \axiom{1 + 2 + 2}, etc. }{ \spadpaste{series(n +-> (-1)**((n-1)/2)/factorial(n),x = 0,1..,2)} } @@ -42051,7 +37949,9 @@ This yields the Laurent expansion of \axiom{csc(x)} at \axiom{x = 0}. % }{ -\spadpaste{cscx := series(n +-> (-1)**((n-1)/2) * 2 * (2**n-1) * bernoulli(numer(n+1)) / factorial(n+1), x=0, -1..,2) \bound{cscx}} +\spadpaste{cscx := +series(n +-> (-1)**((n-1)/2) * 2 * (2**n-1) * bernoulli(numer(n+1)) +/ factorial(n+1), x=0, -1..,2) \bound{cscx}} } \xtc{ Of course, the reciprocal of this power series is the Taylor expansion @@ -42064,7 +37964,8 @@ of \axiom{sin(x)}. As a final example, here is the Taylor expansion of \axiom{asin(x)} about \axiom{x = 0}. }{ -\spadpaste{asinx := series(n +-> binomial(n-1,(n-1)/2)/(n*2**(n-1)),x=0,1..,2) \bound{asinx}} +\spadpaste{asinx := series(n +-> binomial(n-1,(n-1)/2)/(n*2**(n-1)), +x=0,1..,2) \bound{asinx}} } \xtc{ When we compute the \axiom{sin} of this series, we get \axiom{x} @@ -42087,18 +37988,11 @@ You can't go wrong using \axiomFun{series}, though. \end{page} @ +\pagehead{ugxProblemSeriesSubstitutePage}{ug08.ht} +{Substituting Numerical Values in Power Series} <>= -\newcommand{\ugxProblemSeriesSubstituteTitle}{Substituting Numerical Values in Power Series} -\newcommand{\ugxProblemSeriesSubstituteNumber}{8.9.7.} - -@ -\section{Substituting Numerical Values in Power Series} -\label{ugxProblemSeriesSubstitutePage} -\index{pages!ugxProblemSeriesSubstitutePage!ug08.ht} -\index{ug08.ht!pages!ugxProblemSeriesSubstitutePage} -\index{ugxProblemSeriesSubstitutePage!ug08.ht!pages} -<>= -\begin{page}{ugxProblemSeriesSubstitutePage}{8.9.7. Substituting Numerical Values in Power Series} +\begin{page}{ugxProblemSeriesSubstitutePage} +{8.9.7. Substituting Numerical Values in Power Series} \beginscroll Use \axiomFunFrom{eval}{UnivariatePowerSeriesCategory} @@ -42126,16 +38020,8 @@ The result is a sequence of the partial sums. \end{page} @ -<>= -\newcommand{\ugxProblemSeriesBernoulliTitle}{Example: Bernoulli Polynomials and Sums of Powers} -\newcommand{\ugxProblemSeriesBernoulliNumber}{8.9.8.} - -@ -\section{Example: Bernoulli Polynomials and Sums of Powers} -\label{ugxProblemSeriesBernoulliPage} -\index{pages!ugxProblemSeriesBernoulliPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemSeriesBernoulliPage} -\index{ugxProblemSeriesBernoulliPage!ug08.ht!pages} +\pagehead{ugxProblemSeriesBernoulliPage}{ug08.ht} +{Example: Bernoulli Polynomials and Sums of Powers} <>= \begin{page}{ugxProblemSeriesBernoulliPage} {8.9.8. Example: Bernoulli Polynomials and Sums of Powers} @@ -42198,17 +38084,16 @@ in \axiom{x}. }{ \spadpaste{ff := taylor(f,t = 0) \free{f set} \bound{ff}} } -% + In fact, the \eth{\axiom{n}} coefficient in this series is essentially -the \eth{\axiom{n}} Bernoulli polynomial: -the \eth{\axiom{n}} coefficient of the series is -\texht{${1 \over {n!}} B_n(x)$}{\axiom{1/n! * Bn(x)}}, where -\texht{$B_n(x)$}{\axiom{Bn(x)}} -is the \eth{\axiom{n}} Bernoulli polynomial. -Thus, to obtain the \eth{\axiom{n}} Bernoulli polynomial, we multiply -the \eth{\axiom{n}} coefficient -of the series \axiom{ff} by \axiom{n!}. -% +the \eth{\axiom{n}} Bernoulli polynomial: the \eth{\axiom{n}} +coefficient of the series is +\texht{${1 \over {n!}} B_n(x)$}{\axiom{1/n! * Bn(x)}}, +where \texht{$B_n(x)$}{\axiom{Bn(x)}} +is the \eth{\axiom{n}} Bernoulli polynomial. Thus, to obtain the +\eth{\axiom{n}} Bernoulli polynomial, we multiply the \eth{\axiom{n}} +coefficient of the series \axiom{ff} by \axiom{n!}. + \xtc{ For example, the sixth Bernoulli polynomial is this. }{ @@ -42275,7 +38160,8 @@ After cancellation, the sum is simply B_n(a))$}{\axiom{1/n * (Bn(b + 1) - Bn(a))}}. Replacing \axiom{n} by \axiom{n + 1}, we have shown that -\centerline{{\axiom{sum(m = a..b,m ** n) = 1/(n + 1) * (B(b + 1) - B(a))}.}} +\centerline{{\axiom{sum(m = a..b,m ** n) = 1/(n + 1) * +(B(b + 1) - B(a))}.}} Let's use this to obtain the formula for the sum of fourth powers. \xtc{ @@ -42308,26 +38194,11 @@ first \texht{$k$}{\axiom{k}} 20th powers. \end{page} @ -<>= -\newcommand{\ugProblemDEQTitle}{Solution of Differential Equations} -\newcommand{\ugProblemDEQNumber}{8.10.} - -@ -\section{Solution of Differential Equations} -\label{ugProblemDEQPage} -\begin{itemize} -\item ugProblemLinPolEqnPage \ref{ugProblemLinPolEqnPage} on -page~\pageref{ugProblemLinPolEqnPage} -\item ugxProblemLDEQClosedPage \ref{ugxProblemLDEQClosedPage} on -page~\pageref{ugxProblemLDEQClosedPage} -\item ugxProblemNLDEQClosedPage \ref{ugxProblemNLDEQClosedPage} on -page~\pageref{ugxProblemNLDEQClosedPage} -\item ugxProblemDEQSeriesPage \ref{ugxProblemDEQSeriesPage} on -page~\pageref{ugxProblemDEQSeriesPage} -\end{itemize} -\index{pages!ugProblemDEQPage!ug08.ht} -\index{ug08.ht!pages!ugProblemDEQPage} -\index{ugProblemDEQPage!ug08.ht!pages} +\pagehead{ugProblemDEQPage}{ug08.ht}{Solution of Differential Equations} +\pageto{notitle}{ugProblemLinPolEqnPage} +\pageto{notitle}{ugxProblemLDEQClosedPage} +\pageto{notitle}{ugxProblemNLDEQClosedPage} +\pageto{notitle}{ugxProblemDEQSeriesPage} <>= \begin{page}{ugProblemDEQPage}{8.10. Solution of Differential Equations} \beginscroll @@ -42367,29 +38238,20 @@ Section \ugProblemLinPolEqnNumber\ignore{ugProblemLinPolEqn}. \end{page} @ -<>= -\newcommand{\ugxProblemLDEQClosedTitle}{Closed-Form Solutions of Linear Differential Equations} -\newcommand{\ugxProblemLDEQClosedNumber}{8.10.1.} - -@ -\section{Closed-Form Solutions of Linear Differential Equations} -\label{ugxProblemLDEQClosedPage} -\index{pages!ugxProblemLDEQClosedPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemLDEQClosedPage} -\index{ugxProblemLDEQClosedPage!ug08.ht!pages} +\pagehead{ugxProblemLDEQClosedPage}{ug08.ht} +{Closed-Form Solutions of Linear Differential Equations} <>= \begin{page}{ugxProblemLDEQClosedPage} {8.10.1. Closed-Form Solutions of Linear Differential Equations} \beginscroll -A {\it differential equation} is an equation involving an unknown {\it -function} and one or more of its derivatives. -The equation is called {\it ordinary} if derivatives with respect to -only one dependent variable appear in the equation (it is called {\it -partial} otherwise). -The package \axiomType{ElementaryFunctionODESolver} provides the -top-level operation \spadfun {solve} for finding closed-form solutions -of ordinary differential equations. +A {\it differential equation} is an equation involving an unknown +{\it function} and one or more of its derivatives. The equation is +called {\it ordinary} if derivatives with respect to only one dependent +variable appear in the equation (it is called {\it partial} +otherwise). The package \axiomType{ElementaryFunctionODESolver} +provides the top-level operation \spadfun {solve} for finding +closed-form solutions of ordinary differential equations. To solve a differential equation, you must first create an operator for the unknown function. @@ -42451,8 +38313,8 @@ parameter instead of the dependent variable, and add a fourth parameter consisting of the list of values \axiom{y(a), y'(a), ...}. \xtc{ -To find the solution of \axiom{y'' + y = 0} satisfying \axiom{y(0) = y'(0) = 1}, -do this. +To find the solution of \axiom{y'' + y = 0} satisfying \axiom{y(0) = +y'(0) = 1}, do this. }{ \spadpaste{deq := D(y x, x, 2) + y x \bound{e2}\free{y}} } @@ -42463,17 +38325,17 @@ You can omit the \axiom{= 0} when you enter the equation to be solved. } % -Axiom is not limited to linear differential equations with -constant coefficients. -It can also find solutions when the coefficients are rational or -algebraic functions of the dependent variable. +Axiom is not limited to linear differential equations with constant +coefficients. It can also find solutions when the coefficients are +rational or algebraic functions of the dependent variable. Furthermore, Axiom is not limited by the order of the equation. -% + \xtc{ Axiom can solve the following third order equations with polynomial coefficients. }{ -\spadpaste{deq := x**3 * D(y x, x, 3) + x**2 * D(y x, x, 2) - 2 * x * D(y x, x) + 2 * y x = 2 * x**4 \bound{e3}\free{y}} +\spadpaste{deq := x**3 * D(y x, x, 3) + x**2 * D(y x, x, 2) - 2 * +x * D(y x, x) + 2 * y x = 2 * x**4 \bound{e3}\free{y}} } \xtc{ }{ @@ -42484,20 +38346,22 @@ polynomial coefficients. \xtc{ Here we are solving a homogeneous equation. }{ -\spadpaste{deq := (x**9+x**3) * D(y x, x, 3) + 18 * x**8 * D(y x, x, 2) - 90 * x * D(y x, x) - 30 * (11 * x**6 - 3) * y x \bound{e4}\free{y}} +\spadpaste{deq := (x**9+x**3) * D(y x, x, 3) + 18 * x**8 * +D(y x, x, 2) - 90 * x * D(y x, x) - 30 * (11 * x**6 - 3) * y x +\bound{e4}\free{y}} } \xtc{ }{ \spadpaste{solve(deq, y, x) \free{e4}\free{y}} } -% + On the other hand, and in contrast with the operation -\axiomFun{integrate}, it can happen that Axiom finds no solution -and that some closed-form solution still exists. -While it is mathematically complicated to describe exactly when the -solutions are guaranteed to be found, the following statements are -correct and form good guidelines for linear ordinary differential -equations: +\axiomFun{integrate}, it can happen that Axiom finds no solution and +that some closed-form solution still exists. While it is +mathematically complicated to describe exactly when the solutions are +guaranteed to be found, the following statements are correct and form +good guidelines for linear ordinary differential equations: + \begin{items} \item If the coefficients are constants, Axiom finds a complete basis of solutions (i,e, all solutions). @@ -42514,7 +38378,8 @@ guaranteed that the algebraic function solutions will be found. \xtc{ This is an example where all the algebraic solutions are found. }{ -\spadpaste{deq := (x**2 + 1) * D(y x, x, 2) + 3 * x * D(y x, x) + y x = 0 \bound{e5}\free{y}} +\spadpaste{deq := (x**2 + 1) * D(y x, x, 2) + 3 * x * +D(y x, x) + y x = 0 \bound{e5}\free{y}} } \xtc{ }{ @@ -42526,19 +38391,11 @@ This is an example where all the algebraic solutions are found. \end{page} @ -<>= -\newcommand{\ugxProblemNLDEQClosedTitle}{Closed-Form Solutions of Non-Linear Differential Equations} -\newcommand{\ugxProblemNLDEQClosedNumber}{8.10.2.} - -@ -\section{Closed-Form Solutions of Non-Linear Differential Equations} -\label{ugxProblemNLDEQClosedPage} -\index{pages!ugxProblemNLDEQClosedPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemNLDEQClosedPage} -\index{ugxProblemNLDEQClosedPage!ug08.ht!pages} +\pagehead{ugxProblemNLDEQClosedPage}{ug08.ht} +{Closed-Form Solutions of Non-Linear DEs} <>= \begin{page}{ugxProblemNLDEQClosedPage} -{8.10.2. Closed-Form Solutions of Non-Linear Differential Equations} +{8.10.2. Closed-Form Solutions of Non-Linear DEs} \beginscroll This is an example that shows how to solve a non-linear @@ -42658,8 +38515,8 @@ All we want is to find \axiom{h(y)} such that } % \xtc{ -The above particular solution is the \axiom{h(y)} we want, so we just replace -\axiom{h(y)} by it in the implicit solution. +The above particular solution is the \axiom{h(y)} we want, so we just +replace \axiom{h(y)} by it in the implicit solution. }{ \spadpaste{eval(sol, h y = nsol.particular) \free{sol h nsol}} } @@ -42677,7 +38534,8 @@ First define \axiom{y} to be an operator. \xtc{ Next we create the differential equation. }{ -\spadpaste{deq := D(y x, x) = y(x) / (x + y(x) * log y x) \bound{deqi}\free{y}} +\spadpaste{deq := D(y x, x) = y(x) / (x + y(x) * log y x) +\bound{deqi}\free{y}} } \xtc{ Finally, we solve it. @@ -42690,16 +38548,8 @@ Finally, we solve it. \end{page} @ -<>= -\newcommand{\ugxProblemDEQSeriesTitle}{Power Series Solutions of Differential Equations} -\newcommand{\ugxProblemDEQSeriesNumber}{8.10.3.} - -@ -\section{Power Series Solutions of Differential Equations} -\label{ugxProblemDEQSeriesPage} -\index{pages!ugxProblemDEQSeriesPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemDEQSeriesPage} -\index{ugxProblemDEQSeriesPage!ug08.ht!pages} +\pagehead{ugxProblemDEQSeriesPage}{ug08.ht} +{Power Series Solutions of Differential Equations} <>= \begin{page}{ugxProblemDEQSeriesPage} {8.10.3. Power Series Solutions of Differential Equations} @@ -42735,7 +38585,8 @@ that the symbol \axiom{'y} denotes a new operator. Enter the differential equation using \axiom{y} like any system function. }{ -\spadpaste{eq := D(y(x), x, 3) - sin(D(y(x), x, 2))*exp(y(x)) = cos(x)\bound{eq}\free{y}} +\spadpaste{eq := D(y(x), x, 3) - sin(D(y(x), x, 2))*exp(y(x)) = +cos(x)\bound{eq}\free{y}} } % \xtc{ @@ -42772,7 +38623,8 @@ Notice that since we give the unknowns in the order \axiom{[x, y]}, the answer is a list of two series in the order \axiom{[series for x(t), series for y(t)]}. }{ -\spadpaste{seriesSolve([eq2, eq1], [x, y], t = 0, [y(0) = 1, x(0) = 0])\free{x}\free{y}\free{eq1}\free{eq2}\free{c7}} +\spadpaste{seriesSolve([eq2, eq1], [x, y], t = 0, +[y(0) = 1, x(0) = 0])\free{x}\free{y}\free{eq1}\free{eq2}\free{c7}} } \noindent The order in which we give the @@ -42784,34 +38636,15 @@ the solution. \end{page} @ -<>= -\newcommand{\ugProblemFiniteTitle}{Finite Fields} -\newcommand{\ugProblemFiniteNumber}{8.11.} - -@ -\section{Finite Fields} -\label{ugProblemFinitePage} -\begin{itemize} -\item ugxProblemFinitePrimePage \ref{ugxProblemFinitePrimePage} on -page~\pageref{ugxProblemFinitePrimePage} -\item ugxProblemFinitePrimePage \ref{ugxProblemFinitePrimePage} on -page~\pageref{ugxProblemFinitePrimePage} -\item ugxProblemFiniteExtensionFinitePage \ref{ugxProblemFiniteExtensionFinitePage} on -page~\pageref{ugxProblemFiniteExtensionFinitePage} -\item ugxProblemFiniteModulusPage \ref{ugxProblemFiniteModulusPage} on -page~\pageref{ugxProblemFiniteModulusPage} -\item ugxProblemFiniteCyclicPage \ref{ugxProblemFiniteCyclicPage} on -page~\pageref{ugxProblemFiniteCyclicPage} -\item ugxProblemFiniteNormalPage \ref{ugxProblemFiniteNormalPage} on -page~\pageref{ugxProblemFiniteNormalPage} -\item ugxProblemFiniteConversionPage \ref{ugxProblemFiniteConversionPage} on -page~\pageref{ugxProblemFiniteConversionPage} -\item ugxProblemFiniteUtilityPage \ref{ugxProblemFiniteUtilityPage} on -page~\pageref{ugxProblemFiniteUtilityPage} -\end{itemize} -\index{pages!ugProblemFinitePage!ug08.ht} -\index{ug08.ht!pages!ugProblemFinitePage} -\index{ugProblemFinitePage!ug08.ht!pages} +\pagehead{ugProblemFinitePage}{ug08.ht}{Finite Fields} +\pageto{notitle}{ugxProblemFinitePrimePage} +\pageto{notitle}{ugxProblemFinitePrimePage} +\pageto{notitle}{ugxProblemFiniteExtensionFinitePage} +\pageto{notitle}{ugxProblemFiniteModulusPage} +\pageto{notitle}{ugxProblemFiniteCyclicPage} +\pageto{notitle}{ugxProblemFiniteNormalPage} +\pageto{notitle}{ugxProblemFiniteConversionPage} +\pageto{notitle}{ugxProblemFiniteUtilityPage} <>= \begin{page}{ugProblemFinitePage}{8.11. Finite Fields} \beginscroll @@ -42823,8 +38656,9 @@ under the same laws (for example, commutativity, associativity or distributivity) as apply to the rational, real or complex numbers. Unlike those three fields, for any finite field there exists a positive prime integer \smath{p}, called the -\axiomFun{characteristic}, such that \texht{$p \: x = 0$}{\axiom{p * -x = 0}} for any element \smath{x} in the finite field. +\axiomFun{characteristic}, such that +\texht{$p \: x = 0$}{\axiom{p * x = 0}} +for any element \smath{x} in the finite field. In fact, the number of elements in a finite field is a power of the characteristic and for each prime \smath{p} and positive integer \smath{n} there exists exactly one finite field with @@ -42853,23 +38687,24 @@ field. Finally, note that you usually need to package-call operations from finite fields if the operations do not take as an argument an object of the field. -See \downlink{``\ugTypesPkgCallTitle''}{ugTypesPkgCallPage} in Section \ugTypesPkgCallNumber\ignore{ugTypesPkgCall} for more information on -package-calling. +See \downlink{``\ugTypesPkgCallTitle''}{ugTypesPkgCallPage} in +Section \ugTypesPkgCallNumber\ignore{ugTypesPkgCall} for more +information on package-calling. \beginmenu - \menudownlink{{8.11.1. Modular Arithmetic and Prime Fields}} +\menudownlink{{8.11.1. Modular Arithmetic and Prime Fields}} {ugxProblemFinitePrimePage} - \menudownlink{{8.11.2. Extensions of Finite Fields}} +\menudownlink{{8.11.2. Extensions of Finite Fields}} {ugxProblemFiniteExtensionFinitePage} - \menudownlink{{8.11.3. Irreducible Modulus Polynomial Representations}} +\menudownlink{{8.11.3. Irreducible Modulus Polynomial Representations}} {ugxProblemFiniteModulusPage} - \menudownlink{{8.11.4. Cyclic Group Representations}} +\menudownlink{{8.11.4. Cyclic Group Representations}} {ugxProblemFiniteCyclicPage} - \menudownlink{{8.11.5. Normal Basis Representations}} +\menudownlink{{8.11.5. Normal Basis Representations}} {ugxProblemFiniteNormalPage} - \menudownlink{{8.11.6. Conversion Operations for Finite Fields}} +\menudownlink{{8.11.6. Conversion Operations for Finite Fields}} {ugxProblemFiniteConversionPage} - \menudownlink{{8.11.7. Utility Operations for Finite Fields}} +\menudownlink{{8.11.7. Utility Operations for Finite Fields}} {ugxProblemFiniteUtilityPage} \endmenu \endscroll @@ -42877,16 +38712,8 @@ package-calling. \end{page} @ -<>= -\newcommand{\ugxProblemFinitePrimeTitle}{Modular Arithmetic and Prime Fields} -\newcommand{\ugxProblemFinitePrimeNumber}{8.11.1.} - -@ -\section{Modular Arithmetic and Prime Fields} -\label{ugxProblemFinitePrimePage} -\index{pages!ugxProblemFinitePrimePage!ug08.ht} -\index{ug08.ht!pages!ugxProblemFinitePrimePage} -\index{ugxProblemFinitePrimePage!ug08.ht!pages} +\pagehead{ugxProblemFinitePrimePage}{ug08.ht} +{Modular Arithmetic and Prime Fields} <>= \begin{page}{ugxProblemFinitePrimePage} {8.11.1. Modular Arithmetic and Prime Fields} @@ -43029,16 +38856,8 @@ The order of a primitive element is the defining \smath{p-1}. \end{page} @ -<>= -\newcommand{\ugxProblemFiniteExtensionFiniteTitle}{Extensions of Finite Fields} -\newcommand{\ugxProblemFiniteExtensionFiniteNumber}{8.11.2.} - -@ -\section{Extensions of Finite Fields} -\label{ugxProblemFiniteExtensionFinitePage} -\index{pages!ugxProblemFiniteExtensionFinitePage!ug08.ht} -\index{ug08.ht!pages!ugxProblemFiniteExtensionFinitePage} -\index{ugxProblemFiniteExtensionFinitePage!ug08.ht!pages} +\pagehead{ugxProblemFiniteExtensionFinitePage}{ug08.ht} +{Extensions of Finite Fields} <>= \begin{page}{ugxProblemFiniteExtensionFinitePage} {8.11.2. Extensions of Finite Fields} @@ -43156,24 +38975,12 @@ of finite field extensions and include the operations exported by \end{page} @ -<>= -\newcommand{\ugxProblemFiniteModulusTitle}{Irreducible Modulus Polynomial Representations} -\newcommand{\ugxProblemFiniteModulusNumber}{8.11.3.} - -@ -\section{Irreducible Modulus Polynomial Representations} -\label{ugxProblemFiniteModulusPage} -\begin{itemize} -\item ugxProblemFiniteExtensionFinitePage -\ref{ugxProblemFiniteExtensionFinitePage} on -page~\pageref{ugxProblemFiniteExtensionFinitePage} -\end{itemize} -\index{pages!ugxProblemFiniteModulusPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemFiniteModulusPage} -\index{ugxProblemFiniteModulusPage!ug08.ht!pages} +\pagehead{ugxProblemFiniteModulusPage}{ug08.ht} +{Irreducible Mod Polynomial Representations} +\pageto{notitle}{ugxProblemFiniteExtensionFinitePage} <>= \begin{page}{ugxProblemFiniteModulusPage} -{8.11.3. Irreducible Modulus Polynomial Representations} +{8.11.3. Irreducible Mod Polynomial Representations} \beginscroll All finite field extension constructors discussed in this @@ -43186,7 +38993,8 @@ The ground field may be the prime field or one you specify. See \downlink{``\ugxProblemFiniteExtensionFiniteTitle''} {ugxProblemFiniteExtensionFinitePage} in Section -\ugxProblemFiniteExtensionFiniteNumber\ignore{ugxProblemFiniteExtensionFinite} +\ugxProblemFiniteExtensionFiniteNumber +\ignore{ugxProblemFiniteExtensionFinite} for general information about finite field extensions. For \axiomType{FiniteField} (abbreviation \axiomType{FF}) you provide a @@ -43302,7 +39110,8 @@ but is more general. } \xtc{ }{ -\spadpaste{f := nextIrreduciblePoly(random(6)\$FFPOLY(GF4))\$FFPOLY(GF4) \free{GF4}\bound{f}} +\spadpaste{f := nextIrreduciblePoly(random(6)\$FFPOLY(GF4))\$FFPOLY(GF4) +\free{GF4}\bound{f}} } \xtc{ For \axiomType{FFP} you choose both the @@ -43322,22 +39131,12 @@ The degree of the extension is the degree of the polynomial. \end{page} @ +\pagehead{ugxProblemFiniteCyclicPage}{ug08.ht} +{Cyclic Group Representations} +\pageto{notitle}{ugxProblemFiniteUtilityPage} <>= -\newcommand{\ugxProblemFiniteCyclicTitle}{Cyclic Group Representations} -\newcommand{\ugxProblemFiniteCyclicNumber}{8.11.4.} - -@ -\section{Cyclic Group Representations} -\label{ugxProblemFiniteCyclicPage} -\begin{itemize} -\item ugxProblemFiniteUtilityPage \ref{ugxProblemFiniteUtilityPage} on -page~\pageref{ugxProblemFiniteUtilityPage} -\end{itemize} -\index{pages!ugxProblemFiniteCyclicPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemFiniteCyclicPage} -\index{ugxProblemFiniteCyclicPage!ug08.ht!pages} -<>= -\begin{page}{ugxProblemFiniteCyclicPage}{8.11.4. Cyclic Group Representations} +\begin{page}{ugxProblemFiniteCyclicPage} +{8.11.4. Cyclic Group Representations} \beginscroll In every finite field there exist elements whose powers are all the @@ -43345,20 +39144,16 @@ nonzero elements of the field. Such an element is called a {\it primitive element}. In \axiomType{FiniteFieldCyclicGroup} (abbreviation \axiomType{FFCG}) -the nonzero elements are represented by the -powers of a fixed primitive -element -of the field (that is, a generator of its -cyclic multiplicative group). -Multiplication (and hence exponentiation) using this representation is easy. -To do addition, we consider our primitive element as the root of a primitive -polynomial (an irreducible polynomial whose -roots are all primitive). -See -\downlink{``\ugxProblemFiniteUtilityTitle''}{ugxProblemFiniteUtilityPage} -in Section \ugxProblemFiniteUtilityNumber\ignore{ugxProblemFiniteUtility} -for examples of how to -compute such a polynomial. +the nonzero elements are represented by the powers of a fixed +primitive element of the field (that is, a generator of its cyclic +multiplicative group). Multiplication (and hence exponentiation) +using this representation is easy. To do addition, we consider our +primitive element as the root of a primitive polynomial (an +irreducible polynomial whose roots are all primitive). See +\downlink{``\ugxProblemFiniteUtilityTitle''} +{ugxProblemFiniteUtilityPage} in Section +\ugxProblemFiniteUtilityNumber\ignore{ugxProblemFiniteUtility} for +examples of how to compute such a polynomial. % \xtc{ @@ -43423,15 +39218,14 @@ extensions. } % -\axiomType{FiniteFieldCyclicGroupExtensionByPolynomial} -(abbreviation \axiomType{FFCGP}) -is similar to \axiomType{FiniteFieldCyclicGroup} and -\axiomType{FiniteFieldCyclicGroupExtension} -but is more general. -For \axiomType{FiniteFieldCyclicGroupExtensionByPolynomial} you choose both the -ground field and the irreducible polynomial used in the representation. -The degree of the extension is the degree of the polynomial. -% +\axiomType{FiniteFieldCyclicGroupExtensionByPolynomial} (abbreviation +\axiomType{FFCGP}) is similar to \axiomType{FiniteFieldCyclicGroup} +and \axiomType{FiniteFieldCyclicGroupExtension} but is more general. +For \axiomType{FiniteFieldCyclicGroupExtensionByPolynomial} you choose +both the ground field and the irreducible polynomial used in the +representation. The degree of the extension is the degree of the +polynomial. + \xtc{ }{ \spadpaste{GF3 := PrimeField 3; \bound{GF3}} @@ -43462,22 +39256,12 @@ Let's look at a random element from this field. \end{page} @ +\pagehead{ugxProblemFiniteNormalPage}{ug08.ht} +{Normal Basis Representations} +\pageto{notitle}{ugxProblemFiniteUtilityPage} <>= -\newcommand{\ugxProblemFiniteNormalTitle}{Normal Basis Representations} -\newcommand{\ugxProblemFiniteNormalNumber}{8.11.5.} - -@ -\section{Normal Basis Representations} -\label{ugxProblemFiniteNormalPage} -\begin{itemize} -\item ugxProblemFiniteUtilityPage \ref{ugxProblemFiniteUtilityPage} on -page~\pageref{ugxProblemFiniteUtilityPage} -\end{itemize} -\index{pages!ugxProblemFiniteNormalPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemFiniteNormalPage} -\index{ugxProblemFiniteNormalPage!ug08.ht!pages} -<>= -\begin{page}{ugxProblemFiniteNormalPage}{8.11.5. Normal Basis Representations} +\begin{page}{ugxProblemFiniteNormalPage} +{8.11.5. Normal Basis Representations} \beginscroll Let \smath{K} be a finite extension of degree \smath{n} of the @@ -43508,18 +39292,16 @@ You provide a prime \smath{p} and an extension degree }{ \spadpaste{K := FFNB(3,8) \bound{K}} } -% -Axiom uses the prime field \axiomType{PrimeField(p)}, -here \axiomType{PrimeField 3}, -and it chooses a normal polynomial of degree -\smath{n}, here 8, over the ground field. -The remainder class of the indeterminate is used -as the normal element. -The polynomial indeterminate is automatically chosen by Axiom and -is typically something like \axiom{\%A} or \axiom{\%D}. -These (strange) variables are only for output display; -there are several ways to construct elements of this field. -The output of the basis elements is something like + +Axiom uses the prime field \axiomType{PrimeField(p)}, here +\axiomType{PrimeField 3}, and it chooses a normal polynomial of degree +\smath{n}, here 8, over the ground field. The remainder class of the +indeterminate is used as the normal element. The polynomial +indeterminate is automatically chosen by Axiom and is typically +something like \axiom{\%A} or \axiom{\%D}. These (strange) variables +are only for output display; there are several ways to construct +elements of this field. The output of the basis elements is something +like \texht{$\%A^{q^i}.$}{ \begin{verbatim} i @@ -43540,14 +39322,15 @@ You can calculate in \smath{K} using \smath{a}. \spadpaste{b := a**12 - a**5 + a \bound{b}\free{a}} } -\axiomType{FiniteFieldNormalBasisExtension} (abbreviation -\axiomType{FFNBX}) is -similar to \axiomType{FiniteFieldNormalBasis} except that the -groundfield for \axiomType{FiniteFieldNormalBasisExtension} is arbitrary and -chosen by you. -In case you select the prime field as ground field, there is -essentially no difference between the constructed two finite field +\axiomType{FiniteFieldNormalBasisExtension} +(abbreviation \axiomType{FFNBX}) is similar to +\axiomType{FiniteFieldNormalBasis} +except that the groundfield for +\axiomType{FiniteFieldNormalBasisExtension} is arbitrary and chosen +by you. In case you select the prime field as ground field, there +is essentially no difference between the constructed two finite field extensions. + \xtc{ }{ \spadpaste{GF9 := FFNB(3,2); \bound{GF9}} @@ -43612,21 +39395,9 @@ Let's look at a random element from this field. \end{page} @ -<>= -\newcommand{\ugxProblemFiniteConversionTitle}{Conversion Operations for Finite Fields} -\newcommand{\ugxProblemFiniteConversionNumber}{8.11.6.} - -@ -\section{Conversion Operations for Finite Fields} -\label{ugxProblemFiniteConversionPage} -\begin{itemize} -\item ugxProblemFiniteExtensionFinitePage -\ref{ugxProblemFiniteExtensionFinitePage} on -page~\pageref{ugxProblemFiniteExtensionFinitePage} -\end{itemize} -\index{pages!ugxProblemFiniteConversionPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemFiniteConversionPage} -\index{ugxProblemFiniteConversionPage!ug08.ht!pages} +\pagehead{ugxProblemFiniteConversionPage}{ug08.ht} +{Conversion Operations for Finite Fields} +\pageto{notitle}{ugxProblemFiniteExtensionFinitePage} <>= \begin{page}{ugxProblemFiniteConversionPage} {8.11.6. Conversion Operations for Finite Fields} @@ -43734,7 +39505,8 @@ representation is 0 plus the cyclic multiplicative group and } \xtc{ }{ -\spadpaste{(a1,b1) := (random()\$Km,random()\$Km) \bound{a12 b12}\free{Km2}} +\spadpaste{(a1,b1) := (random()\$Km,random()\$Km) +\bound{a12 b12}\free{Km2}} } \xtc{ }{ @@ -43760,17 +39532,8 @@ Check the arithmetic again. \end{page} @ -<>= -\newcommand{\ugxProblemFiniteUtilityTitle} +\pagehead{ugxProblemFiniteUtilityPage}{ug08.ht} {Utility Operations for Finite Fields} -\newcommand{\ugxProblemFiniteUtilityNumber}{8.11.7.} - -@ -\section{Utility Operations for Finite Fields} -\label{ugxProblemFiniteUtilityPage} -\index{pages!ugxProblemFiniteUtilityPage!ug08.ht} -\index{ug08.ht!pages!ugxProblemFiniteUtilityPage} -\index{ugxProblemFiniteUtilityPage!ug08.ht!pages} <>= \begin{page}{ugxProblemFiniteUtilityPage} {8.11.7. Utility Operations for Finite Fields} @@ -44045,63 +39808,53 @@ and then an extension field. \xtc{ We construct an irreducible polynomial over \axiom{GF2}. }{ -\spadpaste{f := createIrreduciblePoly(6)\$FFPOLY(GF2) \bound{fz}\free{GF2}} +\spadpaste{f := createIrreduciblePoly(6)\$FFPOLY(GF2) +\bound{fz}\free{GF2}} } % % \xtc{ We compute a root of \axiom{f}. }{ -\spadpaste{root := rootOfIrreduciblePoly(f)\$FFPOLY2(F,GF2) \free{F GF2 fz}\bound{root}} +\spadpaste{root := rootOfIrreduciblePoly(f)\$FFPOLY2(F,GF2) +\free{F GF2 fz}\bound{root}} } % %and check the result %\spadcommand{eval(f, monomial(1,1)\$SUP(F) = root) \free{fz F root}} -%********************************************************************* \endscroll \autobuttons \end{page} -@ -<>= -\newcommand{\ugProblemIdealTitle}{Primary Decomposition of Ideals} -\newcommand{\ugProblemIdealNumber}{8.12.} +@ \pagehead{ugProblemIdealPage}{ug08.ht} +{Primary Decomposition of Ideals} +<>= +\begin{page}{ugProblemIdealPage}{8.12. Primary Decomposition of Ideals} +\beginscroll -@ -\section{Primary Decomposition of Ideals} -\label{ugProblemIdealPage} -\index{pages!ugProblemIdealPage!ug08.ht} -\index{ug08.ht!pages!ugProblemIdealPage} -\index{ugProblemIdealPage!ug08.ht!pages} -<>= -\begin{page}{ugProblemIdealPage}{8.12. Primary Decomposition of Ideals} -\beginscroll -%********************************************************************* -% -Axiom provides a facility for the primary decomposition -of -polynomial ideals over fields of characteristic zero. -The algorithm -%is discussed in \cite{gtz:gbpdpi} and -works in essentially two steps: -\indent{4} -\beginitems +Axiom provides a facility for +the primary decomposition of polynomial ideals over fields of +characteristic zero. The algorithm +and works in essentially two steps: +\indent{4} +\beginitems \item[1. ] the problem is solved for 0-dimensional ideals by ``generic'' -projection on the last coordinate -\item[2. ] a ``reduction process'' uses localization and ideal quotients -to reduce the general case to the 0-dimensional one. -\enditems -\indent{0} -The Axiom constructor \axiomType{PolynomialIdeals} -represents ideals with coefficients in any field and -supports the basic ideal operations, -including intersection, sum and quotient. -\axiomType{IdealDecompositionPackage} contains the specific -operations for the primary decomposition and the computation of the -radical of an ideal with polynomial -coefficients in a field of characteristic 0 with -an effective algorithm for factoring polynomials. +projection on the last coordinate +\item[2. ] a ``reduction process'' +uses localization and ideal quotients to reduce the general case to +the 0-dimensional one. +\enditems +\indent{0} + +The Axiom constructor +\axiomType{PolynomialIdeals} represents ideals with coefficients in +any field and supports the basic ideal operations, including +intersection, sum and quotient. \axiomType{IdealDecompositionPackage} +contains the specific operations for the primary decomposition and the +computation of the radical of an ideal with polynomial coefficients in +a field of characteristic 0 with an effective algorithm for factoring +polynomials. The following examples illustrate the capabilities of this facility. % @@ -44200,22 +39953,9 @@ Their intersection is equal to the radical of the ideal of \axiom{l}. \end{page} @ -<>= -\newcommand{\ugProblemGaloisTitle}{Computation of Galois Groups} -\newcommand{\ugProblemGaloisNumber}{8.13.} - -@ -\section{Computation of Galois Groups} -\label{ugProblemGaloisPage} -\begin{itemize} -\item FactoredXmpPage \ref{FactoredXmpPage} on -page~\pageref{FactoredXmpPage} -\item ugAvailCLEFPage \ref{ugAvailCLEFPage} on -page~\pageref{ugAvailCLEFPage} -\end{itemize} -\index{pages!ugProblemGaloisPage!ug08.ht} -\index{ug08.ht!pages!ugProblemGaloisPage} -\index{ugProblemGaloisPage!ug08.ht!pages} +\pagehead{ugProblemGaloisPage}{ug08.ht}{Computation of Galois Groups} +\pageto{notitle}{FactoredXmpPage} +\pageto{notitle}{ugAvailCLEFPage} <>= \begin{page}{ugProblemGaloisPage}{8.13. Computation of Galois Groups} \beginscroll @@ -44289,21 +40029,19 @@ Factor the polynomial \axiom{q1}. }{ \spadpaste{factoredQ := factor q1 \free{q1} \bound{factoredQ}} } -% -We see that \axiom{q1} has two irreducible factors, each of degree \axiom{10}. -(The fact that the polynomial \axiom{q1} has two factors of -degree \axiom{10} is enough to show -that the Galois group of \smath{p(x)} is the dihedral group of -order \axiom{10}.\footnote{See McKay, Soicher, Computing Galois Groups -over the Rationals, Journal of Number Theory 20, 273-281 (1983). -We do not assume the results of this paper, however, and we continue with -the computation.} -Note that the type of \axiom{factoredQ} is \axiomType{FR POLY INT}, that is, -\axiomType{Factored Polynomial Integer}. -This is a special data type for recording factorizations of polynomials with -integer coefficients (see \downlink{`Factored'}{FactoredXmpPage} -\ignore{Factored}). -% + +We see that \axiom{q1} has two irreducible factors, each of degree +\axiom{10}. (The fact that the polynomial \axiom{q1} has two factors +of degree \axiom{10} is enough to show that the Galois group of +\smath{p(x)} is the dihedral group of order \axiom{10}.\footnote{See +McKay, Soicher, Computing Galois Groups over the Rationals, Journal of +Number Theory 20, 273-281 (1983). We do not assume the results of +this paper, however, and we continue with the computation.} Note that +the type of \axiom{factoredQ} is \axiomType{FR POLY INT}, that is, +\axiomType{Factored Polynomial Integer}. This is a special data type +for recording factorizations of polynomials with integer coefficients +(see \downlink{`Factored'}{FactoredXmpPage} \ignore{Factored}). + \xtc{ We can access the individual factors using the operation \axiomFunFrom{nthFactor}{Factored}. @@ -44344,7 +40082,8 @@ Factor \smath{p(x)} over the field \texht{${\bf Q}(\beta)$}{\axiom{Q(beta)}}. (This computation will take some time!) }{ -\spadpaste{algFactors := factor(p,[beta]) \free{declareP beta} \bound{algFactors}} +\spadpaste{algFactors := factor(p,[beta]) \free{declareP beta} +\bound{algFactors}} } % When factoring over number fields, it is important to specify the @@ -44389,7 +40128,8 @@ variables. We can obtain an individual root by negating the constant coefficient of one of the factors of \smath{p(x)}. }{ -\spadpaste{factor1 := nthFactor(algFactors,1) \free{algFactors} \bound{factor1}} +\spadpaste{factor1 := nthFactor(algFactors,1) \free{algFactors} +\bound{factor1}} } \xtc{ }{ @@ -44400,7 +40140,9 @@ one of the factors of \smath{p(x)}. \xtc{ We can obtain a list of all the roots in this way. }{ -\spadpaste{roots := [-coefficient(nthFactor(algFactors,i),0) for i in 1..5] \free{algFactors} \bound{roots}} +\spadpaste{ +roots := [-coefficient(nthFactor(algFactors,i),0) for i in 1..5] +\free{algFactors} \bound{roots}} } The expression @@ -44414,29 +40156,27 @@ roots of \smath{p(x)} as \axiom{i} ranges from \axiom{1} to \axiom{5}. \xtc{ Assign the roots as the values of the variables \axiom{a1,...,a5}. }{ -\spadpaste{(a1,a2,a3,a4,a5) := (roots.1,roots.2,roots.3,roots.4,roots.5) \free{roots} \bound{ais}} +\spadpaste{ +(a1,a2,a3,a4,a5) := (roots.1,roots.2,roots.3,roots.4,roots.5) +\free{roots} \bound{ais}} } % Next we express the roots of \smath{r(x)} as polynomials in -\axiom{beta}. -We could obtain these roots by calling the operation \axiomFun{factor}: -\axiom{factor(r, [beta])} factors \axiom{r(x)} over -\texht{${\bf Q}(\beta)$}{\axiom{Q(beta)}}. -However, this is a lengthy computation and we can obtain the roots of -\smath{r(x)} as differences of the roots \axiom{a1,...,a5} of -\smath{p(x)}. -Only ten of these differences are roots of \smath{r(x)} and the -other ten are roots -of the other irreducible factor of \axiom{q1}. -We can determine if a given value is a root of \smath{r(x)} by evaluating -\smath{r(x)} at that particular value. -(Of course, the order in which factors are returned by the -operation \axiomFun{factor} -is unimportant and may change with different implementations of the operation. -Therefore, we cannot predict in advance which differences are roots of -\smath{r(x)} and which are not.) -% +\axiom{beta}. We could obtain these roots by calling the operation +\axiomFun{factor}: \axiom{factor(r, [beta])} factors \axiom{r(x)} over +\texht{${\bf Q}(\beta)$}{\axiom{Q(beta)}}. However, this is a lengthy +computation and we can obtain the roots of \smath{r(x)} as differences +of the roots \axiom{a1,...,a5} of \smath{p(x)}. Only ten of these +differences are roots of \smath{r(x)} and the other ten are roots of +the other irreducible factor of \axiom{q1}. We can determine if a +given value is a root of \smath{r(x)} by evaluating \smath{r(x)} at +that particular value. (Of course, the order in which factors are +returned by the operation \axiomFun{factor} is unimportant and may +change with different implementations of the operation. Therefore, we +cannot predict in advance which differences are roots of \smath{r(x)} +and which are not.) + \xtc{ Let's look at four examples (two are roots of \smath{r(x)} and two are not). @@ -44495,12 +40235,12 @@ under this automorphism: \spadpaste{aa5 := subst(a5,beta = bb) \free{beta bb ais} \bound{aa5}} } % -Of course, the values \axiom{aa1,...,aa5} are simply a permutation of the values -\axiom{a1,...,a5}. +Of course, the values \axiom{aa1,...,aa5} are simply a permutation +of the values \axiom{a1,...,a5}. % \xtc{ -Let's find the value of \axiom{aa1} (execute as many of the following five commands -as necessary). +Let's find the value of \axiom{aa1} (execute as many of the +following five commands as necessary). }{ \spadpaste{(aa1 = a1) :: Boolean \free{aa1}} } @@ -44520,17 +40260,16 @@ as necessary). }{ \spadpaste{(aa1 = a5) :: Boolean \free{aa1}} } -% + Proceeding in this fashion, you can find the values of -\axiom{aa2,...aa5}.\footnote{Here you should use the -\Clef{} line editor. -See \downlink{``\ugAvailCLEFTitle''}{ugAvailCLEFPage} in Section -\ugAvailCLEFNumber\ignore{ugAvailCLEF} for more information about \Clef{}.} -You have represented the automorphism \axiom{beta -> bb} -as a permutation of the roots \axiom{a1,...,a5}. -If you wish, you can repeat this computation for all the roots of -\smath{r(x)} and represent the Galois group of -\smath{p(x)} as a subgroup of the symmetric group on five letters. +\axiom{aa2,...aa5}.\footnote{Here you should use the \Clef{} line +editor. See \downlink{``\ugAvailCLEFTitle''}{ugAvailCLEFPage} in +Section \ugAvailCLEFNumber\ignore{ugAvailCLEF} for more information +about \Clef{}.} You have represented the automorphism \axiom{beta -> +bb} as a permutation of the roots \axiom{a1,...,a5}. If you wish, you +can repeat this computation for all the roots of \smath{r(x)} and +represent the Galois group of \smath{p(x)} as a subgroup of the +symmetric group on five letters. Here are two other problems that you may attack in a similar fashion: \indent{4} @@ -44557,23 +40296,12 @@ isomorphic to \texht{$S_3,$}{} the symmetric group on three letters. \end{page} @ -<>= -\newcommand{\ugProblemGeneticTitle}{Non-Associative Algebras and Modelling Genetic Laws} -\newcommand{\ugProblemGeneticNumber}{8.14.} - -@ -\section{Non-Associative Algebras and Modelling Genetic Laws} -\label{ugProblemGeneticPage} -\begin{itemize} -\item OctonionXmpPage \ref{OctonionXmpPage} on -page~\pageref{OctonionXmpPage} -\end{itemize} -\index{pages!ugProblemGeneticPage!ug08.ht} -\index{ug08.ht!pages!ugProblemGeneticPage} -\index{ugProblemGeneticPage!ug08.ht!pages} +\pagehead{ugProblemGeneticPage}{ug08.ht} +{Non-Associative Algebras and Genetic Laws} +\pageto{notitle}{OctonionXmpPage} <>= \begin{page}{ugProblemGeneticPage} -{8.14. Non-Associative Algebras and Modelling Genetic Laws} +{8.14. Non-Associative Algebras and Genetic Laws} \beginscroll Many algebraic structures of mathematics and Axiom @@ -44584,15 +40312,14 @@ for all \smath{a}, \smath{b} and \smath{c}. The octonions (see \downlink{`Octonion'}{OctonionXmpPage}\ignore{Octonion}) are a well known exception. -There are many other interesting non-associative structures, such as the -class of +There are many other interesting non-associative structures, +such as the class of Lie algebras.\footnote{Two Axiom implementations of Lie algebras are \spadtype{LieSquareMatrix} and \spadtype{FreeNilpotentLie}.} -Lie algebras can be used, for example, to analyse Lie symmetry algebras of -partial differential -equations. -In this section we show a different application of non-associative algebras, -the modelling of genetic laws. +Lie algebras can be used, for example, to analyse Lie symmetry +algebras of partial differential equations. +In this section we show a different application of non-associative +algebras, the modelling of genetic laws. The Axiom library contains several constructors for creating non-assoc\-i\-a\-tive structures, @@ -44611,8 +40338,9 @@ Technical Report, IBM Heidelberg Scientific Center, 1992.} Mendel's genetic laws are often written in a form like \texht{ -\narrowDisplay{Aa \times Aa = {1\over 4}AA + {1\over 2}Aa + {1\over 4}aa.}}{ -\spad{Aa * Aa = (1/4)*AA + (1/2)*Aa + (1/4)*aa.} +\narrowDisplay{ +Aa \times Aa = {1\over 4}AA + {1\over 2}Aa + {1\over 4}aa.}} +{\spad{Aa * Aa = (1/4)*AA + (1/2)*Aa + (1/4)*aa.} } The implementation of general algebras in Axiom allows us to use this as the definition for multiplication in an algebra. @@ -44631,7 +40359,8 @@ Random mating of two gametes \texht{$a_i$}{\spad{ai}} and \texht{$a_j$}{\spad{aj}} gives zygotes \texht{$a_ia_j$}{\spad{ai aj}}, which produce new gametes. In classical Mendelian segregation we have -\texht{$a_ia_j = {1 \over 2}a_i+{1 \over 2}a_j$}{\spad{ai aj = (1/2)*ai+(1/2)*aj}}. +\texht{$a_ia_j = {1 \over 2}a_i+{1 \over 2}a_j$} +{\spad{ai aj = (1/2)*ai+(1/2)*aj}}. In general, we have \texht{\narrowDisplay{a_ia_j = \sum_{k=1}^n \gamma_{i,j}^k\ a_k.}}% {\spad{ai aj = gammaij1 a1 + gammaij2 a2 + ... + gammaijn an}} @@ -44663,7 +40392,13 @@ of four four-by-four matrices giving the segregation rates. We use the value \smath{1/10} for \smath{\theta}. }{ -\spadpaste{segregationRates : List SquareMatrix(4,FRAC INT) := [matrix [ [1, 1/2, 1/2, 9/20], [1/2, 0, 1/20, 0], [1/2, 1/20, 0, 0], [9/20, 0, 0, 0] ], matrix [ [0, 1/2, 0, 1/20], [1/2, 1, 9/20, 1/2], [0, 9/20, 0, 0], [1/20, 1/2, 0, 0] ], matrix [ [0, 0, 1/2, 1/20], [0, 0, 9/20, 0], [1/2, 9/20, 1, 1/2], [1/20, 0, 1/2, 0] ], matrix [ [0, 0, 0, 9/20], [0, 0, 1/20, 1/2], [0, 1/20, 0, 1/2], [9/20, 1/2, 1/2, 1] ] ] \bound{segregationRates}} +\spadpaste{segregationRates : List SquareMatrix(4,FRAC INT) := +[matrix [ [1, 1/2, 1/2, 9/20], [1/2, 0, 1/20, 0], [1/2, 1/20, 0, 0], +[9/20, 0, 0, 0] ], matrix [ [0, 1/2, 0, 1/20], [1/2, 1, 9/20, 1/2], +[0, 9/20, 0, 0], [1/20, 1/2, 0, 0] ], matrix [ [0, 0, 1/2, 1/20], +[0, 0, 9/20, 0], [1/2, 9/20, 1, 1/2], [1/20, 0, 1/2, 0] ], +matrix [ [0, 0, 0, 9/20], [0, 0, 1/20, 1/2], [0, 1/20, 0, 1/2], +[9/20, 1/2, 1/2, 1] ] ] \bound{segregationRates}} } \xtc{ Choose the appropriate symbols for the basis of gametes, @@ -44673,7 +40408,8 @@ Choose the appropriate symbols for the basis of gametes, \xtc{ Define the algebra. }{ -\spadpaste{A := ALGSC(FRAC INT, 4, gametes, segregationRates);\bound{A}\free{gametes, segregationRates}} +\spadpaste{A := ALGSC(FRAC INT, 4, gametes, segregationRates); +\bound{A}\free{gametes, segregationRates}} } \xtc{ @@ -44689,8 +40425,8 @@ They represent a population with the distribution of gametes reflected by the coefficients with respect to the basis of gametes. -Random mating of different populations \smath{x} and \smath{y} is described by -their product \smath{x*y}. +Random mating of different populations \smath{x} and \smath{y} +is described by their product \smath{x*y}. \xtc{ This product is commutative only @@ -44711,7 +40447,8 @@ The next generation is \smath{(x*x)*(x*x).} \xtc{ Use decimal numbers to compare the distributions more easily. }{ -\spadpaste{x : ALGSC(DECIMAL, 4, gametes, segregationRates) := convert [3/10, 1/5, 1/10, 2/5]\bound{x}\free{gametes, segregationRates}} +\spadpaste{x : ALGSC(DECIMAL, 4, gametes, segregationRates) := +convert [3/10, 1/5, 1/10, 2/5]\bound{x}\free{gametes, segregationRates}} } \xtc{ To compute directly the gametic distribution in the fifth @@ -44729,7 +40466,9 @@ This is an invariant of the algebra and it is used to answer the first question. The new indeterminates describe a symbolic distribution. }{ -\spadpaste{q := leftRankPolynomial()\$GCNAALG(FRAC INT, 4, gametes, segregationRates) :: UP(Y, POLY FRAC INT)\bound{q}\free{gametes, segregationRates}} +\spadpaste{q := leftRankPolynomial() +\$GCNAALG(FRAC INT, 4, gametes, segregationRates) :: +UP(Y, POLY FRAC INT)\bound{q}\free{gametes, segregationRates}} } \xtc{ Because the coefficient \texht{${9 \over 20}$}{\axiom{9/20}} has absolute @@ -44742,7 +40481,9 @@ by a theorem of this theory. The second question is answered by searching for idempotents in the algebra. }{ -\spadpaste{cI := conditionsForIdempotents()\$GCNAALG(FRAC INT, 4, gametes, segregationRates)\bound{cI} \free{gametes, segregationRates}} +\spadpaste{cI := conditionsForIdempotents() +\$GCNAALG(FRAC INT, 4, gametes, segregationRates) +\bound{cI} \free{gametes, segregationRates}} } \xtc{ Solve these equations and look at the first solution. @@ -44758,11 +40499,13 @@ other solutions are contained in it. Choose one equilibrium state by setting two indeterminates to concrete values. }{ -\spadpaste{sol := solve concat(gbs.1,[\%x1-1/10,\%x2-1/10])\bound{sol} \free{gbs}} +\spadpaste{sol := solve concat(gbs.1,[\%x1-1/10,\%x2-1/10]) +\bound{sol} \free{gbs}} } \xtc{ }{ -\spadpaste{e : A := represents reverse (map(rhs, sol.1) :: List FRAC INT)\bound{e} \free{A, sol}} +\spadpaste{e : A := represents reverse (map(rhs, sol.1) +:: List FRAC INT)\bound{e} \free{A, sol}} } \xtc{ Verify the result. @@ -44775,38 +40518,17 @@ Verify the result. @ \chapter{Users Guide Chapter 10 (ug10.ht)} -<>= -\newcommand{\ugIntProgTitle}{Interactive Programming} -\newcommand{\ugIntProgNumber}{10.} - -@ -\section{Interactive Programming} -\label{ugIntProgPage} -\begin{itemize} -\item ugAppGraphicsPage \ref{ugAppGraphicsPage} on -page~\pageref{ugAppGraphicsPage} -\item ugIntProgDrawingPage \ref{ugIntProgDrawingPage} on -page~\pageref{ugIntProgDrawingPage} -\item ugIntProgRibbonPage \ref{ugIntProgRibbonPage} on -page~\pageref{ugIntProgRibbonPage} -\item ugIntProgColorPage \ref{ugIntProgColorPage} on -page~\pageref{ugIntProgColorPage} -\item ugIntProgPLCPage \ref{ugIntProgPLCPage} on -page~\pageref{ugIntProgPLCPage} -\item ugIntProgColorArrPage \ref{ugIntProgColorArrPage} on -page~\pageref{ugIntProgColorArrPage} -\item ugIntProgVecFieldsPage \ref{ugIntProgVecFieldsPage} on -page~\pageref{ugIntProgVecFieldsPage} -\item ugIntProgCompFunsPage \ref{ugIntProgCompFunsPage} on -page~\pageref{ugIntProgCompFunsPage} -\item ugIntProgFunctionsPage \ref{ugIntProgFunctionsPage} on -page~\pageref{ugIntProgFunctionsPage} -\item ugIntProgNewtonPage \ref{ugIntProgNewtonPage} on -page~\pageref{ugIntProgNewtonPage} -\end{itemize} -\index{pages!ugIntProgPage!ug10.ht} -\index{ug10.ht!pages!ugIntProgPage} -\index{ugIntProgPage!ug10.ht!pages} +\pagehead{ugIntProgPage}{ug10.ht}{Interactive Programming} +\pageto{notitle}{ugAppGraphicsPage} +\pageto{notitle}{ugIntProgDrawingPage} +\pageto{notitle}{ugIntProgRibbonPage} +\pageto{notitle}{ugIntProgColorPage} +\pageto{notitle}{ugIntProgPLCPage} +\pageto{notitle}{ugIntProgColorArrPage} +\pageto{notitle}{ugIntProgVecFieldsPage} +\pageto{notitle}{ugIntProgCompFunsPage} +\pageto{notitle}{ugIntProgFunctionsPage} +\pageto{notitle}{ugIntProgNewtonPage} <>= \begin{page}{ugIntProgPage}{10. Interactive Programming} \beginscroll @@ -44831,17 +40553,23 @@ all the remaining commands and programs used to create these images. \beginmenu - \menudownlink{{10.1. Drawing Ribbons Interactively}}{ugIntProgDrawingPage} - \menudownlink{{10.2. A Ribbon Program}}{ugIntProgRibbonPage} - \menudownlink{{10.3. Coloring and Positioning Ribbons}}{ugIntProgColorPage} - \menudownlink{{10.4. Points, Lines, and Curves}}{ugIntProgPLCPage} - \menudownlink{{10.5. A Bouquet of Arrows}}{ugIntProgColorArrPage} - \menudownlink{{10.6. Drawing Complex Vector Fields}} +\menudownlink{{10.1. Drawing Ribbons Interactively}} +{ugIntProgDrawingPage} +\menudownlink{{10.2. A Ribbon Program}} +{ugIntProgRibbonPage} +\menudownlink{{10.3. Coloring and Positioning Ribbons}} +{ugIntProgColorPage} +\menudownlink{{10.4. Points, Lines, and Curves}} +{ugIntProgPLCPage} +\menudownlink{{10.5. A Bouquet of Arrows}} +{ugIntProgColorArrPage} +\menudownlink{{10.6. Drawing Complex Vector Fields}} {ugIntProgVecFieldsPage} - \menudownlink{{10.7. Drawing Complex Functions}}{ugIntProgCompFunsPage} - \menudownlink{{10.8. Functions Producing Functions}} +\menudownlink{{10.7. Drawing Complex Functions}} +{ugIntProgCompFunsPage} +\menudownlink{{10.8. Functions Producing Functions}} {ugIntProgFunctionsPage} - \menudownlink{{10.9. Automatic Newton Iteration Formulas}} +\menudownlink{{10.9. Automatic Newton Iteration Formulas}} {ugIntProgNewtonPage} \endmenu \endscroll @@ -44849,20 +40577,8 @@ programs used to create these images. \end{page} @ -<>= -\newcommand{\ugIntProgDrawingTitle}{Drawing Ribbons Interactively} -\newcommand{\ugIntProgDrawingNumber}{10.1.} - -@ -\section{Drawing Ribbons Interactively} -\label{ugIntProgDrawingPage} -\begin{itemize} -\item ugGraphPage \ref{ugGraphPage} on -page~\pageref{ugGraphPage} -\end{itemize} -\index{pages!ugIntProgDrawingPage!ug10.ht} -\index{ug10.ht!pages!ugIntProgDrawingPage} -\index{ugIntProgDrawingPage!ug10.ht!pages} +\pagehead{ugIntProgDrawingPage}{ug10.ht}{Drawing Ribbons Interactively} +\pageto{notitle}{ugGraphPage} <>= \begin{page}{ugIntProgDrawingPage}{10.1. Drawing Ribbons Interactively} \beginscroll @@ -44986,7 +40702,8 @@ Add the ribbon for \texht{$x^3$}{\spad{x**3}} alongside that for \texht{$x^2$}{\spad{x**2}}. }{ -\graphpaste{vp := draw(x**3,x=-1..1,y=1..2,var2Steps==1, space==sp)\bound{d6}\free{d5}} +\graphpaste{vp := draw(x**3,x=-1..1,y=1..2,var2Steps==1, space==sp) +\bound{d6}\free{d5}} }{ \epsffile[0 0 295 295]{../ps/ribbons.ps} } @@ -45002,7 +40719,8 @@ enclose the ribbons in a box. \psXtc{ Show quadrilateral polygon outlines. }{ -\spadpaste{drawStyle(vp,"shade");outlineRender(vp,"on")\bound{d10}\free{d6}} +\spadpaste{drawStyle(vp,"shade");outlineRender(vp,"on") +\bound{d10}\free{d6}} }{ \epsffile[0 0 295 295]{../ps/ribbons2.ps} } @@ -45025,22 +40743,9 @@ the details. \end{page} @ -<>= -\newcommand{\ugIntProgRibbonTitle}{A Ribbon Program} -\newcommand{\ugIntProgRibbonNumber}{10.2.} - -@ -\section{A Ribbon Program} -\label{ugIntProgRibbonPage} -\begin{itemize} -\item ugUserPage \ref{ugUserPage} on -page~\pageref{ugUserPage} -\item ugLangBlocksPage \ref{ugLangBlocksPage} on -page~\pageref{ugLangBlocksPage} -\end{itemize} -\index{pages!ugIntProgRibbonPage!ug10.ht} -\index{ug10.ht!pages!ugIntProgRibbonPage} -\index{ugIntProgRibbonPage!ug10.ht!pages} +\pagehead{ugIntProgRibbonPage}{ug10.ht}{A Ribbon Program} +\pageto{notitle}{ugUserPage} +\pageto{notitle}{ugLangBlocksPage} <>= \begin{page}{ugIntProgRibbonPage}{10.2. A Ribbon Program} \beginscroll @@ -45085,7 +40790,8 @@ containing the following program. {\tt 13.\ \ \ \ zoom(vp,n,1,n)}\newline {\tt 14.\ \ \ \ rotate(vp,0,75)}\newline {\tt 15.\ \ \ \ vp}\newline -\caption{The first \protect\pspadfun{drawRibbons} function.}\label{fig-ribdraw1} +\caption{The first \protect\pspadfun{drawRibbons} function.} +\label{fig-ribdraw1} \endImportant Here are some remarks on the syntax used in the \pspadfun{drawRibbons} @@ -45143,16 +40849,7 @@ for \texht{$-1 \leq x \leq 1$}{-1 <= x <= 1} \end{page} @ -<>= -\newcommand{\ugIntProgColorTitle}{Coloring and Positioning Ribbons} -\newcommand{\ugIntProgColorNumber}{10.3.} - -@ -\section{Coloring and Positioning Ribbons} -\label{ugIntProgColorPage} -\index{pages!ugIntProgColorPage!ug10.ht} -\index{ug10.ht!pages!ugIntProgColorPage} -\index{ugIntProgColorPage!ug10.ht!pages} +\pagehead{ugIntProgColorPage}{ug10.ht}{Coloring and Positioning Ribbons} <>= \begin{page}{ugIntProgColorPage}{10.3. Coloring and Positioning Ribbons} \beginscroll @@ -45200,10 +40897,14 @@ not a nested loop. {\tt 3.\ \ \ \ \ num\ :=\ \#\ flist}\newline {\tt 4.\ \ \ \ \ yVar\ :=\ variable\ yrange}\newline {\tt 5.\ \ \ \ \ y0:Float\ \ \ \ :=\ lo\ segment\ yrange}\newline -{\tt 6.\ \ \ \ \ width:Float\ :=\ (hi\ segment\ yrange\ -\ y0)/num}\newline -{\tt 7.\ \ \ \ \ for\ f\ in\ flist\ for\ color\ in\ 1..num\ repeat}\newline -{\tt 8.\ \ \ \ \ \ \ makeObject(f,\ xrange,\ yVar\ =\ y0..y0+width,}\newline -{\tt 9.\ \ \ \ \ \ \ \ \ var2Steps\ ==\ 1,\ colorFunction\ ==\ (x,y)\ +->\ color,\ \_}\newline +{\tt 6.\ \ \ \ \ width:Float\ :=\ (hi\ segment\ yrange\ -\ y0)/num} +\newline +{\tt 7.\ \ \ \ \ for\ f\ in\ flist\ for\ color\ in\ 1..num\ repeat} +\newline +{\tt 8.\ \ \ \ \ \ \ makeObject(f,\ xrange,\ yVar\ =\ y0..y0+width,} +\newline +{\tt 9.\ \ \ \ \ \ \ \ \ var2Steps\ ==\ 1,\ colorFunction\ ==\ +(x,y)\ +->\ color,\ \_}\newline {\tt 10.\ \ \ \ \ \ \ \ space\ ==\ sp)}\newline {\tt 11.\ \ \ \ \ \ y0\ :=\ y0\ +\ width}\newline {\tt 12.\ \ \ \ vp\ :=\ makeViewport3D(sp,\ "Ribbons")}\newline @@ -45211,7 +40912,8 @@ not a nested loop. {\tt 14.\ \ \ \ outlineRender(vp,\ "on")}\newline {\tt 15.\ \ \ \ showRegion(vp,\ "on")}\newline {\tt 16.\ \ \ \ vp}\newline -\caption{The final \protect\pspadfun{drawRibbons} function.}\label{fig-ribdraw2} +\caption{The final \protect\pspadfun{drawRibbons} function.} +\label{fig-ribdraw2} \endImportant @@ -45220,16 +40922,7 @@ not a nested loop. \end{page} @ -<>= -\newcommand{\ugIntProgPLCTitle}{Points, Lines, and Curves} -\newcommand{\ugIntProgPLCNumber}{10.4.} - -@ -\section{Points, Lines, and Curves} -\label{ugIntProgPLCPage} -\index{pages!ugIntProgPLCPage!ug10.ht} -\index{ug10.ht!pages!ugIntProgPLCPage} -\index{ugIntProgPLCPage!ug10.ht!pages} +\pagehead{ugIntProgPLCPage}{ug10.ht}{Points, Lines, and Curves} <>= \begin{page}{ugIntProgPLCPage}{10.4. Points, Lines, and Curves} \beginscroll @@ -45256,10 +40949,9 @@ The \spadSyntax{@} sign means ``of the type.'' Thus \spad{zero} is \smath{0.0} of the type \spadtype{DoubleFloat}. You can also say \spad{0.0::DFLOAT}. -Points can have four small float components: \smath{x, y, z} coordinates and an -optional color. -A ``curve'' is simply a list of points connected by straight line -segments. +Points can have four small float components: \smath{x, y, z} +coordinates and an optional color. A ``curve'' is simply a list of +points connected by straight line segments. \xtc{ Create the point \spad{origin} with color zero, that is, the lowest color on the color map. @@ -45299,9 +40991,6 @@ draw an arrow from point \texht{$p_1$}{p1} to \texht{$p_2$}{p2}. \beginImportant \noindent -%\xmpLine{origin := point [0.0@DFLOAT,0.0@DFLOAT,0.0@DFLOAT,0.0@DFLOAT]}{The point 0 with color 0.} -%\xmpLine{unit := point [1.0@DFLOAT,1.0@DFLOAT,1.0@DFLOAT,0.0@DFLOAT]}{A second point with color 0.} -%\xmpLine{}{} {\tt 1.\ \ \ arrowAngle\ :=\ \%pi-\%pi/10.0@DFLOAT}\newline {\tt 2.\ \ \ arrowScale\ :=\ 0.2@DFLOAT}\newline {\tt 3.\ \ \ }\newline @@ -45314,8 +41003,10 @@ draw an arrow from point \texht{$p_1$}{p1} to \texht{$p_2$}{p2}. {\tt 10.\ \ \ \ c2\ :=\ len*cos(theta\ -\ arrowAngle)}\newline {\tt 11.\ \ \ \ s2\ :=\ len*sin(theta\ -\ arrowAngle)}\newline {\tt 12.\ \ \ \ z\ \ :=\ p2.3*(1\ -\ arrowScale)}\newline -{\tt 13.\ \ \ \ p3\ :=\ point\ [p2.1\ +\ c1,\ p2.2\ +\ s1,\ z,\ p2.4]}\newline -{\tt 14.\ \ \ \ p4\ :=\ point\ [p2.1\ +\ c2,\ p2.2\ +\ s2,\ z,\ p2.4]}\newline +{\tt 13.\ \ \ \ p3\ :=\ point\ [p2.1\ +\ c1,\ p2.2\ +\ s1,\ z,\ p2.4]} +\newline +{\tt 14.\ \ \ \ p4\ :=\ point\ [p2.1\ +\ c2,\ p2.2\ +\ s2,\ z,\ p2.4]} +\newline {\tt 15.\ \ \ \ [[p1,\ p2,\ p3],\ [p2,\ p4]]}\newline \endImportant @@ -45339,7 +41030,8 @@ Create an empty object \spad{sp} of type \spad{ThreeSpace}. \xtc{ Add each curve of the arrow to the space \spad{sp}. }{ -\spadpaste{for a in arrow repeat sp := curve(sp,a)\bound{v3}\free{v2}\free{c1}} +\spadpaste{for a in arrow repeat sp := curve(sp,a) +\bound{v3}\free{v2}\free{c1}} } \psXtc{ Create a \threedim{} viewport containing that space. @@ -45362,30 +41054,11 @@ Here is a better viewing angle. \end{page} @ -<>= -\newcommand{\ugIntProgColorArrTitle}{A Bouquet of Arrows} -\newcommand{\ugIntProgColorArrNumber}{10.5.} - -@ -\section{A Bouquet of Arrows} -\label{ugIntProgColorArrPage} -\index{pages!ugIntProgColorArrPage!ug10.ht} -\index{ug10.ht!pages!ugIntProgColorArrPage} -\index{ugIntProgColorArrPage!ug10.ht!pages} +\pagehead{ugIntProgColorArrPage}{ug10.ht}{A Bouquet of Arrows} <>= \begin{page}{ugIntProgColorArrPage}{10.5. A Bouquet of Arrows} \beginscroll -%Axiom gathers up all the points of a graph and looks at the range -%of color values given as integers. -%If theses color values range from a minimum value of \spad{a} to a maximum -%value of \spad{b}, then the \spad{a} values are colored red (the -%lowest color in our spectrum), and \spad{b} values are colored -%purple (the highest color), and those in the middle are colored -%green. -%When all the points are the same color as above, Axiom -%chooses green. - Let's draw a ``bouquet'' of arrows. Each arrow is identical. The arrowheads are uniformly placed on a circle parallel to the \smath{xy}-plane. @@ -45409,8 +41082,10 @@ Here is a program to draw a bouquet of \smath{n} arrows. {\tt 2.\ \ \ \ \ angle\ :=\ 0.0@DFLOAT}\newline {\tt 3.\ \ \ \ \ sp\ :=\ createThreeSpace()}\newline {\tt 4.\ \ \ \ \ for\ i\ in\ 0..n-1\ repeat}\newline -{\tt 5.\ \ \ \ \ \ \ start\ :=\ point\ [0.0@DFLOAT,0.0@DFLOAT,0.0@DFLOAT,angle]\ }\newline -{\tt 6.\ \ \ \ \ \ \ end\ \ \ :=\ point\ [cos\ angle,\ sin\ angle,\ 1.0@DFLOAT,\ angle]}\newline +{\tt 5.\ \ \ \ \ \ \ start\ :=\ point\ +[0.0@DFLOAT,0.0@DFLOAT,0.0@DFLOAT,angle]\ }\newline +{\tt 6.\ \ \ \ \ \ \ end\ \ \ :=\ point\ +[cos\ angle,\ sin\ angle,\ 1.0@DFLOAT,\ angle]}\newline {\tt 7.\ \ \ \ \ \ \ arrow\ :=\ makeArrow(start,end)}\newline {\tt 8.\ \ \ \ \ \ \ for\ a\ in\ makeArrow(start,end)\ repeat\ }\newline {\tt 9.\ \ \ \ \ \ \ \ \ curve(sp,a)}\newline @@ -45432,64 +41107,12 @@ A bouquet of a dozen arrows. } \ -%\head{section}{Diversion: When Things Go Wrong}{ugIntProgDivTwo} -% -%Up to now, if you have typed in all the programs exactly as they are in -%the book, you have encountered no errors. -%In practice, however, it is easy to make mistakes. -%Computers are unforgiving: your program must be letter-for-letter correct -%or you will encounter some error. -% -%One thing that can go wrong is that you can create a syntactically -%incorrect program. -%As pointed out in Diversion 1, the meaning of Axiom programs is -%affected by indentation. -% -%The Axiom parser will ensure that all parentheses, brackets, and -%braces balance, and that commas and operators appear in the correct -%context. -%For example, change line ?? -%to ?? -%and run. -% -%A common mistake is to misspell an identifier or operation name. -%These are generally easy to spot since the interpreter will tell you the -%name of the operation together with the type and number of arguments which -%it is trying to find. -% -%Another mistake is to either to omit an argument or to give too many. -%Again Axiom will notify you of the offending operation. -% -%Indentation makes your programs more readable. -%However there are several ways to create a syntactically valid program. -%A most common problem occurs when a line is either indented improperly. -%% either or what? -%If this is a first line of a pile, then all the other lines will act as an -%inner pile to the first line. -%If it is a line of the pile other than the first line, Axiom then -%thinks that this line is a continuation of the previous line. -%More frequently than not, a syntactically correct expression is created. -%Almost never however will this be a semantically correct. -%Only when the program is run will an error be discovered. -%For example, change line ?? -%to ?? -%and run. - \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugIntProgVecFieldsTitle}{Drawing Complex Vector Fields} -\newcommand{\ugIntProgVecFieldsNumber}{10.6.} - -@ -\section{Drawing Complex Vector Fields} -\label{ugIntProgVecFieldsPage} -\index{pages!ugIntProgVecFieldsPage!ug10.ht} -\index{ug10.ht!pages!ugIntProgVecFieldsPage} -\index{ugIntProgVecFieldsPage!ug10.ht!pages} +\pagehead{ugIntProgVecFieldsPage}{ug10.ht}{Drawing Complex Vector Fields} <>= \begin{page}{ugIntProgVecFieldsPage}{10.6. Drawing Complex Vector Fields} \beginscroll @@ -45564,11 +41187,10 @@ to be odd. {\tt 3.\ \ \ )read\ arrows}\newline \endImportant -Now define the function \userfun{drawComplexVectorField} to draw the arrows. -It is good practice to declare the type of the main function in -the file. -This one declaration is usually sufficient to ensure that other -lower-level functions are compiled with the correct types. +Now define the function \userfun{drawComplexVectorField} to draw the +arrows. It is good practice to declare the type of the main function +in the file. This one declaration is usually sufficient to ensure +that other lower-level functions are compiled with the correct types. \beginImportant @@ -45589,8 +41211,10 @@ Here is the full function definition: \noindent {\tt 7.\ \ \ drawComplexVectorField(f,\ realRange,imagRange)\ ==}\newline -{\tt 8.\ \ \ \ \ delReal\ :=\ (hi(realRange)-lo(realRange))/realSteps}\newline -{\tt 9.\ \ \ \ \ delImag\ :=\ (hi(imagRange)-lo(imagRange))/imagSteps}\newline +{\tt 8.\ \ \ \ \ delReal\ :=\ (hi(realRange)-lo(realRange))/realSteps} +\newline +{\tt 9.\ \ \ \ \ delImag\ :=\ (hi(imagRange)-lo(imagRange))/imagSteps} +\newline {\tt 10.\ \ \ \ sp\ :=\ createThreeSpace()}\newline {\tt 11.\ \ \ \ real\ :=\ lo(realRange)}\newline {\tt 12.\ \ \ \ for\ i\ in\ 1..realSteps+1\ repeat}\newline @@ -45599,10 +41223,13 @@ Here is the full function definition: {\tt 15.\ \ \ \ \ \ \ \ z\ :=\ f\ complex(real,imag)}\newline {\tt 16.\ \ \ \ \ \ \ \ arg\ :=\ argument\ z}\newline {\tt 17.\ \ \ \ \ \ \ \ len\ :=\ clipFun\ sqrt\ norm\ z}\newline -{\tt 18.\ \ \ \ \ \ \ \ p1\ :=\ \ point\ [real,\ imag,\ 0.0@DFLOAT,\ arg]}\newline +{\tt 18.\ \ \ \ \ \ \ \ p1\ :=\ \ point\ +[real,\ imag,\ 0.0@DFLOAT,\ arg]}\newline {\tt 19.\ \ \ \ \ \ \ \ scaleLen\ :=\ delReal\ *\ len}\newline -{\tt 20.\ \ \ \ \ \ \ \ p2\ :=\ point\ [p1.1\ +\ scaleLen*cos(arg),}\newline -{\tt 21.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ p1.2\ +\ scaleLen*sin(arg),0.0@DFLOAT,\ arg]}\newline +{\tt 20.\ \ \ \ \ \ \ \ p2\ :=\ point\ +[p1.1\ +\ scaleLen*cos(arg),}\newline +{\tt 21.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ p1.2\ +\ +scaleLen*sin(arg),0.0@DFLOAT,\ arg]}\newline {\tt 22.\ \ \ \ \ \ \ \ arrow\ :=\ makeArrow(p1,\ p2)}\newline {\tt 23.\ \ \ \ \ \ \ \ for\ a\ in\ arrow\ repeat\ curve(sp,\ a)}\newline {\tt 24.\ \ \ \ \ \ \ \ imag\ :=\ imag\ +\ delImag}\newline @@ -45610,9 +41237,10 @@ Here is the full function definition: {\tt 26.\ \ \ \ makeViewport3D(sp,\ "Complex\ Vector\ Field")}\newline \endImportant -As a first example, let us draw \spad{f(z) == sin(z)}. -There is no need to create a user function: just pass the -\spadfunFrom{sin}{Complex DoubleFloat} from \spadtype{Complex DoubleFloat}. +As a first example, let us draw \spad{f(z) == sin(z)}. There is no +need to create a user function: just pass the +\spadfunFrom{sin}{Complex DoubleFloat} from +\spadtype{Complex DoubleFloat}. \xtc{ Read the file. }{ @@ -45632,20 +41260,8 @@ Draw the complex vector field of \spad{sin(x)}. \end{page} @ -<>= -\newcommand{\ugIntProgCompFunsTitle}{Drawing Complex Functions} -\newcommand{\ugIntProgCompFunsNumber}{10.7.} - -@ -\section{Drawing Complex Functions} -\label{ugIntProgCompFunsPage} -\begin{itemize} -\item ugGraphPage \ref{ugGraphPage} on -page~\pageref{ugGraphPage} -\end{itemize} -\index{pages!ugIntProgCompFunsPage!ug10.ht} -\index{ug10.ht!pages!ugIntProgCompFunsPage} -\index{ugIntProgCompFunsPage!ug10.ht!pages} +\pagehead{ugIntProgCompFunsPage}{ug10.ht}{Drawing Complex Functions} +\pageto{notitle}{ugGraphPage} <>= \begin{page}{ugIntProgCompFunsPage}{10.7. Drawing Complex Functions} \beginscroll @@ -45670,8 +41286,10 @@ The function definition is in three parts. \noindent {\tt 1.\ \ \ drawComplex:\ (C\ ->\ C,\ S,\ S)\ ->\ VIEW3D}\newline {\tt 2.\ \ \ drawComplex(f,\ realRange,\ imagRange)\ ==}\newline -{\tt 3.\ \ \ \ \ delReal\ :=\ (hi(realRange)-lo(realRange))/realSteps}\newline -{\tt 4.\ \ \ \ \ delImag\ :=\ (hi(imagRange)-lo(imagRange))/imagSteps}\newline +{\tt 3.\ \ \ \ \ delReal\ :=\ (hi(realRange)-lo(realRange))/realSteps} +\newline +{\tt 4.\ \ \ \ \ delImag\ :=\ (hi(imagRange)-lo(imagRange))/imagSteps} +\newline {\tt 5.\ \ \ \ \ llp:List\ List\ Point\ DFLOAT\ :=\ []}\newline \endImportant @@ -45692,8 +41310,10 @@ which builds \spad{llp}. {\tt 4.\ \ \ \ \ \ \ lp\ :=\ []\$(List\ Point\ DFLOAT)}\newline {\tt 5.\ \ \ \ \ \ \ for\ j\ in\ 1..imagSteps+1\ repeat}\newline {\tt 6.\ \ \ \ \ \ \ \ \ z\ :=\ f\ complex(real,imag)}\newline -{\tt 7.\ \ \ \ \ \ \ \ \ pt\ :=\ point\ [real,imag,\ clipFun\ sqrt\ norm\ z,\ }\newline -{\tt 8.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ argument\ z]}\newline +{\tt 7.\ \ \ \ \ \ \ \ \ pt\ :=\ point\ +[real,imag,\ clipFun\ sqrt\ norm\ z,\ }\newline +{\tt 8.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ argument\ z]} +\newline {\tt 9.\ \ \ \ \ \ \ \ \ lp\ :=\ cons(pt,lp)}\newline {\tt 10.\ \ \ \ \ \ \ \ imag\ :=\ imag\ +\ delImag}\newline {\tt 11.\ \ \ \ \ \ real\ :=\ real\ +\ delReal}\newline @@ -45744,20 +41364,8 @@ Draw it with an odd number of steps to avoid the pole. \end{page} @ -<>= -\newcommand{\ugIntProgFunctionsTitle}{Functions Producing Functions} -\newcommand{\ugIntProgFunctionsNumber}{10.8.} - -@ -\section{Functions Producing Functions} -\label{ugIntProgFunctionsPage} -\begin{itemize} -\item ugUserMakePage \ref{ugUserMakePage} on -page~\pageref{ugUserMakePage} -\end{itemize} -\index{pages!ugIntProgFunctionsPage!ug10.ht} -\index{ug10.ht!pages!ugIntProgFunctionsPage} -\index{ugIntProgFunctionsPage!ug10.ht!pages} +\pagehead{ugIntProgFunctionsPage}{ug10.ht}{Functions Producing Functions} +\pageto{notitle}{ugUserMakePage} <>= \begin{page}{ugIntProgFunctionsPage}{10.8. Functions Producing Functions} \beginscroll @@ -45794,22 +41402,12 @@ For a more sophisticated application, read on. \end{page} @ +\pagehead{ugIntProgNewtonPage}{ug10.ht} +{Automatic Newton Iteration Formulas} +\pageto{notitle}{MappingPackageOneXmpPage} <>= -\newcommand{\ugIntProgNewtonTitle}{Automatic Newton Iteration Formulas} -\newcommand{\ugIntProgNewtonNumber}{10.9.} - -@ -\section{Automatic Newton Iteration Formulas} -\label{ugIntProgNewtonPage} -\begin{itemize} -\item MappingPackageOneXmpPage \ref{MappingPackageOneXmpPage} on -page~\pageref{MappingPackageOneXmpPage} -\end{itemize} -\index{pages!ugIntProgNewtonPage!ug10.ht} -\index{ug10.ht!pages!ugIntProgNewtonPage} -\index{ugIntProgNewtonPage!ug10.ht!pages} -<>= -\begin{page}{ugIntProgNewtonPage}{10.9. Automatic Newton Iteration Formulas} +\begin{page}{ugIntProgNewtonPage} +{10.9. Automatic Newton Iteration Formulas} \beginscroll We resume @@ -45847,7 +41445,8 @@ Here is the function \spad{newtonStep}: \noindent {\tt 1.\ \ \ C\ :=\ Complex\ DoubleFloat}\newline -{\tt 2.\ \ \ complexFunPack:=MakeUnaryCompiledFunction(EXPR\ INT,C,C)}\newline +{\tt 2.\ \ \ complexFunPack:=MakeUnaryCompiledFunction(EXPR\ INT,C,C)} +\newline {\tt 3.\ \ \ }\newline {\tt 4.\ \ \ newtonStep(f)\ ==}\newline {\tt 5.\ \ \ \ \ fun\ \ :=\ complexNumericFunction\ f}\newline @@ -45867,7 +41466,8 @@ Here is the function \spad{newtonStep}: {\tt 19.\ \ theVariableIn\ f\ ==\ \ }\newline {\tt 20.\ \ \ \ vl\ :=\ variables\ f}\newline {\tt 21.\ \ \ \ nv\ :=\ \#\ vl}\newline -{\tt 22.\ \ \ \ nv\ >\ 1\ =>\ error\ "Expression\ is\ not\ univariate."}\newline +{\tt 22.\ \ \ \ nv\ >\ 1\ =>\ error\ "Expression\ is\ not\ univariate."} +\newline {\tt 23.\ \ \ \ nv\ =\ 0\ =>\ 'x}\newline {\tt 24.\ \ \ \ first\ vl}\newline \endImportant @@ -45928,7 +41528,8 @@ Check the accuracy of the last iterate. } In -\downlink{`MappingPackage1'}{MappingPackageOneXmpPage}\ignore{MappingPackage1}, +\downlink{`MappingPackage1'}{MappingPackageOneXmpPage} +\ignore{MappingPackage1}, we show how functions can be manipulated as objects in Axiom. A useful operation to consider here is \spadop{*}, which means composition. For example \spad{g*g} causes the Newton iteration @@ -45975,42 +41576,19 @@ The surface. @ \chapter{Users Guide Chapter 11 (ug11.ht)} -<>= -\newcommand{\ugPackagesTitle}{Packages} -\newcommand{\ugPackagesNumber}{11.} - -@ -\section{Packages} -\label{ugPackagesPage} -\begin{itemize} -\item ugIntProgPage \ref{ugIntProgPage} on -page~\pageref{ugIntProgPage} -\item ugIntProgPage \ref{ugIntProgPage} on -page~\pageref{ugIntProgPage} -\item ugPackagesNamesPage \ref{ugPackagesNamesPage} on -page~\pageref{ugPackagesNamesPage} -\item ugPackagesSyntaxPage \ref{ugPackagesSyntaxPage} on -page~\pageref{ugPackagesSyntaxPage} -\item ugPackagesAbstractPage \ref{ugPackagesAbstractPage} on -page~\pageref{ugPackagesAbstractPage} -\item ugPackagesCapsulesPage \ref{ugPackagesCapsulesPage} on -page~\pageref{ugPackagesCapsulesPage} -\item ugPackagesInputFilesPage \ref{ugPackagesInputFilesPage} on -page~\pageref{ugPackagesInputFilesPage} -\item ugPackagesPackagesPage \ref{ugPackagesPackagesPage} on -page~\pageref{ugPackagesPackagesPage} -\item ugPackagesParametersPage \ref{ugPackagesParametersPage} on -page~\pageref{ugPackagesParametersPage} -\item ugPackagesCondsPage \ref{ugPackagesCondsPage} on -page~\pageref{ugPackagesCondsPage} -\item ugPackagesCompilingPage \ref{ugPackagesCompilingPage} on -page~\pageref{ugPackagesCompilingPage} -\item ugPackagesHowPage \ref{ugPackagesHowPage} on -page~\pageref{ugPackagesHowPage} -\end{itemize} -\index{pages!ugPackagesPage!ug11.ht} -\index{ug11.ht!pages!ugPackagesPage} -\index{ugPackagesPage!ug11.ht!pages} +\pagehead{ugPackagesPage}{ug11.ht}{Packages} +\pageto{notitle}{ugIntProgPage} +\pageto{notitle}{ugIntProgPage} +\pageto{notitle}{ugPackagesNamesPage} +\pageto{notitle}{ugPackagesSyntaxPage} +\pageto{notitle}{ugPackagesAbstractPage} +\pageto{notitle}{ugPackagesCapsulesPage} +\pageto{notitle}{ugPackagesInputFilesPage} +\pageto{notitle}{ugPackagesPackagesPage} +\pageto{notitle}{ugPackagesParametersPage} +\pageto{notitle}{ugPackagesCondsPage} +\pageto{notitle}{ugPackagesCompilingPage} +\pageto{notitle}{ugPackagesHowPage} <>= \begin{page}{ugPackagesPage}{11. Packages} \beginscroll @@ -46062,66 +41640,63 @@ version 2.0 of Axiom. {\tt 10.\ \ }\newline {\tt 11.\ \ \ \ Exports\ ==\ with}\newline {\tt 12.\ \ \ \ \ \ drawComplex:\ (C\ ->\ C,S,S,Boolean)\ ->\ VIEW3D}\newline -{\tt 13.\ \ \ \ \ \ drawComplexVectorField:\ (C\ ->\ C,S,S)\ ->\ VIEW3D}\newline +{\tt 13.\ \ \ \ \ \ +drawComplexVectorField:\ (C\ ->\ C,S,S)\ ->\ VIEW3D}\newline {\tt 14.\ \ \ \ \ \ setRealSteps:\ INT\ ->\ INT}\newline {\tt 15.\ \ \ \ \ \ setImagSteps:\ INT\ ->\ INT}\newline {\tt 16.\ \ \ \ \ \ setClipValue:\ DFLOAT->\ DFLOAT}\newline {\tt 17.\ \ }\newline {\tt 18.\ \ \ \ Implementation\ ==\ add}\newline {\tt 19.\ \ \ \ \ \ arrowScale\ :\ DFLOAT\ :=\ (0.2)::DFLOAT\ --relative\ size}\newline -{\tt 20.\ \ \ \ \ \ arrowAngle\ :\ DFLOAT\ :=\ pi()-pi()/(20::DFLOAT)}\newline -{\tt 21.\ \ \ \ \ \ realSteps\ \ :\ INT\ :=\ 11\ --\#\ real\ steps}\newline -{\tt 22.\ \ \ \ \ \ imagSteps\ \ :\ INT\ :=\ 11\ --\#\ imaginary\ steps}\newline -{\tt 23.\ \ \ \ \ \ clipValue\ \ :\ DFLOAT\ \ :=\ 10::DFLOAT\ --maximum\ vector\ length}\newline +{\tt 20.\ \ \ \ \ \ +arrowAngle\ :\ DFLOAT\ :=\ pi()-pi()/(20::DFLOAT)}\newline +{\tt 21.\ \ \ \ \ \ +realSteps\ \ :\ INT\ :=\ 11\ --\#\ real\ steps}\newline +{\tt 22.\ \ \ \ \ \ +imagSteps\ \ :\ INT\ :=\ 11\ --\#\ imaginary\ steps}\newline +{\tt 23.\ \ \ \ \ \ +clipValue\ \ :\ DFLOAT\ \ :=\ 10::DFLOAT\ --maximum\ vector\ length}\newline {\tt 24.\ \ }\newline {\tt 25.\ \ \ \ \ \ setRealSteps(n)\ ==\ realSteps\ :=\ n}\newline {\tt 26.\ \ \ \ \ \ setImagSteps(n)\ ==\ imagSteps\ :=\ n}\newline {\tt 27.\ \ \ \ \ \ setClipValue(c)\ ==\ clipValue\ :=\ c}\newline {\tt 28.\ \ }\newline -{\tt 29.\ \ \ \ \ \ clipFun:\ DFLOAT\ ->\ DFLOAT\ --Clip\ large\ magnitudes.}\newline -{\tt 30.\ \ \ \ \ \ clipFun(x)\ ==\ min(max(x,\ -clipValue),\ clipValue)}\newline +{\tt 29.\ \ \ \ \ \ +clipFun:\ DFLOAT\ ->\ DFLOAT\ --Clip\ large\ magnitudes.}\newline +{\tt 30.\ \ \ \ \ \ +clipFun(x)\ ==\ min(max(x,\ -clipValue),\ clipValue)}\newline {\tt 31.\ \ }\newline -{\tt 32.\ \ \ \ \ \ makeArrow:\ (Point\ DFLOAT,Point\ DFLOAT,DFLOAT,DFLOAT)\ ->\ CURVE}\newline +{\tt 32.\ \ \ \ \ \ +makeArrow:\ (Point\ DFLOAT,Point\ DFLOAT,DFLOAT,DFLOAT)\ ->\ CURVE}\newline {\tt 33.\ \ \ \ \ \ makeArrow(p1,\ p2,\ len,\ arg)\ ==\ ...}\newline {\tt 34.\ \ }\newline -{\tt 35.\ \ \ \ \ \ drawComplex(f,\ realRange,\ imagRange,\ arrows?)\ ==\ ...}\newline +{\tt 35.\ \ \ \ \ \ +drawComplex(f,\ realRange,\ imagRange,\ arrows?)\ ==\ ...}\newline \caption{The DrawComplex package.}\label{fig-pak-cdraw} \endImportant \beginmenu - \menudownlink{{11.1. Names, Abbreviations, and File Structure}} +\menudownlink{{11.1. Names, Abbreviations, and File Structure}} {ugPackagesNamesPage} - \menudownlink{{11.2. Syntax}}{ugPackagesSyntaxPage} - \menudownlink{{11.3. Abstract Datatypes}}{ugPackagesAbstractPage} - \menudownlink{{11.4. Capsules}}{ugPackagesCapsulesPage} - \menudownlink{{11.5. Input Files vs. Packages}}{ugPackagesInputFilesPage} - \menudownlink{{11.6. Compiling Packages}}{ugPackagesPackagesPage} - \menudownlink{{11.7. Parameters}}{ugPackagesParametersPage} - \menudownlink{{11.8. Conditionals}}{ugPackagesCondsPage} - \menudownlink{{11.9. Testing}}{ugPackagesCompilingPage} - \menudownlink{{11.10. How Packages Work}}{ugPackagesHowPage} +\menudownlink{{11.2. Syntax}}{ugPackagesSyntaxPage} +\menudownlink{{11.3. Abstract Datatypes}}{ugPackagesAbstractPage} +\menudownlink{{11.4. Capsules}}{ugPackagesCapsulesPage} +\menudownlink{{11.5. Input Files vs. Packages}}{ugPackagesInputFilesPage} +\menudownlink{{11.6. Compiling Packages}}{ugPackagesPackagesPage} +\menudownlink{{11.7. Parameters}}{ugPackagesParametersPage} +\menudownlink{{11.8. Conditionals}}{ugPackagesCondsPage} +\menudownlink{{11.9. Testing}}{ugPackagesCompilingPage} +\menudownlink{{11.10. How Packages Work}}{ugPackagesHowPage} \endmenu \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugPackagesNamesTitle}{Names, Abbreviations, and File Structure} -\newcommand{\ugPackagesNamesNumber}{11.1.} - -@ -\section{Names, Abbreviations, and File Structure} -\label{ugPackagesNamesPage} -\begin{itemize} -\item ugIntProgPage \ref{ugIntProgPage} on -page~\pageref{ugIntProgPage} -\item ugTypesWritingAbbrPage \ref{ugTypesWritingAbbrPage} on -page~\pageref{ugTypesWritingAbbrPage} -\end{itemize} -\index{pages!ugPackagesNamesPage!ug11.ht} -\index{ug11.ht!pages!ugPackagesNamesPage} -\index{ugPackagesNamesPage!ug11.ht!pages} +\pagehead{ugPackagesNamesPage}{ug11.ht} +{Names, Abbreviations, and File Structure} +\pageto{notitle}{ugIntProgPage} +\pageto{notitle}{ugTypesWritingAbbrPage} <>= \begin{page}{ugPackagesNamesPage} {11.1. Names, Abbreviations, and File Structure} @@ -46179,32 +41754,21 @@ is given after the macros (although it could precede them). \end{page} @ -<>= -\newcommand{\ugPackagesSyntaxTitle}{Syntax} -\newcommand{\ugPackagesSyntaxNumber}{11.2.} - -@ -\section{Syntax} -\label{ugPackagesSyntaxPage} -\index{pages!ugPackagesSyntaxPage!ug11.ht} -\index{ug11.ht!pages!ugPackagesSyntaxPage} -\index{ugPackagesSyntaxPage!ug11.ht!pages} +\pagehead{ugPackagesSyntaxPage}{ug11.ht}{Syntax} <>= \begin{page}{ugPackagesSyntaxPage}{11.2. Syntax} \beginscroll -% + The definition of a package has the syntax: -\centerline{{\frenchspacing{\it PackageForm {\tt :} Exports\quad{\tt ==}\quad Implementation}}} -The syntax for defining a package constructor is the same as that -for defining any function in Axiom. -In practice, the definition extends over many lines so that this syntax is -not practical. -Also, the type of a package is expressed by the operator \axiom{with} -\spadkey{with} -followed by an explicit list of operations. -A preferable way to write the definition of a package is with a \axiom{where} -\spadkey{where} -expression: +\centerline{{\frenchspacing{\it PackageForm {\tt :} +Exports\quad{\tt ==}\quad Implementation}}} +The syntax for defining a package +constructor is the same as that for defining any function in Axiom. +In practice, the definition extends over many lines so that this +syntax is not practical. Also, the type of a package is expressed by +the operator \axiom{with} \spadkey{with} followed by an explicit list +of operations. A preferable way to write the definition of a package +is with a \axiom{where} \spadkey{where} expression: \beginImportant The definition of a package usually has the form: \newline @@ -46214,7 +41778,8 @@ The definition of a package usually has the form: \newline \texht{\hspace*{.75pc}}{\tab{3}} Exports == with \newline \texht{\hspace*{2.0pc}}{\tab{6}} {\it list of exported operations}\newline \texht{\hspace*{.75pc}}{\tab{3}} Implementation == add \newline -\texht{\hspace*{2.0pc}}{\tab{6}} {\it list of function definitions for exported operations} +\texht{\hspace*{2.0pc}}{\tab{6}} +{\it list of function definitions for exported operations} } \endImportant @@ -46228,26 +41793,13 @@ the syntax \centerline{{source\quad{\tt ->}\quad target}} \centerline{{}}} -%e ********************************************************************* \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugPackagesAbstractTitle}{Abstract Datatypes} -\newcommand{\ugPackagesAbstractNumber}{11.3.} - -@ -\section{Abstract Datatypes} -\label{ugPackagesAbstractPage} -\begin{itemize} -\item ugIntProgCompFunsPage \ref{ugIntProgCompFunsPage} on -page~\pageref{ugIntProgCompFunsPage} -\end{itemize} -\index{pages!ugPackagesAbstractPage!ug11.ht} -\index{ug11.ht!pages!ugPackagesAbstractPage} -\index{ugPackagesAbstractPage!ug11.ht!pages} +\pagehead{ugPackagesAbstractPage}{ug11.ht}{Abstract Datatypes} +\pageto{notitle}{ugIntProgCompFunsPage} <>= \begin{page}{ugPackagesAbstractPage}{11.3. Abstract Datatypes} \beginscroll @@ -46292,16 +41844,7 @@ or, if the magnitude of that value is too large, the value assigned to \end{page} @ -<>= -\newcommand{\ugPackagesCapsulesTitle}{Capsules} -\newcommand{\ugPackagesCapsulesNumber}{11.4.} - -@ -\section{Capsules} -\label{ugPackagesCapsulesPage} -\index{pages!ugPackagesCapsulesPage!ug11.ht} -\index{ug11.ht!pages!ugPackagesCapsulesPage} -\index{ugPackagesCapsulesPage!ug11.ht!pages} +\pagehead{ugPackagesCapsulesPage}{ug11.ht}{Capsules} <>= \begin{page}{ugPackagesCapsulesPage}{11.4. Capsules} \beginscroll @@ -46313,7 +41856,8 @@ The purpose of a capsule is: \indent{4} \beginitems \item[-] to define a function for each exported operation, and -\item[-] to define a \spadgloss{local environment} for these functions to run. +\item[-] to define a \spadgloss{local environment} +for these functions to run. \enditems \indent{0} @@ -46324,8 +41868,8 @@ bottom. Think of the input file as having a \axiom{)clear all} at the top so that initially no variables or functions are defined. When this file is read, variables such as \axiom{realSteps} and -\axiom{arrowSize} in \nonLibAxiomType{DrawComplex} are set to initial values. -Also, all the functions defined in the capsule are compiled. +\axiom{arrowSize} in \nonLibAxiomType{DrawComplex} are set to initial +values. Also, all the functions defined in the capsule are compiled. These include those that are exported (like \axiom{drawComplex}), and those that are not (like \axiom{makeArrow}). At the end, you get a set of name-value pairs: @@ -46335,129 +41879,100 @@ operation names (like \axiom{drawComplex} and \axiom{makeArrow}) are paired with function values. This set of name-value pairs is called an \spadgloss{environment}. -Actually, we call this environment the ``initial environment'' of a package: -it is the environment that exists immediately after the package is -first built. -Afterwards, functions of this capsule can -access or reset a variable in the environment. -The environment is called {\it local} since any changes to the value of a -variable in this environment can be seen {\it only} by these functions. - -Only the functions from the package can change the variables in the local -environment. -When two functions are called successively from a package, -any changes caused by the first function called -are seen by the second. - -Since the environment is local to the package, its names -don't get mixed -up with others in the system or your workspace. -If you happen to have a variable called \axiom{realSteps} in your -workspace, it does not affect what the -\nonLibAxiomType{DrawComplex} functions do in any way. - -The functions in a package are compiled into machine code. -Unlike function definitions in input files that may be compiled repeatedly -as you use them with varying argument types, -functions in packages have a unique type (generally parameterized by -the argument parameters of a package) and a unique compilation residing on disk. - -The capsule itself is turned into a compiled function. -This so-called {\it capsule function} is what builds the initial environment -spoken of above. -If the package has arguments (see below), then each call to the package -constructor with a distinct pair of arguments -builds a distinct package, each with its own local environment. +Actually, we call this environment the ``initial environment'' of a +package: it is the environment that exists immediately after the +package is first built. Afterwards, functions of this capsule can +access or reset a variable in the environment. The environment is +called {\it local} since any changes to the value of a variable in +this environment can be seen {\it only} by these functions. + +Only the functions from the package can change the variables in the +local environment. When two functions are called successively from a +package, any changes caused by the first function called are seen by +the second. + +Since the environment is local to the package, its names don't get +mixed up with others in the system or your workspace. If you happen +to have a variable called \axiom{realSteps} in your workspace, it does +not affect what the \nonLibAxiomType{DrawComplex} functions do in any +way. + +The functions in a package are compiled into machine code. Unlike +function definitions in input files that may be compiled repeatedly as +you use them with varying argument types, functions in packages have a +unique type (generally parameterized by the argument parameters of a +package) and a unique compilation residing on disk. + +The capsule itself is turned into a compiled function. This so-called +{\it capsule function} is what builds the initial environment spoken +of above. If the package has arguments (see below), then each call to +the package constructor with a distinct pair of arguments builds a +distinct package, each with its own local environment. \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugPackagesInputFilesTitle}{Input Files vs. Packages} -\newcommand{\ugPackagesInputFilesNumber}{11.5.} - -@ -\section{Input Files vs. Packages} -\label{ugPackagesInputFilesPage} -\index{pages!ugPackagesInputFilesPage!ug11.ht} -\index{ug11.ht!pages!ugPackagesInputFilesPage} -\index{ugPackagesInputFilesPage!ug11.ht!pages} +\pagehead{ugPackagesInputFilesPage}{ug11.ht}{Input Files vs. Packages} <>= \begin{page}{ugPackagesInputFilesPage}{11.5. Input Files vs. Packages} \beginscroll % -A good question at this point would be ``Is writing a package more difficult than -writing an input file?'' +A good question at this point would be +``Is writing a package more difficult than writing an input file?'' -The programs in input files are designed for flexibility and ease-of-use. -Axiom can usually work out all of your types as it reads your program -and does the computations you request. -Let's say that you define a one-argument function without giving its type. -When you first apply the function to a value, this -value is understood by Axiom as identifying the type for the -argument parameter. -Most of the time Axiom goes through the body of your function and -figures out the target type that you have in mind. -Axiom sometimes fails to get it right. -Then---and only then---do you need a declaration to tell Axiom what -type you want. +The programs in input files are designed for flexibility and +ease-of-use. Axiom can usually work out all of your types as it reads +your program and does the computations you request. Let's say that +you define a one-argument function without giving its type. When you +first apply the function to a value, this value is understood by Axiom +as identifying the type for the argument parameter. Most of the time +Axiom goes through the body of your function and figures out the +target type that you have in mind. Axiom sometimes fails to get it +right. Then---and only then---do you need a declaration to tell Axiom +what type you want. Input files are usually written to be read by Axiom---and by you. Without suitable documentation and declarations, your input files are likely incomprehensible to a colleague---and to you some months later! -Packages are designed for legibility, as well as -run-time efficiency. +Packages are designed for legibility, as well as run-time efficiency. There are few new concepts you need to learn to write -packages. Rather, you just have to be explicit about types -and type conversions. -The types of all functions are pre-declared so that Axiom---and the reader--- -knows precisely what types of arguments can be passed to and from -the functions (certainly you don't want a colleague to guess or to -have to work this out from context!). -The types of local variables are also declared. -Type conversions are explicit, never automatic.\footnote{There -is one exception to this rule: conversions from a subdomain to a -domain are automatic. -After all, the objects both have the domain as a common type.} - -In summary, packages are more tedious to write than input files. -When writing input files, you can casually go ahead, giving some -facts now, leaving others for later. -Writing packages requires forethought, care and discipline. +packages. Rather, you just have to be explicit about types and type +conversions. The types of all functions are pre-declared so that +Axiom---and the reader--- knows precisely what types of arguments can +be passed to and from the functions (certainly you don't want a +colleague to guess or to have to work this out from context!). The +types of local variables are also declared. Type conversions are +explicit, never automatic.\footnote{There is one exception to this +rule: conversions from a subdomain to a domain are automatic. After +all, the objects both have the domain as a common type.} + +In summary, packages are more tedious to write than input files. When +writing input files, you can casually go ahead, giving some facts now, +leaving others for later. Writing packages requires forethought, care +and discipline. \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugPackagesPackagesTitle}{Compiling Packages} -\newcommand{\ugPackagesPackagesNumber}{11.6.} - -@ -\section{Compiling Packages} -\label{ugPackagesPackagesPage} -\index{pages!ugPackagesPackagesPage!ug11.ht} -\index{ug11.ht!pages!ugPackagesPackagesPage} -\index{ugPackagesPackagesPage!ug11.ht!pages} +\pagehead{ugPackagesPackagesPage}{ug11.ht}{Compiling Packages} <>= \begin{page}{ugPackagesPackagesPage}{11.6. Compiling Packages} \beginscroll % -Once you have defined the package \nonLibAxiomType{DrawComplex}, -you need to compile and test it. -To compile the package, issue the system command \spadcmd{)compile drawpak}. -Axiom reads the file {\bf drawpak\spadFileExt{}} -and compiles its contents into machine binary. -If all goes well, the file {\bf DRAWCX.nrlib} is created in your -local directory for the package. -To test the package, you must load the package before trying an -operation. +Once you have defined the package \nonLibAxiomType{DrawComplex}, you +need to compile and test it. To compile the package, issue the system +command \spadcmd{)compile drawpak}. Axiom reads the file {\bf +drawpak\spadFileExt{}} and compiles its contents into machine binary. +If all goes well, the file {\bf DRAWCX.nrlib} is created in your local +directory for the package. To test the package, you must load the +package before trying an operation. \nullXtc{ Compile the package. @@ -46502,31 +42017,17 @@ Draw the \spadfun{Gamma} function. \end{page} @ -<>= -\newcommand{\ugPackagesParametersTitle}{Parameters} -\newcommand{\ugPackagesParametersNumber}{11.7.} - -@ -\section{Parameters} -\label{ugPackagesParametersPage} -\begin{itemize} -\item ugTypesPage \ref{ugTypesPage} on -page~\pageref{ugTypesPage} -\item ugUserBlocksPage \ref{ugUserBlocksPage} on -page~\pageref{ugUserBlocksPage} -\item ugCategoriesAttributesPage \ref{ugCategoriesAttributesPage} on -page~\pageref{ugCategoriesAttributesPage} -\end{itemize} -\index{pages!ugPackagesParametersPage!ug11.ht} -\index{ug11.ht!pages!ugPackagesParametersPage} -\index{ugPackagesParametersPage!ug11.ht!pages} +\pagehead{ugPackagesParametersPage}{ug11.ht}{Parameters} +\pageto{notitle}{ugTypesPage} +\pageto{notitle}{ugUserBlocksPage} +\pageto{notitle}{ugCategoriesAttributesPage} <>= \begin{page}{ugPackagesParametersPage}{11.7. Parameters} \beginscroll -% + The power of packages becomes evident when packages have parameters. -Usually these parameters are domains and the exported operations have types -involving these parameters. +Usually these parameters are domains and the exported operations have +types involving these parameters. In \downlink{``\ugTypesTitle''}{ugTypesPage} in Chapter \ugTypesNumber\ignore{ugTypes}, you learned that categories denote @@ -46587,15 +42088,14 @@ category \spadtype{IndexedAggregate(Integer,Entry)} with the two attributes \spadatt{shallowlyMutable} and \spadatt{finiteAggregate}. -Using \Browse{}, you can also discover that Axiom has many kinds of domains -with attribute \spadatt{shallowlyMutable}. -Those of class \axiomType{IndexedAggregate(Integer,Entry)} include -\axiomType{Bits}, \axiomType{FlexibleArray}, \axiomType{OneDimensionalArray}, +Using \Browse{}, you can also discover that Axiom has many kinds of +domains with attribute \spadatt{shallowlyMutable}. Those of class +\axiomType{IndexedAggregate(Integer,Entry)} include \axiomType{Bits}, +\axiomType{FlexibleArray}, \axiomType{OneDimensionalArray}, \axiomType{List}, \axiomType{String}, and \axiomType{Vector}, and also \axiomType{HashTable} and \axiomType{EqTable} with integer keys. Although you may never want to sort all such structures, we -nonetheless demonstrate Axiom's -ability to do so. +nonetheless demonstrate Axiom's ability to do so. Another requirement is that \nonLibAxiomType{Entry} has an operation \axiomOp{<}. One way to get this operation is to assume that @@ -46618,28 +42118,36 @@ of their arguments. \beginImportant \noindent -{\tt 1.\ \ \ SortPackage(S,A)\ :\ Exports\ ==\ Implementation\ where}\newline +{\tt 1.\ \ \ SortPackage(S,A)\ :\ Exports\ ==\ Implementation\ where} +\newline {\tt 2.\ \ \ \ \ S:\ Object}\newline {\tt 3.\ \ \ \ \ A:\ IndexedAggregate(Integer,S)}\newline -{\tt 4.\ \ \ \ \ \ \ with\ (finiteAggregate;\ shallowlyMutable)}\newline +{\tt 4.\ \ \ \ \ \ \ with\ (finiteAggregate;\ shallowlyMutable)} +\newline {\tt 5.\ \ \ }\newline {\tt 6.\ \ \ \ \ Exports\ ==\ with}\newline -{\tt 7.\ \ \ \ \ \ \ bubbleSort!:\ (A,(S,S)\ ->\ Boolean)\ ->\ A}\newline -{\tt 8.\ \ \ \ \ \ \ insertionSort!:\ (A,\ (S,S)\ ->\ Boolean)\ ->\ A}\newline +{\tt 7.\ \ \ \ \ \ \ bubbleSort!:\ (A,(S,S)\ ->\ Boolean)\ ->\ A} +\newline +{\tt 8.\ \ \ \ \ \ \ +insertionSort!:\ (A,\ (S,S)\ ->\ Boolean)\ ->\ A}\newline {\tt 9.\ \ \ }\newline {\tt 10.\ \ \ \ Implementation\ ==\ add}\newline {\tt 11.\ \ \ \ \ \ bubbleSort!(m,f)\ ==}\newline {\tt 12.\ \ \ \ \ \ \ \ n\ :=\ \#m}\newline {\tt 13.\ \ \ \ \ \ \ \ for\ i\ in\ 1..(n-1)\ repeat}\newline -{\tt 14.\ \ \ \ \ \ \ \ \ \ for\ j\ in\ n..(i+1)\ by\ -1\ repeat}\newline -{\tt 15.\ \ \ \ \ \ \ \ \ \ \ \ if\ f(m.j,m.(j-1))\ then\ swap!(m,j,j-1)}\newline +{\tt 14.\ \ \ \ \ \ \ \ \ \ +for\ j\ in\ n..(i+1)\ by\ -1\ repeat}\newline +{\tt 15.\ \ \ \ \ \ \ \ \ \ \ \ +if\ f(m.j,m.(j-1))\ then\ swap!(m,j,j-1)}\newline {\tt 16.\ \ \ \ \ \ \ \ m}\newline {\tt 17.\ \ \ \ \ \ insertionSort!(m,f)\ ==}\newline {\tt 18.\ \ \ \ \ \ \ \ for\ i\ in\ 2..\#m\ repeat}\newline {\tt 19.\ \ \ \ \ \ \ \ \ \ j\ :=\ i}\newline -{\tt 20.\ \ \ \ \ \ \ \ \ \ while\ j\ >\ 1\ and\ f(m.j,m.(j-1))\ repeat}\newline +{\tt 20.\ \ \ \ \ \ \ \ \ \ +while\ j\ >\ 1\ and\ f(m.j,m.(j-1))\ repeat}\newline {\tt 21.\ \ \ \ \ \ \ \ \ \ \ \ swap!(m,j,j-1)}\newline -{\tt 22.\ \ \ \ \ \ \ \ \ \ \ \ j\ :=\ (j\ -\ 1)\ pretend\ PositiveInteger}\newline +{\tt 22.\ \ \ \ \ \ \ \ \ \ \ \ +j\ :=\ (j\ -\ 1)\ pretend\ PositiveInteger}\newline {\tt 23.\ \ \ \ \ \ \ \ m}\newline \endImportant @@ -46648,39 +42156,28 @@ of their arguments. \end{page} @ -<>= -\newcommand{\ugPackagesCondsTitle}{Conditionals} -\newcommand{\ugPackagesCondsNumber}{11.8.} - -@ -\section{Conditionals} -\label{ugPackagesCondsPage} -\begin{itemize} -\item ugUserBlocksPage \ref{ugUserBlocksPage} on -page~\pageref{ugUserBlocksPage} -\end{itemize} -\index{pages!ugPackagesCondsPage!ug11.ht} -\index{ug11.ht!pages!ugPackagesCondsPage} -\index{ugPackagesCondsPage!ug11.ht!pages} +\pagehead{ugPackagesCondsPage}{ug11.ht}{Conditionals} +\pageto{notitle}{ugUserBlocksPage} <>= \begin{page}{ugPackagesCondsPage}{11.8. Conditionals} \beginscroll -% -When packages have parameters, you can say that an operation is or is not -exported depending on the values of those parameters. -When the domain of objects \axiom{S} has an \axiomOp{<} -operation, we can supply one-argument versions of -\axiom{bubbleSort} and \axiom{insertionSort} which use this operation -for sorting. -The presence of the -operation \axiomOp{<} is guaranteed when \axiom{S} is an ordered set. + +When packages have parameters, you can say that an operation is or is +not exported depending on the values of those parameters. When the +domain of objects \axiom{S} has an \axiomOp{<} operation, we can +supply one-argument versions of \axiom{bubbleSort} and +\axiom{insertionSort} which use this operation for sorting. The +presence of the operation \axiomOp{<} is guaranteed when \axiom{S} is +an ordered set. \beginImportant \noindent {\tt 1.\ \ \ Exports\ ==\ with}\newline -{\tt 2.\ \ \ \ \ \ \ bubbleSort!:\ (A,(S,S)\ ->\ Boolean)\ ->\ A}\newline -{\tt 3.\ \ \ \ \ \ \ insertionSort!:\ (A,\ (S,S)\ ->\ Boolean)\ ->\ A}\newline +{\tt 2.\ \ \ \ \ \ \ bubbleSort!:\ (A,(S,S)\ ->\ Boolean)\ ->\ A} +\newline +{\tt 3.\ \ \ \ \ \ \ +insertionSort!:\ (A,\ (S,S)\ ->\ Boolean)\ ->\ A}\newline {\tt 4.\ \ \ }\newline {\tt 5.\ \ \ \ \ \ \ if\ S\ has\ OrderedSet\ then}\newline {\tt 6.\ \ \ \ \ \ \ \ \ bubbleSort!:\ A\ ->\ A}\newline @@ -46700,8 +42197,10 @@ corresponding two-argument functions with the operation {\tt 1.\ \ \ \ \ Implementation\ ==\ add}\newline {\tt 2.\ \ \ \ \ \ \ \ \ \ ...}\newline {\tt 3.\ \ \ \ \ \ \ if\ S\ has\ OrderedSet\ then}\newline -{\tt 4.\ \ \ \ \ \ \ \ \ bubbleSort!(m)\ ==\ bubbleSort!(m,<\$S)}\newline -{\tt 5.\ \ \ \ \ \ \ \ \ insertionSort!(m)\ ==\ insertionSort!(m,<\$S)}\newline +{\tt 4.\ \ \ \ \ \ \ \ \ +bubbleSort!(m)\ ==\ bubbleSort!(m,<\$S)}\newline +{\tt 5.\ \ \ \ \ \ \ \ \ +insertionSort!(m)\ ==\ insertionSort!(m,<\$S)}\newline \endImportant In \downlink{``\ugUserBlocksTitle''}{ugUserBlocksPage} in Section @@ -46725,11 +42224,13 @@ for array-like structures. \noindent {\tt 1.\ \ \ Implementation\ ==\ add}\newline {\tt 2.\ \ \ \ \ \ \ \ \ \ \ ...}\newline -{\tt 3.\ \ \ \ \ \ \ if\ A\ has\ UnaryRecursiveAggregate(S)\ then}\newline +{\tt 3.\ \ \ \ \ \ \ if\ A\ has\ UnaryRecursiveAggregate(S)\ then} +\newline {\tt 4.\ \ \ \ \ \ \ \ \ bubbleSort!(m,fn)\ ==}\newline {\tt 5.\ \ \ \ \ \ \ \ \ \ \ empty?\ m\ =>\ m}\newline {\tt 6.\ \ \ \ \ \ \ \ \ \ \ l\ :=\ m}\newline -{\tt 7.\ \ \ \ \ \ \ \ \ \ \ while\ not\ empty?\ (r\ :=\ l.rest)\ repeat}\newline +{\tt 7.\ \ \ \ \ \ \ \ \ \ \ +while\ not\ empty?\ (r\ :=\ l.rest)\ repeat}\newline {\tt 8.\ \ \ \ \ \ \ \ \ \ \ \ \ \ r\ :=\ bubbleSort!\ r}\newline {\tt 9.\ \ \ \ \ \ \ \ \ \ \ \ \ \ x\ :=\ l.first}\newline {\tt 10.\ \ \ \ \ \ \ \ \ \ \ \ \ if\ fn(r.first,x)\ then}\newline @@ -46758,7 +42259,8 @@ Another equivalent way to write the capsule is to use an \beginImportant \noindent -{\tt 1.\ \ \ \ \ \ \ \ if\ A\ has\ UnaryRecursiveAggregate(S)\ then}\newline +{\tt 1.\ \ \ \ \ \ \ \ if\ A\ has\ UnaryRecursiveAggregate(S)\ then} +\newline {\tt 2.\ \ \ \ \ \ \ \ \ \ \ ...}\newline {\tt 3.\ \ \ \ \ \ \ \ else}\newline {\tt 4.\ \ \ \ \ \ \ \ \ \ \ ...}\newline @@ -46769,27 +42271,15 @@ Another equivalent way to write the capsule is to use an \end{page} @ -<>= -\newcommand{\ugPackagesCompilingTitle}{Testing} -\newcommand{\ugPackagesCompilingNumber}{11.9.} - -@ -\section{Testing} -\label{ugPackagesCompilingPage} -\begin{itemize} -\item EqTableXmpPage \ref{EqTableXmpPage} on -page~\pageref{EqTableXmpPage} -\end{itemize} -\index{pages!ugPackagesCompilingPage!ug11.ht} -\index{ug11.ht!pages!ugPackagesCompilingPage} -\index{ugPackagesCompilingPage!ug11.ht!pages} +\pagehead{ugPackagesCompilingPage}{ug11.ht}{Testing} +\pageto{notitle}{EqTableXmpPage} <>= \begin{page}{ugPackagesCompilingPage}{11.9. Testing} \beginscroll -% -Once you have written the package, embed it in a file, for example, {\bf -sortpak\spadFileExt{}}. -Be sure to include an \axiom{)abbrev} command at the top of the file: + +Once you have written the package, embed it in a file, for example, +{\bf sortpak\spadFileExt{}}. Be sure to include an \axiom{)abbrev} +command at the top of the file: \begin{verbatim} )abbrev package SORTPAK SortPackage \end{verbatim} @@ -46881,35 +42371,24 @@ Now sort it. \end{page} @ -<>= -\newcommand{\ugPackagesHowTitle}{How Packages Work} -\newcommand{\ugPackagesHowNumber}{11.10.} - -@ -\section{How Packages Work} -\label{ugPackagesHowPage} -\begin{itemize} -\item ugCategoriesHierPage \ref{ugCategoriesHierPage} on -page~\pageref{ugCategoriesHierPage} -\end{itemize} -\index{pages!ugPackagesHowPage!ug11.ht} -\index{ug11.ht!pages!ugPackagesHowPage} -\index{ugPackagesHowPage!ug11.ht!pages} +\pagehead{ugPackagesHowPage}{ug11.ht}{How Packages Work} +\pageto{notitle}{ugCategoriesHierPage} <>= \begin{page}{ugPackagesHowPage}{11.10. How Packages Work} \beginscroll -% + Recall that packages as abstract datatypes are compiled independently -and put into the library. -The curious reader may ask: ``How is the interpreter able to find an -operation such as \fakeAxiomFun{bubbleSort!}? -Also, how is a single compiled function such as \fakeAxiomFun{bubbleSort!} able -to sort data of different types?'' - -After the interpreter loads the package \nonLibAxiomType{SortPackage}, the four -operations from the package become known to the interpreter. -Each of these operations is expressed as a {\it modemap} in which the type -of the operation is written in terms of symbolic domains. +and put into the library. The curious reader may ask: ``How is the +interpreter able to find an operation such as +\fakeAxiomFun{bubbleSort!}? Also, how is a single compiled function +such as \fakeAxiomFun{bubbleSort!} able to sort data of different +types?'' + +After the interpreter loads the package \nonLibAxiomType{SortPackage}, +the four operations from the package become known to the interpreter. +Each of these operations is expressed as a {\it modemap} in which the +type of the operation is written in terms of symbolic domains. + \nullXtc{ See the modemaps for \fakeAxiomFun{bubbleSort!}. }{ @@ -46967,44 +42446,20 @@ environment and produces the result. \endscroll \autobuttons @ \chapter{Users Guide Chapter 12 (ug12.ht)} -<>= -\newcommand{\ugCategoriesTitle}{Categories} -\newcommand{\ugCategoriesNumber}{12.} - -@ -\section{Categories} -\label{ugCategoriesPage} -\begin{itemize} -\item ugTypesBasicDomainConsPage \ref{ugTypesBasicDomainConsPage} on -page~\pageref{ugTypesBasicDomainConsPage} -\item ugCategoriesDefsPage \ref{ugCategoriesDefsPage} on -page~\pageref{ugCategoriesDefsPage} -\item ugCategoriesExportsPage \ref{ugCategoriesExportsPage} on -page~\pageref{ugCategoriesExportsPage} -\item ugCategoriesDocPage \ref{ugCategoriesDocPage} on -page~\pageref{ugCategoriesDocPage} -\item ugCategoriesHierPage \ref{ugCategoriesHierPage} on -page~\pageref{ugCategoriesHierPage} -\item ugCategoriesMembershipPage \ref{ugCategoriesMembershipPage} on -page~\pageref{ugCategoriesMembershipPage} -\item ugCategoriesDefaultsPage \ref{ugCategoriesDefaultsPage} on -page~\pageref{ugCategoriesDefaultsPage} -\item ugCategoriesAxiomsPage \ref{ugCategoriesAxiomsPage} on -page~\pageref{ugCategoriesAxiomsPage} -\item ugCategoriesCorrectnessPage \ref{ugCategoriesCorrectnessPage} on -page~\pageref{ugCategoriesCorrectnessPage} -\item ugCategoriesAttributesPage \ref{ugCategoriesAttributesPage} on -page~\pageref{ugCategoriesAttributesPage} -\item ugCategoriesParametersPage \ref{ugCategoriesParametersPage} on -page~\pageref{ugCategoriesParametersPage} -\item ugCategoriesConditionalsPage \ref{ugCategoriesConditionalsPage} on -page~\pageref{ugCategoriesConditionalsPage} -\item ugCategoriesAndPackagesPage \ref{ugCategoriesAndPackagesPage} on -page~\pageref{ugCategoriesAndPackagesPage} -\end{itemize} -\index{pages!ugCategoriesPage!ug12.ht} -\index{ug12.ht!pages!ugCategoriesPage} -\index{ugCategoriesPage!ug12.ht!pages} +\pagehead{ugCategoriesPage}{ug12.ht}{Categories} +\pageto{notitle}{ugTypesBasicDomainConsPage} +\pageto{notitle}{ugCategoriesDefsPage} +\pageto{notitle}{ugCategoriesExportsPage} +\pageto{notitle}{ugCategoriesDocPage} +\pageto{notitle}{ugCategoriesHierPage} +\pageto{notitle}{ugCategoriesMembershipPage} +\pageto{notitle}{ugCategoriesDefaultsPage} +\pageto{notitle}{ugCategoriesAxiomsPage} +\pageto{notitle}{ugCategoriesCorrectnessPage} +\pageto{notitle}{ugCategoriesAttributesPage} +\pageto{notitle}{ugCategoriesParametersPage} +\pageto{notitle}{ugCategoriesConditionalsPage} +\pageto{notitle}{ugCategoriesAndPackagesPage} <>= \begin{page}{ugCategoriesPage}{12. Categories} \beginscroll @@ -47052,42 +42507,30 @@ generally means that the existing superstructures (domains) built on the changed parts of the foundation (categories) have to be rebuilt---that is, recompiled. -Before delving into some of the interesting facts about categories, let's see -how you define them in Axiom. +Before delving into some of the interesting facts about categories, +let's see how you define them in Axiom. \beginmenu - \menudownlink{{12.1. Definitions}}{ugCategoriesDefsPage} - \menudownlink{{12.2. Exports}}{ugCategoriesExportsPage} - \menudownlink{{12.3. Documentation}}{ugCategoriesDocPage} - \menudownlink{{12.4. Hierarchies}}{ugCategoriesHierPage} - \menudownlink{{12.5. Membership}}{ugCategoriesMembershipPage} - \menudownlink{{12.6. Defaults}}{ugCategoriesDefaultsPage} - \menudownlink{{12.7. Axioms}}{ugCategoriesAxiomsPage} - \menudownlink{{12.8. Correctness}}{ugCategoriesCorrectnessPage} - \menudownlink{{12.9. Attributes}}{ugCategoriesAttributesPage} - \menudownlink{{12.10. Parameters}}{ugCategoriesParametersPage} - \menudownlink{{12.11. Conditionals}}{ugCategoriesConditionalsPage} - \menudownlink{{12.12. Anonymous Categories}}{ugCategoriesAndPackagesPage} +\menudownlink{{12.1. Definitions}}{ugCategoriesDefsPage} +\menudownlink{{12.2. Exports}}{ugCategoriesExportsPage} +\menudownlink{{12.3. Documentation}}{ugCategoriesDocPage} +\menudownlink{{12.4. Hierarchies}}{ugCategoriesHierPage} +\menudownlink{{12.5. Membership}}{ugCategoriesMembershipPage} +\menudownlink{{12.6. Defaults}}{ugCategoriesDefaultsPage} +\menudownlink{{12.7. Axioms}}{ugCategoriesAxiomsPage} +\menudownlink{{12.8. Correctness}}{ugCategoriesCorrectnessPage} +\menudownlink{{12.9. Attributes}}{ugCategoriesAttributesPage} +\menudownlink{{12.10. Parameters}}{ugCategoriesParametersPage} +\menudownlink{{12.11. Conditionals}}{ugCategoriesConditionalsPage} +\menudownlink{{12.12. Anonymous Categories}}{ugCategoriesAndPackagesPage} \endmenu \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugCategoriesDefsTitle}{Definitions} -\newcommand{\ugCategoriesDefsNumber}{12.1.} - -@ -\section{Definitions} -\label{ugCategoriesDefsPage} -\begin{itemize} -\item ugTypesPage \ref{ugTypesPage} on -page~\pageref{ugTypesPage} -\end{itemize} -\index{pages!ugCategoriesDefsPage!ug12.ht} -\index{ug12.ht!pages!ugCategoriesDefsPage} -\index{ugCategoriesDefsPage!ug12.ht!pages} +\pagehead{ugCategoriesDefsPage}{ug12.ht}{Definitions} +\pageto{notitle}{ugTypesPage} <>= \begin{page}{ugCategoriesDefsPage}{12.1. Definitions} \beginscroll @@ -47097,7 +42540,8 @@ any other function in Axiom. \beginImportant The definition of a category has the syntax: -\centerline{{{\it CategoryForm} : {\tt Category\quad{}==\quad{}} {\it Extensions} {\tt [ with} {\it Exports} {\tt ]}}} +\centerline{{{\it CategoryForm} : {\tt Category\quad{}==\quad{}} +{\it Extensions} {\tt [ with} {\it Exports} {\tt ]}}} The brackets {\tt [ ]} here indicate optionality. \endImportant @@ -47170,16 +42614,7 @@ In fact, the {\tt Type} is optional in this line; ``{\tt with \end{page} @ -<>= -\newcommand{\ugCategoriesExportsTitle}{Exports} -\newcommand{\ugCategoriesExportsNumber}{12.2.} - -@ -\section{Exports} -\label{ugCategoriesExportsPage} -\index{pages!ugCategoriesExportsPage!ug12.ht} -\index{ug12.ht!pages!ugCategoriesExportsPage} -\index{ugCategoriesExportsPage!ug12.ht!pages} +\pagehead{ugCategoriesExportsPage}{ug12.ht}{Exports} <>= \begin{page}{ugCategoriesExportsPage}{12.2. Exports} \beginscroll @@ -47230,16 +42665,7 @@ aThreeArgumentOperation: ($,Integer,$) -> Fraction($) \end{page} @ -<>= -\newcommand{\ugCategoriesDocTitle}{Documentation} -\newcommand{\ugCategoriesDocNumber}{12.3.} - -@ -\section{Documentation} -\label{ugCategoriesDocPage} -\index{pages!ugCategoriesDocPage!ug12.ht} -\index{ug12.ht!pages!ugCategoriesDocPage} -\index{ugCategoriesDocPage!ug12.ht!pages} +\pagehead{ugCategoriesDocPage}{ug12.ht}{Documentation} <>= \begin{page}{ugCategoriesDocPage}{12.3. Documentation} \beginscroll @@ -47252,15 +42678,19 @@ Here is its definition, complete with documentation. \noindent {\tt 1.\ \ \ ++\ Description:}\newline -{\tt 2.\ \ \ ++\ \bs{}axiomType\{SetCategory\}\ is\ the\ basic\ category}\newline -{\tt 3.\ \ \ ++\ for\ describing\ a\ collection\ of\ elements\ with}\newline -{\tt 4.\ \ \ ++\ \bs{}axiomOp\{=\}\ (equality)\ and\ a\ \bs{}axiomFun\{coerce\}}\newline +{\tt 2.\ \ \ ++\ +\bs{}axiomType\{SetCategory\}\ is\ the\ basic\ category}\newline +{\tt 3.\ \ \ ++\ +for\ describing\ a\ collection\ of\ elements\ with}\newline +{\tt 4.\ \ \ ++\ +\bs{}axiomOp\{=\}\ (equality)\ and\ a\ \bs{}axiomFun\{coerce\}}\newline {\tt 5.\ \ \ ++\ to\ \bs{}axiomType\{OutputForm\}.}\newline {\tt 6.\ \ \ }\newline {\tt 7.\ \ \ SetCategory():\ Category\ ==}\newline {\tt 8.\ \ \ \ \ Join(Type,\ CoercibleTo\ OutputForm)\ with}\newline {\tt 9.\ \ \ \ \ \ \ "=":\ (\$,\ \$)\ ->\ Boolean}\newline -{\tt 10.\ \ \ \ \ \ \ \ ++\ \bs{}axiom\{x\ =\ y\}\ tests\ if\ \bs{}axiom\{x\}\ and}\newline +{\tt 10.\ \ \ \ \ \ \ \ ++\ +\bs{}axiom\{x\ =\ y\}\ tests\ if\ \bs{}axiom\{x\}\ and}\newline {\tt 11.\ \ \ \ \ \ \ \ ++\ \bs{}axiom\{y\}\ are\ equal.}\newline \endImportant @@ -47276,20 +42706,18 @@ area as well but are currently ignored by Axiom.} All lines of the description following the initial line are indented by the same amount. -{\texht{\sloppy}{} -Surround the name of any constructor (with or without parameters) with an -\texht{\verb+\axiomType{}+}{\\axiomType\{\}}. -Similarly, surround an -operator name with \texht{\verb+\axiomOp{}+}{\\axiomOp\{\}}, -an Axiom operation with \texht{\verb+\axiomFun{}+}{\\axiomFun\{\}}, and a +{\texht{\sloppy}{} Surround the name of any constructor (with or +without parameters) with an +\texht{\verb+\axiomType{}+}{\\axiomType\{\}}. Similarly, surround an +operator name with \texht{\verb+\axiomOp{}+}{\\axiomOp\{\}}, an Axiom +operation with \texht{\verb+\axiomFun{}+}{\\axiomFun\{\}}, and a variable or Axiom expression with -\texht{\verb+\axiom{}+}{\\axiom\{\}}. -Library documentation is given in a \TeX{}-like language so that -it can be used both for hard-copy and for \Browse{}. -These different wrappings cause operations and types to have -mouse-active buttons in \Browse{}. -For hard-copy output, wrapped expressions appear in a different font. -The above documentation appears in hard-copy as: +\texht{\verb+\axiom{}+}{\\axiom\{\}}. Library documentation is given +in a \TeX{}-like language so that it can be used both for hard-copy +and for \Browse{}. These different wrappings cause operations and +types to have mouse-active buttons in \Browse{}. For hard-copy +output, wrapped expressions appear in a different font. The above +documentation appears in hard-copy as: } % @@ -47318,16 +42746,7 @@ category descriptions. \end{page} @ -<>= -\newcommand{\ugCategoriesHierTitle}{Hierarchies} -\newcommand{\ugCategoriesHierNumber}{12.4.} - -@ -\section{Hierarchies} -\label{ugCategoriesHierPage} -\index{pages!ugCategoriesHierPage!ug12.ht} -\index{ug12.ht!pages!ugCategoriesHierPage} -\index{ugCategoriesHierPage!ug12.ht!pages} +\pagehead{ugCategoriesHierPage}{ug12.ht}{Hierarchies} <>= \begin{page}{ugCategoriesHierPage}{12.4. Hierarchies} \beginscroll @@ -47367,16 +42786,7 @@ included for emphasis. \end{page} @ -<>= -\newcommand{\ugCategoriesMembershipTitle}{Membership} -\newcommand{\ugCategoriesMembershipNumber}{12.5.} - -@ -\section{Membership} -\label{ugCategoriesMembershipPage} -\index{pages!ugCategoriesMembershipPage!ug12.ht} -\index{ug12.ht!pages!ugCategoriesMembershipPage} -\index{ugCategoriesMembershipPage!ug12.ht!pages} +\pagehead{ugCategoriesMembershipPage}{ug12.ht}{Membership} <>= \begin{page}{ugCategoriesMembershipPage}{12.5. Membership} \beginscroll @@ -47436,22 +42846,9 @@ operations \spadop{*} and \spadop{**}. \end{page} @ -<>= -\newcommand{\ugCategoriesDefaultsTitle}{Defaults} -\newcommand{\ugCategoriesDefaultsNumber}{12.6.} - -@ -\section{Defaults} -\label{ugCategoriesDefaultsPage} -\begin{itemize} -\item ugCategoriesHierPage \ref{ugCategoriesHierPage} on -page~\pageref{ugCategoriesHierPage} -\item ugPackagesPage \ref{ugPackagesPage} on -page~\pageref{ugPackagesPage} -\end{itemize} -\index{pages!ugCategoriesDefaultsPage!ug12.ht} -\index{ug12.ht!pages!ugCategoriesDefaultsPage} -\index{ugCategoriesDefaultsPage!ug12.ht!pages} +\pagehead{ugCategoriesDefaultsPage}{ug12.ht}{Defaults} +\pageto{notitle}{ugCategoriesHierPage} +\pageto{notitle}{ugPackagesPage} <>= \begin{page}{ugCategoriesDefaultsPage}{12.6. Defaults} \beginscroll @@ -47471,27 +42868,25 @@ Here now is its complete Axiom definition. {\tt 3.\ \ \ \ \ \ \ \ \ "**":\ (\$,\ PositiveInteger)\ ->\ \$}\newline {\tt 4.\ \ \ \ \ \ \ add}\newline {\tt 5.\ \ \ \ \ \ \ \ \ import\ RepeatedSquaring(\$)}\newline -{\tt 6.\ \ \ \ \ \ \ \ \ x:\ \$\ **\ n:\ PositiveInteger\ ==\ expt(x,n)}\newline +{\tt 6.\ \ \ \ \ \ \ \ \ +x:\ \$\ **\ n:\ PositiveInteger\ ==\ expt(x,n)}\newline \endImportant -The \spad{add} part at the end is used to give ``default definitions'' for -\spadkey{add} -exported operations. -Once you have a multiplication operation \spadop{*}, you can -define exponentiation -for positive integer exponents -using repeated multiplication: -\centerline{{\spad{x ** n = x * x * ... * x} ( \spad{n} copies of \spad{x} )}} -This definition for \spadop{**} is called a {\it default} definition. -In general, a category can give default definitions for any -operation it exports. -Since \spadtype{SemiGroup} and all its category descendants in the hierarchy -export \spadop{**}, any descendant category may redefine \spadop{**} as well. - -A domain of category \spadtype{SemiGroup} -(such as \spadtype{Integer}) may or may not choose to -define its own \spadop{**} operation. -If it does not, a default definition that is closest (in a ``tree-distance'' +The \spad{add} part at the end is used to give ``default definitions'' +for \spadkey{add} exported operations. Once you have a multiplication +operation \spadop{*}, you can define exponentiation for positive +integer exponents using repeated multiplication: +\centerline{{\spad{x ** n = x * x * ... * x} +( \spad{n} copies of \spad{x} )}} This +definition for \spadop{**} is called a {\it default} definition. In +general, a category can give default definitions for any operation it +exports. Since \spadtype{SemiGroup} and all its category descendants +in the hierarchy export \spadop{**}, any descendant category may +redefine \spadop{**} as well. + +A domain of category \spadtype{SemiGroup} (such as \spadtype{Integer}) +may or may not choose to define its own \spadop{**} operation. If it +does not, a default definition that is closest (in a ``tree-distance'' sense of the hierarchy) to the domain is chosen. The part of the category definition following an \spadop{add} operation @@ -47525,7 +42920,8 @@ as automatically generated by Axiom from the above definition of \beginImportant \noindent -{\tt 1.\ \ \ SemiGroup\_\&(\$):\ Exports\ ==\ Implementation\ where}\newline +{\tt 1.\ \ \ SemiGroup\_\&(\$):\ Exports\ ==\ Implementation\ where} +\newline {\tt 2.\ \ \ \ \ \$:\ SemiGroup}\newline {\tt 3.\ \ \ \ \ Exports\ ==\ with}\newline {\tt 4.\ \ \ \ \ \ \ "**":\ (\$,\ PositiveInteger)\ ->\ \$}\newline @@ -47539,20 +42935,8 @@ as automatically generated by Axiom from the above definition of \end{page} @ -<>= -\newcommand{\ugCategoriesAxiomsTitle}{Axioms} -\newcommand{\ugCategoriesAxiomsNumber}{12.7.} - -@ -\section{Axioms} -\label{ugCategoriesAxiomsPage} -\begin{itemize} -\item ugCategoriesDefaultsPage \ref{ugCategoriesDefaultsPage} on -page~\pageref{ugCategoriesDefaultsPage} -\end{itemize} -\index{pages!ugCategoriesAxiomsPage!ug12.ht} -\index{ug12.ht!pages!ugCategoriesAxiomsPage} -\index{ugCategoriesAxiomsPage!ug12.ht!pages} +\pagehead{ugCategoriesAxiomsPage}{ug12.ht}{Axioms} +\pageto{notitle}{ugCategoriesDefaultsPage} <>= \begin{page}{ugCategoriesAxiomsPage}{12.7. Axioms} \beginscroll @@ -47604,16 +42988,7 @@ implicit by the use of the name \spadtype{Ring}. \end{page} @ -<>= -\newcommand{\ugCategoriesCorrectnessTitle}{Correctness} -\newcommand{\ugCategoriesCorrectnessNumber}{12.8.} - -@ -\section{Correctness} -\label{ugCategoriesCorrectnessPage} -\index{pages!ugCategoriesCorrectnessPage!ug12.ht} -\index{ug12.ht!pages!ugCategoriesCorrectnessPage} -\index{ugCategoriesCorrectnessPage!ug12.ht!pages} +\pagehead{ugCategoriesCorrectnessPage}{ug12.ht}{Correctness} <>= \begin{page}{ugCategoriesCorrectnessPage}{12.8. Correctness} \beginscroll @@ -47637,16 +43012,16 @@ extend Axiom to always invent new names for operations. Axiom allows you to reuse names, and then use context to disambiguate one from another. -Here is another example of why this is important. -Some languages, such as {\bf APL}, -denote the \spadtype{Boolean} constants \spad{true} and -\spad{false} by the integers \spad{1} and \spad{0}. -You may want to let infix operators \spadop{+} and \spadop{*} serve as the logical -operators \spadfun{or} and \spadfun{and}, respectively. -But note this: \spadtype{Boolean} is not a ring. -The {\it inverse axiom} for \spadtype{Ring} states: -% -\centerline{{Every element \spad{x} has an additive inverse \spad{y} such that}} +Here is another example of why this is important. Some languages, +such as {\bf APL}, denote the \spadtype{Boolean} constants \spad{true} +and \spad{false} by the integers \spad{1} and \spad{0}. You may want +to let infix operators \spadop{+} and \spadop{*} serve as the logical +operators \spadfun{or} and \spadfun{and}, respectively. But note +this: \spadtype{Boolean} is not a ring. The {\it inverse axiom} for +\spadtype{Ring} states: + +\centerline{ +{Every element \spad{x} has an additive inverse \spad{y} such that}} \centerline{{\spad{x + y = 0}.}} % \spadtype{Boolean} is not a ring since \spad{true} has @@ -47661,28 +43036,16 @@ is not confused with the one for \spadtype{Ring}. Since the \spadtype{Polynomial} constructor requires its argument to be a ring, Axiom would then refuse to build the domain \spadtype{Polynomial(Boolean)}. Also, Axiom would refuse to -wrongfully apply algorithms to \spadtype{Boolean} elements that presume that the -ring axioms for \spadop{+} hold. +wrongfully apply algorithms to \spadtype{Boolean} elements that +presume that the ring axioms for \spadop{+} hold. \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugCategoriesAttributesTitle}{Attributes} -\newcommand{\ugCategoriesAttributesNumber}{12.9.} - -@ -\section{Attributes} -\label{ugCategoriesAttributesPage} -\begin{itemize} -\item ugDomainsAssertionsPage \ref{ugDomainsAssertionsPage} on -page~\pageref{ugDomainsAssertionsPage} -\end{itemize} -\index{pages!ugCategoriesAttributesPage!ug12.ht} -\index{ug12.ht!pages!ugCategoriesAttributesPage} -\index{ugCategoriesAttributesPage!ug12.ht!pages} +\pagehead{ugCategoriesAttributesPage}{ug12.ht}{Attributes} +\pageto{notitle}{ugDomainsAssertionsPage} <>= \begin{page}{ugCategoriesAttributesPage}{12.9. Attributes} \beginscroll @@ -47696,7 +43059,8 @@ Its definition is given by its documentation: \texht{\begingroup \parindent=1pc \narrower\noindent}{\indent{3}}% A domain \spad{R} has \spadatt{commutative("*")} - if it has an operation "*": \spadsig{(R,R)}{R} such that \spad{x * y = y * x}. + if it has an operation "*": \spadsig{(R,R)}{R} +such that \spad{x * y = y * x}. \texht{\par\endgroup}{\indent{0}} Just as you can test whether a domain has the category \spadtype{Ring}, you @@ -47763,27 +43127,16 @@ to rings but do not have this attribute). \end{page} @ -<>= -\newcommand{\ugCategoriesParametersTitle}{Parameters} -\newcommand{\ugCategoriesParametersNumber}{12.10.} - -@ -\section{Parameters} -\label{ugCategoriesParametersPage} -\index{pages!ugCategoriesParametersPage!ug12.ht} -\index{ug12.ht!pages!ugCategoriesParametersPage} -\index{ugCategoriesParametersPage!ug12.ht!pages} +\pagehead{ugCategoriesParametersPage}{ug12.ht}{Parameters} <>= \begin{page}{ugCategoriesParametersPage}{12.10. Parameters} \beginscroll Like domain constructors, category constructors can also have -parameters. -For example, category \spadtype{MatrixCategory} is a parameterized -category for defining matrices over a ring \spad{R} so that the -matrix domains can have -different representations and indexing schemes. -Its definition has the form: +parameters. For example, category \spadtype{MatrixCategory} is a +parameterized category for defining matrices over a ring \spad{R} so +that the matrix domains can have different representations and +indexing schemes. Its definition has the form: \beginImportant @@ -47792,13 +43145,12 @@ Its definition has the form: {\tt 2.\ \ \ \ \ \ \ TwoDimensionalArrayCategory(R,Row,Col)\ with\ ...}\newline \endImportant -The category extends \spadtype{TwoDimensionalArrayCategory} with -the same arguments. -You cannot find \spadtype{TwoDimensionalArrayCategory} in the -algebraic hierarchy listing. -Rather, it is a member of the data structure hierarchy, -given inside the back cover of this book. -In particular, \spadtype{TwoDimensionalArrayCategory} is an extension of +The category extends \spadtype{TwoDimensionalArrayCategory} with the +same arguments. You cannot find +\spadtype{TwoDimensionalArrayCategory} in the algebraic hierarchy +listing. Rather, it is a member of the data structure hierarchy, +given inside the back cover of this book. In particular, +\spadtype{TwoDimensionalArrayCategory} is an extension of \spadtype{HomogeneousAggregate} since its elements are all one type. The domain \spadtype{Matrix(R)}, the class of matrices with coefficients @@ -47825,7 +43177,8 @@ Adding the declarations for parameters to the definition for {\tt 2.\ \ \ (Row,\ Col):\ FiniteLinearAggregate(R)}\newline {\tt 3.\ \ \ }\newline {\tt 4.\ \ \ MatrixCategory(R,\ Row,\ Col):\ Category\ ==}\newline -{\tt 5.\ \ \ \ \ \ \ TwoDimensionalArrayCategory(R,\ Row,\ Col)\ with\ ...}\newline +{\tt 5.\ \ \ \ \ \ \ +TwoDimensionalArrayCategory(R,\ Row,\ Col)\ with\ ...}\newline \endImportant \endscroll @@ -47833,20 +43186,8 @@ Adding the declarations for parameters to the definition for \end{page} @ -<>= -\newcommand{\ugCategoriesConditionalsTitle}{Conditionals} -\newcommand{\ugCategoriesConditionalsNumber}{12.11.} - -@ -\section{Conditionals} -\label{ugCategoriesConditionalsPage} -\begin{itemize} -\item ugPackagesCondsPage \ref{ugPackagesCondsPage} on -page~\pageref{ugPackagesCondsPage} -\end{itemize} -\index{pages!ugCategoriesConditionalsPage!ug12.ht} -\index{ug12.ht!pages!ugCategoriesConditionalsPage} -\index{ugCategoriesConditionalsPage!ug12.ht!pages} +\pagehead{ugCategoriesConditionalsPage}{ug12.ht}{Conditionals} +\pageto{notitle}{ugPackagesCondsPage} <>= \begin{page}{ugCategoriesConditionalsPage}{12.11. Conditionals} \beginscroll @@ -47914,20 +43255,8 @@ example. \end{page} @ -<>= -\newcommand{\ugCategoriesAndPackagesTitle}{Anonymous Categories} -\newcommand{\ugCategoriesAndPackagesNumber}{12.12.} - -@ -\section{Anonymous Categories} -\label{ugCategoriesAndPackagesPage} -\begin{itemize} -\item ugPackagesAbstractPage \ref{ugPackagesAbstractPage} on -page~\pageref{ugPackagesAbstractPage} -\end{itemize} -\index{pages!ugCategoriesAndPackagesPage!ug12.ht} -\index{ug12.ht!pages!ugCategoriesAndPackagesPage} -\index{ugCategoriesAndPackagesPage!ug12.ht!pages} +\pagehead{ugCategoriesAndPackagesPage}{ug12.ht}{Anonymous Categories} +\pageto{notitle}{ugPackagesAbstractPage} <>= \begin{page}{ugCategoriesAndPackagesPage}{12.12. Anonymous Categories} \beginscroll @@ -47946,8 +43275,10 @@ this category a name: \noindent {\tt 1.\ \ \ DrawComplexCategory():\ Category\ ==\ with}\newline -{\tt 2.\ \ \ \ \ \ drawComplex:\ (C\ ->\ C,S,S,Boolean)\ ->\ VIEW3D}\newline -{\tt 3.\ \ \ \ \ \ drawComplexVectorField:\ (C\ ->\ C,S,S)\ ->\ VIEW3D}\newline +{\tt 2.\ \ \ \ \ \ +drawComplex:\ (C\ ->\ C,S,S,Boolean)\ ->\ VIEW3D}\newline +{\tt 3.\ \ \ \ \ \ +drawComplexVectorField:\ (C\ ->\ C,S,S)\ ->\ VIEW3D}\newline {\tt 4.\ \ \ \ \ \ setRealSteps:\ INT\ ->\ INT}\newline {\tt 5.\ \ \ \ \ \ setImagSteps:\ INT\ ->\ INT}\newline {\tt 6.\ \ \ \ \ \ setClipValue:\ DFLOAT->\ DFLOAT}\newline @@ -47958,7 +43289,8 @@ and then define \spadtype{DrawComplex} by: \beginImportant \noindent -{\tt 1.\ \ \ DrawComplex():\ DrawComplexCategory\ ==\ Implementation}\newline +{\tt 1.\ \ \ DrawComplex():\ DrawComplexCategory\ ==\ Implementation} +\newline {\tt 2.\ \ \ \ \ \ where}\newline {\tt 3.\ \ \ \ \ \ \ \ \ ...}\newline \endImportant @@ -47977,72 +43309,46 @@ before the {\tt with}. @ \chapter{Users Guide Chapter 13 (ug13.ht)} -<>= -\newcommand{\ugDomainsTitle}{Domains} -\newcommand{\ugDomainsNumber}{13.} - -@ -\section{Domains} -\label{ugDomainsPage} -\begin{itemize} -\item ugPackagesDomsPage \ref{ugPackagesDomsPage} on -page~\pageref{ugPackagesDomsPage} -\item ugDomainsDefsPage \ref{ugDomainsDefsPage} on -page~\pageref{ugDomainsDefsPage} -\item ugDomainsAssertionsPage \ref{ugDomainsAssertionsPage} on -page~\pageref{ugDomainsAssertionsPage} -\item ugDomainsDemoPage \ref{ugDomainsDemoPage} on -page~\pageref{ugDomainsDemoPage} -\item ugDomainsBrowsePage \ref{ugDomainsBrowsePage} on -page~\pageref{ugDomainsBrowsePage} -\item ugDomainsRepPage \ref{ugDomainsRepPage} on -page~\pageref{ugDomainsRepPage} -\item ugDomainsMultipleRepsPage \ref{ugDomainsMultipleRepsPage} on -page~\pageref{ugDomainsMultipleRepsPage} -\item ugDomainsAddDomainPage \ref{ugDomainsAddDomainPage} on -page~\pageref{ugDomainsAddDomainPage} -\item ugDomainsDefaultsPage \ref{ugDomainsDefaultsPage} on -page~\pageref{ugDomainsDefaultsPage} -\item ugDomainsOriginsPage \ref{ugDomainsOriginsPage} on -page~\pageref{ugDomainsOriginsPage} -\item ugDomainsShortFormsPage \ref{ugDomainsShortFormsPage} on -page~\pageref{ugDomainsShortFormsPage} -\item ugDomainsCliffordPage \ref{ugDomainsCliffordPage} on -page~\pageref{ugDomainsCliffordPage} -\item ugDomsinsDatabasePage \ref{ugDomsinsDatabasePage} on -page~\pageref{ugDomsinsDatabasePage} -\end{itemize} -\index{pages!ugDomainsPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsPage} -\index{ugDomainsPage!ug13.ht!pages} +\pagehead{ugDomainsPage}{ug13.ht}{Domains} +\pageto{notitle}{ugPackagesDomsPage} +\pageto{notitle}{ugDomainsDefsPage} +\pageto{notitle}{ugDomainsAssertionsPage} +\pageto{notitle}{ugDomainsDemoPage} +\pageto{notitle}{ugDomainsBrowsePage} +\pageto{notitle}{ugDomainsRepPage} +\pageto{notitle}{ugDomainsMultipleRepsPage} +\pageto{notitle}{ugDomainsAddDomainPage} +\pageto{notitle}{ugDomainsDefaultsPage} +\pageto{notitle}{ugDomainsOriginsPage} +\pageto{notitle}{ugDomainsShortFormsPage} +\pageto{notitle}{ugDomainsCliffordPage} +\pageto{notitle}{ugDomsinsDatabasePage} <>= \begin{page}{ugDomainsPage}{13. Domains} \beginscroll -We finally come to the \spadgloss{domain constructor}. -A few subtle differences between packages and -domains turn up some interesting issues. -We first discuss these differences then -describe the resulting issues by illustrating a program -for the \axiomType{QuadraticForm} constructor. -After a short example of an algebraic constructor, -\axiomType{CliffordAlgebra}, we show how you use domain constructors to build -a database query facility. +We finally come to the \spadgloss{domain constructor}. A few subtle +differences between packages and domains turn up some interesting +issues. We first discuss these differences then describe the +resulting issues by illustrating a program for the +\axiomType{QuadraticForm} constructor. After a short example of an +algebraic constructor, \axiomType{CliffordAlgebra}, we show how you +use domain constructors to build a database query facility. \beginmenu - \menudownlink{{13.1. Domains vs. Packages}}{ugPackagesDomsPage} - \menudownlink{{13.2. Definitions}}{ugDomainsDefsPage} - \menudownlink{{13.3. Category Assertions}}{ugDomainsAssertionsPage} - \menudownlink{{13.4. A Demo}}{ugDomainsDemoPage} - \menudownlink{{13.5. Browse}}{ugDomainsBrowsePage} - \menudownlink{{13.6. Representation}}{ugDomainsRepPage} - \menudownlink{{13.7. Multiple Representations}}{ugDomainsMultipleRepsPage} - \menudownlink{{13.8. Add Domain}}{ugDomainsAddDomainPage} - \menudownlink{{13.9. Defaults}}{ugDomainsDefaultsPage} - \menudownlink{{13.10. Origins}}{ugDomainsOriginsPage} - \menudownlink{{13.11. Short Forms}}{ugDomainsShortFormsPage} - \menudownlink{{13.12. Example 1: Clifford Algebra}}{ugDomainsCliffordPage} - \menudownlink{{13.13. Example 2: Building A Query Facility}} +\menudownlink{{13.1. Domains vs. Packages}}{ugPackagesDomsPage} +\menudownlink{{13.2. Definitions}}{ugDomainsDefsPage} +\menudownlink{{13.3. Category Assertions}}{ugDomainsAssertionsPage} +\menudownlink{{13.4. A Demo}}{ugDomainsDemoPage} +\menudownlink{{13.5. Browse}}{ugDomainsBrowsePage} +\menudownlink{{13.6. Representation}}{ugDomainsRepPage} +\menudownlink{{13.7. Multiple Representations}}{ugDomainsMultipleRepsPage} +\menudownlink{{13.8. Add Domain}}{ugDomainsAddDomainPage} +\menudownlink{{13.9. Defaults}}{ugDomainsDefaultsPage} +\menudownlink{{13.10. Origins}}{ugDomainsOriginsPage} +\menudownlink{{13.11. Short Forms}}{ugDomainsShortFormsPage} +\menudownlink{{13.12. Example 1: Clifford Algebra}}{ugDomainsCliffordPage} +\menudownlink{{13.13. Example 2: Building A Query Facility}} {ugDomsinsDatabasePage} \endmenu \endscroll @@ -48050,35 +43356,21 @@ a database query facility. \end{page} @ -<>= -\newcommand{\ugPackagesDomsTitle}{Domains vs. Packages} -\newcommand{\ugPackagesDomsNumber}{13.1.} - -@ -\section{Domains vs. Packages} -\label{ugPackagesDomsPage} -\begin{itemize} -\item ugPackagesPage \ref{ugPackagesPage} on -page~\pageref{ugPackagesPage} -\end{itemize} -\index{pages!ugPackagesDomsPage!ug13.ht} -\index{ug13.ht!pages!ugPackagesDomsPage} -\index{ugPackagesDomsPage!ug13.ht!pages} +\pagehead{ugPackagesDomsPage}{ug13.ht}{Domains vs. Packages} +\pageto{notitle}{ugPackagesPage} <>= \begin{page}{ugPackagesDomsPage}{13.1. Domains vs. Packages} \beginscroll -% -Packages are special cases of domains. -What is the difference between a package and a domain that is not a -package? -By definition, there is only one difference: a domain that is not a package -has the symbol \axiomSyntax{\$} appearing -somewhere among the types of its exported operations. -The \axiomSyntax{\$} denotes ``this domain.'' If the \axiomSyntax{\$} -appears before the \axiomSyntax{->} in the type of a signature, it means -the operation takes an element from the domain as an argument. -If it appears after the \axiomSyntax{->}, then the operation returns an -element of the domain. + +Packages are special cases of domains. What is the difference between +a package and a domain that is not a package? By definition, there is +only one difference: a domain that is not a package has the symbol +\axiomSyntax{\$} appearing somewhere among the types of its exported +operations. The \axiomSyntax{\$} denotes ``this domain.'' If the +\axiomSyntax{\$} appears before the \axiomSyntax{->} in the type of a +signature, it means the operation takes an element from the domain as +an argument. If it appears after the \axiomSyntax{->}, then the +operation returns an element of the domain. If no exported operations mention \axiomSyntax{\$}, then evidently there is nothing of interest to do with the objects of the domain. @@ -48099,16 +43391,7 @@ As in the last chapter, we focus here on the first kind. \end{page} @ -<>= -\newcommand{\ugDomainsDefsTitle}{Definitions} -\newcommand{\ugDomainsDefsNumber}{13.2.} - -@ -\section{Definitions} -\label{ugDomainsDefsPage} -\index{pages!ugDomainsDefsPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsDefsPage} -\index{ugDomainsDefsPage!ug13.ht!pages} +\pagehead{ugDomainsDefsPage}{ug13.ht}{Definitions} <>= \begin{page}{ugDomainsDefsPage}{13.2. Definitions} \beginscroll @@ -48116,7 +43399,8 @@ As in the last chapter, we focus here on the first kind. The syntax for defining a domain constructor is the same as for any function in Axiom: -\centerline{{\frenchspacing{\tt {\it DomainForm} : {\it Exports} == {\it Implementation}}}} +\centerline{{\frenchspacing{\tt {\it DomainForm} : {\it Exports} == +{\it Implementation}}}} As this definition usually extends over many lines, a \axiom{where} expression is generally used instead. \spadkey{where} @@ -48125,12 +43409,18 @@ As this definition usually extends over many lines, a A recommended format for the definition of a domain is:\newline {\tt% {\it DomainForm} : Exports == Implementation where \newline -\texht{\hspace*{.75pc}}{\tab{8}} {\it optional type declarations} \newline -\texht{\hspace*{.75pc}}{\tab{3}} Exports == [{\it Category Assertions}] with \newline -\texht{\hspace*{2.0pc}}{\tab{8}} {\it list of exported operations} \newline -\texht{\hspace*{.75pc}}{\tab{3}} Implementation == [{\it Add Domain}] add \newline -\texht{\hspace*{2.0pc}}{\tab{6}} [Rep := {\it Representation}] \newline -\texht{\hspace*{2.0pc}}{\tab{8}} {\it list of function definitions for exported operations} +\texht{\hspace*{.75pc}}{\tab{8}} +{\it optional type declarations} \newline +\texht{\hspace*{.75pc}}{\tab{3}} +Exports == [{\it Category Assertions}] with \newline +\texht{\hspace*{2.0pc}}{\tab{8}} +{\it list of exported operations} \newline +\texht{\hspace*{.75pc}}{\tab{3}} +Implementation == [{\it Add Domain}] add \newline +\texht{\hspace*{2.0pc}}{\tab{6}} +[Rep := {\it Representation}] \newline +\texht{\hspace*{2.0pc}}{\tab{8}} +{\it list of function definitions for exported operations} } \texht{\vskip 4pt}{} @@ -48148,30 +43438,39 @@ concepts you need to learn. {\tt 1.\ \ \ )abbrev\ domain\ QFORM\ QuadraticForm}\newline {\tt 2.\ \ \ }\newline {\tt 3.\ \ \ ++\ Description:}\newline -{\tt 4.\ \ \ ++\ \ \ This\ domain\ provides\ modest\ support\ for}\newline +{\tt 4.\ \ \ ++\ \ \ +This\ domain\ provides\ modest\ support\ for}\newline {\tt 5.\ \ \ ++\ \ \ quadratic\ forms.}\newline -{\tt 6.\ \ \ QuadraticForm(n,\ K):\ Exports\ ==\ Implementation\ where}\newline +{\tt 6.\ \ \ +QuadraticForm(n,\ K):\ Exports\ ==\ Implementation\ where}\newline {\tt 7.\ \ \ \ \ \ \ n:\ PositiveInteger}\newline {\tt 8.\ \ \ \ \ \ \ K:\ Field}\newline {\tt 9.\ \ \ }\newline {\tt 10.\ \ \ \ \ \ Exports\ ==\ AbelianGroup\ with}\newline {\tt 11.\ \ \ \ \ \ \ \ quadraticForm:\ SquareMatrix(n,K)\ ->\ \$}\newline -{\tt 12.\ \ \ \ \ \ \ \ \ \ ++\ \bs{}axiom\{quadraticForm(m)\}\ creates\ a\ quadratic}\newline -{\tt 13.\ \ \ \ \ \ \ \ \ \ ++\ quadratic\ form\ from\ a\ symmetric,}\newline +{\tt 12.\ \ \ \ \ \ \ \ \ \ ++\ +\bs{}axiom\{quadraticForm(m)\}\ creates\ a\ quadratic}\newline +{\tt 13.\ \ \ \ \ \ \ \ \ \ ++\ +quadratic\ form\ from\ a\ symmetric,}\newline {\tt 14.\ \ \ \ \ \ \ \ \ \ ++\ square\ matrix\ \bs{}axiom\{m\}.}\newline {\tt 15.\ \ \ \ \ \ \ \ matrix:\ \$\ ->\ SquareMatrix(n,K)}\newline -{\tt 16.\ \ \ \ \ \ \ \ \ \ ++\ \bs{}axiom\{matrix(qf)\}\ creates\ a\ square\ matrix}\newline -{\tt 17.\ \ \ \ \ \ \ \ \ \ ++\ from\ the\ quadratic\ form\ \bs{}axiom\{qf\}.}\newline +{\tt 16.\ \ \ \ \ \ \ \ \ \ ++\ +\bs{}axiom\{matrix(qf)\}\ creates\ a\ square\ matrix}\newline +{\tt 17.\ \ \ \ \ \ \ \ \ \ ++\ +from\ the\ quadratic\ form\ \bs{}axiom\{qf\}.}\newline {\tt 18.\ \ \ \ \ \ \ \ elt:\ (\$,\ DirectProduct(n,K))\ ->\ K}\newline -{\tt 19.\ \ \ \ \ \ \ \ \ \ ++\ \bs{}axiom\{qf(v)\}\ evaluates\ the\ quadratic\ form}\newline -{\tt 20.\ \ \ \ \ \ \ \ \ \ ++\ \bs{}axiom\{qf\}\ on\ the\ vector\ \bs{}axiom\{v\},}\newline +{\tt 19.\ \ \ \ \ \ \ \ \ \ ++\ +\bs{}axiom\{qf(v)\}\ evaluates\ the\ quadratic\ form}\newline +{\tt 20.\ \ \ \ \ \ \ \ \ \ ++\ +\bs{}axiom\{qf\}\ on\ the\ vector\ \bs{}axiom\{v\},}\newline {\tt 21.\ \ \ \ \ \ \ \ \ \ ++\ producing\ a\ scalar.}\newline {\tt 22.\ \ }\newline {\tt 23.\ \ \ \ \ \ Implementation\ ==\ SquareMatrix(n,K)\ add}\newline {\tt 24.\ \ \ \ \ \ \ \ Rep\ :=\ SquareMatrix(n,K)}\newline {\tt 25.\ \ \ \ \ \ \ \ quadraticForm\ m\ ==}\newline {\tt 26.\ \ \ \ \ \ \ \ \ \ not\ symmetric?\ m\ =>\ error}\newline -{\tt 27.\ \ \ \ \ \ \ \ \ \ \ \ "quadraticForm\ requires\ a\ symmetric\ matrix"}\newline +{\tt 27.\ \ \ \ \ \ \ \ \ \ \ \ +"quadraticForm\ requires\ a\ symmetric\ matrix"}\newline {\tt 28.\ \ \ \ \ \ \ \ \ \ m\ ::\ \$}\newline {\tt 29.\ \ \ \ \ \ \ \ matrix\ q\ ==\ q\ ::\ Rep}\newline {\tt 30.\ \ \ \ \ \ \ \ elt(q,v)\ ==\ dot(v,\ (matrix\ q\ *\ v))}\newline @@ -48210,22 +43509,9 @@ its definition: {\it Category Assertions}, {\it Add Domain}, and \end{page} @ -<>= -\newcommand{\ugDomainsAssertionsTitle}{Category Assertions} -\newcommand{\ugDomainsAssertionsNumber}{13.3.} - -@ -\section{Category Assertions} -\label{ugDomainsAssertionsPage} -\begin{itemize} -\item ugCategoriesCorrectnessPage \ref{ugCategoriesCorrectnessPage} on -page~\pageref{ugCategoriesCorrectnessPage} -\item ugCategoriesConditionalsPage \ref{ugCategoriesConditionalsPage} on -page~\pageref{ugCategoriesConditionalsPage} -\end{itemize} -\index{pages!ugDomainsAssertionsPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsAssertionsPage} -\index{ugDomainsAssertionsPage!ug13.ht!pages} +\pagehead{ugDomainsAssertionsPage}{ug13.ht}{Category Assertions} +\pageto{notitle}{ugCategoriesCorrectnessPage} +\pageto{notitle}{ugCategoriesConditionalsPage} <>= \begin{page}{ugDomainsAssertionsPage}{13.3. Category Assertions} \beginscroll @@ -48287,16 +43573,7 @@ Join(ExtensibleLinearAggregate(S), \end{page} @ -<>= -\newcommand{\ugDomainsDemoTitle}{A Demo} -\newcommand{\ugDomainsDemoNumber}{13.4.} - -@ -\section{A Demo} -\label{ugDomainsDemoPage} -\index{pages!ugDomainsDemoPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsDemoPage} -\index{ugDomainsDemoPage!ug13.ht!pages} +\pagehead{ugDomainsDemoPage}{ug13.ht}{A Demo} <>= \begin{page}{ugDomainsDemoPage}{13.4. A Demo} \beginscroll @@ -48335,7 +43612,8 @@ Create a direct product element \axiom{v}. A package call is again necessary, but Axiom understands your list as denoting a vector. }{ -\spadpaste{v := directProduct([2,-1])\$DirectProduct(2,Fraction Integer)\bound{x5}\free{x4}} +\spadpaste{v := directProduct([2,-1])\$DirectProduct(2,Fraction Integer) +\bound{x5}\free{x4}} } \xtc{ Compute the product \texht{$v^TAv$}{transpose(v)*A*v}. @@ -48353,24 +43631,15 @@ What is 3 times \axiom{q} minus \axiom{q} plus \axiom{q}? \end{page} @ -<>= -\newcommand{\ugDomainsBrowseTitle}{Browse} -\newcommand{\ugDomainsBrowseNumber}{13.5.} - -@ -\section{Browse} -\label{ugDomainsBrowsePage} -\index{pages!ugDomainsBrowsePage!ug13.ht} -\index{ug13.ht!pages!ugDomainsBrowsePage} -\index{ugDomainsBrowsePage!ug13.ht!pages} +\pagehead{ugDomainsBrowsePage}{ug13.ht}{Browse} <>= \begin{page}{ugDomainsBrowsePage}{13.5. Browse} \beginscroll -The \Browse{} facility of \HyperName{} is useful for +The \Browse{} facility of Hyperdoc is useful for investigating the properties of domains, packages, and categories. -From the main \HyperName{} menu, move your mouse to {\bf Browse} and +From the main Hyperdoc menu, move your mouse to {\bf Browse} and click on the left mouse button. This brings up the \Browse{} first page. Now, with your mouse pointer somewhere in this window, enter the @@ -48411,20 +43680,8 @@ has one parent \axiomType{AbelianMonoid}. \end{page} @ -<>= -\newcommand{\ugDomainsRepTitle}{Representation} -\newcommand{\ugDomainsRepNumber}{13.6.} - -@ -\section{Representation} -\label{ugDomainsRepPage} -\begin{itemize} -\item ugDomainsDemoPage \ref{ugDomainsDemoPage} on -page~\pageref{ugDomainsDemoPage} -\end{itemize} -\index{pages!ugDomainsRepPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsRepPage} -\index{ugDomainsRepPage!ug13.ht!pages} +\pagehead{ugDomainsRepPage}{ug13.ht}{Representation} +\pageto{notitle}{ugDomainsDemoPage} <>= \begin{page}{ugDomainsRepPage}{13.6. Representation} \beginscroll @@ -48460,7 +43717,8 @@ The definition for the \spadfunFrom{matrix}{QuadraticForm} function could hardly be simpler: it just returns its argument after explicitly \spadglossSee{coercing}{coerce} its argument to a matrix. -Since the argument is already a matrix, this coercion does no computation. +Since the argument is already a matrix, this coercion does no +computation. Within the context of a capsule, an object of \axiomSyntax{\$} is regarded both as a quadratic form {\it and} as a @@ -48478,20 +43736,8 @@ just calls the \spadfunFrom{dot}{DirectProduct} product from \end{page} @ -<>= -\newcommand{\ugDomainsMultipleRepsTitle}{Multiple Representations} -\newcommand{\ugDomainsMultipleRepsNumber}{13.7.} - -@ -\section{Multiple Representations} -\label{ugDomainsMultipleRepsPage} -\begin{itemize} -\item ugTypesUnionsPage \ref{ugTypesUnionsPage} on -page~\pageref{ugTypesUnionsPage} -\end{itemize} -\index{pages!ugDomainsMultipleRepsPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsMultipleRepsPage} -\index{ugDomainsMultipleRepsPage!ug13.ht!pages} +\pagehead{ugDomainsMultipleRepsPage}{ug13.ht}{Multiple Representations} +\pageto{notitle}{ugTypesUnionsPage} <>= \begin{page}{ugDomainsMultipleRepsPage}{13.7. Multiple Representations} \beginscroll @@ -48503,8 +43749,8 @@ data structure to represent the elements of your domain. A classic problem in computer algebra is the optimal choice for an internal representation of polynomials. -If you create a polynomial, say \texht{$3x^2+ 5$}{\axiom{3*x**2 + 5}}, how -does Axiom hold this value internally? +If you create a polynomial, say \texht{$3x^2+ 5$}{\axiom{3*x**2 + 5}}, +how does Axiom hold this value internally? There are many ways. Axiom has nearly a dozen different representations of polynomials, one to suit almost any purpose. @@ -48560,20 +43806,8 @@ representation. \end{page} @ -<>= -\newcommand{\ugDomainsAddDomainTitle}{Add Domain} -\newcommand{\ugDomainsAddDomainNumber}{13.8.} - -@ -\section{Add Domain} -\label{ugDomainsAddDomainPage} -\begin{itemize} -\item ugDomainsDemoPage \ref{ugDomainsDemoPage} on -page~\pageref{ugDomainsDemoPage} -\end{itemize} -\index{pages!ugDomainsAddDomainPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsAddDomainPage} -\index{ugDomainsAddDomainPage!ug13.ht!pages} +\pagehead{ugDomainsAddDomainPage}{ug13.ht}{Add Domain} +\pageto{notitle}{ugDomainsDemoPage} <>= \begin{page}{ugDomainsAddDomainPage}{13.8. Add Domain} \beginscroll @@ -48603,22 +43837,9 @@ and \axiomOpFrom{-}{QuadraticForm} come from \end{page} @ -<>= -\newcommand{\ugDomainsDefaultsTitle}{Defaults} -\newcommand{\ugDomainsDefaultsNumber}{13.9.} - -@ -\section{Defaults} -\label{ugDomainsDefaultsPage} -\begin{itemize} -\item ugPackagesPage \ref{ugPackagesPage} on -page~\pageref{ugPackagesPage} -\item ugCategoriesDefaultsPage \ref{ugCategoriesDefaultsPage} on -page~\pageref{ugCategoriesDefaultsPage} -\end{itemize} -\index{pages!ugDomainsDefaultsPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsDefaultsPage} -\index{ugDomainsDefaultsPage!ug13.ht!pages} +\pagehead{ugDomainsDefaultsPage}{ug13.ht}{Defaults} +\pageto{notitle}{ugPackagesPage} +\pageto{notitle}{ugCategoriesDefaultsPage} <>= \begin{page}{ugDomainsDefaultsPage}{13.9. Defaults} \beginscroll @@ -48688,82 +43909,57 @@ get a page describing the \axiomOp{*} operation. Finally, click on \end{page} @ -<>= -\newcommand{\ugDomainsOriginsTitle}{Origins} -\newcommand{\ugDomainsOriginsNumber}{13.10.} - -@ -\section{Origins} -\label{ugDomainsOriginsPage} -\index{pages!ugDomainsOriginsPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsOriginsPage} -\index{ugDomainsOriginsPage!ug13.ht!pages} +\pagehead{ugDomainsOriginsPage}{ug13.ht}{Origins} <>= \begin{page}{ugDomainsOriginsPage}{13.10. Origins} \beginscroll % -Aside from the notion of where an operation is implemented, -a useful notion is the {\it origin} or ``home'' of an operation. -When an operation (such as -\spadfunFrom{quadraticForm}{QuadraticForm}) is explicitly exported by -a domain (such as \axiomType{QuadraticForm}), you can say that the -origin of that operation is that domain. -If an operation is not explicitly exported from a domain, it is inherited -from, and has as origin, the (closest) category that explicitly exports it. -The operations \axiomOpFrom{+}{AbelianMonoid} and -\axiomOpFrom{-}{AbelianMonoid} of \axiomType{QuadraticForm}, -for example, are inherited from \axiomType{AbelianMonoid}. -As it turns out, \axiomType{AbelianMonoid} is the origin of virtually every +Aside from the notion of where an operation is implemented, a useful +notion is the {\it origin} or ``home'' of an operation. When an +operation (such as \spadfunFrom{quadraticForm}{QuadraticForm}) is +explicitly exported by a domain (such as \axiomType{QuadraticForm}), +you can say that the origin of that operation is that domain. If an +operation is not explicitly exported from a domain, it is inherited +from, and has as origin, the (closest) category that explicitly +exports it. The operations \axiomOpFrom{+}{AbelianMonoid} and +\axiomOpFrom{-}{AbelianMonoid} of \axiomType{QuadraticForm}, for +example, are inherited from \axiomType{AbelianMonoid}. As it turns +out, \axiomType{AbelianMonoid} is the origin of virtually every \axiomOp{+} operation in Axiom! -Again, you can use \Browse{} to discover the origins of -operations. +Again, you can use \Browse{} to discover the origins of operations. From the \Browse{} page on \axiomType{QuadraticForm}, click on {\bf Operations}, then on {\bf origins} at the bottom of the page. The origin of the operation is the {\it only} place where on-line -documentation is given. -However, you can re-export an operation to give it special -documentation. -Suppose you have just invented the world's fastest algorithm for -inverting matrices using a particular internal representation for -matrices. -If your matrix domain just declares that it exports -\axiomType{MatrixCategory}, it exports the \axiomFun{inverse} -operation, but the documentation the user gets from \Browse{} is -the standard one from \axiomType{MatrixCategory}. -To give your version of \axiomFun{inverse} the attention it -deserves, simply export the operation explicitly with new -documentation. -This redundancy gives \axiomFun{inverse} a new origin and tells -\Browse{} to present your new documentation. +documentation is given. However, you can re-export an operation to +give it special documentation. Suppose you have just invented the +world's fastest algorithm for inverting matrices using a particular +internal representation for matrices. If your matrix domain just +declares that it exports \axiomType{MatrixCategory}, it exports the +\axiomFun{inverse} operation, but the documentation the user gets from +\Browse{} is the standard one from \axiomType{MatrixCategory}. To +give your version of \axiomFun{inverse} the attention it deserves, +simply export the operation explicitly with new documentation. This +redundancy gives \axiomFun{inverse} a new origin and tells \Browse{} +to present your new documentation. \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugDomainsShortFormsTitle}{Short Forms} -\newcommand{\ugDomainsShortFormsNumber}{13.11.} - -@ -\section{Short Forms} -\label{ugDomainsShortFormsPage} -\index{pages!ugDomainsShortFormsPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsShortFormsPage} -\index{ugDomainsShortFormsPage!ug13.ht!pages} +\pagehead{ugDomainsShortFormsPage}{ug13.ht}{Short Forms} <>= \begin{page}{ugDomainsShortFormsPage}{13.11. Short Forms} \beginscroll -% -In Axiom, a domain could be defined using only an add-domain -and no capsule. -Although we talk about rational numbers as quotients of integers, -there is no type \pspadtype{RationalNumber} in Axiom. -To create such a type, you could compile the following -``short-form'' definition: + +In Axiom, a domain could be defined using only an add-domain and no +capsule. Although we talk about rational numbers as quotients of +integers, there is no type \pspadtype{RationalNumber} in Axiom. To +create such a type, you could compile the following ``short-form'' +definition: \beginImportant @@ -48771,16 +43967,14 @@ To create such a type, you could compile the following {\tt 1.\ \ \ RationalNumber()\ ==\ Fraction(Integer)}\newline \endImportant -The {\tt Exports} part of this definition is missing and is taken -to be equivalent to that of \axiomType{Fraction(Integer)}. -Because of the add-domain philosophy, you get precisely -what you want. -The effect is to create a little stub of a domain. -When a user asks to add two rational numbers, Axiom would -ask \pspadtype{RationalNumber} for a function implementing this -\axiomOp{+}. -Since the domain has no capsule, the domain then immediately -sends its request to \axiomType{Fraction (Integer)}. +The {\tt Exports} part of this definition is missing and is taken to +be equivalent to that of \axiomType{Fraction(Integer)}. Because of +the add-domain philosophy, you get precisely what you want. The +effect is to create a little stub of a domain. When a user asks to +add two rational numbers, Axiom would ask \pspadtype{RationalNumber} +for a function implementing this \axiomOp{+}. Since the domain has no +capsule, the domain then immediately sends its request to +\axiomType{Fraction (Integer)}. The short form definition for domains is used to define such domains as \axiomType{MultivariatePolynomial}: @@ -48788,31 +43982,19 @@ define such domains as \axiomType{MultivariatePolynomial}: \beginImportant \noindent -{\tt 1.\ \ \ MultivariatePolynomial(vl:\ List\ Symbol,\ R:\ Ring)\ ==}\newline +{\tt 1.\ \ \ MultivariatePolynomial(vl:\ List\ Symbol,\ R:\ Ring)\ ==} +\newline {\tt 2.\ \ \ \ \ \ SparseMultivariatePolynomial(R,}\newline {\tt 3.\ \ \ \ \ \ \ \ \ OrderedVariableList\ vl)}\newline \endImportant -%% ********************************************************************* \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugDomainsCliffordTitle}{Example 1: Clifford Algebra} -\newcommand{\ugDomainsCliffordNumber}{13.12.} - -@ -\section{Example 1: Clifford Algebra} -\label{ugDomainsCliffordPage} -\begin{itemize} -\item CliffordAlgebraXmpPage \ref{CliffordAlgebraXmpPage} on -page~\pageref{CliffordAlgebraXmpPage} -\end{itemize} -\index{pages!ugDomainsCliffordPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsCliffordPage} -\index{ugDomainsCliffordPage!ug13.ht!pages} +\pagehead{ugDomainsCliffordPage}{ug13.ht}{Example 1: Clifford Algebra} +\pageto{notitle}{CliffordAlgebraXmpPage} <>= \begin{page}{ugDomainsCliffordPage}{13.12. Example 1: Clifford Algebra} \beginscroll @@ -48867,36 +44049,45 @@ Its explicit exports include {\tt 1.\ \ \ NNI\ ==>\ NonNegativeInteger}\newline {\tt 2.\ \ \ PI\ \ ==>\ PositiveInteger}\newline {\tt 3.\ \ \ }\newline -{\tt 4.\ \ \ CliffordAlgebra(n,K,q):\ Exports\ ==\ Implementation\ where}\newline +{\tt 4.\ \ \ +CliffordAlgebra(n,K,q):\ Exports\ ==\ Implementation\ where}\newline {\tt 5.\ \ \ \ \ \ \ n:\ PI}\newline {\tt 6.\ \ \ \ \ \ \ K:\ Field}\newline {\tt 7.\ \ \ \ \ \ \ q:\ QuadraticForm(n,\ K)}\newline {\tt 8.\ \ \ }\newline -{\tt 9.\ \ \ \ \ \ \ Exports\ ==\ Join(Ring,Algebra(K),VectorSpace(K))\ with}\newline +{\tt 9.\ \ \ \ \ \ \ +Exports\ ==\ Join(Ring,Algebra(K),VectorSpace(K))\ with}\newline {\tt 10.\ \ \ \ \ \ \ \ e:\ PI\ ->\ \$}\newline {\tt 11.\ \ \ \ \ \ \ \ \ \ \ \ ...\ \ \ \ \ \ \ \ }\newline {\tt 12.\ \ }\newline {\tt 13.\ \ \ \ \ \ Implementation\ ==\ add}\newline {\tt 14.\ \ \ \ \ \ \ \ Qeelist\ :=\ \ }\newline -{\tt 15.\ \ \ \ \ \ \ \ \ \ [q.unitVector(i::PI)\ for\ i\ in\ 1..n]}\newline +{\tt 15.\ \ \ \ \ \ \ \ \ \ +[q.unitVector(i::PI)\ for\ i\ in\ 1..n]}\newline {\tt 16.\ \ \ \ \ \ \ \ dim\ \ \ \ \ :=\ \ 2**n}\newline {\tt 17.\ \ \ \ \ \ \ \ Rep\ \ \ \ \ :=\ PrimitiveArray\ K}\newline {\tt 18.\ \ \ \ \ \ \ \ New\ ==>\ new(dim,\ 0\$K)\$Rep}\newline {\tt 19.\ \ \ \ \ \ \ \ x\ +\ y\ ==}\newline {\tt 20.\ \ \ \ \ \ \ \ \ \ z\ :=\ New}\newline -{\tt 21.\ \ \ \ \ \ \ \ \ \ for\ i\ in\ 0..dim-1\ repeat\ z.i\ :=\ x.i\ +\ y.i}\newline +{\tt 21.\ \ \ \ \ \ \ \ \ \ +for\ i\ in\ 0..dim-1\ repeat\ z.i\ :=\ x.i\ +\ y.i}\newline {\tt 22.\ \ \ \ \ \ \ \ \ \ z}\newline -{\tt 23.\ \ \ \ \ \ \ \ addMonomProd:\ (K,\ NNI,\ K,\ NNI,\ \$)\ ->\ \$}\newline -{\tt 24.\ \ \ \ \ \ \ \ addMonomProd(c1,\ b1,\ c2,\ b2,\ z)\ ==\ \ ...}\newline +{\tt 23.\ \ \ \ \ \ \ \ +addMonomProd:\ (K,\ NNI,\ K,\ NNI,\ \$)\ ->\ \$}\newline +{\tt 24.\ \ \ \ \ \ \ \ +addMonomProd(c1,\ b1,\ c2,\ b2,\ z)\ ==\ \ ...}\newline {\tt 25.\ \ \ \ \ \ \ \ x\ *\ y\ ==}\newline {\tt 26.\ \ \ \ \ \ \ \ \ \ z\ :=\ New}\newline {\tt 27.\ \ \ \ \ \ \ \ \ \ for\ ix\ in\ 0..dim-1\ repeat}\newline -{\tt 28.\ \ \ \ \ \ \ \ \ \ \ \ if\ x.ix\ \notequal{}\ 0\ then\ for\ iy\ in\ 0..dim-1\ repeat}\newline +{\tt 28.\ \ \ \ \ \ \ \ \ \ \ \ +if\ x.ix\ \notequal{}\ 0\ then\ for\ iy\ in\ 0..dim-1\ repeat}\newline {\tt 29.\ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ y.iy\ \notequal{}\ 0}\newline -{\tt 30.\ \ \ \ \ \ \ \ \ \ \ \ \ \ then\ addMonomProd(x.ix,ix,y.iy,iy,z)}\newline +{\tt 30.\ \ \ \ \ \ \ \ \ \ \ \ \ \ +then\ addMonomProd(x.ix,ix,y.iy,iy,z)}\newline {\tt 31.\ \ \ \ \ \ \ \ \ \ \ \ z}\newline {\tt 32.\ \ \ \ \ \ \ \ \ \ \ \ \ ...}\newline -\caption{Part of the \protect\axiomType{CliffordAlgebra} domain.}\label{fig-clifalg} +\caption{Part of the \protect\axiomType{CliffordAlgebra} domain.} +\label{fig-clifalg} \endImportant The {\tt Implementation} part begins by defining a local variable @@ -48923,41 +44114,24 @@ Axiom knows it is local since it is not an exported function. The types of all local functions must be declared. For a demonstration of \axiomType{CliffordAlgebra}, see -\downlink{`CliffordAlgebra'}{CliffordAlgebraXmpPage}\ignore{CliffordAlgebra}. +\downlink{`CliffordAlgebra'}{CliffordAlgebraXmpPage} +\ignore{CliffordAlgebra}. \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugDomsinsDatabaseTitle}{Example 2: Building A Query Facility} -\newcommand{\ugDomsinsDatabaseNumber}{13.13.} - -@ -\section{Example 2: Building A Query Facility} -\label{ugDomsinsDatabasePage} -\begin{itemize} -\item ugDomainsQueryLanguagePage \ref{ugDomainsQueryLanguagePage} on -page~\pageref{ugDomainsQueryLanguagePage} -\item ugDomainsDatabaseConstructorPage \ref{ugDomainsDatabaseConstructorPage} on -page~\pageref{ugDomainsDatabaseConstructorPage} -\item ugDomainsQueryEquationsPage \ref{ugDomainsQueryEquationsPage} on -page~\pageref{ugDomainsQueryEquationsPage} -\item ugDomainsDataListsPage \ref{ugDomainsDataListsPage} on -page~\pageref{ugDomainsDataListsPage} -\item ugDomainsDatabasePage \ref{ugDomainsDatabasePage} on -page~\pageref{ugDomainsDatabasePage} -\item ugDomainsCreatingPage \ref{ugDomainsCreatingPage} on -page~\pageref{ugDomainsCreatingPage} -\item ugDomainsPuttingPage \ref{ugDomainsPuttingPage} on -page~\pageref{ugDomainsPuttingPage} -\item ugDomainsExamplesPage \ref{ugDomainsExamplesPage} on -page~\pageref{ugDomainsExamplesPage} -\end{itemize} -\index{pages!ugDomsinsDatabasePage!ug13.ht} -\index{ug13.ht!pages!ugDomsinsDatabasePage} -\index{ugDomsinsDatabasePage!ug13.ht!pages} +\pagehead{ugDomsinsDatabasePage}{ug13.ht} +{Example 2: Building A Query Facility} +\pageto{notitle}{ugDomainsQueryLanguagePage} +\pageto{notitle}{ugDomainsDatabaseConstructorPage} +\pageto{notitle}{ugDomainsQueryEquationsPage} +\pageto{notitle}{ugDomainsDataListsPage} +\pageto{notitle}{ugDomainsDatabasePage} +\pageto{notitle}{ugDomainsCreatingPage} +\pageto{notitle}{ugDomainsPuttingPage} +\pageto{notitle}{ugDomainsExamplesPage} <>= \begin{page}{ugDomsinsDatabasePage} {13.13. Example 2: Building A Query Facility} @@ -48969,7 +44143,7 @@ building a query language for a database. Here is the practical problem to solve. The \Browse{} facility of Axiom has a database for all operations and constructors which is -stored on disk and accessed by \HyperName{}. +stored on disk and accessed by Hyperdoc. For our purposes here, we regard each line of this file as having eight fields: {\tt class, name, type, nargs, exposed, kind, origin,} and {\tt condition.} @@ -48982,7 +44156,8 @@ o`determinant`$->R`1`x`d`Matrix(R)`has(R,commutative("*")) In English, the entry means: \texht{\begin{quotation}}{\newline} \texht{\raggedright}{} -The operation \axiomFun{determinant}: \spadsig{\$}{R} with {\it 1} argument, is +The operation \axiomFun{determinant}: \spadsig{\$}{R} with {\it 1} +argument, is {\it exposed} and is exported by {\it domain} \axiomType{Matrix(R)} if {\tt R has commutative("*")}. \texht{\end{quotation}}{\newline} @@ -48991,32 +44166,23 @@ Our task is to create a little query language that allows us to get useful information from this database. \beginmenu - \menudownlink{{13.13.1. A Little Query Language}} +\menudownlink{{13.13.1. A Little Query Language}} {ugDomainsQueryLanguagePage} - \menudownlink{{13.13.2. The Database Constructor}} +\menudownlink{{13.13.2. The Database Constructor}} {ugDomainsDatabaseConstructorPage} - \menudownlink{{13.13.3. Query Equations}}{ugDomainsQueryEquationsPage} - \menudownlink{{13.13.4. DataLists}}{ugDomainsDataListsPage} - \menudownlink{{13.13.5. Index Cards}}{ugDomainsDatabasePage} - \menudownlink{{13.13.6. Creating a Database}}{ugDomainsCreatingPage} - \menudownlink{{13.13.7. Putting It All Together}}{ugDomainsPuttingPage} - \menudownlink{{13.13.8. Example Queries}}{ugDomainsExamplesPage} +\menudownlink{{13.13.3. Query Equations}}{ugDomainsQueryEquationsPage} +\menudownlink{{13.13.4. DataLists}}{ugDomainsDataListsPage} +\menudownlink{{13.13.5. Index Cards}}{ugDomainsDatabasePage} +\menudownlink{{13.13.6. Creating a Database}}{ugDomainsCreatingPage} +\menudownlink{{13.13.7. Putting It All Together}}{ugDomainsPuttingPage} +\menudownlink{{13.13.8. Example Queries}}{ugDomainsExamplesPage} \endmenu \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugDomainsQueryLanguageTitle}{A Little Query Language} -\newcommand{\ugDomainsQueryLanguageNumber}{13.13.1.} - -@ -\section{A Little Query Language} -\label{ugDomainsQueryLanguagePage} -\index{pages!ugDomainsQueryLanguagePage!ug13.ht} -\index{ug13.ht!pages!ugDomainsQueryLanguagePage} -\index{ugDomainsQueryLanguagePage!ug13.ht!pages} +\pagehead{ugDomainsQueryLanguagePage}{ug13.ht}{A Little Query Language} <>= \begin{page}{ugDomainsQueryLanguagePage}{13.13.1. A Little Query Language} \beginscroll @@ -49052,9 +44218,11 @@ Extract the database of all Axiom operations. \spadpaste{ops := getDatabase("o")\bound{o1}} } \xtc{ -How many exposed three-argument \axiomFun{map} operations involving streams? +How many exposed three-argument \axiomFun{map} operations involving +streams? }{ -\spadpaste{ops.(name="map").(nargs="3").(type="*Stream*")\bound{o2}\free{o1}} +\spadpaste{ops.(name="map").(nargs="3").(type="*Stream*") +\bound{o2}\free{o1}} } As usual, the arguments of \axiomFun{elt} (\axiomSyntax{.}) @@ -49073,7 +44241,8 @@ Here is an example of that kind of request. \xtc{ What constructors explicitly export a \axiomFun{determinant} operation? }{ -\spadpaste{elt(elt(elt(elt(ops,name="determinant"),origin),sort),unique)\free{o1}} +\spadpaste{ +elt(elt(elt(elt(ops,name="determinant"),origin),sort),unique)\free{o1}} } The first \axiomFun{elt} produces the set of all index cards with @@ -49098,16 +44267,8 @@ we now build the necessary domains and packages to implement it. \end{page} @ -<>= -\newcommand{\ugDomainsDatabaseConstructorTitle}{The Database Constructor} -\newcommand{\ugDomainsDatabaseConstructorNumber}{13.13.2.} - -@ -\section{The Database Constructor} -\label{ugDomainsDatabaseConstructorPage} -\index{pages!ugDomainsDatabaseConstructorPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsDatabaseConstructorPage} -\index{ugDomainsDatabaseConstructorPage!ug13.ht!pages} +\pagehead{ugDomainsDatabaseConstructorPage}{ug13.ht} +{The Database Constructor} <>= \begin{page}{ugDomainsDatabaseConstructorPage} {13.13.2. The Database Constructor} @@ -49195,19 +44356,26 @@ The {\tt Implementation} part of \axiomType{Database} is straightforward. {\tt 2.\ \ \ \ \ \ \ s:\ Symbol}\newline {\tt 3.\ \ \ \ \ \ \ Rep\ :=\ List\ S}\newline {\tt 4.\ \ \ \ \ \ \ elt(db,equation)\ ==\ ...}\newline -{\tt 5.\ \ \ \ \ \ \ elt(db,key)\ ==\ [x.key\ for\ x\ in\ db]::DataList(String)}\newline -{\tt 6.\ \ \ \ \ \ \ display(db)\ ==\ \ for\ x\ in\ db\ repeat\ display\ x}\newline -{\tt 7.\ \ \ \ \ \ \ fullDisplay(db)\ ==\ for\ x\ in\ db\ repeat\ fullDisplay\ x}\newline -{\tt 8.\ \ \ \ \ \ \ fullDisplay(db,\ n,\ m)\ ==\ for\ x\ in\ db\ for\ i\ in\ 1..m}\newline +{\tt 5.\ \ \ \ \ \ \ +elt(db,key)\ ==\ [x.key\ for\ x\ in\ db]::DataList(String)}\newline +{\tt 6.\ \ \ \ \ \ \ +display(db)\ ==\ \ for\ x\ in\ db\ repeat\ display\ x}\newline +{\tt 7.\ \ \ \ \ \ \ +fullDisplay(db)\ ==\ for\ x\ in\ db\ repeat\ fullDisplay\ x}\newline +{\tt 8.\ \ \ \ \ \ \ +fullDisplay(db,\ n,\ m)\ ==\ for\ x\ in\ db\ for\ i\ in\ 1..m}\newline {\tt 9.\ \ \ \ \ \ \ \ \ repeat}\newline {\tt 10.\ \ \ \ \ \ \ \ \ \ if\ i\ >=\ n\ then\ fullDisplay\ x}\newline {\tt 11.\ \ \ \ \ \ x+y\ ==\ removeDuplicates!\ merge(x,y)}\newline {\tt 12.\ \ \ \ \ \ x-y\ ==\ mergeDifference(copy(x::Rep),}\newline -{\tt 13.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ y::Rep)\$MergeThing(S)}\newline -{\tt 14.\ \ \ \ \ \ coerce(db):\ OutputForm\ ==\ (\#db)::\ OutputForm}\newline +{\tt 13.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +y::Rep)\$MergeThing(S)}\newline +{\tt 14.\ \ \ \ \ \ coerce(db):\ OutputForm\ ==\ (\#db)::\ OutputForm} +\newline \endImportant -The database is represented by a list of elements of \axiom{S} (index cards). +The database is represented by a list of elements of \axiom{S} +(index cards). We leave the definition of the first \axiomFun{elt} operation (on line 4) until the next section. The second \axiomFun{elt} collects all the strings with field name @@ -49236,16 +44404,7 @@ the number of index cards our query finds. \end{page} @ -<>= -\newcommand{\ugDomainsQueryEquationsTitle}{Query Equations} -\newcommand{\ugDomainsQueryEquationsNumber}{13.13.3.} - -@ -\section{Query Equations} -\label{ugDomainsQueryEquationsPage} -\index{pages!ugDomainsQueryEquationsPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsQueryEquationsPage} -\index{ugDomainsQueryEquationsPage!ug13.ht!pages} +\pagehead{ugDomainsQueryEquationsPage}{ug13.ht}{Query Equations} <>= \begin{page}{ugDomainsQueryEquationsPage}{13.13.3. Query Equations} \beginscroll @@ -49291,7 +44450,8 @@ Here is the missing definition for the \axiomFun{elt} function of {\tt 1.\ \ \ \ \ \ \ elt(db,eq)\ ==}\newline {\tt 2.\ \ \ \ \ \ \ \ \ field\\ \ :=\ variable\ eq}\newline {\tt 3.\ \ \ \ \ \ \ \ \ value\ :=\ value\ eq}\newline -{\tt 4.\ \ \ \ \ \ \ \ \ [x\ for\ x\ in\ db\ |\ matches?(value,x.field)]}\newline +{\tt 4.\ \ \ \ \ \ \ \ \ +[x\ for\ x\ in\ db\ |\ matches?(value,x.field)]}\newline \endImportant Recall that a database is represented by a list. @@ -49304,16 +44464,7 @@ matches the selected field of the element. \end{page} @ -<>= -\newcommand{\ugDomainsDataListsTitle}{DataLists} -\newcommand{\ugDomainsDataListsNumber}{13.13.4.} - -@ -\section{DataLists} -\label{ugDomainsDataListsPage} -\index{pages!ugDomainsDataListsPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsDataListsPage} -\index{ugDomainsDataListsPage!ug13.ht!pages} +\pagehead{ugDomainsDataListsPage}{ug13.ht}{DataLists} <>= \begin{page}{ugDomainsDataListsPage}{13.13.4. DataLists} \beginscroll @@ -49327,7 +44478,8 @@ sorting and removing duplicates. \beginImportant \noindent -{\tt 1.\ \ \ DataList(S:OrderedSet)\ :\ Exports\ ==\ Implementation\ where}\newline +{\tt 1.\ \ \ DataList(S:OrderedSet)\ :\ Exports\ ==\ +Implementation\ where}\newline {\tt 2.\ \ \ \ \ Exports\ ==\ ListAggregate(S)\ with}\newline {\tt 3.\ \ \ \ \ \ \ elt:\ (\$,"unique")\ ->\ \$}\newline {\tt 4.\ \ \ \ \ \ \ elt:\ (\$,"sort")\ ->\ \$}\newline @@ -49359,25 +44511,14 @@ All the rest are obtained from \axiomType{List(S)}. \end{page} @ -<>= -\newcommand{\ugDomainsDatabaseTitle}{Index Cards} -\newcommand{\ugDomainsDatabaseNumber}{13.13.5.} - -@ -\section{Index Cards} -\label{ugDomainsDatabasePage} -\index{pages!ugDomainsDatabasePage!ug13.ht} -\index{ug13.ht!pages!ugDomainsDatabasePage} -\index{ugDomainsDatabasePage!ug13.ht!pages} +\pagehead{ugDomainsDatabasePage}{ug13.ht}{Index Cards} <>= \begin{page}{ugDomainsDatabasePage}{13.13.5. Index Cards} \beginscroll -An index card comes from a file as one long string. -We define functions that extract substrings from the long -string. -Each field has a name that -is passed as a second argument to \axiomFun{elt}. +An index card comes from a file as one long string. We define +functions that extract substrings from the long string. Each field +has a name that is passed as a second argument to \axiomFun{elt}. \beginImportant @@ -49399,41 +44540,33 @@ All operations involve straightforward string manipulations. \end{page} @ -<>= -\newcommand{\ugDomainsCreatingTitle}{Creating a Database} -\newcommand{\ugDomainsCreatingNumber}{13.13.6.} - -@ -\section{Creating a Database} -\label{ugDomainsCreatingPage} -\index{pages!ugDomainsCreatingPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsCreatingPage} -\index{ugDomainsCreatingPage!ug13.ht!pages} +\pagehead{ugDomainsCreatingPage}{ug13.ht}{Creating a Database} <>= \begin{page}{ugDomainsCreatingPage}{13.13.6. Creating a Database} \beginscroll -We must not forget one important operation: one that builds the database in the -first place! -We'll name it \pspadfun{getDatabase} and put it in a package. -This function is implemented by calling the \Lisp{} function -\axiom{getBrowseDatabase(s)} to get appropriate information from -\Browse{}. -This operation takes a string indicating which lines you -want from the database: \axiom{"o"} gives you all operation -lines, and \axiom{"k"}, all constructor lines. -Similarly, \axiom{"c"}, \axiom{"d"}, and \axiom{"p"} give -you all category, domain and package lines respectively. -% +We must not forget one important operation: one that builds the +database in the first place! We'll name it \pspadfun{getDatabase} and +put it in a package. This function is implemented by calling the +\Lisp{} function \axiom{getBrowseDatabase(s)} to get appropriate +information from \Browse{}. This operation takes a string indicating +which lines you want from the database: \axiom{"o"} gives you all +operation lines, and \axiom{"k"}, all constructor lines. Similarly, +\axiom{"c"}, \axiom{"d"}, and \axiom{"p"} give you all category, +domain and package lines respectively. + \beginImportant \noindent -{\tt 1.\ \ \ OperationsQuery():\ Exports\ ==\ Implementation\ where}\newline +{\tt 1.\ \ \ OperationsQuery():\ Exports\ ==\ Implementation\ where} +\newline {\tt 2.\ \ \ \ \ Exports\ ==\ with}\newline -{\tt 3.\ \ \ \ \ \ \ getDatabase:\ String\ ->\ Database(IndexCard)}\newline +{\tt 3.\ \ \ \ \ \ \ getDatabase:\ String\ ->\ Database(IndexCard)} +\newline {\tt 4.\ \ \ }\newline {\tt 5.\ \ \ \ \ Implementation\ ==\ add}\newline -{\tt 6.\ \ \ \ \ \ \ getDatabase(s)\ ==\ getBrowseDatabase(s)\$Lisp}\newline +{\tt 6.\ \ \ \ \ \ \ getDatabase(s)\ ==\ getBrowseDatabase(s)\$Lisp} +\newline \endImportant We do not bother creating a special name for databases of index @@ -49448,16 +44581,7 @@ a new kind of domain: \pspadtype{Database(IndexCard)}. \end{page} @ -<>= -\newcommand{\ugDomainsPuttingTitle}{Putting It All Together} -\newcommand{\ugDomainsPuttingNumber}{13.13.7.} - -@ -\section{Putting It All Together} -\label{ugDomainsPuttingPage} -\index{pages!ugDomainsPuttingPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsPuttingPage} -\index{ugDomainsPuttingPage!ug13.ht!pages} +\pagehead{ugDomainsPuttingPage}{ug13.ht}{Putting It All Together} <>= \begin{page}{ugDomainsPuttingPage}{13.13.7. Putting It All Together} \beginscroll @@ -49495,16 +44619,7 @@ You are ready to try some sample queries. \end{page} @ -<>= -\newcommand{\ugDomainsExamplesTitle}{Example Queries} -\newcommand{\ugDomainsExamplesNumber}{13.13.8.} - -@ -\section{Example Queries} -\label{ugDomainsExamplesPage} -\index{pages!ugDomainsExamplesPage!ug13.ht} -\index{ug13.ht!pages!ugDomainsExamplesPage} -\index{ugDomainsExamplesPage!ug13.ht!pages} +\pagehead{ugDomainsExamplesPage}{ug13.ht}{Example Queries} <>= \begin{page}{ugDomainsExamplesPage}{13.13.8. Example Queries} \beginscroll @@ -49625,30 +44740,16 @@ How many distinct names of operations involving matrices are there? @ \chapter{Users Guide Chapter 14 (ug14.ht)} -<>= -\newcommand{\ugBrowseTitle}{Browse} -\newcommand{\ugBrowseNumber}{14.} - -@ -\section{Browse} -\label{ugBrowsePage} -\begin{itemize} -\item ugBrowseStartPage \ref{ugBrowseStartPage} on -page~\pageref{ugBrowseStartPage} -\item ugBrowseDomainPage \ref{ugBrowseDomainPage} on -page~\pageref{ugBrowseDomainPage} -\item ugBrowseMiscellaneousFeaturesPage \ref{ugBrowseMiscellaneousFeaturesPage} on -page~\pageref{ugBrowseMiscellaneousFeaturesPage} -\end{itemize} -\index{pages!ugBrowsePage!ug14.ht} -\index{ug14.ht!pages!ugBrowsePage} -\index{ugBrowsePage!ug14.ht!pages} +\pagehead{ugBrowsePage}{ug14.ht}{Browse} +\pageto{notitle}{ugBrowseStartPage} +\pageto{notitle}{ugBrowseDomainPage} +\pageto{notitle}{ugBrowseMiscellaneousFeaturesPage} <>= \begin{page}{ugBrowsePage}{14. Browse} \beginscroll This chapter discusses the \Browse{} -component of \HyperName{}. +component of Hyperdoc. We suggest you invoke Axiom and work through this chapter, section by section, following our examples to gain some familiarity with \Browse{}. @@ -49665,32 +44766,18 @@ familiarity with \Browse{}. \end{page} @ +\pagehead{ugBrowseStartPage}{ug14.ht} +{The Front Page: Searching the Library} +\pageto{notitle}{ugBrowseCapitalizationConventionPage} +\pageto{notitle}{ugBrowseDomainPage} +\pageto{notitle}{ugBrowseViewsOfConstructorsPage} +\pageto{notitle}{ugBrowseViewsOfOperationsPage} <>= -\newcommand{\ugBrowseStartTitle}{The Front Page: Searching the Library} -\newcommand{\ugBrowseStartNumber}{14.1.} - -@ -\section{The Front Page: Searching the Library} -\label{ugBrowseStartPage} -\begin{itemize} -\item ugBrowseCapitalizationConventionPage -\ref{ugBrowseCapitalizationConventionPage} on -page~\pageref{ugBrowseCapitalizationConventionPage} -\item ugBrowseDomainPage \ref{ugBrowseDomainPage} on -page~\pageref{ugBrowseDomainPage} -\item ugBrowseViewsOfConstructorsPage \ref{ugBrowseViewsOfConstructorsPage} on -page~\pageref{ugBrowseViewsOfConstructorsPage} -\item ugBrowseViewsOfOperationsPage \ref{ugBrowseViewsOfOperationsPage} on -page~\pageref{ugBrowseViewsOfOperationsPage} -\end{itemize} -\index{pages!ugBrowseStartPage!ug14.ht} -\index{ug14.ht!pages!ugBrowseStartPage} -\index{ugBrowseStartPage!ug14.ht!pages} -<>= -\begin{page}{ugBrowseStartPage}{14.1. The Front Page: Searching the Library} +\begin{page}{ugBrowseStartPage} +{14.1. The Front Page: Searching the Library} \beginscroll To enter \Browse{}, click on {\bf Browse} on the top level page -of \HyperName{} to get the {\it front page} of \Browse{}. +of Hyperdoc to get the {\it front page} of \Browse{}. % %324pt is 4.5",180pt is 2.5",432pt is 6"=textwidth,54=(432-324)/2 %ps files are 4.5"x2.5" except source 4.5"x2.5" @@ -49766,7 +44853,8 @@ If you select an operation name, you go to a page describing all the operations in Axiom of that name. At the bottom of an operation page is another kind of {\it Views} panel, one for operation pages. To learn more about these views, skip to -\downlink{``\ugBrowseViewsOfOperationsTitle''}{ugBrowseViewsOfOperationsPage} +\downlink{``\ugBrowseViewsOfOperationsTitle''} +{ugBrowseViewsOfOperationsPage} in Section \ugBrowseViewsOfOperationsNumber\ignore{ugBrowseViewsOfOperations}. @@ -49818,16 +44906,7 @@ This search combines both {\bf General} and {\bf Documentation}. \end{page} @ -<>= -\newcommand{\ugBrowseDomainTitle}{The Constructor Page} -\newcommand{\ugBrowseDomainNumber}{14.2.} - -@ -\section{The Constructor Page} -\label{ugBrowseDomainPage} -\index{pages!ugBrowseDomainPage!ug14.ht} -\index{ug14.ht!pages!ugBrowseDomainPage} -\index{ugBrowseDomainPage!ug14.ht!pages} +\pagehead{ugBrowseDomainPage}{ug14.ht}{The Constructor Page} <>= \begin{page}{ugBrowseDomainPage}{14.2. The Constructor Page} \beginscroll @@ -49865,30 +44944,22 @@ through this chapter as you occasionally may want to refer to it. \texht{\newpage}{} \beginmenu - \menudownlink{{14.2.1. Constructor Page Buttons}}{ugBrowseDomainButtonsPage} - \menudownlink{{14.2.2. Cross Reference}}{ugBrowseCrossReferencePage} - \menudownlink{{14.2.3. Views Of Constructors}}{ugBrowseViewsOfConstructorsPage} - \menudownlink{{14.2.4. Giving Parameters to Constructors}}{ugBrowseGivingParametersPage} +\menudownlink{{14.2.1. Constructor Page Buttons}} +{ugBrowseDomainButtonsPage} +\menudownlink{{14.2.2. Cross Reference}} +{ugBrowseCrossReferencePage} +\menudownlink{{14.2.3. Views Of Constructors}} +{ugBrowseViewsOfConstructorsPage} +\menudownlink{{14.2.4. Giving Parameters to Constructors}} +{ugBrowseGivingParametersPage} \endmenu \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugBrowseDomainButtonsTitle}{Constructor Page Buttons} -\newcommand{\ugBrowseDomainButtonsNumber}{14.2.1.} - -@ -\section{Constructor Page Buttons} -\label{ugBrowseDomainButtonsPage} -\begin{itemize} -\item ugBrowseViewsOfOperationsPage \ref{ugBrowseViewsOfOperationsPage} on -page~\pageref{ugBrowseViewsOfOperationsPage} -\end{itemize} -\index{pages!ugBrowseDomainButtonsPage!ug14.ht} -\index{ug14.ht!pages!ugBrowseDomainButtonsPage} -\index{ugBrowseDomainButtonsPage!ug14.ht!pages} +\pagehead{ugBrowseDomainButtonsPage}{ug14.ht}{Constructor Page Buttons} +\pageto{notitle}{ugBrowseViewsOfOperationsPage} <>= \begin{page}{ugBrowseDomainButtonsPage}{14.2.1. Constructor Page Buttons} \beginscroll @@ -49915,7 +44986,8 @@ below. If you click on an operation name, you bring up a description page for the operations. For a detailed description of these pages, skip to -\downlink{``\ugBrowseViewsOfOperationsTitle''}{ugBrowseViewsOfOperationsPage} +\downlink{``\ugBrowseViewsOfOperationsTitle''} +{ugBrowseViewsOfOperationsPage} in Section \ugBrowseViewsOfOperationsNumber\ignore{ugBrowseViewsOfOperations}. @@ -49987,9 +45059,9 @@ operations. Also, it inherits its operations from \axiomType{TwoDimensionalArrayCategory}. -\item[2. ] Click on {\bf TwoDimensionalArrayCategory}, then on {\bf Exports}. -Here you see explicit operations dealing with rows and columns. -In addition, it inherits operations from +\item[2. ] Click on {\bf TwoDimensionalArrayCategory}, then on +{\bf Exports}. Here you see explicit operations dealing with rows +and columns. In addition, it inherits operations from \axiomType{HomogeneousAggregate}. %\item Click on {\bf HomogeneousAggregate}, then on {\bf Exports}. @@ -50000,8 +45072,8 @@ In addition, it inherits operations from click on {\bf Object}, then on {\bf Exports}, where you see there are no exports. -\item[4. ] Click on \UpBitmap{} repeatedly to return to the constructor page -for \axiomType{Matrix}. +\item[4. ] Click on \UpBitmap{} repeatedly to return to the constructor +page for \axiomType{Matrix}. \enditems \indent{0} @@ -50021,16 +45093,7 @@ To see a table of such packages, use the {\bf Relatives} button on the \end{page} @ -<>= -\newcommand{\ugBrowseCrossReferenceTitle}{Cross Reference} -\newcommand{\ugBrowseCrossReferenceNumber}{14.2.2.} - -@ -\section{Cross Reference} -\label{ugBrowseCrossReferencePage} -\index{pages!ugBrowseCrossReferencePage!ug14.ht} -\index{ug14.ht!pages!ugBrowseCrossReferencePage} -\index{ugBrowseCrossReferencePage!ug14.ht!pages} +\pagehead{ugBrowseCrossReferencePage}{ug14.ht}{Cross Reference} <>= \begin{page}{ugBrowseCrossReferencePage}{14.2.2. Cross Reference} \beginscroll @@ -50049,11 +45112,11 @@ have any number. \subsubsection{Ancestors} -The \spadglossSee{ancestors}{ancestor} of a constructor consist of its parents, the -parents of its parents, and so on. -Did you perform the exercise in the last section under {\bf Exports}? -If so, you see here all the categories you found while ascending the -{\bf Exports} chain for \axiomType{Matrix}. +The \spadglossSee{ancestors}{ancestor} of a constructor consist of its +parents, the parents of its parents, and so on. Did you perform the +exercise in the last section under {\bf Exports}? If so, you see here +all the categories you found while ascending the {\bf Exports} chain +for \axiomType{Matrix}. \subsubsection{Relatives} @@ -50068,7 +45131,7 @@ Try this exercise. \spadglossSee{packages}{package}. \item[2. ] Click on {\bf LinearSystemMatrixPackage} bringing up its -constructor page.\footnote{You may want to widen your \HyperName{} +constructor page.\footnote{You may want to widen your Hyperdoc window to make what follows more legible.} \item[3. ] Click on {\bf Operations}. @@ -50080,8 +45143,8 @@ This \spadfunFrom{rank}{LinearSystemMatrixPackage} has two arguments and thus is different from the \spadfunFrom{rank}{Matrix} from \axiomType{Matrix}. -\item[5. ] Click on \UpBitmap{} to return to the list of operations for the -package \axiomType{LinearSystemMatrixPackage}. +\item[5. ] Click on \UpBitmap{} to return to the list of operations for +the package \axiomType{LinearSystemMatrixPackage}. \item[6. ] Click on {\bf solve} to bring up a \spadfunFrom{solve}{LinearSystemMatrixPackage} for linear systems of @@ -50096,8 +45159,8 @@ reference page for \axiomType{Matrix}. The \spadglossSee{dependents}{dependent} of a constructor are those \spadglossSee{domains}{domain} or \spadglossSee{packages}{package} -that mention that -constructor either as an argument or in its \spadglossSee{exports}{export}. +that mention that constructor either as an argument or in its +\spadglossSee{exports}{export}. If you click on {\bf Dependents} two entries may surprise you: \axiomType{RectangularMatrix} and \axiomType{SquareMatrix}. @@ -50121,22 +45184,17 @@ list of domain constructors: \aliascon{Aggregate\&}{AGG-}. What are these constructors and how are they used? -We explain by an example. -Suppose you create a matrix using the interpreter, then ask for its -\axiomFun{rank}. -Axiom must then find a function implementing the \axiomFun{rank} -operation for matrices. -The first place Axiom looks for \axiomFun{rank} is in the \axiomType{Matrix} -domain. +We explain by an example. Suppose you create a matrix using the +interpreter, then ask for its \axiomFun{rank}. Axiom must then find a +function implementing the \axiomFun{rank} operation for matrices. The +first place Axiom looks for \axiomFun{rank} is in the +\axiomType{Matrix} domain. -If not there, the lineage of \axiomType{Matrix} tells Axiom where -else to look. -Associated with the matrix domain are five other lineage domains. -Their order is important. -Axiom first searches the first one, -\axiomType{InnerIndexedTwoDimensionalArray}. -If not there, it searches the second \aliascon{MatrixCategory\&}{MATCAT-}. -And so on. +If not there, the lineage of \axiomType{Matrix} tells Axiom where else +to look. Associated with the matrix domain are five other lineage +domains. Their order is important. Axiom first searches the first +one, \axiomType{InnerIndexedTwoDimensionalArray}. If not there, it +searches the second \aliascon{MatrixCategory\&}{MATCAT-}. And so on. Where do these {\it lineage constructors} come from? The source code for \axiomType{Matrix} contains this syntax for the @@ -50231,16 +45289,7 @@ ring. \end{page} @ -<>= -\newcommand{\ugBrowseViewsOfConstructorsTitle}{Views Of Constructors} -\newcommand{\ugBrowseViewsOfConstructorsNumber}{14.2.3.} - -@ -\section{Views Of Constructors} -\label{ugBrowseViewsOfConstructorsPage} -\index{pages!ugBrowseViewsOfConstructorsPage!ug14.ht} -\index{ug14.ht!pages!ugBrowseViewsOfConstructorsPage} -\index{ugBrowseViewsOfConstructorsPage!ug14.ht!pages} +\pagehead{ugBrowseViewsOfConstructorsPage}{ug14.ht}{Views Of Constructors} <>= \begin{page}{ugBrowseViewsOfConstructorsPage}{14.2.3. Views Of Constructors} \beginscroll @@ -50269,7 +45318,7 @@ constructor. This view gives you a table of abbreviations, in the same order as the original constructor names. -Abbreviations are in capitals and are limited to 7 characters. +nAbbreviations are in capitals and are limited to 7 characters. They can be used interchangeably with constructor names in input areas. \subsubsection{kinds} @@ -50303,41 +45352,31 @@ This gives you documentation for each of the constructors. \subsubsection{conditions} -This page organizes the constructors according to predicates. -The view is not available for your example page since all constructors -are unconditional. -For a table with conditions, return to the {\bf Cross Reference} page -for \axiomType{Matrix}, click on {\bf Ancestors}, then on {\bf -conditions} in the view panel. -This page shows you that \axiomType{CoercibleTo(OutputForm)} and -\axiomType{SetCategory} are ancestors of \axiomType{Matrix(R)} only if {\tt R} -belongs to category \axiomType{SetCategory}. +This page organizes the constructors according to predicates. The +view is not available for your example page since all constructors are +unconditional. For a table with conditions, return to the {\bf Cross +Reference} page for \axiomType{Matrix}, click on {\bf Ancestors}, then +on {\bf conditions} in the view panel. This page shows you that +\axiomType{CoercibleTo(OutputForm)} and \axiomType{SetCategory} are +ancestors of \axiomType{Matrix(R)} only if {\tt R} belongs to category +\axiomType{SetCategory}. -%********************************************************************* \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugBrowseGivingParametersTitle}{Giving Parameters to Constructors} -\newcommand{\ugBrowseGivingParametersNumber}{14.2.4.} - -@ -\section{Giving Parameters to Constructors} -\label{ugBrowseGivingParametersPage} -\index{pages!ugBrowseGivingParametersPage!ug14.ht} -\index{ug14.ht!pages!ugBrowseGivingParametersPage} -\index{ugBrowseGivingParametersPage!ug14.ht!pages} +\pagehead{ugBrowseGivingParametersPage}{ug14.ht} +{Giving Parameters to Constructors} <>= \begin{page}{ugBrowseGivingParametersPage} {14.2.4. Giving Parameters to Constructors} \beginscroll %********************************************************************* -Notice the input area at the bottom of the constructor page. -If you leave this blank, then the information you get is for the -domain constructor \axiomType{Matrix(R)}, that is, \axiomType{Matrix} for an +Notice the input area at the bottom of the constructor page. If you +leave this blank, then the information you get is for the domain +constructor \axiomType{Matrix(R)}, that is, \axiomType{Matrix} for an arbitrary underlying domain {\tt R}. In general, however, the exports and other information {\it do} usually @@ -50348,7 +45387,8 @@ To see this, try this from the main constructor page: \indent{4} \beginitems -\item[1. ] Enter {\tt Integer} into the input area at the bottom of the page. +\item[1. ] Enter {\tt Integer} into the input area at the bottom of +the page. \item[2. ] Click on {\bf Operations}, producing a table of operations. Note the number of operation names that appear at the top of the @@ -50367,12 +45407,12 @@ Look at the number of operations you get. This number is greater than what you had before. Find, for example, the operation \axiomFun{inverse}. -\item[6. ] Click on {\bf inverse} to produce a page describing the operation -\axiomFun{inverse}. -At the bottom of the description, you notice that the {\bf -Conditions} line says ``{\tt R} has \axiomType{Field}.'' -This operation is {\it not} exported by \axiomType{Matrix(Integer)} since -\axiomType{Integer} is not a \spadgloss{field}. +\item[6. ] Click on {\bf inverse} to produce a page describing the +operation \axiomFun{inverse}. At the bottom of the description, you +notice that the {\bf Conditions} line says ``{\tt R} has +\axiomType{Field}.'' This operation is {\it not} exported by +\axiomType{Matrix(Integer)} since \axiomType{Integer} is not a +\spadgloss{field}. Try putting the name of a domain such as \axiomType{Fraction Integer} (which is a field) into the input area, then clicking on {\bf Operations}. @@ -50385,41 +45425,28 @@ As you see, the operation \axiomFun{inverse} is exported. \end{page} @ -<>= -\newcommand{\ugBrowseMiscellaneousFeaturesTitle}{Miscellaneous Features of Browse} -\newcommand{\ugBrowseMiscellaneousFeaturesNumber}{14.3.} - -@ -\section{Miscellaneous Features of Browse} -\label{ugBrowseMiscellaneousFeaturesPage} -\index{pages!ugBrowseMiscellaneousFeaturesPage!ug14.ht} -\index{ug14.ht!pages!ugBrowseMiscellaneousFeaturesPage} -\index{ugBrowseMiscellaneousFeaturesPage!ug14.ht!pages} +\pagehead{ugBrowseMiscellaneousFeaturesPage}{ug14.ht} +{Miscellaneous Features of Browse} <>= \begin{page}{ugBrowseMiscellaneousFeaturesPage} {14.3. Miscellaneous Features of Browse} \beginscroll \labelSpace{4pc} \beginmenu - \menudownlink{{14.3.1. The Description Page for Operations}}{ugBrowseDescriptionPagePage} - \menudownlink{{14.3.2. Views of Operations}}{ugBrowseViewsOfOperationsPage} - \menudownlink{{14.3.3. Capitalization Convention}}{ugBrowseCapitalizationConventionPage} +\menudownlink{{14.3.1. The Description Page for Operations}} +{ugBrowseDescriptionPagePage} +\menudownlink{{14.3.2. Views of Operations}} +{ugBrowseViewsOfOperationsPage} +\menudownlink{{14.3.3. Capitalization Convention}} +{ugBrowseCapitalizationConventionPage} \endmenu \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugBrowseDescriptionPageTitle}{The Description Page for Operations} -\newcommand{\ugBrowseDescriptionPageNumber}{14.3.1.} - -@ -\section{The Description Page for Operations} -\label{ugBrowseDescriptionPagePage} -\index{pages!ugBrowseDescriptionPagePage!ug14.ht} -\index{ug14.ht!pages!ugBrowseDescriptionPagePage} -\index{ugBrowseDescriptionPagePage!ug14.ht!pages} +\pagehead{ugBrowseDescriptionPagePage}{ug14.ht} +{The Description Page for Operations} <>= \begin{page}{ugBrowseDescriptionPagePage} {14.3.1. The Description Page for Operations} @@ -50436,9 +45463,9 @@ Here is the significance of the headings you see. \subsubsection{Arguments} -This lists each of the arguments of the operation in turn, paraphrasing -the \spadgloss{signature} of the operation. -As for signatures, a \axiomSyntax{\$} is used to designate {\em this domain}, +This lists each of the arguments of the operation in turn, +paraphrasing the \spadgloss{signature} of the operation. As for +signatures, a \axiomSyntax{\$} is used to designate {\em this domain}, that is, \axiomType{Matrix(R)}. \subsubsection{Returns} @@ -50455,7 +45482,8 @@ In this example, the domain itself is the {\it Origin}. \subsubsection{Conditions} -This tells you that the operation is exported by \axiomType{Matrix(R)} only if +This tells you that the operation is exported by +\axiomType{Matrix(R)} only if ``{\tt R} has \axiomType{Field},'' that is, ``{\tt R} is a member of category \axiomType{Field}.'' When no {\bf Conditions} part is given, the operation is exported for @@ -50464,7 +45492,8 @@ all values of {\tt R}. \subsubsection{Description} Here are the \axiomSyntax{++} comments -that appear in the source code of its {\it Origin}, here \axiomType{Matrix}. +that appear in the source code of its {\it Origin}, here +\axiomType{Matrix}. You find these comments in the source code for \axiomType{Matrix}. @@ -50489,16 +45518,7 @@ operation. \end{page} @ -<>= -\newcommand{\ugBrowseViewsOfOperationsTitle}{Views of Operations} -\newcommand{\ugBrowseViewsOfOperationsNumber}{14.3.2.} - -@ -\section{Views of Operations} -\label{ugBrowseViewsOfOperationsPage} -\index{pages!ugBrowseViewsOfOperationsPage!ug14.ht} -\index{ug14.ht!pages!ugBrowseViewsOfOperationsPage} -\index{ugBrowseViewsOfOperationsPage!ug14.ht!pages} +\pagehead{ugBrowseViewsOfOperationsPage}{ug14.ht}{Views of Operations} <>= \begin{page}{ugBrowseViewsOfOperationsPage}{14.3.2. Views of Operations} \beginscroll @@ -50632,16 +45652,8 @@ constructor page for that constructor. \end{page} @ -<>= -\newcommand{\ugBrowseCapitalizationConventionTitle}{Capitalization Convention} -\newcommand{\ugBrowseCapitalizationConventionNumber}{14.3.3.} - -@ -\section{Capitalization Convention} -\label{ugBrowseCapitalizationConventionPage} -\index{pages!ugBrowseCapitalizationConventionPage!ug14.ht} -\index{ug14.ht!pages!ugBrowseCapitalizationConventionPage} -\index{ugBrowseCapitalizationConventionPage!ug14.ht!pages} +\pagehead{ugBrowseCapitalizationConventionPage}{ug14.ht} +{Capitalization Convention} <>= \begin{page}{ugBrowseCapitalizationConventionPage} {14.3.3. Capitalization Convention} @@ -50679,16 +45691,7 @@ For example, for the category default package @ \chapter{Users Guide Chapter 15 (ug15.ht)} -<>= -\newcommand{\ugWhatsNewTitle}{What's New in Axiom Version 2.0} -\newcommand{\ugWhatsNewNumber}{15.} - -@ -\section{What's New in Axiom Version 2.0} -\label{ugWhatsNewPage} -\index{pages!ugWhatsNewPage!ug15.ht} -\index{ug15.ht!pages!ugWhatsNewPage} -\index{ugWhatsNewPage!ug15.ht!pages} +\pagehead{ugWhatsNewPage}{ug15.ht}{What's New in Axiom Version 2.0} <>= \begin{page}{ugWhatsNewPage}{15. What's New in Axiom Version 2.0} \beginscroll @@ -50696,35 +45699,29 @@ For example, for the category default package Many things have changed in this new version of Axiom and we describe many of the more important topics here. -%------------------------------------------------------------------------ \beginmenu - \menudownlink{{15.1. Important Things to Read First}}{ugWhatsNewImportantPage} - \menudownlink{{15.2. The New Axiom Library Compiler}}{ugWhatsNewAsharpPage} - \menudownlink{{15.3. The NAG Library Link}}{nagLinkIntroPage} - \menudownlink{{15.4. Interactive Front-end and Language}}{ugWhatsNewLanguagePage} - \menudownlink{{15.5. Library}}{ugWhatsNewLibraryPage} - \menudownlink{{15.6. \HyperName}}{ugWhatsNewHyperDocPage} - \menudownlink{{15.7. Documentation}}{ugWhatsNewDocumentationPage} +\menudownlink{{15.1. Important Things to Read First}} +{ugWhatsNewImportantPage} +\menudownlink{{15.2. The New Axiom Library Compiler}} +{ugWhatsNewAsharpPage} +\menudownlink{{15.3. The NAG Library Link}}{nagLinkIntroPage} +\menudownlink{{15.4. Interactive Front-end and Language}} +{ugWhatsNewLanguagePage} +\menudownlink{{15.5. Library}}{ugWhatsNewLibraryPage} +\menudownlink{{15.6. \HyperName}}{ugWhatsNewHyperDocPage} +\menudownlink{{15.7. Documentation}}{ugWhatsNewDocumentationPage} \endmenu \endscroll \autobuttons \end{page} @ +\pagehead{ugWhatsNewImportantPage}{ug15.ht} +{Important Things to Read First} <>= -\newcommand{\ugWhatsNewImportantTitle}{Important Things to Read First} -\newcommand{\ugWhatsNewImportantNumber}{15.1.} - -@ -\section{Important Things to Read First} -\label{ugWhatsNewImportantPage} -\index{pages!ugWhatsNewImportantPage!ug15.ht} -\index{ug15.ht!pages!ugWhatsNewImportantPage} -\index{ugWhatsNewImportantPage!ug15.ht!pages} -<>= -\begin{page}{ugWhatsNewImportantPage}{15.1. Important Things to Read First} +\begin{page}{ugWhatsNewImportantPage} +{15.1. Important Things to Read First} \beginscroll -%------------------------------------------------------------------------ If you have any private {\tt .spad} files (that is, library files which were not shipped with Axiom) you will need to @@ -50738,46 +45735,31 @@ with Release 1.x may not be readable by this Release. If you cannot recreate the saved data by recomputing in Release 2.0, please contact NAG for assistance. -%------------------------------------------------------------------------ \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugWhatsNewAsharpTitle}{The New Axiom Library Compiler} -\newcommand{\ugWhatsNewAsharpNumber}{15.2.} - -@ -\section{The New Axiom Library Compiler} -\label{ugWhatsNewAsharpPage} -\index{pages!ugWhatsNewAsharpPage!ug15.ht} -\index{ug15.ht!pages!ugWhatsNewAsharpPage} -\index{ugWhatsNewAsharpPage!ug15.ht!pages} +\pagehead{ugWhatsNewAsharpPage}{ug15.ht}{The New Axiom Library Compiler} <>= \begin{page}{ugWhatsNewAsharpPage}{15.2. The New Axiom Library Compiler} \beginscroll -%------------------------------------------------------------------------ - -A new compiler is now available for Axiom. -The programming language is referred to as the Axiom Extension Language -(or \axiomxl{} for short), and -improves upon the old Axiom language in many ways. -The \spadcmd{)compile} command has been upgraded to be able to -invoke the new or old compilers. -The language and the compiler are described in the hard-copy -documentation which came with your Axiom system. - -To ease the chore of upgrading your {\it .spad} files (old -compiler) to {\it .as} files (new compiler), the -\spadcmd{)compile} command has been given a {\tt )translate} -option. This invokes a special version of the old compiler which -parses and analyzes your old code and produces augmented code -using the new syntax. -Please be aware that the translation is not necessarily one -hundred percent complete or correct. -You should attempt to compile the output with the \axiomxl{} compiler -and make any necessary corrections. + +A new compiler is now available for Axiom. The programming language +is referred to as the Axiom Extension Language (or Aldor for short), +and improves upon the old Axiom language in many ways. The +\spadcmd{)compile} command has been upgraded to be able to invoke the +new or old compilers. The language and the compiler are described in +the hard-copy documentation which came with your Axiom system. + +To ease the chore of upgrading your {\it .spad} files (old compiler) +to {\it .as} files (new compiler), the \spadcmd{)compile} command has +been given a {\tt )translate} option. This invokes a special version +of the old compiler which parses and analyzes your old code and +produces augmented code using the new syntax. Please be aware that +the translation is not necessarily one hundred percent complete or +correct. You should attempt to compile the output with the Aldor +compiler and make any necessary corrections. \endscroll @@ -50785,30 +45767,13 @@ and make any necessary corrections. \end{page} @ -<>= -\newcommand{\nagLinkIntroTitle}{The NAG Library Link} -\newcommand{\nagLinkIntroNumber}{15.3.} - -@ -\section{The NAG Library Link} -\label{nagLinkIntroPage} -\begin{itemize} -\item htxl1 \ref{htxl1} on -page~\pageref{htxl1} -\item nagDocumentationPage \ref{nagDocumentationPage} on -page~\pageref{nagDocumentationPage} -\item nagLinkUsagePage \ref{nagLinkUsagePage} on -page~\pageref{nagLinkUsagePage} -\item aspSectionPage \ref{aspSectionPage} on -page~\pageref{aspSectionPage} -\item generalFortranPage \ref{generalFortranPage} on -page~\pageref{generalFortranPage} -\item nagTechnicalPage \ref{nagTechnicalPage} on -page~\pageref{nagTechnicalPage} -\end{itemize} -\index{pages!nagLinkIntroPage!ug15.ht} -\index{ug15.ht!pages!nagLinkIntroPage} -\index{nagLinkIntroPage!ug15.ht!pages} +\pagehead{nagLinkIntroPage}{ug15.ht}{The NAG Library Link} +\pageto{notitle}{htxl1} +\pageto{notitle}{nagDocumentationPage} +\pageto{notitle}{nagLinkUsagePage} +\pageto{notitle}{aspSectionPage} +\pageto{notitle}{generalFortranPage} +\pageto{notitle}{nagTechnicalPage} <>= \begin{page}{nagLinkIntroPage}{15.3. The NAG Library Link} \beginscroll @@ -50817,20 +45782,20 @@ The \naglib{} link allows you to call NAG Fortran routines from within Axiom, passing Axiom objects as parameters and getting them back as results. -The \naglib{} and, consequently, the link are divided into {\em chapters}, -which cover different areas of numerical analysis. The statistical -and sorting {\em chapters} of the Library, however, are not included in the -link and various support and utility routines (mainly the F06 and X -{\em chapters}) have been omitted. - -Each {\em chapter} has a short (at most three-letter) name; -for example, the {\em chapter} devoted to the -solution of ordinary differential equations is called D02. When -using the link via the \downlink{\HyperName{} interface}{htxl1}, -you will be presented with a complete menu of these {\em chapters}. The -names of individual routines within each {\em chapter} are formed by -adding three letters to the {\em chapter} name, so for example the routine -for solving ODEs by Adams method is called +The \naglib{} and, consequently, the link are divided into {\em +chapters}, which cover different areas of numerical analysis. The +statistical and sorting {\em chapters} of the Library, however, are +not included in the link and various support and utility routines +(mainly the F06 and X {\em chapters}) have been omitted. + +Each {\em chapter} has a short (at most three-letter) name; for +example, the {\em chapter} devoted to the solution of ordinary +differential equations is called D02. When using the link via the +\downlink{Hyperdoc interface}{htxl1}, you will be presented with a +complete menu of these {\em chapters}. The names of individual +routines within each {\em chapter} are formed by adding three letters +to the {\em chapter} name, so for example the routine for solving ODEs +by Adams method is called \axiomFunFrom{d02cjf}{NagOrdinaryDifferentialEquationsPackage}. \beginmenu @@ -50848,32 +45813,17 @@ for solving ODEs by Adams method is called \end{page} @ -<>= -\newcommand{\nagDocumentationTitle}{Interpreting NAG Documentation} -\newcommand{\nagDocumentationNumber}{15.3.1.} - -@ -\section{Interpreting NAG Documentation} -\label{nagDocumentationPage} -\begin{itemize} -\item manpageXXintro \ref{manpageXXintro} on -page~\pageref{manpageXXintro} -\item manpageXXonline \ref{manpageXXonline} on -page~\pageref{manpageXXonline} -\item FoundationLibraryDocPage \ref{FoundationLibraryDocPage} on -page~\pageref{FoundationLibraryDocPage} -\item aspSectionPage \ref{aspSectionPage} on -page~\pageref{aspSectionPage} -\end{itemize} -\index{pages!nagDocumentationPage!ug15.ht} -\index{ug15.ht!pages!nagDocumentationPage} -\index{nagDocumentationPage!ug15.ht!pages} +\pagehead{nagDocumentationPage}{ug15.ht}{Interpreting NAG Documentation} +\pageto{notitle}{manpageXXintro} +\pageto{notitle}{manpageXXonline} +\pageto{notitle}{FoundationLibraryDocPage} +\pageto{notitle}{aspSectionPage} <>= \begin{page}{nagDocumentationPage}{15.3.1. Interpreting NAG Documentation} \beginscroll Information about using the \naglib{} in general, and about using -individual routines in particular, can be accessed via \HyperName{}. +individual routines in particular, can be accessed via Hyperdoc. This documentation refers to the Fortran routines directly; the purpose of this subsection is to explain how this corresponds to the Axiom routines. @@ -50894,8 +45844,10 @@ general, the correspondence to Axiom types is as follows. \indent{4} \beginitems \item[-] Fortran INTEGER corresponds to Axiom \axiomType{Integer}. -\item[-] Fortran DOUBLE PRECISION corresponds to Axiom \axiomType{DoubleFloat}. -\item[-] Fortran COMPLEX corresponds to Axiom \axiomType{Complex DoubleFloat}. +\item[-] Fortran DOUBLE PRECISION corresponds to Axiom +\axiomType{DoubleFloat}. +\item[-] Fortran COMPLEX corresponds to Axiom +\axiomType{Complex DoubleFloat}. \item[-] Fortran LOGICAL corresponds to Axiom \axiomType{Boolean}. \item[-] Fortran CHARACTER*(*) corresponds to Axiom \axiomType{String}. \enditems @@ -50948,11 +45900,10 @@ parameters. The {\tt External} parameters are always found at the end. \subsubsection{IFAIL} -NAG routines often return diagnostic information through a parameter called -\axiom{ifail}. With a few exceptions, the principle is that on input -\axiom{ifail} takes -one of the values $-1,0,1$. This determines how the routine behaves when -it encounters an error: +NAG routines often return diagnostic information through a parameter +called \axiom{ifail}. With a few exceptions, the principle is that on +input \axiom{ifail} takes one of the values $-1,0,1$. This determines +how the routine behaves when it encounters an error: \indent{4} \beginitems \item[-] a value of 1 causes the NAG routine to return without printing @@ -50977,26 +45928,14 @@ via \Browse{}). \end{page} @ -<>= -\newcommand{\nagLinkUsageTitle}{Using the Link} -\newcommand{\nagLinkUsageNumber}{15.3.2.} - -@ -\section{Using the Link} -\label{nagLinkUsagePage} -\begin{itemize} -\item htxl1 \ref{htxl1} on -page~\pageref{htxl1} -\end{itemize} -\index{pages!nagLinkUsagePage!ug15.ht} -\index{ug15.ht!pages!nagLinkUsagePage} -\index{nagLinkUsagePage!ug15.ht!pages} +\pagehead{nagLinkUsagePage}{ug15.ht}{Using the Link} +\pageto{notitle}{htxl1} <>= \begin{page}{nagLinkUsagePage}{15.3.2. Using the Link} \beginscroll The easiest way to use the link is via the -\downlink{\HyperName{} interface}{htxl1}. +\downlink{Hyperdoc interface}{htxl1}. You will be presented with a set of fill-in forms where you can specify the parameters for each call. Initially, the forms contain example values, demonstrating the use of each routine (these, @@ -51031,13 +45970,14 @@ input area, then click on {\tt Operations}.) The parameter names used coincide with NAG's, although they will appear here in lower case. Of course, it is also possible to become familiar with the Axiom form of a routine by first using it through the -\downlink{\HyperName{} interface}{htxl1}. +\downlink{Hyperdoc interface}{htxl1}. \xtc{ As an example of this mode of working, we can find a zero of a function, lying between 3 and 4, as follows: }{ -\spadpaste{answer:=c05adf(3.0,4.0,1.0e-5,0.0,-1,sin(X)::ASP1(F))\bound{answer} } +\spadpaste{answer:=c05adf(3.0,4.0,1.0e-5,0.0,-1,sin(X)::ASP1(F)) +\bound{answer} } } \xtc{ By default, \axiomType{Result} only displays the type of returned values, @@ -51051,9 +45991,9 @@ components can be examined as follows: \spadpaste{answer . ifail\free{answer}} } \xtc{ -In order to avoid conflict with names defined in the workspace, you can also -get the values by using the \axiomType{String} type (the interpreter automatically -coerces them to \axiomType{Symbol}) +In order to avoid conflict with names defined in the workspace, you +can also get the values by using the \axiomType{String} type (the +interpreter automatically coerces them to \axiomType{Symbol}) }{ \spadpaste{answer "x"\free{answer}} } @@ -51077,22 +46017,12 @@ example for that routine. \end{page} @ +\pagehead{aspSectionPage}{ug15.ht} +{Providing values for Argument Subprograms} +\pageto{notitle}{generalFortranPage} <>= -\newcommand{\aspSectionTitle}{Providing values for Argument Subprograms} -\newcommand{\aspSectionNumber}{15.3.3.} - -@ -\section{Providing values for Argument Subprograms} -\label{aspSectionPage} -\begin{itemize} -\item generalFortranPage \ref{generalFortranPage} on -page~\pageref{generalFortranPage} -\end{itemize} -\index{pages!aspSectionPage!ug15.ht} -\index{ug15.ht!pages!aspSectionPage} -\index{aspSectionPage!ug15.ht!pages} -<>= -\begin{page}{aspSectionPage}{15.3.3. Providing values for Argument Subprograms} +\begin{page}{aspSectionPage} +{15.3.3. Providing values for Argument Subprograms} \beginscroll There are a number of ways in which users can provide values for argument @@ -51100,8 +46030,9 @@ subprograms (ASPs). At the top level the user will see that NAG routines require an object from the \axiomType{Union} of a \axiomType{Filename} and an ASP. \xtc{ -For example \axiomFun{c05adf} requires an object of type \texht{\linebreak}{} -\axiomType{Union}(fn: \axiomType{FileName},fp: \axiomType{Asp1 F}) +For example \axiomFun{c05adf} requires an object of type +\texht{\linebreak}{} \axiomType{Union}(fn: +\axiomType{FileName},fp: \axiomType{Asp1 F}) }{ \spadpaste{)display operation c05adf} } @@ -51113,14 +46044,13 @@ machine, i.e., the machine that Axiom is running on. \subsubsection{Providing ASPs via \axiomType{FortranExpression}} -The \axiomType{FortranExpression} domain is used to represent expressions -which can be translated into Fortran under certain circumstances. It is -very similar to \axiomType{Expression} except that only operators which exist -in Fortran can be used, and only certain variables can occur. -For -example the instantiation \axiomType{FortranExpression([X],[M],MachineFloat)} -is the domain of expressions containing the scalar \axiom{X} and the array -\axiom{M}. +The \axiomType{FortranExpression} domain is used to represent +expressions which can be translated into Fortran under certain +circumstances. It is very similar to \axiomType{Expression} except +that only operators which exist in Fortran can be used, and only +certain variables can occur. For example the instantiation +\axiomType{FortranExpression([X],[M],MachineFloat)} is the domain of +expressions containing the scalar \axiom{X} and the array \axiom{M}. \xtc{ This allows us to create expressions like: }{ @@ -51132,10 +46062,11 @@ but not \spadpaste{f : FortranExpression([X],[M],MachineFloat) := sin(M)+Y} } -Those ASPs which represent expressions usually export a \axiomFun{coerce} from -an appropriate instantiation of \axiomType{FortranExpression} (or perhaps -\axiomType{Vector FortranExpression} etc.). For convenience there are also -retractions from appropriate instantiations of \axiomType{Expression}, +Those ASPs which represent expressions usually export a +\axiomFun{coerce} from an appropriate instantiation of +\axiomType{FortranExpression} (or perhaps \axiomType{Vector +FortranExpression} etc.). For convenience there are also retractions +from appropriate instantiations of \axiomType{Expression}, \axiomType{Polynomial} and \axiomType{Fraction Polynomial}. \subsubsection{Providing ASPs via \axiomType{FortranCode}} @@ -51153,14 +46084,17 @@ There is also a \axiomFun{coerce} from \texht{\linebreak}{} which is used for passing extra symbol information about the ASP. \xtc{ -So for example, to integrate the function abs(x) we could use the built-in -\axiomFun{abs} function. But suppose we want to get back to basics and define -it directly, then we could do the following: +So for example, to integrate the function abs(x) we could use the +built-in \axiomFun{abs} function. But suppose we want to get back to +basics and define it directly, then we could do the following: }{ -\spadpaste{d01ajf(-1.0, 1.0, 0.0, 1.0e-5, 800, 200, -1, cond(LT(X,0), assign(F,-X), assign(F,X))) result } +\spadpaste{d01ajf(-1.0, 1.0, 0.0, 1.0e-5, 800, 200, -1, cond(LT(X,0), +assign(F,-X), assign(F,X))) result } } -The \axiomFunFrom{cond}{FortranCode} operation creates a conditional clause -and the \axiomFunFrom{assign}{FortranCode} an assignment statement. + +The \axiomFunFrom{cond}{FortranCode} operation creates a conditional +clause and the \axiomFunFrom{assign}{FortranCode} an assignment +statement. \subsubsection{Providing ASPs via \axiomType{FileName}} @@ -51184,25 +46118,17 @@ d01ajf(0.0 ,1.0, 0.0, 1.0e-5, 800, 200, -1, "asp.f") \end{page} @ -<>= -\newcommand{\generalFortranTitle}{General Fortran-generation utilities in Axiom} -\newcommand{\generalFortranNumber}{15.3.4.} - -@ -\section{General Fortran-generation utilities in Axiom} -\label{generalFortranPage} -\index{pages!generalFortranPage!ug15.ht} -\index{ug15.ht!pages!generalFortranPage} -\index{generalFortranPage!ug15.ht!pages} +\pagehead{generalFortranPage}{ug15.ht} +{General Fortran-generation utilities in Axiom} <>= \begin{page}{generalFortranPage} {15.3.4. General Fortran-generation utilities in Axiom} \beginscroll -This section describes more advanced facilities which are available to users -who wish to generate Fortran code from within Axiom. There are -facilities to manipulate templates, store type information, and generate -code fragments or complete programs. +This section describes more advanced facilities which are available to +users who wish to generate Fortran code from within Axiom. There are +facilities to manipulate templates, store type information, and +generate code fragments or complete programs. \subsubsection{Template Manipulation} @@ -51226,12 +46152,11 @@ beginVerbatim END endVerbatim \end{verbatim} -The passive parts lie between the two -tokens {\tt beginVerbatim} and \texht{\linebreak}{} {\tt endVerbatim}. There -are two active statements: one which is simply an Axiom ( -\texht{\verb+--+}{\-\-}) -comment, and one which produces an assignment to the current value -of {\tt f}. We could use it as follows: +The passive parts lie between the two tokens {\tt beginVerbatim} and +\texht{\linebreak}{} {\tt endVerbatim}. There are two active +statements: one which is simply an Axiom ( \texht{\verb+--+}{\-\-}) +comment, and one which produces an assignment to the current value of +{\tt f}. We could use it as follows: \begin{verbatim} (4) ->f := 4.0/(1+X**2) @@ -51262,28 +46187,29 @@ Which alternative is used is determined by the command \spadpaste{)set fortran precision} } -It is sometimes useful to end a template before the file itself ends (e.g. to -allow the template to be tested incrementally or so that a piece of text -describing how the template works can be included). It is of course possible -to ``comment-out'' the remainder of the file. Alternatively, the single token -{\tt endInput} as part of an active portion of the template will cause -processing to be ended prematurely at that point. - -The \axiomFun{processTemplate} command comes in two flavours. In the first case, -illustrated above, it takes one argument of domain \axiomType{FileName}, -the name of the template to be processed, and writes its output on the -current Fortran output stream. In general, a filename can be generated -from {\em directory}, {\em name} and {\em extension} components, using -the operation \axiomFun{filename}, as in +It is sometimes useful to end a template before the file itself ends +(e.g. to allow the template to be tested incrementally or so that a +piece of text describing how the template works can be included). It +is of course possible to ``comment-out'' the remainder of the file. +Alternatively, the single token {\tt endInput} as part of an active +portion of the template will cause processing to be ended prematurely +at that point. + +The \axiomFun{processTemplate} command comes in two flavours. In the +first case, illustrated above, it takes one argument of domain +\axiomType{FileName}, the name of the template to be processed, and +writes its output on the current Fortran output stream. In general, a +filename can be generated from {\em directory}, {\em name} and {\em +extension} components, using the operation \axiomFun{filename}, as in \begin{verbatim} processTemplate filename("","test","tem") \end{verbatim} There is an alternative version of \axiomFun{processTemplate}, which -takes two arguments (both of domain \axiomType{FileName}). In this case the -first argument is the name of the template to be processed, and the -second is the file in which to write the results. Both versions return -the location of the generated Fortran code as their result -({\tt "CONSOLE"} in the above example). +takes two arguments (both of domain \axiomType{FileName}). In this +case the first argument is the name of the template to be processed, +and the second is the file in which to write the results. Both +versions return the location of the generated Fortran code as their +result ({\tt "CONSOLE"} in the above example). It is sometimes useful to be able to mix active and passive parts of a line or statement. For example you might want to generate a Fortran @@ -51292,9 +46218,11 @@ provide three functions as follows: \texht { \begin{tabular}{p{1.8in}p{2.6in}} -\axiomFun{fortranLiteral} & writes a string on the Fortran output stream \\ +\axiomFun{fortranLiteral} & writes a string on the Fortran output +stream \\ & \\ -\axiomFun{fortranCarriageReturn} & writes a carriage return on the Fortran output stream \\ +\axiomFun{fortranCarriageReturn} & writes a carriage return on the +Fortran output stream \\ & \\ \axiomFun{fortranLiteralLine} & writes a string followed by a return on the Fortran output stream \\ @@ -51302,9 +46230,12 @@ on the Fortran output stream \\ } { \newline -\axiomFun{fortranLiteral}\tab{25}writes a string on the Fortran output stream\newline -\axiomFun{fortranCarriageReturn}\tab{25}writes a carriage return on the Fortran output stream\newline -\axiomFun{fortranLiteralLine}\tab{25}writes a string followed by a return on the Fortran output stream\newline +\axiomFun{fortranLiteral}\tab{25}writes a string on the Fortran +output stream\newline +\axiomFun{fortranCarriageReturn}\tab{25}writes a carriage return +on the Fortran output stream\newline +\axiomFun{fortranLiteralLine}\tab{25}writes a string followed by +a return on the Fortran output stream\newline } \xtc{ So we could create our comment as follows: @@ -51313,7 +46244,9 @@ So we could create our comment as follows: } \xtc{ }{ -\spadpaste{fortranLiteralLine concat ["C\ \ \ \ \ \ The\ Matrix\ has\ ", nrows(m)::String, "\ rows\ and\ ", ncols(m)::String, "\ columns"]\free{m}} +\spadpaste{fortranLiteralLine concat +["C\ \ \ \ \ \ The\ Matrix\ has\ ", nrows(m)::String, "\ rows\ +and\ ", ncols(m)::String, "\ columns"]\free{m}} } \xtc{ or, alternatively: @@ -51341,26 +46274,27 @@ or, alternatively: \spadpaste{fortranCarriageReturn()} } -We should stress that these functions, together with the \axiomFun{outputAsFortran} -function are the {\em only} sure ways -of getting output to appear on the Fortran output stream. Attempts to use -Axiom commands such as \axiomFun{output} or \axiomFunX{writeline} may appear to give -the required result when displayed on the console, but will give the wrong -result when Fortran and algebraic output are sent to differing locations. On -the other hand, these functions can be used to send helpful messages to the -user, without interfering with the generated Fortran. +We should stress that these functions, together with the +\axiomFun{outputAsFortran} function are the {\em only} sure ways of +getting output to appear on the Fortran output stream. Attempts to +use Axiom commands such as \axiomFun{output} or \axiomFunX{writeline} +may appear to give the required result when displayed on the console, +but will give the wrong result when Fortran and algebraic output are +sent to differing locations. On the other hand, these functions can +be used to send helpful messages to the user, without interfering with +the generated Fortran. \subsubsection{Manipulating the Fortran Output Stream} \texht{\exptypeindex{FortranOutputStackPackage}}{} -Sometimes it is useful to manipulate the Fortran output stream in a program, -possibly without being aware of its current value. The main use of this is -for gathering type declarations (see ``Fortran Types'' below) but it can be useful -in other contexts as well. Thus we provide a set of commands to manipulate -a stack of (open) output streams. Only one stream can be written to at -any given time. The stack is never empty---its initial value is the -console or the current value of the Fortran output stream, and can be -determined using +Sometimes it is useful to manipulate the Fortran output stream in a +program, possibly without being aware of its current value. The main +use of this is for gathering type declarations (see ``Fortran Types'' +below) but it can be useful in other contexts as well. Thus we +provide a set of commands to manipulate a stack of (open) output +streams. Only one stream can be written to at any given time. The +stack is never empty---its initial value is the console or the current +value of the Fortran output stream, and can be determined using \xtc{ }{ \spadpaste{topFortranOutputStack()} @@ -51371,7 +46305,8 @@ The commands available to manipulate the stack are: \begin{tabular}{ll} \axiomFun{clearFortranOutputStack} & resets the stack to the console \\ & \\ -\axiomFun{pushFortranOutputStack} & pushes a \axiomType{FileName} onto the stack \\ +\axiomFun{pushFortranOutputStack} & pushes a +\axiomType{FileName} onto the stack \\ & \\ \axiomFun{popFortranOutputStack} & pops the stack \\ & \\ @@ -51383,46 +46318,49 @@ The commands available to manipulate the stack are: { \newline \axiomFun{clearFortranOutputStack}\tab{25}resets the stack\newline -\axiomFun{pushFortranOutputStack}\tab{25}pushes a \axiomType{FileName} onto the stack\newline +\axiomFun{pushFortranOutputStack}\tab{25}pushes a +\axiomType{FileName} onto the stack\newline \axiomFun{popFortranOutputStack}\tab{25}pops the stack\newline \axiomFun{showFortranOutputStack}\tab{25}returns the current stack\newline -\axiomFun{topFortranOutputStack}\tab{25}returns the top element of the stack\newline +\axiomFun{topFortranOutputStack}\tab{25}returns the +top element of the stack\newline } These commands are all part of \axiomType{FortranOutputStackPackage}. \subsubsection{Fortran Types} -When generating code it is important to keep track of the Fortran types of -the objects which we are generating. This is useful for a number of reasons, -not least to ensure that we are actually generating legal Fortran code. The -current type system is built up in several layers, and we shall describe each -in turn. +When generating code it is important to keep track of the Fortran +types of the objects which we are generating. This is useful for a +number of reasons, not least to ensure that we are actually generating +legal Fortran code. The current type system is built up in several +layers, and we shall describe each in turn. \subsubsection{FortranScalarType} \texht{\exptypeindex{FortranScalarType}}{} -This domain represents the simple Fortran datatypes: REAL, DOUBLE PRECISION, -COMPLEX, LOGICAL, INTEGER, and CHARACTER. -It is possible to \axiomFun{coerce} a \axiomType{String} or \axiomType{Symbol} -into the domain, test whether two objects are equal, and also apply -the predicate functions \axiomFunFrom{real?}{FortranScalarType} etc. +This domain represents the simple Fortran datatypes: REAL, +DOUBLE PRECISION, COMPLEX, LOGICAL, INTEGER, and CHARACTER. +It is possible to \axiomFun{coerce} a \axiomType{String} or +\axiomType{Symbol} into the domain, test whether two objects are +equal, and also apply the predicate functions +\axiomFunFrom{real?}{FortranScalarType} etc. \subsubsection{FortranType} \texht{\exptypeindex{FortranType}}{} -This domain represents ``full'' types: i.e., datatype plus array dimensions -(where appropriate) plus whether or not the parameter is an external -subprogram. It is possible to \axiomFun{coerce} an object of -\axiomType{FortranScalarType} into the domain or \axiomFun{construct} one -from an element of \axiomType{FortranScalarType}, a list of -\axiomType{Polynomial Integer}s (which can of course be simple integers or -symbols) representing its dimensions, and -a \axiomType{Boolean} declaring whether it is external or not. The list +This domain represents ``full'' types: i.e., datatype plus array +dimensions (where appropriate) plus whether or not the parameter is an +external subprogram. It is possible to \axiomFun{coerce} an object of +\axiomType{FortranScalarType} into the domain or \axiomFun{construct} +one from an element of \axiomType{FortranScalarType}, a list of +\axiomType{Polynomial Integer}s (which can of course be simple +integers or symbols) representing its dimensions, and a +\axiomType{Boolean} declaring whether it is external or not. The list of dimensions must be empty if the \axiomType{Boolean} is {\tt true}. The functions \axiomFun{scalarTypeOf}, \axiomFun{dimensionsOf} and -\axiomFun{external?} return the appropriate -parts, and it is possible to get the various basic Fortran Types via -functions like \axiomFun{fortranReal}. +\axiomFun{external?} return the appropriate parts, and it is possible +to get the various basic Fortran Types via functions like +\axiomFun{fortranReal}. \xtc{ For example: }{ @@ -51457,9 +46395,9 @@ or \subsubsection{SymbolTable} \texht{\exptypeindex{SymbolTable}}{} -This domain creates and manipulates a symbol table for generated Fortran code. -This is used by \axiomType{FortranProgram} to represent the types of objects in -a subprogram. The commands available are: +This domain creates and manipulates a symbol table for generated +Fortran code. This is used by \axiomType{FortranProgram} to represent +the types of objects in a subprogram. The commands available are: \texht{ \begin{tabular}{ll} \axiomFun{empty} & creates a new \axiomType{SymbolTable} \\ @@ -51472,7 +46410,8 @@ a subprogram. The commands available are: & \\ \axiomFun{typeList} & returns a list of all objects of a given type \\ & \\ -\axiomFun{typeLists} & returns a list of lists of all objects sorted by type \\ +\axiomFun{typeLists} & +returns a list of lists of all objects sorted by type \\ & \\ \axiomFun{externalList} & returns a list of all {\tt EXTERNAL} objects \\ & \\ @@ -51483,12 +46422,18 @@ a subprogram. The commands available are: \newline \axiomFun{empty}\tab{25}creates a new \axiomType{SymbolTable}\newline \axiomFunX{declare}\tab{25}creates a new entry in a table \newline -\axiomFun{fortranTypeOf}\tab{25}returns the type of an object in a table \newline -\axiomFun{parametersOf}\tab{25}returns a list of all the symbols in the table \newline -\axiomFun{typeList}\tab{25}returns a list of all objects of a given type \newline -\axiomFun{typeLists}\tab{25}returns a list of lists of all objects sorted by type \newline -\axiomFun{externalList}\tab{25}returns a list of all {\tt EXTERNAL} objects \newline -\axiomFun{printTypes}\tab{25}produces Fortran type declarations from a table\newline +\axiomFun{fortranTypeOf} +\tab{25}returns the type of an object in a table \newline +\axiomFun{parametersOf} +\tab{25}returns a list of all the symbols in the table \newline +\axiomFun{typeList} +\tab{25}returns a list of all objects of a given type \newline +\axiomFun{typeLists} +\tab{25}returns a list of lists of all objects sorted by type \newline +\axiomFun{externalList} +\tab{25}returns a list of all {\tt EXTERNAL} objects \newline +\axiomFun{printTypes} +\tab{25}produces Fortran type declarations from a table\newline } \xtc{ }{ @@ -51500,7 +46445,8 @@ a subprogram. The commands available are: } \xtc{ }{ -\spadpaste{declare!(M,construct(real,[i,j],false)$FortranType,symbols)\free{symbols}} +\spadpaste{declare!(M,construct(real,[i,j],false)$FortranType,symbols) +\free{symbols}} } \xtc{ }{ @@ -51526,12 +46472,10 @@ a subprogram. The commands available are: \subsubsection{TheSymbolTable} \texht{\exptypeindex{TheSymbolTable}}{} -This domain creates and manipulates one global symbol table to be used, for -example, during template processing. It is -also used when -linking to external Fortran routines. The -information stored for each subprogram (and the main program segment, where -relevant) is: +This domain creates and manipulates one global symbol table to be +used, for example, during template processing. It is also used when +linking to external Fortran routines. The information stored for each +subprogram (and the main program segment, where relevant) is: \indent{4} \beginitems \item[-] its name; @@ -51557,34 +46501,50 @@ the command: The following commands exist: \texht{ \begin{tabular}{p{1.6in}p{2.8in}} -\axiomFunX{returnType} & declares the return type of the current subprogram \\ +\axiomFunX{returnType} +& declares the return type of the current subprogram \\ & \\ -\axiomFun{returnTypeOf} & returns the return type of a subprogram \\ +\axiomFun{returnTypeOf} +& returns the return type of a subprogram \\ & \\ -\axiomFunX{argumentList} & declares the argument list of the current subprogram \\ +\axiomFunX{argumentList} +& declares the argument list of the current subprogram \\ & \\ -\axiomFun{argumentListOf} & returns the argument list of a subprogram \\ +\axiomFun{argumentListOf} +& returns the argument list of a subprogram \\ & \\ -\axiomFunX{declare} & provides type declarations for parameters of the current subprogram \\ +\axiomFunX{declare} +& provides type declarations for parameters of the current subprogram \\ & \\ -\axiomFun{symbolTableOf} & returns the symbol table of a subprogram \\ +\axiomFun{symbolTableOf} +& returns the symbol table of a subprogram \\ & \\ -\axiomFun{printHeader} & produces the Fortran header for the current subprogram \\ +\axiomFun{printHeader} +& produces the Fortran header for the current subprogram \\ \end{tabular} } { \newline -\axiomFunX{returnType}\tab{25}declares the return type of the current subprogram \newline -\axiomFun{returnTypeOf}\tab{25}returns the return type of a subprogram \newline -\axiomFunX{argumentList}\tab{25}declares the argument list of the current subprogram \newline -\axiomFun{argumentListOf}\tab{25}returns the argument list of a subprogram \newline -\axiomFunX{declare}\tab{25}provides type declarations for parameters of the current subprogram \newline -\axiomFun{symbolTableOf}\tab{25}returns the symbol table of a subprogram \newline -\axiomFun{printHeader}\tab{25}produce the Fortran header for the current subprogram \newline -} -In addition there are versions of these commands which are parameterised by -the name of a subprogram, and others parameterised by both the name of a -subprogram and by an instance of \axiomType{TheSymbolTable}. +\axiomFunX{returnType} +\tab{25}declares the return type of the current subprogram \newline +\axiomFun{returnTypeOf} +\tab{25}returns the return type of a subprogram \newline +\axiomFunX{argumentList} +\tab{25}declares the argument list of the current subprogram \newline +\axiomFun{argumentListOf} +\tab{25}returns the argument list of a subprogram \newline +\axiomFunX{declare} +\tab{25}provides type declarations for parameters of the +current subprogram \newline +\axiomFun{symbolTableOf}\tab{25}returns the symbol table +of a subprogram \newline +\axiomFun{printHeader}\tab{25}produce the Fortran header +for the current subprogram \newline +} +In addition there are versions of these commands which are +parameterised by the name of a subprogram, and others parameterised by +both the name of a subprogram and by an instance of +\axiomType{TheSymbolTable}. \xtc{ }{ \spadpaste{newSubProgram F \bound{forPleasure}} @@ -51619,7 +46579,8 @@ these can be represented directly in Axiom, it is a little cumbersome, since Axiom evaluates the last statement, for example, to \axiom{true} (since \axiom{x} is lexicographically less than \axiom{y}). -Instead we have a set of operations, such as \axiomFun{LT} to represent \axiom{<}, +Instead we have a set of operations, +such as \axiomFun{LT} to represent \axiom{<}, to let us build such statements. The available constructors are: \texht{ \centerline{{\begin{tabular}{ll}}} @@ -51659,7 +46620,9 @@ and return statements. For example we can create quite a complicated conditional statement using assignments, and then turn it into Fortran code: }{ -\spadpaste{c := cond(LT(X,Y),assign(F,X),cond(GT(Y,Z),assign(F,Y),assign(F,Z)))\bound{c}} +\spadpaste{ +c := cond(LT(X,Y),assign(F,X),cond(GT(Y,Z),assign(F,Y),assign(F,Z))) +\bound{c}} } \xtc{ }{ @@ -51673,13 +46636,12 @@ on the current Fortran output stream. \texht{\exptypeindex{FortranProgram}}{} This domain is used to construct complete Fortran subprograms out of -elements of \axiomType{FortranCode}. It is parameterised by the name of the -target subprogram (a \axiomType{Symbol}), its return type (from -\axiomType{Union}(\axiomType{FortranScalarType},``void'')), -its arguments (from \axiomType{List Symbol}), and -its symbol table (from \axiomType{SymbolTable}). One can -\axiomFun{coerce} elements of either \axiomType{FortranCode} -or \axiomType{Expression} into it. +elements of \axiomType{FortranCode}. It is parameterised by the name +of the target subprogram (a \axiomType{Symbol}), its return type (from +\axiomType{Union}(\axiomType{FortranScalarType},``void'')), its +arguments (from \axiomType{List Symbol}), and its symbol table (from +\axiomType{SymbolTable}). One can \axiomFun{coerce} elements of +either \axiomType{FortranCode} or \axiomType{Expression} into it. \xtc{ First of all we create a symbol table: @@ -51695,7 +46657,8 @@ Now put some type declarations into it: Then (for convenience) we set up the particular instantiation of \axiomType{FortranProgram} }{ -\spadpaste{FP := FortranProgram(F,real,[X,Y],symbols)\free{symbols}\bound{FP}} +\spadpaste{FP := FortranProgram(F,real,[X,Y],symbols)\free{symbols} +\bound{FP}} } \xtc{ Create an object of type \axiomType{Expression(Integer)}: @@ -51708,8 +46671,8 @@ Now \axiomFun{coerce} it into \axiomType{FP}, and print its Fortran form: \spadpaste{outputAsFortran(asp::FP)\free{FP asp}} } -We can generate a \axiomType{FortranProgram} using \axiom{FortranCode}. For -example: +We can generate a \axiomType{FortranProgram} using \axiom{FortranCode}. +For example: \xtc{ Augment our symbol table: }{ @@ -51721,37 +46684,25 @@ and transform the conditional expression we prepared earlier: \spadpaste{outputAsFortran([c,returns()]::FP) \free{FP c Z}} } -%------------------------------------------------------------------------ \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\nagTechnicalTitle}{Some technical information} -\newcommand{\nagTechnicalNumber}{15.3.5.} - -@ -\section{Some technical information} -\label{nagTechnicalPage} -\index{pages!nagTechnicalPage!ug15.ht} -\index{ug15.ht!pages!nagTechnicalPage} -\index{nagTechnicalPage!ug15.ht!pages} +\pagehead{nagTechnicalPage}{ug15.ht}{Some technical information} <>= \begin{page}{nagTechnicalPage}{15.3.5. Some technical information} \beginscroll -%------------------------------------------------------------------------ -The model adopted for the link is a server-client configuration --- Axiom acting as a client via a local agent -(a process called {\tt nagman}). The server side is implemented -by the {\tt nagd} daemon process which may run on a different host. -The {\tt nagman} local agent is started by default whenever you -start Axiom. The {\tt nagd} server must be started separately. -Instructions for installing and running the server are supplied -in the NAG documentation. -Use the \spadcmd{)set naglink host} system command -to point your local agent to a server in your network. +The model adopted for the link is a server-client configuration -- +Axiom acting as a client via a local agent (a process called {\tt +nagman}). The server side is implemented by the {\tt nagd} daemon +process which may run on a different host. The {\tt nagman} local +agent is started by default whenever you start Axiom. The {\tt nagd} +server must be started separately. Instructions for installing and +running the server are supplied in the NAG documentation. Use the +\spadcmd{)set naglink host} system command to point your local agent +to a server in your network. On the Axiom side, one sees a set of {\em packages} (ask \Browse{} for {\em Nag*}) for each chapter, each exporting @@ -51763,11 +46714,10 @@ The {\tt man} pages for the \naglib{} are accessible via the description of each operation in \Browse{} (among other places). In the implementation of each operation, the set of inputs is passed -to the local agent {\tt nagman}, which makes a -Remote Procedure Call (RPC) to the -remote {\tt nagd} daemon process. The local agent receives the RPC -results and forwards them to the Axiom workspace where they -are interpreted appropriately. +to the local agent {\tt nagman}, which makes a Remote Procedure Call +(RPC) to the remote {\tt nagd} daemon process. The local agent +receives the RPC results and forwards them to the Axiom workspace +where they are interpreted appropriately. How are Fortran subroutines turned into RPC calls? For each Fortran routine in the \naglib{}, a C main() routine is supplied. Its job is @@ -51789,32 +46739,19 @@ compiles them, and links them with the main() C program before executing the resulting program on the numeric part of the RPC stream. -%------------------------------------------------------------------------ \endscroll \autobuttons \end{page} @ +\pagehead{ugWhatsNewLanguagePage}{ug15.ht} +{Interactive Front-end and Language} +\pageto{notitle}{ugLangLoopsBreakPage} +\pageto{notitle}{ugLangBlocksPage} <>= -\newcommand{\ugWhatsNewLanguageTitle}{Interactive Front-end and Language} -\newcommand{\ugWhatsNewLanguageNumber}{15.4.} - -@ -\section{Interactive Front-end and Language} -\label{ugWhatsNewLanguagePage} -\begin{itemize} -\item ugLangLoopsBreakPage \ref{ugLangLoopsBreakPage} on -page~\pageref{ugLangLoopsBreakPage} -\item ugLangBlocksPage \ref{ugLangBlocksPage} on -page~\pageref{ugLangBlocksPage} -\end{itemize} -\index{pages!ugWhatsNewLanguagePage!ug15.ht} -\index{ug15.ht!pages!ugWhatsNewLanguagePage} -\index{ugWhatsNewLanguagePage!ug15.ht!pages} -<>= -\begin{page}{ugWhatsNewLanguagePage}{15.4. Interactive Front-end and Language} +\begin{page}{ugWhatsNewLanguagePage} +{15.4. Interactive Front-end and Language} \beginscroll -%------------------------------------------------------------------------ The \axiom{leave} keyword has been replaced by the \axiom{break} keyword for compatibility with the new Axiom extension language. See @@ -51834,7 +46771,7 @@ Curly braces are now used to enclose a block (see section \ugLangBlocksNumber\ignore{ugLangBlocks} for more information). For compatibility, a block can still be enclosed by parentheses as well. -``Free functions'' created by the \axiomxl{} compiler can now be +``Free functions'' created by the Aldor compiler can now be loaded and used within the Axiom interpreter. A {\it free function} is a library function that is implemented outside a domain or category constructor. @@ -51845,47 +46782,33 @@ represented as an expression to an appropriate polynomial type. Various messages have been added or rewritten for clarity. -%------------------------------------------------------------------------ \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugWhatsNewLibraryTitle}{Library} -\newcommand{\ugWhatsNewLibraryNumber}{15.5.} - -@ -\section{Library} -\label{ugWhatsNewLibraryPage} -\begin{itemize} -\item FullPartialFractionExpansionXmpPage -\ref{FullPartialFractionExpansionXmpPage} on -page~\pageref{FullPartialFractionExpansionXmpPage} -\end{itemize} -\index{pages!ugWhatsNewLibraryPage!ug15.ht} -\index{ug15.ht!pages!ugWhatsNewLibraryPage} -\index{ugWhatsNewLibraryPage!ug15.ht!pages} +\pagehead{ugWhatsNewLibraryPage}{ug15.ht}{Library} +\pageto{notitle}{FullPartialFracExpansionXmpPage} <>= \begin{page}{ugWhatsNewLibraryPage}{15.5. Library} \beginscroll -%------------------------------------------------------------------------ -The \axiomType{FullPartialFractionExpansion} +The \axiomType{FullPartialFracExpansion} domain has been added. This domain computes factor-free full partial fraction expansions. See section -\downlink{`FullPartialFractionExpansion'} -{FullPartialFractionExpansionXmpPage}\ignore{FullPartialFractionExpansion} +\downlink{`FullPartialFracExpansion'} +{FullPartialFracExpansionXmpPage} +\ignore{FullPartialFracExpansion} for examples. We have implemented the Bertrand/Cantor algorithm for integrals of hyperelliptic functions. This brings a major speedup for some classes of algebraic integrals. -We have implemented a new (direct) algorithm for integrating trigonometric -functions. This brings a speedup and an improvement in the answer -quality. +We have implemented a new (direct) algorithm for integrating +trigonometric functions. This brings a speedup and an improvement in +the answer quality. The {\sf SmallFloat} domain has been renamed \axiomType{DoubleFloat} and {\sf SmallInteger} has been renamed @@ -51900,7 +46823,8 @@ files you have. There are many new categories, domains and packages related to the NAG Library Link facility. See the file -\unixcommand{\env{AXIOM}/../../src/algebra/exposed.lsp}{xterm\ -e\ vi\ +"/naglink"\ \env{AXIOM}/../../src/algebra/exposed.lsp} +\unixcommand{\env{AXIOM}/../../src/algebra/exposed.lsp} +{xterm\ -e\ vi\ +"/naglink"\ \env{AXIOM}/../../src/algebra/exposed.lsp} for a list of constructors in the {\bf naglink} Axiom exposure group. @@ -51918,66 +46842,52 @@ equations. The efficiency of power series have been improved and left and right expansions of \spad{tan(f(x))} at \spad{x =} a pole of \spad{f(x)} can now be computed. -A number of power series bugs were fixed and the \axiomType{GeneralUnivariatePowerSeries} +A number of power series bugs were fixed and the +\axiomType{GeneralUnivariatePowerSeries} domain was added. The power series variable can appear in the coefficients and when this -happens, you cannot differentiate or integrate the series. Differentiation -and integration with respect to other variables is supported. +happens, you cannot differentiate or integrate the series. +Differentiation and integration with respect to other variables is +supported. A domain was added for representing asymptotic expansions of a function at an exponential singularity. -For limits, the main new feature is the exponential expansion domain used -to treat certain exponential singularities. Previously, such singularities -were treated in an {\it ad hoc} way and only a few cases were covered. Now -Axiom can do things like +For limits, the main new feature is the exponential expansion domain +used to treat certain exponential singularities. Previously, such +singularities were treated in an {\it ad hoc} way and only a few cases +were covered. Now Axiom can do things like \begin{verbatim} limit( (x+1)**(x+1)/x**x - x**x/(x-1)**(x-1), x = %plusInfinity) \end{verbatim} -in a systematic way. It only does one level of nesting, though. In other -words, we can handle \spad{exp(} some function with a pole \spad{)}, but not -\texht{\linebreak}{} \spad{exp(exp(} some function with a pole \spad{)).} +in a systematic way. It only does one level of nesting, though. In +other words, we can handle \spad{exp(} some function with a pole +\spad{)}, but not \texht{\linebreak}{} \spad{exp(exp(} some function +with a pole \spad{)).} The computation of integral bases has been improved through careful -use of Hermite row reduction. A P-adic algorithm -for function fields of algebraic curves in finite characteristic has also -been developed. +use of Hermite row reduction. A P-adic algorithm for function fields +of algebraic curves in finite characteristic has also been developed. -Miscellaneous: -There is improved conversion of definite and indefinite integrals to -\axiomType{InputForm}; -binomial coefficients are displayed in a new way; -some new simplifications of radicals have been implemented; -the operation \spadfun{complexForm} for converting to rectangular coordinates -has been added; -symmetric product operations have been added to \axiomType{LinearOrdinaryDifferentialOperator}. +Miscellaneous: There is improved conversion of definite and indefinite +integrals to \axiomType{InputForm}; binomial coefficients are +displayed in a new way; some new simplifications of radicals have been +implemented; the operation \spadfun{complexForm} for converting to +rectangular coordinates has been added; symmetric product operations +have been added to \axiomType{LinearOrdinaryDifferentialOperator}. -%------------------------------------------------------------------------ \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugWhatsNewHyperDocTitle}{\HyperName} -\newcommand{\ugWhatsNewHyperDocNumber}{15.6.} - -@ -\section{\HyperName} -\label{ugWhatsNewHyperDocPage} -\begin{itemize} -\item ugHyperKeysPage \ref{ugHyperKeysPage} on -page~\pageref{ugHyperKeysPage} -\end{itemize} -\index{pages!ugWhatsNewHyperDocPage!ug15.ht} -\index{ug15.ht!pages!ugWhatsNewHyperDocPage} -\index{ugWhatsNewHyperDocPage!ug15.ht!pages} +\pagehead{ugWhatsNewHyperDocPage}{ug15.ht}{\HyperName} +\pageto{notitle}{ugHyperKeysPage} <>= \begin{page}{ugWhatsNewHyperDocPage}{15.6. \HyperName} \beginscroll -%------------------------------------------------------------------------ The buttons on the titlebar and scrollbar have been replaced with ones which have a 3D effect. You can change the foreground and @@ -51988,7 +46898,7 @@ Axiom.hyperdoc.ControlBackground: White Axiom.hyperdoc.ControlForeground: Black \end{verbatim} -For various reasons, \HyperName{} sometimes displays a +For various reasons, Hyperdoc sometimes displays a secondary window. You can control the size and placement of this window by including and modifying the following line in your {\bf .Xdefaults} file. @@ -52012,36 +46922,19 @@ is that you can paste the type from an Axiom computation into the main Browser input box. -%------------------------------------------------------------------------ \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugWhatsNewDocumentationTitle}{Documentation} -\newcommand{\ugWhatsNewDocumentationNumber}{15.7.} - -@ -\section{Documentation} -\label{ugWhatsNewDocumentationPage} -\begin{itemize} -\item ugGraphTwoDbuildPage \ref{ugGraphTwoDbuildPage} on -page~\pageref{ugGraphTwoDbuildPage} -\item ugGraphTwoDappendPage \ref{ugGraphTwoDappendPage} on -page~\pageref{ugGraphTwoDappendPage} -\item ugIntroCallFunPage \ref{ugIntroCallFunPage} on -page~\pageref{ugIntroCallFunPage} -\item ugUserRulesPage \ref{ugUserRulesPage} on -page~\pageref{ugUserRulesPage} -\end{itemize} -\index{pages!ugWhatsNewDocumentationPage!ug15.ht} -\index{ug15.ht!pages!ugWhatsNewDocumentationPage} -\index{ugWhatsNewDocumentationPage!ug15.ht!pages} +\pagehead{ugWhatsNewDocumentationPage}{ug15.ht}{Documentation} +\pageto{notitle}{ugGraphTwoDbuildPage} +\pageto{notitle}{ugGraphTwoDappendPage} +\pageto{notitle}{ugIntroCallFunPage} +\pageto{notitle}{ugUserRulesPage} <>= \begin{page}{ugWhatsNewDocumentationPage}{15.7. Documentation} \beginscroll -%------------------------------------------------------------------------ \texht{ We describe here a few additions to the on-line version of the Axiom book which you can read with @@ -52062,7 +46955,7 @@ Section \ugGraphTwoDappendNumber\ignore{ugGraphTwoDappend} for details. Chapter 3 -and the on-line \HyperName{} help have been unified. +and the on-line Hyperdoc help have been unified. An explanation of operation names ending in ``?'' and ``!'' has been added to the first chapter. See the end of the section @@ -52077,7 +46970,7 @@ middle of the section Documentation for the \spadcmd{)compile}, \spadcmd{)library} and \spadcmd{)load} commands has been greatly changed. This reflects -the ability of the \spadcmd{)compile} to now invoke the \axiomxl{} +the ability of the \spadcmd{)compile} to now invoke the Aldor compiler, the impending deletion of the \spadcmd{)load} command and the new \spadcmd{)library} command. The \spadcmd{)library} command replaces \spadcmd{)load} and is @@ -52094,106 +46987,39 @@ compilers. \newcommand{\lanb}{{\tt [}} \newcommand{\ranb}{{\tt ]}} \newcommand{\vertline}{\texht{$|$}{{\tt |}}} -\newcommand{\ugSysCmdTitle}{Axiom System Commands} -\newcommand{\ugSysCmdNumber}{B.} - -@ -\section{Axiom System Commands} -\label{ugSysCmdPage} -\includegraphics[scale=.5]{ps/v71ugsyscmdpage.eps} -\index{images!ugsyscmdpage} - -Called from ``Reference'' (TopReferencePage) -\ref{TopReferencePage} on page~\pageref{TopReferencePage} -\begin{itemize} -\item ``Introduction'' -(ugSysCmdOverviewPage) \ref{ugSysCmdOverviewPage} on -page~\pageref{ugSysCmdOverviewPage} -\item ``)abbreviation'' -(ugSysCmdabbreviationPage) \ref{ugSysCmdabbreviationPage} on -page~\pageref{ugSysCmdabbreviationPage} -\item ``)boot'' -(ugSysCmdbootPage) \ref{ugSysCmdbootPage} on -page~\pageref{ugSysCmdbootPage} -\item ``)cd'' -(ugSysCmdcdPage) \ref{ugSysCmdcdPage} on -page~\pageref{ugSysCmdcdPage} -\item ``)close'' -(ugSysCmdclosePage) \ref{ugSysCmdclosePage} on -page~\pageref{ugSysCmdclosePage} -\item ``)clear'' -(ugSysCmdclearPage) \ref{ugSysCmdclearPage} on -page~\pageref{ugSysCmdclearPage} -\item ``)compile'' -(ugSysCmdcompilePage) \ref{ugSysCmdcompilePage} on -page~\pageref{ugSysCmdcompilePage} -\item ``)display'' -(ugSysCmddisplayPage) \ref{ugSysCmddisplayPage} on -page~\pageref{ugSysCmddisplayPage} -\item ``)edit'' -(ugSysCmdeditPage) \ref{ugSysCmdeditPage} on -page~\pageref{ugSysCmdeditPage} -\item ``)fin'' -(ugSysCmdfinPage) \ref{ugSysCmdfinPage} on -page~\pageref{ugSysCmdfinPage} -\item ``)frame'' -(ugSysCmdframePage) \ref{ugSysCmdframePage} on -page~\pageref{ugSysCmdframePage} -\item ``)help'' -(ugSysCmdhelpPage) \ref{ugSysCmdhelpPage} on -page~\pageref{ugSysCmdhelpPage} -\item ``)history'' -(ugSysCmdhistoryPage) \ref{ugSysCmdhistoryPage} on -page~\pageref{ugSysCmdhistoryPage} -\item ``)library'' -(ugSysCmdlibraryPage) \ref{ugSysCmdlibraryPage} on -page~\pageref{ugSysCmdlibraryPage} -\item ``)lisp'' -(ugSysCmdlispPage) \ref{ugSysCmdlispPage} on -page~\pageref{ugSysCmdlispPage} -\item ``)load'' -(ugSysCmdloadPage) \ref{ugSysCmdloadPage} on -page~\pageref{ugSysCmdloadPage} -\item ``)ltrace'' -(ugSysCmdltracePage) \ref{ugSysCmdltracePage} on -page~\pageref{ugSysCmdltracePage} -\item ``)pquit'' -(ugSysCmdpquitPage) \ref{ugSysCmdpquitPage} on -page~\pageref{ugSysCmdpquitPage} -\item ``)quit'' -(ugSysCmdquitPage) \ref{ugSysCmdquitPage} on -page~\pageref{ugSysCmdquitPage} -\item ``)read'' -(ugSysCmdreadPage) \ref{ugSysCmdreadPage} on -page~\pageref{ugSysCmdreadPage} -\item ``)set'' -(ugSysCmdsetPage) \ref{ugSysCmdsetPage} on -page~\pageref{ugSysCmdsetPage} -\item ``)show'' -(ugSysCmdshowPage) \ref{ugSysCmdshowPage} on -page~\pageref{ugSysCmdshowPage} -\item ``)spool'' -(ugSysCmdspoolPage) \ref{ugSysCmdspoolPage} on -page~\pageref{ugSysCmdspoolPage} -\item ``)synonym'' -(ugSysCmdsynonymPage) \ref{ugSysCmdsynonymPage} on -page~\pageref{ugSysCmdsynonymPage} -\item ``)system'' -(ugSysCmdsystemPage) \ref{ugSysCmdsystemPage} on -page~\pageref{ugSysCmdsystemPage} -\item ``)trace'' -(ugSysCmdtracePage) \ref{ugSysCmdtracePage} on -page~\pageref{ugSysCmdtracePage} -\item ``)undo'' -(ugSysCmdundoPage) \ref{ugSysCmdundoPage} on -page~\pageref{ugSysCmdundoPage} -\item ``)what'' -(ugSysCmdwhatPage) \ref{ugSysCmdwhatPage} on -page~\pageref{ugSysCmdwhatPage} -\end{itemize} -\index{pages!ugSysCmdPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdPage} -\index{ugSysCmdPage!ug16.ht!pages} + +@ +\pagehead{ugSysCmdPage}{ug16.ht}{Axiom System Commands} +\pagepic{ps/v71ugsyscmdpage.eps}{ugsyscmdpage} +\pagefrom{Reference}{TopReferencePage} +\pageto{Introduction}{ugSysCmdOverviewPage} +\pageto{)abbreviation}{ugSysCmdabbreviationPage} +\pageto{)boot}{ugSysCmdbootPage} +\pageto{)cd}{ugSysCmdcdPage} +\pageto{)close}{ugSysCmdclosePage} +\pageto{)clear}{ugSysCmdclearPage} +\pageto{)compile}{ugSysCmdcompilePage} +\pageto{)display}{ugSysCmddisplayPage} +\pageto{)edit}{ugSysCmdeditPage} +\pageto{)fin}{ugSysCmdfinPage} +\pageto{)frame}{ugSysCmdframePage} +\pageto{)help}{ugSysCmdhelpPage} +\pageto{)history}{ugSysCmdhistoryPage} +\pageto{)library}{ugSysCmdlibraryPage} +\pageto{)lisp}{ugSysCmdlispPage} +\pageto{)load}{ugSysCmdloadPage} +\pageto{)ltrace}{ugSysCmdltracePage} +\pageto{)pquit}{ugSysCmdpquitPage} +\pageto{)quit}{ugSysCmdquitPage} +\pageto{)read}{ugSysCmdreadPage} +\pageto{)set}{ugSysCmdsetPage} +\pageto{)show}{ugSysCmdshowPage} +\pageto{)spool}{ugSysCmdspoolPage} +\pageto{)synonym}{ugSysCmdsynonymPage} +\pageto{)system}{ugSysCmdsystemPage} +\pageto{)trace}{ugSysCmdtracePage} +\pageto{)undo}{ugSysCmdundoPage} +\pageto{)what}{ugSysCmdwhatPage} <>= \begin{page}{ugSysCmdPage}{B. Axiom System Commands} \beginscroll @@ -52207,7 +47033,8 @@ syntax of the commands available. \table{ { \downlink{\menuitemstyle{A.1. Introduction}}{ugSysCmdOverviewPage} } - { \downlink{\menuitemstyle{A.2. )abbreviation}}{ugSysCmdabbreviationPage} } + { \downlink{\menuitemstyle{A.2. )abbreviation}} +{ugSysCmdabbreviationPage} } { \downlink{\menuitemstyle{A.3. )boot}}{ugSysCmdbootPage} } { \downlink{\menuitemstyle{A.4. )cd}}{ugSysCmdcdPage} } { \downlink{\menuitemstyle{A.5. )close}}{ugSysCmdclosePage} } @@ -52240,22 +47067,9 @@ syntax of the commands available. \end{page} @ -<>= -\newcommand{\ugSysCmdOverviewTitle}{Introduction} -\newcommand{\ugSysCmdOverviewNumber}{B.1.} - -@ -\section{Introduction} -\label{ugSysCmdOverviewPage} -\begin{itemize} -\item ugSysCmdsetPage \ref{ugSysCmdsetPage} on -page~\pageref{ugSysCmdsetPage} -\item ugSysCmdcompilePage \ref{ugSysCmdcompilePage} on -page~\pageref{ugSysCmdcompilePage} -\end{itemize} -\index{pages!ugSysCmdOverviewPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdOverviewPage} -\index{ugSysCmdOverviewPage!ug16.ht!pages} +\pagehead{ugSysCmdOverviewPage}{ug16.ht}{Introduction} +\pageto{notitle}{ugSysCmdsetPage} +\pageto{notitle}{ugSysCmdcompilePage} <>= \begin{page}{ugSysCmdOverviewPage}{B.1. Introduction} \beginscroll @@ -52277,7 +47091,7 @@ are available at {\tt development} level and the fewest are available at {\tt interpreter} level. The default user-level is {\tt interpreter}. In addition to the \spadcmd{)set} command (discussed in \downlink{``\ugSysCmdsetTitle''}{ugSysCmdsetPage} in Section -\ugSysCmdsetNumber\ignore{ugSysCmdset}) you can use the \HyperName{} +\ugSysCmdsetNumber\ignore{ugSysCmdset}) you can use the Hyperdoc settings facility to change the {\it user-level.} \texht{}{Click on \lispmemolink{Settings}{(|htSystemVariables|)} here to immediately go to the settings facility.} @@ -52300,7 +47114,8 @@ directly preceded by a right parenthesis. Options may have arguments: they directly follow the option. This example may make it easier to remember what is an option and what is an argument: -\centerline{{{\tt )syscmd {\it arg1 arg2} )opt1 {\it opt1arg1 opt1arg2} )opt2 {\it opt2arg1} ...}}} +\centerline{{{\tt )syscmd {\it arg1 arg2} )opt1 +{\it opt1arg1 opt1arg2} )opt2 {\it opt2arg1} ...}}} In the system command descriptions, optional arguments and options are enclosed in brackets (``\lanb'' and ``\ranb''). If an argument or @@ -52337,16 +47152,12 @@ Typically, two or three letters are sufficient for disambiguating names. In our descriptions of the commands, we have used no abbreviations for either command names or options. -In some syntax descriptions we use a vertical line ``\vertline'' -to indicate that you must specify one of the listed choices. -For example, in -\begin{verbatim} -)set output fortran on | off -\end{verbatim} -only {\tt on} and {\tt off} are acceptable words for following -{\tt boot}. -We also sometimes use ``...'' to indicate that additional arguments -or options of the listed form are allowed. +In some syntax descriptions we use a vertical line ``\vertline'' to +indicate that you must specify one of the listed choices. For +example, in \begin{verbatim} )set output fortran on | off +\end{verbatim} only {\tt on} and {\tt off} are acceptable words for +following {\tt boot}. We also sometimes use ``...'' to indicate that +additional arguments or options of the listed form are allowed. Finally, in the syntax descriptions we may also list the syntax of related commands. @@ -52355,16 +47166,7 @@ related commands. \end{page} @ -<>= -\newcommand{\ugSysCmdabbreviationTitle}{)abbreviation} -\newcommand{\ugSysCmdabbreviationNumber}{B.2.} - -@ -\section{)abbreviation} -\label{ugSysCmdabbreviationPage} -\index{pages!ugSysCmdabbreviationPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdabbreviationPage} -\index{ugSysCmdabbreviationPage!ug16.ht!pages} +\pagehead{ugSysCmdabbreviationPage}{ug16.ht}{)abbreviation} <>= \begin{page}{ugSysCmdabbreviationPage}{B.2. )abbreviation} \beginscroll @@ -52375,9 +47177,12 @@ related commands. \par\noindent{\bf Command Syntax:} \begin{items} \item {\tt )abbreviation query \lanb{}{\it nameOrAbbrev}\ranb{}} -\item {\tt )abbreviation category {\it abbrev fullname} \lanb{})quiet\ranb{}} -\item {\tt )abbreviation domain {\it abbrev fullname} \lanb{})quiet\ranb{}} -\item {\tt )abbreviation package {\it abbrev fullname} \lanb{})quiet\ranb{}} +\item {\tt )abbreviation category {\it abbrev fullname} \lanb{} +)quiet\ranb{}} +\item {\tt )abbreviation domain {\it abbrev fullname} \lanb{} +)quiet\ranb{}} +\item {\tt )abbreviation package {\it abbrev fullname} \lanb{} +)quiet\ranb{}} \item {\tt )abbreviation remove {\it nameOrAbbrev}} \end{items} @@ -52457,26 +47262,11 @@ in section \ugSysCmdcompileNumber \end{page} @ -<>= -\newcommand{\ugSysCmdbootTitle}{)boot} -\newcommand{\ugSysCmdbootNumber}{B.3.} - -@ -\section{)boot} -\label{ugSysCmdbootPage} -\begin{itemize} -\item ugSysCmdfinPage \ref{ugSysCmdfinPage} on -page~\pageref{ugSysCmdfinPage} -\item ugSysCmdlispPage \ref{ugSysCmdlispPage} on -page~\pageref{ugSysCmdlispPage} -\item ugSysCmdsetPage \ref{ugSysCmdsetPage} on -page~\pageref{ugSysCmdsetPage} -\item ugSysCmdsystemPage \ref{ugSysCmdsystemPage} on -page~\pageref{ugSysCmdsystemPage} -\end{itemize} -\index{pages!ugSysCmdbootPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdbootPage} -\index{ugSysCmdbootPage!ug16.ht!pages} +\pagehead{ugSysCmdbootPage}{ug16.ht}{)boot} +\pageto{notitle}{ugSysCmdfinPage} +\pageto{notitle}{ugSysCmdlispPage} +\pageto{notitle}{ugSysCmdsetPage} +\pageto{notitle}{ugSysCmdsystemPage} <>= \begin{page}{ugSysCmdbootPage}{B.3. )boot} \beginscroll @@ -52515,30 +47305,13 @@ section \ugSysCmdsystemNumber \end{page} @ -<>= -\newcommand{\ugSysCmdcdTitle}{)cd} -\newcommand{\ugSysCmdcdNumber}{B.4.} - -@ -\section{)cd} -\label{ugSysCmdcdPage} -\begin{itemize} -\item ugSysCmdcompilePage \ref{ugSysCmdcompilePage} on -page~\pageref{ugSysCmdcompilePage} -\item ugSysCmdeditPage \ref{ugSysCmdeditPage} on -page~\pageref{ugSysCmdeditPage} -\item ugSysCmdhistoryPage \ref{ugSysCmdhistoryPage} on -page~\pageref{ugSysCmdhistoryPage} -\item ugSysCmdlibraryPage \ref{ugSysCmdlibraryPage} on -page~\pageref{ugSysCmdlibraryPage} -\item ugSysCmdreadPage \ref{ugSysCmdreadPage} on -page~\pageref{ugSysCmdreadPage} -\item ugSysCmdspoolPage \ref{ugSysCmdspoolPage} on -page~\pageref{ugSysCmdspoolPage} -\end{itemize} -\index{pages!ugSysCmdcdPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdcdPage} -\index{ugSysCmdcdPage!ug16.ht!pages} +\pagehead{ugSysCmdcdPage}{ug16.ht}{)cd} +\pageto{notitle}{ugSysCmdcompilePage} +\pageto{notitle}{ugSysCmdeditPage} +\pageto{notitle}{ugSysCmdhistoryPage} +\pageto{notitle}{ugSysCmdlibraryPage} +\pageto{notitle}{ugSysCmdreadPage} +\pageto{notitle}{ugSysCmdspoolPage} <>= \begin{page}{ugSysCmdcdPage}{B.4. )cd} \beginscroll @@ -52591,20 +47364,8 @@ section \ugSysCmdspoolNumber \end{page} @ -<>= -\newcommand{\ugSysCmdcloseTitle}{)close} -\newcommand{\ugSysCmdcloseNumber}{B.5.} - -@ -\section{)close} -\label{ugSysCmdclosePage} -\begin{itemize} -\item ugSysCmdquitPage \ref{ugSysCmdquitPage} on -page~\pageref{ugSysCmdquitPage} -\end{itemize} -\index{pages!ugSysCmdclosePage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdclosePage} -\index{ugSysCmdclosePage!ug16.ht!pages} +\pagehead{ugSysCmdclosePage}{ug16.ht}{)close} +\pageto{notitle}{ugSysCmdquitPage} <>= \begin{page}{ugSysCmdclosePage}{B.5. )close} \beginscroll @@ -52619,9 +47380,9 @@ page~\pageref{ugSysCmdquitPage} \end{items} \par\noindent{\bf Command Description:} -This command is used to close down interpreter client processes. -Such processes are started by \HyperName{} to run Axiom examples -when you click on their text. When you have finished examining or modifying the +This command is used to close down interpreter client processes. Such +processes are started by Hyperdoc to run Axiom examples when you click +on their text. When you have finished examining or modifying the example and you do not want the extra window around anymore, issue \begin{verbatim} )close @@ -52653,24 +47414,10 @@ section \ugSysCmdpquitNumber \end{page} @ -<>= -\newcommand{\ugSysCmdclearTitle}{)clear} -\newcommand{\ugSysCmdclearNumber}{B.6.} - -@ -\section{)clear} -\label{ugSysCmdclearPage} -\begin{itemize} -\item ugSysCmddisplayPage \ref{ugSysCmddisplayPage} on -page~\pageref{ugSysCmddisplayPage} -\item ugSysCmdhistoryPage \ref{ugSysCmdhistoryPage} on -page~\pageref{ugSysCmdhistoryPage} -\item ugSysCmdundoPage \ref{ugSysCmdundoPage} on -page~\pageref{ugSysCmdundoPage} -\end{itemize} -\index{pages!ugSysCmdclearPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdclearPage} -\index{ugSysCmdclearPage!ug16.ht!pages} +\pagehead{ugSysCmdclearPage}{ug16.ht}{)clear} +\pageto{notitle}{ugSysCmddisplayPage} +\pageto{notitle}{ugSysCmdhistoryPage} +\pageto{notitle}{ugSysCmdundoPage} <>= \begin{page}{ugSysCmdclearPage}{B.6. )clear} \beginscroll @@ -52691,14 +47438,14 @@ page~\pageref{ugSysCmdundoPage} \end{items} \par\noindent{\bf Command Description:} -This command is used to remove function and variable declarations, definitions -and values from the workspace. -To empty the entire workspace and reset the -step counter to 1, issue +This command is used to remove function and variable declarations, +definitions and values from the workspace. To empty the entire +workspace and reset the step counter to 1, issue \begin{verbatim} )clear all \end{verbatim} -To remove everything in the workspace but not reset the step counter, issue +To remove everything in the workspace but not reset the step counter, +issue \begin{verbatim} )clear properties all \end{verbatim} @@ -52718,29 +47465,34 @@ The word {\tt properties} may be abbreviated to the single letter )clear p x )clear p x y f \end{verbatim} -All definitions of functions and values of variables may be removed by either +All definitions of functions and values of variables may be removed +by either \begin{verbatim} )clear value all )clear v all \end{verbatim} -This retains whatever declarations the objects had. To remove definitions and +This retains whatever declarations the objects had. To remove +definitions and values for the specific objects {\tt x, y} and {\tt f}, issue \begin{verbatim} )clear value x y f )clear v x y f \end{verbatim} -To remove the declarations of everything while leaving the definitions and +To remove the declarations of everything while leaving the +definitions and values, issue \begin{verbatim} )clear mode all )clear m all \end{verbatim} -To remove declarations for the specific objects {\tt x, y} and {\tt f}, issue +To remove declarations for the specific objects {\tt x, y} and +{\tt f}, issue \begin{verbatim} )clear mode x y f )clear m x y f \end{verbatim} -The {\tt )display names} and {\tt )display properties} commands may be used +The {\tt )display names} and {\tt )display properties} commands +may be used to see what is currently in the workspace. The command @@ -52763,28 +47515,12 @@ in section \ugSysCmdundoNumber \end{page} @ -<>= -\newcommand{\ugSysCmdcompileTitle}{)compile} -\newcommand{\ugSysCmdcompileNumber}{B.7.} - -@ -\section{)compile} -\label{ugSysCmdcompilePage} -\begin{itemize} -\item ugSysCmdcdPage \ref{ugSysCmdcdPage} on -page~\pageref{ugSysCmdcdPage} -\item ugSysCmdtracePage \ref{ugSysCmdtracePage} on -page~\pageref{ugSysCmdtracePage} -\item ugSysCmdabbreviationPage \ref{ugSysCmdabbreviationPage} on -page~\pageref{ugSysCmdabbreviationPage} -\item ugSysCmdeditPage \ref{ugSysCmdeditPage} on -page~\pageref{ugSysCmdeditPage} -\item ugSysCmdlibraryPage \ref{ugSysCmdlibraryPage} on -page~\pageref{ugSysCmdlibraryPage} -\end{itemize} -\index{pages!ugSysCmdcompilePage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdcompilePage} -\index{ugSysCmdcompilePage!ug16.ht!pages} +\pagehead{ugSysCmdcompilePage}{ug16.ht}{)compile} +\pageto{notitle}{ugSysCmdcdPage} +\pageto{notitle}{ugSysCmdtracePage} +\pageto{notitle}{ugSysCmdabbreviationPage} +\pageto{notitle}{ugSysCmdeditPage} +\pageto{notitle}{ugSysCmdlibraryPage} <>= \begin{page}{ugSysCmdcompilePage}{B.7. )compile} \beginscroll @@ -52827,21 +47563,21 @@ page~\pageref{ugSysCmdlibraryPage} You use this command to invoke the new Axiom library compiler or the old Axiom system compiler. The {\tt )compile} system command is actually a combination of -Axiom processing and a call to the \axiomxl{} compiler. +Axiom processing and a call to the Aldor compiler. It is performing double-duty, acting as a front-end to -both the \axiomxl{} compiler and the old Axiom system +both the Aldor compiler and the old Axiom system compiler. (The old Axiom system compiler was written in Lisp and was an integral part of the Axiom environment. -The \axiomxl{} compiler is written in C and executed by the operating system +The Aldor compiler is written in C and executed by the operating system when called from within Axiom.) The command compiles files with file extensions {\it .as, .ao} and {\it .al} with the -\axiomxl{} compiler and files with file extension {\it .spad} with the +Aldor compiler and files with file extension {\it .spad} with the old Axiom system compiler. It also can compile files with file extension {\it .lsp}. These -are assumed to be Lisp files genererated by the \axiomxl{} +are assumed to be Lisp files genererated by the Aldor compiler. If you omit the file extension, the command looks to see if you have specified the {\tt )new} or {\tt )old} option. @@ -52867,10 +47603,10 @@ file extension can safely be omitted. If {\tt )translate} is given, all other options are ignored. Please be aware that the translation is not necessarily one hundred percent complete or correct. -You should attempt to compile the output with the \axiomxl{} compiler +You should attempt to compile the output with the Aldor compiler and make any necessary corrections. -We now describe the options for the new \axiomxl{} compiler. +We now describe the options for the new Aldor compiler. The first thing {\tt )compile} does is look for a source code filename among its arguments. @@ -52891,8 +47627,8 @@ This is frequently all you need to compile your file. This simple command: \indent{4} \beginitems -\item[1. ] Invokes the \axiomxl{} compiler and produces Lisp output. -\item[2. ] Calls the Lisp compiler if the \axiomxl{} compilation was +\item[1. ] Invokes the Aldor compiler and produces Lisp output. +\item[2. ] Calls the Lisp compiler if the Aldor compilation was successful. \item[3. ] Uses the {\tt )library} command to tell Axiom about the contents of your compiled file and arrange to have those @@ -52907,8 +47643,8 @@ For example, )compile mycode.as )nolibrary \end{verbatim} -The general description of \axiomxl{} command line arguments is in -the \axiomxl{} documentation. +The general description of Aldor command line arguments is in +the Aldor documentation. The default options used by the {\tt )compile} command can be viewed and set using the {\tt )set compiler args} Axiom system command. @@ -52927,8 +47663,8 @@ file, \item[-] {\tt -laxiom}: use the {\tt axiom} library {\tt libaxiom.al}, \item[-] {\tt -Mno-AXL\_W\_WillObsolete}: do not display messages about older generated files becoming obsolete, and -\item[-] {\tt -DAxiom}: define the global assertion {\tt Axiom} so that the -\axiomxl{} libraries for generating stand-alone code +\item[-] {\tt -DAxiom}: define the global assertion {\tt Axiom} +so that the Aldor libraries for generating stand-alone code are not accidentally used with Axiom. \enditems \indent{0} @@ -53004,7 +47740,7 @@ The {\tt )compile} command works with several file extensions. We saw above what happens when it is invoked on a file with extension {\tt .as.} A {\tt .ao} file is a portable binary compiled version of a {\tt .as} file, and {\tt )compile} simply passes the {\tt .ao} file -onto \axiomxl{}. The generated Lisp file is compiled and {\tt )library} +onto Aldor. The generated Lisp file is compiled and {\tt )library} is automatically called, just as if you had specified a {\tt .as} file. A {\tt .al} file is an archive file containing {\tt .ao} files. The @@ -53021,7 +47757,7 @@ is your responsibility to remove the directory and its contents, if you choose to do so. A {\tt .lsp} file is a Lisp source file, presumably, in our context, -generated by \axiomxl{} when called with the {\tt -Flsp} option. When +generated by Aldor when called with the {\tt -Flsp} option. When {\tt )compile} is used with a {\tt .lsp} file, the Lisp file is compiled and {\tt )library} is called. You must also have present a {\tt .asy} generated from the same source file. @@ -53063,7 +47799,7 @@ directory containing the compiled code for the \axiomType{MATRIX} constructor is called {\bf MATRIX.nrlib.} The {\tt )nolibrary} option says that such files should not be created. The default is {\tt )library.} Note that the semantics of {\tt )library} and {\tt -)nolibrary} for the new \axiomxl{} compiler and for the old system +)nolibrary} for the new Aldor compiler and for the old system compiler are completely different. The {\tt )vartrace} option causes the compiler to generate extra code @@ -53108,28 +47844,12 @@ in section \ugSysCmdlibraryNumber \end{page} @ -<>= -\newcommand{\ugSysCmddisplayTitle}{)display} -\newcommand{\ugSysCmddisplayNumber}{B.8.} - -@ -\section{)display} -\label{ugSysCmddisplayPage} -\begin{itemize} -\item ugSysCmdclearPage \ref{ugSysCmdclearPage} on -page~\pageref{ugSysCmdclearPage} -\item ugSysCmdhistoryPage \ref{ugSysCmdhistoryPage} on -page~\pageref{ugSysCmdhistoryPage} -\item ugSysCmdsetPage \ref{ugSysCmdsetPage} on -page~\pageref{ugSysCmdsetPage} -\item ugSysCmdshowPage \ref{ugSysCmdshowPage} on -page~\pageref{ugSysCmdshowPage} -\item ugSysCmdwhatPage \ref{ugSysCmdwhatPage} on -page~\pageref{ugSysCmdwhatPage} -\end{itemize} -\index{pages!ugSysCmddisplayPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmddisplayPage} -\index{ugSysCmddisplayPage!ug16.ht!pages} +\pagehead{ugSysCmddisplayPage}{ug16.ht}{)display} +\pageto{notitle}{ugSysCmdclearPage} +\pageto{notitle}{ugSysCmdhistoryPage} +\pageto{notitle}{ugSysCmdsetPage} +\pageto{notitle}{ugSysCmdshowPage} +\pageto{notitle}{ugSysCmdwhatPage} <>= \begin{page}{ugSysCmddisplayPage}{B.8. )display} \beginscroll @@ -53142,7 +47862,8 @@ page~\pageref{ugSysCmdwhatPage} \item {\tt )display all} \item {\tt )display properties} \item {\tt )display properties all} -\item {\tt )display properties} {\it \lanb{}obj1 \lanb{}obj2 ...\ranb{}\ranb{}} +\item {\tt )display properties} {\it \lanb{}obj1 \lanb{}obj2 ... +\ranb{}\ranb{}} \item {\tt )display value all} \item {\tt )display value} {\it \lanb{}obj1 \lanb{}obj2 ...\ranb{}\ranb{}} \item {\tt )display mode all} @@ -53161,9 +47882,9 @@ The command \begin{verbatim} )display names \end{verbatim} -lists the names of all user-defined objects in the workspace. This is useful -if you do not wish to see everything about the objects and need only be -reminded of their names. +lists the names of all user-defined objects in the workspace. This is +useful if you do not wish to see everything about the objects and need +only be reminded of their names. The commands \begin{verbatim} @@ -53171,9 +47892,9 @@ The commands )display properties )display properties all \end{verbatim} -all do the same thing: show the values and types and declared modes of all -variables in the workspace. If you have defined functions, their signatures -and definitions will also be displayed. +all do the same thing: show the values and types and declared modes of +all variables in the workspace. If you have defined functions, their +signatures and definitions will also be displayed. To show all information about a particular variable or user functions, for example, something named {\tt d}, issue @@ -53189,13 +47910,12 @@ To just show the declared mode of {\tt d}, issue )display mode d \end{verbatim} -All modemaps for a given operation may be -displayed by using {\tt )display operations}. -A \spadgloss{modemap} is a collection of information about a particular -reference -to an operation. This includes the types of the arguments and the return -value, the location of the implementation and any conditions on the types. -The modemap may contain patterns. The following displays the modemaps for the +All modemaps for a given operation may be displayed by using {\tt +)display operations}. A \spadgloss{modemap} is a collection of +information about a particular reference to an operation. This +includes the types of the arguments and the return value, the location +of the implementation and any conditions on the types. The modemap +may contain patterns. The following displays the modemaps for the operation \spadfunFrom{complex}{ComplexCategory}: \begin{verbatim} )d op complex @@ -53218,24 +47938,10 @@ in section \ugSysCmdwhatNumber \end{page} @ -<>= -\newcommand{\ugSysCmdeditTitle}{)edit} -\newcommand{\ugSysCmdeditNumber}{B.9.} - -@ -\section{)edit} -\label{ugSysCmdeditPage} -\begin{itemize} -\item ugSysCmdsystemPage \ref{ugSysCmdsystemPage} on -page~\pageref{ugSysCmdsystemPage} -\item ugSysCmdcompilePage \ref{ugSysCmdcompilePage} on -page~\pageref{ugSysCmdcompilePage} -\item ugSysCmdreadPage \ref{ugSysCmdreadPage} on -page~\pageref{ugSysCmdreadPage} -\end{itemize} -\index{pages!ugSysCmdeditPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdeditPage} -\index{ugSysCmdeditPage!ug16.ht!pages} +\pagehead{ugSysCmdeditPage}{ug16.ht}{)edit} +\pageto{notitle}{ugSysCmdsystemPage} +\pageto{notitle}{ugSysCmdcompilePage} +\pageto{notitle}{ugSysCmdreadPage} <>= \begin{page}{ugSysCmdeditPage}{B.9. )edit} \beginscroll @@ -53298,20 +48004,8 @@ in section \ugSysCmdreadNumber \end{page} @ -<>= -\newcommand{\ugSysCmdfinTitle}{)fin} -\newcommand{\ugSysCmdfinNumber}{B.10.} - -@ -\section{)fin} -\label{ugSysCmdfinPage} -\begin{itemize} -\item ugSysCmdpquitPage \ref{ugSysCmdpquitPage} on -page~\pageref{ugSysCmdpquitPage} -\end{itemize} -\index{pages!ugSysCmdfinPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdfinPage} -\index{ugSysCmdfinPage!ug16.ht!pages} +\pagehead{ugSysCmdfinPage}{ug16.ht}{)fin} +\pageto{notitle}{ugSysCmdpquitPage} <>= \begin{page}{ugSysCmdfinPage}{B.10. )fin} \beginscroll @@ -53341,22 +48035,9 @@ in section \ugSysCmdpquitNumber \end{page} @ -<>= -\newcommand{\ugSysCmdframeTitle}{)frame} -\newcommand{\ugSysCmdframeNumber}{B.11.} - -@ -\section{)frame} -\label{ugSysCmdframePage} -\begin{itemize} -\item ugSysCmdhistoryPage \ref{ugSysCmdhistoryPage} on -page~\pageref{ugSysCmdhistoryPage} -\item ugSysCmdsetPage \ref{ugSysCmdsetPage} on -page~\pageref{ugSysCmdsetPage} -\end{itemize} -\index{pages!ugSysCmdframePage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdframePage} -\index{ugSysCmdframePage!ug16.ht!pages} +\pagehead{ugSysCmdframePage}{ug16.ht}{)frame} +\pageto{notitle}{ugSysCmdhistoryPage} +\pageto{notitle}{ugSysCmdsetPage} <>= \begin{page}{ugSysCmdframePage}{B.11. )frame} \beginscroll @@ -53371,7 +48052,8 @@ page~\pageref{ugSysCmdsetPage} \item{\tt )frame next} \item{\tt )frame last} \item{\tt )frame names} -\item{\tt )frame import {\it frameName} {\it \lanb{}objectName1 \lanb{}objectName2 ...\ranb{}\ranb{}}} +\item{\tt )frame import {\it frameName} +{\it \lanb{}objectName1 \lanb{}objectName2 ...\ranb{}\ranb{}}} \item{\tt )set message frame on \vertline{} off} \item{\tt )set message prompt frame} \end{items} @@ -53382,12 +48064,12 @@ A {\it frame} can be thought of as a logical session within the physical session that you get when you start the system. You can have as many frames as you want, within the limits of your computer's storage, paging space, and so on. -Each frame has its own {\it step number}, {\it environment} and {\it history.} -You can have a variable named {\tt a} in one frame and it will -have nothing to do with anything that might be called {\tt a} in +Each frame has its own {\it step number}, {\it environment} and {\it +history.} You can have a variable named {\tt a} in one frame and it +will have nothing to do with anything that might be called {\tt a} in any other frame. -Some frames are created by the \HyperName{} program and these can +Some frames are created by the Hyperdoc program and these can have pretty strange names, since they are generated automatically. To find out the names of all frames, issue @@ -53474,16 +48156,7 @@ in section \ugSysCmdsetNumber \end{page} @ -<>= -\newcommand{\ugSysCmdhelpTitle}{)help} -\newcommand{\ugSysCmdhelpNumber}{B.12.} - -@ -\section{)help} -\label{ugSysCmdhelpPage} -\index{pages!ugSysCmdhelpPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdhelpPage} -\index{ugSysCmdhelpPage!ug16.ht!pages} +\pagehead{ugSysCmdhelpPage}{ug16.ht}{)help} <>= \begin{page}{ugSysCmdhelpPage}{B.12. )help} \beginscroll @@ -53514,8 +48187,8 @@ For example, will display the description of the {\tt )clear} system command. All this material is available in the Axiom User Guide -and in \HyperName{}. -In \HyperName{}, choose the {\bf Commands} item from the +and in Hyperdoc. +In Hyperdoc, choose the {\bf Commands} item from the {\bf Reference} menu. @@ -53525,28 +48198,12 @@ In \HyperName{}, choose the {\bf Commands} item from the \end{page} @ -<>= -\newcommand{\ugSysCmdhistoryTitle}{)history} -\newcommand{\ugSysCmdhistoryNumber}{B.13.} - -@ -\section{)history} -\label{ugSysCmdhistoryPage} -\begin{itemize} -\item ugSysCmdframePage \ref{ugSysCmdframePage} on -page~\pageref{ugSysCmdframePage} -\item ugSysCmdcdPage \ref{ugSysCmdcdPage} on -page~\pageref{ugSysCmdcdPage} -\item ugSysCmdreadPage \ref{ugSysCmdreadPage} on -page~\pageref{ugSysCmdreadPage} -\item ugSysCmdsetPage \ref{ugSysCmdsetPage} on -page~\pageref{ugSysCmdsetPage} -\item ugSysCmdundoPage \ref{ugSysCmdundoPage} on -page~\pageref{ugSysCmdundoPage} -\end{itemize} -\index{pages!ugSysCmdhistoryPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdhistoryPage} -\index{ugSysCmdhistoryPage!ug16.ht!pages} +\pagehead{ugSysCmdhistoryPage}{ug16.ht}{)history} +\pageto{notitle}{ugSysCmdframePage} +\pageto{notitle}{ugSysCmdcdPage} +\pageto{notitle}{ugSysCmdreadPage} +\pageto{notitle}{ugSysCmdsetPage} +\pageto{notitle}{ugSysCmdundoPage} <>= \begin{page}{ugSysCmdhistoryPage}{B.13. )history} \beginscroll @@ -53734,26 +48391,11 @@ in section \ugSysCmdundoNumber \end{page} @ -<>= -\newcommand{\ugSysCmdlibraryTitle}{)library} -\newcommand{\ugSysCmdlibraryNumber}{B.14.} - -@ -\section{)library} -\label{ugSysCmdlibraryPage} -\begin{itemize} -\item ugSysCmdcdPage \ref{ugSysCmdcdPage} on -page~\pageref{ugSysCmdcdPage} -\item ugSysCmdcompilePage \ref{ugSysCmdcompilePage} on -page~\pageref{ugSysCmdcompilePage} -\item ugSysCmdframePage \ref{ugSysCmdframePage} on -page~\pageref{ugSysCmdframePage} -\item ugSysCmdsetPage \ref{ugSysCmdsetPage} on -page~\pageref{ugSysCmdsetPage} -\end{itemize} -\index{pages!ugSysCmdlibraryPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdlibraryPage} -\index{ugSysCmdlibraryPage!ug16.ht!pages} +\pagehead{ugSysCmdlibraryPage}{ug16.ht}{)library} +\pageto{notitle}{ugSysCmdcdPage} +\pageto{notitle}{ugSysCmdcompilePage} +\pageto{notitle}{ugSysCmdframePage} +\pageto{notitle}{ugSysCmdsetPage} <>= \begin{page}{ugSysCmdlibraryPage}{B.14. )library} \beginscroll @@ -53805,10 +48447,10 @@ option. The command {\tt )library dopler )only Test1} will only cause the {\sf Test1} constructor to be analyzed, autoloaded, etc.. -Finally, each constructor in a library are usually automatically exposed when the -\spadcmd{)library} command is used. Use the {\tt )noexpose} -option if you not want them exposed. At a later time you can use -{\tt )set expose add constructor} to expose any hidden +Finally, each constructor in a library are usually automatically +exposed when the \spadcmd{)library} command is used. Use the {\tt +)noexpose} option if you not want them exposed. At a later time you +can use {\tt )set expose add constructor} to expose any hidden constructors. {\bf Note for Axiom beta testers:} At various times this @@ -53816,7 +48458,8 @@ command was called {\tt )local} and {\tt )with} before the name {\tt )library} became the official name. \par\noindent{\bf Also See:} -\downlink{``\ugSysCmdcdTitle''}{ugSysCmdcdPage} in section \ugSysCmdcdNumber +\downlink{``\ugSysCmdcdTitle''}{ugSysCmdcdPage} in section +\ugSysCmdcdNumber \downlink{``\ugSysCmdcompileTitle''}{ugSysCmdcompilePage} in section \ugSysCmdcompileNumber \downlink{``\ugSysCmdframeTitle''}{ugSysCmdframePage} @@ -53829,24 +48472,10 @@ in section \ugSysCmdsetNumber \end{page} @ -<>= -\newcommand{\ugSysCmdlispTitle}{)lisp} -\newcommand{\ugSysCmdlispNumber}{B.15.} - -@ -\section{)lisp} -\label{ugSysCmdlispPage} -\begin{itemize} -\item ugSysCmdsystemPage \ref{ugSysCmdsystemPage} on -page~\pageref{ugSysCmdsystemPage} -\item ugSysCmdbootPage \ref{ugSysCmdbootPage} on -page~\pageref{ugSysCmdbootPage} -\item ugSysCmdfinPage \ref{ugSysCmdfinPage} on -page~\pageref{ugSysCmdfinPage} -\end{itemize} -\index{pages!ugSysCmdlispPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdlispPage} -\index{ugSysCmdlispPage!ug16.ht!pages} +\pagehead{ugSysCmdlispPage}{ug16.ht}{)lisp} +\pageto{notitle}{ugSysCmdsystemPage} +\pageto{notitle}{ugSysCmdbootPage} +\pageto{notitle}{ugSysCmdfinPage} <>= \begin{page}{ugSysCmdlispPage}{B.15. )lisp} \beginscroll @@ -53862,16 +48491,13 @@ page~\pageref{ugSysCmdfinPage} \par\noindent{\bf Command Description:} This command is used by Axiom system developers to have single -expressions evaluated by the \Lisp{} system on which -Axiom is built. -The {\it lispExpression} is read by the \Lisp{} reader and -evaluated. -If this expression is not complete (unbalanced parentheses, say), the reader -will wait until a complete expression is entered. +expressions evaluated by the \Lisp{} system on which Axiom is built. +The {\it lispExpression} is read by the \Lisp{} reader and evaluated. +If this expression is not complete (unbalanced parentheses, say), the +reader will wait until a complete expression is entered. -Since this command is only useful for evaluating single expressions, the -{\tt )fin} -command may be used to drop out of Axiom into \Lisp{}. +Since this command is only useful for evaluating single expressions, +the {\tt )fin} command may be used to drop out of Axiom into \Lisp{}. \par\noindent{\bf Also See:} \downlink{``\ugSysCmdsystemTitle''}{ugSysCmdsystemPage} @@ -53886,16 +48512,7 @@ in section \ugSysCmdfinNumber \end{page} @ -<>= -\newcommand{\ugSysCmdloadTitle}{)load} -\newcommand{\ugSysCmdloadNumber}{B.16.} - -@ -\section{)load} -\label{ugSysCmdloadPage} -\index{pages!ugSysCmdloadPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdloadPage} -\index{ugSysCmdloadPage!ug16.ht!pages} +\pagehead{ugSysCmdloadPage}{ug16.ht}{)load} <>= \begin{page}{ugSysCmdloadPage}{B.16. )load} \beginscroll @@ -53903,46 +48520,19 @@ in section \ugSysCmdfinNumber \par\noindent{\bf User Level Required:} interpreter -%% BEGIN OBSOLETE -%% END OBSOLETE - \par\noindent{\bf Command Description:} This command is obsolete. Use \spadcmd{)library} instead. -%% BEGIN OBSOLETE - -% -% -% -% - -%% END OBSOLETE - - \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugSysCmdltraceTitle}{)ltrace} -\newcommand{\ugSysCmdltraceNumber}{B.17.} - -@ -\section{)ltrace} -\label{ugSysCmdltracePage} -\begin{itemize} -\item ugSysCmdbootPage \ref{ugSysCmdbootPage} on -page~\pageref{ugSysCmdbootPage} -\item ugSysCmdlispPage \ref{ugSysCmdlispPage} on -page~\pageref{ugSysCmdlispPage} -\item ugSysCmdtracePage \ref{ugSysCmdtracePage} on -page~\pageref{ugSysCmdtracePage} -\end{itemize} -\index{pages!ugSysCmdltracePage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdltracePage} -\index{ugSysCmdltracePage!ug16.ht!pages} +\pagehead{ugSysCmdltracePage}{ug16.ht}{)ltrace} +\pageto{notitle}{ugSysCmdbootPage} +\pageto{notitle}{ugSysCmdlispPage} +\pageto{notitle}{ugSysCmdtracePage} <>= \begin{page}{ugSysCmdltracePage}{B.17. )ltrace} \beginscroll @@ -53975,28 +48565,12 @@ in section \ugSysCmdtraceNumber \end{page} @ -<>= -\newcommand{\ugSysCmdpquitTitle}{)pquit} -\newcommand{\ugSysCmdpquitNumber}{B.18.} - -@ -\section{)pquit} -\label{ugSysCmdpquitPage} -\begin{itemize} -\item ugSysCmdfinPage \ref{ugSysCmdfinPage} on -page~\pageref{ugSysCmdfinPage} -\item ugSysCmdhistoryPage \ref{ugSysCmdhistoryPage} on -page~\pageref{ugSysCmdhistoryPage} -\item ugSysCmdclosePage \ref{ugSysCmdclosePage} on -page~\pageref{ugSysCmdclosePage} -\item ugSysCmdquitPage \ref{ugSysCmdquitPage} on -page~\pageref{ugSysCmdquitPage} -\item ugSysCmdsystemPage \ref{ugSysCmdsystemPage} on -page~\pageref{ugSysCmdsystemPage} -\end{itemize} -\index{pages!ugSysCmdpquitPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdpquitPage} -\index{ugSysCmdpquitPage!ug16.ht!pages} +\pagehead{ugSysCmdpquitPage}{ug16.ht}{)pquit} +\pageto{notitle}{ugSysCmdfinPage} +\pageto{notitle}{ugSysCmdhistoryPage} +\pageto{notitle}{ugSysCmdclosePage} +\pageto{notitle}{ugSysCmdquitPage} +\pageto{notitle}{ugSysCmdsystemPage} <>= \begin{page}{ugSysCmdpquitPage}{B.18. )pquit} \beginscroll @@ -54023,20 +48597,23 @@ confirmation that you want to terminate Axiom (the ``p'' is for ``protected''). When you enter the {\tt )pquit} command, Axiom responds % -\centerline{{Please enter {\bf y} or {\bf yes} if you really want to leave the interactive }} +\centerline{{Please enter {\bf y} or {\bf yes} +if you really want to leave the interactive }} \centerline{{environment and return to the operating system:}} % If you respond with {\tt y} or {\tt yes}, you will see the message % \centerline{{You are now leaving the Axiom interactive environment. }} -\centerline{{Issue the command {\bf axiom} to the operating system to start a new session.}} +\centerline{{Issue the command {\bf axiom} to +the operating system to start a new session.}} % and Axiom will terminate and return you to the operating system (or the environment from which you invoked the system). If you responded with something other than {\tt y} or {\tt yes}, then the message % -\centerline{{You have chosen to remain in the Axiom interactive environment.}} +\centerline{{You have chosen to remain in the +Axiom interactive environment.}} % will be displayed and, indeed, Axiom would still be running. @@ -54057,28 +48634,12 @@ in section \ugSysCmdsystemNumber \end{page} @ -<>= -\newcommand{\ugSysCmdquitTitle}{)quit} -\newcommand{\ugSysCmdquitNumber}{B.19.} - -@ -\section{)quit} -\label{ugSysCmdquitPage} -\begin{itemize} -\item ugSysCmdfinPage \ref{ugSysCmdfinPage} on -page~\pageref{ugSysCmdfinPage} -\item ugSysCmdhistoryPage \ref{ugSysCmdhistoryPage} on -page~\pageref{ugSysCmdhistoryPage} -\item ugSysCmdclosePage \ref{ugSysCmdclosePage} on -page~\pageref{ugSysCmdclosePage} -\item ugSysCmdpquitPage \ref{ugSysCmdpquitPage} on -page~\pageref{ugSysCmdpquitPage} -\item ugSysCmdsystemPage \ref{ugSysCmdsystemPage} on -page~\pageref{ugSysCmdsystemPage} -\end{itemize} -\index{pages!ugSysCmdquitPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdquitPage} -\index{ugSysCmdquitPage!ug16.ht!pages} +\pagehead{ugSysCmdquitPage}{ug16.ht}{)quit} +\pageto{notitle}{ugSysCmdfinPage} +\pageto{notitle}{ugSysCmdhistoryPage} +\pageto{notitle}{ugSysCmdclosePage} +\pageto{notitle}{ugSysCmdpquitPage} +\pageto{notitle}{ugSysCmdsystemPage} <>= \begin{page}{ugSysCmdquitPage}{B.19. )quit} \beginscroll @@ -54138,26 +48699,11 @@ in section \ugSysCmdsystemNumber \end{page} @ -<>= -\newcommand{\ugSysCmdreadTitle}{)read} -\newcommand{\ugSysCmdreadNumber}{B.20.} - -@ -\section{)read} -\label{ugSysCmdreadPage} -\begin{itemize} -\item ugInOutInPage \ref{ugInOutInPage} on -page~\pageref{ugInOutInPage} -\item ugSysCmdcompilePage \ref{ugSysCmdcompilePage} on -page~\pageref{ugSysCmdcompilePage} -\item ugSysCmdeditPage \ref{ugSysCmdeditPage} on -page~\pageref{ugSysCmdeditPage} -\item ugSysCmdhistoryPage \ref{ugSysCmdhistoryPage} on -page~\pageref{ugSysCmdhistoryPage} -\end{itemize} -\index{pages!ugSysCmdreadPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdreadPage} -\index{ugSysCmdreadPage!ug16.ht!pages} +\pagehead{ugSysCmdreadPage}{ug16.ht}{)read} +\pageto{notitle}{ugInOutInPage} +\pageto{notitle}{ugSysCmdcompilePage} +\pageto{notitle}{ugSysCmdeditPage} +\pageto{notitle}{ugSysCmdhistoryPage} <>= \begin{page}{ugSysCmdreadPage}{B.20. )read} \beginscroll @@ -54168,7 +48714,8 @@ page~\pageref{ugSysCmdhistoryPage} \par\noindent{\bf Command Syntax:} \begin{items} \item {\tt )read} {\it \lanb{}fileName\ranb{}} -\item {\tt )read} {\it \lanb{}fileName\ranb{}} \lanb{}{\tt )quiet}\ranb{} \lanb{}{\tt )ifthere}\ranb{} +\item {\tt )read} {\it \lanb{}fileName\ranb{}} +\lanb{}{\tt )quiet}\ranb{} \lanb{}{\tt )ifthere}\ranb{} \end{items} \par\noindent{\bf Command Description:} @@ -54206,20 +48753,8 @@ in section \ugSysCmdhistoryNumber \end{page} @ -<>= -\newcommand{\ugSysCmdsetTitle}{)set} -\newcommand{\ugSysCmdsetNumber}{B.21.} - -@ -\section{)set} -\label{ugSysCmdsetPage} -\begin{itemize} -\item ugSysCmdquitPage \ref{ugSysCmdquitPage} on -page~\pageref{ugSysCmdquitPage} -\end{itemize} -\index{pages!ugSysCmdsetPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdsetPage} -\index{ugSysCmdsetPage!ug16.ht!pages} +\pagehead{ugSysCmdsetPage}{ug16.ht}{)set} +\pageto{notitle}{ugSysCmdquitPage} <>= \begin{page}{ugSysCmdsetPage}{B.21. )set} \beginscroll @@ -54243,8 +48778,8 @@ Since this collection is very large, we will not discuss them here. Rather, we will show how the facility is used. We urge you to explore the {\tt )set} options to familiarize yourself with how you can modify your Axiom working environment. -There is a \HyperName{} version of this same facility available from the -main \HyperName{} menu. +There is a Hyperdoc version of this same facility available from the +main Hyperdoc menu. \texht{}{Click \lispmemolink{here}{(|htSystemVariables|)} to go to it.} The {\tt )set} command is command-driven with a menu display. @@ -54290,24 +48825,10 @@ in section \ugSysCmdquitNumber \end{page} @ -<>= -\newcommand{\ugSysCmdshowTitle}{)show} -\newcommand{\ugSysCmdshowNumber}{B.22.} - -@ -\section{)show} -\label{ugSysCmdshowPage} -\begin{itemize} -\item ugSysCmddisplayPage \ref{ugSysCmddisplayPage} on -page~\pageref{ugSysCmddisplayPage} -\item ugSysCmdsetPage \ref{ugSysCmdsetPage} on -page~\pageref{ugSysCmdsetPage} -\item ugSysCmdwhatPage \ref{ugSysCmdwhatPage} on -page~\pageref{ugSysCmdwhatPage} -\end{itemize} -\index{pages!ugSysCmdshowPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdshowPage} -\index{ugSysCmdshowPage!ug16.ht!pages} +\pagehead{ugSysCmdshowPage}{ug16.ht}{)show} +\pageto{notitle}{ugSysCmddisplayPage} +\pageto{notitle}{ugSysCmdsetPage} +\pageto{notitle}{ugSysCmdwhatPage} <>= \begin{page}{ugSysCmdshowPage}{B.22. )show} \beginscroll @@ -54375,20 +48896,8 @@ in section \ugSysCmdwhatNumber \end{page} @ -<>= -\newcommand{\ugSysCmdspoolTitle}{)spool} -\newcommand{\ugSysCmdspoolNumber}{B.23.} - -@ -\section{)spool} -\label{ugSysCmdspoolPage} -\begin{itemize} -\item ugSysCmdcdPage \ref{ugSysCmdcdPage} on -page~\pageref{ugSysCmdcdPage} -\end{itemize} -\index{pages!ugSysCmdspoolPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdspoolPage} -\index{ugSysCmdspoolPage!ug16.ht!pages} +\pagehead{ugSysCmdspoolPage}{ug16.ht}{)spool} +\pageto{notitle}{ugSysCmdcdPage} <>= \begin{page}{ugSysCmdspoolPage}{B.23. )spool} \beginscroll @@ -54413,38 +48922,24 @@ To start spool, issue this command with a filename. For example, \end{verbatim} To stop spooling, issue {\tt )spool} with no filename. -If the filename is qualified with a directory, then the output will -be placed in that directory. -If no directory information is given, the spool file will be placed in the -{\it current directory.} -The current directory is the directory from which you started -Axiom or is the directory you specified using the -{\tt )cd} command. +If the filename is qualified with a directory, then the output will be +placed in that directory. If no directory information is given, the +spool file will be placed in the {\it current directory.} The current +directory is the directory from which you started Axiom or is the +directory you specified using the {\tt )cd} command. \par\noindent{\bf Also See:} -\downlink{``\ugSysCmdcdTitle''}{ugSysCmdcdPage} in section \ugSysCmdcdNumber +\downlink{``\ugSysCmdcdTitle''}{ugSysCmdcdPage} in section +\ugSysCmdcdNumber \endscroll \autobuttons \end{page} @ -<>= -\newcommand{\ugSysCmdsynonymTitle}{)synonym} -\newcommand{\ugSysCmdsynonymNumber}{B.24.} - -@ -\section{)synonym} -\label{ugSysCmdsynonymPage} -\begin{itemize} -\item ugSysCmdsetPage \ref{ugSysCmdsetPage} on -page~\pageref{ugSysCmdsetPage} -\item ugSysCmdwhatPage \ref{ugSysCmdwhatPage} on -page~\pageref{ugSysCmdwhatPage} -\end{itemize} -\index{pages!ugSysCmdsynonymPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdsynonymPage} -\index{ugSysCmdsynonymPage!ug16.ht!pages} +\pagehead{ugSysCmdsynonymPage}{ug16.ht}{)synonym} +\pageto{notitle}{ugSysCmdsetPage} +\pageto{notitle}{ugSysCmdwhatPage} <>= \begin{page}{ugSysCmdsynonymPage}{B.24. )synonym} \beginscroll @@ -54461,9 +48956,9 @@ page~\pageref{ugSysCmdwhatPage} \par\noindent{\bf Command Description:} -This command is used to create short synonyms for system command expressions. -For example, the following synonyms might simplify commands you often -use. +This command is used to create short synonyms for system command +expressions. For example, the following synonyms might simplify +commands you often use. \begin{verbatim} )synonym save history )save )synonym restore history )restore @@ -54503,28 +48998,12 @@ in section \ugSysCmdwhatNumber \end{page} @ -<>= -\newcommand{\ugSysCmdsystemTitle}{)system} -\newcommand{\ugSysCmdsystemNumber}{B.25.} - -@ -\section{)system} -\label{ugSysCmdsystemPage} -\begin{itemize} -\item ugSysCmdbootPage \ref{ugSysCmdbootPage} on -page~\pageref{ugSysCmdbootPage} -\item ugSysCmdfinPage \ref{ugSysCmdfinPage} on -page~\pageref{ugSysCmdfinPage} -\item ugSysCmdlispPage \ref{ugSysCmdlispPage} on -page~\pageref{ugSysCmdlispPage} -\item ugSysCmdpquitPage \ref{ugSysCmdpquitPage} on -page~\pageref{ugSysCmdpquitPage} -\item ugSysCmdquitPage \ref{ugSysCmdquitPage} on -page~\pageref{ugSysCmdquitPage} -\end{itemize} -\index{pages!ugSysCmdsystemPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdsystemPage} -\index{ugSysCmdsystemPage!ug16.ht!pages} +\pagehead{ugSysCmdsystemPage}{ug16.ht}{)system} +\pageto{notitle}{ugSysCmdbootPage} +\pageto{notitle}{ugSysCmdfinPage} +\pageto{notitle}{ugSysCmdlispPage} +\pageto{notitle}{ugSysCmdpquitPage} +\pageto{notitle}{ugSysCmdquitPage} <>= \begin{page}{ugSysCmdsystemPage}{B.25. )system} \beginscroll @@ -54538,10 +49017,9 @@ page~\pageref{ugSysCmdquitPage} \par\noindent{\bf Command Description:} -This command may be used to issue commands to the operating system while -remaining in Axiom. -The {\it cmdExpression} is passed to the operating system for -execution. +This command may be used to issue commands to the operating system +while remaining in Axiom. The {\it cmdExpression} is passed to the +operating system for execution. To get an operating system shell, issue, for example, \spadcmd{)system sh}. @@ -54555,11 +49033,10 @@ We do not recommend this way of creating a shell because \Lisp{} may field some interrupts instead of the shell. If possible, use a shell running in another window. -If you execute programs that misbehave you may not be able to return to -Axiom. -If this happens, you may have no other choice than to restart -Axiom and restore the environment via {\tt )history )restore}, if -possible. +If you execute programs that misbehave you may not be able to return +to Axiom. If this happens, you may have no other choice than to +restart Axiom and restore the environment via {\tt )history )restore}, +if possible. \par\noindent{\bf Also See:} \downlink{``\ugSysCmdbootTitle''}{ugSysCmdbootPage} @@ -54578,26 +49055,11 @@ in section \ugSysCmdquitNumber \end{page} @ -<>= -\newcommand{\ugSysCmdtraceTitle}{)trace} -\newcommand{\ugSysCmdtraceNumber}{B.26.} - -@ -\section{)trace} -\label{ugSysCmdtracePage} -\begin{itemize} -\item ugSysCmdcompilePage \ref{ugSysCmdcompilePage} on -page~\pageref{ugSysCmdcompilePage} -\item ugSysCmdbootPage \ref{ugSysCmdbootPage} on -page~\pageref{ugSysCmdbootPage} -\item ugSysCmdlispPage \ref{ugSysCmdlispPage} on -page~\pageref{ugSysCmdlispPage} -\item ugSysCmdltracePage \ref{ugSysCmdltracePage} on -page~\pageref{ugSysCmdltracePage} -\end{itemize} -\index{pages!ugSysCmdtracePage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdtracePage} -\index{ugSysCmdtracePage!ug16.ht!pages} +\pagehead{ugSysCmdtracePage}{ug16.ht}{)trace} +\pageto{notitle}{ugSysCmdcompilePage} +\pageto{notitle}{ugSysCmdbootPage} +\pageto{notitle}{ugSysCmdlispPage} +\pageto{notitle}{ugSysCmdltracePage} <>= \begin{page}{ugSysCmdtracePage}{B.26. )trace} \beginscroll @@ -54695,25 +49157,23 @@ be necessary to escape the character with an underscore \begin{verbatim} )trace _/D_,1 \end{verbatim} -% -To trace all domains or packages that are or will be created from a particular -constructor, give the constructor name or abbreviation after -{\tt )trace}. -% + +To trace all domains or packages that are or will be created from a +particular constructor, give the constructor name or abbreviation +after {\tt )trace}. + \begin{verbatim} )trace MATRIX )trace List Integer \end{verbatim} -% + The first command traces all domains currently instantiated with -\spadtype{Matrix}. -If additional domains are instantiated with this constructor -(for example, if you have used \spadtype{Matrix(Integer)} and -\spadtype{Matrix(Float)}), they will be automatically traced. -The second command traces \spadtype{List(Integer)}. -It is possible to trace individual functions in a domain or -package. -See the {\tt )ops} option below. +\spadtype{Matrix}. If additional domains are instantiated with this +constructor (for example, if you have used \spadtype{Matrix(Integer)} +and \spadtype{Matrix(Float)}), they will be automatically traced. The +second command traces \spadtype{List(Integer)}. It is possible to +trace individual functions in a domain or package. See the {\tt )ops} +option below. The following are the general options for the {\tt )trace} command. @@ -54904,20 +49364,8 @@ in section \ugSysCmdltraceNumber \end{page} @ -<>= -\newcommand{\ugSysCmdundoTitle}{)undo} -\newcommand{\ugSysCmdundoNumber}{B.27.} - -@ -\section{)undo} -\label{ugSysCmdundoPage} -\begin{itemize} -\item ugSysCmdhistoryPage \ref{ugSysCmdhistoryPage} on -page~\pageref{ugSysCmdhistoryPage} -\end{itemize} -\index{pages!ugSysCmdundoPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdundoPage} -\index{ugSysCmdundoPage!ug16.ht!pages} +\pagehead{ugSysCmdundoPage}{ug16.ht}{)undo} +\pageto{notitle}{ugSysCmdhistoryPage} <>= \begin{page}{ugSysCmdundoPage}{B.27. )undo} \beginscroll @@ -54999,24 +49447,10 @@ lines of your program. \end{page} @ -<>= -\newcommand{\ugSysCmdwhatTitle}{)what} -\newcommand{\ugSysCmdwhatNumber}{B.28.} - -@ -\section{)what} -\label{ugSysCmdwhatPage} -\begin{itemize} -\item ugSysCmddisplayPage \ref{ugSysCmddisplayPage} on -page~\pageref{ugSysCmddisplayPage} -\item ugSysCmdsetPage \ref{ugSysCmdsetPage} on -page~\pageref{ugSysCmdsetPage} -\item ugSysCmdshowPage \ref{ugSysCmdshowPage} on -page~\pageref{ugSysCmdshowPage} -\end{itemize} -\index{pages!ugSysCmdwhatPage!ug16.ht} -\index{ug16.ht!pages!ugSysCmdwhatPage} -\index{ugSysCmdwhatPage!ug16.ht!pages} +\pagehead{ugSysCmdwhatPage}{ug16.ht}{)what} +\pageto{notitle}{ugSysCmddisplayPage} +\pageto{notitle}{ugSysCmdsetPage} +\pageto{notitle}{ugSysCmdshowPage} <>= \begin{page}{ugSysCmdwhatPage}{B.28. )what} \beginscroll @@ -55026,14 +49460,22 @@ page~\pageref{ugSysCmdshowPage} \par\noindent{\bf Command Syntax:} \begin{items} -\item{\tt )what categories} {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}} -\item{\tt )what commands } {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}} -\item{\tt )what domains } {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}} -\item{\tt )what operations} {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}} -\item{\tt )what packages } {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}} -\item{\tt )what synonym } {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}} -\item{\tt )what things } {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}} -\item{\tt )apropos } {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}} +\item{\tt )what categories} {\it pattern1} \lanb{} +{\it pattern2 ...\ranb{}} +\item{\tt )what commands } {\it pattern1} \lanb{} +{\it pattern2 ...\ranb{}} +\item{\tt )what domains } {\it pattern1} \lanb{} +{\it pattern2 ...\ranb{}} +\item{\tt )what operations} {\it pattern1} \lanb{} +{\it pattern2 ...\ranb{}} +\item{\tt )what packages } {\it pattern1} \lanb{} +{\it pattern2 ...\ranb{}} +\item{\tt )what synonym } {\it pattern1} \lanb{} +{\it pattern2 ...\ranb{}} +\item{\tt )what things } {\it pattern1} \lanb{} +{\it pattern2 ...\ranb{}} +\item{\tt )apropos } {\it pattern1} \lanb{} +{\it pattern2 ...\ranb{}} \end{items} \par\noindent{\bf Command Description:} @@ -55074,15 +49516,15 @@ Several other things can be listed with the {\tt )what} command: \indent{0} \beginitems \item[{\tt categories}] displays a list of category constructors. -\item[{\tt commands}] displays a list of system commands available at your -user-level. +\item[{\tt commands}] displays a list of system commands available +at your user-level. Your user-level is set via the {\tt )set userlevel} command. -To get a description of a particular command, such as ``{\tt )what}'', issue -{\tt )help what}. +To get a description of a particular command, such as ``{\tt )what}'', +issue {\tt )help what}. \item[{\tt domains}] displays a list of domain constructors. -\item[{\tt operations}] displays a list of operations in the system library. -It is recommended that you qualify this command with one or +\item[{\tt operations}] displays a list of operations in the system +library. It is recommended that you qualify this command with one or more patterns, as there are thousands of operations available. For example, say you are looking for functions that involve computation of eigenvalues. To find their names, try {\tt )what operations eig}. @@ -55092,8 +49534,8 @@ clear the workspace via {\tt )clear all} or {\tt )clear completely}. It will be re-created if it is needed again. \item[{\tt packages}] displays a list of package constructors. \item[{\tt synonym}] lists system command synonyms. -\item[{\tt things}] displays all of the above types for items containing -the pattern strings as substrings. +\item[{\tt things}] displays all of the above types for items +containing the pattern strings as substrings. The command synonym {\tt )apropos} is equivalent to {\tt )what things}. \enditems @@ -55114,16 +49556,7 @@ in section \ugSysCmdshowNumber @ \chapter{Users Guide Chapter 21 (ug21.ht)} -<>= -\newcommand{\ugAppGraphicsTitle}{Programs for Axiom Images} -\newcommand{\ugAppGraphicsNumber}{G.} - -@ -\section{Programs for Axiom Images} -\label{ugAppGraphicsPage} -\index{pages!ugAppGraphicsPage!ug21.ht} -\index{ug21.ht!pages!ugAppGraphicsPage} -\index{ugAppGraphicsPage!ug21.ht!pages} +\pagehead{ugAppGraphicsPage}{ug21.ht}{Programs for Axiom Images} <>= \begin{page}{ugAppGraphicsPage}{G. Programs for Axiom Images} \beginscroll @@ -55166,16 +49599,7 @@ ChromaScript PostScript interpreter with a Matrix Instruments QCR camera. \end{page} @ -<>= -\newcommand{\ugFimagesOneTitle}{images1.input} -\newcommand{\ugFimagesOneNumber}{G.1.} - -@ -\section{images1.input} -\label{ugFimagesOnePage} -\index{pages!ugFimagesOnePage!ug21.ht} -\index{ug21.ht!pages!ugFimagesOnePage} -\index{ugFimagesOnePage!ug21.ht!pages} +\pagehead{ugFimagesOnePage}{ug21.ht}{images1.input} <>= \begin{page}{ugFimagesOnePage}{G.1. images1.input} \beginscroll @@ -55196,25 +49620,17 @@ ChromaScript PostScript interpreter with a Matrix Instruments QCR camera. \end{page} @ -<>= -\newcommand{\ugFimagesTwoTitle}{images2.input} -\newcommand{\ugFimagesTwoNumber}{G.2.} - -@ -\section{images2.input} -\label{ugFimagesTwoPage} -\index{pages!ugFimagesTwoPage!ug21.ht} -\index{ug21.ht!pages!ugFimagesTwoPage} -\index{ugFimagesTwoPage!ug21.ht!pages} +\pagehead{ugFimagesTwoPage}{ug21.ht}{images2.input} <>= \begin{page}{ugFimagesTwoPage}{G.2. images2.input} \beginscroll -These images illustrate how Newton's method converges when computing the -complex cube roots of 2. Each point in the \smath{(x,y)}-plane represents the -complex number \smath{x + iy,} which is given as a starting point for Newton's -method. The poles in these images represent bad starting values. -The flat areas are the regions of convergence to the three roots. +These images illustrate how Newton's method converges when computing +the complex cube roots of 2. Each point in the \smath{(x,y)}-plane +represents the complex number \smath{x + iy,} which is given as a +starting point for Newton's method. The poles in these images +represent bad starting values. The flat areas are the regions of +convergence to the three roots. \noindent @@ -55241,16 +49657,7 @@ The function \texht{$f^n$}{f**n} computes $n$ steps of Newton's method. \end{page} @ -<>= -\newcommand{\ugFimagesThreeTitle}{images3.input} -\newcommand{\ugFimagesThreeNumber}{G.3.} - -@ -\section{images3.input} -\label{ugFimagesThreePage} -\index{pages!ugFimagesThreePage!ug21.ht} -\index{ug21.ht!pages!ugFimagesThreePage} -\index{ugFimagesThreePage!ug21.ht!pages} +\pagehead{ugFimagesThreePage}{ug21.ht}{images3.input} <>= \begin{page}{ugFimagesThreePage}{G.3. images3.input} \beginscroll @@ -55258,7 +49665,8 @@ The function \texht{$f^n$}{f**n} computes $n$ steps of Newton's method. \noindent {\tt 1.\ \ \ )r\ tknot}\newline -{\tt 2.\ \ \ for\ i\ in\ 0..4\ repeat\ torusKnot(2,\ 2\ +\ i/4,\ 0.5,\ 25,\ 250)}\newline +{\tt 2.\ \ \ for\ i\ in\ 0..4\ repeat\ +torusKnot(2,\ 2\ +\ i/4,\ 0.5,\ 25,\ 250)}\newline \noindent @@ -55267,16 +49675,7 @@ The function \texht{$f^n$}{f**n} computes $n$ steps of Newton's method. \end{page} @ -<>= -\newcommand{\ugFimagesFiveTitle}{images5.input} -\newcommand{\ugFimagesFiveNumber}{G.4.} - -@ -\section{images5.input} -\label{ugFimagesFivePage} -\index{pages!ugFimagesFivePage!ug21.ht} -\index{ug21.ht!pages!ugFimagesFivePage} -\index{ugFimagesFivePage!ug21.ht!pages} +\pagehead{ugFimagesFivePage}{ug21.ht}{images5.input} <>= \begin{page}{ugFimagesFivePage}{G.4. images5.input} \beginscroll @@ -55286,7 +49685,8 @@ The parameterization of the Etruscan Venus is due to George Frances. \noindent {\tt 1.\ \ \ venus(a,r,steps)\ ==}\newline -{\tt 2.\ \ \ \ \ surf\ :=\ (u:DFLOAT,\ v:DFLOAT):\ Point\ DFLOAT\ +->}\newline +{\tt 2.\ \ \ \ \ surf\ :=\ +(u:DFLOAT,\ v:DFLOAT):\ Point\ DFLOAT\ +->}\newline {\tt 3.\ \ \ \ \ \ \ cv\ :=\ cos(v)}\newline {\tt 4.\ \ \ \ \ \ \ sv\ :=\ sin(v)}\newline {\tt 5.\ \ \ \ \ \ \ cu\ :=\ cos(u)}\newline @@ -55295,8 +49695,10 @@ The parameterization of the Etruscan Venus is due to George Frances. {\tt 8.\ \ \ \ \ \ \ y\ :=\ r\ *\ sin(2*u)\ *\ cv\ -\ sv\ *\ su}\newline {\tt 9.\ \ \ \ \ \ \ z\ :=\ a\ *\ cv}\newline {\tt 10.\ \ \ \ \ \ point\ [x,y,z]}\newline -{\tt 11.\ \ \ \ draw(surf,\ 0..\%pi,\ -\%pi..\%pi,\ var1Steps==steps,}\newline -{\tt 12.\ \ \ \ \ \ \ \ \ var2Steps==steps,\ title\ ==\ "Etruscan\ Venus")}\newline +{\tt 11.\ \ \ \ +draw(surf,\ 0..\%pi,\ -\%pi..\%pi,\ var1Steps==steps,}\newline +{\tt 12.\ \ \ \ \ \ \ \ \ +var2Steps==steps,\ title\ ==\ "Etruscan\ Venus")}\newline {\tt 13.\ \ }\newline {\tt 14.\ \ venus(5/2,\ 13/10,\ 50)}\newline @@ -55318,12 +49720,17 @@ Birkh\"{a}user-Verlag, Basel, pp. 43-60. {\tt 6.\ \ \ \ \ sx2\ :=\ sin(x/2)}\newline {\tt 7.\ \ \ \ \ cx2\ :=\ cos(x/2)}\newline {\tt 8.\ \ \ \ \ sq2\ :=\ sqrt(2.0@DFLOAT)}\newline -{\tt 9.\ \ \ \ \ point\ [cx\ *\ (cx2\ *\ (sq2\ +\ cy)\ +\ (sx2\ *\ sy\ *\ cy)),\ \_}\newline -{\tt 10.\ \ \ \ \ \ \ \ \ \ \ sx\ *\ (cx2\ *\ (sq2\ +\ cy)\ +\ (sx2\ *\ sy\ *\ cy)),\ \_}\newline -{\tt 11.\ \ \ \ \ \ \ \ \ \ \ -sx2\ *\ (sq2\ +\ cy)\ +\ cx2\ *\ sy\ *\ cy]}\newline +{\tt 9.\ \ \ \ \ +point\ [cx\ *\ (cx2\ *\ (sq2\ +\ cy)\ +\ (sx2\ *\ sy\ *\ cy)),\ \_} +\newline +{\tt 10.\ \ \ \ \ \ \ \ \ \ \ +sx\ *\ (cx2\ *\ (sq2\ +\ cy)\ +\ (sx2\ *\ sy\ *\ cy)),\ \_}\newline +{\tt 11.\ \ \ \ \ \ \ \ \ \ \ +-sx2\ *\ (sq2\ +\ cy)\ +\ cx2\ *\ sy\ *\ cy]}\newline {\tt 12.\ \ }\newline {\tt 13.\ \ draw(klein,\ 0..4*\%pi,\ 0..2*\%pi,\ var1Steps==50,}\newline -{\tt 14.\ \ \ \ \ \ \ var2Steps==50,title=="Figure\ Eight\ Klein\ Bottle")}\newline +{\tt 14.\ \ \ \ \ \ \ +var2Steps==50,title=="Figure\ Eight\ Klein\ Bottle")}\newline \noindent @@ -55345,8 +49752,10 @@ The next two images are examples of generalized tubes. {\tt 26.\ \ \ \ p\ :=\ point\ [sin\ u,\ cos(u)/2]}\newline {\tt 27.\ \ \ \ rotateBy(p,\ theta)}\newline {\tt 28.\ \ \ }\newline -{\tt 29.\ \ ntubeDrawOpt(bcircle,\ twist,\ 0..2*\%pi,\ 0..2*\%pi,}\newline -{\tt 30.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ var1Steps\ ==\ 70,\ var2Steps\ ==\ 250)}\newline +{\tt 29.\ \ ntubeDrawOpt(bcircle,\ twist,\ 0..2*\%pi,\ 0..2*\%pi,} +\newline +{\tt 30.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +var1Steps\ ==\ 70,\ var2Steps\ ==\ 250)}\newline {\tt 31.\ \ }\newline {\tt 32.\ \ twist2(u,\ t)\ ==}\newline {\tt 33.\ \ \ \ theta\ :=\ t}\newline @@ -55355,7 +49764,8 @@ The next two images are examples of generalized tubes. {\tt 36.\ \ }\newline {\tt 37.\ \ cf(u,v)\ ==\ sin(21*u)}\newline {\tt 38.\ \ }\newline -{\tt 39.\ \ ntubeDrawOpt(bcircle,\ twist2,\ 0..2*\%pi,\ 0..2*\%pi,}\newline +{\tt 39.\ \ ntubeDrawOpt(bcircle,\ twist2,\ 0..2*\%pi,\ 0..2*\%pi,} +\newline {\tt 40.\ \ \ \ colorFunction\ ==\ cf,\ var1Steps\ ==\ 168,}\newline {\tt 41.\ \ \ \ var2Steps\ ==\ 126)}\newline @@ -55366,16 +49776,7 @@ The next two images are examples of generalized tubes. \end{page} @ -<>= -\newcommand{\ugFimagesSixTitle}{images6.input} -\newcommand{\ugFimagesSixNumber}{G.5.} - -@ -\section{images6.input} -\label{ugFimagesSixPage} -\index{pages!ugFimagesSixPage!ug21.ht} -\index{ug21.ht!pages!ugFimagesSixPage} -\index{ugFimagesSixPage!ug21.ht!pages} +\pagehead{ugFimagesSixPage}{ug21.ht}{images6.input} <>= \begin{page}{ugFimagesSixPage}{G.5. images6.input} \beginscroll @@ -55385,7 +49786,8 @@ The next two images are examples of generalized tubes. \noindent {\tt 1.\ \ \ gam(x,y)\ ==\ }\newline {\tt 2.\ \ \ \ \ g\ :=\ Gamma\ complex(x,y)}\newline -{\tt 3.\ \ \ \ \ point\ [x,y,max(min(real\ g,\ 4),\ -4),\ argument\ g]}\newline +{\tt 3.\ \ \ \ \ +point\ [x,y,max(min(real\ g,\ 4),\ -4),\ argument\ g]}\newline {\tt 4.\ \ \ }\newline {\tt 5.\ \ \ }\newline {\tt 6.\ \ \ draw(gam,\ -\%pi..\%pi,\ -\%pi..\%pi,\ }\newline @@ -55394,7 +49796,8 @@ The next two images are examples of generalized tubes. {\tt 9.\ \ \ }\newline {\tt 10.\ \ b(x,y)\ ==\ Beta(x,y)}\newline {\tt 11.\ \ }\newline -{\tt 12.\ \ draw(b,\ -3.1..3,\ -3.1\ ..\ 3,\ title\ ==\ "Beta(x,y)")}\newline +{\tt 12.\ \ draw(b,\ -3.1..3,\ -3.1\ ..\ 3,\ title\ ==\ "Beta(x,y)")} +\newline {\tt 13.\ \ }\newline {\tt 14.\ \ atf(x,y)\ ==\ }\newline {\tt 15.\ \ \ \ a\ :=\ atan\ complex(x,y)}\newline @@ -55410,16 +49813,7 @@ The next two images are examples of generalized tubes. \end{page} @ -<>= -\newcommand{\ugFimagesSevenTitle}{images7.input} -\newcommand{\ugFimagesSevenNumber}{G.6.} - -@ -\section{images7.input} -\label{ugFimagesSevenPage} -\index{pages!ugFimagesSevenPage!ug21.ht} -\index{ug21.ht!pages!ugFimagesSevenPage} -\index{ugFimagesSevenPage!ug21.ht!pages} +\pagehead{ugFimagesSevenPage}{ug21.ht}{images7.input} <>= \begin{page}{ugFimagesSevenPage}{G.6. images7.input} \beginscroll @@ -55434,11 +49828,13 @@ map \texht{$z \mapsto z + 1/z$}{z +-> z + 1/z}. {\tt 3.\ \ \ }\newline {\tt 4.\ \ \ f\ z\ ==\ z}\newline {\tt 5.\ \ \ }\newline -{\tt 6.\ \ \ conformalDraw(f,\ -2..2,\ -2..2,\ 9,\ 9,\ "cartesian")}\newline +{\tt 6.\ \ \ conformalDraw(f,\ -2..2,\ -2..2,\ 9,\ 9,\ "cartesian")} +\newline {\tt 7.\ \ \ }\newline {\tt 8.\ \ \ f\ z\ ==\ z\ +\ 1/z}\newline {\tt 9.\ \ \ \ }\newline -{\tt 10.\ \ conformalDraw(f,\ -2..2,\ -2..2,\ 9,\ 9,\ "cartesian")}\newline +{\tt 10.\ \ conformalDraw(f,\ -2..2,\ -2..2,\ 9,\ 9,\ "cartesian")} +\newline \noindent @@ -55450,13 +49846,16 @@ on the Riemann sphere. \noindent {\tt 1.\ \ \ f\ z\ ==\ z}\newline {\tt 2.\ \ \ }\newline -{\tt 3.\ \ \ riemannConformalDraw(f,0.1..0.99,0..2*\%pi,7,11,"polar")}\newline +{\tt 3.\ \ \ riemannConformalDraw(f,0.1..0.99,0..2*\%pi,7,11,"polar")} +\newline {\tt 4.\ \ \ }\newline {\tt 5.\ \ \ f\ z\ ==\ -(z+1)/(z-1)}\newline {\tt 6.\ \ \ }\newline -{\tt 7.\ \ \ riemannConformalDraw(f,0.1..0.99,0..2*\%pi,7,11,"polar")}\newline +{\tt 7.\ \ \ riemannConformalDraw(f,0.1..0.99,0..2*\%pi,7,11,"polar")} +\newline {\tt 8.\ \ \ }\newline -{\tt 9.\ \ \ riemannSphereDraw(-4..4,\ -4..4,\ 7,\ 7,\ "cartesian")}\newline +{\tt 9.\ \ \ riemannSphereDraw(-4..4,\ -4..4,\ 7,\ 7,\ "cartesian")} +\newline \noindent @@ -55465,16 +49864,7 @@ on the Riemann sphere. \end{page} @ -<>= -\newcommand{\ugFimagesEightTitle}{images8.input} -\newcommand{\ugFimagesEightNumber}{G.7.} - -@ -\section{images8.input} -\label{ugFimagesEightPage} -\index{pages!ugFimagesEightPage!ug21.ht} -\index{ug21.ht!pages!ugFimagesEightPage} -\index{ugFimagesEightPage!ug21.ht!pages} +\pagehead{ugFimagesEightPage}{ug21.ht}{images8.input} <>= \begin{page}{ugFimagesEightPage}{G.7. images8.input} \beginscroll @@ -55504,16 +49894,7 @@ on the Riemann sphere. \end{page} @ -<>= -\newcommand{\ugFconformalTitle}{conformal.input} -\newcommand{\ugFconformalNumber}{G.8.} - -@ -\section{conformal.input} -\label{ugFconformalPage} -\index{pages!ugFconformalPage!ug21.ht} -\index{ug21.ht!pages!ugFconformalPage} -\index{ugFconformalPage!ug21.ht!pages} +\pagehead{ugFconformalPage}{ug21.ht}{conformal.input} <>= \begin{page}{ugFconformalPage}{G.8. conformal.input} \beginscroll @@ -55532,50 +49913,59 @@ plane and on the Riemann sphere. \noindent -\userfun{conformalDraw}{\it (f, rRange, tRange, rSteps, tSteps, coord)} -draws the image of the coordinate grid under {\it f} in the complex plane. -The grid may be given in either polar or Cartesian coordinates. -Argument {\it f} is the function to draw; -{\it rRange} is the range of the radius (in polar) or real (in Cartesian); -{\it tRange} is the range of \texht{$\theta$}{\theta} (in polar) or imaginary (in Cartesian); -{\it tSteps, rSteps}, are the number of intervals in the {\it r} and -\texht{$\theta$}{\theta} directions; and +\userfun{conformalDraw}{\it (f, rRange, tRange, rSteps, tSteps, +coord)} draws the image of the coordinate grid under {\it f} in the +complex plane. The grid may be given in either polar or Cartesian +coordinates. Argument {\it f} is the function to draw; {\it rRange} +is the range of the radius (in polar) or real (in Cartesian); +{\it tRange} is the range of \texht{$\theta$}{\theta} (in polar) or +imaginary (in Cartesian); {\it tSteps, rSteps}, are the number of +intervals in the {\it r} and \texht{$\theta$}{\theta} directions; and {\it coord} is the coordinate system to use (either {\tt "polar"} or {\tt "cartesian"}). \noindent -{\tt 1.\ \ \ conformalDraw:\ (C\ ->\ C,\ S,\ S,\ PI,\ PI,\ String)\ ->\ VIEW3D}\newline -{\tt 2.\ \ \ conformalDraw(f,rRange,tRange,rSteps,tSteps,coord)\ ==}\newline +{\tt 1.\ \ \ +conformalDraw:\ (C\ ->\ C,\ S,\ S,\ PI,\ PI,\ String)\ ->\ VIEW3D}\newline +{\tt 2.\ \ \ +conformalDraw(f,rRange,tRange,rSteps,tSteps,coord)\ ==}\newline {\tt 3.\ \ \ \ \ transformC\ :=}\newline {\tt 4.\ \ \ \ \ \ \ coord\ =\ "polar"\ =>\ polar2Complex}\newline {\tt 5.\ \ \ \ \ \ \ cartesian2Complex}\newline {\tt 6.\ \ \ \ \ cm\ :=\ makeConformalMap(f,\ transformC)}\newline {\tt 7.\ \ \ \ \ sp\ :=\ createThreeSpace()}\newline -{\tt 8.\ \ \ \ \ adaptGrid(sp,\ cm,\ rRange,\ tRange,\ rSteps,\ tSteps)}\newline +{\tt 8.\ \ \ \ \ +adaptGrid(sp,\ cm,\ rRange,\ tRange,\ rSteps,\ tSteps)}\newline {\tt 9.\ \ \ \ \ makeViewport3D(sp,\ "Conformal\ Map")}\newline \noindent -\userfun{riemannConformalDraw}{\it (f, rRange, tRange, rSteps, tSteps, coord)} -draws the image of the coordinate grid under {\it f} on the Riemann sphere. -The grid may be given in either polar or Cartesian coordinates. -Its arguments are the same as those for \userfun{conformalDraw}. +\userfun{riemannConformalDraw}{\it (f, rRange, tRange, rSteps, tSteps, +coord)} draws the image of the coordinate grid under {\it f} on the +Riemann sphere. The grid may be given in either polar or Cartesian +coordinates. Its arguments are the same as those for +\userfun{conformalDraw}. \noindent {\tt 10.\ \ riemannConformalDraw:(C->C,S,S,PI,PI,String)->VIEW3D}\newline {\tt 11.\ \ riemannConformalDraw(f,\ rRange,\ tRange,}\newline -{\tt 12.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rSteps,\ tSteps,\ coord)\ ==}\newline +{\tt 12.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +rSteps,\ tSteps,\ coord)\ ==}\newline {\tt 13.\ \ \ \ transformC\ :=}\newline {\tt 14.\ \ \ \ \ \ coord\ =\ "polar"\ =>\ polar2Complex}\newline {\tt 15.\ \ \ \ \ \ cartesian2Complex}\newline {\tt 16.\ \ \ \ sp\ :=\ createThreeSpace()}\newline {\tt 17.\ \ \ \ cm\ :=\ makeRiemannConformalMap(f,\ transformC)}\newline -{\tt 18.\ \ \ \ adaptGrid(sp,\ cm,\ rRange,\ tRange,\ rSteps,\ tSteps)}\newline -{\tt 19.\ \ \ \ curve(sp,[point\ [0,0,2.0@DFLOAT,0],point\ [0,0,2.0@DFLOAT,0]])}\newline -{\tt 20.\ \ \ \ makeViewport3D(sp,"Map\ on\ the\ Riemann\ Sphere")}\newline +{\tt 18.\ \ \ \ +adaptGrid(sp,\ cm,\ rRange,\ tRange,\ rSteps,\ tSteps)}\newline +{\tt 19.\ \ \ \ +curve(sp,[point\ [0,0,2.0@DFLOAT,0],point\ [0,0,2.0@DFLOAT,0]])}\newline +{\tt 20.\ \ \ \ +makeViewport3D(sp,"Map\ on\ the\ Riemann\ Sphere")}\newline {\tt 21.\ \ }\newline -{\tt 22.\ \ adaptGrid(sp,\ f,\ uRange,\ vRange,\ \ uSteps,\ vSteps)\ ==}\newline +{\tt 22.\ \ +adaptGrid(sp,\ f,\ uRange,\ vRange,\ \ uSteps,\ vSteps)\ ==}\newline {\tt 23.\ \ \ \ delU\ :=\ (hi(uRange)\ -\ lo(uRange))/uSteps}\newline {\tt 24.\ \ \ \ delV\ :=\ (hi(vRange)\ -\ lo(vRange))/vSteps}\newline {\tt 25.\ \ \ \ uSteps\ :=\ uSteps\ +\ 1;\ vSteps\ :=\ vSteps\ +\ 1}\newline @@ -55583,15 +49973,19 @@ Its arguments are the same as those for \userfun{conformalDraw}. {\tt 27.\ \ \ \ for\ i\ in\ 1..uSteps\ repeat}\newline {\tt 28.\ \ \ \ \ \ c\ :=\ curryLeft(f,u)}\newline {\tt 29.\ \ \ \ \ \ cf\ :=\ (t:DFLOAT):DFLOAT\ +->\ 0}\newline -{\tt 30.\ \ \ \ \ \ makeObject(c,vRange::SEG\ Float,colorFunction==cf,}\newline -{\tt 31.\ \ \ \ \ \ \ \ space\ ==\ sp,\ tubeRadius\ ==\ .02,\ tubePoints\ ==\ 6)}\newline +{\tt 30.\ \ \ \ \ \ +makeObject(c,vRange::SEG\ Float,colorFunction==cf,}\newline +{\tt 31.\ \ \ \ \ \ \ \ +space\ ==\ sp,\ tubeRadius\ ==\ .02,\ tubePoints\ ==\ 6)}\newline {\tt 32.\ \ \ \ \ \ u\ :=\ u\ +\ delU}\newline {\tt 33.\ \ \ \ v\ :=\ lo\ vRange}\newline {\tt 34.\ \ \ \ for\ i\ in\ 1..vSteps\ repeat}\newline {\tt 35.\ \ \ \ \ \ c\ :=\ curryRight(f,v)}\newline {\tt 36.\ \ \ \ \ \ cf\ :=\ (t:DFLOAT):DFLOAT\ +->\ 1}\newline -{\tt 37.\ \ \ \ \ \ makeObject(c,uRange::SEG\ Float,colorFunction==cf,}\newline -{\tt 38.\ \ \ \ \ \ \ \ space\ ==\ sp,\ tubeRadius\ ==\ .02,\ tubePoints\ ==\ 6)}\newline +{\tt 37.\ \ \ \ \ \ +makeObject(c,uRange::SEG\ Float,colorFunction==cf,}\newline +{\tt 38.\ \ \ \ \ \ \ \ +space\ ==\ sp,\ tubeRadius\ ==\ .02,\ tubePoints\ ==\ 6)}\newline {\tt 39.\ \ \ \ \ \ v\ :=\ v\ +\ delV}\newline {\tt 40.\ \ \ \ void()}\newline {\tt 41.\ \ }\newline @@ -55619,8 +50013,10 @@ Its arguments are the same as those for \userfun{conformalDraw}. {\tt 63.\ \ \ \ (u:DFLOAT,\ v:DFLOAT):R3\ +->}\newline {\tt 64.\ \ \ \ \ \ riemannTransform\ f\ transformC(u,\ v)}\newline {\tt 65.\ \ }\newline -{\tt 66.\ \ riemannSphereDraw:\ (S,\ S,\ PI,\ PI,\ String)\ ->\ VIEW3D}\newline -{\tt 67.\ \ riemannSphereDraw(rRange,tRange,rSteps,tSteps,coord)\ ==}\newline +{\tt 66.\ \ +riemannSphereDraw:\ (S,\ S,\ PI,\ PI,\ String)\ ->\ VIEW3D}\newline +{\tt 67.\ \ +riemannSphereDraw(rRange,tRange,rSteps,tSteps,coord)\ ==}\newline {\tt 68.\ \ \ \ transformC\ :=}\newline {\tt 69.\ \ \ \ \ \ coord\ =\ "polar"\ =>\ polar2Complex}\newline {\tt 70.\ \ \ \ \ \ cartesian2Complex}\newline @@ -55628,36 +50024,48 @@ Its arguments are the same as those for \userfun{conformalDraw}. {\tt 72.\ \ \ \ \ \ z1\ :=\ transformC(u,\ v)}\newline {\tt 73.\ \ \ \ \ \ point\ [real\ z1,\ imag\ z1,\ 0]}\newline {\tt 74.\ \ \ \ sp\ :=\ createThreeSpace()}\newline -{\tt 75.\ \ \ \ adaptGrid(sp,\ grid,\ rRange,\ tRange,\ rSteps,\ tSteps)}\newline -{\tt 76.\ \ \ \ connectingLines(sp,grid,rRange,tRange,rSteps,tSteps)}\newline -{\tt 77.\ \ \ \ makeObject(riemannSphere,0..2*\%pi,0..\%pi,space==sp)}\newline +{\tt 75.\ \ \ \ +adaptGrid(sp,\ grid,\ rRange,\ tRange,\ rSteps,\ tSteps)}\newline +{\tt 76.\ \ \ \ +connectingLines(sp,grid,rRange,tRange,rSteps,tSteps)}\newline +{\tt 77.\ \ \ \ +makeObject(riemannSphere,0..2*\%pi,0..\%pi,space==sp)}\newline {\tt 78.\ \ \ \ f\ :=\ (z:C):C\ +->\ z}\newline -{\tt 79.\ \ \ \ cm\ :=\ makeRiemannConformalMap(f,\ transformC)}\newline -{\tt 80.\ \ \ \ adaptGrid(sp,\ cm,\ rRange,\ tRange,\ rSteps,\ tSteps)}\newline +{\tt 79.\ \ \ \ +cm\ :=\ makeRiemannConformalMap(f,\ transformC)}\newline +{\tt 80.\ \ \ \ +adaptGrid(sp,\ cm,\ rRange,\ tRange,\ rSteps,\ tSteps)}\newline {\tt 81.\ \ \ \ makeViewport3D(sp,\ "Riemann\ Sphere")}\newline {\tt 82.\ \ \ }\newline -{\tt 83.\ \ connectingLines(sp,f,uRange,vRange,uSteps,vSteps)\ ==}\newline +{\tt 83.\ \ +connectingLines(sp,f,uRange,vRange,uSteps,vSteps)\ ==}\newline {\tt 84.\ \ \ \ delU\ :=\ (hi(uRange)\ -\ lo(uRange))/uSteps}\newline {\tt 85.\ \ \ \ delV\ :=\ (hi(vRange)\ -\ lo(vRange))/vSteps}\newline -{\tt 86.\ \ \ \ uSteps\ :=\ uSteps\ +\ 1;\ vSteps\ :=\ vSteps\ +\ 1}\newline +{\tt 86.\ \ \ \ +uSteps\ :=\ uSteps\ +\ 1;\ vSteps\ :=\ vSteps\ +\ 1}\newline {\tt 87.\ \ \ \ u\ :=\ lo\ uRange}\newline {\tt 88.\ \ \ \ for\ i\ in\ 1..uSteps\ repeat}\newline {\tt 89.\ \ \ \ \ \ v\ :=\ lo\ vRange}\newline {\tt 90.\ \ \ \ \ \ for\ j\ in\ 1..vSteps\ repeat}\newline {\tt 91.\ \ \ \ \ \ \ \ p1\ :=\ f(u,v)}\newline -{\tt 92.\ \ \ \ \ \ \ \ p2\ :=\ riemannTransform\ complex(p1.1,\ p1.2)}\newline +{\tt 92.\ \ \ \ \ \ \ \ +p2\ :=\ riemannTransform\ complex(p1.1,\ p1.2)}\newline {\tt 93.\ \ \ \ \ \ \ \ fun\ :=\ lineFromTo(p1,p2)}\newline {\tt 94.\ \ \ \ \ \ \ \ cf\ :=\ (t:DFLOAT):DFLOAT\ +->\ 3}\newline -{\tt 95.\ \ \ \ \ \ \ \ makeObject(fun,\ 0..1,space==sp,tubePoints==4,}\newline -{\tt 96.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ tubeRadius==0.01,colorFunction==cf)}\newline +{\tt 95.\ \ \ \ \ \ \ \ +makeObject(fun,\ 0..1,space==sp,tubePoints==4,}\newline +{\tt 96.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +tubeRadius==0.01,colorFunction==cf)}\newline {\tt 97.\ \ \ \ \ \ \ \ v\ :=\ v\ +\ delV}\newline {\tt 98.\ \ \ \ \ \ u\ :=\ u\ +\ delU}\newline {\tt 99.\ \ \ \ void()}\newline {\tt 100.\ \ }\newline {\tt 101.\ riemannSphere(u,v)\ ==\ }\newline {\tt 102.\ \ \ sv\ :=\ sin(v)}\newline -{\tt 103.\ \ \ 0.99@DFLOAT*(point\ [cos(u)*sv,sin(u)*sv,cos(v),0.0@DFLOAT])+}\newline -{\tt 104.\ \ \ \ \ point\ [0.0@DFLOAT,\ 0.0@DFLOAT,\ 1.0@DFLOAT,\ 4.0@DFLOAT]}\newline +{\tt 103.\ \ \ +0.99@DFLOAT*(point\ [cos(u)*sv,sin(u)*sv,cos(v),0.0@DFLOAT])+}\newline +{\tt 104.\ \ \ \ \ +point\ [0.0@DFLOAT,\ 0.0@DFLOAT,\ 1.0@DFLOAT,\ 4.0@DFLOAT]}\newline {\tt 105.\ \ }\newline {\tt 106.\ lineFromTo(p1,\ p2)\ ==}\newline {\tt 107.\ \ \ d\ :=\ p2\ -\ p1}\newline @@ -55672,16 +50080,7 @@ Its arguments are the same as those for \userfun{conformalDraw}. \end{page} @ -<>= -\newcommand{\ugFtknotTitle}{tknot.input} -\newcommand{\ugFtknotNumber}{G.9.} - -@ -\section{tknot.input} -\label{ugFtknotPage} -\index{pages!ugFtknotPage!ug21.ht} -\index{ug21.ht!pages!ugFtknotPage} -\index{ugFtknotPage!ug21.ht!pages} +\pagehead{ugFtknotPage}{ug21.ht}{tknot.input} <>= \begin{page}{ugFtknotPage}{G.9. tknot.input} \beginscroll @@ -55692,15 +50091,20 @@ The formula was derived by Larry Lambe. \noindent {\tt 1.\ \ \ )read\ ntube}\newline -{\tt 2.\ \ \ torusKnot:\ (DFLOAT,\ DFLOAT,\ DFLOAT,\ PI,\ PI)\ ->\ VIEW3D}\newline +{\tt 2.\ \ \ +torusKnot:\ (DFLOAT,\ DFLOAT,\ DFLOAT,\ PI,\ PI)\ ->\ VIEW3D}\newline {\tt 3.\ \ \ torusKnot(p,\ q\ ,r,\ uSteps,\ tSteps)\ ==}\newline {\tt 4.\ \ \ \ \ knot\ :=\ (t:DFLOAT):Point\ DFLOAT\ +->\ }\newline {\tt 5.\ \ \ \ \ \ \ fac\ :=\ 4/(2.2@DFLOAT-sin(q*t))}\newline -{\tt 6.\ \ \ \ \ \ \ fac\ *\ point\ [cos(p*t),\ sin(p*t),\ cos(q*t)]}\newline -{\tt 7.\ \ \ \ \ circle\ :=\ (u:DFLOAT,\ t:DFLOAT):\ Point\ DFLOAT\ +->}\newline +{\tt 6.\ \ \ \ \ \ \ +fac\ *\ point\ [cos(p*t),\ sin(p*t),\ cos(q*t)]}\newline +{\tt 7.\ \ \ \ \ +circle\ :=\ (u:DFLOAT,\ t:DFLOAT):\ Point\ DFLOAT\ +->}\newline {\tt 8.\ \ \ \ \ \ \ r\ *\ point\ [cos\ u,\ sin\ u]}\newline -{\tt 9.\ \ \ \ \ ntubeDrawOpt(knot,\ circle,\ 0..2*\%pi,\ 0..2*\%pi,}\newline -{\tt 10.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ var1Steps\ ==\ uSteps,\ var2Steps\ ==\ tSteps)}\newline +{\tt 9.\ \ \ \ \ +ntubeDrawOpt(knot,\ circle,\ 0..2*\%pi,\ 0..2*\%pi,}\newline +{\tt 10.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +var1Steps\ ==\ uSteps,\ var2Steps\ ==\ tSteps)}\newline {\tt 11.\ \ }\newline \noindent @@ -55711,28 +50115,15 @@ The formula was derived by Larry Lambe. \end{page} @ -<>= -\newcommand{\ugFntubeTitle}{ntube.input} -\newcommand{\ugFntubeNumber}{G.10.} - -@ -\section{ntube.input} -\label{ugFntubePage} -\begin{itemize} -\item ugFimagesFivePage \ref{ugFimagesFivePage} on -page~\pageref{ugFimagesFivePage} -\end{itemize} -\index{pages!ugFntubePage!ug21.ht} -\index{ug21.ht!pages!ugFntubePage} -\index{ugFntubePage!ug21.ht!pages} +\pagehead{ugFntubePage}{ug21.ht}{ntube.input} +\pageto{notitle}{ugFimagesFivePage} <>= \begin{page}{ugFntubePage}{G.10. ntube.input} \beginscroll -% -The functions in this file create generalized tubes (also known as generalized -cylinders). -These functions draw a 2-d curve in the normal -planes around a 3-d curve. + +The functions in this file create generalized tubes (also known as +generalized cylinders). These functions draw a 2-d curve in the +normal planes around a 3-d curve. \noindent @@ -55745,39 +50136,45 @@ planes around a 3-d curve. {\tt 7.\ \ \ Surface\ :=\ (DFLOAT,\ DFLOAT)\ ->\ R3}\newline {\tt 8.\ \ \ }\newline {\tt 9.\ \ \ FrenetFrame\ :=\ }\newline -{\tt 10.\ \ \ \ \ Record(value:R3,tangent:R3,normal:R3,binormal:R3)}\newline +{\tt 10.\ \ \ \ \ +Record(value:R3,tangent:R3,normal:R3,binormal:R3)}\newline {\tt 11.\ \ frame:\ FrenetFrame}\newline {\tt 12.\ \ }\newline \noindent -\userfun{ntubeDraw}{\it (spaceCurve, planeCurve,} -$u_0 .. u_1,$ $t_0 .. t_1)$ -draws {\it planeCurve} in the normal planes of {\it spaceCurve.} -The parameter $u_0 .. u_1$ specifies -the parameter range for {\it planeCurve} -and $t_0 .. t_1$ specifies the parameter range for {\it spaceCurve}. -Additionally, the plane curve function takes -a second parameter: the current parameter of {\it spaceCurve}. -This allows the plane curve to change shape -as it goes around the space curve. -See \downlink{``\ugFimagesFiveTitle''}{ugFimagesFivePage} -in Section \ugFimagesFiveNumber\ignore{ugFimagesFive} for an example of this. -% +\userfun{ntubeDraw}{\it (spaceCurve, planeCurve,} +$u_0 .. u_1,$ $t_0 .. t_1)$ draws +{\it planeCurve} in the normal planes of {\it +spaceCurve.} The parameter $u_0 .. u_1$ specifies the parameter range +for {\it planeCurve} and $t_0 .. t_1$ specifies the parameter range +for {\it spaceCurve}. Additionally, the plane curve function takes a +second parameter: the current parameter of {\it spaceCurve}. This +allows the plane curve to change shape as it goes around the space +curve. + \noindent -{\tt 1.\ \ \ ntubeDraw:\ (ThreeCurve,TwoCurve,S,S)\ ->\ VIEW3D}\newline -{\tt 2.\ \ \ ntubeDraw(spaceCurve,planeCurve,uRange,tRange)\ ==}\newline -{\tt 3.\ \ \ \ \ ntubeDrawOpt(spaceCurve,\ planeCurve,\ uRange,\ \_}\newline -{\tt 4.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ tRange,\ []\$List\ DROPT)}\newline +{\tt 1.\ \ \ +ntubeDraw:\ (ThreeCurve,TwoCurve,S,S)\ ->\ VIEW3D}\newline +{\tt 2.\ \ \ +ntubeDraw(spaceCurve,planeCurve,uRange,tRange)\ ==}\newline +{\tt 3.\ \ \ \ \ +ntubeDrawOpt(spaceCurve,\ planeCurve,\ uRange,\ \_}\newline +{\tt 4.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +tRange,\ []\$List\ DROPT)}\newline {\tt 5.\ \ \ \ }\newline -{\tt 6.\ \ \ ntubeDrawOpt:\ (ThreeCurve,TwoCurve,S,S,List\ DROPT)}\newline +{\tt 6.\ \ \ +ntubeDrawOpt:\ (ThreeCurve,TwoCurve,S,S,List\ DROPT)}\newline {\tt 7.\ \ \ \ \ \ \ ->\ VIEW3D}\newline -{\tt 8.\ \ \ ntubeDrawOpt(spaceCurve,planeCurve,uRange,tRange,l)\ ==}\newline +{\tt 8.\ \ \ +ntubeDrawOpt(spaceCurve,planeCurve,uRange,tRange,l)\ ==}\newline {\tt 9.\ \ \ \ \ \ \ \ \ \ \ \ \ }\newline -{\tt 10.\ \ \ \ delT:DFLOAT\ :=\ (hi(tRange)\ -\ lo(tRange))/10000}\newline +{\tt 10.\ \ \ \ +delT:DFLOAT\ :=\ (hi(tRange)\ -\ lo(tRange))/10000}\newline {\tt 11.\ \ \ \ oldT:DFLOAT\ :=\ lo(tRange)\ -\ 1}\newline -{\tt 12.\ \ \ \ fun\ :=\ ngeneralTube(spaceCurve,planeCurve,delT,oldT)}\newline +{\tt 12.\ \ \ \ +fun\ :=\ ngeneralTube(spaceCurve,planeCurve,delT,oldT)}\newline {\tt 13.\ \ \ \ draw(fun,\ uRange,\ tRange,\ l)}\newline {\tt 14.\ \ }\newline @@ -55794,13 +50191,15 @@ compute derivatives. {\tt 16.\ \ \ \ f0\ :=\ c(t)}\newline {\tt 17.\ \ \ \ f1\ :=\ c(t+delT)}\newline {\tt 18.\ \ \ \ t0\ :=\ f1\ -\ f0}\newline -{\tt 19.\ \ \ \ n0\ :=\ f1\ +\ f0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\newline +{\tt 19.\ \ \ \ +n0\ :=\ f1\ +\ f0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\newline {\tt 20.\ \ \ \ b\ :=\ cross(t0,\ n0)}\newline {\tt 21.\ \ \ \ n\ :=\ cross(b,t0)}\newline {\tt 22.\ \ \ \ ln\ :=\ length\ n}\newline {\tt 23.\ \ \ \ lb\ :=\ length\ b}\newline {\tt 24.\ \ \ \ ln\ =\ 0\ or\ lb\ =\ 0\ =>}\newline -{\tt 25.\ \ \ \ \ \ \ \ error\ "Frenet\ Frame\ not\ well\ defined"}\newline +{\tt 25.\ \ \ \ \ \ \ \ +error\ "Frenet\ Frame\ not\ well\ defined"}\newline {\tt 26.\ \ \ \ n\ :=\ (1/ln)*n}\newline {\tt 27.\ \ \ \ b\ :=\ (1/lb)*b}\newline {\tt 28.\ \ \ \ [f0,\ t0,\ n,\ b]\$FrenetFrame}\newline @@ -55816,12 +50215,16 @@ derivatives. {\it oldT} is used to hold the current value of the to ensure that frames are only computed once for each value of {\it t}. \noindent -{\tt 29.\ \ ngeneralTube:\ (ThreeCurve,\ TwoCurve,\ DFLOAT,\ DFLOAT)\ ->\ Surface}\newline -{\tt 30.\ \ ngeneralTube(spaceCurve,\ planeCurve,\ delT,\ oldT)\ ==}\newline +{\tt 29.\ \ +ngeneralTube:\ (ThreeCurve,\ TwoCurve,\ DFLOAT,\ DFLOAT)\ ->\ Surface} +\newline +{\tt 30.\ \ +ngeneralTube(spaceCurve,\ planeCurve,\ delT,\ oldT)\ ==}\newline {\tt 31.\ \ \ \ free\ frame}\newline {\tt 32.\ \ \ \ (v:DFLOAT,\ t:\ DFLOAT):\ R3\ +->}\newline {\tt 33.\ \ \ \ \ \ if\ (t\ \texht{$\sim$}{~}=\ oldT)\ then}\newline -{\tt 34.\ \ \ \ \ \ \ \ frame\ :=\ nfrenetFrame(spaceCurve,\ t,\ delT)}\newline +{\tt 34.\ \ \ \ \ \ \ \ +frame\ :=\ nfrenetFrame(spaceCurve,\ t,\ delT)}\newline {\tt 35.\ \ \ \ \ \ \ \ oldT\ :=\ t}\newline {\tt 36.\ \ \ \ \ \ p\ :=\ planeCurve(v,\ t)}\newline {\tt 37.\ \ \ \ \ \ frame.value\ +\ p.1*frame.normal\ +\ p.2*frame.binormal}\newline @@ -55834,16 +50237,7 @@ to ensure that frames are only computed once for each value of {\it t}. \end{page} @ -<>= -\newcommand{\ugFdhtriTitle}{dhtri.input} -\newcommand{\ugFdhtriNumber}{G.11.} - -@ -\section{dhtri.input} -\label{ugFdhtriPage} -\index{pages!ugFdhtriPage!ug21.ht} -\index{ug21.ht!pages!ugFdhtriPage} -\index{ugFdhtriPage!ug21.ht!pages} +\pagehead{ugFdhtriPage}{ug21.ht}{dhtri.input} <>= \begin{page}{ugFdhtriPage}{G.11. dhtri.input} \beginscroll @@ -55853,13 +50247,15 @@ a given triangle into another. \noindent -{\tt 1.\ \ \ tri2tri:\ (List\ Point\ DFLOAT,\ List\ Point\ DFLOAT)\ ->\ DHMATRIX(DFLOAT)}\newline +{\tt 1.\ \ \ tri2tri:\ (List\ Point\ DFLOAT, +\ List\ Point\ DFLOAT)\ ->\ DHMATRIX(DFLOAT)}\newline {\tt 2.\ \ \ tri2tri(t1,\ t2)\ ==}\newline {\tt 3.\ \ \ \ \ n1\ :=\ triangleNormal(t1)}\newline {\tt 4.\ \ \ \ \ n2\ :=\ triangleNormal(t2)}\newline {\tt 5.\ \ \ \ \ tet2tet(concat(t1,\ n1),\ concat(t2,\ n2))}\newline {\tt 6.\ \ \ \ }\newline -{\tt 7.\ \ \ tet2tet:\ (List\ Point\ DFLOAT,\ List\ Point\ DFLOAT)\ ->\ DHMATRIX(DFLOAT)}\newline +{\tt 7.\ \ \ tet2tet:\ (List\ Point\ DFLOAT, +\ List\ Point\ DFLOAT)\ ->\ DHMATRIX(DFLOAT)}\newline {\tt 8.\ \ \ tet2tet(t1,\ t2)\ ==}\newline {\tt 9.\ \ \ \ \ m1\ :=\ makeColumnMatrix\ t1}\newline {\tt 10.\ \ \ \ m2\ :=\ makeColumnMatrix\ t2}\newline @@ -55898,16 +50294,7 @@ a given triangle into another. \end{page} @ -<>= -\newcommand{\ugFtetraTitle}{tetra.input} -\newcommand{\ugFtetraNumber}{G.12.} - -@ -\section{tetra.input} -\label{ugFtetraPage} -\index{pages!ugFtetraPage!ug21.ht} -\index{ug21.ht!pages!ugFtetraPage} -\index{ugFtetraPage!ug21.ht!pages} +\pagehead{ugFtetraPage}{ug21.ht}{tetra.input} <>= \begin{page}{ugFtetraPage}{G.12. tetra.input} \beginscroll @@ -55931,12 +50318,14 @@ a given triangle into another. {\tt 10.\ \ \ }\newline {\tt 11.\ \ baseTriangle\ \ :=\ [p2,\ p1,\ p3]}\newline {\tt 12.\ \ }\newline -{\tt 13.\ \ mt\ \ :=\ [0.5@DFLOAT*(p2+p1),\ 0.5@DFLOAT*(p1+p3),\ 0.5@DFLOAT*(p3+p2)]}\newline +{\tt 13.\ \ mt\ \ :=\ +[0.5@DFLOAT*(p2+p1),\ 0.5@DFLOAT*(p1+p3),\ 0.5@DFLOAT*(p3+p2)]}\newline {\tt 14.\ \ }\newline {\tt 15.\ \ bt1\ :=\ [mt.1,\ p1,\ mt.2]}\newline {\tt 16.\ \ bt2\ :=\ [p2,\ mt.1,\ mt.3]}\newline {\tt 17.\ \ bt3\ :=\ [mt.2,\ p3,\ mt.3]}\newline -{\tt 18.\ \ bt4\ :=\ [0.5@DFLOAT*(p2+p4),\ 0.5@DFLOAT*(p1+p4),\ 0.5@DFLOAT*(p3+p4)]}\newline +{\tt 18.\ \ bt4\ :=\ +[0.5@DFLOAT*(p2+p4),\ 0.5@DFLOAT*(p1+p4),\ 0.5@DFLOAT*(p3+p4)]}\newline {\tt 19.\ \ }\newline {\tt 20.\ \ tt1\ :=\ tri2tri(baseTriangle,\ bt1)}\newline {\tt 21.\ \ tt2\ :=\ tri2tri(baseTriangle,\ bt2)}\newline @@ -55975,16 +50364,7 @@ a given triangle into another. \end{page} @ -<>= -\newcommand{\ugFantoineTitle}{antoine.input} -\newcommand{\ugFantoineNumber}{G.13.} - -@ -\section{antoine.input} -\label{ugFantoinePage} -\index{pages!ugFantoinePage!ug21.ht} -\index{ug21.ht!pages!ugFantoinePage} -\index{ugFantoinePage!ug21.ht!pages} +\pagehead{ugFantoinePage}{ug21.ht}{antoine.input} <>= \begin{page}{ugFantoinePage}{G.13. antoine.input} \beginscroll @@ -56008,14 +50388,14 @@ Thank you to Matthew Grayson at IBM's T.J Watson Research Center for the idea. \noindent -In order to draw Antoine rings, we take one ring, scale it down to -a smaller size, rotate it around its central axis, translate it -to the edge of the larger ring and rotate it around the edge to -a point corresponding to its count (there are 10 positions around -the edge of the larger ring). For each of these new rings we -recursively perform the operations, each ring becoming 10 smaller -rings. Notice how the \axiomType{DHMATRIX} operations are used to build up -the proper matrix composing all these transformations. +In order to draw Antoine rings, we take one ring, scale it down to a +smaller size, rotate it around its central axis, translate it to the +edge of the larger ring and rotate it around the edge to a point +corresponding to its count (there are 10 positions around the edge of +the larger ring). For each of these new rings we recursively perform +the operations, each ring becoming 10 smaller rings. Notice how the +\axiomType{DHMATRIX} operations are used to build up the proper matrix +composing all these transformations. \noindent @@ -56030,8 +50410,10 @@ the proper matrix composing all these transformations. {\tt 9.\ \ \ \ \ for\ i\ in\ 1..10\ repeat}\newline {\tt 10.\ \ \ \ \ \ tr\ :=\ tr\ +\ inc}\newline {\tt 11.\ \ \ \ \ \ inc\ :=\ -inc}\newline -{\tt 12.\ \ \ \ \ \ dh'\ :=\ dh*rotatez(t)*translate(tr,0.0@DFLOAT,0.0@DFLOAT)*}\newline -{\tt 13.\ \ \ \ \ \ \ \ \ \ \ \ \ rotatey(p)*scale(0.35@DFLOAT,\ 0.48@DFLOAT,\ 0.4@DFLOAT)}\newline +{\tt 12.\ \ \ \ \ \ +dh'\ :=\ dh*rotatez(t)*translate(tr,0.0@DFLOAT,0.0@DFLOAT)*}\newline +{\tt 13.\ \ \ \ \ \ \ \ \ \ \ \ \ +rotatey(p)*scale(0.35@DFLOAT,\ 0.48@DFLOAT,\ 0.4@DFLOAT)}\newline {\tt 14.\ \ \ \ \ \ drawRingsInner(s,\ n-1,\ dh')}\newline {\tt 15.\ \ \ \ \ \ t\ :=\ t\ +\ 36.0@DFLOAT}\newline {\tt 16.\ \ \ \ \ \ p\ :=\ p\ +\ 90.0@DFLOAT}\newline @@ -56040,12 +50422,15 @@ the proper matrix composing all these transformations. {\tt 19.\ \ drawRing(s,\ dh)\ ==}\newline {\tt 20.\ \ \ \ free\ torusRot}\newline {\tt 21.\ \ \ \ torusRot\ :=\ dh}\newline -{\tt 22.\ \ \ \ makeObject(torus,\ 0..2*\%pi,\ 0..2*\%pi,\ var1Steps\ ==\ 6,}\newline -{\tt 23.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ space\ ==\ s,\ var2Steps\ ==\ 15)}\newline +{\tt 22.\ \ \ \ +makeObject(torus,\ 0..2*\%pi,\ 0..2*\%pi,\ var1Steps\ ==\ 6,}\newline +{\tt 23.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +space\ ==\ s,\ var2Steps\ ==\ 15)}\newline {\tt 24.\ \ }\newline {\tt 25.\ \ torus(u\ ,v)\ ==}\newline {\tt 26.\ \ \ \ cu\ :=\ cos(u)/6}\newline -{\tt 27.\ \ \ \ torusRot*point\ [(1+cu)*cos(v),(1+cu)*sin(v),(sin\ u)/6]}\newline +{\tt 27.\ \ \ \ +torusRot*point\ [(1+cu)*cos(v),(1+cu)*sin(v),(sin\ u)/6]}\newline \noindent @@ -56055,16 +50440,7 @@ the proper matrix composing all these transformations. \end{page} @ -<>= -\newcommand{\ugFscherkTitle}{scherk.input} -\newcommand{\ugFscherkNumber}{G.14.} - -@ -\section{scherk.input} -\label{ugFscherkPage} -\index{pages!ugFscherkPage!ug21.ht} -\index{ug21.ht!pages!ugFscherkPage} -\index{ugFscherkPage!ug21.ht!pages} +\pagehead{ugFscherkPage}{ug21.ht}{scherk.input} <>= \begin{page}{ugFscherkPage}{G.14. scherk.input} \beginscroll @@ -56089,33 +50465,46 @@ by Michael Spivak, Publish Or Perish, Berkeley, 1979, pp. 249-252. {\tt 10.\ \ \ \ \ \ \ \ rem(i+j,\ 2)\ =\ 0\ =>\ 'iter}\newline {\tt 11.\ \ \ \ \ \ \ \ yOffset\ :=\ j*\%pi}\newline {\tt 12.\ \ \ \ \ \ \ \ drawOneScherk(space)}\newline -{\tt 13.\ \ \ \ makeViewport3D(space,\ "Scherk's\ Minimal\ Surface")}\newline +{\tt 13.\ \ \ \ +makeViewport3D(space,\ "Scherk's\ Minimal\ Surface")}\newline {\tt 14.\ \ }\newline {\tt 15.\ \ scherk1(u,v)\ ==}\newline {\tt 16.\ \ \ \ x\ :=\ cos(u)/exp(v)}\newline -{\tt 17.\ \ \ \ point\ [xOffset\ +\ acos(x),\ yOffset\ +\ u,\ v,\ abs(v)]}\newline +{\tt 17.\ \ \ \ +point\ [xOffset\ +\ acos(x),\ yOffset\ +\ u,\ v,\ abs(v)]}\newline {\tt 18.\ \ \ }\newline {\tt 19.\ \ scherk2(u,v)\ ==}\newline {\tt 20.\ \ \ \ x\ :=\ cos(u)/exp(v)}\newline -{\tt 21.\ \ \ \ point\ [xOffset\ -\ acos(x),\ yOffset\ +\ u,\ v,\ abs(v)]}\newline +{\tt 21.\ \ \ \ +point\ [xOffset\ -\ acos(x),\ yOffset\ +\ u,\ v,\ abs(v)]}\newline {\tt 22.\ \ \ }\newline {\tt 23.\ \ scherk3(u,v)\ ==\ }\newline {\tt 24.\ \ \ \ x\ :=\ exp(v)\ *\ cos(u)}\newline -{\tt 25.\ \ \ \ point\ [xOffset\ +\ u,\ yOffset\ +\ acos(x),\ v,\ abs(v)]}\newline +{\tt 25.\ \ \ \ +point\ [xOffset\ +\ u,\ yOffset\ +\ acos(x),\ v,\ abs(v)]}\newline {\tt 26.\ \ \ }\newline {\tt 27.\ \ scherk4(u,v)\ ==\ }\newline {\tt 28.\ \ \ \ x\ :=\ exp(v)\ *\ cos(u)}\newline -{\tt 29.\ \ \ \ point\ [xOffset\ +\ u,\ yOffset\ -\ acos(x),\ v,\ abs(v)]}\newline +{\tt 29.\ \ \ \ +point\ [xOffset\ +\ u,\ yOffset\ -\ acos(x),\ v,\ abs(v)]}\newline {\tt 30.\ \ \ }\newline {\tt 31.\ \ drawOneScherk(s)\ ==}\newline -{\tt 32.\ \ \ \ makeObject(scherk1,-\%pi/2..\%pi/2,0..\%pi/2,space==s,}\newline -{\tt 33.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ var1Steps\ ==\ 28,\ var2Steps\ ==\ 28)}\newline -{\tt 34.\ \ \ \ makeObject(scherk2,-\%pi/2..\%pi/2,0..\%pi/2,space==s,}\newline -{\tt 35.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ var1Steps\ ==\ 28,\ var2Steps\ ==\ 28)}\newline -{\tt 36.\ \ \ \ makeObject(scherk3,-\%pi/2..\%pi/2,-\%pi/2..0,space==s,}\newline -{\tt 37.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ var1Steps\ ==\ 28,\ var2Steps\ ==\ 28)}\newline -{\tt 38.\ \ \ \ makeObject(scherk4,-\%pi/2..\%pi/2,-\%pi/2..0,space==s,}\newline -{\tt 39.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ var1Steps\ ==\ 28,\ var2Steps\ ==\ 28)}\newline +{\tt 32.\ \ \ \ +makeObject(scherk1,-\%pi/2..\%pi/2,0..\%pi/2,space==s,}\newline +{\tt 33.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +var1Steps\ ==\ 28,\ var2Steps\ ==\ 28)}\newline +{\tt 34.\ \ \ \ +makeObject(scherk2,-\%pi/2..\%pi/2,0..\%pi/2,space==s,}\newline +{\tt 35.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +var1Steps\ ==\ 28,\ var2Steps\ ==\ 28)}\newline +{\tt 36.\ \ \ \ +makeObject(scherk3,-\%pi/2..\%pi/2,-\%pi/2..0,space==s,}\newline +{\tt 37.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +var1Steps\ ==\ 28,\ var2Steps\ ==\ 28)}\newline +{\tt 38.\ \ \ \ +makeObject(scherk4,-\%pi/2..\%pi/2,-\%pi/2..0,space==s,}\newline +{\tt 39.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +var1Steps\ ==\ 28,\ var2Steps\ ==\ 28)}\newline {\tt 40.\ \ \ \ void()}\newline \noindent @@ -56125,20 +50514,10 @@ by Michael Spivak, Publish Or Perish, Berkeley, 1979, pp. 249-252. @ \chapter{Hypertex Language Pages} -\section{hyperdoc.ht} -\subsection{Creating Hyperdoc Pages} -\label{Hyperdoc} -\begin{itemize} -\item ViewportPage \ref{ViewportPage} on -page~\pageref{ViewportPage} -\item BitMaps \ref{BitMaps} on -page~\pageref{BitMaps} -\item CPHelp \ref{CPHelp} on -page~\pageref{CPHelp} -\end{itemize} -\index{pages!Hyperdoc!hyperdoc.ht} -\index{hyperdoc.ht!pages!Hyperdoc} -\index{Hyperdoc!hyperdoc.ht!pages} +\pagehead{Hyperdoc}{hyperdoc.ht}{Creating Hyperdoc Pages} +\pageto{notitle}{ViewportPage} +\pageto{notitle}{BitMaps} +\pageto{notitle}{CPHelp} <>= \begin{page}{Hyperdoc}{Creating Hyperdoc Pages} @@ -56160,18 +50539,14 @@ facility for viewports. yuck. @ \section{htxadvpage1.ht} -\subsection{Input Areas} -\label{HTXAdvPage1} -See HTXAdvPage2 \ref{HTXAdvPage2} on page~\pageref{HTXAdvPage2} -\index{pages!HTXAdvPage1!htxadvpage1.ht} -\index{htxadvpage1.ht!pages!HTXAdvPage1} -\index{HTXAdvPage1!htxadvpage1.ht!pages} +\pagehead{HTXAdvPage1}{htxadvpage1.ht}{Input Areas} +\pageto{notitle}{HTXAdvPage2} <>= \begin{page}{HTXAdvPage1}{Input areas} \centerline{\fbox{{\tt \thispage}}}\newline \begin{scroll} -You have probably seen input areas in other \HyperName{} +You have probably seen input areas in other Hyperdoc pages. They provide {\it dynamic link} capabilities. Instead of having a choice between certain actions, they allow you to specify an action on--the--fly. @@ -56228,11 +50603,7 @@ Here are some examples. \end{page} @ -\subsection{HTXAdvPage1xPatch1 patch} -\label{HTXAdvPage1xPatch1} -\index{patch!HTXAdvPage1xPatch1!htxadvpage1.ht} -\index{htxadvpage1.ht!patch!HTXAdvPage1xPatch1} -\index{HTXAdvPage1xPatch1!htxadvpage1.ht!patch} +\pagehead{HTXAdvPage1xPatch1}{htxadvpage1.ht}{HTXAdvPage1xPatch1 patch} <>= \begin{patch}{HTXAdvPage1xPatch1} \begin{paste}{HTXAdvPage1xPaste1A}{HTXAdvPage1xPatch1A} @@ -56246,11 +50617,7 @@ Page name \tab{16} \end{patch} @ -\subsection{HTXAdvPage1xPatch1A patch} -\label{HTXAdvPage1xPatch1A} -\index{patch!HTXAdvPage1xPatch1A!htxadvpage1.ht} -\index{htxadvpage1.ht!patch!HTXAdvPage1xPatch1A} -\index{HTXAdvPage1xPatch1A!htxadvpage1.ht!patch} +\pagehead{HTXAdvPage1xPatch1A}{htxadvpage1.ht}{HTXAdvPage1xPatch1A patch} <>= \begin{patch}{HTXAdvPage1xPatch1A} \begin{paste}{HTXAdvPage1xPaste1B}{HTXAdvPage1xPatch1} @@ -56264,11 +50631,7 @@ Page name \tab{16} \end{patch} @ -\subsection{HTXAdvPage1xPatch2 patch} -\label{HTXAdvPage1xPatch2} -\index{patch!HTXAdvPage1xPatch2!htxadvpage1.ht} -\index{htxadvpage1.ht!patch!HTXAdvPage1xPatch2} -\index{HTXAdvPage1xPatch2!htxadvpage1.ht!patch} +\pagehead{HTXAdvPage1xPatch2}{htxadvpage1.ht}{HTXAdvPage1xPatch2 patch} <>= \begin{patch}{HTXAdvPage1xPatch2} \begin{paste}{HTXAdvPage1xPaste2A}{HTXAdvPage1xPatch2A} @@ -56282,11 +50645,7 @@ File to edit \tab{16} \end{patch} @ -\subsection{HTXAdvPage1xPatch2A patch} -\label{HTXAdvPage1xPatch2A} -\index{patch!HTXAdvPage1xPatch2A!htxadvpage1.ht} -\index{htxadvpage1.ht!patch!HTXAdvPage1xPatch2A} -\index{HTXAdvPage1xPatch2A!htxadvpage1.ht!patch} +\pagehead{HTXAdvPage1xPatch2A}{htxadvpage1.ht}{HTXAdvPage1xPatch2A patch} <>= \begin{patch}{HTXAdvPage1xPatch2A} \begin{paste}{HTXAdvPage1xPaste2B}{HTXAdvPage1xPatch2} @@ -56301,12 +50660,8 @@ File to edit \tab{16} @ \section{htxadvpage2.ht} -\subsection{Radio buttons} -\label{HTXAdvPage2} -See HTXAdvPage3 \ref{HTXAdvPage3} on page~\pageref{HTXAdvPage3} -\index{pages!HTXAdvPage2!htxadvpage2.ht} -\index{htxadvpage2.ht!pages!HTXAdvPage2} -\index{HTXAdvPage2!htxadvpage2.ht!pages} +\pagehead{HTXAdvPage2}{htxadvpage2.ht}{Radio buttons} +\pageto{notitle}{HTXAdvPage3} <>= \begin{page}{HTXAdvPage2}{Radio buttons} \centerline{\fbox{{\tt \thispage}}}\newline @@ -56317,30 +50672,33 @@ If you just want to make a multiple-choice type selection, why not use the {\it radio buttons}. You need to use bitmaps for the active areas (the buttons) but -\HyperName{} will keep track of the currently activated button. +Hyperdoc will keep track of the currently activated button. You can use this boolean information somewhere else on your page. The commands to use are: \beginImportant \newline -{\tt \\radioboxes\{{\it group name}\}\{{\it bitmap file1}\}\{{\it bitmap file0}\}} +{\tt \\radioboxes\{{\it group name}\}\{{\it bitmap file1}\} +\{{\it bitmap file0}\}} \newline -{\tt \\radiobox[{\it initial state}]\{{\it label}\}\{{\it group name}\}} +{\tt \\radiobox[{\it initial state}]\{{\it label}\} +\{{\it group name}\}} \newline {\tt \\boxvalue\{{\it label}\}} \endImportant The {\tt \\radioboxes} command sets up a group of {\tt \\radiobox} buttons. The {\it group name} is a label for the group. The filenames -for the bitmaps are specified in {\it bitmap file1} and {\it bitmap file0}. -The first one should denote an activated button and the second -a de-activated one. - -To display each button in a group, use {\tt \\radiobox}. -The {\it initial state} should be either {\tt 1} or {\tt 0} -depending on whether the button should first be displayed as activated or not. -The second {\it label} argument defines the name by which the -current state of the button can be referred to. -The third argument specifies which group this button belongs to. +for the bitmaps are specified in {\it bitmap file1} and +{\it bitmap file0}. +The first one should denote an activated button and the +second a de-activated one. + +To display each button in a group, use {\tt \\radiobox}. The +{\it initial state} should be either {\tt 1} or {\tt 0} depending on +whether the button should first be displayed as activated or not. The +second {\it label} argument defines the name by which the current +state of the button can be referred to. The third argument specifies +which group this button belongs to. The {\tt \\boxvalue} command can then be used in various actions. The value of it will @@ -56350,14 +50708,15 @@ In the example below, we use the {\tt \\htbmfile} macro defined in {\bf util.ht} so that we do not have to write the full bitmap file pathnames. -This is how we set up the group. The {\tt \\radioboxes} command does not display -anything. +This is how we set up the group. The {\tt \\radioboxes} command +does not display anything. Note that these commands cannot be included in a {\it patch}. This is why we display this time the source and the result at the same time. \beginImportant \newline -{\tt \\radioboxes\{group\}\{\\htbmfile\{pick\}\}\{\\htbmfile\{unpick\}\}}\newline +{\tt \\radioboxes\{group\} +\{\\htbmfile\{pick\}\}\{\\htbmfile\{unpick\}\}}\newline {\tt \\newline \\table\{}\newline {\tt \{\\radiobox[1]\{b1\}\{group\}\}}\newline {\tt \{\\radiobox[0]\{b2\}\{group\}\}}\newline @@ -56390,16 +50749,20 @@ a non--exclusive selection, try {\tt \\inputbox}. The syntax for this command is \beginImportant \newline -{\tt \\inputbox[{\it initial state}]\{{\it label}\}\{{\it bitmap file1}\}\{{\it bitmap file0}\}} +{\tt \\inputbox[{\it initial state}] +\{{\it label}\}\{{\it bitmap file1}\}\{{\it bitmap file0}\}} \endImportant There is no group command for these. \beginImportant \newline {\tt \\table\{}\newline -{\tt \{\\inputbox[1]\{c1\}\{\\htbmfile\{pick\}\}\{\\htbmfile\{unpick\}\}\}}\newline -{\tt \{\\inputbox\{c2\}\{\\htbmfile\{pick\}\}\{\\htbmfile\{unpick\}\}\}}\newline -{\tt \{\\inputbox[1]\{c3\}\{\\htbmfile\{pick\}\}\{\\htbmfile\{unpick\}\}\}\}}\newline +{\tt \{\\inputbox[1]\{c1\} +\{\\htbmfile\{pick\}\}\{\\htbmfile\{unpick\}\}\}}\newline +{\tt \{\\inputbox\{c2\} +\{\\htbmfile\{pick\}\}\{\\htbmfile\{unpick\}\}\}}\newline +{\tt \{\\inputbox[1]\{c3\} +\{\\htbmfile\{pick\}\}\{\\htbmfile\{unpick\}\}\}\}}\newline {\tt \\newline}\newline {\tt \\lispcommand\{lisp\}\{(pprint (list}\newline {\tt \\boxvalue\{c1\} \\boxvalue\{c2\} \\boxvalue\{c3\}))\}}\newline @@ -56434,12 +50797,8 @@ be deactivated. @ \section{htxadvpage3.ht} -\subsection{Macros} -\label{HTXAdvPage3} -See HTXAdvPage4 \ref{HTXAdvPage4} on page~\ref{HTXAdvPage4}p -\index{pages!HTXAdvPage3!htxadvpage3.ht} -\index{htxadvpage3.ht!pages!HTXAdvPage3} -\index{HTXAdvPage3!htxadvpage3.ht!pages} +\pagehead{HTXAdvPage3}{htxadvpage3.ht}{Macros} +\pageto{notitle}{HTXAdvPage4} <>= \begin{page}{HTXAdvPage3}{Macros} \centerline{\fbox{{\tt \thispage}}}\newline @@ -56448,24 +50807,27 @@ See HTXAdvPage4 \ref{HTXAdvPage4} on page~\ref{HTXAdvPage4}p Sometimes you may find yourself having to write -almost the same piece of \HyperName{} +almost the same piece of Hyperdoc text many times. Thankfully, there is a command to ease the work. It is the {\tt \\newcommand} command and provides -a macro facility for \HyperName{}. -In this way, you can give a short name to a sequence of \HyperName{} +a macro facility for Hyperdoc. +In this way, you can give a short name to a sequence of Hyperdoc text and use that name to include the sequence in your pages. The way this works is the following \beginImportant \newline -\centerline{{\tt \\newcommand\{\\{\it name}\}[{\it number of arguments}]\{{\it \HyperName{} text}\}}} +\centerline{{\tt \\newcommand\{\\{\it name}\} +[{\it number of arguments}]\{{\it Hyperdoc text}\}}} \endImportant and here is an example from {\bf util.ht} \beginImportant \newline -{\tt \\newcommand\{\\axiomSig\}[2]\{\\axiomType\{\#1\} \{\\tt ->\} \\axiomType\{\#2\}\}} +{\tt \\newcommand\{\\axiomSig\}[2] +\{\\axiomType\{\#1\} \{\\tt ->\} \\axiomType\{\#2\}\}} \newline -{\tt \\newcommand\{\\axiomType\}[1]\{\\lispdownlink\{\#1\}\{(|spadType| '|\#1|)\}\}} +{\tt \\newcommand\{\\axiomType\}[1] +\{\\lispdownlink\{\#1\}\{(|spadType| '|\#1|)\}\}} \endImportant You see that a macro's definition can invoke another. @@ -56494,14 +50856,11 @@ macros is to study the macros defined in It is highly probable that a good many of them will prove useful to you. Clever use of macros will allow you to -create \HyperName{} text that can be +create Hyperdoc text that can be formatted by other programs (such as TeX). The Axiom User Guide was written in such a way as to make translation in -\HyperName{} form and TeX form a mechanical process. - - - +Hyperdoc form and TeX form a mechanical process. \end{scroll} \beginmenu @@ -56512,19 +50871,15 @@ in such a way as to make translation in @ \section{htxadvpage4.ht} -\subsection{Patch and Paste} -\label{HTXAdvPage4} -See HTXAdvPage5 \ref{HTXAdvPage5} on page~\pageref{HTXAdvPage5} -\index{pages!HTXAdvPage4!htxadvpage4.ht} -\index{htxadvpage4.ht!pages!HTXAdvPage4} -\index{HTXAdvPage4!htxadvpage4.ht!pages} +\pagehead{HTXAdvPage4}{htxadvpage4.ht}{Patch and Paste} +\pageto{notitle}{HTXAdvPage5} <>= \begin{page}{HTXAdvPage4}{Patch and Paste} \centerline{\fbox{{\tt \thispage}}}\newline \begin{scroll} -A powerful \HyperName{} feature is +A powerful Hyperdoc feature is the ability to {\it replace} part of a displayed page with another part when an active area is clicked. The group commands @@ -56539,7 +50894,7 @@ refer to it, some way of specifying what it is to be replaced by and a {\it trigger} for the replacement. A {\it patch} is how we specify the second of these objects. -The {\it patch} is generally a sequence of \HyperName{} +The {\it patch} is generally a sequence of Hyperdoc text. If we want to have the option of returning to the original @@ -56697,27 +51052,24 @@ initial @ \section{htxadvpage5.ht} -\subsection{Axiom paste-ins} -\label{HTXAdvPage5} -See HTXAdvPage6 \ref{HTXAdvPage6} on page~\pageref{HTXAdvPage6} -\index{pages!HTXAdvPage5!htxadvpage5.ht} -\index{htxadvpage5.ht!pages!HTXAdvPage5} -\index{HTXAdvPage5!htxadvpage5.ht!pages} +\pagehead{HTXAdvPage5}{htxadvpage5.ht}{Axiom paste-ins} +\pageto{notitle}{HTXAdvPage6} <>= \begin{page}{HTXAdvPage5}{Axiom paste-ins} \centerline{\fbox{{\tt \thispage}}}\newline \begin{scroll} -The {\it paste} and {\it patch} facility (see \downlink{previous page}{HTXAdvPage4}) +The {\it paste} and {\it patch} facility +(see \downlink{previous page}{HTXAdvPage4}) is used to display (or hide) the Axiom output of an Axiom command ({\tt\\axiomcommand}) included in a -\HyperName{} page. +Hyperdoc page. A mechanism has been set up to {\it automatically} generate these paste-ins. It amounts to replacing an {\tt \\axiomcommand} by a {\tt \\pastecommand} in the -\HyperName{} page. +Hyperdoc page. In the case of a \axiomOp{draw} Axiom command , where the result is to create an interactive viewport, @@ -56730,7 +51082,8 @@ The {\tt \\pastegraph} command should be used only when the result of the associated Axiom operation is to {\it create} an interactive viewport. It is {\it not} necessarily appropriate for all commands whose result -is a \axiomType{Two{}Dimensional{}Viewport} or \axiomType{Three{}Dimensional{}Viewport}. +is a \axiomType{Two{}Dimensional{}Viewport} or +\axiomType{Three{}Dimensional{}Viewport}. The {\tt \\pastecommand} and {\tt \\pastegraph} are macros defined in {\bf util.ht}. @@ -56740,27 +51093,23 @@ There is no automatic paste-in generation facility for Axiom piles (the {\tt \\begin\{axiomsrc\}} command). -The automatic paste-in generation mechanism works -by invoking Axiom with a particular option. -\HyperName{} is also started automatically. It reads -the {\tt \\pastecommand} and {\tt \\pastegraph} -commands in all pages in a specified -{\bf somefile.ht} and passes them to -Axiom for evaluation. \HyperName{} -captures the output and writes it out (to a -file called {\bf somefile.pht}) as the body of -some {\it patch} definitions. The commands -encountered are written to a file -{\bf somefile.input} which you can {\tt )read} from an Axiom session. -It also creates directories for the graphics -images encountered. Those files and directories -will be written under the {\it current} directory. -The idea is that you then include the {\it patch} definitions -in {\bf somefile.pht} in your local database using {\bf htadd}. +The automatic paste-in generation mechanism works by invoking Axiom +with a particular option. Hyperdoc is also started automatically. It +reads the {\tt \\pastecommand} and {\tt \\pastegraph} commands in all +pages in a specified {\bf somefile.ht} and passes them to Axiom for +evaluation. Hyperdoc captures the output and writes it out (to a file +called {\bf somefile.pht}) as the body of some {\it patch} +definitions. The commands encountered are written to a file +{\bf somefile.input} which you can {\tt )read} from an Axiom session. +It also creates directories for the graphics images encountered. Those +files and directories will be written under the {\it current} +directory. The idea is that you then include the {\it patch} +definitions in {\bf somefile.pht} in your local database using {\bf +htadd}. You can try this feature now. Edit a file called, say, {\bf trypaste.ht} -in a directory, say {\bf /tmp}. Put the following \HyperName{} text +in a directory, say {\bf /tmp}. Put the following Hyperdoc text in it. \beginImportant \newline @@ -56797,7 +51146,7 @@ Axiom to finish. There is a modification you will wish to make to the {\bf trypaste.pht} file. -This is because the generated \HyperName{} text will assume that +This is because the generated Hyperdoc text will assume that the {\it viewport} data will be located in the {\it system} directory. \centerline{{\bf \env{AXIOM}/doc/viewports}} @@ -56820,7 +51169,7 @@ Issue to update the database. If you have provided a link to your pages from the {\tt RootPage} via the {\tt \\localinfo} macro, you should now -be able to start Axiom or \HyperName{} +be able to start Axiom or Hyperdoc and see the computed Axiom output whenever you click on the buttons to the left of each command. @@ -56835,12 +51184,8 @@ click on the buttons to the left of each command. @ \section{htxadvpage6.ht} -\subsection{Miscellaneous} -\label{HTXAdvPage6} -See HTXAdvTopPage \ref{HTXAdvTopPage} on page~\pageref{HTXAdvTopPage} -\index{pages!HTXAdvPage6!htxadvpage6.ht} -\index{htxadvpage6.ht!pages!HTXAdvPage6} -\index{HTXAdvPage6!htxadvpage6.ht!pages} +\pagehead{HTXAdvPage6}{htxadvpage6.ht}{Miscellaneous} +\pageto{notitle}{HTXAdvTopPage} <>= \begin{page}{HTXAdvPage6}{Miscellaneous} \centerline{\fbox{{\tt \thispage}}}\newline @@ -57013,19 +51358,13 @@ delimit the header and footer regions. @ \section{htxadvtoppage.ht} -\subsection{Advanced features in Hyperdoc} -\label{HTXAdvTopPage} -\begin{itemize} -\item HTXAdvPage1 \ref{HTXAdvPage1} on page~\pageref{HTXAdvPage1} -\item HTXAdvPage2 \ref{HTXAdvPage2} on page~\pageref{HTXAdvPage2} -\item HTXAdvPage3 \ref{HTXAdvPage3} on page~\pageref{HTXAdvPage3} -\item HTXAdvPage4 \ref{HTXAdvPage4} on page~\pageref{HTXAdvPage4} -\item HTXAdvPage5 \ref{HTXAdvPage5} on page~\pageref{HTXAdvPage5} -\item HTXAdvPage6 \ref{HTXAdvPage6} on page~\pageref{HTXAdvPage6} -\end{itemize} -\index{pages!HTXAdvTopPage!htxadvtoppage.ht} -\index{htxadvtoppage.ht!pages!HTXAdvTopPage} -\index{HTXAdvTopPage!htxadvtoppage.ht!pages} +\pagehead{HTXAdvTopPage}{htxadvtoppage.ht}{Advanced features in Hyperdoc} +\pageto{notitle}{HTXAdvPage1} +\pageto{notitle}{HTXAdvPage2} +\pageto{notitle}{HTXAdvPage3} +\pageto{notitle}{HTXAdvPage4} +\pageto{notitle}{HTXAdvPage5} +\pageto{notitle}{HTXAdvPage6} <>= \begin{page}{HTXAdvTopPage}{Advanced features in Hyperdoc} \centerline{\fbox{{\tt \thispage}}}\newline @@ -57043,12 +51382,8 @@ delimit the header and footer regions. @ \section{htxformatpage1.ht} -\subsection{Using the special characters} -\label{HTXFormatPage1} -See HTXFormatPage2 \ref{HTXFormatPage2} on page~\pageref{HTXFormatPage2} -\index{pages!HTXFormatPage1!htxformatpage1.ht} -\index{htxformatpage1.ht!pages!HTXFormatPage1} -\index{HTXFormatPage1!htxformatpage1.ht!pages} +\pagehead{HTXFormatPage1}{htxformatpage1.ht}{Using the special characters} +\pageto{notitle}{HTXFormatPage2} <>= \begin{page}{HTXFormatPage1}{Using the special characters} \centerline{\fbox{{\tt \thispage}}}\newline @@ -57066,10 +51401,10 @@ one of them. So, \endImportant -The {\tt \%} character is used in \HyperName{} as a comment marker. +The {\tt \%} character is used in Hyperdoc as a comment marker. If it is encountered on any line (without being preceded by the {\tt \\} character, -of course), \HyperName{} will ignore all remaining characters on that line. +of course), Hyperdoc will ignore all remaining characters on that line. \beginImportant \begin{paste}{HTXFormatPage1xPaste2}{HTXFormatPage1xPatch2} \pastebutton{HTXFormatPage1xPaste2}{Interpret} @@ -57079,14 +51414,9 @@ of course), \HyperName{} will ignore all remaining characters on that line. \end{paste} \endImportant -Earlier versions of \HyperName{} merged the words "indicate" and "a" +Earlier versions of Hyperdoc merged the words "indicate" and "a" into one word in the example above. This no longer occurs. -%The two lines below are from Release 1.x -%Note that you must leave a space at the beginning of the line after the comment, -%otherwise \HyperName{} would treat "indicate" and "a" as one word. - - \end{scroll} \beginmenu \menulink{Next -- Formatting without commands}{HTXFormatPage2} @@ -57142,17 +51472,13 @@ a steady rise @ \section{htxformatpage2.ht} -\subsection{Formatting without commands} -\label{HTXFormatPage2} -\index{pages!HTXFormatPage2!htxformatpage2.ht} -\index{htxformatpage2.ht!pages!HTXFormatPage2} -\index{HTXFormatPage2!htxformatpage2.ht!pages} +\pagehead{HTXFormatPage2}{htxformatpage2.ht}{Formatting without commands} <>= \begin{page}{HTXFormatPage2}{Formatting without commands} \centerline{\fbox{{\tt \thispage}}}\newline \begin{scroll} -\HyperName{} will interpret normal text in a {\em source file} +Hyperdoc will interpret normal text in a {\em source file} according to the following rules. \newline \menuitemstyle{\indentrel{4} Spaces mark the ends of words. The number of spaces between @@ -57369,17 +51695,13 @@ Finite{}Field{}Cyclic{}Group{}Extension{}ByPolynomial @ \section{htxformatpage3.ht} -\subsection{Using different fonts} -\label{HTXFormatPage3} -\index{pages!HTXFormatPage3!htxformatpage3.ht} -\index{htxformatpage3.ht!pages!HTXFormatPage3} -\index{HTXFormatPage3!htxformatpage3.ht!pages} +\pagehead{HTXFormatPage3}{htxformatpage3.ht}{Using different fonts} <>= \begin{page}{HTXFormatPage3}{Using different fonts} \centerline{\fbox{{\tt \thispage}}}\newline \begin{scroll} -You can use various fonts for the text. \HyperName{} makes +You can use various fonts for the text. Hyperdoc makes four {\em logical} fonts available to you: a {\em roman} font, an {\em emphasised} font, a {\em bold} font and a {\em typewriter} font. The actual font that corresponds to @@ -57411,8 +51733,8 @@ font every time it is used. \endImportant If you want to be sure that the emphasized font will be used, specify -the {\tt \\it} command. Similarly, you can explicitly select the roman font -with the {\tt \\rm} command. +the {\tt \\it} command. Similarly, you can explicitly select the roman +font with the {\tt \\rm} command. \beginImportant \begin{paste}{HTXFormatPage3xPaste3}{HTXFormatPage3xPatch3} \pastebutton{HTXFormatPage3xPaste3}{Interpret} @@ -57434,18 +51756,18 @@ individual characters, words, sentences etc. \endImportant -Currently, \HyperName{} does not adjust its internal spacing rules +Currently, Hyperdoc does not adjust its internal spacing rules to each font individually. This means that, for consistent results, users are encouraged to specify (in the defaults file) "character-cell" fonts that are not -too small or too large for \HyperName{}. Here is the correspondence +too small or too large for Hyperdoc. Here is the correspondence between the above font commands and the defaults names:\newline \menuitemstyle{RmFont \tab{26} {\tt \\rm} or {\tt \\em} }\newline \menuitemstyle{BoldFont \tab{26} {\tt \\bf} }\newline \menuitemstyle{EmphasizeFont \tab{26} {\tt \\it} or {\tt \\em} }\newline \menuitemstyle{Ttfont \tab{26} {\tt \\tt} }\newline -\HyperName{} uses two more logical fonts that can be specified by +Hyperdoc uses two more logical fonts that can be specified by the end user : AxiomFont and ActiveFont. However, you cannot explicitly use these fonts in your text. The ActiveFont is automatically used for active area text and the AxiomFont is reserved for @@ -57523,7 +51845,8 @@ this is {\em emphasised} text \begin{paste}{HTXFormatPage3xPaste3B}{HTXFormatPage3xPatch3} \pastebutton{HTXFormatPage3xPaste3B}{Interpret} \newline -{\tt \{\\em this is \{\\it emphasised\} text and this is \{\\rm roman\}\}} +{\tt \{\\em this is \{\\it emphasised\} text +and this is \{\\rm roman\}\}} \end{paste} \end{patch} @@ -57551,17 +51874,13 @@ this is {\em emphasised} text @ \section{htxformatpage4.ht} -\subsection{Indentation} -\label{HTXFormatPage4} -\index{pages!HTXFormatPage4!htxformatpage4.ht} -\index{htxformatpage4.ht!pages!HTXFormatPage4} -\index{HTXFormatPage4!htxformatpage4.ht!pages} +\pagehead{HTXFormatPage4}{htexformatpage4.ht}{Indentation} <>= \begin{page}{HTXFormatPage4}{Indentation} \centerline{\fbox{{\tt \thispage}}}\newline \begin{scroll} -You can control the indentation of lines of text in \HyperName{} with +You can control the indentation of lines of text in Hyperdoc with some useful commands. Use the command {\tt \\par} to force a new paragraph if you don't want to use the blank-line rule. The first line of a new paragraph @@ -57601,9 +51920,9 @@ Otherwise, it behaves in the same way as the {\tt \\indent} command. The {\tt \\centerline\{{\it some text}\}} command will center its argument between the current left and right margins. The argument of -the command should not be more than a paragraph of text and should not contain -any commands that change the left margin. The centered text will -start on a new line. +the command should not be more than a paragraph of text and should not +contain any commands that change the left margin. The centered text +will start on a new line. \beginImportant \begin{paste}{HTXFormatPage4xPaste3}{HTXFormatPage4xPatch3} \pastebutton{HTXFormatPage4xPaste3}{Interpret} @@ -57622,9 +51941,12 @@ the right of the current left margin. \pastebutton{HTXFormatPage4xPaste4}{Interpret} \newline {\tt \\indent\{5\}\\newline}\newline -{\tt Team A \\tab\{17\}Score\\tab\{25\}Team B\\tab\{42\}Score\\newline}\newline -{\tt 012345678901234567890123456789012345678901234567890\\newline}\newline -{\tt Green-Red\\tab\{17\}4\\tab\{25\}Blue-Black\\tab\{42\}6\\newline}\newline +{\tt Team A \\tab\{17\}Score\\tab\{25\}Team B\\tab\{42\}Score\\newline} +\newline +{\tt 012345678901234567890123456789012345678901234567890\\newline} +\newline +{\tt Green-Red\\tab\{17\}4\\tab\{25\}Blue-Black\\tab\{42\}6\\newline} +\newline {\tt \\indent\{0\}} \end{paste} \endImportant @@ -57632,7 +51954,7 @@ the right of the current left margin. If you wish to preserve the indentation of a piece of text you can use the {\tt verbatim} group command. Simply place a {\tt \\begin\{verbatim\}} and {\tt \\end\{verbatim\}} around -the text. Note that \HyperName{} commands will +the text. Note that Hyperdoc commands will not be interpreted within the {\tt verbatim} group. \beginImportant \begin{paste}{HTXFormatPage4xPaste5}{HTXFormatPage4xPatch5} @@ -57778,9 +52100,12 @@ Green-Red\tab{17}4\tab{25}Blue-Black\tab{42}6\newline \pastebutton{HTXFormatPage4xPaste4B}{Interpret} \newline {\tt \\indent\{5\}\\newline}\newline -{\tt Team A \\tab\{17\}Score\\tab\{25\}Team B\\tab\{42\}Score\\newline}\newline -{\tt 012345678901234567890123456789012345678901234567890\\newline}\newline -{\tt Green-Red\\tab\{17\}4\\tab\{25\}Blue-Black\\tab\{42\}6\\newline}\newline +{\tt Team A \\tab\{17\}Score\\tab\{25\}Team B\\tab\{42\}Score\\newline} +\newline +{\tt 012345678901234567890123456789012345678901234567890\\newline} +\newline +{\tt Green-Red\\tab\{17\}4\\tab\{25\}Blue-Black\\tab\{42\}6\\newline} +\newline {\tt \\indent\{0\}} \end{paste} \end{patch} @@ -57824,12 +52149,8 @@ This spacing will be preserved @ \section{htxformatpage5.ht} -\subsection{Creating Lists and Tables} -\label{HTXFormatPage5} -See HTXFormatPage6 \ref{HTXFormatPage6} on page~\pageref{HTXFormatPage6} -\index{pages!HTXFormatPage5!htxformatpage5.ht} -\index{htxformatpage5.ht!pages!HTXFormatPage5} -\index{HTXFormatPage5!htxformatpage5.ht!pages} +\pagehead{HTXFormatPage5}{htxformatpage5.ht}{Creating Lists and Tables} +\pageto{notitle}{HTXFormatPage6} <>= \begin{page}{HTXFormatPage5}{Creating Lists and Tables} \centerline{\fbox{{\tt \thispage}}}\newline @@ -57847,16 +52168,18 @@ than braces. The indentation of subsequent lines in an item is determined by the optional argument {\it some text} in the -{\tt \\begin\{items\}\[{\it some text}\]} -command. The optional argument is {\em not} displayed. Its width is calculated -and used to indent all subsequent lines in the group except from the -first line of each new item. This indentation rule applies to all text -{\em before} the first {\tt \\item} command as well. - -The {\tt \\item\[{\it some text}\]} command specifies the start of a new item. -The {\it some text} optional argument will be displayed in {\em bold} -font at the current left-page-margin. Then, the text following the command -will be displayed in normal fashion with the above indentation rule. +{\tt \\begin\{items\}\[{\it some text}\]} +command. The optional argument is {\em not} +displayed. Its width is calculated and used to indent all subsequent +lines in the group except from the first line of each new item. This +indentation rule applies to all text {\em before} the first +{\tt \\item} command as well. + +The {\tt \\item\[{\it some text}\]} command specifies the start of a +new item. The {\it some text} optional argument will be displayed in +{\em bold} font at the current left-page-margin. Then, the text +following the command will be displayed in normal fashion with the +above indentation rule. \beginImportant \begin{paste}{HTXFormatPage5xPaste1}{HTXFormatPage5xPatch1} \pastebutton{HTXFormatPage5xPaste1}{Interpret} @@ -57868,7 +52191,8 @@ will be displayed in normal fashion with the above indentation rule. {\tt \\item\[how wide am I\] fits nicely. Here is a \\newline new line in an item.}\newline {\tt \\item\[again\] to show another item}\newline -{\tt \\item\[\\\\tab\]\\tab\{0\} can be used \\tab\{15\} effectively}\newline +{\tt \\item\[\\\\tab\]\\tab\{0\} can be used \\tab\{15\} effectively} +\newline {\tt \\end\{items\}}\newline {\tt \\indent\{0\}}\newline \end{paste} @@ -57893,13 +52217,17 @@ You can nest list groups like the following example suggests. \newline {\tt \\begin\{items\}\[quitealot\]}\newline {\tt A nested list:}\newline -{\tt \\item\[The first\] item of an itemized list is on this line.}\newline -{\tt \\item\[The second\] item of the list starts here. It contains another}\newline +{\tt \\item\[The first\] item of an itemized list is on this line.} +\newline +{\tt \\item\[The second\] item of the list starts here. +It contains another}\newline {\tt list nested inside it.}\newline {\tt \\begin\{items\}\[somuchmore\]}\newline -{\tt \\item \[First\]\\tab\{0\}This is the first item of an enumerated}\newline +{\tt \\item \[First\]\\tab\{0\}This is the first item of an +enumerated}\newline {\tt list that is nested within the itemized list.}\newline -{\tt \\item \[Second\]\\tab\{0\}This is the second item of the inner list.}\newline +{\tt \\item \[Second\]\\tab\{0\}This is the second item of the +inner list.}\newline {\tt \\end\{items\}}\newline {\tt This is the rest of the second item of the outer list. It}\newline {\tt is no more interesting than any other part of the item.}\newline @@ -57909,7 +52237,8 @@ You can nest list groups like the following example suggests. \endImportant Another facility for presenting lists is the {\tt \\table} command. -The correct syntax for it is : {\tt \\table\{\{{\it item a}\} \{{\it item b}\} {\it ..}\}}. +The correct syntax for it is : {\tt \\table\{\{{\it item a}\} +\{{\it item b}\} {\it ..}\}}. The items in the braces will be placed in as many aligned columns as is possible for the current window dimensions or page width. If one item is particularly long there will probably be only one column @@ -57977,9 +52306,11 @@ new line will be indented {\tt \\begin\{items\}\[how wide am I\]}\newline {\tt Here we carry on but a \\newline} \newline {\tt new line will be indented } \newline -{\tt \\item\[how wide am I\] fits nicely. Here is a \\newline new line in an item.}\newline +{\tt \\item\[how wide am I\] fits nicely. +Here is a \\newline new line in an item.}\newline {\tt \\item\[again\] to show another item}\newline -{\tt \\item\[\\\\tab\]\\tab\{0\} can be used \\tab\{15\} effectively}\newline +{\tt \\item\[\\\\tab\]\\tab\{0\} can be used \\tab\{15\} effectively} +\newline {\tt \\end\{items\}}\newline {\tt \\indent\{0\}}\newline \end{paste} @@ -58026,15 +52357,20 @@ is no more interesting than any other part of the item. \newline {\tt \\begin\{items\}\[quitealot\]}\newline {\tt A nested list:}\newline -{\tt \\item\[The first\] item of an itemized list is on this line.}\newline -{\tt \\item\[The second\] item of the list starts here. It contains another}\newline +{\tt \\item\[The first\] item of an itemized list is on this line.} +\newline +{\tt \\item\[The second\] item of the list starts here. +It contains another}\newline {\tt list nested inside it.}\newline {\tt \\begin\{items\}\[somuchmore\]}\newline -{\tt \\item \[First\]\\tab\{0\}This is the first item of an enumerated}\newline +{\tt \\item \[First\]\\tab\{0\}This is the first item of an +enumerated}\newline {\tt list that is nested within the itemized list.}\newline -{\tt \\item \[Second\]\\tab\{0\}This is the second item of the inner list.}\newline +{\tt \\item \[Second\]\\tab\{0\}This is the second item of +the inner list.}\newline {\tt \\end\{items\}}\newline -{\tt This is the rest of the second item of the outer list. It}\newline +{\tt This is the rest of the second item of the outer list. It} +\newline {\tt is no more interesting than any other part of the item.}\newline {\tt \\item\[The third\] item of the list.}\newline {\tt \\end\{items\}}\newline @@ -58053,7 +52389,8 @@ is no more interesting than any other part of the item. \pastebutton{HTXFormatPage5xPaste3A}{Source} \newline \table{ -{Dark Orchid} {Dark Salmon} {Dark Sea Green} {Dark Slate Blue} {Dark Slate Gray} +{Dark Orchid} {Dark Salmon} {Dark Sea Green} {Dark Slate Blue} +{Dark Slate Gray} {Dark Turquoise} {Dark Violet} {Deep Pink} {Deep Sky Blue} {Dodger Blue} {Floral White} {Forest Green} {Ghost White} {Hot Pink} {Indian Red} {Lavender Blush} @@ -58085,11 +52422,7 @@ is no more interesting than any other part of the item. @ \section{htxformatpage6} -\subsection{Boxes and Lines} -\label{HTXFormatPage6} -\index{pages!HTXFormatPage6!htxformatpage6.ht} -\index{htxformatpage6.ht!pages!HTXFormatPage6} -\index{HTXFormatPage6!htxformatpage6.ht!pages} +\pagehead{HTXFormatPage6}{htxformatpage6.ht}{Boxes and Lines} <>= \begin{page}{HTXFormatPage6}{Boxes and Lines} \centerline{\fbox{{\tt \thispage}}}\newline @@ -58173,11 +52506,7 @@ across the window. This might be useful for added emphasis. @ \section{htxformatpage7} -\subsection{Micro-Spacing} -\label{HTXFormatPage7} -\index{pages!HTXFormatPage7!htxformatpage7.ht} -\index{htxformatpage7.ht!pages!HTXFormatPage7} -\index{HTXFormatPage7!htxformatpage7.ht!pages} +\pagehead{HTXFormatPage7}{htxformatpage7.ht}{Micro-Spacing} <>= \begin{page}{HTXFormatPage7}{Micro-Spacing} \centerline{\fbox{{\tt \thispage}}}\newline @@ -58187,12 +52516,12 @@ There are three commands that one can use to exercise finer control over the appearance of text on a page: {\tt \\space}, {\tt \\hspace} and {\tt \\vspace}. -The {\tt \\space\{{\it value}\}} command accepts an integer argument and simply -changes the position of the next character to the right or to the left. -A negative argument will move the next character to the left and a -positive one to the right. The unit of movement is {\it the width -of a character}. In this way one can overstrike characters to produce -various effects. +The {\tt \\space\{{\it value}\}} command accepts an integer argument +and simply changes the position of the next character to the right or +to the left. A negative argument will move the next character to the +left and a positive one to the right. The unit of movement is {\it the +width of a character}. In this way one can overstrike characters to +produce various effects. \beginImportant \begin{paste}{HTXFormatPage7xPaste1}{HTXFormatPage7xPatch1} @@ -58312,7 +52641,8 @@ x\hspace{1}x\hspace{2}x\hspace{3}x\hspace{4}x \begin{paste}{HTXFormatPage7xPaste2B}{HTXFormatPage7xPatch2} \pastebutton{HTXFormatPage7xPaste2B}{Interpret} \newline -{\tt x\\hspace\{-4\}x\\hspace\{-3\}x\\hspace\{-2\}x\\hspace\{-1\}x\%}\newline +{\tt x\\hspace\{-4\}x\\hspace\{-3\}x\\hspace\{-2\}x\\hspace\{-1\}x\%} +\newline {\tt x\\hspace\{1\}x\\hspace\{2\}x\\hspace\{3\}x\\hspace\{4\}x} \end{paste} \end{patch} @@ -58365,11 +52695,7 @@ R\space{-1}~\vspace{-18}æv\vspace{-32} @ \section{htxformatpage8} -\subsection{Bitmaps and Images} -\label{HTXFormatPage8} -\index{pages!HTXFormatPage8!htxformatpage8.ht} -\index{htxformatpage8.ht!pages!HTXFormatPage8} -\index{HTXFormatPage8!htxformatpage8.ht!pages} +\pagehead{HTXFormatPage8}{htxformatpage8.ht}{Bitmaps and Images} <>= \begin{page}{HTXFormatPage8}{Bitmaps and Images} \centerline{\fbox{{\tt \thispage}}}\newline @@ -58378,7 +52704,7 @@ R\space{-1}~\vspace{-18}æv\vspace{-32} The commands {\tt \\inputbitmap\{{\it filename}\}} and {\tt \\inputimage\{{\it filename}\}} allow you to include an X11 bitmap or an -Axiom-generated viewport in a \HyperName{} +Axiom-generated viewport in a Hyperdoc page. In the case of the {\tt \\inputbitmap} command @@ -58393,12 +52719,12 @@ of an X11 bitmap file. \end{paste} \endImportant -The {\it filename} parameter of the {\tt \\inputimage} -command must be the full pathname of a {\it compressed XPM image} file without the name extensions. -\HyperName{} always adds ".xpm.Z" to whatever filename you give and looks for the augmented filename. -Such files can be generated by Axiom command -\axiomOp{write} with the {\tt "image"} or {\tt "pixmap"} -options. +The {\it filename} parameter of the {\tt \\inputimage} command must be +the full pathname of a {\it compressed XPM image} file without the +name extensions. Hyperdoc always adds ".xpm.Z" to whatever filename +you give and looks for the augmented filename. Such files can be +generated by Axiom command \axiomOp{write} with the {\tt "image"} or +{\tt "pixmap"} options. \beginImportant \begin{paste}{HTXFormatPage8xPaste2}{HTXFormatPage8xPatch2} @@ -58485,32 +52811,28 @@ or \begin{paste}{HTXFormatPage8xPaste2B}{HTXFormatPage8xPatch2} \pastebutton{HTXFormatPage8xPaste2B}{Interpret} \newline -{\tt \\inputimage\{\env{AXIOM}/doc/viewports/ugProblemNumericPage30.view/image\}} +{\tt \\inputimage +\{\env{AXIOM}/doc/viewports/ugProblemNumericPage30.view/image\}} \end{paste} \end{patch} @ \section{htxformattoppage.ht} -\subsection{Formatting in Hyperdoc} -\begin{itemize} -\item HTXFormatPage1 \ref{HTXFormatPage1} on page~\pageref{HTXFormatPage1} -\item HTXFormatPage2 \ref{HTXFormatPage2} on page~\pageref{HTXFormatPage2} -\item HTXFormatPage3 \ref{HTXFormatPage3} on page~\pageref{HTXFormatPage3} -\item HTXFormatPage4 \ref{HTXFormatPage4} on page~\pageref{HTXFormatPage4} -\item HTXFormatPage5 \ref{HTXFormatPage5} on page~\pageref{HTXFormatPage5} -\item HTXFormatPage6 \ref{HTXFormatPage6} on page~\pageref{HTXFormatPage6} -\item HTXFormatPage7 \ref{HTXFormatPage7} on page~\pageref{HTXFormatPage7} -\item HTXFormatPage8 \ref{HTXFormatPage8} on page~\pageref{HTXFormatPage8} -\end{itemize} -\label{HTXFormatTopPage} -\index{pages!HTXFormatTopPage!htxformattoppage.ht} -\index{htxformattoppage.ht!pages!HTXFormatTopPage} -\index{HTXFormatTopPage!htxformattoppage.ht!pages} +\pagehead{HTXFormatTopPage}{htxformattoppage.ht} +{Formatting in Hyperdoc} +\pageto{notitle}{HTXFormatPage1} +\pageto{notitle}{HTXFormatPage2} +\pageto{notitle}{HTXFormatPage3} +\pageto{notitle}{HTXFormatPage4} +\pageto{notitle}{HTXFormatPage5} +\pageto{notitle}{HTXFormatPage6} +\pageto{notitle}{HTXFormatPage7} +\pageto{notitle}{HTXFormatPage8} <>= \begin{page}{HTXFormatTopPage}{Formatting in Hyperdoc} \centerline{\fbox{{\tt \thispage}}}\newline -\HyperName{} offers various facilities for formatting text and images. +Hyperdoc offers various facilities for formatting text and images. You can learn about these facilities by clicking on the topics below. \begin{scroll} \beginmenu @@ -58529,52 +52851,47 @@ You can learn about these facilities by clicking on the topics below. @ \section{htxintropage1.ht} -\subsection{What Hyperdoc does} -\label{HTXIntroPage1} -\begin{itemize} -\item HTXIntroPage2 \ref{HTXIntroPage2} on page~\pageref{HTXIntroPage2} -\item ugHyperPage \ref{ugHyperPage} on page~\pageref{ugHyperPage} -\end{itemize} -\index{pages!HTXIntroPage1!htxintropage1.ht} -\index{htxintropage1.ht!pages!HTXIntroPage1} -\index{HTXIntroPage1!htxintropage1.ht!pages} +\pagehead{HTXIntroPage1}{htxintropage1.ht}{What Hyperdoc does} +\pageto{notitle}{HTXIntroPage2} +\pageto{notitle}{ugHyperPage} <>= \begin{page}{HTXIntroPage1}{What Hyperdoc does} \centerline{\fbox{{\tt \thispage}}}\newline \beginscroll -Take a close look at the objects in the \HyperName{} window you are now reading. -Most of them are text. Resize the window using the window manager -facilities. The text is reformatted to fit the window -border. This action is performed by \HyperName{}. At the simplest -level, it provides a method for {\em formatting} text in a window. -In fact, it can place other things on the window as well, such as -bitmaps or color images. The {\em buttons} you see at either -side at the top of the window are bitmaps. - -Move the cursor so that it rests on one of those buttons. You notice that -the cursor has changed appearance. This indicates that there is an action associated -with the button. This action will be performed when you click the mouse button -over the {\em active area}. If you are familiar with \HyperName{}, you know -that the active area can be words, bitmaps, images or {\em input areas}. In -fact, anything that can be displayed in a \HyperName{} window can be an -active area. - -So, what can the action associated with an active area be? \HyperName{} -allows quite a bit of freedom in defining that action. We will have a close -look at this issue \downlink{later on}{HTXLinkTopPage}. For now, recall -the various actions that you have encountered so far --- executing Axiom -commands, popping up new windows, providing parameters for other active areas, -and replacing or changing the contents of the window. The most common action -is to bring up some \HyperName{} text in the same or a different window. -This lets us create {\em links} between pieces of text and images. A -system with such capability is usually called a {\em hypertext} system. -\HyperName{} is in fact much more. +Take a close look at the objects in the Hyperdoc window you are now +reading. Most of them are text. Resize the window using the window +manager facilities. The text is reformatted to fit the window +border. This action is performed by Hyperdoc. At the simplest level, +it provides a method for {\em formatting} text in a window. In fact, +it can place other things on the window as well, such as bitmaps or +color images. The {\em buttons} you see at either side at the top of +the window are bitmaps. + +Move the cursor so that it rests on one of those buttons. You notice +that the cursor has changed appearance. This indicates that there is +an action associated with the button. This action will be performed +when you click the mouse button over the {\em active area}. If you are +familiar with Hyperdoc, you know that the active area can be words, +bitmaps, images or {\em input areas}. In fact, anything that can be +displayed in a Hyperdoc window can be an active area. + +So, what can the action associated with an active area be? Hyperdoc +allows quite a bit of freedom in defining that action. We will have a +close look at this issue \downlink{later on}{HTXLinkTopPage}. For now, +recall the various actions that you have encountered so far --- +executing Axiom commands, popping up new windows, providing parameters +for other active areas, and replacing or changing the contents of the +window. The most common action is to bring up some Hyperdoc text in +the same or a different window. This lets us create {\em links} +between pieces of text and images. A system with such capability is +usually called a {\em hypertext} system. Hyperdoc is in fact much +more. \endscroll \beginmenu -\menulink{Next -- How \HyperName{} does it}{HTXIntroPage2} -\menuwindowlink{Review some features of \HyperName{}}{ugHyperPage} +\menulink{Next -- How Hyperdoc does it}{HTXIntroPage2} +\menuwindowlink{Review some features of Hyperdoc}{ugHyperPage} \endmenu \helppage{ugHyperPage} @@ -58582,52 +52899,46 @@ system with such capability is usually called a {\em hypertext} system. @ \section{htxintropage2.ht} -\subsection{How Hyperdoc does it} -\label{HTXIntroPage2} -See HTXIntroPage3 \ref{HTXIntroPage3} on page~\pageref{HTXIntroPage3} -\index{pages!HTXIntroPage2!htxintropage2.ht} -\index{htxintropage2.ht!pages!HTXIntroPage2} -\index{HTXIntroPage2!htxintropage2.ht!pages} +\pagehead{HTXIntroPage2}{htxintropage2.ht}{How Hyperdoc does it} +\pageto{notitle}{HTXIntroPage3} <>= \begin{page}{HTXIntroPage2}{How Hyperdoc does it} {\centerline{\fbox{{\tt \thispage}}}\newline} \beginscroll -\HyperName{} can read the {\em hypertext} information from standard text -files. This means that you can create or change this information with any -text editor. Once this information has been entered into the files, a -special program, called {\bf htadd}, scans these files and produces -a database (another file called {\bf ht.db}) of {\em objects} -encountered in the files. \HyperName{} -consults this database when it first starts and so knows where it might -find the definitions of these objects. You can maintain several such -databases on different directories. You indicate which database you -want \HyperName{} to consult by setting an {\em environment variable} -called {\bf HTPATH}. +Hyperdoc can read the {\em hypertext} information from standard text +files. This means that you can create or change this information with +any text editor. Once this information has been entered into the +files, a special program, called {\bf htadd}, scans these files and +produces a database (another file called {\bf ht.db}) of {\em objects} +encountered in the files. Hyperdoc consults this database when it +first starts and so knows where it might find the definitions of these +objects. You can maintain several such databases on different +directories. You indicate which database you want Hyperdoc to consult +by setting an {\em environment variable} called {\bf HTPATH}. In general, hypertext must obviously use some kind of special (that is, non-textual) marks for all the extra functionality it provides. In -\HyperName{}, these marks are some special characters --- special +Hyperdoc, these marks are some special characters --- special in the sense that they are not interpreted as ordinary displayable text. These characters, however, are part of the standard ASCII set. There is also a way to display these special characters as text . -The \HyperName{} special characters are : +The Hyperdoc special characters are : \beginImportant -\noindent{\em Special Characters}: {\tt \table{{\$}{\\}{\{}{\}}{\[}{\]}{\%}{\#}}} +\noindent{\em Special Characters}: +{\tt \table{{\$}{\\}{\{}{\}}{\[}{\]}{\%}{\#}}} \endImportant - - -\HyperName{} uses the special characters to distinguish between +Hyperdoc uses the special characters to distinguish between {\em text} and {\em commands} (by {\em text}, we mean here anything displayable). The commands are instructions to -\HyperName{} to treat some text in a particular way. Some commands -define special \HyperName{} objects. The most important objects +Hyperdoc to treat some text in a particular way. Some commands +define special Hyperdoc objects. The most important objects are {\em pages}, {\em patches}, and {\em macros}. A {\em page} is a description of the contents of a -\HyperName{} window. A {\em patch} is a portion of a page. -A {\em macro} is a user-defined new \HyperName{} command. +Hyperdoc window. A {\em patch} is a portion of a page. +A {\em macro} is a user-defined new Hyperdoc command. Some commands allow special text {\em formatting} and others associate some text with an action. @@ -58644,17 +52955,10 @@ some simple text into it. @ \section{htxintropage3.ht} -\subsection{A simple text page} -\begin{itemize} -\item HTXLinkPage6 \ref{HTXLinkPage6} on page~\pageref{HTXLinkPage6} -\item HTXTryPage \ref{HTXTryPage} on page~\pageref{HTXTryPage} -\item HTXFormatTopPage \ref{HTXFormatTopPage} on -page~\pageref{HTXFormatTopPage} -\end{itemize} -\label{HTXIntroPage3} -\index{pages!HTXIntroPage3!htxintropage3.ht} -\index{htxintropage3.ht!pages!HTXIntroPage3} -\index{HTXIntroPage3!htxintropage3.ht!pages} +\pagehead{HTXIntroPage3}{htxintropage3.ht}{A simple text page} +\pageto{notitle}{HTXLinkPage6} +\pageto{notitle}{HTXTryPage} +\pageto{notitle}{HTXFormatTopPage} <>= \begin{page}{HTXIntroPage3}{A simple text page} {\centerline{\fbox{{\tt \thispage}}}\newline} @@ -58683,16 +52987,17 @@ parameters} to the command. The first parameter (the word {\tt page}) specifies this as a page definition command. The second parameter can be any single unbroken word consisting of -alphanumeric characters only, and specifies the name of the page by which -it can be referred to by other commands. You should choose -this internal name with care so as to avoid potential conflict with -page names that are defined by the Axiom system. This caveat only -applies in the case where you have started \HyperName{} with the Axiom -database --- see \downlink{later on}{HTXLinkPage6}. It is suggested that -the page names you define start with the letters {\tt UX} (standing for -{\tt U}ser e{\tt X}tensions). You can have a look at the Axiom -system database file {\centerline{\bf \env{AXIOM}/doc/hypertex/pages/ht.db} } -which contains the names of all pages, macros and patches used by Axiom. +alphanumeric characters only, and specifies the name of the page by +which it can be referred to by other commands. You should choose this +internal name with care so as to avoid potential conflict with page +names that are defined by the Axiom system. This caveat only applies +in the case where you have started Hyperdoc with the Axiom database +--- see \downlink{later on}{HTXLinkPage6}. It is suggested that the +page names you define start with the letters {\tt UX} (standing for +{\tt U}ser e{\tt X}tensions). You can have a look at the Axiom system +database file {\centerline{\bf \env{AXIOM}/doc/hypertex/pages/ht.db} } +which contains the names of all pages, macros and patches used by +Axiom. The third parameter specifies a title for the page. The title of a page is the area at the very top @@ -58702,15 +53007,15 @@ title. As an example, {\em this} page's declaration is like this:\newline {\tt \\begin\{page\}\{\thispage\}\{A simple text page\}} -Everything you type between the {\tt \\begin\{page\}} command and the next -{\tt \\end\{page\}} command will become the body of the page. It is -an error to insert another {\tt \\begin\{page\}} between the two, that is, -this group command cannot be nested. +Everything you type between the {\tt \\begin\{page\}} command and the +next {\tt \\end\{page\}} command will become the body of the page. It +is an error to insert another {\tt \\begin\{page\}} between the two, +that is, this group command cannot be nested. There is another useful group command that should be mentioned here --- the {\em scroll} command. It controls the portion of the page that -will be scrollable. \HyperName{} will split a page in three sections: -a {\em header}, a {\em scroll region} and a {\em footer}. \HyperName{} +will be scrollable. Hyperdoc will split a page in three sections: +a {\em header}, a {\em scroll region} and a {\em footer}. Hyperdoc will always try to keep the header and footer regions visible on the page; the header at the top and the footer at the bottom. The middle scroll region will be truncated and a scroll bar will be automatically @@ -58741,9 +53046,9 @@ portion of the page is truncated. You are now ready to experiment with a page of your own. If you just want to display some text on a page, you don't need any other -\HyperName{} commands. Just make sure that the text you type for the +Hyperdoc commands. Just make sure that the text you type for the title, header, scroll and footer regions does not contain (for the -moment) any of the \HyperName{} special characters. +moment) any of the Hyperdoc special characters. \end{scroll} \beginmenu @@ -58755,40 +53060,34 @@ moment) any of the \HyperName{} special characters. @ \section{htxintrotoppage.ht} -\subsection{First Steps} -\begin{itemize} -\item HTXIntroPage1 \ref{HTXIntroPage1} on page~\pageref{HTXIntroPage1} -\item HTXIntroPage2 \ref{HTXIntroPage2} on page~\pageref{HTXIntroPage2} -\item HTXIntroPage3 \ref{HTXIntroPage3} on page~\pageref{HTXIntroPage3} -\end{itemize} -\label{HTXIntroTopPage} -\index{pages!HTXIntroTopPage!htxintrotoppage.ht} -\index{htxintrotoppage.ht!pages!HTXIntroTopPage} -\index{HTXIntroTopPage!htxintrotoppage.ht!pages} +\pagehead{HTXIntroTopPage}{htxintrotoppage.ht}{First Steps} +\pageto{notitle}{HTXIntroPage1} +\pageto{notitle}{HTXIntroPage2} +\pageto{notitle}{HTXIntroPage3} <>= \begin{page}{HTXIntroTopPage}{First Steps} \centerline{\fbox{{\tt \thispage}}}\newline \beginscroll -\HyperName{} is both a way of presenting information and +Hyperdoc is both a way of presenting information and a customisable front-end. Axiom uses it for its own purpose as a front-end and documentation system. -\HyperName{} has special facilities that allow it to interact +Hyperdoc has special facilities that allow it to interact very closely with Axiom. The \Browse{} facility, the Basic Commands section and the ability to execute Axiom commands -by clicking on \HyperName{} text are witness to this. +by clicking on Hyperdoc text are witness to this. -These pages will show you the features of \HyperName{} that might +These pages will show you the features of Hyperdoc that might make it appropriate for your own use in, for example, providing documentation for Axiom code that you write or some other purpose. It is recommended that you get familiar with the {\em use} of -\HyperName{} before proceeding. +Hyperdoc before proceeding. \endscroll \beginmenu -\menudownlink{What \HyperName{} does}{HTXIntroPage1} -\menudownlink{How \HyperName{} does it}{HTXIntroPage2} +\menudownlink{What Hyperdoc does}{HTXIntroPage1} +\menudownlink{How Hyperdoc does it}{HTXIntroPage2} \menudownlink{Define a simple text page}{HTXIntroPage3} \endmenu @@ -58796,47 +53095,44 @@ It is recommended that you get familiar with the {\em use} of @ \section{htxlinkpage1.ht} -\subsection{Linking to a named page} -\label{HTXLinkPage1} -\begin{itemize} -\item HTXLinkTopPage \ref{HTXLinkTopPage} on page~\pageref{HTXLinkTopPage} -\item TestHelpPage \ref{TestHelpPage} on page~\pageref{TestHelpPage} -\item HTXLinkPage2 \ref{HTXLinkPage2} on page~\pageref{HTXLinkPage2} -\end{itemize} -\index{pages!HTXLinkPage1!htxlinkpage1.ht} -\index{htxlinkpage1.ht!pages!HTXLinkPage1} -\index{HTXLinkPage1!htxlinkpage1.ht!pages} +\pagehead{HTXLinkPage1}{htxlinkpage1.ht}{Linking to a named page} +\pageto{notitle}{HTXLinkTopPage} +\pageto{notitle}{TestHelpPage} +\pageto{notitle}{HTXLinkPage2} <>= \begin{page}{HTXLinkPage1}{Linking to a named page} \centerline{\fbox{{\tt \thispage}}}\newline \begin{scroll} -In \HyperName{}, hypertext links are specified by different -flavors of the {\tt \\link} command. These commands take two -arguments. One argument specifies the active area, that -is, the {\it trigger} of the link. The second argument specifies the -{\it target} of the link, that is, a page. The trigger can be quite arbitrary -\HyperName{} text and can include images or whole paragraphs. The trigger -text will be formatted in the normal fashion but its default font will be -the font specified by the ActiveFont resource. +In Hyperdoc, hypertext links are specified by different flavors of the +{\tt \\link} command. These commands take two arguments. One argument +specifies the active area, that is, the {\it trigger} of the link. The +second argument specifies the {\it target} of the link, that is, a +page. The trigger can be quite arbitrary Hyperdoc text and can include +images or whole paragraphs. The trigger text will be formatted in the +normal fashion but its default font will be the font specified by the +ActiveFont resource. -The simplest kind of \HyperName{} link is a link to a named page. +The simplest kind of Hyperdoc link is a link to a named page. Clicking on the trigger will cause the named page to appear in a -\HyperName{} window. +Hyperdoc window. There are three flavors for such a link. \begin{items}[123456] -\item\menuitemstyle{{\tt \\windowlink\{{\it trigger}\}\{{\it page name}\}}} +\item\menuitemstyle{{\tt \\windowlink\{{\it trigger}\} +\{{\it page name}\}}} \newline -This link command, when activated, will create a new window for the named page. +This link command, when activated, will create a new +window for the named page. \newline There will be no \centerline{\UpBitmap{} or \ReturnBitmap{}} buttons on the new page. The new page will have a \centerline{\ExitBitmap{}} button, however. -The original page containing the {\tt \\windowlink} command will be unaffected. +The original page containing the {\tt \\windowlink} +command will be unaffected. \item\menuitemstyle{{\tt \\downlink\{{\it trigger}\}\{{\it page name}\}} } \newline This link command, when activated, will cause the current page to be replaced by the target page -in the same \HyperName{} window. +in the same Hyperdoc window. A \centerline{\UpBitmap{}} button will automatically be placed on the new page allowing you to get back to the page containing the {\tt \\downlink} command. @@ -58858,8 +53154,11 @@ a short-cut to be taken. \begin{paste}{HTXLinkPage1xPaste1}{HTXLinkPage1xPatch1} \pastebutton{HTXLinkPage1xPaste1}{Interpret} \newline -{\tt \\windowlink\{windowlink to Actions menu\}\{HTXLinkTopPage\}\\newline}\newline -{\tt \\downlink\{downlink to Actions menu\}\{HTXLinkTopPage\}\\newline}\newline +{\tt \\windowlink +\{windowlink to Actions menu\}\{HTXLinkTopPage\}\\newline} +\newline +{\tt \\downlink\{downlink to Actions menu\}\{HTXLinkTopPage\}\\newline} +\newline {\tt \\memolink\{memolink to Actions menu\}\{HTXLinkTopPage\}} \end{paste} \endImportant @@ -58917,18 +53216,17 @@ menu}{HTXLinkTopPage}\newline \begin{paste}{HTXLinkPage1xPaste1B}{HTXLinkPage1xPatch1} \pastebutton{HTXLinkPage1xPaste1B}{Interpret} \newline -{\tt \\windowlink\{windowlink to Actions menu\}\{HTXLinkTopPage\}\\newline}\newline -{\tt \\downlink\{downlink to Actions menu\}\{HTXLinkTopPage\}\\newline}\newline +{\tt \\windowlink +\{windowlink to Actions menu\}\{HTXLinkTopPage\}\\newline} +\newline +{\tt \\downlink\{downlink to Actions menu\}\{HTXLinkTopPage\}\\newline} +\newline {\tt \\memolink\{memolink to Actions menu\}\{HTXLinkTopPage\}} \end{paste} \end{patch} @ -\subsection{Test Help Page} -\label{TestHelpPage} -\index{pages!TestHelpPage!htxlinkpage1.ht} -\index{htxlinkpage1.ht!pages!TestHelpPage} -\index{TestHelpPage!htxlinkpage1.ht!pages} +\pagehead{TestHelpPage}{htxlinkpage1.ht}{Test Help Page} <>= \begin{page}{TestHelpPage}{Test Help Page} \begin{scroll} @@ -58940,49 +53238,41 @@ menu}{HTXLinkTopPage}\newline @ \section{htxlinkpage2.ht} -\subsection{Standard Pages} -\label{HTXLinkPage2} -\begin{itemize} -\item HTXLinkPage6 \ref{HTXLinkPage6} on page~\pageref{HTXLinkPage6} -\item SpadNotConnectedPage \ref{SpadNotConnectedPage} on -page~\pageref{SpadNotConnectedPage} -\item UnknownPage \ref{UnknownPage} on page~\pageref{UnknownPage} -\item ErrorPage \ref{ErrorPage} on page~\pageref{ErrorPage} -\item ProtectedQuitPage \ref{ProtectedQuitPage} on -page~\pageref{ProtectedQuitPage} -\item HTXLinkPage3 \ref{HTXLinkPage3} on page~\pageref{HTXLinkPage3} -\end{itemize} -\index{pages!HTXLinkPage2!htxlinkpage2.ht} -\index{htxlinkpage2.ht!pages!HTXLinkPage2} -\index{HTXLinkPage2!htxlinkpage2.ht!pages} +\pagehead{HTXLinkPage2}{htxlinkpage2.ht}{Standard Pages} +\pageto{notitle}{HTXLinkPage6} +\pageto{notitle}{SpadNotConnectedPage} +\pageto{notitle}{UnknownPage} +\pageto{notitle}{ErrorPage} +\pageto{notitle}{ProtectedQuitPage} +\pageto{notitle}{HTXLinkPage3} <>= \begin{page}{HTXLinkPage2}{Standard Pages} \centerline{\fbox{{\tt \thispage}}}\newline \begin{scroll} You have reached this page after performing -a series of mouse clicks on \HyperName{} +a series of mouse clicks on Hyperdoc active areas. Each time, a {\tt \\link} command was activated. Well, how does it all start? -The answer is that \HyperName{} always puts up +The answer is that Hyperdoc always puts up a particular page called {\tt RootPage} when it starts up. If this page is not found in the database, -\HyperName{} will immediately exit. +Hyperdoc will immediately exit. It is, of course, desirable that the {\tt RootPage} contains links to other pages! It is possible to override Axiom's choice of {\tt RootPage} and provide your own -to \HyperName{}. This is done in the same way as +to Hyperdoc. This is done in the same way as you would override any Axiom-defined page and is -discussed in \downlink{How to use your pages with \HyperName{}}{HTXLinkPage6}. +discussed in \downlink{How to use your pages with Hyperdoc}{HTXLinkPage6}. -You may have noticed that \HyperName{} +You may have noticed that Hyperdoc uses some pages when certain events occur. There is a page that is put up, for instance, -whenever \HyperName{} cannot connect to Axiom. +whenever Hyperdoc cannot connect to Axiom. Another page is put up whenever there is a formatting error and yet another when a request for an unknown page is made. Finally, there is a page that prompts @@ -58991,12 +53281,12 @@ exit button on the initial page. These pages have standard names and must be provided -in the \HyperName{} page database. +in the Hyperdoc page database. They are already defined in the Axiom system -\HyperName{} page database so that you do not have to +Hyperdoc page database so that you do not have to define them yourself. -Here are the pages required by \HyperName{}. You can click on any of these +Here are the pages required by Hyperdoc. You can click on any of these to see their contents. Click on their exit buttons when you are finished. \beginImportant @@ -59004,7 +53294,8 @@ to see their contents. Click on their exit buttons when you are finished. \pastebutton{HTXLinkPage2xPaste1}{Interpret} \newline {\tt \\table\{}\newline -{\tt \{\\windowlink\{SpadNotConnectedPage\}\{SpadNotConnectedPage\}\}}\newline +{\tt \{\\windowlink\{SpadNotConnectedPage\}\{SpadNotConnectedPage\}\}} +\newline {\tt \{\\windowlink\{UnknownPage\}\{UnknownPage\}\}}\newline {\tt \{\\windowlink\{ErrorPage\}\{ErrorPage\}\}}\newline {\tt \{\\windowlink\{ProtectedQuitPage\}\{ProtectedQuitPage\}\}}\newline @@ -59013,11 +53304,11 @@ to see their contents. Click on their exit buttons when you are finished. \endImportant -In addition, \HyperName{} uses certain bitmaps for its buttons. +In addition, Hyperdoc uses certain bitmaps for its buttons. They are also provided in the Axiom system -bitmap directory and \HyperName{} knows where to find them. +bitmap directory and Hyperdoc knows where to find them. -The bitmap files required by \HyperName{} are the following. +The bitmap files required by Hyperdoc are the following. \newline \tab{7}{\it exit.bitmap}\tab{22} = \tab{25}{\ExitBitmap{}} \newline \tab{7}{\it help2.bitmap}\tab{22} = \tab{25}{\HelpBitmap{}} \newline @@ -59027,7 +53318,7 @@ The bitmap files required by \HyperName{} are the following. These files must exist in your current directory if the {\tt AXIOM} environment variable is not set. -If it is, then \HyperName{} will assume that it points +If it is, then Hyperdoc will assume that it points to the Axiom system directory and will look for these files in {\bf \$AXIOM/doc/hypertex/bitmaps}. @@ -59074,7 +53365,8 @@ these files in \pastebutton{HTXLinkPage2xPaste1B}{Interpret} \newline {\tt \\table\{}\newline -{\tt \{\\windowlink\{SpadNotConnectedPage\}\{SpadNotConnectedPage\}\}}\newline +{\tt \{\\windowlink\{SpadNotConnectedPage\}\{SpadNotConnectedPage\}\}} +\newline {\tt \{\\windowlink\{UnknownPage\}\{UnknownPage\}\}}\newline {\tt \{\\windowlink\{ErrorPage\}\{ErrorPage\}\}}\newline {\tt \{\\windowlink\{ProtectedQuitPage\}\{ProtectedQuitPage\}\}}\newline @@ -59084,12 +53376,8 @@ these files in @ \section{htxlinkpage3.ht} -\subsection{Active Axiom commands} -\label{HTXLinkPage3} -See HTXLinkPage4 \ref{HTXLinkPage4} on page~\pageref{HTXLinkPage4} -\index{pages!HTXLinkPage3!htxlinkpage3.ht.ht} -\index{htxlinkpage3.ht.ht!pages!HTXLinkPage3} -\index{HTXLinkPage3!htxlinkpage3.ht.ht!pages} +\pagehead{HTXLinkPage3}{htxlinkpage3.ht}{Active Axiom commands} +\pageto{notitle}{HTXLinkPage4} <>= \begin{page}{HTXLinkPage3}{Active Axiom commands} \centerline{\fbox{{\tt \thispage}}}\newline @@ -59101,11 +53389,13 @@ introduce are actually {\it macros} that are defined in \centerline{{\bf \env{AXIOM}/doc/hypertex/pages/util.ht}} This means that you can use them only if you include -this file in your \HyperName{} database. +this file in your Hyperdoc database. The first command to learn is \horizontalline -{\tt \\axiomcommand\{ {\it command }{\tt \ \\free\{}{\it var1 var2 ...}{\tt \}\ \\bound\{}{\it var}{\tt \}\ \}} } +{\tt \\axiomcommand\{ {\it command } +{\tt \ \\free\{}{\it var1 var2 ...} +{\tt \}\ \\bound\{}{\it var}{\tt \}\ \}} } \horizontalline @@ -59121,7 +53411,7 @@ will be created if this was the first Axiom command activated in the current page. If not, the command will be sent to the already opened Axiom interpreter window for the current page. Note that it {\it is} necessary to escape special -\HyperName{} characters with the {\tt '\\'} backslash character. +Hyperdoc characters with the {\tt '\\'} backslash character. The exceptions are the characters {\tt \[\]}; they do not need to be escaped in this context. @@ -59135,7 +53425,7 @@ need to be escaped in this context. The optional {\tt \\free\{\}} and {\tt \\bound\{\}} directives -provide dependency control. The reader of a \HyperName{} +provide dependency control. The reader of a Hyperdoc page is not forced to click on the commands in the order in which in they appear on the page. If the correct {\tt \\free\{\}} and {\tt \\bound\{\}} @@ -59145,20 +53435,17 @@ commands that should be executed before it. This will {\it only} happen the first time the command is clicked. -So, how are the dependencies specified? -The arguments of the {\tt \\free\{\}} directive must -be space-separated words (labels). The argument of {\tt \\bound\{\}} -must be a single (unique for the page) label. Each label in the {\tt \\free\{\}} list -must exist as an argument to one (and only one) {\tt \\bound\{\}} directive -somewhere in the current page. -When the command is activated, \HyperName{} will look -in the {\tt \\free\{\}} list and check each label. -For each label, it will find the command that specifies that label -in its {\tt \\bound\{\}} directive and -execute it if it has not been already executed. -The order of labels in the {\tt \\free\{\}} directive list -is respected. \HyperName{} will follow all -dependency links recursively. +So, how are the dependencies specified? The arguments of the {\tt +\\free\{\}} directive must be space-separated words (labels). The +argument of {\tt \\bound\{\}} must be a single (unique for the page) +label. Each label in the {\tt \\free\{\}} list must exist as an +argument to one (and only one) {\tt \\bound\{\}} directive somewhere +in the current page. When the command is activated, Hyperdoc will +look in the {\tt \\free\{\}} list and check each label. For each +label, it will find the command that specifies that label in its {\tt +\\bound\{\}} directive and execute it if it has not been already +executed. The order of labels in the {\tt \\free\{\}} directive list +is respected. Hyperdoc will follow all dependency links recursively. Here is an example. Clicking on the third command will automatically @@ -59183,7 +53470,8 @@ code. This is the command to use for execution of an Axiom {\it pile}. It is a {\it group} command. The proper syntax for it is as follows: \horizontalline -{\tt \\begin\{spadsrc\}\ [\\free\{{\it var1 var2} ...\}\ \\bound\{{\it var}\}]} +{\tt \\begin\{spadsrc\} +\ [\\free\{{\it var1 var2} ...\}\ \\bound\{{\it var}\}]} \newline . \newline @@ -59198,7 +53486,7 @@ as {\tt \\axiomcommand}), they must be enclosed in square brackets {\tt []}. The lines between the {\tt \\begin} and {\tt \\end} contain the Axiom statements. Indentation -will be respected. \HyperName{} will +will be respected. Hyperdoc will actually save this part in a temporary file and instruct Axiom to read the file with the {\tt )read} system command. @@ -59208,7 +53496,7 @@ fragment is dependent on the {\tt v3} label. Make sure that previous commands are active (and hence the label {\tt v3} is "visible") before trying to execute it. If the label {\tt v3} -is not seen in the page, \HyperName{} will +is not seen in the page, Hyperdoc will print an error message on standard output and ignore the dependency. @@ -59232,11 +53520,11 @@ to button like this \ \MenuDotBitmap{}. Clicking on this button, one can see the output for that command. The output has been pre-computed and is also stored in -\HyperName{} files. This is done using +Hyperdoc files. This is done using {\it patch} and {\it paste}. It is the same mechanism that is used to alternatively display -\HyperName{} source and interpreted +Hyperdoc source and interpreted result in this and other pages. It is explained \downlink{later on}{HTXAdvPage5}. @@ -59356,24 +53644,20 @@ f 3 @ \section{htxlinkpage4.ht} -\subsection{Linking to Lisp} -\label{HTXLinkPage4} -See HTXLinkPage5 \ref{HTXLinkPage5} on page~\pageref{HTXLinkPage5} -\index{pages!HTXLinkPage4!htxlinkpage4.ht} -\index{htxlinkpage4.ht!pages!HTXLinkPage4} -\index{HTXLinkPage4!htxlinkpage4.ht!pages} +\pagehead{HTXLinkPage4}{htxlinkpage4.ht}{Linking to Lisp} +\pageto{notitle}{HTXLinkPage5} <>= \begin{page}{HTXLinkPage4}{Linking to Lisp} \centerline{\fbox{{\tt \thispage}}}\newline \begin{scroll} -Another feature of the Axiom\hspace{2}--\HyperName{} +Another feature of the Axiom\hspace{2}--Hyperdoc link is the ability to execute {\it Lisp} code at a click of a button. There are two things one can do. The first is to cause the evaluation -of a {\it Lisp} form and ignore (as far as \HyperName{} +of a {\it Lisp} form and ignore (as far as Hyperdoc is concerned) its value. The evaluation of the function might have an effect however on your Axiom session. @@ -59383,7 +53667,7 @@ The command for this is \horizontalline Here is an example. We will first define a {\it Lisp} function -and then execute it. Notice that the \HyperName{} +and then execute it. Notice that the Hyperdoc special characters must be escaped (this is on top of {\it Lisp} escaping conventions). @@ -59415,29 +53699,30 @@ in \Browse{} to present the Axiom Library in a hypertext form. The command to use is a lot like the {\tt link} commands -you encountered \downlink{earlier}{HTXLinkPage1} and comes in three flavours. +you encountered \downlink{earlier}{HTXLinkPage1} and comes in three +flavors. \centerline{{\tt \\lispwindowlink\{{\it trigger}\}\{{\it Lisp form}\}}} \centerline{{\tt \\lispdownlink\{{\it trigger}\}\{{\it Lisp form}\}}} \centerline{{\tt \\lispmemolink\{{\it trigger}\}\{{\it Lisp form}\}}} The difference between the three versions is the same as before. -When such a link is activated, \HyperName{} issues the +When such a link is activated, Hyperdoc issues the {\it Lisp form} to Axiom and waits for a full page definition. An important point to note is that -\HyperName{} does {\it not} use +Hyperdoc does {\it not} use the value of the {\it Lisp form} but, instead, it depends on its {\it side-effects}. What {\it must} happen during evaluation of the form is enough evaluations of a special {\it Lisp} function called {\bf issueHT} to define a page. The argument of {\bf issueHT} is a string -containing \HyperName{} text. Perhaps an example will clarify +containing Hyperdoc text. Perhaps an example will clarify matters. First we will define a {\it Lisp} function that accepts a string argument and calls {\bf issueHT} a few times. The strings that are passed to {\bf issueHT} construct -a \HyperName{} page that would just contain our +a Hyperdoc page that would just contain our original argument centered roughly on the page. Then we write the {\tt \\lisplink} with a call to the function. Finally, we execute a {\it Lisp} @@ -59451,23 +53736,25 @@ command that just pretty--prints the function's definition. \newline {\tt \\lispcommand\{Definition\}\{(defun HTXTESTPAGE (x) (|issueHT|}\newline {\tt "\\\\\\\\begin\\\{page\\\}\\\{LispTestPage\\\}\\\{Lisp Test Page\\\}}\newline -{\tt \\\\\\\\vspace\\\{150\\\} \\\\\\\\centerline\\\{") (|issueHT| x) (|issueHT|}\newline +{\tt \\\\\\\\vspace\\\{150\\\} \\\\\\\\centerline\\\{") (|issueHT| x) +(|issueHT|}\newline {\tt "\\\} \\\\\\\\end\\\{page\\\}" ) ) \}}\newline {\tt \\newline}\newline {\tt \\lispwindowlink\{Link to it\}\{(HTXTESTPAGE "Hi there")\}}\newline {\tt \\newline}\newline -{\tt \\lispcommand\{Show Lisp definition\}\{(pprint (symbol-function 'HTXTESTPAGE))\}}\newline +{\tt \\lispcommand\{Show Lisp definition\} +\{(pprint (symbol-function 'HTXTESTPAGE))\}}\newline \end{paste} \endImportant The {\tt '\\\{'} and {\tt '\\\}'} is required to escape -\HyperName{}'s special characters {\tt '\{'} and {\tt '\}'}. +Hyperdoc's special characters {\tt '\{'} and {\tt '\}'}. The {\tt '\\\\\\\\'} has the following rationale. -We need to send to \HyperName{} (from {\it Lisp}) the sequence +We need to send to Hyperdoc (from {\it Lisp}) the sequence {\tt \\begin}. But {\tt '\\'} is a special {\it Lisp} character. Therefore the {\it Lisp} string must be {\tt '\\\\begin'}. But to specify this -in \HyperName{} we need to escape the two {\tt '\\'}. +in Hyperdoc we need to escape the two {\tt '\\'}. Therefore, we write {\tt '\\\\\\\\begin'}. @@ -59476,7 +53763,8 @@ as follows. \begin{verbatim} (defun HTXTESTPAGE (X) (|issueHT| - "\\begin{page}{LispTestPage}{Lisp Test Page} \\vspace{200} \\centerline{") + "\\begin{page}{LispTestPage}{Lisp Test Page} +\\vspace{200} \\centerline{") (|issueHT| X) (|issueHT| "} \\end{page}")) \end{verbatim} @@ -59486,7 +53774,7 @@ as follows. You should not execute {\tt HTXTESTPAGE} in the {\it Lisp} environment manually. It is meant to be executed {\it only} in response to a -\HyperName{} request. +Hyperdoc request. Can you pop-up a named page from {\it Lisp} regardless of user action? Yes --- use {\it Lisp} function {\bf linkToHTPage} @@ -59513,13 +53801,14 @@ you have executed the command above that defines it. \begin{paste}{HTXLinkPage4xPaste4}{HTXLinkPage4xPatch4} \pastebutton{HTXLinkPage4xPaste4}{Interpret} \newline -{\tt \\axiomcommand\{)lisp (progn (|startHTPage| 50)(HTXTESTPAGE "Immediately"))\}} +{\tt \\axiomcommand\{ +)lisp (progn (|startHTPage| 50)(HTXTESTPAGE "Immediately"))\}} \end{paste} \endImportant Now, the most important use of this facility so far has been in the \Browse{} and Basic Commands components of -\HyperName{}. Instead of giving you details of the various +Hyperdoc. Instead of giving you details of the various \Browse{} {\it Lisp} functions, a few macros are defined in \centerline{{\bf \$AXIOM/doc/hypertex/pages/util.ht}} @@ -59563,12 +53852,6 @@ constructor. No wildcard in the operation name or type abbreviation is allowed here. You should also specify just the top level type. - - - - - - \end{scroll} \beginmenu \menulink{Next -- Linking to Unix}{HTXLinkPage5} @@ -59577,11 +53860,7 @@ allowed here. You should also specify just the top level type. \end{page} @ -\subsection{HTXLinkPage4xPatch1 patch} -\label{HTXLinkPage4xPatch1} -\index{patch!HTXLinkPage4xPatch1!htxlinkpage4.ht} -\index{htxlinkpage4.ht!patch!HTXLinkPage4xPatch1} -\index{HTXLinkPage4xPatch1!htxlinkpage4.ht!patch} +\pagehead{HTXLinkPage4xPatch1}{htxlinkpage4.ht}{HTXLinkPage4xPatch1 patch} <>= \begin{patch}{HTXLinkPage4xPatch1} \begin{paste}{HTXLinkPage4xPaste1A}{HTXLinkPage4xPatch1A} @@ -59605,7 +53884,9 @@ allowed here. You should also specify just the top level type. \begin{paste}{HTXLinkPage4xPaste1B}{HTXLinkPage4xPatch1} \pastebutton{HTXLinkPage4xPaste1B}{Interpret} \newline -{\tt \\lispcommand\{Definition\}\{(defun HTXTESTFUNCTION () (print "Hello from HyperDoc \\\\\\\\ \\\% \\\{ \\\}"))\}} \newline +{\tt \\lispcommand\{Definition\}\{ +(defun HTXTESTFUNCTION () + (print "Hello from HyperDoc \\\\\\\\ \\\% \\\{ \\\}"))\}} \newline {\tt \\newline}\newline {\tt \\lispcommand\{Execution\}\{(HTXTESTFUNCTION)\}} \newline \end{paste} @@ -59644,14 +53925,19 @@ allowed here. You should also specify just the top level type. \begin{paste}{HTXLinkPage4xPaste2B}{HTXLinkPage4xPatch2} \pastebutton{HTXLinkPage4xPaste2B}{Interpret} \newline -{\tt \\lispcommand\{Definition\}\{(defun HTXTESTPAGE (x) (|issueHT|}\newline -{\tt "\\\\\\\\begin\\\{page\\\}\\\{LispTestPage\\\}\\\{Lisp Test Page\\\}}\newline -{\tt \\\\\\\\vspace\\\{150\\\} \\\\\\\\centerline\\\{") (|issueHT| x) (|issueHT|}\newline +{\tt \\lispcommand\{Definition\}\{(defun HTXTESTPAGE (x) +(|issueHT|}\newline +{\tt "\\\\\\\\begin\\\{page\\\}\\\{LispTestPage\\\} +\\\{Lisp Test Page\\\}}\newline +{\tt \\\\\\\\vspace\\\{150\\\} \\\\\\\\centerline\\\{") +(|issueHT| x) (|issueHT|}\newline {\tt "\\\} \\\\\\\\end\\\{page\\\}" ) ) \}}\newline {\tt \\newline}\newline -{\tt \\lispwindowlink\{Link to it\}\{(HTXTESTPAGE "Hi there")\}}\newline +{\tt \\lispwindowlink\{Link to it\}\{(HTXTESTPAGE "Hi there")\}} +\newline {\tt \\newline}\newline -{\tt \\lispcommand\{Show Lisp definition\}\{(pprint (symbol-function 'HTXTESTPAGE))\}}\newline +{\tt \\lispcommand\{Show Lisp definition\} +\{(pprint (symbol-function 'HTXTESTPAGE))\}}\newline \end{paste} \end{patch} @@ -59711,7 +53997,8 @@ allowed here. You should also specify just the top level type. \begin{paste}{HTXLinkPage4xPaste4B}{HTXLinkPage4xPatch4} \pastebutton{HTXLinkPage4xPaste4B}{Interpret} \newline -{\tt \\axiomcommand\{)lisp (progn (|startHTPage| 50)(HTXTESTPAGE "Immediately"))\}} +{\tt \\axiomcommand\{ +)lisp (progn (|startHTPage| 50)(HTXTESTPAGE "Immediately"))\}} \end{paste} \end{patch} @@ -59767,17 +54054,13 @@ allowed here. You should also specify just the top level type. @ \section{htxlinkpage5.ht} -\subsection{Linking to Unix} -\label{HTXLinkPage5} -\index{pages!HTXLinkPage5!htxlinkpage5.ht} -\index{htxlinkpage5.ht!pages!HTXLinkPage5} -\index{HTXLinkPage5!htxlinkpage5.ht!pages} +\pagehead{HTXLinkPage5}{htxlinkpage5.ht}{Linking to Unix} <>= \begin{page}{HTXLinkPage5}{Linking to Unix} \centerline{\fbox{{\tt \thispage}}}\newline \begin{scroll} -Let us conclude the tour of \HyperName{} +Let us conclude the tour of Hyperdoc actions that can be triggered with a click of a button with two more facilities. These are \beginImportant @@ -59791,10 +54074,10 @@ with two more facilities. These are The first one, {\tt \\unixcommand}, is very much like {\tt \\axiomcommand} and {\tt \\lispcommand}. The trigger text becomes an active area. Clicking on it -will force \HyperName{} to pass the second argument +will force Hyperdoc to pass the second argument to the system as a shell command to be executed. The shell used is {\bf /bin/sh}. -\HyperName{} ignores the output of the command. +Hyperdoc ignores the output of the command. \beginImportant @@ -59807,7 +54090,7 @@ The shell used is {\bf /bin/sh}. The {\tt \\unixlink} command delegates to a another program the creation of a dynamic page. When the trigger -text is activated, \HyperName{} will invoke the command +text is activated, Hyperdoc will invoke the command specified in the second argument. It will then start reading the {\it standard output} of the command until a complete page has been received. It is important that @@ -59815,7 +54098,7 @@ a single page and nothing more is written by the command. This command is essentially a {\tt \\downlink}, i.e. the new page replaces the current page in the window. There aren't any other flavours of {\tt \\unixlink}. -A trivial example is to use {\bf cat} on a \HyperName{} +A trivial example is to use {\bf cat} on a Hyperdoc file known to contain just one page. \beginImportant @@ -59832,7 +54115,7 @@ Two things to notice in the second argument of {\tt \\unixlink}: You must use a {\it hard space} {\tt '\\\ '} to preserve the spacing in the command. Also, the {\tt \\env} command allows you to use -an environment variable in \HyperName{} text. +an environment variable in Hyperdoc text. With a little ingenuity (and maybe some shell and {\bf awk} scripts !) , one can use these @@ -59842,7 +54125,7 @@ a file by clicking on its name. \end{scroll} \beginmenu -\menulink{Next -- How to use your pages with \HyperName{}}{HTXLinkPage6} +\menulink{Next -- How to use your pages with Hyperdoc}{HTXLinkPage6} \endmenu \end{page} @@ -59911,17 +54194,14 @@ a file by clicking on its name. @ \section{htxlinkpage6.ht} -\subsection{How to use your pages with Hyperdoc} -\label{HTXLinkPage6} -\index{pages!HTXLinkPage6!htxlinkpage6.ht} -\index{htxlinkpage6.ht!pages!HTXLinkPage6} -\index{HTXLinkPage6!htxlinkpage6.ht!pages} +\pagehead{HTXLinkPage6}{htxlinkpage6.ht} +{How to use your pages with Hyperdoc} <>= \begin{page}{HTXLinkPage6}{How to use your pages with Hyperdoc} \centerline{\fbox{{\tt \thispage}}}\newline \begin{scroll} -Let us say that you have written a few \HyperName{} +Let us say that you have written a few Hyperdoc pages and you would like to incorporate them in the system. Here is what you should do. @@ -59929,11 +54209,11 @@ Put all your files in some directory and make sure that they all have the {\bf .ht} extension. You will need a way of "hooking" into a system--defined -\HyperName{} page. The proper way to do this is to use +Hyperdoc page. The proper way to do this is to use the {\tt \\localinfo} macro. The Axiom system -\HyperName{} page database includes, as it should, +Hyperdoc page database includes, as it should, a {\tt RootPage}. This is the page that first comes up -when you start \HyperName{}. This page contains +when you start Hyperdoc. This page contains a line like this. \beginImportant \newline @@ -59955,51 +54235,52 @@ one that contains your top--level page) of your files. You can put this definition in its own file if you like. \beginImportant \newline -{\tt \\newcommand\{\\localinfo\}\{\\menuwindowlink\{{\it active text}\}} \newline +{\tt \\newcommand\{\\localinfo\} +\{\\menuwindowlink\{{\it active text}\}} \newline {\tt \{{\it page name}\} \\tab\{16\}{\it short description}\}} \endImportant -If you have a look at the initial \HyperName{} page, you will -probably be able to decipher what this does. The macro -{\tt \\menuwindowlink} is defined (again in {\bf util.ht}) -and is responsible for putting the little square to the left of the -active area. -Specify a word or two for {\it active text}. That will become the -trigger of the {\tt \\link}. Specify the page name of your top--level page -in {\it page name}. Finally, you can give a comment about the topic -under {\it short description}. That will appear to the right of the -{\it active text}. +If you have a look at the initial Hyperdoc page, you will probably be +able to decipher what this does. The macro {\tt \\menuwindowlink} is +defined (again in {\bf util.ht}) and is responsible for putting the +little square to the left of the active area. Specify a word or two +for {\it active text}. That will become the trigger of the {\tt +\\link}. Specify the page name of your top--level page in {\it page +name}. Finally, you can give a comment about the topic under {\it +short description}. That will appear to the right of the {\it active +text}. The next thing you need to do is to create a {\it local database} for your files. You will use the {\bf \env{AXIOM}/bin/htadd} program. This program will create an {\bf ht.db} file that summarises your definitions and acts as an index. Let us present an example of its use. Suppose you have two files {\bf user1.ht} and {\bf user2.ht} -in directory {\bf /u/sugar/\HyperName{}}. You should create the {\bf ht.db} +in directory {\bf /u/sugar/Hyperdoc}. You should create the {\bf ht.db} in that same directory. To create the {\bf ht.db} file you issue to the unix shell: \beginImportant \newline -{\tt htadd -f /u/sugar/\HyperName{} /u/sugar/\HyperName{}/user1.ht /u/sugar/\HyperName{}/user2.ht} -\centerline{or ,if you are already in /u/sugar/\HyperName{}} +{\tt htadd -f /u/sugar/Hyperdoc +/u/sugar/Hyperdoc/user1.ht /u/sugar/Hyperdoc/user2.ht} +\centerline{or ,if you are already in /u/sugar/Hyperdoc} {\tt htadd -l ./user1.ht ./user2.ht} \endImportant The options and conventions for {\bf htadd} will be explained below. -To start \HyperName{} with your own pages, you now need to tell -it where to search for {\bf ht.db} files and \HyperName{} {\bf .ht} +To start Hyperdoc with your own pages, you now need to tell +it where to search for {\bf ht.db} files and Hyperdoc {\bf .ht} files. To do this, define the shell environment variable {\bf HTPATH}. The value should be a colon {\tt ':'} separated list of directory full pathnames. The order of the directories is respected with earlier entries overriding later ones. Since we want all the Axiom pages but need to override the {\tt \\localinfo} macro, we should use the value -\centerline{{\bf /u/sugar/\HyperName{}:\env{AXIOM}/doc/hypertex/pages}} +\centerline{{\bf /u/sugar/Hyperdoc:\env{AXIOM}/doc/hypertex/pages}} The way that you define environment variables depends on the shell you are using. In the {\bf /bin/csh}, it would be \newline -{\bf setenv HTPATH /u/sugar/\HyperName{}:\env{AXIOM}{}/doc{}/hypertex{}/pages} +{\bf setenv HTPATH /u/sugar/Hyperdoc:\env{AXIOM}{}/doc{}/hypertex{}/pages} @@ -60013,7 +54294,7 @@ you are using. In the {\bf /bin/csh}, it would be \beginImportant \begin{paste}{HTXLinkPage6xPaste2}{HTXLinkPage6xPatch2} -\pastebutton{HTXLinkPage6xPaste2}{Where does \HyperName{} look for files} +\pastebutton{HTXLinkPage6xPaste2}{Where does Hyperdoc look for files} \newline \end{paste} \endImportant @@ -60040,12 +54321,13 @@ you are using. In the {\bf /bin/csh}, it would be \newline Name: -{\tt htadd - create or modify a \HyperName{} database} +{\tt htadd - create or modify a Hyperdoc database} \vspace{} \newline Syntax: -{\tt htadd [ -l | -s | -f\ }{\it path}{\tt ] [ -d | -n ]\ }{\it filename ...} +{\tt htadd [ -l | -s | -f\ }{\it path}{\tt ] +[ -d | -n ]\ }{\it filename ...} \vspace{} \newline Options:\indentrel{4}\newline @@ -60122,32 +54404,25 @@ the file will be deemed missing and {\bf htadd} will fail. \begin{paste}{HTXLinkPage6xPaste2A}{HTXLinkPage6xPatch2A} \pastebutton{HTXLinkPage6xPaste2A}{Hide} \indentrel{12}\newline -The \HyperName{} program is -\centerline{{\bf \env{AXIOM}/lib/hypertex}} -If {\tt AXIOM} is defined and {\tt HTPATH} is not -(this is the case when Axiom starts \HyperName{}) -\HyperName{} will look in -\centerline{{\bf \env{AXIOM}/doc/hypertex/pages}} -for the {\bf ht.db} file and all \HyperName{} pages. -If {\tt HTPATH} is defined, it is assumed that -it alone points to the directories to be searched -(the above default will NOT be searched unless -explicitly specified in {\tt HTPATH}). -For each directory in {\tt HTPATH}, the {\bf ht.db} -file, if there, will be read. -Each file listed in {\bf ht.db} will -then be searched for in the complete sequence -of directories in {\tt HTPATH}. Note that -the {\bf ht.db} does not keep full pathnames - of files. -If a {\it page}, {\it macro} or {\it patch} -(specified in some {\bf ht.db}) happens -to be (in a file) in more than one of the directories -specified in {\tt HTPATH}, \HyperName{} -will print a warning and explain which version -in which file is ignored. Generally, earlier -directories in {\tt HTPATH} are preferred over later -ones. + +The Hyperdoc program is \centerline{{\bf \env{AXIOM}/lib/hypertex}} If +{\tt AXIOM} is defined and {\tt HTPATH} is not (this is the case when +Axiom starts Hyperdoc) Hyperdoc will look in +\centerline{{\bf \env{AXIOM}/doc/hypertex/pages}} +for the {\bf ht.db} file and all +Hyperdoc pages. If {\tt HTPATH} is defined, it is assumed that it +alone points to the directories to be searched (the above default will +NOT be searched unless explicitly specified in {\tt HTPATH}). For +each directory in {\tt HTPATH}, the {\bf ht.db} file, if there, will +be read. Each file listed in {\bf ht.db} will then be searched for in +the complete sequence of directories in {\tt HTPATH}. Note that the +{\bf ht.db} does not keep full pathnames of files. If a {\it page}, +{\it macro} or {\it patch} (specified in some {\bf ht.db}) happens to +be (in a file) in more than one of the directories specified in +{\tt HTPATH}, Hyperdoc will print a warning and explain which version in +which file is ignored. Generally, earlier directories in {\tt HTPATH} +are preferred over later ones. + \indentrel{-12}\newline \end{paste} \end{patch} @@ -60161,30 +54436,24 @@ ones. <>= \begin{patch}{HTXLinkPage6xPatch2A} \begin{paste}{HTXLinkPage6xPaste2B}{HTXLinkPage6xPatch2} -\pastebutton{HTXLinkPage6xPaste2B}{Where does \HyperName{} look for files}} +\pastebutton{HTXLinkPage6xPaste2B}{Where does Hyperdoc look for files}} \newline \end{paste} \end{patch} @ \section{htxlinktoppage.ht} -\subsection{Actions in Hyperdoc} -\label{HTXLinkTopPage} -\begin{itemize} -\item HTXLinkPage1 \ref{HTXLinkPage1} on page~\pageref{HTXLinkPage1} -\item HTXLinkPage2 \ref{HTXLinkPage2} on page~\pageref{HTXLinkPage2} -\item HTXLinkPage3 \ref{HTXLinkPage3} on page~\pageref{HTXLinkPage3} -\item HTXLinkPage4 \ref{HTXLinkPage4} on page~\pageref{HTXLinkPage4} -\item HTXLinkPage5 \ref{HTXLinkPage5} on page~\pageref{HTXLinkPage5} -\item HTXLinkPage6 \ref{HTXLinkPage6} on page~\pageref{HTXLinkPage6} -\end{itemize} -\index{pages!HTXLinkTopPage!htxlinktoppage.ht} -\index{htxlinktoppage.ht!pages!HTXLinkTopPage} -\index{HTXLinkTopPage!htxlinktoppage.ht!pages} +\pagehead{HTXLinkTopPage}{htxlinktoppage.ht}{Actions in Hyperdoc} +\pageto{notitle}{HTXLinkPage1} +\pageto{notitle}{HTXLinkPage2} +\pageto{notitle}{HTXLinkPage3} +\pageto{notitle}{HTXLinkPage4} +\pageto{notitle}{HTXLinkPage5} +\pageto{notitle}{HTXLinkPage6} <>= \begin{page}{HTXLinkTopPage}{Actions in Hyperdoc} \centerline{\fbox{{\tt \thispage}}}\newline -\HyperName{} offers various types of hypertext links. +Hyperdoc offers various types of hypertext links. You can learn about these facilities by clicking on the topics below. \begin{scroll} \beginmenu @@ -60193,89 +54462,75 @@ You can learn about these facilities by clicking on the topics below. \menudownlink{Active Axiom commands}{HTXLinkPage3} \menudownlink{Linking to Lisp}{HTXLinkPage4} \menudownlink{Linking to Unix}{HTXLinkPage5} -\menudownlink{How to use your pages with \HyperName{}}{HTXLinkPage6} +\menudownlink{How to use your pages with Hyperdoc}{HTXLinkPage6} \endmenu \end{scroll} \end{page} @ \section{htxtoppage.ht} -\subsection{Extending Hyperdoc} -\label{HTXTopPage} -\includegraphics[scale=.5]{ps/v71htxtoppage.eps} -\index{images!htxtoppage} - -Called from ``Reference'' (TopReferencePage) -\ref{TopReferencePage} on page~\pageref{TopReferencePage} -\begin{itemize} -\item ``Introduction'' -HTXIntroTopPage \ref{HTXIntroTopPage} on page~\pageref{HTXIntroTopPage} -\item ``Formatting'' -HTXFormatTopPage \ref{HTXFormatTopPage} on -page~\pageref{HTXFormatTopPage} -\item ``Actions'' -HTXLinkTopPage \ref{HTXLinkTopPage} on page~\pageref{HTXLinkTopPage} -\item ``Advanced features'' -HTXAdvTopPage \ref{HTXAdvTopPage} on page~\pageref{HTXAdvTopPage} -\item ``Try it!'' -HTXTryPage \ref{HTXTryPage} on page~\pageref{HTXTryPage} -\end{itemize} -\index{pages!HTXTopPage!htxtoppage.ht} -\index{htxtoppage.ht!pages!HTXTopPage} -\index{HTXTopPage!htxtoppage.ht!pages} +\pagehead{HTXTopPage}{htxtoppage.ht}{Extending Hyperdoc} +\pagepic{ps/v71htxtoppage.eps}{htxtoppage} +\pagefrom{Reference}{TopReferencePage} +\pageto{Introduction}{HTXIntroTopPage} +\pageto{Formatting}{HTXFormatTopPage} +\pageto{Actions}{HTXLinkTopPage} +\pageto{Advanced features}{HTXAdvTopPage} +\pageto{Try it!}{HTXTryPage} <>= \begin{page}{HTXTopPage}{Extending Hyperdoc} \centerline{\fbox{{\tt \thispage}}}\newline -This is a guide to extending \HyperName{}. You can learn -how to write your own \HyperName{} pages and link them to the -\HyperName{} page database that Axiom uses. +This is a guide to extending Hyperdoc. You can learn +how to write your own Hyperdoc pages and link them to the +Hyperdoc page database that Axiom uses. \begin{scroll} \beginmenu -\menumemolink{Introduction}{HTXIntroTopPage} \tab{20} An easy start. -\menumemolink{Formatting}{HTXFormatTopPage} \tab{20} Learn how to format text. -\menumemolink{Actions}{HTXLinkTopPage} \tab{20} Learn how to define actions. -\menumemolink{Advanced features}{HTXAdvTopPage} \tab{20} More effects. -\menuwindowlink{Try it!}{HTXTryPage} \tab{20} Try out what you learn. +\menumemolink{Introduction}{HTXIntroTopPage} +\tab{20} An easy start. +\menumemolink{Formatting}{HTXFormatTopPage} +\tab{20} Learn how to format text. +\menumemolink{Actions}{HTXLinkTopPage} +\tab{20} Learn how to define actions. +\menumemolink{Advanced features}{HTXAdvTopPage} +\tab{20} More effects. +\menuwindowlink{Try it!}{HTXTryPage} +\tab{20} Try out what you learn. \endmenu \end{scroll} \end{page} @ \section{htxtrypage.ht} -\subsection{Try out Hyperdoc} -\label{HTXTryPage} -\index{pages!HTXTryPage!htxtrypage.ht} -\index{htxtrypage.ht!pages!HTXTryPage} -\index{HTXTryPage!htxtrypage.ht!pages} +\pagehead{HTXTryPage}{htxtrypage.ht}{Try out Hyperdoc} <>= \begin{page}{HTXTryPage}{Try out Hyperdoc} \centerline{\fbox{{\tt \thispage}}}\newline -This page allows you to quickly experiment with \HyperName{}. +This page allows you to quickly experiment with Hyperdoc. It is a good idea to keep it handy as you learn about various commands. \beginscroll -We are going to use here the \HyperName{} facilities that allow +We are going to use here the Hyperdoc facilities that allow us to communicate with external programs and files. For more information see \downlink{later on}{HTXLinkPage5}. \beginmenu \item\menuitemstyle{ In order to use the buttons at the bottom of this page, you must first specify a name for the file you are going to use to hold -\HyperName{} commands. Edit the input area below to change the +Hyperdoc commands. Edit the input area below to change the name of the file.} \item\menuitemstyle{ If the file you specified does not yet exist, click on the {\bf Initialize} button below. This action will fill the file -with the minimum of \HyperName{} commands necessary to define a page.} +with the minimum of Hyperdoc commands necessary to define a page.} \item\menuitemstyle{ If you want to edit the file, just click on the {\bf Edit} button. This action will pop up a window, and invoke the {\it vi} editor on the file. Alternatively, use an editor of your choice.} \item\menuitemstyle{ Once you have finished making the changes to the file, update it and -click on the {\bf Link} button. \HyperName{} will then read +click on the {\bf Link} button. Hyperdoc will then read the file, interpret it as a new page, and display the page on this window. If you change the file and want to display it again, just get back to this page and click on {\bf Link} again. } @@ -60283,23 +54538,23 @@ just get back to this page and click on {\bf Link} again. } \endscroll \beginmenu {\it Filename: }{\inputstring{filename}{40}{\env{HOME}/HTXplay.ht}} -\menuunixcommand{Initialize}{cp\space{1}\env{AXIOM}/doc/hypertex/pages/HTXplay.ht \stringvalue{filename}} \tab{20} Get a fresh copy from the system. -\menuunixcommand{Edit}{xterm -T "\stringvalue{filename}" -e vi \stringvalue{filename}} \tab{20} Edit the file. -\menuunixwindow{Link}{cat \space{1}\stringvalue{filename}} \tab{20} Link to the page defined in the file. +\menuunixcommand{Initialize} +{cp\space{1}\env{AXIOM}/doc/hypertex/pages/HTXplay.ht +\stringvalue{filename}} \tab{20} Get a fresh copy from the system. +\menuunixcommand{Edit}{xterm -T "\stringvalue{filename}" -e vi +\stringvalue{filename}} \tab{20} Edit the file. +\menuunixwindow{Link}{cat \space{1}\stringvalue{filename}} +\tab{20} Link to the page defined in the file. \endmenu {\it Important : The file must contain -one and only one page definition and must not contain any macro or patch -definitions.} +one and only one page definition and must not contain any +macro or patch definitions.} \end{page} @ \chapter{NAG Library Routines} \section{nagaux.ht} -\subsection{NAG On-line Documentation} -\label{manpageXXonline} -\index{pages!manpageXXonline!nagaux.ht} -\index{nagaux.ht!pages!manpageXXonline} -\index{manpageXXonline!nagaux.ht!pages} +\pagehead{manpageXXonline}{nagaux.ht}{NAG On-line Documentation} <>= \begin{page}{manpageXXonline}{NAG On-line Documentation} \beginscroll @@ -60402,11 +54657,7 @@ definitions.} \end{page} @ -\subsection{NAG Documentation: summary} -\label{manpageXXsummary} -\index{pages!manpageXXsummary!nagaux.ht} -\index{nagaux.ht!pages!manpageXXsummary} -\index{manpageXXsummary!nagaux.ht!pages} +\pagehead{manpageXXsummary}{nagaux.ht}{NAG Documentation: summary} <>= \begin{page}{manpageXXsummary}{NAG Documentation: summary} \beginscroll @@ -61493,11 +55744,7 @@ definitions.} \end{page} @ -\subsection{NAG Documentation: introduction} -\label{manpageXXintro} -\index{pages!manpageXXintro!nagaux.ht} -\index{nagaux.ht!pages!manpageXXintro} -\index{manpageXXintro!nagaux.ht!pages} +\pagehead{manpageXXintro}{nagaux.ht}{NAG Documentation: introduction} <>= \begin{page}{manpageXXintro}{NAG Documentation: introduction} \beginscroll @@ -61566,7 +55813,8 @@ definitions.} 3.6. Summary for New Users - 4. Relationship between the Foundation Library and other NAG Libraries + 4. Relationship between the Foundation Library + and other NAG Libraries 4.1. NAG Fortran Library @@ -62202,7 +56450,8 @@ definitions.} -- be aware of the Users' Note for your implementation. - 4. Relationship between the Foundation Library and other NAG Libraries + 4. Relationship between the Foundation Library + and other NAG Libraries 4.1. NAG Fortran Library @@ -62346,11 +56595,7 @@ definitions.} \end{page} @ -\subsection{NAG Documentation: keyword in context} -\label{manpageXXkwic} -\index{pages!manpageXXkwic!nagaux.ht} -\index{nagaux.ht!pages!manpageXXkwic} -\index{manpageXXkwic!nagaux.ht!pages} +\pagehead{manpageXXkwic}{nagaux.ht}{NAG Documentation: keyword in context} <>= \begin{page}{manpageXXkwic}{NAG Documentation: keyword in context} \beginscroll @@ -67226,11 +61471,7 @@ definitions.} \end{page} @ -\subsection{NAG Documentation: conversion} -\label{manpageXXconvert} -\index{pages!manpageXXconvert!nagaux.ht} -\index{nagaux.ht!pages!manpageXXconvert} -\index{manpageXXconvert!nagaux.ht!pages} +\pagehead{manpageXXconvert}{nagaux.ht}{NAG Documentation: conversion} <>= \begin{page}{manpageXXconvert}{NAG Documentation: conversion} \beginscroll @@ -67387,11 +61628,7 @@ definitions.} @ \section{nagc.ht} -\subsection{ Zeros of Polynomials} -\label{manpageXXc02} -\index{pages!manpageXXc02!nagc.ht} -\index{nagc.ht!pages!manpageXXc02} -\index{manpageXXc02!nagc.ht!pages} +\pagehead{manpageXXc02}{nagc.ht}{ Zeros of Polynomials} <>= \begin{page}{manpageXXc02}{NAG Documentation: c02} \beginscroll @@ -67569,11 +61806,7 @@ definitions.} \end{page} @ -\subsection{ Roots of a complex polynomial equation} -\label{manpageXXc02aff} -\index{pages!manpageXXc02aff!nagc.ht} -\index{nagc.ht!pages!manpageXXc02aff} -\index{manpageXXc02aff!nagc.ht!pages} +\pagehead{manpageXXc02aff}{nagc.ht}{ Roots of a complex polynomial equation} <>= \begin{page}{manpageXXc02aff}{NAG Documentation: c02aff} \beginscroll @@ -67841,11 +62074,7 @@ definitions.} \end{page} @ -\subsection{ Roots of a real polynomial equation} -\label{manpageXXc02agf} -\index{pages!manpageXXc02agf!nagc.ht} -\index{nagc.ht!pages!manpageXXc02agf} -\index{manpageXXc02agf!nagc.ht!pages} +\pagehead{manpageXXc02agf}{nagc.ht}{ Roots of a real polynomial equation} <>= \begin{page}{manpageXXc02agf}{NAG Documentation: c02agf} \beginscroll @@ -68116,11 +62345,8 @@ definitions.} \end{page} @ -\subsection{ Roots of One or More Transcendental Equations} -\label{manpageXXc05} -\index{pages!manpageXXc05!nagc.ht} -\index{nagc.ht!pages!manpageXXc05} -\index{manpageXXc05!nagc.ht!pages} +\pagehead{manpageXXc05}{nagc.ht} +{ Roots of One or More Transcendental Equations} <>= \begin{page}{manpageXXc05}{NAG Documentation: c05} \beginscroll @@ -68344,11 +62570,8 @@ definitions.} \end{page} @ -\subsection{ Zero of a continuous function in a given interval} -\label{manpageXXc05adf} -\index{pages!manpageXXc05adf!nagc.ht} -\index{nagc.ht!pages!manpageXXc05adf} -\index{manpageXXc05adf!nagc.ht!pages} +\pagehead{manpageXXc05adf}{nagc.ht} +{ Zero of a continuous function in a given interval} <>= \begin{page}{manpageXXc05adf}{NAG Documentation: c05adf} \beginscroll @@ -68509,11 +62732,8 @@ definitions.} \end{page} @ -\subsection{ Solution of a system of nonlinear equations} -\label{manpageXXc05nbf} -\index{pages!manpageXXc05nbf!nagc.ht} -\index{nagc.ht!pages!manpageXXc05nbf} -\index{manpageXXc05nbf!nagc.ht!pages} +\pagehead{manpageXXc05nbf}{nagc.ht} +{ Solution of a system of nonlinear equations} <>= \begin{page}{manpageXXc05nbf}{NAG Documentation: c05nbf} \beginscroll @@ -68738,11 +62958,8 @@ definitions.} \end{page} @ -\subsection{ Solution of a system of nonlinear equations} -\label{manpageXXc05pbf} -\index{pages!manpageXXc05pbf!nagc.ht} -\index{nagc.ht!pages!manpageXXc05pbf} -\index{manpageXXc05pbf!nagc.ht!pages} +\pagehead{manpageXXc05pbf}{nagc.ht} +{ Solution of a system of nonlinear equations} <>= \begin{page}{manpageXXc05pbf}{NAG Documentation: c05pbf} \beginscroll @@ -69008,11 +63225,8 @@ definitions.} \end{page} @ -\subsection{ Checks the gradients of a set of non-linear functions} -\label{manpageXXc05zaf} -\index{pages!manpageXXc05zaf!nagc.ht} -\index{nagc.ht!pages!manpageXXc05zaf} -\index{manpageXXc05zaf!nagc.ht!pages} +\pagehead{manpageXXc05zaf}{nagc.ht} +{ Checks the gradients of a set of non-linear functions} <>= \begin{page}{manpageXXc05zaf}{NAG Documentation: c05zaf} \beginscroll @@ -69148,11 +63362,8 @@ definitions.} \end{page} @ -\subsection{ Discrete Fourier transform of real or complex data values} -\label{manpageXXc06} -\index{pages!manpageXXc06!nagc.ht} -\index{nagc.ht!pages!manpageXXc06} -\index{manpageXXc06!nagc.ht!pages} +\pagehead{manpageXXc06}{nagc.ht} +{ Discrete Fourier transform of real or complex data values} <>= \begin{page}{manpageXXc06}{NAG Documentation: c06} \beginscroll @@ -69555,11 +63766,8 @@ definitions.} \end{page} @ -\subsection{ Discrete Fourier transform of n real data values} -\label{manpageXXc06eaf} -\index{pages!manpageXXc06eaf!nagc.ht} -\index{nagc.ht!pages!manpageXXc06eaf} -\index{manpageXXc06eaf!nagc.ht!pages} +\pagehead{manpageXXc06eaf}{nagc.ht} +{ Discrete Fourier transform of n real data values} <>= \begin{page}{manpageXXc06eaf}{NAG Documentation: c06eaf} \beginscroll @@ -69722,11 +63930,8 @@ definitions.} \end{page} @ -\subsection{ Discrete Fourier transform of a Hermitian sequence} -\label{manpageXXc06ebf} -\index{pages!manpageXXc06ebf!nagc.ht} -\index{nagc.ht!pages!manpageXXc06ebf} -\index{manpageXXc06ebf!nagc.ht!pages} +\pagehead{manpageXXc06ebf}{nagc.ht} +{ Discrete Fourier transform of a Hermitian sequence} <>= \begin{page}{manpageXXc06ebf}{NAG Documentation: c06ebf} \beginscroll @@ -69893,11 +64098,8 @@ definitions.} \end{page} @ -\subsection{ Discrete Fourier transform of n complex data values} -\label{manpageXXc06ecf} -\index{pages!manpageXXc06ecf!nagc.ht} -\index{nagc.ht!pages!manpageXXc06ecf} -\index{manpageXXc06ecf!nagc.ht!pages} +\pagehead{manpageXXc06ecf}{nagc.ht} +{ Discrete Fourier transform of n complex data values} <>= \begin{page}{manpageXXc06ecf}{NAG Documentation: c06ecf} \beginscroll @@ -70059,11 +64261,8 @@ definitions.} \end{page} @ -\subsection{ Circular convolution or correlation of two real vectors} -\label{manpageXXc06ekf} -\index{pages!manpageXXc06ekf!nagc.ht} -\index{nagc.ht!pages!manpageXXc06ekf} -\index{manpageXXc06ekf!nagc.ht!pages} +\pagehead{manpageXXc06ekf}{nagc.ht} +{ Circular convolution or correlation of two real vectors} <>= \begin{page}{manpageXXc06ekf}{NAG Documentation: c06ekf} \beginscroll @@ -70252,11 +64451,8 @@ definitions.} \end{page} @ -\subsection{ Discrete Fourier transforms of m sequences} -\label{manpageXXc06fpf} -\index{pages!manpageXXc06fpf!nagc.ht} -\index{nagc.ht!pages!manpageXXc06fpf} -\index{manpageXXc06fpf!nagc.ht!pages} +\pagehead{manpageXXc06fpf}{nagc.ht} +{ Discrete Fourier transforms of m sequences} <>= \begin{page}{manpageXXc06fpf}{NAG Documentation: c06fpf} \beginscroll @@ -70482,11 +64678,8 @@ definitions.} \end{page} @ -\subsection{ Discrete Fourier transforms of m Hermitian sequences} -\label{manpageXXc06fqf} -\index{pages!manpageXXc06fqf!nagc.ht} -\index{nagc.ht!pages!manpageXXc06fqf} -\index{manpageXXc06fqf!nagc.ht!pages} +\pagehead{manpageXXc06fqf}{nagc.ht} +{ Discrete Fourier transforms of m Hermitian sequences} <>= \begin{page}{manpageXXc06fqf}{NAG Documentation: c06fqf} \beginscroll @@ -70706,11 +64899,8 @@ definitions.} \end{page} @ -\subsection{ Discrete Fourier transforms of m complex sequences} -\label{manpageXXc06frf} -\index{pages!manpageXXc06frf!nagc.ht} -\index{nagc.ht!pages!manpageXXc06frf} -\index{manpageXXc06frf!nagc.ht!pages} +\pagehead{manpageXXc06frf}{nagc.ht} +{ Discrete Fourier transforms of m complex sequences} <>= \begin{page}{manpageXXc06frf}{NAG Documentation: c06frf} \beginscroll @@ -70916,11 +65106,8 @@ definitions.} \end{page} @ -\subsection{ Discrete Fourier transform of bivariate complex data} -\label{manpageXXc06fuf} -\index{pages!manpageXXc06fuf!nagc.ht} -\index{nagc.ht!pages!manpageXXc06fuf} -\index{manpageXXc06fuf!nagc.ht!pages} +\pagehead{manpageXXc06fuf}{nagc.ht} +{ Discrete Fourier transform of bivariate complex data} <>= \begin{page}{manpageXXc06fuf}{NAG Documentation: c06fuf} \beginscroll @@ -71124,11 +65311,7 @@ definitions.} \end{page} @ -\subsection{ Summation of Series} -\label{manpageXXc06gbf} -\index{pages!manpageXXc06gbf!nagc.ht} -\index{nagc.ht!pages!manpageXXc06gbf} -\index{manpageXXc06gbf!nagc.ht!pages} +\pagehead{manpageXXc06gbf}{nagc.ht}{ Summation of Series} <>= \begin{page}{manpageXXc06gbf}{NAG Documentation: c06gbf} \beginscroll @@ -71228,11 +65411,8 @@ definitions.} \end{page} @ -\subsection{ Complex conjugate of a sequence of n data values} -\label{manpageXXc06gcf} -\index{pages!manpageXXc06gcf!nagc.ht} -\index{nagc.ht!pages!manpageXXc06gcf} -\index{manpageXXc06gcf!nagc.ht!pages} +\pagehead{manpageXXc06gcf}{nagc.ht} +{ Complex conjugate of a sequence of n data values} <>= \begin{page}{manpageXXc06gcf}{NAG Documentation: c06gcf} \beginscroll @@ -71322,11 +65502,8 @@ definitions.} \end{page} @ -\subsection{ Complex conjugates of m Hermitian sequences} -\label{manpageXXc06gqf} -\index{pages!manpageXXc06gqf!nagc.ht} -\index{nagc.ht!pages!manpageXXc06gqf} -\index{manpageXXc06gqf!nagc.ht!pages} +\pagehead{manpageXXc06gqf}{ngac.ht} +{ Complex conjugates of m Hermitian sequences} <>= \begin{page}{manpageXXc06gqf}{NAG Documentation: c06gqf} \beginscroll @@ -71442,11 +65619,8 @@ definitions.} \end{page} @ -\subsection{ Form real and imaginary parts of m Hermitian sequences} -\label{manpageXXc06gsf} -\index{pages!manpageXXc06gsf!nagc.ht} -\index{nagc.ht!pages!manpageXXc06gsf} -\index{manpageXXc06gsf!nagc.ht!pages} +\pagehead{manpageXXc06gsf}{nagc.ht} +{ Form real and imaginary parts of m Hermitian sequences} <>= \begin{page}{manpageXXc06gsf}{NAG Documentation: c06gsf} \beginscroll @@ -71574,11 +65748,7 @@ definitions.} @ \section{nagd.ht} -\subsection{ Quadrature} -\label{manpageXXd01} -\index{pages!manpageXXd01!nagd.ht} -\index{nagd.ht!pages!manpageXXd01} -\index{manpageXXd01!nagd.ht!pages} +\pagehead{manpageXXd01}{nagd.ht}{ Quadrature} <>= \begin{page}{manpageXXd01}{NAG Documentation: d01} \beginscroll @@ -72246,11 +66416,8 @@ definitions.} \end{page} @ -\subsection{ Approximation of the integral over a finite interval} -\label{manpageXXd01ajf} -\index{pages!manpageXXd01ajf!nagd.ht} -\index{nagd.ht!pages!manpageXXd01ajf} -\index{manpageXXd01ajf!nagd.ht!pages} +\pagehead{manpageXXd01ajf}{nagd.ht} +{ Approximation of the integral over a finite interval} <>= \begin{page}{manpageXXd01ajf}{NAG Documentation: d01ajf} \beginscroll @@ -72540,11 +66707,8 @@ definitions.} \end{page} @ -\subsection{ Adaptive integration over a finite integral} -\label{manpageXXd01akf} -\index{pages!manpageXXd01akf!nagd.ht} -\index{nagd.ht!pages!manpageXXd01akf} -\index{manpageXXd01akf!nagd.ht!pages} +\pagehead{manpageXXd01akf}{nagd.ht} +{ Adaptive integration over a finite integral} <>= \begin{page}{manpageXXd01akf}{NAG Documentation: d01akf} \beginscroll @@ -72809,11 +66973,8 @@ definitions.} \end{page} @ -\subsection{ Approximate integration with local singular points} -\label{manpageXXd01alf} -\index{pages!manpageXXd01alf!nagd.ht} -\index{nagd.ht!pages!manpageXXd01alf} -\index{manpageXXd01alf!nagd.ht!pages} +\pagehead{manpageXXd01alf}{nagd.ht} +{ Approximate integration with local singular points} <>= \begin{page}{manpageXXd01alf}{NAG Documentation: d01alf} \beginscroll @@ -73111,11 +67272,8 @@ definitions.} \end{page} @ -\subsection{ Approximate integration over a (semi-)infinite interval} -\label{manpageXXd01amf} -\index{pages!manpageXXd01amf!nagd.ht} -\index{nagd.ht!pages!manpageXXd01amf} -\index{manpageXXd01amf!nagd.ht!pages} +\pagehead{manpageXXd01amf}{nagd.ht} +{ Approximate integration over a (semi-)infinite interval} <>= \begin{page}{manpageXXd01amf}{NAG Documentation: d01amf} \beginscroll @@ -73418,11 +67576,8 @@ definitions.} \end{page} @ -\subsection{ Approximate sine or cosine transform over finite interval} -\label{manpageXXd01anf} -\index{pages!manpageXXd01anf!nagd.ht} -\index{nagd.ht!pages!manpageXXd01anf} -\index{manpageXXd01anf!nagd.ht!pages} +\pagehead{manpageXXd01anf}{nagd.ht} +{ Approximate sine or cosine transform over finite interval} <>= \begin{page}{manpageXXd01anf}{NAG Documentation: d01anf} \beginscroll @@ -73727,11 +67882,8 @@ definitions.} \end{page} @ -\subsection{ Adaptive integration of weighted function over an interval} -\label{manpageXXd01apf} -\index{pages!manpageXXd01apf!nagd.ht} -\index{nagd.ht!pages!manpageXXd01apf} -\index{manpageXXd01apf!nagd.ht!pages} +\pagehead{manpageXXd01apf}{nagd.ht} +{ Adaptive integration of weighted function over an interval} <>= \begin{page}{manpageXXd01apf}{NAG Documentation: d01apf} \beginscroll @@ -74043,11 +68195,8 @@ definitions.} \end{page} @ -\subsection{ Hilbert transform over finite interval} -\label{manpageXXd01aqf} -\index{pages!manpageXXd01aqf!nagd.ht} -\index{nagd.ht!pages!manpageXXd01aqf} -\index{manpageXXd01aqf!nagd.ht!pages} +\pagehead{manpageXXd01aqf}{nagd.ht} +{ Hilbert transform over finite interval} <>= \begin{page}{manpageXXd01aqf}{NAG Documentation: d01aqf} \beginscroll @@ -74322,11 +68471,8 @@ definitions.} \end{page} @ -\subsection{ Approximate Sine or Cosine over [$a$,$\infty$]} -\label{manpageXXd01asf} -\index{pages!manpageXXd01asf!nagd.ht} -\index{nagd.ht!pages!manpageXXd01asf} -\index{manpageXXd01asf!nagd.ht!pages} +\pagehead{manpageXXd01asf}{nagd.ht} +{ Approximate Sine or Cosine over [$a$,$\infty$]} <>= \begin{page}{manpageXXd01asf}{NAG Documentation: d01asf} \beginscroll @@ -74684,11 +68830,8 @@ definitions.} \end{page} @ -\subsection{ Weights and abscissae for Gaussian quadrature formula} -\label{manpageXXd01bbf} -\index{pages!manpageXXd01bbf!nagd.ht} -\index{nagd.ht!pages!manpageXXd01bbf} -\index{manpageXXd01bbf!nagd.ht!pages} +\pagehead{manpageXXd01bbf}{nagd.ht} +{ Weights and abscissae for Gaussian quadrature formula} <>= \begin{page}{manpageXXd01bbf}{NAG Documentation: d01bbf} \beginscroll @@ -74967,11 +69110,8 @@ definitions.} \end{page} @ -\subsection{ Multidimensional integrals with finite limits} -\label{manpageXXd01fcf} -\index{pages!manpageXXd01fcf!nagd.ht} -\index{nagd.ht!pages!manpageXXd01fcf} -\index{manpageXXd01fcf!nagd.ht!pages} +\pagehead{manpageXXd01fcf}{nagd.ht} +{ Multidimensional integrals with finite limits} <>= \begin{page}{manpageXXd01fcf}{NAG Documentation: d01fcf} \beginscroll @@ -75208,11 +69348,8 @@ definitions.} \end{page} @ -\subsection{ Third-order finite-difference integration} -\label{manpageXXd01gaf} -\index{pages!manpageXXd01gaf!nagd.ht} -\index{nagd.ht!pages!manpageXXd01gaf} -\index{manpageXXd01gaf!nagd.ht!pages} +\pagehead{manpageXXd01gaf}{nagd.ht} +{ Third-order finite-difference integration} <>= \begin{page}{manpageXXd01gaf}{NAG Documentation: d01gaf} \beginscroll @@ -75367,11 +69504,8 @@ definitions.} \end{page} @ -\subsection{ Monte Carlo integration over hyper-rectangular regions} -\label{manpageXXd01gbf} -\index{pages!manpageXXd01gbf!nagd.ht} -\index{nagd.ht!pages!manpageXXd01gbf} -\index{manpageXXd01gbf!nagd.ht!pages} +\pagehead{manpageXXd01gbf}{nagd.ht} +{ Monte Carlo integration over hyper-rectangular regions} <>= \begin{page}{manpageXXd01gbf}{NAG Documentation: d01gbf} \beginscroll @@ -75625,11 +69759,8 @@ definitions.} \end{page} @ -\subsection{ Ordinary Differential Equations} -\label{manpageXXd02} -\index{pages!manpageXXd02!nagd.ht} -\index{nagd.ht!pages!manpageXXd02} -\index{manpageXXd02!nagd.ht!pages} +\pagehead{manpageXXd02}{nagd.ht} +{ Ordinary Differential Equations} <>= \begin{page}{manpageXXd02}{NAG Documentation: d02} \beginscroll @@ -75944,11 +70075,8 @@ definitions.} \end{page} @ -\subsection{ First-order ODE over an interval with initial conditions} -\label{manpageXXd02bbf} -\index{pages!manpageXXd02bbf!nagd.ht} -\index{nagd.ht!pages!manpageXXd02bbf} -\index{manpageXXd02bbf!nagd.ht!pages} +\pagehead{manpageXXd02bbf}{nagd.ht} +{ First-order ODE over an interval with initial conditions} <>= \begin{page}{manpageXXd02bbf}{NAG Documentation: d02bbf} \beginscroll @@ -76350,11 +70478,8 @@ definitions.} \end{page} @ -\subsection{ First-order ODE with initial conditions and user function} -\label{manpageXXd02bhf} -\index{pages!manpageXXd02bhf!nagd.ht} -\index{nagd.ht!pages!manpageXXd02bhf} -\index{manpageXXd02bhf!nagd.ht!pages} +\pagehead{manpageXXd02bhf}{nagd.ht} +{ First-order ODE with initial conditions and user function} <>= \begin{page}{manpageXXd02bhf}{NAG Documentation: d02bhf} \beginscroll @@ -76764,11 +70889,8 @@ definitions.} \end{page} @ -\subsection{ First-order ODE with variable-order, variable-step} -\label{manpageXXd02cjf} -\index{pages!manpageXXd02cjf!nagd.ht} -\index{nagd.ht!pages!manpageXXd02cjf} -\index{manpageXXd02cjf!nagd.ht!pages} +\pagehead{manpageXXd02cjf}{nagd.ht} +{ First-order ODE with variable-order, variable-step} <>= \begin{page}{manpageXXd02cjf}{NAG Documentation: d02cjf} \beginscroll @@ -77188,11 +71310,8 @@ definitions.} \end{page} @ -\subsection{ Stiff First-order ODE with variable-order, variable-step} -\label{manpageXXd02ejf} -\index{pages!manpageXXd02ejf!nagd.ht} -\index{nagd.ht!pages!manpageXXd02ejf} -\index{manpageXXd02ejf!nagd.ht!pages} +\pagehead{manpageXXd02ejf}{nagd.ht} +{ Stiff First-order ODE with variable order and step} <>= \begin{page}{manpageXXd02ejf}{NAG Documentation: d02ejf} \beginscroll @@ -77668,11 +71787,7 @@ definitions.} \end{page} @ -\subsection{ Two-point boundary-value ODE} -\label{manpageXXd02gaf} -\index{pages!manpageXXd02gaf!nagd.ht} -\index{nagd.ht!pages!manpageXXd02gaf} -\index{manpageXXd02gaf!nagd.ht!pages} +\pagehead{manpageXXd02gaf}{nagd.ht}{ Two-point boundary-value ODE} <>= \begin{page}{manpageXXd02gaf}{NAG Documentation: d02gaf} \beginscroll @@ -78010,11 +72125,8 @@ definitions.} \end{page} @ -\subsection{ Two-point boundary value ODE with deferred correction} -\label{manpageXXd02gbf} -\index{pages!manpageXXd02gbf!nagd.ht} -\index{nagd.ht!pages!manpageXXd02gbf} -\index{manpageXXd02gbf!nagd.ht!pages} +\pagehead{manpageXXd02gbf}{nagd.ht} +{ Two-point boundary value ODE with deferred correction} <>= \begin{page}{manpageXXd02gbf}{NAG Documentation: d02gbf} \beginscroll @@ -78397,11 +72509,8 @@ definitions.} \end{page} @ -\subsection{ Eignevalue of regular singular 2nd-order Sturm-Liouville} -\label{manpageXXd02kef} -\index{pages!manpageXXd02kef!nagd.ht} -\index{nagd.ht!pages!manpageXXd02kef} -\index{manpageXXd02kef!nagd.ht!pages} +\pagehead{manpageXXd02kef}{nagd.ht} +{ Eignevalue of regular singular 2nd-order Sturm-Liouville} <>= \begin{page}{manpageXXd02kef}{NAG Documentation: d02kef} \beginscroll @@ -79568,11 +73677,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Two-point boundary-value ODE equation systems} -\label{manpageXXd02raf} -\index{pages!manpageXXd02raf!nagd.ht} -\index{nagd.ht!pages!manpageXXd02raf} -\index{manpageXXd02raf!nagd.ht!pages} +\pagehead{manpageXXd02raf}{nagd.ht} +{ Two-point boundary-value ODE equation systems} <>= \begin{page}{manpageXXd02raf}{NAG Documentation: d02raf} \beginscroll @@ -80253,11 +74359,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Partial differential equations} -\label{manpageXXd03} -\index{pages!manpageXXd03!nagd.ht} -\index{nagd.ht!pages!manpageXXd03} -\index{manpageXXd03!nagd.ht!pages} +\pagehead{manpageXXd03}{nagd.ht}{ Partial differential equations} <>= \begin{page}{manpageXXd03}{NAG Documentation: d03} \beginscroll @@ -80599,11 +74701,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Discrete elliptic PDE on rectangular region} -\label{manpageXXd03edf} -\index{pages!manpageXXd03edf!nagd.ht} -\index{nagd.ht!pages!manpageXXd03edf} -\index{manpageXXd03edf!nagd.ht!pages} +\pagehead{manpageXXd03edf}{nagd.ht} +{ Discrete elliptic PDE on rectangular region} <>= \begin{page}{manpageXXd03edf}{NAG Documentation: d03edf} \beginscroll @@ -81000,11 +75099,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Discrete 2nd-order elliptic PDE on rectangular regions} -\label{manpageXXd03eef} -\index{pages!manpageXXd03eef!nagd.ht} -\index{nagd.ht!pages!manpageXXd03eef} -\index{manpageXXd03eef!nagd.ht!pages} +\pagehead{manpageXXd03eef}{nagd.ht} +{ Discrete 2nd-order elliptic PDE on rectangular regions} <>= \begin{page}{manpageXXd03eef}{NAG Documentation: d03eef} \beginscroll @@ -81622,11 +75718,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Helmholtz equation in 3 dimensions} -\label{manpageXXd03faf} -\index{pages!manpageXXd03faf!nagd.ht} -\index{nagd.ht!pages!manpageXXd03faf} -\index{manpageXXd03faf!nagd.ht!pages} +\pagehead{manpageXXd03faf}{nagd.ht}{ Helmholtz equation in 3 dimensions} <>= \begin{page}{manpageXXd03faf}{NAG Documentation: d03faf} \beginscroll @@ -82111,11 +76203,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) @ \section{nage.ht} -\subsection{Interpolation} -\label{manpageXXe01} -\index{pages!manpageXXe01!nage.ht} -\index{nage.ht!pages!manpageXXe01} -\index{manpageXXe01!nage.ht!pages} +\pagehead{manpageXXe01}{nage.ht}{ Interpolation} <>= \begin{page}{manpageXXe01}{NAG Documentation: e01} \beginscroll @@ -82398,11 +76486,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Cubic spline interpolant} -\label{manpageXXe01baf} -\index{pages!manpageXXe01baf!nage.ht} -\index{nage.ht!pages!manpageXXe01baf} -\index{manpageXXe01baf!nage.ht!pages} +\pagehead{manpageXXe01baf}{nage.ht}{ Cubic spline interpolant} <>= \begin{page}{manpageXXe01baf}{NAG Documentation: e01baf} \beginscroll @@ -82628,11 +76712,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Monoticity-preserving piecewise cubic Hermite interpolant} -\label{manpageXXe01bef} -\index{pages!manpageXXe01bef!nage.ht} -\index{nage.ht!pages!manpageXXe01bef} -\index{manpageXXe01bef!nage.ht!pages} +\pagehead{manpageXXe01bef}{nage.ht} +{ Monoticity-preserving piecewise cubic Hermite interpolant} <>= \begin{page}{manpageXXe01bef}{NAG Documentation: e01bef} \beginscroll @@ -82784,11 +76865,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Piecewise cubic Hermite interpolant} -\label{manpageXXe01bff} -\index{pages!manpageXXe01bff!nage.ht} -\index{nage.ht!pages!manpageXXe01bff} -\index{manpageXXe01bff!nage.ht!pages} +\pagehead{manpageXXe01bff}{nage.ht}{ Piecewise cubic Hermite interpolant} <>= \begin{page}{manpageXXe01bff}{NAG Documentation: e01bff} \beginscroll @@ -82918,11 +76995,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Piecewise cubic Hermite interpolant and 1st derivative} -\label{manpageXXe01bgf} -\index{pages!manpageXXe01bgf!nage.ht} -\index{nage.ht!pages!manpageXXe01bgf} -\index{manpageXXe01bgf!nage.ht!pages} +\pagehead{manpageXXe01bgf}{nage.ht} +{ Piecewise cubic Hermite interpolant and 1st deriv} <>= \begin{page}{manpageXXe01bgf}{NAG Documentation: e01bgf} \beginscroll @@ -83060,11 +77134,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Definite integral of piecewise cubic Hermite interpolant} -\label{manpageXXe01bhf} -\index{pages!manpageXXe01bhf!nage.ht} -\index{nage.ht!pages!manpageXXe01bhf} -\index{manpageXXe01bhf!nage.ht!pages} +\pagehead{manpageXXe01bhf}{nage.ht} +{ Definite integral of piecewise cubic Hermite interpolant} <>= \begin{page}{manpageXXe01bhf}{NAG Documentation: e01bhf} \beginscroll @@ -83187,11 +77258,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Bicubic spline interpolated surface} -\label{manpageXXe01daf} -\index{pages!manpageXXe01daf!nage.ht} -\index{nage.ht!pages!manpageXXe01daf} -\index{manpageXXe01daf!nage.ht!pages} +\pagehead{manpageXXe01daf}{nage.ht}{ Bicubic spline interpolated surface} <>= \begin{page}{manpageXXe01daf}{NAG Documentation: e01daf} \beginscroll @@ -83500,11 +77567,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Two-D surface interpolating a set of scattered data points} -\label{manpageXXe01saf} -\index{pages!manpageXXe01saf!nage.ht} -\index{nage.ht!pages!manpageXXe01saf} -\index{manpageXXe01saf!nage.ht!pages} +\pagehead{manpageXXe01saf}{nage.ht} +{ Two-D surface interpolating a set of scattered data points} <>= \begin{page}{manpageXXe01saf}{NAG Documentation: e01saf} \beginscroll @@ -83670,11 +77734,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Evaluate 2D interpolant function from E01SAF} -\label{manpageXXe01sbf} -\index{pages!manpageXXe01sbf!nage.ht} -\index{nage.ht!pages!manpageXXe01sbf} -\index{manpageXXe01sbf!nage.ht!pages} +\pagehead{manpageXXe01sbf}{nage.ht} +{ Evaluate 2D interpolant function from E01SAF} <>= \begin{page}{manpageXXe01sbf}{NAG Documentation: e01sbf} \beginscroll @@ -83827,11 +77888,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Generate 2D surface interpolating a scattered data points} -\label{manpageXXe01sef} -\index{pages!manpageXXe01sef!nage.ht} -\index{nage.ht!pages!manpageXXe01sef} -\index{manpageXXe01sef!nage.ht!pages} +\pagehead{manpageXXe01sef}{nage.ht} +{ Generate 2D surface interpolating a scattered data points} <>= \begin{page}{manpageXXe01sef}{NAG Documentation: e01sef} \beginscroll @@ -84093,11 +78151,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Evaluate 2D interpolating function from E01SEF} -\label{manpageXXe01sff} -\index{pages!manpageXXe01sff!nage.ht} -\index{nage.ht!pages!manpageXXe01sff} -\index{manpageXXe01sff!nage.ht!pages} +\pagehead{manpageXXe01sff}{nage.ht} +{ Evaluate 2D interpolating function from E01SEF} <>= \begin{page}{manpageXXe01sff}{NAG Documentation: e01sff} \beginscroll @@ -84242,11 +78297,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Curve and Surface Fitting} -\label{manpageXXe02} -\index{pages!manpageXXe02!nage.ht} -\index{nage.ht!pages!manpageXXe02} -\index{manpageXXe02!nage.ht!pages} +\pagehead{manpageXXe02}{nage.ht}{ Curve and Surface Fitting} <>= \begin{page}{manpageXXe02}{NAG Documentation: e02} \beginscroll @@ -85502,11 +79553,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Least-squares polynomial approximations} -\label{manpageXXe02adf} -\index{pages!manpageXXe02adf!nage.ht} -\index{nage.ht!pages!manpageXXe02adf} -\index{manpageXXe02adf!nage.ht!pages} +\pagehead{manpageXXe02adf}{nage.ht}{ Least-squares polynomial approximations} <>= \begin{page}{manpageXXe02adf}{NAG Documentation: e02adf} \beginscroll @@ -85781,11 +79828,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Evaluate polynomial from Chebyshev-series representation} -\label{manpageXXe02aef} -\index{pages!manpageXXe02aef!nage.ht} -\index{nage.ht!pages!manpageXXe02aef} -\index{manpageXXe02aef!nage.ht!pages} +\pagehead{manpageXXe02aef}{nage.ht} +{ Evaluate polynomial from Chebyshev-series representation} <>= \begin{page}{manpageXXe02aef}{NAG Documentation: e02aef} \beginscroll @@ -85978,11 +80022,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Constrained weighted least-squares polynomial} -\label{manpageXXe02agf} -\index{pages!manpageXXe02agf!nage.ht} -\index{nage.ht!pages!manpageXXe02agf} -\index{manpageXXe02agf!nage.ht!pages} +\pagehead{manpageXXe02agf}{nage.ht} +{ Constrained weighted least-squares polynomial} <>= \begin{page}{manpageXXe02agf}{NAG Documentation: e02agf} \beginscroll @@ -86396,11 +80437,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Coefficients of polynomial derivative} -\label{manpageXXe02ahf} -\index{pages!manpageXXe02ahf!nage.ht} -\index{nage.ht!pages!manpageXXe02ahf} -\index{manpageXXe02ahf!nage.ht!pages} +\pagehead{manpageXXe02ahf}{nage.ht}{ Coefficients of polynomial derivative} <>= \begin{page}{manpageXXe02ahf}{NAG Documentation: e02ahf} \beginscroll @@ -86653,11 +80690,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Find coefficients of indefinite integral of polynomial} -\label{manpageXXe02ajf} -\index{pages!manpageXXe02ajf!nage.ht} -\index{nage.ht!pages!manpageXXe02ajf} -\index{manpageXXe02ajf!nage.ht!pages} +\pagehead{manpageXXe02ajf}{nage.ht} +{ Find coefficients of indefinite integral of polynomial} <>= \begin{page}{manpageXXe02ajf}{NAG Documentation: e02ajf} \beginscroll @@ -86918,11 +80952,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Evaluate polynomial in Chebyshev-series representation} -\label{manpageXXe02akf} -\index{pages!manpageXXe02akf!nage.ht} -\index{nage.ht!pages!manpageXXe02akf} -\index{manpageXXe02akf!nage.ht!pages} +\pagehead{manpageXXe02akf}{nage.ht} +{ Evaluate polynomial in Chebyshev-series representation} <>= \begin{page}{manpageXXe02akf}{NAG Documentation: e02akf} \beginscroll @@ -87130,11 +81161,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Weighted least-squares aprroximation to data points} -\label{manpageXXe02baf} -\index{pages!manpageXXe02baf!nage.ht} -\index{nage.ht!pages!manpageXXe02baf} -\index{manpageXXe02baf!nage.ht!pages} +\pagehead{manpageXXe02baf}{nage.ht} +{ Weighted least-squares aprrox to data points} <>= \begin{page}{manpageXXe02baf}{NAG Documentation: e02baf} \beginscroll @@ -87475,11 +81503,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Evaluates a cubic spline from its B-spline representation} -\label{manpageXXe02bbf} -\index{pages!manpageXXe02bbf!nage.ht} -\index{nage.ht!pages!manpageXXe02bbf} -\index{manpageXXe02bbf!nage.ht!pages} +\pagehead{manpageXXe02bbf}{nage.ht} +{ Evaluates a cubic spline from its B-spline representation} <>= \begin{page}{manpageXXe02bbf}{NAG Documentation: e02bbf} \beginscroll @@ -87679,11 +81704,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Evaluate cubic spline and 3 derivatives from B-spline} -\label{manpageXXe02bcf} -\index{pages!manpageXXe02bcf!nage.ht} -\index{nage.ht!pages!manpageXXe02bcf} -\index{manpageXXe02bcf!nage.ht!pages} +\pagehead{manpageXXe02bcf}{nage.ht} +{ Evaluate cubic spline and 3 derivatives from B-spline} <>= \begin{page}{manpageXXe02bcf}{NAG Documentation: e02bcf} \beginscroll @@ -87938,11 +81960,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Definite integral of cubic spline from B-spline} -\label{manpageXXe02bdf} -\index{pages!manpageXXe02bdf!nage.ht} -\index{nage.ht!pages!manpageXXe02bdf} -\index{manpageXXe02bdf!nage.ht!pages} +\pagehead{manpageXXe02bdf}{nage.ht} +{ Definite integral of cubic spline from B-spline} <>= \begin{page}{manpageXXe02bdf}{NAG Documentation: e02bdf} \beginscroll @@ -88131,11 +82150,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Cubic spline approximation to an arbitrary set points} -\label{manpageXXe02bef} -\index{pages!manpageXXe02bef!nage.ht} -\index{nage.ht!pages!manpageXXe02bef} -\index{manpageXXe02bef!nage.ht!pages} +\pagehead{manpageXXe02bef}{nage.ht} +{ Cubic spline approximation to an arbitrary set points} <>= \begin{page}{manpageXXe02bef}{NAG Documentation: e02bef} \beginscroll @@ -88578,11 +82594,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Minimal, weighted least-squares bicubic spline surface fit} -\label{manpageXXe02daf} -\index{pages!manpageXXe02daf!nage.ht} -\index{nage.ht!pages!manpageXXe02daf} -\index{manpageXXe02daf!nage.ht!pages} +\pagehead{manpageXXe02daf}{nage.ht} +{ Minimal, weighted least-squares bicubic spline fit} <>= \begin{page}{manpageXXe02daf}{NAG Documentation: e02daf} \beginscroll @@ -89020,11 +83033,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Bicubic spline approximation to a set of data values} -\label{manpageXXe02dcf} -\index{pages!manpageXXe02dcf!nage.ht} -\index{nage.ht!pages!manpageXXe02dcf} -\index{manpageXXe02dcf!nage.ht!pages} +\pagehead{manpageXXe02dcf}{nage.ht} +{ Bicubic spline approximation to a set of data values} <>= \begin{page}{manpageXXe02dcf}{NAG Documentation: e02dcf} \beginscroll @@ -89573,11 +83583,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Bicubic spline approximation to a set of scattered data} -\label{manpageXXe02ddf} -\index{pages!manpageXXe02ddf!nage.ht} -\index{nage.ht!pages!manpageXXe02ddf} -\index{manpageXXe02ddf!nage.ht!pages} +\pagehead{manpageXXe02ddf}{nage.ht} +{ Bicubic spline approximation to a set of scattered data} <>= \begin{page}{manpageXXe02ddf}{NAG Documentation: e02ddf} \beginscroll @@ -90167,11 +84174,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Calculates values of a bicubic spline from B-spline} -\label{manpageXXe02def} -\index{pages!manpageXXe02def!nage.ht} -\index{nage.ht!pages!manpageXXe02def} -\index{manpageXXe02def!nage.ht!pages} +\pagehead{manpageXXe02def}{nage.ht} +{ Calculates values of a bicubic spline from B-spline} <>= \begin{page}{manpageXXe02def}{NAG Documentation: e02def} \beginscroll @@ -90360,11 +84364,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Calculates values of a bicubic spline from B-spline} -\label{manpageXXe02dff} -\index{pages!manpageXXe02dff!nage.ht} -\index{nage.ht!pages!manpageXXe02dff} -\index{manpageXXe02dff!nage.ht!pages} +\pagehead{manpageXXe02dff}{nage.ht} +{ Calculates values of a bicubic spline from B-spline} <>= \begin{page}{manpageXXe02dff}{NAG Documentation: e02dff} \beginscroll @@ -90593,11 +84594,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Calculates $l_1$ solution to over-determined system equations} -\label{manpageXXe02gaf} -\index{pages!manpageXXe02gaf!nage.ht} -\index{nage.ht!pages!manpageXXe02gaf} -\index{manpageXXe02gaf!nage.ht!pages} +\pagehead{manpageXXe02gaf}{nage.ht} +{ Calculates $l_1$ solution to over-determined system equations} <>= \begin{page}{manpageXXe02gaf}{NAG Documentation: e02gaf} \beginscroll @@ -90868,11 +84866,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Sorts two-dimensional data into rectangular panels} -\label{manpageXXe02zaf} -\index{pages!manpageXXe02zaf!nage.ht} -\index{nage.ht!pages!manpageXXe02zaf} -\index{manpageXXe02zaf!nage.ht!pages} +\pagehead{manpageXXe02zaf}{nage.ht} +{ Sorts two-dimensional data into rectangular panels} <>= \begin{page}{manpageXXe02zaf}{NAG Documentation: e02zaf} \beginscroll @@ -91054,11 +85049,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Minimizing or Maximizing a Function} -\label{manpageXXe04} -\index{pages!manpageXXe04!nage.ht} -\index{nage.ht!pages!manpageXXe04} -\index{manpageXXe04!nage.ht!pages} +\pagehead{manpageXXe04}{nage.ht} +{ Minimizing or Maximizing a Function} <>= \begin{page}{manpageXXe04}{NAG Documentation: e04} \beginscroll @@ -92304,11 +86296,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Minimizes a nonlinear function of several variable} -\label{manpageXXe04dgf} -\index{pages!manpageXXe04dgf!nage.ht} -\index{nage.ht!pages!manpageXXe04dgf} -\index{manpageXXe04dgf!nage.ht!pages} +\pagehead{manpageXXe04dgf}{nage.ht} +{ Minimizes a nonlinear function of several variable} <>= \begin{page}{manpageXXe04dgf}{NAG Documentation: e04dgf} \beginscroll @@ -93065,11 +87054,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Supply optional parameters to E04DGF from file} -\label{manpageXXe04djf} -\index{pages!manpageXXe04djf!nage.ht} -\index{nage.ht!pages!manpageXXe04djf} -\index{manpageXXe04djf!nage.ht!pages} +\pagehead{manpageXXe04djf}{nage.ht} +{ Supply optional parameters to E04DGF from file} <>= \begin{page}{manpageXXe04djf}{NAG Documentation: e04djf} \beginscroll @@ -93210,11 +87196,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Supply individual optional parameters to E04DGF} -\label{manpageXXe04dkf} -\index{pages!manpageXXe04dkf!nage.ht} -\index{nage.ht!pages!manpageXXe04dkf} -\index{manpageXXe04dkf!nage.ht!pages} +\pagehead{manpageXXe04dkf}{nage.ht} +{ Supply individual optional params to E04DGF} <>= \begin{page}{manpageXXe04dkf}{NAG Documentation: e04dkf} \beginscroll @@ -93334,11 +87317,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Finding an unconstrained minimum of a sum of squares} -\label{manpageXXe04fdf} -\index{pages!manpageXXe04fdf!nage.ht} -\index{nage.ht!pages!manpageXXe04fdf} -\index{manpageXXe04fdf!nage.ht!pages} +\pagehead{manpageXXe04fdf}{nage.ht} +{ Finding an unconstrained minimum of a sum of squares} <>= \begin{page}{manpageXXe04fdf}{NAG Documentation: e04fdf} \beginscroll @@ -93624,11 +87604,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Finding an unconstrained minimum of a sum of squares} -\label{manpageXXe04gcf} -\index{pages!manpageXXe04gcf!nage.ht} -\index{nage.ht!pages!manpageXXe04gcf} -\index{manpageXXe04gcf!nage.ht!pages} +\pagehead{manpageXXe04gcf}{nage.ht} +{ Finding an unconstrained minimum of a sum of squares} <>= \begin{page}{manpageXXe04gcf}{NAG Documentation: e04gcf} \beginscroll @@ -93949,11 +87926,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Finding a minimum of a function} -\label{manpageXXe04jaf} -\index{pages!manpageXXe04jaf!nage.ht} -\index{nage.ht!pages!manpageXXe04jaf} -\index{manpageXXe04jaf!nage.ht!pages} +\pagehead{manpageXXe04jaf}{nage.ht}{ Finding a minimum of a function} <>= \begin{page}{manpageXXe04jaf}{NAG Documentation: e04jaf} \beginscroll @@ -94275,11 +88248,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Solving linear programming problems} -\label{manpageXXe04mbf} -\index{pages!manpageXXe04mbf!nage.ht} -\index{nage.ht!pages!manpageXXe04mbf} -\index{manpageXXe04mbf!nage.ht!pages} +\pagehead{manpageXXe04mbf}{nage.ht}{ Solving linear programming problems} <>= \begin{page}{manpageXXe04mbf}{NAG Documentation: e04mbf} \beginscroll @@ -94710,11 +88679,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Solving linear or quadratic problems} -\label{manpageXXe04naf} -\index{pages!manpageXXe04naf!nage.ht} -\index{nage.ht!pages!manpageXXe04naf} -\index{manpageXXe04naf!nage.ht!pages} +\pagehead{manpageXXe04naf}{nage.ht}{ Solving linear or quadratic problems} <>= \begin{page}{manpageXXe04naf}{NAG Documentation: e04naf} \beginscroll @@ -95702,11 +89667,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Minimize an arbitrary smooth constrainted function} -\label{manpageXXe04ucf} -\index{pages!manpageXXe04ucf!nage.ht} -\index{nage.ht!pages!manpageXXe04ucf} -\index{manpageXXe04ucf!nage.ht!pages} +\pagehead{manpageXXe04ucf}{nage.ht} +{ Minimize an arbitrary smooth constrainted function} <>= \begin{page}{manpageXXe04ucf}{NAG Documentation: e04ucf} \beginscroll @@ -98252,11 +92214,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Supply optional parameters to E04UCF from file} -\label{manpageXXe04udf} -\index{pages!manpageXXe04udf!nage.ht} -\index{nage.ht!pages!manpageXXe04udf} -\index{manpageXXe04udf!nage.ht!pages} +\pagehead{manpageXXe04udf}{nage.ht} +{ Supply optional parameters to E04UCF from file} <>= \begin{page}{manpageXXe04udf}{NAG Documentation: e04udf} \beginscroll @@ -98395,11 +92354,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Supply individual optional parameters to E04UCF} -\label{manpageXXe04uef} -\index{pages!manpageXXe04uef!nage.ht} -\index{nage.ht!pages!manpageXXe04uef} -\index{manpageXXe04uef!nage.ht!pages} +\pagehead{manpageXXe04uef}{nage.ht} +{ Supply individual optional params to E04UCF} <>= \begin{page}{manpageXXe04uef}{NAG Documentation: e04uef} \beginscroll @@ -98521,11 +92477,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Estimates of elements of the variance-covariance matrix} -\label{manpageXXe04ycf} -\index{pages!manpageXXe04ycf!nage.ht} -\index{nage.ht!pages!manpageXXe04ycf} -\index{manpageXXe04ycf!nage.ht!pages} +\pagehead{manpageXXe04ycf}{nage.ht} +{ Estimates of elements of the variance-covariance matrix} <>= \begin{page}{manpageXXe04ycf}{NAG Documentation: e04ycf} \beginscroll @@ -98852,11 +92805,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) @ \section{nagf.ht} -\subsection{Linear Algebra} -\label{manpageXXf} -\index{pages!manpageXXf!nagf.ht} -\index{nagf.ht!pages!manpageXXf} -\index{manpageXXf!nagf.ht!pages} +\pagehead{manpageXXf}{nagf.ht}{ Linear Algebra} <>= \begin{page}{manpageXXf}{NAG Documentation: f} \beginscroll @@ -99050,11 +92999,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Matrix Factorization} -\label{manpageXXf01} -\index{pages!manpageXXf01!nagf.ht} -\index{nagf.ht!pages!manpageXXf01} -\index{manpageXXf01!nagf.ht!pages} +\pagehead{manpageXXf01}{nagf.ht}{ Matrix Factorization} <>= \begin{page}{manpageXXf01}{NAG Documentation: f01} \beginscroll @@ -99195,11 +93140,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Factorizes a real sparse matrix} -\label{manpageXXf01brf} -\index{pages!manpageXXf01brf!nagf.ht} -\index{nagf.ht!pages!manpageXXf01brf} -\index{manpageXXf01brf!nagf.ht!pages} +\pagehead{manpageXXf01brf}{nagf.ht}{ Factorizes a real sparse matrix} <>= \begin{page}{manpageXXf01brf}{NAG Documentation: f01brf} \beginscroll @@ -99668,11 +93609,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Factorizes a real sparse matrix} -\label{manpageXXf01bsf} -\index{pages!manpageXXf01bsf!nagf.ht} -\index{nagf.ht!pages!manpageXXf01bsf} -\index{manpageXXf01bsf!nagf.ht!pages} +\pagehead{manpageXXf01bsf}{nagf.ht}{ Factorizes a real sparse matrix} <>= \begin{page}{manpageXXf01bsf}{NAG Documentation: f01bsf} \beginscroll @@ -99956,11 +93893,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Incomplete Cholesky factorization} -\label{manpageXXf01maf} -\index{pages!manpageXXf01maf!nagf.ht} -\index{nagf.ht!pages!manpageXXf01maf} -\index{manpageXXf01maf!nagf.ht!pages} +\pagehead{manpageXXf01maf}{nagf.ht}{ Incomplete Cholesky factorization} <>= \begin{page}{manpageXXf01maf}{NAG Documentation: f01maf} \beginscroll @@ -100348,12 +94281,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Cholesky factor of a symmetric positive-definite matrix} - -\label{manpageXXf01mcf} -\index{pages!manpageXXf01mcf!nagf.ht} -\index{nagf.ht!pages!manpageXXf01mcf} -\index{manpageXXf01mcf!nagf.ht!pages} +\pagehead{manpageXXf01mcf}{nagf.ht} +{ Cholesky factor of a symmetric positive-definite matrix} <>= \begin{page}{manpageXXf01mcf}{NAG Documentation: f01mcf} \beginscroll @@ -100571,11 +94500,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ QR factorization of the real m by n matrix A} -\label{manpageXXf01qcf} -\index{pages!manpageXXf01qcf!nagf.ht} -\index{nagf.ht!pages!manpageXXf01qcf} -\index{manpageXXf01qcf!nagf.ht!pages} +\pagehead{manpageXXf01qcf}{nagf.ht} +{ QR factorization of the real m by n matrix A} <>= \begin{page}{manpageXXf01qcf}{NAG Documentation: f01qcf} \beginscroll @@ -100816,11 +94742,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ $B:=QB$ or $B:=Q^T B$} -\label{manpageXXf01qdf} -\index{pages!manpageXXf01qdf!nagf.ht} -\index{nagf.ht!pages!manpageXXf01qdf} -\index{manpageXXf01qdf!nagf.ht!pages} +\pagehead{manpageXXf01qdf}{nagf.ht}{ $B:=QB$ or $B:=Q^T B$} <>= \begin{page}{manpageXXf01qdf}{NAG Documentation: f01qdf} \beginscroll @@ -101072,11 +94994,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ First ncolq columns of the real m by m orthogonal matrix} -\label{manpageXXf01qef} -\index{pages!manpageXXf01qef!nagf.ht} -\index{nagf.ht!pages!manpageXXf01qef} -\index{manpageXXf01qef!nagf.ht!pages} +\pagehead{manpageXXf01qef}{nagf.ht} +{ First ncolq columns of the real m by m orthogonal matrix} <>= \begin{page}{manpageXXf01qef}{NAG Documentation: f01qef} \beginscroll @@ -101286,11 +95205,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ QR factorization of the complex m by n matrix A} -\label{manpageXXf01rcf} -\index{pages!manpageXXf01rcf!nagf.ht} -\index{nagf.ht!pages!manpageXXf01rcf} -\index{manpageXXf01rcf!nagf.ht!pages} +\pagehead{manpageXXf01rcf}{nagf.ht} +{ QR factorization of the complex m by n matrix A} <>= \begin{page}{manpageXXf01rcf}{NAG Documentation: f01rcf} \beginscroll @@ -101540,11 +95456,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ $B:=QB$ or $B:=Q^H B$} -\label{manpageXXf01rdf} -\index{pages!manpageXXf01rdf!nagf.ht} -\index{nagf.ht!pages!manpageXXf01rdf} -\index{manpageXXf01rdf!nagf.ht!pages} +\pagehead{manpageXXf01rdf}{nagf.ht}{ $B:=QB$ or $B:=Q^H B$} <>= \begin{page}{manpageXXf01rdf}{NAG Documentation: f01rdf} \beginscroll @@ -101810,11 +95722,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ First ncolq columns of the complex m by m unitary matrix} -\label{manpageXXf01ref} -\index{pages!manpageXXf01ref!nagf.ht} -\index{nagf.ht!pages!manpageXXf01ref} -\index{manpageXXf01ref!nagf.ht!pages} +\pagehead{manpageXXf01ref}{nagf.ht} +{ First ncolq columns of the complex m by m unitary matrix} <>= \begin{page}{manpageXXf01ref}{NAG Documentation: f01ref} \beginscroll @@ -102039,11 +95948,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Eigenvalues and Eigenvectors} -\label{manpageXXf02} -\index{pages!manpageXXf02!nagf.ht} -\index{nagf.ht!pages!manpageXXf02} -\index{manpageXXf02!nagf.ht!pages} +\pagehead{manpageXXf02}{nagf.ht}{ Eigenvalues and Eigenvectors} <>= \begin{page}{manpageXXf02}{NAG Documentation: f02} \beginscroll @@ -102361,11 +96266,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Calculates all the eigenvalues of a real symmetric matrix} -\label{manpageXXf02aaf} -\index{pages!manpageXXf02aaf!nagf.ht} -\index{nagf.ht!pages!manpageXXf02aaf} -\index{manpageXXf02aaf!nagf.ht!pages} +\pagehead{manpageXXf02aaf}{nagf.ht} +{ Calculates all the eigenvalues of a real symmetric matrix} <>= \begin{page}{manpageXXf02aaf}{NAG Documentation: f02aaf} \beginscroll @@ -102475,11 +96377,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Eigenvalues and eigenvectors of a real symmetric matrix} -\label{manpageXXf02abf} -\index{pages!manpageXXf02abf!nagf.ht} -\index{nagf.ht!pages!manpageXXf02abf} -\index{manpageXXf02abf!nagf.ht!pages} +\pagehead{manpageXXf02abf}{nagf.ht} +{ Eigenvalues and eigenvectors of a real symmetric matrix} <>= \begin{page}{manpageXXf02abf}{NAG Documentation: f02abf} \beginscroll @@ -102609,11 +96508,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Calculates all the eigenvalues of $Ax=\lambda Bx$} -\label{manpageXXf02adf} -\index{pages!manpageXXf02adf!nagf.ht} -\index{nagf.ht!pages!manpageXXf02adf} -\index{manpageXXf02adf!nagf.ht!pages} +\pagehead{manpageXXf02adf}{nagf.ht} +{ Calculates all the eigenvalues of $Ax=\lambda Bx$} <>= \begin{page}{manpageXXf02adf}{NAG Documentation: f02adf} \beginscroll @@ -102757,11 +96653,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Eigenvalues and eigenvectors of $Ax=\lambda Bx$} -\label{manpageXXf02aef} -\index{pages!manpageXXf02aef!nagf.ht} -\index{nagf.ht!pages!manpageXXf02aef} -\index{manpageXXf02aef!nagf.ht!pages} +\pagehead{manpageXXf02aef}{nagf.ht} +{ Eigenvalues and eigenvectors of $Ax=\lambda Bx$} <>= \begin{page}{manpageXXf02aef}{NAG Documentation: f02aef} \beginscroll @@ -102938,11 +96831,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Calculates all the eigenvalues of a real unsymmetric matrix} -\label{manpageXXf02aff} -\index{pages!manpageXXf02aff!nagf.ht} -\index{nagf.ht!pages!manpageXXf02aff} -\index{manpageXXf02aff!nagf.ht!pages} +\pagehead{manpageXXf02aff}{nagf.ht} +{ Calculates all the eigenvalues of a real unsymmetric matrix} <>= \begin{page}{manpageXXf02aff}{NAG Documentation: f02aff} \beginscroll @@ -103059,11 +96949,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Eigenvalues and eigenvectors of a real unsymmetric matrix} -\label{manpageXXf02agf} -\index{pages!manpageXXf02agf!nagf.ht} -\index{nagf.ht!pages!manpageXXf02agf} -\index{manpageXXf02agf!nagf.ht!pages} +\pagehead{manpageXXf02agf}{nagf.ht} +{ Eigenvalues and eigenvectors of a real unsymmetric matrix} <>= \begin{page}{manpageXXf02agf}{NAG Documentation: f02agf} \beginscroll @@ -103209,11 +97096,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Calculates all the eigenvalues of a complex matrix} -\label{manpageXXf02ajf} -\index{pages!manpageXXf02ajf!nagf.ht} -\index{nagf.ht!pages!manpageXXf02ajf} -\index{manpageXXf02ajf!nagf.ht!pages} +\pagehead{manpageXXf02ajf}{nagf.ht} +{ Calculates all the eigenvalues of a complex matrix} <>= \begin{page}{manpageXXf02ajf}{NAG Documentation: f02ajf} \beginscroll @@ -103334,11 +97218,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Eigenvalues and eigenvectors of a complex matrix} -\label{manpageXXf02akf} -\index{pages!manpageXXf02akf!nagf.ht} -\index{nagf.ht!pages!manpageXXf02akf} -\index{manpageXXf02akf!nagf.ht!pages} +\pagehead{manpageXXf02akf}{nagf.ht} +{ Eigenvalues and eigenvectors of a complex matrix} <>= \begin{page}{manpageXXf02akf}{NAG Documentation: f02akf} \beginscroll @@ -103487,11 +97368,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Eigenvalues of a complex Hermitian matrix} -\label{manpageXXf02awf} -\index{pages!manpageXXf02awf!nagf.ht} -\index{nagf.ht!pages!manpageXXf02awf} -\index{manpageXXf02awf!nagf.ht!pages} +\pagehead{manpageXXf02awf}{nagf.ht} +{ Eigenvalues of a complex Hermitian matrix} <>= \begin{page}{manpageXXf02awf}{NAG Documentation: f02awf} \beginscroll @@ -103622,11 +97500,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Eigenvalues/eigenvectors complex Hermitian matrix} -\label{manpageXXf02axf} -\index{pages!manpageXXf02axf!nagf.ht} -\index{nagf.ht!pages!manpageXXf02axf} -\index{manpageXXf02axf!nagf.ht!pages} +\pagehead{manpageXXf02axf}{nagf.ht} +{ Eigenvalues/eigenvectors complex Hermitian matrix} <>= \begin{page}{manpageXXf02axf}{NAG Documentation: f02axf} \beginscroll @@ -103795,11 +97670,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Eigenvalues and eigenvectors of a real symmetric matrix} -\label{manpageXXf02bbf} -\index{pages!manpageXXf02bbf!nagf.ht} -\index{nagf.ht!pages!manpageXXf02bbf} -\index{manpageXXf02bbf!nagf.ht!pages} +\pagehead{manpageXXf02bbf}{nagf.ht} +{ Eigenvalues and eigenvectors of a real symmetric matrix} <>= \begin{page}{manpageXXf02bbf}{NAG Documentation: f02bbf} \beginscroll @@ -103968,11 +97840,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Eigenvalues of generalized eigenproblem $Ax=\lambda Bx$} -\label{manpageXXf02bjf} -\index{pages!manpageXXf02bjf!nagf.ht} -\index{nagf.ht!pages!manpageXXf02bjf} -\index{manpageXXf02bjf!nagf.ht!pages} +\pagehead{manpageXXf02bjf}{nagf.ht} +{ Eigenvalues of generalized eigenproblem $Ax=\lambda Bx$} <>= \begin{page}{manpageXXf02bjf}{NAG Documentation: f02bjf} \beginscroll @@ -104208,11 +98077,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Eigenvalues and eigenvectors of real sparse symmetric problem} -\label{manpageXXf02fjf} -\index{pages!manpageXXf02fjf!nagf.ht} -\index{nagf.ht!pages!manpageXXf02fjf} -\index{manpageXXf02fjf!nagf.ht!pages} +\pagehead{manpageXXf02fjf}{nagf.ht} +{ Eigenvalues and eigenvectors of real sparse symmetric problem} <>= \begin{page}{manpageXXf02fjf}{NAG Documentation: f02fjf} \beginscroll @@ -104891,11 +98757,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Singular value decomposition of a general real matrix} -\label{manpageXXf02wef} -\index{pages!manpageXXf02wef!nagf.ht} -\index{nagf.ht!pages!manpageXXf02wef} -\index{manpageXXf02wef!nagf.ht!pages} +\pagehead{manpageXXf02wef}{nagf.ht} +{ Singular value decomposition of a general real matrix} <>= \begin{page}{manpageXXf02wef}{NAG Documentation: f02wef} \beginscroll @@ -105270,11 +99133,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Singular value decomposition of a general complex matrix} -\label{manpageXXf02xef} -\index{pages!manpageXXf02xef!nagf.ht} -\index{nagf.ht!pages!manpageXXf02xef} -\index{manpageXXf02xef!nagf.ht!pages} +\pagehead{manpageXXf02xef}{nagf.ht} +{ Singular value decomposition of a general complex matrix} <>= \begin{page}{manpageXXf02xef}{NAG Documentation: f02xef} \beginscroll @@ -105640,11 +99500,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Simultaneous Linear Equations} -\label{manpageXXf04} -\index{pages!manpageXXf04!nagf.ht} -\index{nagf.ht!pages!manpageXXf04} -\index{manpageXXf04!nagf.ht!pages} +\pagehead{manpageXXf04}{nagf.ht}{ Simultaneous Linear Equations} <>= \begin{page}{manpageXXf04}{NAG Documentation: f04} \beginscroll @@ -105911,11 +99767,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Approximate solution of a set of complex linear equations} -\label{manpageXXf04adf} -\index{pages!manpageXXf04adf!nagf.ht} -\index{nagf.ht!pages!manpageXXf04adf} -\index{manpageXXf04adf!nagf.ht!pages} +\pagehead{manpageXXf04adf}{nagf.ht} +{ Approximate solution of a set of complex linear equations} <>= \begin{page}{manpageXXf04adf}{NAG Documentation: f04adf} \beginscroll @@ -106083,11 +99936,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Approximate solution of a set of real linear equations} -\label{manpageXXf04arf} -\index{pages!manpageXXf04arf!nagf.ht} -\index{nagf.ht!pages!manpageXXf04arf} -\index{manpageXXf04arf!nagf.ht!pages} +\pagehead{manpageXXf04arf}{nagf.ht} +{ Approximate solution of a set of real linear equations} <>= \begin{page}{manpageXXf04arf}{NAG Documentation: f04arf} \beginscroll @@ -106230,11 +100080,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Real symmetric positive-definite linear equations} -\label{manpageXXf04asf} -\index{pages!manpageXXf04asf!nagf.ht} -\index{nagf.ht!pages!manpageXXf04asf} -\index{manpageXXf04asf!nagf.ht!pages} +\pagehead{manpageXXf04asf}{nagf.ht} +{ Real symmetric positive-definite linear equations} <>= \begin{page}{manpageXXf04asf}{NAG Documentation: f04asf} \beginscroll @@ -106391,11 +100238,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Set of real linear equations with a single right-hand side} -\label{manpageXXf04atf} -\index{pages!manpageXXf04atf!nagf.ht} -\index{nagf.ht!pages!manpageXXf04atf} -\index{manpageXXf04atf!nagf.ht!pages} +\pagehead{manpageXXf04atf}{nagf.ht} +{ Set of real linear equations with a single right-hand side} <>= \begin{page}{manpageXXf04atf}{NAG Documentation: f04atf} \beginscroll @@ -106560,11 +100404,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Solution of a set of real sparse linear equations} -\label{manpageXXf04axf} -\index{pages!manpageXXf04axf!nagf.ht} -\index{nagf.ht!pages!manpageXXf04axf} -\index{manpageXXf04axf!nagf.ht!pages} +\pagehead{manpageXXf04axf}{nagf.ht} +{ Solution of a set of real sparse linear equations} <>= \begin{page}{manpageXXf04axf}{NAG Documentation: f04axf} \beginscroll @@ -106729,11 +100570,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ real symmetric positive-definite tridiagonal linear equations} -\label{manpageXXf04faf} -\index{pages!manpageXXf04faf!nagf.ht} -\index{nagf.ht!pages!manpageXXf04faf} -\index{manpageXXf04faf!nagf.ht!pages} +\pagehead{manpageXXf04faf}{nagf.ht} +{ Real symmetric positive-definite tridiagonal linear equations} <>= \begin{page}{manpageXXf04faf}{NAG Documentation: f04faf} \beginscroll @@ -106983,11 +100821,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Solution of a linear least-squares problem, $Ax=b$} -\label{manpageXXf04jgf} -\index{pages!manpageXXf04jgf!nagf.ht} -\index{nagf.ht!pages!manpageXXf04jgf} -\index{manpageXXf04jgf!nagf.ht!pages} +\pagehead{manpageXXf04jgf}{nagf.ht} +{ Solution of a linear least-squares problem, $Ax=b$} <>= \begin{page}{manpageXXf04jgf}{NAG Documentation: f04jgf} \beginscroll @@ -107285,11 +101120,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Sparse symmetric positive-definite system linear equations} -\label{manpageXXf04maf} -\index{pages!manpageXXf04maf!nagf.ht} -\index{nagf.ht!pages!manpageXXf04maf} -\index{manpageXXf04maf!nagf.ht!pages} +\pagehead{manpageXXf04maf}{nagf.ht} +{ Sparse symmetric positive-definite system linear equations} <>= \begin{page}{manpageXXf04maf}{NAG Documentation: f04maf} \beginscroll @@ -107586,11 +101418,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Solves a system of real sparse symmetric linear equations} -\label{manpageXXf04mbf} -\index{pages!manpageXXf04mbf!nagf.ht} -\index{nagf.ht!pages!manpageXXf04mbf} -\index{manpageXXf04mbf!nagf.ht!pages} +\pagehead{manpageXXf04mbf}{nagf.ht} +{ Solves a system of real sparse symmetric linear equations} <>= \begin{page}{manpageXXf04mbf}{NAG Documentation: f04mbf} \beginscroll @@ -108163,11 +101992,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Solution of a system of real linear equations} -\label{manpageXXf04mcf} -\index{pages!manpageXXf04mcf!nagf.ht} -\index{nagf.ht!pages!manpageXXf04mcf} -\index{manpageXXf04mcf!nagf.ht!pages} +\pagehead{manpageXXf04mcf}{nagf.ht} +{ Solution of a system of real linear equations} <>= \begin{page}{manpageXXf04mcf}{NAG Documentation: f04mcf} \beginscroll @@ -108408,11 +102234,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Solves sparse unsymmetric equations} -\label{manpageXXf04qaf} -\index{pages!manpageXXf04qaf!nagf.ht} -\index{nagf.ht!pages!manpageXXf04qaf} -\index{manpageXXf04qaf!nagf.ht!pages} +\pagehead{manpageXXf04qaf}{nagf.ht}{ Solves sparse unsymmetric equations} <>= \begin{page}{manpageXXf04qaf}{NAG Documentation: f04qaf} \beginscroll @@ -109117,11 +102939,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Linear Algebra Support Routines} -\label{manpageXXf06} -\index{pages!manpageXXf06!nagf.ht} -\index{nagf.ht!pages!manpageXXf06} -\index{manpageXXf06!nagf.ht!pages} +\pagehead{manpageXXf06}{nagf.ht}{ Linear Algebra Support Routines} <>= \begin{page}{manpageXXf06}{NAG Documentation: f06} \beginscroll @@ -110742,11 +104560,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Linear Equations (LAPACK)} -\label{manpageXXf07} -\index{pages!manpageXXf07!nagf.ht} -\index{nagf.ht!pages!manpageXXf07} -\index{manpageXXf07!nagf.ht!pages} +\pagehead{manpageXXf07}{nagf.ht}{ Linear Equations (LAPACK)} <>= \begin{page}{manpageXXf07}{NAG Documentation: f07} \beginscroll @@ -110815,11 +104629,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Computes the LU factorization of a real m by n matrix} -\label{manpageXXf07adf} -\index{pages!manpageXXf07adf!nagf.ht} -\index{nagf.ht!pages!manpageXXf07adf} -\index{manpageXXf07adf!nagf.ht!pages} +\pagehead{manpageXXf07adf}{nagf.ht} +{ Computes the LU factorization of a real m by n matrix} <>= \begin{page}{manpageXXf07adf}{NAG Documentation: f07adf} \beginscroll @@ -110965,11 +104776,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Solves a real system of linear equations} -\label{manpageXXf07aef} -\index{pages!manpageXXf07aef!nagf.ht} -\index{nagf.ht!pages!manpageXXf07aef} -\index{manpageXXf07aef!nagf.ht!pages} +\pagehead{manpageXXf07aef}{nagf.ht}{ Solves a real system of linear equations} <>= \begin{page}{manpageXXf07aef}{NAG Documentation: f07aef} \beginscroll @@ -111163,11 +104970,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Factorization of a real symmetric positive-definite matrix} -\label{manpageXXf07fdf} -\index{pages!manpageXXf07fdf!nagf.ht} -\index{nagf.ht!pages!manpageXXf07fdf} -\index{manpageXXf07fdf!nagf.ht!pages} +\pagehead{manpageXXf07fdf}{nagf.ht} +{ Factorization of a real symmetric positive-definite matrix} <>= \begin{page}{manpageXXf07fdf}{NAG Documentation: f07fdf} \beginscroll @@ -111328,11 +105132,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Real symmetric positive-definite system of linear equations} -\label{manpageXXf07fef} -\index{pages!manpageXXf07fef!nagf.ht} -\index{nagf.ht!pages!manpageXXf07fef} -\index{manpageXXf07fef!nagf.ht!pages} +\pagehead{manpageXXf07fef}{nagf.ht} +{ Real symmetric positive-definite system of linear equations} <>= \begin{page}{manpageXXf07fef}{NAG Documentation: f07fef} \beginscroll @@ -111523,11 +105324,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} \section{nagm.ht} -\subsection{ Sorting} -\label{manpageXXm01} -\index{pages!manpageXXm01!nagm.ht} -\index{nagm.ht!pages!manpageXXm01} -\index{manpageXXm01!nagm.ht!pages} +\pagehead{manpageXXm01}{nagm.ht}{ Sorting} <>= \begin{page}{manpageXXm01}{NAG Documentation: m01} \beginscroll @@ -111709,11 +105506,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Sort vector of double precision numbers} -\label{manpageXXm01caf} -\index{pages!manpageXXm01caf!nagm.ht} -\index{nagm.ht!pages!manpageXXm01caf} -\index{manpageXXm01caf!nagm.ht!pages} +\pagehead{manpageXXm01caf}{nagm.ht}{ Sort vector of double precision numbers} <>= \begin{page}{manpageXXm01caf}{NAG Documentation: m01caf} \beginscroll @@ -111836,11 +105629,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Ranks a vector of double precision numbers} -\label{manpageXXm01daf} -\index{pages!manpageXXm01daf!nagm.ht} -\index{nagm.ht!pages!manpageXXm01daf} -\index{manpageXXm01daf!nagm.ht!pages} +\pagehead{manpageXXm01daf}{nagm.ht} +{ Ranks a vector of double precision numbers} <>= \begin{page}{manpageXXm01daf}{NAG Documentation: m01daf} \beginscroll @@ -111957,11 +105747,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Ranks the rows of a matrix of double precision numbers} -\label{manpageXXm01def} -\index{pages!manpageXXm01def!nagm.ht} -\index{nagm.ht!pages!manpageXXm01def} -\index{manpageXXm01def!nagm.ht!pages} +\pagehead{manpageXXm01def}{nagm.ht} +{ Ranks the rows of a matrix of double precision numbers} <>= \begin{page}{manpageXXm01def}{NAG Documentation: m01def} \beginscroll @@ -112108,11 +105895,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Ranks the columns of a matrix of double precision numbers} -\label{manpageXXm01djf} -\index{pages!manpageXXm01djf!nagm.ht} -\index{nagm.ht!pages!manpageXXm01djf} -\index{manpageXXm01djf!nagm.ht!pages} +\pagehead{manpageXXm01djf}{nagm.ht} +{ Ranks the columns of a matrix of double precision numbers} <>= \begin{page}{manpageXXm01djf}{NAG Documentation: m01djf} \beginscroll @@ -112258,11 +106042,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Rearranges a vector of double precision numbers} -\label{manpageXXm01eaf} -\index{pages!manpageXXm01eaf!nagm.ht} -\index{nagm.ht!pages!manpageXXm01eaf} -\index{manpageXXm01eaf!nagm.ht!pages} +\pagehead{manpageXXm01eaf}{nagm.ht} +{ Rearranges a vector of double precision numbers} <>= \begin{page}{manpageXXm01eaf}{NAG Documentation: m01eaf} \beginscroll @@ -112388,11 +106169,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Inverts a permutation} -\label{manpageXXm01zaf} -\index{pages!manpageXXm01zaf!nagm.ht} -\index{nagm.ht!pages!manpageXXm01zaf} -\index{manpageXXm01zaf!nagm.ht!pages} +\pagehead{manpageXXm01zaf}{nagm.ht}{ Inverts a permutation} <>= \begin{page}{manpageXXm01zaf}{NAG Documentation: m01zaf} \beginscroll @@ -112528,11 +106305,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) @ \section{nags.ht} -\subsection{ Approximations of Special Functions} -\label{manpageXXs} -\index{pages!manpageXXs!nags.ht} -\index{nags.ht!pages!manpageXXs} -\index{manpageXXs!nags.ht!pages} +\pagehead{manpageXXs}{nags.ht}{ Approximations of Special Functions} <>= \begin{page}{manpageXXs}{NAG Documentation: s} \beginscroll @@ -113178,11 +106951,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Exponential function $e^z$ , for complex $z$} -\label{manpageXXs01eaf} -\index{pages!manpageXXs01eaf!nags.ht} -\index{nags.ht!pages!manpageXXs01eaf} -\index{manpageXXs01eaf!nags.ht!pages} +\pagehead{manpageXXs01eaf}{nags.ht} +{ Exponential function $e^z$ , for complex $z$} <>= \begin{page}{manpageXXs01eaf}{NAG Documentation: s01eaf} \beginscroll @@ -113321,11 +107091,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the value of the exponential integral $E(x)$} -\label{manpageXXs13aaf} -\index{pages!manpageXXs13aaf!nags.ht} -\index{nags.ht!pages!manpageXXs13aaf} -\index{manpageXXs13aaf!nags.ht!pages} +\pagehead{manpageXXs13aaf}{nags.ht} +{ Returns the value of the exponential integral $E(x)$} <>= \begin{page}{manpageXXs13aaf}{NAG Documentation: s13aaf} \beginscroll @@ -113475,11 +107242,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the value of the cosine integral} -\label{manpageXXs13acf} -\index{pages!manpageXXs13acf!nags.ht} -\index{nags.ht!pages!manpageXXs13acf} -\index{manpageXXs13acf!nags.ht!pages} +\pagehead{manpageXXs13acf}{nags.ht}{ Returns the value of the cosine integral} <>= \begin{page}{manpageXXs13acf}{NAG Documentation: s13acf} \beginscroll @@ -113627,11 +107390,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the value of the sine integral} -\label{manpageXXs13adf} -\index{pages!manpageXXs13adf!nags.ht} -\index{nags.ht!pages!manpageXXs13adf} -\index{manpageXXs13adf!nags.ht!pages} +\pagehead{manpageXXs13adf}{nags.ht}{ Returns the value of the sine integral} <>= \begin{page}{manpageXXs13adf}{NAG Documentation: s13adf} \beginscroll @@ -113755,11 +107514,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the value of the Gamma function} -\label{manpageXXs14aaf} -\index{pages!manpageXXs14aaf!nags.ht} -\index{nags.ht!pages!manpageXXs14aaf} -\index{manpageXXs14aaf!nags.ht!pages} +\pagehead{manpageXXs14aaf}{nags.ht}{ Returns the value of the Gamma function} <>= \begin{page}{manpageXXs14aaf}{NAG Documentation: s14aaf} \beginscroll @@ -113931,11 +107686,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns a value for the logarithm of the Gamma function} -\label{manpageXXs14abf} -\index{pages!manpageXXs14abf!nags.ht} -\index{nags.ht!pages!manpageXXs14abf} -\index{manpageXXs14abf!nags.ht!pages} +\pagehead{manpageXXs14abf}{nags.ht} +{ Returns a value for the logarithm of the Gamma function} <>= \begin{page}{manpageXXs14abf}{NAG Documentation: s14abf} \beginscroll @@ -114122,11 +107874,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ The incomplete gamma functions P(a,x) and Q(a,x)} -\label{manpageXXs14baf} -\index{pages!manpageXXs14baf!nags.ht} -\index{nags.ht!pages!manpageXXs14baf} -\index{manpageXXs14baf!nags.ht!pages} +\pagehead{manpageXXs14baf}{nags.ht} +{ Incomplete gamma functions P(a,x) and Q(a,x)} <>= \begin{page}{manpageXXs14baf}{NAG Documentation: s14baf} \beginscroll @@ -114277,11 +108026,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the value of the complementary error function} -\label{manpageXXs15adf} -\index{pages!manpageXXs15adf!nags.ht} -\index{nags.ht!pages!manpageXXs15adf} -\index{manpageXXs15adf!nags.ht!pages} +\pagehead{manpageXXs15adf}{nags.ht} +{ Returns the value of the complementary error function} <>= \begin{page}{manpageXXs15adf}{NAG Documentation: s15adf} \beginscroll @@ -114449,11 +108195,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the value of the error function erfx} -\label{manpageXXs15aef} -\index{pages!manpageXXs15aef!nags.ht} -\index{nags.ht!pages!manpageXXs15aef} -\index{manpageXXs15aef!nags.ht!pages} +\pagehead{manpageXXs15aef}{nags.ht} +{ Returns the value of the error function erfx} <>= \begin{page}{manpageXXs15aef}{NAG Documentation: s15aef} \beginscroll @@ -114570,11 +108313,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the value of the Bessel Function $Y_0(x)$} -\label{manpageXXs17acf} -\index{pages!manpageXXs17acf!nags.ht} -\index{nags.ht!pages!manpageXXs17acf} -\index{manpageXXs17acf!nags.ht!pages} +\pagehead{manpageXXs17acf}{nags.ht} +{ Returns the value of the Bessel Function $Y_0(x)$} <>= \begin{page}{manpageXXs17acf}{NAG Documentation: s17acf} \beginscroll @@ -114770,11 +108510,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the value of the Bessel Function $Y_1(x)$} -\label{manpageXXs17adf} -\index{pages!manpageXXs17adf!nags.ht} -\index{nags.ht!pages!manpageXXs17adf} -\index{manpageXXs17adf!nags.ht!pages} +\pagehead{manpageXXs17adf}{nags.ht} +{ Returns the value of the Bessel Function $Y_1(x)$} <>= \begin{page}{manpageXXs17adf}{NAG Documentation: s17adf} \beginscroll @@ -114984,11 +108721,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the value of the Bessel Function $J_0(x)$} -\label{manpageXXs17aef} -\index{pages!manpageXXs17aef!nags.ht} -\index{nags.ht!pages!manpageXXs17aef} -\index{manpageXXs17aef!nags.ht!pages} +\pagehead{manpageXXs17aef}{nags.ht} +{ Returns the value of the Bessel Function $J_0(x)$} <>= \begin{page}{manpageXXs17aef}{NAG Documentation: s17aef} \beginscroll @@ -115173,11 +108907,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the value of the Bessel Function $J_1(x)$} -\label{manpageXXs17aff} -\index{pages!manpageXXs17aff!nags.ht} -\index{nags.ht!pages!manpageXXs17aff} -\index{manpageXXs17aff!nags.ht!pages} +\pagehead{manpageXXs17aff}{nags.ht} +{ Returns the value of the Bessel Function $J_1(x)$} <>= \begin{page}{manpageXXs17aff}{NAG Documentation: s17aff} \beginscroll @@ -115364,11 +109095,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns a value for the Airy function, $Ai(x)$} -\label{manpageXXs17agf} -\index{pages!manpageXXs17agf!nags.ht} -\index{nags.ht!pages!manpageXXs17agf} -\index{manpageXXs17agf!nags.ht!pages} +\pagehead{manpageXXs17agf}{nags.ht} +{ Returns a value for the Airy function, $Ai(x)$} <>= \begin{page}{manpageXXs17agf}{NAG Documentation: s17agf} \beginscroll @@ -115576,11 +109304,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns a value of the Airy function, $Bi(x)$} -\label{manpageXXs17ahf} -\index{pages!manpageXXs17ahf!nags.ht} -\index{nags.ht!pages!manpageXXs17ahf} -\index{manpageXXs17ahf!nags.ht!pages} +\pagehead{manpageXXs17ahf}{nags.ht} +{ Returns a value of the Airy function, $Bi(x)$} <>= \begin{page}{manpageXXs17ahf}{NAG Documentation: s17ahf} \beginscroll @@ -115792,11 +109517,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Value of the derivative of the Airy function $Ai(x)$} -\label{manpageXXs17ajf} -\index{pages!manpageXXs17ajf!nags.ht} -\index{nags.ht!pages!manpageXXs17ajf} -\index{manpageXXs17ajf!nags.ht!pages} +\pagehead{manpageXXs17ajf}{nags.ht} +{ Value of the derivative of the Airy function $Ai(x)$} <>= \begin{page}{manpageXXs17ajf}{NAG Documentation: s17ajf} \beginscroll @@ -116002,11 +109724,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Value for the derivative of the Airy function $Bi(x)$} -\label{manpageXXs17akf} -\index{pages!manpageXXs17akf!nags.ht} -\index{nags.ht!pages!manpageXXs17akf} -\index{manpageXXs17akf!nags.ht!pages} +\pagehead{manpageXXs17akf}{nags.ht} +{ Value for the derivative of the Airy function $Bi(x)$} <>= \begin{page}{manpageXXs17akf}{NAG Documentation: s17akf} \beginscroll @@ -116203,11 +109922,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Values for the Bessel functions $Y_{\nu+n}(z)$} -\label{manpageXXs17dcf} -\index{pages!manpageXXs17dcf!nags.ht} -\index{nags.ht!pages!manpageXXs17dcf} -\index{manpageXXs17dcf!nags.ht!pages} +\pagehead{manpageXXs17dcf}{nags.ht} +{ Values for the Bessel functions $Y_{\nu+n}(z)$} <>= \begin{page}{manpageXXs17dcf}{NAG Documentation: s17dcf} \beginscroll @@ -116450,11 +110166,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Values for the Bessel functions $J_{\nu+n}(z)$} -\label{manpageXXs17def} -\index{pages!manpageXXs17def!nags.ht} -\index{nags.ht!pages!manpageXXs17def} -\index{manpageXXs17def!nags.ht!pages} +\pagehead{manpageXXs17def}{nags.ht} +{ Values for the Bessel functions $J_{\nu+n}(z)$} <>= \begin{page}{manpageXXs17def}{NAG Documentation: s17def} \beginscroll @@ -116689,11 +110402,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Value of the Airy function $Ai(z)$ or derivative $Ai'(z)$} -\label{manpageXXs17dgf} -\index{pages!manpageXXs17dgf!nags.ht} -\index{nags.ht!pages!manpageXXs17dgf} -\index{manpageXXs17dgf!nags.ht!pages} +\pagehead{manpageXXs17dgf}{nags.ht} +{ Value of the Airy function $Ai(z)$ or derivative $Ai'(z)$} <>= \begin{page}{manpageXXs17dgf}{NAG Documentation: s17dgf} \beginscroll @@ -116895,11 +110605,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Value of the Airy function $Bi(z)$ or derivative $Bi'(z)$} -\label{manpageXXs17dhf} -\index{pages!manpageXXs17dhf!nags.ht} -\index{nags.ht!pages!manpageXXs17dhf} -\index{manpageXXs17dhf!nags.ht!pages} +\pagehead{manpageXXs17dhf}{nags.ht} +{ Value of the Airy function $Bi(z)$ or derivative $Bi'(z)$} <>= \begin{page}{manpageXXs17dhf}{NAG Documentation: s17dhf} \beginscroll @@ -117091,11 +110798,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns a sequence of values for the Hankel functions} -\label{manpageXXs17dlf} -\index{pages!manpageXXs17dlf!nags.ht} -\index{nags.ht!pages!manpageXXs17dlf} -\index{manpageXXs17dlf!nags.ht!pages} +\pagehead{manpageXXs17dlf}{nags.ht} +{ Returns a sequence of values for the Hankel functions} <>= \begin{page}{manpageXXs17dlf}{NAG Documentation: s17dlf} \beginscroll @@ -117364,11 +111068,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the value of the modified Bessel Function $K_0(x)$} -\label{manpageXXs18acf} -\index{pages!manpageXXs18acf!nags.ht} -\index{nags.ht!pages!manpageXXs18acf} -\index{manpageXXs18acf!nags.ht!pages} +\pagehead{manpageXXs18acf}{nags.ht} +{ Returns the value of the modified Bessel Function $K_0(x)$} <>= \begin{page}{manpageXXs18acf}{NAG Documentation: s18acf} \beginscroll @@ -117546,11 +111247,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the value of the modified Bessel Function $K_1(x)$} -\label{manpageXXs18adf} -\index{pages!manpageXXs18adf!nags.ht} -\index{nags.ht!pages!manpageXXs18adf} -\index{manpageXXs18adf!nags.ht!pages} +\pagehead{manpageXXs18adf}{nags.ht} +{ Returns the value of the modified Bessel Function $K_1(x)$} <>= \begin{page}{manpageXXs18adf}{NAG Documentation: s18adf} \beginscroll @@ -117734,11 +111432,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the value of the modified Bessel Function $I_0(x)$} -\label{manpageXXs18aef} -\index{pages!manpageXXs18aef!nags.ht} -\index{nags.ht!pages!manpageXXs18aef} -\index{manpageXXs18aef!nags.ht!pages} +\pagehead{manpageXXs18aef}{nags.ht} +{ Returns the value of the modified Bessel Function $I_0(x)$} <>= \begin{page}{manpageXXs18aef}{NAG Documentation: s18aef} \beginscroll @@ -117902,11 +111597,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns a value for the modified Bessel Function $I_1(x)$} -\label{manpageXXs18aff} -\index{pages!manpageXXs18aff!nags.ht} -\index{nags.ht!pages!manpageXXs18aff} -\index{manpageXXs18aff!nags.ht!pages} +\pagehead{manpageXXs18aff}{nags.ht} +{ Returns a value for the modified Bessel Function $I_1(x)$} <>= \begin{page}{manpageXXs18aff}{NAG Documentation: s18aff} \beginscroll @@ -118066,11 +111758,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Sequence of values for the modified Bessel $K_{\nu_n}(z)$} -\label{manpageXXs18dcf} -\index{pages!manpageXXs18dcf!nags.ht} -\index{nags.ht!pages!manpageXXs18dcf} -\index{manpageXXs18dcf!nags.ht!pages} +\pagehead{manpageXXs18dcf}{nags.ht} +{ Sequence of values for the modified Bessel $K_{\nu_n}(z)$} <>= \begin{page}{manpageXXs18dcf}{NAG Documentation: s18dcf} \beginscroll @@ -118304,11 +111993,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Sequence of values for the modified Bessel $I_{\nu+n}$} -\label{manpageXXs18def} -\index{pages!manpageXXs18def!nags.ht} -\index{nags.ht!pages!manpageXXs18def} -\index{manpageXXs18def!nags.ht!pages} +\pagehead{manpageXXs18def}{nags.ht} +{ Sequence of values for the modified Bessel $I_{\nu+n}$} <>= \begin{page}{manpageXXs18def}{NAG Documentation: s18def} \beginscroll @@ -118536,11 +112222,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns a value for the Kelvin function ber x} -\label{manpageXXs19aaf} -\index{pages!manpageXXs19aaf!nags.ht} -\index{nags.ht!pages!manpageXXs19aaf} -\index{manpageXXs19aaf!nags.ht!pages} +\pagehead{manpageXXs19aaf}{nags.ht} +{ Returns a value for the Kelvin function ber x} <>= \begin{page}{manpageXXs19aaf}{NAG Documentation: s19aaf} \beginscroll @@ -118701,11 +112384,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns a value for the Kelvin function bei x} -\label{manpageXXs19abf} -\index{pages!manpageXXs19abf!nags.ht} -\index{nags.ht!pages!manpageXXs19abf} -\index{manpageXXs19abf!nags.ht!pages} +\pagehead{manpageXXs19abf}{nags.ht} +{ Returns a value for the Kelvin function bei x} <>= \begin{page}{manpageXXs19abf}{NAG Documentation: s19abf} \beginscroll @@ -118871,11 +112551,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns a value for the Kelvin function ker x} -\label{manpageXXs19acf} -\index{pages!manpageXXs19acf!nags.ht} -\index{nags.ht!pages!manpageXXs19acf} -\index{manpageXXs19acf!nags.ht!pages} +\pagehead{manpageXXs19acf}{nags.ht} +{ Returns a value for the Kelvin function ker x} <>= \begin{page}{manpageXXs19acf}{NAG Documentation: s19acf} \beginscroll @@ -119068,11 +112745,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns a value for the Kelvin function keix} -\label{manpageXXs19adf} -\index{pages!manpageXXs19adf!nags.ht} -\index{nags.ht!pages!manpageXXs19adf} -\index{manpageXXs19adf!nags.ht!pages} +\pagehead{manpageXXs19adf}{nags.ht} +{ Returns a value for the Kelvin function keix} <>= \begin{page}{manpageXXs19adf}{NAG Documentation: s19adf} \beginscroll @@ -119256,11 +112930,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns a value for the Fresnel Integral $S(x)$} -\label{manpageXXs20acf} -\index{pages!manpageXXs20acf!nags.ht} -\index{nags.ht!pages!manpageXXs20acf} -\index{manpageXXs20acf!nags.ht!pages} +\pagehead{manpageXXs20acf}{nags.ht} +{ Returns a value for the Fresnel Integral $S(x)$} <>= \begin{page}{manpageXXs20acf}{NAG Documentation: s20acf} \beginscroll @@ -119469,11 +113140,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns a value for the Fresnel Integral $C(x)$} -\label{manpageXXs20adf} -\index{pages!manpageXXs20adf!nags.ht} -\index{nags.ht!pages!manpageXXs20adf} -\index{manpageXXs20adf!nags.ht!pages} +\pagehead{manpageXXs20adf}{nags.ht} +{ Returns a value for the Fresnel Integral $C(x)$} <>= \begin{page}{manpageXXs20adf}{NAG Documentation: s20adf} \beginscroll @@ -119676,11 +113344,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns a value of an elementary integral} -\label{manpageXXs21baf} -\index{pages!manpageXXs21baf!nags.ht} -\index{nags.ht!pages!manpageXXs21baf} -\index{manpageXXs21baf!nags.ht!pages} +\pagehead{manpageXXs21baf}{nags.ht} +{ Returns a value of an elementary integral} <>= \begin{page}{manpageXXs21baf}{NAG Documentation: s21baf} \beginscroll @@ -119861,11 +113526,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Value of the symmetrised elliptic integral of first kind} -\label{manpageXXs21bbf} -\index{pages!manpageXXs21bbf!nags.ht} -\index{nags.ht!pages!manpageXXs21bbf} -\index{manpageXXs21bbf!nags.ht!pages} +\pagehead{manpageXXs21bbf}{nags.ht} +{ Value of the symmetrised elliptic integral of first kind} <>= \begin{page}{manpageXXs21bbf}{NAG Documentation: s21bbf} \beginscroll @@ -120059,11 +113721,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Value of the symmetrised elliptic integral of second kind} -\label{manpageXXs21bcf} -\index{pages!manpageXXs21bcf!nags.ht} -\index{nags.ht!pages!manpageXXs21bcf} -\index{manpageXXs21bcf!nags.ht!pages} +\pagehead{manpageXXs21bcf}{nags.ht} +{ Value of the symmetrised elliptic integral of second kind} <>= \begin{page}{manpageXXs21bcf}{NAG Documentation: s21bcf} \beginscroll @@ -120281,11 +113940,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Value of the symmetrised elliptic integral of third kind} -\label{manpageXXs21bdf} -\index{pages!manpageXXs21bdf!nags.ht} -\index{nags.ht!pages!manpageXXs21bdf} -\index{manpageXXs21bdf!nags.ht!pages} +\pagehead{manpageXXs21bdf}{nags.ht} +{ Value of the symmetrised elliptic integral of third kind} <>= \begin{page}{manpageXXs21bdf}{NAG Documentation: s21bdf} \beginscroll @@ -120530,11 +114186,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) @ \section{nagx.ht} -\subsection{ Mathematical Constants} -\label{manpageXXx01} -\index{pages!manpageXXx01!nagx.ht} -\index{nagx.ht!pages!manpageXXx01} -\index{manpageXXx01!nagx.ht!pages} +\pagehead{manpageXXx01}{nagx.ht}{ Mathematical Constants} <>= \begin{page}{manpageXXx01}{NAG Documentation: x01} \beginscroll @@ -120595,11 +114247,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Machine Constants} -\label{manpageXXx02} -\index{pages!manpageXXx02!nagx.ht} -\index{nagx.ht!pages!manpageXXx02} -\index{manpageXXx02!nagx.ht!pages} +\pagehead{manpageXXx02}{nagx.ht}{ Machine Constants} <>= \begin{page}{manpageXXx02}{NAG Documentation: x02} \beginscroll @@ -120946,11 +114594,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Input/Output Utilities} -\label{manpageXXx04} -\index{pages!manpageXXx04!nagx.ht} -\index{nagx.ht!pages!manpageXXx04} -\index{manpageXXx04!nagx.ht!pages} +\pagehead{manpageXXx04}{nagx.ht}{ Input/Output Utilities} <>= \begin{page}{manpageXXx04}{NAG Documentation: x04} \beginscroll @@ -121056,11 +114700,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Value of the current error message unit number} -\label{manpageXXx04aaf} -\index{pages!manpageXXx04aaf!nagx.ht} -\index{nagx.ht!pages!manpageXXx04aaf} -\index{manpageXXx04aaf!nagx.ht!pages} +\pagehead{manpageXXx04aaf}{nagx.ht} +{ Value of the current error message unit number} <>= \begin{page}{manpageXXx04aaf}{NAG Documentation: x04aaf} \beginscroll @@ -121160,11 +114801,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Value of the current advisory message unit number} -\label{manpageXXx04abf} -\index{pages!manpageXXx04abf!nagx.ht} -\index{nagx.ht!pages!manpageXXx04abf} -\index{manpageXXx04abf!nagx.ht!pages} +\pagehead{manpageXXx04abf}{nagx.ht} +{ Value of the current advisory message unit number} <>= \begin{page}{manpageXXx04abf}{NAG Documentation: x04abf} \beginscroll @@ -121265,11 +114903,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Print a real matrix stored in a two-dimensional array} -\label{manpageXXx04caf} -\index{pages!manpageXXx04caf!nagx.ht} -\index{nagx.ht!pages!manpageXXx04caf} -\index{manpageXXx04caf!nagx.ht!pages} +\pagehead{manpageXXx04caf}{nagx.ht} +{ Print a real matrix stored in a two-dimensional array} <>= \begin{page}{manpageXXx04caf}{NAG Documentation: x04caf} \beginscroll @@ -121449,11 +115084,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Print a complex matrix stored in a two-dimensional array} -\label{manpageXXx04daf} -\index{pages!manpageXXx04daf!nagx.ht} -\index{nagx.ht!pages!manpageXXx04daf} -\index{manpageXXx04daf!nagx.ht!pages} +\pagehead{manpageXXx04daf}{nagx.ht} +{ Print a complex matrix stored in a 2D array} <>= \begin{page}{manpageXXx04daf}{NAG Documentation: x04daf} \beginscroll @@ -121638,11 +115270,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Date and Time Utilities} -\label{manpageXXx05} -\index{pages!manpageXXx05!nagx.ht} -\index{nagx.ht!pages!manpageXXx05} -\index{manpageXXx05!nagx.ht!pages} +\pagehead{manpageXXx05}{nagx.ht}{ Date and Time Utilities} <>= \begin{page}{manpageXXx05}{NAG Documentation: x05} \beginscroll @@ -121706,11 +115334,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Returns the current date and time} -\label{manpageXXx05aaf} -\index{pages!manpageXXx05aaf!nagx.ht} -\index{nagx.ht!pages!manpageXXx05aaf} -\index{manpageXXx05aaf!nagx.ht!pages} +\pagehead{manpageXXx05aaf}{nagx.ht}{ Returns the current date and time} <>= \begin{page}{manpageXXx05aaf}{NAG Documentation: x05aaf} \beginscroll @@ -121795,11 +115419,8 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ From seven-integer format time and date to character string} -\label{manpageXXx05abf} -\index{pages!manpageXXx05abf!nagx.ht} -\index{nagx.ht!pages!manpageXXx05abf} -\index{manpageXXx05abf!nagx.ht!pages} +\pagehead{manpageXXx05abf}{nagx.ht} +{ From seven-integer format time and date to character string} <>= \begin{page}{manpageXXx05abf}{NAG Documentation: x05abf} \beginscroll @@ -121925,11 +115546,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Compares two date/time character strings} -\label{manpageXXx05acf} -\index{pages!manpageXXx05acf!nagx.ht} -\index{nagx.ht!pages!manpageXXx05acf} -\index{manpageXXx05acf!nagx.ht!pages} +\pagehead{manpageXXx05acf}{nagx.ht}{ Compares two date/time character strings} <>= \begin{page}{manpageXXx05acf}{NAG Documentation: x05acf} \beginscroll @@ -122053,11 +115670,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{ Amount of processor time used} -\label{manpageXXx05baf} -\index{pages!manpageXXx05baf!nagx.ht} -\index{nagx.ht!pages!manpageXXx05baf} -\index{manpageXXx05baf!nagx.ht!pages} +\pagehead{manpageXXx05baf}{nagx.ht}{ Amount of processor time used} <>= \begin{page}{manpageXXx05baf}{NAG Documentation: x05baf} \beginscroll @@ -122138,11 +115751,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) @ \chapter{NAG ASP Example Code} \section{aspex.ht} -\subsection{Asp1 Example Code} -\label{Asp1ExampleCode} -\index{pages!Asp1ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp1ExampleCode} -\index{Asp1ExampleCode!aspex.ht!pages} +\pagehead{Asp1ExampleCode}{aspex.ht}{Asp1 Example Code} <>= \begin{page}{Asp1ExampleCode}{Asp1 Example Code} \begin{verbatim} @@ -122155,11 +115764,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp10 Example Code} -\label{Asp10ExampleCode} -\index{pages!Asp10ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp10ExampleCode} -\index{Asp10ExampleCode!aspex.ht!pages} +\pagehead{Asp10ExampleCode}{aspex.ht}{Asp10 Example Code} <>= \begin{page}{Asp10ExampleCode}{Asp10 Example Code} \begin{verbatim} @@ -122176,11 +115781,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) @ -\subsection{Asp12 Example Code} -\label{Asp12ExampleCode} -\index{pages!Asp12ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp12ExampleCode} -\index{Asp12ExampleCode!aspex.ht!pages} +\pagehead{Asp12ExampleCode}{aspex.ht}{Asp12 Example Code} <>= \begin{page}{Asp12ExampleCode}{Asp12 Example Code} \begin{verbatim} @@ -122197,11 +115798,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp19 Example Code} -\label{Asp19ExampleCode} -\index{pages!Asp19ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp19ExampleCode} -\index{Asp19ExampleCode!aspex.ht!pages} +\pagehead{Asp19ExampleCode}{aspex.ht}{Asp19 Example Code} <>= \begin{page}{Asp19ExampleCode}{Asp19 Example Code} \begin{verbatim} @@ -122312,11 +115909,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp20 Example Code} -\label{Asp20ExampleCode} -\index{pages!Asp20ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp20ExampleCode} -\index{Asp20ExampleCode!aspex.ht!pages} +\pagehead{Asp20ExampleCode}{aspex.ht}{Asp20 Example Code} <>= \begin{page}{Asp20ExampleCode}{Asp20 Example Code} \begin{verbatim} @@ -122336,11 +115929,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp24 Example Code} -\label{Asp24ExampleCode} -\index{pages!Asp24ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp24ExampleCode} -\index{Asp24ExampleCode!aspex.ht!pages} +\pagehead{Asp24ExampleCode}{aspex.ht}{Asp24 Example Code} <>= \begin{page}{Asp24ExampleCode}{Asp24 Example Code} \begin{verbatim} @@ -122358,11 +115947,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp27 Example Code} -\label{Asp27ExampleCode} -\index{pages!Asp27ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp27ExampleCode} -\index{Asp27ExampleCode!aspex.ht!pages} +\pagehead{Asp27ExampleCode}{aspex.ht}{Asp27 Example Code} <>= \begin{page}{Asp27ExampleCode}{Asp27 Example Code} \begin{verbatim} @@ -122385,11 +115970,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp28 Example Code} -\label{Asp28ExampleCode} -\index{pages!Asp28ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp28ExampleCode} -\index{Asp28ExampleCode!aspex.ht!pages} +\pagehead{Asp28ExampleCode}{aspex.ht}{Asp28 Example Code} <>= \begin{page}{Asp28ExampleCode}{Asp28 Example Code} \begin{verbatim} @@ -122528,11 +116109,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp29 Example Code} -\label{Asp29ExampleCode} -\index{pages!Asp29ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp29ExampleCode} -\index{Asp29ExampleCode!aspex.ht!pages} +\pagehead{Asp29ExampleCode}{aspex.ht}{Asp29 Example Code} <>= \begin{page}{Asp29ExampleCode}{Asp29 Example Code} \begin{verbatim} @@ -122546,11 +116123,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp30 Example Code} -\label{Asp30ExampleCode} -\index{pages!Asp30ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp30ExampleCode} -\index{Asp30ExampleCode!aspex.ht!pages} +\pagehead{Asp30ExampleCode}{aspex.ht}{Asp30 Example Code} <>= \begin{page}{Asp30ExampleCode}{Asp30 Example Code} \begin{verbatim} @@ -122595,11 +116168,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp31 Example Code} -\label{Asp31ExampleCode} -\index{pages!Asp31ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp31ExampleCode} -\index{Asp31ExampleCode!aspex.ht!pages} +\pagehead{Asp31ExampleCode}{aspex.ht}{Asp31 Example Code} <>= \begin{page}{Asp31ExampleCode}{Asp31 Example Code} \begin{verbatim} @@ -122621,11 +116190,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp33 Example Code} -\label{Asp33ExampleCode} -\index{pages!Asp33ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp33ExampleCode} -\index{Asp33ExampleCode!aspex.ht!pages} +\pagehead{Asp33ExampleCode}{aspex.ht}{Asp33 Example Code} <>= \begin{page}{Asp33ExampleCode}{Asp33 Example Code} \begin{verbatim} @@ -122638,11 +116203,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp34 Example Code} -\label{Asp34ExampleCode} -\index{pages!Asp34ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp34ExampleCode} -\index{Asp34ExampleCode!aspex.ht!pages} +\pagehead{Asp34ExampleCode}{aspex.ht}{Asp34 Example Code} <>= \begin{page}{Asp34ExampleCode}{Asp34 Example Code} \begin{verbatim} @@ -122668,11 +116229,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp35 Example Code} -\label{Asp35ExampleCode} -\index{pages!Asp35ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp35ExampleCode} -\index{Asp35ExampleCode!aspex.ht!pages} +\pagehead{Asp35ExampleCode}{aspex.ht}{Asp35 Example Code} <>= \begin{page}{Asp35ExampleCode}{Asp35 Example Code} \begin{verbatim} @@ -122699,11 +116256,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp4 Example Code} -\label{Asp4ExampleCode} -\index{pages!Asp4ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp4ExampleCode} -\index{Asp4ExampleCode!aspex.ht!pages} +\pagehead{Asp4ExampleCode}{aspex.ht}{Asp4 Example Code} <>= \begin{page}{Asp4ExampleCode}{Asp4 Example Code} \begin{verbatim} @@ -122718,11 +116271,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp41 Example Code} -\label{Asp41ExampleCode} -\index{pages!Asp41ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp41ExampleCode} -\index{Asp41ExampleCode!aspex.ht!pages} +\pagehead{Asp41ExampleCode}{aspex.ht}{Asp41 Example Code} <>= \begin{page}{Asp41ExampleCode}{Asp41 Example Code} \begin{verbatim} @@ -122760,11 +116309,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp42 Example Code} -\label{Asp42ExampleCode} -\index{pages!Asp42ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp42ExampleCode} -\index{Asp42ExampleCode!aspex.ht!pages} +\pagehead{Asp42ExampleCode}{aspex.ht}{Asp42 Example Code} <>= \begin{page}{Asp42ExampleCode}{Asp42 Example Code} \begin{verbatim} @@ -122811,11 +116356,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp49 Example Code} -\label{Asp49ExampleCode} -\index{pages!Asp49ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp49ExampleCode} -\index{Asp49ExampleCode!aspex.ht!pages} +\pagehead{Asp49ExampleCode}{aspex.ht}{Asp49 Example Code} <>= \begin{page}{Asp49ExampleCode}{Asp49 Example Code} \begin{verbatim} @@ -122839,11 +116380,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp50 Example Code} -\label{Asp50ExampleCode} -\index{pages!Asp50ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp50ExampleCode} -\index{Asp50ExampleCode!aspex.ht!pages} +\pagehead{Asp50ExampleCode}{aspex.ht}{Asp50 Example Code} <>= \begin{page}{Asp50ExampleCode}{Asp50 Example Code} \begin{verbatim} @@ -122885,11 +116422,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp55 Example Code} -\label{Asp55ExampleCode} -\index{pages!Asp55ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp55ExampleCode} -\index{Asp55ExampleCode!aspex.ht!pages} +\pagehead{Asp55ExampleCode}{aspex.ht}{Asp55 Example Code} <>= \begin{page}{Asp55ExampleCode}{Asp55 Example Code} \begin{verbatim} @@ -122930,11 +116463,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp6 Example Code} -\label{Asp6ExampleCode} -\index{pages!Asp6ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp6ExampleCode} -\index{Asp6ExampleCode!aspex.ht!pages} +\pagehead{Asp6ExampleCode}{aspex.ht}{Asp6 Example Code} <>= \begin{page}{Asp6ExampleCode}{Asp6 Example Code} \begin{verbatim} @@ -122963,11 +116492,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp7 Example Code} -\label{Asp7ExampleCode} -\index{pages!Asp7ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp7ExampleCode} -\index{Asp7ExampleCode!aspex.ht!pages} +\pagehead{Asp7ExampleCode}{aspex.ht}{Asp7 Example Code} <>= \begin{page}{Asp7ExampleCode}{Asp7 Example Code} \begin{verbatim} @@ -122983,11 +116508,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp73 Example Code} -\label{Asp73ExampleCode} -\index{pages!Asp73ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp73ExampleCode} -\index{Asp73ExampleCode!aspex.ht!pages} +\pagehead{Asp73ExampleCode}{aspex.ht}{Asp73 Example Code} <>= \begin{page}{Asp73ExampleCode}{Asp73 Example Code} \begin{verbatim} @@ -123006,11 +116527,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp74 Example Code} -\label{Asp74ExampleCode} -\index{pages!Asp74ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp74ExampleCode} -\index{Asp74ExampleCode!aspex.ht!pages} +\pagehead{Asp74ExampleCode}{aspex.ht}{Asp74 Example Code} <>= \begin{page}{Asp74ExampleCode}{Asp74 Example Code} \begin{verbatim} @@ -123039,11 +116556,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp77 Example Code} -\label{Asp77ExampleCode} -\index{pages!Asp77ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp77ExampleCode} -\index{Asp77ExampleCode!aspex.ht!pages} +\pagehead{Asp77ExampleCode}{aspex.ht}{Asp77 Example Code} <>= \begin{page}{Asp77ExampleCode}{Asp77 Example Code} \begin{verbatim} @@ -123060,11 +116573,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp78 Example Code} -\label{Asp78ExampleCode} -\index{pages!Asp78ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp78ExampleCode} -\index{Asp78ExampleCode!aspex.ht!pages} +\pagehead{Asp78ExampleCode}{aspex.ht}{Asp78 Example Code} <>= \begin{page}{Asp78ExampleCode}{Asp78 Example Code} \begin{verbatim} @@ -123077,11 +116586,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp8 Example Code} -\label{Asp8ExampleCode} -\index{pages!Asp8ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp8ExampleCode} -\index{Asp8ExampleCode!aspex.ht!pages} +\pagehead{Asp8ExampleCode}{aspex.ht}{Asp8 Example Code} <>= \begin{page}{Asp8ExampleCode}{Asp8 Example Code} \begin{verbatim} @@ -123118,11 +116623,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp80 Example Code} -\label{Asp80ExampleCode} -\index{pages!Asp80ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp80ExampleCode} -\index{Asp80ExampleCode!aspex.ht!pages} +\pagehead{Asp80ExampleCode}{aspex.ht}{Asp80 Example Code} <>= \begin{page}{Asp80ExampleCode}{Asp80 Example Code} \begin{verbatim} @@ -123138,11 +116639,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \end{page} @ -\subsection{Asp9 Example Code} -\label{Asp9ExampleCode} -\index{pages!Asp9ExampleCode!aspex.ht} -\index{aspex.ht!pages!Asp9ExampleCode} -\index{Asp9ExampleCode!aspex.ht!pages} +\pagehead{Asp9ExampleCode}{aspex.ht}{Asp9 Example Code} <>= \begin{page}{Asp9ExampleCode}{Asp9 Example Code} \begin{verbatim} @@ -123157,11 +116654,7 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) @ \chapter{NAG ANNA Expert System} \section{annaex.ht} -\subsection{Axiom/NAG Expert System} -\label{UXANNA} -\index{pages!UXANNA!annaex.ht} -\index{annaex.ht!pages!UXANNA} -\index{UXANNA!annaex.ht!pages} +\pagehead{UXANNA}{annaex.ht}{Axiom/NAG Expert System} <>= \begin{page}{UXANNA}{Axiom/NAG Expert System} \centerline{\tt{\inputbitmap{\htbmdir{}/anna_logo.xbm}}\rm} @@ -123190,16 +116683,11 @@ D02KEF(3NAG) D02KEF D02KEF(3NAG) \endmenu \indent{0} \end{scroll} -%\unixcommand{Netscape}{netscape \ http:\/\/www.bath.ac.uk\/\~masbjd\/anna.html} \autobutt{HelpContents} \end{page} @ -\subsection{Integration} -\label{UXANNAInt} -\index{pages!UXANNAInt!annaex.ht} -\index{annaex.ht!pages!UXANNAInt} -\index{UXANNAInt!annaex.ht!pages} +\pagehead{UXANNAInt}{annex.ht}{Integration} <>= \begin{page}{UXANNAInt}{Integration} Welcome to the Integration section of {\tt @@ -123212,7 +116700,8 @@ System}. This system chooses, and uses, NAG numerical routines. \item \menulispdownlink{Integration}{(|annaInt|)}\space{}\newline \indent{5} Integrating a function over a finite or infinite range. \blankline -\item \menulispdownlink{Multiple Integration}{(|annaMInt|)}\space{}\newline +\item \menulispdownlink{Multiple Integration}{(|annaMInt|)}\space{} +\newline \indent{5} Integrating a multivariate function over a finite space. The dimensions of the space need to be 2 <= n <= 15. \blankline @@ -123227,11 +116716,7 @@ on the choice of method. \end{page} @ -\subsection{Ordinary Differential Equations} -\label{UXANNAOde} -\index{pages!UXANNAOde!annaex.ht} -\index{annaex.ht!pages!UXANNAOde} -\index{UXANNAOde!annaex.ht!pages} +\pagehead{UXANNAOde}{annaex.ht}{Ordinary Differential Equations} <>= \begin{page}{UXANNAOde}{Ordinary Differential Equations} Welcome to the Ordinary Differential Equations section of {\tt @@ -123243,13 +116728,15 @@ This system chooses, and uses, NAG numerical routines. \blankline \indent{2} \beginmenu -\item \menulispdownlink{Ordinary Differential Equations}{(|annaOde|)}\space{}\newline -\indent{5} Finding a solution to an Initial Value Problem of a set of Ordinary Differential Equations. +\item \menulispdownlink{Ordinary Differential Equations}{(|annaOde|)} +\space{}\newline +\indent{5} Finding a solution to an Initial Value Problem of a set +of Ordinary Differential Equations. \blankline \menudownlink{Examples}{UXANNAOdeEx}\newline -\indent{5} Examples of ODE problems with various features using both stiff -and non-stiff methods. Parameters can be changed to investigate the effect -on the choice of method. +\indent{5} Examples of ODE problems with various features using both +stiff and non-stiff methods. Parameters can be changed to investigate +the effect on the choice of method. \autobutt{MainHelp} \endmenu \indent{0} @@ -123257,11 +116744,7 @@ on the choice of method. \end{page} @ -\subsection{Optimization} -\label{UXANNAOpt} -\index{pages!UXANNAOpt!annaex.ht} -\index{annaex.ht!pages!UXANNAOpt} -\index{UXANNAOpt!annaex.ht!pages} +\pagehead{UXANNAOpt}{annaex.ht}{Optimization} <>= \begin{page}{UXANNAOpt}{Optimization} Welcome to the Optimization section of {\tt @@ -123280,10 +116763,12 @@ This system chooses, and uses, NAG numerical routines. \indent{4} \beginmenu \menudownlink{Examples}{UXANNAOptEx}\newline -\indent{8} Examples of optimization problems with various constraint features. +\indent{8} +Examples of optimization problems with various constraint features. \endmenu \blankline -\item \menulispdownlink{Optimization of a set of observations of a data set} +\item \menulispdownlink +{Optimization of a set of observations of a data set} {(|annaOpt2|)}\space{}\newline \indent{6} Least-squares problems. \newline @@ -123301,11 +116786,7 @@ This system chooses, and uses, NAG numerical routines. \end{page} @ -\subsection{Partial Differential Equations} -\label{UXANNAPde} -\index{pages!UXANNAPde!annaex.ht} -\index{annaex.ht!pages!UXANNAPde} -\index{UXANNAPde!annaex.ht!pages} +\pagehead{UXANNAPde}{annaex.ht}{Partial Differential Equations} <>= \begin{page}{UXANNAPde}{Partial Differential Equations} Welcome to the Partial Differential Equations section of {\tt @@ -123314,7 +116795,8 @@ Welcome to the Partial Differential Equations section of {\tt \begin{scroll} \indent{2} \beginmenu -\menulispdownlink{Second Order Elliptic Partial Differential Equation}{(|annaPDESolve|)} +\menulispdownlink{Second Order Elliptic Partial Differential Equation} +{(|annaPDESolve|)} \newline \indent{4} Discretizing the PDE: \newline @@ -123324,25 +116806,23 @@ defined on a rectangular region with boundary conditions of the form and solving the resulting seven-diagonal finite difference equations using a multigrid technique. \blankline -%\menulispdownlink{Helmholtz Equation in 3-D, Cartesian Coordinates}{(|d03fafVars|)} +%\menulispdownlink{Helmholtz Equation in 3-D, Cartesian Coordinates} +{(|d03fafVars|)} %\newline %\indent{4} Descretizing the PDE: %\newline %\centerline{\inputbitmap{\htbmdir{}/d03faf.xbm}} %and solving the resulting -%seven-diagonal finite difference equations using a method based on the Fast -%Fourier Transform. +%seven-diagonal finite difference equations using a method based on +%the Fast Fourier Transform. \endmenu \end{scroll} \autobutt{MainHelp} \end{page} @ -\subsection{Examples Using the Axiom/NAG Expert System} -\label{UXANNAOptEx} -\index{pages!UXANNAOptEx!annaex.ht} -\index{annaex.ht!pages!UXANNAOptEx} -\index{UXANNAOptEx!annaex.ht!pages} +\pagehead{UXANNAOptEx}{annaex.ht} +{Examples Using the Axiom/NAG Expert System} <>= \begin{page}{UXANNAOptEx}{Examples Using the Axiom/NAG Expert System} \begin{scroll} @@ -123355,17 +116835,20 @@ default parameters by the new values. \beginmenu \item \menulispdownlink{Example 1: \newline \indent{2} Minimize the function: -\centerline{\inputbitmap{\htbmdir{}/opt1.xbm}}}{(|annaOptDefaultSolve1|)}\space{} +\centerline{\inputbitmap{\htbmdir{}/opt1.xbm}}} +{(|annaOptDefaultSolve1|)}\space{} \blankline \item \menulispdownlink{Example 2: \newline \indent{2} Minimize the function: -\centerline{\inputbitmap{\htbmdir{}/opt2.xbm}}}{(|annaOptDefaultSolve2|)}\space{} +\centerline{\inputbitmap{\htbmdir{}/opt2.xbm}}} +{(|annaOptDefaultSolve2|)}\space{} \newline \indent{3} With conditions: \centerline{\inputbitmap{\htbmdir{}/opt2c.xbm}} \blankline \item \menulispdownlink{Example 3: \newline \indent{2} Minimize the function: -\centerline{\inputbitmap{\htbmdir{}/opt3.xbm}}}{(|annaOptDefaultSolve3|)}\space{} +\centerline{\inputbitmap{\htbmdir{}/opt3.xbm}}} +{(|annaOptDefaultSolve3|)}\space{} \newline \indent{3} With conditions: \centerline{\inputbitmap{\htbmdir{}/opt3c1.xbm}} \centerline{\inputbitmap{\htbmdir{}/opt3c2.xbm}} @@ -123394,11 +116877,8 @@ default parameters by the new values. \end{page} @ -\subsection{Examples Using the Axiom/NAG Expert System} -\label{UXANNAOpt2Ex} -\index{pages!UXANNAOpt2Ex!annaex.ht} -\index{annaex.ht!pages!UXANNAOpt2Ex} -\index{UXANNAOpt2Ex!annaex.ht!pages} +\pagehead{UXANNAOpt2Ex}{annaex.ht} +{Examples Using the Axiom/NAG Expert System} <>= \begin{page}{UXANNAOpt2Ex}{Examples Using the Axiom/NAG Expert System} \begin{scroll} @@ -123411,7 +116891,8 @@ default parameters by the new values. \beginmenu \blankline \item \menulispdownlink{Example 1: \newline -\indent{2} Calculate a least-squares minimization of the following functions: +\indent{2} Calculate a least-squares +minimization of the following functions: \centerline{\inputbitmap{\htbmdir{}/opt61.xbm}} \centerline{\inputbitmap{\htbmdir{}/opt62.xbm}} \centerline{\inputbitmap{\htbmdir{}/opt63.xbm}}} @@ -123423,11 +116904,8 @@ default parameters by the new values. @ -\subsection{Examples Using the Axiom/NAG Expert System} -\label{UXANNAIntEx} -\index{pages!UXANNAIntEx!annaex.ht} -\index{annaex.ht!pages!UXANNAIntEx} -\index{UXANNAIntEx!annaex.ht!pages} +\pagehead{UXANNAIntEx}{annaex.ht} +{Examples Using the Axiom/NAG Expert System} <>= \begin{page}{UXANNAIntEx}{Examples Using the Axiom/NAG Expert System} \begin{scroll} @@ -123480,11 +116958,8 @@ effect of the new parameters on the choice of method. \end{page} @ -\subsection{Examples Using the Axiom/NAG Expert System} -\label{UXANNAOdeEx} -\index{pages!UXANNAOdeEx!annaex.ht} -\index{annaex.ht!pages!UXANNAOdeEx} -\index{UXANNAOdeEx!annaex.ht!pages} +\pagehead{UXANNAOdeEx}{annaex.ht} +{Examples Using the Axiom/NAG Expert System} <>= \begin{page}{UXANNAOdeEx}{Examples Using the Axiom/NAG Expert System} \begin{scroll} @@ -123493,12 +116968,12 @@ then uses a suitable ODE solver to provide a solution to the system of n ODEs \center{\htbitmap{d02gaf},} for i = 1,2,...,n. \blankline -Select either of these examples and you will be presented with a page which -contains active areas for the function and its parameters. +Select either of these examples and you will be presented with a page +which contains active areas for the function and its parameters. \blankline -These parameters can be altered by selecting the area and replacing the -default parameters by the new values. In this way you can investigate the -effect of the new parameters on the choice of method. +These parameters can be altered by selecting the area and replacing +the default parameters by the new values. In this way you can +investigate the effect of the new parameters on the choice of method. \blankline \beginmenu \item \menulispdownlink{Example 1: \tab{12} @@ -123523,43 +116998,38 @@ effect of the new parameters on the choice of method. \end{page} @ -\subsection{About the Axiom/NAG Expert System} -\label{UXANNATxt} -\begin{itemize} -\item UXANNAEx \ref{UXANNAEx} on page~\pageref{UXANNAEx} -\item UXANNAIntro \ref{UXANNAIntro} on page~\pageref{UXANNAIntro} -\item UXANNADec \ref{UXANNADec} on page~\pageref{UXANNADec} -\item UXANNAInfer \ref{UXANNAInfer} on page~\pageref{UXANNAInfer} -\item UXANNAMeas \ref{UXANNAMeas} on page~\pageref{UXANNAMeas} -\end{itemize} -\index{pages!UXANNATxt!annaex.ht} -\index{annaex.ht!pages!UXANNATxt} -\index{UXANNATxt!annaex.ht!pages} +\pagehead{UXANNATxt}{annaex.ht}{About the Axiom/NAG Expert System} +\pageto{notitle}{UXANNAEx} +\pageto{notitle}{UXANNAIntro} +\pageto{notitle}{UXANNADec} +\pageto{notitle}{UXANNAInfer} +\pageto{notitle}{UXANNAMeas} <>= \begin{page}{UXANNATxt}{About the Axiom/NAG Expert System} \begin{scroll} \centerline{\tt\inputbitmap{\htbmdir{}/anna_logo.xbm}\rm} \vspace{-30}\horizontalline -In applied mathematics, electronic and chemical engineering, the modelling -process can produce a number of mathematical problems which require numerical -solutions for which symbolic methods are either not possible or not obvious. -With the plethora of numerical library routines for the solution of these -problems often the numerical analyst has to answer the question {\em Which -routine to choose?} +In applied mathematics, electronic and chemical engineering, the +modelling process can produce a number of mathematical problems which +require numerical solutions for which symbolic methods are either not +possible or not obvious. With the plethora of numerical library +routines for the solution of these problems often the numerical +analyst has to answer the question {\em Which routine to choose?} \blankline -Some analysis needs to be carried out before the -appropriate routine can be identified i.e. {\em How stiff is this ODE?} and -{\em Is this function continuous?} It may well be the case that more than -one routine is applicable to the problem. So the question may become {\em -Which is likely to be the best?} Such a choice may be critical for both -accuracy and efficiency. +Some analysis needs to be carried out before the appropriate routine +can be identified i.e. {\em How stiff is this ODE?} and {\em Is this +function continuous?} It may well be the case that more than one +routine is applicable to the problem. So the question may become {\em +Which is likely to be the best?} Such a choice may be critical for +both accuracy and efficiency. \blankline -An expert system is thus required to make this choice based on the result of -its own analysis of the problem, call the routine and act on the outcome. -This may be to put the answer in a relevant form or react to an apparent -failure of the chosen routine and thus choose and call an alternative. -It should also have sufficient explanation mechanisms to inform on the choice -of routine and the reasons for that choice. +An expert system is thus required to make this choice based on the +result of its own analysis of the problem, call the routine and act on +the outcome. This may be to put the answer in a relevant form or +react to an apparent failure of the chosen routine and thus choose and +call an alternative. It should also have sufficient explanation +mechanisms to inform on the choice of routine and the reasons for that +choice. \blankline \end{scroll} \downlink{ Examples }{UXANNAEx} @@ -123570,42 +117040,38 @@ of routine and the reasons for that choice. \end{page} @ -\subsection{Introduction to the Axiom/NAG Expert System} -\label{UXANNAIntro} -\begin{itemize} -\item UXANNADec \ref{UXANNADec} on page~\pageref{UXANNADec} -\item UXANNAInfer \ref{UXANNAInfer} on page~\pageref{UXANNAInfer} -\item UXANNAMeth \ref{UXANNAMeth} on page~\pageref{UXANNAMeth} -\item UXANNAMeas \ref{UXANNAMeas} on page~\pageref{UXANNAMeas} -\end{itemize} -\index{pages!UXANNAIntro!annaex.ht} -\index{annaex.ht!pages!UXANNAIntro} -\index{UXANNAIntro!annaex.ht!pages} +\pagehead{UXANNAIntro}{annaex.ht} +{Introduction to the Axiom/NAG Expert System} +\pageto{notitle}{UXANNADec} +\pageto{notitle}{UXANNAInfer} +\pageto{notitle}{UXANNAMeth} +\pageto{notitle}{UXANNAMeas} <>= \begin{page}{UXANNAIntro}{Introduction to the Axiom/NAG Expert System} \begin{scroll} \centerline{\tt\inputbitmap{\htbmdir{}/anna_logo.xbm}\rm} \vspace{-30}\horizontalline -Deciding amongst, and then implementing, several possible approaches to -solving a numerical problem can be daunting for a novice user, or tedious for -an expert. Different attributes of the problem need to be -identified and their possible interactions weighed up before a final decision -about which method to use can be made. +Deciding amongst, and then implementing, several possible approaches +to solving a numerical problem can be daunting for a novice user, or +tedious for an expert. Different attributes of the problem need to be +identified and their possible interactions weighed up before a final +decision about which method to use can be made. \blankline -The implementation is then largely an -automatic, if laborious, process of writing, compiling and linking usually -Fortran code. The aim is to build an expert system which will use computer -algebra to analyse such features of a problem, inference mechanisms and a -knowledge base to choose a numerical method appropriate to the solution of a -given problem. +The implementation is then largely an automatic, if laborious, process +of writing, compiling and linking usually Fortran code. The aim is to +build an expert system which will use computer algebra to analyse such +features of a problem, inference mechanisms and a knowledge base to +choose a numerical method appropriate to the solution of a given +problem. \blankline -Any interactive system is constrained by the need to provide a reasonable -response time for the user. Given the complexity of some of the analysis our -system will need to do, it is clear that we should only aim to select a good -method, rather than try to identify the best one available. The overall goal -is to provide a ``black-box'' interface to numerical software which allows -non-experts access to its full potential. It will also provide explanation -mechanisms commensurate with its role as a teaching aid. +Any interactive system is constrained by the need to provide a +reasonable response time for the user. Given the complexity of some +of the analysis our system will need to do, it is clear that we should +only aim to select a good method, rather than try to identify the best +one available. The overall goal is to provide a ``black-box'' +interface to numerical software which allows non-experts access to its +full potential. It will also provide explanation mechanisms +commensurate with its role as a teaching aid. \blankline Given, say, an integration to perform (which may or may not be able to be handled symbolically), the system should choose and apply an appropriate @@ -123634,12 +117100,8 @@ Even with this simple example, the process is quite involved. \end{page} @ -\subsection{Example using the Axiom/NAG Expert System} -\label{UXANNAEx} -See UXANNAEx2 \ref{UXANNAEx2} on page~\pageref{UXANNAEx2} -\index{pages!UXANNAEx!annaex.ht} -\index{annaex.ht!pages!UXANNAEx} -\index{UXANNAEx!annaex.ht!pages} +\pagehead{UXANNAEx}{annaex.ht}{Example using the Axiom/NAG Expert System} +\pageto{notitle}{UXANNAEx2} <>= \begin{page}{UXANNAEx}{Example using the Axiom/NAG Expert System} \begin{scroll} @@ -123652,11 +117114,14 @@ is performed as follows: }{} \xtc{ }{ -\spadpaste{ans := integrate((exp(-X^3)+exp(-3*X^2))/sqrt(X),0.0..\%plusInfinity)\bound{ans} } +\spadpaste{ans := +integrate((exp(-X^3)+exp(-3*X^2))/sqrt(X),0.0..\%plusInfinity) +\bound{ans} } } \blankline \xtc{ -It creates a composite structure for which the field containing the result can be +It creates a composite structure for which the field containing +the result can be expanded as required.\blankline }{ \spadpaste{ans . 'result\free{ans}} @@ -123667,9 +117132,9 @@ expanded as required.\blankline \spadpaste{ans . 'abserr\free{ans}} } \blankline -This system has performed the analysis described above, done the necessary -problem transformation, written any necessary Fortran, called two different -numerical routines, and amalgamated their +This system has performed the analysis described above, done the +necessary problem transformation, written any necessary Fortran, +called two different numerical routines, and amalgamated their results. This whole process was transparent to the user. \end{scroll} \autobuttons @@ -123678,12 +117143,8 @@ results. This whole process was transparent to the user. \end{page} @ -\subsection{Example using the Axiom/NAG Expert System} -\label{UXANNAEx2} -See UXANNAEx3 \ref{UXANNAEx3} on page~\pageref{UXANNAEx3} -\index{pages!UXANNAEx2!annaex.ht} -\index{annaex.ht!pages!UXANNAEx2} -\index{UXANNAEx2!annaex.ht!pages} +\pagehead{UXANNAEx2}{annaex.ht}{Example using the Axiom/NAG Expert System} +\pageto{notitle}{UXANNAEx3} <>= \begin{page}{UXANNAEx2}{Example using the Axiom/NAG Expert System} \begin{scroll} @@ -123703,8 +117164,9 @@ could be solved as follows: } \blankline \xtc{ -It creates a composite structure for which the field containing the result can be -expanded as required.\blankline +It creates a composite structure for which the field containing the +result can be expanded as required. +\blankline }{ \spadpaste{ans2 . 'result\free{ans2}} } @@ -123721,12 +117183,8 @@ expanded as required.\blankline \end{page} @ -\subsection{Example using the Axiom/NAG Expert System} -\label{UXANNAEx3} -See UXANNADec \ref{UXANNADec} on page~\pageref{UXANNADec} -\index{pages!UXANNAEx3!annaex.ht} -\index{annaex.ht!pages!UXANNAEx3} -\index{UXANNAEx3!annaex.ht!pages} +\pagehead{UXANNAEx3}{annaex.ht}{Example using the Axiom/NAG Expert System} +\pageto{notitle}{UXANNADec} <>= \begin{page}{UXANNAEx3}{Example using the Axiom/NAG Expert System} \begin{scroll} @@ -123747,8 +117205,9 @@ could be minimized as follows: } \blankline \xtc{ -It creates a composite structure for which the field containing the minimum can be -expanded as required.\blankline +It creates a composite structure for which the field containing the +minimum can be expanded as required. +\blankline }{ \spadpaste{ans3 . objf\free{ans3}} } @@ -123769,45 +117228,41 @@ expanded as required.\blankline \end{page} @ -\subsection{Decision Agents} -\label{UXANNADec} -\begin{itemize} -\item UXANNAInfer \ref{UXANNAInfer} on page~\pageref{UXANNAInfer} -\item UXANNAMeth \ref{UXANNAMeth} on page~\pageref{UXANNAMeth} -\item UXANNAMeas \ref{UXANNAMeas} on page~\pageref{UXANNAMeas} -\item UXANNAAgent \ref{UXANNAAgent} on page~\pageref{UXANNAAgent} -\end{itemize} -\index{pages!UXANNADec!annaex.ht} -\index{annaex.ht!pages!UXANNADec} -\index{UXANNADec!annaex.ht!pages} +\pagehead{UXANNADec}{annaex.ht}{Decision Agents} +\pageto{notitle}{UXANNAInfer} +\pageto{notitle}{UXANNAMeth} +\pageto{notitle}{UXANNAMeas} +\pageto{notitle}{UXANNAAgent} <>= \begin{page}{UXANNADec}{Decision Agents} \begin{scroll} \blankline -Some features are either present or absent in a problem. Examples of such -binary decisions include {\em is a matrix symmetric?} and {\em is a -function continuous?} However in practice many questions are about the {\em -degree} to which a problem exhibits a property: {\em how much does a -function oscillate?}, or {\em how stiff are these differential equations?} +Some features are either present or absent in a problem. Examples of +such binary decisions include {\em is a matrix symmetric?} and {\em is +a function continuous?} However in practice many questions are about +the {\em degree} to which a problem exhibits a property: {\em how much +does a function oscillate?}, or {\em how stiff are these differential +equations?} \blankline -We have therefore created decision agents of two types, reflecting their -property --- {\em Binary Agents} are Boolean functions returning either true -or false and {\em Intensity Functions} are quantitative and return a range of -different values, either numerical or structured types. The framework we are -developing is able to deal with both these forms of information. +We have therefore created decision agents of two types, reflecting +their property --- {\em Binary Agents} are Boolean functions returning +either true or false and {\em Intensity Functions} are quantitative +and return a range of different values, either numerical or structured +types. The framework we are developing is able to deal with both these +forms of information. \blankline In any given problem area (for example solving ordinary differential -equations, optimization etc.) we have a selection of {\em methods}. These -might be to use a particular NAG routine, or they might involve employing a -higher-level strategy such as transforming the problem into an equivalent, -but easier to solve, form. +equations, optimization etc.) we have a selection of {\em methods}. +These might be to use a particular NAG routine, or they might involve +employing a higher-level strategy such as transforming the problem +into an equivalent, but easier to solve, form. \blankline -Associated with every method we define a {\em -measure function} which assesses the suitability of that method to a -particular problem. Each measure function has access to a range of symbolic -{\em agents} which can answer questions about the various properties of the -problem in hand. +Associated with every method we define a {\em measure function} which +assesses the suitability of that method to a particular problem. Each +measure function has access to a range of symbolic {\em agents} which +can answer questions about the various properties of the problem in +hand. \blankline \end{scroll} \downlink{ Inference Mechanisms }{UXANNAInfer} @@ -123818,34 +117273,29 @@ problem in hand. \end{page} @ -\subsection{Inference Mechanisms} -\label{UXANNAInfer} -\begin{itemize} -\item UXANNAMeth \ref{UXANNAMeth} on page~\pageref{UXANNAMeth} -\item UXANNAMeas \ref{UXANNAMeas} on page~\pageref{UXANNAMeas} -\item UXANNAAgent \ref{UXANNAAgent} on page~\pageref{UXANNAAgent} -\item UXANNAEx \ref{UXANNAEx} on page~\pageref{UXANNAEx} -\end{itemize} -\index{pages!UXANNAInfer!annaex.ht} -\index{annaex.ht!pages!UXANNAInfer} -\index{UXANNAInfer!annaex.ht!pages} +\pagehead{UXANNAInfer}{annaex.ht}{Inference Mechanisms} +\pageto{notitle}{UXANNAMeth} +\pageto{notitle}{UXANNAMeas} +\pageto{notitle}{UXANNAAgent} +\pageto{notitle}{UXANNAEx} <>= \begin{page}{UXANNAInfer}{Inference Mechanisms} \begin{scroll} \blankline -The inference machine will take the problem description as provided by the -user and perform an initial analysis to verify its validity. It will -consider, in turn, all of the available methods within its knowledge base -which might solve that problem. In doing so it analyses the input problem to -find out about any attributes that could affect the ability of the methods -under consideration to perform effectively. +The inference machine will take the problem description as provided by +the user and perform an initial analysis to verify its validity. It +will consider, in turn, all of the available methods within its +knowledge base which might solve that problem. In doing so it +analyses the input problem to find out about any attributes that could +affect the ability of the methods under consideration to perform +effectively. \blankline -Some of these -measures may use lazy evaluation in the sense that, if a method already -assessed is believed to be a good candidate, and if evaluating the current -measure will be relatively expensive, then that measure will not be evaluated -unless later evidence shows that the selected method is not, in fact, a -successful strategy, for example if it has failed. +Some of these measures may use lazy evaluation in the sense that, if a +method already assessed is believed to be a good candidate, and if +evaluating the current measure will be relatively expensive, then that +measure will not be evaluated unless later evidence shows that the +selected method is not, in fact, a successful strategy, for example if +it has failed. \end{scroll} \downlink{ Method Domains }{UXANNAMeth} \downlink{ Measure Functions }{UXANNAMeas} @@ -123854,47 +117304,44 @@ successful strategy, for example if it has failed. \end{page} @ -\subsection{Method Domains} -\label{UXANNAMeth} -\begin{itemize} -\item UXANNAMeas \ref{UXANNAMeas} on page~\pageref{UXANNAMeas} -\item UXANNAAgent \ref{UXANNAAgent} on page~\pageref{UXANNAAgent} -\item UXANNAEx \ref{UXANNAEx} on page~\pageref{UXANNAEx} -\end{itemize} -\index{pages!UXANNAMeth!annaex.ht} -\index{annaex.ht!pages!UXANNAMeth} -\index{UXANNAMeth!annaex.ht!pages} +\pagehead{UXANNAMeth}{annaex.ht}{Method Domains} +\pageto{notitle}{UXANNAMeas} +\pageto{notitle}{UXANNAAgent} +\pageto{notitle}{UXANNAEx} <>= \begin{page}{UXANNAMeth}{Method Domains} \begin{scroll} \blankline An Axiom {\em domain} has been created for each method or strategy for -solving the problem. These method domains each implement two functions with -a uniform (method independant) interface. -\blankline {\bf measure:} A function which calculates an estimate of suitability of -this particular method to the problem if there is a possibility that the -method under consideration is more appropriate than one already investigated. +solving the problem. These method domains each implement two +functions with a uniform (method independant) interface. \blankline +{\bf measure:} A function which calculates an estimate of suitability +of this particular method to the problem if there is a possibility +that the method under consideration is more appropriate than one +already investigated. \blankline -If it may be possible to improve on the current favourite method, the function -will call computational agents to analyse the problem for specific features -and calculate the measure from the results these agents return, -using a variation on the Lucks/Gladwell intensity and compatibility -model if conflict between attributes, as investigated by these computational -agents, may be present. +If it may be possible to improve on the current favourite method, the +function will call computational agents to analyse the problem for +specific features and calculate the measure from the results these +agents return, using a variation on the Lucks/Gladwell intensity and +compatibility model if conflict between attributes, as investigated by +these computational agents, may be present. \blankline -{\bf implementation:} A function which may be one of two distinct kinds. -The first kind uses the interface to the NAG Library to call a particular -routine with the required parameters. Some of the parameters may need to be -calculated from the data provided before the external function call. +{\bf implementation:} A function which may be one of two distinct +kinds. The first kind uses the interface to the NAG Library to call a +particular routine with the required parameters. Some of the +parameters may need to be calculated from the data provided before the +external function call. \blankline -The other kind will apply a ``high level'' strategy to try to solve the -problem e.g.~a transformation of an expression from one that is difficult to -solve to one which is easier, or a splitting of the problem into several more -easily solvable parts. For example, for a solution of the equation above, -since the integral is semi-infinite we might wish to transform the range by, -say, using the mapping {\it y -> 1/x} on the section {\it 1 -< x < \inputbitmap{\htbmdir{}/infty.xbm}}) and -adding the result to the unmapped section {\it 0 < x < 1}. +The other kind will apply a ``high level'' strategy to try to solve +the problem e.g.~a transformation of an expression from one that is +difficult to solve to one which is easier, or a splitting of the +problem into several more easily solvable parts. For example, for a +solution of the equation above, since the integral is semi-infinite we +might wish to transform the range by, say, using the mapping +{\it y -> 1/x} +on the section {\it 1 < x < \inputbitmap{\htbmdir{}/infty.xbm}}) +and adding the result to the unmapped section {\it 0 < x < 1}. \blankline \end{scroll} \downlink{ Measure Functions }{UXANNAMeas} @@ -123903,15 +117350,9 @@ adding the result to the unmapped section {\it 0 < x < 1}. \end{page} @ -\subsection{Measure Functions} -\label{UXANNAMeas} -\begin{itemize} -\item UXANNAAgent \ref{UXANNAAgent} on page~\pageref{UXANNAAgent} -\item UXANNAEx \ref{UXANNAEx} on page~\pageref{UXANNAEx} -\end{itemize} -\index{pages!UXANNAMeas!annaex.ht} -\index{annaex.ht!pages!UXANNAMeas} -\index{UXANNAMeas!annaex.ht!pages} +\pagehead{UXANNAMeas}{annaex.ht}{Measure Functions} +\pageto{notitle}{UXANNAAgent} +\pageto{notitle}{UXANNAEx} <>= \begin{page}{UXANNAMeas}{Measure Functions} \begin{scroll} @@ -123922,29 +117363,31 @@ analysis on the problem in order to calculate the measure. There is a parameter which would contain the best compatibility value found so far. \blankline -However, the interpretation we give to the results of some tests is not -always clear-cut. If a set of tests give -conflicting advice as to the appropriateness of a particular method, it -becomes important to decide not only {\it whether} certain properties are -present but also their {\it degree}. This gives us a basis for estimating the -compatibility of each property. +However, the interpretation we give to the results of some tests is +not always clear-cut. If a set of tests give conflicting advice as to +the appropriateness of a particular method, it becomes important to +decide not only {\it whether} certain properties are present but also +their {\it degree}. This gives us a basis for estimating the +compatibility of each property. \blankline -We have taken for our model the system recommended by Lucks and Gladwell -which uses a system of measurement of compatibility allowing for interaction -and conflict between a number of attributes. All of these processes may not -be required if the choice is clear-cut e.g. we have an integral to calculate -which has a particular singularity structure for which one particular method -has been specifically constructed. However, for more difficult cases a -composite picture should be built up to calculate a true measurement. +We have taken for our model the system recommended by Lucks and +Gladwell which uses a system of measurement of compatibility allowing +for interaction and conflict between a number of attributes. All of +these processes may not be required if the choice is clear-cut e.g. we +have an integral to calculate which has a particular singularity +structure for which one particular method has been specifically +constructed. However, for more difficult cases a composite picture +should be built up to calculate a true measurement. \blankline How the compatibility functions interpret the measurements of various -attributes is up to them and may vary between differing methods. It is this -area that takes as its basis the {\it judgement} of Numerical Analysis -`experts' whether that be from the documentation (which may be deficient in -certain respects) or from alternative sources. However, its assessment of -the suitability or otherwise of a particular method is reflected in a single -normalised value facilitating the direct comparison of the suitability of a -number of possible methods. +attributes is up to them and may vary between differing methods. It +is this area that takes as its basis the {\it judgement} of Numerical +Analysis `experts' whether that be from the documentation (which may +be deficient in certain respects) or from alternative sources. +However, its assessment of the suitability or otherwise of a +particular method is reflected in a single normalised value +facilitating the direct comparison of the suitability of a number of +possible methods. \blankline \end{scroll} \downlink{ Computational Agents }{UXANNAAgent} @@ -123952,30 +117395,26 @@ number of possible methods. \end{page} @ -\subsection{Computational Agents} -\label{UXANNAAgent} -See UXANNAEx \ref{UXANNAEx} on page~\pageref{UXANNAEx} -\index{pages!UXANNAAgent!annaex.ht} -\index{annaex.ht!pages!UXANNAAgent} -\index{UXANNAAgent!annaex.ht!pages} +\pagehead{UXANNAAgent}{annaex.ht}{Computational Agents} +\pageto{notitle}{UXANNAEx} <>= \begin{page}{UXANNAAgent}{Computational Agents} \begin{scroll} \blankline Computational Agents are those program segments which investigate the -attributes of the input function or functions, such as -{\bf stiffnessAndStabilityOfODEIF} -(the {\em IF} indicates that it is an {\em Intensity Function} i.e. one that -returns a normalised real number or a set of normalised real numbers). They -are usually functions or programs written completely in the Axiom -language and implemented using computer algebra. +attributes of the input function or functions, such as {\bf +stiffnessAndStabilityOfODEIF} (the {\em IF} indicates that it is an +{\em Intensity Function} i.e. one that returns a normalised real +number or a set of normalised real numbers). They are usually +functions or programs written completely in the Axiom language and +implemented using computer algebra. \blankline -Some agents will be common to more than one problem domain whereas others -will be specific to a single domain. They also vary greatly in their -complexity. It is a fairly simple task to return details about the range of -a function since this information will have been included in the problem -specification. It is a different order of complexity to return details of -its singularity structure. +Some agents will be common to more than one problem domain whereas +others will be specific to a single domain. They also vary greatly in +their complexity. It is a fairly simple task to return details about +the range of a function since this information will have been included +in the problem specification. It is a different order of complexity +to return details of its singularity structure. \blankline \xtc{ As an example, here is a call to the computational agent {\bf @@ -123990,9 +117429,9 @@ singularitiesOf} to obtain the list of singularities of the function \spadpaste{s := singularitiesOf(tan x,[x],0..12*\%pi)$ESCONT \free{lib3} } } \blankline -Each of these computational agents which may be called by a number of method -domains retain their output in a dynamic hash-table, so speeding the process -and retaining efficiency. +Each of these computational agents which may be called by a number of +method domains retain their output in a dynamic hash-table, so +speeding the process and retaining efficiency. \end{scroll} \downlink{ Examples }{UXANNAEx} \end{page} @@ -124238,7 +117677,7 @@ RootPage IntegerPage IntegerXmpPage ugxIntegerPrimesPage - IntegerNumberTheoryFunctionsXmpPage + IntNumberTheoryFnsXmpPage IntegerExamplePage IntegerExampleProofPage IntegerProblemPage @@ -124274,12 +117713,12 @@ RootPage OctonionXmpPage DecimalExpansionXmpPage BinaryExpansionXmpPage - HexadecimalExpansionXmpPage + HexExpansionXmpPage RadixExpansionXmpPage BinaryExpansionXmpPage DecimalExpansionXmpPage RadixExpansionXmpPage - HexadecimalExpansionXmpPage + HexExpansionXmpPage RadixExpansionXmpPage PAdicPage PolynomialPage @@ -124315,7 +117754,7 @@ RootPage ugxFloatHilbertPage PermanentXmpPage VectorXmpPage - SquareMatrixXmpPage + SqMatrixXmpPage OneDimensionalArrayXmpPage TwoDimensionalArrayXmpPage ugTypesConvertPage @@ -124418,7 +117857,7 @@ RootPage BalancedBinaryTreeXmpPage BasicOperatorXmpPage BinaryExpansionXmpPage - HexadecimalExpansionXmpPage + HexExpansionXmpPage DecimalExpansion RadixExpansion BinarySearchTreeXmpPage @@ -124439,15 +117878,15 @@ RootPage CycleIndicatorsXmpPage DeRhamComplexXmpPage DecimalExpansionXmpPage - HexadecimalExpansionXmpPage + HexExpansionXmpPage BinaryExpansion RadixExpansion - DistributedMultivariatePolynomialXmpPage + DistributedMultivariatePolyXmpPage ugIntroVariablesPage ugTypesConvertPage PolynomialXmpPage - UnivariatePolynomialXmpPage - MultivariatePolynomialXmpPage + UnivariatePolyXmpPage + MultivariatePolyXmpPage DoubleFloatXmpPage EqTableXmpPage TableXmpPage @@ -124466,9 +117905,9 @@ RootPage ugxFactoredExpandPage ugxFactoredArithPage ugxFactoredNewPage - FactoredFunctionsTwoXmpPage + FactoredFnsTwoXmpPage ugxFactoredVarPage - FactoredFunctionsTwoXmpPage + FactoredFnsTwoXmpPage FactoredXmpPage ugProblemGaloisPage FileXmpPage @@ -124484,23 +117923,23 @@ RootPage FractionXmpPage ContinuedFractionXmpPage PartialFractionXmpPage - FullPartialFractionExpansionXmpPage + FullPartialFracExpansionXmpPage PartialFractionXmpPage GeneralSparseTableXmpPage TableXmpPage - GroebnerFactorizationPackageXmpPage + GroebnerFactorizationPkgXmpPage HeapXmpPage FlexibleArray - HexadecimalExpansionXmpPage + HexExpansionXmpPage DecimalExpansion BinaryExpansion RadixExpansion IntegerXmpPage ugIntroNumbersPage - IntegerNumberTheoryFunctionsXmpPage + IntNumberTheoryFnsXmpPage DecimalExpansionXmpPage BinaryExpansionXmpPage - HexadecimalExpansionXmpPage + HexExpansionXmpPage RadixExpansionXmpPage ugxIntegerBasicPage FractionXmpPage @@ -124510,9 +117949,9 @@ RootPage FactoredXmpPage ComplexXmpPage ugxIntegerNTPage - IntegerNumberTheoryFunctionsXmpPage + IntNumberTheoryFnsXmpPage IntegerLinearDependenceXmpPage - IntegerNumberTheoryFunctionsXmpPage + IntNumberTheoryFnsXmpPage KernelXmpPage BasicOperatorXmpPage ExpressionXmpPage @@ -124520,7 +117959,7 @@ RootPage FileXmpPage TextFileXmpPage LibraryXmpPage - LexTriangularPackageXmpPage + LexTriangularPkgXmpPage LazardSetSolvingPackageXmpPage LibraryXmpPage FileXmpPage @@ -124532,9 +117971,9 @@ RootPage ugxLinearOrdinaryDifferentialOperatorSeriesPage LinearOrdinaryDifferentialOperatorOneXmpPage ugxLinearOrdinaryDifferentialOperatorOneRatPage - LinearOrdinaryDifferentialOperatorTwoXmpPage - ugxLinearOrdinaryDifferentialOperatorTwoConstPage - ugxLinearOrdinaryDifferentialOperatorTwoMatrixPage + LinearODEOperatorTwoXmpPage + ugxLinearODEOperatorTwoConstPage + ugxLinearODEOperatorTwoMatrixPage ListXmpPage ugxListCreatePage ugxListAccessPage @@ -124557,10 +117996,10 @@ RootPage OneDimensionalArrayXmpPage TwoDimensionalArrayXmpPage MultiSetXmpPage - MultivariatePolynomialXmpPage + MultivariatePolyXmpPage PolynomialXmpPage - UnivariatePolynomialXmpPage - DistributedMultivariatePolynomialXmpPage + UnivariatePolyXmpPage + DistributedMultivariatePolyXmpPage NoneXmpPage OctonionXmpPage QuaternionXmpPage @@ -124569,19 +118008,19 @@ RootPage FlexibleArrayXmpPage OperatorXmpPage OrderedVariableListXmpPage - OrderlyDifferentialPolynomialXmpPage + OrderlyDifferentialPolyXmpPage PartialFractionXmpPage - FullPartialFractionExpansionXmpPage + FullPartialFracExpansionXmpPage PermanentXmpPage PolynomialXmpPage - DistributedMultivariatePolynomialXmpPage - MultivariatePolynomialXmpPage - UnivariatePolynomialXmpPage + DistributedMultivariatePolyXmpPage + MultivariatePolyXmpPage + UnivariatePolyXmpPage FactoredXmpPage ugProblemFactorPage QuaternionXmpPage RadixExpansionXmpPage - HexadecimalExpansionXmpPage + HexExpansionXmpPage DecimalExpansion BinaryExpansion RealClosureXmpPage @@ -124600,11 +118039,11 @@ RootPage SparseTableXmpPage TableXmpPage GeneralSparseTableXmpPage - SquareMatrixXmpPage + SqMatrixXmpPage MatrxiXmpPage ugTypesWritingModesPage ugTypesExposePage - SquareFreeRegularTriangularSetXmpPage + SqFreeRegTriangSetXmpPage StreamXmpPage ugLangItsPage ugProblemSeriesPage @@ -124630,13 +118069,13 @@ RootPage ugTypesAnyNonePage MatrixXmpPage OneDimensionalArrayXmpPage - UnivariatePolynomialXmpPage + UnivariatePolyXmpPage ugProblemFactorPage ugIntroVariablesPage ugTypesConvertPage PolynomialXmpPage - MultivariatePolynomialXmpPage - DistributedMultivariatePolynomialXmpPage + MultivariatePolyXmpPage + DistributedMultivariatePolyXmpPage UniversalSegmentXmpPage SegmentXmpPage SegmentBindingXmpPage @@ -124655,7 +118094,7 @@ RootPage XPBWPolynomialXmpPage XPolynomialXmpPage XPolynomialRingXmpPage - ZeroDimensionalSolvePackageXmpPage + ZeroDimSolvePkgXmpPage ExampleCoverPage Menuexdiff ExDiffBasic @@ -125119,7 +118558,7 @@ UsersGuideExposedPage TwoDimensionalArrayXmpPage MatrixXmpPage PermanentXmpPage - SquareMatrixXmpPage + SqMatrixXmpPage VectorXmpPage ugProblemEigenPage ugProblemLinPolEqnPage @@ -125504,7 +118943,7 @@ UsersGuideExposedPage ugLangLoopsBreakPage ugLangBlocksPage ugWhatsNewLibraryPage - FullPartialFractionExpansionXmpPage + FullPartialFracExpansionXmpPage ugWhatsNewHyperDocPage ugHyperKeysPage ugWhatsNewDocumentationPage @@ -125765,7 +119204,5 @@ ${PAGES}/ht.db: ${BOOK} @ \eject -\begin{thebibliography}{99} -\end{thebibliography} \printindex \end{document} diff --git a/changelog b/changelog index 22e2b78..456bc98 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,5 @@ +20080721 tpd books/bookvol7.1.pamphlet docs/corrections/updates +20080720 tpd books/Makefile add bookvol7.1 to combined table of contents 20080720 tpd books/bookvol7.1.pamphlet docs/corrections/updates 20080720 tpd books/ps/v71topics.eps -> books/ps/v71topicpage.eps 20080720 tpd books/ps/v71youtriedit.eps added