diff --git a/books/bookvol0.pamphlet b/books/bookvol0.pamphlet index 9b4baa7..ddcb2a1 100644 --- a/books/bookvol0.pamphlet +++ b/books/bookvol0.pamphlet @@ -6899,7 +6899,7 @@ Any domain can be refined to a {\it subdomain} by a membership object of the domain, returns either {\tt true} or {\tt false}. For example, the domain {\tt Integer} can be refined to the subdomain {\tt PositiveInteger}, the set of integers $x$ such that $x > 0$, by giving -the Axiom predicate $x +-> x > 0$. Similarly, Axiom can define +the Axiom predicate {\tt 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 $x$,'' and so on. Trivially, any domain is @@ -7803,7 +7803,7 @@ of type {\tt Integer}. The syntax for writing a {\tt Union} type without selectors is \begin{center} {\tt Union($\hbox{\it type}_{1}$, $\hbox{\it type}_{2}$, -\ldots, $\hbox{\it type}+{N}$)} +\ldots, $\hbox{\it type}_{N}$)} \end{center} The types in a union without selectors must be distinct.\\ } @@ -8517,7 +8517,7 @@ Perhaps we actually wanted a fraction of complex integers. $$\frac{2}{3}$$ -\returnType{Type: Float} +\returnType{Type: Fraction Complex Integer} In each case, AXIOM used the indicated operations, sometimes first needing to convert the two integers into objects of the appropriate type. @@ -10143,7 +10143,7 @@ they appear, except as modified by control expressions such as \index{iterate} {\tt if-then-else} constructions. The value of a block is the value of the expression last evaluated in the block. -To leave a block early, use {\tt =>}''. For example, $i < 0 => x$. The +To leave a block early, use {\tt =>}''. For example, {\tt i < 0 => x}. The expression before the {\tt =>}'' must evaluate to {\tt true} or {\tt false}. The expression following the {\tt =>}'' is the return value for the block. @@ -10505,7 +10505,7 @@ this is impossible. So Axiom has this simple rule: the type of the function is determined by the type of its body, in this case a block. The normal value of a block is the value of its last expression, in this case, a loop. And the value of every loop is the unique value of -{\tt Void}.! So the return type of {\bf f} is {\tt Void}. +{\tt Void}! So the return type of {\bf f} is {\tt Void}. There are two ways to fix this. The best way is for you to tell Axiom what the return type of $f$ is. You do this by giving $f$ a @@ -10544,7 +10544,7 @@ $$The {\tt break} keyword is often more useful \index{break} in terminating \index{loop!leaving via break} a loop. A {\tt break} causes control to transfer to the expression immediately following the loop. As loops -always return the unique value of {\tt Void}., you cannot return a +always return the unique value of {\tt Void}, you cannot return a value with {\tt break}. That is, {\tt break} takes no argument. This example is a modification of the last example in the previous @@ -10917,7 +10917,7 @@ while r <= lastrow repeat \subsection{for Loops} \label{ugLangLoopsForIn} -Axiom provides the {\tt for} \index{for} and {\tt in\ } \index{in} keywords in +Axiom provides the {\tt for} \index{for} and {\tt in} \index{in} keywords in {\tt repeat} loops, allowing you to iterate across all \index{iteration} elements of a list, or to have a variable take on integral values from a lower bound to an upper bound. We shall refer to these modifying @@ -10943,7 +10943,7 @@ of {\tt Void}.\\ } \subsection{for i in n..m repeat} \label{ugLangLoopsForInNM} -If {\tt for} \index{for} is followed by a variable name, the {\tt in\ } +If {\tt for} \index{for} is followed by a variable name, the {\tt in} \index{in} keyword and then an integer segment of the form n..m, \index{segment} the end test for this loop is the predicate i > m. The body of the loop is evaluated m-n+1 times if this number is @@ -11032,7 +11032,7 @@ See \domainref{Segment}. By default, the difference between values taken on by a variable in loops such as {\tt for i in n..m repeat ...} is 1. It is possible to supply another, possibly negative, step value by using the {\tt by} -\index{by} keyword along with {\tt for} and {\tt in\ }. Like the upper and +\index{by} keyword along with {\tt for} and {\tt in}. Like the upper and lower bounds, the step value following the {\tt by} keyword must be an integer. Note that the loop {\tt for i in 1..2 by 0 repeat output(i)} will not terminate by itself, as the step value does not change the @@ -11080,7 +11080,7 @@ and less than the first prime greater than 15. Another variant of the {\tt for} loop has the form: \begin{center} -{\it {\tt for} x {\tt in\ } list {\tt repeat} loopBody} +{\it {\tt for} x {\tt in} list {\tt repeat} loopBody} \end{center} This form is used when you want to iterate directly over the elements @@ -11269,7 +11269,7 @@$$ \returnType{Type: NonNegativeInteger} Here looping stops when the list $l$ is exhausted, even though -the $for i in 0..$ specifies no terminating condition. +the {\tt for i in 0..} specifies no terminating condition. \spadcommand{for i in 0.. for x in l repeat sum := i * x} \returnType{Type: Void} @@ -11713,7 +11713,7 @@ is a triple prime. We could do this by a triple {\tt for} iteration. A more economical way is to use {\bf firstOfTwins}. This time however, put a semicolon at the end of the line. -Create the stream of firstTriplets. Put a semicolon at the end so +Create the stream of {\bf firstTriplets}. Put a semicolon at the end so that no elements are computed. \spadcommand{firstTriplets := [p for p in firstOfTwins for q in rest firstOfTwins | q = p+2];} \returnType{Type: Stream Integer} @@ -11953,10 +11953,10 @@ macro fibStream == Use \spadfunFrom{concat}{Stream} to start with the first two \index{Fibonacci numbers} Fibonacci numbers. -\spadcommand{concat([0,1],fibStream)} +\spadcommand{concat([1,1],fibStream)} $$\left[ -0, 1, 2, 3, 5, 8, {13}, {21}, {34}, {55}, +1, 1, 2, 3, 5, 8, {13}, {21}, {34}, {55}, \ldots \right]$$ @@ -12027,7 +12027,7 @@ example of a prefix operator is prefix {\tt -}''. For example, $- 2 + 5$ converts to $(- 2) + 5$ producing the value $3$. Any prefix function taking two arguments can be written in an infix manner by putting an ampersand {\tt \&}'' before the name. Thus ${\tt D}(2*x,x)$ can -be written as $2*x\ {\tt \&D} x$ returning $2$. +be written as $2*x\ {\tt \&D}\ x$ returning $2$. Every function in Axiom is identified by a {\it name} and {\it type}. (An exception is an anonymous function'' discussed in @@ -12618,14 +12618,14 @@ that''. \index{such that} \spadcommand{fact(n | n > 0) == n * fact(n - 1)} \returnType{Type: Void} -What is the value for $n = 3$? -\spadcommand{fact(3)} +What is the value for $n = 7$? +\spadcommand{fact(7)} \begin{verbatim} Compiling function fact with type Integer -> Integer Compiling function fact as a recurrence relation. \end{verbatim} $$-6 +5040$$ \returnType{Type: PositiveInteger} @@ -13325,7 +13325,7 @@ back to the main Browse menu, erase {\tt function}, enter {\tt Cross Reference} and then on {\tt Domains}. The list you see contains over forty domains that belong to the category {\tt ConvertibleTo InputForm}. Thus you can use {\bf function} -for {\tt Integer}, {\tt Float}, {\tt String}, {\tt Complex}, +for {\tt Integer}, {\tt Float}, {\tt Symbol}, {\tt Complex}, {\tt Expression}, and so on. \section{Functions Defined with Blocks} @@ -14217,7 +14217,7 @@ Here we have used three output operations. Operation \spadfunFrom{output}{OutputForm} displays the printable form of objects on the screen, \spadfunFrom{center}{OutputForm} centers a printable form in the width of the screen, and -\spadfunFrom{blankSeparate}{OutputForm} takes a list of nprintable +\spadfunFrom{blankSeparate}{OutputForm} takes a list of n printable forms and inserts a blank between successive elements. Look at the result. @@ -14428,7 +14428,7 @@ issued. Think of rewrite rules as functions that take one argument. When a rewrite rule $A = B$ is applied to an argument $f$, its meaning is: rewrite every subexpression of $f$ that {\it matches} $A$ by $B.$'' The left-hand side of a rewrite rule is called a {\it pattern}; -its right-side side is called its {\it substitution}. +its right-hand side is called its {\it substitution}. Create a rewrite rule named {\bf logrule}. The generated symbol beginning with a {\tt \%}'' is a place-holder for any other terms that @@ -14907,7 +14907,7 @@ The general format for drawing a function defined by a formula $f(x)$ is: where $a..b$ defines the range of $x$, and where {\it options} prescribes zero or more options as described in \sectionref{ugGraphTwoDOptions}. An -example of an option is $curveColor == bright red().$ An alternative +example of an option is $curveColor == bright\ red().$ An alternative format involving functions $f$ and $g$ is also available.\\ } @@ -14984,7 +14984,7 @@ parametric formulas $x = f(t)$ and $y = g(t)$ is: where $a..b$ defines the range of the independent variable $t$, and where {\it options} prescribes zero or more options as described in \sectionref{ugGraphThreeDOptions}. An -example of an option is $curveColor == bright red().$\\ } +example of an option is $curveColor == bright\ red().$\\ } Here's an example: @@ -16198,7 +16198,7 @@ of two variables $x$ and $y$ is: where $a..b$ and $c..d$ define the range of $x$ and $y$, and where {\it options} prescribes zero or more options as described in \sectionref{ugGraphThreeDOptions}. -An example of an option is $title == "Title of Graph".$ +An example of an option is $title == "Title\ of\ Graph".$ An alternative format involving a function $f$ is also available.\\ } @@ -16253,7 +16253,7 @@ $z = h(t)$ is: where $a..b$ defines the range of the independent variable $t$, and where {\it options} prescribes zero or more options as described in \sectionref{ugGraphThreeDOptions}. -An example of an option is $title == "Title of Graph".$ +An example of an option is $title == "Title\ of\ Graph".$ An alternative format involving functions $f$, $g$ and $h$ is also available.\\ } @@ -16326,7 +16326,7 @@ where $a..b$ and $c..d$ define the range of the independent variables $u$ and $v$, and where {\it options} prescribes zero or more options as described in \sectionref{ugGraphThreeDOptions}. -An example of an option is $title == "Title of Graph".$ +An example of an option is $title == "Title\ of\ Graph".$ An alternative format involving functions $f$, $g$ and $h$ is also available.\\ } diff --git a/books/bookvol1.pamphlet b/books/bookvol1.pamphlet index 2962c4e..4d577ea 100644 --- a/books/bookvol1.pamphlet +++ b/books/bookvol1.pamphlet @@ -9463,7 +9463,7 @@ Any domain can be refined to a {\it subdomain} by a membership object of the domain, returns either {\tt true} or {\tt false}. For example, the domain {\tt Integer} can be refined to the subdomain {\tt PositiveInteger}, the set of integers $x$ such that $x > 0$, by giving -the Axiom predicate $x +-> x > 0$. Similarly, Axiom can define +the Axiom predicate {\tt 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 $x$,'' and so on. Trivially, any domain is @@ -10397,7 +10397,7 @@ of type {\tt Integer}. The syntax for writing a {\tt Union} type without selectors is \begin{center} {\tt Union($\hbox{\it type}_{1}$, $\hbox{\it type}_{2}$, -\ldots, $\hbox{\it type}+{N}$)} +\ldots, $\hbox{\it type}_{N}$)} \end{center} The types in a union without selectors must be distinct.\\ } @@ -11107,7 +11107,7 @@ Perhaps we actually wanted a fraction of complex integers. $$2 \over 3$$ -\returnType{Type: Float} +\returnType{Type: Fraction Complex Integer} In each case, Axiom used the indicated operations, sometimes first needing to convert the two integers into objects of the appropriate type. diff --git a/books/bookvol7.1.pamphlet b/books/bookvol7.1.pamphlet index 50c7d72..882ea53 100644 --- a/books/bookvol7.1.pamphlet +++ b/books/bookvol7.1.pamphlet @@ -85394,7 +85394,7 @@ Here is the value otherwise. \xtc{ What is the value for \axiom{n = 7}? }{ -\spadpaste{facto(3) \free{facton}} +\spadpaste{facto(7) \free{facton}} } \xtc{ What is the value for \axiom{n = -7}? @@ -86786,7 +86786,7 @@ 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{Integer}, \axiomType{Float}, \axiomType{Symbol}, \axiomType{Complex}, \axiomType{Expression}, and so on. \endscroll diff --git a/changelog b/changelog index 31e66f5..511258a 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +20100112 lxd src/axiom-website/patches.html 20100112.01.lxd.patch +20100112 lxd books/bookvol7.1 fix typos +20100112 lxd books/bookvol1 fix typos +20100112 lxd books/bookvol0 fix typos 20100101 tpd src/axiom-website/patches.html 20100101.06.tpd.patch 20100101 tpd src/input/fixed fix typo 20100101 tpd src/axiom-website/patches.html 20100101.05.tpd.patch diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 9616b75..2cc7c3e 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -2356,7 +2356,9 @@ src/input/en.input rewrite using machineFraction
src/axiom-website/patches.html fix 2009->2010 dates
20100101.05.tpd.patch src/input/e1.input rewrite using machineFraction
-20100101.05.tpd.patch +20100101.06.tpd.patch src/input/fixed fix typo
+20100112.01.lxd.patch +books/bookvol0,vol1,vol7.1 fix typos