[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: FW: [book] more verbatim #
From: |
root |
Subject: |
[Axiom-developer] Re: FW: [book] more verbatim # |
Date: |
Mon, 6 Nov 2006 01:30:49 -0500 |
patched in axiom--silver--1
--- book.pamphlet Sun Nov 5 23:19:25 2006
+++ book.pamphlet.new Mon Nov 6 01:23:12 2006
@@ -14174,7 +14174,7 @@
\begin{verbatim}
greatGrandParents == [x for x in people |
- reduce(\_or,
+ reduce(_or,
[not empty? children(y) for y in grandchildren(x)],false)]
\end{verbatim}
\returnType{Type: Void}
@@ -54462,7 +54462,7 @@
drawStyle(vp, "shade") Select shading style.
outlineRender(vp, "on") Show polygon outlines.
showRegion(vp,"on") Enclose in a box.
- n := \# flist The number of ribbons
+ n := # flist The number of ribbons
zoom(vp,n,1,n) Zoom in x- and z-directions.
rotate(vp,0,75) Change the angle of view.
vp Return the viewport.
@@ -54725,7 +54725,7 @@
Here is a program to draw a bouquet of $n$ arrows.
\begin{verbatim}
-drawBouquet(n,title) ==}{}
+drawBouquet(n,title) ==
angle := address@hidden The initial angle
sp := createThreeSpace() Create empty space $sp$
for i in 0..n-1 repeat For each index i, create:
@@ -54961,7 +54961,7 @@
real := lo(realRange) The initial real value
for i in 1..realSteps+1 repeat Begin real iteration
imag := lo(imagRange) initial imaginary value
- lp := []\$(List Point DFLOAT) initial list of points $lp$
+ lp := []$(List Point DFLOAT) initial list of points $lp$
for j in 1..imagSteps+1 repeat Begin imaginary iteration
z := f complex(real,imag) value of $f$ at the point
pt := point [real,imag, clipFun sqrt norm z, Create a point
@@ -55101,7 +55101,7 @@
complexNumericFunction f == Turn an expression $f$ into a
v := theVariableIn f function
- compiledFunction(f, v)\$complexFunPack
+ compiledFunction(f, v)$complexFunPack
complexDerivativeFunction(f,n) == Create an nth derivative
v := theVariableIn f function
@@ -55110,7 +55110,7 @@
theVariableIn f == Returns the variable in $f$
vl := variables f The list of variables
- nv := \# vl The number of variables
+ nv := # vl The number of variables
nv > 1 => error "Expression is not univariate."
nv = 0 => 'x Return a dummy variable
first vl
@@ -55276,8 +55276,8 @@
Implementation == add Implementation part begins
arrowScale : DFLOAT := (0.2)::DFLOAT --relative size Local variable 1
arrowAngle : DFLOAT := pi()-pi()/(20::DFLOAT) Local variable 2
- realSteps : INT := 11 --\# real steps Local variable 3
- imagSteps : INT := 11 --\# imaginary steps Local variable 4
+ realSteps : INT := 11 --# real steps Local variable 3
+ imagSteps : INT := 11 --# imaginary steps Local variable 4
clipValue : DFLOAT := 10::DFLOAT --maximum vector length
Local variable 5
@@ -55705,13 +55705,13 @@
Implementation == add
bubbleSort!(m,f) ==
- n := \#m
+ n := #m
for i in 1..(n-1) repeat
for j in n..(i+1) by -1 repeat
if f(m.j,m.(j-1)) then swap!(m,j,j-1)
m
insertionSort!(m,f) ==
- for i in 2..\#m repeat
+ for i in 2..#m repeat
j := i
while j > 1 and f(m.j,m.(j-1)) repeat
swap!(m,j,j-1)
@@ -55755,8 +55755,8 @@
Implementation == add
...
if S has OrderedSet then
- bubbleSort!(m) == bubbleSort!(m,<\$S)
- insertionSort!(m) == insertionSort!(m,<\$S)
+ bubbleSort!(m) == bubbleSort!(m,<$S)
+ insertionSort!(m) == insertionSort!(m,<$S)
\end{verbatim}
In \ref{ugUserBlocks} on page~\pageref{ugUserBlocks},
@@ -56047,7 +56047,7 @@
\begin{verbatim}
SetCategory(): Category ==
Join(Type,CoercibleTo OutputForm) with
- "=" : (\$, \$) -> Boolean
+ "=" : ($, $) -> Boolean
\end{verbatim}
The definition starts off with the name of the
@@ -56166,7 +56166,7 @@
SetCategory(): Category ==
Join(Type, CoercibleTo OutputForm) with
- "=": (\$, \$) -> Boolean
+ "=": ($, $) -> Boolean
++ \bs{}axiom\{x = y\} tests if \bs{}axiom\{x\} and
++ \bs{}axiom\{y\} are equal.
\end{verbatim}
@@ -56229,8 +56229,8 @@
\begin{verbatim}
SemiGroup(): Category == SetCategory with
- "*": (\$,\$) -> \$
- "**": (\$, PositiveInteger) -> \$
+ "*": ($,$) -> $
+ "**": ($, PositiveInteger) -> $
\end{verbatim}
This definition is as simple as that for {\tt SetCategory},
@@ -56316,11 +56316,11 @@
\begin{verbatim}
SemiGroup(): Category == SetCategory with
- "*": (\$, \$) -> \$
- "**": (\$, PositiveInteger) -> \$
+ "*": ($, $) -> $
+ "**": ($, PositiveInteger) -> $
add
- import RepeatedSquaring(\$)
- x: \$ ** n: PositiveInteger == expt(x,n)
+ import RepeatedSquaring($)
+ x: $ ** n: PositiveInteger == expt(x,n)
\end{verbatim}
The $add$ part at the end is used to give ``default definitions'' for
@@ -56375,13 +56375,13 @@
{\tt SemiGroup}.
\begin{verbatim}
-SemiGroup\_\&(\$): Exports == Implementation where
- \$: SemiGroup
+SemiGroup_&($): Exports == Implementation where
+ $: SemiGroup
Exports == with
- "**": (\$, PositiveInteger) -> \$
+ "**": ($, PositiveInteger) -> $
Implementation == add
- import RepeatedSquaring(\$)
- x:\$ ** n:PositiveInteger == expt(x,n)
+ import RepeatedSquaring($)
+ x:$ ** n:PositiveInteger == expt(x,n)
\end{verbatim}
\section{Axioms}
@@ -56526,13 +56526,13 @@
\begin{verbatim}
Ring(): Category ==
- Join(Rng,Monoid,LeftModule(\$: Rng)) with
+ Join(Rng,Monoid,LeftModule($: Rng)) with
characteristic: -> NonNegativeInteger
- coerce: Integer -> \$
+ coerce: Integer -> $
unitsKnown
add
n:Integer
- coerce(n) == n * 1\$\$
+ coerce(n) == n * 1$$
\end{verbatim}
There are only two new things here.
@@ -56632,7 +56632,7 @@
QuotientFieldCategory(R) : Category == ... with ...
if R has OrderedSet then OrderedSet
if R has IntegerNumberSystem then
- ceiling: \$ -> R
+ ceiling: $ -> R
...
\end{verbatim}
@@ -56807,10 +56807,10 @@
++ \bs{}axiom\{quadraticForm(m)\} creates a quadratic
++ quadratic form from a symmetric,
++ square matrix \bs{}axiom\{m\}.
- matrix: \$ -> SquareMatrix(n,K) -- export matrix
+ matrix: $ -> SquareMatrix(n,K) -- export matrix
++ \bs{}axiom\{matrix(qf)\} creates a square matrix
++ from the quadratic form \bs{}axiom\{qf\}.
- elt: (\$, DirectProduct(n,K)) -> K -- export elt
+ elt: ($, DirectProduct(n,K)) -> K -- export elt
++ \bs{}axiom\{qf(v)\} evaluates the quadratic form
++ \bs{}axiom\{qf\} on the vector \bs{}axiom\{v\},
++ producing a scalar.
@@ -57507,19 +57507,19 @@
PI ==> PositiveInteger
Database(S): Exports == Implementation where
S: Object with
- elt: (\$, Symbol) -> String
- display: \$ -> Void
- fullDisplay: \$ -> Void
+ elt: ($, Symbol) -> String
+ display: $ -> Void
+ fullDisplay: $ -> Void
Exports == with
- elt: (\$,QueryEquation) -> \$ Select by an equation
- elt: (\$, Symbol) -> DataList String Select by a field name
- "+": (\$,\$) -> \$ Combine two databases
- "-": (\$,\$) -> \$ Subtract one from another
- display: \$ -> Void A brief database display
- fullDisplay: \$ -> Void A full database display
- fullDisplay: (\$,PI,PI) -> Void A selective display
- coerce: \$ -> OutputForm Display a database
+ elt: ($,QueryEquation) -> $ Select by an equation
+ elt: ($, Symbol) -> DataList String Select by a field name
+ "+": ($,$) -> $ Combine two databases
+ "-": ($,$) -> $ Subtract one from another
+ display: $ -> Void A brief database display
+ fullDisplay: $ -> Void A full database display
+ fullDisplay: ($,PI,PI) -> Void A selective display
+ coerce: $ -> OutputForm Display a database
Implementation == add
...
\end{verbatim}
@@ -57621,15 +57621,15 @@
\begin{verbatim}
QueryEquation(): Exports == Implementation where
Exports == with
- equation: (Symbol, String) -> \$
- variable: \$ -> Symbol
- value:\ \ \ \ \$ -> String
+ equation: (Symbol, String) -> $
+ variable: $ -> Symbol
+ value: $ -> String
Implementation == add
Rep := Record(var:Symbol, val:String)
equation(x, s) == [x, s]
variable q == q.var
- value\ \ \ \ q == q.val
+ value q == q.val
\end{verbatim}
Axiom converts an input expression of the form
@@ -65031,8 +65031,8 @@
sx2 := sin(x/2)
cx2 := cos(x/2)
sq2 := sqrt(address@hidden)
- point [cx * (cx2 * (sq2 + cy) + (sx2 * sy * cy)), \_
- sx * (cx2 * (sq2 + cy) + (sx2 * sy * cy)), \_
+ point [cx * (cx2 * (sq2 + cy) + (sx2 * sy * cy)), _
+ sx * (cx2 * (sq2 + cy) + (sx2 * sy * cy)), _
-sx2 * (sq2 + cy) + cx2 * sy * cy]
draw(klein, 0..4*\%pi, 0..2*\%pi, var1Steps==50, Figure-8 Klein bottle
@@ -65081,7 +65081,7 @@
respectively.
draw(gam, -\%pi..\%pi, -\%pi..\%pi, The Gamma Function
- title == "Gamma(x + \%i*y)", \_
+ title == "Gamma(x + \%i*y)", _
var1Steps == 100, var2Steps == 100)
b(x,y) == Beta(x,y)
@@ -65376,8 +65376,8 @@
\begin{verbatim}
ntubeDraw: (ThreeCurve,TwoCurve,S,S) -> VIEW3D
ntubeDraw(spaceCurve,planeCurve,uRange,tRange) ==
- ntubeDrawOpt(spaceCurve, planeCurve, uRange, \_
- tRange, []\$List DROPT)
+ ntubeDrawOpt(spaceCurve, planeCurve, uRange, _
+ tRange, []$List DROPT)
ntubeDrawOpt: (ThreeCurve,TwoCurve,S,S,List DROPT)
-> VIEW3D
@@ -65410,7 +65410,7 @@
error "Frenet Frame not well defined"
n := (1/ln)*n Make into unit length vectors
b := (1/lb)*b
- [f0, t0, n, b]\$FrenetFrame
+ [f0, t0, n, b]$FrenetFrame
\end{verbatim}
{\bf ngeneralTube}{\it (spaceCurve, planeCurve,}{\it delT, oltT)}
@@ -65456,7 +65456,7 @@
m2 * inverse(m1) in 3-space
makeColumnMatrix(t) == Put the vertices of a tetra-
- m := new(4,4,0)\$DHMATRIX(DFLOAT) hedron into matrix form
+ m := new(4,4,0)$DHMATRIX(DFLOAT) hedron into matrix form
for x in t for i in 1..repeat
for j in 1..3 repeat
m(j,i) := x.j